Index: /pjproject/branches/split-3rd-party/COPYING
===================================================================
--- /pjproject/branches/split-3rd-party/COPYING	(revision 1163)
+++ /pjproject/branches/split-3rd-party/COPYING	(revision 1163)
@@ -0,0 +1,352 @@
+                      GNU GENERAL PUBLIC LICENSE
+                         Version 2, June 1991
+
+     Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+     59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
+
+     Everyone is permitted to copy and distribute verbatim copies
+     of this license document, but changing it is not allowed.
+
+Preamble
+========
+
+The licenses for most software are designed to take away your freedom
+to share and change it.  By contrast, the GNU General Public License is
+intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not price.
+Our General Public Licenses are designed to make sure that you have
+the freedom to distribute copies of free software (and charge for this
+service if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone
+to deny you these rights or to ask you to surrender the rights.  These
+restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis
+or for a fee, you must give the recipients all the rights that you
+have.  You must make sure that they, too, receive or can get the source
+code.  And you must show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+Finally, any free program is threatened constantly by software patents.
+We wish to avoid the danger that redistributors of a free program will
+individually obtain patent licenses, in effect making the program
+proprietary.  To prevent this, we have made it clear that any patent
+must be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and
+modification follow.
+
+                      GNU GENERAL PUBLIC LICENSE
+    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+  0. This License applies to any program or other work which contains a
+     notice placed by the copyright holder saying it may be distributed
+     under the terms of this General Public License.  The "Program",
+     below, refers to any such program or work, and a "work based on
+     the Program" means either the Program or any derivative work under
+     copyright law: that is to say, a work containing the Program or a
+     portion of it, either verbatim or with modifications and/or
+     translated into another language.  (Hereinafter, translation is
+     included without limitation in the term "modification".)  Each
+     licensee is addressed as "you".
+
+     Activities other than copying, distribution and modification are
+     not covered by this License; they are outside its scope.  The act
+     of running the Program is not restricted, and the output from the
+     Program is covered only if its contents constitute a work based on
+     the Program (independent of having been made by running the
+     Program).  Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+     source code as you receive it, in any medium, provided that you
+     conspicuously and appropriately publish on each copy an appropriate
+     copyright notice and disclaimer of warranty; keep intact all the
+     notices that refer to this License and to the absence of any
+     warranty; and give any other recipients of the Program a copy of
+     this License along with the Program.
+
+     You may charge a fee for the physical act of transferring a copy,
+     and you may at your option offer warranty protection in exchange
+     for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+     of it, thus forming a work based on the Program, and copy and
+     distribute such modifications or work under the terms of Section 1
+     above, provided that you also meet all of these conditions:
+
+       a. You must cause the modified files to carry prominent notices
+          stating that you changed the files and the date of any change.
+
+       b. You must cause any work that you distribute or publish, that
+          in whole or in part contains or is derived from the Program
+          or any part thereof, to be licensed as a whole at no charge
+          to all third parties under the terms of this License.
+
+       c. If the modified program normally reads commands interactively
+          when run, you must cause it, when started running for such
+          interactive use in the most ordinary way, to print or display
+          an announcement including an appropriate copyright notice and
+          a notice that there is no warranty (or else, saying that you
+          provide a warranty) and that users may redistribute the
+          program under these conditions, and telling the user how to
+          view a copy of this License.  (Exception: if the Program
+          itself is interactive but does not normally print such an
+          announcement, your work based on the Program is not required
+          to print an announcement.)
+
+     These requirements apply to the modified work as a whole.  If
+     identifiable sections of that work are not derived from the
+     Program, and can be reasonably considered independent and separate
+     works in themselves, then this License, and its terms, do not
+     apply to those sections when you distribute them as separate
+     works.  But when you distribute the same sections as part of a
+     whole which is a work based on the Program, the distribution of
+     the whole must be on the terms of this License, whose permissions
+     for other licensees extend to the entire whole, and thus to each
+     and every part regardless of who wrote it.
+
+     Thus, it is not the intent of this section to claim rights or
+     contest your rights to work written entirely by you; rather, the
+     intent is to exercise the right to control the distribution of
+     derivative or collective works based on the Program.
+
+     In addition, mere aggregation of another work not based on the
+     Program with the Program (or with a work based on the Program) on
+     a volume of a storage or distribution medium does not bring the
+     other work under the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+     under Section 2) in object code or executable form under the terms
+     of Sections 1 and 2 above provided that you also do one of the
+     following:
+
+       a. Accompany it with the complete corresponding machine-readable
+          source code, which must be distributed under the terms of
+          Sections 1 and 2 above on a medium customarily used for
+          software interchange; or,
+
+       b. Accompany it with a written offer, valid for at least three
+          years, to give any third-party, for a charge no more than your
+          cost of physically performing source distribution, a complete
+          machine-readable copy of the corresponding source code, to be
+          distributed under the terms of Sections 1 and 2 above on a
+          medium customarily used for software interchange; or,
+
+       c. Accompany it with the information you received as to the offer
+          to distribute corresponding source code.  (This alternative is
+          allowed only for noncommercial distribution and only if you
+          received the program in object code or executable form with
+          such an offer, in accord with Subsection b above.)
+
+     The source code for a work means the preferred form of the work for
+     making modifications to it.  For an executable work, complete
+     source code means all the source code for all modules it contains,
+     plus any associated interface definition files, plus the scripts
+     used to control compilation and installation of the executable.
+     However, as a special exception, the source code distributed need
+     not include anything that is normally distributed (in either
+     source or binary form) with the major components (compiler,
+     kernel, and so on) of the operating system on which the executable
+     runs, unless that component itself accompanies the executable.
+
+     If distribution of executable or object code is made by offering
+     access to copy from a designated place, then offering equivalent
+     access to copy the source code from the same place counts as
+     distribution of the source code, even though third parties are not
+     compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+     except as expressly provided under this License.  Any attempt
+     otherwise to copy, modify, sublicense or distribute the Program is
+     void, and will automatically terminate your rights under this
+     License.  However, parties who have received copies, or rights,
+     from you under this License will not have their licenses
+     terminated so long as such parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+     signed it.  However, nothing else grants you permission to modify
+     or distribute the Program or its derivative works.  These actions
+     are prohibited by law if you do not accept this License.
+     Therefore, by modifying or distributing the Program (or any work
+     based on the Program), you indicate your acceptance of this
+     License to do so, and all its terms and conditions for copying,
+     distributing or modifying the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+     Program), the recipient automatically receives a license from the
+     original licensor to copy, distribute or modify the Program
+     subject to these terms and conditions.  You may not impose any
+     further restrictions on the recipients' exercise of the rights
+     granted herein.  You are not responsible for enforcing compliance
+     by third parties to this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+     infringement or for any other reason (not limited to patent
+     issues), conditions are imposed on you (whether by court order,
+     agreement or otherwise) that contradict the conditions of this
+     License, they do not excuse you from the conditions of this
+     License.  If you cannot distribute so as to satisfy simultaneously
+     your obligations under this License and any other pertinent
+     obligations, then as a consequence you may not distribute the
+     Program at all.  For example, if a patent license would not permit
+     royalty-free redistribution of the Program by all those who
+     receive copies directly or indirectly through you, then the only
+     way you could satisfy both it and this License would be to refrain
+     entirely from distribution of the Program.
+
+     If any portion of this section is held invalid or unenforceable
+     under any particular circumstance, the balance of the section is
+     intended to apply and the section as a whole is intended to apply
+     in other circumstances.
+
+     It is not the purpose of this section to induce you to infringe any
+     patents or other property right claims or to contest validity of
+     any such claims; this section has the sole purpose of protecting
+     the integrity of the free software distribution system, which is
+     implemented by public license practices.  Many people have made
+     generous contributions to the wide range of software distributed
+     through that system in reliance on consistent application of that
+     system; it is up to the author/donor to decide if he or she is
+     willing to distribute software through any other system and a
+     licensee cannot impose that choice.
+
+     This section is intended to make thoroughly clear what is believed
+     to be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+     certain countries either by patents or by copyrighted interfaces,
+     the original copyright holder who places the Program under this
+     License may add an explicit geographical distribution limitation
+     excluding those countries, so that distribution is permitted only
+     in or among countries not thus excluded.  In such case, this
+     License incorporates the limitation as if written in the body of
+     this License.
+
+  9. The Free Software Foundation may publish revised and/or new
+     versions of the General Public License from time to time.  Such
+     new versions will be similar in spirit to the present version, but
+     may differ in detail to address new problems or concerns.
+
+     Each version is given a distinguishing version number.  If the
+     Program specifies a version number of this License which applies
+     to it and "any later version", you have the option of following
+     the terms and conditions either of that version or of any later
+     version published by the Free Software Foundation.  If the Program
+     does not specify a version number of this License, you may choose
+     any version ever published by the Free Software Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+     programs whose distribution conditions are different, write to the
+     author to ask for permission.  For software which is copyrighted
+     by the Free Software Foundation, write to the Free Software
+     Foundation; we sometimes make exceptions for this.  Our decision
+     will be guided by the two goals of preserving the free status of
+     all derivatives of our free software and of promoting the sharing
+     and reuse of software generally.
+
+                                NO WARRANTY
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
+     WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
+     LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+     HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
+     WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
+     NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+     FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
+     QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+     PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
+     SERVICING, REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+     WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
+     MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
+     LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
+     INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
+     INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+     DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
+     OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
+     OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
+     ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+                      END OF TERMS AND CONDITIONS
+How to Apply These Terms to Your New Programs
+=============================================
+
+If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these
+terms.
+
+To do so, attach the following notices to the program.  It is safest to
+attach them to the start of each source file to most effectively convey
+the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+     ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
+     Copyright (C) YYYY  NAME OF AUTHOR
+
+     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.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+     Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
+     Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+     This is free software, and you are welcome to redistribute it
+     under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the
+appropriate parts of the General Public License.  Of course, the
+commands you use may be called something other than `show w' and `show
+c'; they could even be mouse-clicks or menu items--whatever suits your
+program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+     Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+     `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+     SIGNATURE OF TY COON, 1 April 1989
+     Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library,
+you may consider it more useful to permit linking proprietary
+applications with the library.  If this is what you want to do, use the
+GNU Library General Public License instead of this License.
+
Index: /pjproject/branches/split-3rd-party/INSTALL.txt
===================================================================
--- /pjproject/branches/split-3rd-party/INSTALL.txt	(revision 1163)
+++ /pjproject/branches/split-3rd-party/INSTALL.txt	(revision 1163)
@@ -0,0 +1,48 @@
+[Last update: 2007/02/18]
+
+-= INTRO=-
+
+This top level projects:
+
+ - pjlib:       portability and basic framework library
+ - pjlib-util:  lexical scanner, XML, STUN, MD5, DNS, etc.
+ - pjmedia:     media framework and codecs
+ - pjsip:       SIP stacks (core, UA layer, SIMPLE, etc.)
+ - pjsip-apps:  SIP apps (pjsua, pjsip-perf)
+
+
+-= COMPILING =-
+
+On Windows:
+ - Visual Studio 6: open pjproject.dsw
+ - Visual Studio 8/2005: open pjproject-vs8.sln
+ - Embedded VisualC 4: open open pjsip-apps\build\wince-evc4\wince_demos.vcw
+ - Build pjsua
+
+With Makefile:
+ - on top level dir (e.g. ~/pjproject)
+ - ./configure && make dep && make clean && make
+
+Binaries will be in pjsip-apps/bin.
+
+
+-= PYTHON MODULE =-
+
+On Windows:
+ - Visual Studio 6: open pjsip-apps\build\pjsip_apps.dsw
+ - Build py_pjsua module
+
+With GNU and Python:
+ - cd pjsip-apps/src/py_pjsua
+ - python setup.py install
+
+One Python sample application is provided:
+ pjsip-apps/src/py_pjsua/pjsua_app.py
+ 
+ 
+-= PORTING =-
+
+ - Just need to port pjlib.
+ - PJLIB doc has detailed info how to do this.
+ - Must pass pjlib-test!
+
Index: /pjproject/branches/split-3rd-party/Makefile
===================================================================
--- /pjproject/branches/split-3rd-party/Makefile	(revision 1163)
+++ /pjproject/branches/split-3rd-party/Makefile	(revision 1163)
@@ -0,0 +1,60 @@
+include build.mak
+include build/host-$(HOST_NAME).mak
+
+DIRS = pjlib pjlib-util pjnath pjmedia pjsip pjsip-apps
+
+ifdef MINSIZE
+MAKE_FLAGS := MINSIZE=1
+endif
+
+all clean dep depend distclean doc print realclean:
+	for dir in $(DIRS); do \
+	   if [ -d $$dir ]; then \
+		if $(MAKE) $(MAKE_FLAGS) -C $$dir/build $@; then \
+		    true; \
+		else \
+		    exit 1; \
+		fi; \
+	   fi; \
+	done
+
+LIBS = 	pjlib/lib/libpj-$(TARGET_NAME).a \
+	pjlib-util/lib/libpjlib-util-$(TARGET_NAME).a \
+	pjnath/lib/libpjnath-$(TARGET_NAME).a \
+	pjmedia/lib/libpjmedia-$(TARGET_NAME).a \
+	pjmedia/lib/libpjmedia-codec-$(TARGET_NAME).a \
+       	pjsip/lib/libpjsip-$(TARGET_NAME).a \
+	pjsip/lib/libpjsip-ua-$(TARGET_NAME).a \
+	pjsip/lib/libpjsip-simple-$(TARGET_NAME).a \
+	pjsip/lib/libpjsua-$(TARGET_NAME).a
+BINS = 	pjsip-apps/bin/pjsua-$(TARGET_NAME)$(HOST_EXE) 
+
+size:
+	@echo -n 'Date: '
+	@date
+	@echo
+	@for lib in $(LIBS); do \
+		echo "$$lib:"; \
+		size -t $$lib | awk '{print $$1 "\t" $$2 "\t" $$3 "\t" $$6}'; \
+		echo; \
+	done
+	@echo
+	@for bin in $(BINS); do \
+		echo "size $$bin:"; \
+		size $$bin; \
+	done
+
+#dos2unix:
+#	for f in `find . | egrep '(mak|h|c|S|s|Makefile)$$'`; do \
+#		dos2unix "$$f" > dos2unix.tmp; \
+#		cp dos2unix.tmp "$$f"; \
+#	done
+#	rm -f dos2unix.tmp
+
+xhdrid:
+	for f in `find . | egrep '\.(h|c|S|s|cpp|hpp)$$'`; do \
+		echo Processing $$f...; \
+		cat $$f | sed 's/.*\$$Author\$$/ */' > /tmp/id; \
+		cp /tmp/id $$f; \
+	done
+
Index: /pjproject/branches/split-3rd-party/README-RTEMS
===================================================================
--- /pjproject/branches/split-3rd-party/README-RTEMS	(revision 1163)
+++ /pjproject/branches/split-3rd-party/README-RTEMS	(revision 1163)
@@ -0,0 +1,87 @@
+
+
+
+              Build Instructions for PJLIB/PJMEDIA/PJSIP RTEMS Port
+
+
+
+The RTEMS port uses the POSIX abstraction layer at the moment, and has been 
+tested with RTEMS 4.6 on i386 target.
+
+
+Building RTEMS
+---------------
+I use RTEMS 4.6 on a cygwin host with i386/pc386 as target, but I think it 
+should work with different RTEMS versions/hosts/targets. 
+
+RTEMS was built with the following commands:
+
+  $ /opt/src/rtems-4.6.6/configure --enable-cxx --enable-posix --enable-networking --enable-rdbg --enable-tests --enable-rtemsbsp=pc386 --target=i386-rtems
+  $ make
+  $ make install
+
+
+Supported Targets
+-----------------
+At the moment, pjlib supports i386 and mpc860 CPU target. For other targets, 
+you would need to create/tweak the appropriate "m-xxx.mak" in "build" directory
+and the corresponding "m_xxx.h" header file in "pj/compat" directory.
+
+Please refer to pjlib porting guide about how to port PJLIB to new CPU target.
+
+
+Building PJLIB/PJMEDIA/PJSIP
+----------------------------
+Use the following steps to build the libraries:
+
+
+1. Set RTEMS_LIBRARY_PATH environment variable to point to your BSP directory 
+   (which is <RTEMS INSTALLATION POINT>/<BOARD SUPPORT PACKAGE>). 
+
+   For example (with sh):
+ 
+   $ export RTEMS_LIBRARY_PATH=/opt/rtems-4.6/i386-rtems/pc386
+
+
+2. Unfortunately pjproject's configure script is unable to create "build.mak" 
+   for cross compilation (but this may change in the future), so we need to 
+   create "build.mak" manually.
+
+   The file "README-configure" has some info about the variables in "build.mak".
+
+   For example, the "build.mak" for i386 target:
+
+   export MACHINE_NAME := i386
+   export OS_NAME := rtems
+   export HOST_NAME := mingw
+   export CC_NAME := gcc
+   export TARGET_NAME := i386-rtems
+   export CROSS_COMPILE := i386-rtems-
+
+
+3. Put additional CFLAGS or LDFLAGS that are specific to your target in 
+   "user.mak".
+
+   For example, my "user.mak" looks like this:
+
+   export CFLAGS += 
+   export LDFLAGS += -Wl,-Ttext,0x00100000 -Wl,--defsym -Wl,HeapSize=0x400000
+
+
+4. Build the libraries:
+
+   $ make dep && make distclean && make
+
+
+5. That should be it. The libraries should be in "lib" directory and 
+   applications in "bin" directory.
+
+
+
+Acknowledgements
+----------------
+Many thanks for Phil Torre <ptorre at zetron dot com>, who did most of the 
+initial porting and testing with pjlib etc. All credits go to him.
+
+
+
Index: /pjproject/branches/split-3rd-party/README.txt
===================================================================
--- /pjproject/branches/split-3rd-party/README.txt	(revision 1163)
+++ /pjproject/branches/split-3rd-party/README.txt	(revision 1163)
@@ -0,0 +1,948 @@
+
+Getting Started: Building and Using PJSIP and PJMEDIA
+
+   [Last Update: $Date: 2007-02-02 20:42:44 +0000 (Fri, 02 Feb 2007) $]
+
+                                                   Print Friendly Page
+     _________________________________________________________________
+
+   This article describes how to download, customize, build, and use the open
+   source PJSIP and PJMEDIA SIP and media stack. The online (and HTML) version
+   of this file can be downloaded from http://www.pjsip.org/using.htm
+
+
+Quick Info
+     _________________________________________________________________
+
+   Building with GNU tools (Linux, *BSD, MacOS X, mingw, etc.)
+          Generally these should be all that are needed to build the libraries,
+          applications, and samples:
+
+   $ ./configure
+   $ make dep && make clean && make
+
+   Building Win32 Target with Microsoft Visual Studio
+          Generally we can just do these steps:
+
+         1. Visual Studio 6: open pjproject.dsw workspace,
+         2. Visual Studio 2005: open pjproject-vs8.sln solution,
+         3. Create an empty pjlib/include/pj/config_site.h, and
+         4. build the pjsua application.
+
+   Building for Windows Mobile
+          Generally these are all that are needed:
+
+         1. Open pjsip-apps/build/wince-evc4/wince_demos.vcw EVC4 workspace,
+         2. Create an empty pjlib/include/pj/config_site.h, and
+         3. build the pjsua_wince application.
+
+   Invoking Older Build System (e.g. for RTEMS)
+          Generally these should be all that are needed to build the libraries,
+          applications, and samples:
+
+   $ ./configure-legacy
+   $ make dep && make clean && make
+
+   Locating Output Binaries/Libraries
+          Libraries will be put in lib directory, and binaries will be put in
+          bin directory, under each projects.
+
+   Running the Applications
+          After successful build, you can try running pjsua application on
+          pjsip-apps/bin   directory.   PJSUA  manual  can  be  found  in
+          http://www.pjsip.org/pjsua.htm page.
+
+
+Table of Contents:
+     _________________________________________________________________
+
+   1. Getting the Source Distribution
+
+     1.1 Getting the Release tarball
+
+     1.2 Getting from Subversion trunk
+
+     1.3 Source Directories Layout
+
+   2. Build Preparation
+
+     2.1 config_site.h file
+
+     2.2 Disk Space Requirements
+
+   3.  Building Linux, *nix, *BSD, and MacOS X Targets with GNU Build
+   Systems
+
+     3.1 Supported Targets
+
+     3.2 Requirements
+
+     3.3 Running configure
+
+     3.4 Running make
+
+     3.5 Cross Compilation
+
+     3.6 Build Customizations
+
+   4. Building for Windows Targets with Microsoft Visual Studio
+
+     4.1 Requirements
+
+     4.2 Building the Projects
+
+     4.3 Debugging the Sample Application
+
+   5. Building for Windows Mobile Targets (Windows CE/WinCE/PDA/SmartPhone)
+
+     5.1 Requirements
+
+     5.2 Building the Projects
+
+   6. Older PJLIB Build System for Non-Autoconf Targets (e.g. RTEMS)
+
+     6.1 Supported Targets
+
+     6.2 Invoking the Build System
+
+   7. Running the Applications
+
+     7.1 pjsua
+
+     7.2 Sample Applications
+
+     7.3 pjlib-test
+
+     7.4 pjsip-test
+
+   8. Using PJPROJECT with Applications
+
+
+   Appendix I: Common Problems/Frequently Asked Question (FAQ)
+
+     I.1 fatal error C1083: Cannot open include file: 'pj/config_site.h':
+   No such file or directory
+
+
+1. Getting the Source Code Distribution
+     _________________________________________________________________
+
+   All libraries (PJLIB, PJLIB-UTIL, PJSIP, PJMEDIA, and PJMEDIA-CODEC) are
+   currently distributed under a single source tree, collectively named as
+   PJPROJECT or just PJ libraries. These libraries can be obtained by either
+   downloading the release tarball or getting them from the Subversion trunk.
+
+
+1.1 Getting the Release tarball
+     _________________________________________________________________
+
+   Getting the released tarball is a convenient way to obtain stable version of
+   PJPROJECT. The tarball may not contain the latest features or bug-fixes, but
+   normally it is considered more stable as each will be tested more rigorously
+   before released.
+
+   The   latest   released   tarball   can   be   downloaded   from   the
+   http://www.pjsip.org/download.htm.
+
+
+1.2 Getting from Subversion trunk
+     _________________________________________________________________
+
+   PJPROJECT  Subversion  repository  will always contain the latest/most
+   up-to-date version of the sources. Normally the Subversion repository is
+   always kept in a "good" state. However, there's always a chance that things
+   break  and  the  tree  doesn't  build  correctly (particularly for the
+   "not-so-popular" targets), so please consult the mailing list should there
+   be any problems.
+
+   Using Subversion also has benefits of keeping the local copy of the source
+   up to date with the main PJ source tree and to easily track the changes made
+   to the local copy, if any.
+
+
+What is Subversion
+
+   Subversion (SVN) is Open Source version control system similar to CVS.
+   Subversion homepage is in http://subversion.tigris.org/
+
+
+Getting Subversion Client
+
+   A Subversion (SVN) client is needed to download the PJ source files from
+   pjsip.org  SVN  tree.  SVN  client  binaries  can  be  downloaded from
+   http://subversion.tigris.org/, and the program should be available for
+   Windows, Linux, MacOS X, and many more platforms.
+
+
+Getting the Source for The First Time
+
+   Once Subversion client is installed, we can use these commands to initially
+   retrieve the latest sources from the Subversion trunk:
+
+
+
+   $ svn co http://svn.pjproject.net/repos/pjproject/trunk pjproject
+   $ cd pjproject
+
+
+Keeping The Local Copy Up-to-Date
+
+   Once sources have been downloaded, we can keep the local copy up to date by
+   periodically synchronizing the local source with the latest revision from
+   the  PJ's  Subversion  trunk. The mailing list provides best source of
+   information about the availability of new updates in the trunk.
+
+   To  update  the  local  copy  with the latest changes in the main PJ's
+   repository:
+
+
+
+   $ cd pjproject
+   $ svn update
+
+
+Tracking Local and Remote Changes
+
+   To see what files have been changed locally:
+
+
+
+   $ cd pjproject
+   $ svn status
+
+   The above command only compares local file against the original local copy,
+   so it doesn't require Internet connection while performing the check.
+
+   To see both what files have been changed locally and what files have been
+   updated in the PJ's Subversion repository:
+
+
+
+   $ cd pjproject
+   $ svn status -u
+
+   Note that this command requires active Internet connection to query the
+   status of PJPROJECT's source repository.
+
+
+1.3 Source Directories Layout
+     _________________________________________________________________
+
+Top-Level Directory Layout
+
+   The top-level directories (denoted as $TOP here) in the source distribution
+   contains the following sub-directories:
+
+   $TOP/build
+          Contains makefiles that are common for all projects.
+
+   $TOP/pjlib
+          Contains  header  and  source files of PJLIB. PJLIB is the base
+          portability  and  framework  library which is used by all other
+          libraries
+
+   $TOP/pjlib-util
+          Contains  PJLIB-UTIL  header and source files. PJLIB-UTIL is an
+          auxiliary library that contains utility functions such as scanner,
+          XML, STUN, MD5 algorithm, getopt() implementation, etc.
+
+   $TOP/pjmedia
+          Contains PJMEDIA and PJMEDIA-CODEC header and source files. The
+          sources of various codecs (such as GSM, Speex, and iLBC) can be found
+          under this directory.
+
+   $TOP/pjsip
+          Contains PJSIP header and source files.
+
+   $TOP/pjsip-apps
+          Contains source code for PJSUA and various sample applications.
+
+
+Individual Directory Inside Each Project
+
+   Each library directory further contains these sub-directories:
+
+   bin
+          Contains binaries produced by the build process.
+
+   build
+          Contains build scripts/makefiles, project files, project workspace,
+          etc. to build the project. In particular, it contains one Makefile
+          file  to  build the project with GNU build systems, and a *.dsw
+          workspace file to build the library with Microsoft Visual Studio 6 or
+          later.
+
+   build/output
+          The build/output directory contains the object files and other files
+          generated by the build process. To support building multiple targets
+          with a single source tree, each build target will occupy a different
+          subdirectory under this directory.
+
+   build/wince-evc4
+          This directory contains the project/workspace files to build Windows
+          CE/WinCE version of the project using Microsoft Embedded Visual C++
+          4.
+
+   build/wince-evc4/output
+          This directory contains the library, executable, and object files
+          generated by Windows Mobile build process.
+
+   docs
+          Contains Doxygen configuration file (doxygen.cfg) to generate online
+          documentation from the source files. The output documentation will be
+          put in this directory as well (for example, docs/html directory for
+          the HTML files).
+
+          (to generate Doxygen documentation from the source tree, just run
+          "doxygen docs/doxygen.cfg" in the individual project directory. The
+          generated files will reside in docs directory).
+
+   include
+          Contains the header files for the project.
+
+   lib
+          Contains libraries produced by the build process.
+
+   src
+          Contains the source files of the project.
+
+
+2. Build Preparation
+     _________________________________________________________________
+
+2.1 Create config_site.h file
+     _________________________________________________________________
+
+   Before source files can be built, the pjlib/include/pj/config_site.h file
+   must be created (it can just be an empty file).
+
+   Note:
+          When the Makefile based build system is used, this process is taken
+          care by the Makefiles. But when non-Makefile based build system (such
+          as Visual Studio) is used, the config_site.h file must be created
+          manually.
+
+
+What is config_site.h File
+
+   The pjlib/include/pj/config_site.h contains local customizations to the
+   libraries.
+
+   All customizations should be put in this file instead of modifying PJ's
+   files, because if PJ's files get modified, then those modified files will
+   not be updated the next time the source is synchronized. Or in other case,
+   the local modification may be overwritten with the fresh copy from the SVN.
+
+   Putting the local customization to the config_site.h solves this problem,
+   because this file is not included in the version control, so it will never
+   be overwritten by "svn update" command.
+
+   Please find list of configuration macros that can be overriden from these
+   files:
+     * PJLIB Configuration (the pjlib/config.h file)
+     * PJLIB-UTIL Configuration (the pjlib-util/config.h file)
+     * PJMEDIA Configuration (the pjmedia/config.h file)
+     * PJSIP Configuration (the pjsip/sip_config.h file)
+
+   A     sample    config_site.h    file    is    also    available    in
+   pjlib/include/config_site_sample.h.
+
+
+Creating config_site.h file
+
+   The simplest way is just to create an empty file, to use whetever default
+   values set by the libraries.
+
+   Another way to create the config_site.h file is to write something like the
+   following:
+
+
+   // Uncomment to get minimum footprint (suitable for 1-2 concurrent calls
+   only)
+   //#define PJ_CONFIG_MINIMAL_SIZE
+   // Uncomment to get maximum performance
+   //#define PJ_CONFIG_MAXIMUM_SPEED
+   #include <pj/config_site_sample.h>
+
+
+2.2 Disk Space Requirements
+     _________________________________________________________________
+
+   The building process needs:
+   about 50-60 MB of disk space to store the uncompressed source files, and
+     * about 30-50 MB of additional space for building each target
+
+   (Visual Studio Debug and Release are considered as separate targets)
+
+
+3. Building Linux, *nix, *BSD, and MacOS X Targets with GNU Build Systems
+     _________________________________________________________________
+
+3.1 Supported Targets
+     _________________________________________________________________
+
+   The  new,  autoconf  based  GNU  build system can be used to build the
+   libraries/applications for the following targets:
+     * Linux/uC-Linux (i386, Opteron, Itanium, MIPS, PowerPC, etc.),
+     * MacOS X (PowerPC),
+     * mingw (i386),
+     * FreeBSD and maybe other BSD's (i386, Opteron, etc.),
+     * RTEMS with cross compilation (ARM, powerpc),
+     * etc.
+
+
+3.2 Requirements
+     _________________________________________________________________
+
+   In order to use PJ's GNU build system, these typical GNU tools are needed:
+     * GNU make (other make will not work),
+     * GNU binutils for the target, and
+     * GNU gcc for the target.
+     * OpenSSL header files/libraries (optional) if TLS support is wanted.
+
+   In addition, the appropriate "SDK" must be installed for the particular
+   target (this could just be a libc and the appropriate system abstraction
+   library such as Posix).
+
+   The build system is known to work on the following hosts:
+     * Linux, many types of distributions.
+     * MacOS X 10.2
+     * mingw (Win2K, XP)
+     * FreeBSD (must use gmake instead of make)
+
+   Building Win32 applications with Cygwin is currently not supported by the
+   autoconf script (there is some Windows header conflicts), but one can still
+   use the old configure script by calling ./configure-legacy. More over,
+   cross-compilations might also work with Cygwin.
+
+
+3.3 Running configure
+     _________________________________________________________________
+
+Using Default Settings
+
+   Run  "./configure"  without  any  options to let the script detect the
+   appropriate settings for the host:
+
+
+
+   $ cd pjproject
+   $ ./configure
+   ...
+
+   Notes:
+          The default settings build the libraries in "release" mode, with
+          default CFLAGS set to "-O2 -DNDEBUG". To change the default CFLAGS,
+          we can use the usual "./configure CFLAGS='-g'" construct.
+
+    Features Customization
+
+   With the new autoconf based build system, most configuration/customization
+   can be specified as configure arguments. The list of customizable features
+   can be viewed by running "./configure --help" command:
+
+
+
+   $ cd pjproject
+   $ ./configure --help
+   ...
+   Optional Features:
+   --disable-floating-point	Disable floating point where possible
+   --disable-sound 		Exclude sound (i.e. use null sound)
+   --disable-small-filter 	Exclude small filter in resampling
+   --disable-large-filter 	Exclude large filter in resampling
+   --disable-g711-plc 		Exclude G.711 Annex A PLC
+   --disable-speex-aec 		Exclude Speex Acoustic Echo Canceller/AEC
+   --disable-g711-codec 	Exclude G.711 codecs from the build
+   --disable-l16-codec 		Exclude Linear/L16 codec family from the build
+   --disable-gsm-codec 		Exclude GSM codec in the build
+   --disable-speex-codec 	Exclude Speex codecs in the build
+   --disable-ilbc-codec 	Exclude iLBC codec in the build
+   --disable-tls Force excluding TLS support (default is autodetected based on
+   OpenSSL availability)
+   ...
+
+    Configuring Debug Version and Other Customizations
+
+   The configure script accepts standard customization, which details can be
+   obtained by executing ./configure --help.
+
+   Below is an example of specifying CFLAGS in configure:
+
+
+
+   $ ./configure CFLAGS="-O3 -DNDEBUG -msoft-float -fno-builtin"
+   ...
+
+    Configuring TLS Support
+
+   By default, TLS support is configured based on the availability of OpenSSL
+   header files and libraries. If OpenSSL is available at the default include
+   and library path locations, TLS will be enabled by the configure script.
+
+   You  can explicitly disable TLS support by giving the configure script
+   --disable-tls option.
+
+
+  3.4 Cross Compilation
+     _________________________________________________________________
+
+   Cross compilation should be supported, using the usual autoconf syntax:
+
+
+
+   $ ./configure --host=arm-elf-linux
+   ...
+
+   Since cross-compilation is not tested as often as the "normal" build, please
+   watch for the ./configure output for incorrect settings (well ideally this
+   should be done for normal build too).
+
+   Please refer to Porting Guide for further information about porting PJ
+   software.
+
+
+  3.5 Running make
+     _________________________________________________________________
+
+   Once the configure script completes successfully, start the build process by
+   invoking these commands:
+
+
+
+   $ cd pjproject
+   $ make dep
+   $ make
+
+   Note:
+          gmake may need to be specified instead of make for some hosts, to
+          invoke GNU make instead of the native make.
+
+
+   Description of all make targets supported by the Makefile's:
+
+   all
+          The default (or first) target to build the libraries/binaries.
+
+   dep, depend
+          Build dependencies rule from the source files.
+
+   clean
+          Clean  the object files for current target, but keep the output
+          library/binary files intact.
+
+   distclean, realclean
+          Remove  all  generated  files (object, libraries, binaries, and
+          dependency files) for current target.
+
+
+   Note:
+          make can be invoked either in the top-level PJ directory or in build
+          directory under each project to build only the particular project.
+
+
+  3.6 Build Customizations
+     _________________________________________________________________
+
+   Build features can be customized by specifying the options when running
+   ./configure as described in Running Configure above.
+
+   In addition, additional CFLAGS and LDFLAGS options can be put in user.mak
+   file in PJ root directory (this file may need to be created if it doesn't
+   exist). Below is a sample of user.mak file contents:
+
+
+
+   export CFLAGS += -msoft-float -fno-builtin
+   export LDFLAGS +=
+
+
+4. Building for Windows Targets with Microsoft Visual Studio
+     _________________________________________________________________
+
+  4.1 Requirements
+     _________________________________________________________________
+
+   The Microsoft Visual Studio based project files can be used with one of the
+   following:
+
+     * Microsoft Visual Studio 6,
+     * Microsoft Visual Studio .NET 2002,
+     * Microsoft Visual Studio .NET 2003,
+     * Microsoft Visual C++ 2005 (including Express edition),
+
+   In addition, the following SDK's are needed:
+     * Platform SDK, if you're using Visual Studio 2005 Express (tested with
+       Platform SDK for Windows Server 2003 SP1),
+     * DirectX SDK (tested with DirectX version 8 and 9),
+     * OpenSSL development kit would be needed if TLS support is wanted, or
+       otherwise this is optional.
+
+   For the host, the following are required:
+     * Windows NT, 2000, XP, 2003, or later ,
+     * Windows 95/98 should work too, but this has not been tested,
+     * Sufficient amount of RAM for the build process (at least 256MB).
+
+
+    Enabling TLS Support with OpenSSL
+
+   If  TLS  support  is wanted, then OpenSSL SDK must be installed in the
+   development host.
+
+   To install OpenSSL SDK from the Win32 binary distribution:
+    1. Install OpenSSL SDK to any folder (e.g. C:\OpenSSL)
+    2. Add OpenSSL DLL location to the system PATH.
+    3. Add OpenSSL include path to Visual Studio includes search directory.
+       Make sure that OpenSSL header files can be accessed from the program
+       with #include <openssl/ssl.h> construct.
+    4. Add OpenSSL library path to Visual Studio library search directory. Make
+       sure the following libraries are accessible:
+          + For Debug build: libeay32MTd and ssleay32MTd.
+          + For Release build: libeay32MT and ssleay32MT.
+
+   Then to enable TLS transport support in PJSIP, just add
+
+     #define PJSIP_HAS_TLS_TRANSPORT 1
+
+   in your pj/config_site.h. When this macro is defined, OpenSSL libraries will
+   be automatically linked to the application via the #pragma construct in
+   sip_transport_tls_ossl.c file.
+
+
+  4.2 Building the Projects
+     _________________________________________________________________
+
+   Follow the steps below to build the libraries/application using Visual
+   Studio:
+    1. For Visual Studio 6: open pjproject.dsw workspace file.
+    2. For Visual Studio 8 (VS 2005): open pjproject-vs8.sln solution file.
+    3. Set pjsua as Active Project.
+    4. Select Debug or Release build as appropriate.
+    5. Build the project. This will build pjsua application and all libraries
+       needed by pjsua.
+    6. After  successful  build,  the pjsua application will be placed in
+       pjsip-apps/bin directory, and the libraries in lib directory under each
+       projects.
+
+   To build the samples:
+    1. (Still using the same workspace)
+    2. Set samples project as Active Project
+    3. Select Debug or Release build as appropriate.
+    4. Build the project. This will build all sample applications and all
+       libraries needed.
+    5. After  successful build, the sample applications will be placed in
+       pjsip-apps/bin/samples directory, and the libraries in lib directory
+       under each projects.
+
+  4.3 Debugging the Sample Application
+     _________________________________________________________________
+
+   The sample applications are build using Samples.mak makefile, therefore it
+   is  difficult  to  setup  debugging session in Visual Studio for these
+   applications. To solve this issue, the pjsip_apps workspace contain one
+   project  called  sample_debug  which  can  be used to debug the sample
+   application.
+
+   To setup debugging using sample_debug project:
+    1. (Still using pjsip_apps workspace)
+    2. Set sample_debug project as Active Project
+    3. Edit debug.c file inside this project.
+    4. Modify the #include line to include the particular sample application to
+       debug
+    5. Select Debug build.
+    6. Build and debug the project.
+
+
+5. Building for Windows Mobile Targets (Windows CE/WinCE/PDA/SmartPhone)
+     _________________________________________________________________
+
+   PJ supports building SIP and media stacks and applications for Windows
+   Mobile targets. A very simple WinCE SIP user agent (with media) application
+   is provided just as proof of concept that the port works.
+
+  5.1 Requirements
+     _________________________________________________________________
+
+   One of the following development tools is needed to build SIP and media
+   components for Windows Mobile:
+     * Microsoft Embedded Visual C++ 4 with appropriate SDKs, or
+     * Microsoft Visual Studio 2005 for Windows Mobile with appropriate SDKs.
+
+   Note that VS2005 is not directly supported (as I don't have the tools), but
+   it is reported to work (I assumed that VS2005 for Windows Mobile can import
+   EVC4 workspace file).
+
+  5.2 Building the Projects
+     _________________________________________________________________
+
+   The Windows Mobile port is included in the main source distribution. Please
+   follow  the  following  steps  to build the WinCE libraries and sample
+   application:
+    1. Open pjsip-apps/build/wince-evc4/wince_demos.vcw workspace file. If
+       later version of EVC4 is being used, this may cause the workspace file
+       to be converted to the appropriate format.
+    2. Select pjsua_wince project as the Active Project.
+    3. Select the appropriate SDK (for example Pocket PC 2003 SDK or SmartPhone
+       2003 SDK)
+    4. Select the appropriate configuration (for example, Win32 (WCE Emulator
+       Debug) to debug the program in emulator, or other configurations such as
+       ARMV4, MIPS, SH3, SH4, or whatever suitable for the device)
+    5. Select the appropriate device (Emulator or the actual Device).
+    6. Build the project. This will build the sample WinCE application and all
+       libraries (SIP, Media, etc.) needed by this application.
+
+   Notes
+
+          + If the config_site.h includes config_site_sample.h file, then
+            there are certain configuration in config_site_sample.h that get
+            activated for Windows CE targets. Please make sure that these
+            configurations are suitable for the application.
+          + The libraries, binaries and object files produced by the build
+            process are located under build/wince-evc4/output directory of each
+            projects.
+
+
+6. Older PJLIB Build System for Non-Autoconf Targets (e.g. RTEMS)
+     _________________________________________________________________
+
+   The old PJLIB build system can still be used for building PJ libraries, for
+   example for RTEMS target. Please see the Porting PJLIB page in PJLIB
+   Reference documentation for information on how to support new target using
+   this build system.
+
+  6.1 Supported Targets
+     _________________________________________________________________
+
+   The older build system supports building PJ libraries for the following
+   operating systems:
+     * RTEMS
+     * Linux
+     * MacOS X
+     * Cygwin and Mingw
+
+   And it supports the following target architectures:
+     * i386, x86_64, itanium
+     * ARM
+     * mips
+     * powerpc
+     * mpc860
+     * etc.
+
+   For other targets, specific files need to be added to the build system,
+   please see the Porting PJLIB page in PJLIB Reference documentation for
+   details.
+
+  6.2 Invoking the Build System
+     _________________________________________________________________
+
+   To invoke the older build system, run the following:
+
+
+
+   $ cd pjproject
+   $ ./configure-legacy
+   $ make dep && make clean && make
+
+
+
+7. Running the Applications
+     _________________________________________________________________
+
+   Upon successful build, the output libraries (PJLIB, PJLIB-UTIL, PJMEDIA,
+   PJSIP, etc.) are put under ./lib sub-directory under each project directory.
+   In addition, some applications may also be built, and such applications will
+   be put in ./bin sub-directory under each project directory.
+
+
+  7.1 pjsua
+     _________________________________________________________________
+
+   pjsua is the reference implementation for both PJSIP and PJMEDIA stack, and
+   is  the  main target of the build system. Upon successful build, pjsua
+   application will be put in pjsip-apps/bin directory.
+
+   pjsua manual can be found in pjsua Manual Page.
+
+
+  7.2 Sample Applications
+     _________________________________________________________________
+
+   Sample applications will be built with the Makefile build system. For Visual
+   Studio, you have to build the samples manually by selecting and building the
+   Samples project inside pjsip-apps/build/pjsip_apps.dsw project workspace.
+
+   Upon   successful   build,   the   sample   applications  are  put  in
+   pjsip-apps/bin/samples directory.
+
+   The  sample applications are described in PJMEDIA Samples Page and
+   PJSIP Samples Page in the website.
+
+
+  7.3 pjlib-test
+     _________________________________________________________________
+
+   pjlib-test contains comprehensive tests for testing PJLIB functionality.
+   This application will only be built when the Makefile build system is used;
+   with  Visual  Studio, one has to open pjlib.dsw project in pjlib/build
+   directory to build this application.
+
+   If  you're  porting PJLIB to new target, it is recommended to run this
+   application to make sure that all functionalities works as expected.
+
+
+  7.4 pjsip-test
+     _________________________________________________________________
+
+   pjsip-test contains codes for testing various SIP functionalities in PJSIP
+   and also to benchmark static performance metrics such as message parsing per
+   second.
+
+
+
+8. Using PJPROJECT with Applications
+     _________________________________________________________________
+
+   Regardless of the build system being used, the following tasks are normally
+   needed to be done in order to build application to use PJSIP and PJMEDIA:
+    1. Put these include directories in the include search path:
+          + pjlib/include
+          + pjlib-util/include
+          + pjmedia/include
+          + pjsip/include
+    2. Put these library directories in the library search path:
+          + pjlib/lib
+          + pjlib-util/lib
+          + pjmedia/lib
+          + pjsip/lib
+    3. Include the relevant PJ header files in the application source file. For
+       example, using these would include ALL APIs exported by PJ:
+
+      #include <pjlib.h>
+      #include <pjlib-util.h>
+      #include <pjsip.h>
+      #include <pjsip_ua.h>
+      #include <pjsip_simple.h>
+      #include <pjsua.h>
+      #include <pjmedia.h>
+      #include <pjmedia-codec.h>
+       (Note: the documentation of the relevant libraries should say which
+       header files should be included to get the declaration of the APIs).
+    4. Declare the OS macros.
+          + For Windows applications built with Visual Studio, we need to
+            declare PJ_WIN32=1 macro in the project settings (declaring the
+            macro in the source file may not be sufficient).
+          + For Windows Mobile applications build with Visual C++, we need to
+            declare PJ_WIN32_WINCE=1 macro in the project settings.
+          + For  GNU build system/autoconf based build system, we need to
+            declare PJ_AUTOCONF=1 macro when compiling the applications.
+       (Note: the old PJ build system requires declaring the target processor
+       with PJ_M_XXX=1 macro, but this has been made obsolete. The target
+       processor  will  be  detected  from compiler's predefined macro by
+       pjlib/config.h file).
+    5. Link with the appropriate PJ libraries. The following libraries will
+       need to be included in the library link specifications:
+
+        pjlib
+                Base library used by all libraries.
+
+        pjlib-util
+                Auxiliary library containing scanner, XML, STUN, MD5, getopt,
+                etc, used by the SIP and media stack.
+
+        pjsip
+                SIP core stack library.
+
+        pjsip-ua
+                SIP user agent library containing INVITE session, call
+                transfer, client registration, etc.
+
+        pjsip-simple
+                SIP SIMPLE library for base event framework, presence, instant
+                messaging, etc.
+
+        pjsua
+                High level SIP UA library, combining SIP and media stack into
+                high-level easy to use API.
+
+        pjmedia
+                The media framework.
+
+        pjmedia-codec
+                Container library for various codecs such as GSM, Speex, and
+                iLBC.
+
+
+   Note: the actual library names will be appended with the target name and the
+   build configuration. For example:
+
+        For Visual Studio builds
+                The actual library names will look like
+                pjlib-i386-win32-vc6-debug.lib,
+                pjlib-i386-win32-vc6-release.lib, etc., depending on whether we
+                are building the Debug or Release version of the library.
+
+                An easier way to link with the libraries is to include PJ
+                project files in the workspace, and to configure project
+                dependencies so that the application depends on the PJ
+                libraries. This way, we don't need to manually add each PJ
+                libraries to the input library file specification, since VS
+                will automatically link the dependency libraries with the
+                application.
+
+        For Windows Mobile builds
+                Unfortunately the PJ libraries built for Windows Mobile will
+                not be placed in the usual lib directory, but rather under the
+                output directory under build/wince-evc4 project directory.
+
+                An easier way to link with the libraries is to include PJ
+                project files in the workspace, and to configure project
+                dependencies so that the application depends on the PJ
+                libraries. This way, we don't need to manually add each PJ
+                libraries to the input library file specification, since VS
+                will automatically link the dependency libraries with the
+                application.
+
+        For GNU builds
+                Application's Makefile can get the PJ library suffix by
+                including PJ's build.mak file from the root PJ directory (the
+                suffix is contained in TARGET_NAME variable). For example, to
+                link with PJLIB and PJMEDIA, we can use this syntax in the
+                LDFLAGS: "-lpj-$(TARGET_NAME) -lpjmedia-$(TARGET_NAME)"
+
+
+    6. Link with system spesific libraries:
+
+        Windows
+                Add (among other things): wsock32.lib, ws2_32.lib, ole32.lib,
+                dsound.lib
+
+        Linux, *nix, *BSD
+                Add (among other things): '-lpthread -lm' (at least).
+
+        MacOS X
+                Add (among other things): '-framework CoreAudio -lpthread -lm'.
+
+
+Appendix I: Common Problems/Frequently Asked Question (FAQ)
+     _________________________________________________________________
+
+  I.1 fatal error C1083: Cannot open include file: 'pj/config_site.h': No such
+  file or directory
+
+   This error normally occurs when the config_site.h file has not been created.
+   This file needs to be created manually (an empty file is sufficient). Please
+   follow the Build Preparation instructions above to create this file.
+
+
+
+
+
+
+
+
+     _________________________________________________________________
+
+   Feedback:
+          Thanks for using PJ libraries and for reading this document. Please
+          send feedbacks or general comments to <bennylp at pjsip dot org>.
+
Index: /pjproject/branches/split-3rd-party/aconfigure
===================================================================
--- /pjproject/branches/split-3rd-party/aconfigure	(revision 1163)
+++ /pjproject/branches/split-3rd-party/aconfigure	(revision 1163)
@@ -0,0 +1,10292 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for pjproject 0.5.10.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='pjproject'
+PACKAGE_TARNAME='pjproject'
+PACKAGE_VERSION='0.5.10'
+PACKAGE_STRING='pjproject 0.5.10'
+PACKAGE_BUGREPORT=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX ac_pjdir CPP EGREP ac_os_objs ac_pjmedia_snd ac_pa_cflags ac_pa_use_alsa ac_no_small_filter ac_no_large_filter ac_no_g711_plc ac_no_speex_aec ac_no_g711_codec ac_no_l16_codec ac_no_gsm_codec ac_no_speex_codec ac_no_ilbc_codec ac_no_ssl openssl_h_present libssl_present libcrypto_present ac_cross_compile ac_linux_poll ac_host ac_main_obj LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+	      localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures pjproject 0.5.10 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of pjproject 0.5.10:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-floating-point
+                          Disable floating point where possible
+  --disable-sound         Exclude sound (i.e. use null sound)
+  --disable-small-filter  Exclude small filter in resampling
+  --disable-large-filter  Exclude large filter in resampling
+  --disable-g711-plc      Exclude G.711 Annex A PLC
+  --disable-speex-aec     Exclude Speex Acoustic Echo Canceller/AEC
+  --disable-g711-codec    Exclude G.711 codecs from the build
+  --disable-l16-codec     Exclude Linear/L16 codec family from the build
+  --disable-gsm-codec     Exclude GSM codec in the build
+  --disable-speex-codec   Exclude Speex codecs in the build
+  --disable-ilbc-codec    Exclude iLBC codec in the build
+  --disable-ssl           Exclude SSL support the build (default: autodetect)
+
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+	   test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+pjproject configure 0.5.10
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by pjproject $as_me 0.5.10, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+	echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+host_orig="$host"
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+  ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+                                                  ac_config_headers="$ac_config_headers pjlib/include/pj/compat/os_auto.h pjlib/include/pj/compat/m_auto.h pjmedia/include/pjmedia/config_auto.h pjmedia/include/pjmedia-codec/config_auto.h pjsip/include/pjsip/sip_autoconf.h"
+
+                                                            ac_config_files="$ac_config_files build.mak build/os-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak"
+
+
+
+if test "$CFLAGS" = ""; then
+  CFLAGS="-O2"
+else
+  CFLAGS="$CFLAGS"
+fi
+
+CXXFLAGS="$CFLAGS $CXXFLAGS"
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+	;;
+    conftest.$ac_ext )
+	# This is the source file.
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	# FIXME: I believe we export ac_cv_exeext for Libtool,
+	# but it would be cool to find out if it's true.  Does anybody
+	# maintain Libtool? --akim.
+	export ac_cv_exeext
+	break;;
+    * )
+	break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  export ac_cv_exeext
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std1 is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+  CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_cxx_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+ac_pjdir=`pwd`
+
+
+
+echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char pthread_create ();
+int
+main ()
+{
+pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_pthread_pthread_create=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_pthread_pthread_create=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
+if test $ac_cv_lib_pthread_pthread_create = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPTHREAD 1
+_ACEOF
+
+  LIBS="-lpthread $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for puts in -lwsock32" >&5
+echo $ECHO_N "checking for puts in -lwsock32... $ECHO_C" >&6
+if test "${ac_cv_lib_wsock32_puts+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lwsock32  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char puts ();
+int
+main ()
+{
+puts ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_wsock32_puts=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_wsock32_puts=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_wsock32_puts" >&5
+echo "${ECHO_T}$ac_cv_lib_wsock32_puts" >&6
+if test $ac_cv_lib_wsock32_puts = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBWSOCK32 1
+_ACEOF
+
+  LIBS="-lwsock32 $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for puts in -lws2_32" >&5
+echo $ECHO_N "checking for puts in -lws2_32... $ECHO_C" >&6
+if test "${ac_cv_lib_ws2_32_puts+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lws2_32  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char puts ();
+int
+main ()
+{
+puts ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_ws2_32_puts=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ws2_32_puts=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ws2_32_puts" >&5
+echo "${ECHO_T}$ac_cv_lib_ws2_32_puts" >&6
+if test $ac_cv_lib_ws2_32_puts = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBWS2_32 1
+_ACEOF
+
+  LIBS="-lws2_32 $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for puts in -lole32" >&5
+echo $ECHO_N "checking for puts in -lole32... $ECHO_C" >&6
+if test "${ac_cv_lib_ole32_puts+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lole32  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char puts ();
+int
+main ()
+{
+puts ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_ole32_puts=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ole32_puts=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ole32_puts" >&5
+echo "${ECHO_T}$ac_cv_lib_ole32_puts" >&6
+if test $ac_cv_lib_ole32_puts = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBOLE32 1
+_ACEOF
+
+  LIBS="-lole32 $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for puts in -lwinmm" >&5
+echo $ECHO_N "checking for puts in -lwinmm... $ECHO_C" >&6
+if test "${ac_cv_lib_winmm_puts+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lwinmm  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char puts ();
+int
+main ()
+{
+puts ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_winmm_puts=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_winmm_puts=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_winmm_puts" >&5
+echo "${ECHO_T}$ac_cv_lib_winmm_puts" >&6
+if test $ac_cv_lib_winmm_puts = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBWINMM 1
+_ACEOF
+
+  LIBS="-lwinmm $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for puts in -lsocket" >&5
+echo $ECHO_N "checking for puts in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_puts+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char puts ();
+int
+main ()
+{
+puts ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_socket_puts=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_puts=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_puts" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_puts" >&6
+if test $ac_cv_lib_socket_puts = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSOCKET 1
+_ACEOF
+
+  LIBS="-lsocket $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for puts in -lrt" >&5
+echo $ECHO_N "checking for puts in -lrt... $ECHO_C" >&6
+if test "${ac_cv_lib_rt_puts+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char puts ();
+int
+main ()
+{
+puts ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_rt_puts=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_rt_puts=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_rt_puts" >&5
+echo "${ECHO_T}$ac_cv_lib_rt_puts" >&6
+if test $ac_cv_lib_rt_puts = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRT 1
+_ACEOF
+
+  LIBS="-lrt $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for puts in -lnsl" >&5
+echo $ECHO_N "checking for puts in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_puts+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char puts ();
+int
+main ()
+{
+puts ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_nsl_puts=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_puts=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_puts" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_puts" >&6
+if test $ac_cv_lib_nsl_puts = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNSL 1
+_ACEOF
+
+  LIBS="-lnsl $LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: result: Setting PJ_M_NAME to $target_cpu" >&5
+echo "${ECHO_T}Setting PJ_M_NAME to $target_cpu" >&6
+cat >>confdefs.h <<_ACEOF
+#define PJ_M_NAME "$target_cpu"
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking memory alignment" >&5
+echo $ECHO_N "checking memory alignment... $ECHO_C" >&6
+case $target in
+    ia64-* | x86_64-* )
+	cat >>confdefs.h <<\_ACEOF
+#define PJ_POOL_ALIGNMENT 8
+_ACEOF
+
+	echo "$as_me:$LINENO: result: 8 bytes" >&5
+echo "${ECHO_T}8 bytes" >&6
+	;;
+    * )
+	cat >>confdefs.h <<\_ACEOF
+#define PJ_POOL_ALIGNMENT 4
+_ACEOF
+
+	echo "$as_me:$LINENO: result: 4 bytes (default)" >&5
+echo "${ECHO_T}4 bytes (default)" >&6
+	;;
+esac
+
+
+echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_bigendian=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+  # try to guess the endianness by grepping values into an object file
+  ac_cv_c_bigendian=unknown
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+  ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+  if test "$ac_cv_c_bigendian" = unknown; then
+    ac_cv_c_bigendian=no
+  else
+    # finding both strings is unlikely to happen, but who knows?
+    ac_cv_c_bigendian=unknown
+  fi
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+int
+main ()
+{
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long l;
+    char c[sizeof (long)];
+  } u;
+  u.l = 1;
+  exit (u.c[sizeof (long) - 1] == 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_bigendian=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+  yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+  no)
+     ;;
+  *)
+    { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+
+
+case $target in
+    *mingw* | *cygw* | *win32* | *w32* )
+	cat >>confdefs.h <<\_ACEOF
+#define PJ_WIN32 1
+_ACEOF
+
+	cat >>confdefs.h <<\_ACEOF
+#define PJ_WIN32_WINNT 0x0400
+_ACEOF
+
+	cat >>confdefs.h <<\_ACEOF
+#define WIN32_LEAN_AND_MEAN 1
+_ACEOF
+
+	;;
+    *darwin*)
+	cat >>confdefs.h <<\_ACEOF
+#define PJ_DARWINOS 1
+_ACEOF
+
+	;;
+    *linux*)
+	cat >>confdefs.h <<\_ACEOF
+#define PJ_LINUX 1
+_ACEOF
+
+	;;
+    *rtems*)
+	cat >>confdefs.h <<\_ACEOF
+#define PJ_RTEMS 1
+_ACEOF
+
+	;;
+    *sunos* | *solaris* )
+	cat >>confdefs.h <<\_ACEOF
+#define PJ_SUNOS 1
+_ACEOF
+
+	;;
+    *)
+	;;
+esac
+
+
+
+
+# Check whether --enable-floating-point or --disable-floating-point was given.
+if test "${enable_floating_point+set}" = set; then
+  enableval="$enable_floating_point"
+  if test "$enable_floating_point" = "no"; then
+		cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_FLOATING_POINT 0
+_ACEOF
+
+		echo "$as_me:$LINENO: result: Checking if floating point is disabled... yes" >&5
+echo "${ECHO_T}Checking if floating point is disabled... yes" >&6
+	       fi
+else
+
+		cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_FLOATING_POINT 1
+_ACEOF
+
+	        echo "$as_me:$LINENO: result: Checking if floating point is disabled... no" >&5
+echo "${ECHO_T}Checking if floating point is disabled... no" >&6
+
+echo "$as_me:$LINENO: checking for fmod in -lm" >&5
+echo $ECHO_N "checking for fmod in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_fmod+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char fmod ();
+int
+main ()
+{
+fmod ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_m_fmod=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_m_fmod=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_fmod" >&5
+echo "${ECHO_T}$ac_cv_lib_m_fmod" >&6
+if test $ac_cv_lib_m_fmod = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+  LIBS="-lm $LIBS"
+
+fi
+
+
+fi;
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+if test "${ac_cv_header_arpa_inet_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
+echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
+if test "${ac_cv_header_arpa_inet_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
+echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
+echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <arpa/inet.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
+echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <arpa/inet.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: arpa/inet.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: arpa/inet.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: arpa/inet.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: arpa/inet.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
+echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6
+if test "${ac_cv_header_arpa_inet_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_arpa_inet_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
+echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6
+
+fi
+if test $ac_cv_header_arpa_inet_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_ARPA_INET_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_assert_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for assert.h" >&5
+echo $ECHO_N "checking for assert.h... $ECHO_C" >&6
+if test "${ac_cv_header_assert_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_assert_h" >&5
+echo "${ECHO_T}$ac_cv_header_assert_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking assert.h usability" >&5
+echo $ECHO_N "checking assert.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <assert.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking assert.h presence" >&5
+echo $ECHO_N "checking assert.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <assert.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: assert.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: assert.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: assert.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: assert.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: assert.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: assert.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: assert.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: assert.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: assert.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: assert.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: assert.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: assert.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: assert.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: assert.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: assert.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: assert.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for assert.h" >&5
+echo $ECHO_N "checking for assert.h... $ECHO_C" >&6
+if test "${ac_cv_header_assert_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_assert_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_assert_h" >&5
+echo "${ECHO_T}$ac_cv_header_assert_h" >&6
+
+fi
+if test $ac_cv_header_assert_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_ASSERT_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_ctype_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for ctype.h" >&5
+echo $ECHO_N "checking for ctype.h... $ECHO_C" >&6
+if test "${ac_cv_header_ctype_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_ctype_h" >&5
+echo "${ECHO_T}$ac_cv_header_ctype_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking ctype.h usability" >&5
+echo $ECHO_N "checking ctype.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <ctype.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking ctype.h presence" >&5
+echo $ECHO_N "checking ctype.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: ctype.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ctype.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ctype.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: ctype.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: ctype.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ctype.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ctype.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ctype.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ctype.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: ctype.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ctype.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: ctype.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ctype.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ctype.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ctype.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: ctype.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for ctype.h" >&5
+echo $ECHO_N "checking for ctype.h... $ECHO_C" >&6
+if test "${ac_cv_header_ctype_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_ctype_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_ctype_h" >&5
+echo "${ECHO_T}$ac_cv_header_ctype_h" >&6
+
+fi
+if test $ac_cv_header_ctype_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_CTYPE_H 1
+_ACEOF
+
+fi
+
+
+
+case $target in
+    *mingw* | *cygw* | *win32* | *w32* )
+	cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_ERRNO_H 0
+_ACEOF
+
+	;;
+    *)
+	if test "${ac_cv_header_errno_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for errno.h" >&5
+echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_errno_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_errno_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking errno.h usability" >&5
+echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <errno.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking errno.h presence" >&5
+echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <errno.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for errno.h" >&5
+echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_errno_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_errno_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_errno_h" >&6
+
+fi
+if test $ac_cv_header_errno_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_ERRNO_H 1
+_ACEOF
+
+fi
+
+
+	;;
+esac
+
+if test "${ac_cv_header_linux_socket_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for linux/socket.h" >&5
+echo $ECHO_N "checking for linux/socket.h... $ECHO_C" >&6
+if test "${ac_cv_header_linux_socket_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_linux_socket_h" >&5
+echo "${ECHO_T}$ac_cv_header_linux_socket_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking linux/socket.h usability" >&5
+echo $ECHO_N "checking linux/socket.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <linux/socket.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking linux/socket.h presence" >&5
+echo $ECHO_N "checking linux/socket.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <linux/socket.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: linux/socket.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: linux/socket.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: linux/socket.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: linux/socket.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: linux/socket.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: linux/socket.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: linux/socket.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: linux/socket.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: linux/socket.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: linux/socket.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: linux/socket.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: linux/socket.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: linux/socket.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: linux/socket.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: linux/socket.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: linux/socket.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for linux/socket.h" >&5
+echo $ECHO_N "checking for linux/socket.h... $ECHO_C" >&6
+if test "${ac_cv_header_linux_socket_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_linux_socket_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_linux_socket_h" >&5
+echo "${ECHO_T}$ac_cv_header_linux_socket_h" >&6
+
+fi
+if test $ac_cv_header_linux_socket_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_LINUX_SOCKET_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_malloc_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for malloc.h" >&5
+echo $ECHO_N "checking for malloc.h... $ECHO_C" >&6
+if test "${ac_cv_header_malloc_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5
+echo "${ECHO_T}$ac_cv_header_malloc_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking malloc.h usability" >&5
+echo $ECHO_N "checking malloc.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <malloc.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking malloc.h presence" >&5
+echo $ECHO_N "checking malloc.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <malloc.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: malloc.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: malloc.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: malloc.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: malloc.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: malloc.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: malloc.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: malloc.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: malloc.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: malloc.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: malloc.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: malloc.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: malloc.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for malloc.h" >&5
+echo $ECHO_N "checking for malloc.h... $ECHO_C" >&6
+if test "${ac_cv_header_malloc_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_malloc_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5
+echo "${ECHO_T}$ac_cv_header_malloc_h" >&6
+
+fi
+if test $ac_cv_header_malloc_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_MALLOC_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_netdb_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for netdb.h" >&5
+echo $ECHO_N "checking for netdb.h... $ECHO_C" >&6
+if test "${ac_cv_header_netdb_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_netdb_h" >&5
+echo "${ECHO_T}$ac_cv_header_netdb_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking netdb.h usability" >&5
+echo $ECHO_N "checking netdb.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <netdb.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking netdb.h presence" >&5
+echo $ECHO_N "checking netdb.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <netdb.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: netdb.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: netdb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netdb.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: netdb.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: netdb.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: netdb.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netdb.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: netdb.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netdb.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: netdb.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netdb.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: netdb.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netdb.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: netdb.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netdb.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: netdb.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for netdb.h" >&5
+echo $ECHO_N "checking for netdb.h... $ECHO_C" >&6
+if test "${ac_cv_header_netdb_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_netdb_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_netdb_h" >&5
+echo "${ECHO_T}$ac_cv_header_netdb_h" >&6
+
+fi
+if test $ac_cv_header_netdb_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_NETDB_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_netinet_in_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for netinet/in.h" >&5
+echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
+if test "${ac_cv_header_netinet_in_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
+echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
+echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <netinet/in.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
+echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <netinet/in.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netinet/in.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: netinet/in.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netinet/in.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: netinet/in.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for netinet/in.h" >&5
+echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6
+if test "${ac_cv_header_netinet_in_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_netinet_in_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
+echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6
+
+fi
+if test $ac_cv_header_netinet_in_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_NETINET_IN_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_netinet_ip_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for netinet/ip.h" >&5
+echo $ECHO_N "checking for netinet/ip.h... $ECHO_C" >&6
+if test "${ac_cv_header_netinet_ip_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_netinet_ip_h" >&5
+echo "${ECHO_T}$ac_cv_header_netinet_ip_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking netinet/ip.h usability" >&5
+echo $ECHO_N "checking netinet/ip.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <netinet/ip.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking netinet/ip.h presence" >&5
+echo $ECHO_N "checking netinet/ip.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <netinet/ip.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: netinet/ip.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: netinet/ip.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netinet/ip.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: netinet/ip.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: netinet/ip.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: netinet/ip.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netinet/ip.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: netinet/ip.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netinet/ip.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: netinet/ip.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netinet/ip.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: netinet/ip.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netinet/ip.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: netinet/ip.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netinet/ip.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: netinet/ip.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for netinet/ip.h" >&5
+echo $ECHO_N "checking for netinet/ip.h... $ECHO_C" >&6
+if test "${ac_cv_header_netinet_ip_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_netinet_ip_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_netinet_ip_h" >&5
+echo "${ECHO_T}$ac_cv_header_netinet_ip_h" >&6
+
+fi
+if test $ac_cv_header_netinet_ip_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_NETINET_IP_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_setjmp_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for setjmp.h" >&5
+echo $ECHO_N "checking for setjmp.h... $ECHO_C" >&6
+if test "${ac_cv_header_setjmp_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_setjmp_h" >&5
+echo "${ECHO_T}$ac_cv_header_setjmp_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking setjmp.h usability" >&5
+echo $ECHO_N "checking setjmp.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <setjmp.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking setjmp.h presence" >&5
+echo $ECHO_N "checking setjmp.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <setjmp.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: setjmp.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: setjmp.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: setjmp.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: setjmp.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: setjmp.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: setjmp.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: setjmp.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: setjmp.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: setjmp.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: setjmp.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: setjmp.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: setjmp.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: setjmp.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: setjmp.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: setjmp.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: setjmp.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for setjmp.h" >&5
+echo $ECHO_N "checking for setjmp.h... $ECHO_C" >&6
+if test "${ac_cv_header_setjmp_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_setjmp_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_setjmp_h" >&5
+echo "${ECHO_T}$ac_cv_header_setjmp_h" >&6
+
+fi
+if test $ac_cv_header_setjmp_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_SETJMP_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_stdarg_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for stdarg.h" >&5
+echo $ECHO_N "checking for stdarg.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdarg_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdarg_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdarg_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking stdarg.h usability" >&5
+echo $ECHO_N "checking stdarg.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <stdarg.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking stdarg.h presence" >&5
+echo $ECHO_N "checking stdarg.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: stdarg.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: stdarg.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdarg.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: stdarg.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: stdarg.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: stdarg.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdarg.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: stdarg.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdarg.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: stdarg.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdarg.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: stdarg.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdarg.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: stdarg.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdarg.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: stdarg.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for stdarg.h" >&5
+echo $ECHO_N "checking for stdarg.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdarg_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_stdarg_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdarg_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdarg_h" >&6
+
+fi
+if test $ac_cv_header_stdarg_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_STDARG_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_stddef_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for stddef.h" >&5
+echo $ECHO_N "checking for stddef.h... $ECHO_C" >&6
+if test "${ac_cv_header_stddef_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stddef_h" >&5
+echo "${ECHO_T}$ac_cv_header_stddef_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking stddef.h usability" >&5
+echo $ECHO_N "checking stddef.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <stddef.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking stddef.h presence" >&5
+echo $ECHO_N "checking stddef.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stddef.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: stddef.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: stddef.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stddef.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: stddef.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: stddef.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: stddef.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stddef.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: stddef.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stddef.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: stddef.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stddef.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: stddef.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stddef.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: stddef.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stddef.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: stddef.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for stddef.h" >&5
+echo $ECHO_N "checking for stddef.h... $ECHO_C" >&6
+if test "${ac_cv_header_stddef_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_stddef_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stddef_h" >&5
+echo "${ECHO_T}$ac_cv_header_stddef_h" >&6
+
+fi
+if test $ac_cv_header_stddef_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_STDDEF_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_stdio_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for stdio.h" >&5
+echo $ECHO_N "checking for stdio.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdio_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdio_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdio_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking stdio.h usability" >&5
+echo $ECHO_N "checking stdio.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <stdio.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking stdio.h presence" >&5
+echo $ECHO_N "checking stdio.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdio.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: stdio.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: stdio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdio.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: stdio.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: stdio.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: stdio.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdio.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: stdio.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdio.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: stdio.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdio.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: stdio.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdio.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: stdio.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdio.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: stdio.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for stdio.h" >&5
+echo $ECHO_N "checking for stdio.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdio_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_stdio_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdio_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdio_h" >&6
+
+fi
+if test $ac_cv_header_stdio_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_STDIO_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_stdlib_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for stdlib.h" >&5
+echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking stdlib.h usability" >&5
+echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <stdlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking stdlib.h presence" >&5
+echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for stdlib.h" >&5
+echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_stdlib_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
+
+fi
+if test $ac_cv_header_stdlib_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_STDLIB_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_string_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for string.h" >&5
+echo $ECHO_N "checking for string.h... $ECHO_C" >&6
+if test "${ac_cv_header_string_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
+echo "${ECHO_T}$ac_cv_header_string_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking string.h usability" >&5
+echo $ECHO_N "checking string.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <string.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking string.h presence" >&5
+echo $ECHO_N "checking string.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for string.h" >&5
+echo $ECHO_N "checking for string.h... $ECHO_C" >&6
+if test "${ac_cv_header_string_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_string_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
+echo "${ECHO_T}$ac_cv_header_string_h" >&6
+
+fi
+if test $ac_cv_header_string_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_STRING_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_sys_ioctl_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for sys/ioctl.h" >&5
+echo $ECHO_N "checking for sys/ioctl.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_ioctl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_ioctl_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_ioctl_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/ioctl.h usability" >&5
+echo $ECHO_N "checking sys/ioctl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <sys/ioctl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/ioctl.h presence" >&5
+echo $ECHO_N "checking sys/ioctl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/ioctl.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: sys/ioctl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/ioctl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/ioctl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/ioctl.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: sys/ioctl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/ioctl.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/ioctl.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/ioctl.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/ioctl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/ioctl.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/ioctl.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/ioctl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/ioctl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/ioctl.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/ioctl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/ioctl.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for sys/ioctl.h" >&5
+echo $ECHO_N "checking for sys/ioctl.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_ioctl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_sys_ioctl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_ioctl_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_ioctl_h" >&6
+
+fi
+if test $ac_cv_header_sys_ioctl_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_SYS_IOCTL_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_sys_select_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for sys/select.h" >&5
+echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_select_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_select_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_select_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/select.h usability" >&5
+echo $ECHO_N "checking sys/select.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <sys/select.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/select.h presence" >&5
+echo $ECHO_N "checking sys/select.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/select.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: sys/select.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/select.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/select.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/select.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: sys/select.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/select.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/select.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/select.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/select.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/select.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/select.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/select.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/select.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/select.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/select.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/select.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for sys/select.h" >&5
+echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_select_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_sys_select_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_select_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_select_h" >&6
+
+fi
+if test $ac_cv_header_sys_select_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_SYS_SELECT_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_sys_socket_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for sys/socket.h" >&5
+echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_socket_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/socket.h usability" >&5
+echo $ECHO_N "checking sys/socket.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <sys/socket.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/socket.h presence" >&5
+echo $ECHO_N "checking sys/socket.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/socket.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/socket.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: sys/socket.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/socket.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/socket.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/socket.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/socket.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/socket.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/socket.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/socket.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for sys/socket.h" >&5
+echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_socket_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_sys_socket_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6
+
+fi
+if test $ac_cv_header_sys_socket_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_SYS_SOCKET_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_sys_time_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for sys/time.h" >&5
+echo $ECHO_N "checking for sys/time.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_time_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_time_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_time_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/time.h usability" >&5
+echo $ECHO_N "checking sys/time.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <sys/time.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/time.h presence" >&5
+echo $ECHO_N "checking sys/time.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/time.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: sys/time.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/time.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/time.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/time.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: sys/time.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/time.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/time.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/time.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/time.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/time.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/time.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/time.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/time.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/time.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/time.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/time.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for sys/time.h" >&5
+echo $ECHO_N "checking for sys/time.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_time_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_sys_time_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_time_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_time_h" >&6
+
+fi
+if test $ac_cv_header_sys_time_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_SYS_TIME_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_sys_timeb_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for sys/timeb.h" >&5
+echo $ECHO_N "checking for sys/timeb.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_timeb_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_timeb_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_timeb_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/timeb.h usability" >&5
+echo $ECHO_N "checking sys/timeb.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <sys/timeb.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/timeb.h presence" >&5
+echo $ECHO_N "checking sys/timeb.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/timeb.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: sys/timeb.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/timeb.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/timeb.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/timeb.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: sys/timeb.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/timeb.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/timeb.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/timeb.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/timeb.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/timeb.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/timeb.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/timeb.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/timeb.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/timeb.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/timeb.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/timeb.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for sys/timeb.h" >&5
+echo $ECHO_N "checking for sys/timeb.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_timeb_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_sys_timeb_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_timeb_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_timeb_h" >&6
+
+fi
+if test $ac_cv_header_sys_timeb_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_sys_types_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for sys/types.h" >&5
+echo $ECHO_N "checking for sys/types.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_types_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_types_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/types.h usability" >&5
+echo $ECHO_N "checking sys/types.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <sys/types.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/types.h presence" >&5
+echo $ECHO_N "checking sys/types.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/types.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: sys/types.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/types.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/types.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/types.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/types.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/types.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/types.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/types.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/types.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: sys/types.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/types.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for sys/types.h" >&5
+echo $ECHO_N "checking for sys/types.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_types_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_sys_types_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_types_h" >&6
+
+fi
+if test $ac_cv_header_sys_types_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_SYS_TYPES_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_time_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for time.h" >&5
+echo $ECHO_N "checking for time.h... $ECHO_C" >&6
+if test "${ac_cv_header_time_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_time_h" >&5
+echo "${ECHO_T}$ac_cv_header_time_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking time.h usability" >&5
+echo $ECHO_N "checking time.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <time.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking time.h presence" >&5
+echo $ECHO_N "checking time.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <time.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: time.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: time.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: time.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: time.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: time.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: time.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: time.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: time.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: time.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: time.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: time.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: time.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: time.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: time.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: time.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: time.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for time.h" >&5
+echo $ECHO_N "checking for time.h... $ECHO_C" >&6
+if test "${ac_cv_header_time_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_time_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_time_h" >&5
+echo "${ECHO_T}$ac_cv_header_time_h" >&6
+
+fi
+if test $ac_cv_header_time_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_TIME_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_unistd_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for unistd.h" >&5
+echo $ECHO_N "checking for unistd.h... $ECHO_C" >&6
+if test "${ac_cv_header_unistd_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_unistd_h" >&5
+echo "${ECHO_T}$ac_cv_header_unistd_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking unistd.h usability" >&5
+echo $ECHO_N "checking unistd.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <unistd.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking unistd.h presence" >&5
+echo $ECHO_N "checking unistd.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <unistd.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: unistd.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: unistd.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: unistd.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: unistd.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: unistd.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: unistd.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: unistd.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: unistd.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: unistd.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: unistd.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: unistd.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: unistd.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: unistd.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: unistd.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: unistd.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: unistd.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for unistd.h" >&5
+echo $ECHO_N "checking for unistd.h... $ECHO_C" >&6
+if test "${ac_cv_header_unistd_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_unistd_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_unistd_h" >&5
+echo "${ECHO_T}$ac_cv_header_unistd_h" >&6
+
+fi
+if test $ac_cv_header_unistd_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_UNISTD_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_mswsock_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for mswsock.h" >&5
+echo $ECHO_N "checking for mswsock.h... $ECHO_C" >&6
+if test "${ac_cv_header_mswsock_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_mswsock_h" >&5
+echo "${ECHO_T}$ac_cv_header_mswsock_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking mswsock.h usability" >&5
+echo $ECHO_N "checking mswsock.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <mswsock.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking mswsock.h presence" >&5
+echo $ECHO_N "checking mswsock.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <mswsock.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: mswsock.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: mswsock.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: mswsock.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: mswsock.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: mswsock.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: mswsock.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: mswsock.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: mswsock.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: mswsock.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: mswsock.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: mswsock.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: mswsock.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: mswsock.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: mswsock.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: mswsock.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: mswsock.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for mswsock.h" >&5
+echo $ECHO_N "checking for mswsock.h... $ECHO_C" >&6
+if test "${ac_cv_header_mswsock_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_mswsock_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_mswsock_h" >&5
+echo "${ECHO_T}$ac_cv_header_mswsock_h" >&6
+
+fi
+if test $ac_cv_header_mswsock_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_MSWSOCK_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_winsock_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for winsock.h" >&5
+echo $ECHO_N "checking for winsock.h... $ECHO_C" >&6
+if test "${ac_cv_header_winsock_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_winsock_h" >&5
+echo "${ECHO_T}$ac_cv_header_winsock_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking winsock.h usability" >&5
+echo $ECHO_N "checking winsock.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <winsock.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking winsock.h presence" >&5
+echo $ECHO_N "checking winsock.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <winsock.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: winsock.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: winsock.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: winsock.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: winsock.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: winsock.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: winsock.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: winsock.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: winsock.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: winsock.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: winsock.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: winsock.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: winsock.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: winsock.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: winsock.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: winsock.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: winsock.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for winsock.h" >&5
+echo $ECHO_N "checking for winsock.h... $ECHO_C" >&6
+if test "${ac_cv_header_winsock_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_winsock_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_winsock_h" >&5
+echo "${ECHO_T}$ac_cv_header_winsock_h" >&6
+
+fi
+if test $ac_cv_header_winsock_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_WINSOCK_H 1
+_ACEOF
+
+fi
+
+
+if test "${ac_cv_header_winsock2_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for winsock2.h" >&5
+echo $ECHO_N "checking for winsock2.h... $ECHO_C" >&6
+if test "${ac_cv_header_winsock2_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_winsock2_h" >&5
+echo "${ECHO_T}$ac_cv_header_winsock2_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking winsock2.h usability" >&5
+echo $ECHO_N "checking winsock2.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <winsock2.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking winsock2.h presence" >&5
+echo $ECHO_N "checking winsock2.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <winsock2.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: winsock2.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: winsock2.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: winsock2.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: winsock2.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: winsock2.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: winsock2.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: winsock2.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: winsock2.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: winsock2.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: winsock2.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: winsock2.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: winsock2.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: winsock2.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: winsock2.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: winsock2.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: winsock2.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for winsock2.h" >&5
+echo $ECHO_N "checking for winsock2.h... $ECHO_C" >&6
+if test "${ac_cv_header_winsock2_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_winsock2_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_winsock2_h" >&5
+echo "${ECHO_T}$ac_cv_header_winsock2_h" >&6
+
+fi
+if test $ac_cv_header_winsock2_h = yes; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_WINSOCK2_H 1
+_ACEOF
+
+fi
+
+
+
+echo "$as_me:$LINENO: result: Setting PJ_OS_NAME to $target" >&5
+echo "${ECHO_T}Setting PJ_OS_NAME to $target" >&6
+cat >>confdefs.h <<_ACEOF
+#define PJ_OS_NAME "$target"
+_ACEOF
+
+
+echo "$as_me:$LINENO: result: Setting PJ_HAS_ERRNO_VAR to 1" >&5
+echo "${ECHO_T}Setting PJ_HAS_ERRNO_VAR to 1" >&6
+cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_ERRNO_VAR 1
+_ACEOF
+
+
+echo "$as_me:$LINENO: result: Setting PJ_HAS_HIGH_RES_TIMER to 1" >&5
+echo "${ECHO_T}Setting PJ_HAS_HIGH_RES_TIMER to 1" >&6
+cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_HIGH_RES_TIMER 1
+_ACEOF
+
+
+echo "$as_me:$LINENO: result: Setting PJ_HAS_MALLOC to 1" >&5
+echo "${ECHO_T}Setting PJ_HAS_MALLOC to 1" >&6
+cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_MALLOC 1
+_ACEOF
+
+
+echo "$as_me:$LINENO: result: Setting PJ_NATIVE_STRING_IS_UNICODE to 0" >&5
+echo "${ECHO_T}Setting PJ_NATIVE_STRING_IS_UNICODE to 0" >&6
+cat >>confdefs.h <<\_ACEOF
+#define PJ_NATIVE_STRING_IS_UNICODE 0
+_ACEOF
+
+
+echo "$as_me:$LINENO: result: Setting PJ_ATOMIC_VALUE_TYPE to long" >&5
+echo "${ECHO_T}Setting PJ_ATOMIC_VALUE_TYPE to long" >&6
+cat >>confdefs.h <<\_ACEOF
+#define PJ_ATOMIC_VALUE_TYPE long
+_ACEOF
+
+
+echo "$as_me:$LINENO: checking if inet_aton is available" >&5
+echo $ECHO_N "checking if inet_aton is available... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <arpa/inet.h>
+int
+main ()
+{
+inet_aton(0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_SOCK_HAS_INET_ATON 1
+_ACEOF
+
+		   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+echo "$as_me:$LINENO: checking if sockaddr_in has sin_len member" >&5
+echo $ECHO_N "checking if sockaddr_in has sin_len member... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+				     #include <sys/socket.h>
+		    		     #include <netinet/in.h>
+		    		     #include <arpa/inet.h>
+int
+main ()
+{
+struct sockaddr_in a; a.sin_len=0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_SOCKADDR_HAS_LEN 1
+_ACEOF
+
+		   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+echo "$as_me:$LINENO: checking if socklen_t is available" >&5
+echo $ECHO_N "checking if socklen_t is available... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/socket.h>
+int
+main ()
+{
+socklen_t xxx = 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_SOCKLEN_T 1
+_ACEOF
+
+		   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+echo "$as_me:$LINENO: checking if SO_ERROR is available" >&5
+echo $ECHO_N "checking if SO_ERROR is available... $ECHO_C" >&6
+case $target in
+    *mingw* | *cygw* | *win32* | *w32* )
+	cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_SO_ERROR 1
+_ACEOF
+
+	echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+	;;
+    *)
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+					     #include <sys/socket.h>
+					     #include <netinet/in.h>
+					     #include <arpa/inet.h>
+int
+main ()
+{
+int i=SO_ERROR;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_HAS_SO_ERROR 1
+_ACEOF
+
+			   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+	;;
+esac
+
+
+echo "$as_me:$LINENO: checking if pthread_rwlock_t is available" >&5
+echo $ECHO_N "checking if pthread_rwlock_t is available... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+pthread_rwlock_t *x;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  cat >>confdefs.h <<\_ACEOF
+#define PJ_EMULATE_RWMUTEX 0
+_ACEOF
+
+  		   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >>confdefs.h <<\_ACEOF
+#define PJ_EMULATE_RWMUTEX 1
+_ACEOF
+
+		   echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+case $target in
+  *mingw* | *cygw* | *win32* | *w32* )
+	ac_os_objs="file_access_win32.o file_io_win32.o os_core_win32.o os_error_win32.o os_time_win32.o os_timestamp_win32.o guid_win32.o ioqueue_select.o"
+	;;
+  *)
+	ac_os_objs="file_access_unistd.o file_io_ansi.o os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o guid_simple.o ioqueue_select.o"
+	;;
+esac
+
+
+
+
+# Check whether --enable-sound or --disable-sound was given.
+if test "${enable_sound+set}" = set; then
+  enableval="$enable_sound"
+  if test "$enable_sound" = "no"; then
+		ac_pjmedia_snd=null
+		echo "$as_me:$LINENO: result: Checking if sound is disabled... yes" >&5
+echo "${ECHO_T}Checking if sound is disabled... yes" >&6
+	       fi
+
+fi;
+
+
+if test "$enable_sound" = "no"; then
+  true;
+else
+ case $target in
+  *darwin*)
+	LIBS="$LIBS -framework CoreAudio -framework CoreServices -framework AudioUnit -framework AudioToolbox"
+	if test "`uname -r`" = "6.8"; then
+		#ac_pa_cflags="-DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS"
+		#AC_MSG_RESULT([Setting additional PortAudio CFLAGS.. -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS])
+		ac_pjmedia_snd=pa_old_darwinos
+		echo "$as_me:$LINENO: result: Checking sound device backend... old coreaudio" >&5
+echo "${ECHO_T}Checking sound device backend... old coreaudio" >&6
+	else
+		ac_pjmedia_snd=pa_darwinos
+		echo "$as_me:$LINENO: result: Checking sound device backend... coreaudio" >&5
+echo "${ECHO_T}Checking sound device backend... coreaudio" >&6
+	fi
+	;;
+  *cygwin* | *mingw*)
+	ac_pjmedia_snd=pa_win32
+	echo "$as_me:$LINENO: result: Checking sound device backend... win32 sound" >&5
+echo "${ECHO_T}Checking sound device backend... win32 sound" >&6
+	;;
+  *rtems*)
+	ac_pjmedia_snd=null
+	echo "$as_me:$LINENO: result: Checking sound device backend... null sound" >&5
+echo "${ECHO_T}Checking sound device backend... null sound" >&6
+	;;
+  *)
+	ac_pjmedia_snd=pa_unix
+	if test "${ac_cv_header_alsa_version_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for alsa/version.h" >&5
+echo $ECHO_N "checking for alsa/version.h... $ECHO_C" >&6
+if test "${ac_cv_header_alsa_version_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_alsa_version_h" >&5
+echo "${ECHO_T}$ac_cv_header_alsa_version_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking alsa/version.h usability" >&5
+echo $ECHO_N "checking alsa/version.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <alsa/version.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking alsa/version.h presence" >&5
+echo $ECHO_N "checking alsa/version.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <alsa/version.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: alsa/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: alsa/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: alsa/version.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: alsa/version.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: alsa/version.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: alsa/version.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: alsa/version.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: alsa/version.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: alsa/version.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: alsa/version.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: alsa/version.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: alsa/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: alsa/version.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: alsa/version.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: alsa/version.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: alsa/version.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for alsa/version.h" >&5
+echo $ECHO_N "checking for alsa/version.h... $ECHO_C" >&6
+if test "${ac_cv_header_alsa_version_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_alsa_version_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_alsa_version_h" >&5
+echo "${ECHO_T}$ac_cv_header_alsa_version_h" >&6
+
+fi
+if test $ac_cv_header_alsa_version_h = yes; then
+  ac_pa_use_alsa=1
+
+			 LIBS="$LIBS -lasound"
+
+else
+  ac_pa_use_alsa=0
+
+fi
+
+
+	echo "$as_me:$LINENO: result: Checking sound device backend... unix" >&5
+echo "${ECHO_T}Checking sound device backend... unix" >&6
+	;;
+ esac
+fi
+
+
+# Check whether --enable-small-filter or --disable-small-filter was given.
+if test "${enable_small_filter+set}" = set; then
+  enableval="$enable_small_filter"
+  if test "$enable_small_filter" = "no"; then
+		ac_no_small_filter='-DPJMEDIA_HAS_SMALL_FILTER=0'
+		echo "$as_me:$LINENO: result: Checking if small filter is disabled... yes" >&5
+echo "${ECHO_T}Checking if small filter is disabled... yes" >&6
+	       fi
+else
+  echo "$as_me:$LINENO: result: Checking if small filter is disabled... no" >&5
+echo "${ECHO_T}Checking if small filter is disabled... no" >&6
+fi;
+
+
+# Check whether --enable-large-filter or --disable-large-filter was given.
+if test "${enable_large_filter+set}" = set; then
+  enableval="$enable_large_filter"
+  if test "$enable_large_filter" = "no"; then
+		ac_no_large_filter='-DPJMEDIA_HAS_LARGE_FILTER=0'
+		echo "$as_me:$LINENO: result: Checking if large filter is disabled... yes" >&5
+echo "${ECHO_T}Checking if large filter is disabled... yes" >&6
+	       fi
+else
+  echo "$as_me:$LINENO: result: Checking if large filter is disabled... no" >&5
+echo "${ECHO_T}Checking if large filter is disabled... no" >&6
+fi;
+
+
+# Check whether --enable-g711-plc or --disable-g711-plc was given.
+if test "${enable_g711_plc+set}" = set; then
+  enableval="$enable_g711_plc"
+  if test "$enable_g711_plc" = "no"; then
+		ac_no_g711_plc='-DPJMEDIA_HAS_G711_PLC=0'
+		echo "$as_me:$LINENO: result: Checking if G.711 Annex A PLC is disabled...yes" >&5
+echo "${ECHO_T}Checking if G.711 Annex A PLC is disabled...yes" >&6
+	       fi
+else
+  echo "$as_me:$LINENO: result: Checking if G.711 Annex A PLC is disabled...no" >&5
+echo "${ECHO_T}Checking if G.711 Annex A PLC is disabled...no" >&6
+fi;
+
+
+# Check whether --enable-speex-aec or --disable-speex-aec was given.
+if test "${enable_speex_aec+set}" = set; then
+  enableval="$enable_speex_aec"
+  if test "$enable_speex_aec" = "no"; then
+		ac_no_speex_aec='-DPJMEDIA_HAS_SPEEX_AEC=0'
+		echo "$as_me:$LINENO: result: Checking if Speex AEC is disabled...yes" >&5
+echo "${ECHO_T}Checking if Speex AEC is disabled...yes" >&6
+	       fi
+else
+  echo "$as_me:$LINENO: result: Checking if Speex AEC is disabled...no" >&5
+echo "${ECHO_T}Checking if Speex AEC is disabled...no" >&6
+fi;
+
+
+# Check whether --enable-g711-codec or --disable-g711-codec was given.
+if test "${enable_g711_codec+set}" = set; then
+  enableval="$enable_g711_codec"
+  if test "$enable_g711_codec" = "no"; then
+		ac_no_g711_codec=1
+		cat >>confdefs.h <<\_ACEOF
+#define PJMEDIA_HAS_G711_CODEC 0
+_ACEOF
+
+		echo "$as_me:$LINENO: result: Checking if G.711 codec is disabled...yes" >&5
+echo "${ECHO_T}Checking if G.711 codec is disabled...yes" >&6
+	       fi
+else
+  echo "$as_me:$LINENO: result: Checking if G.711 codec is disabled...no" >&5
+echo "${ECHO_T}Checking if G.711 codec is disabled...no" >&6
+fi;
+
+
+
+# Check whether --enable-l16-codec or --disable-l16-codec was given.
+if test "${enable_l16_codec+set}" = set; then
+  enableval="$enable_l16_codec"
+  if test "$enable_l16_codec" = "no"; then
+		ac_no_l16_codec=1
+		cat >>confdefs.h <<\_ACEOF
+#define PJMEDIA_HAS_L16_CODEC 0
+_ACEOF
+
+		echo "$as_me:$LINENO: result: Checking if L16 codecs are disabled...yes" >&5
+echo "${ECHO_T}Checking if L16 codecs are disabled...yes" >&6
+	       fi
+else
+  echo "$as_me:$LINENO: result: Checking if L16 codec is disabled...no" >&5
+echo "${ECHO_T}Checking if L16 codec is disabled...no" >&6
+fi;
+
+
+
+# Check whether --enable-gsm-codec or --disable-gsm-codec was given.
+if test "${enable_gsm_codec+set}" = set; then
+  enableval="$enable_gsm_codec"
+  if test "$enable_gsm_codec" = "no"; then
+		ac_no_gsm_codec=1
+		cat >>confdefs.h <<\_ACEOF
+#define PJMEDIA_HAS_GSM_CODEC 0
+_ACEOF
+
+		echo "$as_me:$LINENO: result: Checking if GSM codec is disabled...yes" >&5
+echo "${ECHO_T}Checking if GSM codec is disabled...yes" >&6
+	       fi
+else
+  echo "$as_me:$LINENO: result: Checking if GSM codec is disabled...no" >&5
+echo "${ECHO_T}Checking if GSM codec is disabled...no" >&6
+fi;
+
+
+# Check whether --enable-speex-codec or --disable-speex-codec was given.
+if test "${enable_speex_codec+set}" = set; then
+  enableval="$enable_speex_codec"
+  if test "$enable_speex_codec" = "no"; then
+		ac_no_speex_codec=1
+		cat >>confdefs.h <<\_ACEOF
+#define PJMEDIA_HAS_SPEEX_CODEC 0
+_ACEOF
+
+		echo "$as_me:$LINENO: result: Checking if Speex codec is disabled...yes" >&5
+echo "${ECHO_T}Checking if Speex codec is disabled...yes" >&6
+	       fi
+else
+  echo "$as_me:$LINENO: result: Checking if Speex codec is disabled...no" >&5
+echo "${ECHO_T}Checking if Speex codec is disabled...no" >&6
+fi;
+
+
+# Check whether --enable-ilbc-codec or --disable-ilbc-codec was given.
+if test "${enable_ilbc_codec+set}" = set; then
+  enableval="$enable_ilbc_codec"
+  if test "$enable_ilbc_codec" = "no"; then
+		ac_no_ilbc_codec=1
+		cat >>confdefs.h <<\_ACEOF
+#define PJMEDIA_HAS_ILBC_CODEC 0
+_ACEOF
+
+		echo "$as_me:$LINENO: result: Checking if iLBC codec is disabled...yes" >&5
+echo "${ECHO_T}Checking if iLBC codec is disabled...yes" >&6
+	       fi
+else
+  echo "$as_me:$LINENO: result: Checking if iLBC codec is disabled...no" >&5
+echo "${ECHO_T}Checking if iLBC codec is disabled...no" >&6
+fi;
+
+
+
+
+
+# Check whether --enable-ssl or --disable-ssl was given.
+if test "${enable_ssl+set}" = set; then
+  enableval="$enable_ssl"
+
+		if test "$enable_ssl" = "no"; then
+		 ac_no_ssl=1
+		 echo "$as_me:$LINENO: result: Checking if SSL support is disabled... yes" >&5
+echo "${ECHO_T}Checking if SSL support is disabled... yes" >&6
+	        fi
+
+else
+
+		echo "$as_me:$LINENO: result: checking for OpenSSL installations.." >&5
+echo "${ECHO_T}checking for OpenSSL installations.." >&6
+
+
+
+		if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
+echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
+if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
+echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking openssl/ssl.h usability" >&5
+echo $ECHO_N "checking openssl/ssl.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <openssl/ssl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking openssl/ssl.h presence" >&5
+echo $ECHO_N "checking openssl/ssl.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <openssl/ssl.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: openssl/ssl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: openssl/ssl.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: openssl/ssl.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: openssl/ssl.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: openssl/ssl.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: openssl/ssl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: openssl/ssl.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: openssl/ssl.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to the pjproject lists.  ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for openssl/ssl.h" >&5
+echo $ECHO_N "checking for openssl/ssl.h... $ECHO_C" >&6
+if test "${ac_cv_header_openssl_ssl_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_openssl_ssl_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_openssl_ssl_h" >&5
+echo "${ECHO_T}$ac_cv_header_openssl_ssl_h" >&6
+
+fi
+if test $ac_cv_header_openssl_ssl_h = yes; then
+  openssl_h_present=1
+fi
+
+
+		echo "$as_me:$LINENO: checking for SSL_library_init in -lssl" >&5
+echo $ECHO_N "checking for SSL_library_init in -lssl... $ECHO_C" >&6
+if test "${ac_cv_lib_ssl_SSL_library_init+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lssl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char SSL_library_init ();
+int
+main ()
+{
+SSL_library_init ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_ssl_SSL_library_init=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ssl_SSL_library_init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_library_init" >&5
+echo "${ECHO_T}$ac_cv_lib_ssl_SSL_library_init" >&6
+if test $ac_cv_lib_ssl_SSL_library_init = yes; then
+  libssl_present=1 && LIBS="$LIBS -lssl"
+fi
+
+		echo "$as_me:$LINENO: checking for ERR_load_BIO_strings in -lcrypto" >&5
+echo $ECHO_N "checking for ERR_load_BIO_strings in -lcrypto... $ECHO_C" >&6
+if test "${ac_cv_lib_crypto_ERR_load_BIO_strings+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrypto  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char ERR_load_BIO_strings ();
+int
+main ()
+{
+ERR_load_BIO_strings ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_crypto_ERR_load_BIO_strings=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_crypto_ERR_load_BIO_strings=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_ERR_load_BIO_strings" >&5
+echo "${ECHO_T}$ac_cv_lib_crypto_ERR_load_BIO_strings" >&6
+if test $ac_cv_lib_crypto_ERR_load_BIO_strings = yes; then
+  libcrypto_present=1 && LIBS="$LIBS -lcrypto"
+fi
+
+		if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then
+	        	echo "$as_me:$LINENO: result: OpenSSL library found, SSL support enabled" >&5
+echo "${ECHO_T}OpenSSL library found, SSL support enabled" >&6
+			cat >>confdefs.h <<\_ACEOF
+#define PJSIP_HAS_TLS_TRANSPORT 1
+_ACEOF
+
+		else
+			echo "$as_me:$LINENO: result: ** OpenSSL libraries not found, disabling SSL support **" >&5
+echo "${ECHO_T}** OpenSSL libraries not found, disabling SSL support **" >&6
+		fi
+
+fi;
+
+
+
+
+echo "$as_me:$LINENO: checking if select() needs correct nfds" >&5
+echo $ECHO_N "checking if select() needs correct nfds... $ECHO_C" >&6
+case $target in
+  *rtems*) cat >>confdefs.h <<\_ACEOF
+#define PJ_SELECT_NEEDS_NFDS 1
+_ACEOF
+
+	   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+	;;
+  *) cat >>confdefs.h <<\_ACEOF
+#define PJ_SELECT_NEEDS_NFDS 0
+_ACEOF
+
+     echo "$as_me:$LINENO: result: no (default)" >&5
+echo "${ECHO_T}no (default)" >&6
+     echo "$as_me:$LINENO: result: ** Decided that select() doesn't need correct nfds (please check)" >&5
+echo "${ECHO_T}** Decided that select() doesn't need correct nfds (please check)" >&6
+	;;
+esac
+
+echo "$as_me:$LINENO: checking if pj_thread_create() should enforce stack size" >&5
+echo $ECHO_N "checking if pj_thread_create() should enforce stack size... $ECHO_C" >&6
+case $target in
+  *rtems*) cat >>confdefs.h <<\_ACEOF
+#define PJ_THREAD_SET_STACK_SIZE 1
+_ACEOF
+
+	   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+	;;
+  *) cat >>confdefs.h <<\_ACEOF
+#define PJ_THREAD_SET_STACK_SIZE 0
+_ACEOF
+
+     echo "$as_me:$LINENO: result: no (default)" >&5
+echo "${ECHO_T}no (default)" >&6
+	;;
+esac
+
+echo "$as_me:$LINENO: checking if pj_thread_create() should allocate stack" >&5
+echo $ECHO_N "checking if pj_thread_create() should allocate stack... $ECHO_C" >&6
+case $target in
+  *rtems*) cat >>confdefs.h <<\_ACEOF
+#define PJ_THREAD_ALLOCATE_STACK 1
+_ACEOF
+
+	   echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+	;;
+  *) cat >>confdefs.h <<\_ACEOF
+#define PJ_THREAD_ALLOCATE_STACK 0
+_ACEOF
+
+     echo "$as_me:$LINENO: result: no (default)" >&5
+echo "${ECHO_T}no (default)" >&6
+	;;
+esac
+
+case $target in
+  *mingw* | *cygw* | *win32* | *w32* )
+	cat >>confdefs.h <<\_ACEOF
+#define PJ_BLOCKING_ERROR_VAL WSAEWOULDBLOCK
+_ACEOF
+
+	;;
+  *) cat >>confdefs.h <<\_ACEOF
+#define PJ_BLOCKING_ERROR_VAL EAGAIN
+_ACEOF
+
+     echo "$as_me:$LINENO: result: ** Setting non-blocking recv() retval to EAGAIN (please check)" >&5
+echo "${ECHO_T}** Setting non-blocking recv() retval to EAGAIN (please check)" >&6
+	;;
+esac
+
+case $target in
+  *mingw* | *cygw* | *win32* | *w32* )
+	cat >>confdefs.h <<\_ACEOF
+#define PJ_BLOCKING_CONNECT_ERROR_VAL WSAEWOULDBLOCK
+_ACEOF
+
+	;;
+  *) cat >>confdefs.h <<\_ACEOF
+#define PJ_BLOCKING_CONNECT_ERROR_VAL EINPROGRESS
+_ACEOF
+
+     echo "$as_me:$LINENO: result: ** Setting non-blocking connect() retval to EINPROGRESS (please check)" >&5
+echo "${ECHO_T}** Setting non-blocking connect() retval to EINPROGRESS (please check)" >&6
+	;;
+esac
+
+
+
+
+if test "$build" = "$host"; then
+    ac_cross_compile=
+else
+    ac_cross_compile=${host_orig}-
+fi
+ac_linux_poll=select
+
+ac_host=unix
+
+
+case $target in
+  *rtems*)
+	ac_main_obj=main_rtems.o
+	;;
+  *)
+	ac_main_obj=main.o
+	;;
+esac
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[	 ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[	 ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by pjproject $as_me 0.5.10, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number, then exit
+  -q, --quiet      do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+  --file=FILE[:TEMPLATE]
+		   instantiate the configuration file FILE
+  --header=FILE[:TEMPLATE]
+		   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+pjproject config.status 0.5.10
+configured by $0, generated by GNU Autoconf 2.59,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value.  By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "x$1" : 'x\([^=]*\)='`
+    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  -*)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    echo "$ac_cs_usage"; exit 0 ;;
+  --debug | --d* | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    ac_need_defaults=false;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1" ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "build.mak" ) CONFIG_FILES="$CONFIG_FILES build.mak" ;;
+  "build/os-auto.mak" ) CONFIG_FILES="$CONFIG_FILES build/os-auto.mak" ;;
+  "pjlib/build/os-auto.mak" ) CONFIG_FILES="$CONFIG_FILES pjlib/build/os-auto.mak" ;;
+  "pjlib-util/build/os-auto.mak" ) CONFIG_FILES="$CONFIG_FILES pjlib-util/build/os-auto.mak" ;;
+  "pjmedia/build/os-auto.mak" ) CONFIG_FILES="$CONFIG_FILES pjmedia/build/os-auto.mak" ;;
+  "pjsip/build/os-auto.mak" ) CONFIG_FILES="$CONFIG_FILES pjsip/build/os-auto.mak" ;;
+  "pjlib/include/pj/compat/os_auto.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pjlib/include/pj/compat/os_auto.h" ;;
+  "pjlib/include/pj/compat/m_auto.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pjlib/include/pj/compat/m_auto.h" ;;
+  "pjmedia/include/pjmedia/config_auto.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pjmedia/include/pjmedia/config_auto.h" ;;
+  "pjmedia/include/pjmedia-codec/config_auto.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pjmedia/include/pjmedia-codec/config_auto.h" ;;
+  "pjsip/include/pjsip/sip_autoconf.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pjsip/include/pjsip/sip_autoconf.h" ;;
+  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@CXX@,$CXX,;t t
+s,@CXXFLAGS@,$CXXFLAGS,;t t
+s,@ac_ct_CXX@,$ac_ct_CXX,;t t
+s,@ac_pjdir@,$ac_pjdir,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@ac_os_objs@,$ac_os_objs,;t t
+s,@ac_pjmedia_snd@,$ac_pjmedia_snd,;t t
+s,@ac_pa_cflags@,$ac_pa_cflags,;t t
+s,@ac_pa_use_alsa@,$ac_pa_use_alsa,;t t
+s,@ac_no_small_filter@,$ac_no_small_filter,;t t
+s,@ac_no_large_filter@,$ac_no_large_filter,;t t
+s,@ac_no_g711_plc@,$ac_no_g711_plc,;t t
+s,@ac_no_speex_aec@,$ac_no_speex_aec,;t t
+s,@ac_no_g711_codec@,$ac_no_g711_codec,;t t
+s,@ac_no_l16_codec@,$ac_no_l16_codec,;t t
+s,@ac_no_gsm_codec@,$ac_no_gsm_codec,;t t
+s,@ac_no_speex_codec@,$ac_no_speex_codec,;t t
+s,@ac_no_ilbc_codec@,$ac_no_ilbc_codec,;t t
+s,@ac_no_ssl@,$ac_no_ssl,;t t
+s,@openssl_h_present@,$openssl_h_present,;t t
+s,@libssl_present@,$libssl_present,;t t
+s,@libcrypto_present@,$libcrypto_present,;t t
+s,@ac_cross_compile@,$ac_cross_compile,;t t
+s,@ac_linux_poll@,$ac_linux_poll,;t t
+s,@ac_host@,$ac_host,;t t
+s,@ac_main_obj@,$ac_main_obj,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+				     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
+ac_dB='[	 ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+	cat >$tmp/stdin
+	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+	 # Absolute (can't be DOS-style, as IFS=:)
+	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 # Do quote $f, to prevent DOS paths from being IFS'd.
+	 echo "$f";;
+      *) # Relative
+	 if test -f "$f"; then
+	   # Build tree
+	   echo "$f"
+	 elif test -f "$srcdir/$f"; then
+	   # Source tree
+	   echo "$srcdir/$f"
+	 else
+	   # /dev/null tree
+	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+	 fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # Let's still pretend it is `configure' which instantiates (i.e., don't
+  # use $as_me), people would be surprised to read:
+  #    /* config.h.  Generated by config.status.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
Index: /pjproject/branches/split-3rd-party/aconfigure.ac
===================================================================
--- /pjproject/branches/split-3rd-party/aconfigure.ac	(revision 1163)
+++ /pjproject/branches/split-3rd-party/aconfigure.ac	(revision 1163)
@@ -0,0 +1,521 @@
+AC_INIT(pjproject,0.5.10)
+
+host_orig="$host"
+
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+AC_CONFIG_HEADER([pjlib/include/pj/compat/os_auto.h
+		  pjlib/include/pj/compat/m_auto.h
+		  pjmedia/include/pjmedia/config_auto.h
+		  pjmedia/include/pjmedia-codec/config_auto.h
+		  pjsip/include/pjsip/sip_autoconf.h
+		 ])
+AC_CONFIG_FILES([build.mak 
+		 build/os-auto.mak 
+	         pjlib/build/os-auto.mak 
+	         pjlib-util/build/os-auto.mak 
+		 pjmedia/build/os-auto.mak
+		 pjsip/build/os-auto.mak
+	        ])
+
+
+dnl
+dnl Setup default CFLAGS
+dnl
+if test "$CFLAGS" = ""; then
+  CFLAGS="-O2"
+else
+  CFLAGS="$CFLAGS"
+fi
+
+CXXFLAGS="$CFLAGS $CXXFLAGS"
+
+AC_PROG_CC
+AC_PROG_CXX
+AC_LANG_C
+
+AC_SUBST(ac_pjdir)
+ac_pjdir=`pwd`
+
+AC_CHECK_LIB(pthread,pthread_create)
+AC_CHECK_LIB(wsock32,puts)
+AC_CHECK_LIB(ws2_32,puts)
+AC_CHECK_LIB(ole32,puts)
+AC_CHECK_LIB(winmm,puts)
+AC_CHECK_LIB(socket,puts)
+AC_CHECK_LIB(rt,puts)
+AC_CHECK_LIB(nsl,puts)
+
+AC_MSG_RESULT([Setting PJ_M_NAME to $target_cpu])
+AC_DEFINE_UNQUOTED(PJ_M_NAME,["$target_cpu"])
+
+dnl
+dnl Memory alignment detection
+dnl
+AC_MSG_CHECKING([memory alignment])
+case $target in
+    ia64-* | x86_64-* )
+	AC_DEFINE(PJ_POOL_ALIGNMENT, 8)
+	AC_MSG_RESULT([8 bytes])
+	;;
+    * )
+	AC_DEFINE(PJ_POOL_ALIGNMENT, 4)
+	AC_MSG_RESULT([4 bytes (default)])
+	;;
+esac
+
+
+dnl
+dnl Endianness detection
+dnl
+AC_C_BIGENDIAN
+
+dnl
+dnl Legacy macros
+dnl
+case $target in
+    *mingw* | *cygw* | *win32* | *w32* )
+	AC_DEFINE(PJ_WIN32,1)
+	AC_DEFINE(PJ_WIN32_WINNT,0x0400)
+	AC_DEFINE(WIN32_LEAN_AND_MEAN)
+	;;
+    *darwin*)
+	AC_DEFINE(PJ_DARWINOS,1)
+	;;
+    *linux*)
+	AC_DEFINE(PJ_LINUX,1)
+	;;
+    *rtems*)
+	AC_DEFINE(PJ_RTEMS,1)
+	;;
+    *sunos* | *solaris* )
+	AC_DEFINE(PJ_SUNOS,1)
+	;;
+    *)
+	;;
+esac
+
+
+
+
+dnl # --disable-floating-point option
+AC_ARG_ENABLE(floating-point,
+	      AC_HELP_STRING([--disable-floating-point],
+			     [Disable floating point where possible]),
+	      [if test "$enable_floating_point" = "no"; then
+		AC_DEFINE(PJ_HAS_FLOATING_POINT,0)
+		AC_MSG_RESULT([Checking if floating point is disabled... yes])
+	       fi],
+	      [
+		AC_DEFINE(PJ_HAS_FLOATING_POINT,1)
+	        AC_MSG_RESULT([Checking if floating point is disabled... no]) 
+		AC_CHECK_LIB(m,fmod)
+	      ])
+
+
+AC_CHECK_HEADER(arpa/inet.h,[AC_DEFINE(PJ_HAS_ARPA_INET_H,1)])
+AC_CHECK_HEADER(assert.h,[AC_DEFINE(PJ_HAS_ASSERT_H,1)])
+AC_CHECK_HEADER(ctype.h,[AC_DEFINE(PJ_HAS_CTYPE_H,1)])
+
+case $target in
+    *mingw* | *cygw* | *win32* | *w32* )
+	AC_DEFINE(PJ_HAS_ERRNO_H,0)
+	;;
+    *)
+	AC_CHECK_HEADER(errno.h,[AC_DEFINE(PJ_HAS_ERRNO_H,1)])
+	;;
+esac
+
+AC_CHECK_HEADER(linux/socket.h,[AC_DEFINE(PJ_HAS_LINUX_SOCKET_H,1)])
+AC_CHECK_HEADER(malloc.h,[AC_DEFINE(PJ_HAS_MALLOC_H,1)])
+AC_CHECK_HEADER(netdb.h,[AC_DEFINE(PJ_HAS_NETDB_H,1)])
+AC_CHECK_HEADER(netinet/in.h,[AC_DEFINE(PJ_HAS_NETINET_IN_H,1)])
+AC_CHECK_HEADER(netinet/ip.h,[AC_DEFINE(PJ_HAS_NETINET_IP_H,1)])
+AC_CHECK_HEADER(setjmp.h,[AC_DEFINE(PJ_HAS_SETJMP_H,1)])
+AC_CHECK_HEADER(stdarg.h,[AC_DEFINE(PJ_HAS_STDARG_H,1)])
+AC_CHECK_HEADER(stddef.h,[AC_DEFINE(PJ_HAS_STDDEF_H,1)])
+AC_CHECK_HEADER(stdio.h,[AC_DEFINE(PJ_HAS_STDIO_H,1)])
+AC_CHECK_HEADER(stdlib.h,[AC_DEFINE(PJ_HAS_STDLIB_H,1)])
+AC_CHECK_HEADER(string.h,[AC_DEFINE(PJ_HAS_STRING_H,1)])
+AC_CHECK_HEADER(sys/ioctl.h,[AC_DEFINE(PJ_HAS_SYS_IOCTL_H,1)])
+AC_CHECK_HEADER(sys/select.h,[AC_DEFINE(PJ_HAS_SYS_SELECT_H,1)])
+AC_CHECK_HEADER(sys/socket.h,[AC_DEFINE(PJ_HAS_SYS_SOCKET_H,1)])
+AC_CHECK_HEADER(sys/time.h,[AC_DEFINE(PJ_HAS_SYS_TIME_H,1)])
+AC_CHECK_HEADER(sys/timeb.h,[AC_DEFINE(PJ_HAS_SYS_TIMEB_H,1)])
+AC_CHECK_HEADER(sys/types.h,[AC_DEFINE(PJ_HAS_SYS_TYPES_H,1)])
+AC_CHECK_HEADER(time.h,[AC_DEFINE(PJ_HAS_TIME_H,1)])
+AC_CHECK_HEADER(unistd.h,[AC_DEFINE(PJ_HAS_UNISTD_H,1)])
+AC_CHECK_HEADER(mswsock.h,[AC_DEFINE(PJ_HAS_MSWSOCK_H,1)])
+AC_CHECK_HEADER(winsock.h,[AC_DEFINE(PJ_HAS_WINSOCK_H,1)])
+AC_CHECK_HEADER(winsock2.h,[AC_DEFINE(PJ_HAS_WINSOCK2_H,1)])
+
+AC_MSG_RESULT([Setting PJ_OS_NAME to $target])
+AC_DEFINE_UNQUOTED(PJ_OS_NAME,["$target"])
+
+AC_MSG_RESULT([Setting PJ_HAS_ERRNO_VAR to 1])
+AC_DEFINE(PJ_HAS_ERRNO_VAR,1)
+
+AC_MSG_RESULT([Setting PJ_HAS_HIGH_RES_TIMER to 1])
+AC_DEFINE(PJ_HAS_HIGH_RES_TIMER,1)
+
+AC_MSG_RESULT([Setting PJ_HAS_MALLOC to 1])
+AC_DEFINE(PJ_HAS_MALLOC,1)
+
+AC_MSG_RESULT([Setting PJ_NATIVE_STRING_IS_UNICODE to 0])
+AC_DEFINE(PJ_NATIVE_STRING_IS_UNICODE,0)
+
+AC_MSG_RESULT([Setting PJ_ATOMIC_VALUE_TYPE to long])
+AC_DEFINE(PJ_ATOMIC_VALUE_TYPE,long)
+
+dnl # Determine if inet_aton() is available
+AC_MSG_CHECKING([if inet_aton is available])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <arpa/inet.h>]],
+		    		  [inet_aton(0, 0);])],
+		  [AC_DEFINE(PJ_SOCK_HAS_INET_ATON,1)
+		   AC_MSG_RESULT(yes)],
+		  [AC_MSG_RESULT(no)])
+
+dnl # Determine if sockaddr_in has sin_len member
+AC_MSG_CHECKING([if sockaddr_in has sin_len member])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+				     #include <sys/socket.h>
+		    		     #include <netinet/in.h>
+		    		     #include <arpa/inet.h>]],
+		    		  [struct sockaddr_in a; a.sin_len=0;])],
+		  [AC_DEFINE(PJ_SOCKADDR_HAS_LEN,1)
+		   AC_MSG_RESULT(yes)],
+		  AC_MSG_RESULT(no))
+
+dnl # Determine if socklen_t is available
+AC_MSG_CHECKING([if socklen_t is available])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]],
+		    		   [socklen_t xxx = 0;])],
+		  [AC_DEFINE(PJ_HAS_SOCKLEN_T,1)
+		   AC_MSG_RESULT(yes)],
+		  AC_MSG_RESULT(no))
+
+dnl # Determine if SO_ERROR is available
+AC_MSG_CHECKING([if SO_ERROR is available])
+case $target in
+    *mingw* | *cygw* | *win32* | *w32* )
+	AC_DEFINE(PJ_HAS_SO_ERROR,1)
+	AC_MSG_RESULT(yes)
+	;;
+    *)
+	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
+					     #include <sys/socket.h>
+					     #include <netinet/in.h>
+					     #include <arpa/inet.h>]],
+					  [int i=SO_ERROR;])],
+			  [AC_DEFINE(PJ_HAS_SO_ERROR,1)
+			   AC_MSG_RESULT(yes)],
+			  AC_MSG_RESULT(no))
+	;;
+esac
+
+
+dnl # Determine if RW-mutex is available
+AC_MSG_CHECKING([if pthread_rwlock_t is available])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+		    		   [pthread_rwlock_t *x;])],
+		  [AC_DEFINE(PJ_EMULATE_RWMUTEX,0)
+  		   AC_MSG_RESULT(yes)],
+		  [AC_DEFINE(PJ_EMULATE_RWMUTEX,1)
+		   AC_MSG_RESULT(no)])
+
+AC_SUBST(ac_os_objs)
+case $target in
+  *mingw* | *cygw* | *win32* | *w32* )
+	ac_os_objs="file_access_win32.o file_io_win32.o os_core_win32.o os_error_win32.o os_time_win32.o os_timestamp_win32.o guid_win32.o ioqueue_select.o"
+	;;
+  *)
+	ac_os_objs="file_access_unistd.o file_io_ansi.o os_core_unix.o os_error_unix.o os_time_unix.o os_timestamp_posix.o guid_simple.o ioqueue_select.o"
+	;;
+esac
+
+
+dnl ##########################################
+dnl #
+dnl # PJMEDIA
+dnl #
+
+dnl # Sound device backend selection
+AC_SUBST(ac_pjmedia_snd)
+AC_ARG_ENABLE(sound,
+	      AC_HELP_STRING([--disable-sound],
+			     [Exclude sound (i.e. use null sound)]),
+	      [if test "$enable_sound" = "no"; then
+		[ac_pjmedia_snd=null]
+		AC_MSG_RESULT([Checking if sound is disabled... yes])
+	       fi]
+	      )
+
+AC_SUBST(ac_pa_cflags)
+if test "$enable_sound" = "no"; then
+  true;
+else
+ case $target in
+  *darwin*)
+	LIBS="$LIBS -framework CoreAudio -framework CoreServices -framework AudioUnit -framework AudioToolbox"
+	if test "`uname -r`" = "6.8"; then
+		#ac_pa_cflags="-DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS"
+		#AC_MSG_RESULT([Setting additional PortAudio CFLAGS.. -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS])
+		ac_pjmedia_snd=pa_old_darwinos
+		AC_MSG_RESULT([Checking sound device backend... old coreaudio])
+	else
+		ac_pjmedia_snd=pa_darwinos
+		AC_MSG_RESULT([Checking sound device backend... coreaudio])
+	fi
+	;;
+  *cygwin* | *mingw*)
+	ac_pjmedia_snd=pa_win32
+	AC_MSG_RESULT([Checking sound device backend... win32 sound])
+	;;
+  *rtems*)
+	ac_pjmedia_snd=null
+	AC_MSG_RESULT([Checking sound device backend... null sound])
+	;;
+  *)
+	ac_pjmedia_snd=pa_unix
+	AC_CHECK_HEADER(alsa/version.h,
+			[AC_SUBST(ac_pa_use_alsa,1)
+			 LIBS="$LIBS -lasound"
+			],
+		        [AC_SUBST(ac_pa_use_alsa,0)])
+	AC_MSG_RESULT([Checking sound device backend... unix])
+	;;
+ esac
+fi
+
+dnl # Include resampling small filter
+AC_SUBST(ac_no_small_filter)
+AC_ARG_ENABLE(small-filter,
+	      AC_HELP_STRING([--disable-small-filter],
+			     [Exclude small filter in resampling]),
+	      [if test "$enable_small_filter" = "no"; then
+		[ac_no_small_filter='-DPJMEDIA_HAS_SMALL_FILTER=0']
+		AC_MSG_RESULT([Checking if small filter is disabled... yes])
+	       fi],
+	      AC_MSG_RESULT([Checking if small filter is disabled... no]))
+
+dnl # Include resampling large filter
+AC_SUBST(ac_no_large_filter)
+AC_ARG_ENABLE(large-filter,
+	      AC_HELP_STRING([--disable-large-filter],
+			     [Exclude large filter in resampling]),
+	      [if test "$enable_large_filter" = "no"; then
+		[ac_no_large_filter='-DPJMEDIA_HAS_LARGE_FILTER=0']
+		AC_MSG_RESULT([Checking if large filter is disabled... yes])
+	       fi],
+	      AC_MSG_RESULT([Checking if large filter is disabled... no]))
+
+dnl # Include G.711 Annex A PLC
+AC_SUBST(ac_no_g711_plc)
+AC_ARG_ENABLE(g711-plc,
+	      AC_HELP_STRING([--disable-g711-plc],
+			     [Exclude G.711 Annex A PLC]),
+	      [if test "$enable_g711_plc" = "no"; then
+		[ac_no_g711_plc='-DPJMEDIA_HAS_G711_PLC=0']
+		AC_MSG_RESULT([Checking if G.711 Annex A PLC is disabled...yes])
+	       fi],
+	      AC_MSG_RESULT([Checking if G.711 Annex A PLC is disabled...no]))
+
+dnl # Include Speex AEC
+AC_SUBST(ac_no_speex_aec)
+AC_ARG_ENABLE(speex-aec,
+	      AC_HELP_STRING([--disable-speex-aec],
+			     [Exclude Speex Acoustic Echo Canceller/AEC]),
+	      [if test "$enable_speex_aec" = "no"; then
+		[ac_no_speex_aec='-DPJMEDIA_HAS_SPEEX_AEC=0']
+		AC_MSG_RESULT([Checking if Speex AEC is disabled...yes])
+	       fi],
+	      AC_MSG_RESULT([Checking if Speex AEC is disabled...no]))
+
+dnl # Include G711 codec
+AC_SUBST(ac_no_g711_codec)
+AC_ARG_ENABLE(g711-codec,
+	      AC_HELP_STRING([--disable-g711-codec],
+			     [Exclude G.711 codecs from the build]),
+	      [if test "$enable_g711_codec" = "no"; then
+		[ac_no_g711_codec=1]
+		AC_DEFINE(PJMEDIA_HAS_G711_CODEC,0)
+		AC_MSG_RESULT([Checking if G.711 codec is disabled...yes])
+	       fi],
+	      AC_MSG_RESULT([Checking if G.711 codec is disabled...no]))
+
+
+dnl # Include L16 codec
+AC_SUBST(ac_no_l16_codec)
+AC_ARG_ENABLE(l16-codec,
+	      AC_HELP_STRING([--disable-l16-codec],
+			     [Exclude Linear/L16 codec family from the build]),
+	      [if test "$enable_l16_codec" = "no"; then
+		[ac_no_l16_codec=1]
+		AC_DEFINE(PJMEDIA_HAS_L16_CODEC,0)
+		AC_MSG_RESULT([Checking if L16 codecs are disabled...yes])
+	       fi],
+	      AC_MSG_RESULT([Checking if L16 codec is disabled...no]))
+
+
+dnl # Include GSM codec
+AC_SUBST(ac_no_gsm_codec)
+AC_ARG_ENABLE(gsm-codec,
+	      AC_HELP_STRING([--disable-gsm-codec],
+			     [Exclude GSM codec in the build]),
+	      [if test "$enable_gsm_codec" = "no"; then
+		[ac_no_gsm_codec=1]
+		AC_DEFINE(PJMEDIA_HAS_GSM_CODEC,0)
+		AC_MSG_RESULT([Checking if GSM codec is disabled...yes])
+	       fi],
+	      AC_MSG_RESULT([Checking if GSM codec is disabled...no]))
+
+dnl # Include Speex codec
+AC_SUBST(ac_no_speex_codec)
+AC_ARG_ENABLE(speex-codec,
+	      AC_HELP_STRING([--disable-speex-codec],
+			     [Exclude Speex codecs in the build]),
+	      [if test "$enable_speex_codec" = "no"; then
+		[ac_no_speex_codec=1]
+		AC_DEFINE(PJMEDIA_HAS_SPEEX_CODEC,0)
+		AC_MSG_RESULT([Checking if Speex codec is disabled...yes])
+	       fi],
+	      AC_MSG_RESULT([Checking if Speex codec is disabled...no]))
+
+dnl # Include iLBC codec
+AC_SUBST(ac_no_ilbc_codec)
+AC_ARG_ENABLE(ilbc-codec,
+	      AC_HELP_STRING([--disable-ilbc-codec],
+			     [Exclude iLBC codec in the build]),
+	      [if test "$enable_ilbc_codec" = "no"; then
+		[ac_no_ilbc_codec=1]
+		AC_DEFINE(PJMEDIA_HAS_ILBC_CODEC,0)
+		AC_MSG_RESULT([Checking if iLBC codec is disabled...yes])
+	       fi],
+	      AC_MSG_RESULT([Checking if iLBC codec is disabled...no]))
+
+
+
+dnl ##########################################
+dnl #
+dnl # PJSIP CONFIG
+dnl #
+
+dnl # Include SSL support
+AC_SUBST(ac_no_ssl)
+AC_ARG_ENABLE(ssl,
+	      AC_HELP_STRING([--disable-ssl],
+			     [Exclude SSL support the build (default: autodetect)])
+	      ,
+	      [
+		if test "$enable_ssl" = "no"; then
+		 [ac_no_ssl=1]
+		 AC_MSG_RESULT([Checking if SSL support is disabled... yes])
+	        fi
+	      ],
+	      [
+		AC_MSG_RESULT([checking for OpenSSL installations..])
+		AC_SUBST(openssl_h_present)
+		AC_SUBST(libssl_present)
+		AC_SUBST(libcrypto_present)
+		AC_CHECK_HEADER(openssl/ssl.h,[openssl_h_present=1])
+		AC_CHECK_LIB(ssl,SSL_library_init,[libssl_present=1 && LIBS="$LIBS -lssl"])
+		AC_CHECK_LIB(crypto,ERR_load_BIO_strings,[libcrypto_present=1 && LIBS="$LIBS -lcrypto"])
+		if test "x$openssl_h_present" = "x1" -a "x$libssl_present" = "x1" -a "x$libcrypto_present" = "x1"; then
+	        	AC_MSG_RESULT([OpenSSL library found, SSL support enabled])
+			AC_DEFINE(PJSIP_HAS_TLS_TRANSPORT, 1)
+		else
+			AC_MSG_RESULT([** OpenSSL libraries not found, disabling SSL support **])
+		fi
+	      ])
+
+
+dnl ##########################################
+dnl #
+dnl # MANUAL CONFIG
+dnl #
+
+
+dnl # Determine if select() requires nfds to be filled up with
+dnl # correct value (max_fd+1). If zero, nfds will be filled up with
+dnl # PJ_FD_SETSIZE
+AC_MSG_CHECKING([if select() needs correct nfds])
+case $target in
+  *rtems*) AC_DEFINE(PJ_SELECT_NEEDS_NFDS,1)
+	   AC_MSG_RESULT(yes)
+	;;
+  *) AC_DEFINE(PJ_SELECT_NEEDS_NFDS,0)
+     AC_MSG_RESULT([no (default)])
+     AC_MSG_RESULT([** Decided that select() doesn't need correct nfds (please check)])
+	;;
+esac
+
+dnl # Determine if pj_thread_create() should enforce thread stack size when
+dnl # creating thread. Default is zero, to allow OS to allocate appropriate
+dnl # thread's stack size.
+AC_MSG_CHECKING([if pj_thread_create() should enforce stack size])
+case $target in
+  *rtems*) AC_DEFINE(PJ_THREAD_SET_STACK_SIZE,1)
+	   AC_MSG_RESULT(yes)
+	;;
+  *) AC_DEFINE(PJ_THREAD_SET_STACK_SIZE,0)
+     AC_MSG_RESULT([no (default)])
+	;;
+esac
+
+dnl # Determine if pj_thread_create() should allocate thread's stack from
+dnl # the pool. Default is zero, to let OS allocate thread's stack.
+AC_MSG_CHECKING([if pj_thread_create() should allocate stack])
+case $target in
+  *rtems*) AC_DEFINE(PJ_THREAD_ALLOCATE_STACK,1)
+	   AC_MSG_RESULT(yes)
+	;;
+  *) AC_DEFINE(PJ_THREAD_ALLOCATE_STACK,0)
+     AC_MSG_RESULT([no (default)])
+	;;
+esac
+
+dnl # This value specifies the value set in errno by the OS when a non-blocking
+dnl # socket recv() can not return immediate data.
+case $target in
+  *mingw* | *cygw* | *win32* | *w32* )
+	AC_DEFINE(PJ_BLOCKING_ERROR_VAL,WSAEWOULDBLOCK)
+	;;
+  *) AC_DEFINE(PJ_BLOCKING_ERROR_VAL,EAGAIN)
+     AC_MSG_RESULT([** Setting non-blocking recv() retval to EAGAIN (please check)])
+	;;
+esac
+
+dnl # This value specifies the value set in errno by the OS when a non-blocking
+dnl # socket connect() can not get connected immediately.
+case $target in
+  *mingw* | *cygw* | *win32* | *w32* )
+	AC_DEFINE(PJ_BLOCKING_CONNECT_ERROR_VAL,WSAEWOULDBLOCK)
+	;;
+  *) AC_DEFINE(PJ_BLOCKING_CONNECT_ERROR_VAL,EINPROGRESS)
+     AC_MSG_RESULT([** Setting non-blocking connect() retval to EINPROGRESS (please check)])
+	;;
+esac
+
+
+AC_SUBST(target)
+AC_SUBST(ac_cross_compile)
+if test "$build" = "$host"; then
+    ac_cross_compile=
+else
+    ac_cross_compile=${host_orig}-
+fi
+AC_SUBST(ac_linux_poll,select)
+AC_SUBST(ac_host,unix)
+AC_SUBST(ac_main_obj)
+case $target in
+  *rtems*)
+	ac_main_obj=main_rtems.o
+	;;
+  *)
+	ac_main_obj=main.o
+	;;
+esac
+AC_SUBST(CC)
+AC_OUTPUT()
+
Index: /pjproject/branches/split-3rd-party/build.mak.in
===================================================================
--- /pjproject/branches/split-3rd-party/build.mak.in	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build.mak.in	(revision 1163)
@@ -0,0 +1,35 @@
+# @configure_input@
+export MACHINE_NAME := auto
+export OS_NAME := auto
+export HOST_NAME := unix
+export CC_NAME := gcc
+export TARGET_NAME := @target@
+export CROSS_COMPILE := @ac_cross_compile@
+export LINUX_POLL := @ac_linux_poll@ 
+
+# Application can use this
+export PJDIR := @ac_pjdir@
+export APP_CC := $(CROSS_COMPILE)$(CC_NAME)
+export APP_CFLAGS := -DPJ_AUTOCONF=1\
+	@CFLAGS@\
+	-I$(PJDIR)/pjlib/include\
+	-I$(PJDIR)/pjlib-util/include\
+	-I$(PJDIR)/pjmedia/include\
+	-I$(PJDIR)/pjsip/include
+export APP_CXXFLAGS := $(APP_CFLAGS)
+export APP_LDFLAGS := -L$(PJDIR)/pjlib/lib\
+	-L$(PJDIR)/pjlib-util/lib\
+	-L$(PJDIR)/pjmedia/lib\
+	-L$(PJDIR)/pjsip/lib\
+	@LDFLAGS@
+export APP_LDLIBS := -lpjsua-$(TARGET_NAME)\
+	-lpjsip-ua-$(TARGET_NAME)\
+	-lpjsip-simple-$(TARGET_NAME)\
+	-lpjsip-$(TARGET_NAME)\
+	-lpjmedia-codec-$(TARGET_NAME)\
+	-lpjmedia-$(TARGET_NAME)\
+	-lpjmedia-codec-$(TARGET_NAME)\
+	-lpjlib-util-$(TARGET_NAME)\
+	-lpj-$(TARGET_NAME)\
+	@LIBS@
+
Index: /pjproject/branches/split-3rd-party/build/cc-gcc.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/cc-gcc.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/cc-gcc.mak	(revision 1163)
@@ -0,0 +1,22 @@
+export CC = $(CROSS_COMPILE)gcc -c
+export AR = $(CROSS_COMPILE)ar rv 
+export LD = $(CROSS_COMPILE)gcc
+export LDOUT = -o 
+export RANLIB = $(CROSS_COMPILE)ranlib
+
+export OBJEXT := .o
+export LIBEXT := .a
+export LIBEXT2 :=
+
+export CC_OUT := -o 
+export CC_INC := -I
+export CC_DEF := -D
+export CC_OPTIMIZE := -O2
+export CC_LIB := -l
+
+export CC_SOURCES :=
+export CC_CFLAGS := -Wall 
+#export CC_CFLAGS += -Wdeclaration-after-statement
+#export CC_CXXFLAGS := -Wdeclaration-after-statement
+export CC_LDFLAGS :=
+
Index: /pjproject/branches/split-3rd-party/build/cc-vc.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/cc-vc.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/cc-vc.mak	(revision 1163)
@@ -0,0 +1,20 @@
+export CC := cl /c /nologo
+export AR := lib /NOLOGO /OUT:
+export LD := cl /nologo
+export LDOUT := /Fe
+export RANLIB := echo ranlib
+
+export OBJEXT := .obj
+export LIBEXT := .lib
+export LIBEXT2 := .LIB
+
+export CC_OUT := /Fo
+export CC_INC := /I
+export CC_DEF := /D
+export CC_OPTIMIZE := /Ox
+export CC_LIB :=
+
+export CC_SOURCES :=
+export CC_CFLAGS := /W4 /MT
+export CC_CXXFLAGS := /GX
+export CC_LDFLAGS := /MT 
Index: /pjproject/branches/split-3rd-party/build/common.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/common.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/common.mak	(revision 1163)
@@ -0,0 +1,54 @@
+#
+# Include host/target/compiler selection.
+# This will export CC_NAME, MACHINE_NAME, OS_NAME, and HOST_NAME variables.
+#
+include ../../build.mak
+
+#
+# Include global compiler specific definitions
+#
+include ../../build/cc-$(CC_NAME).mak
+
+#
+# (Optionally) Include compiler specific configuration that is
+# specific to this project. This configuration file is
+# located in this directory.
+#
+-include cc-$(CC_NAME).mak
+
+#
+# Include global machine specific definitions
+#
+include ../../build/m-$(MACHINE_NAME).mak
+-include m-$(MACHINE_NAME).mak
+
+#
+# Include target OS specific definitions
+#
+include ../../build/os-$(OS_NAME).mak
+
+#
+# (Optionally) Include target OS specific configuration that is
+# specific to this project. This configuration file is
+# located in this directory.
+#
+-include os-$(OS_NAME).mak
+
+#
+# Include host specific definitions
+#
+include ../../build/host-$(HOST_NAME).mak
+
+#
+# (Optionally) Include host specific configuration that is
+# specific to this project. This configuration file is
+# located in this directory.
+#
+-include host-$(HOST_NAME).mak
+
+#
+# Include global user configuration, if any
+#
+-include ../../user.mak
+
+
Index: /pjproject/branches/split-3rd-party/build/host-mingw.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/host-mingw.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/host-mingw.mak	(revision 1163)
@@ -0,0 +1,13 @@
+export HOST_MV := mv
+export HOST_RM := rm -f @@
+export HOST_RMR := rm -rf @@
+export HOST_RMDIR := rm -rf @@
+export HOST_MKDIR := mkdir @@
+export HOST_EXE := .exe
+export HOST_PSEP := /
+
+export HOST_SOURCES :=
+export HOST_CFLAGS :=
+export HOST_CXXFLAGS :=
+export HOST_LDFLAGS := $(CC_LIB)stdc++$(LIBEXT2)
+
Index: /pjproject/branches/split-3rd-party/build/host-unix.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/host-unix.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/host-unix.mak	(revision 1163)
@@ -0,0 +1,13 @@
+export HOST_MV := mv
+export HOST_RM := rm -f @@
+export HOST_RMR := rm -rf @@
+export HOST_RMDIR := rm -rf @@
+export HOST_MKDIR := mkdir -p @@
+export HOST_EXE := 
+export HOST_PSEP := /
+
+export HOST_SOURCES :=
+export HOST_CFLAGS :=
+export HOST_CXXFLAGS :=
+export HOST_LDFLAGS := 
+
Index: /pjproject/branches/split-3rd-party/build/host-win32.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/host-win32.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/host-win32.mak	(revision 1163)
@@ -0,0 +1,12 @@
+export HOST_MV := ren
+export HOST_RM := if exist @@; del /F /Q @@
+export HOST_RMR := if exist @@; del /F /Q @@
+export HOST_RMDIR := if exist @@; rmdir @@
+export HOST_MKDIR := if not exist @@; mkdir @@
+export HOST_EXE := .exe
+export HOST_PSEP := \\
+
+export HOST_SOURCES :=
+export HOST_CFLAGS :=
+export HOST_CXXFLAGS :=
+export HOST_LDFLAGS :=
Index: /pjproject/branches/split-3rd-party/build/m-alpha.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/m-alpha.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/m-alpha.mak	(revision 1163)
@@ -0,0 +1,4 @@
+export M_CFLAGS := $(CC_DEF)PJ_M_ALPHA=1
+export M_CXXFLAGS :=
+export M_LDFLAGS :=
+export M_SOURCES :=
Index: /pjproject/branches/split-3rd-party/build/m-arm.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/m-arm.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/m-arm.mak	(revision 1163)
@@ -0,0 +1,4 @@
+export M_CFLAGS := $(CC_DEF)PJ_M_ARMV4=1
+export M_CXXFLAGS :=
+export M_LDFLAGS :=
+export M_SOURCES :=
Index: /pjproject/branches/split-3rd-party/build/m-auto.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/m-auto.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/m-auto.mak	(revision 1163)
@@ -0,0 +1,1 @@
+# Nothing needs to be defined here
Index: /pjproject/branches/split-3rd-party/build/m-i386.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/m-i386.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/m-i386.mak	(revision 1163)
@@ -0,0 +1,4 @@
+export M_CFLAGS := $(CC_DEF)PJ_M_I386=1
+export M_CXXFLAGS :=
+export M_LDFLAGS :=
+export M_SOURCES :=
Index: /pjproject/branches/split-3rd-party/build/m-m68k.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/m-m68k.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/m-m68k.mak	(revision 1163)
@@ -0,0 +1,4 @@
+export M_CFLAGS := $(CC_DEF)PJ_M_M68K=1
+export M_CXXFLAGS :=
+export M_LDFLAGS :=
+export M_SOURCES :=
Index: /pjproject/branches/split-3rd-party/build/m-mpc860.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/m-mpc860.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/m-mpc860.mak	(revision 1163)
@@ -0,0 +1,9 @@
+#
+# PowerPC MPC860 specific.
+# It's a PowerPC without floating point support.
+#
+export M_CFLAGS := $(CC_DEF)PJ_M_POWERPC=1 $(CC_DEF)PJ_HAS_FLOATING_POINT=0 -mcpu=860
+export M_CXXFLAGS :=
+export M_LDFLAGS := -mcpu=860
+export M_SOURCES :=
+
Index: /pjproject/branches/split-3rd-party/build/m-powerpc.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/m-powerpc.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/m-powerpc.mak	(revision 1163)
@@ -0,0 +1,4 @@
+export M_CFLAGS := $(CC_DEF)PJ_M_POWERPC=1
+export M_CXXFLAGS :=
+export M_LDFLAGS :=
+export M_SOURCES :=
Index: /pjproject/branches/split-3rd-party/build/m-sparc.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/m-sparc.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/m-sparc.mak	(revision 1163)
@@ -0,0 +1,4 @@
+export M_CFLAGS := $(CC_DEF)PJ_M_SPARC=1
+export M_CXXFLAGS :=
+export M_LDFLAGS :=
+export M_SOURCES :=
Index: /pjproject/branches/split-3rd-party/build/m-x86_64.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/m-x86_64.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/m-x86_64.mak	(revision 1163)
@@ -0,0 +1,4 @@
+export M_CFLAGS := $(CC_DEF)PJ_M_X86_64=1
+export M_CXXFLAGS :=
+export M_LDFLAGS :=
+export M_SOURCES :=
Index: /pjproject/branches/split-3rd-party/build/os-auto.mak.in
===================================================================
--- /pjproject/branches/split-3rd-party/build/os-auto.mak.in	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/os-auto.mak.in	(revision 1163)
@@ -0,0 +1,11 @@
+# @configure_input@
+
+export OS_CFLAGS   := $(CC_DEF)PJ_AUTOCONF=1 @CFLAGS@
+
+export OS_CXXFLAGS := $(CC_DEF)PJ_AUTOCONF=1 @CXXFLAGS@
+
+export OS_LDFLAGS  := @LDFLAGS@ @LIBS@
+
+export OS_SOURCES  := 
+
+
Index: /pjproject/branches/split-3rd-party/build/os-darwinos.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/os-darwinos.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/os-darwinos.mak	(revision 1163)
@@ -0,0 +1,9 @@
+export OS_CFLAGS   := $(CC_DEF)PJ_DARWINOS=1
+
+export OS_CXXFLAGS := 
+
+export OS_LDFLAGS  := $(CC_LIB)pthread$(LIBEXT2) -framework CoreAudio -lm
+
+export OS_SOURCES  := 
+
+
Index: /pjproject/branches/split-3rd-party/build/os-linux-kernel.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/os-linux-kernel.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/os-linux-kernel.mak	(revision 1163)
@@ -0,0 +1,43 @@
+
+include $(KERNEL_DIR)/.config
+
+#
+# Basic kernel compilation flags.
+#
+export OS_CFLAGS   := $(CC_DEF)PJ_LINUX_KERNEL=1 -D__KERNEL__  \
+		      -I$(KERNEL_DIR)/include -iwithprefix include \
+		      -nostdinc -msoft-float
+
+#
+# Additional kernel compilation flags are taken from the kernel Makefile
+# itself.
+#
+
+KERNEL_CFLAGS := \
+    $(shell cd $(KERNEL_DIR) ; \
+    make script SCRIPT='@echo $$(CFLAGS) $$(CFLAGS_MODULE)' $(KERNEL_ARCH))
+
+export OS_CFLAGS += $(KERNEL_CFLAGS)
+
+#		      -DMODULE -I$(KERNEL_DIR)/include  -nostdinc \
+#		      -Wstrict-prototypes \
+#		      -Wno-trigraphs -fno-strict-aliasing -fno-common \
+#		      -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2\
+#		      -fno-builtin-puts -mpreferred-stack-boundary=2 \
+#		      -fno-unit-at-a-time -march=i686 -mregparm=3 \
+#		      -iwithprefix include
+
+#export OS_CFLAGS += -U__i386__ -Ui386 -D__arch_um__ -DSUBARCH=\"i386\" \
+#		    -D_LARGEFILE64_SOURCE -I$(KERNEL_DIR)/arch/um/include \
+#		    -Derrno=kernel_errno \
+#		    -I$(KERNEL_DIR)/arch/um/kernel/tt/include \
+#		    -I$(KERNEL_DIR)/arch/um/kernel/skas/include \
+		    
+
+export OS_CXXFLAGS := 
+
+export OS_LDFLAGS  :=  
+
+export OS_SOURCES  := 
+
+
Index: /pjproject/branches/split-3rd-party/build/os-linux.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/os-linux.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/os-linux.mak	(revision 1163)
@@ -0,0 +1,9 @@
+export OS_CFLAGS   := $(CC_DEF)PJ_LINUX=1
+
+export OS_CXXFLAGS := 
+
+export OS_LDFLAGS  := $(CC_LIB)pthread$(LIBEXT2) -lm
+
+export OS_SOURCES  := 
+
+
Index: /pjproject/branches/split-3rd-party/build/os-palmos.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/os-palmos.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/os-palmos.mak	(revision 1163)
@@ -0,0 +1,32 @@
+#
+# make-mingw.inc: Mingw specific compilation switches.
+#
+PALM_OS_SDK_VER := 0x06000000
+PALM_OS_TARGET_HOST := TARGET_HOST_PALMOS
+PALM_OS_TARGET_PLATFORM := TARGET_PLATFORM_PALMSIM_WIN32
+PALM_OS_BUILD_TYPE := BUILD_TYPE_DEBUG
+PALM_OS_TRACE_OUTPUT := TRACE_OUTPUT_ON
+PALM_OS_CPU_TYPE := CPU_ARM
+
+export CROSS_COMPILE := 
+
+ifeq ($(CC_NAME),gcc)
+	export CFLAGS += -mno-cygwin -fexceptions -frtti
+endif
+
+export OS_CFLAGS   := 	$(CC_DEF)PJ_PALMOS=1 \
+			$(CC_DEF)__PALMOS_KERNEL__=1 \
+			$(CC_DEF)__PALMOS__=$(PALM_OS_SDK_VER) \
+			$(CC_DEF)BUILD_TYPE=$(PALM_OS_BUILD_TYPE) \
+			$(CC_DEF)TRACE_OUTPUT=$(PALM_OS_TRACE_OUTPUT) \
+			$(CC_DEF)_SUPPORTS_NAMESPACE=0 \
+			$(CC_DEF)_SUPPORTS_RTTI=0 \
+			$(CC_DEF)TARGET_HOST=$(PALM_OS_TRAGET_HOST) \
+			$(CC_DEF)TARGET_PLATFORM=$(PALM_OS_TARGET_PLATFORM)
+
+export OS_CXXFLAGS := 
+
+export OS_LDFLAGS  := 
+
+export OS_SOURCES := 
+
Index: /pjproject/branches/split-3rd-party/build/os-rtems.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/os-rtems.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/os-rtems.mak	(revision 1163)
@@ -0,0 +1,17 @@
+#
+# Global OS specific configurations for RTEMS OS.
+#
+# Thanks Zetron, Inc and Phil Torre <ptorre@zetron.com> for donating PJLIB
+# port to RTEMS.
+#
+export RTEMS_DEBUG := -ggdb3 -DRTEMS_DEBUG -DDEBUG -qrtems_debug 
+
+export OS_CFLAGS   := $(CC_DEF)PJ_RTEMS=1 \
+	-B$(RTEMS_LIBRARY_PATH)/lib/ -specs bsp_specs -qrtems
+
+export OS_CXXFLAGS := 
+
+export OS_LDFLAGS  := -B$(RTEMS_LIBRARY_PATH)/lib/ -specs bsp_specs -qrtems  -lm
+
+export OS_SOURCES  := 
+
Index: /pjproject/branches/split-3rd-party/build/os-sunos.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/os-sunos.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/os-sunos.mak	(revision 1163)
@@ -0,0 +1,13 @@
+export OS_CFLAGS   := $(CC_DEF)PJ_SUNOS=1
+
+export OS_CXXFLAGS := 
+
+export OS_LDFLAGS  := $(CC_LIB)pthread$(LIBEXT2) \
+		      $(CC_LIB)socket$(LIBEXT2) \
+		      $(CC_LIB)rt$(LIBEXT2) \
+		      $(CC_LIB)nsl$(LIBEXT2) \
+		      $(CC_LIB)m$(LIBEXT2)
+
+export OS_SOURCES  := 
+
+
Index: /pjproject/branches/split-3rd-party/build/os-win32.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/os-win32.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/os-win32.mak	(revision 1163)
@@ -0,0 +1,12 @@
+export OS_CFLAGS   := $(CC_DEF)PJ_WIN32=1
+
+export OS_CXXFLAGS := 
+
+export OS_LDFLAGS  := $(CC_LIB)wsock32$(LIBEXT2) \
+		      $(CC_LIB)ws2_32$(LIBEXT2)\
+		      $(CC_LIB)ole32$(LIBEXT2)\
+		      $(CC_LIB)m$(LIBEXT2)
+
+export OS_SOURCES  := 
+
+
Index: /pjproject/branches/split-3rd-party/build/rules.mak
===================================================================
--- /pjproject/branches/split-3rd-party/build/rules.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/build/rules.mak	(revision 1163)
@@ -0,0 +1,170 @@
+LIBDIR = ../lib
+BINDIR = ../bin
+
+#
+# The full path of output lib file (e.g. ../lib/libapp.a).
+#
+LIB = $($(APP)_LIB)
+
+#
+# The full path of output executable file (e.g. ../bin/app.exe).
+#
+EXE = $($(APP)_EXE)
+
+#
+# Source directory
+#
+SRCDIR = $($(APP)_SRCDIR)
+
+#
+# Output directory for object files (i.e. output/target)
+#
+OBJDIR = output/$(app)-$(TARGET_NAME)
+
+ifeq ($(OS_NAME),linux-kernel)
+export $(APP)_CFLAGS += -DKBUILD_MODNAME=$(app) -DKBUILD_BASENAME=$(app)
+endif
+
+
+#
+# OBJS is ./output/target/file.o
+#
+OBJS = $(foreach file, $($(APP)_OBJS), $(OBJDIR)/$(file))
+OBJDIRS := $(sort $(dir $(OBJS)))
+
+#
+# FULL_SRCS is ../src/app/file1.c ../src/app/file1.S
+#
+FULL_SRCS = $(foreach file, $($(APP)_OBJS), $(SRCDIR)/$(basename $(file)).c $(SRCDIR)/$(basename $(file)).cpp $(SRCDIR)/$(basename $(file)).S)
+
+#
+# When generating dependency (gcc -MM), ideally we use only either
+# CFLAGS or CXXFLAGS (not both). But I just couldn't make if/ifeq to work.
+#
+DEPFLAGS = $($(APP)_CXXFLAGS) $($(APP)_CFLAGS)
+
+# Dependency file
+DEP_FILE := .$(app)-$(TARGET_NAME).depend
+
+
+print_common:
+	@echo "###"
+	@echo "### DUMPING MAKE VARIABLES (I WON'T DO ANYTHING ELSE):"
+	@echo "###"
+	@echo APP=$(APP)
+	@echo OBJDIR=$(OBJDIR)
+	@echo OBJDIRS=$(OBJDIRS)
+	@echo OBJS=$(OBJS)
+	@echo SRCDIR=$(SRCDIR)
+	@echo FULL_SRCS=$(FULL_SRCS)
+	@echo $(APP)_CFLAGS=$($(APP)_CFLAGS)
+	@echo $(APP)_CXXFLAGS=$($(APP)_CXXFLAGS)
+	@echo $(APP)_LDFLAGS=$($(APP)_LDFLAGS)
+	@echo DEPFLAGS=$(DEPFLAGS)
+
+print_bin: print_common
+	@echo EXE=$(EXE)
+	@echo BINDIR=$(BINDIR)
+
+print_lib: print_common
+	@echo LIB=$(LIB)
+	@echo LIBDIR=$(LIBDIR)
+
+$(LIB): $(LIBDIR) $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP)
+	$(AR)$(LIB) $(OBJS)
+	$(RANLIB) $(LIB)
+
+$(EXE): $(BINDIR) $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP)
+	$(LD) $(LDOUT)$(subst /,$(HOST_PSEP),$(EXE)) \
+	    $(subst /,$(HOST_PSEP),$(OBJS)) $($(APP)_LDFLAGS)
+
+$(OBJDIR)/$(app).o: $(OBJDIRS) $(OBJS)
+	$(CROSS_COMPILE)ld -r -o $@ $(OBJS)
+
+$(OBJDIR)/$(app).ko: $(OBJDIR)/$(app).o
+	@echo Creating kbuild Makefile...
+	@echo "# Our module name:" > $(OBJDIR)/Makefile
+	@echo 'obj-m += $(app).o' >> $(OBJDIR)/Makefile
+	@echo >> $(OBJDIR)/Makefile
+	@echo "# Object members:" >> $(OBJDIR)/Makefile
+	@echo -n '$(app)-objs += ' >> $(OBJDIR)/Makefile
+	@for file in $($(APP)_OBJS); do \
+		echo -n "$$file " >> $(OBJDIR)/Makefile; \
+	done
+	@echo >> $(OBJDIR)/Makefile
+	@echo >> $(OBJDIR)/Makefile
+	@echo "# Prevent .o files to be built by kbuild:" >> $(OBJDIR)/Makefile
+	@for file in $($(APP)_OBJS); do \
+		echo ".PHONY: `pwd`/$(OBJDIR)/$$file" >> $(OBJDIR)/Makefile; \
+	done
+	@echo >> $(OBJDIR)/Makefile
+	@echo all: >> $(OBJDIR)/Makefile
+	@echo -e "\tmake -C $(KERNEL_DIR) M=`pwd`/$(OBJDIR) modules $(KERNEL_ARCH)" >> $(OBJDIR)/Makefile
+	@echo Invoking kbuild...
+	make -C $(OBJDIR)
+
+../lib/$(app).ko: $(LIB) $(OBJDIR)/$(app).ko
+	cp $(OBJDIR)/$(app).ko ../lib
+
+$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.c
+	$(CC) $($(APP)_CFLAGS) \
+		$(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
+		$(subst /,$(HOST_PSEP),$<) 
+
+$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.S
+	$(CC) $($(APP)_CFLAGS) \
+		$(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
+		$(subst /,$(HOST_PSEP),$<) 
+
+$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.cpp
+	$(CC) $($(APP)_CXXFLAGS) \
+		$(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
+		$(subst /,$(HOST_PSEP),$<)
+
+$(OBJDIRS):
+	$(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR)) 
+
+$(LIBDIR):
+	$(subst @@,$(subst /,$(HOST_PSEP),$(LIBDIR)),$(HOST_MKDIR))
+
+$(BINDIR):
+	$(subst @@,$(subst /,$(HOST_PSEP),$(BINDIR)),$(HOST_MKDIR))
+
+clean:
+	$(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)/*),$(HOST_RMR))
+	$(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)),$(HOST_RMDIR))
+ifeq ($(OS_NAME),linux-kernel)
+	rm -f ../lib/$(app).o
+endif
+
+gcov-report:
+	for file in $(FULL_SRCS); do \
+		gcov $$file -n -o $(OBJDIR); \
+	done
+
+realclean: clean
+	$(subst @@,$(subst /,$(HOST_PSEP),$(LIB)) $(subst /,$(HOST_PSEP),$(EXE)),$(HOST_RM))
+	$(subst @@,$(DEP_FILE),$(HOST_RM))
+ifeq ($(OS_NAME),linux-kernel)
+	rm -f ../lib/$(app).ko
+endif
+
+depend:
+	$(subst @@,$(DEP_FILE),$(HOST_RM))
+	for F in $(FULL_SRCS); do \
+	   if test -f $$F; then \
+	     echo "$(OBJDIR)/" | tr -d '\n' >> $(DEP_FILE); \
+	     if $(CC) -M $(DEPFLAGS) $$F | sed '/^#/d' >> $(DEP_FILE); then \
+		true; \
+	     else \
+		echo 'err:' >> $(DEP_FILE); \
+		rm -f $(DEP_FILE); \
+		exit 1; \
+	     fi; \
+	   fi; \
+	done;
+
+dep: depend
+
+-include $(DEP_FILE)
+
Index: /pjproject/branches/split-3rd-party/config.guess
===================================================================
--- /pjproject/branches/split-3rd-party/config.guess	(revision 1163)
+++ /pjproject/branches/split-3rd-party/config.guess	(revision 1163)
@@ -0,0 +1,1317 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+#   Free Software Foundation, Inc.
+
+timestamp='2001-09-04'
+
+# This file 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.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner <bothner@cygnus.com>.
+# Please send patches to <config-patches@gnu.org>.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+
+dummy=dummy-$$
+trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script.
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int dummy(){}" > $dummy.c ;
+	for c in cc gcc c89 ; do
+	  ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
+	  if test $? = 0 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	rm -f $dummy.c $dummy.o $dummy.rel ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# Netbsd (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	# Determine the machine/vendor (is the vendor relevant).
+	case "${UNAME_MACHINE}" in
+	    amiga) machine=m68k-unknown ;;
+	    arm32) machine=arm-unknown ;;
+	    atari*) machine=m68k-atari ;;
+	    sun3*) machine=m68k-sun ;;
+	    mac68k) machine=m68k-apple ;;
+	    macppc) machine=powerpc-apple ;;
+	    hp3[0-9][05]) machine=m68k-hp ;;
+	    ibmrt|romp-ibm) machine=romp-ibm ;;
+	    *) machine=${UNAME_MACHINE}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE}" in
+	    i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit 0 ;;
+    alpha:OSF1:*:*)
+	if test $UNAME_RELEASE = "V4.0"; then
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+	fi
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	cat <<EOF >$dummy.s
+	.data
+\$Lformat:
+	.byte 37,100,45,37,120,10,0	# "%d-%x\n"
+
+	.text
+	.globl main
+	.align 4
+	.ent main
+main:
+	.frame \$30,16,\$26,0
+	ldgp \$29,0(\$27)
+	.prologue 1
+	.long 0x47e03d80 # implver \$0
+	lda \$2,-1
+	.long 0x47e20c21 # amask \$2,\$1
+	lda \$16,\$Lformat
+	mov \$0,\$17
+	not \$1,\$18
+	jsr \$26,printf
+	ldgp \$29,0(\$26)
+	mov 0,\$16
+	jsr \$26,exit
+	.end main
+EOF
+	eval $set_cc_for_build
+	$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
+	if test "$?" = 0 ; then
+		case `./$dummy` in
+			0-0)
+				UNAME_MACHINE="alpha"
+				;;
+			1-0)
+				UNAME_MACHINE="alphaev5"
+				;;
+			1-1)
+				UNAME_MACHINE="alphaev56"
+				;;
+			1-101)
+				UNAME_MACHINE="alphapca56"
+				;;
+			2-303)
+				UNAME_MACHINE="alphaev6"
+				;;
+			2-307)
+				UNAME_MACHINE="alphaev67"
+				;;
+			2-1307)
+				UNAME_MACHINE="alphaev68"
+				;;
+		esac
+	fi
+	rm -f $dummy.s $dummy
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit 0 ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit 0 ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit 0;;
+    amiga:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit 0 ;;
+    arc64:OpenBSD:*:*)
+	echo mips64el-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    arc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hkmips:OpenBSD:*:*)
+	echo mips-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    pmax:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sgi:OpenBSD:*:*)
+	echo mips-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit 0;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit 0;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit 0 ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit 0 ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    i86pc:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit 0 ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit 0 ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    sparc*:NetBSD:*)
+	echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
+    sun3*:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit 0 ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit 0 ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit 0 ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD $dummy.c -o $dummy \
+	  && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit 0 ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit 0 ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit 0 ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit 0 ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit 0 ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit 0 ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit 0 ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit 0 ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit 0 ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+		rm -f $dummy.c $dummy
+		echo rs6000-ibm-aix3.2.5
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit 0 ;;
+    *:AIX:*:[45])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit 0 ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+              case "${HPUX_REV}" in
+                11.[0-9][0-9])
+                  if [ -x /usr/bin/getconf ]; then
+                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                        esac ;;
+                    esac
+                  fi ;;
+              esac
+              if [ "${HP_ARCH}" = "" ]; then
+	      eval $set_cc_for_build
+              sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+	    (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
+	    if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+	    rm -f $dummy.c $dummy
+	fi ;;
+	esac
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	echo unknown-hitachi-hiuxwe2
+	exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit 0 ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit 0 ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit 0 ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit 0 ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit 0 ;;
+    hppa*:OpenBSD:*:*)
+	echo hppa-unknown-openbsd
+	exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*X-MP:*:*:*)
+	echo xmp-cray-unicos
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*T3D:*:*:*)
+	echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY-2:*:*:*)
+	echo cray2-cray-unicos
+        exit 0 ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit 0 ;;
+    hp300:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:FreeBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit 0 ;;
+    *:OpenBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+	exit 0 ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit 0 ;;
+    i*:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit 0 ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i386-pc-interix
+	exit 0 ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit 0 ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit 0 ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    *:GNU:*:*)
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit 0 ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit 0 ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux
+	exit 0 ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    mips:Linux:*:*)
+	case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
+	  big)    echo mips-unknown-linux-gnu && exit 0 ;;
+	  little) echo mipsel-unknown-linux-gnu && exit 0 ;;
+	esac
+	;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit 0 ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit 0 ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit 0 ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    x86_64:Linux:*:*)
+	echo x86_64-unknown-linux-gnu
+	exit 0 ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	ld_supported_targets=`cd /; ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit 0 ;;		
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit 0 ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit 0 ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	cat >$dummy.c <<EOF
+#include <features.h>
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+#ifdef __ELF__
+# ifdef __GLIBC__
+#  if __GLIBC__ >= 2
+    printf ("%s-pc-linux-gnu\n", argv[1]);
+#  else
+    printf ("%s-pc-linux-gnulibc1\n", argv[1]);
+#  endif
+# else
+   printf ("%s-pc-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+  printf ("%s-pc-linux-gnuaout\n", argv[1]);
+#endif
+  return 0;
+}
+EOF
+	$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
+	rm -f $dummy.c $dummy
+	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit 0 ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit 0 ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit 0 ;;
+    i*86:*:5:[78]*)
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit 0 ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit 0 ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit 0 ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit 0 ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit 0 ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit 0 ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit 0 ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit 0 ;;
+    M68*:*:R3V[567]*:*)
+	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit 0 ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit 0 ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit 0 ;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit 0 ;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo hppa1.1-stratus-vos
+	exit 0 ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit 0 ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit 0 ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit 0 ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit 0 ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit 0 ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Darwin:*:*)
+	echo `uname -p`-apple-darwin${UNAME_RELEASE}
+	exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	if test "${UNAME_MACHINE}" = "x86pc"; then
+		UNAME_MACHINE=pc
+	fi
+	echo `uname -p`-${UNAME_MACHINE}-nto-qnx
+	exit 0 ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit 0 ;;
+    NSR-[KW]:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit 0 ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit 0 ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit 0 ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit 0 ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit 0 ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit 0 ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit 0 ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit 0 ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit 0 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
+rm -f $dummy.c $dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit 0 ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit 0 ;;
+    c34*)
+	echo c34-convex-bsd
+	exit 0 ;;
+    c38*)
+	echo c38-convex-bsd
+	exit 0 ;;
+    c4*)
+	echo c4-convex-bsd
+	exit 0 ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
Index: /pjproject/branches/split-3rd-party/config.sub
===================================================================
--- /pjproject/branches/split-3rd-party/config.sub	(revision 1163)
+++ /pjproject/branches/split-3rd-party/config.sub	(revision 1163)
@@ -0,0 +1,1569 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-04-22'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file 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.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| bfin \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| msp430 \
+	| ns16k | ns32k \
+	| openrisc | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| msp430-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+    	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16c)
+		basic_machine=cr16c-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	or32 | or32-*)
+		basic_machine=or32-unknown
+		os=-coff
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+        -os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+        -tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+    c4x-* | tic4x-*)
+        os=-coff
+        ;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-ibm)
+		os=-aix
+		;;
+    	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
Index: /pjproject/branches/split-3rd-party/configure
===================================================================
--- /pjproject/branches/split-3rd-party/configure	(revision 1163)
+++ /pjproject/branches/split-3rd-party/configure	(revision 1163)
@@ -0,0 +1,7 @@
+#!/bin/sh
+./aconfigure $*
+
+# Note:
+# if you're looking for the old configure script, it has been renamed
+# to configure-legacy
+
Index: /pjproject/branches/split-3rd-party/configure-legacy
===================================================================
--- /pjproject/branches/split-3rd-party/configure-legacy	(revision 1163)
+++ /pjproject/branches/split-3rd-party/configure-legacy	(revision 1163)
@@ -0,0 +1,121 @@
+#!/bin/sh
+
+#
+# Detect machine, unless the choice has been made already.
+#
+if [ "$MACHINE" = "" ]; then
+	MACHINE=`uname -m`
+fi	
+
+if echo $MACHINE | grep sun4u > /dev/null; then
+    MACHINE_NAME=sparc
+elif echo $MACHINE | grep i.86 > /dev/null; then
+    MACHINE_NAME=i386
+elif echo $MACHINE | grep x86_64 > /dev/null; then
+    MACHINE_NAME=x86_64
+elif echo $MACHINE | grep alpha > /dev/null; then
+    MACHINE_NAME=alpha
+elif echo $MACHINE | grep Mac > /dev/null; then
+    MACHINE_NAME=powerpc
+else
+    echo "Unable to detect processor type ('uname -m' == '$MACHINE')"
+    exit 1
+fi
+
+#
+# Detect OS and host, unless the choice has been made already
+#
+if [ "$SYSTEM" = "" ]; then
+    SYSTEM=`uname -s`
+fi	
+ 
+
+if echo $SYSTEM | grep -i sunos > /dev/null; then
+    OS_NAME=sunos
+    HOST_NAME=unix
+elif echo $SYSTEM | grep -i linux > /dev/null; then
+    OS_NAME=linux
+    HOST_NAME=unix
+    # More on linux version
+    KERNEL_VER=`uname -r`
+    if echo $KERNEL_VER | grep '^2\.4' > /dev/null; then
+	LINUX_POLL=select
+    elif echo $KERNEL_VER | grep '^2\.2' > /dev/null; then
+	LINUX_POLL=select
+    elif echo $KERNEL_VER | grep '^2\.0' > /dev/null; then
+	LINUX_EPOLL=select
+    else
+#	LINUX_POLL=epoll
+	LINUX_POLL=select
+    fi
+elif echo $SYSTEM | grep -i mingw > /dev/null; then
+    OS_NAME=win32
+    HOST_NAME=mingw
+elif echo $SYSTEM | grep -i cygwin > /dev/null; then
+    OS_NAME=win32
+    HOST_NAME=mingw
+elif echo $SYSTEM | grep -i darwin > /dev/null; then
+    OS_NAME=darwinos
+    HOST_NAME=unix
+elif echo $SYSTEM | grep -i rtems > /dev/null; then
+    OS_NAME=rtems
+    HOST_NAME=unix
+else
+    echo "Unable to detect system type ('uname -s' == '$SYSTEM')"
+    exit 1
+fi
+
+#
+# Detect gcc, unless it has been chosen already
+#
+if [ "$CC_NAME" = "" ]; then
+	if gcc --version 2>&1 > /dev/null; then
+		CC_NAME=gcc
+	else
+		echo "Unable to find gcc"
+		exit 1
+	fi
+fi	
+ 
+
+#
+# Specify TARGET_NAME, if not already choosen.
+#
+if [ "$TARGET_NAME" = "" ]; then
+   TARGET_NAME=$MACHINE_NAME-$OS_NAME-$CC_NAME
+fi
+
+
+if test -f build.mak; then
+  echo 'Saving build.mak --> build.mak.old'
+  cp -f build.mak build.mak.old
+fi
+
+echo 'Writing build.mak as follows:'
+echo " MACHINE_NAME = $MACHINE_NAME"
+echo " OS_NAME      = $OS_NAME"
+echo " HOST_NAME    = $HOST_NAME"
+echo " CC_NAME      = $CC_NAME"
+echo " TARGET_NAME  = $TARGET_NAME"
+echo " CROSS_COMPILE= $CROSS_COMPILE"
+echo " LINUX_POLL   = $LINUX_POLL"
+
+echo "# Auto-generated build.mak" > build.mak
+echo "export MACHINE_NAME := $MACHINE_NAME" >> build.mak
+echo "export OS_NAME := $OS_NAME" >> build.mak
+echo "export HOST_NAME := $HOST_NAME" >> build.mak
+echo "export CC_NAME := $CC_NAME" >> build.mak
+echo "export TARGET_NAME := $TARGET_NAME" >> build.mak
+echo "export CROSS_COMPILE := $CROSS_COMPILE" >> build.mak
+echo "export LINUX_POLL := $LINUX_POLL" >> build.mak
+
+touch user.mak
+
+echo
+echo "The configuration for current host has been written to 'build.mak'."
+echo "Customizations can be put in:"
+echo "  - 'user.mak'"
+echo "  - 'pjlib/include/pj/config_site.h'"
+echo
+echo "Next, run 'make dep && make clean && make'"
+
Index: /pjproject/branches/split-3rd-party/install-sh
===================================================================
--- /pjproject/branches/split-3rd-party/install-sh	(revision 1163)
+++ /pjproject/branches/split-3rd-party/install-sh	(revision 1163)
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd="$cpprog"
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd="$stripprog"
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "install:	no input file specified"
+	exit 1
+else
+	:
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+	
+	if [ -d $dst ]; then
+		instcmd=:
+		chmodcmd=""
+	else
+		instcmd=$mkdirprog
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f "$src" ] || [ -d "$src" ]
+	then
+		:
+	else
+		echo "install:  $src does not exist"
+		exit 1
+	fi
+	
+	if [ x"$dst" = x ]
+	then
+		echo "install:	no destination specified"
+		exit 1
+	else
+		:
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d $dst ]
+	then
+		dst="$dst"/`basename $src`
+	else
+		:
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+	'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp="${pathcomp}${1}"
+	shift
+
+	if [ ! -d "${pathcomp}" ] ;
+        then
+		$mkdirprog "${pathcomp}"
+	else
+		:
+	fi
+
+	pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd $dst &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		dstfile=`basename $dst $transformbasename | 
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		:
+	fi
+
+# Make a temp file name in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd $src $dsttmp &&
+
+	trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
+
+# Now rename the file to the real destination.
+
+	$doit $rmcmd -f $dstdir/$dstfile &&
+	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
Index: /pjproject/branches/split-3rd-party/pjlib-util/build/Makefile
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/build/Makefile	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/build/Makefile	(revision 1163)
@@ -0,0 +1,93 @@
+# By default, the test application includes main.o.
+# OS make file may override this with os-specific files
+export UTIL_TEST_OBJS = main.o
+
+include ../../build/common.mak
+
+RULES_MAK := ../../build/rules.mak
+
+PJLIB_LIB:=../../pjlib/lib/libpj-$(TARGET_NAME)$(LIBEXT)
+export PJLIB_UTIL_LIB:=../lib/libpjlib-util-$(TARGET_NAME)$(LIBEXT)
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC)../include $(CC_INC)../../pjlib/include
+export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
+		   $(HOST_CXXFLAGS) $(CXXFLAGS)
+export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \
+		   $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
+		   $(LDFLAGS) 
+
+###############################################################################
+# Defines for building PJLIB-UTIL library
+#
+export PJLIB_UTIL_SRCDIR = ../src/pjlib-util
+export PJLIB_UTIL_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+		crc32.o errno.o dns.o dns_dump.o getopt.o \
+		hmac_md5.o hmac_sha1.o md5.o resolver.o \
+		scanner.o sha1.o srv_resolver.o string.o stun_simple.o \
+		stun_simple_client.o xml.o
+export PJLIB_UTIL_CFLAGS += $(_CFLAGS)
+
+###############################################################################
+# Defines for building test application
+#
+export UTIL_TEST_SRCDIR = ../src/pjlib-util-test
+export UTIL_TEST_OBJS += xml.o encryption.o stun.o test.o 
+export UTIL_TEST_CFLAGS += $(_CFLAGS)
+export UTIL_TEST_LDFLAGS += $(_LDFLAGS)
+export UTIL_TEST_EXE:=../bin/pjlib-util-test-$(TARGET_NAME)$(HOST_EXE)
+
+	
+export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
+###############################################################################
+# Main entry
+#
+# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
+#
+TARGETS := pjlib-util pjlib-util-test
+
+all: $(TARGETS)
+
+doc:
+	cd .. && doxygen docs/doxygen.cfg
+
+dep: depend
+distclean: realclean
+
+.PHONY: dep depend pjlib pjlib-test clean realclean distclean
+
+pjlib-util:
+	$(MAKE) -f $(RULES_MAK) APP=PJLIB_UTIL app=pjlib-util $(PJLIB_UTIL_LIB)
+
+pjlib-util-test: $(PJLIB_LIB)
+	$(MAKE) -f $(RULES_MAK) APP=UTIL_TEST app=pjlib-util-test $(UTIL_TEST_EXE)
+
+.PHONY: ../lib/pjlib-util.ko
+../lib/pjlib-util.ko:
+	echo Making $@
+	$(MAKE) -f $(RULES_MAK) APP=PJLIB_UTIL app=pjlib-util $@
+
+.PHONY: ../lib/pjlib-util-test.ko
+../lib/pjlib-util-test.ko:
+	$(MAKE) -f $(RULES_MAK) APP=UTIL_TEST app=pjlib-util-test $@
+
+clean:
+	$(MAKE) -f $(RULES_MAK) APP=PJLIB_UTIL app=pjlib-util $@
+	$(MAKE) -f $(RULES_MAK) APP=UTIL_TEST app=pjlib-util-test $@
+
+realclean:
+	$(subst @@,$(subst /,$(HOST_PSEP),.pjlib-util-$(TARGET_NAME).depend),$(HOST_RMR))
+	$(subst @@,$(subst /,$(HOST_PSEP),.pjlib-util-test-$(TARGET_NAME).depend),$(HOST_RMR))
+	$(MAKE) -f $(RULES_MAK) APP=PJLIB_UTIL app=pjlib-util $@
+	$(MAKE) -f $(RULES_MAK) APP=UTIL_TEST app=pjlib-util-test $@
+
+depend:
+	$(MAKE) -f $(RULES_MAK) APP=PJLIB_UTIL app=pjlib-util $@
+	$(MAKE) -f $(RULES_MAK) APP=UTIL_TEST app=pjlib-util-test $@
+	echo '$(TEST_EXE): $(PJLIB_UTIL_LIB)' >> .pjlib-util-test-$(TARGET_NAME).depend; \
+
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/build/os-auto.mak.in
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/build/os-auto.mak.in	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/build/os-auto.mak.in	(revision 1163)
@@ -0,0 +1,3 @@
+# @configure_input@
+export UTIL_TEST_OBJS = @ac_main_obj@
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/build/os-rtems.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/build/os-rtems.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/build/os-rtems.mak	(revision 1163)
@@ -0,0 +1,2 @@
+export UTIL_TEST_OBJS = main_rtems.o
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util.dsp	(revision 1163)
@@ -0,0 +1,248 @@
+# Microsoft Developer Studio Project File - Name="pjlib_util" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=pjlib_util - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib_util.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib_util.mak" CFG="pjlib_util - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjlib_util - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "pjlib_util - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjlib_util - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib-util-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir "./output/pjlib-util-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib-util-i386-win32-vc6-release"
+# PROP Intermediate_Dir "./output/pjlib-util-i386-win32-vc6-release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /GX /Zi /O2 /Ob2 /I "../include" /I "../../pjlib/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjlib-util-i386-win32-vc6-release.lib"
+
+!ELSEIF  "$(CFG)" == "pjlib_util - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib-util-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir "./output/pjlib-util-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib-util-i386-win32-vc6-debug"
+# PROP Intermediate_Dir "./output/pjlib-util-i386-win32-vc6-debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjlib-util-i386-win32-vc6-debug.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjlib_util - Win32 Release"
+# Name "pjlib_util - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\crc32.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\dns.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\dns_dump.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\errno.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\getopt.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\hmac_md5.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\hmac_sha1.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\md5.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\resolver.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\scanner.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\scanner_cis_bitwise.c"
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\scanner_cis_uint.c"
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\sha1.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\srv_resolver.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\string.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\stun_simple.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\stun_simple_client.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\symbols.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util\xml.c"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\config.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\crc32.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\dns.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\errno.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\getopt.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\hmac_md5.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\hmac_sha1.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\md5.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\resolver.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\scanner.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\scanner_cis_bitwise.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\scanner_cis_uint.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\sha1.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\srv_resolver.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\string.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\stun_simple.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\types.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib-util\xml.h"
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util.dsw
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util.dsw	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util.dsw	(revision 1163)
@@ -0,0 +1,71 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "pjlib"="..\..\pjlib\build\pjlib.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib_test"="..\..\pjlib\build\pjlib_test.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib_util"=".\pjlib_util.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib_util_test"=".\pjlib_util_test.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util.vcproj	(revision 1163)
@@ -0,0 +1,667 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjlib_util"
+	ProjectGUID="{D1823239-F34E-4134-8385-3C85FE23C7DD}"
+	RootNamespace="pjlib_util"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="./output/pjlib-util-i386-win32-vc8-release"
+			IntermediateDirectory="./output/pjlib-util-i386-win32-vc8-release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				AdditionalIncludeDirectories="../include,../../pjlib/include"
+				PreprocessorDefinitions="NDEBUG;WIN32;_LIB;PJ_WIN32=1;PJ_M_I386=1"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="./output/pjlib-util-i386-win32-vc8-release/pjlib_util.pch"
+				AssemblerListingLocation="./output/pjlib-util-i386-win32-vc8-release/"
+				ObjectFile="./output/pjlib-util-i386-win32-vc8-release/"
+				ProgramDataBaseFileName="./output/pjlib-util-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib/pjlib-util-i386-win32-vc8-release.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/pjlib-util-i386-win32-vc8-release/pjlib_util.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="./output/pjlib-util-i386-win32-vc8-debug"
+			IntermediateDirectory="./output/pjlib-util-i386-win32-vc8-debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../../pjlib/include"
+				PreprocessorDefinitions="_DEBUG;WIN32;_LIB;PJ_WIN32=1;PJ_M_I386=1"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile="./output/pjlib-util-i386-win32-vc8-debug/pjlib_util.pch"
+				AssemblerListingLocation="./output/pjlib-util-i386-win32-vc8-debug/"
+				ObjectFile="./output/pjlib-util-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName="./output/pjlib-util-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib/pjlib-util-i386-win32-vc8-debug.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/pjlib-util-i386-win32-vc8-debug/pjlib_util.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\pjlib-util\crc32.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\dns.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\dns_dump.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\errno.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\getopt.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\hmac_md5.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\hmac_sha1.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\md5.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\resolver.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\scanner.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\scanner_cis_bitwise.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\scanner_cis_uint.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\sha1.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\srv_resolver.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\string.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\stun_simple.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\stun_simple_client.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\symbols.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util\xml.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\include\pjlib-util\config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\crc32.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\dns.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\errno.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\getopt.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\hmac_md5.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\hmac_sha1.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\md5.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\resolver.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\scanner.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\scanner_cis_bitwise.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\scanner_cis_uint.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\sha1.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\srv_resolver.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\string.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\stun_simple.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\types.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib-util\xml.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util_test.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util_test.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util_test.dsp	(revision 1163)
@@ -0,0 +1,122 @@
+# Microsoft Developer Studio Project File - Name="pjlib_util_test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=pjlib_util_test - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib_util_test.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib_util_test.mak" CFG="pjlib_util_test - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjlib_util_test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "pjlib_util_test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjlib_util_test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib-util-test-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir "./output/pjlib-util-test-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib-util-test-i386-win32-vc6-release"
+# PROP Intermediate_Dir "./output/pjlib-util-test-i386-win32-vc6-release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /GX /O2 /I "../include" /I "../../pjlib/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../bin/pjlib-util-test-i386-win32-vc6-release.exe"
+
+!ELSEIF  "$(CFG)" == "pjlib_util_test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib-util-test-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir "./output/pjlib-util-test-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib-util-test-i386-win32-vc6-debug"
+# PROP Intermediate_Dir "./output/pjlib-util-test-i386-win32-vc6-debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 netapi32.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../bin/pjlib-util-test-i386-win32-vc6-debug.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjlib_util_test - Win32 Release"
+# Name "pjlib_util_test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\src\pjlib-util-test\encryption.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util-test\main.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util-test\stun.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util-test\test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-util-test\xml.c"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\src\pjlib-util-test\test.h"
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util_test.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util_test.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/build/pjlib_util_test.vcproj	(revision 1163)
@@ -0,0 +1,301 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjlib_util_test"
+	ProjectGUID="{ED02BE13-8297-4770-8097-27DC2CCABF9A}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="./output/pjlib-util-test-i386-win32-vc8-release"
+			IntermediateDirectory="./output/pjlib-util-test-i386-win32-vc8-release"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="./output/pjlib-util-test-i386-win32-vc8-release/pjlib_util_test.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include,../../pjlib/include"
+				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;PJ_WIN32=1;PJ_M_I386=1"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="./output/pjlib-util-test-i386-win32-vc8-release/pjlib_util_test.pch"
+				AssemblerListingLocation="./output/pjlib-util-test-i386-win32-vc8-release/"
+				ObjectFile="./output/pjlib-util-test-i386-win32-vc8-release/"
+				ProgramDataBaseFileName="./output/pjlib-util-test-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="netapi32.lib mswsock.lib ws2_32.lib odbc32.lib odbccp32.lib oleaut32.lib ole32.lib"
+				OutputFile="../bin/pjlib-util-test-i386-win32-vc8-release.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				ProgramDatabaseFile="./output/pjlib-util-test-i386-win32-vc8-release/pjlib-util-test-i386-win32-vc8-release.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/pjlib-util-test-i386-win32-vc8-release/pjlib_util_test.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="./output/pjlib-util-test-i386-win32-vc8-debug"
+			IntermediateDirectory="./output/pjlib-util-test-i386-win32-vc8-debug"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="./output/pjlib-util-test-i386-win32-vc8-debug/pjlib_util_test.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../../pjlib/include"
+				PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;PJ_WIN32=1;PJ_M_I386=1"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile="./output/pjlib-util-test-i386-win32-vc8-debug/pjlib_util_test.pch"
+				AssemblerListingLocation="./output/pjlib-util-test-i386-win32-vc8-debug/"
+				ObjectFile="./output/pjlib-util-test-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName="./output/pjlib-util-test-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="netapi32.lib mswsock.lib ws2_32.lib odbc32.lib odbccp32.lib oleaut32.lib ole32.lib"
+				OutputFile="../bin/pjlib-util-test-i386-win32-vc8-debug.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="./output/pjlib-util-test-i386-win32-vc8-debug/pjlib-util-test-i386-win32-vc8-debug.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/pjlib-util-test-i386-win32-vc8-debug/pjlib_util_test.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\pjlib-util-test\encryption.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util-test\main.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util-test\stun.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util-test\test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-util-test\xml.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\src\pjlib-util-test\test.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjlib-util/build/wince-evc4/pjlib_util_wince.vcp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/build/wince-evc4/pjlib_util_wince.vcp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/build/wince-evc4/pjlib_util_wince.vcp	(revision 1163)
@@ -0,0 +1,8577 @@
+# Microsoft eMbedded Visual Tools Project File - Name="pjlib_util_wince" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE x86) Static Library" 0x8304
+# TARGTYPE "Win32 (WCE ARMV4) Static Library" 0xa304
+# TARGTYPE "Win32 (WCE ARMV4I) Static Library" 0xa504
+# TARGTYPE "Win32 (WCE emulator) Static Library" 0xa604
+# TARGTYPE "Win32 (WCE ARMV4T) Static Library" 0xa404
+
+CFG=PJLIB_UTIL_WINCE - WIN32 (WCE EMULATOR) DEBUG
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib_util_wince.vcn".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib_util_wince.vcn" CFG="PJLIB_UTIL_WINCE - WIN32 (WCE EMULATOR) DEBUG"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjlib_util_wince - Win32 (WCE emulator) Release" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjlib_util_wince - Win32 (WCE emulator) Debug" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjlib_util_wince - Win32 (WCE ARMV4I) Release" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjlib_util_wince - Win32 (WCE ARMV4I) Debug" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjlib_util_wince - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjlib_util_wince - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjlib_util_wince - Win32 (WCE ARMV4T) Release" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjlib_util_wince - Win32 (WCE ARMV4T) Debug" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjlib_util_wince - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE "pjlib_util_wince - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project 2
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib-util-emulatorRel"
+# PROP BASE Intermediate_Dir "./output/pjlib-util-emulatorRel"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib-util-emulatorRel"
+# PROP Intermediate_Dir "./output/pjlib-util-emulatorRel"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /D "NDEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib-util-emulatorDbg"
+# PROP BASE Intermediate_Dir "./output/pjlib-util-emulatorDbg"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib-util-emulatorDbg"
+# PROP Intermediate_Dir "./output/pjlib-util-emulatorDbg"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib-util-ARMV4IRel"
+# PROP BASE Intermediate_Dir "./output/pjlib-util-ARMV4IRel"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib-util-ARMV4IRel"
+# PROP Intermediate_Dir "./output/pjlib-util-ARMV4IRel"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /D "ARMV4I" /D "NDEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib-util-ARMV4IDbg"
+# PROP BASE Intermediate_Dir "./output/pjlib-util-ARMV4IDbg"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib-util-ARMV4IDbg"
+# PROP Intermediate_Dir "./output/pjlib-util-ARMV4IDbg"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /D "DEBUG" /D "ARMV4I" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib-util-ARMV4Rel"
+# PROP BASE Intermediate_Dir "./output/pjlib-util-ARMV4Rel"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib-util-ARMV4Rel"
+# PROP Intermediate_Dir "./output/pjlib-util-ARMV4Rel"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /D "NDEBUG" /D "ARMV4" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib-util-ARMV4Dbg"
+# PROP BASE Intermediate_Dir "./output/pjlib-util-ARMV4Dbg"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib-util-ARMV4Dbg"
+# PROP Intermediate_Dir "./output/pjlib-util-ARMV4Dbg"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /D "DEBUG" /D "ARMV4" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib-util-ARMV4TRel"
+# PROP BASE Intermediate_Dir "./output/pjlib-util-ARMV4TRel"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib-util-ARMV4TRel"
+# PROP Intermediate_Dir "./output/pjlib-util-ARMV4TRel"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "NDEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib-util-ARMV4TDbg"
+# PROP BASE Intermediate_Dir "./output/pjlib-util-ARMV4TDbg"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib-util-ARMV4TDbg"
+# PROP Intermediate_Dir "./output/pjlib-util-ARMV4TDbg"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /D "DEBUG" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib-util-X86Rel"
+# PROP BASE Intermediate_Dir "./output/pjlib-util-X86Rel"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib-util-X86Rel"
+# PROP Intermediate_Dir "./output/pjlib-util-X86Rel"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /D "NDEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib-util-X86Dbg"
+# PROP BASE Intermediate_Dir "./output/pjlib-util-X86Dbg"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib-util-X86Dbg"
+# PROP Intermediate_Dir "./output/pjlib-util-X86Dbg"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjlib_util_wince - Win32 (WCE emulator) Release"
+# Name "pjlib_util_wince - Win32 (WCE emulator) Debug"
+# Name "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+# Name "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+# Name "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+# Name "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+# Name "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+# Name "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+# Name "pjlib_util_wince - Win32 (WCE x86) Release"
+# Name "pjlib_util_wince - Win32 (WCE x86) Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\crc32.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_CRC32=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\crc32.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_CRC32=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\crc32.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_CRC32=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\crc32.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_CRC32=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\crc32.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_CRC32=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\crc32.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_CRC32=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\crc32.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_CRC32=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\crc32.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_CRC32=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\crc32.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_CRC32=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\crc32.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_CRC32=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\crc32.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\dns.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_DNS_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_DNS_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_DNS_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_DNS_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_DNS_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_DNS_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_DNS_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_DNS_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_DNS_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_DNS_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\dns_dump.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_DNS_D=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_DNS_D=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_DNS_D=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_DNS_D=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_DNS_D=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_DNS_D=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_DNS_D=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_DNS_D=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_DNS_D=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_DNS_D=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\errno.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\getopt.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_GETOP=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\getopt.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_GETOP=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\getopt.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_GETOP=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\getopt.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_GETOP=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\getopt.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_GETOP=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\getopt.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_GETOP=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\getopt.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_GETOP=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\getopt.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_GETOP=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\getopt.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_GETOP=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\getopt.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_GETOP=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\getopt.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\hmac_md5.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_HMAC_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_HMAC_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_HMAC_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_HMAC_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_HMAC_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_HMAC_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_HMAC_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_HMAC_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_HMAC_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_HMAC_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\hmac_sha1.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_HMAC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\hmac_sha1.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_HMAC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\hmac_sha1.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_HMAC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\hmac_sha1.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_HMAC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\hmac_sha1.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_HMAC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\hmac_sha1.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_HMAC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\hmac_sha1.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_HMAC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\hmac_sha1.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_HMAC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\hmac_sha1.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_HMAC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\hmac_sha1.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_HMAC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\hmac_sha1.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\md5.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+NODEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+NODEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+NODEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+NODEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+NODEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+NODEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+NODEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_MD5_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\md5.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\resolver.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_RESOL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_RESOL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_RESOL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_RESOL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_RESOL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_RESOL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_RESOL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_RESOL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_RESOL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_RESOL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\scanner.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\src\pjlib-util\scanner_cis_bitwise.c"\
+	"..\..\src\pjlib-util\scanner_cis_uint.c"\
+	
+NODEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\types.h"\
+	"..\..\src\pjlib-util\scanner_cis_bitwise.c"\
+	"..\..\src\pjlib-util\scanner_cis_uint.c"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\src\pjlib-util\scanner_cis_bitwise.c"\
+	"..\..\src\pjlib-util\scanner_cis_uint.c"\
+	
+NODEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\src\pjlib-util\scanner_cis_bitwise.c"\
+	"..\..\src\pjlib-util\scanner_cis_uint.c"\
+	
+NODEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\src\pjlib-util\scanner_cis_bitwise.c"\
+	"..\..\src\pjlib-util\scanner_cis_uint.c"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\src\pjlib-util\scanner_cis_bitwise.c"\
+	"..\..\src\pjlib-util\scanner_cis_uint.c"\
+	
+NODEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\src\pjlib-util\scanner_cis_bitwise.c"\
+	"..\..\src\pjlib-util\scanner_cis_uint.c"\
+	
+NODEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\src\pjlib-util\scanner_cis_bitwise.c"\
+	"..\..\src\pjlib-util\scanner_cis_uint.c"\
+	
+NODEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\src\pjlib-util\scanner_cis_bitwise.c"\
+	"..\..\src\pjlib-util\scanner_cis_uint.c"\
+	
+NODEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SCANN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\src\pjlib-util\scanner_cis_bitwise.c"\
+	"..\..\src\pjlib-util\scanner_cis_uint.c"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\sha1.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SHA1_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+NODEP_CPP_SHA1_=\
+	"..\..\src\pjlib-util\config.h"\
+	"..\..\src\pjlib-util\os_types.h"\
+	"..\..\src\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SHA1_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+NODEP_CPP_SHA1_=\
+	"..\..\src\pjlib-util\config.h"\
+	"..\..\src\pjlib-util\os_types.h"\
+	"..\..\src\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SHA1_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+NODEP_CPP_SHA1_=\
+	"..\..\src\pjlib-util\config.h"\
+	"..\..\src\pjlib-util\os_types.h"\
+	"..\..\src\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SHA1_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+NODEP_CPP_SHA1_=\
+	"..\..\src\pjlib-util\config.h"\
+	"..\..\src\pjlib-util\os_types.h"\
+	"..\..\src\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SHA1_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+NODEP_CPP_SHA1_=\
+	"..\..\src\pjlib-util\config.h"\
+	"..\..\src\pjlib-util\os_types.h"\
+	"..\..\src\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SHA1_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+NODEP_CPP_SHA1_=\
+	"..\..\src\pjlib-util\config.h"\
+	"..\..\src\pjlib-util\os_types.h"\
+	"..\..\src\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SHA1_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+NODEP_CPP_SHA1_=\
+	"..\..\src\pjlib-util\config.h"\
+	"..\..\src\pjlib-util\os_types.h"\
+	"..\..\src\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SHA1_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+NODEP_CPP_SHA1_=\
+	"..\..\src\pjlib-util\config.h"\
+	"..\..\src\pjlib-util\os_types.h"\
+	"..\..\src\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SHA1_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+NODEP_CPP_SHA1_=\
+	"..\..\src\pjlib-util\config.h"\
+	"..\..\src\pjlib-util\os_types.h"\
+	"..\..\src\pjlib-util\sha1.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SHA1_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\sha1.h"\
+	
+NODEP_CPP_SHA1_=\
+	"..\..\src\pjlib-util\config.h"\
+	"..\..\src\pjlib-util\os_types.h"\
+	"..\..\src\pjlib-util\sha1.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\srv_resolver.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SRV_R=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	"..\..\include\pjlib-util\srv_resolver.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SRV_R=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	"..\..\include\pjlib-util\srv_resolver.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SRV_R=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	"..\..\include\pjlib-util\srv_resolver.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SRV_R=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	"..\..\include\pjlib-util\srv_resolver.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SRV_R=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	"..\..\include\pjlib-util\srv_resolver.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SRV_R=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	"..\..\include\pjlib-util\srv_resolver.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SRV_R=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	"..\..\include\pjlib-util\srv_resolver.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SRV_R=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	"..\..\include\pjlib-util\srv_resolver.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SRV_R=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	"..\..\include\pjlib-util\srv_resolver.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SRV_R=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\dns.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\resolver.h"\
+	"..\..\include\pjlib-util\srv_resolver.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\string.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\string.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\string.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\string.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\string.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\string.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\string.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\string.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\string.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\string.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\string.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\stun_simple.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\stun_simple_client.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\errno.h"\
+	"..\..\include\pjlib-util\stun_simple.h"\
+	"..\..\include\pjlib-util\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-util\xml.c"
+
+!IF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\xml.h"\
+	
+NODEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\config.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\types.h"\
+	"..\..\include\pjlib-util\xml.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\xml.h"\
+	
+NODEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\xml.h"\
+	
+NODEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\xml.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\xml.h"\
+	
+NODEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\xml.h"\
+	
+NODEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\xml.h"\
+	
+NODEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\xml.h"\
+	
+NODEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_util_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_XML_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjlib-util\scanner.h"\
+	"..\..\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\include\pjlib-util\xml.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\config.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\crc32.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\dns.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\errno.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\getopt.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\hmac_md5.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\hmac_sha1.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\md5.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\resolver.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\scanner.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\scanner_cis_bitwise.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\scanner_cis_uint.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\sha1.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\srv_resolver.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\string.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\stun_simple.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\types.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjlib-util\xml.h"
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjlib-util/build/wince-evc4/pjlib_util_wince.vcw
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/build/wince-evc4/pjlib_util_wince.vcw	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/build/wince-evc4/pjlib_util_wince.vcw	(revision 1163)
@@ -0,0 +1,41 @@
+Microsoft eMbedded Visual Tools Workspace File, Format Version 4.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "pjlib_util_wince"=".\pjlib_util_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib_wince"="..\..\..\..\pjlib\build\wince-evc4\pjlib_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/docs/doxygen.cfg
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/docs/doxygen.cfg	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/docs/doxygen.cfg	(revision 1163)
@@ -0,0 +1,1047 @@
+# Doxyfile 1.3-rc3
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           =  "PJLIB-UTIL Reference"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = docs
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, 
+# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en 
+# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese, 
+# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these class will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
+# members of a class in the documentation of that class as if those members were 
+# ordinary class members. Constructors, destructors and assignment operators of 
+# the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. It is allowed to use relative paths in the argument list.
+
+STRIP_FROM_PATH        = "c:\project\pjproject"
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower case letters. If set to YES upper case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# users are adviced to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments  will behave just like the Qt-style comments (thus requiring an 
+# explict @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = YES
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# reimplements.
+
+INHERIT_DOCS           = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consist of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
+# only. Doxygen will then generate output that is more tailored for C. 
+# For instance some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
+# only. Doxygen will then generate output that is more tailored for Java. 
+# For instance namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  =  include/pjlib-util
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
+# *.h++ *.idl *.odl
+
+FILE_PATTERNS          = *.h *.c
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories.
+
+EXCLUDE_PATTERNS       = "*_i.h" "*/compat/*"
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = .
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = YES
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.
+
+INPUT_FILTER           = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .htm
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = docs/header.html
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = docs/footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet
+
+HTML_STYLESHEET        = docs/doxygen.css
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output dir.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non empty doxygen will try to run 
+# the html help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the Html help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimised for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assigments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_XML           = NO
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed.
+
+PREDEFINED             = PJ_DECL(x)=x PJ_DEF(x)=x PJ_IDECL(x)=x \
+			 PJ_IDEF(x)=x PJ_INLINE(x)=x \
+			 PJ_DECL_NO_RETURN(x)=x \
+			 PJ_HAS_HIGH_RES_TIMER=1 \
+			 PJ_LOG_MAX_LEVEL=4 \
+			 PJ_HAS_SEMAPHORE=1 \
+			 PJ_HAS_EVENT_OBJ=1
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse the 
+# parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tagfiles.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or 
+# super classes. Setting the tag to NO turns the diagrams off. Note that this 
+# option is superceded by the HAVE_DOT option below. This is only a fallback. It is 
+# recommended to install and use dot, since it yield more powerful graphs.
+
+CLASS_DIAGRAMS         = NO
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_WIDTH    = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT   = 1024
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermedate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
+
+# The CGI_NAME tag should be the name of the CGI script that 
+# starts the search engine (doxysearch) with the correct parameters. 
+# A script with this name will be generated by doxygen.
+
+#CGI_NAME               = search.cgi
+
+# The CGI_URL tag should be the absolute URL to the directory where the 
+# cgi binaries are located. See the documentation of your http daemon for 
+# details.
+
+#CGI_URL                = 
+
+# The DOC_URL tag should be the absolute URL to the directory where the 
+# documentation is located. If left blank the absolute path to the 
+# documentation, with file:// prepended to it, will be used.
+
+#DOC_URL                = 
+
+# The DOC_ABSPATH tag should be the absolute path to the directory where the 
+# documentation is located. If left blank the directory on the local machine 
+# will be used.
+
+#DOC_ABSPATH            = 
+
+# The BIN_ABSPATH tag must point to the directory where the doxysearch binary 
+# is installed.
+
+#BIN_ABSPATH            = /usr/local/bin/
+
+# The EXT_DOC_PATHS tag can be used to specify one or more paths to 
+# documentation generated for other projects. This allows doxysearch to search 
+# the documentation for these projects as well.
+
+#EXT_DOC_PATHS          = 
Index: /pjproject/branches/split-3rd-party/pjlib-util/docs/doxygen.css
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/docs/doxygen.css	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/docs/doxygen.css	(revision 1163)
@@ -0,0 +1,305 @@
+BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+BODY,TD {
+       font-size: 80%;
+}
+CODE {
+	font-size: 120%;
+       font-family: monospace;
+}
+.fragment, pre {
+	font-size: 110%;
+       font-family: monospace;
+}
+H1 {
+	text-align: center;
+       font-size: 240%;
+}
+H2 {
+       	font-size: 200%;
+	margin-top     : 60px;
+}
+H3 {
+       font-size: 160%;
+}
+H4 {
+       font-size: 120%;
+}
+CAPTION { font-weight: bold }
+DIV.qindex {
+	width: 100%;
+	background-color: #eeeeff;
+	border: 1px solid #b0b0b0;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 140%;
+}
+DIV.nav {
+	width: 100%;
+	background-color: #eeeeff;
+	border: 1px solid #b0b0b0;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 140%;
+}
+A.qindex {
+       text-decoration: none;
+       font-size: 120%;
+       color: #1A419D;
+}
+A.qindex:visited {
+       text-decoration: none;
+       color: #1A419D
+}
+A.qindex:hover {
+	text-decoration: none;
+	background-color: #ddddff;
+}
+A.qindexHL {
+	text-decoration: none;
+	font-weight: bold;
+	background-color: #6666cc;
+	color: #ffffff;
+	border: 1px double #9295C2;
+}
+A.qindexHL:hover {
+	text-decoration: none;
+	background-color: #6666cc;
+	color: #ffffff;
+}
+A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
+A.el { text-decoration: none; font-weight: bold }
+A.elRef { font-weight: bold }
+A.code:link { text-decoration: none; font-weight: normal; color: #0000FF; }
+A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
+A.codeRef:link { font-weight: normal; color: #0000FF}
+A.codeRef:visited { font-weight: normal; color: #0000FF}
+A:hover { text-decoration: none; background-color: #f2f2ff }
+DL.el { margin-left: -1cm }
+PRE.fragment {
+	border: 1px solid #CCCCCC;
+	background-color: #f5f5f5;
+	margin-top: 4px;
+	margin-bottom: 4px;
+	margin-left: 2px;
+	margin-right: 8px;
+	padding-left: 6px;
+	padding-right: 6px;
+	padding-top: 4px;
+	padding-bottom: 4px;
+}
+DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
+TD.md { background-color: #F4F4FB; font-weight: bold; }
+TD.mdPrefix {
+       background-color: #F4F4FB;
+       color: #606060;
+	font-size: 80%;
+}
+TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
+TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
+DIV.groupHeader {
+       margin-left: 16px;
+       margin-top: 12px;
+       margin-bottom: 6px;
+       font-weight: bold;
+}
+DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
+BODY {
+	background: white;
+	color: black;
+	margin-right: 20px;
+	margin-left: 20px;
+}
+TD.indexkey {
+	background-color: #eeeeff;
+	font-weight: bold;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TD.indexvalue {
+	background-color: #eeeeff;
+	font-style: italic;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TR.memlist {
+   background-color: #f0f0f0; 
+}
+P.formulaDsp { text-align: center; }
+IMG.formulaDsp { }
+IMG.formulaInl { vertical-align: middle; }
+SPAN.keyword       { color: #008000 }
+SPAN.keywordtype   { color: #604020 }
+SPAN.keywordflow   { color: #e08000 }
+SPAN.comment       { color: #800000 }
+SPAN.preprocessor  { color: #806020 }
+SPAN.stringliteral { color: #002080 }
+SPAN.charliteral   { color: #008080 }
+.mdTable {
+	border: 1px solid #868686;
+	background-color: #F4F4FB;
+}
+.mdRow {
+	padding: 8px 10px;
+}
+.mdescLeft {
+       padding: 0px 8px 4px 8px;
+	font-size: 80%;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.mdescRight {
+       padding: 0px 8px 4px 8px;
+	font-size: 80%;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.memItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: none;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: none;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplParams {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+       color: #606060;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.search     { color: #003399;
+              font-weight: bold;
+}
+FORM.search {
+              margin-bottom: 0px;
+              margin-top: 0px;
+}
+INPUT.search { font-size: 75%;
+               color: #000080;
+               font-weight: normal;
+               background-color: #eeeeff;
+}
+TD.tiny      { font-size: 75%;
+}
+a {
+	color: #252E78;
+}
+a:visited {
+	color: #3D2185;
+}
+.dirtab { padding: 4px;
+          border-collapse: collapse;
+          border: 1px solid #b0b0b0;
+}
+TH.dirtab { background: #eeeeff;
+            font-weight: bold;
+}
+HR { height: 1px;
+     border: none;
+     border-top: 1px solid black;
+}
Index: /pjproject/branches/split-3rd-party/pjlib-util/docs/footer.html
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/docs/footer.html	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/docs/footer.html	(revision 1163)
@@ -0,0 +1,11 @@
+<p>&nbsp;</p>
+<hr><center>
+PJLIB-UTIL Open Source, small footprint, and portable asynchronous/caching DNS resolver, text scanner, STUN client, and XML library<br>
+(C)2001-2007 Benny Prijono
+</center>
+
+
+<!--#include virtual="/footer.html" -->
+
+</BODY>
+</HTML>
Index: /pjproject/branches/split-3rd-party/pjlib-util/docs/header.html
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/docs/header.html	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/docs/header.html	(revision 1163)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>$title</title>
+<link href="/style/style.css" rel="stylesheet" type="text/css">
+</head><body>
+	<!--#include virtual="/header.html" -->
+	<p><A HREF="/">Home</A> --&gt; <A HREF="/docs.htm">Documentations</A> --&gt; PJLIB-UTIL Reference</p>
+
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util.h	(revision 1163)
@@ -0,0 +1,77 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 __PJLIB_UTIL_H__
+#define __PJLIB_UTIL_H__
+
+/**
+ * @file pjlib-util.h
+ * @brief pjlib-util.h
+ */
+
+/* Base */
+#include <pjlib-util/errno.h>
+#include <pjlib-util/types.h>
+
+/* Getopt */
+#include <pjlib-util/getopt.h>
+
+/* Crypto */
+#include <pjlib-util/crc32.h>
+#include <pjlib-util/hmac_md5.h>
+#include <pjlib-util/hmac_sha1.h>
+#include <pjlib-util/md5.h>
+#include <pjlib-util/sha1.h>
+
+/* DNS and resolver */
+#include <pjlib-util/dns.h>
+#include <pjlib-util/resolver.h>
+#include <pjlib-util/srv_resolver.h>
+
+/* Text scanner */
+#include <pjlib-util/scanner.h>
+
+/* XML */
+#include <pjlib-util/xml.h>
+
+/* Old STUN */
+#include <pjlib-util/stun_simple.h>
+
+/**
+ * @addtogroup PJLIB_UTIL
+ * @{
+ */
+
+PJ_BEGIN_DECL
+
+/**
+ * Initialize PJLIB UTIL (defined in errno.c)
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjlib_util_init(void);
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJLIB_UTIL_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/config.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/config.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/config.h	(revision 1163)
@@ -0,0 +1,246 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJLIB_UTIL_CONFIG_H__
+#define __PJLIB_UTIL_CONFIG_H__
+
+
+/**
+ * @file config.h
+ * @brief Compile time settings
+ */
+
+/**
+ * @defgroup PJLIB_UTIL_CONFIG PJLIB-UTIL Configuration
+ * @ingroup PJLIB_UTIL
+ * @{
+ */
+
+
+/* **************************************************************************
+ * DNS CONFIGURATION
+ */
+
+/**
+ * This constant specifies the maximum names to keep in the temporary name
+ * table when performing name compression scheme when duplicating DNS packet
+ * (the #pj_dns_packet_dup() function).
+ *
+ * Generally name compression is desired, since it saves some memory (see
+ * PJ_DNS_RESOLVER_RES_BUF_SIZE setting). However it comes at the expense of 
+ * a little processing overhead to perform name scanning and also a little
+ * bit more stack usage (8 bytes per entry on 32bit platform).
+ *
+ * Default: 16
+ */
+#ifndef PJ_DNS_MAX_NAMES_IN_NAMETABLE
+#   define PJ_DNS_MAX_NAMES_IN_NAMETABLE	    16
+#endif
+
+
+/* **************************************************************************
+ * RESOLVER CONFIGURATION
+ */
+
+
+/**
+ * Maximum numbers of DNS nameservers that can be configured in resolver.
+ */
+#ifndef PJ_DNS_RESOLVER_MAX_NS
+#   define PJ_DNS_RESOLVER_MAX_NS		    16
+#endif
+
+
+/**
+ * Default retransmission delay, in miliseconds. The combination of 
+ * retransmission delay and count determines the query timeout.
+ *
+ * Default: 2000 (2 seconds, according to RFC 1035)
+ */
+#ifndef PJ_DNS_RESOLVER_QUERY_RETRANSMIT_DELAY
+#   define PJ_DNS_RESOLVER_QUERY_RETRANSMIT_DELAY   2000
+#endif
+
+
+/**
+ * Maximum number of transmissions before timeout is declared for
+ * the query.
+ *
+ * Default: 5
+ */
+#ifndef PJ_DNS_RESOLVER_QUERY_RETRANSMIT_COUNT
+#   define PJ_DNS_RESOLVER_QUERY_RETRANSMIT_COUNT   5
+#endif
+
+
+/**
+ * Maximum life-time of DNS response in the resolver response cache, 
+ * in seconds. If the value is zero, then DNS response caching will be 
+ * disabled.
+ *
+ * Default is 300 seconds (5 minutes).
+ *
+ * @see PJ_DNS_RESOLVER_INVALID_TTL
+ */
+#ifndef PJ_DNS_RESOLVER_MAX_TTL
+#   define PJ_DNS_RESOLVER_MAX_TTL		    (5*60)
+#endif
+
+/**
+ * The life-time of invalid DNS response in the resolver response cache.
+ * An invalid DNS response is a response which RCODE is non-zero and 
+ * response without any answer section. These responses can be put in 
+ * the cache too to minimize message round-trip.
+ *
+ * Default: 60 (one minute).
+ *
+ * @see PJ_DNS_RESOLVER_MAX_TTL
+ */
+#ifndef PJ_DNS_RESOLVER_INVALID_TTL
+#   define PJ_DNS_RESOLVER_INVALID_TTL		    60
+#endif
+
+/**
+ * The interval on which nameservers which are known to be good to be 
+ * probed again to determine whether they are still good. Note that
+ * this applies to both active nameserver (the one currently being used)
+ * and idle nameservers (good nameservers that are not currently selected).
+ * The probing to query the "goodness" of nameservers involves sending
+ * the same query to multiple servers, so it's probably not a good idea
+ * to send this probing too often.
+ *
+ * Default: 600 (ten minutes)
+ *
+ * @see PJ_DNS_RESOLVER_BAD_NS_TTL
+ */
+#ifndef PJ_DNS_RESOLVER_GOOD_NS_TTL
+#   define PJ_DNS_RESOLVER_GOOD_NS_TTL		    (10*60)
+#endif
+
+/**
+ * The interval on which nameservers which known to be bad to be probed
+ * again to determine whether it is still bad.
+ *
+ * Default: 60 (one minute)
+ *
+ * @see PJ_DNS_RESOLVER_GOOD_NS_TTL
+ */
+#ifndef PJ_DNS_RESOLVER_BAD_NS_TTL
+#   define PJ_DNS_RESOLVER_BAD_NS_TTL		    (1*60)
+#endif
+
+
+/**
+ * Maximum size of UDP packet. RFC 1035 states that maximum size of
+ * DNS packet carried over UDP is 512 bytes.
+ *
+ * Default: 512 byes
+ */
+#ifndef PJ_DNS_RESOLVER_MAX_UDP_SIZE
+#   define PJ_DNS_RESOLVER_MAX_UDP_SIZE		    512
+#endif
+
+
+/**
+ * Size of memory pool allocated for each individual DNS response cache.
+ * This value here should be more or less the same as maximum UDP packet
+ * size (PJ_DNS_RESOLVER_MAX_UDP_SIZE), since the DNS replicator function
+ * (#pj_dns_packet_dup()) is also capable of performing name compressions.
+ *
+ * Default: 512 (as a broad guidance, 400 is good for 4 SRV entries).
+ */
+#ifndef PJ_DNS_RESOLVER_RES_BUF_SIZE
+#   define PJ_DNS_RESOLVER_RES_BUF_SIZE		    512
+#endif
+
+
+/**
+ * Size of temporary pool buffer for parsing DNS packets in resolver.
+ *
+ * default: 4000
+ */
+#ifndef PJ_DNS_RESOLVER_TMP_BUF_SIZE
+#   define PJ_DNS_RESOLVER_TMP_BUF_SIZE		    4000
+#endif
+
+
+/* **************************************************************************
+ * SCANNER CONFIGURATION
+ */
+
+
+/**
+ * Macro PJ_SCANNER_USE_BITWISE is defined and non-zero (by default yes)
+ * will enable the use of bitwise for character input specification (cis).
+ * This would save several kilobytes of .bss memory in the SIP parser.
+ */
+#ifndef PJ_SCANNER_USE_BITWISE
+#  define PJ_SCANNER_USE_BITWISE		    1
+#endif
+
+
+
+/* **************************************************************************
+ * STUN CLIENT CONFIGURATION
+ */
+
+/**
+ * Maximum number of attributes in the STUN packet (for the old STUN
+ * library).
+ *
+ * Default: 16
+ */
+#ifndef PJSTUN_MAX_ATTR
+#   define PJSTUN_MAX_ATTR			    16
+#endif
+
+
+/**
+ * Maximum number of attributes in the STUN packet (for the new STUN
+ * library).
+ *
+ * Default: 16
+ */
+#ifndef PJ_STUN_MAX_ATTR
+#   define PJ_STUN_MAX_ATTR			    16
+#endif
+
+
+/* **************************************************************************
+ * ENCRYPTION
+ */
+
+/**
+ * Specifies whether CRC32 algorithm should use the table based lookup table
+ * for faster calculation, at the expense of about 1KB table size on the
+ * executable. If zero, the CRC32 will use non-table based which is more than
+ * an order of magnitude slower.
+ *
+ * Default: 1
+ */
+#ifndef PJ_CRC32_HAS_TABLES
+#   define PJ_CRC32_HAS_TABLES			    1
+#endif
+
+
+/**
+ * @}
+ */
+
+#endif	/* __PJLIB_UTIL_CONFIG_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/crc32.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/crc32.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/crc32.h	(revision 1163)
@@ -0,0 +1,95 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __PJLIB_UTIL_CRC32_H__
+#define __PJLIB_UTIL_CRC32_H__
+
+/**
+ * @file crc32.h
+ * @brief CRC32 implementation
+ */
+
+#include <pjlib-util/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJLIB_UTIL_CRC32 CRC32 (Cyclic Redundancy Check)
+ * @ingroup PJLIB_UTIL_ENCRYPTION
+ * @{
+ * This implements CRC32 algorithm. See ITU-T V.42 for the formal 
+ * specification.
+ */
+
+/** CRC32 context. */
+typedef struct pj_crc32_context
+{
+    pj_uint32_t	crc_state;	/**< Current state. */
+} pj_crc32_context;
+
+
+/**
+ * Initialize CRC32 context.
+ *
+ * @param ctx	    CRC32 context.
+ */
+PJ_DECL(void) pj_crc32_init(pj_crc32_context *ctx);
+
+/**
+ * Feed data incrementally to the CRC32 algorithm.
+ *
+ * @param ctx	    CRC32 context.
+ * @param data	    Input data.
+ * @param nbytes    Length of the input data.
+ *
+ * @return	    The current CRC32 value.
+ */
+PJ_DECL(pj_uint32_t) pj_crc32_update(pj_crc32_context *ctx, 
+				     const pj_uint8_t *data,
+				     pj_size_t nbytes);
+
+/**
+ * Finalize CRC32 calculation and retrieve the CRC32 value.
+ *
+ * @param ctx	    CRC32 context.
+ *
+ * @return	    The current CRC value.
+ */
+PJ_DECL(pj_uint32_t) pj_crc32_final(pj_crc32_context *ctx);
+
+/**
+ * Perform one-off CRC32 calculation to the specified data.
+ *
+ * @param data	    Input data.
+ * @param nbytes    Length of input data.
+ *
+ * @return	    CRC value of the data.
+ */
+PJ_DECL(pj_uint32_t) pj_crc32_calc(const pj_uint8_t *data,
+				   pj_size_t nbytes);
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJLIB_UTIL_CRC32_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/dns.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/dns.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/dns.h	(revision 1163)
@@ -0,0 +1,382 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJLIB_UTIL_DNS_H__
+#define __PJLIB_UTIL_DNS_H__
+
+
+/**
+ * @file dns.h
+ * @brief Low level DNS message parsing and packetization.
+ */
+#include <pjlib-util/types.h>
+#include <pj/sock.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_DNS DNS and Asynchronous DNS Resolver
+ * @ingroup PJLIB_UTIL
+ */
+
+/**
+ * @defgroup PJ_DNS_PARSING Low-level DNS Message Parsing and Packetization
+ * @ingroup PJ_DNS
+ * @{
+ *
+ * This module provides low-level services to parse and packetize DNS queries
+ * and responses. The functions support building a DNS query packet and parse
+ * the data in the DNS response.
+ *
+ * To create a DNS query packet, application should call #pj_dns_make_query()
+ * function, specifying the desired DNS query type, the name to be resolved,
+ * and the buffer where the DNS packet will be built into. 
+ *
+ * When incoming DNS query or response packet arrives, application can use
+ * #pj_dns_parse_packet() to parse the TCP/UDP payload into parsed DNS packet
+ * structure.
+ *
+ * This module does not provide any networking functionalities to send or
+ * receive DNS packets. This functionality should be provided by higher layer
+ * modules such as @ref PJ_DNS_RESOLVER.
+ */
+
+enum
+{
+    PJ_DNS_CLASS_IN	= 1	/**< DNS class IN.			    */
+};
+
+/**
+ * This enumeration describes standard DNS record types as described by
+ * RFC 1035, RFC 2782, and others.
+ */
+typedef enum pj_dns_type
+{
+    PJ_DNS_TYPE_A	= 1,    /**< Host address (A) record.		    */
+    PJ_DNS_TYPE_NS	= 2,    /**< Authoritative name server (NS)	    */
+    PJ_DNS_TYPE_MD	= 3,    /**< Mail destination (MD) record.	    */
+    PJ_DNS_TYPE_MF	= 4,    /**< Mail forwarder (MF) record.	    */
+    PJ_DNS_TYPE_CNAME	= 5,	/**< Canonical name (CNAME) record.	    */
+    PJ_DNS_TYPE_SOA	= 6,    /**< Marks start of zone authority.	    */
+    PJ_DNS_TYPE_MB	= 7,    /**< Mailbox domain name (MB).		    */
+    PJ_DNS_TYPE_MG	= 8,    /**< Mail group member (MG).		    */
+    PJ_DNS_TYPE_MR	= 9,    /**< Mail rename domain name.		    */
+    PJ_DNS_TYPE_NULL	= 10,	/**< NULL RR.				    */
+    PJ_DNS_TYPE_WKS	= 11,	/**< Well known service description	    */
+    PJ_DNS_TYPE_PTR	= 12,	/**< Domain name pointer.		    */
+    PJ_DNS_TYPE_HINFO	= 13,	/**< Host information.			    */
+    PJ_DNS_TYPE_MINFO	= 14,	/**< Mailbox or mail list information.	    */
+    PJ_DNS_TYPE_MX	= 15,	/**< Mail exchange record.		    */
+    PJ_DNS_TYPE_TXT	= 16,	/**< Text string.			    */
+    PJ_DNS_TYPE_RP	= 17,	/**< Responsible person.		    */
+    PJ_DNS_TYPE_AFSB	= 18,	/**< AFS cell database.			    */
+    PJ_DNS_TYPE_X25	= 19,	/**< X.25 calling address.		    */
+    PJ_DNS_TYPE_ISDN	= 20,	/**< ISDN calling address.		    */
+    PJ_DNS_TYPE_RT	= 21,	/**< Router.				    */
+    PJ_DNS_TYPE_NSAP	= 22,	/**< NSAP address.			    */
+    PJ_DNS_TYPE_NSAP_PTR= 23,	/**< NSAP reverse address.		    */
+    PJ_DNS_TYPE_SIG	= 24,	/**< Signature.				    */
+    PJ_DNS_TYPE_KEY	= 25,	/**< Key.				    */
+    PJ_DNS_TYPE_PX	= 26,	/**< X.400 mail mapping.		    */
+    PJ_DNS_TYPE_GPOS	= 27,	/**< Geographical position (withdrawn)	    */
+    PJ_DNS_TYPE_AAAA	= 28,	/**< IPv6 address.			    */
+    PJ_DNS_TYPE_LOC	= 29,	/**< Location.				    */
+    PJ_DNS_TYPE_NXT	= 30,	/**< Next valid name in the zone.	    */
+    PJ_DNS_TYPE_EID	= 31,	/**< Endpoint idenfitier.		    */
+    PJ_DNS_TYPE_NIMLOC	= 32,	/**< Nimrod locator.			    */
+    PJ_DNS_TYPE_SRV	= 33,	/**< Server selection (SRV) record.	    */
+    PJ_DNS_TYPE_ATMA	= 34,	/**< DNS ATM address record.		    */
+    PJ_DNS_TYPE_NAPTR	= 35,	/**< DNS Naming authority pointer record.   */
+    PJ_DNS_TYPE_KX	= 36,	/**< DNS key exchange record.		    */
+    PJ_DNS_TYPE_CERT	= 37,	/**< DNS certificate record.		    */
+    PJ_DNS_TYPE_A6	= 38,	/**< DNS IPv6 address (experimental)	    */
+    PJ_DNS_TYPE_DNAME	= 39,	/**< DNS non-terminal name redirection rec. */
+
+    PJ_DNS_TYPE_OPT	= 41,	/**< DNS options - contains EDNS metadata.  */
+    PJ_DNS_TYPE_APL	= 42,	/**< DNS Address Prefix List (APL) record.  */
+    PJ_DNS_TYPE_DS	= 43,	/**< DNS Delegation Signer (DS)		    */
+    PJ_DNS_TYPE_SSHFP	= 44,	/**< DNS SSH Key Fingerprint		    */
+    PJ_DNS_TYPE_IPSECKEY= 45,	/**< DNS IPSEC Key.			    */
+    PJ_DNS_TYPE_RRSIG	= 46,	/**< DNS Resource Record signature.	    */
+    PJ_DNS_TYPE_NSEC	= 47,	/**< DNS Next Secure Name.		    */
+    PJ_DNS_TYPE_DNSKEY	= 48	/**< DNSSEC Key.			    */
+} pj_dns_type;
+
+
+
+/**
+ * Standard DNS header, according to RFC 1035, which will be present in
+ * both DNS query and DNS response. 
+ *
+ * Note that all values seen by application would be in
+ * host by order. The library would convert them to network
+ * byte order as necessary.
+ */
+typedef struct pj_dns_hdr
+{
+    pj_uint16_t  id;	    /**< Transaction ID.	    */
+    pj_uint16_t  flags;	    /**< Flags.			    */
+    pj_uint16_t  qdcount;   /**< Nb. of queries.	    */
+    pj_uint16_t  anscount;  /**< Nb. of res records	    */
+    pj_uint16_t  nscount;   /**< Nb. of NS records.	    */
+    pj_uint16_t  arcount;   /**< Nb. of additional records  */
+} pj_dns_hdr;
+
+/** Create RCODE flag */
+#define PJ_DNS_SET_RCODE(c)	((pj_uint16_t)((c) & 0x0F))
+
+/** Create RA (Recursion Available) bit */
+#define PJ_DNS_SET_RA(on)	((pj_uint16_t)((on) << 7))
+
+/** Create RD (Recursion Desired) bit */
+#define PJ_DNS_SET_RD(on)	((pj_uint16_t)((on) << 8))
+
+/** Create TC (Truncated) bit */
+#define PJ_DNS_SET_TC(on)	((pj_uint16_t)((on) << 9))
+
+/** Create AA (Authoritative Answer) bit */
+#define PJ_DNS_SET_AA(on)	((pj_uint16_t)((on) << 10))
+
+/** Create four bits opcode */
+#define PJ_DNS_SET_OPCODE(o)	((pj_uint16_t)((o)  << 11))
+
+/** Create query/response bit */
+#define PJ_DNS_SET_QR(on)	((pj_uint16_t)((on) << 15))
+
+
+/** Get RCODE value */
+#define PJ_DNS_GET_RCODE(val)	(((val) & PJ_DNS_SET_RCODE(0x0F)) >> 0)
+
+/** Get RA bit */
+#define PJ_DNS_GET_RA(val)	(((val) & PJ_DNS_SET_RA(1)) >> 7)
+
+/** Get RD bit */
+#define PJ_DNS_GET_RD(val)	(((val) & PJ_DNS_SET_RD(1)) >> 8)
+
+/** Get TC bit */
+#define PJ_DNS_GET_TC(val)	(((val) & PJ_DNS_SET_TC(1)) >> 9)
+
+/** Get AA bit */
+#define PJ_DNS_GET_AA(val)	(((val) & PJ_DNS_SET_AA(1)) >> 10)
+
+/** Get OPCODE value */
+#define PJ_DNS_GET_OPCODE(val)	(((val) & PJ_DNS_SET_OPCODE(0x0F)) >> 11)
+
+/** Get QR bit */
+#define PJ_DNS_GET_QR(val)	(((val) & PJ_DNS_SET_QR(1)) >> 15)
+
+
+/** 
+ * These constants describe DNS RCODEs. Application can fold these constants
+ * into PJLIB pj_status_t namespace by calling #PJ_STATUS_FROM_DNS_RCODE()
+ * macro.
+ */
+typedef enum pj_dns_rcode
+{
+    PJ_DNS_RCODE_FORMERR    = 1,    /**< Format error.			    */
+    PJ_DNS_RCODE_SERVFAIL   = 2,    /**< Server failure.		    */
+    PJ_DNS_RCODE_NXDOMAIN   = 3,    /**< Name Error.			    */
+    PJ_DNS_RCODE_NOTIMPL    = 4,    /**< Not Implemented.		    */
+    PJ_DNS_RCODE_REFUSED    = 5,    /**< Refused.			    */
+    PJ_DNS_RCODE_YXDOMAIN   = 6,    /**< The name exists.		    */
+    PJ_DNS_RCODE_YXRRSET    = 7,    /**< The RRset (name, type) exists.	    */
+    PJ_DNS_RCODE_NXRRSET    = 8,    /**< The RRset (name, type) doesn't exist*/
+    PJ_DNS_RCODE_NOTAUTH    = 9,    /**< Not authorized.		    */
+    PJ_DNS_RCODE_NOTZONE    = 10    /**< The zone specified is not a zone.  */
+
+} pj_dns_rcode;
+
+
+/**
+ * This structure describes a DNS query record.
+ */
+typedef struct pj_dns_parsed_query
+{
+    pj_str_t	name;	    /**< The domain in the query.		    */
+    pj_uint16_t	type;	    /**< Type of the query (pj_dns_type)	    */
+    pj_uint16_t	dnsclass;   /**< Network class (PJ_DNS_CLASS_IN=1)	    */
+} pj_dns_parsed_query;
+
+
+/**
+ * This structure describes a Resource Record parsed from the DNS packet.
+ * All integral values are in host byte order.
+ */
+typedef struct pj_dns_parsed_rr
+{
+    pj_str_t	 name;	    /**< The domain name which this rec pertains.   */
+    pj_uint16_t	 type;	    /**< RR type code.				    */
+    pj_uint16_t	 dnsclass;  /**< Class of data (PJ_DNS_CLASS_IN=1).	    */
+    pj_uint32_t	 ttl;	    /**< Time to live.				    */
+    pj_uint16_t	 rdlength;  /**< Resource data length.			    */
+    void	*data;	    /**< Pointer to the raw resource data, only
+				 when the type is not known. If it is known,
+				 the data will be put in rdata below.	    */
+    
+    /** For resource types that are recognized/supported by this library,
+     *  the parsed resource data will be placed in this rdata union.
+     */
+    union rdata
+    {
+	/** SRV Resource Data (PJ_DNS_TYPE_SRV, 33) */
+	struct srv {
+	    pj_uint16_t	prio;	/**< Target priority (lower is higher).	    */
+	    pj_uint16_t weight;	/**< Weight/proportion			    */
+	    pj_uint16_t port;	/**< Port number of the service		    */
+	    pj_str_t	target;	/**< Target name.			    */
+	} srv;
+
+	/** CNAME Resource Data (PJ_DNS_TYPE_CNAME, 5) */
+	struct cname {
+	    pj_str_t	name;	/**< Primary canonical name for an alias.   */
+	} cname;
+
+	/** NS Resource Data (PJ_DNS_TYPE_NS, 2) */
+	struct ns {
+	    pj_str_t	name;	/**< Primary name server.		    */
+	} ns;
+
+	/** PTR Resource Data (PJ_DNS_TYPE_PTR, 12) */
+	struct ptr {
+	    pj_str_t	name;	/**< PTR name.				    */
+	} ptr;
+
+	/** A Resource Data (PJ_DNS_TYPE_A, 1) */
+	struct a {
+	    pj_in_addr	ip_addr;/**< IP host address string.		    */
+	} a;
+
+    } rdata;
+
+} pj_dns_parsed_rr;
+
+
+/**
+ * This structure describes the parsed repersentation of the raw DNS packet.
+ * Note that all integral values in the parsed packet are represented in
+ * host byte order.
+ */
+typedef struct pj_dns_parsed_packet
+{
+    pj_dns_hdr		 hdr;	/**< Pointer to DNS hdr, in host byte order */
+    pj_dns_parsed_query	*q;	/**< Array of DNS queries.		    */
+    pj_dns_parsed_rr	*ans;	/**< Array of DNS RR answer.		    */
+    pj_dns_parsed_rr	*ns;	/**< Array of NS record in the answer.	    */
+    pj_dns_parsed_rr	*arr;	/**< Array of additional RR answer.	    */
+} pj_dns_parsed_packet;
+
+
+/**
+ * Option flags to be specified when calling #pj_dns_packet_dup() function.
+ * These flags can be combined with bitwise OR operation.
+ */
+enum pj_dns_dup_options
+{
+    PJ_DNS_NO_QD    = 1, /**< Do not duplicate the query section.	    */
+    PJ_DNS_NO_ANS   = 2, /**< Do not duplicate the answer section.	    */
+    PJ_DNS_NO_NS    = 4, /**< Do not duplicate the NS section.		    */
+    PJ_DNS_NO_AR    = 8  /**< Do not duplicate the additional rec section   */
+};
+
+
+/**
+ * Create DNS query packet to resolve the specified names. This function
+ * can be used to build any types of DNS query, such as A record or DNS SRV
+ * record.
+ *
+ * Application specifies the type of record and the name to be queried,
+ * and the function will build the DNS query packet into the buffer
+ * specified. Once the packet is successfully built, application can send
+ * the packet via TCP or UDP connection.
+ *
+ * @param packet	The buffer to put the DNS query packet.
+ * @param size		On input, it specifies the size of the buffer.
+ *			On output, it will be filled with the actual size of
+ *			the DNS query packet.
+ * @param id		DNS query ID to associate DNS response with the
+ *			query.
+ * @param qtype		DNS type of record to be queried (see #pj_dns_type).
+ * @param name		Name to be queried from the DNS server.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_dns_make_query(void *packet,
+				       unsigned *size,
+				       pj_uint16_t id,
+				       int qtype,
+				       const pj_str_t *name);
+
+/**
+ * Parse raw DNS packet into parsed DNS packet structure. This function is
+ * able to parse few DNS resource records such as A record, PTR record,
+ * CNAME record, NS record, and SRV record.
+ *
+ * @param pool		Pool to allocate memory for the parsed packet.
+ * @param packet	Pointer to the DNS packet (the TCP/UDP payload of 
+ *			the raw packet).
+ * @param size		The size of the DNS packet.
+ * @param p_res		Pointer to store the resulting parsed packet.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_dns_parse_packet(pj_pool_t *pool,
+					 const void *packet,
+					 unsigned size,
+					 pj_dns_parsed_packet **p_res);
+
+/**
+ * Duplicate DNS packet.
+ *
+ * @param pool		The pool to allocate memory for the duplicated packet.
+ * @param p		The DNS packet to be cloned.
+ * @param options	Option flags, from pj_dns_dup_options.
+ * @param p_dst		Pointer to store the cloned DNS packet.
+ */
+PJ_DECL(void) pj_dns_packet_dup(pj_pool_t *pool,
+				const pj_dns_parsed_packet*p,
+				unsigned options,
+				pj_dns_parsed_packet **p_dst);
+
+
+/**
+ * Utility function to get the type name string of the specified DNS type.
+ *
+ * @param type		DNS type (see #pj_dns_type).
+ *
+ * @return		String name of the type (e.g. "A", "SRV", etc.).
+ */
+PJ_DECL(const char *) pj_dns_get_type_name(int type);
+
+
+/**
+ * Dump DNS packet to standard log.
+ *
+ * @param res		The DNS packet.
+ */
+PJ_DECL(void) pj_dns_dump_packet(const pj_dns_parsed_packet *res);
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJLIB_UTIL_DNS_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/errno.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/errno.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/errno.h	(revision 1163)
@@ -0,0 +1,359 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 __PJLIB_UTIL_ERRNO_H__
+#define __PJLIB_UTIL_ERRNO_H__
+
+
+#include <pj/errno.h>
+
+/**
+ * @defgroup PJLIB_UTIL_ERROR PJLIB-UTIL Error Codes
+ * @ingroup PJLIB_UTIL
+ * @{
+ */
+
+/**
+ * Start of error code relative to PJ_ERRNO_START_USER.
+ * This value is 320000.
+ */
+#define PJLIB_UTIL_ERRNO_START    (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*3)
+
+
+/************************************************************
+ * STUN ERROR
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Unable to resolve STUN server
+ */
+#define PJLIB_UTIL_ESTUNRESOLVE	    (PJLIB_UTIL_ERRNO_START+1)	/* 320001 */
+/**
+ * @hideinitializer
+ * Unknown STUN message type.
+ */
+#define PJLIB_UTIL_ESTUNINMSGTYPE   (PJLIB_UTIL_ERRNO_START+2)	/* 320002 */
+/**
+ * @hideinitializer
+ * Invalid STUN message length
+ */
+#define PJLIB_UTIL_ESTUNINMSGLEN    (PJLIB_UTIL_ERRNO_START+3)	/* 320003 */
+/**
+ * @hideinitializer
+ * Invalid STUN attribute length
+ */
+#define PJLIB_UTIL_ESTUNINATTRLEN   (PJLIB_UTIL_ERRNO_START+4)	/* 320004 */
+/**
+ * @hideinitializer
+ * Invalid STUN attribute type
+ */
+#define PJLIB_UTIL_ESTUNINATTRTYPE  (PJLIB_UTIL_ERRNO_START+5)	/* 320005 */
+/**
+ * @hideinitializer
+ * Invalid STUN server/socket index
+ */
+#define PJLIB_UTIL_ESTUNININDEX     (PJLIB_UTIL_ERRNO_START+6)	/* 320006 */
+/**
+ * @hideinitializer
+ * No STUN binding response in the message
+ */
+#define PJLIB_UTIL_ESTUNNOBINDRES   (PJLIB_UTIL_ERRNO_START+7)	/* 320007 */
+/**
+ * @hideinitializer
+ * Received STUN error attribute
+ */
+#define PJLIB_UTIL_ESTUNRECVERRATTR (PJLIB_UTIL_ERRNO_START+8)	/* 320008 */
+/**
+ * @hideinitializer
+ * No STUN mapped address attribute
+ */
+#define PJLIB_UTIL_ESTUNNOMAP       (PJLIB_UTIL_ERRNO_START+9)	/* 320009 */
+/**
+ * @hideinitializer
+ * Received no response from STUN server
+ */
+#define PJLIB_UTIL_ESTUNNOTRESPOND  (PJLIB_UTIL_ERRNO_START+10)	/* 320010 */
+/**
+ * @hideinitializer
+ * Symetric NAT detected by STUN
+ */
+#define PJLIB_UTIL_ESTUNSYMMETRIC   (PJLIB_UTIL_ERRNO_START+11)	/* 320011 */
+/**
+ * @hideinitializer
+ * Invalid STUN magic value
+ */
+#define PJLIB_UTIL_ESTUNNOTMAGIC    (PJLIB_UTIL_ERRNO_START+12)	/* 320012 */
+/**
+ * @hideinitializer
+ * Invalid STUN fingerprint value
+ */
+#define PJLIB_UTIL_ESTUNFINGERPRINT (PJLIB_UTIL_ERRNO_START+13)	/* 320013 */
+
+
+
+/************************************************************
+ * XML ERROR
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * General invalid XML message.
+ */
+#define PJLIB_UTIL_EINXML	    (PJLIB_UTIL_ERRNO_START+20)	/* 320020 */
+
+
+
+/************************************************************
+ * DNS ERROR
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * DNS query packet buffer is too small.
+ * This error occurs when the user supplied buffer for creating DNS
+ * query (#pj_dns_make_query() function) is too small.
+ */
+#define PJLIB_UTIL_EDNSQRYTOOSMALL  (PJLIB_UTIL_ERRNO_START+40)	/* 320040 */
+/**
+ * @hideinitializer
+ * Invalid DNS packet length.
+ * This error occurs when the received DNS response packet does not
+ * match all the fields length.
+ */
+#define PJLIB_UTIL_EDNSINSIZE	    (PJLIB_UTIL_ERRNO_START+41)	/* 320041 */
+/**
+ * @hideinitializer
+ * Invalid DNS class.
+ * This error occurs when the received DNS response contains network
+ * class other than IN (Internet).
+ */
+#define PJLIB_UTIL_EDNSINCLASS	    (PJLIB_UTIL_ERRNO_START+42)	/* 320042 */
+/**
+ * @hideinitializer
+ * Invalid DNS name pointer.
+ * This error occurs when parsing the compressed names inside DNS
+ * response packet, when the name pointer points to an invalid address
+ * or the parsing has triggerred too much recursion.
+ */
+#define PJLIB_UTIL_EDNSINNAMEPTR    (PJLIB_UTIL_ERRNO_START+43)	/* 320043 */
+/**
+ * @hideinitializer
+ * Invalid DNS nameserver address. If hostname was specified for nameserver
+ * address, this error means that the function was unable to resolve
+ * the nameserver hostname.
+ */
+#define PJLIB_UTIL_EDNSINNSADDR	    (PJLIB_UTIL_ERRNO_START+44)	/* 320044 */
+/**
+ * @hideinitializer
+ * No nameserver is in DNS resolver. No nameserver is configured in the 
+ * resolver.
+ */
+#define PJLIB_UTIL_EDNSNONS	    (PJLIB_UTIL_ERRNO_START+45)	/* 320045 */
+/**
+ * @hideinitializer
+ * No working DNS nameserver. All nameservers have been queried,
+ * but none was able to serve any DNS requests. These "bad" nameservers
+ * will be re-tested again for "goodness" after some period.
+ */
+#define PJLIB_UTIL_EDNSNOWORKINGNS  (PJLIB_UTIL_ERRNO_START+46)	/* 320046 */
+/**
+ * @hideinitializer
+ * No answer record in the DNS response.
+ */
+#define PJLIB_UTIL_EDNSNOANSWERREC  (PJLIB_UTIL_ERRNO_START+47)	/* 320047 */
+
+
+/* DNS ERRORS MAPPED FROM RCODE: */
+
+/**
+ * Start of error code mapped from DNS RCODE
+ */
+#define PJLIB_UTIL_DNS_RCODE_START  (PJLIB_UTIL_ERRNO_START+50)	/* 320050 */
+
+/**
+ * Map DNS RCODE status into pj_status_t.
+ */
+#define PJ_STATUS_FROM_DNS_RCODE(rcode)	(rcode==0 ? PJ_SUCCESS : \
+					 PJLIB_UTIL_DNS_RCODE_START+rcode)
+/**
+ * @hideinitializer
+ * Format error - The name server was unable to interpret the query.
+ * This corresponds to DNS RCODE 1.
+ */
+#define PJLIB_UTIL_EDNS_FORMERR	    PJ_STATUS_FROM_DNS_RCODE(1)	/* 320051 */
+/**
+ * @hideinitializer
+ * Server failure - The name server was unable to process this query due to a
+ * problem with the name server.
+ * This corresponds to DNS RCODE 2.
+ */
+#define PJLIB_UTIL_EDNS_SERVFAIL    PJ_STATUS_FROM_DNS_RCODE(2)	/* 320052 */
+/**
+ * @hideinitializer
+ * Name Error - Meaningful only for responses from an authoritative name
+ * server, this code signifies that the domain name referenced in the query 
+ * does not exist.
+ * This corresponds to DNS RCODE 3.
+ */
+#define PJLIB_UTIL_EDNS_NXDOMAIN    PJ_STATUS_FROM_DNS_RCODE(3)	/* 320053 */
+/**
+ * @hideinitializer
+ * Not Implemented - The name server does not support the requested kind of 
+ * query.
+ * This corresponds to DNS RCODE 4.
+ */
+#define PJLIB_UTIL_EDNS_NOTIMPL    PJ_STATUS_FROM_DNS_RCODE(4)	/* 320054 */
+/**
+ * @hideinitializer
+ * Refused - The name server refuses to perform the specified operation for
+ * policy reasons.
+ * This corresponds to DNS RCODE 5.
+ */
+#define PJLIB_UTIL_EDNS_REFUSED	    PJ_STATUS_FROM_DNS_RCODE(5)	/* 320055 */
+/**
+ * @hideinitializer
+ * The name exists.
+ * This corresponds to DNS RCODE 6.
+ */
+#define PJLIB_UTIL_EDNS_YXDOMAIN    PJ_STATUS_FROM_DNS_RCODE(6)	/* 320056 */
+/**
+ * @hideinitializer
+ * The RRset (name, type) exists.
+ * This corresponds to DNS RCODE 7.
+ */
+#define PJLIB_UTIL_EDNS_YXRRSET	    PJ_STATUS_FROM_DNS_RCODE(7)	/* 320057 */
+/**
+ * @hideinitializer
+ * The RRset (name, type) does not exist.
+ * This corresponds to DNS RCODE 8.
+ */
+#define PJLIB_UTIL_EDNS_NXRRSET	    PJ_STATUS_FROM_DNS_RCODE(8)	/* 320058 */
+/**
+ * @hideinitializer
+ * The requestor is not authorized to perform this operation.
+ * This corresponds to DNS RCODE 9.
+ */
+#define PJLIB_UTIL_EDNS_NOTAUTH	    PJ_STATUS_FROM_DNS_RCODE(9)	/* 320059 */
+/**
+ * @hideinitializer
+ * The zone specified is not a zone.
+ * This corresponds to DNS RCODE 10.
+ */
+#define PJLIB_UTIL_EDNS_NOTZONE	    PJ_STATUS_FROM_DNS_RCODE(10)/* 320060 */
+
+
+/************************************************************
+ * NEW STUN ERROR
+ ***********************************************************/
+/* Messaging errors */
+/**
+ * @hideinitializer
+ * Too many STUN attributes.
+ */
+#define PJLIB_UTIL_ESTUNTOOMANYATTR (PJLIB_UTIL_ERRNO_START+110)/* 320110 */
+/**
+ * @hideinitializer
+ * Unknown STUN attribute. This error happens when the decoder encounters
+ * mandatory attribute type which it doesn't understand.
+ */
+#define PJLIB_UTIL_ESTUNUNKNOWNATTR (PJLIB_UTIL_ERRNO_START+111)/* 320111 */
+/**
+ * @hideinitializer
+ * Invalid STUN socket address length.
+ */
+#define PJLIB_UTIL_ESTUNINADDRLEN   (PJLIB_UTIL_ERRNO_START+112)/* 320112 */
+/**
+ * @hideinitializer
+ * STUN IPv6 attribute not supported
+ */
+#define PJLIB_UTIL_ESTUNIPV6NOTSUPP (PJLIB_UTIL_ERRNO_START+113)/* 320113 */
+/**
+ * @hideinitializer
+ * Expecting STUN response message.
+ */
+#define PJLIB_UTIL_ESTUNNOTRESPONSE (PJLIB_UTIL_ERRNO_START+114)/* 320114 */
+/**
+ * @hideinitializer
+ * STUN transaction ID mismatch.
+ */
+#define PJLIB_UTIL_ESTUNINVALIDID   (PJLIB_UTIL_ERRNO_START+115)/* 320115 */
+/**
+ * @hideinitializer
+ * Unable to find handler for the request.
+ */
+#define PJLIB_UTIL_ESTUNNOHANDLER   (PJLIB_UTIL_ERRNO_START+116)/* 320116 */
+/**
+ * @hideinitializer
+ * Found non-FINGERPRINT attribute after MESSAGE-INTEGRITY. This is not
+ * valid since MESSAGE-INTEGRITY MUST be the last attribute or the
+ * attribute right before FINGERPRINT before the message.
+ */
+#define PJLIB_UTIL_ESTUNMSGINTPOS    (PJLIB_UTIL_ERRNO_START+118)/* 320118 */
+/**
+ * @hideinitializer
+ * Found attribute after FINGERPRINT. This is not valid since FINGERPRINT
+ * MUST be the last attribute in the message.
+ */
+#define PJLIB_UTIL_ESTUNFINGERPOS   (PJLIB_UTIL_ERRNO_START+119)/* 320119 */
+/**
+ * @hideinitializer
+ * Missing STUN USERNAME attribute.
+ * When credential is included in the STUN message (MESSAGE-INTEGRITY is
+ * present), the USERNAME attribute must be present in the message.
+ */
+#define PJLIB_UTIL_ESTUNNOUSERNAME  (PJLIB_UTIL_ERRNO_START+120)/* 320120 */
+/**
+ * @hideinitializer
+ * Unknown STUN username/credential.
+ */
+#define PJLIB_UTIL_ESTUNUSERNAME    (PJLIB_UTIL_ERRNO_START+121)/* 320121 */
+/**
+ * @hideinitializer
+ * Missing/invalidSTUN MESSAGE-INTEGRITY attribute.
+ */
+#define PJLIB_UTIL_ESTUNMSGINT	    (PJLIB_UTIL_ERRNO_START+122)/* 320122 */
+/**
+ * @hideinitializer
+ * Found duplicate STUN attribute.
+ */
+#define PJLIB_UTIL_ESTUNDUPATTR	    (PJLIB_UTIL_ERRNO_START+123)/* 320123 */
+/**
+ * @hideinitializer
+ * Missing STUN REALM attribute.
+ */
+#define PJLIB_UTIL_ESTUNNOREALM	    (PJLIB_UTIL_ERRNO_START+124)/* 320124 */
+/**
+ * @hideinitializer
+ * Missing/stale STUN NONCE attribute value.
+ */
+#define PJLIB_UTIL_ESTUNNONCE	    (PJLIB_UTIL_ERRNO_START+125)/* 320125 */
+/**
+ * @hideinitializer
+ * STUN transaction terminates with failure.
+ */
+#define PJLIB_UTIL_ESTUNTSXFAILED    (PJLIB_UTIL_ERRNO_START+126)/* 320126 */
+
+
+//#define PJ_STATUS_FROM_STUN_CODE(code)	(PJLIB_UTIL_ERRNO_START+code)
+
+
+
+
+/**
+ * @}
+ */
+
+#endif	/* __PJLIB_UTIL_ERRNO_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/getopt.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/getopt.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/getopt.h	(revision 1163)
@@ -0,0 +1,146 @@
+/* $Id$ */
+/* This file has now become GPL. */
+/* Declarations for pj_getopt.
+   Copyright (C) 1989,90,91,92,93,94,96,97,98 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.  */
+
+#ifndef __PJ_GETOPT_H__
+#define __PJ_GETOPT_H__ 1
+
+/**
+ * @file getopt.h
+ * @brief Compile time settings
+ */
+
+/**
+ * @defgroup PJLIB_UTIL_GETOPT Getopt
+ * @ingroup PJLIB_UTIL
+ * @{
+ */
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+/* For communication from `pj_getopt' to the caller.
+   When `pj_getopt' finds an option that takes an argument,
+   the argument value is returned here.
+   Also, when `ordering' is RETURN_IN_ORDER,
+   each non-option ARGV-element is returned here.  */
+
+extern char *pj_optarg;
+
+/* Index in ARGV of the next element to be scanned.
+   This is used for communication to and from the caller
+   and for communication between successive calls to `pj_getopt'.
+
+   On entry to `pj_getopt', zero means this is the first call; initialize.
+
+   When `pj_getopt' returns -1, this is the index of the first of the
+   non-option elements that the caller should itself scan.
+
+   Otherwise, `pj_optind' communicates from one call to the next
+   how much of ARGV has been scanned so far.  */
+
+extern int pj_optind;
+
+/* Set to an option character which was unrecognized.  */
+
+extern int pj_optopt;
+
+/* Describe the long-named options requested by the application.
+   The LONG_OPTIONS argument to pj_getopt_long or pj_getopt_long_only is a vector
+   of `struct pj_getopt_option' terminated by an element containing a name which is
+   zero.
+
+   The field `has_arg' is:
+   no_argument		(or 0) if the option does not take an argument,
+   required_argument	(or 1) if the option requires an argument,
+   optional_argument 	(or 2) if the option takes an optional argument.
+
+   If the field `flag' is not NULL, it points to a variable that is set
+   to the value given in the field `val' when the option is found, but
+   left unchanged if the option is not found.
+
+   To have a long-named option do something other than set an `int' to
+   a compiled-in constant, such as set a value from `pj_optarg', set the
+   option's `flag' field to zero and its `val' field to a nonzero
+   value (the equivalent single-letter option character, if there is
+   one).  For long options that have a zero `flag' field, `pj_getopt'
+   returns the contents of the `val' field.  */
+
+struct pj_getopt_option
+{
+  const char *name;
+  /* has_arg can't be an enum because some compilers complain about
+     type mismatches in all the code that assumes it is an int.  */
+  int has_arg;
+  int *flag;
+  int val;
+};
+
+/* Names for the values of the `has_arg' field of `struct pj_getopt_option'.  */
+
+# define no_argument		0
+# define required_argument	1
+# define optional_argument	2
+
+
+/* Get definitions and prototypes for functions to process the
+   arguments in ARGV (ARGC of them, minus the program name) for
+   options given in OPTS.
+
+   Return the option character from OPTS just read.  Return -1 when
+   there are no more options.  For unrecognized options, or options
+   missing arguments, `pj_optopt' is set to the option letter, and '?' is
+   returned.
+
+   The OPTS string is a list of characters which are recognized option
+   letters, optionally followed by colons, specifying that that letter
+   takes an argument, to be placed in `pj_optarg'.
+
+   If a letter in OPTS is followed by two colons, its argument is
+   optional.  This behavior is specific to the GNU `pj_getopt'.
+
+   The argument `--' causes premature termination of argument
+   scanning, explicitly telling `pj_getopt' that there are no more
+   options.
+
+   If OPTS begins with `--', then non-option arguments are treated as
+   arguments to the option '\0'.  This behavior is specific to the GNU
+   `pj_getopt'.  */
+
+int pj_getopt (int argc, char *const *argv, const char *shortopts);
+
+int pj_getopt_long (int argc, char *const *argv, const char *options,
+		        const struct pj_getopt_option *longopts, int *longind);
+int pj_getopt_long_only (int argc, char *const *argv,
+			     const char *shortopts,
+		             const struct pj_getopt_option *longopts, int *longind);
+
+
+#ifdef	__cplusplus
+}
+#endif
+
+/**
+ * @}
+ */
+
+#endif /* pj_getopt.h */
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/hmac_md5.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/hmac_md5.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/hmac_md5.h	(revision 1163)
@@ -0,0 +1,68 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __PJLIB_UTIL_HMAC_MD5_H__
+#define __PJLIB_UTIL_HMAC_MD5_H__
+
+/**
+ * @file hmac_md5.h
+ * @brief HMAC MD5 Message Authentication
+ */
+
+/**
+ * @defgroup PJLIB_UTIL_ENCRYPTION Encryption Algorithms
+ */
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJLIB_UTIL_HMAC_MD5 HMAC MD5 Message Authentication
+ * @ingroup PJLIB_UTIL_ENCRYPTION
+ * @{
+ *
+ * This module contains the implementation of HMAC: Keyed-Hashing 
+ * for Message Authentication, as described in RFC 2104
+ */
+
+
+/**
+ * Calculate HMAC MD5 digest for the specified input and key.
+ *
+ * @param input		Pointer to the input stream.
+ * @param input_len	Length of input stream in bytes.
+ * @param key		Pointer to the authentication key.
+ * @param key_len	Length of the authentication key.
+ * @param digest	Buffer to be filled with HMAC MD5 digest.
+ */
+PJ_DECL(void) pj_hmac_md5(const pj_uint8_t *input, unsigned input_len, 
+			  const pj_uint8_t *key, unsigned key_len, 
+			  pj_uint8_t digest[16]);
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJLIB_UTIL_HMAC_MD5_H__ */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/hmac_sha1.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/hmac_sha1.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/hmac_sha1.h	(revision 1163)
@@ -0,0 +1,64 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __PJLIB_UTIL_HMAC_SHA1_H__
+#define __PJLIB_UTIL_HMAC_SHA1_H__
+
+/**
+ * @file hmac_sha1.h
+ * @brief HMAC SHA1 Message Authentication
+ */
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJLIB_UTIL_HMAC_SHA1 HMAC SHA1 Message Authentication
+ * @ingroup PJLIB_UTIL_ENCRYPTION
+ * @{
+ *
+ * This module contains the implementation of HMAC: Keyed-Hashing 
+ * for Message Authentication, as described in RFC 2104
+ */
+
+
+/**
+ * Calculate HMAC SHA1 digest for the specified input and key.
+ *
+ * @param input		Pointer to the input stream.
+ * @param input_len	Length of input stream in bytes.
+ * @param key		Pointer to the authentication key.
+ * @param key_len	Length of the authentication key.
+ * @param digest	Buffer to be filled with HMAC SHA1 digest.
+ */
+PJ_DECL(void) pj_hmac_sha1(const pj_uint8_t *input, unsigned input_len, 
+			   const pj_uint8_t *key, unsigned key_len, 
+			   pj_uint8_t digest[20]);
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJLIB_UTIL_HMAC_SHA1_H__ */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/md5.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/md5.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/md5.h	(revision 1163)
@@ -0,0 +1,73 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __PJLIB_UTIL_MD5_H__
+#define __PJLIB_UTIL_MD5_H__
+
+/**
+ * @file md5.h
+ * @brief MD5 Functions
+ */
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJLIB_UTIL_MD5 MD5
+ * @ingroup PJLIB_UTIL_ENCRYPTION
+ * @{
+ */
+
+
+/** MD5 context. */
+typedef struct pj_md5_context
+{
+	pj_uint32_t buf[4];
+	pj_uint32_t bits[2];
+	pj_uint8_t  in[64];
+} pj_md5_context;
+
+/** Initialize the algorithm. 
+ *  @param pms		MD5 context.
+ */
+PJ_DECL(void) pj_md5_init(pj_md5_context *pms);
+
+/** Append a string to the message. 
+ *  @param pms		MD5 context.
+ *  @param data		Data.
+ *  @param nbytes	Length of data.
+ */
+PJ_DECL(void) pj_md5_update( pj_md5_context *pms, 
+			     const pj_uint8_t *data, unsigned nbytes);
+
+/** Finish the message and return the digest. 
+ *  @param pms		MD5 context.
+ *  @param digest	16 byte digest.
+ */
+PJ_DECL(void) pj_md5_final(pj_md5_context *pms, pj_uint8_t digest[16]);
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJLIB_UTIL_MD5_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/resolver.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/resolver.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/resolver.h	(revision 1163)
@@ -0,0 +1,410 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJLIB_UTIL_RESOLVER_H__
+#define __PJLIB_UTIL_RESOLVER_H__
+
+/**
+ * @file resolver.h
+ * @brief Asynchronous DNS resolver
+ */
+#include <pjlib-util/dns.h>
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJ_DNS_RESOLVER DNS Asynchronous/Caching Resolution Engine
+ * @ingroup PJ_DNS
+ * @{
+ *
+ * This module manages the host/server resolution by performing asynchronous
+ * DNS queries and caching the results in the cache. It uses PJLIB-UTIL 
+ * low-level DNS parsing functions (see @ref PJ_DNS) and currently supports
+ * several types of DNS resource records such as A record (typical query with
+ * gethostbyname()) and SRV record.
+ *
+ * \section PJ_DNS_RESOLVER_FEATURES Features
+ *
+ * \subsection PJ_DNS_RESOLVER_FEATURES_ASYNC Asynchronous Query and Query Aggregation
+ * 
+ * The DNS queries are performed asychronously, with timeout setting 
+ * configured on per resolver instance basis. Application can issue multiple
+ * asynchronous queries simultaneously. Subsequent queries to the same resource
+ * (name and DNS resource type) while existing query is still pending will be
+ * merged into one query, so that only one DNS request packet is issued.
+ * 
+ * \subsection PJ_DNS_RESOLVER_FEATURES_RETRANSMISSION Query Retransmission
+ *
+ * Asynchronous query will be retransmitted if no response is received
+ * within the preconfigured time. Once maximum retransmission count is
+ * exceeded and no response is received, the query will time out and the
+ * callback will be called when error status.
+ *
+ * \subsection PJ_DNS_RESOLVER_FEATURES_CACHING Response Caching with TTL
+ *
+ * The resolver instance caches the results returned by nameservers, to
+ * enhance the performance by minimizing the message round-trip to the server.
+ * The TTL of the cached resposne is calculated from minimum TTL value found 
+ * across all resource record (RR) TTL in the response and further more it can
+ * be limited to some preconfigured maximum TTL in the resolver. 
+ *
+ * Response caching can be  disabled by setting the maximum TTL value of the 
+ * resolver to zero.
+ *
+ * \subsection PJ_DNS_RESOLVER_FEATURES_PARALLEL Parallel and Backup Name Servers
+ *
+ * When the resolver is configured with multiple nameservers, initially the
+ * queries will be issued to multiple name servers simultaneously to probe
+ * which servers are not active. Once the probing stage is done, subsequent 
+ * queries will be directed to only one ACTIVE server which provides the best
+ * response time.
+ *
+ * Name servers are probed periodically to see which nameservers are active
+ * and which are down. This probing is done when a query is sent, thus no
+ * timer is needed to maintain this. Also probing will be done in parallel
+ * so that there would be no additional delay for the query.
+ *
+ *
+ * \subsection PJ_DNS_RESOLVER_FEATURES_REC Supported Resource Records
+ *
+ * The low-level DNS parsing utility (see @ref PJ_DNS) supports parsing of
+ * the following DNS resource records (RR):
+ *  - DNS A record
+ *  - DNS SRV record
+ *  - DNS PTR record
+ *  - DNS NS record
+ *  - DNS CNAME record
+ *
+ * For other types of record, application can parse the raw resource 
+ * record data (rdata) from the parsed DNS packet (#pj_dns_parsed_packet).
+ *
+ *
+ * \section PJ_DNS_RESOLVER_USING Using the Resolver
+ *
+ * To use the resolver, application first creates the resolver instance by
+ * calling #pj_dns_resolver_create(). If application already has its own
+ * timer and ioqueue instances, it can instruct the resolver to use these
+ * instances so that application does not need to poll the resolver 
+ * periodically to process events. If application does not specify the
+ * timer and ioqueue instance for the resolver, an internal timer and
+ * ioqueue will be created by the resolver. And since the resolver does not
+ * create it's own thread, application MUST poll the resolver periodically
+ * by calling #pj_dns_resolver_handle_events() to allow events (network and 
+ * timer) to be processed.
+ *
+ * Next, application MUST configure the nameservers to be used by the
+ * resolver, by calling #pj_dns_resolver_set_ns().
+ *
+ * Application performs asynchronous query by submitting the query with
+ * #pj_dns_resolver_start_query(). Once the query completes (either 
+ * successfully or times out), the callback will be called.
+ *
+ * Application can cancel a pending query by calling #pj_dns_resolver_cancel_query().
+ *
+ * Resolver must be destroyed by calling #pj_dns_resolver_destroy() to
+ * release all resources back to the system.
+ *
+ *
+ * \section PJ_DNS_RESOLVER_LIMITATIONS Resolver Limitations
+ *
+ * Current implementation mainly suffers from a growing memory problem,
+ * which mainly is caused by the response caching. Although there is only
+ * one cache entry per {query, name} combination, these cache entry will
+ * never get deleted since there is no timer is created to invalidate these
+ * entries. So the more unique names being queried by application, there more
+ * enties will be created in the response cache.
+ *
+ * Note that a single response entry will occupy about 600-700 bytes of 
+ * pool memory (the PJ_DNS_RESOLVER_RES_BUF_SIZE value plus internal
+ * structure). 
+ *
+ * Application can work around this problem by doing one of these:
+ *  - disable caching by setting PJ_DNS_RESOLVER_MAX_TTL and 
+ *    PJ_DNS_RESOLVER_INVALID_TTL to zero.
+ *  - periodically query #pj_dns_resolver_get_cached_count() and destroy-
+ *    recreate the resolver to recycle the memory used by the resolver.
+ *
+ * Note that future improvement may solve this problem by introducing 
+ * expiration timer to the cached entries.
+ *
+ *
+ * \section PJ_DNS_RESOLVER_REFERENCE Reference
+ *
+ * The PJLIB-UTIL resolver was built from the information in the following
+ * standards:
+ *  - <A HREF="http://www.faqs.org/rfcs/rfc1035.html">
+ *    RFC 1035: "Domain names - implementation and specification"</A>
+ *  - <A HREF="http://www.faqs.org/rfcs/rfc2782.html">
+ *    RFC 2782: "A DNS RR for specifying the location of services (DNS SRV)"
+ *    </A>
+ */
+
+
+
+/**
+ * Opaque data type for DNS resolver object.
+ */
+typedef struct pj_dns_resolver pj_dns_resolver;
+
+/**
+ * Opaque data type for asynchronous DNS query object.
+ */
+typedef struct pj_dns_async_query pj_dns_async_query;
+
+/**
+ * Type of asynchronous callback which will be called when the asynchronous
+ * query completes.
+ *
+ * @param user_data	The user data set by application when creating the
+ *			asynchronous query.
+ * @param status	Status of the DNS resolution.
+ * @param response	The response packet received from the server. This
+ *			argument may be NULL when status is not PJ_SUCCESS.
+ */
+typedef void pj_dns_callback(void *user_data,
+			     pj_status_t status,
+			     pj_dns_parsed_packet *response);
+
+
+/**
+ * This structure describes resolver settings.
+ */
+typedef struct pj_dns_settings
+{
+    unsigned	options;	/**< Options flags.			    */
+    unsigned	qretr_delay;	/**< Query retransmit delay in msec.	    */
+    unsigned	qretr_count;	/**< Query maximum retransmission count.    */
+    unsigned	cache_max_ttl;	/**< Maximum TTL for cached responses. If the
+				     value is zero, caching is disabled.    */
+} pj_dns_settings;
+
+
+/**
+ * Create DNS resolver instance. After the resolver is created, application
+ * MUST configure the nameservers with #pj_dns_resolver_set_ns().
+ *
+ * When creating the resolver, application may specify both timer heap
+ * and ioqueue instance, so that it doesn't need to poll the resolver
+ * periodically.
+ *
+ * @param pf	     Pool factory where the memory pool will be created from.
+ * @param name	     Optional resolver name to identify the instance in 
+ *		     the log.
+ * @param options    Optional options, must be zero for now.
+ * @param timer	     Optional timer heap instance to be used by the resolver.
+ *		     If timer heap is not specified, an internal timer will be
+ *		     created, and application would need to poll the resolver
+ *		     periodically.
+ * @param ioqueue    Optional I/O Queue instance to be used by the resolver.
+ *		     If ioqueue is not specified, an internal one will be
+ *		     created, and application would need to poll the resolver
+ *		     periodically.
+ * @param p_resolver Pointer to receive the resolver instance.
+ *
+ * @return	     PJ_SUCCESS on success, or the appropriate error code,
+ */
+PJ_DECL(pj_status_t) pj_dns_resolver_create(pj_pool_factory *pf,
+					    const char *name,
+					    unsigned options,
+					    pj_timer_heap_t *timer,
+					    pj_ioqueue_t *ioqueue,
+					    pj_dns_resolver **p_resolver);
+
+
+/**
+ * Update the name servers for the DNS resolver. The name servers MUST be
+ * configured before any resolution can be done. The order of nameservers
+ * specifies their priority; the first name server will be tried first
+ * before the next in the list.
+ *
+ * @param resolver  The resolver instance.
+ * @param count     Number of name servers in the array.
+ * @param servers   Array of name server IP addresses or hostnames. If
+ *		    hostname is specified, the hostname must be resolvable
+ *		    with pj_gethostbyname().
+ * @param ports	    Optional array of ports. If this argument is NULL,
+ *		    the nameserver will use default port.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code,
+ */
+PJ_DECL(pj_status_t) pj_dns_resolver_set_ns(pj_dns_resolver *resolver,
+					    unsigned count,
+					    const pj_str_t servers[],
+					    const pj_uint16_t ports[]);
+
+
+/**
+ * Get the resolver current settings.
+ *
+ * @param resolver  The resolver instance.
+ * @param st	    Buffer to be filled up with resolver settings.
+ *
+ * @return	    The query timeout setting, in seconds.
+ */
+PJ_DECL(pj_status_t) pj_dns_resolver_get_settings(pj_dns_resolver *resolver,
+						  pj_dns_settings *st);
+
+
+/**
+ * Modify the resolver settings. Application should initialize the settings
+ * by retrieving current settings first before applying new settings, to
+ * ensure that all fields are initialized properly.
+ *
+ * @param resolver  The resolver instance.
+ * @param st	    The resolver settings.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code,
+ */
+PJ_DECL(pj_status_t) pj_dns_resolver_set_settings(pj_dns_resolver *resolver,
+						  const pj_dns_settings *st);
+
+
+/**
+ * Poll for events from the resolver. This function MUST be called 
+ * periodically when the resolver is using it's own timer or ioqueue
+ * (in other words, when NULL is specified as either \a timer or
+ * \a ioqueue argument in #pj_dns_resolver_create()).
+ *
+ * @param resolver  The resolver instance.
+ * @param timeout   Maximum time to wait for event occurence. If this
+ *		    argument is NULL, this function will wait forever
+ *		    until events occur.
+ */
+PJ_DECL(void) pj_dns_resolver_handle_events(pj_dns_resolver *resolver,
+					    const pj_time_val *timeout);
+
+
+/**
+ * Destroy DNS resolver instance.
+ *
+ * @param resolver  The resolver object to be destryed
+ * @param notify    If non-zero, all pending asynchronous queries will be
+ *		    cancelled and its callback will be called. If FALSE,
+ *		    then no callback will be called.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code,
+ */
+PJ_DECL(pj_status_t) pj_dns_resolver_destroy(pj_dns_resolver *resolver,
+					     pj_bool_t notify);
+
+
+/**
+ * Create and start asynchronous DNS query for a single resource. Depending
+ * on whether response cache is available, this function will either start
+ * an asynchronous DNS query or call the callback immediately.
+ *
+ * If response is not available in the cache, an asynchronous query will be
+ * started, and callback will be called at some time later when the query
+ * completes. If \a p_query argument is not NULL, it will be filled with
+ * the asynchronous query object.
+ *
+ * If response is available in the cache, the callback will be called 
+ * immediately before this function returns. In this case, if \a p_query
+ * argument is not NULL, the value will be set to NULL since no new query
+ * is started.
+ *
+ * @param resolver  The resolver object.
+ * @param name	    The name to be resolved.
+ * @param type	    The type of resource (see #pj_dns_type constants).
+ * @param options   Optional options, must be zero for now.
+ * @param cb	    Callback to be called when the query completes,
+ *		    either successfully or with failure.
+ * @param user_data Arbitrary user data to be associated with the query,
+ *		    and which will be given back in the callback.
+ * @param p_query   Optional pointer to receive the query object, if one
+ *		    was started. If this pointer is specified, a NULL may
+ *		    be returned if response cache is available immediately.
+ *
+ * @return	    PJ_SUCCESS if either an asynchronous query has been 
+ *		    started successfully or response cache is available and
+ *		    the user callback has been called.
+ */
+PJ_DECL(pj_status_t) pj_dns_resolver_start_query(pj_dns_resolver *resolver,
+						 const pj_str_t *name,
+						 int type,
+						 unsigned options,
+						 pj_dns_callback *cb,
+						 void *user_data,
+						 pj_dns_async_query **p_query);
+
+/**
+ * Cancel a pending query.
+ *
+ * @param query	    The pending asynchronous query to be cancelled.
+ * @param notify    If non-zero, the callback will be called with failure
+ *		    status to notify that the query has been cancelled.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code,
+ */
+PJ_DECL(pj_status_t) pj_dns_resolver_cancel_query(pj_dns_async_query *query,
+						  pj_bool_t notify);
+
+
+/**
+ * Put the specified DNS packet into DNS cache. This function is mainly used
+ * for testing the resolver, however it can also be used to inject entries
+ * into the resolver.
+ *
+ * The packet MUST contain either answer section or query section so that
+ * it can be indexed.
+ *
+ * @param resolver  The resolver instance.
+ * @param pkt	    DNS packet to be added to the DNS cache. If the packet
+ *		    matches existing entry, it will update the entry.
+ * @param set_ttl   If the value is PJ_FALSE, the entry will not expire 
+ *		    (so use with care). Otherwise cache expiration will be
+ *		    calculated based on the TTL of the answeres.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_dns_resolver_add_entry(pj_dns_resolver *resolver,
+					       const pj_dns_parsed_packet *pkt,
+					       pj_bool_t set_ttl);
+
+/**
+ * Get the total number of response in the response cache.
+ *
+ * @param resolver  The resolver instance.
+ *
+ * @return	    Current number of entries being stored in the response
+ *		    cache.
+ */
+PJ_DECL(unsigned) pj_dns_resolver_get_cached_count(pj_dns_resolver *resolver);
+
+
+/**
+ * Dump resolver state to the log.
+ *
+ * @param resolver  The resolver instance.
+ * @param detail    Will print detailed entries.
+ */
+PJ_DECL(void) pj_dns_resolver_dump(pj_dns_resolver *resolver,
+				   pj_bool_t detail);
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJLIB_UTIL_RESOLVER_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/scanner.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/scanner.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/scanner.h	(revision 1163)
@@ -0,0 +1,554 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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_UTIL
+ * @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, int 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
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/scanner_cis_bitwise.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/scanner_cis_bitwise.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/scanner_cis_bitwise.h	(revision 1163)
@@ -0,0 +1,96 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __PJLIB_UTIL_SCANNER_CIS_BIT_H__
+#define __PJLIB_UTIL_SCANNER_CIS_BIT_H__
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * This describes the type of individual character specification in
+ * #pj_cis_buf_t. Basicly the number of bits here
+ */
+#ifndef PJ_CIS_ELEM_TYPE
+#   define PJ_CIS_ELEM_TYPE pj_uint32_t
+#endif
+
+/**
+ * This describes the type of individual character specification in
+ * #pj_cis_buf_t.
+ */
+typedef PJ_CIS_ELEM_TYPE pj_cis_elem_t;
+
+/**
+ * Maximum number of input specification in a buffer.
+ * Effectively this means the number of bits in pj_cis_elem_t.
+ */
+#define PJ_CIS_MAX_INDEX   (sizeof(pj_cis_elem_t) << 3)
+
+/**
+ * The scanner input specification buffer.
+ */
+typedef struct pj_cis_buf_t
+{
+    pj_cis_elem_t    cis_buf[256];  /**< Must be 256 (not 128)! */
+    pj_cis_elem_t    use_mask;      /**< To keep used indexes.  */
+} pj_cis_buf_t;
+
+/**
+ * Character input specification.
+ */
+typedef struct pj_cis_t
+{
+    pj_cis_elem_t   *cis_buf;       /**< Pointer to buffer.     */
+    int              cis_id;        /**< Id.                    */
+} pj_cis_t;
+
+
+/**
+ * Set the membership of the specified character.
+ * Note that this is a macro, and arguments may be evaluated more than once.
+ *
+ * @param cis       Pointer to character input specification.
+ * @param c         The character.
+ */
+#define PJ_CIS_SET(cis,c)   ((cis)->cis_buf[(int)(c)] |= (1 << (cis)->cis_id))
+
+/**
+ * Remove the membership of the specified character.
+ * Note that this is a macro, and arguments may be evaluated more than once.
+ *
+ * @param cis       Pointer to character input specification.
+ * @param c         The character to be removed from the membership.
+ */
+#define PJ_CIS_CLR(cis,c)   ((cis)->cis_buf[(int)c] &= ~(1 << (cis)->cis_id))
+
+/**
+ * Check the membership of the specified character.
+ * Note that this is a macro, and arguments may be evaluated more than once.
+ *
+ * @param cis       Pointer to character input specification.
+ * @param c         The character.
+ */
+#define PJ_CIS_ISSET(cis,c) ((cis)->cis_buf[(int)c] & (1 << (cis)->cis_id))
+
+
+
+PJ_END_DECL
+
+#endif	/* __PJLIB_UTIL_SCANNER_CIS_BIT_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/scanner_cis_uint.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/scanner_cis_uint.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/scanner_cis_uint.h	(revision 1163)
@@ -0,0 +1,83 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __PJLIB_UTIL_SCANNER_CIS_BIT_H__
+#define __PJLIB_UTIL_SCANNER_CIS_BIT_H__
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * This describes the type of individual character specification in
+ * #pj_cis_buf_t. Basicly the number of bits here
+ */
+#ifndef PJ_CIS_ELEM_TYPE
+#   define PJ_CIS_ELEM_TYPE int
+#endif
+
+/**
+ * This describes the type of individual character specification in
+ * #pj_cis_buf_t.
+ */
+typedef PJ_CIS_ELEM_TYPE pj_cis_elem_t;
+
+/** pj_cis_buf_t is not used when uint back-end is used. */
+typedef int pj_cis_buf_t;
+
+/**
+ * Character input specification.
+ */
+typedef struct pj_cis_t
+{
+    PJ_CIS_ELEM_TYPE	cis_buf[256];
+} pj_cis_t;
+
+
+/**
+ * Set the membership of the specified character.
+ * Note that this is a macro, and arguments may be evaluated more than once.
+ *
+ * @param cis       Pointer to character input specification.
+ * @param c         The character.
+ */
+#define PJ_CIS_SET(cis,c)   ((cis)->cis_buf[(int)(c)] = 1)
+
+/**
+ * Remove the membership of the specified character.
+ * Note that this is a macro, and arguments may be evaluated more than once.
+ *
+ * @param cis       Pointer to character input specification.
+ * @param c         The character to be removed from the membership.
+ */
+#define PJ_CIS_CLR(cis,c)   ((cis)->cis_buf[(int)c] = 0)
+
+/**
+ * Check the membership of the specified character.
+ * Note that this is a macro, and arguments may be evaluated more than once.
+ *
+ * @param cis       Pointer to character input specification.
+ * @param c         The character.
+ */
+#define PJ_CIS_ISSET(cis,c) ((cis)->cis_buf[(int)c])
+
+
+
+PJ_END_DECL
+
+#endif	/* __PJLIB_UTIL_SCANNER_CIS_BIT_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/sha1.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/sha1.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/sha1.h	(revision 1163)
@@ -0,0 +1,79 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __PJLIB_UTIL_SHA1_H__
+#define __PJLIB_UTIL_SHA1_H__
+
+/**
+ * @file sha1.h
+ * @brief SHA1 encryption implementation
+ */
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJLIB_UTIL_SHA1 SHA1
+ * @ingroup PJLIB_UTIL_ENCRYPTION
+ * @{
+ */
+
+/** SHA1 context */
+typedef struct pj_sha1_context
+{
+    pj_uint32_t state[5];
+    pj_uint32_t count[2];
+    pj_uint8_t	buffer[64];
+} pj_sha1_context;
+
+/** SHA1 digest size is 20 bytes */
+#define PJ_SHA1_DIGEST_SIZE	20
+
+
+/** Initialize the algorithm. 
+ *  @param ctx		SHA1 context.
+ */
+PJ_DECL(void) pj_sha1_init(pj_sha1_context *ctx);
+
+/** Append a stream to the message. 
+ *  @param ctx		SHA1 context.
+ *  @param data		Data.
+ *  @param nbytes	Length of data.
+ */
+PJ_DECL(void) pj_sha1_update(pj_sha1_context *ctx, 
+			     const pj_uint8_t *data, 
+			     const pj_size_t nbytes);
+
+/** Finish the message and return the digest. 
+ *  @param ctx		SHA1 context.
+ *  @param digest	16 byte digest.
+ */
+PJ_DECL(void) pj_sha1_final(pj_sha1_context *ctx, 
+			    pj_uint8_t digest[PJ_SHA1_DIGEST_SIZE]);
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJLIB_UTIL_SHA1_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/srv_resolver.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/srv_resolver.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/srv_resolver.h	(revision 1163)
@@ -0,0 +1,162 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJLIB_UTIL_SRV_RESOLVER_H__
+#define __PJLIB_UTIL_SRV_RESOLVER_H__
+
+/**
+ * @file srv_resolver.h
+ * @brief DNS SRV resolver
+ */
+#include <pjlib-util/resolver.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_DNS_SRV_RESOLVER DNS SRV Resolution Helper
+ * @ingroup PJ_DNS
+ * @{
+ *
+ * \subsection PJ_DNS_SRV_RESOLVER_INTRO DNS SRV Resolution Helper
+ *
+ * This module provides an even higher layer of abstraction for the DNS
+ * resolution framework, to resolve DNS SRV names.
+ *
+ * The #pj_dns_srv_resolve() function will asynchronously resolve the server
+ * name into IP address(es) with a single function call. If the SRV name
+ * contains multiple names, then each will be resolved with individual
+ * DNS A resolution to get the IP addresses. Upon successful completion, 
+ * application callback will be called with each IP address of the
+ * target selected based on the load-balancing and fail-over criteria
+ * below.
+ *
+ * When the resolver fails to resolve the name using DNS SRV resolution
+ * (for example when the DNS SRV record is not present in the DNS server),
+ * the resolver will fallback to using DNS A record resolution to resolve
+ * the name.
+ *
+ * \subsection PJ_DNS_SRV_RESOLVER_FAILOVER_LOADBALANCE Load-Balancing and Fail-Over
+ *
+ * When multiple targets are returned in the DNS SRV response, server entries
+ * are selected based on the following rule (which is described in RFC 2782):
+ *  - targets will be sorted based on the priority first.
+ *  - for targets with the same priority, #pj_dns_srv_resolve() will select
+ *    only one target according to its weight. To select this one target,
+ *    the function associates running-sum for all targets, and generates 
+ *    a random number between zero and the total running-sum (inclusive).
+ *    The target selected is the first target with running-sum greater than
+ *    or equal to this random number.
+ *
+ * The above procedure will select one target for each priority, allowing
+ * application to fail-over to the next target when the previous target fails.
+ * These targets are returned in the #pj_dns_srv_record structure 
+ * argument of the callback. 
+ *
+ * \section PJ_DNS_SRV_RESOLVER_REFERENCE Reference
+ *
+ * Reference:
+ *  - <A HREF="http://www.ietf.org/rfc/rfc2782.txt">RFC 2782</A>: 
+ *	A DNS RR for specifying the location of services (DNS SRV)
+ */
+
+/**
+ * Maximum server address entries per one SRV record
+ */
+#ifndef PJ_DNS_SRV_MAX_ADDR
+#   define PJ_DNS_SRV_MAX_ADDR	    8
+#endif
+
+
+/**
+ * The server addresses returned by the resolver.
+ */
+typedef struct pj_dns_srv_record
+{
+    /** Number of address records. */
+    unsigned	count;
+
+    /** Address records. */
+    struct
+    {
+	/** Server priority (the lower the higher the priority). */
+	unsigned		priority;
+
+	/** Server weight (the higher the more load it can handle). */
+	unsigned		weight;
+
+	/** The server's address. */
+	pj_sockaddr		addr;
+
+	/** Address length. */
+	int			addr_len;
+
+    } entry[PJ_DNS_SRV_MAX_ADDR];
+
+} pj_dns_srv_record;
+
+
+/**
+ * Type of callback function to receive notification from the resolver
+ * when the resolution process completes.
+ */
+typedef void pj_dns_srv_resolver_cb(void *user_data,
+				    pj_status_t status,
+				    const pj_dns_srv_record *rec);
+
+
+/**
+ * Start DNS SRV resolution for the specified name. The full name of the
+ * entry will be concatenated from \a res_name and \a domain_name fragments.
+ *
+ * @param domain_name	The domain name part of the name.
+ * @param res_name	The full service name, including the transport name
+ *			and with all the leading underscore characters and
+ *			ending dot (e.g. "_sip._udp.", "_stun._udp.").
+ * @param def_port	The port number to be assigned to the resolved address
+ *			when the DNS SRV resolution fails and the name is 
+ *			resolved with DNS A resolution.
+ * @param pool		Memory pool used to allocate memory for the query.
+ * @param resolver	The resolver instance.
+ * @param fallback_a	Specify if the resolver should fallback with DNS A
+ *			resolution when the SRV resolution fails.
+ * @param token		Arbitrary data to be associated with this query when
+ *			the calback is called.
+ * @param cb		Pointer to callback function to receive the
+ *			notification when the resolution process completes.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_dns_srv_resolve(const pj_str_t *domain_name,
+					const pj_str_t *res_name,
+					unsigned def_port,
+					pj_pool_t *pool,
+					pj_dns_resolver *resolver,
+					pj_bool_t fallback_a,
+					void *token,
+					pj_dns_srv_resolver_cb *cb);
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJLIB_UTIL_SRV_RESOLVER_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/string.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/string.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/string.h	(revision 1163)
@@ -0,0 +1,101 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 __PJLIB_UTIL_STRING_H__
+#define __PJLIB_UTIL_STRING_H__
+
+/**
+ * @file string.h
+ * @brief More string functions.
+ */
+
+#include <pj/types.h>
+#include <pjlib-util/scanner.h>
+
+/**
+ * @defgroup PJLIB_UTIL_STRING String Escaping Utilities
+ * @ingroup PJLIB_UTIL
+ * @{
+ */
+
+PJ_BEGIN_DECL
+
+/**
+ * Unescape string. If source string does not contain any escaped
+ * characters, the function would simply return the original string.
+ * Otherwise a new string will be allocated.
+ *
+ * @param pool	    Pool to allocate the string.
+ * @param src	    Source string to unescape.
+ *
+ * @return	    String with no escaped characters.
+ */
+PJ_DECL(pj_str_t) pj_str_unescape( pj_pool_t *pool, const pj_str_t *src);
+
+/**
+ * Unescape string to destination.
+ *
+ * @param dst	    Target string.
+ * @param src	    Source string.
+ *
+ * @return	    Target string.
+ */
+PJ_DECL(pj_str_t*) pj_strcpy_unescape(pj_str_t *dst, const pj_str_t *src);
+
+/**
+ * Copy string to destination while escaping reserved characters, up to
+ * the specified maximum length.
+ *
+ * @param dst	    Target string.
+ * @param src	    Source string.
+ * @param max	    Maximum length to copy to target string.
+ * @param unres	    Unreserved characters, which are allowed to appear 
+ *		    unescaped.
+ *
+ * @return	    The target string if all characters have been copied 
+ *		    successfully, or NULL if there's not enough buffer to
+ *		    escape the strings.
+ */
+PJ_DECL(pj_str_t*) pj_strncpy_escape(pj_str_t *dst, const pj_str_t *src,
+				     pj_ssize_t max, const pj_cis_t *unres);
+
+
+/**
+ * Copy string to destination while escaping reserved characters, up to
+ * the specified maximum length.
+ *
+ * @param dst	    Target string.
+ * @param src	    Source string.
+ * @param max	    Maximum length to copy to target string.
+ * @param unres	    Unreserved characters, which are allowed to appear 
+ *		    unescaped.
+ *
+ * @return	    The length of the destination, or -1 if there's not
+ *		    enough buffer.
+ */
+PJ_DECL(pj_ssize_t) pj_strncpy2_escape(char *dst, const pj_str_t *src,
+				       pj_ssize_t max, const pj_cis_t *unres);
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+#endif	/* __PJLIB_UTIL_STRING_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/stun_simple.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/stun_simple.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/stun_simple.h	(revision 1163)
@@ -0,0 +1,207 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __PJSTUN_H__
+#define __PJSTUN_H__
+
+/**
+ * @file stun.h
+ * @brief STUN client.
+ */
+
+#include <pjlib-util/types.h>
+#include <pj/sock.h>
+
+
+PJ_BEGIN_DECL
+
+/*
+ * This enumeration describes STUN message types.
+ */
+typedef enum pjstun_msg_type
+{
+    PJSTUN_BINDING_REQUEST		    = 0x0001,
+    PJSTUN_BINDING_RESPONSE		    = 0x0101,
+    PJSTUN_BINDING_ERROR_RESPONSE	    = 0x0111,
+    PJSTUN_SHARED_SECRET_REQUEST	    = 0x0002,
+    PJSTUN_SHARED_SECRET_RESPONSE	    = 0x0102,
+    PJSTUN_SHARED_SECRET_ERROR_RESPONSE    = 0x0112
+} pjstun_msg_type;
+
+
+/*
+ * This enumeration describes STUN attribute types.
+ */
+typedef enum pjstun_attr_type
+{
+    PJSTUN_ATTR_MAPPED_ADDR = 1,
+    PJSTUN_ATTR_RESPONSE_ADDR,
+    PJSTUN_ATTR_CHANGE_REQUEST,
+    PJSTUN_ATTR_SOURCE_ADDR,
+    PJSTUN_ATTR_CHANGED_ADDR,
+    PJSTUN_ATTR_USERNAME,
+    PJSTUN_ATTR_PASSWORD,
+    PJSTUN_ATTR_MESSAGE_INTEGRITY,
+    PJSTUN_ATTR_ERROR_CODE,
+    PJSTUN_ATTR_UNKNOWN_ATTRIBUTES,
+    PJSTUN_ATTR_REFLECTED_FORM
+} pjstun_attr_type;
+
+
+/*
+ * This structre describes STUN message header.
+ */
+typedef struct pjstun_msg_hdr
+{
+    pj_uint16_t		type;
+    pj_uint16_t		length;
+    pj_uint32_t		tsx[4];
+} pjstun_msg_hdr;
+
+
+/*
+ * This structre describes STUN attribute header.
+ */
+typedef struct pjstun_attr_hdr
+{
+    pj_uint16_t		type;
+    pj_uint16_t		length;
+} pjstun_attr_hdr;
+
+
+/*
+ * This structre describes STUN MAPPED-ADDR attribute.
+ */
+typedef struct pjstun_mapped_addr_attr
+{
+    pjstun_attr_hdr	hdr;
+    pj_uint8_t		ignored;
+    pj_uint8_t		family;
+    pj_uint16_t		port;
+    pj_uint32_t		addr;
+} pjstun_mapped_addr_attr;
+
+typedef pjstun_mapped_addr_attr pjstun_response_addr_attr;
+typedef pjstun_mapped_addr_attr pjstun_changed_addr_attr;
+typedef pjstun_mapped_addr_attr pjstun_src_addr_attr;
+typedef pjstun_mapped_addr_attr pjstun_reflected_form_attr;
+
+typedef struct pjstun_change_request_attr
+{
+    pjstun_attr_hdr	hdr;
+    pj_uint32_t		value;
+} pjstun_change_request_attr;
+
+typedef struct pjstun_username_attr
+{
+    pjstun_attr_hdr	hdr;
+    pj_uint32_t		value[1];
+} pjstun_username_attr;
+
+typedef pjstun_username_attr pjstun_password_attr;
+
+typedef struct pjstun_error_code_attr
+{
+    pjstun_attr_hdr	hdr;
+    pj_uint16_t		ignored;
+    pj_uint8_t		err_class;
+    pj_uint8_t		number;
+    char		reason[4];
+} pjstun_error_code_attr;
+
+typedef struct pjstun_msg
+{
+    pjstun_msg_hdr    *hdr;
+    int			attr_count;
+    pjstun_attr_hdr   *attr[PJSTUN_MAX_ATTR];
+} pjstun_msg;
+
+/* STUN message API (stun.c). */
+
+PJ_DECL(pj_status_t) pjstun_create_bind_req( pj_pool_t *pool, 
+					      void **msg, pj_size_t *len,
+					      pj_uint32_t id_hi,
+					      pj_uint32_t id_lo);
+PJ_DECL(pj_status_t) pjstun_parse_msg( void *buf, pj_size_t len,
+				        pjstun_msg *msg);
+PJ_DECL(void*) pjstun_msg_find_attr( pjstun_msg *msg, pjstun_attr_type t);
+
+
+/**
+ * @defgroup PJLIB_UTIL_STUN_CLIENT Simple STUN Helper
+ * @ingroup PJLIB_UTIL_STUN
+ * @brief A simple and small footprint STUN resolution helper
+ * @{
+ *
+ * This is the older implementation of STUN client, with only one function
+ * provided (pjstun_get_mapped_addr()) to retrieve the public IP address
+ * of multiple sockets.
+ */
+
+/**
+ * This is the main function to request the mapped address of local sockets
+ * to multiple STUN servers. This function is able to find the mapped 
+ * addresses of multiple sockets simultaneously, and for each socket, two
+ * requests will be sent to two different STUN servers to see if both servers
+ * get the same public address for the same socket. (Note that application can
+ * specify the same address for the two servers, but still two requests will
+ * be sent for each server).
+ *
+ * This function will perform necessary retransmissions of the requests if
+ * response is not received within a predetermined period. When all responses
+ * have been received, the function will compare the mapped addresses returned
+ * by the servers, and when both are equal, the address will be returned in
+ * \a mapped_addr argument.
+ *
+ * @param pf		The pool factory where memory will be allocated from.
+ * @param sock_cnt	Number of sockets in the socket array.
+ * @param sock		Array of local UDP sockets which public addresses are
+ *			to be queried from the STUN servers.
+ * @param srv1		Host name or IP address string of the first STUN
+ *			server.
+ * @param port1		The port number of the first STUN server. 
+ * @param srv2		Host name or IP address string of the second STUN
+ *			server.
+ * @param port2		The port number of the second STUN server. 
+ * @param mapped_addr	Array to receive the mapped public address of the local
+ *			UDP sockets, when the function returns PJ_SUCCESS.
+ *
+ * @return		This functions returns PJ_SUCCESS if responses are
+ *			received from all servers AND all servers returned the
+ *			same mapped public address. Otherwise this function may
+ *			return one of the following error codes:
+ *			- PJLIB_UTIL_ESTUNNOTRESPOND: no respons from servers.
+ *			- PJLIB_UTIL_ESTUNSYMMETRIC: different mapped addresses
+ *			  are returned by servers.
+ *			- etc.
+ *
+ */
+PJ_DECL(pj_status_t) pjstun_get_mapped_addr( pj_pool_factory *pf,
+					      int sock_cnt, pj_sock_t sock[],
+					      const pj_str_t *srv1, int port1,
+					      const pj_str_t *srv2, int port2,
+					      pj_sockaddr_in mapped_addr[]);
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* __PJSTUN_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/types.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/types.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/types.h	(revision 1163)
@@ -0,0 +1,63 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJLIB_UTIL_TYPES_H__
+#define __PJLIB_UTIL_TYPES_H__
+
+/**
+ * @file types.h
+ * @brief PJLIB-UTIL types.
+ */
+
+#include <pj/types.h>
+#include <pjlib-util/config.h>
+
+/**
+ * @defgroup PJLIB_UTIL PJLIB-UTIL Library
+ */
+
+/**
+ * @mainpage PJLIB-UTIL
+ *
+ * \n
+ * \n
+ * \n
+ * This is the documentation of PJLIB-UTIL, an auxiliary library providing
+ * adjunct functions to PJLIB.
+ * 
+ * Please go to the <A HREF="modules.htm"><B>Modules</B></A> page for list
+ * of modules.
+ *
+ *
+ * \n
+ * \n
+ * \n
+ * \n
+ * \n
+ * \n
+ * \n
+ * \n
+ * \n
+ * \n
+ * \n
+ * \n
+ * \n
+ */
+
+#endif	/* __PJLIB_UTIL_TYPES_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/xml.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/xml.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/include/pjlib-util/xml.h	(revision 1163)
@@ -0,0 +1,205 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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_XML_H__
+#define __PJ_XML_H__
+
+/**
+ * @file xml.h
+ * @brief PJLIB XML Parser/Helper.
+ */
+
+#include <pj/types.h>
+#include <pj/list.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_TINY_XML Mini/Tiny XML Parser/Helper
+ * @ingroup PJLIB_UTIL
+ * @{
+ */
+
+/** Typedef for XML attribute. */
+typedef struct pj_xml_attr pj_xml_attr;
+
+/** Typedef for XML nodes. */
+typedef struct pj_xml_node pj_xml_node;
+
+/** This structure declares XML attribute. */
+struct pj_xml_attr
+{
+    PJ_DECL_LIST_MEMBER(pj_xml_attr);   /**< Standard list elements.    */
+    pj_str_t	name;	                /**< Attribute name.            */
+    pj_str_t	value;	                /**< Attribute value.           */
+};
+
+/** This structure describes XML node head inside XML node structure.
+ */
+typedef struct pj_xml_node_head
+{
+    PJ_DECL_LIST_MEMBER(pj_xml_node);   /**< Standard list elements.    */
+} pj_xml_node_head;
+
+/** This structure describes XML node. */
+struct pj_xml_node
+{
+    PJ_DECL_LIST_MEMBER(pj_xml_node);   /**< List @a prev and @a next member */
+    pj_str_t		name;		/**< Node name.                      */
+    pj_xml_attr		attr_head;      /**< Attribute list.                 */
+    pj_xml_node_head	node_head;      /**< Node list.                      */
+    pj_str_t		content;	/**< Node content.                   */
+};
+
+/**
+ * Parse XML message into XML document with a single root node. The parser
+ * is capable of parsing XML processing instruction construct ("<?") and 
+ * XML comments ("<!--"), however such constructs will be ignored and will not 
+ * be included in the resulted XML node tree.
+ *
+ * @param pool	    Pool to allocate memory from.
+ * @param msg	    The XML message to parse.
+ * @param len	    The length of the message.
+ *
+ * @return	    XML root node, or NULL if the XML document can not be parsed.
+ */
+PJ_DECL(pj_xml_node*) pj_xml_parse( pj_pool_t *pool, char *msg, pj_size_t len);
+
+
+/**
+ * Print XML into XML message. Note that the function WILL NOT NULL terminate
+ * the output.
+ *
+ * @param node	    The XML node to print.
+ * @param buf	    Buffer to hold the output message.
+ * @param len	    The length of the buffer.
+ * @param prolog    If set to nonzero, will print XML prolog ("<?xml..")
+ *
+ * @return	    The size of the printed message, or -1 if there is not 
+ *		    sufficient space in the buffer to print the message.
+ */
+PJ_DECL(int) pj_xml_print( const pj_xml_node *node, char *buf, pj_size_t len,
+			   pj_bool_t include_prolog);
+
+/**
+ * Clone XML node and all subnodes.
+ *
+ * @param pool	    Pool to allocate memory for new nodes.
+ * @param rhs	    The node to clone.
+ *
+ * @return	    Cloned XML node, or NULL on fail.
+ */
+PJ_DECL(pj_xml_node*) pj_xml_clone( pj_pool_t *pool, const pj_xml_node *rhs);
+
+
+/**
+ * Create an empty node.
+ *
+ * @param pool	    Pool.
+ * @param name	    Node name.
+ *
+ * @return	    The new node.
+ */
+PJ_DECL(pj_xml_node*) pj_xml_node_new(pj_pool_t *pool, const pj_str_t *name);
+
+
+/**
+ * Create new XML attribute.
+ *
+ * @param pool	    Pool.
+ * @param name	    Attribute name.
+ * @param attr	    Attribute value.
+ *
+ * @return	    The new XML attribute.
+ */
+PJ_DECL(pj_xml_attr*) pj_xml_attr_new(pj_pool_t *pool, const pj_str_t *name,
+				      const pj_str_t *value);
+
+/**
+ * Add node to another node.
+ *
+ * @param parent    Parent node.
+ * @param node	    Node to be added to parent.
+ */
+PJ_DECL(void) pj_xml_add_node( pj_xml_node *parent, pj_xml_node *node );
+
+
+/**
+ * Add attribute to a node.
+ *
+ * @param node	    Node.
+ * @param attr	    Attribute to add to node.
+ */
+PJ_DECL(void) pj_xml_add_attr( pj_xml_node *node, pj_xml_attr *attr );
+
+/**
+ * Find first node with the specified name.
+ *
+ * @param parent    Parent node.
+ * @param name	    Node name to find.
+ *
+ * @return	    XML node found or NULL.
+ */
+PJ_DECL(pj_xml_node*) pj_xml_find_node(pj_xml_node *parent, const pj_str_t *name);
+
+/**
+ * Find first node with the specified name.
+ *
+ * @param parent    Parent node.
+ * @param name	    Node name to find.
+ *
+ * @return	    XML node found or NULL.
+ */
+PJ_DECL(pj_xml_node*) pj_xml_find_next_node(pj_xml_node *parent, pj_xml_node *node,
+					    const pj_str_t *name);
+
+/**
+ * Find first attribute within a node with the specified name and optional value.
+ *
+ * @param node	    XML Node.
+ * @param name	    Attribute name to find.
+ * @param value	    Optional value to match.
+ *
+ * @return	    XML attribute found, or NULL.
+ */
+PJ_DECL(pj_xml_attr*) pj_xml_find_attr(pj_xml_node *node, const pj_str_t *name,
+				       const pj_str_t *value);
+
+
+/**
+ * Find a direct child node with the specified name and match the function.
+ *
+ * @param node	    Parent node.
+ * @param name	    Optional name.
+ * @param data	    Data to be passed to matching function.
+ * @param match	    Optional matching function.
+ *
+ * @return	    The first matched node, or NULL.
+ */
+PJ_DECL(pj_xml_node*) pj_xml_find( pj_xml_node *parent, const pj_str_t *name,
+				   const void *data, 
+				   pj_bool_t (*match)(pj_xml_node *, const void*));
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+#endif	/* __PJ_XML_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/encryption.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/encryption.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/encryption.c	(revision 1163)
@@ -0,0 +1,600 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjlib-util.h>
+#include <pjlib.h>
+
+
+#if INCLUDE_ENCRYPTION_TEST
+
+/*
+ * Encryption algorithm tests.
+ */
+#define THIS_FILE   "encryption.c"
+
+
+/*
+ * SHA1 test from the original sha1.c source file.
+ */
+static char *sha1_test_data[] = {
+    "abc",
+    "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+    "A million repetitions of 'a'"
+};
+static char *sha1_test_results[] = {
+    "A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D",
+    "84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1",
+    "34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F"
+};
+
+
+static void digest_to_hex(const pj_uint8_t digest[PJ_SHA1_DIGEST_SIZE], 
+			  char *output)
+{
+    int i,j;
+    char *c = output;
+    
+    for (i = 0; i < PJ_SHA1_DIGEST_SIZE/4; i++) {
+        for (j = 0; j < 4; j++) {
+            sprintf(c,"%02X", digest[i*4+j]);
+            c += 2;
+        }
+        sprintf(c, " ");
+        c += 1;
+    }
+    *(c - 1) = '\0';
+}
+
+static int sha1_test1(void)
+{
+    int k;
+    pj_sha1_context context;
+    pj_uint8_t digest[20];
+    char output[80];
+
+    PJ_LOG(3, (THIS_FILE, "  SHA1 test vector 1 from sha1.c.."));
+    
+    for (k = 0; k < 2; k++){ 
+        pj_sha1_init(&context);
+        pj_sha1_update(&context, (pj_uint8_t*)sha1_test_data[k], 
+		       pj_ansi_strlen(sha1_test_data[k]));
+        pj_sha1_final(&context, digest);
+	digest_to_hex(digest, output);
+
+        if (pj_ansi_strcmp(output, sha1_test_results[k])) {
+	    PJ_LOG(3, (THIS_FILE, "    incorrect hash result on k=%d", k));
+            return -10;
+        }
+    }
+
+    /* million 'a' vector we feed separately */
+    pj_sha1_init(&context);
+    for (k = 0; k < 1000000; k++)
+        pj_sha1_update(&context, (pj_uint8_t*)"a", 1);
+    pj_sha1_final(&context, digest);
+    digest_to_hex(digest, output);
+    if (strcmp(output, sha1_test_results[2])) {
+	PJ_LOG(3, (THIS_FILE, "    incorrect hash result!"));
+        return -20;
+    }
+
+    /* success */
+    return(0);
+}
+
+
+/*
+ * SHA1 test from RFC 3174
+ */
+/*
+ *  Define patterns for testing
+ */
+#define TEST1   "abc"
+#define TEST2a  "abcdbcdecdefdefgefghfghighijhi"
+#define TEST2b  "jkijkljklmklmnlmnomnopnopq"
+#define TEST2   TEST2a TEST2b
+#define TEST3   "a"
+#define TEST4a  "01234567012345670123456701234567"
+#define TEST4b  "01234567012345670123456701234567"
+    /* an exact multiple of 512 bits */
+#define TEST4   TEST4a TEST4b
+
+static char *testarray[4] =
+{
+    TEST1,
+    TEST2,
+    TEST3,
+    TEST4
+};
+static int repeatcount[4] = { 1, 1, 1000000, 10 };
+static char *resultarray[4] =
+{
+    "A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D",
+    "84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1",
+    "34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F",
+    "DEA356A2 CDDD90C7 A7ECEDC5 EBB56393 4F460452"
+};
+
+static int sha1_test2(void)
+{
+    pj_sha1_context sha;
+    int i;
+    pj_uint8_t digest[20];
+    char char_digest[64];
+
+    PJ_LOG(3, (THIS_FILE, "  SHA1 test vector 2 from rfc 3174.."));
+
+    for(i = 0; i < 4; ++i) {
+	int j;
+
+        pj_sha1_init(&sha);
+
+        for(j = 0; j < repeatcount[i]; ++j) {
+            pj_sha1_update(&sha,
+			   (const pj_uint8_t *) testarray[i],
+			   pj_ansi_strlen(testarray[i]));
+        }
+
+        pj_sha1_final(&sha, digest);
+
+	digest_to_hex(digest, char_digest);
+	if (pj_ansi_strcmp(char_digest, resultarray[i])) {
+	    PJ_LOG(3, (THIS_FILE, "    digest mismatch in test %d", i));
+	    return -40;
+	}
+    }
+
+    return 0;
+}
+
+
+/*
+ * HMAC-MD5 and HMAC-SHA1 test vectors from RFC 2202
+ */
+struct rfc2202_test
+{
+    char       *key;
+    unsigned	key_len;
+    char       *input;
+    unsigned	input_len;
+    char       *md5_digest;
+    char       *sha1_digest;
+};
+
+
+struct rfc2202_test rfc2202_test_vector[] = 
+{
+    {
+	"\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
+	16,
+	"Hi There",
+	8,
+	"\x92\x94\x72\x7a\x36\x38\xbb\x1c\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
+	NULL
+    },
+    {
+	"\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
+	"\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
+	20,
+	"Hi There",
+	8,
+	NULL,
+	"\xb6\x17\x31\x86\x55\x05\x72\x64\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1\x46\xbe\x00"
+    },
+    {
+	"Jefe",
+	4,
+	"what do ya want for nothing?",
+	28,
+	"\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
+	"\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79"
+    },
+    {
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa",
+	16,
+	"\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+	"\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+	"\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+	"\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+	"\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
+	50,
+	"\x56\xbe\x34\x52\x1d\x14\x4c\x88\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
+	NULL
+    },
+    {
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
+	20,
+	"\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+	"\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+	"\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+	"\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
+	"\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
+	50,
+	NULL,
+	"\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3"
+    },
+    {
+	"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19",
+	25,
+	"\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+	"\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+	"\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+	"\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
+	"\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
+	50,
+	"\x69\x7e\xaf\x0a\xca\x3a\x3a\xea\x3a\x75\x16\x47\x46\xff\xaa\x79",
+	"\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda"
+    },
+    {
+	"\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
+	"\x0c\x0c\x0c\x0c\x0c\x0c",
+	16,
+	"Test With Truncation",
+	20,
+	"\x56\x46\x1e\xf2\x34\x2e\xdc\x00\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
+	NULL
+    },
+    {
+	"\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
+	"\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
+	20,
+	"Test With Truncation",
+	20,
+	NULL,
+	"\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04"
+    },
+    {
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
+	80,
+	"Test Using Larger Than Block-Size Key - Hash Key First",
+	54,
+	"\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
+	"\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12"
+    },
+    {
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
+	"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
+	80,
+	"Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data",
+	73,
+	"\x6f\x63\x0f\xad\x67\xcd\xa0\xee\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
+	"\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91"
+    }
+};
+
+
+static int rfc2202_test(void)
+{
+    unsigned i;
+
+    PJ_LOG(3, (THIS_FILE, "  verifying test vectors from rfc 2202.."));
+
+    /* Verify that test vectors are valid */
+    for (i=0; i<PJ_ARRAY_SIZE(rfc2202_test_vector); ++i) {
+	PJ_ASSERT_RETURN(pj_ansi_strlen(rfc2202_test_vector[i].input) == 
+			    rfc2202_test_vector[i].input_len, -50);
+	PJ_ASSERT_RETURN(pj_ansi_strlen(rfc2202_test_vector[i].key) == 
+			    rfc2202_test_vector[i].key_len, -52);
+	PJ_ASSERT_RETURN(rfc2202_test_vector[i].md5_digest==NULL ||
+			    pj_ansi_strlen(rfc2202_test_vector[i].md5_digest)<=16,
+			    -54);
+	PJ_ASSERT_RETURN(rfc2202_test_vector[i].sha1_digest==NULL ||
+			    pj_ansi_strlen(rfc2202_test_vector[i].sha1_digest)<=20,
+			    -56);
+    }
+
+    /* Test HMAC-MD5 */
+    PJ_LOG(3, (THIS_FILE, "  HMAC-MD5 test vectors from rfc 2202.."));
+    for (i=0; i<PJ_ARRAY_SIZE(rfc2202_test_vector); ++i) {
+	pj_uint8_t digest_buf[18], *digest;
+
+	if (rfc2202_test_vector[i].md5_digest == NULL)
+	    continue;
+
+	digest_buf[0] = '\0';
+	digest_buf[17] = '\0';
+
+	digest = digest_buf+1;
+
+	pj_hmac_md5((pj_uint8_t*)rfc2202_test_vector[i].input, 
+		    rfc2202_test_vector[i].input_len,
+		    (pj_uint8_t*)rfc2202_test_vector[i].key, 
+		    rfc2202_test_vector[i].key_len,
+		    digest);
+
+	/* Check for overwrites */
+	if (digest_buf[0] != '\0' || digest_buf[17] != '\0') {
+	    PJ_LOG(3, (THIS_FILE, "    error: overwriting outside buffer on test %d", i));
+	    return -60;
+	}
+
+	/* Compare digest */
+	if (pj_memcmp(rfc2202_test_vector[i].md5_digest, digest, 16)) {
+	    PJ_LOG(3, (THIS_FILE, "    error: digest mismatch on test %d", i));
+	    return -65;
+	}
+    }
+
+    /* Test HMAC-SHA1 */
+    PJ_LOG(3, (THIS_FILE, "  HMAC-SHA1 test vectors from rfc 2202.."));
+    for (i=0; i<PJ_ARRAY_SIZE(rfc2202_test_vector); ++i) {
+	pj_uint8_t digest_buf[22], *digest;
+
+	if (rfc2202_test_vector[i].sha1_digest == NULL)
+	    continue;
+
+	digest_buf[0] = '\0';
+	digest_buf[21] = '\0';
+
+	digest = digest_buf+1;
+
+	pj_hmac_sha1((pj_uint8_t*)rfc2202_test_vector[i].input, 
+		     rfc2202_test_vector[i].input_len,
+		     (pj_uint8_t*)rfc2202_test_vector[i].key, 
+		     rfc2202_test_vector[i].key_len,
+		     digest);
+
+	/* Check for overwrites */
+	if (digest_buf[0] != '\0' || digest_buf[21] != '\0') {
+	    PJ_LOG(3, (THIS_FILE, "    error: overwriting outside buffer on test %d", i));
+	    return -70;
+	}
+
+	/* Compare digest */
+	if (pj_memcmp(rfc2202_test_vector[i].sha1_digest, digest, 20)) {
+	    PJ_LOG(3, (THIS_FILE, "    error: digest mismatch on test %d", i));
+	    return -75;
+	}
+    }
+
+
+    /* Success */
+    return 0;
+}
+
+/* CRC32 test data, generated from crc32 test on a Linux box */
+struct
+{
+    char	    *input;
+    pj_uint32_t	     crc;
+} crc32_test_data[] = 
+{
+    {
+	"",
+	0x0
+    },
+    {
+	"Hello World",
+	0x4a17b156
+    },
+    {
+	/* Something read from /dev/random */
+	"\x21\x21\x98\x10\x62\x59\xbc\x58\x42\x24\xe5\xf3\x92\x0a\x68\x3c\xa7\x67\x73\xc3",
+	0x506693be
+    },
+    {
+	"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+	0xcab11777
+    },
+    {
+	"123456789",
+	0xCBF43926
+    }
+};
+
+/*
+ * CRC32 test
+ */
+static int crc32_test(void)
+{
+    unsigned i;
+
+    PJ_LOG(3, (THIS_FILE, "  crc32 test.."));
+
+    /* testing pj_crc32_calc */
+    for (i=0; i<PJ_ARRAY_SIZE(crc32_test_data); ++i) {
+	pj_uint32_t crc;
+
+	crc = pj_crc32_calc((pj_uint8_t*)crc32_test_data[i].input,
+			    pj_ansi_strlen(crc32_test_data[i].input));
+	if (crc != crc32_test_data[i].crc) {
+	    PJ_LOG(3,(THIS_FILE, "    error: crc mismatch on test %d", i));
+	    return -80;
+	}
+    }
+
+    /* testing incremental CRC32 calculation */
+    for (i=0; i<PJ_ARRAY_SIZE(crc32_test_data); ++i) {
+	pj_crc32_context ctx;
+	pj_uint32_t crc0, crc1;
+	unsigned len;
+
+	len = pj_ansi_strlen(crc32_test_data[i].input);
+	crc0 = pj_crc32_calc((pj_uint8_t*)crc32_test_data[i].input, len);
+
+	pj_crc32_init(&ctx);
+	pj_crc32_update(&ctx, (pj_uint8_t*)crc32_test_data[i].input,
+			len / 2);
+
+	if (len/2 > 0) {
+	    pj_crc32_update(&ctx, (pj_uint8_t*)crc32_test_data[i].input + len/2,
+			    len - len/2);
+	}
+
+	crc1 = pj_crc32_final(&ctx);
+
+	if (crc0 != crc1) {
+	    PJ_LOG(3,(THIS_FILE, 
+		      "    error: crc algorithm error on test %d", i));
+	    return -85;
+	}
+
+    }
+    return 0;
+}
+
+
+int encryption_test()
+{
+    int rc;
+
+    rc = sha1_test1();
+    if (rc != 0)
+	return rc;
+
+    rc = sha1_test2();
+    if (rc != 0)
+	return rc;
+
+    rc = rfc2202_test();
+    if (rc != 0)
+	return rc;
+
+    rc = crc32_test();
+    if (rc != 0)
+	return rc;
+
+    return 0;
+}
+
+static void crc32_update(pj_crc32_context *c, const pj_uint8_t *data,
+			 pj_size_t nbytes)
+{
+    pj_crc32_update(c, data, nbytes);
+}
+
+static void crc32_final(pj_crc32_context *ctx, pj_uint32_t *digest)
+{
+    *digest = pj_crc32_final(ctx);
+}
+
+int encryption_benchmark()
+{
+    pj_pool_t *pool;
+    pj_uint8_t *input;
+    union {
+	pj_md5_context md5_context;
+	pj_sha1_context sha1_context;
+    } context;
+    pj_uint8_t digest[32];
+    pj_size_t input_len;
+    struct algorithm
+    {
+	const char *name;
+	void (*init_context)(void*);
+	void (*update)(void*, const pj_uint8_t*, unsigned);
+	void (*final)(void*, void*);
+	pj_uint32_t t;
+    } algorithms[] = 
+    {
+	{
+	    "MD5  ",
+	    (void (*)(void*))&pj_md5_init,
+	    (void (*)(void*, const pj_uint8_t*, unsigned))&pj_md5_update,
+	    (void (*)(void*, void*))&pj_md5_final
+	},
+	{
+	    "SHA1 ",
+	    (void (*)(void*))&pj_sha1_init,
+	    (void (*)(void*, const pj_uint8_t*, unsigned))&pj_sha1_update,
+	    (void (*)(void*, void*))&pj_sha1_final
+	},
+	{
+	    "CRC32",
+	    (void (*)(void*))&pj_crc32_init,
+	    (void (*)(void*, const pj_uint8_t*, unsigned))&crc32_update,
+	    (void (*)(void*, void*))&crc32_final
+	}
+    };
+#if defined(PJ_DEBUG) && PJ_DEBUG!=0
+    enum { LOOP = 1000 };
+#else
+    enum { LOOP = 10000 };
+#endif
+    unsigned i;
+    double total_len;
+
+    input_len = 2048;
+    total_len = input_len * LOOP;
+    pool = pj_pool_create(mem, "enc", input_len+256, 0, NULL);
+    if (!pool)
+	return PJ_ENOMEM;
+
+    input = pj_pool_alloc(pool, input_len);
+    pj_memset(input, '\xaa', input_len);
+    
+    PJ_LOG(3, (THIS_FILE, "  feeding %d Mbytes of data",
+	       (unsigned)(total_len/1024/1024)));
+
+    /* Dry run */
+    for (i=0; i<PJ_ARRAY_SIZE(algorithms); ++i) {
+	algorithms[i].init_context(&context);
+	algorithms[i].update(&context, input, input_len);
+	algorithms[i].final(&context, digest);
+    }
+
+    /* Run */
+    for (i=0; i<PJ_ARRAY_SIZE(algorithms); ++i) {
+	int j;
+	pj_timestamp t1, t2;
+
+	pj_get_timestamp(&t1);
+	algorithms[i].init_context(&context);
+	for (j=0; j<LOOP; ++j) {
+	    algorithms[i].update(&context, input, input_len);
+	}
+	algorithms[i].final(&context, digest);
+	pj_get_timestamp(&t2);
+
+	algorithms[i].t = pj_elapsed_usec(&t1, &t2);
+    }
+
+    /* Results */
+    for (i=0; i<PJ_ARRAY_SIZE(algorithms); ++i) {
+	double bytes;
+
+	bytes = (total_len * 1000000 / algorithms[i].t);
+	PJ_LOG(3, (THIS_FILE, "    %s:%8d usec (%3d.%03d Mbytes/sec)",
+		   algorithms[i].name, algorithms[i].t,
+		   (unsigned)(bytes / 1024 / 1024),
+		   ((unsigned)(bytes) % (1024 * 1024)) / 1024));
+    }
+
+    return 0;
+}
+
+
+
+#endif /* INCLUDE_ENCRYPTION_TEST */
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/main.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/main.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/main.c	(revision 1163)
@@ -0,0 +1,53 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+
+#if defined(PJ_SUNOS) && PJ_SUNOS!=0
+#include <signal.h>
+static void init_signals()
+{
+    struct sigaction act;
+
+    memset(&act, 0, sizeof(act));
+    act.sa_handler = SIG_IGN;
+
+    sigaction(SIGALRM, &act, NULL);
+}
+
+#else
+#define init_signals()
+#endif
+
+#define boost()
+
+int main(int argc, char *argv[])
+{
+    int rc;
+
+    PJ_UNUSED_ARG(argc);
+    PJ_UNUSED_ARG(argv);
+
+    boost();
+    init_signals();
+
+    rc = test_main();
+
+    return rc;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/main_rtems.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/main_rtems.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/main_rtems.c	(revision 1163)
@@ -0,0 +1,11 @@
+
+/* 
+ *  !! OIY OIY !!
+ *
+ *  The purpose of this file is only to get pjlib-util-test linked. I haven't
+ *  actually tried to run pjlib-util-test on RTEMS!!
+ *
+ */
+
+
+#include "../../pjlib/src/pjlib-test/main_rtems.c"
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/stun.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/stun.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/stun.c	(revision 1163)
@@ -0,0 +1,118 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+static int decode_test(void)
+{
+    /* Invalid message type */
+
+    /* Short message */
+
+    /* Long, random message */
+
+    /* Message length in header is shorter */
+
+    /* Message length in header is longer */
+
+    /* Invalid magic */
+
+    /* Attribute length is not valid */
+
+    /* Unknown mandatory attribute type should generate error */
+
+    /* Unknown but non-mandatory should be okay */
+
+    /* String/binary attribute length is larger than the message */
+
+    /* Valid message with MESSAGE-INTEGRITY */
+
+    /* Valid message with FINGERPRINT */
+
+    /* Valid message with MESSAGE-INTEGRITY and FINGERPRINT */
+
+    /* Another attribute not FINGERPRINT exists after MESSAGE-INTEGRITY */
+
+    /* Another attribute exists after FINGERPRINT */
+
+    return 0;
+}
+
+static int decode_verify(void)
+{
+    /* Decode all attribute types */
+    return 0;
+}
+
+static int auth_test(void)
+{
+    /* REALM and USERNAME is present, but MESSAGE-INTEGRITY is not present.
+     * For short term, must with reply 401 without REALM.
+     * For long term, must reply with 401 with REALM.
+     */
+
+    /* USERNAME is not present, server must respond with 432 (Missing
+     * Username).
+     */
+
+    /* If long term credential is wanted and REALM is not present, server 
+     * must respond with 434 (Missing Realm) 
+     */
+
+    /* If REALM doesn't match, server must respond with 434 (Missing Realm)
+     * too, containing REALM and NONCE attribute.
+     */
+
+    /* When long term authentication is wanted and NONCE is NOT present,
+     * server must respond with 435 (Missing Nonce), containing REALM and
+     * NONCE attribute.
+     */
+
+    /* Simulate 438 (Stale Nonce) */
+    
+    /* Simulate 436 (Unknown Username) */
+
+    /* When server wants to use short term credential, but request has
+     * REALM, reject with .... ???
+     */
+
+    /* Invalid HMAC */
+
+    /* Valid static short term, without NONCE */
+
+    /* Valid static short term, WITH NONCE */
+
+    /* Valid static long term (with NONCE */
+
+    /* Valid dynamic short term (without NONCE) */
+
+    /* Valid dynamic short term (with NONCE) */
+
+    /* Valid dynamic long term (with NONCE) */
+
+    return 0;
+}
+
+
+int stun_test(void)
+{
+    decode_verify();
+    decode_test();
+    auth_test();
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/test.c	(revision 1163)
@@ -0,0 +1,98 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjlib.h>
+
+void app_perror(const char *msg, pj_status_t rc)
+{
+    char errbuf[256];
+
+    PJ_CHECK_STACK();
+
+    pj_strerror(rc, errbuf, sizeof(errbuf));
+    PJ_LOG(1,("test", "%s: [pj_status_t=%d] %s", msg, rc, errbuf));
+}
+
+#define DO_TEST(test)	do { \
+			    PJ_LOG(3, ("test", "Running %s...", #test));  \
+			    rc = test; \
+			    PJ_LOG(3, ("test",  \
+				       "%s(%d)",  \
+				       (char*)(rc ? "..ERROR" : "..success"), rc)); \
+			    if (rc!=0) goto on_return; \
+			} while (0)
+
+
+pj_pool_factory *mem;
+
+
+static int test_inner(void)
+{
+    pj_caching_pool caching_pool;
+    int rc = 0;
+
+    mem = &caching_pool.factory;
+
+    pj_log_set_level(3);
+    pj_log_set_decor(PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_TIME | 
+                     PJ_LOG_HAS_MICRO_SEC);
+
+    rc = pj_init();
+    if (rc != 0) {
+	app_perror("pj_init() error!!", rc);
+	return rc;
+    }
+    
+    pj_dump_config();
+    pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy, 0 );
+
+#if INCLUDE_XML_TEST
+    DO_TEST(xml_test());
+#endif
+
+#if INCLUDE_ENCRYPTION_TEST
+    DO_TEST(encryption_test());
+    DO_TEST(encryption_benchmark());
+#endif
+
+#if INCLUDE_STUN_TEST
+    DO_TEST(stun_test());
+#endif
+
+on_return:
+    return rc;
+}
+
+int test_main(void)
+{
+    PJ_USE_EXCEPTION;
+
+    PJ_TRY {
+        return test_inner();
+    }
+    PJ_CATCH_ANY {
+        int id = PJ_GET_EXCEPTION();
+        PJ_LOG(3,("test", "FATAL: unhandled exception id %d (%s)", 
+                  id, pj_exception_id_name(id)));
+    }
+    PJ_END;
+
+    return -1;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/test.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/test.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/test.h	(revision 1163)
@@ -0,0 +1,33 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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/types.h>
+
+#define INCLUDE_XML_TEST	    1
+#define INCLUDE_ENCRYPTION_TEST	    1
+#define INCLUDE_STUN_TEST	    1
+
+extern int xml_test(void);
+extern int encryption_test();
+extern int encryption_benchmark();
+extern int stun_test();
+extern int test_main(void);
+
+extern void app_perror(const char *title, pj_status_t rc);
+extern pj_pool_factory *mem;
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/xml.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/xml.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util-test/xml.c	(revision 1163)
@@ -0,0 +1,144 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+
+
+#if INCLUDE_XML_TEST
+
+#include <pjlib-util/xml.h>
+#include <pjlib.h>
+
+#define THIS_FILE   "xml_test"
+
+static const char *xml_doc[] =
+{
+"   <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"   <p:pidf-full xmlns=\"urn:ietf:params:xml:ns:pidf\"\n"
+"          xmlns:p=\"urn:ietf:params:xml:ns:pidf-diff\"\n"
+"          xmlns:r=\"urn:ietf:params:xml:ns:pidf:rpid\"\n"
+"          xmlns:c=\"urn:ietf:params:xml:ns:pidf:caps\"\n"
+"          entity=\"pres:someone@example.com\"\n"
+"          version=\"567\">\n"
+"\n"
+"    <tuple id=\"sg89ae\">\n"
+"     <status>\n"
+"      <basic>open</basic>\n"
+"      <r:relationship>assistant</r:relationship>\n"
+"     </status>\n"
+"     <c:servcaps>\n"
+"      <c:audio>true</c:audio>\n"
+"      <c:video>false</c:video>\n"
+"      <c:message>true</c:message>\n"
+"     </c:servcaps>\n"
+"     <contact priority=\"0.8\">tel:09012345678</contact>\n"
+"    </tuple>\n"
+"\n"
+"    <tuple id=\"cg231jcr\">\n"
+"     <status>\n"
+"      <basic>open</basic>\n"
+"     </status>\n"
+"     <contact priority=\"1.0\">im:pep@example.com</contact>\n"
+"    </tuple>\n"
+"\n"
+"    <tuple id=\"r1230d\">\n"
+"     <status>\n"
+"      <basic>closed</basic>\n"
+"      <r:activity>meeting</r:activity>\n"
+"     </status>\n"
+"     <r:homepage>http://example.com/~pep/</r:homepage>\n"
+"     <r:icon>http://example.com/~pep/icon.gif</r:icon>\n"
+"     <r:card>http://example.com/~pep/card.vcd</r:card>\n"
+"     <contact priority=\"0.9\">sip:pep@example.com</contact>\n"
+"    </tuple>\n"
+"\n"
+"    <note xml:lang=\"en\">Full state presence document</note>\n"
+"\n"
+"    <r:person>\n"
+"     <r:status>\n"
+"      <r:activities>\n"
+"       <r:on-the-phone/>\n"
+"       <r:busy/>\n"
+"      </r:activities>\n"
+"     </r:status>\n"
+"    </r:person>\n"
+"\n"
+"    <r:device id=\"urn:esn:600b40c7\">\n"
+"     <r:status>\n"
+"      <c:devcaps>\n"
+"       <c:mobility>\n"
+"        <c:supported>\n"
+"         <c:mobile/>\n"
+"        </c:supported>\n"
+"       </c:mobility>\n"
+"      </c:devcaps>\n"
+"     </r:status>\n"
+"    </r:device>\n"
+"\n"
+"   </p:pidf-full>\n"
+}
+;
+
+static int xml_parse_print_test(const char *doc)
+{
+    pj_str_t msg;
+    pj_pool_t *pool;
+    pj_xml_node *root;
+    char *output;
+    int output_len;
+
+    pool = pj_pool_create(mem, "xml", 4096, 1024, NULL);
+    pj_strdup2(pool, &msg, doc);
+    root = pj_xml_parse(pool, msg.ptr, msg.slen);
+    if (!root) {
+	PJ_LOG(1, (THIS_FILE, "  Error: unable to parse XML"));
+	return -10;
+    }
+
+    output = (char*)pj_pool_zalloc(pool, msg.slen + 512);
+    output_len = pj_xml_print(root, output, msg.slen+512, PJ_TRUE);
+    if (output_len < 1) {
+	PJ_LOG(1, (THIS_FILE, "  Error: buffer too small to print XML file"));
+	return -20;
+    }
+    output[output_len] = '\0';
+
+
+    pj_pool_release(pool);
+    return 0;
+}
+
+int xml_test()
+{
+    unsigned i;
+    for (i=0; i<sizeof(xml_doc)/sizeof(xml_doc[0]); ++i) {
+	int status;
+	if ((status=xml_parse_print_test(xml_doc[i])) != 0)
+	    return status;
+    }
+    return 0;
+}
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_xml_test;
+#endif	/* INCLUDE_XML_TEST */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/crc32.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/crc32.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/crc32.c	(revision 1163)
@@ -0,0 +1,238 @@
+/* $Id$ */
+/*
+ * This is an implementation of CRC32. See ISO 3309 and ITU-T V.42 
+ * for a formal specification
+ *
+ * This file is partly taken from Crypto++ library (http://www.cryptopp.com)
+ * and http://www.di-mgt.com.au/crypto.html#CRC.
+ *
+ * Since the original version of the code is put in public domain,
+ * this file is put on public domain as well.
+ */
+#include <pjlib-util/crc32.h>
+
+
+#define CRC32_NEGL  0xffffffffL
+
+#if defined(PJ_CRC32_HAS_TABLES) && PJ_CRC32_HAS_TABLES!=0
+// crc.cpp - written and placed in the public domain by Wei Dai
+
+/* Table of CRC-32's of all single byte values (made by makecrc.c) */
+#if defined(PJ_IS_LITTLE_ENDIAN) && PJ_IS_LITTLE_ENDIAN != 0
+
+#define CRC32_INDEX(c)	    (c & 0xff)
+#define CRC32_SHIFTED(c)    (c >> 8)
+
+static const pj_uint32_t crc_tab[] = {
+    0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L,
+    0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L,
+    0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L,
+    0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL,
+    0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L,
+    0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L,
+    0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L,
+    0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL,
+    0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L,
+    0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL,
+    0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L,
+    0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L,
+    0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L,
+    0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL,
+    0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL,
+    0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L,
+    0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL,
+    0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L,
+    0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L,
+    0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L,
+    0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL,
+    0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L,
+    0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L,
+    0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL,
+    0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L,
+    0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L,
+    0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L,
+    0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L,
+    0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L,
+    0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL,
+    0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL,
+    0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L,
+    0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L,
+    0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL,
+    0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL,
+    0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L,
+    0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL,
+    0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L,
+    0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL,
+    0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L,
+    0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL,
+    0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L,
+    0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L,
+    0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL,
+    0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L,
+    0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L,
+    0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L,
+    0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L,
+    0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L,
+    0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L,
+    0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL,
+    0x2d02ef8dL
+};
+
+
+#elif defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN != 0
+#define CRC32_INDEX(c)	    (c >> 24)
+#define CRC32_SHIFTED(c)    (c << 8)
+
+static const pj_uint32_t crc_tab[] = {
+    0x00000000L, 0x96300777L, 0x2c610eeeL, 0xba510999L, 0x19c46d07L,
+    0x8ff46a70L, 0x35a563e9L, 0xa395649eL, 0x3288db0eL, 0xa4b8dc79L,
+    0x1ee9d5e0L, 0x88d9d297L, 0x2b4cb609L, 0xbd7cb17eL, 0x072db8e7L,
+    0x911dbf90L, 0x6410b71dL, 0xf220b06aL, 0x4871b9f3L, 0xde41be84L,
+    0x7dd4da1aL, 0xebe4dd6dL, 0x51b5d4f4L, 0xc785d383L, 0x56986c13L,
+    0xc0a86b64L, 0x7af962fdL, 0xecc9658aL, 0x4f5c0114L, 0xd96c0663L,
+    0x633d0ffaL, 0xf50d088dL, 0xc8206e3bL, 0x5e10694cL, 0xe44160d5L,
+    0x727167a2L, 0xd1e4033cL, 0x47d4044bL, 0xfd850dd2L, 0x6bb50aa5L,
+    0xfaa8b535L, 0x6c98b242L, 0xd6c9bbdbL, 0x40f9bcacL, 0xe36cd832L,
+    0x755cdf45L, 0xcf0dd6dcL, 0x593dd1abL, 0xac30d926L, 0x3a00de51L,
+    0x8051d7c8L, 0x1661d0bfL, 0xb5f4b421L, 0x23c4b356L, 0x9995bacfL,
+    0x0fa5bdb8L, 0x9eb80228L, 0x0888055fL, 0xb2d90cc6L, 0x24e90bb1L,
+    0x877c6f2fL, 0x114c6858L, 0xab1d61c1L, 0x3d2d66b6L, 0x9041dc76L,
+    0x0671db01L, 0xbc20d298L, 0x2a10d5efL, 0x8985b171L, 0x1fb5b606L,
+    0xa5e4bf9fL, 0x33d4b8e8L, 0xa2c90778L, 0x34f9000fL, 0x8ea80996L,
+    0x18980ee1L, 0xbb0d6a7fL, 0x2d3d6d08L, 0x976c6491L, 0x015c63e6L,
+    0xf4516b6bL, 0x62616c1cL, 0xd8306585L, 0x4e0062f2L, 0xed95066cL,
+    0x7ba5011bL, 0xc1f40882L, 0x57c40ff5L, 0xc6d9b065L, 0x50e9b712L,
+    0xeab8be8bL, 0x7c88b9fcL, 0xdf1ddd62L, 0x492dda15L, 0xf37cd38cL,
+    0x654cd4fbL, 0x5861b24dL, 0xce51b53aL, 0x7400bca3L, 0xe230bbd4L,
+    0x41a5df4aL, 0xd795d83dL, 0x6dc4d1a4L, 0xfbf4d6d3L, 0x6ae96943L,
+    0xfcd96e34L, 0x468867adL, 0xd0b860daL, 0x732d0444L, 0xe51d0333L,
+    0x5f4c0aaaL, 0xc97c0dddL, 0x3c710550L, 0xaa410227L, 0x10100bbeL,
+    0x86200cc9L, 0x25b56857L, 0xb3856f20L, 0x09d466b9L, 0x9fe461ceL,
+    0x0ef9de5eL, 0x98c9d929L, 0x2298d0b0L, 0xb4a8d7c7L, 0x173db359L,
+    0x810db42eL, 0x3b5cbdb7L, 0xad6cbac0L, 0x2083b8edL, 0xb6b3bf9aL,
+    0x0ce2b603L, 0x9ad2b174L, 0x3947d5eaL, 0xaf77d29dL, 0x1526db04L,
+    0x8316dc73L, 0x120b63e3L, 0x843b6494L, 0x3e6a6d0dL, 0xa85a6a7aL,
+    0x0bcf0ee4L, 0x9dff0993L, 0x27ae000aL, 0xb19e077dL, 0x44930ff0L,
+    0xd2a30887L, 0x68f2011eL, 0xfec20669L, 0x5d5762f7L, 0xcb676580L,
+    0x71366c19L, 0xe7066b6eL, 0x761bd4feL, 0xe02bd389L, 0x5a7ada10L,
+    0xcc4add67L, 0x6fdfb9f9L, 0xf9efbe8eL, 0x43beb717L, 0xd58eb060L,
+    0xe8a3d6d6L, 0x7e93d1a1L, 0xc4c2d838L, 0x52f2df4fL, 0xf167bbd1L,
+    0x6757bca6L, 0xdd06b53fL, 0x4b36b248L, 0xda2b0dd8L, 0x4c1b0aafL,
+    0xf64a0336L, 0x607a0441L, 0xc3ef60dfL, 0x55df67a8L, 0xef8e6e31L,
+    0x79be6946L, 0x8cb361cbL, 0x1a8366bcL, 0xa0d26f25L, 0x36e26852L,
+    0x95770cccL, 0x03470bbbL, 0xb9160222L, 0x2f260555L, 0xbe3bbac5L,
+    0x280bbdb2L, 0x925ab42bL, 0x046ab35cL, 0xa7ffd7c2L, 0x31cfd0b5L,
+    0x8b9ed92cL, 0x1daede5bL, 0xb0c2649bL, 0x26f263ecL, 0x9ca36a75L,
+    0x0a936d02L, 0xa906099cL, 0x3f360eebL, 0x85670772L, 0x13570005L,
+    0x824abf95L, 0x147ab8e2L, 0xae2bb17bL, 0x381bb60cL, 0x9b8ed292L,
+    0x0dbed5e5L, 0xb7efdc7cL, 0x21dfdb0bL, 0xd4d2d386L, 0x42e2d4f1L,
+    0xf8b3dd68L, 0x6e83da1fL, 0xcd16be81L, 0x5b26b9f6L, 0xe177b06fL,
+    0x7747b718L, 0xe65a0888L, 0x706a0fffL, 0xca3b0666L, 0x5c0b0111L,
+    0xff9e658fL, 0x69ae62f8L, 0xd3ff6b61L, 0x45cf6c16L, 0x78e20aa0L,
+    0xeed20dd7L, 0x5483044eL, 0xc2b30339L, 0x612667a7L, 0xf71660d0L,
+    0x4d476949L, 0xdb776e3eL, 0x4a6ad1aeL, 0xdc5ad6d9L, 0x660bdf40L,
+    0xf03bd837L, 0x53aebca9L, 0xc59ebbdeL, 0x7fcfb247L, 0xe9ffb530L,
+    0x1cf2bdbdL, 0x8ac2bacaL, 0x3093b353L, 0xa6a3b424L, 0x0536d0baL,
+    0x9306d7cdL, 0x2957de54L, 0xbf67d923L, 0x2e7a66b3L, 0xb84a61c4L,
+    0x021b685dL, 0x942b6f2aL, 0x37be0bb4L, 0xa18e0cc3L, 0x1bdf055aL,
+    0x8def022dL
+};
+
+#else
+#   error "Endianness not defined"
+#endif
+
+
+PJ_DEF(void) pj_crc32_init(pj_crc32_context *ctx)
+{
+    ctx->crc_state = 0;
+}
+
+PJ_DEF(pj_uint32_t) pj_crc32_update(pj_crc32_context *ctx, 
+				    const pj_uint8_t *data,
+				    pj_size_t nbytes)
+{
+    pj_uint32_t crc = ctx->crc_state ^ CRC32_NEGL;
+
+    for( ; (((pj_uint32_t)data) & 0x03) && nbytes > 0; --nbytes) {
+	crc = crc_tab[CRC32_INDEX(crc) ^ *data++] ^ CRC32_SHIFTED(crc);
+    }
+
+    while (nbytes >= 4) {
+	crc ^= *(const pj_uint32_t *)data;
+	crc = crc_tab[CRC32_INDEX(crc)] ^ CRC32_SHIFTED(crc);
+	crc = crc_tab[CRC32_INDEX(crc)] ^ CRC32_SHIFTED(crc);
+	crc = crc_tab[CRC32_INDEX(crc)] ^ CRC32_SHIFTED(crc);
+	crc = crc_tab[CRC32_INDEX(crc)] ^ CRC32_SHIFTED(crc);
+	nbytes -= 4;
+	data += 4;
+    }
+
+    while (nbytes--) {
+	crc = crc_tab[CRC32_INDEX(crc) ^ *data++] ^ CRC32_SHIFTED(crc);
+    }
+
+    ctx->crc_state = crc ^ CRC32_NEGL;
+
+    return ctx->crc_state;
+}
+
+PJ_DEF(pj_uint32_t) pj_crc32_final(pj_crc32_context *ctx)
+{
+    return ctx->crc_state;
+}
+
+
+#else
+
+PJ_DEF(void) pj_crc32_init(pj_crc32_context *ctx)
+{
+    ctx->crc_state = CRC32_NEGL;
+}
+
+
+PJ_DEF(pj_uint32_t) pj_crc32_update(pj_crc32_context *ctx, 
+				    const pj_uint8_t *octets,
+				    pj_size_t len)
+
+{
+    pj_uint32_t crc = ctx->crc_state;
+    
+    while (len--) {
+	pj_uint32_t temp;
+	int j;
+
+	temp = (pj_uint32_t)((crc & 0xFF) ^ *octets++);
+	for (j = 0; j < 8; j++)
+	{
+	    if (temp & 0x1)
+		temp = (temp >> 1) ^ 0xEDB88320;
+	    else
+		temp >>= 1;
+	}
+	crc = (crc >> 8) ^ temp;
+    }
+    ctx->crc_state = crc;
+
+    return crc ^ CRC32_NEGL;
+}
+
+PJ_DEF(pj_uint32_t) pj_crc32_final(pj_crc32_context *ctx)
+{
+    ctx->crc_state ^= CRC32_NEGL;
+    return ctx->crc_state;
+}
+
+#endif
+
+
+PJ_DEF(pj_uint32_t) pj_crc32_calc( const pj_uint8_t *data,
+				   pj_size_t nbytes)
+{
+    pj_crc32_context ctx;
+
+    pj_crc32_init(&ctx);
+    pj_crc32_update(&ctx, data, nbytes);
+    return pj_crc32_final(&ctx);
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/dns.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/dns.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/dns.c	(revision 1163)
@@ -0,0 +1,673 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjlib-util/dns.h>
+#include <pjlib-util/errno.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+#include <pj/pool.h>
+#include <pj/sock.h>
+#include <pj/string.h>
+
+
+PJ_DEF(const char *) pj_dns_get_type_name(int type)
+{
+    switch (type) {
+    case PJ_DNS_TYPE_A:	    return "A";
+    case PJ_DNS_TYPE_SRV:   return "SRV";
+    case PJ_DNS_TYPE_NS:    return "NS";
+    case PJ_DNS_TYPE_CNAME: return "CNAME";
+    case PJ_DNS_TYPE_PTR:   return "PTR";
+    case PJ_DNS_TYPE_MX:    return "MX";
+    case PJ_DNS_TYPE_TXT:   return "TXT";
+    case PJ_DNS_TYPE_NAPTR: return "NAPTR";
+    }
+    return "(Unknown)";
+}
+
+
+/**
+ * Initialize a DNS query transaction.
+ */
+PJ_DEF(pj_status_t) pj_dns_make_query( void *packet,
+				       unsigned *size,
+				       pj_uint16_t id,
+				       int qtype,
+				       const pj_str_t *name)
+{
+    pj_dns_hdr *hdr;
+    char *query, *p;
+    const char *startlabel, *endlabel, *endname;
+    pj_uint16_t tmp;
+    unsigned d;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(packet && size && qtype && name, PJ_EINVAL);
+
+    /* Calculate total number of bytes required. */
+    d = sizeof(pj_dns_hdr) + name->slen + 4;
+
+    /* Check that size is sufficient. */
+    PJ_ASSERT_RETURN(*size >= d, PJLIB_UTIL_EDNSQRYTOOSMALL);
+
+    /* Initialize header */
+    hdr = packet;
+    pj_bzero(hdr, sizeof(struct pj_dns_hdr));
+    hdr->id = pj_htons(id);
+    hdr->flags = pj_htons(PJ_DNS_SET_RD(1));
+    hdr->qdcount = pj_htons(1);
+
+    /* Initialize query */
+    query = p = (char*)(hdr+1);
+
+    /* Tokenize name */
+    startlabel = endlabel = name->ptr;
+    endname = name->ptr + name->slen;
+    while (endlabel != endname) {
+	while (endlabel != endname && *endlabel != '.')
+	    ++endlabel;
+	*p++ = (char)(endlabel - startlabel);
+	pj_memcpy(p, startlabel, endlabel-startlabel);
+	p += (endlabel-startlabel);
+	if (endlabel != endname && *endlabel == '.')
+	    ++endlabel;
+	startlabel = endlabel;
+    }
+    *p++ = '\0';
+
+    /* Set type */
+    tmp = pj_htons((pj_uint16_t)(qtype));
+    pj_memcpy(p, &tmp, 2);
+    p += 2;
+
+    /* Set class (IN=1) */
+    tmp = pj_htons(1);
+    pj_memcpy(p, &tmp, 2);
+    p += 2;
+
+    /* Done, calculate length */
+    *size = p - (char*)packet;
+
+    return 0;
+}
+
+
+/* Get a name length (note: name consists of multiple labels and
+ * it may contain pointers when name compression is applied) 
+ */
+static pj_status_t get_name_len(int rec_counter, const char *pkt, 
+				const char *start, const char *max, 
+				int *parsed_len, int *name_len)
+{
+    const char *p;
+    pj_status_t status;
+
+    /* Limit the number of recursion */
+    if (rec_counter > 10) {
+	/* Too many name recursion */
+	return PJLIB_UTIL_EDNSINNAMEPTR;
+    }
+
+    *name_len = *parsed_len = 0;
+    p = start;
+    while (*p) {
+	if ((*p & 0xc0) == 0xc0) {
+	    /* Compression is found! */
+	    int ptr_len = 0;
+	    int dummy;
+	    pj_uint16_t offset;
+
+	    /* Get the 14bit offset */
+	    pj_memcpy(&offset, p, 2);
+	    offset ^= pj_htons((pj_uint16_t)(0xc0 << 8));
+	    offset = pj_ntohs(offset);
+
+	    /* Check that offset is valid */
+	    if (offset >= max - pkt)
+		return PJLIB_UTIL_EDNSINNAMEPTR;
+
+	    /* Get the name length from that offset. */
+	    status = get_name_len(rec_counter+1, pkt, pkt + offset, max, 
+				  &dummy, &ptr_len);
+	    if (status != PJ_SUCCESS)
+		return status;
+
+	    *parsed_len += 2;
+	    *name_len += ptr_len;
+
+	    return PJ_SUCCESS;
+	} else {
+	    unsigned label_len = *p;
+
+	    /* Check that label length is valid */
+	    if (pkt+label_len > max)
+		return PJLIB_UTIL_EDNSINNAMEPTR;
+
+	    p += (label_len + 1);
+	    *parsed_len += (label_len + 1);
+
+	    if (*p != 0)
+		++label_len;
+	    
+	    *name_len += label_len;
+
+	    if (p >= max)
+		return PJLIB_UTIL_EDNSINSIZE;
+	}
+    }
+    ++p;
+    (*parsed_len)++;
+
+    return PJ_SUCCESS;
+}
+
+
+/* Parse and copy name (note: name consists of multiple labels and
+ * it may contain pointers when compression is applied).
+ */
+static pj_status_t get_name(int rec_counter, const char *pkt, 
+			    const char *start, const char *max,
+			    pj_str_t *name)
+{
+    const char *p;
+    pj_status_t status;
+
+    /* Limit the number of recursion */
+    if (rec_counter > 10) {
+	/* Too many name recursion */
+	return PJLIB_UTIL_EDNSINNAMEPTR;
+    }
+
+    p = start;
+    while (*p) {
+	if ((*p & 0xc0) == 0xc0) {
+	    /* Compression is found! */
+	    pj_uint16_t offset;
+
+	    /* Get the 14bit offset */
+	    pj_memcpy(&offset, p, 2);
+	    offset ^= pj_htons((pj_uint16_t)(0xc0 << 8));
+	    offset = pj_ntohs(offset);
+
+	    /* Check that offset is valid */
+	    if (offset >= max - pkt)
+		return PJLIB_UTIL_EDNSINNAMEPTR;
+
+	    /* Retrieve the name from that offset. */
+	    status = get_name(rec_counter+1, pkt, pkt + offset, max, name);
+	    if (status != PJ_SUCCESS)
+		return status;
+
+	    return PJ_SUCCESS;
+	} else {
+	    unsigned label_len = *p;
+
+	    /* Check that label length is valid */
+	    if (pkt+label_len > max)
+		return PJLIB_UTIL_EDNSINNAMEPTR;
+
+	    pj_memcpy(name->ptr + name->slen, p+1, label_len);
+	    name->slen += label_len;
+
+	    p += label_len + 1;
+	    if (*p != 0) {
+		*(name->ptr + name->slen) = '.';
+		++name->slen;
+	    }
+
+	    if (p >= max)
+		return PJLIB_UTIL_EDNSINSIZE;
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/* Skip query records. */
+static pj_status_t parse_query(pj_dns_parsed_query *q, pj_pool_t *pool,
+			       const char *pkt, const char *start, 
+			       const char *max, int *parsed_len)
+{
+    const char *p = start;
+    int name_len, name_part_len;
+    pj_status_t status;
+
+    /* Get the length of the name */
+    status = get_name_len(0, pkt, start, max, &name_part_len, &name_len);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Allocate memory for the name */
+    q->name.ptr = pj_pool_alloc(pool, name_len+4);
+    q->name.slen = 0;
+
+    /* Get the name */
+    status = get_name(0, pkt, start, max, &q->name);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    p = (start + name_part_len);
+
+    /* Get the type */
+    pj_memcpy(&q->type, p, 2);
+    q->type = pj_ntohs(q->type);
+    p += 2;
+
+    /* Get the class */
+    pj_memcpy(&q->dnsclass, p, 2);
+    q->dnsclass = pj_ntohs(q->dnsclass);
+    p += 2;
+
+    *parsed_len = (int)(p - start);
+
+    return PJ_SUCCESS;
+}
+
+
+/* Parse RR records */
+static pj_status_t parse_rr(pj_dns_parsed_rr *rr, pj_pool_t *pool,
+			    const char *pkt,
+			    const char *start, const char *max, 
+			    int *parsed_len)
+{
+    const char *p = start;
+    int name_len, name_part_len;
+    pj_status_t status;
+
+    /* Get the length of the name */
+    status = get_name_len(0, pkt, start, max, &name_part_len, &name_len);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Allocate memory for the name */
+    rr->name.ptr = pj_pool_alloc(pool, name_len+4);
+    rr->name.slen = 0;
+
+    /* Get the name */
+    status = get_name(0, pkt, start, max, &rr->name);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    p = (start + name_part_len);
+
+    /* Check the size can accomodate next few fields. */
+    if (p+10 > max)
+	return PJLIB_UTIL_EDNSINSIZE;
+
+    /* Get the type */
+    pj_memcpy(&rr->type, p, 2);
+    rr->type = pj_ntohs(rr->type);
+    p += 2;
+    
+    /* Get the class */
+    pj_memcpy(&rr->dnsclass, p, 2);
+    rr->dnsclass = pj_ntohs(rr->dnsclass);
+    p += 2;
+
+    /* Class MUST be IN */
+    if (rr->dnsclass != 1)
+	return PJLIB_UTIL_EDNSINCLASS;
+
+    /* Get TTL */
+    pj_memcpy(&rr->ttl, p, 4);
+    rr->ttl = pj_htonl(rr->ttl);
+    p += 4;
+
+    /* Get rdlength */
+    pj_memcpy(&rr->rdlength, p, 2);
+    rr->rdlength = pj_htons(rr->rdlength);
+    p += 2;
+
+    /* Check that length is valid */
+    if (p + rr->rdlength > max)
+	return PJLIB_UTIL_EDNSINSIZE;
+
+    /* Parse some well known records */
+    if (rr->type == PJ_DNS_TYPE_A) {
+	pj_memcpy(&rr->rdata.a.ip_addr, p, 4);
+	p += 4;
+
+    } else if (rr->type == PJ_DNS_TYPE_CNAME ||
+	       rr->type == PJ_DNS_TYPE_NS ||
+	       rr->type == PJ_DNS_TYPE_PTR) 
+    {
+
+	/* Get the length of the target name */
+	status = get_name_len(0, pkt, p, max, &name_part_len, &name_len);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	/* Allocate memory for the name */
+	rr->rdata.cname.name.ptr = pj_pool_alloc(pool, name_len);
+	rr->rdata.cname.name.slen = 0;
+
+	/* Get the name */
+	status = get_name(0, pkt, p, max, &rr->rdata.cname.name);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	p += name_part_len;
+
+    } else if (rr->type == PJ_DNS_TYPE_SRV) {
+
+	/* Priority */
+	pj_memcpy(&rr->rdata.srv.prio, p, 2);
+	rr->rdata.srv.prio = pj_ntohs(rr->rdata.srv.prio);
+	p += 2;
+
+	/* Weight */
+	pj_memcpy(&rr->rdata.srv.weight, p, 2);
+	rr->rdata.srv.weight = pj_ntohs(rr->rdata.srv.weight);
+	p += 2;
+
+	/* Port */
+	pj_memcpy(&rr->rdata.srv.port, p, 2);
+	rr->rdata.srv.port = pj_ntohs(rr->rdata.srv.port);
+	p += 2;
+	
+	/* Get the length of the target name */
+	status = get_name_len(0, pkt, p, max, &name_part_len, &name_len);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	/* Allocate memory for the name */
+	rr->rdata.srv.target.ptr = pj_pool_alloc(pool, name_len);
+	rr->rdata.srv.target.slen = 0;
+
+	/* Get the name */
+	status = get_name(0, pkt, p, max, &rr->rdata.srv.target);
+	if (status != PJ_SUCCESS)
+	    return status;
+	p += name_part_len;
+
+    } else {
+	/* Copy the raw data */
+	rr->data = pj_pool_alloc(pool, rr->rdlength);
+	pj_memcpy(rr->data, p, rr->rdlength);
+
+	p += rr->rdlength;
+    }
+
+    *parsed_len = (int)(p - start);
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Parse raw DNS packet into DNS packet structure.
+ */
+PJ_DEF(pj_status_t) pj_dns_parse_packet( pj_pool_t *pool,
+				  	 const void *packet,
+					 unsigned size,
+					 pj_dns_parsed_packet **p_res)
+{
+    pj_dns_parsed_packet *res;
+    char *start, *end;
+    pj_status_t status;
+    unsigned i;
+
+    /* Sanity checks */
+    PJ_ASSERT_RETURN(pool && packet && size && p_res, PJ_EINVAL);
+
+    /* Packet size must be at least as big as the header */
+    if (size < sizeof(pj_dns_hdr))
+	return PJLIB_UTIL_EDNSINSIZE;
+
+    /* Create the structure */
+    res = pj_pool_zalloc(pool, sizeof(pj_dns_parsed_packet));
+
+    /* Copy the DNS header, and convert endianness to host byte order */
+    pj_memcpy(&res->hdr, packet, sizeof(pj_dns_hdr));
+    res->hdr.id	      = pj_ntohs(res->hdr.id);
+    res->hdr.flags    = pj_ntohs(res->hdr.flags);
+    res->hdr.qdcount  = pj_ntohs(res->hdr.qdcount);
+    res->hdr.anscount = pj_ntohs(res->hdr.anscount);
+    res->hdr.nscount  = pj_ntohs(res->hdr.nscount);
+    res->hdr.arcount  = pj_ntohs(res->hdr.arcount);
+
+    /* Mark start and end of payload */
+    start = ((char*)packet) + sizeof(pj_dns_hdr);
+    end = ((char*)packet) + size;
+
+    /* Parse query records (if any).
+     */
+    if (res->hdr.qdcount) {
+	res->q = pj_pool_zalloc(pool, res->hdr.qdcount *
+				      sizeof(pj_dns_parsed_query));
+	for (i=0; i<res->hdr.qdcount; ++i) {
+	    int parsed_len = 0;
+	    
+	    status = parse_query(&res->q[i], pool, packet, start, end,
+				 &parsed_len);
+	    if (status != PJ_SUCCESS)
+		return status;
+
+	    start += parsed_len;
+	}
+    }
+
+    /* Parse answer, if any */
+    if (res->hdr.anscount) {
+	res->ans = pj_pool_zalloc(pool, res->hdr.anscount * 
+					sizeof(pj_dns_parsed_rr));
+
+	for (i=0; i<res->hdr.anscount; ++i) {
+	    int parsed_len;
+
+	    status = parse_rr(&res->ans[i], pool, packet, start, end, 
+			      &parsed_len);
+	    if (status != PJ_SUCCESS)
+		return status;
+
+	    start += parsed_len;
+	}
+    }
+
+    /* Parse authoritative NS records, if any */
+    if (res->hdr.nscount) {
+	res->ns = pj_pool_zalloc(pool, res->hdr.nscount *
+				       sizeof(pj_dns_parsed_rr));
+
+	for (i=0; i<res->hdr.nscount; ++i) {
+	    int parsed_len;
+
+	    status = parse_rr(&res->ns[i], pool, packet, start, end, 
+			      &parsed_len);
+	    if (status != PJ_SUCCESS)
+		return status;
+
+	    start += parsed_len;
+	}
+    }
+
+    /* Parse additional RR answer, if any */
+    if (res->hdr.arcount) {
+	res->arr = pj_pool_zalloc(pool, res->hdr.arcount *
+					sizeof(pj_dns_parsed_rr));
+
+	for (i=0; i<res->hdr.arcount; ++i) {
+	    int parsed_len;
+
+	    status = parse_rr(&res->arr[i], pool, packet, start, end, 
+			      &parsed_len);
+	    if (status != PJ_SUCCESS)
+		return status;
+
+	    start += parsed_len;
+	}
+    }
+
+    /* Looks like everything is okay */
+    *p_res = res;
+
+    return PJ_SUCCESS;
+}
+
+
+/* Perform name compression scheme.
+ * If a name is already in the nametable, when no need to duplicate
+ * the string with the pool, but rather just use the pointer there.
+ */
+static void apply_name_table( unsigned *count,
+			      pj_str_t nametable[],
+		    	      const pj_str_t *src,
+			      pj_pool_t *pool,
+			      pj_str_t *dst)
+{
+    unsigned i;
+
+    /* Scan strings in nametable */
+    for (i=0; i<*count; ++i) {
+	if (pj_stricmp(&nametable[i], src) == 0)
+	    break;
+    }
+
+    /* If name is found in nametable, use the pointer in the nametable */
+    if (i != *count) {
+	dst->ptr = nametable[i].ptr;
+	dst->slen = nametable[i].slen;
+	return;
+    }
+
+    /* Otherwise duplicate the string, and insert new name in nametable */
+    pj_strdup(pool, dst, src);
+
+    if (*count < PJ_DNS_MAX_NAMES_IN_NAMETABLE) {
+	nametable[*count].ptr = dst->ptr;
+	nametable[*count].slen = dst->slen;
+
+	++(*count);
+    }
+}
+
+static void copy_query(pj_pool_t *pool, pj_dns_parsed_query *dst,
+		       const pj_dns_parsed_query *src,
+		       unsigned *nametable_count,
+		       pj_str_t nametable[])
+{
+    pj_memcpy(dst, src, sizeof(*src));
+    apply_name_table(nametable_count, nametable, &src->name, pool, &dst->name);
+}
+
+
+static void copy_rr(pj_pool_t *pool, pj_dns_parsed_rr *dst,
+		    const pj_dns_parsed_rr *src,
+		    unsigned *nametable_count,
+		    pj_str_t nametable[])
+{
+    pj_memcpy(dst, src, sizeof(*src));
+    apply_name_table(nametable_count, nametable, &src->name, pool, &dst->name);
+
+    if (src->data) {
+	dst->data = pj_pool_alloc(pool, src->rdlength);
+	pj_memcpy(dst->data, src->data, src->rdlength);
+    }
+
+    if (src->type == PJ_DNS_TYPE_SRV) {
+	apply_name_table(nametable_count, nametable, &src->rdata.srv.target, 
+			 pool, &dst->rdata.srv.target);
+    } else if (src->type == PJ_DNS_TYPE_A) {
+	dst->rdata.a.ip_addr.s_addr =  src->rdata.a.ip_addr.s_addr;
+    } else if (src->type == PJ_DNS_TYPE_CNAME) {
+	pj_strdup(pool, &dst->rdata.cname.name, &src->rdata.cname.name);
+    } else if (src->type == PJ_DNS_TYPE_NS) {
+	pj_strdup(pool, &dst->rdata.ns.name, &src->rdata.ns.name);
+    } else if (src->type == PJ_DNS_TYPE_PTR) {
+	pj_strdup(pool, &dst->rdata.ptr.name, &src->rdata.ptr.name);
+    }
+}
+
+/*
+ * Duplicate DNS packet.
+ */
+PJ_DEF(void) pj_dns_packet_dup(pj_pool_t *pool,
+			       const pj_dns_parsed_packet*p,
+			       unsigned options,
+			       pj_dns_parsed_packet **p_dst)
+{
+    pj_dns_parsed_packet *dst;
+    unsigned nametable_count = 0;
+#if PJ_DNS_MAX_NAMES_IN_NAMETABLE
+    pj_str_t nametable[PJ_DNS_MAX_NAMES_IN_NAMETABLE];
+#else
+    pj_str_t *nametable = NULL;
+#endif
+    unsigned i;
+
+    PJ_ASSERT_ON_FAIL(pool && p && p_dst, return);
+
+    /* Create packet and copy header */
+    *p_dst = dst = pj_pool_zalloc(pool, sizeof(pj_dns_parsed_packet));
+    pj_memcpy(&dst->hdr, &p->hdr, sizeof(p->hdr));
+
+    /* Initialize section counts in the target packet to zero.
+     * If memory allocation fails during copying process, the target packet
+     * should have a correct section counts.
+     */
+    dst->hdr.qdcount = 0;
+    dst->hdr.anscount = 0;
+    dst->hdr.nscount = 0;
+    dst->hdr.arcount = 0;
+	
+
+    /* Copy query section */
+    if (p->hdr.qdcount && (options & PJ_DNS_NO_QD)==0) {
+	dst->q = pj_pool_alloc(pool, p->hdr.qdcount * 
+				     sizeof(pj_dns_parsed_query));
+	for (i=0; i<p->hdr.qdcount; ++i) {
+	    copy_query(pool, &dst->q[i], &p->q[i], 
+		       &nametable_count, nametable);
+	    ++dst->hdr.qdcount;
+	}
+    }
+
+    /* Copy answer section */
+    if (p->hdr.anscount && (options & PJ_DNS_NO_ANS)==0) {
+	dst->ans = pj_pool_alloc(pool, p->hdr.anscount * 
+				       sizeof(pj_dns_parsed_rr));
+	for (i=0; i<p->hdr.anscount; ++i) {
+	    copy_rr(pool, &dst->ans[i], &p->ans[i],
+		    &nametable_count, nametable);
+	    ++dst->hdr.anscount;
+	}
+    }
+
+    /* Copy NS section */
+    if (p->hdr.nscount && (options & PJ_DNS_NO_NS)==0) {
+	dst->ns = pj_pool_alloc(pool, p->hdr.nscount * 
+				      sizeof(pj_dns_parsed_rr));
+	for (i=0; i<p->hdr.nscount; ++i) {
+	    copy_rr(pool, &dst->ns[i], &p->ns[i],
+		    &nametable_count, nametable);
+	    ++dst->hdr.nscount;
+	}
+    }
+
+    /* Copy additional info section */
+    if (p->hdr.arcount && (options & PJ_DNS_NO_AR)==0) {
+	dst->arr = pj_pool_alloc(pool, p->hdr.arcount * 
+				       sizeof(pj_dns_parsed_rr));
+	for (i=0; i<p->hdr.arcount; ++i) {
+	    copy_rr(pool, &dst->arr[i], &p->arr[i],
+		    &nametable_count, nametable);
+	    ++dst->hdr.arcount;
+	}
+    }
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/dns_dump.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/dns_dump.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/dns_dump.c	(revision 1163)
@@ -0,0 +1,187 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjlib-util/dns.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/string.h>
+
+#define THIS_FILE   "dns_dump.c"
+#define LEVEL	    3
+
+static const char *spell_ttl(char *buf, int size, unsigned ttl)
+{
+#define DAY	(3600*24)
+#define HOUR	(3600)
+#define MINUTE	(60)
+
+    char *p = buf;
+    int len;
+
+    if (ttl > DAY) {
+	len = pj_ansi_snprintf(p, size, "%dd ", ttl/DAY);
+	if (len < 1)
+	    return "-err-";
+	size -= len;
+	p += len;
+	ttl %= DAY;
+    }
+
+    if (ttl > HOUR) {
+	len = pj_ansi_snprintf(p, size, "%dh ", ttl/HOUR);
+	if (len < 1)
+	    return "-err-";
+	size -= len;
+	p += len;
+	ttl %= HOUR;
+    }
+
+    if (ttl > MINUTE) {
+	len = pj_ansi_snprintf(p, size, "%dm ", ttl/MINUTE);
+	if (len < 1)
+	    return "-err-";
+	size -= len;
+	p += len;
+	ttl %= MINUTE;
+    }
+
+    if (ttl > 0) {
+	len = pj_ansi_snprintf(p, size, "%ds ", ttl);
+	if (len < 1)
+	    return "-err-";
+	size -= len;
+	p += len;
+	ttl = 0;
+    }
+
+    *p = '\0';
+    return buf;
+}
+
+
+static void dump_query(unsigned index, const pj_dns_parsed_query *q)
+{
+    PJ_LOG(3,(THIS_FILE, " %d. Name: %.*s", 
+			 index, (int)q->name.slen, q->name.ptr));
+    PJ_LOG(3,(THIS_FILE, "    Type: %s (%d)", 
+			 pj_dns_get_type_name(q->type), q->type));
+    PJ_LOG(3,(THIS_FILE, "    Class: %s (%d)", 
+		         (q->dnsclass==1 ? "IN" : "<Unknown>"), q->dnsclass));
+}
+
+static void dump_answer(unsigned index, const pj_dns_parsed_rr *rr)
+{
+    const pj_str_t root_name = { "<Root>", 6 };
+    const pj_str_t *name = &rr->name;
+    char ttl_words[32];
+
+    if (name->slen == 0)
+	name = &root_name;
+
+    PJ_LOG(3,(THIS_FILE, " %d. %s record (type=%d)", 
+			 index, pj_dns_get_type_name(rr->type),
+			rr->type));
+    PJ_LOG(3,(THIS_FILE, "    Name: %.*s", (int)name->slen, name->ptr));
+    PJ_LOG(3,(THIS_FILE, "    TTL: %u (%s)", rr->ttl, 
+			  spell_ttl(ttl_words, sizeof(ttl_words), rr->ttl)));
+    PJ_LOG(3,(THIS_FILE, "    Data length: %u", rr->rdlength));
+
+    if (rr->type == PJ_DNS_TYPE_SRV) {
+	PJ_LOG(3,(THIS_FILE, "    SRV: prio=%d, weight=%d %.*s:%d", 
+			     rr->rdata.srv.prio, rr->rdata.srv.weight,
+			     (int)rr->rdata.srv.target.slen, 
+			     rr->rdata.srv.target.ptr,
+			     rr->rdata.srv.port));
+    } else if (rr->type == PJ_DNS_TYPE_CNAME ||
+	       rr->type == PJ_DNS_TYPE_NS ||
+	       rr->type == PJ_DNS_TYPE_PTR) 
+    {
+	PJ_LOG(3,(THIS_FILE, "    Name: %.*s",
+		  (int)rr->rdata.cname.name.slen,
+		  rr->rdata.cname.name.ptr));
+    } else if (rr->type == PJ_DNS_TYPE_A) {
+	PJ_LOG(3,(THIS_FILE, "    IP address: %s",
+		  pj_inet_ntoa(rr->rdata.a.ip_addr)));
+    }
+}
+
+
+PJ_DEF(void) pj_dns_dump_packet(const pj_dns_parsed_packet *res)
+{
+    unsigned i;
+
+    PJ_ASSERT_ON_FAIL(res != NULL, return);
+
+    /* Header part */
+    PJ_LOG(3,(THIS_FILE, "Domain Name System packet (%s):",
+		(PJ_DNS_GET_QR(res->hdr.flags) ? "response" : "query")));
+    PJ_LOG(3,(THIS_FILE, " Transaction ID: %d", res->hdr.id));
+    PJ_LOG(3,(THIS_FILE, 
+	      " Flags: opcode=%d, authoritative=%d, truncated=%d, rcode=%d",
+		 PJ_DNS_GET_OPCODE(res->hdr.flags),
+		 PJ_DNS_GET_AA(res->hdr.flags),
+		 PJ_DNS_GET_TC(res->hdr.flags),
+		 PJ_DNS_GET_RCODE(res->hdr.flags)));
+    PJ_LOG(3,(THIS_FILE, " Nb of queries: %d", res->hdr.qdcount));
+    PJ_LOG(3,(THIS_FILE, " Nb of answer RR: %d", res->hdr.anscount));
+    PJ_LOG(3,(THIS_FILE, " Nb of authority RR: %d", res->hdr.nscount));
+    PJ_LOG(3,(THIS_FILE, " Nb of additional RR: %d", res->hdr.arcount));
+    PJ_LOG(3,(THIS_FILE, ""));
+
+    /* Dump queries */
+    if (res->hdr.qdcount) {
+	PJ_LOG(3,(THIS_FILE, " Queries:"));
+
+	for (i=0; i<res->hdr.qdcount; ++i) {
+	    dump_query(i, &res->q[i]);
+	}
+	PJ_LOG(3,(THIS_FILE, ""));
+    }
+
+    /* Dump answers */
+    if (res->hdr.anscount) {
+	PJ_LOG(3,(THIS_FILE, " Answers RR:"));
+
+	for (i=0; i<res->hdr.anscount; ++i) {
+	    dump_answer(i, &res->ans[i]);
+	}
+	PJ_LOG(3,(THIS_FILE, ""));
+    }
+
+    /* Dump NS sections */
+    if (res->hdr.anscount) {
+	PJ_LOG(3,(THIS_FILE, " NS Authority RR:"));
+
+	for (i=0; i<res->hdr.nscount; ++i) {
+	    dump_answer(i, &res->ns[i]);
+	}
+	PJ_LOG(3,(THIS_FILE, ""));
+    }
+
+    /* Dump Additional info sections */
+    if (res->hdr.arcount) {
+	PJ_LOG(3,(THIS_FILE, " Additional Info RR:"));
+
+	for (i=0; i<res->hdr.arcount; ++i) {
+	    dump_answer(i, &res->arr[i]);
+	}
+	PJ_LOG(3,(THIS_FILE, ""));
+    }
+
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/errno.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/errno.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/errno.c	(revision 1163)
@@ -0,0 +1,158 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjlib-util/errno.h>
+#include <pj/string.h>
+
+
+
+/* PJLIB_UTIL's own error codes/messages 
+ * MUST KEEP THIS ARRAY SORTED!!
+ * Message must be limited to 64 chars!
+ */
+#if defined(PJ_HAS_ERROR_STRING) && PJ_HAS_ERROR_STRING!=0
+static const struct 
+{
+    int code;
+    const char *msg;
+} err_str[] = 
+{
+    /* STUN errors */
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNRESOLVE,	"Unable to resolve STUN server" ),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNINMSGTYPE,	"Unknown STUN message type" ),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNINMSGLEN,	"Invalid STUN message length" ),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNINATTRLEN,	"STUN attribute length error" ),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNINATTRTYPE,	"Invalid STUN attribute type" ),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNININDEX,	"Invalid STUN server/socket index" ),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNNOBINDRES,	"No STUN binding response in the message" ),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNRECVERRATTR,	"Received STUN error attribute" ),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNNOMAP,	"No STUN mapped address attribute" ),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNNOTRESPOND,	"Received no response from STUN server" ),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNSYMMETRIC,	"Symetric NAT detected by STUN" ),
+
+    /* XML errors */
+    PJ_BUILD_ERR( PJLIB_UTIL_EINXML,		"Invalid XML message" ),
+
+    /* DNS errors */
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNSQRYTOOSMALL,	"DNS query packet buffer is too small"),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNSINSIZE,	"Invalid DNS packet length"),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNSINCLASS,	"Invalid DNS class"),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNSINNAMEPTR,	"Invalid DNS name pointer"),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNSINNSADDR,	"Invalid DNS nameserver address"),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNSNONS,		"No nameserver is in DNS resolver"),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNSNOWORKINGNS,	"No working DNS nameserver"),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNSNOANSWERREC,	"No answer record in the DNS response"),
+
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNS_FORMERR,	"DNS \"Format error\""),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNS_SERVFAIL,	"DNS \"Server failure\""),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNS_NXDOMAIN,	"DNS \"Name Error\""),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNS_NOTIMPL,	"DNS \"Not Implemented\""),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNS_REFUSED,	"DNS \"Refused\""),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNS_YXDOMAIN,	"DNS \"The name exists\""),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNS_YXRRSET,	"DNS \"The RRset (name, type) exists\""),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNS_NXRRSET,	"DNS \"The RRset (name, type) does not exist\""),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNS_NOTAUTH,	"DNS \"Not authorized\""),
+    PJ_BUILD_ERR( PJLIB_UTIL_EDNS_NOTZONE,	"DNS \"The zone specified is not a zone\""),
+
+    /* STUN */
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNTOOMANYATTR,	"Too many STUN attributes"),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNUNKNOWNATTR,	"Unknown STUN attribute"),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNINADDRLEN,	"Invalid STUN socket address length"),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNIPV6NOTSUPP,	"STUN IPv6 attribute not supported"),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNNOTRESPONSE,	"Expecting STUN response message"),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNINVALIDID,	"STUN transaction ID mismatch"),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNNOHANDLER,	"Unable to find STUN handler for the request"),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNMSGINTPOS,	"Found non-FINGERPRINT attr. after MESSAGE-INTEGRITY"),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNFINGERPOS,	"Found STUN attribute after FINGERPRINT"),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNNOUSERNAME,	"Missing STUN USERNAME attribute"),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNMSGINT,	"Missing/invalid STUN MESSAGE-INTEGRITY attribute"),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNDUPATTR,	"Found duplicate STUN attribute"),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNNOREALM,	"Missing STUN REALM attribute"),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNNONCE,	"Missing/stale STUN NONCE attribute value"),
+    PJ_BUILD_ERR( PJLIB_UTIL_ESTUNTSXFAILED,	"STUN transaction terminates with failure"),
+};
+#endif	/* PJ_HAS_ERROR_STRING */
+
+
+/*
+ * pjlib_util_strerror()
+ */
+PJ_DEF(pj_str_t) pjlib_util_strerror( pj_status_t statcode, 
+				      char *buf, pj_size_t bufsize )
+{
+    pj_str_t errstr;
+
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0)
+
+    if (statcode >= PJLIB_UTIL_ERRNO_START && 
+	statcode < PJLIB_UTIL_ERRNO_START + PJ_ERRNO_SPACE_SIZE)
+    {
+	/* Find the error in the table.
+	 * Use binary search!
+	 */
+	int first = 0;
+	int n = PJ_ARRAY_SIZE(err_str);
+
+	while (n > 0) {
+	    int half = n/2;
+	    int mid = first + half;
+
+	    if (err_str[mid].code < statcode) {
+		first = mid+1;
+		n -= (half+1);
+	    } else if (err_str[mid].code > statcode) {
+		n = half;
+	    } else {
+		first = mid;
+		break;
+	    }
+	}
+
+
+	if (PJ_ARRAY_SIZE(err_str) && err_str[first].code == statcode) {
+	    pj_str_t msg;
+	    
+	    msg.ptr = (char*)err_str[first].msg;
+	    msg.slen = pj_ansi_strlen(err_str[first].msg);
+
+	    errstr.ptr = buf;
+	    pj_strncpy_with_null(&errstr, &msg, bufsize);
+	    return errstr;
+
+	} 
+    }
+
+#endif	/* PJ_HAS_ERROR_STRING */
+
+
+    /* Error not found. */
+    errstr.ptr = buf;
+    errstr.slen = pj_ansi_snprintf(buf, bufsize, 
+				   "Unknown pjlib-util error %d",
+				   statcode);
+
+    return errstr;
+}
+
+
+PJ_DEF(pj_status_t) pjlib_util_init(void)
+{
+    return pj_register_strerror(PJLIB_UTIL_ERRNO_START, 
+				PJ_ERRNO_SPACE_SIZE, 
+				&pjlib_util_strerror);
+}
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/getopt.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/getopt.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/getopt.c	(revision 1163)
@@ -0,0 +1,751 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/* 
+ * pj_getopt entry points
+ *
+ * modified by Mike Borella <mike_borella@mw.3com.com>
+ *
+ * $Id$
+ */
+
+#include <pjlib-util/getopt.h>
+#include <pj/string.h>
+
+/* Internal only.  Users should not call this directly.  */
+static
+int _getopt_internal (int argc, char *const *argv,
+		      const char *shortopts,
+		      const struct pj_getopt_option *longopts, int *longind,
+		      int long_only);
+
+/* pj_getopt_long and pj_getopt_long_only entry points for GNU pj_getopt.
+   Copyright (C) 1987,88,89,90,91,92,93,94,96,97 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.  */
+
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+   actually compiling the library itself.  This code is part of the GNU C
+   Library, but also included in many other GNU distributions.  Compiling
+   and linking in this code is a waste when using the GNU C library
+   (especially if it is a shared library).  Rather than having every GNU
+   program understand `configure --with-gnu-libc' and omit the object files,
+   it is simpler to just do this in the source for each such file.  */
+
+#   define GETOPT_INTERFACE_VERSION 2
+
+
+int
+pj_getopt_long (int argc, char *const *argv, const char *options, 
+	     const struct pj_getopt_option *long_options, int *opt_index)
+{
+  return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
+}
+
+/* Like pj_getopt_long, but '-' as well as '--' can indicate a long option.
+   If an option that starts with '-' (not '--') doesn't match a long option,
+   but does match a short option, it is parsed as a short option
+   instead.  */
+ 
+int
+pj_getopt (int argc, char * const * argv, const char * optstring)
+{
+  return _getopt_internal (argc, argv, optstring,
+			   (const struct pj_getopt_option *) 0,
+			   (int *) 0,
+			   0);
+}
+
+
+#define _(msgid)	(msgid)
+
+/* This version of `pj_getopt' appears to the caller like standard Unix `pj_getopt'
+   but it behaves differently for the user, since it allows the user
+   to intersperse the options with the other arguments.
+
+   As `pj_getopt' works, it permutes the elements of ARGV so that,
+   when it is done, all the options precede everything else.  Thus
+   all application programs are extended to handle flexible argument order.
+
+   Setting the environment variable POSIXLY_CORRECT disables permutation.
+   Then the behavior is completely standard.
+
+   GNU application programs can use a third alternative mode in which
+   they can distinguish the relative order of options and other arguments.  */
+
+/* For communication from `pj_getopt' to the caller.
+   When `pj_getopt' finds an option that takes an argument,
+   the argument value is returned here.
+   Also, when `ordering' is RETURN_IN_ORDER,
+   each non-option ARGV-element is returned here.  */
+
+char *pj_optarg = NULL;
+
+/* Index in ARGV of the next element to be scanned.
+   This is used for communication to and from the caller
+   and for communication between successive calls to `pj_getopt'.
+
+   On entry to `pj_getopt', zero means this is the first call; initialize.
+
+   When `pj_getopt' returns -1, this is the index of the first of the
+   non-option elements that the caller should itself scan.
+
+   Otherwise, `pj_optind' communicates from one call to the next
+   how much of ARGV has been scanned so far.  */
+
+/* 1003.2 says this must be 1 before any call.  */
+int pj_optind = 1;
+
+/* Formerly, initialization of pj_getopt depended on pj_optind==0, which
+   causes problems with re-calling pj_getopt as programs generally don't
+   know that. */
+
+int __getopt_initialized = 0;
+
+/* The next char to be scanned in the option-element
+   in which the last option character we returned was found.
+   This allows us to pick up the scan where we left off.
+
+   If this is zero, or a null string, it means resume the scan
+   by advancing to the next ARGV-element.  */
+
+static char *nextchar;
+
+/* Set to an option character which was unrecognized.
+   This must be initialized on some systems to avoid linking in the
+   system's own pj_getopt implementation.  */
+
+int pj_optopt = '?';
+
+/* Describe how to deal with options that follow non-option ARGV-elements.
+
+   If the caller did not specify anything,
+   the default is REQUIRE_ORDER if the environment variable
+   POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+   REQUIRE_ORDER means don't recognize them as options;
+   stop option processing when the first non-option is seen.
+   This is what Unix does.
+   This mode of operation is selected by either setting the environment
+   variable POSIXLY_CORRECT, or using `+' as the first character
+   of the list of option characters.
+
+   PERMUTE is the default.  We permute the contents of ARGV as we scan,
+   so that eventually all the non-options are at the end.  This allows options
+   to be given in any order, even with programs that were not written to
+   expect this.
+
+   RETURN_IN_ORDER is an option available to programs that were written
+   to expect options and other ARGV-elements in any order and that care about
+   the ordering of the two.  We describe each non-option ARGV-element
+   as if it were the argument of an option with character code 1.
+   Using `-' as the first character of the list of option characters
+   selects this mode of operation.
+
+   The special argument `--' forces an end of option-scanning regardless
+   of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
+   `--' can cause `pj_getopt' to return -1 with `pj_optind' != ARGC.  */
+
+static enum
+{
+  REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+} ordering;
+
+/* Value of POSIXLY_CORRECT environment variable.  */
+static char *posixly_correct;
+
+static char *
+my_index (const char *str, int chr)
+{
+  while (*str)
+    {
+      if (*str == chr)
+	return (char *) str;
+      str++;
+    }
+  return 0;
+}
+
+
+/* Handle permutation of arguments.  */
+
+/* Describe the part of ARGV that contains non-options that have
+   been skipped.  `first_nonopt' is the index in ARGV of the first of them;
+   `last_nonopt' is the index after the last of them.  */
+
+static int first_nonopt;
+static int last_nonopt;
+
+#   define SWAP_FLAGS(ch1, ch2)
+
+/* Exchange two adjacent subsequences of ARGV.
+   One subsequence is elements [first_nonopt,last_nonopt)
+   which contains all the non-options that have been skipped so far.
+   The other is elements [last_nonopt,pj_optind), which contains all
+   the options processed since those non-options were skipped.
+
+   `first_nonopt' and `last_nonopt' are relocated so that they describe
+   the new indices of the non-options in ARGV after they are moved.  */
+
+static void
+exchange (char **argv)
+{
+  int bottom = first_nonopt;
+  int middle = last_nonopt;
+  int top = pj_optind;
+  char *tem;
+
+  /* Exchange the shorter segment with the far end of the longer segment.
+     That puts the shorter segment into the right place.
+     It leaves the longer segment in the right place overall,
+     but it consists of two parts that need to be swapped next.  */
+
+  while (top > middle && middle > bottom)
+    {
+      if (top - middle > middle - bottom)
+	{
+	  /* Bottom segment is the short one.  */
+	  int len = middle - bottom;
+	  register int i;
+
+	  /* Swap it with the top part of the top segment.  */
+	  for (i = 0; i < len; i++)
+	    {
+	      tem = argv[bottom + i];
+	      argv[bottom + i] = argv[top - (middle - bottom) + i];
+	      argv[top - (middle - bottom) + i] = tem;
+	      SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
+	    }
+	  /* Exclude the moved bottom segment from further swapping.  */
+	  top -= len;
+	}
+      else
+	{
+	  /* Top segment is the short one.  */
+	  int len = top - middle;
+	  register int i;
+
+	  /* Swap it with the bottom part of the bottom segment.  */
+	  for (i = 0; i < len; i++)
+	    {
+	      tem = argv[bottom + i];
+	      argv[bottom + i] = argv[middle + i];
+	      argv[middle + i] = tem;
+	      SWAP_FLAGS (bottom + i, middle + i);
+	    }
+	  /* Exclude the moved top segment from further swapping.  */
+	  bottom += len;
+	}
+    }
+
+  /* Update records for the slots the non-options now occupy.  */
+
+  first_nonopt += (pj_optind - last_nonopt);
+  last_nonopt = pj_optind;
+}
+
+/* Initialize the internal data when the first call is made.  */
+
+static const char *_getopt_initialize (int argc, char *const *argv, 
+				       const char *optstring)
+{
+    PJ_UNUSED_ARG(argc);
+    PJ_UNUSED_ARG(argv);
+
+  /* Start processing options with ARGV-element 1 (since ARGV-element 0
+     is the program name); the sequence of previously skipped
+     non-option ARGV-elements is empty.  */
+
+  first_nonopt = last_nonopt = pj_optind;
+
+  nextchar = NULL;
+
+  //posixly_correct = getenv ("POSIXLY_CORRECT");
+  posixly_correct = NULL;
+
+  /* Determine how to handle the ordering of options and nonoptions.  */
+
+  if (optstring[0] == '-')
+    {
+      ordering = RETURN_IN_ORDER;
+      ++optstring;
+    }
+  else if (optstring[0] == '+')
+    {
+      ordering = REQUIRE_ORDER;
+      ++optstring;
+    }
+  else if (posixly_correct != NULL)
+    ordering = REQUIRE_ORDER;
+  else
+    ordering = PERMUTE;
+
+  return optstring;
+}
+
+/* Scan elements of ARGV (whose length is ARGC) for option characters
+   given in OPTSTRING.
+
+   If an element of ARGV starts with '-', and is not exactly "-" or "--",
+   then it is an option element.  The characters of this element
+   (aside from the initial '-') are option characters.  If `pj_getopt'
+   is called repeatedly, it returns successively each of the option characters
+   from each of the option elements.
+
+   If `pj_getopt' finds another option character, it returns that character,
+   updating `pj_optind' and `nextchar' so that the next call to `pj_getopt' can
+   resume the scan with the following option character or ARGV-element.
+
+   If there are no more option characters, `pj_getopt' returns -1.
+   Then `pj_optind' is the index in ARGV of the first ARGV-element
+   that is not an option.  (The ARGV-elements have been permuted
+   so that those that are not options now come last.)
+
+   OPTSTRING is a string containing the legitimate option characters.
+   If an option character is seen that is not listed in OPTSTRING,
+   return '?' after printing an error message.  If you set `pj_opterr' to
+   zero, the error message is suppressed but we still return '?'.
+
+   If a char in OPTSTRING is followed by a colon, that means it wants an arg,
+   so the following text in the same ARGV-element, or the text of the following
+   ARGV-element, is returned in `pj_optarg'.  Two colons mean an option that
+   wants an optional arg; if there is text in the current ARGV-element,
+   it is returned in `pj_optarg', otherwise `pj_optarg' is set to zero.
+
+   If OPTSTRING starts with `-' or `+', it requests different methods of
+   handling the non-option ARGV-elements.
+   See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
+
+   Long-named options begin with `--' instead of `-'.
+   Their names may be abbreviated as long as the abbreviation is unique
+   or is an exact match for some defined option.  If they have an
+   argument, it follows the option name in the same ARGV-element, separated
+   from the option name by a `=', or else the in next ARGV-element.
+   When `pj_getopt' finds a long-named option, it returns 0 if that option's
+   `flag' field is nonzero, the value of the option's `val' field
+   if the `flag' field is zero.
+
+   The elements of ARGV aren't really const, because we permute them.
+   But we pretend they're const in the prototype to be compatible
+   with other systems.
+
+   LONGOPTS is a vector of `struct pj_getopt_option' terminated by an
+   element containing a name which is zero.
+
+   LONGIND returns the index in LONGOPT of the long-named option found.
+   It is only valid when a long-named option has been found by the most
+   recent call.
+
+   If LONG_ONLY is nonzero, '-' as well as '--' can introduce
+   long-named options.  */
+
+static int
+_getopt_internal (int argc, char *const *argv, const char *optstring, 
+		  const struct pj_getopt_option *longopts, int *longind, 
+		  int long_only)
+{
+  pj_optarg = NULL;
+
+  if (pj_optind == 0 || !__getopt_initialized)
+    {
+      if (pj_optind == 0)
+	pj_optind = 1;	/* Don't scan ARGV[0], the program name.  */
+      optstring = _getopt_initialize (argc, argv, optstring);
+      __getopt_initialized = 1;
+    }
+
+  /* Test whether ARGV[pj_optind] points to a non-option argument.
+     Either it does not have option syntax, or there is an environment flag
+     from the shell indicating it is not an option.  The later information
+     is only used when the used in the GNU libc.  */
+#define NONOPTION_P (argv[pj_optind][0] != '-' || argv[pj_optind][1] == '\0')
+
+  if (nextchar == NULL || *nextchar == '\0')
+    {
+      /* Advance to the next ARGV-element.  */
+
+      /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
+	 moved back by the user (who may also have changed the arguments).  */
+      if (last_nonopt > pj_optind)
+	last_nonopt = pj_optind;
+      if (first_nonopt > pj_optind)
+	first_nonopt = pj_optind;
+
+      if (ordering == PERMUTE)
+	{
+	  /* If we have just processed some options following some non-options,
+	     exchange them so that the options come first.  */
+
+	  if (first_nonopt != last_nonopt && last_nonopt != pj_optind)
+	    exchange ((char **) argv);
+	  else if (last_nonopt != pj_optind)
+	    first_nonopt = pj_optind;
+
+	  /* Skip any additional non-options
+	     and extend the range of non-options previously skipped.  */
+
+	  while (pj_optind < argc && NONOPTION_P)
+	    pj_optind++;
+	  last_nonopt = pj_optind;
+	}
+
+      /* The special ARGV-element `--' means premature end of options.
+	 Skip it like a null option,
+	 then exchange with previous non-options as if it were an option,
+	 then skip everything else like a non-option.  */
+
+      if (pj_optind != argc && !pj_ansi_strcmp(argv[pj_optind], "--"))
+	{
+	  pj_optind++;
+
+	  if (first_nonopt != last_nonopt && last_nonopt != pj_optind)
+	    exchange ((char **) argv);
+	  else if (first_nonopt == last_nonopt)
+	    first_nonopt = pj_optind;
+	  last_nonopt = argc;
+
+	  pj_optind = argc;
+	}
+
+      /* If we have done all the ARGV-elements, stop the scan
+	 and back over any non-options that we skipped and permuted.  */
+
+      if (pj_optind == argc)
+	{
+	  /* Set the next-arg-index to point at the non-options
+	     that we previously skipped, so the caller will digest them.  */
+	  if (first_nonopt != last_nonopt)
+	    pj_optind = first_nonopt;
+	  return -1;
+	}
+
+      /* If we have come to a non-option and did not permute it,
+	 either stop the scan or describe it to the caller and pass it by.  */
+
+      if (NONOPTION_P)
+	{
+	  if (ordering == REQUIRE_ORDER)
+	    return -1;
+	  pj_optarg = argv[pj_optind++];
+	  return 1;
+	}
+
+      /* We have found another option-ARGV-element.
+	 Skip the initial punctuation.  */
+
+      nextchar = (argv[pj_optind] + 1
+		  + (longopts != NULL && argv[pj_optind][1] == '-'));
+    }
+
+  /* Decode the current option-ARGV-element.  */
+
+  /* Check whether the ARGV-element is a long option.
+
+     If long_only and the ARGV-element has the form "-f", where f is
+     a valid short option, don't consider it an abbreviated form of
+     a long option that starts with f.  Otherwise there would be no
+     way to give the -f short option.
+
+     On the other hand, if there's a long option "fubar" and
+     the ARGV-element is "-fu", do consider that an abbreviation of
+     the long option, just like "--fu", and not "-f" with arg "u".
+
+     This distinction seems to be the most useful approach.  */
+
+  if (longopts != NULL
+      && (argv[pj_optind][1] == '-'
+	  || (long_only && (argv[pj_optind][2] || !my_index (optstring, argv[pj_optind][1])))))
+    {
+      char *nameend;
+      const struct pj_getopt_option *p;
+      const struct pj_getopt_option *pfound = NULL;
+      int exact = 0;
+      int ambig = 0;
+      int indfound = -1;
+      int option_index;
+
+      for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
+	/* Do nothing.  */ ;
+
+      /* Test all long options for either exact match
+	 or abbreviated matches.  */
+      for (p = longopts, option_index = 0; p->name; p++, option_index++)
+	if (!strncmp (p->name, nextchar, nameend - nextchar))
+	  {
+	    if ((unsigned int) (nameend - nextchar)
+		== (unsigned int) strlen (p->name))
+	      {
+		/* Exact match found.  */
+		pfound = p;
+		indfound = option_index;
+		exact = 1;
+		break;
+	      }
+	    else if (pfound == NULL)
+	      {
+		/* First nonexact match found.  */
+		pfound = p;
+		indfound = option_index;
+	      }
+	    else
+	      /* Second or later nonexact match found.  */
+	      ambig = 1;
+	  }
+
+      if (ambig && !exact)
+	{
+	  nextchar += strlen (nextchar);
+	  pj_optind++;
+	  pj_optopt = 0;
+	  return '?';
+	}
+
+      if (pfound != NULL)
+	{
+	  option_index = indfound;
+	  pj_optind++;
+	  if (*nameend)
+	    {
+	      /* Don't test has_arg with >, because some C compilers don't
+		 allow it to be used on enums.  */
+	      if (pfound->has_arg)
+		pj_optarg = nameend + 1;
+	      else
+		{
+		  nextchar += strlen (nextchar);
+
+		  pj_optopt = pfound->val;
+		  return '?';
+		}
+	    }
+	  else if (pfound->has_arg == 1)
+	    {
+	      if (pj_optind < argc)
+		pj_optarg = argv[pj_optind++];
+	      else
+		{
+		  nextchar += strlen (nextchar);
+		  pj_optopt = pfound->val;
+		  return optstring[0] == ':' ? ':' : '?';
+		}
+	    }
+	  nextchar += strlen (nextchar);
+	  if (longind != NULL)
+	    *longind = option_index;
+	  if (pfound->flag)
+	    {
+	      *(pfound->flag) = pfound->val;
+	      return 0;
+	    }
+	  return pfound->val;
+	}
+
+      /* Can't find it as a long option.  If this is not pj_getopt_long_only,
+	 or the option starts with '--' or is not a valid short
+	 option, then it's an error.
+	 Otherwise interpret it as a short option.  */
+      if (!long_only || argv[pj_optind][1] == '-'
+	  || my_index (optstring, *nextchar) == NULL)
+	{
+	  nextchar = (char *) "";
+	  pj_optind++;
+	  pj_optopt = 0;
+	  return '?';
+	}
+    }
+
+  /* Look at and handle the next short option-character.  */
+
+  {
+    char c = *nextchar++;
+    char *temp = my_index (optstring, c);
+
+    /* Increment `pj_optind' when we start to process its last character.  */
+    if (*nextchar == '\0')
+      ++pj_optind;
+
+    if (temp == NULL || c == ':')
+      {
+	pj_optopt = c;
+	return '?';
+      }
+    /* Convenience. Treat POSIX -W foo same as long option --foo */
+    if (temp[0] == 'W' && temp[1] == ';')
+      {
+	char *nameend;
+	const struct pj_getopt_option *p;
+	const struct pj_getopt_option *pfound = NULL;
+	int exact = 0;
+	int ambig = 0;
+	int indfound = 0;
+	int option_index;
+
+	/* This is an option that requires an argument.  */
+	if (*nextchar != '\0')
+	  {
+	    pj_optarg = nextchar;
+	    /* If we end this ARGV-element by taking the rest as an arg,
+	       we must advance to the next element now.  */
+	    pj_optind++;
+	  }
+	else if (pj_optind == argc)
+	  {
+	    pj_optopt = c;
+	    if (optstring[0] == ':')
+	      c = ':';
+	    else
+	      c = '?';
+	    return c;
+	  }
+	else
+	  /* We already incremented `pj_optind' once;
+	     increment it again when taking next ARGV-elt as argument.  */
+	  pj_optarg = argv[pj_optind++];
+
+	/* pj_optarg is now the argument, see if it's in the
+	   table of longopts.  */
+
+	for (nextchar = nameend = pj_optarg; *nameend && *nameend != '='; nameend++)
+	  /* Do nothing.  */ ;
+
+	/* Test all long options for either exact match
+	   or abbreviated matches.  */
+	for (p = longopts, option_index = 0; p->name; p++, option_index++)
+	  if (!strncmp (p->name, nextchar, nameend - nextchar))
+	    {
+	      if ((unsigned int) (nameend - nextchar) == strlen (p->name))
+		{
+		  /* Exact match found.  */
+		  pfound = p;
+		  indfound = option_index;
+		  exact = 1;
+		  break;
+		}
+	      else if (pfound == NULL)
+		{
+		  /* First nonexact match found.  */
+		  pfound = p;
+		  indfound = option_index;
+		}
+	      else
+		/* Second or later nonexact match found.  */
+		ambig = 1;
+	    }
+	if (ambig && !exact)
+	  {
+	    nextchar += strlen (nextchar);
+	    pj_optind++;
+	    return '?';
+	  }
+	if (pfound != NULL)
+	  {
+	    option_index = indfound;
+	    if (*nameend)
+	      {
+		/* Don't test has_arg with >, because some C compilers don't
+		   allow it to be used on enums.  */
+		if (pfound->has_arg)
+		  pj_optarg = nameend + 1;
+		else
+		  {
+		    nextchar += strlen (nextchar);
+		    return '?';
+		  }
+	      }
+	    else if (pfound->has_arg == 1)
+	      {
+		if (pj_optind < argc)
+		  pj_optarg = argv[pj_optind++];
+		else
+		  {
+		    nextchar += strlen (nextchar);
+		    return optstring[0] == ':' ? ':' : '?';
+		  }
+	      }
+	    nextchar += strlen (nextchar);
+	    if (longind != NULL)
+	      *longind = option_index;
+	    if (pfound->flag)
+	      {
+		*(pfound->flag) = pfound->val;
+		return 0;
+	      }
+	    return pfound->val;
+	  }
+	  nextchar = NULL;
+	  return 'W';	/* Let the application handle it.   */
+      }
+    if (temp[1] == ':')
+      {
+	if (temp[2] == ':')
+	  {
+	    /* This is an option that accepts an argument optionally.  */
+	    if (*nextchar != '\0')
+	      {
+		pj_optarg = nextchar;
+		pj_optind++;
+	      }
+	    else
+	      pj_optarg = NULL;
+	    nextchar = NULL;
+	  }
+	else
+	  {
+	    /* This is an option that requires an argument.  */
+	    if (*nextchar != '\0')
+	      {
+		pj_optarg = nextchar;
+		/* If we end this ARGV-element by taking the rest as an arg,
+		   we must advance to the next element now.  */
+		pj_optind++;
+	      }
+	    else if (pj_optind == argc)
+	      {
+		pj_optopt = c;
+		if (optstring[0] == ':')
+		  c = ':';
+		else
+		  c = '?';
+	      }
+	    else
+	      /* We already incremented `pj_optind' once;
+		 increment it again when taking next ARGV-elt as argument.  */
+	      pj_optarg = argv[pj_optind++];
+	    nextchar = NULL;
+	  }
+      }
+    return c;
+  }
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/hmac_md5.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/hmac_md5.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/hmac_md5.c	(revision 1163)
@@ -0,0 +1,75 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjlib-util/md5.h>
+#include <pj/string.h>
+
+
+/* This code is taken from RFC 2104 */
+
+
+PJ_DEF(void) pj_hmac_md5( const pj_uint8_t *input, unsigned input_len, 
+			  const pj_uint8_t *key, unsigned key_len, 
+			  pj_uint8_t digest[16] )
+{
+    pj_md5_context context;
+    pj_uint8_t k_ipad[65];
+    pj_uint8_t k_opad[65];
+    pj_uint8_t tk[16];
+    int i;
+
+    /* if key is longer than 64 bytes reset it to key=MD5(key) */
+    if (key_len > 64) {
+        pj_md5_context      tctx;
+
+        pj_md5_init(&tctx);
+        pj_md5_update(&tctx, key, key_len);
+        pj_md5_final(&tctx, tk);
+
+        key = tk;
+        key_len = 16;
+    }
+
+    /* start out by storing key in pads */
+    pj_bzero( k_ipad, sizeof(k_ipad));
+    pj_bzero( k_opad, sizeof(k_opad));
+    pj_memcpy( k_ipad, key, key_len);
+    pj_memcpy( k_opad, key, key_len);
+
+    /* XOR key with ipad and opad values */
+    for (i=0; i<64; i++) {
+        k_ipad[i] ^= 0x36;
+        k_opad[i] ^= 0x5c;
+    }
+    /*
+     * perform inner MD5
+     */
+    pj_md5_init(&context);
+    pj_md5_update(&context, k_ipad, 64);
+    pj_md5_update(&context, input, input_len);
+    pj_md5_final(&context, digest);
+
+    /*
+     * perform outer MD5
+     */
+    pj_md5_init(&context);
+    pj_md5_update(&context, k_opad, 64);
+    pj_md5_update(&context, digest, 16);
+    pj_md5_final(&context, digest);
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/hmac_sha1.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/hmac_sha1.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/hmac_sha1.c	(revision 1163)
@@ -0,0 +1,74 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjlib-util/hmac_sha1.h>
+#include <pjlib-util/sha1.h>
+#include <pj/string.h>
+
+
+PJ_DEF(void) pj_hmac_sha1(const pj_uint8_t *input, unsigned input_len, 
+			  const pj_uint8_t *key, unsigned key_len, 
+			  pj_uint8_t digest[20] )
+{
+    pj_sha1_context context;
+    pj_uint8_t k_ipad[65];
+    pj_uint8_t k_opad[65];
+    pj_uint8_t tk[20];
+    int i;
+
+    /* if key is longer than 64 bytes reset it to key=SHA1(key) */
+    if (key_len > 64) {
+        pj_sha1_context      tctx;
+
+        pj_sha1_init(&tctx);
+        pj_sha1_update(&tctx, key, key_len);
+        pj_sha1_final(&tctx, tk);
+
+        key = tk;
+        key_len = 20;
+    }
+
+    /* start out by storing key in pads */
+    pj_bzero( k_ipad, sizeof(k_ipad));
+    pj_bzero( k_opad, sizeof(k_opad));
+    pj_memcpy( k_ipad, key, key_len);
+    pj_memcpy( k_opad, key, key_len);
+
+    /* XOR key with ipad and opad values */
+    for (i=0; i<64; i++) {
+        k_ipad[i] ^= 0x36;
+        k_opad[i] ^= 0x5c;
+    }
+    /*
+     * perform inner SHA1
+     */
+    pj_sha1_init(&context);
+    pj_sha1_update(&context, k_ipad, 64);
+    pj_sha1_update(&context, input, input_len);
+    pj_sha1_final(&context, digest);
+
+    /*
+     * perform outer SHA1
+     */
+    pj_sha1_init(&context);
+    pj_sha1_update(&context, k_opad, 64);
+    pj_sha1_update(&context, digest, 20);
+    pj_sha1_final(&context, digest);
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/md5.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/md5.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/md5.c	(revision 1163)
@@ -0,0 +1,266 @@
+/* $Id$ */
+/* 
+ * This is the implementation of MD5 algorithm, based on the code
+ * written by Colin Plumb. This file is put in public domain.
+ */
+#include <pjlib-util/md5.h>
+#include <pj/string.h>		/* pj_memcpy */
+/*
+ * This code implements the MD5 message-digest algorithm.
+ * The algorithm is due to Ron Rivest.  This code was
+ * written by Colin Plumb in 1993, no copyright is claimed.
+ * This code is in the public domain; do with it what you wish.
+ *
+ * Equivalent code is available from RSA Data Security, Inc.
+ * This code has been tested against that, and is equivalent,
+ * except that you don't need to include two pages of legalese
+ * with every copy.
+ *
+ * To compute the message digest of a chunk of bytes, declare an
+ * MD5Context structure, pass it to MD5Init, call MD5Update as
+ * needed on buffers full of bytes, and then call MD5Final, which
+ * will fill a supplied 16-byte array with the digest.
+ */
+
+#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN != 0
+#define HIGHFIRST 1
+#endif
+
+#ifndef HIGHFIRST
+#define byteReverse(buf, len)	/* Nothing */
+#else
+void byteReverse(unsigned char *buf, unsigned longs);
+
+#ifndef ASM_MD5
+/*
+ * Note: this code is harmless on little-endian machines.
+ */
+void byteReverse(unsigned char *buf, unsigned longs)
+{
+    pj_uint32_t t;
+    do {
+	t = (pj_uint32_t) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
+	    ((unsigned) buf[1] << 8 | buf[0]);
+	*(pj_uint32_t *) buf = t;
+	buf += 4;
+    } while (--longs);
+}
+#endif
+#endif
+
+static void MD5Transform(pj_uint32_t buf[4], pj_uint32_t const in[16]);
+
+
+/*
+ * Start MD5 accumulation.  Set bit count to 0 and buffer to mysterious
+ * initialization constants.
+ */
+PJ_DEF(void) pj_md5_init(pj_md5_context *ctx)
+{
+    ctx->buf[0] = 0x67452301;
+    ctx->buf[1] = 0xefcdab89;
+    ctx->buf[2] = 0x98badcfe;
+    ctx->buf[3] = 0x10325476;
+
+    ctx->bits[0] = 0;
+    ctx->bits[1] = 0;
+}
+
+/*
+ * Update context to reflect the concatenation of another buffer full
+ * of bytes.
+ */
+PJ_DEF(void) pj_md5_update( pj_md5_context *ctx, 
+			    unsigned char const *buf, unsigned len)
+{
+    pj_uint32_t t;
+
+    /* Update bitcount */
+
+    t = ctx->bits[0];
+    if ((ctx->bits[0] = t + ((pj_uint32_t) len << 3)) < t)
+	ctx->bits[1]++;		/* Carry from low to high */
+    ctx->bits[1] += len >> 29;
+
+    t = (t >> 3) & 0x3f;	/* Bytes already in shsInfo->data */
+
+    /* Handle any leading odd-sized chunks */
+
+    if (t) {
+	unsigned char *p = (unsigned char *) ctx->in + t;
+
+	t = 64 - t;
+	if (len < t) {
+	    pj_memcpy(p, buf, len);
+	    return;
+	}
+	pj_memcpy(p, buf, t);
+	byteReverse(ctx->in, 16);
+	MD5Transform(ctx->buf, (pj_uint32_t *) ctx->in);
+	buf += t;
+	len -= t;
+    }
+    /* Process data in 64-byte chunks */
+
+    while (len >= 64) {
+	pj_memcpy(ctx->in, buf, 64);
+	byteReverse(ctx->in, 16);
+	MD5Transform(ctx->buf, (pj_uint32_t *) ctx->in);
+	buf += 64;
+	len -= 64;
+    }
+
+    /* Handle any remaining bytes of data. */
+
+    pj_memcpy(ctx->in, buf, len);
+}
+
+/*
+ * Final wrapup - pad to 64-byte boundary with the bit pattern 
+ * 1 0* (64-bit count of bits processed, MSB-first)
+ */
+PJ_DEF(void) pj_md5_final(pj_md5_context *ctx, unsigned char digest[16])
+{
+    unsigned count;
+    unsigned char *p;
+
+    /* Compute number of bytes mod 64 */
+    count = (ctx->bits[0] >> 3) & 0x3F;
+
+    /* Set the first char of padding to 0x80.  This is safe since there is
+       always at least one byte free */
+    p = ctx->in + count;
+    *p++ = 0x80;
+
+    /* Bytes of padding needed to make 64 bytes */
+    count = 64 - 1 - count;
+
+    /* Pad out to 56 mod 64 */
+    if (count < 8) {
+	/* Two lots of padding:  Pad the first block to 64 bytes */
+	pj_bzero(p, count);
+	byteReverse(ctx->in, 16);
+	MD5Transform(ctx->buf, (pj_uint32_t *) ctx->in);
+
+	/* Now fill the next block with 56 bytes */
+	pj_bzero(ctx->in, 56);
+    } else {
+	/* Pad block to 56 bytes */
+	pj_bzero(p, count - 8);
+    }
+    byteReverse(ctx->in, 14);
+
+    /* Append length in bits and transform */
+    ((pj_uint32_t *) ctx->in)[14] = ctx->bits[0];
+    ((pj_uint32_t *) ctx->in)[15] = ctx->bits[1];
+
+    MD5Transform(ctx->buf, (pj_uint32_t *) ctx->in);
+    byteReverse((unsigned char *) ctx->buf, 4);
+    pj_memcpy(digest, ctx->buf, 16);
+    pj_bzero(ctx, sizeof(ctx));	/* In case it's sensitive */
+}
+
+#ifndef ASM_MD5
+
+/* The four core functions - F1 is optimized somewhat */
+
+/* #define F1(x, y, z) (x & y | ~x & z) */
+#define F1(x, y, z) (z ^ (x & (y ^ z)))
+#define F2(x, y, z) F1(z, x, y)
+#define F3(x, y, z) (x ^ y ^ z)
+#define F4(x, y, z) (y ^ (x | ~z))
+
+/* This is the central step in the MD5 algorithm. */
+#define MD5STEP(f, w, x, y, z, data, s) \
+	( w += f(x, y, z) + data,  w = w<<s | w>>(32-s),  w += x )
+
+/*
+ * The core of the MD5 algorithm, this alters an existing MD5 hash to
+ * reflect the addition of 16 longwords of new data.  MD5Update blocks
+ * the data and converts bytes into longwords for this routine.
+ */
+static void MD5Transform(pj_uint32_t buf[4], pj_uint32_t const in[16])
+{
+    register pj_uint32_t a, b, c, d;
+
+    a = buf[0];
+    b = buf[1];
+    c = buf[2];
+    d = buf[3];
+
+    MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
+    MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
+    MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17);
+    MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
+    MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
+    MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12);
+    MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17);
+    MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22);
+    MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7);
+    MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
+    MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
+    MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
+    MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
+    MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
+    MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
+    MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
+
+    MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
+    MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
+    MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
+    MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
+    MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
+    MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
+    MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
+    MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
+    MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
+    MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
+    MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
+    MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
+    MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
+    MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
+    MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
+    MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
+
+    MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
+    MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11);
+    MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
+    MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
+    MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4);
+    MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
+    MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
+    MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
+    MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
+    MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
+    MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
+    MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23);
+    MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
+    MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
+    MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
+    MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
+
+    MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6);
+    MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10);
+    MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
+    MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21);
+    MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
+    MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
+    MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
+    MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21);
+    MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
+    MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
+    MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15);
+    MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
+    MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6);
+    MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
+    MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
+    MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
+
+    buf[0] += a;
+    buf[1] += b;
+    buf[2] += c;
+    buf[3] += d;
+}
+
+#endif
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/resolver.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/resolver.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/resolver.c	(revision 1163)
@@ -0,0 +1,1411 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjlib-util/resolver.h>
+#include <pjlib-util/errno.h>
+#include <pj/assert.h>
+#include <pj/ctype.h>
+#include <pj/except.h>
+#include <pj/hash.h>
+#include <pj/ioqueue.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/pool_buf.h>
+#include <pj/string.h>
+#include <pj/sock.h>
+#include <pj/timer.h>
+
+
+#define THIS_FILE	    "resolver.c"
+
+
+/* Check that maximum DNS nameservers is not too large. 
+ * This has got todo with the datatype to index the nameserver in the query.
+ */
+#if PJ_DNS_RESOLVER_MAX_NS > 256
+#   error "PJ_DNS_RESOLVER_MAX_NS is too large (max=256)"
+#endif
+
+
+#define RES_HASH_TABLE_SIZE 127		/**< Hash table size (must be 2^n-1 */
+#define PORT		    53		/**< Default NS port.		    */
+#define Q_HASH_TABLE_SIZE   127		/**< Query hash table size	    */
+#define TIMER_SIZE	    127		/**< Initial number of timers.	    */
+#define MAX_FD		    3		/**< Maximum internal sockets.	    */
+
+#define RES_BUF_SZ	    PJ_DNS_RESOLVER_RES_BUF_SIZE
+#define UDPSZ		    PJ_DNS_RESOLVER_MAX_UDP_SIZE
+#define TMP_SZ		    PJ_DNS_RESOLVER_TMP_BUF_SIZE
+
+
+/* Nameserver state */
+enum ns_state
+{
+    STATE_PROBING,
+    STATE_ACTIVE,
+    STATE_BAD,
+};
+
+/* 
+ * Each nameserver entry.
+ * A name server is identified by its socket address (IP and port).
+ * Each NS will have a flag to indicate whether it's properly functioning.
+ */
+struct nameserver
+{
+    pj_sockaddr_in  addr;		/**< Server address.		    */
+
+    enum ns_state   state;		/**< Nameserver state.		    */
+    pj_time_val	    state_expiry;	/**< Time set next state.	    */
+    pj_time_val	    rt_delay;		/**< Response time.		    */
+    
+
+    /* For calculating rt_delay: */
+    pj_uint16_t	    q_id;		/**< Query ID.			    */
+    pj_time_val	    sent_time;		/**< Time this query is sent.	    */
+};
+
+
+/* Child query list head 
+ * See comments on pj_dns_async_query below.
+ */
+struct query_head
+{
+    PJ_DECL_LIST_MEMBER(pj_dns_async_query);
+};
+
+
+/* Key to look for outstanding query and/or cached response */
+struct res_key
+{
+    pj_uint16_t		     qtype;		    /**< Query type.	    */
+    char		     name[PJ_MAX_HOSTNAME]; /**< Name being queried */
+};
+
+
+/* 
+ * This represents each asynchronous query entry.
+ * This entry will be put in two hash tables, the first one keyed on the DNS 
+ * transaction ID to match response with the query, and the second one keyed
+ * on "res_key" structure above to match a new request against outstanding 
+ * requests.
+ *
+ * An asynchronous entry may have child entries; child entries are subsequent
+ * queries to the same resource while there is pending query on the same
+ * DNS resource name and type. When a query has child entries, once the
+ * response is received (or error occurs), the response will trigger callback
+ * invocations for all childs entries.
+ *
+ * Note: when application cancels the query, the callback member will be
+ *       set to NULL, but for simplicity, the query will be let running.
+ */
+struct pj_dns_async_query
+{
+    PJ_DECL_LIST_MEMBER(pj_dns_async_query);	/**< List member.	    */
+
+    pj_dns_resolver	*resolver;	/**< The resolver instance.	    */
+    pj_uint16_t		 id;		/**< Transaction ID.		    */
+
+    unsigned		 transmit_cnt;	/**< Number of transmissions.	    */
+
+    struct res_key	 key;		/**< Key to index this query.	    */
+    char		 hbufid[PJ_HASH_ENTRY_SIZE];	/**< Hash buffer 1  */
+    char		 hbufkey[PJ_HASH_ENTRY_SIZE];	/**< Hash buffer 2  */
+    pj_timer_entry	 timer_entry;	/**< Timer to manage timeouts	    */
+    unsigned		 options;	/**< Query options.		    */
+    void		*user_data;	/**< Application data.		    */
+    pj_dns_callback	*cb;		/**< Callback to be called.	    */
+    struct query_head	 child_head;	/**< Child queries list head.	    */
+};
+
+
+/* This structure is used to keep cached response entry.
+ * The cache is a hash table keyed on "res_key" structure above.
+ */
+struct cached_res
+{
+    PJ_DECL_LIST_MEMBER(struct cached_res);
+
+    struct res_key	     key;	    /**< Resource key.		    */
+    char		     buf[RES_BUF_SZ];/**< Resource buffer.	    */
+    char		     hbuf[PJ_HASH_ENTRY_SIZE];	/**< Hash buffer    */
+    pj_time_val		     expiry_time;   /**< Expiration time.	    */
+    pj_dns_parsed_packet    *pkt;	    /**< The response packet.	    */
+};
+
+
+/* Resolver entry */
+struct pj_dns_resolver
+{
+    pj_str_t		 name;		/**< Resolver instance name for id. */
+
+    /* Internals */
+    pj_pool_t		*pool;		/**< Internal pool.		    */
+    pj_mutex_t		*mutex;		/**< Mutex protection.		    */
+    pj_bool_t		 own_timer;	/**< Do we own timer?		    */
+    pj_timer_heap_t	*timer;		/**< Timer instance.		    */
+    pj_bool_t		 own_ioqueue;	/**< Do we own ioqueue?		    */
+    pj_ioqueue_t	*ioqueue;	/**< Ioqueue instance.		    */
+    char		 tmp_pool[TMP_SZ];/**< Temporary pool buffer.	    */
+
+    /* Socket */
+    pj_sock_t		 udp_sock;	/**< UDP socket.		    */
+    pj_ioqueue_key_t	*udp_key;	/**< UDP socket ioqueue key.	    */
+    unsigned char	 udp_rx_pkt[UDPSZ];/**< UDP receive buffer.	    */
+    unsigned char	 udp_tx_pkt[UDPSZ];/**< UDP receive buffer.	    */
+    pj_ssize_t		 udp_len;	/**< Length of received packet.	    */
+    pj_ioqueue_op_key_t	 udp_op_key;	/**< UDP read operation key.	    */
+    pj_sockaddr_in	 udp_src_addr;	/**< Source address of packet	    */
+    int			 udp_addr_len;	/**< Source address length.	    */
+
+    /* Settings */
+    pj_dns_settings	 settings;	/**< Resolver settings.		    */
+
+    /* Nameservers */
+    unsigned		 ns_count;	/**< Number of name servers.	    */
+    struct nameserver	 ns[PJ_DNS_RESOLVER_MAX_NS];	/**< Array of NS.   */
+
+    /* Last DNS transaction ID used. */
+    pj_uint16_t		 last_id;
+
+    /* Hash table for cached response */
+    pj_hash_table_t	*hrescache;	/**< Cached response in hash table  */
+
+    /* Cached response free list */
+    struct cached_res	 res_free_nodes;
+
+    /* Pending asynchronous query, hashed by transaction ID. */
+    pj_hash_table_t	*hquerybyid;
+
+    /* Pending asynchronous query, hashed by "res_key" */
+    pj_hash_table_t	*hquerybyres;
+
+    /* Query entries free list */
+    struct query_head	 query_free_nodes;
+};
+
+
+/* Callback from ioqueue when packet is received */
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read);
+
+/* Callback to be called when query has timed out */
+static void on_timeout( pj_timer_heap_t *timer_heap,
+			struct pj_timer_entry *entry);
+
+/* Select which nameserver to use */
+static pj_status_t select_nameservers(pj_dns_resolver *resolver,
+				      unsigned *count,
+				      unsigned servers[]);
+
+
+/*
+ * Create the resolver.
+ */
+PJ_DEF(pj_status_t) pj_dns_resolver_create( pj_pool_factory *pf,
+					    const char *name,
+					    unsigned options,
+					    pj_timer_heap_t *timer,
+					    pj_ioqueue_t *ioqueue,
+					    pj_dns_resolver **p_resolver)
+{
+    pj_pool_t *pool;
+    pj_dns_resolver *resv;
+    pj_ioqueue_callback socket_cb;
+    pj_status_t status;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(pf && p_resolver, PJ_EINVAL);
+
+    if (name == NULL)
+	name = THIS_FILE;
+
+    /* Create and initialize resolver instance */
+    pool = pj_pool_create(pf, name, 4000, 4000, NULL);
+    if (!pool)
+	return PJ_ENOMEM;
+
+    /* Create pool and name */
+    resv = pj_pool_zalloc(pool, sizeof(struct pj_dns_resolver));
+    resv->pool = pool;
+    resv->udp_sock = PJ_INVALID_SOCKET;
+    pj_strdup2_with_null(pool, &resv->name, name);
+    
+    /* Create the mutex */
+    status = pj_mutex_create_recursive(pool, name, &resv->mutex);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Timer, ioqueue, and settings */
+    resv->timer = timer;
+    resv->ioqueue = ioqueue;
+    resv->last_id = 1;
+    resv->settings.options = options;
+    resv->settings.qretr_delay = PJ_DNS_RESOLVER_QUERY_RETRANSMIT_DELAY;
+    resv->settings.qretr_count = PJ_DNS_RESOLVER_QUERY_RETRANSMIT_COUNT;
+    resv->settings.cache_max_ttl = PJ_DNS_RESOLVER_MAX_TTL;
+
+    /* Create the timer heap if one is not specified */
+    if (resv->timer == NULL) {
+	status = pj_timer_heap_create(pool, TIMER_SIZE, &resv->timer);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+    }
+
+    /* Create the ioqueue if one is not specified */
+    if (resv->ioqueue == NULL) {
+	status = pj_ioqueue_create(pool, MAX_FD, &resv->ioqueue);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+    }
+
+    /* Response cache hash table and item list */
+    resv->hrescache = pj_hash_create(pool, RES_HASH_TABLE_SIZE);
+    pj_list_init(&resv->res_free_nodes);
+
+    /* Query hash table and free list. */
+    resv->hquerybyid = pj_hash_create(pool, Q_HASH_TABLE_SIZE);
+    resv->hquerybyres = pj_hash_create(pool, Q_HASH_TABLE_SIZE);
+    pj_list_init(&resv->query_free_nodes);
+
+    /* Create the UDP socket */
+    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &resv->udp_sock);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Register to ioqueue */
+    pj_bzero(&socket_cb, sizeof(socket_cb));
+    socket_cb.on_read_complete = &on_read_complete;
+    status = pj_ioqueue_register_sock(pool, resv->ioqueue, resv->udp_sock,
+				      resv, &socket_cb, &resv->udp_key);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    pj_ioqueue_op_key_init(&resv->udp_op_key, sizeof(resv->udp_op_key));
+
+    /* Start asynchronous read to the UDP socket */
+    resv->udp_len = sizeof(resv->udp_rx_pkt);
+    resv->udp_addr_len = sizeof(resv->udp_src_addr);
+    status = pj_ioqueue_recvfrom(resv->udp_key, &resv->udp_op_key, 
+				 resv->udp_rx_pkt, &resv->udp_len, 
+				 PJ_IOQUEUE_ALWAYS_ASYNC,
+				 &resv->udp_src_addr, &resv->udp_addr_len);
+    if (status != PJ_EPENDING)
+	goto on_error;
+
+
+    /* Looks like everything is okay */
+    *p_resolver = resv;
+    return PJ_SUCCESS;
+
+on_error:
+    pj_dns_resolver_destroy(resv, PJ_FALSE);
+    return status;
+}
+
+
+/*
+ * Destroy DNS resolver instance.
+ */
+PJ_DEF(pj_status_t) pj_dns_resolver_destroy( pj_dns_resolver *resolver,
+					     pj_bool_t notify)
+{
+    PJ_ASSERT_RETURN(resolver, PJ_EINVAL);
+
+    if (notify) {
+	/*
+	 * Notify pending queries if requested.
+	 */
+	pj_hash_iterator_t it_buf, *it;
+
+	it = pj_hash_first(resolver->hquerybyid, &it_buf);
+	while (it) {
+	    pj_dns_async_query *q = pj_hash_this(resolver->hquerybyid, it);
+	    pj_dns_async_query *cq;
+	    if (q->cb)
+		(*q->cb)(q->user_data, PJ_ECANCELLED, NULL);
+
+	    cq = q->child_head.next;
+	    while (cq != (pj_dns_async_query*)&q->child_head) {
+		if (cq->cb)
+		    (*cq->cb)(cq->user_data, PJ_ECANCELLED, NULL);
+		cq = cq->next;
+	    }
+	    it = pj_hash_next(resolver->hquerybyid, it);
+	}
+    }
+
+    if (resolver->own_timer && resolver->timer) {
+	pj_timer_heap_destroy(resolver->timer);
+	resolver->timer = NULL;
+    }
+
+    if (resolver->own_ioqueue && resolver->ioqueue) {
+	pj_ioqueue_destroy(resolver->ioqueue);
+	resolver->ioqueue = NULL;
+    }
+
+    if (resolver->udp_key != NULL) {
+	pj_ioqueue_unregister(resolver->udp_key);
+	resolver->udp_key = NULL;
+	resolver->udp_sock = PJ_INVALID_SOCKET;
+    } else if (resolver->udp_sock != PJ_INVALID_SOCKET) {
+	pj_sock_close(resolver->udp_sock);
+	resolver->udp_sock = PJ_INVALID_SOCKET;
+    }
+
+    if (resolver->mutex) {
+	pj_mutex_destroy(resolver->mutex);
+	resolver->mutex = NULL;
+    }
+
+    if (resolver->pool) {
+	pj_pool_t *pool = resolver->pool;
+	resolver->pool = NULL;
+	pj_pool_release(pool);
+    }
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * Configure name servers for the DNS resolver. 
+ */
+PJ_DEF(pj_status_t) pj_dns_resolver_set_ns( pj_dns_resolver *resolver,
+					    unsigned count,
+					    const pj_str_t servers[],
+					    const pj_uint16_t ports[])
+{
+    unsigned i;
+    pj_time_val now;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(resolver && count && servers, PJ_EINVAL);
+
+    pj_mutex_lock(resolver->mutex);
+
+    if (count > PJ_DNS_RESOLVER_MAX_NS)
+	count = PJ_DNS_RESOLVER_MAX_NS;
+
+    resolver->ns_count = 0;
+    pj_bzero(resolver->ns, sizeof(resolver->ns));
+
+    pj_gettimeofday(&now);
+
+    for (i=0; i<count; ++i) {
+	struct nameserver *ns = &resolver->ns[i];
+
+	status = pj_sockaddr_in_init(&ns->addr, &servers[i], 
+				     (pj_uint16_t)(ports ? ports[i] : PORT));
+	if (status != PJ_SUCCESS) {
+	    pj_mutex_unlock(resolver->mutex);
+	    return PJLIB_UTIL_EDNSINNSADDR;
+	}
+
+	ns->state = STATE_ACTIVE;
+	ns->state_expiry = now;
+	ns->rt_delay.sec = 10;
+    }
+    
+    resolver->ns_count = count;
+
+    pj_mutex_unlock(resolver->mutex);
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * Modify the resolver settings.
+ */
+PJ_DEF(pj_status_t) pj_dns_resolver_set_settings(pj_dns_resolver *resolver,
+						 const pj_dns_settings *st)
+{
+    PJ_ASSERT_RETURN(resolver && st, PJ_EINVAL);
+
+    pj_mutex_lock(resolver->mutex);
+    pj_memcpy(&resolver->settings, st, sizeof(*st));
+    pj_mutex_unlock(resolver->mutex);
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get the resolver current settings.
+ */
+PJ_DEF(pj_status_t) pj_dns_resolver_get_settings( pj_dns_resolver *resolver,
+						  pj_dns_settings *st)
+{
+    PJ_ASSERT_RETURN(resolver && st, PJ_EINVAL);
+
+    pj_mutex_lock(resolver->mutex);
+    pj_memcpy(st, &resolver->settings, sizeof(*st));
+    pj_mutex_unlock(resolver->mutex);
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Poll for events from the resolver. 
+ */
+PJ_DEF(void) pj_dns_resolver_handle_events(pj_dns_resolver *resolver,
+					   const pj_time_val *timeout)
+{
+    PJ_ASSERT_ON_FAIL(resolver, return);
+
+    pj_mutex_lock(resolver->mutex);
+    pj_timer_heap_poll(resolver->timer, NULL);
+    pj_mutex_unlock(resolver->mutex);
+
+    pj_ioqueue_poll(resolver->ioqueue, timeout);
+}
+
+
+/* Get one query node from the free node, if any, or allocate 
+ * a new one.
+ */
+static pj_dns_async_query *alloc_qnode(pj_dns_resolver *resolver,
+				       unsigned options,
+				       void *user_data,
+				       pj_dns_callback *cb)
+{
+    pj_dns_async_query *q;
+
+    /* Merge query options with resolver options */
+    options |= resolver->settings.options;
+
+    if (!pj_list_empty(&resolver->query_free_nodes)) {
+	q = resolver->query_free_nodes.next;
+	pj_list_erase(q);
+	pj_bzero(q, sizeof(*q));
+    } else {
+	q = pj_pool_zalloc(resolver->pool, sizeof(*q));
+    }
+
+    /* Init query */
+    q->resolver = resolver;
+    q->options = options;
+    q->user_data = user_data;
+    q->cb = cb;
+    pj_list_init(&q->child_head);
+
+    return q;
+}
+
+
+/*
+ * Transmit query.
+ */
+static pj_status_t transmit_query(pj_dns_resolver *resolver,
+				  pj_dns_async_query *q)
+{
+    unsigned pkt_size;
+    unsigned i, server_cnt;
+    unsigned servers[PJ_DNS_RESOLVER_MAX_NS];
+    pj_time_val now;
+    pj_str_t name;
+    pj_time_val delay;
+    pj_status_t status;
+
+    /* Create DNS query packet */
+    pkt_size = sizeof(resolver->udp_tx_pkt);
+    name = pj_str(q->key.name);
+    status = pj_dns_make_query(resolver->udp_tx_pkt, &pkt_size, 
+			       q->id, q->key.qtype, &name);
+    if (status != PJ_SUCCESS) {
+	return status;
+    }
+
+    /* Select which nameserver(s) to send requests to. */
+    server_cnt = PJ_ARRAY_SIZE(servers);
+    status = select_nameservers(resolver, &server_cnt, servers);
+    if (status != PJ_SUCCESS) {
+	return status;
+    }
+
+    if (server_cnt == 0) {
+	return PJLIB_UTIL_EDNSNOWORKINGNS;
+    }
+
+    /* Start retransmit/timeout timer for the query */
+    pj_assert(q->timer_entry.id == 0);
+    q->timer_entry.id = 1;
+    q->timer_entry.user_data = q;
+    q->timer_entry.cb = &on_timeout;
+
+    delay.sec = 0;
+    delay.msec = resolver->settings.qretr_delay;
+    pj_time_val_normalize(&delay);
+    status = pj_timer_heap_schedule(resolver->timer, &q->timer_entry, &delay);
+    if (status != PJ_SUCCESS) {
+	return status;
+    }
+
+    /* Get current time. */
+    pj_gettimeofday(&now);
+
+    /* Send the packet to name servers */
+    for (i=0; i<server_cnt; ++i) {
+	pj_ssize_t sent  = (pj_ssize_t) pkt_size;
+	struct nameserver *ns = &resolver->ns[servers[i]];
+
+	pj_sock_sendto(resolver->udp_sock, resolver->udp_tx_pkt, &sent, 0,
+		       &resolver->ns[servers[i]].addr, sizeof(pj_sockaddr_in));
+
+	PJ_LOG(4,(resolver->name.ptr, 
+		  "%s %d bytes to NS %d (%s:%d): DNS %s query for %s",
+		  (q->transmit_cnt==0? "Transmitting":"Re-transmitting"),
+		  (int)sent, servers[i],
+		  pj_inet_ntoa(ns->addr.sin_addr), 
+		  (int)pj_ntohs(ns->addr.sin_port),
+		  pj_dns_get_type_name(q->key.qtype), 
+		  q->key.name));
+
+	if (ns->q_id == 0) {
+	    ns->q_id = q->id;
+	    ns->sent_time = now;
+	}
+    }
+
+    ++q->transmit_cnt;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Initialize resource key for hash table lookup.
+ */
+static void init_res_key(struct res_key *key, int type, const pj_str_t *name)
+{
+    unsigned i, len;
+    char *dst = key->name;
+    const char *src = name->ptr;
+
+    pj_bzero(key, sizeof(struct res_key));
+    key->qtype = (pj_uint16_t)type;
+
+    len = name->slen;
+    if (len > PJ_MAX_HOSTNAME) len = PJ_MAX_HOSTNAME;
+
+    /* Copy key, in lowercase */
+    for (i=0; i<len; ++i) {
+	*dst++ = (char)pj_tolower(*src++);
+    }
+}
+
+
+/*
+ * Create and start asynchronous DNS query for a single resource.
+ */
+PJ_DEF(pj_status_t) pj_dns_resolver_start_query( pj_dns_resolver *resolver,
+						 const pj_str_t *name,
+						 int type,
+						 unsigned options,
+						 pj_dns_callback *cb,
+						 void *user_data,
+						 pj_dns_async_query **p_query)
+{
+    pj_time_val now;
+    struct res_key key;
+    struct cached_res *cache;
+    pj_dns_async_query *q;
+    pj_uint32_t hval;
+    pj_status_t status = PJ_SUCCESS;
+
+    /* Validate arguments */
+    PJ_ASSERT_RETURN(resolver && name && type, PJ_EINVAL);
+
+    /* Check name is not too long. */
+    PJ_ASSERT_RETURN(name->slen>0 && name->slen < PJ_MAX_HOSTNAME,
+		     PJ_ENAMETOOLONG);
+
+    /* Check type */
+    PJ_ASSERT_RETURN(type > 0 && type < 0xFFFF, PJ_EINVAL);
+
+    if (p_query)
+	*p_query = NULL;
+
+    /* Build resource key for looking up hash tables */
+    init_res_key(&key, type, name);
+
+    /* Start working with the resolver */
+    pj_mutex_lock(resolver->mutex);
+
+    /* Get current time. */
+    pj_gettimeofday(&now);
+
+    /* First, check if we have cached response for the specified name/type,
+     * and the cached entry has not expired.
+     */
+    hval = 0;
+    cache = pj_hash_get(resolver->hrescache, &key, sizeof(key), &hval);
+    if (cache) {
+	/* We've found a cached entry. */
+
+	/* Check for expiration */
+	if (PJ_TIME_VAL_GT(cache->expiry_time, now)) {
+
+	    /* Log */
+	    PJ_LOG(5,(resolver->name.ptr, 
+		      "Picked up DNS %s record for %.*s from cache, ttl=%d",
+		      pj_dns_get_type_name(type),
+		      (int)name->slen, name->ptr,
+		      (int)(cache->expiry_time.sec - now.sec)));
+
+	    /* Map DNS Rcode in the response into PJLIB status name space */
+	    status = PJ_DNS_GET_RCODE(cache->pkt->hdr.flags);
+	    status = PJ_STATUS_FROM_DNS_RCODE(status);
+
+	    /* This cached response is still valid. Just return this
+	     * response to caller.
+	     */
+	    if (cb) {
+		(*cb)(user_data, status, cache->pkt);
+	    }
+
+	    /* Done. No host resolution is necessary */
+
+	    /* Must return PJ_SUCCESS */
+	    status = PJ_SUCCESS;
+
+	    goto on_return;
+	}
+
+	/* At this point, we have a cached entry, but this entry has expired.
+	 * Remove this entry from the cached list.
+	 */
+	pj_hash_set(NULL, resolver->hrescache, &key, sizeof(key), 0, NULL);
+
+	/* Store the entry into free nodes */
+	pj_list_push_back(&resolver->res_free_nodes, cache);
+
+	/* Must continue with creating a query now */
+    }
+
+    /* Next, check if we have pending query on the same resource */
+    q = pj_hash_get(resolver->hquerybyres, &key, sizeof(key), NULL);
+    if (q) {
+	/* Yes, there's another pending query to the same key.
+	 * Just create a new child query and add this query to
+	 * pending query's child queries.
+	 */
+	pj_dns_async_query *nq;
+
+	nq = alloc_qnode(resolver, options, user_data, cb);
+	pj_list_push_back(&q->child_head, nq);
+
+	/* Done. This child query will be notified once the "parent"
+	 * query completes.
+	 */
+	status = PJ_SUCCESS;
+	goto on_return;
+    } 
+
+    /* There's no pending query to the same key, initiate a new one. */
+    q = alloc_qnode(resolver, options, user_data, cb);
+
+    /* Save the ID and key */
+    q->id = resolver->last_id++;
+    if (resolver->last_id == 0)
+	resolver->last_id = 1;
+    pj_memcpy(&q->key, &key, sizeof(struct res_key));
+
+    /* Send the query */
+    status = transmit_query(resolver, q);
+    if (status != PJ_SUCCESS) {
+	pj_list_push_back(&resolver->query_free_nodes, q);
+	goto on_return;
+    }
+
+    /* Add query entry to the hash tables */
+    pj_hash_set_np(resolver->hquerybyid, &q->id, sizeof(q->id), 
+		   0, q->hbufid, q);
+    pj_hash_set_np(resolver->hquerybyres, &q->key, sizeof(q->key),
+		   0, q->hbufkey, q);
+
+    if (p_query)
+	*p_query = q;
+
+on_return:
+    pj_mutex_unlock(resolver->mutex);
+    return status;
+}
+
+
+/*
+ * Cancel a pending query.
+ */
+PJ_DEF(pj_status_t) pj_dns_resolver_cancel_query(pj_dns_async_query *query,
+						 pj_bool_t notify)
+{
+    pj_dns_callback *cb;
+
+    PJ_ASSERT_RETURN(query, PJ_EINVAL);
+
+    pj_mutex_lock(query->resolver->mutex);
+
+    cb = query->cb;
+    query->cb = NULL;
+
+    if (notify)
+	(*cb)(query->user_data, PJ_ECANCELLED, NULL);
+
+    pj_mutex_unlock(query->resolver->mutex);
+    return PJ_SUCCESS;
+}
+
+
+
+/* Set nameserver state */
+static void set_nameserver_state(pj_dns_resolver *resolver,
+				 unsigned index,
+				 enum ns_state state,
+				 const pj_time_val *now)
+{
+    struct nameserver *ns = &resolver->ns[index];
+
+    ns->state = state;
+    ns->state_expiry = *now;
+
+    if (state == STATE_PROBING)
+	ns->state_expiry.sec += ((PJ_DNS_RESOLVER_QUERY_RETRANSMIT_COUNT + 2) *
+				 PJ_DNS_RESOLVER_QUERY_RETRANSMIT_DELAY) / 1000;
+    else if (state == STATE_ACTIVE)
+	ns->state_expiry.sec += PJ_DNS_RESOLVER_GOOD_NS_TTL;
+    else
+	ns->state_expiry.sec += PJ_DNS_RESOLVER_BAD_NS_TTL;
+
+}
+
+
+/* Select which nameserver(s) to use. Note this may return multiple
+ * name servers. The algorithm to select which nameservers to be
+ * sent the request to is as follows:
+ *  - select the first nameserver that is known to be good for the
+ *    last PJ_DNS_RESOLVER_GOOD_NS_TTL interval.
+ *  - for all NSes, if last_known_good >= PJ_DNS_RESOLVER_GOOD_NS_TTL, 
+ *    include the NS to re-check again that the server is still good,
+ *    unless the NS is known to be bad in the last PJ_DNS_RESOLVER_BAD_NS_TTL
+ *    interval.
+ *  - for all NSes, if last_known_bad >= PJ_DNS_RESOLVER_BAD_NS_TTL, 
+ *    also include the NS to re-check again that the server is still bad.
+ */
+static pj_status_t select_nameservers(pj_dns_resolver *resolver,
+				      unsigned *count,
+				      unsigned servers[])
+{
+    unsigned i, max_count=*count;
+    int min;
+    pj_time_val now;
+
+    pj_assert(max_count > 0);
+
+    *count = 0;
+    servers[0] = 0xFFFF;
+
+    /* Check that nameservers are configured. */
+    if (resolver->ns_count == 0)
+	return PJLIB_UTIL_EDNSNONS;
+
+    pj_gettimeofday(&now);
+
+    /* Select one Active nameserver with best response time. */
+    for (min=-1, i=0; i<resolver->ns_count; ++i) {
+	struct nameserver *ns = &resolver->ns[i];
+
+	if (ns->state != STATE_ACTIVE)
+	    continue;
+
+	if (min == -1)
+	    min = i;
+	else if (PJ_TIME_VAL_LT(ns->rt_delay, resolver->ns[min].rt_delay))
+	    min = i;
+    }
+    if (min != -1) {
+	servers[0] = min;
+	++(*count);
+    }
+
+    /* Scan nameservers. */
+    for (i=0; i<resolver->ns_count && *count < max_count; ++i) {
+	struct nameserver *ns = &resolver->ns[i];
+
+	if (PJ_TIME_VAL_LTE(ns->state_expiry, now)) {
+	    if (ns->state == STATE_PROBING) {
+		set_nameserver_state(resolver, i, STATE_BAD, &now);
+	    } else {
+		set_nameserver_state(resolver, i, STATE_PROBING, &now);
+		if ((int)i != min) {
+		    servers[*count] = i;
+		    ++(*count);
+		}
+	    }
+	} else if (ns->state == STATE_PROBING && (int)i != min) {
+	    servers[*count] = i;
+	    ++(*count);
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/* Update name server status */
+static void report_nameserver_status(pj_dns_resolver *resolver,
+				     const pj_sockaddr_in *ns_addr,
+				     const pj_dns_parsed_packet *pkt)
+{
+    unsigned i;
+    int rcode;
+    pj_uint32_t q_id;
+    pj_time_val now;
+    pj_bool_t is_good;
+
+    /* Only mark nameserver as "bad" if it returned non-parseable response or
+     * it returned the following status codes
+     */
+    if (pkt) {
+	rcode = PJ_DNS_GET_RCODE(pkt->hdr.flags);
+	q_id = pkt->hdr.id;
+    } else {
+	rcode = 0;
+	q_id = (pj_uint32_t)-1;
+    }
+
+    if (!pkt || rcode == PJ_DNS_RCODE_SERVFAIL ||
+	        rcode == PJ_DNS_RCODE_REFUSED ||
+	        rcode == PJ_DNS_RCODE_NOTAUTH) 
+    {
+	is_good = PJ_FALSE;
+    } else {
+	is_good = PJ_TRUE;
+    }
+
+
+    /* Mark time */
+    pj_gettimeofday(&now);
+
+    /* Recheck all nameservers. */
+    for (i=0; i<resolver->ns_count; ++i) {
+	struct nameserver *ns = &resolver->ns[i];
+
+	if (ns->addr.sin_addr.s_addr == ns_addr->sin_addr.s_addr &&
+	    ns->addr.sin_port == ns_addr->sin_port &&
+	    ns->addr.sin_family == ns_addr->sin_family)
+	{
+	    if (q_id == ns->q_id) {
+		/* Calculate response time */
+		pj_time_val rt = now;
+		PJ_TIME_VAL_SUB(rt, ns->sent_time);
+		ns->rt_delay = rt;
+		ns->q_id = 0;
+	    }
+	    set_nameserver_state(resolver, i, 
+				 (is_good ? STATE_ACTIVE : STATE_BAD), &now);
+	    break;
+	}
+    }
+}
+
+
+/* Update response cache */
+static void update_res_cache(pj_dns_resolver *resolver,
+			     const struct res_key *key,
+			     pj_status_t status,
+			     pj_bool_t set_expiry,
+			     const pj_dns_parsed_packet *pkt)
+{
+    struct cached_res *cache;
+    pj_pool_t *res_pool;
+    pj_uint32_t hval=0, ttl;
+    PJ_USE_EXCEPTION;
+
+    /* If status is unsuccessful, clear the same entry from the cache */
+    if (status != PJ_SUCCESS) {
+	cache = pj_hash_get(resolver->hrescache, key, sizeof(*key), &hval);
+	if (cache)
+	    pj_list_push_back(&resolver->res_free_nodes, cache);
+	pj_hash_set(NULL, resolver->hrescache, key, sizeof(*key), hval, NULL);
+    }
+
+
+    /* Calculate expiration time. */
+    if (set_expiry) {
+	if (pkt->hdr.anscount == 0 || status != PJ_SUCCESS) {
+	    /* If we don't have answers for the name, then give a different
+	     * ttl value (note: PJ_DNS_RESOLVER_INVALID_TTL may be zero, 
+	     * which means that invalid names won't be kept in the cache)
+	     */
+	    ttl = PJ_DNS_RESOLVER_INVALID_TTL;
+
+	} else {
+	    /* Otherwise get the minimum TTL from the answers */
+	    unsigned i;
+	    ttl = 0xFFFFFFFF;
+	    for (i=0; i<pkt->hdr.anscount; ++i) {
+		if (pkt->ans[i].ttl < ttl)
+		    ttl = pkt->ans[i].ttl;
+	    }
+	}
+    } else {
+	ttl = 0xFFFFFFFF;
+    }
+
+    /* Apply maximum TTL */
+    if (ttl > resolver->settings.cache_max_ttl)
+	ttl = resolver->settings.cache_max_ttl;
+
+    /* If TTL is zero, clear the same entry in the hash table */
+    if (ttl == 0) {
+	cache = pj_hash_get(resolver->hrescache, key, sizeof(*key), &hval);
+	if (cache)
+	    pj_list_push_back(&resolver->res_free_nodes, cache);
+	pj_hash_set(NULL, resolver->hrescache, key, sizeof(*key), hval, NULL);
+	return;
+    }
+
+    /* Get a cache response entry */
+    cache = pj_hash_get(resolver->hrescache, key, sizeof(*key), &hval);
+    if (cache == NULL) {
+	if (!pj_list_empty(&resolver->res_free_nodes)) {
+	    cache = resolver->res_free_nodes.next;
+	    pj_list_erase(cache);
+	} else {
+	    cache = pj_pool_zalloc(resolver->pool, sizeof(*cache));
+	}
+    }
+
+    /* Duplicate the packet.
+     * We don't need to keep the query, NS, and AR sections from the packet,
+     * so exclude from duplication.
+     */
+    res_pool = pj_pool_create_on_buf("respool", cache->buf, sizeof(cache->buf));
+    PJ_TRY {
+	cache->pkt = NULL;
+	pj_dns_packet_dup(res_pool, pkt, 
+			  PJ_DNS_NO_QD | PJ_DNS_NO_NS | PJ_DNS_NO_AR,
+			  &cache->pkt);
+    }
+    PJ_CATCH_ANY {
+	PJ_LOG(1,(THIS_FILE, 
+		  "Not enough memory to duplicate DNS response. Response was "
+		  "truncated."));
+    }
+    PJ_END;
+
+    /* Calculate expiration time */
+    if (set_expiry) {
+	pj_gettimeofday(&cache->expiry_time);
+	cache->expiry_time.sec += ttl;
+    } else {
+	cache->expiry_time.sec = 0x7FFFFFFFL;
+	cache->expiry_time.msec = 0;
+    }
+
+    /* Copy key to the cached response */
+    pj_memcpy(&cache->key, key, sizeof(*key));
+
+    /* Update the hash table */
+    pj_hash_set_np(resolver->hrescache, &cache->key, sizeof(*key), hval,
+		   cache->hbuf, cache);
+}
+
+
+/* Callback to be called when query has timed out */
+static void on_timeout( pj_timer_heap_t *timer_heap,
+			struct pj_timer_entry *entry)
+{
+    pj_dns_resolver *resolver;
+    pj_dns_async_query *q, *cq;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(timer_heap);
+
+    q = entry->user_data;
+    resolver = q->resolver;
+
+    pj_mutex_lock(resolver->mutex);
+
+    /* Recheck that this query is still pending, since there is a slight
+     * possibility of race condition (timer elapsed while at the same time
+     * response arrives)
+     */
+    if (pj_hash_get(resolver->hquerybyid, &q->id, sizeof(q->id), NULL)==NULL) {
+	/* Yeah, this query is done. */
+	pj_mutex_unlock(resolver->mutex);
+	return;
+    }
+
+    /* Invalidate id. */
+    q->timer_entry.id = 0;
+
+    /* Check to see if we should retransmit instead of time out */
+    if (q->transmit_cnt < PJ_DNS_RESOLVER_QUERY_RETRANSMIT_COUNT) {
+	status = transmit_query(resolver, q);
+	if (status == PJ_SUCCESS) {
+	    pj_mutex_unlock(resolver->mutex);
+	    return;
+	} else {
+	    /* Error occurs */
+	    char errmsg[PJ_ERR_MSG_SIZE];
+
+	    pj_strerror(status, errmsg, sizeof(errmsg));
+	    PJ_LOG(4,(resolver->name.ptr,
+		      "Error transmitting request: %s", errmsg));
+
+	    /* Let it fallback to timeout section below */
+	}
+    }
+
+    /* Clear hash table entries */
+    pj_hash_set(NULL, resolver->hquerybyid, &q->id, sizeof(q->id), 0, NULL);
+    pj_hash_set(NULL, resolver->hquerybyres, &q->key, sizeof(q->key), 0, NULL);
+
+    /* Call application callback, if any. */
+    if (q->cb)
+	(*q->cb)(q->user_data, PJ_ETIMEDOUT, NULL);
+
+    /* Call application callback for child queries. */
+    cq = q->child_head.next;
+    while (cq != (void*)&q->child_head) {
+	if (cq->cb)
+	    (*cq->cb)(cq->user_data, PJ_ETIMEDOUT, NULL);
+	cq = cq->next;
+    }
+
+    /* Clear data */
+    q->timer_entry.id = 0;
+    q->user_data = NULL;
+
+    /* Put child entries into recycle list */
+    cq = q->child_head.next;
+    while (cq != (void*)&q->child_head) {
+	pj_dns_async_query *next = cq->next;
+	pj_list_push_back(&resolver->query_free_nodes, cq);
+	cq = next;
+    }
+
+    /* Put query entry into recycle list */
+    pj_list_push_back(&resolver->query_free_nodes, q);
+
+    pj_mutex_unlock(resolver->mutex);
+}
+
+
+/* Callback from ioqueue when packet is received */
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read)
+{
+    pj_dns_resolver *resolver;
+    pj_pool_t *pool;
+    pj_dns_parsed_packet *dns_pkt;
+    pj_dns_async_query *q;
+    pj_status_t status;
+    PJ_USE_EXCEPTION;
+
+
+    resolver = pj_ioqueue_get_user_data(key);
+    pj_mutex_lock(resolver->mutex);
+
+
+    /* Check for errors */
+    if (bytes_read < 0) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+
+	status = -bytes_read;
+	pj_strerror(status, errmsg, sizeof(errmsg));
+	PJ_LOG(4,(resolver->name.ptr, 
+		  "DNS resolver read error from %s:%d: %s", 
+		  pj_inet_ntoa(resolver->udp_src_addr.sin_addr),
+		  pj_ntohs(resolver->udp_src_addr.sin_port),
+		  errmsg));
+
+	goto read_next_packet;
+    }
+
+    PJ_LOG(5,(resolver->name.ptr, 
+	      "Received %d bytes DNS response from %s:%d",
+	      (int)bytes_read, 
+	      pj_inet_ntoa(resolver->udp_src_addr.sin_addr),
+	      pj_ntohs(resolver->udp_src_addr.sin_port)));
+
+
+    /* Check for zero packet */
+    if (bytes_read == 0)
+	goto read_next_packet;
+
+    /* Create temporary pool from a fixed buffer */
+    pool = pj_pool_create_on_buf("restmp", resolver->tmp_pool, 
+				 sizeof(resolver->tmp_pool));
+
+    /* Parse DNS response */
+    status = -1;
+    dns_pkt = NULL;
+    PJ_TRY {
+	status = pj_dns_parse_packet(pool, resolver->udp_rx_pkt, 
+				     (unsigned)bytes_read, &dns_pkt);
+    }
+    PJ_CATCH_ANY {
+	status = PJ_ENOMEM;
+    }
+    PJ_END;
+
+    /* Update nameserver status */
+    report_nameserver_status(resolver, &resolver->udp_src_addr, dns_pkt);
+
+    /* Handle parse error */
+    if (status != PJ_SUCCESS) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+
+	pj_strerror(status, errmsg, sizeof(errmsg));
+	PJ_LOG(3,(resolver->name.ptr, 
+		  "Error parsing DNS response from %s:%d: %s", 
+		  pj_inet_ntoa(resolver->udp_src_addr.sin_addr), 
+		  pj_ntohs(resolver->udp_src_addr.sin_port), 
+		  errmsg));
+	goto read_next_packet;
+    }
+
+    /* Find the query based on the transaction ID */
+    q = pj_hash_get(resolver->hquerybyid, &dns_pkt->hdr.id, 
+		    sizeof(dns_pkt->hdr.id), NULL);
+    if (!q) {
+	PJ_LOG(5,(resolver->name.ptr, 
+		  "Unable to find query for DNS response id=%d from %s:%d "
+		  "(the query may had been answered by other name servers)",
+		  (unsigned)dns_pkt->hdr.id,
+		  pj_inet_ntoa(resolver->udp_src_addr.sin_addr), 
+		  pj_ntohs(resolver->udp_src_addr.sin_port)));
+	goto read_next_packet;
+    }
+
+    /* Map DNS Rcode in the response into PJLIB status name space */
+    status = PJ_STATUS_FROM_DNS_RCODE(PJ_DNS_GET_RCODE(dns_pkt->hdr.flags));
+
+    /* Cancel query timeout timer. */
+    pj_assert(q->timer_entry.id != 0);
+    pj_timer_heap_cancel(resolver->timer, &q->timer_entry);
+    q->timer_entry.id = 0;
+
+    /* Clear hash table entries */
+    pj_hash_set(NULL, resolver->hquerybyid, &q->id, sizeof(q->id), 0, NULL);
+    pj_hash_set(NULL, resolver->hquerybyres, &q->key, sizeof(q->key), 0, NULL);
+
+    /* Notify applications first, to allow application to modify the 
+     * record before it is saved to the hash table.
+     */
+    if (q->cb)
+	(*q->cb)(q->user_data, status, dns_pkt);
+
+    /* If query has subqueries, notify subqueries's application callback */
+    if (!pj_list_empty(&q->child_head)) {
+	pj_dns_async_query *child_q;
+
+	child_q = q->child_head.next;
+	while (child_q != (pj_dns_async_query*)&q->child_head) {
+	    if (child_q->cb)
+		(*child_q->cb)(child_q->user_data, status, dns_pkt);
+	    child_q = child_q->next;
+	}
+    }
+
+    /* Save/update response cache. */
+    update_res_cache(resolver, &q->key, status, PJ_TRUE, dns_pkt);
+    
+    /* Recycle query objects, starting with the child queries */
+    if (!pj_list_empty(&q->child_head)) {
+	pj_dns_async_query *child_q;
+
+	child_q = q->child_head.next;
+	while (child_q != (pj_dns_async_query*)&q->child_head) {
+	    pj_dns_async_query *next = child_q->next;
+	    pj_list_erase(child_q);
+	    pj_list_push_back(&resolver->query_free_nodes, child_q);
+	    child_q = next;
+	}
+    }
+    pj_list_push_back(&resolver->query_free_nodes, q);
+
+read_next_packet:
+    bytes_read = sizeof(resolver->udp_rx_pkt);
+    resolver->udp_addr_len = sizeof(resolver->udp_src_addr);
+    status = pj_ioqueue_recvfrom(resolver->udp_key, op_key, 
+				 resolver->udp_rx_pkt,
+				 &bytes_read, PJ_IOQUEUE_ALWAYS_ASYNC,
+				 &resolver->udp_src_addr, 
+				 &resolver->udp_addr_len);
+    if (status != PJ_EPENDING) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+
+	pj_strerror(status, errmsg, sizeof(errmsg));	
+	PJ_LOG(4,(resolver->name.ptr, "DNS resolver ioqueue read error: %s",
+		  errmsg));
+
+	pj_assert(!"Unhandled error");
+    }
+
+    pj_mutex_unlock(resolver->mutex);
+}
+
+
+/*
+ * Put the specified DNS packet into DNS cache. This function is mainly used
+ * for testing the resolver, however it can also be used to inject entries
+ * into the resolver.
+ */
+PJ_DEF(pj_status_t) pj_dns_resolver_add_entry( pj_dns_resolver *resolver,
+					       const pj_dns_parsed_packet *pkt,
+					       pj_bool_t set_ttl)
+{
+    struct res_key key;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(resolver && pkt, PJ_EINVAL);
+
+    /* Packet must be a DNS response */
+    PJ_ASSERT_RETURN(PJ_DNS_GET_QR(pkt->hdr.flags) & 1, PJ_EINVAL);
+
+    /* Make sure there are answers in the packet */
+    PJ_ASSERT_RETURN((pkt->hdr.anscount && pkt->ans) ||
+		      (pkt->hdr.qdcount && pkt->q),
+		     PJLIB_UTIL_EDNSNOANSWERREC);
+
+    pj_mutex_lock(resolver->mutex);
+
+    /* Build resource key for looking up hash tables */
+    pj_bzero(&key, sizeof(struct res_key));
+    if (pkt->hdr.anscount) {
+	/* Make sure name is not too long. */
+	PJ_ASSERT_RETURN(pkt->ans[0].name.slen < PJ_MAX_HOSTNAME, 
+			 PJ_ENAMETOOLONG);
+
+	init_res_key(&key, pkt->ans[0].type, &pkt->ans[0].name);
+
+    } else {
+	/* Make sure name is not too long. */
+	PJ_ASSERT_RETURN(pkt->q[0].name.slen < PJ_MAX_HOSTNAME, 
+			 PJ_ENAMETOOLONG);
+
+	init_res_key(&key, pkt->q[0].type, &pkt->q[0].name);
+    }
+
+    /* Insert entry. */
+    update_res_cache(resolver, &key, PJ_SUCCESS, set_ttl, pkt);
+
+    pj_mutex_unlock(resolver->mutex);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get the total number of response in the response cache.
+ */
+PJ_DEF(unsigned) pj_dns_resolver_get_cached_count(pj_dns_resolver *resolver)
+{
+    unsigned count;
+
+    PJ_ASSERT_RETURN(resolver, 0);
+
+    pj_mutex_lock(resolver->mutex);
+    count = pj_hash_count(resolver->hrescache);
+    pj_mutex_unlock(resolver->mutex);
+
+    return count;
+}
+
+
+/*
+ * Dump resolver state to the log.
+ */
+PJ_DEF(void) pj_dns_resolver_dump(pj_dns_resolver *resolver,
+				  pj_bool_t detail)
+{
+#if PJ_LOG_MAX_LEVEL >= 3
+    unsigned i;
+    pj_time_val now;
+
+    pj_mutex_lock(resolver->mutex);
+
+    pj_gettimeofday(&now);
+
+    PJ_LOG(3,(resolver->name.ptr, " Dumping resolver state:"));
+
+    PJ_LOG(3,(resolver->name.ptr, "  Name servers:"));
+    for (i=0; i<resolver->ns_count; ++i) {
+	const char *state_names[] = { "probing", "active", "bad"};
+	struct nameserver *ns = &resolver->ns[i];
+
+	PJ_LOG(3,(resolver->name.ptr,
+		  "   NS %d: %s:%d (state=%s until %ds, rtt=%d ms)",
+		  i, pj_inet_ntoa(ns->addr.sin_addr),
+		  pj_ntohs(ns->addr.sin_port),
+		  state_names[ns->state],
+		  ns->state_expiry.sec - now.sec,
+		  PJ_TIME_VAL_MSEC(ns->rt_delay)));
+    }
+
+    PJ_LOG(3,(resolver->name.ptr, "  Nb. of cached responses: %u",
+	      pj_hash_count(resolver->hrescache)));
+    if (detail) {
+	pj_hash_iterator_t itbuf, *it;
+	it = pj_hash_first(resolver->hrescache, &itbuf);
+	while (it) {
+	    struct cached_res *cache = pj_hash_this(resolver->hrescache, it);
+	    PJ_LOG(3,(resolver->name.ptr, 
+		      "   Type %s: %s",
+		      pj_dns_get_type_name(cache->key.qtype), 
+		      cache->key.name));
+	    it = pj_hash_next(resolver->hrescache, it);
+	}
+    }
+    PJ_LOG(3,(resolver->name.ptr, "  Nb. of cached response free nodes: %u",
+	      pj_list_size(&resolver->res_free_nodes)));
+    PJ_LOG(3,(resolver->name.ptr, "  Nb. of pending queries: %u (%u)",
+	      pj_hash_count(resolver->hquerybyid),
+	      pj_hash_count(resolver->hquerybyres)));
+    if (detail) {
+	pj_hash_iterator_t itbuf, *it;
+	it = pj_hash_first(resolver->hquerybyid, &itbuf);
+	while (it) {
+	    struct pj_dns_async_query *q;
+	    q = pj_hash_this(resolver->hquerybyid, it);
+	    PJ_LOG(3,(resolver->name.ptr, 
+		      "   Type %s: %s",
+		      pj_dns_get_type_name(q->key.qtype), 
+		      q->key.name));
+	    it = pj_hash_next(resolver->hquerybyid, it);
+	}
+    }
+    PJ_LOG(3,(resolver->name.ptr, "  Nb. of pending query free nodes: %u",
+	      pj_list_size(&resolver->query_free_nodes)));
+    PJ_LOG(3,(resolver->name.ptr, "  Nb. of timer entries: %u",
+	      pj_timer_heap_count(resolver->timer)));
+    PJ_LOG(3,(resolver->name.ptr, "  Pool capacity: %d, used size: %d",
+	      pj_pool_get_capacity(resolver->pool),
+	      pj_pool_get_used_size(resolver->pool)));
+
+    pj_mutex_unlock(resolver->mutex);
+#endif
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/scanner.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/scanner.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/scanner.c	(revision 1163)
@@ -0,0 +1,633 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjlib-util/scanner.h>
+#include <pj/ctype.h>
+#include <pj/string.h>
+#include <pj/except.h>
+#include <pj/os.h>
+#include <pj/errno.h>
+#include <pj/assert.h>
+
+#define PJ_SCAN_IS_SPACE(c)		((c)==' ' || (c)=='\t')
+#define PJ_SCAN_IS_NEWLINE(c)		((c)=='\r' || (c)=='\n')
+#define PJ_SCAN_IS_PROBABLY_SPACE(c)	((c) <= 32)
+#define PJ_SCAN_CHECK_EOF(s)		(*s)
+
+
+#if defined(PJ_SCANNER_USE_BITWISE) && PJ_SCANNER_USE_BITWISE != 0
+#  include "scanner_cis_bitwise.c"
+#else
+#  include "scanner_cis_uint.c"
+#endif
+
+
+static void pj_scan_syntax_err(pj_scanner *scanner)
+{
+    (*scanner->callback)(scanner);
+}
+
+
+PJ_DEF(void) pj_cis_add_range(pj_cis_t *cis, int cstart, int cend)
+{
+    /* Can not set zero. This is the requirement of the parser. */
+    pj_assert(cstart > 0);
+
+    while (cstart != cend) {
+        PJ_CIS_SET(cis, cstart);
+	++cstart;
+    }
+}
+
+PJ_DEF(void) pj_cis_add_alpha(pj_cis_t *cis)
+{
+    pj_cis_add_range( cis, 'a', 'z'+1);
+    pj_cis_add_range( cis, 'A', 'Z'+1);
+}
+
+PJ_DEF(void) pj_cis_add_num(pj_cis_t *cis)
+{
+    pj_cis_add_range( cis, '0', '9'+1);
+}
+
+PJ_DEF(void) pj_cis_add_str( pj_cis_t *cis, const char *str)
+{
+    while (*str) {
+        PJ_CIS_SET(cis, *str);
+	++str;
+    }
+}
+
+PJ_DEF(void) pj_cis_add_cis( pj_cis_t *cis, const pj_cis_t *rhs)
+{
+    int i;
+    for (i=0; i<256; ++i) {
+	if (PJ_CIS_ISSET(rhs, i))
+	    PJ_CIS_SET(cis, i);
+    }
+}
+
+PJ_DEF(void) pj_cis_del_range( pj_cis_t *cis, int cstart, int cend)
+{
+    while (cstart != cend) {
+        PJ_CIS_CLR(cis, cstart);
+        cstart++;
+    }
+}
+
+PJ_DEF(void) pj_cis_del_str( pj_cis_t *cis, const char *str)
+{
+    while (*str) {
+        PJ_CIS_CLR(cis, *str);
+	++str;
+    }
+}
+
+PJ_DEF(void) pj_cis_invert( pj_cis_t *cis )
+{
+    unsigned i;
+    /* Can not set zero. This is the requirement of the parser. */
+    for (i=1; i<256; ++i) {
+	if (PJ_CIS_ISSET(cis,i))
+            PJ_CIS_CLR(cis,i);
+        else
+            PJ_CIS_SET(cis,i);
+    }
+}
+
+PJ_DEF(void) pj_scan_init( pj_scanner *scanner, char *bufstart, int buflen, 
+			   unsigned options, pj_syn_err_func_ptr callback )
+{
+    PJ_CHECK_STACK();
+
+    scanner->begin = scanner->curptr = bufstart;
+    scanner->end = bufstart + buflen;
+    scanner->line = 1;
+    scanner->start_line = scanner->begin;
+    scanner->callback = callback;
+    scanner->skip_ws = options;
+
+    if (scanner->skip_ws) 
+	pj_scan_skip_whitespace(scanner);
+}
+
+
+PJ_DEF(void) pj_scan_fini( pj_scanner *scanner )
+{
+    PJ_CHECK_STACK();
+    PJ_UNUSED_ARG(scanner);
+}
+
+PJ_DEF(void) pj_scan_skip_whitespace( pj_scanner *scanner )
+{
+    register char *s = scanner->curptr;
+
+    while (PJ_SCAN_IS_SPACE(*s)) {
+	++s;
+    }
+
+    if (PJ_SCAN_IS_NEWLINE(*s) && (scanner->skip_ws & PJ_SCAN_AUTOSKIP_NEWLINE)) {
+	for (;;) {
+	    if (*s == '\r') {
+		++s;
+		if (*s == '\n') ++s;
+		++scanner->line;
+		scanner->curptr = scanner->start_line = s;
+	    } else if (*s == '\n') {
+		++s;
+		++scanner->line;
+		scanner->curptr = scanner->start_line = s;
+	    } else if (PJ_SCAN_IS_SPACE(*s)) {
+		do {
+		    ++s;
+		} while (PJ_SCAN_IS_SPACE(*s));
+	    } else {
+		break;
+	    }
+	}
+    }
+
+    if (PJ_SCAN_IS_NEWLINE(*s) && (scanner->skip_ws & PJ_SCAN_AUTOSKIP_WS_HEADER)==PJ_SCAN_AUTOSKIP_WS_HEADER) {
+	/* Check for header continuation. */
+	scanner->curptr = s;
+
+	if (*s == '\r') {
+	    ++s;
+	}
+	if (*s == '\n') {
+	    ++s;
+	}
+	scanner->start_line = s;
+
+	if (PJ_SCAN_IS_SPACE(*s)) {
+	    register char *t = s;
+	    do {
+		++t;
+	    } while (PJ_SCAN_IS_SPACE(*t));
+
+	    ++scanner->line;
+	    scanner->curptr = t;
+	}
+    } else {
+	scanner->curptr = s;
+    }
+}
+
+PJ_DEF(void) pj_scan_skip_line( pj_scanner *scanner )
+{
+    char *s = pj_ansi_strchr(scanner->curptr, '\n');
+    if (!s) {
+	scanner->curptr = scanner->end;
+    } else {
+	scanner->curptr = scanner->start_line = s+1;
+	scanner->line++;
+   }
+}
+
+PJ_DEF(int) pj_scan_peek( pj_scanner *scanner,
+			  const pj_cis_t *spec, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+
+    if (s >= scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return -1;
+    }
+
+    /* Don't need to check EOF with PJ_SCAN_CHECK_EOF(s) */
+    while (pj_cis_match(spec, *s))
+	++s;
+
+    pj_strset3(out, scanner->curptr, s);
+    return *s;
+}
+
+
+PJ_DEF(int) pj_scan_peek_n( pj_scanner *scanner,
+			     pj_size_t len, pj_str_t *out)
+{
+    char *endpos = scanner->curptr + len;
+
+    if (endpos > scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return -1;
+    }
+
+    pj_strset(out, scanner->curptr, len);
+    return *endpos;
+}
+
+
+PJ_DEF(int) pj_scan_peek_until( pj_scanner *scanner,
+				const pj_cis_t *spec, 
+				pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+
+    if (s >= scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return -1;
+    }
+
+    while (PJ_SCAN_CHECK_EOF(s) && !pj_cis_match( spec, *s))
+	++s;
+
+    pj_strset3(out, scanner->curptr, s);
+    return *s;
+}
+
+
+PJ_DEF(void) pj_scan_get( pj_scanner *scanner,
+			  const pj_cis_t *spec, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+
+    pj_assert(pj_cis_match(spec,0)==0);
+
+    /* EOF is detected implicitly */
+    if (!pj_cis_match(spec, *s)) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    do {
+	++s;
+    } while (pj_cis_match(spec, *s));
+    /* No need to check EOF here (PJ_SCAN_CHECK_EOF(s)) because
+     * buffer is NULL terminated and pj_cis_match(spec,0) should be
+     * false.
+     */
+
+    pj_strset3(out, scanner->curptr, s);
+
+    scanner->curptr = s;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);    
+    }
+}
+
+
+PJ_DEF(void) pj_scan_get_unescape( pj_scanner *scanner,
+				   const pj_cis_t *spec, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+    char *dst = s;
+
+    pj_assert(pj_cis_match(spec,0)==0);
+
+    /* Must not match character '%' */
+    pj_assert(pj_cis_match(spec,'%')==0);
+
+    /* EOF is detected implicitly */
+    if (!pj_cis_match(spec, *s) && *s != '%') {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    out->ptr = s;
+    do {
+	if (*s == '%') {
+	    if (s+3 <= scanner->end && pj_isxdigit(*(s+1)) && 
+		pj_isxdigit(*(s+2))) 
+	    {
+		*dst = (pj_uint8_t) ((pj_hex_digit_to_val(*(s+1)) << 4) +
+				      pj_hex_digit_to_val(*(s+2)));
+		++dst;
+		s += 3;
+	    } else {
+		*dst++ = *s++;
+		*dst++ = *s++;
+		break;
+	    }
+	}
+	
+	if (pj_cis_match(spec, *s)) {
+	    char *start = s;
+	    do {
+		++s;
+	    } while (pj_cis_match(spec, *s));
+
+	    if (dst != start) pj_memmove(dst, start, s-start);
+	    dst += (s-start);
+	} 
+	
+    } while (*s == '%');
+
+    scanner->curptr = s;
+    out->slen = (dst - out->ptr);
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);    
+    }
+}
+
+
+PJ_DEF(void) pj_scan_get_quote( pj_scanner *scanner,
+				int begin_quote, int end_quote, 
+				pj_str_t *out)
+{
+    pj_scan_get_quotes(scanner, (char*)&begin_quote, (char*)&end_quote, 1, out);
+}
+
+PJ_DEF(void) pj_scan_get_quotes(pj_scanner *scanner,
+                                const char *begin_quote, const char *end_quote,
+                                int qsize, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+    int qpair = -1;
+    int i;
+
+    pj_assert(qsize > 0);
+
+    /* Check and eat the begin_quote. */
+    for (i = 0; i < qsize; ++i) {
+	if (*s == begin_quote[i]) {
+	    qpair = i;
+	    break;
+	}
+    }
+    if (qpair == -1) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+    ++s;
+
+    /* Loop until end_quote is found. 
+     */
+    do {
+	/* loop until end_quote is found. */
+	while (*s && *s != '\n' && *s != end_quote[qpair]) {
+	    ++s;
+	}
+
+	/* check that no backslash character precedes the end_quote. */
+	if (*s == end_quote[qpair]) {
+	    if (*(s-1) == '\\') {
+		if (s-2 == scanner->begin) {
+		    break;
+		} else {
+		    char *q = s-2;
+		    char *r = s-2;
+
+		    while (r != scanner->begin && *r == '\\') {
+			--r;
+		    }
+		    /* break from main loop if we have odd number of backslashes */
+		    if (((unsigned)(q-r) & 0x01) == 1) {
+			++s;
+			break;
+		    }
+		    ++s;
+		}
+	    } else {
+		/* end_quote is not preceeded by backslash. break now. */
+		break;
+	    }
+	} else {
+	    /* loop ended by non-end_quote character. break now. */
+	    break;
+	}
+    } while (1);
+
+    /* Check and eat the end quote. */
+    if (*s != end_quote[qpair]) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+    ++s;
+
+    pj_strset3(out, scanner->curptr, s);
+
+    scanner->curptr = s;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);
+    }
+}
+
+
+PJ_DEF(void) pj_scan_get_n( pj_scanner *scanner,
+			    unsigned N, pj_str_t *out)
+{
+    if (scanner->curptr + N > scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    pj_strset(out, scanner->curptr, N);
+    
+    scanner->curptr += N;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);
+    }
+}
+
+
+PJ_DEF(int) pj_scan_get_char( pj_scanner *scanner )
+{
+    int chr = *scanner->curptr;
+
+    if (!chr) {
+	pj_scan_syntax_err(scanner);
+	return 0;
+    }
+
+    ++scanner->curptr;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);
+    }
+    return chr;
+}
+
+
+PJ_DEF(void) pj_scan_get_newline( pj_scanner *scanner )
+{
+    if (!PJ_SCAN_IS_NEWLINE(*scanner->curptr)) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    if (*scanner->curptr == '\r') {
+	++scanner->curptr;
+    }
+    if (*scanner->curptr == '\n') {
+	++scanner->curptr;
+    }
+
+    ++scanner->line;
+    scanner->start_line = scanner->curptr;
+
+    /**
+     * This probably is a bug, see PROTOS test #2480.
+     * This would cause scanner to incorrectly eat two new lines, e.g.
+     * when parsing:
+     *   
+     *	Content-Length: 120\r\n
+     *	\r\n
+     *	<space><space><space>...
+     *
+     * When pj_scan_get_newline() is called to parse the first newline
+     * in the Content-Length header, it will eat the second newline
+     * too because it thinks that it's a header continuation.
+     *
+     * if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && scanner->skip_ws) {
+     *    pj_scan_skip_whitespace(scanner);
+     * }
+     */
+}
+
+
+PJ_DEF(void) pj_scan_get_until( pj_scanner *scanner,
+				const pj_cis_t *spec, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+
+    if (s >= scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    while (PJ_SCAN_CHECK_EOF(s) && !pj_cis_match(spec, *s)) {
+	++s;
+    }
+
+    pj_strset3(out, scanner->curptr, s);
+
+    scanner->curptr = s;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);
+    }
+}
+
+
+PJ_DEF(void) pj_scan_get_until_ch( pj_scanner *scanner, 
+				   int until_char, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+
+    if (s >= scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    while (PJ_SCAN_CHECK_EOF(s) && *s != until_char) {
+	++s;
+    }
+
+    pj_strset3(out, scanner->curptr, s);
+
+    scanner->curptr = s;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);
+    }
+}
+
+
+PJ_DEF(void) pj_scan_get_until_chr( pj_scanner *scanner,
+				     const char *until_spec, pj_str_t *out)
+{
+    register char *s = scanner->curptr;
+    int speclen;
+
+    if (s >= scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    speclen = strlen(until_spec);
+    while (PJ_SCAN_CHECK_EOF(s) && !memchr(until_spec, *s, speclen)) {
+	++s;
+    }
+
+    pj_strset3(out, scanner->curptr, s);
+
+    scanner->curptr = s;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*s) && scanner->skip_ws) {
+	pj_scan_skip_whitespace(scanner);
+    }
+}
+
+PJ_DEF(void) pj_scan_advance_n( pj_scanner *scanner,
+				 unsigned N, pj_bool_t skip_ws)
+{
+    if (scanner->curptr + N > scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return;
+    }
+
+    scanner->curptr += N;
+
+    if (PJ_SCAN_IS_PROBABLY_SPACE(*scanner->curptr) && skip_ws) {
+	pj_scan_skip_whitespace(scanner);
+    }
+}
+
+
+PJ_DEF(int) pj_scan_strcmp( pj_scanner *scanner, const char *s, int len)
+{
+    if (scanner->curptr + len > scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return -1;
+    }
+    return strncmp(scanner->curptr, s, len);
+}
+
+
+PJ_DEF(int) pj_scan_stricmp( pj_scanner *scanner, const char *s, int len)
+{
+    if (scanner->curptr + len > scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return -1;
+    }
+    return pj_ansi_strnicmp(scanner->curptr, s, len);
+}
+
+PJ_DEF(int) pj_scan_stricmp_alnum( pj_scanner *scanner, const char *s, 
+				   int len)
+{
+    if (scanner->curptr + len > scanner->end) {
+	pj_scan_syntax_err(scanner);
+	return -1;
+    }
+    return strnicmp_alnum(scanner->curptr, s, len);
+}
+
+PJ_DEF(void) pj_scan_save_state( const pj_scanner *scanner, 
+				 pj_scan_state *state)
+{
+    state->curptr = scanner->curptr;
+    state->line = scanner->line;
+    state->start_line = scanner->start_line;
+}
+
+
+PJ_DEF(void) pj_scan_restore_state( pj_scanner *scanner, 
+				    pj_scan_state *state)
+{
+    scanner->curptr = state->curptr;
+    scanner->line = state->line;
+    scanner->start_line = state->start_line;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/scanner_cis_bitwise.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/scanner_cis_bitwise.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/scanner_cis_bitwise.c	(revision 1163)
@@ -0,0 +1,68 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/*
+ * THIS FILE IS INCLUDED BY scanner.c.
+ * DO NOT COMPILE THIS FILE ALONE!
+ */
+
+PJ_DEF(void) pj_cis_buf_init( pj_cis_buf_t *cis_buf)
+{
+    pj_bzero(cis_buf->cis_buf, sizeof(cis_buf->cis_buf));
+    cis_buf->use_mask = 0;
+}
+
+PJ_DEF(pj_status_t) pj_cis_init(pj_cis_buf_t *cis_buf, pj_cis_t *cis)
+{
+    unsigned i;
+
+    cis->cis_buf = cis_buf->cis_buf;
+
+    for (i=0; i<PJ_CIS_MAX_INDEX; ++i) {
+        if ((cis_buf->use_mask & (1 << i)) == 0) {
+            cis->cis_id = i;
+	    cis_buf->use_mask |= (1 << i);
+            return PJ_SUCCESS;
+        }
+    }
+
+    cis->cis_id = PJ_CIS_MAX_INDEX;
+    return PJ_ETOOMANY;
+}
+
+PJ_DEF(pj_status_t) pj_cis_dup( pj_cis_t *new_cis, pj_cis_t *existing)
+{
+    pj_status_t status;
+    unsigned i;
+
+    /* Warning: typecasting here! */
+    status = pj_cis_init((pj_cis_buf_t*)existing->cis_buf, new_cis);
+    if (status != PJ_SUCCESS)
+        return status;
+
+    for (i=0; i<256; ++i) {
+        if (PJ_CIS_ISSET(existing, i))
+            PJ_CIS_SET(new_cis, i);
+        else
+            PJ_CIS_CLR(new_cis, i);
+    }
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/scanner_cis_uint.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/scanner_cis_uint.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/scanner_cis_uint.c	(revision 1163)
@@ -0,0 +1,45 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/*
+ * THIS FILE IS INCLUDED BY scanner.c.
+ * DO NOT COMPILE THIS FILE ALONE!
+ */
+
+
+PJ_DEF(void) pj_cis_buf_init( pj_cis_buf_t *cis_buf)
+{
+    /* Do nothing. */
+    PJ_UNUSED_ARG(cis_buf);
+}
+
+PJ_DEF(pj_status_t) pj_cis_init(pj_cis_buf_t *cis_buf, pj_cis_t *cis)
+{
+    PJ_UNUSED_ARG(cis_buf);
+    pj_bzero(cis->cis_buf, sizeof(cis->cis_buf));
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_cis_dup( pj_cis_t *new_cis, pj_cis_t *existing)
+{
+    pj_memcpy(new_cis, existing, sizeof(pj_cis_t));
+    return PJ_SUCCESS;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/sha1.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/sha1.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/sha1.c	(revision 1163)
@@ -0,0 +1,260 @@
+/* $Id$ */
+/*
+ * Modified 2/07
+ * By Benny Prijono <benny@prijono.org>
+ * Still 100% Public Domain
+ *
+ * This is the implementation of SHA-1 encryption algorithm based on
+ * Steve Reid work. Modified to work with PJLIB.
+ */
+
+/*
+SHA-1 in C
+By Steve Reid <sreid@sea-to-sky.net>
+100% Public Domain
+
+-----------------
+Modified 7/98 
+By James H. Brown <jbrown@burgoyne.com>
+Still 100% Public Domain
+
+Corrected a problem which generated improper hash values on 16 bit machines
+Routine SHA1Update changed from
+	void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int
+len)
+to
+	void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned
+long len)
+
+The 'len' parameter was declared an int which works fine on 32 bit machines.
+However, on 16 bit machines an int is too small for the shifts being done
+against
+it.  This caused the hash function to generate incorrect values if len was
+greater than 8191 (8K - 1) due to the 'len << 3' on line 3 of SHA1Update().
+
+Since the file IO in main() reads 16K at a time, any file 8K or larger would
+be guaranteed to generate the wrong hash (e.g. Test Vector #3, a million
+"a"s).
+
+I also changed the declaration of variables i & j in SHA1Update to 
+unsigned long from unsigned int for the same reason.
+
+These changes should make no difference to any 32 bit implementations since
+an
+int and a long are the same size in those environments.
+
+--
+I also corrected a few compiler warnings generated by Borland C.
+1. Added #include <process.h> for exit() prototype
+2. Removed unused variable 'j' in SHA1Final
+3. Changed exit(0) to return(0) at end of main.
+
+ALL changes I made can be located by searching for comments containing 'JHB'
+-----------------
+Modified 8/98
+By Steve Reid <sreid@sea-to-sky.net>
+Still 100% public domain
+
+1- Removed #include <process.h> and used return() instead of exit()
+2- Fixed overwriting of finalcount in SHA1Final() (discovered by Chris Hall)
+3- Changed email address from steve@edmweb.com to sreid@sea-to-sky.net
+
+-----------------
+Modified 4/01
+By Saul Kravitz <Saul.Kravitz@celera.com>
+Still 100% PD
+Modified to run on Compaq Alpha hardware.  
+
+-----------------
+Modified 07/2002
+By Ralph Giles <giles@ghostscript.com>
+Still 100% public domain
+modified for use with stdint types, autoconf
+code cleanup, removed attribution comments
+switched SHA1Final() argument order for consistency
+use SHA1_ prefix for public api
+move public api to sha1.h
+*/
+
+/*
+Test Vectors (from FIPS PUB 180-1)
+"abc"
+  A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
+"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
+  84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
+A million repetitions of "a"
+  34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
+*/
+
+/* #define SHA1HANDSOFF  */
+/* blp:
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <string.h>
+
+#include "os_types.h"
+
+#include "sha1.h"
+*/
+#include <pjlib-util/sha1.h>
+#include <pj/string.h>
+
+#undef SHA1HANDSOFF
+
+
+static void SHA1_Transform(pj_uint32_t state[5], const pj_uint8_t buffer[64]);
+
+#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
+
+/* blk0() and blk() perform the initial expand. */
+/* I got the idea of expanding during the round function from SSLeay */
+/* FIXME: can we do this in an endian-proof way? */
+/* #ifdef WORDS_BIGENDIAN */
+#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN != 0
+#define blk0(i) block->l[i]
+#else
+#define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
+    |(rol(block->l[i],8)&0x00FF00FF))
+#endif
+#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
+    ^block->l[(i+2)&15]^block->l[i&15],1))
+
+/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */
+#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30);
+#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);
+#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
+#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
+#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);
+
+
+/* Hash a single 512-bit block. This is the core of the algorithm. */
+static void SHA1_Transform(pj_uint32_t state[5], const pj_uint8_t buffer[64])
+{
+    pj_uint32_t a, b, c, d, e;
+    typedef union {
+        pj_uint8_t c[64];
+        pj_uint32_t l[16];
+    } CHAR64LONG16;
+    CHAR64LONG16* block;
+
+#ifdef SHA1HANDSOFF
+    static pj_uint8_t workspace[64];
+    block = (CHAR64LONG16*)workspace;
+    pj_memcpy(block, buffer, 64);
+#else
+    block = (CHAR64LONG16*)buffer;
+#endif
+
+    /* Copy context->state[] to working vars */
+    a = state[0];
+    b = state[1];
+    c = state[2];
+    d = state[3];
+    e = state[4];
+
+    /* 4 rounds of 20 operations each. Loop unrolled. */
+    R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
+    R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
+    R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
+    R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
+    R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
+    R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
+    R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
+    R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
+    R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
+    R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
+    R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
+    R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
+    R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
+    R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
+    R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
+    R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
+    R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
+    R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
+    R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
+    R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
+
+    /* Add the working vars back into context.state[] */
+    state[0] += a;
+    state[1] += b;
+    state[2] += c;
+    state[3] += d;
+    state[4] += e;
+
+    /* Wipe variables */
+    a = b = c = d = e = 0;
+}
+
+
+/* SHA1Init - Initialize new context */
+PJ_DEF(void) pj_sha1_init(pj_sha1_context* context)
+{
+    /* SHA1 initialization constants */
+    context->state[0] = 0x67452301;
+    context->state[1] = 0xEFCDAB89;
+    context->state[2] = 0x98BADCFE;
+    context->state[3] = 0x10325476;
+    context->state[4] = 0xC3D2E1F0;
+    context->count[0] = context->count[1] = 0;
+}
+
+
+/* Run your data through this. */
+PJ_DEF(void) pj_sha1_update(pj_sha1_context* context, 
+			    const pj_uint8_t* data, const pj_size_t len)
+{
+    pj_size_t i, j;
+
+    j = (context->count[0] >> 3) & 63;
+    if ((context->count[0] += len << 3) < (len << 3)) context->count[1]++;
+    context->count[1] += (len >> 29);
+    if ((j + len) > 63) {
+        pj_memcpy(&context->buffer[j], data, (i = 64-j));
+        SHA1_Transform(context->state, context->buffer);
+        for ( ; i + 63 < len; i += 64) {
+            SHA1_Transform(context->state, data + i);
+        }
+        j = 0;
+    }
+    else i = 0;
+    pj_memcpy(&context->buffer[j], &data[i], len - i);
+
+}
+
+
+/* Add padding and return the message digest. */
+PJ_DEF(void) pj_sha1_final(pj_sha1_context* context, 
+			   pj_uint8_t digest[PJ_SHA1_DIGEST_SIZE])
+{
+    pj_uint32_t i;
+    pj_uint8_t  finalcount[8];
+
+    for (i = 0; i < 8; i++) {
+        finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)]
+         >> ((3-(i & 3)) * 8) ) & 255);  /* Endian independent */
+    }
+    pj_sha1_update(context, (pj_uint8_t *)"\200", 1);
+    while ((context->count[0] & 504) != 448) {
+        pj_sha1_update(context, (pj_uint8_t *)"\0", 1);
+    }
+    pj_sha1_update(context, finalcount, 8);  /* Should cause a SHA1_Transform() */
+    for (i = 0; i < PJ_SHA1_DIGEST_SIZE; i++) {
+        digest[i] = (pj_uint8_t)
+         ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
+    }
+    
+    /* Wipe variables */
+    i = 0;
+    pj_memset(context->buffer, 0, 64);
+    pj_memset(context->state, 0, 20);
+    pj_memset(context->count, 0, 8);
+    pj_memset(finalcount, 0, 8);	/* SWR */
+
+#ifdef SHA1HANDSOFF  /* make SHA1Transform overwrite its own static vars */
+    SHA1_Transform(context->state, context->buffer);
+#endif
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/srv_resolver.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/srv_resolver.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/srv_resolver.c	(revision 1163)
@@ -0,0 +1,648 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjlib-util/srv_resolver.h>
+#include <pjlib-util/errno.h>
+#include <pj/array.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include <pj/rand.h>
+#include <pj/string.h>
+
+
+#define THIS_FILE   "srv_resolver.c"
+
+#define ADDR_MAX_COUNT	    8
+
+struct srv_target
+{
+    pj_str_t		    target_name;
+    char		    target_buf[PJ_MAX_HOSTNAME];
+    pj_str_t		    cname;
+    char		    cname_buf[PJ_MAX_HOSTNAME];
+    unsigned		    port;
+    unsigned		    priority;
+    unsigned		    weight;
+    unsigned		    sum;
+    unsigned		    addr_cnt;
+    pj_in_addr		    addr[ADDR_MAX_COUNT];
+};
+
+typedef struct pj_dns_srv_resolver_job
+{
+    char		    *objname;
+
+    pj_dns_resolver	    *resolver;	    /**< Resolver SIP instance.	    */
+    pj_dns_type		     dns_state;	    /**< DNS type being resolved.   */
+    void		    *token;
+    pj_dns_srv_resolver_cb  *cb;
+    pj_dns_async_query	    *qobject;
+    pj_status_t		     last_error;
+
+    /* Original request: */
+    pj_bool_t		     fallback_a;
+    pj_str_t		     full_name;
+    pj_str_t		     domain_part;
+    pj_uint16_t		     def_port;
+
+    /* SRV records and their resolved IP addresses: */
+    unsigned		     srv_cnt;
+    struct srv_target	     srv[PJ_DNS_SRV_MAX_ADDR];
+
+    /* Number of hosts in SRV records that the IP address has been resolved */
+    unsigned		     host_resolved;
+
+} pj_dns_srv_resolver_job;
+
+
+/* Async resolver callback, forward decl. */
+static void dns_callback(void *user_data,
+			 pj_status_t status,
+			 pj_dns_parsed_packet *pkt);
+
+
+
+/*
+ * The public API to invoke DNS SRV resolution.
+ */
+PJ_DEF(pj_status_t) pj_dns_srv_resolve( const pj_str_t *domain_name,
+				        const pj_str_t *res_name,
+					unsigned def_port,
+					pj_pool_t *pool,
+					pj_dns_resolver *resolver,
+					pj_bool_t fallback_a,
+					void *token,
+					pj_dns_srv_resolver_cb *cb)
+{
+    int len;
+    pj_str_t target_name;
+    pj_dns_srv_resolver_job *query_job;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(domain_name && domain_name->slen &&
+		     res_name && res_name->slen &&
+		     pool && resolver && cb, PJ_EINVAL);
+
+    /* Build full name */
+    len = domain_name->slen + res_name->slen + 2;
+    target_name.ptr = (char*) pj_pool_alloc(pool, len);
+    pj_strcpy(&target_name, res_name);
+    if (res_name->ptr[res_name->slen-1] != '.')
+	pj_strcat2(&target_name, ".");
+    len = target_name.slen;
+    pj_strcat(&target_name, domain_name);
+    target_name.ptr[target_name.slen] = '\0';
+
+
+    /* Build the query_job state */
+    query_job = PJ_POOL_ZALLOC_T(pool, pj_dns_srv_resolver_job);
+    query_job->objname = target_name.ptr;
+    query_job->resolver = resolver;
+    query_job->token = token;
+    query_job->cb = cb;
+    query_job->fallback_a = fallback_a;
+    query_job->full_name = target_name;
+    query_job->domain_part.ptr = target_name.ptr + len;
+    query_job->domain_part.slen = target_name.slen - len;
+    query_job->def_port = (pj_uint16_t)def_port;
+
+    /* Start the asynchronous query_job */
+
+    query_job->dns_state = PJ_DNS_TYPE_SRV;
+
+    PJ_LOG(5, (query_job->objname, 
+	       "Starting async DNS %s query_job: target=%.*",
+	       pj_dns_get_type_name(query_job->dns_state),
+	       (int)target_name.slen, target_name.ptr));
+
+    status = pj_dns_resolver_start_query(resolver, &target_name, 
+				         query_job->dns_state, 0, 
+					 &dns_callback,
+    					 query_job, &query_job->qobject);
+    return status;
+}
+
+
+
+#define SWAP(type,ptr1,ptr2) if (ptr1 != ptr2) { \
+				type tmp; \
+				pj_memcpy(&tmp, ptr1, sizeof(type)); \
+				pj_memcpy(ptr1, ptr2, sizeof(type)); \
+				(ptr1)->target_name.ptr = (ptr1)->target_buf;\
+				pj_memcpy(ptr2, &tmp, sizeof(type)); \
+				(ptr2)->target_name.ptr = (ptr2)->target_buf;\
+			     } else {}
+
+
+/* Build server entries in the query_job based on received SRV response */
+static void build_server_entries(pj_dns_srv_resolver_job *query_job, 
+				 pj_dns_parsed_packet *response)
+{
+    unsigned i;
+
+    /* Save the Resource Records in DNS answer into SRV targets. */
+    query_job->srv_cnt = 0;
+    for (i=0; i<response->hdr.anscount && 
+	      query_job->srv_cnt < PJ_DNS_SRV_MAX_ADDR; ++i) 
+    {
+	pj_dns_parsed_rr *rr = &response->ans[i];
+	struct srv_target *srv = &query_job->srv[query_job->srv_cnt];
+
+	if (rr->type != PJ_DNS_TYPE_SRV) {
+	    PJ_LOG(4,(query_job->objname, 
+		      "Received non SRV answer for SRV query_job!"));
+	    continue;
+	}
+
+	if (rr->rdata.srv.target.slen > PJ_MAX_HOSTNAME) {
+	    PJ_LOG(4,(query_job->objname, "Hostname is too long!"));
+	    continue;
+	}
+
+	/* Build the SRV entry for RR */
+	pj_bzero(srv, sizeof(*srv));
+	srv->target_name.ptr = srv->target_buf;
+	pj_strncpy(&srv->target_name, &rr->rdata.srv.target,
+		   sizeof(srv->target_buf));
+	srv->port = rr->rdata.srv.port;
+	srv->priority = rr->rdata.srv.prio;
+	srv->weight = rr->rdata.srv.weight;
+	
+	++query_job->srv_cnt;
+    }
+
+    /* First pass: 
+     *	order the entries based on priority.
+     */
+    for (i=0; i<query_job->srv_cnt-1; ++i) {
+	unsigned min = i, j;
+	for (j=i+1; j<query_job->srv_cnt; ++j) {
+	    if (query_job->srv[j].priority < query_job->srv[min].priority)
+		min = j;
+	}
+	SWAP(struct srv_target, &query_job->srv[i], &query_job->srv[min]);
+    }
+
+    /* Second pass:
+     *	pick one host among hosts with the same priority, according
+     *	to its weight. The idea is when one server fails, client should
+     *	contact the next server with higher priority rather than contacting
+     *	server with the same priority as the failed one.
+     *
+     *  The algorithm for selecting server among servers with the same
+     *  priority is described in RFC 2782.
+     */
+    for (i=0; i<query_job->srv_cnt; ++i) {
+	unsigned j, count=1, sum;
+
+	/* Calculate running sum for servers with the same priority */
+	sum = query_job->srv[i].sum = query_job->srv[i].weight;
+	for (j=i+1; j<query_job->srv_cnt && 
+		    query_job->srv[j].priority == query_job->srv[i].priority; ++j)
+	{
+	    sum += query_job->srv[j].weight;
+	    query_job->srv[j].sum = sum;
+	    ++count;
+	}
+
+	if (count > 1) {
+	    unsigned r;
+
+	    /* Elect one random number between zero and the total sum of
+	     * weight (inclusive).
+	     */
+	    r = pj_rand() % (sum + 1);
+
+	    /* Select the first server which running sum is greater than or
+	     * equal to the random number.
+	     */
+	    for (j=i; j<i+count; ++j) {
+		if (query_job->srv[j].sum >= r)
+		    break;
+	    }
+
+	    /* Must have selected one! */
+	    pj_assert(j != i+count);
+
+	    /* Put this entry in front (of entries with same priority) */
+	    SWAP(struct srv_target, &query_job->srv[i], &query_job->srv[j]);
+
+	    /* Remove all other entries (of the same priority) */
+	    while (count > 1) {
+		pj_array_erase(query_job->srv, sizeof(struct srv_target), 
+			       query_job->srv_cnt, i+1);
+		--count;
+		--query_job->srv_cnt;
+	    }
+	}
+    }
+
+    /* Since we've been moving around SRV entries, update the pointers
+     * in target_name.
+     */
+    for (i=0; i<query_job->srv_cnt; ++i) {
+	query_job->srv[i].target_name.ptr = query_job->srv[i].target_buf;
+    }
+
+    /* Check for Additional Info section if A records are available, and
+     * fill in the IP address (so that we won't need to resolve the A 
+     * record with another DNS query_job). 
+     */
+    for (i=0; i<response->hdr.arcount; ++i) {
+	pj_dns_parsed_rr *rr = &response->arr[i];
+	unsigned j;
+
+	if (rr->type != PJ_DNS_TYPE_A)
+	    continue;
+
+	/* Yippeaiyee!! There is an "A" record! 
+	 * Update the IP address of the corresponding SRV record.
+	 */
+	for (j=0; j<query_job->srv_cnt; ++j) {
+	    if (pj_stricmp(&rr->name, &query_job->srv[j].target_name)==0) {
+		unsigned cnt = query_job->srv[j].addr_cnt;
+		query_job->srv[j].addr[cnt].s_addr = rr->rdata.a.ip_addr.s_addr;
+		++query_job->srv[j].addr_cnt;
+		++query_job->host_resolved;
+		break;
+	    }
+	}
+
+	/* Not valid message; SRV entry might have been deleted in
+	 * server selection process.
+	 */
+	/*
+	if (j == query_job->srv_cnt) {
+	    PJ_LOG(4,(query_job->objname, 
+		      "Received DNS SRV answer with A record, but "
+		      "couldn't find matching name (name=%.*s)",
+		      (int)rr->name.slen,
+		      rr->name.ptr));
+	}
+	*/
+    }
+
+    /* Rescan again the name specified in the SRV record to see if IP
+     * address is specified as the target name (unlikely, but well, who 
+     * knows..).
+     */
+    for (i=0; i<query_job->srv_cnt; ++i) {
+	pj_in_addr addr;
+
+	if (query_job->srv[i].addr_cnt != 0) {
+	    /* IP address already resolved */
+	    continue;
+	}
+
+	if (pj_inet_aton(&query_job->srv[i].target_name, &addr) != 0) {
+	    query_job->srv[i].addr[query_job->srv[i].addr_cnt++] = addr;
+	    ++query_job->host_resolved;
+	}
+    }
+
+    /* Print resolved entries to the log */
+    PJ_LOG(5,(query_job->objname, 
+	      "SRV query_job for %.*s completed, "
+	      "%d of %d total entries selected%c",
+	      (int)query_job->full_name.slen,
+	      query_job->full_name.ptr,
+	      query_job->srv_cnt,
+	      response->hdr.anscount,
+	      (query_job->srv_cnt ? ':' : ' ')));
+
+    for (i=0; i<query_job->srv_cnt; ++i) {
+	const char *addr;
+
+	if (query_job->srv[i].addr_cnt != 0)
+	    addr = pj_inet_ntoa(query_job->srv[i].addr[0]);
+	else
+	    addr = "-";
+
+	PJ_LOG(5,(query_job->objname, 
+		  " %d: SRV %d %d %d %.*s (%s)",
+		  i, query_job->srv[i].priority, 
+		  query_job->srv[i].weight, 
+		  query_job->srv[i].port, 
+		  (int)query_job->srv[i].target_name.slen, 
+		  query_job->srv[i].target_name.ptr,
+		  addr));
+    }
+}
+
+
+/* Start DNS A record queries for all SRV records in the query_job structure */
+static pj_status_t resolve_hostnames(pj_dns_srv_resolver_job *query_job)
+{
+    unsigned i;
+    pj_status_t err=PJ_SUCCESS, status;
+
+    query_job->dns_state = PJ_DNS_TYPE_A;
+    for (i=0; i<query_job->srv_cnt; ++i) {
+	PJ_LOG(5, (query_job->objname, 
+		   "Starting async DNS A query_job for %.*s",
+		   (int)query_job->srv[i].target_name.slen, 
+		   query_job->srv[i].target_name.ptr));
+
+	status = pj_dns_resolver_start_query(query_job->resolver,
+					     &query_job->srv[i].target_name,
+					     PJ_DNS_TYPE_A, 0,
+					     &dns_callback,
+					     query_job, NULL);
+	if (status != PJ_SUCCESS) {
+	    query_job->host_resolved++;
+	    err = status;
+	}
+    }
+    
+    return (query_job->host_resolved == query_job->srv_cnt) ? err : PJ_SUCCESS;
+}
+
+/* 
+ * This callback is called by PJLIB-UTIL DNS resolver when asynchronous
+ * query_job has completed (successfully or with error).
+ */
+static void dns_callback(void *user_data,
+			 pj_status_t status,
+			 pj_dns_parsed_packet *pkt)
+{
+    pj_dns_srv_resolver_job *query_job = user_data;
+    unsigned i;
+
+    /* Proceed to next stage */
+
+    if (query_job->dns_state == PJ_DNS_TYPE_SRV) {
+
+	/* We are getting SRV response */
+
+	if (status == PJ_SUCCESS && pkt->hdr.anscount != 0) {
+	    /* Got SRV response, build server entry. If A records are available
+	     * in additional records section of the DNS response, save them too.
+	     */
+	    build_server_entries(query_job, pkt);
+
+	} else if (status != PJ_SUCCESS) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+
+	    /* Update query_job last error */
+	    query_job->last_error = status;
+
+	    pj_strerror(status, errmsg, sizeof(errmsg));
+	    PJ_LOG(4,(query_job->objname, 
+		      "DNS SRV resolution failed for %.*s: %s", 
+		      (int)query_job->full_name.slen, 
+		      query_job->full_name.ptr,
+		      errmsg));
+
+	    /* Trigger error when fallback is disabled */
+	    if (query_job->fallback_a == PJ_FALSE) {
+		goto on_error;
+	    }
+	}
+
+	/* If we can't build SRV record, assume the original target is
+	 * an A record and resolve with DNS A resolution.
+	 */
+	if (query_job->srv_cnt == 0) {
+	    /* Looks like we aren't getting any SRV responses.
+	     * Resolve the original target as A record by creating a 
+	     * single "dummy" srv record and start the hostname resolution.
+	     */
+	    PJ_LOG(4, (query_job->objname, 
+		       "DNS SRV resolution failed for %.*s, trying "
+		       "resolving A record for %.*s",
+		       (int)query_job->full_name.slen, 
+		       query_job->full_name.ptr,
+		       (int)query_job->domain_part.slen,
+		       query_job->domain_part.ptr));
+
+	    /* Create a "dummy" srv record using the original target */
+	    i = query_job->srv_cnt++;
+	    pj_bzero(&query_job->srv[i], sizeof(query_job->srv[i]));
+	    query_job->srv[i].target_name = query_job->domain_part;
+	    query_job->srv[i].priority = 0;
+	    query_job->srv[i].weight = 0;
+	    query_job->srv[i].port = query_job->def_port;
+	} 
+	
+
+	/* Resolve server hostnames (DNS A record) for hosts which don't have
+	 * A record yet.
+	 */
+	if (query_job->host_resolved != query_job->srv_cnt) {
+	    status = resolve_hostnames(query_job);
+	    if (status != PJ_SUCCESS)
+		goto on_error;
+
+	    /* Must return now. Callback may have been called and query_job
+	     * may have been destroyed.
+	     */
+	    return;
+	}
+
+    } else if (query_job->dns_state == PJ_DNS_TYPE_A) {
+
+	/* Check that we really have answer */
+	if (status==PJ_SUCCESS && pkt->hdr.anscount != 0) {
+	    int ans_idx = -1;
+
+	    /* Find the first DNS A record in the answer while processing
+	     * the CNAME info found in the response.
+	     */
+	    for (i=0; i < pkt->hdr.anscount; ++i) {
+
+		pj_dns_parsed_rr *rr = &pkt->ans[i];
+
+		if (rr->type == PJ_DNS_TYPE_A) {
+
+		    if (ans_idx == -1)
+			ans_idx = i;
+
+		} else if (rr->type == PJ_DNS_TYPE_CNAME) {
+		    /* Find which server entry to be updated with
+		     * the CNAME information.
+		     */
+		    unsigned j;
+		    pj_str_t cname = rr->rdata.cname.name;
+
+		    for (j=0; j<query_job->srv_cnt; ++j) 
+		    {
+			struct srv_target *srv = &query_job->srv[j];
+			if (pj_stricmp(&rr->name, &srv->target_name)==0)
+			{
+			    /* Update CNAME info for this server entry */
+			    srv->cname.ptr = srv->cname_buf;
+			    pj_strncpy(&srv->cname, &cname, 
+				       sizeof(srv->cname_buf));
+			    break;
+			}
+		    }
+		}
+	    }
+
+	    if (ans_idx == -1) {
+		/* There's no DNS A answer! */
+		PJ_LOG(5,(query_job->objname, 
+			  "No DNS A record in response!"));
+		status = PJLIB_UTIL_EDNSNOANSWERREC;
+		goto on_error;
+	    }
+
+	    /* Update IP address of the corresponding hostname or CNAME */
+	    for (i=0; i<query_job->srv_cnt; ++i) {
+		pj_dns_parsed_rr *rr = &pkt->ans[ans_idx];
+		struct srv_target *srv = &query_job->srv[i];
+
+		if (pj_stricmp(&rr->name, &srv->target_name)==0 ||
+		    pj_stricmp(&rr->name, &srv->cname)==0) 
+		{
+		    break;
+		}
+	    }
+
+	    if (i == query_job->srv_cnt) {
+		PJ_LOG(4,(query_job->objname, 
+			  "Received answer to DNS A request with no matching "
+			  "SRV record! The unknown name is %.*s",
+			  (int)pkt->ans[ans_idx].name.slen, 
+			  pkt->ans[ans_idx].name.ptr));
+	    } else {
+		unsigned j;
+
+		query_job->srv[i].addr[query_job->srv[i].addr_cnt++].s_addr =
+		    pkt->ans[ans_idx].rdata.a.ip_addr.s_addr;
+
+		PJ_LOG(5,(query_job->objname, 
+			  "DNS A for %.*s: %s",
+			  (int)query_job->srv[i].target_name.slen, 
+			  query_job->srv[i].target_name.ptr,
+			  pj_inet_ntoa(pkt->ans[ans_idx].rdata.a.ip_addr)));
+
+		/* Check for multiple IP addresses */
+		for (j=ans_idx+1; j<pkt->hdr.anscount && 
+			    query_job->srv[i].addr_cnt < ADDR_MAX_COUNT; ++j)
+		{
+		    query_job->srv[i].addr[query_job->srv[i].addr_cnt++].s_addr = 
+			pkt->ans[j].rdata.a.ip_addr.s_addr;
+
+		    PJ_LOG(5,(query_job->objname, 
+			      "Additional DNS A for %.*s: %s",
+			      (int)query_job->srv[i].target_name.slen, 
+			      query_job->srv[i].target_name.ptr,
+			      pj_inet_ntoa(pkt->ans[j].rdata.a.ip_addr)));
+		}
+	    }
+
+	} else if (status != PJ_SUCCESS) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+
+	    /* Update last error */
+	    query_job->last_error = status;
+
+	    /* Log error */
+	    pj_strerror(status, errmsg, sizeof(errmsg));
+	    PJ_LOG(4,(query_job->objname, "DNS A record resolution failed: %s", 
+		      errmsg));
+	}
+
+	++query_job->host_resolved;
+
+    } else {
+	pj_assert(!"Unexpected state!");
+	query_job->last_error = status = PJ_EINVALIDOP;
+	goto on_error;
+    }
+
+    /* Check if all hosts have been resolved */
+    if (query_job->host_resolved == query_job->srv_cnt) {
+	/* Got all answers, build server addresses */
+	pj_dns_srv_record svr_addr;
+
+	svr_addr.count = 0;
+	for (i=0; i<query_job->srv_cnt; ++i) {
+	    unsigned j;
+
+	    /* Do we have IP address for this server? */
+	    /* This log is redundant really.
+	    if (query_job->srv[i].addr_cnt == 0) {
+		PJ_LOG(5,(query_job->objname, 
+			  " SRV target %.*s:%d does not have IP address!",
+			  (int)query_job->srv[i].target_name.slen,
+			  query_job->srv[i].target_name.ptr,
+			  query_job->srv[i].port));
+		continue;
+	    }
+	    */
+
+	    for (j=0; j<query_job->srv[i].addr_cnt; ++j) {
+		unsigned idx = svr_addr.count;
+		pj_sockaddr_in *addr;
+
+		svr_addr.entry[idx].priority = query_job->srv[i].priority;
+		svr_addr.entry[idx].weight = query_job->srv[i].weight;
+		svr_addr.entry[idx].addr_len = sizeof(pj_sockaddr_in);
+	     
+		addr = (pj_sockaddr_in*)&svr_addr.entry[idx].addr;
+		pj_bzero(addr, sizeof(pj_sockaddr_in));
+		addr->sin_family = PJ_AF_INET;
+		addr->sin_addr = query_job->srv[i].addr[j];
+		addr->sin_port = pj_htons((pj_uint16_t)query_job->srv[i].port);
+
+		++svr_addr.count;
+	    }
+	}
+
+	PJ_LOG(5,(query_job->objname, 
+		  "Server resolution complete, %d server entry(s) found",
+		  svr_addr.count));
+
+
+	if (svr_addr.count > 0)
+	    status = PJ_SUCCESS;
+	else {
+	    status = query_job->last_error;
+	    if (status == PJ_SUCCESS)
+		status = PJLIB_UTIL_EDNSNOANSWERREC;
+	}
+
+	/* Call the callback */
+	(*query_job->cb)(query_job->token, status, &svr_addr);
+    }
+
+
+    return;
+
+on_error:
+    /* Check for failure */
+    if (status != PJ_SUCCESS) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+	PJ_UNUSED_ARG(errmsg);
+	PJ_LOG(4,(query_job->objname, 
+		  "DNS %s record resolution error for '%.*s'."
+		  " Err=%d (%s)",
+		  pj_dns_get_type_name(query_job->dns_state),
+		  (int)query_job->domain_part.slen,
+		  query_job->domain_part.ptr,
+		  status,
+		  pj_strerror(status,errmsg,sizeof(errmsg)).ptr));
+	(*query_job->cb)(query_job->token, status, NULL);
+	return;
+    }
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/string.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/string.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/string.c	(revision 1163)
@@ -0,0 +1,109 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 <pjlib-util/string.h>
+#include <pj/ctype.h>
+#include <pj/string.h>
+#include <pj/pool.h>
+
+PJ_DEF(pj_str_t) pj_str_unescape( pj_pool_t *pool, const pj_str_t *src_str)
+{
+    char *src = src_str->ptr;
+    char *end = src + src_str->slen;
+    pj_str_t dst_str;
+    char *dst;
+    
+    if (pj_strchr(src_str, '%')==NULL)
+	return *src_str;
+
+    dst = dst_str.ptr = pj_pool_alloc(pool, src_str->slen);
+
+    while (src != end) {
+	if (*src == '%' && src < end-2 && pj_isxdigit(*(src+1)) && 
+	    pj_isxdigit(*(src+2))) 
+	{
+	    *dst = (pj_uint8_t) ((pj_hex_digit_to_val(*(src+1)) << 4) + 
+				 pj_hex_digit_to_val(*(src+2)));
+	    ++dst;
+	    src += 3;
+	} else {
+	    *dst++ = *src++;
+	}
+    }
+    dst_str.slen = dst - dst_str.ptr;
+    return dst_str;
+}
+
+PJ_DEF(pj_str_t*) pj_strcpy_unescape(pj_str_t *dst_str,
+				     const pj_str_t *src_str)
+{
+    const char *src = src_str->ptr;
+    const char *end = src + src_str->slen;
+    char *dst = dst_str->ptr;
+    
+    while (src != end) {
+	if (*src == '%' && src < end-2) {
+	    *dst = (pj_uint8_t) ((pj_hex_digit_to_val(*(src+1)) << 4) + 
+				 pj_hex_digit_to_val(*(src+2)));
+	    ++dst;
+	    src += 3;
+	} else {
+	    *dst++ = *src++;
+	}
+    }
+    dst_str->slen = dst - dst_str->ptr;
+    return dst_str;
+}
+
+PJ_DEF(pj_ssize_t) pj_strncpy2_escape( char *dst_str, const pj_str_t *src_str,
+				       pj_ssize_t max, const pj_cis_t *unres)
+{
+    const char *src = src_str->ptr;
+    const char *src_end = src + src_str->slen;
+    char *dst = dst_str;
+    char *dst_end = dst + max;
+
+    if (max < src_str->slen)
+	return -1;
+
+    while (src != src_end && dst != dst_end) {
+	if (pj_cis_match(unres, *src)) {
+	    *dst++ = *src++;
+	} else {
+	    if (dst < dst_end-2) {
+		*dst++ = '%';
+		pj_val_to_hex_digit(*src, dst);
+		dst+=2;
+		++src;
+	    } else {
+		break;
+	    }
+	}
+    }
+
+    return src==src_end ? dst-dst_str : -1;
+}
+
+PJ_DEF(pj_str_t*) pj_strncpy_escape(pj_str_t *dst_str, 
+				    const pj_str_t *src_str,
+				    pj_ssize_t max, const pj_cis_t *unres)
+{
+    dst_str->slen = pj_strncpy2_escape(dst_str->ptr, src_str, max, unres);
+    return dst_str->slen < 0 ? NULL : dst_str;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/stun_simple.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/stun_simple.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/stun_simple.c	(revision 1163)
@@ -0,0 +1,125 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2006 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 <pjlib-util/stun_simple.h>
+#include <pjlib-util/errno.h>
+#include <pj/pool.h>
+#include <pj/log.h>
+#include <pj/sock.h>
+#include <pj/os.h>
+
+#define THIS_FILE   "stun.c"
+
+PJ_DEF(pj_status_t) pjstun_create_bind_req( pj_pool_t *pool, 
+					     void **msg, pj_size_t *len,
+					     pj_uint32_t id_hi, 
+					     pj_uint32_t id_lo)
+{
+    pjstun_msg_hdr *hdr;
+    
+    PJ_CHECK_STACK();
+
+
+    hdr = pj_pool_calloc(pool, 1, sizeof(pjstun_msg_hdr));
+    if (!hdr)
+	return PJ_ENOMEM;
+
+    hdr->type = pj_htons(PJSTUN_BINDING_REQUEST);
+    hdr->tsx[2] = pj_htonl(id_hi);
+    hdr->tsx[3] = pj_htonl(id_lo);
+    *msg = hdr;
+    *len = sizeof(pjstun_msg_hdr);
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjstun_parse_msg( void *buf, pj_size_t len, 
+				       pjstun_msg *msg)
+{
+    pj_uint16_t msg_type, msg_len;
+    char *p_attr;
+
+    PJ_CHECK_STACK();
+
+    msg->hdr = (pjstun_msg_hdr*)buf;
+    msg_type = pj_ntohs(msg->hdr->type);
+
+    switch (msg_type) {
+    case PJSTUN_BINDING_REQUEST:
+    case PJSTUN_BINDING_RESPONSE:
+    case PJSTUN_BINDING_ERROR_RESPONSE:
+    case PJSTUN_SHARED_SECRET_REQUEST:
+    case PJSTUN_SHARED_SECRET_RESPONSE:
+    case PJSTUN_SHARED_SECRET_ERROR_RESPONSE:
+	break;
+    default:
+	PJ_LOG(4,(THIS_FILE, "Error: unknown msg type %d", msg_type));
+	return PJLIB_UTIL_ESTUNINMSGTYPE;
+    }
+
+    msg_len = pj_ntohs(msg->hdr->length);
+    if (msg_len != len - sizeof(pjstun_msg_hdr)) {
+	PJ_LOG(4,(THIS_FILE, "Error: invalid msg_len %d (expecting %d)", 
+			     msg_len, len - sizeof(pjstun_msg_hdr)));
+	return PJLIB_UTIL_ESTUNINMSGLEN;
+    }
+
+    msg->attr_count = 0;
+    p_attr = (char*)buf + sizeof(pjstun_msg_hdr);
+
+    while (msg_len > 0) {
+	pjstun_attr_hdr **attr = &msg->attr[msg->attr_count];
+	pj_uint32_t len;
+
+	*attr = (pjstun_attr_hdr*)p_attr;
+	len = pj_ntohs((pj_uint16_t) ((*attr)->length)) + sizeof(pjstun_attr_hdr);
+
+	if (msg_len < len) {
+	    PJ_LOG(4,(THIS_FILE, "Error: length mismatch in attr %d", 
+				 msg->attr_count));
+	    return PJLIB_UTIL_ESTUNINATTRLEN;
+	}
+
+	if (pj_ntohs((*attr)->type) > PJSTUN_ATTR_REFLECTED_FORM) {
+	    PJ_LOG(5,(THIS_FILE, "Warning: unknown attr type %x in attr %d. "
+				 "Attribute was ignored.",
+				 pj_ntohs((*attr)->type), msg->attr_count));
+	}
+
+	msg_len = (pj_uint16_t)(msg_len - len);
+	p_attr += len;
+	++msg->attr_count;
+    }
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(void*) pjstun_msg_find_attr( pjstun_msg *msg, pjstun_attr_type t)
+{
+    int i;
+
+    PJ_CHECK_STACK();
+
+    for (i=0; i<msg->attr_count; ++i) {
+	pjstun_attr_hdr *attr = msg->attr[i];
+	if (pj_ntohs(attr->type) == t)
+	    return attr;
+    }
+
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/stun_simple_client.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/stun_simple_client.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/stun_simple_client.c	(revision 1163)
@@ -0,0 +1,241 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2006 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 <pjlib-util/stun_simple.h>
+#include <pjlib-util/errno.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/rand.h>
+#include <pj/sock_select.h>
+#include <pj/string.h>
+
+
+enum { MAX_REQUEST = 3 };
+static int stun_timer[] = {1600, 1600, 1600 };
+
+#define THIS_FILE	"stun_client.c"
+#define LOG_ADDR(addr)	pj_inet_ntoa(addr.sin_addr), pj_ntohs(addr.sin_port)
+
+
+PJ_DECL(pj_status_t) pjstun_get_mapped_addr( pj_pool_factory *pf,
+					      int sock_cnt, pj_sock_t sock[],
+					      const pj_str_t *srv1, int port1,
+					      const pj_str_t *srv2, int port2,
+					      pj_sockaddr_in mapped_addr[])
+{
+    pj_sockaddr_in srv_addr[2];
+    int i, j, send_cnt = 0;
+    pj_pool_t *pool;
+    struct {
+	struct {
+	    pj_uint32_t	mapped_addr;
+	    pj_uint32_t	mapped_port;
+	} srv[2];
+    } *rec;
+    void       *out_msg;
+    pj_size_t	out_msg_len;
+    int wait_resp = 0;
+    pj_status_t status;
+
+    PJ_CHECK_STACK();
+
+    /* Create pool. */
+    pool = pj_pool_create(pf, "stun%p", 1024, 1024, NULL);
+    if (!pool)
+	return PJ_ENOMEM;
+
+
+    /* Allocate client records */
+    rec = pj_pool_calloc(pool, sock_cnt, sizeof(*rec));
+    if (!rec) {
+	status = PJ_ENOMEM;
+	goto on_error;
+    }
+
+
+    /* Create the outgoing BIND REQUEST message template */
+    status = pjstun_create_bind_req( pool, &out_msg, &out_msg_len, 
+				      pj_rand(), pj_rand());
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Resolve servers. */
+    status = pj_sockaddr_in_init(&srv_addr[0], srv1, (pj_uint16_t)port1);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    status = pj_sockaddr_in_init(&srv_addr[1], srv2, (pj_uint16_t)port2);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Init mapped addresses to zero */
+    pj_memset(mapped_addr, 0, sock_cnt * sizeof(pj_sockaddr_in));
+
+    /* Main retransmission loop. */
+    for (send_cnt=0; send_cnt<MAX_REQUEST; ++send_cnt) {
+	pj_time_val next_tx, now;
+	pj_fd_set_t r;
+	int select_rc;
+
+	PJ_FD_ZERO(&r);
+
+	/* Send messages to servers that has not given us response. */
+	for (i=0; i<sock_cnt && status==PJ_SUCCESS; ++i) {
+	    for (j=0; j<2 && status==PJ_SUCCESS; ++j) {
+		pjstun_msg_hdr *msg_hdr = out_msg;
+                pj_ssize_t sent_len;
+
+		if (rec[i].srv[j].mapped_port != 0)
+		    continue;
+
+		/* Modify message so that we can distinguish response. */
+		msg_hdr->tsx[2] = pj_htonl(i);
+		msg_hdr->tsx[3] = pj_htonl(j);
+
+		/* Send! */
+                sent_len = out_msg_len;
+		status = pj_sock_sendto(sock[i], out_msg, &sent_len, 0,
+					(pj_sockaddr_t*)&srv_addr[j], 
+					sizeof(pj_sockaddr_in));
+		if (status == PJ_SUCCESS)
+		    ++wait_resp;
+	    }
+	}
+
+	/* All requests sent.
+	 * The loop below will wait for responses until all responses have
+	 * been received (i.e. wait_resp==0) or timeout occurs, which then
+	 * we'll go to the next retransmission iteration.
+	 */
+
+	/* Calculate time of next retransmission. */
+	pj_gettimeofday(&next_tx);
+	next_tx.sec += (stun_timer[send_cnt]/1000);
+	next_tx.msec += (stun_timer[send_cnt]%1000);
+	pj_time_val_normalize(&next_tx);
+
+	for (pj_gettimeofday(&now), select_rc=1; 
+	     status==PJ_SUCCESS && select_rc==1 && wait_resp>0 
+	       && PJ_TIME_VAL_LT(now, next_tx); 
+	     pj_gettimeofday(&now)) 
+	{
+	    pj_time_val timeout;
+
+	    timeout = next_tx;
+	    PJ_TIME_VAL_SUB(timeout, now);
+
+	    for (i=0; i<sock_cnt; ++i) {
+		PJ_FD_SET(sock[i], &r);
+	    }
+
+	    select_rc = pj_sock_select(FD_SETSIZE, &r, NULL, NULL, &timeout);
+	    if (select_rc < 1)
+		continue;
+
+	    for (i=0; i<sock_cnt; ++i) {
+		int sock_idx, srv_idx;
+                pj_ssize_t len;
+		pjstun_msg msg;
+		pj_sockaddr_in addr;
+		int addrlen = sizeof(addr);
+		pjstun_mapped_addr_attr *attr;
+		char recv_buf[128];
+
+		if (!PJ_FD_ISSET(sock[i], &r))
+		    continue;
+
+                len = sizeof(recv_buf);
+		status = pj_sock_recvfrom( sock[i], recv_buf, 
+				           &len, 0,
+				           (pj_sockaddr_t*)&addr,
+					   &addrlen);
+
+		--wait_resp;
+
+		if (status != PJ_SUCCESS)
+		    continue;
+
+		status = pjstun_parse_msg(recv_buf, len, &msg);
+		if (status != PJ_SUCCESS) {
+		    continue;
+		}
+
+
+		sock_idx = pj_ntohl(msg.hdr->tsx[2]);
+		srv_idx = pj_ntohl(msg.hdr->tsx[3]);
+
+		if (sock_idx<0 || sock_idx>=sock_cnt || srv_idx<0 || srv_idx>=2) {
+		    status = PJLIB_UTIL_ESTUNININDEX;
+		    continue;
+		}
+
+		if (pj_ntohs(msg.hdr->type) != PJSTUN_BINDING_RESPONSE) {
+		    status = PJLIB_UTIL_ESTUNNOBINDRES;
+		    continue;
+		}
+
+		if (pjstun_msg_find_attr(&msg, PJSTUN_ATTR_ERROR_CODE) != NULL) {
+		    status = PJLIB_UTIL_ESTUNRECVERRATTR;
+		    continue;
+		}
+
+		attr = (void*)pjstun_msg_find_attr(&msg, PJSTUN_ATTR_MAPPED_ADDR);
+		if (!attr) {
+		    status = PJLIB_UTIL_ESTUNNOMAP;
+		    continue;
+		}
+
+		rec[sock_idx].srv[srv_idx].mapped_addr = attr->addr;
+		rec[sock_idx].srv[srv_idx].mapped_port = attr->port;
+	    }
+	}
+
+	/* The best scenario is if all requests have been replied.
+	 * Then we don't need to go to the next retransmission iteration.
+	 */
+	if (wait_resp <= 0)
+	    break;
+    }
+
+    for (i=0; i<sock_cnt && status==PJ_SUCCESS; ++i) {
+	if (rec[i].srv[0].mapped_addr == rec[i].srv[1].mapped_addr &&
+	    rec[i].srv[0].mapped_port == rec[i].srv[1].mapped_port)
+	{
+	    mapped_addr[i].sin_family = PJ_AF_INET;
+	    mapped_addr[i].sin_addr.s_addr = rec[i].srv[0].mapped_addr;
+	    mapped_addr[i].sin_port = (pj_uint16_t)rec[i].srv[0].mapped_port;
+
+	    if (rec[i].srv[0].mapped_addr == 0 || rec[i].srv[0].mapped_port == 0) {
+		status = PJLIB_UTIL_ESTUNNOTRESPOND;
+		break;
+	    }
+	} else {
+	    status = PJLIB_UTIL_ESTUNSYMMETRIC;
+	    break;
+	}
+    }
+
+    pj_pool_release(pool);
+
+    return status;
+
+on_error:
+    if (pool) pj_pool_release(pool);
+    return status;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/symbols.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/symbols.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/symbols.c	(revision 1163)
@@ -0,0 +1,82 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjlib.h>
+#include <pjlib-util.h>
+
+/*
+ * md5.h
+ */
+PJ_EXPORT_SYMBOL(md5_init)
+PJ_EXPORT_SYMBOL(md5_append)
+PJ_EXPORT_SYMBOL(md5_finish)
+
+/*
+ * scanner.h
+ */
+PJ_EXPORT_SYMBOL(pj_cs_init)
+PJ_EXPORT_SYMBOL(pj_cs_set)
+PJ_EXPORT_SYMBOL(pj_cs_add_range)
+PJ_EXPORT_SYMBOL(pj_cs_add_alpha)
+PJ_EXPORT_SYMBOL(pj_cs_add_num)
+PJ_EXPORT_SYMBOL(pj_cs_add_str)
+PJ_EXPORT_SYMBOL(pj_cs_del_range)
+PJ_EXPORT_SYMBOL(pj_cs_del_str)
+PJ_EXPORT_SYMBOL(pj_cs_invert)
+PJ_EXPORT_SYMBOL(pj_scan_init)
+PJ_EXPORT_SYMBOL(pj_scan_fini)
+PJ_EXPORT_SYMBOL(pj_scan_peek)
+PJ_EXPORT_SYMBOL(pj_scan_peek_n)
+PJ_EXPORT_SYMBOL(pj_scan_peek_until)
+PJ_EXPORT_SYMBOL(pj_scan_get)
+PJ_EXPORT_SYMBOL(pj_scan_get_quote)
+PJ_EXPORT_SYMBOL(pj_scan_get_n)
+PJ_EXPORT_SYMBOL(pj_scan_get_char)
+PJ_EXPORT_SYMBOL(pj_scan_get_newline)
+PJ_EXPORT_SYMBOL(pj_scan_get_until)
+PJ_EXPORT_SYMBOL(pj_scan_get_until_ch)
+PJ_EXPORT_SYMBOL(pj_scan_get_until_chr)
+PJ_EXPORT_SYMBOL(pj_scan_advance_n)
+PJ_EXPORT_SYMBOL(pj_scan_strcmp)
+PJ_EXPORT_SYMBOL(pj_scan_stricmp)
+PJ_EXPORT_SYMBOL(pj_scan_skip_whitespace)
+PJ_EXPORT_SYMBOL(pj_scan_save_state)
+PJ_EXPORT_SYMBOL(pj_scan_restore_state)
+
+/*
+ * stun.h
+ */
+PJ_EXPORT_SYMBOL(pj_stun_create_bind_req)
+PJ_EXPORT_SYMBOL(pj_stun_parse_msg)
+PJ_EXPORT_SYMBOL(pj_stun_msg_find_attr)
+PJ_EXPORT_SYMBOL(pj_stun_get_mapped_addr)
+PJ_EXPORT_SYMBOL(pj_stun_get_err_msg)
+
+/*
+ * xml.h
+ */
+PJ_EXPORT_SYMBOL(pj_xml_parse)
+PJ_EXPORT_SYMBOL(pj_xml_print)
+PJ_EXPORT_SYMBOL(pj_xml_add_node)
+PJ_EXPORT_SYMBOL(pj_xml_add_attr)
+PJ_EXPORT_SYMBOL(pj_xml_find_node)
+PJ_EXPORT_SYMBOL(pj_xml_find_next_node)
+PJ_EXPORT_SYMBOL(pj_xml_find_attr)
+PJ_EXPORT_SYMBOL(pj_xml_find)
+
+
Index: /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/xml.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/xml.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib-util/src/pjlib-util/xml.c	(revision 1163)
@@ -0,0 +1,451 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjlib-util/xml.h>
+#include <pjlib-util/scanner.h>
+#include <pj/except.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/log.h>
+#include <pj/os.h>
+
+#define EX_SYNTAX_ERROR	12
+#define THIS_FILE	"xml.c"
+
+static void on_syntax_error(struct pj_scanner *scanner)
+{
+    PJ_UNUSED_ARG(scanner);
+    PJ_THROW(EX_SYNTAX_ERROR);
+}
+
+static pj_xml_node *alloc_node( pj_pool_t *pool )
+{
+    pj_xml_node *node;
+
+    node = pj_pool_zalloc(pool, sizeof(pj_xml_node));
+    pj_list_init( &node->attr_head );
+    pj_list_init( &node->node_head );
+
+    return node;
+}
+
+static pj_xml_attr *alloc_attr( pj_pool_t *pool )
+{
+    return pj_pool_zalloc(pool, sizeof(pj_xml_attr));
+}
+
+/* This is a recursive function! */
+static pj_xml_node *xml_parse_node( pj_pool_t *pool, pj_scanner *scanner)
+{
+    pj_xml_node *node;
+    pj_str_t end_name;
+
+    PJ_CHECK_STACK();
+
+    if (*scanner->curptr != '<')
+	on_syntax_error(scanner);
+
+    /* Handle Processing Instructino (PI) construct (i.e. "<?") */
+    if (*scanner->curptr == '<' && *(scanner->curptr+1) == '?') {
+	pj_scan_advance_n(scanner, 2, PJ_FALSE);
+	for (;;) {
+	    pj_str_t dummy;
+	    pj_scan_get_until_ch(scanner, '?', &dummy);
+	    if (*scanner->curptr=='?' && *(scanner->curptr+1)=='>') {
+		pj_scan_advance_n(scanner, 2, PJ_TRUE);
+		break;
+	    } else {
+		pj_scan_advance_n(scanner, 1, PJ_FALSE);
+	    }
+	}
+	return xml_parse_node(pool, scanner);
+    }
+
+    /* Handle comments construct (i.e. "<!") */
+    if (pj_scan_strcmp(scanner, "<!", 2) == 0) {
+	pj_scan_advance_n(scanner, 2, PJ_FALSE);
+	for (;;) {
+	    pj_str_t dummy;
+	    pj_scan_get_until_ch(scanner, '>', &dummy);
+	    if (pj_scan_strcmp(scanner, ">", 1) == 0) {
+		pj_scan_advance_n(scanner, 1, PJ_TRUE);
+		break;
+	    } else {
+		pj_scan_advance_n(scanner, 1, PJ_FALSE);
+	    }
+	}
+	return xml_parse_node(pool, scanner);
+    }
+
+    /* Alloc node. */
+    node = alloc_node(pool);
+
+    /* Get '<' */
+    pj_scan_get_char(scanner);
+
+    /* Get node name. */
+    pj_scan_get_until_chr( scanner, " />\t", &node->name);
+
+    /* Get attributes. */
+    while (*scanner->curptr != '>' && *scanner->curptr != '/') {
+	pj_xml_attr *attr = alloc_attr(pool);
+	
+	pj_scan_get_until_chr( scanner, "=> \t", &attr->name);
+	if (*scanner->curptr == '=') {
+	    pj_scan_get_char( scanner );
+            pj_scan_get_quotes(scanner, "\"'", "\"'", 2, &attr->value);
+	    /* remove quote characters */
+	    ++attr->value.ptr;
+	    attr->value.slen -= 2;
+	}
+	
+	pj_list_push_back( &node->attr_head, attr );
+    }
+
+    if (*scanner->curptr == '/') {
+	pj_scan_get_char(scanner);
+	if (pj_scan_get_char(scanner) != '>')
+	    on_syntax_error(scanner);
+	return node;
+    }
+
+    /* Enclosing bracket. */
+    if (pj_scan_get_char(scanner) != '>')
+	on_syntax_error(scanner);
+
+    /* Sub nodes. */
+    while (*scanner->curptr == '<' && *(scanner->curptr+1) != '/') {
+	pj_xml_node *sub_node = xml_parse_node(pool, scanner);
+	pj_list_push_back( &node->node_head, sub_node );
+    }
+
+    /* Content. */
+    if (!pj_scan_is_eof(scanner) && *scanner->curptr != '<') {
+	pj_scan_get_until_ch(scanner, '<', &node->content);
+    }
+
+    /* Enclosing node. */
+    if (pj_scan_get_char(scanner) != '<' || pj_scan_get_char(scanner) != '/')
+	on_syntax_error(scanner);
+
+    pj_scan_get_until_chr(scanner, " \t>", &end_name);
+
+    /* Compare name. */
+    if (pj_stricmp(&node->name, &end_name) != 0)
+	on_syntax_error(scanner);
+
+    /* Enclosing '>' */
+    if (pj_scan_get_char(scanner) != '>')
+	on_syntax_error(scanner);
+
+    return node;
+}
+
+PJ_DEF(pj_xml_node*) pj_xml_parse( pj_pool_t *pool, char *msg, pj_size_t len)
+{
+    pj_xml_node *node = NULL;
+    pj_scanner scanner;
+    PJ_USE_EXCEPTION;
+
+    if (!msg || !len || !pool)
+	return NULL;
+
+    pj_scan_init( &scanner, msg, len, 
+		  PJ_SCAN_AUTOSKIP_WS|PJ_SCAN_AUTOSKIP_NEWLINE, 
+		  &on_syntax_error);
+    PJ_TRY {
+	node =  xml_parse_node(pool, &scanner);
+    }
+    PJ_CATCH_ANY {
+	PJ_LOG(4,(THIS_FILE, "Syntax error parsing XML in line %d column %d",
+		  scanner.line, pj_scan_get_col(&scanner)));
+    }
+    PJ_END;
+    pj_scan_fini( &scanner );
+    return node;
+}
+
+/* This is a recursive function. */
+static int xml_print_node( const pj_xml_node *node, int indent, 
+			   char *buf, pj_size_t len )
+{
+    int i;
+    char *p = buf;
+    pj_xml_attr *attr;
+    pj_xml_node *sub_node;
+
+#define SIZE_LEFT()	((int)(len - (p-buf)))
+
+    PJ_CHECK_STACK();
+
+    /* Print name. */
+    if (SIZE_LEFT() < node->name.slen + indent + 5)
+	return -1;
+    for (i=0; i<indent; ++i)
+	*p++ = ' ';
+    *p++ = '<';
+    pj_memcpy(p, node->name.ptr, node->name.slen);
+    p += node->name.slen;
+
+    /* Print attributes. */
+    attr = node->attr_head.next;
+    while (attr != &node->attr_head) {
+
+	if (SIZE_LEFT() < attr->name.slen + attr->value.slen + 4)
+	    return -1;
+
+	*p++ = ' ';
+
+	/* Attribute name. */
+	pj_memcpy(p, attr->name.ptr, attr->name.slen);
+	p += attr->name.slen;
+
+	/* Attribute value. */
+	if (attr->value.slen) {
+	    *p++ = '=';
+	    *p++ = '"';
+	    pj_memcpy(p, attr->value.ptr, attr->value.slen);
+	    p += attr->value.slen;
+	    *p++ = '"';
+	}
+
+	attr = attr->next;
+    }
+
+    /* Check for empty node. */
+    if (node->content.slen==0 &&
+	node->node_head.next==(pj_xml_node*)&node->node_head)
+    {
+	*p++ = ' ';
+	*p++ = '/';
+	*p++ = '>';
+	return p-buf;
+    }
+
+    /* Enclosing '>' */
+    if (SIZE_LEFT() < 1) return -1;
+    *p++ = '>';
+
+    /* Print sub nodes. */
+    sub_node = node->node_head.next;
+    while (sub_node != (pj_xml_node*)&node->node_head) {
+	int printed;
+
+	if (SIZE_LEFT() < indent + 3)
+	    return -1;
+	//*p++ = '\r';
+	*p++ = '\n';
+
+	printed = xml_print_node(sub_node, indent + 1, p, SIZE_LEFT());
+	if (printed < 0)
+	    return -1;
+
+	p += printed;
+	sub_node = sub_node->next;
+    }
+
+    /* Content. */
+    if (node->content.slen) {
+	if (SIZE_LEFT() < node->content.slen) return -1;
+	pj_memcpy(p, node->content.ptr, node->content.slen);
+	p += node->content.slen;
+    }
+
+    /* Enclosing node. */
+    if (node->node_head.next != (pj_xml_node*)&node->node_head) {
+	if (SIZE_LEFT() < node->name.slen + 5 + indent)
+	    return -1;
+	//*p++ = '\r';
+	*p++ = '\n';
+	for (i=0; i<indent; ++i)
+	    *p++ = ' ';
+    } else {
+	if (SIZE_LEFT() < node->name.slen + 3)
+	    return -1;
+    }
+    *p++ = '<';
+    *p++ = '/';
+    pj_memcpy(p, node->name.ptr, node->name.slen);
+    p += node->name.slen;
+    *p++ = '>';
+
+#undef SIZE_LEFT
+
+    return p - buf;
+}
+
+PJ_DEF(int) pj_xml_print(const pj_xml_node *node, char *buf, pj_size_t len,
+			 pj_bool_t include_prolog)
+{
+    int prolog_len = 0;
+    int printed;
+
+    if (!node || !buf || !len)
+	return 0;
+
+    if (include_prolog) {
+	pj_str_t prolog = {"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", 39};
+	if ((int)len < prolog.slen)
+	    return -1;
+	pj_memcpy(buf, prolog.ptr, prolog.slen);
+	prolog_len = prolog.slen;
+    }
+
+    printed = xml_print_node(node, 0, buf+prolog_len, len-prolog_len) + prolog_len;
+    if (printed > 0 && len-printed >= 1) {
+	buf[printed++] = '\n';
+    }
+    return printed;
+}
+
+PJ_DEF(pj_xml_node*) pj_xml_node_new(pj_pool_t *pool, const pj_str_t *name)
+{
+    pj_xml_node *node = alloc_node(pool);
+    pj_strdup(pool, &node->name, name);
+    return node;
+}
+
+PJ_DEF(pj_xml_attr*) pj_xml_attr_new( pj_pool_t *pool, const pj_str_t *name,
+				      const pj_str_t *value)
+{
+    pj_xml_attr *attr = alloc_attr(pool);
+    pj_strdup( pool, &attr->name, name);
+    pj_strdup( pool, &attr->value, value);
+    return attr;
+}
+
+PJ_DEF(void) pj_xml_add_node( pj_xml_node *parent, pj_xml_node *node )
+{
+    pj_list_push_back(&parent->node_head, node);
+}
+
+PJ_DEF(void) pj_xml_add_attr( pj_xml_node *node, pj_xml_attr *attr )
+{
+    pj_list_push_back(&node->attr_head, attr);
+}
+
+PJ_DEF(pj_xml_node*) pj_xml_find_node(pj_xml_node *parent, const pj_str_t *name)
+{
+    pj_xml_node *node = parent->node_head.next;
+
+    PJ_CHECK_STACK();
+
+    while (node != (void*)&parent->node_head) {
+	if (pj_stricmp(&node->name, name) == 0)
+	    return node;
+	node = node->next;
+    }
+    return NULL;
+}
+
+
+PJ_DEF(pj_xml_node*) pj_xml_find_next_node( pj_xml_node *parent, pj_xml_node *node,
+					    const pj_str_t *name)
+{
+    PJ_CHECK_STACK();
+
+    node = node->next;
+    while (node != (void*)&parent->node_head) {
+	if (pj_stricmp(&node->name, name) == 0)
+	    return node;
+	node = node->next;
+    }
+    return NULL;
+}
+
+
+PJ_DEF(pj_xml_attr*) pj_xml_find_attr( pj_xml_node *node, const pj_str_t *name,
+				       const pj_str_t *value)
+{
+    pj_xml_attr *attr = node->attr_head.next;
+    while (attr != (void*)&node->attr_head) {
+	if (pj_stricmp(&attr->name, name)==0) {
+	    if (value) {
+		if (pj_stricmp(&attr->value, value)==0)
+		    return attr;
+	    } else {
+		return attr;
+	    }
+	}
+	attr = attr->next;
+    }
+    return NULL;
+}
+
+
+
+PJ_DEF(pj_xml_node*) pj_xml_find( pj_xml_node *parent, const pj_str_t *name,
+				  const void *data, 
+				  pj_bool_t (*match)(pj_xml_node *, const void*))
+{
+    pj_xml_node *head = (void*)&parent->node_head, *node = head->next;
+
+    while (node != (void*)head) {
+	if (name && pj_stricmp(&node->name, name)==0) {
+	    if (match) {
+		if (match(node, data))
+		    return node;
+	    } else {
+		return node;
+	    }
+	}
+	node = node->next;
+    }
+    return NULL;
+}
+
+
+PJ_DEF(pj_xml_node*) pj_xml_clone( pj_pool_t *pool, const pj_xml_node *rhs)
+{
+    pj_xml_node *node;
+    const pj_xml_attr *r_attr;
+    const pj_xml_node *child;
+
+    node = alloc_node(pool);
+
+    pj_strdup(pool, &node->name, &rhs->name);
+    pj_strdup(pool, &node->content, &rhs->content);
+
+    /* Clone all attributes */
+    r_attr = rhs->attr_head.next;
+    while (r_attr != &rhs->attr_head) {
+
+	pj_xml_attr *attr;
+
+	attr = alloc_attr(pool);
+	pj_strdup(pool, &attr->name, &r_attr->name);
+	pj_strdup(pool, &attr->value, &r_attr->value);
+
+	pj_list_push_back(&node->attr_head, attr);
+
+	r_attr = r_attr->next;
+    }
+
+    /* Clone all child nodes. */
+    child = rhs->node_head.next;
+    while (child != (pj_xml_node*) &rhs->node_head) {
+	pj_xml_node *new_child;
+
+	new_child = pj_xml_clone(pool, child);
+	pj_list_push_back(&node->node_head, new_child);
+
+	child = child->next;
+    }
+
+    return node;
+}
Index: /pjproject/branches/split-3rd-party/pjlib/build/Makefile
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/Makefile	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/Makefile	(revision 1163)
@@ -0,0 +1,107 @@
+include ../../build/common.mak
+
+RULES_MAK := ../../build/rules.mak
+
+
+export PJLIB_LIB := ../lib/libpj-$(TARGET_NAME)$(LIBEXT)
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC)../include
+export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
+		   $(HOST_CXXFLAGS) $(CXXFLAGS)
+export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \
+		   $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
+		   $(LDFLAGS) 
+
+###############################################################################
+# Defines for building PJLIB library
+#
+export PJLIB_SRCDIR = ../src/pj
+export PJLIB_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+	array.o config.o ctype.o errno.o except.o fifobuf.o guid.o \
+	hash.o ip_helper_generic.o list.o lock.o log.o os_time_common.o \
+	pool.o pool_buf.o pool_caching.o pool_dbg.o rand.o \
+	rbtree.o string.o timer.o \
+	types.o symbols.o
+export PJLIB_CFLAGS += $(_CFLAGS)
+
+###############################################################################
+# Defines for building test application
+#
+export TEST_SRCDIR = ../src/pjlib-test
+export TEST_OBJS += atomic.o echo_clt.o errno.o exception.o \
+		    fifobuf.o file.o ioq_perf.o ioq_udp.o ioq_unreg.o \
+		    ioq_tcp.o \
+		    list.o mutex.o os.o pool.o pool_perf.o rand.o rbtree.o \
+		    select.o sleep.o sock.o sock_perf.o \
+		    string.o test.o thread.o timer.o timestamp.o \
+		    udp_echo_srv_sync.o udp_echo_srv_ioqueue.o \
+		    util.o
+export TEST_CFLAGS += $(_CFLAGS)
+export TEST_LDFLAGS += $(_LDFLAGS)
+export TEST_EXE := ../bin/pjlib-test-$(TARGET_NAME)$(HOST_EXE)
+
+	
+export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
+###############################################################################
+# Main entry
+#
+# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
+#
+
+all: $(TARGETS)
+
+doc:
+	cd .. && doxygen docs/doxygen.cfg
+
+print:
+	$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib print_lib
+	$(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test print_bin
+	
+depend: ../include/pj/config_site.h
+	$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib depend
+	$(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test depend
+	echo '$(TEST_EXE): $(PJLIB_LIB)' >> .pjlib-test-$(TARGET_NAME).depend
+
+
+.PHONY: dep depend pjlib pjlib-test clean realclean distclean
+
+dep: depend
+
+pjlib: ../include/pj/config_site.h
+	$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib $(PJLIB_LIB)
+
+../include/pj/config_site.h:
+	touch ../include/pj/config_site.h
+	
+pjlib-test: 
+	$(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test $(TEST_EXE)
+
+.PHONY: ../lib/pjlib.ko
+../lib/pjlib.ko:
+	echo Making $@
+	$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib $@
+
+.PHONY: ../lib/pjlib-test.ko
+../lib/pjlib-test.ko:
+	$(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test $@
+
+clean:
+	$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib clean
+	$(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test clean
+
+realclean:
+	$(subst @@,$(subst /,$(HOST_PSEP),.pjlib-$(TARGET_NAME).depend),$(HOST_RMR))
+	$(subst @@,$(subst /,$(HOST_PSEP),.pjlib-test-$(TARGET_NAME).depend),$(HOST_RMR))
+	$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib realclean
+	$(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test realclean
+
+distclean: realclean
+
+gcov-report:
+	$(MAKE) -f $(RULES_MAK) APP=PJLIB app=pjlib gcov-report
+	$(MAKE) -f $(RULES_MAK) APP=TEST app=pjlib-test gcov-report
+
Index: /pjproject/branches/split-3rd-party/pjlib/build/os-auto.mak.in
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/os-auto.mak.in	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/os-auto.mak.in	(revision 1163)
@@ -0,0 +1,35 @@
+# @configure_input@
+
+# Determine OS specific files
+AC_OS_OBJS=@ac_os_objs@
+
+#
+# PJLIB_OBJS specified here are object files to be included in PJLIB
+# (the library) for this specific operating system. Object files common 
+# to all operating systems should go in Makefile instead.
+#
+export PJLIB_OBJS +=	$(AC_OS_OBJS) \
+			addr_resolv_sock.o \
+			log_writer_stdout.o \
+			os_timestamp_common.o \
+			pool_policy_malloc.o sock_bsd.o sock_select.o
+
+#
+# TEST_OBJS are operating system specific object files to be included in
+# the test application.
+#
+export TEST_OBJS +=	@ac_main_obj@
+
+#
+# Additional LDFLAGS for pjlib-test
+#
+export TEST_LDFLAGS += @LDFLAGS@ @LIBS@
+
+#
+# TARGETS are make targets in the Makefile, to be executed for this given
+# operating system.
+#
+export TARGETS	    =	pjlib pjlib-test
+
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/build/os-darwinos.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/os-darwinos.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/os-darwinos.mak	(revision 1163)
@@ -0,0 +1,37 @@
+#
+# PJLIB OS specific configuration for Darwin/MacOSX target. 
+#
+
+#
+# PJLIB_OBJS specified here are object files to be included in PJLIB
+# (the library) for this specific operating system. Object files common 
+# to all operating systems should go in Makefile instead.
+#
+export PJLIB_OBJS += 	addr_resolv_sock.o guid_simple.o \
+			log_writer_stdout.o os_core_unix.o \
+			os_error_unix.o os_time_unix.o \
+			os_timestamp_common.o os_timestamp_posix.o \
+			pool_policy_malloc.o sock_bsd.o sock_select.o
+
+export PJLIB_OBJS += ioqueue_select.o 
+#export PJLIB_OBJS += ioqueue_epoll.o
+
+export PJLIB_OBJS += file_access_unistd.o file_io_ansi.o
+
+#
+# TEST_OBJS are operating system specific object files to be included in
+# the test application.
+#
+export TEST_OBJS +=	main.o
+
+#
+# Additional LDFLAGS for pjlib-test
+#
+export TEST_LDFLAGS += -lm 
+
+#
+# TARGETS are make targets in the Makefile, to be executed for this given
+# operating system.
+#
+export TARGETS	    =	pjlib pjlib-test
+
Index: /pjproject/branches/split-3rd-party/pjlib/build/os-linux-kernel.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/os-linux-kernel.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/os-linux-kernel.mak	(revision 1163)
@@ -0,0 +1,47 @@
+#
+# OS specific configuration for Linux Kernel module target. 
+#
+
+#
+# PJLIB_OBJS specified here are object files to be included in PJLIB
+# (the library) for this specific operating system. Object files common 
+# to all operating systems should go in Makefile instead.
+#
+export PJLIB_OBJS +=	compat/sigjmp.o compat/setjmp_i386.o \
+			compat/longjmp_i386.o compat/string.o \
+			addr_resolv_linux_kernel.o \
+			guid_simple.o \
+			log_writer_printk.o pool_policy_kmalloc.o \
+			os_error_linux_kernel.o os_core_linux_kernel.o \
+			os_time_linux_kernel.o os_timestamp_common.o \
+			os_timestamp_linux_kernel.o \
+			sock_linux_kernel.o sock_select.o
+
+# For IOQueue, we can use either epoll or select
+export PJLIB_OBJS +=	ioqueue_epoll.o 
+#export PJLIB_OBJS +=	ioqueue_select.o 
+
+#
+# TEST_OBJS are operating system specific object files to be included in
+# the test application.
+#
+export TEST_OBJS +=	main_mod.o
+
+#
+# Additional CFLAGS
+#
+export TEST_CFLAGS += -msoft-float
+
+#
+# Additional LD_FLAGS for this target.
+#
+export TEST_LDFLAGS += -lgcc
+
+
+#
+# TARGETS are make targets in the Makefile, to be executed for this given
+# operating system.
+#
+export TARGETS :=	../lib/pjlib.ko ../lib/pjlib-test.ko
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/build/os-linux.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/os-linux.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/os-linux.mak	(revision 1163)
@@ -0,0 +1,39 @@
+#
+# OS specific configuration for Linux OS target. 
+#
+
+#
+# PJLIB_OBJS specified here are object files to be included in PJLIB
+# (the library) for this specific operating system. Object files common 
+# to all operating systems should go in Makefile instead.
+#
+export PJLIB_OBJS += 	addr_resolv_sock.o file_access_unistd.o \
+			file_io_ansi.o guid_simple.o \
+			log_writer_stdout.o os_core_unix.o \
+			os_error_unix.o os_time_unix.o \
+			os_timestamp_common.o os_timestamp_posix.o \
+			pool_policy_malloc.o sock_bsd.o sock_select.o
+
+ifeq (epoll,$(LINUX_POLL))
+export PJLIB_OBJS += ioqueue_epoll.o
+else
+export PJLIB_OBJS += ioqueue_select.o 
+endif
+
+#
+# TEST_OBJS are operating system specific object files to be included in
+# the test application.
+#
+export TEST_OBJS +=	main.o
+
+#
+# Additional LDFLAGS for pjlib-test
+#
+export TEST_LDFLAGS += -lm
+
+#
+# TARGETS are make targets in the Makefile, to be executed for this given
+# operating system.
+#
+export TARGETS	    =	pjlib pjlib-test
+
Index: /pjproject/branches/split-3rd-party/pjlib/build/os-rtems.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/os-rtems.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/os-rtems.mak	(revision 1163)
@@ -0,0 +1,46 @@
+#
+# PJLIB OS specific configuration for RTEMS
+#
+# Thanks Zetron, Inc. and Phil Torre <ptorre@zetron.com> for donating PJLIB
+# port to RTEMS.
+#
+
+#
+# PJLIB_OBJS specified here are object files to be included in PJLIB
+# (the library) for this specific operating system. Object files common 
+# to all operating systems should go in Makefile instead.
+#
+export PJLIB_OBJS += 	addr_resolv_sock.o guid_simple.o \
+			log_writer_stdout.o os_core_unix.o \
+			os_error_unix.o os_time_unix.o \
+			os_timestamp_common.o os_timestamp_posix.o \
+			pool_policy_malloc.o sock_bsd.o sock_select.o
+
+export PJLIB_OBJS += ioqueue_select.o 
+export PJLIB_OBJS += file_access_unistd.o file_io_ansi.o
+
+#
+# TEST_OBJS are operating system specific object files to be included in
+# the test application.
+#
+export TEST_OBJS +=	main_rtems.o
+
+#
+# RTEMS_LIBRARY_PATH points to the installed RTEMS libraries for the
+# desired target.  pjlib-test can't link without this.
+#
+export RTEMS_LIBRARY_PATH := $(RTEMS_LIBRARY_PATH)
+
+#
+# Additional LDFLAGS for pjlib-test
+#
+export TEST_LDFLAGS += 
+
+#
+# TARGETS are make targets in the Makefile, to be executed for this given
+# operating system.
+#
+export TARGETS	    =	pjlib pjlib-test
+
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/build/os-sunos.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/os-sunos.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/os-sunos.mak	(revision 1163)
@@ -0,0 +1,36 @@
+#
+# PJLIB OS specific configuration for SunOS target. 
+#
+
+#
+# PJLIB_OBJS specified here are object files to be included in PJLIB
+# (the library) for this specific operating system. Object files common 
+# to all operating systems should go in Makefile instead.
+#
+export PJLIB_OBJS += 	addr_resolv_sock.o file_access_unistd.o \
+			file_io_ansi.o guid_simple.o \
+			log_writer_stdout.o os_core_unix.o \
+			os_error_unix.o os_time_unix.o \
+			os_timestamp_common.o os_timestamp_posix.o \
+			pool_policy_malloc.o sock_bsd.o sock_select.o
+
+export PJLIB_OBJS += ioqueue_select.o 
+#export PJLIB_OBJS += ioqueue_epoll.o
+
+#
+# TEST_OBJS are operating system specific object files to be included in
+# the test application.
+#
+export TEST_OBJS +=	main.o
+
+#
+# Additional LDFLAGS for pjlib-test
+#
+export TEST_LDFLAGS += -lm
+
+#
+# TARGETS are make targets in the Makefile, to be executed for this given
+# operating system.
+#
+export TARGETS	    =	pjlib pjlib-test
+
Index: /pjproject/branches/split-3rd-party/pjlib/build/os-win32.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/os-win32.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/os-win32.mak	(revision 1163)
@@ -0,0 +1,33 @@
+#
+# OS specific configuration for Win32 OS target. 
+#
+
+#
+# PJLIB_OBJS specified here are object files to be included in PJLIB
+# (the library) for this specific operating system. Object files common 
+# to all operating systems should go in Makefile instead.
+#
+export PJLIB_OBJS += 	addr_resolv_sock.o guid_win32.o  \
+			log_writer_stdout.o os_core_win32.o \
+			os_error_win32.o os_time_bsd.o os_timestamp_common.o \
+			os_timestamp_win32.o \
+			pool_policy_malloc.o sock_bsd.o sock_select.o
+
+export PJLIB_OBJS +=	ioqueue_winnt.o
+#export PJLIB_OBJS +=	ioqueue_select.o
+
+export PJLIB_OBJS +=	file_io_win32.o file_access_win32.o
+#export PJLIB_OBJS +=	file_io_ansi.o
+
+#
+# TEST_OBJS are operating system specific object files to be included in
+# the test application.
+#
+export TEST_OBJS +=	main.o
+
+#
+# TARGETS are make targets in the Makefile, to be executed for this given
+# operating system.
+#
+export TARGETS	    =	pjlib pjlib-test
+
Index: /pjproject/branches/split-3rd-party/pjlib/build/pjlib++-test.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/pjlib++-test.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/pjlib++-test.dsp	(revision 1163)
@@ -0,0 +1,102 @@
+# Microsoft Developer Studio Project File - Name="pjlib++_test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=pjlib++_test - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib++-test.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib++-test.mak" CFG="pjlib++_test - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjlib++_test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "pjlib++_test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjlib++_test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib++-test-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir "./output/pjlib++-test-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib++-test-i386-win32-vc6-release"
+# PROP Intermediate_Dir "./output/pjlib++-test-i386-win32-vc6-release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../include" /I "../../pjlib-util/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D PJ_WIN32=1 /D PJ_M_I386=1 /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../bin/pjlib++-test-i386-win32-vc6-release.exe"
+
+!ELSEIF  "$(CFG)" == "pjlib++_test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib++-test-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir "./output/pjlib++-test-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib++-test-i386-win32-vc6-debug"
+# PROP Intermediate_Dir "./output/pjlib++-test-i386-win32-vc6-debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib-util/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../bin/pjlib++-test-i386-win32-vc6-debug.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjlib++_test - Win32 Release"
+# Name "pjlib++_test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\src\pjlib++-test\main.cpp"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjlib/build/pjlib++.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/pjlib++.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/pjlib++.dsp	(revision 1163)
@@ -0,0 +1,146 @@
+# Microsoft Developer Studio Project File - Name="pjlib++" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=pjlib++ - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib++.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib++.mak" CFG="pjlib++ - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjlib++ - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "pjlib++ - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjlib++ - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\output\pjlib++-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir ".\output\pjlib++-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\output\pjlib++-i386-win32-vc6-release"
+# PROP Intermediate_Dir ".\output\pjlib++-i386-win32-vc6-release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../include" /I "../../pjlib-util/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjlib++-i386-win32-vc6-release.lib"
+
+!ELSEIF  "$(CFG)" == "pjlib++ - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\output\pjlib++-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir ".\output\pjlib++-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\output\pjlib++-i386-win32-vc6-debug"
+# PROP Intermediate_Dir ".\output\pjlib++-i386-win32-vc6-debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib-util/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjlib++-i386-win32-vc6-debug.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjlib++ - Win32 Release"
+# Name "pjlib++ - Win32 Debug"
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\include\pj++\file.hpp"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pj++\hash.hpp"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pj++\list.hpp"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pj++\lock.hpp"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pj++\os.hpp"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjlib++.hpp"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pj++\pool.hpp"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pj++\proactor.hpp"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pj++\scanner.hpp"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pj++\sock.hpp"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pj++\string.hpp"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pj++\timer.hpp"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pj++\tree.hpp"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pj++\types.hpp"
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjlib/build/pjlib.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/pjlib.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/pjlib.dsp	(revision 1163)
@@ -0,0 +1,614 @@
+# Microsoft Developer Studio Project File - Name="pjlib" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=pjlib - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib.mak" CFG="pjlib - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjlib - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "pjlib - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjlib - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\output\pjlib-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir ".\output\pjlib-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\output\pjlib-i386-win32-vc6-release"
+# PROP Intermediate_Dir ".\output\pjlib-i386-win32-vc6-release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /Zi /O2 /Ob2 /I "../include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "PJ_WIN32" /D "PJ_M_I386" /FR /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjlib-i386-win32-vc6-release.lib"
+
+!ELSEIF  "$(CFG)" == "pjlib - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\output\pjlib-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir ".\output\pjlib-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\output\pjlib-i386-win32-vc6-debug"
+# PROP Intermediate_Dir ".\output\pjlib-i386-win32-vc6-debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "PJ_WIN32" /D "PJ_M_I386" /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjlib-i386-win32-vc6-debug.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjlib - Win32 Release"
+# Name "pjlib - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Group "Other Targets"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\src\pj\addr_resolv_linux_kernel.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\guid_simple.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\ioqueue_dummy.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\ioqueue_epoll.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\ip_helper_generic.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\log_writer_printk.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\os_core_linux_kernel.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\os_core_unix.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\os_error_linux_kernel.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\os_error_unix.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\os_time_linux_kernel.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\os_timestamp_linux.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\os_timestamp_linux_kernel.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\pool_policy_kmalloc.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\sock_linux_kernel.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\symbols.c
+# PROP Exclude_From_Build 1
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\src\pj\addr_resolv_sock.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\array.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\config.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\ctype.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\errno.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\except.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\fifobuf.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\file_access_win32.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\file_io_ansi.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\file_io_win32.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\guid.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\guid_win32.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\hash.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\ioqueue_common_abs.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\ioqueue_common_abs.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\ioqueue_select.c
+
+!IF  "$(CFG)" == "pjlib - Win32 Release"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF  "$(CFG)" == "pjlib - Win32 Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\ioqueue_winnt.c
+
+!IF  "$(CFG)" == "pjlib - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "pjlib - Win32 Debug"
+
+# PROP Exclude_From_Build 1
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\ip_helper_win32.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\list.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\lock.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\log.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\log_writer_stdout.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\os_core_win32.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\os_error_win32.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\os_time_win32.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\os_timestamp_common.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\os_timestamp_win32.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\pool.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\pool_buf.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\pool_caching.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\pool_dbg.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\pool_policy_malloc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\rand.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\rbtree.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\sock_bsd.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\sock_select.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\string.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\timer.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\types.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pj\unicode_win32.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Group "compat"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\include\pj\compat\assert.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\cc_gcc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\cc_msvc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\ctype.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\errno.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\high_precision.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\m_alpha.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\m_i386.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\m_m68k.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\m_sparc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\malloc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\os_linux.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\os_linux_kernel.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\os_palmos.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\os_sunos.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\os_win32.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\rand.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\setjmp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\size_t.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\socket.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\stdarg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\stdfileio.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\string.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\time.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\compat\vsprintf.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\include\pj\addr_resolv.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\array.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\assert.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\config.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\config_site.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\config_site_sample.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\ctype.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\doxygen.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\equeue.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\errno.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\except.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\fifobuf.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\file_access.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\file_io.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\guid.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\hash.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\ioqueue.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\ip_helper.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\list.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\lock.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\log.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\os.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjlib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\pool.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\pool_alt.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\pool_buf.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\rand.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\rbtree.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\sock.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\sock_select.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\string.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\timer.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\types.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\unicode.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\include\pj\list_i.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\pool_i.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pj\string_i.h
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjlib/build/pjlib.dsw
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/pjlib.dsw	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/pjlib.dsw	(revision 1163)
@@ -0,0 +1,89 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "pjlib"=.\pjlib.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib++"=".\pjlib++.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib++_test"=".\pjlib++-test.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib++
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "pjlib_samples"=.\pjlib_samples.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "pjlib_test"=.\pjlib_test.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
Index: /pjproject/branches/split-3rd-party/pjlib/build/pjlib.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/pjlib.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/pjlib.vcproj	(revision 1163)
@@ -0,0 +1,1677 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjlib"
+	ProjectGUID="{5D0985B4-DAA1-42DB-BDB6-30C2409EAE14}"
+	RootNamespace="pjlib"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\output\pjlib-i386-win32-vc8-debug"
+			IntermediateDirectory=".\output\pjlib-i386-win32-vc8-debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="_DEBUG;WIN32;_LIB;PJ_WIN32;PJ_M_I386"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\output\pjlib-i386-win32-vc8-debug/pjlib.pch"
+				AssemblerListingLocation=".\output\pjlib-i386-win32-vc8-debug/"
+				ObjectFile=".\output\pjlib-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName=".\output\pjlib-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib/pjlib-i386-win32-vc8-debug.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjlib-i386-win32-vc8-debug/pjlib.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\output\pjlib-i386-win32-vc8-release"
+			IntermediateDirectory=".\output\pjlib-i386-win32-vc8-release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="NDEBUG;WIN32;_LIB;PJ_WIN32;PJ_M_I386"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile=".\output\pjlib-i386-win32-vc8-release/pjlib.pch"
+				AssemblerListingLocation=".\output\pjlib-i386-win32-vc8-release/"
+				ObjectFile=".\output\pjlib-i386-win32-vc8-release/"
+				ProgramDataBaseFileName=".\output\pjlib-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib/pjlib-i386-win32-vc8-release.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjlib-i386-win32-vc8-release/pjlib.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\pj\addr_resolv_sock.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\array.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\config.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\ctype.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\errno.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\except.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\fifobuf.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\file_access_win32.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\file_io_ansi.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\file_io_win32.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\guid.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\guid_win32.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\hash.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\ioqueue_common_abs.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\ioqueue_common_abs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pj\ioqueue_select.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\ioqueue_winnt.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\ip_helper_win32.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pj\list.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\lock.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\log.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\log_writer_stdout.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\os_core_win32.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\os_error_win32.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\os_time_win32.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\os_timestamp_common.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\os_timestamp_win32.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\pool.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\pool_buf.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\pool_caching.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\pool_dbg.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\pool_policy_malloc.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\rand.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\rbtree.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\sock_bsd.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\sock_select.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\string.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\timer.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\types.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pj\unicode_win32.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<Filter
+				Name="Other Targets"
+				>
+				<File
+					RelativePath="..\src\pj\addr_resolv_linux_kernel.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\guid_simple.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\ioqueue_dummy.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\ioqueue_epoll.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\ip_helper_generic.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\log_writer_printk.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\os_core_linux_kernel.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\os_core_unix.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\os_error_linux_kernel.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\os_error_unix.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\os_time_linux_kernel.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\os_timestamp_linux.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\os_timestamp_linux_kernel.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\pool_policy_kmalloc.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\sock_linux_kernel.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pj\symbols.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\include\pj\addr_resolv.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\array.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\assert.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\config_site.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\config_site_sample.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\ctype.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\doxygen.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\equeue.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\errno.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\except.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\fifobuf.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\file_access.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\file_io.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\guid.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\hash.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\ioqueue.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\ip_helper.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\list.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\lock.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\log.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\os.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjlib.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\pool.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\pool_alt.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\pool_buf.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\rand.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\rbtree.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\sock.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\sock_select.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\string.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\timer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\types.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\unicode.h"
+				>
+			</File>
+			<Filter
+				Name="compat"
+				>
+				<File
+					RelativePath="..\include\pj\compat\assert.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\cc_gcc.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\cc_msvc.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\ctype.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\errno.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\high_precision.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\m_alpha.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\m_i386.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\m_m68k.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\m_sparc.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\malloc.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\os_linux.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\os_linux_kernel.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\os_palmos.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\os_sunos.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\os_win32.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\rand.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\setjmp.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\size_t.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\socket.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\stdarg.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\stdfileio.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\string.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\time.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pj\compat\vsprintf.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Inline Files"
+			>
+			<File
+				RelativePath="..\include\pj\list_i.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\pool_i.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pj\string_i.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjlib/build/pjlib_samples.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/pjlib_samples.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/pjlib_samples.dsp	(revision 1163)
@@ -0,0 +1,113 @@
+# Microsoft Developer Studio Project File - Name="pjlib_samples" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) External Target" 0x0106
+
+CFG=pjlib_samples - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib_samples.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib_samples.mak" CFG="pjlib_samples - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjlib_samples - Win32 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "pjlib_samples - Win32 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+
+!IF  "$(CFG)" == "pjlib_samples - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib-samples-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir "./output/pjlib-samples-i386-win32-vc6-release"
+# PROP BASE Cmd_Line "NMAKE /f pjlib_samples.mak"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "pjlib_samples.exe"
+# PROP BASE Bsc_Name "pjlib_samples.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib-samples-i386-win32-vc6-release"
+# PROP Intermediate_Dir "./output/pjlib-samples-i386-win32-vc6-release"
+# PROP Cmd_Line "nmake /f "pjlib_samples.mak" MODE=release"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "pjlib samples"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF  "$(CFG)" == "pjlib_samples - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib-samples-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir "./output/pjlib-samples-i386-win32-vc6-debug"
+# PROP BASE Cmd_Line "NMAKE /f pjlib_samples.mak"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "pjlib_samples.exe"
+# PROP BASE Bsc_Name "pjlib_samples.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib-samples-i386-win32-vc6-debug"
+# PROP Intermediate_Dir "./output/pjlib-samples-i386-win32-vc6-debug"
+# PROP Cmd_Line "nmake /nologo /f "pjlib_samples.mak" MODE=debug"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "pjlib samples"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjlib_samples - Win32 Release"
+# Name "pjlib_samples - Win32 Debug"
+
+!IF  "$(CFG)" == "pjlib_samples - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "pjlib_samples - Win32 Debug"
+
+!ENDIF 
+
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\src\pjlib-samples\except.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-samples\list.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-samples\log.c"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\pjlib_samples.mak
+# End Source File
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjlib/build/pjlib_samples.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/pjlib_samples.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/pjlib_samples.mak	(revision 1163)
@@ -0,0 +1,36 @@
+
+OUTDIR=.\output\pjlib-samples-i386-win32-$(VC)-$(MODE)
+
+SRCDIR=../src/pjlib-samples
+
+SAMPLES=$(OUTDIR)/except.exe \
+	    $(OUTDIR)/log.exe \
+		$(OUTDIR)/list.exe \
+
+!IF "$(MODE)" == "debug"
+MODE_CFLAGS=/MTd
+!ELSE
+MODE_CFLAGS=/MT
+!ENDIF
+
+CFLAGS=/nologo /W4 $(MODE_CFLAGS) /DPJ_WIN32=1 /DPJ_M_I386=1 /I../include
+
+PJLIB=../lib/pjlib-i386-win32-$(VC)-$(MODE).lib
+
+DEPEND=$(PJLIB)
+LIBS=netapi32.lib mswsock.lib ws2_32.lib ole32.lib advapi32.lib
+CL=cl.exe
+
+all: "$(OUTDIR)" $(SAMPLES)
+
+$(SAMPLES): "$(SRCDIR)/$(@B).c" $(DEPEND)
+		$(CL) /Fe$@ \
+		/Fo$(@R).obj \
+		$(CFLAGS) \
+		$** $(LIBS)
+
+"$(OUTDIR)" :
+		@IF NOT EXIST "$(OUTDIR)" MKDIR "$(OUTDIR)"
+
+clean :
+		@IF EXIST "$(OUTDIR)" DEL /Q "$(OUTDIR)\*.*" && RMDIR "$(OUTDIR)"
Index: /pjproject/branches/split-3rd-party/pjlib/build/pjlib_test.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/pjlib_test.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/pjlib_test.dsp	(revision 1163)
@@ -0,0 +1,232 @@
+# Microsoft Developer Studio Project File - Name="pjlib_test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=pjlib_test - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib_test.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib_test.mak" CFG="pjlib_test - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjlib_test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "pjlib_test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjlib_test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\output\pjlib-test-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir ".\output\pjlib-test-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\output\pjlib-test-i386-win32-vc6-release"
+# PROP Intermediate_Dir ".\output\pjlib-test-i386-win32-vc6-release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /GX /Zi /O2 /I "../include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "PJ_WIN32" /D "PJ_M_I386" /FR /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /profile /debug /machine:I386 /out:"../bin/pjlib-test-i386-win32-vc6-release.exe"
+
+!ELSEIF  "$(CFG)" == "pjlib_test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\output\pjlib-test-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir ".\output\pjlib-test-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\output\pjlib-test-i386-win32-vc6-debug"
+# PROP Intermediate_Dir ".\output\pjlib-test-i386-win32-vc6-debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "PJ_WIN32" /D "PJ_M_I386" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../bin/pjlib-test-i386-win32-vc6-debug.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjlib_test - Win32 Release"
+# Name "pjlib_test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\atomic.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\echo_clt.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\errno.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\exception.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\fifobuf.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\file.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\ioq_perf.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\ioq_tcp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\ioq_udp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\ioq_unreg.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\list.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\main.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\main_mod.c"
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\main_win32.c"
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\mutex.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\os.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\pool.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\pool_perf.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\rand.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\rbtree.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\select.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\sleep.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\sock.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\sock_perf.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\string.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\thread.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\timer.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\timestamp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\udp_echo_srv_ioqueue.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\udp_echo_srv_sync.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\util.c"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\src\pjlib-test\test.h"
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjlib/build/pjlib_test.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/pjlib_test.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/pjlib_test.vcproj	(revision 1163)
@@ -0,0 +1,936 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjlib_test"
+	ProjectGUID="{6AC3EF61-5A9E-4F43-A809-5B2FD1A43B16}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\output\pjlib-test-i386-win32-vc8-debug"
+			IntermediateDirectory=".\output\pjlib-test-i386-win32-vc8-debug"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\output\pjlib-test-i386-win32-vc8-debug/pjlib_test.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;PJ_WIN32;PJ_M_I386"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\output\pjlib-test-i386-win32-vc8-debug/pjlib_test.pch"
+				AssemblerListingLocation=".\output\pjlib-test-i386-win32-vc8-debug/"
+				ObjectFile=".\output\pjlib-test-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName=".\output\pjlib-test-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="netapi32.lib mswsock.lib ws2_32.lib odbc32.lib odbccp32.lib oleaut32.lib ole32.lib"
+				OutputFile="../bin/pjlib-test-i386-win32-vc8-debug.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\output\pjlib-test-i386-win32-vc8-debug/pjlib-test-i386-win32-vc8-debug.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjlib-test-i386-win32-vc8-debug/pjlib_test.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\output\pjlib-test-i386-win32-vc8-release"
+			IntermediateDirectory=".\output\pjlib-test-i386-win32-vc8-release"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\output\pjlib-test-i386-win32-vc8-release/pjlib_test.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include"
+				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;PJ_WIN32;PJ_M_I386"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile=".\output\pjlib-test-i386-win32-vc8-release/pjlib_test.pch"
+				AssemblerListingLocation=".\output\pjlib-test-i386-win32-vc8-release/"
+				ObjectFile=".\output\pjlib-test-i386-win32-vc8-release/"
+				ProgramDataBaseFileName=".\output\pjlib-test-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="netapi32.lib mswsock.lib ws2_32.lib odbc32.lib odbccp32.lib oleaut32.lib ole32.lib"
+				OutputFile="../bin/pjlib-test-i386-win32-vc8-release.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjlib-test-i386-win32-vc8-release/pjlib_test.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\pjlib-test\atomic.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\echo_clt.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\errno.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\exception.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\fifobuf.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\file.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\ioq_perf.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\ioq_tcp.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\ioq_udp.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\ioq_unreg.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\list.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\main.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\main_mod.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\main_win32.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\mutex.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\os.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\pool.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\pool_perf.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\rand.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\rbtree.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\select.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\sleep.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\sock.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\sock_perf.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\string.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\test.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\thread.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\timer.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\timestamp.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\udp_echo_srv_ioqueue.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\udp_echo_srv_sync.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjlib-test\util.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\src\pjlib-test\test.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjlib/build/wince-evc4/pjlib_test_wince.vcp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/wince-evc4/pjlib_test_wince.vcp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/wince-evc4/pjlib_test_wince.vcp	(revision 1163)
@@ -0,0 +1,37783 @@
+# Microsoft eMbedded Visual Tools Project File - Name="pjlib_test_wince" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE MIPSIV_FP) Application" 0x9201
+# TARGTYPE "Win32 (WCE x86) Application" 0x8301
+# TARGTYPE "Win32 (WCE ARMV4) Application" 0xa301
+# TARGTYPE "Win32 (WCE MIPS16) Application" 0x8901
+# TARGTYPE "Win32 (WCE SH3) Application" 0x8101
+# TARGTYPE "Win32 (WCE ARMV4I) Application" 0xa501
+# TARGTYPE "Win32 (WCE SH4) Application" 0x8601
+# TARGTYPE "Win32 (WCE MIPSII_FP) Application" 0xa201
+# TARGTYPE "Win32 (WCE emulator) Application" 0xa601
+# TARGTYPE "Win32 (WCE MIPSIV) Application" 0x9601
+# TARGTYPE "Win32 (WCE ARMV4T) Application" 0xa401
+# TARGTYPE "Win32 (WCE MIPSII) Application" 0xa101
+
+CFG=pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib_test_wince.vcn".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib_test_wince.vcn" CFG="pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release" (based on "Win32 (WCE MIPSII_FP) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug" (based on "Win32 (WCE MIPSII_FP) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE MIPSII) Release" (based on "Win32 (WCE MIPSII) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE MIPSII) Debug" (based on "Win32 (WCE MIPSII) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE SH4) Release" (based on "Win32 (WCE SH4) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE SH4) Debug" (based on "Win32 (WCE SH4) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE SH3) Release" (based on "Win32 (WCE SH3) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE SH3) Debug" (based on "Win32 (WCE SH3) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE MIPSIV) Release" (based on "Win32 (WCE MIPSIV) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE MIPSIV) Debug" (based on "Win32 (WCE MIPSIV) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE emulator) Release" (based on "Win32 (WCE emulator) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE emulator) Debug" (based on "Win32 (WCE emulator) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE ARMV4I) Release" (based on "Win32 (WCE ARMV4I) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE ARMV4I) Debug" (based on "Win32 (WCE ARMV4I) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release" (based on "Win32 (WCE MIPSIV_FP) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug" (based on "Win32 (WCE MIPSIV_FP) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE MIPS16) Release" (based on "Win32 (WCE MIPS16) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE MIPS16) Debug" (based on "Win32 (WCE MIPS16) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE ARMV4T) Release" (based on "Win32 (WCE ARMV4T) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE ARMV4T) Debug" (based on "Win32 (WCE ARMV4T) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Application")
+!MESSAGE "pjlib_test_wince - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project 2
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_test_MIPSII_FPRel"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_MIPSII_FPRel"
+# PROP BASE CPU_ID "{D8AC856C-B213-4895-9E83-9EC51A55201E}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_test_MIPSII_FPRel"
+# PROP Intermediate_Dir "./output/pjlib_test_MIPSII_FPRel"
+# PROP CPU_ID "{D8AC856C-B213-4895-9E83-9EC51A55201E}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /d "R4000" /d "MIPSII" /d "MIPSII_FP" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /d "R4000" /d "MIPSII" /d "MIPSII_FP" /r
+CPP=clmips.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D "R4000" /D "MIPSII" /D "MIPSII_FP" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /QMmips2 /QMFPE- /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /D "MIPS" /D "_MIPS_" /D "R4000" /D "MIPSII" /D "MIPSII_FP" /D "NDEBUG" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QMmips2 /QMFPE- /O2 /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_test_MIPSII_FPDbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_MIPSII_FPDbg"
+# PROP BASE CPU_ID "{D8AC856C-B213-4895-9E83-9EC51A55201E}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_test_MIPSII_FPDbg"
+# PROP Intermediate_Dir "./output/pjlib_test_MIPSII_FPDbg"
+# PROP CPU_ID "{D8AC856C-B213-4895-9E83-9EC51A55201E}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /d "R4000" /d "MIPSII" /d "MIPSII_FP" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /d "R4000" /d "MIPSII" /d "MIPSII_FP" /r
+CPP=clmips.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "MIPS" /D "_MIPS_" /D "R4000" /D "MIPSII" /D "MIPSII_FP" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QMmips2 /QMFPE- /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D "R4000" /D "MIPSII" /D "MIPSII_FP" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QMmips2 /QMFPE- /M$(CECrtMTDebug) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_test_MIPSIIRel"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_MIPSIIRel"
+# PROP BASE CPU_ID "{689DDC64-9D9D-11D5-96F8-00207802C01C}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_test_MIPSIIRel"
+# PROP Intermediate_Dir "./output/pjlib_test_MIPSIIRel"
+# PROP CPU_ID "{689DDC64-9D9D-11D5-96F8-00207802C01C}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /d "R4000" /d "MIPSII" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /d "R4000" /d "MIPSII" /r
+CPP=clmips.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D "R4000" /D "MIPSII" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /QMmips2 /QMFPE /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /D "MIPS" /D "_MIPS_" /D "R4000" /D "MIPSII" /D "NDEBUG" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QMmips2 /QMFPE /O2 /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_test_MIPSIIDbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_MIPSIIDbg"
+# PROP BASE CPU_ID "{689DDC64-9D9D-11D5-96F8-00207802C01C}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_test_MIPSIIDbg"
+# PROP Intermediate_Dir "./output/pjlib_test_MIPSIIDbg"
+# PROP CPU_ID "{689DDC64-9D9D-11D5-96F8-00207802C01C}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /d "R4000" /d "MIPSII" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /d "R4000" /d "MIPSII" /r
+CPP=clmips.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "MIPS" /D "_MIPS_" /D "R4000" /D "MIPSII" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QMmips2 /QMFPE /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D "R4000" /D "MIPSII" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QMmips2 /QMFPE /M$(CECrtMTDebug) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_test_SH4Rel"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_SH4Rel"
+# PROP BASE CPU_ID "{D6519021-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_test_SH4Rel"
+# PROP Intermediate_Dir "./output/pjlib_test_SH4Rel"
+# PROP CPU_ID "{D6519021-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "SHx" /d "SH4" /d "_SH4_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "SHx" /d "SH4" /d "_SH4_" /r
+CPP=shcl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /Qsh4 /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /D "SHx" /D "SH4" /D "_SH4_" /D "NDEBUG" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /Qsh4 /O2 /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH4
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH4
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_test_SH4Dbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_SH4Dbg"
+# PROP BASE CPU_ID "{D6519021-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_test_SH4Dbg"
+# PROP Intermediate_Dir "./output/pjlib_test_SH4Dbg"
+# PROP CPU_ID "{D6519021-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "SHx" /d "SH4" /d "_SH4_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "SHx" /d "SH4" /d "_SH4_" /r
+CPP=shcl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /Qsh4 /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "SHx" /D "SH4" /D "_SH4_" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /Qsh4 /M$(CECrtMTDebug) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH4
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH4
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_test_SH3Rel"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_SH3Rel"
+# PROP BASE CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_test_SH3Rel"
+# PROP Intermediate_Dir "./output/pjlib_test_SH3Rel"
+# PROP CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r
+CPP=shcl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /D "SHx" /D "SH3" /D "_SH3_" /D "NDEBUG" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /O2 /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 /align:4096
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 /align:4096
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_test_SH3Dbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_SH3Dbg"
+# PROP BASE CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_test_SH3Dbg"
+# PROP Intermediate_Dir "./output/pjlib_test_SH3Dbg"
+# PROP CPU_ID "{D6519020-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "SHx" /d "SH3" /d "_SH3_" /r
+CPP=shcl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "SHx" /D "SH3" /D "_SH3_" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /M$(CECrtMTDebug) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 /align:4096
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:SH3 /align:4096
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_test_MIPSIVRel"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_MIPSIVRel"
+# PROP BASE CPU_ID "{0B2FE524-26C5-4194-8CEF-B1582DEB5A98}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_test_MIPSIVRel"
+# PROP Intermediate_Dir "./output/pjlib_test_MIPSIVRel"
+# PROP CPU_ID "{0B2FE524-26C5-4194-8CEF-B1582DEB5A98}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r
+CPP=clmips.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D "_MIPS64" /D "R4000" /D "MIPSIV" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /QMmips4 /QMn32 /QMFPE /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /D "MIPS" /D "_MIPS_" /D "_MIPS64" /D "R4000" /D "MIPSIV" /D "NDEBUG" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QMmips4 /QMn32 /QMFPE /O2 /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_test_MIPSIVDbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_MIPSIVDbg"
+# PROP BASE CPU_ID "{0B2FE524-26C5-4194-8CEF-B1582DEB5A98}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_test_MIPSIVDbg"
+# PROP Intermediate_Dir "./output/pjlib_test_MIPSIVDbg"
+# PROP CPU_ID "{0B2FE524-26C5-4194-8CEF-B1582DEB5A98}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r
+CPP=clmips.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "MIPS" /D "_MIPS_" /D "_MIPS64" /D "R4000" /D "MIPSIV" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QMmips4 /QMn32 /QMFPE /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D "_MIPS64" /D "R4000" /D "MIPSIV" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QMmips4 /QMn32 /QMFPE /M$(CECrtMTDebug) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_test_emulatorRel"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_emulatorRel"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_test_emulatorRel"
+# PROP Intermediate_Dir "./output/pjlib_test_emulatorRel"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /D "_i386_" /D "i_386_" /D "_X86_" /D "x86" /D "NDEBUG" /D PJ_WIN32_WINCE=1 /D PJ_M_I386=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /Gs8192 /GF /O2 /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 $(CEx86Corelibc) winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_test_emulatorDbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_emulatorDbg"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_test_emulatorDbg"
+# PROP Intermediate_Dir "./output/pjlib_test_emulatorDbg"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "$(CePlatform)" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "_X86_" /d "x86" /d "_i386_" /r
+# ADD RSC /l 0x409 /d "$(CePlatform)" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "_X86_" /d "x86" /d "_i386_" /r
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "_i386_" /D "i_386_" /D "_X86_" /D "x86" /D PJ_WIN32_WINCE=1 /D PJ_M_I386=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /FR /YX /Gs8192 /GF /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 $(CEx86Corelibc) winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_test_ARMV4IRel"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_ARMV4IRel"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_test_ARMV4IRel"
+# PROP Intermediate_Dir "./output/pjlib_test_ARMV4IRel"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4I" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4I" /r
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /D "ARM" /D "_ARM_" /D "ARMV4I" /D "NDEBUG" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_test_ARMV4IDbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_ARMV4IDbg"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_test_ARMV4IDbg"
+# PROP Intermediate_Dir "./output/pjlib_test_ARMV4IDbg"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4I" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4I" /r
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4I" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_test_MIPSIV_FPRel"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_MIPSIV_FPRel"
+# PROP BASE CPU_ID "{046A430D-7770-48AB-89B5-24C2D300B03F}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_test_MIPSIV_FPRel"
+# PROP Intermediate_Dir "./output/pjlib_test_MIPSIV_FPRel"
+# PROP CPU_ID "{046A430D-7770-48AB-89B5-24C2D300B03F}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r
+CPP=clmips.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D "_MIPS64" /D "R4000" /D "MIPSIV" /D "MIPSIV_FP" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /QMmips4 /QMn32 /QMFPE- /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /D "MIPS" /D "_MIPS_" /D "_MIPS64" /D "R4000" /D "MIPSIV" /D "MIPSIV_FP" /D "NDEBUG" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QMmips4 /QMn32 /QMFPE- /O2 /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_test_MIPSIV_FPDbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_MIPSIV_FPDbg"
+# PROP BASE CPU_ID "{046A430D-7770-48AB-89B5-24C2D300B03F}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_test_MIPSIV_FPDbg"
+# PROP Intermediate_Dir "./output/pjlib_test_MIPSIV_FPDbg"
+# PROP CPU_ID "{046A430D-7770-48AB-89B5-24C2D300B03F}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /r
+CPP=clmips.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "MIPS" /D "_MIPS_" /D "_MIPS64" /D "R4000" /D "MIPSIV" /D "MIPSIV_FP" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QMmips4 /QMn32 /QMFPE- /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D "_MIPS64" /D "R4000" /D "MIPSIV" /D "MIPSIV_FP" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QMmips4 /QMn32 /QMFPE- /M$(CECrtMTDebug) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPSFPU
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_test_ARMV4Rel"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_ARMV4Rel"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_test_ARMV4Rel"
+# PROP Intermediate_Dir "./output/pjlib_test_ARMV4Rel"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /D "ARM" /D "_ARM_" /D "ARMV4" /D "NDEBUG" /D PJ_WIN32_WINCE=1 /D PJ_M_ARMV4=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /O2 /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_test_ARMV4Dbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_ARMV4Dbg"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_test_ARMV4Dbg"
+# PROP Intermediate_Dir "./output/pjlib_test_ARMV4Dbg"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D PJ_WIN32_WINCE=1 /D PJ_M_ARMV4=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /FR /YX /M$(CECrtMTDebug) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_test_MIPS16Rel"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_MIPS16Rel"
+# PROP BASE CPU_ID "{D6519013-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_test_MIPS16Rel"
+# PROP Intermediate_Dir "./output/pjlib_test_MIPS16Rel"
+# PROP CPU_ID "{D6519013-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "MIPS16SUPPORT" /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /d "R4000" /d "MIPSII" /d "MIPS16" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "MIPS16SUPPORT" /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /d "R4000" /d "MIPSII" /d "MIPS16" /r
+CPP=clmips.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D "R4000" /D "MIPSII" /D "MIPS16" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_MIPS16_" /D "MIPS16SUPPORT" /YX /QMmips16 /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /D "MIPS" /D "_MIPS_" /D "R4000" /D "MIPSII" /D "MIPS16" /D "NDEBUG" /D "_MIPS16_" /D "MIPS16SUPPORT" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QMmips16 /O2 /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS16 /ALIGN:4096
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS16 /ALIGN:4096
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_test_MIPS16Dbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_MIPS16Dbg"
+# PROP BASE CPU_ID "{D6519013-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_test_MIPS16Dbg"
+# PROP Intermediate_Dir "./output/pjlib_test_MIPS16Dbg"
+# PROP CPU_ID "{D6519013-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "MIPS16SUPPORT" /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /d "R4000" /d "MIPSII" /d "MIPS16" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "MIPS16SUPPORT" /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "MIPS" /d "_MIPS_" /d "R4000" /d "MIPSII" /d "MIPS16" /r
+CPP=clmips.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "MIPS" /D "_MIPS_" /D "R4000" /D "MIPSII" /D "MIPS16" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /D "_MIPS16_" /D "MIPS16SUPPORT" /YX /QMmips16 /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D "R4000" /D "MIPSII" /D "MIPS16" /D "_MIPS16_" /D "MIPS16SUPPORT" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QMmips16 /M$(CECrtMTDebug) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS16 /ALIGN:4096
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:MIPS16 /ALIGN:4096
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_test_ARMV4TRel"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_ARMV4TRel"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_test_ARMV4TRel"
+# PROP Intermediate_Dir "./output/pjlib_test_ARMV4TRel"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4T" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4T" /r
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /D "ARM" /D "_ARM_" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "NDEBUG" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_test_ARMV4TDbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_ARMV4TDbg"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_test_ARMV4TDbg"
+# PROP Intermediate_Dir "./output/pjlib_test_ARMV4TDbg"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4T" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4T" /r
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "ARM" /D "_ARM_" /D PJ_WIN32_WINCE=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+# ADD LINK32 winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_test_X86Rel"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_X86Rel"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_test_X86Rel"
+# PROP Intermediate_Dir "./output/pjlib_test_X86Rel"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /D "_i386_" /D "i_386_" /D "_X86_" /D "x86" /D "NDEBUG" /D PJ_WIN32_WINCE=1 /D PJ_M_I386=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /Gs8192 /GF /O2 /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 $(CEx86Corelibc) winsock.lib ws2.lib commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_test_X86Dbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_test_X86Dbg"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_test_X86Dbg"
+# PROP Intermediate_Dir "./output/pjlib_test_X86Dbg"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "$(CePlatform)" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "_X86_" /d "x86" /d "_i386_" /r
+# ADD RSC /l 0x409 /d "$(CePlatform)" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "_X86_" /d "x86" /d "_i386_" /r
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "_i386_" /D "i_386_" /D "_X86_" /D "x86" /D PJ_WIN32_WINCE=1 /D PJ_M_I386=1 /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /YX /Gs8192 /GF /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 winsock.lib ws2.lib $(CEx86Corelibc) commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+# Name "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+# Name "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+# Name "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+# Name "pjlib_test_wince - Win32 (WCE SH4) Release"
+# Name "pjlib_test_wince - Win32 (WCE SH4) Debug"
+# Name "pjlib_test_wince - Win32 (WCE SH3) Release"
+# Name "pjlib_test_wince - Win32 (WCE SH3) Debug"
+# Name "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+# Name "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+# Name "pjlib_test_wince - Win32 (WCE emulator) Release"
+# Name "pjlib_test_wince - Win32 (WCE emulator) Debug"
+# Name "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+# Name "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+# Name "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+# Name "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+# Name "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+# Name "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+# Name "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+# Name "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+# Name "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+# Name "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+# Name "pjlib_test_wince - Win32 (WCE x86) Release"
+# Name "pjlib_test_wince - Win32 (WCE x86) Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\atomic.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ATOMI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ATOMI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\echo_clt.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\errno.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\exception.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\fifobuf.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\file.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\ioq_perf.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_IOQ_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\ioq_tcp.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_T=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_IOQ_T=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\ioq_udp.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_IOQ_U=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_IOQ_U=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\ioq_unreg.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_IOQ_UN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\list.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\main.c"
+DEP_CPP_MAIN_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\main_win32.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\unicode.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_MAIN_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\mutex.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_MUTEX=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_MUTEX=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\os.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\pool.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\pool_perf.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\rand.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RAND_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\rbtree.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\select.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SELEC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SELEC=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\sleep.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SLEEP=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SLEEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\sock.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\sock_perf.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_SOCK_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SOCK_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\string.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\test.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TEST_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_TEST_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\thread.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_THREA=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_THREA=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\timer.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\timestamp.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_TIMES=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_TIMES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\udp_echo_srv_ioqueue.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_E=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_UDP_E=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\udp_echo_srv_sync.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UDP_EC=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_UDP_EC=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\util.c"
+
+!IF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Release"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII_FP) Debug"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Release"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSII) Debug"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Release"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH4) Debug"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Release"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE SH3) Debug"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Release"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV) Debug"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Release"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE MIPS16) Debug"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+NODEP_CPP_UTIL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_test_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_UTIL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pjlib-test\test.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\..\src\pjlib-test\test.h"
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjlib/build/wince-evc4/pjlib_wince.vcp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/wince-evc4/pjlib_wince.vcp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/wince-evc4/pjlib_wince.vcp	(revision 1163)
@@ -0,0 +1,13165 @@
+# Microsoft eMbedded Visual Tools Project File - Name="pjlib_wince" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE x86) Static Library" 0x8304
+# TARGTYPE "Win32 (WCE ARMV4) Static Library" 0xa304
+# TARGTYPE "Win32 (WCE ARMV4I) Static Library" 0xa504
+# TARGTYPE "Win32 (WCE emulator) Static Library" 0xa604
+# TARGTYPE "Win32 (WCE ARMV4T) Static Library" 0xa404
+
+CFG=pjlib_wince - Win32 (WCE x86) Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib_wince.vcn".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjlib_wince.vcn" CFG="pjlib_wince - Win32 (WCE x86) Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjlib_wince - Win32 (WCE emulator) Release" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjlib_wince - Win32 (WCE emulator) Debug" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjlib_wince - Win32 (WCE ARMV4I) Release" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjlib_wince - Win32 (WCE ARMV4I) Debug" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjlib_wince - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjlib_wince - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjlib_wince - Win32 (WCE ARMV4T) Release" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjlib_wince - Win32 (WCE ARMV4T) Debug" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjlib_wince - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE "pjlib_wince - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project 2
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_emulatorRel"
+# PROP BASE Intermediate_Dir "./output/pjlib_emulatorRel"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_emulatorRel"
+# PROP Intermediate_Dir "./output/pjlib_emulatorRel"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /D "NDEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_emulatorDbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_emulatorDbg"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_emulatorDbg"
+# PROP Intermediate_Dir "./output/pjlib_emulatorDbg"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_ARMV4IRel"
+# PROP BASE Intermediate_Dir "./output/pjlib_ARMV4IRel"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_ARMV4IRel"
+# PROP Intermediate_Dir "./output/pjlib_ARMV4IRel"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /D "ARMV4I" /D "NDEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_ARMV4IDbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_ARMV4IDbg"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_ARMV4IDbg"
+# PROP Intermediate_Dir "./output/pjlib_ARMV4IDbg"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "ARMV4I" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_ARMV4Rel"
+# PROP BASE Intermediate_Dir "./output/pjlib_ARMV4Rel"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_ARMV4Rel"
+# PROP Intermediate_Dir "./output/pjlib_ARMV4Rel"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /D "NDEBUG" /D "ARMV4" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_ARMV4Dbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_ARMV4Dbg"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_ARMV4Dbg"
+# PROP Intermediate_Dir "./output/pjlib_ARMV4Dbg"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "ARMV4" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_ARMV4TRel"
+# PROP BASE Intermediate_Dir "./output/pjlib_ARMV4TRel"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_ARMV4TRel"
+# PROP Intermediate_Dir "./output/pjlib_ARMV4TRel"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "NDEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_ARMV4TDbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_ARMV4TDbg"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_ARMV4TDbg"
+# PROP Intermediate_Dir "./output/pjlib_ARMV4TDbg"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjlib_X86Rel"
+# PROP BASE Intermediate_Dir "./output/pjlib_X86Rel"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjlib_X86Rel"
+# PROP Intermediate_Dir "./output/pjlib_X86Rel"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /D "NDEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjlib_X86Dbg"
+# PROP BASE Intermediate_Dir "./output/pjlib_X86Dbg"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjlib_X86Dbg"
+# PROP Intermediate_Dir "./output/pjlib_X86Dbg"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /FR /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjlib_wince - Win32 (WCE emulator) Release"
+# Name "pjlib_wince - Win32 (WCE emulator) Debug"
+# Name "pjlib_wince - Win32 (WCE ARMV4I) Release"
+# Name "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+# Name "pjlib_wince - Win32 (WCE ARMV4) Release"
+# Name "pjlib_wince - Win32 (WCE ARMV4) Debug"
+# Name "pjlib_wince - Win32 (WCE ARMV4T) Release"
+# Name "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+# Name "pjlib_wince - Win32 (WCE x86) Release"
+# Name "pjlib_wince - Win32 (WCE x86) Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\src\pj\addr_resolv_sock.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ADDR_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ADDR_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ADDR_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ADDR_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ADDR_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ADDR_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ADDR_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ADDR_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ADDR_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ADDR_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ADDR_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ADDR_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ADDR_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ADDR_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ADDR_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ADDR_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ADDR_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ADDR_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\array.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ARRAY=\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ARRAY=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ARRAY=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ARRAY=\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ARRAY=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ARRAY=\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ARRAY=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ARRAY=\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ARRAY=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ARRAY=\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ARRAY=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ARRAY=\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ARRAY=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ARRAY=\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ARRAY=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ARRAY=\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ARRAY=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ARRAY=\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\config.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_CONFI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_CONFI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_CONFI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_CONFI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_CONFI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_CONFI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_CONFI=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_CONFI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_CONFI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_CONFI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_CONFI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\ctype.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_CTYPE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_CTYPE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_CTYPE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_CTYPE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_CTYPE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_CTYPE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_CTYPE=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_CTYPE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_CTYPE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_CTYPE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_CTYPE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\errno.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\except.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_EXCEP=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_EXCEP=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\fifobuf.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_FIFOB=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_FIFOB=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\file_access_win32.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_FILE_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\unicode.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_FILE_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\file_io_win32.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_FILE_I=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_FILE_I=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_FILE_I=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_FILE_I=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_FILE_I=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_FILE_I=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_FILE_I=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\unicode.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_FILE_I=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_FILE_I=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_FILE_I=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_FILE_I=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\guid.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_GUID_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_GUID_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_GUID_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_GUID_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_GUID_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_GUID_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_GUID_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_GUID_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_GUID_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_GUID_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\guid_simple.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_GUID_S=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_GUID_S=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\hash.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_HASH_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_HASH_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_HASH_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_HASH_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_HASH_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_HASH_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_HASH_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_HASH_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_HASH_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_HASH_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_HASH_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_HASH_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_HASH_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_HASH_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_HASH_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_HASH_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_HASH_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_HASH_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\ioqueue_common_abs.c
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\ioqueue_common_abs.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\ioqueue_select.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_IOQUE=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pj\ioqueue_common_abs.c"\
+	"..\..\src\pj\ioqueue_common_abs.h"\
+	
+NODEP_CPP_IOQUE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_IOQUE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pj\ioqueue_common_abs.c"\
+	"..\..\src\pj\ioqueue_common_abs.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_IOQUE=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pj\ioqueue_common_abs.c"\
+	"..\..\src\pj\ioqueue_common_abs.h"\
+	
+NODEP_CPP_IOQUE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_IOQUE=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pj\ioqueue_common_abs.c"\
+	"..\..\src\pj\ioqueue_common_abs.h"\
+	
+NODEP_CPP_IOQUE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_IOQUE=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pj\ioqueue_common_abs.c"\
+	"..\..\src\pj\ioqueue_common_abs.h"\
+	
+NODEP_CPP_IOQUE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_IOQUE=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pj\ioqueue_common_abs.c"\
+	"..\..\src\pj\ioqueue_common_abs.h"\
+	
+NODEP_CPP_IOQUE=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_IOQUE=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pj\ioqueue_common_abs.c"\
+	"..\..\src\pj\ioqueue_common_abs.h"\
+	
+NODEP_CPP_IOQUE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_IOQUE=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pj\ioqueue_common_abs.c"\
+	"..\..\src\pj\ioqueue_common_abs.h"\
+	
+NODEP_CPP_IOQUE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_IOQUE=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pj\ioqueue_common_abs.c"\
+	"..\..\src\pj\ioqueue_common_abs.h"\
+	
+NODEP_CPP_IOQUE=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_IOQUE=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pj\ioqueue_common_abs.c"\
+	"..\..\src\pj\ioqueue_common_abs.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\ip_helper_win32.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_IP_HE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	{$(INCLUDE)}"ipexport.h"\
+	{$(INCLUDE)}"Iphlpapi.h"\
+	{$(INCLUDE)}"iptypes.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_IP_HE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	{$(INCLUDE)}"ipexport.h"\
+	{$(INCLUDE)}"Iphlpapi.h"\
+	{$(INCLUDE)}"iptypes.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_IP_HE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	{$(INCLUDE)}"ipexport.h"\
+	{$(INCLUDE)}"Iphlpapi.h"\
+	{$(INCLUDE)}"iptypes.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_IP_HE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	{$(INCLUDE)}"ipexport.h"\
+	{$(INCLUDE)}"Iphlpapi.h"\
+	{$(INCLUDE)}"iptypes.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_IP_HE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	{$(INCLUDE)}"ipexport.h"\
+	{$(INCLUDE)}"Iphlpapi.h"\
+	{$(INCLUDE)}"iptypes.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_IP_HE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	{$(INCLUDE)}"ipexport.h"\
+	{$(INCLUDE)}"Iphlpapi.h"\
+	{$(INCLUDE)}"iptypes.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_IP_HE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	{$(INCLUDE)}"ipexport.h"\
+	{$(INCLUDE)}"Iphlpapi.h"\
+	{$(INCLUDE)}"iptypes.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_IP_HE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	{$(INCLUDE)}"ipexport.h"\
+	{$(INCLUDE)}"Iphlpapi.h"\
+	{$(INCLUDE)}"iptypes.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_IP_HE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	{$(INCLUDE)}"ipexport.h"\
+	{$(INCLUDE)}"Iphlpapi.h"\
+	{$(INCLUDE)}"iptypes.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_IP_HE=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	{$(INCLUDE)}"ipexport.h"\
+	{$(INCLUDE)}"Iphlpapi.h"\
+	{$(INCLUDE)}"iptypes.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\list.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LIST_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_LIST_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\lock.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_LOCK_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_LOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_LOCK_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_LOCK_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_LOCK_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_LOCK_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOCK_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_LOCK_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_LOCK_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_LOCK_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_LOCK_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\log.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_LOG_C=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_LOG_C=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\log_writer_stdout.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_LOG_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdfileio.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_LOG_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdfileio.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_LOG_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdfileio.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_LOG_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdfileio.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_LOG_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdfileio.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_LOG_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdfileio.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_LOG_W=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_LOG_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdfileio.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_LOG_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdfileio.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_LOG_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdfileio.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_LOG_W=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdfileio.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\os_core_win32.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_OS_CO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_CO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_OS_CO=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	"..\..\src\pj\os_rwmutex.c"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_OS_CO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_CO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_OS_CO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_CO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_OS_CO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_CO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_OS_CO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_CO=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_OS_CO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_CO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_OS_CO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_CO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_OS_CO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_CO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_OS_CO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\src\pj\os_rwmutex.c"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\os_error_win32.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_OS_ER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_ER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_OS_ER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_OS_ER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_ER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_OS_ER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_ER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_OS_ER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	
+NODEP_CPP_OS_ER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_OS_ER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_ER=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_OS_ER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_ER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_OS_ER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_ER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_OS_ER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_ER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_OS_ER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\stdarg.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\os_time_win32.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_OS_TI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_OS_TI=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_OS_TI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_OS_TI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_OS_TI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_TI=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_OS_TI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_TI=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_OS_TI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_OS_TI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_OS_TI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_OS_TI=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\os_timestamp_common.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_OS_TIM=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\os_timestamp_win32.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_OS_TIME=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_OS_TIME=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_OS_TIME=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_OS_TIME=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_OS_TIME=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_OS_TIME=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_OS_TIME=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_OS_TIME=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_OS_TIME=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_OS_TIME=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_OS_TIME=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\pool.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_POOL_=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\pool_buf.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_POOL_B=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_POOL_B=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_POOL_B=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_POOL_B=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_POOL_B=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_POOL_B=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_POOL_B=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_POOL_B=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_POOL_B=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_POOL_B=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\pool_caching.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_POOL_C=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_C=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_POOL_C=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_POOL_C=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_C=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_POOL_C=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_C=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_POOL_C=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_C=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_POOL_C=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_C=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_POOL_C=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_C=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_POOL_C=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_C=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_POOL_C=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_C=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_POOL_C=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\pool_policy_malloc.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_POOL_P=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\malloc.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\rand.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\rand.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\rand.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\rand.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\rand.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\rand.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\rand.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_RAND_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\rand.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\rand.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\rand.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_RAND_=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\rand.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\rbtree.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_RBTRE=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\sock_bsd.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_SOCK_=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SOCK_=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\sock_select.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SOCK_S=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SOCK_S=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SOCK_S=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SOCK_S=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SOCK_S=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SOCK_S=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_SOCK_S=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SOCK_S=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SOCK_S=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SOCK_S=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SOCK_S=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\socket.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\string.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_STRIN=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STRIN=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\timer.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_TIMER=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_TIMER=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\types.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_TYPES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_TYPES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_TYPES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_TYPES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_TYPES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_TYPES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_TYPES=\
+	"..\..\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_TYPES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_TYPES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_TYPES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_TYPES=\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pj\unicode_win32.c
+
+!IF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_UNICO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_UNICO=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_UNICO=\
+	"..\..\include\pj\addr_resolv.h"\
+	"..\..\include\pj\array.h"\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\ctype.h"\
+	"..\..\include\pj\compat\errno.h"\
+	"..\..\include\pj\compat\high_precision.h"\
+	"..\..\include\pj\compat\m_auto.h"\
+	"..\..\include\pj\compat\os_auto.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\setjmp.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\config_site_sample.h"\
+	"..\..\include\pj\ctype.h"\
+	"..\..\include\pj\errno.h"\
+	"..\..\include\pj\except.h"\
+	"..\..\include\pj\fifobuf.h"\
+	"..\..\include\pj\file_access.h"\
+	"..\..\include\pj\file_io.h"\
+	"..\..\include\pj\guid.h"\
+	"..\..\include\pj\hash.h"\
+	"..\..\include\pj\ioqueue.h"\
+	"..\..\include\pj\ip_helper.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\lock.h"\
+	"..\..\include\pj\log.h"\
+	"..\..\include\pj\os.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_buf.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\rand.h"\
+	"..\..\include\pj\rbtree.h"\
+	"..\..\include\pj\sock.h"\
+	"..\..\include\pj\sock_select.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\timer.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	"..\..\include\pjlib.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_UNICO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_UNICO=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_UNICO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_UNICO=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_UNICO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	
+NODEP_CPP_UNICO=\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_UNICO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_UNICO=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_UNICO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_UNICO=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_UNICO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_UNICO=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_UNICO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	
+NODEP_CPP_UNICO=\
+	"..\..\include\pj\compat\m_arm.h"\
+	"..\..\include\pj\compat\sprintf.h"\
+	"..\..\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjlib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_UNICO=\
+	"..\..\include\pj\assert.h"\
+	"..\..\include\pj\compat\assert.h"\
+	"..\..\include\pj\compat\cc_gcc.h"\
+	"..\..\include\pj\compat\cc_msvc.h"\
+	"..\..\include\pj\compat\m_alpha.h"\
+	"..\..\include\pj\compat\m_armv4.h"\
+	"..\..\include\pj\compat\m_i386.h"\
+	"..\..\include\pj\compat\m_m68k.h"\
+	"..\..\include\pj\compat\m_powerpc.h"\
+	"..\..\include\pj\compat\m_sparc.h"\
+	"..\..\include\pj\compat\m_x86_64.h"\
+	"..\..\include\pj\compat\os_darwinos.h"\
+	"..\..\include\pj\compat\os_linux.h"\
+	"..\..\include\pj\compat\os_linux_kernel.h"\
+	"..\..\include\pj\compat\os_palmos.h"\
+	"..\..\include\pj\compat\os_rtems.h"\
+	"..\..\include\pj\compat\os_sunos.h"\
+	"..\..\include\pj\compat\os_win32.h"\
+	"..\..\include\pj\compat\os_win32_wince.h"\
+	"..\..\include\pj\compat\size_t.h"\
+	"..\..\include\pj\compat\string.h"\
+	"..\..\include\pj\config.h"\
+	"..\..\include\pj\config_site.h"\
+	"..\..\include\pj\list.h"\
+	"..\..\include\pj\list_i.h"\
+	"..\..\include\pj\pool.h"\
+	"..\..\include\pj\pool_alt.h"\
+	"..\..\include\pj\pool_i.h"\
+	"..\..\include\pj\string.h"\
+	"..\..\include\pj\string_i.h"\
+	"..\..\include\pj\types.h"\
+	"..\..\include\pj\unicode.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Group "compat"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\assert.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\cc_gcc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\cc_msvc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\ctype.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\errno.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\high_precision.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\m_armv4.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\m_i386.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\malloc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\os_win32_wince.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\rand.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\setjmp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\size_t.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\socket.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\sprintf.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\stdarg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\stdfileio.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\string.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\time.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\compat\vsprintf.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\include\pj\addr_resolv.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\array.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\assert.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\config.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\config_site.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\config_site_sample.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\ctype.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\doxygen.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\errno.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\except.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\fifobuf.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\file_access.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\file_io.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\guid.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\hash.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\ioqueue.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\ip_helper.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\list.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\list_i.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\lock.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\log.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\os.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjlib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\pool.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\pool_buf.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\pool_i.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\rand.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\rbtree.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\sock.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\sock_select.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\string.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\string_i.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\timer.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\types.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pj\unicode.h
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjlib/build/wince-evc4/pjlib_wince.vcw
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/build/wince-evc4/pjlib_wince.vcw	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/build/wince-evc4/pjlib_wince.vcw	(revision 1163)
@@ -0,0 +1,44 @@
+Microsoft eMbedded Visual Tools Workspace File, Format Version 4.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "pjlib_test_wince"=".\pjlib_test_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib_wince
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "pjlib_wince"=".\pjlib_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
Index: /pjproject/branches/split-3rd-party/pjlib/docs/doxygen.cfg
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/docs/doxygen.cfg	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/docs/doxygen.cfg	(revision 1163)
@@ -0,0 +1,1047 @@
+# Doxyfile 1.3-rc3
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           =  "PJLIB Reference"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = docs
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, 
+# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en 
+# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese, 
+# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these class will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
+# members of a class in the documentation of that class as if those members were 
+# ordinary class members. Constructors, destructors and assignment operators of 
+# the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. It is allowed to use relative paths in the argument list.
+
+STRIP_FROM_PATH        = "c:\project\pjproject"
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower case letters. If set to YES upper case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# users are adviced to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments  will behave just like the Qt-style comments (thus requiring an 
+# explict @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = YES
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# reimplements.
+
+INHERIT_DOCS           = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consist of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
+# only. Doxygen will then generate output that is more tailored for C. 
+# For instance some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
+# only. Doxygen will then generate output that is more tailored for Java. 
+# For instance namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  =  include/pj src/pjlib-samples src/pjlib-test
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
+# *.h++ *.idl *.odl
+
+FILE_PATTERNS          = *.h *.c
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories.
+
+EXCLUDE_PATTERNS       = "*_i.h" "*/compat/*"
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = .
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = YES
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.
+
+INPUT_FILTER           = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .htm
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = docs/header.html
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = docs/footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet
+
+HTML_STYLESHEET        = docs/doxygen.css
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output dir.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non empty doxygen will try to run 
+# the html help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the Html help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimised for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assigments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_XML           = NO
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed.
+
+PREDEFINED             = PJ_DECL(x)=x PJ_DEF(x)=x PJ_IDECL(x)=x \
+			 PJ_IDEF(x)=x PJ_INLINE(x)=x \
+			 PJ_DECL_NO_RETURN(x)=x \
+			 PJ_HAS_HIGH_RES_TIMER=1 \
+			 PJ_LOG_MAX_LEVEL=4 \
+			 PJ_HAS_SEMAPHORE=1 \
+			 PJ_HAS_EVENT_OBJ=1
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse the 
+# parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tagfiles.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or 
+# super classes. Setting the tag to NO turns the diagrams off. Note that this 
+# option is superceded by the HAVE_DOT option below. This is only a fallback. It is 
+# recommended to install and use dot, since it yield more powerful graphs.
+
+CLASS_DIAGRAMS         = NO
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_WIDTH    = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT   = 1024
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermedate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
+
+# The CGI_NAME tag should be the name of the CGI script that 
+# starts the search engine (doxysearch) with the correct parameters. 
+# A script with this name will be generated by doxygen.
+
+#CGI_NAME               = search.cgi
+
+# The CGI_URL tag should be the absolute URL to the directory where the 
+# cgi binaries are located. See the documentation of your http daemon for 
+# details.
+
+#CGI_URL                = 
+
+# The DOC_URL tag should be the absolute URL to the directory where the 
+# documentation is located. If left blank the absolute path to the 
+# documentation, with file:// prepended to it, will be used.
+
+#DOC_URL                = 
+
+# The DOC_ABSPATH tag should be the absolute path to the directory where the 
+# documentation is located. If left blank the directory on the local machine 
+# will be used.
+
+#DOC_ABSPATH            = 
+
+# The BIN_ABSPATH tag must point to the directory where the doxysearch binary 
+# is installed.
+
+#BIN_ABSPATH            = /usr/local/bin/
+
+# The EXT_DOC_PATHS tag can be used to specify one or more paths to 
+# documentation generated for other projects. This allows doxysearch to search 
+# the documentation for these projects as well.
+
+#EXT_DOC_PATHS          = 
Index: /pjproject/branches/split-3rd-party/pjlib/docs/doxygen.css
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/docs/doxygen.css	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/docs/doxygen.css	(revision 1163)
@@ -0,0 +1,305 @@
+BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+BODY,TD {
+       font-size: 80%;
+}
+CODE {
+	font-size: 120%;
+       font-family: monospace;
+}
+.fragment, pre {
+	font-size: 110%;
+       font-family: monospace;
+}
+H1 {
+	text-align: center;
+       font-size: 240%;
+}
+H2 {
+       	font-size: 200%;
+	margin-top     : 60px;
+}
+H3 {
+       font-size: 160%;
+}
+H4 {
+       font-size: 120%;
+}
+CAPTION { font-weight: bold }
+DIV.qindex {
+	width: 100%;
+	background-color: #eeeeff;
+	border: 1px solid #b0b0b0;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 140%;
+}
+DIV.nav {
+	width: 100%;
+	background-color: #eeeeff;
+	border: 1px solid #b0b0b0;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 140%;
+}
+A.qindex {
+       text-decoration: none;
+       font-size: 120%;
+       color: #1A419D;
+}
+A.qindex:visited {
+       text-decoration: none;
+       color: #1A419D
+}
+A.qindex:hover {
+	text-decoration: none;
+	background-color: #ddddff;
+}
+A.qindexHL {
+	text-decoration: none;
+	font-weight: bold;
+	background-color: #6666cc;
+	color: #ffffff;
+	border: 1px double #9295C2;
+}
+A.qindexHL:hover {
+	text-decoration: none;
+	background-color: #6666cc;
+	color: #ffffff;
+}
+A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
+A.el { text-decoration: none; font-weight: bold }
+A.elRef { font-weight: bold }
+A.code:link { text-decoration: none; font-weight: normal; color: #0000FF; }
+A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
+A.codeRef:link { font-weight: normal; color: #0000FF}
+A.codeRef:visited { font-weight: normal; color: #0000FF}
+A:hover { text-decoration: none; background-color: #f2f2ff }
+DL.el { margin-left: -1cm }
+PRE.fragment {
+	border: 1px solid #CCCCCC;
+	background-color: #f5f5f5;
+	margin-top: 4px;
+	margin-bottom: 4px;
+	margin-left: 2px;
+	margin-right: 8px;
+	padding-left: 6px;
+	padding-right: 6px;
+	padding-top: 4px;
+	padding-bottom: 4px;
+}
+DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
+TD.md { background-color: #F4F4FB; font-weight: bold; }
+TD.mdPrefix {
+       background-color: #F4F4FB;
+       color: #606060;
+	font-size: 80%;
+}
+TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
+TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
+DIV.groupHeader {
+       margin-left: 16px;
+       margin-top: 12px;
+       margin-bottom: 6px;
+       font-weight: bold;
+}
+DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
+BODY {
+	background: white;
+	color: black;
+	margin-right: 20px;
+	margin-left: 20px;
+}
+TD.indexkey {
+	background-color: #eeeeff;
+	font-weight: bold;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TD.indexvalue {
+	background-color: #eeeeff;
+	font-style: italic;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TR.memlist {
+   background-color: #f0f0f0; 
+}
+P.formulaDsp { text-align: center; }
+IMG.formulaDsp { }
+IMG.formulaInl { vertical-align: middle; }
+SPAN.keyword       { color: #008000 }
+SPAN.keywordtype   { color: #604020 }
+SPAN.keywordflow   { color: #e08000 }
+SPAN.comment       { color: #800000 }
+SPAN.preprocessor  { color: #806020 }
+SPAN.stringliteral { color: #002080 }
+SPAN.charliteral   { color: #008080 }
+.mdTable {
+	border: 1px solid #868686;
+	background-color: #F4F4FB;
+}
+.mdRow {
+	padding: 8px 10px;
+}
+.mdescLeft {
+       padding: 0px 8px 4px 8px;
+	font-size: 80%;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.mdescRight {
+       padding: 0px 8px 4px 8px;
+	font-size: 80%;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.memItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: none;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: none;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplParams {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+       color: #606060;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.search     { color: #003399;
+              font-weight: bold;
+}
+FORM.search {
+              margin-bottom: 0px;
+              margin-top: 0px;
+}
+INPUT.search { font-size: 75%;
+               color: #000080;
+               font-weight: normal;
+               background-color: #eeeeff;
+}
+TD.tiny      { font-size: 75%;
+}
+a {
+	color: #252E78;
+}
+a:visited {
+	color: #3D2185;
+}
+.dirtab { padding: 4px;
+          border-collapse: collapse;
+          border: 1px solid #b0b0b0;
+}
+TH.dirtab { background: #eeeeff;
+            font-weight: bold;
+}
+HR { height: 1px;
+     border: none;
+     border-top: 1px solid black;
+}
Index: /pjproject/branches/split-3rd-party/pjlib/docs/footer.html
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/docs/footer.html	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/docs/footer.html	(revision 1163)
@@ -0,0 +1,11 @@
+<p>&nbsp;</p>
+<hr><center>
+PJLIB Open Source, high performance, small footprint, and very very portable framework<br>
+(C)2001-2007 Benny Prijono
+</center>
+
+
+<!--#include virtual="/footer.html" -->
+
+</BODY>
+</HTML>
Index: /pjproject/branches/split-3rd-party/pjlib/docs/header.html
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/docs/header.html	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/docs/header.html	(revision 1163)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>$title</title>
+<link href="/style/style.css" rel="stylesheet" type="text/css">
+</head><body>
+	<!--#include virtual="/header.html" -->
+	<p><A HREF="/">Home</A> --&gt; <A HREF="/docs.htm">Documentations</A> --&gt; PJLIB Reference</p>
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj++/file.hpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj++/file.hpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj++/file.hpp	(revision 1163)
@@ -0,0 +1,187 @@
+/* $Id$  */
+/* 
+ * Copyright (C)2003-2006 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 __PJPP_FILE_HPP__
+#define __PJPP_FILE_HPP__
+
+#include <pj/file_io.h>
+#include <pj/file_access.h>
+#include <pj++/types.hpp>
+#include <pj++/pool.hpp>
+
+//
+// File API.
+//
+class Pj_File_API
+{
+public:
+    //
+    // Check file existance.
+    //
+    static bool file_exists(const char *filename)
+    {
+        return pj_file_exists(filename) != 0;
+    }
+
+    //
+    // Get file size.
+    //
+    static pj_off_t file_size(const char *filename)
+    {
+        return pj_file_size(filename);
+    }
+
+    //
+    // Delete file.
+    //
+    static pj_status_t file_delete(const char *filename)
+    {
+        return pj_file_delete(filename);
+    }
+
+    //
+    // Move/rename file.
+    //
+    static pj_status_t file_move(const char *oldname, const char *newname)
+    {
+        return pj_file_move(oldname, newname);
+    }
+
+    //
+    // Get stat.
+    //
+    static pj_status_t file_stat(const char *filename, pj_file_stat *buf)
+    {
+        return pj_file_getstat(filename, buf);
+    }
+};
+
+
+//
+// File.
+//
+class Pj_File : public Pj_Object
+{
+public:
+    //
+    // Offset type to be used in setpos.
+    //
+    enum Offset_Type
+    {
+        PJ_SEEK_SET = PJ_SEEK_SET,
+        PJ_SEEK_CUR = PJ_SEEK_CUR,
+        PJ_SEEK_END = PJ_SEEK_END,
+    };
+
+    //
+    // Default constructor.
+    //
+    Pj_File()
+        : hnd_(0)
+    {
+    }
+
+    //
+    // Construct and open a file.
+    //
+    Pj_File(Pj_Pool *pool, const char *filename,
+            unsigned access = PJ_O_RDONLY)
+    : hnd_(NULL)
+    {
+        open(pool, filename, access);
+    }
+
+    //
+    // Destructor closes the file.
+    //
+    ~Pj_File()
+    {
+        close();
+    }
+
+    //
+    // Open a file.
+    //
+    pj_status_t open(Pj_Pool *pool, const char *filename, 
+                     unsigned access = PJ_O_RDONLY )
+    {
+        close();
+        return pj_file_open(pool->pool_(), filename, access, &hnd_);
+    }
+
+    //
+    // Close a file.
+    //
+    void close()
+    {
+        if (hnd_ != 0) {
+            pj_file_close(hnd_);
+            hnd_ = 0;
+        }
+    }
+
+    //
+    // Write data.
+    //
+    pj_ssize_t write(const void *buff, pj_size_t size)
+    {
+        pj_ssize_t bytes = size;
+        if (pj_file_write(hnd_, buff, &bytes) != PJ_SUCCESS)
+            return -1;
+        return bytes;
+    }
+
+    //
+    // Read data.
+    //
+    pj_ssize_t read(void *buf, pj_size_t size)
+    {
+        pj_ssize_t bytes = size;
+        if (pj_file_read(hnd_, buf, &bytes) != PJ_SUCCESS)
+            return -1;
+        return bytes;
+    }
+
+    //
+    // Set file position.
+    //
+    pj_status_t setpos(pj_off_t offset, Offset_Type whence)
+    {
+        return pj_file_setpos(hnd_, offset, 
+                              (enum pj_file_seek_type)whence);
+    }
+
+    //
+    // Get file position.
+    //
+    pj_off_t getpos()
+    {
+        pj_off_t pos;
+        if (pj_file_getpos(hnd_, &pos) != PJ_SUCCESS)
+            return -1;
+        return pos;
+    }
+
+private:
+    pj_oshandle_t hnd_;
+};
+
+
+
+#endif  /* __PJPP_FILE_HPP__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj++/hash.hpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj++/hash.hpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj++/hash.hpp	(revision 1163)
@@ -0,0 +1,155 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 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 __PJPP_HASH_HPP__
+#define __PJPP_HASH_HPP__
+
+#include <pj++/types.hpp>
+#include <pj++/pool.hpp>
+#include <pj/hash.h>
+
+//
+// Hash table.
+//
+class Pj_Hash_Table : public Pj_Object
+{
+public:
+    //
+    // Hash table iterator.
+    //
+    class iterator
+    {
+    public:
+	iterator() 
+        {
+        }
+	explicit iterator(pj_hash_table_t *h, pj_hash_iterator_t *i) 
+        : ht_(h), it_(i) 
+        {
+        }
+	iterator(const iterator &rhs) 
+        : ht_(rhs.ht_), it_(rhs.it_) 
+        {
+        }
+	void operator++() 
+        { 
+            it_ = pj_hash_next(ht_, it_); 
+        }
+	bool operator==(const iterator &rhs) 
+        { 
+            return ht_ == rhs.ht_ && it_ == rhs.it_; 
+        }
+	iterator & operator=(const iterator &rhs) 
+        { 
+            ht_=rhs.ht_; it_=rhs.it_; 
+            return *this; 
+        }
+    private:
+	pj_hash_table_t *ht_;
+	pj_hash_iterator_t it_val_;
+	pj_hash_iterator_t *it_;
+
+	friend class Pj_Hash_Table;
+    };
+
+    //
+    // Construct hash table.
+    //
+    Pj_Hash_Table(Pj_Pool *pool, unsigned size)
+    {
+	table_ = pj_hash_create(pool->pool_(), size);
+    }
+
+    //
+    // Destroy hash table.
+    //
+    ~Pj_Hash_Table()
+    {
+    }
+
+    //
+    // Calculate hash value.
+    //
+    static pj_uint32_t calc( pj_uint32_t initial_hval, 
+                             const void *key, 
+                             unsigned keylen = PJ_HASH_KEY_STRING)
+    {
+	return pj_hash_calc(initial_hval, key, keylen);
+    }
+
+    //
+    // Return pjlib compatible hash table object.
+    //
+    pj_hash_table_t *pj_hash_table_t_()
+    {
+	return table_;
+    }
+
+    //
+    // Get the value associated with the specified key.
+    //
+    void *get(const void *key, unsigned keylen = PJ_HASH_KEY_STRING)
+    {
+	return pj_hash_get(table_, key, keylen);
+    }
+
+    //
+    // Associate a value with a key.
+    // Set the value to NULL to delete the key from the hash table.
+    //
+    void set(Pj_Pool *pool, 
+             const void *key, 
+             void *value,
+             unsigned keylen = PJ_HASH_KEY_STRING)
+    {
+	pj_hash_set(pool->pool_(), table_, key, keylen, value);
+    }
+
+    //
+    // Get number of items in the hash table.
+    //
+    unsigned count()
+    {
+	return pj_hash_count(table_);
+    }
+
+    //
+    // Iterate hash table.
+    //
+    iterator begin()
+    {
+	iterator it(table_, NULL);
+	it.it_ = pj_hash_first(table_, &it.it_val_);
+	return it;
+    }
+
+    //
+    // End of items.
+    //
+    iterator end()
+    {
+	return iterator(table_, NULL);
+    }
+
+private:
+    pj_hash_table_t *table_;
+};
+
+
+#endif	/* __PJPP_HASH_HPP__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj++/list.hpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj++/list.hpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj++/list.hpp	(revision 1163)
@@ -0,0 +1,351 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 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 __PJPP_LIST_HPP__
+#define __PJPP_LIST_HPP__
+
+#include <pj/list.h>
+#include <pj++/pool.hpp>
+
+
+//
+// Linked-list.
+//
+// Note:
+//  List_Node must have public member next and prev. Normally
+//  it will be declared like:
+//
+//  struct my_node
+//  {
+//      PJ_DECL_LIST_MEMBER(struct my_node);
+//      ..
+//  };
+//
+//
+template <class List_Node>
+class Pj_List : public Pj_Object
+{
+public:
+    //
+    // List const_iterator.
+    //
+    class const_iterator
+    {
+    public:
+	const_iterator() 
+            : node_(NULL) 
+        {}
+	const_iterator(const List_Node *nd) 
+            : node_((List_Node*)nd) 
+        {}
+	const List_Node * operator *() 
+        { 
+            return node_; 
+        }
+	const List_Node * operator -> () 
+        { 
+            return node_; 
+        }
+	const_iterator operator++() 
+        { 
+            return const_iterator((const List_Node *)node_->next); 
+        }
+	bool operator==(const const_iterator &rhs) 
+        { 
+            return node_ == rhs.node_; 
+        }
+	bool operator!=(const const_iterator &rhs) 
+        { 
+            return node_ != rhs.node_; 
+        }
+
+    protected:
+	List_Node *node_;
+    };
+
+    //
+    // List iterator.
+    //
+    class iterator : public const_iterator
+    {
+    public:
+	iterator() 
+        {}
+	iterator(List_Node *nd) 
+            : const_iterator(nd) 
+        {}
+	List_Node * operator *() 
+        { 
+            return node_; 
+        }
+	List_Node * operator -> () 
+        { 
+            return node_; 
+        }
+	iterator operator++() 
+        { 
+            return iterator((List_Node*)node_->next); 
+        }
+	bool operator==(const iterator &rhs) 
+        { 
+            return node_ == rhs.node_; 
+        }
+	bool operator!=(const iterator &rhs) 
+        { 
+            return node_ != rhs.node_; 
+        }
+    };
+
+    //
+    // Default constructor.
+    //
+    Pj_List() 
+    { 
+        pj_list_init(&root_); 
+        if (0) compiletest(); 
+    }
+
+    //
+    // You can cast Pj_List to pj_list
+    //
+    operator pj_list&()
+    {
+	return (pj_list&)root_;
+    }
+    operator const pj_list&()
+    {
+	return (const pj_list&)root_;
+    }
+
+    //
+    // You can cast Pj_List to pj_list* too
+    //
+    operator pj_list*()
+    {
+	return (pj_list*)&root_;
+    }
+    operator const pj_list*()
+    {
+	return (const pj_list*)&root_;
+    }
+
+    //
+    // Check if list is empty.
+    // 
+    bool empty() const
+    {
+	return pj_list_empty(&root_);
+    }
+
+    //
+    // Get first element.
+    //
+    iterator begin()
+    {
+	return iterator(root_.next);
+    }
+
+    //
+    // Get first element.
+    //
+    const_iterator begin() const
+    {
+	return const_iterator(root_.next);
+    }
+
+    //
+    // Get end-of-element
+    //
+    const_iterator end() const
+    {
+	return const_iterator((List_Node*)&root_);
+    }
+
+    //
+    // Get end-of-element
+    //
+    iterator end()
+    {
+	return iterator((List_Node*)&root_);
+    }
+
+    //
+    // Insert node.
+    //
+    void insert_before (iterator &pos, List_Node *node)
+    {
+	pj_list_insert_before( *pos, node );
+    }
+
+    //
+    // Insert node.
+    //
+    void insert_after(iterator &pos, List_Node *node)
+    {
+	pj_list_insert_after(*pos, node);
+    }
+
+    //
+    // Merge list.
+    //
+    void merge_first(List_Node *list2)
+    {
+	pj_list_merge_first(&root_, list2);
+    }
+
+    //
+    // Merge list.
+    //
+    void merge_last(Pj_List *list)
+    {
+	pj_list_merge_last(&root_, &list->root_);
+    }
+
+    //
+    // Insert list.
+    //
+    void insert_nodes_before(iterator &pos, Pj_List *list2)
+    {
+	pj_list_insert_nodes_before(*pos, &list2->root_);
+    }
+
+    //
+    // Insert list.
+    //
+    void insert_nodes_after(iterator &pos, Pj_List *list2)
+    {
+	pj_list_insert_nodes_after(*pos, &list2->root_);
+    }
+
+    //
+    // Erase an element.
+    //
+    void erase(iterator &it)
+    {
+	pj_list_erase(*it);
+    }
+
+    //
+    // Get first element.
+    //
+    List_Node *front()
+    {
+	return root_.next;
+    }
+
+    //
+    // Get first element.
+    //
+    const List_Node *front() const
+    {
+	return root_.next;
+    }
+
+    //
+    // Remove first element.
+    //
+    void pop_front()
+    {
+	pj_list_erase(root_.next);
+    }
+
+    //
+    // Get last element.
+    //
+    List_Node *back()
+    {
+	return root_.prev;
+    }
+
+    //
+    // Get last element.
+    //
+    const List_Node *back() const
+    {
+	return root_.prev;
+    }
+
+    //
+    // Remove last element.
+    //
+    void pop_back()
+    {
+	pj_list_erase(root_.prev);
+    }
+
+    //
+    // Find a node.
+    //
+    iterator find(List_Node *node)
+    {
+	List_Node *n = pj_list_find_node(&root_, node);
+	return n ? iterator(n) : end();
+    }
+
+    //
+    // Find a node.
+    //
+    const_iterator find(List_Node *node) const
+    {
+	List_Node *n = pj_list_find_node(&root_, node);
+	return n ? const_iterator(n) : end();
+    }
+
+    //
+    // Insert a node in the back.
+    //
+    void push_back(List_Node *node)
+    {
+	pj_list_insert_after(root_.prev, node);
+    }
+
+    //
+    // Insert a node in the front.
+    //
+    void push_front(List_Node *node)
+    {
+	pj_list_insert_before(root_.next, node);
+    }
+
+    //
+    // Remove all elements.
+    //
+    void clear()
+    {
+	root_.next = &root_;
+	root_.prev = &root_;
+    }
+
+private:
+    struct RootNode
+    {
+	PJ_DECL_LIST_MEMBER(List_Node);
+    } root_;
+
+    void compiletest()
+    {
+	// If you see error in this line, 
+	// it's because List_Node is not derived from Pj_List_Node.
+	List_Node *n = (List_Node*)0;
+	n = (List_Node *)n->next; n = (List_Node *)n->prev;
+    }
+};
+
+
+#endif	/* __PJPP_LIST_HPP__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj++/lock.hpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj++/lock.hpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj++/lock.hpp	(revision 1163)
@@ -0,0 +1,148 @@
+/* $Id$  */
+/* 
+ * Copyright (C)2003-2006 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 __PJPP_LOCK_HPP__
+#define __PJPP_LOCK_HPP__
+
+#include <pj++/types.hpp>
+#include <pj/lock.h>
+#include <pj++/pool.hpp>
+
+//////////////////////////////////////////////////////////////////////////////
+// Lock object.
+//
+class Pj_Lock : public Pj_Object
+{
+public:
+    //
+    // Constructor.
+    //
+    explicit Pj_Lock(pj_lock_t *lock)
+        : lock_(lock)
+    {
+    }
+
+    //
+    // Destructor.
+    //
+    ~Pj_Lock()
+    {
+        if (lock_)
+            pj_lock_destroy(lock_);
+    }
+
+    //
+    // Get pjlib compatible lock object.
+    //
+    pj_lock_t *pj_lock_t_()
+    {
+        return lock_;
+    }
+
+    //
+    // acquire lock.
+    //
+    pj_status_t acquire()
+    {
+        return pj_lock_acquire(lock_);
+    }
+
+    //
+    // release lock,.
+    //
+    pj_status_t release()
+    {
+        return pj_lock_release(lock_);
+    }
+
+protected:
+    pj_lock_t *lock_;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Null lock object.
+//
+class Pj_Null_Lock : public Pj_Lock
+{
+public:
+    //
+    // Default constructor.
+    //
+    explicit Pj_Null_Lock(Pj_Pool *pool, const char *name = NULL)
+        : Pj_Lock(NULL)
+    {
+        pj_lock_create_null_mutex(pool->pool_(), name, &lock_);
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Simple mutex lock object.
+//
+class Pj_Simple_Mutex_Lock : public Pj_Lock
+{
+public:
+    //
+    // Default constructor.
+    //
+    explicit Pj_Simple_Mutex_Lock(Pj_Pool *pool, const char *name = NULL)
+        : Pj_Lock(NULL)
+    {
+        pj_lock_create_simple_mutex(pool->pool_(), name, &lock_);
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Recursive mutex lock object.
+//
+class Pj_Recursive_Mutex_Lock : public Pj_Lock
+{
+public:
+    //
+    // Default constructor.
+    //
+    explicit Pj_Recursive_Mutex_Lock(Pj_Pool *pool, const char *name = NULL)
+        : Pj_Lock(NULL)
+    {
+        pj_lock_create_recursive_mutex(pool->pool_(), name, &lock_);
+    }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Semaphore lock object.
+//
+class Pj_Semaphore_Lock : public Pj_Lock
+{
+public:
+    //
+    // Default constructor.
+    //
+    explicit Pj_Semaphore_Lock(Pj_Pool *pool, 
+                               unsigned max=PJ_MAXINT32,
+                               unsigned initial=0,
+                               const char *name=NULL)
+        : Pj_Lock(NULL)
+    {
+        pj_lock_create_semaphore(pool->pool_(), name, initial, max, &lock_);
+    }
+};
+
+
+
+#endif	/* __PJPP_LOCK_HPP__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj++/os.hpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj++/os.hpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj++/os.hpp	(revision 1163)
@@ -0,0 +1,869 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 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 __PJPP_OS_HPP__
+#define __PJPP_OS_HPP__
+
+#include <pj/os.h>
+#include <pj/string.h>
+#include <pj++/types.hpp>
+#include <pj++/pool.hpp>
+
+class Pj_Thread;
+
+//
+// Thread API.
+//
+class Pj_Thread_API
+{
+public:
+    //
+    // Create a thread.
+    //
+    static pj_status_t create( Pj_Pool *pool, pj_thread_t **thread,
+                               pj_thread_proc *proc, void *arg,
+                               unsigned flags = 0,
+                               const char *name = NULL,
+                               pj_size_t stack_size = 0 )
+    {
+        return pj_thread_create(pool->pool_(), name, proc, arg, stack_size,
+                                flags, thread);
+    }
+
+    //
+    // Register a thread.
+    //
+    static pj_status_t register_this_thread( pj_thread_desc desc,
+                                             pj_thread_t **thread,
+                                             const char *name = NULL )
+    {
+        return pj_thread_register( name, desc, thread );
+    }
+
+    //
+    // Get current thread.
+    // Will return pj_thread_t (sorry folks, not Pj_Thread).
+    //
+    static pj_thread_t *this_thread()
+    {
+        return pj_thread_this();
+    }
+
+    //
+    // Get thread name.
+    //
+    static const char *get_name(pj_thread_t *thread)
+    {
+        return pj_thread_get_name(thread);
+    }
+
+    //
+    // Resume thread.
+    //
+    static pj_status_t resume(pj_thread_t *thread)
+    {
+        return pj_thread_resume(thread);
+    }
+
+    //
+    // Sleep.
+    //
+    static pj_status_t sleep(unsigned msec)
+    {
+	return pj_thread_sleep(msec);
+    }
+
+    //
+    // Join the specified thread.
+    //
+    static pj_status_t join(pj_thread_t *thread)
+    {
+        return pj_thread_join(thread);
+    }
+
+    //
+    // Destroy thread
+    //
+    static pj_status_t destroy(pj_thread_t *thread)
+    {
+        return pj_thread_destroy(thread);
+    }
+};
+
+
+
+//
+// Thread object.
+//
+// How to use:
+//  Derive a class from this class, then override main().
+//
+class Pj_Thread : public Pj_Object
+{
+public:
+    enum Flags
+    {
+	FLAG_SUSPENDED = PJ_THREAD_SUSPENDED
+    };
+
+    //
+    // Default constructor.
+    //
+    Pj_Thread()
+        : thread_(NULL)
+    {
+    }
+
+    //
+    // Destroy thread.
+    //
+    ~Pj_Thread()
+    {
+        destroy();
+    }
+
+    //
+    // This is the main thread function.
+    //
+    virtual int main() = 0;
+
+    //
+    // Start a thread.
+    //
+    pj_status_t create( Pj_Pool *pool, 
+                        unsigned flags = 0,
+                        const char *thread_name = NULL,
+			pj_size_t stack_size = PJ_THREAD_DEFAULT_STACK_SIZE)
+    {
+        destroy();
+        return Pj_Thread_API::create( pool, &thread_, &thread_proc, this,
+                                      flags, thread_name, stack_size);
+    }
+
+    //
+    // Get pjlib compatible thread object.
+    //
+    pj_thread_t *pj_thread_t_()
+    {
+	return thread_;
+    }
+
+    //
+    // Get thread name.
+    //
+    const char *get_name()
+    {
+        return Pj_Thread_API::get_name(thread_);
+    }
+
+    //
+    // Resume a suspended thread.
+    //
+    pj_status_t resume()
+    {
+        return Pj_Thread_API::resume(thread_);
+    }
+
+    //
+    // Join this thread.
+    //
+    pj_status_t join()
+    {
+        return Pj_Thread_API::join(thread_);
+    }
+
+    //
+    // Destroy thread.
+    //
+    pj_status_t destroy()
+    {
+        if (thread_) {
+            Pj_Thread_API::destroy(thread_);
+            thread_ = NULL;
+        }
+    }
+
+protected:
+    pj_thread_t *thread_;
+
+    static int PJ_THREAD_FUNC thread_proc(void *obj)
+    {
+        Pj_Thread *thread_class = (Pj_Thread*)obj;
+        return thread_class->main();
+    }
+};
+
+
+//
+// External Thread
+//  (threads that were started by external means, i.e. not 
+//   with Pj_Thread::create).
+//
+// This class will normally be defined as local variable in
+// external thread's stack, normally inside thread's main proc.
+// But be aware that the handle will be destroyed on destructor!
+//
+class Pj_External_Thread : public Pj_Thread
+{
+public:
+    Pj_External_Thread()
+    {
+    }
+
+    //
+    // Register external thread so that pjlib functions can work
+    // in that thread.
+    //
+    pj_status_t register_this_thread( const char *name=NULL )
+    {
+        return Pj_Thread_API::register_this_thread(desc_, &thread_,name);
+    }
+
+private:
+    pj_thread_desc desc_;
+};
+
+
+//
+// Thread specific data/thread local storage/TLS.
+//
+class Pj_Thread_Local_API
+{
+public:
+    //
+    // Allocate thread local storage (TLS) index.
+    //
+    static pj_status_t alloc(long *index)
+    {
+        return pj_thread_local_alloc(index);
+    }
+
+    //
+    // Free TLS index.
+    //
+    static void free(long index)
+    {
+        pj_thread_local_free(index);
+    }
+
+    //
+    // Set thread specific data.
+    //
+    static pj_status_t set(long index, void *value)
+    {
+        return pj_thread_local_set(index, value);
+    }
+
+    //
+    // Get thread specific data.
+    //
+    static void *get(long index)
+    {
+        return pj_thread_local_get(index);
+    }
+
+};
+
+//
+// Atomic variable
+//
+// How to use:
+//   Pj_Atomic_Var var(pool, 0);
+//   var.set(..);
+//
+class Pj_Atomic_Var : public Pj_Object
+{
+public:
+    //
+    // Default constructor, initialize variable with NULL.
+    //
+    Pj_Atomic_Var()
+        : var_(NULL)
+    {
+    }
+
+    //
+    // Construct atomic variable.
+    //
+    Pj_Atomic_Var(Pj_Pool *pool, pj_atomic_value_t value)
+        : var_(NULL)
+    {
+        create(pool, value);
+    }
+
+    //
+    // Destructor.
+    //
+    ~Pj_Atomic_Var()
+    {
+        destroy();
+    }
+
+    //
+    // Create atomic variable.
+    //
+    pj_status_t create( Pj_Pool *pool, pj_atomic_value_t value)
+    {
+        destroy();
+	return pj_atomic_create(pool->pool_(), value, &var_);
+    }
+
+    //
+    // Destroy.
+    //
+    void destroy()
+    {
+        if (var_) {
+            pj_atomic_destroy(var_);
+            var_ = NULL;
+        }
+    }
+
+    //
+    // Get pjlib compatible atomic variable.
+    //
+    pj_atomic_t *pj_atomic_t_()
+    {
+	return var_;
+    }
+
+    //
+    // Set the value.
+    //
+    void set(pj_atomic_value_t val)
+    {
+	pj_atomic_set(var_, val);
+    }
+
+    //
+    // Get the value.
+    //
+    pj_atomic_value_t get()
+    {
+	return pj_atomic_get(var_);
+    }
+
+    //
+    // Increment.
+    //
+    void inc()
+    {
+	pj_atomic_inc(var_);
+    }
+
+    //
+    // Increment and get the result.
+    //
+    pj_atomic_value_t inc_and_get()
+    {
+        return pj_atomic_inc_and_get(var_);
+    }
+
+    //
+    // Decrement.
+    //
+    void dec()
+    {
+	pj_atomic_dec(var_);
+    }
+
+    //
+    // Decrement and get the result.
+    //
+    pj_atomic_value_t dec_and_get()
+    {
+        return pj_atomic_dec_and_get(var_);
+    }
+
+    //
+    // Add the variable.
+    //
+    void add(pj_atomic_value_t value)
+    {
+        pj_atomic_add(var_, value);
+    }
+
+    //
+    // Add the variable and get the value.
+    //
+    pj_atomic_value_t add_and_get(pj_atomic_value_t value)
+    {
+        return pj_atomic_add_and_get(var_, value );
+    }
+
+private:
+    pj_atomic_t *var_;
+};
+
+
+//
+// Mutex
+//
+class Pj_Mutex : public Pj_Object
+{
+public:
+    //
+    // Mutex type.
+    //
+    enum Type
+    {
+	DEFAULT = PJ_MUTEX_DEFAULT,
+	SIMPLE = PJ_MUTEX_SIMPLE,
+	RECURSE = PJ_MUTEX_RECURSE,
+    };
+
+    //
+    // Default constructor will create default mutex.
+    //
+    explicit Pj_Mutex(Pj_Pool *pool, Type type = DEFAULT,
+                      const char *name = NULL)
+        : mutex_(NULL)
+    {
+        create(pool, type, name);
+    }
+
+    //
+    // Destructor.
+    //
+    ~Pj_Mutex()
+    {
+        destroy();
+    }
+
+    //
+    // Create mutex.
+    //
+    pj_status_t create( Pj_Pool *pool, Type type, const char *name = NULL)
+    {
+        destroy();
+	return pj_mutex_create( pool->pool_(), name, type,
+                                &mutex_ );
+    }
+
+    //
+    // Create simple mutex.
+    //
+    pj_status_t create_simple( Pj_Pool *pool,const char *name = NULL)
+    {
+        return create(pool, SIMPLE, name);
+    }
+
+    //
+    // Create recursive mutex.
+    //
+    pj_status_t create_recursive( Pj_Pool *pool, const char *name = NULL )
+    {
+        return create(pool, RECURSE, name);
+    }
+
+    //
+    // Get pjlib compatible mutex object.
+    //
+    pj_mutex_t *pj_mutex_t_()
+    {
+	return mutex_;
+    }
+
+    //
+    // Destroy mutex.
+    //
+    void destroy()
+    {
+        if (mutex_) {
+	    pj_mutex_destroy(mutex_);
+            mutex_ = NULL;
+        }
+    }
+
+    //
+    // Lock mutex.
+    //
+    pj_status_t acquire()
+    {
+	return pj_mutex_lock(mutex_);
+    }
+
+    //
+    // Unlock mutex.
+    //
+    pj_status_t release()
+    {
+	return pj_mutex_unlock(mutex_);
+    }
+
+    //
+    // Try locking the mutex.
+    //
+    pj_status_t tryacquire()
+    {
+	return pj_mutex_trylock(mutex_);
+    }
+
+private:
+    pj_mutex_t *mutex_;
+};
+
+
+//
+// Semaphore
+//
+class Pj_Semaphore : public Pj_Object
+{
+public:
+    //
+    // Construct semaphore
+    //
+    Pj_Semaphore(Pj_Pool *pool, unsigned max,
+                 unsigned initial = 0, const char *name = NULL)
+    : sem_(NULL)
+    {
+	create(pool, max, initial, name);
+    }
+
+    //
+    // Destructor.
+    //
+    ~Pj_Semaphore()
+    {
+        destroy();
+    }
+
+    //
+    // Create semaphore
+    //
+    pj_status_t create( Pj_Pool *pool, unsigned max,
+                        unsigned initial = 0, const char *name = NULL )
+    {
+        destroy();
+	return pj_sem_create( pool->pool_(), name, initial, max, &sem_);
+    }
+
+    //
+    // Destroy semaphore.
+    //
+    void destroy()
+    {
+        if (sem_) {
+            pj_sem_destroy(sem_);
+            sem_ = NULL;
+        }
+    }
+
+    //
+    // Get pjlib compatible semaphore object.
+    //
+    pj_sem_t *pj_sem_t_()
+    {
+	return (pj_sem_t*)this;
+    }
+
+    //
+    // Wait semaphore.
+    //
+    pj_status_t wait()
+    {
+	return pj_sem_wait(this->pj_sem_t_());
+    }
+
+    //
+    // Wait semaphore.
+    //
+    pj_status_t acquire()
+    {
+	return wait();
+    }
+
+    //
+    // Try wait semaphore.
+    //
+    pj_status_t trywait()
+    {
+	return pj_sem_trywait(this->pj_sem_t_());
+    }
+
+    //
+    // Try wait semaphore.
+    //
+    pj_status_t tryacquire()
+    {
+	return trywait();
+    }
+
+    //
+    // Post semaphore.
+    //
+    pj_status_t post()
+    {
+	return pj_sem_post(this->pj_sem_t_());
+    }
+
+    //
+    // Post semaphore.
+    //
+    pj_status_t release()
+    {
+	return post();
+    }
+
+private:
+    pj_sem_t *sem_;
+};
+
+
+//
+// Event object.
+//
+class Pj_Event
+{
+public:
+    //
+    // Construct event object.
+    //
+    Pj_Event( Pj_Pool *pool, bool manual_reset = false,
+              bool initial = false, const char *name = NULL )
+    : event_(NULL)
+    {
+        create(pool, manual_reset, initial, name);
+    }
+
+    //
+    // Destructor.
+    //
+    ~Pj_Event()
+    {
+        destroy();
+    }
+
+    //
+    // Create event object.
+    //
+    pj_status_t create( Pj_Pool *pool, bool manual_reset = false, 
+                        bool initial = false, const char *name = NULL)
+    {
+        destroy();
+	return pj_event_create(pool->pool_(), name, manual_reset, initial,
+                               &event_);
+    }
+
+    //
+    // Get pjlib compatible event object.
+    //
+    pj_event_t *pj_event_t_()
+    {
+	return event_;
+    }
+
+    //
+    // Destroy event object.
+    //
+    void destroy()
+    {
+        if (event_) {
+	    pj_event_destroy(event_);
+            event_ = NULL;
+        }
+    }
+
+    //
+    // Wait.
+    //
+    pj_status_t wait()
+    {
+	return pj_event_wait(event_);
+    }
+
+    //
+    // Try wait.
+    //
+    pj_status_t trywait()
+    {
+	return pj_event_trywait(event_);
+    }
+
+    //
+    // Set event state to signalled.
+    //
+    pj_status_t set()
+    {
+	return pj_event_set(this->pj_event_t_());
+    }
+
+    //
+    // Release one waiting thread.
+    //
+    pj_status_t pulse()
+    {
+	return pj_event_pulse(this->pj_event_t_());
+    }
+
+    //
+    // Set a non-signalled.
+    //
+    pj_status_t reset()
+    {
+	return pj_event_reset(this->pj_event_t_());
+    }
+
+private:
+    pj_event_t *event_;
+};
+
+//
+// Timestamp
+//
+class Pj_Timestamp
+{
+public:
+    pj_status_t get_timestamp()
+    {
+	return pj_get_timestamp(&ts_);
+    }
+
+    Pj_Timestamp& operator += (const Pj_Timestamp &rhs)
+    {
+	pj_add_timestamp(&ts_, &rhs.ts_);
+	return *this;
+    }
+
+    Pj_Timestamp& operator -= (const Pj_Timestamp &rhs)
+    {
+	pj_sub_timestamp(&ts_, &rhs.ts_);
+	return *this;
+    }
+
+    Pj_Time_Val to_time() const
+    {
+	Pj_Timestamp zero;
+	pj_memset(&zero, 0, sizeof(zero));
+	return Pj_Time_Val(pj_elapsed_time(&zero.ts_, &ts_));
+    }
+
+    pj_uint32_t to_msec() const
+    {
+	Pj_Timestamp zero;
+	pj_memset(&zero, 0, sizeof(zero));
+	return pj_elapsed_msec(&zero.ts_, &ts_);
+    }
+
+    pj_uint32_t to_usec() const
+    {
+	Pj_Timestamp zero;
+	pj_memset(&zero, 0, sizeof(zero));
+	return pj_elapsed_usec(&zero.ts_, &ts_);
+    }
+
+    pj_uint32_t to_nanosec() const
+    {
+	Pj_Timestamp zero;
+	pj_memset(&zero, 0, sizeof(zero));
+	return pj_elapsed_nanosec(&zero.ts_, &ts_);
+    }
+
+    pj_uint32_t to_cycle() const
+    {
+	Pj_Timestamp zero;
+	pj_memset(&zero, 0, sizeof(zero));
+	return pj_elapsed_cycle(&zero.ts_, &ts_);
+    }
+
+private:
+    pj_timestamp    ts_;
+};
+
+
+//
+// OS abstraction.
+//
+class Pj_OS_API
+{
+public:
+    //
+    // Get current time.
+    //
+    static pj_status_t gettimeofday( Pj_Time_Val *tv )
+    {
+	return pj_gettimeofday(tv);
+    }
+
+    //
+    // Parse to time of day.
+    //
+    static pj_status_t time_decode( const Pj_Time_Val *tv, 
+                                    pj_parsed_time *pt )
+    {
+	return pj_time_decode(tv, pt);
+    }
+
+    //
+    // Parse from time of day.
+    //
+    static pj_status_t time_encode( const pj_parsed_time *pt, 
+                                    Pj_Time_Val *tv)
+    {
+	return pj_time_encode(pt, tv);
+    }
+
+    //
+    // Convert to GMT.
+    //
+    static pj_status_t time_local_to_gmt( Pj_Time_Val *tv )
+    {
+	return pj_time_local_to_gmt( tv );
+    }
+
+    //
+    // Convert time to local.
+    //
+    static pj_status_t time_gmt_to_local( Pj_Time_Val *tv) 
+    {
+	return pj_time_gmt_to_local( tv );
+    }
+};
+
+//
+// Timeval inlines.
+//
+inline pj_status_t Pj_Time_Val::gettimeofday()
+{
+    return Pj_OS_API::gettimeofday(this);
+}
+
+inline pj_parsed_time Pj_Time_Val::decode()
+{
+    pj_parsed_time pt;
+    Pj_OS_API::time_decode(this, &pt);
+    return pt;
+}
+
+inline pj_status_t Pj_Time_Val::encode(const pj_parsed_time *pt)
+{
+    return Pj_OS_API::time_encode(pt, this);
+}
+
+inline pj_status_t Pj_Time_Val::to_gmt()
+{
+    return Pj_OS_API::time_local_to_gmt(this);
+}
+
+inline pj_status_t Pj_Time_Val::to_local()
+{
+    return Pj_OS_API::time_gmt_to_local(this);
+}
+
+#endif	/* __PJPP_OS_HPP__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj++/pool.hpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj++/pool.hpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj++/pool.hpp	(revision 1163)
@@ -0,0 +1,278 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 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 __PJPP_POOL_HPP__
+#define __PJPP_POOL_HPP__
+
+#include <pj/pool.h>
+
+class Pj_Pool;
+class Pj_Caching_Pool;
+
+//
+// Base class for all Pjlib objects
+//
+class Pj_Object
+{
+public:
+    void *operator new(unsigned int class_size, Pj_Pool *pool);
+    void *operator new(unsigned int class_size, Pj_Pool &pool);
+
+    void operator delete(void*)
+    {
+    }
+
+    void operator delete(void*, Pj_Pool*)
+    {
+    }
+
+    void operator delete(void*, Pj_Pool&)
+    {
+    }
+
+    //
+    // Inline implementations at the end of this file.
+    //
+
+private:
+    // Can not use normal new operator; must use pool.
+    // e.g.:
+    //   obj = new(pool) Pj_The_Object(pool, ...);
+    //
+    void *operator new(unsigned int)
+    {}
+};
+
+
+//
+// Pool.
+//
+class Pj_Pool : public Pj_Object
+{
+public:
+    //
+    // Default constructor, initializes internal pool to NULL.
+    // Application must call attach() some time later.
+    //
+    Pj_Pool()
+        : p_(NULL)
+    {
+    }
+
+    //
+    // Create pool.
+    //
+    Pj_Pool(Pj_Caching_Pool &caching_pool,
+            pj_size_t initial_size, 
+            pj_size_t increment_size, 
+            const char *name = NULL, 
+            pj_pool_callback *callback = NULL);
+
+    //
+    // Construct from existing pool.
+    //
+    explicit Pj_Pool(pj_pool_t *pool)
+        : p_(pool)
+    {
+    }
+
+    //
+    // Attach existing pool.
+    //
+    void attach(pj_pool_t *pool)
+    {
+        p_ = pool;
+    }
+
+    //
+    // Destructor.
+    //
+    // Release pool back to factory. Remember: if you delete pool, then 
+    // make sure that all objects that have been allocated from this pool
+    // have been properly destroyed.
+    //
+    // This is where C++ is trickier than plain C!!
+    //
+    ~Pj_Pool()
+    {
+        if (p_)
+	    pj_pool_release(p_);
+    }
+
+    //
+    // Get name.
+    //
+    const char *getobjname() const
+    {
+	return pj_pool_getobjname(p_);
+    }
+
+    //
+    // You can cast Pj_Pool to pj_pool_t*
+    //
+    operator pj_pool_t*()
+    {
+	return p_;
+    }
+
+    //
+    // Get pjlib compatible pool object.
+    //
+    pj_pool_t *pool_()
+    {
+	return p_;
+    }
+
+    //
+    // Get pjlib compatible pool object.
+    //
+    const pj_pool_t *pool_() const
+    {
+	return p_;
+    }
+
+    //
+    // Get pjlib compatible pool object.
+    //
+    pj_pool_t *pj_pool_t_()
+    {
+	return p_;
+    }
+
+    //
+    // Reset pool.
+    //
+    void reset()
+    {
+	pj_pool_reset(p_);
+    }
+
+    //
+    // Get current capacity.
+    //
+    pj_size_t get_capacity()
+    {
+	pj_pool_get_capacity(p_);
+    }
+
+    //
+    // Get current total bytes allocated from the pool.
+    //
+    pj_size_t get_used_size()
+    {
+	pj_pool_get_used_size(p_);
+    }
+
+    //
+    // Allocate.
+    //
+    void *alloc(pj_size_t size)
+    {
+	return pj_pool_alloc(p_, size);
+    }
+
+    //
+    // Allocate elements and zero fill the memory.
+    //
+    void *calloc(pj_size_t count, pj_size_t elem)
+    {
+	return pj_pool_calloc(p_, count, elem);
+    }
+
+    //
+    // Allocate and zero fill memory.
+    //
+    void *zalloc(pj_size_t size)
+    {
+        return pj_pool_zalloc(p_, size);
+    }
+
+private:
+    pj_pool_t *p_;
+};
+
+
+//
+// Caching pool.
+//
+class Pj_Caching_Pool
+{
+public:
+    //
+    // Construct caching pool.
+    //
+    Pj_Caching_Pool( pj_size_t cache_capacity = 0,
+	             const pj_pool_factory_policy *pol=&pj_pool_factory_default_policy)
+    {
+	pj_caching_pool_init(&cp_, pol, cache_capacity);
+    }
+
+    //
+    // Destroy caching pool.
+    //
+    ~Pj_Caching_Pool()
+    {
+	pj_caching_pool_destroy(&cp_);
+    }
+
+    //
+    // Create pool.
+    //
+    pj_pool_t *create_pool( pj_size_t initial_size, 
+                            pj_size_t increment_size, 
+                            const char *name = NULL, 
+                            pj_pool_callback *callback = NULL)
+    {
+	return (pj_pool_t*)(*cp_.factory.create_pool)(&cp_.factory, name, 
+                                                     initial_size, 
+                                                     increment_size, 
+                                                     callback);
+    }
+
+private:
+    pj_caching_pool cp_;
+};
+
+//
+// Inlines for Pj_Object
+//
+inline void *Pj_Object::operator new(unsigned int class_size, Pj_Pool *pool)
+{
+    return pool->alloc(class_size);
+}
+inline void *Pj_Object::operator new(unsigned int class_size, Pj_Pool &pool)
+{
+    return pool.alloc(class_size);
+}
+
+//
+// Inlines for Pj_Pool
+//
+inline Pj_Pool::Pj_Pool( Pj_Caching_Pool &caching_pool,
+                         pj_size_t initial_size, 
+                         pj_size_t increment_size, 
+                         const char *name, 
+                         pj_pool_callback *callback)
+{
+    p_ = caching_pool.create_pool(initial_size, increment_size, name,
+                                  callback);
+}
+
+
+#endif	/* __PJPP_POOL_HPP__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj++/proactor.hpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj++/proactor.hpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj++/proactor.hpp	(revision 1163)
@@ -0,0 +1,514 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 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 __PJPP_PROACTOR_HPP__
+#define __PJPP_PROACTOR_HPP__
+
+#include <pj/ioqueue.h>
+#include <pj++/pool.hpp>
+#include <pj++/sock.hpp>
+#include <pj++/timer.hpp>
+#include <pj/errno.h>
+
+class Pj_Proactor;
+class Pj_Event_Handler;
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Asynchronous operation key.
+//
+// Applications may inheric this class to put their application
+// specific data.
+//
+class Pj_Async_Op : public pj_ioqueue_op_key_t
+{
+public:
+    //
+    // Construct with null handler.
+    // App must call set_handler() before use.
+    //
+    Pj_Async_Op()
+        : handler_(NULL)
+    {
+	pj_ioqueue_op_key_init(this, sizeof(*this));
+    }
+
+    //
+    // Constructor.
+    //
+    explicit Pj_Async_Op(Pj_Event_Handler *handler)
+        : handler_(handler)
+    {
+	pj_ioqueue_op_key_init(this, sizeof(*this));
+    }
+
+    //
+    // Set handler.
+    //
+    void set_handler(Pj_Event_Handler *handler)
+    {
+        handler_ = handler;
+    }
+
+    //
+    // Check whether operation is still pending for this key.
+    //
+    bool is_pending();
+
+    //
+    // Cancel the operation.
+    //
+    bool cancel(pj_ssize_t bytes_status=-PJ_ECANCELLED);
+
+protected:
+    Pj_Event_Handler *handler_;
+};
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Event handler.
+//
+// Applications should inherit this class to receive various event
+// notifications.
+//
+// Applications should implement get_socket_handle().
+//
+class Pj_Event_Handler : public Pj_Object
+{
+    friend class Pj_Proactor;
+public:
+    //
+    // Default constructor.
+    //
+    Pj_Event_Handler()
+        : key_(NULL)
+    {
+        pj_memset(&timer_, 0, sizeof(timer_));
+        timer_.user_data = this;
+        timer_.cb = &timer_callback;
+    }
+    
+    //
+    // Destroy.
+    //
+    virtual ~Pj_Event_Handler()
+    {
+        unregister();
+    }
+
+    //
+    // Unregister this handler from the ioqueue.
+    //
+    void unregister()
+    {
+        if (key_) {
+            pj_ioqueue_unregister(key_);
+            key_ = NULL;
+        }
+    }
+
+    //
+    // Get socket handle associated with this.
+    //
+    virtual pj_sock_t get_socket_handle()
+    {
+        return PJ_INVALID_SOCKET;
+    }
+
+    //
+    // Start async receive.
+    //
+    pj_status_t recv( Pj_Async_Op *op_key, 
+                      void *buf, pj_ssize_t *len, 
+                      unsigned flags)
+    {
+        return pj_ioqueue_recv( key_, op_key,
+                                buf, len, flags);
+    }
+
+    //
+    // Start async recvfrom()
+    //
+    pj_status_t recvfrom( Pj_Async_Op *op_key, 
+                          void *buf, pj_ssize_t *len, unsigned flags,
+                          Pj_Inet_Addr *addr)
+    {
+        addr->addrlen_ = sizeof(Pj_Inet_Addr);
+        return pj_ioqueue_recvfrom( key_, op_key, buf, len, flags,
+                                    addr, &addr->addrlen_ );
+    }
+
+    //
+    // Start async send()
+    //
+    pj_status_t send( Pj_Async_Op *op_key, 
+                      const void *data, pj_ssize_t *len, 
+                      unsigned flags)
+    {
+        return pj_ioqueue_send( key_, op_key, data, len, flags);
+    }
+
+    //
+    // Start async sendto()
+    //
+    pj_status_t sendto( Pj_Async_Op *op_key,
+                        const void *data, pj_ssize_t *len, unsigned flags,
+                        const Pj_Inet_Addr &addr)
+    {
+        return pj_ioqueue_sendto(key_, op_key, data, len, flags,
+                                 &addr, sizeof(addr));
+    }
+
+#if PJ_HAS_TCP
+    //
+    // Start async connect()
+    //
+    pj_status_t connect(const Pj_Inet_Addr &addr)
+    {
+        return pj_ioqueue_connect(key_, &addr, sizeof(addr));
+    }
+
+    //
+    // Start async accept().
+    //
+    pj_status_t accept( Pj_Async_Op *op_key,
+                        Pj_Socket *sock, 
+                        Pj_Inet_Addr *local = NULL, 
+                        Pj_Inet_Addr *remote = NULL)
+    {
+        int *addrlen = local ? &local->addrlen_ : NULL;
+        return pj_ioqueue_accept( key_, op_key, &sock->sock_,
+                                  local, remote, addrlen );
+    }
+
+#endif
+
+protected:
+    //////////////////
+    // Overridables
+    //////////////////
+
+    //
+    // Timeout callback.
+    //
+    virtual void on_timeout(int) 
+    {
+    }
+
+    //
+    // On read complete callback.
+    //
+    virtual void on_read_complete( Pj_Async_Op*, pj_ssize_t) 
+    {
+    }
+
+    //
+    // On write complete callback.
+    //
+    virtual void on_write_complete( Pj_Async_Op *, pj_ssize_t) 
+    {
+    }
+
+#if PJ_HAS_TCP
+    //
+    // On connect complete callback.
+    //
+    virtual void on_connect_complete(pj_status_t) 
+    {
+    }
+
+    //
+    // On new connection callback.
+    //
+    virtual void on_accept_complete( Pj_Async_Op*, pj_sock_t, pj_status_t) 
+    {
+    }
+
+#endif
+
+
+private:
+    pj_ioqueue_key_t *key_;
+    pj_timer_entry    timer_;
+
+    friend class Pj_Proactor;
+    friend class Pj_Async_Op;
+
+    //
+    // Static timer callback.
+    //
+    static void timer_callback( pj_timer_heap_t*, 
+                                struct pj_timer_entry *entry)
+    {
+        Pj_Event_Handler *handler = 
+            (Pj_Event_Handler*) entry->user_data;
+
+        handler->on_timeout(entry->id);
+    }
+};
+
+inline bool Pj_Async_Op::is_pending()
+{
+    return pj_ioqueue_is_pending(handler_->key_, this) != 0;
+}
+
+inline bool Pj_Async_Op::cancel(pj_ssize_t bytes_status)
+{
+    return pj_ioqueue_post_completion(handler_->key_, this, 
+                                      bytes_status) == PJ_SUCCESS;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+// Proactor
+//
+class Pj_Proactor : public Pj_Object
+{
+public:
+    //
+    // Default constructor, initializes to NULL.
+    //
+    Pj_Proactor()
+        : ioq_(NULL), th_(NULL)
+    {
+        cb_.on_read_complete    = &read_complete_cb;
+        cb_.on_write_complete   = &write_complete_cb;
+        cb_.on_accept_complete  = &accept_complete_cb;
+        cb_.on_connect_complete = &connect_complete_cb;
+    }
+
+    //
+    // Construct proactor.
+    //
+    Pj_Proactor( Pj_Pool *pool, pj_size_t max_fd,
+                 pj_size_t max_timer_entries )
+    : ioq_(NULL), th_(NULL)
+    {
+        cb_.on_read_complete    = &read_complete_cb;
+        cb_.on_write_complete   = &write_complete_cb;
+        cb_.on_accept_complete  = &accept_complete_cb;
+        cb_.on_connect_complete = &connect_complete_cb;
+
+        create(pool, max_fd, max_timer_entries);
+    }
+
+    //
+    // Destructor.
+    //
+    ~Pj_Proactor()
+    {
+        destroy();
+    }
+
+    //
+    // Create proactor.
+    //
+    pj_status_t create( Pj_Pool *pool, pj_size_t max_fd, 
+			pj_size_t timer_entry_count)
+    {
+        pj_status_t status;
+
+        destroy();
+
+        status = pj_ioqueue_create(pool->pool_(), max_fd, &ioq_);
+        if (status != PJ_SUCCESS) 
+            return status;
+        
+        status = pj_timer_heap_create(pool->pool_(), 
+                                      timer_entry_count, &th_);
+        if (status != PJ_SUCCESS) {
+            pj_ioqueue_destroy(ioq_);
+            ioq_ = NULL;
+            return NULL;
+        }
+        
+        return status;
+    }
+
+    //
+    // Destroy proactor.
+    //
+    void destroy()
+    {
+        if (ioq_) {
+            pj_ioqueue_destroy(ioq_);
+            ioq_ = NULL;
+        }
+        if (th_) {
+            pj_timer_heap_destroy(th_);
+            th_ = NULL;
+        }
+    }
+
+    //
+    // Register handler.
+    // This will call handler->get_socket_handle()
+    //
+    pj_status_t register_socket_handler(Pj_Pool *pool, 
+                                        Pj_Event_Handler *handler)
+    {
+        return   pj_ioqueue_register_sock( pool->pool_(), ioq_,
+                                           handler->get_socket_handle(),
+                                           handler, &cb_, &handler->key_ );
+    }
+
+    //
+    // Unregister handler.
+    //
+    static void unregister_handler(Pj_Event_Handler *handler)
+    {
+        if (handler->key_) {
+            pj_ioqueue_unregister( handler->key_ );
+            handler->key_ = NULL;
+        }
+    }
+
+    //
+    // Scheduler timer.
+    //
+    bool schedule_timer( Pj_Event_Handler *handler, 
+                         const Pj_Time_Val &delay, 
+                         int id=-1)
+    {
+        return schedule_timer(th_, handler, delay, id);
+    }
+
+    //
+    // Cancel timer.
+    //
+    bool cancel_timer(Pj_Event_Handler *handler)
+    {
+        return pj_timer_heap_cancel(th_, &handler->timer_) == 1;
+    }
+
+    //
+    // Handle events.
+    //
+    int handle_events(Pj_Time_Val *max_timeout)
+    {
+        Pj_Time_Val timeout(0, 0);
+        int timer_count;
+
+        timer_count = pj_timer_heap_poll( th_, &timeout );
+
+        if (timeout.get_sec() < 0) 
+            timeout.sec = PJ_MAXINT32;
+
+        /* If caller specifies maximum time to wait, then compare the value 
+         * with the timeout to wait from timer, and use the minimum value.
+         */
+        if (max_timeout && timeout >= *max_timeout) {
+	    timeout = *max_timeout;
+        }
+
+        /* Poll events in ioqueue. */
+        int ioqueue_count;
+
+        ioqueue_count = pj_ioqueue_poll(ioq_, &timeout);
+        if (ioqueue_count < 0)
+	    return ioqueue_count;
+
+        return ioqueue_count + timer_count;
+    }
+
+    //
+    // Get the internal ioqueue object.
+    //
+    pj_ioqueue_t *get_io_queue()
+    {
+        return ioq_;
+    }
+
+    //
+    // Get the internal timer heap object.
+    //
+    pj_timer_heap_t *get_timer_heap()
+    {
+        return th_;
+    }
+
+private:
+    pj_ioqueue_t *ioq_;
+    pj_timer_heap_t *th_;
+    pj_ioqueue_callback cb_;
+
+    static bool schedule_timer( pj_timer_heap_t *timer, 
+                                Pj_Event_Handler *handler,
+				const Pj_Time_Val &delay, 
+                                int id=-1)
+    {
+        handler->timer_.id = id;
+        return pj_timer_heap_schedule(timer, &handler->timer_, &delay) == 0;
+    }
+
+
+    //
+    // Static read completion callback.
+    //
+    static void read_complete_cb( pj_ioqueue_key_t *key, 
+                                  pj_ioqueue_op_key_t *op_key, 
+                                  pj_ssize_t bytes_read)
+    {
+        Pj_Event_Handler *handler = 
+	    (Pj_Event_Handler*) pj_ioqueue_get_user_data(key);
+
+        handler->on_read_complete((Pj_Async_Op*)op_key, bytes_read);
+    }
+
+    //
+    // Static write completion callback.
+    //
+    static void write_complete_cb(pj_ioqueue_key_t *key, 
+                                  pj_ioqueue_op_key_t *op_key,
+                                  pj_ssize_t bytes_sent)
+    {
+        Pj_Event_Handler *handler = 
+	    (Pj_Event_Handler*) pj_ioqueue_get_user_data(key);
+
+        handler->on_write_complete((Pj_Async_Op*)op_key, bytes_sent);
+    }
+
+    //
+    // Static accept completion callback.
+    //
+    static void accept_complete_cb(pj_ioqueue_key_t *key, 
+                                   pj_ioqueue_op_key_t *op_key,
+                                   pj_sock_t new_sock,
+                                   pj_status_t status)
+    {
+        Pj_Event_Handler *handler = 
+	    (Pj_Event_Handler*) pj_ioqueue_get_user_data(key);
+
+        handler->on_accept_complete((Pj_Async_Op*)op_key, new_sock, status);
+    }
+
+    //
+    // Static connect completion callback.
+    //
+    static void connect_complete_cb(pj_ioqueue_key_t *key, 
+                                    pj_status_t status)
+    {
+        Pj_Event_Handler *handler = 
+	    (Pj_Event_Handler*) pj_ioqueue_get_user_data(key);
+
+        handler->on_connect_complete(status);
+    }
+
+};
+
+#endif	/* __PJPP_PROACTOR_HPP__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj++/scanner.hpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj++/scanner.hpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj++/scanner.hpp	(revision 1163)
@@ -0,0 +1,245 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 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 __PJPP_SCANNER_HPP__
+#define __PJPP_SCANNER_HPP__
+
+#include <pjlib-util/scanner.h>
+#include <pj++/string.hpp>
+
+class Pj_Cis;
+class Pj_Cis_Buffer;
+class Pj_Scanner;
+
+class Pj_Cis_Buffer
+{
+    friend class Pj_Cis;
+
+public:
+    Pj_Cis_Buffer() 
+    { 
+	pj_cis_buf_init(&buf_); 
+    }
+
+private:
+    pj_cis_buf_t buf_;
+};
+
+
+class Pj_Cis
+{
+    friend class Pj_Scanner;
+
+public:
+    Pj_Cis(Pj_Cis_Buffer *buf)
+    {
+	pj_cis_init(&buf->buf_, &cis_);
+    }
+
+    Pj_Cis(const Pj_Cis &rhs)
+    {
+	pj_cis_dup(&cis_, (pj_cis_t*)&rhs.cis_);
+    }
+
+    void add_range(int start, int end)
+    {
+	pj_cis_add_range(&cis_, start, end);
+    }
+
+    void add_alpha()
+    {
+	pj_cis_add_alpha(&cis_);
+    }
+
+    void add_num()
+    {
+	pj_cis_add_num(&cis_);
+    }
+
+    void add_str(const char *str)
+    {
+	pj_cis_add_str(&cis_, str);
+    }
+
+    void add_cis(const Pj_Cis &rhs)
+    {
+	pj_cis_add_cis(&cis_, &rhs.cis_);
+    }
+
+    void del_range(int start, int end)
+    {
+	pj_cis_del_range(&cis_, start, end);
+    }
+
+    void del_str(const char *str)
+    {
+	pj_cis_del_str(&cis_, str);
+    }
+
+    void invert()
+    {
+	pj_cis_invert(&cis_);
+    }
+
+    bool match(int c) const
+    {
+	return pj_cis_match(&cis_, c) != 0;
+    }
+
+private:
+    pj_cis_t cis_;
+};
+
+
+
+class Pj_Scanner
+{
+public:
+    Pj_Scanner() {}
+
+    enum
+    {
+	SYNTAX_ERROR = 101
+    };
+    static void syntax_error_handler_throw_pj(pj_scanner *);
+
+    typedef pj_scan_state State;
+
+    void init(char *buf, int len, unsigned options=PJ_SCAN_AUTOSKIP_WS, 
+	      pj_syn_err_func_ptr callback = &syntax_error_handler_throw_pj)
+    {
+	pj_scan_init(&scanner_, buf, len, options, callback);
+    }
+
+    void fini()
+    {
+	pj_scan_fini(&scanner_);
+    }
+
+    int eof() const
+    {
+	return pj_scan_is_eof(&scanner_);
+    }
+
+    int peek_char() const
+    {
+	return *scanner_.curptr;
+    }
+
+    int peek(const Pj_Cis *cis, Pj_String *out)
+    {
+	return pj_scan_peek(&scanner_,  &cis->cis_, out);
+    }
+
+    int peek_n(pj_size_t len, Pj_String *out)
+    {
+	return pj_scan_peek_n(&scanner_, len, out);
+    }
+
+    int peek_until(const Pj_Cis *cis, Pj_String *out)
+    {
+	return pj_scan_peek_until(&scanner_, &cis->cis_, out);
+    }
+
+    void get(const Pj_Cis *cis, Pj_String *out)
+    {
+	pj_scan_get(&scanner_, &cis->cis_, out);
+    }
+
+    void get_n(unsigned N, Pj_String *out)
+    {
+	pj_scan_get_n(&scanner_, N, out);
+    }
+
+    int get_char()
+    {
+	return pj_scan_get_char(&scanner_);
+    }
+
+    void get_quote(int begin_quote, int end_quote, Pj_String *out)
+    {
+	pj_scan_get_quote(&scanner_, begin_quote, end_quote, out);
+    }
+
+    void get_newline()
+    {
+	pj_scan_get_newline(&scanner_);
+    }
+
+    void get_until(const Pj_Cis *cis, Pj_String *out)
+    {
+	pj_scan_get_until(&scanner_, &cis->cis_, out);
+    }
+
+    void get_until_ch(int until_ch, Pj_String *out)
+    {
+	pj_scan_get_until_ch(&scanner_, until_ch, out);
+    }
+
+    void get_until_chr(const char *spec, Pj_String *out)
+    {
+	pj_scan_get_until_chr(&scanner_, spec, out);
+    }
+
+    void advance_n(unsigned N, bool skip_ws=true)
+    {
+	pj_scan_advance_n(&scanner_, N, skip_ws);
+    }
+
+    int strcmp(const char *s, int len)
+    {
+	return pj_scan_strcmp(&scanner_, s, len);
+    }
+
+    int stricmp(const char *s, int len)
+    {
+	return pj_scan_stricmp(&scanner_, s, len);
+    }
+
+    void skip_ws()
+    {
+	pj_scan_skip_whitespace(&scanner_);
+    }
+
+    void save_state(State *state) const
+    {
+	pj_scan_save_state(&scanner_, state);
+    }
+
+    void restore_state(State *state)
+    {
+	pj_scan_restore_state(&scanner_, state);
+    }
+
+    int get_pos_line() const
+    {
+	return scanner_.line;
+    }
+
+    int get_pos_col() const
+    {
+	return pj_scan_get_col(&scanner_);
+    }
+
+
+private:
+    pj_scanner scanner_;
+};
+
+#endif	/* __PJPP_SCANNER_HPP__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj++/sock.hpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj++/sock.hpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj++/sock.hpp	(revision 1163)
@@ -0,0 +1,443 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 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 __PJPP_SOCK_HPP__
+#define __PJPP_SOCK_HPP__
+
+#include <pj/sock.h>
+#include <pj/string.h>
+
+class Pj_Event_Handler;
+
+//
+// Base class for address.
+//
+class Pj_Addr
+{
+};
+
+//
+// Internet address.
+//
+class Pj_Inet_Addr : public pj_sockaddr_in, public Pj_Addr
+{
+public:
+    //
+    // Get port number.
+    //
+    pj_uint16_t get_port_number() const
+    {
+	return pj_sockaddr_in_get_port(this);
+    }
+
+    //
+    // Set port number.
+    //
+    void set_port_number(pj_uint16_t port)
+    {
+	sin_family = PJ_AF_INET;
+	pj_sockaddr_in_set_port(this, port);
+    }
+
+    //
+    // Get IP address.
+    //
+    pj_uint32_t get_ip_address() const
+    {
+	return pj_sockaddr_in_get_addr(this).s_addr;
+    }
+
+    //
+    // Get address string.
+    //
+    const char *get_address() const
+    {
+	return pj_inet_ntoa(sin_addr);
+    }
+
+    //
+    // Set IP address.
+    //
+    void set_ip_address(pj_uint32_t addr)
+    {
+	sin_family = PJ_AF_INET;
+	pj_sockaddr_in_set_addr(this, addr);
+    }
+
+    //
+    // Set address.
+    //
+    pj_status_t set_address(const pj_str_t *addr)
+    {
+	return pj_sockaddr_in_set_str_addr(this, addr);
+    }
+
+    //
+    // Set address.
+    //
+    pj_status_t set_address(const char *addr)
+    {
+        pj_str_t s;
+	return pj_sockaddr_in_set_str_addr(this, pj_cstr(&s, addr));
+    }
+
+    //
+    // Compare for equality.
+    //
+    bool operator==(const Pj_Inet_Addr &rhs) const
+    {
+	return sin_family == rhs.sin_family &&
+               sin_addr.s_addr == rhs.sin_addr.s_addr &&
+               sin_port == rhs.sin_port;
+    }
+
+private:
+    //
+    // Dummy length used in pj_ioqueue_recvfrom() etc
+    //
+    friend class Pj_Event_Handler;
+    friend class Pj_Socket;
+    friend class Pj_Sock_Stream;
+    friend class Pj_Sock_Dgram;
+
+    int addrlen_;
+};
+
+
+//
+// Socket base class.
+//
+// Note:
+//  socket will not automatically be closed on destructor.
+//
+class Pj_Socket
+{
+public:
+    //
+    // Default constructor.
+    //
+    Pj_Socket()
+        : sock_(PJ_INVALID_SOCKET) 
+    {
+    }
+
+    //
+    // Initialize from a socket handle.
+    //
+    explicit Pj_Socket(pj_sock_t sock)
+        : sock_(sock)
+    {
+    }
+
+    //
+    // Copy constructor.
+    //
+    Pj_Socket(const Pj_Socket &rhs) 
+        : sock_(rhs.sock_) 
+    {
+    }
+
+    //
+    // Destructor will not close the socket.
+    // You must call close() explicitly.
+    //
+    ~Pj_Socket()
+    {
+    }
+
+    //
+    // Set socket handle.
+    //
+    void set_handle(pj_sock_t sock)
+    {
+	sock_ = sock;
+    }
+
+    //
+    // Get socket handle.
+    //
+    pj_sock_t get_handle() const
+    {
+	return sock_;
+    }
+
+    //
+    // Get socket handle.
+    //
+    pj_sock_t& get_handle()
+    {
+	return sock_;
+    }
+
+    //
+    // See if the socket is valid.
+    //
+    bool is_valid() const
+    {
+        return sock_ != PJ_INVALID_SOCKET;
+    }
+
+    //
+    // Create the socket.
+    //
+    pj_status_t create(int af, int type, int proto)
+    {
+	return pj_sock_socket(af, type, proto, &sock_);
+    }
+
+    //
+    // Bind socket.
+    //
+    pj_status_t bind(const Pj_Inet_Addr &addr)
+    {
+	return pj_sock_bind(sock_, &addr, sizeof(Pj_Inet_Addr));
+    }
+
+    //
+    // Close socket.
+    //
+    pj_status_t close()
+    {
+	pj_sock_close(sock_);
+    }
+
+    //
+    // Get peer socket name.
+    //
+    pj_status_t getpeername(Pj_Inet_Addr *addr)
+    {
+	return pj_sock_getpeername(sock_, addr, &addr->addrlen_);
+    }
+
+    //
+    // getsockname
+    //
+    pj_status_t getsockname(Pj_Inet_Addr *addr)
+    {
+	return pj_sock_getsockname(sock_, addr, &addr->addrlen_);
+    }
+
+    //
+    // getsockopt.
+    //
+    pj_status_t getsockopt(pj_uint16_t level, pj_uint16_t optname, 
+                           void *optval, int *optlen)
+    {
+	return pj_sock_getsockopt(sock_, level, optname, optval, optlen);
+    }
+
+    //
+    // setsockopt
+    // 
+    pj_status_t setsockopt(pj_uint16_t level, pj_uint16_t optname, 
+                           const void *optval, int optlen)
+    {
+	return pj_sock_setsockopt(sock_, level, optname, optval, optlen);
+    }
+
+    //
+    // receive data.
+    //
+    pj_ssize_t recv(void *buf, pj_size_t len, int flag = 0)
+    {
+        pj_ssize_t bytes = len;
+	if (pj_sock_recv(sock_, buf, &bytes, flag) != PJ_SUCCESS)
+            return -1;
+        return bytes;
+    }
+
+    //
+    // send data.
+    //
+    pj_ssize_t send(const void *buf, pj_ssize_t len, int flag = 0)
+    {
+        pj_ssize_t bytes = len;
+	if (pj_sock_send(sock_, buf, &bytes, flag) != PJ_SUCCESS)
+            return -1;
+        return bytes;
+    }
+
+    //
+    // connect.
+    //
+    pj_status_t connect(const Pj_Inet_Addr &addr)
+    {
+	return pj_sock_connect(sock_, &addr, sizeof(Pj_Inet_Addr));
+    }
+
+    //
+    // assignment.
+    //
+    Pj_Socket &operator=(const Pj_Socket &rhs)
+    {
+        sock_ = rhs.sock_;
+        return *this;
+    }
+
+protected:
+    friend class Pj_Event_Handler;
+    pj_sock_t sock_;
+};
+
+
+#if PJ_HAS_TCP
+//
+// Stream socket.
+//
+class Pj_Sock_Stream : public Pj_Socket
+{
+public:
+    //
+    // Default constructor.
+    //
+    Pj_Sock_Stream() 
+    {
+    }
+
+    //
+    // Initialize from a socket handle.
+    //
+    explicit Pj_Sock_Stream(pj_sock_t sock)
+        : Pj_Socket(sock)
+    {
+    }
+
+    //
+    // Copy constructor.
+    //
+    Pj_Sock_Stream(const Pj_Sock_Stream &rhs) : Pj_Socket(rhs) 
+    {
+    }
+
+    //
+    // Assignment.
+    //
+    Pj_Sock_Stream &operator=(const Pj_Sock_Stream &rhs) 
+    { 
+        sock_ = rhs.sock_; 
+        return *this; 
+    }
+
+    //
+    // listen()
+    //
+    pj_status_t listen(int backlog = 5)
+    {
+	return pj_sock_listen(sock_, backlog);
+    }
+
+    //
+    // blocking accept()
+    //
+    Pj_Sock_Stream accept(Pj_Inet_Addr *remote_addr = NULL)
+    {
+        pj_sock_t newsock;
+        int *addrlen = remote_addr ? &remote_addr->addrlen_ : NULL;
+        pj_status_t status;
+        
+        status = pj_sock_accept(sock_, &newsock, remote_addr, addrlen);
+        if (status != PJ_SUCCESS)
+            return Pj_Sock_Stream(-1);
+
+        return Pj_Sock_Stream(newsock);
+    }
+
+    //
+    // shutdown()
+    //
+    pj_status_t shutdown(int how = PJ_SHUT_RDWR)
+    {
+	return pj_sock_shutdown(sock_, how);
+    }
+
+};
+#endif
+
+//
+// Datagram socket.
+//
+class Pj_Sock_Dgram : public Pj_Socket
+{
+public:
+    //
+    // Default constructor.
+    //
+    Pj_Sock_Dgram() 
+    {
+    }
+
+    //
+    // Initialize from a socket handle.
+    //
+    explicit Pj_Sock_Dgram(pj_sock_t sock)
+        : Pj_Socket(sock)
+    {
+    }
+
+    //
+    // Copy constructor.
+    //
+    Pj_Sock_Dgram(const Pj_Sock_Dgram &rhs) 
+        : Pj_Socket(rhs) 
+    {
+    }
+
+    //
+    // Assignment.
+    //
+    Pj_Sock_Dgram &operator=(const Pj_Sock_Dgram &rhs) 
+    { 
+        Pj_Socket::operator =(rhs);
+        return *this; 
+    }
+
+    //
+    // recvfrom()
+    //
+    pj_ssize_t recvfrom( void *buf, pj_size_t len, int flag = 0, 
+                         Pj_Inet_Addr *fromaddr = NULL)
+    {
+        pj_ssize_t bytes = len;
+        int *addrlen = fromaddr ? &fromaddr->addrlen_ : NULL;
+	if (pj_sock_recvfrom( sock_, buf, &bytes, flag, 
+                              fromaddr, addrlen) != PJ_SUCCESS)
+        {
+            return -1;
+        }
+        return bytes;
+    }
+
+    //
+    // sendto()
+    //
+    pj_ssize_t sendto( const void *buf, pj_size_t len, int flag, 
+                       const Pj_Inet_Addr &addr)
+    {
+        pj_ssize_t bytes = len;
+	if (pj_sock_sendto( sock_, buf, &bytes, flag, 
+                            &addr, sizeof(pj_sockaddr_in)) != PJ_SUCCESS)
+        {
+            return -1;
+        }
+        return bytes;
+    }
+};
+
+
+#endif	/* __PJPP_SOCK_HPP__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj++/string.hpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj++/string.hpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj++/string.hpp	(revision 1163)
@@ -0,0 +1,467 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 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 __PJPP_STRING_HPP__
+#define __PJPP_STRING_HPP__
+
+#include <pj/string.h>
+#include <pj++/pool.hpp>
+#include <pj/assert.h>
+
+//
+// String wrapper class for pj_str_t.
+//
+class Pj_String : public pj_str_t
+{
+public:
+    //
+    // Default constructor.
+    //
+    Pj_String() 
+    { 
+	pj_assert(sizeof(Pj_String) == sizeof(pj_str_t));
+	ptr=NULL; 
+        slen=0; 
+    }
+
+    //
+    // Construct the buffer from a char* (use with care)
+    //
+    Pj_String(char *str) 
+    { 
+	set(str);
+    }
+
+    //
+    // Construct from a const char*.
+    //
+    Pj_String(Pj_Pool &pool, const char *src)
+    {
+	set(pool, src);
+    }
+
+    //
+    // Construct from pj_str_t&.
+    //
+    explicit Pj_String(pj_str_t &s)
+    {
+	ptr = s.ptr;
+	slen = s.slen;
+    }
+
+    //
+    // Construct from const pj_str_t& (use with care!).
+    //
+    explicit Pj_String(const pj_str_t &s)
+    {
+	ptr = (char*)s.ptr;
+	slen = s.slen;
+    }
+
+    //
+    // Construct by copying from const pj_str_t*.
+    //
+    Pj_String(Pj_Pool &pool, const pj_str_t *s)
+    {
+	set(pool, s);
+    }
+
+    //
+    // Construct by copying from Pj_String
+    //
+    Pj_String(Pj_Pool &pool, const Pj_String &rhs)
+    {
+	set(pool, rhs);
+    }
+
+    //
+    // Construct from another Pj_String, use with care!
+    //
+    explicit Pj_String(const Pj_String &rhs)
+    {
+	ptr = rhs.ptr;
+	slen = rhs.slen;
+    }
+
+    //
+    // Construct from a char* and a length.
+    //
+    Pj_String(char *str, pj_size_t len)
+    {
+	set(str, len);
+    }
+
+    //
+    // Construct from pair of pointer.
+    //
+    Pj_String(char *begin, char *end)
+    {
+	pj_strset3(this, begin, end);
+    }
+
+    //
+    // You can cast Pj_String to pj_str_t*
+    //
+    operator pj_str_t*()
+    {
+	return this;
+    }
+
+    //
+    // You can cast const Pj_String to const pj_str_t*
+    //
+    operator const pj_str_t*() const
+    {
+	return this;
+    }
+
+    //
+    // Get the length of the string.
+    //
+    pj_size_t length() const
+    {
+	return pj_strlen(this);
+    }
+
+    //
+    // Get the length of the string.
+    //
+    pj_size_t size() const
+    {
+	return length();
+    }
+
+    //
+    // Get the string buffer.
+    //
+    const char *buf() const
+    {
+	return ptr;
+    }
+
+    //
+    // Initialize buffer from char*.
+    //
+    void set(char *str)
+    {
+	pj_strset2(this, str);
+    }
+
+    //
+    // Initialize by copying from a const char*.
+    //
+    void set(Pj_Pool &pool, const char *s)
+    {
+	pj_strdup2(pool, this, s);
+    }
+
+    //
+    // Initialize from pj_str_t*.
+    //
+    void set(pj_str_t *s)
+    {
+	pj_strassign(this, s);
+    }
+
+    //
+    // Initialize by copying from const pj_str_t*.
+    //
+    void set(Pj_Pool &pool, const pj_str_t *s)
+    {
+	pj_strdup(pool, this, s);
+    }
+
+    //
+    // Initialize from char* and length.
+    //
+    void set(char *str, pj_size_t len)
+    {
+	pj_strset(this, str, len);
+    }
+
+    //
+    // Initialize from pair of pointers.
+    //
+    void set(char *begin, char *end)
+    {
+	pj_strset3(this, begin, end);
+    }
+
+    //
+    // Initialize from other Pj_String.
+    //
+    void set(Pj_String &rhs)
+    {
+	pj_strassign(this, &rhs);
+    }
+
+    //
+    // Initialize by copying from a Pj_String*.
+    //
+    void set(Pj_Pool &pool, const Pj_String *s)
+    {
+	pj_strdup(pool, this, s);
+    }
+
+    //
+    // Initialize by copying from other Pj_String.
+    //
+    void set(Pj_Pool &pool, const Pj_String &s)
+    {
+	pj_strdup(pool, this, &s);
+    }
+
+    //
+    // Copy the contents of other string.
+    //
+    void strcpy(const pj_str_t *s)
+    {
+	pj_strcpy(this, s);
+    }
+
+    //
+    // Copy the contents of other string.
+    //
+    void strcpy(const Pj_String &rhs)
+    {
+	pj_strcpy(this, &rhs);
+    }
+
+    //
+    // Copy the contents of other string.
+    //
+    void strcpy(const char *s)
+    {
+	pj_strcpy2(this, s);
+    }
+
+    //
+    // Compare string.
+    //
+    int strcmp(const char *s) const
+    {
+	return pj_strcmp2(this, s);
+    }
+
+    //
+    // Compare string.
+    //
+    int strcmp(const pj_str_t *s) const
+    {
+	return pj_strcmp(this, s);
+    }
+
+    //
+    // Compare string.
+    //
+    int strcmp(const Pj_String &rhs) const
+    {
+	return pj_strcmp(this, &rhs);
+    }
+
+    //
+    // Compare string.
+    //
+    int strncmp(const char *s, pj_size_t len) const
+    {
+	return pj_strncmp2(this, s, len);
+    }
+
+    //
+    // Compare string.
+    //
+    int strncmp(const pj_str_t *s, pj_size_t len) const
+    {
+	return pj_strncmp(this, s, len);
+    }
+
+    //
+    // Compare string.
+    //
+    int strncmp(const Pj_String &rhs, pj_size_t len) const
+    {
+	return pj_strncmp(this, &rhs, len);
+    }
+
+    //
+    // Compare string.
+    //
+    int stricmp(const char *s) const
+    {
+	return pj_stricmp2(this, s);
+    }
+
+    //
+    // Compare string.
+    //
+    int stricmp(const pj_str_t *s) const
+    {
+	return pj_stricmp(this, s);
+    }
+
+    //
+    // Compare string.
+    //
+    int stricmp(const Pj_String &rhs) const
+    {
+	return stricmp(&rhs);
+    }
+
+    //
+    // Compare string.
+    //
+    int strnicmp(const char *s, pj_size_t len) const
+    {
+	return pj_strnicmp2(this, s, len);
+    }
+
+    //
+    // Compare string.
+    //
+    int strnicmp(const pj_str_t *s, pj_size_t len) const
+    {
+	return pj_strnicmp(this, s, len);
+    }
+
+    //
+    // Compare string.
+    //
+    int strnicmp(const Pj_String &rhs, pj_size_t len) const
+    {
+	return strnicmp(&rhs, len);
+    }
+
+    //
+    // Compare contents for equality.
+    //
+    bool operator==(const char *s) const
+    {
+	return strcmp(s) == 0;
+    }
+
+    //
+    // Compare contents for equality.
+    //
+    bool operator==(const pj_str_t *s) const
+    {
+	return strcmp(s) == 0;
+    }
+
+    //
+    // Compare contents for equality.
+    //
+    bool operator==(const Pj_String &rhs) const
+    {
+	return pj_strcmp(this, &rhs) == 0;
+    }
+
+    //
+    // Assign from char*
+    //
+    Pj_String& operator=(char *s)
+    {
+	set(s);
+	return *this;
+    }
+
+    ///
+    // Assign from another Pj_String, use with care!
+    //
+    Pj_String& operator=(const Pj_String &rhs)
+    {
+	ptr = rhs.ptr;
+	slen = rhs.slen;
+	return *this;
+    }
+
+    //
+    // Find a character in the string.
+    //
+    char *strchr(int chr)
+    {
+	return pj_strchr(this, chr);
+    }
+
+    //
+    // Find a character in the string.
+    //
+    char *find(int chr)
+    {
+	return strchr(chr);
+    }
+
+    //
+    // Concatenate string.
+    //
+    void strcat(const Pj_String &rhs)
+    {
+	pj_strcat(this, &rhs);
+    }
+
+    //
+    // Left trim.
+    //
+    void ltrim()
+    {
+	pj_strltrim(this);
+    }
+
+    //
+    // Right trim.
+    //
+    void rtrim()
+    {
+	pj_strrtrim(this);
+    }
+
+    //
+    // Left and right trim.
+    //
+    void trim()
+    {
+	pj_strtrim(this);
+    }
+
+    //
+    // Convert to unsigned long.
+    //
+    unsigned long to_ulong() const
+    {
+	return pj_strtoul(this);
+    }
+
+    //
+    // Convert from unsigned long.
+    //
+    void from_ulong(unsigned long value)
+    {
+        slen = pj_utoa(value, ptr);
+    }
+
+    //
+    // Convert from unsigned long with padding.
+    //
+    void from_ulong_with_pad(unsigned long value, int min_dig=0, int pad=' ')
+    {
+        slen = pj_utoa_pad(value, ptr, min_dig, pad);
+    }
+
+};
+
+#endif	/* __PJPP_STRING_HPP__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj++/timer.hpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj++/timer.hpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj++/timer.hpp	(revision 1163)
@@ -0,0 +1,197 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 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 __PJPP_TIMER_HPP__
+#define __PJPP_TIMER_HPP__
+
+#include <pj/timer.h>
+#include <pj++/types.hpp>
+#include <pj/assert.h>
+#include <pj++/lock.hpp>
+
+class Pj_Timer_Heap;
+
+//////////////////////////////////////////////////////////////////////////////
+// Timer entry.
+//
+// How to use:
+//  Derive class from Pj_Timer_Entry and override on_timeout().
+//  Scheduler timer in Pj_Timer_Heap.
+//
+class Pj_Timer_Entry : public Pj_Object
+{
+    friend class Pj_Timer_Heap;
+
+public:
+    //
+    // Default constructor.
+    //
+    Pj_Timer_Entry() 
+    { 
+        entry_.user_data = this;
+        entry_.cb = &timer_heap_callback; 
+    }
+
+    //
+    // Destructor, do nothing.
+    //
+    ~Pj_Timer_Entry()
+    {
+    }
+
+    //
+    // Override this to get the timeout notification.
+    //
+    virtual void on_timeout(int id) = 0;
+
+private:
+    pj_timer_entry entry_;
+
+    static void timer_heap_callback(pj_timer_heap_t*, pj_timer_entry *e)
+    {
+        Pj_Timer_Entry *entry = (Pj_Timer_Entry*) e->user_data;
+        entry->on_timeout(e->id);
+    }
+
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// Timer heap.
+//
+class Pj_Timer_Heap : public Pj_Object
+{
+public:
+    //
+    // Default constructor.
+    //
+    Pj_Timer_Heap() 
+        : ht_(NULL) 
+    {
+    }
+
+    //
+    // Construct timer heap.
+    //
+    Pj_Timer_Heap(Pj_Pool *pool, pj_size_t initial_count)
+        : ht_(NULL)
+    {
+        create(pool, initial_count);
+    }
+
+    //
+    // Destructor.
+    //
+    ~Pj_Timer_Heap()
+    {
+        destroy();
+    }
+
+    //
+    // Create
+    // 
+    pj_status_t create(Pj_Pool *pool, pj_size_t initial_count)
+    {
+        destroy();
+	return pj_timer_heap_create(pool->pool_(), initial_count, &ht_);
+    }
+
+    //
+    // Destroy
+    //
+    void destroy()
+    {
+        if (ht_) {
+            pj_timer_heap_destroy(ht_);
+            ht_ = NULL;
+        }
+    }
+
+    //
+    // Get pjlib compatible timer heap object.
+    //
+    pj_timer_heap_t *get_timer_heap()
+    {
+	return ht_;
+    }
+
+    //
+    // Set the lock object.
+    //
+    void set_lock( Pj_Lock *lock, bool auto_delete )
+    {
+        pj_timer_heap_set_lock( ht_, lock->pj_lock_t_(), auto_delete);
+    }
+
+    //
+    // Set maximum number of timed out entries to be processed per poll.
+    //
+    unsigned set_max_timed_out_per_poll(unsigned count)
+    {
+        return pj_timer_heap_set_max_timed_out_per_poll(ht_, count);
+    }
+
+    //
+    // Schedule a timer.
+    //
+    bool schedule( Pj_Timer_Entry *ent, const Pj_Time_Val &delay,
+                   int id)
+    {
+        ent->entry_.id = id;
+	return pj_timer_heap_schedule(ht_, &ent->entry_, &delay) == 0;
+    }
+
+    //
+    // Cancel a timer.
+    //
+    bool cancel(Pj_Timer_Entry *ent)
+    {
+	return pj_timer_heap_cancel(ht_, &ent->entry_) == 1;
+    }
+
+    //
+    // Get current number of timers
+    //
+    pj_size_t count()
+    {
+	return pj_timer_heap_count(ht_);
+    }
+
+    //
+    // Get the earliest time.
+    // Return false if no timer is found.
+    //
+    bool earliest_time(Pj_Time_Val *t)
+    {
+	return pj_timer_heap_earliest_time(ht_, t) == PJ_SUCCESS;
+    }
+
+    //
+    // Poll the timer.
+    // Return number of timed out entries has been called.
+    //
+    unsigned poll(Pj_Time_Val *next_delay = NULL)
+    {
+	return pj_timer_heap_poll(ht_, next_delay);
+    }
+
+private:
+    pj_timer_heap_t *ht_;
+};
+
+#endif	/* __PJPP_TIMER_HPP__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj++/tree.hpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj++/tree.hpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj++/tree.hpp	(revision 1163)
@@ -0,0 +1,128 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 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 __PJPP_TREE_HPP__
+#define __PJPP_TREE_HPP__
+
+#include <pj/rbtree.h>
+
+//
+// Tree.
+//
+class PJ_Tree
+{
+public:
+    typedef pj_rbtree_comp Comp;
+    class iterator;
+    class reverse_iterator;
+
+    class Node : private pj_rbtree_node
+    {
+	friend class PJ_Tree;
+	friend class iterator;
+	friend class reverse_iterator;
+
+    public:
+	Node() {}
+	explicit Node(void *data) { user_data = data; }
+	void  set_user_data(void *data) { user_data = data; }
+	void *get_user_data() const { return user_data; }
+    };
+
+    class iterator
+    {
+    public:
+	iterator() {}
+	iterator(const iterator &rhs) : tr_(rhs.tr_), nd_(rhs.nd_) {}
+	iterator(pj_rbtree *tr, pj_rbtree_node *nd) : tr_(tr), nd_(nd) {}
+	Node *operator*() { return (Node*)nd_; }
+	bool operator==(const iterator &rhs) const { return tr_==rhs.tr_ && nd_==rhs.nd_; }
+	iterator &operator=(const iterator &rhs) { tr_=rhs.tr_; nd_=rhs.nd_; return *this; }
+	void operator++() { nd_=pj_rbtree_next(tr_, nd_); }
+	void operator--() { nd_=pj_rbtree_prev(tr_, nd_); }
+    protected:
+	pj_rbtree *tr_;
+	pj_rbtree_node *nd_;
+    };
+
+    class reverse_iterator : public iterator
+    {
+    public:
+	reverse_iterator() {}
+	reverse_iterator(const reverse_iterator &it) : iterator(it) {}
+	reverse_iterator(pj_rbtree *t, pj_rbtree_node *n) : iterator(t, n) {}
+	reverse_iterator &operator=(const reverse_iterator &rhs) { iterator::operator=(rhs); return *this; }
+	Node *operator*() { return (Node*)nd_; }
+	bool operator==(const reverse_iterator &rhs) const { return iterator::operator==(rhs); }
+	void operator++() { nd_=pj_rbtree_prev(tr_, nd_); }
+	void operator--() { nd_=pj_rbtree_next(tr_, nd_); }
+    };
+
+    explicit PJ_Tree(Comp *comp) { pj_rbtree_init(&t_, comp); }
+
+    iterator begin()
+    {
+	return iterator(&t_, pj_rbtree_first(&t_));
+    }
+
+    iterator end()
+    {
+	return iterator(&t_, NULL);
+    }
+
+    reverse_iterator rbegin()
+    {
+	return reverse_iterator(&t_, pj_rbtree_last(&t_));
+    }
+
+    reverse_iterator rend()
+    {
+	return reverse_iterator(&t_, NULL);
+    }
+
+    bool insert(Node *node)
+    {
+	return pj_rbtree_insert(&t_, node)==0 ? true : false;
+    }
+
+    Node *find(const void *key)
+    {
+	return (Node*)pj_rbtree_find(&t_, key);
+    }
+
+    Node *erase(Node *node)
+    {
+	return (Node*)pj_rbtree_erase(&t_, node);
+    }
+
+    unsigned max_height(Node *node=NULL)
+    {
+	return pj_rbtree_max_height(&t_, node);
+    }
+
+    unsigned min_height(Node *node=NULL)
+    {
+	return pj_rbtree_min_height(&t_, node);
+    }
+
+private:
+    pj_rbtree t_;
+};
+
+#endif	/* __PJPP_TREE_HPP__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj++/types.hpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj++/types.hpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj++/types.hpp	(revision 1163)
@@ -0,0 +1,174 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 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 __PJPP_TYPES_HPP__
+#define __PJPP_TYPES_HPP__
+
+#include <pj/types.h>
+
+class Pj_Pool;
+class Pj_Socket ;
+class Pj_Lock;
+
+
+//
+// PJLIB initializer.
+//
+class Pjlib
+{
+public:
+    Pjlib()
+    {
+        pj_init();
+    }
+};
+
+//
+// Class Pj_Object is declared in pool.hpp
+//
+
+//
+// Time value wrapper.
+//
+class Pj_Time_Val : public pj_time_val
+{
+public:
+    Pj_Time_Val()
+    {
+    }
+
+    Pj_Time_Val(long init_sec, long init_msec)
+    {
+        sec = init_sec;
+        msec = init_msec;
+    }
+
+    Pj_Time_Val(const Pj_Time_Val &rhs) 
+    { 
+        sec=rhs.sec; 
+        msec=rhs.msec; 
+    }
+
+    explicit Pj_Time_Val(const pj_time_val &tv) 
+    { 
+        sec = tv.sec; 
+        msec = tv.msec; 
+    }
+
+    long get_sec()  const    
+    { 
+        return sec; 
+    }
+
+    long get_msec() const    
+    { 
+        return msec; 
+    }
+
+    void set_sec (long s)    
+    { 
+        sec = s; 
+    }
+
+    void set_msec(long ms)   
+    { 
+        msec = ms; 
+        normalize(); 
+    }
+
+    long to_msec() const 
+    { 
+        return PJ_TIME_VAL_MSEC((*this)); 
+    }
+
+    bool operator == (const Pj_Time_Val &rhs) const 
+    { 
+        return PJ_TIME_VAL_EQ((*this), rhs);  
+    }
+
+    bool operator >  (const Pj_Time_Val &rhs) const 
+    { 
+        return PJ_TIME_VAL_GT((*this), rhs);  
+    }
+
+    bool operator >= (const Pj_Time_Val &rhs) const 
+    { 
+        return PJ_TIME_VAL_GTE((*this), rhs); 
+    }
+
+    bool operator <  (const Pj_Time_Val &rhs) const 
+    { 
+        return PJ_TIME_VAL_LT((*this), rhs);  
+    }
+
+    bool operator <= (const Pj_Time_Val &rhs) const 
+    { 
+        return PJ_TIME_VAL_LTE((*this), rhs); 
+    }
+
+    Pj_Time_Val & operator = (const Pj_Time_Val &rhs) 
+    {
+	sec = rhs.sec;
+	msec = rhs.msec;
+	return *this;
+    }
+ 
+    Pj_Time_Val & operator += (const Pj_Time_Val &rhs) 
+    {
+	PJ_TIME_VAL_ADD((*this), rhs);
+	return *this;
+    }
+
+    Pj_Time_Val & operator -= (const Pj_Time_Val &rhs) 
+    {
+	PJ_TIME_VAL_SUB((*this), rhs);
+	return *this;
+    }
+
+    /* Must include os.hpp to use these, otherwise unresolved in linking */
+    inline pj_status_t	   gettimeofday();
+    inline pj_parsed_time  decode();
+    inline pj_status_t     encode(const pj_parsed_time *pt);
+    inline pj_status_t     to_gmt();
+    inline pj_status_t     to_local();
+
+
+private:
+    void normalize() 
+    { 
+        pj_time_val_normalize(this); 
+    }
+
+};
+
+//
+// Macro to declare common object comparison operators.
+//
+#define PJ_DECLARE_OPERATORS(rhs_type)			    \
+	    bool operator!=(rhs_type rhs) const {	    \
+		return !operator==(rhs); }		    \
+	    bool operator<=(rhs_type rhs) const {	    \
+		return operator<(rhs) || operator==(rhs); } \
+	    bool operator>(rhs_type rhs) const {	    \
+		return !operator<=(rhs); }		    \
+	    bool operator>=(rhs_type rhs) const {	    \
+		return !operator<(rhs); }
+
+
+#endif	/* __PJPP_TYPES_HPP__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/addr_resolv.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/addr_resolv.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/addr_resolv.h	(revision 1163)
@@ -0,0 +1,103 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_ADDR_RESOLV_H__
+#define __PJ_ADDR_RESOLV_H__
+
+/**
+ * @file addr_resolv.h
+ * @brief IP address resolution.
+ */
+
+#include <pj/sock.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup pj_addr_resolve Network Address Resolution
+ * @ingroup PJ_IO
+ * @{
+ *
+ * This module provides function to resolve Internet address of the
+ * specified host name. To resolve a particular host name, application
+ * can just call #pj_gethostbyname().
+ *
+ * Example:
+ * <pre>
+ *   ...
+ *   pj_hostent he;
+ *   pj_status_t rc;
+ *   pj_str_t host = pj_str("host.example.com");
+ *   
+ *   rc = pj_gethostbyname( &host, &he);
+ *   if (rc != PJ_SUCCESS) {
+ *      char errbuf[80];
+ *      pj_strerror( rc, errbuf, sizeof(errbuf));
+ *      PJ_LOG(2,("sample", "Unable to resolve host, error=%s", errbuf));
+ *      return rc;
+ *   }
+ *
+ *   // process address...
+ *   addr.sin_addr.s_addr = *(pj_uint32_t*)he.h_addr;
+ *   ...
+ * </pre>
+ *
+ * It's pretty simple really...
+ */
+
+/** This structure describes an Internet host address. */
+typedef struct pj_hostent
+{
+    char    *h_name;		/**< The official name of the host. */
+    char   **h_aliases;		/**< Aliases list. */
+    int	     h_addrtype;	/**< Host address type. */
+    int	     h_length;		/**< Length of address. */
+    char   **h_addr_list;	/**< List of addresses. */
+} pj_hostent;
+
+/** Shortcut to h_addr_list[0] */
+#define h_addr h_addr_list[0]
+
+/**
+ * This function fills the structure of type pj_hostent for a given host name.
+ *
+ * @param name	    Host name, or IPv4 or IPv6 address in standard dot notation.
+ * @param he	    The pj_hostent structure to be filled.
+ *
+ * @return	    PJ_SUCCESS, or the appropriate error codes.
+ */ 
+PJ_DECL(pj_status_t) pj_gethostbyname(const pj_str_t *name, pj_hostent *he);
+
+
+/**
+ * Resolve the primary IP address of local host. 
+ *
+ * @param ip_addr   On successful resolution, this will be filled up with
+ *		    the host IP address, in network byte order.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_gethostip(pj_in_addr *ip_addr);
+
+
+/** @} */
+
+PJ_END_DECL
+
+#endif	/* __PJ_ADDR_RESOLV_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/array.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/array.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/array.h	(revision 1163)
@@ -0,0 +1,95 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_ARRAY_H__
+#define __PJ_ARRAY_H__
+
+/**
+ * @file array.h
+ * @brief PJLIB Array helper.
+ */
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_ARRAY Array helper.
+ * @ingroup PJ_DS
+ * @{
+ *
+ * This module provides helper to manipulate array of elements of any size.
+ * It provides most used array operations such as insert, erase, and search.
+ */
+
+/**
+ * Insert value to the array at the given position, and rearrange the
+ * remaining nodes after the position.
+ *
+ * @param array	    the array.
+ * @param elem_size the size of the individual element.
+ * @param count	    the CURRENT number of elements in the array.
+ * @param pos	    the position where the new element is put.
+ * @param value	    the value to copy to the new element.
+ */
+PJ_DECL(void) pj_array_insert( void *array,
+			       unsigned elem_size,
+			       unsigned count,
+			       unsigned pos,
+			       const void *value);
+
+/**
+ * Erase a value from the array at given position, and rearrange the remaining
+ * elements post the erased element.
+ *
+ * @param array	    the array.
+ * @param elem_size the size of the individual element.
+ * @param count	    the current number of elements in the array.
+ * @param pos	    the index/position to delete.
+ */
+PJ_DECL(void) pj_array_erase( void *array,
+			      unsigned elem_size,
+			      unsigned count,
+			      unsigned pos);
+
+/**
+ * Search the first value in the array according to matching function.
+ *
+ * @param array	    the array.
+ * @param elem_size the individual size of the element.
+ * @param count	    the number of elements.
+ * @param matching  the matching function, which MUST return PJ_SUCCESS if 
+ *		    the specified element match.
+ * @param result    the pointer to the value found.
+ *
+ * @return	    PJ_SUCCESS if value is found, otherwise the error code.
+ */
+PJ_DECL(pj_status_t) pj_array_find(   const void *array, 
+				      unsigned elem_size, 
+				      unsigned count, 
+				      pj_status_t (*matching)(const void *value),
+				      void **result);
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJ_ARRAY_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/assert.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/assert.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/assert.h	(revision 1163)
@@ -0,0 +1,92 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_ASSERT_H__
+#define __PJ_ASSERT_H__
+
+/**
+ * @file assert.h
+ * @brief Assertion macro pj_assert().
+ */
+
+#include <pj/config.h>
+#include <pj/compat/assert.h>
+
+/**
+ * @defgroup pj_assert Assertion Macro
+ * @ingroup PJ_MISC
+ * @{
+ *
+ * Assertion and other helper macros for sanity checking.
+ */
+
+/**
+ * @hideinitializer
+ * Check during debug build that an expression is true. If the expression
+ * computes to false during run-time, then the program will stop at the
+ * offending statements.
+ * For release build, this macro will not do anything.
+ *
+ * @param expr	    The expression to be evaluated.
+ */
+#define pj_assert(expr)   assert(expr)
+
+
+/**
+ * @hideinitializer
+ * If #PJ_ENABLE_EXTRA_CHECK is declared and the value is non-zero, then 
+ * #PJ_ASSERT_RETURN macro will evaluate the expression in @a expr during
+ * run-time. If the expression yields false, assertion will be triggered
+ * and the current function will return with the specified return value.
+ *
+ * If #PJ_ENABLE_EXTRA_CHECK is not declared or is zero, then no run-time
+ * checking will be performed. The macro simply evaluates to pj_assert(expr).
+ */
+#if defined(PJ_ENABLE_EXTRA_CHECK) && PJ_ENABLE_EXTRA_CHECK != 0
+#   define PJ_ASSERT_RETURN(expr,retval)    \
+	    do { \
+		if (!(expr)) { pj_assert(expr); return retval; } \
+	    } while (0)
+#else
+#   define PJ_ASSERT_RETURN(expr,retval)    pj_assert(expr)
+#endif
+
+/**
+ * @hideinitializer
+ * If #PJ_ENABLE_EXTRA_CHECK is declared and non-zero, then 
+ * #PJ_ASSERT_ON_FAIL macro will evaluate the expression in @a expr during
+ * run-time. If the expression yields false, assertion will be triggered
+ * and @a exec_on_fail will be executed.
+ *
+ * If #PJ_ENABLE_EXTRA_CHECK is not declared or is zero, then no run-time
+ * checking will be performed. The macro simply evaluates to pj_assert(expr).
+ */
+#if defined(PJ_ENABLE_EXTRA_CHECK) && PJ_ENABLE_EXTRA_CHECK != 0
+#   define PJ_ASSERT_ON_FAIL(expr,exec_on_fail)    \
+	    do { \
+		pj_assert(expr); \
+		if (!(expr)) exec_on_fail; \
+	    } while (0)
+#else
+#   define PJ_ASSERT_ON_FAIL(expr,exec_on_fail)    pj_assert(expr)
+#endif
+
+/** @} */
+
+#endif	/* __PJ_ASSERT_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/assert.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/assert.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/assert.h	(revision 1163)
@@ -0,0 +1,43 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_ASSERT_H__
+#define __PJ_COMPAT_ASSERT_H__
+
+/**
+ * @file assert.h
+ * @brief Provides assert() macro.
+ */
+
+#if defined(PJ_HAS_ASSERT_H) && PJ_HAS_ASSERT_H != 0
+#  include <assert.h>
+
+#elif defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL != 0
+#  define assert(expr) do { \
+			if (!(expr)) \
+			  printk("!!ASSERTION FAILED: [%s:%d] \"" #expr "\"\n",\
+				 __FILE__, __LINE__); \
+		       } while (0)
+
+#else
+#  warning "assert() is not implemented"
+#  define assert(expr)
+#endif
+
+#endif	/* __PJ_COMPAT_ASSERT_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/cc_gcc.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/cc_gcc.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/cc_gcc.h	(revision 1163)
@@ -0,0 +1,73 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_CC_GCC_H__
+#define __PJ_COMPAT_CC_GCC_H__
+
+/**
+ * @file cc_gcc.h
+ * @brief Describes GCC compiler specifics.
+ */
+
+#ifndef __GNUC__
+#  error "This file is only for gcc!"
+#endif
+
+#define PJ_CC_NAME		"gcc"
+#define PJ_CC_VER_1		__GNUC__
+#define PJ_CC_VER_2		__GNUC_MINOR__
+
+/* __GNUC_PATCHLEVEL__ doesn't exist in gcc-2.9x.x */
+#ifdef __GNUC_PATCHLEVEL__
+#   define PJ_CC_VER_3		__GNUC_PATCHLEVEL__
+#else
+#   define PJ_CC_VER_3		0
+#endif
+
+
+
+#define PJ_THREAD_FUNC	
+#define PJ_NORETURN		
+
+#define PJ_HAS_INT64		1
+
+#ifdef __STRICT_ANSI__
+  #include <inttypes.h> 
+  typedef int64_t		pj_int64_t;
+  typedef uint64_t		pj_uint64_t;
+  #define PJ_INLINE_SPECIFIER	static __inline
+  #define PJ_ATTR_NORETURN	
+#else
+  typedef long long		pj_int64_t;
+  typedef unsigned long long	pj_uint64_t;
+  #define PJ_INLINE_SPECIFIER	static inline
+  #define PJ_ATTR_NORETURN	__attribute__ ((noreturn))
+#endif
+
+#define PJ_INT64(val)		val##LL
+#define PJ_UINT64(val)		val##LLU
+#define PJ_INT64_FMT		"L"
+
+
+#ifdef __GLIBC__
+#   define PJ_HAS_BZERO		1
+#endif
+
+
+#endif	/* __PJ_COMPAT_CC_GCC_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/cc_msvc.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/cc_msvc.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/cc_msvc.h	(revision 1163)
@@ -0,0 +1,70 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_CC_MSVC_H__
+#define __PJ_COMPAT_CC_MSVC_H__
+
+/**
+ * @file cc_msvc.h
+ * @brief Describes Microsoft Visual C compiler specifics.
+ */
+
+#ifndef _MSC_VER
+#  error "This header file is only for Visual C compiler!"
+#endif
+
+#define PJ_CC_NAME	    "msvc"
+#define PJ_CC_VER_1	    (_MSC_VER/100)
+#define PJ_CC_VER_2	    (_MSC_VER%100)
+#define PJ_CC_VER_3	    0
+
+/* Disable CRT deprecation warnings. */
+#if PJ_CC_VER_1 >= 8 && !defined(_CRT_SECURE_NO_DEPRECATE)
+#   define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+#pragma warning(disable: 4127) // conditional expression is constant
+#pragma warning(disable: 4611) // not wise to mix setjmp with C++
+#pragma warning(disable: 4514) // unref. inline function has been removed
+#ifdef NDEBUG
+#  pragma warning(disable: 4702) // unreachable code
+#  pragma warning(disable: 4710) // function is not inlined.
+#  pragma warning(disable: 4711) // function selected for auto inline expansion
+#endif
+
+#ifdef __cplusplus
+#  define PJ_INLINE_SPECIFIER	inline
+#else
+#  define PJ_INLINE_SPECIFIER	static __inline
+#endif
+
+#define PJ_THREAD_FUNC	
+#define PJ_NORETURN		__declspec(noreturn)
+#define PJ_ATTR_NORETURN	
+
+#define PJ_HAS_INT64	1
+
+typedef __int64 pj_int64_t;
+typedef unsigned __int64 pj_uint64_t;
+
+#define PJ_INT64(val)		val##i64
+#define PJ_UINT64(val)		val##ui64
+#define PJ_INT64_FMT		"I64"
+
+
+#endif	/* __PJ_COMPAT_CC_MSVC_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/ctype.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/ctype.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/ctype.h	(revision 1163)
@@ -0,0 +1,48 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_CTYPE_H__
+#define __PJ_COMPAT_CTYPE_H__
+
+/**
+ * @file ctype.h
+ * @brief Provides ctype function family.
+ */
+
+#if defined(PJ_HAS_CTYPE_H) && PJ_HAS_CTYPE_H != 0
+#  include <ctype.h>
+#else
+#  define isalnum(c)	    (isalpha(c) || isdigit(c))
+#  define isalpha(c)	    (islower(c) || isupper(c))
+#  define isascii(c)	    (((unsigned char)(c))<=0x7f)
+#  define isdigit(c)	    ((c)>='0' && (c)<='9')
+#  define isspace(c)	    ((c)==' '  || (c)=='\t' ||\
+			     (c)=='\n' || (c)=='\r' || (c)=='\v')
+#  define islower(c)	    ((c)>='a' && (c)<='z')
+#  define isupper(c)	    ((c)>='A' && (c)<='Z')
+#  define isxdigit(c)	    (isdigit(c) || (tolower(c)>='a'&&tolower(c)<='f'))
+#  define tolower(c)	    (((c) >= 'A' && (c) <= 'Z') ? (c)+('a'-'A') : (c))
+#  define toupper(c)	    (((c) >= 'a' && (c) <= 'z') ? (c)-('a'-'A') : (c))
+#endif
+
+#ifndef isblank
+#   define isblank(c)	    (c==' ' || c=='\t')
+#endif
+
+
+#endif	/* __PJ_COMPAT_CTYPE_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/errno.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/errno.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/errno.h	(revision 1163)
@@ -0,0 +1,43 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_ERRNO_H__
+#define __PJ_COMPAT_ERRNO_H__
+
+#if defined(PJ_WIN32) && PJ_WIN32 != 0 || \
+    defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE != 0
+
+    typedef unsigned long pj_os_err_type;
+#   define pj_get_native_os_error()	    GetLastError()
+#   define pj_get_native_netos_error()	    WSAGetLastError()
+
+#elif defined(PJ_HAS_ERRNO_VAR) && PJ_HAS_ERRNO_VAR!= 0
+
+    typedef int pj_os_err_type;
+#   define pj_get_native_os_error()	    (errno)
+#   define pj_get_native_netos_error()	    (errno)
+
+#else
+
+#   error "Please define how to get errno for this platform here!"
+
+#endif
+
+
+#endif	/* __PJ_COMPAT_ERRNO_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/high_precision.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/high_precision.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/high_precision.h	(revision 1163)
@@ -0,0 +1,102 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_HIGH_PRECISION_H__
+#define __PJ_COMPAT_HIGH_PRECISION_H__
+
+
+#if defined(PJ_HAS_FLOATING_POINT) && PJ_HAS_FLOATING_POINT != 0
+    /*
+     * The first choice for high precision math is to use double.
+     */
+#   include <math.h>
+    typedef double pj_highprec_t;
+
+#   define PJ_HIGHPREC_VALUE_IS_ZERO(a)     (a==0)
+#   define pj_highprec_mod(a,b)             (a=fmod(a,b))
+
+#elif defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL != 0
+
+#   include <asm/div64.h>
+    
+    typedef pj_int64_t pj_highprec_t;
+
+#   define pj_highprec_div(a1,a2)   do_div(a1,a2)
+#   define pj_highprec_mod(a1,a2)   (a1=do_mod(a1, a2))
+
+    PJ_INLINE(pj_int64_t) do_mod( pj_int64_t a1, pj_int64_t a2)
+    {
+	return do_div(a1,a2);
+    }
+    
+    
+#elif defined(PJ_HAS_INT64) && PJ_HAS_INT64 != 0
+    /*
+     * Next choice is to use 64-bit arithmatics.
+     */
+    typedef pj_int64_t pj_highprec_t;
+
+#else
+#   warning "High precision math is not available"
+
+    /*
+     * Last, fallback to 32-bit arithmetics.
+     */
+    typedef pj_int32_t pj_highprec_t;
+
+#endif
+
+/**
+ * @def pj_highprec_mul
+ * pj_highprec_mul(a1, a2) - High Precision Multiplication
+ * Multiply a1 and a2, and store the result in a1.
+ */
+#ifndef pj_highprec_mul
+#   define pj_highprec_mul(a1,a2)   (a1 = a1 * a2)
+#endif
+
+/**
+ * @def pj_highprec_div
+ * pj_highprec_div(a1, a2) - High Precision Division
+ * Divide a2 from a1, and store the result in a1.
+ */
+#ifndef pj_highprec_div
+#   define pj_highprec_div(a1,a2)   (a1 = a1 / a2)
+#endif
+
+/**
+ * @def pj_highprec_mod
+ * pj_highprec_mod(a1, a2) - High Precision Modulus
+ * Get the modulus a2 from a1, and store the result in a1.
+ */
+#ifndef pj_highprec_mod
+#   define pj_highprec_mod(a1,a2)   (a1 = a1 % a2)
+#endif
+
+
+/**
+ * @def PJ_HIGHPREC_VALUE_IS_ZERO(a)
+ * Test if the specified high precision value is zero.
+ */
+#ifndef PJ_HIGHPREC_VALUE_IS_ZERO
+#   define PJ_HIGHPREC_VALUE_IS_ZERO(a)     (a==0)
+#endif
+
+
+#endif	/* __PJ_COMPAT_HIGH_PRECISION_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_alpha.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_alpha.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_alpha.h	(revision 1163)
@@ -0,0 +1,35 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_M_ALPHA_H__
+#define __PJ_COMPAT_M_ALPHA_H__
+
+/**
+ * @file m_alpha.h
+ * @brief Describes Alpha processor family specifics.
+ */
+
+#define PJ_M_NAME		"alpha"
+
+#define PJ_HAS_PENTIUM		0
+#define PJ_IS_LITTLE_ENDIAN	1
+#define PJ_IS_BIG_ENDIAN	0
+
+
+#endif	/* __PJ_COMPAT_M_ALPHA_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_armv4.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_armv4.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_armv4.h	(revision 1163)
@@ -0,0 +1,38 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_M_ARMV4_H__
+#define __PJ_COMPAT_M_ARMV4_H__
+
+/**
+ * @file m_armv4.h
+ * @brief Describes ARM family processor specifics.
+ */
+
+/*
+ * This file covers PJ_M_ARMV4 etc.
+ */
+
+#define PJ_M_NAME		"armv4"
+
+#define PJ_HAS_PENTIUM		0
+#define PJ_IS_LITTLE_ENDIAN	1
+#define PJ_IS_BIG_ENDIAN	0
+
+
+#endif	/* __PJ_COMPAT_M_ARMV4_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_auto.h.in
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_auto.h.in	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_auto.h.in	(revision 1163)
@@ -0,0 +1,48 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 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_M_AUTO_H__
+#define __PJ_COMPAT_M_AUTO_H__
+
+/**
+ * @file m_auto.h
+ * @brief Automatically generated process definition file.
+ */
+
+/* Machine name, filled in by autoconf script */
+#undef PJ_M_NAME
+
+/* Endianness, as detected by autoconf */
+#undef WORDS_BIGENDIAN
+
+#ifdef WORDS_BIGENDIAN
+#  define PJ_IS_LITTLE_ENDIAN	0
+#  define PJ_IS_BIG_ENDIAN	1
+#else
+#  define PJ_IS_LITTLE_ENDIAN	1
+#  define PJ_IS_BIG_ENDIAN	0
+#endif
+
+
+/* Specify if floating point is present/desired */
+#undef PJ_HAS_FLOATING_POINT
+
+/* Deprecated */
+#define PJ_HAS_PENTIUM		0
+
+#endif	/* __PJ_COMPAT_M_AUTO_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_i386.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_i386.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_i386.h	(revision 1163)
@@ -0,0 +1,34 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_M_i386_H__
+#define __PJ_COMPAT_M_i386_H__
+
+/**
+ * @file m_i386.h
+ * @brief Describes Intel i386 family processor specifics.
+ */
+
+#define PJ_M_NAME		"i386"
+
+#define PJ_HAS_PENTIUM		1
+#define PJ_IS_LITTLE_ENDIAN	1
+#define PJ_IS_BIG_ENDIAN	0
+
+
+#endif	/* __PJ_COMPAT_M_i386_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_m68k.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_m68k.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_m68k.h	(revision 1163)
@@ -0,0 +1,34 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_M_M68K_H__
+#define __PJ_COMPAT_M_M68K_H__
+
+/**
+ * @file m_m68k.h
+ * @brief Describes Motorola m68k family processor specifics.
+ */
+
+#define PJ_M_NAME		"m68k"
+
+#define PJ_HAS_PENTIUM		0
+#define PJ_IS_LITTLE_ENDIAN	1
+#define PJ_IS_BIG_ENDIAN	0
+
+
+#endif	/* __PJ_COMPAT_M_M68K_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_powerpc.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_powerpc.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_powerpc.h	(revision 1163)
@@ -0,0 +1,35 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_M_POWERPC_H__
+#define __PJ_COMPAT_M_POWERPC_H__
+
+/**
+ * @file m_ppc.h
+ * @brief Describes PowerPC family processor specifics.
+ */
+
+#define PJ_M_NAME		"powerpc"
+
+#define PJ_HAS_PENTIUM		0
+#define PJ_IS_LITTLE_ENDIAN	0
+#define PJ_IS_BIG_ENDIAN	1
+
+
+#endif	/* __PJ_COMPAT_M_POWERPC_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_sparc.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_sparc.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_sparc.h	(revision 1163)
@@ -0,0 +1,34 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_M_SPARC_H__
+#define __PJ_COMPAT_M_SPARC_H__
+
+/**
+ * @file m_sparc.h
+ * @brief Describes SPARC family processor specifics.
+ */
+
+#define PJ_M_NAME		"sparc"
+
+#define PJ_HAS_PENTIUM		0
+#define PJ_IS_LITTLE_ENDIAN	0
+#define PJ_IS_BIG_ENDIAN	1
+
+
+#endif	/* __PJ_COMPAT_M_SPARC_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_x86_64.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_x86_64.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/m_x86_64.h	(revision 1163)
@@ -0,0 +1,35 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_M_x86_64_H__
+#define __PJ_COMPAT_M_x86_64_H__
+
+/**
+ * @file m_i386.h
+ * @brief Describes 64bit x86 Intel/AMD family processor specifics.
+ */
+
+#define PJ_M_NAME		"x86_64"
+
+#define PJ_HAS_PENTIUM		1
+#define PJ_IS_LITTLE_ENDIAN	1
+#define PJ_IS_BIG_ENDIAN	0
+
+
+#endif	/* __PJ_COMPAT_M_x86_64_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/malloc.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/malloc.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/malloc.h	(revision 1163)
@@ -0,0 +1,33 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_MALLOC_H__
+#define __PJ_COMPAT_MALLOC_H__
+
+/**
+ * @file malloc.h
+ * @brief Provides malloc() and free() functions.
+ */
+
+#if defined(PJ_HAS_MALLOC_H) && PJ_HAS_MALLOC_H != 0
+#  include <malloc.h>
+#elif defined(PJ_HAS_STDLIB_H) && PJ_HAS_STDLIB_H != 0
+#  include <stdlib.h>
+#endif
+
+#endif	/* __PJ_COMPAT_MALLOC_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_auto.h.in
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_auto.h.in	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_auto.h.in	(revision 1163)
@@ -0,0 +1,158 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 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_OS_AUTO_H__
+#define __PJ_COMPAT_OS_AUTO_H__
+
+/**
+ * @file os_auto.h
+ * @brief Describes operating system specifics (automatically detected by
+ *        autoconf)
+ */
+
+/* Canonical OS name */
+#undef PJ_OS_NAME
+
+/* Legacy macros */
+#undef PJ_WIN32
+#undef PJ_WIN32_WINNT
+#undef WIN32_LEAN_AND_MEAN
+#undef PJ_DARWINOS
+#undef PJ_LINUX
+#undef PJ_RTEMS
+#undef PJ_SUNOS
+
+#if defined(PJ_WIN32_WINNT) && !defined(_WIN32_WINNT)
+#  define _WIN32_WINNT	PJ_WIN32_WINNT
+#endif
+
+/* Headers availability */
+#undef PJ_HAS_ARPA_INET_H
+#undef PJ_HAS_ASSERT_H
+#undef PJ_HAS_CTYPE_H
+#undef PJ_HAS_ERRNO_H
+#undef PJ_HAS_LINUX_SOCKET_H
+#undef PJ_HAS_MALLOC_H
+#undef PJ_HAS_NETDB_H
+#undef PJ_HAS_NETINET_IN_H
+#undef PJ_HAS_NETINET_IP_H
+#undef PJ_HAS_SETJMP_H
+#undef PJ_HAS_STDARG_H
+#undef PJ_HAS_STDDEF_H
+#undef PJ_HAS_STDIO_H
+#undef PJ_HAS_STDLIB_H
+#undef PJ_HAS_STRING_H
+#undef PJ_HAS_SYS_IOCTL_H
+#undef PJ_HAS_SYS_SELECT_H
+#undef PJ_HAS_SYS_SOCKET_H
+#undef PJ_HAS_SYS_TIME_H
+#undef PJ_HAS_SYS_TIMEB_H
+#undef PJ_HAS_SYS_TYPES_H
+#undef PJ_HAS_TIME_H
+#undef PJ_HAS_UNISTD_H
+
+#undef PJ_HAS_MSWSOCK_H
+#undef PJ_HAS_WINSOCK_H
+#undef PJ_HAS_WINSOCK2_H
+
+#undef PJ_SOCK_HAS_INET_ATON
+
+/* Set 1 if native sockaddr_in has sin_len member. 
+ * Default: 0
+ */
+#undef PJ_SOCKADDR_HAS_LEN
+
+/* Does the OS have socklen_t? */
+#undef PJ_HAS_SOCKLEN_T
+
+#if !defined(PJ_HAS_SOCKLEN_T) || PJ_HAS_SOCKLEN_T==0
+# define PJ_HAS_SOCKLEN_T  1
+  typedef int socklen_t;
+#endif
+
+/**
+ * If this macro is set, it tells select I/O Queue that select() needs to
+ * be given correct value of nfds (i.e. largest fd + 1). This requires
+ * select ioqueue to re-scan the descriptors on each registration and
+ * unregistration.
+ * If this macro is not set, then ioqueue will always give FD_SETSIZE for
+ * nfds argument when calling select().
+ *
+ * Default: 0
+ */
+#undef PJ_SELECT_NEEDS_NFDS
+
+/* Is errno a good way to retrieve OS errors?
+ */
+#undef PJ_HAS_ERRNO_VAR
+
+/* When this macro is set, getsockopt(SOL_SOCKET, SO_ERROR) will return
+ * the status of non-blocking connect() operation.
+ */
+#undef PJ_HAS_SO_ERROR
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket recv() can not return immediate daata.
+ */
+#undef PJ_BLOCKING_ERROR_VAL
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket connect() can not get connected immediately.
+ */
+#undef PJ_BLOCKING_CONNECT_ERROR_VAL
+
+/* Default threading is enabled, unless it's overridden. */
+#ifndef PJ_HAS_THREADS
+#  define PJ_HAS_THREADS	    (1)
+#endif
+
+/* Do we need high resolution timer? */
+#undef PJ_HAS_HIGH_RES_TIMER
+
+/* Is malloc() available? */
+#undef PJ_HAS_MALLOC
+
+#ifndef PJ_OS_HAS_CHECK_STACK
+#   define PJ_OS_HAS_CHECK_STACK    0
+#endif
+
+/* Unicode? */
+#undef PJ_NATIVE_STRING_IS_UNICODE
+
+/* Pool alignment in bytes */
+#undef PJ_POOL_ALIGNMENT
+
+/* The type of atomic variable value: */
+#undef PJ_ATOMIC_VALUE_TYPE
+
+/* If 1, use Read/Write mutex emulation for platforms that don't support it */
+#undef PJ_EMULATE_RWMUTEX
+
+/* If 1, pj_thread_create() should enforce the stack size when creating 
+ * threads.
+ * Default: 0 (let OS decide the thread's stack size).
+ */
+#undef PJ_THREAD_SET_STACK_SIZE
+
+/* If 1, pj_thread_create() should allocate stack from the pool supplied.
+ * Default: 0 (let OS allocate memory for thread's stack).
+ */
+#undef PJ_THREAD_ALLOCATE_STACK
+
+#endif	/* __PJ_COMPAT_OS_AUTO_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_darwinos.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_darwinos.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_darwinos.h	(revision 1163)
@@ -0,0 +1,143 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_OS_DARWINOS_H__
+#define __PJ_COMPAT_OS_DARWINOS_H__
+
+/**
+ * @file os_darwinos.h
+ * @brief Describes Darwin/MacOSX operating system specifics.
+ */
+
+#define PJ_OS_NAME		    "darwin"
+
+#define PJ_HAS_ARPA_INET_H	    1
+#define PJ_HAS_ASSERT_H		    1
+#define PJ_HAS_CTYPE_H		    1
+#define PJ_HAS_ERRNO_H		    1
+#define PJ_HAS_LINUX_SOCKET_H	    0
+#define PJ_HAS_MALLOC_H		    0
+#define PJ_HAS_NETDB_H		    1
+#define PJ_HAS_NETINET_IN_H	    1
+#define PJ_HAS_SETJMP_H		    1
+#define PJ_HAS_STDARG_H		    1
+#define PJ_HAS_STDDEF_H		    1
+#define PJ_HAS_STDIO_H		    1
+#define PJ_HAS_STDLIB_H		    1
+#define PJ_HAS_STRING_H		    1
+#define PJ_HAS_SYS_IOCTL_H	    1
+#define PJ_HAS_SYS_SELECT_H	    1
+#define PJ_HAS_SYS_SOCKET_H	    1
+#define PJ_HAS_SYS_TIME_H	    1
+#define PJ_HAS_SYS_TIMEB_H	    1
+#define PJ_HAS_SYS_TYPES_H	    1
+#define PJ_HAS_TIME_H		    1
+#define PJ_HAS_UNISTD_H		    1
+
+#define PJ_HAS_MSWSOCK_H	    0
+#define PJ_HAS_WINSOCK_H	    0
+#define PJ_HAS_WINSOCK2_H	    0
+
+/* Is errno a good way to retrieve OS errors?
+ */
+#define PJ_HAS_ERRNO_VAR	    1
+
+/* Has inet_aton() ?
+ */   
+#define PJ_SOCK_HAS_INET_ATON	    1
+
+/* When this macro is set, getsockopt(SOL_SOCKET, SO_ERROR) will return
+ * the status of non-blocking connect() operation.
+ */
+#define PJ_HAS_SO_ERROR             1
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket recv() can not return immediate daata.
+ */
+#define PJ_BLOCKING_ERROR_VAL       EWOULDBLOCK
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket connect() can not get connected immediately.
+ */
+#define PJ_BLOCKING_CONNECT_ERROR_VAL   EINPROGRESS
+
+/* Default threading is enabled, unless it's overridden. */
+#ifndef PJ_HAS_THREADS
+#  define PJ_HAS_THREADS		(1)
+#endif
+
+#define PJ_HAS_HIGH_RES_TIMER		1
+#define PJ_HAS_MALLOC			1
+#ifndef PJ_OS_HAS_CHECK_STACK
+#   define PJ_OS_HAS_CHECK_STACK        0
+#endif
+#define PJ_NATIVE_STRING_IS_UNICODE	0
+
+#define PJ_ATOMIC_VALUE_TYPE		long
+
+/*
+ * Socket related
+ */
+typedef int socklen_t;
+
+/* Set 1 if native sockaddr_in has sin_len member. 
+ * Default: 0
+ */
+#define PJ_SOCKADDR_HAS_LEN		1
+
+/*
+ * gcc complains that it can not use precompiled header because
+ * the value of FD_SETSIZE that we declare in pj/config.h is
+ * different than the value in /usr/include/sys/types.h.
+ *
+ * This changes the default value for Darwin.
+ */
+#define PJ_IOQUEUE_MAX_HANDLES		1024
+
+/**
+ * If this macro is set, it tells select I/O Queue that select() needs to
+ * be given correct value of nfds (i.e. largest fd + 1). This requires
+ * select ioqueue to re-scan the descriptors on each registration and
+ * unregistration.
+ * If this macro is not set, then ioqueue will always give FD_SETSIZE for
+ * nfds argument when calling select().
+ *
+ * Default: 0
+ */
+#define PJ_SELECT_NEEDS_NFDS		0
+
+/* If 1, use Read/Write mutex emulation for platforms that don't support it */
+#define PJ_EMULATE_RWMUTEX		0
+
+/* If 1, pj_thread_create() should enforce the stack size when creating 
+ * threads.
+ * Default: 0 (let OS decide the thread's stack size).
+ */
+#define PJ_THREAD_SET_STACK_SIZE    	0
+
+/* If 1, pj_thread_create() should allocate stack from the pool supplied.
+ * Default: 0 (let OS allocate memory for thread's stack).
+ */
+#define PJ_THREAD_ALLOCATE_STACK    	0
+
+/* Oh well.. MacOS 10.2 doesn't have socklen_t, but 10.4 has! */
+#define PJ_HAS_SOCKLEN_T		0
+
+
+#endif	/* __PJ_COMPAT_OS_DARWINOS_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_linux.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_linux.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_linux.h	(revision 1163)
@@ -0,0 +1,127 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_OS_LINUX_H__
+#define __PJ_COMPAT_OS_LINUX_H__
+
+/**
+ * @file os_linux.h
+ * @brief Describes Linux operating system specifics.
+ */
+
+#define PJ_OS_NAME		    "linux"
+
+#define PJ_HAS_ARPA_INET_H	    1
+#define PJ_HAS_ASSERT_H		    1
+#define PJ_HAS_CTYPE_H		    1
+#define PJ_HAS_ERRNO_H		    1
+#define PJ_HAS_LINUX_SOCKET_H	    0
+#define PJ_HAS_MALLOC_H		    1
+#define PJ_HAS_NETDB_H		    1
+#define PJ_HAS_NETINET_IN_H	    1
+#define PJ_HAS_SETJMP_H		    1
+#define PJ_HAS_STDARG_H		    1
+#define PJ_HAS_STDDEF_H		    1
+#define PJ_HAS_STDIO_H		    1
+#define PJ_HAS_STDLIB_H		    1
+#define PJ_HAS_STRING_H		    1
+#define PJ_HAS_SYS_IOCTL_H	    1
+#define PJ_HAS_SYS_SELECT_H	    1
+#define PJ_HAS_SYS_SOCKET_H	    1
+#define PJ_HAS_SYS_TIME_H	    1
+#define PJ_HAS_SYS_TIMEB_H	    1
+#define PJ_HAS_SYS_TYPES_H	    1
+#define PJ_HAS_TIME_H		    1
+#define PJ_HAS_UNISTD_H		    1
+
+#define PJ_HAS_MSWSOCK_H	    0
+#define PJ_HAS_WINSOCK_H	    0
+#define PJ_HAS_WINSOCK2_H	    0
+
+#define PJ_SOCK_HAS_INET_ATON	    1
+
+/* Set 1 if native sockaddr_in has sin_len member. 
+ * Default: 0
+ */
+#define PJ_SOCKADDR_HAS_LEN	    0
+
+/**
+ * If this macro is set, it tells select I/O Queue that select() needs to
+ * be given correct value of nfds (i.e. largest fd + 1). This requires
+ * select ioqueue to re-scan the descriptors on each registration and
+ * unregistration.
+ * If this macro is not set, then ioqueue will always give FD_SETSIZE for
+ * nfds argument when calling select().
+ *
+ * Default: 0
+ */
+#define PJ_SELECT_NEEDS_NFDS	    0
+
+/* Is errno a good way to retrieve OS errors?
+ */
+#define PJ_HAS_ERRNO_VAR	    1
+
+/* When this macro is set, getsockopt(SOL_SOCKET, SO_ERROR) will return
+ * the status of non-blocking connect() operation.
+ */
+#define PJ_HAS_SO_ERROR             1
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket recv() can not return immediate daata.
+ */
+#define PJ_BLOCKING_ERROR_VAL       EAGAIN
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket connect() can not get connected immediately.
+ */
+#define PJ_BLOCKING_CONNECT_ERROR_VAL   EINPROGRESS
+
+/* Default threading is enabled, unless it's overridden. */
+#ifndef PJ_HAS_THREADS
+#  define PJ_HAS_THREADS	    (1)
+#endif
+
+#define PJ_HAS_HIGH_RES_TIMER	    1
+#define PJ_HAS_MALLOC               1
+#ifndef PJ_OS_HAS_CHECK_STACK
+#   define PJ_OS_HAS_CHECK_STACK    0
+#endif
+#define PJ_NATIVE_STRING_IS_UNICODE 0
+
+#define PJ_ATOMIC_VALUE_TYPE	    long
+
+/* If 1, use Read/Write mutex emulation for platforms that don't support it */
+#define PJ_EMULATE_RWMUTEX	    0
+
+/* If 1, pj_thread_create() should enforce the stack size when creating 
+ * threads.
+ * Default: 0 (let OS decide the thread's stack size).
+ */
+#define PJ_THREAD_SET_STACK_SIZE    	0
+
+/* If 1, pj_thread_create() should allocate stack from the pool supplied.
+ * Default: 0 (let OS allocate memory for thread's stack).
+ */
+#define PJ_THREAD_ALLOCATE_STACK    	0
+
+/* Linux has socklen_t */
+#define PJ_HAS_SOCKLEN_T		1
+
+
+#endif	/* __PJ_COMPAT_OS_LINUX_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_linux_kernel.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_linux_kernel.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_linux_kernel.h	(revision 1163)
@@ -0,0 +1,148 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_OS_LINUX_KERNEL_H__
+#define __PJ_COMPAT_OS_LINUX_KERNEL_H__
+
+/**
+ * @file os_linux.h
+ * @brief Describes Linux operating system specifics.
+ */
+
+#define PJ_OS_NAME		    "linux-module"
+
+#define PJ_HAS_ARPA_INET_H	    0
+#define PJ_HAS_ASSERT_H		    0
+#define PJ_HAS_CTYPE_H		    0
+#define PJ_HAS_ERRNO_H		    0
+#define PJ_HAS_LINUX_SOCKET_H	    1
+#define PJ_HAS_MALLOC_H		    0
+#define PJ_HAS_NETDB_H		    0
+#define PJ_HAS_NETINET_IN_H	    0
+#define PJ_HAS_SETJMP_H		    0
+#define PJ_HAS_STDARG_H		    1
+#define PJ_HAS_STDDEF_H		    0
+#define PJ_HAS_STDIO_H		    0
+#define PJ_HAS_STDLIB_H		    0
+#define PJ_HAS_STRING_H		    0
+#define PJ_HAS_SYS_IOCTL_H	    0
+#define PJ_HAS_SYS_SELECT_H	    0
+#define PJ_HAS_SYS_SOCKET_H	    0
+#define PJ_HAS_SYS_TIME_H	    0
+#define PJ_HAS_SYS_TIMEB_H	    0
+#define PJ_HAS_SYS_TYPES_H	    0
+#define PJ_HAS_TIME_H		    0
+#define PJ_HAS_UNISTD_H		    0
+
+#define PJ_HAS_MSWSOCK_H	    0
+#define PJ_HAS_WINSOCK_H	    0
+#define PJ_HAS_WINSOCK2_H	    0
+
+#define PJ_SOCK_HAS_INET_ATON	    0
+
+/* Set 1 if native sockaddr_in has sin_len member. 
+ * Default: 0
+ */
+#define PJ_SOCKADDR_HAS_LEN	    0
+
+/* When this macro is set, getsockopt(SOL_SOCKET, SO_ERROR) will return
+ * the status of non-blocking connect() operation.
+ */
+#define PJ_HAS_SO_ERROR             1
+
+/**
+ * If this macro is set, it tells select I/O Queue that select() needs to
+ * be given correct value of nfds (i.e. largest fd + 1). This requires
+ * select ioqueue to re-scan the descriptors on each registration and
+ * unregistration.
+ * If this macro is not set, then ioqueue will always give FD_SETSIZE for
+ * nfds argument when calling select().
+ *
+ * Default: 0
+ */
+#define PJ_SELECT_NEEDS_NFDS	    0
+
+/* Is errno a good way to retrieve OS errors?
+ * (probably no for linux kernel) 
+ * If you answer no here, you'll need to tell pjlib how to get OS
+ * error (a compile error will tell you exactly where)
+ */
+#define PJ_HAS_ERRNO_VAR	    0
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket recv() can not return immediate daata.
+ */
+#define PJ_BLOCKING_ERROR_VAL       EAGAIN
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket connect() can not get connected immediately.
+ */
+#define PJ_BLOCKING_CONNECT_ERROR_VAL   EINPROGRESS
+
+#ifndef PJ_HAS_THREADS
+#  define PJ_HAS_THREADS	    (1)
+#endif
+
+
+/*
+ * Declare __FD_SETSIZE now before including <linux*>.
+ */
+#define __FD_SETSIZE		    PJ_IOQUEUE_MAX_HANDLES
+
+#define NULL			    ((void*)0)
+
+#include <linux/module.h>	/* Needed by all modules */
+#include <linux/kernel.h>	/* Needed for KERN_INFO */
+
+#define __PJ_EXPORT_SYMBOL(a)	    EXPORT_SYMBOL(a);
+
+/*
+ * Override features.
+ */
+#define PJ_HAS_FLOATING_POINT	    0
+#define PJ_HAS_MALLOC               0
+#define PJ_HAS_SEMAPHORE	    0
+#define PJ_HAS_EVENT_OBJ	    0
+#define PJ_HAS_HIGH_RES_TIMER	    1
+#ifndef PJ_OS_HAS_CHECK_STACK
+#   define PJ_OS_HAS_CHECK_STACK    0
+#endif
+#define PJ_TERM_HAS_COLOR	    0
+#define PJ_NATIVE_STRING_IS_UNICODE 0
+
+#define PJ_ATOMIC_VALUE_TYPE	    int
+#define PJ_THREAD_DESC_SIZE	    128
+
+/* If 1, use Read/Write mutex emulation for platforms that don't support it */
+#define PJ_EMULATE_RWMUTEX	    0
+
+/* If 1, pj_thread_create() should enforce the stack size when creating 
+ * threads.
+ * Default: 0 (let OS decide the thread's stack size).
+ */
+#define PJ_THREAD_SET_STACK_SIZE    	0
+
+/* If 1, pj_thread_create() should allocate stack from the pool supplied.
+ * Default: 0 (let OS allocate memory for thread's stack).
+ */
+#define PJ_THREAD_ALLOCATE_STACK    	0
+
+
+
+#endif	/* __PJ_COMPAT_OS_LINUX_KERNEL_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_palmos.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_palmos.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_palmos.h	(revision 1163)
@@ -0,0 +1,118 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_OS_PALMOS_H__
+#define __PJ_COMPAT_OS_PALMOS_H__
+
+/**
+ * @file os_palmos.h
+ * @brief Describes PalmOS operating system specifics.
+ */
+
+#define PJ_OS_NAME		    "palmos"
+
+#define PJ_HAS_ARPA_INET_H	    0
+#define PJ_HAS_ASSERT_H		    1
+#define PJ_HAS_CTYPE_H		    1
+#define PJ_HAS_ERRNO_H		    0
+#define PJ_HAS_MALLOC_H		    1
+#define PJ_HAS_NETDB_H		    0
+#define PJ_HAS_NETINET_IN_H	    0
+#define PJ_HAS_SETJMP_H		    1
+#define PJ_HAS_STDARG_H		    1
+#define PJ_HAS_STDDEF_H		    1
+#define PJ_HAS_STDIO_H		    1
+#define PJ_HAS_STDLIB_H		    1
+#define PJ_HAS_STRING_H		    1
+#define PJ_HAS_SYS_IOCTL_H	    0
+#define PJ_HAS_SYS_SELECT_H	    0
+#define PJ_HAS_SYS_SOCKET_H	    0
+#define PJ_HAS_SYS_TIMEB_H	    0
+#define PJ_HAS_SYS_TYPES_H	    1
+#define PJ_HAS_TIME_H		    1
+#define PJ_HAS_UNISTD_H		    0
+
+#define PJ_HAS_MSWSOCK_H	    0
+#define PJ_HAS_WINSOCK_H	    0
+#define PJ_HAS_WINSOCK2_H	    0
+
+#define PJ_SOCK_HAS_INET_ATON	    0
+
+/* Set 1 if native sockaddr_in has sin_len member. 
+ * Default: 0
+ */
+#define PJ_SOCKADDR_HAS_LEN	    0
+
+/**
+ * If this macro is set, it tells select I/O Queue that select() needs to
+ * be given correct value of nfds (i.e. largest fd + 1). This requires
+ * select ioqueue to re-scan the descriptors on each registration and
+ * unregistration.
+ * If this macro is not set, then ioqueue will always give FD_SETSIZE for
+ * nfds argument when calling select().
+ *
+ * Default: 0
+ */
+#define PJ_SELECT_NEEDS_NFDS	    0
+
+/* Is errno a good way to retrieve OS errors?
+ */
+#define PJ_HAS_ERRNO_VAR	    0
+
+/* When this macro is set, getsockopt(SOL_SOCKET, SO_ERROR) will return
+ * the status of non-blocking connect() operation.
+ */
+#define PJ_HAS_SO_ERROR             0
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket recv() can not return immediate daata.
+ */
+#define PJ_BLOCKING_ERROR_VAL       xxx
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket connect() can not get connected immediately.
+ */
+#define PJ_BLOCKING_CONNECT_ERROR_VAL   xxx
+
+/* Default threading is enabled, unless it's overridden. */
+#ifndef PJ_HAS_THREADS
+#  define PJ_HAS_THREADS		(1)
+#endif
+
+#define PJ_HAS_HIGH_RES_TIMER		1
+#ifndef PJ_OS_HAS_CHECK_STACK
+#   define PJ_OS_HAS_CHECK_STACK	0
+#define PJ_NATIVE_STRING_IS_UNICODE	0
+
+/* If 1, use Read/Write mutex emulation for platforms that don't support it */
+#define PJ_EMULATE_RWMUTEX		1
+
+/* If 1, pj_thread_create() should enforce the stack size when creating 
+ * threads.
+ * Default: 0 (let OS decide the thread's stack size).
+ */
+#define PJ_THREAD_SET_STACK_SIZE    	0
+
+/* If 1, pj_thread_create() should allocate stack from the pool supplied.
+ * Default: 0 (let OS allocate memory for thread's stack).
+ */
+#define PJ_THREAD_ALLOCATE_STACK    	0
+
+
+#endif	/* __PJ_COMPAT_OS_PALMOS_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_rtems.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_rtems.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_rtems.h	(revision 1163)
@@ -0,0 +1,138 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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.
+ */
+
+#ifndef __PJ_COMPAT_OS_RTEMS_H__
+#define __PJ_COMPAT_OS_RTEMS_H__
+
+/**
+ * @file os_linux.h
+ * @brief Describes Linux operating system specifics.
+ */
+
+#define PJ_OS_NAME		    "rtems"
+
+#define PJ_HAS_ARPA_INET_H	    1
+#define PJ_HAS_ASSERT_H		    1
+#define PJ_HAS_CTYPE_H		    1
+#define PJ_HAS_ERRNO_H		    1
+#define PJ_HAS_LINUX_SOCKET_H	    0
+#define PJ_HAS_MALLOC_H		    1
+#define PJ_HAS_NETDB_H		    1
+#define PJ_HAS_NETINET_IN_H	    1
+#define PJ_HAS_SETJMP_H		    1
+#define PJ_HAS_STDARG_H		    0
+#define PJ_HAS_STDDEF_H		    1
+#define PJ_HAS_STDIO_H		    1
+#define PJ_HAS_STDLIB_H		    1
+#define PJ_HAS_STRING_H		    1
+#define PJ_HAS_SYS_IOCTL_H	    1
+#define PJ_HAS_SYS_SELECT_H	    1
+#define PJ_HAS_SYS_SOCKET_H	    1
+#define PJ_HAS_SYS_TIME_H	    1
+#define PJ_HAS_SYS_TIMEB_H	    1
+#define PJ_HAS_SYS_TYPES_H	    1
+#define PJ_HAS_TIME_H		    1
+#define PJ_HAS_UNISTD_H		    1
+
+#define PJ_HAS_MSWSOCK_H	    0
+#define PJ_HAS_WINSOCK_H	    0
+#define PJ_HAS_WINSOCK2_H	    0
+
+#define PJ_SOCK_HAS_INET_ATON	    1
+
+/* Set 1 if native sockaddr_in has sin_len member. 
+ * Default: 0
+ */
+#define PJ_SOCKADDR_HAS_LEN	    1
+
+/* Is errno a good way to retrieve OS errors?
+ */
+#define PJ_HAS_ERRNO_VAR	    1
+
+/* When this macro is set, getsockopt(SOL_SOCKET, SO_ERROR) will return
+ * the status of non-blocking connect() operation.
+ */
+#define PJ_HAS_SO_ERROR             1
+
+/**
+ * If this macro is set, it tells select I/O Queue that select() needs to
+ * be given correct value of nfds (i.e. largest fd + 1). This requires
+ * select ioqueue to re-scan the descriptors on each registration and
+ * unregistration.
+ * If this macro is not set, then ioqueue will always give FD_SETSIZE for
+ * nfds argument when calling select().
+ *
+ * Default: 0
+ */
+#define PJ_SELECT_NEEDS_NFDS	    1
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket recv() can not return immediate daata.
+ */
+#define PJ_BLOCKING_ERROR_VAL       EWOULDBLOCK
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket connect() can not get connected immediately.
+ */
+#define PJ_BLOCKING_CONNECT_ERROR_VAL   EINPROGRESS
+
+/* Default threading is enabled, unless it's overridden. */
+#ifndef PJ_HAS_THREADS
+#  define PJ_HAS_THREADS	    (1)
+#endif
+
+#define PJ_HAS_HIGH_RES_TIMER	    1
+#define PJ_HAS_MALLOC               1
+#ifndef PJ_OS_HAS_CHECK_STACK
+#   define PJ_OS_HAS_CHECK_STACK    0
+#endif
+#define PJ_NATIVE_STRING_IS_UNICODE 0
+
+#define PJ_ATOMIC_VALUE_TYPE	    int
+
+/* If 1, use Read/Write mutex emulation for platforms that don't support it */
+#define PJ_EMULATE_RWMUTEX	    1
+
+/* Missing socklen_t */
+typedef int socklen_t;
+
+/* If 1, pj_thread_create() should enforce the stack size when creating 
+ * threads.
+ * Default: 0 (let OS decide the thread's stack size).
+ */
+#define PJ_THREAD_SET_STACK_SIZE    1
+
+/* If 1, pj_thread_create() should allocate stack from the pool supplied.
+ * Default: 0 (let OS allocate memory for thread's stack).
+ */
+#define PJ_THREAD_ALLOCATE_STACK    1
+
+/* RTEMS has socklen_t (does it? )*/
+#define PJ_HAS_SOCKLEN_T	    1
+
+
+
+
+#endif	/* __PJ_COMPAT_OS_RTEMS_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_sunos.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_sunos.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_sunos.h	(revision 1163)
@@ -0,0 +1,131 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_OS_SUNOS_H__
+#define __PJ_COMPAT_OS_SUNOS_H__
+
+/**
+ * @file os_sunos.h
+ * @brief Describes SunOS/Solaris operating system specifics.
+ */
+
+#define PJ_OS_NAME		    "sunos"
+
+#define PJ_HAS_ARPA_INET_H	    1
+#define PJ_HAS_ASSERT_H		    1
+#define PJ_HAS_CTYPE_H		    1
+#define PJ_HAS_ERRNO_H		    1
+#define PJ_HAS_LINUX_SOCKET_H	    0
+#define PJ_HAS_MALLOC_H		    1
+#define PJ_HAS_NETDB_H		    1
+#define PJ_HAS_NETINET_IN_H	    1
+#define PJ_HAS_SETJMP_H		    1
+#define PJ_HAS_STDARG_H		    1
+#define PJ_HAS_STDDEF_H		    1
+#define PJ_HAS_STDIO_H		    1
+#define PJ_HAS_STDLIB_H		    1
+#define PJ_HAS_STRING_H		    1
+#define PJ_HAS_SYS_IOCTL_H	    1
+#define PJ_HAS_SYS_SELECT_H	    1
+#define PJ_HAS_SYS_SOCKET_H	    1
+#define PJ_HAS_SYS_TIME_H	    0
+#define PJ_HAS_SYS_TIMEB_H	    1
+#define PJ_HAS_SYS_TYPES_H	    1
+#define PJ_HAS_TIME_H		    1
+#define PJ_HAS_UNISTD_H		    1
+
+#define PJ_HAS_MSWSOCK_H	    0
+#define PJ_HAS_WINSOCK_H	    0
+#define PJ_HAS_WINSOCK2_H	    0
+
+#define PJ_SOCK_HAS_INET_ATON	    0
+
+/* Set 1 if native sockaddr_in has sin_len member. 
+ * Default: 0
+ */
+#define PJ_SOCKADDR_HAS_LEN	    0
+
+/* Is errno a good way to retrieve OS errors?
+ */
+#define PJ_HAS_ERRNO_VAR	    1
+
+/* When this macro is set, getsockopt(SOL_SOCKET, SO_ERROR) will return
+ * the status of non-blocking connect() operation.
+ */
+#define PJ_HAS_SO_ERROR             0
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket recv() can not return immediate daata.
+ */
+#define PJ_BLOCKING_ERROR_VAL       EWOULDBLOCK
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket connect() can not get connected immediately.
+ */
+#define PJ_BLOCKING_CONNECT_ERROR_VAL   EINPROGRESS
+
+/**
+ * If this macro is set, it tells select I/O Queue that select() needs to
+ * be given correct value of nfds (i.e. largest fd + 1). This requires
+ * select ioqueue to re-scan the descriptors on each registration and
+ * unregistration.
+ * If this macro is not set, then ioqueue will always give FD_SETSIZE for
+ * nfds argument when calling select().
+ *
+ * Default: 0
+ */
+#define PJ_SELECT_NEEDS_NFDS		0
+
+/* Default threading is enabled, unless it's overridden. */
+#ifndef PJ_HAS_THREADS
+#  define PJ_HAS_THREADS		(1)
+#endif
+
+#define PJ_HAS_HIGH_RES_TIMER		1
+#define PJ_HAS_MALLOC			1
+#ifndef PJ_OS_HAS_CHECK_STACK
+#   define PJ_OS_HAS_CHECK_STACK        0
+#endif
+#define PJ_NATIVE_STRING_IS_UNICODE	0
+
+#define PJ_ATOMIC_VALUE_TYPE		long
+
+/* Get BSD related identifers in Sun's include files */
+#define BSD_COMP
+
+/* If 1, use Read/Write mutex emulation for platforms that don't support it */
+#define PJ_EMULATE_RWMUTEX		0
+
+/* If 1, pj_thread_create() should enforce the stack size when creating 
+ * threads.
+ * Default: 0 (let OS decide the thread's stack size).
+ */
+#define PJ_THREAD_SET_STACK_SIZE    	0
+
+/* If 1, pj_thread_create() should allocate stack from the pool supplied.
+ * Default: 0 (let OS allocate memory for thread's stack).
+ */
+#define PJ_THREAD_ALLOCATE_STACK    	0
+
+/* SunOS has socklen_t (does it? )*/
+#define PJ_HAS_SOCKLEN_T	    1
+
+
+
+#endif	/* __PJ_COMPAT_OS_SUNOS_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_win32.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_win32.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_win32.h	(revision 1163)
@@ -0,0 +1,130 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_OS_WIN32_H__
+#define __PJ_COMPAT_OS_WIN32_H__
+
+/**
+ * @file os_win32.h
+ * @brief Describes Win32 operating system family specifics.
+ */
+
+#define PJ_OS_NAME		    "win32"
+
+#define WIN32_LEAN_AND_MEAN
+#define PJ_WIN32_WINNT		    0x0400
+#ifndef _WIN32_WINNT
+#  define _WIN32_WINNT		    PJ_WIN32_WINNT
+#endif
+
+#define PJ_HAS_ARPA_INET_H	    0
+#define PJ_HAS_ASSERT_H		    1
+#define PJ_HAS_CTYPE_H		    1
+#define PJ_HAS_ERRNO_H		    0   /* Must be zero, otherwise errno_test() fails. */
+#define PJ_HAS_LINUX_SOCKET_H	    0
+#define PJ_HAS_MALLOC_H		    1
+#define PJ_HAS_NETDB_H		    0
+#define PJ_HAS_NETINET_IN_H	    0
+#define PJ_HAS_SETJMP_H		    1
+#define PJ_HAS_STDARG_H		    1
+#define PJ_HAS_STDDEF_H		    1
+#define PJ_HAS_STDIO_H		    1
+#define PJ_HAS_STDLIB_H		    1
+#define PJ_HAS_STRING_H		    1
+#define PJ_HAS_SYS_IOCTL_H	    0
+#define PJ_HAS_SYS_SELECT_H	    0
+#define PJ_HAS_SYS_SOCKET_H	    0
+#define PJ_HAS_SYS_TIME_H	    0
+#define PJ_HAS_SYS_TIMEB_H	    1
+#define PJ_HAS_SYS_TYPES_H	    1
+#define PJ_HAS_TIME_H		    1
+#define PJ_HAS_UNISTD_H		    0
+
+#define PJ_HAS_MSWSOCK_H	    1
+#define PJ_HAS_WINSOCK_H	    0
+#define PJ_HAS_WINSOCK2_H	    1
+
+#define PJ_SOCK_HAS_INET_ATON	    0
+
+/* Set 1 if native sockaddr_in has sin_len member. 
+ * Default: 0
+ */
+#define PJ_SOCKADDR_HAS_LEN	    0
+
+/* Is errno a good way to retrieve OS errors? (No)
+ */
+#define PJ_HAS_ERRNO_VAR	    0
+
+/* When this macro is set, getsockopt(SOL_SOCKET, SO_ERROR) will return
+ * the status of non-blocking connect() operation.
+ */
+#define PJ_HAS_SO_ERROR             1
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket recv() or send() can not return immediately.
+ */
+#define PJ_BLOCKING_ERROR_VAL       WSAEWOULDBLOCK
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket connect() can not get connected immediately.
+ */
+#define PJ_BLOCKING_CONNECT_ERROR_VAL   WSAEWOULDBLOCK
+
+/**
+ * If this macro is set, it tells select I/O Queue that select() needs to
+ * be given correct value of nfds (i.e. largest fd + 1). This requires
+ * select ioqueue to re-scan the descriptors on each registration and
+ * unregistration.
+ * If this macro is not set, then ioqueue will always give FD_SETSIZE for
+ * nfds argument when calling select().
+ *
+ * Default: 0
+ */
+#define PJ_SELECT_NEEDS_NFDS		0
+
+/* Default threading is enabled, unless it's overridden. */
+#ifndef PJ_HAS_THREADS
+#  define PJ_HAS_THREADS		(1)
+#endif
+
+#define PJ_HAS_HIGH_RES_TIMER		1
+#define PJ_HAS_MALLOC			1
+#ifndef PJ_OS_HAS_CHECK_STACK
+#   define PJ_OS_HAS_CHECK_STACK	1
+#endif
+#define PJ_NATIVE_STRING_IS_UNICODE	0
+
+#define PJ_ATOMIC_VALUE_TYPE		long
+
+/* If 1, use Read/Write mutex emulation for platforms that don't support it */
+#define PJ_EMULATE_RWMUTEX		1
+
+/* If 1, pj_thread_create() should enforce the stack size when creating 
+ * threads.
+ * Default: 0 (let OS decide the thread's stack size).
+ */
+#define PJ_THREAD_SET_STACK_SIZE    	0
+
+/* If 1, pj_thread_create() should allocate stack from the pool supplied.
+ * Default: 0 (let OS allocate memory for thread's stack).
+ */
+#define PJ_THREAD_ALLOCATE_STACK    	0
+
+
+#endif	/* __PJ_COMPAT_OS_WIN32_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_win32_wince.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_win32_wince.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/os_win32_wince.h	(revision 1163)
@@ -0,0 +1,137 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_OS_WIN32_WINCE_H__
+#define __PJ_COMPAT_OS_WIN32_WINCE_H__
+
+/**
+ * @file os_win32.h
+ * @brief Describes Win32 operating system family specifics.
+ */
+
+#define PJ_OS_NAME		    "win32-wince"
+
+#define WIN32_LEAN_AND_MEAN
+//#define PJ_WIN32_WINNT		    0x0400
+//#define _WIN32_WINNT		    PJ_WIN32_WINNT
+
+#define PJ_HAS_ARPA_INET_H	    0
+#define PJ_HAS_ASSERT_H		    1
+#define PJ_HAS_CTYPE_H		    1
+#define PJ_HAS_ERRNO_H		    0   /* Must be zero, otherwise errno_test() fails. */
+#define PJ_HAS_LINUX_SOCKET_H	    0
+#define PJ_HAS_MALLOC_H		    1
+#define PJ_HAS_NETDB_H		    0
+#define PJ_HAS_NETINET_IN_H	    0
+#define PJ_HAS_SETJMP_H		    1
+#define PJ_HAS_STDARG_H		    1
+#define PJ_HAS_STDDEF_H		    1
+#define PJ_HAS_STDIO_H		    1
+#define PJ_HAS_STDLIB_H		    1
+#define PJ_HAS_STRING_H		    1
+#define PJ_HAS_SYS_IOCTL_H	    0
+#define PJ_HAS_SYS_SELECT_H	    0
+#define PJ_HAS_SYS_SOCKET_H	    0
+#define PJ_HAS_SYS_TIME_H	    0
+#define PJ_HAS_SYS_TIMEB_H	    0	/* Doesn't have sys/timeb.h */
+#define PJ_HAS_SYS_TYPES_H	    0	/* Doesn't have sys/types.h */
+#define PJ_HAS_TIME_H		    1
+#define PJ_HAS_UNISTD_H		    0
+
+#define PJ_HAS_MSWSOCK_H	    1
+#define PJ_HAS_WINSOCK_H	    0
+#define PJ_HAS_WINSOCK2_H	    1
+
+#define PJ_SOCK_HAS_INET_ATON	    0
+
+/* Set 1 if native sockaddr_in has sin_len member. 
+ * Default: 0
+ */
+#define PJ_SOCKADDR_HAS_LEN	    0
+
+/* Is errno a good way to retrieve OS errors? (no)
+ */
+#define PJ_HAS_ERRNO_VAR	    0
+
+/* When this macro is set, getsockopt(SOL_SOCKET, SO_ERROR) will return
+ * the status of non-blocking connect() operation.
+ */
+#define PJ_HAS_SO_ERROR             0
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket recv() or send() can not return immediately.
+ */
+#define PJ_BLOCKING_ERROR_VAL       WSAEWOULDBLOCK
+
+/* This value specifies the value set in errno by the OS when a non-blocking
+ * socket connect() can not get connected immediately.
+ */
+#define PJ_BLOCKING_CONNECT_ERROR_VAL   WSAEWOULDBLOCK
+
+/**
+ * If this macro is set, it tells select I/O Queue that select() needs to
+ * be given correct value of nfds (i.e. largest fd + 1). This requires
+ * select ioqueue to re-scan the descriptors on each registration and
+ * unregistration.
+ * If this macro is not set, then ioqueue will always give FD_SETSIZE for
+ * nfds argument when calling select().
+ *
+ * Default: 0
+ */
+#define PJ_SELECT_NEEDS_NFDS	    0
+
+/* Default threading is enabled, unless it's overridden. */
+#ifndef PJ_HAS_THREADS
+#  define PJ_HAS_THREADS	    (1)
+#endif
+
+#define PJ_HAS_HIGH_RES_TIMER	    1
+#define PJ_HAS_MALLOC               1
+#define PJ_OS_HAS_CHECK_STACK	    1
+
+#define PJ_ATOMIC_VALUE_TYPE	    long
+
+/* TlsAlloc() error value. */
+#define TLS_OUT_OF_INDEXES	    0xFFFFFFFF 
+
+/* No console. */
+#define PJ_TERM_HAS_COLOR	    0
+
+/* No rdtsc */
+#define PJ_TIMESTAMP_USE_RDTSC	    0
+
+/* Native string is Unicode. */
+#define PJ_NATIVE_STRING_IS_UNICODE 1
+
+/* If 1, use Read/Write mutex emulation for platforms that don't support it */
+#define PJ_EMULATE_RWMUTEX	    1
+
+/* If 1, pj_thread_create() should enforce the stack size when creating 
+ * threads.
+ * Default: 0 (let OS decide the thread's stack size).
+ */
+#define PJ_THREAD_SET_STACK_SIZE    	0
+
+/* If 1, pj_thread_create() should allocate stack from the pool supplied.
+ * Default: 0 (let OS allocate memory for thread's stack).
+ */
+#define PJ_THREAD_ALLOCATE_STACK    	0
+
+
+#endif	/* __PJ_COMPAT_OS_WIN32_WINCE_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/rand.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/rand.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/rand.h	(revision 1163)
@@ -0,0 +1,69 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/setjmp.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/setjmp.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/setjmp.h	(revision 1163)
@@ -0,0 +1,94 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_SETJMP_H__
+#define __PJ_COMPAT_SETJMP_H__
+
+/**
+ * @file setjmp.h
+ * @brief Provides setjmp.h functionality.
+ */
+
+#if defined(PJ_HAS_SETJMP_H) && PJ_HAS_SETJMP_H != 0
+#  include <setjmp.h>
+   typedef jmp_buf pj_jmp_buf;
+#  ifndef pj_setjmp
+#    define pj_setjmp(buf)	setjmp(buf)
+#  endif
+#  ifndef pj_longjmp
+#    define pj_longjmp(buf,d)	longjmp(buf,d)
+#  endif
+
+#elif defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL != 0 && \
+      defined(PJ_M_I386) && PJ_M_I386 != 0
+
+    /*
+     * These are taken from uClibc.
+     * Copyright (C) 2000-2003 Erik Andersen <andersen@uclibc.org>
+     */
+#   if defined __USE_MISC || defined _ASM
+#	define JB_BX	0
+#	define JB_SI	1
+#	define JB_DI	2
+#	define JB_BP	3
+#	define JB_SP	4
+#	define JB_PC	5
+#	define JB_SIZE 24
+#   endif
+
+# ifndef _ASM
+	typedef int __jmp_buf[6];
+
+    /* A `sigset_t' has a bit for each signal.  */
+#   define _SIGSET_NWORDS	(1024 / (8 * sizeof (unsigned long int)))
+    typedef struct __sigset_t_tag
+    {
+	unsigned long int __val[_SIGSET_NWORDS];
+    } __sigset_t;
+
+    /* Calling environment, plus possibly a saved signal mask.  */
+    typedef struct __jmp_buf_tag    /* C++ doesn't like tagless structs.  */
+    {
+	/* NOTE: The machine-dependent definitions of `__sigsetjmp'
+	   assume that a `jmp_buf' begins with a `__jmp_buf' and that
+	   `__mask_was_saved' follows it.  Do not move these members
+	   or add others before it.  */
+	__jmp_buf __jmpbuf;		/* Calling environment.  */
+	int __mask_was_saved;		/* Saved the signal mask?  */
+	// we never saved the mask.
+	__sigset_t __saved_mask;	/* Saved signal mask.  */
+    } jmp_buf[1];
+
+    typedef jmp_buf sigjmp_buf;
+    typedef jmp_buf pj_jmp_buf;
+
+    PJ_DECL(int) pj_setjmp(pj_jmp_buf env);
+    PJ_DECL(void) pj_longjmp(pj_jmp_buf env, int val) __attribute__((noreturn));
+
+# endif   /* _ASM */
+
+#else
+#  warning "setjmp()/longjmp() is not implemented"
+   typedef int pj_jmp_buf[1];
+#  define pj_setjmp(buf)	0
+#  define pj_longjmp(buf,d)	0
+#endif
+
+
+#endif	/* __PJ_COMPAT_SETJMP_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/size_t.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/size_t.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/size_t.h	(revision 1163)
@@ -0,0 +1,31 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_SIZE_T_H__
+#define __PJ_COMPAT_SIZE_T_H__
+
+/**
+ * @file size_t.h
+ * @brief Provides size_t type.
+ */
+#if PJ_HAS_STDDEF_H
+# include <stddef.h>
+#endif
+
+#endif	/* __PJ_COMPAT_SIZE_T_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/socket.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/socket.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/socket.h	(revision 1163)
@@ -0,0 +1,141 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_SOCKET_H__
+#define __PJ_COMPAT_SOCKET_H__
+
+/**
+ * @file socket.h
+ * @brief Provides all socket related functions,data types, error codes, etc.
+ */
+
+#if defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H != 0
+#  include <winsock2.h>
+#endif
+
+#if defined(PJ_HAS_WINSOCK_H) && PJ_HAS_WINSOCK_H != 0
+#  include <winsock.h>
+#endif
+
+#if defined(PJ_HAS_SYS_TYPES_H) && PJ_HAS_SYS_TYPES_H != 0
+#  include <sys/types.h>
+#endif
+
+#if defined(PJ_HAS_SYS_SOCKET_H) && PJ_HAS_SYS_SOCKET_H != 0
+#  include <sys/socket.h>
+#endif
+
+#if defined(PJ_HAS_LINUX_SOCKET_H) && PJ_HAS_LINUX_SOCKET_H != 0
+#  include <linux/socket.h>
+#endif
+
+#if defined(PJ_HAS_SYS_SELECT_H) && PJ_HAS_SYS_SELECT_H != 0
+#  include <sys/select.h>
+#endif
+
+#if defined(PJ_HAS_NETINET_IN_H) && PJ_HAS_NETINET_IN_H != 0
+#  include <netinet/in.h>
+#endif
+
+#if defined(PJ_HAS_NETINET_IP_H) && PJ_HAS_NETINET_IP_H != 0
+/* To pull in IPTOS_* constants */
+#  include <netinet/ip.h>
+#endif
+
+#if defined(PJ_HAS_ARPA_INET_H) && PJ_HAS_ARPA_INET_H != 0
+#  include <arpa/inet.h>
+#endif
+
+#if defined(PJ_HAS_SYS_IOCTL_H) && PJ_HAS_SYS_IOCTL_H != 0
+#  include <sys/ioctl.h>	/* FBIONBIO */
+#endif
+
+#if defined(PJ_HAS_ERRNO_H) && PJ_HAS_ERRNO_H != 0
+#  include <errno.h>
+#endif
+
+#if defined(PJ_HAS_NETDB_H) && PJ_HAS_NETDB_H != 0
+#  include <netdb.h>
+#endif
+
+#if defined(PJ_HAS_UNISTD_H) && PJ_HAS_UNISTD_H != 0
+#  include <unistd.h>
+#endif
+
+
+/*
+ * Define common errors.
+ */
+#if (defined(PJ_WIN32) && PJ_WIN32!=0) || \
+    (defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0)
+#  define OSERR_EWOULDBLOCK    WSAEWOULDBLOCK
+#  define OSERR_EINPROGRESS    WSAEINPROGRESS
+#  define OSERR_ECONNRESET     WSAECONNRESET
+#  define OSERR_ENOTCONN       WSAENOTCONN
+#else
+#  define OSERR_EWOULDBLOCK    EWOULDBLOCK
+#  define OSERR_EINPROGRESS    EINPROGRESS
+#  define OSERR_ECONNRESET     ECONNRESET
+#  define OSERR_ENOTCONN       ENOTCONN
+#endif
+
+
+/*
+ * And undefine this..
+ */
+#undef s_addr
+
+/*
+ * Linux kernel specifics
+ */
+#if defined(PJ_LINUX_KERNEL)
+#   include <linux/net.h>
+#   include <asm/ioctls.h>		/* FIONBIO	*/
+#   include <linux/syscalls.h>	/* sys_select() */
+#   include <asm/uaccess.h>	/* set/get_fs()	*/
+
+    typedef int socklen_t;
+#   define getsockopt  sys_getsockopt
+
+    /*
+     * Wrapper for select() in Linux kernel.
+     */
+    PJ_INLINE(int) select(int n, fd_set *inp, fd_set *outp, fd_set *exp,
+		          struct timeval *tvp)
+    {
+        int count;
+        mm_segment_t oldfs = get_fs();
+        set_fs(KERNEL_DS);
+        count = sys_select(n, inp, outp, exp, tvp);
+        set_fs(oldfs);
+        return count;
+    }
+#endif	/* PJ_LINUX_KERNEL */
+
+
+/*
+ * This will finally be obsoleted, since it should be declared in
+ * os_auto.h
+ */
+#if !defined(PJ_HAS_SOCKLEN_T) || PJ_HAS_SOCKLEN_T==0
+    typedef int socklen_t;
+#endif
+
+
+#endif	/* __PJ_COMPAT_SOCKET_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/stdarg.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/stdarg.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/stdarg.h	(revision 1163)
@@ -0,0 +1,31 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_STDARG_H__
+#define __PJ_COMPAT_STDARG_H__
+
+/**
+ * @file stdarg.h
+ * @brief Provides stdarg functionality.
+ */
+
+#if defined(PJ_HAS_STDARG_H) && PJ_HAS_STDARG_H != 0
+#  include <stdarg.h>
+#endif
+
+#endif	/* __PJ_COMPAT_STDARG_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/stdfileio.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/stdfileio.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/stdfileio.h	(revision 1163)
@@ -0,0 +1,31 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_STDFILEIO_H__
+#define __PJ_COMPAT_STDFILEIO_H__
+
+/**
+ * @file stdfileio.h
+ * @brief Compatibility for ANSI file I/O like fputs, fflush, etc.
+ */
+
+#if defined(PJ_HAS_STDIO_H) && PJ_HAS_STDIO_H != 0
+#  include <stdio.h>
+#endif
+
+#endif	/* __PJ_COMPAT_STDFILEIO_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/string.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/string.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/string.h	(revision 1163)
@@ -0,0 +1,133 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_STRING_H__
+#define __PJ_COMPAT_STRING_H__
+
+/**
+ * @file string.h
+ * @brief Provides string manipulation functions found in ANSI string.h.
+ */
+
+
+#if defined(PJ_HAS_STRING_H) && PJ_HAS_STRING_H != 0
+#   include <string.h>
+#else
+
+    PJ_DECL(int) strcasecmp(const char *s1, const char *s2);
+    PJ_DECL(int) strncasecmp(const char *s1, const char *s2, int len);
+
+#endif
+
+/* For sprintf family */
+#include <stdio.h>
+
+/* On WinCE, string stuffs are declared in stdlib.h */
+#if defined(PJ_HAS_STDLIB_H) && PJ_HAS_STDLIB_H!=0
+#   include <stdlib.h>
+#endif
+
+#if defined(_MSC_VER)
+#   define strcasecmp	_stricmp
+#   define strncasecmp	_strnicmp
+#   define snprintf	_snprintf
+#   define vsnprintf	_vsnprintf
+#   define snwprintf	_snwprintf
+#   define wcsicmp	_wcsicmp
+#   define wcsnicmp	_wcsnicmp
+#else
+#   define stricmp	strcasecmp
+#   define strnicmp	strncasecmp
+
+#   if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0
+#	error "Implement Unicode string functions"
+#   endif
+#endif
+
+#define pj_ansi_strcmp		strcmp
+#define pj_ansi_strncmp		strncmp
+#define pj_ansi_strlen		strlen
+#define pj_ansi_strcpy		strcpy
+#define pj_ansi_strncpy		strncpy
+#define pj_ansi_strcat		strcat
+#define pj_ansi_strstr		strstr
+#define pj_ansi_strchr		strchr
+#define pj_ansi_strcasecmp	strcasecmp
+#define pj_ansi_stricmp		strcasecmp
+#define pj_ansi_strncasecmp	strncasecmp
+#define pj_ansi_strnicmp	strncasecmp
+#define pj_ansi_sprintf		sprintf
+#define pj_ansi_snprintf	snprintf
+#define pj_ansi_vsprintf	vsprintf
+#define pj_ansi_vsnprintf	vsnprintf
+
+#define pj_unicode_strcmp	wcscmp
+#define pj_unicode_strncmp	wcsncmp
+#define pj_unicode_strlen	wcslen
+#define pj_unicode_strcpy	wcscpy
+#define	pj_unicode_strncpy	wcsncpy
+#define pj_unicode_strcat	wcscat
+#define pj_unicode_strstr	wcsstr
+#define pj_unicode_strchr	wcschr
+#define pj_unicode_strcasecmp	wcsicmp
+#define pj_unicode_stricmp	wcsicmp
+#define pj_unicode_strncasecmp	wcsnicmp
+#define pj_unicode_strnicmp	wcsnicmp
+#define pj_unicode_sprintf	swprintf
+#define pj_unicode_snprintf	snwprintf
+#define pj_unicode_vsprintf	vswprintf
+#define pj_unicode_vsnprintf	vsnwprintf
+
+#if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0
+#   define pj_native_strcmp	    pj_unicode_strcmp
+#   define pj_native_strncmp	    pj_unicode_strncmp
+#   define pj_native_strlen	    pj_unicode_strlen
+#   define pj_native_strcpy	    pj_unicode_strcpy
+#   define pj_native_strncpy	    pj_unicode_strncpy
+#   define pj_native_strcat	    pj_unicode_strcat
+#   define pj_native_strstr	    pj_unicode_strstr
+#   define pj_native_strchr	    pj_unicode_strchr
+#   define pj_native_strcasecmp	    pj_unicode_strcasecmp
+#   define pj_native_stricmp	    pj_unicode_stricmp
+#   define pj_native_strncasecmp    pj_unicode_strncasecmp
+#   define pj_native_strnicmp	    pj_unicode_strnicmp
+#   define pj_native_sprintf	    pj_unicode_sprintf
+#   define pj_native_snprintf	    pj_unicode_snprintf
+#   define pj_native_vsprintf	    pj_unicode_vsprintf
+#   define pj_native_vsnprintf	    pj_unicode_vsnprintf
+#else
+#   define pj_native_strcmp	    pj_ansi_strcmp
+#   define pj_native_strncmp	    pj_ansi_strncmp
+#   define pj_native_strlen	    pj_ansi_strlen
+#   define pj_native_strcpy	    pj_ansi_strcpy
+#   define pj_native_strncpy	    pj_ansi_strncpy
+#   define pj_native_strcat	    pj_ansi_strcat
+#   define pj_native_strstr	    pj_ansi_strstr
+#   define pj_native_strchr	    pj_ansi_strchr
+#   define pj_native_strcasecmp	    pj_ansi_strcasecmp
+#   define pj_native_stricmp	    pj_ansi_stricmp
+#   define pj_native_strncasecmp    pj_ansi_strncasecmp
+#   define pj_native_strnicmp	    pj_ansi_strnicmp
+#   define pj_native_sprintf	    pj_ansi_sprintf
+#   define pj_native_snprintf	    pj_ansi_snprintf
+#   define pj_native_vsprintf	    pj_ansi_vsprintf
+#   define pj_native_vsnprintf	    pj_ansi_vsnprintf
+#endif
+
+
+#endif	/* __PJ_COMPAT_STRING_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/time.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/time.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/compat/time.h	(revision 1163)
@@ -0,0 +1,41 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_TIME_H__
+#define __PJ_COMPAT_TIME_H__
+
+/**
+ * @file time.h
+ * @brief Provides ftime() and localtime() etc functions.
+ */
+
+#if defined(PJ_HAS_TIME_H) && PJ_HAS_TIME_H != 0
+#  include <time.h>
+#endif
+
+#if defined(PJ_HAS_SYS_TIME_H) && PJ_HAS_SYS_TIME_H != 0
+#  include <sys/time.h>
+#endif
+
+#if defined(PJ_HAS_SYS_TIMEB_H) && PJ_HAS_SYS_TIMEB_H != 0
+#  include <sys/timeb.h>
+#endif
+
+
+#endif	/* __PJ_COMPAT_TIME_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/config.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/config.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/config.h	(revision 1163)
@@ -0,0 +1,770 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_CONFIG_H__
+#define __PJ_CONFIG_H__
+
+/**
+ * @file config.h
+ * @brief PJLIB Main configuration settings.
+ */
+
+/********************************************************************
+ * Include compiler specific configuration.
+ */
+#if defined(_MSC_VER)
+#  include <pj/compat/cc_msvc.h>
+#elif defined(__GNUC__)
+#  include <pj/compat/cc_gcc.h>
+#else
+#  error "Unknown compiler."
+#endif
+
+
+/********************************************************************
+ * Include target OS specific configuration.
+ */
+#if defined(PJ_AUTOCONF)
+    /*
+     * Autoconf
+     */
+#   include <pj/compat/os_auto.h>
+
+#elif defined(PJ_WIN32_WINCE) || defined(_WIN32_WCE) || defined(UNDER_CE)
+    /*
+     * Windows CE
+     */
+#   undef PJ_WIN32_WINCE
+#   define PJ_WIN32_WINCE   1
+#   include <pj/compat/os_win32_wince.h>
+
+    /* Also define Win32 */
+#   define PJ_WIN32 1
+
+#elif defined(PJ_WIN32) || defined(_WIN32) || defined(__WIN32__) || \
+	defined(_WIN64) || defined(WIN32) || defined(__TOS_WIN__)
+    /*
+     * Win32
+     */
+#   undef PJ_WIN32
+#   define PJ_WIN32 1
+#   include <pj/compat/os_win32.h>
+
+#elif defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL!=0
+    /*
+     * Linux kernel
+     */
+#  include <pj/compat/os_linux_kernel.h>
+
+#elif defined(PJ_LINUX) || defined(linux) || defined(__linux)
+    /*
+     * Linux
+     */
+#   undef PJ_LINUX
+#   define PJ_LINUX	    1
+#   include <pj/compat/os_linux.h>
+
+#elif defined(PJ_PALMOS) && PJ_PALMOS!=0
+    /*
+     * Palm
+     */
+#  include <pj/compat/os_palmos.h>
+
+#elif defined(PJ_SUNOS) || defined(sun) || defined(__sun)
+    /*
+     * SunOS
+     */
+#   undef PJ_SUNOS
+#   define PJ_SUNOS	    1
+#   include <pj/compat/os_sunos.h>
+
+#elif defined(PJ_DARWINOS) || defined(__MACOSX__)
+    /*
+     * MacOS X
+     */
+#   undef PJ_DARWINOS
+#   define PJ_DARWINOS	    1
+#   include <pj/compat/os_darwinos.h>
+
+#elif defined(PJ_RTEMS) && PJ_RTEMS!=0
+    /*
+     * RTEMS
+     */
+#  include <pj/compat/os_rtems.h>
+#else
+#   error "Please specify target os."
+#endif
+
+
+/********************************************************************
+ * Target machine specific configuration.
+ */
+#if defined(PJ_AUTOCONF)
+    /*
+     * Autoconf configured
+     */
+#include <pj/compat/m_auto.h>
+
+#elif defined (PJ_M_I386) || defined(_i386_) || defined(i_386_) || \
+	defined(_X86_) || defined(x86) || defined(__i386__) || \
+	defined(__i386) || defined(_M_IX86) || defined(__I86__)
+    /*
+     * Generic i386 processor family, little-endian
+     */
+#   undef PJ_M_I386
+#   define PJ_M_I386		1
+#   define PJ_M_NAME		"i386"
+#   define PJ_HAS_PENTIUM	1
+#   define PJ_IS_LITTLE_ENDIAN	1
+#   define PJ_IS_BIG_ENDIAN	0
+
+
+#elif defined (PJ_M_X86_64) || defined(__amd64__) || defined(__amd64) || \
+	defined(__x86_64__) || defined(__x86_64)
+    /*
+     * AMD 64bit processor, little endian
+     */
+#   undef PJ_M_X86_64
+#   define PJ_M_X86_64		1
+#   define PJ_M_NAME		"x86_64"
+#   define PJ_HAS_PENTIUM	1
+#   define PJ_IS_LITTLE_ENDIAN	1
+#   define PJ_IS_BIG_ENDIAN	0
+
+#elif defined(PJ_M_IA64) || defined(__ia64__) || defined(_IA64) || \
+	defined(__IA64__) || defined( 	_M_IA64)
+    /*
+     * Intel IA64 processor, little endian
+     */
+#   undef PJ_M_IA64
+#   define PJ_M_IA64		1
+#   define PJ_M_NAME		"ia64"
+#   define PJ_HAS_PENTIUM	1
+#   define PJ_IS_LITTLE_ENDIAN	1
+#   define PJ_IS_BIG_ENDIAN	0
+
+#elif defined (PJ_M_M68K) && PJ_M_M68K != 0
+
+    /*
+     * Motorola m64k processor, little endian
+     */
+#   undef PJ_M_M68K
+#   define PJ_M_M68K		1
+#   define PJ_M_NAME		"m68k"
+#   define PJ_HAS_PENTIUM	0
+#   define PJ_IS_LITTLE_ENDIAN	1
+#   define PJ_IS_BIG_ENDIAN	0
+
+
+#elif defined (PJ_M_ALPHA) || defined (__alpha__) || defined (__alpha) || \
+	defined (_M_ALPHA)
+    /*
+     * DEC Alpha processor, little endian
+     */
+#   undef PJ_M_ALPHA
+#   define PJ_M_ALPHA		1
+#   define PJ_M_NAME		"alpha"
+#   define PJ_HAS_PENTIUM	0
+#   define PJ_IS_LITTLE_ENDIAN	1
+#   define PJ_IS_BIG_ENDIAN	0
+
+
+#elif defined(PJ_M_MIPS) || defined(__mips__) || defined(__mips) || \
+	defined(__MIPS__) || defined(MIPS) || defined(_MIPS_)
+    /*
+     * MIPS, default to little endian
+     */
+#   undef PJ_M_MIPS
+#   define PJ_M_MIPS		1
+#   define PJ_M_NAME		"mips"
+#   define PJ_HAS_PENTIUM	0
+#   if !defined(PJ_IS_LITTLE_ENDIAN) && !defined(PJ_IS_BIG_ENDIAN)
+#   	define PJ_IS_LITTLE_ENDIAN	1
+#   	define PJ_IS_BIG_ENDIAN		0
+#   endif
+
+
+#elif defined (PJ_M_SPARC) || defined( 	__sparc__) || defined(__sparc)
+    /*
+     * Sun Sparc, big endian
+     */
+#   undef PJ_M_SPARC
+#   define PJ_M_SPARC		1
+#   define PJ_M_NAME		"sparc"
+#   define PJ_HAS_PENTIUM	0
+#   define PJ_IS_LITTLE_ENDIAN	0
+#   define PJ_IS_BIG_ENDIAN	1
+
+#elif defined (PJ_M_ARMV4) || defined(ARM) || defined(_ARM_) ||  \
+	defined(ARMV4) || defined(__arm__)
+    /*
+     * ARM, default to little endian
+     */
+#   undef PJ_M_ARMV4
+#   define PJ_M_ARMV4		1
+#   define PJ_M_NAME		"armv4"
+#   define PJ_HAS_PENTIUM	0
+#   if !defined(PJ_IS_LITTLE_ENDIAN) && !defined(PJ_IS_BIG_ENDIAN)
+#	define PJ_IS_LITTLE_ENDIAN	1
+#	define PJ_IS_BIG_ENDIAN		0
+#   endif
+
+#elif defined (PJ_M_POWERPC) || defined(__powerpc) || defined(__powerpc__) || \
+	defined(__POWERPC__) || defined(__ppc__) || defined(_M_PPC) || \
+	defined(_ARCH_PPC)
+    /*
+     * PowerPC, big endian
+     */
+#   undef PJ_M_POWERPC
+#   define PJ_M_POWERPC		1
+#   define PJ_M_NAME		"powerpc"
+#   define PJ_HAS_PENTIUM	0
+#   define PJ_IS_LITTLE_ENDIAN	0
+#   define PJ_IS_BIG_ENDIAN	1
+
+#else
+#   error "Please specify target machine."
+#endif
+
+/* Include size_t definition. */
+#include <pj/compat/size_t.h>
+
+/* Include site/user specific configuration to control PJLIB features.
+ * YOU MUST CREATE THIS FILE YOURSELF!!
+ */
+#include <pj/config_site.h>
+
+/********************************************************************
+ * PJLIB Features.
+ */
+
+/* Overrides for DOXYGEN */
+#ifdef DOXYGEN
+#   undef PJ_FUNCTIONS_ARE_INLINED
+#   undef PJ_HAS_FLOATING_POINT
+#   undef PJ_LOG_MAX_LEVEL
+#   undef PJ_LOG_MAX_SIZE
+#   undef PJ_LOG_USE_STACK_BUFFER
+#   undef PJ_TERM_HAS_COLOR
+#   undef PJ_POOL_DEBUG
+#   undef PJ_HAS_TCP
+#   undef PJ_MAX_HOSTNAME
+#   undef PJ_IOQUEUE_MAX_HANDLES
+#   undef FD_SETSIZE
+#   undef PJ_HAS_SEMAPHORE
+#   undef PJ_HAS_EVENT_OBJ
+#   undef PJ_ENABLE_EXTRA_CHECK
+#   undef PJ_EXCEPTION_USE_WIN32_SEH
+#   undef PJ_HAS_ERROR_STRING
+#endif
+
+/**
+ * @defgroup pj_config Build Configuration
+ * @ingroup PJ
+ * @{
+ *
+ * This section contains macros that can set during PJLIB build process
+ * to controll various aspects of the library.
+ *
+ * <b>Note</b>: the values in this page does NOT necessarily reflect to the
+ * macro values during the build process.
+ */
+
+/**
+ * If this macro is set to 1, it will enable some debugging checking
+ * in the library.
+ *
+ * Default: equal to (NOT NDEBUG).
+ */
+#ifndef PJ_DEBUG
+#  ifndef NDEBUG
+#    define PJ_DEBUG		    1
+#  else
+#    define PJ_DEBUG		    0
+#  endif
+#endif
+
+/**
+ * Expand functions in *_i.h header files as inline.
+ *
+ * Default: 0.
+ */
+#ifndef PJ_FUNCTIONS_ARE_INLINED
+#  define PJ_FUNCTIONS_ARE_INLINED  0
+#endif
+
+/**
+ * Use floating point computations in the library.
+ *
+ * Default: 1.
+ */
+#ifndef PJ_HAS_FLOATING_POINT
+#  define PJ_HAS_FLOATING_POINT	    1
+#endif
+
+/**
+ * Declare maximum logging level/verbosity. Lower number indicates higher
+ * importance, with the highest importance has level zero. The least
+ * important level is five in this implementation, but this can be extended
+ * by supplying the appropriate implementation.
+ *
+ * The level conventions:
+ *  - 0: fatal error
+ *  - 1: error
+ *  - 2: warning
+ *  - 3: info
+ *  - 4: debug
+ *  - 5: trace
+ *  - 6: more detailed trace
+ *
+ * Default: 4
+ */
+#ifndef PJ_LOG_MAX_LEVEL
+#  define PJ_LOG_MAX_LEVEL   5
+#endif
+
+/**
+ * Maximum message size that can be sent to output device for each call
+ * to PJ_LOG(). If the message size is longer than this value, it will be cut.
+ * This may affect the stack usage, depending whether PJ_LOG_USE_STACK_BUFFER
+ * flag is set.
+ *
+ * Default: 2000
+ */
+#ifndef PJ_LOG_MAX_SIZE
+#  define PJ_LOG_MAX_SIZE	    2000
+#endif
+
+/**
+ * Log buffer.
+ * Does the log get the buffer from the stack? (default is yes).
+ * If the value is set to NO, then the buffer will be taken from static
+ * buffer, which in this case will make the log function non-reentrant.
+ *
+ * Default: 1
+ */
+#ifndef PJ_LOG_USE_STACK_BUFFER
+#  define PJ_LOG_USE_STACK_BUFFER   1
+#endif
+
+
+/**
+ * Colorfull terminal (for logging etc).
+ *
+ * Default: 1
+ */
+#ifndef PJ_TERM_HAS_COLOR
+#  define PJ_TERM_HAS_COLOR	    1
+#endif
+
+
+/**
+ * If pool debugging is used, then each memory allocation from the pool
+ * will call malloc(), and pool will release all memory chunks when it
+ * is destroyed. This works better when memory verification programs
+ * such as Rational Purify is used.
+ *
+ * Default: 0
+ */
+#ifndef PJ_POOL_DEBUG
+#  define PJ_POOL_DEBUG		    0
+#endif
+
+
+/**
+ * Specify this as \a stack_size argument in #pj_thread_create() to specify
+ * that thread should use default stack size for the current platform.
+ *
+ * Default: 8192
+ */
+#ifndef PJ_THREAD_DEFAULT_STACK_SIZE 
+#  define PJ_THREAD_DEFAULT_STACK_SIZE    8192
+#endif
+
+
+/**
+ * Do we have alternate pool implementation?
+ *
+ * Default: 0
+ */
+#ifndef PJ_HAS_POOL_ALT_API
+#   define PJ_HAS_POOL_ALT_API	    PJ_POOL_DEBUG
+#endif
+
+
+/**
+ * \def PJ_HAS_TCP
+ * Support TCP in the library.
+ * Disabling TCP will reduce the footprint slightly (about 6KB).
+ *
+ * Default: 1
+ */
+#ifndef PJ_HAS_TCP
+#  define PJ_HAS_TCP		    1
+#endif
+
+/**
+ * Maximum hostname length.
+ * Libraries sometimes needs to make copy of an address to stack buffer;
+ * the value here affects the stack usage.
+ *
+ * Default: 128
+ */
+#ifndef PJ_MAX_HOSTNAME
+#  define PJ_MAX_HOSTNAME	    (128)
+#endif
+
+/**
+ * Constants for declaring the maximum handles that can be supported by
+ * a single IOQ framework. This constant might not be relevant to the 
+ * underlying I/O queue impelementation, but still, developers should be 
+ * aware of this constant, to make sure that the program will not break when
+ * the underlying implementation changes.
+ *
+ * For implementation based on select(), the value here will be used as the
+ * maximum number of socket handles passed to select() (i.e. FD_SETSIZE will 
+ * be set to this value).
+ *
+ * Default: if FD_SETSIZE is defined and the value is greather than 256,
+ *          then it will be used.  Otherwise 256 (64 for WinCE).
+ */
+#ifndef PJ_IOQUEUE_MAX_HANDLES
+#   if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0
+#	define PJ_IOQUEUE_MAX_HANDLES	(64)
+#   else
+#	define PJ_IOQUEUE_MAX_HANDLES	(256)
+#   endif
+#endif
+
+
+/**
+ * If PJ_IOQUEUE_HAS_SAFE_UNREG macro is defined, then ioqueue will do more
+ * things to ensure thread safety of handle unregistration operation by
+ * employing reference counter to each handle.
+ *
+ * In addition, the ioqueue will preallocate memory for the handles, 
+ * according to the maximum number of handles that is specified during 
+ * ioqueue creation.
+ *
+ * All applications would normally want this enabled, but you may disable
+ * this if:
+ *  - there is no dynamic unregistration to all ioqueues.
+ *  - there is no threading, or there is no preemptive multitasking.
+ *
+ * Default: 1
+ */
+#ifndef PJ_IOQUEUE_HAS_SAFE_UNREG
+#   define PJ_IOQUEUE_HAS_SAFE_UNREG	1
+#endif
+
+
+/**
+ * When safe unregistration (PJ_IOQUEUE_HAS_SAFE_UNREG) is configured in
+ * ioqueue, the PJ_IOQUEUE_KEY_FREE_DELAY macro specifies how long the
+ * ioqueue key is kept in closing state before it can be reused.
+ *
+ * The value is in miliseconds.
+ *
+ * Default: 500 msec.
+ */
+#ifndef PJ_IOQUEUE_KEY_FREE_DELAY
+#   define PJ_IOQUEUE_KEY_FREE_DELAY	500
+#endif
+
+
+/**
+ * Overrides FD_SETSIZE so it is consistent throughout the library.
+ * OS specific configuration header (compat/os_*) might have declared
+ * FD_SETSIZE, thus we only set if it hasn't been declared.
+ *
+ * Default: #PJ_IOQUEUE_MAX_HANDLES
+ */
+#ifndef FD_SETSIZE
+#  define FD_SETSIZE		    PJ_IOQUEUE_MAX_HANDLES
+#endif
+
+/**
+ * Has semaphore functionality?
+ *
+ * Default: 1
+ */
+#ifndef PJ_HAS_SEMAPHORE
+#  define PJ_HAS_SEMAPHORE	    1
+#endif
+
+
+/**
+ * Event object (for synchronization, e.g. in Win32)
+ *
+ * Default: 1
+ */
+#ifndef PJ_HAS_EVENT_OBJ
+#  define PJ_HAS_EVENT_OBJ	    1
+#endif
+
+
+/**
+ * Maximum file name length.
+ */
+#ifndef PJ_MAXPATH
+#   define PJ_MAXPATH		    260
+#endif
+
+
+/**
+ * Enable library's extra check.
+ * If this macro is enabled, #PJ_ASSERT_RETURN macro will expand to
+ * run-time checking. If this macro is disabled, #PJ_ASSERT_RETURN
+ * will simply evaluate to #pj_assert().
+ *
+ * You can disable this macro to reduce size, at the risk of crashes
+ * if invalid value (e.g. NULL) is passed to the library.
+ *
+ * Default: 1
+ */
+#ifndef PJ_ENABLE_EXTRA_CHECK
+#   define PJ_ENABLE_EXTRA_CHECK    1
+#endif
+
+
+/**
+ * Enable name registration for exceptions with #pj_exception_id_alloc().
+ * If this feature is enabled, then the library will keep track of
+ * names associated with each exception ID requested by application via
+ * #pj_exception_id_alloc().
+ *
+ * Disabling this macro will reduce the code and .bss size by a tad bit.
+ * See also #PJ_MAX_EXCEPTION_ID.
+ *
+ * Default: 1
+ */
+#ifndef PJ_HAS_EXCEPTION_NAMES
+#   define PJ_HAS_EXCEPTION_NAMES   1
+#endif
+
+/**
+ * Maximum number of unique exception IDs that can be requested
+ * with #pj_exception_id_alloc(). For each entry, a small record will
+ * be allocated in the .bss segment.
+ *
+ * Default: 16
+ */
+#ifndef PJ_MAX_EXCEPTION_ID
+#   define PJ_MAX_EXCEPTION_ID      16
+#endif
+
+/**
+ * Should we use Windows Structured Exception Handling (SEH) for the
+ * PJLIB exceptions.
+ *
+ * Default: 0
+ */
+#ifndef PJ_EXCEPTION_USE_WIN32_SEH
+#  define PJ_EXCEPTION_USE_WIN32_SEH 0
+#endif
+
+/**
+ * Should we attempt to use Pentium's rdtsc for high resolution
+ * timestamp.
+ *
+ * Default: 0
+ */
+#ifndef PJ_TIMESTAMP_USE_RDTSC
+#   define PJ_TIMESTAMP_USE_RDTSC   0
+#endif
+
+/**
+ * Include error message string in the library (pj_strerror()).
+ * This is very much desirable!
+ *
+ * Default: 1
+ */
+#ifndef PJ_HAS_ERROR_STRING
+#   define PJ_HAS_ERROR_STRING	    1
+#endif
+
+
+/**
+ * Include pj_stricmp_alnum() and pj_strnicmp_alnum(), i.e. custom
+ * functions to compare alnum strings. On some systems, they're faster
+ * then stricmp/strcasecmp, but they can be slower on other systems.
+ * When disabled, pjlib will fallback to stricmp/strnicmp.
+ * 
+ * Default: 0
+ */
+#ifndef PJ_HAS_STRICMP_ALNUM
+#   define PJ_HAS_STRICMP_ALNUM	    0
+#endif
+
+
+/** @} */
+
+/********************************************************************
+ * General macros.
+ */
+
+/**
+ * @def PJ_INLINE(type)
+ * @param type The return type of the function.
+ * Expand the function as inline.
+ */
+#define PJ_INLINE(type)	  PJ_INLINE_SPECIFIER type
+
+/**
+ * @def PJ_DECL(type)
+ * @param type The return type of the function.
+ * Declare a function.
+ */
+/**
+ * @def PJ_DECL_NO_RETURN(type)
+ * @param type The return type of the function.
+ * Declare a function that will not return.
+ */
+/**
+ * @def PJ_BEGIN_DECL
+ * Mark beginning of declaration section in a header file.
+ */
+/**
+ * @def PJ_END_DECL
+ * Mark end of declaration section in a header file.
+ */
+#ifdef __cplusplus
+#  define PJ_DECL(type)		    type
+#  define PJ_DECL_NO_RETURN(type)   type PJ_NORETURN
+#  define PJ_IDECL_NO_RETURN(type)  PJ_INLINE(type) PJ_NORETURN
+#  define PJ_BEGIN_DECL		    extern "C" {
+#  define PJ_END_DECL		    }
+#else
+#  define PJ_DECL(type)		    extern type
+#  define PJ_DECL_NO_RETURN(type)   PJ_NORETURN type
+#  define PJ_IDECL_NO_RETURN(type)  PJ_NORETURN PJ_INLINE(type)
+#  define PJ_BEGIN_DECL
+#  define PJ_END_DECL
+#endif
+
+/**
+ * @def PJ_DEF(type)
+ * @param type The return type of the function.
+ * Define a function.
+ */
+#define PJ_DEF(type)	  type
+
+/**
+ * @def PJ_EXPORT_SYMBOL(sym)
+ * @param sym The symbol to export.
+ * Export the specified symbol in compilation type that requires export
+ * (e.g. Linux kernel).
+ */
+#ifdef __PJ_EXPORT_SYMBOL
+#  define PJ_EXPORT_SYMBOL(sym)	    __PJ_EXPORT_SYMBOL(sym)
+#else
+#  define PJ_EXPORT_SYMBOL(sym)
+#endif
+
+/**
+ * @def PJ_IDECL(type)
+ * @param type  The function's return type.
+ * Declare a function that may be expanded as inline.
+ */
+/**
+ * @def PJ_IDEF(type)
+ * @param type  The function's return type.
+ * Define a function that may be expanded as inline.
+ */
+
+#if PJ_FUNCTIONS_ARE_INLINED
+#  define PJ_IDECL(type)  PJ_INLINE(type)
+#  define PJ_IDEF(type)   PJ_INLINE(type)
+#else
+#  define PJ_IDECL(type)  PJ_DECL(type)
+#  define PJ_IDEF(type)   PJ_DEF(type)
+#endif
+
+/**
+ * @def PJ_UNUSED_ARG(arg)
+ * @param arg   The argument name.
+ * PJ_UNUSED_ARG prevents warning about unused argument in a function.
+ */
+#define PJ_UNUSED_ARG(arg)  (void)arg
+
+/**
+ * @def PJ_TODO(id)
+ * @param id    Any identifier that will be printed as TODO message.
+ * PJ_TODO macro will display TODO message as warning during compilation.
+ * Example: PJ_TODO(CLEAN_UP_ERROR);
+ */
+#ifndef PJ_TODO
+#  define PJ_TODO(id)	    TODO___##id:
+#endif
+
+/**
+ * Function attributes to inform that the function may throw exception.
+ *
+ * @param x     The exception list, enclosed in parenthesis.
+ */
+#define __pj_throw__(x)
+
+
+/********************************************************************
+ * Sanity Checks
+ */
+#ifndef PJ_HAS_HIGH_RES_TIMER
+#  error "PJ_HAS_HIGH_RES_TIMER is not defined!"
+#endif
+
+#if !defined(PJ_HAS_PENTIUM)
+#  error "PJ_HAS_PENTIUM is not defined!"
+#endif
+
+#if !defined(PJ_IS_LITTLE_ENDIAN)
+#  error "PJ_IS_LITTLE_ENDIAN is not defined!"
+#endif
+
+#if !defined(PJ_IS_BIG_ENDIAN)
+#  error "PJ_IS_BIG_ENDIAN is not defined!"
+#endif
+
+#if !defined(PJ_EMULATE_RWMUTEX)
+#  error "PJ_EMULATE_RWMUTEX should be defined in compat/os_xx.h"
+#endif
+
+#if !defined(PJ_THREAD_SET_STACK_SIZE)
+#  error "PJ_THREAD_SET_STACK_SIZE should be defined in compat/os_xx.h"
+#endif
+
+#if !defined(PJ_THREAD_ALLOCATE_STACK)
+#  error "PJ_THREAD_ALLOCATE_STACK should be defined in compat/os_xx.h"
+#endif
+
+PJ_BEGIN_DECL
+
+/**
+ * PJLIB version string.
+ */
+extern const char *PJ_VERSION;
+
+/**
+ * Dump configuration to log with verbosity equal to info(3).
+ */
+PJ_DECL(void) pj_dump_config(void);
+
+PJ_END_DECL
+
+
+#endif	/* __PJ_CONFIG_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/config_site_sample.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/config_site_sample.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/config_site_sample.h	(revision 1163)
@@ -0,0 +1,81 @@
+
+
+//#define PJ_CONFIG_MINIMAL_SIZE
+//#define PJ_CONFIG_MAXIMUM_SPEED
+
+
+/*
+ * This file (config_site_sample.h) contains various configuration
+ * settings that I use for certain settings. 
+ */
+
+
+/*
+ * Typical configuration for WinCE target.
+ */
+#if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0
+#   define PJ_HAS_FLOATING_POINT	0
+
+#   define PJMEDIA_HAS_G711_PLC		0
+#   define PJMEDIA_HAS_SMALL_FILTER	1
+#   define PJMEDIA_HAS_LARGE_FILTER	0
+#   define PJMEDIA_HAS_L16_CODEC	0
+/*#   define PJMEDIA_HAS_GSM_CODEC	0*/
+/*#   define PJMEDIA_HAS_ILBC_CODEC	0*/
+/*#   define PJMEDIA_HAS_SPEEX_CODEC	0*/
+#   define PJMEDIA_HAS_SPEEX_AEC	0
+#endif
+
+
+
+/*
+ * Minimum size
+ */
+#ifdef PJ_CONFIG_MINIMAL_SIZE
+
+#   undef PJ_OS_HAS_CHECK_STACK
+#   define PJ_OS_HAS_CHECK_STACK	0
+#   define PJ_LOG_MAX_LEVEL		0
+#   define PJ_ENABLE_EXTRA_CHECK	0
+#   define PJ_HAS_ERROR_STRING		0
+#   undef PJ_IOQUEUE_MAX_HANDLES
+#   define PJ_IOQUEUE_MAX_HANDLES	16
+#   define PJ_IOQUEUE_HAS_SAFE_UNREG	0
+#   define PJSIP_MAX_TSX_COUNT		15
+#   define PJSIP_MAX_DIALOG_COUNT	15
+#   define PJSIP_UDP_SO_SNDBUF_SIZE	4000
+#   define PJSIP_UDP_SO_RCVBUF_SIZE	4000
+#   define PJSIP_AUTH_HEADER_CACHING	0
+#   define PJSIP_AUTH_AUTO_SEND_NEXT	0
+#   define PJSIP_AUTH_QOP_SUPPORT	0
+#   define PJMEDIA_HAS_LARGE_FILTER	0
+#   define PJMEDIA_HAS_SMALL_FILTER	0
+
+
+#elif defined(PJ_CONFIG_MAXIMUM_SPEED)
+#   define PJ_SCANNER_USE_BITWISE	0
+#   undef PJ_OS_HAS_CHECK_STACK
+#   define PJ_OS_HAS_CHECK_STACK	0
+#   define PJ_LOG_MAX_LEVEL		3
+#   define PJ_ENABLE_EXTRA_CHECK	0
+#   define PJ_IOQUEUE_MAX_HANDLES	5000
+#   define PJSIP_MAX_TSX_COUNT		((640*1024)-1)
+#   define PJSIP_MAX_DIALOG_COUNT	((640*1024)-1)
+#   define PJSIP_UDP_SO_SNDBUF_SIZE	(24*1024*1024)
+#   define PJSIP_UDP_SO_RCVBUF_SIZE	(24*1024*1024)
+#   define PJ_DEBUG			0
+#   define PJSIP_SAFE_MODULE		0
+#   define PJ_HAS_STRICMP_ALNUM		1
+#   define PJ_HASH_USE_OWN_TOLOWER	1
+#   define PJSIP_UNESCAPE_IN_PLACE	1
+
+#   ifdef PJ_WIN32
+#     define PJSIP_MAX_NET_EVENTS	10
+#   endif
+
+#   define PJSUA_MAX_CALLS		512
+#   define PJSIP_AUTH_HEADER_CACHING	1
+#   define PJSIP_AUTH_AUTO_SEND_NEXT	1
+
+#endif
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/ctype.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/ctype.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/ctype.h	(revision 1163)
@@ -0,0 +1,173 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_CTYPE_H__
+#define __PJ_CTYPE_H__
+
+/**
+ * @file ctype.h
+ * @brief C type helper macros.
+ */
+
+#include <pj/types.h>
+#include <pj/compat/ctype.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup pj_ctype ctype - Character Type
+ * @ingroup PJ_MISC
+ * @{
+ *
+ * This module contains several inline functions/macros for testing or
+ * manipulating character types. It is provided in PJLIB because PJLIB
+ * must not depend to LIBC.
+ */
+
+/** 
+ * Returns a non-zero value if either isalpha or isdigit is true for c.
+ * @param c     The integer character to test.
+ * @return      Non-zero value if either isalpha or isdigit is true for c.
+ */
+PJ_INLINE(int) pj_isalnum(int c) { return isalnum(c); }
+
+/** 
+ * Returns a non-zero value if c is a particular representation of an 
+ * alphabetic character.
+ * @param c     The integer character to test.
+ * @return      Non-zero value if c is a particular representation of an 
+ *              alphabetic character.
+ */
+PJ_INLINE(int) pj_isalpha(int c) { return isalpha(c); }
+
+/** 
+ * Returns a non-zero value if c is a particular representation of an 
+ * ASCII character.
+ * @param c     The integer character to test.
+ * @return      Non-zero value if c is a particular representation of 
+ *              an ASCII character.
+ */
+PJ_INLINE(int) pj_isascii(int c) { return c<128 && c>=0; }
+
+/** 
+ * Returns a non-zero value if c is a particular representation of 
+ * a decimal-digit character.
+ * @param c     The integer character to test.
+ * @return      Non-zero value if c is a particular representation of 
+ *              a decimal-digit character.
+ */
+PJ_INLINE(int) pj_isdigit(int c) { return isdigit(c); }
+
+/** 
+ * Returns a non-zero value if c is a particular representation of 
+ * a space character (0x09 - 0x0D or 0x20).
+ * @param c     The integer character to test.
+ * @return      Non-zero value if c is a particular representation of 
+ *              a space character (0x09 - 0x0D or 0x20).
+ */
+PJ_INLINE(int) pj_isspace(int c) { return isspace(c); }
+
+/** 
+ * Returns a non-zero value if c is a particular representation of 
+ * a lowercase character.
+ * @param c     The integer character to test.
+ * @return      Non-zero value if c is a particular representation of 
+ *              a lowercase character.
+ */
+PJ_INLINE(int) pj_islower(int c) { return islower(c); }
+
+
+/** 
+ * Returns a non-zero value if c is a particular representation of 
+ * a uppercase character.
+ * @param c     The integer character to test.
+ * @return      Non-zero value if c is a particular representation of 
+ *              a uppercase character.
+ */
+PJ_INLINE(int) pj_isupper(int c) { return isupper(c); }
+
+/**
+ * Returns a non-zero value if c is a either a space (' ') or horizontal
+ * tab ('\\t') character.
+ * @param c     The integer character to test.
+ * @return      Non-zero value if c is a either a space (' ') or horizontal
+ *              tab ('\\t') character.
+ */
+PJ_INLINE(int) pj_isblank(int c) { return isblank(c); }
+
+/**
+ * Converts character to lowercase.
+ * @param c     The integer character to convert.
+ * @return      Lowercase character of c.
+ */
+PJ_INLINE(int) pj_tolower(int c) { return tolower(c); }
+
+/**
+ * Converts character to uppercase.
+ * @param c     The integer character to convert.
+ * @return      Uppercase character of c.
+ */
+PJ_INLINE(int) pj_toupper(int c) { return toupper(c); }
+
+/**
+ * Returns a non-zero value if c is a particular representation of 
+ * an hexadecimal digit character.
+ * @param c     The integer character to test.
+ * @return      Non-zero value if c is a particular representation of 
+ *              an hexadecimal digit character.
+ */
+PJ_INLINE(int) pj_isxdigit(int c){ return isxdigit(c); }
+
+/**
+ * Array of hex digits, in lowerspace.
+ */
+extern char pj_hex_digits[];
+
+/**
+ * Convert a value to hex representation.
+ * @param value	    Integral value to convert.
+ * @param p	    Buffer to hold the hex representation, which must be
+ *		    at least two bytes length.
+ */
+PJ_INLINE(void) pj_val_to_hex_digit(unsigned value, char *p)
+{
+    *p++ = pj_hex_digits[ (value & 0xF0) >> 4 ];
+    *p   = pj_hex_digits[ (value & 0x0F) ];
+}
+
+/**
+ * Convert hex digit c to integral value.
+ * @param c	The hex digit character.
+ * @return	The integral value between 0 and 15.
+ */
+PJ_INLINE(unsigned) pj_hex_digit_to_val(unsigned c)
+{
+    if (c <= '9')
+	return (c-'0') & 0x0F;
+    else if (c <= 'F')
+	return  (c-'A'+10) & 0x0F;
+    else
+	return (c-'a'+10) & 0x0F;
+}
+
+/** @} */
+
+PJ_END_DECL
+
+#endif	/* __PJ_CTYPE_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/doxygen.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/doxygen.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/doxygen.h	(revision 1163)
@@ -0,0 +1,999 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_DOXYGEN_H__
+#define __PJ_DOXYGEN_H__
+
+/**
+ * @file doxygen.h
+ * @brief Doxygen's mainpage.
+ */
+
+/*////////////////////////////////////////////////////////////////////////// */
+/*
+	INTRODUCTION PAGE
+ */
+
+/**
+ * @mainpage Welcome to PJLIB!
+ *
+ * @section intro_sec What is PJLIB
+ *
+ * PJLIB is an Open Source, small footprint framework library written in C for 
+ * making scalable applications. Because of its small footprint, it can be used
+ * in embedded applications (we hope so!), but yet the library is also aimed for
+ * facilitating the creation of high performance protocol stacks.
+ *
+ * PJLIB is released under GPL terms.
+ *
+ * @section download_sec Download
+ *
+ * PJLIB and all documentation can be downloaded from 
+ * http://www.pjsip.org.
+ *
+ *
+ * @section how_to_use_sec About This Documentation
+ *
+ * This document is generated directly from PJLIB source file using
+ * \a doxygen (http://www.doxygen.org). Doxygen is a great (and free!) 
+ * tools for generating such documentation.
+ *
+ * @subsection doc_ver_subsec Version
+ *
+ * This document corresponds to PJLIB version 0.5.10.
+ *
+ *
+ * @subsection find_samples_subsec How to Read This Document
+ *
+ * This documentation is laid out more to be a reference guide instead
+ * of tutorial, therefore first time users may find it difficult to
+ * grasp PJLIB by reading this document alone.
+ *
+ * However, we've tried our best to make this document easy to follow.
+ * For first time users, we would suggest that you follow these steps
+ * when reading this documentation:
+ *
+ *  - continue reading this introduction chapter. At the end of this
+ *    chapter, you'll find section called \ref pjlib_fundamentals_sec
+ *    which should guide you to understand basic things about PJLIB.
+ *
+ *  - find information about specific features that you want to use
+ *    in PJLIB. Use the <b>Module Index</b> to find out about all 
+ *    features in PJLIB (if you're browsing the HTML documentation,
+ *    click on the \a Module link on top of the page, or if you're
+ *    reading the PDF documentation, click on \a Module \a Documentation
+ *    on the navigation pane on the left).
+ *
+ * @subsection doc_organize_sec How To's
+ *
+ * Please find below links to specific tasks that you probably
+ * want to do:
+ *
+ *  - <b>How to Build PJLIB</b>
+ *\n
+ * Please refer to \ref pjlib_build_sys_pg page for more information.
+ *
+ *  - <b>How to Use PJLIB in My Application</b>
+ *\n
+ * Please refer to \ref configure_app_sec for more information.
+ *
+ *  - <b>How to Port PJLIB</b>
+ *\n
+ * Please refer to \ref porting_pjlib_pg page.
+ *
+ *  - <b>Where to Read Samples Documentation</b>
+ *\n
+ * Most of the modules provide link to the corresponding sample file.
+ * Alternatively, to get the list of all examples, you can click on 
+ * <b>Related Pages</b> on the top of HTML document or on 
+ * <b>PJLIB Page Documentation</b> on navigation pane of your PDF reader.
+ *
+ *  - <b>How to Submit Code to PJLIB Project</b>
+ *\n
+ * Please read \ref pjlib_coding_convention_page before submitting
+ * your code. Send your code as patch against current Subversion tree
+ * to the appropriate mailing list.
+ *
+ *
+ * @section features_sec Features
+ *
+ * @subsection open_source_feat It's Open Source!
+ *
+ * PJLIB is currently released on GPL license, but other arrangements
+ * can be made with the author.
+ *
+ * @subsection extreme_portable_feat Extreme Portability
+ *
+ * PJLIB is designed to be extremely portable. It can run on any kind
+ * of processors (16-bit, 32-bit, or 64-bit, big or little endian, single
+ * or multi-processors) and operating systems. Floating point or no
+ * floating point. Multi-threading or not.
+ * It can even run in environment where no ANSI LIBC is available. 
+ *
+ * Currently PJLIB is known to run on these platforms:
+ *  - Win32/x86 (Win95/98/ME, NT/2000/XP/2003, mingw).
+ *  - arm, WinCE and Windows Mobile.
+ *  - Linux/x86, (user mode and as <b>kernel module</b>(!)).
+ *  - Linux/alpha
+ *  - Solaris/ultra.
+ *  - MacOS X/powerpc
+ *  - RTEMS (x86 and powerpc).
+ *
+ * And efforts is under way to port PJLIB on:
+ *  - Symbian OS
+ *
+ *
+ * @subsection small_size_feat Small in Size
+ *
+ * One of the primary objectives is to have library that is small in size for
+ * typical embedded applications. As a rough guidance, we aim to keep the 
+ * library size below 100KB for it to be considered as small.
+ * As the result, most of the functionalities in the library can be tailored
+ * to meet the requirements; user can enable/disable specific functionalities
+ * to get the desired size/performance/functionality balance.
+ *
+ * For more info, please see @ref pj_config.
+ *
+ *
+ * @subsection big_perform_feat Big in Performance
+ *
+ * Almost everything in PJLIB is designed to achieve the highest possible
+ * performance out of the target platform. 
+ *
+ *
+ * @subsection no_dyn_mem No Dynamic Memory Allocations
+ *
+ * The central idea of PJLIB is that for applications to run as fast as it can,
+ * it should not use \a malloc() at all, but instead should get the memory 
+ * from a preallocated storage pool. There are few things that can be 
+ * optimized with this approach:
+ *
+ *  - \a alloc() is a O(1) operation.
+ *  - no mutex is used inside alloc(). It is assumed that synchronization 
+ *    will be used in higher abstraction by application anyway.
+ *  - no \a free() is required. All chunks will be deleted when the pool is 
+ *    destroyed.
+ *
+ * The performance gained on some systems can be as high as 30x speed up
+ * against \a malloc() and \a free() on certain configurations, but of
+ * course your mileage may vary. 
+ *
+ * For more information, see \ref PJ_POOL_GROUP
+ *
+ * 
+ * @subsection os_abstract_feat Operating System Abstraction
+ *
+ * PJLIB has abstractions for features that are normally not portable 
+ * across operating systems: 
+ *  - @ref PJ_THREAD
+ *\n
+ *    Portable thread manipulation.
+ *  - @ref PJ_TLS
+ *\n
+ *    Storing data in thread's private data.
+ *  - @ref PJ_MUTEX
+ *\n
+ *    Mutual exclusion protection.
+ *  - @ref PJ_SEM
+ *\n
+ *    Semaphores.
+ *  - @ref PJ_ATOMIC
+ *\n
+ *    Atomic variables and their operations.
+ *  - @ref PJ_CRIT_SEC
+ *\n
+ *    Fast locking of critical sections.
+ *  - @ref PJ_LOCK
+ *\n
+ *    High level abstraction for lock objects.
+ *  - @ref PJ_EVENT
+ *\n
+ *    Event object.
+ *  - @ref PJ_TIME
+ *\n
+ *    Portable time manipulation.
+ *  - @ref PJ_TIMESTAMP
+ *\n
+ *    High resolution time value.
+ *  - etc.
+ *
+ *
+ * @subsection ll_network_io_sec Low-Level Network I/O
+ *
+ * PJLIB has very portable abstraction and fairly complete set of API for
+ * doing network I/O communications. At the lowest level, PJLIB provides:
+ *
+ *  - @ref PJ_SOCK
+ *\n
+ *    A highly portable socket abstraction, runs on all kind of
+ *    network APIs such as standard BSD socket, Windows socket, Linux
+ *    \b kernel socket, PalmOS networking API, etc.
+ *
+ *  - @ref pj_addr_resolve
+ *\n
+ *    Portable address resolution, which implements #pj_gethostbyname().
+ *
+ *  - @ref PJ_SOCK_SELECT
+ *\n
+ *    A portable \a select() like API (#pj_sock_select()) which can be
+ *    implemented with various back-end.
+ *
+ *
+ *
+ * @subsection timer_mgmt_sec Timer Management
+ *
+ * A passive framework for managing timer, see @ref PJ_TIMER for more info.
+ * There is also function to retrieve high resolution timestamp
+ * from the system (see @ref PJ_TIMESTAMP).
+ *
+ *
+ * @subsection data_struct_sec Various Data Structures
+ *
+ * Various data structures are provided in the library:
+ *
+ *  - @ref PJ_PSTR
+ *  - @ref PJ_ARRAY
+ *  - @ref PJ_HASH
+ *  - @ref PJ_LIST
+ *  - @ref PJ_RBTREE
+ *
+ *
+ * @subsection exception_sec Exception Construct
+ *
+ * A convenient TRY/CATCH like construct to propagate errors, which by
+ * default are used by the @ref PJ_POOL_GROUP "memory pool" and 
+ * the lexical scanner in pjlib-util. The exception
+ * construct can be used to write programs like below:
+ *
+ * <pre>
+ *    #define SYNTAX_ERROR  1
+ *
+ *    PJ_TRY {
+ *       msg = NULL;
+ *       msg = parse_msg(buf, len);
+ *    }
+ *    PJ_CATCH ( SYNTAX_ERROR ) {
+ *       .. handle error ..
+ *    }
+ *    PJ_END;
+ * </pre>
+ *
+ * Please see @ref PJ_EXCEPT for more information.
+ *
+ *
+ * @subsection logging_sec Logging Facility
+ *
+ * PJLIB @ref PJ_LOG consists of macros to write logging information to
+ * some output device. Some of the features of the logging facility:
+ *
+ *  - the verbosity can be fine-tuned both at compile time (to control
+ *    the library size) or run-time (to control the verbosity of the
+ *    information).
+ *  - output device is configurable (e.g. stdout, printk, file, etc.)
+ *  - log decoration is configurable.
+ *
+ * See @ref PJ_LOG for more information.
+ *
+ *
+ * @subsection guid_gen_sec Random and GUID Generation
+ *
+ * PJLIB provides facility to create random string 
+ * (#pj_create_random_string()) or globally unique identifier
+ * (see @ref PJ_GUID).
+ *
+ *
+ *
+ * @section configure_app_sec Configuring Application to use PJLIB
+ *
+ * @subsection pjlib_compil_sec Building PJLIB
+ *
+ * Follow the instructions in \ref pjlib_build_sys_pg to build
+ * PJLIB.
+ *
+ * @subsection pjlib_compil_app_sec Building Applications with PJLIB
+ *
+ * Use the following settings when building applications with PJLIB.
+ *
+ * @subsubsection compil_inc_dir_sec Include Search Path
+ *
+ * Add this to your include search path ($PJLIB is PJLIB root directory):
+ * <pre>
+ *   $PJLIB/include
+ * </pre>
+ *
+ * @subsubsection compil_inc_file_sec Include PJLIB Header
+ *
+ * To include all PJLIB headers:
+ * \verbatim
+    #include <pjlib.h>
+   \endverbatim
+ *
+ * Alternatively, you can include individual PJLIB headers like this:
+ * \verbatim
+     #include <pj/log.h>
+     #include <pj/os.h>
+  \endverbatim
+ *
+ *
+ * @subsubsection compil_lib_dir_sec Library Path
+ *
+ * Add this to your library search path:
+ * <pre>
+ *   $PJLIB/lib
+ * </pre>
+ *
+ * Then add the appropriate PJLIB library to your link specification. For
+ * example, you would add \c libpj-i386-linux-gcc.a when you're building
+ * applications in Linux.
+ *
+ *
+ * @subsection pjlib_fundamentals_sec Principles in Using PJLIB
+ *
+ * Few things that you \b MUST do when using PJLIB, to make sure that
+ * you create trully portable applications.
+ *
+ * @subsubsection call_pjlib_init_sec Call pj_init()
+ *
+ * Before you do anything else, call \c pj_init(). This would make sure that
+ * PJLIB system is properly set up.
+ *
+ * @subsubsection no_ansi_subsec Do NOT Use ANSI C
+ *
+ * Contrary to popular teaching, ANSI C (and LIBC) is not the most portable
+ * library in the world, nor it's the most ubiquitous. For example, LIBC
+ * is not available in Linux kernel. Also normally LIBC will be excluded
+ * from compilation of RTOSes to reduce size.
+ *
+ * So for maximum portability, do NOT use ANSI C. Do not even try to include
+ * any other header files outside <include/pj>. Stick with the functionalities
+ * provided by PJLIB. 
+ *
+ *
+ * @subsubsection string_rep_subsubsec Use pj_str_t instead of C Strings
+ *
+ * PJLIB uses pj_str_t instead of normal C strings. You SHOULD follow this
+ * convention too. Remember, ANSI string-h is not always available. And
+ * PJLIB string is faster!
+ *
+ * @subsubsection mem_alloc_subsubsec Use Pool for Memory Allocations
+ *
+ * You MUST NOT use \a malloc() or any other memory allocation functions.
+ * Use PJLIB @ref PJ_POOL_GROUP instead! It's faster and most portable.
+ *
+ * @subsection logging_subsubsec Use Logging for Text Display
+ *
+ * DO NOT use <stdio.h> for text output. Use PJLIB @ref PJ_LOG instead.
+ *
+ *
+ * @section porting_pjlib_sec0 Porting PJLIB
+ *
+ * Please see \ref porting_pjlib_pg page on more information to port
+ * PJLIB to new target.
+ *
+ * @section enjoy_sec Enjoy Using PJLIB!
+ *
+ * We hope that you find PJLIB usefull for your application. If you
+ * have any questions, suggestions, critics, bug fixes, or anything
+ * else, we would be happy to hear it.
+ *
+ * Enjoy using PJLIB!
+ *
+ * Benny Prijono < bennylp at pjsip dot org >
+ */
+
+
+
+/*////////////////////////////////////////////////////////////////////////// */
+/*
+         CODING CONVENTION
+ */
+
+/**
+ * @page pjlib_coding_convention_page Coding Convention
+ *
+ * Before you submit your code/patches to be included with PJLIB, you must
+ * make sure that your code is compliant with PJLIB coding convention.
+ * <b>This is very important!</b> Otherwise we would not accept your code.
+ *
+ * @section coding_conv_editor_sec Editor Settings
+ *
+ * The single most important thing in the whole coding convention is editor 
+ * settings. It's more important than the correctness of your code (bugs will
+ * only crash the system, but incorrect tab size is mental!).
+ *
+ * Kindly set your editor as follows:
+ *  - tab size to \b 8.
+ *  - indentation to \b 4.
+ *
+ * With \c vi, you can do it with:
+ * <pre>
+ *  :se ts=8
+ *  :se sts=4
+ * </pre>
+ *
+ * You should replace tab with eight spaces.
+ *
+ * @section coding_conv_detail_sec Coding Style
+ *
+ * Coding style MUST strictly follow K&R style. The rest of coding style
+ * must follow current style. You SHOULD be able to observe the style
+ * currently used by PJLIB from PJLIB sources, and apply the style to your 
+ * code. If you're not able to do simple thing like to observe PJLIB
+ * coding style from the sources, then logic dictates that your ability to
+ * observe more difficult area in PJLIB such as memory allocation strategy, 
+ * concurrency, etc is questionable.
+ *
+ * @section coding_conv_comment_sec Commenting Your Code
+ *
+ * Public API (e.g. in header files) MUST have doxygen compliant comments.
+ *
+ */
+
+
+/*////////////////////////////////////////////////////////////////////////// */
+/*
+	BUILDING AND INSTALLING PJLIB
+ */
+
+
+
+/**
+ * @page pjlib_build_sys_pg Building, and Installing PJLIB
+ *
+ * @section build_sys_install_sec Build and Installation
+ *
+ * \note
+ * <b>The most up-to-date information on building and installing PJLIB
+ *  should be found in the website, under "Getting Started" document.
+ *  More over, the new PJLIB build system is now based on autoconf,
+ *  so some of the information here might not be relevant anymore 
+ *  (although most still are, since the autoconf script still use
+ *  the old Makefile system as the backend).</b>
+ *
+ * @subsection build_sys_install_win32_sec Visual Studio
+ *
+ * The PJLIB Visual Studio workspace supports the building of PJLIB
+ * for Win32 target. Although currently only the Visual Studio 6 Workspace is
+ * actively maintained, developers with later version of Visual Studio
+ * can easily imports VS6 workspace into their IDE.
+ *
+ * To start building PJLIB projects with Visual Studio 6 or later, open
+ * the \a workspace file in the corresponding \b \c build directory. You have
+ * several choices on which \a dsw file to open:
+ \verbatim
+  $PJPROJECT/pjlib/build/pjlib.dsw
+  $PJPROJECT/pjsip/build/pjsip.dsw
+ ..etc
+ \endverbatim
+ *
+ * The easiest way is to open <tt>pjsip_apps.dsw</tt> file in \b \c $PJPROJECT/pjsip-apps/build
+ * directory, and build pjsua project or the samples project. 
+ * However this will not build the complete projects. 
+ * For example, the PJLIB test is not included in this workspace. 
+ * To build the complete projects, you must
+ * open and build each \a dsw file in \c build directory in each
+ * subprojects. For example, to open the complete PJLIB workspace, open
+ * <tt>pjlib.dsw</tt> in <tt>$PJPROJECT/pjlib/build</tt> directory.
+ *
+ *
+ * @subsubsection config_site_create_vc_sec Create config_site.h
+ *
+ * The file <tt><b>$PJPROJECT/pjlib/include/pj/config_site.h</b></tt>
+ * is supposed to contain configuration that is specific to your site/target.
+ * This file is not part of PJLIB, so you must create it yourself. Normally
+ * you just need to create a blank file.
+ *
+ * The reason why it's not included in PJLIB is so that you would not accidently
+ * overwrite your site configuration.
+ *
+ * If you fail to do this, Visual C will complain with error like: 
+ *
+ * <b>"fatal error C1083: Cannot open include file: 'pj/config_site.h': No such file 
+ * or directory"</b>.
+ *
+ * @subsubsection build_vc_subsubsec Build the Projects
+ *
+ * Just hit the build button!
+ *
+ *
+ * @subsection build_sys_install_unix_sec Make System
+ *
+ * For other targets, PJLIB provides a rather comprehensive build system
+ * that uses GNU \a make (and only GNU \a make will work). 
+ * Currently, the build system supports building * PJLIB for these targets:
+ *  - i386/Win32/mingw
+ *  - i386/Linux
+ *  - i386/Linux (kernel)
+ *  - alpha/linux
+ *  - sparc/SunOS
+ *  - etc..
+ *
+ *
+ * @subsubsection build_req_sec Requirements
+ *
+ * In order to use the \c make based build system, you MUST have:
+ *
+ *  - <b>GNU make</b>
+ *\n
+ *    The Makefiles heavily utilize GNU make commands which most likely
+ *    are not available in other \c make system.
+ *  - <b>bash</b> shell is recommended.
+ *\n
+ *    Specificly, there is a command <tt>"echo -n"</tt> which may not work
+ *    in other shells. This command is used when generating dependencies
+ *    (<tt>make dep</tt>) and it's located in 
+ *    <tt>$PJPROJECT/build/rules.mak</tt>.
+ *  - <b>ar</b>, <b>ranlib</b> from GNU binutils
+ *\n
+ *    In your system has different <tt>ar</tt> or <tt>ranlib</tt> (e.g. they
+ *    may have been installed as <tt>gar</tt> and <tt>granlib</tt>), then
+ *    either you create the relevant symbolic links, <b>or</b> modify
+ *    <tt>$PJPROJECT/build/cc-gcc.mak</tt> and rename <tt>ar</tt> and
+ *    <tt>ranlib</tt> to the appropriate names.
+ *  - <b>gcc</b> to generate dependency.
+ *\n
+ *    Currently the build system uses <tt>"gcc -MM"</tt> to generate build
+ *    dependencies. If <tt>gcc</tt> is not desired to generate dependency,
+ *    then either you don't run <tt>make dep</tt>, <b>or</b> edit
+ *    <tt>$PJPROJECT/build/rules.mak</tt> to calculate dependency using
+ *    your prefered method. (And let me know when you do so so that I can
+ *    update the file. :) )
+ *
+ * @subsubsection build_overview_sec Building the Project
+ *
+ * Generally, steps required to build the PJLIB are:
+ *
+ \verbatim
+   $ cd /home/user/pjproject
+   $ ./configure
+   $ touch pjlib/include/pj/config_site.h
+   $ make dep
+   $ make
+ \endverbatim
+ *
+ * The above process will build all static libraries and all applications.
+ *
+ * \note the <tt>configure</tt> script is not a proper autoconf script,
+ * but rather a simple shell script to detect current host. This script
+ * currently does not support cross-compilation.
+ *
+ * \note For Linux kernel target, there are additional steps required, which
+ * will be explained in section \ref linux_kern_target_subsec.
+ *
+ * @subsubsection build_mak_sec Cross Compilation
+ * 
+ * For cross compilation, you will need to edit the \c build.mak file in 
+ * \c $PJPROJECT root directory manually. Please see <b>README-configure</b> file
+ * in the root directory for more information.
+ *
+ * For Linux kernel target, you are also required to declare the following
+ * variables in this file:
+ *	- \c KERNEL_DIR: full path of kernel source tree.
+ *	- \c KERNEL_ARCH: kernel ARCH options (e.g. "ARCH=um"), or leave blank
+ * 	     for default.
+ *	- \c PJPROJECT_DIR: full path of PJPROJECT source tree.
+ *
+ * Apart from these, there are also additional steps required to build
+ * Linux kernel target, which will be explained in \ref linux_kern_target_subsec.
+ *
+ * @subsubsection build_dir_sec Files in "build" Directory
+ *
+ * The <tt>*.mak</tt> files in \c $PJPROJECT/build directory are used to specify
+ * the configuration for the specified compiler, target machine target 
+ * operating system, and host options. These files will be executed
+ * (included) by \a make during building process, depending on the values
+ * specified in <b>$PJPROJECT/build.mak</b> file.
+ *
+ * Normally you don't need to edit these files, except when you're porting
+ * PJLIB to new target.
+ *
+ * Below are the description of some files in this directory:
+ *
+ *  - <tt>rules.mak</tt>: contains generic rules always included during make.
+ *  - <tt>cc-gcc.mak</tt>: rules when gcc is used for compiler.
+ *  - <tt>cc-vc.mak</tt>: rules when MSVC compiler is used.
+ *  - <tt>host-mingw.mak</tt>: rules for building in mingw host.
+ *  - <tt>host-unix.mak</tt>: rules for building in Unix/Posix host.
+ *  - <tt>host-win32.mak</tt>: rules for building in Win32 command console
+ *    (only valid when VC is used).
+ *  - <tt>m-i386.mak</tt>: rules when target machine is an i386 processor.
+ *  - <tt>m-m68k.mak</tt>: rules when target machine is an m68k processor.
+ *  - <tt>os-linux.mak</tt>: rules when target OS is Linux.
+ *  - <tt>os-linux-kernel.mak</tt>: rules when PJLIB is to be build as
+ *    part of Linux kernel.
+ *  - <tt>os-win32.mak</tt>: rules when target OS is Win32.
+ *
+ *
+ * @subsubsection config_site_create_sec Create config_site.h
+ *
+ * The file <tt><b>$PJPROJECT/pjlib/include/pj/config_site.h</b></tt>
+ * is supposed to contain configuration that is specific to your site/target.
+ * This file is not part of PJLIB, so you must create it yourself.
+ *
+ * The reason why it's not included in PJLIB is so that you would not accidently
+ * overwrite your site configuration.
+ *
+ *
+ * @subsubsection invoking_make_sec Invoking make
+ *
+ * Normally, \a make is invoked in \c build directory under each project.
+ * For example, to build PJLIB, you would invoke \a make in
+ * \c $PJPROJECT/pjlib/build directory like below:
+ *
+ \verbatim
+   $ cd pjlib/build
+   $ make
+ \endverbatim
+ *
+ * Alternatively you may invoke <tt>make</tt> in <tt>$PJPROJECT</tt> 
+ * directory, to build all projects under that directory (e.g. 
+ * PJLIB, PJSIP, etc.).
+ *
+ *
+ * @subsubsection linux_kern_target_subsec Linux Kernel Target
+ *
+ * \note
+ * <b>BUILDING APPLICATIONS IN LINUX KERNEL MODE IS A VERY DANGEROUS BUSINESS.
+ * YOU MAY CRASH THE WHOLE OF YOUR SYSTEM, CORRUPT YOUR HARDISK, ETC. PJLIB
+ * KERNEL MODULES ARE STILL IN EXPERIMENTAL PHASE. DO NOT RUN IT IN PRODUCTION
+ * SYSTEMS OR OTHER SYSTEMS WHERE RISK OF LOSS OF DATA IS NOT ACCEPTABLE.
+ * YOU HAVE BEEN WARNED.</b>
+ *
+ * \note
+ * <b>User Mode Linux (UML)</b> provides excellent way to experiment with Linux
+ * kernel without risking the stability of the host system. See
+ * http://user-mode-linux.sourceforge.net for details.
+ *
+ * \note
+ * I only use <b>UML</b> to experiment with PJLIB kernel modules.
+ * <b>I wouldn't be so foolish to use my host Linux machine to experiment
+ * with this.</b> 
+ *
+ * \note
+ * You have been warned.
+ *
+ * For building PJLIB for Linux kernel target, there are additional steps required.
+ * In general, the additional tasks are:
+ *	- Declare some more variables in <b><tt>build.mak</tt></b> file (this
+ *        has been explained in \ref build_mak_sec above).
+ *      - Perform these two small modifications in kernel source tree.
+ *
+ * There are two small modification need to be applied to the kernel tree.
+ *
+ * <b>1. Edit <tt>Makefile</tt> in kernel root source tree.</b>
+ *
+ * Add the following lines at the end of the <tt>Makefile</tt> in your 
+ * <tt>$KERNEL_SRC</tt> dir:
+ \verbatim
+script:
+       $(SCRIPT)
+ \endverbatim
+ *
+ * \note Remember to replace spaces with <b>tab</b> in the Makefile.
+ *
+ * The modification above is needed to capture kernel's \c $CFLAGS and 
+ * \c $CFLAGS_MODULE which will be used for PJLIB's compilation.
+ *
+ * <b>2. Add Additional Exports.</b>
+ *
+ * We need the kernel to export some more symbols for our use. So we declare
+ * the additional symbols to be exported in <tt>extra-exports.c</tt> file, and add
+ * a this file to be compiled into the kernel:
+ *
+ *	- Copy the file <tt>extra-exports.c</tt> from <tt>pjlib/src/pj</tt> 
+ *	  directory to <tt>$KERNEL_SRC/kernel/</tt> directory.
+ *	- Edit <tt>Makefile</tt> in that directory, and add this line
+ *        somewhere after the declaration of that variable:
+ \verbatim
+obj-y   += extra-exports.o
+ \endverbatim
+ *
+ * To illustrate what have been done in your kernel source tree, below
+ * is screenshot of my kernel source tree _after_ the modification.
+ *
+ \verbatim
+[root@vpc-linux linux-2.6.7]# pwd
+/usr/src/linux-2.6.7
+[root@vpc-linux linux-2.6.7]# 
+[root@vpc-linux linux-2.6.7]# 
+[root@vpc-linux linux-2.6.7]# tail Makefile 
+
+endif   # skip-makefile
+
+FORCE:
+
+.PHONY: script
+
+script:
+        $(SCRIPT)
+
+[root@vpc-linux linux-2.6.7]# 
+[root@vpc-linux linux-2.6.7]# 
+[root@vpc-linux linux-2.6.7]# head kernel/extra-exports.c 
+#include <linux/module.h>
+#include <linux/syscalls.h>
+
+EXPORT_SYMBOL(sys_select);
+
+EXPORT_SYMBOL(sys_epoll_create);
+EXPORT_SYMBOL(sys_epoll_ctl);
+EXPORT_SYMBOL(sys_epoll_wait);
+
+EXPORT_SYMBOL(sys_socket);
+[root@vpc-linux linux-2.6.7]# 
+[root@vpc-linux linux-2.6.7]# 
+[root@vpc-linux linux-2.6.7]# head -15 kernel/Makefile 
+#
+# Makefile for the linux kernel.
+#
+
+obj-y     = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
+            exit.o itimer.o time.o softirq.o resource.o \
+            sysctl.o capability.o ptrace.o timer.o user.o \
+            signal.o sys.o kmod.o workqueue.o pid.o \
+            rcupdate.o intermodule.o extable.o params.o posix-timers.o \
+            kthread.o
+
+obj-y   +=  extra-exports.o
+
+obj-$(CONFIG_FUTEX) += futex.o
+obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
+[root@vpc-linux linux-2.6.7]# 
+
+ \endverbatim
+ *
+ * Then you must rebuild the kernel.
+ * If you fail to do this, you won't be able to <b>insmod</b> pjlib.
+ *
+ * \note You will see a lots of warning messages during pjlib-test compilation.
+ * The warning messages complain about unresolved symbols which are defined
+ * in pjlib module. You can safely ignore these warnings. However, you can not
+ * ignore warnings about non-pjlib unresolved symbols.
+ *
+ * 
+ * @subsection makefile_explained_sec Makefile Explained
+ *
+ * The \a Makefile for each project (e.g. PJLIB, PJSIP, etc) should be
+ * very similar in the contents. The Makefile is located under \c build
+ * directory in each project subdir.
+ *
+ * @subsubsection pjlib_makefile_subsec PJLIB Makefile.
+ *
+ * Below is PJLIB's Makefile:
+ *
+ * \include build/Makefile
+ *
+ * @subsubsection pjlib_os_makefile_subsec PJLIB os-linux.mak.
+ *
+ * Below is file <tt><b>os-linux.mak</b></tt> file in 
+ * <tt>$PJPROJECT/pjlib/build</tt> directory,
+ * which is OS specific configuration file for Linux target that is specific 
+ * for PJLIB project. For \b global OS specific configuration, please see
+ * <tt>$PJPROJECT/build/os-*.mak</tt>.
+ *
+ * \include build/os-linux.mak
+ *
+ */
+
+
+/*////////////////////////////////////////////////////////////////////////// */
+/*
+         PORTING PJLIB
+ */
+
+
+
+/**
+ * @page porting_pjlib_pg Porting PJLIB
+ *
+ * \note
+ * <b>Since version 0.5.8, PJLIB build system is now based on autoconf, so
+ * most of the time we shouldn't need to apply the tweakings below to get
+ * PJLIB working on a new platform. However, since the autoconf build system
+ * still uses the old Makefile build system, the information below may still
+ * be useful for reference.
+ * </b>
+ *
+ * @section new_arch_sec Porting to New CPU Architecture
+ *
+ * Below is step-by-step guide to add support for new CPU architecture.
+ * This sample is based on porting to Alpha architecture; however steps for 
+ * porting to other CPU architectures should be pretty similar. 
+ *
+ * Also note that in this example, the operating system used is <b>Linux</b>.
+ * Should you wish to add support for new operating system, then follow
+ * the next section \ref porting_os_sec.
+ *
+ * Step-by-step guide to port to new CPU architecture:
+ *  - decide the name for the new architecture. In this case, we choose
+ *    <tt><b>alpha</b></tt>.
+ *  - edit file <tt>$PJPROJECT/build.mak</tt>, and add new section for
+ *    the new target:
+ *    <pre>
+ *      #
+ *      # Linux alpha, gcc
+ *      #
+ *      export MACHINE_NAME := <b>alpha</b>
+ *      export OS_NAME := linux
+ *      export CC_NAME := gcc
+ *      export HOST_NAME := unix
+ *    </pre>
+ *
+ *  - create a new file <tt>$PJPROJECT/build/<b>m-alpha</b>.mak</tt>.
+ *    Alternatively create a copy from other file in this directory.
+ *    The contents of this file will look something like:
+ *    <pre>
+ *      export M_CFLAGS := $(CC_DEF)<b>PJ_M_ALPHA=1</b>
+ *      export M_CXXFLAGS :=
+ *      export M_LDFLAGS :=
+ *      export M_SOURCES :=
+ *    </pre>
+ *  - create a new file <tt>$PJPROJECT/pjlib/include/pj/compat/<b>m_alpha.h</b></tt>.
+ *    Alternatively create a copy from other header file in this directory.
+ *    The contents of this file will look something like:
+ *    <pre>
+ *      #define PJ_HAS_PENTIUM          0
+ *      #define PJ_IS_LITTLE_ENDIAN     1
+ *      #define PJ_IS_BIG_ENDIAN        0
+ *    </pre>
+ *  - edit <tt>pjlib/include/pj/<b>config.h</b></tt>. Add new processor
+ *    configuration in this header file, like follows:
+ *    <pre>
+ *      ...
+ *      #elif defined (PJ_M_ALPHA) && PJ_M_ALPHA != 0
+ *      #   include <pj/compat/m_alpha.h>
+ *      ...
+ *    </pre>
+ *  - done. Build PJLIB with:
+ *    <pre>
+ *      $ cd $PJPROJECT/pjlib/build
+ *      $ make dep
+ *      $ make clean
+ *      $ make
+ *    </pre>
+ *
+ * @section porting_os_sec Porting to New Operating System Target
+ *
+ * This section will try to give you rough guideline on how to
+ * port PJLIB to a new target. As a sample, we give the target a name tag, 
+ * for example <tt><b>xos</b></tt> (for X OS). 
+ *
+ * @subsection new_compat_os_h_file_sec Create New Compat Header File
+ *
+ * You'll need to create a new header file 
+ * <b><tt>include/pj/compat/os_xos.h</tt></b>. You can copy as a 
+ * template other header file and edit it accordingly.
+ *
+ * @subsection modify_config_h_file_sec Modify config.h
+ *
+ * Then modify file <b><tt>include/pj/config.h</tt></b> to include
+ * this file accordingly (e.g. when macro <tt><b>PJ_XOS</b></tt> is
+ * defined):
+ *
+ \verbatim
+ ...
+ #elif defined(PJ_XOS)
+ #  include <pj/compat/os_xos.h>
+ #else
+ #...
+ \endverbatim
+ * 
+ * @subsection new_target_mak_file_sec Create New Global Make Config File
+ *
+ * Then you'll need to create global configuration file that
+ * is specific for this OS, i.e. <tt><b>os-xos.mak</b></tt> in 
+ * <tt><b>$PJPROJECT/build</b></tt> directory.
+ *
+ * At very minimum, the file will normally need to define
+ * <tt><b>PJ_XOS=1</b></tt> in the \c CFLAGS section:
+ *
+ \verbatim
+#
+# $PJPROJECT/build/os-xos.mak:
+#
+export OS_CFLAGS   := $(CC_DEF)PJ_XOS=1
+export OS_CXXFLAGS := 
+export OS_LDFLAGS  :=
+export OS_SOURCES  := 
+ \endverbatim
+ *
+ *
+ * @subsection new_target_prj_mak_file_sec Create New Project's Make Config File
+ *
+ * Then you'll need to create xos-specific configuration file
+ * for PJLIB. This file is also named <tt><b>os-xos.mak</b></tt>,
+ * but its located in <tt><b>pjlib/build</b></tt> directory.
+ * This file will specify source files that are specific to
+ * this OS to be included in the build process.
+ *
+ * Below is a sample:
+ \verbatim
+#
+# pjlib/build/os-xos.mak:
+#  XOS specific configuration for PJLIB.
+#
+export PJLIB_OBJS += 	os_core_xos.o \
+                        os_error_unix.o \
+                        os_time_ansi.o
+export TEST_OBJS +=	main.o
+export TARGETS	    =	pjlib pjlib-test
+ \endverbatim
+ *
+ * @subsection new_target_src_sec Create and Edit Source Files
+ *
+ * You'll normally need to create at least these files:
+ *  - <tt><b>os_core_xos.c</b></tt>: core OS specific
+ *    functionality.
+ *  - <tt><b>os_timestamp_xos.c</b></tt>: how to get timestamp
+ *    in this OS.
+ *
+ * Depending on how things are done in your OS, you may need
+ * to create these files:
+ *  - <tt><b>os_error_*.c</b></tt>: how to manipulate
+ *    OS error codes. Alternatively you may use existing
+ *    <tt>os_error_unix.c</tt> if the OS has \c errno and
+ *    \c strerror() function.
+ *  - <tt><b>ioqueue_*.c</b></tt>: if the OS has specific method
+ *    to perform asynchronous I/O. Alternatively you may
+ *    use existing <tt>ioqueue_select.c</tt> if the OS supports
+ *    \c select() function call.
+ *  - <tt><b>sock_*.c</b></tt>: if the OS has specific method
+ *    to perform socket communication. Alternatively you may
+ *    use existing <tt>sock_bsd.c</tt> if the OS supports
+ *    BSD socket API, and edit <tt>include/pj/compat/socket.h</tt>
+ *    file accordingly.
+ *
+ * You will also need to check various files in 
+ * <tt><b>include/pj/compat/*.h</b></tt>, to see if they're 
+ * compatible with your OS.
+ *
+ * @subsection new_target_build_file_sec Build The Project
+ *
+ * After basic building blocks have been created for the OS, then
+ * the easiest way to see which parts need to be fixed is by building
+ * the project and see the error messages.
+ *
+ * @subsection new_target_edit_vs_new_file_sec Editing Existing Files vs Creating New File
+ *
+ * When you encounter compatibility errors in PJLIB during porting,
+ * you have three options on how to fix the error:
+ *  - edit the existing <tt>*.c</tt> file, and give it <tt>#ifdef</tt>
+ *    switch for the new OS, or
+ *  - edit <tt>include/pj/compat/*.h</tt> instead, or
+ *  - create a totally new file.
+ *
+ * Basicly there is no strict rule on which approach is the best
+ * to use, however the following guidelines may be used:
+ *  - if the file is expected to be completely different than
+ *    any existing file, then perhaps you should create a completely
+ *    new file. For example, file <tt>os_core_xxx.c</tt> will 
+ *    normally be different for each OS flavour.
+ *  - if the difference can be localized in <tt>include/compat</tt>
+ *    header file, and existing <tt>#ifdef</tt> switch is there,
+ *    then preferably you should edit this <tt>include/compat</tt>
+ *    header file.
+ *  - if the existing <tt>*.c</tt> file has <tt>#ifdef</tt> switch,
+ *    then you may add another <tt>#elif</tt> switch there. This
+ *    normally is used for behaviors that are not totally
+ *    different on each platform.
+ *  - other than that above, use your own judgement on whether
+ *    to edit the file or create new file etc.
+ */
+
+#endif	/* __PJ_DOXYGEN_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/errno.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/errno.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/errno.h	(revision 1163)
@@ -0,0 +1,354 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_ERRNO_H__
+#define __PJ_ERRNO_H__
+
+/**
+ * @file errno.h
+ * @brief PJLIB Error Codes
+ */
+#include <pj/types.h>
+#include <pj/compat/errno.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup pj_errno Error Codes
+ * @ingroup PJ
+ * @{
+ *
+ * In PJLIB, error/status codes from operating system are translated
+ * into PJLIB error namespace, and stored in @a pj_status_t. All functions
+ * that work with @a pj_status_t expect to get PJLIB error code instead
+ * of native codes.
+ *
+ * @section pj_errno_retval Return Values
+ *
+ * All functions that returns @a pj_status_t returns @a PJ_SUCCESS if the
+ * operation was completed successfully, or non-zero value to indicate 
+ * error. If the error came from operating system, then the native error
+ * code is translated/folded into PJLIB's error namespace by using
+ * #PJ_STATUS_FROM_OS() macro. The function will do this automatically
+ * before returning the error to caller.
+ *
+ * @section pj_errno_errmsg Error Message
+ *
+ * To get the error message corresponding to a particular code, use function
+ * #pj_strerror(). This function expects error code in PJLIB error namespace,
+ * not the native error code. Application can pass the value from the 
+ * following sources to this function:
+ *  - #pj_get_os_error()
+ *  - #pj_get_netos_error()
+ *  - any return value from function returning @a pj_status_t.
+ *
+ * Application MUST NOT pass native error code (such as error code from
+ * functions like GetLastError() or errno) to PJLIB functions expecting
+ * @a pj_status_t.
+ *
+ */
+
+/**
+ * Guidelines on error message length.
+ */
+#define PJ_ERR_MSG_SIZE  80
+
+/**
+ * Get the last platform error/status, folded into pj_status_t.
+ * @return	OS dependent error code, folded into pj_status_t.
+ * @remark	This function gets errno, or calls GetLastError() function and
+ *		convert the code into pj_status_t with PJ_STATUS_FROM_OS. Do
+ *		not call this for socket functions!
+ * @see	pj_get_netos_error()
+ */
+PJ_DECL(pj_status_t) pj_get_os_error(void);
+
+/**
+ * Set last error.
+ * @param code	pj_status_t
+ */
+PJ_DECL(void) pj_set_os_error(pj_status_t code);
+
+/**
+ * Get the last error from socket operations.
+ * @return	Last socket error, folded into pj_status_t.
+ */
+PJ_DECL(pj_status_t) pj_get_netos_error(void);
+
+/**
+ * Set error code.
+ * @param code	pj_status_t.
+ */
+PJ_DECL(void) pj_set_netos_error(pj_status_t code);
+
+
+/**
+ * Get the error message for the specified error code. The message
+ * string will be NULL terminated.
+ *
+ * @param statcode  The error code.
+ * @param buf	    Buffer to hold the error message string.
+ * @param bufsize   Size of the buffer.
+ *
+ * @return	    The error message as NULL terminated string,
+ *                  wrapped with pj_str_t.
+ */
+PJ_DECL(pj_str_t) pj_strerror( pj_status_t statcode, 
+			       char *buf, pj_size_t bufsize);
+
+/**
+ * Register strerror message handler for the specified error space.
+ * Application can register its own handler to supply the error message
+ * for the specified error code range. This handler will be called
+ * by #pj_strerror().
+ *
+ * @param start_code	The starting error code where the handler should
+ *			be called to retrieve the error message.
+ * @param err_space	The size of error space. The error code range then
+ *			will fall in start_code to start_code+err_space-1
+ *			range.
+ * @param f		The handler to be called when #pj_strerror() is
+ *			supplied with error code that falls into this range.
+ *
+ * @return		PJ_SUCCESS or the specified error code. The 
+ *			registration may fail when the error space has been
+ *			occupied by other handler, or when there are too many
+ *			handlers registered to PJLIB.
+ */
+PJ_DECL(pj_status_t) pj_register_strerror(pj_status_t start_code,
+					  pj_status_t err_space,
+					  pj_str_t (*f)(pj_status_t,char*,
+							pj_size_t));
+
+/**
+ * @hideinitializer
+ * Return platform os error code folded into pj_status_t code. This is
+ * the macro that is used throughout the library for all PJLIB's functions
+ * that returns error from operating system. Application may override
+ * this macro to reduce size (e.g. by defining it to always return 
+ * #PJ_EUNKNOWN).
+ *
+ * Note:
+ *  This macro MUST return non-zero value regardless whether zero is
+ *  passed as the argument. The reason is to protect logic error when
+ *  the operating system doesn't report error codes properly.
+ *
+ * @param os_code   Platform OS error code. This value may be evaluated
+ *		    more than once.
+ * @return	    The platform os error code folded into pj_status_t.
+ */
+#ifndef PJ_RETURN_OS_ERROR
+#   define PJ_RETURN_OS_ERROR(os_code)   (os_code ? \
+					    PJ_STATUS_FROM_OS(os_code) : -1)
+#endif
+
+
+/**
+ * @hideinitializer
+ * Fold a platform specific error into an pj_status_t code.
+ *
+ * @param e	The platform os error code.
+ * @return	pj_status_t
+ * @warning	Macro implementation; the syserr argument may be evaluated
+ *		multiple times.
+ */
+#define PJ_STATUS_FROM_OS(e) (e == 0 ? PJ_SUCCESS : e + PJ_ERRNO_START_SYS)
+
+/**
+ * @hideinitializer
+ * Fold an pj_status_t code back to the native platform defined error.
+ *
+ * @param e	The pj_status_t folded platform os error code.
+ * @return	pj_os_err_type
+ * @warning	macro implementation; the statcode argument may be evaluated
+ *		multiple times.  If the statcode was not created by 
+ *		pj_get_os_error or PJ_STATUS_FROM_OS, the results are undefined.
+ */
+#define PJ_STATUS_TO_OS(e) (e == 0 ? PJ_SUCCESS : e - PJ_ERRNO_START_SYS)
+
+
+/**
+ * @defgroup pj_errnum PJLIB's Own Error Codes
+ * @ingroup pj_errno
+ * @{
+ */
+
+/**
+ * Use this macro to generate error message text for your error code,
+ * so that they look uniformly as the rest of the libraries.
+ *
+ * @param code	The error code
+ * @param msg	The error test.
+ */
+#ifndef PJ_BUILD_ERR
+#   define PJ_BUILD_ERR(code,msg) { code, msg " (" #code ")" }
+#endif
+
+
+/**
+ * @hideinitializer
+ * Unknown error has been reported.
+ */
+#define PJ_EUNKNOWN	    (PJ_ERRNO_START_STATUS + 1)	/* 70001 */
+/**
+ * @hideinitializer
+ * The operation is pending and will be completed later.
+ */
+#define PJ_EPENDING	    (PJ_ERRNO_START_STATUS + 2)	/* 70002 */
+/**
+ * @hideinitializer
+ * Too many connecting sockets.
+ */
+#define PJ_ETOOMANYCONN	    (PJ_ERRNO_START_STATUS + 3)	/* 70003 */
+/**
+ * @hideinitializer
+ * Invalid argument.
+ */
+#define PJ_EINVAL	    (PJ_ERRNO_START_STATUS + 4)	/* 70004 */
+/**
+ * @hideinitializer
+ * Name too long (eg. hostname too long).
+ */
+#define PJ_ENAMETOOLONG	    (PJ_ERRNO_START_STATUS + 5)	/* 70005 */
+/**
+ * @hideinitializer
+ * Not found.
+ */
+#define PJ_ENOTFOUND	    (PJ_ERRNO_START_STATUS + 6)	/* 70006 */
+/**
+ * @hideinitializer
+ * Not enough memory.
+ */
+#define PJ_ENOMEM	    (PJ_ERRNO_START_STATUS + 7)	/* 70007 */
+/**
+ * @hideinitializer
+ * Bug detected!
+ */
+#define PJ_EBUG             (PJ_ERRNO_START_STATUS + 8)	/* 70008 */
+/**
+ * @hideinitializer
+ * Operation timed out.
+ */
+#define PJ_ETIMEDOUT        (PJ_ERRNO_START_STATUS + 9)	/* 70009 */
+/**
+ * @hideinitializer
+ * Too many objects.
+ */
+#define PJ_ETOOMANY         (PJ_ERRNO_START_STATUS + 10)/* 70010 */
+/**
+ * @hideinitializer
+ * Object is busy.
+ */
+#define PJ_EBUSY            (PJ_ERRNO_START_STATUS + 11)/* 70011 */
+/**
+ * @hideinitializer
+ * The specified option is not supported.
+ */
+#define PJ_ENOTSUP	    (PJ_ERRNO_START_STATUS + 12)/* 70012 */
+/**
+ * @hideinitializer
+ * Invalid operation.
+ */
+#define PJ_EINVALIDOP	    (PJ_ERRNO_START_STATUS + 13)/* 70013 */
+/**
+ * @hideinitializer
+ * Operation is cancelled.
+ */
+#define PJ_ECANCELLED	    (PJ_ERRNO_START_STATUS + 14)/* 70014 */
+/**
+ * @hideinitializer
+ * Object already exists.
+ */
+#define PJ_EEXISTS          (PJ_ERRNO_START_STATUS + 15)/* 70015 */
+/**
+ * @hideinitializer
+ * End of file.
+ */
+#define PJ_EEOF		    (PJ_ERRNO_START_STATUS + 16)/* 70016 */
+/**
+ * @hideinitializer
+ * Size is too big.
+ */
+#define PJ_ETOOBIG	    (PJ_ERRNO_START_STATUS + 17)/* 70017 */
+/**
+ * @hideinitializer
+ * Error in gethostbyname(). This is a generic error returned when
+ * gethostbyname() has returned an error.
+ */
+#define PJ_ERESOLVE	    (PJ_ERRNO_START_STATUS + 18)/* 70018 */
+/**
+ * @hideinitializer
+ * Size is too small.
+ */
+#define PJ_ETOOSMALL	    (PJ_ERRNO_START_STATUS + 19)/* 70019 */
+
+
+/** @} */   /* pj_errnum */
+
+/** @} */   /* pj_errno */
+
+
+/**
+ * PJ_ERRNO_START is where PJLIB specific error values start.
+ */
+#define PJ_ERRNO_START		20000
+
+/**
+ * PJ_ERRNO_SPACE_SIZE is the maximum number of errors in one of 
+ * the error/status range below.
+ */
+#define PJ_ERRNO_SPACE_SIZE	50000
+
+/**
+ * PJ_ERRNO_START_STATUS is where PJLIB specific status codes start.
+ * Effectively the error in this class would be 70000 - 119000.
+ */
+#define PJ_ERRNO_START_STATUS	(PJ_ERRNO_START + PJ_ERRNO_SPACE_SIZE)
+
+/**
+ * PJ_ERRNO_START_SYS converts platform specific error codes into
+ * pj_status_t values.
+ * Effectively the error in this class would be 120000 - 169000.
+ */
+#define PJ_ERRNO_START_SYS	(PJ_ERRNO_START_STATUS + PJ_ERRNO_SPACE_SIZE)
+
+/**
+ * PJ_ERRNO_START_USER are reserved for applications that use error
+ * codes along with PJLIB codes.
+ * Effectively the error in this class would be 170000 - 219000.
+ */
+#define PJ_ERRNO_START_USER	(PJ_ERRNO_START_SYS + PJ_ERRNO_SPACE_SIZE)
+
+
+/*
+ * Below are list of error spaces that have been taken so far:
+ *  - PJSIP_ERRNO_START		(PJ_ERRNO_START_USER)
+ *  - PJMEDIA_ERRNO_START	(PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE)
+ *  - PJSIP_SIMPLE_ERRNO_START	(PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*2)
+ *  - PJLIB_UTIL_ERRNO_START	(PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*3)
+ *  - PJNATH_ERRNO_START	(PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*4)
+ */
+
+
+PJ_END_DECL
+
+/* Internal */
+void pj_errno_clear_handlers(void);
+
+#endif	/* __PJ_ERRNO_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/except.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/except.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/except.h	(revision 1163)
@@ -0,0 +1,331 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_EXCEPTION_H__
+#define __PJ_EXCEPTION_H__
+
+/**
+ * @file except.h
+ * @brief Exception Handling in C.
+ */
+
+#include <pj/types.h>
+#include <pj/compat/setjmp.h>
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJ_EXCEPT Exception Handling
+ * @ingroup PJ_MISC
+ * @{
+ *
+ * \section pj_except_sample_sec Quick Example
+ *
+ * For the impatient, take a look at some examples:
+ *  - @ref page_pjlib_samples_except_c
+ *  - @ref page_pjlib_exception_test
+ *
+ * \section pj_except_except Exception Handling
+ *
+ * This module provides exception handling syntactically similar to C++ in
+ * C language. In Win32 systems, it uses Windows Structured Exception
+ * Handling (SEH) if macro PJ_EXCEPTION_USE_WIN32_SEH is non-zero.
+ * Otherwise it will use setjmp() and longjmp().
+ *
+ * On some platforms where setjmp/longjmp is not available, setjmp/longjmp 
+ * implementation is provided. See <pj/compat/setjmp.h> for compatibility.
+ *
+ * The exception handling mechanism is completely thread safe, so the exception
+ * thrown by one thread will not interfere with other thread.
+ *
+ * CAVEATS:
+ *  - unlike C++ exception, the scheme here won't call destructors of local
+ *    objects if exception is thrown. Care must be taken when a function
+ *    hold some resorce such as pool or mutex etc.
+ *  - You CAN NOT make nested exception in one single function without using
+ *    a nested PJ_USE_EXCEPTION.
+ *  - You can not provide more than PJ_CATCH or PJ_CATCH_ANY nor use PJ_CATCH
+ *    and PJ_CATCH_ANY for a single PJ_TRY.
+ *  - Exceptions will always be caught by the first handler (unlike C++ where
+ *    exception is only caught if the type matches.
+ *
+ * The exception handling constructs are similar to C++. The blocks will be
+ * constructed similar to the following sample:
+ *
+ * \verbatim
+   #define NO_MEMORY     1
+   #define SYNTAX_ERROR  2
+  
+   int sample1()
+   {
+      PJ_USE_EXCEPTION;  // declare local exception stack.
+  
+      PJ_TRY {
+        ...// do something..
+      }
+      PJ_CATCH(NO_MEMORY) {
+        ... // handle exception 1
+      }
+      PJ_END;
+   }
+
+   int sample2()
+   {
+      PJ_USE_EXCEPTION;  // declare local exception stack.
+  
+      PJ_TRY {
+        ...// do something..
+      }
+      PJ_CATCH_ANY {
+         if (PJ_GET_EXCEPTION() == NO_MEMORY)
+	    ...; // handle no memory situation
+	 else if (PJ_GET_EXCEPTION() == SYNTAX_ERROR)
+	    ...; // handle syntax error
+      }
+      PJ_END;
+   }
+   \endverbatim
+ *
+ * The above sample uses hard coded exception ID. It is @b strongly
+ * recommended that applications request a unique exception ID instead
+ * of hard coded value like above.
+ *
+ * \section pj_except_reg Exception ID Allocation
+ *
+ * To ensure that exception ID (number) are used consistently and to
+ * prevent ID collisions in an application, it is strongly suggested that 
+ * applications allocate an exception ID for each possible exception
+ * type. As a bonus of this process, the application can identify
+ * the name of the exception when the particular exception is thrown.
+ *
+ * Exception ID management are performed with the following APIs:
+ *  - #pj_exception_id_alloc().
+ *  - #pj_exception_id_free().
+ *  - #pj_exception_id_name().
+ *
+ *
+ * PJLIB itself automatically allocates one exception id, i.e.
+ * #PJ_NO_MEMORY_EXCEPTION which is declared in <pj/pool.h>. This exception
+ * ID is raised by default pool policy when it fails to allocate memory.
+ *
+ * \section PJ_EX_KEYWORDS Keywords
+ *
+ * \subsection PJ_THROW PJ_THROW(expression)
+ * Throw an exception. The expression thrown is an integer as the result of
+ * the \a expression. This keyword can be specified anywhere within the 
+ * program.
+ *
+ * \subsection PJ_USE_EXCEPTION PJ_USE_EXCEPTION
+ * Specify this in the variable definition section of the function block 
+ * (or any blocks) to specify that the block has \a PJ_TRY/PJ_CATCH exception 
+ * block. 
+ * Actually, this is just a macro to declare local variable which is used to
+ * push the exception state to the exception stack.
+ * Note: you must specify PJ_USE_EXCEPTION as the last statement in the
+ * local variable declarations, since it may evaluate to nothing.
+ *
+ * \subsection PJ_TRY PJ_TRY
+ * The \a PJ_TRY keyword is typically followed by a block. If an exception is
+ * thrown in this block, then the execution will resume to the \a PJ_CATCH 
+ * handler.
+ *
+ * \subsection PJ_CATCH PJ_CATCH(expression)
+ * The \a PJ_CATCH is normally followed by a block. This block will be executed
+ * if the exception being thrown is equal to the expression specified in the
+ * \a PJ_CATCH.
+ *
+ * \subsection PJ_CATCH_ANY PJ_CATCH_ANY
+ * The \a PJ_CATCH is normally followed by a block. This block will be executed
+ * if any exception was raised in the TRY block.
+ *
+ * \subsection PJ_END PJ_END
+ * Specify this keyword to mark the end of \a PJ_TRY / \a PJ_CATCH blocks.
+ *
+ * \subsection PJ_GET_EXCEPTION PJ_GET_EXCEPTION(void)
+ * Get the last exception thrown. This macro is normally called inside the
+ * \a PJ_CATCH or \a PJ_CATCH_ANY block, altough it can be used anywhere where
+ * the \a PJ_USE_EXCEPTION definition is in scope.
+ *
+ * 
+ * \section pj_except_examples_sec Examples
+ *
+ * For some examples on how to use the exception construct, please see:
+ *  - @ref page_pjlib_samples_except_c
+ *  - @ref page_pjlib_exception_test
+ */
+
+/**
+ * Allocate a unique exception id.
+ * Applications don't have to allocate a unique exception ID before using
+ * the exception construct. However, by doing so it ensures that there is
+ * no collisions of exception ID.
+ *
+ * As a bonus, when exception number is acquired through this function,
+ * the library can assign name to the exception (only if 
+ * PJ_HAS_EXCEPTION_NAMES is enabled (default is yes)) and find out the
+ * exception name when it catches an exception.
+ *
+ * @param name      Name to be associated with the exception ID.
+ * @param id        Pointer to receive the ID.
+ *
+ * @return          PJ_SUCCESS on success or PJ_ETOOMANY if the library 
+ *                  is running out out ids.
+ */
+PJ_DECL(pj_status_t) pj_exception_id_alloc(const char *name,
+                                           pj_exception_id_t *id);
+
+/**
+ * Free an exception id.
+ *
+ * @param id        The exception ID.
+ *
+ * @return          PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_exception_id_free(pj_exception_id_t id);
+
+/**
+ * Retrieve name associated with the exception id.
+ *
+ * @param id        The exception ID.
+ *
+ * @return          The name associated with the specified ID.
+ */
+PJ_DECL(const char*) pj_exception_id_name(pj_exception_id_t id);
+
+
+/** @} */
+
+#if defined(PJ_EXCEPTION_USE_WIN32_SEH) && PJ_EXCEPTION_USE_WIN32_SEH != 0
+/*****************************************************************************
+ **
+ ** IMPLEMENTATION OF EXCEPTION USING WINDOWS SEH
+ **
+ ****************************************************************************/
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+PJ_IDECL_NO_RETURN(void)
+pj_throw_exception_(pj_exception_id_t id) PJ_ATTR_NORETURN
+{
+    RaiseException(id,1,0,NULL);
+}
+
+#define PJ_USE_EXCEPTION    
+#define PJ_TRY		    __try
+#define PJ_CATCH(id)	    __except(GetExceptionCode()==id ? \
+				      EXCEPTION_EXECUTE_HANDLER : \
+				      EXCEPTION_CONTINUE_SEARCH)
+#define PJ_CATCH_ANY	    __except(EXCEPTION_EXECUTE_HANDLER)
+#define PJ_END		    
+#define PJ_THROW(id)	    pj_throw_exception_(id)
+#define PJ_GET_EXCEPTION()  GetExceptionCode()
+
+#else
+/*****************************************************************************
+ **
+ ** IMPLEMENTATION OF EXCEPTION USING GENERIC SETJMP/LONGJMP
+ **
+ ****************************************************************************/
+
+/**
+ * This structure (which should be invisible to user) manages the TRY handler
+ * stack.
+ */
+struct pj_exception_state_t
+{
+    struct pj_exception_state_t *prev;  /**< Previous state in the list. */
+    pj_jmp_buf state;                   /**< jmp_buf.                    */
+};
+
+/**
+ * Throw exception.
+ * @param id    Exception Id.
+ */
+PJ_DECL_NO_RETURN(void) 
+pj_throw_exception_(pj_exception_id_t id) PJ_ATTR_NORETURN;
+
+/**
+ * Push exception handler.
+ */
+PJ_DECL(void) pj_push_exception_handler_(struct pj_exception_state_t *rec);
+
+/**
+ * Pop exception handler.
+ */
+PJ_DECL(void) pj_pop_exception_handler_(void);
+
+/**
+ * Declare that the function will use exception.
+ * @hideinitializer
+ */
+#define PJ_USE_EXCEPTION    struct pj_exception_state_t pj_x_except__; int pj_x_code__
+
+/**
+ * Start exception specification block.
+ * @hideinitializer
+ */
+#define PJ_TRY		    if (1) { \
+				pj_push_exception_handler_(&pj_x_except__); \
+				pj_x_code__ = pj_setjmp(pj_x_except__.state); \
+				if (pj_x_code__ == 0)
+/**
+ * Catch the specified exception Id.
+ * @param id    The exception number to catch.
+ * @hideinitializer
+ */
+#define PJ_CATCH(id)	    else if (pj_x_code__ == (id))
+
+/**
+ * Catch any exception number.
+ * @hideinitializer
+ */
+#define PJ_CATCH_ANY	    else
+
+/**
+ * End of exception specification block.
+ * @hideinitializer
+ */
+#define PJ_END			pj_pop_exception_handler_(); \
+			    } else {}
+
+/**
+ * Throw exception.
+ * @param exception_id  The exception number.
+ * @hideinitializer
+ */
+#define PJ_THROW(exception_id)	pj_throw_exception_(exception_id)
+
+/**
+ * Get current exception.
+ * @return      Current exception code.
+ * @hideinitializer
+ */
+#define PJ_GET_EXCEPTION()	(pj_x_code__)
+
+#endif	/* PJ_EXCEPTION_USE_WIN32_SEH */
+
+
+PJ_END_DECL
+
+
+
+#endif	/* __PJ_EXCEPTION_H__ */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/fifobuf.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/fifobuf.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/fifobuf.h	(revision 1163)
@@ -0,0 +1,43 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_FIFOBUF_H__
+#define __PJ_FIFOBUF_H__
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+typedef struct pj_fifobuf_t pj_fifobuf_t;
+struct pj_fifobuf_t
+{
+    char *first, *last;
+    char *ubegin, *uend;
+    int full;
+};
+
+PJ_DECL(void)	     pj_fifobuf_init (pj_fifobuf_t *fb, void *buffer, unsigned size);
+PJ_DECL(unsigned)    pj_fifobuf_max_size (pj_fifobuf_t *fb);
+PJ_DECL(void*)	     pj_fifobuf_alloc (pj_fifobuf_t *fb, unsigned size);
+PJ_DECL(pj_status_t) pj_fifobuf_unalloc (pj_fifobuf_t *fb, void *buf);
+PJ_DECL(pj_status_t) pj_fifobuf_free (pj_fifobuf_t *fb, void *buf);
+
+PJ_END_DECL
+
+#endif	/* __PJ_FIFOBUF_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/file_access.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/file_access.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/file_access.h	(revision 1163)
@@ -0,0 +1,108 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/file_io.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/file_io.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/file_io.h	(revision 1163)
@@ -0,0 +1,182 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_IO_H__
+#define __PJ_FILE_IO_H__
+
+/**
+ * @file file_io.h
+ * @brief Simple file I/O abstraction.
+ */
+#include <pj/types.h>
+
+PJ_BEGIN_DECL 
+
+/**
+ * @defgroup PJ_FILE_IO File I/O
+ * @ingroup PJ_IO
+ * @{
+ *
+ * This file contains functionalities to perform file I/O. The file
+ * I/O can be implemented with various back-end, either using native
+ * file API or ANSI stream. 
+ *
+ * @section pj_file_size_limit_sec Size Limits
+ *
+ * There may be limitation on the size that can be handled by the
+ * #pj_file_setpos() or #pj_file_getpos() functions. The API itself
+ * uses 64-bit integer for the file offset/position (where available); 
+ * however some backends (such as ANSI) may only support signed 32-bit 
+ * offset resolution.
+ *
+ * Reading and writing operation uses signed 32-bit integer to indicate
+ * the size.
+ *
+ *
+ */
+
+/**
+ * These enumerations are used when opening file. Values PJ_O_RDONLY,
+ * PJ_O_WRONLY, and PJ_O_RDWR are mutually exclusive. Value PJ_O_APPEND
+ * can only be used when the file is opened for writing. 
+ */
+enum pj_file_access
+{
+    PJ_O_RDONLY     = 0x1101,   /**< Open file for reading.             */
+    PJ_O_WRONLY     = 0x1102,   /**< Open file for writing.             */
+    PJ_O_RDWR       = 0x1103,   /**< Open file for reading and writing. 
+                                     File will be truncated.            */
+    PJ_O_APPEND     = 0x1108    /**< Append to existing file.           */
+};
+
+/**
+ * The seek directive when setting the file position with #pj_file_setpos.
+ */
+enum pj_file_seek_type
+{
+    PJ_SEEK_SET     = 0x1201,   /**< Offset from beginning of the file. */
+    PJ_SEEK_CUR     = 0x1202,   /**< Offset from current position.      */
+    PJ_SEEK_END     = 0x1203    /**< Size of the file plus offset.      */
+};
+
+/**
+ * Open the file as specified in \c pathname with the specified
+ * mode, and return the handle in \c fd. All files will be opened
+ * as binary.
+ *
+ * @param pool          Pool to allocate memory for the new file descriptor.
+ * @param pathname      The file name to open.
+ * @param flags         Open flags, which is bitmask combination of
+ *                      #pj_file_access enum. The flag must be either
+ *                      PJ_O_RDONLY, PJ_O_WRONLY, or PJ_O_RDWR. When file
+ *                      writing is specified, existing file will be 
+ *                      truncated unless PJ_O_APPEND is specified.
+ * @param fd            The returned descriptor.
+ *
+ * @return              PJ_SUCCESS or the appropriate error code on error.
+ */
+PJ_DECL(pj_status_t) pj_file_open(pj_pool_t *pool,
+                                  const char *pathname, 
+                                  unsigned flags,
+                                  pj_oshandle_t *fd);
+
+/**
+ * Close an opened file descriptor.
+ *
+ * @param fd            The file descriptor.
+ *
+ * @return              PJ_SUCCESS or the appropriate error code on error.
+ */
+PJ_DECL(pj_status_t) pj_file_close(pj_oshandle_t fd);
+
+/**
+ * Write data with the specified size to an opened file.
+ *
+ * @param fd            The file descriptor.
+ * @param data          Data to be written to the file.
+ * @param size          On input, specifies the size of data to be written.
+ *                      On return, it contains the number of data actually
+ *                      written to the file.
+ *
+ * @return              PJ_SUCCESS or the appropriate error code on error.
+ */
+PJ_DECL(pj_status_t) pj_file_write(pj_oshandle_t fd,
+                                   const void *data,
+                                   pj_ssize_t *size);
+
+/**
+ * Read data from the specified file. When end-of-file condition is set,
+ * this function will return PJ_SUCCESS but the size will contain zero.
+ *
+ * @param fd            The file descriptor.
+ * @param data          Pointer to buffer to receive the data.
+ * @param size          On input, specifies the maximum number of data to
+ *                      read from the file. On output, it contains the size
+ *                      of data actually read from the file. It will contain
+ *                      zero when EOF occurs.
+ *
+ * @return              PJ_SUCCESS or the appropriate error code on error.
+ *                      When EOF occurs, the return is PJ_SUCCESS but size
+ *                      will report zero.
+ */
+PJ_DECL(pj_status_t) pj_file_read(pj_oshandle_t fd,
+                                  void *data,
+                                  pj_ssize_t *size);
+
+/**
+ * Set file position to new offset according to directive \c whence.
+ *
+ * @param fd            The file descriptor.
+ * @param offset        The new file position to set.
+ * @param whence        The directive.
+ *
+ * @return              PJ_SUCCESS or the appropriate error code on error.
+ */
+PJ_DECL(pj_status_t) pj_file_setpos(pj_oshandle_t fd,
+                                    pj_off_t offset,
+                                    enum pj_file_seek_type whence);
+
+/**
+ * Get current file position.
+ *
+ * @param fd            The file descriptor.
+ * @param pos           On return contains the file position as measured
+ *                      from the beginning of the file.
+ *
+ * @return              PJ_SUCCESS or the appropriate error code on error.
+ */
+PJ_DECL(pj_status_t) pj_file_getpos(pj_oshandle_t fd,
+                                    pj_off_t *pos);
+
+/**
+ * Flush file buffers.
+ *
+ * @param fd		The file descriptor.
+ *
+ * @return		PJ_SUCCESS or the appropriate error code on error.
+ */
+PJ_DECL(pj_status_t) pj_file_flush(pj_oshandle_t fd);
+
+
+/** @} */
+
+
+PJ_END_DECL
+
+#endif  /* __PJ_FILE_IO_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/guid.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/guid.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/guid.h	(revision 1163)
@@ -0,0 +1,91 @@
+/* $Id */
+/* 
+ * Copyright (C)2003-2007 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_GUID_H__
+#define __PJ_GUID_H__
+
+
+/**
+ * @file guid.h
+ * @brief GUID Globally Unique Identifier.
+ */
+#include <pj/types.h>
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJ_DS Data Structure.
+ * @ingroup PJ
+ */
+/**
+ * @defgroup PJ_GUID Globally Unique Identifier
+ * @ingroup PJ_DS
+ * @{
+ *
+ * This module provides API to create string that is globally unique.
+ * If application doesn't require that strong requirement, it can just
+ * use #pj_create_random_string() instead.
+ */
+
+
+/**
+ * PJ_GUID_STRING_LENGTH specifies length of GUID string. The value is
+ * dependent on the algorithm used internally to generate the GUID string.
+ * If real GUID generator is used, then the length will be 128bit or 
+ * 32 bytes. If shadow GUID generator is used, then the length
+ * will be 20 bytes. Application should not assume which algorithm will
+ * be used by GUID generator.
+ */
+extern const unsigned PJ_GUID_STRING_LENGTH;
+
+/**
+ * PJ_GUID_MAX_LENGTH specifies the maximum length of GUID string,
+ * regardless of which algorithm to use.
+ */
+#define PJ_GUID_MAX_LENGTH  32
+
+/**
+ * Create a globally unique string, which length is PJ_GUID_STRING_LENGTH
+ * characters. Caller is responsible for preallocating the storage used
+ * in the string.
+ *
+ * @param str       The string to store the result.
+ *
+ * @return          The string.
+ */
+PJ_DECL(pj_str_t*) pj_generate_unique_string(pj_str_t *str);
+
+/**
+ * Generate a unique string.
+ *
+ * @param pool	    Pool to allocate memory from.
+ * @param str	    The string.
+ */
+PJ_DECL(void) pj_create_unique_string(pj_pool_t *pool, pj_str_t *str);
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+#endif/* __PJ_GUID_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/hash.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/hash.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/hash.h	(revision 1163)
@@ -0,0 +1,217 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_HASH_H__
+#define __PJ_HASH_H__
+
+/**
+ * @file hash.h
+ * @brief Hash Table.
+ */
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_HASH Hash Table
+ * @ingroup PJ_DS
+ * @{
+ * A hash table is a dictionary in which keys are mapped to array positions by
+ * hash functions. Having the keys of more than one item map to the same 
+ * position is called a collision. In this library, we will chain the nodes
+ * that have the same key in a list.
+ */
+
+/**
+ * If this constant is used as keylen, then the key is interpreted as
+ * NULL terminated string.
+ */
+#define PJ_HASH_KEY_STRING	((unsigned)-1)
+
+/**
+ * This indicates the size of of each hash entry.
+ */
+#define PJ_HASH_ENTRY_SIZE	(3*sizeof(void*) + 2*sizeof(pj_uint32_t))
+
+/**
+ * This is the function that is used by the hash table to calculate hash value
+ * of the specified key.
+ *
+ * @param hval	    the initial hash value, or zero.
+ * @param key	    the key to calculate.
+ * @param keylen    the length of the key, or PJ_HASH_KEY_STRING to treat 
+ *		    the key as null terminated string.
+ *
+ * @return          the hash value.
+ */
+PJ_DECL(pj_uint32_t) pj_hash_calc(pj_uint32_t hval, 
+				  const void *key, unsigned keylen);
+
+
+/**
+ * Convert the key to lowercase and calculate the hash value. The resulting
+ * string is stored in \c result.
+ *
+ * @param hval      The initial hash value, normally zero.
+ * @param result    Buffer to store the result, which must be enough to hold
+ *                  the string.
+ * @param key       The input key to be converted and calculated.
+ *
+ * @return          The hash value.
+ */
+PJ_DECL(pj_uint32_t) pj_hash_calc_tolower(pj_uint32_t hval,
+                                          char *result,
+                                          const pj_str_t *key);
+
+/**
+ * Create a hash table with the specified 'bucket' size.
+ *
+ * @param pool	the pool from which the hash table will be allocated from.
+ * @param size	the bucket size, which will be round-up to the nearest 2^n-1
+ *
+ * @return the hash table.
+ */
+PJ_DECL(pj_hash_table_t*) pj_hash_create(pj_pool_t *pool, unsigned size);
+
+
+/**
+ * Get the value associated with the specified key.
+ *
+ * @param ht	    the hash table.
+ * @param key	    the key to look for.
+ * @param keylen    the length of the key, or PJ_HASH_KEY_STRING to use the
+ *		    string length of the key.
+ * @param hval	    if this argument is not NULL and the value is not zero,
+ *		    the value will be used as the computed hash value. If
+ *		    the argument is not NULL and the value is zero, it will
+ *		    be filled with the computed hash upon return.
+ *
+ * @return the value associated with the key, or NULL if the key is not found.
+ */
+PJ_DECL(void *) pj_hash_get( pj_hash_table_t *ht,
+			     const void *key, unsigned keylen,
+			     pj_uint32_t *hval );
+
+
+/**
+ * Associate/disassociate a value with the specified key. If value is not
+ * NULL and entry already exists, the entry's value will be overwritten.
+ * If value is not NULL and entry does not exist, a new one will be created
+ * with the specified pool. Otherwise if value is NULL, entry will be
+ * deleted if it exists.
+ *
+ * @param pool	    the pool to allocate the new entry if a new entry has to be
+ *		    created.
+ * @param ht	    the hash table.
+ * @param key	    the key, which MUST point to buffer that remains valid
+ *		    for the duration of the entry.
+ * @param keylen    the length of the key, or PJ_HASH_KEY_STRING to use the 
+ *		    string length of the key.
+ * @param hval	    if the value is not zero, then the hash table will use
+ *		    this value to search the entry's index, otherwise it will
+ *		    compute the key. This value can be obtained when calling
+ *		    #pj_hash_get().
+ * @param value	    value to be associated, or NULL to delete the entry with
+ *		    the specified key.
+ */
+PJ_DECL(void) pj_hash_set( pj_pool_t *pool, pj_hash_table_t *ht,
+			   const void *key, unsigned keylen, pj_uint32_t hval,
+			   void *value );
+
+
+/**
+ * Associate/disassociate a value with the specified key. This function works
+ * like #pj_hash_set(), except that it doesn't use pool (hence the np -- no 
+ * pool suffix). If new entry needs to be allocated, it will use the entry_buf.
+ *
+ * @param ht	    the hash table.
+ * @param key	    the key.
+ * @param keylen    the length of the key, or PJ_HASH_KEY_STRING to use the 
+ *		    string length of the key.
+ * @param hval	    if the value is not zero, then the hash table will use
+ *		    this value to search the entry's index, otherwise it will
+ *		    compute the key. This value can be obtained when calling
+ *		    #pj_hash_get().
+ * @param entry_buf Pointer to buffer which will be used for the new entry,
+ *		    when one needs to be created. The buffer must be at least
+ *		    PJ_HASH_ENTRY_SIZE long, and the first PJ_HASH_ENTRY_SIZE
+ *		    bytes of the buffer will be used by the hash table.
+ *		    Application may use the remaining portion of the buffer
+ *		    for its own purpose.
+ * @param value	    value to be associated, or NULL to delete the entry with
+ *		    the specified key.
+ */
+PJ_DECL(void) pj_hash_set_np(pj_hash_table_t *ht,
+			     const void *key, unsigned keylen, 
+			     pj_uint32_t hval, void *entry_buf, void *value);
+
+/**
+ * Get the total number of entries in the hash table.
+ *
+ * @param ht	the hash table.
+ *
+ * @return the number of entries in the hash table.
+ */
+PJ_DECL(unsigned) pj_hash_count( pj_hash_table_t *ht );
+
+
+/**
+ * Get the iterator to the first element in the hash table. 
+ *
+ * @param ht	the hash table.
+ * @param it	the iterator for iterating hash elements.
+ *
+ * @return the iterator to the hash element, or NULL if no element presents.
+ */
+PJ_DECL(pj_hash_iterator_t*) pj_hash_first( pj_hash_table_t *ht,
+					    pj_hash_iterator_t *it );
+
+
+/**
+ * Get the next element from the iterator.
+ *
+ * @param ht	the hash table.
+ * @param it	the hash iterator.
+ *
+ * @return the next iterator, or NULL if there's no more element.
+ */
+PJ_DECL(pj_hash_iterator_t*) pj_hash_next( pj_hash_table_t *ht, 
+					   pj_hash_iterator_t *it );
+
+/**
+ * Get the value associated with a hash iterator.
+ *
+ * @param ht	the hash table.
+ * @param it	the hash iterator.
+ *
+ * @return the value associated with the current element in iterator.
+ */
+PJ_DECL(void*) pj_hash_this( pj_hash_table_t *ht,
+			     pj_hash_iterator_t *it );
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+#endif
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/ioqueue.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/ioqueue.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/ioqueue.h	(revision 1163)
@@ -0,0 +1,670 @@
+/* $Id$
+ */
+/* 
+ * Copyright (C)2003-2007 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_IOQUEUE_H__
+#define __PJ_IOQUEUE_H__
+
+/**
+ * @file ioqueue.h
+ * @brief I/O Dispatching Mechanism
+ */
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_IO Input/Output
+ * @brief Input/Output
+ * @ingroup PJ_OS
+ *
+ * This section contains API building blocks to perform network I/O and 
+ * communications. If provides:
+ *  - @ref PJ_SOCK
+ *\n
+ *    A highly portable socket abstraction, runs on all kind of
+ *    network APIs such as standard BSD socket, Windows socket, Linux
+ *    \b kernel socket, PalmOS networking API, etc.
+ *
+ *  - @ref pj_addr_resolve
+ *\n
+ *    Portable address resolution, which implements #pj_gethostbyname().
+ *
+ *  - @ref PJ_SOCK_SELECT
+ *\n
+ *    A portable \a select() like API (#pj_sock_select()) which can be
+ *    implemented with various back-ends.
+ *
+ *  - @ref PJ_IOQUEUE
+ *\n
+ *    Framework for dispatching network events.
+ *
+ * For more information see the modules below.
+ */
+
+/**
+ * @defgroup PJ_IOQUEUE IOQueue: I/O Event Dispatching with Proactor Pattern
+ * @ingroup PJ_IO
+ * @{
+ *
+ * I/O Queue provides API for performing asynchronous I/O operations. It
+ * conforms to proactor pattern, which allows application to submit an
+ * asynchronous operation and to be notified later when the operation has
+ * completed.
+ *
+ * The I/O Queue can work on both socket and file descriptors. For 
+ * asynchronous file operations however, one must make sure that the correct
+ * file I/O back-end is used, because not all file I/O back-end can be
+ * used with the ioqueue. Please see \ref PJ_FILE_IO for more details.
+ *
+ * The framework works natively in platforms where asynchronous operation API
+ * exists, such as in Windows NT with IoCompletionPort/IOCP. In other 
+ * platforms, the I/O queue abstracts the operating system's event poll API
+ * to provide semantics similar to IoCompletionPort with minimal penalties
+ * (i.e. per ioqueue and per handle mutex protection).
+ *
+ * The I/O queue provides more than just unified abstraction. It also:
+ *  - makes sure that the operation uses the most effective way to utilize
+ *    the underlying mechanism, to achieve the maximum theoritical
+ *    throughput possible on a given platform.
+ *  - choose the most efficient mechanism for event polling on a given
+ *    platform.
+ *
+ * Currently, the I/O Queue is implemented using:
+ *  - <tt><b>select()</b></tt>, as the common denominator, but the least 
+ *    efficient. Also the number of descriptor is limited to 
+ *    \c PJ_IOQUEUE_MAX_HANDLES (which by default is 64).
+ *  - <tt><b>/dev/epoll</b></tt> on Linux (user mode and kernel mode), 
+ *    a much faster replacement for select() on Linux (and more importantly
+ *    doesn't have limitation on number of descriptors).
+ *  - <b>I/O Completion ports</b> on Windows NT/2000/XP, which is the most 
+ *    efficient way to dispatch events in Windows NT based OSes, and most 
+ *    importantly, it doesn't have the limit on how many handles to monitor.
+ *    And it works with files (not only sockets) as well.
+ *
+ *
+ * \section pj_ioqueue_concurrency_sec Concurrency Rules
+ *
+ * The items below describe rules that must be obeyed when using the I/O 
+ * queue, with regard to concurrency:
+ *  - simultaneous operations (by different threads) to different key is safe.
+ *  - simultaneous operations to the same key is also safe, except
+ *    <b>unregistration</b>, which is described below.
+ *  - <b>care must be taken when unregistering a key</b> from the
+ *    ioqueue. Application must take care that when one thread is issuing
+ *    an unregistration, other thread is not simultaneously invoking an
+ *    operation <b>to the same key</b>.
+ *\n
+ *    This happens because the ioqueue functions are working with a pointer
+ *    to the key, and there is a possible race condition where the pointer
+ *    has been rendered invalid by other threads before the ioqueue has a
+ *    chance to acquire mutex on it.
+ *
+ * \section pj_ioqeuue_examples_sec Examples
+ *
+ * For some examples on how to use the I/O Queue, please see:
+ *
+ *  - \ref page_pjlib_ioqueue_tcp_test
+ *  - \ref page_pjlib_ioqueue_udp_test
+ *  - \ref page_pjlib_ioqueue_perf_test
+ */
+
+
+/**
+ * This structure describes operation specific key to be submitted to
+ * I/O Queue when performing the asynchronous operation. This key will
+ * be returned to the application when completion callback is called.
+ *
+ * Application normally wants to attach it's specific data in the
+ * \c user_data field so that it can keep track of which operation has
+ * completed when the callback is called. Alternatively, application can
+ * also extend this struct to include its data, because the pointer that
+ * is returned in the completion callback will be exactly the same as
+ * the pointer supplied when the asynchronous function is called.
+ */
+typedef struct pj_ioqueue_op_key_t
+{ 
+    void *internal__[32];           /**< Internal I/O Queue data.   */
+    void *user_data;                /**< Application data.          */
+} pj_ioqueue_op_key_t;
+
+/**
+ * This structure describes the callbacks to be called when I/O operation
+ * completes.
+ */
+typedef struct pj_ioqueue_callback
+{
+    /**
+     * This callback is called when #pj_ioqueue_recv or #pj_ioqueue_recvfrom
+     * completes.
+     *
+     * @param key	    The key.
+     * @param op_key        Operation key.
+     * @param bytes_read    >= 0 to indicate the amount of data read, 
+     *                      otherwise negative value containing the error
+     *                      code. To obtain the pj_status_t error code, use
+     *                      (pj_status_t code = -bytes_read).
+     */
+    void (*on_read_complete)(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read);
+
+    /**
+     * This callback is called when #pj_ioqueue_write or #pj_ioqueue_sendto
+     * completes.
+     *
+     * @param key	    The key.
+     * @param op_key        Operation key.
+     * @param bytes_sent    >= 0 to indicate the amount of data written, 
+     *                      otherwise negative value containing the error
+     *                      code. To obtain the pj_status_t error code, use
+     *                      (pj_status_t code = -bytes_sent).
+     */
+    void (*on_write_complete)(pj_ioqueue_key_t *key, 
+                              pj_ioqueue_op_key_t *op_key, 
+                              pj_ssize_t bytes_sent);
+
+    /**
+     * This callback is called when #pj_ioqueue_accept completes.
+     *
+     * @param key	    The key.
+     * @param op_key        Operation key.
+     * @param sock          Newly connected socket.
+     * @param status	    Zero if the operation completes successfully.
+     */
+    void (*on_accept_complete)(pj_ioqueue_key_t *key, 
+                               pj_ioqueue_op_key_t *op_key, 
+                               pj_sock_t sock, 
+                               pj_status_t status);
+
+    /**
+     * This callback is called when #pj_ioqueue_connect completes.
+     *
+     * @param key	    The key.
+     * @param status	    PJ_SUCCESS if the operation completes successfully.
+     */
+    void (*on_connect_complete)(pj_ioqueue_key_t *key, 
+                                pj_status_t status);
+} pj_ioqueue_callback;
+
+
+/**
+ * Types of pending I/O Queue operation. This enumeration is only used
+ * internally within the ioqueue.
+ */
+typedef enum pj_ioqueue_operation_e
+{
+    PJ_IOQUEUE_OP_NONE		= 0,	/**< No operation.          */
+    PJ_IOQUEUE_OP_READ		= 1,	/**< read() operation.      */
+    PJ_IOQUEUE_OP_RECV          = 2,    /**< recv() operation.      */
+    PJ_IOQUEUE_OP_RECV_FROM	= 4,	/**< recvfrom() operation.  */
+    PJ_IOQUEUE_OP_WRITE		= 8,	/**< write() operation.     */
+    PJ_IOQUEUE_OP_SEND          = 16,   /**< send() operation.      */
+    PJ_IOQUEUE_OP_SEND_TO	= 32,	/**< sendto() operation.    */
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP != 0
+    PJ_IOQUEUE_OP_ACCEPT	= 64,	/**< accept() operation.    */
+    PJ_IOQUEUE_OP_CONNECT	= 128	/**< connect() operation.   */
+#endif	/* PJ_HAS_TCP */
+} pj_ioqueue_operation_e;
+
+
+/**
+ * This macro specifies the maximum number of events that can be
+ * processed by the ioqueue on a single poll cycle, on implementation
+ * that supports it. The value is only meaningfull when specified
+ * during PJLIB build.
+ */
+#ifndef PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL
+#   define PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL     (16)
+#endif
+
+/**
+ * When this flag is specified in ioqueue's recv() or send() operations,
+ * the ioqueue will always mark the operation as asynchronous.
+ */
+#define PJ_IOQUEUE_ALWAYS_ASYNC	    ((pj_uint32_t)1 << (pj_uint32_t)31)
+
+/**
+ * Return the name of the ioqueue implementation.
+ *
+ * @return		Implementation name.
+ */
+PJ_DECL(const char*) pj_ioqueue_name(void);
+
+
+/**
+ * Create a new I/O Queue framework.
+ *
+ * @param pool		The pool to allocate the I/O queue structure. 
+ * @param max_fd	The maximum number of handles to be supported, which 
+ *			should not exceed PJ_IOQUEUE_MAX_HANDLES.
+ * @param ioqueue	Pointer to hold the newly created I/O Queue.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pj_ioqueue_create( pj_pool_t *pool, 
+					pj_size_t max_fd,
+					pj_ioqueue_t **ioqueue);
+
+/**
+ * Destroy the I/O queue.
+ *
+ * @param ioque	        The I/O Queue to be destroyed.
+ *
+ * @return              PJ_SUCCESS if success.
+ */
+PJ_DECL(pj_status_t) pj_ioqueue_destroy( pj_ioqueue_t *ioque );
+
+/**
+ * Set the lock object to be used by the I/O Queue. This function can only
+ * be called right after the I/O queue is created, before any handle is
+ * registered to the I/O queue.
+ *
+ * Initially the I/O queue is created with non-recursive mutex protection. 
+ * Applications can supply alternative lock to be used by calling this 
+ * function.
+ *
+ * @param ioque         The ioqueue instance.
+ * @param lock          The lock to be used by the ioqueue.
+ * @param auto_delete   In non-zero, the lock will be deleted by the ioqueue.
+ *
+ * @return              PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_ioqueue_set_lock( pj_ioqueue_t *ioque, 
+					  pj_lock_t *lock,
+					  pj_bool_t auto_delete );
+
+/**
+ * Register a socket to the I/O queue framework. 
+ * When a socket is registered to the IOQueue, it may be modified to use
+ * non-blocking IO. If it is modified, there is no guarantee that this 
+ * modification will be restored after the socket is unregistered.
+ *
+ * @param pool	    To allocate the resource for the specified handle, 
+ *		    which must be valid until the handle/key is unregistered 
+ *		    from I/O Queue.
+ * @param ioque	    The I/O Queue.
+ * @param sock	    The socket.
+ * @param user_data User data to be associated with the key, which can be
+ *		    retrieved later.
+ * @param cb	    Callback to be called when I/O operation completes. 
+ * @param key       Pointer to receive the key to be associated with this
+ *                  socket. Subsequent I/O queue operation will need this
+ *                  key.
+ *
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_ioqueue_register_sock( pj_pool_t *pool,
+					       pj_ioqueue_t *ioque,
+					       pj_sock_t sock,
+					       void *user_data,
+					       const pj_ioqueue_callback *cb,
+                                               pj_ioqueue_key_t **key );
+
+/**
+ * Unregister from the I/O Queue framework. Caller must make sure that
+ * the key doesn't have any pending operations before calling this function,
+ * by calling #pj_ioqueue_is_pending() for all previously submitted
+ * operations except asynchronous connect, and if necessary call
+ * #pj_ioqueue_post_completion() to cancel the pending operations.
+ *
+ * Note that asynchronous connect operation will automatically be 
+ * cancelled during the unregistration.
+ *
+ * Also note that when I/O Completion Port backend is used, application
+ * MUST close the handle immediately after unregistering the key. This is
+ * because there is no unregistering API for IOCP. The only way to
+ * unregister the handle from IOCP is to close the handle.
+ *
+ * @param key	    The key that was previously obtained from registration.
+ *
+ * @return          PJ_SUCCESS on success or the error code.
+ *
+ * @see pj_ioqueue_is_pending
+ */
+PJ_DECL(pj_status_t) pj_ioqueue_unregister( pj_ioqueue_key_t *key );
+
+
+/**
+ * Get user data associated with an ioqueue key.
+ *
+ * @param key	    The key that was previously obtained from registration.
+ *
+ * @return          The user data associated with the descriptor, or NULL 
+ *                  on error or if no data is associated with the key during
+ *                  registration.
+ */
+PJ_DECL(void*) pj_ioqueue_get_user_data( pj_ioqueue_key_t *key );
+
+/**
+ * Set or change the user data to be associated with the file descriptor or
+ * handle or socket descriptor.
+ *
+ * @param key	    The key that was previously obtained from registration.
+ * @param user_data User data to be associated with the descriptor.
+ * @param old_data  Optional parameter to retrieve the old user data.
+ *
+ * @return          PJ_SUCCESS on success or the error code.
+ */
+PJ_DECL(pj_status_t) pj_ioqueue_set_user_data( pj_ioqueue_key_t *key,
+                                               void *user_data,
+                                               void **old_data);
+
+
+/**
+ * Initialize operation key.
+ *
+ * @param op_key    The operation key to be initialied.
+ * @param size	    The size of the operation key.
+ */
+PJ_DECL(void) pj_ioqueue_op_key_init( pj_ioqueue_op_key_t *op_key,
+				      pj_size_t size );
+
+/**
+ * Check if operation is pending on the specified operation key.
+ * The \c op_key must have been initialized with #pj_ioqueue_op_key_init() 
+ * or submitted as pending operation before, or otherwise the result 
+ * is undefined.
+ *
+ * @param key       The key.
+ * @param op_key    The operation key, previously submitted to any of
+ *                  the I/O functions and has returned PJ_EPENDING.
+ *
+ * @return          Non-zero if operation is still pending.
+ */
+PJ_DECL(pj_bool_t) pj_ioqueue_is_pending( pj_ioqueue_key_t *key,
+                                          pj_ioqueue_op_key_t *op_key );
+
+
+/**
+ * Post completion status to the specified operation key and call the
+ * appropriate callback. When the callback is called, the number of bytes 
+ * received in read/write callback or the status in accept/connect callback
+ * will be set from the \c bytes_status parameter.
+ *
+ * @param key           The key.
+ * @param op_key        Pending operation key.
+ * @param bytes_status  Number of bytes or status to be set. A good value
+ *                      to put here is -PJ_ECANCELLED.
+ *
+ * @return              PJ_SUCCESS if completion status has been successfully
+ *                      sent.
+ */
+PJ_DECL(pj_status_t) pj_ioqueue_post_completion( pj_ioqueue_key_t *key,
+                                                 pj_ioqueue_op_key_t *op_key,
+                                                 pj_ssize_t bytes_status );
+
+
+
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP != 0
+/**
+ * Instruct I/O Queue to accept incoming connection on the specified 
+ * listening socket. This function will return immediately (i.e. non-blocking)
+ * regardless whether a connection is immediately available. If the function
+ * can't complete immediately, the caller will be notified about the incoming
+ * connection when it calls pj_ioqueue_poll(). If a new connection is
+ * immediately available, the function returns PJ_SUCCESS with the new
+ * connection; in this case, the callback WILL NOT be called.
+ *
+ * @param key	    The key which registered to the server socket.
+ * @param op_key    An operation specific key to be associated with the
+ *                  pending operation, so that application can keep track of
+ *                  which operation has been completed when the callback is
+ *                  called.
+ * @param new_sock  Argument which contain pointer to receive the new socket
+ *                  for the incoming connection.
+ * @param local	    Optional argument which contain pointer to variable to 
+ *                  receive local address.
+ * @param remote    Optional argument which contain pointer to variable to 
+ *                  receive the remote address.
+ * @param addrlen   On input, contains the length of the buffer for the
+ *		    address, and on output, contains the actual length of the
+ *		    address. This argument is optional.
+ * @return
+ *  - PJ_SUCCESS    When connection is available immediately, and the 
+ *                  parameters will be updated to contain information about 
+ *                  the new connection. In this case, a completion callback
+ *                  WILL NOT be called.
+ *  - PJ_EPENDING   If no connection is available immediately. When a new
+ *                  connection arrives, the callback will be called.
+ *  - non-zero      which indicates the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_ioqueue_accept( pj_ioqueue_key_t *key,
+                                        pj_ioqueue_op_key_t *op_key,
+					pj_sock_t *new_sock,
+					pj_sockaddr_t *local,
+					pj_sockaddr_t *remote,
+					int *addrlen );
+
+/**
+ * Initiate non-blocking socket connect. If the socket can NOT be connected
+ * immediately, asynchronous connect() will be scheduled and caller will be
+ * notified via completion callback when it calls pj_ioqueue_poll(). If
+ * socket is connected immediately, the function returns PJ_SUCCESS and
+ * completion callback WILL NOT be called.
+ *
+ * @param key	    The key associated with TCP socket
+ * @param addr	    The remote address.
+ * @param addrlen   The remote address length.
+ *
+ * @return
+ *  - PJ_SUCCESS    If socket is connected immediately. In this case, the
+ *                  completion callback WILL NOT be called.
+ *  - PJ_EPENDING   If operation is queued, or 
+ *  - non-zero      Indicates the error code.
+ */
+PJ_DECL(pj_status_t) pj_ioqueue_connect( pj_ioqueue_key_t *key,
+					 const pj_sockaddr_t *addr,
+					 int addrlen );
+
+#endif	/* PJ_HAS_TCP */
+
+/**
+ * Poll the I/O Queue for completed events.
+ *
+ * @param ioque		the I/O Queue.
+ * @param timeout	polling timeout, or NULL if the thread wishes to wait
+ *			indefinetely for the event.
+ *
+ * @return 
+ *  - zero if timed out (no event).
+ *  - (<0) if error occured during polling. Callback will NOT be called.
+ *  - (>1) to indicate numbers of events. Callbacks have been called.
+ */
+PJ_DECL(int) pj_ioqueue_poll( pj_ioqueue_t *ioque,
+			      const pj_time_val *timeout);
+
+
+/**
+ * Instruct the I/O Queue to read from the specified handle. This function
+ * returns immediately (i.e. non-blocking) regardless whether some data has 
+ * been transfered. If the operation can't complete immediately, caller will 
+ * be notified about the completion when it calls pj_ioqueue_poll(). If data
+ * is immediately available, the function will return PJ_SUCCESS and the
+ * callback WILL NOT be called.
+ *
+ * @param key	    The key that uniquely identifies the handle.
+ * @param op_key    An operation specific key to be associated with the
+ *                  pending operation, so that application can keep track of
+ *                  which operation has been completed when the callback is
+ *                  called. Caller must make sure that this key remains 
+ *                  valid until the function completes.
+ * @param buffer    The buffer to hold the read data. The caller MUST make sure
+ *		    that this buffer remain valid until the framework completes
+ *		    reading the handle.
+ * @param length    On input, it specifies the size of the buffer. If data is
+ *                  available to be read immediately, the function returns
+ *                  PJ_SUCCESS and this argument will be filled with the
+ *                  amount of data read. If the function is pending, caller
+ *                  will be notified about the amount of data read in the
+ *                  callback. This parameter can point to local variable in
+ *                  caller's stack and doesn't have to remain valid for the
+ *                  duration of pending operation.
+ * @param flags     Recv flag. If flags has PJ_IOQUEUE_ALWAYS_ASYNC then
+ *		    the function will never return PJ_SUCCESS.
+ *
+ * @return
+ *  - PJ_SUCCESS    If immediate data has been received in the buffer. In this
+ *                  case, the callback WILL NOT be called.
+ *  - PJ_EPENDING   If the operation has been queued, and the callback will be
+ *                  called when data has been received.
+ *  - non-zero      The return value indicates the error code.
+ */
+PJ_DECL(pj_status_t) pj_ioqueue_recv( pj_ioqueue_key_t *key,
+                                      pj_ioqueue_op_key_t *op_key,
+				      void *buffer,
+				      pj_ssize_t *length,
+				      pj_uint32_t flags );
+
+/**
+ * This function behaves similarly as #pj_ioqueue_recv(), except that it is
+ * normally called for socket, and the remote address will also be returned
+ * along with the data. Caller MUST make sure that both buffer and addr
+ * remain valid until the framework completes reading the data.
+ *
+ * @param key	    The key that uniquely identifies the handle.
+ * @param op_key    An operation specific key to be associated with the
+ *                  pending operation, so that application can keep track of
+ *                  which operation has been completed when the callback is
+ *                  called.
+ * @param buffer    The buffer to hold the read data. The caller MUST make sure
+ *		    that this buffer remain valid until the framework completes
+ *		    reading the handle.
+ * @param length    On input, it specifies the size of the buffer. If data is
+ *                  available to be read immediately, the function returns
+ *                  PJ_SUCCESS and this argument will be filled with the
+ *                  amount of data read. If the function is pending, caller
+ *                  will be notified about the amount of data read in the
+ *                  callback. This parameter can point to local variable in
+ *                  caller's stack and doesn't have to remain valid for the
+ *                  duration of pending operation.
+ * @param flags     Recv flag. If flags has PJ_IOQUEUE_ALWAYS_ASYNC then
+ *		    the function will never return PJ_SUCCESS.
+ * @param addr      Optional Pointer to buffer to receive the address.
+ * @param addrlen   On input, specifies the length of the address buffer.
+ *                  On output, it will be filled with the actual length of
+ *                  the address. This argument can be NULL if \c addr is not
+ *                  specified.
+ *
+ * @return
+ *  - PJ_SUCCESS    If immediate data has been received. In this case, the 
+ *		    callback must have been called before this function 
+ *		    returns, and no pending operation is scheduled.
+ *  - PJ_EPENDING   If the operation has been queued.
+ *  - non-zero      The return value indicates the error code.
+ */
+PJ_DECL(pj_status_t) pj_ioqueue_recvfrom( pj_ioqueue_key_t *key,
+                                          pj_ioqueue_op_key_t *op_key,
+					  void *buffer,
+					  pj_ssize_t *length,
+                                          pj_uint32_t flags,
+					  pj_sockaddr_t *addr,
+					  int *addrlen);
+
+/**
+ * Instruct the I/O Queue to write to the handle. This function will return
+ * immediately (i.e. non-blocking) regardless whether some data has been 
+ * transfered. If the function can't complete immediately, the caller will
+ * be notified about the completion when it calls pj_ioqueue_poll(). If 
+ * operation completes immediately and data has been transfered, the function
+ * returns PJ_SUCCESS and the callback will NOT be called.
+ *
+ * @param key	    The key that identifies the handle.
+ * @param op_key    An operation specific key to be associated with the
+ *                  pending operation, so that application can keep track of
+ *                  which operation has been completed when the callback is
+ *                  called.
+ * @param data	    The data to send. Caller MUST make sure that this buffer 
+ *		    remains valid until the write operation completes.
+ * @param length    On input, it specifies the length of data to send. When
+ *                  data was sent immediately, this function returns PJ_SUCCESS
+ *                  and this parameter contains the length of data sent. If
+ *                  data can not be sent immediately, an asynchronous operation
+ *                  is scheduled and caller will be notified via callback the
+ *                  number of bytes sent. This parameter can point to local 
+ *                  variable on caller's stack and doesn't have to remain 
+ *                  valid until the operation has completed.
+ * @param flags     Send flags. If flags has PJ_IOQUEUE_ALWAYS_ASYNC then
+ *		    the function will never return PJ_SUCCESS.
+ *
+ * @return
+ *  - PJ_SUCCESS    If data was immediately transfered. In this case, no
+ *                  pending operation has been scheduled and the callback
+ *                  WILL NOT be called.
+ *  - PJ_EPENDING   If the operation has been queued. Once data base been
+ *                  transfered, the callback will be called.
+ *  - non-zero      The return value indicates the error code.
+ */
+PJ_DECL(pj_status_t) pj_ioqueue_send( pj_ioqueue_key_t *key,
+                                      pj_ioqueue_op_key_t *op_key,
+				      const void *data,
+				      pj_ssize_t *length,
+				      pj_uint32_t flags );
+
+
+/**
+ * Instruct the I/O Queue to write to the handle. This function will return
+ * immediately (i.e. non-blocking) regardless whether some data has been 
+ * transfered. If the function can't complete immediately, the caller will
+ * be notified about the completion when it calls pj_ioqueue_poll(). If 
+ * operation completes immediately and data has been transfered, the function
+ * returns PJ_SUCCESS and the callback will NOT be called.
+ *
+ * @param key	    the key that identifies the handle.
+ * @param op_key    An operation specific key to be associated with the
+ *                  pending operation, so that application can keep track of
+ *                  which operation has been completed when the callback is
+ *                  called.
+ * @param data	    the data to send. Caller MUST make sure that this buffer 
+ *		    remains valid until the write operation completes.
+ * @param length    On input, it specifies the length of data to send. When
+ *                  data was sent immediately, this function returns PJ_SUCCESS
+ *                  and this parameter contains the length of data sent. If
+ *                  data can not be sent immediately, an asynchronous operation
+ *                  is scheduled and caller will be notified via callback the
+ *                  number of bytes sent. This parameter can point to local 
+ *                  variable on caller's stack and doesn't have to remain 
+ *                  valid until the operation has completed.
+ * @param flags     send flags. If flags has PJ_IOQUEUE_ALWAYS_ASYNC then
+ *		    the function will never return PJ_SUCCESS.
+ * @param addr      Optional remote address.
+ * @param addrlen   Remote address length, \c addr is specified.
+ *
+ * @return
+ *  - PJ_SUCCESS    If data was immediately written.
+ *  - PJ_EPENDING   If the operation has been queued.
+ *  - non-zero      The return value indicates the error code.
+ */
+PJ_DECL(pj_status_t) pj_ioqueue_sendto( pj_ioqueue_key_t *key,
+                                        pj_ioqueue_op_key_t *op_key,
+					const void *data,
+					pj_ssize_t *length,
+                                        pj_uint32_t flags,
+					const pj_sockaddr_t *addr,
+					int addrlen);
+
+
+/**
+ * !}
+ */
+
+PJ_END_DECL
+
+#endif	/* __PJ_IOQUEUE_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/ip_helper.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/ip_helper.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/ip_helper.h	(revision 1163)
@@ -0,0 +1,88 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_IP_ROUTE_H__
+#define __PJ_IP_ROUTE_H__
+
+/**
+ * @file ip_helper.h
+ * @brief IP helper API
+ */
+
+#include <pj/sock.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup pj_ip_helper IP Interface and Routing Helper
+ * @ingroup PJ_IO
+ * @{
+ *
+ * This module provides functions to query local host's IP interface and 
+ * routing table.
+ */
+
+/**
+ * This structure describes IP routing entry.
+ */
+typedef union pj_ip_route_entry
+{
+    /** IP routing entry for IP version 4 routing */
+    struct
+    {
+	pj_in_addr	if_addr;    /**< Local interface IP address.	*/
+	pj_in_addr	dst_addr;   /**< Destination IP address.	*/
+	pj_in_addr	mask;	    /**< Destination mask.		*/
+    } ipv4;
+} pj_ip_route_entry;
+
+
+/**
+ * Enumerate the local IP interface currently active in the host.
+ *
+ * @param count	    On input, specify the number of entries. On output,
+ *		    it will be filled with the actual number of entries.
+ * @param ifs	    Array of IP addresses.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_enum_ip_interface(unsigned *count,
+					  pj_in_addr ifs[]);
+
+
+/**
+ * Enumerate the IP routing table for this host.
+ *
+ * @param count	    On input, specify the number of routes entries. On output,
+ *		    it will be filled with the actual number of route entries.
+ * @param routes    Array of IP routing entries.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_enum_ip_route(unsigned *count,
+				      pj_ip_route_entry routes[]);
+
+
+
+/** @} */
+
+PJ_END_DECL
+
+
+#endif	/* __PJ_IP_ROUTE_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/list.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/list.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/list.h	(revision 1163)
@@ -0,0 +1,273 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_LIST_H__
+#define __PJ_LIST_H__
+
+/**
+ * @file list.h
+ * @brief Linked List data structure.
+ */
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/*
+ * @defgroup PJ_DS Data Structure.
+ * @ingroup PJ
+ */
+
+/**
+ * @defgroup PJ_LIST Linked List
+ * @ingroup PJ_DS
+ * @{
+ *
+ * List in PJLIB is implemented as doubly-linked list, and it won't require
+ * dynamic memory allocation (just as all PJLIB data structures). The list here
+ * should be viewed more like a low level C list instead of high level C++ list
+ * (which normally are easier to use but require dynamic memory allocations),
+ * therefore all caveats with C list apply here too (such as you can NOT put
+ * a node in more than one lists).
+ *
+ * \section pj_list_example_sec Examples
+ *
+ * See below for examples on how to manipulate linked list:
+ *  - @ref page_pjlib_samples_list_c
+ *  - @ref page_pjlib_list_test
+ */
+
+
+/**
+ * Use this macro in the start of the structure declaration to declare that
+ * the structure can be used in the linked list operation. This macro simply
+ * declares additional member @a prev and @a next to the structure.
+ * @hideinitializer
+ */
+#define PJ_DECL_LIST_MEMBER(type)                       \
+                                   /** List @a prev. */ \
+                                   type *prev;          \
+                                   /** List @a next. */ \
+                                   type *next 
+
+
+/**
+ * This structure describes generic list node and list. The owner of this list
+ * must initialize the 'value' member to an appropriate value (typically the
+ * owner itself).
+ */
+struct pj_list
+{
+    PJ_DECL_LIST_MEMBER(void);
+};
+
+
+/**
+ * Initialize the list.
+ * Initially, the list will have no member, and function pj_list_empty() will
+ * always return nonzero (which indicates TRUE) for the newly initialized 
+ * list.
+ *
+ * @param node The list head.
+ */
+PJ_INLINE(void) pj_list_init(pj_list_type * node)
+{
+    ((pj_list*)node)->next = ((pj_list*)node)->prev = node;
+}
+
+
+/**
+ * Check that the list is empty.
+ *
+ * @param node	The list head.
+ *
+ * @return Non-zero if the list is not-empty, or zero if it is empty.
+ *
+ */
+PJ_INLINE(int) pj_list_empty(const pj_list_type * node)
+{
+    return ((pj_list*)node)->next == node;
+}
+
+
+/**
+ * Insert the node to the list before the specified element position.
+ *
+ * @param pos	The element to which the node will be inserted before. 
+ * @param node	The element to be inserted.
+ *
+ * @return void.
+ */
+PJ_IDECL(void)	pj_list_insert_before(pj_list_type *pos, pj_list_type *node);
+
+
+/**
+ * Insert the node to the back of the list. This is just an alias for
+ * #pj_list_insert_before().
+ *
+ * @param list	The list. 
+ * @param node	The element to be inserted.
+ */
+PJ_INLINE(void) pj_list_push_back(pj_list_type *list, pj_list_type *node)
+{
+    pj_list_insert_before(list, node);
+}
+
+
+/**
+ * Inserts all nodes in \a nodes to the target list.
+ *
+ * @param lst	    The target list.
+ * @param nodes	    Nodes list.
+ */
+PJ_IDECL(void) pj_list_insert_nodes_before(pj_list_type *lst,
+					   pj_list_type *nodes);
+
+/**
+ * Insert a node to the list after the specified element position.
+ *
+ * @param pos	    The element in the list which will precede the inserted 
+ *		    element.
+ * @param node	    The element to be inserted after the position element.
+ *
+ * @return void.
+ */
+PJ_IDECL(void) pj_list_insert_after(pj_list_type *pos, pj_list_type *node);
+
+
+/**
+ * Insert the node to the front of the list. This is just an alias for
+ * #pj_list_insert_after().
+ *
+ * @param list	The list. 
+ * @param node	The element to be inserted.
+ */
+PJ_INLINE(void) pj_list_push_front(pj_list_type *list, pj_list_type *node)
+{
+    pj_list_insert_after(list, node);
+}
+
+
+/**
+ * Insert all nodes in \a nodes to the target list.
+ *
+ * @param lst	    The target list.
+ * @param nodes	    Nodes list.
+ */
+PJ_IDECL(void) pj_list_insert_nodes_after(pj_list_type *lst,
+					  pj_list_type *nodes);
+
+
+/**
+ * Remove elements from the source list, and insert them to the destination
+ * list. The elements of the source list will occupy the
+ * front elements of the target list. Note that the node pointed by \a list2
+ * itself is not considered as a node, but rather as the list descriptor, so
+ * it will not be inserted to the \a list1. The elements to be inserted starts
+ * at \a list2->next. If \a list2 is to be included in the operation, use
+ * \a pj_list_insert_nodes_before.
+ *
+ * @param list1	The destination list.
+ * @param list2	The source list.
+ *
+ * @return void.
+ */
+PJ_IDECL(void) pj_list_merge_first(pj_list_type *list1, pj_list_type *list2);
+
+
+/**
+ * Remove elements from the second list argument, and insert them to the list 
+ * in the first argument. The elements from the second list will be appended
+ * to the first list. Note that the node pointed by \a list2
+ * itself is not considered as a node, but rather as the list descriptor, so
+ * it will not be inserted to the \a list1. The elements to be inserted starts
+ * at \a list2->next. If \a list2 is to be included in the operation, use
+ * \a pj_list_insert_nodes_before.
+ *
+ * @param list1	    The element in the list which will precede the inserted 
+ *		    element.
+ * @param list2	    The element in the list to be inserted.
+ *
+ * @return void.
+ */
+PJ_IDECL(void) pj_list_merge_last( pj_list_type *list1, pj_list_type *list2);
+
+
+/**
+ * Erase the node from the list it currently belongs.
+ *
+ * @param node	    The element to be erased.
+ */
+PJ_IDECL(void) pj_list_erase(pj_list_type *node);
+
+
+/**
+ * Find node in the list.
+ *
+ * @param list	    The list head.
+ * @param node	    The node element to be searched.
+ *
+ * @return The node itself if it is found in the list, or NULL if it is not 
+ *         found in the list.
+ */
+PJ_IDECL(pj_list_type*) pj_list_find_node(pj_list_type *list, 
+					  pj_list_type *node);
+
+
+/**
+ * Search the list for the specified value, using the specified comparison
+ * function. This function iterates on nodes in the list, started with the
+ * first node, and call the user supplied comparison function until the
+ * comparison function returns ZERO.
+ *
+ * @param list	    The list head.
+ * @param value	    The user defined value to be passed in the comparison 
+ *		    function
+ * @param comp	    The comparison function, which should return ZERO to 
+ *		    indicate that the searched value is found.
+ *
+ * @return The first node that matched, or NULL if it is not found.
+ */
+PJ_IDECL(pj_list_type*) pj_list_search(pj_list_type *list, void *value,
+				       int (*comp)(void *value, 
+						   const pj_list_type *node)
+				       );
+
+
+/**
+ * Traverse the list to get the number of elements in the list.
+ *
+ * @param list	    The list head.
+ *
+ * @return	    Number of elements.
+ */
+PJ_IDECL(pj_size_t) pj_list_size(pj_list_type *list);
+
+
+/**
+ * @}
+ */
+
+#if PJ_FUNCTIONS_ARE_INLINED
+#  include "list_i.h"
+#endif
+
+PJ_END_DECL
+
+#endif	/* __PJ_LIST_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/list_i.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/list_i.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/list_i.h	(revision 1163)
@@ -0,0 +1,136 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 
+ */
+
+
+/* Internal */
+PJ_IDEF(void) pj_link_node(pj_list_type *prev, pj_list_type *next)
+{
+    ((pj_list*)prev)->next = next;
+    ((pj_list*)next)->prev = prev;
+}
+
+/*
+PJ_IDEF(void) 
+pj_list_init(pj_list_type * node)
+{
+    ((pj_list*)node)->next = ((pj_list*)node)->prev = node;
+}
+
+PJ_IDEF(int) pj_list_empty(const pj_list_type * node)
+{
+    return ((pj_list*)node)->next == node;
+}
+*/
+
+PJ_IDEF(void) 
+pj_list_insert_after(pj_list_type *pos, pj_list_type *node)
+{
+    ((pj_list*)node)->prev = pos;
+    ((pj_list*)node)->next = ((pj_list*)pos)->next;
+    ((pj_list*) ((pj_list*)pos)->next) ->prev = node;
+    ((pj_list*)pos)->next = node;
+}
+
+
+PJ_IDEF(void) 
+pj_list_insert_before(pj_list_type *pos, pj_list_type *node)
+{
+    pj_list_insert_after(((pj_list*)pos)->prev, node);
+}
+
+
+PJ_IDEF(void)	    
+pj_list_insert_nodes_after(pj_list_type *pos, pj_list_type *lst)
+{
+    pj_list *lst_last = (pj_list *) ((pj_list*)lst)->prev;
+    pj_list *pos_next = (pj_list *) ((pj_list*)pos)->next;
+
+    pj_link_node(pos, lst);
+    pj_link_node(lst_last, pos_next);
+}
+
+PJ_IDEF(void) 
+pj_list_insert_nodes_before(pj_list_type *pos, pj_list_type *lst)
+{
+    pj_list_insert_nodes_after(((pj_list*)pos)->prev, lst);
+}
+
+PJ_IDEF(void)
+pj_list_merge_last(pj_list_type *lst1, pj_list_type *lst2)
+{
+    if (!pj_list_empty(lst2)) {
+	pj_link_node(((pj_list*)lst1)->prev, ((pj_list*)lst2)->next);
+	pj_link_node(((pj_list*)lst2)->prev, lst1);
+	pj_list_init(lst2);
+    }
+}
+
+PJ_IDEF(void)
+pj_list_merge_first(pj_list_type *lst1, pj_list_type *lst2)
+{
+    if (!pj_list_empty(lst2)) {
+	pj_link_node(((pj_list*)lst2)->prev, ((pj_list*)lst1)->next);
+	pj_link_node(((pj_list*)lst1), ((pj_list*)lst2)->next);
+	pj_list_init(lst2);
+    }
+}
+
+PJ_IDEF(void) 
+pj_list_erase(pj_list_type *node)
+{
+    pj_link_node( ((pj_list*)node)->prev, ((pj_list*)node)->next);
+}
+
+
+PJ_IDEF(pj_list_type*) 
+pj_list_find_node(pj_list_type *list, pj_list_type *node)
+{
+    pj_list *p = (pj_list *) ((pj_list*)list)->next;
+    while (p != list && p != node)
+	p = (pj_list *) p->next;
+
+    return p==node ? p : NULL;
+}
+
+
+PJ_IDEF(pj_list_type*) 
+pj_list_search(pj_list_type *list, void *value,
+	       int (*comp)(void *value, const pj_list_type *node))
+{
+    pj_list *p = (pj_list *) ((pj_list*)list)->next;
+    while (p != list && (*comp)(value, p) != 0)
+	p = (pj_list *) p->next;
+
+    return p==list ? NULL : p;
+}
+
+
+PJ_IDEF(pj_size_t) pj_list_size(pj_list_type *list)
+{
+    pj_list *node = (pj_list*) ((pj_list*)list)->next;
+    pj_size_t count = 0;
+
+    while (node != list) {
+	++count;
+	node = node->next;
+    }
+
+    return count;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/lock.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/lock.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/lock.h	(revision 1163)
@@ -0,0 +1,153 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_LOCK_H__
+#define __PJ_LOCK_H__
+
+/**
+ * @file lock.h
+ * @brief Higher abstraction for locking objects.
+ */
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_LOCK Lock Objects
+ * @ingroup PJ_OS
+ * @{
+ *
+ * <b>Lock Objects</b> are higher abstraction for different lock mechanisms.
+ * It offers the same API for manipulating different lock types (e.g.
+ * @ref PJ_MUTEX "mutex", @ref PJ_SEM "semaphores", or null locks).
+ * Because Lock Objects have the same API for different types of lock
+ * implementation, it can be passed around in function arguments. As the
+ * result, it can be used to control locking policy for  a particular
+ * feature.
+ */
+
+
+/**
+ * Create simple, non recursive mutex lock object.
+ *
+ * @param pool	    Memory pool.
+ * @param name	    Lock object's name.
+ * @param lock	    Pointer to store the returned handle.
+ *
+ * @return	    PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_lock_create_simple_mutex( pj_pool_t *pool,
+						  const char *name,
+						  pj_lock_t **lock );
+
+/**
+ * Create recursive mutex lock object.
+ *
+ * @param pool	    Memory pool.
+ * @param name	    Lock object's name.
+ * @param lock	    Pointer to store the returned handle.
+ *
+ * @return	    PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_lock_create_recursive_mutex( pj_pool_t *pool,
+						     const char *name,
+						     pj_lock_t **lock );
+
+
+/**
+ * Create NULL mutex. A NULL mutex doesn't actually have any synchronization
+ * object attached to it.
+ *
+ * @param pool	    Memory pool.
+ * @param name	    Lock object's name.
+ * @param lock	    Pointer to store the returned handle.
+ *
+ * @return	    PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_lock_create_null_mutex( pj_pool_t *pool,
+						const char *name,
+						pj_lock_t **lock );
+
+
+#if defined(PJ_HAS_SEMAPHORE) && PJ_HAS_SEMAPHORE != 0
+/**
+ * Create semaphore lock object.
+ *
+ * @param pool	    Memory pool.
+ * @param name	    Lock object's name.
+ * @param initial   Initial value of the semaphore.
+ * @param max	    Maximum value of the semaphore.
+ * @param lock	    Pointer to store the returned handle.
+ *
+ * @return	    PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_lock_create_semaphore( pj_pool_t *pool,
+					       const char *name,
+					       unsigned initial,
+					       unsigned max,
+					       pj_lock_t **lock );
+
+#endif	/* PJ_HAS_SEMAPHORE */
+
+/**
+ * Acquire lock on the specified lock object.
+ *
+ * @param lock	    The lock object.
+ *
+ * @return	    PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_lock_acquire( pj_lock_t *lock );
+
+
+/**
+ * Try to acquire lock on the specified lock object.
+ *
+ * @param lock	    The lock object.
+ *
+ * @return	    PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_lock_tryacquire( pj_lock_t *lock );
+
+
+/**
+ * Release lock on the specified lock object.
+ *
+ * @param lock	    The lock object.
+ *
+ * @return	    PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_lock_release( pj_lock_t *lock );
+
+
+/**
+ * Destroy the lock object.
+ *
+ * @param lock	    The lock object.
+ *
+ * @return	    PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_lock_destroy( pj_lock_t *lock );
+
+
+/** @} */
+
+PJ_END_DECL
+
+
+#endif	/* __PJ_LOCK_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/log.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/log.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/log.h	(revision 1163)
@@ -0,0 +1,356 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_LOG_H__
+#define __PJ_LOG_H__
+
+/**
+ * @file log.h
+ * @brief Logging Utility.
+ */
+
+#include <pj/types.h>
+#include <stdarg.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_MISC Miscelaneous
+ * @ingroup PJ
+ */
+
+/**
+ * @defgroup PJ_LOG Logging Facility
+ * @ingroup PJ_MISC
+ * @{
+ *
+ * The PJLIB logging facility is a configurable, flexible, and convenient
+ * way to write logging or trace information.
+ *
+ * To write to the log, one uses construct like below:
+ *
+ * <pre>
+ *   ...
+ *   PJ_LOG(3, ("main.c", "Starting hello..."));
+ *   ...
+ *   PJ_LOG(3, ("main.c", "Hello world from process %d", pj_getpid()));
+ *   ...
+ * </pre>
+ *
+ * In the above example, the number @b 3 controls the verbosity level of
+ * the information (which means "information", by convention). The string
+ * "main.c" specifies the source or sender of the message.
+ *
+ *
+ * \section pj_log_quick_sample_sec Examples
+ *
+ * For examples, see:
+ *  - @ref page_pjlib_samples_log_c.
+ *
+ */
+
+/**
+ * Log decoration flag, to be specified with #pj_log_set_decor().
+ */
+enum pj_log_decoration
+{
+    PJ_LOG_HAS_DAY_NAME   =   1, /**< Include day name [default: no].	     */
+    PJ_LOG_HAS_YEAR       =   2, /**< Include year digit [default: no]	     */
+    PJ_LOG_HAS_MONTH	  =   4, /**< Include month [default: no]	     */
+    PJ_LOG_HAS_DAY_OF_MON =   8, /**< Include day of month [default: no]     */
+    PJ_LOG_HAS_TIME	  =  16, /**< Include time [default: yes].	     */
+    PJ_LOG_HAS_MICRO_SEC  =  32, /**< Include microseconds [yes]             */
+    PJ_LOG_HAS_SENDER	  =  64, /**< Include sender in the log [yes].	     */
+    PJ_LOG_HAS_NEWLINE	  = 128, /**< Terminate each call with newline [yes].*/
+    PJ_LOG_HAS_CR	  = 256  /**< Include carriage return [no].	     */
+};
+
+/**
+ * Write log message.
+ * This is the main macro used to write text to the logging backend. 
+ *
+ * @param level	    The logging verbosity level. Lower number indicates higher
+ *		    importance, with level zero indicates fatal error. Only
+ *		    numeral argument is permitted (e.g. not variable).
+ * @param arg	    Enclosed 'printf' like arguments, with the first 
+ *		    argument is the sender, the second argument is format 
+ *		    string and the following arguments are variable number of 
+ *		    arguments suitable for the format string.
+ *
+ * Sample:
+ * \verbatim
+   PJ_LOG(2, (__FILE__, "current value is %d", value));
+   \endverbatim
+ * @hideinitializer
+ */
+#define PJ_LOG(level,arg)	do { \
+				    if (level <= pj_log_get_level()) \
+					pj_log_wrapper_##level(arg); \
+				} while (0)
+
+/**
+ * Signature for function to be registered to the logging subsystem to
+ * write the actual log message to some output device.
+ *
+ * @param level	    Log level.
+ * @param data	    Log message.
+ * @param len	    Message length.
+ */
+typedef void pj_log_func(int level, const char *data, int len);
+
+/**
+ * Default logging writer function used by front end logger function.
+ * This function will print the log message to stdout only.
+ * Application normally should NOT need to call this function, but
+ * rather use the PJ_LOG macro.
+ *
+ * @param level	    Log level.
+ * @param buffer    Log message.
+ * @param len	    Message length.
+ */
+PJ_DECL(void) pj_log_write(int level, const char *buffer, int len);
+
+
+#if PJ_LOG_MAX_LEVEL >= 1
+
+/**
+ * Write to log.
+ *
+ * @param sender    Source of the message.
+ * @param level	    Verbosity level.
+ * @param format    Format.
+ * @param marker    Marker.
+ */
+PJ_DECL(void) pj_log(const char *sender, int level, 
+		     const char *format, va_list marker);
+
+/**
+ * Change log output function. The front-end logging functions will call
+ * this function to write the actual message to the desired device. 
+ * By default, the front-end functions use pj_log_write() to write
+ * the messages, unless it's changed by calling this function.
+ *
+ * @param func	    The function that will be called to write the log
+ *		    messages to the desired device.
+ */
+PJ_DECL(void) pj_log_set_log_func( pj_log_func *func );
+
+/**
+ * Get the current log output function that is used to write log messages.
+ *
+ * @return	    Current log output function.
+ */
+PJ_DECL(pj_log_func*) pj_log_get_log_func(void);
+
+/**
+ * Set maximum log level. Application can call this function to set 
+ * the desired level of verbosity of the logging messages. The bigger the
+ * value, the more verbose the logging messages will be printed. However,
+ * the maximum level of verbosity can not exceed compile time value of
+ * PJ_LOG_MAX_LEVEL.
+ *
+ * @param level	    The maximum level of verbosity of the logging
+ *		    messages (6=very detailed..1=error only, 0=disabled)
+ */
+PJ_DECL(void) pj_log_set_level(int level);
+
+/**
+ * Get current maximum log verbositylevel.
+ *
+ * @return	    Current log maximum level.
+ */
+#if 0
+PJ_DECL(int) pj_log_get_level(void);
+#else
+extern int pj_log_max_level;
+#define pj_log_get_level()  pj_log_max_level
+#endif
+
+/**
+ * Set log decoration. The log decoration flag controls what are printed
+ * to output device alongside the actual message. For example, application
+ * can specify that date/time information should be displayed with each
+ * log message.
+ *
+ * @param decor	    Bitmask combination of #pj_log_decoration to control
+ *		    the layout of the log message.
+ */
+PJ_DECL(void) pj_log_set_decor(unsigned decor);
+
+/**
+ * Get current log decoration flag.
+ *
+ * @return	    Log decoration flag.
+ */
+PJ_DECL(unsigned) pj_log_get_decor(void);
+
+
+#else	/* #if PJ_LOG_MAX_LEVEL >= 1 */
+
+/**
+ * Change log output function. The front-end logging functions will call
+ * this function to write the actual message to the desired device. 
+ * By default, the front-end functions use pj_log_write() to write
+ * the messages, unless it's changed by calling this function.
+ *
+ * @param func	    The function that will be called to write the log
+ *		    messages to the desired device.
+ */
+#  define pj_log_set_log_func(func)
+
+/**
+ * Set maximum log level. Application can call this function to set 
+ * the desired level of verbosity of the logging messages. The bigger the
+ * value, the more verbose the logging messages will be printed. However,
+ * the maximum level of verbosity can not exceed compile time value of
+ * PJ_LOG_MAX_LEVEL.
+ *
+ * @param level	    The maximum level of verbosity of the logging
+ *		    messages (6=very detailed..1=error only, 0=disabled)
+ */
+#  define pj_log_set_level(level)
+
+/**
+ * Set log decoration. The log decoration flag controls what are printed
+ * to output device alongside the actual message. For example, application
+ * can specify that date/time information should be displayed with each
+ * log message.
+ *
+ * @param decor	    Bitmask combination of #pj_log_decoration to control
+ *		    the layout of the log message.
+ */
+#  define pj_log_set_decor(decor)
+
+/**
+ * Get current maximum log verbositylevel.
+ *
+ * @return	    Current log maximum level.
+ */
+#  define pj_log_get_level()	0
+
+/**
+ * Get current log decoration flag.
+ *
+ * @return	    Log decoration flag.
+ */
+#  define pj_log_get_decor()	0
+
+
+#endif	/* #if PJ_LOG_MAX_LEVEL >= 1 */
+
+/** 
+ * @}
+ */
+
+/* **************************************************************************/
+/*
+ * Log functions implementation prototypes.
+ * These functions are called by PJ_LOG macros according to verbosity
+ * level specified when calling the macro. Applications should not normally
+ * need to call these functions directly.
+ */
+
+/**
+ * @def pj_log_wrapper_1(arg)
+ * Internal function to write log with verbosity 1. Will evaluate to
+ * empty expression if PJ_LOG_MAX_LEVEL is below 1.
+ * @param arg       Log expression.
+ */
+#if PJ_LOG_MAX_LEVEL >= 1
+    #define pj_log_wrapper_1(arg)	pj_log_1 arg
+    /** Internal function. */
+    PJ_DECL(void) pj_log_1(const char *src, const char *format, ...);
+#else
+    #define pj_log_wrapper_1(arg)
+#endif
+
+/**
+ * @def pj_log_wrapper_2(arg)
+ * Internal function to write log with verbosity 2. Will evaluate to
+ * empty expression if PJ_LOG_MAX_LEVEL is below 2.
+ * @param arg       Log expression.
+ */
+#if PJ_LOG_MAX_LEVEL >= 2
+    #define pj_log_wrapper_2(arg)	pj_log_2 arg
+    /** Internal function. */
+    PJ_DECL(void) pj_log_2(const char *src, const char *format, ...);
+#else
+    #define pj_log_wrapper_2(arg)
+#endif
+
+/**
+ * @def pj_log_wrapper_3(arg)
+ * Internal function to write log with verbosity 3. Will evaluate to
+ * empty expression if PJ_LOG_MAX_LEVEL is below 3.
+ * @param arg       Log expression.
+ */
+#if PJ_LOG_MAX_LEVEL >= 3
+    #define pj_log_wrapper_3(arg)	pj_log_3 arg
+    /** Internal function. */
+    PJ_DECL(void) pj_log_3(const char *src, const char *format, ...);
+#else
+    #define pj_log_wrapper_3(arg)
+#endif
+
+/**
+ * @def pj_log_wrapper_4(arg)
+ * Internal function to write log with verbosity 4. Will evaluate to
+ * empty expression if PJ_LOG_MAX_LEVEL is below 4.
+ * @param arg       Log expression.
+ */
+#if PJ_LOG_MAX_LEVEL >= 4
+    #define pj_log_wrapper_4(arg)	pj_log_4 arg
+    /** Internal function. */
+    PJ_DECL(void) pj_log_4(const char *src, const char *format, ...);
+#else
+    #define pj_log_wrapper_4(arg)
+#endif
+
+/**
+ * @def pj_log_wrapper_5(arg)
+ * Internal function to write log with verbosity 5. Will evaluate to
+ * empty expression if PJ_LOG_MAX_LEVEL is below 5.
+ * @param arg       Log expression.
+ */
+#if PJ_LOG_MAX_LEVEL >= 5
+    #define pj_log_wrapper_5(arg)	pj_log_5 arg
+    /** Internal function. */
+    PJ_DECL(void) pj_log_5(const char *src, const char *format, ...);
+#else
+    #define pj_log_wrapper_5(arg)
+#endif
+
+/**
+ * @def pj_log_wrapper_6(arg)
+ * Internal function to write log with verbosity 6. Will evaluate to
+ * empty expression if PJ_LOG_MAX_LEVEL is below 6.
+ * @param arg       Log expression.
+ */
+#if PJ_LOG_MAX_LEVEL >= 6
+    #define pj_log_wrapper_6(arg)	pj_log_6 arg
+    /** Internal function. */
+    PJ_DECL(void) pj_log_6(const char *src, const char *format, ...);
+#else
+    #define pj_log_wrapper_6(arg)
+#endif
+
+
+PJ_END_DECL 
+
+#endif  /* __PJ_LOG_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/os.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/os.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/os.h	(revision 1163)
@@ -0,0 +1,1164 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_OS_H__
+#define __PJ_OS_H__
+
+/**
+ * @file os.h
+ * @brief OS dependent functions
+ */
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_OS Operating System Dependent Functionality.
+ * @ingroup PJ
+ */
+
+
+/* **************************************************************************/
+/**
+ * @defgroup PJ_THREAD Threads
+ * @ingroup PJ_OS
+ * @{
+ * This module provides multithreading API.
+ *
+ * \section pj_thread_examples_sec Examples
+ *
+ * For examples, please see:
+ *  - \ref page_pjlib_thread_test
+ *  - \ref page_pjlib_sleep_test
+ *
+ */
+
+/**
+ * Thread creation flags:
+ * - PJ_THREAD_SUSPENDED: specify that the thread should be created suspended.
+ */
+typedef enum pj_thread_create_flags
+{
+    PJ_THREAD_SUSPENDED = 1
+} pj_thread_create_flags;
+
+
+/**
+ * Type of thread entry function.
+ */
+typedef int (PJ_THREAD_FUNC pj_thread_proc)(void*);
+
+/**
+ * Size of thread struct.
+ */
+#if !defined(PJ_THREAD_DESC_SIZE)
+#   define PJ_THREAD_DESC_SIZE	    (64)
+#endif
+
+/**
+ * Thread structure, to thread's state when the thread is created by external
+ * or native API. 
+ */
+typedef long pj_thread_desc[PJ_THREAD_DESC_SIZE];
+
+/**
+ * Get process ID.
+ * @return process ID.
+ */
+PJ_DECL(pj_uint32_t) pj_getpid(void);
+
+/**
+ * Create a new thread.
+ *
+ * @param pool          The memory pool from which the thread record 
+ *                      will be allocated from.
+ * @param thread_name   The optional name to be assigned to the thread.
+ * @param proc          Thread entry function.
+ * @param arg           Argument to be passed to the thread entry function.
+ * @param stack_size    The size of the stack for the new thread, or ZERO or
+ *                      PJ_THREAD_DEFAULT_STACK_SIZE to let the 
+ *		        library choose the reasonable size for the stack. 
+ *                      For some systems, the stack will be allocated from 
+ *                      the pool, so the pool must have suitable capacity.
+ * @param flags         Flags for thread creation, which is bitmask combination 
+ *                      from enum pj_thread_create_flags.
+ * @param thread        Pointer to hold the newly created thread.
+ *
+ * @return	        PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_thread_create(  pj_pool_t *pool, 
+                                        const char *thread_name,
+				        pj_thread_proc *proc, 
+                                        void *arg,
+				        pj_size_t stack_size, 
+                                        unsigned flags,
+					pj_thread_t **thread );
+
+/**
+ * Register a thread that was created by external or native API to PJLIB.
+ * This function must be called in the context of the thread being registered.
+ * When the thread is created by external function or API call,
+ * it must be 'registered' to PJLIB using pj_thread_register(), so that it can
+ * cooperate with PJLIB's framework. During registration, some data needs to
+ * be maintained, and this data must remain available during the thread's 
+ * lifetime.
+ *
+ * @param thread_name   The optional name to be assigned to the thread.
+ * @param desc          Thread descriptor, which must be available throughout 
+ *                      the lifetime of the thread.
+ * @param thread        Pointer to hold the created thread handle.
+ *
+ * @return              PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_thread_register ( const char *thread_name,
+					  pj_thread_desc desc,
+					  pj_thread_t **thread);
+
+/**
+ * Check if this thread has been registered to PJLIB.
+ *
+ * @return		Non-zero if it is registered.
+ */
+PJ_DECL(pj_bool_t) pj_thread_is_registered(void);
+
+
+/**
+ * Get thread name.
+ *
+ * @param thread    The thread handle.
+ *
+ * @return Thread name as null terminated string.
+ */
+PJ_DECL(const char*) pj_thread_get_name(pj_thread_t *thread);
+
+/**
+ * Resume a suspended thread.
+ *
+ * @param thread    The thread handle.
+ *
+ * @return zero on success.
+ */
+PJ_DECL(pj_status_t) pj_thread_resume(pj_thread_t *thread);
+
+/**
+ * Get the current thread.
+ *
+ * @return Thread handle of current thread.
+ */
+PJ_DECL(pj_thread_t*) pj_thread_this(void);
+
+/**
+ * Join thread, and block the caller thread until the specified thread exits.
+ * If the specified thread has already been dead, or it does not exist,
+ * the function will return immediately with successfull status.
+ *
+ * @param thread    The thread handle.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pj_thread_join(pj_thread_t *thread);
+
+
+/**
+ * Destroy thread and release resources allocated for the thread.
+ * However, the memory allocated for the pj_thread_t itself will only be released
+ * when the pool used to create the thread is destroyed.
+ *
+ * @param thread    The thread handle.
+ *
+ * @return zero on success.
+ */
+PJ_DECL(pj_status_t) pj_thread_destroy(pj_thread_t *thread);
+
+
+/**
+ * Put the current thread to sleep for the specified miliseconds.
+ *
+ * @param msec Miliseconds delay.
+ *
+ * @return zero if successfull.
+ */
+PJ_DECL(pj_status_t) pj_thread_sleep(unsigned msec);
+
+/**
+ * @def PJ_CHECK_STACK()
+ * PJ_CHECK_STACK() macro is used to check the sanity of the stack.
+ * The OS implementation may check that no stack overflow occurs, and
+ * it also may collect statistic about stack usage.
+ */
+#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0
+
+#  define PJ_CHECK_STACK() pj_thread_check_stack(__FILE__, __LINE__)
+
+/** @internal
+ * The implementation of stack checking. 
+ */
+PJ_DECL(void) pj_thread_check_stack(const char *file, int line);
+
+/** @internal
+ * Get maximum stack usage statistic. 
+ */
+PJ_DECL(pj_uint32_t) pj_thread_get_stack_max_usage(pj_thread_t *thread);
+
+/** @internal
+ * Dump thread stack status. 
+ */
+PJ_DECL(pj_status_t) pj_thread_get_stack_info(pj_thread_t *thread,
+					      const char **file,
+					      int *line);
+#else
+
+#  define PJ_CHECK_STACK()
+/** pj_thread_get_stack_max_usage() for the thread */
+#  define pj_thread_get_stack_max_usage(thread)	    0
+/** pj_thread_get_stack_info() for the thread */
+#  define pj_thread_get_stack_info(thread,f,l)	    (*(f)="",*(l)=0)
+#endif	/* PJ_OS_HAS_CHECK_STACK */
+
+/**
+ * @}
+ */
+
+/* **************************************************************************/
+/**
+ * @defgroup PJ_TLS Thread Local Storage.
+ * @ingroup PJ_OS
+ * @{
+ */
+
+/** 
+ * Allocate thread local storage index. The initial value of the variable at
+ * the index is zero.
+ *
+ * @param index	    Pointer to hold the return value.
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_thread_local_alloc(long *index);
+
+/**
+ * Deallocate thread local variable.
+ *
+ * @param index	    The variable index.
+ */
+PJ_DECL(void) pj_thread_local_free(long index);
+
+/**
+ * Set the value of thread local variable.
+ *
+ * @param index	    The index of the variable.
+ * @param value	    The value.
+ */
+PJ_DECL(pj_status_t) pj_thread_local_set(long index, void *value);
+
+/**
+ * Get the value of thread local variable.
+ *
+ * @param index	    The index of the variable.
+ * @return	    The value.
+ */
+PJ_DECL(void*) pj_thread_local_get(long index);
+
+
+/**
+ * @}
+ */
+
+
+/* **************************************************************************/
+/**
+ * @defgroup PJ_ATOMIC Atomic Variables
+ * @ingroup PJ_OS
+ * @{
+ *
+ * This module provides API to manipulate atomic variables.
+ *
+ * \section pj_atomic_examples_sec Examples
+ *
+ * For some example codes, please see:
+ *  - @ref page_pjlib_atomic_test
+ */
+
+
+/**
+ * Create atomic variable.
+ *
+ * @param pool	    The pool.
+ * @param initial   The initial value of the atomic variable.
+ * @param atomic    Pointer to hold the atomic variable upon return.
+ *
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_atomic_create( pj_pool_t *pool, 
+				       pj_atomic_value_t initial,
+				       pj_atomic_t **atomic );
+
+/**
+ * Destroy atomic variable.
+ *
+ * @param atomic_var	the atomic variable.
+ *
+ * @return PJ_SUCCESS if success.
+ */
+PJ_DECL(pj_status_t) pj_atomic_destroy( pj_atomic_t *atomic_var );
+
+/**
+ * Set the value of an atomic type, and return the previous value.
+ *
+ * @param atomic_var	the atomic variable.
+ * @param value		value to be set to the variable.
+ */
+PJ_DECL(void) pj_atomic_set( pj_atomic_t *atomic_var, 
+			     pj_atomic_value_t value);
+
+/**
+ * Get the value of an atomic type.
+ *
+ * @param atomic_var	the atomic variable.
+ *
+ * @return the value of the atomic variable.
+ */
+PJ_DECL(pj_atomic_value_t) pj_atomic_get(pj_atomic_t *atomic_var);
+
+/**
+ * Increment the value of an atomic type.
+ *
+ * @param atomic_var	the atomic variable.
+ */
+PJ_DECL(void) pj_atomic_inc(pj_atomic_t *atomic_var);
+
+/**
+ * Increment the value of an atomic type and get the result.
+ *
+ * @param atomic_var	the atomic variable.
+ *
+ * @return              The incremented value.
+ */
+PJ_DECL(pj_atomic_value_t) pj_atomic_inc_and_get(pj_atomic_t *atomic_var);
+
+/**
+ * Decrement the value of an atomic type.
+ *
+ * @param atomic_var	the atomic variable.
+ */
+PJ_DECL(void) pj_atomic_dec(pj_atomic_t *atomic_var);
+
+/**
+ * Decrement the value of an atomic type and get the result.
+ *
+ * @param atomic_var	the atomic variable.
+ *
+ * @return              The decremented value.
+ */
+PJ_DECL(pj_atomic_value_t) pj_atomic_dec_and_get(pj_atomic_t *atomic_var);
+
+/**
+ * Add a value to an atomic type.
+ *
+ * @param atomic_var	The atomic variable.
+ * @param value		Value to be added.
+ */
+PJ_DECL(void) pj_atomic_add( pj_atomic_t *atomic_var,
+			     pj_atomic_value_t value);
+
+/**
+ * Add a value to an atomic type and get the result.
+ *
+ * @param atomic_var	The atomic variable.
+ * @param value		Value to be added.
+ *
+ * @return              The result after the addition.
+ */
+PJ_DECL(pj_atomic_value_t) pj_atomic_add_and_get( pj_atomic_t *atomic_var,
+			                          pj_atomic_value_t value);
+
+/**
+ * @}
+ */
+
+/* **************************************************************************/
+/**
+ * @defgroup PJ_MUTEX Mutexes.
+ * @ingroup PJ_OS
+ * @{
+ *
+ * Mutex manipulation. Alternatively, application can use higher abstraction
+ * for lock objects, which provides uniform API for all kinds of lock 
+ * mechanisms, including mutex. See @ref PJ_LOCK for more information.
+ */
+
+/**
+ * Mutex types:
+ *  - PJ_MUTEX_DEFAULT: default mutex type, which is system dependent.
+ *  - PJ_MUTEX_SIMPLE: non-recursive mutex.
+ *  - PJ_MUTEX_RECURSIVE: recursive mutex.
+ */
+typedef enum pj_mutex_type_e
+{
+    PJ_MUTEX_DEFAULT,
+    PJ_MUTEX_SIMPLE,
+    PJ_MUTEX_RECURSE
+} pj_mutex_type_e;
+
+
+/**
+ * Create mutex of the specified type.
+ *
+ * @param pool	    The pool.
+ * @param name	    Name to be associated with the mutex (for debugging).
+ * @param type	    The type of the mutex, of type #pj_mutex_type_e.
+ * @param mutex	    Pointer to hold the returned mutex instance.
+ *
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_mutex_create(pj_pool_t *pool, 
+                                     const char *name,
+				     int type, 
+                                     pj_mutex_t **mutex);
+
+/**
+ * Create simple, non-recursive mutex.
+ * This function is a simple wrapper for #pj_mutex_create to create 
+ * non-recursive mutex.
+ *
+ * @param pool	    The pool.
+ * @param name	    Mutex name.
+ * @param mutex	    Pointer to hold the returned mutex instance.
+ *
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_mutex_create_simple( pj_pool_t *pool, const char *name,
+					     pj_mutex_t **mutex );
+
+/**
+ * Create recursive mutex.
+ * This function is a simple wrapper for #pj_mutex_create to create 
+ * recursive mutex.
+ *
+ * @param pool	    The pool.
+ * @param name	    Mutex name.
+ * @param mutex	    Pointer to hold the returned mutex instance.
+ *
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_mutex_create_recursive( pj_pool_t *pool,
+					        const char *name,
+						pj_mutex_t **mutex );
+
+/**
+ * Acquire mutex lock.
+ *
+ * @param mutex	    The mutex.
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_mutex_lock(pj_mutex_t *mutex);
+
+/**
+ * Release mutex lock.
+ *
+ * @param mutex	    The mutex.
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_mutex_unlock(pj_mutex_t *mutex);
+
+/**
+ * Try to acquire mutex lock.
+ *
+ * @param mutex	    The mutex.
+ * @return	    PJ_SUCCESS on success, or the error code if the
+ *		    lock couldn't be acquired.
+ */
+PJ_DECL(pj_status_t) pj_mutex_trylock(pj_mutex_t *mutex);
+
+/**
+ * Destroy mutex.
+ *
+ * @param mutex	    Te mutex.
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_mutex_destroy(pj_mutex_t *mutex);
+
+/**
+ * Determine whether calling thread is owning the mutex (only available when
+ * PJ_DEBUG is set).
+ * @param mutex	    The mutex.
+ * @return	    Non-zero if yes.
+ */
+#if defined(PJ_DEBUG) && PJ_DEBUG != 0
+   PJ_DECL(pj_bool_t) pj_mutex_is_locked(pj_mutex_t *mutex);
+#else
+#  define pj_mutex_is_locked(mutex)	    1
+#endif
+
+/**
+ * @}
+ */
+
+/* **************************************************************************/
+/**
+ * @defgroup PJ_RW_MUTEX Reader/Writer Mutex
+ * @ingroup PJ_OS
+ * @{
+ * Reader/writer mutex is a classic synchronization object where multiple
+ * readers can acquire the mutex, but only a single writer can acquire the 
+ * mutex.
+ */
+
+/**
+ * Opaque declaration for reader/writer mutex.
+ * Reader/writer mutex is a classic synchronization object where multiple
+ * readers can acquire the mutex, but only a single writer can acquire the 
+ * mutex.
+ */
+typedef struct pj_rwmutex_t pj_rwmutex_t;
+
+/**
+ * Create reader/writer mutex.
+ *
+ * @param pool	    Pool to allocate memory for the mutex.
+ * @param name	    Name to be assigned to the mutex.
+ * @param mutex	    Pointer to receive the newly created mutex.
+ *
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_rwmutex_create(pj_pool_t *pool, const char *name,
+				       pj_rwmutex_t **mutex);
+
+/**
+ * Lock the mutex for reading.
+ *
+ * @param mutex	    The mutex.
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_rwmutex_lock_read(pj_rwmutex_t *mutex);
+
+/**
+ * Lock the mutex for writing.
+ *
+ * @param mutex	    The mutex.
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_rwmutex_lock_write(pj_rwmutex_t *mutex);
+
+/**
+ * Release read lock.
+ *
+ * @param mutex	    The mutex.
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_rwmutex_unlock_read(pj_rwmutex_t *mutex);
+
+/**
+ * Release write lock.
+ *
+ * @param mutex	    The mutex.
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_rwmutex_unlock_write(pj_rwmutex_t *mutex);
+
+/**
+ * Destroy reader/writer mutex.
+ *
+ * @param mutex	    The mutex.
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_rwmutex_destroy(pj_rwmutex_t *mutex);
+
+
+/**
+ * @}
+ */
+
+
+/* **************************************************************************/
+/**
+ * @defgroup PJ_CRIT_SEC Critical sections.
+ * @ingroup PJ_OS
+ * @{
+ * Critical section protection can be used to protect regions where:
+ *  - mutual exclusion protection is needed.
+ *  - it's rather too expensive to create a mutex.
+ *  - the time spent in the region is very very brief.
+ *
+ * Critical section is a global object, and it prevents any threads from
+ * entering any regions that are protected by critical section once a thread
+ * is already in the section.
+ *
+ * Critial section is \a not recursive!
+ *
+ * Application <b>MUST NOT</b> call any functions that may cause current
+ * thread to block (such as allocating memory, performing I/O, locking mutex,
+ * etc.) while holding the critical section.
+ */
+/**
+ * Enter critical section.
+ */
+PJ_DECL(void) pj_enter_critical_section(void);
+
+/**
+ * Leave critical section.
+ */
+PJ_DECL(void) pj_leave_critical_section(void);
+
+/**
+ * @}
+ */
+
+/* **************************************************************************/
+#if defined(PJ_HAS_SEMAPHORE) && PJ_HAS_SEMAPHORE != 0
+/**
+ * @defgroup PJ_SEM Semaphores.
+ * @ingroup PJ_OS
+ * @{
+ *
+ * This module provides abstraction for semaphores, where available.
+ */
+
+/**
+ * Create semaphore.
+ *
+ * @param pool	    The pool.
+ * @param name	    Name to be assigned to the semaphore (for logging purpose)
+ * @param initial   The initial count of the semaphore.
+ * @param max	    The maximum count of the semaphore.
+ * @param sem	    Pointer to hold the semaphore created.
+ *
+ * @return	    PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_sem_create( pj_pool_t *pool, 
+                                    const char *name,
+				    unsigned initial, 
+                                    unsigned max,
+				    pj_sem_t **sem);
+
+/**
+ * Wait for semaphore.
+ *
+ * @param sem	The semaphore.
+ *
+ * @return	PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_sem_wait(pj_sem_t *sem);
+
+/**
+ * Try wait for semaphore.
+ *
+ * @param sem	The semaphore.
+ *
+ * @return	PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_sem_trywait(pj_sem_t *sem);
+
+/**
+ * Release semaphore.
+ *
+ * @param sem	The semaphore.
+ *
+ * @return	PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_sem_post(pj_sem_t *sem);
+
+/**
+ * Destroy semaphore.
+ *
+ * @param sem	The semaphore.
+ *
+ * @return	PJ_SUCCESS on success, or the error code.
+ */
+PJ_DECL(pj_status_t) pj_sem_destroy(pj_sem_t *sem);
+
+/**
+ * @}
+ */
+#endif	/* PJ_HAS_SEMAPHORE */
+
+
+/* **************************************************************************/
+#if defined(PJ_HAS_EVENT_OBJ) && PJ_HAS_EVENT_OBJ != 0
+/**
+ * @defgroup PJ_EVENT Event Object.
+ * @ingroup PJ_OS
+ * @{
+ *
+ * This module provides abstraction to event object (e.g. Win32 Event) where
+ * available. Event objects can be used for synchronization among threads.
+ */
+
+/**
+ * Create event object.
+ *
+ * @param pool		The pool.
+ * @param name		The name of the event object (for logging purpose).
+ * @param manual_reset	Specify whether the event is manual-reset
+ * @param initial	Specify the initial state of the event object.
+ * @param event		Pointer to hold the returned event object.
+ *
+ * @return event handle, or NULL if failed.
+ */
+PJ_DECL(pj_status_t) pj_event_create(pj_pool_t *pool, const char *name,
+				     pj_bool_t manual_reset, pj_bool_t initial,
+				     pj_event_t **event);
+
+/**
+ * Wait for event to be signaled.
+ *
+ * @param event	    The event object.
+ *
+ * @return zero if successfull.
+ */
+PJ_DECL(pj_status_t) pj_event_wait(pj_event_t *event);
+
+/**
+ * Try wait for event object to be signalled.
+ *
+ * @param event The event object.
+ *
+ * @return zero if successfull.
+ */
+PJ_DECL(pj_status_t) pj_event_trywait(pj_event_t *event);
+
+/**
+ * Set the event object state to signaled. For auto-reset event, this 
+ * will only release the first thread that are waiting on the event. For
+ * manual reset event, the state remains signaled until the event is reset.
+ * If there is no thread waiting on the event, the event object state 
+ * remains signaled.
+ *
+ * @param event	    The event object.
+ *
+ * @return zero if successfull.
+ */
+PJ_DECL(pj_status_t) pj_event_set(pj_event_t *event);
+
+/**
+ * Set the event object to signaled state to release appropriate number of
+ * waiting threads and then reset the event object to non-signaled. For
+ * manual-reset event, this function will release all waiting threads. For
+ * auto-reset event, this function will only release one waiting thread.
+ *
+ * @param event	    The event object.
+ *
+ * @return zero if successfull.
+ */
+PJ_DECL(pj_status_t) pj_event_pulse(pj_event_t *event);
+
+/**
+ * Set the event object state to non-signaled.
+ *
+ * @param event	    The event object.
+ *
+ * @return zero if successfull.
+ */
+PJ_DECL(pj_status_t) pj_event_reset(pj_event_t *event);
+
+/**
+ * Destroy the event object.
+ *
+ * @param event	    The event object.
+ *
+ * @return zero if successfull.
+ */
+PJ_DECL(pj_status_t) pj_event_destroy(pj_event_t *event);
+
+/**
+ * @}
+ */
+#endif	/* PJ_HAS_EVENT_OBJ */
+
+/* **************************************************************************/
+/**
+ * @addtogroup PJ_TIME Time Data Type and Manipulation.
+ * @ingroup PJ_OS
+ * @{
+ * This module provides API for manipulating time.
+ *
+ * \section pj_time_examples_sec Examples
+ *
+ * For examples, please see:
+ *  - \ref page_pjlib_sleep_test
+ */
+
+/**
+ * Get current time of day in local representation.
+ *
+ * @param tv	Variable to store the result.
+ *
+ * @return zero if successfull.
+ */
+PJ_DECL(pj_status_t) pj_gettimeofday(pj_time_val *tv);
+
+
+/**
+ * Parse time value into date/time representation.
+ *
+ * @param tv	The time.
+ * @param pt	Variable to store the date time result.
+ *
+ * @return zero if successfull.
+ */
+PJ_DECL(pj_status_t) pj_time_decode(const pj_time_val *tv, pj_parsed_time *pt);
+
+/**
+ * Encode date/time to time value.
+ *
+ * @param pt	The date/time.
+ * @param tv	Variable to store time value result.
+ *
+ * @return zero if successfull.
+ */
+PJ_DECL(pj_status_t) pj_time_encode(const pj_parsed_time *pt, pj_time_val *tv);
+
+/**
+ * Convert local time to GMT.
+ *
+ * @param tv	Time to convert.
+ *
+ * @return zero if successfull.
+ */
+PJ_DECL(pj_status_t) pj_time_local_to_gmt(pj_time_val *tv);
+
+/**
+ * Convert GMT to local time.
+ *
+ * @param tv	Time to convert.
+ *
+ * @return zero if successfull.
+ */
+PJ_DECL(pj_status_t) pj_time_gmt_to_local(pj_time_val *tv);
+
+/**
+ * @}
+ */
+
+/* **************************************************************************/
+#if defined(PJ_TERM_HAS_COLOR) && PJ_TERM_HAS_COLOR != 0
+
+/**
+ * @defgroup PJ_TERM Terminal
+ * @ingroup PJ_OS
+ * @{
+ */
+
+/**
+ * Set current terminal color.
+ *
+ * @param color	    The RGB color.
+ *
+ * @return zero on success.
+ */
+PJ_DECL(pj_status_t) pj_term_set_color(pj_color_t color);
+
+/**
+ * Get current terminal foreground color.
+ *
+ * @return RGB color.
+ */
+PJ_DECL(pj_color_t) pj_term_get_color(void);
+
+/**
+ * @}
+ */
+
+#endif	/* PJ_TERM_HAS_COLOR */
+
+/* **************************************************************************/
+/**
+ * @defgroup PJ_TIMESTAMP High Resolution Timestamp
+ * @ingroup PJ_OS
+ * @{
+ *
+ * PJLIB provides <b>High Resolution Timestamp</b> API to access highest 
+ * resolution timestamp value provided by the platform. The API is usefull
+ * to measure precise elapsed time, and can be used in applications such
+ * as profiling.
+ *
+ * The timestamp value is represented in cycles, and can be related to
+ * normal time (in seconds or sub-seconds) using various functions provided.
+ *
+ * \section pj_timestamp_examples_sec Examples
+ *
+ * For examples, please see:
+ *  - \ref page_pjlib_sleep_test
+ *  - \ref page_pjlib_timestamp_test
+ */
+
+/*
+ * High resolution timer.
+ */
+#if defined(PJ_HAS_HIGH_RES_TIMER) && PJ_HAS_HIGH_RES_TIMER != 0
+
+/**
+ * Acquire high resolution timer value. The time value are stored
+ * in cycles.
+ *
+ * @param ts	    High resolution timer value.
+ * @return	    PJ_SUCCESS or the appropriate error code.
+ *
+ * @see pj_get_timestamp_freq().
+ */
+PJ_DECL(pj_status_t) pj_get_timestamp(pj_timestamp *ts);
+
+/**
+ * Get high resolution timer frequency, in cycles per second.
+ *
+ * @param freq	    Timer frequency, in cycles per second.
+ * @return	    PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_get_timestamp_freq(pj_timestamp *freq);
+
+/**
+ * Set timestamp from 32bit values.
+ * @param t	    The timestamp to be set.
+ * @param hi	    The high 32bit part.
+ * @param lo	    The low 32bit part.
+ */
+PJ_INLINE(void) pj_set_timestamp32(pj_timestamp *t, pj_uint32_t hi,
+				   pj_uint32_t lo)
+{
+    t->u32.hi = hi;
+    t->u32.lo = lo;
+}
+
+
+/**
+ * Compare timestamp t1 and t2.
+ * @param t1	    t1.
+ * @param t2	    t2.
+ * @return	    -1 if (t1 < t2), 1 if (t1 > t2), or 0 if (t1 == t2)
+ */
+PJ_INLINE(int) pj_cmp_timestamp(const pj_timestamp *t1, const pj_timestamp *t2)
+{
+#if PJ_HAS_INT64
+    if (t1->u64 < t2->u64)
+	return -1;
+    else if (t1->u64 > t2->u64)
+	return 1;
+    else
+	return 0;
+#else
+    if (t1->u32.hi < t2->u32.hi ||
+	(t1->u32.hi == t2->u32.hi && t1->u32.lo < t2->u32.lo))
+	return -1;
+    else if (t1->u32.hi > t2->u32.hi ||
+	     (t1->u32.hi == t2->u32.hi && t1->u32.lo > t2->u32.lo))
+	return 1;
+    else
+	return 0;
+#endif
+}
+
+
+/**
+ * Add timestamp t2 to t1.
+ * @param t1	    t1.
+ * @param t2	    t2.
+ */
+PJ_INLINE(void) pj_add_timestamp(pj_timestamp *t1, const pj_timestamp *t2)
+{
+#if PJ_HAS_INT64
+    t1->u64 += t2->u64;
+#else
+    pj_uint32_t old = t1->u32.lo;
+    t1->u32.hi += t2->u32.hi;
+    t1->u32.lo += t2->u32.lo;
+    if (t1->u32.lo < old)
+	++t1->u32.hi;
+#endif
+}
+
+/**
+ * Add timestamp t2 to t1.
+ * @param t1	    t1.
+ * @param t2	    t2.
+ */
+PJ_INLINE(void) pj_add_timestamp32(pj_timestamp *t1, pj_uint32_t t2)
+{
+#if PJ_HAS_INT64
+    t1->u64 += t2;
+#else
+    pj_uint32_t old = t1->u32.lo;
+    t1->u32.lo += t2;
+    if (t1->u32.lo < old)
+	++t1->u32.hi;
+#endif
+}
+
+/**
+ * Substract timestamp t2 from t1.
+ * @param t1	    t1.
+ * @param t2	    t2.
+ */
+PJ_INLINE(void) pj_sub_timestamp(pj_timestamp *t1, const pj_timestamp *t2)
+{
+#if PJ_HAS_INT64
+    t1->u64 -= t2->u64;
+#else
+    t1->u32.hi -= t2->u32.hi;
+    if (t1->u32.lo >= t2->u32.lo)
+	t1->u32.lo -= t2->u32.lo;
+    else {
+	t1->u32.lo -= t2->u32.lo;
+	--t1->u32.hi;
+    }
+#endif
+}
+
+/**
+ * Substract timestamp t2 from t1.
+ * @param t1	    t1.
+ * @param t2	    t2.
+ */
+PJ_INLINE(void) pj_sub_timestamp32(pj_timestamp *t1, pj_uint32_t t2)
+{
+#if PJ_HAS_INT64
+    t1->u64 -= t2;
+#else
+    if (t1->u32.lo >= t2)
+	t1->u32.lo -= t2;
+    else {
+	t1->u32.lo -= t2;
+	--t1->u32.hi;
+    }
+#endif
+}
+
+/**
+ * Get the timestamp difference between t2 and t1 (that is t2 minus t1),
+ * and return a 32bit signed integer difference.
+ */
+PJ_INLINE(pj_int32_t) pj_timestamp_diff32(const pj_timestamp *t1,
+					  const pj_timestamp *t2)
+{
+    /* Be careful with the signess (I think!) */
+#if PJ_HAS_INT64
+    pj_int64_t diff = t2->u64 - t1->u64;
+    return (pj_int32_t) diff;
+#else
+    pj_int32 diff = t2->u32.lo - t1->u32.lo;
+    return diff;
+#endif
+}
+
+
+/**
+ * Calculate the elapsed time, and store it in pj_time_val.
+ * This function calculates the elapsed time using highest precision
+ * calculation that is available for current platform, considering
+ * whether floating point or 64-bit precision arithmetic is available. 
+ * For maximum portability, application should prefer to use this function
+ * rather than calculating the elapsed time by itself.
+ *
+ * @param start     The starting timestamp.
+ * @param stop      The end timestamp.
+ *
+ * @return	    Elapsed time as #pj_time_val.
+ *
+ * @see pj_elapsed_usec(), pj_elapsed_cycle(), pj_elapsed_nanosec()
+ */
+PJ_DECL(pj_time_val) pj_elapsed_time( const pj_timestamp *start,
+                                      const pj_timestamp *stop );
+
+/**
+ * Calculate the elapsed time as 32-bit miliseconds.
+ * This function calculates the elapsed time using highest precision
+ * calculation that is available for current platform, considering
+ * whether floating point or 64-bit precision arithmetic is available. 
+ * For maximum portability, application should prefer to use this function
+ * rather than calculating the elapsed time by itself.
+ *
+ * @param start     The starting timestamp.
+ * @param stop      The end timestamp.
+ *
+ * @return	    Elapsed time in milisecond.
+ *
+ * @see pj_elapsed_time(), pj_elapsed_cycle(), pj_elapsed_nanosec()
+ */
+PJ_DECL(pj_uint32_t) pj_elapsed_msec( const pj_timestamp *start,
+                                      const pj_timestamp *stop );
+
+/**
+ * Calculate the elapsed time in 32-bit microseconds.
+ * This function calculates the elapsed time using highest precision
+ * calculation that is available for current platform, considering
+ * whether floating point or 64-bit precision arithmetic is available. 
+ * For maximum portability, application should prefer to use this function
+ * rather than calculating the elapsed time by itself.
+ *
+ * @param start     The starting timestamp.
+ * @param stop      The end timestamp.
+ *
+ * @return	    Elapsed time in microsecond.
+ *
+ * @see pj_elapsed_time(), pj_elapsed_cycle(), pj_elapsed_nanosec()
+ */
+PJ_DECL(pj_uint32_t) pj_elapsed_usec( const pj_timestamp *start,
+                                      const pj_timestamp *stop );
+
+/**
+ * Calculate the elapsed time in 32-bit nanoseconds.
+ * This function calculates the elapsed time using highest precision
+ * calculation that is available for current platform, considering
+ * whether floating point or 64-bit precision arithmetic is available. 
+ * For maximum portability, application should prefer to use this function
+ * rather than calculating the elapsed time by itself.
+ *
+ * @param start     The starting timestamp.
+ * @param stop      The end timestamp.
+ *
+ * @return	    Elapsed time in nanoseconds.
+ *
+ * @see pj_elapsed_time(), pj_elapsed_cycle(), pj_elapsed_usec()
+ */
+PJ_DECL(pj_uint32_t) pj_elapsed_nanosec( const pj_timestamp *start,
+                                         const pj_timestamp *stop );
+
+/**
+ * Calculate the elapsed time in 32-bit cycles.
+ * This function calculates the elapsed time using highest precision
+ * calculation that is available for current platform, considering
+ * whether floating point or 64-bit precision arithmetic is available. 
+ * For maximum portability, application should prefer to use this function
+ * rather than calculating the elapsed time by itself.
+ *
+ * @param start     The starting timestamp.
+ * @param stop      The end timestamp.
+ *
+ * @return	    Elapsed time in cycles.
+ *
+ * @see pj_elapsed_usec(), pj_elapsed_time(), pj_elapsed_nanosec()
+ */
+PJ_DECL(pj_uint32_t) pj_elapsed_cycle( const pj_timestamp *start,
+                                       const pj_timestamp *stop );
+
+
+#endif	/* PJ_HAS_HIGH_RES_TIMER */
+
+/** @} */
+
+
+/* **************************************************************************/
+/**
+ * Internal PJLIB function to initialize the threading subsystem.
+ * @return          PJ_SUCCESS or the appropriate error code.
+ */
+pj_status_t pj_thread_init(void);
+
+
+PJ_END_DECL
+
+#endif  /* __PJ_OS_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/pool.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/pool.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/pool.h	(revision 1163)
@@ -0,0 +1,878 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/list.h>
+
+/* See if we use pool's alternate API.
+ * The alternate API is used e.g. to implement pool debugging.
+ */
+#if PJ_HAS_POOL_ALT_API
+#  include <pj/pool_alt.h>
+#endif
+
+
+#ifndef __PJ_POOL_H__
+#define __PJ_POOL_H__
+
+/**
+ * @file pool.h
+ * @brief Memory Pool.
+ */
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_POOL_GROUP Fast Memory Pool
+ * @ingroup PJ
+ * @brief
+ * Memory pools allow dynamic memory allocation comparable to malloc or the 
+ * new in operator C++. Those implementations are not desirable for very
+ * high performance applications or real-time systems, because of the 
+ * performance bottlenecks and it suffers from fragmentation issue.
+ *
+ * \section PJ_POOL_INTRO_SEC PJLIB's Memory Pool
+ * \subsection PJ_POOL_ADVANTAGE_SUBSEC Advantages
+ * 
+ * PJLIB's pool has many advantages over traditional malloc/new operator and
+ * over other memory pool implementations, because:
+ *  - unlike other memory pool implementation, it allows allocation of
+ *    memory chunks of different sizes,
+ *  - it's very very fast. 
+ *    \n
+ *    Memory chunk allocation is not only an O(1) 
+ *    operation, but it's also very simple (just 
+ *    few pointer arithmetic operations) and it doesn't require locking 
+ *    any mutex,
+ *  - it's memory efficient.
+ *    \n
+ *    Pool doesn't keep track individual memory chunks allocated by
+ *    applications, so there is no additional overhead needed for each
+ *    memory allocation (other than possible additional of few bytes, up to
+ *    PJ_POOL_ALIGNMENT-1, for aligning the memory). 
+ *    But see the @ref PJ_POOL_CAVEATS_SUBSEC below.
+ *  - it prevents memory leaks. 
+ *    \n
+ *    Memory pool inherently has garbage collection functionality. In fact, 
+ *    there is no need to free the chunks allocated from the memory pool.
+ *    All chunks previously allocated from the pool will be freed once the
+ *    pool itself is destroyed. This would prevent memory leaks that haunt
+ *    programmers for decades, and it provides additional performance 
+ *    advantage over traditional malloc/new operator.
+ *
+ * Even more, PJLIB's memory pool provides some additional usability and
+ * flexibility for applications:
+ *  - memory leaks are easily traceable, since memory pool is assigned name,
+ *    and application can inspect what pools currently active in the system.
+ *  - by design, memory allocation from a pool is not thread safe. We assumed
+ *    that a pool will be owned by a higher level object, and thread safety 
+ *    should be handled by that object. This enables very fast pool operations
+ *    and prevents unnecessary locking operations,
+ *  - by default, the memory pool API behaves more like C++ new operator, 
+ *    in that it will throw PJ_NO_MEMORY_EXCEPTION exception (see 
+ *    @ref PJ_EXCEPT) when memory chunk allocation fails. This enables failure
+ *    handling to be done on more high level function (instead of checking
+ *    the result of pj_pool_alloc() everytime). If application doesn't like
+ *    this, the default behavior can be changed on global basis by supplying 
+ *    different policy to the pool factory.
+ *  - any memory allocation backend allocator/deallocator may be used. By
+ *    default, the policy uses malloc() and free() to manage the pool's block,
+ *    but application may use different strategy, for example to allocate
+ *    memory blocks from a globally static memory location.
+ *
+ *
+ * \subsection PJ_POOL_PERFORMANCE_SUBSEC Performance
+ * 
+ * The result of PJLIB's memory design and careful implementation is a
+ * memory allocation strategy that can speed-up the memory allocations
+ * and deallocations by up to <b>30 times</b> compared to standard
+ * malloc()/free() (more than 150 million allocations per second on a
+ * P4/3.0GHz Linux machine).
+ *
+ * (Note: your mileage may vary, of course. You can see how much PJLIB's
+ *  pool improves the performance over malloc()/free() in your target
+ *  system by running pjlib-test application).
+ *
+ *
+ * \subsection PJ_POOL_CAVEATS_SUBSEC Caveats
+ *
+ * There are some caveats though!
+ *
+ * When creating pool, PJLIB requires applications to specify the initial
+ * pool size, and as soon as the pool is created, PJLIB allocates memory
+ * from the system by that size. Application designers MUST choose the 
+ * initial pool size carefully, since choosing too big value will result in
+ * wasting system's memory.
+ *
+ * But the pool can grow. Application designer can specify how the
+ * pool will grow in size, by specifying the size increment when creating
+ * the pool.
+ *
+ * The pool, however, <b>cannot</b> shrink! Since there is <b>no</b> 
+ * function to deallocate memory chunks, there is no way for the pool to 
+ * release back unused memory to the system. 
+ * Application designers must be aware that constant memory allocations 
+ * from pool that has infinite life-time may cause the memory usage of 
+ * the application to grow over time.
+ *
+ *
+ * \section PJ_POOL_USING_SEC Using Memory Pool
+ *
+ * This section describes how to use PJLIB's memory pool framework.
+ * As we hope the readers will witness, PJLIB's memory pool API is quite
+ * straightforward. 
+ *
+ * \subsection PJ_POOL_USING_F Create Pool Factory
+ * First, application needs to initialize a pool factory (this normally
+ * only needs to be done once in one application). PJLIB provides
+ * a pool factory implementation called caching pool (see @ref 
+ * PJ_CACHING_POOL), and it is initialized by calling #pj_caching_pool_init().
+ *
+ * \subsection PJ_POOL_USING_P Create The Pool
+ * Then application creates the pool object itself with #pj_pool_create(),
+ * specifying among other thing the pool factory where the pool should
+ * be created from, the pool name, initial size, and increment/expansion
+ * size.
+ *
+ * \subsection PJ_POOL_USING_M Allocate Memory as Required
+ * Then whenever application needs to allocate dynamic memory, it would
+ * call #pj_pool_alloc(), #pj_pool_calloc(), or #pj_pool_zalloc() to
+ * allocate memory chunks from the pool.
+ *
+ * \subsection PJ_POOL_USING_DP Destroy the Pool
+ * When application has finished with the pool, it should call 
+ * #pj_pool_release() to release the pool object back to the factory. 
+ * Depending on the types of the factory, this may release the memory back 
+ * to the operating system.
+ *
+ * \subsection PJ_POOL_USING_Dc Destroy the Pool Factory
+ * And finally, before application quites, it should deinitialize the
+ * pool factory, to make sure that all memory blocks allocated by the
+ * factory are released back to the operating system. After this, of 
+ * course no more memory pool allocation can be requested.
+ *
+ * \subsection PJ_POOL_USING_EX Example
+ * Below is a sample complete program that utilizes PJLIB's memory pool.
+ *
+ * \code
+
+   #include <pjlib.h>
+
+   #define THIS_FILE    "pool_sample.c"
+
+   static void my_perror(const char *title, pj_status_t status)
+   {
+        char errmsg[PJ_ERR_MSG_SIZE];
+
+	pj_strerror(status, errmsg, sizeof(errmsg));
+	PJ_LOG(1,(THIS_FILE, "%s: %s [status=%d]", title, errmsg, status));
+   }
+
+   static void pool_demo_1(pj_pool_factory *pfactory)
+   {
+	unsigned i;
+	pj_pool_t *pool;
+
+	// Must create pool before we can allocate anything
+	pool = pj_pool_create(pfactory,	 // the factory
+			      "pool1",	 // pool's name
+			      4000,	 // initial size
+			      4000,	 // increment size
+			      NULL);	 // use default callback.
+	if (pool == NULL) {
+	    my_perror("Error creating pool", PJ_ENOMEM);
+	    return;
+	}
+
+	// Demo: allocate some memory chunks
+	for (i=0; i<1000; ++i) {
+	    void *p;
+
+	    p = pj_pool_alloc(pool, (pj_rand()+1) % 512);
+
+	    // Do something with p
+	    ...
+
+	    // Look! No need to free p!!
+	}
+
+	// Done with silly demo, must free pool to release all memory.
+	pj_pool_release(pool);
+   }
+
+   int main()
+   {
+	pj_caching_pool cp;
+	pj_status_t status;
+
+        // Must init PJLIB before anything else
+	status = pj_init();
+	if (status != PJ_SUCCESS) {
+	    my_perror("Error initializing PJLIB", status);
+	    return 1;
+	}
+
+	// Create the pool factory, in this case, a caching pool.
+	pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 
+			     1024*1024 );
+
+	// Do a demo
+	pool_demo_1(&cp.factory);
+
+	// Done with demos, destroy caching pool before exiting app.
+	pj_caching_pool_destroy(&cp);
+
+	return 0;
+   }
+
+   \endcode
+ *
+ * More information about pool factory, the pool object, and caching pool
+ * can be found on the Module Links below.
+ */
+
+
+/**
+ * @defgroup PJ_POOL Memory Pool Object
+ * @ingroup PJ_POOL_GROUP
+ * @brief
+ * The memory pool is an opaque object created by pool factory.
+ * Application uses this object to request a memory chunk, by calling
+ * #pj_pool_alloc(), #pj_pool_calloc(), or #pj_pool_zalloc(). 
+ * When the application has finished using
+ * the pool, it must call #pj_pool_release() to free all the chunks previously
+ * allocated and release the pool back to the factory.
+ *
+ * A memory pool is initialized with an initial amount of memory, which is
+ * called a block. Pool can be configured to dynamically allocate more memory 
+ * blocks when it runs out of memory. 
+ *
+ * The pool doesn't keep track of individual memory allocations
+ * by user, and the user doesn't have to free these indidual allocations. This
+ * makes memory allocation simple and very fast. All the memory allocated from
+ * the pool will be destroyed when the pool itself is destroyed.
+ *
+ * \section PJ_POOL_THREADING_SEC More on Threading Policies
+ * - By design, memory allocation from a pool is not thread safe. We assumed 
+ *   that a pool will be owned by an object, and thread safety should be 
+ *   handled by that object. Thus these functions are not thread safe: 
+ *	- #pj_pool_alloc, 
+ *	- #pj_pool_calloc, 
+ *	- and other pool statistic functions.
+ * - Threading in the pool factory is decided by the policy set for the
+ *   factory when it was created.
+ *
+ * \section PJ_POOL_EXAMPLES_SEC Examples
+ *
+ * For some sample codes on how to use the pool, please see:
+ *  - @ref page_pjlib_pool_test
+ *
+ * @{
+ */
+
+/**
+ * The type for function to receive callback from the pool when it is unable
+ * to allocate memory. The elegant way to handle this condition is to throw
+ * exception, and this is what is expected by most of this library 
+ * components.
+ */
+typedef void pj_pool_callback(pj_pool_t *pool, pj_size_t size);
+
+/**
+ * This class, which is used internally by the pool, describes a single 
+ * block of memory from which user memory allocations will be allocated from.
+ */
+typedef struct pj_pool_block
+{
+    PJ_DECL_LIST_MEMBER(struct pj_pool_block);  /**< List's prev and next.  */
+    unsigned char    *buf;                      /**< Start of buffer.       */
+    unsigned char    *cur;                      /**< Current alloc ptr.     */
+    unsigned char    *end;                      /**< End of buffer.         */
+} pj_pool_block;
+
+
+/**
+ * This structure describes the memory pool. Only implementors of pool factory
+ * need to care about the contents of this structure.
+ */
+struct pj_pool_t
+{
+    PJ_DECL_LIST_MEMBER(struct pj_pool_t);  /**< Standard list elements.    */
+
+    /** Pool name */
+    char	    obj_name[PJ_MAX_OBJ_NAME];
+
+    /** Pool factory. */
+    pj_pool_factory *factory;
+
+    /** Data put by factory */
+    void	    *factory_data;
+
+    /** Current capacity allocated by the pool. */
+    pj_size_t	    capacity;
+
+    /** Size of memory block to be allocated when the pool runs out of memory */
+    pj_size_t	    increment_size;
+
+    /** List of memory blocks allcoated by the pool. */
+    pj_pool_block   block_list;
+
+    /** The callback to be called when the pool is unable to allocate memory. */
+    pj_pool_callback *callback;
+
+};
+
+
+/**
+ * Guidance on how much memory required for initial pool administrative data.
+ */
+#define PJ_POOL_SIZE	        (sizeof(struct pj_pool_t))
+
+/** 
+ * Pool memory alignment (must be power of 2). 
+ */
+#ifndef PJ_POOL_ALIGNMENT
+#   define PJ_POOL_ALIGNMENT    4
+#endif
+
+/**
+ * Create a new pool from the pool factory. This wrapper will call create_pool
+ * member of the pool factory.
+ *
+ * @param factory	    The pool factory.
+ * @param name		    The name to be assigned to the pool. The name should 
+ *			    not be longer than PJ_MAX_OBJ_NAME (32 chars), or 
+ *			    otherwise it will be truncated.
+ * @param initial_size	    The size of initial memory blocks taken by the pool.
+ *			    Note that the pool will take 68+20 bytes for 
+ *			    administrative area from this block.
+ * @param increment_size    the size of each additional blocks to be allocated
+ *			    when the pool is running out of memory. If user 
+ *			    requests memory which is larger than this size, then 
+ *			    an error occurs.
+ *			    Note that each time a pool allocates additional block, 
+ *			    it needs PJ_POOL_SIZE more to store some 
+ *			    administrative info.
+ * @param callback	    Callback to be called when error occurs in the pool.
+ *			    If this value is NULL, then the callback from pool
+ *			    factory policy will be used.
+ *			    Note that when an error occurs during pool creation, 
+ *			    the callback itself is not called. Instead, NULL 
+ *			    will be returned.
+ *
+ * @return                  The memory pool, or NULL.
+ */
+PJ_IDECL(pj_pool_t*) pj_pool_create(pj_pool_factory *factory, 
+				    const char *name,
+				    pj_size_t initial_size, 
+				    pj_size_t increment_size,
+				    pj_pool_callback *callback);
+
+/**
+ * Release the pool back to pool factory.
+ *
+ * @param pool	    Memory pool.
+ */
+PJ_IDECL(void) pj_pool_release( pj_pool_t *pool );
+
+/**
+ * Get pool object name.
+ *
+ * @param pool the pool.
+ *
+ * @return pool name as NULL terminated string.
+ */
+PJ_IDECL(const char *) pj_pool_getobjname( const pj_pool_t *pool );
+
+/**
+ * Reset the pool to its state when it was initialized.
+ * This means that if additional blocks have been allocated during runtime, 
+ * then they will be freed. Only the original block allocated during 
+ * initialization is retained. This function will also reset the internal 
+ * counters, such as pool capacity and used size.
+ *
+ * @param pool the pool.
+ */
+PJ_DECL(void) pj_pool_reset( pj_pool_t *pool );
+
+
+/**
+ * Get the pool capacity, that is, the system storage that have been allocated
+ * by the pool, and have been used/will be used to allocate user requests.
+ * There's no guarantee that the returned value represent a single
+ * contiguous block, because the capacity may be spread in several blocks.
+ *
+ * @param pool	the pool.
+ *
+ * @return the capacity.
+ */
+PJ_IDECL(pj_size_t) pj_pool_get_capacity( pj_pool_t *pool );
+
+/**
+ * Get the total size of user allocation request.
+ *
+ * @param pool	the pool.
+ *
+ * @return the total size.
+ */
+PJ_IDECL(pj_size_t) pj_pool_get_used_size( pj_pool_t *pool );
+
+/**
+ * Allocate storage with the specified size from the pool.
+ * If there's no storage available in the pool, then the pool can allocate more
+ * blocks if the increment size is larger than the requested size.
+ *
+ * @param pool	    the pool.
+ * @param size	    the requested size.
+ *
+ * @return pointer to the allocated memory.
+ *
+ * @see PJ_POOL_ALLOC_T
+ */
+PJ_IDECL(void*) pj_pool_alloc( pj_pool_t *pool, pj_size_t size);
+
+/**
+ * Allocate storage  from the pool, and initialize it to zero.
+ * This function behaves like pj_pool_alloc(), except that the storage will
+ * be initialized to zero.
+ *
+ * @param pool	    the pool.
+ * @param count	    the number of elements in the array.
+ * @param elem	    the size of individual element.
+ *
+ * @return pointer to the allocated memory.
+ */
+PJ_IDECL(void*) pj_pool_calloc( pj_pool_t *pool, pj_size_t count, 
+				pj_size_t elem);
+
+
+/**
+ * Allocate storage from the pool and initialize it to zero.
+ *
+ * @param pool	    The pool.
+ * @param size	    The size to be allocated.
+ *
+ * @return	    Pointer to the allocated memory.
+ *
+ * @see PJ_POOL_ZALLOC_T
+ */
+PJ_INLINE(void*) pj_pool_zalloc(pj_pool_t *pool, pj_size_t size)
+{
+    return pj_pool_calloc(pool, 1, size);
+}
+
+
+/**
+ * This macro allocates memory from the pool and returns the instance of
+ * the specified type. It provides a stricker type safety than pj_pool_alloc()
+ * since the return value of this macro will be type-casted to the specified
+ * type.
+ *
+ * @param pool	    The pool
+ * @param type	    The type of object to be allocated
+ *
+ * @return	    Memory buffer of the specified type.
+ */
+#define PJ_POOL_ALLOC_T(pool,type) \
+	    ((type*)pj_pool_alloc(pool, sizeof(type)))
+
+/**
+ * This macro allocates memory from the pool, zeroes the buffer, and 
+ * returns the instance of the specified type. It provides a stricker type 
+ * safety than pj_pool_zalloc() since the return value of this macro will be 
+ * type-casted to the specified type.
+ *
+ * @param pool	    The pool
+ * @param type	    The type of object to be allocated
+ *
+ * @return	    Memory buffer of the specified type.
+ */
+#define PJ_POOL_ZALLOC_T(pool,type) \
+	    ((type*)pj_pool_zalloc(pool, sizeof(type)))
+
+
+
+/**
+ * @}	// PJ_POOL
+ */
+
+/* **************************************************************************/
+/**
+ * @defgroup PJ_POOL_FACTORY Pool Factory and Policy
+ * @ingroup PJ_POOL_GROUP
+ * @brief
+ * A pool object must be created through a factory. A factory not only provides
+ * generic interface functions to create and release pool, but also provides 
+ * strategy to manage the life time of pools. One sample implementation, 
+ * \a pj_caching_pool, can be set to keep the pools released by application for
+ * future use as long as the total memory is below the limit.
+ * 
+ * The pool factory interface declared in PJLIB is designed to be extensible.
+ * Application can define its own strategy by creating it's own pool factory
+ * implementation, and this strategy can be used even by existing library
+ * without recompilation.
+ *
+ * \section PJ_POOL_FACTORY_ITF Pool Factory Interface
+ * The pool factory defines the following interface:
+ *  - \a policy: the memory pool factory policy.
+ *  - \a create_pool(): create a new memory pool.
+ *  - \a release_pool(): release memory pool back to factory.
+ *
+ * \section PJ_POOL_FACTORY_POL Pool Factory Policy.
+ *
+ * A pool factory only defines functions to create and release pool and how
+ * to manage pools, but the rest of the functionalities are controlled by
+ * policy. A pool policy defines:
+ *  - how memory block is allocated and deallocated (the default implementation
+ *    allocates and deallocate memory by calling malloc() and free()).
+ *  - callback to be called when memory allocation inside a pool fails (the
+ *    default implementation will throw PJ_NO_MEMORY_EXCEPTION exception).
+ *  - concurrency when creating and releasing pool from/to the factory.
+ *
+ * A pool factory can be given different policy during creation to make
+ * it behave differently. For example, caching pool factory can be configured
+ * to allocate and deallocate from a static/contiguous/preallocated memory 
+ * instead of using malloc()/free().
+ * 
+ * What strategy/factory and what policy to use is not defined by PJLIB, but
+ * instead is left to application to make use whichever is most efficient for
+ * itself.
+ *
+ * The pool factory policy controls the behaviour of memory factories, and
+ * defines the following interface:
+ *  - \a block_alloc(): allocate memory block from backend memory mgmt/system.
+ *  - \a block_free(): free memory block back to backend memory mgmt/system.
+ * @{
+ */
+
+/* We unfortunately don't have support for factory policy options as now,
+   so we keep this commented at the moment.
+enum PJ_POOL_FACTORY_OPTION
+{
+    PJ_POOL_FACTORY_SERIALIZE = 1
+};
+*/
+
+/**
+ * This structure declares pool factory interface.
+ */
+typedef struct pj_pool_factory_policy
+{
+    /**
+     * Allocate memory block (for use by pool). This function is called
+     * by memory pool to allocate memory block.
+     * 
+     * @param factory	Pool factory.
+     * @param size	The size of memory block to allocate.
+     *
+     * @return		Memory block.
+     */
+    void* (*block_alloc)(pj_pool_factory *factory, pj_size_t size);
+
+    /**
+     * Free memory block.
+     *
+     * @param factory	Pool factory.
+     * @param mem	Memory block previously allocated by block_alloc().
+     * @param size	The size of memory block.
+     */
+    void (*block_free)(pj_pool_factory *factory, void *mem, pj_size_t size);
+
+    /**
+     * Default callback to be called when memory allocation fails.
+     */
+    pj_pool_callback *callback;
+
+    /**
+     * Option flags.
+     */
+    unsigned flags;
+
+} pj_pool_factory_policy;
+
+/**
+ * This constant denotes the exception number that will be thrown by default
+ * memory factory policy when memory allocation fails.
+ */
+extern int PJ_NO_MEMORY_EXCEPTION;
+
+/**
+ * This global variable points to default memory pool factory policy.
+ * The behaviour of the default policy is:
+ *  - block allocation and deallocation use malloc() and free().
+ *  - callback will raise PJ_NO_MEMORY_EXCEPTION exception.
+ *  - access to pool factory is not serialized (i.e. not thread safe).
+ */
+extern pj_pool_factory_policy pj_pool_factory_default_policy;
+
+/**
+ * This structure contains the declaration for pool factory interface.
+ */
+struct pj_pool_factory
+{
+    /**
+     * Memory pool policy.
+     */
+    pj_pool_factory_policy policy;
+
+    /**
+    * Create a new pool from the pool factory.
+    *
+    * @param factory	The pool factory.
+    * @param name	the name to be assigned to the pool. The name should 
+    *			not be longer than PJ_MAX_OBJ_NAME (32 chars), or 
+    *			otherwise it will be truncated.
+    * @param initial_size the size of initial memory blocks taken by the pool.
+    *			Note that the pool will take 68+20 bytes for 
+    *			administrative area from this block.
+    * @param increment_size the size of each additional blocks to be allocated
+    *			when the pool is running out of memory. If user 
+    *			requests memory which is larger than this size, then 
+    *			an error occurs.
+    *			Note that each time a pool allocates additional block, 
+    *			it needs 20 bytes (equal to sizeof(pj_pool_block)) to 
+    *			store some administrative info.
+    * @param callback	Cllback to be called when error occurs in the pool.
+    *			Note that when an error occurs during pool creation, 
+    *			the callback itself is not called. Instead, NULL 
+    *			will be returned.
+    *
+    * @return the memory pool, or NULL.
+    */
+    pj_pool_t*	(*create_pool)( pj_pool_factory *factory,
+				const char *name,
+				pj_size_t initial_size, 
+				pj_size_t increment_size,
+				pj_pool_callback *callback);
+
+    /**
+     * Release the pool to the pool factory.
+     *
+     * @param factory	The pool factory.
+     * @param pool	The pool to be released.
+    */
+    void (*release_pool)( pj_pool_factory *factory, pj_pool_t *pool );
+
+    /**
+     * Dump pool status to log.
+     *
+     * @param factory	The pool factory.
+     */
+    void (*dump_status)( pj_pool_factory *factory, pj_bool_t detail );
+
+    /**
+     * This is optional callback to be called by allocation policy when
+     * it allocates a new memory block. The factory may use this callback
+     * for example to keep track of the total number of memory blocks
+     * currently allocated by applications.
+     *
+     * @param factory	    The pool factory.
+     * @param size	    Size requested by application.
+     *
+     * @return		    MUST return PJ_TRUE, otherwise the block
+     *                      allocation is cancelled.
+     */
+    pj_bool_t (*on_block_alloc)(pj_pool_factory *factory, pj_size_t size);
+
+    /**
+     * This is optional callback to be called by allocation policy when
+     * it frees memory block. The factory may use this callback
+     * for example to keep track of the total number of memory blocks
+     * currently allocated by applications.
+     *
+     * @param factory	    The pool factory.
+     * @param size	    Size freed.
+     */
+    void (*on_block_free)(pj_pool_factory *factory, pj_size_t size);
+
+};
+
+/**
+ * This function is intended to be used by pool factory implementors.
+ * @param factory           Pool factory.
+ * @param name              Pool name.
+ * @param initial_size      Initial size.
+ * @param increment_size    Increment size.
+ * @param callback          Callback.
+ * @return                  The pool object, or NULL.
+ */
+PJ_DECL(pj_pool_t*) pj_pool_create_int(	pj_pool_factory *factory, 
+					const char *name,
+					pj_size_t initial_size, 
+					pj_size_t increment_size,
+					pj_pool_callback *callback);
+
+/**
+ * This function is intended to be used by pool factory implementors.
+ * @param pool              The pool.
+ * @param name              Pool name.
+ * @param increment_size    Increment size.
+ * @param callback          Callback function.
+ */
+PJ_DECL(void) pj_pool_init_int( pj_pool_t *pool, 
+				const char *name,
+				pj_size_t increment_size,
+				pj_pool_callback *callback);
+
+/**
+ * This function is intended to be used by pool factory implementors.
+ * @param pool      The memory pool.
+ */
+PJ_DECL(void) pj_pool_destroy_int( pj_pool_t *pool );
+
+
+/**
+ * Dump pool factory state.
+ * @param pf	    The pool factory.
+ * @param detail    Detail state required.
+ */
+PJ_INLINE(void) pj_pool_factory_dump( pj_pool_factory *pf,
+				      pj_bool_t detail )
+{
+    (*pf->dump_status)(pf, detail);
+}
+
+/**
+ *  @}	// PJ_POOL_FACTORY
+ */
+
+/* **************************************************************************/
+
+/**
+ * @defgroup PJ_CACHING_POOL Caching Pool Factory
+ * @ingroup PJ_POOL_GROUP
+ * @brief
+ * Caching pool is one sample implementation of pool factory where the
+ * factory can reuse memory to create a pool. Application defines what the 
+ * maximum memory the factory can hold, and when a pool is released the
+ * factory decides whether to destroy the pool or to keep it for future use.
+ * If the total amount of memory in the internal cache is still within the
+ * limit, the factory will keep the pool in the internal cache, otherwise the
+ * pool will be destroyed, thus releasing the memory back to the system.
+ *
+ * @{
+ */
+
+/**
+ * Number of unique sizes, to be used as index to the free list.
+ * Each pool in the free list is organized by it's size.
+ */
+#define PJ_CACHING_POOL_ARRAY_SIZE	16
+
+/**
+ * Declaration for caching pool. Application doesn't normally need to
+ * care about the contents of this struct, it is only provided here because
+ * application need to define an instance of this struct (we can not allocate
+ * the struct from a pool since there is no pool factory yet!).
+ */
+struct pj_caching_pool 
+{
+    /** Pool factory interface, must be declared first. */
+    pj_pool_factory factory;
+
+    /** Current factory's capacity, i.e. number of bytes that are allocated
+     *  and available for application in this factory. The factory's
+     *  capacity represents the size of all pools kept by this factory
+     *  in it's free list, which will be returned to application when it
+     *  requests to create a new pool.
+     */
+    pj_size_t	    capacity;
+
+    /** Maximum size that can be held by this factory. Once the capacity
+     *  has exceeded @a max_capacity, further #pj_pool_release() will
+     *  flush the pool. If the capacity is still below the @a max_capacity,
+     *  #pj_pool_release() will save the pool to the factory's free list.
+     */
+    pj_size_t       max_capacity;
+
+    /**
+     * Number of pools currently held by applications. This number gets
+     * incremented everytime #pj_pool_create() is called, and gets
+     * decremented when #pj_pool_release() is called.
+     */
+    pj_size_t       used_count;
+
+    /**
+     * Total size of memory currently used by application.
+     */
+    pj_size_t	    used_size;
+
+    /**
+     * The maximum size of memory used by application throughout the life
+     * of the caching pool.
+     */
+    pj_size_t	    peak_used_size;
+
+    /**
+     * Lists of pools in the cache, indexed by pool size.
+     */
+    pj_list	    free_list[PJ_CACHING_POOL_ARRAY_SIZE];
+
+    /**
+     * List of pools currently allocated by applications.
+     */
+    pj_list	    used_list;
+
+    /**
+     * Internal pool.
+     */
+    char	    pool_buf[256 * (sizeof(long) / 4)];
+
+    /**
+     * Mutex.
+     */
+    pj_lock_t	   *lock;
+};
+
+
+
+/**
+ * Initialize caching pool.
+ *
+ * @param ch_pool	The caching pool factory to be initialized.
+ * @param policy	Pool factory policy.
+ * @param max_capacity	The total capacity to be retained in the cache. When
+ *			the pool is returned to the cache, it will be kept in
+ *			recycling list if the total capacity of pools in this
+ *			list plus the capacity of the pool is still below this
+ *			value.
+ */
+PJ_DECL(void) pj_caching_pool_init( pj_caching_pool *ch_pool, 
+				    const pj_pool_factory_policy *policy,
+				    pj_size_t max_capacity);
+
+
+/**
+ * Destroy caching pool, and release all the pools in the recycling list.
+ *
+ * @param ch_pool	The caching pool.
+ */
+PJ_DECL(void) pj_caching_pool_destroy( pj_caching_pool *ch_pool );
+
+/**
+ * @}	// PJ_CACHING_POOL
+ */
+
+#  if PJ_FUNCTIONS_ARE_INLINED
+#    include "pool_i.h"
+#  endif
+
+PJ_END_DECL
+    
+#endif	/* __PJ_POOL_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/pool_alt.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/pool_alt.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/pool_alt.h	(revision 1163)
@@ -0,0 +1,125 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_POOL_ALT_H__
+#define __PJ_POOL_ALT_H__
+
+#define __PJ_POOL_H__
+
+
+typedef struct pj_pool_t pj_pool_t;
+
+
+/**
+ * The type for function to receive callback from the pool when it is unable
+ * to allocate memory. The elegant way to handle this condition is to throw
+ * exception, and this is what is expected by most of this library 
+ * components.
+ */
+typedef void pj_pool_callback(pj_pool_t *pool, pj_size_t size);
+
+/**
+ * This constant denotes the exception number that will be thrown by default
+ * memory factory policy when memory allocation fails.
+ */
+extern int PJ_NO_MEMORY_EXCEPTION;
+
+
+
+/*
+ * Declare all pool API as macro that calls the implementation
+ * function.
+ */
+#define pj_pool_create(fc,nm,init,inc,cb)   \
+	pj_pool_create_imp(__FILE__, __LINE__, fc, nm, init, inc, cb)
+
+#define pj_pool_release(pool)		    pj_pool_release_imp(pool)
+#define pj_pool_getobjname(pool)	    pj_pool_getobjname_imp(pool)
+#define pj_pool_reset(pool)		    pj_pool_reset_imp(pool)
+#define pj_pool_get_capacity(pool)	    pj_pool_get_capacity_imp(pool)
+#define pj_pool_get_used_size(pool)	    pj_pool_get_used_size_imp(pool)
+#define pj_pool_alloc(pool,sz)		    \
+	pj_pool_alloc_imp(__FILE__, __LINE__, pool, sz)
+
+#define pj_pool_calloc(pool,cnt,elem)	    \
+	pj_pool_calloc_imp(__FILE__, __LINE__, pool, cnt, elem)
+
+#define pj_pool_zalloc(pool,sz)		    \
+	pj_pool_zalloc_imp(__FILE__, __LINE__, pool, sz)
+
+
+
+/*
+ * Declare prototypes for pool implementation API.
+ */
+
+/* Create pool */
+PJ_DECL(pj_pool_t*) pj_pool_create_imp(const char *file, int line,
+				       void *factory,
+				       const char *name,
+				       pj_size_t initial_size,
+				       pj_size_t increment_size,
+				       pj_pool_callback *callback);
+
+/* Release pool */
+PJ_DECL(void) pj_pool_release_imp(pj_pool_t *pool);
+
+/* Get pool name */
+PJ_DECL(const char*) pj_pool_getobjname_imp(pj_pool_t *pool);
+
+/* Reset pool */
+PJ_DECL(void) pj_pool_reset_imp(pj_pool_t *pool);
+
+/* Get capacity */
+PJ_DECL(pj_size_t) pj_pool_get_capacity_imp(pj_pool_t *pool);
+
+/* Get total used size */
+PJ_DECL(pj_size_t) pj_pool_get_used_size_imp(pj_pool_t *pool);
+
+/* Allocate memory from the pool */
+PJ_DECL(void*) pj_pool_alloc_imp(const char *file, int line, 
+				 pj_pool_t *pool, pj_size_t sz);
+
+/* Allocate memory from the pool and zero the memory */
+PJ_DECL(void*) pj_pool_calloc_imp(const char *file, int line, 
+				  pj_pool_t *pool, unsigned cnt, 
+				  unsigned elemsz);
+
+/* Allocate memory from the pool and zero the memory */
+PJ_DECL(void*) pj_pool_zalloc_imp(const char *file, int line, 
+				  pj_pool_t *pool, pj_size_t sz);
+
+
+typedef struct pj_pool_factory
+{
+    int dummy;
+} pj_pool_factory;
+
+typedef struct pj_caching_pool 
+{
+    pj_pool_factory factory;
+} pj_caching_pool;
+
+
+#define pj_caching_pool_init( cp, pol, mac)
+#define pj_caching_pool_destroy(cp)
+#define pj_pool_factory_dump(pf, detail)
+
+
+#endif	/* __PJ_POOL_ALT_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/pool_buf.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/pool_buf.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/pool_buf.h	(revision 1163)
@@ -0,0 +1,101 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 __POOL_STACK_H__
+#define __POOL_STACK_H__
+
+#include <pj/pool.h>
+
+/**
+ * @defgroup PJ_POOL_BUFFER Stack/Buffer Based Memory Pool Allocator
+ * @ingroup PJ_POOL_GROUP
+ * @brief Stack/buffer based pool.
+ *
+ * This section describes an implementation of memory pool which uses
+ * memory allocated from the stack. Application creates this pool
+ * by specifying a buffer (which can be allocated from static memory or
+ * stack variable), and then use normal pool API to access/use the pool.
+ *
+ * If the buffer specified during pool creation is a buffer located in the
+ * stack, the pool will be invalidated (or implicitly destroyed) when the
+ * execution leaves the enclosing block containing the buffer. Note
+ * that application must make sure that any objects allocated from this
+ * pool (such as mutexes) have been destroyed before the pool gets
+ * invalidated.
+ *
+ * Sample usage:
+ *
+ * \code
+  #include <pjlib.h>
+
+  static void test()
+  {
+    char buffer[500];
+    pj_pool_t *pool;
+    void *p;
+
+    pool = pj_pool_create_on_buf("thepool", buffer, sizeof(buffer));
+
+    // Use the pool as usual
+    p = pj_pool_alloc(pool, ...);
+    ...
+
+    // No need to release the pool
+  }
+
+  int main()
+  {
+    pj_init();
+    test();
+    return 0;
+  }
+
+   \endcode
+ *
+ * @{
+ */
+
+
+/**
+ * Create the pool using the specified buffer as the pool's memory.
+ * Subsequent allocations made from the pool will use the memory from
+ * this buffer.
+ *
+ * If the buffer specified in the parameter is a buffer located in the
+ * stack, the pool will be invalid (or implicitly destroyed) when the
+ * execution leaves the enclosing block containing the buffer. Note
+ * that application must make sure that any objects allocated from this
+ * pool (such as mutexes) have been destroyed before the pool gets
+ * invalidated.
+ *
+ * @param name	    Optional pool name.
+ * @param buf	    Buffer to be used by the pool.
+ * @param size	    The size of the buffer.
+ *
+ * @return	    The memory pool instance.
+ */
+PJ_DECL(pj_pool_t*) pj_pool_create_on_buf(const char *name,
+					  void *buf,
+					  pj_size_t size);
+
+/**
+ * @}
+ */
+
+#endif	/* __POOL_STACK_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/pool_i.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/pool_i.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/pool_i.h	(revision 1163)
@@ -0,0 +1,94 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/string.h>
+
+PJ_DECL(void*) pj_pool_allocate_find(pj_pool_t *pool, unsigned size);
+
+PJ_IDEF(pj_size_t) pj_pool_get_capacity( pj_pool_t *pool )
+{
+    return pool->capacity;
+}
+
+PJ_IDEF(pj_size_t) pj_pool_get_used_size( pj_pool_t *pool )
+{
+    pj_pool_block *b = pool->block_list.next;
+    pj_size_t used_size = sizeof(pj_pool_t);
+    while (b != &pool->block_list) {
+	used_size += (b->cur - b->buf) + sizeof(pj_pool_block);
+	b = b->next;
+    }
+    return used_size;
+}
+
+PJ_IDEF(void*) pj_pool_alloc_from_block( pj_pool_block *block, pj_size_t size )
+{
+    /* The operation below is valid for size==0. 
+     * When size==0, the function will return the pointer to the pool
+     * memory address, but no memory will be allocated.
+     */
+    if (size & (PJ_POOL_ALIGNMENT-1)) {
+	size = (size + PJ_POOL_ALIGNMENT) & ~(PJ_POOL_ALIGNMENT-1);
+    }
+    if ((unsigned)(block->end - block->cur) >= size) {
+	void *ptr = block->cur;
+	block->cur += size;
+	return ptr;
+    }
+    return NULL;
+}
+
+PJ_IDEF(void*) pj_pool_alloc( pj_pool_t *pool, pj_size_t size)
+{
+    void *ptr = pj_pool_alloc_from_block(pool->block_list.next, size);
+    if (!ptr)
+	ptr = pj_pool_allocate_find(pool, size);
+    return ptr;
+}
+
+
+PJ_IDEF(void*) pj_pool_calloc( pj_pool_t *pool, pj_size_t count, pj_size_t size)
+{
+    void *buf = pj_pool_alloc( pool, size*count);
+    if (buf)
+	pj_bzero(buf, size * count);
+    return buf;
+}
+
+PJ_IDEF(const char *) pj_pool_getobjname( const pj_pool_t *pool )
+{
+    return pool->obj_name;
+}
+
+PJ_IDEF(pj_pool_t*) pj_pool_create( pj_pool_factory *f, 
+				    const char *name,
+				    pj_size_t initial_size, 
+				    pj_size_t increment_size,
+				    pj_pool_callback *callback)
+{
+    return (*f->create_pool)(f, name, initial_size, increment_size, callback);
+}
+
+PJ_IDEF(void) pj_pool_release( pj_pool_t *pool )
+{
+    if (pool->factory->release_pool)
+	(*pool->factory->release_pool)(pool->factory, pool);
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/rand.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/rand.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/rand.h	(revision 1163)
@@ -0,0 +1,65 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_RAND_H__
+#define __PJ_RAND_H__
+
+/**
+ * @file rand.h
+ * @brief Random Number Generator.
+ */
+
+#include <pj/config.h>
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJ_RAND Random Number Generator
+ * @ingroup PJ_MISC
+ * @{
+ * This module contains functions for generating random numbers.
+ * This abstraction is needed not only because not all platforms have
+ * \a rand() and \a srand(), but also on some platforms \a rand()
+ * only has 16-bit randomness, which is not good enough.
+ */
+
+/**
+ * Put in seed to random number generator.
+ *
+ * @param seed	    Seed value.
+ */
+PJ_DECL(void) pj_srand(unsigned int seed);
+
+
+/**
+ * Generate random integer with 32bit randomness.
+ *
+ * @return a random integer.
+ */
+PJ_DECL(int) pj_rand(void);
+
+
+/** @} */
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJ_RAND_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/rbtree.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/rbtree.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/rbtree.h	(revision 1163)
@@ -0,0 +1,209 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_RBTREE_H__
+#define __PJ_RBTREE_H__
+
+/**
+ * @file rbtree.h
+ * @brief Red/Black Tree
+ */
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_RBTREE Red/Black Balanced Tree
+ * @ingroup PJ_DS
+ * @brief
+ * Red/Black tree is the variant of balanced tree, where the search, insert, 
+ * and delete operation is \b guaranteed to take at most \a O( lg(n) ).
+ * @{
+ */
+/**
+ * Color type for Red-Black tree.
+ */ 
+typedef enum pj_rbcolor_t
+{
+    PJ_RBCOLOR_BLACK,
+    PJ_RBCOLOR_RED
+} pj_rbcolor_t;
+
+/**
+ * The type of the node of the R/B Tree.
+ */
+typedef struct pj_rbtree_node 
+{
+    /** Pointers to the node's parent, and left and right siblings. */
+    struct pj_rbtree_node *parent, *left, *right;
+
+    /** Key associated with the node. */
+    const void *key;
+
+    /** User data associated with the node. */
+    void *user_data;
+
+    /** The R/B Tree node color. */
+    pj_rbcolor_t color;
+
+} pj_rbtree_node;
+
+
+/**
+ * The type of function use to compare key value of tree node.
+ * @return
+ *  0 if the keys are equal
+ * <0 if key1 is lower than key2
+ * >0 if key1 is greater than key2.
+ */
+typedef int pj_rbtree_comp(const void *key1, const void *key2);
+
+
+/**
+ * Declaration of a red-black tree. All elements in the tree must have UNIQUE
+ * key.
+ * A red black tree always maintains the balance of the tree, so that the
+ * tree height will not be greater than lg(N). Insert, search, and delete
+ * operation will take lg(N) on the worst case. But for insert and delete,
+ * there is additional time needed to maintain the balance of the tree.
+ */
+typedef struct pj_rbtree
+{
+    pj_rbtree_node null_node;   /**< Constant to indicate NULL node.    */
+    pj_rbtree_node *null;       /**< Constant to indicate NULL node.    */
+    pj_rbtree_node *root;       /**< Root tree node.                    */
+    unsigned size;              /**< Number of elements in the tree.    */
+    pj_rbtree_comp *comp;       /**< Key comparison function.           */
+} pj_rbtree;
+
+
+/**
+ * Guidance on how much memory required for each of the node.
+ */
+#define PJ_RBTREE_NODE_SIZE	    (sizeof(pj_rbtree_node))
+
+
+/**
+ * Guidance on memory required for the tree.
+ */
+#define PJ_RBTREE_SIZE		    (sizeof(pj_rbtree))
+
+
+/**
+ * Initialize the tree.
+ * @param tree the tree to be initialized.
+ * @param comp key comparison function to be used for this tree.
+ */
+PJ_DECL(void) pj_rbtree_init( pj_rbtree *tree, pj_rbtree_comp *comp);
+
+/**
+ * Get the first element in the tree.
+ * The first element always has the least value for the key, according to
+ * the comparison function.
+ * @param tree the tree.
+ * @return the tree node, or NULL if the tree has no element.
+ */
+PJ_DECL(pj_rbtree_node*) pj_rbtree_first( pj_rbtree *tree );
+
+/**
+ * Get the last element in the tree.
+ * The last element always has the greatest key value, according to the
+ * comparison function defined for the tree.
+ * @param tree the tree.
+ * @return the tree node, or NULL if the tree has no element.
+ */
+PJ_DECL(pj_rbtree_node*) pj_rbtree_last( pj_rbtree *tree );
+
+/**
+ * Get the successive element for the specified node.
+ * The successive element is an element with greater key value.
+ * @param tree the tree.
+ * @param node the node.
+ * @return the successive node, or NULL if the node has no successor.
+ */
+PJ_DECL(pj_rbtree_node*) pj_rbtree_next( pj_rbtree *tree, 
+					 pj_rbtree_node *node );
+
+/**
+ * The the previous node for the specified node.
+ * The previous node is an element with less key value.
+ * @param tree the tree.
+ * @param node the node.
+ * @return the previous node, or NULL if the node has no previous node.
+ */
+PJ_DECL(pj_rbtree_node*) pj_rbtree_prev( pj_rbtree *tree, 
+					 pj_rbtree_node *node );
+
+/**
+ * Insert a new node. 
+ * The node will be inserted at sorted location. The key of the node must 
+ * be UNIQUE, i.e. it hasn't existed in the tree.
+ * @param tree the tree.
+ * @param node the node to be inserted.
+ * @return zero on success, or -1 if the key already exist.
+ */
+PJ_DECL(int) pj_rbtree_insert( pj_rbtree *tree, 
+			       pj_rbtree_node *node );
+
+/**
+ * Find a node which has the specified key.
+ * @param tree the tree.
+ * @param key the key to search.
+ * @return the tree node with the specified key, or NULL if the key can not
+ *         be found.
+ */
+PJ_DECL(pj_rbtree_node*) pj_rbtree_find( pj_rbtree *tree,
+					 const void *key );
+
+/**
+ * Erase a node from the tree.
+ * @param tree the tree.
+ * @param node the node to be erased.
+ * @return the tree node itself.
+ */
+PJ_DECL(pj_rbtree_node*) pj_rbtree_erase( pj_rbtree *tree,
+					  pj_rbtree_node *node );
+
+/**
+ * Get the maximum tree height from the specified node.
+ * @param tree the tree.
+ * @param node the node, or NULL to get the root of the tree.
+ * @return the maximum height, which should be at most lg(N)
+ */
+PJ_DECL(unsigned) pj_rbtree_max_height( pj_rbtree *tree,
+					pj_rbtree_node *node );
+
+/**
+ * Get the minumum tree height from the specified node.
+ * @param tree the tree.
+ * @param node the node, or NULL to get the root of the tree.
+ * @return the height
+ */
+PJ_DECL(unsigned) pj_rbtree_min_height( pj_rbtree *tree,
+					pj_rbtree_node *node );
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+#endif	/* __PJ_RBTREE_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/sock.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/sock.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/sock.h	(revision 1163)
@@ -0,0 +1,777 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_SOCK_H__
+#define __PJ_SOCK_H__
+
+/**
+ * @file sock.h
+ * @brief Socket Abstraction.
+ */
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL 
+
+
+/**
+ * @defgroup PJ_SOCK Socket Abstraction
+ * @ingroup PJ_IO
+ * @{
+ *
+ * The PJLIB socket abstraction layer is a thin and very portable abstraction
+ * for socket API. It provides API similar to BSD socket API. The abstraction
+ * is needed because BSD socket API is not always available on all platforms,
+ * therefore it wouldn't be possible to create a trully portable network
+ * programs unless we provide such abstraction.
+ *
+ * Applications can use this API directly in their application, just
+ * as they would when using traditional BSD socket API, provided they
+ * call #pj_init() first.
+ *
+ * \section pj_sock_examples_sec Examples
+ *
+ * For some examples on how to use the socket API, please see:
+ *
+ *  - \ref page_pjlib_sock_test
+ *  - \ref page_pjlib_select_test
+ *  - \ref page_pjlib_sock_perf_test
+ */
+
+
+/**
+ * Supported address families. 
+ * APPLICATION MUST USE THESE VALUES INSTEAD OF NORMAL AF_*, BECAUSE
+ * THE LIBRARY WILL DO TRANSLATION TO THE NATIVE VALUE.
+ */
+extern const pj_uint16_t PJ_AF_UNIX;    /**< Unix domain socket.	*/
+#define PJ_AF_LOCAL	 PJ_AF_UNIX;    /**< POSIX name for AF_UNIX	*/
+extern const pj_uint16_t PJ_AF_INET;    /**< Internet IP protocol.	*/
+extern const pj_uint16_t PJ_AF_INET6;   /**< IP version 6.		*/
+extern const pj_uint16_t PJ_AF_PACKET;  /**< Packet family.		*/
+extern const pj_uint16_t PJ_AF_IRDA;    /**< IRDA sockets.		*/
+
+
+/**
+ * Supported types of sockets.
+ * APPLICATION MUST USE THESE VALUES INSTEAD OF NORMAL SOCK_*, BECAUSE
+ * THE LIBRARY WILL TRANSLATE THE VALUE TO THE NATIVE VALUE.
+ */
+
+extern const pj_uint16_t PJ_SOCK_STREAM; /**< Sequenced, reliable, connection-
+					      based byte streams.           */
+extern const pj_uint16_t PJ_SOCK_DGRAM;  /**< Connectionless, unreliable 
+					      datagrams of fixed maximum 
+					      lengths.                      */
+extern const pj_uint16_t PJ_SOCK_RAW;    /**< Raw protocol interface.       */
+extern const pj_uint16_t PJ_SOCK_RDM;    /**< Reliably-delivered messages.  */
+
+
+/**
+ * Socket level specified in #pj_sock_setsockopt() or #pj_sock_getsockopt().
+ * APPLICATION MUST USE THESE VALUES INSTEAD OF NORMAL SOL_*, BECAUSE
+ * THE LIBRARY WILL TRANSLATE THE VALUE TO THE NATIVE VALUE.
+ */
+extern const pj_uint16_t PJ_SOL_SOCKET;	/**< Socket level.  */
+extern const pj_uint16_t PJ_SOL_IP;	/**< IP level.	    */
+extern const pj_uint16_t PJ_SOL_TCP;	/**< TCP level.	    */
+extern const pj_uint16_t PJ_SOL_UDP;	/**< UDP level.	    */
+extern const pj_uint16_t PJ_SOL_IPV6;	/**< IP version 6   */
+
+
+/* IP_TOS 
+ *
+ * Note:
+ *  TOS CURRENTLY DOES NOT WORK IN Windows 2000 and above!
+ *  See http://support.microsoft.com/kb/248611
+ */
+extern const pj_uint16_t PJ_IP_TOS;	/**< IP_TOS optname in setsockopt() */
+
+
+/*
+ * IP TOS related constats.
+ *
+ * Note:
+ *  TOS CURRENTLY DOES NOT WORK IN Windows 2000 and above!
+ *  See http://support.microsoft.com/kb/248611
+ */
+extern const pj_uint16_t PJ_IPTOS_LOWDELAY;	/**< Minimize  delays	    */
+extern const pj_uint16_t PJ_IPTOS_THROUGHPUT;	/**< Optimize throughput    */
+extern const pj_uint16_t PJ_IPTOS_RELIABILITY;	/**< Optimize for reliability*/
+extern const pj_uint16_t PJ_IPTOS_MINCOST;	/**< "filler data" where slow 
+						 transmission does't matter */
+
+
+/**
+ * Values to be specified as \c optname when calling #pj_sock_setsockopt() 
+ * or #pj_sock_getsockopt().
+ */
+extern const pj_uint16_t PJ_SO_TYPE;    /**< Socket type.               */
+extern const pj_uint16_t PJ_SO_RCVBUF;  /**< Buffer size for receive.   */
+extern const pj_uint16_t PJ_SO_SNDBUF;  /**< Buffer size for send.      */
+
+
+/*
+ * Flags to be specified in #pj_sock_recv, #pj_sock_send, etc.
+ */
+extern const int PJ_MSG_OOB;	    /**< Out-of-band messages.		 */
+extern const int PJ_MSG_PEEK;	    /**< Peek, don't remove from buffer. */
+extern const int PJ_MSG_DONTROUTE;  /**< Don't route.			 */
+
+
+/**
+ * Flag to be specified in #pj_sock_shutdown.
+ */
+typedef enum pj_socket_sd_type
+{
+    PJ_SD_RECEIVE   = 0,    /**< No more receive.	    */
+    PJ_SHUT_RD	    = 0,    /**< Alias for SD_RECEIVE.	    */
+    PJ_SD_SEND	    = 1,    /**< No more sending.	    */
+    PJ_SHUT_WR	    = 1,    /**< Alias for SD_SEND.	    */
+    PJ_SD_BOTH	    = 2,    /**< No more send and receive.  */
+    PJ_SHUT_RDWR    = 2     /**< Alias for SD_BOTH.	    */
+} pj_socket_sd_type;
+
+
+
+/** Address to accept any incoming messages. */
+#define PJ_INADDR_ANY	    ((pj_uint32_t)0)
+
+/** Address indicating an error return */
+#define PJ_INADDR_NONE	    ((pj_uint32_t)0xffffffff)
+
+/** Address to send to all hosts. */
+#define PJ_INADDR_BROADCAST ((pj_uint32_t)0xffffffff)
+
+
+/** 
+ * Maximum length specifiable by #pj_sock_listen().
+ * If the build system doesn't override this value, then the lowest 
+ * denominator (five, in Win32 systems) will be used.
+ */
+#if !defined(PJ_SOMAXCONN)
+#  define PJ_SOMAXCONN	5
+#endif
+
+
+/**
+ * Constant for invalid socket returned by #pj_sock_socket() and
+ * #pj_sock_accept().
+ */
+#define PJ_INVALID_SOCKET   (-1)
+
+#undef s_addr
+
+/**
+ * This structure describes Internet address.
+ */
+typedef struct pj_in_addr
+{
+    pj_uint32_t	s_addr;		/**< The 32bit IP address.	    */
+} pj_in_addr;
+
+
+/**
+ * This structure describes Internet socket address.
+ * If PJ_SOCKADDR_HAS_LEN is not zero, then sin_zero_len member is added
+ * to this struct. As far the application is concerned, the value of
+ * this member will always be zero. Internally, PJLIB may modify the value
+ * before calling OS socket API, and reset the value back to zero before
+ * returning the struct to application.
+ */
+struct pj_sockaddr_in
+{
+#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0
+    pj_uint8_t  sin_zero_len;	/**< Just ignore this.		    */
+    pj_uint8_t  sin_family;	/**< Address family.		    */
+#else
+    pj_uint16_t	sin_family;	/**< Address family.		    */
+#endif
+    pj_uint16_t	sin_port;	/**< Transport layer port number.   */
+    pj_in_addr	sin_addr;	/**< IP address.		    */
+    char	sin_zero[8];	/**< Padding.			    */
+};
+
+#undef s6_addr
+
+/**
+ * This structure describes IPv6 address.
+ */
+typedef struct pj_in6_addr
+{
+    /** Union of address formats. */
+    union {
+	pj_uint8_t  u6_addr8[16];   /**< u6_addr8   */
+	pj_uint16_t u6_addr16[8];   /**< u6_addr16  */
+	pj_uint32_t u6_addr32[4];   /**< u6_addr32  */
+    } in6_u;
+/** Shortcut to access in6_u.u6_addr8. */
+#define s6_addr                 in6_u.u6_addr8
+/** Shortcut to access in6_u.u6_addr16. */
+#define s6_addr16               in6_u.u6_addr16
+/** Shortcut to access in6_u.u6_addr32. */
+#define s6_addr32               in6_u.u6_addr32
+} pj_in6_addr;
+
+/** Initializer value for pj_in6_addr. */
+#define PJ_IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }
+
+/** Initializer value for pj_in6_addr. */
+#define PJ_IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
+
+/**
+ * This structure describes IPv6 socket address.
+ * If PJ_SOCKADDR_HAS_LEN is not zero, then sin_zero_len member is added
+ * to this struct. As far the application is concerned, the value of
+ * this member will always be zero. Internally, PJLIB may modify the value
+ * before calling OS socket API, and reset the value back to zero before
+ * returning the struct to application.
+ */
+typedef struct pj_sockaddr_in6
+{
+#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0
+    pj_uint8_t  sin_zero_len;	    /**< Just ignore this.	   */
+    pj_uint8_t  sin_family;	    /**< Address family.	   */
+#else
+    pj_uint16_t	sin6_family;	    /**< Address family		    */
+#endif
+    pj_uint16_t	sin6_port;	    /**< Transport layer port number. */
+    pj_uint32_t	sin6_flowinfo;	    /**< IPv6 flow information	    */
+    pj_in6_addr sin6_addr;	    /**< IPv6 address.		    */
+    pj_uint32_t sin6_scope_id;	    /**< IPv6 scope-id		    */
+} pj_sockaddr_in6;
+
+
+/**
+ * This structure describes common attributes found in transport addresses.
+ * If PJ_SOCKADDR_HAS_LEN is not zero, then sa_zero_len member is added
+ * to this struct. As far the application is concerned, the value of
+ * this member will always be zero. Internally, PJLIB may modify the value
+ * before calling OS socket API, and reset the value back to zero before
+ * returning the struct to application.
+ */
+typedef struct pj_addr_hdr
+{
+#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0
+    pj_uint8_t  sa_zero_len;
+    pj_uint8_t  sa_family;
+#else
+    pj_uint16_t	sa_family;	/**< Common data: address family.   */
+#endif
+} pj_addr_hdr;
+
+
+/**
+ * This union describes a generic socket address.
+ */
+typedef union pj_sockaddr
+{
+    pj_addr_hdr	    addr;	/**< Generic transport address.	    */
+    pj_sockaddr_in  ipv4;	/**< IPv4 transport address.	    */
+    pj_sockaddr_in6 ipv6;	/**< IPv6 transport address.	    */
+} pj_sockaddr;
+
+
+/*****************************************************************************
+ *
+ * SOCKET ADDRESS MANIPULATION.
+ *
+ *****************************************************************************
+ */
+
+/**
+ * Convert 16-bit value from network byte order to host byte order.
+ *
+ * @param netshort  16-bit network value.
+ * @return	    16-bit host value.
+ */
+PJ_DECL(pj_uint16_t) pj_ntohs(pj_uint16_t netshort);
+
+/**
+ * Convert 16-bit value from host byte order to network byte order.
+ *
+ * @param hostshort 16-bit host value.
+ * @return	    16-bit network value.
+ */
+PJ_DECL(pj_uint16_t) pj_htons(pj_uint16_t hostshort);
+
+/**
+ * Convert 32-bit value from network byte order to host byte order.
+ *
+ * @param netlong   32-bit network value.
+ * @return	    32-bit host value.
+ */
+PJ_DECL(pj_uint32_t) pj_ntohl(pj_uint32_t netlong);
+
+/**
+ * Convert 32-bit value from host byte order to network byte order.
+ *
+ * @param hostlong  32-bit host value.
+ * @return	    32-bit network value.
+ */
+PJ_DECL(pj_uint32_t) pj_htonl(pj_uint32_t hostlong);
+
+/**
+ * Convert an Internet host address given in network byte order
+ * to string in standard numbers and dots notation.
+ *
+ * @param inaddr    The host address.
+ * @return	    The string address.
+ */
+PJ_DECL(char*) pj_inet_ntoa(pj_in_addr inaddr);
+
+/**
+ * This function converts the Internet host address cp from the standard
+ * numbers-and-dots notation into binary data and stores it in the structure
+ * that inp points to. 
+ *
+ * @param cp	IP address in standard numbers-and-dots notation.
+ * @param inp	Structure that holds the output of the conversion.
+ *
+ * @return	nonzero if the address is valid, zero if not.
+ */
+PJ_DECL(int) pj_inet_aton(const pj_str_t *cp, struct pj_in_addr *inp);
+
+/**
+ * Convert address string with numbers and dots to binary IP address.
+ * 
+ * @param cp	    The IP address in numbers and dots notation.
+ * @return	    If success, the IP address is returned in network
+ *		    byte order. If failed, PJ_INADDR_NONE will be
+ *		    returned.
+ * @remark
+ * This is an obsolete interface to #pj_inet_aton(); it is obsolete
+ * because -1 is a valid address (255.255.255.255), and #pj_inet_aton()
+ * provides a cleaner way to indicate error return.
+ */
+PJ_DECL(pj_in_addr) pj_inet_addr(const pj_str_t *cp);
+
+/**
+ * Convert address string with numbers and dots to binary IP address.
+ * 
+ * @param cp	    The IP address in numbers and dots notation.
+ * @return	    If success, the IP address is returned in network
+ *		    byte order. If failed, PJ_INADDR_NONE will be
+ *		    returned.
+ * @remark
+ * This is an obsolete interface to #pj_inet_aton(); it is obsolete
+ * because -1 is a valid address (255.255.255.255), and #pj_inet_aton()
+ * provides a cleaner way to indicate error return.
+ */
+PJ_DECL(pj_in_addr) pj_inet_addr2(const char *cp);
+
+/**
+ * Get the transport layer port number of an Internet socket address.
+ * The port is returned in host byte order.
+ *
+ * @param addr	    The IP socket address.
+ * @return	    Port number, in host byte order.
+ */
+PJ_INLINE(pj_uint16_t) pj_sockaddr_in_get_port(const pj_sockaddr_in *addr)
+{
+    return pj_ntohs(addr->sin_port);
+}
+
+/**
+ * Set the port number of an Internet socket address.
+ *
+ * @param addr	    The IP socket address.
+ * @param hostport  The port number, in host byte order.
+ */
+PJ_INLINE(void) pj_sockaddr_in_set_port(pj_sockaddr_in *addr, 
+					pj_uint16_t hostport)
+{
+    addr->sin_port = pj_htons(hostport);
+}
+
+/**
+ * Get the IP address of an Internet socket address.
+ * The address is returned as 32bit value in host byte order.
+ *
+ * @param addr	    The IP socket address.
+ * @return	    32bit address, in host byte order.
+ */
+PJ_INLINE(pj_in_addr) pj_sockaddr_in_get_addr(const pj_sockaddr_in *addr)
+{
+    pj_in_addr in_addr;
+    in_addr.s_addr = pj_ntohl(addr->sin_addr.s_addr);
+    return in_addr;
+}
+
+/**
+ * Set the IP address of an Internet socket address.
+ *
+ * @param addr	    The IP socket address.
+ * @param hostaddr  The host address, in host byte order.
+ */
+PJ_INLINE(void) pj_sockaddr_in_set_addr(pj_sockaddr_in *addr,
+					pj_uint32_t hostaddr)
+{
+    addr->sin_addr.s_addr = pj_htonl(hostaddr);
+}
+
+/**
+ * Set the IP address of an IP socket address from string address, 
+ * with resolving the host if necessary. The string address may be in a
+ * standard numbers and dots notation or may be a hostname. If hostname
+ * is specified, then the function will resolve the host into the IP
+ * address.
+ *
+ * @param addr	    The IP socket address to be set.
+ * @param cp	    The address string, which can be in a standard 
+ *		    dotted numbers or a hostname to be resolved.
+ *
+ * @return	    Zero on success.
+ */
+PJ_DECL(pj_status_t) pj_sockaddr_in_set_str_addr( pj_sockaddr_in *addr,
+					          const pj_str_t *cp);
+
+/**
+ * Set the IP address and port of an IP socket address.
+ * The string address may be in a standard numbers and dots notation or 
+ * may be a hostname. If hostname is specified, then the function will 
+ * resolve the host into the IP address.
+ *
+ * @param addr	    The IP socket address to be set.
+ * @param cp	    The address string, which can be in a standard 
+ *		    dotted numbers or a hostname to be resolved.
+ * @param port	    The port number, in host byte order.
+ *
+ * @return	    Zero on success.
+ */
+PJ_DECL(pj_status_t) pj_sockaddr_in_init( pj_sockaddr_in *addr,
+				          const pj_str_t *cp,
+					  pj_uint16_t port);
+
+
+/*****************************************************************************
+ *
+ * HOST NAME AND ADDRESS.
+ *
+ *****************************************************************************
+ */
+
+/**
+ * Get system's host name.
+ *
+ * @return	    The hostname, or empty string if the hostname can not
+ *		    be identified.
+ */
+PJ_DECL(const pj_str_t*) pj_gethostname(void);
+
+/**
+ * Get host's IP address, which the the first IP address that is resolved
+ * from the hostname.
+ *
+ * @return	    The host's IP address, PJ_INADDR_NONE if the host
+ *		    IP address can not be identified.
+ */
+PJ_DECL(pj_in_addr) pj_gethostaddr(void);
+
+
+/*****************************************************************************
+ *
+ * SOCKET API.
+ *
+ *****************************************************************************
+ */
+
+/**
+ * Create new socket/endpoint for communication.
+ *
+ * @param family    Specifies a communication domain; this selects the
+ *		    protocol family which will be used for communication.
+ * @param type	    The socket has the indicated type, which specifies the 
+ *		    communication semantics.
+ * @param protocol  Specifies  a  particular  protocol  to  be used with the
+ *		    socket.  Normally only a single protocol exists to support 
+ *		    a particular socket  type  within  a given protocol family, 
+ *		    in which a case protocol can be specified as 0.
+ * @param sock	    New socket descriptor, or PJ_INVALID_SOCKET on error.
+ *
+ * @return	    Zero on success.
+ */
+PJ_DECL(pj_status_t) pj_sock_socket(int family, 
+				    int type, 
+				    int protocol,
+				    pj_sock_t *sock);
+
+/**
+ * Close the socket descriptor.
+ *
+ * @param sockfd    The socket descriptor.
+ *
+ * @return	    Zero on success.
+ */
+PJ_DECL(pj_status_t) pj_sock_close(pj_sock_t sockfd);
+
+
+/**
+ * This function gives the socket sockfd the local address my_addr. my_addr is
+ * addrlen bytes long.  Traditionally, this is called assigning a name to
+ * a socket. When a socket is created with #pj_sock_socket(), it exists in a
+ * name space (address family) but has no name assigned.
+ *
+ * @param sockfd    The socket desriptor.
+ * @param my_addr   The local address to bind the socket to.
+ * @param addrlen   The length of the address.
+ *
+ * @return	    Zero on success.
+ */
+PJ_DECL(pj_status_t) pj_sock_bind( pj_sock_t sockfd, 
+				   const pj_sockaddr_t *my_addr,
+				   int addrlen);
+
+/**
+ * Bind the IP socket sockfd to the given address and port.
+ *
+ * @param sockfd    The socket descriptor.
+ * @param addr	    Local address to bind the socket to, in host byte order.
+ * @param port	    The local port to bind the socket to, in host byte order.
+ *
+ * @return	    Zero on success.
+ */
+PJ_DECL(pj_status_t) pj_sock_bind_in( pj_sock_t sockfd, 
+				      pj_uint32_t addr,
+				      pj_uint16_t port);
+
+#if PJ_HAS_TCP
+/**
+ * Listen for incoming connection. This function only applies to connection
+ * oriented sockets (such as PJ_SOCK_STREAM or PJ_SOCK_SEQPACKET), and it
+ * indicates the willingness to accept incoming connections.
+ *
+ * @param sockfd	The socket descriptor.
+ * @param backlog	Defines the maximum length the queue of pending
+ *			connections may grow to.
+ *
+ * @return		Zero on success.
+ */
+PJ_DECL(pj_status_t) pj_sock_listen( pj_sock_t sockfd, 
+				     int backlog );
+
+/**
+ * Accept new connection on the specified connection oriented server socket.
+ *
+ * @param serverfd  The server socket.
+ * @param newsock   New socket on success, of PJ_INVALID_SOCKET if failed.
+ * @param addr	    A pointer to sockaddr type. If the argument is not NULL,
+ *		    it will be filled by the address of connecting entity.
+ * @param addrlen   Initially specifies the length of the address, and upon
+ *		    return will be filled with the exact address length.
+ *
+ * @return	    Zero on success, or the error number.
+ */
+PJ_DECL(pj_status_t) pj_sock_accept( pj_sock_t serverfd,
+				     pj_sock_t *newsock,
+				     pj_sockaddr_t *addr,
+				     int *addrlen);
+#endif
+
+/**
+ * The file descriptor sockfd must refer to a socket.  If the socket is of
+ * type PJ_SOCK_DGRAM  then the serv_addr address is the address to which
+ * datagrams are sent by default, and the only address from which datagrams
+ * are received. If the socket is of type PJ_SOCK_STREAM or PJ_SOCK_SEQPACKET,
+ * this call attempts to make a connection to another socket.  The
+ * other socket is specified by serv_addr, which is an address (of length
+ * addrlen) in the communications space of the  socket.  Each  communications
+ * space interprets the serv_addr parameter in its own way.
+ *
+ * @param sockfd	The socket descriptor.
+ * @param serv_addr	Server address to connect to.
+ * @param addrlen	The length of server address.
+ *
+ * @return		Zero on success.
+ */
+PJ_DECL(pj_status_t) pj_sock_connect( pj_sock_t sockfd,
+				      const pj_sockaddr_t *serv_addr,
+				      int addrlen);
+
+/**
+ * Return the address of peer which is connected to socket sockfd.
+ *
+ * @param sockfd	The socket descriptor.
+ * @param addr		Pointer to sockaddr structure to which the address
+ *			will be returned.
+ * @param namelen	Initially the length of the addr. Upon return the value
+ *			will be set to the actual length of the address.
+ *
+ * @return		Zero on success.
+ */
+PJ_DECL(pj_status_t) pj_sock_getpeername(pj_sock_t sockfd,
+					  pj_sockaddr_t *addr,
+					  int *namelen);
+
+/**
+ * Return the current name of the specified socket.
+ *
+ * @param sockfd	The socket descriptor.
+ * @param addr		Pointer to sockaddr structure to which the address
+ *			will be returned.
+ * @param namelen	Initially the length of the addr. Upon return the value
+ *			will be set to the actual length of the address.
+ *
+ * @return		Zero on success.
+ */
+PJ_DECL(pj_status_t) pj_sock_getsockname( pj_sock_t sockfd,
+					  pj_sockaddr_t *addr,
+					  int *namelen);
+
+/**
+ * Get socket option associated with a socket. Options may exist at multiple
+ * protocol levels; they are always present at the uppermost socket level.
+ *
+ * @param sockfd	The socket descriptor.
+ * @param level		The level which to get the option from.
+ * @param optname	The option name.
+ * @param optval	Identifies the buffer which the value will be
+ *			returned.
+ * @param optlen	Initially contains the length of the buffer, upon
+ *			return will be set to the actual size of the value.
+ *
+ * @return		Zero on success.
+ */
+PJ_DECL(pj_status_t) pj_sock_getsockopt( pj_sock_t sockfd,
+					 pj_uint16_t level,
+					 pj_uint16_t optname,
+					 void *optval,
+					 int *optlen);
+/**
+ * Manipulate the options associated with a socket. Options may exist at 
+ * multiple protocol levels; they are always present at the uppermost socket 
+ * level.
+ *
+ * @param sockfd	The socket descriptor.
+ * @param level		The level which to get the option from.
+ * @param optname	The option name.
+ * @param optval	Identifies the buffer which contain the value.
+ * @param optlen	The length of the value.
+ *
+ * @return		PJ_SUCCESS or the status code.
+ */
+PJ_DECL(pj_status_t) pj_sock_setsockopt( pj_sock_t sockfd,
+					 pj_uint16_t level,
+					 pj_uint16_t optname,
+					 const void *optval,
+					 int optlen);
+
+
+/**
+ * Receives data stream or message coming to the specified socket.
+ *
+ * @param sockfd	The socket descriptor.
+ * @param buf		The buffer to receive the data or message.
+ * @param len		On input, the length of the buffer. On return,
+ *			contains the length of data received.
+ * @param flags		Combination of #pj_sock_msg_flag.
+ *
+ * @return		PJ_SUCCESS or the error code.
+ */
+PJ_DECL(pj_status_t) pj_sock_recv(pj_sock_t sockfd,
+				  void *buf,
+				  pj_ssize_t *len,
+				  unsigned flags);
+
+/**
+ * Receives data stream or message coming to the specified socket.
+ *
+ * @param sockfd	The socket descriptor.
+ * @param buf		The buffer to receive the data or message.
+ * @param len		On input, the length of the buffer. On return,
+ *			contains the length of data received.
+ * @param flags		Bitmask combination of #pj_sock_msg_flag.
+ * @param from		If not NULL, it will be filled with the source
+ *			address of the connection.
+ * @param fromlen	Initially contains the length of from address,
+ *			and upon return will be filled with the actual
+ *			length of the address.
+ *
+ * @return		PJ_SUCCESS or the error code.
+ */
+PJ_DECL(pj_status_t) pj_sock_recvfrom( pj_sock_t sockfd,
+				      void *buf,
+				      pj_ssize_t *len,
+				      unsigned flags,
+				      pj_sockaddr_t *from,
+				      int *fromlen);
+
+/**
+ * Transmit data to the socket.
+ *
+ * @param sockfd	Socket descriptor.
+ * @param buf		Buffer containing data to be sent.
+ * @param len		On input, the length of the data in the buffer.
+ *			Upon return, it will be filled with the length
+ *			of data sent.
+ * @param flags		Bitmask combination of #pj_sock_msg_flag.
+ *
+ * @return		PJ_SUCCESS or the status code.
+ */
+PJ_DECL(pj_status_t) pj_sock_send(pj_sock_t sockfd,
+				  const void *buf,
+				  pj_ssize_t *len,
+				  unsigned flags);
+
+/**
+ * Transmit data to the socket to the specified address.
+ *
+ * @param sockfd	Socket descriptor.
+ * @param buf		Buffer containing data to be sent.
+ * @param len		On input, the length of the data in the buffer.
+ *			Upon return, it will be filled with the length
+ *			of data sent.
+ * @param flags		Bitmask combination of #pj_sock_msg_flag.
+ * @param to		The address to send.
+ * @param tolen		The length of the address in bytes.
+ *
+ * @return		PJ_SUCCESS or the status code.
+ */
+PJ_DECL(pj_status_t) pj_sock_sendto(pj_sock_t sockfd,
+				    const void *buf,
+				    pj_ssize_t *len,
+				    unsigned flags,
+				    const pj_sockaddr_t *to,
+				    int tolen);
+
+#if PJ_HAS_TCP
+/**
+ * The shutdown call causes all or part of a full-duplex connection on the
+ * socket associated with sockfd to be shut down.
+ *
+ * @param sockfd	The socket descriptor.
+ * @param how		If how is PJ_SHUT_RD, further receptions will be 
+ *			disallowed. If how is PJ_SHUT_WR, further transmissions
+ *			will be disallowed. If how is PJ_SHUT_RDWR, further 
+ *			receptions andtransmissions will be disallowed.
+ *
+ * @return		Zero on success.
+ */
+PJ_DECL(pj_status_t) pj_sock_shutdown( pj_sock_t sockfd,
+				       int how);
+#endif
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+#endif	/* __PJ_SOCK_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/sock_select.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/sock_select.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/sock_select.h	(revision 1163)
@@ -0,0 +1,136 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_SELECT_H__
+#define __PJ_SELECT_H__
+
+/**
+ * @file sock_select.h
+ * @brief Socket select().
+ */
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL 
+
+/**
+ * @defgroup PJ_SOCK_SELECT Socket select() API.
+ * @ingroup PJ_IO
+ * @{
+ * This module provides portable abstraction for \a select() like API.
+ * The abstraction is needed so that it can utilize various event
+ * dispatching mechanisms that are available across platforms.
+ *
+ * The API is very similar to normal \a select() usage. 
+ *
+ * \section pj_sock_select_examples_sec Examples
+ *
+ * For some examples on how to use the select API, please see:
+ *
+ *  - \ref page_pjlib_select_test
+ */
+
+/**
+ * Portable structure declarations for pj_fd_set.
+ * The implementation of pj_sock_select() does not use this structure 
+ * per-se, but instead it will use the native fd_set structure. However,
+ * we must make sure that the size of pj_fd_set_t can accomodate the
+ * native fd_set structure.
+ */
+typedef struct pj_fd_set_t
+{
+    pj_sock_t	data[FD_SETSIZE + 4];   /**< Opaque buffer for fd_set */
+} pj_fd_set_t;
+
+
+/**
+ * Initialize the descriptor set pointed to by fdsetp to the null set.
+ *
+ * @param fdsetp    The descriptor set.
+ */
+PJ_DECL(void) PJ_FD_ZERO(pj_fd_set_t *fdsetp);
+
+
+/**
+ * Add the file descriptor fd to the set pointed to by fdsetp. 
+ * If the file descriptor fd is already in this set, there shall be no effect
+ * on the set, nor will an error be returned.
+ *
+ * @param fd	    The socket descriptor.
+ * @param fdsetp    The descriptor set.
+ */
+PJ_DECL(void) PJ_FD_SET(pj_sock_t fd, pj_fd_set_t *fdsetp);
+
+/**
+ * Remove the file descriptor fd from the set pointed to by fdsetp. 
+ * If fd is not a member of this set, there shall be no effect on the set, 
+ * nor will an error be returned.
+ *
+ * @param fd	    The socket descriptor.
+ * @param fdsetp    The descriptor set.
+ */
+PJ_DECL(void) PJ_FD_CLR(pj_sock_t fd, pj_fd_set_t *fdsetp);
+
+
+/**
+ * Evaluate to non-zero if the file descriptor fd is a member of the set 
+ * pointed to by fdsetp, and shall evaluate to zero otherwise.
+ *
+ * @param fd	    The socket descriptor.
+ * @param fdsetp    The descriptor set.
+ *
+ * @return	    Nonzero if fd is member of the descriptor set.
+ */
+PJ_DECL(pj_bool_t) PJ_FD_ISSET(pj_sock_t fd, const pj_fd_set_t *fdsetp);
+
+
+/**
+ * This function wait for a number of file  descriptors to change status.
+ * The behaviour is the same as select() function call which appear in
+ * standard BSD socket libraries.
+ *
+ * @param n	    On Unices, this specifies the highest-numbered
+ *		    descriptor in any of the three set, plus 1. On Windows,
+ *		    the value is ignored.
+ * @param readfds   Optional pointer to a set of sockets to be checked for 
+ *		    readability.
+ * @param writefds  Optional pointer to a set of sockets to be checked for 
+ *		    writability.
+ * @param exceptfds Optional pointer to a set of sockets to be checked for 
+ *		    errors.
+ * @param timeout   Maximum time for select to wait, or null for blocking 
+ *		    operations.
+ *
+ * @return	    The total number of socket handles that are ready, or
+ *		    zero if the time limit expired, or -1 if an error occurred.
+ */
+PJ_DECL(int) pj_sock_select( int n, 
+			     pj_fd_set_t *readfds, 
+			     pj_fd_set_t *writefds,
+			     pj_fd_set_t *exceptfds, 
+			     const pj_time_val *timeout);
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+#endif	/* __PJ_SELECT_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/string.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/string.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/string.h	(revision 1163)
@@ -0,0 +1,646 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_STRING_H__
+#define __PJ_STRING_H__
+
+/**
+ * @file string.h
+ * @brief PJLIB String Operations.
+ */
+
+#include <pj/types.h>
+#include <pj/compat/string.h>
+
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_PSTR String Operations
+ * @ingroup PJ_DS
+ * @{
+ * This module provides string manipulation API.
+ *
+ * \section pj_pstr_not_null_sec PJLIB String is NOT Null Terminated!
+ *
+ * That is the first information that developers need to know. Instead
+ * of using normal C string, strings in PJLIB are represented as
+ * pj_str_t structure below:
+ *
+ * <pre>
+ *   typedef struct pj_str_t
+ *   {
+ *       char      *ptr;
+ *       pj_size_t  slen;
+ *   } pj_str_t;
+ * </pre>
+ *
+ * There are some advantages of using this approach:
+ *  - the string can point to arbitrary location in memory even
+ *    if the string in that location is not null terminated. This is
+ *    most usefull for text parsing, where the parsed text can just
+ *    point to the original text in the input. If we use C string,
+ *    then we will have to copy the text portion from the input
+ *    to a string variable.
+ *  - because the length of the string is known, string copy operation
+ *    can be made more efficient.
+ *
+ * Most of APIs in PJLIB that expect or return string will represent
+ * the string as pj_str_t instead of normal C string.
+ *
+ * \section pj_pstr_examples_sec Examples
+ *
+ * For some examples, please see:
+ *  - @ref page_pjlib_string_test
+ */
+
+/**
+ * Create string initializer from a normal C string.
+ *
+ * @param str	Null terminated string to be stored.
+ *
+ * @return	pj_str_t.
+ */
+PJ_IDECL(pj_str_t) pj_str(char *str);
+
+/**
+ * Create constant string from normal C string.
+ *
+ * @param str	The string to be initialized.
+ * @param s	Null terminated string.
+ *
+ * @return	pj_str_t.
+ */
+PJ_INLINE(const pj_str_t*) pj_cstr(pj_str_t *str, const char *s)
+{
+    str->ptr = (char*)s;
+    str->slen = s ? (pj_ssize_t)strlen(s) : 0;
+    return str;
+}
+
+/**
+ * Set the pointer and length to the specified value.
+ *
+ * @param str	    the string.
+ * @param ptr	    pointer to set.
+ * @param length    length to set.
+ *
+ * @return the string.
+ */
+PJ_INLINE(pj_str_t*) pj_strset( pj_str_t *str, char *ptr, pj_size_t length)
+{
+    str->ptr = ptr;
+    str->slen = (pj_ssize_t)length;
+    return str;
+}
+
+/**
+ * Set the pointer and length of the string to the source string, which
+ * must be NULL terminated.
+ *
+ * @param str	    the string.
+ * @param src	    pointer to set.
+ *
+ * @return the string.
+ */
+PJ_INLINE(pj_str_t*) pj_strset2( pj_str_t *str, char *src)
+{
+    str->ptr = src;
+    str->slen = src ? (pj_ssize_t)strlen(src) : 0;
+    return str;
+}
+
+/**
+ * Set the pointer and the length of the string.
+ *
+ * @param str	    The target string.
+ * @param begin	    The start of the string.
+ * @param end	    The end of the string.
+ *
+ * @return the target string.
+ */
+PJ_INLINE(pj_str_t*) pj_strset3( pj_str_t *str, char *begin, char *end )
+{
+    str->ptr = begin;
+    str->slen = (pj_ssize_t)(end-begin);
+    return str;
+}
+
+/**
+ * Assign string.
+ *
+ * @param dst	    The target string.
+ * @param src	    The source string.
+ *
+ * @return the target string.
+ */
+PJ_IDECL(pj_str_t*) pj_strassign( pj_str_t *dst, pj_str_t *src );
+
+/**
+ * Copy string contents.
+ *
+ * @param dst	    The target string.
+ * @param src	    The source string.
+ *
+ * @return the target string.
+ */
+PJ_IDECL(pj_str_t*) pj_strcpy(pj_str_t *dst, const pj_str_t *src);
+
+/**
+ * Copy string contents.
+ *
+ * @param dst	    The target string.
+ * @param src	    The source string.
+ *
+ * @return the target string.
+ */
+PJ_IDECL(pj_str_t*) pj_strcpy2(pj_str_t *dst, const char *src);
+
+/**
+ * Copy source string to destination up to the specified max length.
+ *
+ * @param dst	    The target string.
+ * @param src	    The source string.
+ * @param max	    Maximum characters to copy.
+ *
+ * @return the target string.
+ */
+PJ_IDECL(pj_str_t*) pj_strncpy(pj_str_t *dst, const pj_str_t *src, 
+			       pj_ssize_t max);
+
+/**
+ * Copy source string to destination up to the specified max length,
+ * and NULL terminate the destination. If source string length is
+ * greater than or equal to max, then max-1 will be copied.
+ *
+ * @param dst	    The target string.
+ * @param src	    The source string.
+ * @param max	    Maximum characters to copy.
+ *
+ * @return the target string.
+ */
+PJ_IDECL(pj_str_t*) pj_strncpy_with_null(pj_str_t *dst, const pj_str_t *src,
+					 pj_ssize_t max);
+
+/**
+ * Duplicate string.
+ *
+ * @param pool	    The pool.
+ * @param dst	    The string result.
+ * @param src	    The string to duplicate.
+ *
+ * @return the string result.
+ */
+PJ_IDECL(pj_str_t*) pj_strdup(pj_pool_t *pool,
+			      pj_str_t *dst,
+			      const pj_str_t *src);
+
+/**
+ * Duplicate string and NULL terminate the destination string.
+ *
+ * @param pool	    The pool.
+ * @param dst	    The string result.
+ * @param src	    The string to duplicate.
+ *
+ * @return	    The string result.
+ */
+PJ_IDECL(pj_str_t*) pj_strdup_with_null(pj_pool_t *pool,
+					pj_str_t *dst,
+					const pj_str_t *src);
+
+/**
+ * Duplicate string.
+ *
+ * @param pool	    The pool.
+ * @param dst	    The string result.
+ * @param src	    The string to duplicate.
+ *
+ * @return the string result.
+ */
+PJ_IDECL(pj_str_t*) pj_strdup2(pj_pool_t *pool,
+			       pj_str_t *dst,
+			       const char *src);
+
+/**
+ * Duplicate string and NULL terminate the destination string.
+ *
+ * @param pool	    The pool.
+ * @param dst	    The string result.
+ * @param src	    The string to duplicate.
+ *
+ * @return	    The string result.
+ */
+PJ_IDECL(pj_str_t*) pj_strdup2_with_null(pj_pool_t *pool,
+					 pj_str_t *dst,
+					 const char *src);
+
+
+/**
+ * Duplicate string.
+ *
+ * @param pool	    The pool.
+ * @param src	    The string to duplicate.
+ *
+ * @return the string result.
+ */
+PJ_IDECL(pj_str_t) pj_strdup3(pj_pool_t *pool, const char *src);
+
+/**
+ * Return the length of the string.
+ *
+ * @param str	    The string.
+ *
+ * @return the length of the string.
+ */
+PJ_INLINE(pj_size_t) pj_strlen( const pj_str_t *str )
+{
+    return str->slen;
+}
+
+/**
+ * Return the pointer to the string data.
+ *
+ * @param str	    The string.
+ *
+ * @return the pointer to the string buffer.
+ */
+PJ_INLINE(const char*) pj_strbuf( const pj_str_t *str )
+{
+    return str->ptr;
+}
+
+/**
+ * Compare strings. 
+ *
+ * @param str1	    The string to compare.
+ * @param str2	    The string to compare.
+ *
+ * @return 
+ *	- < 0 if str1 is less than str2
+ *      - 0   if str1 is identical to str2
+ *      - > 0 if str1 is greater than str2
+ */
+PJ_IDECL(int) pj_strcmp( const pj_str_t *str1, const pj_str_t *str2);
+
+/**
+ * Compare strings.
+ *
+ * @param str1	    The string to compare.
+ * @param str2	    The string to compare.
+ *
+ * @return 
+ *	- < 0 if str1 is less than str2
+ *      - 0   if str1 is identical to str2
+ *      - > 0 if str1 is greater than str2
+ */
+PJ_IDECL(int) pj_strcmp2( const pj_str_t *str1, const char *str2 );
+
+/**
+ * Compare strings. 
+ *
+ * @param str1	    The string to compare.
+ * @param str2	    The string to compare.
+ * @param len	    The maximum number of characters to compare.
+ *
+ * @return 
+ *	- < 0 if str1 is less than str2
+ *      - 0   if str1 is identical to str2
+ *      - > 0 if str1 is greater than str2
+ */
+PJ_IDECL(int) pj_strncmp( const pj_str_t *str1, const pj_str_t *str2, 
+			  pj_size_t len);
+
+/**
+ * Compare strings. 
+ *
+ * @param str1	    The string to compare.
+ * @param str2	    The string to compare.
+ * @param len	    The maximum number of characters to compare.
+ *
+ * @return 
+ *	- < 0 if str1 is less than str2
+ *      - 0   if str1 is identical to str2
+ *      - > 0 if str1 is greater than str2
+ */
+PJ_IDECL(int) pj_strncmp2( const pj_str_t *str1, const char *str2, 
+			   pj_size_t len);
+
+/**
+ * Perform lowercase comparison to the strings.
+ *
+ * @param str1	    The string to compare.
+ * @param str2	    The string to compare.
+ *
+ * @return 
+ *	- < 0 if str1 is less than str2
+ *      - 0   if str1 is equal to str2
+ *      - > 0 if str1 is greater than str2
+ */
+PJ_IDECL(int) pj_stricmp(const pj_str_t *str1, const pj_str_t *str2);
+
+/**
+ * Perform lowercase comparison to the strings which consists of only
+ * alnum characters. More over, it will only return non-zero if both
+ * strings are not equal, not the usual negative or positive value.
+ *
+ * If non-alnum inputs are given, then the function may mistakenly 
+ * treat two strings as equal.
+ *
+ * @param str1	    The string to compare.
+ * @param str2	    The string to compare.
+ * @param len	    The length to compare.
+ *
+ * @return 
+ *      - 0	    if str1 is equal to str2
+ *      - (-1)	    if not equal.
+ */
+#if defined(PJ_HAS_STRICMP_ALNUM) && PJ_HAS_STRICMP_ALNUM!=0
+PJ_IDECL(int) strnicmp_alnum(const char *str1, const char *str2,
+			     int len);
+#else
+#define strnicmp_alnum	pj_ansi_strnicmp
+#endif
+
+/**
+ * Perform lowercase comparison to the strings which consists of only
+ * alnum characters. More over, it will only return non-zero if both
+ * strings are not equal, not the usual negative or positive value.
+ *
+ * If non-alnum inputs are given, then the function may mistakenly 
+ * treat two strings as equal.
+ *
+ * @param str1	    The string to compare.
+ * @param str2	    The string to compare.
+ *
+ * @return 
+ *      - 0	    if str1 is equal to str2
+ *      - (-1)	    if not equal.
+ */
+#if defined(PJ_HAS_STRICMP_ALNUM) && PJ_HAS_STRICMP_ALNUM!=0
+PJ_IDECL(int) pj_stricmp_alnum(const pj_str_t *str1, const pj_str_t *str2);
+#else
+#define pj_stricmp_alnum    pj_stricmp
+#endif
+
+/**
+ * Perform lowercase comparison to the strings.
+ *
+ * @param str1	    The string to compare.
+ * @param str2	    The string to compare.
+ *
+ * @return 
+ *	- < 0 if str1 is less than str2
+ *      - 0   if str1 is identical to str2
+ *      - > 0 if str1 is greater than str2
+ */
+PJ_IDECL(int) pj_stricmp2( const pj_str_t *str1, const char *str2);
+
+/**
+ * Perform lowercase comparison to the strings.
+ *
+ * @param str1	    The string to compare.
+ * @param str2	    The string to compare.
+ * @param len	    The maximum number of characters to compare.
+ *
+ * @return 
+ *	- < 0 if str1 is less than str2
+ *      - 0   if str1 is identical to str2
+ *      - > 0 if str1 is greater than str2
+ */
+PJ_IDECL(int) pj_strnicmp( const pj_str_t *str1, const pj_str_t *str2, 
+			   pj_size_t len);
+
+/**
+ * Perform lowercase comparison to the strings.
+ *
+ * @param str1	    The string to compare.
+ * @param str2	    The string to compare.
+ * @param len	    The maximum number of characters to compare.
+ *
+ * @return 
+ *	- < 0 if str1 is less than str2
+ *      - 0   if str1 is identical to str2
+ *      - > 0 if str1 is greater than str2
+ */
+PJ_IDECL(int) pj_strnicmp2( const pj_str_t *str1, const char *str2, 
+			    pj_size_t len);
+
+/**
+ * Concatenate strings.
+ *
+ * @param dst	    The destination string.
+ * @param src	    The source string.
+ */
+PJ_IDECL(void) pj_strcat(pj_str_t *dst, const pj_str_t *src);
+
+
+/**
+ * Concatenate strings.
+ *
+ * @param dst	    The destination string.
+ * @param src	    The source string.
+ */
+PJ_IDECL(void) pj_strcat2(pj_str_t *dst, const char *src);
+
+
+/**
+ * Finds a character in a string.
+ *
+ * @param str	    The string.
+ * @param chr	    The character to find.
+ *
+ * @return the pointer to first character found, or NULL.
+ */
+PJ_INLINE(char*) pj_strchr( const pj_str_t *str, int chr)
+{
+    return (char*) memchr((char*)str->ptr, chr, str->slen);
+}
+
+/**
+ * Remove (trim) leading whitespaces from the string.
+ *
+ * @param str	    The string.
+ *
+ * @return the string.
+ */
+PJ_DECL(pj_str_t*) pj_strltrim( pj_str_t *str );
+
+/**
+ * Remove (trim) the trailing whitespaces from the string.
+ *
+ * @param str	    The string.
+ *
+ * @return the string.
+ */
+PJ_DECL(pj_str_t*) pj_strrtrim( pj_str_t *str );
+
+/**
+ * Remove (trim) leading and trailing whitespaces from the string.
+ *
+ * @param str	    The string.
+ *
+ * @return the string.
+ */
+PJ_IDECL(pj_str_t*) pj_strtrim( pj_str_t *str );
+
+/**
+ * Initialize the buffer with some random string.
+ *
+ * @param str	    the string to store the result.
+ * @param length    the length of the random string to generate.
+ *
+ * @return the string.
+ */
+PJ_DECL(char*) pj_create_random_string(char *str, pj_size_t length);
+
+/**
+ * Convert string to unsigned integer.
+ *
+ * @param str	the string.
+ *
+ * @return the unsigned integer.
+ */
+PJ_DECL(unsigned long) pj_strtoul(const pj_str_t *str);
+
+/**
+ * Utility to convert unsigned integer to string. Note that the
+ * string will be NULL terminated.
+ *
+ * @param val	    the unsigned integer value.
+ * @param buf	    the buffer
+ *
+ * @return the number of characters written
+ */
+PJ_DECL(int) pj_utoa(unsigned long val, char *buf);
+
+/**
+ * Convert unsigned integer to string with minimum digits. Note that the
+ * string will be NULL terminated.
+ *
+ * @param val	    The unsigned integer value.
+ * @param buf	    The buffer.
+ * @param min_dig   Minimum digits to be printed, or zero to specify no
+ *		    minimum digit.
+ * @param pad	    The padding character to be put in front of the string
+ *		    when the digits is less than minimum.
+ *
+ * @return the number of characters written.
+ */
+PJ_DECL(int) pj_utoa_pad( unsigned long val, char *buf, int min_dig, int pad);
+
+
+/**
+ * Fill the memory location with zero.
+ *
+ * @param dst	    The destination buffer.
+ * @param size	    The number of bytes.
+ */
+PJ_INLINE(void) pj_bzero(void *dst, pj_size_t size)
+{
+#if defined(PJ_HAS_BZERO) && PJ_HAS_BZERO!=0
+    bzero(dst, size);
+#else
+    memset(dst, 0, size);
+#endif
+}
+
+
+/**
+ * Fill the memory location with value.
+ *
+ * @param dst	    The destination buffer.
+ * @param c	    Character to set.
+ * @param size	    The number of characters.
+ *
+ * @return the value of dst.
+ */
+PJ_INLINE(void*) pj_memset(void *dst, int c, pj_size_t size)
+{
+    return memset(dst, c, size);
+}
+
+/**
+ * Copy buffer.
+ *
+ * @param dst	    The destination buffer.
+ * @param src	    The source buffer.
+ * @param size	    The size to copy.
+ *
+ * @return the destination buffer.
+ */
+PJ_INLINE(void*) pj_memcpy(void *dst, const void *src, pj_size_t size)
+{
+    return memcpy(dst, src, size);
+}
+
+/**
+ * Move memory.
+ *
+ * @param dst	    The destination buffer.
+ * @param src	    The source buffer.
+ * @param size	    The size to copy.
+ *
+ * @return the destination buffer.
+ */
+PJ_INLINE(void*) pj_memmove(void *dst, const void *src, pj_size_t size)
+{
+    return memmove(dst, src, size);
+}
+
+/**
+ * Compare buffers.
+ *
+ * @param buf1	    The first buffer.
+ * @param buf2	    The second buffer.
+ * @param size	    The size to compare.
+ *
+ * @return negative, zero, or positive value.
+ */
+PJ_INLINE(int) pj_memcmp(const void *buf1, const void *buf2, pj_size_t size)
+{
+    return memcmp(buf1, buf2, size);
+}
+
+/**
+ * Find character in the buffer.
+ *
+ * @param buf	    The buffer.
+ * @param c	    The character to find.
+ * @param size	    The size to check.
+ *
+ * @return the pointer to location where the character is found, or NULL if
+ *         not found.
+ */
+PJ_INLINE(void*) pj_memchr(const void *buf, int c, pj_size_t size)
+{
+    return (void*)memchr((void*)buf, c, size);
+}
+
+
+/**
+ * @}
+ */
+
+#if PJ_FUNCTIONS_ARE_INLINED
+#  include <pj/string_i.h>
+#endif
+
+PJ_END_DECL
+
+#endif	/* __PJ_STRING_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/string_i.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/string_i.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/string_i.h	(revision 1163)
@@ -0,0 +1,333 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/pool.h>
+
+PJ_IDEF(pj_str_t) pj_str(char *str)
+{
+    pj_str_t dst;
+    dst.ptr = str;
+    dst.slen = str ? pj_ansi_strlen(str) : 0;
+    return dst;
+}
+
+PJ_IDEF(pj_str_t*) pj_strdup(pj_pool_t *pool,
+			      pj_str_t *dst,
+			      const pj_str_t *src)
+{
+    if (src->slen) {
+	dst->ptr = (char*)pj_pool_alloc(pool, src->slen);
+	pj_memcpy(dst->ptr, src->ptr, src->slen);
+    }
+    dst->slen = src->slen;
+    return dst;
+}
+
+PJ_IDEF(pj_str_t*) pj_strdup_with_null( pj_pool_t *pool,
+					pj_str_t *dst,
+					const pj_str_t *src)
+{
+    dst->ptr = (char*)pj_pool_alloc(pool, src->slen+1);
+    if (src->slen) {
+	pj_memcpy(dst->ptr, src->ptr, src->slen);
+    }
+    dst->slen = src->slen;
+    dst->ptr[dst->slen] = '\0';
+    return dst;
+}
+
+PJ_IDEF(pj_str_t*) pj_strdup2(pj_pool_t *pool,
+			      pj_str_t *dst,
+			      const char *src)
+{
+    dst->slen = src ? pj_ansi_strlen(src) : 0;
+    if (dst->slen) {
+	dst->ptr = (char*)pj_pool_alloc(pool, dst->slen);
+	pj_memcpy(dst->ptr, src, dst->slen);
+    } else {
+	dst->ptr = NULL;
+    }
+    return dst;
+}
+
+PJ_IDEF(pj_str_t*) pj_strdup2_with_null( pj_pool_t *pool,
+					 pj_str_t *dst,
+					 const char *src)
+{
+    dst->slen = src ? pj_ansi_strlen(src) : 0;
+    dst->ptr = (char*)pj_pool_alloc(pool, dst->slen+1);
+    if (dst->slen) {
+	pj_memcpy(dst->ptr, src, dst->slen);
+    }
+    dst->ptr[dst->slen] = '\0';
+    return dst;
+}
+
+PJ_IDEF(pj_str_t) pj_strdup3(pj_pool_t *pool, const char *src)
+{
+    pj_str_t temp;
+    pj_strdup2(pool, &temp, src);
+    return temp;
+}
+
+PJ_IDEF(pj_str_t*) pj_strassign( pj_str_t *dst, pj_str_t *src )
+{
+    dst->ptr = src->ptr;
+    dst->slen = src->slen;
+    return dst;
+}
+
+PJ_IDEF(pj_str_t*) pj_strcpy(pj_str_t *dst, const pj_str_t *src)
+{
+    dst->slen = src->slen;
+    if (src->slen > 0)
+	pj_memcpy(dst->ptr, src->ptr, src->slen);
+    return dst;
+}
+
+PJ_IDEF(pj_str_t*) pj_strcpy2(pj_str_t *dst, const char *src)
+{
+    dst->slen = src ? pj_ansi_strlen(src) : 0;
+    if (dst->slen > 0)
+	pj_memcpy(dst->ptr, src, dst->slen);
+    return dst;
+}
+
+PJ_IDEF(pj_str_t*) pj_strncpy( pj_str_t *dst, const pj_str_t *src, 
+			       pj_ssize_t max)
+{
+    if (max > src->slen) max = src->slen;
+    pj_memcpy(dst->ptr, src->ptr, max);
+    dst->slen = max;
+    return dst;
+}
+
+PJ_IDEF(pj_str_t*) pj_strncpy_with_null( pj_str_t *dst, const pj_str_t *src,
+					 pj_ssize_t max)
+{
+    if (max <= src->slen)
+	max = max-1;
+    else
+	max = src->slen;
+
+    pj_memcpy(dst->ptr, src->ptr, max);
+    dst->ptr[max] = '\0';
+    dst->slen = max;
+    return dst;
+}
+
+
+PJ_IDEF(int) pj_strcmp( const pj_str_t *str1, const pj_str_t *str2)
+{
+    pj_ssize_t diff;
+
+    diff = str1->slen - str2->slen;
+    if (diff) {
+	return diff > 0 ? 1 : -1;
+    } else if (str1->ptr && str1->slen) {
+	return memcmp(str1->ptr, str2->ptr, str1->slen);
+    } else {
+	return 0;
+    }
+}
+
+PJ_IDEF(int) pj_strncmp( const pj_str_t *str1, const pj_str_t *str2, 
+			 pj_size_t len)
+{
+    if (str1->ptr && str2->ptr)
+	return memcmp(str1->ptr, str2->ptr, len);
+    else if (str2->ptr)
+	return str2->slen==0 ? 0 : -1;
+    else if (str1->ptr)
+	return str1->slen==0 ? 0 : 1;
+    else
+	return 0;
+}
+
+PJ_IDEF(int) pj_strncmp2( const pj_str_t *str1, const char *str2, 
+			  pj_size_t len)
+{
+    if (len == 0) 
+	return 0;
+    else if (str1->ptr && str2)
+	return memcmp(str1->ptr, str2, len);
+    else if (str1->ptr)
+	return str1->slen==0 ? 0 : 1;
+    else if (str2)
+	return *str2=='\0' ? 0 : -1;
+    else
+	return 0;
+}
+
+PJ_IDEF(int) pj_strcmp2( const pj_str_t *str1, const char *str2 )
+{
+    if (str1->slen == 0) {
+	return (!str2 || *str2=='\0') ? 0 : -1;
+    } else
+	return pj_strncmp2( str1, str2, str1->slen);
+}
+
+PJ_IDEF(int) pj_stricmp( const pj_str_t *str1, const pj_str_t *str2)
+{
+    register int len = str1->slen;
+    if (len != str2->slen) {
+	return (int)(len - str2->slen);
+    } else if (len == 0) {
+	return 0;
+    } else {
+	return pj_ansi_strnicmp(str1->ptr, str2->ptr, len);
+    }
+}
+
+#if defined(PJ_HAS_STRICMP_ALNUM) && PJ_HAS_STRICMP_ALNUM!=0
+PJ_IDEF(int) strnicmp_alnum( const char *str1, const char *str2,
+			     int len)
+{
+    if (len==0)
+	return 0;
+    else {
+	register const pj_uint32_t *p1 = (pj_uint32_t*)str1, 
+		                   *p2 = (pj_uint32_t*)str2;
+	while (len > 3 && (*p1 & 0x5F5F5F5F)==(*p2 & 0x5F5F5F5F))
+	    ++p1, ++p2, len-=4;
+
+	if (len > 3)
+	    return -1;
+#if defined(PJ_IS_LITTLE_ENDIAN) && PJ_IS_LITTLE_ENDIAN!=0
+	else if (len==3)
+	    return ((*p1 & 0x005F5F5F)==(*p2 & 0x005F5F5F)) ? 0 : -1;
+	else if (len==2)
+	    return ((*p1 & 0x00005F5F)==(*p2 & 0x00005F5F)) ? 0 : -1;
+	else if (len==1)
+	    return ((*p1 & 0x0000005F)==(*p2 & 0x0000005F)) ? 0 : -1;
+#else
+	else if (len==3)
+	    return ((*p1 & 0x5F5F5F00)==(*p2 & 0x5F5F5F00)) ? 0 : -1;
+	else if (len==2)
+	    return ((*p1 & 0x5F5F0000)==(*p2 & 0x5F5F0000)) ? 0 : -1;
+	else if (len==1)
+	    return ((*p1 & 0x5F000000)==(*p2 & 0x5F000000)) ? 0 : -1;
+#endif
+	else 
+	    return 0;
+    }
+}
+
+PJ_IDEF(int) pj_stricmp_alnum(const pj_str_t *str1, const pj_str_t *str2)
+{
+    register int len = str1->slen;
+
+    if (len != str2->slen) {
+	return (len < str2->slen) ? -1 : 1;
+    } else if (len == 0) {
+	return 0;
+    } else {
+	register const pj_uint32_t *p1 = (pj_uint32_t*)str1->ptr, 
+		                   *p2 = (pj_uint32_t*)str2->ptr;
+	while (len > 3 && (*p1 & 0x5F5F5F5F)==(*p2 & 0x5F5F5F5F))
+	    ++p1, ++p2, len-=4;
+
+	if (len > 3)
+	    return -1;
+#if defined(PJ_IS_LITTLE_ENDIAN) && PJ_IS_LITTLE_ENDIAN!=0
+	else if (len==3)
+	    return ((*p1 & 0x005F5F5F)==(*p2 & 0x005F5F5F)) ? 0 : -1;
+	else if (len==2)
+	    return ((*p1 & 0x00005F5F)==(*p2 & 0x00005F5F)) ? 0 : -1;
+	else if (len==1)
+	    return ((*p1 & 0x0000005F)==(*p2 & 0x0000005F)) ? 0 : -1;
+#else
+	else if (len==3)
+	    return ((*p1 & 0x5F5F5F00)==(*p2 & 0x5F5F5F00)) ? 0 : -1;
+	else if (len==2)
+	    return ((*p1 & 0x5F5F0000)==(*p2 & 0x5F5F0000)) ? 0 : -1;
+	else if (len==1)
+	    return ((*p1 & 0x5F000000)==(*p2 & 0x5F000000)) ? 0 : -1;
+#endif
+	else 
+	    return 0;
+    }
+}
+#endif	/* PJ_HAS_STRICMP_ALNUM */
+
+PJ_IDEF(int) pj_stricmp2( const pj_str_t *str1, const char *str2)
+{
+    if (str1->ptr && str2)
+	return pj_ansi_strnicmp(str1->ptr, str2, str1->slen);
+    else if (str2)
+	return (*str2=='\0') ? 0 : -1;
+    else if (str1->ptr)
+	return (str1->slen==0) ? 0 : 1;
+    else
+	return 0;
+}
+
+PJ_IDEF(int) pj_strnicmp( const pj_str_t *str1, const pj_str_t *str2, 
+			  pj_size_t len)
+{
+    if (str1->ptr && str2->ptr)
+	return pj_ansi_strnicmp(str1->ptr, str2->ptr, len);
+    else if (str2->ptr)
+	return str2->slen==0 ? 0 : -1;
+    else if (str1->ptr)
+	return str1->slen==0 ? 0 : 1;
+    else
+	return 0;
+}
+
+PJ_IDEF(int) pj_strnicmp2( const pj_str_t *str1, const char *str2, 
+			   pj_size_t len)
+{
+    if (len == 0) 
+	return 0;
+    else if (str1->ptr && str2)
+	return pj_ansi_strnicmp(str1->ptr, str2, len);
+    else if (str1->ptr)
+	return str1->slen==0 ? 0 : 1;
+    else if (str2)
+	return *str2=='\0' ? 0 : -1;
+    else
+	return 0;
+
+}
+
+PJ_IDEF(void) pj_strcat(pj_str_t *dst, const pj_str_t *src)
+{
+    if (src->slen) {
+	pj_memcpy(dst->ptr + dst->slen, src->ptr, src->slen);
+	dst->slen += src->slen;
+    }
+}
+
+PJ_IDEF(void) pj_strcat2(pj_str_t *dst, const char *str)
+{
+    unsigned len = pj_ansi_strlen(str);
+    if (len) {
+	pj_memcpy(dst->ptr + dst->slen, str, len);
+	dst->slen += len;
+    }
+}
+
+PJ_IDEF(pj_str_t*) pj_strtrim( pj_str_t *str )
+{
+    pj_strltrim(str);
+    pj_strrtrim(str);
+    return str;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/timer.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/timer.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/timer.h	(revision 1163)
@@ -0,0 +1,269 @@
+/* $Id$ */
+/* 
+ * 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_TIMER_H__
+#define __PJ_TIMER_H__
+
+/**
+ * @file timer.h
+ * @brief Timer Heap
+ */
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJ_TIMER Timer Heap Management.
+ * @ingroup PJ_MISC
+ * @brief
+ * The timer scheduling implementation here is based on ACE library's 
+ * ACE_Timer_Heap, with only little modification to suit our library's style
+ * (I even left most of the comments in the original source).
+ *
+ * To quote the original quote in ACE_Timer_Heap_T class:
+ *
+ *      This implementation uses a heap-based callout queue of
+ *      absolute times.  Therefore, in the average and worst case,
+ *      scheduling, canceling, and expiring timers is O(log N) (where
+ *      N is the total number of timers).  In addition, we can also
+ *      preallocate as many \a ACE_Timer_Nodes as there are slots in
+ *      the heap.  This allows us to completely remove the need for
+ *      dynamic memory allocation, which is important for real-time
+ *      systems.
+ *
+ * You can find the fine ACE library at:
+ *  http://www.cs.wustl.edu/~schmidt/ACE.html
+ *
+ * ACE is Copyright (C)1993-2006 Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
+ *
+ * @{
+ *
+ * \section pj_timer_examples_sec Examples
+ *
+ * For some examples on how to use the timer heap, please see the link below.
+ *
+ *  - \ref page_pjlib_timer_test
+ */
+
+
+/**
+ * The type for internal timer ID.
+ */
+typedef int pj_timer_id_t;
+
+/** 
+ * Forward declaration for pj_timer_entry. 
+ */
+struct pj_timer_entry;
+
+/**
+ * The type of callback function to be called by timer scheduler when a timer
+ * has expired.
+ *
+ * @param timer_heap    The timer heap.
+ * @param entry         Timer entry which timer's has expired.
+ */
+typedef void pj_timer_heap_callback(pj_timer_heap_t *timer_heap,
+				    struct pj_timer_entry *entry);
+
+
+/**
+ * This structure represents an entry to the timer.
+ */
+struct pj_timer_entry
+{
+    /** 
+     * User data to be associated with this entry. 
+     * Applications normally will put the instance of object that
+     * owns the timer entry in this field.
+     */
+    void *user_data;
+
+    /** 
+     * Arbitrary ID assigned by the user/owner of this entry. 
+     * Applications can use this ID to distinguish multiple
+     * timer entries that share the same callback and user_data.
+     */
+    int id;
+
+    /** 
+     * Callback to be called when the timer expires. 
+     */
+    pj_timer_heap_callback *cb;
+
+    /** 
+     * Internal unique timer ID, which is assigned by the timer heap. 
+     * Application should not touch this ID.
+     */
+    pj_timer_id_t _timer_id;
+
+    /** 
+     * The future time when the timer expires, which the value is updated
+     * by timer heap when the timer is scheduled.
+     */
+    pj_time_val _timer_value;
+};
+
+
+/**
+ * Calculate memory size required to create a timer heap.
+ *
+ * @param count     Number of timer entries to be supported.
+ * @return          Memory size requirement in bytes.
+ */
+PJ_DECL(pj_size_t) pj_timer_heap_mem_size(pj_size_t count);
+
+/**
+ * Create a timer heap.
+ *
+ * @param pool      The pool where allocations in the timer heap will be 
+ *                  allocated. The timer heap will dynamicly allocate 
+ *                  more storate from the pool if the number of timer 
+ *                  entries registered is more than the size originally 
+ *                  requested when calling this function.
+ * @param count     The maximum number of timer entries to be supported 
+ *                  initially. If the application registers more entries 
+ *                  during runtime, then the timer heap will resize.
+ * @param ht        Pointer to receive the created timer heap.
+ *
+ * @return          PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_timer_heap_create( pj_pool_t *pool,
+					   pj_size_t count,
+                                           pj_timer_heap_t **ht);
+
+/**
+ * Destroy the timer heap.
+ *
+ * @param ht        The timer heap.
+ */
+PJ_DECL(void) pj_timer_heap_destroy( pj_timer_heap_t *ht );
+
+
+/**
+ * Set lock object to be used by the timer heap. By default, the timer heap
+ * uses dummy synchronization.
+ *
+ * @param ht        The timer heap.
+ * @param lock      The lock object to be used for synchronization.
+ * @param auto_del  If nonzero, the lock object will be destroyed when
+ *                  the timer heap is destroyed.
+ */
+PJ_DECL(void) pj_timer_heap_set_lock( pj_timer_heap_t *ht,
+                                      pj_lock_t *lock,
+                                      pj_bool_t auto_del );
+
+/**
+ * Set maximum number of timed out entries to process in a single poll.
+ *
+ * @param ht        The timer heap.
+ * @param count     Number of entries.
+ *
+ * @return          The old number.
+ */
+PJ_DECL(unsigned) pj_timer_heap_set_max_timed_out_per_poll(pj_timer_heap_t *ht,
+                                                           unsigned count );
+
+/**
+ * Initialize a timer entry. Application should call this function at least
+ * once before scheduling the entry to the timer heap, to properly initialize
+ * the timer entry.
+ *
+ * @param entry     The timer entry to be initialized.
+ * @param id        Arbitrary ID assigned by the user/owner of this entry.
+ *                  Applications can use this ID to distinguish multiple
+ *                  timer entries that share the same callback and user_data.
+ * @param user_data User data to be associated with this entry. 
+ *                  Applications normally will put the instance of object that
+ *                  owns the timer entry in this field.
+ * @param cb        Callback function to be called when the timer elapses.
+ *
+ * @return          The timer entry itself.
+ */
+PJ_DECL(pj_timer_entry*) pj_timer_entry_init( pj_timer_entry *entry,
+                                              int id,
+                                              void *user_data,
+                                              pj_timer_heap_callback *cb );
+
+/**
+ * Schedule a timer entry which will expire AFTER the specified delay.
+ *
+ * @param ht        The timer heap.
+ * @param entry     The entry to be registered. 
+ * @param delay     The interval to expire.
+ * @return          PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_timer_heap_schedule( pj_timer_heap_t *ht,
+					     pj_timer_entry *entry, 
+					     const pj_time_val *delay);
+
+/**
+ * Cancel a previously registered timer.
+ *
+ * @param ht        The timer heap.
+ * @param entry     The entry to be cancelled.
+ * @return          The number of timer cancelled, which should be one if the
+ *                  entry has really been registered, or zero if no timer was
+ *                  cancelled.
+ */
+PJ_DECL(int) pj_timer_heap_cancel( pj_timer_heap_t *ht,
+				   pj_timer_entry *entry);
+
+/**
+ * Get the number of timer entries.
+ *
+ * @param ht        The timer heap.
+ * @return          The number of timer entries.
+ */
+PJ_DECL(pj_size_t) pj_timer_heap_count( pj_timer_heap_t *ht );
+
+/**
+ * Get the earliest time registered in the timer heap. The timer heap
+ * MUST have at least one timer being scheduled (application should use
+ * #pj_timer_heap_count() before calling this function).
+ *
+ * @param ht        The timer heap.
+ * @param timeval   The time deadline of the earliest timer entry.
+ *
+ * @return          PJ_SUCCESS, or PJ_ENOTFOUND if no entry is scheduled.
+ */
+PJ_DECL(pj_status_t) pj_timer_heap_earliest_time( pj_timer_heap_t *ht, 
+					          pj_time_val *timeval);
+
+/**
+ * Poll the timer heap, check for expired timers and call the callback for
+ * each of the expired timers.
+ *
+ * @param ht         The timer heap.
+ * @param next_delay If this parameter is not NULL, it will be filled up with
+ *		     the time delay until the next timer elapsed, or -1 in
+ *		     the sec part if no entry exist.
+ *
+ * @return           The number of timers expired.
+ */
+PJ_DECL(unsigned) pj_timer_heap_poll( pj_timer_heap_t *ht, 
+                                      pj_time_val *next_delay);
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+#endif	/* __PJ_TIMER_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/types.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/types.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/types.h	(revision 1163)
@@ -0,0 +1,541 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_TYPES_H__
+#define __PJ_TYPES_H__
+
+
+/**
+ * @defgroup PJ PJ Library
+ */
+/**
+ * @file types.h
+ * @brief Declaration of basic types and utility.
+ */
+/**
+ * @defgroup PJ_BASIC Basic Data Types and Library Functionality.
+ * @ingroup PJ_DS
+ * @{
+ */
+#include <pj/config.h>
+
+PJ_BEGIN_DECL
+
+/* ************************************************************************* */
+
+/** Signed 32bit integer. */
+typedef int		pj_int32_t;
+
+/** Unsigned 32bit integer. */
+typedef unsigned int	pj_uint32_t;
+
+/** Signed 16bit integer. */
+typedef short		pj_int16_t;
+
+/** Unsigned 16bit integer. */
+typedef unsigned short	pj_uint16_t;
+
+/** Signed 8bit integer. */
+typedef signed char	pj_int8_t;
+
+/** Unsigned 8bit integer. */
+typedef unsigned char	pj_uint8_t;
+
+/** Large unsigned integer. */
+typedef size_t		pj_size_t;
+
+/** Large signed integer. */
+typedef long		pj_ssize_t;
+
+/** Status code. */
+typedef int		pj_status_t;
+
+/** Boolean. */
+typedef int		pj_bool_t;
+
+/** Native char type, which will be equal to wchar_t for Unicode
+ * and char for ANSI. */
+#if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0
+    typedef wchar_t pj_char_t;
+#else
+    typedef char pj_char_t;
+#endif
+
+/** This macro creates Unicode or ANSI literal string depending whether
+ *  native platform string is Unicode or ANSI. */
+#if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0
+#   define PJ_T(literal_str)	L##literal_str
+#else
+#   define PJ_T(literal_str)	literal_str
+#endif
+
+
+/** Status is OK. */
+#define PJ_SUCCESS  0
+
+/** True value. */
+#define PJ_TRUE	    1
+
+/** False value. */
+#define PJ_FALSE    0
+
+/**
+ * File offset type.
+ */
+#if defined(PJ_HAS_INT64) && PJ_HAS_INT64!=0
+typedef pj_int64_t pj_off_t;
+#else
+typedef pj_ssize_t pj_off_t;
+#endif
+
+/* ************************************************************************* */
+/*
+ * Data structure types.
+ */
+/**
+ * This type is used as replacement to legacy C string, and used throughout
+ * the library. By convention, the string is NOT null terminated.
+ */
+struct pj_str_t
+{
+    /** Buffer pointer, which is by convention NOT null terminated. */
+    char       *ptr;
+
+    /** The length of the string. */
+    pj_ssize_t  slen;
+};
+
+/**
+ * This structure represents high resolution (64bit) time value. The time
+ * values represent time in cycles, which is retrieved by calling
+ * #pj_get_timestamp().
+ */
+typedef union pj_timestamp
+{
+    struct
+    {
+#if defined(PJ_IS_LITTLE_ENDIAN) && PJ_IS_LITTLE_ENDIAN!=0
+	pj_uint32_t lo;     /**< Low 32-bit value of the 64-bit value. */
+	pj_uint32_t hi;     /**< high 32-bit value of the 64-bit value. */
+#else
+	pj_uint32_t hi;     /**< high 32-bit value of the 64-bit value. */
+	pj_uint32_t lo;     /**< Low 32-bit value of the 64-bit value. */
+#endif
+    } u32;                  /**< The 64-bit value as two 32-bit values. */
+
+#if PJ_HAS_INT64
+    pj_uint64_t u64;        /**< The whole 64-bit value, where available. */
+#endif
+} pj_timestamp;
+
+
+
+/**
+ * The opaque data type for linked list, which is used as arguments throughout
+ * the linked list operations.
+ */
+typedef void pj_list_type;
+
+/** 
+ * List.
+ */
+typedef struct pj_list pj_list;
+
+/**
+ * Opaque data type for hash tables.
+ */
+typedef struct pj_hash_table_t pj_hash_table_t;
+
+/**
+ * Opaque data type for hash entry (only used internally by hash table).
+ */
+typedef struct pj_hash_entry pj_hash_entry;
+
+/**
+ * Data type for hash search iterator.
+ * This structure should be opaque, however applications need to declare
+ * concrete variable of this type, that's why the declaration is visible here.
+ */
+typedef struct pj_hash_iterator_t
+{
+    pj_uint32_t	     index;     /**< Internal index.     */
+    pj_hash_entry   *entry;     /**< Internal entry.     */
+} pj_hash_iterator_t;
+
+
+/**
+ * Forward declaration for memory pool factory.
+ */
+typedef struct pj_pool_factory pj_pool_factory;
+
+/**
+ * Opaque data type for memory pool.
+ */
+typedef struct pj_pool_t pj_pool_t;
+
+/**
+ * Forward declaration for caching pool, a pool factory implementation.
+ */
+typedef struct pj_caching_pool pj_caching_pool;
+
+/**
+ * This type is used as replacement to legacy C string, and used throughout
+ * the library.
+ */
+typedef struct pj_str_t pj_str_t;
+
+/**
+ * Opaque data type for I/O Queue structure.
+ */
+typedef struct pj_ioqueue_t pj_ioqueue_t;
+
+/**
+ * Opaque data type for key that identifies a handle registered to the
+ * I/O queue framework.
+ */
+typedef struct pj_ioqueue_key_t pj_ioqueue_key_t;
+
+/**
+ * Opaque data to identify timer heap.
+ */
+typedef struct pj_timer_heap_t pj_timer_heap_t;
+
+/**
+ * Forward declaration for timer entry.
+ */
+typedef struct pj_timer_entry pj_timer_entry;
+
+/** 
+ * Opaque data type for atomic operations.
+ */
+typedef struct pj_atomic_t pj_atomic_t;
+
+/**
+ * Value type of an atomic variable.
+ */
+typedef PJ_ATOMIC_VALUE_TYPE pj_atomic_value_t;
+ 
+/* ************************************************************************* */
+
+/** Thread handle. */
+typedef struct pj_thread_t pj_thread_t;
+
+/** Lock object. */
+typedef struct pj_lock_t pj_lock_t;
+
+/** Mutex handle. */
+typedef struct pj_mutex_t pj_mutex_t;
+
+/** Semaphore handle. */
+typedef struct pj_sem_t pj_sem_t;
+
+/** Event object. */
+typedef struct pj_event_t pj_event_t;
+
+/** Unidirectional stream pipe object. */
+typedef struct pj_pipe_t pj_pipe_t;
+
+/** Operating system handle. */
+typedef void *pj_oshandle_t;
+
+/** Socket handle. */
+typedef long pj_sock_t;
+
+/** Generic socket address. */
+typedef void pj_sockaddr_t;
+
+/** Forward declaration. */
+typedef struct pj_sockaddr_in pj_sockaddr_in;
+
+/** Color type. */
+typedef unsigned int pj_color_t;
+
+/** Exception id. */
+typedef int pj_exception_id_t;
+
+/* ************************************************************************* */
+
+/** Utility macro to compute the number of elements in static array. */
+#define PJ_ARRAY_SIZE(a)    (sizeof(a)/sizeof(a[0]))
+
+/** Maximum value for signed 32-bit integer. */
+#define PJ_MAXINT32  0x7FFFFFFFL
+
+/**
+ * Length of object names.
+ */
+#define PJ_MAX_OBJ_NAME	32
+
+/* ************************************************************************* */
+/*
+ * General.
+ */
+/**
+ * Initialize the PJ Library.
+ * This function must be called before using the library. The purpose of this
+ * function is to initialize static library data, such as character table used
+ * in random string generation, and to initialize operating system dependent
+ * functionality (such as WSAStartup() in Windows).
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pj_init(void);
+
+
+/**
+ * Shutdown PJLIB.
+ */
+PJ_DECL(void) pj_shutdown(void);
+
+/**
+ * Register cleanup function to be called by PJLIB when pj_shutdown() is 
+ * called.
+ *
+ * @param func	    The function to be registered.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pj_atexit(void (*func)(void));
+
+
+
+/**
+ * Swap the byte order of an 16bit data.
+ *
+ * @param val16	    The 16bit data.
+ *
+ * @return	    An 16bit data with swapped byte order.
+ */
+PJ_INLINE(pj_int16_t) pj_swap16(pj_int16_t val16)
+{
+    pj_uint8_t *p = (pj_uint8_t*)&val16;
+    pj_uint8_t tmp = *p;
+    *p = *(p+1);
+    *(p+1) = tmp;
+    return val16;
+}
+
+/**
+ * Swap the byte order of an 32bit data.
+ *
+ * @param val32	    The 32bit data.
+ *
+ * @return	    An 32bit data with swapped byte order.
+ */
+PJ_INLINE(pj_int32_t) pj_swap32(pj_int32_t val32)
+{
+    pj_uint8_t *p = (pj_uint8_t*)&val32;
+    pj_uint8_t tmp = *p;
+    *p = *(p+3);
+    *(p+3) = tmp;
+    tmp = *(p+1);
+    *(p+1) = *(p+2);
+    *(p+2) = tmp;
+    return val32;
+}
+
+
+/**
+ * @}
+ */
+/**
+ * @addtogroup PJ_TIME Time Data Type and Manipulation.
+ * @ingroup PJ_MISC
+ * @{
+ */
+
+/**
+ * Representation of time value in this library.
+ * This type can be used to represent either an interval or a specific time
+ * or date. 
+ */
+typedef struct pj_time_val
+{
+    /** The seconds part of the time. */
+    long    sec;
+
+    /** The miliseconds fraction of the time. */
+    long    msec;
+
+} pj_time_val;
+
+/**
+ * Normalize the value in time value.
+ * @param t     Time value to be normalized.
+ */
+PJ_DECL(void) pj_time_val_normalize(pj_time_val *t);
+
+/**
+ * Get the total time value in miliseconds. This is the same as
+ * multiplying the second part with 1000 and then add the miliseconds
+ * part to the result.
+ *
+ * @param t     The time value.
+ * @return      Total time in miliseconds.
+ * @hideinitializer
+ */
+#define PJ_TIME_VAL_MSEC(t)	((t).sec * 1000 + (t).msec)
+
+/**
+ * This macro will check if \a t1 is equal to \a t2.
+ *
+ * @param t1    The first time value to compare.
+ * @param t2    The second time value to compare.
+ * @return      Non-zero if both time values are equal.
+ * @hideinitializer
+ */
+#define PJ_TIME_VAL_EQ(t1, t2)	((t1).sec==(t2).sec && (t1).msec==(t2).msec)
+
+/**
+ * This macro will check if \a t1 is greater than \a t2
+ *
+ * @param t1    The first time value to compare.
+ * @param t2    The second time value to compare.
+ * @return      Non-zero if t1 is greater than t2.
+ * @hideinitializer
+ */
+#define PJ_TIME_VAL_GT(t1, t2)	((t1).sec>(t2).sec || \
+                                ((t1).sec==(t2).sec && (t1).msec>(t2).msec))
+
+/**
+ * This macro will check if \a t1 is greater than or equal to \a t2
+ *
+ * @param t1    The first time value to compare.
+ * @param t2    The second time value to compare.
+ * @return      Non-zero if t1 is greater than or equal to t2.
+ * @hideinitializer
+ */
+#define PJ_TIME_VAL_GTE(t1, t2)	(PJ_TIME_VAL_GT(t1,t2) || \
+                                 PJ_TIME_VAL_EQ(t1,t2))
+
+/**
+ * This macro will check if \a t1 is less than \a t2
+ *
+ * @param t1    The first time value to compare.
+ * @param t2    The second time value to compare.
+ * @return      Non-zero if t1 is less than t2.
+ * @hideinitializer
+ */
+#define PJ_TIME_VAL_LT(t1, t2)	(!(PJ_TIME_VAL_GTE(t1,t2)))
+
+/**
+ * This macro will check if \a t1 is less than or equal to \a t2.
+ *
+ * @param t1    The first time value to compare.
+ * @param t2    The second time value to compare.
+ * @return      Non-zero if t1 is less than or equal to t2.
+ * @hideinitializer
+ */
+#define PJ_TIME_VAL_LTE(t1, t2)	(!PJ_TIME_VAL_GT(t1, t2))
+
+/**
+ * Add \a t2 to \a t1 and store the result in \a t1. Effectively
+ *
+ * this macro will expand as: (\a t1 += \a t2).
+ * @param t1    The time value to add.
+ * @param t2    The time value to be added to \a t1.
+ * @hideinitializer
+ */
+#define PJ_TIME_VAL_ADD(t1, t2)	    do {			    \
+					(t1).sec += (t2).sec;	    \
+					(t1).msec += (t2).msec;	    \
+					pj_time_val_normalize(&(t1)); \
+				    } while (0)
+
+
+/**
+ * Substract \a t2 from \a t1 and store the result in \a t1. Effectively
+ * this macro will expand as (\a t1 -= \a t2).
+ *
+ * @param t1    The time value to subsctract.
+ * @param t2    The time value to be substracted from \a t1.
+ * @hideinitializer
+ */
+#define PJ_TIME_VAL_SUB(t1, t2)	    do {			    \
+					(t1).sec -= (t2).sec;	    \
+					(t1).msec -= (t2).msec;	    \
+					pj_time_val_normalize(&(t1)); \
+				    } while (0)
+
+
+/**
+ * This structure represent the parsed representation of time.
+ * It is acquired by calling #pj_time_decode().
+ */
+typedef struct pj_parsed_time
+{
+    /** This represents day of week where value zero means Sunday */
+    int wday;
+
+    /* This represents day of the year, 0-365, where zero means
+     *  1st of January.
+     */
+    /*int yday; */
+
+    /** This represents day of month: 1-31 */
+    int day;
+
+    /** This represents month, with the value is 0 - 11 (zero is January) */
+    int mon;
+
+    /** This represent the actual year (unlike in ANSI libc where
+     *  the value must be added by 1900).
+     */
+    int year;
+
+    /** This represents the second part, with the value is 0-59 */
+    int sec;
+
+    /** This represents the minute part, with the value is: 0-59 */
+    int min;
+
+    /** This represents the hour part, with the value is 0-23 */
+    int hour;
+
+    /** This represents the milisecond part, with the value is 0-999 */
+    int msec;
+
+} pj_parsed_time;
+
+
+/**
+ * @}	// Time Management
+ */
+
+/* ************************************************************************* */
+/*
+ * Terminal.
+ */
+/**
+ * Color code combination.
+ */
+enum {
+    PJ_TERM_COLOR_R	= 2,    /**< Red            */
+    PJ_TERM_COLOR_G	= 4,    /**< Green          */
+    PJ_TERM_COLOR_B	= 1,    /**< Blue.          */
+    PJ_TERM_COLOR_BRIGHT = 8    /**< Bright mask.   */
+};
+
+
+
+
+PJ_END_DECL
+
+
+#endif /* __PJ_TYPES_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/include/pj/unicode.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pj/unicode.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pj/unicode.h	(revision 1163)
@@ -0,0 +1,140 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_UNICODE_H__
+#define __PJ_UNICODE_H__
+
+#include <pj/types.h>
+
+
+/**
+ * @defgroup PJ_UNICODE Unicode Support
+ * @ingroup PJ_MISC
+ * @{
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @file unicode.h
+ * @brief Provides Unicode conversion for Unicode OSes
+ */
+
+/**
+ * Convert ANSI strings to Unicode strings.
+ *
+ * @param str		    The ANSI string to be converted.
+ * @param len		    The length of the input string.
+ * @param wbuf		    Buffer to hold the Unicode string output.
+ * @param wbuf_count	    Buffer size, in number of elements (not bytes).
+ *
+ * @return		    The Unicode string, NULL terminated.
+ */
+PJ_DECL(wchar_t*) pj_ansi_to_unicode(const char *str, pj_size_t len,
+				     wchar_t *wbuf, pj_size_t wbuf_count);
+
+
+/**
+ * Convert Unicode string to ANSI string.
+ *
+ * @param wstr		    The Unicode string to be converted.
+ * @param len		    The length of the input string.
+ * @param buf		    Buffer to hold the ANSI string output.
+ * @param buf_size	    Size of the output buffer.
+ *
+ * @return		    The ANSI string, NULL terminated.
+ */
+PJ_DECL(char*) pj_unicode_to_ansi(const wchar_t *wstr, pj_size_t len,
+				  char *buf, pj_size_t buf_size);
+
+
+#if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0
+
+/**
+ * This macro is used to declare temporary Unicode buffer for ANSI to 
+ * Unicode conversion, and should be put in declaration section of a block.
+ * When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this 
+ * macro will expand to nothing.
+ */
+#   define PJ_DECL_UNICODE_TEMP_BUF(buf,size)   wchar_t buf[size];
+
+/**
+ * This macro will convert ANSI string to native, when the platform's
+ * native string is Unicode (PJ_NATIVE_STRING_IS_UNICODE is non-zero).
+ */
+#   define PJ_STRING_TO_NATIVE(s,buf,max)	pj_ansi_to_unicode( \
+						    s, strlen(s), \
+						    buf, max)
+
+/**
+ * This macro is used to declare temporary ANSI buffer for Unicode to 
+ * ANSI conversion, and should be put in declaration section of a block.
+ * When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this 
+ * macro will expand to nothing.
+ */
+#   define PJ_DECL_ANSI_TEMP_BUF(buf,size)	char buf[size];
+
+
+/**
+ * This macro will convert Unicode string to ANSI, when the platform's
+ * native string is Unicode (PJ_NATIVE_STRING_IS_UNICODE is non-zero).
+ */
+#   define PJ_NATIVE_TO_STRING(cs,buf,max)	pj_unicode_to_ansi( \
+						    cs, wcslen(cs), \
+						    buf, max)
+
+#else
+
+/**
+ * This macro is used to declare temporary Unicode buffer for ANSI to 
+ * Unicode conversion, and should be put in declaration section of a block.
+ * When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this 
+ * macro will expand to nothing.
+ */
+#   define PJ_DECL_UNICODE_TEMP_BUF(var,size)
+/**
+ * This macro will convert ANSI string to native, when the platform's
+ * native string is Unicode (PJ_NATIVE_STRING_IS_UNICODE is non-zero).
+ */
+#   define PJ_STRING_TO_NATIVE(s,buf,max)	((char*)s)
+/**
+ * This macro is used to declare temporary ANSI buffer for Unicode to 
+ * ANSI conversion, and should be put in declaration section of a block.
+ * When PJ_NATIVE_STRING_IS_UNICODE macro is not defined, this 
+ * macro will expand to nothing.
+ */
+#   define PJ_DECL_ANSI_TEMP_BUF(buf,size)
+/**
+ * This macro will convert Unicode string to ANSI, when the platform's
+ * native string is Unicode (PJ_NATIVE_STRING_IS_UNICODE is non-zero).
+ */
+#   define PJ_NATIVE_TO_STRING(cs,buf,max)	((char*)(const char*)cs)
+
+#endif
+
+
+
+PJ_END_DECL
+
+/*
+ * @}
+ */
+
+
+#endif	/* __PJ_UNICODE_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pjlib++.hpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pjlib++.hpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pjlib++.hpp	(revision 1163)
@@ -0,0 +1,34 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2006 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 __PJLIBPP_H__
+#define __PJLIBPP_H__
+
+#include <pj++/file.hpp>
+#include <pj++/pool.hpp>
+#include <pj++/hash.hpp>
+#include <pj++/list.hpp>
+#include <pj++/os.hpp>
+#include <pj++/proactor.hpp>
+#include <pj++/scanner.hpp>
+#include <pj++/sock.hpp>
+#include <pj++/string.hpp>
+#include <pj++/timer.hpp>
+#include <pj++/tree.hpp>
+
+#endif	/* __PJLIBPP_H__ */
Index: /pjproject/branches/split-3rd-party/pjlib/include/pjlib.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/include/pjlib.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/include/pjlib.h	(revision 1163)
@@ -0,0 +1,58 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 __PJLIB_H__
+#define __PJLIB_H__
+
+/**
+ * @file pjlib.h
+ * @brief Include all PJLIB header files.
+ */
+
+#include <pj/addr_resolv.h>
+#include <pj/array.h>
+#include <pj/assert.h>
+#include <pj/ctype.h>
+#include <pj/errno.h>
+#include <pj/except.h>
+#include <pj/fifobuf.h>
+#include <pj/file_access.h>
+#include <pj/file_io.h>
+#include <pj/guid.h>
+#include <pj/hash.h>
+#include <pj/ioqueue.h>
+#include <pj/ip_helper.h>
+#include <pj/list.h>
+#include <pj/lock.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/pool_buf.h>
+#include <pj/rand.h>
+#include <pj/rbtree.h>
+#include <pj/sock.h>
+#include <pj/sock_select.h>
+#include <pj/string.h>
+#include <pj/timer.h>
+#include <pj/unicode.h>
+
+#include <pj/compat/high_precision.h>
+
+#endif  /* __PJLIB_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/addr_resolv_linux_kernel.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/addr_resolv_linux_kernel.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/addr_resolv_linux_kernel.c	(revision 1163)
@@ -0,0 +1,25 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+#include <pj/addr_resolv.h>
+
+PJ_DEF(pj_status_t) pj_gethostbyname(const pj_str_t *hostname, pj_hostent *phe)
+{
+    return -1;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/addr_resolv_sock.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/addr_resolv_sock.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/addr_resolv_sock.c	(revision 1163)
@@ -0,0 +1,117 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
+ */
+#include <pj/addr_resolv.h>
+#include <pj/assert.h>
+#include <pj/string.h>
+#include <pj/errno.h>
+#include <pj/compat/socket.h>
+
+
+PJ_DEF(pj_status_t) pj_gethostbyname(const pj_str_t *hostname, pj_hostent *phe)
+{
+    struct hostent *he;
+    char copy[PJ_MAX_HOSTNAME];
+
+    pj_assert(hostname && hostname ->slen < PJ_MAX_HOSTNAME);
+    
+    if (hostname->slen >= PJ_MAX_HOSTNAME)
+	return PJ_ENAMETOOLONG;
+
+    pj_memcpy(copy, hostname->ptr, hostname->slen);
+    copy[ hostname->slen ] = '\0';
+
+    he = gethostbyname(copy);
+    if (!he) {
+	return PJ_ERESOLVE;
+	/* DO NOT use pj_get_netos_error() since host resolution error
+	 * is reported in h_errno instead of errno!
+	return pj_get_netos_error();
+	 */
+    }
+
+    phe->h_name = he->h_name;
+    phe->h_aliases = he->h_aliases;
+    phe->h_addrtype = he->h_addrtype;
+    phe->h_length = he->h_length;
+    phe->h_addr_list = he->h_addr_list;
+
+    return PJ_SUCCESS;
+}
+
+/* Resolve the IP address of local machine */
+PJ_DEF(pj_status_t) pj_gethostip(pj_in_addr *addr)
+{
+    const pj_str_t *hostname = pj_gethostname();
+    struct pj_hostent he;
+    pj_status_t status;
+
+
+#ifdef _MSC_VER
+    /* Get rid of "uninitialized he variable" with MS compilers */
+    pj_bzero(&he, sizeof(he));
+#endif
+
+    /* Try with resolving local hostname first */
+    status = pj_gethostbyname(hostname, &he);
+    if (status == PJ_SUCCESS) {
+	*addr = *(pj_in_addr*)he.h_addr;
+    }
+
+
+    /* If we end up with 127.x.x.x, resolve the IP by getting the default
+     * interface to connect to some public host.
+     */
+    if (status != PJ_SUCCESS || (pj_ntohl(addr->s_addr) >> 24)==127) {
+	pj_sock_t fd;
+	pj_str_t cp;
+	pj_sockaddr_in a;
+	int len;
+
+	status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &fd);
+	if (status != PJ_SUCCESS) {
+	    return status;
+	}
+
+	cp = pj_str("1.1.1.1");
+	pj_sockaddr_in_init(&a, &cp, 53);
+
+	status = pj_sock_connect(fd, &a, sizeof(a));
+	if (status != PJ_SUCCESS) {
+	    pj_sock_close(fd);
+	    /* Return 127.0.0.1 as the address */
+	    return PJ_SUCCESS;
+	}
+
+	len = sizeof(a);
+	status = pj_sock_getsockname(fd, &a, &len);
+	if (status != PJ_SUCCESS) {
+	    pj_sock_close(fd);
+	    /* Return 127.0.0.1 as the address */
+	    return PJ_SUCCESS;
+	}
+
+	pj_sock_close(fd);
+
+	*addr = a.sin_addr;
+    }
+
+    return status;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/array.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/array.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/array.c	(revision 1163)
@@ -0,0 +1,70 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/array.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+
+PJ_DEF(void) pj_array_insert( void *array,
+			      unsigned elem_size,
+			      unsigned count,
+			      unsigned pos,
+			      const void *value)
+{
+    if (count && pos < count) {
+	pj_memmove( (char*)array + (pos+1)*elem_size,
+		    (char*)array + pos*elem_size,
+		    (count-pos)*elem_size);
+    }
+    pj_memmove((char*)array + pos*elem_size, value, elem_size);
+}
+
+PJ_DEF(void) pj_array_erase( void *array,
+			     unsigned elem_size,
+			     unsigned count,
+			     unsigned pos)
+{
+    pj_assert(count != 0);
+    if (pos < count-1) {
+	pj_memmove( (char*)array + pos*elem_size,
+		    (char*)array + (pos+1)*elem_size,
+		    (count-pos-1)*elem_size);
+    }
+}
+
+PJ_DEF(pj_status_t) pj_array_find( const void *array, 
+				   unsigned elem_size, 
+				   unsigned count, 
+				   pj_status_t (*matching)(const void *value),
+				   void **result)
+{
+    unsigned i;
+    const char *char_array = array;
+    for (i=0; i<count; ++i) {
+	if ( (*matching)(char_array) == PJ_SUCCESS) {
+	    if (result) {
+		*result = (void*)char_array;
+	    }
+	    return PJ_SUCCESS;
+	}
+	char_array += elem_size;
+    }
+    return PJ_ENOTFOUND;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/compat/longjmp_i386.S
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/compat/longjmp_i386.S	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/compat/longjmp_i386.S	(revision 1163)
@@ -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
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/compat/setjmp_i386.S
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/compat/setjmp_i386.S	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/compat/setjmp_i386.S	(revision 1163)
@@ -0,0 +1,61 @@
+/* setjmp for i386, ELF version.
+   Copyright (C) 1995, 1996, 1997, 2000, 2001 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 Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; 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 __sigsetjmp
+.type   __sigsetjmp,%function
+.align 4
+
+__sigsetjmp:
+        movl 4   (%esp), %eax
+     	/* Save registers.  */
+        movl %ebx, (0 *4)(%eax)
+        movl %esi, (1 *4)(%eax)
+        movl %edi, (2 *4)(%eax)
+	/* Save SP as it will be after we return.  */
+        leal 4(%esp), %ecx       
+        movl %ecx, (4 *4)(%eax)
+	/* Save PC we are returning to now.  */
+        movl 0(%esp), %ecx       
+        movl %ecx, (5 *4)(%eax)
+	/* Save caller's frame pointer.  */
+        movl %ebp, (3 *4)(%eax)  
+
+	/* Make a tail call to __sigjmp_save; it takes the same args.  */
+#ifdef	__PIC__
+	/* We cannot use the PLT, because it requires that %ebx be set, but
+           we can't save and restore our caller's value.  Instead, we do an
+           indirect jump through the GOT, using for the temporary register
+           %ecx, which is call-clobbered.  */
+	call .Lhere
+.Lhere:
+	popl %ecx
+	addl $_GLOBAL_OFFSET_TABLE_+[.- .Lhere  ], %ecx
+	movl    __sigjmp_save    @GOT  (%ecx), %ecx
+	jmp *%ecx
+#else
+	jmp   __sigjmp_save
+#endif
+.size __sigsetjmp,.-__sigsetjmp
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/compat/sigjmp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/compat/sigjmp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/compat/sigjmp.c	(revision 1163)
@@ -0,0 +1,39 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/config.h>
+#include <pj/compat/setjmp.h>
+
+int __sigjmp_save(sigjmp_buf env, int savemask)
+{
+    return 0;
+}
+
+extern int __sigsetjmp(pj_jmp_buf env, int savemask);
+extern void __longjmp(pj_jmp_buf env, int val) __attribute__((noreturn));
+
+PJ_DEF(int) pj_setjmp(pj_jmp_buf env)
+{
+    return __sigsetjmp(env, 0);
+}
+
+PJ_DEF(void) pj_longjmp(pj_jmp_buf env, int val)
+{
+    __longjmp(env, val);
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/compat/string.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/compat/string.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/compat/string.c	(revision 1163)
@@ -0,0 +1,44 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/types.h>
+#include <pj/compat/string.h>
+#include <pj/ctype.h>
+
+PJ_DEF(int) strcasecmp(const char *s1, const char *s2)
+{
+    while ((*s1==*s2) || (pj_tolower(*s1)==pj_tolower(*s2))) {
+	if (!*s1++)
+	    return 0;
+	++s2;
+    }
+    return (pj_tolower(*s1) < pj_tolower(*s2)) ? -1 : 1;
+}
+
+PJ_DEF(int) strncasecmp(const char *s1, const char *s2, int len)
+{
+    if (!len) return 0;
+
+    while ((*s1==*s2) || (pj_tolower(*s1)==pj_tolower(*s2))) {
+	if (!*s1++ || --len <= 0)
+	    return 0;
+	++s2;
+    }
+    return (pj_tolower(*s1) < pj_tolower(*s2)) ? -1 : 1;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/config.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/config.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/config.c	(revision 1163)
@@ -0,0 +1,64 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/config.h>
+#include <pj/log.h>
+#include <pj/ioqueue.h>
+
+static const char *id = "config.c";
+const char *PJ_VERSION = "0.5.10.2-trunk";
+
+PJ_DEF(void) pj_dump_config(void)
+{
+    PJ_LOG(3, (id, "PJLIB (c)2001-2007 Benny Prijono"));
+    PJ_LOG(3, (id, "Dumping configurations:"));
+    PJ_LOG(3, (id, " PJ_VERSION                : %s", PJ_VERSION));
+    PJ_LOG(3, (id, " PJ_M_NAME                 : %s", PJ_M_NAME));
+    PJ_LOG(3, (id, " PJ_HAS_PENTIUM            : %d", PJ_HAS_PENTIUM));
+    PJ_LOG(3, (id, " PJ_OS_NAME                : %s", PJ_OS_NAME));
+    PJ_LOG(3, (id, " PJ_CC_NAME/VER_(1,2,3)    : %s-%d.%d.%d", PJ_CC_NAME,
+	       PJ_CC_VER_1, PJ_CC_VER_2, PJ_CC_VER_3));
+    PJ_LOG(3, (id, " PJ_IS_(BIG/LITTLE)_ENDIAN : %s", 
+	       (PJ_IS_BIG_ENDIAN?"big-endian":"little-endian")));
+    PJ_LOG(3, (id, " PJ_HAS_INT64              : %d", PJ_HAS_INT64));
+    PJ_LOG(3, (id, " PJ_HAS_FLOATING_POINT     : %d", PJ_HAS_FLOATING_POINT));
+    PJ_LOG(3, (id, " PJ_DEBUG                  : %d", PJ_DEBUG));
+    PJ_LOG(3, (id, " PJ_FUNCTIONS_ARE_INLINED  : %d", PJ_FUNCTIONS_ARE_INLINED));
+    PJ_LOG(3, (id, " PJ_LOG_MAX_LEVEL          : %d", PJ_LOG_MAX_LEVEL));
+    PJ_LOG(3, (id, " PJ_LOG_MAX_SIZE           : %d", PJ_LOG_MAX_SIZE));
+    PJ_LOG(3, (id, " PJ_LOG_USE_STACK_BUFFER   : %d", PJ_LOG_USE_STACK_BUFFER));
+    PJ_LOG(3, (id, " PJ_POOL_DEBUG             : %d", PJ_POOL_DEBUG));
+    PJ_LOG(3, (id, " PJ_HAS_POOL_ALT_API       : %d", PJ_HAS_POOL_ALT_API));
+    PJ_LOG(3, (id, " PJ_HAS_TCP                : %d", PJ_HAS_TCP));
+    PJ_LOG(3, (id, " PJ_MAX_HOSTNAME           : %d", PJ_MAX_HOSTNAME));
+    PJ_LOG(3, (id, " ioqueue type              : %s", pj_ioqueue_name()));
+    PJ_LOG(3, (id, " PJ_IOQUEUE_MAX_HANDLES    : %d", PJ_IOQUEUE_MAX_HANDLES));
+    PJ_LOG(3, (id, " PJ_IOQUEUE_HAS_SAFE_UNREG : %d", PJ_IOQUEUE_HAS_SAFE_UNREG));
+    PJ_LOG(3, (id, " PJ_HAS_THREADS            : %d", PJ_HAS_THREADS));
+    PJ_LOG(3, (id, " PJ_LOG_USE_STACK_BUFFER   : %d", PJ_LOG_USE_STACK_BUFFER));
+    PJ_LOG(3, (id, " PJ_HAS_SEMAPHORE          : %d", PJ_HAS_SEMAPHORE));
+    PJ_LOG(3, (id, " PJ_HAS_EVENT_OBJ          : %d", PJ_HAS_EVENT_OBJ));
+    PJ_LOG(3, (id, " PJ_ENABLE_EXTRA_CHECK     : %d", PJ_ENABLE_EXTRA_CHECK));
+    PJ_LOG(3, (id, " PJ_HAS_EXCEPTION_NAMES    : %d", PJ_HAS_EXCEPTION_NAMES));
+    PJ_LOG(3, (id, " PJ_MAX_EXCEPTION_ID       : %d", PJ_MAX_EXCEPTION_ID));
+    PJ_LOG(3, (id, " PJ_EXCEPTION_USE_WIN32_SEH: %d", PJ_EXCEPTION_USE_WIN32_SEH));
+    PJ_LOG(3, (id, " PJ_TIMESTAMP_USE_RDTSC:   : %d", PJ_TIMESTAMP_USE_RDTSC));
+    PJ_LOG(3, (id, " PJ_OS_HAS_CHECK_STACK     : %d", PJ_OS_HAS_CHECK_STACK));
+    PJ_LOG(3, (id, " PJ_HAS_HIGH_RES_TIMER     : %d", PJ_HAS_HIGH_RES_TIMER));
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/ctype.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/ctype.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/ctype.c	(revision 1163)
@@ -0,0 +1,24 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/ctype.h>
+
+
+char pj_hex_digits[] = {'0', '1', '2', '3', '4', '5', '6', '7',
+			'8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/errno.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/errno.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/errno.c	(revision 1163)
@@ -0,0 +1,191 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/errno.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+
+/* Prototype for platform specific error message, which will be defined 
+ * in separate file.
+ */
+extern int platform_strerror( pj_os_err_type code, 
+                              char *buf, pj_size_t bufsize );
+
+#define PJLIB_MAX_ERR_MSG_HANDLER   8
+
+/* Error message handler. */
+static unsigned err_msg_hnd_cnt;
+static struct err_msg_hnd
+{
+    pj_status_t	    begin;
+    pj_status_t	    end;
+    pj_str_t	  (*strerror)(pj_status_t, char*, pj_size_t);
+
+} err_msg_hnd[PJLIB_MAX_ERR_MSG_HANDLER];
+
+/* PJLIB's own error codes/messages */
+#if defined(PJ_HAS_ERROR_STRING) && PJ_HAS_ERROR_STRING!=0
+
+static const struct 
+{
+    int code;
+    const char *msg;
+} err_str[] = 
+{
+    PJ_BUILD_ERR(PJ_EUNKNOWN,      "Unknown Error" ),
+    PJ_BUILD_ERR(PJ_EPENDING,      "Pending operation" ),
+    PJ_BUILD_ERR(PJ_ETOOMANYCONN,  "Too many connecting sockets" ),
+    PJ_BUILD_ERR(PJ_EINVAL,        "Invalid value or argument" ),
+    PJ_BUILD_ERR(PJ_ENAMETOOLONG,  "Name too long" ),
+    PJ_BUILD_ERR(PJ_ENOTFOUND,     "Not found" ),
+    PJ_BUILD_ERR(PJ_ENOMEM,        "Not enough memory" ),
+    PJ_BUILD_ERR(PJ_EBUG,          "BUG DETECTED!" ),
+    PJ_BUILD_ERR(PJ_ETIMEDOUT,     "Operation timed out" ),
+    PJ_BUILD_ERR(PJ_ETOOMANY,      "Too many objects of the specified type"),
+    PJ_BUILD_ERR(PJ_EBUSY,         "Object is busy"),
+    PJ_BUILD_ERR(PJ_ENOTSUP,	   "Option/operation is not supported"),
+    PJ_BUILD_ERR(PJ_EINVALIDOP,	   "Invalid operation"),
+    PJ_BUILD_ERR(PJ_ECANCELLED,    "Operation cancelled"),
+    PJ_BUILD_ERR(PJ_EEXISTS,       "Object already exists" ),
+    PJ_BUILD_ERR(PJ_EEOF,	   "End of file" ),
+    PJ_BUILD_ERR(PJ_ETOOBIG,	   "Size is too big"),
+    PJ_BUILD_ERR(PJ_ERESOLVE,	   "gethostbyname() has returned error"),
+    PJ_BUILD_ERR(PJ_ETOOSMALL,	   "Size is too short"),
+};
+#endif	/* PJ_HAS_ERROR_STRING */
+
+
+/*
+ * pjlib_error()
+ *
+ * Retrieve message string for PJLIB's own error code.
+ */
+static int pjlib_error(pj_status_t code, char *buf, pj_size_t size)
+{
+#if defined(PJ_HAS_ERROR_STRING) && PJ_HAS_ERROR_STRING!=0
+    unsigned i;
+
+    for (i=0; i<sizeof(err_str)/sizeof(err_str[0]); ++i) {
+        if (err_str[i].code == code) {
+            pj_size_t len = strlen(err_str[i].msg);
+            if (len >= size) len = size-1;
+            pj_memcpy(buf, err_str[i].msg, len);
+            buf[len] = '\0';
+            return len;
+        }
+    }
+#endif
+
+    return pj_ansi_snprintf( buf, size, "Unknown pjlib error %d", code);
+}
+
+#define IN_RANGE(val,start,end)	    ((val)>=(start) && (val)<(end))
+
+/* Register strerror handle. */
+PJ_DECL(pj_status_t) pj_register_strerror(pj_status_t start,
+					  pj_status_t space,
+					  pj_str_t (*f)(pj_status_t,char*,
+							pj_size_t))
+{
+    unsigned i;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(start && space && f, PJ_EINVAL);
+
+    /* Check if there aren't too many handlers registered. */
+    PJ_ASSERT_RETURN(err_msg_hnd_cnt < PJ_ARRAY_SIZE(err_msg_hnd),
+		     PJ_ETOOMANY);
+
+    /* Start error must be greater than PJ_ERRNO_START_USER */
+    PJ_ASSERT_RETURN(start >= PJ_ERRNO_START_USER, PJ_EEXISTS);
+
+    /* Check that no existing handler has covered the specified range. */
+    for (i=0; i<err_msg_hnd_cnt; ++i) {
+	if (IN_RANGE(start, err_msg_hnd[i].begin, err_msg_hnd[i].end) ||
+	    IN_RANGE(start+space-1, err_msg_hnd[i].begin, err_msg_hnd[i].end))
+	{
+	    return PJ_EEXISTS;
+	}
+    }
+
+    /* Register the handler. */
+    err_msg_hnd[err_msg_hnd_cnt].begin = start;
+    err_msg_hnd[err_msg_hnd_cnt].end = start + space;
+    err_msg_hnd[err_msg_hnd_cnt].strerror = f;
+
+    ++err_msg_hnd_cnt;
+
+    return PJ_SUCCESS;
+}
+
+/* Internal PJLIB function called by pj_shutdown() to clear error handlers */
+void pj_errno_clear_handlers(void)
+{
+    err_msg_hnd_cnt = 0;
+    pj_bzero(err_msg_hnd, sizeof(err_msg_hnd));
+}
+
+
+/*
+ * pj_strerror()
+ */
+PJ_DEF(pj_str_t) pj_strerror( pj_status_t statcode, 
+			      char *buf, pj_size_t bufsize )
+{
+    int len = -1;
+    pj_str_t errstr;
+
+    pj_assert(buf && bufsize);
+
+    if (statcode == PJ_SUCCESS) {
+	len = pj_ansi_snprintf( buf, bufsize, "Success");
+
+    } else if (statcode < PJ_ERRNO_START + PJ_ERRNO_SPACE_SIZE) {
+        len = pj_ansi_snprintf( buf, bufsize, "Unknown error %d", statcode);
+
+    } else if (statcode < PJ_ERRNO_START_STATUS + PJ_ERRNO_SPACE_SIZE) {
+        len = pjlib_error(statcode, buf, bufsize);
+
+    } else if (statcode < PJ_ERRNO_START_SYS + PJ_ERRNO_SPACE_SIZE) {
+        len = platform_strerror(PJ_STATUS_TO_OS(statcode), buf, bufsize);
+
+    } else {
+	unsigned i;
+
+	/* Find user handler to get the error message. */
+	for (i=0; i<err_msg_hnd_cnt; ++i) {
+	    if (IN_RANGE(statcode, err_msg_hnd[i].begin, err_msg_hnd[i].end)) {
+		return (*err_msg_hnd[i].strerror)(statcode, buf, bufsize);
+	    }
+	}
+
+	/* Handler not found! */
+	len = pj_ansi_snprintf( buf, bufsize, "Unknown error %d", statcode);
+    }
+
+    if (len < 1) {
+        *buf = '\0';
+        len = 0;
+    }
+
+    errstr.ptr = buf;
+    errstr.slen = len;
+
+    return errstr;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/except.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/except.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/except.c	(revision 1163)
@@ -0,0 +1,179 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/os.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/errno.h>
+#include <pj/string.h>
+
+static long thread_local_id = -1;
+
+#if defined(PJ_HAS_EXCEPTION_NAMES) && PJ_HAS_EXCEPTION_NAMES != 0
+    static const char *exception_id_names[PJ_MAX_EXCEPTION_ID];
+#else
+    /*
+     * Start from 1 (not 0)!!!
+     * Exception 0 is reserved for normal path of setjmp()!!!
+     */
+    static int last_exception_id = 1;
+#endif  /* PJ_HAS_EXCEPTION_NAMES */
+
+
+#if !defined(PJ_EXCEPTION_USE_WIN32_SEH) || PJ_EXCEPTION_USE_WIN32_SEH==0
+PJ_DEF(void) pj_throw_exception_(int exception_id)
+{
+    struct pj_exception_state_t *handler;
+
+    handler = pj_thread_local_get(thread_local_id);
+    if (handler == NULL) {
+        PJ_LOG(1,("except.c", "!!!FATAL: unhandled exception %s!\n", 
+		   pj_exception_id_name(exception_id)));
+        pj_assert(handler != NULL);
+        /* This will crash the system! */
+    }
+    pj_longjmp(handler->state, exception_id);
+}
+
+static void exception_cleanup(void)
+{
+    if (thread_local_id != -1) {
+	pj_thread_local_free(thread_local_id);
+	thread_local_id = -1;
+    }
+
+#if defined(PJ_HAS_EXCEPTION_NAMES) && PJ_HAS_EXCEPTION_NAMES != 0
+    {
+	unsigned i;
+	for (i=0; i<PJ_MAX_EXCEPTION_ID; ++i)
+	    exception_id_names[i] = NULL;
+    }
+#else
+    last_exception_id = 1;
+#endif
+}
+
+PJ_DEF(void) pj_push_exception_handler_(struct pj_exception_state_t *rec)
+{
+    struct pj_exception_state_t *parent_handler = NULL;
+
+    if (thread_local_id == -1) {
+	pj_thread_local_alloc(&thread_local_id);
+	pj_assert(thread_local_id != -1);
+	pj_atexit(&exception_cleanup);
+    }
+    parent_handler = pj_thread_local_get(thread_local_id);
+    rec->prev = parent_handler;
+    pj_thread_local_set(thread_local_id, rec);
+}
+
+PJ_DEF(void) pj_pop_exception_handler_(void)
+{
+    struct pj_exception_state_t *handler;
+
+    handler = pj_thread_local_get(thread_local_id);
+    pj_assert(handler != NULL);
+    pj_thread_local_set(thread_local_id, handler->prev);
+}
+#endif
+
+#if defined(PJ_HAS_EXCEPTION_NAMES) && PJ_HAS_EXCEPTION_NAMES != 0
+PJ_DEF(pj_status_t) pj_exception_id_alloc( const char *name,
+                                           pj_exception_id_t *id)
+{
+    unsigned i;
+
+    pj_enter_critical_section();
+
+    /*
+     * Start from 1 (not 0)!!!
+     * Exception 0 is reserved for normal path of setjmp()!!!
+     */
+    for (i=1; i<PJ_MAX_EXCEPTION_ID; ++i) {
+        if (exception_id_names[i] == NULL) {
+            exception_id_names[i] = name;
+            *id = i;
+            pj_leave_critical_section();
+            return PJ_SUCCESS;
+        }
+    }
+
+    pj_leave_critical_section();
+    return PJ_ETOOMANY;
+}
+
+PJ_DEF(pj_status_t) pj_exception_id_free( pj_exception_id_t id )
+{
+    /*
+     * Start from 1 (not 0)!!!
+     * Exception 0 is reserved for normal path of setjmp()!!!
+     */
+    PJ_ASSERT_RETURN(id>0 && id<PJ_MAX_EXCEPTION_ID, PJ_EINVAL);
+    
+    pj_enter_critical_section();
+    exception_id_names[id] = NULL;
+    pj_leave_critical_section();
+
+    return PJ_SUCCESS;
+
+}
+
+PJ_DEF(const char*) pj_exception_id_name(pj_exception_id_t id)
+{
+    static char unknown_name[32];
+
+    /*
+     * Start from 1 (not 0)!!!
+     * Exception 0 is reserved for normal path of setjmp()!!!
+     */
+    PJ_ASSERT_RETURN(id>0 && id<PJ_MAX_EXCEPTION_ID, "<Invalid ID>");
+
+    if (exception_id_names[id] == NULL) {
+        pj_ansi_snprintf(unknown_name, sizeof(unknown_name), 
+			 "exception %d", id);
+	return unknown_name;
+    }
+
+    return exception_id_names[id];
+}
+
+#else   /* PJ_HAS_EXCEPTION_NAMES */
+PJ_DEF(pj_status_t) pj_exception_id_alloc( const char *name,
+                                           pj_exception_id_t *id)
+{
+    PJ_ASSERT_RETURN(last_exception_id < PJ_MAX_EXCEPTION_ID-1, PJ_ETOOMANY);
+
+    *id = last_exception_id++;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_exception_id_free( pj_exception_id_t id )
+{
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(const char*) pj_exception_id_name(pj_exception_id_t id)
+{
+    return "";
+}
+
+#endif  /* PJ_HAS_EXCEPTION_NAMES */
+
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/extra-exports.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/extra-exports.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/extra-exports.c	(revision 1163)
@@ -0,0 +1,40 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 <linux/module.h>
+#include <linux/syscalls.h>
+
+EXPORT_SYMBOL(sys_select);
+
+EXPORT_SYMBOL(sys_epoll_create);
+EXPORT_SYMBOL(sys_epoll_ctl);
+EXPORT_SYMBOL(sys_epoll_wait);
+
+EXPORT_SYMBOL(sys_socket);
+EXPORT_SYMBOL(sys_bind);
+EXPORT_SYMBOL(sys_getpeername);
+EXPORT_SYMBOL(sys_getsockname);
+EXPORT_SYMBOL(sys_sendto);
+EXPORT_SYMBOL(sys_recvfrom);
+EXPORT_SYMBOL(sys_getsockopt);
+EXPORT_SYMBOL(sys_setsockopt);
+EXPORT_SYMBOL(sys_listen);
+EXPORT_SYMBOL(sys_shutdown);
+EXPORT_SYMBOL(sys_connect);
+EXPORT_SYMBOL(sys_accept);
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/fifobuf.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/fifobuf.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/fifobuf.c	(revision 1163)
@@ -0,0 +1,193 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/fifobuf.h>
+#include <pj/log.h>
+#include <pj/assert.h>
+#include <pj/os.h>
+
+#define THIS_FILE   "fifobuf"
+
+#define SZ  sizeof(unsigned)
+
+PJ_DEF(void)
+pj_fifobuf_init (pj_fifobuf_t *fifobuf, void *buffer, unsigned size)
+{
+    PJ_CHECK_STACK();
+
+    PJ_LOG(6, (THIS_FILE, 
+	       "fifobuf_init fifobuf=%p buffer=%p, size=%d", 
+	       fifobuf, buffer, size));
+
+    fifobuf->first = buffer;
+    fifobuf->last = fifobuf->first + size;
+    fifobuf->ubegin = fifobuf->uend = fifobuf->first;
+    fifobuf->full = 0;
+}
+
+PJ_DEF(unsigned)
+pj_fifobuf_max_size (pj_fifobuf_t *fifobuf)
+{
+    unsigned s1, s2;
+
+    PJ_CHECK_STACK();
+
+    if (fifobuf->uend >= fifobuf->ubegin) {
+	s1 = fifobuf->last - fifobuf->uend;
+	s2 = fifobuf->ubegin - fifobuf->first;
+    } else {
+	s1 = s2 = fifobuf->ubegin - fifobuf->uend;
+    }
+    
+    return s1<s2 ? s2 : s1;
+}
+
+PJ_DEF(void*)
+pj_fifobuf_alloc (pj_fifobuf_t *fifobuf, unsigned size)
+{
+    unsigned available;
+    char *start;
+
+    PJ_CHECK_STACK();
+
+    if (fifobuf->full) {
+	PJ_LOG(6, (THIS_FILE, 
+		   "fifobuf_alloc fifobuf=%p, size=%d: full!", 
+		   fifobuf, size));
+	return NULL;
+    }
+
+    /* try to allocate from the end part of the fifo */
+    if (fifobuf->uend >= fifobuf->ubegin) {
+	available = fifobuf->last - fifobuf->uend;
+	if (available >= size+SZ) {
+	    char *ptr = fifobuf->uend;
+	    fifobuf->uend += (size+SZ);
+	    if (fifobuf->uend == fifobuf->last)
+		fifobuf->uend = fifobuf->first;
+	    if (fifobuf->uend == fifobuf->ubegin)
+		fifobuf->full = 1;
+	    *(unsigned*)ptr = size+SZ;
+	    ptr += SZ;
+
+	    PJ_LOG(6, (THIS_FILE, 
+		       "fifobuf_alloc fifobuf=%p, size=%d: returning %p, p1=%p, p2=%p", 
+		       fifobuf, size, ptr, fifobuf->ubegin, fifobuf->uend));
+	    return ptr;
+	}
+    }
+
+    /* try to allocate from the start part of the fifo */
+    start = (fifobuf->uend <= fifobuf->ubegin) ? fifobuf->uend : fifobuf->first;
+    available = fifobuf->ubegin - start;
+    if (available >= size+SZ) {
+	char *ptr = start;
+	fifobuf->uend = start + size + SZ;
+	if (fifobuf->uend == fifobuf->ubegin)
+	    fifobuf->full = 1;
+	*(unsigned*)ptr = size+SZ;
+	ptr += SZ;
+
+	PJ_LOG(6, (THIS_FILE, 
+		   "fifobuf_alloc fifobuf=%p, size=%d: returning %p, p1=%p, p2=%p", 
+		   fifobuf, size, ptr, fifobuf->ubegin, fifobuf->uend));
+	return ptr;
+    }
+
+    PJ_LOG(6, (THIS_FILE, 
+	       "fifobuf_alloc fifobuf=%p, size=%d: no space left! p1=%p, p2=%p", 
+	       fifobuf, size, fifobuf->ubegin, fifobuf->uend));
+    return NULL;
+}
+
+PJ_DEF(pj_status_t)
+pj_fifobuf_unalloc (pj_fifobuf_t *fifobuf, void *buf)
+{
+    char *ptr = buf;
+    char *endptr;
+    unsigned sz;
+
+    PJ_CHECK_STACK();
+
+    ptr -= SZ;
+    sz = *(unsigned*)ptr;
+
+    endptr = fifobuf->uend;
+    if (endptr == fifobuf->first)
+	endptr = fifobuf->last;
+
+    if (ptr+sz != endptr) {
+	pj_assert(!"Invalid pointer to undo alloc");
+	return -1;
+    }
+
+    fifobuf->uend = ptr;
+    fifobuf->full = 0;
+
+    PJ_LOG(6, (THIS_FILE, 
+	       "fifobuf_unalloc fifobuf=%p, ptr=%p, size=%d, p1=%p, p2=%p", 
+	       fifobuf, buf, sz, fifobuf->ubegin, fifobuf->uend));
+
+    return 0;
+}
+
+PJ_DEF(pj_status_t)
+pj_fifobuf_free (pj_fifobuf_t *fifobuf, void *buf)
+{
+    char *ptr = buf;
+    char *end;
+    unsigned sz;
+
+    PJ_CHECK_STACK();
+
+    ptr -= SZ;
+    if (ptr < fifobuf->first || ptr >= fifobuf->last) {
+	pj_assert(!"Invalid pointer to free");
+	return -1;
+    }
+
+    if (ptr != fifobuf->ubegin && ptr != fifobuf->first) {
+	pj_assert(!"Invalid free() sequence!");
+	return -1;
+    }
+
+    end = (fifobuf->uend > fifobuf->ubegin) ? fifobuf->uend : fifobuf->last;
+    sz = *(unsigned*)ptr;
+    if (ptr+sz > end) {
+	pj_assert(!"Invalid size!");
+	return -1;
+    }
+
+    fifobuf->ubegin = ptr + sz;
+
+    /* Rollover */
+    if (fifobuf->ubegin == fifobuf->last)
+	fifobuf->ubegin = fifobuf->first;
+
+    /* Reset if fifobuf is empty */
+    if (fifobuf->ubegin == fifobuf->uend)
+	fifobuf->ubegin = fifobuf->uend = fifobuf->first;
+
+    fifobuf->full = 0;
+
+    PJ_LOG(6, (THIS_FILE, 
+	       "fifobuf_free fifobuf=%p, ptr=%p, size=%d, p1=%p, p2=%p", 
+	       fifobuf, buf, sz, fifobuf->ubegin, fifobuf->uend));
+
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/file_access_unistd.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/file_access_unistd.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/file_access_unistd.c	(revision 1163)
@@ -0,0 +1,113 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/file_access.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <stdio.h>	/* rename() */
+#include <errno.h>
+
+/*
+ * pj_file_exists()
+ */
+PJ_DEF(pj_bool_t) pj_file_exists(const char *filename)
+{
+    struct stat buf;
+
+    PJ_ASSERT_RETURN(filename, 0);
+
+    if (stat(filename, &buf) != 0)
+	return 0;
+
+    return PJ_TRUE;
+}
+
+
+/*
+ * pj_file_size()
+ */
+PJ_DEF(pj_off_t) pj_file_size(const char *filename)
+{
+    struct stat buf;
+
+    PJ_ASSERT_RETURN(filename, -1);
+
+    if (stat(filename, &buf) != 0)
+	return -1;
+
+    return buf.st_size;
+}
+
+
+/*
+ * pj_file_delete()
+ */
+PJ_DEF(pj_status_t) pj_file_delete(const char *filename)
+{
+    PJ_ASSERT_RETURN(filename, PJ_EINVAL);
+
+    if (unlink(filename)!=0) {
+	return PJ_RETURN_OS_ERROR(errno);
+    }
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * pj_file_move()
+ */
+PJ_DEF(pj_status_t) pj_file_move( const char *oldname, const char *newname)
+{
+    PJ_ASSERT_RETURN(oldname && newname, PJ_EINVAL);
+
+    if (rename(oldname, newname) != 0) {
+	return PJ_RETURN_OS_ERROR(errno);
+    }
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * pj_file_getstat()
+ */
+PJ_DEF(pj_status_t) pj_file_getstat(const char *filename, 
+				    pj_file_stat *statbuf)
+{
+    struct stat buf;
+
+    PJ_ASSERT_RETURN(filename && statbuf, PJ_EINVAL);
+
+    if (stat(filename, &buf) != 0) {
+	return PJ_RETURN_OS_ERROR(errno);
+    }
+
+    statbuf->size = buf.st_size;
+    statbuf->ctime.sec = buf.st_ctime;
+    statbuf->ctime.msec = 0;
+    statbuf->mtime.sec = buf.st_mtime;
+    statbuf->mtime.msec = 0;
+    statbuf->atime.sec = buf.st_atime;
+    statbuf->atime.msec = 0;
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/file_access_win32.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/file_access_win32.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/file_access_win32.c	(revision 1163)
@@ -0,0 +1,206 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/file_access.h>
+#include <pj/unicode.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+#include <pj/string.h>
+#include <pj/os.h>
+#include <windows.h>
+#include <time.h>
+
+/*
+ * pj_file_exists()
+ */
+PJ_DEF(pj_bool_t) pj_file_exists(const char *filename)
+{
+    PJ_DECL_UNICODE_TEMP_BUF(wfilename,256)
+    HANDLE hFile;
+
+    PJ_ASSERT_RETURN(filename != NULL, 0);
+
+    hFile = CreateFile(PJ_STRING_TO_NATIVE(filename,wfilename,sizeof(wfilename)), 
+		       READ_CONTROL, 
+		       FILE_SHARE_READ, NULL,
+                       OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+    if (hFile == INVALID_HANDLE_VALUE)
+        return 0;
+
+    CloseHandle(hFile);
+    return PJ_TRUE;
+}
+
+
+/*
+ * pj_file_size()
+ */
+PJ_DEF(pj_off_t) pj_file_size(const char *filename)
+{
+    PJ_DECL_UNICODE_TEMP_BUF(wfilename,256)
+    HANDLE hFile;
+    DWORD sizeLo, sizeHi;
+    pj_off_t size;
+
+    PJ_ASSERT_RETURN(filename != NULL, -1);
+
+    hFile = CreateFile(PJ_STRING_TO_NATIVE(filename, wfilename,sizeof(wfilename)), 
+		       READ_CONTROL, 
+                       FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
+                       OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+    if (hFile == INVALID_HANDLE_VALUE)
+        return -1;
+
+    sizeLo = GetFileSize(hFile, &sizeHi);
+    if (sizeLo == INVALID_FILE_SIZE) {
+        DWORD dwStatus = GetLastError();
+        if (dwStatus != NO_ERROR) {
+            CloseHandle(hFile);
+            return -1;
+        }
+    }
+
+    size = sizeHi;
+    size = (size << 32) + sizeLo;
+
+    CloseHandle(hFile);
+    return size;
+}
+
+
+/*
+ * pj_file_delete()
+ */
+PJ_DEF(pj_status_t) pj_file_delete(const char *filename)
+{
+    PJ_DECL_UNICODE_TEMP_BUF(wfilename,256)
+
+    PJ_ASSERT_RETURN(filename != NULL, PJ_EINVAL);
+
+    if (DeleteFile(PJ_STRING_TO_NATIVE(filename,wfilename,sizeof(wfilename))) == FALSE)
+        return PJ_RETURN_OS_ERROR(GetLastError());
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * pj_file_move()
+ */
+PJ_DEF(pj_status_t) pj_file_move( const char *oldname, const char *newname)
+{
+    PJ_DECL_UNICODE_TEMP_BUF(woldname,256)
+    PJ_DECL_UNICODE_TEMP_BUF(wnewname,256)
+    BOOL rc;
+
+    PJ_ASSERT_RETURN(oldname!=NULL && newname!=NULL, PJ_EINVAL);
+
+#if PJ_WIN32_WINNT >= 0x0400
+    rc = MoveFileEx(PJ_STRING_TO_NATIVE(oldname,woldname,sizeof(woldname)), 
+		    PJ_STRING_TO_NATIVE(newname,wnewname,sizeof(wnewname)), 
+                    MOVEFILE_COPY_ALLOWED|MOVEFILE_REPLACE_EXISTING);
+#else
+    rc = MoveFile(PJ_STRING_TO_NATIVE(oldname,woldname,sizeof(woldname)), 
+		  PJ_STRING_TO_NATIVE(newname,wnewname,sizeof(wnewname)));
+#endif
+
+    if (!rc)
+        return PJ_RETURN_OS_ERROR(GetLastError());
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t file_time_to_time_val(const FILETIME *file_time,
+                                         pj_time_val *time_val)
+{
+    FILETIME local_file_time;
+    SYSTEMTIME localTime;
+    pj_parsed_time pt;
+
+    if (!FileTimeToLocalFileTime(file_time, &local_file_time))
+	return PJ_RETURN_OS_ERROR(GetLastError());
+
+    if (!FileTimeToSystemTime(file_time, &localTime))
+        return PJ_RETURN_OS_ERROR(GetLastError());
+
+    //if (!SystemTimeToTzSpecificLocalTime(NULL, &systemTime, &localTime))
+    //    return PJ_RETURN_OS_ERROR(GetLastError());
+
+    pj_bzero(&pt, sizeof(pt));
+    pt.year = localTime.wYear;
+    pt.mon = localTime.wMonth-1;
+    pt.day = localTime.wDay;
+    pt.wday = localTime.wDayOfWeek;
+
+    pt.hour = localTime.wHour;
+    pt.min = localTime.wMinute;
+    pt.sec = localTime.wSecond;
+    pt.msec = localTime.wMilliseconds;
+
+    return pj_time_encode(&pt, time_val);
+}
+
+/*
+ * pj_file_getstat()
+ */
+PJ_DEF(pj_status_t) pj_file_getstat(const char *filename, pj_file_stat *stat)
+{
+    PJ_DECL_UNICODE_TEMP_BUF(wfilename,256)
+    HANDLE hFile;
+    DWORD sizeLo, sizeHi;
+    FILETIME creationTime, accessTime, writeTime;
+
+    PJ_ASSERT_RETURN(filename!=NULL && stat!=NULL, PJ_EINVAL);
+
+    hFile = CreateFile(PJ_STRING_TO_NATIVE(filename,wfilename,sizeof(wfilename)), 
+		       READ_CONTROL, 
+		       FILE_SHARE_READ, NULL,
+                       OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+    if (hFile == INVALID_HANDLE_VALUE)
+        return PJ_RETURN_OS_ERROR(GetLastError());
+
+    sizeLo = GetFileSize(hFile, &sizeHi);
+    if (sizeLo == INVALID_FILE_SIZE) {
+        DWORD dwStatus = GetLastError();
+        if (dwStatus != NO_ERROR) {
+            CloseHandle(hFile);
+            return PJ_RETURN_OS_ERROR(dwStatus);
+        }
+    }
+
+    stat->size = sizeHi;
+    stat->size = (stat->size << 32) + sizeLo;
+
+    if (GetFileTime(hFile, &creationTime, &accessTime, &writeTime)==FALSE) {
+        DWORD dwStatus = GetLastError();
+        CloseHandle(hFile);
+        return PJ_RETURN_OS_ERROR(dwStatus);
+    }
+
+    CloseHandle(hFile);
+
+    if (file_time_to_time_val(&creationTime, &stat->ctime) != PJ_SUCCESS)
+        return PJ_RETURN_OS_ERROR(GetLastError());
+
+    file_time_to_time_val(&accessTime, &stat->atime);
+    file_time_to_time_val(&writeTime, &stat->mtime);
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/file_io_ansi.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/file_io_ansi.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/file_io_ansi.c	(revision 1163)
@@ -0,0 +1,167 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/file_io.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+#include <stdio.h>
+#include <errno.h>
+
+PJ_DEF(pj_status_t) pj_file_open( pj_pool_t *pool,
+                                  const char *pathname, 
+                                  unsigned flags,
+                                  pj_oshandle_t *fd)
+{
+    char mode[8];
+    char *p = mode;
+
+    PJ_ASSERT_RETURN(pathname && fd, PJ_EINVAL);
+    PJ_UNUSED_ARG(pool);
+
+    if ((flags & PJ_O_APPEND) == PJ_O_APPEND) {
+        if ((flags & PJ_O_WRONLY) == PJ_O_WRONLY) {
+            *p++ = 'a';
+            if ((flags & PJ_O_RDONLY) == PJ_O_RDONLY)
+                *p++ = '+';
+        } else {
+            /* This is invalid.
+             * Can not specify PJ_O_RDONLY with PJ_O_APPEND! 
+             */
+        }
+    } else {
+        if ((flags & PJ_O_RDONLY) == PJ_O_RDONLY) {
+            *p++ = 'r';
+            if ((flags & PJ_O_WRONLY) == PJ_O_WRONLY)
+                *p++ = '+';
+        } else {
+            *p++ = 'w';
+        }
+    }
+
+    if (p==mode)
+        return PJ_EINVAL;
+
+    *p++ = 'b';
+    *p++ = '\0';
+
+    *fd = fopen(pathname, mode);
+    if (*fd == NULL)
+        return PJ_RETURN_OS_ERROR(errno);
+    
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_file_close(pj_oshandle_t fd)
+{
+    PJ_ASSERT_RETURN(fd, PJ_EINVAL);
+    if (fclose((FILE*)fd) != 0)
+        return PJ_RETURN_OS_ERROR(errno);
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_file_write( pj_oshandle_t fd,
+                                   const void *data,
+                                   pj_ssize_t *size)
+{
+    size_t written;
+
+    clearerr((FILE*)fd);
+    written = fwrite(data, 1, *size, (FILE*)fd);
+    if (ferror((FILE*)fd)) {
+        *size = -1;
+        return PJ_RETURN_OS_ERROR(errno);
+    }
+
+    *size = written;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_file_read( pj_oshandle_t fd,
+                                  void *data,
+                                  pj_ssize_t *size)
+{
+    size_t bytes;
+
+    clearerr((FILE*)fd);
+    bytes = fread(data, 1, *size, (FILE*)fd);
+    if (ferror((FILE*)fd)) {
+        *size = -1;
+        return PJ_RETURN_OS_ERROR(errno);
+    }
+
+    *size = bytes;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_bool_t) pj_file_eof(pj_oshandle_t fd, enum pj_file_access access)
+{
+    PJ_UNUSED_ARG(access);
+    return feof((FILE*)fd) ? PJ_TRUE : 0;
+}
+
+PJ_DEF(pj_status_t) pj_file_setpos( pj_oshandle_t fd,
+                                    pj_off_t offset,
+                                    enum pj_file_seek_type whence)
+{
+    int mode;
+
+    switch (whence) {
+    case PJ_SEEK_SET:
+        mode = SEEK_SET; break;
+    case PJ_SEEK_CUR:
+        mode = SEEK_CUR; break;
+    case PJ_SEEK_END:
+        mode = SEEK_END; break;
+    default:
+        pj_assert(!"Invalid whence in file_setpos");
+        return PJ_EINVAL;
+    }
+
+    if (fseek((FILE*)fd, (long)offset, mode) != 0)
+        return PJ_RETURN_OS_ERROR(errno);
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_file_getpos( pj_oshandle_t fd,
+                                    pj_off_t *pos)
+{
+    long offset;
+
+    offset = ftell((FILE*)fd);
+    if (offset == -1) {
+        *pos = -1;
+        return PJ_RETURN_OS_ERROR(errno);
+    }
+
+    *pos = offset;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_file_flush(pj_oshandle_t fd)
+{
+    int rc;
+
+    rc = fflush((FILE*)fd);
+    if (rc == EOF) {
+	return PJ_RETURN_OS_ERROR(errno);
+    }
+
+    return PJ_SUCCESS;
+}
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/file_io_win32.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/file_io_win32.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/file_io_win32.c	(revision 1163)
@@ -0,0 +1,220 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/file_io.h>
+#include <pj/unicode.h>
+#include <pj/errno.h>
+#include <pj/assert.h>
+
+#include <windows.h>
+
+#ifndef INVALID_SET_FILE_POINTER
+#   define INVALID_SET_FILE_POINTER     ((DWORD)-1)
+#endif
+
+/**
+ * Check for end-of-file condition on the specified descriptor.
+ *
+ * @param fd            The file descriptor.
+ * @param access        The desired access.
+ *
+ * @return              Non-zero if file is EOF.
+ */
+PJ_DECL(pj_bool_t) pj_file_eof(pj_oshandle_t fd, 
+                               enum pj_file_access access);
+
+
+PJ_DEF(pj_status_t) pj_file_open( pj_pool_t *pool,
+                                  const char *pathname, 
+                                  unsigned flags,
+                                  pj_oshandle_t *fd)
+{
+    PJ_DECL_UNICODE_TEMP_BUF(wpathname,256)
+    HANDLE hFile;
+    DWORD dwDesiredAccess = 0;
+    DWORD dwShareMode = 0;
+    DWORD dwCreationDisposition = 0;
+    DWORD dwFlagsAndAttributes = 0;
+
+    PJ_UNUSED_ARG(pool);
+
+    PJ_ASSERT_RETURN(pathname!=NULL, PJ_EINVAL);
+
+    if ((flags & PJ_O_WRONLY) == PJ_O_WRONLY) {
+        dwDesiredAccess |= GENERIC_WRITE;
+        if ((flags & PJ_O_APPEND) == PJ_O_APPEND) {
+            dwDesiredAccess |= FILE_APPEND_DATA;
+        } else {
+            dwDesiredAccess &= ~(FILE_APPEND_DATA);
+            dwCreationDisposition |= CREATE_ALWAYS;
+        }
+    }
+    if ((flags & PJ_O_RDONLY) == PJ_O_RDONLY) {
+        dwDesiredAccess |= GENERIC_READ;
+        if (flags == PJ_O_RDONLY)
+            dwCreationDisposition |= OPEN_EXISTING;
+    }
+
+    if (dwDesiredAccess == 0) {
+        pj_assert(!"Invalid file open flags");
+        return PJ_EINVAL;
+    }
+
+    dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
+    dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL;
+
+    hFile = CreateFile(PJ_STRING_TO_NATIVE(pathname,wpathname,sizeof(wpathname)), 
+		       dwDesiredAccess, dwShareMode, NULL,
+                       dwCreationDisposition, dwFlagsAndAttributes, NULL);
+    if (hFile == INVALID_HANDLE_VALUE) {
+        *fd = 0;
+        return PJ_RETURN_OS_ERROR(GetLastError());
+    }
+
+    *fd = hFile;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_file_close(pj_oshandle_t fd)
+{
+    if (CloseHandle(fd)==0)
+        return PJ_RETURN_OS_ERROR(GetLastError());
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_file_write( pj_oshandle_t fd,
+                                   const void *data,
+                                   pj_ssize_t *size)
+{
+    BOOL rc;
+    DWORD bytesWritten;
+
+    rc = WriteFile(fd, data, *size, &bytesWritten, NULL);
+    if (!rc) {
+        *size = -1;
+        return PJ_RETURN_OS_ERROR(GetLastError());
+    }
+
+    *size = bytesWritten;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_file_read( pj_oshandle_t fd,
+                                  void *data,
+                                  pj_ssize_t *size)
+{
+    BOOL rc;
+    DWORD bytesRead;
+
+    rc = ReadFile(fd, data, *size, &bytesRead, NULL);
+    if (!rc) {
+        *size = -1;
+        return PJ_RETURN_OS_ERROR(GetLastError());
+    }
+
+    *size = bytesRead;
+    return PJ_SUCCESS;
+}
+
+/*
+PJ_DEF(pj_bool_t) pj_file_eof(pj_oshandle_t fd, enum pj_file_access access)
+{
+    BOOL rc;
+    DWORD dummy = 0, bytes;
+    DWORD dwStatus;
+
+    if ((access & PJ_O_RDONLY) == PJ_O_RDONLY) {
+        rc = ReadFile(fd, &dummy, 0, &bytes, NULL);
+    } else if ((access & PJ_O_WRONLY) == PJ_O_WRONLY) {
+        rc = WriteFile(fd, &dummy, 0, &bytes, NULL);
+    } else {
+        pj_assert(!"Invalid access");
+        return PJ_TRUE;
+    }
+
+    dwStatus = GetLastError();
+    if (dwStatus==ERROR_HANDLE_EOF)
+        return PJ_TRUE;
+
+    return 0;
+}
+*/
+
+PJ_DEF(pj_status_t) pj_file_setpos( pj_oshandle_t fd,
+                                    pj_off_t offset,
+                                    enum pj_file_seek_type whence)
+{
+    DWORD dwMoveMethod;
+    DWORD dwNewPos;
+    LONG  hi32;
+
+    if (whence == PJ_SEEK_SET)
+        dwMoveMethod = FILE_BEGIN;
+    else if (whence == PJ_SEEK_CUR)
+        dwMoveMethod = FILE_CURRENT;
+    else if (whence == PJ_SEEK_END)
+        dwMoveMethod = FILE_END;
+    else {
+        pj_assert(!"Invalid whence in file_setpos");
+        return PJ_EINVAL;
+    }
+
+    hi32 = (LONG)(offset >> 32);
+    dwNewPos = SetFilePointer(fd, (long)offset, &hi32, dwMoveMethod);
+    if (dwNewPos == (DWORD)INVALID_SET_FILE_POINTER) {
+        DWORD dwStatus = GetLastError();
+        if (dwStatus != 0)
+            return PJ_RETURN_OS_ERROR(dwStatus);
+        /* dwNewPos actually is not an error. */
+    }
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_file_getpos( pj_oshandle_t fd,
+                                    pj_off_t *pos)
+{
+    LONG hi32 = 0;
+    DWORD lo32;
+
+    lo32 = SetFilePointer(fd, 0, &hi32, FILE_CURRENT);
+    if (lo32 == (DWORD)INVALID_SET_FILE_POINTER) {
+        DWORD dwStatus = GetLastError();
+        if (dwStatus != 0)
+            return PJ_RETURN_OS_ERROR(dwStatus);
+    }
+
+    *pos = hi32;
+    *pos = (*pos << 32) + lo32;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_file_flush(pj_oshandle_t fd)
+{
+    BOOL rc;
+
+    rc = FlushFileBuffers(fd);
+
+    if (!rc) {
+	DWORD dwStatus = GetLastError();
+        if (dwStatus != 0)
+            return PJ_RETURN_OS_ERROR(dwStatus);
+    }
+
+    return PJ_SUCCESS;
+}
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/guid.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/guid.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/guid.c	(revision 1163)
@@ -0,0 +1,26 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/guid.h>
+#include <pj/pool.h>
+
+PJ_DEF(void) pj_create_unique_string(pj_pool_t *pool, pj_str_t *str)
+{
+    str->ptr = pj_pool_alloc(pool, PJ_GUID_STRING_LENGTH);
+    pj_generate_unique_string(str);
+}
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/guid_simple.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/guid_simple.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/guid_simple.c	(revision 1163)
@@ -0,0 +1,66 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/guid.h>
+#include <pj/os.h>
+#include <pj/rand.h>
+#include <pj/string.h>
+
+const unsigned PJ_GUID_STRING_LENGTH=20;
+
+static void init_mac_address(unsigned char mac_addr[16])
+{
+    unsigned long *ulval1 = (unsigned long*) &mac_addr[0];
+    unsigned short *usval1 = (unsigned short*) &mac_addr[4];
+
+    *ulval1 = pj_rand();
+    *usval1 = (unsigned short) pj_rand();
+}
+
+PJ_DEF(pj_str_t*) pj_generate_unique_string(pj_str_t *str)
+{
+    static int guid_initialized;
+    static unsigned pid;
+    static char str_pid[32];
+    static unsigned char mac_addr[32];
+    static char str_mac_addr[32];
+    static unsigned clock_seq;
+
+    PJ_CHECK_STACK();
+
+    if (guid_initialized == 0) {
+	pid = pj_getpid();
+	init_mac_address(mac_addr);
+	clock_seq = 0;
+
+	sprintf(str_pid, "%04x", pid);
+	sprintf(str_mac_addr, "%02x%02x%02x%02x%02x%02x",
+	    mac_addr[0], mac_addr[1], mac_addr[2],
+	    mac_addr[3], mac_addr[4], mac_addr[5]);
+
+	guid_initialized = 1;
+    }
+
+    strcpy(str->ptr, str_pid);
+    sprintf(str->ptr+4, "%04x", clock_seq++);
+    pj_memcpy(str->ptr+8, str_mac_addr, 12);
+    str->slen = 20;
+
+    return str;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/guid_win32.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/guid_win32.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/guid_win32.c	(revision 1163)
@@ -0,0 +1,68 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/guid.h>
+#include <pj/string.h>
+#include <pj/sock.h>
+#include <windows.h>
+#include <objbase.h>
+#include <pj/os.h>
+
+
+const unsigned PJ_GUID_STRING_LENGTH=32;
+
+PJ_INLINE(void) hex2digit(unsigned value, char *p)
+{
+    static char hex[] = {'0', '1', '2', '3', '4', '5', '6', '7',
+			 '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
+    *p++ = hex[ (value & 0xF0) >> 4 ];
+    *p++ = hex[ (value & 0x0F) ];
+}
+
+static void guid_to_str( const GUID *guid, pj_str_t *str )
+{
+    unsigned i;
+    GUID guid_copy;
+    const unsigned char *src = (const unsigned char*)&guid_copy;
+    char *dst = str->ptr;
+
+    pj_memcpy(&guid_copy, guid, sizeof(*guid));
+    guid_copy.Data1 = pj_ntohl(guid_copy.Data1);
+    guid_copy.Data2 = pj_ntohs(guid_copy.Data2);
+    guid_copy.Data3 = pj_ntohs(guid_copy.Data3);
+
+    for (i=0; i<16; ++i) {
+	hex2digit( *src, dst );
+	dst += 2;
+	++src;
+    }
+    str->slen = 32;
+}
+
+
+PJ_DEF(pj_str_t*) pj_generate_unique_string(pj_str_t *str)
+{
+    GUID guid;
+
+    PJ_CHECK_STACK();
+
+    CoCreateGuid(&guid);
+    guid_to_str( &guid, str );
+    return str;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/hash.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/hash.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/hash.c	(revision 1163)
@@ -0,0 +1,337 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/log.h>
+#include <pj/string.h>
+#include <pj/pool.h>
+#include <pj/os.h>
+#include <pj/ctype.h>
+#include <pj/assert.h>
+
+/**
+ * The hash multiplier used to calculate hash value.
+ */
+#define PJ_HASH_MULTIPLIER	33
+
+
+struct pj_hash_entry
+{
+    struct pj_hash_entry *next;
+    const void *key;
+    pj_uint32_t hash;
+    pj_uint32_t keylen;
+    void *value;
+};
+
+
+struct pj_hash_table_t
+{
+    pj_hash_entry     **table;
+    unsigned		count, rows;
+    pj_hash_iterator_t	iterator;
+};
+
+
+
+PJ_DEF(pj_uint32_t) pj_hash_calc(pj_uint32_t hash, const void *key, 
+				 unsigned keylen)
+{
+    PJ_CHECK_STACK();
+
+    if (keylen==PJ_HASH_KEY_STRING) {
+	const unsigned char *p = key;
+	for ( ; *p; ++p ) {
+	    hash = (hash * PJ_HASH_MULTIPLIER) + *p;
+	}
+    } else {
+	const unsigned char *p = key,
+			    *end = p + keylen;
+	for ( ; p!=end; ++p) {
+	    hash = (hash * PJ_HASH_MULTIPLIER) + *p;
+	}
+    }
+    return hash;
+}
+
+PJ_DEF(pj_uint32_t) pj_hash_calc_tolower( pj_uint32_t hval,
+                                          char *result,
+                                          const pj_str_t *key)
+{
+    long i;
+
+#if defined(PJ_HASH_USE_OWN_TOLOWER) && PJ_HASH_USE_OWN_TOLOWER != 0
+    for (i=0; i<key->slen; ++i) {
+	pj_uint8_t c = key->ptr[i];
+	if (c & 64)
+	    result[i] = (char)(c | 32);
+	else
+	    result[i] = (char)c;
+	hval = hval * PJ_HASH_MULTIPLIER + result[i];
+    }
+#else
+    for (i=0; i<key->slen; ++i) {
+	result[i] = (char)pj_tolower(key->ptr[i]);
+	hval = hval * PJ_HASH_MULTIPLIER + result[i];
+    }
+#endif
+
+    return hval;
+}
+
+
+PJ_DEF(pj_hash_table_t*) pj_hash_create(pj_pool_t *pool, unsigned size)
+{
+    pj_hash_table_t *h;
+    unsigned table_size;
+    
+    /* Check that PJ_HASH_ENTRY_SIZE is correct. */
+    PJ_ASSERT_RETURN(sizeof(pj_hash_entry)==PJ_HASH_ENTRY_SIZE, NULL);
+
+    h = pj_pool_alloc(pool, sizeof(pj_hash_table_t));
+    h->count = 0;
+
+    PJ_LOG( 6, ("hashtbl", "hash table %p created from pool %s", h, pj_pool_getobjname(pool)));
+
+    /* size must be 2^n - 1.
+       round-up the size to this rule, except when size is 2^n, then size
+       will be round-down to 2^n-1.
+     */
+    table_size = 8;
+    do {
+	table_size <<= 1;    
+    } while (table_size < size);
+    table_size -= 1;
+    
+    h->rows = table_size;
+    h->table = pj_pool_calloc(pool, table_size+1, sizeof(pj_hash_entry*));
+    return h;
+}
+
+static pj_hash_entry **find_entry( pj_pool_t *pool, pj_hash_table_t *ht, 
+				   const void *key, unsigned keylen,
+				   void *val, pj_uint32_t *hval,
+				   void *entry_buf)
+{
+    pj_uint32_t hash;
+    pj_hash_entry **p_entry, *entry;
+
+    if (hval && *hval != 0) {
+	hash = *hval;
+    } else {
+	/* This slightly differs with pj_hash_calc() because we need 
+	 * to get the keylen when keylen is PJ_HASH_KEY_STRING.
+	 */
+	hash=0;
+	if (keylen==PJ_HASH_KEY_STRING) {
+	    const unsigned char *p = key;
+	    for ( ; *p; ++p ) {
+		hash = hash * PJ_HASH_MULTIPLIER + *p;
+	    }
+	    keylen = p - (const unsigned char*)key;
+	} else {
+	    const unsigned char *p = key,
+				*end = p + keylen;
+	    for ( ; p!=end; ++p) {
+		hash = hash * PJ_HASH_MULTIPLIER + *p;
+	    }
+	}
+
+	/* Report back the computed hash. */
+	if (hval)
+	    *hval = hash;
+    }
+
+    /* scan the linked list */
+    for (p_entry = &ht->table[hash & ht->rows], entry=*p_entry; 
+	 entry; 
+	 p_entry = &entry->next, entry = *p_entry)
+    {
+	if (entry->hash==hash && entry->keylen==keylen &&
+	    pj_memcmp(entry->key, key, keylen)==0) 
+	{
+	    break;	
+	}
+    }
+
+    if (entry || val==NULL)
+	return p_entry;
+
+    /* Entry not found, create a new one. 
+     * If entry_buf is specified, use it. Otherwise allocate from pool.
+     */
+    if (entry_buf) {
+	entry = entry_buf;
+    } else {
+	/* Pool must be specified! */
+	PJ_ASSERT_RETURN(pool != NULL, NULL);
+
+	entry = pj_pool_alloc(pool, sizeof(pj_hash_entry));
+	PJ_LOG(6, ("hashtbl", 
+		   "%p: New p_entry %p created, pool used=%u, cap=%u", 
+		   ht, entry,  pj_pool_get_used_size(pool), 
+		   pj_pool_get_capacity(pool)));
+    }
+    entry->next = NULL;
+    entry->hash = hash;
+    entry->key = key;
+    entry->keylen = keylen;
+    entry->value = val;
+    *p_entry = entry;
+    
+    ++ht->count;
+    
+    return p_entry;
+}
+
+PJ_DEF(void *) pj_hash_get( pj_hash_table_t *ht,
+			    const void *key, unsigned keylen,
+			    pj_uint32_t *hval)
+{
+    pj_hash_entry *entry;
+    entry = *find_entry( NULL, ht, key, keylen, NULL, hval, NULL);
+    return entry ? entry->value : NULL;
+}
+
+PJ_DEF(void) pj_hash_set( pj_pool_t *pool, pj_hash_table_t *ht,
+			  const void *key, unsigned keylen, pj_uint32_t hval,
+			  void *value )
+{
+    pj_hash_entry **p_entry;
+
+    p_entry = find_entry( pool, ht, key, keylen, value, &hval, NULL);
+    if (*p_entry) {
+	if (value == NULL) {
+	    /* delete entry */
+	    PJ_LOG(6, ("hashtbl", "%p: p_entry %p deleted", ht, *p_entry));
+	    *p_entry = (*p_entry)->next;
+	    --ht->count;
+	    
+	} else {
+	    /* overwrite */
+	    (*p_entry)->value = value;
+	    PJ_LOG(6, ("hashtbl", "%p: p_entry %p value set to %p", ht, 
+		       *p_entry, value));
+	}
+    }
+}
+
+PJ_DEF(void) pj_hash_set_np( pj_hash_table_t *ht,
+			     const void *key, unsigned keylen, 
+			     pj_uint32_t hval, void *entry_buf, void *value)
+{
+    pj_hash_entry **p_entry;
+
+    p_entry = find_entry( NULL, ht, key, keylen, value, &hval, entry_buf );
+    if (*p_entry) {
+	if (value == NULL) {
+	    /* delete entry */
+	    PJ_LOG(6, ("hashtbl", "%p: p_entry %p deleted", ht, *p_entry));
+	    *p_entry = (*p_entry)->next;
+	    --ht->count;
+	    
+	} else {
+	    /* overwrite */
+	    (*p_entry)->value = value;
+	    PJ_LOG(6, ("hashtbl", "%p: p_entry %p value set to %p", ht, 
+		       *p_entry, value));
+	}
+    }
+}
+
+PJ_DEF(unsigned) pj_hash_count( pj_hash_table_t *ht )
+{
+    return ht->count;
+}
+
+PJ_DEF(pj_hash_iterator_t*) pj_hash_first( pj_hash_table_t *ht,
+					   pj_hash_iterator_t *it )
+{
+    it->index = 0;
+    it->entry = NULL;
+
+    for (; it->index < ht->rows; ++it->index) {
+	it->entry = ht->table[it->index];
+	if (it->entry) {
+	    break;
+	}
+    }
+
+    return it->entry ? it : NULL;
+}
+
+PJ_DEF(pj_hash_iterator_t*) pj_hash_next( pj_hash_table_t *ht, 
+					  pj_hash_iterator_t *it )
+{
+    it->entry = it->entry->next;
+    if (it->entry) {
+	return it;
+    }
+
+    for (++it->index; it->index < ht->rows; ++it->index) {
+	it->entry = ht->table[it->index];
+	if (it->entry) {
+	    break;
+	}
+    }
+
+    return it->entry ? it : NULL;
+}
+
+PJ_DEF(void*) pj_hash_this( pj_hash_table_t *ht, pj_hash_iterator_t *it )
+{
+    PJ_CHECK_STACK();
+    PJ_UNUSED_ARG(ht);
+    return it->entry->value;
+}
+
+#if 0
+void pj_hash_dump_collision( pj_hash_table_t *ht )
+{
+    unsigned min=0xFFFFFFFF, max=0;
+    unsigned i;
+    char line[120];
+    int len, totlen = 0;
+
+    for (i=0; i<ht->rows; ++i) {
+	unsigned count = 0;    
+	pj_hash_entry *entry = ht->table[i];
+	while (entry) {
+	    ++count;
+	    entry = entry->next;
+	}
+	if (count < min)
+	    min = count;
+	if (count > max)
+	    max = count;
+	len = pj_snprintf( line+totlen, sizeof(line)-totlen, "%3d:%3d ", i, count);
+	if (len < 1)
+	    break;
+	totlen += len;
+
+	if ((i+1) % 10 == 0) {
+	    line[totlen] = '\0';
+	    PJ_LOG(4,(__FILE__, line));
+	}
+    }
+
+    PJ_LOG(4,(__FILE__,"Count: %d, min: %d, max: %d\n", ht->count, min, max));
+}
+#endif
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_common_abs.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_common_abs.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_common_abs.c	(revision 1163)
@@ -0,0 +1,1098 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 
+ */
+
+/*
+ * ioqueue_common_abs.c
+ *
+ * This contains common functionalities to emulate proactor pattern with
+ * various event dispatching mechanisms (e.g. select, epoll).
+ *
+ * This file will be included by the appropriate ioqueue implementation.
+ * This file is NOT supposed to be compiled as stand-alone source.
+ */
+
+#define PENDING_RETRY	2
+
+static void ioqueue_init( pj_ioqueue_t *ioqueue )
+{
+    ioqueue->lock = NULL;
+    ioqueue->auto_delete_lock = 0;
+}
+
+static pj_status_t ioqueue_destroy(pj_ioqueue_t *ioqueue)
+{
+    if (ioqueue->auto_delete_lock && ioqueue->lock ) {
+	pj_lock_release(ioqueue->lock);
+        return pj_lock_destroy(ioqueue->lock);
+    } else
+        return PJ_SUCCESS;
+}
+
+/*
+ * pj_ioqueue_set_lock()
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_set_lock( pj_ioqueue_t *ioqueue, 
+					 pj_lock_t *lock,
+					 pj_bool_t auto_delete )
+{
+    PJ_ASSERT_RETURN(ioqueue && lock, PJ_EINVAL);
+
+    if (ioqueue->auto_delete_lock && ioqueue->lock) {
+        pj_lock_destroy(ioqueue->lock);
+    }
+
+    ioqueue->lock = lock;
+    ioqueue->auto_delete_lock = auto_delete;
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t ioqueue_init_key( pj_pool_t *pool,
+                                     pj_ioqueue_t *ioqueue,
+                                     pj_ioqueue_key_t *key,
+                                     pj_sock_t sock,
+                                     void *user_data,
+                                     const pj_ioqueue_callback *cb)
+{
+    pj_status_t rc;
+    int optlen;
+
+    PJ_UNUSED_ARG(pool);
+
+    key->ioqueue = ioqueue;
+    key->fd = sock;
+    key->user_data = user_data;
+    pj_list_init(&key->read_list);
+    pj_list_init(&key->write_list);
+#if PJ_HAS_TCP
+    pj_list_init(&key->accept_list);
+    key->connecting = 0;
+#endif
+
+    /* Save callback. */
+    pj_memcpy(&key->cb, cb, sizeof(pj_ioqueue_callback));
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /* Set initial reference count to 1 */
+    pj_assert(key->ref_count == 0);
+    ++key->ref_count;
+
+    key->closing = 0;
+#endif
+
+    /* Get socket type. When socket type is datagram, some optimization
+     * will be performed during send to allow parallel send operations.
+     */
+    optlen = sizeof(key->fd_type);
+    rc = pj_sock_getsockopt(sock, PJ_SOL_SOCKET, PJ_SO_TYPE,
+                            &key->fd_type, &optlen);
+    if (rc != PJ_SUCCESS)
+        key->fd_type = PJ_SOCK_STREAM;
+
+    /* Create mutex for the key. */
+#if !PJ_IOQUEUE_HAS_SAFE_UNREG
+    rc = pj_mutex_create_simple(pool, NULL, &key->mutex);
+#endif
+    
+    return rc;
+}
+
+/*
+ * pj_ioqueue_get_user_data()
+ *
+ * Obtain value associated with a key.
+ */
+PJ_DEF(void*) pj_ioqueue_get_user_data( pj_ioqueue_key_t *key )
+{
+    PJ_ASSERT_RETURN(key != NULL, NULL);
+    return key->user_data;
+}
+
+/*
+ * pj_ioqueue_set_user_data()
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_set_user_data( pj_ioqueue_key_t *key,
+                                              void *user_data,
+                                              void **old_data)
+{
+    PJ_ASSERT_RETURN(key, PJ_EINVAL);
+
+    if (old_data)
+        *old_data = key->user_data;
+    key->user_data = user_data;
+
+    return PJ_SUCCESS;
+}
+
+PJ_INLINE(int) key_has_pending_write(pj_ioqueue_key_t *key)
+{
+    return !pj_list_empty(&key->write_list);
+}
+
+PJ_INLINE(int) key_has_pending_read(pj_ioqueue_key_t *key)
+{
+    return !pj_list_empty(&key->read_list);
+}
+
+PJ_INLINE(int) key_has_pending_accept(pj_ioqueue_key_t *key)
+{
+#if PJ_HAS_TCP
+    return !pj_list_empty(&key->accept_list);
+#else
+    PJ_UNUSED_ARG(key);
+    return 0;
+#endif
+}
+
+PJ_INLINE(int) key_has_pending_connect(pj_ioqueue_key_t *key)
+{
+    return key->connecting;
+}
+
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+#   define IS_CLOSING(key)  (key->closing)
+#else
+#   define IS_CLOSING(key)  (0)
+#endif
+
+
+/*
+ * ioqueue_dispatch_event()
+ *
+ * Report occurence of an event in the key to be processed by the
+ * framework.
+ */
+void ioqueue_dispatch_write_event(pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h)
+{
+    /* Lock the key. */
+    pj_mutex_lock(h->mutex);
+
+    if (IS_CLOSING(h)) {
+	pj_mutex_unlock(h->mutex);
+	return;
+    }
+
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP!=0
+    if (h->connecting) {
+	/* Completion of connect() operation */
+	pj_ssize_t bytes_transfered;
+
+	/* Clear operation. */
+	h->connecting = 0;
+
+        ioqueue_remove_from_set(ioqueue, h, WRITEABLE_EVENT);
+        ioqueue_remove_from_set(ioqueue, h, EXCEPTION_EVENT);
+
+
+#if (defined(PJ_HAS_SO_ERROR) && PJ_HAS_SO_ERROR!=0)
+	/* from connect(2): 
+	 * On Linux, use getsockopt to read the SO_ERROR option at
+	 * level SOL_SOCKET to determine whether connect() completed
+	 * successfully (if SO_ERROR is zero).
+	 */
+	{
+	  int value;
+	  int vallen = sizeof(value);
+	  int gs_rc = pj_sock_getsockopt(h->fd, SOL_SOCKET, SO_ERROR, 
+					 &value, &vallen);
+	  if (gs_rc != 0) {
+	    /* Argh!! What to do now??? 
+	     * Just indicate that the socket is connected. The
+	     * application will get error as soon as it tries to use
+	     * the socket to send/receive.
+	     */
+	    bytes_transfered = 0;
+	  } else {
+            bytes_transfered = value;
+	  }
+ 	}
+#elif defined(PJ_WIN32) && PJ_WIN32!=0
+	bytes_transfered = 0; /* success */
+#else
+	/* Excellent information in D.J. Bernstein page:
+	 * http://cr.yp.to/docs/connect.html
+	 *
+	 * Seems like the most portable way of detecting connect()
+	 * failure is to call getpeername(). If socket is connected,
+	 * getpeername() will return 0. If the socket is not connected,
+	 * it will return ENOTCONN, and read(fd, &ch, 1) will produce
+	 * the right errno through error slippage. This is a combination
+	 * of suggestions from Douglas C. Schmidt and Ken Keys.
+	 */
+	{
+	    int gp_rc;
+	    struct sockaddr_in addr;
+	    socklen_t addrlen = sizeof(addr);
+
+	    gp_rc = getpeername(h->fd, (struct sockaddr*)&addr, &addrlen);
+	    bytes_transfered = (gp_rc < 0) ? gp_rc : -gp_rc;
+	}
+#endif
+
+        /* Unlock; from this point we don't need to hold key's mutex. */
+        pj_mutex_unlock(h->mutex);
+
+	/* Call callback. */
+        if (h->cb.on_connect_complete && !IS_CLOSING(h))
+	    (*h->cb.on_connect_complete)(h, bytes_transfered);
+
+        /* Done. */
+
+    } else 
+#endif /* PJ_HAS_TCP */
+    if (key_has_pending_write(h)) {
+	/* Socket is writable. */
+        struct write_operation *write_op;
+        pj_ssize_t sent;
+        pj_status_t send_rc;
+
+        /* Get the first in the queue. */
+        write_op = h->write_list.next;
+
+        /* For datagrams, we can remove the write_op from the list
+         * so that send() can work in parallel.
+         */
+        if (h->fd_type == PJ_SOCK_DGRAM) {
+            pj_list_erase(write_op);
+
+            if (pj_list_empty(&h->write_list))
+                ioqueue_remove_from_set(ioqueue, h, WRITEABLE_EVENT);
+
+        }
+
+        /* Send the data. 
+         * Unfortunately we must do this while holding key's mutex, thus
+         * preventing parallel write on a single key.. :-((
+         */
+        sent = write_op->size - write_op->written;
+        if (write_op->op == PJ_IOQUEUE_OP_SEND) {
+            send_rc = pj_sock_send(h->fd, write_op->buf+write_op->written,
+                                   &sent, write_op->flags);
+	    /* Can't do this. We only clear "op" after we're finished sending
+	     * the whole buffer.
+	     */
+	    //write_op->op = 0;
+        } else if (write_op->op == PJ_IOQUEUE_OP_SEND_TO) {
+            send_rc = pj_sock_sendto(h->fd, 
+                                     write_op->buf+write_op->written,
+                                     &sent, write_op->flags,
+                                     &write_op->rmt_addr, 
+                                     write_op->rmt_addrlen);
+	    /* Can't do this. We only clear "op" after we're finished sending
+	     * the whole buffer.
+	     */
+	    //write_op->op = 0;
+        } else {
+            pj_assert(!"Invalid operation type!");
+	    write_op->op = 0;
+            send_rc = PJ_EBUG;
+        }
+
+        if (send_rc == PJ_SUCCESS) {
+            write_op->written += sent;
+        } else {
+            pj_assert(send_rc > 0);
+            write_op->written = -send_rc;
+        }
+
+        /* Are we finished with this buffer? */
+        if (send_rc!=PJ_SUCCESS || 
+            write_op->written == (pj_ssize_t)write_op->size ||
+            h->fd_type == PJ_SOCK_DGRAM) 
+        {
+
+	    write_op->op = 0;
+
+            if (h->fd_type != PJ_SOCK_DGRAM) {
+                /* Write completion of the whole stream. */
+                pj_list_erase(write_op);
+
+                /* Clear operation if there's no more data to send. */
+                if (pj_list_empty(&h->write_list))
+                    ioqueue_remove_from_set(ioqueue, h, WRITEABLE_EVENT);
+
+            }
+
+            /* No need to hold mutex anymore */
+            pj_mutex_unlock(h->mutex);
+
+	    /* Call callback. */
+            if (h->cb.on_write_complete && !IS_CLOSING(h)) {
+	        (*h->cb.on_write_complete)(h, 
+                                           (pj_ioqueue_op_key_t*)write_op,
+                                           write_op->written);
+            }
+
+        } else {
+            pj_mutex_unlock(h->mutex);
+        }
+
+        /* Done. */
+    } else {
+        /*
+         * This is normal; execution may fall here when multiple threads
+         * are signalled for the same event, but only one thread eventually
+         * able to process the event.
+         */
+        pj_mutex_unlock(h->mutex);
+    }
+}
+
+void ioqueue_dispatch_read_event( pj_ioqueue_t *ioqueue, pj_ioqueue_key_t *h )
+{
+    pj_status_t rc;
+
+    /* Lock the key. */
+    pj_mutex_lock(h->mutex);
+
+    if (IS_CLOSING(h)) {
+	pj_mutex_unlock(h->mutex);
+	return;
+    }
+
+#   if PJ_HAS_TCP
+    if (!pj_list_empty(&h->accept_list)) {
+
+        struct accept_operation *accept_op;
+	
+        /* Get one accept operation from the list. */
+	accept_op = h->accept_list.next;
+        pj_list_erase(accept_op);
+        accept_op->op = 0;
+
+	/* Clear bit in fdset if there is no more pending accept */
+        if (pj_list_empty(&h->accept_list))
+            ioqueue_remove_from_set(ioqueue, h, READABLE_EVENT);
+
+	rc=pj_sock_accept(h->fd, accept_op->accept_fd, 
+                          accept_op->rmt_addr, accept_op->addrlen);
+	if (rc==PJ_SUCCESS && accept_op->local_addr) {
+	    rc = pj_sock_getsockname(*accept_op->accept_fd, 
+                                     accept_op->local_addr,
+				     accept_op->addrlen);
+	}
+
+        /* Unlock; from this point we don't need to hold key's mutex. */
+        pj_mutex_unlock(h->mutex);
+
+	/* Call callback. */
+        if (h->cb.on_accept_complete && !IS_CLOSING(h)) {
+	    (*h->cb.on_accept_complete)(h, 
+                                        (pj_ioqueue_op_key_t*)accept_op,
+                                        *accept_op->accept_fd, rc);
+	}
+
+    }
+    else
+#   endif
+    if (key_has_pending_read(h)) {
+        struct read_operation *read_op;
+        pj_ssize_t bytes_read;
+
+        /* Get one pending read operation from the list. */
+        read_op = h->read_list.next;
+        pj_list_erase(read_op);
+
+        /* Clear fdset if there is no pending read. */
+        if (pj_list_empty(&h->read_list))
+            ioqueue_remove_from_set(ioqueue, h, READABLE_EVENT);
+
+        bytes_read = read_op->size;
+
+	if ((read_op->op == PJ_IOQUEUE_OP_RECV_FROM)) {
+	    read_op->op = 0;
+	    rc = pj_sock_recvfrom(h->fd, read_op->buf, &bytes_read, 
+				  read_op->flags,
+				  read_op->rmt_addr, 
+                                  read_op->rmt_addrlen);
+	} else if ((read_op->op == PJ_IOQUEUE_OP_RECV)) {
+	    read_op->op = 0;
+	    rc = pj_sock_recv(h->fd, read_op->buf, &bytes_read, 
+			      read_op->flags);
+        } else {
+            pj_assert(read_op->op == PJ_IOQUEUE_OP_READ);
+	    read_op->op = 0;
+            /*
+             * User has specified pj_ioqueue_read().
+             * On Win32, we should do ReadFile(). But because we got
+             * here because of select() anyway, user must have put a
+             * socket descriptor on h->fd, which in this case we can
+             * just call pj_sock_recv() instead of ReadFile().
+             * On Unix, user may put a file in h->fd, so we'll have
+             * to call read() here.
+             * This may not compile on systems which doesn't have 
+             * read(). That's why we only specify PJ_LINUX here so
+             * that error is easier to catch.
+             */
+#	    if defined(PJ_WIN32) && PJ_WIN32 != 0 || \
+	       defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE != 0
+                rc = pj_sock_recv(h->fd, read_op->buf, &bytes_read, 
+				  read_op->flags);
+                //rc = ReadFile((HANDLE)h->fd, read_op->buf, read_op->size,
+                //              &bytes_read, NULL);
+#           elif (defined(PJ_HAS_UNISTD_H) && PJ_HAS_UNISTD_H != 0)
+                bytes_read = read(h->fd, read_op->buf, bytes_read);
+                rc = (bytes_read >= 0) ? PJ_SUCCESS : pj_get_os_error();
+#	    elif defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL != 0
+                bytes_read = sys_read(h->fd, read_op->buf, bytes_read);
+                rc = (bytes_read >= 0) ? PJ_SUCCESS : -bytes_read;
+#           else
+#               error "Implement read() for this platform!"
+#           endif
+        }
+	
+	if (rc != PJ_SUCCESS) {
+#	    if defined(PJ_WIN32) && PJ_WIN32 != 0
+	    /* On Win32, for UDP, WSAECONNRESET on the receive side 
+	     * indicates that previous sending has triggered ICMP Port 
+	     * Unreachable message.
+	     * But we wouldn't know at this point which one of previous 
+	     * key that has triggered the error, since UDP socket can
+	     * be shared!
+	     * So we'll just ignore it!
+	     */
+
+	    if (rc == PJ_STATUS_FROM_OS(WSAECONNRESET)) {
+		//PJ_LOG(4,(THIS_FILE, 
+                //          "Ignored ICMP port unreach. on key=%p", h));
+	    }
+#	    endif
+
+            /* In any case we would report this to caller. */
+            bytes_read = -rc;
+	}
+
+        /* Unlock; from this point we don't need to hold key's mutex. */
+        pj_mutex_unlock(h->mutex);
+
+	/* Call callback. */
+        if (h->cb.on_read_complete && !IS_CLOSING(h)) {
+	    (*h->cb.on_read_complete)(h, 
+                                      (pj_ioqueue_op_key_t*)read_op,
+                                      bytes_read);
+        }
+
+    } else {
+        /*
+         * This is normal; execution may fall here when multiple threads
+         * are signalled for the same event, but only one thread eventually
+         * able to process the event.
+         */
+        pj_mutex_unlock(h->mutex);
+    }
+}
+
+
+void ioqueue_dispatch_exception_event( pj_ioqueue_t *ioqueue, 
+                                       pj_ioqueue_key_t *h )
+{
+    pj_mutex_lock(h->mutex);
+
+    if (!h->connecting) {
+        /* It is possible that more than one thread was woken up, thus
+         * the remaining thread will see h->connecting as zero because
+         * it has been processed by other thread.
+         */
+        pj_mutex_unlock(h->mutex);
+        return;
+    }
+
+    if (IS_CLOSING(h)) {
+	pj_mutex_unlock(h->mutex);
+	return;
+    }
+
+    /* Clear operation. */
+    h->connecting = 0;
+
+    ioqueue_remove_from_set(ioqueue, h, WRITEABLE_EVENT);
+    ioqueue_remove_from_set(ioqueue, h, EXCEPTION_EVENT);
+
+    pj_mutex_unlock(h->mutex);
+
+    /* Call callback. */
+    if (h->cb.on_connect_complete && !IS_CLOSING(h)) {
+	pj_status_t status = -1;
+#if (defined(PJ_HAS_SO_ERROR) && PJ_HAS_SO_ERROR!=0)
+	int value;
+	int vallen = sizeof(value);
+	int gs_rc = pj_sock_getsockopt(h->fd, SOL_SOCKET, SO_ERROR, 
+				       &value, &vallen);
+	if (gs_rc == 0) {
+	    status = PJ_RETURN_OS_ERROR(value);
+	}
+#endif
+
+	(*h->cb.on_connect_complete)(h, status);
+    }
+}
+
+/*
+ * pj_ioqueue_recv()
+ *
+ * Start asynchronous recv() from the socket.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_recv(  pj_ioqueue_key_t *key,
+                                      pj_ioqueue_op_key_t *op_key,
+				      void *buffer,
+				      pj_ssize_t *length,
+				      unsigned flags )
+{
+    struct read_operation *read_op;
+
+    PJ_ASSERT_RETURN(key && op_key && buffer && length, PJ_EINVAL);
+    PJ_CHECK_STACK();
+
+    read_op = (struct read_operation*)op_key;
+    read_op->op = 0;
+
+    /* Check if key is closing. */
+    if (IS_CLOSING(key))
+	return PJ_ECANCELLED;
+
+    /* Try to see if there's data immediately available. 
+     */
+    if ((flags & PJ_IOQUEUE_ALWAYS_ASYNC) == 0) {
+	pj_status_t status;
+	pj_ssize_t size;
+
+	size = *length;
+	status = pj_sock_recv(key->fd, buffer, &size, flags);
+	if (status == PJ_SUCCESS) {
+	    /* Yes! Data is available! */
+	    *length = size;
+	    return PJ_SUCCESS;
+	} else {
+	    /* If error is not EWOULDBLOCK (or EAGAIN on Linux), report
+	     * the error to caller.
+	     */
+	    if (status != PJ_STATUS_FROM_OS(PJ_BLOCKING_ERROR_VAL))
+		return status;
+	}
+    }
+
+    flags &= ~(PJ_IOQUEUE_ALWAYS_ASYNC);
+
+    /*
+     * No data is immediately available.
+     * Must schedule asynchronous operation to the ioqueue.
+     */
+    read_op->op = PJ_IOQUEUE_OP_RECV;
+    read_op->buf = buffer;
+    read_op->size = *length;
+    read_op->flags = flags;
+
+    pj_mutex_lock(key->mutex);
+    pj_list_insert_before(&key->read_list, read_op);
+    ioqueue_add_to_set(key->ioqueue, key, READABLE_EVENT);
+    pj_mutex_unlock(key->mutex);
+
+    return PJ_EPENDING;
+}
+
+/*
+ * pj_ioqueue_recvfrom()
+ *
+ * Start asynchronous recvfrom() from the socket.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_recvfrom( pj_ioqueue_key_t *key,
+                                         pj_ioqueue_op_key_t *op_key,
+				         void *buffer,
+				         pj_ssize_t *length,
+                                         unsigned flags,
+				         pj_sockaddr_t *addr,
+				         int *addrlen)
+{
+    struct read_operation *read_op;
+
+    PJ_ASSERT_RETURN(key && op_key && buffer && length, PJ_EINVAL);
+    PJ_CHECK_STACK();
+
+    /* Check if key is closing. */
+    if (IS_CLOSING(key))
+	return PJ_ECANCELLED;
+
+    read_op = (struct read_operation*)op_key;
+    read_op->op = 0;
+
+    /* Try to see if there's data immediately available. 
+     */
+    if ((flags & PJ_IOQUEUE_ALWAYS_ASYNC) == 0) {
+	pj_status_t status;
+	pj_ssize_t size;
+
+	size = *length;
+	status = pj_sock_recvfrom(key->fd, buffer, &size, flags,
+				  addr, addrlen);
+	if (status == PJ_SUCCESS) {
+	    /* Yes! Data is available! */
+	    *length = size;
+	    return PJ_SUCCESS;
+	} else {
+	    /* If error is not EWOULDBLOCK (or EAGAIN on Linux), report
+	     * the error to caller.
+	     */
+	    if (status != PJ_STATUS_FROM_OS(PJ_BLOCKING_ERROR_VAL))
+		return status;
+	}
+    }
+
+    flags &= ~(PJ_IOQUEUE_ALWAYS_ASYNC);
+
+    /*
+     * No data is immediately available.
+     * Must schedule asynchronous operation to the ioqueue.
+     */
+    read_op->op = PJ_IOQUEUE_OP_RECV_FROM;
+    read_op->buf = buffer;
+    read_op->size = *length;
+    read_op->flags = flags;
+    read_op->rmt_addr = addr;
+    read_op->rmt_addrlen = addrlen;
+
+    pj_mutex_lock(key->mutex);
+    pj_list_insert_before(&key->read_list, read_op);
+    ioqueue_add_to_set(key->ioqueue, key, READABLE_EVENT);
+    pj_mutex_unlock(key->mutex);
+
+    return PJ_EPENDING;
+}
+
+/*
+ * pj_ioqueue_send()
+ *
+ * Start asynchronous send() to the descriptor.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_send( pj_ioqueue_key_t *key,
+                                     pj_ioqueue_op_key_t *op_key,
+			             const void *data,
+			             pj_ssize_t *length,
+                                     unsigned flags)
+{
+    struct write_operation *write_op;
+    pj_status_t status;
+    unsigned retry;
+    pj_ssize_t sent;
+
+    PJ_ASSERT_RETURN(key && op_key && data && length, PJ_EINVAL);
+    PJ_CHECK_STACK();
+
+    /* Check if key is closing. */
+    if (IS_CLOSING(key))
+	return PJ_ECANCELLED;
+
+    /* We can not use PJ_IOQUEUE_ALWAYS_ASYNC for socket write. */
+    flags &= ~(PJ_IOQUEUE_ALWAYS_ASYNC);
+
+    /* Fast track:
+     *   Try to send data immediately, only if there's no pending write!
+     * Note:
+     *  We are speculating that the list is empty here without properly
+     *  acquiring ioqueue's mutex first. This is intentional, to maximize
+     *  performance via parallelism.
+     *
+     *  This should be safe, because:
+     *      - by convention, we require caller to make sure that the
+     *        key is not unregistered while other threads are invoking
+     *        an operation on the same key.
+     *      - pj_list_empty() is safe to be invoked by multiple threads,
+     *        even when other threads are modifying the list.
+     */
+    if (pj_list_empty(&key->write_list)) {
+        /*
+         * See if data can be sent immediately.
+         */
+        sent = *length;
+        status = pj_sock_send(key->fd, data, &sent, flags);
+        if (status == PJ_SUCCESS) {
+            /* Success! */
+            *length = sent;
+            return PJ_SUCCESS;
+        } else {
+            /* If error is not EWOULDBLOCK (or EAGAIN on Linux), report
+             * the error to caller.
+             */
+            if (status != PJ_STATUS_FROM_OS(PJ_BLOCKING_ERROR_VAL)) {
+                return status;
+            }
+        }
+    }
+
+    /*
+     * Schedule asynchronous send.
+     */
+    write_op = (struct write_operation*)op_key;
+
+    /* Spin if write_op has pending operation */
+    for (retry=0; write_op->op != 0 && retry<PENDING_RETRY; ++retry)
+	pj_thread_sleep(0);
+
+    /* Last chance */
+    if (write_op->op) {
+	/* Unable to send packet because there is already pending write in the
+	 * write_op. We could not put the operation into the write_op
+	 * because write_op already contains a pending operation! And
+	 * we could not send the packet directly with send() either,
+	 * because that will break the order of the packet. So we can
+	 * only return error here.
+	 *
+	 * This could happen for example in multithreads program,
+	 * where polling is done by one thread, while other threads are doing
+	 * the sending only. If the polling thread runs on lower priority
+	 * than the sending thread, then it's possible that the pending
+	 * write flag is not cleared in-time because clearing is only done
+	 * during polling. 
+	 *
+	 * Aplication should specify multiple write operation keys on
+	 * situation like this.
+	 */
+	//pj_assert(!"ioqueue: there is pending operation on this key!");
+	return PJ_EBUSY;
+    }
+
+    write_op->op = PJ_IOQUEUE_OP_SEND;
+    write_op->buf = (void*)data;
+    write_op->size = *length;
+    write_op->written = 0;
+    write_op->flags = flags;
+    
+    pj_mutex_lock(key->mutex);
+    pj_list_insert_before(&key->write_list, write_op);
+    ioqueue_add_to_set(key->ioqueue, key, WRITEABLE_EVENT);
+    pj_mutex_unlock(key->mutex);
+
+    return PJ_EPENDING;
+}
+
+
+/*
+ * pj_ioqueue_sendto()
+ *
+ * Start asynchronous write() to the descriptor.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_sendto( pj_ioqueue_key_t *key,
+                                       pj_ioqueue_op_key_t *op_key,
+			               const void *data,
+			               pj_ssize_t *length,
+                                       pj_uint32_t flags,
+			               const pj_sockaddr_t *addr,
+			               int addrlen)
+{
+    struct write_operation *write_op;
+    unsigned retry;
+    pj_status_t status;
+    pj_ssize_t sent;
+
+    PJ_ASSERT_RETURN(key && op_key && data && length, PJ_EINVAL);
+    PJ_CHECK_STACK();
+
+    /* Check if key is closing. */
+    if (IS_CLOSING(key))
+	return PJ_ECANCELLED;
+
+    /* We can not use PJ_IOQUEUE_ALWAYS_ASYNC for socket write */
+    flags &= ~(PJ_IOQUEUE_ALWAYS_ASYNC);
+
+    /* Fast track:
+     *   Try to send data immediately, only if there's no pending write!
+     * Note:
+     *  We are speculating that the list is empty here without properly
+     *  acquiring ioqueue's mutex first. This is intentional, to maximize
+     *  performance via parallelism.
+     *
+     *  This should be safe, because:
+     *      - by convention, we require caller to make sure that the
+     *        key is not unregistered while other threads are invoking
+     *        an operation on the same key.
+     *      - pj_list_empty() is safe to be invoked by multiple threads,
+     *        even when other threads are modifying the list.
+     */
+    if (pj_list_empty(&key->write_list)) {
+        /*
+         * See if data can be sent immediately.
+         */
+        sent = *length;
+        status = pj_sock_sendto(key->fd, data, &sent, flags, addr, addrlen);
+        if (status == PJ_SUCCESS) {
+            /* Success! */
+            *length = sent;
+            return PJ_SUCCESS;
+        } else {
+            /* If error is not EWOULDBLOCK (or EAGAIN on Linux), report
+             * the error to caller.
+             */
+            if (status != PJ_STATUS_FROM_OS(PJ_BLOCKING_ERROR_VAL)) {
+                return status;
+            }
+	    status = status;
+        }
+    }
+
+    /*
+     * Check that address storage can hold the address parameter.
+     */
+    PJ_ASSERT_RETURN(addrlen <= sizeof(pj_sockaddr_in), PJ_EBUG);
+
+    /*
+     * Schedule asynchronous send.
+     */
+    write_op = (struct write_operation*)op_key;
+    
+    /* Spin if write_op has pending operation */
+    for (retry=0; write_op->op != 0 && retry<PENDING_RETRY; ++retry)
+	pj_thread_sleep(0);
+
+    /* Last chance */
+    if (write_op->op) {
+	/* Unable to send packet because there is already pending write on the
+	 * write_op. We could not put the operation into the write_op
+	 * because write_op already contains a pending operation! And
+	 * we could not send the packet directly with sendto() either,
+	 * because that will break the order of the packet. So we can
+	 * only return error here.
+	 *
+	 * This could happen for example in multithreads program,
+	 * where polling is done by one thread, while other threads are doing
+	 * the sending only. If the polling thread runs on lower priority
+	 * than the sending thread, then it's possible that the pending
+	 * write flag is not cleared in-time because clearing is only done
+	 * during polling. 
+	 *
+	 * Aplication should specify multiple write operation keys on
+	 * situation like this.
+	 */
+	//pj_assert(!"ioqueue: there is pending operation on this key!");
+	return PJ_EBUSY;
+    }
+
+    write_op->op = PJ_IOQUEUE_OP_SEND_TO;
+    write_op->buf = (void*)data;
+    write_op->size = *length;
+    write_op->written = 0;
+    write_op->flags = flags;
+    pj_memcpy(&write_op->rmt_addr, addr, addrlen);
+    write_op->rmt_addrlen = addrlen;
+    
+    pj_mutex_lock(key->mutex);
+    pj_list_insert_before(&key->write_list, write_op);
+    ioqueue_add_to_set(key->ioqueue, key, WRITEABLE_EVENT);
+    pj_mutex_unlock(key->mutex);
+
+    return PJ_EPENDING;
+}
+
+#if PJ_HAS_TCP
+/*
+ * Initiate overlapped accept() operation.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_accept( pj_ioqueue_key_t *key,
+                                       pj_ioqueue_op_key_t *op_key,
+			               pj_sock_t *new_sock,
+			               pj_sockaddr_t *local,
+			               pj_sockaddr_t *remote,
+			               int *addrlen)
+{
+    struct accept_operation *accept_op;
+    pj_status_t status;
+
+    /* check parameters. All must be specified! */
+    PJ_ASSERT_RETURN(key && op_key && new_sock, PJ_EINVAL);
+
+    /* Check if key is closing. */
+    if (IS_CLOSING(key))
+	return PJ_ECANCELLED;
+
+    accept_op = (struct accept_operation*)op_key;
+    accept_op->op = 0;
+
+    /* Fast track:
+     *  See if there's new connection available immediately.
+     */
+    if (pj_list_empty(&key->accept_list)) {
+        status = pj_sock_accept(key->fd, new_sock, remote, addrlen);
+        if (status == PJ_SUCCESS) {
+            /* Yes! New connection is available! */
+            if (local && addrlen) {
+                status = pj_sock_getsockname(*new_sock, local, addrlen);
+                if (status != PJ_SUCCESS) {
+                    pj_sock_close(*new_sock);
+                    *new_sock = PJ_INVALID_SOCKET;
+                    return status;
+                }
+            }
+            return PJ_SUCCESS;
+        } else {
+            /* If error is not EWOULDBLOCK (or EAGAIN on Linux), report
+             * the error to caller.
+             */
+            if (status != PJ_STATUS_FROM_OS(PJ_BLOCKING_ERROR_VAL)) {
+                return status;
+            }
+        }
+    }
+
+    /*
+     * No connection is available immediately.
+     * Schedule accept() operation to be completed when there is incoming
+     * connection available.
+     */
+    accept_op->op = PJ_IOQUEUE_OP_ACCEPT;
+    accept_op->accept_fd = new_sock;
+    accept_op->rmt_addr = remote;
+    accept_op->addrlen= addrlen;
+    accept_op->local_addr = local;
+
+    pj_mutex_lock(key->mutex);
+    pj_list_insert_before(&key->accept_list, accept_op);
+    ioqueue_add_to_set(key->ioqueue, key, READABLE_EVENT);
+    pj_mutex_unlock(key->mutex);
+
+    return PJ_EPENDING;
+}
+
+/*
+ * Initiate overlapped connect() operation (well, it's non-blocking actually,
+ * since there's no overlapped version of connect()).
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_connect( pj_ioqueue_key_t *key,
+					const pj_sockaddr_t *addr,
+					int addrlen )
+{
+    pj_status_t status;
+    
+    /* check parameters. All must be specified! */
+    PJ_ASSERT_RETURN(key && addr && addrlen, PJ_EINVAL);
+
+    /* Check if key is closing. */
+    if (IS_CLOSING(key))
+	return PJ_ECANCELLED;
+
+    /* Check if socket has not been marked for connecting */
+    if (key->connecting != 0)
+        return PJ_EPENDING;
+    
+    status = pj_sock_connect(key->fd, addr, addrlen);
+    if (status == PJ_SUCCESS) {
+	/* Connected! */
+	return PJ_SUCCESS;
+    } else {
+	if (status == PJ_STATUS_FROM_OS(PJ_BLOCKING_CONNECT_ERROR_VAL)) {
+	    /* Pending! */
+            pj_mutex_lock(key->mutex);
+	    key->connecting = PJ_TRUE;
+            ioqueue_add_to_set(key->ioqueue, key, WRITEABLE_EVENT);
+            ioqueue_add_to_set(key->ioqueue, key, EXCEPTION_EVENT);
+            pj_mutex_unlock(key->mutex);
+	    return PJ_EPENDING;
+	} else {
+	    /* Error! */
+	    return status;
+	}
+    }
+}
+#endif	/* PJ_HAS_TCP */
+
+
+PJ_DEF(void) pj_ioqueue_op_key_init( pj_ioqueue_op_key_t *op_key,
+				     pj_size_t size )
+{
+    pj_bzero(op_key, size);
+}
+
+
+/*
+ * pj_ioqueue_is_pending()
+ */
+PJ_DEF(pj_bool_t) pj_ioqueue_is_pending( pj_ioqueue_key_t *key,
+                                         pj_ioqueue_op_key_t *op_key )
+{
+    struct generic_operation *op_rec;
+
+    PJ_UNUSED_ARG(key);
+
+    op_rec = (struct generic_operation*)op_key;
+    return op_rec->op != 0;
+}
+
+
+/*
+ * pj_ioqueue_post_completion()
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_post_completion( pj_ioqueue_key_t *key,
+                                                pj_ioqueue_op_key_t *op_key,
+                                                pj_ssize_t bytes_status )
+{
+    struct generic_operation *op_rec;
+
+    /*
+     * Find the operation key in all pending operation list to
+     * really make sure that it's still there; then call the callback.
+     */
+    pj_mutex_lock(key->mutex);
+
+    /* Find the operation in the pending read list. */
+    op_rec = (struct generic_operation*)key->read_list.next;
+    while (op_rec != (void*)&key->read_list) {
+        if (op_rec == (void*)op_key) {
+            pj_list_erase(op_rec);
+            op_rec->op = 0;
+            pj_mutex_unlock(key->mutex);
+
+            (*key->cb.on_read_complete)(key, op_key, bytes_status);
+            return PJ_SUCCESS;
+        }
+        op_rec = op_rec->next;
+    }
+
+    /* Find the operation in the pending write list. */
+    op_rec = (struct generic_operation*)key->write_list.next;
+    while (op_rec != (void*)&key->write_list) {
+        if (op_rec == (void*)op_key) {
+            pj_list_erase(op_rec);
+            op_rec->op = 0;
+            pj_mutex_unlock(key->mutex);
+
+            (*key->cb.on_write_complete)(key, op_key, bytes_status);
+            return PJ_SUCCESS;
+        }
+        op_rec = op_rec->next;
+    }
+
+    /* Find the operation in the pending accept list. */
+    op_rec = (struct generic_operation*)key->accept_list.next;
+    while (op_rec != (void*)&key->accept_list) {
+        if (op_rec == (void*)op_key) {
+            pj_list_erase(op_rec);
+            op_rec->op = 0;
+            pj_mutex_unlock(key->mutex);
+
+            (*key->cb.on_accept_complete)(key, op_key, 
+                                          PJ_INVALID_SOCKET,
+                                          bytes_status);
+            return PJ_SUCCESS;
+        }
+        op_rec = op_rec->next;
+    }
+
+    pj_mutex_unlock(key->mutex);
+    
+    return PJ_EINVALIDOP;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_common_abs.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_common_abs.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_common_abs.h	(revision 1163)
@@ -0,0 +1,136 @@
+/* $Id */
+/* 
+ * Copyright (C)2003-2007 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 
+ */
+
+/* ioqueue_common_abs.h
+ *
+ * This file contains private declarations for abstracting various 
+ * event polling/dispatching mechanisms (e.g. select, poll, epoll) 
+ * to the ioqueue. 
+ */
+
+#include <pj/list.h>
+
+/*
+ * The select ioqueue relies on socket functions (pj_sock_xxx()) to return
+ * the correct error code.
+ */
+#if PJ_RETURN_OS_ERROR(100) != PJ_STATUS_FROM_OS(100)
+#   error "Proper error reporting must be enabled for ioqueue to work!"
+#endif
+
+
+struct generic_operation
+{
+    PJ_DECL_LIST_MEMBER(struct generic_operation);
+    pj_ioqueue_operation_e  op;
+};
+
+struct read_operation
+{
+    PJ_DECL_LIST_MEMBER(struct read_operation);
+    pj_ioqueue_operation_e  op;
+
+    void		   *buf;
+    pj_size_t		    size;
+    unsigned                flags;
+    pj_sockaddr_t	   *rmt_addr;
+    int			   *rmt_addrlen;
+};
+
+struct write_operation
+{
+    PJ_DECL_LIST_MEMBER(struct write_operation);
+    pj_ioqueue_operation_e  op;
+
+    char		   *buf;
+    pj_size_t		    size;
+    pj_ssize_t              written;
+    unsigned                flags;
+    pj_sockaddr_in	    rmt_addr;
+    int			    rmt_addrlen;
+};
+
+struct accept_operation
+{
+    PJ_DECL_LIST_MEMBER(struct accept_operation);
+    pj_ioqueue_operation_e  op;
+
+    pj_sock_t              *accept_fd;
+    pj_sockaddr_t	   *local_addr;
+    pj_sockaddr_t	   *rmt_addr;
+    int			   *addrlen;
+};
+
+union operation_key
+{
+    struct generic_operation generic;
+    struct read_operation    read;
+    struct write_operation   write;
+#if PJ_HAS_TCP
+    struct accept_operation  accept;
+#endif
+};
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+#   define UNREG_FIELDS			\
+	unsigned	    ref_count;	\
+	pj_bool_t	    closing;	\
+	pj_time_val	    free_time;	\
+	
+#else
+#   define UNREG_FIELDS
+#endif
+
+#define DECLARE_COMMON_KEY                          \
+    PJ_DECL_LIST_MEMBER(struct pj_ioqueue_key_t);   \
+    pj_ioqueue_t           *ioqueue;                \
+    pj_mutex_t             *mutex;                  \
+    pj_bool_t		    inside_callback;	    \
+    pj_bool_t		    destroy_requested;	    \
+    pj_sock_t		    fd;                     \
+    int                     fd_type;                \
+    void		   *user_data;              \
+    pj_ioqueue_callback	    cb;                     \
+    int                     connecting;             \
+    struct read_operation   read_list;              \
+    struct write_operation  write_list;             \
+    struct accept_operation accept_list;	    \
+    UNREG_FIELDS
+
+
+#define DECLARE_COMMON_IOQUEUE                      \
+    pj_lock_t          *lock;                       \
+    pj_bool_t           auto_delete_lock;
+
+
+enum ioqueue_event_type
+{
+    NO_EVENT,
+    READABLE_EVENT,
+    WRITEABLE_EVENT,
+    EXCEPTION_EVENT,
+};
+
+static void ioqueue_add_to_set( pj_ioqueue_t *ioqueue,
+                                pj_ioqueue_key_t *key,
+                                enum ioqueue_event_type event_type );
+static void ioqueue_remove_from_set( pj_ioqueue_t *ioqueue,
+                                     pj_ioqueue_key_t *key, 
+                                     enum ioqueue_event_type event_type);
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_dummy.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_dummy.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_dummy.c	(revision 1163)
@@ -0,0 +1,193 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/ioqueue.h>
+#include <pj/os.h>
+#include <pj/log.h>
+#include <pj/list.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+#include <pj/sock.h>
+#include <pj/errno.h>
+
+#define THIS_FILE   "ioqueue"
+
+#define PJ_IOQUEUE_IS_READ_OP(op)   \
+	((op & PJ_IOQUEUE_OP_READ)  || (op & PJ_IOQUEUE_OP_RECV_FROM))
+#define PJ_IOQUEUE_IS_WRITE_OP(op)  \
+	((op & PJ_IOQUEUE_OP_WRITE) || (op & PJ_IOQUEUE_OP_SEND_TO))
+
+
+#if PJ_HAS_TCP
+#  define PJ_IOQUEUE_IS_ACCEPT_OP(op)	(op & PJ_IOQUEUE_OP_ACCEPT)
+#  define PJ_IOQUEUE_IS_CONNECT_OP(op)	(op & PJ_IOQUEUE_OP_CONNECT)
+#else
+#  define PJ_IOQUEUE_IS_ACCEPT_OP(op)	0
+#  define PJ_IOQUEUE_IS_CONNECT_OP(op)	0
+#endif
+
+#if defined(PJ_DEBUG) && PJ_DEBUG != 0
+#  define VALIDATE_FD_SET		1
+#else
+#  define VALIDATE_FD_SET		0
+#endif
+
+struct pj_ioqueue_key_t
+{
+    PJ_DECL_LIST_MEMBER(struct pj_ioqueue_key_t)
+    pj_sock_t		    fd;
+    pj_ioqueue_operation_e  op;
+    void		   *user_data;
+    pj_ioqueue_callback	    cb;
+};
+
+struct pj_ioqueue_t
+{
+};
+
+PJ_DEF(pj_status_t) pj_ioqueue_create( pj_pool_t *pool, 
+				       pj_size_t max_fd,
+				       int max_threads,
+				       pj_ioqueue_t **ptr_ioqueue)
+{
+    return PJ_ENOTSUP;
+}
+
+PJ_DEF(pj_status_t) pj_ioqueue_destroy(pj_ioqueue_t *ioque)
+{
+    return PJ_ENOTSUP;
+}
+
+PJ_DEF(pj_status_t) pj_ioqueue_set_lock( pj_ioqueue_t *ioque, 
+					 pj_lock_t *lock,
+					 pj_bool_t auto_delete )
+{
+    return PJ_ENOTSUP;
+}
+
+PJ_DEF(pj_status_t) pj_ioqueue_register_sock( pj_pool_t *pool,
+					      pj_ioqueue_t *ioque,
+					      pj_sock_t sock,
+					      void *user_data,
+					      const pj_ioqueue_callback *cb,
+					      pj_ioqueue_key_t **ptr_key)
+{
+    return PJ_ENOTSUP;
+}
+
+PJ_DEF(pj_status_t) pj_ioqueue_unregister( pj_ioqueue_t *ioque,
+					   pj_ioqueue_key_t *key)
+{
+    return PJ_ENOTSUP;
+}
+
+PJ_DEF(void*) pj_ioqueue_get_user_data( pj_ioqueue_key_t *key )
+{
+    return NULL;
+}
+
+
+PJ_DEF(int) pj_ioqueue_poll( pj_ioqueue_t *ioque, const pj_time_val *timeout)
+{
+    return -1;
+}
+
+PJ_DEF(pj_status_t) pj_ioqueue_read( pj_ioqueue_t *ioque,
+				     pj_ioqueue_key_t *key,
+				     void *buffer,
+				     pj_size_t buflen)
+{
+    return -1;
+}
+
+PJ_DEF(pj_status_t) pj_ioqueue_recv( pj_ioqueue_t *ioque,
+				     pj_ioqueue_key_t *key,
+				     void *buffer,
+				     pj_size_t buflen,
+				     unsigned flags)
+{
+    return -1;
+}
+
+PJ_DEF(pj_status_t) pj_ioqueue_recvfrom( pj_ioqueue_t *ioque,
+					 pj_ioqueue_key_t *key,
+					 void *buffer,
+					 pj_size_t buflen,
+					 unsigned flags,
+					 pj_sockaddr_t *addr,
+					 int *addrlen)
+{
+    return -1;
+}
+
+PJ_DEF(pj_status_t) pj_ioqueue_write( pj_ioqueue_t *ioque,
+				      pj_ioqueue_key_t *key,
+				      const void *data,
+				      pj_size_t datalen)
+{
+    return -1;
+}
+
+PJ_DEF(pj_status_t) pj_ioqueue_send( pj_ioqueue_t *ioque,
+				     pj_ioqueue_key_t *key,
+				     const void *data,
+				     pj_size_t datalen,
+				     unsigned flags)
+{
+    return -1;
+}
+
+PJ_DEF(pj_status_t) pj_ioqueue_sendto( pj_ioqueue_t *ioque,
+				       pj_ioqueue_key_t *key,
+				       const void *data,
+				       pj_size_t datalen,
+				       unsigned flags,
+				       const pj_sockaddr_t *addr,
+				       int addrlen)
+{
+    return -1;
+}
+
+#if PJ_HAS_TCP
+/*
+ * Initiate overlapped accept() operation.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_accept( pj_ioqueue_t *ioqueue,
+				       pj_ioqueue_key_t *key,
+				       pj_sock_t *new_sock,
+				       pj_sockaddr_t *local,
+				       pj_sockaddr_t *remote,
+				      int *addrlen)
+{
+    return -1;
+}
+
+/*
+ * Initiate overlapped connect() operation (well, it's non-blocking actually,
+ * since there's no overlapped version of connect()).
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_connect( pj_ioqueue_t *ioqueue,
+					pj_ioqueue_key_t *key,
+					const pj_sockaddr_t *addr,
+					int addrlen )
+{
+    return -1;
+}
+#endif	/* PJ_HAS_TCP */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_epoll.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_epoll.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_epoll.c	(revision 1163)
@@ -0,0 +1,537 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 
+ */
+/*
+ * ioqueue_epoll.c
+ *
+ * This is the implementation of IOQueue framework using /dev/epoll
+ * API in _both_ Linux user-mode and kernel-mode.
+ */
+
+#include <pj/ioqueue.h>
+#include <pj/os.h>
+#include <pj/lock.h>
+#include <pj/log.h>
+#include <pj/list.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+#include <pj/sock.h>
+#include <pj/compat/socket.h>
+
+#if !defined(PJ_LINUX_KERNEL) || PJ_LINUX_KERNEL==0
+    /*
+     * Linux user mode
+     */
+#   include <sys/epoll.h>
+#   include <errno.h>
+#   include <unistd.h>
+
+#   define epoll_data		data.ptr
+#   define epoll_data_type	void*
+#   define ioctl_val_type	unsigned long
+#   define getsockopt_val_ptr	int*
+#   define os_getsockopt	getsockopt
+#   define os_ioctl		ioctl
+#   define os_read		read
+#   define os_close		close
+#   define os_epoll_create	epoll_create
+#   define os_epoll_ctl		epoll_ctl
+#   define os_epoll_wait	epoll_wait
+#else
+    /*
+     * Linux kernel mode.
+     */
+#   include <linux/config.h>
+#   include <linux/version.h>
+#   if defined(MODVERSIONS)
+#	include <linux/modversions.h>
+#   endif
+#   include <linux/kernel.h>
+#   include <linux/poll.h>
+#   include <linux/eventpoll.h>
+#   include <linux/syscalls.h>
+#   include <linux/errno.h>
+#   include <linux/unistd.h>
+#   include <asm/ioctls.h>
+    enum EPOLL_EVENTS
+    {
+	EPOLLIN = 0x001,
+	EPOLLOUT = 0x004,
+	EPOLLERR = 0x008,
+    };
+#   define os_epoll_create		sys_epoll_create
+    static int os_epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
+    {
+	long rc;
+	mm_segment_t oldfs = get_fs();
+	set_fs(KERNEL_DS);
+	rc = sys_epoll_ctl(epfd, op, fd, event);
+	set_fs(oldfs);
+	if (rc) {
+	    errno = -rc;
+	    return -1;
+	} else {
+	    return 0;
+	}
+    }
+    static int os_epoll_wait(int epfd, struct epoll_event *events,
+			  int maxevents, int timeout)
+    {
+	int count;
+	mm_segment_t oldfs = get_fs();
+	set_fs(KERNEL_DS);
+	count = sys_epoll_wait(epfd, events, maxevents, timeout);
+	set_fs(oldfs);
+	return count;
+    }
+#   define os_close		sys_close
+#   define os_getsockopt	pj_sock_getsockopt
+    static int os_read(int fd, void *buf, size_t len)
+    {
+	long rc;
+	mm_segment_t oldfs = get_fs();
+	set_fs(KERNEL_DS);
+	rc = sys_read(fd, buf, len);
+	set_fs(oldfs);
+	if (rc) {
+	    errno = -rc;
+	    return -1;
+	} else {
+	    return 0;
+	}
+    }
+#   define socklen_t		unsigned
+#   define ioctl_val_type	unsigned long
+    int ioctl(int fd, int opt, ioctl_val_type value);
+    static int os_ioctl(int fd, int opt, ioctl_val_type value)
+    {
+	int rc;
+        mm_segment_t oldfs = get_fs();
+	set_fs(KERNEL_DS);
+	rc = ioctl(fd, opt, value);
+	set_fs(oldfs);
+	if (rc < 0) {
+	    errno = -rc;
+	    return rc;
+	} else
+	    return rc;
+    }
+#   define getsockopt_val_ptr	char*
+
+#   define epoll_data		data
+#   define epoll_data_type	__u32
+#endif
+
+#define THIS_FILE   "ioq_epoll"
+
+//#define TRACE_(expr) PJ_LOG(3,expr)
+#define TRACE_(expr)
+
+/*
+ * Include common ioqueue abstraction.
+ */
+#include "ioqueue_common_abs.h"
+
+/*
+ * This describes each key.
+ */
+struct pj_ioqueue_key_t
+{
+    DECLARE_COMMON_KEY
+};
+
+struct queue
+{
+    pj_ioqueue_key_t	    *key;
+    enum ioqueue_event_type  event_type;
+};
+
+/*
+ * This describes the I/O queue.
+ */
+struct pj_ioqueue_t
+{
+    DECLARE_COMMON_IOQUEUE
+
+    unsigned		max, count;
+    pj_ioqueue_key_t	hlist;
+    int			epfd;
+    struct epoll_event *events;
+    struct queue       *queue;
+};
+
+/* Include implementation for common abstraction after we declare
+ * pj_ioqueue_key_t and pj_ioqueue_t.
+ */
+#include "ioqueue_common_abs.c"
+
+/*
+ * pj_ioqueue_name()
+ */
+PJ_DEF(const char*) pj_ioqueue_name(void)
+{
+#if defined(PJ_LINUX_KERNEL) && PJ_LINUX_KERNEL!=0
+	return "epoll-kernel";
+#else
+	return "epoll";
+#endif
+}
+
+/*
+ * pj_ioqueue_create()
+ *
+ * Create select ioqueue.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_create( pj_pool_t *pool, 
+                                       pj_size_t max_fd,
+                                       pj_ioqueue_t **p_ioqueue)
+{
+    pj_ioqueue_t *ioqueue;
+    pj_status_t rc;
+    pj_lock_t *lock;
+
+    /* Check that arguments are valid. */
+    PJ_ASSERT_RETURN(pool != NULL && p_ioqueue != NULL && 
+                     max_fd > 0, PJ_EINVAL);
+
+    /* Check that size of pj_ioqueue_op_key_t is sufficient */
+    PJ_ASSERT_RETURN(sizeof(pj_ioqueue_op_key_t)-sizeof(void*) >=
+                     sizeof(union operation_key), PJ_EBUG);
+
+    ioqueue = pj_pool_alloc(pool, sizeof(pj_ioqueue_t));
+
+    ioqueue_init(ioqueue);
+
+    ioqueue->max = max_fd;
+    ioqueue->count = 0;
+    pj_list_init(&ioqueue->hlist);
+
+    rc = pj_lock_create_simple_mutex(pool, "ioq%p", &lock);
+    if (rc != PJ_SUCCESS)
+	return rc;
+
+    rc = pj_ioqueue_set_lock(ioqueue, lock, PJ_TRUE);
+    if (rc != PJ_SUCCESS)
+        return rc;
+
+    ioqueue->epfd = os_epoll_create(max_fd);
+    if (ioqueue->epfd < 0) {
+	ioqueue_destroy(ioqueue);
+	return PJ_RETURN_OS_ERROR(pj_get_native_os_error());
+    }
+    
+    ioqueue->events = pj_pool_calloc(pool, max_fd, sizeof(struct epoll_event));
+    PJ_ASSERT_RETURN(ioqueue->events != NULL, PJ_ENOMEM);
+
+    ioqueue->queue = pj_pool_calloc(pool, max_fd, sizeof(struct queue));
+    PJ_ASSERT_RETURN(ioqueue->queue != NULL, PJ_ENOMEM);
+
+    PJ_LOG(4, ("pjlib", "epoll I/O Queue created (%p)", ioqueue));
+
+    *p_ioqueue = ioqueue;
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_ioqueue_destroy()
+ *
+ * Destroy ioqueue.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_destroy(pj_ioqueue_t *ioqueue)
+{
+    PJ_ASSERT_RETURN(ioqueue, PJ_EINVAL);
+    PJ_ASSERT_RETURN(ioqueue->epfd > 0, PJ_EINVALIDOP);
+
+    pj_lock_acquire(ioqueue->lock);
+    os_close(ioqueue->epfd);
+    ioqueue->epfd = 0;
+    return ioqueue_destroy(ioqueue);
+}
+
+/*
+ * pj_ioqueue_register_sock()
+ *
+ * Register a socket to ioqueue.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_register_sock( pj_pool_t *pool,
+					      pj_ioqueue_t *ioqueue,
+					      pj_sock_t sock,
+					      void *user_data,
+					      const pj_ioqueue_callback *cb,
+                                              pj_ioqueue_key_t **p_key)
+{
+    pj_ioqueue_key_t *key = NULL;
+    pj_uint32_t value;
+    struct epoll_event ev;
+    int status;
+    pj_status_t rc = PJ_SUCCESS;
+    
+    PJ_ASSERT_RETURN(pool && ioqueue && sock != PJ_INVALID_SOCKET &&
+                     cb && p_key, PJ_EINVAL);
+
+    pj_lock_acquire(ioqueue->lock);
+
+    if (ioqueue->count >= ioqueue->max) {
+        rc = PJ_ETOOMANY;
+	TRACE_((THIS_FILE, "pj_ioqueue_register_sock error: too many files"));
+	goto on_return;
+    }
+
+    /* Set socket to nonblocking. */
+    value = 1;
+    if ((rc=os_ioctl(sock, FIONBIO, (ioctl_val_type)&value))) {
+	TRACE_((THIS_FILE, "pj_ioqueue_register_sock error: ioctl rc=%d", 
+                rc));
+        rc = pj_get_netos_error();
+	goto on_return;
+    }
+
+    /* Create key. */
+    key = (pj_ioqueue_key_t*)pj_pool_zalloc(pool, sizeof(pj_ioqueue_key_t));
+    rc = ioqueue_init_key(pool, ioqueue, key, sock, user_data, cb);
+    if (rc != PJ_SUCCESS) {
+	key = NULL;
+	goto on_return;
+    }
+
+    /* Create key's mutex */
+    rc = pj_mutex_create_recursive(pool, NULL, &key->mutex);
+    if (rc != PJ_SUCCESS) {
+	key = NULL;
+	goto on_return;
+    }
+
+    /* os_epoll_ctl. */
+    ev.events = EPOLLIN | EPOLLERR;
+    ev.epoll_data = (epoll_data_type)key;
+    status = os_epoll_ctl(ioqueue->epfd, EPOLL_CTL_ADD, sock, &ev);
+    if (status < 0) {
+	rc = pj_get_os_error();
+	pj_mutex_destroy(key->mutex);
+	key = NULL;
+	TRACE_((THIS_FILE, 
+                "pj_ioqueue_register_sock error: os_epoll_ctl rc=%d", 
+                status));
+	goto on_return;
+    }
+    
+    /* Register */
+    pj_list_insert_before(&ioqueue->hlist, key);
+    ++ioqueue->count;
+
+    //TRACE_((THIS_FILE, "socket registered, count=%d", ioqueue->count));
+
+on_return:
+    *p_key = key;
+    pj_lock_release(ioqueue->lock);
+    
+    return rc;
+}
+
+/*
+ * pj_ioqueue_unregister()
+ *
+ * Unregister handle from ioqueue.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_unregister( pj_ioqueue_key_t *key)
+{
+    pj_ioqueue_t *ioqueue;
+    struct epoll_event ev;
+    int status;
+    
+    PJ_ASSERT_RETURN(key != NULL, PJ_EINVAL);
+
+    ioqueue = key->ioqueue;
+    pj_lock_acquire(ioqueue->lock);
+
+    pj_assert(ioqueue->count > 0);
+    --ioqueue->count;
+    pj_list_erase(key);
+
+    ev.events = 0;
+    ev.epoll_data = (epoll_data_type)key;
+    status = os_epoll_ctl( ioqueue->epfd, EPOLL_CTL_DEL, key->fd, &ev);
+    if (status != 0) {
+	pj_status_t rc = pj_get_os_error();
+	pj_lock_release(ioqueue->lock);
+	return rc;
+    }
+
+    pj_lock_release(ioqueue->lock);
+
+    /* Destroy the key. */
+    pj_sock_close(key->fd);
+    pj_mutex_destroy(key->mutex);
+
+    return PJ_SUCCESS;
+}
+
+/* ioqueue_remove_from_set()
+ * This function is called from ioqueue_dispatch_event() to instruct
+ * the ioqueue to remove the specified descriptor from ioqueue's descriptor
+ * set for the specified event.
+ */
+static void ioqueue_remove_from_set( pj_ioqueue_t *ioqueue,
+                                     pj_ioqueue_key_t *key, 
+                                     enum ioqueue_event_type event_type)
+{
+    if (event_type == WRITEABLE_EVENT) {
+	struct epoll_event ev;
+
+	ev.events = EPOLLIN | EPOLLERR;
+	ev.epoll_data = (epoll_data_type)key;
+	os_epoll_ctl( ioqueue->epfd, EPOLL_CTL_MOD, key->fd, &ev);
+    }	
+}
+
+/*
+ * ioqueue_add_to_set()
+ * This function is called from pj_ioqueue_recv(), pj_ioqueue_send() etc
+ * to instruct the ioqueue to add the specified handle to ioqueue's descriptor
+ * set for the specified event.
+ */
+static void ioqueue_add_to_set( pj_ioqueue_t *ioqueue,
+                                pj_ioqueue_key_t *key,
+                                enum ioqueue_event_type event_type )
+{
+    if (event_type == WRITEABLE_EVENT) {
+	struct epoll_event ev;
+
+	ev.events = EPOLLIN | EPOLLOUT | EPOLLERR;
+	ev.epoll_data = (epoll_data_type)key;
+	os_epoll_ctl( ioqueue->epfd, EPOLL_CTL_MOD, key->fd, &ev);
+    }	
+}
+
+/*
+ * pj_ioqueue_poll()
+ *
+ */
+PJ_DEF(int) pj_ioqueue_poll( pj_ioqueue_t *ioqueue, const pj_time_val *timeout)
+{
+    int i, count, processed;
+    int msec;
+    struct epoll_event *events = ioqueue->events;
+    struct queue *queue = ioqueue->queue;
+    pj_timestamp t1, t2;
+    
+    PJ_CHECK_STACK();
+
+    msec = timeout ? PJ_TIME_VAL_MSEC(*timeout) : 9000;
+
+    TRACE_((THIS_FILE, "start os_epoll_wait, msec=%d", msec));
+    pj_get_timestamp(&t1);
+ 
+    count = os_epoll_wait( ioqueue->epfd, events, ioqueue->max, msec);
+    if (count == 0) {
+	TRACE_((THIS_FILE, "os_epoll_wait timed out"));
+	return count;
+    }
+    else if (count < 0) {
+	TRACE_((THIS_FILE, "os_epoll_wait error"));
+	return -pj_get_netos_error();
+    }
+
+    pj_get_timestamp(&t2);
+    TRACE_((THIS_FILE, "os_epoll_wait returns %d, time=%d usec",
+		       count, pj_elapsed_usec(&t1, &t2)));
+
+    /* Lock ioqueue. */
+    pj_lock_acquire(ioqueue->lock);
+
+    for (processed=0, i=0; i<count; ++i) {
+	pj_ioqueue_key_t *h = (pj_ioqueue_key_t*)(epoll_data_type)
+				events[i].epoll_data;
+
+	TRACE_((THIS_FILE, "event %d: events=%d", i, events[i].events));
+
+	/*
+	 * Check readability.
+	 */
+	if ((events[i].events & EPOLLIN) && 
+	    (key_has_pending_read(h) || key_has_pending_accept(h))) {
+	    queue[processed].key = h;
+	    queue[processed].event_type = READABLE_EVENT;
+	    ++processed;
+	}
+
+	/*
+	 * Check for writeability.
+	 */
+	if ((events[i].events & EPOLLOUT) && key_has_pending_write(h)) {
+	    queue[processed].key = h;
+	    queue[processed].event_type = WRITEABLE_EVENT;
+	    ++processed;
+	}
+
+#if PJ_HAS_TCP
+	/*
+	 * Check for completion of connect() operation.
+	 */
+	if ((events[i].events & EPOLLOUT) && (h->connecting)) {
+	    queue[processed].key = h;
+	    queue[processed].event_type = WRITEABLE_EVENT;
+	    ++processed;
+	}
+#endif /* PJ_HAS_TCP */
+	
+	/*
+	 * Check for error condition.
+	 */
+	if (events[i].events & EPOLLERR && (h->connecting)) {
+	    queue[processed].key = h;
+	    queue[processed].event_type = EXCEPTION_EVENT;
+	    ++processed;
+	}
+    }
+    pj_lock_release(ioqueue->lock);
+
+    /* Now process the events. */
+    for (i=0; i<processed; ++i) {
+	switch (queue[i].event_type) {
+        case READABLE_EVENT:
+            ioqueue_dispatch_read_event(ioqueue, queue[i].key);
+            break;
+        case WRITEABLE_EVENT:
+            ioqueue_dispatch_write_event(ioqueue, queue[i].key);
+            break;
+        case EXCEPTION_EVENT:
+            ioqueue_dispatch_exception_event(ioqueue, queue[i].key);
+            break;
+        case NO_EVENT:
+            pj_assert(!"Invalid event!");
+            break;
+        }
+    }
+
+    /* Special case:
+     * When epoll returns > 0 but no descriptors are actually set!
+     */
+    if (count > 0 && !processed && msec > 0) {
+	pj_thread_sleep(msec);
+    }
+
+    pj_get_timestamp(&t1);
+    TRACE_((THIS_FILE, "ioqueue_poll() returns %d, time=%d usec",
+		       processed, pj_elapsed_usec(&t2, &t1)));
+
+    return processed;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_linux_kernel.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_linux_kernel.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_linux_kernel.c	(revision 1163)
@@ -0,0 +1,161 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/ioqueue.h>
+#include <pj/os.h>
+#include <pj/log.h>
+#include <pj/list.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+#include <pj/sock.h>
+
+#define THIS_FILE   "ioqueue"
+
+#define PJ_IOQUEUE_IS_READ_OP(op)   \
+	((op & PJ_IOQUEUE_OP_READ)  || (op & PJ_IOQUEUE_OP_RECV_FROM))
+#define PJ_IOQUEUE_IS_WRITE_OP(op)  \
+	((op & PJ_IOQUEUE_OP_WRITE) || (op & PJ_IOQUEUE_OP_SEND_TO))
+
+
+#if PJ_HAS_TCP
+#  define PJ_IOQUEUE_IS_ACCEPT_OP(op)	(op & PJ_IOQUEUE_OP_ACCEPT)
+#  define PJ_IOQUEUE_IS_CONNECT_OP(op)	(op & PJ_IOQUEUE_OP_CONNECT)
+#else
+#  define PJ_IOQUEUE_IS_ACCEPT_OP(op)	0
+#  define PJ_IOQUEUE_IS_CONNECT_OP(op)	0
+#endif
+
+#if defined(PJ_DEBUG) && PJ_DEBUG != 0
+#  define VALIDATE_FD_SET		1
+#else
+#  define VALIDATE_FD_SET		0
+#endif
+
+struct pj_ioqueue_key_t
+{
+    PJ_DECL_LIST_MEMBER(struct pj_ioqueue_key_t)
+    pj_sock_t		    fd;
+    pj_ioqueue_operation_e  op;
+    void		   *user_data;
+    pj_ioqueue_callback	    cb;
+};
+
+struct pj_ioqueue_t
+{
+};
+
+PJ_DEF(pj_ioqueue_t*) pj_ioqueue_create(pj_pool_t *pool, pj_size_t max_fd)
+{
+    return NULL;
+}
+
+PJ_DEF(pj_status_t) pj_ioqueue_destroy(pj_ioqueue_t *ioque)
+{
+    return 0;
+}
+
+PJ_DEF(pj_ioqueue_key_t*) pj_ioqueue_register( pj_pool_t *pool,
+					       pj_ioqueue_t *ioque,
+					       pj_oshandle_t sock,
+					       void *user_data,
+					       const pj_ioqueue_callback *cb)
+{
+    return NULL;
+}
+
+PJ_DEF(pj_status_t) pj_ioqueue_unregister( pj_ioqueue_t *ioque,
+					   pj_ioqueue_key_t *key)
+{
+    return -1;
+}
+
+PJ_DEF(void*) pj_ioqueue_get_user_data( pj_ioqueue_key_t *key )
+{
+    return NULL;
+}
+
+
+PJ_DEF(int) pj_ioqueue_poll( pj_ioqueue_t *ioque, const pj_time_val *timeout)
+{
+    return -1;
+}
+
+PJ_DEF(int) pj_ioqueue_read( pj_ioqueue_t *ioque,
+			     pj_ioqueue_key_t *key,
+			     void *buffer,
+			     pj_size_t buflen)
+{
+    return -1;
+}
+
+PJ_DEF(int) pj_ioqueue_recvfrom( pj_ioqueue_t *ioque,
+				 pj_ioqueue_key_t *key,
+				 void *buffer,
+				 pj_size_t buflen,
+				 pj_sockaddr_t *addr,
+				 int *addrlen)
+{
+    return -1;
+}
+
+PJ_DEF(int) pj_ioqueue_write( pj_ioqueue_t *ioque,
+			      pj_ioqueue_key_t *key,
+			      const void *data,
+			      pj_size_t datalen)
+{
+    return -1;
+}
+
+PJ_DEF(int) pj_ioqueue_sendto( pj_ioqueue_t *ioque,
+			       pj_ioqueue_key_t *key,
+			       const void *data,
+			       pj_size_t datalen,
+			       const pj_sockaddr_t *addr,
+			       int addrlen)
+{
+    return -1;
+}
+
+#if PJ_HAS_TCP
+/*
+ * Initiate overlapped accept() operation.
+ */
+PJ_DEF(int) pj_ioqueue_accept( pj_ioqueue_t *ioqueue,
+			       pj_ioqueue_key_t *key,
+			       pj_sock_t *new_sock,
+			       pj_sockaddr_t *local,
+			       pj_sockaddr_t *remote,
+			       int *addrlen)
+{
+    return -1;
+}
+
+/*
+ * Initiate overlapped connect() operation (well, it's non-blocking actually,
+ * since there's no overlapped version of connect()).
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_connect( pj_ioqueue_t *ioqueue,
+					pj_ioqueue_key_t *key,
+					const pj_sockaddr_t *addr,
+					int addrlen )
+{
+    return -1;
+}
+#endif	/* PJ_HAS_TCP */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_select.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_select.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_select.c	(revision 1163)
@@ -0,0 +1,778 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 
+ */
+
+/*
+ * sock_select.c
+ *
+ * This is the implementation of IOQueue using pj_sock_select().
+ * It runs anywhere where pj_sock_select() is available (currently
+ * Win32, Linux, Linux kernel, etc.).
+ */
+
+#include <pj/ioqueue.h>
+#include <pj/os.h>
+#include <pj/lock.h>
+#include <pj/log.h>
+#include <pj/list.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+#include <pj/sock.h>
+#include <pj/compat/socket.h>
+#include <pj/sock_select.h>
+#include <pj/errno.h>
+
+/*
+ * Include declaration from common abstraction.
+ */
+#include "ioqueue_common_abs.h"
+
+/*
+ * ISSUES with ioqueue_select()
+ *
+ * EAGAIN/EWOULDBLOCK error in recv():
+ *  - when multiple threads are working with the ioqueue, application
+ *    may receive EAGAIN or EWOULDBLOCK in the receive callback.
+ *    This error happens because more than one thread is watching for
+ *    the same descriptor set, so when all of them call recv() or recvfrom()
+ *    simultaneously, only one will succeed and the rest will get the error.
+ *
+ */
+#define THIS_FILE   "ioq_select"
+
+/*
+ * The select ioqueue relies on socket functions (pj_sock_xxx()) to return
+ * the correct error code.
+ */
+#if PJ_RETURN_OS_ERROR(100) != PJ_STATUS_FROM_OS(100)
+#   error "Error reporting must be enabled for this function to work!"
+#endif
+
+/**
+ * Get the number of descriptors in the set. This is defined in sock_select.c
+ * This function will only return the number of sockets set from PJ_FD_SET
+ * operation. When the set is modified by other means (such as by select()),
+ * the count will not be reflected here.
+ *
+ * That's why don't export this function in the header file, to avoid
+ * misunderstanding.
+ *
+ * @param fdsetp    The descriptor set.
+ *
+ * @return          Number of descriptors in the set.
+ */
+PJ_DECL(pj_size_t) PJ_FD_COUNT(const pj_fd_set_t *fdsetp);
+
+
+/*
+ * During debugging build, VALIDATE_FD_SET is set.
+ * This will check the validity of the fd_sets.
+ */
+/*
+#if defined(PJ_DEBUG) && PJ_DEBUG != 0
+#  define VALIDATE_FD_SET		1
+#else
+#  define VALIDATE_FD_SET		0
+#endif
+*/
+#define VALIDATE_FD_SET     0
+
+#if 0
+#  define TRACE__(args)	PJ_LOG(3,args)
+#else
+#  define TRACE__(args)
+#endif
+
+/*
+ * This describes each key.
+ */
+struct pj_ioqueue_key_t
+{
+    DECLARE_COMMON_KEY
+};
+
+/*
+ * This describes the I/O queue itself.
+ */
+struct pj_ioqueue_t
+{
+    DECLARE_COMMON_IOQUEUE
+
+    unsigned		max, count;	/* Max and current key count	    */
+    int			nfds;		/* The largest fd value (for select)*/
+    pj_ioqueue_key_t	active_list;	/* List of active keys.		    */
+    pj_fd_set_t		rfdset;
+    pj_fd_set_t		wfdset;
+#if PJ_HAS_TCP
+    pj_fd_set_t		xfdset;
+#endif
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    pj_mutex_t	       *ref_cnt_mutex;
+    pj_ioqueue_key_t	closing_list;
+    pj_ioqueue_key_t	free_list;
+#endif
+};
+
+/* Include implementation for common abstraction after we declare
+ * pj_ioqueue_key_t and pj_ioqueue_t.
+ */
+#include "ioqueue_common_abs.c"
+
+/*
+ * pj_ioqueue_name()
+ */
+PJ_DEF(const char*) pj_ioqueue_name(void)
+{
+    return "select";
+}
+
+/* 
+ * Scan the socket descriptor sets for the largest descriptor.
+ * This value is needed by select().
+ */
+#if defined(PJ_SELECT_NEEDS_NFDS) && PJ_SELECT_NEEDS_NFDS!=0
+static void rescan_fdset(pj_ioqueue_t *ioqueue)
+{
+    pj_ioqueue_key_t *key = ioqueue->active_list.next;
+    int max = 0;
+
+    while (key != &ioqueue->active_list) {
+	if (key->fd > max)
+	    max = key->fd;
+	key = key->next;
+    }
+
+    ioqueue->nfds = max;
+}
+#else
+static void rescan_fdset(pj_ioqueue_t *ioqueue)
+{
+    ioqueue->nfds = FD_SETSIZE-1;
+}
+#endif
+
+
+/*
+ * pj_ioqueue_create()
+ *
+ * Create select ioqueue.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_create( pj_pool_t *pool, 
+                                       pj_size_t max_fd,
+                                       pj_ioqueue_t **p_ioqueue)
+{
+    pj_ioqueue_t *ioqueue;
+    pj_lock_t *lock;
+    unsigned i;
+    pj_status_t rc;
+
+    /* Check that arguments are valid. */
+    PJ_ASSERT_RETURN(pool != NULL && p_ioqueue != NULL && 
+                     max_fd > 0 && max_fd <= PJ_IOQUEUE_MAX_HANDLES, 
+                     PJ_EINVAL);
+
+    /* Check that size of pj_ioqueue_op_key_t is sufficient */
+    PJ_ASSERT_RETURN(sizeof(pj_ioqueue_op_key_t)-sizeof(void*) >=
+                     sizeof(union operation_key), PJ_EBUG);
+
+    /* Create and init common ioqueue stuffs */
+    ioqueue = pj_pool_alloc(pool, sizeof(pj_ioqueue_t));
+    ioqueue_init(ioqueue);
+
+    ioqueue->max = max_fd;
+    ioqueue->count = 0;
+    PJ_FD_ZERO(&ioqueue->rfdset);
+    PJ_FD_ZERO(&ioqueue->wfdset);
+#if PJ_HAS_TCP
+    PJ_FD_ZERO(&ioqueue->xfdset);
+#endif
+    pj_list_init(&ioqueue->active_list);
+
+    rescan_fdset(ioqueue);
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /* When safe unregistration is used (the default), we pre-create
+     * all keys and put them in the free list.
+     */
+
+    /* Mutex to protect key's reference counter 
+     * We don't want to use key's mutex or ioqueue's mutex because
+     * that would create deadlock situation in some cases.
+     */
+    rc = pj_mutex_create_simple(pool, NULL, &ioqueue->ref_cnt_mutex);
+    if (rc != PJ_SUCCESS)
+	return rc;
+
+
+    /* Init key list */
+    pj_list_init(&ioqueue->free_list);
+    pj_list_init(&ioqueue->closing_list);
+
+
+    /* Pre-create all keys according to max_fd */
+    for (i=0; i<max_fd; ++i) {
+	pj_ioqueue_key_t *key;
+
+	key = pj_pool_alloc(pool, sizeof(pj_ioqueue_key_t));
+	key->ref_count = 0;
+	rc = pj_mutex_create_recursive(pool, NULL, &key->mutex);
+	if (rc != PJ_SUCCESS) {
+	    key = ioqueue->free_list.next;
+	    while (key != &ioqueue->free_list) {
+		pj_mutex_destroy(key->mutex);
+		key = key->next;
+	    }
+	    pj_mutex_destroy(ioqueue->ref_cnt_mutex);
+	    return rc;
+	}
+
+	pj_list_push_back(&ioqueue->free_list, key);
+    }
+#endif
+
+    /* Create and init ioqueue mutex */
+    rc = pj_lock_create_simple_mutex(pool, "ioq%p", &lock);
+    if (rc != PJ_SUCCESS)
+	return rc;
+
+    rc = pj_ioqueue_set_lock(ioqueue, lock, PJ_TRUE);
+    if (rc != PJ_SUCCESS)
+        return rc;
+
+    PJ_LOG(4, ("pjlib", "select() I/O Queue created (%p)", ioqueue));
+
+    *p_ioqueue = ioqueue;
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_ioqueue_destroy()
+ *
+ * Destroy ioqueue.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_destroy(pj_ioqueue_t *ioqueue)
+{
+    pj_ioqueue_key_t *key;
+
+    PJ_ASSERT_RETURN(ioqueue, PJ_EINVAL);
+
+    pj_lock_acquire(ioqueue->lock);
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /* Destroy reference counters */
+    key = ioqueue->active_list.next;
+    while (key != &ioqueue->active_list) {
+	pj_mutex_destroy(key->mutex);
+	key = key->next;
+    }
+
+    key = ioqueue->closing_list.next;
+    while (key != &ioqueue->closing_list) {
+	pj_mutex_destroy(key->mutex);
+	key = key->next;
+    }
+
+    key = ioqueue->free_list.next;
+    while (key != &ioqueue->free_list) {
+	pj_mutex_destroy(key->mutex);
+	key = key->next;
+    }
+
+    pj_mutex_destroy(ioqueue->ref_cnt_mutex);
+#endif
+
+    return ioqueue_destroy(ioqueue);
+}
+
+
+/*
+ * pj_ioqueue_register_sock()
+ *
+ * Register socket handle to ioqueue.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_register_sock( pj_pool_t *pool,
+					      pj_ioqueue_t *ioqueue,
+					      pj_sock_t sock,
+					      void *user_data,
+					      const pj_ioqueue_callback *cb,
+                                              pj_ioqueue_key_t **p_key)
+{
+    pj_ioqueue_key_t *key = NULL;
+#if defined(PJ_WIN32) && PJ_WIN32!=0 || \
+    defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0
+    u_long value;
+#else
+    pj_uint32_t value;
+#endif
+    pj_status_t rc = PJ_SUCCESS;
+    
+    PJ_ASSERT_RETURN(pool && ioqueue && sock != PJ_INVALID_SOCKET &&
+                     cb && p_key, PJ_EINVAL);
+
+    pj_lock_acquire(ioqueue->lock);
+
+    if (ioqueue->count >= ioqueue->max) {
+        rc = PJ_ETOOMANY;
+	goto on_return;
+    }
+
+    /* If safe unregistration (PJ_IOQUEUE_HAS_SAFE_UNREG) is used, get
+     * the key from the free list. Otherwise allocate a new one. 
+     */
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    pj_assert(!pj_list_empty(&ioqueue->free_list));
+    if (pj_list_empty(&ioqueue->free_list)) {
+	rc = PJ_ETOOMANY;
+	goto on_return;
+    }
+
+    key = ioqueue->free_list.next;
+    pj_list_erase(key);
+#else
+    key = (pj_ioqueue_key_t*)pj_pool_zalloc(pool, sizeof(pj_ioqueue_key_t));
+#endif
+
+    rc = ioqueue_init_key(pool, ioqueue, key, sock, user_data, cb);
+    if (rc != PJ_SUCCESS) {
+	key = NULL;
+	goto on_return;
+    }
+
+    /* Set socket to nonblocking. */
+    value = 1;
+#if defined(PJ_WIN32) && PJ_WIN32!=0 || \
+    defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0
+    if (ioctlsocket(sock, FIONBIO, &value)) {
+#else
+    if (ioctl(sock, FIONBIO, &value)) {
+#endif
+        rc = pj_get_netos_error();
+	goto on_return;
+    }
+
+
+    /* Put in active list. */
+    pj_list_insert_before(&ioqueue->active_list, key);
+    ++ioqueue->count;
+
+    /* Rescan fdset to get max descriptor */
+    rescan_fdset(ioqueue);
+
+on_return:
+    /* On error, socket may be left in non-blocking mode. */
+    *p_key = key;
+    pj_lock_release(ioqueue->lock);
+    
+    return rc;
+}
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+/* Increment key's reference counter */
+static void increment_counter(pj_ioqueue_key_t *key)
+{
+    pj_mutex_lock(key->ioqueue->ref_cnt_mutex);
+    ++key->ref_count;
+    pj_mutex_unlock(key->ioqueue->ref_cnt_mutex);
+}
+
+/* Decrement the key's reference counter, and when the counter reach zero,
+ * destroy the key.
+ *
+ * Note: MUST NOT CALL THIS FUNCTION WHILE HOLDING ioqueue's LOCK.
+ */
+static void decrement_counter(pj_ioqueue_key_t *key)
+{
+    pj_mutex_lock(key->ioqueue->ref_cnt_mutex);
+    --key->ref_count;
+    if (key->ref_count == 0) {
+
+	pj_assert(key->closing == 1);
+	pj_gettimeofday(&key->free_time);
+	key->free_time.msec += PJ_IOQUEUE_KEY_FREE_DELAY;
+	pj_time_val_normalize(&key->free_time);
+
+	pj_lock_acquire(key->ioqueue->lock);
+	pj_list_erase(key);
+	pj_list_push_back(&key->ioqueue->closing_list, key);
+	/* Rescan fdset to get max descriptor */
+	rescan_fdset(key->ioqueue);
+	pj_lock_release(key->ioqueue->lock);
+    }
+    pj_mutex_unlock(key->ioqueue->ref_cnt_mutex);
+}
+#endif
+
+
+/*
+ * pj_ioqueue_unregister()
+ *
+ * Unregister handle from ioqueue.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_unregister( pj_ioqueue_key_t *key)
+{
+    pj_ioqueue_t *ioqueue;
+
+    PJ_ASSERT_RETURN(key, PJ_EINVAL);
+
+    ioqueue = key->ioqueue;
+
+    /* Lock the key to make sure no callback is simultaneously modifying
+     * the key. We need to lock the key before ioqueue here to prevent
+     * deadlock.
+     */
+    pj_mutex_lock(key->mutex);
+
+    /* Also lock ioqueue */
+    pj_lock_acquire(ioqueue->lock);
+
+    pj_assert(ioqueue->count > 0);
+    --ioqueue->count;
+    pj_list_erase(key);
+    PJ_FD_CLR(key->fd, &ioqueue->rfdset);
+    PJ_FD_CLR(key->fd, &ioqueue->wfdset);
+#if PJ_HAS_TCP
+    PJ_FD_CLR(key->fd, &ioqueue->xfdset);
+#endif
+
+    /* Close socket. */
+    pj_sock_close(key->fd);
+
+    /* Clear callback */
+    key->cb.on_accept_complete = NULL;
+    key->cb.on_connect_complete = NULL;
+    key->cb.on_read_complete = NULL;
+    key->cb.on_write_complete = NULL;
+
+    /* Must release ioqueue lock first before decrementing counter, to
+     * prevent deadlock.
+     */
+    pj_lock_release(ioqueue->lock);
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /* Mark key is closing. */
+    key->closing = 1;
+
+    /* Decrement counter. */
+    decrement_counter(key);
+
+    /* Done. */
+    pj_mutex_unlock(key->mutex);
+#else
+    pj_mutex_destroy(key->mutex);
+#endif
+
+    return PJ_SUCCESS;
+}
+
+
+/* This supposed to check whether the fd_set values are consistent
+ * with the operation currently set in each key.
+ */
+#if VALIDATE_FD_SET
+static void validate_sets(const pj_ioqueue_t *ioqueue,
+			  const pj_fd_set_t *rfdset,
+			  const pj_fd_set_t *wfdset,
+			  const pj_fd_set_t *xfdset)
+{
+    pj_ioqueue_key_t *key;
+
+    /*
+     * This basicly would not work anymore.
+     * We need to lock key before performing the check, but we can't do
+     * so because we're holding ioqueue mutex. If we acquire key's mutex
+     * now, the will cause deadlock.
+     */
+    pj_assert(0);
+
+    key = ioqueue->active_list.next;
+    while (key != &ioqueue->active_list) {
+	if (!pj_list_empty(&key->read_list)
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP != 0
+	    || !pj_list_empty(&key->accept_list)
+#endif
+	    ) 
+	{
+	    pj_assert(PJ_FD_ISSET(key->fd, rfdset));
+	} 
+	else {
+	    pj_assert(PJ_FD_ISSET(key->fd, rfdset) == 0);
+	}
+	if (!pj_list_empty(&key->write_list)
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP != 0
+	    || key->connecting
+#endif
+	   )
+	{
+	    pj_assert(PJ_FD_ISSET(key->fd, wfdset));
+	}
+	else {
+	    pj_assert(PJ_FD_ISSET(key->fd, wfdset) == 0);
+	}
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP != 0
+	if (key->connecting)
+	{
+	    pj_assert(PJ_FD_ISSET(key->fd, xfdset));
+	}
+	else {
+	    pj_assert(PJ_FD_ISSET(key->fd, xfdset) == 0);
+	}
+#endif /* PJ_HAS_TCP */
+
+	key = key->next;
+    }
+}
+#endif	/* VALIDATE_FD_SET */
+
+
+/* ioqueue_remove_from_set()
+ * This function is called from ioqueue_dispatch_event() to instruct
+ * the ioqueue to remove the specified descriptor from ioqueue's descriptor
+ * set for the specified event.
+ */
+static void ioqueue_remove_from_set( pj_ioqueue_t *ioqueue,
+                                     pj_ioqueue_key_t *key, 
+                                     enum ioqueue_event_type event_type)
+{
+    pj_lock_acquire(ioqueue->lock);
+
+    if (event_type == READABLE_EVENT)
+        PJ_FD_CLR((pj_sock_t)key->fd, &ioqueue->rfdset);
+    else if (event_type == WRITEABLE_EVENT)
+        PJ_FD_CLR((pj_sock_t)key->fd, &ioqueue->wfdset);
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP!=0
+    else if (event_type == EXCEPTION_EVENT)
+        PJ_FD_CLR((pj_sock_t)key->fd, &ioqueue->xfdset);
+#endif
+    else
+        pj_assert(0);
+
+    pj_lock_release(ioqueue->lock);
+}
+
+/*
+ * ioqueue_add_to_set()
+ * This function is called from pj_ioqueue_recv(), pj_ioqueue_send() etc
+ * to instruct the ioqueue to add the specified handle to ioqueue's descriptor
+ * set for the specified event.
+ */
+static void ioqueue_add_to_set( pj_ioqueue_t *ioqueue,
+                                pj_ioqueue_key_t *key,
+                                enum ioqueue_event_type event_type )
+{
+    pj_lock_acquire(ioqueue->lock);
+
+    if (event_type == READABLE_EVENT)
+        PJ_FD_SET((pj_sock_t)key->fd, &ioqueue->rfdset);
+    else if (event_type == WRITEABLE_EVENT)
+        PJ_FD_SET((pj_sock_t)key->fd, &ioqueue->wfdset);
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP!=0
+    else if (event_type == EXCEPTION_EVENT)
+        PJ_FD_SET((pj_sock_t)key->fd, &ioqueue->xfdset);
+#endif
+    else
+        pj_assert(0);
+
+    pj_lock_release(ioqueue->lock);
+}
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+/* Scan closing keys to be put to free list again */
+static void scan_closing_keys(pj_ioqueue_t *ioqueue)
+{
+    pj_time_val now;
+    pj_ioqueue_key_t *h;
+
+    pj_gettimeofday(&now);
+    h = ioqueue->closing_list.next;
+    while (h != &ioqueue->closing_list) {
+	pj_ioqueue_key_t *next = h->next;
+
+	pj_assert(h->closing != 0);
+
+	if (PJ_TIME_VAL_GTE(now, h->free_time)) {
+	    pj_list_erase(h);
+	    pj_list_push_back(&ioqueue->free_list, h);
+	}
+	h = next;
+    }
+}
+#endif
+
+
+/*
+ * pj_ioqueue_poll()
+ *
+ * Few things worth written:
+ *
+ *  - we used to do only one callback called per poll, but it didn't go
+ *    very well. The reason is because on some situation, the write 
+ *    callback gets called all the time, thus doesn't give the read
+ *    callback to get called. This happens, for example, when user
+ *    submit write operation inside the write callback.
+ *    As the result, we changed the behaviour so that now multiple
+ *    callbacks are called in a single poll. It should be fast too,
+ *    just that we need to be carefull with the ioqueue data structs.
+ *
+ *  - to guarantee preemptiveness etc, the poll function must strictly
+ *    work on fd_set copy of the ioqueue (not the original one).
+ */
+PJ_DEF(int) pj_ioqueue_poll( pj_ioqueue_t *ioqueue, const pj_time_val *timeout)
+{
+    pj_fd_set_t rfdset, wfdset, xfdset;
+    int count, counter;
+    pj_ioqueue_key_t *h;
+    struct event
+    {
+        pj_ioqueue_key_t	*key;
+        enum ioqueue_event_type  event_type;
+    } event[PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL];
+
+    PJ_ASSERT_RETURN(ioqueue, -PJ_EINVAL);
+
+    /* Lock ioqueue before making fd_set copies */
+    pj_lock_acquire(ioqueue->lock);
+
+    /* We will only do select() when there are sockets to be polled.
+     * Otherwise select() will return error.
+     */
+    if (PJ_FD_COUNT(&ioqueue->rfdset)==0 &&
+        PJ_FD_COUNT(&ioqueue->wfdset)==0 
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP!=0
+        && PJ_FD_COUNT(&ioqueue->xfdset)==0
+#endif
+	)
+    {
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+	scan_closing_keys(ioqueue);
+#endif
+	pj_lock_release(ioqueue->lock);
+	TRACE__((THIS_FILE, "     poll: no fd is set"));
+        if (timeout)
+            pj_thread_sleep(PJ_TIME_VAL_MSEC(*timeout));
+        return 0;
+    }
+
+    /* Copy ioqueue's pj_fd_set_t to local variables. */
+    pj_memcpy(&rfdset, &ioqueue->rfdset, sizeof(pj_fd_set_t));
+    pj_memcpy(&wfdset, &ioqueue->wfdset, sizeof(pj_fd_set_t));
+#if PJ_HAS_TCP
+    pj_memcpy(&xfdset, &ioqueue->xfdset, sizeof(pj_fd_set_t));
+#else
+    PJ_FD_ZERO(&xfdset);
+#endif
+
+#if VALIDATE_FD_SET
+    validate_sets(ioqueue, &rfdset, &wfdset, &xfdset);
+#endif
+
+    /* Unlock ioqueue before select(). */
+    pj_lock_release(ioqueue->lock);
+
+    count = pj_sock_select(ioqueue->nfds+1, &rfdset, &wfdset, &xfdset, 
+			   timeout);
+    
+    if (count <= 0)
+	return -pj_get_netos_error();
+    else if (count > PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL)
+        count = PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL;
+
+    /* Scan descriptor sets for event and add the events in the event
+     * array to be processed later in this function. We do this so that
+     * events can be processed in parallel without holding ioqueue lock.
+     */
+    pj_lock_acquire(ioqueue->lock);
+
+    counter = 0;
+
+    /* Scan for writable sockets first to handle piggy-back data
+     * coming with accept().
+     */
+    h = ioqueue->active_list.next;
+    for ( ; h!=&ioqueue->active_list && counter<count; h = h->next) {
+
+	if ( (key_has_pending_write(h) || key_has_pending_connect(h))
+	     && PJ_FD_ISSET(h->fd, &wfdset) && !IS_CLOSING(h))
+        {
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+	    increment_counter(h);
+#endif
+            event[counter].key = h;
+            event[counter].event_type = WRITEABLE_EVENT;
+            ++counter;
+        }
+
+        /* Scan for readable socket. */
+	if ((key_has_pending_read(h) || key_has_pending_accept(h))
+            && PJ_FD_ISSET(h->fd, &rfdset) && !IS_CLOSING(h))
+        {
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+	    increment_counter(h);
+#endif
+            event[counter].key = h;
+            event[counter].event_type = READABLE_EVENT;
+            ++counter;
+	}
+
+#if PJ_HAS_TCP
+        if (key_has_pending_connect(h) && PJ_FD_ISSET(h->fd, &xfdset) &&
+	    !IS_CLOSING(h)) 
+	{
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+	    increment_counter(h);
+#endif
+            event[counter].key = h;
+            event[counter].event_type = EXCEPTION_EVENT;
+            ++counter;
+        }
+#endif
+    }
+
+    pj_lock_release(ioqueue->lock);
+
+    count = counter;
+
+    /* Now process all events. The dispatch functions will take care
+     * of locking in each of the key
+     */
+    for (counter=0; counter<count; ++counter) {
+        switch (event[counter].event_type) {
+        case READABLE_EVENT:
+            ioqueue_dispatch_read_event(ioqueue, event[counter].key);
+            break;
+        case WRITEABLE_EVENT:
+            ioqueue_dispatch_write_event(ioqueue, event[counter].key);
+            break;
+        case EXCEPTION_EVENT:
+            ioqueue_dispatch_exception_event(ioqueue, event[counter].key);
+            break;
+        case NO_EVENT:
+            pj_assert(!"Invalid event!");
+            break;
+        }
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+	decrement_counter(event[counter].key);
+#endif
+    }
+
+
+    return count;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_winnt.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_winnt.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/ioqueue_winnt.c	(revision 1163)
@@ -0,0 +1,1270 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/ioqueue.h>
+#include <pj/os.h>
+#include <pj/lock.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/sock.h>
+#include <pj/array.h>
+#include <pj/log.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+#include <pj/compat/socket.h>
+
+
+#if defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H != 0
+#  include <winsock2.h>
+#elif defined(PJ_HAS_WINSOCK_H) && PJ_HAS_WINSOCK_H != 0
+#  include <winsock.h>
+#endif
+
+#if defined(PJ_HAS_MSWSOCK_H) && PJ_HAS_MSWSOCK_H != 0
+#  include <mswsock.h>
+#endif
+
+
+/* The address specified in AcceptEx() must be 16 more than the size of
+ * SOCKADDR (source: MSDN).
+ */
+#define ACCEPT_ADDR_LEN	    (sizeof(pj_sockaddr_in)+16)
+
+typedef struct generic_overlapped
+{
+    WSAOVERLAPPED	   overlapped;
+    pj_ioqueue_operation_e operation;
+} generic_overlapped;
+
+/*
+ * OVERLAPPPED structure for send and receive.
+ */
+typedef struct ioqueue_overlapped
+{
+    WSAOVERLAPPED	   overlapped;
+    pj_ioqueue_operation_e operation;
+    WSABUF		   wsabuf;
+    pj_sockaddr_in         dummy_addr;
+    int                    dummy_addrlen;
+} ioqueue_overlapped;
+
+#if PJ_HAS_TCP
+/*
+ * OVERLAP structure for accept.
+ */
+typedef struct ioqueue_accept_rec
+{
+    WSAOVERLAPPED	    overlapped;
+    pj_ioqueue_operation_e  operation;
+    pj_sock_t		    newsock;
+    pj_sock_t		   *newsock_ptr;
+    int			   *addrlen;
+    void		   *remote;
+    void		   *local;
+    char		    accept_buf[2 * ACCEPT_ADDR_LEN];
+} ioqueue_accept_rec;
+#endif
+
+/*
+ * Structure to hold pending operation key.
+ */
+union operation_key
+{
+    generic_overlapped      generic;
+    ioqueue_overlapped      overlapped;
+#if PJ_HAS_TCP
+    ioqueue_accept_rec      accept;
+#endif
+};
+
+/* Type of handle in the key. */
+enum handle_type
+{
+    HND_IS_UNKNOWN,
+    HND_IS_FILE,
+    HND_IS_SOCKET,
+};
+
+enum { POST_QUIT_LEN = 0xFFFFDEADUL };
+
+/*
+ * Structure for individual socket.
+ */
+struct pj_ioqueue_key_t
+{
+    PJ_DECL_LIST_MEMBER(struct pj_ioqueue_key_t);
+
+    pj_ioqueue_t       *ioqueue;
+    HANDLE		hnd;
+    void	       *user_data;
+    enum handle_type    hnd_type;
+    pj_ioqueue_callback	cb;
+
+#if PJ_HAS_TCP
+    int			connecting;
+#endif
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    pj_atomic_t	       *ref_count;
+    pj_bool_t		closing;
+    pj_time_val		free_time;
+#endif
+
+};
+
+/*
+ * IO Queue structure.
+ */
+struct pj_ioqueue_t
+{
+    HANDLE	      iocp;
+    pj_lock_t        *lock;
+    pj_bool_t         auto_delete_lock;
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    pj_ioqueue_key_t  active_list;
+    pj_ioqueue_key_t  free_list;
+    pj_ioqueue_key_t  closing_list;
+#endif
+
+    /* These are to keep track of connecting sockets */
+#if PJ_HAS_TCP
+    unsigned	      event_count;
+    HANDLE	      event_pool[MAXIMUM_WAIT_OBJECTS+1];
+    unsigned	      connecting_count;
+    HANDLE	      connecting_handles[MAXIMUM_WAIT_OBJECTS+1];
+    pj_ioqueue_key_t *connecting_keys[MAXIMUM_WAIT_OBJECTS+1];
+#endif
+};
+
+
+#if PJ_HAS_TCP
+/*
+ * Process the socket when the overlapped accept() completed.
+ */
+static void ioqueue_on_accept_complete(ioqueue_accept_rec *accept_overlapped)
+{
+    struct sockaddr *local;
+    struct sockaddr *remote;
+    int locallen, remotelen;
+
+    PJ_CHECK_STACK();
+
+    /* Operation complete immediately. */
+    GetAcceptExSockaddrs( accept_overlapped->accept_buf,
+			  0, 
+			  ACCEPT_ADDR_LEN,
+			  ACCEPT_ADDR_LEN,
+			  &local,
+			  &locallen,
+			  &remote,
+			  &remotelen);
+    if (*accept_overlapped->addrlen >= locallen) {
+        pj_memcpy(accept_overlapped->local, local, locallen);
+        pj_memcpy(accept_overlapped->remote, remote, locallen);
+    } else {
+        pj_bzero(accept_overlapped->local, *accept_overlapped->addrlen);
+        pj_bzero(accept_overlapped->remote, *accept_overlapped->addrlen);
+    }
+    *accept_overlapped->addrlen = locallen;
+    if (accept_overlapped->newsock_ptr)
+        *accept_overlapped->newsock_ptr = accept_overlapped->newsock;
+    accept_overlapped->operation = 0;
+}
+
+static void erase_connecting_socket( pj_ioqueue_t *ioqueue, unsigned pos)
+{
+    pj_ioqueue_key_t *key = ioqueue->connecting_keys[pos];
+    HANDLE hEvent = ioqueue->connecting_handles[pos];
+
+    /* Remove key from array of connecting handles. */
+    pj_array_erase(ioqueue->connecting_keys, sizeof(key),
+		   ioqueue->connecting_count, pos);
+    pj_array_erase(ioqueue->connecting_handles, sizeof(HANDLE),
+		   ioqueue->connecting_count, pos);
+    --ioqueue->connecting_count;
+
+    /* Disassociate the socket from the event. */
+    WSAEventSelect((pj_sock_t)key->hnd, hEvent, 0);
+
+    /* Put event object to pool. */
+    if (ioqueue->event_count < MAXIMUM_WAIT_OBJECTS) {
+	ioqueue->event_pool[ioqueue->event_count++] = hEvent;
+    } else {
+	/* Shouldn't happen. There should be no more pending connections
+	 * than max. 
+	 */
+	pj_assert(0);
+	CloseHandle(hEvent);
+    }
+
+}
+
+/*
+ * Poll for the completion of non-blocking connect().
+ * If there's a completion, the function return the key of the completed
+ * socket, and 'result' argument contains the connect() result. If connect()
+ * succeeded, 'result' will have value zero, otherwise will have the error
+ * code.
+ */
+static int check_connecting( pj_ioqueue_t *ioqueue )
+{
+    if (ioqueue->connecting_count) {
+	int i, count;
+	struct 
+	{
+	    pj_ioqueue_key_t *key;
+	    pj_status_t	      status;
+	} events[PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL-1];
+
+	pj_lock_acquire(ioqueue->lock);
+	for (count=0; count<PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL-1; ++count) {
+	    DWORD result;
+
+	    result = WaitForMultipleObjects(ioqueue->connecting_count,
+					    ioqueue->connecting_handles,
+					    FALSE, 0);
+	    if (result >= WAIT_OBJECT_0 && 
+		result < WAIT_OBJECT_0+ioqueue->connecting_count) 
+	    {
+		WSANETWORKEVENTS net_events;
+
+		/* Got completed connect(). */
+		unsigned pos = result - WAIT_OBJECT_0;
+		events[count].key = ioqueue->connecting_keys[pos];
+
+		/* See whether connect has succeeded. */
+		WSAEnumNetworkEvents((pj_sock_t)events[count].key->hnd, 
+				     ioqueue->connecting_handles[pos], 
+				     &net_events);
+		events[count].status = 
+		    PJ_STATUS_FROM_OS(net_events.iErrorCode[FD_CONNECT_BIT]);
+
+		/* Erase socket from pending connect. */
+		erase_connecting_socket(ioqueue, pos);
+	    } else {
+		/* No more events */
+		break;
+	    }
+	}
+	pj_lock_release(ioqueue->lock);
+
+	/* Call callbacks. */
+	for (i=0; i<count; ++i) {
+	    if (events[i].key->cb.on_connect_complete) {
+		events[i].key->cb.on_connect_complete(events[i].key, 
+						      events[i].status);
+	    }
+	}
+
+	return count;
+    }
+
+    return 0;
+    
+}
+#endif
+
+/*
+ * pj_ioqueue_name()
+ */
+PJ_DEF(const char*) pj_ioqueue_name(void)
+{
+    return "iocp";
+}
+
+/*
+ * pj_ioqueue_create()
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_create( pj_pool_t *pool, 
+				       pj_size_t max_fd,
+				       pj_ioqueue_t **p_ioqueue)
+{
+    pj_ioqueue_t *ioqueue;
+    unsigned i;
+    pj_status_t rc;
+
+    PJ_UNUSED_ARG(max_fd);
+    PJ_ASSERT_RETURN(pool && p_ioqueue, PJ_EINVAL);
+
+    rc = sizeof(union operation_key);
+
+    /* Check that sizeof(pj_ioqueue_op_key_t) makes sense. */
+    PJ_ASSERT_RETURN(sizeof(pj_ioqueue_op_key_t)-sizeof(void*) >= 
+                     sizeof(union operation_key), PJ_EBUG);
+
+    /* Create IOCP */
+    ioqueue = pj_pool_zalloc(pool, sizeof(*ioqueue));
+    ioqueue->iocp = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0);
+    if (ioqueue->iocp == NULL)
+	return PJ_RETURN_OS_ERROR(GetLastError());
+
+    /* Create IOCP mutex */
+    rc = pj_lock_create_simple_mutex(pool, NULL, &ioqueue->lock);
+    if (rc != PJ_SUCCESS) {
+	CloseHandle(ioqueue->iocp);
+	return rc;
+    }
+
+    ioqueue->auto_delete_lock = PJ_TRUE;
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /*
+     * Create and initialize key pools.
+     */
+    pj_list_init(&ioqueue->active_list);
+    pj_list_init(&ioqueue->free_list);
+    pj_list_init(&ioqueue->closing_list);
+
+    /* Preallocate keys according to max_fd setting, and put them
+     * in free_list.
+     */
+    for (i=0; i<max_fd; ++i) {
+	pj_ioqueue_key_t *key;
+
+	key = pj_pool_alloc(pool, sizeof(pj_ioqueue_key_t));
+
+	rc = pj_atomic_create(pool, 0, &key->ref_count);
+	if (rc != PJ_SUCCESS) {
+	    key = ioqueue->free_list.next;
+	    while (key != &ioqueue->free_list) {
+		pj_atomic_destroy(key->ref_count);
+		key = key->next;
+	    }
+	    CloseHandle(ioqueue->iocp);
+	    return rc;
+	}
+
+	pj_list_push_back(&ioqueue->free_list, key);
+
+    }
+#endif
+
+    *p_ioqueue = ioqueue;
+
+    PJ_LOG(4, ("pjlib", "WinNT IOCP I/O Queue created (%p)", ioqueue));
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_ioqueue_destroy()
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_destroy( pj_ioqueue_t *ioqueue )
+{
+#if PJ_HAS_TCP
+    unsigned i;
+#endif
+    pj_ioqueue_key_t *key;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(ioqueue, PJ_EINVAL);
+
+    pj_lock_acquire(ioqueue->lock);
+
+#if PJ_HAS_TCP
+    /* Destroy events in the pool */
+    for (i=0; i<ioqueue->event_count; ++i) {
+	CloseHandle(ioqueue->event_pool[i]);
+    }
+    ioqueue->event_count = 0;
+#endif
+
+    if (CloseHandle(ioqueue->iocp) != TRUE)
+	return PJ_RETURN_OS_ERROR(GetLastError());
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /* Destroy reference counters */
+    key = ioqueue->active_list.next;
+    while (key != &ioqueue->active_list) {
+	pj_atomic_destroy(key->ref_count);
+	key = key->next;
+    }
+
+    key = ioqueue->closing_list.next;
+    while (key != &ioqueue->closing_list) {
+	pj_atomic_destroy(key->ref_count);
+	key = key->next;
+    }
+
+    key = ioqueue->free_list.next;
+    while (key != &ioqueue->free_list) {
+	pj_atomic_destroy(key->ref_count);
+	key = key->next;
+    }
+#endif
+
+    if (ioqueue->auto_delete_lock)
+        pj_lock_destroy(ioqueue->lock);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_ioqueue_set_lock()
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_set_lock( pj_ioqueue_t *ioqueue, 
+					 pj_lock_t *lock,
+					 pj_bool_t auto_delete )
+{
+    PJ_ASSERT_RETURN(ioqueue && lock, PJ_EINVAL);
+
+    if (ioqueue->auto_delete_lock) {
+        pj_lock_destroy(ioqueue->lock);
+    }
+
+    ioqueue->lock = lock;
+    ioqueue->auto_delete_lock = auto_delete;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_ioqueue_register_sock()
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_register_sock( pj_pool_t *pool,
+					      pj_ioqueue_t *ioqueue,
+					      pj_sock_t sock,
+					      void *user_data,
+					      const pj_ioqueue_callback *cb,
+					      pj_ioqueue_key_t **key )
+{
+    HANDLE hioq;
+    pj_ioqueue_key_t *rec;
+    u_long value;
+    int rc;
+
+    PJ_ASSERT_RETURN(pool && ioqueue && cb && key, PJ_EINVAL);
+
+    pj_lock_acquire(ioqueue->lock);
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /* If safe unregistration is used, then get the key record from
+     * the free list.
+     */
+    if (pj_list_empty(&ioqueue->free_list)) {
+	pj_lock_release(ioqueue->lock);
+	return PJ_ETOOMANY;
+    }
+
+    rec = ioqueue->free_list.next;
+    pj_list_erase(rec);
+
+    /* Set initial reference count to 1 */
+    pj_assert(pj_atomic_get(rec->ref_count) == 0);
+    pj_atomic_inc(rec->ref_count);
+
+    rec->closing = 0;
+
+#else
+    rec = pj_pool_zalloc(pool, sizeof(pj_ioqueue_key_t));
+#endif
+
+    /* Build the key for this socket. */
+    rec->ioqueue = ioqueue;
+    rec->hnd = (HANDLE)sock;
+    rec->hnd_type = HND_IS_SOCKET;
+    rec->user_data = user_data;
+    pj_memcpy(&rec->cb, cb, sizeof(pj_ioqueue_callback));
+
+#if PJ_HAS_TCP
+    rec->connecting = 0;
+#endif
+
+    /* Set socket to nonblocking. */
+    value = 1;
+    rc = ioctlsocket(sock, FIONBIO, &value);
+    if (rc != 0) {
+	pj_lock_release(ioqueue->lock);
+        return PJ_RETURN_OS_ERROR(WSAGetLastError());
+    }
+
+    /* Associate with IOCP */
+    hioq = CreateIoCompletionPort((HANDLE)sock, ioqueue->iocp, (DWORD)rec, 0);
+    if (!hioq) {
+	pj_lock_release(ioqueue->lock);
+	return PJ_RETURN_OS_ERROR(GetLastError());
+    }
+
+    *key = rec;
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    pj_list_push_back(&ioqueue->active_list, rec);
+#endif
+
+    pj_lock_release(ioqueue->lock);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * pj_ioqueue_get_user_data()
+ */
+PJ_DEF(void*) pj_ioqueue_get_user_data( pj_ioqueue_key_t *key )
+{
+    PJ_ASSERT_RETURN(key, NULL);
+    return key->user_data;
+}
+
+/*
+ * pj_ioqueue_set_user_data()
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_set_user_data( pj_ioqueue_key_t *key,
+                                              void *user_data,
+                                              void **old_data )
+{
+    PJ_ASSERT_RETURN(key, PJ_EINVAL);
+    
+    if (old_data)
+        *old_data = key->user_data;
+
+    key->user_data = user_data;
+    return PJ_SUCCESS;
+}
+
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+/* Decrement the key's reference counter, and when the counter reach zero,
+ * destroy the key.
+ */
+static void decrement_counter(pj_ioqueue_key_t *key)
+{
+    if (pj_atomic_dec_and_get(key->ref_count) == 0) {
+
+	pj_lock_acquire(key->ioqueue->lock);
+
+	pj_assert(key->closing == 1);
+	pj_gettimeofday(&key->free_time);
+	key->free_time.msec += PJ_IOQUEUE_KEY_FREE_DELAY;
+	pj_time_val_normalize(&key->free_time);
+
+	pj_list_erase(key);
+	pj_list_push_back(&key->ioqueue->closing_list, key);
+
+	pj_lock_release(key->ioqueue->lock);
+    }
+}
+#endif
+
+/*
+ * Poll the I/O Completion Port, execute callback, 
+ * and return the key and bytes transfered of the last operation.
+ */
+static pj_bool_t poll_iocp( HANDLE hIocp, DWORD dwTimeout, 
+			    pj_ssize_t *p_bytes, pj_ioqueue_key_t **p_key )
+{
+    DWORD dwBytesTransfered, dwKey;
+    generic_overlapped *pOv;
+    pj_ioqueue_key_t *key;
+    pj_ssize_t size_status = -1;
+    BOOL rcGetQueued;
+
+    /* Poll for completion status. */
+    rcGetQueued = GetQueuedCompletionStatus(hIocp, &dwBytesTransfered,
+					    &dwKey, (OVERLAPPED**)&pOv, 
+					    dwTimeout);
+
+    /* The return value is:
+     * - nonzero if event was dequeued.
+     * - zero and pOv==NULL if no event was dequeued.
+     * - zero and pOv!=NULL if event for failed I/O was dequeued.
+     */
+    if (pOv) {
+	/* Event was dequeued for either successfull or failed I/O */
+	key = (pj_ioqueue_key_t*)dwKey;
+	size_status = dwBytesTransfered;
+
+	/* Report to caller regardless */
+	if (p_bytes)
+	    *p_bytes = size_status;
+	if (p_key)
+	    *p_key = key;
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+	/* We shouldn't call callbacks if key is quitting. */
+	if (key->closing)
+	    return PJ_TRUE;
+
+	/* Increment reference counter to prevent this key from being
+	 * deleted
+	 */
+	pj_atomic_inc(key->ref_count);
+#endif
+
+	/* Carry out the callback */
+	switch (pOv->operation) {
+	case PJ_IOQUEUE_OP_READ:
+	case PJ_IOQUEUE_OP_RECV:
+	case PJ_IOQUEUE_OP_RECV_FROM:
+            pOv->operation = 0;
+            if (key->cb.on_read_complete)
+	        key->cb.on_read_complete(key, (pj_ioqueue_op_key_t*)pOv, 
+                                         size_status);
+	    break;
+	case PJ_IOQUEUE_OP_WRITE:
+	case PJ_IOQUEUE_OP_SEND:
+	case PJ_IOQUEUE_OP_SEND_TO:
+            pOv->operation = 0;
+            if (key->cb.on_write_complete)
+	        key->cb.on_write_complete(key, (pj_ioqueue_op_key_t*)pOv, 
+                                                size_status);
+	    break;
+#if PJ_HAS_TCP
+	case PJ_IOQUEUE_OP_ACCEPT:
+	    /* special case for accept. */
+	    ioqueue_on_accept_complete((ioqueue_accept_rec*)pOv);
+            if (key->cb.on_accept_complete) {
+                ioqueue_accept_rec *accept_rec = (ioqueue_accept_rec*)pOv;
+		pj_status_t status = PJ_SUCCESS;
+
+		if (accept_rec->newsock == PJ_INVALID_SOCKET) {
+		    int dwError = WSAGetLastError();
+		    if (dwError == 0) dwError = OSERR_ENOTCONN;
+		    status = PJ_RETURN_OS_ERROR(dwError);
+		}
+
+	        key->cb.on_accept_complete(key, 
+                                           (pj_ioqueue_op_key_t*)pOv, 
+                                           accept_rec->newsock,
+                                           status);
+		accept_rec->newsock = PJ_INVALID_SOCKET;
+            }
+	    break;
+	case PJ_IOQUEUE_OP_CONNECT:
+#endif
+	case PJ_IOQUEUE_OP_NONE:
+	    pj_assert(0);
+	    break;
+	}
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+	decrement_counter(key);
+#endif
+
+	return PJ_TRUE;
+    }
+
+    /* No event was queued. */
+    return PJ_FALSE;
+}
+
+/*
+ * pj_ioqueue_unregister()
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_unregister( pj_ioqueue_key_t *key )
+{
+    unsigned i;
+    enum { RETRY = 10 };
+
+    PJ_ASSERT_RETURN(key, PJ_EINVAL);
+
+#if PJ_HAS_TCP
+    if (key->connecting) {
+	unsigned pos;
+        pj_ioqueue_t *ioqueue;
+
+        ioqueue = key->ioqueue;
+
+	/* Erase from connecting_handles */
+	pj_lock_acquire(ioqueue->lock);
+	for (pos=0; pos < ioqueue->connecting_count; ++pos) {
+	    if (ioqueue->connecting_keys[pos] == key) {
+		erase_connecting_socket(ioqueue, pos);
+		break;
+	    }
+	}
+	key->connecting = 0;
+	pj_lock_release(ioqueue->lock);
+    }
+#endif
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /* Mark key as closing before closing handle. */
+    key->closing = 1;
+#endif
+    
+    /* Close handle (the only way to disassociate handle from IOCP). 
+     * We also need to close handle to make sure that no further events
+     * will come to the handle.
+     */
+    CloseHandle(key->hnd);
+
+    /* Reset callbacks */
+    key->cb.on_accept_complete = NULL;
+    key->cb.on_connect_complete = NULL;
+    key->cb.on_read_complete = NULL;
+    key->cb.on_write_complete = NULL;
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /* Even after handle is closed, I suspect that IOCP may still try to
+     * do something with the handle, causing memory corruption when pool
+     * debugging is enabled.
+     *
+     * Forcing context switch seems to have fixed that, but this is quite
+     * an ugly solution..
+     */
+    //This will loop forever if unregistration is done on the callback.
+    //Doing this with RETRY I think should solve the IOCP setting the 
+    //socket signalled, without causing the deadlock.
+    //while (pj_atomic_get(key->ref_count) != 1)
+    //	pj_thread_sleep(0);
+    for (i=0; pj_atomic_get(key->ref_count) != 1 && i<RETRY; ++i)
+	pj_thread_sleep(0);
+
+    /* Decrement reference counter to destroy the key. */
+    decrement_counter(key);
+#endif
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_ioqueue_poll()
+ *
+ * Poll for events.
+ */
+PJ_DEF(int) pj_ioqueue_poll( pj_ioqueue_t *ioqueue, const pj_time_val *timeout)
+{
+    DWORD dwMsec;
+#if PJ_HAS_TCP
+    int connect_count = 0;
+#endif
+    int event_count = 0;
+
+    PJ_ASSERT_RETURN(ioqueue, -PJ_EINVAL);
+
+    /* Calculate miliseconds timeout for GetQueuedCompletionStatus */
+    dwMsec = timeout ? timeout->sec*1000 + timeout->msec : INFINITE;
+
+    /* Poll for completion status. */
+    event_count = poll_iocp(ioqueue->iocp, dwMsec, NULL, NULL);
+
+#if PJ_HAS_TCP
+    /* Check the connecting array, only when there's no activity. */
+    if (event_count == 0) {
+	connect_count = check_connecting(ioqueue);
+	if (connect_count > 0)
+	    event_count += connect_count;
+    }
+#endif
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /* Check the closing keys only when there's no activity and when there are
+     * pending closing keys.
+     * blp:
+     *	no, always check the list. Otherwise on busy activity, this will cause
+     *  ioqueue to reject new registration.
+     */
+    if (/*event_count == 0 &&*/ !pj_list_empty(&ioqueue->closing_list)) {
+	pj_time_val now;
+	pj_ioqueue_key_t *key;
+
+	pj_gettimeofday(&now);
+	
+	/* Move closing keys to free list when they've finished the closing
+	 * idle time.
+	 */
+	pj_lock_acquire(ioqueue->lock);
+	key = ioqueue->closing_list.next;
+	while (key != &ioqueue->closing_list) {
+	    pj_ioqueue_key_t *next = key->next;
+
+	    pj_assert(key->closing != 0);
+
+	    if (PJ_TIME_VAL_GTE(now, key->free_time)) {
+		pj_list_erase(key);
+		pj_list_push_back(&ioqueue->free_list, key);
+	    }
+	    key = next;
+	}
+	pj_lock_release(ioqueue->lock);
+    }
+#endif
+
+    /* Return number of events. */
+    return event_count;
+}
+
+/*
+ * pj_ioqueue_recv()
+ *
+ * Initiate overlapped WSARecv() operation.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_recv(  pj_ioqueue_key_t *key,
+                                      pj_ioqueue_op_key_t *op_key,
+				      void *buffer,
+				      pj_ssize_t *length,
+				      pj_uint32_t flags )
+{
+    /*
+     * Ideally we should just call pj_ioqueue_recvfrom() with NULL addr and
+     * addrlen here. But unfortunately it generates EINVAL... :-(
+     *  -bennylp
+     */
+    int rc;
+    DWORD bytesRead;
+    DWORD dwFlags = 0;
+    union operation_key *op_key_rec;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(key && op_key && buffer && length, PJ_EINVAL);
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /* Check key is not closing */
+    if (key->closing)
+	return PJ_ECANCELLED;
+#endif
+
+    op_key_rec = (union operation_key*)op_key->internal__;
+    op_key_rec->overlapped.wsabuf.buf = buffer;
+    op_key_rec->overlapped.wsabuf.len = *length;
+
+    dwFlags = flags;
+    
+    /* Try non-overlapped received first to see if data is
+     * immediately available.
+     */
+    if ((flags & PJ_IOQUEUE_ALWAYS_ASYNC) == 0) {
+	rc = WSARecv((SOCKET)key->hnd, &op_key_rec->overlapped.wsabuf, 1,
+		     &bytesRead, &dwFlags, NULL, NULL);
+	if (rc == 0) {
+	    *length = bytesRead;
+	    return PJ_SUCCESS;
+	} else {
+	    DWORD dwError = WSAGetLastError();
+	    if (dwError != WSAEWOULDBLOCK) {
+		*length = -1;
+		return PJ_RETURN_OS_ERROR(dwError);
+	    }
+	}
+    }
+
+    dwFlags &= ~(PJ_IOQUEUE_ALWAYS_ASYNC);
+
+    /*
+     * No immediate data available.
+     * Register overlapped Recv() operation.
+     */
+    pj_bzero( &op_key_rec->overlapped.overlapped, 
+              sizeof(op_key_rec->overlapped.overlapped));
+    op_key_rec->overlapped.operation = PJ_IOQUEUE_OP_RECV;
+
+    rc = WSARecv((SOCKET)key->hnd, &op_key_rec->overlapped.wsabuf, 1, 
+                  &bytesRead, &dwFlags, 
+		  &op_key_rec->overlapped.overlapped, NULL);
+    if (rc == SOCKET_ERROR) {
+	DWORD dwStatus = WSAGetLastError();
+        if (dwStatus!=WSA_IO_PENDING) {
+            *length = -1;
+            return PJ_STATUS_FROM_OS(dwStatus);
+        }
+    }
+
+    /* Pending operation has been scheduled. */
+    return PJ_EPENDING;
+}
+
+/*
+ * pj_ioqueue_recvfrom()
+ *
+ * Initiate overlapped RecvFrom() operation.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_recvfrom( pj_ioqueue_key_t *key,
+                                         pj_ioqueue_op_key_t *op_key,
+					 void *buffer,
+					 pj_ssize_t *length,
+                                         pj_uint32_t flags,
+					 pj_sockaddr_t *addr,
+					 int *addrlen)
+{
+    int rc;
+    DWORD bytesRead;
+    DWORD dwFlags = 0;
+    union operation_key *op_key_rec;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(key && op_key && buffer, PJ_EINVAL);
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /* Check key is not closing */
+    if (key->closing)
+	return PJ_ECANCELLED;
+#endif
+
+    op_key_rec = (union operation_key*)op_key->internal__;
+    op_key_rec->overlapped.wsabuf.buf = buffer;
+    op_key_rec->overlapped.wsabuf.len = *length;
+
+    dwFlags = flags;
+    
+    /* Try non-overlapped received first to see if data is
+     * immediately available.
+     */
+    if ((flags & PJ_IOQUEUE_ALWAYS_ASYNC) == 0) {
+	rc = WSARecvFrom((SOCKET)key->hnd, &op_key_rec->overlapped.wsabuf, 1,
+			 &bytesRead, &dwFlags, addr, addrlen, NULL, NULL);
+	if (rc == 0) {
+	    *length = bytesRead;
+	    return PJ_SUCCESS;
+	} else {
+	    DWORD dwError = WSAGetLastError();
+	    if (dwError != WSAEWOULDBLOCK) {
+		*length = -1;
+		return PJ_RETURN_OS_ERROR(dwError);
+	    }
+	}
+    }
+
+    dwFlags &= ~(PJ_IOQUEUE_ALWAYS_ASYNC);
+
+    /*
+     * No immediate data available.
+     * Register overlapped Recv() operation.
+     */
+    pj_bzero( &op_key_rec->overlapped.overlapped, 
+              sizeof(op_key_rec->overlapped.overlapped));
+    op_key_rec->overlapped.operation = PJ_IOQUEUE_OP_RECV;
+
+    rc = WSARecvFrom((SOCKET)key->hnd, &op_key_rec->overlapped.wsabuf, 1, 
+                     &bytesRead, &dwFlags, addr, addrlen,
+		     &op_key_rec->overlapped.overlapped, NULL);
+    if (rc == SOCKET_ERROR) {
+	DWORD dwStatus = WSAGetLastError();
+        if (dwStatus!=WSA_IO_PENDING) {
+            *length = -1;
+            return PJ_STATUS_FROM_OS(dwStatus);
+        }
+    } 
+    
+    /* Pending operation has been scheduled. */
+    return PJ_EPENDING;
+}
+
+/*
+ * pj_ioqueue_send()
+ *
+ * Initiate overlapped Send operation.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_send(  pj_ioqueue_key_t *key,
+                                      pj_ioqueue_op_key_t *op_key,
+				      const void *data,
+				      pj_ssize_t *length,
+				      pj_uint32_t flags )
+{
+    return pj_ioqueue_sendto(key, op_key, data, length, flags, NULL, 0);
+}
+
+
+/*
+ * pj_ioqueue_sendto()
+ *
+ * Initiate overlapped SendTo operation.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_sendto( pj_ioqueue_key_t *key,
+                                       pj_ioqueue_op_key_t *op_key,
+				       const void *data,
+				       pj_ssize_t *length,
+                                       pj_uint32_t flags,
+				       const pj_sockaddr_t *addr,
+				       int addrlen)
+{
+    int rc;
+    DWORD bytesWritten;
+    DWORD dwFlags;
+    union operation_key *op_key_rec;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(key && op_key && data, PJ_EINVAL);
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /* Check key is not closing */
+    if (key->closing)
+	return PJ_ECANCELLED;
+#endif
+
+    op_key_rec = (union operation_key*)op_key->internal__;
+
+    /*
+     * First try blocking write.
+     */
+    op_key_rec->overlapped.wsabuf.buf = (void*)data;
+    op_key_rec->overlapped.wsabuf.len = *length;
+
+    dwFlags = flags;
+
+    if ((flags & PJ_IOQUEUE_ALWAYS_ASYNC) == 0) {
+	rc = WSASendTo((SOCKET)key->hnd, &op_key_rec->overlapped.wsabuf, 1,
+		       &bytesWritten, dwFlags, addr, addrlen,
+		       NULL, NULL);
+	if (rc == 0) {
+	    *length = bytesWritten;
+	    return PJ_SUCCESS;
+	} else {
+	    DWORD dwStatus = WSAGetLastError();
+	    if (dwStatus != WSAEWOULDBLOCK) {
+		*length = -1;
+		return PJ_RETURN_OS_ERROR(dwStatus);
+	    }
+	}
+    }
+
+    dwFlags &= ~(PJ_IOQUEUE_ALWAYS_ASYNC);
+
+    /*
+     * Data can't be sent immediately.
+     * Schedule asynchronous WSASend().
+     */
+    pj_bzero( &op_key_rec->overlapped.overlapped, 
+              sizeof(op_key_rec->overlapped.overlapped));
+    op_key_rec->overlapped.operation = PJ_IOQUEUE_OP_SEND;
+
+    rc = WSASendTo((SOCKET)key->hnd, &op_key_rec->overlapped.wsabuf, 1,
+                   &bytesWritten,  dwFlags, addr, addrlen,
+		   &op_key_rec->overlapped.overlapped, NULL);
+    if (rc == SOCKET_ERROR) {
+	DWORD dwStatus = WSAGetLastError();
+        if (dwStatus!=WSA_IO_PENDING)
+            return PJ_STATUS_FROM_OS(dwStatus);
+    }
+
+    /* Asynchronous operation successfully submitted. */
+    return PJ_EPENDING;
+}
+
+#if PJ_HAS_TCP
+
+/*
+ * pj_ioqueue_accept()
+ *
+ * Initiate overlapped accept() operation.
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_accept( pj_ioqueue_key_t *key,
+                                       pj_ioqueue_op_key_t *op_key,
+			               pj_sock_t *new_sock,
+			               pj_sockaddr_t *local,
+			               pj_sockaddr_t *remote,
+			               int *addrlen)
+{
+    BOOL rc;
+    DWORD bytesReceived;
+    pj_status_t status;
+    union operation_key *op_key_rec;
+    SOCKET sock;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(key && op_key && new_sock, PJ_EINVAL);
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /* Check key is not closing */
+    if (key->closing)
+	return PJ_ECANCELLED;
+#endif
+
+    /*
+     * See if there is a new connection immediately available.
+     */
+    sock = WSAAccept((SOCKET)key->hnd, remote, addrlen, NULL, 0);
+    if (sock != INVALID_SOCKET) {
+        /* Yes! New socket is available! */
+        int status;
+
+        status = getsockname(sock, local, addrlen);
+        if (status != 0) {
+            DWORD dwError = WSAGetLastError();
+            closesocket(sock);
+            return PJ_RETURN_OS_ERROR(dwError);
+        }
+
+        *new_sock = sock;
+        return PJ_SUCCESS;
+
+    } else {
+        DWORD dwError = WSAGetLastError();
+        if (dwError != WSAEWOULDBLOCK) {
+            return PJ_RETURN_OS_ERROR(dwError);
+        }
+    }
+
+    /*
+     * No connection is immediately available.
+     * Must schedule an asynchronous operation.
+     */
+    op_key_rec = (union operation_key*)op_key->internal__;
+    
+    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, 
+                            &op_key_rec->accept.newsock);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* On WinXP or later, use SO_UPDATE_ACCEPT_CONTEXT so that socket 
+     * addresses can be obtained with getsockname() and getpeername().
+     */
+    status = setsockopt(op_key_rec->accept.newsock, SOL_SOCKET,
+                        SO_UPDATE_ACCEPT_CONTEXT, 
+                        (char*)&key->hnd, sizeof(SOCKET));
+    /* SO_UPDATE_ACCEPT_CONTEXT is for WinXP or later.
+     * So ignore the error status.
+     */
+
+    op_key_rec->accept.operation = PJ_IOQUEUE_OP_ACCEPT;
+    op_key_rec->accept.addrlen = addrlen;
+    op_key_rec->accept.local = local;
+    op_key_rec->accept.remote = remote;
+    op_key_rec->accept.newsock_ptr = new_sock;
+    pj_bzero( &op_key_rec->accept.overlapped, 
+	      sizeof(op_key_rec->accept.overlapped));
+
+    rc = AcceptEx( (SOCKET)key->hnd, (SOCKET)op_key_rec->accept.newsock,
+		   op_key_rec->accept.accept_buf,
+		   0, ACCEPT_ADDR_LEN, ACCEPT_ADDR_LEN,
+		   &bytesReceived,
+		   &op_key_rec->accept.overlapped );
+
+    if (rc == TRUE) {
+	ioqueue_on_accept_complete(&op_key_rec->accept);
+	return PJ_SUCCESS;
+    } else {
+	DWORD dwStatus = WSAGetLastError();
+	if (dwStatus!=WSA_IO_PENDING)
+            return PJ_STATUS_FROM_OS(dwStatus);
+    }
+
+    /* Asynchronous Accept() has been submitted. */
+    return PJ_EPENDING;
+}
+
+
+/*
+ * pj_ioqueue_connect()
+ *
+ * Initiate overlapped connect() operation (well, it's non-blocking actually,
+ * since there's no overlapped version of connect()).
+ */
+PJ_DEF(pj_status_t) pj_ioqueue_connect( pj_ioqueue_key_t *key,
+					const pj_sockaddr_t *addr,
+					int addrlen )
+{
+    HANDLE hEvent;
+    pj_ioqueue_t *ioqueue;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(key && addr && addrlen, PJ_EINVAL);
+
+#if PJ_IOQUEUE_HAS_SAFE_UNREG
+    /* Check key is not closing */
+    if (key->closing)
+	return PJ_ECANCELLED;
+#endif
+
+    /* Initiate connect() */
+    if (connect((pj_sock_t)key->hnd, addr, addrlen) != 0) {
+	DWORD dwStatus;
+	dwStatus = WSAGetLastError();
+        if (dwStatus != WSAEWOULDBLOCK) {
+	    return PJ_RETURN_OS_ERROR(dwStatus);
+	}
+    } else {
+	/* Connect has completed immediately! */
+	return PJ_SUCCESS;
+    }
+
+    ioqueue = key->ioqueue;
+
+    /* Add to the array of connecting socket to be polled */
+    pj_lock_acquire(ioqueue->lock);
+
+    if (ioqueue->connecting_count >= MAXIMUM_WAIT_OBJECTS) {
+	pj_lock_release(ioqueue->lock);
+	return PJ_ETOOMANYCONN;
+    }
+
+    /* Get or create event object. */
+    if (ioqueue->event_count) {
+	hEvent = ioqueue->event_pool[ioqueue->event_count - 1];
+	--ioqueue->event_count;
+    } else {
+	hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+	if (hEvent == NULL) {
+	    DWORD dwStatus = GetLastError();
+	    pj_lock_release(ioqueue->lock);
+	    return PJ_STATUS_FROM_OS(dwStatus);
+	}
+    }
+
+    /* Mark key as connecting.
+     * We can't use array index since key can be removed dynamically. 
+     */
+    key->connecting = 1;
+
+    /* Associate socket events to the event object. */
+    if (WSAEventSelect((pj_sock_t)key->hnd, hEvent, FD_CONNECT) != 0) {
+	CloseHandle(hEvent);
+	pj_lock_release(ioqueue->lock);
+	return PJ_RETURN_OS_ERROR(WSAGetLastError());
+    }
+
+    /* Add to array. */
+    ioqueue->connecting_keys[ ioqueue->connecting_count ] = key;
+    ioqueue->connecting_handles[ ioqueue->connecting_count ] = hEvent;
+    ioqueue->connecting_count++;
+
+    pj_lock_release(ioqueue->lock);
+
+    return PJ_EPENDING;
+}
+#endif	/* #if PJ_HAS_TCP */
+
+
+PJ_DEF(void) pj_ioqueue_op_key_init( pj_ioqueue_op_key_t *op_key,
+				     pj_size_t size )
+{
+    pj_bzero(op_key, size);
+}
+
+PJ_DEF(pj_bool_t) pj_ioqueue_is_pending( pj_ioqueue_key_t *key,
+                                         pj_ioqueue_op_key_t *op_key )
+{
+    BOOL rc;
+    DWORD bytesTransfered;
+
+    rc = GetOverlappedResult( key->hnd, (LPOVERLAPPED)op_key,
+                              &bytesTransfered, FALSE );
+
+    if (rc == FALSE) {
+        return GetLastError()==ERROR_IO_INCOMPLETE;
+    }
+
+    return FALSE;
+}
+
+
+PJ_DEF(pj_status_t) pj_ioqueue_post_completion( pj_ioqueue_key_t *key,
+                                                pj_ioqueue_op_key_t *op_key,
+                                                pj_ssize_t bytes_status )
+{
+    BOOL rc;
+
+    rc = PostQueuedCompletionStatus(key->ioqueue->iocp, bytes_status,
+                                    (long)key, (OVERLAPPED*)op_key );
+    if (rc == FALSE) {
+        return PJ_RETURN_OS_ERROR(GetLastError());
+    }
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/ip_helper_generic.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/ip_helper_generic.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/ip_helper_generic.c	(revision 1163)
@@ -0,0 +1,69 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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>
+
+/*
+ * Enumerate the local IP interface currently active in the host.
+ */
+PJ_DEF(pj_status_t) pj_enum_ip_interface(unsigned *p_cnt,
+					 pj_in_addr 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_gethostip(&ifs[0]);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    *p_cnt = 1;
+    return PJ_SUCCESS;
+}
+
+/*
+ * 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_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_gethostip(&routes[0].ipv4.if_addr);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    routes[0].ipv4.dst_addr.s_addr = 0;
+    routes[0].ipv4.mask.s_addr = 0;
+    *p_cnt = 1;
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/ip_helper_win32.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/ip_helper_win32.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/ip_helper_win32.c	(revision 1163)
@@ -0,0 +1,142 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/config.h>
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+/* PMIB_ICMP_EX is not declared in VC6, causing error.
+ * But EVC4, which also claims to be VC6, does have it! 
+ */
+#if defined(_MSC_VER) && _MSC_VER==1200 && !defined(PJ_WIN32_WINCE)
+#   define PMIB_ICMP_EX void*
+#endif
+#include <Iphlpapi.h>
+
+#include <pj/ip_helper.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+#include <pj/string.h>
+
+
+/*
+ * Enumerate the local IP interface currently active in the host.
+ */
+PJ_DEF(pj_status_t) pj_enum_ip_interface(unsigned *p_cnt,
+					 pj_in_addr ifs[])
+{
+    /* Provide enough buffer or otherwise it will fail with 
+     * error 22 ("Not Enough Buffer") error.
+     */
+    char ipTabBuff[1024];
+    MIB_IPADDRTABLE *pTab;
+    ULONG tabSize;
+    unsigned i, count;
+    DWORD rc;
+
+    PJ_ASSERT_RETURN(p_cnt && ifs, PJ_EINVAL);
+
+    pTab = (MIB_IPADDRTABLE*)ipTabBuff;
+
+    /* Get IP address table */
+    tabSize = sizeof(ipTabBuff);
+    rc = GetIpAddrTable(pTab, &tabSize, FALSE);
+    if (rc != NO_ERROR)
+	return PJ_RETURN_OS_ERROR(rc);
+
+    /* Reset result */
+    pj_bzero(ifs, sizeof(ifs[0]) * (*p_cnt));
+
+    /* Now fill out the entries */
+    count = (pTab->dwNumEntries < *p_cnt) ? pTab->dwNumEntries : *p_cnt;
+    *p_cnt = 0;
+    for (i=0; i<count; ++i) {
+	/* Some Windows returns 0.0.0.0! */
+	if (pTab->table[i].dwAddr == 0)
+	    continue;
+	ifs[*p_cnt].s_addr = pTab->table[i].dwAddr;
+	(*p_cnt)++;
+    }
+
+    return PJ_SUCCESS;
+
+}
+
+
+/*
+ * 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[])
+{
+    char ipTabBuff[1024];
+    MIB_IPADDRTABLE *pIpTab;
+    char rtabBuff[1024];
+    MIB_IPFORWARDTABLE *prTab;
+    ULONG tabSize;
+    unsigned i, count;
+    DWORD rc;
+
+    PJ_ASSERT_RETURN(p_cnt && routes, PJ_EINVAL);
+
+    pIpTab = (MIB_IPADDRTABLE *)ipTabBuff;
+    prTab = (MIB_IPFORWARDTABLE *)rtabBuff;
+
+    /* First get IP address table */
+    tabSize = sizeof(ipTabBuff);
+    rc = GetIpAddrTable(pIpTab, &tabSize, FALSE);
+    if (rc != NO_ERROR)
+	return PJ_RETURN_OS_ERROR(rc);
+
+    /* Next get IP route table */
+    tabSize = sizeof(rtabBuff);
+    rc = GetIpForwardTable(prTab, &tabSize, 1);
+    if (rc != NO_ERROR)
+	return PJ_RETURN_OS_ERROR(rc);
+
+    /* Reset routes */
+    pj_bzero(routes, sizeof(routes[0]) * (*p_cnt));
+
+    /* Now fill out the route entries */
+    count = (prTab->dwNumEntries < *p_cnt) ? prTab->dwNumEntries : *p_cnt;
+    *p_cnt = 0;
+    for (i=0; i<count; ++i) {
+	unsigned j;
+
+	/* Find interface entry */
+	for (j=0; j<pIpTab->dwNumEntries; ++j) {
+	    if (pIpTab->table[j].dwIndex == prTab->table[i].dwForwardIfIndex)
+		break;
+	}
+
+	if (j==pIpTab->dwNumEntries)
+	    continue;	/* Interface not found */
+
+	routes[*p_cnt].ipv4.if_addr.s_addr = pIpTab->table[j].dwAddr;
+	routes[*p_cnt].ipv4.dst_addr.s_addr = prTab->table[i].dwForwardDest;
+	routes[*p_cnt].ipv4.mask.s_addr = prTab->table[i].dwForwardMask;
+
+	(*p_cnt)++;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/list.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/list.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/list.c	(revision 1163)
@@ -0,0 +1,25 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/list.h>
+
+#if !PJ_FUNCTIONS_ARE_INLINED
+#  include <pj/list_i.h>
+#endif
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/lock.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/lock.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/lock.c	(revision 1163)
@@ -0,0 +1,197 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/lock.h>
+#include <pj/os.h>
+#include <pj/assert.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/errno.h>
+
+
+typedef void LOCK_OBJ;
+
+/*
+ * Lock structure.
+ */
+struct pj_lock_t
+{
+    LOCK_OBJ *lock_object;
+
+    pj_status_t	(*acquire)	(LOCK_OBJ*);
+    pj_status_t	(*tryacquire)	(LOCK_OBJ*);
+    pj_status_t	(*release)	(LOCK_OBJ*);
+    pj_status_t	(*destroy)	(LOCK_OBJ*);
+};
+
+typedef pj_status_t (*FPTR)(LOCK_OBJ*);
+
+/******************************************************************************
+ * Implementation of lock object with mutex.
+ */
+static pj_lock_t mutex_lock_template = 
+{
+    NULL,
+    (FPTR) &pj_mutex_lock,
+    (FPTR) &pj_mutex_trylock,
+    (FPTR) &pj_mutex_unlock,
+    (FPTR) &pj_mutex_destroy
+};
+
+static pj_status_t create_mutex_lock( pj_pool_t *pool,
+				      const char *name,
+				      int type,
+				      pj_lock_t **lock )
+{
+    pj_lock_t *p_lock;
+    pj_mutex_t *mutex;
+    pj_status_t rc;
+
+    PJ_ASSERT_RETURN(pool && lock, PJ_EINVAL);
+
+    p_lock = pj_pool_alloc(pool, sizeof(pj_lock_t));
+    if (!p_lock)
+	return PJ_ENOMEM;
+
+    pj_memcpy(p_lock, &mutex_lock_template, sizeof(pj_lock_t));
+    rc = pj_mutex_create(pool, name, type, &mutex);
+    if (rc != PJ_SUCCESS)
+	return rc;
+
+    p_lock->lock_object = mutex;
+    *lock = p_lock;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pj_lock_create_simple_mutex( pj_pool_t *pool,
+						 const char *name,
+						 pj_lock_t **lock )
+{
+    return create_mutex_lock(pool, name, PJ_MUTEX_SIMPLE, lock);
+}
+
+PJ_DEF(pj_status_t) pj_lock_create_recursive_mutex( pj_pool_t *pool,
+						    const char *name,
+						    pj_lock_t **lock )
+{
+    return create_mutex_lock(pool, name, PJ_MUTEX_RECURSE, lock);
+}
+
+
+/******************************************************************************
+ * Implementation of NULL lock object.
+ */
+static pj_status_t null_op(void *arg)
+{
+    PJ_UNUSED_ARG(arg);
+    return PJ_SUCCESS;
+}
+
+static pj_lock_t null_lock_template = 
+{
+    NULL,
+    &null_op,
+    &null_op,
+    &null_op,
+    &null_op
+};
+
+PJ_DEF(pj_status_t) pj_lock_create_null_mutex( pj_pool_t *pool,
+					       const char *name,
+					       pj_lock_t **lock )
+{
+    PJ_UNUSED_ARG(name);
+    PJ_UNUSED_ARG(pool);
+
+    PJ_ASSERT_RETURN(lock, PJ_EINVAL);
+
+    *lock = &null_lock_template;
+    return PJ_SUCCESS;
+}
+
+
+/******************************************************************************
+ * Implementation of semaphore lock object.
+ */
+#if defined(PJ_HAS_SEMAPHORE) && PJ_HAS_SEMAPHORE != 0
+
+static pj_lock_t sem_lock_template = 
+{
+    NULL,
+    (FPTR) &pj_sem_wait,
+    (FPTR) &pj_sem_trywait,
+    (FPTR) &pj_sem_post,
+    (FPTR) &pj_sem_destroy
+};
+
+PJ_DEF(pj_status_t) pj_lock_create_semaphore(  pj_pool_t *pool,
+					       const char *name,
+					       unsigned initial,
+					       unsigned max,
+					       pj_lock_t **lock )
+{
+    pj_lock_t *p_lock;
+    pj_sem_t *sem;
+    pj_status_t rc;
+
+    PJ_ASSERT_RETURN(pool && lock, PJ_EINVAL);
+
+    p_lock = pj_pool_alloc(pool, sizeof(pj_lock_t));
+    if (!p_lock)
+	return PJ_ENOMEM;
+
+    pj_memcpy(p_lock, &sem_lock_template, sizeof(pj_lock_t));
+    rc = pj_sem_create( pool, name, initial, max, &sem);
+    if (rc != PJ_SUCCESS)
+        return rc;
+
+    p_lock->lock_object = sem;
+    *lock = p_lock;
+
+    return PJ_SUCCESS;
+}
+
+
+#endif	/* PJ_HAS_SEMAPHORE */
+
+
+PJ_DEF(pj_status_t) pj_lock_acquire( pj_lock_t *lock )
+{
+    PJ_ASSERT_RETURN(lock != NULL, PJ_EINVAL);
+    return (*lock->acquire)(lock->lock_object);
+}
+
+PJ_DEF(pj_status_t) pj_lock_tryacquire( pj_lock_t *lock )
+{
+    PJ_ASSERT_RETURN(lock != NULL, PJ_EINVAL);
+    return (*lock->tryacquire)(lock->lock_object);
+}
+
+PJ_DEF(pj_status_t) pj_lock_release( pj_lock_t *lock )
+{
+    PJ_ASSERT_RETURN(lock != NULL, PJ_EINVAL);
+    return (*lock->release)(lock->lock_object);
+}
+
+PJ_DEF(pj_status_t) pj_lock_destroy( pj_lock_t *lock )
+{
+    PJ_ASSERT_RETURN(lock != NULL, PJ_EINVAL);
+    return (*lock->destroy)(lock->lock_object);
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/log.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/log.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/log.c	(revision 1163)
@@ -0,0 +1,238 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/types.h>
+#include <pj/log.h>
+#include <pj/string.h>
+#include <pj/os.h>
+#include <pj/compat/stdarg.h>
+
+#if PJ_LOG_MAX_LEVEL >= 1
+
+PJ_DEF(int) pj_log_max_level = PJ_LOG_MAX_LEVEL;
+static pj_log_func *log_writer = &pj_log_write;
+static unsigned log_decor = PJ_LOG_HAS_TIME | PJ_LOG_HAS_MICRO_SEC |
+			    PJ_LOG_HAS_SENDER | PJ_LOG_HAS_NEWLINE;
+
+#if PJ_LOG_USE_STACK_BUFFER==0
+static char log_buffer[PJ_LOG_MAX_SIZE];
+#endif
+
+PJ_DEF(void) pj_log_set_decor(unsigned decor)
+{
+    log_decor = decor;
+}
+
+PJ_DEF(unsigned) pj_log_get_decor(void)
+{
+    return log_decor;
+}
+
+PJ_DEF(void) pj_log_set_level(int level)
+{
+    pj_log_max_level = level;
+}
+
+#if 0
+PJ_DEF(int) pj_log_get_level(void)
+{
+    return pj_log_max_level;
+}
+#endif
+
+PJ_DEF(void) pj_log_set_log_func( pj_log_func *func )
+{
+    log_writer = func;
+}
+
+PJ_DEF(pj_log_func*) pj_log_get_log_func(void)
+{
+    return log_writer;
+}
+
+PJ_DEF(void) pj_log( const char *sender, int level, 
+		     const char *format, va_list marker)
+{
+    pj_time_val now;
+    pj_parsed_time ptime;
+    char *pre;
+#if PJ_LOG_USE_STACK_BUFFER
+    char log_buffer[PJ_LOG_MAX_SIZE];
+#endif
+    int len, print_len;
+
+    PJ_CHECK_STACK();
+
+    if (level > pj_log_max_level)
+	return;
+
+    /* Get current date/time. */
+    pj_gettimeofday(&now);
+    pj_time_decode(&now, &ptime);
+
+    pre = log_buffer;
+    if (log_decor & PJ_LOG_HAS_DAY_NAME) {
+	static const char *wdays[] = { "Sun", "Mon", "Tue", "Wed",
+				       "Thu", "Fri", "Sat"};
+	pj_ansi_strcpy(pre, wdays[ptime.wday]);
+	pre += 3;
+    }
+    if (log_decor & PJ_LOG_HAS_YEAR) {
+	*pre++ = ' ';
+	pre += pj_utoa(ptime.year, pre);
+    }
+    if (log_decor & PJ_LOG_HAS_MONTH) {
+	*pre++ = '-';
+	pre += pj_utoa_pad(ptime.mon, pre, 2, '0');
+    }
+    if (log_decor & PJ_LOG_HAS_DAY_OF_MON) {
+	*pre++ = ' ';
+	pre += pj_utoa_pad(ptime.day, pre, 2, '0');
+    }
+    if (log_decor & PJ_LOG_HAS_TIME) {
+	*pre++ = ' ';
+	pre += pj_utoa_pad(ptime.hour, pre, 2, '0');
+	*pre++ = ':';
+	pre += pj_utoa_pad(ptime.min, pre, 2, '0');
+	*pre++ = ':';
+	pre += pj_utoa_pad(ptime.sec, pre, 2, '0');
+    }
+    if (log_decor & PJ_LOG_HAS_MICRO_SEC) {
+	*pre++ = '.';
+	pre += pj_utoa_pad(ptime.msec, pre, 3, '0');
+    }
+    if (log_decor & PJ_LOG_HAS_SENDER) {
+	enum { SENDER_WIDTH = 14 };
+	int sender_len = strlen(sender);
+	*pre++ = ' ';
+	if (sender_len <= SENDER_WIDTH) {
+	    while (sender_len < SENDER_WIDTH)
+		*pre++ = ' ', ++sender_len;
+	    while (*sender)
+		*pre++ = *sender++;
+	} else {
+	    int i;
+	    for (i=0; i<SENDER_WIDTH; ++i)
+		*pre++ = *sender++;
+	}
+    }
+
+    if (log_decor != 0 && log_decor != PJ_LOG_HAS_NEWLINE)
+	*pre++ = ' ';
+
+    len = pre - log_buffer;
+
+    /* Print the whole message to the string log_buffer. */
+    print_len = pj_ansi_vsnprintf(pre, sizeof(log_buffer)-len, format, 
+				  marker);
+    if (print_len < 0) {
+	level = 1;
+	print_len = pj_ansi_snprintf(pre, sizeof(log_buffer)-len, 
+				     "<logging error: msg too long>");
+    }
+    len = len + print_len;
+    if (len > 0 && len < sizeof(log_buffer)-2) {
+	if (log_decor & PJ_LOG_HAS_CR) {
+	    log_buffer[len++] = '\r';
+	}
+	if (log_decor & PJ_LOG_HAS_NEWLINE) {
+	    log_buffer[len++] = '\n';
+	}
+	log_buffer[len] = '\0';
+    } else {
+	len = sizeof(log_buffer)-1;
+	if (log_decor & PJ_LOG_HAS_CR) {
+	    log_buffer[sizeof(log_buffer)-3] = '\r';
+	}
+	if (log_decor & PJ_LOG_HAS_NEWLINE) {
+	    log_buffer[sizeof(log_buffer)-2] = '\n';
+	}
+	log_buffer[sizeof(log_buffer)-1] = '\0';
+    }
+
+    if (log_writer)
+	(*log_writer)(level, log_buffer, len);
+}
+
+PJ_DEF(void) pj_log_0(const char *obj, const char *format, ...)
+{
+    va_list arg;
+    va_start(arg, format);
+    pj_log(obj, 0, format, arg);
+    va_end(arg);
+}
+
+PJ_DEF(void) pj_log_1(const char *obj, const char *format, ...)
+{
+    va_list arg;
+    va_start(arg, format);
+    pj_log(obj, 1, format, arg);
+    va_end(arg);
+}
+#endif	/* PJ_LOG_MAX_LEVEL >= 1 */
+
+#if PJ_LOG_MAX_LEVEL >= 2
+PJ_DEF(void) pj_log_2(const char *obj, const char *format, ...)
+{
+    va_list arg;
+    va_start(arg, format);
+    pj_log(obj, 2, format, arg);
+    va_end(arg);
+}
+#endif
+
+#if PJ_LOG_MAX_LEVEL >= 3
+PJ_DEF(void) pj_log_3(const char *obj, const char *format, ...)
+{
+    va_list arg;
+    va_start(arg, format);
+    pj_log(obj, 3, format, arg);
+    va_end(arg);
+}
+#endif
+
+#if PJ_LOG_MAX_LEVEL >= 4
+PJ_DEF(void) pj_log_4(const char *obj, const char *format, ...)
+{
+    va_list arg;
+    va_start(arg, format);
+    pj_log(obj, 4, format, arg);
+    va_end(arg);
+}
+#endif
+
+#if PJ_LOG_MAX_LEVEL >= 5
+PJ_DEF(void) pj_log_5(const char *obj, const char *format, ...)
+{
+    va_list arg;
+    va_start(arg, format);
+    pj_log(obj, 5, format, arg);
+    va_end(arg);
+}
+#endif
+
+#if PJ_LOG_MAX_LEVEL >= 6
+PJ_DEF(void) pj_log_6(const char *obj, const char *format, ...)
+{
+    va_list arg;
+    va_start(arg, format);
+    pj_log(obj, 6, format, arg);
+    va_end(arg);
+}
+#endif
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/log_writer_printk.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/log_writer_printk.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/log_writer_printk.c	(revision 1163)
@@ -0,0 +1,27 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/log.h>
+#include <pj/os.h>
+
+PJ_DEF(void) pj_log_write(int level, const char *buffer, int len)
+{
+    PJ_CHECK_STACK();
+    printk(KERN_INFO "%s", buffer);
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/log_writer_stdout.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/log_writer_stdout.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/log_writer_stdout.c	(revision 1163)
@@ -0,0 +1,68 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/log.h>
+#include <pj/os.h>
+#include <pj/compat/stdfileio.h>
+
+#define CLR_FATAL    (PJ_TERM_COLOR_BRIGHT | PJ_TERM_COLOR_R)
+#define CLR_WARNING  (PJ_TERM_COLOR_BRIGHT | PJ_TERM_COLOR_R | PJ_TERM_COLOR_G)
+#define CLR_INFO     (PJ_TERM_COLOR_BRIGHT | PJ_TERM_COLOR_R | PJ_TERM_COLOR_G | \
+		      PJ_TERM_COLOR_B)
+#define CLR_DEFAULT  (PJ_TERM_COLOR_R | PJ_TERM_COLOR_G | PJ_TERM_COLOR_B)
+
+static void term_set_color(int level)
+{
+#if defined(PJ_TERM_HAS_COLOR) && PJ_TERM_HAS_COLOR != 0
+    unsigned attr = 0;
+    switch (level) {
+    case 0:
+    case 1: attr = CLR_FATAL; 
+	break;
+    case 2: attr = CLR_WARNING; 
+	break;
+    case 3: attr = CLR_INFO; 
+	break;
+    default:
+	attr = CLR_DEFAULT;
+	break;
+    }
+
+    pj_term_set_color(attr);
+#endif
+}
+
+static void term_restore_color(void)
+{
+#if defined(PJ_TERM_HAS_COLOR) && PJ_TERM_HAS_COLOR != 0
+    pj_term_set_color(CLR_DEFAULT);
+#endif
+}
+
+
+PJ_DEF(void) pj_log_write(int level, const char *buffer, int len)
+{
+    PJ_CHECK_STACK();
+    PJ_UNUSED_ARG(len);
+
+    /* Copy to terminal/file. */
+    term_set_color(level);
+    printf("%s", buffer);
+    term_restore_color();
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_core_linux_kernel.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_core_linux_kernel.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_core_linux_kernel.c	(revision 1163)
@@ -0,0 +1,697 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/assert.h>
+#include <pj/pool.h>
+#include <pj/log.h>
+#include <pj/except.h>
+#include <pj/errno.h>
+#include <pj/string.h>
+#include <pj/compat/high_precision.h>
+#include <pj/compat/sprintf.h>
+
+#include <linux/config.h>
+#include <linux/version.h>
+#if defined(MODVERSIONS)
+#include <linux/modversions.h>
+#endif
+#include <linux/kernel.h>
+#include <linux/sched.h>
+//#include <linux/tqueue.h>
+#include <linux/wait.h>
+#include <linux/signal.h>
+
+#include <asm/atomic.h>
+#include <asm/unistd.h>
+#include <asm/semaphore.h>
+
+#define THIS_FILE   "oslinuxkern"
+
+struct pj_thread_t
+{
+    /** Thread's name. */
+    char obj_name[PJ_MAX_OBJ_NAME];
+
+    /** Linux task structure for thread. */
+    struct task_struct *thread;	
+
+    /** Flags (specified in pj_thread_create) */
+    unsigned flags;
+
+    /** Task queue needed to launch thread. */
+    //struct tq_struct	tq;	
+
+    /** Semaphore needed to control thread startup. */
+    struct semaphore	startstop_sem;
+
+    /** Semaphore to suspend thread during startup. */
+    struct semaphore	suspend_sem;
+
+    /** Queue thread is waiting on. Gets initialized by
+        thread_initialize, can be used by thread itself.
+     */
+    wait_queue_head_t	queue;
+
+    /** Flag to tell thread whether to die or not.
+        When the thread receives a signal, it must check
+        the value of terminate and call thread_deinitialize and terminate
+        if set.
+     */
+    int terminate;    
+
+    /** Thread's entry. */
+    pj_thread_proc *func;
+
+    /** Argument. */
+    void *arg;
+};
+
+struct pj_atomic_t
+{
+    atomic_t atom;
+};
+
+struct pj_mutex_t
+{
+    struct semaphore sem;
+    pj_bool_t	     recursive;
+    pj_thread_t	    *owner;
+    int		     own_count;
+};
+
+struct pj_sem_t
+{
+    struct semaphore sem;
+};
+
+/*
+ * Static global variables.
+ */
+#define MAX_TLS_ID  32
+static void *tls_values[MAX_TLS_ID];
+static int tls_id;
+static long thread_tls_id;
+static spinlock_t critical_section = SPIN_LOCK_UNLOCKED;
+static unsigned long spinlock_flags;
+static pj_thread_t main_thread;
+
+/* private functions */
+//#define TRACE_(expr)	PJ_LOG(3,expr)
+#define TRACE_(x)
+
+
+/* This must be called in the context of the new thread. */
+static void thread_initialize( pj_thread_t *thread )
+{
+    TRACE_((THIS_FILE, "---new thread initializing..."));
+
+    /* Set TLS */
+    pj_thread_local_set(thread_tls_id, thread);
+
+    /* fill in thread structure */
+    thread->thread = current;
+    pj_assert(thread->thread != NULL);
+
+    /* set signal mask to what we want to respond */
+    siginitsetinv(&current->blocked, 
+		  sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGTERM));
+
+    /* initialise wait queue */
+    init_waitqueue_head(&thread->queue);
+
+    /* initialise termination flag */
+    thread->terminate = 0;
+
+    /* set name of this process (making sure obj_name is null 
+     * terminated first) 
+     */
+    thread->obj_name[PJ_MAX_OBJ_NAME-1] = '\0';
+    sprintf(current->comm, thread->obj_name);
+        
+    /* tell the creator that we are ready and let him continue */
+    up(&thread->startstop_sem);	
+}
+
+/* cleanup of thread. Called by the exiting thread. */
+static void thread_deinitialize(pj_thread_t *thread)
+{
+    /* we are terminating */
+
+    /* lock the kernel, the exit will unlock it */
+    thread->thread = NULL;
+    mb();
+
+    /* notify the stop_kthread() routine that we are terminating. */
+    up(&thread->startstop_sem);
+
+    /* the kernel_thread that called clone() does a do_exit here. */
+
+    /* there is no race here between execution of the "killer" and 
+       real termination of the thread (race window between up and do_exit), 
+       since both the thread and the "killer" function are running with 
+       the kernel lock held.
+       The kernel lock will be freed after the thread exited, so the code
+       is really not executed anymore as soon as the unload functions gets
+       the kernel lock back.
+       The init process may not have made the cleanup of the process here,
+       but the cleanup can be done safely with the module unloaded.
+    */
+
+}
+
+static int thread_proc(void *arg)
+{
+    pj_thread_t *thread = arg;
+
+    TRACE_((THIS_FILE, "---new thread starting!"));
+
+    /* Initialize thread. */
+    thread_initialize( thread );
+
+    /* Wait if created suspended. */
+    if (thread->flags & PJ_THREAD_SUSPENDED) {
+	TRACE_((THIS_FILE, "---new thread suspended..."));
+	down(&thread->suspend_sem);
+    }
+
+    TRACE_((THIS_FILE, "---new thread running..."));
+
+    pj_assert(thread->func != NULL);
+
+    /* Call thread's entry. */
+    (*thread->func)(thread->arg);
+
+    TRACE_((THIS_FILE, "---thread exiting..."));
+
+    /* Cleanup thread. */
+    thread_deinitialize(thread);
+
+    return 0;
+}
+
+/* The very task entry. */
+static void kthread_launcher(void *arg)
+{
+    TRACE_((THIS_FILE, "...launching thread!..."));
+    kernel_thread(&thread_proc, arg, 0);
+}
+
+PJ_DEF(pj_status_t) pj_init(void)
+{
+    pj_status_t rc;
+
+    PJ_LOG(5, ("pj_init", "Initializing PJ Library.."));
+
+    rc = pj_thread_init();
+    if (rc != PJ_SUCCESS)
+	return rc;
+
+    /* Initialize exception ID for the pool. 
+     * Must do so after critical section is configured.
+     */
+    rc = pj_exception_id_alloc("PJLIB/No memory", &PJ_NO_MEMORY_EXCEPTION);
+    if (rc != PJ_SUCCESS)
+        return rc;
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_uint32_t) pj_getpid(void)
+{
+    return 1;
+}
+
+PJ_DEF(pj_status_t) pj_thread_register ( const char *cstr_thread_name,
+					 pj_thread_desc desc,
+					 pj_thread_t **ptr_thread)
+{
+    char stack_ptr;
+    pj_thread_t *thread = (pj_thread_t *)desc;
+    pj_str_t thread_name = pj_str((char*)cstr_thread_name);
+
+    /* Size sanity check. */
+    if (sizeof(pj_thread_desc) < sizeof(pj_thread_t)) {
+	pj_assert(!"Not enough pj_thread_desc size!");
+	return PJ_EBUG;
+    }
+
+    /* If a thread descriptor has been registered before, just return it. */
+    if (pj_thread_local_get (thread_tls_id) != 0) {
+	// 2006-02-26 bennylp:
+	//  This wouldn't work in all cases!.
+	//  If thread is created by external module (e.g. sound thread),
+	//  thread may be reused while the pool used for the thread descriptor
+	//  has been deleted by application.
+	//*thread_ptr = (pj_thread_t*)pj_thread_local_get (thread_tls_id);
+        //return PJ_SUCCESS;
+    }
+
+    /* Initialize and set the thread entry. */
+    pj_bzero(desc, sizeof(struct pj_thread_t));
+
+    if(cstr_thread_name && pj_strlen(&thread_name) < sizeof(thread->obj_name)-1)
+	pj_sprintf(thread->obj_name, cstr_thread_name, thread->thread);
+    else
+	pj_snprintf(thread->obj_name, sizeof(thread->obj_name), 
+		    "thr%p", (void*)thread->thread);
+    
+    /* Initialize. */
+    thread_initialize(thread);
+
+    /* Eat semaphore. */
+    down(&thread->startstop_sem);
+
+#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0
+    thread->stk_start = &stack_ptr;
+    thread->stk_size = 0xFFFFFFFFUL;
+    thread->stk_max_usage = 0;
+#else
+    stack_ptr = '\0';
+#endif
+
+    *ptr_thread = thread;
+    return PJ_SUCCESS;
+}
+
+
+pj_status_t pj_thread_init(void)
+{
+    pj_status_t rc;
+    pj_thread_t *dummy;
+    
+    rc = pj_thread_local_alloc(&thread_tls_id);
+    if (rc != PJ_SUCCESS)
+	return rc;
+
+    return pj_thread_register("pjlib-main", (long*)&main_thread, &dummy);
+}
+
+PJ_DEF(pj_status_t) pj_thread_create( pj_pool_t *pool, const char *thread_name,
+				      pj_thread_proc *proc, void *arg,
+				      pj_size_t stack_size, unsigned flags,
+				      pj_thread_t **ptr_thread)
+{
+    pj_thread_t *thread;
+
+    TRACE_((THIS_FILE, "pj_thread_create()"));
+    
+    PJ_ASSERT_RETURN(pool && proc && ptr_thread, PJ_EINVAL);
+
+    thread = pj_pool_zalloc(pool, sizeof(pj_thread_t));
+    if (!thread)
+	return PJ_ENOMEM;
+
+    PJ_UNUSED_ARG(stack_size);
+
+    /* Thread name. */
+    if (!thread_name) 
+	thread_name = "thr%p";
+    
+    if (strchr(thread_name, '%')) {
+	pj_snprintf(thread->obj_name, PJ_MAX_OBJ_NAME, thread_name, thread);
+    } else {
+	strncpy(thread->obj_name, thread_name, PJ_MAX_OBJ_NAME);
+	thread->obj_name[PJ_MAX_OBJ_NAME-1] = '\0';
+    }
+    
+    /* Init thread's semaphore. */
+    TRACE_((THIS_FILE, "...init semaphores..."));
+    init_MUTEX_LOCKED(&thread->startstop_sem);
+    init_MUTEX_LOCKED(&thread->suspend_sem);
+
+    thread->flags = flags;
+
+    if ((flags & PJ_THREAD_SUSPENDED) == 0) {
+	up(&thread->suspend_sem);
+    }
+
+    /* Store the functions and argument. */
+    thread->func = proc;
+    thread->arg = arg;
+    
+    /* Save return value. */
+    *ptr_thread = thread;
+    
+    /* Create the new thread by running a task through keventd. */
+
+#if 0
+    /* Initialize the task queue struct. */
+    thread->tq.sync = 0;
+    INIT_LIST_HEAD(&thread->tq.list);
+    thread->tq.routine = kthread_launcher;
+    thread->tq.data = thread;
+
+    /* and schedule it for execution. */
+    schedule_task(&thread->tq);
+#endif
+    kthread_launcher(thread);
+
+    /* Wait until thread has reached the setup_thread routine. */
+    TRACE_((THIS_FILE, "...wait for the new thread..."));
+    down(&thread->startstop_sem);
+
+    TRACE_((THIS_FILE, "...main thread resumed..."));
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(const char*) pj_thread_get_name(pj_thread_t *thread)
+{
+    return thread->obj_name;
+}
+
+PJ_DEF(pj_status_t) pj_thread_resume(pj_thread_t *thread)
+{
+    up(&thread->suspend_sem);
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_thread_t*) pj_thread_this(void)
+{
+    return (pj_thread_t*)pj_thread_local_get(thread_tls_id);
+}
+
+PJ_DEF(pj_status_t) pj_thread_join(pj_thread_t *p)
+{
+    TRACE_((THIS_FILE, "pj_thread_join()"));
+    down(&p->startstop_sem);
+    TRACE_((THIS_FILE, "  joined!"));
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_thread_destroy(pj_thread_t *thread)
+{
+    PJ_ASSERT_RETURN(thread != NULL, PJ_EINVALIDOP);
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_thread_sleep(unsigned msec)
+{
+    pj_highprec_t ticks;
+    pj_thread_t *thread = pj_thread_this();
+
+    PJ_ASSERT_RETURN(thread != NULL, PJ_EBUG);
+    
+    /* Use high precision calculation to make sure we don't
+     * crop values:
+     *
+     *	ticks = HZ * msec / 1000
+     */
+    ticks = HZ;
+    pj_highprec_mul(ticks, msec);
+    pj_highprec_div(ticks, 1000);
+
+    TRACE_((THIS_FILE, "this thread will sleep for %u ticks", ticks));
+    interruptible_sleep_on_timeout( &thread->queue, ticks);
+    return PJ_SUCCESS;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+PJ_DEF(pj_status_t) pj_atomic_create( pj_pool_t *pool, 
+				      pj_atomic_value_t value,
+				      pj_atomic_t **ptr_var)
+{
+    pj_atomic_t *t = pj_pool_calloc(pool, 1, sizeof(pj_atomic_t));
+    if (!t) return PJ_ENOMEM;
+
+    atomic_set(&t->atom, value);
+    *ptr_var = t;
+    
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_atomic_destroy( pj_atomic_t *var )
+{
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(void) pj_atomic_set(pj_atomic_t *var, pj_atomic_value_t value)
+{
+    atomic_set(&var->atom, value);
+}
+
+PJ_DEF(pj_atomic_value_t) pj_atomic_get(pj_atomic_t *var)
+{
+    return atomic_read(&var->atom);
+}
+
+PJ_DEF(void) pj_atomic_inc(pj_atomic_t *var)
+{
+    atomic_inc(&var->atom);
+}
+
+PJ_DEF(void) pj_atomic_dec(pj_atomic_t *var)
+{
+    atomic_dec(&var->atom);
+}
+
+PJ_DEF(void) pj_atomic_add( pj_atomic_t *var, pj_atomic_value_t value )
+{
+    atomic_add(value, &var->atom);
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+PJ_DEF(pj_status_t) pj_thread_local_alloc(long *index)
+{
+    if (tls_id >= MAX_TLS_ID)
+	return PJ_ETOOMANY;
+    
+    *index = tls_id++;
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(void) pj_thread_local_free(long index)
+{
+    pj_assert(index >= 0 && index < MAX_TLS_ID);
+}
+
+PJ_DEF(pj_status_t) pj_thread_local_set(long index, void *value)
+{
+    pj_assert(index >= 0 && index < MAX_TLS_ID);
+    tls_values[index] = value;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(void*) pj_thread_local_get(long index)
+{
+    pj_assert(index >= 0 && index < MAX_TLS_ID);
+    return tls_values[index];
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+PJ_DEF(void) pj_enter_critical_section(void)
+{
+    spin_lock_irqsave(&critical_section, spinlock_flags);
+}
+
+PJ_DEF(void) pj_leave_critical_section(void)
+{
+    spin_unlock_irqrestore(&critical_section, spinlock_flags);
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+PJ_DEF(pj_status_t) pj_mutex_create( pj_pool_t *pool, 
+				     const char *name, 
+				     int type,
+				     pj_mutex_t **ptr_mutex)
+{
+    pj_mutex_t *mutex;
+    
+    PJ_UNUSED_ARG(name);
+
+    mutex = pj_pool_alloc(pool, sizeof(pj_mutex_t));
+    if (!mutex)
+	return PJ_ENOMEM;
+
+    init_MUTEX(&mutex->sem);
+
+    mutex->recursive = (type == PJ_MUTEX_RECURSE);
+    mutex->owner = NULL;
+    mutex->own_count = 0;
+    
+    /* Done. */
+    *ptr_mutex = mutex;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_mutex_create_simple( pj_pool_t *pool, const char *name,
+					    pj_mutex_t **mutex )
+{
+    return pj_mutex_create(pool, name, PJ_MUTEX_SIMPLE, mutex);
+}
+
+PJ_DEF(pj_status_t) pj_mutex_create_recursive( pj_pool_t *pool,
+					       const char *name,
+					       pj_mutex_t **mutex )
+{
+    return pj_mutex_create( pool, name, PJ_MUTEX_RECURSE, mutex);
+}
+
+PJ_DEF(pj_status_t) pj_mutex_lock(pj_mutex_t *mutex)
+{
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+
+    if (mutex->recursive) {
+	pj_thread_t *this_thread = pj_thread_this();
+	if (mutex->owner == this_thread) {
+	    ++mutex->own_count;
+	} else {
+	    down(&mutex->sem);
+	    pj_assert(mutex->own_count == 0);
+	    mutex->owner = this_thread;
+	    mutex->own_count = 1;
+	}
+    } else {
+	down(&mutex->sem);
+    }
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_mutex_trylock(pj_mutex_t *mutex)
+{
+    long rc;
+
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+
+    if (mutex->recursive) {
+	pj_thread_t *this_thread = pj_thread_this();
+	if (mutex->owner == this_thread) {
+	    ++mutex->own_count;
+	} else {
+	    rc = down_interruptible(&mutex->sem);
+	    if (rc != 0)
+		return PJ_RETURN_OS_ERROR(-rc);
+	    pj_assert(mutex->own_count == 0);
+	    mutex->owner = this_thread;
+	    mutex->own_count = 1;
+	}
+    } else {
+	int rc = down_trylock(&mutex->sem);
+	if (rc != 0)
+	    return PJ_RETURN_OS_ERROR(-rc);
+    }
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_mutex_unlock(pj_mutex_t *mutex)
+{
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+
+    if (mutex->recursive) {
+	pj_thread_t *this_thread = pj_thread_this();
+	if (mutex->owner == this_thread) {
+	    pj_assert(mutex->own_count > 0);
+	    --mutex->own_count;
+	    if (mutex->own_count == 0) {
+		mutex->owner = NULL;
+		up(&mutex->sem);
+	    }
+	} else {
+	    pj_assert(!"Not owner!");
+	    return PJ_EINVALIDOP;
+	}
+    } else {
+	up(&mutex->sem);
+    }
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_mutex_destroy(pj_mutex_t *mutex)
+{
+    PJ_ASSERT_RETURN(mutex != NULL, PJ_EINVAL);
+
+    return PJ_SUCCESS;
+}
+
+#if defined(PJ_DEBUG) && PJ_DEBUG != 0
+PJ_DEF(pj_bool_t) pj_mutex_is_locked(pj_mutex_t *mutex)
+{
+    if (mutex->recursive)
+	return mutex->owner == pj_thread_this();
+    else
+	return 1;
+}
+#endif	/* PJ_DEBUG */
+
+
+#if defined(PJ_HAS_SEMAPHORE) && PJ_HAS_SEMAPHORE != 0
+
+PJ_DEF(pj_status_t) pj_sem_create(  pj_pool_t *pool, 
+                                    const char *name,
+				    unsigned initial, 
+                                    unsigned max,
+				    pj_sem_t **sem)
+{
+    pj_sem_t *sem;
+
+    PJ_UNUSED_ARG(max);
+
+    PJ_ASSERT_RETURN(pool && sem, PJ_EINVAL);
+    
+    sem = pj_pool_alloc(pool, sizeof(pj_sem_t));
+    sema_init(&sem->sem, initial);
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_sem_wait(pj_sem_t *sem)
+{
+    PJ_ASSERT_RETURN(pool && sem, PJ_EINVAL);
+
+    down(&sem->sem);
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_sem_trywait(pj_sem_t *sem)
+{
+    int rc;
+
+    PJ_ASSERT_RETURN(pool && sem, PJ_EINVAL);
+
+    rc = down_trylock(&sem->sem);
+    if (rc != 0) {
+	return PJ_RETURN_OS_ERROR(-rc);
+    } else {
+	return PJ_SUCCESS;
+    }
+}
+
+PJ_DEF(pj_status_t) pj_sem_post(pj_sem_t *sem)
+{
+    PJ_ASSERT_RETURN(pool && sem, PJ_EINVAL);
+
+    up(&sem->sem);
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_sem_destroy(pj_sem_t *sem)
+{
+    PJ_ASSERT_RETURN(pool && sem, PJ_EINVAL);
+
+    return PJ_SUCCESS;
+}
+
+#endif	/* PJ_HAS_SEMAPHORE */
+
+
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_core_unix.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_core_unix.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_core_unix.c	(revision 1163)
@@ -0,0 +1,1567 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 
+ */
+/*
+ * Contributors:
+ * - Thanks for Zetron, Inc. (Phil Torre, ptorre@zetron.com) for donating
+ *   the RTEMS port.
+ */
+#define _GNU_SOURCE
+#include <pj/os.h>
+#include <pj/assert.h>
+#include <pj/pool.h>
+#include <pj/log.h>
+#include <pj/rand.h>
+#include <pj/string.h>
+#include <pj/guid.h>
+#include <pj/except.h>
+#include <pj/errno.h>
+
+#if defined(PJ_HAS_SEMAPHORE) && PJ_HAS_SEMAPHORE != 0
+#  include <semaphore.h>
+#endif
+
+#include <unistd.h>	    // getpid()
+#include <errno.h>	    // errno
+
+#include <pthread.h>
+
+#define THIS_FILE   "os_core_unix.c"
+
+#define SIGNATURE1  0xDEAFBEEF
+#define SIGNATURE2  0xDEADC0DE
+
+struct pj_thread_t
+{
+    char	    obj_name[PJ_MAX_OBJ_NAME];
+    pthread_t	    thread;
+    pj_thread_proc *proc;
+    void	   *arg;
+    pj_uint32_t	    signature1;
+    pj_uint32_t	    signature2;
+
+    pj_mutex_t	   *suspended_mutex;
+
+#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0
+    pj_uint32_t	    stk_size;
+    pj_uint32_t	    stk_max_usage;
+    char	   *stk_start;
+    const char	   *caller_file;
+    int		    caller_line;
+#endif
+};
+
+struct pj_atomic_t
+{
+    pj_mutex_t	       *mutex;
+    pj_atomic_value_t	value;
+};
+
+struct pj_mutex_t
+{
+    pthread_mutex_t     mutex;
+    char		obj_name[PJ_MAX_OBJ_NAME];
+#if PJ_DEBUG
+    int		        nesting_level;
+    pj_thread_t	       *owner;
+    char		owner_name[PJ_MAX_OBJ_NAME];
+#endif
+};
+
+#if defined(PJ_HAS_SEMAPHORE) && PJ_HAS_SEMAPHORE != 0
+struct pj_sem_t
+{
+    sem_t		sem;
+    char		obj_name[PJ_MAX_OBJ_NAME];
+};
+#endif /* PJ_HAS_SEMAPHORE */
+
+#if defined(PJ_HAS_EVENT_OBJ) && PJ_HAS_EVENT_OBJ != 0
+struct pj_event_t
+{
+    char		obj_name[PJ_MAX_OBJ_NAME];
+};
+#endif	/* PJ_HAS_EVENT_OBJ */
+
+
+#if PJ_HAS_THREADS
+    static pj_thread_t main_thread;
+    static long thread_tls_id;
+    static pj_mutex_t critical_section;
+#else
+#   define MAX_THREADS 32
+    static int tls_flag[MAX_THREADS];
+    static void *tls[MAX_THREADS];
+#endif
+
+static unsigned atexit_count;
+static void (*atexit_func[32])(void);
+
+static pj_status_t init_mutex(pj_mutex_t *mutex, const char *name, int type);
+
+/*
+ * pj_init(void).
+ * Init PJLIB!
+ */
+PJ_DEF(pj_status_t) pj_init(void)
+{
+    char dummy_guid[PJ_GUID_MAX_LENGTH];
+    pj_str_t guid;
+    pj_status_t rc;
+
+#if PJ_HAS_THREADS
+    /* Init this thread's TLS. */
+    if ((rc=pj_thread_init()) != 0) {
+	return rc;
+    }
+
+    /* Critical section. */
+    if ((rc=init_mutex(&critical_section, "critsec", PJ_MUTEX_RECURSE)) != 0)
+	return rc;
+
+#endif
+
+    /* Initialize exception ID for the pool. 
+     * Must do so after critical section is configured.
+     */
+    rc = pj_exception_id_alloc("PJLIB/No memory", &PJ_NO_MEMORY_EXCEPTION);
+    if (rc != PJ_SUCCESS)
+        return rc;
+    
+    /* Init random seed. */
+    pj_srand( clock() );
+
+    /* Startup GUID. */
+    guid.ptr = dummy_guid;
+    pj_generate_unique_string( &guid );
+
+    /* Startup timestamp */
+#if defined(PJ_HAS_HIGH_RES_TIMER) && PJ_HAS_HIGH_RES_TIMER != 0
+    {
+	pj_timestamp dummy_ts;
+	if ((rc=pj_get_timestamp(&dummy_ts)) != 0) {
+	    return rc;
+	}
+    }
+#endif   
+
+    PJ_LOG(4,(THIS_FILE, "pjlib %s for POSIX initialized",
+	      PJ_VERSION));
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_atexit()
+ */
+PJ_DEF(pj_status_t) pj_atexit(void (*func)(void))
+{
+    if (atexit_count >= PJ_ARRAY_SIZE(atexit_func))
+	return PJ_ETOOMANY;
+
+    atexit_func[atexit_count++] = func;
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_shutdown(void)
+ */
+PJ_DEF(void) pj_shutdown()
+{
+    int i;
+
+    /* Call atexit() functions */
+    for (i=atexit_count-1; i>=0; --i) {
+	(*atexit_func[i])();
+    }
+    atexit_count = 0;
+
+    /* Free exception ID */
+    if (PJ_NO_MEMORY_EXCEPTION != -1) {
+	pj_exception_id_free(PJ_NO_MEMORY_EXCEPTION);
+	PJ_NO_MEMORY_EXCEPTION = -1;
+    }
+
+#if PJ_HAS_THREADS
+    /* Destroy PJLIB critical section */
+    pj_mutex_destroy(&critical_section);
+
+    /* Free PJLIB TLS */
+    if (thread_tls_id != -1) {
+	pj_thread_local_free(thread_tls_id);
+	thread_tls_id = -1;
+    }
+#endif
+
+    /* Clear static variables */
+    pj_errno_clear_handlers();
+}
+
+
+/*
+ * pj_getpid(void)
+ */
+PJ_DEF(pj_uint32_t) pj_getpid(void)
+{
+    PJ_CHECK_STACK();
+    return getpid();
+}
+
+/*
+ * Check if this thread has been registered to PJLIB.
+ */
+PJ_DEF(pj_bool_t) pj_thread_is_registered(void)
+{
+#if PJ_HAS_THREADS
+    return pj_thread_local_get(thread_tls_id) != 0;
+#else
+    pj_assert("pj_thread_is_registered() called in non-threading mode!");
+    return PJ_TRUE;
+#endif
+}
+
+
+/*
+ * pj_thread_register(..)
+ */
+PJ_DEF(pj_status_t) pj_thread_register ( const char *cstr_thread_name,
+					 pj_thread_desc desc,
+					 pj_thread_t **ptr_thread)
+{
+#if PJ_HAS_THREADS
+    char stack_ptr;
+    pj_status_t rc;
+    pj_thread_t *thread = (pj_thread_t *)desc;
+    pj_str_t thread_name = pj_str((char*)cstr_thread_name);
+
+    /* Size sanity check. */
+    if (sizeof(pj_thread_desc) < sizeof(pj_thread_t)) {
+	pj_assert(!"Not enough pj_thread_desc size!");
+	return PJ_EBUG;
+    }
+
+    /* Warn if this thread has been registered before */
+    if (pj_thread_local_get (thread_tls_id) != 0) {
+	// 2006-02-26 bennylp:
+	//  This wouldn't work in all cases!.
+	//  If thread is created by external module (e.g. sound thread),
+	//  thread may be reused while the pool used for the thread descriptor
+	//  has been deleted by application.
+	//*thread_ptr = (pj_thread_t*)pj_thread_local_get (thread_tls_id);
+        //return PJ_SUCCESS;
+	PJ_LOG(4,(THIS_FILE, "Info: possibly re-registering existing "
+			     "thread"));
+    }
+
+    /* On the other hand, also warn if the thread descriptor buffer seem to
+     * have been used to register other threads.
+     */
+    pj_assert(thread->signature1 != SIGNATURE1 ||
+	      thread->signature2 != SIGNATURE2 ||
+	      (thread->thread == pthread_self()));
+
+    /* Initialize and set the thread entry. */
+    pj_bzero(desc, sizeof(struct pj_thread_t));
+    thread->thread = pthread_self();
+    thread->signature1 = SIGNATURE1;
+    thread->signature2 = SIGNATURE2;
+
+    if(cstr_thread_name && pj_strlen(&thread_name) < sizeof(thread->obj_name)-1)
+	pj_ansi_snprintf(thread->obj_name, sizeof(thread->obj_name), 
+			 cstr_thread_name, thread->thread);
+    else
+	pj_ansi_snprintf(thread->obj_name, sizeof(thread->obj_name), 
+			 "thr%p", (void*)thread->thread);
+    
+    rc = pj_thread_local_set(thread_tls_id, thread);
+    if (rc != PJ_SUCCESS) {
+	pj_bzero(desc, sizeof(struct pj_thread_t));
+	return rc;
+    }
+
+#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0
+    thread->stk_start = &stack_ptr;
+    thread->stk_size = 0xFFFFFFFFUL;
+    thread->stk_max_usage = 0;
+#else
+    stack_ptr = '\0';
+#endif
+
+    *ptr_thread = thread;
+    return PJ_SUCCESS;
+#else
+    pj_thread_t *thread = (pj_thread_t*)desc;
+    *ptr_thread = thread;
+    return PJ_SUCCESS;
+#endif
+}
+
+/*
+ * pj_thread_init(void)
+ */
+pj_status_t pj_thread_init(void)
+{
+#if PJ_HAS_THREADS
+    pj_status_t rc;
+    pj_thread_t *dummy;
+
+    rc = pj_thread_local_alloc(&thread_tls_id );
+    if (rc != PJ_SUCCESS) {
+	return rc;
+    }
+    return pj_thread_register("thr%p", (long*)&main_thread, &dummy);
+#else
+    PJ_LOG(2,(THIS_FILE, "Thread init error. Threading is not enabled!"));
+    return PJ_EINVALIDOP;
+#endif
+}
+
+#if PJ_HAS_THREADS
+/*
+ * thread_main()
+ *
+ * This is the main entry for all threads.
+ */
+static void *thread_main(void *param)
+{
+    pj_thread_t *rec = param;
+    void *result;
+    pj_status_t rc;
+
+#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0
+    rec->stk_start = (char*)&rec;
+#endif
+
+    /* Set current thread id. */
+    rc = pj_thread_local_set(thread_tls_id, rec);
+    if (rc != PJ_SUCCESS) {
+	pj_assert(!"Thread TLS ID is not set (pj_init() error?)");
+    }
+
+    /* Check if suspension is required. */
+    if (rec->suspended_mutex)
+	pj_mutex_lock(rec->suspended_mutex);
+
+    PJ_LOG(6,(rec->obj_name, "Thread started"));
+
+    /* Call user's entry! */
+    result = (void*)(long)(*rec->proc)(rec->arg);
+
+    /* Done. */
+    PJ_LOG(6,(rec->obj_name, "Thread quitting"));
+
+    return result;
+}
+#endif
+
+/*
+ * pj_thread_create(...)
+ */
+PJ_DEF(pj_status_t) pj_thread_create( pj_pool_t *pool, 
+				      const char *thread_name,
+				      pj_thread_proc *proc, 
+				      void *arg,
+				      pj_size_t stack_size, 
+				      unsigned flags,
+				      pj_thread_t **ptr_thread)
+{
+#if PJ_HAS_THREADS
+    pj_thread_t *rec;
+    pthread_attr_t thread_attr;
+    void *stack_addr;
+    int rc;
+
+    PJ_UNUSED_ARG(stack_addr);
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(pool && proc && ptr_thread, PJ_EINVAL);
+
+    /* Create thread record and assign name for the thread */
+    rec = (struct pj_thread_t*) pj_pool_zalloc(pool, sizeof(pj_thread_t));
+    PJ_ASSERT_RETURN(rec, PJ_ENOMEM);
+    
+    /* Set name. */
+    if (!thread_name) 
+	thread_name = "thr%p";
+    
+    if (strchr(thread_name, '%')) {
+	pj_ansi_snprintf(rec->obj_name, PJ_MAX_OBJ_NAME, thread_name, rec);
+    } else {
+	strncpy(rec->obj_name, thread_name, PJ_MAX_OBJ_NAME);
+	rec->obj_name[PJ_MAX_OBJ_NAME-1] = '\0';
+    }
+
+    /* Set default stack size */
+    if (stack_size == 0)
+	stack_size = PJ_THREAD_DEFAULT_STACK_SIZE;
+
+#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0
+    rec->stk_size = stack_size;
+    rec->stk_max_usage = 0;
+#endif
+
+    /* Emulate suspended thread with mutex. */
+    if (flags & PJ_THREAD_SUSPENDED) {
+	rc = pj_mutex_create_simple(pool, NULL, &rec->suspended_mutex);
+	if (rc != PJ_SUCCESS) {
+	    return rc;
+	}
+
+	pj_mutex_lock(rec->suspended_mutex);
+    } else {
+	pj_assert(rec->suspended_mutex == NULL);
+    }
+    
+
+    /* Init thread attributes */
+    pthread_attr_init(&thread_attr);
+
+#if defined(PJ_THREAD_SET_STACK_SIZE) && PJ_THREAD_SET_STACK_SIZE!=0
+    /* Set thread's stack size */
+    rc = pthread_attr_setstacksize(&thread_attr, stack_size);
+    if (rc != 0)
+	return PJ_RETURN_OS_ERROR(rc);
+#endif	/* PJ_THREAD_SET_STACK_SIZE */
+
+
+#if defined(PJ_THREAD_ALLOCATE_STACK) && PJ_THREAD_ALLOCATE_STACK!=0
+    /* Allocate memory for the stack */
+    stack_addr = pj_pool_alloc(pool, stack_size);
+    PJ_ASSERT_RETURN(stack_addr, PJ_ENOMEM);
+
+    rc = pthread_attr_setstackaddr(&thread_attr, stack_addr);
+    if (rc != 0)
+	return PJ_RETURN_OS_ERROR(rc);
+#endif	/* PJ_THREAD_ALLOCATE_STACK */
+
+
+    /* Create the thread. */
+    rec->proc = proc;
+    rec->arg = arg;
+    rc = pthread_create( &rec->thread, &thread_attr, &thread_main, rec);
+    if (rc != 0) {
+	return PJ_RETURN_OS_ERROR(rc);
+    }
+
+    *ptr_thread = rec;
+
+    PJ_LOG(6, (rec->obj_name, "Thread created"));
+    return PJ_SUCCESS;
+#else
+    pj_assert(!"Threading is disabled!");
+    return PJ_EINVALIDOP;
+#endif
+}
+
+/*
+ * pj_thread-get_name()
+ */
+PJ_DEF(const char*) pj_thread_get_name(pj_thread_t *p)
+{
+#if PJ_HAS_THREADS
+    pj_thread_t *rec = (pj_thread_t*)p;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(p, "");
+
+    return rec->obj_name;
+#else
+    return "";
+#endif
+}
+
+/*
+ * pj_thread_resume()
+ */
+PJ_DEF(pj_status_t) pj_thread_resume(pj_thread_t *p)
+{
+    pj_status_t rc;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(p, PJ_EINVAL);
+
+    rc = pj_mutex_unlock(p->suspended_mutex);
+
+    return rc;
+}
+
+/*
+ * pj_thread_this()
+ */
+PJ_DEF(pj_thread_t*) pj_thread_this(void)
+{
+#if PJ_HAS_THREADS
+    pj_thread_t *rec = pj_thread_local_get(thread_tls_id);
+    
+    if (rec == NULL) {
+	pj_assert(!"Calling pjlib from unknown/external thread. You must "
+		   "register external threads with pj_thread_register() "
+		   "before calling any pjlib functions.");
+    }
+
+    /*
+     * MUST NOT check stack because this function is called
+     * by PJ_CHECK_STACK() itself!!!
+     *
+     */
+
+    return rec;
+#else
+    pj_assert(!"Threading is not enabled!");
+    return NULL;
+#endif
+}
+
+/*
+ * pj_thread_join()
+ */
+PJ_DEF(pj_status_t) pj_thread_join(pj_thread_t *p)
+{
+#if PJ_HAS_THREADS
+    pj_thread_t *rec = (pj_thread_t *)p;
+    void *ret;
+    int result;
+
+    PJ_CHECK_STACK();
+
+    PJ_LOG(6, (pj_thread_this()->obj_name, "Joining thread %s", p->obj_name));
+    result = pthread_join( rec->thread, &ret);
+
+    if (result == 0)
+	return PJ_SUCCESS;
+    else {
+	/* Calling pthread_join() on a thread that no longer exists and 
+	 * getting back ESRCH isn't an error (in this context). 
+	 * Thanks Phil Torre <ptorre@zetron.com>.
+	 */
+	return result==ESRCH ? PJ_SUCCESS : PJ_RETURN_OS_ERROR(result);
+    }
+#else
+    PJ_CHECK_STACK();
+    pj_assert(!"No multithreading support!");
+    return PJ_EINVALIDOP;
+#endif
+}
+
+/*
+ * pj_thread_destroy()
+ */
+PJ_DEF(pj_status_t) pj_thread_destroy(pj_thread_t *p)
+{
+    PJ_CHECK_STACK();
+
+    /* Destroy mutex used to suspend thread */
+    if (p->suspended_mutex) {
+	pj_mutex_destroy(p->suspended_mutex);
+	p->suspended_mutex = NULL;
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_thread_sleep()
+ */
+PJ_DEF(pj_status_t) pj_thread_sleep(unsigned msec)
+{
+/* TODO: should change this to something like PJ_OS_HAS_NANOSLEEP */
+#if defined(PJ_RTEMS) && PJ_RTEMS!=0
+    enum { NANOSEC_PER_MSEC = 1000000 };
+    struct timespec req;
+
+    PJ_CHECK_STACK();
+    req.tv_sec = msec / 1000;
+    req.tv_nsec = (msec % 1000) * NANOSEC_PER_MSEC;
+
+    if (nanosleep(&req, NULL) == 0)
+	return PJ_SUCCESS;
+
+    return PJ_RETURN_OS_ERROR(pj_get_native_os_error());
+#else
+    PJ_CHECK_STACK();
+
+    pj_set_os_error(0);
+
+    usleep(msec * 1000);
+
+    return pj_get_os_error();
+;
+#endif	/* PJ_RTEMS */
+}
+
+#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0
+/*
+ * pj_thread_check_stack()
+ * Implementation for PJ_CHECK_STACK()
+ */
+PJ_DEF(void) pj_thread_check_stack(const char *file, int line)
+{
+    char stk_ptr;
+    pj_uint32_t usage;
+    pj_thread_t *thread = pj_thread_this();
+
+    /* Calculate current usage. */
+    usage = (&stk_ptr > thread->stk_start) ? &stk_ptr - thread->stk_start :
+		thread->stk_start - &stk_ptr;
+
+    /* Assert if stack usage is dangerously high. */
+    pj_assert("STACK OVERFLOW!! " && (usage <= thread->stk_size - 128));
+
+    /* Keep statistic. */
+    if (usage > thread->stk_max_usage) {
+	thread->stk_max_usage = usage;
+	thread->caller_file = file;
+	thread->caller_line = line;
+    }
+}
+
+/*
+ * pj_thread_get_stack_max_usage()
+ */
+PJ_DEF(pj_uint32_t) pj_thread_get_stack_max_usage(pj_thread_t *thread)
+{
+    return thread->stk_max_usage;
+}
+
+/*
+ * pj_thread_get_stack_info()
+ */
+PJ_DEF(pj_status_t) pj_thread_get_stack_info( pj_thread_t *thread,
+					      const char **file,
+					      int *line )
+{
+    pj_assert(thread);
+
+    *file = thread->caller_file;
+    *line = thread->caller_line;
+    return 0;
+}
+
+#endif	/* PJ_OS_HAS_CHECK_STACK */
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * pj_atomic_create()
+ */
+PJ_DEF(pj_status_t) pj_atomic_create( pj_pool_t *pool, 
+				      pj_atomic_value_t initial,
+				      pj_atomic_t **ptr_atomic)
+{
+    pj_status_t rc;
+    pj_atomic_t *atomic_var = pj_pool_calloc(pool, 1, sizeof(pj_atomic_t));
+    PJ_ASSERT_RETURN(atomic_var, PJ_ENOMEM);
+    
+#if PJ_HAS_THREADS
+    rc = pj_mutex_create(pool, "atm%p", PJ_MUTEX_SIMPLE, &atomic_var->mutex);
+    if (rc != PJ_SUCCESS)
+	return rc;
+#endif
+    atomic_var->value = initial;
+
+    *ptr_atomic = atomic_var;
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_atomic_destroy()
+ */
+PJ_DEF(pj_status_t) pj_atomic_destroy( pj_atomic_t *atomic_var )
+{
+    PJ_ASSERT_RETURN(atomic_var, PJ_EINVAL);
+#if PJ_HAS_THREADS
+    return pj_mutex_destroy( atomic_var->mutex );
+#else
+    return 0;
+#endif
+}
+
+/*
+ * pj_atomic_set()
+ */
+PJ_DEF(void) pj_atomic_set(pj_atomic_t *atomic_var, pj_atomic_value_t value)
+{
+    PJ_CHECK_STACK();
+
+#if PJ_HAS_THREADS
+    pj_mutex_lock( atomic_var->mutex );
+#endif
+    atomic_var->value = value;
+#if PJ_HAS_THREADS
+    pj_mutex_unlock( atomic_var->mutex);
+#endif 
+}
+
+/*
+ * pj_atomic_get()
+ */
+PJ_DEF(pj_atomic_value_t) pj_atomic_get(pj_atomic_t *atomic_var)
+{
+    pj_atomic_value_t oldval;
+    
+    PJ_CHECK_STACK();
+
+#if PJ_HAS_THREADS
+    pj_mutex_lock( atomic_var->mutex );
+#endif
+    oldval = atomic_var->value;
+#if PJ_HAS_THREADS
+    pj_mutex_unlock( atomic_var->mutex);
+#endif
+    return oldval;
+}
+
+/*
+ * pj_atomic_inc_and_get()
+ */
+PJ_DEF(pj_atomic_value_t) pj_atomic_inc_and_get(pj_atomic_t *atomic_var)
+{
+    pj_atomic_value_t new_value;
+
+    PJ_CHECK_STACK();
+
+#if PJ_HAS_THREADS
+    pj_mutex_lock( atomic_var->mutex );
+#endif
+    new_value = ++atomic_var->value;
+#if PJ_HAS_THREADS
+    pj_mutex_unlock( atomic_var->mutex);
+#endif
+
+    return new_value;
+}
+/*
+ * pj_atomic_inc()
+ */
+PJ_DEF(void) pj_atomic_inc(pj_atomic_t *atomic_var)
+{
+    pj_atomic_inc_and_get(atomic_var);
+}
+
+/*
+ * pj_atomic_dec_and_get()
+ */
+PJ_DEF(pj_atomic_value_t) pj_atomic_dec_and_get(pj_atomic_t *atomic_var)
+{
+    pj_atomic_value_t new_value;
+
+    PJ_CHECK_STACK();
+
+#if PJ_HAS_THREADS
+    pj_mutex_lock( atomic_var->mutex );
+#endif
+    new_value = --atomic_var->value;
+#if PJ_HAS_THREADS
+    pj_mutex_unlock( atomic_var->mutex);
+#endif
+
+    return new_value;
+}
+
+/*
+ * pj_atomic_dec()
+ */
+PJ_DEF(void) pj_atomic_dec(pj_atomic_t *atomic_var)
+{
+    pj_atomic_dec_and_get(atomic_var);
+}
+
+/*
+ * pj_atomic_add_and_get()
+ */ 
+PJ_DEF(pj_atomic_value_t) pj_atomic_add_and_get( pj_atomic_t *atomic_var, 
+                                                 pj_atomic_value_t value )
+{
+    pj_atomic_value_t new_value;
+
+#if PJ_HAS_THREADS
+    pj_mutex_lock(atomic_var->mutex);
+#endif
+    
+    atomic_var->value += value;
+    new_value = atomic_var->value;
+
+#if PJ_HAS_THREADS
+    pj_mutex_unlock(atomic_var->mutex);
+#endif
+
+    return new_value;
+}
+
+/*
+ * pj_atomic_add()
+ */ 
+PJ_DEF(void) pj_atomic_add( pj_atomic_t *atomic_var, 
+                            pj_atomic_value_t value )
+{
+    pj_atomic_add_and_get(atomic_var, value);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * pj_thread_local_alloc()
+ */
+PJ_DEF(pj_status_t) pj_thread_local_alloc(long *p_index)
+{
+#if PJ_HAS_THREADS
+    pthread_key_t key;
+    int rc;
+
+    PJ_ASSERT_RETURN(p_index != NULL, PJ_EINVAL);
+
+    pj_assert( sizeof(pthread_key_t) <= sizeof(long));
+    if ((rc=pthread_key_create(&key, NULL)) != 0)
+	return PJ_RETURN_OS_ERROR(rc);
+
+    *p_index = key;
+    return PJ_SUCCESS;
+#else
+    int i;
+    for (i=0; i<MAX_THREADS; ++i) {
+	if (tls_flag[i] == 0)
+	    break;
+    }
+    if (i == MAX_THREADS) 
+	return PJ_ETOOMANY;
+    
+    tls_flag[i] = 1;
+    tls[i] = NULL;
+
+    *p_index = i;
+    return PJ_SUCCESS;
+#endif
+}
+
+/*
+ * pj_thread_local_free()
+ */
+PJ_DEF(void) pj_thread_local_free(long index)
+{
+    PJ_CHECK_STACK();
+#if PJ_HAS_THREADS
+    pthread_key_delete(index);
+#else
+    tls_flag[index] = 0;
+#endif
+}
+
+/*
+ * pj_thread_local_set()
+ */
+PJ_DEF(pj_status_t) pj_thread_local_set(long index, void *value)
+{
+    //Can't check stack because this function is called in the
+    //beginning before main thread is initialized.
+    //PJ_CHECK_STACK();
+#if PJ_HAS_THREADS
+    int rc=pthread_setspecific(index, value);
+    return rc==0 ? PJ_SUCCESS : PJ_RETURN_OS_ERROR(rc);
+#else
+    pj_assert(index >= 0 && index < MAX_THREADS);
+    tls[index] = value;
+    return PJ_SUCCESS;
+#endif
+}
+
+PJ_DEF(void*) pj_thread_local_get(long index)
+{
+    //Can't check stack because this function is called
+    //by PJ_CHECK_STACK() itself!!!
+    //PJ_CHECK_STACK();
+#if PJ_HAS_THREADS
+    return pthread_getspecific(index);
+#else
+    pj_assert(index >= 0 && index < MAX_THREADS);
+    return tls[index];
+#endif
+}
+
+///////////////////////////////////////////////////////////////////////////////
+PJ_DEF(void) pj_enter_critical_section(void)
+{
+#if PJ_HAS_THREADS
+    pj_mutex_lock(&critical_section);
+#endif
+}
+
+PJ_DEF(void) pj_leave_critical_section(void)
+{
+#if PJ_HAS_THREADS
+    pj_mutex_unlock(&critical_section);
+#endif
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+static pj_status_t init_mutex(pj_mutex_t *mutex, const char *name, int type)
+{
+#if PJ_HAS_THREADS
+    pthread_mutexattr_t attr;
+    int rc;
+
+    PJ_CHECK_STACK();
+
+    rc = pthread_mutexattr_init(&attr);
+    if (rc != 0)
+	return PJ_RETURN_OS_ERROR(rc);
+
+    if (type == PJ_MUTEX_SIMPLE) {
+#if defined(PJ_LINUX) && PJ_LINUX!=0
+	extern int pthread_mutexattr_settype(pthread_mutexattr_t*,int);
+	rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_FAST_NP);
+#elif defined(PJ_RTEMS) && PJ_RTEMS!=0
+	/* Nothing to do, default is simple */
+#else
+	rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
+#endif
+    } else {
+#if defined(PJ_LINUX) && PJ_LINUX!=0
+	extern int pthread_mutexattr_settype(pthread_mutexattr_t*,int);
+	rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+#elif defined(PJ_RTEMS) && PJ_RTEMS!=0
+	// Phil Torre <ptorre@zetron.com>:
+	// The RTEMS implementation of POSIX mutexes doesn't include 
+	// pthread_mutexattr_settype(), so what follows is a hack
+	// until I get RTEMS patched to support the set/get functions.
+	PJ_TODO(FIX_RTEMS_RECURSIVE_MUTEX_TYPE)
+	attr.recursive = 1;
+#else
+	rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+#endif
+    }
+    
+    if (rc != 0) {
+	return PJ_RETURN_OS_ERROR(rc);
+    }
+
+    rc = pthread_mutex_init(&mutex->mutex, &attr);
+    if (rc != 0) {
+	return PJ_RETURN_OS_ERROR(rc);
+    }
+    
+#if PJ_DEBUG
+    /* Set owner. */
+    mutex->nesting_level = 0;
+    mutex->owner = NULL;
+#endif
+
+    /* Set name. */
+    if (!name) {
+	name = "mtx%p";
+    }
+    if (strchr(name, '%')) {
+	pj_ansi_snprintf(mutex->obj_name, PJ_MAX_OBJ_NAME, name, mutex);
+    } else {
+	strncpy(mutex->obj_name, name, PJ_MAX_OBJ_NAME);
+	mutex->obj_name[PJ_MAX_OBJ_NAME-1] = '\0';
+    }
+
+    PJ_LOG(6, (mutex->obj_name, "Mutex created"));
+    return PJ_SUCCESS;
+#else /* PJ_HAS_THREADS */
+    return PJ_SUCCESS;
+#endif
+}
+
+/*
+ * pj_mutex_create()
+ */
+PJ_DEF(pj_status_t) pj_mutex_create(pj_pool_t *pool, 
+				    const char *name, 
+				    int type,
+				    pj_mutex_t **ptr_mutex)
+{
+#if PJ_HAS_THREADS
+    pj_status_t rc;
+    pj_mutex_t *mutex;
+
+    PJ_ASSERT_RETURN(pool && ptr_mutex, PJ_EINVAL);
+
+    mutex = pj_pool_alloc(pool, sizeof(*mutex));
+    PJ_ASSERT_RETURN(mutex, PJ_ENOMEM);
+
+    if ((rc=init_mutex(mutex, name, type)) != PJ_SUCCESS)
+	return rc;
+    
+    *ptr_mutex = mutex;
+    return PJ_SUCCESS;
+#else /* PJ_HAS_THREADS */
+    *ptr_mutex = (pj_mutex_t*)1;
+    return PJ_SUCCESS;
+#endif
+}
+
+/*
+ * pj_mutex_create_simple()
+ */
+PJ_DEF(pj_status_t) pj_mutex_create_simple( pj_pool_t *pool, 
+                                            const char *name,
+					    pj_mutex_t **mutex )
+{
+    return pj_mutex_create(pool, name, PJ_MUTEX_SIMPLE, mutex);
+}
+
+/*
+ * pj_mutex_create_recursive()
+ */
+PJ_DEF(pj_status_t) pj_mutex_create_recursive( pj_pool_t *pool,
+					       const char *name,
+					       pj_mutex_t **mutex )
+{
+    return pj_mutex_create(pool, name, PJ_MUTEX_RECURSE, mutex);
+}
+
+/*
+ * pj_mutex_lock()
+ */
+PJ_DEF(pj_status_t) pj_mutex_lock(pj_mutex_t *mutex)
+{
+#if PJ_HAS_THREADS
+    pj_status_t status;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+
+#if PJ_DEBUG
+    PJ_LOG(6,(mutex->obj_name, "Mutex: thread %s is waiting (mutex owner=%s)", 
+				pj_thread_this()->obj_name,
+				mutex->owner_name));
+#else
+    PJ_LOG(6,(mutex->obj_name, "Mutex: thread %s is waiting", 
+				pj_thread_this()->obj_name));
+#endif
+
+    status = pthread_mutex_lock( &mutex->mutex );
+
+
+#if PJ_DEBUG
+    if (status == PJ_SUCCESS) {
+	mutex->owner = pj_thread_this();
+	pj_ansi_strcpy(mutex->owner_name, mutex->owner->obj_name);
+	++mutex->nesting_level;
+    }
+
+    PJ_LOG(6,(mutex->obj_name, 
+	      (status==0 ? 
+		"Mutex acquired by thread %s (level=%d)" : 
+		"Mutex acquisition FAILED by %s (level=%d)"),
+	      pj_thread_this()->obj_name,
+	      mutex->nesting_level));
+#else
+    PJ_LOG(6,(mutex->obj_name, 
+	      (status==0 ? "Mutex acquired by thread %s" : "FAILED by %s"),
+	      pj_thread_this()->obj_name));
+#endif
+
+    if (status == 0)
+	return PJ_SUCCESS;
+    else
+	return PJ_RETURN_OS_ERROR(status);
+#else	/* PJ_HAS_THREADS */
+    pj_assert( mutex == (pj_mutex_t*)1 );
+    return PJ_SUCCESS;
+#endif
+}
+
+/*
+ * pj_mutex_unlock()
+ */
+PJ_DEF(pj_status_t) pj_mutex_unlock(pj_mutex_t *mutex)
+{
+#if PJ_HAS_THREADS
+    pj_status_t status;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+
+#if PJ_DEBUG
+    pj_assert(mutex->owner == pj_thread_this());
+    if (--mutex->nesting_level == 0) {
+	mutex->owner = NULL;
+	mutex->owner_name[0] = '\0';
+    }
+
+    PJ_LOG(6,(mutex->obj_name, "Mutex released by thread %s (level=%d)", 
+				pj_thread_this()->obj_name, 
+				mutex->nesting_level));
+#else
+    PJ_LOG(6,(mutex->obj_name, "Mutex released by thread %s", 
+				pj_thread_this()->obj_name));
+#endif
+
+    status = pthread_mutex_unlock( &mutex->mutex );
+    if (status == 0)
+	return PJ_SUCCESS;
+    else
+	return PJ_RETURN_OS_ERROR(status);
+
+#else /* PJ_HAS_THREADS */
+    pj_assert( mutex == (pj_mutex_t*)1 );
+    return PJ_SUCCESS;
+#endif
+}
+
+/*
+ * pj_mutex_trylock()
+ */
+PJ_DEF(pj_status_t) pj_mutex_trylock(pj_mutex_t *mutex)
+{
+#if PJ_HAS_THREADS
+    int status;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+
+    PJ_LOG(6,(mutex->obj_name, "Mutex: thread %s is trying", 
+				pj_thread_this()->obj_name));
+
+    status = pthread_mutex_trylock( &mutex->mutex );
+
+    if (status==0) {
+#if PJ_DEBUG
+	mutex->owner = pj_thread_this();
+	pj_ansi_strcpy(mutex->owner_name, mutex->owner->obj_name);
+	++mutex->nesting_level;
+
+	PJ_LOG(6,(mutex->obj_name, "Mutex acquired by thread %s (level=%d)", 
+				   pj_thread_this()->obj_name,
+				   mutex->nesting_level));
+#else
+	PJ_LOG(6,(mutex->obj_name, "Mutex acquired by thread %s", 
+				  pj_thread_this()->obj_name));
+#endif
+    } else {
+	PJ_LOG(6,(mutex->obj_name, "Mutex: thread %s's trylock() failed", 
+				    pj_thread_this()->obj_name));
+    }
+    
+    if (status==0)
+	return PJ_SUCCESS;
+    else
+	return PJ_RETURN_OS_ERROR(status);
+#else	/* PJ_HAS_THREADS */
+    pj_assert( mutex == (pj_mutex_t*)1);
+    return PJ_SUCCESS;
+#endif
+}
+
+/*
+ * pj_mutex_destroy()
+ */
+PJ_DEF(pj_status_t) pj_mutex_destroy(pj_mutex_t *mutex)
+{
+    enum { RETRY = 4 };
+    int status = 0;
+    unsigned retry;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+
+#if PJ_HAS_THREADS
+    PJ_LOG(6,(mutex->obj_name, "Mutex destroyed by thread %s",
+			       pj_thread_this()->obj_name));
+
+    for (retry=0; retry<RETRY; ++retry) {
+	status = pthread_mutex_destroy( &mutex->mutex );
+	if (status == PJ_SUCCESS)
+	    break;
+	else if (retry<RETRY-1 && status == EBUSY)
+	    pthread_mutex_unlock(&mutex->mutex);
+    }
+
+    if (status == 0)
+	return PJ_SUCCESS;
+    else {
+	pj_assert(!"Error destroying pthread_mutex");
+	return PJ_RETURN_OS_ERROR(status);
+    }
+#else
+    pj_assert( mutex == (pj_mutex_t*)1 );
+    status = PJ_SUCCESS;
+    return status;
+#endif
+}
+
+#if PJ_DEBUG
+PJ_DEF(pj_bool_t) pj_mutex_is_locked(pj_mutex_t *mutex)
+{
+#if PJ_HAS_THREADS
+    return mutex->owner == pj_thread_this();
+#else
+    return 1;
+#endif
+}
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Include Read/Write mutex emulation for POSIX platforms that lack it (e.g.
+ * RTEMS). Otherwise use POSIX rwlock.
+ */
+#if defined(PJ_EMULATE_RWMUTEX) && PJ_EMULATE_RWMUTEX!=0
+#  include "os_rwmutex.c"
+#else
+struct pj_rwmutex_t
+{
+    pthread_rwlock_t rwlock;
+};
+
+PJ_DEF(pj_status_t) pj_rwmutex_create(pj_pool_t *pool, const char *name,
+				      pj_rwmutex_t **p_mutex)
+{
+    pj_rwmutex_t *rwm;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(name);
+    
+    rwm = pj_pool_alloc(pool, sizeof(pj_rwmutex_t));
+    PJ_ASSERT_RETURN(rwm, PJ_ENOMEM);
+
+    status = pthread_rwlock_init(&rwm->rwlock, NULL);
+    if (status != 0)
+	return PJ_RETURN_OS_ERROR(status);
+
+    *p_mutex = rwm;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Lock the mutex for reading.
+ *
+ */
+PJ_DEF(pj_status_t) pj_rwmutex_lock_read(pj_rwmutex_t *mutex)
+{
+    pj_status_t status;
+
+    status = pthread_rwlock_rdlock(&mutex->rwlock);
+    if (status != 0)
+	return PJ_RETURN_OS_ERROR(status);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Lock the mutex for writing.
+ *
+ */
+PJ_DEF(pj_status_t) pj_rwmutex_lock_write(pj_rwmutex_t *mutex)
+{
+    pj_status_t status;
+
+    status = pthread_rwlock_wrlock(&mutex->rwlock);
+    if (status != 0)
+	return PJ_RETURN_OS_ERROR(status);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Release read lock.
+ *
+ */
+PJ_DEF(pj_status_t) pj_rwmutex_unlock_read(pj_rwmutex_t *mutex)
+{
+    return pj_rwmutex_unlock_write(mutex);
+}
+
+/*
+ * Release write lock.
+ *
+ */
+PJ_DEF(pj_status_t) pj_rwmutex_unlock_write(pj_rwmutex_t *mutex)
+{
+    pj_status_t status;
+
+    status = pthread_rwlock_unlock(&mutex->rwlock);
+    if (status != 0)
+	return PJ_RETURN_OS_ERROR(status);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Destroy reader/writer mutex.
+ *
+ */
+PJ_DEF(pj_status_t) pj_rwmutex_destroy(pj_rwmutex_t *mutex)
+{
+    pj_status_t status;
+
+    status = pthread_rwlock_destroy(&mutex->rwlock);
+    if (status != 0)
+	return PJ_RETURN_OS_ERROR(status);
+
+    return PJ_SUCCESS;
+}
+
+#endif	/* PJ_EMULATE_RWMUTEX */
+
+
+///////////////////////////////////////////////////////////////////////////////
+#if defined(PJ_HAS_SEMAPHORE) && PJ_HAS_SEMAPHORE != 0
+
+/*
+ * pj_sem_create()
+ */
+PJ_DEF(pj_status_t) pj_sem_create( pj_pool_t *pool, 
+				   const char *name,
+				   unsigned initial, 
+				   unsigned max,
+				   pj_sem_t **ptr_sem)
+{
+#if PJ_HAS_THREADS
+    pj_sem_t *sem;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(pool != NULL && ptr_sem != NULL, PJ_EINVAL);
+
+    sem = pj_pool_alloc(pool, sizeof(*sem));
+    PJ_ASSERT_RETURN(sem, PJ_ENOMEM);
+
+    if (sem_init( &sem->sem, 0, initial) != 0) 
+	return PJ_RETURN_OS_ERROR(pj_get_native_os_error());
+    
+    /* Set name. */
+    if (!name) {
+	name = "sem%p";
+    }
+    if (strchr(name, '%')) {
+	pj_ansi_snprintf(sem->obj_name, PJ_MAX_OBJ_NAME, name, sem);
+    } else {
+	strncpy(sem->obj_name, name, PJ_MAX_OBJ_NAME);
+	sem->obj_name[PJ_MAX_OBJ_NAME-1] = '\0';
+    }
+
+    PJ_LOG(6, (sem->obj_name, "Semaphore created"));
+
+    *ptr_sem = sem;
+    return PJ_SUCCESS;
+#else
+    *ptr_sem = (pj_sem_t*)1;
+    return PJ_SUCCESS;
+#endif
+}
+
+/*
+ * pj_sem_wait()
+ */
+PJ_DEF(pj_status_t) pj_sem_wait(pj_sem_t *sem)
+{
+#if PJ_HAS_THREADS
+    int result;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(sem, PJ_EINVAL);
+
+    PJ_LOG(6, (sem->obj_name, "Semaphore: thread %s is waiting", 
+			      pj_thread_this()->obj_name));
+
+    result = sem_wait( &sem->sem );
+    
+    if (result == 0) {
+	PJ_LOG(6, (sem->obj_name, "Semaphore acquired by thread %s", 
+				  pj_thread_this()->obj_name));
+    } else {
+	PJ_LOG(6, (sem->obj_name, "Semaphore: thread %s FAILED to acquire", 
+				  pj_thread_this()->obj_name));
+    }
+
+    if (result == 0)
+	return PJ_SUCCESS;
+    else
+	return PJ_RETURN_OS_ERROR(pj_get_native_os_error());
+#else
+    pj_assert( sem == (pj_sem_t*) 1 );
+    return PJ_SUCCESS;
+#endif
+}
+
+/*
+ * pj_sem_trywait()
+ */
+PJ_DEF(pj_status_t) pj_sem_trywait(pj_sem_t *sem)
+{
+#if PJ_HAS_THREADS
+    int result;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(sem, PJ_EINVAL);
+
+    result = sem_trywait( &sem->sem );
+    
+    if (result == 0) {
+	PJ_LOG(6, (sem->obj_name, "Semaphore acquired by thread %s", 
+				  pj_thread_this()->obj_name));
+    } 
+    if (result == 0)
+	return PJ_SUCCESS;
+    else
+	return PJ_RETURN_OS_ERROR(pj_get_native_os_error());
+#else
+    pj_assert( sem == (pj_sem_t*)1 );
+    return PJ_SUCCESS;
+#endif
+}
+
+/*
+ * pj_sem_post()
+ */
+PJ_DEF(pj_status_t) pj_sem_post(pj_sem_t *sem)
+{
+#if PJ_HAS_THREADS
+    int result;
+    PJ_LOG(6, (sem->obj_name, "Semaphore released by thread %s",
+			      pj_thread_this()->obj_name));
+    result = sem_post( &sem->sem );
+
+    if (result == 0)
+	return PJ_SUCCESS;
+    else
+	return PJ_RETURN_OS_ERROR(pj_get_native_os_error());
+#else
+    pj_assert( sem == (pj_sem_t*) 1);
+    return PJ_SUCCESS;
+#endif
+}
+
+/*
+ * pj_sem_destroy()
+ */
+PJ_DEF(pj_status_t) pj_sem_destroy(pj_sem_t *sem)
+{
+#if PJ_HAS_THREADS
+    int result;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(sem, PJ_EINVAL);
+
+    PJ_LOG(6, (sem->obj_name, "Semaphore destroyed by thread %s",
+			      pj_thread_this()->obj_name));
+    result = sem_destroy( &sem->sem );
+
+    if (result == 0)
+	return PJ_SUCCESS;
+    else
+	return PJ_RETURN_OS_ERROR(pj_get_native_os_error());
+#else
+    pj_assert( sem == (pj_sem_t*) 1 );
+    return PJ_SUCCESS;
+#endif
+}
+
+#endif	/* PJ_HAS_SEMAPHORE */
+
+///////////////////////////////////////////////////////////////////////////////
+#if defined(PJ_HAS_EVENT_OBJ) && PJ_HAS_EVENT_OBJ != 0
+
+/*
+ * pj_event_create()
+ */
+PJ_DEF(pj_status_t) pj_event_create(pj_pool_t *pool, const char *name,
+				    pj_bool_t manual_reset, pj_bool_t initial,
+				    pj_event_t **ptr_event)
+{
+    pj_assert(!"Not supported!");
+    PJ_UNUSED_ARG(pool);
+    PJ_UNUSED_ARG(name);
+    PJ_UNUSED_ARG(manual_reset);
+    PJ_UNUSED_ARG(initial);
+    PJ_UNUSED_ARG(ptr_event);
+    return PJ_EINVALIDOP;
+}
+
+/*
+ * pj_event_wait()
+ */
+PJ_DEF(pj_status_t) pj_event_wait(pj_event_t *event)
+{
+    PJ_UNUSED_ARG(event);
+    return PJ_EINVALIDOP;
+}
+
+/*
+ * pj_event_trywait()
+ */
+PJ_DEF(pj_status_t) pj_event_trywait(pj_event_t *event)
+{
+    PJ_UNUSED_ARG(event);
+    return PJ_EINVALIDOP;
+}
+
+/*
+ * pj_event_set()
+ */
+PJ_DEF(pj_status_t) pj_event_set(pj_event_t *event)
+{
+    PJ_UNUSED_ARG(event);
+    return PJ_EINVALIDOP;
+}
+
+/*
+ * pj_event_pulse()
+ */
+PJ_DEF(pj_status_t) pj_event_pulse(pj_event_t *event)
+{
+    PJ_UNUSED_ARG(event);
+    return PJ_EINVALIDOP;
+}
+
+/*
+ * pj_event_reset()
+ */
+PJ_DEF(pj_status_t) pj_event_reset(pj_event_t *event)
+{
+    PJ_UNUSED_ARG(event);
+    return PJ_EINVALIDOP;
+}
+
+/*
+ * pj_event_destroy()
+ */
+PJ_DEF(pj_status_t) pj_event_destroy(pj_event_t *event)
+{
+    PJ_UNUSED_ARG(event);
+    return PJ_EINVALIDOP;
+}
+
+#endif	/* PJ_HAS_EVENT_OBJ */
+
+///////////////////////////////////////////////////////////////////////////////
+#if defined(PJ_TERM_HAS_COLOR) && PJ_TERM_HAS_COLOR != 0
+/*
+ * Terminal
+ */
+
+/**
+ * Set terminal color.
+ */
+PJ_DEF(pj_status_t) pj_term_set_color(pj_color_t color)
+{
+    PJ_UNUSED_ARG(color);
+    return PJ_EINVALIDOP;
+}
+
+/**
+ * Get current terminal foreground color.
+ */
+PJ_DEF(pj_color_t) pj_term_get_color(void)
+{
+    return 0;
+}
+
+#endif	/* PJ_TERM_HAS_COLOR */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_core_win32.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_core_win32.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_core_win32.c	(revision 1163)
@@ -0,0 +1,1316 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/pool.h>
+#include <pj/log.h>
+#include <pj/string.h>
+#include <pj/guid.h>
+#include <pj/rand.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+#include <pj/except.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#if defined(PJ_HAS_WINSOCK_H) && PJ_HAS_WINSOCK_H != 0
+#  include <winsock.h>
+#endif
+
+#if defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H != 0
+#  include <winsock2.h>
+#endif
+
+#define THIS_FILE	"os_core_win32.c"
+
+/*
+ * Implementation of pj_thread_t.
+ */
+struct pj_thread_t
+{
+    char	    obj_name[PJ_MAX_OBJ_NAME];
+    HANDLE	    hthread;
+    DWORD	    idthread;
+    pj_thread_proc *proc;
+    void	   *arg;
+
+#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0
+    pj_uint32_t	    stk_size;
+    pj_uint32_t	    stk_max_usage;
+    char	   *stk_start;
+    const char	   *caller_file;
+    int		    caller_line;
+#endif
+};
+
+
+/*
+ * Implementation of pj_mutex_t.
+ */
+struct pj_mutex_t
+{
+#if PJ_WIN32_WINNT >= 0x0400
+    CRITICAL_SECTION	crit;
+#else
+    HANDLE		hMutex;
+#endif
+    char		obj_name[PJ_MAX_OBJ_NAME];
+#if PJ_DEBUG
+    int		        nesting_level;
+    pj_thread_t	       *owner;
+#endif
+};
+
+/*
+ * Implementation of pj_sem_t.
+ */
+typedef struct pj_sem_t
+{
+    HANDLE		hSemaphore;
+    char		obj_name[PJ_MAX_OBJ_NAME];
+} pj_mem_t;
+
+
+/*
+ * Implementation of pj_event_t.
+ */
+struct pj_event_t
+{
+    HANDLE		hEvent;
+    char		obj_name[PJ_MAX_OBJ_NAME];
+};
+
+/*
+ * Implementation of pj_atomic_t.
+ */
+struct pj_atomic_t
+{
+    long value;
+};
+
+/*
+ * Static global variables.
+ */
+static pj_thread_desc main_thread;
+static long thread_tls_id = -1;
+static pj_mutex_t critical_section_mutex;
+static unsigned atexit_count;
+static void (*atexit_func[32])(void);
+
+/*
+ * Some static prototypes.
+ */
+static pj_status_t init_mutex(pj_mutex_t *mutex, const char *name);
+
+
+/*
+ * pj_init(void).
+ * Init PJLIB!
+ */
+PJ_DEF(pj_status_t) pj_init(void)
+{
+    WSADATA wsa;
+    char dummy_guid[32]; /* use maximum GUID length */
+    pj_str_t guid;
+    pj_status_t rc;
+
+    /* Init Winsock.. */
+    if (WSAStartup(MAKEWORD(2,0), &wsa) != 0) {
+	return PJ_RETURN_OS_ERROR(WSAGetLastError());
+    }
+
+    /* Init this thread's TLS. */
+    if ((rc=pj_thread_init()) != PJ_SUCCESS) {
+	return rc;
+    }
+    
+    /* Init random seed. */
+    pj_srand( GetCurrentProcessId() );
+
+    /* Startup GUID. */
+    guid.ptr = dummy_guid;
+    pj_generate_unique_string( &guid );
+
+    /* Initialize critical section. */
+    if ((rc=init_mutex(&critical_section_mutex, "pj%p")) != PJ_SUCCESS)
+	return rc;
+
+    /* Initialize exception ID for the pool. 
+     * Must do so after critical section is configured.
+     */
+    rc = pj_exception_id_alloc("PJLIB/No memory", &PJ_NO_MEMORY_EXCEPTION);
+    if (rc != PJ_SUCCESS)
+        return rc;
+
+    /* Startup timestamp */
+#if defined(PJ_HAS_HIGH_RES_TIMER) && PJ_HAS_HIGH_RES_TIMER != 0
+    {
+	pj_timestamp dummy_ts;
+	if ((rc=pj_get_timestamp_freq(&dummy_ts)) != PJ_SUCCESS) {
+	    return rc;
+	}
+	if ((rc=pj_get_timestamp(&dummy_ts)) != PJ_SUCCESS) {
+	    return rc;
+	}
+    }
+#endif   
+
+    PJ_LOG(4,(THIS_FILE, "pjlib %s for win32 initialized",
+	      PJ_VERSION));
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_atexit()
+ */
+PJ_DEF(pj_status_t) pj_atexit(void (*func)(void))
+{
+    if (atexit_count >= PJ_ARRAY_SIZE(atexit_func))
+	return PJ_ETOOMANY;
+
+    atexit_func[atexit_count++] = func;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * pj_shutdown(void)
+ */
+PJ_DEF(void) pj_shutdown()
+{
+    int i;
+
+    /* Call atexit() functions */
+    for (i=atexit_count-1; i>=0; --i) {
+	(*atexit_func[i])();
+    }
+    atexit_count = 0;
+
+    /* Free exception ID */
+    if (PJ_NO_MEMORY_EXCEPTION != -1) {
+	pj_exception_id_free(PJ_NO_MEMORY_EXCEPTION);
+	PJ_NO_MEMORY_EXCEPTION = -1;
+    }
+
+    /* Destroy PJLIB critical section */
+    pj_mutex_destroy(&critical_section_mutex);
+
+    /* Free PJLIB TLS */
+    if (thread_tls_id != -1) {
+	pj_thread_local_free(thread_tls_id);
+	thread_tls_id = -1;
+    }
+
+    /* Clear static variables */
+    pj_errno_clear_handlers();
+
+    /* Shutdown Winsock */
+    //WSACleanup();
+}
+
+
+/*
+ * pj_getpid(void)
+ */
+PJ_DEF(pj_uint32_t) pj_getpid(void)
+{
+    PJ_CHECK_STACK();
+    return GetCurrentProcessId();
+}
+
+/*
+ * Check if this thread has been registered to PJLIB.
+ */
+PJ_DEF(pj_bool_t) pj_thread_is_registered(void)
+{
+    return pj_thread_local_get(thread_tls_id) != 0;
+}
+
+/*
+ * pj_thread_register(..)
+ */
+PJ_DEF(pj_status_t) pj_thread_register ( const char *cstr_thread_name,
+					 pj_thread_desc desc,
+                                         pj_thread_t **thread_ptr)
+{
+    char stack_ptr;
+    pj_status_t rc;
+    pj_thread_t *thread = (pj_thread_t *)desc;
+    pj_str_t thread_name = pj_str((char*)cstr_thread_name);
+
+    /* Size sanity check. */
+    if (sizeof(pj_thread_desc) < sizeof(pj_thread_t)) {
+	pj_assert(!"Not enough pj_thread_desc size!");
+	return PJ_EBUG;
+    }
+
+    /* If a thread descriptor has been registered before, just return it. */
+    if (pj_thread_local_get (thread_tls_id) != 0) {
+	// 2006-02-26 bennylp:
+	//  This wouldn't work in all cases!.
+	//  If thread is created by external module (e.g. sound thread),
+	//  thread may be reused while the pool used for the thread descriptor
+	//  has been deleted by application.
+	//*thread_ptr = (pj_thread_t*)pj_thread_local_get (thread_tls_id);
+        //return PJ_SUCCESS;
+    }
+
+    /* Initialize and set the thread entry. */
+    pj_bzero(desc, sizeof(struct pj_thread_t));
+    thread->hthread = GetCurrentThread();
+    thread->idthread = GetCurrentThreadId();
+
+#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0
+    thread->stk_start = &stack_ptr;
+    thread->stk_size = 0xFFFFFFFFUL;
+    thread->stk_max_usage = 0;
+#else
+    stack_ptr = '\0';
+#endif
+
+    if (cstr_thread_name && pj_strlen(&thread_name) < sizeof(thread->obj_name)-1)
+	pj_ansi_snprintf(thread->obj_name, sizeof(thread->obj_name), 
+			 cstr_thread_name, thread->idthread);
+    else
+	pj_ansi_snprintf(thread->obj_name, sizeof(thread->obj_name), 
+		         "thr%p", (void*)thread->idthread);
+    
+    rc = pj_thread_local_set(thread_tls_id, thread);
+    if (rc != PJ_SUCCESS)
+	return rc;
+
+    *thread_ptr = thread;
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_thread_init(void)
+ */
+pj_status_t pj_thread_init(void)
+{
+    pj_status_t rc;
+    pj_thread_t *thread;
+
+    rc = pj_thread_local_alloc(&thread_tls_id);
+    if (rc != PJ_SUCCESS)
+	return rc;
+
+    return pj_thread_register("thr%p", main_thread, &thread);
+}
+
+static DWORD WINAPI thread_main(void *param)
+{
+    pj_thread_t *rec = param;
+    DWORD result;
+
+#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0
+    rec->stk_start = (char*)&rec;
+#endif
+
+    if (pj_thread_local_set(thread_tls_id, rec) != PJ_SUCCESS) {
+	pj_assert(!"TLS is not set (pj_init() error?)");
+    }
+
+    PJ_LOG(6,(rec->obj_name, "Thread started"));
+
+    result = (*rec->proc)(rec->arg);
+
+    PJ_LOG(6,(rec->obj_name, "Thread quitting"));
+    return (DWORD)result;
+}
+
+/*
+ * pj_thread_create(...)
+ */
+PJ_DEF(pj_status_t) pj_thread_create( pj_pool_t *pool, 
+                                      const char *thread_name,
+				      pj_thread_proc *proc, 
+                                      void *arg,
+				      pj_size_t stack_size, 
+				      unsigned flags,
+                                      pj_thread_t **thread_ptr)
+{
+    DWORD dwflags = 0;
+    pj_thread_t *rec;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(pool && proc && thread_ptr, PJ_EINVAL);
+
+    /* Set flags */
+    if (flags & PJ_THREAD_SUSPENDED)
+	dwflags |= CREATE_SUSPENDED;
+
+    /* Create thread record and assign name for the thread */
+    rec = (struct pj_thread_t*) pj_pool_calloc(pool, 1, sizeof(pj_thread_t));
+    if (!rec)
+	return PJ_ENOMEM;
+
+    /* Set name. */
+    if (!thread_name)
+	thread_name = "thr%p";
+
+    if (strchr(thread_name, '%')) {
+	pj_ansi_snprintf(rec->obj_name, PJ_MAX_OBJ_NAME, thread_name, rec);
+    } else {
+	pj_ansi_strncpy(rec->obj_name, thread_name, PJ_MAX_OBJ_NAME);
+	rec->obj_name[PJ_MAX_OBJ_NAME-1] = '\0';
+    }
+
+    PJ_LOG(6, (rec->obj_name, "Thread created"));
+
+#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK!=0
+    rec->stk_size = stack_size ? stack_size : 0xFFFFFFFFUL;
+    rec->stk_max_usage = 0;
+#endif
+
+    /* Create the thread. */
+    rec->proc = proc;
+    rec->arg = arg;
+    rec->hthread = CreateThread(NULL, stack_size, 
+				thread_main, rec,
+				dwflags, &rec->idthread);
+    if (rec->hthread == NULL)
+	return PJ_RETURN_OS_ERROR(GetLastError());
+
+    /* Success! */
+    *thread_ptr = rec;
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_thread-get_name()
+ */
+PJ_DEF(const char*) pj_thread_get_name(pj_thread_t *p)
+{
+    pj_thread_t *rec = (pj_thread_t*)p;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(p, "");
+
+    return rec->obj_name;
+}
+
+/*
+ * pj_thread_resume()
+ */
+PJ_DEF(pj_status_t) pj_thread_resume(pj_thread_t *p)
+{
+    pj_thread_t *rec = (pj_thread_t*)p;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(p, PJ_EINVAL);
+
+    if (ResumeThread(rec->hthread) == (DWORD)-1)
+        return PJ_RETURN_OS_ERROR(GetLastError());
+    else
+        return PJ_SUCCESS;
+}
+
+/*
+ * pj_thread_this()
+ */
+PJ_DEF(pj_thread_t*) pj_thread_this(void)
+{
+    pj_thread_t *rec = pj_thread_local_get(thread_tls_id);
+
+    if (rec == NULL) {
+	pj_assert(!"Calling pjlib from unknown/external thread. You must "
+		   "register external threads with pj_thread_register() "
+		   "before calling any pjlib functions.");
+    }
+
+    /*
+     * MUST NOT check stack because this function is called
+     * by PJ_CHECK_STACK() itself!!!
+     *
+     */
+
+    return rec;
+}
+
+/*
+ * pj_thread_join()
+ */
+PJ_DEF(pj_status_t) pj_thread_join(pj_thread_t *p)
+{
+    pj_thread_t *rec = (pj_thread_t *)p;
+    DWORD rc;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(p, PJ_EINVAL);
+
+    PJ_LOG(6, (pj_thread_this()->obj_name, "Joining thread %s", p->obj_name));
+
+    rc = WaitForSingleObject(rec->hthread, INFINITE);
+
+    if (rc==WAIT_OBJECT_0)
+        return PJ_SUCCESS;
+    else if (rc==WAIT_TIMEOUT)
+        return PJ_ETIMEDOUT;
+    else
+        return PJ_RETURN_OS_ERROR(GetLastError());
+}
+
+/*
+ * pj_thread_destroy()
+ */
+PJ_DEF(pj_status_t) pj_thread_destroy(pj_thread_t *p)
+{
+    pj_thread_t *rec = (pj_thread_t *)p;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(p, PJ_EINVAL);
+
+    if (CloseHandle(rec->hthread) == TRUE)
+        return PJ_SUCCESS;
+    else
+        return PJ_RETURN_OS_ERROR(GetLastError());
+}
+
+/*
+ * pj_thread_sleep()
+ */
+PJ_DEF(pj_status_t) pj_thread_sleep(unsigned msec)
+{
+    PJ_CHECK_STACK();
+    Sleep(msec);
+    return PJ_SUCCESS;
+}
+
+#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK != 0
+/*
+ * pj_thread_check_stack()
+ * Implementation for PJ_CHECK_STACK()
+ */
+PJ_DEF(void) pj_thread_check_stack(const char *file, int line)
+{
+    char stk_ptr;
+    pj_uint32_t usage;
+    pj_thread_t *thread = pj_thread_this();
+
+    pj_assert(thread);
+
+    /* Calculate current usage. */
+    usage = (&stk_ptr > thread->stk_start) ? &stk_ptr - thread->stk_start :
+		thread->stk_start - &stk_ptr;
+
+    /* Assert if stack usage is dangerously high. */
+    pj_assert("STACK OVERFLOW!! " && (usage <= thread->stk_size - 128));
+
+    /* Keep statistic. */
+    if (usage > thread->stk_max_usage) {
+	thread->stk_max_usage = usage;
+	thread->caller_file = file;
+	thread->caller_line = line;
+    }
+
+}
+
+/*
+ * pj_thread_get_stack_max_usage()
+ */
+PJ_DEF(pj_uint32_t) pj_thread_get_stack_max_usage(pj_thread_t *thread)
+{
+    return thread->stk_max_usage;
+}
+
+/*
+ * pj_thread_get_stack_info()
+ */
+PJ_DEF(pj_status_t) pj_thread_get_stack_info( pj_thread_t *thread,
+					      const char **file,
+					      int *line )
+{
+    pj_assert(thread);
+
+    *file = thread->caller_file;
+    *line = thread->caller_line;
+    return 0;
+}
+
+#endif	/* PJ_OS_HAS_CHECK_STACK */
+
+
+///////////////////////////////////////////////////////////////////////////////
+
+/*
+ * pj_atomic_create()
+ */
+PJ_DEF(pj_status_t) pj_atomic_create( pj_pool_t *pool, 
+                                      pj_atomic_value_t initial,
+                                      pj_atomic_t **atomic_ptr)
+{
+    pj_atomic_t *atomic_var = pj_pool_alloc(pool, sizeof(pj_atomic_t));
+    if (!atomic_var)
+	return PJ_ENOMEM;
+
+    atomic_var->value = initial;
+    *atomic_ptr = atomic_var;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_atomic_destroy()
+ */
+PJ_DEF(pj_status_t) pj_atomic_destroy( pj_atomic_t *var )
+{
+    PJ_UNUSED_ARG(var);
+    PJ_ASSERT_RETURN(var, PJ_EINVAL);
+
+    return 0;
+}
+
+/*
+ * pj_atomic_set()
+ */
+PJ_DEF(void) pj_atomic_set( pj_atomic_t *atomic_var, pj_atomic_value_t value)
+{
+    PJ_CHECK_STACK();
+
+    InterlockedExchange(&atomic_var->value, value);
+}
+
+/*
+ * pj_atomic_get()
+ */
+PJ_DEF(pj_atomic_value_t) pj_atomic_get(pj_atomic_t *atomic_var)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(atomic_var, 0);
+
+    return atomic_var->value;
+}
+
+/*
+ * pj_atomic_inc_and_get()
+ */
+PJ_DEF(pj_atomic_value_t) pj_atomic_inc_and_get(pj_atomic_t *atomic_var)
+{
+    PJ_CHECK_STACK();
+
+#if defined(PJ_WIN32_WINNT) && PJ_WIN32_WINNT >= 0x0400
+    return InterlockedIncrement(&atomic_var->value);
+#else
+    return InterlockedIncrement(&atomic_var->value);
+#endif
+}
+
+/*
+ * pj_atomic_inc()
+ */
+PJ_DEF(void) pj_atomic_inc(pj_atomic_t *atomic_var)
+{
+    pj_atomic_inc_and_get(atomic_var);
+}
+
+/*
+ * pj_atomic_dec_and_get()
+ */
+PJ_DEF(pj_atomic_value_t) pj_atomic_dec_and_get(pj_atomic_t *atomic_var)
+{
+    PJ_CHECK_STACK();
+
+#if defined(PJ_WIN32_WINNT) && PJ_WIN32_WINNT >= 0x0400
+    return InterlockedDecrement(&atomic_var->value);
+#else
+    return InterlockedDecrement(&atomic_var->value);
+#endif
+}
+
+/*
+ * pj_atomic_dec()
+ */
+PJ_DEF(void) pj_atomic_dec(pj_atomic_t *atomic_var)
+{
+    pj_atomic_dec_and_get(atomic_var);
+}
+
+/*
+ * pj_atomic_add()
+ */
+PJ_DEF(void) pj_atomic_add( pj_atomic_t *atomic_var,
+			    pj_atomic_value_t value )
+{
+#if defined(PJ_WIN32_WINNT) && PJ_WIN32_WINNT >= 0x0400
+    InterlockedExchangeAdd( &atomic_var->value, value );
+#else
+    InterlockedExchangeAdd( &atomic_var->value, value );
+#endif
+}
+
+/*
+ * pj_atomic_add_and_get()
+ */
+PJ_DEF(pj_atomic_value_t) pj_atomic_add_and_get( pj_atomic_t *atomic_var,
+			                         pj_atomic_value_t value)
+{
+#if defined(PJ_WIN32_WINNT) && PJ_WIN32_WINNT >= 0x0400
+    long oldValue = InterlockedExchangeAdd( &atomic_var->value, value);
+    return oldValue + value;
+#else
+    long oldValue = InterlockedExchangeAdd( &atomic_var->value, value);
+    return oldValue + value;
+#endif
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * pj_thread_local_alloc()
+ */
+PJ_DEF(pj_status_t) pj_thread_local_alloc(long *index)
+{
+    PJ_ASSERT_RETURN(index != NULL, PJ_EINVAL);
+
+    //Can't check stack because this function is called in the
+    //beginning before main thread is initialized.
+    //PJ_CHECK_STACK();
+
+    *index = TlsAlloc();
+
+    if (*index == TLS_OUT_OF_INDEXES)
+        return PJ_RETURN_OS_ERROR(GetLastError());
+    else
+        return PJ_SUCCESS;
+}
+
+/*
+ * pj_thread_local_free()
+ */
+PJ_DEF(void) pj_thread_local_free(long index)
+{
+    PJ_CHECK_STACK();
+    TlsFree(index);
+}
+
+/*
+ * pj_thread_local_set()
+ */
+PJ_DEF(pj_status_t) pj_thread_local_set(long index, void *value)
+{
+    BOOL rc;
+
+    //Can't check stack because this function is called in the
+    //beginning before main thread is initialized.
+    //PJ_CHECK_STACK();
+    rc = TlsSetValue(index, value);
+    return rc!=0 ? PJ_SUCCESS : PJ_RETURN_OS_ERROR(GetLastError());
+}
+
+/*
+ * pj_thread_local_get()
+ */
+PJ_DEF(void*) pj_thread_local_get(long index)
+{
+    //Can't check stack because this function is called
+    //by PJ_CHECK_STACK() itself!!!
+    //PJ_CHECK_STACK();
+    return TlsGetValue(index);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+static pj_status_t init_mutex(pj_mutex_t *mutex, const char *name)
+{
+
+    PJ_CHECK_STACK();
+
+#if PJ_WIN32_WINNT >= 0x0400
+    InitializeCriticalSection(&mutex->crit);
+#else
+    mutex->hMutex = CreateMutex(NULL, FALSE, NULL);
+    if (!mutex->hMutex) {
+	return PJ_RETURN_OS_ERROR(GetLastError());
+    }
+#endif
+
+#if PJ_DEBUG
+    /* Set owner. */
+    mutex->nesting_level = 0;
+    mutex->owner = NULL;
+#endif
+
+    /* Set name. */
+    if (!name) {
+	name = "mtx%p";
+    }
+    if (strchr(name, '%')) {
+	pj_ansi_snprintf(mutex->obj_name, PJ_MAX_OBJ_NAME, name, mutex);
+    } else {
+	pj_ansi_strncpy(mutex->obj_name, name, PJ_MAX_OBJ_NAME);
+	mutex->obj_name[PJ_MAX_OBJ_NAME-1] = '\0';
+    }
+
+    PJ_LOG(6, (mutex->obj_name, "Mutex created"));
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_mutex_create()
+ */
+PJ_DEF(pj_status_t) pj_mutex_create(pj_pool_t *pool, 
+                                    const char *name, 
+                                    int type,
+                                    pj_mutex_t **mutex_ptr)
+{
+    pj_status_t rc;
+    pj_mutex_t *mutex;
+
+    PJ_UNUSED_ARG(type);
+    PJ_ASSERT_RETURN(pool && mutex_ptr, PJ_EINVAL);
+
+    mutex = pj_pool_alloc(pool, sizeof(*mutex));
+    if (!mutex)
+        return PJ_ENOMEM;
+
+    rc = init_mutex(mutex, name);
+    if (rc != PJ_SUCCESS)
+        return rc;
+
+    *mutex_ptr = mutex;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * pj_mutex_create_simple()
+ */
+PJ_DEF(pj_status_t) pj_mutex_create_simple( pj_pool_t *pool, 
+                                            const char *name,
+					    pj_mutex_t **mutex )
+{
+    return pj_mutex_create(pool, name, PJ_MUTEX_SIMPLE, mutex);
+}
+
+/*
+ * pj_mutex_create_recursive()
+ */
+PJ_DEF(pj_status_t) pj_mutex_create_recursive( pj_pool_t *pool,
+					       const char *name,
+					       pj_mutex_t **mutex )
+{
+    return pj_mutex_create(pool, name, PJ_MUTEX_RECURSE, mutex);
+}
+
+/*
+ * pj_mutex_lock()
+ */
+PJ_DEF(pj_status_t) pj_mutex_lock(pj_mutex_t *mutex)
+{
+    pj_status_t status;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+
+    PJ_LOG(6,(mutex->obj_name, "Mutex: thread %s is waiting", 
+				pj_thread_this()->obj_name));
+
+#if PJ_WIN32_WINNT >= 0x0400
+    EnterCriticalSection(&mutex->crit);
+    status=PJ_SUCCESS;
+#else
+    if (WaitForSingleObject(mutex->hMutex, INFINITE)==WAIT_OBJECT_0)
+        status = PJ_SUCCESS;
+    else
+        status = PJ_STATUS_FROM_OS(GetLastError());
+
+#endif
+    PJ_LOG(6,(mutex->obj_name, 
+	      (status==PJ_SUCCESS ? "Mutex acquired by thread %s" : "FAILED by %s"),
+	      pj_thread_this()->obj_name));
+
+#if PJ_DEBUG
+    if (status == PJ_SUCCESS) {
+	mutex->owner = pj_thread_this();
+	++mutex->nesting_level;
+    }
+#endif
+
+    return status;
+}
+
+/*
+ * pj_mutex_unlock()
+ */
+PJ_DEF(pj_status_t) pj_mutex_unlock(pj_mutex_t *mutex)
+{
+    pj_status_t status;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+
+#if PJ_DEBUG
+    pj_assert(mutex->owner == pj_thread_this());
+    if (--mutex->nesting_level == 0) {
+	mutex->owner = NULL;
+    }
+#endif
+
+    PJ_LOG(6,(mutex->obj_name, "Mutex released by thread %s", 
+				pj_thread_this()->obj_name));
+
+#if PJ_WIN32_WINNT >= 0x0400
+    LeaveCriticalSection(&mutex->crit);
+    status=PJ_SUCCESS;
+#else
+    status = ReleaseMutex(mutex->hMutex) ? PJ_SUCCESS : 
+                PJ_STATUS_FROM_OS(GetLastError());
+#endif
+    return status;
+}
+
+/*
+ * pj_mutex_trylock()
+ */
+PJ_DEF(pj_status_t) pj_mutex_trylock(pj_mutex_t *mutex)
+{
+    pj_status_t status;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+
+    PJ_LOG(6,(mutex->obj_name, "Mutex: thread %s is trying", 
+				pj_thread_this()->obj_name));
+
+#if PJ_WIN32_WINNT >= 0x0400
+    status=TryEnterCriticalSection(&mutex->crit) ? PJ_SUCCESS : PJ_EUNKNOWN;
+#else
+    status = WaitForSingleObject(mutex->hMutex, 0)==WAIT_OBJECT_0 ? 
+                PJ_SUCCESS : PJ_ETIMEDOUT;
+#endif
+    if (status==PJ_SUCCESS) {
+	PJ_LOG(6,(mutex->obj_name, "Mutex acquired by thread %s", 
+				  pj_thread_this()->obj_name));
+
+#if PJ_DEBUG
+	mutex->owner = pj_thread_this();
+	++mutex->nesting_level;
+#endif
+    } else {
+	PJ_LOG(6,(mutex->obj_name, "Mutex: thread %s's trylock() failed", 
+				    pj_thread_this()->obj_name));
+    }
+
+    return status;
+}
+
+/*
+ * pj_mutex_destroy()
+ */
+PJ_DEF(pj_status_t) pj_mutex_destroy(pj_mutex_t *mutex)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+
+    PJ_LOG(6,(mutex->obj_name, "Mutex destroyed"));
+
+#if PJ_WIN32_WINNT >= 0x0400
+    DeleteCriticalSection(&mutex->crit);
+    return PJ_SUCCESS;
+#else
+    return CloseHandle(mutex->hMutex) ? PJ_SUCCESS : 
+            PJ_RETURN_OS_ERROR(GetLastError());
+#endif
+}
+
+#if PJ_DEBUG
+/*
+ * pj_mutex_is_locked()
+ */
+PJ_DEF(pj_bool_t) pj_mutex_is_locked(pj_mutex_t *mutex)
+{
+    return mutex->owner == pj_thread_this();
+}
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Win32 lacks Read/Write mutex, so include the emulation.
+ */
+#include "os_rwmutex.c"
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * pj_enter_critical_section()
+ */
+PJ_DEF(void) pj_enter_critical_section(void)
+{
+    pj_mutex_lock(&critical_section_mutex);
+}
+
+
+/*
+ * pj_leave_critical_section()
+ */
+PJ_DEF(void) pj_leave_critical_section(void)
+{
+    pj_mutex_unlock(&critical_section_mutex);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+#if defined(PJ_HAS_SEMAPHORE) && PJ_HAS_SEMAPHORE != 0
+
+/*
+ * pj_sem_create()
+ */
+PJ_DEF(pj_status_t) pj_sem_create( pj_pool_t *pool, 
+                                   const char *name,
+				   unsigned initial, 
+                                   unsigned max,
+                                   pj_sem_t **sem_ptr)
+{
+    pj_sem_t *sem;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(pool && sem_ptr, PJ_EINVAL);
+
+    sem = pj_pool_alloc(pool, sizeof(*sem));    
+    sem->hSemaphore = CreateSemaphore(NULL, initial, max, NULL);
+    if (!sem->hSemaphore)
+	return PJ_RETURN_OS_ERROR(GetLastError());
+
+    /* Set name. */
+    if (!name) {
+	name = "sem%p";
+    }
+    if (strchr(name, '%')) {
+	pj_ansi_snprintf(sem->obj_name, PJ_MAX_OBJ_NAME, name, sem);
+    } else {
+	pj_ansi_strncpy(sem->obj_name, name, PJ_MAX_OBJ_NAME);
+	sem->obj_name[PJ_MAX_OBJ_NAME-1] = '\0';
+    }
+
+    PJ_LOG(6, (sem->obj_name, "Semaphore created"));
+
+    *sem_ptr = sem;
+    return PJ_SUCCESS;
+}
+
+static pj_status_t pj_sem_wait_for(pj_sem_t *sem, unsigned timeout)
+{
+    DWORD result;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(sem, PJ_EINVAL);
+
+    PJ_LOG(6, (sem->obj_name, "Semaphore: thread %s is waiting", 
+			      pj_thread_this()->obj_name));
+
+    result = WaitForSingleObject(sem->hSemaphore, timeout);
+    if (result == WAIT_OBJECT_0) {
+	PJ_LOG(6, (sem->obj_name, "Semaphore acquired by thread %s", 
+				  pj_thread_this()->obj_name));
+    } else {
+	PJ_LOG(6, (sem->obj_name, "Semaphore: thread %s FAILED to acquire", 
+				  pj_thread_this()->obj_name));
+    }
+
+    if (result==WAIT_OBJECT_0)
+        return PJ_SUCCESS;
+    else if (result==WAIT_TIMEOUT)
+        return PJ_ETIMEDOUT;
+    else
+        return PJ_RETURN_OS_ERROR(GetLastError());
+}
+
+/*
+ * pj_sem_wait()
+ */
+PJ_DEF(pj_status_t) pj_sem_wait(pj_sem_t *sem)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(sem, PJ_EINVAL);
+
+    return pj_sem_wait_for(sem, INFINITE);
+}
+
+/*
+ * pj_sem_trywait()
+ */
+PJ_DEF(pj_status_t) pj_sem_trywait(pj_sem_t *sem)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(sem, PJ_EINVAL);
+
+    return pj_sem_wait_for(sem, 0);
+}
+
+/*
+ * pj_sem_post()
+ */
+PJ_DEF(pj_status_t) pj_sem_post(pj_sem_t *sem)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(sem, PJ_EINVAL);
+
+    PJ_LOG(6, (sem->obj_name, "Semaphore released by thread %s",
+			      pj_thread_this()->obj_name));
+
+    if (ReleaseSemaphore(sem->hSemaphore, 1, NULL))
+        return PJ_SUCCESS;
+    else
+        return PJ_RETURN_OS_ERROR(GetLastError());
+}
+
+/*
+ * pj_sem_destroy()
+ */
+PJ_DEF(pj_status_t) pj_sem_destroy(pj_sem_t *sem)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(sem, PJ_EINVAL);
+
+    PJ_LOG(6, (sem->obj_name, "Semaphore destroyed by thread %s",
+			      pj_thread_this()->obj_name));
+
+    if (CloseHandle(sem->hSemaphore))
+        return PJ_SUCCESS;
+    else
+        return PJ_RETURN_OS_ERROR(GetLastError());
+}
+
+#endif	/* PJ_HAS_SEMAPHORE */
+///////////////////////////////////////////////////////////////////////////////
+
+
+#if defined(PJ_HAS_EVENT_OBJ) && PJ_HAS_EVENT_OBJ != 0
+
+/*
+ * pj_event_create()
+ */
+PJ_DEF(pj_status_t) pj_event_create( pj_pool_t *pool, 
+                                     const char *name,
+				     pj_bool_t manual_reset, 
+                                     pj_bool_t initial,
+                                     pj_event_t **event_ptr)
+{
+    pj_event_t *event;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(pool && event_ptr, PJ_EINVAL);
+
+    event = pj_pool_alloc(pool, sizeof(*event));
+    if (!event)
+        return PJ_ENOMEM;
+
+    event->hEvent = CreateEvent(NULL, manual_reset?TRUE:FALSE, 
+				initial?TRUE:FALSE, NULL);
+
+    if (!event->hEvent)
+	return PJ_RETURN_OS_ERROR(GetLastError());
+
+    /* Set name. */
+    if (!name) {
+	name = "evt%p";
+    }
+    if (strchr(name, '%')) {
+	pj_ansi_snprintf(event->obj_name, PJ_MAX_OBJ_NAME, name, event);
+    } else {
+	pj_ansi_strncpy(event->obj_name, name, PJ_MAX_OBJ_NAME);
+	event->obj_name[PJ_MAX_OBJ_NAME-1] = '\0';
+    }
+
+    PJ_LOG(6, (event->obj_name, "Event created"));
+
+    *event_ptr = event;
+    return PJ_SUCCESS;
+}
+
+static pj_status_t pj_event_wait_for(pj_event_t *event, unsigned timeout)
+{
+    DWORD result;
+
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(event, PJ_EINVAL);
+
+    PJ_LOG(6, (event->obj_name, "Event: thread %s is waiting", 
+			        pj_thread_this()->obj_name));
+
+    result = WaitForSingleObject(event->hEvent, timeout);
+    if (result == WAIT_OBJECT_0) {
+	PJ_LOG(6, (event->obj_name, "Event: thread %s is released", 
+				    pj_thread_this()->obj_name));
+    } else {
+	PJ_LOG(6, (event->obj_name, "Event: thread %s FAILED to acquire", 
+				    pj_thread_this()->obj_name));
+    }
+
+    if (result==WAIT_OBJECT_0)
+        return PJ_SUCCESS;
+    else if (result==WAIT_TIMEOUT)
+        return PJ_ETIMEDOUT;
+    else
+        return PJ_RETURN_OS_ERROR(GetLastError());
+}
+
+/*
+ * pj_event_wait()
+ */
+PJ_DEF(pj_status_t) pj_event_wait(pj_event_t *event)
+{
+    PJ_ASSERT_RETURN(event, PJ_EINVAL);
+
+    return pj_event_wait_for(event, INFINITE);
+}
+
+/*
+ * pj_event_trywait()
+ */
+PJ_DEF(pj_status_t) pj_event_trywait(pj_event_t *event)
+{
+    PJ_ASSERT_RETURN(event, PJ_EINVAL);
+
+    return pj_event_wait_for(event, 0);
+}
+
+/*
+ * pj_event_set()
+ */
+PJ_DEF(pj_status_t) pj_event_set(pj_event_t *event)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(event, PJ_EINVAL);
+
+    PJ_LOG(6, (event->obj_name, "Setting event"));
+
+    if (SetEvent(event->hEvent))
+        return PJ_SUCCESS;
+    else
+        return PJ_RETURN_OS_ERROR(GetLastError());
+}
+
+/*
+ * pj_event_pulse()
+ */
+PJ_DEF(pj_status_t) pj_event_pulse(pj_event_t *event)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(event, PJ_EINVAL);
+
+    PJ_LOG(6, (event->obj_name, "Pulsing event"));
+
+    if (PulseEvent(event->hEvent))
+        return PJ_SUCCESS;
+    else
+        return PJ_RETURN_OS_ERROR(GetLastError());
+}
+
+/*
+ * pj_event_reset()
+ */
+PJ_DEF(pj_status_t) pj_event_reset(pj_event_t *event)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(event, PJ_EINVAL);
+
+    PJ_LOG(6, (event->obj_name, "Event is reset"));
+
+    if (ResetEvent(event->hEvent))
+        return PJ_SUCCESS;
+    else
+        return PJ_RETURN_OS_ERROR(GetLastError());
+}
+
+/*
+ * pj_event_destroy()
+ */
+PJ_DEF(pj_status_t) pj_event_destroy(pj_event_t *event)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(event, PJ_EINVAL);
+
+    PJ_LOG(6, (event->obj_name, "Event is destroying"));
+
+    if (CloseHandle(event->hEvent))
+        return PJ_SUCCESS;
+    else
+        return PJ_RETURN_OS_ERROR(GetLastError());
+}
+
+#endif	/* PJ_HAS_EVENT_OBJ */
+
+///////////////////////////////////////////////////////////////////////////////
+#if defined(PJ_TERM_HAS_COLOR) && PJ_TERM_HAS_COLOR != 0
+/*
+ * Terminal color
+ */
+
+static WORD pj_color_to_os_attr(pj_color_t color)
+{
+    WORD attr = 0;
+
+    if (color & PJ_TERM_COLOR_R)
+	attr |= FOREGROUND_RED;
+    if (color & PJ_TERM_COLOR_G)
+	attr |= FOREGROUND_GREEN;
+    if (color & PJ_TERM_COLOR_B)
+	attr |= FOREGROUND_BLUE;
+    if (color & PJ_TERM_COLOR_BRIGHT)
+	attr |= FOREGROUND_INTENSITY;
+
+    return attr;
+}
+
+static pj_color_t os_attr_to_pj_color(WORD attr)
+{
+    int color = 0;
+
+    if (attr & FOREGROUND_RED)
+	color |= PJ_TERM_COLOR_R;
+    if (attr & FOREGROUND_GREEN)
+	color |= PJ_TERM_COLOR_G;
+    if (attr & FOREGROUND_BLUE)
+	color |= PJ_TERM_COLOR_B;
+    if (attr & FOREGROUND_INTENSITY)
+	color |= PJ_TERM_COLOR_BRIGHT;
+
+    return color;
+}
+
+
+/*
+ * pj_term_set_color()
+ */
+PJ_DEF(pj_status_t) pj_term_set_color(pj_color_t color)
+{
+    BOOL rc;
+    WORD attr = 0;
+
+    PJ_CHECK_STACK();
+
+    attr = pj_color_to_os_attr(color);
+    rc = SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), attr);
+    return rc ? PJ_SUCCESS : PJ_RETURN_OS_ERROR(GetLastError());
+}
+
+/*
+ * pj_term_get_color()
+ * Get current terminal foreground color.
+ */
+PJ_DEF(pj_color_t) pj_term_get_color(void)
+{
+    CONSOLE_SCREEN_BUFFER_INFO info;
+
+    PJ_CHECK_STACK();
+
+    GetConsoleScreenBufferInfo( GetStdHandle(STD_OUTPUT_HANDLE), &info);
+    return os_attr_to_pj_color(info.wAttributes);
+}
+
+#endif	/* PJ_TERM_HAS_COLOR */
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_error_linux_kernel.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_error_linux_kernel.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_error_linux_kernel.c	(revision 1163)
@@ -0,0 +1,80 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/string.h>
+#include <pj/compat/errno.h>
+#include <linux/config.h>
+#include <linux/version.h>
+#if defined(MODVERSIONS)
+#include <linux/modversions.h>
+#endif
+#include <linux/kernel.h>
+#include <linux/errno.h>
+
+int kernel_errno;
+
+PJ_DEF(pj_status_t) pj_get_os_error(void)
+{
+    return errno;
+}
+
+PJ_DEF(void) pj_set_os_error(pj_status_t code)
+{
+    errno = code;
+}
+
+PJ_DEF(pj_status_t) pj_get_netos_error(void)
+{
+    return errno;
+}
+
+PJ_DEF(void) pj_set_netos_error(pj_status_t code)
+{
+    errno = code;
+}
+
+/* 
+ * platform_strerror()
+ *
+ * Platform specific error message. This file is called by pj_strerror() 
+ * in errno.c 
+ */
+int platform_strerror( pj_os_err_type os_errcode, 
+                       char *buf, pj_size_t bufsize)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+    int len;
+    
+    /* Handle EINVAL as special case so that it'll pass errno test. */
+    if (os_errcode==EINVAL)
+	strcpy(errmsg, "Invalid value");
+    else
+	snprintf(errmsg, sizeof(errmsg), "errno=%d", os_errcode);
+    
+    len = strlen(errmsg);
+
+    if (len >= bufsize)
+	len = bufsize-1;
+
+    pj_memcpy(buf, errmsg, len);
+    buf[len] = '\0';
+
+    return len;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_error_unix.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_error_unix.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_error_unix.c	(revision 1163)
@@ -0,0 +1,62 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/errno.h>
+#include <pj/string.h>
+#include <errno.h>
+
+PJ_DEF(pj_status_t) pj_get_os_error(void)
+{
+    return PJ_STATUS_FROM_OS(errno);
+}
+
+PJ_DEF(void) pj_set_os_error(pj_status_t code)
+{
+    errno = PJ_STATUS_TO_OS(code);
+}
+
+PJ_DEF(pj_status_t) pj_get_netos_error(void)
+{
+    return PJ_STATUS_FROM_OS(errno);
+}
+
+PJ_DEF(void) pj_set_netos_error(pj_status_t code)
+{
+    errno = PJ_STATUS_TO_OS(code);
+}
+
+/* 
+ * platform_strerror()
+ *
+ * Platform specific error message. This file is called by pj_strerror() 
+ * in errno.c 
+ */
+int platform_strerror( pj_os_err_type os_errcode, 
+                       char *buf, pj_size_t bufsize)
+{
+    const char *syserr = strerror(os_errcode);
+    pj_size_t len = syserr ? strlen(syserr) : 0;
+
+    if (len >= bufsize) len = bufsize - 1;
+    if (len > 0)
+	pj_memcpy(buf, syserr, len);
+    buf[len] = '\0';
+    return len;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_error_win32.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_error_win32.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_error_win32.c	(revision 1163)
@@ -0,0 +1,219 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/errno.h>
+#include <pj/assert.h>
+#include <pj/compat/stdarg.h>
+#include <pj/unicode.h>
+#include <pj/string.h>
+
+
+#if defined(PJ_HAS_WINSOCK2_H) && PJ_HAS_WINSOCK2_H != 0
+#  include <winsock2.h>
+#elif defined(PJ_HAS_WINSOCK_H) && PJ_HAS_WINSOCK_H != 0
+#  include <winsock.h>
+#endif
+
+
+/*
+ * From Apache's APR:
+ */
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING!=0)
+
+static const struct {
+    pj_os_err_type code;
+    const char *msg;
+} gaErrorList[] = {
+    PJ_BUILD_ERR( WSAEINTR,           "Interrupted system call"),
+    PJ_BUILD_ERR( WSAEBADF,           "Bad file number"),
+    PJ_BUILD_ERR( WSAEACCES,          "Permission denied"),
+    PJ_BUILD_ERR( WSAEFAULT,          "Bad address"),
+    PJ_BUILD_ERR( WSAEINVAL,          "Invalid argument"),
+    PJ_BUILD_ERR( WSAEMFILE,          "Too many open sockets"),
+    PJ_BUILD_ERR( WSAEWOULDBLOCK,     "Operation would block"),
+    PJ_BUILD_ERR( WSAEINPROGRESS,     "Operation now in progress"),
+    PJ_BUILD_ERR( WSAEALREADY,        "Operation already in progress"),
+    PJ_BUILD_ERR( WSAENOTSOCK,        "Socket operation on non-socket"),
+    PJ_BUILD_ERR( WSAEDESTADDRREQ,    "Destination address required"),
+    PJ_BUILD_ERR( WSAEMSGSIZE,        "Message too long"),
+    PJ_BUILD_ERR( WSAEPROTOTYPE,      "Protocol wrong type for socket"),
+    PJ_BUILD_ERR( WSAENOPROTOOPT,     "Bad protocol option"),
+    PJ_BUILD_ERR( WSAEPROTONOSUPPORT, "Protocol not supported"),
+    PJ_BUILD_ERR( WSAESOCKTNOSUPPORT, "Socket type not supported"),
+    PJ_BUILD_ERR( WSAEOPNOTSUPP,      "Operation not supported on socket"),
+    PJ_BUILD_ERR( WSAEPFNOSUPPORT,    "Protocol family not supported"),
+    PJ_BUILD_ERR( WSAEAFNOSUPPORT,    "Address family not supported"),
+    PJ_BUILD_ERR( WSAEADDRINUSE,      "Address already in use"),
+    PJ_BUILD_ERR( WSAEADDRNOTAVAIL,   "Can't assign requested address"),
+    PJ_BUILD_ERR( WSAENETDOWN,        "Network is down"),
+    PJ_BUILD_ERR( WSAENETUNREACH,     "Network is unreachable"),
+    PJ_BUILD_ERR( WSAENETRESET,       "Net connection reset"),
+    PJ_BUILD_ERR( WSAECONNABORTED,    "Software caused connection abort"),
+    PJ_BUILD_ERR( WSAECONNRESET,      "Connection reset by peer"),
+    PJ_BUILD_ERR( WSAENOBUFS,         "No buffer space available"),
+    PJ_BUILD_ERR( WSAEISCONN,         "Socket is already connected"),
+    PJ_BUILD_ERR( WSAENOTCONN,        "Socket is not connected"),
+    PJ_BUILD_ERR( WSAESHUTDOWN,       "Can't send after socket shutdown"),
+    PJ_BUILD_ERR( WSAETOOMANYREFS,    "Too many references, can't splice"),
+    PJ_BUILD_ERR( WSAETIMEDOUT,       "Connection timed out"),
+    PJ_BUILD_ERR( WSAECONNREFUSED,    "Connection refused"),
+    PJ_BUILD_ERR( WSAELOOP,           "Too many levels of symbolic links"),
+    PJ_BUILD_ERR( WSAENAMETOOLONG,    "File name too long"),
+    PJ_BUILD_ERR( WSAEHOSTDOWN,       "Host is down"),
+    PJ_BUILD_ERR( WSAEHOSTUNREACH,    "No route to host"),
+    PJ_BUILD_ERR( WSAENOTEMPTY,       "Directory not empty"),
+    PJ_BUILD_ERR( WSAEPROCLIM,        "Too many processes"),
+    PJ_BUILD_ERR( WSAEUSERS,          "Too many users"),
+    PJ_BUILD_ERR( WSAEDQUOT,          "Disc quota exceeded"),
+    PJ_BUILD_ERR( WSAESTALE,          "Stale NFS file handle"),
+    PJ_BUILD_ERR( WSAEREMOTE,         "Too many levels of remote in path"),
+    PJ_BUILD_ERR( WSASYSNOTREADY,     "Network system is unavailable"),
+    PJ_BUILD_ERR( WSAVERNOTSUPPORTED, "Winsock version out of range"),
+    PJ_BUILD_ERR( WSANOTINITIALISED,  "WSAStartup not yet called"),
+    PJ_BUILD_ERR( WSAEDISCON,         "Graceful shutdown in progress"),
+/*
+#define WSAENOMORE              (WSABASEERR+102)
+#define WSAECANCELLED           (WSABASEERR+103)
+#define WSAEINVALIDPROCTABLE    (WSABASEERR+104)
+#define WSAEINVALIDPROVIDER     (WSABASEERR+105)
+#define WSAEPROVIDERFAILEDINIT  (WSABASEERR+106)
+#define WSASYSCALLFAILURE       (WSABASEERR+107)
+#define WSASERVICE_NOT_FOUND    (WSABASEERR+108)
+#define WSATYPE_NOT_FOUND       (WSABASEERR+109)
+#define WSA_E_NO_MORE           (WSABASEERR+110)
+#define WSA_E_CANCELLED         (WSABASEERR+111)
+#define WSAEREFUSED             (WSABASEERR+112)
+ */
+    PJ_BUILD_ERR( WSAHOST_NOT_FOUND,  "Host not found"),
+/*
+#define WSATRY_AGAIN            (WSABASEERR+1002)
+#define WSANO_RECOVERY          (WSABASEERR+1003)
+ */
+    PJ_BUILD_ERR( WSANO_DATA,         "No host data of that type was found"),
+    {0, NULL}
+};
+
+#endif	/* PJ_HAS_ERROR_STRING */
+
+
+
+PJ_DEF(pj_status_t) pj_get_os_error(void)
+{
+    return PJ_STATUS_FROM_OS(GetLastError());
+}
+
+PJ_DEF(void) pj_set_os_error(pj_status_t code)
+{
+    SetLastError(PJ_STATUS_TO_OS(code));
+}
+
+PJ_DEF(pj_status_t) pj_get_netos_error(void)
+{
+    return PJ_STATUS_FROM_OS(WSAGetLastError());
+}
+
+PJ_DEF(void) pj_set_netos_error(pj_status_t code)
+{
+    WSASetLastError(PJ_STATUS_TO_OS(code));
+}
+
+/* 
+ * platform_strerror()
+ *
+ * Platform specific error message. This file is called by pj_strerror() 
+ * in errno.c 
+ */
+int platform_strerror( pj_os_err_type os_errcode, 
+                       char *buf, pj_size_t bufsize)
+{
+    int len = 0;
+    PJ_DECL_UNICODE_TEMP_BUF(wbuf,128);
+
+    pj_assert(buf != NULL);
+    pj_assert(bufsize >= 0);
+
+    /*
+     * MUST NOT check stack here.
+     * This function might be called from PJ_CHECK_STACK() itself!
+       //PJ_CHECK_STACK();
+     */
+
+    if (!len) {
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING!=0)
+	int i;
+        for (i = 0; gaErrorList[i].msg; ++i) {
+            if (gaErrorList[i].code == os_errcode) {
+                len = strlen(gaErrorList[i].msg);
+		if ((pj_size_t)len >= bufsize) {
+		    len = bufsize-1;
+		}
+		pj_memcpy(buf, gaErrorList[i].msg, len);
+		buf[len] = '\0';
+                break;
+            }
+        }
+#endif	/* PJ_HAS_ERROR_STRING */
+
+    }
+
+
+    if (!len) {
+#if PJ_NATIVE_STRING_IS_UNICODE
+	len = FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM 
+			     | FORMAT_MESSAGE_IGNORE_INSERTS,
+			     NULL,
+			     os_errcode,
+			     MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), 
+			     wbuf,
+			     sizeof(wbuf),
+			     NULL);
+	if (len) {
+	    pj_unicode_to_ansi(wbuf, len, buf, bufsize);
+	}
+#else
+	len = FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM 
+			     | FORMAT_MESSAGE_IGNORE_INSERTS,
+			     NULL,
+			     os_errcode,
+			     MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), 
+			     buf,
+			     bufsize,
+			     NULL);
+	buf[bufsize-1] = '\0';
+#endif
+
+	if (len) {
+	    /* Remove trailing newlines. */
+	    while (len && (buf[len-1] == '\n' || buf[len-1] == '\r')) {
+		buf[len-1] = '\0';
+		--len;
+	    }
+	}
+    }
+
+    if (!len) {
+	len = pj_ansi_snprintf( buf, bufsize, "Win32 error code %u", 
+				(unsigned)os_errcode);
+	if (len < 0 || len >= (int)bufsize)
+	    len = bufsize-1;
+	buf[len] = '\0';
+    }
+
+    return len;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_rwmutex.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_rwmutex.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_rwmutex.c	(revision 1163)
@@ -0,0 +1,162 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 
+ */
+
+/* 
+ * Note: 
+ * 
+ * DO NOT BUILD THIS FILE DIRECTLY. THIS FILE WILL BE INCLUDED BY os_core_*.c
+ * WHEN MACRO PJ_EMULATE_RWMUTEX IS SET.
+ */
+
+/*
+ * os_rwmutex.c:
+ *
+ * Implementation of Read-Write mutex for platforms that lack it (e.g.
+ * Win32, RTEMS).
+ */
+
+
+struct pj_rwmutex_t
+{
+    pj_mutex_t *read_lock;
+    /* write_lock must use semaphore, because write_lock may be released
+     * by thread other than the thread that acquire the write_lock in the
+     * first place.
+     */
+    pj_sem_t   *write_lock;
+    pj_int32_t  reader_count;
+};
+
+/*
+ * Create reader/writer mutex.
+ *
+ */
+PJ_DEF(pj_status_t) pj_rwmutex_create(pj_pool_t *pool, const char *name,
+				      pj_rwmutex_t **p_mutex)
+{
+    pj_status_t status;
+    pj_rwmutex_t *rwmutex;
+
+    PJ_ASSERT_RETURN(pool && p_mutex, PJ_EINVAL);
+
+    *p_mutex = NULL;
+    rwmutex = pj_pool_alloc(pool, sizeof(struct pj_rwmutex_t));
+
+    status = pj_mutex_create_simple(pool, name, &rwmutex ->read_lock);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    status = pj_sem_create(pool, name, 1, 1, &rwmutex->write_lock);
+    if (status != PJ_SUCCESS) {
+	pj_mutex_destroy(rwmutex->read_lock);
+	return status;
+    }
+
+    rwmutex->reader_count = 0;
+    *p_mutex = rwmutex;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Lock the mutex for reading.
+ *
+ */
+PJ_DEF(pj_status_t) pj_rwmutex_lock_read(pj_rwmutex_t *mutex)
+{
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+
+    status = pj_mutex_lock(mutex->read_lock);
+    if (status != PJ_SUCCESS) {
+	pj_assert(!"This pretty much is unexpected");
+	return status;
+    }
+
+    mutex->reader_count++;
+
+    pj_assert(mutex->reader_count < 0x7FFFFFF0L);
+
+    if (mutex->reader_count == 1)
+	pj_sem_wait(mutex->write_lock);
+
+    status = pj_mutex_unlock(mutex->read_lock);
+    return status;
+}
+
+/*
+ * Lock the mutex for writing.
+ *
+ */
+PJ_DEF(pj_status_t) pj_rwmutex_lock_write(pj_rwmutex_t *mutex)
+{
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+    return pj_sem_wait(mutex->write_lock);
+}
+
+/*
+ * Release read lock.
+ *
+ */
+PJ_DEF(pj_status_t) pj_rwmutex_unlock_read(pj_rwmutex_t *mutex)
+{
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+
+    status = pj_mutex_lock(mutex->read_lock);
+    if (status != PJ_SUCCESS) {
+	pj_assert(!"This pretty much is unexpected");
+	return status;
+    }
+
+    pj_assert(mutex->reader_count >= 1);
+
+    --mutex->reader_count;
+    if (mutex->reader_count == 0)
+	pj_sem_post(mutex->write_lock);
+
+    status = pj_mutex_unlock(mutex->read_lock);
+    return status;
+}
+
+/*
+ * Release write lock.
+ *
+ */
+PJ_DEF(pj_status_t) pj_rwmutex_unlock_write(pj_rwmutex_t *mutex)
+{
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+    pj_assert(mutex->reader_count <= 1);
+    return pj_sem_post(mutex->write_lock);
+}
+
+
+/*
+ * Destroy reader/writer mutex.
+ *
+ */
+PJ_DEF(pj_status_t) pj_rwmutex_destroy(pj_rwmutex_t *mutex)
+{
+    PJ_ASSERT_RETURN(mutex, PJ_EINVAL);
+    pj_mutex_destroy(mutex->read_lock);
+    pj_sem_destroy(mutex->write_lock);
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_bsd.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_bsd.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_bsd.c	(revision 1163)
@@ -0,0 +1,35 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/compat/time.h>
+
+///////////////////////////////////////////////////////////////////////////////
+
+PJ_DEF(pj_status_t) pj_gettimeofday(pj_time_val *tv)
+{
+    struct timeb tb;
+
+    PJ_CHECK_STACK();
+
+    ftime(&tb);
+    tv->sec = tb.time;
+    tv->msec = tb.millitm;
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_common.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_common.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_common.c	(revision 1163)
@@ -0,0 +1,75 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/compat/time.h>
+
+///////////////////////////////////////////////////////////////////////////////
+
+PJ_DEF(pj_status_t) pj_time_decode(const pj_time_val *tv, pj_parsed_time *pt)
+{
+    struct tm *local_time;
+
+    PJ_CHECK_STACK();
+
+    local_time = localtime((time_t*)&tv->sec);
+
+    pt->year = local_time->tm_year+1900;
+    pt->mon = local_time->tm_mon;
+    pt->day = local_time->tm_mday;
+    pt->hour = local_time->tm_hour;
+    pt->min = local_time->tm_min;
+    pt->sec = local_time->tm_sec;
+    pt->wday = local_time->tm_wday;
+    pt->msec = tv->msec;
+
+    return PJ_SUCCESS;
+}
+
+/**
+ * Encode parsed time to time value.
+ */
+PJ_DEF(pj_status_t) pj_time_encode(const pj_parsed_time *pt, pj_time_val *tv)
+{
+    struct tm local_time;
+
+    local_time.tm_year = pt->year-1900;
+    local_time.tm_mon = pt->mon;
+    local_time.tm_mday = pt->day;
+    local_time.tm_hour = pt->hour;
+    local_time.tm_min = pt->min;
+    local_time.tm_sec = pt->sec;
+    local_time.tm_isdst = 0;
+    
+    tv->sec = mktime(&local_time);
+    tv->msec = pt->msec;
+
+    return PJ_SUCCESS;
+}
+
+/**
+ * Convert local time to GMT.
+ */
+PJ_DEF(pj_status_t) pj_time_local_to_gmt(pj_time_val *tv);
+
+/**
+ * Convert GMT to local time.
+ */
+PJ_DEF(pj_status_t) pj_time_gmt_to_local(pj_time_val *tv);
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_linux_kernel.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_linux_kernel.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_linux_kernel.c	(revision 1163)
@@ -0,0 +1,65 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 <linux/time.h>
+
+///////////////////////////////////////////////////////////////////////////////
+
+PJ_DEF(pj_status_t) pj_gettimeofday(pj_time_val *tv)
+{
+    struct timeval tval;
+  
+    do_gettimeofday(&tval);
+    tv->sec = tval.tv_sec;
+    tv->msec = tval.tv_usec / 1000;
+
+    return 0;
+}
+
+PJ_DEF(pj_status_t) pj_time_decode(const pj_time_val *tv, pj_parsed_time *pt)
+{
+    pt->year = 2005;
+    pt->mon = 8;
+    pt->day = 20;
+    pt->hour = 16;
+    pt->min = 30;
+    pt->sec = 30;
+    pt->wday = 3;
+    pt->yday = 200;
+    pt->msec = 777;
+
+    return -1;
+}
+
+/**
+ * Encode parsed time to time value.
+ */
+PJ_DEF(pj_status_t) pj_time_encode(const pj_parsed_time *pt, pj_time_val *tv);
+
+/**
+ * Convert local time to GMT.
+ */
+PJ_DEF(pj_status_t) pj_time_local_to_gmt(pj_time_val *tv);
+
+/**
+ * Convert GMT to local time.
+ */
+PJ_DEF(pj_status_t) pj_time_gmt_to_local(pj_time_val *tv);
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_unix.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_unix.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_unix.c	(revision 1163)
@@ -0,0 +1,46 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/errno.h>
+#include <pj/compat/time.h>
+
+#if defined(PJ_HAS_UNISTD_H) && PJ_HAS_UNISTD_H!=0
+#    include <unistd.h>
+#endif
+
+#include <errno.h>
+
+///////////////////////////////////////////////////////////////////////////////
+
+PJ_DEF(pj_status_t) pj_gettimeofday(pj_time_val *p_tv)
+{
+    struct timeval the_time;
+    int rc;
+
+    PJ_CHECK_STACK();
+
+    rc = gettimeofday(&the_time, NULL);
+    if (rc != 0)
+	return PJ_RETURN_OS_ERROR(pj_get_native_os_error());
+
+    p_tv->sec = the_time.tv_sec;
+    p_tv->msec = the_time.tv_usec / 1000;
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_win32.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_win32.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_time_win32.c	(revision 1163)
@@ -0,0 +1,137 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/string.h>
+#include <windows.h>
+
+///////////////////////////////////////////////////////////////////////////////
+
+#define SECS_TO_FT_MULT 10000000
+
+static LARGE_INTEGER base_time;
+
+// Find 1st Jan 1970 as a FILETIME 
+static void get_base_time(void)
+{
+    SYSTEMTIME st;
+    FILETIME ft;
+
+    memset(&st,0,sizeof(st));
+    st.wYear=1970;
+    st.wMonth=1;
+    st.wDay=1;
+    SystemTimeToFileTime(&st, &ft);
+    
+    base_time.LowPart = ft.dwLowDateTime;
+    base_time.HighPart = ft.dwHighDateTime;
+    base_time.QuadPart /= SECS_TO_FT_MULT;
+}
+
+PJ_DEF(pj_status_t) pj_gettimeofday(pj_time_val *tv)
+{
+    SYSTEMTIME st;
+    FILETIME ft;
+    LARGE_INTEGER li;
+
+    if (base_time.QuadPart == 0)
+	get_base_time();
+
+    GetLocalTime(&st);
+    SystemTimeToFileTime(&st, &ft);
+
+    li.LowPart = ft.dwLowDateTime;
+    li.HighPart = ft.dwHighDateTime;
+    li.QuadPart /= SECS_TO_FT_MULT;
+    li.QuadPart -= base_time.QuadPart;
+
+    tv->sec = li.LowPart;
+    tv->msec = st.wMilliseconds;
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_time_decode(const pj_time_val *tv, pj_parsed_time *pt)
+{
+    LARGE_INTEGER li;
+    FILETIME ft;
+    SYSTEMTIME st;
+
+    li.QuadPart = tv->sec;
+    li.QuadPart += base_time.QuadPart;
+    li.QuadPart *= SECS_TO_FT_MULT;
+
+    ft.dwLowDateTime = li.LowPart;
+    ft.dwHighDateTime = li.HighPart;
+    FileTimeToSystemTime(&ft, &st);
+
+    pt->year = st.wYear;
+    pt->mon = st.wMonth-1;
+    pt->day = st.wDay;
+    pt->wday = st.wDayOfWeek;
+
+    pt->hour = st.wHour;
+    pt->min = st.wMinute;
+    pt->sec = st.wSecond;
+    pt->msec = tv->msec;
+
+    return PJ_SUCCESS;
+}
+
+/**
+ * Encode parsed time to time value.
+ */
+PJ_DEF(pj_status_t) pj_time_encode(const pj_parsed_time *pt, pj_time_val *tv)
+{
+    SYSTEMTIME st;
+    FILETIME ft;
+    LARGE_INTEGER li;
+
+    pj_bzero(&st, sizeof(st));
+    st.wYear = (pj_uint16_t) pt->year;
+    st.wMonth = (pj_uint16_t) (pt->mon + 1);
+    st.wDay = (pj_uint16_t) pt->day;
+    st.wHour = (pj_uint16_t) pt->hour;
+    st.wMinute = (pj_uint16_t) pt->min;
+    st.wSecond = (pj_uint16_t) pt->sec;
+    st.wMilliseconds = (pj_uint16_t) pt->msec;
+    
+    SystemTimeToFileTime(&st, &ft);
+
+    li.LowPart = ft.dwLowDateTime;
+    li.HighPart = ft.dwHighDateTime;
+    li.QuadPart /= SECS_TO_FT_MULT;
+    li.QuadPart -= base_time.QuadPart;
+
+    tv->sec = li.LowPart;
+    tv->msec = st.wMilliseconds;
+
+    return PJ_SUCCESS;
+}
+
+/**
+ * Convert local time to GMT.
+ */
+PJ_DEF(pj_status_t) pj_time_local_to_gmt(pj_time_val *tv);
+
+/**
+ * Convert GMT to local time.
+ */
+PJ_DEF(pj_status_t) pj_time_gmt_to_local(pj_time_val *tv);
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_timestamp_common.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_timestamp_common.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_timestamp_common.c	(revision 1163)
@@ -0,0 +1,185 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/compat/high_precision.h>
+
+#if defined(PJ_HAS_HIGH_RES_TIMER) && PJ_HAS_HIGH_RES_TIMER != 0
+
+#define U32MAX  (0xFFFFFFFFUL)
+#define NANOSEC (1000000000UL)
+#define USEC    (1000000UL)
+#define MSEC    (1000)
+
+#define u64tohighprec(u64)	((pj_highprec_t)((pj_int64_t)(u64)))
+
+static pj_highprec_t get_elapsed( const pj_timestamp *start,
+                                  const pj_timestamp *stop )
+{
+#if defined(PJ_HAS_INT64) && PJ_HAS_INT64!=0
+    return u64tohighprec(stop->u64 - start->u64);
+#else
+    pj_highprec_t elapsed_hi, elapsed_lo;
+
+    elapsed_hi = stop->u32.hi - start->u32.hi;
+    elapsed_lo = stop->u32.lo - start->u32.lo;
+
+    /* elapsed_hi = elapsed_hi * U32MAX */
+    pj_highprec_mul(elapsed_hi, U32MAX);
+
+    return elapsed_hi + elapsed_lo;
+#endif
+}
+
+static pj_highprec_t elapsed_msec( const pj_timestamp *start,
+                                   const pj_timestamp *stop )
+{
+    pj_timestamp ts_freq;
+    pj_highprec_t freq, elapsed;
+
+    if (pj_get_timestamp_freq(&ts_freq) != PJ_SUCCESS)
+        return 0;
+
+    /* Convert frequency timestamp */
+#if defined(PJ_HAS_INT64) && PJ_HAS_INT64!=0
+    freq = u64tohighprec(ts_freq.u64);
+#else
+    freq = ts_freq.u32.hi;
+    pj_highprec_mul(freq, U32MAX);
+    freq += ts_freq.u32.lo;
+#endif
+
+    /* Avoid division by zero. */
+    if (freq == 0) freq = 1;
+
+    /* Get elapsed time in cycles. */
+    elapsed = get_elapsed(start, stop);
+
+    /* usec = elapsed * MSEC / freq */
+    pj_highprec_mul(elapsed, MSEC);
+    pj_highprec_div(elapsed, freq);
+
+    return elapsed;
+}
+
+static pj_highprec_t elapsed_usec( const pj_timestamp *start,
+                                   const pj_timestamp *stop )
+{
+    pj_timestamp ts_freq;
+    pj_highprec_t freq, elapsed;
+
+    if (pj_get_timestamp_freq(&ts_freq) != PJ_SUCCESS)
+        return 0;
+
+    /* Convert frequency timestamp */
+#if defined(PJ_HAS_INT64) && PJ_HAS_INT64!=0
+    freq = u64tohighprec(ts_freq.u64);
+#else
+    freq = ts_freq.u32.hi;
+    pj_highprec_mul(freq, U32MAX);
+    freq += ts_freq.u32.lo;
+#endif
+
+    /* Avoid division by zero. */
+    if (freq == 0) freq = 1;
+
+    /* Get elapsed time in cycles. */
+    elapsed = get_elapsed(start, stop);
+
+    /* usec = elapsed * USEC / freq */
+    pj_highprec_mul(elapsed, USEC);
+    pj_highprec_div(elapsed, freq);
+
+    return elapsed;
+}
+
+PJ_DEF(pj_uint32_t) pj_elapsed_nanosec( const pj_timestamp *start,
+                                        const pj_timestamp *stop )
+{
+    pj_timestamp ts_freq;
+    pj_highprec_t freq, elapsed;
+
+    if (pj_get_timestamp_freq(&ts_freq) != PJ_SUCCESS)
+        return 0;
+
+    /* Convert frequency timestamp */
+#if defined(PJ_HAS_INT64) && PJ_HAS_INT64!=0
+    freq = u64tohighprec(ts_freq.u64);
+#else
+    freq = ts_freq.u32.hi;
+    pj_highprec_mul(freq, U32MAX);
+    freq += ts_freq.u32.lo;
+#endif
+
+    /* Avoid division by zero. */
+    if (freq == 0) freq = 1;
+
+    /* Get elapsed time in cycles. */
+    elapsed = get_elapsed(start, stop);
+
+    /* usec = elapsed * USEC / freq */
+    pj_highprec_mul(elapsed, NANOSEC);
+    pj_highprec_div(elapsed, freq);
+
+    return (pj_uint32_t)elapsed;
+}
+
+PJ_DEF(pj_uint32_t) pj_elapsed_usec( const pj_timestamp *start,
+                                     const pj_timestamp *stop )
+{
+    return (pj_uint32_t)elapsed_usec(start, stop);
+}
+
+PJ_DEF(pj_uint32_t) pj_elapsed_msec( const pj_timestamp *start,
+                                     const pj_timestamp *stop )
+{
+    return (pj_uint32_t)elapsed_msec(start, stop);
+}
+
+PJ_DEF(pj_time_val) pj_elapsed_time( const pj_timestamp *start,
+                                     const pj_timestamp *stop )
+{
+    pj_highprec_t elapsed = elapsed_msec(start, stop);
+    pj_time_val tv_elapsed;
+
+    if (PJ_HIGHPREC_VALUE_IS_ZERO(elapsed)) {
+        tv_elapsed.sec = tv_elapsed.msec = 0;
+        return tv_elapsed;
+    } else {
+        pj_highprec_t sec, msec;
+
+        sec = elapsed;
+        pj_highprec_div(sec, MSEC);
+        tv_elapsed.sec = (long)sec;
+
+        msec = elapsed;
+        pj_highprec_mod(msec, MSEC);
+        tv_elapsed.msec = (long)msec;
+
+        return tv_elapsed;
+    }
+}
+
+PJ_DEF(pj_uint32_t) pj_elapsed_cycle( const pj_timestamp *start,
+                                      const pj_timestamp *stop )
+{
+    return stop->u32.lo - start->u32.lo;
+}
+
+#endif  /* PJ_HAS_HIGH_RES_TIMER */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_timestamp_linux_kernel.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_timestamp_linux_kernel.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_timestamp_linux_kernel.c	(revision 1163)
@@ -0,0 +1,78 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 <linux/time.h>
+
+#if 0
+PJ_DEF(pj_status_t) pj_get_timestamp(pj_timestamp *ts)
+{
+    ts->u32.hi = 0;
+    ts->u32.lo = jiffies;
+    return 0;
+}
+
+PJ_DEF(pj_status_t) pj_get_timestamp_freq(pj_timestamp *freq)
+{
+    freq->u32.hi = 0;
+    freq->u32.lo = HZ;
+    return 0;
+}
+#elif 0
+PJ_DEF(pj_status_t) pj_get_timestamp(pj_timestamp *ts)
+{
+    struct timespec tv;
+    
+    tv = CURRENT_TIME;
+
+    ts->u64 = tv.tv_sec;
+    ts->u64 *= NSEC_PER_SEC;
+    ts->u64 += tv.tv_nsec;
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_get_timestamp_freq(pj_timestamp *freq)
+{
+    freq->u32.hi = 0;
+    freq->u32.lo = NSEC_PER_SEC;
+    return 0;
+}
+#else
+PJ_DEF(pj_status_t) pj_get_timestamp(pj_timestamp *ts)
+{
+    struct timeval tv;
+    
+    do_gettimeofday(&tv);
+
+    ts->u64 = tv.tv_sec;
+    ts->u64 *= USEC_PER_SEC;
+    ts->u64 += tv.tv_usec;
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_get_timestamp_freq(pj_timestamp *freq)
+{
+    freq->u32.hi = 0;
+    freq->u32.lo = USEC_PER_SEC;
+    return 0;
+}
+
+#endif
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_timestamp_posix.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_timestamp_posix.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_timestamp_posix.c	(revision 1163)
@@ -0,0 +1,142 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+
+#if defined(PJ_HAS_PENTIUM) && PJ_HAS_PENTIUM!=0 && \
+    defined(PJ_TIMESTAMP_USE_RDTSC) && PJ_TIMESTAMP_USE_RDTSC!=0 && \
+    defined(PJ_M_I386) && PJ_M_I386!=0 && \
+    defined(PJ_LINUX) && PJ_LINUX!=0
+static int machine_speed_mhz;
+static pj_timestamp machine_speed;
+
+static __inline__ unsigned long long int rdtsc()
+{
+    unsigned long long int x;
+    __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
+    return x;
+}
+
+/* Determine machine's CPU MHz to get the counter's frequency.
+ */
+static int get_machine_speed_mhz()
+{
+    FILE *strm;
+    char buf[512];
+    int len;
+    char *pos, *end;
+	
+    PJ_CHECK_STACK();
+	
+    /* Open /proc/cpuinfo and read the file */
+    strm = fopen("/proc/cpuinfo", "r");
+    if (!strm)
+        return -1;
+    len = fread(buf, 1, sizeof(buf), strm);
+    fclose(strm);
+    if (len < 1) {
+        return -1;
+    }
+    buf[len] = '\0';
+
+    /* Locate the MHz digit. */
+    pos = strstr(buf, "cpu MHz");
+    if (!pos)
+        return -1;
+    pos = strchr(pos, ':');
+    if (!pos)
+        return -1;
+    end = (pos += 2);
+    while (isdigit(*end)) ++end;
+    *end = '\0';
+
+    /* Return the Mhz part, and give it a +1. */
+    return atoi(pos)+1;
+}
+
+PJ_DEF(pj_status_t) pj_get_timestamp(pj_timestamp *ts)
+{
+    if (machine_speed_mhz == 0) {
+	machine_speed_mhz = get_machine_speed_mhz();
+	if (machine_speed_mhz > 0) {
+	    machine_speed.u64 = machine_speed_mhz * 1000000.0;
+	}
+    }
+    
+    if (machine_speed_mhz == -1) {
+	ts->u64 = 0;
+	return -1;
+    } 
+    ts->u64 = rdtsc();
+    return 0;
+}
+
+PJ_DEF(pj_status_t) pj_get_timestamp_freq(pj_timestamp *freq)
+{
+    if (machine_speed_mhz == 0) {
+	machine_speed_mhz = get_machine_speed_mhz();
+	if (machine_speed_mhz > 0) {
+	    machine_speed.u64 = machine_speed_mhz * 1000000.0;
+	}
+    }
+    
+    if (machine_speed_mhz == -1) {
+	freq->u64 = 1;	/* return 1 to prevent division by zero in apps. */
+	return -1;
+    } 
+
+    freq->u64 = machine_speed.u64;
+    return 0;
+}
+
+#else
+#include <sys/time.h>
+#include <errno.h>
+
+#define USEC_PER_SEC	1000000
+
+PJ_DEF(pj_status_t) pj_get_timestamp(pj_timestamp *ts)
+{
+    struct timeval tv;
+
+    if (gettimeofday(&tv, NULL) != 0) {
+	return PJ_RETURN_OS_ERROR(pj_get_native_os_error());
+    }
+
+    ts->u64 = tv.tv_sec;
+    ts->u64 *= USEC_PER_SEC;
+    ts->u64 += tv.tv_usec;
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_get_timestamp_freq(pj_timestamp *freq)
+{
+    freq->u32.hi = 0;
+    freq->u32.lo = USEC_PER_SEC;
+
+    return PJ_SUCCESS;
+}
+
+#endif
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/os_timestamp_win32.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/os_timestamp_win32.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/os_timestamp_win32.c	(revision 1163)
@@ -0,0 +1,294 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/assert.h>
+#include <pj/errno.h>
+#include <pj/log.h>
+#include <windows.h>
+
+#define THIS_FILE   "os_timestamp_win32.c"
+
+
+#if 1
+#   define TRACE_(x)	    PJ_LOG(3,x)
+#else
+#   define TRACE_(x)	    ;
+#endif
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+#if defined(PJ_TIMESTAMP_USE_RDTSC) && PJ_TIMESTAMP_USE_RDTSC!=0 && \
+    defined(PJ_M_I386) && PJ_M_I386 != 0 && \
+    defined(PJ_HAS_PENTIUM) && PJ_HAS_PENTIUM!=0 && \
+    defined(_MSC_VER)
+
+/*
+ * Use rdtsc to get the OS timestamp.
+ */
+static LONG CpuMhz;
+static pj_int64_t CpuHz;
+ 
+static pj_status_t GetCpuHz(void)
+{
+    HKEY key;
+    LONG rc;
+    DWORD size;
+
+#if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0
+    rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+		      L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0",
+		      0, 0, &key);
+#else
+    rc = RegOpenKey( HKEY_LOCAL_MACHINE,
+		     "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0",
+		     &key);
+#endif
+
+    if (rc != ERROR_SUCCESS)
+	return PJ_RETURN_OS_ERROR(rc);
+
+    size = sizeof(CpuMhz);
+    rc = RegQueryValueEx(key, "~MHz", NULL, NULL, (BYTE*)&CpuMhz, &size);
+    RegCloseKey(key);
+
+    if (rc != ERROR_SUCCESS) {
+	return PJ_RETURN_OS_ERROR(rc);
+    }
+
+    CpuHz = CpuMhz;
+    CpuHz = CpuHz * 1000000;
+
+    return PJ_SUCCESS;
+}
+
+/* __int64 is nicely returned in EDX:EAX */
+__declspec(naked) __int64 rdtsc() 
+{
+    __asm 
+    {
+	RDTSC
+	RET
+    }
+}
+
+PJ_DEF(pj_status_t) pj_get_timestamp(pj_timestamp *ts)
+{
+    ts->u64 = rdtsc();
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_get_timestamp_freq(pj_timestamp *freq)
+{
+    pj_status_t status;
+
+    if (CpuHz == 0) {
+	status = GetCpuHz();
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    freq->u64 = CpuHz;
+    return PJ_SUCCESS;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+#elif defined(PJ_TIMESTAMP_WIN32_USE_SAFE_QPC) && \
+         PJ_TIMESTAMP_WIN32_USE_SAFE_QPC!=0
+
+/* Use safe QueryPerformanceCounter.
+ * This implementation has some protection against bug in KB Q274323:
+ *   Performance counter value may unexpectedly leap forward
+ *   http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q274323
+ *
+ * THIS SHOULD NOT BE USED YET AS IT DOESN'T HANDLE SYSTEM TIME
+ * CHANGE.
+ */
+
+static pj_timestamp g_ts_freq;
+static pj_timestamp g_ts_base;
+static pj_int64_t   g_time_base;
+
+PJ_DEF(pj_status_t) pj_get_timestamp(pj_timestamp *ts)
+{
+    enum { MAX_RETRY = 10 };
+    unsigned i;
+
+
+    /* pj_get_timestamp_freq() must have been called before.
+     * This is done when application called pj_init().
+     */
+    pj_assert(g_ts_freq.u64 != 0);
+
+    /* Retry QueryPerformanceCounter() until we're sure that the
+     * value returned makes sense.
+     */
+    i = 0;
+    do {
+	LARGE_INTEGER val;
+	pj_int64_t counter64, time64, diff;
+	pj_time_val time_now;
+
+	/* Retrieve the counter */
+	if (!QueryPerformanceCounter(&val))
+	    return PJ_RETURN_OS_ERROR(GetLastError());
+
+	/* Regardless of the goodness of the value, we should put
+	 * the counter here, because normally application wouldn't
+	 * check the error result of this function.
+	 */
+	ts->u64 = val.QuadPart;
+
+	/* Retrieve time */
+	pj_gettimeofday(&time_now);
+
+	/* Get the counter elapsed time in miliseconds */
+	counter64 = (val.QuadPart - g_ts_base.u64) * 1000 / g_ts_freq.u64;
+	
+	/* Get the time elapsed in miliseconds. 
+	 * We don't want to use PJ_TIME_VAL_MSEC() since it's using
+	 * 32bit calculation, which limits the maximum elapsed time
+	 * to around 49 days only.
+	 */
+	time64 = time_now.sec;
+	time64 = time64 * 1000 + time_now.msec;
+	//time64 = GetTickCount();
+
+	/* It's good if the difference between two clocks are within
+	 * some compile time constant (default: 20ms, which to allow
+	 * context switch happen between QueryPerformanceCounter and
+	 * pj_gettimeofday()).
+	 */
+	diff = (time64 - g_time_base) - counter64;
+	if (diff >= -20 && diff <= 20) {
+	    /* It's good */
+	    return PJ_SUCCESS;
+	}
+
+	++i;
+
+    } while (i < MAX_RETRY);
+
+    TRACE_((THIS_FILE, "QueryPerformanceCounter returned bad value"));
+    return PJ_ETIMEDOUT;
+}
+
+static pj_status_t init_performance_counter(void)
+{
+    LARGE_INTEGER val;
+    pj_time_val time_base;
+    pj_status_t status;
+
+    /* Get the frequency */
+    if (!QueryPerformanceFrequency(&val))
+	return PJ_RETURN_OS_ERROR(GetLastError());
+
+    g_ts_freq.u64 = val.QuadPart;
+
+    /* Get the base timestamp */
+    if (!QueryPerformanceCounter(&val))
+	return PJ_RETURN_OS_ERROR(GetLastError());
+
+    g_ts_base.u64 = val.QuadPart;
+
+
+    /* Get the base time */
+    status = pj_gettimeofday(&time_base);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Convert time base to 64bit value in msec */
+    g_time_base = time_base.sec;
+    g_time_base  = g_time_base * 1000 + time_base.msec;
+    //g_time_base = GetTickCount();
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_get_timestamp_freq(pj_timestamp *freq)
+{
+    if (g_ts_freq.u64 == 0) {
+	enum { MAX_REPEAT = 10 };
+	unsigned i;
+	pj_status_t status;
+
+	/* Make unellegant compiler happy */
+	status = 0;
+
+	/* Repeat initializing performance counter until we're sure
+	 * the base timing is correct. It is possible that the system
+	 * returns bad counter during this initialization!
+	 */
+	for (i=0; i<MAX_REPEAT; ++i) {
+
+	    pj_timestamp dummy;
+
+	    /* Init base time */
+	    status = init_performance_counter();
+	    if (status != PJ_SUCCESS)
+		return status;
+
+	    /* Try the base time */
+	    status = pj_get_timestamp(&dummy);
+	    if (status == PJ_SUCCESS)
+		break;
+	}
+
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    freq->u64 = g_ts_freq.u64;
+    return PJ_SUCCESS;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+#else
+
+/*
+ * Use QueryPerformanceCounter and QueryPerformanceFrequency.
+ * This should be the default implementation to be used on Windows.
+ */
+PJ_DEF(pj_status_t) pj_get_timestamp(pj_timestamp *ts)
+{
+    LARGE_INTEGER val;
+
+    if (!QueryPerformanceCounter(&val))
+	return PJ_RETURN_OS_ERROR(GetLastError());
+
+    ts->u64 = val.QuadPart;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_get_timestamp_freq(pj_timestamp *freq)
+{
+    LARGE_INTEGER val;
+
+    if (!QueryPerformanceFrequency(&val))
+	return PJ_RETURN_OS_ERROR(GetLastError());
+
+    freq->u64 = val.QuadPart;
+    return PJ_SUCCESS;
+}
+
+
+#endif	/* PJ_TIMESTAMP_USE_RDTSC */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/pool.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/pool.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/pool.c	(revision 1163)
@@ -0,0 +1,279 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/pool.h>
+#include <pj/log.h>
+#include <pj/except.h>
+#include <pj/assert.h>
+#include <pj/os.h>
+
+#if !PJ_HAS_POOL_ALT_API
+
+
+/* Include inline definitions when inlining is disabled. */
+#if !PJ_FUNCTIONS_ARE_INLINED
+#  include <pj/pool_i.h>
+#endif
+
+#define LOG(expr)   PJ_LOG(6,expr)
+
+int PJ_NO_MEMORY_EXCEPTION;
+
+/*
+ * Create new block.
+ * Create a new big chunk of memory block, from which user allocation will be
+ * taken from.
+ */
+static pj_pool_block *pj_pool_create_block( pj_pool_t *pool, pj_size_t size)
+{
+    pj_pool_block *block;
+
+    PJ_CHECK_STACK();
+    pj_assert(size >= sizeof(pj_pool_block));
+
+    LOG((pool->obj_name, "create_block(sz=%u), cur.cap=%u, cur.used=%u", 
+	 size, pool->capacity, pj_pool_get_used_size(pool)));
+
+    /* Request memory from allocator. */
+    block = (pj_pool_block*) 
+	(*pool->factory->policy.block_alloc)(pool->factory, size);
+    if (block == NULL) {
+	(*pool->callback)(pool, size);
+	return NULL;
+    }
+
+    /* Add capacity. */
+    pool->capacity += size;
+
+    /* Set block attribytes. */
+    block->cur = block->buf = ((unsigned char*)block) + sizeof(pj_pool_block);
+    block->end = ((unsigned char*)block) + size;
+
+    /* Insert in the front of the list. */
+    pj_list_insert_after(&pool->block_list, block);
+
+    LOG((pool->obj_name," block created, buffer=%p-%p",block->buf, block->end));
+
+    return block;
+}
+
+/*
+ * Allocate memory chunk for user from available blocks.
+ * This will iterate through block list to find space to allocate the chunk.
+ * If no space is available in all the blocks, a new block might be created
+ * (depending on whether the pool is allowed to resize).
+ */
+PJ_DEF(void*) pj_pool_allocate_find(pj_pool_t *pool, unsigned size)
+{
+    pj_pool_block *block = pool->block_list.next;
+    void *p;
+    unsigned block_size;
+
+    PJ_CHECK_STACK();
+
+    while (block != &pool->block_list) {
+	p = pj_pool_alloc_from_block(block, size);
+	if (p != NULL)
+	    return p;
+	block = block->next;
+    }
+    /* No available space in all blocks. */
+
+    /* If pool is configured NOT to expand, return error. */
+    if (pool->increment_size == 0) {
+	LOG((pool->obj_name, "Can't expand pool to allocate %u bytes "
+	     "(used=%u, cap=%u)",
+	     size, pj_pool_get_used_size(pool), pool->capacity));
+	(*pool->callback)(pool, size);
+	return NULL;
+    }
+
+    /* If pool is configured to expand, but the increment size
+     * is less than the required size, expand the pool by multiple
+     * increment size
+     */
+    if (pool->increment_size < size + sizeof(pj_pool_block)) {
+        unsigned count;
+        count = (size + pool->increment_size + sizeof(pj_pool_block)) / 
+                pool->increment_size;
+        block_size = count * pool->increment_size;
+
+    } else {
+        block_size = pool->increment_size;
+    }
+
+    LOG((pool->obj_name, 
+	 "%u bytes requested, resizing pool by %u bytes (used=%u, cap=%u)",
+	 size, block_size, pj_pool_get_used_size(pool), pool->capacity));
+
+    block = pj_pool_create_block(pool, block_size);
+    if (!block)
+	return NULL;
+
+    p = pj_pool_alloc_from_block(block, size);
+    pj_assert(p != NULL);
+#if PJ_DEBUG
+    if (p == NULL) {
+	p = p;
+    }
+#endif
+    return p;
+}
+
+/*
+ * Internal function to initialize pool.
+ */
+PJ_DEF(void) pj_pool_init_int(  pj_pool_t *pool, 
+				const char *name,
+				pj_size_t increment_size,
+				pj_pool_callback *callback)
+{
+    PJ_CHECK_STACK();
+
+    pool->increment_size = increment_size;
+    pool->callback = callback;
+
+    if (name) {
+	if (strchr(name, '%') != NULL) {
+	    pj_ansi_snprintf(pool->obj_name, sizeof(pool->obj_name), 
+			     name, pool);
+	} else {
+	    pj_ansi_strncpy(pool->obj_name, name, PJ_MAX_OBJ_NAME);
+	}
+    } else {
+	pool->obj_name[0] = '\0';
+    }
+}
+
+/*
+ * Create new memory pool.
+ */
+PJ_DEF(pj_pool_t*) pj_pool_create_int( pj_pool_factory *f, const char *name,
+				       pj_size_t initial_size, 
+				       pj_size_t increment_size,
+				       pj_pool_callback *callback)
+{
+    pj_pool_t *pool;
+    pj_pool_block *block;
+    unsigned char *buffer;
+
+    PJ_CHECK_STACK();
+
+    /* Size must be at least sizeof(pj_pool)+sizeof(pj_pool_block) */
+    PJ_ASSERT_RETURN(initial_size >= sizeof(pj_pool_t)+sizeof(pj_pool_block),
+		     NULL);
+
+    /* If callback is NULL, set calback from the policy */
+    if (callback == NULL)
+	callback = f->policy.callback;
+
+    /* Allocate initial block */
+    buffer = (*f->policy.block_alloc)(f, initial_size);
+    if (!buffer)
+	return NULL;
+
+    /* Set pool administrative data. */
+    pool = (pj_pool_t*)buffer;
+    pj_bzero(pool, sizeof(*pool));
+
+    pj_list_init(&pool->block_list);
+    pool->factory = f;
+
+    /* Create the first block from the memory. */
+    block = (pj_pool_block*) (buffer + sizeof(*pool));
+    block->cur = block->buf = ((unsigned char*)block) + sizeof(pj_pool_block);
+    block->end = buffer + initial_size;
+    pj_list_insert_after(&pool->block_list, block);
+
+    pj_pool_init_int(pool, name, increment_size, callback);
+
+    /* Pool initial capacity and used size */
+    pool->capacity = initial_size;
+
+    LOG((pool->obj_name, "pool created, size=%u", pool->capacity));
+    return pool;
+}
+
+/*
+ * Reset the pool to the state when it was created.
+ * All blocks will be deallocated except the first block. All memory areas
+ * are marked as free.
+ */
+static void reset_pool(pj_pool_t *pool)
+{
+    pj_pool_block *block;
+
+    PJ_CHECK_STACK();
+
+    block = pool->block_list.prev;
+    if (block == &pool->block_list)
+	return;
+
+    /* Skip the first block because it is occupying the same memory
+       as the pool itself.
+    */
+    block = block->prev;
+    
+    while (block != &pool->block_list) {
+	pj_pool_block *prev = block->prev;
+	pj_list_erase(block);
+	(*pool->factory->policy.block_free)(pool->factory, block, 
+					    block->end - (unsigned char*)block);
+	block = prev;
+    }
+
+    block = pool->block_list.next;
+    block->cur = block->buf;
+    pool->capacity = block->end - (unsigned char*)pool;
+}
+
+/*
+ * The public function to reset pool.
+ */
+PJ_DEF(void) pj_pool_reset(pj_pool_t *pool)
+{
+    LOG((pool->obj_name, "reset(): cap=%d, used=%d(%d%%)", 
+	pool->capacity, pj_pool_get_used_size(pool), 
+	pj_pool_get_used_size(pool)*100/pool->capacity));
+
+    reset_pool(pool);
+}
+
+/*
+ * Destroy the pool.
+ */
+PJ_DEF(void) pj_pool_destroy_int(pj_pool_t *pool)
+{
+    pj_size_t initial_size;
+
+    LOG((pool->obj_name, "destroy(): cap=%d, used=%d(%d%%), block0=%p-%p", 
+	pool->capacity, pj_pool_get_used_size(pool), 
+	pj_pool_get_used_size(pool)*100/pool->capacity,
+	((pj_pool_block*)pool->block_list.next)->buf, 
+	((pj_pool_block*)pool->block_list.next)->end));
+
+    reset_pool(pool);
+    initial_size = ((pj_pool_block*)pool->block_list.next)->end - 
+		   (unsigned char*)pool;
+    if (pool->factory->policy.block_free)
+	(*pool->factory->policy.block_free)(pool->factory, pool, initial_size);
+}
+
+
+#endif	/* PJ_HAS_POOL_ALT_API */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_buf.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_buf.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_buf.c	(revision 1163)
@@ -0,0 +1,100 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/pool_buf.h>
+#include <pj/assert.h>
+#include <pj/os.h>
+
+struct pj_pool_factory stack_based_factory;
+
+struct creation_param
+{
+    void	*stack_buf;
+    pj_size_t	 size;
+};
+
+static int is_initialized;
+static long tls = -1;
+static void* stack_alloc(pj_pool_factory *factory, pj_size_t size);
+
+static void pool_buf_cleanup(void)
+{
+    if (tls != -1) {
+	pj_thread_local_free(tls);
+	tls = -1;
+    }
+    if (is_initialized)
+	is_initialized = 0;
+}
+
+static pj_status_t pool_buf_initialize()
+{
+    pj_atexit(&pool_buf_cleanup);
+
+    stack_based_factory.policy.block_alloc = &stack_alloc;
+    return pj_thread_local_alloc(&tls);
+}
+
+static void* stack_alloc(pj_pool_factory *factory, pj_size_t size)
+{
+    struct creation_param *param;
+    void *buf;
+
+    PJ_UNUSED_ARG(factory);
+
+    param = pj_thread_local_get(tls);
+    if (param == NULL) {
+	/* Don't assert(), this is normal no-memory situation */
+	return NULL;
+    }
+
+    pj_thread_local_set(tls, NULL);
+
+    PJ_ASSERT_RETURN(size <= param->size, NULL);
+
+    buf = param->stack_buf;
+
+    /* Prevent the buffer from being reused */
+    param->stack_buf = NULL;
+
+    return buf;
+}
+
+
+PJ_DEF(pj_pool_t*) pj_pool_create_on_buf(const char *name,
+					 void *buf,
+					 pj_size_t size)
+{
+    struct creation_param param;
+
+    PJ_ASSERT_RETURN(buf && size, NULL);
+
+    if (!is_initialized) {
+	if (pool_buf_initialize() != PJ_SUCCESS)
+	    return NULL;
+	is_initialized = 1;
+    }
+
+    param.stack_buf = buf;
+    param.size = size;
+    pj_thread_local_set(tls, &param);
+
+    return pj_pool_create_int(&stack_based_factory, name, size, 0, 
+			      pj_pool_factory_default_policy.callback);
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_caching.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_caching.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_caching.c	(revision 1163)
@@ -0,0 +1,317 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/pool.h>
+#include <pj/log.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+#include <pj/lock.h>
+#include <pj/os.h>
+#include <pj/pool_buf.h>
+
+#if !PJ_HAS_POOL_ALT_API
+
+static pj_pool_t* cpool_create_pool(pj_pool_factory *pf, 
+				    const char *name,
+				    pj_size_t initial_size, 
+				    pj_size_t increment_sz,
+				    pj_pool_callback *callback);
+static void cpool_release_pool(pj_pool_factory *pf, pj_pool_t *pool);
+static void cpool_dump_status(pj_pool_factory *factory, pj_bool_t detail );
+static pj_bool_t cpool_on_block_alloc(pj_pool_factory *f, pj_size_t sz);
+static void cpool_on_block_free(pj_pool_factory *f, pj_size_t sz);
+
+
+static pj_size_t pool_sizes[PJ_CACHING_POOL_ARRAY_SIZE] = 
+{
+    256, 512, 1024, 2048, 4096, 8192, 12288, 16384, 
+    20480, 24576, 28672, 32768, 40960, 49152, 57344, 65536
+};
+
+/* Index where the search for size should begin.
+ * Start with pool_sizes[5], which is 8192.
+ */
+#define START_SIZE  5
+
+
+PJ_DEF(void) pj_caching_pool_init( pj_caching_pool *cp, 
+				   const pj_pool_factory_policy *policy,
+				   pj_size_t max_capacity)
+{
+    int i;
+    pj_pool_t *pool;
+
+    PJ_CHECK_STACK();
+
+    pj_bzero(cp, sizeof(*cp));
+    
+    cp->max_capacity = max_capacity;
+    pj_list_init(&cp->used_list);
+    for (i=0; i<PJ_CACHING_POOL_ARRAY_SIZE; ++i)
+	pj_list_init(&cp->free_list[i]);
+
+    pj_memcpy(&cp->factory.policy, policy, sizeof(pj_pool_factory_policy));
+    cp->factory.create_pool = &cpool_create_pool;
+    cp->factory.release_pool = &cpool_release_pool;
+    cp->factory.dump_status = &cpool_dump_status;
+    cp->factory.on_block_alloc = &cpool_on_block_alloc;
+    cp->factory.on_block_free = &cpool_on_block_free;
+
+    pool = pj_pool_create_on_buf("cachingpool", cp->pool_buf, sizeof(cp->pool_buf));
+    pj_lock_create_simple_mutex(pool, "cachingpool", &cp->lock);
+}
+
+PJ_DEF(void) pj_caching_pool_destroy( pj_caching_pool *cp )
+{
+    int i;
+    pj_pool_t *pool;
+
+    PJ_CHECK_STACK();
+
+    /* Delete all pool in free list */
+    for (i=0; i < PJ_CACHING_POOL_ARRAY_SIZE; ++i) {
+	pj_pool_t *pool = cp->free_list[i].next;
+	pj_pool_t *next;
+	for (; pool != (void*)&cp->free_list[i]; pool = next) {
+	    next = pool->next;
+	    pj_list_erase(pool);
+	    pj_pool_destroy_int(pool);
+	}
+    }
+
+    /* Delete all pools in used list */
+    pool = cp->used_list.next;
+    while (pool != (pj_pool_t*) &cp->used_list) {
+	pj_pool_t *next = pool->next;
+	pj_list_erase(pool);
+	pj_pool_destroy_int(pool);
+	pool = next;
+    }
+
+    if (cp->lock) {
+	pj_lock_destroy(cp->lock);
+	pj_lock_create_null_mutex(NULL, "cachingpool", &cp->lock);
+    }
+}
+
+static pj_pool_t* cpool_create_pool(pj_pool_factory *pf, 
+					      const char *name, 
+					      pj_size_t initial_size, 
+					      pj_size_t increment_sz, 
+					      pj_pool_callback *callback)
+{
+    pj_caching_pool *cp = (pj_caching_pool*)pf;
+    pj_pool_t *pool;
+    int idx;
+
+    PJ_CHECK_STACK();
+
+    pj_lock_acquire(cp->lock);
+
+    /* Use pool factory's policy when callback is NULL */
+    if (callback == NULL) {
+	callback = pf->policy.callback;
+    }
+
+    /* Search the suitable size for the pool. 
+     * We'll just do linear search to the size array, as the array size itself
+     * is only a few elements. Binary search I suspect will be less efficient
+     * for this purpose.
+     */
+    if (initial_size <= pool_sizes[START_SIZE]) {
+	for (idx=START_SIZE-1; 
+	     idx >= 0 && pool_sizes[idx] >= initial_size;
+	     --idx)
+	    ;
+	++idx;
+    } else {
+	for (idx=START_SIZE+1; 
+	     idx < PJ_CACHING_POOL_ARRAY_SIZE && 
+		  pool_sizes[idx] < initial_size;
+	     ++idx)
+	    ;
+    }
+
+    /* Check whether there's a pool in the list. */
+    if (idx==PJ_CACHING_POOL_ARRAY_SIZE || pj_list_empty(&cp->free_list[idx])) {
+	/* No pool is available. */
+	/* Set minimum size. */
+	if (idx < PJ_CACHING_POOL_ARRAY_SIZE)
+	    initial_size =  pool_sizes[idx];
+
+	/* Create new pool */
+	pool = pj_pool_create_int(&cp->factory, name, initial_size, 
+				  increment_sz, callback);
+	if (!pool) {
+	    pj_lock_release(cp->lock);
+	    return NULL;
+	}
+
+    } else {
+	/* Get one pool from the list. */
+	pool = cp->free_list[idx].next;
+	pj_list_erase(pool);
+
+	/* Initialize the pool. */
+	pj_pool_init_int(pool, name, increment_sz, callback);
+
+	/* Update pool manager's free capacity. */
+	cp->capacity -= pj_pool_get_capacity(pool);
+
+	PJ_LOG(6, (pool->obj_name, "pool reused, size=%u", pool->capacity));
+    }
+
+    /* Put in used list. */
+    pj_list_insert_before( &cp->used_list, pool );
+
+    /* Mark factory data */
+    pool->factory_data = (void*) (long) idx;
+
+    /* Increment used count. */
+    ++cp->used_count;
+
+    pj_lock_release(cp->lock);
+    return pool;
+}
+
+static void cpool_release_pool( pj_pool_factory *pf, pj_pool_t *pool)
+{
+    pj_caching_pool *cp = (pj_caching_pool*)pf;
+    unsigned pool_capacity;
+    unsigned i;
+
+    PJ_CHECK_STACK();
+
+    pj_lock_acquire(cp->lock);
+
+    /* Erase from the used list. */
+    pj_list_erase(pool);
+
+    /* Decrement used count. */
+    --cp->used_count;
+
+    pool_capacity = pj_pool_get_capacity(pool);
+
+    /* Destroy the pool if the size is greater than our size or if the total
+     * capacity in our recycle list (plus the size of the pool) exceeds 
+     * maximum capacity.
+   . */
+    if (pool_capacity > pool_sizes[PJ_CACHING_POOL_ARRAY_SIZE-1] ||
+	cp->capacity + pool_capacity > cp->max_capacity)
+    {
+	pj_pool_destroy_int(pool);
+	pj_lock_release(cp->lock);
+	return;
+    }
+
+    /* Reset pool. */
+    PJ_LOG(6, (pool->obj_name, "recycle(): cap=%d, used=%d(%d%%)", 
+	       pool_capacity, pj_pool_get_used_size(pool), 
+	       pj_pool_get_used_size(pool)*100/pool_capacity));
+    pj_pool_reset(pool);
+
+    pool_capacity = pj_pool_get_capacity(pool);
+
+    /*
+     * Otherwise put the pool in our recycle list.
+     */
+    i = (unsigned) (unsigned long) pool->factory_data;
+
+    pj_assert(i<PJ_CACHING_POOL_ARRAY_SIZE);
+    if (i >= PJ_CACHING_POOL_ARRAY_SIZE ) {
+	/* Something has gone wrong with the pool. */
+	pj_pool_destroy_int(pool);
+	pj_lock_release(cp->lock);
+	return;
+    }
+
+    pj_list_insert_after(&cp->free_list[i], pool);
+    cp->capacity += pool_capacity;
+
+    pj_lock_release(cp->lock);
+}
+
+static void cpool_dump_status(pj_pool_factory *factory, pj_bool_t detail )
+{
+#if PJ_LOG_MAX_LEVEL >= 3
+    pj_caching_pool *cp = (pj_caching_pool*)factory;
+
+    pj_lock_acquire(cp->lock);
+
+    PJ_LOG(3,("cachpool", " Dumping caching pool:"));
+    PJ_LOG(3,("cachpool", "   Capacity=%u, max_capacity=%u, used_cnt=%u", \
+			     cp->capacity, cp->max_capacity, cp->used_count));
+    if (detail) {
+	pj_pool_t *pool = cp->used_list.next;
+	pj_uint32_t total_used = 0, total_capacity = 0;
+        PJ_LOG(3,("cachpool", "  Dumping all active pools:"));
+	while (pool != (void*)&cp->used_list) {
+	    unsigned pool_capacity = pj_pool_get_capacity(pool);
+	    PJ_LOG(3,("cachpool", "   %12s: %8d of %8d (%d%%) used", 
+				  pj_pool_getobjname(pool), 
+				  pj_pool_get_used_size(pool), 
+				  pool_capacity,
+				  pj_pool_get_used_size(pool)*100/pool_capacity));
+	    total_used += pj_pool_get_used_size(pool);
+	    total_capacity += pool_capacity;
+	    pool = pool->next;
+	}
+	if (total_capacity) {
+	    PJ_LOG(3,("cachpool", "  Total %9d of %9d (%d %%) used!",
+				  total_used, total_capacity,
+				  total_used * 100 / total_capacity));
+	}
+    }
+
+    pj_lock_release(cp->lock);
+#else
+    PJ_UNUSED_ARG(factory);
+    PJ_UNUSED_ARG(detail);
+#endif
+}
+
+
+static pj_bool_t cpool_on_block_alloc(pj_pool_factory *f, pj_size_t sz)
+{
+    pj_caching_pool *cp = (pj_caching_pool*)f;
+
+    //Can't lock because mutex is not recursive
+    //if (cp->mutex) pj_mutex_lock(cp->mutex);
+
+    cp->used_size += sz;
+    if (cp->used_size > cp->peak_used_size)
+	cp->peak_used_size = cp->used_size;
+
+    //if (cp->mutex) pj_mutex_unlock(cp->mutex);
+
+    return PJ_TRUE;
+}
+
+
+static void cpool_on_block_free(pj_pool_factory *f, pj_size_t sz)
+{
+    pj_caching_pool *cp = (pj_caching_pool*)f;
+
+    //pj_mutex_lock(cp->mutex);
+    cp->used_size -= sz;
+    //pj_mutex_unlock(cp->mutex);
+}
+
+
+#endif	/* PJ_HAS_POOL_ALT_API */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_dbg.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_dbg.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_dbg.c	(revision 1163)
@@ -0,0 +1,191 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/pool.h>
+#include <pj/string.h>
+
+#if PJ_POOL_DEBUG
+
+#if PJ_HAS_MALLOC_H
+#   include <malloc.h>
+#endif
+
+
+#if PJ_HAS_STDLIB_H
+#   include <stdlib.h>
+#endif
+
+
+#if defined(PJ_WIN32) && PJ_WIN32!=0 && defined(PJ_DEBUG) && PJ_DEBUG!=0 \
+    && !PJ_NATIVE_STRING_IS_UNICODE
+#   include <windows.h>
+#   define TRACE_(msg)	OutputDebugString(msg)
+#endif
+
+/* Uncomment this to enable TRACE_ */
+//#undef TRACE_
+
+
+struct pj_pool_mem
+{
+    struct pj_pool_mem *next;
+
+    /* data follows immediately */
+};
+
+
+struct pj_pool_t
+{
+    struct pj_pool_mem *first_mem;
+    pj_size_t		used_size;
+    pj_pool_callback   *cb;
+};
+
+
+int PJ_NO_MEMORY_EXCEPTION;
+
+
+/* Create pool */
+PJ_DEF(pj_pool_t*) pj_pool_create_imp( const char *file, int line,
+				       void *factory,
+				       const char *name,
+				       pj_size_t initial_size,
+				       pj_size_t increment_size,
+				       pj_pool_callback *callback)
+{
+    pj_pool_t *pool;
+
+    PJ_UNUSED_ARG(file);
+    PJ_UNUSED_ARG(line);
+    PJ_UNUSED_ARG(factory);
+    PJ_UNUSED_ARG(name);
+    PJ_UNUSED_ARG(initial_size);
+    PJ_UNUSED_ARG(increment_size);
+
+    pool = malloc(sizeof(struct pj_pool_t));
+    if (!pool)
+	return NULL;
+
+    pool->first_mem = NULL;
+    pool->used_size = 0;
+    pool->cb = callback;
+
+    return pool;
+}
+
+
+/* Release pool */
+PJ_DEF(void) pj_pool_release_imp(pj_pool_t *pool)
+{
+    pj_pool_reset(pool);
+    free(pool);
+}
+
+/* Get pool name */
+PJ_DEF(const char*) pj_pool_getobjname_imp(pj_pool_t *pool)
+{
+    PJ_UNUSED_ARG(pool);
+    return "pooldbg";
+}
+
+/* Reset pool */
+PJ_DEF(void) pj_pool_reset_imp(pj_pool_t *pool)
+{
+    struct pj_pool_mem *mem;
+
+    mem = pool->first_mem;
+    while (mem) {
+	struct pj_pool_mem *next = mem->next;
+	free(mem);
+	mem = next;
+    }
+
+    pool->first_mem = NULL;
+}
+
+/* Get capacity */
+PJ_DEF(pj_size_t) pj_pool_get_capacity_imp(pj_pool_t *pool)
+{
+    PJ_UNUSED_ARG(pool);
+
+    /* Unlimited capacity */
+    return 0x7FFFFFFFUL;
+}
+
+/* Get total used size */
+PJ_DEF(pj_size_t) pj_pool_get_used_size_imp(pj_pool_t *pool)
+{
+    return pool->used_size;
+}
+
+/* Allocate memory from the pool */
+PJ_DEF(void*) pj_pool_alloc_imp( const char *file, int line, 
+				 pj_pool_t *pool, pj_size_t sz)
+{
+    struct pj_pool_mem *mem;
+
+    PJ_UNUSED_ARG(file);
+    PJ_UNUSED_ARG(line);
+
+    mem = malloc(sz + sizeof(struct pj_pool_mem));
+    if (!mem) {
+	if (pool->cb)
+	    (*pool->cb)(pool, sz);
+	return NULL;
+    }
+
+    mem->next = pool->first_mem;
+    pool->first_mem = mem;
+
+#ifdef TRACE_
+    {
+	char msg[120];
+	pj_ansi_sprintf(msg, "Mem %X (%d+%d bytes) allocated by %s:%d\r\n",
+			mem, sz, sizeof(struct pj_pool_mem), 
+			file, line);
+	TRACE_(msg);
+    }
+#endif
+
+    return ((char*)mem) + sizeof(struct pj_pool_mem);
+}
+
+/* Allocate memory from the pool and zero the memory */
+PJ_DEF(void*) pj_pool_calloc_imp( const char *file, int line, 
+				  pj_pool_t *pool, unsigned cnt, 
+				  unsigned elemsz)
+{
+    void *mem;
+
+    mem = pj_pool_alloc_imp(file, line, pool, cnt*elemsz);
+    if (!mem)
+	return NULL;
+
+    pj_bzero(mem, cnt*elemsz);
+    return mem;
+}
+
+/* Allocate memory from the pool and zero the memory */
+PJ_DEF(void*) pj_pool_zalloc_imp( const char *file, int line, 
+				  pj_pool_t *pool, pj_size_t sz)
+{
+    return pj_pool_calloc_imp(file, line, pool, 1, sz);
+}
+
+
+#endif	/* PJ_POOL_DEBUG */
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_policy_kmalloc.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_policy_kmalloc.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_policy_kmalloc.c	(revision 1163)
@@ -0,0 +1,58 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/pool.h>
+#include <pj/except.h>
+#include <pj/os.h>
+
+
+static void *default_block_alloc(pj_pool_factory *factory, pj_size_t size)
+{
+    PJ_CHECK_STACK();
+    PJ_UNUSED_ARG(factory);
+
+    return kmalloc(size, GFP_ATOMIC);
+}
+
+static void default_block_free(pj_pool_factory *factory, 
+			       void *mem, pj_size_t size)
+{
+    PJ_CHECK_STACK();
+    PJ_UNUSED_ARG(factory);
+    PJ_UNUSED_ARG(size);
+
+    kfree(mem);
+}
+
+static void default_pool_callback(pj_pool_t *pool, pj_size_t size)
+{
+    PJ_CHECK_STACK();
+    PJ_UNUSED_ARG(pool);
+    PJ_UNUSED_ARG(size);
+
+    PJ_THROW(PJ_NO_MEMORY_EXCEPTION);
+}
+
+pj_pool_factory_policy pj_pool_factory_default_policy = 
+{
+    &default_block_alloc,
+    &default_block_free,
+    &default_pool_callback,
+    0
+};
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_policy_malloc.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_policy_malloc.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/pool_policy_malloc.c	(revision 1163)
@@ -0,0 +1,82 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/pool.h>
+#include <pj/except.h>
+#include <pj/os.h>
+#include <pj/compat/malloc.h>
+
+#if !PJ_HAS_POOL_ALT_API
+
+/*
+ * This file contains pool default policy definition and implementation.
+ */
+
+
+static void *default_block_alloc(pj_pool_factory *factory, pj_size_t size)
+{
+    void *p;
+
+    PJ_CHECK_STACK();
+
+    if (factory->on_block_alloc) {
+	int rc;
+	rc = factory->on_block_alloc(factory, size);
+	if (!rc)
+	    return NULL;
+    }
+
+    p = malloc(size);
+
+    if (p == NULL) {
+	if (factory->on_block_free) 
+	    factory->on_block_free(factory, size);
+    }
+
+    return p;
+}
+
+static void default_block_free(pj_pool_factory *factory, void *mem, 
+			       pj_size_t size)
+{
+    PJ_CHECK_STACK();
+
+    if (factory->on_block_free) 
+        factory->on_block_free(factory, size);
+
+    free(mem);
+}
+
+static void default_pool_callback(pj_pool_t *pool, pj_size_t size)
+{
+    PJ_CHECK_STACK();
+    PJ_UNUSED_ARG(pool);
+    PJ_UNUSED_ARG(size);
+
+    PJ_THROW(PJ_NO_MEMORY_EXCEPTION);
+}
+
+pj_pool_factory_policy pj_pool_factory_default_policy = 
+{
+    &default_block_alloc,
+    &default_block_free,
+    &default_pool_callback,
+    0
+};
+
+#endif	/* PJ_HAS_POOL_ALT_API */
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/rand.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/rand.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/rand.c	(revision 1163)
@@ -0,0 +1,34 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/rand.h>
+#include <pj/os.h>
+#include <pj/compat/rand.h>
+
+PJ_DEF(void) pj_srand(unsigned int seed)
+{
+    PJ_CHECK_STACK();
+    platform_srand(seed);
+}
+
+PJ_DEF(int) pj_rand(void)
+{
+    PJ_CHECK_STACK();
+    return platform_rand();
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/rbtree.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/rbtree.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/rbtree.c	(revision 1163)
@@ -0,0 +1,427 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/rbtree.h>
+#include <pj/os.h>
+
+static void left_rotate( pj_rbtree *tree, pj_rbtree_node *node ) 
+{
+    pj_rbtree_node *rnode, *parent;
+
+    PJ_CHECK_STACK();
+
+    rnode = node->right;
+    if (rnode == tree->null)
+        return;
+    
+    node->right = rnode->left;
+    if (rnode->left != tree->null)
+        rnode->left->parent = node;
+    parent = node->parent;
+    rnode->parent = parent;
+    if (parent != tree->null) {
+        if (parent->left == node)
+	   parent->left = rnode;
+        else
+	   parent->right = rnode;
+    } else {
+        tree->root = rnode;
+    }
+    rnode->left = node;
+    node->parent = rnode;
+}
+
+static void right_rotate( pj_rbtree *tree, pj_rbtree_node *node ) 
+{
+    pj_rbtree_node *lnode, *parent;
+
+    PJ_CHECK_STACK();
+
+    lnode = node->left;
+    if (lnode == tree->null)
+        return;
+
+    node->left = lnode->right;
+    if (lnode->right != tree->null)
+	lnode->right->parent = node;
+    parent = node->parent;
+    lnode->parent = parent;
+
+    if (parent != tree->null) {
+        if (parent->left == node)
+	    parent->left = lnode;
+	else
+	    parent->right = lnode;
+    } else {
+        tree->root = lnode;
+    }
+    lnode->right = node;
+    node->parent = lnode;
+}
+
+static void insert_fixup( pj_rbtree *tree, pj_rbtree_node *node ) 
+{
+    pj_rbtree_node *temp, *parent;
+
+    PJ_CHECK_STACK();
+
+    while (node != tree->root && node->parent->color == PJ_RBCOLOR_RED) {
+        parent = node->parent;
+        if (parent == parent->parent->left) {
+	    temp = parent->parent->right;
+	    if (temp->color == PJ_RBCOLOR_RED) {
+	        temp->color = PJ_RBCOLOR_BLACK;
+	        node = parent;
+	        node->color = PJ_RBCOLOR_BLACK;
+	        node = node->parent;
+	        node->color = PJ_RBCOLOR_RED;
+	    } else {
+	        if (node == parent->right) {
+		   node = parent;
+		   left_rotate(tree, node);
+	        }
+	        temp = node->parent;
+	        temp->color = PJ_RBCOLOR_BLACK;
+	        temp = temp->parent;
+	        temp->color = PJ_RBCOLOR_RED;
+	        right_rotate( tree, temp);
+	    }
+        } else {
+	    temp = parent->parent->left;
+	    if (temp->color == PJ_RBCOLOR_RED) {
+	        temp->color = PJ_RBCOLOR_BLACK;
+	        node = parent;
+	        node->color = PJ_RBCOLOR_BLACK;
+	        node = node->parent;
+	        node->color = PJ_RBCOLOR_RED;
+	    } else {
+	        if (node == parent->left) {
+		    node = parent;
+		    right_rotate(tree, node);
+	        }
+	        temp = node->parent;
+	        temp->color = PJ_RBCOLOR_BLACK;
+	        temp = temp->parent;
+	        temp->color = PJ_RBCOLOR_RED;
+	        left_rotate(tree, temp);
+	   }
+        }
+    }
+	
+    tree->root->color = PJ_RBCOLOR_BLACK;
+}
+
+
+static void delete_fixup( pj_rbtree *tree, pj_rbtree_node *node )
+{
+    pj_rbtree_node *temp;
+
+    PJ_CHECK_STACK();
+
+    while (node != tree->root && node->color == PJ_RBCOLOR_BLACK) {
+        if (node->parent->left == node) {
+	    temp = node->parent->right;
+	    if (temp->color == PJ_RBCOLOR_RED) {
+	        temp->color = PJ_RBCOLOR_BLACK;
+	        node->parent->color = PJ_RBCOLOR_RED;
+	        left_rotate(tree, node->parent);
+	        temp = node->parent->right;
+	    }
+	    if (temp->left->color == PJ_RBCOLOR_BLACK && 
+	        temp->right->color == PJ_RBCOLOR_BLACK) 
+	    {
+	        temp->color = PJ_RBCOLOR_RED;
+	        node = node->parent;
+	    } else {
+	        if (temp->right->color == PJ_RBCOLOR_BLACK) {
+		    temp->left->color = PJ_RBCOLOR_BLACK;
+		    temp->color = PJ_RBCOLOR_RED;
+		    right_rotate( tree, temp);
+		    temp = node->parent->right;
+	        }
+	        temp->color = node->parent->color;
+	        temp->right->color = PJ_RBCOLOR_BLACK;
+	        node->parent->color = PJ_RBCOLOR_BLACK;
+	        left_rotate(tree, node->parent);
+	        node = tree->root;
+	    }
+        } else {
+	    temp = node->parent->left;
+	    if (temp->color == PJ_RBCOLOR_RED) {
+	        temp->color = PJ_RBCOLOR_BLACK;
+	        node->parent->color = PJ_RBCOLOR_RED;
+	        right_rotate( tree, node->parent);
+	        temp = node->parent->left;
+	    }
+	    if (temp->right->color == PJ_RBCOLOR_BLACK && 
+		temp->left->color == PJ_RBCOLOR_BLACK) 
+	    {
+	        temp->color = PJ_RBCOLOR_RED;
+	        node = node->parent;
+	    } else {
+	        if (temp->left->color == PJ_RBCOLOR_BLACK) {
+		    temp->right->color = PJ_RBCOLOR_BLACK;
+		    temp->color = PJ_RBCOLOR_RED;
+		    left_rotate( tree, temp);
+		    temp = node->parent->left;
+	        }
+	        temp->color = node->parent->color;
+	        node->parent->color = PJ_RBCOLOR_BLACK;
+	        temp->left->color = PJ_RBCOLOR_BLACK;
+	        right_rotate(tree, node->parent);
+	        node = tree->root;
+	    }
+        }
+    }
+	
+    node->color = PJ_RBCOLOR_BLACK;
+}
+
+
+PJ_DEF(void) pj_rbtree_init( pj_rbtree *tree, pj_rbtree_comp *comp )
+{
+    PJ_CHECK_STACK();
+
+    tree->null = tree->root = &tree->null_node;
+    tree->null->key = NULL;
+    tree->null->user_data = NULL;
+    tree->size = 0;
+    tree->null->left = tree->null->right = tree->null->parent = tree->null;
+    tree->null->color = PJ_RBCOLOR_BLACK;
+    tree->comp = comp;
+}
+
+PJ_DEF(pj_rbtree_node*) pj_rbtree_first( pj_rbtree *tree )
+{
+    register pj_rbtree_node *node = tree->root;
+    register pj_rbtree_node *null = tree->null;
+    
+    PJ_CHECK_STACK();
+
+    while (node->left != null)
+	node = node->left;
+    return node != null ? node : NULL;
+}
+
+PJ_DEF(pj_rbtree_node*) pj_rbtree_last( pj_rbtree *tree )
+{
+    register pj_rbtree_node *node = tree->root;
+    register pj_rbtree_node *null = tree->null;
+    
+    PJ_CHECK_STACK();
+
+    while (node->right != null)
+	node = node->right;
+    return node != null ? node : NULL;
+}
+
+PJ_DEF(pj_rbtree_node*) pj_rbtree_next( pj_rbtree *tree, 
+					register pj_rbtree_node *node )
+{
+    register pj_rbtree_node *null = tree->null;
+    
+    PJ_CHECK_STACK();
+
+    if (node->right != null) {
+	for (node=node->right; node->left!=null; node = node->left)
+	    /* void */;
+    } else {
+        register pj_rbtree_node *temp = node->parent;
+        while (temp!=null && temp->right==node) {
+	    node = temp;
+	    temp = temp->parent;
+	}
+	node = temp;
+    }    
+    return node != null ? node : NULL;
+}
+
+PJ_DEF(pj_rbtree_node*) pj_rbtree_prev( pj_rbtree *tree, 
+					register pj_rbtree_node *node )
+{
+    register pj_rbtree_node *null = tree->null;
+    
+    PJ_CHECK_STACK();
+
+    if (node->left != null) {
+        for (node=node->left; node->right!=null; node=node->right)
+	   /* void */;
+    } else {
+        register pj_rbtree_node *temp = node->parent;
+        while (temp!=null && temp->left==node) {
+	    node = temp;
+	    temp = temp->parent;
+        }
+        node = temp;
+    }    
+    return node != null ? node : NULL;
+}
+
+PJ_DEF(int) pj_rbtree_insert( pj_rbtree *tree, 
+			      pj_rbtree_node *element )
+{
+    int rv = 0;
+    pj_rbtree_node *node, *parent = tree->null, 
+		   *null = tree->null;
+    pj_rbtree_comp *comp = tree->comp;
+	
+    PJ_CHECK_STACK();
+
+    node = tree->root;	
+    while (node != null) {
+        rv = (*comp)(element->key, node->key);
+        if (rv == 0) {
+	    /* found match, i.e. entry with equal key already exist */
+	    return -1;
+	}    
+	parent = node;
+        node = rv < 0 ? node->left : node->right;
+    }
+
+    element->color = PJ_RBCOLOR_RED;
+    element->left = element->right = null;
+
+    node = element;
+    if (parent != null) {
+        node->parent = parent;
+        if (rv < 0)
+	   parent->left = node;
+        else
+	   parent->right = node;
+        insert_fixup( tree, node);
+    } else {
+        tree->root = node;
+        node->parent = null;
+        node->color = PJ_RBCOLOR_BLACK;
+    }
+	
+    ++tree->size;
+    return 0;
+}
+
+
+PJ_DEF(pj_rbtree_node*) pj_rbtree_find( pj_rbtree *tree,
+					const void *key )
+{
+    int rv;
+    pj_rbtree_node *node = tree->root;
+    pj_rbtree_node *null = tree->null;
+    pj_rbtree_comp *comp = tree->comp;
+    
+    while (node != null) {
+        rv = (*comp)(key, node->key);
+        if (rv == 0)
+	    return node;
+        node = rv < 0 ? node->left : node->right;
+    }
+    return node != null ? node : NULL;
+}
+
+PJ_DEF(pj_rbtree_node*) pj_rbtree_erase( pj_rbtree *tree,
+					 pj_rbtree_node *node )
+{
+    pj_rbtree_node *succ;
+    pj_rbtree_node *null = tree->null;
+    pj_rbtree_node *child;
+    pj_rbtree_node *parent;
+    
+    PJ_CHECK_STACK();
+
+    if (node->left == null || node->right == null) {
+        succ = node;
+    } else {
+        for (succ=node->right; succ->left!=null; succ=succ->left)
+	   /* void */;
+    }
+
+    child = succ->left != null ? succ->left : succ->right;
+    parent = succ->parent;
+    child->parent = parent;
+    
+    if (parent != null) {
+	if (parent->left == succ)
+	    parent->left = child;
+        else
+	   parent->right = child;
+    } else
+        tree->root = child;
+
+    if (succ != node) {
+        succ->parent = node->parent;
+        succ->left = node->left;
+        succ->right = node->right;
+        succ->color = node->color;
+
+        parent = node->parent;
+        if (parent != null) {
+	   if (parent->left==node)
+	        parent->left=succ;
+	   else
+		parent->right=succ;
+        }
+        if (node->left != null)
+	   node->left->parent = succ;;
+        if (node->right != null)
+	    node->right->parent = succ;
+
+        if (tree->root == node)
+	   tree->root = succ;
+    }
+
+    if (succ->color == PJ_RBCOLOR_BLACK) {
+	if (child != null) 
+	    delete_fixup(tree, child);
+        tree->null->color = PJ_RBCOLOR_BLACK;
+    }
+
+    --tree->size;
+    return node;
+}
+
+
+PJ_DEF(unsigned) pj_rbtree_max_height( pj_rbtree *tree,
+				       pj_rbtree_node *node )
+{
+    unsigned l, r;
+    
+    PJ_CHECK_STACK();
+
+    if (node==NULL) 
+	node = tree->root;
+    
+    l = node->left != tree->null ? pj_rbtree_max_height(tree,node->left)+1 : 0;
+    r = node->right != tree->null ? pj_rbtree_max_height(tree,node->right)+1 : 0;
+    return l > r ? l : r;
+}
+
+PJ_DEF(unsigned) pj_rbtree_min_height( pj_rbtree *tree,
+				       pj_rbtree_node *node )
+{
+    unsigned l, r;
+    
+    PJ_CHECK_STACK();
+
+    if (node==NULL) 
+	node=tree->root;
+    
+    l = (node->left != tree->null) ? pj_rbtree_max_height(tree,node->left)+1 : 0;
+    r = (node->right != tree->null) ? pj_rbtree_max_height(tree,node->right)+1 : 0;
+    return l > r ? r : l;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/sock_bsd.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/sock_bsd.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/sock_bsd.c	(revision 1163)
@@ -0,0 +1,666 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/sock.h>
+#include <pj/os.h>
+#include <pj/assert.h>
+#include <pj/string.h>
+#include <pj/compat/socket.h>
+#include <pj/addr_resolv.h>
+#include <pj/errno.h>
+
+/*
+ * Address families conversion.
+ * The values here are indexed based on pj_addr_family.
+ */
+const pj_uint16_t PJ_AF_UNIX	= AF_UNIX;
+const pj_uint16_t PJ_AF_INET	= AF_INET;
+const pj_uint16_t PJ_AF_INET6	= AF_INET6;
+#ifdef AF_PACKET
+const pj_uint16_t PJ_AF_PACKET	= AF_PACKET;
+#else
+const pj_uint16_t PJ_AF_PACKET	= 0xFFFF;
+#endif
+#ifdef AF_IRDA
+const pj_uint16_t PJ_AF_IRDA	= AF_IRDA;
+#else
+const pj_uint16_t PJ_AF_IRDA	= 0xFFFF;
+#endif
+
+/*
+ * Socket types conversion.
+ * The values here are indexed based on pj_sock_type
+ */
+const pj_uint16_t PJ_SOCK_STREAM= SOCK_STREAM;
+const pj_uint16_t PJ_SOCK_DGRAM	= SOCK_DGRAM;
+const pj_uint16_t PJ_SOCK_RAW	= SOCK_RAW;
+const pj_uint16_t PJ_SOCK_RDM	= SOCK_RDM;
+
+/*
+ * Socket level values.
+ */
+const pj_uint16_t PJ_SOL_SOCKET	= SOL_SOCKET;
+#ifdef SOL_IP
+const pj_uint16_t PJ_SOL_IP	= SOL_IP;
+#else
+const pj_uint16_t PJ_SOL_IP	= 0xFFFF;
+#endif /* SOL_IP */
+#if defined(SOL_TCP)
+const pj_uint16_t PJ_SOL_TCP	= SOL_TCP;
+#elif defined(IPPROTO_TCP)
+const pj_uint16_t PJ_SOL_TCP	= IPPROTO_TCP;
+#endif /* SOL_TCP */
+#ifdef SOL_UDP
+const pj_uint16_t PJ_SOL_UDP	= SOL_UDP;
+#else
+const pj_uint16_t PJ_SOL_UDP	= 0xFFFF;
+#endif
+#ifdef SOL_IPV6
+const pj_uint16_t PJ_SOL_IPV6	= SOL_IPV6;
+#else
+const pj_uint16_t PJ_SOL_IPV6	= 0xFFFF;
+#endif
+
+/* IP_TOS */
+#ifdef IP_TOS
+const pj_uint16_t PJ_IP_TOS	= IP_TOS;
+#else
+const pj_uint16_t PJ_IP_TOS	= 1;
+#endif
+
+
+/* TOS settings (declared in netinet/ip.h) */
+#ifdef IPTOS_LOWDELAY
+const pj_uint16_t PJ_IPTOS_LOWDELAY	= IPTOS_LOWDELAY;
+#else
+const pj_uint16_t PJ_IPTOS_LOWDELAY	= 0x10;
+#endif
+#ifdef IPTOS_THROUGHPUT
+const pj_uint16_t PJ_IPTOS_THROUGHPUT	= IPTOS_THROUGHPUT;
+#else
+const pj_uint16_t PJ_IPTOS_THROUGHPUT	= 0x08;
+#endif
+#ifdef IPTOS_RELIABILITY
+const pj_uint16_t PJ_IPTOS_RELIABILITY	= IPTOS_RELIABILITY;
+#else
+const pj_uint16_t PJ_IPTOS_RELIABILITY	= 0x04;
+#endif
+#ifdef IPTOS_MINCOST
+const pj_uint16_t PJ_IPTOS_MINCOST	= IPTOS_MINCOST;
+#else
+const pj_uint16_t PJ_IPTOS_MINCOST	= 0x02;
+#endif
+
+
+/* optname values. */
+const pj_uint16_t PJ_SO_TYPE    = SO_TYPE;
+const pj_uint16_t PJ_SO_RCVBUF  = SO_RCVBUF;
+const pj_uint16_t PJ_SO_SNDBUF  = SO_SNDBUF;
+
+
+/* recv() and send() flags */
+const int PJ_MSG_OOB		= MSG_OOB;
+const int PJ_MSG_PEEK		= MSG_PEEK;
+const int PJ_MSG_DONTROUTE	= MSG_DONTROUTE;
+
+
+#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0
+#   define SET_LEN(addr,len) (((pj_sockaddr*)(addr))->sa_zero_len=(len))
+#   define RESET_LEN(addr)   (((pj_sockaddr*)(addr))->sa_zero_len=0)
+#else
+#   define SET_LEN(addr,len) 
+#   define RESET_LEN(addr)
+#endif
+
+
+/*
+ * Convert 16-bit value from network byte order to host byte order.
+ */
+PJ_DEF(pj_uint16_t) pj_ntohs(pj_uint16_t netshort)
+{
+    return ntohs(netshort);
+}
+
+/*
+ * Convert 16-bit value from host byte order to network byte order.
+ */
+PJ_DEF(pj_uint16_t) pj_htons(pj_uint16_t hostshort)
+{
+    return htons(hostshort);
+}
+
+/*
+ * Convert 32-bit value from network byte order to host byte order.
+ */
+PJ_DEF(pj_uint32_t) pj_ntohl(pj_uint32_t netlong)
+{
+    return ntohl(netlong);
+}
+
+/*
+ * Convert 32-bit value from host byte order to network byte order.
+ */
+PJ_DEF(pj_uint32_t) pj_htonl(pj_uint32_t hostlong)
+{
+    return htonl(hostlong);
+}
+
+/*
+ * Convert an Internet host address given in network byte order
+ * to string in standard numbers and dots notation.
+ */
+PJ_DEF(char*) pj_inet_ntoa(pj_in_addr inaddr)
+{
+#if !defined(PJ_LINUX) && !defined(PJ_LINUX_KERNEL)
+    return inet_ntoa(*(struct in_addr*)&inaddr);
+#else
+    struct in_addr addr;
+    addr.s_addr = inaddr.s_addr;
+    return inet_ntoa(addr);
+#endif
+}
+
+/*
+ * This function converts the Internet host address cp from the standard
+ * numbers-and-dots notation into binary data and stores it in the structure
+ * that inp points to. 
+ */
+PJ_DEF(int) pj_inet_aton(const pj_str_t *cp, struct pj_in_addr *inp)
+{
+    char tempaddr[16];
+
+    /* Initialize output with PJ_INADDR_NONE.
+     * Some apps relies on this instead of the return value
+     * (and anyway the return value is quite confusing!)
+     */
+    inp->s_addr = PJ_INADDR_NONE;
+
+    /* Caution:
+     *	this function might be called with cp->slen >= 16
+     *  (i.e. when called with hostname to check if it's an IP addr).
+     */
+    PJ_ASSERT_RETURN(cp && cp->slen && inp, 0);
+    if (cp->slen >= 16) {
+	return 0;
+    }
+
+    pj_memcpy(tempaddr, cp->ptr, cp->slen);
+    tempaddr[cp->slen] = '\0';
+
+#if defined(PJ_SOCK_HAS_INET_ATON) && PJ_SOCK_HAS_INET_ATON != 0
+    return inet_aton(tempaddr, (struct in_addr*)inp);
+#else
+    inp->s_addr = inet_addr(tempaddr);
+    return inp->s_addr == PJ_INADDR_NONE ? 0 : 1;
+#endif
+}
+
+/*
+ * Convert address string with numbers and dots to binary IP address.
+ */ 
+PJ_DEF(pj_in_addr) pj_inet_addr(const pj_str_t *cp)
+{
+    pj_in_addr addr;
+
+    pj_inet_aton(cp, &addr);
+    return addr;
+}
+
+/*
+ * Convert address string with numbers and dots to binary IP address.
+ */ 
+PJ_DEF(pj_in_addr) pj_inet_addr2(const char *cp)
+{
+    pj_str_t str = pj_str((char*)cp);
+    return pj_inet_addr(&str);
+}
+
+/*
+ * Set the IP address of an IP socket address from string address, 
+ * with resolving the host if necessary. The string address may be in a
+ * standard numbers and dots notation or may be a hostname. If hostname
+ * is specified, then the function will resolve the host into the IP
+ * address.
+ */
+PJ_DEF(pj_status_t) pj_sockaddr_in_set_str_addr( pj_sockaddr_in *addr,
+					         const pj_str_t *str_addr)
+{
+    PJ_CHECK_STACK();
+
+    PJ_ASSERT_RETURN(!str_addr || str_addr->slen < PJ_MAX_HOSTNAME, 
+                     (addr->sin_addr.s_addr=PJ_INADDR_NONE, PJ_EINVAL));
+
+    RESET_LEN(addr);
+    addr->sin_family = AF_INET;
+    pj_bzero(addr->sin_zero, sizeof(addr->sin_zero));
+
+    if (str_addr && str_addr->slen) {
+	addr->sin_addr = pj_inet_addr(str_addr);
+	if (addr->sin_addr.s_addr == PJ_INADDR_NONE) {
+    	    pj_hostent he;
+	    pj_status_t rc;
+
+	    rc = pj_gethostbyname(str_addr, &he);
+	    if (rc == 0) {
+		addr->sin_addr.s_addr = *(pj_uint32_t*)he.h_addr;
+	    } else {
+		addr->sin_addr.s_addr = PJ_INADDR_NONE;
+		return rc;
+	    }
+	}
+
+    } else {
+	addr->sin_addr.s_addr = 0;
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Set the IP address and port of an IP socket address.
+ * The string address may be in a standard numbers and dots notation or 
+ * may be a hostname. If hostname is specified, then the function will 
+ * resolve the host into the IP address.
+ */
+PJ_DEF(pj_status_t) pj_sockaddr_in_init( pj_sockaddr_in *addr,
+				         const pj_str_t *str_addr,
+					 pj_uint16_t port)
+{
+    PJ_ASSERT_RETURN(addr, (addr->sin_addr.s_addr=PJ_INADDR_NONE, PJ_EINVAL));
+
+    RESET_LEN(addr);
+    addr->sin_family = PJ_AF_INET;
+    pj_bzero(addr->sin_zero, sizeof(addr->sin_zero));
+    pj_sockaddr_in_set_port(addr, port);
+    return pj_sockaddr_in_set_str_addr(addr, str_addr);
+}
+
+
+/*
+ * Get hostname.
+ */
+PJ_DEF(const pj_str_t*) pj_gethostname(void)
+{
+    static char buf[PJ_MAX_HOSTNAME];
+    static pj_str_t hostname;
+
+    PJ_CHECK_STACK();
+
+    if (hostname.ptr == NULL) {
+	hostname.ptr = buf;
+	if (gethostname(buf, sizeof(buf)) != 0) {
+	    hostname.ptr[0] = '\0';
+	    hostname.slen = 0;
+	} else {
+	   hostname.slen = strlen(buf);
+	}
+    }
+    return &hostname;
+}
+
+/*
+ * Get first IP address associated with the hostname.
+ */
+PJ_DEF(pj_in_addr) pj_gethostaddr(void)
+{
+    pj_sockaddr_in addr;
+    const pj_str_t *hostname = pj_gethostname();
+
+    pj_sockaddr_in_set_str_addr(&addr, hostname);
+    return addr.sin_addr;
+}
+
+
+#if defined(PJ_WIN32)
+/*
+ * Create new socket/endpoint for communication and returns a descriptor.
+ */
+PJ_DEF(pj_status_t) pj_sock_socket(int af, 
+				   int type, 
+				   int proto,
+				   pj_sock_t *sock)
+{
+    PJ_CHECK_STACK();
+
+    /* Sanity checks. */
+    PJ_ASSERT_RETURN(sock!=NULL, PJ_EINVAL);
+    PJ_ASSERT_RETURN((unsigned)PJ_INVALID_SOCKET==INVALID_SOCKET, 
+                     (*sock=PJ_INVALID_SOCKET, PJ_EINVAL));
+
+    *sock = WSASocket(af, type, proto, NULL, 0, WSA_FLAG_OVERLAPPED);
+
+    if (*sock == PJ_INVALID_SOCKET) 
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else
+	return PJ_SUCCESS;
+}
+
+#else
+/*
+ * Create new socket/endpoint for communication and returns a descriptor.
+ */
+PJ_DEF(pj_status_t) pj_sock_socket(int af, 
+				   int type, 
+				   int proto, 
+				   pj_sock_t *sock)
+{
+
+    PJ_CHECK_STACK();
+
+    /* Sanity checks. */
+    PJ_ASSERT_RETURN(sock!=NULL, PJ_EINVAL);
+    PJ_ASSERT_RETURN(PJ_INVALID_SOCKET==-1, 
+                     (*sock=PJ_INVALID_SOCKET, PJ_EINVAL));
+
+    *sock = socket(af, type, proto);
+    if (*sock == PJ_INVALID_SOCKET)
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else 
+	return PJ_SUCCESS;
+}
+#endif
+
+
+/*
+ * Bind socket.
+ */
+PJ_DEF(pj_status_t) pj_sock_bind( pj_sock_t sock, 
+				  const pj_sockaddr_t *addr,
+				  int len)
+{
+    PJ_CHECK_STACK();
+
+    PJ_ASSERT_RETURN(addr && len >= sizeof(struct sockaddr_in), PJ_EINVAL);
+
+    if (bind(sock, (struct sockaddr*)addr, len) != 0)
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else
+	return PJ_SUCCESS;
+}
+
+
+/*
+ * Bind socket.
+ */
+PJ_DEF(pj_status_t) pj_sock_bind_in( pj_sock_t sock, 
+				     pj_uint32_t addr32,
+				     pj_uint16_t port)
+{
+    pj_sockaddr_in addr;
+
+    PJ_CHECK_STACK();
+
+    SET_LEN(&addr, sizeof(pj_sockaddr_in));
+    addr.sin_family = PJ_AF_INET;
+    pj_bzero(addr.sin_zero, sizeof(addr.sin_zero));
+    addr.sin_addr.s_addr = pj_htonl(addr32);
+    addr.sin_port = pj_htons(port);
+
+    return pj_sock_bind(sock, &addr, sizeof(pj_sockaddr_in));
+}
+
+
+/*
+ * Close socket.
+ */
+PJ_DEF(pj_status_t) pj_sock_close(pj_sock_t sock)
+{
+    int rc;
+
+    PJ_CHECK_STACK();
+#if defined(PJ_WIN32) && PJ_WIN32!=0 || \
+    defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0
+    rc = closesocket(sock);
+#else
+    rc = close(sock);
+#endif
+
+    if (rc != 0)
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else
+	return PJ_SUCCESS;
+}
+
+/*
+ * Get remote's name.
+ */
+PJ_DEF(pj_status_t) pj_sock_getpeername( pj_sock_t sock,
+					 pj_sockaddr_t *addr,
+					 int *namelen)
+{
+    PJ_CHECK_STACK();
+    if (getpeername(sock, (struct sockaddr*)addr, (socklen_t*)namelen) != 0)
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else {
+	RESET_LEN(addr);
+	return PJ_SUCCESS;
+    }
+}
+
+/*
+ * Get socket name.
+ */
+PJ_DEF(pj_status_t) pj_sock_getsockname( pj_sock_t sock,
+					 pj_sockaddr_t *addr,
+					 int *namelen)
+{
+    PJ_CHECK_STACK();
+    if (getsockname(sock, (struct sockaddr*)addr, (socklen_t*)namelen) != 0)
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else {
+	RESET_LEN(addr);
+	return PJ_SUCCESS;
+    }
+}
+
+/*
+ * Send data
+ */
+PJ_DEF(pj_status_t) pj_sock_send(pj_sock_t sock,
+				 const void *buf,
+				 pj_ssize_t *len,
+				 unsigned flags)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(len, PJ_EINVAL);
+
+    *len = send(sock, (const char*)buf, *len, flags);
+
+    if (*len < 0)
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else
+	return PJ_SUCCESS;
+}
+
+
+/*
+ * Send data.
+ */
+PJ_DEF(pj_status_t) pj_sock_sendto(pj_sock_t sock,
+				   const void *buf,
+				   pj_ssize_t *len,
+				   unsigned flags,
+				   const pj_sockaddr_t *to,
+				   int tolen)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(len, PJ_EINVAL);
+
+    *len = sendto(sock, (const char*)buf, *len, flags, 
+		  (const struct sockaddr*)to, tolen);
+
+    if (*len < 0) 
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else 
+	return PJ_SUCCESS;
+}
+
+/*
+ * Receive data.
+ */
+PJ_DEF(pj_status_t) pj_sock_recv(pj_sock_t sock,
+				 void *buf,
+				 pj_ssize_t *len,
+				 unsigned flags)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(buf && len, PJ_EINVAL);
+
+    *len = recv(sock, (char*)buf, *len, flags);
+
+    if (*len < 0) 
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else
+	return PJ_SUCCESS;
+}
+
+/*
+ * Receive data.
+ */
+PJ_DEF(pj_status_t) pj_sock_recvfrom(pj_sock_t sock,
+				     void *buf,
+				     pj_ssize_t *len,
+				     unsigned flags,
+				     pj_sockaddr_t *from,
+				     int *fromlen)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(buf && len, PJ_EINVAL);
+    PJ_ASSERT_RETURN(from && fromlen, (*len=-1, PJ_EINVAL));
+
+    *len = recvfrom(sock, (char*)buf, *len, flags, 
+		    (struct sockaddr*)from, (socklen_t*)fromlen);
+
+    if (*len < 0) 
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else {
+	RESET_LEN(from);
+	return PJ_SUCCESS;
+    }
+}
+
+/*
+ * Get socket option.
+ */
+PJ_DEF(pj_status_t) pj_sock_getsockopt( pj_sock_t sock,
+					pj_uint16_t level,
+					pj_uint16_t optname,
+					void *optval,
+					int *optlen)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(optval && optlen, PJ_EINVAL);
+
+    if (getsockopt(sock, level, optname, (char*)optval, (socklen_t*)optlen)!=0)
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else
+	return PJ_SUCCESS;
+}
+
+/*
+ * Set socket option.
+ */
+PJ_DEF(pj_status_t) pj_sock_setsockopt( pj_sock_t sock,
+					pj_uint16_t level,
+					pj_uint16_t optname,
+					const void *optval,
+					int optlen)
+{
+    PJ_CHECK_STACK();
+    if (setsockopt(sock, level, optname, (const char*)optval, optlen) != 0)
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else
+	return PJ_SUCCESS;
+}
+
+/*
+ * Connect socket.
+ */
+PJ_DEF(pj_status_t) pj_sock_connect( pj_sock_t sock,
+				     const pj_sockaddr_t *addr,
+				     int namelen)
+{
+    PJ_CHECK_STACK();
+    if (connect(sock, (struct sockaddr*)addr, namelen) != 0)
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else
+	return PJ_SUCCESS;
+}
+
+
+/*
+ * Shutdown socket.
+ */
+#if PJ_HAS_TCP
+PJ_DEF(pj_status_t) pj_sock_shutdown( pj_sock_t sock,
+				      int how)
+{
+    PJ_CHECK_STACK();
+    if (shutdown(sock, how) != 0)
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else
+	return PJ_SUCCESS;
+}
+
+/*
+ * Start listening to incoming connections.
+ */
+PJ_DEF(pj_status_t) pj_sock_listen( pj_sock_t sock,
+				    int backlog)
+{
+    PJ_CHECK_STACK();
+    if (listen(sock, backlog) != 0)
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else
+	return PJ_SUCCESS;
+}
+
+/*
+ * Accept incoming connections
+ */
+PJ_DEF(pj_status_t) pj_sock_accept( pj_sock_t serverfd,
+				    pj_sock_t *newsock,
+				    pj_sockaddr_t *addr,
+				    int *addrlen)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(newsock != NULL, PJ_EINVAL);
+
+#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0
+    if (addr) {
+	SET_LEN(addr, *addrlen);
+    }
+#endif
+    
+    *newsock = accept(serverfd, (struct sockaddr*)addr, (socklen_t*)addrlen);
+    if (*newsock==PJ_INVALID_SOCKET)
+	return PJ_RETURN_OS_ERROR(pj_get_native_netos_error());
+    else {
+	
+#if defined(PJ_SOCKADDR_HAS_LEN) && PJ_SOCKADDR_HAS_LEN!=0
+	if (addr) {
+	    RESET_LEN(addr);
+	}
+#endif
+	    
+	return PJ_SUCCESS;
+    }
+}
+#endif	/* PJ_HAS_TCP */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/sock_linux_kernel.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/sock_linux_kernel.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/sock_linux_kernel.c	(revision 1163)
@@ -0,0 +1,754 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/sock.h>
+#include <pj/assert.h>
+#include <pj/string.h>	    /* pj_memcpy()	    */
+#include <pj/os.h>	    /* PJ_CHECK_STACK()	    */
+#include <pj/addr_resolv.h> /* pj_gethostbyname()   */
+#include <pj/ctype.h>
+#include <pj/compat/sprintf.h>
+#include <pj/log.h>
+#include <pj/errno.h>
+
+/* Linux kernel specific. */
+#include <linux/socket.h>
+#include <linux/net.h>
+//#include <net/sock.h>
+#include <linux/security.h>
+#include <linux/syscalls.h>	/* sys_xxx()	*/
+#include <asm/ioctls.h>		/* FIONBIO	*/
+#include <linux/utsname.h>	/* for pj_gethostname() */
+
+/*
+ * Address families conversion.
+ * The values here are indexed based on pj_addr_family-0xFF00.
+ */
+const pj_uint16_t PJ_AF_UNIX	= AF_UNIX;
+const pj_uint16_t PJ_AF_INET	= AF_INET;
+const pj_uint16_t PJ_AF_INET6	= AF_INET6;
+#ifdef AF_PACKET
+const pj_uint16_t PJ_AF_PACKET	= AF_PACKET;
+#else
+#  error "AF_PACKET undeclared!"
+#endif
+#ifdef AF_IRDA
+const pj_uint16_t PJ_AF_IRDA	= AF_IRDA;
+#else
+#  error "AF_IRDA undeclared!"
+#endif
+
+/*
+ * Socket types conversion.
+ * The values here are indexed based on pj_sock_type-0xFF00
+ */
+const pj_uint16_t PJ_SOCK_STREAM= SOCK_STREAM;
+const pj_uint16_t PJ_SOCK_DGRAM	= SOCK_DGRAM;
+const pj_uint16_t PJ_SOCK_RAW	= SOCK_RAW;
+const pj_uint16_t PJ_SOCK_RDM	= SOCK_RDM;
+
+/*
+ * Socket level values.
+ */
+const pj_uint16_t PJ_SOL_SOCKET	= SOL_SOCKET;
+#ifdef SOL_IP
+const pj_uint16_t PJ_SOL_IP	= SOL_IP;
+#else
+#  error "SOL_IP undeclared!"
+#endif /* SOL_IP */
+#if defined(SOL_TCP)
+const pj_uint16_t PJ_SOL_TCP	= SOL_TCP;
+#else
+#  error "SOL_TCP undeclared!"
+#endif /* SOL_TCP */
+#ifdef SOL_UDP
+const pj_uint16_t PJ_SOL_UDP	= SOL_UDP;
+#else
+#  error "SOL_UDP undeclared!"
+#endif
+#ifdef SOL_IPV6
+const pj_uint16_t PJ_SOL_IPV6	= SOL_IPV6;
+#else
+#  error "SOL_IPV6 undeclared!"
+#endif
+
+/* optname values. */
+const pj_uint16_t PJ_SO_TYPE    = SO_TYPE;
+const pj_uint16_t PJ_SO_RCVBUF  = SO_RCVBUF;
+const pj_uint16_t PJ_SO_SNDBUF  = SO_SNDBUF;
+
+/*
+ * Convert 16-bit value from network byte order to host byte order.
+ */
+PJ_DEF(pj_uint16_t) pj_ntohs(pj_uint16_t netshort)
+{
+    return ntohs(netshort);
+}
+
+/*
+ * Convert 16-bit value from host byte order to network byte order.
+ */
+PJ_DEF(pj_uint16_t) pj_htons(pj_uint16_t hostshort)
+{
+    return htons(hostshort);
+}
+
+/*
+ * Convert 32-bit value from network byte order to host byte order.
+ */
+PJ_DEF(pj_uint32_t) pj_ntohl(pj_uint32_t netlong)
+{
+    return ntohl(netlong);
+}
+
+/*
+ * Convert 32-bit value from host byte order to network byte order.
+ */
+PJ_DEF(pj_uint32_t) pj_htonl(pj_uint32_t hostlong)
+{
+    return htonl(hostlong);
+}
+
+/*
+ * Convert an Internet host address given in network byte order
+ * to string in standard numbers and dots notation.
+ */
+PJ_DEF(char*) pj_inet_ntoa(pj_in_addr in)
+{
+#define	UC(b)	(((int)b)&0xff)
+    static char b[18];
+    char *p;
+
+    p = (char *)&in;
+    pj_snprintf(b, sizeof(b), "%d.%d.%d.%d", 
+	       UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3]));
+
+    return b;
+}
+
+/*
+ * This function converts the Internet host address ccp from the standard
+ * numbers-and-dots notation into binary data and stores it in the structure
+ * that inp points to. 
+ */
+PJ_DEF(int) pj_inet_aton(const pj_str_t *ccp, struct pj_in_addr *addr)
+{
+    pj_uint32_t val;
+    int base, n;
+    char c;
+    unsigned parts[4];
+    unsigned *pp = parts;
+    char cp_copy[18];
+    char *cp = cp_copy;
+    
+    addr->s_addr = PJ_INADDR_NONE;
+
+    if (ccp->slen > 15) return 0;
+
+    pj_memcpy(cp, ccp->ptr, ccp->slen);
+    cp[ccp->slen] = '\0';
+
+    c = *cp;
+    for (;;) {
+	/*
+	 * Collect number up to ``.''.
+	 * Values are specified as for C:
+	 * 0x=hex, 0=octal, isdigit=decimal.
+	 */
+	if (!pj_isdigit((int)c))
+	    return (0);
+	val = 0; base = 10;
+	if (c == '0') {
+	    c = *++cp;
+	    if (c == 'x' || c == 'X')
+		base = 16, c = *++cp;
+	    else
+		base = 8;
+	}
+
+	for (;;) {
+	    if (pj_isascii((int)c) && pj_isdigit((int)c)) {
+		val = (val * base) + (c - '0');
+		c = *++cp;
+	    } else if (base==16 && pj_isascii((int)c) && pj_isxdigit((int)c)) {
+		val = (val << 4) |
+		      (c + 10 - (pj_islower((int)c) ? 'a' : 'A'));
+		c = *++cp;
+	    } else
+		break;
+	}
+
+	if (c == '.') {
+	    /*
+	     * Internet format:
+	     *  a.b.c.d
+	     *  a.b.c   (with c treated as 16 bits)
+	     *  a.b	(with b treated as 24 bits)
+	     */
+	    if (pp >= parts + 3)
+		return (0);
+	    *pp++ = val;
+	    c = *++cp;
+	} else
+	    break;
+    }
+
+    /*
+     * Check for trailing characters.
+     */
+    if (c != '\0' && (!pj_isascii((int)c) || !pj_isspace((int)c)))
+        return (0);
+    /*
+     * Concoct the address according to
+     * the number of parts specified.
+     */
+    n = pp - parts + 1;
+    switch (n) {
+    case 0:
+	return (0);	    /* initial nondigit */
+    case 1:		/* a -- 32 bits */
+	break;
+    case 2:		/* a.b -- 8.24 bits */
+	if (val > 0xffffff)
+	    return (0);
+	val |= parts[0] << 24;
+	break;
+    case 3:		/* a.b.c -- 8.8.16 bits */
+	if (val > 0xffff)
+	    return (0);
+	val |= (parts[0] << 24) | (parts[1] << 16);
+	break;
+    case 4:		/* a.b.c.d -- 8.8.8.8 bits */
+	if (val > 0xff)
+	    return (0);
+	val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
+	break;
+    }
+
+    if (addr)
+	addr->s_addr = pj_htonl(val);
+    return (1);
+}
+
+/*
+ * Convert address string with numbers and dots to binary IP address.
+ */ 
+PJ_DEF(pj_in_addr) pj_inet_addr(const pj_str_t *cp)
+{
+    pj_in_addr addr;
+    pj_inet_aton(cp, &addr);
+    return addr;
+}
+
+/*
+ * Set the IP address of an IP socket address from string address, 
+ * with resolving the host if necessary. The string address may be in a
+ * standard numbers and dots notation or may be a hostname. If hostname
+ * is specified, then the function will resolve the host into the IP
+ * address.
+ */
+PJ_DEF(pj_status_t) pj_sockaddr_in_set_str_addr( pj_sockaddr_in *addr,
+					         const pj_str_t *str_addr)
+{
+    PJ_CHECK_STACK();
+
+    pj_assert(str_addr && str_addr->slen < PJ_MAX_HOSTNAME);
+
+    addr->sin_family = AF_INET;
+
+    if (str_addr && str_addr->slen) {
+	addr->sin_addr = pj_inet_addr(str_addr);
+	if (addr->sin_addr.s_addr == PJ_INADDR_NONE) {
+    	    pj_hostent he;
+	    if (pj_gethostbyname(str_addr, &he) == 0) {
+		addr->sin_addr.s_addr = *(pj_uint32_t*)he.h_addr;
+	    } else {
+		addr->sin_addr.s_addr = PJ_INADDR_NONE;
+		return -1;
+	    }
+	}
+
+    } else {
+	addr->sin_addr.s_addr = 0;
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Set the IP address and port of an IP socket address.
+ * The string address may be in a standard numbers and dots notation or 
+ * may be a hostname. If hostname is specified, then the function will 
+ * resolve the host into the IP address.
+ */
+PJ_DEF(pj_status_t) pj_sockaddr_in_init( pj_sockaddr_in *addr,
+				         const pj_str_t *str_addr,
+					 pj_uint16_t port)
+{
+    pj_assert(addr && str_addr);
+
+    addr->sin_family = PJ_AF_INET;
+    pj_sockaddr_in_set_port(addr, port);
+    return pj_sockaddr_in_set_str_addr(addr, str_addr);
+}
+
+
+/*
+ * Get hostname.
+ */
+PJ_DEF(const pj_str_t*) pj_gethostname(void)
+{
+    static char buf[PJ_MAX_HOSTNAME];
+    static pj_str_t hostname;
+
+    PJ_CHECK_STACK();
+
+    if (hostname.ptr == NULL) {
+	hostname.ptr = buf;
+	down_read(&uts_sem);
+	hostname.slen = strlen(system_utsname.nodename);
+	if (hostname.slen > PJ_MAX_HOSTNAME) {
+	    hostname.ptr[0] = '\0';
+	    hostname.slen = 0;
+	} else {
+	    pj_memcpy(hostname.ptr, system_utsname.nodename, hostname.slen);
+	}
+	up_read(&uts_sem);
+    }
+    return &hostname;
+}
+
+/*
+ * Get first IP address associated with the hostname.
+ */
+PJ_DEF(pj_in_addr) pj_gethostaddr(void)
+{
+    pj_sockaddr_in addr;
+    const pj_str_t *hostname = pj_gethostname();
+
+    pj_sockaddr_in_set_str_addr(&addr, hostname);
+    return addr.sin_addr;
+}
+
+
+/*
+ * Create new socket/endpoint for communication and returns a descriptor.
+ */
+PJ_DEF(pj_status_t) pj_sock_socket(int af, int type, int proto, 
+				   pj_sock_t *sock_fd)
+{
+    long result;
+
+    PJ_CHECK_STACK();
+
+    /* Sanity checks. */
+    PJ_ASSERT_RETURN(PJ_INVALID_SOCKET == -1 && sock_fd != NULL, PJ_EINVAL);
+
+    /* Initialize returned socket */
+    *sock_fd = PJ_INVALID_SOCKET;
+
+    /* Create socket. */
+    result = sys_socket(af, type, proto);
+    if (result < 0) {
+	return PJ_RETURN_OS_ERROR((-result));
+    }
+
+    *sock_fd = result;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Bind socket.
+ */
+PJ_DEF(pj_status_t) pj_sock_bind( pj_sock_t sockfd, 
+				  const pj_sockaddr_t *addr,
+				  int len)
+{
+    long err;
+    mm_segment_t oldfs;
+
+    PJ_CHECK_STACK();
+
+    PJ_ASSERT_RETURN(addr!=NULL && len >= sizeof(struct pj_sockaddr),
+		     PJ_EINVAL);
+
+    oldfs = get_fs();
+    set_fs(KERNEL_DS);
+    
+    err = sys_bind(sockfd, (struct sockaddr*)addr, len);
+
+    set_fs(oldfs);
+
+    if (err)
+	return PJ_RETURN_OS_ERROR(-err);
+    else
+	return PJ_SUCCESS;
+}
+
+
+/*
+ * Bind socket.
+ */
+PJ_DEF(pj_status_t) pj_sock_bind_in( pj_sock_t sockfd, 
+				     pj_uint32_t addr32,
+				     pj_uint16_t port)
+{
+    pj_sockaddr_in addr;
+
+    PJ_CHECK_STACK();
+
+    addr.sin_family = PJ_AF_INET;
+    addr.sin_addr.s_addr = pj_htonl(addr32);
+    addr.sin_port = pj_htons(port);
+
+    return pj_sock_bind(sockfd, &addr, sizeof(pj_sockaddr_in));
+}
+
+/*
+ * Close socket.
+ */
+PJ_DEF(pj_status_t) pj_sock_close(pj_sock_t sockfd)
+{
+    long err;
+
+    err = sys_close(sockfd);
+
+    if (err != 0)
+	return PJ_RETURN_OS_ERROR(-err);
+    else
+	return PJ_SUCCESS;
+}
+
+/*
+ * Get remote's name.
+ */
+PJ_DEF(pj_status_t) pj_sock_getpeername( pj_sock_t sockfd,
+					 pj_sockaddr_t *addr,
+					 int *namelen)
+{
+    mm_segment_t oldfs;
+    long err;
+
+    PJ_CHECK_STACK();
+
+    oldfs = get_fs();
+    set_fs(KERNEL_DS);
+
+    err = sys_getpeername( sockfd, addr, namelen);
+
+    set_fs(oldfs);
+
+    if (err)
+	return PJ_RETURN_OS_ERROR(-err);
+    else
+	return PJ_SUCCESS;
+}
+
+/*
+ * Get socket name.
+ */
+PJ_DEF(pj_status_t) pj_sock_getsockname( pj_sock_t sockfd,
+					 pj_sockaddr_t *addr,
+					 int *namelen)
+{
+    mm_segment_t oldfs;
+    int err;
+
+    PJ_CHECK_STACK();
+
+    oldfs = get_fs();
+    set_fs(KERNEL_DS);
+    
+    err = sys_getsockname( sockfd, addr, namelen );
+
+    set_fs(oldfs);
+
+    if (err)
+	return PJ_RETURN_OS_ERROR(-err);
+    else
+	return PJ_SUCCESS;
+}
+
+/*
+ * Send data
+ */
+PJ_DEF(pj_status_t) pj_sock_send( pj_sock_t sockfd,
+				  const void *buf,
+				  pj_ssize_t *len,
+				  unsigned flags)
+{
+    return pj_sock_sendto(sockfd, buf, len, flags, NULL, 0);
+}
+
+
+/*
+ * Send data.
+ */
+PJ_DEF(pj_status_t) pj_sock_sendto( pj_sock_t sockfd,
+				    const void *buff,
+				    pj_ssize_t *len,
+				    unsigned flags,
+				    const pj_sockaddr_t *addr,
+				    int addr_len)
+{
+    long err;
+    mm_segment_t oldfs;
+
+    PJ_CHECK_STACK();
+
+    oldfs = get_fs();
+    set_fs(KERNEL_DS);
+    
+    err = *len = sys_sendto( sockfd, (void*)buff, *len, flags, 
+			     (void*)addr, addr_len );
+
+    set_fs(oldfs);
+    
+    if (err >= 0) {
+	return PJ_SUCCESS;
+    }
+    else {
+	return PJ_RETURN_OS_ERROR(-err);
+    }
+}
+
+/*
+ * Receive data.
+ */
+PJ_DEF(pj_status_t) pj_sock_recv( pj_sock_t sockfd,
+				  void *buf,
+				  pj_ssize_t *len,
+				  unsigned flags)
+{
+    return pj_sock_recvfrom(sockfd, buf, len, flags, NULL, NULL);
+}
+
+/*
+ * Receive data.
+ */
+PJ_DEF(pj_status_t) pj_sock_recvfrom( pj_sock_t sockfd,
+				      void *buff,
+				      pj_ssize_t *size,
+				      unsigned flags,
+				      pj_sockaddr_t *from,
+				      int *fromlen)
+{
+    mm_segment_t oldfs;
+    long err;
+
+    PJ_CHECK_STACK();
+
+    oldfs = get_fs();
+    set_fs(KERNEL_DS);
+
+    err = *size = sys_recvfrom( sockfd, buff, *size, flags, from, fromlen);
+
+    set_fs(oldfs);
+
+    if (err >= 0) {
+	return PJ_SUCCESS;
+    }
+    else {
+	return PJ_RETURN_OS_ERROR(-err);
+    }
+}
+
+/*
+ * Get socket option.
+ */
+PJ_DEF(pj_status_t) pj_sock_getsockopt( pj_sock_t sockfd,
+					pj_uint16_t level,
+					pj_uint16_t optname,
+					void *optval,
+					int *optlen)
+{
+    mm_segment_t oldfs;
+    long err;
+
+    PJ_CHECK_STACK();
+
+    oldfs = get_fs();
+    set_fs(KERNEL_DS);
+
+    err = sys_getsockopt( sockfd, level, optname, optval, optlen);
+
+    set_fs(oldfs);
+
+    if (err)
+	return PJ_RETURN_OS_ERROR(-err);
+    else
+	return PJ_SUCCESS;
+}
+
+/*
+ * Set socket option.
+ */
+PJ_DEF(pj_status_t) pj_sock_setsockopt( pj_sock_t sockfd,
+					pj_uint16_t level,
+					pj_uint16_t optname,
+					const void *optval,
+					int optlen)
+{
+    long err;
+    mm_segment_t oldfs;
+
+    PJ_CHECK_STACK();
+
+
+    oldfs = get_fs();
+    set_fs(KERNEL_DS);
+
+    err = sys_setsockopt( sockfd, level, optname, (void*)optval, optlen);
+
+    set_fs(oldfs);
+
+    if (err)
+	return PJ_RETURN_OS_ERROR(-err);
+    else
+	return PJ_SUCCESS;
+}
+
+/*
+ * Shutdown socket.
+ */
+#if PJ_HAS_TCP
+PJ_DEF(pj_status_t) pj_sock_shutdown( pj_sock_t sockfd,
+				      int how)
+{
+    long err;
+
+    PJ_CHECK_STACK();
+
+    err = sys_shutdown(sockfd, how);
+
+    if (err)
+	return PJ_RETURN_OS_ERROR(-err);
+    else
+	return PJ_SUCCESS;
+}
+
+/*
+ * Start listening to incoming connections.
+ */
+PJ_DEF(pj_status_t) pj_sock_listen( pj_sock_t sockfd,
+				    int backlog)
+{
+    long err;
+
+    PJ_CHECK_STACK();
+
+    err = sys_listen( sockfd, backlog );
+
+    if (err)
+	return PJ_RETURN_OS_ERROR(-err);
+    else
+	return PJ_SUCCESS;
+}
+
+/*
+ * Connect socket.
+ */
+PJ_DEF(pj_status_t) pj_sock_connect( pj_sock_t sockfd,
+				     const pj_sockaddr_t *addr,
+				     int namelen)
+{
+    long err;
+    mm_segment_t oldfs;
+    
+    PJ_CHECK_STACK();
+
+    oldfs = get_fs();
+    set_fs(KERNEL_DS);
+
+    err = sys_connect( sockfd, (void*)addr, namelen );
+
+    set_fs(oldfs);
+
+    if (err)
+	return PJ_RETURN_OS_ERROR(-err);
+    else
+	return PJ_SUCCESS;
+}
+
+/*
+ * Accept incoming connections
+ */
+PJ_DEF(pj_status_t) pj_sock_accept( pj_sock_t sockfd,
+				    pj_sock_t *newsockfd,
+				    pj_sockaddr_t *addr,
+				    int *addrlen)
+{
+    long err;
+
+    PJ_CHECK_STACK();
+
+    PJ_ASSERT_RETURN(newsockfd != NULL, PJ_EINVAL);
+
+    err = sys_accept( sockfd, addr, addrlen);
+
+    if (err < 0) {
+	*newsockfd = PJ_INVALID_SOCKET;
+	return PJ_RETURN_OS_ERROR(-err);
+    }
+    else {
+	*newsockfd = err;
+	return PJ_SUCCESS;
+    }
+}
+#endif	/* PJ_HAS_TCP */
+
+
+
+/*
+ * Permission to steal inet_ntoa() and inet_aton() as long as this notice below
+ * is included:
+ */
+/*
+ * Copyright (c) 1983, 1993
+ *  The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *  This product includes software developed by the University of
+ *  California, Berkeley and its contributors.
+ * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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.
+ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/sock_select.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/sock_select.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/sock_select.c	(revision 1163)
@@ -0,0 +1,112 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/sock_select.h>
+#include <pj/compat/socket.h>
+#include <pj/os.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+
+#if defined(PJ_HAS_STRING_H) && PJ_HAS_STRING_H!=0
+#   include <string.h>
+#endif
+
+#if defined(PJ_HAS_SYS_TIME_H) && PJ_HAS_SYS_TIME_H!=0
+#   include <sys/time.h>
+#endif
+
+#ifdef _MSC_VER
+#   pragma warning(disable: 4018)    // Signed/unsigned mismatch in FD_*
+#   pragma warning(disable: 4389)    // Signed/unsigned mismatch in FD_*
+#endif
+
+#define PART_FDSET(ps)		((fd_set*)&ps->data[1])
+#define PART_FDSET_OR_NULL(ps)	(ps ? PART_FDSET(ps) : NULL)
+#define PART_COUNT(ps)		(ps->data[0])
+
+PJ_DEF(void) PJ_FD_ZERO(pj_fd_set_t *fdsetp)
+{
+    PJ_CHECK_STACK();
+    pj_assert(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set));
+
+    FD_ZERO(PART_FDSET(fdsetp));
+    PART_COUNT(fdsetp) = 0;
+}
+
+
+PJ_DEF(void) PJ_FD_SET(pj_sock_t fd, pj_fd_set_t *fdsetp)
+{
+    PJ_CHECK_STACK();
+    pj_assert(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set));
+
+    if (!PJ_FD_ISSET(fd, fdsetp))
+        ++PART_COUNT(fdsetp);
+    FD_SET(fd, PART_FDSET(fdsetp));
+}
+
+
+PJ_DEF(void) PJ_FD_CLR(pj_sock_t fd, pj_fd_set_t *fdsetp)
+{
+    PJ_CHECK_STACK();
+    pj_assert(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set));
+
+    if (PJ_FD_ISSET(fd, fdsetp))
+        --PART_COUNT(fdsetp);
+    FD_CLR(fd, PART_FDSET(fdsetp));
+}
+
+
+PJ_DEF(pj_bool_t) PJ_FD_ISSET(pj_sock_t fd, const pj_fd_set_t *fdsetp)
+{
+    PJ_CHECK_STACK();
+    PJ_ASSERT_RETURN(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set),
+                     0);
+
+    return FD_ISSET(fd, PART_FDSET(fdsetp));
+}
+
+PJ_DEF(pj_size_t) PJ_FD_COUNT(const pj_fd_set_t *fdsetp)
+{
+    return PART_COUNT(fdsetp);
+}
+
+PJ_DEF(int) pj_sock_select( int n, 
+			    pj_fd_set_t *readfds, 
+			    pj_fd_set_t *writefds,
+			    pj_fd_set_t *exceptfds, 
+			    const pj_time_val *timeout)
+{
+    struct timeval os_timeout, *p_os_timeout;
+
+    PJ_CHECK_STACK();
+
+    PJ_ASSERT_RETURN(sizeof(pj_fd_set_t)-sizeof(pj_sock_t) >= sizeof(fd_set),
+                     PJ_EBUG);
+
+    if (timeout) {
+	os_timeout.tv_sec = timeout->sec;
+	os_timeout.tv_usec = timeout->msec * 1000;
+	p_os_timeout = &os_timeout;
+    } else {
+	p_os_timeout = NULL;
+    }
+
+    return select(n, PART_FDSET_OR_NULL(readfds), PART_FDSET_OR_NULL(writefds),
+		  PART_FDSET_OR_NULL(exceptfds), p_os_timeout);
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/string.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/string.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/string.c	(revision 1163)
@@ -0,0 +1,123 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/string.h>
+#include <pj/pool.h>
+#include <pj/ctype.h>
+#include <pj/rand.h>
+#include <pj/os.h>
+
+#if PJ_FUNCTIONS_ARE_INLINED==0
+#  include <pj/string_i.h>
+#endif
+
+
+PJ_DEF(pj_str_t*) pj_strltrim( pj_str_t *str )
+{
+    register char *p = str->ptr;
+    while (pj_isspace(*p))
+	++p;
+    str->slen -= (p - str->ptr);
+    str->ptr = p;
+    return str;
+}
+
+PJ_DEF(pj_str_t*) pj_strrtrim( pj_str_t *str )
+{
+    char *end = str->ptr + str->slen;
+    register char *p = end - 1;
+    while (p >= str->ptr && pj_isspace(*p))
+        --p;
+    str->slen -= ((end - p) - 1);
+    return str;
+}
+
+PJ_DEF(char*) pj_create_random_string(char *str, pj_size_t len)
+{
+    unsigned i;
+    char *p = str;
+
+    PJ_CHECK_STACK();
+
+    for (i=0; i<len/8; ++i) {
+	pj_uint32_t val = pj_rand();
+	pj_val_to_hex_digit( (val & 0xFF000000) >> 24, p+0 );
+	pj_val_to_hex_digit( (val & 0x00FF0000) >> 16, p+2 );
+	pj_val_to_hex_digit( (val & 0x0000FF00) >>  8, p+4 );
+	pj_val_to_hex_digit( (val & 0x000000FF) >>  0, p+6 );
+	p += 8;
+    }
+    for (i=i * 8; i<len; ++i) {
+	*p++ = pj_hex_digits[ pj_rand() & 0x0F ];
+    }
+    return str;
+}
+
+
+PJ_DEF(unsigned long) pj_strtoul(const pj_str_t *str)
+{
+    unsigned long value;
+    unsigned i;
+
+    PJ_CHECK_STACK();
+
+    value = 0;
+    for (i=0; i<(unsigned)str->slen; ++i) {
+	value = value * 10 + (str->ptr[i] - '0');
+    }
+    return value;
+}
+
+PJ_DEF(int) pj_utoa(unsigned long val, char *buf)
+{
+    return pj_utoa_pad(val, buf, 0, 0);
+}
+
+PJ_DEF(int) pj_utoa_pad( unsigned long val, char *buf, int min_dig, int pad)
+{
+    char *p;
+    int len;
+
+    PJ_CHECK_STACK();
+
+    p = buf;
+    do {
+        unsigned long digval = (unsigned long) (val % 10);
+        val /= 10;
+        *p++ = (char) (digval + '0');
+    } while (val > 0);
+
+    len = p-buf;
+    while (len < min_dig) {
+	*p++ = (char)pad;
+	++len;
+    }
+    *p-- = '\0';
+
+    do {
+        char temp = *p;
+        *p = *buf;
+        *buf = temp;
+        --p;
+        ++buf;
+    } while (buf < p);
+
+    return len;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/symbols.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/symbols.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/symbols.c	(revision 1163)
@@ -0,0 +1,346 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 <pjlib.h>
+
+/*
+ * addr_resolv.h
+ */
+PJ_EXPORT_SYMBOL(pj_gethostbyname)
+
+/*
+ * array.h
+ */
+PJ_EXPORT_SYMBOL(pj_array_insert)
+PJ_EXPORT_SYMBOL(pj_array_erase)
+PJ_EXPORT_SYMBOL(pj_array_find)
+
+/*
+ * config.h
+ */
+PJ_EXPORT_SYMBOL(pj_dump_config)
+	
+/*
+ * errno.h
+ */
+PJ_EXPORT_SYMBOL(pj_get_os_error)
+PJ_EXPORT_SYMBOL(pj_set_os_error)
+PJ_EXPORT_SYMBOL(pj_get_netos_error)
+PJ_EXPORT_SYMBOL(pj_set_netos_error)
+PJ_EXPORT_SYMBOL(pj_strerror)
+
+/*
+ * except.h
+ */
+PJ_EXPORT_SYMBOL(pj_throw_exception_)
+PJ_EXPORT_SYMBOL(pj_push_exception_handler_)
+PJ_EXPORT_SYMBOL(pj_pop_exception_handler_)
+PJ_EXPORT_SYMBOL(pj_setjmp)
+PJ_EXPORT_SYMBOL(pj_longjmp)
+PJ_EXPORT_SYMBOL(pj_exception_id_alloc)
+PJ_EXPORT_SYMBOL(pj_exception_id_free)
+PJ_EXPORT_SYMBOL(pj_exception_id_name)
+
+
+/*
+ * fifobuf.h
+ */
+PJ_EXPORT_SYMBOL(pj_fifobuf_init)
+PJ_EXPORT_SYMBOL(pj_fifobuf_max_size)
+PJ_EXPORT_SYMBOL(pj_fifobuf_alloc)
+PJ_EXPORT_SYMBOL(pj_fifobuf_unalloc)
+PJ_EXPORT_SYMBOL(pj_fifobuf_free)
+
+/*
+ * guid.h
+ */
+PJ_EXPORT_SYMBOL(pj_generate_unique_string)
+PJ_EXPORT_SYMBOL(pj_create_unique_string)
+
+/*
+ * hash.h
+ */
+PJ_EXPORT_SYMBOL(pj_hash_calc)
+PJ_EXPORT_SYMBOL(pj_hash_create)
+PJ_EXPORT_SYMBOL(pj_hash_get)
+PJ_EXPORT_SYMBOL(pj_hash_set)
+PJ_EXPORT_SYMBOL(pj_hash_count)
+PJ_EXPORT_SYMBOL(pj_hash_first)
+PJ_EXPORT_SYMBOL(pj_hash_next)
+PJ_EXPORT_SYMBOL(pj_hash_this)
+
+/*
+ * ioqueue.h
+ */
+PJ_EXPORT_SYMBOL(pj_ioqueue_create)
+PJ_EXPORT_SYMBOL(pj_ioqueue_destroy)
+PJ_EXPORT_SYMBOL(pj_ioqueue_set_lock)
+PJ_EXPORT_SYMBOL(pj_ioqueue_register_sock)
+PJ_EXPORT_SYMBOL(pj_ioqueue_unregister)
+PJ_EXPORT_SYMBOL(pj_ioqueue_get_user_data)
+PJ_EXPORT_SYMBOL(pj_ioqueue_poll)
+PJ_EXPORT_SYMBOL(pj_ioqueue_read)
+PJ_EXPORT_SYMBOL(pj_ioqueue_recv)
+PJ_EXPORT_SYMBOL(pj_ioqueue_recvfrom)
+PJ_EXPORT_SYMBOL(pj_ioqueue_write)
+PJ_EXPORT_SYMBOL(pj_ioqueue_send)
+PJ_EXPORT_SYMBOL(pj_ioqueue_sendto)
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP != 0
+PJ_EXPORT_SYMBOL(pj_ioqueue_accept)
+PJ_EXPORT_SYMBOL(pj_ioqueue_connect)
+#endif
+
+/*
+ * list.h
+ */
+PJ_EXPORT_SYMBOL(pj_list_insert_before)
+PJ_EXPORT_SYMBOL(pj_list_insert_nodes_before)
+PJ_EXPORT_SYMBOL(pj_list_insert_after)
+PJ_EXPORT_SYMBOL(pj_list_insert_nodes_after)
+PJ_EXPORT_SYMBOL(pj_list_merge_first)
+PJ_EXPORT_SYMBOL(pj_list_merge_last)
+PJ_EXPORT_SYMBOL(pj_list_erase)
+PJ_EXPORT_SYMBOL(pj_list_find_node)
+PJ_EXPORT_SYMBOL(pj_list_search)
+
+
+/*
+ * log.h
+ */
+PJ_EXPORT_SYMBOL(pj_log_write)
+#if PJ_LOG_MAX_LEVEL >= 1
+PJ_EXPORT_SYMBOL(pj_log_set_log_func)
+PJ_EXPORT_SYMBOL(pj_log_get_log_func)
+PJ_EXPORT_SYMBOL(pj_log_set_level)
+PJ_EXPORT_SYMBOL(pj_log_get_level)
+PJ_EXPORT_SYMBOL(pj_log_set_decor)
+PJ_EXPORT_SYMBOL(pj_log_get_decor)
+PJ_EXPORT_SYMBOL(pj_log_1)
+#endif
+#if PJ_LOG_MAX_LEVEL >= 2
+PJ_EXPORT_SYMBOL(pj_log_2)
+#endif
+#if PJ_LOG_MAX_LEVEL >= 3
+PJ_EXPORT_SYMBOL(pj_log_3)
+#endif
+#if PJ_LOG_MAX_LEVEL >= 4
+PJ_EXPORT_SYMBOL(pj_log_4)
+#endif
+#if PJ_LOG_MAX_LEVEL >= 5
+PJ_EXPORT_SYMBOL(pj_log_5)
+#endif
+#if PJ_LOG_MAX_LEVEL >= 6
+PJ_EXPORT_SYMBOL(pj_log_6)
+#endif
+
+/*
+ * os.h
+ */
+PJ_EXPORT_SYMBOL(pj_init)
+PJ_EXPORT_SYMBOL(pj_getpid)
+PJ_EXPORT_SYMBOL(pj_thread_register)
+PJ_EXPORT_SYMBOL(pj_thread_create)
+PJ_EXPORT_SYMBOL(pj_thread_get_name)
+PJ_EXPORT_SYMBOL(pj_thread_resume)
+PJ_EXPORT_SYMBOL(pj_thread_this)
+PJ_EXPORT_SYMBOL(pj_thread_join)
+PJ_EXPORT_SYMBOL(pj_thread_destroy)
+PJ_EXPORT_SYMBOL(pj_thread_sleep)
+#if defined(PJ_OS_HAS_CHECK_STACK) && PJ_OS_HAS_CHECK_STACK != 0
+PJ_EXPORT_SYMBOL(pj_thread_check_stack)
+PJ_EXPORT_SYMBOL(pj_thread_get_stack_max_usage)
+PJ_EXPORT_SYMBOL(pj_thread_get_stack_info)
+#endif
+PJ_EXPORT_SYMBOL(pj_atomic_create)
+PJ_EXPORT_SYMBOL(pj_atomic_destroy)
+PJ_EXPORT_SYMBOL(pj_atomic_set)
+PJ_EXPORT_SYMBOL(pj_atomic_get)
+PJ_EXPORT_SYMBOL(pj_atomic_inc)
+PJ_EXPORT_SYMBOL(pj_atomic_dec)
+PJ_EXPORT_SYMBOL(pj_thread_local_alloc)
+PJ_EXPORT_SYMBOL(pj_thread_local_free)
+PJ_EXPORT_SYMBOL(pj_thread_local_set)
+PJ_EXPORT_SYMBOL(pj_thread_local_get)
+PJ_EXPORT_SYMBOL(pj_enter_critical_section)
+PJ_EXPORT_SYMBOL(pj_leave_critical_section)
+PJ_EXPORT_SYMBOL(pj_mutex_create)
+PJ_EXPORT_SYMBOL(pj_mutex_lock)
+PJ_EXPORT_SYMBOL(pj_mutex_unlock)
+PJ_EXPORT_SYMBOL(pj_mutex_trylock)
+PJ_EXPORT_SYMBOL(pj_mutex_destroy)
+#if defined(PJ_DEBUG) && PJ_DEBUG != 0
+PJ_EXPORT_SYMBOL(pj_mutex_is_locked)
+#endif
+#if defined(PJ_HAS_SEMAPHORE) && PJ_HAS_SEMAPHORE != 0
+PJ_EXPORT_SYMBOL(pj_sem_create)
+PJ_EXPORT_SYMBOL(pj_sem_wait)
+PJ_EXPORT_SYMBOL(pj_sem_trywait)
+PJ_EXPORT_SYMBOL(pj_sem_post)
+PJ_EXPORT_SYMBOL(pj_sem_destroy)
+#endif
+PJ_EXPORT_SYMBOL(pj_gettimeofday)
+PJ_EXPORT_SYMBOL(pj_time_decode)
+#if defined(PJ_HAS_HIGH_RES_TIMER) && PJ_HAS_HIGH_RES_TIMER != 0
+PJ_EXPORT_SYMBOL(pj_get_timestamp)
+PJ_EXPORT_SYMBOL(pj_get_timestamp_freq)
+PJ_EXPORT_SYMBOL(pj_elapsed_time)
+PJ_EXPORT_SYMBOL(pj_elapsed_usec)
+PJ_EXPORT_SYMBOL(pj_elapsed_nanosec)
+PJ_EXPORT_SYMBOL(pj_elapsed_cycle)
+#endif
+
+	
+/*
+ * pool.h
+ */
+PJ_EXPORT_SYMBOL(pj_pool_create)
+PJ_EXPORT_SYMBOL(pj_pool_release)
+PJ_EXPORT_SYMBOL(pj_pool_getobjname)
+PJ_EXPORT_SYMBOL(pj_pool_reset)
+PJ_EXPORT_SYMBOL(pj_pool_get_capacity)
+PJ_EXPORT_SYMBOL(pj_pool_get_used_size)
+PJ_EXPORT_SYMBOL(pj_pool_alloc)
+PJ_EXPORT_SYMBOL(pj_pool_calloc)
+PJ_EXPORT_SYMBOL(pj_pool_factory_default_policy)
+PJ_EXPORT_SYMBOL(pj_pool_create_int)
+PJ_EXPORT_SYMBOL(pj_pool_init_int)
+PJ_EXPORT_SYMBOL(pj_pool_destroy_int)
+PJ_EXPORT_SYMBOL(pj_caching_pool_init)
+PJ_EXPORT_SYMBOL(pj_caching_pool_destroy)
+
+/*
+ * rand.h
+ */
+PJ_EXPORT_SYMBOL(pj_rand)
+PJ_EXPORT_SYMBOL(pj_srand)
+
+/*
+ * rbtree.h
+ */
+PJ_EXPORT_SYMBOL(pj_rbtree_init)
+PJ_EXPORT_SYMBOL(pj_rbtree_first)
+PJ_EXPORT_SYMBOL(pj_rbtree_last)
+PJ_EXPORT_SYMBOL(pj_rbtree_next)
+PJ_EXPORT_SYMBOL(pj_rbtree_prev)
+PJ_EXPORT_SYMBOL(pj_rbtree_insert)
+PJ_EXPORT_SYMBOL(pj_rbtree_find)
+PJ_EXPORT_SYMBOL(pj_rbtree_erase)
+PJ_EXPORT_SYMBOL(pj_rbtree_max_height)
+PJ_EXPORT_SYMBOL(pj_rbtree_min_height)
+
+/*
+ * sock.h
+ */
+PJ_EXPORT_SYMBOL(PJ_AF_UNIX)
+PJ_EXPORT_SYMBOL(PJ_AF_INET)
+PJ_EXPORT_SYMBOL(PJ_AF_INET6)
+PJ_EXPORT_SYMBOL(PJ_AF_PACKET)
+PJ_EXPORT_SYMBOL(PJ_AF_IRDA)
+PJ_EXPORT_SYMBOL(PJ_SOCK_STREAM)
+PJ_EXPORT_SYMBOL(PJ_SOCK_DGRAM)
+PJ_EXPORT_SYMBOL(PJ_SOCK_RAW)
+PJ_EXPORT_SYMBOL(PJ_SOCK_RDM)
+PJ_EXPORT_SYMBOL(PJ_SOL_SOCKET)
+PJ_EXPORT_SYMBOL(PJ_SOL_IP)
+PJ_EXPORT_SYMBOL(PJ_SOL_TCP)
+PJ_EXPORT_SYMBOL(PJ_SOL_UDP)
+PJ_EXPORT_SYMBOL(PJ_SOL_IPV6)
+PJ_EXPORT_SYMBOL(pj_ntohs)
+PJ_EXPORT_SYMBOL(pj_htons)
+PJ_EXPORT_SYMBOL(pj_ntohl)
+PJ_EXPORT_SYMBOL(pj_htonl)
+PJ_EXPORT_SYMBOL(pj_inet_ntoa)
+PJ_EXPORT_SYMBOL(pj_inet_aton)
+PJ_EXPORT_SYMBOL(pj_inet_addr)
+PJ_EXPORT_SYMBOL(pj_sockaddr_in_set_str_addr)
+PJ_EXPORT_SYMBOL(pj_sockaddr_in_init)
+PJ_EXPORT_SYMBOL(pj_gethostname)
+PJ_EXPORT_SYMBOL(pj_gethostaddr)
+PJ_EXPORT_SYMBOL(pj_sock_socket)
+PJ_EXPORT_SYMBOL(pj_sock_close)
+PJ_EXPORT_SYMBOL(pj_sock_bind)
+PJ_EXPORT_SYMBOL(pj_sock_bind_in)
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP != 0
+PJ_EXPORT_SYMBOL(pj_sock_listen)
+PJ_EXPORT_SYMBOL(pj_sock_accept)
+PJ_EXPORT_SYMBOL(pj_sock_shutdown)
+#endif
+PJ_EXPORT_SYMBOL(pj_sock_connect)
+PJ_EXPORT_SYMBOL(pj_sock_getpeername)
+PJ_EXPORT_SYMBOL(pj_sock_getsockname)
+PJ_EXPORT_SYMBOL(pj_sock_getsockopt)
+PJ_EXPORT_SYMBOL(pj_sock_setsockopt)
+PJ_EXPORT_SYMBOL(pj_sock_recv)
+PJ_EXPORT_SYMBOL(pj_sock_recvfrom)
+PJ_EXPORT_SYMBOL(pj_sock_send)
+PJ_EXPORT_SYMBOL(pj_sock_sendto)
+
+/*
+ * sock_select.h
+ */
+PJ_EXPORT_SYMBOL(PJ_FD_ZERO)
+PJ_EXPORT_SYMBOL(PJ_FD_SET)
+PJ_EXPORT_SYMBOL(PJ_FD_CLR)
+PJ_EXPORT_SYMBOL(PJ_FD_ISSET)
+PJ_EXPORT_SYMBOL(pj_sock_select)
+
+/*
+ * string.h
+ */
+PJ_EXPORT_SYMBOL(pj_str)
+PJ_EXPORT_SYMBOL(pj_strassign)
+PJ_EXPORT_SYMBOL(pj_strcpy)
+PJ_EXPORT_SYMBOL(pj_strcpy2)
+PJ_EXPORT_SYMBOL(pj_strdup)
+PJ_EXPORT_SYMBOL(pj_strdup_with_null)
+PJ_EXPORT_SYMBOL(pj_strdup2)
+PJ_EXPORT_SYMBOL(pj_strdup3)
+PJ_EXPORT_SYMBOL(pj_strcmp)
+PJ_EXPORT_SYMBOL(pj_strcmp2)
+PJ_EXPORT_SYMBOL(pj_strncmp)
+PJ_EXPORT_SYMBOL(pj_strncmp2)
+PJ_EXPORT_SYMBOL(pj_stricmp)
+PJ_EXPORT_SYMBOL(pj_stricmp2)
+PJ_EXPORT_SYMBOL(pj_strnicmp)
+PJ_EXPORT_SYMBOL(pj_strnicmp2)
+PJ_EXPORT_SYMBOL(pj_strcat)
+PJ_EXPORT_SYMBOL(pj_strltrim)
+PJ_EXPORT_SYMBOL(pj_strrtrim)
+PJ_EXPORT_SYMBOL(pj_strtrim)
+PJ_EXPORT_SYMBOL(pj_create_random_string)
+PJ_EXPORT_SYMBOL(pj_strtoul)
+PJ_EXPORT_SYMBOL(pj_utoa)
+PJ_EXPORT_SYMBOL(pj_utoa_pad)
+
+/*
+ * timer.h
+ */
+PJ_EXPORT_SYMBOL(pj_timer_heap_mem_size)
+PJ_EXPORT_SYMBOL(pj_timer_heap_create)
+PJ_EXPORT_SYMBOL(pj_timer_entry_init)
+PJ_EXPORT_SYMBOL(pj_timer_heap_schedule)
+PJ_EXPORT_SYMBOL(pj_timer_heap_cancel)
+PJ_EXPORT_SYMBOL(pj_timer_heap_count)
+PJ_EXPORT_SYMBOL(pj_timer_heap_earliest_time)
+PJ_EXPORT_SYMBOL(pj_timer_heap_poll)
+
+/*
+ * types.h
+ */
+PJ_EXPORT_SYMBOL(pj_time_val_normalize)
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/timer.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/timer.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/timer.c	(revision 1163)
@@ -0,0 +1,549 @@
+/* $Id$ */
+/* 
+ * The PJLIB's timer heap is based (or more correctly, copied and modied)
+ * from ACE library by Douglas C. Schmidt. ACE is an excellent OO framework
+ * that implements many core patterns for concurrent communication software.
+ * If you're looking for C++ alternative of PJLIB, then ACE is your best
+ * solution.
+ *
+ * You may use this file according to ACE open source terms or PJLIB open
+ * source terms. You can find the fine ACE library at:
+ *  http://www.cs.wustl.edu/~schmidt/ACE.html
+ *
+ * ACE is Copyright (C)1993-2006 Douglas C. Schmidt <d.schmidt@vanderbilt.edu>
+ *
+ * GNU Public License:
+ * 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/timer.h>
+#include <pj/pool.h>
+#include <pj/os.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+#include <pj/lock.h>
+
+#define HEAP_PARENT(X)	(X == 0 ? 0 : (((X) - 1) / 2))
+#define HEAP_LEFT(X)	(((X)+(X))+1)
+
+
+#define DEFAULT_MAX_TIMED_OUT_PER_POLL  (64)
+
+
+/**
+ * The implementation of timer heap.
+ */
+struct pj_timer_heap_t
+{
+    /** Pool from which the timer heap resize will get the storage from */
+    pj_pool_t *pool;
+
+    /** Maximum size of the heap. */
+    pj_size_t max_size;
+
+    /** Current size of the heap. */
+    pj_size_t cur_size;
+
+    /** Max timed out entries to process per poll. */
+    unsigned max_entries_per_poll;
+
+    /** Lock object. */
+    pj_lock_t *lock;
+
+    /** Autodelete lock. */
+    pj_bool_t auto_delete_lock;
+
+    /**
+     * Current contents of the Heap, which is organized as a "heap" of
+     * pj_timer_entry *'s.  In this context, a heap is a "partially
+     * ordered, almost complete" binary tree, which is stored in an
+     * array.
+     */
+    pj_timer_entry **heap;
+
+    /**
+     * An array of "pointers" that allows each pj_timer_entry in the
+     * <heap_> to be located in O(1) time.  Basically, <timer_id_[i]>
+     * contains the slot in the <heap_> array where an pj_timer_entry
+     * with timer id <i> resides.  Thus, the timer id passed back from
+     * <schedule_entry> is really an slot into the <timer_ids> array.  The
+     * <timer_ids_> array serves two purposes: negative values are
+     * treated as "pointers" for the <freelist_>, whereas positive
+     * values are treated as "pointers" into the <heap_> array.
+     */
+    pj_timer_id_t *timer_ids;
+
+    /**
+     * "Pointer" to the first element in the freelist contained within
+     * the <timer_ids_> array, which is organized as a stack.
+     */
+    pj_timer_id_t timer_ids_freelist;
+
+    /** Callback to be called when a timer expires. */
+    pj_timer_heap_callback *callback;
+
+};
+
+
+
+PJ_INLINE(void) lock_timer_heap( pj_timer_heap_t *ht )
+{
+    if (ht->lock) {
+	pj_lock_acquire(ht->lock);
+    }
+}
+
+PJ_INLINE(void) unlock_timer_heap( pj_timer_heap_t *ht )
+{
+    if (ht->lock) {
+	pj_lock_release(ht->lock);
+    }
+}
+
+
+static void copy_node( pj_timer_heap_t *ht, int slot, pj_timer_entry *moved_node )
+{
+    PJ_CHECK_STACK();
+
+    // Insert <moved_node> into its new location in the heap.
+    ht->heap[slot] = moved_node;
+    
+    // Update the corresponding slot in the parallel <timer_ids_> array.
+    ht->timer_ids[moved_node->_timer_id] = slot;
+}
+
+static pj_timer_id_t pop_freelist( pj_timer_heap_t *ht )
+{
+    // We need to truncate this to <int> for backwards compatibility.
+    pj_timer_id_t new_id = ht->timer_ids_freelist;
+    
+    PJ_CHECK_STACK();
+
+    // The freelist values in the <timer_ids_> are negative, so we need
+    // to negate them to get the next freelist "pointer."
+    ht->timer_ids_freelist =
+	-ht->timer_ids[ht->timer_ids_freelist];
+    
+    return new_id;
+    
+}
+
+static void push_freelist (pj_timer_heap_t *ht, pj_timer_id_t old_id)
+{
+    PJ_CHECK_STACK();
+
+    // The freelist values in the <timer_ids_> are negative, so we need
+    // to negate them to get the next freelist "pointer."
+    ht->timer_ids[old_id] = -ht->timer_ids_freelist;
+    ht->timer_ids_freelist = old_id;
+}
+
+
+static void reheap_down(pj_timer_heap_t *ht, pj_timer_entry *moved_node,
+                        size_t slot, size_t child)
+{
+    PJ_CHECK_STACK();
+
+    // Restore the heap property after a deletion.
+    
+    while (child < ht->cur_size)
+    {
+	// Choose the smaller of the two children.
+	if (child + 1 < ht->cur_size
+	    && PJ_TIME_VAL_LT(ht->heap[child + 1]->_timer_value, ht->heap[child]->_timer_value))
+	    child++;
+	
+	// Perform a <copy> if the child has a larger timeout value than
+	// the <moved_node>.
+	if (PJ_TIME_VAL_LT(ht->heap[child]->_timer_value, moved_node->_timer_value))
+        {
+	    copy_node( ht, slot, ht->heap[child]);
+	    slot = child;
+	    child = HEAP_LEFT(child);
+        }
+	else
+	    // We've found our location in the heap.
+	    break;
+    }
+    
+    copy_node( ht, slot, moved_node);
+}
+
+static void reheap_up( pj_timer_heap_t *ht, pj_timer_entry *moved_node,
+		       size_t slot, size_t parent)
+{
+    // Restore the heap property after an insertion.
+    
+    while (slot > 0)
+    {
+	// If the parent node is greater than the <moved_node> we need
+	// to copy it down.
+	if (PJ_TIME_VAL_LT(moved_node->_timer_value, ht->heap[parent]->_timer_value))
+        {
+	    copy_node(ht, slot, ht->heap[parent]);
+	    slot = parent;
+	    parent = HEAP_PARENT(slot);
+        }
+	else
+	    break;
+    }
+    
+    // Insert the new node into its proper resting place in the heap and
+    // update the corresponding slot in the parallel <timer_ids> array.
+    copy_node(ht, slot, moved_node);
+}
+
+
+static pj_timer_entry * remove_node( pj_timer_heap_t *ht, size_t slot)
+{
+    pj_timer_entry *removed_node = ht->heap[slot];
+    
+    // Return this timer id to the freelist.
+    push_freelist( ht, removed_node->_timer_id );
+    
+    // Decrement the size of the heap by one since we're removing the
+    // "slot"th node.
+    ht->cur_size--;
+    
+    // Set the ID
+    removed_node->_timer_id = -1;
+
+    // Only try to reheapify if we're not deleting the last entry.
+    
+    if (slot < ht->cur_size)
+    {
+	int parent;
+	pj_timer_entry *moved_node = ht->heap[ht->cur_size];
+	
+	// Move the end node to the location being removed and update
+	// the corresponding slot in the parallel <timer_ids> array.
+	copy_node( ht, slot, moved_node);
+	
+	// If the <moved_node->time_value_> is great than or equal its
+	// parent it needs be moved down the heap.
+	parent = HEAP_PARENT (slot);
+	
+	if (PJ_TIME_VAL_GTE(moved_node->_timer_value, ht->heap[parent]->_timer_value))
+	    reheap_down( ht, moved_node, slot, HEAP_LEFT(slot));
+	else
+	    reheap_up( ht, moved_node, slot, parent);
+    }
+    
+    return removed_node;
+}
+
+static void grow_heap(pj_timer_heap_t *ht)
+{
+    // All the containers will double in size from max_size_
+    size_t new_size = ht->max_size * 2;
+    pj_timer_id_t *new_timer_ids;
+    pj_size_t i;
+    
+    // First grow the heap itself.
+    
+    pj_timer_entry **new_heap = 0;
+    
+    new_heap = pj_pool_alloc(ht->pool, sizeof(pj_timer_entry*) * new_size);
+    memcpy(new_heap, ht->heap, ht->max_size * sizeof(pj_timer_entry*));
+    //delete [] this->heap_;
+    ht->heap = new_heap;
+    
+    // Grow the array of timer ids.
+    
+    new_timer_ids = 0;
+    new_timer_ids = pj_pool_alloc(ht->pool, new_size * sizeof(pj_timer_id_t));
+    
+    memcpy( new_timer_ids, ht->timer_ids, ht->max_size * sizeof(pj_timer_id_t));
+    
+    //delete [] timer_ids_;
+    ht->timer_ids = new_timer_ids;
+    
+    // And add the new elements to the end of the "freelist".
+    for (i = ht->max_size; i < new_size; i++)
+	ht->timer_ids[i] = -((pj_timer_id_t) (i + 1));
+    
+    ht->max_size = new_size;
+}
+
+static void insert_node(pj_timer_heap_t *ht, pj_timer_entry *new_node)
+{
+    if (ht->cur_size + 2 >= ht->max_size)
+	grow_heap(ht);
+    
+    reheap_up( ht, new_node, ht->cur_size, HEAP_PARENT(ht->cur_size));
+    ht->cur_size++;
+}
+
+
+static pj_status_t schedule_entry( pj_timer_heap_t *ht,
+				   pj_timer_entry *entry, 
+				   const pj_time_val *future_time )
+{
+    if (ht->cur_size < ht->max_size)
+    {
+	// Obtain the next unique sequence number.
+	// Set the entry
+	entry->_timer_id = pop_freelist(ht);
+	entry->_timer_value = *future_time;
+	insert_node( ht, entry);
+	return 0;
+    }
+    else
+	return -1;
+}
+
+
+static int cancel( pj_timer_heap_t *ht, 
+		   pj_timer_entry *entry, 
+		   int dont_call)
+{
+  long timer_node_slot;
+
+  PJ_CHECK_STACK();
+
+  // Check to see if the timer_id is out of range
+  if (entry->_timer_id < 0 || (pj_size_t)entry->_timer_id > ht->max_size)
+    return 0;
+
+  timer_node_slot = ht->timer_ids[entry->_timer_id];
+
+  if (timer_node_slot < 0) // Check to see if timer_id is still valid.
+    return 0;
+
+  if (entry != ht->heap[timer_node_slot])
+    {
+      pj_assert(entry == ht->heap[timer_node_slot]);
+      return 0;
+    }
+  else
+    {
+      remove_node( ht, timer_node_slot);
+
+      if (dont_call == 0)
+        // Call the close hook.
+	(*ht->callback)(ht, entry);
+      return 1;
+    }
+}
+
+
+/*
+ * Calculate memory size required to create a timer heap.
+ */
+PJ_DEF(pj_size_t) pj_timer_heap_mem_size(pj_size_t count)
+{
+    return /* size of the timer heap itself: */
+           sizeof(pj_timer_heap_t) + 
+           /* size of each entry: */
+           (count+2) * (sizeof(pj_timer_entry*)+sizeof(pj_timer_id_t)) +
+           /* lock, pool etc: */
+           132;
+}
+
+/*
+ * Create a new timer heap.
+ */
+PJ_DEF(pj_status_t) pj_timer_heap_create( pj_pool_t *pool,
+					  pj_size_t size,
+                                          pj_timer_heap_t **p_heap)
+{
+    pj_timer_heap_t *ht;
+    pj_size_t i;
+
+    PJ_ASSERT_RETURN(pool && p_heap, PJ_EINVAL);
+
+    *p_heap = NULL;
+
+    /* Magic? */
+    size += 2;
+
+    /* Allocate timer heap data structure from the pool */
+    ht = pj_pool_alloc(pool, sizeof(pj_timer_heap_t));
+    if (!ht)
+        return PJ_ENOMEM;
+
+    /* Initialize timer heap sizes */
+    ht->max_size = size;
+    ht->cur_size = 0;
+    ht->max_entries_per_poll = DEFAULT_MAX_TIMED_OUT_PER_POLL;
+    ht->timer_ids_freelist = 1;
+    ht->pool = pool;
+
+    /* Lock. */
+    ht->lock = NULL;
+    ht->auto_delete_lock = 0;
+
+    // Create the heap array.
+    ht->heap = pj_pool_alloc(pool, sizeof(pj_timer_entry*) * size);
+    if (!ht->heap)
+        return PJ_ENOMEM;
+
+    // Create the parallel
+    ht->timer_ids = pj_pool_alloc( pool, sizeof(pj_timer_id_t) * size);
+    if (!ht->timer_ids)
+        return PJ_ENOMEM;
+
+    // Initialize the "freelist," which uses negative values to
+    // distinguish freelist elements from "pointers" into the <heap_>
+    // array.
+    for (i=0; i<size; ++i)
+	ht->timer_ids[i] = -((pj_timer_id_t) (i + 1));
+
+    *p_heap = ht;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(void) pj_timer_heap_destroy( pj_timer_heap_t *ht )
+{
+    if (ht->lock && ht->auto_delete_lock) {
+        pj_lock_destroy(ht->lock);
+        ht->lock = NULL;
+    }
+}
+
+PJ_DEF(void) pj_timer_heap_set_lock(  pj_timer_heap_t *ht,
+                                      pj_lock_t *lock,
+                                      pj_bool_t auto_del )
+{
+    if (ht->lock && ht->auto_delete_lock)
+        pj_lock_destroy(ht->lock);
+
+    ht->lock = lock;
+    ht->auto_delete_lock = auto_del;
+}
+
+
+PJ_DEF(unsigned) pj_timer_heap_set_max_timed_out_per_poll(pj_timer_heap_t *ht,
+                                                          unsigned count )
+{
+    unsigned old_count = ht->max_entries_per_poll;
+    ht->max_entries_per_poll = count;
+    return old_count;
+}
+
+PJ_DEF(pj_timer_entry*) pj_timer_entry_init( pj_timer_entry *entry,
+                                             int id,
+                                             void *user_data,
+                                             pj_timer_heap_callback *cb )
+{
+    pj_assert(entry && cb);
+
+    entry->id = id;
+    entry->user_data = user_data;
+    entry->cb = cb;
+
+    return entry;
+}
+
+PJ_DEF(pj_status_t) pj_timer_heap_schedule( pj_timer_heap_t *ht,
+					    pj_timer_entry *entry, 
+					    const pj_time_val *delay)
+{
+    pj_status_t status;
+    pj_time_val expires;
+
+    PJ_ASSERT_RETURN(ht && entry && delay, PJ_EINVAL);
+    PJ_ASSERT_RETURN(entry->cb != NULL, PJ_EINVAL);
+
+    /* Prevent same entry from being scheduled more than once */
+    PJ_ASSERT_RETURN(entry->_timer_id < 1, PJ_EINVALIDOP);
+
+    pj_gettimeofday(&expires);
+    PJ_TIME_VAL_ADD(expires, *delay);
+    
+    lock_timer_heap(ht);
+    status = schedule_entry(ht, entry, &expires);
+    unlock_timer_heap(ht);
+
+    return status;
+}
+
+PJ_DEF(int) pj_timer_heap_cancel( pj_timer_heap_t *ht,
+				  pj_timer_entry *entry)
+{
+    int count;
+
+    PJ_ASSERT_RETURN(ht && entry, PJ_EINVAL);
+
+    lock_timer_heap(ht);
+    count = cancel(ht, entry, 1);
+    unlock_timer_heap(ht);
+
+    return count;
+}
+
+PJ_DEF(unsigned) pj_timer_heap_poll( pj_timer_heap_t *ht, 
+                                     pj_time_val *next_delay )
+{
+    pj_time_val now;
+    unsigned count;
+
+    PJ_ASSERT_RETURN(ht, 0);
+
+    if (!ht->cur_size && next_delay) {
+	next_delay->sec = next_delay->msec = PJ_MAXINT32;
+	return 0;
+    }
+
+    count = 0;
+    pj_gettimeofday(&now);
+
+    lock_timer_heap(ht);
+    while ( ht->cur_size && 
+	    PJ_TIME_VAL_LTE(ht->heap[0]->_timer_value, now) &&
+            count < ht->max_entries_per_poll ) 
+    {
+	pj_timer_entry *node = remove_node(ht, 0);
+	++count;
+
+	unlock_timer_heap(ht);
+	if (node->cb)
+	    (*node->cb)(ht, node);
+	lock_timer_heap(ht);
+    }
+    if (ht->cur_size && next_delay) {
+	*next_delay = ht->heap[0]->_timer_value;
+	PJ_TIME_VAL_SUB(*next_delay, now);
+	if (next_delay->sec < 0 || next_delay->msec < 0)
+	    next_delay->sec = next_delay->msec = 0;
+    } else if (next_delay) {
+	next_delay->sec = next_delay->msec = PJ_MAXINT32;
+    }
+    unlock_timer_heap(ht);
+
+    return count;
+}
+
+PJ_DEF(pj_size_t) pj_timer_heap_count( pj_timer_heap_t *ht )
+{
+    PJ_ASSERT_RETURN(ht, 0);
+
+    return ht->cur_size;
+}
+
+PJ_DEF(pj_status_t) pj_timer_heap_earliest_time( pj_timer_heap_t * ht,
+					         pj_time_val *timeval)
+{
+    pj_assert(ht->cur_size != 0);
+    if (ht->cur_size == 0)
+        return PJ_ENOTFOUND;
+
+    lock_timer_heap(ht);
+    *timeval = ht->heap[0]->_timer_value;
+    unlock_timer_heap(ht);
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/types.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/types.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/types.c	(revision 1163)
@@ -0,0 +1,45 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/types.h>
+#include <pj/os.h>
+
+void pj_time_val_normalize(pj_time_val *t)
+{
+    PJ_CHECK_STACK();
+
+    if (t->msec >= 1000) {
+	t->sec += (t->msec / 1000);
+	t->msec = (t->msec % 1000);
+    }
+    else if (t->msec <= -1000) {
+	do {
+	    t->sec--;
+	    t->msec += 1000;
+        } while (t->msec <= -1000);
+    }
+
+    if (t->sec >= 1 && t->msec < 0) {
+	t->sec--;
+	t->msec += 1000;
+
+    } else if (t->sec < 0 && t->msec > 0) {
+	t->sec++;
+	t->msec -= 1000;
+    }
+}
Index: /pjproject/branches/split-3rd-party/pjlib/src/pj/unicode_win32.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pj/unicode_win32.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pj/unicode_win32.c	(revision 1163)
@@ -0,0 +1,46 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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, pj_size_t len,
+				    wchar_t *buf, pj_size_t buf_count)
+{
+    PJ_ASSERT_RETURN(s && buf, NULL);
+
+    len = MultiByteToWideChar(CP_ACP, 0, s, len, 
+			      buf, buf_count);
+    buf[len] = 0;
+    return buf;
+}
+
+
+PJ_DEF(char*) pj_unicode_to_ansi( const wchar_t *wstr, pj_size_t len,
+				  char *buf, pj_size_t buf_size)
+{
+    PJ_ASSERT_RETURN(wstr && buf, NULL);
+
+    len = WideCharToMultiByte(CP_ACP, 0, wstr, len, buf, buf_size, NULL, NULL);
+    buf[len] = '\0';
+    return buf;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib++-test/main.cpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib++-test/main.cpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib++-test/main.cpp	(revision 1163)
@@ -0,0 +1,61 @@
+/* $Id */
+/* 
+ * Copyright (C)2003-2006 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++/file.hpp>
+#include <pj++/list.hpp>
+#include <pj++/lock.hpp>
+#include <pj++/hash.hpp>
+#include <pj++/os.hpp>
+#include <pj++/proactor.hpp>
+#include <pj++/sock.hpp>
+#include <pj++/string.hpp>
+#include <pj++/timer.hpp>
+#include <pj++/tree.hpp>
+
+class My_Async_Op : public Pj_Async_Op
+{
+};
+
+class My_Event_Handler : public Pj_Event_Handler
+{
+};
+
+int main()
+{
+    Pjlib lib;
+    Pj_Caching_Pool mem;
+    Pj_Pool the_pool;
+    Pj_Pool *pool = &the_pool;
+    
+    the_pool.attach(mem.create_pool(4000,4000));
+
+    Pj_Semaphore_Lock lsem(pool);
+    Pj_Semaphore_Lock *plsem;
+
+    plsem = new(pool) Pj_Semaphore_Lock(pool);
+    delete plsem;
+
+    Pj_Proactor proactor(pool, 100, 100);
+
+    My_Event_Handler *event_handler = new(the_pool) My_Event_Handler;
+    proactor.register_socket_handler(pool, event_handler);
+    proactor.unregister_handler(event_handler);
+
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-samples/except.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-samples/except.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-samples/except.c	(revision 1163)
@@ -0,0 +1,81 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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();
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-samples/list.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-samples/list.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-samples/list.c	(revision 1163)
@@ -0,0 +1,71 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/list.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+
+/**
+ * \page page_pjlib_samples_list_c Example: List Manipulation
+ *
+ * Below is sample program to demonstrate how to manipulate linked list.
+ *
+ * \includelineno pjlib-samples/list.c
+ */
+
+struct my_node
+{
+    // This must be the first member declared in the struct!
+    PJ_DECL_LIST_MEMBER(struct my_node);
+    int value;
+};
+
+
+int main()
+{
+    struct my_node nodes[10];
+    struct my_node list;
+    struct my_node *it;
+    int i;
+    
+    // Initialize the list as empty.
+    pj_list_init(&list);
+    
+    // Insert nodes.
+    for (i=0; i<10; ++i) {
+        nodes[i].value = i;
+        pj_list_insert_before(&list, &nodes[i]);
+    }
+    
+    // Iterate list nodes.
+    it = list.next;
+    while (it != &list) {
+        PJ_LOG(3,("list", "value = %d", it->value));
+        it = it->next;
+    }
+    
+    // Erase all nodes.
+    for (i=0; i<10; ++i) {
+        pj_list_erase(&nodes[i]);
+    }
+    
+    // List must be empty by now.
+    pj_assert( pj_list_empty(&list) );
+    
+    return 0;
+};
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-samples/log.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-samples/log.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-samples/log.c	(revision 1163)
@@ -0,0 +1,42 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/log.h>
+
+/**
+ * \page page_pjlib_samples_log_c Example: Log, Hello World
+ *
+ * Very simple program to write log.
+ *
+ * \includelineno pjlib-samples/log.c
+ */
+
+int main()
+{
+    pj_status_t rc;
+
+    // Error handling omited for clarity
+    
+    // Must initialize PJLIB first!
+    rc = pj_init();
+
+    PJ_LOG(3, ("main.c", "Hello world!"));
+
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/atomic.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/atomic.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/atomic.c	(revision 1163)
@@ -0,0 +1,108 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+#include <pjlib.h>
+
+/**
+ * \page page_pjlib_atomic_test Test: Atomic Variable
+ *
+ * This file provides implementation of \b atomic_test(). It tests the
+ * functionality of the atomic variable API.
+ *
+ * \section atomic_test_sec Scope of the Test
+ *
+ * API tested:
+ *  - pj_atomic_create()
+ *  - pj_atomic_get()
+ *  - pj_atomic_inc()
+ *  - pj_atomic_dec()
+ *  - pj_atomic_set()
+ *  - pj_atomic_destroy()
+ *
+ *
+ * This file is <b>pjlib-test/atomic.c</b>
+ *
+ * \include pjlib-test/atomic.c
+ */
+
+
+#if INCLUDE_ATOMIC_TEST
+
+int atomic_test(void)
+{
+    pj_pool_t *pool;
+    pj_atomic_t *atomic_var;
+    pj_status_t rc;
+
+    pool = pj_pool_create(mem, NULL, 4096, 0, NULL);
+    if (!pool)
+        return -10;
+
+    /* create() */
+    rc = pj_atomic_create(pool, 111, &atomic_var);
+    if (rc != 0) {
+        return -20;
+    }
+
+    /* get: check the value. */
+    if (pj_atomic_get(atomic_var) != 111)
+        return -30;
+
+    /* increment. */
+    pj_atomic_inc(atomic_var);
+    if (pj_atomic_get(atomic_var) != 112)
+        return -40;
+
+    /* decrement. */
+    pj_atomic_dec(atomic_var);
+    if (pj_atomic_get(atomic_var) != 111)
+        return -50;
+
+    /* set */
+    pj_atomic_set(atomic_var, 211);
+    if (pj_atomic_get(atomic_var) != 211)
+        return -60;
+
+    /* add */
+    pj_atomic_add(atomic_var, 10);
+    if (pj_atomic_get(atomic_var) != 221)
+        return -60;
+
+    /* check the value again. */
+    if (pj_atomic_get(atomic_var) != 221)
+        return -70;
+
+    /* destroy */
+    rc = pj_atomic_destroy(atomic_var);
+    if (rc != 0)
+        return -80;
+
+    pj_pool_release(pool);
+
+    return 0;
+}
+
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_atomic_test;
+#endif  /* INCLUDE_ATOMIC_TEST */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/echo_clt.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/echo_clt.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/echo_clt.c	(revision 1163)
@@ -0,0 +1,268 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+#include <pjlib.h>
+
+#if INCLUDE_ECHO_CLIENT
+
+enum { BUF_SIZE = 512 };
+
+struct client
+{
+    int sock_type;
+    const char *server;
+    int port;
+};
+
+static pj_atomic_t *totalBytes;
+static pj_atomic_t *timeout_counter;
+static pj_atomic_t *invalid_counter;
+
+#define MSEC_PRINT_DURATION 1000
+
+static int wait_socket(pj_sock_t sock, unsigned msec_timeout)
+{
+    pj_fd_set_t fdset;
+    pj_time_val timeout;
+
+    timeout.sec = 0;
+    timeout.msec = msec_timeout;
+    pj_time_val_normalize(&timeout);
+
+    PJ_FD_ZERO(&fdset);
+    PJ_FD_SET(sock, &fdset);
+    
+    return pj_sock_select(FD_SETSIZE, &fdset, NULL, NULL, &timeout);
+}
+
+static int echo_client_thread(void *arg)
+{
+    pj_sock_t sock;
+    char send_buf[BUF_SIZE];
+    char recv_buf[BUF_SIZE];
+    pj_sockaddr_in addr;
+    pj_str_t s;
+    pj_status_t rc;
+    pj_uint32_t buffer_id;
+    pj_uint32_t buffer_counter;
+    struct client *client = arg;
+    pj_status_t last_recv_err = PJ_SUCCESS, last_send_err = PJ_SUCCESS;
+    unsigned counter = 0;
+
+    rc = app_socket(PJ_AF_INET, client->sock_type, 0, -1, &sock);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...unable to create socket", rc);
+        return -10;
+    }
+
+    rc = pj_sockaddr_in_init( &addr, pj_cstr(&s, client->server), 
+                              (pj_uint16_t)client->port);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...unable to resolve server", rc);
+        return -15;
+    }
+
+    rc = pj_sock_connect(sock, &addr, sizeof(addr));
+    if (rc != PJ_SUCCESS) {
+        app_perror("...connect() error", rc);
+        pj_sock_close(sock);
+        return -20;
+    }
+
+    PJ_LOG(3,("", "...socket connected to %s:%d", 
+		  pj_inet_ntoa(addr.sin_addr),
+		  pj_ntohs(addr.sin_port)));
+
+    pj_memset(send_buf, 'A', BUF_SIZE);
+    send_buf[BUF_SIZE-1]='\0';
+
+    /* Give other thread chance to initialize themselves! */
+    pj_thread_sleep(200);
+
+    //PJ_LOG(3,("", "...thread %p running", pj_thread_this()));
+
+    buffer_id = (pj_uint32_t) pj_thread_this();
+    buffer_counter = 0;
+
+    *(pj_uint32_t*)send_buf = buffer_id;
+
+    for (;;) {
+        int rc;
+        pj_ssize_t bytes;
+
+	++counter;
+
+	//while (wait_socket(sock,0) > 0)
+	//    ;
+
+        /* Send a packet. */
+        bytes = BUF_SIZE;
+	*(pj_uint32_t*)(send_buf+4) = ++buffer_counter;
+        rc = pj_sock_send(sock, send_buf, &bytes, 0);
+        if (rc != PJ_SUCCESS || bytes != BUF_SIZE) {
+            if (rc != last_send_err) {
+                app_perror("...send() error", rc);
+                PJ_LOG(3,("", "...ignoring subsequent error.."));
+                last_send_err = rc;
+                pj_thread_sleep(100);
+            }
+            continue;
+        }
+
+        rc = wait_socket(sock, 500);
+        if (rc == 0) {
+            PJ_LOG(3,("", "...timeout"));
+	    bytes = 0;
+	    pj_atomic_inc(timeout_counter);
+	} else if (rc < 0) {
+	    rc = pj_get_netos_error();
+	    app_perror("...select() error", rc);
+	    break;
+        } else {
+            /* Receive back the original packet. */
+            bytes = 0;
+            do {
+                pj_ssize_t received = BUF_SIZE - bytes;
+                rc = pj_sock_recv(sock, recv_buf+bytes, &received, 0);
+                if (rc != PJ_SUCCESS || received == 0) {
+                    if (rc != last_recv_err) {
+                        app_perror("...recv() error", rc);
+                        PJ_LOG(3,("", "...ignoring subsequent error.."));
+                        last_recv_err = rc;
+                        pj_thread_sleep(100);
+                    }
+                    bytes = 0;
+		    received = 0;
+                    break;
+                }
+                bytes += received;
+            } while (bytes != BUF_SIZE && bytes != 0);
+        }
+
+        if (bytes == 0)
+            continue;
+
+        if (pj_memcmp(send_buf, recv_buf, BUF_SIZE) != 0) {
+	    recv_buf[BUF_SIZE-1] = '\0';
+            PJ_LOG(3,("", "...error: buffer %u has changed!\n"
+			  "send_buf=%s\n"
+			  "recv_buf=%s\n", 
+			  counter, send_buf, recv_buf));
+	    pj_atomic_inc(invalid_counter);
+        }
+
+        /* Accumulate total received. */
+	pj_atomic_add(totalBytes, bytes);
+    }
+
+    pj_sock_close(sock);
+    return 0;
+}
+
+int echo_client(int sock_type, const char *server, int port)
+{
+    pj_pool_t *pool;
+    pj_thread_t *thread[ECHO_CLIENT_MAX_THREADS];
+    pj_status_t rc;
+    struct client client;
+    int i;
+    pj_atomic_value_t last_received;
+    pj_timestamp last_report;
+
+    client.sock_type = sock_type;
+    client.server = server;
+    client.port = port;
+
+    pool = pj_pool_create( mem, NULL, 4000, 4000, NULL );
+
+    rc = pj_atomic_create(pool, 0, &totalBytes);
+    if (rc != PJ_SUCCESS) {
+        PJ_LOG(3,("", "...error: unable to create atomic variable", rc));
+        return -30;
+    }
+    rc = pj_atomic_create(pool, 0, &invalid_counter);
+    rc = pj_atomic_create(pool, 0, &timeout_counter);
+
+    PJ_LOG(3,("", "Echo client started"));
+    PJ_LOG(3,("", "  Destination: %s:%d", 
+                  ECHO_SERVER_ADDRESS, ECHO_SERVER_START_PORT));
+    PJ_LOG(3,("", "  Press Ctrl-C to exit"));
+
+    for (i=0; i<ECHO_CLIENT_MAX_THREADS; ++i) {
+        rc = pj_thread_create( pool, NULL, &echo_client_thread, &client, 
+                               PJ_THREAD_DEFAULT_STACK_SIZE, 0,
+                               &thread[i]);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...error: unable to create thread", rc);
+            return -10;
+        }
+    }
+
+    last_received = 0;
+    pj_get_timestamp(&last_report);
+
+    for (;;) {
+	pj_timestamp now;
+	unsigned long received, cur_received;
+	unsigned msec;
+	pj_highprec_t bw;
+	pj_time_val elapsed;
+	unsigned bw32;
+	pj_uint32_t timeout, invalid;
+
+	pj_thread_sleep(1000);
+
+	pj_get_timestamp(&now);
+	elapsed = pj_elapsed_time(&last_report, &now);
+	msec = PJ_TIME_VAL_MSEC(elapsed);
+
+	received = pj_atomic_get(totalBytes);
+	cur_received = received - last_received;
+	
+	bw = cur_received;
+	pj_highprec_mul(bw, 1000);
+	pj_highprec_div(bw, msec);
+
+	bw32 = (unsigned)bw;
+	
+	last_report = now;
+	last_received = received;
+
+	timeout = pj_atomic_get(timeout_counter);
+	invalid = pj_atomic_get(invalid_counter);
+
+        PJ_LOG(3,("", 
+	          "...%d threads, total bandwidth: %d KB/s, "
+		  "timeout=%d, invalid=%d", 
+                  ECHO_CLIENT_MAX_THREADS, bw32/1000,
+		  timeout, invalid));
+    }
+
+    for (i=0; i<ECHO_CLIENT_MAX_THREADS; ++i) {
+        pj_thread_join( thread[i] );
+    }
+
+    pj_pool_release(pool);
+    return 0;
+}
+
+
+#else
+int dummy_echo_client;
+#endif  /* INCLUDE_ECHO_CLIENT */
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/errno.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/errno.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/errno.c	(revision 1163)
@@ -0,0 +1,164 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+#include <pj/errno.h>
+#include <pj/log.h>
+#include <pj/ctype.h>
+#include <pj/compat/socket.h>
+#include <pj/string.h>
+
+#if INCLUDE_ERRNO_TEST
+
+#define THIS_FILE   "errno"
+
+#if defined(PJ_WIN32) && PJ_WIN32 != 0
+#   include <windows.h>
+#endif
+
+#if defined(PJ_HAS_ERRNO_H) && PJ_HAS_ERRNO_H != 0
+#   include <errno.h>
+#endif
+
+static void trim_newlines(char *s)
+{
+    while (*s) {
+        if (*s == '\r' || *s == '\n')
+            *s = ' ';
+        ++s;
+    }
+}
+
+int my_strncasecmp(const char *s1, const char *s2, int max_len)
+{
+    while (*s1 && *s2 && max_len > 0) {
+        if (pj_tolower(*s1) != pj_tolower(*s2))
+            return -1;
+        ++s1;
+        ++s2;
+        --max_len;
+    }
+    return 0;
+}
+
+const char *my_stristr(const char *whole, const char *part)
+{
+    int part_len = strlen(part);
+    while (*whole) {
+        if (my_strncasecmp(whole, part, part_len) == 0)
+            return whole;
+        ++whole;
+    }
+    return NULL;
+}
+
+int errno_test(void)
+{
+    enum { CUT = 6 };
+    pj_status_t rc;
+    char errbuf[256];
+
+    PJ_LOG(3,(THIS_FILE, "...errno test: check the msg carefully"));
+
+    /* 
+     * Windows platform error. 
+     */
+#   ifdef ERROR_INVALID_DATA
+    rc = PJ_STATUS_FROM_OS(ERROR_INVALID_DATA);
+    pj_set_os_error(rc);
+
+    /* Whole */
+    pj_strerror(rc, errbuf, sizeof(errbuf));
+    trim_newlines(errbuf);
+    PJ_LOG(3,(THIS_FILE, "...msg for rc=ERROR_INVALID_DATA: '%s'", errbuf));
+    if (my_stristr(errbuf, "invalid") == NULL) {
+        PJ_LOG(3, (THIS_FILE, 
+                   "...error: expecting \"invalid\" string in the msg"));
+#ifndef PJ_WIN32_WINCE
+        return -20;
+#endif
+    }
+
+    /* Cut version. */
+    pj_strerror(rc, errbuf, CUT);
+    PJ_LOG(3,(THIS_FILE, "...msg for rc=ERROR_INVALID_DATA (cut): '%s'", errbuf));
+#   endif
+
+    /*
+     * Unix errors
+     */
+#   ifdef EINVAL
+    rc = PJ_STATUS_FROM_OS(EINVAL);
+    pj_set_os_error(rc);
+
+    /* Whole */
+    pj_strerror(rc, errbuf, sizeof(errbuf));
+    trim_newlines(errbuf);
+    PJ_LOG(3,(THIS_FILE, "...msg for rc=EINVAL: '%s'", errbuf));
+    if (my_stristr(errbuf, "invalid") == NULL) {
+        PJ_LOG(3, (THIS_FILE, 
+                   "...error: expecting \"invalid\" string in the msg"));
+        return -30;
+    }
+
+    /* Cut */
+    pj_strerror(rc, errbuf, CUT);
+    PJ_LOG(3,(THIS_FILE, "...msg for rc=EINVAL (cut): '%s'", errbuf));
+#   endif
+
+    /* 
+     * Windows WSA errors
+     */
+#   ifdef WSAEINVAL
+    rc = PJ_STATUS_FROM_OS(WSAEINVAL);
+    pj_set_os_error(rc);
+
+    /* Whole */
+    pj_strerror(rc, errbuf, sizeof(errbuf));
+    trim_newlines(errbuf);
+    PJ_LOG(3,(THIS_FILE, "...msg for rc=WSAEINVAL: '%s'", errbuf));
+    if (my_stristr(errbuf, "invalid") == NULL) {
+        PJ_LOG(3, (THIS_FILE, 
+                   "...error: expecting \"invalid\" string in the msg"));
+        return -40;
+    }
+
+    /* Cut */
+    pj_strerror(rc, errbuf, CUT);
+    PJ_LOG(3,(THIS_FILE, "...msg for rc=WSAEINVAL (cut): '%s'", errbuf));
+#   endif
+
+    pj_strerror(PJ_EBUG, errbuf, sizeof(errbuf));
+    PJ_LOG(3,(THIS_FILE, "...msg for rc=PJ_EBUG: '%s'", errbuf));
+    if (my_stristr(errbuf, "BUG") == NULL) {
+        PJ_LOG(3, (THIS_FILE, 
+                   "...error: expecting \"BUG\" string in the msg"));
+        return -20;
+    }
+
+    pj_strerror(PJ_EBUG, errbuf, CUT);
+    PJ_LOG(3,(THIS_FILE, "...msg for rc=PJ_EBUG, cut at %d chars: '%s'", 
+              CUT, errbuf));
+
+    return 0;
+}
+
+
+#endif	/* INCLUDE_ERRNO_TEST */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/exception.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/exception.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/exception.c	(revision 1163)
@@ -0,0 +1,179 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+
+
+/**
+ * \page page_pjlib_exception_test Test: Exception Handling
+ *
+ * This file provides implementation of \b exception_test(). It tests the
+ * functionality of the exception handling API.
+ *
+ * @note This test use static ID not acquired through proper registration.
+ * This is not recommended, since it may create ID collissions.
+ *
+ * \section exception_test_sec Scope of the Test
+ *
+ * Some scenarios tested:
+ *  - no exception situation
+ *  - basic TRY/CATCH
+ *  - multiple exception handlers
+ *  - default handlers
+ *
+ *
+ * This file is <b>pjlib-test/exception.c</b>
+ *
+ * \include pjlib-test/exception.c
+ */
+
+
+#if INCLUDE_EXCEPTION_TEST
+
+#include <pjlib.h>
+
+#define	ID_1	1
+#define ID_2	2
+
+static int throw_id_1(void)
+{
+    PJ_THROW( ID_1 );
+    return -1;
+}
+
+static int throw_id_2(void)
+{
+    PJ_THROW( ID_2 );
+    return -1;
+}
+
+
+static int test(void)
+{
+    int rc = 0;
+    PJ_USE_EXCEPTION;
+
+    /*
+     * No exception situation.
+     */
+    PJ_TRY {
+        rc = rc;
+    }
+    PJ_CATCH_ANY {
+        rc = -3;
+    }
+    PJ_END;
+
+    if (rc != 0)
+	return rc;
+
+
+    /*
+     * Basic TRY/CATCH
+     */ 
+    PJ_TRY {
+	rc = throw_id_1();
+
+	// should not reach here.
+	rc = -10;
+    }
+    PJ_CATCH_ANY {
+        int id = PJ_GET_EXCEPTION();
+	if (id != ID_1) {
+	    PJ_LOG(3,("", "...error: got unexpected exception %d (%s)", 
+		      id, pj_exception_id_name(id)));
+	    if (!rc) rc = -20;
+	}
+    }
+    PJ_END;
+
+    if (rc != 0)
+	return rc;
+
+    /*
+     * Multiple exceptions handlers
+     */
+    PJ_TRY {
+	rc = throw_id_2();
+	// should not reach here.
+	rc = -25;
+    }
+    PJ_CATCH_ANY {
+	switch (PJ_GET_EXCEPTION()) {
+	case ID_1:
+	    if (!rc) rc = -30; break;
+	case ID_2:
+	    if (!rc) rc = 0; break;
+	default:
+	    if (!rc) rc = -40;
+	    break;
+	}
+    }
+    PJ_END;
+
+    if (rc != 0)
+	return rc;
+
+    /*
+     * Test default handler.
+     */
+    PJ_TRY {
+	rc = throw_id_1();
+	// should not reach here
+	rc = -50;
+    }
+    PJ_CATCH_ANY {
+	switch (PJ_GET_EXCEPTION()) {
+	case ID_1:
+	    if (!rc) rc = 0;
+	    break;
+	default:
+	    if (!rc) rc = -60;
+	    break;
+	}
+    }
+    PJ_END;
+
+    if (rc != 0)
+	return rc;
+
+    return 0;
+}
+
+int exception_test(void)
+{
+    int i, rc;
+    enum { LOOP = 10 };
+
+    for (i=0; i<LOOP; ++i) {
+	if ((rc=test()) != 0) {
+	    PJ_LOG(3,("", "...failed at i=%d (rc=%d)", i, rc));
+	    return rc;
+	}
+    }
+    return 0;
+}
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_exception_test;
+#endif	/* INCLUDE_EXCEPTION_TEST */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/fifobuf.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/fifobuf.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/fifobuf.c	(revision 1163)
@@ -0,0 +1,116 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_fifobuf_test;
+
+#if INCLUDE_FIFOBUF_TEST
+
+#include <pjlib.h>
+
+int fifobuf_test()
+{
+    enum { SIZE = 1024, MAX_ENTRIES = 128, 
+	   MIN_SIZE = 4, MAX_SIZE = 64, 
+	   LOOP=10000 };
+    pj_pool_t *pool;
+    pj_fifobuf_t fifo;
+    unsigned available = SIZE;
+    void *entries[MAX_ENTRIES];
+    void *buffer;
+    int i;
+
+    pool = pj_pool_create(mem, NULL, SIZE+256, 0, NULL);
+    if (!pool)
+	return -10;
+
+    buffer = pj_pool_alloc(pool, SIZE);
+    if (!buffer)
+	return -20;
+
+    pj_fifobuf_init (&fifo, buffer, SIZE);
+    
+    // Test 1
+    for (i=0; i<LOOP*MAX_ENTRIES; ++i) {
+	int size;
+	int c, f;
+	c = i%2;
+	f = (i+1)%2;
+	do {
+	    size = MIN_SIZE+(pj_rand() % MAX_SIZE);
+	    entries[c] = pj_fifobuf_alloc (&fifo, size);
+	} while (entries[c] == 0);
+	if ( i!=0) {
+	    pj_fifobuf_free(&fifo, entries[f]);
+	}
+    }
+    if (entries[(i+1)%2])
+	pj_fifobuf_free(&fifo, entries[(i+1)%2]);
+
+    if (pj_fifobuf_max_size(&fifo) < SIZE-4) {
+	pj_assert(0);
+	return -1;
+    }
+
+    // Test 2
+    entries[0] = pj_fifobuf_alloc (&fifo, MIN_SIZE);
+    if (!entries[0]) return -1;
+    for (i=0; i<LOOP*MAX_ENTRIES; ++i) {
+	int size = MIN_SIZE+(pj_rand() % MAX_SIZE);
+	entries[1] = pj_fifobuf_alloc (&fifo, size);
+	if (entries[1])
+	    pj_fifobuf_unalloc(&fifo, entries[1]);
+    }
+    pj_fifobuf_unalloc(&fifo, entries[0]);
+    if (pj_fifobuf_max_size(&fifo) < SIZE-4) {
+	pj_assert(0);
+	return -2;
+    }
+
+    // Test 3
+    for (i=0; i<LOOP; ++i) {
+	int count, j;
+	for (count=0; available>=MIN_SIZE+4 && count < MAX_ENTRIES;) {
+	    int size = MIN_SIZE+(pj_rand() % MAX_SIZE);
+	    entries[count] = pj_fifobuf_alloc (&fifo, size);
+	    if (entries[count]) {
+		available -= (size+4);
+		++count;
+	    }
+	}
+	for (j=0; j<count; ++j) {
+	    pj_fifobuf_free (&fifo, entries[j]);
+	}
+	available = SIZE;
+    }
+
+    if (pj_fifobuf_max_size(&fifo) < SIZE-4) {
+	pj_assert(0);
+	return -3;
+    }
+    pj_pool_release(pool);
+    return 0;
+}
+
+#endif	/* INCLUDE_FIFOBUF_TEST */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/file.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/file.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/file.c	(revision 1163)
@@ -0,0 +1,224 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+#include <pjlib.h>
+
+#if INCLUDE_FILE_TEST
+
+#define FILENAME                "testfil1.txt"
+#define NEWNAME                 "testfil2.txt"
+#define INCLUDE_FILE_TIME_TEST  0
+
+static char buffer[11] = {'H', 'e', 'l', 'l', 'o', ' ',
+		          'W', 'o', 'r', 'l', 'd' };
+
+static int file_test_internal(void)
+{
+    enum { FILE_MAX_AGE = 1000 };
+    pj_oshandle_t fd = 0;
+    pj_status_t status;
+    char readbuf[sizeof(buffer)+16];
+    pj_file_stat stat;
+    pj_time_val start_time;
+    pj_ssize_t size;
+    pj_off_t pos;
+
+    PJ_LOG(3,("", "..file io test.."));
+
+    /* Get time. */
+    pj_gettimeofday(&start_time);
+
+    /* Delete original file if exists. */
+    if (pj_file_exists(FILENAME))
+        pj_file_delete(FILENAME);
+
+    /*
+     * Write data to the file.
+     */
+    status = pj_file_open(NULL, FILENAME, PJ_O_WRONLY, &fd);
+    if (status != PJ_SUCCESS) {
+        app_perror("...file_open() error", status);
+        return -10;
+    }
+
+    size = sizeof(buffer);
+    status = pj_file_write(fd, buffer, &size);
+    if (status != PJ_SUCCESS) {
+        app_perror("...file_write() error", status);
+        pj_file_close(fd);
+        return -20;
+    }
+    if (size != sizeof(buffer))
+        return -25;
+
+    status = pj_file_close(fd);
+    if (status != PJ_SUCCESS) {
+        app_perror("...file_close() error", status);
+        return -30;
+    }
+
+    /* Check the file existance and size. */
+    if (!pj_file_exists(FILENAME))
+        return -40;
+
+    if (pj_file_size(FILENAME) != sizeof(buffer))
+        return -50;
+
+    /* Get file stat. */
+    status = pj_file_getstat(FILENAME, &stat);
+    if (status != PJ_SUCCESS)
+        return -60;
+
+    /* Check stat size. */
+    if (stat.size != sizeof(buffer))
+        return -70;
+
+#if INCLUDE_FILE_TIME_TEST
+    /* Check file creation time >= start_time. */
+    if (!PJ_TIME_VAL_GTE(stat.ctime, start_time))
+        return -80;
+    /* Check file creation time is not much later. */
+    PJ_TIME_VAL_SUB(stat.ctime, start_time);
+    if (stat.ctime.sec > FILE_MAX_AGE)
+        return -90;
+
+    /* Check file modification time >= start_time. */
+    if (!PJ_TIME_VAL_GTE(stat.mtime, start_time))
+        return -80;
+    /* Check file modification time is not much later. */
+    PJ_TIME_VAL_SUB(stat.mtime, start_time);
+    if (stat.mtime.sec > FILE_MAX_AGE)
+        return -90;
+
+    /* Check file access time >= start_time. */
+    if (!PJ_TIME_VAL_GTE(stat.atime, start_time))
+        return -80;
+    /* Check file access time is not much later. */
+    PJ_TIME_VAL_SUB(stat.atime, start_time);
+    if (stat.atime.sec > FILE_MAX_AGE)
+        return -90;
+#endif
+
+    /*
+     * Re-open the file and read data.
+     */
+    status = pj_file_open(NULL, FILENAME, PJ_O_RDONLY, &fd);
+    if (status != PJ_SUCCESS) {
+        app_perror("...file_open() error", status);
+        return -100;
+    }
+
+    size = 0;
+    while (size < sizeof(readbuf)) {
+        pj_ssize_t read;
+        read = 1;
+        status = pj_file_read(fd, &readbuf[size], &read);
+        if (status != PJ_SUCCESS) {
+	    PJ_LOG(3,("", "...error reading file after %d bytes (error follows)", 
+		      size));
+            app_perror("...error", status);
+            return -110;
+        }
+        if (read == 0) {
+            // EOF
+            break;
+        }
+        size += read;
+    }
+
+    if (size != sizeof(buffer))
+        return -120;
+
+    /*
+    if (!pj_file_eof(fd, PJ_O_RDONLY))
+        return -130;
+     */
+
+    if (pj_memcmp(readbuf, buffer, size) != 0)
+        return -140;
+
+    /* Seek test. */
+    status = pj_file_setpos(fd, 4, PJ_SEEK_SET);
+    if (status != PJ_SUCCESS) {
+        app_perror("...file_setpos() error", status);
+        return -141;
+    }
+
+    /* getpos test. */
+    status = pj_file_getpos(fd, &pos);
+    if (status != PJ_SUCCESS) {
+        app_perror("...file_getpos() error", status);
+        return -142;
+    }
+    if (pos != 4)
+        return -143;
+
+    status = pj_file_close(fd);
+    if (status != PJ_SUCCESS) {
+        app_perror("...file_close() error", status);
+        return -150;
+    }
+
+    /*
+     * Rename test.
+     */
+    status = pj_file_move(FILENAME, NEWNAME);
+    if (status != PJ_SUCCESS) {
+        app_perror("...file_move() error", status);
+        return -160;
+    }
+
+    if (pj_file_exists(FILENAME))
+        return -170;
+    if (!pj_file_exists(NEWNAME))
+        return -180;
+
+    if (pj_file_size(NEWNAME) != sizeof(buffer))
+        return -190;
+
+    /* Delete test. */
+    status = pj_file_delete(NEWNAME);
+    if (status != PJ_SUCCESS) {
+        app_perror("...file_delete() error", status);
+        return -200;
+    }
+
+    if (pj_file_exists(NEWNAME))
+        return -210;
+
+    PJ_LOG(3,("", "...success"));
+    return PJ_SUCCESS;
+}
+
+
+int file_test(void)
+{
+    int rc = file_test_internal();
+
+    /* Delete test file if exists. */
+    if (pj_file_exists(FILENAME))
+        pj_file_delete(FILENAME);
+
+    return rc;
+}
+
+#else
+int dummy_file_test;
+#endif
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/ioq_perf.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/ioq_perf.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/ioq_perf.c	(revision 1163)
@@ -0,0 +1,546 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+#include <pjlib.h>
+#include <pj/compat/high_precision.h>
+
+/**
+ * \page page_pjlib_ioqueue_perf_test Test: I/O Queue Performance
+ *
+ * Test the performance of the I/O queue, using typical producer
+ * consumer test. The test should examine the effect of using multiple
+ * threads on the performance.
+ *
+ * This file is <b>pjlib-test/ioq_perf.c</b>
+ *
+ * \include pjlib-test/ioq_perf.c
+ */
+
+#if INCLUDE_IOQUEUE_PERF_TEST
+
+#ifdef _MSC_VER
+#   pragma warning ( disable: 4204)     // non-constant aggregate initializer
+#endif
+
+#define THIS_FILE	"ioq_perf"
+//#define TRACE_(expr)	PJ_LOG(3,expr)
+#define TRACE_(expr)
+
+
+static pj_bool_t thread_quit_flag;
+static pj_status_t last_error;
+static unsigned last_error_counter;
+
+/* Descriptor for each producer/consumer pair. */
+typedef struct test_item
+{
+    pj_sock_t            server_fd, 
+                         client_fd;
+    pj_ioqueue_t        *ioqueue;
+    pj_ioqueue_key_t    *server_key,
+                        *client_key;
+    pj_ioqueue_op_key_t  recv_op,
+                         send_op;
+    int                  has_pending_send;
+    pj_size_t            buffer_size;
+    char                *outgoing_buffer;
+    char                *incoming_buffer;
+    pj_size_t            bytes_sent, 
+                         bytes_recv;
+} test_item;
+
+/* Callback when data has been read.
+ * Increment item->bytes_recv and ready to read the next data.
+ */
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key,
+                             pj_ssize_t bytes_read)
+{
+    test_item *item = pj_ioqueue_get_user_data(key);
+    pj_status_t rc;
+    int data_is_available = 1;
+
+    //TRACE_((THIS_FILE, "     read complete, bytes_read=%d", bytes_read));
+
+    do {
+        if (thread_quit_flag)
+            return;
+
+        if (bytes_read < 0) {
+            pj_status_t rc = -bytes_read;
+            char errmsg[PJ_ERR_MSG_SIZE];
+
+	    if (rc != last_error) {
+	        //last_error = rc;
+	        pj_strerror(rc, errmsg, sizeof(errmsg));
+	        PJ_LOG(3,(THIS_FILE,"...error: read error, bytes_read=%d (%s)", 
+		          bytes_read, errmsg));
+	        PJ_LOG(3,(THIS_FILE, 
+		          ".....additional info: total read=%u, total sent=%u",
+		          item->bytes_recv, item->bytes_sent));
+	    } else {
+	        last_error_counter++;
+	    }
+            bytes_read = 0;
+
+        } else if (bytes_read == 0) {
+            PJ_LOG(3,(THIS_FILE, "...socket has closed!"));
+        }
+
+        item->bytes_recv += bytes_read;
+    
+        /* To assure that the test quits, even if main thread
+         * doesn't have time to run.
+         */
+        if (item->bytes_recv > item->buffer_size * 10000) 
+	    thread_quit_flag = 1;
+
+        bytes_read = item->buffer_size;
+        rc = pj_ioqueue_recv( key, op_key,
+                              item->incoming_buffer, &bytes_read, 0 );
+
+        if (rc == PJ_SUCCESS) {
+            data_is_available = 1;
+        } else if (rc == PJ_EPENDING) {
+            data_is_available = 0;
+        } else {
+            data_is_available = 0;
+	    if (rc != last_error) {
+	        last_error = rc;
+	        app_perror("...error: read error(1)", rc);
+	    } else {
+	        last_error_counter++;
+	    }
+        }
+
+        if (!item->has_pending_send) {
+            pj_ssize_t sent = item->buffer_size;
+            rc = pj_ioqueue_send(item->client_key, &item->send_op,
+                                 item->outgoing_buffer, &sent, 0);
+            if (rc != PJ_SUCCESS && rc != PJ_EPENDING) {
+                app_perror("...error: write error", rc);
+            }
+
+            item->has_pending_send = (rc==PJ_EPENDING);
+        }
+
+    } while (data_is_available);
+}
+
+/* Callback when data has been written.
+ * Increment item->bytes_sent and write the next data.
+ */
+static void on_write_complete(pj_ioqueue_key_t *key, 
+                              pj_ioqueue_op_key_t *op_key,
+                              pj_ssize_t bytes_sent)
+{
+    test_item *item = pj_ioqueue_get_user_data(key);
+    
+    //TRACE_((THIS_FILE, "     write complete: sent = %d", bytes_sent));
+
+    if (thread_quit_flag)
+        return;
+
+    item->has_pending_send = 0;
+    item->bytes_sent += bytes_sent;
+
+    if (bytes_sent <= 0) {
+        PJ_LOG(3,(THIS_FILE, "...error: sending stopped. bytes_sent=%d", 
+                  bytes_sent));
+    } 
+    else {
+        pj_status_t rc;
+
+        bytes_sent = item->buffer_size;
+        rc = pj_ioqueue_send( item->client_key, op_key,
+                              item->outgoing_buffer, &bytes_sent, 0);
+        if (rc != PJ_SUCCESS && rc != PJ_EPENDING) {
+            app_perror("...error: write error", rc);
+        }
+
+        item->has_pending_send = (rc==PJ_EPENDING);
+    }
+}
+
+struct thread_arg
+{
+    int		  id;
+    pj_ioqueue_t *ioqueue;
+    unsigned	  counter;
+};
+
+/* The worker thread. */
+static int worker_thread(void *p)
+{
+    struct thread_arg *arg = p;
+    const pj_time_val timeout = {0, 100};
+    int rc;
+
+    while (!thread_quit_flag) {
+
+	++arg->counter;
+        rc = pj_ioqueue_poll(arg->ioqueue, &timeout);
+	//TRACE_((THIS_FILE, "     thread: poll returned rc=%d", rc));
+        if (rc < 0) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+	    pj_strerror(-rc, errmsg, sizeof(errmsg));
+            PJ_LOG(3, (THIS_FILE, 
+		       "...error in pj_ioqueue_poll() in thread %d "
+		       "after %d loop: %s [pj_status_t=%d]", 
+		       arg->id, arg->counter, errmsg, -rc));
+            //return -1;
+        }
+    }
+    return 0;
+}
+
+/* Calculate the bandwidth for the specific test configuration.
+ * The test is simple:
+ *  - create sockpair_cnt number of producer-consumer socket pair.
+ *  - create thread_cnt number of worker threads.
+ *  - each producer will send buffer_size bytes data as fast and
+ *    as soon as it can.
+ *  - each consumer will read buffer_size bytes of data as fast 
+ *    as it could.
+ *  - measure the total bytes received by all consumers during a
+ *    period of time.
+ */
+static int perform_test(int sock_type, const char *type_name,
+                        unsigned thread_cnt, unsigned sockpair_cnt,
+                        pj_size_t buffer_size, 
+                        pj_size_t *p_bandwidth)
+{
+    enum { MSEC_DURATION = 5000 };
+    pj_pool_t *pool;
+    test_item *items;
+    pj_thread_t **thread;
+    pj_ioqueue_t *ioqueue;
+    pj_status_t rc;
+    pj_ioqueue_callback ioqueue_callback;
+    pj_uint32_t total_elapsed_usec, total_received;
+    pj_highprec_t bandwidth;
+    pj_timestamp start, stop;
+    unsigned i;
+
+    TRACE_((THIS_FILE, "    starting test.."));
+
+    ioqueue_callback.on_read_complete = &on_read_complete;
+    ioqueue_callback.on_write_complete = &on_write_complete;
+
+    thread_quit_flag = 0;
+
+    pool = pj_pool_create(mem, NULL, 4096, 4096, NULL);
+    if (!pool)
+        return -10;
+
+    items = pj_pool_alloc(pool, sockpair_cnt*sizeof(test_item));
+    thread = pj_pool_alloc(pool, thread_cnt*sizeof(pj_thread_t*));
+
+    TRACE_((THIS_FILE, "     creating ioqueue.."));
+    rc = pj_ioqueue_create(pool, sockpair_cnt*2, &ioqueue);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...error: unable to create ioqueue", rc);
+        return -15;
+    }
+
+    /* Initialize each producer-consumer pair. */
+    for (i=0; i<sockpair_cnt; ++i) {
+        pj_ssize_t bytes;
+
+        items[i].ioqueue = ioqueue;
+        items[i].buffer_size = buffer_size;
+        items[i].outgoing_buffer = pj_pool_alloc(pool, buffer_size);
+        items[i].incoming_buffer = pj_pool_alloc(pool, buffer_size);
+        items[i].bytes_recv = items[i].bytes_sent = 0;
+
+        /* randomize outgoing buffer. */
+        pj_create_random_string(items[i].outgoing_buffer, buffer_size);
+
+        /* Create socket pair. */
+	TRACE_((THIS_FILE, "      calling socketpair.."));
+        rc = app_socketpair(PJ_AF_INET, sock_type, 0, 
+                            &items[i].server_fd, &items[i].client_fd);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...error: unable to create socket pair", rc);
+            return -20;
+        }
+
+        /* Register server socket to ioqueue. */
+	TRACE_((THIS_FILE, "      register(1).."));
+        rc = pj_ioqueue_register_sock(pool, ioqueue, 
+                                      items[i].server_fd,
+                                      &items[i], &ioqueue_callback,
+                                      &items[i].server_key);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...error: registering server socket to ioqueue", rc);
+            return -60;
+        }
+
+        /* Register client socket to ioqueue. */
+	TRACE_((THIS_FILE, "      register(2).."));
+        rc = pj_ioqueue_register_sock(pool, ioqueue, 
+                                      items[i].client_fd,
+                                      &items[i],  &ioqueue_callback,
+                                      &items[i].client_key);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...error: registering server socket to ioqueue", rc);
+            return -70;
+        }
+
+        /* Start reading. */
+	TRACE_((THIS_FILE, "      pj_ioqueue_recv.."));
+        bytes = items[i].buffer_size;
+        rc = pj_ioqueue_recv(items[i].server_key, &items[i].recv_op,
+                             items[i].incoming_buffer, &bytes,
+			     0);
+        if (rc != PJ_EPENDING) {
+            app_perror("...error: pj_ioqueue_recv", rc);
+            return -73;
+        }
+
+        /* Start writing. */
+	TRACE_((THIS_FILE, "      pj_ioqueue_write.."));
+        bytes = items[i].buffer_size;
+        rc = pj_ioqueue_send(items[i].client_key, &items[i].send_op,
+                             items[i].outgoing_buffer, &bytes, 0);
+        if (rc != PJ_SUCCESS && rc != PJ_EPENDING) {
+            app_perror("...error: pj_ioqueue_write", rc);
+            return -76;
+        }
+
+        items[i].has_pending_send = (rc==PJ_EPENDING);
+    }
+
+    /* Create the threads. */
+    for (i=0; i<thread_cnt; ++i) {
+	struct thread_arg *arg;
+
+	arg = pj_pool_zalloc(pool, sizeof(*arg));
+	arg->id = i;
+	arg->ioqueue = ioqueue;
+	arg->counter = 0;
+
+        rc = pj_thread_create( pool, NULL, 
+                               &worker_thread, 
+                               arg, 
+                               PJ_THREAD_DEFAULT_STACK_SIZE, 
+                               PJ_THREAD_SUSPENDED, &thread[i] );
+        if (rc != PJ_SUCCESS) {
+            app_perror("...error: unable to create thread", rc);
+            return -80;
+        }
+    }
+
+    /* Mark start time. */
+    rc = pj_get_timestamp(&start);
+    if (rc != PJ_SUCCESS)
+        return -90;
+
+    /* Start the thread. */
+    TRACE_((THIS_FILE, "     resuming all threads.."));
+    for (i=0; i<thread_cnt; ++i) {
+        rc = pj_thread_resume(thread[i]);
+        if (rc != 0)
+            return -100;
+    }
+
+    /* Wait for MSEC_DURATION seconds. 
+     * This should be as simple as pj_thread_sleep(MSEC_DURATION) actually,
+     * but unfortunately it doesn't work when system doesn't employ
+     * timeslicing for threads.
+     */
+    TRACE_((THIS_FILE, "     wait for few seconds.."));
+    do {
+	pj_thread_sleep(1);
+
+	/* Mark end time. */
+	rc = pj_get_timestamp(&stop);
+
+	if (thread_quit_flag) {
+	    TRACE_((THIS_FILE, "      transfer limit reached.."));
+	    break;
+	}
+
+	if (pj_elapsed_usec(&start,&stop)<MSEC_DURATION * 1000) {
+	    TRACE_((THIS_FILE, "      time limit reached.."));
+	    break;
+	}
+
+    } while (1);
+
+    /* Terminate all threads. */
+    TRACE_((THIS_FILE, "     terminating all threads.."));
+    thread_quit_flag = 1;
+
+    for (i=0; i<thread_cnt; ++i) {
+	TRACE_((THIS_FILE, "      join thread %d..", i));
+        pj_thread_join(thread[i]);
+    }
+
+    /* Close all sockets. */
+    TRACE_((THIS_FILE, "     closing all sockets.."));
+    for (i=0; i<sockpair_cnt; ++i) {
+        pj_ioqueue_unregister(items[i].server_key);
+        pj_ioqueue_unregister(items[i].client_key);
+    }
+
+    /* Destroy threads */
+    for (i=0; i<thread_cnt; ++i) {
+        pj_thread_destroy(thread[i]);
+    }
+
+    /* Destroy ioqueue. */
+    TRACE_((THIS_FILE, "     destroying ioqueue.."));
+    pj_ioqueue_destroy(ioqueue);
+
+    /* Calculate actual time in usec. */
+    total_elapsed_usec = pj_elapsed_usec(&start, &stop);
+
+    /* Calculate total bytes received. */
+    total_received = 0;
+    for (i=0; i<sockpair_cnt; ++i) {
+        total_received = items[i].bytes_recv;
+    }
+
+    /* bandwidth = total_received*1000/total_elapsed_usec */
+    bandwidth = total_received;
+    pj_highprec_mul(bandwidth, 1000);
+    pj_highprec_div(bandwidth, total_elapsed_usec);
+    
+    *p_bandwidth = (pj_uint32_t)bandwidth;
+
+    PJ_LOG(3,(THIS_FILE, "   %.4s    %2d        %2d       %8d KB/s",
+              type_name, thread_cnt, sockpair_cnt,
+              *p_bandwidth));
+
+    /* Done. */
+    pj_pool_release(pool);
+
+    TRACE_((THIS_FILE, "    done.."));
+    return 0;
+}
+
+/*
+ * main test entry.
+ */
+int ioqueue_perf_test(void)
+{
+    enum { BUF_SIZE = 512 };
+    int i, rc;
+    struct {
+        int         type;
+        const char *type_name;
+        int         thread_cnt;
+        int         sockpair_cnt;
+    } test_param[] = 
+    {
+        { PJ_SOCK_DGRAM, "udp", 1, 1},
+        { PJ_SOCK_DGRAM, "udp", 1, 2},
+        { PJ_SOCK_DGRAM, "udp", 1, 4},
+        { PJ_SOCK_DGRAM, "udp", 1, 8},
+        { PJ_SOCK_DGRAM, "udp", 2, 1},
+        { PJ_SOCK_DGRAM, "udp", 2, 2},
+        { PJ_SOCK_DGRAM, "udp", 2, 4},
+        { PJ_SOCK_DGRAM, "udp", 2, 8},
+        { PJ_SOCK_DGRAM, "udp", 4, 1},
+        { PJ_SOCK_DGRAM, "udp", 4, 2},
+        { PJ_SOCK_DGRAM, "udp", 4, 4},
+        { PJ_SOCK_DGRAM, "udp", 4, 8},
+        { PJ_SOCK_DGRAM, "udp", 4, 16},
+        { PJ_SOCK_STREAM, "tcp", 1, 1},
+        { PJ_SOCK_STREAM, "tcp", 1, 2},
+        { PJ_SOCK_STREAM, "tcp", 1, 4},
+        { PJ_SOCK_STREAM, "tcp", 1, 8},
+        { PJ_SOCK_STREAM, "tcp", 2, 1},
+        { PJ_SOCK_STREAM, "tcp", 2, 2},
+        { PJ_SOCK_STREAM, "tcp", 2, 4},
+        { PJ_SOCK_STREAM, "tcp", 2, 8},
+        { PJ_SOCK_STREAM, "tcp", 4, 1},
+        { PJ_SOCK_STREAM, "tcp", 4, 2},
+        { PJ_SOCK_STREAM, "tcp", 4, 4},
+        { PJ_SOCK_STREAM, "tcp", 4, 8},
+        { PJ_SOCK_STREAM, "tcp", 4, 16},
+/*
+	{ PJ_SOCK_DGRAM, "udp", 32, 1},
+	{ PJ_SOCK_DGRAM, "udp", 32, 1},
+	{ PJ_SOCK_DGRAM, "udp", 32, 1},
+	{ PJ_SOCK_DGRAM, "udp", 32, 1},
+	{ PJ_SOCK_DGRAM, "udp", 1, 32},
+	{ PJ_SOCK_DGRAM, "udp", 1, 32},
+	{ PJ_SOCK_DGRAM, "udp", 1, 32},
+	{ PJ_SOCK_DGRAM, "udp", 1, 32},
+	{ PJ_SOCK_STREAM, "tcp", 32, 1},
+	{ PJ_SOCK_STREAM, "tcp", 32, 1},
+	{ PJ_SOCK_STREAM, "tcp", 32, 1},
+	{ PJ_SOCK_STREAM, "tcp", 32, 1},
+	{ PJ_SOCK_STREAM, "tcp", 1, 32},
+	{ PJ_SOCK_STREAM, "tcp", 1, 32},
+	{ PJ_SOCK_STREAM, "tcp", 1, 32},
+	{ PJ_SOCK_STREAM, "tcp", 1, 32},
+*/
+    };
+    pj_size_t best_bandwidth;
+    int best_index = 0;
+
+    PJ_LOG(3,(THIS_FILE, "   Benchmarking %s ioqueue:", pj_ioqueue_name()));
+    PJ_LOG(3,(THIS_FILE, "   ======================================="));
+    PJ_LOG(3,(THIS_FILE, "   Type  Threads  Skt.Pairs      Bandwidth"));
+    PJ_LOG(3,(THIS_FILE, "   ======================================="));
+
+    best_bandwidth = 0;
+    for (i=0; i<sizeof(test_param)/sizeof(test_param[0]); ++i) {
+        pj_size_t bandwidth;
+
+        rc = perform_test(test_param[i].type, 
+                          test_param[i].type_name,
+                          test_param[i].thread_cnt, 
+                          test_param[i].sockpair_cnt, 
+                          BUF_SIZE, 
+                          &bandwidth);
+        if (rc != 0)
+            return rc;
+
+        if (bandwidth > best_bandwidth)
+            best_bandwidth = bandwidth, best_index = i;
+
+        /* Give it a rest before next test, to allow system to close the
+	 * sockets properly. 
+	 */
+        pj_thread_sleep(500);
+    }
+
+    PJ_LOG(3,(THIS_FILE, 
+              "   Best: Type=%s Threads=%d, Skt.Pairs=%d, Bandwidth=%u KB/s",
+              test_param[best_index].type_name,
+              test_param[best_index].thread_cnt,
+              test_param[best_index].sockpair_cnt,
+              best_bandwidth));
+    PJ_LOG(3,(THIS_FILE, "   (Note: packet size=%d, total errors=%u)", 
+			 BUF_SIZE, last_error_counter));
+    return 0;
+}
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_uiq_perf_test;
+#endif  /* INCLUDE_IOQUEUE_PERF_TEST */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/ioq_tcp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/ioq_tcp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/ioq_tcp.c	(revision 1163)
@@ -0,0 +1,855 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+
+/**
+ * \page page_pjlib_ioqueue_tcp_test Test: I/O Queue (TCP)
+ *
+ * This file provides implementation to test the
+ * functionality of the I/O queue when TCP socket is used.
+ *
+ *
+ * This file is <b>pjlib-test/ioq_tcp.c</b>
+ *
+ * \include pjlib-test/ioq_tcp.c
+ */
+
+
+#if INCLUDE_TCP_IOQUEUE_TEST
+
+#include <pjlib.h>
+
+#if PJ_HAS_TCP
+
+#define THIS_FILE	    "test_tcp"
+#define NON_EXISTANT_PORT   50123
+#define LOOP		    100
+#define BUF_MIN_SIZE	    32
+#define BUF_MAX_SIZE	    2048
+#define SOCK_INACTIVE_MIN   (4-2)
+#define SOCK_INACTIVE_MAX   (PJ_IOQUEUE_MAX_HANDLES - 2)
+#define POOL_SIZE	    (2*BUF_MAX_SIZE + SOCK_INACTIVE_MAX*128 + 2048)
+
+static pj_ssize_t	     callback_read_size,
+                             callback_write_size,
+                             callback_accept_status,
+                             callback_connect_status;
+static pj_ioqueue_key_t     *callback_read_key,
+                            *callback_write_key,
+                            *callback_accept_key,
+                            *callback_connect_key;
+static pj_ioqueue_op_key_t  *callback_read_op,
+                            *callback_write_op,
+                            *callback_accept_op;
+
+static void on_ioqueue_read(pj_ioqueue_key_t *key, 
+                            pj_ioqueue_op_key_t *op_key,
+                            pj_ssize_t bytes_read)
+{
+    callback_read_key = key;
+    callback_read_op = op_key;
+    callback_read_size = bytes_read;
+}
+
+static void on_ioqueue_write(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key,
+                             pj_ssize_t bytes_written)
+{
+    callback_write_key = key;
+    callback_write_op = op_key;
+    callback_write_size = bytes_written;
+}
+
+static void on_ioqueue_accept(pj_ioqueue_key_t *key, 
+                              pj_ioqueue_op_key_t *op_key,
+                              pj_sock_t sock, 
+                              int status)
+{
+    if (sock == PJ_INVALID_SOCKET) {
+
+	if (status != PJ_SUCCESS) {
+	    /* Ignore. Could be blocking error */
+	    app_perror(".....warning: received error in on_ioqueue_accept() callback",
+		       status);
+	} else {
+	    callback_accept_status = -61;
+	    PJ_LOG(3,("", "..... on_ioqueue_accept() callback was given "
+			  "invalid socket and status is %d", status));
+	}
+    } else {
+	callback_accept_key = key;
+	callback_accept_op = op_key;
+	callback_accept_status = status;
+    }
+}
+
+static void on_ioqueue_connect(pj_ioqueue_key_t *key, int status)
+{
+    callback_connect_key = key;
+    callback_connect_status = status;
+}
+
+static pj_ioqueue_callback test_cb = 
+{
+    &on_ioqueue_read,
+    &on_ioqueue_write,
+    &on_ioqueue_accept,
+    &on_ioqueue_connect,
+};
+
+static int send_recv_test(pj_ioqueue_t *ioque,
+			  pj_ioqueue_key_t *skey,
+			  pj_ioqueue_key_t *ckey,
+			  void *send_buf,
+			  void *recv_buf,
+			  pj_ssize_t bufsize,
+			  pj_timestamp *t_elapsed)
+{
+    pj_status_t status;
+    pj_ssize_t bytes;
+    pj_time_val timeout;
+    pj_timestamp t1, t2;
+    int pending_op = 0;
+    pj_ioqueue_op_key_t read_op, write_op;
+
+    // Start reading on the server side.
+    bytes = bufsize;
+    status = pj_ioqueue_recv(skey, &read_op, recv_buf, &bytes, 0);
+    if (status != PJ_SUCCESS && status != PJ_EPENDING) {
+        app_perror("...pj_ioqueue_recv error", status);
+	return -100;
+    }
+    
+    if (status == PJ_EPENDING)
+        ++pending_op;
+    else {
+        /* Does not expect to return error or immediate data. */
+        return -115;
+    }
+
+    // Randomize send buffer.
+    pj_create_random_string((char*)send_buf, bufsize);
+
+    // Starts send on the client side.
+    bytes = bufsize;
+    status = pj_ioqueue_send(ckey, &write_op, send_buf, &bytes, 0);
+    if (status != PJ_SUCCESS && bytes != PJ_EPENDING) {
+	return -120;
+    }
+    if (status == PJ_EPENDING) {
+	++pending_op;
+    }
+
+    // Begin time.
+    pj_get_timestamp(&t1);
+
+    // Reset indicators
+    callback_read_size = callback_write_size = 0;
+    callback_read_key = callback_write_key = NULL;
+    callback_read_op = callback_write_op = NULL;
+
+    // Poll the queue until we've got completion event in the server side.
+    status = 0;
+    while (pending_op > 0) {
+        timeout.sec = 1; timeout.msec = 0;
+	status = pj_ioqueue_poll(ioque, &timeout);
+	if (status > 0) {
+            if (callback_read_size) {
+                if (callback_read_size != bufsize)
+                    return -160;
+                if (callback_read_key != skey)
+                    return -161;
+                if (callback_read_op != &read_op)
+                    return -162;
+            }
+            if (callback_write_size) {
+                if (callback_write_key != ckey)
+                    return -163;
+                if (callback_write_op != &write_op)
+                    return -164;
+            }
+	    pending_op -= status;
+	}
+        if (status == 0) {
+            PJ_LOG(3,("", "...error: timed out"));
+        }
+	if (status < 0) {
+	    return -170;
+	}
+    }
+
+    // Pending op is zero.
+    // Subsequent poll should yield zero too.
+    timeout.sec = timeout.msec = 0;
+    status = pj_ioqueue_poll(ioque, &timeout);
+    if (status != 0)
+        return -173;
+
+    // End time.
+    pj_get_timestamp(&t2);
+    t_elapsed->u32.lo += (t2.u32.lo - t1.u32.lo);
+
+    // Compare recv buffer with send buffer.
+    if (pj_memcmp(send_buf, recv_buf, bufsize) != 0) {
+	return -180;
+    }
+
+    // Success
+    return 0;
+}
+
+
+/*
+ * Compliance test for success scenario.
+ */
+static int compliance_test_0(void)
+{
+    pj_sock_t ssock=-1, csock0=-1, csock1=-1;
+    pj_sockaddr_in addr, client_addr, rmt_addr;
+    int client_addr_len;
+    pj_pool_t *pool = NULL;
+    char *send_buf, *recv_buf;
+    pj_ioqueue_t *ioque = NULL;
+    pj_ioqueue_key_t *skey, *ckey0, *ckey1;
+    pj_ioqueue_op_key_t accept_op;
+    int bufsize = BUF_MIN_SIZE;
+    pj_ssize_t status = -1;
+    int pending_op = 0;
+    pj_timestamp t_elapsed;
+    pj_str_t s;
+    pj_status_t rc;
+
+    // Create pool.
+    pool = pj_pool_create(mem, NULL, POOL_SIZE, 4000, NULL);
+
+    // Allocate buffers for send and receive.
+    send_buf = (char*)pj_pool_alloc(pool, bufsize);
+    recv_buf = (char*)pj_pool_alloc(pool, bufsize);
+
+    // Create server socket and client socket for connecting
+    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &ssock);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...error creating socket", rc);
+        status=-1; goto on_error;
+    }
+
+    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &csock1);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...error creating socket", rc);
+	status=-1; goto on_error;
+    }
+
+    // Bind server socket.
+    pj_sockaddr_in_init(&addr, 0, 0);
+    if ((rc=pj_sock_bind(ssock, &addr, sizeof(addr))) != 0 ) {
+        app_perror("...bind error", rc);
+	status=-10; goto on_error;
+    }
+
+    // Get server address.
+    client_addr_len = sizeof(addr);
+    rc = pj_sock_getsockname(ssock, &addr, &client_addr_len);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...ERROR in pj_sock_getsockname()", rc);
+	status=-15; goto on_error;
+    }
+    addr.sin_addr = pj_inet_addr(pj_cstr(&s, "127.0.0.1"));
+
+    // Create I/O Queue.
+    rc = pj_ioqueue_create(pool, PJ_IOQUEUE_MAX_HANDLES, &ioque);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...ERROR in pj_ioqueue_create()", rc);
+	status=-20; goto on_error;
+    }
+
+    // Register server socket and client socket.
+    rc = pj_ioqueue_register_sock(pool, ioque, ssock, NULL, &test_cb, &skey);
+    if (rc == PJ_SUCCESS)
+        rc = pj_ioqueue_register_sock(pool, ioque, csock1, NULL, &test_cb, 
+                                      &ckey1);
+    else
+        ckey1 = NULL;
+    if (rc != PJ_SUCCESS) {
+        app_perror("...ERROR in pj_ioqueue_register_sock()", rc);
+	status=-23; goto on_error;
+    }
+
+    // Server socket listen().
+    if (pj_sock_listen(ssock, 5)) {
+        app_perror("...ERROR in pj_sock_listen()", rc);
+	status=-25; goto on_error;
+    }
+
+    // Server socket accept()
+    client_addr_len = sizeof(pj_sockaddr_in);
+    status = pj_ioqueue_accept(skey, &accept_op, &csock0, 
+                               &client_addr, &rmt_addr, &client_addr_len);
+    if (status != PJ_EPENDING) {
+        app_perror("...ERROR in pj_ioqueue_accept()", rc);
+	status=-30; goto on_error;
+    }
+    if (status==PJ_EPENDING) {
+	++pending_op;
+    }
+
+    // Client socket connect()
+    status = pj_ioqueue_connect(ckey1, &addr, sizeof(addr));
+    if (status!=PJ_SUCCESS && status != PJ_EPENDING) {
+        app_perror("...ERROR in pj_ioqueue_connect()", rc);
+	status=-40; goto on_error;
+    }
+    if (status==PJ_EPENDING) {
+	++pending_op;
+    }
+
+    // Poll until connected
+    callback_read_size = callback_write_size = 0;
+    callback_accept_status = callback_connect_status = -2;
+
+    callback_read_key = callback_write_key = 
+        callback_accept_key = callback_connect_key = NULL;
+    callback_accept_op = callback_read_op = callback_write_op = NULL;
+
+    while (pending_op) {
+	pj_time_val timeout = {1, 0};
+
+	status=pj_ioqueue_poll(ioque, &timeout);
+	if (status > 0) {
+            if (callback_accept_status != -2) {
+                if (callback_accept_status != 0) {
+                    status=-41; goto on_error;
+                }
+                if (callback_accept_key != skey) {
+                    status=-42; goto on_error;
+                }
+                if (callback_accept_op != &accept_op) {
+                    status=-43; goto on_error;
+                }
+                callback_accept_status = -2;
+            }
+
+            if (callback_connect_status != -2) {
+                if (callback_connect_status != 0) {
+                    status=-50; goto on_error;
+                }
+                if (callback_connect_key != ckey1) {
+                    status=-51; goto on_error;
+                }
+                callback_connect_status = -2;
+            }
+
+	    if (status > pending_op) {
+		PJ_LOG(3,(THIS_FILE,
+			  "...error: pj_ioqueue_poll() returned %d "
+			  "(only expecting %d)",
+			  status, pending_op));
+		return -52;
+	    }
+	    pending_op -= status;
+
+	    if (pending_op == 0) {
+		status = 0;
+	    }
+	}
+    }
+
+    // There's no pending operation.
+    // When we poll the ioqueue, there must not be events.
+    if (pending_op == 0) {
+        pj_time_val timeout = {1, 0};
+        status = pj_ioqueue_poll(ioque, &timeout);
+        if (status != 0) {
+            status=-60; goto on_error;
+        }
+    }
+
+    // Check accepted socket.
+    if (csock0 == PJ_INVALID_SOCKET) {
+	status = -69;
+        app_perror("...accept() error", pj_get_os_error());
+	goto on_error;
+    }
+
+    // Register newly accepted socket.
+    rc = pj_ioqueue_register_sock(pool, ioque, csock0, NULL, 
+                                  &test_cb, &ckey0);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...ERROR in pj_ioqueue_register_sock", rc);
+	status = -70;
+	goto on_error;
+    }
+
+    // Test send and receive.
+    t_elapsed.u32.lo = 0;
+    status = send_recv_test(ioque, ckey0, ckey1, send_buf, 
+                            recv_buf, bufsize, &t_elapsed);
+    if (status != 0) {
+	goto on_error;
+    }
+
+    // Success
+    status = 0;
+
+on_error:
+    if (ssock != PJ_INVALID_SOCKET)
+	pj_sock_close(ssock);
+    if (csock1 != PJ_INVALID_SOCKET)
+	pj_sock_close(csock1);
+    if (csock0 != PJ_INVALID_SOCKET)
+	pj_sock_close(csock0);
+    if (ioque != NULL)
+	pj_ioqueue_destroy(ioque);
+    pj_pool_release(pool);
+    return status;
+
+}
+
+/*
+ * Compliance test for failed scenario.
+ * In this case, the client connects to a non-existant service.
+ */
+static int compliance_test_1(void)
+{
+    pj_sock_t csock1=-1;
+    pj_sockaddr_in addr;
+    pj_pool_t *pool = NULL;
+    pj_ioqueue_t *ioque = NULL;
+    pj_ioqueue_key_t *ckey1;
+    pj_ssize_t status = -1;
+    int pending_op = 0;
+    pj_str_t s;
+    pj_status_t rc;
+
+    // Create pool.
+    pool = pj_pool_create(mem, NULL, POOL_SIZE, 4000, NULL);
+
+    // Create I/O Queue.
+    rc = pj_ioqueue_create(pool, PJ_IOQUEUE_MAX_HANDLES, &ioque);
+    if (!ioque) {
+	status=-20; goto on_error;
+    }
+
+    // Create client socket
+    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &csock1);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...ERROR in pj_sock_socket()", rc);
+	status=-1; goto on_error;
+    }
+
+    // Register client socket.
+    rc = pj_ioqueue_register_sock(pool, ioque, csock1, NULL, 
+                                  &test_cb, &ckey1);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...ERROR in pj_ioqueue_register_sock()", rc);
+	status=-23; goto on_error;
+    }
+
+    // Initialize remote address.
+    pj_sockaddr_in_init(&addr, pj_cstr(&s, "127.0.0.1"), NON_EXISTANT_PORT);
+
+    // Client socket connect()
+    status = pj_ioqueue_connect(ckey1, &addr, sizeof(addr));
+    if (status==PJ_SUCCESS) {
+	// unexpectedly success!
+	status = -30;
+	goto on_error;
+    }
+    if (status != PJ_EPENDING) {
+	// success
+    } else {
+	++pending_op;
+    }
+
+    callback_connect_status = -2;
+    callback_connect_key = NULL;
+
+    // Poll until we've got result
+    while (pending_op) {
+	pj_time_val timeout = {1, 0};
+
+	status=pj_ioqueue_poll(ioque, &timeout);
+	if (status > 0) {
+            if (callback_connect_key==ckey1) {
+		if (callback_connect_status == 0) {
+		    // unexpectedly connected!
+		    status = -50;
+		    goto on_error;
+		}
+	    }
+
+	    if (status > pending_op) {
+		PJ_LOG(3,(THIS_FILE,
+			  "...error: pj_ioqueue_poll() returned %d "
+			  "(only expecting %d)",
+			  status, pending_op));
+		return -552;
+	    }
+
+	    pending_op -= status;
+	    if (pending_op == 0) {
+		status = 0;
+	    }
+	}
+    }
+
+    // There's no pending operation.
+    // When we poll the ioqueue, there must not be events.
+    if (pending_op == 0) {
+        pj_time_val timeout = {1, 0};
+        status = pj_ioqueue_poll(ioque, &timeout);
+        if (status != 0) {
+            status=-60; goto on_error;
+        }
+    }
+
+    // Success
+    status = 0;
+
+on_error:
+    if (csock1 != PJ_INVALID_SOCKET)
+	pj_sock_close(csock1);
+    if (ioque != NULL)
+	pj_ioqueue_destroy(ioque);
+    pj_pool_release(pool);
+    return status;
+}
+
+
+/*
+ * Repeated connect/accept on the same listener socket.
+ */
+static int compliance_test_2(void)
+{
+    enum { MAX_PAIR = 4, TEST_LOOP = 2 };
+
+    struct listener
+    {
+	pj_sock_t	     sock;
+	pj_ioqueue_key_t    *key;
+	pj_sockaddr_in	     addr;
+	int		     addr_len;
+    } listener;
+
+    struct server
+    {
+	pj_sock_t	     sock;
+	pj_ioqueue_key_t    *key;
+	pj_sockaddr_in	     local_addr;
+	pj_sockaddr_in	     rem_addr;
+	int		     rem_addr_len;
+	pj_ioqueue_op_key_t  accept_op;
+    } server[MAX_PAIR];
+
+    struct client
+    {
+	pj_sock_t	     sock;
+	pj_ioqueue_key_t    *key;
+    } client[MAX_PAIR];
+
+    pj_pool_t *pool = NULL;
+    char *send_buf, *recv_buf;
+    pj_ioqueue_t *ioque = NULL;
+    int i, bufsize = BUF_MIN_SIZE;
+    pj_ssize_t status;
+    int test_loop, pending_op = 0;
+    pj_timestamp t_elapsed;
+    pj_str_t s;
+    pj_status_t rc;
+
+    // Create pool.
+    pool = pj_pool_create(mem, NULL, POOL_SIZE, 4000, NULL);
+
+
+    // Create I/O Queue.
+    rc = pj_ioqueue_create(pool, PJ_IOQUEUE_MAX_HANDLES, &ioque);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...ERROR in pj_ioqueue_create()", rc);
+	return -10;
+    }
+
+
+    // Allocate buffers for send and receive.
+    send_buf = (char*)pj_pool_alloc(pool, bufsize);
+    recv_buf = (char*)pj_pool_alloc(pool, bufsize);
+
+    // Create listener socket
+    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &listener.sock);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...error creating socket", rc);
+        status=-20; goto on_error;
+    }
+
+    // Bind listener socket.
+    pj_sockaddr_in_init(&listener.addr, 0, 0);
+    if ((rc=pj_sock_bind(listener.sock, &listener.addr, sizeof(listener.addr))) != 0 ) {
+        app_perror("...bind error", rc);
+	status=-30; goto on_error;
+    }
+
+    // Get listener address.
+    listener.addr_len = sizeof(listener.addr);
+    rc = pj_sock_getsockname(listener.sock, &listener.addr, &listener.addr_len);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...ERROR in pj_sock_getsockname()", rc);
+	status=-40; goto on_error;
+    }
+    listener.addr.sin_addr = pj_inet_addr(pj_cstr(&s, "127.0.0.1"));
+
+
+    // Register listener socket.
+    rc = pj_ioqueue_register_sock(pool, ioque, listener.sock, NULL, &test_cb, 
+				  &listener.key);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...ERROR", rc);
+	status=-50; goto on_error;
+    }
+
+
+    // Listener socket listen().
+    if (pj_sock_listen(listener.sock, 5)) {
+        app_perror("...ERROR in pj_sock_listen()", rc);
+	status=-60; goto on_error;
+    }
+
+
+    for (test_loop=0; test_loop < TEST_LOOP; ++test_loop) {
+	// Client connect and server accept.
+	for (i=0; i<MAX_PAIR; ++i) {
+	    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &client[i].sock);
+	    if (rc != PJ_SUCCESS) {
+		app_perror("...error creating socket", rc);
+		status=-70; goto on_error;
+	    }
+
+	    rc = pj_ioqueue_register_sock(pool, ioque, client[i].sock, NULL, 
+					  &test_cb, &client[i].key);
+	    if (rc != PJ_SUCCESS) {
+		app_perror("...error ", rc);
+		status=-80; goto on_error;
+	    }
+
+	    // Server socket accept()
+	    pj_ioqueue_op_key_init(&server[i].accept_op, 
+				   sizeof(server[i].accept_op));
+	    server[i].rem_addr_len = sizeof(pj_sockaddr_in);
+	    status = pj_ioqueue_accept(listener.key, &server[i].accept_op, 
+				       &server[i].sock, &server[i].local_addr, 
+				       &server[i].rem_addr, 
+				       &server[i].rem_addr_len);
+	    if (status!=PJ_SUCCESS && status != PJ_EPENDING) {
+		app_perror("...ERROR in pj_ioqueue_accept()", rc);
+		status=-90; goto on_error;
+	    }
+	    if (status==PJ_EPENDING) {
+		++pending_op;
+	    }
+
+
+	    // Client socket connect()
+	    status = pj_ioqueue_connect(client[i].key, &listener.addr, 
+					sizeof(listener.addr));
+	    if (status!=PJ_SUCCESS && status != PJ_EPENDING) {
+		app_perror("...ERROR in pj_ioqueue_connect()", rc);
+		status=-100; goto on_error;
+	    }
+	    if (status==PJ_EPENDING) {
+		++pending_op;
+	    }
+
+	}
+
+
+	// Poll until all connected
+	while (pending_op) {
+	    pj_time_val timeout = {1, 0};
+
+	    status=pj_ioqueue_poll(ioque, &timeout);
+	    if (status > 0) {
+		if (status > pending_op) {
+		    PJ_LOG(3,(THIS_FILE,
+			      "...error: pj_ioqueue_poll() returned %d "
+			      "(only expecting %d)",
+			      status, pending_op));
+		    return -110;
+		}
+		pending_op -= status;
+
+		if (pending_op == 0) {
+		    status = 0;
+		}
+	    }
+	}
+
+	// There's no pending operation.
+	// When we poll the ioqueue, there must not be events.
+	if (pending_op == 0) {
+	    pj_time_val timeout = {1, 0};
+	    status = pj_ioqueue_poll(ioque, &timeout);
+	    if (status != 0) {
+		status=-120; goto on_error;
+	    }
+	}
+
+	for (i=0; i<MAX_PAIR; ++i) {
+	    // Check server socket.
+	    if (server[i].sock == PJ_INVALID_SOCKET) {
+		status = -130;
+		app_perror("...accept() error", pj_get_os_error());
+		goto on_error;
+	    }
+
+	    // Check addresses
+	    if (server[i].local_addr.sin_family != PJ_AF_INET ||
+		server[i].local_addr.sin_addr.s_addr == 0 ||
+		server[i].local_addr.sin_port == 0)
+	    {
+		app_perror("...ERROR address not set", rc);
+		status = -140;
+		goto on_error;
+	    }
+
+	    if (server[i].rem_addr.sin_family != PJ_AF_INET ||
+		server[i].rem_addr.sin_addr.s_addr == 0 ||
+		server[i].rem_addr.sin_port == 0)
+	    {
+		app_perror("...ERROR address not set", rc);
+		status = -150;
+		goto on_error;
+	    }
+
+
+	    // Register newly accepted socket.
+	    rc = pj_ioqueue_register_sock(pool, ioque, server[i].sock, NULL,
+					  &test_cb, &server[i].key);
+	    if (rc != PJ_SUCCESS) {
+		app_perror("...ERROR in pj_ioqueue_register_sock", rc);
+		status = -160;
+		goto on_error;
+	    }
+
+	    // Test send and receive.
+	    t_elapsed.u32.lo = 0;
+	    status = send_recv_test(ioque, server[i].key, client[i].key, 
+				    send_buf, recv_buf, bufsize, &t_elapsed);
+	    if (status != 0) {
+		goto on_error;
+	    }
+	}
+
+	// Success
+	status = 0;
+
+	for (i=0; i<MAX_PAIR; ++i) {
+	    if (server[i].key != NULL) {
+		pj_ioqueue_unregister(server[i].key);
+		server[i].key = NULL;
+		server[i].sock = PJ_INVALID_SOCKET;
+	    } else if (server[i].sock != PJ_INVALID_SOCKET) {
+		pj_sock_close(server[i].sock);
+		server[i].sock = PJ_INVALID_SOCKET;
+	    }
+
+	    if (client[i].key != NULL) {
+		pj_ioqueue_unregister(client[i].key);
+		client[i].key = NULL;
+		client[i].sock = PJ_INVALID_SOCKET;
+	    } else if (client[i].sock != PJ_INVALID_SOCKET) {
+		pj_sock_close(client[i].sock);
+		client[i].sock = PJ_INVALID_SOCKET;
+	    }
+	}
+    }
+
+    status = 0;
+
+on_error:
+    for (i=0; i<MAX_PAIR; ++i) {
+	if (server[i].key != NULL) {
+	    pj_ioqueue_unregister(server[i].key);
+	    server[i].key = NULL;
+	    server[i].sock = PJ_INVALID_SOCKET;
+	} else if (server[i].sock != PJ_INVALID_SOCKET) {
+	    pj_sock_close(server[i].sock);
+	    server[i].sock = PJ_INVALID_SOCKET;
+	}
+
+	if (client[i].key != NULL) {
+	    pj_ioqueue_unregister(client[i].key);
+	    client[i].key = NULL;
+	    server[i].sock = PJ_INVALID_SOCKET;
+	} else if (client[i].sock != PJ_INVALID_SOCKET) {
+	    pj_sock_close(client[i].sock);
+	    client[i].sock = PJ_INVALID_SOCKET;
+	}
+    }
+
+    if (listener.key) {
+	pj_ioqueue_unregister(listener.key);
+	listener.key = NULL;
+    } else if (listener.sock != PJ_INVALID_SOCKET) {
+	pj_sock_close(listener.sock);
+	listener.sock = PJ_INVALID_SOCKET;
+    }
+
+    if (ioque != NULL)
+	pj_ioqueue_destroy(ioque);
+    pj_pool_release(pool);
+    return status;
+
+}
+
+
+int tcp_ioqueue_test()
+{
+    int status;
+
+    PJ_LOG(3, (THIS_FILE, "..%s compliance test 0 (success scenario)",
+	       pj_ioqueue_name()));
+    if ((status=compliance_test_0()) != 0) {
+	PJ_LOG(1, (THIS_FILE, "....FAILED (status=%d)\n", status));
+	return status;
+    }
+    PJ_LOG(3, (THIS_FILE, "..%s compliance test 1 (failed scenario)",
+               pj_ioqueue_name()));
+    if ((status=compliance_test_1()) != 0) {
+	PJ_LOG(1, (THIS_FILE, "....FAILED (status=%d)\n", status));
+	return status;
+    }
+
+    PJ_LOG(3, (THIS_FILE, "..%s compliance test 2 (repeated accept)",
+               pj_ioqueue_name()));
+    if ((status=compliance_test_2()) != 0) {
+	PJ_LOG(1, (THIS_FILE, "....FAILED (status=%d)\n", status));
+	return status;
+    }
+
+    return 0;
+}
+
+#endif	/* PJ_HAS_TCP */
+
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_uiq_tcp;
+#endif	/* INCLUDE_TCP_IOQUEUE_TEST */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/ioq_udp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/ioq_udp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/ioq_udp.c	(revision 1163)
@@ -0,0 +1,878 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+
+
+/**
+ * \page page_pjlib_ioqueue_udp_test Test: I/O Queue (UDP)
+ *
+ * This file provides implementation to test the
+ * functionality of the I/O queue when UDP socket is used.
+ *
+ *
+ * This file is <b>pjlib-test/ioq_udp.c</b>
+ *
+ * \include pjlib-test/ioq_udp.c
+ */
+
+
+#if INCLUDE_UDP_IOQUEUE_TEST
+
+#include <pjlib.h>
+
+#include <pj/compat/socket.h>
+
+#define THIS_FILE	    "test_udp"
+#define PORT		    51233
+#define LOOP		    2
+///#define LOOP		    2
+#define BUF_MIN_SIZE	    32
+#define BUF_MAX_SIZE	    2048
+#define SOCK_INACTIVE_MIN   (1)
+#define SOCK_INACTIVE_MAX   (PJ_IOQUEUE_MAX_HANDLES - 2)
+#define POOL_SIZE	    (2*BUF_MAX_SIZE + SOCK_INACTIVE_MAX*128 + 2048)
+
+#undef TRACE_
+#define TRACE_(msg)	    PJ_LOG(3,(THIS_FILE,"....." msg))
+
+#if 0
+#  define TRACE__(args)	    PJ_LOG(3,args)
+#else
+#  define TRACE__(args)
+#endif
+
+
+static pj_ssize_t            callback_read_size,
+                             callback_write_size,
+                             callback_accept_status,
+                             callback_connect_status;
+static pj_ioqueue_key_t     *callback_read_key,
+                            *callback_write_key,
+                            *callback_accept_key,
+                            *callback_connect_key;
+static pj_ioqueue_op_key_t  *callback_read_op,
+                            *callback_write_op,
+                            *callback_accept_op;
+
+static void on_ioqueue_read(pj_ioqueue_key_t *key, 
+                            pj_ioqueue_op_key_t *op_key,
+                            pj_ssize_t bytes_read)
+{
+    callback_read_key = key;
+    callback_read_op = op_key;
+    callback_read_size = bytes_read;
+    TRACE__((THIS_FILE, "     callback_read_key = %p, bytes=%d", 
+	     key, bytes_read));
+}
+
+static void on_ioqueue_write(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key,
+                             pj_ssize_t bytes_written)
+{
+    callback_write_key = key;
+    callback_write_op = op_key;
+    callback_write_size = bytes_written;
+}
+
+static void on_ioqueue_accept(pj_ioqueue_key_t *key, 
+                              pj_ioqueue_op_key_t *op_key,
+                              pj_sock_t sock, int status)
+{
+    PJ_UNUSED_ARG(sock);
+    callback_accept_key = key;
+    callback_accept_op = op_key;
+    callback_accept_status = status;
+}
+
+static void on_ioqueue_connect(pj_ioqueue_key_t *key, int status)
+{
+    callback_connect_key = key;
+    callback_connect_status = status;
+}
+
+static pj_ioqueue_callback test_cb = 
+{
+    &on_ioqueue_read,
+    &on_ioqueue_write,
+    &on_ioqueue_accept,
+    &on_ioqueue_connect,
+};
+
+#ifdef PJ_WIN32
+#  define S_ADDR S_un.S_addr
+#else
+#  define S_ADDR s_addr
+#endif
+
+/*
+ * compliance_test()
+ * To test that the basic IOQueue functionality works. It will just exchange
+ * data between two sockets.
+ */ 
+static int compliance_test(void)
+{
+    pj_sock_t ssock=-1, csock=-1;
+    pj_sockaddr_in addr, dst_addr;
+    int addrlen;
+    pj_pool_t *pool = NULL;
+    char *send_buf, *recv_buf;
+    pj_ioqueue_t *ioque = NULL;
+    pj_ioqueue_key_t *skey, *ckey;
+    pj_ioqueue_op_key_t read_op, write_op;
+    int bufsize = BUF_MIN_SIZE;
+    pj_ssize_t bytes, status = -1;
+    pj_str_t temp;
+    pj_bool_t send_pending, recv_pending;
+    pj_status_t rc;
+
+    pj_set_os_error(PJ_SUCCESS);
+
+    // Create pool.
+    pool = pj_pool_create(mem, NULL, POOL_SIZE, 4000, NULL);
+
+    // Allocate buffers for send and receive.
+    send_buf = (char*)pj_pool_alloc(pool, bufsize);
+    recv_buf = (char*)pj_pool_alloc(pool, bufsize);
+
+    // Allocate sockets for sending and receiving.
+    TRACE_("creating sockets...");
+    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &ssock);
+    if (rc==PJ_SUCCESS)
+        rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &csock);
+    else
+        csock = PJ_INVALID_SOCKET;
+    if (rc != PJ_SUCCESS) {
+        app_perror("...ERROR in pj_sock_socket()", rc);
+	status=-1; goto on_error;
+    }
+
+    // Bind server socket.
+    TRACE_("bind socket...");
+    pj_bzero(&addr, sizeof(addr));
+    addr.sin_family = PJ_AF_INET;
+    addr.sin_port = pj_htons(PORT);
+    if (pj_sock_bind(ssock, &addr, sizeof(addr))) {
+	status=-10; goto on_error;
+    }
+
+    // Create I/O Queue.
+    TRACE_("create ioqueue...");
+    rc = pj_ioqueue_create(pool, PJ_IOQUEUE_MAX_HANDLES, &ioque);
+    if (rc != PJ_SUCCESS) {
+	status=-20; goto on_error;
+    }
+
+    // Register server and client socket.
+    // We put this after inactivity socket, hopefully this can represent the
+    // worst waiting time.
+    TRACE_("registering first sockets...");
+    rc = pj_ioqueue_register_sock(pool, ioque, ssock, NULL, 
+			          &test_cb, &skey);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error(10): ioqueue_register error", rc);
+	status=-25; goto on_error;
+    }
+    TRACE_("registering second sockets...");
+    rc = pj_ioqueue_register_sock( pool, ioque, csock, NULL, 
+			           &test_cb, &ckey);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error(11): ioqueue_register error", rc);
+	status=-26; goto on_error;
+    }
+
+    // Randomize send_buf.
+    pj_create_random_string(send_buf, bufsize);
+
+    // Register reading from ioqueue.
+    TRACE_("start recvfrom...");
+    pj_bzero(&addr, sizeof(addr));
+    addrlen = sizeof(addr);
+    bytes = bufsize;
+    rc = pj_ioqueue_recvfrom(skey, &read_op, recv_buf, &bytes, 0,
+			     &addr, &addrlen);
+    if (rc != PJ_SUCCESS && rc != PJ_EPENDING) {
+        app_perror("...error: pj_ioqueue_recvfrom", rc);
+	status=-28; goto on_error;
+    } else if (rc == PJ_EPENDING) {
+	recv_pending = 1;
+	PJ_LOG(3, (THIS_FILE, 
+		   "......ok: recvfrom returned pending"));
+    } else {
+	PJ_LOG(3, (THIS_FILE, 
+		   "......error: recvfrom returned immediate ok!"));
+	status=-29; goto on_error;
+    }
+
+    // Set destination address to send the packet.
+    TRACE_("set destination address...");
+    temp = pj_str("127.0.0.1");
+    if ((rc=pj_sockaddr_in_init(&dst_addr, &temp, PORT)) != 0) {
+	app_perror("...error: unable to resolve 127.0.0.1", rc);
+	status=-290; goto on_error;
+    }
+
+    // Write must return the number of bytes.
+    TRACE_("start sendto...");
+    bytes = bufsize;
+    rc = pj_ioqueue_sendto(ckey, &write_op, send_buf, &bytes, 0, &dst_addr, 
+			   sizeof(dst_addr));
+    if (rc != PJ_SUCCESS && rc != PJ_EPENDING) {
+        app_perror("...error: pj_ioqueue_sendto", rc);
+	status=-30; goto on_error;
+    } else if (rc == PJ_EPENDING) {
+	send_pending = 1;
+	PJ_LOG(3, (THIS_FILE, 
+		   "......ok: sendto returned pending"));
+    } else {
+	send_pending = 0;
+	PJ_LOG(3, (THIS_FILE, 
+		   "......ok: sendto returned immediate success"));
+    }
+
+    // reset callback variables.
+    callback_read_size = callback_write_size = 0;
+    callback_accept_status = callback_connect_status = -2;
+    callback_read_key = callback_write_key = 
+        callback_accept_key = callback_connect_key = NULL;
+    callback_read_op = callback_write_op = NULL;
+
+    // Poll if pending.
+    while (send_pending || recv_pending) {
+	int rc;
+	pj_time_val timeout = { 5, 0 };
+
+	TRACE_("poll...");
+	rc = pj_ioqueue_poll(ioque, &timeout);
+
+	if (rc == 0) {
+	    PJ_LOG(1,(THIS_FILE, "...ERROR: timed out..."));
+	    status=-45; goto on_error;
+        } else if (rc < 0) {
+            app_perror("...ERROR in ioqueue_poll()", -rc);
+	    status=-50; goto on_error;
+	}
+
+	if (callback_read_key != NULL) {
+            if (callback_read_size != bufsize) {
+                status=-61; goto on_error;
+            }
+            if (callback_read_key != skey) {
+                status=-65; goto on_error;
+            }
+            if (callback_read_op != &read_op) {
+                status=-66; goto on_error;
+            }
+
+	    if (pj_memcmp(send_buf, recv_buf, bufsize) != 0) {
+		status=-67; goto on_error;
+	    }
+	    if (addrlen != sizeof(pj_sockaddr_in)) {
+		status=-68; goto on_error;
+	    }
+	    if (addr.sin_family != PJ_AF_INET) {
+		status=-69; goto on_error;
+	    }
+
+
+	    recv_pending = 0;
+	} 
+
+        if (callback_write_key != NULL) {
+            if (callback_write_size != bufsize) {
+                status=-73; goto on_error;
+            }
+            if (callback_write_key != ckey) {
+                status=-75; goto on_error;
+            }
+            if (callback_write_op != &write_op) {
+                status=-76; goto on_error;
+            }
+
+            send_pending = 0;
+	}
+    } 
+    
+    // Success
+    status = 0;
+
+on_error:
+    if (ssock)
+	pj_sock_close(ssock);
+    if (csock)
+	pj_sock_close(csock);
+    if (ioque != NULL)
+	pj_ioqueue_destroy(ioque);
+    pj_pool_release(pool);
+    return status;
+
+}
+
+
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read)
+{
+    unsigned *p_packet_cnt = pj_ioqueue_get_user_data(key);
+
+    PJ_UNUSED_ARG(op_key);
+    PJ_UNUSED_ARG(bytes_read);
+
+    (*p_packet_cnt)++;
+}
+
+/*
+ * unregister_test()
+ * Check if callback is still called after socket has been unregistered or 
+ * closed.
+ */ 
+static int unregister_test(void)
+{
+    enum { RPORT = 50000, SPORT = 50001 };
+    pj_pool_t *pool;
+    pj_ioqueue_t *ioqueue;
+    pj_sock_t ssock;
+    pj_sock_t rsock;
+    int addrlen;
+    pj_sockaddr_in addr;
+    pj_ioqueue_key_t *key;
+    pj_ioqueue_op_key_t opkey;
+    pj_ioqueue_callback cb;
+    unsigned packet_cnt;
+    char sendbuf[10], recvbuf[10];
+    pj_ssize_t bytes;
+    pj_time_val timeout;
+    pj_status_t status;
+
+    pool = pj_pool_create(mem, "test", 4000, 4000, NULL);
+    if (!pool) {
+	app_perror("Unable to create pool", PJ_ENOMEM);
+	return -100;
+    }
+
+    status = pj_ioqueue_create(pool, 16, &ioqueue);
+    if (status != PJ_SUCCESS) {
+	app_perror("Error creating ioqueue", status);
+	return -110;
+    }
+
+    /* Create sender socket */
+    status = app_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, SPORT, &ssock);
+    if (status != PJ_SUCCESS) {
+	app_perror("Error initializing socket", status);
+	return -120;
+    }
+
+    /* Create receiver socket. */
+    status = app_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, RPORT, &rsock);
+    if (status != PJ_SUCCESS) {
+	app_perror("Error initializing socket", status);
+	return -130;
+    }
+
+    /* Register rsock to ioqueue. */
+    pj_bzero(&cb, sizeof(cb));
+    cb.on_read_complete = &on_read_complete;
+    packet_cnt = 0;
+    status = pj_ioqueue_register_sock(pool, ioqueue, rsock, &packet_cnt,
+				      &cb, &key);
+    if (status != PJ_SUCCESS) {
+	app_perror("Error registering to ioqueue", status);
+	return -140;
+    }
+
+    /* Init operation key. */
+    pj_ioqueue_op_key_init(&opkey, sizeof(opkey));
+
+    /* Start reading. */
+    bytes = sizeof(recvbuf);
+    status = pj_ioqueue_recv( key, &opkey, recvbuf, &bytes, 0);
+    if (status != PJ_EPENDING) {
+	app_perror("Expecting PJ_EPENDING, but got this", status);
+	return -150;
+    }
+
+    /* Init destination address. */
+    addrlen = sizeof(addr);
+    status = pj_sock_getsockname(rsock, &addr, &addrlen);
+    if (status != PJ_SUCCESS) {
+	app_perror("getsockname error", status);
+	return -160;
+    }
+
+    /* Override address with 127.0.0.1, since getsockname will return
+     * zero in the address field.
+     */
+    addr.sin_addr = pj_inet_addr2("127.0.0.1");
+
+    /* Init buffer to send */
+    pj_ansi_strcpy(sendbuf, "Hello0123");
+
+    /* Send one packet. */
+    bytes = sizeof(sendbuf);
+    status = pj_sock_sendto(ssock, sendbuf, &bytes, 0,
+			    &addr, sizeof(addr));
+
+    if (status != PJ_SUCCESS) {
+	app_perror("sendto error", status);
+	return -170;
+    }
+
+    /* Check if packet is received. */
+    timeout.sec = 1; timeout.msec = 0;
+    pj_ioqueue_poll(ioqueue, &timeout);
+
+    if (packet_cnt != 1) {
+	return -180;
+    }
+
+    /* Just to make sure things are settled.. */
+    pj_thread_sleep(100);
+
+    /* Start reading again. */
+    bytes = sizeof(recvbuf);
+    status = pj_ioqueue_recv( key, &opkey, recvbuf, &bytes, 0);
+    if (status != PJ_EPENDING) {
+	app_perror("Expecting PJ_EPENDING, but got this", status);
+	return -190;
+    }
+
+    /* Reset packet counter */
+    packet_cnt = 0;
+
+    /* Send one packet. */
+    bytes = sizeof(sendbuf);
+    status = pj_sock_sendto(ssock, sendbuf, &bytes, 0,
+			    &addr, sizeof(addr));
+
+    if (status != PJ_SUCCESS) {
+	app_perror("sendto error", status);
+	return -200;
+    }
+
+    /* Now unregister and close socket. */
+    pj_ioqueue_unregister(key);
+
+    /* Poll ioqueue. */
+    timeout.sec = 1; timeout.msec = 0;
+    pj_ioqueue_poll(ioqueue, &timeout);
+
+    /* Must NOT receive any packets after socket is closed! */
+    if (packet_cnt > 0) {
+	PJ_LOG(3,(THIS_FILE, "....errror: not expecting to receive packet "
+			     "after socket has been closed"));
+	return -210;
+    }
+
+    /* Success */
+    pj_sock_close(ssock);
+    pj_ioqueue_destroy(ioqueue);
+
+    pj_pool_release(pool);
+
+    return 0;
+}
+
+
+/*
+ * Testing with many handles.
+ * This will just test registering PJ_IOQUEUE_MAX_HANDLES count
+ * of sockets to the ioqueue.
+ */
+static int many_handles_test(void)
+{
+    enum { MAX = PJ_IOQUEUE_MAX_HANDLES };
+    pj_pool_t *pool;
+    pj_ioqueue_t *ioqueue;
+    pj_sock_t *sock;
+    pj_ioqueue_key_t **key;
+    pj_status_t rc;
+    int count, i; /* must be signed */
+
+    PJ_LOG(3,(THIS_FILE,"...testing with so many handles"));
+
+    pool = pj_pool_create(mem, NULL, 4000, 4000, NULL);
+    if (!pool)
+	return PJ_ENOMEM;
+
+    key = pj_pool_alloc(pool, MAX*sizeof(pj_ioqueue_key_t*));
+    sock = pj_pool_alloc(pool, MAX*sizeof(pj_sock_t));
+    
+    /* Create IOQueue */
+    rc = pj_ioqueue_create(pool, MAX, &ioqueue);
+    if (rc != PJ_SUCCESS || ioqueue == NULL) {
+	app_perror("...error in pj_ioqueue_create", rc);
+	return -10;
+    }
+
+    /* Register as many sockets. */
+    for (count=0; count<MAX; ++count) {
+	sock[count] = PJ_INVALID_SOCKET;
+	rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &sock[count]);
+	if (rc != PJ_SUCCESS || sock[count] == PJ_INVALID_SOCKET) {
+	    PJ_LOG(3,(THIS_FILE, "....unable to create %d-th socket, rc=%d", 
+				 count, rc));
+	    break;
+	}
+	key[count] = NULL;
+	rc = pj_ioqueue_register_sock(pool, ioqueue, sock[count],
+				      NULL, &test_cb, &key[count]);
+	if (rc != PJ_SUCCESS || key[count] == NULL) {
+	    PJ_LOG(3,(THIS_FILE, "....unable to register %d-th socket, rc=%d", 
+				 count, rc));
+	    return -30;
+	}
+    }
+
+    /* Test complete. */
+
+    /* Now deregister and close all handles. */ 
+
+    /* NOTE for RTEMS:
+     *  It seems that the order of close(sock) is pretty important here.
+     *  If we close the sockets with the same order as when they were created,
+     *  RTEMS doesn't seem to reuse the sockets, thus next socket created
+     *  will have descriptor higher than the last socket created.
+     *  If we close the sockets in the reverse order, then the descriptor will
+     *  get reused.
+     *  This used to cause problem with select ioqueue, since the ioqueue
+     *  always gives FD_SETSIZE for the first select() argument. This ioqueue
+     *  behavior can be changed with setting PJ_SELECT_NEEDS_NFDS macro.
+     */
+    for (i=count-1; i>=0; --i) {
+    ///for (i=0; i<count; ++i) {
+	rc = pj_ioqueue_unregister(key[i]);
+	if (rc != PJ_SUCCESS) {
+	    app_perror("...error in pj_ioqueue_unregister", rc);
+	}
+    }
+
+    rc = pj_ioqueue_destroy(ioqueue);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error in pj_ioqueue_destroy", rc);
+    }
+    
+    pj_pool_release(pool);
+
+    PJ_LOG(3,(THIS_FILE,"....many_handles_test() ok"));
+
+    return 0;
+}
+
+/*
+ * Multi-operation test.
+ */
+
+/*
+ * Benchmarking IOQueue
+ */
+static int bench_test(int bufsize, int inactive_sock_count)
+{
+    pj_sock_t ssock=-1, csock=-1;
+    pj_sockaddr_in addr;
+    pj_pool_t *pool = NULL;
+    pj_sock_t *inactive_sock=NULL;
+    pj_ioqueue_op_key_t *inactive_read_op;
+    char *send_buf, *recv_buf;
+    pj_ioqueue_t *ioque = NULL;
+    pj_ioqueue_key_t *skey, *ckey, *key;
+    pj_timestamp t1, t2, t_elapsed;
+    int rc=0, i;    /* i must be signed */
+    pj_str_t temp;
+    char errbuf[PJ_ERR_MSG_SIZE];
+
+    TRACE__((THIS_FILE, "   bench test %d", inactive_sock_count));
+
+    // Create pool.
+    pool = pj_pool_create(mem, NULL, POOL_SIZE, 4000, NULL);
+
+    // Allocate buffers for send and receive.
+    send_buf = (char*)pj_pool_alloc(pool, bufsize);
+    recv_buf = (char*)pj_pool_alloc(pool, bufsize);
+
+    // Allocate sockets for sending and receiving.
+    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &ssock);
+    if (rc == PJ_SUCCESS) {
+        rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &csock);
+    } else
+        csock = PJ_INVALID_SOCKET;
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error: pj_sock_socket()", rc);
+	goto on_error;
+    }
+
+    // Bind server socket.
+    pj_bzero(&addr, sizeof(addr));
+    addr.sin_family = PJ_AF_INET;
+    addr.sin_port = pj_htons(PORT);
+    if (pj_sock_bind(ssock, &addr, sizeof(addr)))
+	goto on_error;
+
+    pj_assert(inactive_sock_count+2 <= PJ_IOQUEUE_MAX_HANDLES);
+
+    // Create I/O Queue.
+    rc = pj_ioqueue_create(pool, PJ_IOQUEUE_MAX_HANDLES, &ioque);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error: pj_ioqueue_create()", rc);
+	goto on_error;
+    }
+
+    // Allocate inactive sockets, and bind them to some arbitrary address.
+    // Then register them to the I/O queue, and start a read operation.
+    inactive_sock = (pj_sock_t*)pj_pool_alloc(pool, 
+				    inactive_sock_count*sizeof(pj_sock_t));
+    inactive_read_op = (pj_ioqueue_op_key_t*)pj_pool_alloc(pool,
+                              inactive_sock_count*sizeof(pj_ioqueue_op_key_t));
+    pj_bzero(&addr, sizeof(addr));
+    addr.sin_family = PJ_AF_INET;
+    for (i=0; i<inactive_sock_count; ++i) {
+        pj_ssize_t bytes;
+
+	rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &inactive_sock[i]);
+	if (rc != PJ_SUCCESS || inactive_sock[i] < 0) {
+	    app_perror("...error: pj_sock_socket()", rc);
+	    goto on_error;
+	}
+	if ((rc=pj_sock_bind(inactive_sock[i], &addr, sizeof(addr))) != 0) {
+	    pj_sock_close(inactive_sock[i]);
+	    inactive_sock[i] = PJ_INVALID_SOCKET;
+	    app_perror("...error: pj_sock_bind()", rc);
+	    goto on_error;
+	}
+	rc = pj_ioqueue_register_sock(pool, ioque, inactive_sock[i], 
+			              NULL, &test_cb, &key);
+	if (rc != PJ_SUCCESS) {
+	    pj_sock_close(inactive_sock[i]);
+	    inactive_sock[i] = PJ_INVALID_SOCKET;
+	    app_perror("...error(1): pj_ioqueue_register_sock()", rc);
+	    PJ_LOG(3,(THIS_FILE, "....i=%d", i));
+	    goto on_error;
+	}
+        bytes = bufsize;
+	rc = pj_ioqueue_recv(key, &inactive_read_op[i], recv_buf, &bytes, 0);
+	if (rc != PJ_EPENDING) {
+	    pj_sock_close(inactive_sock[i]);
+	    inactive_sock[i] = PJ_INVALID_SOCKET;
+	    app_perror("...error: pj_ioqueue_read()", rc);
+	    goto on_error;
+	}
+    }
+
+    // Register server and client socket.
+    // We put this after inactivity socket, hopefully this can represent the
+    // worst waiting time.
+    rc = pj_ioqueue_register_sock(pool, ioque, ssock, NULL, 
+			          &test_cb, &skey);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error(2): pj_ioqueue_register_sock()", rc);
+	goto on_error;
+    }
+
+    rc = pj_ioqueue_register_sock(pool, ioque, csock, NULL, 
+			          &test_cb, &ckey);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error(3): pj_ioqueue_register_sock()", rc);
+	goto on_error;
+    }
+
+    // Set destination address to send the packet.
+    pj_sockaddr_in_init(&addr, pj_cstr(&temp, "127.0.0.1"), PORT);
+
+    // Test loop.
+    t_elapsed.u64 = 0;
+    for (i=0; i<LOOP; ++i) {
+	pj_ssize_t bytes;
+        pj_ioqueue_op_key_t read_op, write_op;
+
+	// Randomize send buffer.
+	pj_create_random_string(send_buf, bufsize);
+
+	// Start reading on the server side.
+        bytes = bufsize;
+	rc = pj_ioqueue_recv(skey, &read_op, recv_buf, &bytes, 0);
+	if (rc != PJ_EPENDING) {
+	    app_perror("...error: pj_ioqueue_read()", rc);
+	    break;
+	}
+
+	// Starts send on the client side.
+        bytes = bufsize;
+	rc = pj_ioqueue_sendto(ckey, &write_op, send_buf, &bytes, 0,
+			       &addr, sizeof(addr));
+	if (rc != PJ_SUCCESS && rc != PJ_EPENDING) {
+	    app_perror("...error: pj_ioqueue_write()", rc);
+	    break;
+	}
+	if (rc == PJ_SUCCESS) {
+	    if (bytes < 0) {
+		app_perror("...error: pj_ioqueue_sendto()", -bytes);
+		break;
+	    }
+	}
+
+	// Begin time.
+	pj_get_timestamp(&t1);
+
+	// Poll the queue until we've got completion event in the server side.
+        callback_read_key = NULL;
+        callback_read_size = 0;
+	TRACE__((THIS_FILE, "     waiting for key = %p", skey));
+	do {
+	    pj_time_val timeout = { 1, 0 };
+	    rc = pj_ioqueue_poll(ioque, &timeout);
+	    TRACE__((THIS_FILE, "     poll rc=%d", rc));
+	} while (rc >= 0 && callback_read_key != skey);
+
+	// End time.
+	pj_get_timestamp(&t2);
+	t_elapsed.u64 += (t2.u64 - t1.u64);
+
+	if (rc < 0) {
+	    app_perror("   error: pj_ioqueue_poll", -rc);
+	    break;
+	}
+
+	// Compare recv buffer with send buffer.
+	if (callback_read_size != bufsize || 
+	    pj_memcmp(send_buf, recv_buf, bufsize)) 
+	{
+	    rc = -10;
+	    PJ_LOG(3,(THIS_FILE, "   error: size/buffer mismatch"));
+	    break;
+	}
+
+	// Poll until all events are exhausted, before we start the next loop.
+	do {
+	    pj_time_val timeout = { 0, 10 };
+	    rc = pj_ioqueue_poll(ioque, &timeout);
+	} while (rc>0);
+
+	rc = 0;
+    }
+
+    // Print results
+    if (rc == 0) {
+	pj_timestamp tzero;
+	pj_uint32_t usec_delay;
+
+	tzero.u32.hi = tzero.u32.lo = 0;
+	usec_delay = pj_elapsed_usec( &tzero, &t_elapsed);
+
+	PJ_LOG(3, (THIS_FILE, "...%10d %15d  % 9d", 
+	           bufsize, inactive_sock_count, usec_delay));
+
+    } else {
+	PJ_LOG(2, (THIS_FILE, "...ERROR rc=%d (buf:%d, fds:%d)", 
+			      rc, bufsize, inactive_sock_count+2));
+    }
+
+    // Cleaning up.
+    for (i=inactive_sock_count-1; i>=0; --i) {
+	pj_sock_close(inactive_sock[i]);
+    }
+
+    pj_sock_close(ssock);
+    pj_sock_close(csock);
+
+
+    pj_ioqueue_destroy(ioque);
+    pj_pool_release( pool);
+    return rc;
+
+on_error:
+    PJ_LOG(1,(THIS_FILE, "...ERROR: %s", 
+	      pj_strerror(pj_get_netos_error(), errbuf, sizeof(errbuf))));
+    if (ssock)
+	pj_sock_close(ssock);
+    if (csock)
+	pj_sock_close(csock);
+    for (i=0; i<inactive_sock_count && inactive_sock && 
+	      inactive_sock[i]!=PJ_INVALID_SOCKET; ++i) 
+    {
+	pj_sock_close(inactive_sock[i]);
+    }
+    if (ioque != NULL)
+	pj_ioqueue_destroy(ioque);
+    pj_pool_release( pool);
+    return -1;
+}
+
+int udp_ioqueue_test()
+{
+    int status;
+    int bufsize, sock_count;
+
+    //goto pass1;
+
+    PJ_LOG(3, (THIS_FILE, "...compliance test (%s)", pj_ioqueue_name()));
+    if ((status=compliance_test()) != 0) {
+	return status;
+    }
+    PJ_LOG(3, (THIS_FILE, "....compliance test ok"));
+
+
+    PJ_LOG(3, (THIS_FILE, "...unregister test (%s)", pj_ioqueue_name()));
+    if ((status=unregister_test()) != 0) {
+	return status;
+    }
+    PJ_LOG(3, (THIS_FILE, "....unregister test ok"));
+
+    if ((status=many_handles_test()) != 0) {
+	return status;
+    }
+    
+    //return 0;
+
+    PJ_LOG(4, (THIS_FILE, "...benchmarking different buffer size:"));
+    PJ_LOG(4, (THIS_FILE, "... note: buf=bytes sent, fds=# of fds, "
+			  "elapsed=in timer ticks"));
+
+//pass1:
+    PJ_LOG(3, (THIS_FILE, "...Benchmarking poll times for %s:", pj_ioqueue_name()));
+    PJ_LOG(3, (THIS_FILE, "...====================================="));
+    PJ_LOG(3, (THIS_FILE, "...Buf.size   #inactive-socks  Time/poll"));
+    PJ_LOG(3, (THIS_FILE, "... (bytes)                    (nanosec)"));
+    PJ_LOG(3, (THIS_FILE, "...====================================="));
+
+    //goto pass2;
+
+    for (bufsize=BUF_MIN_SIZE; bufsize <= BUF_MAX_SIZE; bufsize *= 2) {
+	if ((status=bench_test(bufsize, SOCK_INACTIVE_MIN)) != 0)
+	    return status;
+    }
+//pass2:
+    bufsize = 512;
+    for (sock_count=SOCK_INACTIVE_MIN+2; 
+	 sock_count<=SOCK_INACTIVE_MAX+2; 
+	 sock_count *= 2) 
+    {
+	//PJ_LOG(3,(THIS_FILE, "...testing with %d fds", sock_count));
+	if ((status=bench_test(bufsize, sock_count-2)) != 0)
+	    return status;
+    }
+    return 0;
+}
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_uiq_udp;
+#endif	/* INCLUDE_UDP_IOQUEUE_TEST */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/ioq_unreg.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/ioq_unreg.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/ioq_unreg.c	(revision 1163)
@@ -0,0 +1,361 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+
+#if INCLUDE_IOQUEUE_UNREG_TEST
+/*
+ * This tests the thread safety of ioqueue unregistration operation.
+ */
+
+#include <pj/errno.h>
+#include <pj/ioqueue.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/sock.h>
+#include <pj/compat/socket.h>
+#include <pj/string.h>
+
+
+#define THIS_FILE   "ioq_unreg.c"
+
+
+enum test_method
+{
+    UNREGISTER_IN_APP,
+    UNREGISTER_IN_CALLBACK,
+};
+
+static int thread_quitting;
+static enum test_method test_method;
+static pj_time_val time_to_unregister;
+
+struct sock_data
+{
+    pj_sock_t		 sock;
+    pj_sock_t		 csock;
+    pj_pool_t		*pool;
+    pj_ioqueue_key_t	*key;
+    pj_mutex_t		*mutex;
+    pj_ioqueue_op_key_t	*op_key;
+    char		*buffer;
+    pj_size_t		 bufsize;
+    pj_bool_t		 unregistered;
+    unsigned		 received;
+} sock_data;
+
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read)
+{
+    pj_ssize_t size;
+    char *sendbuf = "Hello world";
+    pj_status_t status;
+
+    if (sock_data.unregistered)
+	return;
+
+    pj_mutex_lock(sock_data.mutex);
+
+    if (sock_data.unregistered) {
+	/* No need to unlock. Mutex may have been destroyed */
+	return;
+    }
+
+    if (bytes_read < 0) {
+	if (-bytes_read != PJ_STATUS_FROM_OS(PJ_BLOCKING_ERROR_VAL))
+	    app_perror("ioqueue reported recv error", -bytes_read);
+    } else {
+	sock_data.received += bytes_read;
+    }
+
+    if (test_method == UNREGISTER_IN_CALLBACK) {
+	pj_time_val now;
+
+	pj_gettimeofday(&now);
+	if (PJ_TIME_VAL_GTE(now, time_to_unregister)) { 
+	    sock_data.unregistered = 1;
+	    pj_ioqueue_unregister(key);
+	    pj_mutex_destroy(sock_data.mutex);
+	    pj_pool_release(sock_data.pool);
+	    sock_data.pool = NULL;
+	    return;
+	}
+    }
+ 
+    do { 
+	size = sock_data.bufsize;
+	status = pj_ioqueue_recv(key, op_key, sock_data.buffer, &size, 0);
+	if (status != PJ_EPENDING && status != PJ_SUCCESS)
+	    app_perror("recv() error", status);
+
+    } while (status == PJ_SUCCESS);
+
+    pj_mutex_unlock(sock_data.mutex);
+
+    size = pj_ansi_strlen(sendbuf);
+    status = pj_sock_send(sock_data.csock, sendbuf, &size, 0);
+    if (status != PJ_SUCCESS)
+	app_perror("send() error", status);
+
+    size = pj_ansi_strlen(sendbuf);
+    status = pj_sock_send(sock_data.csock, sendbuf, &size, 0);
+    if (status != PJ_SUCCESS)
+	app_perror("send() error", status);
+
+} 
+
+static int worker_thread(void *arg)
+{
+    pj_ioqueue_t *ioqueue = arg;
+
+    while (!thread_quitting) {
+	pj_time_val timeout = { 0, 20 };
+	pj_ioqueue_poll(ioqueue, &timeout);
+    }
+
+    return 0;
+}
+
+/*
+ * Perform unregistration test.
+ *
+ * This will create ioqueue and register a server socket. Depending
+ * on the test method, either the callback or the main thread will
+ * unregister and destroy the server socket after some period of time.
+ */
+static int perform_unreg_test(pj_ioqueue_t *ioqueue,
+			      pj_pool_t *test_pool,
+			      const char *title, 
+			      pj_bool_t other_socket)
+{
+    enum { WORKER_CNT = 1, MSEC = 500, QUIT_MSEC = 500 };
+    int i;
+    pj_thread_t *thread[WORKER_CNT];
+    struct sock_data osd;
+    pj_ioqueue_callback callback;
+    pj_time_val end_time;
+    pj_status_t status;
+
+
+    /* Sometimes its important to have other sockets registered to
+     * the ioqueue, because when no sockets are registered, the ioqueue
+     * will return from the poll early.
+     */
+    if (other_socket) {
+	status = app_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, 56127, &osd.sock);
+	if (status != PJ_SUCCESS) {
+	    app_perror("Error creating other socket", status);
+	    return -12;
+	}
+
+	pj_bzero(&callback, sizeof(callback));
+	status = pj_ioqueue_register_sock(test_pool, ioqueue, osd.sock,
+					  NULL, &callback, &osd.key);
+	if (status != PJ_SUCCESS) {
+	    app_perror("Error registering other socket", status);
+	    return -13;
+	}
+
+    } else {
+	osd.key = NULL;
+	osd.sock = PJ_INVALID_SOCKET;
+    }
+
+    /* Init both time duration of testing */
+    thread_quitting = 0;
+    pj_gettimeofday(&time_to_unregister);
+    time_to_unregister.msec += MSEC;
+    pj_time_val_normalize(&time_to_unregister);
+
+    end_time = time_to_unregister;
+    end_time.msec += QUIT_MSEC;
+    pj_time_val_normalize(&end_time);
+
+    
+    /* Create polling thread */
+    for (i=0; i<WORKER_CNT; ++i) {
+	status = pj_thread_create(test_pool, "unregtest", &worker_thread,
+				   ioqueue, 0, 0, &thread[i]);
+	if (status != PJ_SUCCESS) {
+	    app_perror("Error creating thread", status);
+	    return -20;
+	}
+    }
+
+    /* Create pair of client/server sockets */
+    status = app_socketpair(PJ_AF_INET, PJ_SOCK_DGRAM, 0, 
+			    &sock_data.sock, &sock_data.csock);
+    if (status != PJ_SUCCESS) {
+	app_perror("app_socketpair error", status);
+	return -30;
+    }
+
+
+    /* Initialize test data */
+    sock_data.pool = pj_pool_create(mem, "sd", 1000, 1000, NULL);
+    sock_data.buffer = pj_pool_alloc(sock_data.pool, 128);
+    sock_data.bufsize = 128;
+    sock_data.op_key = pj_pool_alloc(sock_data.pool, 
+				     sizeof(*sock_data.op_key));
+    sock_data.received = 0;
+    sock_data.unregistered = 0;
+
+    pj_ioqueue_op_key_init(sock_data.op_key, sizeof(*sock_data.op_key));
+
+    status = pj_mutex_create_simple(sock_data.pool, "sd", &sock_data.mutex);
+    if (status != PJ_SUCCESS) {
+	app_perror("create_mutex() error", status);
+	return -35;
+    }
+
+    /* Register socket to ioqueue */
+    pj_bzero(&callback, sizeof(callback));
+    callback.on_read_complete = &on_read_complete;
+    status = pj_ioqueue_register_sock(sock_data.pool, ioqueue, sock_data.sock,
+				      NULL, &callback, &sock_data.key);
+    if (status != PJ_SUCCESS) {
+	app_perror("pj_ioqueue_register error", status);
+	return -40;
+    }
+
+    /* Bootstrap the first send/receive */
+    on_read_complete(sock_data.key, sock_data.op_key, 0);
+
+    /* Loop until test time ends */
+    for (;;) {
+	pj_time_val now, timeout;
+
+	pj_gettimeofday(&now);
+
+	if (test_method == UNREGISTER_IN_APP && 
+	    PJ_TIME_VAL_GTE(now, time_to_unregister) &&
+	    sock_data.pool) 
+	{
+	    pj_mutex_lock(sock_data.mutex);
+
+	    sock_data.unregistered = 1;
+	    pj_ioqueue_unregister(sock_data.key);
+	    pj_mutex_destroy(sock_data.mutex);
+	    pj_pool_release(sock_data.pool);
+	    sock_data.pool = NULL;
+	}
+
+	if (PJ_TIME_VAL_GT(now, end_time) && sock_data.unregistered)
+	    break;
+
+	timeout.sec = 0; timeout.msec = 10;
+	pj_ioqueue_poll(ioqueue, &timeout);
+	//pj_thread_sleep(1);
+
+    }
+
+    thread_quitting = 1;
+
+    for (i=0; i<WORKER_CNT; ++i) {
+	pj_thread_join(thread[i]);
+	pj_thread_destroy(thread[i]);
+    }
+
+    if (other_socket) {
+	pj_ioqueue_unregister(osd.key);
+    }
+
+    pj_sock_close(sock_data.csock);
+
+    PJ_LOG(3,(THIS_FILE, "....%s: done (%d KB/s)",
+	      title, sock_data.received * 1000 / MSEC / 1000));
+    return 0;
+}
+
+int udp_ioqueue_unreg_test(void)
+{
+    enum { LOOP = 10 };
+    int i, rc;
+    char title[30];
+    pj_ioqueue_t *ioqueue;
+    pj_pool_t *test_pool;
+			      
+    test_method = UNREGISTER_IN_APP;
+
+    test_pool = pj_pool_create(mem, "unregtest", 4000, 4000, NULL);
+
+    rc = pj_ioqueue_create(test_pool, 16, &ioqueue);
+    if (rc != PJ_SUCCESS) {
+	app_perror("Error creating ioqueue", rc);
+	return -10;
+    }
+
+
+    PJ_LOG(3, (THIS_FILE, "...ioqueue unregister stress test 0/3 (%s)", 
+	       pj_ioqueue_name()));
+    for (i=0; i<LOOP; ++i) {
+	pj_ansi_sprintf(title, "repeat %d/%d", i, LOOP);
+	rc = perform_unreg_test(ioqueue, test_pool, title, 0);
+	if (rc != 0)
+	    return rc;
+    }
+
+
+    PJ_LOG(3, (THIS_FILE, "...ioqueue unregister stress test 1/3 (%s)",
+	       pj_ioqueue_name()));
+    for (i=0; i<LOOP; ++i) {
+	pj_ansi_sprintf(title, "repeat %d/%d", i, LOOP);
+	rc = perform_unreg_test(ioqueue, test_pool, title, 1);
+	if (rc != 0)
+	    return rc;
+    }
+
+    test_method = UNREGISTER_IN_CALLBACK;
+
+    PJ_LOG(3, (THIS_FILE, "...ioqueue unregister stress test 2/3 (%s)", 
+	       pj_ioqueue_name()));
+    for (i=0; i<LOOP; ++i) {
+	pj_ansi_sprintf(title, "repeat %d/%d", i, LOOP);
+	rc = perform_unreg_test(ioqueue, test_pool, title, 0);
+	if (rc != 0)
+	    return rc;
+    }
+
+
+    PJ_LOG(3, (THIS_FILE, "...ioqueue unregister stress test 3/3 (%s)", 
+	       pj_ioqueue_name()));
+    for (i=0; i<LOOP; ++i) {
+	pj_ansi_sprintf(title, "repeat %d/%d", i, LOOP);
+	rc = perform_unreg_test(ioqueue, test_pool, title, 1);
+	if (rc != 0)
+	    return rc;
+    }
+
+    pj_ioqueue_destroy(ioqueue);
+    pj_pool_release(test_pool);
+
+    return 0;
+}
+
+
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_uiq_unreg;
+#endif	/* INCLUDE_IOQUEUE_UNREG_TEST */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/list.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/list.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/list.c	(revision 1163)
@@ -0,0 +1,225 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+
+/**
+ * \page page_pjlib_list_test Test: Linked List
+ *
+ * This file provides implementation of \b list_test(). It tests the
+ * functionality of the linked-list API.
+ *
+ * \section list_test_sec Scope of the Test
+ *
+ * API tested:
+ *  - pj_list_init()
+ *  - pj_list_insert_before()
+ *  - pj_list_insert_after()
+ *  - pj_list_merge_last()
+ *  - pj_list_empty()
+ *  - pj_list_insert_nodes_before()
+ *  - pj_list_erase()
+ *  - pj_list_find_node()
+ *  - pj_list_search()
+ *
+ *
+ * This file is <b>pjlib-test/list.c</b>
+ *
+ * \include pjlib-test/list.c
+ */
+
+#if INCLUDE_LIST_TEST
+
+#include <pjlib.h>
+
+typedef struct list_node
+{
+    PJ_DECL_LIST_MEMBER(struct list_node);
+    int value;
+} list_node;
+
+static int compare_node(void *value, const pj_list_type *nd)
+{
+    list_node *node = (list_node*)nd;
+    return ((long)value == node->value) ? 0 : -1;
+}
+
+#define PJ_SIGNED_ARRAY_SIZE(a)	((int)PJ_ARRAY_SIZE(a))
+
+int list_test()
+{
+    list_node nodes[4];    // must be even number of nodes
+    list_node list;
+    list_node list2;
+    list_node *p;
+    int i; // don't change to unsigned!
+
+    //
+    // Test insert_before().
+    //
+    list.value = (unsigned)-1;
+    pj_list_init(&list);
+    for (i=0; i<PJ_SIGNED_ARRAY_SIZE(nodes); ++i) {
+	nodes[i].value = i;
+	pj_list_insert_before(&list, &nodes[i]);
+    }
+    // check.
+    for (i=0, p=list.next; i<PJ_SIGNED_ARRAY_SIZE(nodes); ++i, p=p->next) {
+	pj_assert(p->value == i);
+	if (p->value != i) {
+	    return -1;
+	}
+    }
+
+    //
+    // Test insert_after()
+    //
+    pj_list_init(&list);
+    for (i=PJ_SIGNED_ARRAY_SIZE(nodes)-1; i>=0; --i) {
+	pj_list_insert_after(&list, &nodes[i]);
+    }
+    // check.
+    for (i=0, p=list.next; i<PJ_SIGNED_ARRAY_SIZE(nodes); ++i, p=p->next) {
+	pj_assert(p->value == i);
+	if (p->value != i) {
+	    return -1;
+	}
+    }
+
+    //
+    // Test merge_last()
+    //
+    // Init lists
+    pj_list_init(&list);
+    pj_list_init(&list2);
+    for (i=0; i<PJ_SIGNED_ARRAY_SIZE(nodes)/2; ++i) {
+	pj_list_insert_before(&list, &nodes[i]);
+    }
+    for (i=PJ_SIGNED_ARRAY_SIZE(nodes)/2; i<PJ_SIGNED_ARRAY_SIZE(nodes); ++i) {
+	pj_list_insert_before(&list2, &nodes[i]);
+    }
+    // merge
+    pj_list_merge_last(&list, &list2);
+    // check.
+    for (i=0, p=list.next; i<PJ_SIGNED_ARRAY_SIZE(nodes); ++i, p=p->next) {
+	pj_assert(p->value == i);
+	if (p->value != i) {
+	    return -1;
+	}
+    }
+    // check list is empty
+    pj_assert( pj_list_empty(&list2) );
+    if (!pj_list_empty(&list2)) {
+	return -1;
+    }
+
+    // 
+    // Check merge_first()
+    //
+    pj_list_init(&list);
+    pj_list_init(&list2);
+    for (i=0; i<PJ_SIGNED_ARRAY_SIZE(nodes)/2; ++i) {
+	pj_list_insert_before(&list, &nodes[i]);
+    }
+    for (i=PJ_SIGNED_ARRAY_SIZE(nodes)/2; i<PJ_SIGNED_ARRAY_SIZE(nodes); ++i) {
+	pj_list_insert_before(&list2, &nodes[i]);
+    }
+    // merge
+    pj_list_merge_first(&list2, &list);
+    // check (list2).
+    for (i=0, p=list2.next; i<PJ_SIGNED_ARRAY_SIZE(nodes); ++i, p=p->next) {
+	pj_assert(p->value == i);
+	if (p->value != i) {
+	    return -1;
+	}
+    }
+    // check list is empty
+    pj_assert( pj_list_empty(&list) );
+    if (!pj_list_empty(&list)) {
+	return -1;
+    }
+
+    //
+    // Test insert_nodes_before()
+    //
+    // init list
+    pj_list_init(&list);
+    for (i=0; i<PJ_SIGNED_ARRAY_SIZE(nodes)/2; ++i) {
+	pj_list_insert_before(&list, &nodes[i]);
+    }
+    // chain remaining nodes
+    pj_list_init(&nodes[PJ_SIGNED_ARRAY_SIZE(nodes)/2]);
+    for (i=PJ_SIGNED_ARRAY_SIZE(nodes)/2+1; i<PJ_SIGNED_ARRAY_SIZE(nodes); ++i) {
+	pj_list_insert_before(&nodes[PJ_SIGNED_ARRAY_SIZE(nodes)/2], &nodes[i]);
+    }
+    // insert nodes
+    pj_list_insert_nodes_before(&list, &nodes[PJ_SIGNED_ARRAY_SIZE(nodes)/2]);
+    // check
+    for (i=0, p=list.next; i<PJ_SIGNED_ARRAY_SIZE(nodes); ++i, p=p->next) {
+	pj_assert(p->value == i);
+	if (p->value != i) {
+	    return -1;
+	}
+    }
+
+    // erase test.
+    pj_list_init(&list);
+    for (i=0; i<PJ_SIGNED_ARRAY_SIZE(nodes); ++i) {
+	nodes[i].value = i;
+	pj_list_insert_before(&list, &nodes[i]);
+    }
+    for (i=PJ_SIGNED_ARRAY_SIZE(nodes)-1; i>=0; --i) {
+	int j;
+	pj_list_erase(&nodes[i]);
+	for (j=0, p=list.next; j<i; ++j, p=p->next) {
+	    pj_assert(p->value == j);
+	    if (p->value != j) {
+		return -1;
+	    }
+	}
+    }
+
+    // find and search
+    pj_list_init(&list);
+    for (i=0; i<PJ_SIGNED_ARRAY_SIZE(nodes); ++i) {
+	nodes[i].value = i;
+	pj_list_insert_before(&list, &nodes[i]);
+    }
+    for (i=0; i<PJ_SIGNED_ARRAY_SIZE(nodes); ++i) {
+	p = (list_node*) pj_list_find_node(&list, &nodes[i]);
+	pj_assert( p == &nodes[i] );
+	if (p != &nodes[i]) {
+	    return -1;
+	}
+	p = (list_node*) pj_list_search(&list, (void*)(long)i, &compare_node);
+	pj_assert( p == &nodes[i] );
+	if (p != &nodes[i]) {
+	    return -1;
+	}
+    }
+    return 0;
+}
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_list_test;
+#endif	/* INCLUDE_LIST_TEST */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/main.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/main.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/main.c	(revision 1163)
@@ -0,0 +1,105 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+
+#include <pj/string.h>
+#include <pj/sock.h>
+#include <pj/log.h>
+#include <stdio.h>
+
+extern int param_echo_sock_type;
+extern const char *param_echo_server;
+extern int param_echo_port;
+
+
+//#if defined(PJ_WIN32) && PJ_WIN32!=0
+#if 0
+#include <windows.h>
+static void boost(void)
+{
+    SetPriorityClass(GetCurrentProcess(), REALTIME_PRIORITY_CLASS);
+}
+#else
+#define boost()
+#endif
+
+#if defined(PJ_SUNOS) && PJ_SUNOS!=0
+#include <signal.h>
+static void init_signals()
+{
+    struct sigaction act;
+
+    memset(&act, 0, sizeof(act));
+    act.sa_handler = SIG_IGN;
+
+    sigaction(SIGALRM, &act, NULL);
+}
+
+#else
+#define init_signals()
+#endif
+
+int main(int argc, char *argv[])
+{
+    int rc;
+    int interractive = 0;
+
+    boost();
+    init_signals();
+
+    while (argc > 1) {
+        char *arg = argv[--argc];
+
+	if (*arg=='-' && *(arg+1)=='i') {
+	    interractive = 1;
+
+	} else if (*arg=='-' && *(arg+1)=='p') {
+            pj_str_t port = pj_str(argv[--argc]);
+
+            param_echo_port = pj_strtoul(&port);
+
+        } else if (*arg=='-' && *(arg+1)=='s') {
+            param_echo_server = argv[--argc];
+
+        } else if (*arg=='-' && *(arg+1)=='t') {
+            pj_str_t type = pj_str(argv[--argc]);
+            
+            if (pj_stricmp2(&type, "tcp")==0)
+                param_echo_sock_type = PJ_SOCK_STREAM;
+            else if (pj_stricmp2(&type, "udp")==0)
+                param_echo_sock_type = PJ_SOCK_DGRAM;
+            else {
+                PJ_LOG(3,("", "error: unknown socket type %s", type.ptr));
+                return 1;
+            }
+        }
+    }
+
+    rc = test_main();
+
+    if (interractive) {
+	char s[10];
+	puts("");
+	puts("Press <ENTER> to exit");
+	fgets(s, sizeof(s), stdin);
+    }
+
+    return rc;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/main_mod.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/main_mod.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/main_mod.c	(revision 1163)
@@ -0,0 +1,39 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+#include <linux/module.h>
+#include <linux/kernel.h>
+
+int init_module(void)
+{
+    printk(KERN_INFO "PJLIB test module loaded. Starting tests...\n");
+    
+    test_main();
+
+    /* Prevent module from loading. We've finished test anyway.. */
+    return 1;
+}
+
+void cleanup_module(void)
+{
+    printk(KERN_INFO "PJLIB test module unloading...\n");
+}
+
+MODULE_LICENSE("GPL");
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/main_rtems.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/main_rtems.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/main_rtems.c	(revision 1163)
@@ -0,0 +1,325 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 
+ */
+
+/*
+ * - Many thanks for Zetron, Inc. and Phil Torre <ptorre@zetron.com> for 
+ *   donating this file and the RTEMS port in general!
+ */
+
+#include "test.h"
+
+#include <pj/errno.h>
+#include <pj/string.h>
+#include <pj/sock.h>
+#include <pj/log.h>
+
+extern int param_echo_sock_type;
+extern const char *param_echo_server;
+extern int param_echo_port;
+
+#include <bsp.h>
+
+#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
+#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS    300
+#define CONFIGURE_MAXIMUM_TASKS                     50
+#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES            rtems_resource_unlimited(10)
+#define CONFIGURE_MAXIMUM_SEMAPHORES                rtems_resource_unlimited(10)
+#define CONFIGURE_MAXIMUM_TIMERS                    50
+#define CONFIGURE_MAXIMUM_REGIONS                   3
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_TIMER_DRIVER
+#define CONFIGURE_TICKS_PER_TIMESLICE               2
+//#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_POSIX_INIT_THREAD_TABLE
+
+
+#define CONFIGURE_MAXIMUM_POSIX_MUTEXES	    rtems_resource_unlimited(16)
+#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES rtems_resource_unlimited(5)
+#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES  rtems_resource_unlimited(16)
+#define CONFIGURE_MAXIMUM_POSIX_TIMERS	    rtems_resource_unlimited(5)
+#define CONFIGURE_MAXIMUM_POSIX_THREADS	    rtems_resource_unlimited(16)
+#define CONFIGURE_MAXIMUM_POSIX_KEYS	    rtems_resource_unlimited(16)
+
+#define CONFIGURE_POSIX_INIT_THREAD_STACK_SIZE	4096
+
+/* Make sure that stack size is at least 4096 */
+#define SZ					(4096-RTEMS_MINIMUM_STACK_SIZE)
+#define CONFIGURE_EXTRA_TASK_STACKS		((SZ)<0 ? 0 : (SZ))
+
+#define CONFIGURE_INIT
+#define STACK_CHECKER_ON
+
+rtems_task Init(rtems_task_argument Argument) ;
+void *POSIX_Init(void *argument);
+
+#include <confdefs.h>
+#include <rtems.h>
+
+/* Any tests that want to build a linked executable for RTEMS must include
+   these headers to get a default config for the network stack. */
+#include <rtems/rtems_bsdnet.h>
+#include "rtems_network_config.h"
+
+#include <assert.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#define THIS_FILE   "main_rtems.c"
+
+static void* pjlib_test_main(void* unused);
+static void  initialize_network();
+static void test_sock(void);
+
+static void my_perror(pj_status_t status, const char *title)
+{
+    char err[PJ_ERR_MSG_SIZE];
+
+    pj_strerror(status, err, sizeof(err));
+    printf("%s: %s [%d]\n", title, err, status);
+}
+
+#define TEST(expr)    { int rc;\
+		        /*PJ_LOG(3,(THIS_FILE,"%s", #expr));*/ \
+			/*sleep(1);*/ \
+		        rc=expr; \
+		        if (rc) my_perror(PJ_STATUS_FROM_OS(rc),#expr); }
+
+
+
+//rtems_task Init(rtems_task_argument Argument)
+void *POSIX_Init(void *argument)
+{
+    pthread_attr_t	threadAttr;
+    pthread_t     	theThread;
+    struct sched_param	sched_param;
+    size_t		stack_size;
+    int           	result;
+    char		data[1000];
+    
+
+    memset(data, 1, sizeof(data));
+
+    /* Set the TOD clock, so that gettimeofday() will work */
+    rtems_time_of_day fakeTime = { 2006, 3, 15, 17, 30, 0, 0 };
+
+    if (RTEMS_SUCCESSFUL != rtems_clock_set(&fakeTime))
+    {
+	assert(0);
+    }	
+
+    /* Bring up the network stack so we can run the socket tests. */
+    initialize_network();
+
+    /* Start a POSIX thread for pjlib_test_main(), since that's what it
+     * thinks it is running in. 
+     */
+
+    /* Initialize attribute */
+    TEST( pthread_attr_init(&threadAttr) );
+
+    /* Looks like the rest of the attributes must be fully initialized too,
+     * or otherwise pthread_create will return EINVAL.
+     */
+
+    /* Specify explicit scheduling request */
+    TEST( pthread_attr_setinheritsched(&threadAttr, PTHREAD_EXPLICIT_SCHED));
+
+    /* Timeslicing is needed by thread test, and this is accomplished by
+     * SCHED_RR.
+     */
+    TEST( pthread_attr_setschedpolicy(&threadAttr, SCHED_RR));
+
+    /* Set priority */
+    TEST( pthread_attr_getschedparam(&threadAttr, &sched_param));
+    sched_param.sched_priority = NETWORK_STACK_PRIORITY - 10;
+    TEST( pthread_attr_setschedparam(&threadAttr, &sched_param));
+
+    /* Must have sufficient stack size (large size is needed by
+     * logger, because default settings for logger is to use message buffer
+     * from the stack).
+     */
+    TEST( pthread_attr_getstacksize(&threadAttr, &stack_size));
+    if (stack_size < 8192)
+	TEST( pthread_attr_setstacksize(&threadAttr, 8192));
+
+
+    /* Create the thread for application */
+    result = pthread_create(&theThread, &threadAttr, &pjlib_test_main, NULL);
+    if (result != 0) {
+	my_perror(PJ_STATUS_FROM_OS(result), 
+		  "Error creating pjlib_test_main thread");
+	assert(!"Error creating main thread");
+    } 
+
+    return NULL;
+}
+
+
+
+#define boost()
+#define init_signals()
+
+static void*
+pjlib_test_main(void* unused)
+{
+    int rc;
+
+    /* Drop our priority to below that of the network stack, otherwise
+     * select() tests will fail. */
+    struct sched_param schedParam;
+    int schedPolicy;
+  
+    printf("pjlib_test_main thread started..\n");
+
+    TEST( pthread_getschedparam(pthread_self(), &schedPolicy, &schedParam) );
+
+    schedParam.sched_priority = NETWORK_STACK_PRIORITY - 10;
+
+    TEST( pthread_setschedparam(pthread_self(), schedPolicy, &schedParam) );
+
+    boost();
+    init_signals();
+
+    //my_test_thread("from pjlib_test_main");
+    //test_sock();
+
+    rc = test_main();
+
+    return (void*)rc;
+}
+
+#  include <sys/types.h>
+#  include <sys/socket.h>
+#  include <netinet/in.h>
+#  include <arpa/inet.h>
+#  include <unistd.h>
+
+/* 
+ * Send UDP packet to some host. We can then use Ethereal to sniff the packet
+ * to see if this target really transmits UDP packet.
+ */
+static void
+send_udp(const char *target)
+{
+    int sock, rc;
+    struct sockaddr_in addr;
+
+    PJ_LOG(3,("main_rtems.c", "IP addr=%s/%s, gw=%s",
+		DEFAULT_IP_ADDRESS_STRING,
+		DEFAULT_NETMASK_STRING,
+		DEFAULT_GATEWAY_STRING));
+
+    sock = socket(AF_INET, SOCK_DGRAM, 0);
+    assert(sock > 0);
+
+    memset(&addr, 0, sizeof(addr));
+    addr.sin_family = AF_INET;
+
+    rc = bind(sock, (struct sockaddr*)&addr, sizeof(addr));
+    assert("bind error" && rc==0);
+
+    addr.sin_addr.s_addr = inet_addr(target);
+    addr.sin_port = htons(4444);
+
+    while(1) {
+	const char *data = "hello";
+
+	rc = sendto(sock, data, 5, 0, (struct sockaddr*)&addr, sizeof(addr));
+	PJ_LOG(3,("main_rtems.c", "pinging %s..(rc=%d)", target, rc));
+    	sleep(1);
+    }
+}
+
+
+static void test_sock(void)
+{
+    int sock;
+    struct sockaddr_in addr;
+    int rc;
+
+    sock = socket(AF_INET, SOCK_DGRAM, 0);
+    if (sock < 0) {
+	printf("socket() error\n");
+	goto end;
+    }
+
+    memset(&addr, 0, sizeof(addr));
+    addr.sin_family = AF_INET;
+    addr.sin_addr.s_addr = inet_addr("127.0.0.1");
+    addr.sin_port = htons(5000);
+
+    rc = bind(sock, (struct sockaddr*)&addr, sizeof(addr));
+    if (rc != 0) {
+	printf("bind() error %d\n", rc);
+	close(sock);
+	goto end;
+    }
+
+    puts("Bind socket success");
+
+    close(sock);
+
+end:
+    while(1) sleep(1);
+}
+
+/* 
+ * Initialize the network stack and Ethernet driver, using the configuration
+ * in rtems-network-config.h
+ */
+static void
+initialize_network()
+{
+    unsigned32 fd, result;
+    char ip_address_string[] = DEFAULT_IP_ADDRESS_STRING;
+    char netmask_string[] = DEFAULT_NETMASK_STRING;
+    char gateway_string[] = DEFAULT_GATEWAY_STRING;
+
+    // Write the network config files to /etc/hosts and /etc/host.conf
+    result = mkdir("/etc", S_IRWXU | S_IRWXG | S_IRWXO);
+    fd = open("/etc/host.conf", O_RDWR | O_CREAT, 0744);
+    result = write(fd, "hosts,bind\n", 11);
+    result = close(fd);
+    fd = open("/etc/hosts", O_RDWR | O_CREAT, 0744);
+    result = write(fd, "127.0.0.1	localhost\n", 41);
+    result = write(fd, ip_address_string, strlen(ip_address_string));
+    result = write(fd, "	pjsip-test\n", 32); 
+    result = close(fd);
+
+    netdriver_config.ip_address = ip_address_string;
+    netdriver_config.ip_netmask = netmask_string;
+    rtems_bsdnet_config.gateway = gateway_string;
+
+    if (0 != rtems_bsdnet_initialize_network())
+	PJ_LOG(3,(THIS_FILE, "Error: Unable to initialize network stack!"));
+    else
+	PJ_LOG(3,(THIS_FILE, "IP addr=%s/%s, gw=%s", 
+			      ip_address_string,
+			      netmask_string,
+			      gateway_string));
+
+    //rtems_rdbg_initialize();
+    //enterRdbg();
+    //send_udp("192.168.0.1");
+    //test_sock();
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/main_win32.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/main_win32.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/main_win32.c	(revision 1163)
@@ -0,0 +1,210 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+
+#include <pj/string.h>
+#include <pj/unicode.h>
+#include <pj/sock.h>
+#include <pj/log.h>
+
+#define WIN32_LEAN_AND_MEAN
+#define NONAMELESSUNION
+#include <windows.h>
+#include <commctrl.h>
+#include <tchar.h>
+
+#define MAX_LOADSTRING	    100
+#define THIS_FILE	    "main_win32.c"
+
+#define IDC_HELLO_WINCE	    3
+#define ID_LOGWINDOW	    104
+
+
+ATOM			    MyRegisterClass	(HINSTANCE, LPTSTR);
+BOOL			    InitInstance	(HINSTANCE, int);
+LRESULT CALLBACK	    WndProc		(HWND, UINT, WPARAM, LPARAM);
+
+
+extern int		    param_log_decor;	// in test.c
+
+static HINSTANCE	    hInst;
+static HWND		    hwndLog;
+static HFONT		    hFixedFont;
+
+
+static void write_log(int level, const char *data, int len)
+{
+    PJ_DECL_UNICODE_TEMP_BUF(wdata,256);
+
+    PJ_UNUSED_ARG(level);
+    PJ_UNUSED_ARG(len);
+    SendMessage(hwndLog, EM_REPLACESEL, FALSE, 
+		(LPARAM)PJ_STRING_TO_NATIVE(data,wdata,256));
+}
+
+
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, 
+		   LPTSTR lpCmdLine, int nCmdShow)
+{
+    MSG msg;
+    
+    PJ_UNUSED_ARG(lpCmdLine);
+    PJ_UNUSED_ARG(hPrevInstance);
+
+    
+    if (!InitInstance (hInstance, nCmdShow))
+	return FALSE;
+    
+    pj_log_set_log_func( &write_log );
+    param_log_decor = PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_CR;
+
+    // Run the test!
+    test_main();
+
+    PJ_LOG(3,(THIS_FILE,""));
+    PJ_LOG(3,(THIS_FILE,"Press ESC to quit"));
+
+    // Message loop, waiting to quit.
+    while (GetMessage(&msg, NULL, 0, 0)) {
+	TranslateMessage(&msg);
+	DispatchMessage(&msg);
+    }
+    
+    DeleteObject(hFixedFont);
+    return msg.wParam;
+}
+
+
+#ifdef _CONSOLE
+int main()
+{
+    return WinMain(GetModuleHandle(NULL), NULL, NULL, SW_SHOW);
+}
+#endif
+
+
+ATOM MyRegisterClass(HINSTANCE hInstance, LPTSTR szWindowClass)
+{
+    WNDCLASS	wc;
+    
+    wc.style		= CS_HREDRAW | CS_VREDRAW;
+    wc.lpfnWndProc	= (WNDPROC) WndProc;
+    wc.cbClsExtra	= 0;
+    wc.cbWndExtra	= 0;
+    wc.hInstance	= hInstance;
+    ///wc.hIcon		= LoadIcon(hInstance, MAKEINTRESOURCE(IDI_HELLO_WINCE));
+    wc.hIcon		= NULL;
+    wc.hCursor		= 0;
+    wc.hbrBackground	= (HBRUSH) GetStockObject(WHITE_BRUSH);
+    wc.lpszMenuName	= 0;
+    wc.lpszClassName	= szWindowClass;
+    
+    return RegisterClass(&wc);
+}
+
+
+BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
+{
+    HWND	hWnd;
+    TCHAR	*szTitle = _T("PJSIP Test");
+    TCHAR	*szWindowClass = _T("PJSIP_TEST");
+    LOGFONT	lf;
+
+
+    memset(&lf, 0, sizeof(lf));
+    lf.lfHeight = 13;
+#if PJ_NATIVE_STRING_IS_UNICODE
+    wcscpy(lf.lfFaceName, _T("Courier New"));
+#else
+    strcpy(lf.lfFaceName, "Lucida Console");
+#endif
+
+    hFixedFont = CreateFontIndirect(&lf);
+    if (!hFixedFont)
+	return FALSE;
+
+    hInst = hInstance;
+    
+    MyRegisterClass(hInstance, szWindowClass);
+    
+    hWnd = CreateWindow(szWindowClass, szTitle, WS_VISIBLE,
+		        CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 
+			CW_USEDEFAULT, NULL, NULL, hInstance, NULL);
+    
+    if (!hWnd)
+	return FALSE;
+    
+    ShowWindow(hWnd, nCmdShow);
+    UpdateWindow(hWnd);
+
+    if (hwndLog) {
+	SendMessage(hwndLog, WM_SETFONT, (WPARAM) hFixedFont, (LPARAM) 0);  
+	ShowWindow(hwndLog, TRUE);
+    }
+
+    return TRUE;
+}
+
+
+LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+    RECT rt;
+    DWORD dwStyle;
+    
+    switch (message) 
+    {
+    case WM_CREATE:
+	// Create text control.
+	GetClientRect(hWnd, &rt);
+	dwStyle = WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | 
+		  WS_BORDER | ES_LEFT | ES_MULTILINE | ES_NOHIDESEL |
+		  ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_READONLY; 
+	hwndLog = CreateWindow( TEXT("edit"),	    // class
+				NULL,		    // window text
+				dwStyle,	    // style
+				0,		    // x-left
+				0,		    // y-top
+				rt.right-rt.left,   // w
+				rt.bottom-rt.top,   // h
+				hWnd,		    // parent
+				(HMENU)ID_LOGWINDOW,// id
+				hInst,		    // instance
+				NULL);		    // NULL for control.
+	break;
+    case WM_ACTIVATE:
+	if (LOWORD(wParam) == WA_INACTIVE)
+	    DestroyWindow(hWnd);
+	break;
+    case WM_CHAR:
+	if (wParam == 27) {
+	    DestroyWindow(hWnd);
+	}
+	break;
+    case WM_CLOSE:
+	DestroyWindow(hWnd);
+	break;
+    case WM_DESTROY:
+	PostQuitMessage(0);
+	break;
+    default:
+	return DefWindowProc(hWnd, message, wParam, lParam);
+    }
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/mutex.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/mutex.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/mutex.c	(revision 1163)
@@ -0,0 +1,174 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+#include <pjlib.h>
+
+#if INCLUDE_MUTEX_TEST
+
+#undef TRACE_
+//#define TRACE_(x)   PJ_LOG(3,x)
+#define TRACE_(x)
+
+/* Test witn non-recursive mutex. */
+static int simple_mutex_test(pj_pool_t *pool)
+{
+    pj_status_t rc;
+    pj_mutex_t *mutex;
+
+    PJ_LOG(3,("", "...testing simple mutex"));
+    
+    /* Create mutex. */
+    TRACE_(("", "....create mutex"));
+    rc = pj_mutex_create( pool, "", PJ_MUTEX_SIMPLE, &mutex);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error: pj_mutex_create", rc);
+	return -10;
+    }
+
+    /* Normal lock/unlock cycle. */
+    TRACE_(("", "....lock mutex"));
+    rc = pj_mutex_lock(mutex);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error: pj_mutex_lock", rc);
+	return -20;
+    }
+    TRACE_(("", "....unlock mutex"));
+    rc = pj_mutex_unlock(mutex);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error: pj_mutex_unlock", rc);
+	return -30;
+    }
+    
+    /* Lock again. */
+    TRACE_(("", "....lock mutex"));
+    rc = pj_mutex_lock(mutex);
+    if (rc != PJ_SUCCESS) return -40;
+
+    /* Try-lock should fail. It should not deadlocked. */
+    TRACE_(("", "....trylock mutex"));
+    rc = pj_mutex_trylock(mutex);
+    if (rc == PJ_SUCCESS)
+	PJ_LOG(3,("", "...info: looks like simple mutex is recursive"));
+
+    /* Unlock and done. */
+    TRACE_(("", "....unlock mutex"));
+    rc = pj_mutex_unlock(mutex);
+    if (rc != PJ_SUCCESS) return -50;
+
+    TRACE_(("", "....destroy mutex"));
+    rc = pj_mutex_destroy(mutex);
+    if (rc != PJ_SUCCESS) return -60;
+
+    TRACE_(("", "....done"));
+    return PJ_SUCCESS;
+}
+
+
+/* Test with recursive mutex. */
+static int recursive_mutex_test(pj_pool_t *pool)
+{
+    pj_status_t rc;
+    pj_mutex_t *mutex;
+
+    PJ_LOG(3,("", "...testing recursive mutex"));
+
+    /* Create mutex. */
+    TRACE_(("", "....create mutex"));
+    rc = pj_mutex_create( pool, "", PJ_MUTEX_RECURSE, &mutex);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error: pj_mutex_create", rc);
+	return -10;
+    }
+
+    /* Normal lock/unlock cycle. */
+    TRACE_(("", "....lock mutex"));
+    rc = pj_mutex_lock(mutex);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error: pj_mutex_lock", rc);
+	return -20;
+    }
+    TRACE_(("", "....unlock mutex"));
+    rc = pj_mutex_unlock(mutex);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error: pj_mutex_unlock", rc);
+	return -30;
+    }
+    
+    /* Lock again. */
+    TRACE_(("", "....lock mutex"));
+    rc = pj_mutex_lock(mutex);
+    if (rc != PJ_SUCCESS) return -40;
+
+    /* Try-lock should NOT fail. . */
+    TRACE_(("", "....trylock mutex"));
+    rc = pj_mutex_trylock(mutex);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error: recursive mutex is not recursive!", rc);
+	return -40;
+    }
+
+    /* Locking again should not fail. */
+    TRACE_(("", "....lock mutex"));
+    rc = pj_mutex_lock(mutex);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error: recursive mutex is not recursive!", rc);
+	return -45;
+    }
+
+    /* Unlock several times and done. */
+    TRACE_(("", "....unlock mutex 3x"));
+    rc = pj_mutex_unlock(mutex);
+    if (rc != PJ_SUCCESS) return -50;
+    rc = pj_mutex_unlock(mutex);
+    if (rc != PJ_SUCCESS) return -51;
+    rc = pj_mutex_unlock(mutex);
+    if (rc != PJ_SUCCESS) return -52;
+
+    TRACE_(("", "....destroy mutex"));
+    rc = pj_mutex_destroy(mutex);
+    if (rc != PJ_SUCCESS) return -60;
+
+    TRACE_(("", "....done"));
+    return PJ_SUCCESS;
+}
+
+int mutex_test(void)
+{
+    pj_pool_t *pool;
+    int rc;
+
+    pool = pj_pool_create(mem, "", 4000, 4000, NULL);
+
+    rc = simple_mutex_test(pool);
+    if (rc != 0)
+	return rc;
+
+    rc = recursive_mutex_test(pool);
+    if (rc != 0)
+	return rc;
+
+    pj_pool_release(pool);
+
+    return 0;
+}
+
+#else
+int dummy_mutex_test;
+#endif
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/os.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/os.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/os.c	(revision 1163)
@@ -0,0 +1,19 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 
+ */
+int dummy_os_var;
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/pool.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/pool.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/pool.c	(revision 1163)
@@ -0,0 +1,227 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/pool.h>
+#include <pj/pool_buf.h>
+#include <pj/rand.h>
+#include <pj/log.h>
+#include <pj/except.h>
+#include "test.h"
+
+/**
+ * \page page_pjlib_pool_test Test: Pool
+ *
+ * This file provides implementation of \b pool_test(). It tests the
+ * functionality of the memory pool.
+ *
+ *
+ * This file is <b>pjlib-test/pool.c</b>
+ *
+ * \include pjlib-test/pool.c
+ */
+
+
+#if INCLUDE_POOL_TEST
+
+#define SIZE	4096
+
+/* Normally we should throw exception when memory alloc fails.
+ * Here we do nothing so that the flow will go back to original caller,
+ * which will test the result using NULL comparison. Normally caller will
+ * catch the exception instead of checking for NULLs.
+ */
+static void null_callback(pj_pool_t *pool, pj_size_t size)
+{
+    PJ_UNUSED_ARG(pool);
+    PJ_UNUSED_ARG(size);
+}
+
+#define GET_FREE(p)	(pj_pool_get_capacity(p)-pj_pool_get_used_size(p))
+
+/* Test that the capacity and used size reported by the pool is correct. 
+ */
+static int capacity_test(void)
+{
+    pj_pool_t *pool = pj_pool_create(mem, NULL, SIZE, 0, &null_callback);
+    pj_size_t freesize;
+
+    PJ_LOG(3,("test", "...capacity_test()"));
+
+    if (!pool)
+	return -200;
+
+    freesize = GET_FREE(pool);
+
+    if (pj_pool_alloc(pool, freesize) == NULL) {
+	PJ_LOG(3,("test", "...error: wrong freesize %u reported",
+			  freesize));
+	pj_pool_release(pool);
+	return -210;
+    }
+
+    pj_pool_release(pool);
+    return 0;
+}
+
+/* Test function to drain the pool's space. 
+ */
+static int drain_test(pj_size_t size, pj_size_t increment)
+{
+    pj_pool_t *pool = pj_pool_create(mem, NULL, size, increment, 
+				     &null_callback);
+    pj_size_t freesize;
+    void *p;
+    int status = 0;
+    
+    PJ_LOG(3,("test", "...drain_test(%d,%d)", size, increment));
+
+    if (!pool)
+	return -10;
+
+    /* Get free size */
+    freesize = GET_FREE(pool);
+    if (freesize < 1) {
+    	status=-15; 
+	goto on_error;
+    }
+
+    /* Drain the pool until there's nothing left. */
+    while (freesize > 0) {
+	int size;
+
+	if (freesize > 255)
+	    size = ((pj_rand() & 0x000000FF) + 4) & ~0x03L;
+	else
+	    size = freesize;
+
+	p = pj_pool_alloc(pool, size);
+	if (!p) {
+	    status=-20; goto on_error;
+	}
+
+	freesize -= size;
+    }
+
+    /* Check that capacity is zero. */
+    if (GET_FREE(pool) != 0) {
+	PJ_LOG(3,("test", "....error: returned free=%u (expecting 0)",
+		  GET_FREE(pool)));
+	status=-30; goto on_error;
+    }
+
+    /* Try to allocate once more */
+    p = pj_pool_alloc(pool, 257);
+    if (!p) {
+	status=-40; goto on_error;
+    }
+
+    /* Check that capacity is NOT zero. */
+    if (GET_FREE(pool) == 0) {
+	status=-50; goto on_error;
+    }
+
+
+on_error:
+    pj_pool_release(pool);
+    return status;
+}
+
+/* Test the buffer based pool */
+static int pool_buf_test(void)
+{
+    enum { STATIC_BUF_SIZE = 40 };
+    /* 16 is the internal struct in pool_buf */
+    static char buf[ STATIC_BUF_SIZE + sizeof(pj_pool_t) + 
+		     sizeof(pj_pool_block) + 16];
+    pj_pool_t *pool;
+    void *p;
+    PJ_USE_EXCEPTION;
+
+    PJ_LOG(3,("test", "...pool_buf test"));
+
+    pool = pj_pool_create_on_buf("no name", buf, sizeof(buf));
+    if (!pool)
+	return -70;
+
+    /* Drain the pool */
+    PJ_TRY {
+	if ((p=pj_pool_alloc(pool, STATIC_BUF_SIZE/2)) == NULL)
+	    return -75;
+
+	if ((p=pj_pool_alloc(pool, STATIC_BUF_SIZE/2)) == NULL)
+	    return -76;
+    }
+    PJ_CATCH_ANY {
+	return -77;
+    }
+    PJ_END;
+
+    /* On the next alloc, exception should be thrown */
+    PJ_TRY {
+	p = pj_pool_alloc(pool, STATIC_BUF_SIZE);
+	if (p != NULL) {
+	    /* This is unexpected, the alloc should fail */
+	    return -78;
+	}
+    }
+    PJ_CATCH_ANY {
+	/* This is the expected result */
+    }
+    PJ_END;
+
+    /* Done */
+    return 0;
+}
+
+
+int pool_test(void)
+{
+    enum { LOOP = 2 };
+    int loop;
+    int rc;
+
+    rc = capacity_test();
+    if (rc) return rc;
+
+    for (loop=0; loop<LOOP; ++loop) {
+	/* Test that the pool should grow automaticly. */
+	rc = drain_test(SIZE, SIZE);
+	if (rc != 0) return rc;
+
+	/* Test situation where pool is not allowed to grow. 
+ 	 * We expect the test to return correct error.
+	 */
+	rc = drain_test(SIZE, 0);
+	if (rc != -40) return rc;
+    }
+
+    rc = pool_buf_test();
+    if (rc != 0)
+	return rc;
+
+
+    return 0;
+}
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_pool_test;
+#endif	/* INCLUDE_POOL_TEST */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/pool_perf.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/pool_perf.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/pool_perf.c	(revision 1163)
@@ -0,0 +1,152 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+
+#if INCLUDE_POOL_PERF_TEST
+
+#include <pjlib.h>
+#include <pj/compat/malloc.h>
+
+#if !PJ_HAS_HIGH_RES_TIMER
+# error Need high resolution timer for this test.
+#endif
+
+#define THIS_FILE   "test"
+
+#define LOOP	    10
+#define COUNT	    1024
+static unsigned	    sizes[COUNT];
+static char	   *p[COUNT];
+#define MIN_SIZE    4
+#define MAX_SIZE    512
+static unsigned total_size;
+
+
+static int pool_test_pool()
+{
+    int i;
+    pj_pool_t *pool = pj_pool_create(mem, NULL, total_size + 4*COUNT, 0, NULL);
+    if (!pool)
+	return -1;
+
+    for (i=0; i<COUNT; ++i) {
+	char *p;
+	if ( (p=(char*)pj_pool_alloc(pool, sizes[i])) == NULL) {
+	    PJ_LOG(3,(THIS_FILE,"   error: pool failed to allocate %d bytes",
+		      sizes[i]));
+	    pj_pool_release(pool);
+	    return -1;
+	}
+	*p = '\0';
+    }
+
+    pj_pool_release(pool);
+    return 0;
+}
+
+static int pool_test_malloc_free()
+{
+    int i; /* must be signed */
+
+    for (i=0; i<COUNT; ++i) {
+	p[i] = (char*)malloc(sizes[i]);
+	if (!p[i]) {
+	    PJ_LOG(3,(THIS_FILE,"   error: malloc failed to allocate %d bytes",
+		      sizes[i]));
+	    --i;
+	    while (i >= 0)
+		free(p[i]), --i;
+	    return -1;
+	}
+	*p[i] = '\0';
+    }
+
+    for (i=0; i<COUNT; ++i) {
+	free(p[i]);
+    }
+
+    return 0;
+}
+
+int pool_perf_test()
+{
+    unsigned i;
+    pj_uint32_t pool_time=0, malloc_time=0, pool_time2=0;
+    pj_timestamp start, end;
+    pj_uint32_t best, worst;
+
+    /* Initialize size of chunks to allocate in for the test. */
+    for (i=0; i<COUNT; ++i) {
+	sizes[i] = MIN_SIZE + (pj_rand() % MAX_SIZE);
+	total_size += sizes[i];
+    }
+
+    /* Add some more for pool admin area */
+    total_size += 512;
+
+    PJ_LOG(3, (THIS_FILE, "Benchmarking pool.."));
+
+    /* Warmup */
+    pool_test_pool();
+    pool_test_malloc_free();
+
+    for (i=0; i<LOOP; ++i) {
+	pj_get_timestamp(&start);
+	if (pool_test_pool()) {
+	    return 1;
+	}
+	pj_get_timestamp(&end);
+	pool_time += (end.u32.lo - start.u32.lo);
+
+	pj_get_timestamp(&start);
+	if (pool_test_malloc_free()) {
+	    return 2;
+	}
+	pj_get_timestamp(&end);
+	malloc_time += (end.u32.lo - start.u32.lo);
+
+	pj_get_timestamp(&start);
+	if (pool_test_pool()) {
+	    return 4;
+	}
+	pj_get_timestamp(&end);
+	pool_time2 += (end.u32.lo - start.u32.lo);
+    }
+
+    PJ_LOG(4,(THIS_FILE,"..LOOP count:                        %u",LOOP));
+    PJ_LOG(4,(THIS_FILE,"..number of alloc/dealloc per loop:  %u",COUNT));
+    PJ_LOG(4,(THIS_FILE,"..pool allocation/deallocation time: %u",pool_time));
+    PJ_LOG(4,(THIS_FILE,"..malloc/free time:                  %u",malloc_time));
+    PJ_LOG(4,(THIS_FILE,"..pool again, second invocation:     %u",pool_time2));
+
+    if (pool_time2==0) pool_time2=1;
+    if (pool_time < pool_time2)
+	best = pool_time, worst = pool_time2;
+    else
+	best = pool_time2, worst = pool_time;
+
+    PJ_LOG(3, (THIS_FILE, "..pool speedup over malloc best=%dx, worst=%dx", 
+			  (int)(malloc_time/best),
+			  (int)(malloc_time/worst)));
+    return 0;
+}
+
+
+#endif	/* INCLUDE_POOL_PERF_TEST */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/rand.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/rand.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/rand.c	(revision 1163)
@@ -0,0 +1,53 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/rand.h>
+#include <pj/log.h>
+#include "test.h"
+
+#if INCLUDE_RAND_TEST
+
+#define COUNT  1024
+static int values[COUNT];
+
+/*
+ * rand_test(), simply generates COUNT number of random number and
+ * check that there's no duplicate numbers.
+ */
+int rand_test(void)
+{
+    int i;
+
+    for (i=0; i<COUNT; ++i) {
+	int j;
+
+	values[i] = pj_rand();
+	for (j=0; j<i; ++j) {
+	    if (values[i] == values[j]) {
+		PJ_LOG(3,("test", "error: duplicate value %d at %d-th index",
+			 values[i], i));
+		return -10;
+	    }
+	}
+    }
+
+    return 0;
+}
+
+#endif	/* INCLUDE_RAND_TEST */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/rbtree.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/rbtree.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/rbtree.c	(revision 1163)
@@ -0,0 +1,167 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+
+#if INCLUDE_RBTREE_TEST
+
+#include <pjlib.h>
+
+#define LOOP	    32
+#define MIN_COUNT   64
+#define MAX_COUNT   (LOOP * MIN_COUNT)
+#define STRSIZE	    16
+#define THIS_FILE   "rbtree_test"
+
+typedef struct node_key
+{
+    pj_uint32_t hash;
+    char str[STRSIZE];
+} node_key;
+
+static int compare_node(const node_key *k1, const node_key *k2)
+{
+    if (k1->hash == k2->hash) {
+	return strcmp(k1->str, k2->str);
+    } else {
+	return k1->hash	< k2->hash ? -1 : 1;
+    }
+}
+
+void randomize_string(char *str, int len)
+{
+    int i;
+    for (i=0; i<len-1; ++i)
+	str[i] = (char)('a' + pj_rand() % 26);
+    str[len-1] = '\0';
+}
+
+static int test(void)
+{
+    pj_rbtree rb;
+    node_key *key;
+    pj_rbtree_node *node;
+    pj_pool_t *pool;
+    int err=0;
+    int count = MIN_COUNT;
+    int i;
+    unsigned size;
+
+    pj_rbtree_init(&rb, (pj_rbtree_comp*)&compare_node);
+    size = MAX_COUNT*(sizeof(*key)+PJ_RBTREE_NODE_SIZE) + 
+			   PJ_RBTREE_SIZE + PJ_POOL_SIZE;
+    pool = pj_pool_create( mem, "pool", size, 0, NULL);
+    if (!pool) {
+	PJ_LOG(3,("test", "...error: creating pool of %u bytes", size));
+	return -10;
+    }
+
+    key = (node_key *)pj_pool_alloc(pool, MAX_COUNT*sizeof(*key));
+    if (!key)
+	return -20;
+
+    node = (pj_rbtree_node*)pj_pool_alloc(pool, MAX_COUNT*sizeof(*node));
+    if (!node)
+	return -30;
+
+    for (i=0; i<LOOP; ++i) {
+	int j;
+	pj_rbtree_node *prev, *it;
+	pj_timestamp t1, t2, t_setup, t_insert, t_search, t_erase;
+
+	pj_assert(rb.size == 0);
+
+	t_setup.u32.lo = t_insert.u32.lo = t_search.u32.lo = t_erase.u32.lo = 0;
+
+	for (j=0; j<count; j++) {
+	    randomize_string(key[j].str, STRSIZE);
+
+	    pj_get_timestamp(&t1);
+	    node[j].key = &key[j];
+	    node[j].user_data = key[j].str;
+	    key[j].hash = pj_hash_calc(0, key[j].str, PJ_HASH_KEY_STRING);
+	    pj_get_timestamp(&t2);
+	    t_setup.u32.lo += (t2.u32.lo - t1.u32.lo);
+
+	    pj_get_timestamp(&t1);
+	    pj_rbtree_insert(&rb, &node[j]);
+	    pj_get_timestamp(&t2);
+	    t_insert.u32.lo += (t2.u32.lo - t1.u32.lo);
+	}
+
+	pj_assert(rb.size == (unsigned)count);
+
+	// Iterate key, make sure they're sorted.
+	prev = NULL;
+	it = pj_rbtree_first(&rb);
+	while (it) {
+	    if (prev) {
+		if (compare_node((node_key*)prev->key,(node_key*)it->key)>=0) {
+		    ++err;
+		    PJ_LOG(3, (THIS_FILE, "Error: %s >= %s", 
+			       (char*)prev->user_data, (char*)it->user_data));
+		}
+	    }
+	    prev = it;
+	    it = pj_rbtree_next(&rb, it);
+	}
+
+	// Search.
+	for (j=0; j<count; j++) {
+	    pj_get_timestamp(&t1);
+	    it = pj_rbtree_find(&rb, &key[j]);
+	    pj_get_timestamp(&t2);
+	    t_search.u32.lo += (t2.u32.lo - t1.u32.lo);
+
+	    pj_assert(it != NULL);
+	    if (it == NULL)
+		++err;
+	}
+
+	// Erase node.
+	for (j=0; j<count; j++) {
+	    pj_get_timestamp(&t1);
+	    it = pj_rbtree_erase(&rb, &node[j]);
+	    pj_get_timestamp(&t2);
+	    t_erase.u32.lo += (t2.u32.lo - t1.u32.lo);
+	}
+
+	PJ_LOG(4, (THIS_FILE, 
+		"...count:%d, setup:%d, insert:%d, search:%d, erase:%d",
+		count,
+		t_setup.u32.lo / count, t_insert.u32.lo / count,
+		t_search.u32.lo / count, t_erase.u32.lo / count));
+
+	count = 2 * count;
+	if (count > MAX_COUNT)
+	    break;
+    }
+
+    pj_pool_release(pool);
+    return err;
+}
+
+
+int rbtree_test()
+{
+    return test();
+}
+
+#endif	/* INCLUDE_RBTREE_TEST */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/rtems_network_config.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/rtems_network_config.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/rtems_network_config.h	(revision 1163)
@@ -0,0 +1,148 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/select.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/select.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/select.c	(revision 1163)
@@ -0,0 +1,217 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+
+/**
+ * \page page_pjlib_select_test Test: Socket Select()
+ *
+ * This file provides implementation of \b select_test(). It tests the
+ * functionality of the pj_sock_select() API.
+ *
+ *
+ * This file is <b>pjlib-test/select.c</b>
+ *
+ * \include pjlib-test/select.c
+ */
+
+
+#if INCLUDE_SELECT_TEST
+
+#include <pj/sock.h>
+#include <pj/sock_select.h>
+#include <pj/log.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+#include <pj/os.h>
+#include <pj/errno.h>
+
+enum
+{
+    READ_FDS,
+    WRITE_FDS,
+    EXCEPT_FDS
+};
+
+#define UDP_PORT    51232
+#define THIS_FILE   "select_test"
+
+/*
+ * do_select()
+ *
+ * Perform pj_sock_select() and find out which sockets
+ * are signalled.
+ */    
+static int do_select( pj_sock_t sock1, pj_sock_t sock2,
+		      int setcount[])
+{
+    pj_fd_set_t fds[3];
+    pj_time_val timeout;
+    int i, n;
+    
+    for (i=0; i<3; ++i) {
+        PJ_FD_ZERO(&fds[i]);
+        PJ_FD_SET(sock1, &fds[i]);
+        PJ_FD_SET(sock2, &fds[i]);
+        setcount[i] = 0;
+    }
+
+    timeout.sec = 1;
+    timeout.msec = 0;
+
+    n = pj_sock_select(FD_SETSIZE, &fds[0], &fds[1], &fds[2],
+		       &timeout);
+    if (n < 0)
+        return n;
+    if (n == 0)
+        return 0;
+
+    for (i=0; i<3; ++i) {
+        if (PJ_FD_ISSET(sock1, &fds[i]))
+            setcount[i]++;
+        if (PJ_FD_ISSET(sock2, &fds[i]))
+	    setcount[i]++;
+    }
+
+    return n;
+}
+
+/*
+ * select_test()
+ *
+ * Test main entry.
+ */
+int select_test()
+{
+    pj_sock_t udp1=PJ_INVALID_SOCKET, udp2=PJ_INVALID_SOCKET;
+    pj_sockaddr_in udp_addr;
+    int status;
+    int setcount[3];
+    pj_str_t s;
+    const char data[] = "hello";
+    const int datalen = 5;
+    pj_ssize_t sent, received;
+    char buf[10];
+    pj_status_t rc;
+
+    PJ_LOG(3, (THIS_FILE, "...Testing simple UDP select()"));
+    
+    // Create two UDP sockets.
+    rc = pj_sock_socket( PJ_AF_INET, PJ_SOCK_DGRAM, 0, &udp1);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...error: unable to create socket", rc);
+	status=-10; goto on_return;
+    }
+    rc = pj_sock_socket( PJ_AF_INET, PJ_SOCK_DGRAM, 0, &udp2);
+    if (udp2 == PJ_INVALID_SOCKET) {
+        app_perror("...error: unable to create socket", rc);
+	status=-20; goto on_return;
+    }
+
+    // Bind one of the UDP socket.
+    pj_bzero(&udp_addr, sizeof(udp_addr));
+    udp_addr.sin_family = PJ_AF_INET;
+    udp_addr.sin_port = UDP_PORT;
+    udp_addr.sin_addr = pj_inet_addr(pj_cstr(&s, "127.0.0.1"));
+
+    if (pj_sock_bind(udp2, &udp_addr, sizeof(udp_addr))) {
+	status=-30; goto on_return;
+    }
+
+    // Send data.
+    sent = datalen;
+    rc = pj_sock_sendto(udp1, data, &sent, 0, &udp_addr, sizeof(udp_addr));
+    if (rc != PJ_SUCCESS || sent != datalen) {
+        app_perror("...error: sendto() error", rc);
+	status=-40; goto on_return;
+    }
+
+    // Check that socket is marked as reable.
+    // Note that select() may also report that sockets are writable.
+    status = do_select(udp1, udp2, setcount);
+    if (status < 0) {
+	char errbuf[128];
+        pj_strerror(pj_get_netos_error(), errbuf, sizeof(errbuf));
+	PJ_LOG(1,(THIS_FILE, "...error: %s", errbuf));
+	status=-50; goto on_return;
+    }
+    if (status == 0) {
+	status=-60; goto on_return;
+    }
+
+    if (setcount[READ_FDS] != 1) {
+	status=-70; goto on_return;
+    }
+    if (setcount[WRITE_FDS] != 0) {
+	if (setcount[WRITE_FDS] == 2) {
+	    PJ_LOG(3,(THIS_FILE, "...info: system reports writable sockets"));
+	} else {
+	    status=-80; goto on_return;
+	}
+    } else {
+	PJ_LOG(3,(THIS_FILE, 
+		  "...info: system doesn't report writable sockets"));
+    }
+    if (setcount[EXCEPT_FDS] != 0) {
+	status=-90; goto on_return;
+    }
+
+    // Read the socket to clear readable sockets.
+    received = sizeof(buf);
+    rc = pj_sock_recv(udp2, buf, &received, 0);
+    if (rc != PJ_SUCCESS || received != 5) {
+	status=-100; goto on_return;
+    }
+    
+    status = 0;
+
+    // Test timeout on the read part.
+    // This won't necessarily return zero, as select() may report that
+    // sockets are writable.
+    setcount[0] = setcount[1] = setcount[2] = 0;
+    status = do_select(udp1, udp2, setcount);
+    if (status != 0 && status != setcount[WRITE_FDS]) {
+	PJ_LOG(3,(THIS_FILE, "...error: expecting timeout but got %d sks set",
+			     status));
+	PJ_LOG(3,(THIS_FILE, "          rdset: %d, wrset: %d, exset: %d",
+			     setcount[0], setcount[1], setcount[2]));
+	status = -110; goto on_return;
+    }
+    if (setcount[READ_FDS] != 0) {
+	PJ_LOG(3,(THIS_FILE, "...error: readable socket not expected"));
+	status = -120; goto on_return;
+    }
+
+    status = 0;
+
+on_return:
+    if (udp1 != PJ_INVALID_SOCKET)
+	pj_sock_close(udp1);
+    if (udp2 != PJ_INVALID_SOCKET)
+	pj_sock_close(udp2);
+    return status;
+}
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_select_test;
+#endif	/* INCLUDE_SELECT_TEST */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/sleep.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/sleep.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/sleep.c	(revision 1163)
@@ -0,0 +1,205 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+
+/**
+ * \page page_pjlib_sleep_test Test: Sleep, Time, and Timestamp
+ *
+ * This file provides implementation of \b sleep_test().
+ *
+ * \section sleep_test_sec Scope of the Test
+ *
+ * This tests:
+ *  - whether pj_thread_sleep() works.
+ *  - whether pj_gettimeofday() works.
+ *  - whether pj_get_timestamp() and friends works.
+ *
+ * API tested:
+ *  - pj_thread_sleep()
+ *  - pj_gettimeofday()
+ *  - PJ_TIME_VAL_SUB()
+ *  - PJ_TIME_VAL_LTE()
+ *  - pj_get_timestamp()
+ *  - pj_get_timestamp_freq() (implicitly)
+ *  - pj_elapsed_time()
+ *  - pj_elapsed_usec()
+ *
+ *
+ * This file is <b>pjlib-test/sleep.c</b>
+ *
+ * \include pjlib-test/sleep.c
+ */
+
+#if INCLUDE_SLEEP_TEST
+
+#include <pjlib.h>
+
+#define THIS_FILE   "sleep_test"
+
+static int simple_sleep_test(void)
+{
+    enum { COUNT = 5 };
+    int i;
+    pj_status_t rc;
+    
+    PJ_LOG(3,(THIS_FILE, "..will write messages every 1 second:"));
+    
+    for (i=0; i<COUNT; ++i) {
+	rc = pj_thread_sleep(1000);
+	if (rc != PJ_SUCCESS) {
+	    app_perror("...error: pj_thread_sleep()", rc);
+	    return -10;
+	}
+	PJ_LOG(3,(THIS_FILE, "...wake up.."));
+    }
+
+    return 0;
+}
+
+static int sleep_duration_test(void)
+{
+    enum { MIS = 20, DURATION = 1000, DURATION2 = 500 };
+    pj_status_t rc;
+
+    PJ_LOG(3,(THIS_FILE, "..running sleep duration test"));
+
+    /* Test pj_thread_sleep() and pj_gettimeofday() */
+    {
+        pj_time_val start, stop;
+	pj_uint32_t msec;
+
+        /* Mark start of test. */
+        rc = pj_gettimeofday(&start);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...error: pj_gettimeofday()", rc);
+            return -10;
+        }
+
+        /* Sleep */
+        rc = pj_thread_sleep(DURATION);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...error: pj_thread_sleep()", rc);
+            return -20;
+        }
+
+        /* Mark end of test. */
+        rc = pj_gettimeofday(&stop);
+
+        /* Calculate duration (store in stop). */
+        PJ_TIME_VAL_SUB(stop, start);
+
+	/* Convert to msec. */
+	msec = PJ_TIME_VAL_MSEC(stop);
+
+	/* Check if it's within range. */
+	if (msec < DURATION * (100-MIS)/100 ||
+	    msec > DURATION * (100+MIS)/100)
+	{
+	    PJ_LOG(3,(THIS_FILE, 
+		      "...error: slept for %d ms instead of %d ms "
+		      "(outside %d%% err window)",
+		      msec, DURATION, MIS));
+	    return -30;
+	}
+    }
+
+
+    /* Test pj_thread_sleep() and pj_get_timestamp() and friends */
+    {
+	pj_time_val t1, t2;
+        pj_timestamp start, stop;
+	pj_uint32_t msec;
+
+	pj_thread_sleep(0);
+
+        /* Mark start of test. */
+        rc = pj_get_timestamp(&start);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...error: pj_get_timestamp()", rc);
+            return -60;
+        }
+
+	/* ..also with gettimeofday() */
+	pj_gettimeofday(&t1);
+
+        /* Sleep */
+        rc = pj_thread_sleep(DURATION2);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...error: pj_thread_sleep()", rc);
+            return -70;
+        }
+
+        /* Mark end of test. */
+        pj_get_timestamp(&stop);
+
+	/* ..also with gettimeofday() */
+	pj_gettimeofday(&t2);
+
+	/* Compare t1 and t2. */
+	if (PJ_TIME_VAL_LT(t2, t1)) {
+	    PJ_LOG(3,(THIS_FILE, "...error: t2 is less than t1!!"));
+	    return -75;
+	}
+
+        /* Get elapsed time in msec */
+        msec = pj_elapsed_msec(&start, &stop);
+
+	/* Check if it's within range. */
+	if (msec < DURATION2 * (100-MIS)/100 ||
+	    msec > DURATION2 * (100+MIS)/100)
+	{
+	    PJ_LOG(3,(THIS_FILE, 
+		      "...error: slept for %d ms instead of %d ms "
+		      "(outside %d%% err window)",
+		      msec, DURATION2, MIS));
+	    PJ_TIME_VAL_SUB(t2, t1);
+	    PJ_LOG(3,(THIS_FILE, 
+		      "...info: gettimeofday() reported duration is "
+		      "%d msec",
+		      PJ_TIME_VAL_MSEC(t2)));
+
+	    return -76;
+	}
+    }
+
+    /* All done. */
+    return 0;
+}
+
+int sleep_test()
+{
+    int rc;
+
+    rc = simple_sleep_test();
+    if (rc != PJ_SUCCESS)
+	return rc;
+
+    rc = sleep_duration_test();
+    if (rc != PJ_SUCCESS)
+	return rc;
+
+    return 0;
+}
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_sleep_test;
+#endif  /* INCLUDE_SLEEP_TEST */
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/sock.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/sock.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/sock.c	(revision 1163)
@@ -0,0 +1,502 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 <pjlib.h>
+#include "test.h"
+
+
+/**
+ * \page page_pjlib_sock_test Test: Socket
+ *
+ * This file provides implementation of \b sock_test(). It tests the
+ * various aspects of the socket API.
+ *
+ * \section sock_test_scope_sec Scope of the Test
+ *
+ * The scope of the test:
+ *  - verify the validity of the address structs.
+ *  - verify that address manipulation API works.
+ *  - simple socket creation and destruction.
+ *  - simple socket send/recv and sendto/recvfrom.
+ *  - UDP connect()
+ *  - send/recv big data.
+ *  - all for both UDP and TCP.
+ *
+ * The APIs tested in this test:
+ *  - pj_inet_aton()
+ *  - pj_inet_ntoa()
+ *  - pj_gethostname()
+ *  - pj_sock_socket()
+ *  - pj_sock_close()
+ *  - pj_sock_send()
+ *  - pj_sock_sendto()
+ *  - pj_sock_recv()
+ *  - pj_sock_recvfrom()
+ *  - pj_sock_bind()
+ *  - pj_sock_connect()
+ *  - pj_sock_listen()
+ *  - pj_sock_accept()
+ *  - pj_gethostbyname()
+ *
+ *
+ * This file is <b>pjlib-test/sock.c</b>
+ *
+ * \include pjlib-test/sock.c
+ */
+
+#if INCLUDE_SOCK_TEST
+
+#define UDP_PORT	51234
+#define TCP_PORT        (UDP_PORT+10)
+#define BIG_DATA_LEN	9000
+#define ADDRESS		"127.0.0.1"
+#define A0		127
+#define A1		0
+#define A2		0
+#define A3		1
+
+
+static char bigdata[BIG_DATA_LEN];
+static char bigbuffer[BIG_DATA_LEN];
+
+static int format_test(void)
+{
+    pj_str_t s = pj_str(ADDRESS);
+    unsigned char *p;
+    pj_in_addr addr;
+    char zero[64];
+    pj_sockaddr_in addr2;
+    const pj_str_t *hostname;
+
+    PJ_LOG(3,("test", "...format_test()"));
+    
+    /* pj_inet_aton() */
+    if (pj_inet_aton(&s, &addr) != 1)
+	return -10;
+    
+    /* Check the result. */
+    p = (unsigned char*)&addr;
+    if (p[0]!=A0 || p[1]!=A1 || p[2]!=A2 || p[3]!=A3) {
+	PJ_LOG(3,("test", "  error: mismatched address. p0=%d, p1=%d, "
+			  "p2=%d, p3=%d", p[0] & 0xFF, p[1] & 0xFF, 
+			   p[2] & 0xFF, p[3] & 0xFF));
+	return -15;
+    }
+
+    /* pj_inet_ntoa() */
+    p = (unsigned char*) pj_inet_ntoa(addr);
+    if (!p)
+	return -20;
+
+    if (pj_strcmp2(&s, (char*)p) != 0)
+	return -30;
+
+    /* Test that pj_sockaddr_in_init() initialize the whole structure, 
+     * including sin_zero.
+     */
+    pj_sockaddr_in_init(&addr2, 0, 1000);
+    pj_bzero(zero, sizeof(zero));
+    if (pj_memcmp(addr2.sin_zero, zero, sizeof(addr2.sin_zero)) != 0)
+	return -35;
+
+    /* pj_gethostname() */
+    hostname = pj_gethostname();
+    if (!hostname || !hostname->ptr || !hostname->slen)
+	return -40;
+
+    PJ_LOG(3,("test", "....hostname is %.*s", 
+	      (int)hostname->slen, hostname->ptr));
+
+    /* pj_gethostaddr() */
+
+
+    return 0;
+}
+
+static int simple_sock_test(void)
+{
+    int types[2];
+    pj_sock_t sock;
+    int i;
+    pj_status_t rc = PJ_SUCCESS;
+
+    types[0] = PJ_SOCK_STREAM;
+    types[1] = PJ_SOCK_DGRAM;
+
+    PJ_LOG(3,("test", "...simple_sock_test()"));
+
+    for (i=0; i<sizeof(types)/sizeof(types[0]); ++i) {
+	
+	rc = pj_sock_socket(PJ_AF_INET, types[i], 0, &sock);
+	if (rc != PJ_SUCCESS) {
+	    app_perror("...error: unable to create socket type %d", rc);
+	    break;
+	} else {
+	    rc = pj_sock_close(sock);
+	    if (rc != 0) {
+		app_perror("...error: close socket", rc);
+		break;
+	    }
+	}
+    }
+    return rc;
+}
+
+
+static int send_recv_test(int sock_type,
+                          pj_sock_t ss, pj_sock_t cs,
+			  pj_sockaddr_in *dstaddr, pj_sockaddr_in *srcaddr, 
+			  int addrlen)
+{
+    enum { DATA_LEN = 16 };
+    char senddata[DATA_LEN+4], recvdata[DATA_LEN+4];
+    pj_ssize_t sent, received, total_received;
+    pj_status_t rc;
+
+    TRACE_(("test", "....create_random_string()"));
+    pj_create_random_string(senddata, DATA_LEN);
+    senddata[DATA_LEN-1] = '\0';
+
+    /*
+     * Test send/recv small data.
+     */
+    TRACE_(("test", "....sendto()"));
+    if (dstaddr) {
+        sent = DATA_LEN;
+	rc = pj_sock_sendto(cs, senddata, &sent, 0, dstaddr, addrlen);
+	if (rc != PJ_SUCCESS || sent != DATA_LEN) {
+	    app_perror("...sendto error", rc);
+	    rc = -140; goto on_error;
+	}
+    } else {
+        sent = DATA_LEN;
+	rc = pj_sock_send(cs, senddata, &sent, 0);
+	if (rc != PJ_SUCCESS || sent != DATA_LEN) {
+	    app_perror("...send error", rc);
+	    rc = -145; goto on_error;
+	}
+    }
+
+    TRACE_(("test", "....recv()"));
+    if (srcaddr) {
+	pj_sockaddr_in addr;
+	int srclen = sizeof(addr);
+	
+	pj_bzero(&addr, sizeof(addr));
+
+        received = DATA_LEN;
+	rc = pj_sock_recvfrom(ss, recvdata, &received, 0, &addr, &srclen);
+	if (rc != PJ_SUCCESS || received != DATA_LEN) {
+	    app_perror("...recvfrom error", rc);
+	    rc = -150; goto on_error;
+	}
+	if (srclen != addrlen)
+	    return -151;
+	if (pj_memcmp(&addr, srcaddr, srclen) != 0) {
+	    char srcaddr_str[32], addr_str[32];
+	    strcpy(srcaddr_str, pj_inet_ntoa(srcaddr->sin_addr));
+	    strcpy(addr_str, pj_inet_ntoa(addr.sin_addr));
+	    PJ_LOG(3,("test", "...error: src address mismatch (original=%s, "
+			      "recvfrom addr=%s)", 
+			      srcaddr_str, addr_str));
+	    return -152;
+	}
+	
+    } else {
+        /* Repeat recv() until all data is received.
+         * This applies only for non-UDP of course, since for UDP
+         * we would expect all data to be received in one packet.
+         */
+        total_received = 0;
+        do {
+            received = DATA_LEN-total_received;
+	    rc = pj_sock_recv(ss, recvdata+total_received, &received, 0);
+	    if (rc != PJ_SUCCESS) {
+	        app_perror("...recv error", rc);
+	        rc = -155; goto on_error;
+	    }
+            if (received <= 0) {
+                PJ_LOG(3,("", "...error: socket has closed! (received=%d)",
+                          received));
+                rc = -156; goto on_error;
+            }
+	    if (received != DATA_LEN-total_received) {
+                if (sock_type != PJ_SOCK_STREAM) {
+	            PJ_LOG(3,("", "...error: expecting %u bytes, got %u bytes",
+                              DATA_LEN-total_received, received));
+	            rc = -157; goto on_error;
+                }
+	    }
+            total_received += received;
+        } while (total_received < DATA_LEN);
+    }
+
+    TRACE_(("test", "....memcmp()"));
+    if (pj_memcmp(senddata, recvdata, DATA_LEN) != 0) {
+	PJ_LOG(3,("","...error: received data mismatch "
+		     "(got:'%s' expecting:'%s'",
+		     recvdata, senddata));
+	rc = -160; goto on_error;
+    }
+
+    /*
+     * Test send/recv big data.
+     */
+    TRACE_(("test", "....sendto()"));
+    if (dstaddr) {
+        sent = BIG_DATA_LEN;
+	rc = pj_sock_sendto(cs, bigdata, &sent, 0, dstaddr, addrlen);
+	if (rc != PJ_SUCCESS || sent != BIG_DATA_LEN) {
+	    app_perror("...sendto error", rc);
+	    rc = -161; goto on_error;
+	}
+    } else {
+        sent = BIG_DATA_LEN;
+	rc = pj_sock_send(cs, bigdata, &sent, 0);
+	if (rc != PJ_SUCCESS || sent != BIG_DATA_LEN) {
+	    app_perror("...send error", rc);
+	    rc = -165; goto on_error;
+	}
+    }
+
+    TRACE_(("test", "....recv()"));
+
+    /* Repeat recv() until all data is received.
+     * This applies only for non-UDP of course, since for UDP
+     * we would expect all data to be received in one packet.
+     */
+    total_received = 0;
+    do {
+        received = BIG_DATA_LEN-total_received;
+	rc = pj_sock_recv(ss, bigbuffer+total_received, &received, 0);
+	if (rc != PJ_SUCCESS) {
+	    app_perror("...recv error", rc);
+	    rc = -170; goto on_error;
+	}
+        if (received <= 0) {
+            PJ_LOG(3,("", "...error: socket has closed! (received=%d)",
+                      received));
+            rc = -173; goto on_error;
+        }
+	if (received != BIG_DATA_LEN-total_received) {
+            if (sock_type != PJ_SOCK_STREAM) {
+	        PJ_LOG(3,("", "...error: expecting %u bytes, got %u bytes",
+                          BIG_DATA_LEN-total_received, received));
+	        rc = -176; goto on_error;
+            }
+	}
+        total_received += received;
+    } while (total_received < BIG_DATA_LEN);
+
+    TRACE_(("test", "....memcmp()"));
+    if (pj_memcmp(bigdata, bigbuffer, BIG_DATA_LEN) != 0) {
+        PJ_LOG(3,("", "...error: received data has been altered!"));
+	rc = -180; goto on_error;
+    }
+    
+    rc = 0;
+
+on_error:
+    return rc;
+}
+
+static int udp_test(void)
+{
+    pj_sock_t cs = PJ_INVALID_SOCKET, ss = PJ_INVALID_SOCKET;
+    pj_sockaddr_in dstaddr, srcaddr;
+    pj_str_t s;
+    pj_status_t rc = 0, retval;
+
+    PJ_LOG(3,("test", "...udp_test()"));
+
+    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &ss);
+    if (rc != 0) {
+	app_perror("...error: unable to create socket", rc);
+	return -100;
+    }
+
+    rc = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &cs);
+    if (rc != 0)
+	return -110;
+
+    /* Bind server socket. */
+    pj_bzero(&dstaddr, sizeof(dstaddr));
+    dstaddr.sin_family = PJ_AF_INET;
+    dstaddr.sin_port = pj_htons(UDP_PORT);
+    dstaddr.sin_addr = pj_inet_addr(pj_cstr(&s, ADDRESS));
+    
+    if ((rc=pj_sock_bind(ss, &dstaddr, sizeof(dstaddr))) != 0) {
+	app_perror("...bind error udp:"ADDRESS, rc);
+	rc = -120; goto on_error;
+    }
+
+    /* Bind client socket. */
+    pj_bzero(&srcaddr, sizeof(srcaddr));
+    srcaddr.sin_family = PJ_AF_INET;
+    srcaddr.sin_port = pj_htons(UDP_PORT-1);
+    srcaddr.sin_addr = pj_inet_addr(pj_cstr(&s, ADDRESS));
+
+    if ((rc=pj_sock_bind(cs, &srcaddr, sizeof(srcaddr))) != 0) {
+	app_perror("...bind error", rc);
+	rc = -121; goto on_error;
+    }
+	    
+    /* Test send/recv, with sendto */
+    rc = send_recv_test(PJ_SOCK_DGRAM, ss, cs, &dstaddr, NULL, 
+                        sizeof(dstaddr));
+    if (rc != 0)
+	goto on_error;
+
+    /* Test send/recv, with sendto and recvfrom */
+    rc = send_recv_test(PJ_SOCK_DGRAM, ss, cs, &dstaddr, 
+                        &srcaddr, sizeof(dstaddr));
+    if (rc != 0)
+	goto on_error;
+
+    /* connect() the sockets. */
+    rc = pj_sock_connect(cs, &dstaddr, sizeof(dstaddr));
+    if (rc != 0) {
+	app_perror("...connect() error", rc);
+	rc = -122; goto on_error;
+    }
+
+    /* Test send/recv with send() */
+    rc = send_recv_test(PJ_SOCK_DGRAM, ss, cs, NULL, NULL, 0);
+    if (rc != 0)
+	goto on_error;
+
+    /* Test send/recv with send() and recvfrom */
+    rc = send_recv_test(PJ_SOCK_DGRAM, ss, cs, NULL, &srcaddr, 
+                        sizeof(srcaddr));
+    if (rc != 0)
+	goto on_error;
+
+on_error:
+    retval = rc;
+    if (cs != PJ_INVALID_SOCKET) {
+        rc = pj_sock_close(cs);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...error in closing socket", rc);
+            return -1000;
+        }
+    }
+    if (ss != PJ_INVALID_SOCKET) {
+        rc = pj_sock_close(ss);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...error in closing socket", rc);
+            return -1010;
+        }
+    }
+
+    return retval;
+}
+
+static int tcp_test(void)
+{
+    pj_sock_t cs, ss;
+    pj_status_t rc = 0, retval;
+
+    PJ_LOG(3,("test", "...tcp_test()"));
+
+    rc = app_socketpair(PJ_AF_INET, PJ_SOCK_STREAM, 0, &ss, &cs);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...error: app_socketpair():", rc);
+        return -2000;
+    }
+
+    /* Test send/recv with send() and recv() */
+    retval = send_recv_test(PJ_SOCK_STREAM, ss, cs, NULL, NULL, 0);
+
+    rc = pj_sock_close(cs);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...error in closing socket", rc);
+        return -2000;
+    }
+
+    rc = pj_sock_close(ss);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...error in closing socket", rc);
+        return -2010;
+    }
+
+    return retval;
+}
+
+static int ioctl_test(void)
+{
+    return 0;
+}
+
+static int gethostbyname_test(void)
+{
+    pj_str_t host;
+    pj_hostent he;
+    pj_status_t status;
+
+    /* Testing pj_gethostbyname() with invalid host */
+    host = pj_str("an-invalid-host-name");
+    status = pj_gethostbyname(&host, &he);
+
+    /* Must return failure! */
+    if (status == PJ_SUCCESS)
+	return -20100;
+    else
+	return 0;
+}
+
+int sock_test()
+{
+    int rc;
+    
+    pj_create_random_string(bigdata, BIG_DATA_LEN);
+
+    rc = format_test();
+    if (rc != 0)
+	return rc;
+
+    rc = gethostbyname_test();
+    if (rc != 0)
+	return rc;
+
+    rc = simple_sock_test();
+    if (rc != 0)
+	return rc;
+
+    rc = ioctl_test();
+    if (rc != 0)
+	return rc;
+
+    rc = udp_test();
+    if (rc != 0)
+	return rc;
+
+    rc = tcp_test();
+    if (rc != 0)
+	return rc;
+
+    return 0;
+}
+
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_sock_test;
+#endif	/* INCLUDE_SOCK_TEST */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/sock_perf.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/sock_perf.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/sock_perf.c	(revision 1163)
@@ -0,0 +1,183 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+#include <pjlib.h>
+#include <pj/compat/high_precision.h>
+
+
+/**
+ * \page page_pjlib_sock_perf_test Test: Socket Performance
+ *
+ * Test the performance of the socket communication. This will perform
+ * simple producer-consumer type of test, where we calculate how long
+ * does it take to send certain number of packets from producer to
+ * consumer.
+ *
+ * This file is <b>pjlib-test/sock_perf.c</b>
+ *
+ * \include pjlib-test/sock_perf.c
+ */
+
+#if INCLUDE_SOCK_PERF_TEST
+
+/*
+ * sock_producer_consumer()
+ *
+ * Simple producer-consumer benchmarking. Send loop number of
+ * buf_size size packets as fast as possible.
+ */
+static int sock_producer_consumer(int sock_type,
+                                  unsigned buf_size,
+                                  unsigned loop, 
+                                  unsigned *p_bandwidth)
+{
+    pj_sock_t consumer, producer;
+    pj_pool_t *pool;
+    char *outgoing_buffer, *incoming_buffer;
+    pj_timestamp start, stop;
+    unsigned i;
+    pj_highprec_t elapsed, bandwidth;
+    pj_size_t total_received;
+    pj_status_t rc;
+
+    /* Create pool. */
+    pool = pj_pool_create(mem, NULL, 4096, 4096, NULL);
+    if (!pool)
+        return -10;
+
+    /* Create producer-consumer pair. */
+    rc = app_socketpair(PJ_AF_INET, sock_type, 0, &consumer, &producer);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...error: create socket pair", rc);
+        return -20;
+    }
+
+    /* Create buffers. */
+    outgoing_buffer = pj_pool_alloc(pool, buf_size);
+    incoming_buffer = pj_pool_alloc(pool, buf_size);
+
+    /* Start loop. */
+    pj_get_timestamp(&start);
+    total_received = 0;
+    for (i=0; i<loop; ++i) {
+        pj_ssize_t sent, part_received, received;
+	pj_time_val delay;
+
+        sent = buf_size;
+        rc = pj_sock_send(producer, outgoing_buffer, &sent, 0);
+        if (rc != PJ_SUCCESS || sent != (pj_ssize_t)buf_size) {
+            app_perror("...error: send()", rc);
+            return -61;
+        }
+
+        /* Repeat recv() until all data is part_received.
+         * This applies only for non-UDP of course, since for UDP
+         * we would expect all data to be part_received in one packet.
+         */
+        received = 0;
+        do {
+            part_received = buf_size-received;
+	    rc = pj_sock_recv(consumer, incoming_buffer+received, 
+			      &part_received, 0);
+	    if (rc != PJ_SUCCESS) {
+	        app_perror("...recv error", rc);
+	        return -70;
+	    }
+            if (part_received <= 0) {
+                PJ_LOG(3,("", "...error: socket has closed (part_received=%d)!",
+                          part_received));
+                return -73;
+            }
+	    if ((pj_size_t)part_received != buf_size-received) {
+                if (sock_type != PJ_SOCK_STREAM) {
+	            PJ_LOG(3,("", "...error: expecting %u bytes, got %u bytes",
+                              buf_size-received, part_received));
+	            return -76;
+                }
+	    }
+            received += part_received;
+        } while ((pj_size_t)received < buf_size);
+
+	total_received += received;
+
+	/* Stop test if it's been runnign for more than 10 secs. */
+	pj_get_timestamp(&stop);
+	delay = pj_elapsed_time(&start, &stop);
+	if (delay.sec > 10)
+	    break;
+    }
+
+    /* Stop timer. */
+    pj_get_timestamp(&stop);
+
+    elapsed = pj_elapsed_usec(&start, &stop);
+
+    /* bandwidth = total_received * 1000 / elapsed */
+    bandwidth = total_received;
+    pj_highprec_mul(bandwidth, 1000);
+    pj_highprec_div(bandwidth, elapsed);
+    
+    *p_bandwidth = (pj_uint32_t)bandwidth;
+
+    /* Close sockets. */
+    pj_sock_close(consumer);
+    pj_sock_close(producer);
+
+    /* Done */
+    pj_pool_release(pool);
+
+    return 0;
+}
+
+/*
+ * sock_perf_test()
+ *
+ * Main test entry.
+ */
+int sock_perf_test(void)
+{
+    enum { LOOP = 64 * 1024 };
+    int rc;
+    unsigned bandwidth;
+
+    PJ_LOG(3,("", "...benchmarking socket "
+                  "(2 sockets, packet=512, single threaded):"));
+    
+    /* Benchmarking UDP */
+    rc = sock_producer_consumer(PJ_SOCK_DGRAM, 512, LOOP, &bandwidth);
+    if (rc != 0) return rc;
+    PJ_LOG(3,("", "....bandwidth UDP = %d KB/s", bandwidth));
+
+    /* Benchmarking TCP */
+    rc = sock_producer_consumer(PJ_SOCK_STREAM, 512, LOOP, &bandwidth);
+    if (rc != 0) return rc;
+    PJ_LOG(3,("", "....bandwidth TCP = %d KB/s", bandwidth));
+
+    return rc;
+}
+
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_sock_perf_test;
+#endif  /* INCLUDE_SOCK_PERF_TEST */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/string.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/string.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/string.c	(revision 1163)
@@ -0,0 +1,403 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/string.h>
+#include <pj/pool.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include "test.h"
+
+#define THIS_FILE	"string.c"
+
+/**
+ * \page page_pjlib_string_test Test: String
+ *
+ * This file provides implementation of \b string_test(). It tests the
+ * functionality of the string API.
+ *
+ * \section sleep_test_sec Scope of the Test
+ *
+ * API tested:
+ *  - pj_str()
+ *  - pj_strcmp()
+ *  - pj_strcmp2()
+ *  - pj_stricmp()
+ *  - pj_strlen()
+ *  - pj_strncmp()
+ *  - pj_strnicmp()
+ *  - pj_strchr()
+ *  - pj_strdup()
+ *  - pj_strdup2()
+ *  - pj_strcpy()
+ *  - pj_strcat()
+ *  - pj_strtrim()
+ *  - pj_utoa()
+ *  - pj_strtoul()
+ *  - pj_create_random_string()
+ *  - ... and mode..
+ *
+ * This file is <b>pjlib-test/string.c</b>
+ *
+ * \include pjlib-test/string.c
+ */
+
+#if INCLUDE_STRING_TEST
+
+#ifdef _MSC_VER
+#   pragma warning(disable: 4204)
+#endif
+
+#define HELLO_WORLD	"Hello World"
+#define JUST_HELLO	"Hello"
+#define UL_VALUE	3456789012UL
+
+#if 1
+/* See if both integers have the same sign */
+PJ_INLINE(int) cmp(const char *expr, int i, int j)
+{
+    i = !((i>0 && j>0) || (i<0 && j<0) || (i==0 && j==0));
+    if (i) {
+	PJ_LOG(3,(THIS_FILE,"   error: %s: expecting %d, got %d", expr, j, i));
+    }
+    return i;
+}
+#else
+/* For strict comparison, must be equal */
+PJ_INLINE(int) cmp(const char *expr, int i, int j)
+{
+    PJ_UNUSED_ARG(expr);
+    return i!=j;
+}
+#endif
+
+#define C(expr, res)	cmp(#expr, expr, res)
+
+static int stricmp_test(void)
+{
+/* This specificly tests and benchmark pj_stricmp(), pj_stricmp_alnum().
+ * In addition, it also tests pj_stricmp2(), pj_strnicmp(), and 
+ * pj_strnicmp2().
+ */
+#define STRTEST(res,S1,S2,code)	\
+	    do { \
+		s1.ptr=S1; s1.slen=S1?len:0; \
+		s2.ptr=S2; s2.slen=S2?len:0; \
+		pj_get_timestamp(&t1); \
+	        if (C(pj_stricmp(&s1,&s2),res)) return code; \
+		pj_get_timestamp(&t2); \
+		pj_sub_timestamp(&t2, &t1); \
+		pj_add_timestamp(&e1, &t2); \
+		pj_get_timestamp(&t1); \
+	        if (C(pj_stricmp_alnum(&s1,&s2),res)) return code-1; \
+		pj_get_timestamp(&t2); \
+		pj_sub_timestamp(&t2, &t1); \
+		pj_add_timestamp(&e2, &t2); \
+		if (C(pj_stricmp2(&s1,S2),res)) return code*10; \
+		if (C(pj_strnicmp(&s1,&s2,len),res)) return code*100; \
+		if (C(pj_strnicmp2(&s1,S2,len),res)) return code*1000; \
+	    } while (0)
+
+    char *buf;
+    pj_str_t s1, s2;
+    pj_timestamp t1, t2, e1, e2, zero;
+    pj_uint32_t c1, c2;
+    int len;
+
+    e1.u32.hi = e1.u32.lo = e2.u32.hi = e2.u32.lo = 0;
+
+    pj_thread_sleep(0);
+
+    /* Compare empty strings. */
+    len=0;
+    STRTEST( 0, "","",-500);
+    STRTEST( 0, NULL,"",-502);
+    STRTEST( 0, "",NULL,-504);
+    STRTEST( 0, NULL,NULL,-506);
+    STRTEST( 0, "hello","world",-508);
+
+    /* equal, length=1 
+     * use buffer to simulate non-aligned string.
+     */
+    buf = "a""A";
+    len=1;
+    STRTEST( 0, "a",buf+0,-510);
+    STRTEST( 0, "a",buf+1,-512);
+    STRTEST( -1, "O", "P", -514);
+    STRTEST(-1, NULL, "a", -516);
+    STRTEST(1, "a", NULL, -518);
+
+    /* equal, length=2 
+     * use buffer to simulate non-aligned string.
+     */
+    buf = "aa""Aa""aA""AA";
+    len=2;
+    STRTEST( 0, "aa",buf+0,-520);
+    STRTEST( 0, "aa",buf+2,-522);
+    STRTEST( 0, "aa",buf+4,-524);
+    STRTEST( 0, "aa",buf+6,-524);
+
+    /* equal, length=3 
+     * use buffer to simulate non-aligned string.
+     */
+    buf = "aaa""Aaa""aAa""aaA""AAa""aAA""AaA""AAA";
+    len=3;
+    STRTEST( 0, "aaa",buf+0,-530);
+    STRTEST( 0, "aaa",buf+3,-532);
+    STRTEST( 0, "aaa",buf+6,-534);
+    STRTEST( 0, "aaa",buf+9,-536);
+    STRTEST( 0, "aaa",buf+12,-538);
+    STRTEST( 0, "aaa",buf+15,-540);
+    STRTEST( 0, "aaa",buf+18,-542);
+    STRTEST( 0, "aaa",buf+21,-534);
+
+    /* equal, length=4 */
+    len=4;
+    STRTEST( 0, "aaaa","aaaa",-540);
+    STRTEST( 0, "aaaa","Aaaa",-542);
+    STRTEST( 0, "aaaa","aAaa",-544);
+    STRTEST( 0, "aaaa","aaAa",-546);
+    STRTEST( 0, "aaaa","aaaA",-548);
+    STRTEST( 0, "aaaa","AAaa",-550);
+    STRTEST( 0, "aaaa","aAAa",-552);
+    STRTEST( 0, "aaaa","aaAA",-554);
+    STRTEST( 0, "aaaa","AaAa",-556);
+    STRTEST( 0, "aaaa","aAaA",-558);
+    STRTEST( 0, "aaaa","AaaA",-560);
+    STRTEST( 0, "aaaa","AAAa",-562);
+    STRTEST( 0, "aaaa","aAAA",-564);
+    STRTEST( 0, "aaaa","AAaA",-566);
+    STRTEST( 0, "aaaa","AaAA",-568);
+    STRTEST( 0, "aaaa","AAAA",-570);
+
+    /* equal, length=5 */
+    buf = "aaaAa""AaaaA""AaAaA""AAAAA";
+    len=5;
+    STRTEST( 0, "aaaaa",buf+0,-580);
+    STRTEST( 0, "aaaaa",buf+5,-582);
+    STRTEST( 0, "aaaaa",buf+10,-584);
+    STRTEST( 0, "aaaaa",buf+15,-586);
+
+    /* not equal, length=1 */
+    len=1;
+    STRTEST( -1, "a", "b", -600);
+
+    /* not equal, length=2 */
+    buf = "ab""ba";
+    len=2;
+    STRTEST( -1, "aa", buf+0, -610);
+    STRTEST( -1, "aa", buf+2, -612);
+
+    /* not equal, length=3 */
+    buf = "aab""aba""baa";
+    len=3;
+    STRTEST( -1, "aaa", buf+0, -620);
+    STRTEST( -1, "aaa", buf+3, -622);
+    STRTEST( -1, "aaa", buf+6, -624);
+
+    /* not equal, length=4 */
+    buf = "aaab""aaba""abaa""baaa";
+    len=4;
+    STRTEST( -1, "aaaa", buf+0, -630);
+    STRTEST( -1, "aaaa", buf+4, -632);
+    STRTEST( -1, "aaaa", buf+8, -634);
+    STRTEST( -1, "aaaa", buf+12, -636);
+
+    /* not equal, length=5 */
+    buf="aaaab""aaaba""aabaa""abaaa""baaaa";
+    len=5;
+    STRTEST( -1, "aaaaa", buf+0, -640);
+    STRTEST( -1, "aaaaa", buf+5, -642);
+    STRTEST( -1, "aaaaa", buf+10, -644);
+    STRTEST( -1, "aaaaa", buf+15, -646);
+    STRTEST( -1, "aaaaa", buf+20, -648);
+
+    zero.u32.hi = zero.u32.lo = 0;
+    c1 = pj_elapsed_cycle(&zero, &e1);
+    c2 = pj_elapsed_cycle(&zero, &e2);
+
+    if (c1 < c2) {
+	PJ_LOG(3,("", "  info: pj_stricmp_alnum is slower than pj_stricmp!"));
+	//return -700;
+    }
+
+    PJ_LOG(3, ("", "  time: stricmp=%u, stricmp_alnum=%u (speedup=%d.%02dx)", 
+		   c1, c2,
+		   (c1 * 100 / c2) / 100,
+		   (c1 * 100 / c2) % 100));
+    return 0;
+#undef STRTEST
+}
+
+/* This tests pj_strcmp(), pj_strcmp2(), pj_strncmp(), pj_strncmp2() */
+static int strcmp_test(void)
+{
+#define STR_TEST(res,S1,S2,code)    \
+	    do { \
+		s1.ptr=S1; s1.slen=S1?len:0; \
+		s2.ptr=S2; s2.slen=S2?len:0; \
+	        if (C(pj_strcmp(&s1,&s2),res)) return code; \
+		if (C(pj_strcmp2(&s1,S2),res)) return code-1; \
+		if (C(pj_strncmp(&s1,&s2,len),res)) return code-2; \
+		if (C(pj_strncmp2(&s1,S2,len),res)) return code-3; \
+	    } while (0)
+
+    pj_str_t s1, s2;
+    int len;
+    
+    /* Test with length == 0 */
+    len=0;
+    STR_TEST(0, "", "", -400);
+    STR_TEST(0, NULL, "", -405);
+    STR_TEST(0, "", NULL, -410);
+    STR_TEST(0, NULL, NULL, -415);
+    STR_TEST(0, "hello", "", -420);
+    STR_TEST(0, "hello", NULL, -425);
+
+    /* Test with length != 0 */
+    len = 2;
+    STR_TEST(0, "12", "12", -430);
+    STR_TEST(1, "12", "1", -435);
+    STR_TEST(-1, "1", "12", -440);
+    STR_TEST(-1, NULL, "12", -445);
+    STR_TEST(1, "12", NULL, -450);
+
+    return 0;
+
+#undef STR_TEST
+}
+
+int string_test(void)
+{
+    const pj_str_t hello_world = { HELLO_WORLD, strlen(HELLO_WORLD) };
+    const pj_str_t just_hello = { JUST_HELLO, strlen(JUST_HELLO) };
+    pj_str_t s1, s2, s3, s4, s5;
+    enum { RCOUNT = 10, RLEN = 16 };
+    pj_str_t random[RCOUNT];
+    pj_pool_t *pool;
+    int i;
+
+    pool = pj_pool_create(mem, NULL, 4096, 0, NULL);
+    if (!pool) return -5;
+    
+    /* 
+     * pj_str(), pj_strcmp(), pj_stricmp(), pj_strlen(), 
+     * pj_strncmp(), pj_strchr() 
+     */
+    s1 = pj_str(HELLO_WORLD);
+    if (pj_strcmp(&s1, &hello_world) != 0)
+	return -10;
+    if (pj_stricmp(&s1, &hello_world) != 0)
+	return -20;
+    if (pj_strcmp(&s1, &just_hello) <= 0)
+	return -30;
+    if (pj_stricmp(&s1, &just_hello) <= 0)
+	return -40;
+    if (pj_strlen(&s1) != strlen(HELLO_WORLD))
+	return -50;
+    if (pj_strncmp(&s1, &hello_world, 5) != 0)
+	return -60;
+    if (pj_strnicmp(&s1, &hello_world, 5) != 0)
+	return -70;
+    if (pj_strchr(&s1, HELLO_WORLD[1]) != s1.ptr+1)
+	return -80;
+
+    /* 
+     * pj_strdup() 
+     */
+    if (!pj_strdup(pool, &s2, &s1))
+	return -100;
+    if (pj_strcmp(&s1, &s2) != 0)
+	return -110;
+    
+    /* 
+     * pj_strcpy(), pj_strcat() 
+     */
+    s3.ptr = pj_pool_alloc(pool, 256);
+    if (!s3.ptr) 
+	return -200;
+    pj_strcpy(&s3, &s2);
+    pj_strcat(&s3, &just_hello);
+
+    if (pj_strcmp2(&s3, HELLO_WORLD JUST_HELLO) != 0)
+	return -210;
+
+    /* 
+     * pj_strdup2(), pj_strtrim(). 
+     */
+    pj_strdup2(pool, &s4, " " HELLO_WORLD "\t ");
+    pj_strtrim(&s4);
+    if (pj_strcmp2(&s4, HELLO_WORLD) != 0)
+	return -250;
+
+    /* 
+     * pj_utoa() 
+     */
+    s5.ptr = pj_pool_alloc(pool, 16);
+    if (!s5.ptr)
+	return -270;
+    s5.slen = pj_utoa(UL_VALUE, s5.ptr);
+
+    /* 
+     * pj_strtoul() 
+     */
+    if (pj_strtoul(&s5) != UL_VALUE)
+	return -280;
+
+    /* 
+     * pj_create_random_string() 
+     * Check that no duplicate strings are returned.
+     */
+    for (i=0; i<RCOUNT; ++i) {
+	int j;
+	
+	random[i].ptr = pj_pool_alloc(pool, RLEN);
+	if (!random[i].ptr)
+	    return -320;
+
+        random[i].slen = RLEN;
+	pj_create_random_string(random[i].ptr, RLEN);
+
+	for (j=0; j<i; ++j) {
+	    if (pj_strcmp(&random[i], &random[j])==0)
+		return -330;
+	}
+    }
+
+    /* Done. */
+    pj_pool_release(pool);
+
+    /* Case sensitive comparison test. */
+    i = strcmp_test();
+    if (i != 0)
+	return i;
+
+    /* Caseless comparison test. */
+    i = stricmp_test();
+    if (i != 0)
+	return i;
+
+    return 0;
+}
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_string_test;
+#endif	/* INCLUDE_STRING_TEST */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/test.c	(revision 1163)
@@ -0,0 +1,209 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+#include <pjlib.h>
+#ifdef _MSC_VER
+#  pragma warning(disable:4127)
+#endif
+
+#define DO_TEST(test)	do { \
+			    PJ_LOG(3, ("test", "Running %s...", #test));  \
+			    rc = test; \
+			    PJ_LOG(3, ("test",  \
+				       "%s(%d)",  \
+				       (rc ? "..ERROR" : "..success"), rc)); \
+			    if (rc!=0) goto on_return; \
+			} while (0)
+
+
+pj_pool_factory *mem;
+
+int param_echo_sock_type;
+const char *param_echo_server = ECHO_SERVER_ADDRESS;
+int param_echo_port = ECHO_SERVER_START_PORT;
+int param_log_decor = PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_TIME | 
+		      PJ_LOG_HAS_MICRO_SEC;
+
+int null_func()
+{
+    return 0;
+}
+
+int test_inner(void)
+{
+    pj_caching_pool caching_pool;
+    const char *filename;
+    int line;
+    int rc = 0;
+
+    mem = &caching_pool.factory;
+
+    pj_log_set_level(3);
+    pj_log_set_decor(param_log_decor);
+
+    rc = pj_init();
+    if (rc != 0) {
+	app_perror("pj_init() error!!", rc);
+	return rc;
+    }
+    
+    //pj_dump_config();
+    pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy, 0 );
+
+#if INCLUDE_ERRNO_TEST
+    DO_TEST( errno_test() );
+#endif
+
+#if INCLUDE_EXCEPTION_TEST
+    DO_TEST( exception_test() );
+#endif
+
+#if INCLUDE_RAND_TEST
+    DO_TEST( rand_test() );
+#endif
+
+#if INCLUDE_LIST_TEST
+    DO_TEST( list_test() );
+#endif
+
+#if INCLUDE_POOL_TEST
+    DO_TEST( pool_test() );
+#endif
+
+#if INCLUDE_POOL_PERF_TEST
+    DO_TEST( pool_perf_test() );
+#endif
+
+#if INCLUDE_STRING_TEST
+    DO_TEST( string_test() );
+#endif
+    
+#if INCLUDE_FIFOBUF_TEST
+    DO_TEST( fifobuf_test() );
+#endif
+
+#if INCLUDE_RBTREE_TEST
+    DO_TEST( rbtree_test() );
+#endif
+
+#if INCLUDE_TIMESTAMP_TEST
+    DO_TEST( timestamp_test() );
+#endif
+
+#if INCLUDE_ATOMIC_TEST
+    DO_TEST( atomic_test() );
+#endif
+
+#if INCLUDE_MUTEX_TEST
+    DO_TEST( mutex_test() );
+#endif
+
+#if INCLUDE_TIMER_TEST
+    DO_TEST( timer_test() );
+#endif
+
+#if INCLUDE_SLEEP_TEST
+    DO_TEST( sleep_test() );
+#endif
+
+#if INCLUDE_THREAD_TEST
+    DO_TEST( thread_test() );
+#endif
+
+#if INCLUDE_SOCK_TEST
+    DO_TEST( sock_test() );
+#endif
+
+#if INCLUDE_SOCK_PERF_TEST
+    DO_TEST( sock_perf_test() );
+#endif
+
+#if INCLUDE_SELECT_TEST
+    DO_TEST( select_test() );
+#endif
+
+#if INCLUDE_UDP_IOQUEUE_TEST
+    DO_TEST( udp_ioqueue_test() );
+#endif
+
+#if PJ_HAS_TCP && INCLUDE_TCP_IOQUEUE_TEST
+    DO_TEST( tcp_ioqueue_test() );
+#endif
+
+#if INCLUDE_IOQUEUE_PERF_TEST
+    DO_TEST( ioqueue_perf_test() );
+#endif
+
+#if INCLUDE_IOQUEUE_UNREG_TEST
+    DO_TEST( udp_ioqueue_unreg_test() );
+#endif
+
+#if INCLUDE_FILE_TEST
+    DO_TEST( file_test() );
+#endif
+
+#if INCLUDE_ECHO_SERVER
+    //echo_server();
+    //echo_srv_sync();
+    udp_echo_srv_ioqueue();
+
+#elif INCLUDE_ECHO_CLIENT
+    if (param_echo_sock_type == 0)
+        param_echo_sock_type = PJ_SOCK_DGRAM;
+
+    echo_client( param_echo_sock_type, 
+                 param_echo_server, 
+                 param_echo_port);
+#endif
+
+    goto on_return;
+
+on_return:
+
+    pj_caching_pool_destroy( &caching_pool );
+
+    PJ_LOG(3,("test", ""));
+ 
+    pj_thread_get_stack_info(pj_thread_this(), &filename, &line);
+    PJ_LOG(3,("test", "Stack max usage: %u, deepest: %s:%u", 
+	              pj_thread_get_stack_max_usage(pj_thread_this()),
+		      filename, line));
+    if (rc == 0)
+	PJ_LOG(3,("test", "Looks like everything is okay!.."));
+    else
+	PJ_LOG(3,("test", "Test completed with error(s)"));
+    return 0;
+}
+
+int test_main(void)
+{
+    PJ_USE_EXCEPTION;
+
+    PJ_TRY {
+        return test_inner();
+    }
+    PJ_CATCH_ANY {
+        int id = PJ_GET_EXCEPTION();
+        PJ_LOG(3,("test", "FATAL: unhandled exception id %d (%s)", 
+                  id, pj_exception_id_name(id)));
+    }
+    PJ_END;
+
+    return -1;
+}
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/test.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/test.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/test.h	(revision 1163)
@@ -0,0 +1,115 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 __PJLIB_TEST_H__
+#define __PJLIB_TEST_H__
+
+#include <pj/types.h>
+
+#define GROUP_LIBC                  1
+#define GROUP_OS                    1
+#define GROUP_DATA_STRUCTURE        1
+#define GROUP_NETWORK               1
+#define GROUP_FILE                  1
+
+#define INCLUDE_ERRNO_TEST          GROUP_LIBC
+#define INCLUDE_TIMESTAMP_TEST      GROUP_OS
+#define INCLUDE_EXCEPTION_TEST	    GROUP_LIBC
+#define INCLUDE_RAND_TEST	    GROUP_LIBC
+#define INCLUDE_LIST_TEST	    GROUP_DATA_STRUCTURE
+#define INCLUDE_POOL_TEST	    GROUP_LIBC
+#define INCLUDE_POOL_PERF_TEST	    (PJ_HAS_MALLOC && GROUP_LIBC)
+#define INCLUDE_STRING_TEST	    GROUP_DATA_STRUCTURE
+#define INCLUDE_FIFOBUF_TEST	    0	// GROUP_DATA_STRUCTURE
+#define INCLUDE_RBTREE_TEST	    GROUP_DATA_STRUCTURE
+#define INCLUDE_TIMER_TEST	    GROUP_DATA_STRUCTURE
+#define INCLUDE_ATOMIC_TEST         GROUP_OS
+#define INCLUDE_MUTEX_TEST	    GROUP_OS
+#define INCLUDE_SLEEP_TEST          GROUP_OS
+#define INCLUDE_THREAD_TEST         GROUP_OS 
+#define INCLUDE_SOCK_TEST	    GROUP_NETWORK
+#define INCLUDE_SOCK_PERF_TEST      GROUP_NETWORK
+#define INCLUDE_SELECT_TEST	    GROUP_NETWORK
+#define INCLUDE_UDP_IOQUEUE_TEST    GROUP_NETWORK
+#define INCLUDE_TCP_IOQUEUE_TEST    GROUP_NETWORK
+#define INCLUDE_IOQUEUE_PERF_TEST   GROUP_NETWORK
+#define INCLUDE_IOQUEUE_UNREG_TEST  GROUP_NETWORK
+#define INCLUDE_FILE_TEST           GROUP_FILE
+
+#define INCLUDE_ECHO_SERVER         0
+#define INCLUDE_ECHO_CLIENT         0
+
+
+#define ECHO_SERVER_MAX_THREADS     2
+#define ECHO_SERVER_START_PORT      65000
+#define ECHO_SERVER_ADDRESS         "compaq.home"
+#define ECHO_SERVER_DURATION_MSEC   (60*60*1000)
+
+#define ECHO_CLIENT_MAX_THREADS     6
+
+PJ_BEGIN_DECL
+
+extern int errno_test(void);
+extern int timestamp_test(void);
+extern int exception_test(void);
+extern int rand_test(void);
+extern int list_test(void);
+extern int pool_test(void);
+extern int pool_perf_test(void);
+extern int string_test(void);
+extern int fifobuf_test(void);
+extern int timer_test(void);
+extern int rbtree_test(void);
+extern int atomic_test(void);
+extern int mutex_test(void);
+extern int sleep_test(void);
+extern int thread_test(void);
+extern int sock_test(void);
+extern int sock_perf_test(void);
+extern int select_test(void);
+extern int udp_ioqueue_test(void);
+extern int udp_ioqueue_unreg_test(void);
+extern int tcp_ioqueue_test(void);
+extern int ioqueue_perf_test(void);
+extern int file_test(void);
+
+extern int echo_server(void);
+extern int echo_client(int sock_type, const char *server, int port);
+
+extern int echo_srv_sync(void);
+extern int udp_echo_srv_ioqueue(void);
+extern int echo_srv_common_loop(pj_atomic_t *bytes_counter);
+
+extern pj_pool_factory *mem;
+
+extern int          test_main(void);
+extern void         app_perror(const char *msg, pj_status_t err);
+extern pj_status_t  app_socket(int family, int type, int proto, int port,
+                               pj_sock_t *ptr_sock);
+extern pj_status_t  app_socketpair(int family, int type, int protocol,
+                                   pj_sock_t *server, pj_sock_t *client);
+extern int	    null_func(void);
+
+//#define TRACE_(expr) PJ_LOG(3,expr)
+#define TRACE_(expr)
+#define HALT(msg)   { PJ_LOG(3,(THIS_FILE,"%s halted",msg)); for(;;) sleep(1); }
+
+PJ_END_DECL
+
+#endif	/* __PJLIB_TEST_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/thread.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/thread.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/thread.c	(revision 1163)
@@ -0,0 +1,335 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+
+/**
+ * \page page_pjlib_thread_test Test: Thread Test
+ *
+ * This file contains \a thread_test() definition.
+ *
+ * \section thread_test_scope_sec Scope of Test
+ * This tests:
+ *  - whether PJ_THREAD_SUSPENDED flag works.
+ *  - whether multithreading works.
+ *  - whether thread timeslicing works, and threads have equal
+ *    time-slice proportion.
+ * 
+ * APIs tested:
+ *  - pj_thread_create()
+ *  - pj_thread_register()
+ *  - pj_thread_this()
+ *  - pj_thread_get_name()
+ *  - pj_thread_destroy()
+ *  - pj_thread_resume()
+ *  - pj_thread_sleep()
+ *  - pj_thread_join()
+ *  - pj_thread_destroy()
+ *
+ *
+ * This file is <b>pjlib-test/thread.c</b>
+ *
+ * \include pjlib-test/thread.c
+ */
+#if INCLUDE_THREAD_TEST
+
+#include <pjlib.h>
+
+#define THIS_FILE   "thread_test"
+
+static volatile int quit_flag=0;
+
+#if 0
+#   define TRACE__(args)	PJ_LOG(3,args)
+#else
+#   define TRACE__(args)
+#endif
+
+
+/*
+ * The thread's entry point.
+ *
+ * Each of the thread mainly will just execute the loop which
+ * increments a variable.
+ */
+static void* thread_proc(pj_uint32_t *pcounter)
+{
+    /* Test that pj_thread_register() works. */
+    pj_thread_desc desc;
+    pj_thread_t *this_thread;
+    unsigned id;
+    pj_status_t rc;
+
+    id = *pcounter;
+    TRACE__((THIS_FILE, "     thread %d running..", id));
+
+    pj_bzero(desc, sizeof(desc));
+
+    rc = pj_thread_register("thread", desc, &this_thread);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...error in pj_thread_register", rc);
+        return NULL;
+    }
+
+    /* Test that pj_thread_this() works */
+    this_thread = pj_thread_this();
+    if (this_thread == NULL) {
+        PJ_LOG(3,(THIS_FILE, "...error: pj_thread_this() returns NULL!"));
+        return NULL;
+    }
+
+    /* Test that pj_thread_get_name() works */
+    if (pj_thread_get_name(this_thread) == NULL) {
+        PJ_LOG(3,(THIS_FILE, "...error: pj_thread_get_name() returns NULL!"));
+        return NULL;
+    }
+
+    /* Main loop */
+    for (;!quit_flag;) {
+	(*pcounter)++;
+        //Must sleep if platform doesn't do time-slicing.
+	//pj_thread_sleep(0);
+    }
+
+    TRACE__((THIS_FILE, "     thread %d quitting..", id));
+    return NULL;
+}
+
+/*
+ * simple_thread()
+ */
+static int simple_thread(const char *title, unsigned flags)
+{
+    pj_pool_t *pool;
+    pj_thread_t *thread;
+    pj_status_t rc;
+    pj_uint32_t counter = 0;
+ 
+    PJ_LOG(3,(THIS_FILE, "..%s", title));
+    
+    pool = pj_pool_create(mem, NULL, 4000, 4000, NULL);
+    if (!pool)
+	return -1000;
+
+    quit_flag = 0;
+
+    TRACE__((THIS_FILE, "    Creating thread 0.."));
+    rc = pj_thread_create(pool, "thread", (pj_thread_proc*)&thread_proc,
+			  &counter,
+			  PJ_THREAD_DEFAULT_STACK_SIZE,
+			  flags,
+			  &thread);
+
+    if (rc != PJ_SUCCESS) {
+	app_perror("...error: unable to create thread", rc);
+	return -1010;
+    }
+
+    TRACE__((THIS_FILE, "    Main thread waiting.."));
+    pj_thread_sleep(1500);
+    TRACE__((THIS_FILE, "    Main thread resuming.."));
+
+    if (flags & PJ_THREAD_SUSPENDED) {
+
+	/* Check that counter is still zero */
+	if (counter != 0) {
+	    PJ_LOG(3,(THIS_FILE, "...error: thread is not suspended"));
+	    return -1015;
+	}
+	
+	rc = pj_thread_resume(thread);
+	if (rc != PJ_SUCCESS) {
+	    app_perror("...error: resume thread error", rc);
+	    return -1020;
+	}
+    }
+    
+    PJ_LOG(3,(THIS_FILE, "..waiting for thread to quit.."));
+
+    pj_thread_sleep(1500);
+
+    quit_flag = 1;
+    pj_thread_join(thread);
+
+    pj_pool_release(pool);
+
+    if (counter == 0) {
+	PJ_LOG(3,(THIS_FILE, "...error: thread is not running"));
+	return -1025;
+    }
+    
+    PJ_LOG(3,(THIS_FILE, "...%s success", title));
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * timeslice_test()
+ */
+static int timeslice_test(void)
+{
+    enum { NUM_THREADS = 4 };
+    pj_pool_t *pool;
+    pj_uint32_t counter[NUM_THREADS], lowest, highest, diff;
+    pj_thread_t *thread[NUM_THREADS];
+    unsigned i;
+    pj_status_t rc;
+
+    quit_flag = 0;
+
+    pool = pj_pool_create(mem, NULL, 4000, 4000, NULL);
+    if (!pool)
+        return -10;
+
+    PJ_LOG(3,(THIS_FILE, "..timeslice testing with %d threads", NUM_THREADS));
+
+    /* Create all threads in suspended mode. */
+    for (i=0; i<NUM_THREADS; ++i) {
+        counter[i] = i;
+        rc = pj_thread_create(pool, "thread", (pj_thread_proc*)&thread_proc, 
+			      &counter[i], 
+                              PJ_THREAD_DEFAULT_STACK_SIZE, 
+                              PJ_THREAD_SUSPENDED, 
+                              &thread[i]);
+        if (rc!=PJ_SUCCESS) {
+            app_perror("...ERROR in pj_thread_create()", rc);
+            return -20;
+        }
+    }
+
+    /* Sleep for 1 second.
+     * The purpose of this is to test whether all threads are suspended.
+     */
+    TRACE__((THIS_FILE, "    Main thread waiting.."));
+    pj_thread_sleep(1000);
+    TRACE__((THIS_FILE, "    Main thread resuming.."));
+
+    /* Check that all counters are still zero. */
+    for (i=0; i<NUM_THREADS; ++i) {
+        if (counter[i] > i) {
+            PJ_LOG(3,(THIS_FILE, "....ERROR! Thread %d-th is not suspended!", 
+		      i));
+            return -30;
+        }
+    }
+
+    /* Now resume all threads. */
+    for (i=0; i<NUM_THREADS; ++i) {
+	TRACE__((THIS_FILE, "    Resuming thread %d [%p]..", i, thread[i]));
+        rc = pj_thread_resume(thread[i]);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...ERROR in pj_thread_resume()", rc);
+            return -40;
+        }
+    }
+
+    /* Main thread sleeps for some time to allow threads to run. 
+     * The longer we sleep, the more accurate the calculation will be,
+     * but it'll make user waits for longer for the test to finish.
+     */
+    TRACE__((THIS_FILE, "    Main thread waiting (5s).."));
+    pj_thread_sleep(5000);
+    TRACE__((THIS_FILE, "    Main thread resuming.."));
+
+    /* Signal all threads to quit. */
+    quit_flag = 1;
+
+    /* Wait until all threads quit, then destroy. */
+    for (i=0; i<NUM_THREADS; ++i) {
+	TRACE__((THIS_FILE, "    Main thread joining thread %d [%p]..", 
+			    i, thread[i]));
+        rc = pj_thread_join(thread[i]);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...ERROR in pj_thread_join()", rc);
+            return -50;
+        }
+	TRACE__((THIS_FILE, "    Destroying thread %d [%p]..", i, thread[i]));
+        rc = pj_thread_destroy(thread[i]);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...ERROR in pj_thread_destroy()", rc);
+            return -60;
+        }
+    }
+
+    TRACE__((THIS_FILE, "    Main thread calculating time slices.."));
+
+    /* Now examine the value of the counters.
+     * Check that all threads had equal proportion of processing.
+     */
+    lowest = 0xFFFFFFFF;
+    highest = 0;
+    for (i=0; i<NUM_THREADS; ++i) {
+        if (counter[i] < lowest)
+            lowest = counter[i];
+        if (counter[i] > highest)
+            highest = counter[i];
+    }
+
+    /* Check that all threads are running. */
+    if (lowest < 2) {
+        PJ_LOG(3,(THIS_FILE, "...ERROR: not all threads were running!"));
+        return -70;
+    }
+
+    /* The difference between lowest and higest should be lower than 50%.
+     */
+    diff = (highest-lowest)*100 / ((highest+lowest)/2);
+    if ( diff >= 50) {
+        PJ_LOG(3,(THIS_FILE, 
+		  "...ERROR: thread didn't have equal timeslice!"));
+        PJ_LOG(3,(THIS_FILE, 
+		  ".....lowest counter=%u, highest counter=%u, diff=%u%%",
+                  lowest, highest, diff));
+        return -80;
+    } else {
+        PJ_LOG(3,(THIS_FILE, 
+                  "...info: timeslice diff between lowest & highest=%u%%",
+                  diff));
+    }
+
+    pj_pool_release(pool);
+    return 0;
+}
+
+int thread_test(void)
+{
+    int rc;
+
+    rc = simple_thread("simple thread test", 0);
+    if (rc != PJ_SUCCESS)
+	return rc;
+    
+    rc = simple_thread("suspended thread test", PJ_THREAD_SUSPENDED);
+    if (rc != PJ_SUCCESS)
+	return rc;
+    
+    rc = timeslice_test();
+    if (rc != PJ_SUCCESS)
+	return rc;
+
+    return rc;
+}
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_thread_test;
+#endif	/* INCLUDE_THREAD_TEST */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/timer.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/timer.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/timer.c	(revision 1163)
@@ -0,0 +1,186 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+
+/**
+ * \page page_pjlib_timer_test Test: Timer
+ *
+ * This file provides implementation of \b timer_test(). It tests the
+ * functionality of the timer heap.
+ *
+ *
+ * This file is <b>pjlib-test/timer.c</b>
+ *
+ * \include pjlib-test/timer.c
+ */
+
+
+#if INCLUDE_TIMER_TEST
+
+#include <pjlib.h>
+
+#define LOOP		16
+#define MIN_COUNT	250
+#define MAX_COUNT	(LOOP * MIN_COUNT)
+#define MIN_DELAY	2
+#define	D		(MAX_COUNT / 32000)
+#define DELAY		(D < MIN_DELAY ? MIN_DELAY : D)
+#define THIS_FILE	"timer_test"
+
+
+static void timer_callback(pj_timer_heap_t *ht, pj_timer_entry *e)
+{
+    PJ_UNUSED_ARG(ht);
+    PJ_UNUSED_ARG(e);
+}
+
+static int test_timer_heap(void)
+{
+    int i, j;
+    pj_timer_entry *entry;
+    pj_pool_t *pool;
+    pj_timer_heap_t *timer;
+    pj_time_val delay;
+    pj_status_t rc;    int err=0;
+    unsigned size, count;
+
+    size = pj_timer_heap_mem_size(MAX_COUNT)+MAX_COUNT*sizeof(pj_timer_entry);
+    pool = pj_pool_create( mem, NULL, size, 4000, NULL);
+    if (!pool) {
+	PJ_LOG(3,("test", "...error: unable to create pool of %u bytes",
+		  size));
+	return -10;
+    }
+
+    entry = (pj_timer_entry*)pj_pool_calloc(pool, MAX_COUNT, sizeof(*entry));
+    if (!entry)
+	return -20;
+
+    for (i=0; i<MAX_COUNT; ++i) {
+	entry[i].cb = &timer_callback;
+    }
+    rc = pj_timer_heap_create(pool, MAX_COUNT, &timer);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...error: unable to create timer heap", rc);
+	return -30;
+    }
+
+    count = MIN_COUNT;
+    for (i=0; i<LOOP; ++i) {
+	int early = 0;
+	int done=0;
+	int cancelled=0;
+	int rc;
+	pj_timestamp t1, t2, t_sched, t_cancel, t_poll;
+	pj_time_val now, expire;
+
+	pj_gettimeofday(&now);
+	pj_srand(now.sec);
+	t_sched.u32.lo = t_cancel.u32.lo = t_poll.u32.lo = 0;
+
+	// Register timers
+	for (j=0; j<(int)count; ++j) {
+	    delay.sec = pj_rand() % DELAY;
+	    delay.msec = pj_rand() % 1000;
+
+	    // Schedule timer
+	    pj_get_timestamp(&t1);
+	    rc = pj_timer_heap_schedule(timer, &entry[j], &delay);
+	    if (rc != 0)
+		return -40;
+	    pj_get_timestamp(&t2);
+
+	    t_sched.u32.lo += (t2.u32.lo - t1.u32.lo);
+
+	    // Poll timers.
+	    pj_get_timestamp(&t1);
+	    rc = pj_timer_heap_poll(timer, NULL);
+	    pj_get_timestamp(&t2);
+	    if (rc > 0) {
+		t_poll.u32.lo += (t2.u32.lo - t1.u32.lo);
+		early += rc;
+	    }
+	}
+
+	// Set the time where all timers should finish
+	pj_gettimeofday(&expire);
+	delay.sec = DELAY; 
+	delay.msec = 0;
+	PJ_TIME_VAL_ADD(expire, delay);
+
+	// Wait unfil all timers finish, cancel some of them.
+	do {
+	    int index = pj_rand() % count;
+	    pj_get_timestamp(&t1);
+	    rc = pj_timer_heap_cancel(timer, &entry[index]);
+	    pj_get_timestamp(&t2);
+	    if (rc > 0) {
+		cancelled += rc;
+		t_cancel.u32.lo += (t2.u32.lo - t1.u32.lo);
+	    }
+
+	    pj_gettimeofday(&now);
+
+	    pj_get_timestamp(&t1);
+	    rc = pj_timer_heap_poll(timer, NULL);
+	    pj_get_timestamp(&t2);
+	    if (rc > 0) {
+		done += rc;
+		t_poll.u32.lo += (t2.u32.lo - t1.u32.lo);
+	    }
+
+	} while (PJ_TIME_VAL_LTE(now, expire)&&pj_timer_heap_count(timer) > 0);
+
+	if (pj_timer_heap_count(timer)) {
+	    PJ_LOG(3, (THIS_FILE, "ERROR: %d timers left", 
+		       pj_timer_heap_count(timer)));
+	    ++err;
+	}
+	t_sched.u32.lo /= count; 
+	t_cancel.u32.lo /= count;
+	t_poll.u32.lo /= count;
+	PJ_LOG(4, (THIS_FILE, 
+	        "...ok (count:%d, early:%d, cancelled:%d, "
+		"sched:%d, cancel:%d poll:%d)", 
+		count, early, cancelled, t_sched.u32.lo, t_cancel.u32.lo,
+		t_poll.u32.lo));
+
+	count = count * 2;
+	if (count > MAX_COUNT)
+	    break;
+    }
+
+    pj_pool_release(pool);
+    return err;
+}
+
+
+int timer_test()
+{
+    return test_timer_heap();
+}
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_timer_test;
+#endif	/* INCLUDE_TIMER_TEST */
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/timestamp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/timestamp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/timestamp.c	(revision 1163)
@@ -0,0 +1,234 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+#include <pj/os.h>
+#include <pj/log.h>
+#include <pj/rand.h>
+
+
+/**
+ * \page page_pjlib_timestamp_test Test: Timestamp
+ *
+ * This file provides implementation of timestamp_test()
+ *
+ * \section timestamp_test_sec Scope of the Test
+ *
+ * This tests whether timestamp API works.
+ *
+ * API tested:
+ *  - pj_get_timestamp_freq()
+ *  - pj_get_timestamp()
+ *  - pj_elapsed_usec()
+ *  - PJ_LOG()
+ *
+ *
+ * This file is <b>pjlib-test/timestamp.c</b>
+ *
+ * \include pjlib-test/timestamp.c
+ */
+
+#if INCLUDE_TIMESTAMP_TEST
+
+#define THIS_FILE   "timestamp"
+
+static int timestamp_accuracy()
+{
+    pj_timestamp freq, t1, t2;
+    pj_time_val tv1, tv2, tvtmp;
+    pj_uint32_t msec, tics;
+    pj_int64_t diff;
+
+    PJ_LOG(3,(THIS_FILE, "...testing frequency accuracy (pls wait)"));
+
+    pj_get_timestamp_freq(&freq);
+
+    /* Get the start time */
+    pj_gettimeofday(&tvtmp);
+    do {
+	pj_gettimeofday(&tv1);
+    } while (PJ_TIME_VAL_EQ(tvtmp, tv1));
+    pj_get_timestamp(&t1);
+
+    /* Sleep for 5 seconds */
+    pj_thread_sleep(10000);
+
+    /* Get end time */
+    pj_gettimeofday(&tvtmp);
+    do {
+	pj_gettimeofday(&tv2);
+    } while (PJ_TIME_VAL_EQ(tvtmp, tv2));
+    pj_get_timestamp(&t2);
+
+    /* Get the elapsed time */
+    PJ_TIME_VAL_SUB(tv2, tv1);
+    msec = PJ_TIME_VAL_MSEC(tv2);
+
+    /* Check that the frequency match the elapsed time */
+    tics = (unsigned)(t2.u64 - t1.u64);
+    diff = tics - (msec * freq.u64 / 1000);
+    if (diff < 0)
+	diff = -diff;
+
+    /* Only allow 1 msec mismatch */
+    if (diff > (pj_int64_t)(freq.u64 / 1000)) {
+	PJ_LOG(3,(THIS_FILE, "....error: timestamp drifted by %d usec after "
+			     "%d msec", 
+			     (pj_uint32_t)(diff * 1000000 / freq.u64), 
+			     msec));
+	return -2000;
+
+    /* Otherwise just print warning if timestamp drifted by >1 usec */
+    } else if (diff > (pj_int64_t)(freq.u64 / 1000000)) {
+	PJ_LOG(3,(THIS_FILE, "....warning: timestamp drifted by %d usec after "
+			     "%d msec", 
+			     (pj_uint32_t)(diff * 1000000 / freq.u64), 
+			     msec));
+    } else {
+	PJ_LOG(3,(THIS_FILE, "....good. Timestamp is accurate down to"
+			     " nearest usec."));
+    }
+
+    return 0;
+}
+
+
+int timestamp_test(void)
+{
+    enum { CONSECUTIVE_LOOP = 100 };
+    volatile unsigned i;
+    pj_timestamp freq, t1, t2;
+    pj_time_val tv1, tv2;
+    unsigned elapsed;
+    pj_status_t rc;
+
+    PJ_LOG(3,(THIS_FILE, "...Testing timestamp (high res time)"));
+    
+    /* Get and display timestamp frequency. */
+    if ((rc=pj_get_timestamp_freq(&freq)) != PJ_SUCCESS) {
+	app_perror("...ERROR: get timestamp freq", rc);
+	return -1000;
+    }
+
+    PJ_LOG(3,(THIS_FILE, "....frequency: hiword=%lu loword=%lu", 
+			freq.u32.hi, freq.u32.lo));
+
+    PJ_LOG(3,(THIS_FILE, "...checking if time can run backwards (pls wait).."));
+
+    /*
+     * Check if consecutive readings should yield timestamp value
+     * that is bigger than previous value.
+     * First we get the first timestamp.
+     */
+    rc = pj_get_timestamp(&t1);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...ERROR: pj_get_timestamp", rc);
+	return -1001;
+    }
+    rc = pj_gettimeofday(&tv1);
+    if (rc != PJ_SUCCESS) {
+	app_perror("...ERROR: pj_gettimeofday", rc);
+	return -1002;
+    }
+    for (i=0; i<CONSECUTIVE_LOOP; ++i) {
+        
+        pj_thread_sleep(pj_rand() % 100);
+
+	rc = pj_get_timestamp(&t2);
+	if (rc != PJ_SUCCESS) {
+	    app_perror("...ERROR: pj_get_timestamp", rc);
+	    return -1003;
+	}
+	rc = pj_gettimeofday(&tv2);
+	if (rc != PJ_SUCCESS) {
+	    app_perror("...ERROR: pj_gettimeofday", rc);
+	    return -1004;
+	}
+
+	/* compare t2 with t1, expecting t2 >= t1. */
+	if (t2.u32.hi < t1.u32.hi ||
+	    (t2.u32.hi == t1.u32.hi && t2.u32.lo < t1.u32.lo))
+	{
+	    PJ_LOG(3,(THIS_FILE, "...ERROR: timestamp run backwards!"));
+	    return -1005;
+	}
+
+	/* compare tv2 with tv1, expecting tv2 >= tv1. */
+	if (PJ_TIME_VAL_LT(tv2, tv1)) {
+	    PJ_LOG(3,(THIS_FILE, "...ERROR: time run backwards!"));
+	    return -1006;
+	}
+    }
+
+    /* 
+     * Simple test to time some loop. 
+     */
+    PJ_LOG(3,(THIS_FILE, "....testing simple 1000000 loop"));
+
+
+    /* Mark start time. */
+    if ((rc=pj_get_timestamp(&t1)) != PJ_SUCCESS) {
+	app_perror("....error: cat't get timestamp", rc);
+	return -1010;
+    }
+
+    /* Loop.. */
+    for (i=0; i<1000000; ++i) {
+	/* Try to do something so that smart compilers wont
+	 * remove this silly loop.
+	 */
+	null_func();
+    }
+
+    pj_thread_sleep(0);
+
+    /* Mark end time. */
+    pj_get_timestamp(&t2);
+
+    /* Get elapsed time in usec. */
+    elapsed = pj_elapsed_usec(&t1, &t2);
+    PJ_LOG(3,(THIS_FILE, "....elapsed: %u usec", (unsigned)elapsed));
+
+    /* See if elapsed time is "reasonable". 
+     * This should be good even on 50Mhz embedded powerpc.
+     */
+    if (elapsed < 1 || elapsed > 1000000) {
+	PJ_LOG(3,(THIS_FILE, "....error: elapsed time outside window (%u, "
+			     "t1.u32.hi=%u, t1.u32.lo=%u, "
+			     "t2.u32.hi=%u, t2.u32.lo=%u)",
+			     elapsed, 
+			     t1.u32.hi, t1.u32.lo, t2.u32.hi, t2.u32.lo));
+	return -1030;
+    }
+
+    /* Testing time/timestamp accuracy */
+    rc = timestamp_accuracy();
+    if (rc != 0)
+	return rc;
+
+    return 0;
+}
+
+
+#else
+/* To prevent warning about "translation unit is empty"
+ * when this test is disabled. 
+ */
+int dummy_timestamp_test;
+#endif	/* INCLUDE_TIMESTAMP_TEST */
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/udp_echo_srv_ioqueue.c	(revision 1163)
@@ -0,0 +1,212 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 <pjlib.h>
+#include "test.h"
+
+static pj_ioqueue_key_t *key;
+static pj_atomic_t *total_bytes;
+
+struct op_key
+{
+    pj_ioqueue_op_key_t  op_key_;
+    struct op_key       *peer;
+    char                *buffer;
+    pj_size_t            size;
+    int                  is_pending;
+    pj_status_t          last_err;
+    pj_sockaddr_in       addr;
+    int                  addrlen;
+};
+
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_received)
+{
+    pj_status_t rc;
+    struct op_key *recv_rec = (struct op_key *)op_key;
+
+    for (;;) {
+        struct op_key *send_rec = recv_rec->peer;
+        recv_rec->is_pending = 0;
+
+        if (bytes_received < 0) {
+            if (-bytes_received != recv_rec->last_err) {
+                recv_rec->last_err = -bytes_received;
+                app_perror("...error receiving data", -bytes_received);
+            }
+        } else if (bytes_received == 0) {
+            /* note: previous error, or write callback */
+        } else {
+            pj_atomic_add(total_bytes, bytes_received);
+
+            if (!send_rec->is_pending) {
+                pj_ssize_t sent = bytes_received;
+                pj_memcpy(send_rec->buffer, recv_rec->buffer, bytes_received);
+                pj_memcpy(&send_rec->addr, &recv_rec->addr, recv_rec->addrlen);
+                send_rec->addrlen = recv_rec->addrlen;
+                rc = pj_ioqueue_sendto(key, &send_rec->op_key_, 
+                                       send_rec->buffer, &sent, 0,
+                                       &send_rec->addr, send_rec->addrlen);
+                send_rec->is_pending = (rc==PJ_EPENDING);
+
+                if (rc!=PJ_SUCCESS && rc!=PJ_EPENDING) {
+                    app_perror("...send error(1)", rc);
+                }
+            }
+        }
+
+        if (!send_rec->is_pending) {
+            bytes_received = recv_rec->size;
+            rc = pj_ioqueue_recvfrom(key, &recv_rec->op_key_, 
+                                     recv_rec->buffer, &bytes_received, 0,
+                                     &recv_rec->addr, &recv_rec->addrlen);
+            recv_rec->is_pending = (rc==PJ_EPENDING);
+            if (rc == PJ_SUCCESS) {
+                /* fall through next loop. */
+            } else if (rc == PJ_EPENDING) {
+                /* quit callback. */
+                break;
+            } else {
+                /* error */
+                app_perror("...recv error", rc);
+                recv_rec->last_err = rc;
+
+                bytes_received = 0;
+                /* fall through next loop. */
+            }
+        } else {
+            /* recv will be done when write completion callback is called. */
+            break;
+        }
+    }
+}
+
+static void on_write_complete(pj_ioqueue_key_t *key, 
+                              pj_ioqueue_op_key_t *op_key, 
+                              pj_ssize_t bytes_sent)
+{
+    struct op_key *send_rec = (struct op_key*)op_key;
+
+    if (bytes_sent <= 0) {
+        pj_status_t rc = -bytes_sent;
+        if (rc != send_rec->last_err) {
+            send_rec->last_err = rc;
+            app_perror("...send error(2)", rc);
+        }
+    }
+
+    send_rec->is_pending = 0;
+    on_read_complete(key, &send_rec->peer->op_key_, 0);
+}
+
+static int worker_thread(void *arg)
+{
+    pj_ioqueue_t *ioqueue = arg;
+    struct op_key read_op, write_op;
+    char recv_buf[512], send_buf[512];
+    pj_ssize_t length;
+    pj_status_t rc;
+
+    read_op.peer = &write_op;
+    read_op.is_pending = 0;
+    read_op.last_err = 0;
+    read_op.buffer = recv_buf;
+    read_op.size = sizeof(recv_buf);
+    read_op.addrlen = sizeof(read_op.addr);
+
+    write_op.peer = &read_op;
+    write_op.is_pending = 0;
+    write_op.last_err = 0;
+    write_op.buffer = send_buf;
+    write_op.size = sizeof(send_buf);
+
+    length = sizeof(recv_buf);
+    rc = pj_ioqueue_recvfrom(key, &read_op.op_key_, recv_buf, &length, 0,
+                             &read_op.addr, &read_op.addrlen);
+    if (rc == PJ_SUCCESS) {
+        read_op.is_pending = 1;
+        on_read_complete(key, &read_op.op_key_, length);
+    }
+    
+    for (;;) {
+        pj_time_val timeout;
+        timeout.sec = 0; timeout.msec = 10;
+        rc = pj_ioqueue_poll(ioqueue, &timeout);
+    }
+    return 0;
+}
+
+int udp_echo_srv_ioqueue(void)
+{
+    pj_pool_t *pool;
+    pj_sock_t sock;
+    pj_ioqueue_t *ioqueue;
+    pj_ioqueue_callback callback;
+    int i;
+    pj_thread_t *thread[ECHO_SERVER_MAX_THREADS];
+    pj_status_t rc;
+
+    pj_bzero(&callback, sizeof(callback));
+    callback.on_read_complete = &on_read_complete;
+    callback.on_write_complete = &on_write_complete;
+
+    pool = pj_pool_create(mem, NULL, 4000, 4000, NULL);
+    if (!pool)
+        return -10;
+
+    rc = pj_ioqueue_create(pool, 2, &ioqueue);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...pj_ioqueue_create error", rc);
+        return -20;
+    }
+
+    rc = app_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, 
+                    ECHO_SERVER_START_PORT, &sock);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...app_socket error", rc);
+        return -30;
+    }
+
+    rc = pj_ioqueue_register_sock(pool, ioqueue, sock, NULL,
+                                  &callback, &key);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...error registering socket", rc);
+        return -40;
+    }
+
+    rc = pj_atomic_create(pool, 0, &total_bytes);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...error creating atomic variable", rc);
+        return -45;
+    }
+
+    for (i=0; i<ECHO_SERVER_MAX_THREADS; ++i) {
+        rc = pj_thread_create(pool, NULL, &worker_thread, ioqueue,
+                              PJ_THREAD_DEFAULT_STACK_SIZE, 0,
+                              &thread[i]);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...create thread error", rc);
+            return -50;
+        }
+    }
+
+    echo_srv_common_loop(total_bytes);
+
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/udp_echo_srv_sync.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/udp_echo_srv_sync.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/udp_echo_srv_sync.c	(revision 1163)
@@ -0,0 +1,165 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+#include <pjlib.h>
+
+static pj_atomic_t *total_bytes;
+
+static int worker_thread(void *arg)
+{
+    pj_sock_t    sock = (pj_sock_t)arg;
+    char         buf[512];
+    pj_status_t  last_recv_err = PJ_SUCCESS, last_write_err = PJ_SUCCESS;
+
+    for (;;) {
+        pj_ssize_t len;
+        pj_status_t rc;
+        pj_sockaddr_in addr;
+        int addrlen;
+
+        len = sizeof(buf);
+        addrlen = sizeof(addr);
+        rc = pj_sock_recvfrom(sock, buf, &len, 0, &addr, &addrlen);
+        if (rc != 0) {
+            if (rc != last_recv_err) {
+                app_perror("...recv error", rc);
+                last_recv_err = rc;
+            }
+            continue;
+        }
+
+        pj_atomic_add(total_bytes, len);
+
+        rc = pj_sock_sendto(sock, buf, &len, 0, &addr, addrlen);
+        if (rc != PJ_SUCCESS) {
+            if (rc != last_write_err) {
+                app_perror("...send error", rc);
+                last_write_err = rc;
+            }
+            continue;
+        }
+    }
+    return 0;
+}
+
+
+int echo_srv_sync(void)
+{
+    pj_pool_t *pool;
+    pj_sock_t sock;
+    pj_thread_t *thread[ECHO_SERVER_MAX_THREADS];
+    pj_status_t rc;
+    int i;
+
+    pool = pj_pool_create(mem, NULL, 4000, 4000, NULL);
+    if (!pool)
+        return -5;
+
+    rc = pj_atomic_create(pool, 0, &total_bytes);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...unable to create atomic_var", rc);
+        return -6;
+    }
+
+    rc = app_socket(PJ_AF_INET, PJ_SOCK_DGRAM,0, ECHO_SERVER_START_PORT, &sock);
+    if (rc != PJ_SUCCESS) {
+        app_perror("...socket error", rc);
+        return -10;
+    }
+
+    for (i=0; i<ECHO_SERVER_MAX_THREADS; ++i) {
+        rc = pj_thread_create(pool, NULL, &worker_thread, (void*)sock,
+                              PJ_THREAD_DEFAULT_STACK_SIZE, 0,
+                              &thread[i]);
+        if (rc != PJ_SUCCESS) {
+            app_perror("...unable to create thread", rc);
+            return -20;
+        }
+    }
+
+    PJ_LOG(3,("", "...UDP echo server running with %d threads at port %d",
+                  ECHO_SERVER_MAX_THREADS, ECHO_SERVER_START_PORT));
+    PJ_LOG(3,("", "...Press Ctrl-C to abort"));
+
+    echo_srv_common_loop(total_bytes);
+    return 0;
+}
+
+
+int echo_srv_common_loop(pj_atomic_t *bytes_counter)
+{
+    pj_highprec_t last_received, avg_bw, highest_bw;
+    pj_time_val last_print;
+    unsigned count;
+    const char *ioqueue_name;
+
+    last_received = 0;
+    pj_gettimeofday(&last_print);
+    avg_bw = highest_bw = 0;
+    count = 0;
+
+    ioqueue_name = pj_ioqueue_name();
+
+    for (;;) {
+        pj_highprec_t received, cur_received, bw;
+        unsigned msec;
+        pj_time_val now, duration;
+
+        pj_thread_sleep(1000);
+
+        received = cur_received = pj_atomic_get(bytes_counter);
+        cur_received = cur_received - last_received;
+
+        pj_gettimeofday(&now);
+        duration = now;
+        PJ_TIME_VAL_SUB(duration, last_print);
+        msec = PJ_TIME_VAL_MSEC(duration);
+        
+        bw = cur_received;
+        pj_highprec_mul(bw, 1000);
+        pj_highprec_div(bw, msec);
+
+        last_print = now;
+        last_received = received;
+
+        avg_bw = avg_bw + bw;
+        count++;
+
+        PJ_LOG(3,("", "%s UDP (%d threads): %u KB/s (avg=%u KB/s) %s", 
+		  ioqueue_name,
+                  ECHO_SERVER_MAX_THREADS, 
+                  (unsigned)(bw / 1000),
+                  (unsigned)(avg_bw / count / 1000),
+                  (count==20 ? "<ses avg>" : "")));
+
+        if (count==20) {
+            if (avg_bw/count > highest_bw)
+                highest_bw = avg_bw/count;
+
+            count = 0;
+            avg_bw = 0;
+
+            PJ_LOG(3,("", "Highest average bandwidth=%u KB/s",
+                          (unsigned)(highest_bw/1000)));
+        }
+    }
+    return 0;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/util.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/util.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjlib/src/pjlib-test/util.c	(revision 1163)
@@ -0,0 +1,139 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 "test.h"
+#include <pjlib.h>
+
+#define THIS_FILE "util.c"
+
+void app_perror(const char *msg, pj_status_t rc)
+{
+    char errbuf[PJ_ERR_MSG_SIZE];
+
+    PJ_CHECK_STACK();
+
+    pj_strerror(rc, errbuf, sizeof(errbuf));
+    PJ_LOG(3,("test", "%s: [pj_status_t=%d] %s", msg, rc, errbuf));
+}
+
+#define SERVER 0
+#define CLIENT 1
+
+pj_status_t app_socket(int family, int type, int proto, int port,
+                       pj_sock_t *ptr_sock)
+{
+    pj_sockaddr_in addr;
+    pj_sock_t sock;
+    pj_status_t rc;
+
+    rc = pj_sock_socket(family, type, proto, &sock);
+    if (rc != PJ_SUCCESS)
+        return rc;
+
+    pj_bzero(&addr, sizeof(addr));
+    addr.sin_family = (pj_uint16_t)family;
+    addr.sin_port = (short)(port!=-1 ? pj_htons((pj_uint16_t)port) : 0);
+    rc = pj_sock_bind(sock, &addr, sizeof(addr));
+    if (rc != PJ_SUCCESS)
+        return rc;
+    
+#if PJ_HAS_TCP
+    if (type == PJ_SOCK_STREAM) {
+        rc = pj_sock_listen(sock, 5);
+        if (rc != PJ_SUCCESS)
+            return rc;
+    }
+#endif
+
+    *ptr_sock = sock;
+    return PJ_SUCCESS;
+}
+
+pj_status_t app_socketpair(int family, int type, int protocol,
+                           pj_sock_t *serverfd, pj_sock_t *clientfd)
+{
+    int i;
+    static unsigned short port = 11000;
+    pj_sockaddr_in addr;
+    pj_str_t s;
+    pj_status_t rc = 0;
+    pj_sock_t sock[2];
+
+    /* Create both sockets. */
+    for (i=0; i<2; ++i) {
+        rc = pj_sock_socket(family, type, protocol, &sock[i]);
+        if (rc != PJ_SUCCESS) {
+            if (i==1)
+                pj_sock_close(sock[0]);
+            return rc;
+        }
+    }
+
+    /* Retry bind */
+    pj_bzero(&addr, sizeof(addr));
+    addr.sin_family = PJ_AF_INET;
+    for (i=0; i<5; ++i) {
+        addr.sin_port = pj_htons(port++);
+        rc = pj_sock_bind(sock[SERVER], &addr, sizeof(addr));
+        if (rc == PJ_SUCCESS)
+            break;
+    }
+
+    if (rc != PJ_SUCCESS)
+        goto on_error;
+
+    /* For TCP, listen the socket. */
+#if PJ_HAS_TCP
+    if (type == PJ_SOCK_STREAM) {
+        rc = pj_sock_listen(sock[SERVER], PJ_SOMAXCONN);
+        if (rc != PJ_SUCCESS)
+            goto on_error;
+    }
+#endif
+
+    /* Connect client socket. */
+    addr.sin_addr = pj_inet_addr(pj_cstr(&s, "127.0.0.1"));
+    rc = pj_sock_connect(sock[CLIENT], &addr, sizeof(addr));
+    if (rc != PJ_SUCCESS)
+        goto on_error;
+
+    /* For TCP, must accept(), and get the new socket. */
+#if PJ_HAS_TCP
+    if (type == PJ_SOCK_STREAM) {
+        pj_sock_t newserver;
+
+        rc = pj_sock_accept(sock[SERVER], &newserver, NULL, NULL);
+        if (rc != PJ_SUCCESS)
+            goto on_error;
+
+        /* Replace server socket with new socket. */
+        pj_sock_close(sock[SERVER]);
+        sock[SERVER] = newserver;
+    }
+#endif
+
+    *serverfd = sock[SERVER];
+    *clientfd = sock[CLIENT];
+
+    return rc;
+
+on_error:
+    for (i=0; i<2; ++i)
+        pj_sock_close(sock[i]);
+    return rc;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/README.txt
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/README.txt	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/README.txt	(revision 1163)
@@ -0,0 +1,19 @@
+[Last Update: 2006/03/04]
+
+This directory contains two static libraries:
+ - pjmedia
+   The multimedia framework.
+
+ - pjmedia-codec
+   Codec collections.
+
+pjmedia has G711 codecs (Alaw and ULaw).
+
+pjmedia-codec has:
+ - GSM-FR implementation
+   Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+   Universitaet Berlin
+
+ - Speex 1.1.12
+   http://www.speex.org
+
Index: /pjproject/branches/split-3rd-party/pjmedia/build/Jbtest.dat
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/Jbtest.dat	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/Jbtest.dat	(revision 1163)
@@ -0,0 +1,62 @@
+#
+###############################################################################
+# This test demonstrates situation where there is no jitter. 
+# Jitter should go the minimum configured value.
+###############################################################################
+#
+#PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG
+
+#
+###############################################################################
+# This test demonstrates situation where there is no jitter, but with
+# addition of silence compression. The jitter value should also go
+# to the minimum.
+###############################################################################
+#
+#PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG /* Start silence */ GGGGGGGGGGGGGGGGGGGGG /* End silence */ PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG
+
+#
+###############################################################################
+# This test demonstrates situation where there's about one-three packets jitter
+# in the network, without packet lost.
+###############################################################################
+#
+#PGPGPPGGPPGGPPGGGGPG PGPGPPGGPPPGGPPGGGPG PGPGPPGGPPPGGPPGGGPG PGPGPPGGPPGGPPPGGGPG PGPGPPGGPPGGPPPGGGPG
+
+#
+###############################################################################
+# Two gets two puts, no jitter
+###############################################################################
+#
+#PPGGPPGGPPGGPPGGPPGG PPGGPPGGPPGGPPGGPPGG PPGGPPGGPPGGPPGGPPGG PPGGPPGGPPGGPPGGPPGG PPGGPPGGPPGGPPGGPPGG
+
+#
+###############################################################################
+# Three gets three puts, no packet lost
+###############################################################################
+#
+#PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG
+
+
+#
+###############################################################################
+# Three gets three puts, with packet lost
+###############################################################################
+#
+#PPPGGGPPPGGGPPPGGGPGPG /* Lost */ GGGGGGGGGG PPPGGGPPPGGGPPPGGGPGPG /* Lost */ GGGGGGGGGG PPPGGGPPPGGGPPPGGGPGPG /* Lost */ GGGGGGGGGG PPPGGGPPPGGGPPPGGGPGPG /* Lost */ GGGGGGGGGG PPPGGGPPPGGGPPPGGGPGPG /* Lost */ GGGGGGGGGG PPPGGGPPPGGGPPPGGGPGPG /* Lost */ GGGGGGGGGG PPPGGGPPPGGGPPPGGGPGPG /* Lost */ GGGGGGGGGG PPPGGGPPPGGGPPPGGGPGPG /* Lost */ GGGGGGGGGG PPPGGGPPPGGGPPPGGGPGPG /* Lost */ GGGGGGGGGG PPPGGGPPPGGGPPPGGGPGPG /* Lost */ GGGGGGGGGG PPPGGGPPPGGGPPPGGGPGPG
+
+
+#
+###############################################################################
+# Three gets three puts, then stable
+###############################################################################
+#
+PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PPPGGGPPPGGGPPPGGGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG 
+
+#
+###############################################################################
+# Some jitter
+###############################################################################
+#
+#PGPGPGPGPG /*Some frames missing here*/ GG /*Some frames arrive*/ PPPG /*Normal*/ PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG PGPGPGPGPGPGPGPGPGPG
+
Index: /pjproject/branches/split-3rd-party/pjmedia/build/Makefile
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/Makefile	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/Makefile	(revision 1163)
@@ -0,0 +1,229 @@
+
+# Before we include local os-mak, set default sound framework to use
+# PortAudio.
+export SOUND_OBJS = $(PORTAUDIO_OBJS)
+
+# Also set default codec files to be included
+# If these codecs are to be excluded, then the appropriate PJMEDIA_HAS_XXX_CODEC macros 
+# MUST be set too in pj/config_site.h, to inform applications about the codec 
+# availability.
+#
+# E.g., to exclude Speex, we need to exclude SPEEX_OBJS from CODEC_OBJS, AND specify
+#       "#define PJMEDIA_HAS_SPEEX_CODEC 0" in pj/config_site.h.
+#
+export CODEC_OBJS = l16.o $(GSM_OBJS) $(SPEEX_OBJS) $(ILBC_OBJS)
+
+
+include ../../build/common.mak
+
+RULES_MAK := ../../build/rules.mak
+
+PJLIB_LIB:=../../pjlib/lib/libpj-$(TARGET_NAME)$(LIBEXT)
+PJLIB_UTIL_LIB:=../../pjlib-util/lib/libpjlib-util-$(TARGET_NAME)$(LIBEXT)
+PJNATH_LIB:=../../pjnath/lib/libpjnath-$(TARGET_NAME)$(LIBEXT)
+
+export PJMEDIA_LIB:=../lib/libpjmedia-$(TARGET_NAME)$(LIBEXT)
+export PJMEDIA_CODEC_LIB:=../lib/libpjmedia-codec-$(TARGET_NAME)$(LIBEXT)
+export PJSDP_LIB:=../lib/libpjsdp-$(TARGET_NAME)$(LIBEXT)
+
+###############################################################################
+# Sound frameworks
+# These are activated by setting SOUND_OBJS var, e.g.:
+#  export SOUND_OBJS = $(PORTAUDIO_OBJS), or
+#  export SOUND_OBJS = $(NULLSOUND_OBJS)
+#
+PA_DIR:=portaudio
+PORTAUDIO_OBJS := pasound.o \
+		  $(PA_DIR)/pa_allocation.o \
+		  $(PA_DIR)/pa_converters.o \
+		  $(PA_DIR)/pa_cpuload.o \
+		  $(PA_DIR)/pa_dither.o \
+		  $(PA_DIR)/pa_front.o \
+		  $(PA_DIR)/pa_process.o \
+		  $(PA_DIR)/pa_skeleton.o \
+		  $(PA_DIR)/pa_stream.o \
+		  $(PA_DIR)/pa_trace.o
+
+NULLSOUND_OBJS := nullsound.o
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC)../include \
+		   $(CC_INC)../../pjlib/include \
+		   $(CC_INC)../../pjlib-util/include \
+		   $(CC_INC)../../pjnath/include \
+		   $(CC_INC)../src/pjmedia/portaudio \
+		   $(CC_INC)../src/pjmedia-codec
+export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
+		   $(HOST_CXXFLAGS) $(CXXFLAGS)
+export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJNATH_LIB)) \
+		   $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
+		   $(LDFLAGS) 
+
+###############################################################################
+# Defines for building PJMEDIA library
+#
+export PJMEDIA_SRCDIR = ../src/pjmedia
+export PJMEDIA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+			alaw_ulaw.o alaw_ulaw_table.o clock_thread.o codec.o \
+			conference.o echo_common.o echo_port.o echo_speex.o \
+			echo_suppress.o endpoint.o errno.o \
+			g711.o jbuf.o master_port.o mem_capture.o mem_player.o \
+			mp3_writer.o null_port.o plc_common.o plc_steveu.o \
+			port.o splitcomb.o resample.o \
+			resample_port.o rtcp.o rtp.o sdp.o sdp_cmp.o sdp_neg.o \
+			session.o silencedet.o sound_port.o stream.o \
+			tonegen.o transport_ice.o transport_udp.o \
+			wav_player.o wav_playlist.o wav_writer.o wave.o \
+			$(SOUND_OBJS) $(NULLSOUND_OBJS)
+
+export PJMEDIA_CFLAGS += $(_CFLAGS)
+
+
+###############################################################################
+# Defines for building PJSDP library
+# Note that SDP functionality is already INCLUDED in PJMEDIA.
+# The PJSDP library should only be used for applications that want SDP
+# but don't want to use the rest of the media framework.
+#
+export PJSDP_SRCDIR = ../src/pjmedia
+export PJSDP_OBJS += 	$(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+			errno.o sdp.o sdp_cmp.o sdp_neg.o
+export PJSDP_CFLAGS += $(_CFLAGS)
+
+
+###############################################################################
+# Defines for building PJMEDIA-Codec library
+#
+GSM_OBJS := 	gsm.o \
+		gsm/add.o gsm/code.o gsm/decode.o \
+		gsm/gsm_create.o gsm/gsm_decode.o gsm/gsm_destroy.o \
+		gsm/gsm_encode.o gsm/gsm_explode.o gsm/gsm_implode.o \
+		gsm/gsm_option.o gsm/long_term.o \
+		gsm/lpc.o gsm/preprocess.o gsm/rpe.o gsm/short_term.o \
+		gsm/table.o
+GSM_CFLAGS :=
+
+SPEEX_OBJS :=	speex_codec.o \
+		speex/bits.o speex/cb_search.o speex/exc_10_16_table.o  \
+		speex/exc_10_32_table.o speex/exc_20_32_table.o \
+		speex/exc_5_256_table.o speex/exc_5_64_table.o \
+		speex/exc_8_128_table.o speex/fftwrap.o speex/filterbank.o \
+		speex/filters.o speex/gain_table.o speex/gain_table_lbr.o \
+		speex/hexc_10_32_table.o speex/hexc_table.o \
+		speex/high_lsp_tables.o speex/jitter.o \
+		speex/kiss_fft.o speex/kiss_fftr.o speex/lpc_spx.o \
+		speex/lsp.o speex/lsp_tables_nb.o speex/ltp.o \
+		speex/math_approx.o speex/misc.o speex/mdf.o speex/modes.o \
+		speex/nb_celp.o speex/preprocess_spx.o \
+		speex/quant_lsp.o speex/sb_celp.o speex/smallft.o \
+		speex/speex.o speex/speex_callbacks.o speex/speex_header.o \
+		speex/stereo.o speex/vbr.o speex/vq.o speex/window.o
+SPEEX_CFLAGS := -DHAVE_CONFIG_H=1 -I../src/pjmedia-codec
+
+ILBC_OBJS := 	ilbc.o \
+		ilbc/FrameClassify.o ilbc/LPCdecode.o ilbc/LPCencode.o \
+		ilbc/StateConstructW.o ilbc/StateSearchW.o ilbc/anaFilter.o \
+		ilbc/constants.o ilbc/createCB.o ilbc/doCPLC.o \
+		ilbc/enhancer.o ilbc/filter.o ilbc/gainquant.o \
+		ilbc/getCBvec.o ilbc/helpfun.o ilbc/hpInput.o \
+		ilbc/hpOutput.o ilbc/iCBConstruct.o ilbc/iCBSearch.o \
+		ilbc/iLBC_decode.o ilbc/iLBC_encode.o ilbc/lsf.o \
+		ilbc/packing.o ilbc/syntFilter.o
+ILBC_CFLAGS :=
+
+export PJMEDIA_CODEC_SRCDIR = ../src/pjmedia-codec
+export PJMEDIA_CODEC_OBJS += \
+			$(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+			$(CODEC_OBJS)
+export PJMEDIA_CODEC_CFLAGS += $(_CFLAGS) $(GSM_CFLAGS) $(SPEEX_CFLAGS) \
+			$(ILBC_CFLAGS)
+
+
+###############################################################################
+# Defines for building test application
+#
+export PJMEDIA_TEST_SRCDIR = ../src/test
+export PJMEDIA_TEST_OBJS += jbuf_test.o main.o rtp_test.o sdp_neg_test.o test.o
+export PJMEDIA_TEST_CFLAGS += $(_CFLAGS)
+export PJMEDIA_TEST_LDFLAGS += $(_LDFLAGS)
+export PJMEDIA_TEST_EXE:=../bin/pjmedia-test-$(TARGET_NAME)$(HOST_EXE)
+
+	
+export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
+###############################################################################
+# Main entry
+#
+# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
+#
+TARGETS := pjmedia pjmedia-codec pjsdp
+#pjmedia-test
+
+all: $(TARGETS)
+
+doc:
+	cd .. && doxygen docs/doxygen.cfg
+
+dep: depend
+distclean: realclean
+
+.PHONY: dep depend pjmedia pjmedia-codec pjmedia-test clean realclean distclean
+
+pjmedia:
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA app=pjmedia $(PJMEDIA_LIB)
+
+pjmedia-codec:
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_CODEC app=pjmedia-codec $(PJMEDIA_CODEC_LIB)
+
+pjsdp:
+	$(MAKE) -f $(RULES_MAK) APP=PJSDP app=pjsdp $(PJSDP_LIB)
+
+pjmedia-test: $(PJMEDIA_LIB)
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_TEST app=pjmedia-test $(PJMEDIA_TEST_EXE)
+
+.PHONY: ../lib/pjmedia.ko
+../lib/pjmedia.ko:
+	echo Making $@
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA app=pjmedia $@
+
+.PHONY: ../lib/pjmedia-codec.ko
+../lib/pjmedia-codec.ko:
+	echo Making $@
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_CODEC app=pjmedia-codec $@
+
+.PHONY: ../lib/pjmedia-test.ko
+../lib/pjmedia-test.ko:
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_TEST app=pjmedia-test $@
+
+clean:
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA app=pjmedia $@
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_CODEC app=pjmedia-codec $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSDP app=pjsdp $@
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_TEST app=pjmedia-test $@
+
+realclean:
+	$(subst @@,$(subst /,$(HOST_PSEP),.pjmedia-$(TARGET_NAME).depend),$(HOST_RMR))
+	$(subst @@,$(subst /,$(HOST_PSEP),.pjmedia-codec-$(TARGET_NAME).depend),$(HOST_RMR))
+	$(subst @@,$(subst /,$(HOST_PSEP),.pjmedia-test-$(TARGET_NAME).depend),$(HOST_RMR))
+	$(subst @@,$(subst /,$(HOST_PSEP),.pjsdp-$(TARGET_NAME).depend),$(HOST_RMR))
+	
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA app=pjmedia $@
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_CODEC app=pjmedia-codec $@
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_TEST app=pjmedia-test $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSDP app=pjsdp $@
+
+depend:
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA app=pjmedia $@
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_CODEC app=pjmedia-codec $@
+	$(MAKE) -f $(RULES_MAK) APP=PJMEDIA_TEST app=pjmedia-test $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSDP app=pjsdp $@
+	echo '$(PJMEDIA_LIB): .pjmedia-$(TARGET_NAME).depend' >> .pjmedia-$(TARGET_NAME).depend; \
+	echo '$(PJMEDIA_CODEC_LIB): .pjmedia-codec-$(TARGET_NAME).depend' >> .pjmedia-codec-$(TARGET_NAME).depend; \
+	echo '$(PJMEDIA_TEST_EXE): $(PJMEDIA_LIB) $(PJMEDIA_CODEC_LIB)' >> .pjmedia-test-$(TARGET_NAME).depend; \
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/build/m-i386.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/m-i386.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/m-i386.mak	(revision 1163)
@@ -0,0 +1,6 @@
+
+#
+# We need to define PA_LITTLE_ENDIAN when compiling PortAudio on Linux i386
+#
+
+export M_CFLAGS += $(CC_DEF)PA_LITTLE_ENDIAN
Index: /pjproject/branches/split-3rd-party/pjmedia/build/m-x86_64.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/m-x86_64.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/m-x86_64.mak	(revision 1163)
@@ -0,0 +1,6 @@
+
+#
+# We need to define PA_LITTLE_ENDIAN when compiling PortAudio on Linux x86_64
+#
+
+export M_CFLAGS += $(CC_DEF)PA_LITTLE_ENDIAN
Index: /pjproject/branches/split-3rd-party/pjmedia/build/os-auto.mak.in
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/os-auto.mak.in	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/os-auto.mak.in	(revision 1163)
@@ -0,0 +1,136 @@
+# @configure_input@
+
+# PJMEDIA features exclusion
+export CFLAGS += @ac_no_small_filter@ @ac_no_large_filter@ @ac_no_g711_plc@ @ac_no_speex_aec@
+
+# Define the desired sound device backend
+# Valid values are:
+#   - pa_unix:	    	PortAudio on Unix (OSS or ALSA)
+#   - pa_darwinos:  	PortAudio on MacOSX (CoreAudio)
+#   - pa_old_darwinos:  PortAudio on MacOSX (old CoreAudio, for OSX 10.2)
+#   - pa_win32:	    	PortAudio on Win32 (WMME)
+#   - ds:	    	Win32 DirectSound (dsound.c)
+#   - null:	    	Null sound device (nullsound.c)
+AC_PJMEDIA_SND=@ac_pjmedia_snd@
+
+# For Unix, specify if ALSA should be supported
+AC_PA_USE_ALSA=@ac_pa_use_alsa@
+
+# Additional PortAudio CFLAGS are in @ac_pa_cflags@
+
+#
+# Codecs
+#
+AC_NO_G711_CODEC=@ac_no_g711_codec@
+AC_NO_L16_CODEC=@ac_no_l16_codec@
+AC_NO_GSM_CODEC=@ac_no_gsm_codec@
+AC_NO_SPEEX_CODEC=@ac_no_speex_codec@
+AC_NO_ILBC_CODEC=@ac_no_ilbc_codec@
+
+export CODEC_OBJS=
+
+ifeq ($(AC_NO_G711_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_G711_CODEC=0
+else
+export CODEC_OBJS +=
+endif
+
+ifeq ($(AC_NO_L16_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_L16_CODEC=0
+else
+export CODEC_OBJS += l16.o
+endif
+
+ifeq ($(AC_NO_GSM_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_GSM_CODEC=0
+else
+export CODEC_OBJS += $(GSM_OBJS)
+endif
+
+ifeq ($(AC_NO_SPEEX_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_SPEEX_CODEC=0
+else
+export CODEC_OBJS += $(SPEEX_OBJS)
+endif
+
+ifeq ($(AC_NO_ILBC_CODEC),1)
+export CFLAGS += -DPJMEDIA_HAS_ILBC_CODEC=0
+else
+export CODEC_OBJS += $(ILBC_OBJS)
+endif
+
+
+#
+# PortAudio on Unix
+#
+ifeq ($(AC_PJMEDIA_SND),pa_unix)
+# Host APIs and utils
+export PJMEDIA_OBJS += $(PA_DIR)/pa_unix_hostapis.o $(PA_DIR)/pa_unix_util.o
+
+# Include ALSA?
+ifeq ($(AC_PA_USE_ALSA),1)
+export CFLAGS += -DPA_USE_ALSA=1
+export PJMEDIA_OBJS += $(PA_DIR)/pa_linux_alsa.o
+endif
+
+export CFLAGS += -DPA_USE_OSS=1 \
+	         -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
+export PJMEDIA_OBJS += $(PA_DIR)/pa_unix_oss.o
+endif
+
+
+#
+# PortAudio on MacOS X (using current PortAudio)
+#
+ifeq ($(AC_PJMEDIA_SND),pa_darwinos)
+export PJMEDIA_OBJS +=	$(PA_DIR)/pa_mac_hostapis.o \
+			$(PA_DIR)/pa_unix_util.o \
+			$(PA_DIR)/pa_mac_core.o \
+			$(PA_DIR)/pa_mac_core_blocking.o \
+			$(PA_DIR)/pa_mac_core_utilities.o \
+			$(PA_DIR)/ringbuffer.o
+export CFLAGS += -DPA_USE_COREAUDIO=1 \
+	         -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
+export CFLAGS += @ac_pa_cflags@
+endif
+
+#
+# PortAudio on MacOS X (using old PortAudio, for MacOS X 10.2.x)
+#
+ifeq ($(AC_PJMEDIA_SND),pa_old_darwinos)
+export PJMEDIA_OBJS +=	$(PA_DIR)/pa_mac_hostapis.o \
+			$(PA_DIR)/pa_unix_util.o \
+			$(PA_DIR)/pa_mac_core_old.o 
+export CFLAGS += -DPA_USE_COREAUDIO=1 \
+	         -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
+export CFLAGS += @ac_pa_cflags@
+endif
+
+#
+#
+# PortAudio on Win32 (WMME)
+#
+ifeq ($(AC_PJMEDIA_SND),pa_win32)
+export PJMEDIA_OBJS += $(PA_DIR)/pa_win_hostapis.o $(PA_DIR)/pa_win_util.o \
+		       $(PA_DIR)/pa_win_wmme.o
+export CFLAGS += -DPA_NO_ASIO -DPA_NO_DS \
+	         -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
+endif
+
+#
+# Win32 DirectSound
+#
+ifeq ($(AC_PJMEDIA_SND),ds)
+export SOUND_OBJS = dsound.o
+export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_WIN32_DIRECT_SOUND
+endif
+
+#
+# Last resort, null sound device
+#
+ifeq ($(AC_PJMEDIA_SND),null)
+export SOUND_OBJS = nullsound.o
+export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_NULL_SOUND
+endif
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/build/os-darwinos.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/os-darwinos.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/os-darwinos.mak	(revision 1163)
@@ -0,0 +1,17 @@
+#
+# OS specific configuration for Darwin/MacOS target. 
+#
+
+#
+# PJMEDIA_OBJS specified here are object files to be included in PJMEDIA
+# (the library) for this specific operating system. Object files common 
+# to all operating systems should go in Makefile instead.
+#
+export PJMEDIA_OBJS += $(PA_DIR)/pa_mac_hostapis.o \
+		       $(PA_DIR)/pa_unix_util.o \
+		       $(PA_DIR)/pa_mac_core.o
+
+#		       $(PA_DIR)/pa_mac_alt.o
+#		       $(PA_DIR)/ringbuffer.o
+
+export OS_CFLAGS +=  $(CC_DEF)PA_USE_COREAUDIO=1 $(CC_DEF)PA_BIG_ENDIAN=1
Index: /pjproject/branches/split-3rd-party/pjmedia/build/os-linux.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/os-linux.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/os-linux.mak	(revision 1163)
@@ -0,0 +1,14 @@
+#
+# OS specific configuration for Linux OS target. 
+#
+
+#
+# PJMEDIA_OBJS specified here are object files to be included in PJMEDIA
+# (the library) for this specific operating system. Object files common 
+# to all operating systems should go in Makefile instead.
+#
+export PJMEDIA_OBJS += $(PA_DIR)/pa_unix_hostapis.o $(PA_DIR)/pa_unix_util.o \
+		       $(PA_DIR)/pa_unix_oss.o
+#		       $(PA_DIR)/pa_linux_alsa.o
+
+export OS_CFLAGS +=  $(CC_DEF)PA_USE_OSS=1
Index: /pjproject/branches/split-3rd-party/pjmedia/build/os-rtems.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/os-rtems.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/os-rtems.mak	(revision 1163)
@@ -0,0 +1,8 @@
+#
+# PJMEDIA OS specific configuration for RTEMS OS target.
+#
+
+export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_NULL_SOUND
+export PJMEDIA_OBJS += nullsound.o
+export SOUND_OBJS = $(NULLSOUND_OBJS)
+
Index: /pjproject/branches/split-3rd-party/pjmedia/build/os-win32.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/os-win32.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/os-win32.mak	(revision 1163)
@@ -0,0 +1,26 @@
+#
+# OS specific configuration for Win32 OS target. 
+#
+
+#
+# PJMEDIA_OBJS specified here are object files to be included in PJMEDIA
+# (the library) for this specific operating system. Object files common 
+# to all operating systems should go in Makefile instead.
+#
+export PJMEDIA_OBJS += $(PA_DIR)/pa_win_hostapis.o $(PA_DIR)/pa_win_util.o \
+		       $(PA_DIR)/pa_win_wmme.o
+
+export OS_CFLAGS += -DPA_NO_ASIO -DPA_NO_DS \
+		    -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND
+
+# Example:
+#  to activate Null sound, uncomment these two lines below.
+#export SOUND_OBJS = $(NULLSOUND_OBJS)
+#export OS_CFLAGS += $(CC_DEF)PJMEDIA_HAS_NULL_SOUND
+
+# Example:
+#  to include only GSM and exclude Speex codec, uncomment the "export" line below.
+#  Note that you'll need to put "#define PJMEDIA_HAS_SPEEX_CODEC 0" in
+#  <pj/config_site.h>
+#export CODEC_OBJS = $(GSM_OBJS)
+
Index: /pjproject/branches/split-3rd-party/pjmedia/build/pjaut.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/pjaut.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/pjaut.dsp	(revision 1163)
@@ -0,0 +1,102 @@
+# Microsoft Developer Studio Project File - Name="pjaut" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=pjaut - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjaut.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjaut.mak" CFG="pjaut - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjaut - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "pjaut - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjaut - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\output\pjaut_i386_win32_vc6_release"
+# PROP BASE Intermediate_Dir ".\output\pjaut_i386_win32_vc6_release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\output\pjaut_i386_win32_vc6_release"
+# PROP Intermediate_Dir ".\output\pjaut_i386_win32_vc6_release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../pjlib/src" /I "../src" /I "../../pjsdp/src" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../bin/pjaut_vc6.exe"
+
+!ELSEIF  "$(CFG)" == "pjaut - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\output\pjaut_i386_win32_vc6_debug"
+# PROP BASE Intermediate_Dir ".\output\pjaut_i386_win32_vc6_debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\output\pjaut_i386_win32_vc6_debug"
+# PROP Intermediate_Dir ".\output\pjaut_i386_win32_vc6_debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../pjlib/src" /I "../src" /I "../../pjsdp/src" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../bin/pjaut_vc6d.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjaut - Win32 Release"
+# Name "pjaut - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\src\test\audio_tool.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia.dsp	(revision 1163)
@@ -0,0 +1,582 @@
+# Microsoft Developer Studio Project File - Name="pjmedia" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=pjmedia - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjmedia.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjmedia.mak" CFG="pjmedia - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjmedia - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "pjmedia - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjmedia - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\output\pjmedia-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir ".\output\pjmedia-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\output\pjmedia-i386-win32-vc6-release"
+# PROP Intermediate_Dir ".\output\pjmedia-i386-win32-vc6-release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /GX /Zi /O2 /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../src/pjmedia/portaudio" /I "../src/pjmedia-codec" /I "../../pjnath/include" /D "NDEBUG" /D "PA_NO_ASIO" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjmedia-i386-win32-vc6-release.lib"
+
+!ELSEIF  "$(CFG)" == "pjmedia - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\output\pjmedia-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir ".\output\pjmedia-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\output\pjmedia-i386-win32-vc6-debug"
+# PROP Intermediate_Dir ".\output\pjmedia-i386-win32-vc6-debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../src/pjmedia/portaudio" /I "../src/pjmedia-codec" /I "../../pjnath/include" /D "_DEBUG" /D "PA_NO_ASIO" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjmedia-i386-win32-vc6-debug.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjmedia - Win32 Release"
+# Name "pjmedia - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\src\pjmedia\alaw_ulaw.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\alaw_ulaw_table.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\bidirectional.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\clock_thread.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\codec.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\conference.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\dsound.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\echo_common.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\echo_port.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\echo_speex.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\echo_suppress.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\endpoint.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\errno.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\g711.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\jbuf.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\master_port.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\mem_capture.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\mem_player.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\mp3_writer.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\null_port.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\nullsound.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\pasound.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\plc_common.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\plc_steveu.c
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\plc_steveu.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\port.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\resample.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\resample_port.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\rtcp.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\rtp.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\sdp.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\sdp_cmp.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\sdp_neg.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\session.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\silencedet.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\sound_port.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\splitcomb.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\stream.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\tonegen.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\transport_ice.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\transport_udp.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\wav_player.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\wav_playlist.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\wav_writer.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\wave.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\include\pjmedia\alaw_ulaw.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\bidirectional.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\clock.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\codec.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\conference.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\config.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\doxygen.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\echo.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\echo_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\endpoint.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\errno.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\g711.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\jbuf.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\master_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\mem_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\mp3_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\null_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\plc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\resample.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\rtcp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\rtp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\sdp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\sdp_neg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\session.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\silencedet.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\sound.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\sound_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\splitcomb.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\stream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\tonegen.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\transport.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\transport_ice.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\transport_udp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\types.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\wav_playlist.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\wav_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjmedia\wave.h
+# End Source File
+# End Group
+# Begin Group "PortAudio Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\dsound_wrapper.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\dsound_wrapper.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_allocation.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_allocation.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_converters.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_converters.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_cpuload.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_cpuload.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_dither.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_dither.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_endianness.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_front.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_hostapi.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_process.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_process.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_skeleton.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_stream.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_stream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_trace.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_trace.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_types.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_util.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_win_ds.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_win_hostapis.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_win_util.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_win_wmme.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_win_wmme.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_x86_plain_converters.c
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\pa_x86_plain_converters.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\portaudio\portaudio.h
+# End Source File
+# End Group
+# Begin Group "Resample Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\src\pjmedia\largefilter.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjmedia\smallfilter.h
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia.dsw
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia.dsw	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia.dsw	(revision 1163)
@@ -0,0 +1,110 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "pjaut"=.\pjaut.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "pjlib"=..\..\pjlib\build\pjlib.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib_util"="..\..\pjlib-util\build\pjlib_util.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjmedia"=.\pjmedia.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "pjmedia_codec"=.\pjmedia_codec.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjmedia_test"=.\pjmedia_test.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjmedia
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsdp
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
Index: /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia.vcproj	(revision 1163)
@@ -0,0 +1,1735 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjmedia"
+	ProjectGUID="{1434FE6C-89C6-4E13-8150-D5A4B1038AAA}"
+	RootNamespace="pjmedia"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\output\pjmedia-i386-win32-vc8-release"
+			IntermediateDirectory=".\output\pjmedia-i386-win32-vc8-release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include,../src/pjmedia/portaudio,../src/pjmedia-codec,../../pjnath/include"
+				PreprocessorDefinitions="NDEBUG;PA_NO_ASIO;WIN32;_LIB;PJ_WIN32=1;PJ_M_I386=1"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile=".\output\pjmedia-i386-win32-vc8-release/pjmedia.pch"
+				AssemblerListingLocation=".\output\pjmedia-i386-win32-vc8-release/"
+				ObjectFile=".\output\pjmedia-i386-win32-vc8-release/"
+				ProgramDataBaseFileName=".\output\pjmedia-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib/pjmedia-i386-win32-vc8-release.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjmedia-i386-win32-vc8-release/pjmedia.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\output\pjmedia-i386-win32-vc8-debug"
+			IntermediateDirectory=".\output\pjmedia-i386-win32-vc8-debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include,../src/pjmedia/portaudio,../src/pjmedia-codec,../../pjnath/include"
+				PreprocessorDefinitions="_DEBUG;PA_NO_ASIO;WIN32;_LIB;PJ_WIN32=1;PJ_M_I386=1"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\output\pjmedia-i386-win32-vc8-debug/pjmedia.pch"
+				AssemblerListingLocation=".\output\pjmedia-i386-win32-vc8-debug/"
+				ObjectFile=".\output\pjmedia-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName=".\output\pjmedia-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib/pjmedia-i386-win32-vc8-debug.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjmedia-i386-win32-vc8-debug/pjmedia.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\pjmedia\alaw_ulaw.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\alaw_ulaw_table.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\bidirectional.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\clock_thread.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\codec.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\conference.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\dsound.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\echo_common.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\echo_port.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\echo_speex.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\echo_suppress.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\endpoint.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\errno.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\g711.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\jbuf.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\master_port.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\mem_capture.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\mem_player.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\mp3_writer.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\null_port.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\nullsound.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\pasound.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\plc_common.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\plc_steveu.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\plc_steveu.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\port.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\resample.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\resample_port.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\rtcp.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\rtp.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\sdp.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\sdp_cmp.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\sdp_neg.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\session.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\silencedet.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\sound_port.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\splitcomb.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\stream.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\tonegen.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\transport_ice.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\transport_udp.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\wav_player.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\wav_playlist.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\wav_writer.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\wave.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\include\pjmedia\alaw_ulaw.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\bidirectional.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\clock.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\codec.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\conference.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\doxygen.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\echo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\echo_port.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\endpoint.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\errno.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\g711.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\jbuf.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\master_port.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\mem_port.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\mp3_port.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\null_port.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\plc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\port.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\resample.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\rtcp.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\rtp.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\sdp.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\sdp_neg.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\session.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\silencedet.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\sound.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\sound_port.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\splitcomb.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\stream.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\tonegen.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\transport.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\transport_ice.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\transport_udp.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\types.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\wav_playlist.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\wav_port.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia\wave.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="PortAudio Files"
+			>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\dsound_wrapper.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\dsound_wrapper.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_allocation.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_allocation.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_converters.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_converters.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_cpuload.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_cpuload.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_dither.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_dither.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_endianness.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_front.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_hostapi.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_process.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_process.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_skeleton.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_stream.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_stream.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_trace.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_trace.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_types.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_util.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_win_ds.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_win_hostapis.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_win_util.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_win_wmme.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_win_wmme.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_x86_plain_converters.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="3"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\pa_x86_plain_converters.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\portaudio\portaudio.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resample Files"
+			>
+			<File
+				RelativePath="..\src\pjmedia\largefilter.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia\smallfilter.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia_codec.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia_codec.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia_codec.dsp	(revision 1163)
@@ -0,0 +1,880 @@
+# Microsoft Developer Studio Project File - Name="pjmedia_codec" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=pjmedia_codec - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjmedia_codec.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjmedia_codec.mak" CFG="pjmedia_codec - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjmedia_codec - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "pjmedia_codec - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjmedia_codec - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\output\pjmedia-codec-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir ".\output\pjmedia-codec-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\output\pjmedia-codec-i386-win32-vc6-release"
+# PROP Intermediate_Dir ".\output\pjmedia-codec-i386-win32-vc6-release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /Zi /O2 /I "../include" /I "../../pjlib/include" /I "../src/pjmedia-codec" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "HAVE_CONFIG_H" /FR /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\lib\pjmedia-codec-i386-win32-vc6-release.lib"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\output\pjmedia-codec-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir ".\output\pjmedia-codec-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\output\pjmedia-codec-i386-win32-vc6-debug"
+# PROP Intermediate_Dir ".\output\pjmedia-codec-i386-win32-vc6-debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /ZI /Od /I "../include" /I "../../pjlib/include" /I "../src/pjmedia-codec" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "HAVE_CONFIG_H" /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\lib\pjmedia-codec-i386-win32-vc6-debug.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjmedia_codec - Win32 Release"
+# Name "pjmedia_codec - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm.c"
+
+!IF  "$(CFG)" == "pjmedia_codec - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec - Win32 Debug"
+
+# ADD CPP /W4
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\l16.c"
+
+!IF  "$(CFG)" == "pjmedia_codec - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec - Win32 Debug"
+
+# ADD CPP /W4
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex_codec.c"
+
+!IF  "$(CFG)" == "pjmedia_codec - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec - Win32 Debug"
+
+# ADD CPP /W4
+
+!ENDIF 
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\include\pjmedia-codec\config.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjmedia-codec\gsm.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjmedia-codec\ilbc.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjmedia-codec\l16.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjmedia-codec.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjmedia-codec\speex.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjmedia-codec\types.h"
+# End Source File
+# End Group
+# Begin Group "GSM 06.10 Library"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\add.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\code.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\config.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\debug.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\decode.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\gsm.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\gsm_create.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\gsm_decode.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\gsm_destroy.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\gsm_encode.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\gsm_option.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\gsm_print.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\long_term.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\lpc.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\preprocess.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\private.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\proto.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\rpe.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\short_term.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\table.c"
+# ADD CPP /W2
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\toast.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\gsm\unproto.h"
+# End Source File
+# End Group
+# Begin Group "Speex Codec"
+
+# PROP Default_Filter ""
+# Begin Group "Speex Header Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\_kiss_fft_guts.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\arch.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\cb_search.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\cb_search_arm4.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\cb_search_bfin.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\cb_search_sse.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\config.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\fftwrap.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\filterbank.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\filters.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\filters_arm4.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\filters_bfin.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\filters_sse.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\fixed_arm4.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\fixed_arm5e.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\fixed_bfin.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\fixed_debug.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\fixed_generic.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\kiss_fft.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\kiss_fftr.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\lpc.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\lpc_bfin.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\lsp.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\ltp.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\ltp_arm4.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\ltp_bfin.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\ltp_sse.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\math_approx.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\misc.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\misc_bfin.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\modes.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\nb_celp.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\pseudofloat.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\quant_lsp.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\sb_celp.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\smallft.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\speex.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\speex_bits.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\speex_callbacks.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\speex_echo.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\speex_header.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\speex_jitter.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\speex_preprocess.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\speex_stereo.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\speex_types.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\stack_alloc.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\vbr.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\vq.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\vq_arm4.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\vq_bfin.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\vq_sse.h"
+# End Source File
+# End Group
+# Begin Group "Speex Source Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\bits.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\cb_search.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\exc_10_16_table.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\exc_10_32_table.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\exc_20_32_table.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\exc_5_256_table.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\exc_5_64_table.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\exc_8_128_table.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\fftwrap.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\filterbank.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\filters.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\gain_table.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\gain_table_lbr.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\hexc_10_32_table.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\hexc_table.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\high_lsp_tables.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\jitter.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\kiss_fft.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\kiss_fftr.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\lpc_spx.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\lsp.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\lsp_tables_nb.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\ltp.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\math_approx.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\mdf.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\misc.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\modes.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\nb_celp.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\preprocess_spx.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\quant_lsp.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\sb_celp.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\smallft.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\speex.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\speex_callbacks.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\speex_header.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\stereo.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\vbr.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\vq.c"
+# ADD CPP /W3
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\speex\window.c"
+# ADD CPP /W3
+# End Source File
+# End Group
+# End Group
+# Begin Group "iLBC Codec"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\anaFilter.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\anaFilter.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\constants.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\constants.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\createCB.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\createCB.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\doCPLC.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\doCPLC.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\enhancer.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\enhancer.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\filter.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\filter.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\FrameClassify.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\FrameClassify.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\gainquant.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\gainquant.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\getCBvec.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\getCBvec.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\helpfun.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\helpfun.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\hpInput.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\hpInput.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\hpOutput.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\hpOutput.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\iCBConstruct.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\iCBConstruct.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\iCBSearch.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\iCBSearch.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\iLBC_decode.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\iLBC_decode.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\iLBC_define.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\iLBC_encode.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\iLBC_encode.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\iLBC_test.c"
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\LPCdecode.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\LPCdecode.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\LPCencode.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\LPCencode.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\lsf.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\lsf.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\packing.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\packing.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\StateConstructW.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\StateConstructW.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\StateSearchW.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\StateSearchW.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\syntFilter.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjmedia-codec\ilbc\syntFilter.h"
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia_codec.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia_codec.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia_codec.vcproj	(revision 1163)
@@ -0,0 +1,2494 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjmedia_codec"
+	ProjectGUID="{0545EB9B-CE7C-4EDC-86E8-FB46A8DC1236}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\output\pjmedia-codec-i386-win32-vc8-debug"
+			IntermediateDirectory=".\output\pjmedia-codec-i386-win32-vc8-debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../src/pjmedia-codec"
+				PreprocessorDefinitions="_DEBUG;WIN32;_LIB;PJ_WIN32=1;PJ_M_I386=1;HAVE_CONFIG_H"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\output\pjmedia-codec-i386-win32-vc8-debug/pjmedia_codec.pch"
+				AssemblerListingLocation=".\output\pjmedia-codec-i386-win32-vc8-debug/"
+				ObjectFile=".\output\pjmedia-codec-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName=".\output\pjmedia-codec-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib\pjmedia-codec-i386-win32-vc8-debug.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjmedia-codec-i386-win32-vc8-debug/pjmedia_codec.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\output\pjmedia-codec-i386-win32-vc8-release"
+			IntermediateDirectory=".\output\pjmedia-codec-i386-win32-vc8-release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../src/pjmedia-codec"
+				PreprocessorDefinitions="NDEBUG;WIN32;_LIB;PJ_WIN32=1;PJ_M_I386=1;HAVE_CONFIG_H"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile=".\output\pjmedia-codec-i386-win32-vc8-release/pjmedia_codec.pch"
+				AssemblerListingLocation=".\output\pjmedia-codec-i386-win32-vc8-release/"
+				ObjectFile=".\output\pjmedia-codec-i386-win32-vc8-release/"
+				ProgramDataBaseFileName=".\output\pjmedia-codec-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib\pjmedia-codec-i386-win32-vc8-release.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjmedia-codec-i386-win32-vc8-release/pjmedia_codec.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\l16.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\speex_codec.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\include\pjmedia-codec\config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia-codec\gsm.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia-codec\ilbc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia-codec\l16.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia-codec.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia-codec\speex.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjmedia-codec\types.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="GSM 06.10 Library"
+			>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\add.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\code.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\debug.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\decode.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\gsm.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\gsm_create.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\gsm_decode.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\gsm_destroy.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\gsm_encode.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\gsm_option.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\gsm_print.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\long_term.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\lpc.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\preprocess.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\private.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\proto.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\rpe.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\short_term.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\table.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						WarningLevel="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\toast.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\gsm\unproto.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Speex Codec"
+			>
+			<Filter
+				Name="Speex Header Files"
+				>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\_kiss_fft_guts.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\arch.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\cb_search.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\cb_search_arm4.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\cb_search_bfin.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\cb_search_sse.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\config.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\fftwrap.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\filterbank.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\filters.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\filters_arm4.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\filters_bfin.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\filters_sse.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\fixed_arm4.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\fixed_arm5e.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\fixed_bfin.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\fixed_debug.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\fixed_generic.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\kiss_fft.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\kiss_fftr.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\lpc.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\lpc_bfin.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\lsp.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\ltp.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\ltp_arm4.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\ltp_bfin.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\ltp_sse.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\math_approx.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\misc.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\misc_bfin.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\modes.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\nb_celp.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\pseudofloat.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\quant_lsp.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\sb_celp.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\smallft.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\speex.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\speex_bits.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\speex_callbacks.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\speex_echo.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\speex_header.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\speex_jitter.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\speex_preprocess.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\speex_stereo.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\speex_types.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\stack_alloc.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\vbr.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\vq.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\vq_arm4.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\vq_bfin.h"
+					>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\vq_sse.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Speex Source Files"
+				>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\bits.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\cb_search.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\exc_10_16_table.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\exc_10_32_table.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\exc_20_32_table.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\exc_5_256_table.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\exc_5_64_table.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\exc_8_128_table.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\fftwrap.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\filterbank.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\filters.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\gain_table.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\gain_table_lbr.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\hexc_10_32_table.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\hexc_table.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\high_lsp_tables.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\jitter.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\kiss_fft.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\kiss_fftr.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\lpc_spx.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\lsp.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\lsp_tables_nb.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\ltp.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\math_approx.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\mdf.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\misc.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\modes.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\nb_celp.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\preprocess_spx.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\quant_lsp.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\sb_celp.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\smallft.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\speex.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\speex_callbacks.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\speex_header.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\stereo.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\vbr.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\vq.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjmedia-codec\speex\window.c"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+							WarningLevel="3"
+						/>
+					</FileConfiguration>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="iLBC Codec"
+			>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\anaFilter.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\anaFilter.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\constants.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\constants.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\createCB.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\createCB.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\doCPLC.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\doCPLC.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\enhancer.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\enhancer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\filter.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\filter.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\FrameClassify.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\FrameClassify.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\gainquant.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\gainquant.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\getCBvec.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\getCBvec.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\helpfun.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\helpfun.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\hpInput.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\hpInput.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\hpOutput.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\hpOutput.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\iCBConstruct.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\iCBConstruct.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\iCBSearch.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\iCBSearch.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\iLBC_decode.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\iLBC_decode.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\iLBC_define.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\iLBC_encode.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\iLBC_encode.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\iLBC_test.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\LPCdecode.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\LPCdecode.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\LPCencode.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\LPCencode.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\lsf.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\lsf.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\packing.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\packing.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\StateConstructW.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\StateConstructW.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\StateSearchW.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\StateSearchW.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\syntFilter.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjmedia-codec\ilbc\syntFilter.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia_test.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia_test.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/pjmedia_test.dsp	(revision 1163)
@@ -0,0 +1,152 @@
+# Microsoft Developer Studio Project File - Name="pjmedia_test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=pjmedia_test - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjmedia_test.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjmedia_test.mak" CFG="pjmedia_test - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjmedia_test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "pjmedia_test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjmedia_test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\output\pjmedia_test_vc6_Release"
+# PROP BASE Intermediate_Dir ".\output\pjmedia_test_vc6_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\output\pjmedia_test_vc6_Release"
+# PROP Intermediate_Dir ".\output\pjmedia_test_vc6_Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../pjlib/include" /I "../include" /D "NDEBUG" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../bin/pjmedia_test_vc6.exe"
+
+!ELSEIF  "$(CFG)" == "pjmedia_test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\output\pjmedia_test_vc6_Debug"
+# PROP BASE Intermediate_Dir ".\output\pjmedia_test_vc6_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\output\pjmedia_test_vc6_Debug"
+# PROP Intermediate_Dir ".\output\pjmedia_test_vc6_Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../pjlib/include" /I "../include" /D "_DEBUG" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../bin/pjmedia_test_vc6d.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjmedia_test - Win32 Release"
+# Name "pjmedia_test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\src\test\jbuf_test.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\test\main.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\test\rtp_test.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\test\sdp_neg_test.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\test\sdptest.c
+
+!IF  "$(CFG)" == "pjmedia_test - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_test - Win32 Debug"
+
+# PROP Exclude_From_Build 1
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\test\session_test.c
+
+!IF  "$(CFG)" == "pjmedia_test - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_test - Win32 Debug"
+
+# PROP Exclude_From_Build 1
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\test\test.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\src\test\test.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=.\JBTEST.DAT
+# End Source File
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjmedia/build/wince-evc4/pjmedia_codec_wince.vcp
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/wince-evc4/pjmedia_codec_wince.vcp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/wince-evc4/pjmedia_codec_wince.vcp	(revision 1163)
@@ -0,0 +1,18648 @@
+# Microsoft eMbedded Visual Tools Project File - Name="pjmedia_codec_wince" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE x86) Static Library" 0x8304
+# TARGTYPE "Win32 (WCE ARMV4) Static Library" 0xa304
+# TARGTYPE "Win32 (WCE ARMV4I) Static Library" 0xa504
+# TARGTYPE "Win32 (WCE emulator) Static Library" 0xa604
+# TARGTYPE "Win32 (WCE ARMV4T) Static Library" 0xa404
+
+CFG=pjmedia_codec_wince - Win32 (WCE x86) Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjmedia_codec_wince.vcn".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjmedia_codec_wince.vcn" CFG="pjmedia_codec_wince - Win32 (WCE x86) Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjmedia_codec_wince - Win32 (WCE emulator) Release" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjmedia_codec_wince - Win32 (WCE emulator) Debug" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjmedia_codec_wince - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjmedia_codec_wince - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE "pjmedia_codec_wince - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project 2
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjmedia_codec_emulatorRel"
+# PROP BASE Intermediate_Dir "./output/pjmedia_codec_emulatorRel"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjmedia_codec_emulatorRel"
+# PROP Intermediate_Dir "./output/pjmedia_codec_emulatorRel"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../src/pjmedia-codec" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "NDEBUG" /D "_i386_" /D "_X86_" /D "x86" /D HAVE_CONFIG_H=1 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjmedia_codec_emulatorDbg"
+# PROP BASE Intermediate_Dir "./output/pjmedia_codec_emulatorDbg"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjmedia_codec_emulatorDbg"
+# PROP Intermediate_Dir "./output/pjmedia_codec_emulatorDbg"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../src/pjmedia-codec" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D HAVE_CONFIG_H=1 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjmedia_codec_ARMV4IRel"
+# PROP BASE Intermediate_Dir "./output/pjmedia_codec_ARMV4IRel"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjmedia_codec_ARMV4IRel"
+# PROP Intermediate_Dir "./output/pjmedia_codec_ARMV4IRel"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../src/pjmedia-codec" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "ARMV4I" /D "NDEBUG" /D "ARM" /D "_ARM_" /D HAVE_CONFIG_H=1 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjmedia_codec_ARMV4IDbg"
+# PROP BASE Intermediate_Dir "./output/pjmedia_codec_ARMV4IDbg"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjmedia_codec_ARMV4IDbg"
+# PROP Intermediate_Dir "./output/pjmedia_codec_ARMV4IDbg"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../src/pjmedia-codec" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "DEBUG" /D "ARMV4I" /D "ARM" /D "_ARM_" /D HAVE_CONFIG_H=1 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjmedia_codec_ARMV4Rel"
+# PROP BASE Intermediate_Dir "./output/pjmedia_codec_ARMV4Rel"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjmedia_codec_ARMV4Rel"
+# PROP Intermediate_Dir "./output/pjmedia_codec_ARMV4Rel"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../src/pjmedia-codec" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "NDEBUG" /D "ARMV4" /D "ARM" /D "_ARM_" /D HAVE_CONFIG_H=1 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjmedia_codec_ARMV4Dbg"
+# PROP BASE Intermediate_Dir "./output/pjmedia_codec_ARMV4Dbg"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjmedia_codec_ARMV4Dbg"
+# PROP Intermediate_Dir "./output/pjmedia_codec_ARMV4Dbg"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../src/pjmedia-codec" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "DEBUG" /D "ARMV4" /D "ARM" /D "_ARM_" /D HAVE_CONFIG_H=1 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjmedia_codec_ARMV4TRel"
+# PROP BASE Intermediate_Dir "./output/pjmedia_codec_ARMV4TRel"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjmedia_codec_ARMV4TRel"
+# PROP Intermediate_Dir "./output/pjmedia_codec_ARMV4TRel"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../src/pjmedia-codec" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "NDEBUG" /D "ARM" /D "_ARM_" /D HAVE_CONFIG_H=1 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjmedia_codec_ARMV4TDbg"
+# PROP BASE Intermediate_Dir "./output/pjmedia_codec_ARMV4TDbg"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjmedia_codec_ARMV4TDbg"
+# PROP Intermediate_Dir "./output/pjmedia_codec_ARMV4TDbg"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../src/pjmedia-codec" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "DEBUG" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "ARM" /D "_ARM_" /D HAVE_CONFIG_H=1 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjmedia_codec_X86Rel"
+# PROP BASE Intermediate_Dir "./output/pjmedia_codec_X86Rel"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjmedia_codec_X86Rel"
+# PROP Intermediate_Dir "./output/pjmedia_codec_X86Rel"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../src/pjmedia-codec" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "NDEBUG" /D "_i386_" /D "_X86_" /D "x86" /D HAVE_CONFIG_H=1 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjmedia_codec_X86Dbg"
+# PROP BASE Intermediate_Dir "./output/pjmedia_codec_X86Dbg"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjmedia_codec_X86Dbg"
+# PROP Intermediate_Dir "./output/pjmedia_codec_X86Dbg"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../src/pjmedia-codec" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D HAVE_CONFIG_H=1 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+# Name "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+# Name "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+# Name "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+# Name "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+# Name "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+# Name "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+# Name "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+# Name "pjmedia_codec_wince - Win32 (WCE x86) Release"
+# Name "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\gsm.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	
+NODEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\gsm.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\gsm.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	
+NODEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\gsm.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	
+NODEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\gsm.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	
+NODEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\gsm.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	
+NODEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\gsm.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	
+NODEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\gsm.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	
+NODEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\gsm.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	
+NODEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_GSM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\gsm.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ILBC_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\ilbc.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_decode.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_encode.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ILBC_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\ilbc.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_decode.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_encode.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ILBC_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\ilbc.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_decode.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_encode.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ILBC_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\ilbc.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_decode.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_encode.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ILBC_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\ilbc.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_decode.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_encode.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ILBC_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\ilbc.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_decode.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_encode.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ILBC_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\ilbc.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_decode.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_encode.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ILBC_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\ilbc.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_decode.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_encode.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ILBC_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\ilbc.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_decode.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_encode.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ILBC_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\ilbc.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_decode.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_encode.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\l16.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_L16_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\l16.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_L16_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\l16.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_L16_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\l16.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_L16_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\l16.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_L16_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\l16.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_L16_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\l16.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_L16_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\l16.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_L16_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\l16.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_L16_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\l16.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_L16_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\l16.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\mp3_writer.c
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\mp3_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\BladeMP3EncDLL.h"\
+	
+NODEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\mp3_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\BladeMP3EncDLL.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\mp3_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\BladeMP3EncDLL.h"\
+	
+NODEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\mp3_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\BladeMP3EncDLL.h"\
+	
+NODEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\mp3_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\BladeMP3EncDLL.h"\
+	
+NODEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\mp3_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\BladeMP3EncDLL.h"\
+	
+NODEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\mp3_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\BladeMP3EncDLL.h"\
+	
+NODEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\mp3_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\BladeMP3EncDLL.h"\
+	
+NODEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\mp3_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\BladeMP3EncDLL.h"\
+	
+NODEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\mp3_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\BladeMP3EncDLL.h"\
+	
+NODEP_CPP_MP3_W=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex_codec.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SPEEX=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\speex.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SPEEX=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\speex.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SPEEX=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\speex.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SPEEX=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\speex.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SPEEX=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\speex.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SPEEX=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\speex.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SPEEX=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\speex.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SPEEX=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\speex.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SPEEX=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\speex.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SPEEX=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia-codec\config.h"\
+	"..\..\include\pjmedia-codec\speex.h"\
+	"..\..\include\pjmedia-codec\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\..\include\pjmedia-codec\config.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjmedia-codec\gsm.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjmedia-codec\ilbc.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjmedia-codec\l16.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjmedia-codec.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjmedia-codec\speex.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjmedia-codec\types.h"
+# End Source File
+# End Group
+# Begin Group "GSM 06.10 Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\add.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ADD_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ADD_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ADD_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ADD_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ADD_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ADD_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ADD_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ADD_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ADD_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ADD_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\code.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_CODE_=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_CODE_=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_CODE_=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_CODE_=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_CODE_=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_CODE_=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_CODE_=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_CODE_=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_CODE_=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_CODE_=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\config.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\debug.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_DEBUG=\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_DEBUG=\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_DEBUG=\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_DEBUG=\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_DEBUG=\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_DEBUG=\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_DEBUG=\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_DEBUG=\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_DEBUG=\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_DEBUG=\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\decode.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_DECOD=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_DECOD=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_DECOD=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_DECOD=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_DECOD=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_DECOD=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_DECOD=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_DECOD=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_DECOD=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_DECOD=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\gsm.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\gsm_create.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_GSM_CR=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_GSM_CR=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_GSM_CR=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_GSM_CR=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_GSM_CR=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_GSM_CR=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_GSM_CR=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_GSM_CR=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_GSM_CR=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_GSM_CR=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\gsm_decode.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_GSM_D=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_GSM_D=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_GSM_D=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_GSM_D=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_GSM_D=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_GSM_D=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_GSM_D=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_GSM_D=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_GSM_D=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_GSM_D=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\gsm_destroy.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_GSM_DE=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_GSM_DE=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_GSM_DE=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_GSM_DE=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_GSM_DE=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_GSM_DE=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_GSM_DE=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_GSM_DE=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_GSM_DE=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_GSM_DE=\
+	"..\..\src\pjmedia-codec\gsm\config.h"\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\gsm_encode.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_GSM_E=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_GSM_E=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_GSM_E=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_GSM_E=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_GSM_E=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_GSM_E=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_GSM_E=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_GSM_E=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_GSM_E=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_GSM_E=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\gsm_explode.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_GSM_EX=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_GSM_EX=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_GSM_EX=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_GSM_EX=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_GSM_EX=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_GSM_EX=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_GSM_EX=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_GSM_EX=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_GSM_EX=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_GSM_EX=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\gsm_implode.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_GSM_I=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_GSM_I=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_GSM_I=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_GSM_I=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_GSM_I=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_GSM_I=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_GSM_I=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_GSM_I=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_GSM_I=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_GSM_I=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\gsm_option.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_GSM_O=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_GSM_O=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_GSM_O=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_GSM_O=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_GSM_O=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_GSM_O=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_GSM_O=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_GSM_O=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_GSM_O=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_GSM_O=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\gsm_print.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_GSM_P=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_GSM_P=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_GSM_P=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_GSM_P=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_GSM_P=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_GSM_P=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_GSM_P=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_GSM_P=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_GSM_P=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_GSM_P=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\long_term.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_LONG_=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_LONG_=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_LONG_=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_LONG_=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_LONG_=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_LONG_=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_LONG_=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_LONG_=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_LONG_=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_LONG_=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\lpc.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_LPC_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_LPC_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_LPC_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_LPC_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_LPC_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_LPC_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_LPC_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_LPC_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_LPC_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_LPC_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\preprocess.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PREPR=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PREPR=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PREPR=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PREPR=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PREPR=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PREPR=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PREPR=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PREPR=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PREPR=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PREPR=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\private.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\proto.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\rpe.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_RPE_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_RPE_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_RPE_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_RPE_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_RPE_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_RPE_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_RPE_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_RPE_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_RPE_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_RPE_C=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\short_term.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SHORT=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SHORT=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SHORT=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SHORT=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SHORT=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SHORT=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SHORT=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SHORT=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SHORT=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SHORT=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\table.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_TABLE=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_TABLE=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_TABLE=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_TABLE=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_TABLE=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_TABLE=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_TABLE=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_TABLE=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_TABLE=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_TABLE=\
+	"..\..\src\pjmedia-codec\gsm\gsm.h"\
+	"..\..\src\pjmedia-codec\gsm\private.h"\
+	"..\..\src\pjmedia-codec\gsm\proto.h"\
+	"..\..\src\pjmedia-codec\gsm\unproto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\toast.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\gsm\unproto.h"
+# End Source File
+# End Group
+# Begin Group "ILBC Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\anaFilter.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ANAFI=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ANAFI=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ANAFI=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ANAFI=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ANAFI=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ANAFI=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ANAFI=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ANAFI=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ANAFI=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ANAFI=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\anaFilter.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\constants.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_CONST=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_CONST=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_CONST=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_CONST=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_CONST=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_CONST=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_CONST=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_CONST=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_CONST=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_CONST=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\constants.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\createCB.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_CREAT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_CREAT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_CREAT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_CREAT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_CREAT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_CREAT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_CREAT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_CREAT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_CREAT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_CREAT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\createCB.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\doCPLC.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_DOCPL=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_DOCPL=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_DOCPL=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_DOCPL=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_DOCPL=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_DOCPL=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_DOCPL=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_DOCPL=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_DOCPL=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_DOCPL=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\doCPLC.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\enhancer.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ENHAN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ENHAN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ENHAN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ENHAN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ENHAN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ENHAN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ENHAN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ENHAN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ENHAN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ENHAN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\enhancer.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\filter.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_FILTE=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_FILTE=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_FILTE=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_FILTE=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_FILTE=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_FILTE=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_FILTE=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_FILTE=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_FILTE=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_FILTE=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\filter.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\FrameClassify.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_FRAME=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_FRAME=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_FRAME=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_FRAME=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_FRAME=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_FRAME=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_FRAME=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_FRAME=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_FRAME=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_FRAME=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\FrameClassify.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\gainquant.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_GAINQ=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_GAINQ=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_GAINQ=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_GAINQ=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_GAINQ=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_GAINQ=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_GAINQ=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_GAINQ=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_GAINQ=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_GAINQ=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\gainquant.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\getCBvec.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_GETCB=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_GETCB=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_GETCB=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_GETCB=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_GETCB=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_GETCB=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_GETCB=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_GETCB=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_GETCB=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_GETCB=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\getCBvec.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\helpfun.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_HELPF=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_HELPF=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_HELPF=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_HELPF=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_HELPF=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_HELPF=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_HELPF=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_HELPF=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_HELPF=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_HELPF=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\helpfun.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\hpInput.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_HPINP=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_HPINP=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_HPINP=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_HPINP=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_HPINP=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_HPINP=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_HPINP=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_HPINP=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_HPINP=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_HPINP=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\hpInput.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\hpOutput.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_HPOUT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_HPOUT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_HPOUT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_HPOUT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_HPOUT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_HPOUT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_HPOUT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_HPOUT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_HPOUT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_HPOUT=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\hpOutput.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\iCBConstruct.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ICBCO=\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\getCBvec.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ICBCO=\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\getCBvec.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ICBCO=\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\getCBvec.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ICBCO=\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\getCBvec.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ICBCO=\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\getCBvec.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ICBCO=\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\getCBvec.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ICBCO=\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\getCBvec.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ICBCO=\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\getCBvec.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ICBCO=\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\getCBvec.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ICBCO=\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\getCBvec.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\iCBSearch.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ICBSE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\createCB.h"\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ICBSE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\createCB.h"\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ICBSE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\createCB.h"\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ICBSE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\createCB.h"\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ICBSE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\createCB.h"\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ICBSE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\createCB.h"\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ICBSE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\createCB.h"\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ICBSE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\createCB.h"\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ICBSE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\createCB.h"\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ICBSE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\createCB.h"\
+	"..\..\src\pjmedia-codec\ilbc\gainquant.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\iCBSearch.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\iLBC_decode.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ILBC_D=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\doCPLC.h"\
+	"..\..\src\pjmedia-codec\ilbc\enhancer.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpOutput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCdecode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ILBC_D=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\doCPLC.h"\
+	"..\..\src\pjmedia-codec\ilbc\enhancer.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpOutput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCdecode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ILBC_D=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\doCPLC.h"\
+	"..\..\src\pjmedia-codec\ilbc\enhancer.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpOutput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCdecode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ILBC_D=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\doCPLC.h"\
+	"..\..\src\pjmedia-codec\ilbc\enhancer.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpOutput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCdecode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ILBC_D=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\doCPLC.h"\
+	"..\..\src\pjmedia-codec\ilbc\enhancer.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpOutput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCdecode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ILBC_D=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\doCPLC.h"\
+	"..\..\src\pjmedia-codec\ilbc\enhancer.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpOutput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCdecode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ILBC_D=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\doCPLC.h"\
+	"..\..\src\pjmedia-codec\ilbc\enhancer.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpOutput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCdecode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ILBC_D=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\doCPLC.h"\
+	"..\..\src\pjmedia-codec\ilbc\enhancer.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpOutput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCdecode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ILBC_D=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\doCPLC.h"\
+	"..\..\src\pjmedia-codec\ilbc\enhancer.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpOutput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCdecode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ILBC_D=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\doCPLC.h"\
+	"..\..\src\pjmedia-codec\ilbc\enhancer.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpOutput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCdecode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\iLBC_decode.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\iLBC_define.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\iLBC_encode.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ILBC_E=\
+	"..\..\src\pjmedia-codec\ilbc\anaFilter.h"\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\FrameClassify.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpInput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBSearch.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCencode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateSearchW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ILBC_E=\
+	"..\..\src\pjmedia-codec\ilbc\anaFilter.h"\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\FrameClassify.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpInput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBSearch.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCencode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateSearchW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ILBC_E=\
+	"..\..\src\pjmedia-codec\ilbc\anaFilter.h"\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\FrameClassify.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpInput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBSearch.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCencode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateSearchW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ILBC_E=\
+	"..\..\src\pjmedia-codec\ilbc\anaFilter.h"\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\FrameClassify.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpInput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBSearch.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCencode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateSearchW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ILBC_E=\
+	"..\..\src\pjmedia-codec\ilbc\anaFilter.h"\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\FrameClassify.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpInput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBSearch.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCencode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateSearchW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ILBC_E=\
+	"..\..\src\pjmedia-codec\ilbc\anaFilter.h"\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\FrameClassify.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpInput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBSearch.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCencode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateSearchW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ILBC_E=\
+	"..\..\src\pjmedia-codec\ilbc\anaFilter.h"\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\FrameClassify.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpInput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBSearch.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCencode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateSearchW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ILBC_E=\
+	"..\..\src\pjmedia-codec\ilbc\anaFilter.h"\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\FrameClassify.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpInput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBSearch.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCencode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateSearchW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ILBC_E=\
+	"..\..\src\pjmedia-codec\ilbc\anaFilter.h"\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\FrameClassify.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpInput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBSearch.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCencode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateSearchW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ILBC_E=\
+	"..\..\src\pjmedia-codec\ilbc\anaFilter.h"\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\FrameClassify.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\hpInput.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBConstruct.h"\
+	"..\..\src\pjmedia-codec\ilbc\iCBSearch.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\LPCencode.h"\
+	"..\..\src\pjmedia-codec\ilbc\packing.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateConstructW.h"\
+	"..\..\src\pjmedia-codec\ilbc\StateSearchW.h"\
+	"..\..\src\pjmedia-codec\ilbc\syntFilter.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\iLBC_encode.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\LPCdecode.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_LPCDE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_LPCDE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_LPCDE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_LPCDE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_LPCDE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_LPCDE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_LPCDE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_LPCDE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_LPCDE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_LPCDE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\LPCdecode.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\LPCencode.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_LPCEN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_LPCEN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_LPCEN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_LPCEN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_LPCEN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_LPCEN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_LPCEN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_LPCEN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_LPCEN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_LPCEN=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	"..\..\src\pjmedia-codec\ilbc\lsf.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\LPCencode.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\lsf.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_LSF_C=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_LSF_C=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_LSF_C=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_LSF_C=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_LSF_C=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_LSF_C=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_LSF_C=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_LSF_C=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_LSF_C=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_LSF_C=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\lsf.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\packing.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PACKI=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PACKI=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PACKI=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PACKI=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PACKI=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PACKI=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PACKI=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PACKI=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PACKI=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PACKI=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\packing.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\StateConstructW.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STATE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STATE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STATE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STATE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STATE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STATE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STATE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STATE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STATE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STATE=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\StateConstructW.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\StateSearchW.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STATES=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STATES=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STATES=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STATES=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STATES=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STATES=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STATES=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STATES=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STATES=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STATES=\
+	"..\..\src\pjmedia-codec\ilbc\constants.h"\
+	"..\..\src\pjmedia-codec\ilbc\helpfun.h"\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\StateSearchW.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\syntFilter.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SYNTF=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SYNTF=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SYNTF=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SYNTF=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SYNTF=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SYNTF=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SYNTF=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SYNTF=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SYNTF=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SYNTF=\
+	"..\..\src\pjmedia-codec\ilbc\iLBC_define.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\ilbc\syntFilter.h"
+# End Source File
+# End Group
+# Begin Group "Speex Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\arch.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\bits.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_BITS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_BITS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_BITS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_BITS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_BITS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_BITS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_BITS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_BITS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_BITS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_BITS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\cb_search.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_CB_SE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_sse.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_CB_SE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_sse.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_CB_SE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_sse.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_CB_SE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_sse.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_CB_SE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_sse.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_CB_SE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_sse.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_CB_SE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_sse.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_CB_SE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_sse.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_CB_SE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_sse.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_CB_SE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search_sse.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\cb_search.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\cb_search_arm4.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\cb_search_bfin.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\cb_search_sse.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\config.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\exc_10_16_table.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\exc_10_32_table.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\exc_20_32_table.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\exc_5_256_table.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\exc_5_64_table.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\exc_8_128_table.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\fftwrap.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_FFTWR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_FFTWR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_FFTWR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_FFTWR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_FFTWR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_FFTWR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_FFTWR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_FFTWR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_FFTWR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_FFTWR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\fftwrap.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\filterbank.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_FILTER=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filterbank.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_FILTER=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filterbank.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_FILTER=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filterbank.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_FILTER=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filterbank.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_FILTER=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filterbank.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_FILTER=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filterbank.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_FILTER=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filterbank.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_FILTER=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filterbank.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_FILTER=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filterbank.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_FILTER=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filterbank.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\filterbank.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\filters.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_FILTERS=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\filters_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\filters_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\filters_sse.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_FILTERS=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\filters_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\filters_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\filters_sse.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_FILTERS=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\filters_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\filters_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\filters_sse.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_FILTERS=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\filters_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\filters_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\filters_sse.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_FILTERS=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\filters_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\filters_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\filters_sse.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_FILTERS=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\filters_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\filters_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\filters_sse.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_FILTERS=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\filters_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\filters_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\filters_sse.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_FILTERS=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\filters_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\filters_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\filters_sse.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_FILTERS=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\filters_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\filters_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\filters_sse.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_FILTERS=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\filters_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\filters_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\filters_sse.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\filters.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\filters_arm4.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\filters_bfin.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\filters_sse.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\fixed_arm4.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\fixed_arm5e.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\fixed_bfin.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\fixed_debug.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\fixed_generic.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\gain_table.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\gain_table_lbr.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\hexc_10_32_table.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\hexc_table.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\high_lsp_tables.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\jitter.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_JITTE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_jitter.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_JITTE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_jitter.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_JITTE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_jitter.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_JITTE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_jitter.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_JITTE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_jitter.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_JITTE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_jitter.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_JITTE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_jitter.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_JITTE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_jitter.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_JITTE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_jitter.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_JITTE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_jitter.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\kiss_fft.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_KISS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_KISS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_KISS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_KISS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_KISS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_KISS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_KISS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_KISS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_KISS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_KISS_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\kiss_fft.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\kiss_fftr.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_KISS_F=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_KISS_F=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_KISS_F=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_KISS_F=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_KISS_F=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_KISS_F=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_KISS_F=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_KISS_F=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_KISS_F=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_KISS_F=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\_kiss_fft_guts.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fft.h"\
+	"..\..\src\pjmedia-codec\speex\kiss_fftr.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\kiss_fftr.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\lpc.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\lpc_bfin.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\lpc_spx.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_LPC_S=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lpc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_LPC_S=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lpc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_LPC_S=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lpc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_LPC_S=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lpc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_LPC_S=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lpc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_LPC_S=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lpc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_LPC_S=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lpc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_LPC_S=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lpc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_LPC_S=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lpc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_LPC_S=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lpc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\lsp.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_LSP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+NODEP_CPP_LSP_C=\
+	"..\..\src\pjmedia-codec\speex\lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_LSP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\lsp_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_LSP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+NODEP_CPP_LSP_C=\
+	"..\..\src\pjmedia-codec\speex\lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_LSP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+NODEP_CPP_LSP_C=\
+	"..\..\src\pjmedia-codec\speex\lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_LSP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+NODEP_CPP_LSP_C=\
+	"..\..\src\pjmedia-codec\speex\lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_LSP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+NODEP_CPP_LSP_C=\
+	"..\..\src\pjmedia-codec\speex\lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_LSP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+NODEP_CPP_LSP_C=\
+	"..\..\src\pjmedia-codec\speex\lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_LSP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+NODEP_CPP_LSP_C=\
+	"..\..\src\pjmedia-codec\speex\lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_LSP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+NODEP_CPP_LSP_C=\
+	"..\..\src\pjmedia-codec\speex\lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_LSP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+NODEP_CPP_LSP_C=\
+	"..\..\src\pjmedia-codec\speex\lsp_bfin.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\lsp.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\lsp_tables_nb.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\ltp.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_LTP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_sse.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_LTP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_sse.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_LTP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_sse.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_LTP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_sse.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_LTP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_sse.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_LTP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_sse.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_LTP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_sse.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_LTP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_sse.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_LTP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_sse.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_LTP_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\ltp_sse.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\ltp.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\ltp_arm4.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\ltp_bfin.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\ltp_sse.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\math_approx.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_MATH_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_MATH_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_MATH_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_MATH_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_MATH_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_MATH_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_MATH_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_MATH_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_MATH_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_MATH_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\math_approx.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\mdf.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_MDF_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fftwrap.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\pseudofloat.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_MDF_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fftwrap.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\pseudofloat.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_MDF_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fftwrap.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\pseudofloat.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_MDF_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fftwrap.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\pseudofloat.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_MDF_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fftwrap.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\pseudofloat.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_MDF_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fftwrap.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\pseudofloat.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_MDF_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fftwrap.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\pseudofloat.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_MDF_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fftwrap.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\pseudofloat.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_MDF_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fftwrap.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\pseudofloat.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_MDF_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fftwrap.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\pseudofloat.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\misc.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_MISC_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\misc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_MISC_=\
+	"..\..\src\pjmedia-codec\speex\user_misc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_MISC_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\misc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_MISC_=\
+	"..\..\src\pjmedia-codec\speex\user_misc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_MISC_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\misc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_MISC_=\
+	"..\..\src\pjmedia-codec\speex\user_misc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_MISC_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\misc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_MISC_=\
+	"..\..\src\pjmedia-codec\speex\user_misc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_MISC_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\misc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_MISC_=\
+	"..\..\src\pjmedia-codec\speex\user_misc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_MISC_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\misc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_MISC_=\
+	"..\..\src\pjmedia-codec\speex\user_misc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_MISC_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\misc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_MISC_=\
+	"..\..\src\pjmedia-codec\speex\user_misc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_MISC_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\misc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_MISC_=\
+	"..\..\src\pjmedia-codec\speex\user_misc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_MISC_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\misc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_MISC_=\
+	"..\..\src\pjmedia-codec\speex\user_misc.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_MISC_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\misc_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_MISC_=\
+	"..\..\src\pjmedia-codec\speex\user_misc.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\misc.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\misc_bfin.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\modes.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_MODES=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+NODEP_CPP_MODES=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_MODES=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_MODES=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+NODEP_CPP_MODES=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_MODES=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+NODEP_CPP_MODES=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_MODES=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+NODEP_CPP_MODES=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_MODES=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+NODEP_CPP_MODES=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_MODES=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+NODEP_CPP_MODES=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_MODES=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+NODEP_CPP_MODES=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_MODES=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+NODEP_CPP_MODES=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_MODES=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+NODEP_CPP_MODES=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\modes.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\nb_celp.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_NB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_NB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_NB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_NB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_NB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_NB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_NB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_NB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_NB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_NB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_NB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_NB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_NB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_NB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_NB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_NB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_NB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_NB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_NB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\nb_celp.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\preprocess_spx.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PREPRO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PREPRO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fftwrap.h"\
+	"..\..\src\pjmedia-codec\speex\filterbank.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\math_approx.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PREPRO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PREPRO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PREPRO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PREPRO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PREPRO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PREPRO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PREPRO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PREPRO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\pseudofloat.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\quant_lsp.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_QUANT=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_QUANT=\
+	"..\..\src\pjmedia-codec\speex\quant_lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_QUANT=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_QUANT=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_QUANT=\
+	"..\..\src\pjmedia-codec\speex\quant_lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_QUANT=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_QUANT=\
+	"..\..\src\pjmedia-codec\speex\quant_lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_QUANT=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_QUANT=\
+	"..\..\src\pjmedia-codec\speex\quant_lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_QUANT=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_QUANT=\
+	"..\..\src\pjmedia-codec\speex\quant_lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_QUANT=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_QUANT=\
+	"..\..\src\pjmedia-codec\speex\quant_lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_QUANT=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_QUANT=\
+	"..\..\src\pjmedia-codec\speex\quant_lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_QUANT=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_QUANT=\
+	"..\..\src\pjmedia-codec\speex\quant_lsp_bfin.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_QUANT=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_QUANT=\
+	"..\..\src\pjmedia-codec\speex\quant_lsp_bfin.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\quant_lsp.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\sb_celp.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_SB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_SB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_SB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_SB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_SB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_SB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_SB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_SB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SB_CE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\cb_search.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\filters.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\lpc.h"\
+	"..\..\src\pjmedia-codec\speex\lsp.h"\
+	"..\..\src\pjmedia-codec\speex\ltp.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\nb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\quant_lsp.h"\
+	"..\..\src\pjmedia-codec\speex\sb_celp.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+NODEP_CPP_SB_CE=\
+	"..\..\src\pjmedia-codec\speex\vorbis_psy.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\sb_celp.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\smallft.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SMALL=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SMALL=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SMALL=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SMALL=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SMALL=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SMALL=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SMALL=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SMALL=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SMALL=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SMALL=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\smallft.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\smallft.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\speex.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SPEEX_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SPEEX_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SPEEX_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SPEEX_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SPEEX_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SPEEX_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SPEEX_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SPEEX_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SPEEX_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SPEEX_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\modes.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\speex.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\speex_bits.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\speex_callbacks.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SPEEX_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SPEEX_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SPEEX_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SPEEX_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SPEEX_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SPEEX_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SPEEX_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SPEEX_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SPEEX_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SPEEX_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\speex_callbacks.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\speex_config_types.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\speex_echo.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\speex_header.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SPEEX_H=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_header.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SPEEX_H=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_header.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SPEEX_H=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_header.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SPEEX_H=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_header.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SPEEX_H=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_header.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SPEEX_H=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_header.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SPEEX_H=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_header.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SPEEX_H=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_header.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SPEEX_H=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_header.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SPEEX_H=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_header.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\speex_header.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\speex_jitter.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\speex_preprocess.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\speex_stereo.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\speex_types.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\stack_alloc.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\stereo.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STERE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_stereo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STERE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_stereo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STERE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_stereo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STERE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_stereo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STERE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_stereo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STERE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_stereo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STERE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_stereo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STERE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_stereo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STERE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_stereo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STERE=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex.h"\
+	"..\..\src\pjmedia-codec\speex\speex_bits.h"\
+	"..\..\src\pjmedia-codec\speex\speex_callbacks.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_stereo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\vbr.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_VBR_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_VBR_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_VBR_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_VBR_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_VBR_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_VBR_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_VBR_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_VBR_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_VBR_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_VBR_C=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\vbr.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\vbr.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\vq.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_VQ_C8e=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	"..\..\src\pjmedia-codec\speex\vq_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\vq_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\vq_sse.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_VQ_C8e=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	"..\..\src\pjmedia-codec\speex\vq_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\vq_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\vq_sse.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_VQ_C8e=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	"..\..\src\pjmedia-codec\speex\vq_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\vq_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\vq_sse.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_VQ_C8e=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	"..\..\src\pjmedia-codec\speex\vq_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\vq_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\vq_sse.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_VQ_C8e=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	"..\..\src\pjmedia-codec\speex\vq_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\vq_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\vq_sse.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_VQ_C8e=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	"..\..\src\pjmedia-codec\speex\vq_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\vq_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\vq_sse.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_VQ_C8e=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	"..\..\src\pjmedia-codec\speex\vq_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\vq_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\vq_sse.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_VQ_C8e=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	"..\..\src\pjmedia-codec\speex\vq_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\vq_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\vq_sse.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_VQ_C8e=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	"..\..\src\pjmedia-codec\speex\vq_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\vq_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\vq_sse.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_VQ_C8e=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	"..\..\src\pjmedia-codec\speex\stack_alloc.h"\
+	"..\..\src\pjmedia-codec\speex\vq.h"\
+	"..\..\src\pjmedia-codec\speex\vq_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\vq_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\vq_sse.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\vq.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\vq_arm4.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\vq_bfin.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\vq_sse.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia-codec\speex\window.c"
+
+!IF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_WINDO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_WINDO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_WINDO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_WINDO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_WINDO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_WINDO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_WINDO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_WINDO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_WINDO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_codec_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_WINDO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\src\pjmedia-codec\speex\arch.h"\
+	"..\..\src\pjmedia-codec\speex\config.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm4.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_arm5e.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_bfin.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_debug.h"\
+	"..\..\src\pjmedia-codec\speex\fixed_generic.h"\
+	"..\..\src\pjmedia-codec\speex\misc.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjmedia/build/wince-evc4/pjmedia_wince.vcp
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/wince-evc4/pjmedia_wince.vcp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/wince-evc4/pjmedia_wince.vcp	(revision 1163)
@@ -0,0 +1,22616 @@
+# Microsoft eMbedded Visual Tools Project File - Name="pjmedia_wince" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE x86) Static Library" 0x8304
+# TARGTYPE "Win32 (WCE ARMV4) Static Library" 0xa304
+# TARGTYPE "Win32 (WCE ARMV4I) Static Library" 0xa504
+# TARGTYPE "Win32 (WCE emulator) Static Library" 0xa604
+# TARGTYPE "Win32 (WCE ARMV4T) Static Library" 0xa404
+
+CFG=pjmedia_wince - Win32 (WCE x86) Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjmedia_wince.vcn".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjmedia_wince.vcn" CFG="pjmedia_wince - Win32 (WCE x86) Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjmedia_wince - Win32 (WCE emulator) Release" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjmedia_wince - Win32 (WCE emulator) Debug" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjmedia_wince - Win32 (WCE ARMV4I) Release" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjmedia_wince - Win32 (WCE ARMV4I) Debug" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjmedia_wince - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjmedia_wince - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjmedia_wince - Win32 (WCE ARMV4T) Release" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjmedia_wince - Win32 (WCE ARMV4T) Debug" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjmedia_wince - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE "pjmedia_wince - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project 2
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjmedia_emulatorRel"
+# PROP BASE Intermediate_Dir "output/pjmedia_emulatorRel"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjmedia_emulatorRel"
+# PROP Intermediate_Dir "output/pjmedia_emulatorRel"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /I "../../src/pjmedia/portaudio" /I "../../src/pjmedia-codec" /I "../../../pjnath/include" /D "NDEBUG" /D "_i386_" /D "_X86_" /D "x86" /D PJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND /D "PA_NO_DS" /D "PA_NO_ASIO" /D "WIN32_PLATFORM_PSPC" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjmedia_emulatorDbg"
+# PROP BASE Intermediate_Dir "./output/pjmedia_emulatorDbg"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjmedia_emulatorDbg"
+# PROP Intermediate_Dir "./output/pjmedia_emulatorDbg"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /I "../../src/pjmedia/portaudio" /I "../../src/pjmedia-codec" /I "../../../pjnath/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D PJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND /D "PA_NO_DS" /D "PA_NO_ASIO" /D "WIN32_PLATFORM_PSPC" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /FR /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjmedia_ARMV4IRel"
+# PROP BASE Intermediate_Dir "output/pjmedia_ARMV4IRel"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjmedia_ARMV4IRel"
+# PROP Intermediate_Dir "output/pjmedia_ARMV4IRel"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /I "../../src/pjmedia/portaudio" /I "../../src/pjmedia-codec" /I "../../../pjnath/include" /D "ARMV4I" /D "NDEBUG" /D "ARM" /D "_ARM_" /D PJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND /D "PA_NO_DS" /D "PA_NO_ASIO" /D "WIN32_PLATFORM_PSPC" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/pjmedia_ARMV4IDbg"
+# PROP BASE Intermediate_Dir "output/pjmedia_ARMV4IDbg"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/pjmedia_ARMV4IDbg"
+# PROP Intermediate_Dir "output/pjmedia_ARMV4IDbg"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /I "../../src/pjmedia/portaudio" /I "../../src/pjmedia-codec" /I "../../../pjnath/include" /D "DEBUG" /D "ARMV4I" /D "ARM" /D "_ARM_" /D PJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND /D "PA_NO_DS" /D "PA_NO_ASIO" /D "WIN32_PLATFORM_PSPC" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjmedia_ARMV4Rel"
+# PROP BASE Intermediate_Dir "output/pjmedia_ARMV4Rel"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjmedia_ARMV4Rel"
+# PROP Intermediate_Dir "output/pjmedia_ARMV4Rel"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /I "../../src/pjmedia/portaudio" /I "../../src/pjmedia-codec" /I "../../../pjnath/include" /D "NDEBUG" /D "ARMV4" /D "ARM" /D "_ARM_" /D PJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND /D "PA_NO_DS" /D "PA_NO_ASIO" /D "WIN32_PLATFORM_PSPC" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/pjmedia_ARMV4Dbg"
+# PROP BASE Intermediate_Dir "output/pjmedia_ARMV4Dbg"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/pjmedia_ARMV4Dbg"
+# PROP Intermediate_Dir "output/pjmedia_ARMV4Dbg"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /I "../../src/pjmedia/portaudio" /I "../../src/pjmedia-codec" /I "../../../pjnath/include" /D "DEBUG" /D "ARMV4" /D "ARM" /D "_ARM_" /D PJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND /D "PA_NO_DS" /D "PA_NO_ASIO" /D "WIN32_PLATFORM_PSPC" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjmedia_ARMV4TRel"
+# PROP BASE Intermediate_Dir "output/pjmedia_ARMV4TRel"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjmedia_ARMV4TRel"
+# PROP Intermediate_Dir "output/pjmedia_ARMV4TRel"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /I "../../src/pjmedia/portaudio" /I "../../src/pjmedia-codec" /I "../../../pjnath/include" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "NDEBUG" /D "ARM" /D "_ARM_" /D PJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND /D "PA_NO_DS" /D "PA_NO_ASIO" /D "WIN32_PLATFORM_PSPC" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/pjmedia_ARMV4TDbg"
+# PROP BASE Intermediate_Dir "output/pjmedia_ARMV4TDbg"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/pjmedia_ARMV4TDbg"
+# PROP Intermediate_Dir "output/pjmedia_ARMV4TDbg"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /I "../../src/pjmedia/portaudio" /I "../../src/pjmedia-codec" /I "../../../pjnath/include" /D "DEBUG" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "ARM" /D "_ARM_" /D PJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND /D "PA_NO_DS" /D "PA_NO_ASIO" /D "WIN32_PLATFORM_PSPC" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjmedia_X86Rel"
+# PROP BASE Intermediate_Dir "output/pjmedia_X86Rel"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjmedia_X86Rel"
+# PROP Intermediate_Dir "output/pjmedia_X86Rel"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /I "../../src/pjmedia/portaudio" /I "../../src/pjmedia-codec" /I "../../../pjnath/include" /D "NDEBUG" /D "_i386_" /D "_X86_" /D "x86" /D PJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND /D "PA_NO_DS" /D "PA_NO_ASIO" /D "WIN32_PLATFORM_PSPC" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/pjmedia_X86Dbg"
+# PROP BASE Intermediate_Dir "output/pjmedia_X86Dbg"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/pjmedia_X86Dbg"
+# PROP Intermediate_Dir "output/pjmedia_X86Dbg"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /I "../../src/pjmedia/portaudio" /I "../../src/pjmedia-codec" /I "../../../pjnath/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D PJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND /D "PA_NO_DS" /D "PA_NO_ASIO" /D "WIN32_PLATFORM_PSPC" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /FR /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjmedia_wince - Win32 (WCE emulator) Release"
+# Name "pjmedia_wince - Win32 (WCE emulator) Debug"
+# Name "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+# Name "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+# Name "pjmedia_wince - Win32 (WCE ARMV4) Release"
+# Name "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+# Name "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+# Name "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+# Name "pjmedia_wince - Win32 (WCE x86) Release"
+# Name "pjmedia_wince - Win32 (WCE x86) Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\alaw_ulaw.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\alaw_ulaw_table.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ALAW_U=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\bidirectional.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_BIDIR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\bidirectional.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_BIDIR=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\bidirectional.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_BIDIR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\bidirectional.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_BIDIR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\bidirectional.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_BIDIR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\bidirectional.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_BIDIR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\bidirectional.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_BIDIR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\bidirectional.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_BIDIR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\bidirectional.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_BIDIR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\bidirectional.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_BIDIR=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\bidirectional.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_BIDIR=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\clock_thread.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_CLOCK=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_CLOCK=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_CLOCK=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_CLOCK=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_CLOCK=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_CLOCK=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_CLOCK=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_CLOCK=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_CLOCK=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_CLOCK=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_CLOCK=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\codec.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_CODEC=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\conference.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_CONFE=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\conference.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_CONFE=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\conference.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_CONFE=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\conference.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_CONFE=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\conference.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_CONFE=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\conference.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_CONFE=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\conference.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_CONFE=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\conference.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_CONFE=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\conference.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_CONFE=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\conference.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_CONFE=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\conference.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_CONFE=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\echo_common.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ECHO_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ECHO_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ECHO_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\echo_port.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ECHO_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\echo_port.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ECHO_P=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\echo_port.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ECHO_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\echo_port.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ECHO_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\echo_port.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ECHO_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\echo_port.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ECHO_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\echo_port.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ECHO_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\echo_port.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ECHO_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\echo_port.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ECHO_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\echo_port.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ECHO_P=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\echo_port.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ECHO_P=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\echo_speex.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ECHO_S=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ECHO_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ECHO_S=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ECHO_S=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ECHO_S=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ECHO_S=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ECHO_S=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ECHO_S=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ECHO_S=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ECHO_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_preprocess.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_ECHO_S=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\echo_suppress.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ECHO_SU=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ECHO_SU=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ECHO_SU=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ECHO_SU=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ECHO_SU=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ECHO_SU=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ECHO_SU=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ECHO_SU=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ECHO_SU=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ECHO_SU=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ECHO_SU=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\endpoint.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_ENDPO=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\errno.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\g711.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_G711_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\jbuf.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_JBUF_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\largefilter.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\master_port.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_MASTE=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\master_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_MASTE=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\master_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_MASTE=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\master_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_MASTE=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\master_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_MASTE=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\master_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_MASTE=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\master_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_MASTE=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\master_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_MASTE=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\master_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_MASTE=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\master_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_MASTE=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\clock.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\master_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_MASTE=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\mem_capture.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_MEM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_MEM_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_MEM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_MEM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_MEM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_MEM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_MEM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_MEM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_MEM_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_MEM_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_MEM_C=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\mem_player.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_MEM_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_MEM_P=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_MEM_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_MEM_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_MEM_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_MEM_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_MEM_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_MEM_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_MEM_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_MEM_P=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\mem_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_MEM_P=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\null_port.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_NULL_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\null_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_NULL_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\null_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_NULL_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\null_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_NULL_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\null_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_NULL_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\null_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_NULL_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\null_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_NULL_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\null_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_NULL_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\null_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_NULL_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\null_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_NULL_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\null_port.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_NULL_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\pasound.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PASOU=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\plc_common.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PLC_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PLC_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PLC_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PLC_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PLC_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PLC_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PLC_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PLC_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PLC_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PLC_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_PLC_C=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\plc_steveu.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PLC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\plc_steveu.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PLC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\plc_steveu.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PLC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\plc_steveu.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PLC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\plc_steveu.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PLC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\plc_steveu.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PLC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\plc_steveu.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PLC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\plc_steveu.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PLC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\plc_steveu.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PLC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\plc_steveu.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PLC_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\plc_steveu.h"\
+	
+NODEP_CPP_PLC_S=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\port.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PORT_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PORT_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PORT_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PORT_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PORT_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PORT_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PORT_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PORT_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PORT_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PORT_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_PORT_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\resample.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_RESAM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\largefilter.h"\
+	"..\..\src\pjmedia\smallfilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_RESAM=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\largefilter.h"\
+	"..\..\src\pjmedia\smallfilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_RESAM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\largefilter.h"\
+	"..\..\src\pjmedia\smallfilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_RESAM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\largefilter.h"\
+	"..\..\src\pjmedia\smallfilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_RESAM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\largefilter.h"\
+	"..\..\src\pjmedia\smallfilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_RESAM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\largefilter.h"\
+	"..\..\src\pjmedia\smallfilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_RESAM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\largefilter.h"\
+	"..\..\src\pjmedia\smallfilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_RESAM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\largefilter.h"\
+	"..\..\src\pjmedia\smallfilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_RESAM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\largefilter.h"\
+	"..\..\src\pjmedia\smallfilter.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_RESAM=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia\largefilter.h"\
+	"..\..\src\pjmedia\smallfilter.h"\
+	
+NODEP_CPP_RESAM=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\resample_port.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_RESAMP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_RESAMP=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_RESAMP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_RESAMP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_RESAMP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_RESAMP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_RESAMP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_RESAMP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_RESAMP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_RESAMP=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\resample.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_RESAMP=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\rtcp.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	
+NODEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	
+NODEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	
+NODEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	
+NODEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	
+NODEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	
+NODEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	
+NODEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_RTCP_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\rtp.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	
+NODEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	
+NODEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	
+NODEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	
+NODEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	
+NODEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	
+NODEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	
+NODEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_RTP_C=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\sdp.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SDP_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SDP_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SDP_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SDP_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SDP_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SDP_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_C=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SDP_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SDP_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SDP_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_C=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SDP_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_C=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\sdp_cmp.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_CM=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\sdp_neg.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sdp_neg.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sdp_neg.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sdp_neg.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sdp_neg.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sdp_neg.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sdp_neg.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sdp_neg.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sdp_neg.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sdp_neg.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sdp_neg.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SDP_N=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\session.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\session.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\session.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\session.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\session.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\session.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\session.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\session.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\session.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\session.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\session.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SESSI=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\silencedet.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SILEN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SILEN=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SILEN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SILEN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SILEN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SILEN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SILEN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SILEN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SILEN=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SILEN=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\alaw_ulaw.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\silencedet.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SILEN=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\smallfilter.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\sound_port.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SOUND=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SOUND=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SOUND=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SOUND=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SOUND=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SOUND=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SOUND=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SOUND=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SOUND=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SOUND=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\echo.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\plc.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\sound_port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_config_types.h"\
+	"..\..\src\pjmedia-codec\speex\speex_echo.h"\
+	"..\..\src\pjmedia-codec\speex\speex_types.h"\
+	
+NODEP_CPP_SOUND=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\splitcomb.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SPLIT=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\splitcomb.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SPLIT=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\splitcomb.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SPLIT=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\splitcomb.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SPLIT=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\splitcomb.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SPLIT=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\splitcomb.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SPLIT=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\splitcomb.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SPLIT=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\splitcomb.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SPLIT=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\splitcomb.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SPLIT=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\splitcomb.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SPLIT=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\splitcomb.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_SPLIT=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\stream.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\jbuf.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_STREA=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\transport_ice.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\errno.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_ice.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_TRANS=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_ice.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\errno.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_ice.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\errno.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_ice.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\errno.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_ice.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\errno.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_ice.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\errno.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_ice.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\errno.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_ice.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\errno.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_ice.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\errno.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_ice.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\transport_udp.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_TRANSP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_udp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_TRANSP=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_udp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_TRANSP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_udp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_TRANSP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_udp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_TRANSP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_udp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_TRANSP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_udp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_TRANSP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_udp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_TRANSP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_udp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_TRANSP=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_udp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_TRANSP=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\codec.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\endpoint.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\rtcp.h"\
+	"..\..\include\pjmedia\rtp.h"\
+	"..\..\include\pjmedia\sdp.h"\
+	"..\..\include\pjmedia\sound.h"\
+	"..\..\include\pjmedia\stream.h"\
+	"..\..\include\pjmedia\transport.h"\
+	"..\..\include\pjmedia\transport_udp.h"\
+	"..\..\include\pjmedia\types.h"\
+	
+NODEP_CPP_TRANSP=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\wav_player.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_WAV_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_WAV_P=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_WAV_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_WAV_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_WAV_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_WAV_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_WAV_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_WAV_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_WAV_P=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_WAV_P=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+NODEP_CPP_WAV_P=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\wav_playlist.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_WAV_PL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_playlist.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_WAV_PL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_playlist.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_WAV_PL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_playlist.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_WAV_PL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_playlist.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_WAV_PL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_playlist.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_WAV_PL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_playlist.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_WAV_PL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_playlist.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_WAV_PL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_playlist.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_WAV_PL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_playlist.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_WAV_PL=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_playlist.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\wav_writer.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_WAV_W=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_WAV_W=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_WAV_W=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_WAV_W=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_WAV_W=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_WAV_W=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_WAV_W=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_WAV_W=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_WAV_W=\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_WAV_W=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\errno.h"\
+	"..\..\include\pjmedia\port.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wav_port.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+NODEP_CPP_WAV_W=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\wave.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_WAVE_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_WAVE_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\config_auto.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_WAVE_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_WAVE_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_WAVE_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_WAVE_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_WAVE_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_WAVE_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_WAVE_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_WAVE_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjmedia\config.h"\
+	"..\..\include\pjmedia\types.h"\
+	"..\..\include\pjmedia\wave.h"\
+	
+NODEP_CPP_WAVE_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\alaw_ulaw.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\bidirectional.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\clock.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\codec.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\conference.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\config.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\doxygen.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\echo.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\echo_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\endpoint.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\errno.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\g711.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\jbuf.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\master_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\mem_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\mp3_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\null_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\plc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\resample.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\rtcp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\rtp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\sdp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\sdp_neg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\session.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\silencedet.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\sound.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\sound_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\splitcomb.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\stream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\transport.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\transport_ice.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\transport_udp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\types.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\wav_playlist.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\wav_port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjmedia\wave.h
+# End Source File
+# End Group
+# Begin Group "PortAudio Files"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\LICENSE.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_allocation.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PA_AL=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PA_AL=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PA_AL=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PA_AL=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PA_AL=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PA_AL=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PA_AL=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PA_AL=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PA_AL=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PA_AL=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_allocation.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_converters.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PA_CO=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PA_CO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PA_CO=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PA_CO=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PA_CO=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PA_CO=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PA_CO=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PA_CO=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PA_CO=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PA_CO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PA_CO=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_converters.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_cpuload.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PA_CP=\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PA_CP=\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PA_CP=\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PA_CP=\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PA_CP=\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PA_CP=\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PA_CP=\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PA_CP=\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PA_CP=\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PA_CP=\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_cpuload.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_dither.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PA_DI=\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PA_DI=\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PA_DI=\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PA_DI=\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PA_DI=\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PA_DI=\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PA_DI=\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PA_DI=\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PA_DI=\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PA_DI=\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_dither.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_endianness.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_front.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PA_FR=\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PA_FR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PA_FR=\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PA_FR=\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PA_FR=\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PA_FR=\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PA_FR=\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PA_FR=\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PA_FR=\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PA_FR=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\src\pjmedia\portaudio\pa_endianness.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_types.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PA_FR=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_hostapi.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_process.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PA_PR=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PA_PR=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PA_PR=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PA_PR=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PA_PR=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PA_PR=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PA_PR=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PA_PR=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PA_PR=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PA_PR=\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_process.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_skeleton.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PA_SK=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PA_SK=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PA_SK=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PA_SK=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PA_SK=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PA_SK=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PA_SK=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PA_SK=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PA_SK=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PA_SK=\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_stream.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PA_ST=\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PA_ST=\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PA_ST=\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PA_ST=\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PA_ST=\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PA_ST=\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PA_ST=\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PA_ST=\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PA_ST=\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PA_ST=\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_stream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_trace.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PA_TR=\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PA_TR=\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PA_TR=\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PA_TR=\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PA_TR=\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PA_TR=\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PA_TR=\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PA_TR=\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PA_TR=\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PA_TR=\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_trace.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_types.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_util.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_win_hostapis.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PA_WI=\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PA_WI=\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PA_WI=\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PA_WI=\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PA_WI=\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PA_WI=\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PA_WI=\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PA_WI=\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PA_WI=\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PA_WI=\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_win_util.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PA_WIN=\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PA_WIN=\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PA_WIN=\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PA_WIN=\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PA_WIN=\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PA_WIN=\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PA_WIN=\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PA_WIN=\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PA_WIN=\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PA_WIN=\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_win_wmme.c
+
+!IF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\pa_win_wmme.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\pa_win_wmme.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\pa_win_wmme.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\pa_win_wmme.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\pa_win_wmme.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\pa_win_wmme.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\pa_win_wmme.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\pa_win_wmme.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\pa_win_wmme.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjmedia_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\src\pjmedia\portaudio\pa_allocation.h"\
+	"..\..\src\pjmedia\portaudio\pa_converters.h"\
+	"..\..\src\pjmedia\portaudio\pa_cpuload.h"\
+	"..\..\src\pjmedia\portaudio\pa_dither.h"\
+	"..\..\src\pjmedia\portaudio\pa_hostapi.h"\
+	"..\..\src\pjmedia\portaudio\pa_process.h"\
+	"..\..\src\pjmedia\portaudio\pa_stream.h"\
+	"..\..\src\pjmedia\portaudio\pa_trace.h"\
+	"..\..\src\pjmedia\portaudio\pa_util.h"\
+	"..\..\src\pjmedia\portaudio\pa_win_wmme.h"\
+	"..\..\src\pjmedia\portaudio\portaudio.h"\
+	
+NODEP_CPP_PA_WIN_=\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\pa_win_wmme.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\portaudio.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjmedia\portaudio\README.txt
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjmedia\portaudio\V19-devel-readme.txt"
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjmedia/build/wince-evc4/pjmedia_wince.vcw
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/build/wince-evc4/pjmedia_wince.vcw	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/build/wince-evc4/pjmedia_wince.vcw	(revision 1163)
@@ -0,0 +1,53 @@
+Microsoft eMbedded Visual Tools Workspace File, Format Version 4.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "pjlib_wince"="..\..\..\pjlib\build\wince-evc4\pjlib_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjmedia_codec_wince"=".\pjmedia_codec_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjmedia_wince"=".\pjmedia_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
Index: /pjproject/branches/split-3rd-party/pjmedia/docs/doxygen.cfg
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/docs/doxygen.cfg	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/docs/doxygen.cfg	(revision 1163)
@@ -0,0 +1,1010 @@
+# Doxyfile 1.3-rc3
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           =  "PJMEDIA Reference"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = docs
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, 
+# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en 
+# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese, 
+# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these class will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = NO
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
+# members of a class in the documentation of that class as if those members were 
+# ordinary class members. Constructors, destructors and assignment operators of 
+# the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. It is allowed to use relative paths in the argument list.
+
+STRIP_FROM_PATH        = "/c/project/pjproject/pjmedia"
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower case letters. If set to YES upper case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# users are adviced to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments  will behave just like the Qt-style comments (thus requiring an 
+# explict @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = YES
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# reimplements.
+
+INHERIT_DOCS           = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consist of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
+# only. Doxygen will then generate output that is more tailored for C. 
+# For instance some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
+# only. Doxygen will then generate output that is more tailored for Java. 
+# For instance namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  =  include ../pjsip-apps/src/samples
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
+# *.h++ *.idl *.odl
+
+FILE_PATTERNS          = *.h *.c
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = *_i.h
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories.
+
+EXCLUDE_PATTERNS       = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = ../pjsip-apps/src/samples
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = docs
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.
+
+INPUT_FILTER           = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .htm
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = docs/header.html
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = docs/footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet
+
+HTML_STYLESHEET        = ../pjlib/docs/doxygen.css
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output dir.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non empty doxygen will try to run 
+# the html help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the Html help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 1
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimised for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assigments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_XML           = NO
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed.
+
+PREDEFINED             = PJ_DECL(x)=x PJ_DEF(x)=x PJ_IDECL(x)=x \
+			 PJ_IDEF(x)=x PJ_INLINE(x)=x \
+			 PJ_BEGIN_DECL= PJ_END_DECL= \
+			 PJMEDIA_HAS_MP3_WRITER=1
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse the 
+# parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tagfiles.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or 
+# super classes. Setting the tag to NO turns the diagrams off. Note that this 
+# option is superceded by the HAVE_DOT option below. This is only a fallback. It is 
+# recommended to install and use dot, since it yield more powerful graphs.
+
+CLASS_DIAGRAMS         = NO
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_WIDTH    = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT   = 1024
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermedate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
+
Index: /pjproject/branches/split-3rd-party/pjmedia/docs/footer.html
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/docs/footer.html	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/docs/footer.html	(revision 1163)
@@ -0,0 +1,8 @@
+<p>&nbsp;</p>
+<hr><center>
+PJMEDIA small footprint Open Source media stack<br>
+(C)2003-2007 Benny Prijono
+</center>
+<!--#include virtual="/footer.html" -->
+</BODY>
+</HTML>
Index: /pjproject/branches/split-3rd-party/pjmedia/docs/header.html
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/docs/header.html	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/docs/header.html	(revision 1163)
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>$title</title>
+<link href="/style/style.css" rel="stylesheet" type="text/css">
+</head><body>
+	<!--#include virtual="/header.html" -->
+
+	<p><A HREF="/">Home</A> --&gt; <A HREF="/docs.htm">Documentations</A> --&gt; PJMEDIA Reference</p>
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec.h	(revision 1163)
@@ -0,0 +1,34 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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/l16.h>
+#include <pjmedia-codec/gsm.h>
+#include <pjmedia-codec/speex.h>
+#include <pjmedia-codec/ilbc.h>
+
+
+#endif	/* __PJMEDIA_CODEC_PJMEDIA_CODEC_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/config.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/config.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/config.h	(revision 1163)
@@ -0,0 +1,65 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_CONFIG_H__
+#define __PJMEDIA_CODEC_CONFIG_H__
+
+#include <pjmedia/types.h>
+
+/*
+ * Include config_auto.h if autoconf is used (PJ_AUTOCONF is set)
+ */
+#if defined(PJ_AUTOCONF)
+#   include <pjmedia-codec/config_auto.h>
+#endif
+
+/**
+ * Unless specified otherwise, L16 codec is included by default.
+ */
+#ifndef PJMEDIA_HAS_L16_CODEC
+#   define PJMEDIA_HAS_L16_CODEC    1
+#endif
+
+
+/**
+ * Unless specified otherwise, GSM codec is included by default.
+ */
+#ifndef PJMEDIA_HAS_GSM_CODEC
+#   define PJMEDIA_HAS_GSM_CODEC    1
+#endif
+
+
+/**
+ * Unless specified otherwise, Speex codec is included by default.
+ */
+#ifndef PJMEDIA_HAS_SPEEX_CODEC
+#   define PJMEDIA_HAS_SPEEX_CODEC    1
+#endif
+
+
+/**
+ * Unless specified otherwise, iLBC codec is included by default.
+ */
+#ifndef PJMEDIA_HAS_ILBC_CODEC
+#   define PJMEDIA_HAS_ILBC_CODEC    1
+#endif
+
+
+
+#endif	/* __PJMEDIA_CODEC_CONFIG_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/config_auto.h.in
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/config_auto.h.in	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/config_auto.h.in	(revision 1163)
@@ -0,0 +1,59 @@
+/* $Id$ */
+/*
+ * Copyright (C) 2003-2006 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_CONFIG_AUTO_H_
+#define __PJMEDIA_CODEC_CONFIG_AUTO_H_
+
+/**
+ * @file config_auto.h
+ * @brief PJMEDIA-CODEC configuration as set by autoconf script
+ */
+
+/*
+ * Note:
+ *	The configuration in config_site.h overrides any other settings,
+ *	including the setting as detected by autoconf. 
+ */
+ 
+/* L16 codec */
+#ifndef PJMEDIA_HAS_L16_CODEC
+#undef PJMEDIA_HAS_L16_CODEC
+#endif
+
+
+/* GSM codec */
+#ifndef PJMEDIA_HAS_GSM_CODEC
+#undef PJMEDIA_HAS_GSM_CODEC
+#endif
+
+
+/* Speex codec */
+#ifndef PJMEDIA_HAS_SPEEX_CODEC
+#undef PJMEDIA_HAS_SPEEX_CODEC
+#endif
+
+
+/* iLBC codec */
+#ifndef PJMEDIA_HAS_ILBC_CODEC
+#undef PJMEDIA_HAS_ILBC_CODEC
+#endif
+
+
+#endif	/* __PJMEDIA_CODEC_CONFIG_AUTO_H_ */
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/gsm.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/gsm.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/gsm.h	(revision 1163)
@@ -0,0 +1,70 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_GSM_H__
+#define __PJMEDIA_CODEC_GSM_H__
+
+/**
+ * @file pjmedia-codec/gsm.h
+ * @brief GSM 06.10 codec.
+ */
+
+#include <pjmedia-codec/types.h>
+
+/**
+ * @defgroup PJMED_GSM GSM 06.10 Codec
+ * @ingroup PJMEDIA_CODEC
+ * @brief Implementation of GSM FR based on GSM 06.10 library
+ * @{
+ * This section describes functions to register and register GSM codec
+ * factory to the codec manager. After the codec factory has been registered,
+ * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Initialize and register GSM codec factory to pjmedia endpoint.
+ *
+ * @param endpt	    The pjmedia endpoint.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_gsm_init( pjmedia_endpt *endpt );
+
+
+
+/**
+ * Unregister GSM codec factory from pjmedia endpoint and deinitialize
+ * the GSM codec library.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_gsm_deinit(void);
+
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+#endif	/* __PJMEDIA_CODEC_GSM_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/ilbc.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/ilbc.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/ilbc.h	(revision 1163)
@@ -0,0 +1,74 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_ILBC_H__
+#define __PJMEDIA_CODEC_ILBC_H__
+
+/**
+ * @file pjmedia-codec/ilbc.h
+ * @brief iLBC codec.
+ */
+
+#include <pjmedia-codec/types.h>
+
+/**
+ * @defgroup PJMED_ILBC iLBC Codec
+ * @ingroup PJMEDIA_CODEC
+ * @brief Implementation of iLBC Codec
+ * @{
+ * This section describes functions to register and register iLBC codec
+ * factory to the codec manager. After the codec factory has been registered,
+ * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Initialize and register iLBC codec factory to pjmedia endpoint.
+ *
+ * @param endpt	    The pjmedia endpoint.
+ * @param mode	    Default decoder mode to be used. Valid values are
+ *		    20 and 30 ms. Note that encoder mode follows the
+ *		    setting advertised in the remote's SDP.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_ilbc_init( pjmedia_endpt *endpt,
+					      int mode );
+
+
+
+/**
+ * Unregister iLBC codec factory from pjmedia endpoint and deinitialize
+ * the iLBC codec library.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_ilbc_deinit(void);
+
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+#endif	/* __PJMEDIA_CODEC_ILBC_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/l16.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/l16.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/l16.h	(revision 1163)
@@ -0,0 +1,67 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_L16_H__
+#define __PJMEDIA_CODEC_L16_H__
+
+#include <pjmedia-codec/types.h>
+
+
+/**
+ * @defgroup PJMED_L16 L16 Codec Family
+ * @ingroup PJMEDIA_CODEC
+ * @brief 16bit linear codecs (useful for debugging)
+ * @{
+ * This section describes functions to register and register L16 codec
+ * factory to the codec manager. After the codec factory has been registered,
+ * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
+ *
+ * Note that the L16 codec factory registers several (about fourteen!) 
+ * L16 codec types to codec manager (different combinations of clock
+ * rate and number of channels).
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Initialize and register L16 codec factory to pjmedia endpoint.
+ *
+ * @param endpt	    The pjmedia endpoint.
+ * @param options   Must be zero for now.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_l16_init( pjmedia_endpt *endpt,
+					     unsigned options);
+
+
+
+/**
+ * Unregister L16 codec factory from pjmedia endpoint.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_l16_deinit(void);
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJMEDIA_CODEC_L16_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/speex.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/speex.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/speex.h	(revision 1163)
@@ -0,0 +1,104 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_SPEEX_H__
+#define __PJMEDIA_CODEC_SPEEX_H__
+
+/**
+ * @file speex.h
+ * @brief Speex codec header.
+ */
+
+#include <pjmedia-codec/types.h>
+
+/**
+ * @defgroup PJMED_SPEEX Speex Codec Family
+ * @ingroup PJMEDIA_CODEC
+ * @brief Implementation of Speex codecs (narrow/wide/ultrawide-band).
+ * @{
+ * This section describes functions to register and register speex codec
+ * factory to the codec manager. After the codec factory has been registered,
+ * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
+ *
+ * By default, the speex codec factory registers three Speex codecs:
+ * "speex/8000" narrowband codec, "speex/16000" wideband codec, and 
+ * "speex/32000" ultra-wideband codec. This behavior can be changed by
+ * specifying #pjmedia_speex_options flags during initialization.
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Bitmask options to be passed during Speex codec factory initialization.
+ */
+enum pjmedia_speex_options
+{
+    PJMEDIA_SPEEX_NO_NB	    = 1,    /**< Disable narrowband mode.	*/
+    PJMEDIA_SPEEX_NO_WB	    = 2,    /**< Disable wideband mode.		*/
+    PJMEDIA_SPEEX_NO_UWB    = 4,    /**< Disable ultra-wideband mode.	*/
+};
+
+
+/**
+ * Initialize and register Speex codec factory to pjmedia endpoint.
+ *
+ * @param endpt		The pjmedia endpoint.
+ * @param options	Bitmask of pjmedia_speex_options (default=0).
+ * @param quality	Specify encoding quality, or use -1 for default 
+ *			(default=8).
+ * @param complexity	Specify encoding complexity , or use -1 for default 
+ *			(default=8).
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_speex_init( pjmedia_endpt *endpt,
+					       unsigned options,
+					       int quality,
+					       int complexity );
+
+
+/**
+ * Initialize Speex codec factory using default settings and register to 
+ * pjmedia endpoint.
+ *
+ * @param endpt		The pjmedia endpoint.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_speex_init_default(pjmedia_endpt *endpt);
+
+
+
+/**
+ * Unregister Speex codec factory from pjmedia endpoint and deinitialize
+ * the Speex codec library.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_speex_deinit(void);
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* __PJMEDIA_CODEC_SPEEX_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/types.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/types.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia-codec/types.h	(revision 1163)
@@ -0,0 +1,61 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_TYPES_H__
+#define __PJMEDIA_CODEC_TYPES_H__
+
+#include <pjmedia-codec/config.h>
+
+
+/**
+ * These are the dynamic payload types that are used by codecs in
+ * this library. Also see the header file <pjmedia/codec.h> for list
+ * of static payload types.
+ */
+enum
+{
+    /* PJMEDIA_RTP_PT_TELEPHONE_EVENTS is declared in
+     * <pjmedia/config.h>
+     */
+#if PJMEDIA_RTP_PT_TELEPHONE_EVENTS
+    PJMEDIA_RTP_PT_START = PJMEDIA_RTP_PT_TELEPHONE_EVENTS,
+#else
+    PJMEDIA_RTP_PT_START = 102,
+#endif
+
+    PJMEDIA_RTP_PT_SPEEX_NB,			/**< Speex narrowband/8KHz  */
+    PJMEDIA_RTP_PT_SPEEX_WB,			/**< Speex wideband/16KHz   */
+    PJMEDIA_RTP_PT_SPEEX_UWB,			/**< Speex 32KHz	    */
+    PJMEDIA_RTP_PT_L16_8KHZ_MONO,		/**< L16 @ 8KHz, mono	    */
+    PJMEDIA_RTP_PT_L16_8KHZ_STEREO,		/**< L16 @ 8KHz, stereo     */
+    PJMEDIA_RTP_PT_L16_11KHZ_MONO,		/**< L16 @ 11KHz, mono	    */
+    PJMEDIA_RTP_PT_L16_11KHZ_STEREO,		/**< L16 @ 11KHz, stereo    */
+    PJMEDIA_RTP_PT_L16_16KHZ_MONO,		/**< L16 @ 16KHz, mono	    */
+    PJMEDIA_RTP_PT_L16_16KHZ_STEREO,		/**< L16 @ 16KHz, stereo    */
+    PJMEDIA_RTP_PT_L16_22KHZ_MONO,		/**< L16 @ 22KHz, mono	    */
+    PJMEDIA_RTP_PT_L16_22KHZ_STEREO,		/**< L16 @ 22KHz, stereo    */
+    PJMEDIA_RTP_PT_L16_32KHZ_MONO,		/**< L16 @ 32KHz, mono	    */
+    PJMEDIA_RTP_PT_L16_32KHZ_STEREO,		/**< L16 @ 32KHz, stereo    */
+    PJMEDIA_RTP_PT_L16_48KHZ_MONO,		/**< L16 @ 48KHz, mono	    */
+    PJMEDIA_RTP_PT_L16_48KHZ_STEREO,		/**< L16 @ 48KHz, stereo    */
+    PJMEDIA_RTP_PT_ILBC				/**< iLBC (13.3/15.2Kbps)   */
+};
+
+
+
+#endif	/* __PJMEDIA_CODEC_TYPES_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia.h	(revision 1163)
@@ -0,0 +1,64 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_H__
+#define __PJMEDIA_H__
+
+/**
+ * @file pjmedia.h
+ * @brief PJMEDIA main header file.
+ */
+
+#include <pjmedia/types.h>
+#include <pjmedia/alaw_ulaw.h>
+#include <pjmedia/bidirectional.h>
+#include <pjmedia/clock.h>
+#include <pjmedia/codec.h>
+#include <pjmedia/conference.h>
+#include <pjmedia/echo.h>
+#include <pjmedia/echo_port.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/endpoint.h>
+#include <pjmedia/g711.h>
+#include <pjmedia/jbuf.h>
+#include <pjmedia/master_port.h>
+#include <pjmedia/mem_port.h>
+#include <pjmedia/mp3_port.h>
+#include <pjmedia/null_port.h>
+#include <pjmedia/plc.h>
+#include <pjmedia/port.h>
+#include <pjmedia/resample.h>
+#include <pjmedia/rtcp.h>
+#include <pjmedia/rtp.h>
+#include <pjmedia/sdp.h>
+#include <pjmedia/sdp_neg.h>
+#include <pjmedia/session.h>
+#include <pjmedia/silencedet.h>
+#include <pjmedia/sound.h>
+#include <pjmedia/sound_port.h>
+#include <pjmedia/splitcomb.h>
+#include <pjmedia/tonegen.h>
+#include <pjmedia/transport.h>
+#include <pjmedia/transport_ice.h>
+#include <pjmedia/transport_udp.h>
+#include <pjmedia/wav_playlist.h>
+#include <pjmedia/wav_port.h>
+#include <pjmedia/wave.h>
+
+#endif	/* __PJMEDIA_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/alaw_ulaw.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/alaw_ulaw.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/alaw_ulaw.h	(revision 1163)
@@ -0,0 +1,142 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_ALAW_ULAW_H__
+#define __PJMEDIA_ALAW_ULAW_H__
+
+#include <pjmedia/types.h>
+
+#if defined(PJMEDIA_HAS_ALAW_ULAW_TABLE) && PJMEDIA_HAS_ALAW_ULAW_TABLE!=0
+
+extern const pj_uint8_t pjmedia_linear2ulaw_tab[16384];
+extern const pj_uint8_t pjmedia_linear2alaw_tab[16384];
+extern const pj_int16_t pjmedia_ulaw2linear_tab[256];
+extern const pj_int16_t pjmedia_alaw2linear_tab[256];
+
+
+/**
+ * Convert 16-bit linear PCM value to 8-bit A-Law.
+ *
+ * @param pcm_val   16-bit linear PCM value.
+ * @return	    8-bit A-Law value.
+ */
+#define pjmedia_linear2alaw(pcm_val)	\
+	    pjmedia_linear2alaw_tab[(((pj_int16_t)pcm_val) >> 2) & 0x3fff]
+
+/**
+ * Convert 8-bit A-Law value to 16-bit linear PCM value.
+ *
+ * @param chara_val 8-bit A-Law value.
+ * @return	    16-bit linear PCM value.
+ */
+#define pjmedia_alaw2linear(chara_val)	\
+	    pjmedia_alaw2linear_tab[chara_val]
+
+/**
+ * Convert 16-bit linear PCM value to 8-bit U-Law.
+ *
+ * @param pcm_val   16-bit linear PCM value.
+ * @return	    U-bit A-Law value.
+ */
+#define pjmedia_linear2ulaw(pcm_val)	\
+	    pjmedia_linear2ulaw_tab[(((pj_int16_t)pcm_val) >> 2) & 0x3fff]
+
+/**
+ * Convert 8-bit U-Law value to 16-bit linear PCM value.
+ *
+ * @param u_val	    8-bit U-Law value.
+ * @return	    16-bit linear PCM value.
+ */
+#define pjmedia_ulaw2linear(u_val)	\
+	    pjmedia_ulaw2linear_tab[u_val]
+
+/**
+ * Convert 8-bit A-Law value to 8-bit U-Law value.
+ *
+ * @param aval	    8-bit A-Law value.
+ * @return	    8-bit U-Law value.
+ */
+#define pjmedia_alaw2ulaw(aval)		\
+	    pjmedia_linear2ulaw(pjmedia_alaw2linear(aval))
+
+/**
+ * Convert 8-bit U-Law value to 8-bit A-Law value.
+ *
+ * @param uval	    8-bit U-Law value.
+ * @return	    8-bit A-Law value.
+ */
+#define pjmedia_ulaw2alaw(uval)		\
+	    pjmedia_linear2alaw(pjmedia_ulaw2linear(uval))
+
+
+#else
+
+/**
+ * Convert 16-bit linear PCM value to 8-bit A-Law.
+ *
+ * @param pcm_val   16-bit linear PCM value.
+ * @return	    8-bit A-Law value.
+ */
+PJ_DECL(pj_uint8_t) pjmedia_linear2alaw(int pcm_val);
+
+/**
+ * Convert 8-bit A-Law value to 16-bit linear PCM value.
+ *
+ * @param chara_val 8-bit A-Law value.
+ * @return	    16-bit linear PCM value.
+ */
+PJ_DECL(int) pjmedia_alaw2linear(unsigned chara_val);
+
+/**
+ * Convert 16-bit linear PCM value to 8-bit U-Law.
+ *
+ * @param pcm_val   16-bit linear PCM value.
+ * @return	    U-bit A-Law value.
+ */
+PJ_DECL(unsigned char) pjmedia_linear2ulaw(int pcm_val);
+
+/**
+ * Convert 8-bit U-Law value to 16-bit linear PCM value.
+ *
+ * @param u_val	    8-bit U-Law value.
+ * @return	    16-bit linear PCM value.
+ */
+PJ_DECL(int) pjmedia_ulaw2linear(unsigned char u_val);
+
+/**
+ * Convert 8-bit A-Law value to 8-bit U-Law value.
+ *
+ * @param aval	    8-bit A-Law value.
+ * @return	    8-bit U-Law value.
+ */
+PJ_DECL(unsigned char) pjmedia_alaw2ulaw(unsigned char aval);
+
+/**
+ * Convert 8-bit U-Law value to 8-bit A-Law value.
+ *
+ * @param uval	    8-bit U-Law value.
+ * @return	    8-bit A-Law value.
+ */
+PJ_DECL(unsigned char) pjmedia_ulaw2alaw(unsigned char uval);
+
+
+#endif
+
+
+#endif	/* __PJMEDIA_ALAW_ULAW_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/bidirectional.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/bidirectional.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/bidirectional.h	(revision 1163)
@@ -0,0 +1,65 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_BIDIRECTIONAL_H__
+#define __PJMEDIA_BIDIRECTIONAL_H__
+
+/**
+ * @file bidirectional.h
+ * @brief Create bidirectional port from two unidirectional ports.
+ */
+#include <pjmedia/port.h>
+
+
+/**
+ * @defgroup PJMEDIA_BIDIRECTIONAL_PORT Bidirectional Port
+ * @ingroup PJMEDIA_PORT
+ * @brief Create bidirectional port from two unidirectional ports.
+ * @{
+ */
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Create bidirectional port from two unidirectional ports
+ *
+ * @param pool		Pool to allocate memory.
+ * @param get_port	Port where get_frame() will be directed to.
+ * @param put_port	Port where put_frame() will be directed to.
+ * @param p_port	Pointer to receive the port instance.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_bidirectional_port_create(pj_pool_t *pool,
+						       pjmedia_port *get_port,
+						       pjmedia_port *put_port,
+						       pjmedia_port **p_port );
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_BIDIRECTIONAL_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/clock.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/clock.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/clock.h	(revision 1163)
@@ -0,0 +1,172 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_CLOCK_H__
+#define __PJMEDIA_CLOCK_H__
+
+/**
+ * @file clock.h
+ * @brief Media clock.
+ */
+#include <pjmedia/types.h>
+
+
+/**
+ * @addtogroup PJMEDIA_CLOCK Clock Generator
+ * @ingroup PJMEDIA_PORT_CLOCK
+ * @brief Interface for generating clock.
+ * @{
+ * 
+ * The clock generator provides the application with media timing,
+ * and it is used by the @ref PJMEDIA_MASTER_PORT for its sound clock.
+ *
+ * The clock generator may be configured to run <b>asynchronously</b> 
+ * (the default behavior) or <b>synchronously</b>. When it is run 
+ * asynchronously, it will call the application's callback every time
+ * the clock <b>tick</b> expires. When it is run synchronously, 
+ * application must continuously polls the clock generator to synchronize
+ * the timing.
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Opaque declaration for media clock.
+ */
+typedef struct pjmedia_clock pjmedia_clock;
+
+
+/**
+ * Options when creating the clock.
+ */
+enum pjmedia_clock_options
+{
+    /**
+     * Prevents the clock from running asynchronously. In this case,
+     * application must poll the clock continuously by calling
+     * #pjmedia_clock_wait() in order to synchronize timing.
+     */
+    PJMEDIA_CLOCK_NO_ASYNC  = 1
+};
+
+
+/**
+ * Type of media clock callback.
+ *
+ * @param ts		    Current timestamp, in samples.
+ * @param user_data	    Application data that is passed when
+ *			    the clock was created.
+ */
+typedef void pjmedia_clock_callback(const pj_timestamp *ts,
+				    void *user_data);
+
+
+
+/**
+ * Create media clock.
+ *
+ * @param pool		    Pool to allocate memory.
+ * @param clock_rate	    Number of samples per second.
+ * @param samples_per_frame Number of samples per frame. This argument
+ *			    along with clock_rate, specifies the interval
+ *			    of each clock run (or clock ticks).
+ * @param options	    By default, the callback will be called 
+ *			    asynchronously (depending on the clock 
+ *			    implementation backend, a thread may be 
+ *			    created). If PJMEDIA_CLOCK_NO_ASYNC is set,
+ *			    application must poll the clock with 
+ *			    #pjmedia_clock_wait() to let the clock runs.
+ * @param cb		    Callback to be called for each clock tick.
+ * @param user_data	    User data, which will be passed to the callback.
+ * @param p_clock	    Pointer to receive the clock instance.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate error
+ *			    code.
+ */
+PJ_DECL(pj_status_t) pjmedia_clock_create( pj_pool_t *pool,
+					   unsigned clock_rate,
+					   unsigned samples_per_frame,
+					   unsigned options,
+					   pjmedia_clock_callback *cb,
+					   void *user_data,
+					   pjmedia_clock **p_clock);
+
+/**
+ * Start the clock. For clock created with asynchronous flag set to TRUE,
+ * this may start a worker thread for the clock (depending on the 
+ * backend clock implementation being used).
+ *
+ * @param clock		    The media clock.
+ *
+ * @return		    PJ_SUCCES on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_clock_start(pjmedia_clock *clock);
+
+
+/**
+ * Stop the clock.
+ *
+ * @param clock		    The media clock.
+ *
+ * @return		    PJ_SUCCES on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_clock_stop(pjmedia_clock *clock);
+
+
+
+/**
+ * Poll the media clock, and execute the callback when the clock tick has
+ * elapsed. This operation is only valid if the clock is created with async
+ * flag set to FALSE.
+ *
+ * @param clock		    The media clock.
+ * @param wait		    If non-zero, then the function will block until
+ *			    a clock tick elapsed and callback has been called.
+ * @param ts		    Optional argument to receive the current 
+ *			    timestamp.
+ *
+ * @return		    Non-zero if clock tick has elapsed, or FALSE if
+ *			    the function returns before a clock tick has
+ *			    elapsed.
+ */
+PJ_DECL(pj_bool_t) pjmedia_clock_wait(pjmedia_clock *clock,
+				      pj_bool_t wait,
+				      pj_timestamp *ts);
+
+
+/**
+ * Destroy the clock.
+ *
+ * @param clock		    The media clock.
+ *
+ * @return		    PJ_SUCCES on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_clock_destroy(pjmedia_clock *clock);
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_CLOCK_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/codec.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/codec.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/codec.h	(revision 1163)
@@ -0,0 +1,845 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_H__
+#define __PJMEDIA_CODEC_H__
+
+
+/**
+ * @file codec.h
+ * @brief Codec framework.
+ */
+
+#include <pjmedia/port.h>
+#include <pj/list.h>
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJMEDIA_CODEC Codec Framework
+ * @ingroup PJMEDIA
+ * @brief Media codec framework and management
+ * @{
+ *
+ * @section codec_mgmt_sec Codec Management
+ * @subsection codec_fact_sec Codec Manager
+ *
+ * The codec manager is used to manage all codec capabilities in the endpoint.
+ * When used with media endpoint (pjmedia_endpt), application can retrieve
+ * the codec manager instance by calling #pjmedia_endpt_get_codec_mgr().
+ *
+ * @subsection reg_new_codec Registering New Codec
+ *
+ * New codec types can be registered to PJMEDIA (or to be precise, to the 
+ * codec manager) during run-time. 
+ * To do this, application needs to initialize an instance of
+ * codec factory (#pjmedia_codec_factory) and registers this codec factory
+ * by calling #pjmedia_codec_mgr_register_factory().
+ *
+ * For codecs implemented/supported by PJMEDIA, this process is normally
+ * concealed in an easy to use function such as #pjmedia_codec_g711_init().
+ *
+ * @subsection codec_factory Codec Factory
+ *
+ * A codec factory (#pjmedia_codec_factory) is registered to codec manager, 
+ * and it is used to create and release codec instance.
+ *
+ * The most important member of the codec factory is the "virtual" function
+ * table #pjmedia_codec_factory_op, where it contains, among other thing, 
+ * pointer to functions to allocate and deallocate codec instance.
+ *
+ * @subsection codec_inst Codec Instance
+ *
+ * Application allocates codec instance by calling #pjmedia_codec_mgr_alloc_codec().
+ * One codec instance (#pjmedia_codec) can be used for simultaneous encoding
+ * and decoding.
+ *
+ * The most important member of the codec instance is the "virtual" function
+ * table #pjmedia_codec_op, where it holds pointer to functions to
+ * encode/decode media frames.
+ *
+ * @subsection codec_ident Codec Identification
+ *
+ * A particular codec type in PJMEDIA can be uniquely identified by two
+ * keys: by #pjmedia_codec_info, or by #pjmedia_codec_id string. A fully
+ * qualified codec ID string consists of codec name, sampling rate, and
+ * number of channels. However, application may use only first parts of
+ * the tokens as long as it will make to codec ID unique. For example, "gsm"
+ * is a fully qualified codec name, since it will always have 8000 clock
+ * rate and 1 channel. Other examples of fully qualified codec ID strings
+ * are "pcma", "speex/8000", "speex/16000", and "L16/16000/1". A codec
+ * id "speex" (without clock rate) is not fully qualified, since it will
+ * match the narrowband, wideband, and ultrawideband Speex codec.
+ *
+ * The two keys can be converted to one another, with
+ * #pjmedia_codec_info_to_id() and #pjmedia_codec_mgr_find_codecs_by_id()
+ * functions.
+ *
+ * Codec ID string is not case sensitive.
+ *
+ *
+ * @section using_codec Using the Codec Framework
+ * @subsection init_alloc_codec Allocating Codec
+ *
+ * Application needs to allocate one codec instance for encoding and decoding
+ * media frames. One codec instance can be used to perform both encoding
+ * and decoding.
+ *
+ * Application allocates codec by calling #pjmedia_codec_mgr_alloc_codec().
+ * This function takes #pjmedia_codec_info argument, which is used to locate
+ * the particular codec factory to be used to allocate the codec.
+ *
+ * Application can build #pjmedia_codec_info structure manually for
+ * the specific codec, or alternatively it may get the #pjmedia_codec_info
+ * from the codec ID string, by using #pjmedia_codec_mgr_find_codecs_by_id()
+ * function.
+ *
+ * The following snippet shows an example to allocate a codec:
+ *
+ \code
+    pj_str_t codec_id;
+    pjmedia_codec_info *codec_info;
+    unsigned count = 1;
+    pjmedia_codec *codec;
+
+    codec_id = pj_str("pcma");
+
+    // Find codec info for the specified coded ID (i.e. "pcma").
+    status = pjmedia_codec_mgr_find_codecs_by_id( codec_mgr, &codec_id,
+						  &count, &codec_info, NULL);
+
+    // Allocate the codec.
+    status = pjmedia_codec_mgr_alloc_codec( codec_mgr, codec_info, &codec );
+
+ \endcode
+ *
+ *
+ * @subsection opening_codec Initializing Codec
+ *
+ * Once codec is allocated, application needs to initialize the codec
+ * by calling <b><tt>open</tt></b> member of the codec. This function
+ * takes #pjmedia_codec_param as the argument, which contains the
+ * settings for the codec.
+ *
+ * Application shoud use #pjmedia_codec_mgr_get_default_param() function
+ * to initiaize #pjmedia_codec_param. The <tt>setting</tt> part of
+ * #pjmedia_codec_param then can be tuned to suit the application's
+ * requirements.
+ *
+ * The following snippet shows an example to initialize codec:
+ *
+ \code
+    pjmedia_codec_param param;
+
+    // Retrieve default codec param for the specified codec.
+    pjmedia_codec_mgr_get_default_param(codec_mgr, codec_info
+					&param);
+
+    // Application may change the "settings" part of codec param,
+    // for example, to disable VAD
+    param.setting.vad = 0;
+
+    // Open the codec using the specified settings.
+    codec->op->open( codec, &param );
+
+ \endcode
+ *
+ *
+ * @subsection enc_dec_codec Encoding and Decoding Media Frames
+ *
+ * Application encodes and decodes media frames by calling
+ * <tt>encode</tt> and <tt>decode</tt> member of the codec's "virtual"
+ * function table (#pjmedia_codec_op).
+ *
+ * @subsection plc_codec Concealing Lost Frames
+ *
+ * All codecs has Packet Lost Concealment (PLC) feature, and application
+ * can activate the PLC to conceal lost frames by calling <tt>recover</tt>
+ * member of the codec's "virtual" function table (#pjmedia_codec_op).
+ *
+ * If the codec's algorithm supports PLC, the <tt>recover</tt> function
+ * will use the codec's PLC. Otherwise for codecs that don't have
+ * intrinsic PLC, PJMEDIA will suply the PLC implementation from the
+ * @ref PJMED_PLC implementation.
+ *
+ * @subsection close_codec Closing and Releasing the Codec
+ *
+ * The codec must be closed by calling <tt>close</tt> member of the codec's
+ * operation. Then it must be released by calling 
+ * #pjmedia_codec_mgr_dealloc_codec().
+ */
+
+
+/** 
+ * Standard RTP static payload types, as defined by RFC 3551. 
+ * The header file <pjmedia-codec/types.h> also declares dynamic payload
+ * type numbers that are used by PJMEDIA when advertising the capability
+ * for example in SDP message.
+ */
+enum pjmedia_rtp_pt
+{
+    PJMEDIA_RTP_PT_PCMU = 0,	    /**< audio PCMU			    */
+    PJMEDIA_RTP_PT_GSM  = 3,	    /**< audio GSM			    */
+    PJMEDIA_RTP_PT_G723 = 4,	    /**< audio G723			    */
+    PJMEDIA_RTP_PT_DVI4_8K = 5,	    /**< audio DVI4 8KHz		    */
+    PJMEDIA_RTP_PT_DVI4_16K = 6,    /**< audio DVI4 16Khz		    */
+    PJMEDIA_RTP_PT_LPC = 7,	    /**< audio LPC			    */
+    PJMEDIA_RTP_PT_PCMA = 8,	    /**< audio PCMA			    */
+    PJMEDIA_RTP_PT_G722 = 9,	    /**< audio G722			    */
+    PJMEDIA_RTP_PT_L16_2 = 10,	    /**< audio 16bit linear 44.1KHz stereo  */
+    PJMEDIA_RTP_PT_L16_1 = 11,	    /**< audio 16bit linear 44.1KHz mono    */
+    PJMEDIA_RTP_PT_QCELP = 12,	    /**< audio QCELP			    */
+    PJMEDIA_RTP_PT_CN = 13,	    /**< audio Comfort Noise		    */
+    PJMEDIA_RTP_PT_MPA = 14,	    /**< audio MPEG1/MPEG2 elemetr. streams */
+    PJMEDIA_RTP_PT_G728 = 15,	    /**< audio G728			    */
+    PJMEDIA_RTP_PT_DVI4_11K = 16,   /**< audio DVI4 11.025KHz mono	    */
+    PJMEDIA_RTP_PT_DVI4_22K = 17,   /**< audio DVI4 22.050KHz mono	    */
+    PJMEDIA_RTP_PT_G729 = 18,	    /**< audio G729			    */
+
+    PJMEDIA_RTP_PT_CELB = 25,	    /**< video/comb Cell-B by Sun (RFC2029) */
+    PJMEDIA_RTP_PT_JPEG = 26,	    /**< video JPEG			    */
+    PJMEDIA_RTP_PT_NV = 28,	    /**< video NV  by nv program by Xerox   */
+    PJMEDIA_RTP_PT_H261 = 31,	    /**< video H261			    */
+    PJMEDIA_RTP_PT_MPV = 32,	    /**< video MPEG1 or MPEG2 elementary    */
+    PJMEDIA_RTP_PT_MP2T = 33,	    /**< video MPEG2 transport		    */
+    PJMEDIA_RTP_PT_H263 = 34,	    /**< video H263			    */
+
+    PJMEDIA_RTP_PT_DYNAMIC = 96     /**< start of dynamic RTP payload	    */
+
+};
+
+
+/** 
+ * Identification used to search for codec factory that supports specific 
+ * codec specification. 
+ */
+typedef struct pjmedia_codec_info
+{
+    pjmedia_type    type;	    /**< Media type.			*/
+    unsigned	    pt;		    /**< Payload type (can be dynamic). */
+    pj_str_t	    encoding_name;  /**< Encoding name.			*/
+    unsigned	    clock_rate;	    /**< Sampling rate.			*/
+    unsigned	    channel_cnt;    /**< Channel count.			*/
+} pjmedia_codec_info;
+
+
+/** 
+ * Detailed codec attributes used both to configure a codec and to query
+ * the capability of codec factories.
+ */
+typedef struct pjmedia_codec_param
+{
+    /**
+     * The "info" part of codec param describes the capability of the codec,
+     * and the value should NOT be changed by application.
+     */
+    struct {
+       unsigned	   clock_rate;		/**< Sampling rate in Hz	    */
+       unsigned	   channel_cnt;		/**< Channel count.		    */
+       pj_uint32_t avg_bps;		/**< Average bandwidth in bits/sec  */
+       pj_uint16_t frm_ptime;		/**< Decoder frame ptime in msec.   */
+       pj_uint16_t enc_ptime;		/**< Encoder ptime, or zero if it's
+					     equal to decoder ptime.	    */
+       pj_uint8_t  pcm_bits_per_sample;	/**< Bits/sample in the PCM side    */
+       pj_uint8_t  pt;			/**< Payload type.		    */
+    } info;
+
+    /**
+     * The "setting" part of codec param describes various settings to be
+     * applied to the codec. When the codec param is retrieved from the codec
+     * or codec factory, the values of these will be filled by the capability
+     * of the codec. Any features that are supported by the codec (e.g. vad
+     * or plc) will be turned on, so that application can query which 
+     * capabilities are supported by the codec. Application may change the
+     * settings here before instantiating the codec/stream.
+     */
+    struct {
+	pj_uint8_t  frm_per_pkt;    /**< Number of frames per packet.	*/
+	unsigned    vad:1;	    /**< Voice Activity Detector.	*/
+	unsigned    cng:1;	    /**< Comfort Noise Generator.	*/
+	unsigned    penh:1;	    /**< Perceptual Enhancement		*/
+	unsigned    plc:1;	    /**< Packet loss concealment	*/
+	unsigned    reserved:1;	    /**< Reserved, must be zero.	*/
+	pj_uint8_t  enc_fmtp_mode;  /**< Mode param in fmtp (def:0)	*/
+	pj_uint8_t  dec_fmtp_mode;  /**< Mode param in fmtp (def:0)	*/
+    } setting;
+} pjmedia_codec_param;
+
+
+
+/*
+ * Forward declaration for pjmedia_codec.
+ */
+typedef struct pjmedia_codec pjmedia_codec;
+
+
+/**
+ * This structure describes codec operations. Each codec MUST implement
+ * all of these functions.
+ */
+typedef struct pjmedia_codec_op
+{
+    /** 
+     * Initialize codec using the specified attribute.
+     *
+     * @param codec	The codec instance.
+     * @param pool	Pool to use when the codec needs to allocate
+     *			some memory.
+     *
+     * @return		PJ_SUCCESS on success.
+     */
+    pj_status_t	(*init)(pjmedia_codec *codec, 
+			pj_pool_t *pool );
+
+    /** 
+     * Open the codec and initialize with the specified parameter.
+     * Upon successful initialization, the codec may modify the parameter
+     * and fills in the unspecified values (such as enc_ptime, when
+     * encoder ptime is different than decoder ptime).
+     *
+     * @param codec	The codec instance.
+     * @param param	Codec initialization parameter.
+     *
+     * @return		PJ_SUCCESS on success.
+     */
+    pj_status_t	(*open)(pjmedia_codec *codec, 
+			pjmedia_codec_param *param );
+
+    /** 
+     * Close and shutdown codec, releasing all resources allocated by
+     * this codec, if any.
+     *
+     * @param codec	The codec instance.
+     *
+     * @return		PJ_SUCCESS on success.
+     */
+    pj_status_t (*close)(pjmedia_codec *codec);
+
+    /** 
+     * Modify the codec parameter after the codec is open. 
+     * Note that not all codec parameters can be modified during run-time. 
+     * When the parameter cannot be changed, this function will return 
+     * non-PJ_SUCCESS, and the original parameters will not be changed.
+     *
+     * Application can expect changing trivial codec settings such as
+     * changing VAD setting to succeed.
+     *
+     * @param codec	The codec instance.
+     * @param param	The new codec parameter.
+     *
+     * @return		PJ_SUCCESS on success.
+     */
+    pj_status_t	(*modify)(pjmedia_codec *codec, 
+			  const pjmedia_codec_param *param );
+
+    /**
+     * Instruct the codec to inspect the specified payload/packet and
+     * split the packet into individual base frames. Each output frames will
+     * have ptime that is equal to basic frame ptime (i.e. the value of
+     * info.frm_ptime in #pjmedia_codec_param).
+     *
+     * @param codec	The codec instance
+     * @param pkt	The input packet.
+     * @param pkt_size	Size of the packet.
+     * @param timestamp	The timestamp of the first sample in the packet.
+     * @param frame_cnt	On input, specifies the maximum number of frames
+     *			in the array. On output, the codec must fill
+     *			with number of frames detected in the packet.
+     * @param frames	On output, specifies the frames that have been
+     *			detected in the packet.
+     *
+     * @return		PJ_SUCCESS on success.
+     */
+    pj_status_t (*parse)( pjmedia_codec *codec,
+			  void *pkt,
+			  pj_size_t pkt_size,
+			  const pj_timestamp *timestamp,
+			  unsigned *frame_cnt,
+			  pjmedia_frame frames[]);
+
+    /** 
+     * Instruct the codec to encode the specified input frame. The input
+     * PCM samples MUST have ptime that is exactly equal to base frame
+     * ptime (i.e. the value of info.frm_ptime in #pjmedia_codec_param).
+     *
+     * @param codec	The codec instance.
+     * @param input	The input frame.
+     * @param out_size	The length of buffer in the output frame.
+     * @param output	The output frame.
+     *
+     * @return		PJ_SUCCESS on success;
+     */
+    pj_status_t (*encode)(pjmedia_codec *codec, 
+			  const struct pjmedia_frame *input,
+			  unsigned out_size, 
+			  struct pjmedia_frame *output);
+
+    /** 
+     * Instruct the codec to decode the specified input frame. The input
+     * frame MUST have ptime that is exactly equal to base frame
+     * ptime (i.e. the value of info.frm_ptime in #pjmedia_codec_param).
+     * Application can achieve this by parsing the packet into base
+     * frames before decoding each frame.
+     *
+     * @param codec	The codec instance.
+     * @param input	The input frame.
+     * @param out_size	The length of buffer in the output frame.
+     * @param output	The output frame.
+     *
+     * @return		PJ_SUCCESS on success;
+     */
+    pj_status_t (*decode)(pjmedia_codec *codec, 
+			  const struct pjmedia_frame *input,
+			  unsigned out_size, 
+			  struct pjmedia_frame *output);
+
+    /**
+     * Instruct the codec to recover a missing frame.
+     *
+     * @param codec	The codec instance.
+     * @param out_size	The length of buffer in the output frame.
+     * @param output	The output frame where generated signal
+     *			will be placed.
+     *
+     * @return		PJ_SUCCESS on success;
+     */
+    pj_status_t (*recover)(pjmedia_codec *codec,
+			   unsigned out_size,
+			   struct pjmedia_frame *output);
+} pjmedia_codec_op;
+
+
+
+/*
+ * Forward declaration for pjmedia_codec_factory.
+ */
+typedef struct pjmedia_codec_factory pjmedia_codec_factory;
+
+
+/**
+ * This structure describes a codec instance. 
+ */
+struct pjmedia_codec
+{
+    /** Entries to put this codec instance in codec factory's list. */
+    PJ_DECL_LIST_MEMBER(struct pjmedia_codec);
+
+    /** Codec's private data. */
+    void		    *codec_data;
+
+    /** Codec factory where this codec was allocated. */
+    pjmedia_codec_factory   *factory;
+
+    /** Operations to codec. */
+    pjmedia_codec_op	    *op;
+};
+
+
+
+/**
+ * This structure describes operations that must be supported by codec 
+ * factories.
+ */
+typedef struct pjmedia_codec_factory_op
+{
+    /** 
+     * Check whether the factory can create codec with the specified 
+     * codec info.
+     *
+     * @param factory	The codec factory.
+     * @param info	The codec info.
+     *
+     * @return		PJ_SUCCESS if this factory is able to create an
+     *			instance of codec with the specified info.
+     */
+    pj_status_t	(*test_alloc)(pjmedia_codec_factory *factory, 
+			      const pjmedia_codec_info *info );
+
+    /** 
+     * Create default attributes for the specified codec ID. This function
+     * can be called by application to get the capability of the codec.
+     *
+     * @param factory	The codec factory.
+     * @param info	The codec info.
+     * @param attr	The attribute to be initialized.
+     *
+     * @return		PJ_SUCCESS if success.
+     */
+    pj_status_t (*default_attr)(pjmedia_codec_factory *factory, 
+    				const pjmedia_codec_info *info,
+    				pjmedia_codec_param *attr );
+
+    /** 
+     * Enumerate supported codecs that can be created using this factory.
+     * 
+     *  @param factory	The codec factory.
+     *  @param count	On input, specifies the number of elements in
+     *			the array. On output, the value will be set to
+     *			the number of elements that have been initialized
+     *			by this function.
+     *  @param info	The codec info array, which contents will be 
+     *			initialized upon return.
+     *
+     *  @return		PJ_SUCCESS on success.
+     */
+    pj_status_t (*enum_info)(pjmedia_codec_factory *factory, 
+			     unsigned *count, 
+			     pjmedia_codec_info codecs[]);
+
+    /** 
+     * Create one instance of the codec with the specified codec info.
+     *
+     * @param factory	The codec factory.
+     * @param info	The codec info.
+     * @param p_codec	Pointer to receive the codec instance.
+     *
+     * @return		PJ_SUCCESS on success.
+     */
+    pj_status_t (*alloc_codec)(pjmedia_codec_factory *factory, 
+			       const pjmedia_codec_info *info,
+			       pjmedia_codec **p_codec);
+
+    /** 
+     * This function is called by codec manager to return a particular 
+     * instance of codec back to the codec factory.
+     *
+     * @param factory	The codec factory.
+     * @param codec	The codec instance to be returned.
+     *
+     * @return		PJ_SUCCESS on success.
+     */
+    pj_status_t (*dealloc_codec)(pjmedia_codec_factory *factory, 
+				 pjmedia_codec *codec );
+
+} pjmedia_codec_factory_op;
+
+
+
+/**
+ * Codec factory describes a module that is able to create codec with specific
+ * capabilities. These capabilities can be queried by codec manager to create
+ * instances of codec.
+ */
+struct pjmedia_codec_factory
+{
+    /** Entries to put this structure in the codec manager list. */
+    PJ_DECL_LIST_MEMBER(struct pjmedia_codec_factory);
+
+    /** The factory's private data. */
+    void		     *factory_data;
+
+    /** Operations to the factory. */
+    pjmedia_codec_factory_op *op;
+
+};
+
+
+/**
+ * Declare maximum codecs
+ */
+#define PJMEDIA_CODEC_MGR_MAX_CODECS	    32
+
+
+/**
+ * Specify these values to set the codec priority, by calling
+ * #pjmedia_codec_mgr_set_codec_priority().
+ */
+typedef enum pjmedia_codec_priority
+{
+    /**
+     * This priority makes the codec the highest in the order.
+     * The last codec specified with this priority will get the
+     * highest place in the order, and will change the priority
+     * of previously highest priority codec to NEXT_HIGHER.
+     */
+    PJMEDIA_CODEC_PRIO_HIGHEST = 255,
+
+    /**
+     * This priority will put the codec as the next codec after
+     * codecs with this same priority.
+     */
+    PJMEDIA_CODEC_PRIO_NEXT_HIGHER = 254,
+
+    /**
+     * This is the initial codec priority when it is registered to
+     * codec manager by codec factory.
+     */
+    PJMEDIA_CODEC_PRIO_NORMAL = 128,
+
+    /**
+     * This priority makes the codec the lowest in the order.
+     * The last codec specified with this priority will be put
+     * in the last place in the order.
+     */
+    PJMEDIA_CODEC_PRIO_LOWEST = 1,
+
+    /**
+     * This priority will prevent the codec from being listed in the
+     * SDP created by media endpoint, thus should prevent the codec
+     * from being used in the sessions. However, the codec will still
+     * be listed by #pjmedia_codec_mgr_enum_codecs() and other codec
+     * query functions.
+     */
+    PJMEDIA_CODEC_PRIO_DISABLED = 0
+
+} pjmedia_codec_priority;
+
+
+/** 
+ * Codec identification (e.g. "pcmu/8000/1").
+ * See @ref codec_ident for more info.
+ */
+typedef char pjmedia_codec_id[32];
+
+
+/** 
+ * Codec manager maintains array of these structs for each supported
+ * codec.
+ */
+struct pjmedia_codec_desc
+{
+    pjmedia_codec_info	    info;	/**< Codec info.	    */
+    pjmedia_codec_id	    id;		/**< Fully qualified name   */
+    pjmedia_codec_priority  prio;	/**< Priority.		    */
+    pjmedia_codec_factory  *factory;	/**< The factory.	    */
+};
+
+
+/**
+ * The declaration for codec manager. Application doesn't normally need
+ * to see this declaration, but nevertheless this declaration is needed
+ * by media endpoint to instantiate the codec manager.
+ */
+typedef struct pjmedia_codec_mgr
+{
+    /** List of codec factories registered to codec manager. */
+    pjmedia_codec_factory	factory_list;
+
+    /** Number of supported codesc. */
+    unsigned			codec_cnt;
+
+    /** Array of codec descriptor. */
+    struct pjmedia_codec_desc	codec_desc[PJMEDIA_CODEC_MGR_MAX_CODECS];
+
+} pjmedia_codec_mgr;
+
+
+
+/**
+ * Initialize codec manager. Normally this function is called by pjmedia
+ * endpoint's initialization code.
+ *
+ * @param mgr	    Codec manager instance.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_mgr_init(pjmedia_codec_mgr *mgr);
+
+
+/** 
+ * Register codec factory to codec manager. This will also register
+ * all supported codecs in the factory to the codec manager.
+ *
+ * @param mgr	    The codec manager instance. Application can get the
+ *		    instance by calling #pjmedia_endpt_get_codec_mgr().
+ * @param factory   The codec factory to be registered.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_codec_mgr_register_factory( pjmedia_codec_mgr *mgr,
+				    pjmedia_codec_factory *factory);
+
+/**
+ * Unregister codec factory from the codec manager. This will also
+ * remove all the codecs registered by the codec factory from the
+ * codec manager's list of supported codecs.
+ *
+ * @param mgr	    The codec manager instance. Application can get the
+ *		    instance by calling #pjmedia_endpt_get_codec_mgr().
+ * @param factory   The codec factory to be unregistered.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_codec_mgr_unregister_factory( pjmedia_codec_mgr *mgr, 
+				      pjmedia_codec_factory *factory);
+
+/**
+ * Enumerate all supported codecs that have been registered to the
+ * codec manager by codec factories.
+ *
+ * @param mgr	    The codec manager instance. Application can get the
+ *		    instance by calling #pjmedia_endpt_get_codec_mgr().
+ * @param count	    On input, specifies the number of elements in
+ *		    the array. On output, the value will be set to
+ *		    the number of elements that have been initialized
+ *		    by this function.
+ * @param info	    The codec info array, which contents will be 
+ *		    initialized upon return.
+ * @param prio	    Optional pointer to receive array of codec priorities.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_mgr_enum_codecs( pjmedia_codec_mgr *mgr, 
+						    unsigned *count, 
+						    pjmedia_codec_info info[],
+						    unsigned *prio);
+
+/**
+ * Get codec info for the specified static payload type. Note that
+ * this can only find codec with static payload types. This function can
+ * be used to find codec info for a payload type inside SDP which doesn't
+ * have the corresponding rtpmap attribute.
+ *
+ * @param mgr	    The codec manager instance. Application can get the
+ *		    instance by calling #pjmedia_endpt_get_codec_mgr().
+ * @param pt	    Static payload type/number.
+ * @param inf	    Pointer to receive codec info.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_codec_mgr_get_codec_info( pjmedia_codec_mgr *mgr,
+				  unsigned pt,
+				  const pjmedia_codec_info **inf);
+
+/**
+ * Convert codec info struct into a unique codec identifier.
+ * A codec identifier looks something like "L16/44100/2".
+ *
+ * @param info	    The codec info
+ * @param id	    Buffer to put the codec info string.
+ * @param max_len   The length of the buffer.
+ *
+ * @return	    The null terminated codec info string, or NULL if
+ *		    the buffer is not long enough.
+ */
+PJ_DECL(char*) pjmedia_codec_info_to_id(const pjmedia_codec_info *info,
+				        char *id, unsigned max_len );
+
+
+/**
+ * Find codecs by the unique codec identifier. This function will find
+ * all codecs that match the codec identifier prefix. For example, if
+ * "L16" is specified, then it will find "L16/8000/1", "L16/16000/1",
+ * and so on, up to the maximum count specified in the argument.
+ *
+ * @param mgr	    The codec manager instance. Application can get the
+ *		    instance by calling #pjmedia_endpt_get_codec_mgr().
+ * @param codec_id  The full codec ID or codec ID prefix. If an empty
+ *		    string is given, it will match all codecs.
+ * @param count	    Maximum number of codecs to find. On return, it
+ *		    contains the actual number of codecs found.
+ * @param p_info    Array of pointer to codec info to be filled. This
+ *		    argument may be NULL, which in this case, only
+ *		    codec count will be returned.
+ * @param prio	    Optional array of codec priorities.
+ *
+ * @return	    PJ_SUCCESS if at least one codec info is found.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_codec_mgr_find_codecs_by_id( pjmedia_codec_mgr *mgr,
+				     const pj_str_t *codec_id,
+				     unsigned *count,
+				     const pjmedia_codec_info *p_info[],
+				     unsigned prio[]);
+
+
+/**
+ * Set codec priority. The codec priority determines the order of
+ * the codec in the SDP created by the endpoint. If more than one codecs
+ * are found with the same codec_id prefix, then the function sets the
+ * priorities of all those codecs.
+ *
+ * @param mgr	    The codec manager instance. Application can get the
+ *		    instance by calling #pjmedia_endpt_get_codec_mgr().
+ * @param codec_id  The full codec ID or codec ID prefix. If an empty
+ *		    string is given, it will match all codecs.
+ * @param prio	    Priority to be set. The priority can have any value
+ *		    between 1 to 255. When the priority is set to zero,
+ *		    the codec will be disabled.
+ *
+ * @return	    PJ_SUCCESS if at least one codec info is found.
+ */
+PJ_DECL(pj_status_t)
+pjmedia_codec_mgr_set_codec_priority(pjmedia_codec_mgr *mgr, 
+				     const pj_str_t *codec_id,
+				     pj_uint8_t prio);
+
+
+/**
+ * Get default codec param for the specified codec info.
+ *
+ * @param mgr	    The codec manager instance. Application can get the
+ *		    instance by calling #pjmedia_endpt_get_codec_mgr().
+ * @param info	    The codec info, which default parameter's is being
+ *		    queried.
+ * @param param	    On return, will be filled with the default codec
+ *		    parameter.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_codec_mgr_get_default_param( pjmedia_codec_mgr *mgr,
+				     const pjmedia_codec_info *info,
+				     pjmedia_codec_param *param );
+
+/**
+ * Request the codec manager to allocate one instance of codec with the
+ * specified codec info. The codec will enumerate all codec factories
+ * until it finds factory that is able to create the specified codec.
+ *
+ * @param mgr	    The codec manager instance. Application can get the
+ *		    instance by calling #pjmedia_endpt_get_codec_mgr().
+ * @param info	    The information about the codec to be created.
+ * @param p_codec   Pointer to receive the codec instance.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_codec_mgr_alloc_codec( pjmedia_codec_mgr *mgr, 
+			       const pjmedia_codec_info *info,
+			       pjmedia_codec **p_codec);
+
+/**
+ * Deallocate the specified codec instance. The codec manager will return
+ * the instance of the codec back to its factory.
+ *
+ * @param mgr	    The codec manager instance. Application can get the
+ *		    instance by calling #pjmedia_endpt_get_codec_mgr().
+ * @param codec	    The codec instance.
+ *
+ * @return	    PJ_SUCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_mgr_dealloc_codec(pjmedia_codec_mgr *mgr, 
+						     pjmedia_codec *codec);
+
+
+
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJMEDIA_CODEC_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/conference.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/conference.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/conference.h	(revision 1163)
@@ -0,0 +1,482 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_CONF_H__
+#define __PJMEDIA_CONF_H__
+
+
+/**
+ * @file conference.h
+ * @brief Conference bridge.
+ */
+#include <pjmedia/port.h>
+
+/**
+ * @defgroup PJMEDIA_CONF Conference Bridge
+ * @ingroup PJMEDIA_PORT
+ * @brief The implementation of conference bridge
+ * @{
+ *
+ * This describes the conference bridge implementation in PJMEDIA. The
+ * conference bridge provides powerful and very efficient mechanism to
+ * route the audio flow and mix the audio signal when required.
+ *
+ * Some more information about the media flow when conference bridge is
+ * used is described in http://www.pjsip.org/trac/wiki/media-flow .
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Opaque type for conference bridge.
+ */
+typedef struct pjmedia_conf pjmedia_conf;
+
+/**
+ * Conference port info.
+ */
+typedef struct pjmedia_conf_port_info
+{
+    unsigned		slot;		    /**< Slot number.		    */
+    pj_str_t		name;		    /**< Port name.		    */
+    pjmedia_port_op	tx_setting;	    /**< Transmit settings.	    */
+    pjmedia_port_op	rx_setting;	    /**< Receive settings.	    */
+    unsigned		listener_cnt;	    /**< Number of listeners.	    */
+    unsigned	       *listener_slots;	    /**< Array of listeners.	    */
+    unsigned		clock_rate;	    /**< Clock rate of the port.    */
+    unsigned		channel_count;	    /**< Number of channels.	    */
+    unsigned		samples_per_frame;  /**< Samples per frame	    */
+    unsigned		bits_per_sample;    /**< Bits per sample.	    */
+    int			tx_adj_level;	    /**< Tx level adjustment.	    */
+    int			rx_adj_level;	    /**< Rx level adjustment.	    */
+} pjmedia_conf_port_info;
+
+
+/**
+ * Conference port options. The values here can be combined in bitmask to
+ * be specified when the conference bridge is created.
+ */
+enum pjmedia_conf_option
+{
+    PJMEDIA_CONF_NO_MIC  = 1,	/**< Disable audio streams from the
+				     microphone device.			    */
+    PJMEDIA_CONF_NO_DEVICE = 2,	/**< Do not create sound device.	    */
+    PJMEDIA_CONF_SMALL_FILTER=4,/**< Use small filter table when resampling */
+    PJMEDIA_CONF_USE_LINEAR=8	/**< Use linear resampling instead of filter
+				     based.				    */
+};
+
+
+/**
+ * Create conference bridge with the specified parameters. The sampling rate,
+ * samples per frame, and bits per sample will be used for the internal
+ * operation of the bridge (e.g. when mixing audio frames). However, ports 
+ * with different configuration may be connected to the bridge. In this case,
+ * the bridge is able to perform sampling rate conversion, and buffering in 
+ * case the samples per frame is different.
+ *
+ * For this version of PJMEDIA, only 16bits per sample is supported.
+ *
+ * For this version of PJMEDIA, the channel count of the ports MUST match
+ * the channel count of the bridge.
+ *
+ * Under normal operation (i.e. when PJMEDIA_CONF_NO_DEVICE option is NOT
+ * specified), the bridge internally create an instance of sound device
+ * and connect the sound device to port zero of the bridge. 
+ *
+ * If PJMEDIA_CONF_NO_DEVICE options is specified, no sound device will
+ * be created in the conference bridge. Application MUST acquire the port
+ * interface of the bridge by calling #pjmedia_conf_get_master_port(), and
+ * connect this port interface to a sound device port by calling
+ * #pjmedia_snd_port_connect(), or to a master port (pjmedia_master_port)
+ * if application doesn't want to instantiate any sound devices.
+ *
+ * The sound device or master port are crucial for the bridge's operation, 
+ * because it provides the bridge with necessary clock to process the audio
+ * frames periodically. Internally, the bridge runs when get_frame() to 
+ * port zero is called.
+ *
+ * @param pool		    Pool to use to allocate the bridge and 
+ *			    additional buffers for the sound device.
+ * @param max_slots	    Maximum number of slots/ports to be created in
+ *			    the bridge. Note that the bridge internally uses
+ *			    one port for the sound device, so the actual 
+ *			    maximum number of ports will be less one than
+ *			    this value.
+ * @param sampling_rate	    Set the sampling rate of the bridge. This value
+ *			    is also used to set the sampling rate of the
+ *			    sound device.
+ * @param channel_count	    Number of channels in the PCM stream. Normally
+ *			    the value will be 1 for mono, but application may
+ *			    specify a value of 2 for stereo. Note that all
+ *			    ports that will be connected to the bridge MUST 
+ *			    have the same number of channels as the bridge.
+ * @param samples_per_frame Set the number of samples per frame. This value
+ *			    is also used to set the sound device.
+ * @param bits_per_sample   Set the number of bits per sample. This value
+ *			    is also used to set the sound device. Currently
+ *			    only 16bit per sample is supported.
+ * @param options	    Bitmask options to be set for the bridge. The
+ *			    options are constructed from #pjmedia_conf_option
+ *			    enumeration.
+ * @param p_conf	    Pointer to receive the conference bridge instance.
+ *
+ * @return		    PJ_SUCCESS if conference bridge can be created.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_create( pj_pool_t *pool,
+					  unsigned max_slots,
+					  unsigned sampling_rate,
+					  unsigned channel_count,
+					  unsigned samples_per_frame,
+					  unsigned bits_per_sample,
+					  unsigned options,
+					  pjmedia_conf **p_conf );
+
+
+/**
+ * Destroy conference bridge.
+ *
+ * @param conf		    The conference bridge.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_destroy( pjmedia_conf *conf );
+
+
+/**
+ * Get the master port interface of the conference bridge. The master port
+ * corresponds to the port zero of the bridge. This is only usefull when 
+ * application wants to manage the sound device by itself, instead of 
+ * allowing the bridge to automatically create a sound device implicitly.
+ *
+ * This function will only return a port interface if PJMEDIA_CONF_NO_DEVICE
+ * option was specified when the bridge was created.
+ *
+ * Application can connect the port returned by this function to a 
+ * sound device by calling #pjmedia_snd_port_connect().
+ *
+ * @param conf		    The conference bridge.
+ *
+ * @return		    The port interface of port zero of the bridge,
+ *			    only when PJMEDIA_CONF_NO_DEVICE options was
+ *			    specified when the bridge was created.
+ */
+PJ_DECL(pjmedia_port*) pjmedia_conf_get_master_port(pjmedia_conf *conf);
+
+
+/**
+ * Set master port name.
+ *
+ * @param conf		    The conference bridge.
+ * @param name		    Name to be assigned.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_set_port0_name(pjmedia_conf *conf,
+						 const pj_str_t *name);
+
+
+/**
+ * Add media port to the conference bridge.
+ *
+ * By default, the new conference port will have both TX and RX enabled, 
+ * but it is not connected to any other ports. Application SHOULD call 
+ * #pjmedia_conf_connect_port() to  enable audio transmission and receipt 
+ * to/from this port.
+ *
+ * Once the media port is connected to other port(s) in the bridge,
+ * the bridge will continuosly call get_frame() and put_frame() to the
+ * port, allowing media to flow to/from the port.
+ *
+ * @param conf		The conference bridge.
+ * @param pool		Pool to allocate buffers for this port.
+ * @param strm_port	Stream port interface.
+ * @param name		Optional name for the port. If this value is NULL,
+ *			the name will be taken from the name in the port 
+ *			info.
+ * @param p_slot	Pointer to receive the slot index of the port in
+ *			the conference bridge.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_add_port( pjmedia_conf *conf,
+					    pj_pool_t *pool,
+					    pjmedia_port *strm_port,
+					    const pj_str_t *name,
+					    unsigned *p_slot );
+
+
+/**
+ * Create and add a passive media port to the conference bridge. Unlike
+ * "normal" media port that is added with #pjmedia_conf_add_port(), media
+ * port created with this function will not have its get_frame() and
+ * put_frame() called by the bridge; instead, application MUST continuosly
+ * call these functions to the port, to allow media to flow from/to the
+ * port.
+ *
+ * Upon return of this function, application will be given two objects:
+ * the slot number of the port in the bridge, and pointer to the media
+ * port where application MUST start calling get_frame() and put_frame()
+ * to the port.
+ *
+ * @param conf		    The conference bridge.
+ * @param pool		    Pool to allocate buffers etc for this port.
+ * @param name		    Name to be assigned to the port.
+ * @param clock_rate	    Clock rate/sampling rate.
+ * @param channel_count	    Number of channels.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Number of bits per sample.
+ * @param options	    Options (should be zero at the moment).
+ * @param p_slot	    Pointer to receive the slot index of the port in
+ *			    the conference bridge.
+ * @param p_port	    Pointer to receive the port instance.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate error 
+ *			    code.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_add_passive_port( pjmedia_conf *conf,
+						    pj_pool_t *pool,
+						    const pj_str_t *name,
+						    unsigned clock_rate,
+						    unsigned channel_count,
+						    unsigned samples_per_frame,
+						    unsigned bits_per_sample,
+						    unsigned options,
+						    unsigned *p_slot,
+						    pjmedia_port **p_port );
+
+
+/**
+ * Change TX and RX settings for the port.
+ *
+ * @param conf		The conference bridge.
+ * @param slot		Port number/slot in the conference bridge.
+ * @param tx		Settings for the transmission TO this port.
+ * @param rx		Settings for the receipt FROM this port.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_configure_port( pjmedia_conf *conf,
+						  unsigned slot,
+						  pjmedia_port_op tx,
+						  pjmedia_port_op rx);
+
+
+/**
+ * Enable unidirectional audio from the specified source slot to the
+ * specified sink slot.
+ *
+ * @param conf		The conference bridge.
+ * @param src_slot	Source slot.
+ * @param sink_slot	Sink slot.
+ * @param level		This argument is reserved for future improvements
+ *			where it is possible to adjust the level of signal
+ *			transmitted in a specific connection. For now,
+ *			this argument MUST be zero.
+ *
+ * @return		PJ_SUCCES on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_connect_port( pjmedia_conf *conf,
+						unsigned src_slot,
+						unsigned sink_slot,
+						int level );
+
+
+/**
+ * Disconnect unidirectional audio from the specified source to the specified
+ * sink slot.
+ *
+ * @param conf		The conference bridge.
+ * @param src_slot	Source slot.
+ * @param sink_slot	Sink slot.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_disconnect_port( pjmedia_conf *conf,
+						   unsigned src_slot,
+						   unsigned sink_slot );
+
+
+/**
+ * Get total number of ports connections currently set up in the bridge.
+ * 
+ * @param conf		The conference bridge.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(unsigned) pjmedia_conf_get_connect_count(pjmedia_conf *conf);
+
+
+/**
+ * Remove the specified port from the conference bridge.
+ *
+ * @param conf		The conference bridge.
+ * @param slot		The port index to be removed.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_remove_port( pjmedia_conf *conf,
+					       unsigned slot );
+
+
+
+/**
+ * Enumerate occupied ports in the bridge.
+ *
+ * @param conf		The conference bridge.
+ * @param ports		Array of port numbers to be filled in.
+ * @param count		On input, specifies the maximum number of ports
+ *			in the array. On return, it will be filled with
+ *			the actual number of ports.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_enum_ports( pjmedia_conf *conf,
+					      unsigned ports[],
+					      unsigned *count );
+
+
+/**
+ * Get port info.
+ *
+ * @param conf		The conference bridge.
+ * @param slot		Port index.
+ * @param info		Pointer to receive the info.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_get_port_info( pjmedia_conf *conf,
+						 unsigned slot,
+						 pjmedia_conf_port_info *info);
+
+
+/**
+ * Get occupied ports info.
+ *
+ * @param conf		The conference bridge.
+ * @param size		On input, contains maximum number of infos
+ *			to be retrieved. On output, contains the actual
+ *			number of infos that have been copied.
+ * @param info		Array of info.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_get_ports_info(pjmedia_conf *conf,
+						 unsigned *size,
+						 pjmedia_conf_port_info info[]
+						 );
+
+
+/**
+ * Get last signal level transmitted to or received from the specified port.
+ * This will retrieve the "real-time" signal level of the audio as they are
+ * transmitted or received by the specified port. Application may call this
+ * function periodically to display the signal level to a VU meter.
+ *
+ * The signal level is an integer value in zero to 255, with zero indicates
+ * no signal, and 255 indicates the loudest signal level.
+ *
+ * @param conf		The conference bridge.
+ * @param slot		Slot number.
+ * @param tx_level	Optional argument to receive the level of signal
+ *			transmitted to the specified port (i.e. the direction
+ *			is from the bridge to the port).
+ * @param rx_level	Optional argument to receive the level of signal
+ *			received from the port (i.e. the direction is from the
+ *			port to the bridge).
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_get_signal_level(pjmedia_conf *conf,
+						   unsigned slot,
+						   unsigned *tx_level,
+						   unsigned *rx_level);
+
+
+/**
+ * Adjust the level of signal received from the specified port.
+ * Application may adjust the level to make signal received from the port
+ * either louder or more quiet. The level adjustment is calculated with this
+ * formula: <b><tt>output = input * (adj_level+128) / 128</tt></b>. Using 
+ * this, zero indicates no adjustment, the value -128 will mute the signal, 
+ * and the value of +128 will make the signal 100% louder, +256 will make it
+ * 200% louder, etc.
+ *
+ * The level adjustment value will stay with the port until the port is
+ * removed from the bridge or new adjustment value is set. The current
+ * level adjustment value is reported in the media port info when
+ * the #pjmedia_conf_get_port_info() function is called.
+ *
+ * @param conf		The conference bridge.
+ * @param slot		Slot number of the port.
+ * @param adj_level	Adjustment level, which must be greater than or equal
+ *			to -128. A value of zero means there is no level
+ *			adjustment to be made, the value -128 will mute the 
+ *			signal, and the value of +128 will make the signal 
+ *			100% louder, +256 will make it 200% louder, etc. 
+ *			See the function description for the formula.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_adjust_rx_level( pjmedia_conf *conf,
+						   unsigned slot,
+						   int adj_level );
+
+
+/**
+ * Adjust the level of signal to be transmitted to the specified port.
+ * Application may adjust the level to make signal transmitted to the port
+ * either louder or more quiet. The level adjustment is calculated with this
+ * formula: <b><tt>output = input * (adj_level+128) / 128</tt></b>. Using 
+ * this, zero indicates no adjustment, the value -128 will mute the signal, 
+ * and the value of +128 will make the signal 100% louder, +256 will make it
+ * 200% louder, etc.
+ *
+ * The level adjustment value will stay with the port until the port is
+ * removed from the bridge or new adjustment value is set. The current
+ * level adjustment value is reported in the media port info when
+ * the #pjmedia_conf_get_port_info() function is called.
+ *
+ * @param conf		The conference bridge.
+ * @param slot		Slot number of the port.
+ * @param adj_level	Adjustment level, which must be greater than or equal
+ *			to -128. A value of zero means there is no level
+ *			adjustment to be made, the value -128 will mute the 
+ *			signal, and the value of +128 will make the signal 
+ *			100% louder, +256 will make it 200% louder, etc. 
+ *			See the function description for the formula.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_adjust_tx_level( pjmedia_conf *conf,
+						   unsigned slot,
+						   int adj_level );
+
+
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_CONF_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/config.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/config.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/config.h	(revision 1163)
@@ -0,0 +1,354 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_H__
+#define __PJMEDIA_CONFIG_H__
+
+/**
+ * @file pjmedia/config.h Compile time config
+ * @brief Contains some compile time constants.
+ */
+#include <pj/config.h>
+
+/**
+ * @defgroup PJMEDIA_BASE Base Types and Configurations
+ * @ingroup PJMEDIA
+ */
+
+/**
+ * @defgroup PJMEDIA_CONFIG Compile time configuration
+ * @ingroup PJMEDIA_BASE
+ * @brief Some compile time configuration settings.
+ * @{
+ */
+
+/*
+ * Include config_auto.h if autoconf is used (PJ_AUTOCONF is set)
+ */
+#if defined(PJ_AUTOCONF)
+#   include <pjmedia/config_auto.h>
+#endif
+
+/*
+ * Types of sound stream backends.
+ */
+
+/** Constant for NULL sound backend. */
+#define PJMEDIA_SOUND_NULL_SOUND	    0
+
+/** Constant for PortAudio sound backend. */
+#define PJMEDIA_SOUND_PORTAUDIO_SOUND	    1
+
+/** Constant for Win32 DirectSound sound backend. */
+#define PJMEDIA_SOUND_WIN32_DIRECT_SOUND    2
+
+
+/**
+ * Unless specified otherwise, sound device uses PortAudio implementation
+ * by default.
+ */
+#ifndef PJMEDIA_SOUND_IMPLEMENTATION
+#  if defined(PJ_WIN32) && PJ_WIN32!=0
+/*#   define PJMEDIA_SOUND_IMPLEMENTATION   PJMEDIA_SOUND_WIN32_DIRECT_SOUND*/
+#   define PJMEDIA_SOUND_IMPLEMENTATION	    PJMEDIA_SOUND_PORTAUDIO_SOUND
+#  else
+#   define PJMEDIA_SOUND_IMPLEMENTATION	    PJMEDIA_SOUND_PORTAUDIO_SOUND
+#  endif
+#endif
+
+
+/**
+ * Specify number of sound buffers. Larger number is better for sound
+ * stability and to accomodate sound devices that are unable to send frames
+ * in timely manner, however it would probably cause more audio delay (and 
+ * definitely will take more memory). One individual buffer is normally 10ms
+ * or 20 ms long, depending on ptime settings (samples_per_frame value).
+ *
+ * The setting here currently is used by the conference bridge, the splitter
+ * combiner port, and dsound.c.
+ *
+ * Default: 16
+ */
+#ifndef PJMEDIA_SOUND_BUFFER_COUNT
+#   define PJMEDIA_SOUND_BUFFER_COUNT	    16
+#endif
+
+
+/**
+ * Specify which A-law/U-law conversion algorithm to use.
+ * By default the conversion algorithm uses A-law/U-law table which gives
+ * the best performance, at the expense of 33 KBytes of static data.
+ * If this option is disabled, a smaller but slower algorithm will be used.
+ */
+#ifndef PJMEDIA_HAS_ALAW_ULAW_TABLE
+#   define PJMEDIA_HAS_ALAW_ULAW_TABLE	    1
+#endif
+
+
+/**
+ * Unless specified otherwise, G711 codec is included by default.
+ */
+#ifndef PJMEDIA_HAS_G711_CODEC
+#   define PJMEDIA_HAS_G711_CODEC	    1
+#endif
+
+
+/**
+ * Include small filter table in resample.
+ * This adds about 9KB in rdata.
+ */
+#ifndef PJMEDIA_HAS_SMALL_FILTER
+#   define PJMEDIA_HAS_SMALL_FILTER	    1
+#endif
+
+
+/**
+ * Include large filter table in resample.
+ * This adds about 32KB in rdata.
+ */
+#ifndef PJMEDIA_HAS_LARGE_FILTER
+#   define PJMEDIA_HAS_LARGE_FILTER	    1
+#endif
+
+
+/**
+ * Default file player/writer buffer size.
+ */
+#ifndef PJMEDIA_FILE_PORT_BUFSIZE
+#   define PJMEDIA_FILE_PORT_BUFSIZE    4000
+#endif
+
+
+/**
+ * Maximum frame duration (in msec) to be supported.
+ * This (among other thing) will affect the size of buffers to be allocated
+ * for outgoing packets.
+ */
+#ifndef PJMEDIA_MAX_FRAME_DURATION_MS   
+#   define PJMEDIA_MAX_FRAME_DURATION_MS   	200
+#endif
+
+
+/**
+ * Max packet size to support.
+ */
+#ifndef PJMEDIA_MAX_MTU			
+#  define PJMEDIA_MAX_MTU			1500
+#endif
+
+
+/**
+ * DTMF/telephone-event duration, in timestamp.
+ */
+#ifndef PJMEDIA_DTMF_DURATION		
+#  define PJMEDIA_DTMF_DURATION			1600	/* in timestamp */
+#endif
+
+
+/**
+ * Number of packets received from different source IP address from the
+ * remote address required to make the stream switch transmission
+ * to the source address.
+ */
+#ifndef PJMEDIA_RTP_NAT_PROBATION_CNT	
+#  define PJMEDIA_RTP_NAT_PROBATION_CNT		10
+#endif
+
+
+/**
+ * Interval to send RTCP packets, in msec
+ */
+#ifndef PJMEDIA_RTCP_INTERVAL
+#	define PJMEDIA_RTCP_INTERVAL		5000	/* msec*/
+#endif
+
+
+/**
+ * Tell RTCP to ignore the first N packets when calculating the
+ * jitter statistics. From experimentation, the first few packets
+ * (25 or so) have relatively big jitter, possibly because during
+ * this time, the program is also busy setting up the signaling,
+ * so they make the average jitter big.
+ *
+ * Default: 25.
+ */
+#ifndef PJMEDIA_RTCP_IGNORE_FIRST_PACKETS
+#   define  PJMEDIA_RTCP_IGNORE_FIRST_PACKETS	25
+#endif
+
+
+/**
+ * Specify how long (in miliseconds) the stream should suspend the
+ * silence detector/voice activity detector (VAD) during the initial
+ * period of the session. This feature is useful to open bindings in
+ * all NAT routers between local and remote endpoint since most NATs
+ * do not allow incoming packet to get in before local endpoint sends
+ * outgoing packets.
+ *
+ * Specify zero to disable this feature.
+ *
+ * Default: 600 msec (which gives good probability that some RTP 
+ *                    packets will reach the destination, but without
+ *                    filling up the jitter buffer on the remote end).
+ */
+#ifndef PJMEDIA_STREAM_VAD_SUSPEND_MSEC
+#   define PJMEDIA_STREAM_VAD_SUSPEND_MSEC	600
+#endif
+
+
+/**
+ * Specify the maximum duration of silence period in the codec. 
+ * This is useful for example to keep NAT binding open in the firewall
+ * and to prevent server from disconnecting the call because no 
+ * RTP packet is received.
+ *
+ * This only applies to codecs that use PJMEDIA's VAD (pretty much
+ * everything including iLBC, except Speex, which has its own DTX 
+ * mechanism).
+ *
+ * Use (-1) to disable this feature.
+ *
+ * Default: 8000 (one second on 8KHz).
+ *
+ */
+#ifndef PJMEDIA_CODEC_MAX_SILENCE_PERIOD
+#   define PJMEDIA_CODEC_MAX_SILENCE_PERIOD	8000
+#endif
+
+
+/**
+ * Suggested or default threshold to be set for fixed silence detection
+ * or as starting threshold for adaptive silence detection. The threshold
+ * has the range from zero to 255.
+ */
+#ifndef PJMEDIA_SILENCE_DET_THRESHOLD
+#   define PJMEDIA_SILENCE_DET_THRESHOLD	4
+#endif
+
+
+/**
+ * Enable Steve Underwood's PLC.
+ */
+#ifndef PJMEDIA_HAS_STEVEU_PLC
+#   define PJMEDIA_HAS_STEVEU_PLC		PJ_HAS_FLOATING_POINT
+#endif
+
+
+/**
+ * Speex Accoustic Echo Cancellation (AEC).
+ * By default is enabled.
+ */
+#ifndef PJMEDIA_HAS_SPEEX_AEC
+#   define PJMEDIA_HAS_SPEEX_AEC		1
+#endif
+
+
+/**
+ * Initial signal threshold to be applied to echo suppressor. When
+ * playback signal level is greater than this threshold, the microphone
+ * signal will be reduced or cut.
+ */
+#ifndef PJMEDIA_ECHO_SUPPRESS_THRESHOLD
+#   define PJMEDIA_ECHO_SUPPRESS_THRESHOLD	PJMEDIA_SILENCE_DET_THRESHOLD
+#endif
+
+
+/**
+ * The signal reduction factor to be applied into the microphone signal
+ * when the mic signal needs to be reduced. Valid values are [1-16], where
+ * 1 will leave signal as it is (thus probably transmitting the echo) and
+ * 16 will effectively zero the signal.
+ */
+#ifndef PJMEDIA_ECHO_SUPPRESS_FACTOR
+#   define PJMEDIA_ECHO_SUPPRESS_FACTOR		4
+#endif
+
+
+/**
+ * This specifies the behavior of the SDP negotiator when responding to an
+ * offer, whether it should rather use the codec preference as set by
+ * remote, or should it rather use the codec preference as specified by
+ * local endpoint.
+ *
+ * For example, suppose incoming call has codec order "8 0 3", while 
+ * local codec order is "3 0 8". If remote codec order is preferable,
+ * the selected codec will be 8, while if local codec order is preferable,
+ * the selected codec will be 3.
+ *
+ * If set to non-zero, the negotiator will use the codec order as specified
+ * by remote in the offer.
+ *
+ * Note that this behavior can be changed during run-time by calling
+ * pjmedia_sdp_neg_set_prefer_remote_codec_order().
+ *
+ * Default is 1 (to maintain backward compatibility)
+ */
+#ifndef PJMEDIA_SDP_NEG_PREFER_REMOTE_CODEC_ORDER
+#   define PJMEDIA_SDP_NEG_PREFER_REMOTE_CODEC_ORDER	1
+#endif
+
+
+/**
+ * Support for sending and decoding RTCP port in SDP (RFC 3605).
+ * Default is yes.
+ */
+#ifndef PJMEDIA_HAS_RTCP_IN_SDP
+#   define PJMEDIA_HAS_RTCP_IN_SDP		1
+#endif
+
+
+/**
+ * This macro declares the payload type for telephone-event
+ * that is advertised by PJMEDIA for outgoing SDP. If this macro
+ * is set to zero, telephone events would not be advertised nor
+ * supported.
+ *
+ * If this value is changed to other number, please update the
+ * PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR too.
+ */
+#ifndef PJMEDIA_RTP_PT_TELEPHONE_EVENTS
+#   define PJMEDIA_RTP_PT_TELEPHONE_EVENTS	    101
+#endif
+
+
+/**
+ * Macro to get the string representation of the telephone-event
+ * payload type.
+ */
+#ifndef PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR
+#   define PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR	    "101"
+#endif
+
+
+/**
+ * Maximum tones/digits that can be enqueued in the tone generator.
+ */
+#ifndef PJMEDIA_TONEGEN_MAX_DIGITS
+#   define PJMEDIA_TONEGEN_MAX_DIGITS		    32
+#endif
+
+
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_CONFIG_H__ */
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/config_auto.h.in
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/config_auto.h.in	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/config_auto.h.in	(revision 1163)
@@ -0,0 +1,42 @@
+/* $Id$ */
+/*
+ * Copyright (C) 2003-2006 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_ */
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/doxygen.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/doxygen.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/doxygen.h	(revision 1163)
@@ -0,0 +1,528 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_DOXYGEN_H__
+#define __PJMEDIA_DOXYGEN_H__
+
+/**
+ * @file doxygen.h
+ * @brief Doxygen's mainpage.
+ */
+
+/**
+ * @defgroup PJMEDIA PJMEDIA Library
+ */
+
+/*////////////////////////////////////////////////////////////////////////// */
+/*
+	INTRODUCTION PAGE
+ */
+
+/**
+ * @mainpage PJMEDIA and PJMEDIA-CODEC
+ *
+ * \n
+ * @section intro_sec PJMEDIA
+ *
+ * PJMEDIA is a rather complete media stack, distributed under Open Source/GPL
+ * terms, and featuring small footprint and good extensibility and portability.
+ *
+ * Please click the <A HREF="modules.htm"><b>Modules</b></A> link on top
+ * of this page to get the complete features currently present in PJMEDIA.
+ *
+ * Also please read the documentation about @ref PJMEDIA_PORT_CONCEPT,
+ * which is a major concept that is used for implementing many objects in 
+ * the library.
+ *
+ * \n
+ * @section pjmedia_codec_sec PJMEDIA-CODEC
+ *
+ * PJMEDIA-CODEC is a static library containing various codec implementations,
+ * wrapped into PJMEDIA codec framework. The static library is designed as
+ * such so that only codecs that are explicitly initialized are linked with 
+ * the application, therefore keeping the application size in control.
+ *
+ * Please see @ref pjmedia_codec_page on how to use the codec in 
+ * PJMEDIA-CODEC.
+ *
+ * \n
+ * @section main_page_get_start_sec Getting Started
+ *
+ * For those who likes to just get start coding, the @ref getting_started_pjmedia
+ * may be a good place to start.
+ *
+ * The @ref page_pjmedia_samples page describes some examples that are available
+ * in the source tree.
+ *
+ *
+ * \n
+ * @section pjmedia_lic Copying and Acknowledgements
+ *
+ * PJMEDIA and PJMEDIA-CODEC contains various parts obtained from other
+ * places, and each of these would have their own licensing terms.
+ * Please see @ref lic_stuffs page for details.
+ *
+ */
+
+/**
+ * @page pjmed_keywords_page Features Index
+ * @section pjmed_keywords Features Index
+ *
+ * <b>PJMEDIA features</b>, in no particular order (click to go to the relevant
+ * documentation): 
+ * @ref lic_stuffs "Open Source media stack", 
+ * @ref PJMEDIA_CLOCK, 
+ * @ref PJMEDIA_CODEC,
+ * @ref enc_dec_codec,
+ * @ref plc_codec, 
+ * @ref PJMEDIA_CONF, 
+ * @ref PJMED_G711 "G711/G.711 (PCMA/PCMU) codec with PLC",
+ * @ref PJMED_GSM "GSM codec with PLC", 
+ * @ref PJMED_L16 "linear codecs (multiple clockrate, stereo support, etc)",
+ * @ref PJMED_SPEEX "Speex codec (narrowband, wideband, ultra-wideband)",
+ * @ref PJMED_JBUF "portable, adaptive jitter buffer with PLC support",
+ * @ref PJMEDIA_MASTER_PORT, 
+ * @ref PJMEDIA_NULL_PORT,
+ * @ref PJMED_PLC, 
+ * @ref PJMEDIA_PORT_CONCEPT, 
+ * @ref PJMEDIA_PORT_CLOCK,
+ * @ref PJMEDIA_RESAMPLE "high quality resampling/sampling rate conversion",
+ * @ref PJMEDIA_RESAMPLE_PORT, 
+ * @ref PJMED_RTCP "small footprint, portable RTCP with media quality statistics",
+ * @ref PJMED_RTP "very small footprint, modular, DSP ready RTP implementation", 
+ * @ref PJMEDIA_SDP "modular, small footprint, open source SDP implementation", 
+ * @ref PJMEDIA_SDP_NEG "modular SDP negotiation/negotiator abstraction",
+ * @ref PJMED_SES "media session abstraction",
+ * @ref PJMEDIA_SILENCEDET,
+ * @ref PJMED_SND "portable audio/sound hardware/device abstraction for Linux, Unix, Windows, DirectSound, WinCE, Windows Mobile, MacOS X, etc.", 
+ * @ref PJMED_SND_PORT,
+ * @ref PJMEDIA_SPLITCOMB, 
+ * @ref PJMED_STRM "remote stream", 
+ * @ref PJMEDIA_TRANSPORT_H "custom media transport abstraction",
+ * @ref PJMEDIA_TRANSPORT_UDP, 
+ * @ref PJMEDIA_FILE_PLAY "WAV/WAVE file playback", 
+ * @ref PJMEDIA_FILE_REC "WAV/WAVE file recording/capture",
+ * @ref PJMEDIA_WAVE "portable WAV/WAVE header manipulation"
+ */
+
+
+/**
+ * @page pjmedia_codec_page Using PJMEDIA-CODEC
+ *
+ * Before application can use a codec, it needs to initialize and register
+ * the codec to the codec manager. This is accomplished with using
+ * constructs like the following:
+ *
+ \code
+    #include <pjmedia.h>
+    #include <pjmedia-codec.h>
+
+    init_codecs( pjmedia_endpt *med_ept )
+    {
+	// Register G.711 codecs
+	pjmedia_codec_g711_init(med_ept);
+
+	// Register GSM codec.
+	pjmedia_codec_gsm_init(med_ept);
+
+	// Register Speex codecs.
+	// With the default flag, this will register three codecs:
+	// speex/8000, speex/16000, and speex/32000
+	pjmedia_codec_speex_init(med_ept, 0, 0, 0);
+    }
+ \endcode
+ *
+ * After the codec is registered, application may create the encoder/decoder
+ * instance, by using the API as documented in @ref PJMEDIA_CODEC.
+ */
+
+
+
+/**
+ * @page lic_stuffs Copying and Acknowledgements
+ * @section lic_stuff Copying and Acknowledgements
+ * @subsection pjmedia_about_subsec About PJMEDIA
+ *
+ * PJMEDIA is distributed under GPL terms (other licensing schemes may be 
+ * arranged):
+ \verbatim
+    Copyright (C) 2003-2007 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 
+ \endverbatim
+ *
+ *
+ * @section other_acks Acknowlegments
+ * @subsection portaudio_subsec PortAudio
+ *
+ * PortAudio is supported as one of the sound device backend, and
+ * is used by default on Linux/Unix and MacOS X target.
+ * 
+ * Please visit <A HREF="http://www.portaudio.com">http://www.portaudio.com</A>
+ * for more info.
+ *
+ * PortAudio is distributed with the following condition.
+ \verbatim
+    Based on the Open Source API proposed by Ross Bencina
+    Copyright (c) 1999-2000 Phil Burk
+
+    Permission is hereby granted, free of charge, to any person obtaining
+    a copy of this software and associated documentation files
+    (the "Software"), to deal in the Software without restriction,
+    including without limitation the rights to use, copy, modify, merge,
+    publish, distribute, sublicense, and/or sell copies of the Software,
+    and to permit persons to whom the Software is furnished to do so,
+    subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be
+    included in all copies or substantial portions of the Software.
+ \endverbatim
+ *
+ *
+ * @subsection resample_ack Resample
+ *
+ * PJMEDIA uses <tt>resample-1.8.tar.gz</tt> from 
+ * <A HREF="http://www-ccrma.stanford.edu/~jos/resample/">
+ * Digital Audio Resampling Home Page</A>. This library is distibuted
+ * on LGPL terms.
+ *
+ * Some excerpts from the original source codes:
+ \verbatim
+    HISTORY
+
+    The first version of this software was written by Julius O. Smith III
+    <jos@ccrma.stanford.edu> at CCRMA <http://www-ccrma.stanford.edu> in
+    1981.  It was called SRCONV and was written in SAIL for PDP-10
+    compatible machines.  The algorithm was first published in
+
+    Smith, Julius O. and Phil Gossett. ``A Flexible Sampling-Rate
+    Conversion Method,'' Proceedings (2): 19.4.1-19.4.4, IEEE Conference
+    on Acoustics, Speech, and Signal Processing, San Diego, March 1984.
+
+    An expanded tutorial based on this paper is available at the Digital
+    Audio Resampling Home Page given above.
+
+    Circa 1988, the SRCONV program was translated from SAIL to C by
+    Christopher Lee Fraley working with Roger Dannenberg at CMU.
+
+    Since then, the C version has been maintained by jos.
+
+    Sndlib support was added 6/99 by John Gibson <jgg9c@virginia.edu>.
+
+    The resample program is free software distributed in accordance
+    with the Lesser GNU Public License (LGPL).  There is NO warranty; not
+    even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ \endverbatim
+ *
+ * @subsection jb_ack Adaptive Jitter Buffer
+ *
+ * The PJMEDIA jitter buffer is based on implementation kindly donated
+ * by <A HREF="http://www.switchlab.com">Switchlab, Ltd.</A>, and is
+ * distributed under PJMEDIA licensing terms.
+ *
+ *
+ * @subsection silence_det_ack Adaptive Silence Detector
+ *
+ * The adaptive silence detector was based on silence detector 
+ * implementation in <A HREF="http://www.openh323.org">Open H323</A> 
+ * project. I couldn't find the source code anymore, but generally
+ * Open H323 files are distributed under MPL terms and has the
+ * following excerpts:
+ \verbatim
+    Open H323 Library
+
+    Copyright (c) 1998-2000 Equivalence Pty. Ltd.
+
+    The contents of this file are subject to the Mozilla Public License
+    Version 1.0 (the "License"); you may not use this file except in
+    compliance with the License. You may obtain a copy of the License at
+    http://www.mozilla.org/MPL/
+
+    Software distributed under the License is distributed on an "AS IS"
+    basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+    the License for the specific language governing rights and limitations
+    under the License.
+
+    The Original Code is Open H323 Library.
+
+    The Initial Developer of the Original Code is Equivalence Pty. Ltd.
+
+    Portions of this code were written with the assisance of funding from
+    Vovida Networks, Inc. http://www.vovida.com.
+ \endverbatim
+
+ * @subsection gsm_ack GSM Codec
+ *
+ * PJMEDIA uses GSM 
+ * <A HREF="http://kbs.cs.tu-berlin.de/~jutta/toast.html">GSM 06.10</A>
+ * version 1.0 at patchlevel 12. It has the following Copyright notice:
+ *
+ \verbatim
+    Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann,
+    Technische Universitaet Berlin
+
+    Any use of this software is permitted provided that this notice is not
+    removed and that neither the authors nor the Technische Universitaet Berlin
+    are deemed to have made any representations as to the suitability of this
+    software for any purpose nor are held responsible for any defects of
+    this software.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+
+    As a matter of courtesy, the authors request to be informed about uses
+    this software has found, about bugs in this software, and about any
+    improvements that may be of general interest.
+
+    Berlin, 28.11.1994
+    Jutta Degener
+    Carsten Bormann
+ \endverbatim
+ *
+ *
+ * @subsection speex_codec_ack Speex Codec
+ *
+ * PJMEDIA uses Speex codec uses version 1.1.12 from <A HREF="http://www.speex.org">
+ * www.speex.org</A>. The Speex library comes with the following Copying
+ * notice:
+ \verbatim
+    Copyright 2002-2005 
+	    Xiph.org Foundation
+	    Jean-Marc Valin
+	    David Rowe
+	    EpicGames
+	    Analog Devices
+
+    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 Xiph.org Foundation 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 FOUNDATION 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.
+ \endverbatim
+ *
+ *
+ * @subsection g711_codec_ack G.711 Codec
+ *
+ * The G.711 codec algorithm came from Sun Microsystems, Inc, and it's
+ * got the following excerpts:
+ *
+ \verbatim
+    This source code is a product of Sun Microsystems, Inc. and is provided
+    for unrestricted use.  Users may copy or modify this source code without
+    charge.
+
+    SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING
+    THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+    PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+
+    Sun source code is provided with no support and without any obligation on
+    the part of Sun Microsystems, Inc. to assist in its use, correction,
+    modification or enhancement.
+
+    SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+    INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS SOFTWARE
+    OR ANY PART THEREOF.
+
+    In no event will Sun Microsystems, Inc. be liable for any lost revenue
+    or profits or other special, indirect and consequential damages, even if
+    Sun has been advised of the possibility of such damages.
+
+    Sun Microsystems, Inc.
+    2550 Garcia Avenue
+    Mountain View, California  94043
+ \endverbatim
+ *
+ */
+
+
+/**
+ @page getting_started_pjmedia Getting Started with PJMEDIA
+ 
+ @section getstart_init_setup_build Setting-up the Build System
+
+ @subsection subsec_build_pjmedia Building PJMEDIA and PJMEDIA-CODEC
+
+ The PJMEDIA and PJMEDIA-CODEC libraries are normally bundled in PJPROJECT
+ source tarball, and they are located in <tt><b>pjmedia</b></tt> sub-directory
+ tree.
+
+ Please follow the instructions in <tt><b>INSTALL.txt</b></tt> in the root
+ PJPROJECT directory to build all projects, including PJMEDIA and PJMEDIA-CODEC.
+
+ @subsection subsec_config_build Setting Up the Build Environment
+
+ In your project, you will need to configure the following.
+ - Add <tt><b>$pjproject/pjmedia/include</b></tt> in the search path for
+   include files.
+ - Add <tt><b>$pjproject/pjmedia/lib</b></tt> in the search path for
+   library files.
+ - Add PJMEDIA and PJMEDIA static libraries in the link command.
+
+ @subsection subsec_inc_pjmedia Include PJMEDIA and PJMEDIA-CODEC in Source Files
+
+ To include all features from PJMEDIA and PJMEDIA-CODEC, use the following:
+
+ \code
+   #include <pjlib.h>
+   #include <pjmedia.h>
+   #include <pjmedia-codec.h>
+ \endcode
+
+ Alternatively, you may include only specific parts of the library (for example
+ to speed up compilation by just a fraction), for example:
+
+ \code
+   #include <pjmedia/conference.h>
+   #include <pjmedia/jbuf.h>
+   #include <pjmedia-codec/speex.h>
+ \endcode
+
+  Note that you need to give <b>"pjmedia/"</b> and <b>"pjmedia-codec/"</b> 
+  prefix to include specific files.
+
+
+ @section getstart_using Using PJMEDIA
+
+  I wish I could explain more, but for now, please have a look at the 
+  @ref page_pjmedia_samples page on some examples.
+ */
+
+/**
+  @page page_pjmedia_samples PJMEDIA and PJMEDIA-CODEC Examples
+
+  @section pjmedia_samples_sec PJMEDIA and PJMEDIA-CODEC Examples
+
+  Please find below some PJMEDIA related examples that may help in giving
+  some more info:
+
+  - @ref page_pjmedia_samples_level_c\n
+    This is a good place to start learning about @ref PJMEDIA_PORT_CONCEPT,
+    as it shows that @ref PJMEDIA_PORT_CONCEPT are only "passive" objects
+    with <tt>get_frame()</tt> and <tt>put_frame()</tt> interface, and
+    someone has to call these to retrieve/store media frames.
+
+  - @ref page_pjmedia_samples_playfile_c\n
+    This example shows that when application connects a media port (in this
+    case a @ref PJMEDIA_FILE_PLAY) to @ref PJMED_SND_PORT, media will flow
+    automatically since the @ref PJMED_SND_PORT provides @ref PJMEDIA_PORT_CLOCK.
+
+  - @ref page_pjmedia_samples_recfile_c\n
+    Demonstrates how to capture audio from microphone to WAV file.
+
+  - @ref page_pjmedia_samples_playsine_c\n
+    Demonstrates how to create a custom @ref PJMEDIA_PORT_CONCEPT (in this
+    case a sine wave generator) and integrate it to PJMEDIA.
+
+  - @ref page_pjmedia_samples_confsample_c\n
+    This demonstrates how to use the @ref PJMEDIA_CONF. The sample program can 
+    open multiple WAV files, and instruct the conference bridge to mix the
+    signal before playing it to the sound device.
+
+  - @ref page_pjmedia_samples_confbench_c\n
+    I use this to benchmark/optimize the conference bridge algorithm, but
+    readers may find the source useful.
+
+  - @ref page_pjmedia_samples_resampleplay_c\n
+    Demonstrates how to use @ref PJMEDIA_RESAMPLE_PORT to change the
+    sampling rate of a media port (in this case, a @ref PJMEDIA_FILE_PLAY).
+
+  - @ref page_pjmedia_samples_sndtest_c\n
+    This program performs some tests to the sound device to get some
+    quality parameters (such as sound jitter and clock drifts).\n
+    Screenshots on WinXP: \image html sndtest.jpg "sndtest screenshot on WinXP"
+
+  - @ref page_pjmedia_samples_streamutil_c\n
+    This example mainly demonstrates how to stream media (in this case a
+    @ref PJMEDIA_FILE_PLAY) to remote peer using RTP.
+
+  - @ref page_pjmedia_samples_siprtp_c\n
+    This is a useful program (integrated with PJSIP) to actively measure 
+    the network quality/impairment parameters by making one or more SIP 
+    calls (or receiving one or more SIP calls) and display the network
+    impairment of each stream direction at the end of the call.
+    The program is able to measure network quality parameters such as
+    jitter, packet lost/reorder/duplicate, round trip time, etc.\n
+    Note that the remote peer MUST support RTCP so that network quality
+    of each direction can be calculated. Using siprtp for both endpoints
+    is recommended.\n
+    Screenshots on WinXP: \image html siprtp.jpg "siprtp screenshot on WinXP"
+
+  - @ref page_pjmedia_samples_tonegen_c\n
+    This is a simple program to generate a tone and write the samples to
+    a raw PCM file. The main purpose of this file is to analyze the
+    quality of the tones/sine wave generated by PJMEDIA tone/sine wave
+    generator.
+
+  - @ref page_pjmedia_samples_aectest_c\n
+    Play a file to speaker, run AEC, and record the microphone input
+    to see if echo is coming.
+ */
+
+/**
+ * \page page_pjmedia_samples_siprtp_c Samples: Using SIP and Custom RTP/RTCP to Monitor Quality
+ *
+ * This source is an example to demonstrate using SIP and RTP/RTCP framework
+ * to measure the network quality/impairment from the SIP call. This
+ * program can be used to make calls or to receive calls from other
+ * SIP endpoint (or other siprtp program), and to display the media
+ * quality statistics at the end of the call.
+ *
+ * Note that the remote peer must support RTCP.
+ *
+ * The layout of the program has been designed so that custom reporting
+ * can be generated instead of plain human readable text.
+ *
+ * The source code of the file is pjsip-apps/src/samples/siprtp.c
+ *
+ * Screenshots on WinXP: \image html siprtp.jpg
+ *
+ * \includelineno siprtp.c
+ */
+
+#endif /* __PJMEDIA_DOXYGEN_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/echo.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/echo.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/echo.h	(revision 1163)
@@ -0,0 +1,190 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_ECHO_H__
+#define __PJMEDIA_ECHO_H__
+
+
+/**
+ * @file echo.h
+ * @brief Echo Cancellation  API.
+ */
+#include <pjmedia/types.h>
+
+
+
+/**
+ * @defgroup PJMEDIA_Echo_Cancel Accoustic Echo Cancellation API
+ * @ingroup PJMEDIA_PORT
+ * @brief Echo Cancellation API.
+ * @{
+ *
+ * This section describes API to perform echo cancellation to audio signal.
+ * There may be multiple echo canceller implementation in PJMEDIA, ranging
+ * from simple echo suppressor to a full Accoustic Echo Canceller/AEC. By 
+ * using this API, application should be able to use which EC backend to
+ * use base on the requirement and capability of the platform.
+ */
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Opaque type for PJMEDIA Echo Canceller state.
+ */
+typedef struct pjmedia_echo_state pjmedia_echo_state;
+
+
+/**
+ * Echo cancellation options.
+ */
+typedef enum pjmedia_echo_flag
+{
+    /**
+     * If PJMEDIA_ECHO_SIMPLE flag is specified during echo canceller
+     * creation, then a simple echo suppressor will be used instead of
+     * an accoustic echo cancellation.
+     */
+    PJMEDIA_ECHO_SIMPLE	= 1,
+
+    /**
+     * If PJMEDIA_ECHO_NO_LOCK flag is specified, no mutex will be created
+     * for the echo canceller, but application will guarantee that echo
+     * canceller will not be called by different threads at the same time.
+     */
+    PJMEDIA_ECHO_NO_LOCK = 2
+
+} pjmedia_echo_flag;
+
+
+
+
+/**
+ * Create the echo canceller. 
+ *
+ * @param pool		    Pool to allocate memory.
+ * @param clock_rate	    Media clock rate/sampling rate.
+ * @param samples_per_frame Number of samples per frame.
+ * @param tail_ms	    Tail length, miliseconds.
+ * @param latency_ms	    Total lacency introduced by playback and 
+ *			    recording device. Set to zero if the latency
+ *			    is not known.
+ * @param options	    Options. If PJMEDIA_ECHO_SIMPLE is specified,
+ *			    then a simple echo suppressor implementation 
+ *			    will be used instead of an accoustic echo 
+ *			    cancellation.
+ *			    See #pjmedia_echo_flag for other options.
+ * @param p_echo	    Pointer to receive the Echo Canceller state.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate status.
+ */
+PJ_DECL(pj_status_t) pjmedia_echo_create(pj_pool_t *pool,
+					 unsigned clock_rate,
+					 unsigned samples_per_frame,
+					 unsigned tail_ms,
+					 unsigned latency_ms,
+					 unsigned options,
+					 pjmedia_echo_state **p_echo );
+
+
+/**
+ * Destroy the Echo Canceller. 
+ *
+ * @param echo		The Echo Canceller.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_echo_destroy(pjmedia_echo_state *echo );
+
+
+/**
+ * Let the Echo Canceller knows that a frame has been played to the speaker.
+ * The Echo Canceller will keep the frame in its internal buffer, to be used
+ * when cancelling the echo with #pjmedia_echo_capture().
+ *
+ * @param echo		The Echo Canceller.
+ * @param play_frm	Sample buffer containing frame to be played
+ *			(or has been played) to the playback device.
+ *			The frame must contain exactly samples_per_frame 
+ *			number of samples.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_echo_playback(pjmedia_echo_state *echo,
+					   pj_int16_t *play_frm );
+
+
+/**
+ * Let the Echo Canceller knows that a frame has been captured from 
+ * the microphone.
+ * The Echo Canceller will cancel the echo from the captured signal, 
+ * using the internal buffer (supplied by #pjmedia_echo_playback()) 
+ * as the FES (Far End Speech) reference.
+ *
+ * @param echo		The Echo Canceller.
+ * @param rec_frm	On input, it contains the input signal (captured 
+ *			from microphone) which echo is to be removed.
+ *			Upon returning this function, this buffer contain
+ *			the processed signal with the echo removed.
+ *			The frame must contain exactly samples_per_frame 
+ *			number of samples.
+ * @param options	Echo cancellation options, reserved for future use.
+ *			Put zero for now.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_echo_capture(pjmedia_echo_state *echo,
+					  pj_int16_t *rec_frm,
+					  unsigned options );
+
+
+/**
+ * Perform echo cancellation.
+ *
+ * @param echo		The Echo Canceller.
+ * @param rec_frm	On input, it contains the input signal (captured 
+ *			from microphone) which echo is to be removed.
+ *			Upon returning this function, this buffer contain
+ *			the processed signal with the echo removed.
+ * @param play_frm	Sample buffer containing frame to be played
+ *			(or has been played) to the playback device.
+ *			The frame must contain exactly samples_per_frame 
+ *			number of samples.
+ * @param options	Echo cancellation options, reserved for future use.
+ *			Put zero for now.
+ * @param reserved	Reserved for future use, put NULL for now.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_echo_cancel( pjmedia_echo_state *echo,
+					  pj_int16_t *rec_frm,
+					  const pj_int16_t *play_frm,
+					  unsigned options,
+					  void *reserved );
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_ECHO_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/echo_port.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/echo_port.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/echo_port.h	(revision 1163)
@@ -0,0 +1,73 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_AEC_PORT_H__
+#define __PJMEDIA_AEC_PORT_H__
+
+/**
+ * @file echo_port.h
+ * @brief AEC (Accoustic Echo Cancellation) media port.
+ */
+#include <pjmedia/port.h>
+
+
+
+/**
+ * @defgroup PJMEDIA_ECHO_PORT Echo Cancellation Port
+ * @ingroup PJMEDIA_PORT
+ * @brief Echo Cancellation Port
+ *
+ * Echo canceller media port, using @ref PJMEDIA_Echo_Cancel backend.
+ * @{
+ */
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Create echo canceller port. 
+ *
+ * @param pool		Pool to allocate memory.
+ * @param dn_port	Downstream port.
+ * @param tail_ms	Tail length in miliseconds.
+ * @param latency_ms	Total lacency introduced by playback and 
+ *			recording device. Set to zero if the latency
+ *			is not known.
+ * @param options	Options, as in #pjmedia_echo_create().
+ * @param p_port	Pointer to receive the port instance.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_echo_port_create(pj_pool_t *pool,
+					      pjmedia_port *dn_port,
+					      unsigned tail_ms,
+					      unsigned latency_ms,
+					      unsigned options,
+					      pjmedia_port **p_port );
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_AEC_PORT_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/endpoint.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/endpoint.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/endpoint.h	(revision 1163)
@@ -0,0 +1,158 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_MEDIAMGR_H__
+#define __PJMEDIA_MEDIAMGR_H__
+
+
+/**
+ * @file endpoint.h
+ * @brief Media endpoint.
+ */
+/**
+ * @defgroup PJMED_ENDPT The Endpoint
+ * @ingroup PJMEDIA
+ * @{
+ *
+ * The media endpoint acts as placeholder for endpoint capabilities. Each 
+ * media endpoint will have a codec manager to manage list of codecs installed
+ * in the endpoint and a sound device factory.
+ *
+ * A reference to media endpoint instance is required when application wants
+ * to create a media session (#pjmedia_session_create()).
+ */
+
+#include <pjmedia/sound.h>
+#include <pjmedia/codec.h>
+#include <pjmedia/sdp.h>
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Create an instance of media endpoint.
+ *
+ * @param pf		Pool factory, which will be used by the media endpoint
+ *			throughout its lifetime.
+ * @param ioqueue	Optional ioqueue instance to be registered to the 
+ *			endpoint. The ioqueue instance is used to poll all RTP
+ *			and RTCP sockets. If this argument is NULL, the 
+ *			endpoint will create an internal ioqueue instance.
+ * @param worker_cnt	Specify the number of worker threads to be created
+ *			to poll the ioqueue.
+ * @param p_endpt	Pointer to receive the endpoint instance.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_endpt_create( pj_pool_factory *pf,
+					   pj_ioqueue_t *ioqueue,
+					   unsigned worker_cnt,
+					   pjmedia_endpt **p_endpt);
+
+/**
+ * Destroy media endpoint instance.
+ *
+ * @param endpt		Media endpoint instance.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_endpt_destroy(pjmedia_endpt *endpt);
+
+
+
+/**
+ * Get the ioqueue instance of the media endpoint.
+ *
+ * @param endpt		The media endpoint instance.
+ *
+ * @return		The ioqueue instance of the media endpoint.
+ */
+PJ_DECL(pj_ioqueue_t*) pjmedia_endpt_get_ioqueue(pjmedia_endpt *endpt);
+
+
+/**
+ * Request the media endpoint to create pool.
+ *
+ * @param endpt		The media endpoint instance.
+ * @param name		Name to be assigned to the pool.
+ * @param initial	Initial pool size, in bytes.
+ * @param increment	Increment size, in bytes.
+ *
+ * @return		Memory pool.
+ */
+PJ_DECL(pj_pool_t*) pjmedia_endpt_create_pool( pjmedia_endpt *endpt,
+					       const char *name,
+					       pj_size_t initial,
+					       pj_size_t increment);
+
+/**
+ * Get the codec manager instance of the media endpoint.
+ *
+ * @param endpt		The media endpoint instance.
+ *
+ * @return		The instance of codec manager belonging to
+ *			this media endpoint.
+ */
+PJ_DECL(pjmedia_codec_mgr*) pjmedia_endpt_get_codec_mgr(pjmedia_endpt *endpt);
+
+
+/**
+ * Create a SDP session description that describes the endpoint
+ * capability.
+ *
+ * @param endpt		The media endpoint.
+ * @param pool		Pool to use to create the SDP descriptor.
+ * @param stream_cnt	Number of elements in the sock_info array. This
+ *			also denotes the maximum number of streams (i.e.
+ *			the "m=" lines) that will be created in the SDP.
+ * @param sock_info	Array of socket transport information. One 
+ *			transport is needed for each media stream, and
+ *			each transport consists of an RTP and RTCP socket
+ *			pair.
+ * @param p_sdp		Pointer to receive SDP session descriptor.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_endpt_create_sdp( pjmedia_endpt *endpt,
+					       pj_pool_t *pool,
+					       unsigned stream_cnt,
+					       const pjmedia_sock_info sock_info[],
+					       pjmedia_sdp_session **p_sdp );
+
+
+/**
+ * Dump media endpoint capabilities.
+ *
+ * @param endpt		The media endpoint.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_endpt_dump(pjmedia_endpt *endpt);
+
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+
+
+#endif	/* __PJMEDIA_MEDIAMGR_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/errno.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/errno.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/errno.h	(revision 1163)
@@ -0,0 +1,533 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_ERRNO_H__
+#define __PJMEDIA_ERRNO_H__
+
+/**
+ * @file errno.h Error Codes
+ * @brief PJMEDIA specific error codes.
+ */
+
+#include <pjmedia/types.h>
+#include <pj/errno.h>
+
+/**
+ * @defgroup PJMEDIA_ERRNO Error Codes
+ * @ingroup PJMEDIA_BASE
+ * @brief PJMEDIA specific error codes.
+ * @{
+ */
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Start of error code relative to PJ_ERRNO_START_USER.
+ */
+#define PJMEDIA_ERRNO_START       (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE)
+
+
+/**
+ * Mapping from PortAudio error codes to pjmedia error space.
+ */
+#define PJMEDIA_PORTAUDIO_ERRNO_START (PJMEDIA_ERRNO_START+PJ_ERRNO_SPACE_SIZE-1000)
+
+/**
+ * Convert PortAudio error code to PJMEDIA error code.
+ */
+#define PJMEDIA_ERRNO_FROM_PORTAUDIO(err)   (err+PJMEDIA_PORTAUDIO_ERRNO_START)
+
+
+/************************************************************
+ * GENERIC/GENERAL PJMEDIA ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * General/unknown PJMEDIA error.
+ */
+#define PJMEDIA_ERROR		    (PJMEDIA_ERRNO_START+1)	/* 220001 */
+
+
+/************************************************************
+ * SDP ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Generic invalid SDP descriptor.
+ */
+#define PJMEDIA_SDP_EINSDP	    (PJMEDIA_ERRNO_START+20)    /* 220020 */
+/**
+ * @hideinitializer
+ * Invalid SDP version.
+ */
+#define PJMEDIA_SDP_EINVER	    (PJMEDIA_ERRNO_START+21)    /* 220021 */
+/**
+ * @hideinitializer
+ * Invalid SDP origin (o=) line.
+ */
+#define PJMEDIA_SDP_EINORIGIN	    (PJMEDIA_ERRNO_START+22)    /* 220022 */
+/**
+ * @hideinitializer
+ * Invalid SDP time (t=) line.
+ */
+#define PJMEDIA_SDP_EINTIME	    (PJMEDIA_ERRNO_START+23)    /* 220023 */
+/**
+ * @hideinitializer
+ * Empty SDP subject/name (s=) line.
+ */
+#define PJMEDIA_SDP_EINNAME	    (PJMEDIA_ERRNO_START+24)    /* 220024 */
+/**
+ * @hideinitializer
+ * Invalid SDP connection info (c=) line.
+ */
+#define PJMEDIA_SDP_EINCONN	    (PJMEDIA_ERRNO_START+25)    /* 220025 */
+/**
+ * @hideinitializer
+ * Missing SDP connection info line.
+ */
+#define PJMEDIA_SDP_EMISSINGCONN    (PJMEDIA_ERRNO_START+26)    /* 220026 */
+/**
+ * @hideinitializer
+ * Invalid attribute (a=) line.
+ */
+#define PJMEDIA_SDP_EINATTR	    (PJMEDIA_ERRNO_START+27)    /* 220027 */
+/**
+ * @hideinitializer
+ * Invalid rtpmap attribute.
+ */
+#define PJMEDIA_SDP_EINRTPMAP	    (PJMEDIA_ERRNO_START+28)    /* 220028 */
+/**
+ * @hideinitializer
+ * rtpmap attribute is too long.
+ */
+#define PJMEDIA_SDP_ERTPMAPTOOLONG  (PJMEDIA_ERRNO_START+29)    /* 220029 */
+/**
+ * @hideinitializer
+ * rtpmap is missing for dynamic payload type.
+ */
+#define PJMEDIA_SDP_EMISSINGRTPMAP  (PJMEDIA_ERRNO_START+30)    /* 220030 */
+/**
+ * @hideinitializer
+ * Invalid SDP media (m=) line.
+ */
+#define PJMEDIA_SDP_EINMEDIA	    (PJMEDIA_ERRNO_START+31)    /* 220031 */
+/**
+ * @hideinitializer
+ * No payload format in the media stream.
+ */
+#define PJMEDIA_SDP_ENOFMT	    (PJMEDIA_ERRNO_START+32)    /* 220032 */
+/**
+ * @hideinitializer
+ * Invalid payload type in media.
+ */
+#define PJMEDIA_SDP_EINPT	    (PJMEDIA_ERRNO_START+33)    /* 220033 */
+/**
+ * @hideinitializer
+ * Invalid SDP "fmtp" attribute.
+ */
+#define PJMEDIA_SDP_EINFMTP	    (PJMEDIA_ERRNO_START+34)    /* 220034 */
+/**
+ * @hideinitializer
+ * Invalid SDP "rtcp" attribute.
+ */
+#define PJMEDIA_SDP_EINRTCP	    (PJMEDIA_ERRNO_START+35)    /* 220035 */
+
+
+/************************************************************
+ * SDP NEGOTIATOR ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Invalid state to perform the specified operation.
+ */
+#define PJMEDIA_SDPNEG_EINSTATE	    (PJMEDIA_ERRNO_START+40)    /* 220040 */
+/**
+ * @hideinitializer
+ * No initial local SDP.
+ */
+#define PJMEDIA_SDPNEG_ENOINITIAL   (PJMEDIA_ERRNO_START+41)    /* 220041 */
+/**
+ * @hideinitializer
+ * No currently active SDP.
+ */
+#define PJMEDIA_SDPNEG_ENOACTIVE    (PJMEDIA_ERRNO_START+42)    /* 220042 */
+/**
+ * @hideinitializer
+ * No current offer or answer.
+ */
+#define PJMEDIA_SDPNEG_ENONEG	    (PJMEDIA_ERRNO_START+43)    /* 220043 */
+/**
+ * @hideinitializer
+ * Media count mismatch in offer and answer.
+ */
+#define PJMEDIA_SDPNEG_EMISMEDIA    (PJMEDIA_ERRNO_START+44)    /* 220044 */
+/**
+ * @hideinitializer
+ * Media type is different in the remote answer.
+ */
+#define PJMEDIA_SDPNEG_EINVANSMEDIA (PJMEDIA_ERRNO_START+45)    /* 220045 */
+/**
+ * @hideinitializer
+ * Transport type is different in the remote answer.
+ */
+#define PJMEDIA_SDPNEG_EINVANSTP    (PJMEDIA_ERRNO_START+46)    /* 220046 */
+/**
+ * @hideinitializer
+ * No common media payload is provided in the answer.
+ */
+#define PJMEDIA_SDPNEG_EANSNOMEDIA  (PJMEDIA_ERRNO_START+47)    /* 220047 */
+/**
+ * @hideinitializer
+ * No media is active after negotiation.
+ */
+#define PJMEDIA_SDPNEG_ENOMEDIA	    (PJMEDIA_ERRNO_START+48)    /* 220048 */
+/**
+ * @hideinitializer
+ * No suitable codec for remote offer.
+ */
+#define PJMEDIA_SDPNEG_NOANSCODEC   (PJMEDIA_ERRNO_START+49)    /* 220049 */
+/**
+ * @hideinitializer
+ * No suitable telephone-event for remote offer.
+ */
+#define PJMEDIA_SDPNEG_NOANSTELEVENT (PJMEDIA_ERRNO_START+50)   /* 220050 */
+/**
+ * @hideinitializer
+ * No suitable answer for unknown remote offer.
+ */
+#define PJMEDIA_SDPNEG_NOANSUNKNOWN (PJMEDIA_ERRNO_START+51)    /* 220051 */
+
+
+/************************************************************
+ * SDP COMPARISON STATUS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * SDP media stream not equal.
+ */
+#define PJMEDIA_SDP_EMEDIANOTEQUAL  (PJMEDIA_ERRNO_START+60)    /* 220060 */
+/**
+ * @hideinitializer
+ * Port number in SDP media descriptor not equal.
+ */
+#define PJMEDIA_SDP_EPORTNOTEQUAL   (PJMEDIA_ERRNO_START+61)    /* 220061 */
+/**
+ * @hideinitializer
+ * Transport in SDP media descriptor not equal.
+ */
+#define PJMEDIA_SDP_ETPORTNOTEQUAL  (PJMEDIA_ERRNO_START+62)    /* 220062 */
+/**
+ * @hideinitializer
+ * Media format in SDP media descriptor not equal.
+ */
+#define PJMEDIA_SDP_EFORMATNOTEQUAL (PJMEDIA_ERRNO_START+63)    /* 220063 */
+/**
+ * @hideinitializer
+ * SDP connection description not equal.
+ */
+#define PJMEDIA_SDP_ECONNNOTEQUAL   (PJMEDIA_ERRNO_START+64)    /* 220064 */
+/**
+ * @hideinitializer
+ * SDP attributes not equal.
+ */
+#define PJMEDIA_SDP_EATTRNOTEQUAL   (PJMEDIA_ERRNO_START+65)    /* 220065 */
+/**
+ * @hideinitializer
+ * SDP media direction not equal.
+ */
+#define PJMEDIA_SDP_EDIRNOTEQUAL    (PJMEDIA_ERRNO_START+66)    /* 220066 */
+/**
+ * @hideinitializer
+ * SDP fmtp attribute not equal.
+ */
+#define PJMEDIA_SDP_EFMTPNOTEQUAL   (PJMEDIA_ERRNO_START+67)    /* 220067 */
+/**
+ * @hideinitializer
+ * SDP ftpmap attribute not equal.
+ */
+#define PJMEDIA_SDP_ERTPMAPNOTEQUAL (PJMEDIA_ERRNO_START+68)    /* 220068 */
+/**
+ * @hideinitializer
+ * SDP session descriptor not equal.
+ */
+#define PJMEDIA_SDP_ESESSNOTEQUAL   (PJMEDIA_ERRNO_START+69)    /* 220069 */
+/**
+ * @hideinitializer
+ * SDP origin not equal.
+ */
+#define PJMEDIA_SDP_EORIGINNOTEQUAL (PJMEDIA_ERRNO_START+70)    /* 220070 */
+/**
+ * @hideinitializer
+ * SDP name/subject not equal.
+ */
+#define PJMEDIA_SDP_ENAMENOTEQUAL   (PJMEDIA_ERRNO_START+71)    /* 220071 */
+/**
+ * @hideinitializer
+ * SDP time not equal.
+ */
+#define PJMEDIA_SDP_ETIMENOTEQUAL   (PJMEDIA_ERRNO_START+72)    /* 220072 */
+
+
+/************************************************************
+ * CODEC
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Unsupported codec.
+ */
+#define PJMEDIA_CODEC_EUNSUP	    (PJMEDIA_ERRNO_START+80)    /* 220080 */
+/**
+ * @hideinitializer
+ * Codec internal creation error.
+ */
+#define PJMEDIA_CODEC_EFAILED	    (PJMEDIA_ERRNO_START+81)    /* 220081 */
+/**
+ * @hideinitializer
+ * Codec frame is too short.
+ */
+#define PJMEDIA_CODEC_EFRMTOOSHORT  (PJMEDIA_ERRNO_START+82)    /* 220082 */
+/**
+ * @hideinitializer
+ * PCM buffer is too short.
+ */
+#define PJMEDIA_CODEC_EPCMTOOSHORT  (PJMEDIA_ERRNO_START+83)    /* 220083 */
+/**
+ * @hideinitializer
+ * Invalid codec frame length.
+ */
+#define PJMEDIA_CODEC_EFRMINLEN	    (PJMEDIA_ERRNO_START+84)    /* 220084 */
+/**
+ * @hideinitializer
+ * Invalid PCM frame length.
+ */
+#define PJMEDIA_CODEC_EPCMFRMINLEN  (PJMEDIA_ERRNO_START+85)    /* 220085 */
+/**
+ * @hideinitializer
+ * Invalid mode.
+ */
+#define PJMEDIA_CODEC_EINMODE	    (PJMEDIA_ERRNO_START+86)    /* 220086 */
+
+
+/************************************************************
+ * MEDIA
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Invalid remote IP address (in SDP).
+ */
+#define PJMEDIA_EINVALIDIP	    (PJMEDIA_ERRNO_START+100)    /* 220100 */
+/**
+ * @hideinitializer
+ * Asymetric codec is not supported.
+ */
+#define PJMEDIA_EASYMCODEC	    (PJMEDIA_ERRNO_START+101)    /* 220101 */
+/**
+ * @hideinitializer
+ * Invalid payload type.
+ */
+#define PJMEDIA_EINVALIDPT	    (PJMEDIA_ERRNO_START+102)    /* 220102 */
+/**
+ * @hideinitializer
+ * Missing rtpmap.
+ */
+#define PJMEDIA_EMISSINGRTPMAP	    (PJMEDIA_ERRNO_START+103)    /* 220103 */
+/**
+ * @hideinitializer
+ * Invalid media type.
+ */
+#define PJMEDIA_EINVALIMEDIATYPE    (PJMEDIA_ERRNO_START+104)    /* 220104 */
+/**
+ * @hideinitializer
+ * Remote does not support DTMF.
+ */
+#define PJMEDIA_EREMOTENODTMF	    (PJMEDIA_ERRNO_START+105)    /* 220105 */
+/**
+ * @hideinitializer
+ * Invalid DTMF digit.
+ */
+#define PJMEDIA_RTP_EINDTMF	    (PJMEDIA_ERRNO_START+106)    /* 220106 */
+/**
+ * @hideinitializer
+ * Remote does not support RFC 2833
+ */
+#define PJMEDIA_RTP_EREMNORFC2833   (PJMEDIA_ERRNO_START+107)    /* 220107 */
+
+
+
+/************************************************************
+ * RTP SESSION ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * General invalid RTP packet error.
+ */
+#define PJMEDIA_RTP_EINPKT	    (PJMEDIA_ERRNO_START+120)    /* 220120 */
+/**
+ * @hideinitializer
+ * Invalid RTP packet packing.
+ */
+#define PJMEDIA_RTP_EINPACK	    (PJMEDIA_ERRNO_START+121)    /* 220121 */
+/**
+ * @hideinitializer
+ * Invalid RTP packet version.
+ */
+#define PJMEDIA_RTP_EINVER	    (PJMEDIA_ERRNO_START+122)    /* 220122 */
+/**
+ * @hideinitializer
+ * RTP SSRC id mismatch.
+ */
+#define PJMEDIA_RTP_EINSSRC	    (PJMEDIA_ERRNO_START+123)    /* 220123 */
+/**
+ * @hideinitializer
+ * RTP payload type mismatch.
+ */
+#define PJMEDIA_RTP_EINPT	    (PJMEDIA_ERRNO_START+124)    /* 220124 */
+/**
+ * @hideinitializer
+ * Invalid RTP packet length.
+ */
+#define PJMEDIA_RTP_EINLEN	    (PJMEDIA_ERRNO_START+125)    /* 220125 */
+/**
+ * @hideinitializer
+ * RTP session restarted.
+ */
+#define PJMEDIA_RTP_ESESSRESTART    (PJMEDIA_ERRNO_START+130)    /* 220130 */
+/**
+ * @hideinitializer
+ * RTP session in probation
+ */
+#define PJMEDIA_RTP_ESESSPROBATION  (PJMEDIA_ERRNO_START+131)    /* 220131 */
+/**
+ * @hideinitializer
+ * Bad RTP sequence number
+ */
+#define PJMEDIA_RTP_EBADSEQ	    (PJMEDIA_ERRNO_START+132)    /* 220132 */
+/**
+ * @hideinitializer
+ * RTP media port destination is not configured
+ */
+#define PJMEDIA_RTP_EBADDEST	    (PJMEDIA_ERRNO_START+133)    /* 220133 */
+/**
+ * @hideinitializer
+ * RTP is not configured.
+ */
+#define PJMEDIA_RTP_ENOCONFIG	    (PJMEDIA_ERRNO_START+134)    /* 220134 */
+
+
+/************************************************************
+ * PORT ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Generic incompatible port error.
+ */
+#define PJMEDIA_ENOTCOMPATIBLE	    (PJMEDIA_ERRNO_START+160)    /* 220160 */
+/**
+ * @hideinitializer
+ * Incompatible clock rate
+ */
+#define PJMEDIA_ENCCLOCKRATE	    (PJMEDIA_ERRNO_START+161)    /* 220161 */
+/**
+ * @hideinitializer
+ * Incompatible samples per frame
+ */
+#define PJMEDIA_ENCSAMPLESPFRAME    (PJMEDIA_ERRNO_START+162)    /* 220162 */
+/**
+ * @hideinitializer
+ * Incompatible media type
+ */
+#define PJMEDIA_ENCTYPE		    (PJMEDIA_ERRNO_START+163)    /* 220163 */
+/**
+ * @hideinitializer
+ * Incompatible bits per sample
+ */
+#define PJMEDIA_ENCBITS		    (PJMEDIA_ERRNO_START+164)    /* 220164 */
+/**
+ * @hideinitializer
+ * Incompatible bytes per frame
+ */
+#define PJMEDIA_ENCBYTES	    (PJMEDIA_ERRNO_START+165)    /* 220165 */
+/**
+ * @hideinitializer
+ * Incompatible number of channels
+ */
+#define PJMEDIA_ENCCHANNEL	    (PJMEDIA_ERRNO_START+166)    /* 220166 */
+
+
+/************************************************************
+ * FILE ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Not a valid WAVE file.
+ */
+#define PJMEDIA_ENOTVALIDWAVE	    (PJMEDIA_ERRNO_START+180)    /* 220180 */
+/**
+ * @hideinitializer
+ * Unsupported WAVE file.
+ */
+#define PJMEDIA_EWAVEUNSUPP	    (PJMEDIA_ERRNO_START+181)    /* 220181 */
+/**
+ * @hideinitializer
+ * Wave file too short.
+ */
+#define PJMEDIA_EWAVETOOSHORT	    (PJMEDIA_ERRNO_START+182)    /* 220182 */
+/**
+ * @hideinitializer
+ * Sound frame is too large for file buffer.
+ */
+#define PJMEDIA_EFRMFILETOOBIG	    (PJMEDIA_ERRNO_START+183)    /* 220183 */
+
+
+/************************************************************
+ * SOUND DEVICE ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * No suitable audio capture device.
+ */
+#define PJMEDIA_ENOSNDREC	    (PJMEDIA_ERRNO_START+200)    /* 220200 */
+/**
+ * @hideinitializer
+ * No suitable audio playback device.
+ */
+#define PJMEDIA_ENOSNDPLAY	    (PJMEDIA_ERRNO_START+201)    /* 220201 */
+/**
+ * @hideinitializer
+ * Invalid sound device ID.
+ */
+#define PJMEDIA_ESNDINDEVID	    (PJMEDIA_ERRNO_START+202)    /* 220202 */
+/**
+ * @hideinitializer
+ * Invalid sample format for sound device.
+ */
+#define PJMEDIA_ESNDINSAMPLEFMT	    (PJMEDIA_ERRNO_START+203)    /* 220203 */
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_ERRNO_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/g711.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/g711.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/g711.h	(revision 1163)
@@ -0,0 +1,69 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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_G711_H__
+#define __PJMEDIA_G711_H__
+
+/**
+ * @file g711.h
+ * @brief G711 Codec
+ */
+
+#include <pjmedia-codec/types.h>
+
+/**
+ * @defgroup PJMED_G711 G711
+ * @ingroup PJMEDIA_CODEC
+ * @brief Standard G.711/PCMA and PCMU codec.
+ * @{
+ * This section describes functions to register and register G.711 codec
+ * factory to the codec manager. After the codec factory has been registered,
+ * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Initialize and register G711 codec factory to pjmedia endpoint.
+ * This will register PCMU and PCMA codec, in that order.
+ *
+ * @param endpt		The pjmedia endpoint.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_g711_init(pjmedia_endpt *endpt);
+
+
+
+/**
+ * Unregister G711 codec factory from pjmedia endpoint.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_codec_g711_deinit(void);
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* __PJMEDIA_G711_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/jbuf.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/jbuf.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/jbuf.h	(revision 1163)
@@ -0,0 +1,258 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+/*
+ * Based on implementation kindly contributed by Switchlab, Ltd.
+ */
+#ifndef __PJMEDIA_JBUF_H__
+#define __PJMEDIA_JBUF_H__
+
+
+/**
+ * @file jbuf.h
+ * @brief Adaptive jitter buffer implementation.
+ */
+#include <pjmedia/types.h>
+
+/**
+ * @defgroup PJMED_JBUF Adaptive jitter buffer
+ * @ingroup PJMEDIA_FRAME_OP
+ * @{
+ * This section describes PJMEDIA's implementation of de-jitter buffer.
+ * The de-jitter buffer may be set to operate in adaptive mode or fixed
+ * delay mode.
+ *
+ * The jitter buffer is also able to report the status of the current
+ * frame (#pjmedia_jb_frame_type). This status is used for examply by
+ * @ref PJMED_STRM to invoke the codec's @ref PJMED_PLC algorithm.
+ */
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Types of frame returned by the jitter buffer.
+ */
+enum pjmedia_jb_frame_type 
+{
+    PJMEDIA_JB_MISSING_FRAME	   = 0, /**< No frame because it's missing  */
+    PJMEDIA_JB_NORMAL_FRAME	   = 1, /**< Normal frame is being returned */
+    PJMEDIA_JB_ZERO_PREFETCH_FRAME = 2, /**< Zero frame is being returned  
+					     because JB is bufferring.	    */
+    PJMEDIA_JB_ZERO_EMPTY_FRAME	   = 3	/**< Zero frame is being returned
+					     because JB is empty.	    */
+};
+
+
+/**
+ * @see pjmedia_jb_frame_type.
+ */
+typedef enum pjmedia_jb_frame_type pjmedia_jb_frame_type;
+
+
+/**
+ * This structure describes jitter buffer current status.
+ */
+struct pjmedia_jb_state
+{
+    unsigned	frame_size;	    /**< Individual frame size, in bytes.   */
+    unsigned	prefetch;	    /**< Current prefetch value, in frames  */
+    unsigned	min_prefetch;	    /**< Minimum allowed prefetch, in frms. */
+    unsigned	max_prefetch;	    /**< Maximum allowed prefetch, in frms. */
+    unsigned	size;		    /**< Current buffer size, in frames.    */
+};
+
+
+/**
+ * @see pjmedia_jb_state
+ */
+typedef struct pjmedia_jb_state pjmedia_jb_state;
+
+
+/**
+ * The constant PJMEDIA_JB_DEFAULT_INIT_DELAY specifies default jitter
+ * buffer prefetch count during jitter buffer creation.
+ */
+#define PJMEDIA_JB_DEFAULT_INIT_DELAY    15
+
+/**
+ * Opaque declaration for jitter buffer.
+ */
+typedef struct pjmedia_jbuf pjmedia_jbuf;
+
+
+/**
+ * Create an adaptive jitter buffer according to the specification. If
+ * application wants to have a fixed jitter buffer, it may call
+ * #pjmedia_jbuf_set_fixed() after the jitter buffer is created.
+ *
+ * This function may allocate large chunk of memory to keep the frames in 
+ * the buffer.
+ *
+ * @param pool		The pool to allocate memory.
+ * @param name		Name to identify the jitter buffer for logging
+ *			purpose.
+ * @param frame_size	The size of each frame that will be kept in the
+ *			jitter buffer, in bytes. This should correspond
+ *			to the minimum frame size supported by the codec.
+ *			For example, a 10ms frame (80 bytes) would be 
+ *			recommended for G.711 codec.
+ * @param max_count	Maximum number of frames that can be kept in the
+ *			jitter buffer. This effectively means the maximum
+ *			delay that may be introduced by this jitter 
+ *			buffer.
+ * @param ptime		Indication of frame duration, used to calculate 
+ *			the interval between jitter recalculation.
+ * @param p_jb		Pointer to receive jitter buffer instance.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_jbuf_create(pj_pool_t *pool,
+					 const pj_str_t *name,
+					 unsigned frame_size,
+					 unsigned ptime,
+					 unsigned max_count,
+					 pjmedia_jbuf **p_jb);
+
+/**
+ * Set the jitter buffer to fixed delay mode. The default behavior
+ * is to adapt the delay with actual packet delay.
+ *
+ * @param jb		The jitter buffer
+ * @param prefetch	The fixed delay value, in number of frames.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_jbuf_set_fixed( pjmedia_jbuf *jb,
+					     unsigned prefetch);
+
+
+/**
+ * Set the jitter buffer to adaptive mode.
+ *
+ * @param jb		The jitter buffer.
+ * @param prefetch	The prefetch value to be applied to the jitter
+ *			buffer.
+ * @param min_prefetch	The minimum delay that must be applied to each
+ *			incoming packets, in number of frames. The
+ *			default value is zero.
+ * @param max_prefetch	The maximum allowable value for prefetch delay,
+ *			in number of frames. The default value is equal
+ *			to the size of the jitter buffer.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_jbuf_set_adaptive( pjmedia_jbuf *jb,
+					        unsigned prefetch,
+					        unsigned min_prefetch,
+						unsigned max_prefetch);
+
+
+/**
+ * Destroy jitter buffer instance.
+ *
+ * @param jb		The jitter buffer.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_jbuf_destroy(pjmedia_jbuf *jb);
+
+
+/**
+ * Restart jitter. This function flushes all packets in the buffer and
+ * reset the internal sequence number.
+ *
+ * @param jb		The jitter buffer.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_jbuf_reset(pjmedia_jbuf *jb);
+
+
+/**
+ * Put a frame to the jitter buffer. If the frame can be accepted (based
+ * on the sequence number), the jitter buffer will copy the frame and put
+ * it in the appropriate position in the buffer.
+ *
+ * Application MUST manage it's own synchronization when multiple threads
+ * are accessing the jitter buffer at the same time.
+ *
+ * @param jb		The jitter buffer.
+ * @param frame		Pointer to frame buffer to be stored in the jitter
+ *			buffer.
+ * @param size		The frame size.
+ * @param frame_seq	The frame sequence number.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(void) pjmedia_jbuf_put_frame( pjmedia_jbuf *jb, 
+				      const void *frame, 
+				      pj_size_t size, 
+				      int frame_seq);
+
+/**
+ * Get a frame from the jitter buffer. The jitter buffer will return the
+ * oldest frame from it's buffer, when it is available.
+ *
+ * Application MUST manage it's own synchronization when multiple threads
+ * are accessing the jitter buffer at the same time.
+ *
+ * @param jb		The jitter buffer.
+ * @param frame		Buffer to receive the payload from the jitter buffer.
+ *			Application MUST make sure that the buffer has
+ *			appropriate size (i.e. not less than the frame size,
+ *			as specified when the jitter buffer was created).
+ *			The jitter buffer only copied a frame to this 
+ *			buffer when the frame type returned by this function
+ *			is PJMEDIA_JB_NORMAL_FRAME.
+ * @param p_frm_type	Pointer to receive frame type. If jitter buffer is
+ *			currently empty or bufferring, the frame type will
+ *			be set to PJMEDIA_JB_ZERO_FRAME, and no frame will
+ *			be copied. If the jitter buffer detects that frame is
+ *			missing with current sequence number, the frame type
+ *			will be set to PJMEDIA_JB_MISSING_FRAME, and no
+ *			frame will be copied. If there is a frame, the jitter
+ *			buffer will copy the frame to the buffer, and frame
+ *			type will be set to PJMEDIA_JB_NORMAL_FRAME.
+ */
+PJ_DECL(void) pjmedia_jbuf_get_frame( pjmedia_jbuf *jb, 
+				      void *frame, 
+				      char *p_frm_type);
+
+
+/**
+ * Get jitter buffer current state/settings.
+ *
+ * @param jb		The jitter buffer.
+ * @param state		Buffer to receive jitter buffer state.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_jbuf_get_state( pjmedia_jbuf *jb,
+					     pjmedia_jb_state *state );
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* __PJMEDIA_JBUF_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/master_port.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/master_port.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/master_port.h	(revision 1163)
@@ -0,0 +1,176 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_MASTER_PORT_H__
+#define __PJMEDIA_MASTER_PORT_H__
+
+
+/**
+ * @file master_port.h
+ * @brief Master port.
+ */
+#include <pjmedia/port.h>
+
+/**
+ * @defgroup PJMEDIA_MASTER_PORT Master Port
+ * @ingroup PJMEDIA_PORT_CLOCK
+ * @brief Provides media clock for media ports.
+ * @{
+ * A master port has two media ports connected to it, and by convention
+ * thay are called downstream and upstream ports. The media stream flowing to
+ * the downstream port is called encoding or send direction, and media stream 
+ * flowing to the upstream port is called decoding or receive direction
+ * (imagine the downstream as stream to remote endpoint, and upstream as
+ * local media port; media flowing to remote endpoint (downstream) will need
+ * to be encoded before it is transmitted to remote endpoint).
+ *
+ * A master port internally has an instance of @ref PJMEDIA_CLOCK, which
+ * provides the essensial timing for the master port. The @ref PJMEDIA_CLOCK
+ * runs asynchronously, and whenever a clock <b>tick</b> expires, a callback
+ * will be called, and the master port performs the following tasks:
+ *  - it calls <b><tt>get_frame()</tt></b> from the downstream port,
+ *    when give the frame to the upstream port by calling <b><tt>put_frame
+ *    </tt></b> to the upstream port, and
+ *  - performs the same task, but on the reverse direction (i.e. get the stream
+ *    from upstream port and give it to the downstream port).
+ *
+ * Because master port enables media stream to flow automatically, it is
+ * said that the master port supplies @ref PJMEDIA_PORT_CLOCK to the 
+ * media ports interconnection.
+ *
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Opaque declaration for master port.
+ */
+typedef struct pjmedia_master_port pjmedia_master_port;
+
+
+/**
+ * Create a master port.
+ *
+ * @param pool		Pool to allocate master port from.
+ * @param u_port	Upstream port.
+ * @param d_port	Downstream port.
+ * @param options	Options flags, must be zero for now.
+ * @param p_m		Pointer to receive the master port instance.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_master_port_create(pj_pool_t *pool,
+						pjmedia_port *u_port,
+						pjmedia_port *d_port,
+						unsigned options,
+						pjmedia_master_port **p_m);
+
+
+/**
+ * Start the media flow.
+ *
+ * @param m		The master port.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_master_port_start(pjmedia_master_port *m);
+
+
+/**
+ * Stop the media flow.
+ *
+ * @param m		The master port.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_master_port_stop(pjmedia_master_port *m);
+
+
+/**
+ * Change the upstream port. Note that application is responsible to destroy
+ * current upstream port (the one that is going to be replaced with the
+ * new port).
+ *
+ * @param m		The master port.
+ * @param port		Port to be used for upstream port.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_master_port_set_uport(pjmedia_master_port *m,
+						   pjmedia_port *port);
+
+
+/**
+ * Get the upstream port.
+ *
+ * @param m		The master port.
+ *
+ * @return		The upstream port.
+ */
+PJ_DECL(pjmedia_port*) pjmedia_master_port_get_uport(pjmedia_master_port*m);
+
+
+/**
+ * Change the downstream port. Note that application is responsible to destroy
+ * current downstream port (the one that is going to be replaced with the
+ * new port).
+ *
+ * @param m		The master port.
+ * @param port		Port to be used for downstream port.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_master_port_set_dport(pjmedia_master_port *m,
+						   pjmedia_port *port);
+
+
+/**
+ * Get the downstream port.
+ *
+ * @param m		The master port.
+ *
+ * @return		The downstream port.
+ */
+PJ_DECL(pjmedia_port*) pjmedia_master_port_get_dport(pjmedia_master_port*m);
+
+
+/**
+ * Destroy the master port, and optionally destroy the upstream and 
+ * downstream ports.
+ *
+ * @param m		The master port.
+ * @param destroy_ports	If non-zero, the function will destroy both
+ *			upstream and downstream ports too.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_master_port_destroy(pjmedia_master_port *m,
+						 pj_bool_t destroy_ports);
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_MASTER_PORT_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/mem_port.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/mem_port.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/mem_port.h	(revision 1163)
@@ -0,0 +1,177 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_MEM_PORT_H__
+#define __PJMEDIA_MEM_PORT_H__
+
+/**
+ * @file mem_port.h
+ * @brief Memory based media playback/capture port
+ */
+#include <pjmedia/port.h>
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJMEDIA_MEM_PLAYER Memory/Buffer-based Playback Port
+ * @ingroup PJMEDIA_PORT
+ * @brief Media playback from a fixed buffer
+ * @{
+ * A memory/buffer based playback port is used to play media from a fixed
+ * size buffer. This is useful over @ref PJMEDIA_FILE_PLAY for 
+ * situation where filesystems are not available in the target system.
+ */
+
+/**
+ * Create the buffer based playback to play the media from the specified
+ * buffer.
+ *
+ * @param pool		    Pool to allocate memory for the port structure.
+ * @param buffer	    The buffer to play the media from, which should
+ *			    be available throughout the life time of the port.
+ *			    The player plays the media directly from this
+ *			    buffer (i.e. no copying is done).
+ * @param size		    The size of the buffer, in bytes.
+ * @param clock_rate	    Sampling rate.
+ * @param channel_count	    Number of channels.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Number of bits per sample.
+ * @param options	    Option flags.
+ * @param p_port	    Pointer to receive the port instance.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate
+ *			    error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_mem_player_create(pj_pool_t *pool,
+					       const void *buffer,
+					       pj_size_t size,
+					       unsigned clock_rate,
+					       unsigned channel_count,
+					       unsigned samples_per_frame,
+					       unsigned bits_per_sample,
+					       unsigned options,
+					       pjmedia_port **p_port );
+
+
+/**
+ * Register a callback to be called when the buffer reading has reached the
+ * end of buffer. If the player is set to play repeatedly, then the callback
+ * will be called multiple times. Note that only one callback can be 
+ * registered for each player port.
+ *
+ * @param port		The memory player port.
+ * @param user_data	User data to be specified in the callback
+ * @param cb		Callback to be called. If the callback returns non-
+ *			PJ_SUCCESS, the playback will stop. Note that if
+ *			application destroys the player port in the callback,
+ *			it must return non-PJ_SUCCESS here.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_mem_player_set_eof_cb( pjmedia_port *port,
+			       void *user_data,
+			       pj_status_t (*cb)(pjmedia_port *port,
+						 void *usr_data));
+
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup PJMEDIA_MEM_CAPTURE Memory/Buffer-based Capture Port
+ * @ingroup PJMEDIA_PORT
+ * @brief Capture to fixed size buffer
+ * @{
+ * A memory based capture is used to save media streams to a fixed size
+ * buffer. This is useful over @ref PJMEDIA_FILE_REC for 
+ * situation where filesystems are not available in the target system.
+ */
+
+/**
+ * Create media port to capture/record media into a fixed size buffer.
+ *
+ * @param pool		    Pool to allocate memory for the port structure.
+ * @param buffer	    The buffer to record the media to, which should
+ *			    be available throughout the life time of the port.
+ * @param size		    The maximum size of the buffer, in bytes.
+ * @param clock_rate	    Sampling rate.
+ * @param channel_count	    Number of channels.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Number of bits per sample.
+ * @param options	    Option flags.
+ * @param p_port	    Pointer to receive the port instance.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate
+ *			    error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_mem_capture_create(pj_pool_t *pool,
+						void *buffer,
+						pj_size_t size,
+						unsigned clock_rate,
+						unsigned channel_count,
+						unsigned samples_per_frame,
+						unsigned bits_per_sample,
+						unsigned options,
+						pjmedia_port **p_port);
+
+
+/**
+ * Register a callback to be called when no space left in the buffer.
+ * Note that when a callback is registered, this callback will also be
+ * called when application destroys the port and the callback has not 
+ * been called before.
+ *
+ * @param port		The memory recorder port.
+ * @param user_data	User data to be specified in the callback
+ * @param cb		Callback to be called. If the callback returns non-
+ *			PJ_SUCCESS, the recording will stop. In other cases
+ *                      recording will be restarted and the rest of the frame
+ *                      will be stored starting from the beginning of the 
+ *			buffer. Note that if application destroys the capture
+ *			port in the callback, it must return non-PJ_SUCCESS 
+ *			here.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t)
+pjmedia_mem_capture_set_eof_cb(pjmedia_port *port,
+                               void *user_data,
+                               pj_status_t (*cb)(pjmedia_port *port,
+						 void *usr_data));
+
+/**
+ * Return the current size of the recorded data in the buffer.
+ *
+ * @param port		The memory recorder port.
+ * @return		The size of buffer data..
+ */
+PJ_DECL(pj_size_t)
+pjmedia_mem_capture_get_size(pjmedia_port *port);
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJMEDIA_MEM_PORT_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/mp3_port.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/mp3_port.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/mp3_port.h	(revision 1163)
@@ -0,0 +1,147 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/*
+ * Contributed by:
+ *  Toni < buldozer at aufbix dot org >
+ */
+
+#ifndef __PJMEDIA_MP3_PORT_H__
+#define __PJMEDIA_MP3_PORT_H__
+
+
+/**
+ * @file mp3_port.h
+ * @brief MP3 writer
+ */
+#include <pjmedia/port.h>
+
+/**
+ * @defgroup PJMEDIA_MP3_FILE_REC MP3 Audio File Writer (Recorder)
+ * @ingroup PJMEDIA_PORT
+ * @brief MP3 Audio File Writer (Recorder)
+ * @{
+ *
+ * This section describes MP3 file writer. Currently it only works on Windows
+ * using BladeEncDLL of the LAME MP3 encoder. <b>Note that the LAME_ENC.DLL 
+ * file must exist in the PATH so that the encoder can work properly.</b>
+ *
+ * The MP3 file writer is created with #pjmedia_mp3_writer_port_create() which
+ * among other things specifies the desired file name and audio properties.
+ * It then takes PCM input when #pjmedia_port_put_frame() is called and encode
+ * the PCM input into MP3 streams before writing it to the .mp3 file.
+ */
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * This structure contains encoding options that can be specified during
+ * MP3 writer port creation. Application should always zero the structure
+ * before setting some value to make sure that default options will be used.
+ */
+typedef struct pjmedia_mp3_encoder_option
+{
+    /** Specify whether variable bit rate should be used. Variable bitrate
+     *  would normally produce better quality at the expense of probably
+     *  larger file.
+     */
+    pj_bool_t	vbr;
+
+    /** Target bitrate, in bps. If VBR is enabled, this settings specifies 
+     *  the  average bit-rate requested, and will make the encoder ignore 
+     *  the quality setting. For CBR, this specifies the actual bitrate,
+     *  and if this option is zero, it will be set to the sampling rate
+     *  multiplied by number of channels.
+     */
+    unsigned	bit_rate;
+
+    /** Encoding quality, 0-9, with 0 is the highest quality. For VBR, the 
+     *  quality setting will only take effect when bit_rate setting is zero.
+     */
+    unsigned	quality;
+
+} pjmedia_mp3_encoder_option;
+
+
+/**
+ * Create a media port to record PCM media to a MP3 file. After the port
+ * is created, application can call #pjmedia_port_put_frame() to feed the
+ * port with PCM frames. The port then will encode the PCM frame into MP3
+ * stream, and store it to MP3 file specified in the argument.
+ *
+ * When application has finished with writing MP3 file, it must destroy the
+ * media port with #pjmedia_port_destroy() so that the MP3 file can be
+ * closed properly.
+ *
+ * @param pool		    Pool to create memory buffers for this port.
+ * @param filename	    File name.
+ * @param clock_rate	    The sampling rate.
+ * @param channel_count	    Number of channels.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Number of bits per sample (eg 16).
+ * @param option	    Optional option to set encoding parameters.
+ * @param p_port	    Pointer to receive the file port instance.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_mp3_writer_port_create(pj_pool_t *pool,
+			       const char *filename,
+			       unsigned clock_rate,
+			       unsigned channel_count,
+			       unsigned samples_per_frame,
+			       unsigned bits_per_sample,
+			       const pjmedia_mp3_encoder_option *option,
+			       pjmedia_port **p_port );
+
+/**
+ * Register the callback to be called when the file writing has reached
+ * certain size. Application can use this callback, for example, to limit
+ * the size of the output file.
+ *
+ * @param port		The file writer port.
+ * @param pos		The file position on which the callback will be called.
+ * @param user_data	User data to be specified in the callback, and will be
+ *			given on the callback.
+ * @param cb		Callback to be called. If the callback returns non-
+ *			PJ_SUCCESS, the writing will stop. Note that if 
+ *			application destroys the port in the callback, it must
+ *			return non-PJ_SUCCESS here.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_mp3_writer_port_set_cb( pjmedia_port *port,
+				pj_size_t pos,
+				void *user_data,
+				pj_status_t (*cb)(pjmedia_port *port,
+							void *usr_data));
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+#endif	/* __PJMEDIA_MP3_PORT_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/null_port.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/null_port.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/null_port.h	(revision 1163)
@@ -0,0 +1,69 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_NULL_PORT_H__
+#define __PJMEDIA_NULL_PORT_H__
+
+/**
+ * @file null_port.h
+ * @brief Null media port.
+ */
+#include <pjmedia/port.h>
+
+
+
+/**
+ * @defgroup PJMEDIA_NULL_PORT Null Port
+ * @ingroup PJMEDIA_PORT
+ * @brief Null port is the simplest type of port.
+ * @{
+ */
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Create Null port. 
+ *
+ * @param pool			Pool to allocate memory.
+ * @param sampling_rate		Sampling rate of the port.
+ * @param channel_count		Number of channels.
+ * @param samples_per_frame	Number of samples per frame.
+ * @param bits_per_sample	Number of bits per sample.
+ * @param p_port		Pointer to receive the port instance.
+ *
+ * @return			PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_null_port_create( pj_pool_t *pool,
+					       unsigned sampling_rate,
+					       unsigned channel_count,
+					       unsigned samples_per_frame,
+					       unsigned bits_per_sample,
+					       pjmedia_port **p_port );
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_NULL_PORT_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/plc.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/plc.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/plc.h	(revision 1163)
@@ -0,0 +1,111 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_PLC_H__
+#define __PJMEDIA_PLC_H__
+
+
+/**
+ * @file plc.h
+ * @brief Packet Lost Concealment (PLC) API.
+ */
+#include <pjmedia/types.h>
+
+/**
+ * @defgroup PJMED_PLC Packet Lost Concealment (PLC)
+ * @ingroup PJMEDIA_FRAME_OP
+ * @{
+ * This section describes PJMEDIA's implementation of Packet Lost
+ * Concealment algorithm. This algorithm is used to implement PLC for
+ * codecs that do not have built-in support for one (e.g. G.711 or GSM codecs).
+ *
+ * The PLC algorithm (either built-in or external) is embedded in
+ * PJMEDIA codec instance, and application can conceal lost frames
+ * by calling <b><tt>recover()</tt></b> member of the codec's member
+ * operation (#pjmedia_codec_op).
+ *
+ * See also @ref plc_codec for more info.
+ */
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Opaque declaration for PLC.
+ */
+typedef struct pjmedia_plc pjmedia_plc;
+
+
+
+/**
+ * Create PLC session. This function will select the PLC algorithm to
+ * use based on the arguments.
+ *
+ * @param pool		    Pool to allocate memory for the PLC.
+ * @param clock_rate	    Media sampling rate.
+ * @param samples_per_frame Number of samples per frame.
+ * @param options	    Must be zero for now.
+ * @param p_plc		    Pointer to receive the PLC instance.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_plc_create( pj_pool_t *pool,
+					 unsigned clock_rate,
+					 unsigned samples_per_frame,
+					 unsigned options,
+					 pjmedia_plc **p_plc);
+
+
+/**
+ * Save a good frame to PLC.
+ *
+ * @param plc		    The PLC session.
+ * @param frame		    The good frame to be stored to PLC. This frame
+ *			    must have the same length as the configured
+ *			    samples per frame.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_plc_save( pjmedia_plc *plc,
+				       pj_int16_t *frame );
+
+
+/**
+ * Generate a replacement for lost frame.
+ *
+ * @param plc		    The PLC session.
+ * @param frame		    Buffer to receive the generated frame. This buffer
+ *			    must be able to store the frame.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_plc_generate( pjmedia_plc *plc,
+					   pj_int16_t *frame );
+
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* __PJMEDIA_PLC_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/port.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/port.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/port.h	(revision 1163)
@@ -0,0 +1,425 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_PORT_H__
+#define __PJMEDIA_PORT_H__
+
+/**
+ * @file port.h
+ * @brief Port interface declaration
+ */
+#include <pjmedia/types.h>
+#include <pj/os.h>
+
+
+/**
+  @defgroup PJMEDIA_PORT_CONCEPT Media Ports Framework
+  @ingroup PJMEDIA
+  @brief Extensible framework for media terminations
+  
+  @section media_port_intro Media Port Concepts
+  
+  @subsection The Media Port
+  A media port (represented with pjmedia_port "class") provides a generic
+  and extensible framework for implementing media terminations. A media
+  port interface basically has the following properties:
+  - media port information (pjmedia_port_info) to describe the
+  media port properties (sampling rate, number of channels, etc.),
+  - pointer to function to acquire frames from the port (<tt>get_frame()
+  </tt> interface), which will be called by #pjmedia_port_get_frame()
+  public API, and
+  - pointer to function to store frames to the port (<tt>put_frame()</tt>
+  interface) which will be called by #pjmedia_port_put_frame() public
+  API.
+  
+  Media ports are passive "objects". Applications (or other PJMEDIA 
+  components) must actively calls #pjmedia_port_get_frame() or 
+  #pjmedia_port_put_frame() from/to the media port in order to retrieve/
+  store media frames.
+  
+  Some media ports (such as @ref PJMEDIA_CONF and @ref PJMEDIA_RESAMPLE_PORT)
+  may be interconnected with each other, while some
+  others represent the ultimate source/sink termination for the media. 
+
+
+  @subsection port_clock_ex1 Example: Manual Resampling
+
+  For example, suppose application wants to convert the sampling rate
+  of one WAV file to another. In this case, application would create and
+  arrange media ports connection as follows:
+
+    \image html sample-manual-resampling.jpg
+
+  Application would setup the media ports using the following pseudo-
+  code:
+
+  \code
+  
+      pjmedia_port *player, *resample, *writer;
+      pj_status_t status;
+  
+      // Create the file player port.
+      status = pjmedia_wav_player_port_create(pool, 
+  					      "Input.WAV",	    // file name
+  					      20,		    // ptime.
+  					      PJMEDIA_FILE_NO_LOOP, // flags
+  					      0,		    // buffer size
+  					      NULL,		    // user data.
+  					      &player );
+      PJ_ASSERT_RETURN(status==PJ_SUCCESS, PJ_SUCCESS);
+  
+      // Create the resample port with specifying the target sampling rate, 
+      // and with the file port as the source. This will effectively
+      // connect the resample port with the player port.
+      status = pjmedia_resample_port_create( pool, player, 8000, 
+  					     0, &resample);
+      PJ_ASSERT_RETURN(status==PJ_SUCCESS, PJ_SUCCESS);
+  
+      // Create the file writer, specifying the resample port's configuration
+      // as the WAV parameters.
+      status pjmedia_wav_writer_port_create(pool, 
+  					    "Output.WAV",  // file name.
+  					    resample->info.clock_rate,
+  					    resample->info.channel_count,
+  					    resample->info.samples_per_frame,
+  					    resample->info.bits_per_sample,
+  					    0,		// flags
+  					    0,		// buffer size
+  					    NULL,	// user data.
+  					    &writer);
+  
+  \endcode
+
+  
+  After the ports have been set up, application can perform the conversion
+  process by running this loop:
+ 
+  \code
+  
+  	pj_int16_t samplebuf[MAX_FRAME];
+  	
+  	while (1) {
+  	    pjmedia_frame frame;
+  	    pj_status_t status;
+  
+  	    frame.buf = samplebuf;
+  	    frame.size = sizeof(samplebuf);
+  
+  	    // Get the frame from resample port.
+  	    status = pjmedia_port_get_frame(resample, &frame);
+  	    if (status != PJ_SUCCESS || frame.type == PJMEDIA_FRAME_TYPE_NONE) {
+  		// End-of-file, end the conversion.
+  		break;
+  	    }
+  
+  	    // Put the frame to write port.
+  	    status = pjmedia_port_put_frame(writer, &frame);
+  	    if (status != PJ_SUCCESS) {
+  		// Error in writing the file.
+  		break;
+  	    }
+  	}
+  
+  \endcode
+ 
+  For the sake of completeness, after the resampling process is done, 
+  application would need to destroy the ports:
+  
+  \code
+	// Note: by default, destroying resample port will destroy the
+	//	 the downstream port too.
+  	pjmedia_port_destroy(resample);
+  	pjmedia_port_destroy(writer);
+  \endcode
+ 
+ 
+  The above steps are okay for our simple purpose of changing file's sampling
+  rate. But for other purposes, the process of reading and writing frames
+  need to be done in timely manner (for example, sending RTP packets to
+  remote stream). And more over, as the application's scope goes bigger,
+  the same pattern of manually reading/writing frames comes up more and more often,
+  thus perhaps it would be better if PJMEDIA provides mechanism to 
+  automate this process.
+  
+  And indeed PJMEDIA does provide such mechanism, which is described in 
+  @ref PJMEDIA_PORT_CLOCK section.
+
+
+  @subsection media_port_autom Automating Media Flow
+
+  PJMEDIA provides few mechanisms to make media flows automatically
+  among media ports. This concept is described in @ref PJMEDIA_PORT_CLOCK 
+  section.
+
+ */
+
+
+/**
+ * @defgroup PJMEDIA_PORT_INTERFACE Media Port Interface
+ * @ingroup PJMEDIA_PORT_CONCEPT
+ * @brief Declares the media port interface.
+ */
+
+/**
+ * @defgroup PJMEDIA_PORT Ports
+ * @ingroup PJMEDIA_PORT_CONCEPT
+ * @brief Contains various types of media ports/terminations.
+ * @{
+ * This page lists all types of media ports currently implemented
+ * in PJMEDIA. The media port concept is explained in @ref PJMEDIA_PORT_CONCEPT.
+ * @}
+ */
+
+/**
+ @defgroup PJMEDIA_PORT_CLOCK Clock/Timing
+ @ingroup PJMEDIA_PORT_CONCEPT
+ @brief Various types of classes that provide timing.
+ @{
+
+ The media clock/timing extends the media port concept that is explained 
+ in @ref PJMEDIA_PORT_CONCEPT. When clock is present in the ports 
+ interconnection, media will flow automatically (and with correct timing too!)
+ from one media port to another.
+ 
+ There are few objects in PJMEDIA that are able to provide clock/timing
+ to media ports interconnection:
+
+ - @ref PJMED_SND_PORT\n
+   The sound device makes a good candidate as the clock source, and
+   PJMEDIA @ref PJMED_SND is designed so that it is able to invoke
+   operations according to timing driven by the sound hardware clock
+   (this may sound complicated, but actually it just means that
+   the sound device abstraction provides callbacks to be called when
+   it has/wants media frames).\n
+   See @ref PJMED_SND_PORT for more details.
+
+ - @ref PJMEDIA_MASTER_PORT\n
+   The master port uses @ref PJMEDIA_CLOCK as the clock source. By using
+   @ref PJMEDIA_MASTER_PORT, it is possible to interconnect passive
+   media ports and let the frames flow automatically in timely manner.\n
+   Please see @ref PJMEDIA_MASTER_PORT for more details.
+
+ @}
+ */
+
+/**
+ * @addtogroup PJMEDIA_PORT_INTERFACE
+ * @{
+ * This page contains the media port interface declarations. The media port
+ * concept is explained in @ref PJMEDIA_PORT_CONCEPT.
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Port operation setting.
+ */
+enum pjmedia_port_op
+{
+    /** 
+     * No change to the port TX or RX settings.
+     */
+    PJMEDIA_PORT_NO_CHANGE,
+
+    /**
+     * TX or RX is disabled from the port. It means get_frame() or
+     * put_frame() WILL NOT be called for this port.
+     */
+    PJMEDIA_PORT_DISABLE,
+
+    /**
+     * TX or RX is muted, which means that get_frame() or put_frame()
+     * will still be called, but the audio frame is discarded.
+     */
+    PJMEDIA_PORT_MUTE,
+
+    /**
+     * Enable TX and RX to/from this port.
+     */
+    PJMEDIA_PORT_ENABLE
+};
+
+
+/**
+ * @see pjmedia_port_op
+ */
+typedef enum pjmedia_port_op pjmedia_port_op;
+
+
+/**
+ * Port info.
+ */
+typedef struct pjmedia_port_info
+{
+    pj_str_t	    name;		/**< Port name.			    */
+    pj_uint32_t	    signature;		/**< Port signature.		    */
+    pjmedia_type    type;		/**< Media type.		    */
+    pj_bool_t	    has_info;		/**< Has info?			    */
+    pj_bool_t	    need_info;		/**< Need info on connect?	    */
+    unsigned	    pt;			/**< Payload type (can be dynamic). */
+    pj_str_t	    encoding_name;	/**< Encoding name.		    */
+    unsigned	    clock_rate;		/**< Sampling rate.		    */
+    unsigned	    channel_count;	/**< Number of channels.	    */
+    unsigned	    bits_per_sample;	/**< Bits/sample		    */
+    unsigned	    samples_per_frame;	/**< No of samples per frame.	    */
+    unsigned	    bytes_per_frame;	/**< No of samples per frame.	    */
+} pjmedia_port_info;
+
+
+/** 
+ * Types of media frame. 
+ */
+typedef enum pjmedia_frame_type
+{
+    PJMEDIA_FRAME_TYPE_NONE,	    /**< No frame.		*/
+    PJMEDIA_FRAME_TYPE_AUDIO	    /**< Normal audio frame.	*/
+
+} pjmedia_frame_type;
+
+
+/** 
+ * This structure describes a media frame. 
+ */
+struct pjmedia_frame
+{
+    pjmedia_frame_type	 type;	    /**< Frame type.		    */
+    void		*buf;	    /**< Pointer to buffer.	    */
+    pj_size_t		 size;	    /**< Frame size in bytes.	    */
+    pj_timestamp	 timestamp; /**< Frame timestamp.	    */
+};
+
+
+/** 
+ * @see pjmedia_frame
+ */
+typedef struct pjmedia_frame pjmedia_frame;
+
+
+/**
+ * For future graph.
+ */
+typedef struct pjmedia_graph pjmedia_graph;
+
+
+/**
+ * @see pjmedia_port
+ */
+typedef struct pjmedia_port pjmedia_port;
+
+/**
+ * Port interface.
+ */
+struct pjmedia_port
+{
+    pjmedia_port_info	 info;		    /**< Port information.  */
+
+    /** Port data can be used by the port creator to attach arbitrary
+     *  value to be associated with the port.
+     */
+    struct port_data {
+	void		*pdata;		    /**< Pointer data.	    */
+	long		 ldata;		    /**< Long data.	    */
+    } port_data;
+
+    /**
+     * Sink interface. 
+     * This should only be called by #pjmedia_port_put_frame().
+     */
+    pj_status_t (*put_frame)(pjmedia_port *this_port, 
+			     const pjmedia_frame *frame);
+
+    /**
+     * Source interface. 
+     * This should only be called by #pjmedia_port_get_frame().
+     */
+    pj_status_t (*get_frame)(pjmedia_port *this_port, 
+			     pjmedia_frame *frame);
+
+    /**
+     * Called to destroy this port.
+     */
+    pj_status_t (*on_destroy)(pjmedia_port *this_port);
+};
+
+
+/**
+ * This is an auxiliary function to initialize port info for
+ * ports which deal with PCM audio.
+ *
+ * @param info		    The port info to be initialized.
+ * @param name		    Port name.
+ * @param signature	    Port signature.
+ * @param clock_rate	    Port's clock rate.
+ * @param channel_count	    Number of channels.
+ * @param bits_per_sample   Bits per sample.
+ * @param samples_per_frame Number of samples per frame.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_port_info_init( pjmedia_port_info *info,
+					     const pj_str_t *name,
+					     unsigned signature,
+					     unsigned clock_rate,
+					     unsigned channel_count,
+					     unsigned bits_per_sample,
+					     unsigned samples_per_frame);
+
+
+/**
+ * Get a frame from the port (and subsequent downstream ports).
+ *
+ * @param port	    The media port.
+ * @param frame	    Frame to store samples.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_port_get_frame( pjmedia_port *port,
+					     pjmedia_frame *frame );
+
+/**
+ * Put a frame to the port (and subsequent downstream ports).
+ *
+ * @param port	    The media port.
+ * @param frame	    Frame to the put to the port.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_port_put_frame( pjmedia_port *port,
+					     const pjmedia_frame *frame );
+
+
+/**
+ * Destroy port (and subsequent downstream ports)
+ *
+ * @param port	    The media port.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_port_destroy( pjmedia_port *port );
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* __PJMEDIA_PORT_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/resample.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/resample.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/resample.h	(revision 1163)
@@ -0,0 +1,188 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_RESAMPLE_H__
+#define __PJMEDIA_RESAMPLE_H__
+
+
+
+/**
+ * @file resample.h
+ * @brief Sample rate converter.
+ */
+#include <pjmedia/types.h>
+#include <pjmedia/port.h>
+
+/**
+ * @defgroup PJMEDIA_RESAMPLE Resampling Algorithm
+ * @ingroup PJMEDIA_FRAME_OP
+ * @brief Functions to alter frame's clock rate.
+ * @{
+ * This section describes the base resampling functions. In addition to this,
+ * application can use the @ref PJMEDIA_RESAMPLE_PORT which provides
+ * media port abstraction for the base resampling algorithm.
+ */
+
+PJ_BEGIN_DECL
+
+/*
+ * This file declares two types of API:
+ *
+ * Application can use #pjmedia_resample_create() and #pjmedia_resample_run()
+ * to convert a frame from source rate to destination rate. The inpuit frame 
+ * must have a constant length.
+ *
+ * Alternatively, application can create a resampling port with
+ * #pjmedia_resample_port_create() and connect the port to other ports to
+ * change the sampling rate of the samples.
+ */
+
+
+/**
+ * Opaque resample session.
+ */
+typedef struct pjmedia_resample pjmedia_resample;
+
+/**
+ * Create a frame based resample session.
+ *
+ * @param pool			Pool to allocate the structure and buffers.
+ * @param high_quality		If true, then high quality conversion will be
+ *				used, at the expense of more CPU and memory,
+ *				because temporary buffer needs to be created.
+ * @param large_filter		If true, large filter size will be used.
+ * @param rate_in		Clock rate of the input samples.
+ * @param rate_out		Clock rate of the output samples.
+ * @param samples_per_frame	Number of samples per frame in the input.
+ * @param p_resample		Pointer to receive the resample session.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_resample_create(pj_pool_t *pool,
+					     pj_bool_t high_quality,
+					     pj_bool_t large_filter,
+					     unsigned rate_in,
+					     unsigned rate_out,
+					     unsigned samples_per_frame,
+					     pjmedia_resample **p_resample);
+
+
+/**
+ * Use the resample session to resample a frame. The frame must have the
+ * same size and settings as the resample session, or otherwise the
+ * behavior is undefined.
+ *
+ * @param resample		The resample session.
+ * @param input			Buffer containing the input samples.
+ * @param output		Buffer to store the output samples.
+ */
+PJ_DECL(void) pjmedia_resample_run( pjmedia_resample *resample,
+				    const pj_int16_t *input,
+				    pj_int16_t *output );
+
+
+/**
+ * Get the input frame size of a resample session.
+ *
+ * @param resample		The resample session.
+ *
+ * @return			The frame size, in number of samples.
+ */
+PJ_DECL(unsigned) pjmedia_resample_get_input_size(pjmedia_resample *resample);
+
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup PJMEDIA_RESAMPLE_PORT Resample Port
+ * @ingroup PJMEDIA_PORT
+ * @brief Media port interface to change media stream's sampling rate.
+ * @{
+ * This section describes media port abstractoin for @ref PJMEDIA_RESAMPLE.
+ */
+
+
+/**
+ * Option flags that can be specified when creating resample port.
+ */
+enum pjmedia_resample_port_options
+{
+    /**
+     * Do not use high quality resampling algorithm, but use linear
+     * algorithm instead.
+     */
+    PJMEDIA_RESAMPLE_USE_LINEAR = 1,
+
+    /**
+     * Use small filter workspace when high quality resampling is
+     * used.
+     */
+    PJMEDIA_RESAMPLE_USE_SMALL_FILTER = 2,
+
+    /**
+     * Do not destroy downstream port when resample port is destroyed.
+     */
+    PJMEDIA_RESAMPLE_DONT_DESTROY_DN = 4
+};
+
+
+
+/**
+ * Create a resample port. This creates a bidirectional resample session,
+ * which will resample frames when the port's get_frame() and put_frame()
+ * is called.
+ *
+ * When the resample port's get_frame() is called, this port will get
+ * a frame from the downstream port and resample the frame to the target
+ * clock rate before returning it to the caller.
+ *
+ * When the resample port's put_frame() is called, this port will resample
+ * the frame to the downstream port's clock rate before giving the frame
+ * to the downstream port.
+ *
+ * @param pool			Pool to allocate the structure and buffers.
+ * @param dn_port		The downstream port, which clock rate is to
+ *				be converted to the target clock rate.
+ * @param clock_rate		Target clock rate.
+ * @param options		Flags from #pjmedia_resample_port_options.
+ *				When this flag is zero, the default behavior
+ *				is to use high quality resampling with
+ *				large filter, and to destroy downstream port
+ *				when resample port is destroyed.
+ * @param p_port		Pointer to receive the resample port instance.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_resample_port_create( pj_pool_t *pool,
+						   pjmedia_port *dn_port,
+						   unsigned clock_rate,
+						   unsigned options,
+						   pjmedia_port **p_port );
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_RESAMPLE_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/rtcp.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/rtcp.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/rtcp.h	(revision 1163)
@@ -0,0 +1,388 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_RTCP_H__
+#define __PJMEDIA_RTCP_H__
+
+/**
+ * @file rtcp.h
+ * @brief RTCP implementation.
+ */
+
+#include <pjmedia/types.h>
+#include <pjmedia/rtp.h>
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJMED_RTCP RTCP Session and Encapsulation (RFC 3550)
+ * @ingroup PJMEDIA_TRANSPORT
+ * @{
+ * PJMEDIA implements subsets of RTCP specification (RFC 3550) to monitor
+ * the quality of the real-time media (audio/video) transmission. In
+ * addition to the standard quality monitoring and reporting with RTCP
+ * SR and RR types, PJMEDIA's RTCP implementation is able to report
+ * extended statistics for incoming streams, such as packet duplications,
+ * reorder, discarded, and loss period (to distinguish between random
+ * and burst loss).
+ *
+ * The bidirectional media quality statistic is represented with
+ * #pjmedia_rtcp_stat structure.
+ *
+ * When application uses the stream interface (see @ref PJMED_STRM),
+ * application may retrieve the RTCP statistic by calling 
+ * #pjmedia_stream_get_stat() function.
+ */
+
+#pragma pack(1)
+
+/**
+ * RTCP sender report.
+ */
+struct pjmedia_rtcp_sr
+{
+    pj_uint32_t	    ssrc;	    /**< SSRC identification.		*/
+    pj_uint32_t	    ntp_sec;	    /**< NTP time, seconds part.	*/
+    pj_uint32_t	    ntp_frac;	    /**< NTP time, fractions part.	*/
+    pj_uint32_t	    rtp_ts;	    /**< RTP timestamp.			*/
+    pj_uint32_t	    sender_pcount;  /**< Sender packet cound.		*/
+    pj_uint32_t	    sender_bcount;  /**< Sender octet/bytes count.	*/
+};
+
+/**
+ * @see pjmedia_rtcp_sr
+ */
+typedef struct pjmedia_rtcp_sr pjmedia_rtcp_sr;
+
+/**
+ * RTCP receiver report.
+ */
+struct pjmedia_rtcp_rr
+{
+    pj_uint32_t	    ssrc;	    /**< SSRC identification.		*/
+#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0
+    pj_uint32_t	    fract_lost:8;   /**< Fraction lost.			*/
+    pj_uint32_t	    total_lost_2:8; /**< Total lost, bit 16-23.		*/
+    pj_uint32_t	    total_lost_1:8; /**< Total lost, bit 8-15.		*/
+    pj_uint32_t	    total_lost_0:8; /**< Total lost, bit 0-7.		*/
+#else
+    pj_uint32_t	    fract_lost:8;   /**< Fraction lost.			*/
+    pj_uint32_t	    total_lost_2:8; /**< Total lost, bit 0-7.		*/
+    pj_uint32_t	    total_lost_1:8; /**< Total lost, bit 8-15.		*/
+    pj_uint32_t	    total_lost_0:8; /**< Total lost, bit 16-23.		*/
+#endif	
+    pj_uint32_t	    last_seq;	    /**< Last sequence number.		*/
+    pj_uint32_t	    jitter;	    /**< Jitter.			*/
+    pj_uint32_t	    lsr;	    /**< Last SR.			*/
+    pj_uint32_t	    dlsr;	    /**< Delay since last SR.		*/
+};
+
+/**
+ * @see pjmedia_rtcp_rr
+ */
+typedef struct pjmedia_rtcp_rr pjmedia_rtcp_rr;
+
+
+/**
+ * RTCP common header.
+ */
+struct pjmedia_rtcp_common
+{
+#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0
+    unsigned	    version:2;	/**< packet type            */
+    unsigned	    p:1;	/**< padding flag           */
+    unsigned	    count:5;	/**< varies by payload type */
+    unsigned	    pt:8;	/**< payload type           */
+#else
+    unsigned	    count:5;	/**< varies by payload type */
+    unsigned	    p:1;	/**< padding flag           */
+    unsigned	    version:2;	/**< packet type            */
+    unsigned	    pt:8;	/**< payload type           */
+#endif
+    unsigned	    length:16;	/**< packet length          */
+};
+
+/**
+ * @see pjmedia_rtcp_common
+ */
+typedef struct pjmedia_rtcp_common pjmedia_rtcp_common;
+
+/**
+ * This structure declares default RTCP packet (SR) that is sent by pjmedia.
+ * Incoming RTCP packet may have different format, and must be parsed
+ * manually by application.
+ */
+struct pjmedia_rtcp_pkt
+{
+    pjmedia_rtcp_common  common;	/**< Common header.	    */
+    pjmedia_rtcp_sr	 sr;		/**< Sender report.	    */
+    pjmedia_rtcp_rr	 rr;		/**< variable-length list   */
+};
+
+/**
+ * @see pjmedia_rtcp_pkt
+ */
+typedef struct pjmedia_rtcp_pkt pjmedia_rtcp_pkt;
+
+
+#pragma pack()
+
+
+/**
+ * NTP time representation.
+ */
+struct pjmedia_rtcp_ntp_rec
+{
+    pj_uint32_t	    hi;		/**< High order 32-bit part.	*/
+    pj_uint32_t	    lo;		/**< Lo order 32-bit part.	*/
+};
+
+/**
+ * @see pjmedia_rtcp_ntp_rec
+ */
+typedef struct pjmedia_rtcp_ntp_rec pjmedia_rtcp_ntp_rec;
+
+
+
+/**
+ * Unidirectional RTP stream statistics.
+ */
+struct pjmedia_rtcp_stream_stat
+{
+    pj_time_val	    update;	/**< Time of last update.		    */
+    unsigned	    update_cnt;	/**< Number of updates (to calculate avg)   */
+    pj_uint32_t	    pkt;	/**< Total number of packets		    */
+    pj_uint32_t	    bytes;	/**< Total number of payload/bytes	    */
+    unsigned	    discard;	/**< Total number of discarded packets.	    */
+    unsigned	    loss;	/**< Total number of packets lost	    */
+    unsigned	    reorder;	/**< Total number of out of order packets   */
+    unsigned	    dup;	/**< Total number of duplicates packets	    */
+
+    struct {
+	unsigned    count;	/**< Number of period samples(to calc avg)  */
+	unsigned    min;	/**< Minimum loss period (in usec)	    */
+	unsigned    avg;	/**< Average loss period (in usec)	    */
+	unsigned    max;	/**< Maximum loss period (in usec)	    */
+	unsigned    last;	/**< Last loss period (in usec)		    */
+    } loss_period;		/**< Lost period history.		    */
+
+    struct {
+	unsigned    burst:1;	/**< Burst/sequential packet lost detected  */
+    	unsigned    random:1;	/**< Random packet lost detected.	    */
+    } loss_type;		/**< Types of loss detected.		    */
+
+    struct {
+	unsigned    count;	/**< Number of updates.			    */
+	unsigned    min;	/**< Minimum jitter (in usec)		    */
+	unsigned    avg;	/**< Average jitter (in usec)		    */
+	unsigned    max;	/**< Maximum jitter (in usec)		    */
+	unsigned    last;	/**< Last jitter (in usec)		    */
+    } jitter;			/**< Jitter history.			    */
+};
+
+
+/**
+ * @see pjmedia_rtcp_stream_stat
+ */
+typedef struct pjmedia_rtcp_stream_stat pjmedia_rtcp_stream_stat;
+
+
+
+/**
+ * Bidirectional RTP stream statistics.
+ */
+struct pjmedia_rtcp_stat
+{
+    pj_time_val		     start; /**< Time when session was created	    */
+
+    pjmedia_rtcp_stream_stat tx;    /**< Encoder stream statistics.	    */
+    pjmedia_rtcp_stream_stat rx;    /**< Decoder stream statistics.	    */
+    
+    struct {
+	unsigned    min;	    /**< Minimum round-trip delay (in usec) */
+	unsigned    avg;	    /**< Average round-trip delay (in usec) */
+	unsigned    max;	    /**< Maximum round-trip delay (in usec) */
+	unsigned    last;	    /**< Last round-trip delay (in usec)    */
+    } rtt;			    /**< Round trip delay history.	    */
+
+    unsigned	    rtt_update_cnt; /**< Nb of times rtt is updated.	    */
+};
+
+
+/**
+ * @see pjmedia_rtcp_stat
+ */
+typedef struct pjmedia_rtcp_stat pjmedia_rtcp_stat;
+
+
+/**
+ * The types for keeping the average jitter value. Ideally a floating point
+ * number should be used, but this is not always available/desired.
+ */
+#if defined(PJ_HAS_FLOATING_POINT) && PJ_HAS_FLOATING_POINT!=0
+  typedef double PJMEDIA_AVG_JITTER_TYPE;
+#else
+  typedef pj_uint32_t PJMEDIA_AVG_JITTER_TYPE;
+#endif
+
+
+/**
+ * RTCP session is used to monitor the RTP session of one endpoint. There
+ * should only be one RTCP session for a bidirectional RTP streams.
+ */
+struct pjmedia_rtcp_session
+{
+    char		   *name;	/**< Name identification.	    */
+    pjmedia_rtcp_pkt	    rtcp_pkt;	/**< Cached RTCP packet.	    */
+    
+    pjmedia_rtp_seq_session seq_ctrl;	/**< RTCP sequence number control.  */
+    unsigned		    rtp_last_ts;/**< Last timestamp in RX RTP pkt.  */
+
+    unsigned		    clock_rate;	/**< Clock rate of the stream	    */
+    unsigned		    pkt_size;	/**< Avg pkt size, in samples.	    */
+    pj_uint32_t		    received;   /**< # pkt received		    */
+    pj_uint32_t		    exp_prior;	/**< # pkt expected at last interval*/
+    pj_uint32_t		    rx_prior;	/**< # pkt received at last interval*/
+    pj_int32_t		    transit;    /**< Rel transit time for prev pkt  */
+    pj_uint32_t		    jitter;	/**< Scaled jitter		    */
+    pj_time_val		    tv_base;	/**< Base time, in seconds.	    */
+    pj_timestamp	    ts_base;	/**< Base system timestamp.	    */
+    pj_timestamp	    ts_freq;	/**< System timestamp frequency.    */
+
+    pj_uint32_t		    rx_lsr;	/**< NTP ts in last SR received	    */
+    pj_timestamp	    rx_lsr_time;/**< Time when last SR is received  */
+    pj_uint32_t		    peer_ssrc;	/**< Peer SSRC			    */
+    
+    pjmedia_rtcp_stat	    stat;	/**< Bidirectional stream stat.	    */
+
+    /* Keep jitter calculation in floating point to prevent the values
+     * from being rounded-down to nearest integer.
+     */
+    PJMEDIA_AVG_JITTER_TYPE avg_jitter;	/**< Average RX jitter.		    */
+};
+
+/**
+ * @see pjmedia_rtcp_session
+ */
+typedef struct pjmedia_rtcp_session pjmedia_rtcp_session;
+
+
+/**
+ * Initialize RTCP session.
+ *
+ * @param session	    The session
+ * @param name		    Optional name to identify the session (for
+ *			    logging purpose).
+ * @param clock_rate	    Codec clock rate in samples per second.
+ * @param samples_per_frame Average number of samples per frame.
+ * @param ssrc		    The SSRC used in to identify the session.
+ */
+PJ_DECL(void) pjmedia_rtcp_init( pjmedia_rtcp_session *session, 
+				 char *name,
+				 unsigned clock_rate,
+				 unsigned samples_per_frame,
+				 pj_uint32_t ssrc );
+
+
+/**
+ * Utility function to retrieve current NTP timestamp.
+ *
+ * @param sess		    RTCP session.
+ * @param ntp		    NTP record.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DEF(pj_status_t) pjmedia_rtcp_get_ntp_time(const pjmedia_rtcp_session *sess,
+					      pjmedia_rtcp_ntp_rec *ntp);
+
+
+/**
+ * Deinitialize RTCP session.
+ *
+ * @param session   The session.
+ */
+PJ_DECL(void) pjmedia_rtcp_fini( pjmedia_rtcp_session *session);
+
+
+/**
+ * Call this function everytime an RTP packet is received to let the RTCP
+ * session do its internal calculations.
+ *
+ * @param session   The session.
+ * @param seq	    The RTP packet sequence number, in host byte order.
+ * @param ts	    The RTP packet timestamp, in host byte order.
+ * @param payload   Size of the payload.
+ */
+PJ_DECL(void) pjmedia_rtcp_rx_rtp( pjmedia_rtcp_session *session, 
+				   unsigned seq, 
+				   unsigned ts,
+				   unsigned payload);
+
+
+/**
+ * Call this function everytime an RTP packet is sent to let the RTCP session
+ * do its internal calculations.
+ *
+ * @param session   The session.
+ * @param ptsize    The payload size of the RTP packet (ie packet minus
+ *		    RTP header) in bytes.
+ */
+PJ_DECL(void) pjmedia_rtcp_tx_rtp( pjmedia_rtcp_session *session, 
+				   unsigned ptsize );
+
+
+/**
+ * Call this function when an RTCP packet is received from remote peer.
+ * This RTCP packet received from remote is used to calculate the end-to-
+ * end delay of the network.
+ *
+ * @param session   RTCP session.
+ * @param rtcp_pkt  The received RTCP packet.
+ * @param size	    Size of the incoming packet.
+ */
+PJ_DECL(void) pjmedia_rtcp_rx_rtcp( pjmedia_rtcp_session *session,
+				    const void *rtcp_pkt,
+				    pj_size_t size);
+
+
+/**
+ * Build a RTCP SR+RR packet to be transmitted to remote RTP peer.
+ * Note that this function will reset the interval counters (such as
+ * the ones to calculate fraction lost) in the session.
+ *
+ * @param session   The RTCP session.
+ * @param rtcp_pkt  Upon return, it will contain pointer to the 
+ *		    RTCP packet.
+ * @param len	    Upon return, it will indicate the size of 
+ *		    the RTCP packet.
+ */
+PJ_DECL(void) pjmedia_rtcp_build_rtcp( pjmedia_rtcp_session *session, 
+				       pjmedia_rtcp_pkt **rtcp_pkt, 
+				       int *len);
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJMEDIA_RTCP_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/rtp.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/rtp.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/rtp.h	(revision 1163)
@@ -0,0 +1,338 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_RTP_H__
+#define __PJMEDIA_RTP_H__
+
+
+/**
+ * @file rtp.h
+ * @brief RTP packet and RTP session declarations.
+ */
+#include <pjmedia/types.h>
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJMED_RTP RTP Session and Encapsulation (RFC 3550)
+ * @ingroup PJMEDIA_TRANSPORT
+ * @{
+ *
+ * The RTP module is designed to be dependent only to PJLIB, it does not depend
+ * on any other parts of PJMEDIA library. The RTP module does not even depend
+ * on any transports (sockets), to promote even more use, such as in DSP
+ * development (where transport may be handled by different processor).
+ *
+ * An RTCP implementation is available, in separate module. Please see 
+ * @ref PJMED_RTCP.
+ *
+ * The functions that are provided by this module:
+ *  - creating RTP header for each outgoing packet.
+ *  - decoding RTP packet into RTP header and payload.
+ *  - provide simple RTP session management (sequence number, etc.)
+ *
+ * The RTP module does not use any dynamic memory at all.
+ *
+ * \section P1 How to Use the RTP Module
+ * 
+ * First application must call #pjmedia_rtp_session_init() to initialize the RTP 
+ * session.
+ *
+ * When application wants to send RTP packet, it needs to call 
+ * #pjmedia_rtp_encode_rtp() to build the RTP header. Note that this WILL NOT build
+ * the complete RTP packet, but instead only the header. Application can
+ * then either concatenate the header with the payload, or send the two
+ * fragments (the header and the payload) using scatter-gather transport API
+ * (e.g. \a sendv()).
+ *
+ * When application receives an RTP packet, first it should call
+ * #pjmedia_rtp_decode_rtp to decode RTP header and payload, then it should call
+ * #pjmedia_rtp_session_update to check whether we can process the RTP payload,
+ * and to let the RTP session updates its internal status. The decode function
+ * is guaranteed to point the payload to the correct position regardless of
+ * any options present in the RTP packet.
+ *
+ */
+
+#ifdef _MSC_VER
+#   pragma warning(disable:4214)    // bit field types other than int
+#endif
+
+
+/**
+ * RTP packet header. Note that all RTP functions here will work with this
+ * header in network byte order.
+ */
+#pragma pack(1)
+struct pjmedia_rtp_hdr
+{
+#if defined(PJ_IS_BIG_ENDIAN) && (PJ_IS_BIG_ENDIAN!=0)
+    pj_uint16_t v:2;		/**< packet type/version	    */
+    pj_uint16_t p:1;		/**< padding flag		    */
+    pj_uint16_t x:1;		/**< extension flag		    */
+    pj_uint16_t cc:4;		/**< CSRC count			    */
+    pj_uint16_t m:1;		/**< marker bit			    */
+    pj_uint16_t pt:7;		/**< payload type		    */
+#else
+    pj_uint16_t cc:4;		/**< CSRC count			    */
+    pj_uint16_t x:1;		/**< header extension flag	    */ 
+    pj_uint16_t p:1;		/**< padding flag		    */
+    pj_uint16_t v:2;		/**< packet type/version	    */
+    pj_uint16_t pt:7;		/**< payload type		    */
+    pj_uint16_t m:1;		/**< marker bit			    */
+#endif
+    pj_uint16_t seq;		/**< sequence number		    */
+    pj_uint32_t ts;		/**< timestamp			    */
+    pj_uint32_t ssrc;		/**< synchronization source	    */
+};
+#pragma pack()
+
+/**
+ * @see pjmedia_rtp_hdr
+ */
+typedef struct pjmedia_rtp_hdr pjmedia_rtp_hdr;
+
+
+/**
+ * RTP extendsion header.
+ */
+struct pjmedia_rtp_ext_hdr
+{
+    pj_uint16_t	profile_data;	/**< Profile data.	    */
+    pj_uint16_t	length;		/**< Length.		    */
+};
+
+/**
+ * @see pjmedia_rtp_ext_hdr
+ */
+typedef struct pjmedia_rtp_ext_hdr pjmedia_rtp_ext_hdr;
+
+
+#pragma pack(1)
+
+/**
+ * Declaration for DTMF telephony-events (RFC2833).
+ */
+struct pjmedia_rtp_dtmf_event
+{
+    pj_uint8_t	event;	    /**< Event type ID.	    */
+    pj_uint8_t	e_vol;	    /**< Event volume.	    */
+    pj_uint16_t	duration;   /**< Event duration.    */
+};
+
+/**
+ * @see pjmedia_rtp_dtmf_event
+ */
+typedef struct pjmedia_rtp_dtmf_event pjmedia_rtp_dtmf_event;
+
+#pragma pack()
+
+
+/**
+ * A generic sequence number management, used by both RTP and RTCP.
+ */
+struct pjmedia_rtp_seq_session
+{
+    pj_uint16_t	    max_seq;	    /**< Highest sequence number heard	    */
+    pj_uint32_t	    cycles;	    /**< Shifted count of seq number cycles */
+    pj_uint32_t	    base_seq;	    /**< Base seq number		    */
+    pj_uint32_t	    bad_seq;        /**< Last 'bad' seq number + 1	    */
+    pj_uint32_t	    probation;      /**< Sequ. packets till source is valid */
+};
+
+/**
+ * @see pjmedia_rtp_seq_session
+ */
+typedef struct pjmedia_rtp_seq_session pjmedia_rtp_seq_session;
+
+
+/**
+ * RTP session descriptor.
+ */
+struct pjmedia_rtp_session
+{
+    pjmedia_rtp_hdr	    out_hdr;    /**< Saved hdr for outgoing pkts.   */
+    pjmedia_rtp_seq_session seq_ctrl;   /**< Sequence number management.    */
+    pj_uint16_t		    out_pt;	/**< Default outgoing payload type. */
+    pj_uint32_t		    out_extseq; /**< Outgoing extended seq #.	    */
+    pj_uint32_t		    peer_ssrc;  /**< Peer SSRC.			    */
+    pj_uint32_t		    received;   /**< Number of received packets.    */
+};
+
+/**
+ * @see pjmedia_rtp_session
+ */
+typedef struct pjmedia_rtp_session pjmedia_rtp_session;
+
+
+/**
+ * This structure is used to receive additional information about the
+ * state of incoming RTP packet.
+ */
+struct pjmedia_rtp_status
+{
+    union {
+	struct flag {
+	    int	bad:1;	    /**< General flag to indicate that sequence is
+				 bad, and application should not process
+				 this packet. More information will be given
+				 in other flags.			    */
+	    int badpt:1;    /**< Bad payload type.			    */
+	    int badssrc:1;  /**< Bad SSRC				    */
+	    int	dup:1;	    /**< Indicates duplicate packet		    */
+	    int	outorder:1; /**< Indicates out of order packet		    */
+	    int	probation:1;/**< Indicates that session is in probation
+				 until more packets are received.	    */
+	    int	restart:1;  /**< Indicates that sequence number has made
+				 a large jump, and internal base sequence
+				 number has been adjusted.		    */
+	} flag;		    /**< Status flags.				    */
+
+	pj_uint16_t value;  /**< Status value, to conveniently address all
+				 flags.					    */
+
+    } status;		    /**< Status information union.		    */
+
+    pj_uint16_t	diff;	    /**< Sequence number difference from previous
+				 packet. Normally the value should be 1.    
+				 Value greater than one may indicate packet
+				 loss. If packet with lower sequence is
+				 received, the value will be set to zero.
+				 If base sequence has been restarted, the
+				 value will be one.			    */
+};
+
+/**
+ * @see pjmedia_rtp_status
+ */
+typedef struct pjmedia_rtp_status pjmedia_rtp_status;
+
+
+/**
+ * This function will initialize the RTP session according to given parameters.
+ *
+ * @param ses		The session.
+ * @param default_pt	Default payload type.
+ * @param sender_ssrc	SSRC used for outgoing packets, in host byte order.
+ *
+ * @return		PJ_SUCCESS if successfull.
+ */
+PJ_DECL(pj_status_t) pjmedia_rtp_session_init( pjmedia_rtp_session *ses,
+					       int default_pt, 
+					       pj_uint32_t sender_ssrc );
+
+/**
+ * Create the RTP header based on arguments and current state of the RTP
+ * session.
+ *
+ * @param ses		The session.
+ * @param pt		Payload type.
+ * @param m		Marker flag.
+ * @param payload_len	Payload length in bytes.
+ * @param ts_len	Timestamp length.
+ * @param rtphdr	Upon return will point to RTP packet header.
+ * @param hdrlen	Upon return will indicate the size of RTP packet header
+ *
+ * @return		PJ_SUCCESS if successfull.
+ */
+PJ_DECL(pj_status_t) pjmedia_rtp_encode_rtp( pjmedia_rtp_session *ses, 
+					     int pt, int m,
+					     int payload_len, int ts_len,
+					     const void **rtphdr, 
+					     int *hdrlen );
+
+/**
+ * This function decodes incoming packet into RTP header and payload.
+ * The decode function is guaranteed to point the payload to the correct 
+ * position regardless of any options present in the RTP packet.
+ *
+ * Note that this function does not modify the returned RTP header to
+ * host byte order.
+ *
+ * @param ses		The session.
+ * @param pkt		The received RTP packet.
+ * @param pkt_len	The length of the packet.
+ * @param hdr		Upon return will point to the location of the RTP 
+ *			header inside the packet. Note that the RTP header
+ *			will be given back as is, meaning that the fields
+ *			will be in network byte order.
+ * @param payload	Upon return will point to the location of the
+ *			payload inside the packet.
+ * @param payloadlen	Upon return will indicate the size of the payload.
+ *
+ * @return		PJ_SUCCESS if successfull.
+ */
+PJ_DECL(pj_status_t) pjmedia_rtp_decode_rtp( pjmedia_rtp_session *ses, 
+					     const void *pkt, int pkt_len,
+					     const pjmedia_rtp_hdr **hdr,
+					     const void **payload,
+					     unsigned *payloadlen);
+
+/**
+ * Call this function everytime an RTP packet is received to check whether 
+ * the packet can be received and to let the RTP session performs its internal
+ * calculations.
+ *
+ * @param ses	    The session.
+ * @param hdr	    The RTP header of the incoming packet. The header must
+ *		    be given with fields in network byte order.
+ * @param seq_st    Optional structure to receive the status of the RTP packet
+ *		    processing.
+ */
+PJ_DECL(void) pjmedia_rtp_session_update( pjmedia_rtp_session *ses, 
+					  const pjmedia_rtp_hdr *hdr,
+					  pjmedia_rtp_status *seq_st);
+
+
+/*
+ * INTERNAL:
+ */
+
+/** 
+ * Internal function for creating sequence number control, shared by RTCP 
+ * implementation. 
+ *
+ * @param seq_ctrl  The sequence control instance.
+ * @param seq	    Sequence number to initialize.
+ */
+void pjmedia_rtp_seq_init(pjmedia_rtp_seq_session *seq_ctrl, 
+			  pj_uint16_t seq);
+
+
+/** 
+ * Internal function update sequence control, shared by RTCP implementation.
+ *
+ * @param seq_ctrl	The sequence control instance.
+ * @param seq		Sequence number to update.
+ * @param seq_status	Optional structure to receive additional information 
+ *			about the packet.
+ */
+void pjmedia_rtp_seq_update( pjmedia_rtp_seq_session *seq_ctrl, 
+			     pj_uint16_t seq,
+			     pjmedia_rtp_status *seq_status);
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJMEDIA_RTP_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/sdp.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/sdp.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/sdp.h	(revision 1163)
@@ -0,0 +1,625 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_SDP_H__
+#define __PJMEDIA_SDP_H__
+
+/**
+ * @file sdp.h
+ * @brief SDP header file.
+ */
+#include <pjmedia/types.h>
+
+
+/**
+ * @defgroup PJMEDIA_SDP SDP Parsing and Data Structure
+ * @ingroup PJMEDIA_SESSION
+ * @{
+ *
+ * The basic SDP session descriptor and elements are described in header
+ * file <b><pjmedia/sdp.h></b>. This file contains declaration for
+ * SDP session descriptor and SDP media descriptor, along with their
+ * attributes. This file also declares functions to parse SDP message.
+ */
+
+
+PJ_BEGIN_DECL
+
+/**
+ * The PJMEDIA_MAX_SDP_FMT macro defines maximum format in a media line.
+ */
+#ifndef PJMEDIA_MAX_SDP_FMT
+#   define PJMEDIA_MAX_SDP_FMT		32
+#endif
+
+/**
+ * The PJMEDIA_MAX_SDP_ATTR macro defines maximum SDP attributes in media and
+ * session descriptor.
+ */
+#ifndef PJMEDIA_MAX_SDP_ATTR
+#   define PJMEDIA_MAX_SDP_ATTR		(PJMEDIA_MAX_SDP_FMT*2 + 4)
+#endif
+
+/**
+ * The PJMEDIA_MAX_SDP_MEDIA macro defines maximum SDP media lines in a
+ * SDP session descriptor.
+ */
+#ifndef PJMEDIA_MAX_SDP_MEDIA
+#   define PJMEDIA_MAX_SDP_MEDIA	16
+#endif
+
+
+/* **************************************************************************
+ * SDP ATTRIBUTES
+ ***************************************************************************
+ */
+
+/** 
+ * Generic representation of attribute.
+ */
+struct pjmedia_sdp_attr
+{
+    pj_str_t		name;	    /**< Attribute name.    */
+    pj_str_t		value;	    /**< Attribute value.   */
+};
+
+/**
+ * @see pjmedia_sdp_attr
+ */
+typedef struct pjmedia_sdp_attr pjmedia_sdp_attr;
+
+
+/**
+ * Create SDP attribute.
+ *
+ * @param pool		Pool to create the attribute.
+ * @param name		Attribute name.
+ * @param value		Optional attribute value.
+ *
+ * @return		The new SDP attribute.
+ */
+PJ_DECL(pjmedia_sdp_attr*) pjmedia_sdp_attr_create(pj_pool_t *pool,
+						   const char *name,
+						   const pj_str_t *value);
+
+/** 
+ * Clone attribute 
+ *
+ * @param pool		Pool to be used.
+ * @param attr		The attribute to clone.
+ *
+ * @return		New attribute as cloned from the attribute.
+ */
+PJ_DECL(pjmedia_sdp_attr*) pjmedia_sdp_attr_clone(pj_pool_t *pool, 
+						  const pjmedia_sdp_attr*attr);
+
+/** 
+ * Find the first attribute with the specified type.
+ *
+ * @param count		Number of attributes in the array.
+ * @param attr_array	Array of attributes.
+ * @param name		Attribute name to find.
+ * @param fmt		Optional string to indicate which payload format
+ *			to find for \a rtpmap and \a fmt attributes. For other
+ *			types of attributes, the value should be NULL.
+ *
+ * @return		The specified attribute, or NULL if it can't be found.
+ *
+ * @see pjmedia_sdp_attr_find2, pjmedia_sdp_media_find_attr, 
+ *	pjmedia_sdp_media_find_attr2
+ */
+PJ_DECL(pjmedia_sdp_attr*) 
+pjmedia_sdp_attr_find(unsigned count, 
+		      pjmedia_sdp_attr *const attr_array[],
+		      const pj_str_t *name, const pj_str_t *fmt);
+
+/** 
+ * Find the first attribute with the specified type.
+ *
+ * @param count		Number of attributes in the array.
+ * @param attr_array	Array of attributes.
+ * @param name		Attribute name to find.
+ * @param fmt		Optional string to indicate which payload format
+ *			to find for \a rtpmap and \a fmt attributes. For other
+ *			types of attributes, the value should be NULL.
+ *
+ * @return		The specified attribute, or NULL if it can't be found.
+ *
+ * @see pjmedia_sdp_attr_find, pjmedia_sdp_media_find_attr,
+ *	pjmedia_sdp_media_find_attr2
+ */
+PJ_DECL(pjmedia_sdp_attr*) 
+pjmedia_sdp_attr_find2(unsigned count, 
+		       pjmedia_sdp_attr *const attr_array[],
+		       const char *name, const pj_str_t *fmt);
+
+/**
+ * Add a new attribute to array of attributes.
+ *
+ * @param count		Number of attributes in the array.
+ * @param attr_array	Array of attributes.
+ * @param attr		The attribute to add.
+ *
+ * @return		PJ_SUCCESS or the error code.
+ *
+ * @see pjmedia_sdp_media_add_attr
+ */
+PJ_DECL(pj_status_t) pjmedia_sdp_attr_add(unsigned *count,
+					  pjmedia_sdp_attr *attr_array[],
+					  pjmedia_sdp_attr *attr);
+
+/**
+ * Remove all attributes with the specified name in array of attributes.
+ *
+ * @param count		Number of attributes in the array.
+ * @param attr_array	Array of attributes.
+ * @param name		Attribute name to find.
+ *
+ * @return		Number of attributes removed.
+ *
+ * @see pjmedia_sdp_media_remove_all_attr
+ */
+PJ_DECL(unsigned) pjmedia_sdp_attr_remove_all(unsigned *count,
+					      pjmedia_sdp_attr *attr_array[],
+					      const char *name);
+
+
+/**
+ * Remove the specified attribute from the attribute array.
+ *
+ * @param count		Number of attributes in the array.
+ * @param attr_array	Array of attributes.
+ * @param attr		The attribute instance to remove.
+ *
+ * @return		PJ_SUCCESS when attribute has been removed, or 
+ *			PJ_ENOTFOUND when the attribute can not be found.
+ *
+ * @see pjmedia_sdp_media_remove_attr
+ */
+PJ_DECL(pj_status_t) pjmedia_sdp_attr_remove(unsigned *count,
+					     pjmedia_sdp_attr *attr_array[],
+					     pjmedia_sdp_attr *attr);
+
+
+/**
+ * This structure declares SDP \a rtpmap attribute.
+ */
+struct pjmedia_sdp_rtpmap
+{
+    pj_str_t		pt;	    /**< Payload type.	    */
+    pj_str_t		enc_name;   /**< Encoding name.	    */
+    unsigned		clock_rate; /**< Clock rate.	    */
+    pj_str_t		param;	    /**< Parameter.	    */
+};
+
+/**
+ * @see pjmedia_sdp_rtpmap
+ */
+typedef struct pjmedia_sdp_rtpmap pjmedia_sdp_rtpmap;
+
+
+/**
+ * Convert generic attribute to SDP \a rtpmap. This function allocates
+ * a new attribute and call #pjmedia_sdp_attr_get_rtpmap().
+ *
+ * @param pool		Pool used to create the rtpmap attribute.
+ * @param attr		Generic attribute to be converted to rtpmap, which
+ *			name must be "rtpmap".
+ * @param p_rtpmap	Pointer to receive SDP rtpmap attribute.
+ *
+ * @return		PJ_SUCCESS if the attribute can be successfully
+ *			converted to \a rtpmap type.
+ *
+ * @see pjmedia_sdp_attr_get_rtpmap
+ */
+PJ_DECL(pj_status_t) pjmedia_sdp_attr_to_rtpmap(pj_pool_t *pool,
+						const pjmedia_sdp_attr *attr,
+						pjmedia_sdp_rtpmap **p_rtpmap);
+
+
+/**
+ * Get the rtpmap representation of the same SDP attribute.
+ *
+ * @param attr		Generic attribute to be converted to rtpmap, which
+ *			name must be "rtpmap".
+ * @param rtpmap	SDP \a rtpmap attribute to be initialized.
+ *
+ * @return		PJ_SUCCESS if the attribute can be successfully
+ *			converted to \a rtpmap attribute.
+ *
+ * @see pjmedia_sdp_attr_to_rtpmap
+ */
+PJ_DECL(pj_status_t) pjmedia_sdp_attr_get_rtpmap(const pjmedia_sdp_attr *attr,
+						 pjmedia_sdp_rtpmap *rtpmap);
+
+
+/**
+ * Convert \a rtpmap attribute to generic attribute.
+ *
+ * @param pool		Pool to be used.
+ * @param rtpmap	The \a rtpmap attribute.
+ * @param p_attr	Pointer to receive the generic SDP attribute.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_sdp_rtpmap_to_attr( pj_pool_t *pool,
+			    const pjmedia_sdp_rtpmap *rtpmap,
+			    pjmedia_sdp_attr **p_attr);
+
+
+/**
+ * This structure describes SDP \a fmtp attribute.
+ */
+struct pjmedia_sdp_fmtp
+{
+    pj_str_t		fmt;	    /**< Format type.		    */
+    pj_str_t		fmt_param;  /**< Format specific parameter. */
+};
+
+
+/**
+ * @see pjmedia_sdp_fmtp
+ */
+typedef struct pjmedia_sdp_fmtp pjmedia_sdp_fmtp;
+
+
+
+/**
+ * Get the fmtp representation of the same SDP attribute.
+ *
+ * @param attr		Generic attribute to be converted to fmtp, which
+ *			name must be "fmtp".
+ * @param fmtp		SDP fmtp attribute to be initialized.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_sdp_attr_get_fmtp(const pjmedia_sdp_attr *attr,
+					       pjmedia_sdp_fmtp *fmtp);
+
+
+/**
+ * This structure describes SDP \a rtcp attribute.
+ */
+typedef struct pjmedia_sdp_rtcp_attr
+{
+    unsigned	port;	    /**< RTCP port number.	    */
+    pj_str_t	net_type;   /**< Optional network type.	    */
+    pj_str_t	addr_type;  /**< Optional address type.	    */
+    pj_str_t	addr;	    /**< Optional address.	    */
+} pjmedia_sdp_rtcp_attr;
+
+
+/**
+ * Parse a generic SDP attribute to get SDP rtcp attribute values.
+ *
+ * @param attr		Generic attribute to be converted to rtcp, which
+ *			name must be "rtcp".
+ * @param rtcp		SDP rtcp attribute to be initialized.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_sdp_attr_get_rtcp(const pjmedia_sdp_attr *attr,
+					       pjmedia_sdp_rtcp_attr *rtcp);
+
+
+
+/* **************************************************************************
+ * SDP CONNECTION INFO
+ ****************************************************************************
+ */
+
+/**
+ * This structure describes SDP connection info ("c=" line). 
+ */
+struct pjmedia_sdp_conn
+{
+    pj_str_t	net_type;	/**< Network type ("IN").		*/
+    pj_str_t	addr_type;	/**< Address type ("IP4", "IP6").	*/
+    pj_str_t	addr;		/**< The address.			*/
+};
+
+
+/**
+ * @see pjmedia_sdp_conn
+ */
+typedef struct pjmedia_sdp_conn pjmedia_sdp_conn;
+
+
+/** 
+ * Clone connection info. 
+ * 
+ * @param pool	    Pool to allocate memory for the new connection info.
+ * @param rhs	    The connection into to clone.
+ *
+ * @return	    The new connection info.
+ */
+PJ_DECL(pjmedia_sdp_conn*) pjmedia_sdp_conn_clone(pj_pool_t *pool, 
+						  const pjmedia_sdp_conn *rhs);
+
+
+
+/* **************************************************************************
+ * SDP MEDIA INFO/LINE
+ ****************************************************************************
+ */
+
+/**
+ * This structure describes SDP media descriptor. A SDP media descriptor
+ * starts with "m=" line and contains the media attributes and optional
+ * connection line.
+ */
+struct pjmedia_sdp_media
+{
+    /** Media descriptor line ("m=" line) */
+    struct
+    {
+	pj_str_t    media;		/**< Media type ("audio", "video")  */
+	pj_uint16_t port;		/**< Port number.		    */
+	unsigned    port_count;		/**< Port count, used only when >2  */
+	pj_str_t    transport;		/**< Transport ("RTP/AVP")	    */
+	unsigned    fmt_count;		/**< Number of formats.		    */
+	pj_str_t    fmt[PJMEDIA_MAX_SDP_FMT];	/**< Media formats.	    */
+    } desc;
+
+    pjmedia_sdp_conn *conn;		/**< Optional connection info.	    */
+    unsigned	     attr_count;	/**< Number of attributes.	    */
+    pjmedia_sdp_attr*attr[PJMEDIA_MAX_SDP_ATTR];  /**< Attributes.	    */
+
+};
+
+
+/**
+ * @see pjmedia_sdp_media
+ */
+typedef struct pjmedia_sdp_media pjmedia_sdp_media;
+
+
+/** 
+ * Clone SDP media description. 
+ *
+ * @param pool	    Pool to allocate memory for the new media description.
+ * @param rhs	    The media descriptin to clone.
+ *
+ * @return	    New media description.
+ */
+PJ_DECL(pjmedia_sdp_media*) 
+pjmedia_sdp_media_clone( pj_pool_t *pool, 
+			 const pjmedia_sdp_media *rhs);
+
+/**
+ * Find the first occurence of the specified attribute name in the media 
+ * descriptor. Optionally the format may be specified.
+ *
+ * @param m		The SDP media description.
+ * @param name		Attribute name to find.
+ * @param fmt		Optional payload type to match in the
+ *			attribute list, when the attribute is \a rtpmap
+ *			or \a fmtp. For other types of SDP attributes, this
+ *			value should be NULL.
+ *
+ * @return		The first instance of the specified attribute or NULL.
+ */
+PJ_DECL(pjmedia_sdp_attr*) 
+pjmedia_sdp_media_find_attr(const pjmedia_sdp_media *m,
+			    const pj_str_t *name, const pj_str_t *fmt);
+
+
+/**
+ * Find the first occurence of the specified attribute name in the SDP media 
+ * descriptor. Optionally the format may be specified.
+ *
+ * @param m		The SDP media description.
+ * @param name		Attribute name to find.
+ * @param fmt		Optional payload type to match in the
+ *			attribute list, when the attribute is \a rtpmap
+ *			or \a fmtp. For other types of SDP attributes, this
+ *			value should be NULL.
+ *
+ * @return		The first instance of the specified attribute or NULL.
+ */
+PJ_DECL(pjmedia_sdp_attr*) 
+pjmedia_sdp_media_find_attr2(const pjmedia_sdp_media *m,
+			     const char *name, const pj_str_t *fmt);
+
+/**
+ * Add new attribute to the media descriptor.
+ *
+ * @param m		The SDP media description.
+ * @param attr		Attribute to add.
+ *
+ * @return		PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_sdp_media_add_attr(pjmedia_sdp_media *m,
+						pjmedia_sdp_attr *attr);
+
+/**
+ * Remove all attributes with the specified name from the SDP media
+ * descriptor.
+ *
+ * @param m		The SDP media description.
+ * @param name		Attribute name to remove.
+ *
+ * @return		The number of attributes removed.
+ */
+PJ_DECL(unsigned) 
+pjmedia_sdp_media_remove_all_attr(pjmedia_sdp_media *m,
+				  const char *name);
+
+
+/**
+ * Remove the occurence of the specified attribute from the SDP media
+ * descriptor.
+ *
+ * @param m		The SDP media descriptor.
+ * @param attr		The attribute to find and remove.
+ *
+ * @return		PJ_SUCCESS if the attribute can be found and has
+ *			been removed from the array.
+ */
+PJ_DECL(pj_status_t)
+pjmedia_sdp_media_remove_attr(pjmedia_sdp_media *m,
+			      pjmedia_sdp_attr *attr);
+
+
+/**
+ * Compare two SDP media for equality.
+ *
+ * @param sd1	    The first SDP media to compare.
+ * @param sd2	    The second SDP media to compare.
+ * @param option    Comparison option, which should be zero for now.
+ *
+ * @return	    PJ_SUCCESS when both SDP medias are equal, or the
+ *		    appropriate status code describing which part of
+ *		    the descriptors that are not equal.
+ */
+PJ_DECL(pj_status_t) pjmedia_sdp_media_cmp(const pjmedia_sdp_media *sd1,
+					   const pjmedia_sdp_media *sd2,
+					   unsigned option);
+
+
+
+/* **************************************************************************
+ * SDP SESSION DESCRIPTION
+ ****************************************************************************
+ */
+
+
+/**
+ * This structure describes SDP session description. A SDP session descriptor
+ * contains complete information about a session, and normally is exchanged
+ * with remote media peer using signaling protocol such as SIP.
+ */
+struct pjmedia_sdp_session
+{
+    /** Session origin (o= line) */
+    struct
+    {
+	pj_str_t    user;	    /**< User 				*/
+	pj_uint32_t id;		    /**< Session ID			*/
+	pj_uint32_t version;	    /**< Session version		*/
+	pj_str_t    net_type;	    /**< Network type ("IN")		*/
+	pj_str_t    addr_type;	    /**< Address type ("IP4", "IP6")	*/
+	pj_str_t    addr;	    /**< The address.			*/
+    } origin;
+
+    pj_str_t	     name;	    /**< Subject line (s=)		*/
+    pjmedia_sdp_conn *conn;	    /**< Connection line (c=)		*/
+    
+    /** Session time (t= line)	*/
+    struct
+    {
+	pj_uint32_t start;	    /**< Start time.			*/
+	pj_uint32_t stop;	    /**< Stop time.			*/
+    } time;
+
+    unsigned	       attr_count;		/**< Number of attributes.  */
+    pjmedia_sdp_attr  *attr[PJMEDIA_MAX_SDP_ATTR]; /**< Attributes array.   */
+
+    unsigned	       media_count;		/**< Number of media.	    */
+    pjmedia_sdp_media *media[PJMEDIA_MAX_SDP_MEDIA];	/**< Media array.   */
+
+};
+
+/**
+ * @see pjmedia_sdp_session
+ */
+typedef struct pjmedia_sdp_session pjmedia_sdp_session;
+
+
+
+/**
+ * Parse SDP message.
+ *
+ * @param pool	    The pool to allocate SDP session description.
+ * @param buf	    The message buffer.
+ * @param len	    The length of the message.
+ * @param p_sdp	    Pointer to receive the SDP session descriptor.
+ *
+ * @return	    PJ_SUCCESS if message was successfully parsed into
+ *		    SDP session descriptor.
+ */
+PJ_DECL(pj_status_t) pjmedia_sdp_parse( pj_pool_t *pool,
+				        char *buf, pj_size_t len, 
+					pjmedia_sdp_session **p_sdp );
+
+/**
+ * Print SDP description to a buffer.
+ *
+ * @param sdp	    The SDP session description.
+ * @param buf	    The buffer.
+ * @param size	    The buffer length.
+ *
+ * @return	    the length printed, or -1 if the buffer is too
+ *		    short.
+ */
+PJ_DECL(int) pjmedia_sdp_print( const pjmedia_sdp_session *sdp, 
+				char *buf, pj_size_t size);
+
+
+/**
+ * Perform semantic validation for the specified SDP session descriptor.
+ * This function perform validation beyond just syntactic verification,
+ * such as to verify the value of network type and address type, check
+ * the connection line, and verify that \a rtpmap attribute is present
+ * when dynamic payload type is used.
+ *
+ * @param sdp	    The SDP session descriptor to validate.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_sdp_validate(const pjmedia_sdp_session *sdp);
+
+
+/**
+ * Clone SDP session descriptor.
+ *
+ * @param pool	    The pool used to clone the session.
+ * @param sdp	    The SDP session to clone.
+ *
+ * @return	    New SDP session.
+ */
+PJ_DECL(pjmedia_sdp_session*) 
+pjmedia_sdp_session_clone( pj_pool_t *pool,
+			   const pjmedia_sdp_session *sdp);
+
+
+/**
+ * Compare two SDP session for equality.
+ *
+ * @param sd1	    The first SDP session to compare.
+ * @param sd2	    The second SDP session to compare.
+ * @param option    Must be zero for now.
+ *
+ * @return	    PJ_SUCCESS when both SDPs are equal, or otherwise
+ *		    the status code indicates which part of the session
+ *		    descriptors are not equal.
+ */
+PJ_DECL(pj_status_t) pjmedia_sdp_session_cmp(const pjmedia_sdp_session *sd1,
+					     const pjmedia_sdp_session *sd2,
+					     unsigned option);
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* __PJMEDIA_SDP_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/sdp_neg.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/sdp_neg.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/sdp_neg.h	(revision 1163)
@@ -0,0 +1,638 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_SDP_NEG_H__
+#define __PJMEDIA_SDP_NEG_H__
+
+
+/**
+ * @file sdp_neg.h
+ * @brief SDP negotiator header file.
+ */
+/**
+ * @defgroup PJMEDIA_SDP_NEG SDP Negotiation State Machine (Offer/Answer Model, RFC 3264)
+ * @ingroup PJMEDIA_SESSION
+ * @brief SDP Negotiation State Machine (Offer/Answer Model, RFC 3264)
+ * @{
+ *
+ * The header file <b><pjmedia/sdp_neg.h></b> contains the declaration
+ * of SDP offer and answer negotiator. SDP offer and answer model is described
+ * in RFC 3264 <b>"An Offer/Answer Model with Session Description Protocol 
+ * (SDP)"</b>.
+ *
+ * The SDP negotiator is represented with opaque type \a pjmedia_sdp_neg.
+ * This structure contains negotiation state and several SDP session 
+ * descriptors currently being used in the negotiation.
+ *
+ *
+ * \section sdpneg_state_dia SDP Negotiator State Diagram
+ *
+ * The following diagram describes the state transition diagram of the
+ * SDP negotiator.
+ * 
+ * <pre>
+ *                                              
+ *                                              modify_local_offer()
+ *     create_w_local_offer()  +-------------+  send_local_offer()
+ *     ----------------------->| LOCAL_OFFER |<-----------------------
+ *    |                        +-------------+                        |
+ *    |                               |                               |
+ *    |           set_remote_answer() |                               |
+ *    |                               V                               |
+ * +--+---+                     +-----------+     negotiate()     +------+
+ * | NULL |                     | WAIT_NEGO |-------------------->| DONE |
+ * +------+                     +-----------+                     +------+
+ *    |                               A                               |
+ *    |            set_local_answer() |                               |
+ *    |                               |                               |
+ *    |                        +--------------+   set_remote_offer()  |
+ *     ----------------------->| REMOTE_OFFER |<----------------------
+ *     create_w_remote_offer() +--------------+
+ *
+ * </pre>
+ *
+ *
+ *
+ * \section sdpneg_offer_answer SDP Offer/Answer Model with Negotiator
+ *
+ * \subsection sdpneg_create_offer Creating Initial Offer
+ *
+ * Application creates an offer by manualy building the SDP session descriptor
+ * (pjmedia_sdp_session), or request PJMEDIA endpoint (pjmedia_endpt) to 
+ * create SDP session descriptor based on capabilities that present in the
+ * endpoint by calling #pjmedia_endpt_create_sdp().
+ *
+ * Application then creates SDP negotiator instance by calling
+ * #pjmedia_sdp_neg_create_w_local_offer(), passing the SDP offer in the
+ * function arguments. The SDP negotiator keeps a copy of current local offer,
+ * and update its state to PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER.
+ *
+ * Application can then send the initial SDP offer that it creates to
+ * remote peer using signaling protocol such as SIP.
+ *
+ *
+ * \subsection sdpneg_subseq_offer Generating Subsequent Offer
+ *
+ * The negotiator can only create subsequent offer after it has finished
+ * the negotiation process of previous offer/answer session (i.e. the
+ * negotiator state is PJMEDIA_SDP_NEG_STATE_DONE).
+ *
+ * If any previous negotiation process was successfull (i.e. the return 
+ * value of #pjmedia_sdp_neg_negotiate() was PJ_SUCCESS), the negotiator
+ * keeps both active local and active remote SDP.
+ *
+ * If application does not want send modified offer, it can just send
+ * the active local SDP as the offer. In this case, application calls
+ * #pjmedia_sdp_neg_send_local_offer() to get the active local SDP.
+ * 
+ * If application wants to modify it's local offer, it MUST inform 
+ * the negotiator about the modified SDP by calling 
+ * #pjmedia_sdp_neg_modify_local_offer().
+ *
+ * In both cases, the negotiator will internally create a copy of the offer,
+ * and move it's state to PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER, where it
+ * waits until application passes the remote answer.
+ *
+ *
+ * \subsection sdpneg_receive_offer Receiving Initial Offer
+ *
+ * Application receives an offer in the incoming request from remote to
+ * establish multimedia session, such as incoming INVITE message with SDP
+ * body. 
+ *
+ * Initially, when the initial offer is received, application creates the 
+ * SDP negotiator by calling #pjmedia_sdp_neg_create_w_remote_offer(),
+ * specifying the remote SDP offer in one of the argument. 
+ *
+ * At this stage, application may or may not ready to create an answer.
+ * For example, a SIP B2BUA needs to make outgoing call and receive SDP
+ * from the outgoing call leg in order to create a SDP answer to the
+ * incoming call leg.
+ *
+ * If application is not ready to create an answer, it passes NULL as
+ * the local SDP when it calls #pjmedia_sdp_neg_create_w_remote_offer().
+ *
+ * The section @ref sdpneg_create_answer describes the case when 
+ * application is ready to create a SDP answer.
+ *
+ *
+ * \subsection sdpneg_subseq_offer Receiving Subsequent Offer
+ *
+ * Application passes subsequent SDP offer received from remote by
+ * calling #pjmedia_sdp_neg_set_remote_offer().
+ *
+ * The negotiator can only receive subsequent offer after it has finished
+ * the negotiation process of previous offer/answer session (i.e. the
+ * negotiator state is PJMEDIA_SDP_NEG_STATE_DONE).
+ *
+ *
+ * \subsection sdpneg_recv_answer Receiving SDP Answer
+ *
+ * When application receives SDP answer from remote, it informs the
+ * negotiator by calling #pjmedia_sdp_neg_set_remote_answer(). The
+ * negotiator validates the answer (#pjmedia_sdp_validate()), and if
+ * succeeds, it moves it's state to PJMEDIA_SDP_NEG_STATE_WAIT_NEGO.
+ *
+ * Application then instruct the negotiator to negotiate the remote
+ * answer by calling #pjmedia_sdp_neg_negotiate(). The purpose of
+ * this negotiation is to verify remote answer, and update the initial
+ * offer according to the answer. For example, the initial offer may
+ * specify that a stream is \a sendrecv, while the answer specifies
+ * that remote stream is \a inactive. In this case, the negotiator
+ * will update the stream in the local active media as \a inactive
+ * too.
+ *
+ * If #pjmedia_sdp_neg_negotiate() returns PJ_SUCCESS, the negotiator will
+ * keep the updated local answer and remote answer internally. These two 
+ * SDPs are called active local SDP and active remote SDP, as it describes 
+ * currently active session.
+ *
+ * Application can retrieve the active local SDP by calling
+ * #pjmedia_sdp_neg_get_active_local(), and active remote SDP by calling
+ * #pjmedia_sdp_neg_get_active_remote().
+ *
+ * If #pjmedia_sdp_neg_negotiate() returns failure (i.e. not PJ_SUCCESS),
+ * it WILL NOT update its active local and active remote SDP.
+ *
+ * Regardless of the return status of the #pjmedia_sdp_neg_negotiate(), 
+ * the negotiator state will move to PJMEDIA_SDP_NEG_STATE_DONE.
+ * 
+ *
+ * \subsection sdpneg_create_answer Generating SDP Answer
+ *
+ * After remote offer has been set in the negotiator, application can 
+ * request the SDP negotiator to generate appropriate answer based on local 
+ * capability.
+ *
+ * To do this, first the application MUST have an SDP describing its local
+ * capabilities. This SDP can be built manually, or application can generate
+ * SDP to describe local media endpoint capability by calling 
+ * #pjmedia_endpt_create_sdp(). When the application is a SIP B2BUA, 
+ * application can treat the SDP received from the outgoing call leg as if
+ * it was it's local capability.
+ * 
+ * The local SDP session descriptor DOES NOT have to match the SDP offer.
+ * For example, it can have more or less media lines than the offer, or
+ * their order may be different than the offer. The negotiator is capable
+ * to match and reorder local SDP according to remote offer, and create
+ * an answer that is suitable for the offer.
+ *
+ * After local SDP capability has been acquired, application can create
+ * a SDP answer.
+ *
+ * If application does not already have the negotiator instance, it creates
+ * one by calling #pjmedia_sdp_neg_create_w_remote_offer(), specifying 
+ * both remote SDP offer and local SDP as the arguments. The SDP negotiator
+ * validates both remote and local SDP by calling #pjmedia_sdp_validate(),
+ * and if both SDPs are valid, the negotiator state will move to
+ * PJMEDIA_SDP_NEG_STATE_WAIT_NEGO where it is ready to negotiate the
+ * offer and answer.
+ *
+ * If application already has the negotiator instance, it sets the local
+ * SDP in the negotiator by calling #pjmedia_sdp_neg_set_local_answer().
+ * The SDP negotiator then validates local SDP (#pjmedia_sdp_validate() ),
+ * and if it is  valid, the negotiator state will move to
+ * PJMEDIA_SDP_NEG_STATE_WAIT_NEGO where it is ready to negotiate the
+ * offer and answer.
+ *
+ * After the SDP negotiator state has moved to PJMEDIA_SDP_NEG_STATE_WAIT_NEGO,
+ * application calls #pjmedia_sdp_neg_negotiate() to instruct the SDP
+ * negotiator to negotiate both offer and answer. This function returns
+ * PJ_SUCCESS if an answer can be generated AND at least one media stream
+ * is active in the session.
+ *
+ * If #pjmedia_sdp_neg_negotiate() returns PJ_SUCCESS, the negotiator will
+ * keep the remote offer and local answer internally. These two SDPs are
+ * called active local SDP and active remote SDP, as it describes currently
+ * active session.
+ *
+ * Application can retrieve the active local SDP by calling
+ * #pjmedia_sdp_neg_get_active_local(), and send this SDP to remote as the
+ * SDP answer.
+ *
+ * If #pjmedia_sdp_neg_negotiate() returns failure (i.e. not PJ_SUCCESS),
+ * it WILL NOT update its active local and active remote SDP.
+ *
+ * Regardless of the return status of the #pjmedia_sdp_neg_negotiate(), 
+ * the negotiator state will move to PJMEDIA_SDP_NEG_STATE_DONE.
+ *
+ *
+ */
+
+#include <pjmedia/sdp.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * This enumeration describes SDP negotiation state. 
+ */
+enum pjmedia_sdp_neg_state
+{
+    /** 
+     * This is the state of SDP negoator before it is initialized. 
+     */
+    PJMEDIA_SDP_NEG_STATE_NULL,
+
+    /** 
+     * This state occurs when SDP negotiator has sent our offer to remote and
+     * it is waiting for answer. 
+     */
+    PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER,
+
+    /** 
+     * This state occurs when SDP negotiator has received offer from remote
+     * and currently waiting for local answer.
+     */
+    PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER,
+
+    /**
+     * This state occurs when an offer (either local or remote) has been 
+     * provided with answer. The SDP negotiator is ready to negotiate both
+     * session descriptors. Application can call #pjmedia_sdp_neg_negotiate()
+     * immediately to begin negotiation process.
+     */
+    PJMEDIA_SDP_NEG_STATE_WAIT_NEGO,
+
+    /**
+     * This state occurs when SDP negotiation has completed, either 
+     * successfully or not.
+     */
+    PJMEDIA_SDP_NEG_STATE_DONE
+};
+
+
+/**
+ * @see pjmedia_sdp_neg_state
+ */
+typedef enum pjmedia_sdp_neg_state pjmedia_sdp_neg_state;
+
+
+/**
+ * Opaque declaration of SDP negotiator.
+ */
+typedef struct pjmedia_sdp_neg pjmedia_sdp_neg;
+
+
+/**
+ * Get the state string description of the specified state.
+ *
+ * @param state		Negotiator state.
+ *
+ * @return		String description of the state.
+ */
+PJ_DECL(const char*) pjmedia_sdp_neg_state_str(pjmedia_sdp_neg_state state);
+
+
+/**
+ * Create the SDP negotiator with local offer. The SDP negotiator then
+ * will move to PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER state, where it waits
+ * until it receives answer from remote. When SDP answer from remote is
+ * received, application must call #pjmedia_sdp_neg_set_remote_answer().
+ *
+ * After calling this function, application should send the local SDP offer
+ * to remote party using signaling protocol such as SIP and wait for SDP 
+ * answer.
+ *
+ * @param pool		Pool to allocate memory. The pool's lifetime needs
+ *			to be valid for the duration of the negotiator.
+ * @param local		The initial local capability.
+ * @param p_neg		Pointer to receive the negotiator instance.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error
+ *			code.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_sdp_neg_create_w_local_offer( pj_pool_t *pool,
+				      const pjmedia_sdp_session *local,
+				      pjmedia_sdp_neg **p_neg);
+
+/**
+ * Initialize the SDP negotiator with remote offer, and optionally
+ * specify the initial local capability, if known. Application normally 
+ * calls this function when it receives initial offer from remote. 
+ *
+ * If local media capability is specified, this capability will be set as
+ * initial local capability of the negotiator, and after this function is
+ * called, the SDP negotiator state will move to state
+ * PJMEDIA_SDP_NEG_STATE_WAIT_NEGO, and the negotiation function can be 
+ * called. 
+ *
+ * If local SDP is not specified, the negotiator will not have initial local
+ * capability, and after this function is called the negotiator state will 
+ * move to PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER state. Application MUST supply
+ * local answer later with #pjmedia_sdp_neg_set_local_answer(), before
+ * calling the negotiation function.
+ *
+ * @param pool		Pool to allocate memory. The pool's lifetime needs
+ *			to be valid for the duration of the negotiator.
+ * @param initial	Optional initial local capability.
+ * @param remote	The remote offer.
+ * @param p_neg		Pointer to receive the negotiator instance.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error
+ *			code.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_sdp_neg_create_w_remote_offer(pj_pool_t *pool,
+				      const pjmedia_sdp_session *initial,
+				      const pjmedia_sdp_session *remote,
+				      pjmedia_sdp_neg **p_neg);
+
+/**
+ * This specifies the behavior of the SDP negotiator when responding to an
+ * offer, whether it should rather use the codec preference as set by
+ * remote, or should it rather use the codec preference as specified by
+ * local endpoint.
+ *
+ * For example, suppose incoming call has codec order "8 0 3", while 
+ * local codec order is "3 0 8". If remote codec order is preferable,
+ * the selected codec will be 8, while if local codec order is preferable,
+ * the selected codec will be 3.
+ *
+ * By default, the value in PJMEDIA_SDP_NEG_PREFER_REMOTE_CODEC_ORDER will
+ * be used.
+ *
+ * @param neg		The SDP negotiator instance.
+ * @param prefer_remote	If non-zero, the negotiator will use the codec
+ *			order as specified in remote offer. If zero, it
+ *			will prefer to use the local codec order.
+ */
+PJ_DECL(pj_status_t)
+pjmedia_sdp_neg_set_prefer_remote_codec_order(pjmedia_sdp_neg *neg,
+					      pj_bool_t prefer_remote);
+
+
+/**
+ * Get SDP negotiator state.
+ *
+ * @param neg		The SDP negotiator instance.
+ *
+ * @return		The negotiator state.
+ */
+PJ_DECL(pjmedia_sdp_neg_state)
+pjmedia_sdp_neg_get_state( pjmedia_sdp_neg *neg );
+
+/**
+ * Get the currently active local SDP. Application can only call this
+ * function after negotiation has been done, or otherwise there won't be
+ * active SDPs. Calling this function will not change the state of the 
+ * negotiator.
+ *
+ * @param neg		The SDP negotiator instance.
+ * @param local		Pointer to receive the local active SDP.
+ *
+ * @return		PJ_SUCCESS if local active SDP is present.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_sdp_neg_get_active_local( pjmedia_sdp_neg *neg,
+				  const pjmedia_sdp_session **local);
+
+/**
+ * Get the currently active remote SDP. Application can only call this
+ * function after negotiation has been done, or otherwise there won't be
+ * active SDPs. Calling this function will not change the state of the 
+ * negotiator.
+ *
+ * @param neg		The SDP negotiator instance.
+ * @param remote	Pointer to receive the remote active SDP.
+ *
+ * @return		PJ_SUCCESS if remote active SDP is present.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_sdp_neg_get_active_remote( pjmedia_sdp_neg *neg,
+				   const pjmedia_sdp_session **remote);
+
+
+/**
+ * Determine whether remote sent answer (as opposed to offer) on the
+ * last negotiation. This function can only be called in state
+ * PJMEDIA_SDP_NEG_STATE_DONE.
+ *
+ * @param neg		The SDP negotiator instance.
+ *
+ * @return		Non-zero if it was remote who sent answer,
+ *			otherwise zero if it was local who supplied
+ *			answer.
+ */
+PJ_DECL(pj_bool_t)
+pjmedia_sdp_neg_was_answer_remote(pjmedia_sdp_neg *neg);
+
+
+/**
+ * Get the current remote SDP offer or answer. Application can only 
+ * call this function in state PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER or
+ * PJMEDIA_SDP_NEG_STATE_WAIT_NEGO, or otherwise there won't be remote 
+ * SDP offer/answer. Calling this  function will not change the state 
+ * of the negotiator.
+ *
+ * @param neg		The SDP negotiator instance.
+ * @param remote	Pointer to receive the current remote offer or
+ *			answer.
+ *
+ * @return		PJ_SUCCESS if the negotiator currently has
+ *			remote offer or answer.
+ */
+PJ_DECL(pj_status_t)
+pjmedia_sdp_neg_get_neg_remote( pjmedia_sdp_neg *neg,
+				const pjmedia_sdp_session **remote);
+
+
+/**
+ * Get the current local SDP offer or answer. Application can only 
+ * call this function in state PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER or
+ * PJMEDIA_SDP_NEG_STATE_WAIT_NEGO, or otherwise there won't be local 
+ * SDP offer/answer. Calling this function will not change the state 
+ * of the negotiator.
+ *
+ * @param neg		The SDP negotiator instance.
+ * @param local		Pointer to receive the current local offer or
+ *			answer.
+ *
+ * @return		PJ_SUCCESS if the negotiator currently has
+ *			local offer or answer.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_sdp_neg_get_neg_local( pjmedia_sdp_neg *neg,
+			       const pjmedia_sdp_session **local);
+
+/**
+ * Modify local session with a new SDP and treat this as a new offer. 
+ * This function can only be called in state PJMEDIA_SDP_NEG_STATE_DONE.
+ * After calling this function, application can send the SDP as offer 
+ * to remote party, using signaling protocol such as SIP.
+ * The negotiator state will move to PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER,
+ * where it waits for SDP answer from remote.
+ *
+ * @param pool		Pool to allocate memory. The pool's lifetime needs
+ *			to be valid for the duration of the negotiator.
+ * @param neg		The SDP negotiator instance.
+ * @param local		The new local SDP.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate
+ *			error code.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_sdp_neg_modify_local_offer( pj_pool_t *pool,
+				    pjmedia_sdp_neg *neg,
+				    const pjmedia_sdp_session *local);
+
+/**
+ * This function can only be called in PJMEDIA_SDP_NEG_STATE_DONE state.
+ * Application calls this function to retrieve currently active
+ * local SDP, and then send the SDP to remote as an offer. The negotiator
+ * state will then move to PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER, where it waits
+ * for SDP answer from remote. 
+ *
+ * When SDP answer has been received from remote, application must call 
+ * #pjmedia_sdp_neg_set_remote_answer().
+ *
+ * @param pool		Pool to allocate memory. The pool's lifetime needs
+ *			to be valid for the duration of the negotiator.
+ * @param neg		The SDP negotiator instance.
+ * @param offer		Pointer to receive active local SDP to be
+ *			offered to remote.
+ *
+ * @return		PJ_SUCCESS if local offer can be created.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_sdp_neg_send_local_offer( pj_pool_t *pool,
+			          pjmedia_sdp_neg *neg,
+				  const pjmedia_sdp_session **offer);
+
+/**
+ * This function can only be called in PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER
+ * state, i.e. after application calls #pjmedia_sdp_neg_send_local_offer()
+ * function. Application calls this function when it receives SDP answer
+ * from remote. After this function is called, the negotiator state will
+ * move to PJMEDIA_SDP_NEG_STATE_WAIT_NEGO, and application can call the
+ * negotiation function #pjmedia_sdp_neg_negotiate().
+ *
+ * @param pool		Pool to allocate memory. The pool's lifetime needs
+ *			to be valid for the duration of the negotiator.
+ * @param neg		The SDP negotiator instance.
+ * @param remote	The remote answer.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_sdp_neg_set_remote_answer( pj_pool_t *pool,
+				   pjmedia_sdp_neg *neg,
+				   const pjmedia_sdp_session *remote);
+
+
+
+/**
+ * This function can only be called in PJMEDIA_SDP_NEG_STATE_DONE state. 
+ * Application calls this function when it receives SDP offer from remote.
+ * After this function is called, the negotiator state will move to 
+ * PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER, and application MUST call the
+ * #pjmedia_sdp_neg_set_local_answer() to set local answer before it can
+ * call the negotiation function.
+ *
+ * @param pool		Pool to allocate memory. The pool's lifetime needs
+ *			to be valid for the duration of the negotiator.
+ * @param neg		The SDP negotiator instance.
+ * @param remote	The remote offer.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_sdp_neg_set_remote_offer( pj_pool_t *pool,
+				  pjmedia_sdp_neg *neg,
+				  const pjmedia_sdp_session *remote);
+
+
+
+/**
+ * This function can only be called in PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER
+ * state, i.e. after application calls #pjmedia_sdp_neg_set_remote_offer()
+ * function. After this function is called, the negotiator state will
+ * move to PJMEDIA_SDP_NEG_STATE_WAIT_NEGO, and application can call the
+ * negotiation function #pjmedia_sdp_neg_negotiate().
+ *
+ * @param pool		Pool to allocate memory. The pool's lifetime needs
+ *			to be valid for the duration of the negotiator.
+ * @param neg		The SDP negotiator instance.
+ * @param local		Optional local answer. If negotiator has initial
+ *			local capability, application can specify NULL on
+ *			this argument; in this case, the negotiator will
+ *			create answer by by negotiating remote offer with
+ *			initial local capability. If negotiator doesn't have
+ *			initial local capability, application MUST specify
+ *			local answer here.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_sdp_neg_set_local_answer( pj_pool_t *pool,
+				  pjmedia_sdp_neg *neg,
+				  const pjmedia_sdp_session *local);
+
+
+/**
+ * Call this function when the negotiator is in PJMEDIA_SDP_NEG_STATE_WAIT_NEGO
+ * state to see if it was local who is answering the offer (instead of
+ * remote).
+ *
+ * @param neg		The negotiator.
+ *
+ * @return		PJ_TRUE if it is local is answering an offer, PJ_FALSE
+ *			if remote has answered local offer.
+ */
+PJ_DECL(pj_bool_t) pjmedia_sdp_neg_has_local_answer(pjmedia_sdp_neg *neg);
+
+
+/**
+ * Negotiate local and remote answer. Before calling this function, the
+ * SDP negotiator must be in PJMEDIA_SDP_NEG_STATE_WAIT_NEGO state.
+ * After calling this function, the negotiator state will move to
+ * PJMEDIA_SDP_NEG_STATE_DONE regardless whether the negotiation has
+ * been successfull or not.
+ *
+ * If the negotiation succeeds (i.e. the return value is PJ_SUCCESS),
+ * the active local and remote SDP will be replaced with the new SDP
+ * from the negotiation process.
+ *
+ * If the negotiation fails, the active local and remote SDP will not
+ * change.
+ *
+ * @param pool		Pool to allocate memory. The pool's lifetime needs
+ *			to be valid for the duration of the negotiator.
+ * @param neg		The SDP negotiator instance.
+ * @param allow_asym	Should be zero.
+ *
+ * @return		PJ_SUCCESS when there is at least one media
+ *			is actuve common in both offer and answer, or 
+ *			failure code when negotiation has failed.
+ */
+PJ_DECL(pj_status_t) pjmedia_sdp_neg_negotiate( pj_pool_t *pool,
+					        pjmedia_sdp_neg *neg,
+						pj_bool_t allow_asym);
+
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_SDP_NEG_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/session.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/session.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/session.h	(revision 1163)
@@ -0,0 +1,363 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_SESSION_H__
+#define __PJMEDIA_SESSION_H__
+
+
+/**
+ * @file session.h
+ * @brief Media Session.
+ */
+
+#include <pjmedia/endpoint.h>
+#include <pjmedia/stream.h>
+#include <pjmedia/sdp.h>
+
+PJ_BEGIN_DECL 
+
+/**
+ * @defgroup PJMEDIA_SESSION Sessions
+ * @ingroup PJMEDIA
+ */
+
+/**
+ * @defgroup PJMED_SES Media session
+ * @ingroup PJMEDIA_SESSION
+ * @{
+ *
+ * A media session represents multimedia communication between two
+ * parties. A media session represents the multimedia session that
+ * is described by SDP session descriptor. A media session consists 
+ * of one or more media streams (pjmedia_stream), where each stream 
+ * represents one media line (m= line) in SDP.
+ *
+ * This module provides functions to create and manage multimedia
+ * sessions.
+ *
+ * Application creates the media session by calling #pjmedia_session_create(),
+ * normally after it has completed negotiating both SDP offer and answer.
+ * The session creation function creates the media session (including
+ * media streams) based on the content of local and remote SDP.
+ */
+
+
+/**
+ * Session info, retrieved from a session by calling
+ * #pjmedia_session_get_info().
+ */
+struct pjmedia_session_info
+{
+    /** Number of streams. */
+    unsigned		stream_cnt;
+
+    /** Individual stream info. */
+    pjmedia_stream_info	stream_info[PJMEDIA_MAX_SDP_MEDIA];
+};
+
+
+/** 
+ * Opaque declaration of media session. 
+ */
+typedef struct pjmedia_session pjmedia_session;
+
+
+/**
+ * @see pjmedia_session_info.
+ */
+typedef struct pjmedia_session_info pjmedia_session_info;
+
+
+/**
+ * This function will initialize the session info based on information
+ * in both SDP session descriptors. The remaining information will be
+ * taken from default codec parameters. If socket info array is specified,
+ * the socket will be copied to the session info as well.
+ *
+ * @param pool		Pool to allocate memory.
+ * @param endpt		Pjmedia endpoint.
+ * @param max_streams	Maximum number of stream infos to be created.
+ * @param si		Session info structure to be initialized.
+ * @param local		Local SDP session descriptor.
+ * @param remote	Remote SDP session descriptor.
+ *
+ * @return		PJ_SUCCESS if stream info is successfully initialized.
+ */
+PJ_DECL(pj_status_t)
+pjmedia_session_info_from_sdp( pj_pool_t *pool,
+			       pjmedia_endpt *endpt,
+			       unsigned max_streams,
+			       pjmedia_session_info *si,
+			       const pjmedia_sdp_session *local,
+			       const pjmedia_sdp_session *remote);
+
+
+/**
+ * This function will initialize the stream info based on information
+ * in both SDP session descriptors for the specified stream index. 
+ * The remaining information will be taken from default codec parameters. 
+ * If socket info array is specified, the socket will be copied to the 
+ * session info as well.
+ *
+ * @param si		Stream info structure to be initialized.
+ * @param pool		Pool to allocate memory.
+ * @param endpt		PJMEDIA endpoint instance.
+ * @param local		Local SDP session descriptor.
+ * @param remote	Remote SDP session descriptor.
+ * @param stream_idx	Media stream index in the session descriptor.
+ *
+ * @return		PJ_SUCCESS if stream info is successfully initialized.
+ */
+PJ_DECL(pj_status_t)
+pjmedia_stream_info_from_sdp( pjmedia_stream_info *si,
+			      pj_pool_t *pool,
+			      pjmedia_endpt *endpt,
+			      const pjmedia_sdp_session *local,
+			      const pjmedia_sdp_session *remote,
+			      unsigned stream_idx);
+
+/**
+ * Create media session based on the local and remote SDP. After the session
+ * has been created, application normally would want to get the media port 
+ * interface of each streams, by calling #pjmedia_session_get_port(). The 
+ * media port interface exports put_frame() and get_frame() function, used
+ * to transmit and receive media frames from the stream.
+ *
+ * Without application calling put_frame() and get_frame(), there will be 
+ * no media frames transmitted or received by the session.
+ * 
+ * @param endpt		The PJMEDIA endpoint instance.
+ * @param si		Session info containing stream count and array of
+ *			stream info. The stream count indicates how many
+ *			streams to be created in the session.
+ * @param transports	Array of media stream transports, with 
+ *			sufficient number of elements (one for each stream).
+ * @param user_data	Arbitrary user data to be kept in the session.
+ * @param p_session	Pointer to receive the media session.
+ *
+ * @return		PJ_SUCCESS if media session can be created 
+ *			successfully.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_session_create( pjmedia_endpt *endpt, 
+			const pjmedia_session_info *si,
+			pjmedia_transport *transports[],
+			void *user_data,
+			pjmedia_session **p_session );
+
+
+/**
+ * Get media session info of the session.
+ *
+ * @param session	The session which info is being queried.
+ * @param info		Pointer to receive session info.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_session_get_info( pjmedia_session *session,
+					       pjmedia_session_info *info );
+
+
+/**
+ * Activate all streams in media session for the specified direction.
+ * Application only needs to call this function if it previously paused
+ * the session.
+ *
+ * @param session	The media session.
+ * @param dir		The direction to activate.
+ *
+ * @return		PJ_SUCCESS if success.
+ */
+PJ_DECL(pj_status_t) pjmedia_session_resume(pjmedia_session *session,
+					    pjmedia_dir dir);
+
+
+/**
+ * Suspend receipt and transmission of all streams in media session
+ * for the specified direction.
+ *
+ * @param session	The media session.
+ * @param dir		The media direction to suspend.
+ *
+ * @return		PJ_SUCCESS if success.
+ */
+PJ_DECL(pj_status_t) pjmedia_session_pause(pjmedia_session *session,
+					   pjmedia_dir dir);
+
+/**
+ * Suspend receipt and transmission of individual stream in media session
+ * for the specified direction.
+ *
+ * @param session	The media session.
+ * @param index		The stream index.
+ * @param dir		The media direction to pause.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_session_pause_stream( pjmedia_session *session,
+						   unsigned index,
+						   pjmedia_dir dir);
+
+/**
+ * Activate individual stream in media session for the specified direction.
+ *
+ * @param session	The media session.
+ * @param index		The stream index.
+ * @param dir		The media direction to activate.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_session_resume_stream(pjmedia_session *session,
+						   unsigned index,
+						   pjmedia_dir dir);
+
+/**
+ * Enumerate media streams in the session.
+ *
+ * @param session	The media session.
+ * @param count		On input, specifies the number of elements in
+ *			the array. On output, the number will be filled
+ *			with number of streams in the session.
+ * @param strm_info	Array of stream info.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_session_enum_streams( const pjmedia_session *session,
+			      unsigned *count, 
+			      pjmedia_stream_info strm_info[]);
+
+
+/**
+ * Get the media port interface of the specified stream. The media port
+ * interface declares put_frame() and get_frame() function, which is the 
+ * only  way for application to transmit and receive media frames from the
+ * stream.
+ *
+ * @param session	The media session.
+ * @param index		Stream index.
+ * @param p_port	Pointer to receive the media port interface for
+ *			the specified stream.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_session_get_port( pjmedia_session *session,
+					       unsigned index,
+					       pjmedia_port **p_port);
+
+
+/**
+ * Get session statistics. The stream statistic shows various
+ * indicators such as packet count, packet lost, jitter, delay, etc.
+ *
+ * @param session	The media session.
+ * @param index		Stream index.
+ * @param stat		Stream statistic.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_session_get_stream_stat(pjmedia_session *session,
+						     unsigned index,
+						     pjmedia_rtcp_stat *stat);
+
+/**
+ * Dial DTMF digit to the stream, using RFC 2833 mechanism.
+ *
+ * @param session	The media session.
+ * @param index		The stream index.
+ * @param ascii_digits	String of ASCII digits (i.e. 0-9*##A-B).
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_session_dial_dtmf( pjmedia_session *session,
+					        unsigned index,
+						const pj_str_t *ascii_digits );
+
+
+/**
+ * Check if the specified stream has received DTMF digits.
+ *
+ * @param session	The media session.
+ * @param index		The stream index.
+ *
+ * @return		Non-zero (PJ_TRUE) if the stream has DTMF digits.
+ */
+PJ_DECL(pj_status_t) pjmedia_session_check_dtmf( pjmedia_session *session,
+					         unsigned index);
+
+
+/**
+ * Retrieve DTMF digits from the specified stream.
+ *
+ * @param session	The media session.
+ * @param index		The stream index.
+ * @param ascii_digits	Buffer to receive the digits. The length of this
+ *			buffer is indicated in the "size" argument.
+ * @param size		On input, contains the maximum digits to be copied
+ *			to the buffer.
+ *			On output, it contains the actual digits that has
+ *			been copied to the buffer.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_session_get_dtmf( pjmedia_session *session,
+					       unsigned index,
+					       char *ascii_digits,
+					       unsigned *size );
+
+/**
+ * Set callback to be called upon receiving DTMF digits. If callback is
+ * registered, the stream will not buffer incoming DTMF but rather call
+ * the callback as soon as DTMF digit is received completely.
+ *
+ * @param session	The media session.
+ * @param index		The stream index.
+ * @param cb		Callback to be called upon receiving DTMF digits.
+ *			The DTMF digits will be given to the callback as
+ *			ASCII digits.
+ * @param user_data	User data to be returned back when the callback
+ *			is called.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t)
+pjmedia_session_set_dtmf_callback(pjmedia_session *session,
+				  unsigned index,
+				  void (*cb)(pjmedia_stream*, 
+				 	     void *user_data, 
+					     int digit), 
+				  void *user_data);
+
+/**
+ * Destroy media session.
+ *
+ * @param session	The media session.
+ *
+ * @return		PJ_SUCCESS if success.
+ */
+PJ_DECL(pj_status_t) pjmedia_session_destroy(pjmedia_session *session);
+
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+#endif	/* __PJMEDIA_SESSION_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/silencedet.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/silencedet.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/silencedet.h	(revision 1163)
@@ -0,0 +1,198 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_SILENCE_DET_H__
+#define __PJMEDIA_SILENCE_DET_H__
+
+
+/**
+ * @file silencedet.h
+ * @brief Adaptive silence detector.
+ */
+#include <pjmedia/types.h>
+
+
+/**
+ * @defgroup PJMEDIA_SILENCEDET Adaptive Silence Detection
+ * @ingroup PJMEDIA_FRAME_OP
+ * @brief Adaptive Silence Detector
+ * @{
+ */
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Opaque declaration for silence detector.
+ */
+typedef struct pjmedia_silence_det pjmedia_silence_det;
+
+
+
+/**
+ * Create voice activity detector with default settings. The default settings
+ * are set to adaptive silence detection with the default threshold.
+ *
+ * @param pool		    Pool for allocating the structure.
+ * @param clock_rate	    Clock rate.
+ * @param samples_per_frame Number of samples per frame. The clock_rate and
+ *			    samples_per_frame is only used to calculate the
+ *			    frame time, from which some timing parameters
+ *			    are calculated from.
+ * @param p_sd		    Pointer to receive the silence detector instance.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_silence_det_create( pj_pool_t *pool,
+						 unsigned clock_rate,
+						 unsigned samples_per_frame,
+						 pjmedia_silence_det **p_sd );
+
+
+/**
+ * Set silence detector name to identify the particular silence detector
+ * instance in the log.
+ *
+ * @param sd		    The silence detector.
+ * @param name		    Name.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_silence_det_set_name(pjmedia_silence_det *sd,
+						  const char *name);
+
+
+/**
+ * Set the sd to operate in fixed threshold mode. With fixed threshold mode,
+ * the threshold will not be changed adaptively.
+ *
+ * @param sd		    The silence detector
+ * @param threshold	    The silence threshold, or -1 to use default
+ *			    threshold.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_silence_det_set_fixed( pjmedia_silence_det *sd,
+						    int threshold );
+
+/**
+ * Set the sd to operate in adaptive mode. This is the default mode
+ * when the silence detector is created.
+ *
+ * @param sd		    The silence detector
+ * @param threshold	    Initial threshold to be set, or -1 to use default
+ *			    threshold.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_silence_det_set_adaptive(pjmedia_silence_det *sd,
+						      int threshold);
+
+/**
+ * Set other silence detector parameters.
+ *
+ * @param sd		    The silence detector
+ * @param min_silence	    Minimum duration of silence (in msec) before 
+ *			    silence is reported. If -1 is specified, then
+ *			    the default value will be used. The default is
+ *			    400 msec.
+ * @param min_signal	    Minimum duration of signal (in msec) before
+ *			    signal is reported. If -1 is specified, then
+ *			    the default value will be used. The default is
+ *			    equal to one frame.
+ * @param recalc_time	    The interval to recalculate signal and silence
+ *			    proportion and to readjust the silence threshold
+ *			    when adaptive silence detection is set. If -1
+ *			    is specified, then the default value will be used.
+ *			    The default value is 5000 (msec).
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_silence_det_set_params( pjmedia_silence_det *sd,
+						     int min_silence,
+						     int min_signal,
+						     int recalc_time);
+
+/**
+ * Disable the silence detector.
+ *
+ * @param sd		The silence detector
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_silence_det_disable( pjmedia_silence_det *sd );
+
+
+/**
+ * Perform voice activity detection on the given input samples. This
+ * function uses #pjmedia_calc_avg_signal() and #pjmedia_silence_det_apply()
+ * for its calculation.
+ *
+ * @param sd		The silence detector instance.
+ * @param samples	Pointer to 16-bit PCM input samples.
+ * @param count		Number of samples in the input.
+ * @param p_level	Optional pointer to receive average signal level
+ *			of the input samples.
+ *
+ * @return		Non zero if signal is silence.
+ */
+PJ_DECL(pj_bool_t) pjmedia_silence_det_detect( pjmedia_silence_det *sd,
+					       const pj_int16_t samples[],
+					       pj_size_t count,
+					       pj_int32_t *p_level);
+
+
+/**
+ * Calculate average signal level for the given samples.
+ *
+ * @param samples	Pointer to 16-bit PCM samples.
+ * @param count		Number of samples in the input.
+ *
+ * @return		The average signal level, which simply is total level
+ *			divided by number of samples.
+ */
+PJ_DECL(pj_int32_t) pjmedia_calc_avg_signal( const pj_int16_t samples[],
+					     pj_size_t count );
+
+
+
+/**
+ * Perform voice activity detection, given the specified average signal
+ * level.
+ *
+ * @param sd		The silence detector instance.
+ * @param level		Signal level.
+ *
+ * @return		Non zero if signal is silence.
+ */
+PJ_DECL(pj_bool_t) pjmedia_silence_det_apply( pjmedia_silence_det *sd,
+					      pj_uint32_t level);
+
+
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_SILENCE_DET_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/sound.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/sound.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/sound.h	(revision 1163)
@@ -0,0 +1,308 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_SOUND_H__
+#define __PJMEDIA_SOUND_H__
+
+
+/**
+ * @file sound.h
+ * @brief Sound player and recorder device framework.
+ */
+#include <pjmedia/types.h>
+#include <pj/pool.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJMED_SND Portable Sound Hardware Abstraction
+ * @ingroup PJMED_SND_PORT
+ * @brief PJMEDIA abstraction for sound device hardware
+ * @{
+ *
+ * This section describes lower level abstraction for sound device
+ * hardware. Application normally uses the higher layer @ref
+ * PJMED_SND_PORT abstraction since it works seamlessly with 
+ * @ref PJMEDIA_PORT_CONCEPT.
+ *
+ * The sound hardware abstraction basically runs <b>asychronously</b>,
+ * and application must register callbacks to be called to receive/
+ * supply audio frames from/to the sound hardware.
+ *
+ * A full duplex sound stream (created with #pjmedia_snd_open()) 
+ * requires application to supply two callbacks:
+ *  - <b><tt>rec_cb</tt></b> callback to be called when it has finished
+ *    capturing one media frame, and 
+ *  - <b><tt>play_cb</tt></b> callback to be called when it needs media 
+ *    frame to be played to the sound playback hardware.
+ *
+ * Half duplex sound stream (created with #pjmedia_snd_open_rec() or
+ * #pjmedia_snd_open_player()) will only need one of the callback to
+ * be specified.
+ *
+ * After sound stream is created, application need to call
+ * #pjmedia_snd_stream_start() to start capturing/playing back media
+ * frames from/to the sound device.
+ */
+
+/** Opaque data type for audio stream. */
+typedef struct pjmedia_snd_stream pjmedia_snd_stream;
+
+/**
+ * Device information structure returned by #pjmedia_snd_get_dev_info.
+ */
+typedef struct pjmedia_snd_dev_info
+{
+    char	name[64];	        /**< Device name.		    */
+    unsigned	input_count;	        /**< Max number of input channels.  */
+    unsigned	output_count;	        /**< Max number of output channels. */
+    unsigned	default_samples_per_sec;/**< Default sampling rate.	    */
+} pjmedia_snd_dev_info;
+
+/** 
+ * Stream information, can be retrieved from a live stream by calling
+ * #pjmedia_snd_stream_get_info().
+ */
+typedef struct pjmedia_snd_stream_info
+{
+    pjmedia_dir	dir;		    /**< Stream direction.		    */
+    int		play_id;	    /**< Playback dev id, or -1 for rec only*/
+    int		rec_id;		    /**< Capture dev id, or -1 for play only*/
+    unsigned	clock_rate;	    /**< Actual clock rate.		    */
+    unsigned	channel_count;	    /**< Number of channels.		    */
+    unsigned	samples_per_frame;  /**< Samples per frame.		    */
+    unsigned	bits_per_sample;    /**< Bits per sample.		    */
+    unsigned	rec_latency;	    /**< Record latency, in samples.	    */
+    unsigned	play_latency;	    /**< Playback latency, in samples.	    */
+} pjmedia_snd_stream_info;
+
+
+/** 
+ * This callback is called by player stream when it needs additional data
+ * to be played by the device. Application must fill in the whole of output 
+ * buffer with sound samples.
+ *
+ * @param user_data	User data associated with the stream.
+ * @param timestamp	Timestamp, in samples.
+ * @param output	Buffer to be filled out by application.
+ * @param size		The size requested in bytes, which will be equal to
+ *			the size of one whole packet.
+ *
+ * @return		Non-zero to stop the stream.
+ */
+typedef pj_status_t (*pjmedia_snd_play_cb)(/* in */   void *user_data,
+				      /* in */   pj_uint32_t timestamp,
+				      /* out */  void *output,
+				      /* out */  unsigned size);
+
+/**
+ * This callback is called by recorder stream when it has captured the whole
+ * packet worth of audio samples.
+ *
+ * @param user_data	User data associated with the stream.
+ * @param timestamp	Timestamp, in samples.
+ * @param output	Buffer containing the captured audio samples.
+ * @param size		The size of the data in the buffer, in bytes.
+ *
+ * @return		Non-zero to stop the stream.
+ */
+typedef pj_status_t (*pjmedia_snd_rec_cb)(/* in */   void *user_data,
+				     /* in */   pj_uint32_t timestamp,
+				     /* in */   void *input,
+				     /* in*/    unsigned size);
+
+/**
+ * Init the sound library.
+ *
+ * @param factory	The sound factory.
+ *
+ * @return		Zero on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_init(pj_pool_factory *factory);
+
+
+/**
+ * Get the number of devices detected by the library.
+ *
+ * @return		Number of devices.
+ */
+PJ_DECL(int) pjmedia_snd_get_dev_count(void);
+
+
+/**
+ * Get device info.
+ *
+ * @param index		The index of the device, which should be in the range
+ *			from zero to #pjmedia_snd_get_dev_count - 1.
+ */
+PJ_DECL(const pjmedia_snd_dev_info*) pjmedia_snd_get_dev_info(unsigned index);
+
+
+/**
+ * Create sound stream for both capturing audio and audio playback,  from the 
+ * same device. This is the recommended way to create simultaneous recorder 
+ * and player streams (instead of creating separate capture and playback
+ * streams), because it works on backends that does not allow
+ * a device to be opened more than once.
+ *
+ * @param rec_id	    Device index for recorder/capture stream, or
+ *			    -1 to use the first capable device.
+ * @param play_id	    Device index for playback stream, or -1 to use 
+ *			    the first capable device.
+ * @param clock_rate	    Sound device's clock rate to set.
+ * @param channel_count	    Set number of channels, 1 for mono, or 2 for
+ *			    stereo. The channel count determines the format
+ *			    of the frame.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Set the number of bits per sample. The normal 
+ *			    value for this parameter is 16 bits per sample.
+ * @param rec_cb	    Callback to handle captured audio samples.
+ * @param play_cb	    Callback to be called when the sound player needs
+ *			    more audio samples to play.
+ * @param user_data	    User data to be associated with the stream.
+ * @param p_snd_strm	    Pointer to receive the stream instance.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_open(int rec_id,
+				      int play_id,
+				      unsigned clock_rate,
+				      unsigned channel_count,
+				      unsigned samples_per_frame,
+				      unsigned bits_per_sample,
+				      pjmedia_snd_rec_cb rec_cb,
+				      pjmedia_snd_play_cb play_cb,
+				      void *user_data,
+				      pjmedia_snd_stream **p_snd_strm);
+
+
+/**
+ * Create a unidirectional audio stream for capturing audio samples from
+ * the sound device.
+ *
+ * @param index		    Device index, or -1 to let the library choose the 
+ *			    first available device.
+ * @param clock_rate	    Sound device's clock rate to set.
+ * @param channel_count	    Set number of channels, 1 for mono, or 2 for
+ *			    stereo. The channel count determines the format
+ *			    of the frame.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Set the number of bits per sample. The normal 
+ *			    value for this parameter is 16 bits per sample.
+ * @param rec_cb	    Callback to handle captured audio samples.
+ * @param user_data	    User data to be associated with the stream.
+ * @param p_snd_strm	    Pointer to receive the stream instance.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_open_rec( int index,
+					   unsigned clock_rate,
+					   unsigned channel_count,
+					   unsigned samples_per_frame,
+					   unsigned bits_per_sample,
+					   pjmedia_snd_rec_cb rec_cb,
+					   void *user_data,
+					   pjmedia_snd_stream **p_snd_strm);
+
+/**
+ * Create a unidirectional audio stream for playing audio samples to the
+ * sound device.
+ *
+ * @param index		    Device index, or -1 to let the library choose the 
+ *			    first available device.
+ * @param clock_rate	    Sound device's clock rate to set.
+ * @param channel_count	    Set number of channels, 1 for mono, or 2 for
+ *			    stereo. The channel count determines the format
+ *			    of the frame.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Set the number of bits per sample. The normal 
+ *			    value for this parameter is 16 bits per sample.
+ * @param play_cb	    Callback to be called when the sound player needs
+ *			    more audio samples to play.
+ * @param user_data	    User data to be associated with the stream.
+ * @param p_snd_strm	    Pointer to receive the stream instance.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_open_player( int index,
+					 unsigned clock_rate,
+					 unsigned channel_count,
+					 unsigned samples_per_frame,
+					 unsigned bits_per_sample,
+					 pjmedia_snd_play_cb play_cb,
+					 void *user_data,
+					 pjmedia_snd_stream **p_snd_strm );
+
+
+/**
+ * Get information about live stream.
+ *
+ * @param strm		The stream to be queried.
+ * @param pi		Pointer to stream information to be filled up with
+ *			information about the stream.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_stream_get_info(pjmedia_snd_stream *strm,
+						 pjmedia_snd_stream_info *pi);
+
+
+/**
+ * Start the stream.
+ *
+ * @param stream	The recorder or player stream.
+ *
+ * @return		Zero on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_stream_start(pjmedia_snd_stream *stream);
+
+/**
+ * Stop the stream.
+ *
+ * @param stream	The recorder or player stream.
+ *
+ * @return		Zero on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_stream_stop(pjmedia_snd_stream *stream);
+
+/**
+ * Destroy the stream.
+ *
+ * @param stream	The recorder of player stream.
+ *
+ * @return		Zero on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_stream_close(pjmedia_snd_stream *stream);
+
+/**
+ * Deinitialize sound library.
+ *
+ * @return		Zero on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_deinit(void);
+
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJMEDIA_SOUND_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/sound_port.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/sound_port.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/sound_port.h	(revision 1163)
@@ -0,0 +1,282 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_SOUND_PORT_H__
+#define __PJMEDIA_SOUND_PORT_H__
+
+/**
+ * @file sound_port.h
+ * @brief Media port connection abstraction to sound device.
+ */
+#include <pjmedia/sound.h>
+#include <pjmedia/port.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJMED_SND_PORT Sound Device Port
+ * @ingroup PJMEDIA_PORT_CLOCK
+ * @brief Media Port Connection Abstraction to the Sound Device
+ @{
+
+ As explained in @ref PJMED_SND, the sound hardware abstraction provides
+ some callbacks for its user:
+ - it calls <b><tt>rec_cb</tt></b> callback when it has finished capturing
+   one media frame, and 
+ - it calls <b><tt>play_cb</tt></b> when it needs media frame to be 
+   played to the sound playback hardware.
+
+ The @ref PJMED_SND_PORT (the object being explained here) add a
+ thin wrapper to the hardware abstraction:
+ - it will call downstream port's <tt>put_frame()</tt>
+   when <b><tt>rec_cb()</tt></b> is called (i.e. when the sound hardware 
+   has finished capturing frame), and 
+ - it will call downstream port's <tt>get_frame()</tt> when 
+   <b><tt>play_cb()</tt></b> is called (i.e. every time the 
+   sound hardware needs more frames to be played to the playback hardware).
+
+ This simple abstraction enables media to flow automatically (and
+ in timely manner) from the downstream media port to the sound device.
+ In other words, the sound device port supplies media clock to
+ the ports. The media clock concept is explained in @ref PJMEDIA_PORT_CLOCK
+ section.
+
+ Application registers downstream port to the sound device port by
+ calling #pjmedia_snd_port_connect();
+ 
+ */
+
+/**
+ * This opaque type describes sound device port connection.
+ * Sound device port is not a media port, but it is used to connect media
+ * port to the sound device.
+ */
+typedef struct pjmedia_snd_port pjmedia_snd_port;
+
+
+/**
+ * Create bidirectional sound port for both capturing and playback of
+ * audio samples.
+ *
+ * @param pool		    Pool to allocate sound port structure.
+ * @param rec_id	    Device index for recorder/capture stream, or
+ *			    -1 to use the first capable device.
+ * @param play_id	    Device index for playback stream, or -1 to use 
+ *			    the first capable device.
+ * @param clock_rate	    Sound device's clock rate to set.
+ * @param channel_count	    Set number of channels, 1 for mono, or 2 for
+ *			    stereo. The channel count determines the format
+ *			    of the frame.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Set the number of bits per sample. The normal 
+ *			    value for this parameter is 16 bits per sample.
+ * @param options	    Options flag, currently must be zero.
+ * @param p_port	    Pointer to receive the sound device port instance.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate error
+ *			    code.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_port_create( pj_pool_t *pool,
+					      int rec_id,
+					      int play_id,
+					      unsigned clock_rate,
+					      unsigned channel_count,
+					      unsigned samples_per_frame,
+					      unsigned bits_per_sample,
+					      unsigned options,
+					      pjmedia_snd_port **p_port);
+
+/**
+ * Create unidirectional sound device port for capturing audio streams from 
+ * the sound device with the specified parameters.
+ *
+ * @param pool		    Pool to allocate sound port structure.
+ * @param index		    Device index, or -1 to let the library choose the 
+ *			    first available device.
+ * @param clock_rate	    Sound device's clock rate to set.
+ * @param channel_count	    Set number of channels, 1 for mono, or 2 for
+ *			    stereo. The channel count determines the format
+ *			    of the frame.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Set the number of bits per sample. The normal 
+ *			    value for this parameter is 16 bits per sample.
+ * @param options	    Options flag, currently must be zero.
+ * @param p_port	    Pointer to receive the sound device port instance.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate error
+ *			    code.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_port_create_rec(pj_pool_t *pool,
+						 int index,
+						 unsigned clock_rate,
+						 unsigned channel_count,
+						 unsigned samples_per_frame,
+						 unsigned bits_per_sample,
+						 unsigned options,
+						 pjmedia_snd_port **p_port);
+					      
+/**
+ * Create unidirectional sound device port for playing audio streams with the 
+ * specified parameters.
+ *
+ * @param pool		    Pool to allocate sound port structure.
+ * @param index		    Device index, or -1 to let the library choose the 
+ *			    first available device.
+ * @param clock_rate	    Sound device's clock rate to set.
+ * @param channel_count	    Set number of channels, 1 for mono, or 2 for
+ *			    stereo. The channel count determines the format
+ *			    of the frame.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Set the number of bits per sample. The normal 
+ *			    value for this parameter is 16 bits per sample.
+ * @param options	    Options flag, currently must be zero.
+ * @param p_port	    Pointer to receive the sound device port instance.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate error
+ *			    code.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_port_create_player(pj_pool_t *pool,
+						    int index,
+						    unsigned clock_rate,
+						    unsigned channel_count,
+						    unsigned samples_per_frame,
+						    unsigned bits_per_sample,
+						    unsigned options,
+						    pjmedia_snd_port **p_port);
+					      
+
+/**
+ * Destroy sound device port.
+ *
+ * @param snd_port	    The sound device port.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate error
+ *			    code.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_port_destroy(pjmedia_snd_port *snd_port);
+
+
+/**
+ * Retrieve the sound stream associated by this sound device port.
+ *
+ * @param snd_port	    The sound device port.
+ *
+ * @return		    The sound stream instance.
+ */
+PJ_DECL(pjmedia_snd_stream*) pjmedia_snd_port_get_snd_stream(
+						pjmedia_snd_port *snd_port);
+
+
+/**
+ * Configure the echo cancellation tail length. By default, echo canceller
+ * is enabled in the sound device with the default tail length. After the
+ * sound port is created, application can query the current echo canceller
+ * tail length by calling #pjmedia_snd_port_get_ec_tail.
+ *
+ * Note that you should only change the EC settings when the sound port
+ * is not connected to any downstream ports, otherwise race condition may
+ * occur.
+ *
+ * @param snd_port	    The sound device port.
+ * @param pool		    Pool to re-create the echo canceller if necessary.
+ * @param tail_ms	    Maximum echo tail length to be supported, in
+ *			    miliseconds. If zero is specified, the EC would
+ *			    be disabled.
+ * @param options	    The options to be passed to #pjmedia_echo_create().
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_port_set_ec( pjmedia_snd_port *snd_port,
+					      pj_pool_t *pool,
+					      unsigned tail_ms,
+					      unsigned options);
+
+
+/**
+ * Get current echo canceller tail length, in miliseconds. The tail length 
+ * will be zero if EC is not enabled.
+ *
+ * @param snd_port	    The sound device port.
+ * @param p_length	    Pointer to receive the tail length.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_port_get_ec_tail(pjmedia_snd_port *snd_port,
+						  unsigned *p_length);
+
+
+/**
+ * Enable or disable echo canceller. By default the EC is enabled after it
+ * was created, so there is no need to enable the EC after creating it.
+ * This function is only useful to disable the echo canceller temporarily,
+ * for example during idle period, to prevent EC from using
+ */
+
+/**
+ * Connect a port to the sound device port. If the sound device port has a
+ * sound recorder device, then this will start periodic function call to
+ * the port's put_frame() function. If the sound device has a sound player
+ * device, then this will start periodic function call to the port's
+ * get_frame() function.
+ *
+ * For this version of PJMEDIA, the media port MUST have the same audio
+ * settings as the sound device port, or otherwise the connection will
+ * fail. This means the port MUST have the same clock_rate, channel count,
+ * samples per frame, and bits per sample as the sound device port.
+ *
+ * @param snd_port	    The sound device port.
+ * @param port		    The media port to be connected.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate error
+ *			    code.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_port_connect(pjmedia_snd_port *snd_port,
+					      pjmedia_port *port);
+
+
+/**
+ * Retrieve the port instance currently attached to the sound port, if any.
+ *
+ * @param snd_port	    The sound device port.
+ *
+ * @return		    The port instance currently attached to the 
+ *			    sound device port, or NULL if there is no port
+ *			    currently attached to the sound device port.
+ */
+PJ_DECL(pjmedia_port*) pjmedia_snd_port_get_port(pjmedia_snd_port *snd_port);
+
+
+/**
+ * Disconnect currently attached port from the sound device port.
+ *
+ * @param snd_port	    The sound device port.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_port_disconnect(pjmedia_snd_port *snd_port);
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJMEDIA_SOUND_PORT_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/splitcomb.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/splitcomb.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/splitcomb.h	(revision 1163)
@@ -0,0 +1,137 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_SPLITCOMB_H__
+#define __PJMEDIA_SPLITCOMB_H__
+
+
+/**
+ * @file splitcomb.h
+ * @brief Media channel splitter/combiner port.
+ */
+#include <pjmedia/port.h>
+
+
+/**
+ * @addtogroup PJMEDIA_SPLITCOMB Media channel splitter/combiner
+ * @ingroup PJMEDIA_PORT
+ * @brief Split and combine media channels in media streams
+ * @{
+ * This section describes media port to split and combine media
+ * channels in the stream.
+ *
+ * A splitter/combiner splits a single stereo/multichannels audio frame into
+ * multiple audio frames to each channel when put_frame() is called, 
+ * and combines mono frames from each channel into a stereo/multichannel 
+ * frame when get_frame() is called. A common application for the splitter/
+ * combiner is to split frames from stereo to mono and vise versa.
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Create a media splitter/combiner with the specified parameters.
+ * When the splitter/combiner is created, it creates an instance of
+ * pjmedia_port. This media port represents the stereo/multichannel side
+ * of the splitter/combiner. Application needs to supply the splitter/
+ * combiner with a media port for each audio channels.
+ *
+ * @param pool		    Pool to allocate memory to create the splitter/
+ *			    combiner.
+ * @param clock_rate	    Audio clock rate/sampling rate.
+ * @param channel_count	    Number of channels.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Bits per sample.
+ * @param options	    Optional flags.
+ * @param p_splitcomb	    Pointer to receive the splitter/combiner.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate
+ *			    error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_splitcomb_create(pj_pool_t *pool,
+					      unsigned clock_rate,
+					      unsigned channel_count,
+					      unsigned samples_per_frame,
+					      unsigned bits_per_sample,
+					      unsigned options,
+					      pjmedia_port **p_splitcomb);
+
+/**
+ * Supply the splitter/combiner with media port for the specified channel 
+ * number. The media port will be called at the
+ * same phase as the splitter/combiner; which means that when application
+ * calls get_frame() of the splitter/combiner, it will call get_frame()
+ * for all ports that have the same phase. And similarly for put_frame().
+ *
+ * @param splitcomb	    The splitter/combiner.
+ * @param ch_num	    Audio channel starting number (zero based).
+ * @param options	    Must be zero at the moment.
+ * @param port		    The media port.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate error
+ *			    code.
+ */
+PJ_DECL(pj_status_t) pjmedia_splitcomb_set_channel(pjmedia_port *splitcomb,
+						   unsigned ch_num,
+						   unsigned options,
+						   pjmedia_port *port);
+
+/**
+ * Create a reverse phase media port for the specified channel number.
+ * For channels with reversed phase, when application calls put_frame() to
+ * the splitter/combiner, the splitter/combiner will only put the frame to
+ * a buffer. Later on, when application calls get_frame() on the channel's
+ * media port, it will return the frame that are available in the buffer.
+ * The same process happens when application calls put_frame() to the
+ * channel's media port, it will only put the frame to another buffer, which
+ * will be returned when application calls get_frame() to the splitter's 
+ * media port. So this effectively reverse the phase of the media port.
+ *
+ * @param pool		    The pool to allocate memory for the port and
+ *			    buffers.
+ * @param splitcomb	    The splitter/combiner.
+ * @param ch_num	    Audio channel starting number (zero based).
+ * @param options	    Normally is zero, but the lower 8-bit of the 
+ *			    options can be used to specify the number of 
+ *			    buffers in the circular buffer. If zero, then
+ *			    default number will be used (default: 8).
+ * @param p_chport	    The media port created with reverse phase for
+ *			    the specified audio channel.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate error
+ *			    code.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_splitcomb_create_rev_channel( pj_pool_t *pool,
+				      pjmedia_port *splitcomb,
+				      unsigned ch_num,
+				      unsigned options,
+				      pjmedia_port **p_chport);
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* __PJMEDIA_SPLITCOMB_H__ */
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/stream.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/stream.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/stream.h	(revision 1163)
@@ -0,0 +1,307 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_STREAM_H__
+#define __PJMEDIA_STREAM_H__
+
+
+/**
+ * @file stream.h
+ * @brief Media Stream.
+ */
+
+#include <pjmedia/sound.h>
+#include <pjmedia/codec.h>
+#include <pjmedia/endpoint.h>
+#include <pjmedia/port.h>
+#include <pjmedia/rtcp.h>
+#include <pjmedia/transport.h>
+#include <pj/sock.h>
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJMED_STRM Streams
+ * @ingroup PJMEDIA_PORT
+ * @brief Media port for communicating with remote peer via the network.
+ * @{
+ *
+ * A media stream is a bidirectional multimedia communication between two
+ * endpoints. It corresponds to a media description (m= line) in SDP
+ * session descriptor.
+ *
+ * A media stream consists of two unidirectional channels:
+ *  - encoding channel, which transmits unidirectional media to remote, and
+ *  - decoding channel, which receives unidirectional media from remote.
+ *
+ * A media stream exports media port interface (see @ref PJMEDIA_PORT_CONCEPT)
+ * and application normally uses this interface to interconnect the stream
+ * to other PJMEDIA components.
+ *
+ * A media stream internally manages the following objects:
+ *  - an instance of media codec (see @ref PJMEDIA_CODEC),
+ *  - an @ref PJMED_JBUF,
+ *  - two instances of RTP sessions (#pjmedia_rtp_session, one for each
+ *    direction),
+ *  - one instance of RTCP session (#pjmedia_rtcp_session),
+ *  - and a reference to media transport to send and receive packets
+ *    to/from the network (see @ref PJMEDIA_TRANSPORT_H).
+ *
+ * Streams are created by calling #pjmedia_stream_create(), specifying
+ * #pjmedia_stream_info structure in the parameter. Application can construct
+ * the #pjmedia_stream_info structure manually, or use 
+ * #pjmedia_stream_info_from_sdp() or #pjmedia_session_info_from_sdp() 
+ * functions to construct the #pjmedia_stream_info from local and remote 
+ * SDP session descriptors.
+ *
+ * Application can also use @ref PJMEDIA_SESSION to indirectly create the
+ * streams.
+ */
+
+/**
+ * Opaque declaration for media channel.
+ * Media channel is unidirectional flow of media from sender to
+ * receiver.
+ */
+typedef struct pjmedia_channel pjmedia_channel;
+
+/** 
+ * This structure describes media stream information. Each media stream
+ * corresponds to one "m=" line in SDP session descriptor, and it has
+ * its own RTP/RTCP socket pair.
+ */
+struct pjmedia_stream_info
+{
+    pjmedia_type	type;	    /**< Media type (audio, video)	    */
+    pjmedia_dir		dir;	    /**< Media direction.		    */
+    pj_sockaddr_in	rem_addr;   /**< Remote RTP address		    */
+    pj_sockaddr_in	rem_rtcp;   /**< Optional remote RTCP address. If
+					 sin_family is zero, the RTP address
+					 will be calculated from RTP.	    */
+    pjmedia_codec_info	fmt;	    /**< Incoming codec format info.	    */
+    pjmedia_codec_param *param;	    /**< Optional codec param.		    */
+    unsigned		tx_pt;	    /**< Outgoing codec paylaod type.	    */
+    int		        tx_event_pt;/**< Outgoing pt for telephone-events.  */
+    int			rx_event_pt;/**< Incoming pt for telephone-events.  */
+    pj_uint32_t		ssrc;	    /**< RTP SSRC.			    */
+    int			jb_init;    /**< Jitter buffer init delay in msec.  
+					 (-1 for default).		    */
+    int			jb_min_pre; /**< Jitter buffer minimum prefetch
+					 delay in msec (-1 for default).    */
+    int			jb_max_pre; /**< Jitter buffer maximum prefetch
+					 delay in msec (-1 for default).    */
+    int			jb_max;	    /**< Jitter buffer max delay in msec.   */
+};
+
+
+/**
+ * @see pjmedia_stream_info.
+ */
+typedef struct pjmedia_stream_info pjmedia_stream_info;
+
+
+
+/**
+ * Create a media stream based on the specified parameter. After the stream
+ * has been created, application normally would want to get the media port 
+ * interface of the streams, by calling pjmedia_stream_get_port(). The 
+ * media port interface exports put_frame() and get_frame() function, used
+ * to transmit and receive media frames from the stream.
+ *
+ * Without application calling put_frame() and get_frame(), there will be 
+ * no media frames transmitted or received by the stream.
+ *
+ * @param endpt		Media endpoint.
+ * @param pool		Pool to allocate memory for the stream. A large
+ *			number of memory may be needed because jitter
+ *			buffer needs to preallocate some storage.
+ * @param info		Stream information.
+ * @param tp		Stream transport instance used to transmit 
+ *			and receive RTP/RTCP packets to/from the underlying 
+ *			transport. 
+ * @param user_data	Arbitrary user data (for future callback feature).
+ * @param p_stream	Pointer to receive the media stream.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_stream_create(pjmedia_endpt *endpt,
+					   pj_pool_t *pool,
+					   const pjmedia_stream_info *info,
+					   pjmedia_transport *tp,
+					   void *user_data,
+					   pjmedia_stream **p_stream);
+
+/**
+ * Destroy the media stream.
+ *
+ * @param stream	The media stream.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_stream_destroy(pjmedia_stream *stream);
+
+
+/**
+ * Get the media port interface of the stream. The media port interface
+ * declares put_frame() and get_frame() function, which is the only 
+ * way for application to transmit and receive media frames from the
+ * stream.
+ *
+ * @param stream	The media stream.
+ * @param p_port	Pointer to receive the port interface.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_stream_get_port(pjmedia_stream *stream,
+					     pjmedia_port **p_port );
+
+
+/**
+ * Get the media transport object associated with this stream.
+ *
+ * @param st		The media stream.
+ *
+ * @return		The transport object being used by the stream.
+ */
+PJ_DECL(pjmedia_transport*) pjmedia_stream_get_transport(pjmedia_stream *st);
+
+
+/**
+ * Start the media stream. This will start the appropriate channels
+ * in the media stream, depending on the media direction that was set
+ * when the stream was created.
+ *
+ * @param stream	The media stream.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_stream_start(pjmedia_stream *stream);
+
+
+/**
+ * Get the stream statistics.
+ *
+ * @param stream	The media stream.
+ * @param stat		Media stream statistics.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_stream_get_stat( const pjmedia_stream *stream,
+					      pjmedia_rtcp_stat *stat);
+
+/**
+ * Pause the individual channel in the stream.
+ *
+ * @param stream	The media channel.
+ * @param dir		Which direction to pause.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_stream_pause( pjmedia_stream *stream,
+					   pjmedia_dir dir);
+
+/**
+ * Resume the individual channel in the stream.
+ *
+ * @param stream	The media channel.
+ * @param dir		Which direction to resume.
+ *
+ * @return		PJ_SUCCESS on success;
+ */
+PJ_DECL(pj_status_t) pjmedia_stream_resume(pjmedia_stream *stream,
+					   pjmedia_dir dir);
+
+/**
+ * Transmit DTMF to this stream. The DTMF will be transmitted uisng
+ * RTP telephone-events as described in RFC 2833. This operation is
+ * only valid for audio stream.
+ *
+ * @param stream	The media stream.
+ * @param ascii_digit	String containing digits to be sent to remote.
+ *			Currently the maximum number of digits are 32.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_stream_dial_dtmf(pjmedia_stream *stream,
+					      const pj_str_t *ascii_digit);
+
+
+/**
+ * Check if the stream has incoming DTMF digits in the incoming DTMF
+ * queue. Incoming DTMF digits received via RFC 2833 mechanism are
+ * saved in the incoming digits queue.
+ *
+ * @param stream	The media stream.
+ *
+ * @return		Non-zero (PJ_TRUE) if the stream has received DTMF
+ *			digits in the .
+ */
+PJ_DECL(pj_bool_t) pjmedia_stream_check_dtmf(pjmedia_stream *stream);
+
+
+/**
+ * Retrieve the incoming DTMF digits from the stream, and remove the digits
+ * from stream's DTMF buffer. Note that the digits buffer will not be NULL 
+ * terminated.
+ *
+ * @param stream	The media stream.
+ * @param ascii_digits	Buffer to receive the digits. The length of this
+ *			buffer is indicated in the "size" argument.
+ * @param size		On input, contains the maximum digits to be copied
+ *			to the buffer.
+ *			On output, it contains the actual digits that has
+ *			been copied to the buffer.
+ *
+ * @return		Non-zero (PJ_TRUE) if the stream has received DTMF
+ *			digits in the .
+ */
+PJ_DECL(pj_status_t) pjmedia_stream_get_dtmf( pjmedia_stream *stream,
+					      char *ascii_digits,
+					      unsigned *size);
+
+
+/**
+ * Set callback to be called upon receiving DTMF digits. If callback is
+ * registered, the stream will not buffer incoming DTMF but rather call
+ * the callback as soon as DTMF digit is received completely.
+ *
+ * @param stream	The media stream.
+ * @param cb		Callback to be called upon receiving DTMF digits.
+ *			The DTMF digits will be given to the callback as
+ *			ASCII digits.
+ * @param user_data	User data to be returned back when the callback
+ *			is called.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t)
+pjmedia_stream_set_dtmf_callback(pjmedia_stream *stream,
+				 void (*cb)(pjmedia_stream*, 
+					    void *user_data, 
+					    int digit), 
+				 void *user_data);
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJMEDIA_STREAM_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/tonegen.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/tonegen.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/tonegen.h	(revision 1163)
@@ -0,0 +1,272 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_TONEGEN_PORT_H__
+#define __PJMEDIA_TONEGEN_PORT_H__
+
+/**
+ * @file tonegen.h
+ * @brief Tone (sine, MF, DTMF) generator media port.
+ */
+#include <pjmedia/port.h>
+
+
+/**
+ * @defgroup PJMEDIA_MF_DTMF_TONE_GENERATOR Tone (sine, MF, DTMF) Generator
+ * @ingroup PJMEDIA_PORT
+ * @brief Tone (sine, MF, DTMF) Generator
+ * @{
+ * This page describes tone generator media port. A tone generator can be
+ * used to generate a single frequency sine wave or dual frequency tones
+ * such as DTMF.
+ *
+ * The tone generator media port provides two functions to generate tones.
+ * The function #pjmedia_tonegen_play() can be used to generate arbitrary
+ * single or dual frequency tone, and #pjmedia_tonegen_play_digits() is
+ * used to play digits such as DTMF. Each tone specified in the playback
+ * function has individual on and off signal duration that must be
+ * specified by application.
+ *
+ * In order to play digits such as DTMF, the tone generator is equipped
+ * with digit map, which contain information about the frequencies of
+ * the digits. The default digit map is DTMF (0-9,a-d,*,#), but application
+ * may specifiy different digit map to the tone generator by calling
+ * #pjmedia_tonegen_set_digit_map() function.
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * This structure describes individual MF digits to be played
+ * with #pjmedia_tonegen_play().
+ */
+typedef struct pjmedia_tone_desc
+{
+    short   freq1;	    /**< First frequency.			    */
+    short   freq2;	    /**< Optional second frequency.		    */
+    short   on_msec;	    /**< Playback ON duration, in miliseconds.	    */
+    short   off_msec;	    /**< Playback OFF duration, ini miliseconds.    */
+    short   volume;	    /**< Volume (1-16383), or 0 for default.	    */
+} pjmedia_tone_desc;
+
+
+
+/**
+ * This structure describes individual MF digits to be played
+ * with #pjmedia_tonegen_play_digits().
+ */
+typedef struct pjmedia_tone_digit
+{
+    char    digit;	    /**< The ASCI identification for the digit.	    */
+    short   on_msec;	    /**< Playback ON duration, in miliseconds.	    */
+    short   off_msec;	    /**< Playback OFF duration, ini miliseconds.    */
+    short   volume;	    /**< Volume (1-16383), or 0 for default.	    */
+} pjmedia_tone_digit;
+
+
+/**
+ * This structure describes the digit map which is used by the tone generator
+ * to produce tones from an ASCII digits.
+ * Digit map used by a particular tone generator can be retrieved/set with
+ * #pjmedia_tonegen_get_digit_map() and #pjmedia_tonegen_set_digit_map().
+ */
+typedef struct pjmedia_tone_digit_map
+{
+    unsigned count;	    /**< Number of digits in the map.		*/
+
+    struct {
+	char    digit;	    /**< The ASCI identification for the digit.	*/
+	short   freq1;	    /**< First frequency.			*/
+	short   freq2;	    /**< Optional second frequency.		*/
+    } digits[16];	    /**< Array of digits in the digit map.	*/
+} pjmedia_tone_digit_map;
+
+
+/**
+ * Tone generator options.
+ */
+enum
+{
+    /**
+     * Play the tones in loop, restarting playing the first tone after
+     * the last tone has been played.
+     */
+    PJMEDIA_TONEGEN_LOOP    = 1
+};
+
+
+/**
+ * Create an instance of tone generator with the specified parameters.
+ * When the tone generator is first created, it will be loaded with the
+ * default digit map.
+ *
+ * @param pool		    Pool to allocate memory for the port structure.
+ * @param clock_rate	    Sampling rate.
+ * @param channel_count	    Number of channels. Currently only mono and stereo
+ *			    are supported.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Number of bits per sample. This version of PJMEDIA
+ *			    only supports 16bit per sample.
+ * @param options	    Option flags. Application may specify 
+ *			    PJMEDIA_TONEGEN_LOOP to play the tone in a loop.
+ * @param p_port	    Pointer to receive the port instance.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate
+ *			    error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_tonegen_create(pj_pool_t *pool,
+					    unsigned clock_rate,
+					    unsigned channel_count,
+					    unsigned samples_per_frame,
+					    unsigned bits_per_sample,
+					    unsigned options,
+					    pjmedia_port **p_port);
+
+
+/**
+ * Create an instance of tone generator with the specified parameters.
+ * When the tone generator is first created, it will be loaded with the
+ * default digit map.
+ *
+ * @param pool		    Pool to allocate memory for the port structure.
+ * @param name		    Optional name for the tone generator.
+ * @param clock_rate	    Sampling rate.
+ * @param channel_count	    Number of channels. Currently only mono and stereo
+ *			    are supported.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Number of bits per sample. This version of PJMEDIA
+ *			    only supports 16bit per sample.
+ * @param options	    Option flags. Application may specify 
+ *			    PJMEDIA_TONEGEN_LOOP to play the tone in a loop.
+ * @param p_port	    Pointer to receive the port instance.
+ *
+ * @return		    PJ_SUCCESS on success, or the appropriate
+ *			    error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_tonegen_create2(pj_pool_t *pool,
+					     const pj_str_t *name,
+					     unsigned clock_rate,
+					     unsigned channel_count,
+					     unsigned samples_per_frame,
+					     unsigned bits_per_sample,
+					     unsigned options,
+					     pjmedia_port **p_port);
+
+
+/**
+ * Check if the tone generator is still busy producing some tones.
+ *
+ * @param tonegen	    The tone generator instance.
+ *
+ * @return		    Non-zero if busy.
+ */
+PJ_DECL(pj_bool_t) pjmedia_tonegen_is_busy(pjmedia_port *tonegen);
+
+
+/**
+ * Instruct the tone generator to stop current processing.
+ *
+ * @param tonegen	    The tone generator instance.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_tonegen_stop(pjmedia_port *tonegen);
+
+
+/**
+ * Instruct the tone generator to play single or dual frequency tones 
+ * with the specified duration. The new tones will be appended to currently
+ * playing tones, unless #pjmedia_tonegen_stop() is called before calling
+ * this function. The playback will begin as soon as  the first get_frame()
+ * is called to the generator.
+ *
+ * @param tonegen	    The tone generator instance.
+ * @param count		    The number of tones in the array.
+ * @param tones		    Array of tones to be played.
+ * @param options	    Option flags. Application may specify 
+ *			    PJMEDIA_TONEGEN_LOOP to play the tone in a loop.
+ *
+ * @return		    PJ_SUCCESS on success, or PJ_ETOOMANY if
+ *			    there are too many digits in the queue.
+ */
+PJ_DECL(pj_status_t) pjmedia_tonegen_play(pjmedia_port *tonegen,
+					  unsigned count,
+					  const pjmedia_tone_desc tones[],
+					  unsigned options);
+
+/**
+ * Instruct the tone generator to play multiple MF digits with each of
+ * the digits having individual ON/OFF duration. Each of the digit in the
+ * digit array must have the corresponding descriptor in the digit map.
+ * The new tones will be appended to currently playing tones, unless 
+ * #pjmedia_tonegen_stop() is called before calling this function. 
+ * The playback will begin as soon as the first get_frame() is called 
+ * to the generator.
+ *
+ * @param tonegen	    The tone generator instance.
+ * @param count		    Number of digits in the array.
+ * @param digits	    Array of MF digits.
+ * @param options	    Option flags. Application may specify 
+ *			    PJMEDIA_TONEGEN_LOOP to play the tone in a loop.
+ *
+ * @return		    PJ_SUCCESS on success, or PJ_ETOOMANY if
+ *			    there are too many digits in the queue, or
+ *			    PJMEDIA_RTP_EINDTMF if invalid digit is
+ *			    specified.
+ */
+PJ_DECL(pj_status_t) pjmedia_tonegen_play_digits(pjmedia_port *tonegen,
+						 unsigned count,
+						 const pjmedia_tone_digit digits[],
+						 unsigned options);
+
+
+/**
+ * Get the digit-map currently used by this tone generator.
+ *
+ * @param tonegen	    The tone generator instance.
+ * @param m		    On output, it will be filled with the pointer to
+ *			    the digitmap currently used by the tone generator.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_tonegen_get_digit_map(pjmedia_port *tonegen,
+						   const pjmedia_tone_digit_map **m);
+
+
+/**
+ * Set digit map to be used by the tone generator.
+ *
+ * @param tonegen	    The tone generator instance.
+ * @param m		    Digitmap to be used by the tone generator.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_tonegen_set_digit_map(pjmedia_port *tonegen,
+						   pjmedia_tone_digit_map *m);
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_TONEGEN_PORT_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/transport.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/transport.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/transport.h	(revision 1163)
@@ -0,0 +1,438 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_TRANSPORT_H__
+#define __PJMEDIA_TRANSPORT_H__
+
+
+/**
+ * @file transport.h Media Transport Interface
+ * @brief Transport interface.
+ */
+
+#include <pjmedia/types.h>
+#include <pjmedia/errno.h>
+
+/**
+ * @defgroup PJMEDIA_TRANSPORT Media Transports
+ * @ingroup PJMEDIA
+ * @brief Transports.
+ * Transport related components.
+ */
+
+/**
+ * @defgroup PJMEDIA_TRANSPORT_H Media Network Transport Interface
+ * @ingroup PJMEDIA_TRANSPORT
+ * @brief PJMEDIA object for sending/receiving media packets over the network
+ * @{
+ * The media transport (#pjmedia_transport) is the object to send and
+ * receive media packets over the network. The media transport interface
+ * allows the library to be extended to support different types of 
+ * transports to send and receive packets. Currently only the standard
+ * UDP transport implementation is provided (see \ref PJMEDIA_TRANSPORT_UDP),
+ * but application designer may extend the library to support other types
+ * of custom transports such as RTP/RTCP over TCP, RTP/RTCP over HTTP, etc.
+ *
+ * The media transport is declared as #pjmedia_transport "class", which
+ * declares "interfaces" to use the class in #pjmedia_transport_op
+ * structure. For the user of the media transport (normally the user of
+ * media transport is media stream, see \ref PJMED_STRM), these transport
+ * "methods" are wrapped with API such as #pjmedia_transport_attach(),
+ * so it should not need to call the function pointer inside 
+ * #pjmedia_transport_op directly.
+ *
+ * \section PJMEDIA_TRANSPORT_H_USING Using the Media Transport
+ *
+ * The media transport's life-cycle normally follows the following stages.
+ *
+ * \subsection PJMEDIA_TRANSPORT_H_CREATE Creating the Media Transport
+ *
+ *  Application creates the media transport when it needs to establish
+ *    media session to remote peer. The media transport is created using
+ *    specific function to create that particular transport; for example,
+ *    for UDP media transport, it is created with #pjmedia_transport_udp_create()
+ *    or #pjmedia_transport_udp_create2() functions. Different media
+ *    transports will provide different API to create those transports.
+ *
+ *  Alternatively, application may create pool of media transports when
+ *    it is first started up. Using this approach probably is better, since
+ *    application has to specify the RTP port when sending the initial
+ *    session establishment request (e.g. SIP INVITE request), thus if
+ *    application only creates the media transport later when media is to be
+ *    established (normally when 200/OK is received, or when 18x is received
+ *    for early media), there is a possibility that the particular RTP
+ *    port might have been occupied by other programs. Also it is more
+ *    efficient since sockets don't need to be closed and re-opened between
+ *    calls.
+ *
+ *
+ * \subsection PJMEDIA_TRANSPORT_H_ATTACH Attaching and Using the Media Transport.
+ *
+ *  Application specifies the media transport instance when creating
+ *    the media session (#pjmedia_session_create()). Alternatively, it
+ *    may create the media stream directly with #pjmedia_stream_create()
+ *    and specify the transport instance in the argument. (Note: media
+ *    session is a high-level abstraction for media communications between
+ *    two endpoints, and it may contain more than one media streams, for
+ *    example, an audio stream and a video stream).
+ *
+ *  When stream is created, it will "attach" itself to the media 
+ *    transport by calling #pjmedia_transport_attach(), which is a thin
+ *    wrapper which calls "attach()" method of the media transport's 
+ *    "virtual function pointer" (#pjmedia_transport_op). Among other things,
+ *    the stream specifies two callback functions to the transport: one
+ *    callback function will be called by transport when it receives RTP
+ *    packet, and another callback for incoming RTCP packet. The 
+ *    #pjmedia_transport_attach() function also establish the destination
+ *    of the outgoing RTP and RTCP packets.
+ *
+ *  When the stream needs to send outgoing RTP/RTCP packets, it will
+ *    call #pjmedia_transport_send_rtp() and #pjmedia_transport_send_rtcp()
+ *    of the media transport API, which is a thin wrapper to call send_rtp() 
+ *    and send_rtcp() methods in the media transport's "virtual function 
+ *    pointer"  (#pjmedia_transport_op).
+ *
+ *  When the stream is destroyed, it will "detach" itself from
+ *    the media transport by calling #pjmedia_transport_detach(), which is
+ *    a thin wrapper which calls "detach()" method of the media transport's 
+ *    "virtual function pointer" (#pjmedia_transport_op). After the transport
+ *    is detached from its user (the stream), it will no longer report 
+ *    incoming RTP/RTCP packets to the stream, and it will refuse to send
+ *    outgoing packets since the destination has been cleared.
+ *
+ *
+ * \subsection PJMEDIA_TRANSPORT_H_REUSE Reusing the Media Transport.
+ *
+ *  After transport has been detached, application may re-attach the
+ *    transport to another stream if it wants to. Detaching and re-attaching
+ *    media transport may be preferable than closing and re-opening the
+ *    transport, since it is more efficient (sockets don't need to be
+ *    closed and re-opened). However it is up to the application to choose
+ *    which method is most suitable for its uses.
+ *
+ * 
+ * \subsection PJMEDIA_TRANSPORT_H_DESTROY Destroying the Media Transport.
+ *
+ *  Finally if application no longer needs the media transport, it will
+ *    call #pjmedia_transport_close() function, which is thin wrapper which 
+ *    calls "destroy()" method of the media transport's  "virtual function 
+ *    pointer" (#pjmedia_transport_op). This function releases
+ *    all resources used by the transport, such as sockets and memory.
+ *
+ *
+ * \section PJMEDIA_TRANSPORT_H_IMPL Implementing Media Transport
+ *
+ * To implement a new type of media transport, one needs to "subclass" the
+ * media transport "class" (#pjmedia_transport) by providing the "methods"
+ * in the media transport "interface" (#pjmedia_transport_op), and provides
+ * a function to create this new type of transport (similar to 
+ * #pjmedia_transport_udp_create() function).
+ *
+ * The media transport is expected to run indepently, that is there should
+ * be no polling like function to poll the transport for incoming RTP/RTCP
+ * packets. This normally can be done by registering the media sockets to
+ * the media endpoint's IOQueue, which allows the transport to be notified
+ * when incoming packet has arrived.
+ *
+ * Alternatively, media transport may utilize thread(s) internally to wait
+ * for incoming packets. The thread then will call the appropriate RTP or
+ * RTCP callback provided by its user (stream) whenever packet is received.
+ * If the transport's user is a stream, then the callbacks provided by the
+ * stream will be thread-safe, so the transport may call these callbacks
+ * without having to serialize the access with some mutex protection. But
+ * the media transport may still have to protect its internal data with
+ * mutex protection, since it may be called by application's thread (for
+ * example, to send RTP/RTCP packets).
+ *
+ * For an example of media transport implementation, please refer to 
+ * <tt>transport_udp.h</tt> and <tt>transport_udp.c</tt> in PJMEDIA source
+ * distribution.
+ */
+
+PJ_BEGIN_DECL
+
+
+/*
+ * Forward declaration for media transport.
+ */
+typedef struct pjmedia_transport pjmedia_transport;
+
+
+/**
+ * This structure describes the operations for the stream transport.
+ */
+struct pjmedia_transport_op
+{
+    /**
+     * Get media socket info from the specified transport.
+     *
+     * Application should call #pjmedia_transport_get_info() instead
+     */
+    pj_status_t (*get_info)(pjmedia_transport *tp,
+			    pjmedia_sock_info *info);
+
+    /**
+     * This function is called by the stream when the transport is about
+     * to be used by the stream for the first time, and it tells the transport
+     * about remote RTP address to send the packet and some callbacks to be 
+     * called for incoming packets.
+     *
+     * Application should call #pjmedia_transport_attach() instead of 
+     * calling this function directly.
+     */
+    pj_status_t (*attach)(pjmedia_transport *tp,
+			  void *user_data,
+			  const pj_sockaddr_t *rem_addr,
+			  const pj_sockaddr_t *rem_rtcp,
+			  unsigned addr_len,
+			  void (*rtp_cb)(void *user_data,
+					 const void *pkt,
+					 pj_ssize_t size),
+			  void (*rtcp_cb)(void *user_data,
+					  const void *pkt,
+					  pj_ssize_t size));
+
+    /**
+     * This function is called by the stream when the stream no longer
+     * needs the transport (normally when the stream is about to be closed).
+     * After the transport is detached, it will ignore incoming
+     * RTP/RTCP packets, and will refuse to send outgoing RTP/RTCP packets.
+     * Application may re-attach the media transport to another transport 
+     * user (e.g. stream) after the transport has been detached.
+     *
+     * Application should call #pjmedia_transport_detach() instead of 
+     * calling this function directly.
+     */
+    void (*detach)(pjmedia_transport *tp,
+		   void *user_data);
+
+    /**
+     * This function is called by the stream to send RTP packet using the 
+     * transport.
+     *
+     * Application should call #pjmedia_transport_send_rtp() instead of 
+     * calling this function directly.
+     */
+    pj_status_t (*send_rtp)(pjmedia_transport *tp,
+			    const void *pkt,
+			    pj_size_t size);
+
+    /**
+     * This function is called by the stream to send RTCP packet using the
+     * transport.
+     *
+     * Application should call #pjmedia_transport_send_rtcp() instead of 
+     * calling this function directly.
+     */
+    pj_status_t (*send_rtcp)(pjmedia_transport *tp,
+			     const void *pkt,
+			     pj_size_t size);
+
+    /**
+     * This function can be called to destroy this transport.
+     *
+     * Application should call #pjmedia_transport_close() instead of 
+     * calling this function directly.
+     */
+    pj_status_t (*destroy)(pjmedia_transport *tp);
+};
+
+
+/**
+ * @see pjmedia_transport_op.
+ */
+typedef struct pjmedia_transport_op pjmedia_transport_op;
+
+
+/** 
+ * Media transport type.
+ */
+typedef enum pjmedia_transport_type
+{
+    /** Media transport using standard UDP */
+    PJMEDIA_TRANSPORT_TYPE_UDP,
+
+    /** Media transport using ICE */
+    PJMEDIA_TRANSPORT_TYPE_ICE
+
+} pjmedia_transport_type;
+
+
+/**
+ * This structure declares stream transport. A stream transport is called
+ * by the stream to transmit a packet, and will notify stream when
+ * incoming packet is arrived.
+ */
+struct pjmedia_transport
+{
+    /** Transport name (for logging purpose). */
+    char		     name[PJ_MAX_OBJ_NAME];
+
+    /** Transport type. */
+    pjmedia_transport_type   type;
+
+    /** Transport's "virtual" function table. */
+    pjmedia_transport_op    *op;
+};
+
+
+/**
+ * Get media socket info from the specified transport. The socket info
+ * contains information about the local address of this transport, and
+ * would be needed for example to fill in the "c=" and "m=" line of local 
+ * SDP.
+ *
+ * @param tp	    The transport.
+ * @param info	    Media socket info to be initialized.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_INLINE(pj_status_t) pjmedia_transport_get_info(pjmedia_transport *tp,
+						  pjmedia_sock_info *info)
+{
+    if (tp->op->get_info)
+	return (*tp->op->get_info)(tp, info);
+    else
+	return PJ_ENOTSUP;
+}
+
+
+/**
+ * Attach callbacks to be called on receipt of incoming RTP/RTCP packets.
+ * This is just a simple wrapper which calls <tt>attach()</tt> member of 
+ * the transport.
+ *
+ * @param tp	    The media transport.
+ * @param user_data Arbitrary user data to be set when the callbacks are 
+ *		    called.
+ * @param rem_addr  Remote RTP address to send RTP packet to.
+ * @param rem_rtcp  Optional remote RTCP address. If the argument is NULL
+ *		    or if the address is zero, the RTCP address will be
+ *		    calculated from the RTP address (which is RTP port
+ *		    plus one).
+ * @param addr_len  Length of the remote address.
+ * @param rtp_cb    Callback to be called when RTP packet is received on
+ *		    the transport.
+ * @param rtcp_cb   Callback to be called when RTCP packet is received on
+ *		    the transport.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_INLINE(pj_status_t) pjmedia_transport_attach(pjmedia_transport *tp,
+					        void *user_data,
+					        const pj_sockaddr_t *rem_addr,
+						const pj_sockaddr_t *rem_rtcp,
+					        unsigned addr_len,
+					        void (*rtp_cb)(void *user_data,
+							       const void *pkt,
+							       pj_ssize_t),
+					        void (*rtcp_cb)(void *usr_data,
+							        const void*pkt,
+							        pj_ssize_t))
+{
+    return tp->op->attach(tp, user_data, rem_addr, rem_rtcp, addr_len, 
+			  rtp_cb, rtcp_cb);
+}
+
+
+/**
+ * Detach callbacks from the transport.
+ * This is just a simple wrapper which calls <tt>detach()</tt> member of 
+ * the transport. After the transport is detached, it will ignore incoming
+ * RTP/RTCP packets, and will refuse to send outgoing RTP/RTCP packets.
+ * Application may re-attach the media transport to another transport user
+ * (e.g. stream) after the transport has been detached.
+ *
+ * @param tp	    The media transport.
+ * @param user_data User data which must match the previously set value
+ *		    on attachment.
+ */
+PJ_INLINE(void) pjmedia_transport_detach(pjmedia_transport *tp,
+					 void *user_data)
+{
+    tp->op->detach(tp, user_data);
+}
+
+
+/**
+ * Send RTP packet with the specified media transport. This is just a simple
+ * wrapper which calls <tt>send_rtp()</tt> member of the transport. The 
+ * RTP packet will be delivered to the destination address specified in
+ * #pjmedia_transport_attach() function.
+ *
+ * @param tp	    The media transport.
+ * @param pkt	    The packet to send.
+ * @param size	    Size of the packet.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_INLINE(pj_status_t) pjmedia_transport_send_rtp(pjmedia_transport *tp,
+						  const void *pkt,
+						  pj_size_t size)
+{
+    return (*tp->op->send_rtp)(tp, pkt, size);
+}
+
+
+/**
+ * Send RTCP packet with the specified media transport. This is just a simple
+ * wrapper which calls <tt>send_rtcp()</tt> member of the transport. The 
+ * RTCP packet will be delivered to the destination address specified in
+ * #pjmedia_transport_attach() function.
+ *
+ * @param tp	    The media transport.
+ * @param pkt	    The packet to send.
+ * @param size	    Size of the packet.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_INLINE(pj_status_t) pjmedia_transport_send_rtcp(pjmedia_transport *tp,
+						  const void *pkt,
+						  pj_size_t size)
+{
+    return (*tp->op->send_rtcp)(tp, pkt, size);
+}
+
+
+/**
+ * Close media transport. This is just a simple wrapper which calls 
+ * <tt>destroy()</tt> member of the transport. This function will free
+ * all resources created by this transport (such as sockets, memory, etc.).
+ *
+ * @param tp	    The media transport.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_INLINE(pj_status_t) pjmedia_transport_close(pjmedia_transport *tp)
+{
+    if (tp->op->destroy)
+	return (*tp->op->destroy)(tp);
+    else
+	return PJ_SUCCESS;
+}
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_TRANSPORT_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/transport_ice.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/transport_ice.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/transport_ice.h	(revision 1163)
@@ -0,0 +1,214 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_ice_H__
+#define __pjmedia_ice_H__
+
+
+/**
+ * @file transport_ice.h
+ * @brief ICE capable media transport.
+ */
+
+#include <pjmedia/stream.h>
+#include <pjnath/ice_strans.h>
+
+
+/**
+ * @defgroup PJMEDIA_TRANSPORT_ICE ICE Capable media transport 
+ * @ingroup PJMEDIA_TRANSPORT
+ * @brief Implementation of media transport with ICE.
+ * @{
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Create the media transport.
+ *
+ * @param endpt		The media endpoint.
+ * @param name		Optional name to identify this ICE media transport
+ *			for logging purposes.
+ * @param comp_cnt	Number of components to be created.
+ * @param stun_cfg	Pointer to STUN configuration settings.
+ * @param p_tp		Pointer to receive the media transport instance.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_ice_create(pjmedia_endpt *endpt,
+					const char *name,
+					unsigned comp_cnt,
+					pj_stun_config *stun_cfg,
+					pjmedia_transport **p_tp);
+
+/**
+ * Destroy the media transport.
+ *
+ * @param tp		The media transport.
+ *
+ * @return		PJ_SUCCESS.
+ */
+PJ_DECL(pj_status_t) pjmedia_ice_destroy(pjmedia_transport *tp);
+
+
+/**
+ * Start the initialization process of this media transport. This function
+ * will gather the transport addresses to be registered to ICE session as
+ * candidates. If STUN is configured, this will start the STUN Binding or
+ * Allocate request to get the STUN server reflexive or relayed address.
+ * This function will return immediately, and application should poll the
+ * STUN completion status by calling #pjmedia_ice_get_init_status().
+ *
+ * @param tp		The media transport.
+ * @param options	Options, see pj_ice_strans_option in PJNATH 
+ *			documentation.
+ * @param start_addr	Local address where socket will be bound to. This
+ *			address will be used as follows:
+ *			- if the value is NULL, then socket will be bound
+ *			  to any available port.
+ *			- if the value is not NULL, then if the port number
+ *			  is not zero, it will used as the starting port 
+ *			  where the socket will be bound to. If bind() to
+ *			  this port fails, this function will try to bind
+ *			  to port+2, repeatedly until it succeeded.
+ *			  If application doesn't want this function to 
+ *			  retry binding the socket to other port, it can
+ *			  specify PJ_ICE_ST_OPT_NO_PORT_RETRY option.
+ *			- if the value is not NULL, then if the address
+ *			  is not INADDR_ANY, this function will bind the
+ *			  socket to this particular interface only, and
+ *			  no other host candidates will be added for this
+ *			  socket.
+ * @param stun_srv	Address of the STUN server, or NULL if STUN server
+ *			reflexive mapping is not to be used.
+ * @param turn_srv	Address of the TURN server, or NULL if TURN relay
+ *			is not to be used.
+ *
+ * @return		PJ_SUCCESS when the initialization process has started
+ *			successfully, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_ice_start_init(pjmedia_transport *tp,
+					    unsigned options,
+					    const pj_sockaddr_in *start_addr,
+					    const pj_sockaddr_in *stun_srv,
+					    const pj_sockaddr_in *turn_srv);
+
+/**
+ * Poll the initialization status of this media transport.
+ *
+ * @param tp		The media transport.
+ *
+ * @return		PJ_SUCCESS if all candidates have been resolved
+ *			successfully, PJ_EPENDING if transport resolution
+ *			is still in progress, or other status on failure.
+ */
+PJ_DECL(pj_status_t) pjmedia_ice_get_init_status(pjmedia_transport *tp);
+
+
+/**
+ * Get the ICE stream transport component for the specified component ID.
+ *
+ * @param tp		The media transport.
+ * @param comp_id	The component ID.
+ * @param comp		The structure which will be filled with the
+ *			component.
+ *
+ * @return		PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_ice_get_comp(pjmedia_transport *tp,
+					  unsigned comp_id,
+					  pj_ice_strans_comp *comp);
+
+/**
+ * Initialize the ICE session.
+ *
+ * @param tp		The media transport.
+ * @param role		ICE role.
+ * @param local_ufrag	Optional local username fragment.
+ * @param local_passwd	Optional local password.
+ *
+ * @return		PJ_SUCCESS, or the appropriate error code.
+
+ */
+PJ_DECL(pj_status_t) pjmedia_ice_init_ice(pjmedia_transport *tp,
+					  pj_ice_sess_role role,
+					  const pj_str_t *local_ufrag,
+					  const pj_str_t *local_passwd);
+
+/**
+ * Modify the SDP to add ICE specific SDP attributes before sending
+ * the SDP to remote host.
+ *
+ * @param tp		The media transport.
+ * @param pool		Pool to allocate memory for the SDP elements.
+ * @param sdp		The SDP descriptor to be modified.
+ *
+ * @return		PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_ice_modify_sdp(pjmedia_transport *tp,
+					    pj_pool_t *pool,
+					    pjmedia_sdp_session *sdp);
+
+/**
+ * Start ICE connectivity checks.
+ *
+ * This function will pair the local and remote candidates to create 
+ * check list. Once the check list is created and sorted based on the
+ * priority, ICE periodic checks will be started. This function will 
+ * return immediately, and application will be notified about the 
+ * connectivity check status in the callback.
+ *
+ * @param tp		The media transport.
+ * @param pool		Memory pool to parse the SDP.
+ * @param rem_sdp	The SDP received from remote agent.
+ * @param media_index	The media index (in SDP) to process.
+ *
+ * @return		PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_ice_start_ice(pjmedia_transport *tp,
+					   pj_pool_t *pool,
+					   const pjmedia_sdp_session *rem_sdp,
+					   unsigned media_index);
+
+/**
+ * Stop the ICE session (typically when the call is terminated). Application
+ * may restart the ICE session again by calling #pjmedia_ice_init_ice(),
+ * for example to use this media transport for the next call.
+ *
+ * @param tp		The media transport.
+ *
+ * @return		PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_ice_stop_ice(pjmedia_transport *tp);
+
+
+
+
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+
+#endif	/* __pjmedia_ice_H__ */
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/transport_udp.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/transport_udp.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/transport_udp.h	(revision 1163)
@@ -0,0 +1,186 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_TRANSPORT_UDP_H__
+#define __PJMEDIA_TRANSPORT_UDP_H__
+
+
+/**
+ * @file transport_udp.h
+ * @brief Stream transport with UDP.
+ */
+
+#include <pjmedia/stream.h>
+
+
+/**
+ * @defgroup PJMEDIA_TRANSPORT_UDP UDP Socket Transport
+ * @ingroup PJMEDIA_TRANSPORT
+ * @brief Implementation of media transport with UDP sockets.
+ * @{
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Options that can be specified when creating UDP transport.
+ */
+enum pjmedia_transport_udp_options
+{
+    /**
+     * Normally the UDP transport will continuously check the source address
+     * of incoming packets to see if it is different than the configured
+     * remote address, and switch the remote address to the source address
+     * of the packet if they are different after several packets are
+     * received.
+     * Specifying this option will disable this feature.
+     */
+    PJMEDIA_UDP_NO_SRC_ADDR_CHECKING = 1
+};
+
+
+/**
+ * UDP transport info.
+ */
+typedef struct pjmedia_transport_udp_info
+{
+    /**
+     * Media socket info.
+     */
+    pjmedia_sock_info	skinfo;
+
+} pjmedia_transport_udp_info;
+
+
+/**
+ * Create an RTP and RTCP sockets and bind the sockets to the specified
+ * port to create media transport.
+ *
+ * @param endpt	    The media endpoint instance.
+ * @param name	    Optional name to be assigned to the transport.
+ * @param port	    UDP port number for the RTP socket. The RTCP port number
+ *		    will be set to one above RTP port.
+ * @param options   Options, bitmask of #pjmedia_transport_udp_options.
+ * @param p_tp	    Pointer to receive the transport instance.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_transport_udp_create(pjmedia_endpt *endpt,
+						  const char *name,
+						  int port,
+						  unsigned options,
+						  pjmedia_transport **p_tp);
+
+
+/**
+ * Create an RTP and RTCP sockets and bind the sockets to the specified
+ * address and port to create media transport.
+ *
+ * @param endpt	    The media endpoint instance.
+ * @param name	    Optional name to be assigned to the transport.
+ * @param addr	    Optional local address to bind the sockets to. If this
+ *		    argument is NULL or empty, the sockets will be bound
+ *		    to all interface.
+ * @param port	    UDP port number for the RTP socket. The RTCP port number
+ *		    will be set to one above RTP port.
+ * @param options   Options, bitmask of #pjmedia_transport_udp_options.
+ * @param p_tp	    Pointer to receive the transport instance.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_transport_udp_create2(pjmedia_endpt *endpt,
+						   const char *name,
+						   const pj_str_t *addr,
+						   int port,
+						   unsigned options,
+						   pjmedia_transport **p_tp);
+
+/**
+ * Get media socket info from the specified UDP transport.
+ *
+ * @param tp	    The UDP transport interface.
+ * @param info	    Media socket info to be initialized.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_transport_udp_get_info( pjmedia_transport *tp,
+				pjmedia_transport_udp_info *info);
+
+
+/**
+ * Create UDP stream transport from existing sockets. Use this function when
+ * the sockets have previously been created.
+ *
+ * @param endpt	    The media endpoint instance.
+ * @param name	    Optional name to be assigned to the transport.
+ * @param si	    Media socket info containing the RTP and RTCP sockets.
+ * @param options   Options, bitmask of #pjmedia_transport_udp_options.
+ * @param p_tp	    Pointer to receive the transport instance.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_transport_udp_attach(pjmedia_endpt *endpt,
+						  const char *name,
+						  const pjmedia_sock_info *si,
+						  unsigned options,
+						  pjmedia_transport **p_tp);
+
+
+/**
+ * Simulate packet lost in the specified direction (for testing purposes).
+ * When enabled, the transport will randomly drop packets to the specified
+ * direction.
+ *
+ * @param tp	    The UDP media transport.
+ * @param dir	    Media direction to which packets will be randomly dropped.
+ * @param pct_lost  Percent lost (0-100). Set to zero to disable packet
+ *		    lost simulation.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_transport_udp_simulate_lost(pjmedia_transport *tp,
+							 pjmedia_dir dir,
+							 unsigned pct_lost);
+
+
+
+/**
+ * Close UDP transport. Application can also use the "destroy" member of
+ * media transport interface to close the UDP transport.
+ *
+ * @param tp	    The UDP media transport.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_transport_udp_close(pjmedia_transport *tp);
+
+
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_TRANSPORT_UDP_H__ */
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/types.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/types.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/types.h	(revision 1163)
@@ -0,0 +1,212 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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>	    /* pjmedia_sock_info	*/
+#include <pj/string.h>	    /* pj_memcpy(), pj_memset() */
+
+
+/**
+ * @defgroup PJMEDIA_FRAME_OP Frame Operations
+ * @ingroup PJMEDIA
+ */
+
+/**
+ * @defgroup PJMEDIA_MISC Misc
+ * @ingroup PJMEDIA
+ */
+
+/**
+ * @defgroup PJMEDIA_TYPES Basic Types
+ * @ingroup PJMEDIA_BASE
+ * @brief Basic PJMEDIA types and operations.
+ * @{
+ */
+
+/** 
+ * Top most media type. 
+ */
+typedef enum pjmedia_type
+{
+    /** No type. */
+    PJMEDIA_TYPE_NONE = 0,
+
+    /** The media is audio */
+    PJMEDIA_TYPE_AUDIO = 1,
+
+    /** The media is video. */
+    PJMEDIA_TYPE_VIDEO = 2,
+
+    /** Unknown media type, in this case the name will be specified in 
+     *  encoding_name.
+     */
+    PJMEDIA_TYPE_UNKNOWN = 3
+
+} pjmedia_type;
+
+
+
+/** 
+ * Media direction. 
+ */
+typedef enum pjmedia_dir
+{
+    /** None */
+    PJMEDIA_DIR_NONE = 0,
+
+    /** Encoding (outgoing to network) stream */
+    PJMEDIA_DIR_ENCODING = 1,
+
+    /** Decoding (incoming from network) stream. */
+    PJMEDIA_DIR_DECODING = 2,
+
+    /** Incoming and outgoing stream. */
+    PJMEDIA_DIR_ENCODING_DECODING = 3
+
+} pjmedia_dir;
+
+
+
+/* Alternate names for media direction: */
+
+/**
+ * Direction is capturing audio frames.
+ */
+#define PJMEDIA_DIR_CAPTURE	PJMEDIA_DIR_ENCODING
+
+/**
+ * Direction is playback of audio frames.
+ */
+#define PJMEDIA_DIR_PLAYBACK	PJMEDIA_DIR_DECODING
+
+/**
+ * Direction is both capture and playback.
+ */
+#define PJMEDIA_DIR_CAPTURE_PLAYBACK	PJMEDIA_DIR_ENCODING_DECODING
+
+
+/**
+ * Create 32bit port signature from ASCII characters.
+ */
+#define PJMEDIA_PORT_SIGNATURE(a,b,c,d)	    \
+	    (a<<24 | b<<16 | c<<8 | d)
+
+
+/** 
+ * Opague declaration of media endpoint. 
+ */
+typedef struct pjmedia_endpt pjmedia_endpt;
+
+
+/*
+ * Forward declaration for stream (needed by transport).
+ */
+typedef struct pjmedia_stream pjmedia_stream;
+
+
+/** 
+ * Media socket info is used to describe the underlying sockets
+ * to be used as media transport.
+ */
+typedef struct pjmedia_sock_info
+{
+    /** The RTP socket handle */
+    pj_sock_t	    rtp_sock;
+
+    /** Address to be advertised as the local address for the RTP
+     *  socket, which does not need to be equal as the bound
+     *  address (for example, this address can be the address resolved
+     *  with STUN).
+     */
+    pj_sockaddr_in  rtp_addr_name;
+
+    /** The RTCP socket handle. */
+    pj_sock_t	    rtcp_sock;
+
+    /** Address to be advertised as the local address for the RTCP
+     *  socket, which does not need to be equal as the bound
+     *  address (for example, this address can be the address resolved
+     *  with STUN).
+     */
+    pj_sockaddr_in  rtcp_addr_name;
+
+} pjmedia_sock_info;
+
+
+/**
+ * This is a general purpose function set PCM samples to zero.
+ * Since this function is needed by many parts of the library, 
+ * by putting this functionality in one place, it enables some.
+ * clever people to optimize this function.
+ *
+ * @param samples	The 16bit PCM samples.
+ * @param count		Number of samples.
+ */
+PJ_INLINE(void) pjmedia_zero_samples(pj_int16_t *samples, unsigned count)
+{
+#if 1
+    pj_bzero(samples, count*sizeof(pj_int16_t));
+#elif 0
+    unsigned i;
+    for (i=0; i<count; ++i) samples[i] = 0;
+#else
+    unsigned i;
+    count >>= 1;
+    for (i=0; i<count; ++i) ((pj_int32_t*)samples)[i] = (pj_int32_t)0;
+#endif
+}
+
+
+/**
+ * This is a general purpose function to copy samples from/to buffers with
+ * equal size. Since this function is needed by many parts of the library, 
+ * by putting this functionality in one place, it enables some.
+ * clever people to optimize this function.
+ */
+PJ_INLINE(void) pjmedia_copy_samples(pj_int16_t *dst, const pj_int16_t *src,
+				     unsigned count)
+{
+#if 1
+    pj_memcpy(dst, src, count*sizeof(pj_int16_t));
+#elif 0
+    unsigned i;
+    for (i=0; i<count; ++i) dst[i] = src[i];
+#else
+    unsigned i;
+    count >>= 1;
+    for (i=0; i<count; ++i) 
+	((pj_int32_t*)dst)[i] = ((pj_int32_t*)src)[i];
+#endif
+}
+
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_TYPES_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/wav_playlist.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/wav_playlist.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/wav_playlist.h	(revision 1163)
@@ -0,0 +1,103 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_WAV_PLAYLIST_H__
+#define __PJMEDIA_WAV_PLAYLIST_H__
+
+/**
+ * @file wav_playlist.h
+ * @brief WAV file playlist.
+ */
+#include <pjmedia/wav_port.h>
+
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJMEDIA_WAV_PLAYLIST WAV File Play List
+ * @ingroup PJMEDIA_PORT
+ * @brief WAV File Playlist
+ * @{
+ * The WAV play list port enables application to play back multiple
+ * WAV files in a playlist.
+ */
+
+/**
+ * Create a WAV playlist from the array of WAV file names. The WAV
+ * files must have the same clock rate, number of channels, and bits
+ * per sample, or otherwise this function will return error.
+ *
+ * @param pool		Pool to create memory buffers for this port.
+ * @param port_label	Optional label to set as the port name.
+ * @param file_list	Array of WAV file names.
+ * @param file_count	Number of files in the array.
+ * @param ptime		The duration (in miliseconds) of each frame read
+ *			from this port. If the value is zero, the default
+ *			duration (20ms) will be used.
+ * @param options	Optional options. Application may specify 
+ *			PJMEDIA_FILE_NO_LOOP to prevent play back loop.
+ * @param buff_size	Buffer size to be allocated. If the value is zero or
+ *			negative, the port will use default buffer size (which
+ *			is about 4KB).
+ * @param p_port	Pointer to receive the file port instance.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjmedia_wav_playlist_create(pj_pool_t *pool,
+						 const pj_str_t *port_label,
+						 const pj_str_t file_list[],
+						 int file_count,
+						 unsigned ptime,
+						 unsigned options,
+						 pj_ssize_t buff_size,
+						 pjmedia_port **p_port);
+
+
+/**
+ * Register a callback to be called when the file reading has reached the
+ * end of file of the last file. If the file is set to play repeatedly, 
+ * then the callback will be called multiple times. Note that only one 
+ * callback can be registered for each file port.
+ *
+ * @param port		The WAV play list port.
+ * @param user_data	User data to be specified in the callback
+ * @param cb		Callback to be called. If the callback returns non-
+ *			PJ_SUCCESS, the playback will stop. Note that if
+ *			application destroys the file port in the callback,
+ *			it must return non-PJ_SUCCESS here.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t)
+pjmedia_wav_playlist_set_eof_cb(pjmedia_port *port,
+			        void *user_data,
+			        pj_status_t (*cb)(pjmedia_port *port,
+						  void *usr_data));
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJMEDIA_WAV_PLAYLIST_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/wav_port.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/wav_port.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/wav_port.h	(revision 1163)
@@ -0,0 +1,211 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_WAV_PORT_H__
+#define __PJMEDIA_WAV_PORT_H__
+
+/**
+ * @file wav_port.h
+ * @brief WAV file player and writer.
+ */
+#include <pjmedia/port.h>
+
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJMEDIA_FILE_PLAY WAV File Player
+ * @ingroup PJMEDIA_PORT
+ * @brief WAV File Player
+ * @{
+ */
+
+/**
+ * WAV file player options.
+ */
+enum pjmedia_file_player_option
+{
+    /**
+     * Tell the file player to return NULL frame when the whole
+     * file has been played.
+     */
+    PJMEDIA_FILE_NO_LOOP = 1
+};
+
+
+/**
+ * Create a media port to play streams from a WAV file.
+ *
+ * @param pool		Pool to create memory buffers for this port.
+ * @param filename	File name to open.
+ * @param ptime		The duration (in miliseconds) of each frame read
+ *			from this port. If the value is zero, the default
+ *			duration (20ms) will be used.
+ * @param flags		Port creation flags.
+ * @param buff_size	Buffer size to be allocated. If the value is zero or
+ *			negative, the port will use default buffer size (which
+ *			is about 4KB).
+ * @param p_port	Pointer to receive the file port instance.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_wav_player_port_create( pj_pool_t *pool,
+						     const char *filename,
+						     unsigned ptime,
+						     unsigned flags,
+						     pj_ssize_t buff_size,
+						     pjmedia_port **p_port );
+
+
+/**
+ * Set the file play position of WAV player.
+ *
+ * @param port		The file player port.
+ * @param offset	Playback position in bytes, relative to the start of
+ *			the payload.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_wav_player_port_set_pos( pjmedia_port *port,
+						      pj_uint32_t offset );
+
+
+/**
+ * Get the file play position of WAV player.
+ *
+ * @param port		The file player port.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_ssize_t) pjmedia_wav_player_port_get_pos( pjmedia_port *port );
+
+
+/**
+ * Register a callback to be called when the file reading has reached the
+ * end of file. If the file is set to play repeatedly, then the callback
+ * will be called multiple times. Note that only one callback can be 
+ * registered for each file port.
+ *
+ * @param port		The file player port.
+ * @param user_data	User data to be specified in the callback
+ * @param cb		Callback to be called. If the callback returns non-
+ *			PJ_SUCCESS, the playback will stop. Note that if
+ *			application destroys the file port in the callback,
+ *			it must return non-PJ_SUCCESS here.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_wav_player_set_eof_cb( pjmedia_port *port,
+			       void *user_data,
+			       pj_status_t (*cb)(pjmedia_port *port,
+						 void *usr_data));
+
+/**
+ * @}
+ */
+
+
+/**
+ * @defgroup PJMEDIA_FILE_REC File Writer (Recorder)
+ * @ingroup PJMEDIA_PORT
+ * @brief WAV File Writer (Recorder)
+ * @{
+ */
+
+
+
+/**
+ * Create a media port to record streams to a WAV file. Note that the port
+ * must be closed properly (with #pjmedia_port_destroy()) so that the WAV
+ * header can be filled with correct values (such as the file length).
+ *
+ * @param pool		    Pool to create memory buffers for this port.
+ * @param filename	    File name.
+ * @param clock_rate	    The sampling rate.
+ * @param channel_count	    Number of channels.
+ * @param samples_per_frame Number of samples per frame.
+ * @param bits_per_sample   Number of bits per sample (eg 16).
+ * @param flags		    Port creation flags (must be 0 at present).
+ * @param buff_size	    Buffer size to be allocated. If the value is 
+ *			    zero or negative, the port will use default buffer
+ *			    size (which is about 4KB).
+  * @param p_port	    Pointer to receive the file port instance.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_wav_writer_port_create(pj_pool_t *pool,
+						    const char *filename,
+						    unsigned clock_rate,
+						    unsigned channel_count,
+						    unsigned samples_per_frame,
+						    unsigned bits_per_sample,
+						    unsigned flags,
+						    pj_ssize_t buff_size,
+						    pjmedia_port **p_port );
+
+
+/**
+ * Get current writing position. Note that this does not necessarily match
+ * the size written to the file, since the WAV writer employs some internal
+ * buffering. Also the value reported here only indicates the payload size
+ * (it does not include the size of the WAV header),
+ *
+ * @param port		The file writer port.
+ *
+ * @return		Positive value to indicate the position (in bytes), 
+ *			or negative value containing the error code.
+ */
+PJ_DECL(pj_ssize_t) pjmedia_wav_writer_port_get_pos( pjmedia_port *port );
+
+
+/**
+ * Register the callback to be called when the file writing has reached
+ * certain size. Application can use this callback, for example, to limit
+ * the size of the output file.
+ *
+ * @param port		The file writer port.
+ * @param pos		The file position on which the callback will be called.
+ * @param user_data	User data to be specified in the callback, and will be
+ *			given on the callback.
+ * @param cb		Callback to be called. If the callback returns non-
+ *			PJ_SUCCESS, the writing will stop. Note that if 
+ *			application destroys the port in the callback, it must
+ *			return non-PJ_SUCCESS here.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) 
+pjmedia_wav_writer_port_set_cb( pjmedia_port *port,
+				pj_size_t pos,
+				void *user_data,
+				pj_status_t (*cb)(pjmedia_port *port,
+						  void *usr_data));
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJMEDIA_WAV_PORT_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/wave.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/wave.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/include/pjmedia/wave.h	(revision 1163)
@@ -0,0 +1,158 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_WAVE_H__
+#define __PJMEDIA_WAVE_H__
+
+
+/**
+ * @file wave.h
+ * @brief WAVE file manipulation.
+ */
+#include <pjmedia/types.h>
+
+
+/**
+ * @defgroup PJMEDIA_WAVE WAVE Header
+ * @ingroup PJMEDIA_MISC
+ * @{
+ *
+ * Supports for simple/canonical Microsoft RIFF WAVE format.
+ */
+
+
+PJ_BEGIN_DECL
+
+/**
+ * Standard RIFF tag to identify RIFF file format in the WAVE header.
+ */
+#define PJMEDIA_RIFF_TAG	('F'<<24|'F'<<16|'I'<<8|'R')
+
+/**
+ * Standard WAVE tag to identify WAVE header.
+ */
+#define PJMEDIA_WAVE_TAG	('E'<<24|'V'<<16|'A'<<8|'W')
+
+/**
+ * Standard FMT tag to identify format chunks.
+ */
+#define PJMEDIA_FMT_TAG		(' '<<24|'t'<<16|'m'<<8|'f')
+
+/**
+ * Standard DATA tag to identify data chunks.
+ */
+#define PJMEDIA_DATA_TAG	('a'<<24|'t'<<16|'a'<<8|'d')
+
+
+/**
+ * This file describes the simpler/canonical version of a WAVE file.
+ * It does not support the full RIFF format specification.
+ */
+struct pjmedia_wave_hdr
+{
+    /** This structure describes RIFF WAVE file header */
+    struct {
+	pj_uint32_t riff;		/**< "RIFF" ASCII tag.		*/
+	pj_uint32_t file_len;		/**< File length minus 8 bytes	*/
+	pj_uint32_t wave;		/**< "WAVE" ASCII tag.		*/
+    } riff_hdr;
+
+    /** This structure describes format chunks/header  */
+    struct {
+	pj_uint32_t fmt;		/**< "fmt " ASCII tag.		*/
+	pj_uint32_t len;		/**< 16 for PCM.		*/
+	pj_uint16_t fmt_tag;		/**< 1 for PCM			*/
+	pj_uint16_t nchan;		/**< Number of channels.	*/
+	pj_uint32_t sample_rate;	/**< Sampling rate.		*/
+	pj_uint32_t bytes_per_sec;	/**< Average bytes per second.	*/
+	pj_uint16_t block_align;	/**< nchannels * bits / 8	*/
+	pj_uint16_t bits_per_sample;	/**< Bits per sample.		*/
+    } fmt_hdr;
+
+    /** The data header preceeds the actual data in the file. */
+    struct {
+	pj_uint32_t data;		/**< "data" ASCII tag.		*/
+	pj_uint32_t len;		/**< Data length.		*/
+    } data_hdr;
+};
+
+/**
+ * @see pjmedia_wave_hdr
+ */
+typedef struct pjmedia_wave_hdr pjmedia_wave_hdr;
+
+/**
+ * This structure describes generic RIFF subchunk header.
+ */
+typedef struct pjmedia_wave_subchunk
+{
+    pj_uint32_t	    id;			/**< Subchunk ASCII tag.	    */
+    pj_uint32_t	    len;		/**< Length following this field    */
+} pjmedia_wave_subchunk;
+
+
+/**
+ * Normalize subchunk header from little endian (the representation of
+ * RIFF file) into host's endian.
+ */
+#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0
+#   define PJMEDIA_WAVE_NORMALIZE_SUBCHUNK(ch)  \
+	    do { \
+		(ch)->id = pj_swap32((ch)->id); \
+		(ch)->len = pj_swap32((ch)->len); \
+	    } while (0)
+#else
+#   define PJMEDIA_WAVE_NORMALIZE_SUBCHUNK(ch)
+#endif
+
+
+/**
+ * On big-endian hosts, this function swaps the byte order of the values
+ * in the WAVE header fields. On little-endian hosts, this function does 
+ * nothing.
+ *
+ * Application SHOULD call this function after reading the WAVE header
+ * chunks from a file.
+ *
+ * @param hdr	    The WAVE header.
+ */
+PJ_DECL(void) pjmedia_wave_hdr_file_to_host( pjmedia_wave_hdr *hdr );
+
+
+/**
+ * On big-endian hosts, this function swaps the byte order of the values
+ * in the WAVE header fields. On little-endian hosts, this function does 
+ * nothing.
+ *
+ * Application SHOULD call this function before writing the WAVE header
+ * to a file.
+ *
+ * @param hdr	    The WAVE header.
+ */
+PJ_DECL(void) pjmedia_wave_hdr_host_to_file( pjmedia_wave_hdr *hdr );
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJMEDIA_WAVE_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm.c	(revision 1163)
@@ -0,0 +1,600 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 <pjmedia-codec/gsm.h>
+#include <pjmedia/codec.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/endpoint.h>
+#include <pjmedia/plc.h>
+#include <pjmedia/port.h>
+#include <pjmedia/silencedet.h>
+#include <pj/assert.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/os.h>
+#include "gsm/gsm.h"
+
+/*
+ * Only build this file if PJMEDIA_HAS_GSM_CODEC != 0
+ */
+#if defined(PJMEDIA_HAS_GSM_CODEC) && PJMEDIA_HAS_GSM_CODEC != 0
+
+
+/* Prototypes for GSM factory */
+static pj_status_t gsm_test_alloc( pjmedia_codec_factory *factory, 
+				   const pjmedia_codec_info *id );
+static pj_status_t gsm_default_attr( pjmedia_codec_factory *factory, 
+				     const pjmedia_codec_info *id, 
+				     pjmedia_codec_param *attr );
+static pj_status_t gsm_enum_codecs( pjmedia_codec_factory *factory, 
+				    unsigned *count, 
+				    pjmedia_codec_info codecs[]);
+static pj_status_t gsm_alloc_codec( pjmedia_codec_factory *factory, 
+				    const pjmedia_codec_info *id, 
+				    pjmedia_codec **p_codec);
+static pj_status_t gsm_dealloc_codec( pjmedia_codec_factory *factory, 
+				      pjmedia_codec *codec );
+
+/* Prototypes for GSM implementation. */
+static pj_status_t  gsm_codec_init( pjmedia_codec *codec, 
+				    pj_pool_t *pool );
+static pj_status_t  gsm_codec_open( pjmedia_codec *codec, 
+				    pjmedia_codec_param *attr );
+static pj_status_t  gsm_codec_close( pjmedia_codec *codec );
+static pj_status_t  gsm_codec_modify(pjmedia_codec *codec, 
+				     const pjmedia_codec_param *attr );
+static pj_status_t  gsm_codec_parse( pjmedia_codec *codec,
+				     void *pkt,
+				     pj_size_t pkt_size,
+				     const pj_timestamp *ts,
+				     unsigned *frame_cnt,
+				     pjmedia_frame frames[]);
+static pj_status_t  gsm_codec_encode( pjmedia_codec *codec, 
+				      const struct pjmedia_frame *input,
+				      unsigned output_buf_len, 
+				      struct pjmedia_frame *output);
+static pj_status_t  gsm_codec_decode( pjmedia_codec *codec, 
+				      const struct pjmedia_frame *input,
+				      unsigned output_buf_len, 
+				      struct pjmedia_frame *output);
+static pj_status_t  gsm_codec_recover(pjmedia_codec *codec,
+				      unsigned output_buf_len,
+				      struct pjmedia_frame *output);
+
+/* Definition for GSM codec operations. */
+static pjmedia_codec_op gsm_op = 
+{
+    &gsm_codec_init,
+    &gsm_codec_open,
+    &gsm_codec_close,
+    &gsm_codec_modify,
+    &gsm_codec_parse,
+    &gsm_codec_encode,
+    &gsm_codec_decode,
+    &gsm_codec_recover
+};
+
+/* Definition for GSM codec factory operations. */
+static pjmedia_codec_factory_op gsm_factory_op =
+{
+    &gsm_test_alloc,
+    &gsm_default_attr,
+    &gsm_enum_codecs,
+    &gsm_alloc_codec,
+    &gsm_dealloc_codec
+};
+
+/* GSM factory */
+static struct gsm_codec_factory
+{
+    pjmedia_codec_factory    base;
+    pjmedia_endpt	    *endpt;
+    pj_pool_t		    *pool;
+    pj_mutex_t		    *mutex;
+    pjmedia_codec	     codec_list;
+} gsm_codec_factory;
+
+
+/* GSM codec private data. */
+struct gsm_data
+{
+    void		*encoder;
+    void		*decoder;
+    pj_bool_t		 plc_enabled;
+    pjmedia_plc		*plc;
+    pj_bool_t		 vad_enabled;
+    pjmedia_silence_det	*vad;
+    pj_timestamp	 last_tx;
+};
+
+
+
+/*
+ * Initialize and register GSM codec factory to pjmedia endpoint.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_gsm_init( pjmedia_endpt *endpt )
+{
+    pjmedia_codec_mgr *codec_mgr;
+    pj_status_t status;
+
+    if (gsm_codec_factory.pool != NULL)
+	return PJ_SUCCESS;
+
+    /* Create GSM codec factory. */
+    gsm_codec_factory.base.op = &gsm_factory_op;
+    gsm_codec_factory.base.factory_data = NULL;
+    gsm_codec_factory.endpt = endpt;
+
+    gsm_codec_factory.pool = pjmedia_endpt_create_pool(endpt, "gsm", 4000, 
+						       4000);
+    if (!gsm_codec_factory.pool)
+	return PJ_ENOMEM;
+
+    pj_list_init(&gsm_codec_factory.codec_list);
+
+    /* Create mutex. */
+    status = pj_mutex_create_simple(gsm_codec_factory.pool, "gsm", 
+				    &gsm_codec_factory.mutex);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Get the codec manager. */
+    codec_mgr = pjmedia_endpt_get_codec_mgr(endpt);
+    if (!codec_mgr) {
+	status = PJ_EINVALIDOP;
+	goto on_error;
+    }
+
+    /* Register codec factory to endpoint. */
+    status = pjmedia_codec_mgr_register_factory(codec_mgr, 
+						&gsm_codec_factory.base);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Done. */
+    return PJ_SUCCESS;
+
+on_error:
+    pj_pool_release(gsm_codec_factory.pool);
+    gsm_codec_factory.pool = NULL;
+    return status;
+}
+
+
+
+/*
+ * Unregister GSM codec factory from pjmedia endpoint and deinitialize
+ * the GSM codec library.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_gsm_deinit(void)
+{
+    pjmedia_codec_mgr *codec_mgr;
+    pj_status_t status;
+
+    if (gsm_codec_factory.pool == NULL)
+	return PJ_SUCCESS;
+
+    /* We don't want to deinit if there's outstanding codec. */
+    /* This is silly, as we'll always have codec in the list if
+       we ever allocate a codec! A better behavior maybe is to 
+       deallocate all codecs in the list.
+    pj_mutex_lock(gsm_codec_factory.mutex);
+    if (!pj_list_empty(&gsm_codec_factory.codec_list)) {
+	pj_mutex_unlock(gsm_codec_factory.mutex);
+	return PJ_EBUSY;
+    }
+    */
+
+    /* Get the codec manager. */
+    codec_mgr = pjmedia_endpt_get_codec_mgr(gsm_codec_factory.endpt);
+    if (!codec_mgr) {
+	pj_pool_release(gsm_codec_factory.pool);
+	gsm_codec_factory.pool = NULL;
+	return PJ_EINVALIDOP;
+    }
+
+    /* Unregister GSM codec factory. */
+    status = pjmedia_codec_mgr_unregister_factory(codec_mgr,
+						  &gsm_codec_factory.base);
+    
+    /* Destroy mutex. */
+    pj_mutex_destroy(gsm_codec_factory.mutex);
+
+    /* Destroy pool. */
+    pj_pool_release(gsm_codec_factory.pool);
+    gsm_codec_factory.pool = NULL;
+
+    return status;
+}
+
+/* 
+ * Check if factory can allocate the specified codec. 
+ */
+static pj_status_t gsm_test_alloc( pjmedia_codec_factory *factory, 
+				   const pjmedia_codec_info *info )
+{
+    PJ_UNUSED_ARG(factory);
+
+    /* Check payload type. */
+    if (info->pt != PJMEDIA_RTP_PT_GSM)
+	return PJMEDIA_CODEC_EUNSUP;
+
+    /* Ignore the rest, since it's static payload type. */
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Generate default attribute.
+ */
+static pj_status_t gsm_default_attr (pjmedia_codec_factory *factory, 
+				      const pjmedia_codec_info *id, 
+				      pjmedia_codec_param *attr )
+{
+    PJ_UNUSED_ARG(factory);
+    PJ_UNUSED_ARG(id);
+
+    pj_bzero(attr, sizeof(pjmedia_codec_param));
+    attr->info.clock_rate = 8000;
+    attr->info.channel_cnt = 1;
+    attr->info.avg_bps = 13200;
+    attr->info.pcm_bits_per_sample = 16;
+    attr->info.frm_ptime = 20;
+    attr->info.pt = PJMEDIA_RTP_PT_GSM;
+
+    attr->setting.frm_per_pkt = 1;
+    attr->setting.vad = 1;
+    attr->setting.plc = 1;
+
+    /* Default all other flag bits disabled. */
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Enum codecs supported by this factory (i.e. only GSM!).
+ */
+static pj_status_t gsm_enum_codecs(pjmedia_codec_factory *factory, 
+				    unsigned *count, 
+				    pjmedia_codec_info codecs[])
+{
+    PJ_UNUSED_ARG(factory);
+    PJ_ASSERT_RETURN(codecs && *count > 0, PJ_EINVAL);
+
+    pj_bzero(&codecs[0], sizeof(pjmedia_codec_info));
+    codecs[0].encoding_name = pj_str("GSM");
+    codecs[0].pt = PJMEDIA_RTP_PT_GSM;
+    codecs[0].type = PJMEDIA_TYPE_AUDIO;
+    codecs[0].clock_rate = 8000;
+    codecs[0].channel_cnt = 1;
+
+    *count = 1;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Allocate a new GSM codec instance.
+ */
+static pj_status_t gsm_alloc_codec( pjmedia_codec_factory *factory, 
+				    const pjmedia_codec_info *id,
+				    pjmedia_codec **p_codec)
+{
+    pjmedia_codec *codec;
+    struct gsm_data *gsm_data;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(factory && id && p_codec, PJ_EINVAL);
+    PJ_ASSERT_RETURN(factory == &gsm_codec_factory.base, PJ_EINVAL);
+
+
+    pj_mutex_lock(gsm_codec_factory.mutex);
+
+    /* Get free nodes, if any. */
+    if (!pj_list_empty(&gsm_codec_factory.codec_list)) {
+	codec = gsm_codec_factory.codec_list.next;
+	pj_list_erase(codec);
+    } else {
+	codec = pj_pool_zalloc(gsm_codec_factory.pool, 
+			       sizeof(pjmedia_codec));
+	PJ_ASSERT_RETURN(codec != NULL, PJ_ENOMEM);
+	codec->op = &gsm_op;
+	codec->factory = factory;
+
+	gsm_data = pj_pool_zalloc(gsm_codec_factory.pool, 
+				  sizeof(struct gsm_data));
+	codec->codec_data = gsm_data;
+
+	/* Create PLC */
+	status = pjmedia_plc_create(gsm_codec_factory.pool, 8000, 
+				    160, 0, &gsm_data->plc);
+	if (status != PJ_SUCCESS) {
+	    pj_mutex_unlock(gsm_codec_factory.mutex);
+	    return status;
+	}
+
+	/* Create silence detector */
+	status = pjmedia_silence_det_create(gsm_codec_factory.pool,
+					    8000, 160,
+					    &gsm_data->vad);
+	if (status != PJ_SUCCESS) {
+	    pj_mutex_unlock(gsm_codec_factory.mutex);
+	    return status;
+	}
+    }
+
+    pj_mutex_unlock(gsm_codec_factory.mutex);
+
+    *p_codec = codec;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Free codec.
+ */
+static pj_status_t gsm_dealloc_codec( pjmedia_codec_factory *factory, 
+				      pjmedia_codec *codec )
+{
+    struct gsm_data *gsm_data;
+    pj_int16_t frame[160];
+    int i;
+
+    PJ_ASSERT_RETURN(factory && codec, PJ_EINVAL);
+    PJ_ASSERT_RETURN(factory == &gsm_codec_factory.base, PJ_EINVAL);
+
+    gsm_data = codec->codec_data;
+
+    /* Close codec, if it's not closed. */
+    gsm_codec_close(codec);
+
+    /* Clear left samples in the PLC, since codec+plc will be reused
+     * next time.
+     */
+    for (i=0; i<2; ++i) {
+	pjmedia_zero_samples(frame, PJ_ARRAY_SIZE(frame));
+	pjmedia_plc_save(gsm_data->plc, frame);
+    }
+
+    /* Re-init silence_period */
+    pj_set_timestamp32(&gsm_data->last_tx, 0, 0);
+
+    /* Put in the free list. */
+    pj_mutex_lock(gsm_codec_factory.mutex);
+    pj_list_push_front(&gsm_codec_factory.codec_list, codec);
+    pj_mutex_unlock(gsm_codec_factory.mutex);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Init codec.
+ */
+static pj_status_t gsm_codec_init( pjmedia_codec *codec, 
+				   pj_pool_t *pool )
+{
+    PJ_UNUSED_ARG(codec);
+    PJ_UNUSED_ARG(pool);
+    return PJ_SUCCESS;
+}
+
+/*
+ * Open codec.
+ */
+static pj_status_t gsm_codec_open( pjmedia_codec *codec, 
+				   pjmedia_codec_param *attr )
+{
+    struct gsm_data *gsm_data = codec->codec_data;
+
+    pj_assert(gsm_data != NULL);
+    pj_assert(gsm_data->encoder == NULL && gsm_data->decoder == NULL);
+
+    gsm_data->encoder = gsm_create();
+    if (!gsm_data->encoder)
+	return PJMEDIA_CODEC_EFAILED;
+
+    gsm_data->decoder = gsm_create();
+    if (!gsm_data->decoder)
+	return PJMEDIA_CODEC_EFAILED;
+
+    gsm_data->vad_enabled = (attr->setting.vad != 0);
+    gsm_data->plc_enabled = (attr->setting.plc != 0);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Close codec.
+ */
+static pj_status_t gsm_codec_close( pjmedia_codec *codec )
+{
+    struct gsm_data *gsm_data = codec->codec_data;
+
+    pj_assert(gsm_data != NULL);
+
+    if (gsm_data->encoder) {
+	gsm_destroy(gsm_data->encoder);
+	gsm_data->encoder = NULL;
+    }
+    if (gsm_data->decoder) {
+	gsm_destroy(gsm_data->decoder);
+	gsm_data->decoder = NULL;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Modify codec settings.
+ */
+static pj_status_t  gsm_codec_modify(pjmedia_codec *codec, 
+				     const pjmedia_codec_param *attr )
+{
+    struct gsm_data *gsm_data = codec->codec_data;
+
+    pj_assert(gsm_data != NULL);
+    pj_assert(gsm_data->encoder != NULL && gsm_data->decoder != NULL);
+
+    gsm_data->vad_enabled = (attr->setting.vad != 0);
+    gsm_data->plc_enabled = (attr->setting.plc != 0);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get frames in the packet.
+ */
+static pj_status_t  gsm_codec_parse( pjmedia_codec *codec,
+				     void *pkt,
+				     pj_size_t pkt_size,
+				     const pj_timestamp *ts,
+				     unsigned *frame_cnt,
+				     pjmedia_frame frames[])
+{
+    unsigned count = 0;
+
+    PJ_UNUSED_ARG(codec);
+
+    PJ_ASSERT_RETURN(frame_cnt, PJ_EINVAL);
+
+    while (pkt_size >= 33 && count < *frame_cnt) {
+	frames[count].type = PJMEDIA_FRAME_TYPE_AUDIO;
+	frames[count].buf = pkt;
+	frames[count].size = 33;
+	frames[count].timestamp.u64 = ts->u64 + count * 160;
+
+	pkt = ((char*)pkt) + 33;
+	pkt_size -= 33;
+
+	++count;
+    }
+
+    *frame_cnt = count;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Encode frame.
+ */
+static pj_status_t gsm_codec_encode( pjmedia_codec *codec, 
+				     const struct pjmedia_frame *input,
+				     unsigned output_buf_len, 
+				     struct pjmedia_frame *output)
+{
+    struct gsm_data *gsm_data = codec->codec_data;
+
+    pj_assert(gsm_data != NULL);
+    PJ_ASSERT_RETURN(input && output, PJ_EINVAL);
+
+    if (output_buf_len < 33)
+	return PJMEDIA_CODEC_EFRMTOOSHORT;
+
+    PJ_ASSERT_RETURN(input->size==320, PJMEDIA_CODEC_EPCMFRMINLEN);
+
+    /* Detect silence */
+    if (gsm_data->vad_enabled) {
+	pj_bool_t is_silence;
+	pj_int32_t silence_duration;
+
+	silence_duration = pj_timestamp_diff32(&gsm_data->last_tx, 
+					       &input->timestamp);
+
+	is_silence = pjmedia_silence_det_detect(gsm_data->vad, 
+					        input->buf,
+						(input->size >> 1),
+						NULL);
+	if (is_silence &&
+	    PJMEDIA_CODEC_MAX_SILENCE_PERIOD != -1 &&
+	    silence_duration < PJMEDIA_CODEC_MAX_SILENCE_PERIOD) 
+	{
+	    output->type = PJMEDIA_FRAME_TYPE_NONE;
+	    output->buf = NULL;
+	    output->size = 0;
+	    output->timestamp = input->timestamp;
+	    return PJ_SUCCESS;
+	} else {
+	    gsm_data->last_tx = input->timestamp;
+	}
+    }
+
+    /* Encode */
+    gsm_encode(gsm_data->encoder, (short*)input->buf, 
+	       (unsigned char*)output->buf);
+
+    output->size = 33;
+    output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Decode frame.
+ */
+static pj_status_t gsm_codec_decode( pjmedia_codec *codec, 
+				     const struct pjmedia_frame *input,
+				     unsigned output_buf_len, 
+				     struct pjmedia_frame *output)
+{
+    struct gsm_data *gsm_data = codec->codec_data;
+
+    pj_assert(gsm_data != NULL);
+    PJ_ASSERT_RETURN(input && output, PJ_EINVAL);
+
+    if (output_buf_len < 320)
+	return PJMEDIA_CODEC_EPCMTOOSHORT;
+
+    if (input->size < 33)
+	return PJMEDIA_CODEC_EFRMTOOSHORT;
+
+    gsm_decode(gsm_data->decoder, 
+	       (unsigned char*)input->buf, 
+	       (short*)output->buf);
+
+    output->size = 320;
+    output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+
+    if (gsm_data->plc_enabled)
+	pjmedia_plc_save( gsm_data->plc, output->buf);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Recover lost frame.
+ */
+static pj_status_t  gsm_codec_recover(pjmedia_codec *codec,
+				      unsigned output_buf_len,
+				      struct pjmedia_frame *output)
+{
+    struct gsm_data *gsm_data = codec->codec_data;
+
+    PJ_ASSERT_RETURN(gsm_data->plc_enabled, PJ_EINVALIDOP);
+
+    PJ_ASSERT_RETURN(output_buf_len >= 320, PJMEDIA_CODEC_EPCMTOOSHORT);
+
+    pjmedia_plc_generate(gsm_data->plc, output->buf);
+    output->size = 320;
+
+    return PJ_SUCCESS;
+}
+
+
+#endif	/* PJMEDIA_HAS_GSM_CODEC */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/COPYRIGHT
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/COPYRIGHT	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/COPYRIGHT	(revision 1163)
@@ -0,0 +1,16 @@
+Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann,
+Technische Universitaet Berlin
+
+Any use of this software is permitted provided that this notice is not
+removed and that neither the authors nor the Technische Universitaet Berlin
+are deemed to have made any representations as to the suitability of this
+software for any purpose nor are held responsible for any defects of
+this software.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+
+As a matter of courtesy, the authors request to be informed about uses
+this software has found, about bugs in this software, and about any
+improvements that may be of general interest.
+
+Berlin, 28.11.1994
+Jutta Degener
+Carsten Bormann
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/ChangeLog
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/ChangeLog	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/ChangeLog	(revision 1163)
@@ -0,0 +1,92 @@
+
+Fri Jun  2 06:27:56 2006	Jutta Degener (jutta@pobox.com)
+
+	* Release 1.0 Patchlevel 12
+	src/code.c: removed modifiable static storage that made the library
+	 	non-reentrant.  (Thanks to Paul Gibbs for pointing out the bug.)
+
+Sat Mar 18 11:48:28 2006	Jutta Degener (jutta@pobox.com)
+
+	* Release 1.0 Patchlevel 11
+	src/gsm_implode.c: fix WAV49 implode
+	move source archive location
+
+Fri Jul  5 19:26:37 1996 	Jutta Degener (jutta@cs.tu-berlin.de)
+
+	* Release 1.0 Patchlevel 10
+	src/toast_alaw.c: exchanged A-law tables for something
+		slightly more A-law.
+
+Tue Jul  2 12:18:20 1996  Jutta Degener (jutta@cs.tu-berlin.de)
+
+	* Release 1.0 Patchlevel 9
+	src/long_term.c: in FLOAT_MUL mode, an array was accessed past its end
+	src/gsm_option.c: three options related to WAV #49 packing
+	src/gsm_encode.c: support WAV #49-style encoding.
+	src/gsm_decode.c: support WAV #49-style decoding.
+	tls/sour.c: generate the WAV bit shifting code, encode
+	tls/ginger.c: generate the WAV bit shifting code, decode
+	The WAV code goes back to an inofficial patch #8 that
+	Jeff Chilton sent us (hence the jump from 7 to 9).
+	src/toast.c: add _fsetmode() calls to set stdin/stdout to
+		binary (from an OS/2 port by Arnd Gronenberg.)
+
+Tue Mar  7 01:55:10 1995  Jutta Degener (jutta@cs.tu-berlin.de)
+
+	* Release 1.0 Patchlevel 7
+	src/long_term.c: Yet another 16-bit overflow
+	src/toast.c: -C option to toast, cuts LPC time
+	src/gsm_option.c: corresponding LPC_CUT option to GSM library
+
+Fri Dec 30 23:33:50 1994  Jutta Degener (jutta@cs.tu-berlin.de)
+
+        * Release 1.0 Patchlevel 6
+        src/lpc.c: fixed 16-bit addition overflow in Autocorrelation code
+        src/add.c: gsm_L_asl should fall back on gsm_L_asr, not gsm_asr
+
+Mon Nov 28 20:49:57 1994  Jutta Degener (jutta@cs.tu-berlin.de)
+	
+	* Release 1.0 Patchlevel 5
+	src/toast_audio.c: initialization should return -1 on error
+	src/gsm_destroy.c: #include configuration header file
+	src/add.c: gsm_sub should cast its parameters to longword
+	man/*: bug reports to {jutta,cabo}@cs.tu-berlin.de, not to toast@tub
+	inc/private.h: longword long by default, not int
+	inc/toast.h: read/write fopen modes "rb" and "wb", not just "r"
+	src/toast.c: better (or different, anyway) error handling in process()
+
+Tue May 10 19:41:34 1994  Jutta Degener (jutta at kugelbus)
+	
+	* Release 1.0 Patchlevel 4
+	inc/private.h: GSM_ADD should cast to ulongword, not to unsigned.
+	src/long_term.c: missing cast to longword.
+	add-test/add_test.c: Test macros too, not only functions,
+	thanks to Simao Ferraz de Campos Neto, simao@dragon.cpqd.ansp.br
+	General cleanup: remove unused variables, add function prototypes.
+
+Tue Jan 25 22:53:40 1994  Jutta Degener (jutta at kugelbus)
+
+	* Release 1.0 Patchlevel 3
+	changed rpe.c's STEP macro to work with 16-bit integers,
+	thanks to Dr Alex Lee (alexlee@solomon.technet.sg);
+	removed non-fatal bugs from add-test.dta, private.h
+	and toast_audio.c, thanks to P. Emanuelsson.
+
+Fri Jan 29 19:02:12 1993  Jutta Degener  (jutta at kraftbus)
+	
+	* Release 1.0 Patchlevel 2
+	fixed L_add(0,-1) in src/add.c and inc/private.h,
+	thanks to Raphael Trommer at AT&T Bell Laboratories;
+	various other ANSI C compatibility details
+
+Fri Oct 30 17:58:54 1992  Jutta Degener  (jutta at kraftbus)
+
+	* Release 1.0 Patchlevel 1
+	Switched uid/gid in toast's [f]chown calls.
+
+Wed Oct 28 14:12:35 1992  Carsten Bormann  (cabo at kubus)
+
+	* Release 1.0: released
+	Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+	Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+	details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/add.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/add.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/add.c	(revision 1163)
@@ -0,0 +1,235 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/add.c,v 1.6 1996/07/02 09:57:33 jutta Exp $ */
+
+/*
+ *  See private.h for the more commonly used macro versions.
+ */
+
+#include	<stdio.h>
+#include	<assert.h>
+
+#include	"private.h"
+#include	"gsm.h"
+#include	"proto.h"
+
+#define	saturate(x) 	\
+	((x) < MIN_WORD ? MIN_WORD : (x) > MAX_WORD ? MAX_WORD: (x))
+
+word gsm_add P2((a,b), word a, word b)
+{
+	longword sum = (longword)a + (longword)b;
+	return saturate(sum);
+}
+
+word gsm_sub P2((a,b), word a, word b)
+{
+	longword diff = (longword)a - (longword)b;
+	return saturate(diff);
+}
+
+word gsm_mult P2((a,b), word a, word b)
+{
+	if (a == MIN_WORD && b == MIN_WORD) return MAX_WORD;
+	else return SASR( (longword)a * (longword)b, 15 );
+}
+
+word gsm_mult_r P2((a,b), word a, word b)
+{
+	if (b == MIN_WORD && a == MIN_WORD) return MAX_WORD;
+	else {
+		longword prod = (longword)a * (longword)b + 16384;
+		prod >>= 15;
+		return prod & 0xFFFF;
+	}
+}
+
+word gsm_abs P1((a), word a)
+{
+	return a < 0 ? (a == MIN_WORD ? MAX_WORD : -a) : a;
+}
+
+longword gsm_L_mult P2((a,b),word a, word b)
+{
+	assert( a != MIN_WORD || b != MIN_WORD );
+	return ((longword)a * (longword)b) << 1;
+}
+
+longword gsm_L_add P2((a,b), longword a, longword b)
+{
+	if (a < 0) {
+		if (b >= 0) return a + b;
+		else {
+			ulongword A = (ulongword)-(a + 1) + (ulongword)-(b + 1);
+			return A >= MAX_LONGWORD ? MIN_LONGWORD :-(longword)A-2;
+		}
+	}
+	else if (b <= 0) return a + b;
+	else {
+		ulongword A = (ulongword)a + (ulongword)b;
+		return A > MAX_LONGWORD ? MAX_LONGWORD : A;
+	}
+}
+
+longword gsm_L_sub P2((a,b), longword a, longword b)
+{
+	if (a >= 0) {
+		if (b >= 0) return a - b;
+		else {
+			/* a>=0, b<0 */
+
+			ulongword A = (ulongword)a + -(b + 1);
+			return A >= MAX_LONGWORD ? MAX_LONGWORD : (A + 1);
+		}
+	}
+	else if (b <= 0) return a - b;
+	else {
+		/* a<0, b>0 */  
+
+		ulongword A = (ulongword)-(a + 1) + b;
+		return A >= MAX_LONGWORD ? MIN_LONGWORD : -(longword)A - 1;
+	}
+}
+
+static unsigned char const bitoff[ 256 ] = {
+	 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
+	 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+	 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+	 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+	 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+	 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+	 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+	 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+word gsm_norm P1((a), longword a )
+/*
+ * the number of left shifts needed to normalize the 32 bit
+ * variable L_var1 for positive values on the interval
+ *
+ * with minimum of
+ * minimum of 1073741824  (01000000000000000000000000000000) and 
+ * maximum of 2147483647  (01111111111111111111111111111111)
+ *
+ *
+ * and for negative values on the interval with
+ * minimum of -2147483648 (-10000000000000000000000000000000) and
+ * maximum of -1073741824 ( -1000000000000000000000000000000).
+ *
+ * in order to normalize the result, the following
+ * operation must be done: L_norm_var1 = L_var1 << norm( L_var1 );
+ *
+ * (That's 'ffs', only from the left, not the right..)
+ */
+{
+	assert(a != 0);
+
+	if (a < 0) {
+		if (a <= -1073741824) return 0;
+		a = ~a;
+	}
+
+	return    a & 0xffff0000 
+		? ( a & 0xff000000
+		  ?  -1 + bitoff[ 0xFF & (a >> 24) ]
+		  :   7 + bitoff[ 0xFF & (a >> 16) ] )
+		: ( a & 0xff00
+		  ?  15 + bitoff[ 0xFF & (a >> 8) ]
+		  :  23 + bitoff[ 0xFF & a ] );
+}
+
+longword gsm_L_asl P2((a,n), longword a, int n)
+{
+	if (n >= 32) return 0;
+	if (n <= -32) return -(a < 0);
+	if (n < 0) return gsm_L_asr(a, -n);
+	return a << n;
+}
+
+word gsm_asl P2((a,n), word a, int n)
+{
+	if (n >= 16) return 0;
+	if (n <= -16) return -(a < 0);
+	if (n < 0) return gsm_asr(a, -n);
+	return a << n;
+}
+
+longword gsm_L_asr P2((a,n), longword a, int n)
+{
+	if (n >= 32) return -(a < 0);
+	if (n <= -32) return 0;
+	if (n < 0) return a << -n;
+
+#	ifdef	SASR
+		return a >> n;
+#	else
+		if (a >= 0) return a >> n;
+		else return -(longword)( -(ulongword)a >> n );
+#	endif
+}
+
+word gsm_asr P2((a,n), word a, int n)
+{
+	if (n >= 16) return -(a < 0);
+	if (n <= -16) return 0;
+	if (n < 0) return a << -n;
+
+#	ifdef	SASR
+		return a >> n;
+#	else
+		if (a >= 0) return a >> n;
+		else return -(word)( -(uword)a >> n );
+#	endif
+}
+
+/* 
+ *  (From p. 46, end of section 4.2.5)
+ *
+ *  NOTE: The following lines gives [sic] one correct implementation
+ *  	  of the div(num, denum) arithmetic operation.  Compute div
+ *        which is the integer division of num by denum: with denum
+ *	  >= num > 0
+ */
+
+word gsm_div P2((num,denum), word num, word denum)
+{
+	longword	L_num   = num;
+	longword	L_denum = denum;
+	word		div 	= 0;
+	int		k 	= 15;
+
+	/* The parameter num sometimes becomes zero.
+	 * Although this is explicitly guarded against in 4.2.5,
+	 * we assume that the result should then be zero as well.
+	 */
+
+	/* assert(num != 0); */
+
+	assert(num >= 0 && denum >= num);
+	if (num == 0)
+	    return 0;
+
+	while (k--) {
+		div   <<= 1;
+		L_num <<= 1;
+
+		if (L_num >= L_denum) {
+			L_num -= L_denum;
+			div++;
+		}
+	}
+
+	return div;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/code.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/code.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/code.c	(revision 1163)
@@ -0,0 +1,98 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/code.c,v 1.3 1996/07/02 09:59:05 jutta Exp $ */
+
+#include	"config.h"
+
+
+#include <string.h>
+#ifdef	HAS_STDLIB_H
+#include	<stdlib.h>
+#else
+#	include "proto.h"
+	extern char	* memcpy P((char *, char *, int));
+#endif
+
+#include	"private.h"
+#include	"gsm.h"
+#include	"proto.h"
+
+/* 
+ *  4.2 FIXED POINT IMPLEMENTATION OF THE RPE-LTP CODER 
+ */
+
+void Gsm_Coder P8((S,s,LARc,Nc,bc,Mc,xmaxc,xMc),
+
+	struct gsm_state	* S,
+
+	word	* s,	/* [0..159] samples		  	IN	*/
+
+/*
+ * The RPE-LTD coder works on a frame by frame basis.  The length of
+ * the frame is equal to 160 samples.  Some computations are done
+ * once per frame to produce at the output of the coder the
+ * LARc[1..8] parameters which are the coded LAR coefficients and 
+ * also to realize the inverse filtering operation for the entire
+ * frame (160 samples of signal d[0..159]).  These parts produce at
+ * the output of the coder:
+ */
+
+	word	* LARc,	/* [0..7] LAR coefficients		OUT	*/
+
+/*
+ * Procedure 4.2.11 to 4.2.18 are to be executed four times per
+ * frame.  That means once for each sub-segment RPE-LTP analysis of
+ * 40 samples.  These parts produce at the output of the coder:
+ */
+
+	word	* Nc,	/* [0..3] LTP lag			OUT 	*/
+	word	* bc,	/* [0..3] coded LTP gain		OUT 	*/
+	word	* Mc,	/* [0..3] RPE grid selection		OUT     */
+	word	* xmaxc,/* [0..3] Coded maximum amplitude	OUT	*/
+	word	* xMc	/* [13*4] normalized RPE samples	OUT	*/
+)
+{
+	int	k;
+	word	* dp  = S->dp0 + 120;	/* [ -120...-1 ] */
+	word	* dpp = dp;		/* [ 0...39 ]	 */
+
+	word	so[160];
+
+	Gsm_Preprocess			(S, s, so);
+	Gsm_LPC_Analysis		(S, so, LARc);
+	Gsm_Short_Term_Analysis_Filter	(S, LARc, so);
+
+	for (k = 0; k <= 3; k++, xMc += 13) {
+
+		Gsm_Long_Term_Predictor	( S,
+					 so+k*40, /* d      [0..39] IN	*/
+					 dp,	  /* dp  [-120..-1] IN	*/
+					S->e + 5, /* e      [0..39] OUT	*/
+					dpp,	  /* dpp    [0..39] OUT */
+					 Nc++,
+					 bc++);
+
+		Gsm_RPE_Encoding	( S,
+					S->e + 5,/* e	  ][0..39][ IN/OUT */
+					  xmaxc++, Mc++, xMc );
+		/*
+		 * Gsm_Update_of_reconstructed_short_time_residual_signal
+		 *			( dpp, S->e + 5, dp );
+		 */
+
+		{ register int i;
+		  register longword ltmp;
+		  for (i = 0; i <= 39; i++)
+			dp[ i ] = GSM_ADD( S->e[5 + i], dpp[i] );
+		}
+		dp  += 40;
+		dpp += 40;
+
+	}
+	(void)memcpy( (char *)S->dp0, (char *)(S->dp0 + 160),
+		120 * sizeof(*S->dp0) );
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/config.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/config.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/config.h	(revision 1163)
@@ -0,0 +1,37 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/*$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/config.h,v 1.5 1996/07/02 11:26:20 jutta Exp $*/
+
+#ifndef	CONFIG_H
+#define	CONFIG_H
+
+/*efine	SIGHANDLER_T	int 		signal handlers are void	*/
+/*efine HAS_SYSV_SIGNAL	1		sigs not blocked/reset?	*/
+
+#define	HAS_STDLIB_H	1		/* /usr/include/stdlib.h	*/
+#define	HAS_LIMITS_H	1		/* /usr/include/limits.h	*/
+#define	HAS_FCNTL_H	1		/* /usr/include/fcntl.h		*/
+#define	HAS_ERRNO_DECL	1		/* errno.h declares errno	*/
+
+#define	HAS_FSTAT 	1		/* fstat syscall		*/
+#define	HAS_FCHMOD 	1		/* fchmod syscall		*/
+#define	HAS_CHMOD 	1		/* chmod syscall		*/
+#define	HAS_FCHOWN 	1		/* fchown syscall		*/
+#define	HAS_CHOWN 	1		/* chown syscall		*/
+/*efine	HAS__FSETMODE 	1		_fsetmode -- set file mode	*/
+
+#define	HAS_STRING_H 	1		/* /usr/include/string.h 	*/
+/*efine	HAS_STRINGS_H	1		 /usr/include/strings.h 	*/
+
+#define	HAS_UNISTD_H	1		/* /usr/include/unistd.h	*/
+#define	HAS_UTIME	1		/* POSIX utime(path, times)	*/
+/*efine	HAS_UTIMES	1		 use utimes()	syscall instead	*/
+#define	HAS_UTIME_H	1		/* UTIME header file		*/
+#define	HAS_UTIMBUF	1		/* struct utimbuf		*/
+/*efine	HAS_UTIMEUSEC   1		 microseconds in utimbuf?	*/
+
+#endif	/* CONFIG_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/debug.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/debug.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/debug.c	(revision 1163)
@@ -0,0 +1,76 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/debug.c,v 1.2 1993/01/29 18:22:20 jutta Exp $ */
+
+#include "private.h"
+
+#ifndef	NDEBUG
+
+/* If NDEBUG _is_ defined and no debugging should be performed,
+ * calls to functions in this module are #defined to nothing
+ * in private.h.
+ */
+
+#include <stdio.h>
+#include "proto.h"
+
+void gsm_debug_words P4( (name, from, to, ptr), 
+	char 	      * name,
+	int		from,
+	int		to,
+	word		* ptr)
+{
+	int 	nprinted = 0;
+
+	fprintf( stderr, "%s [%d .. %d]: ", name, from, to );
+	while (from <= to) {
+		fprintf(stderr, "%d ", ptr[ from ] );
+		from++;
+		if (nprinted++ >= 7) {
+			nprinted = 0;
+			if (from < to) putc('\n', stderr);
+		}
+	}
+	putc('\n', stderr);
+}
+
+void gsm_debug_longwords P4( (name, from, to, ptr),
+	char 	      * name,
+	int		from,
+	int		to,
+	longword      * ptr)
+{
+	int 	nprinted = 0;
+
+	fprintf( stderr, "%s [%d .. %d]: ", name, from, to );
+	while (from <= to) {
+
+		fprintf(stderr, "%d ", ptr[ from ] );
+		from++;
+		if (nprinted++ >= 7) {
+			nprinted = 0;
+			if (from < to) putc('\n', stderr);
+		}
+	}
+	putc('\n', stderr);
+}
+
+void gsm_debug_longword P2(  (name, value),
+	char		* name,
+	longword	  value	)
+{
+	fprintf(stderr, "%s: %d\n", name, (long)value );
+}
+
+void gsm_debug_word P2(  (name, value),
+	char	* name,
+	word	  value	)
+{
+	fprintf(stderr, "%s: %d\n", name, (long)value);
+}
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/decode.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/decode.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/decode.c	(revision 1163)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/decode.c,v 1.1 1992/10/28 00:15:50 jutta Exp $ */
+
+#include <stdio.h>
+
+#include	"private.h"
+#include	"gsm.h"
+#include	"proto.h"
+
+/*
+ *  4.3 FIXED POINT IMPLEMENTATION OF THE RPE-LTP DECODER
+ */
+
+static void Postprocessing P2((S,s),
+	struct gsm_state	* S,
+	register word 		* s)
+{
+	register int		k;
+	register word		msr = S->msr;
+	register longword	ltmp;	/* for GSM_ADD */
+	register word		tmp;
+
+	for (k = 160; k--; s++) {
+		tmp = GSM_MULT_R( msr, 28180 );
+		msr = GSM_ADD(*s, tmp);  	   /* Deemphasis 	     */
+		*s  = GSM_ADD(msr, msr) & 0xFFF8;  /* Truncation & Upscaling */
+	}
+	S->msr = msr;
+}
+
+void Gsm_Decoder P8((S,LARcr, Ncr,bcr,Mcr,xmaxcr,xMcr,s),
+	struct gsm_state	* S,
+
+	word		* LARcr,	/* [0..7]		IN	*/
+
+	word		* Ncr,		/* [0..3] 		IN 	*/
+	word		* bcr,		/* [0..3]		IN	*/
+	word		* Mcr,		/* [0..3] 		IN 	*/
+	word		* xmaxcr,	/* [0..3]		IN 	*/
+	word		* xMcr,		/* [0..13*4]		IN	*/
+
+	word		* s)		/* [0..159]		OUT 	*/
+{
+	int		j, k;
+	word		erp[40], wt[160];
+	word		* drp = S->dp0 + 120;
+
+	for (j=0; j <= 3; j++, xmaxcr++, bcr++, Ncr++, Mcr++, xMcr += 13) {
+
+		Gsm_RPE_Decoding( S, *xmaxcr, *Mcr, xMcr, erp );
+		Gsm_Long_Term_Synthesis_Filtering( S, *Ncr, *bcr, erp, drp );
+
+		for (k = 0; k <= 39; k++) wt[ j * 40 + k ] =  drp[ k ];
+	}
+
+	Gsm_Short_Term_Synthesis_Filter( S, LARcr, wt, s );
+	Postprocessing(S, s);
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm.h	(revision 1163)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/*$Header: /home/kbs/jutta/src/gsm/gsm-1.0/inc/RCS/gsm.h,v 1.11 1996/07/05 18:02:56 jutta Exp $*/
+
+#ifndef	GSM_H
+#define	GSM_H
+
+#ifdef __cplusplus
+#	define	NeedFunctionPrototypes	1
+#endif
+
+#if __STDC__
+#	define	NeedFunctionPrototypes	1
+#endif
+
+#ifdef _NO_PROTO
+#	undef	NeedFunctionPrototypes
+#endif
+
+#ifdef NeedFunctionPrototypes
+#   include	<stdio.h>		/* for FILE * 	*/
+#endif
+
+#undef GSM_P
+#if NeedFunctionPrototypes
+#	define	GSM_P( protos )	protos
+#else
+#	define  GSM_P( protos )	( /* protos */ )
+#endif
+
+/*
+ *	Interface
+ */
+
+typedef struct gsm_state * 	gsm;
+typedef short		   	gsm_signal;		/* signed 16 bit */
+typedef unsigned char		gsm_byte;
+typedef gsm_byte 		gsm_frame[33];		/* 33 * 8 bits	 */
+
+#define	GSM_MAGIC		0xD		  	/* 13 kbit/s RPE-LTP */
+
+#define	GSM_PATCHLEVEL		10
+#define	GSM_MINOR		0
+#define	GSM_MAJOR		1
+
+#define	GSM_OPT_VERBOSE		1
+#define	GSM_OPT_FAST		2
+#define	GSM_OPT_LTP_CUT		3
+#define	GSM_OPT_WAV49		4
+#define	GSM_OPT_FRAME_INDEX	5
+#define	GSM_OPT_FRAME_CHAIN	6
+
+extern gsm  gsm_create 	GSM_P((void));
+extern void gsm_destroy GSM_P((gsm));	
+
+extern int  gsm_print   GSM_P((FILE *, gsm, gsm_byte  *));
+extern int  gsm_option  GSM_P((gsm, int, int *));
+
+extern void gsm_encode  GSM_P((gsm, gsm_signal *, gsm_byte  *));
+extern int  gsm_decode  GSM_P((gsm, gsm_byte   *, gsm_signal *));
+
+extern int  gsm_explode GSM_P((gsm, gsm_byte   *, gsm_signal *));
+extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte   *));
+
+#undef	GSM_P
+
+#endif	/* GSM_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_create.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_create.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_create.c	(revision 1163)
@@ -0,0 +1,45 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+static char const	ident[] = "$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_create.c,v 1.4 1996/07/02 09:59:05 jutta Exp $";
+
+#include	"config.h"
+
+#ifdef	HAS_STRING_H
+#include	<string.h>
+#else
+#	include "proto.h"
+	extern char	* memset P((char *, int, int));
+#endif
+
+#ifdef	HAS_STDLIB_H
+#	include	<stdlib.h>
+#else
+#	ifdef	HAS_MALLOC_H
+#		include 	<malloc.h>
+#	else
+		extern char * malloc();
+#	endif
+#endif
+
+#include <stdio.h>
+
+#include "gsm.h"
+#include "private.h"
+#include "proto.h"
+
+gsm gsm_create P0()
+{
+	gsm  r;
+
+	r = (gsm)malloc(sizeof(struct gsm_state));
+	if (!r) return r;
+
+	memset((char *)r, 0, sizeof(*r));
+	r->nrp = 40;
+
+	return r;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_decode.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_decode.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_decode.c	(revision 1163)
@@ -0,0 +1,361 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_decode.c,v 1.2 1996/07/02 09:59:05 jutta Exp $ */
+
+#include "private.h"
+
+#include "gsm.h"
+#include "proto.h"
+
+int gsm_decode P3((s, c, target), gsm s, gsm_byte * c, gsm_signal * target)
+{
+	word  	LARc[8], Nc[4], Mc[4], bc[4], xmaxc[4], xmc[13*4];
+
+#ifdef WAV49
+	if (s->wav_fmt) {
+
+		uword sr = 0;
+
+		s->frame_index = !s->frame_index;
+		if (s->frame_index) {
+
+			sr = *c++;
+			LARc[0] = sr & 0x3f;  sr >>= 6;
+			sr |= (uword)*c++ << 2;
+			LARc[1] = sr & 0x3f;  sr >>= 6;
+			sr |= (uword)*c++ << 4;
+			LARc[2] = sr & 0x1f;  sr >>= 5;
+			LARc[3] = sr & 0x1f;  sr >>= 5;
+			sr |= (uword)*c++ << 2;
+			LARc[4] = sr & 0xf;  sr >>= 4;
+			LARc[5] = sr & 0xf;  sr >>= 4;
+			sr |= (uword)*c++ << 2;			/* 5 */
+			LARc[6] = sr & 0x7;  sr >>= 3;
+			LARc[7] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 4;
+			Nc[0] = sr & 0x7f;  sr >>= 7;
+			bc[0] = sr & 0x3;  sr >>= 2;
+			Mc[0] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 1;
+			xmaxc[0] = sr & 0x3f;  sr >>= 6;
+			xmc[0] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[1] = sr & 0x7;  sr >>= 3;
+			xmc[2] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[3] = sr & 0x7;  sr >>= 3;
+			xmc[4] = sr & 0x7;  sr >>= 3;
+			xmc[5] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;			/* 10 */
+			xmc[6] = sr & 0x7;  sr >>= 3;
+			xmc[7] = sr & 0x7;  sr >>= 3;
+			xmc[8] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[9] = sr & 0x7;  sr >>= 3;
+			xmc[10] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[11] = sr & 0x7;  sr >>= 3;
+			xmc[12] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 4;
+			Nc[1] = sr & 0x7f;  sr >>= 7;
+			bc[1] = sr & 0x3;  sr >>= 2;
+			Mc[1] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 1;
+			xmaxc[1] = sr & 0x3f;  sr >>= 6;
+			xmc[13] = sr & 0x7;  sr >>= 3;
+			sr = *c++;				/* 15 */
+			xmc[14] = sr & 0x7;  sr >>= 3;
+			xmc[15] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[16] = sr & 0x7;  sr >>= 3;
+			xmc[17] = sr & 0x7;  sr >>= 3;
+			xmc[18] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[19] = sr & 0x7;  sr >>= 3;
+			xmc[20] = sr & 0x7;  sr >>= 3;
+			xmc[21] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[22] = sr & 0x7;  sr >>= 3;
+			xmc[23] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[24] = sr & 0x7;  sr >>= 3;
+			xmc[25] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 4;			/* 20 */
+			Nc[2] = sr & 0x7f;  sr >>= 7;
+			bc[2] = sr & 0x3;  sr >>= 2;
+			Mc[2] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 1;
+			xmaxc[2] = sr & 0x3f;  sr >>= 6;
+			xmc[26] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[27] = sr & 0x7;  sr >>= 3;
+			xmc[28] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[29] = sr & 0x7;  sr >>= 3;
+			xmc[30] = sr & 0x7;  sr >>= 3;
+			xmc[31] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[32] = sr & 0x7;  sr >>= 3;
+			xmc[33] = sr & 0x7;  sr >>= 3;
+			xmc[34] = sr & 0x7;  sr >>= 3;
+			sr = *c++;				/* 25 */
+			xmc[35] = sr & 0x7;  sr >>= 3;
+			xmc[36] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[37] = sr & 0x7;  sr >>= 3;
+			xmc[38] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 4;
+			Nc[3] = sr & 0x7f;  sr >>= 7;
+			bc[3] = sr & 0x3;  sr >>= 2;
+			Mc[3] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 1;
+			xmaxc[3] = sr & 0x3f;  sr >>= 6;
+			xmc[39] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[40] = sr & 0x7;  sr >>= 3;
+			xmc[41] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;			/* 30 */
+			xmc[42] = sr & 0x7;  sr >>= 3;
+			xmc[43] = sr & 0x7;  sr >>= 3;
+			xmc[44] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[45] = sr & 0x7;  sr >>= 3;
+			xmc[46] = sr & 0x7;  sr >>= 3;
+			xmc[47] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[48] = sr & 0x7;  sr >>= 3;
+			xmc[49] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[50] = sr & 0x7;  sr >>= 3;
+			xmc[51] = sr & 0x7;  sr >>= 3;
+
+			s->frame_chain = sr & 0xf;
+		}
+		else {
+			sr = s->frame_chain;
+			sr |= (uword)*c++ << 4;			/* 1 */
+			LARc[0] = sr & 0x3f;  sr >>= 6;
+			LARc[1] = sr & 0x3f;  sr >>= 6;
+			sr = *c++;
+			LARc[2] = sr & 0x1f;  sr >>= 5;
+			sr |= (uword)*c++ << 3;
+			LARc[3] = sr & 0x1f;  sr >>= 5;
+			LARc[4] = sr & 0xf;  sr >>= 4;
+			sr |= (uword)*c++ << 2;
+			LARc[5] = sr & 0xf;  sr >>= 4;
+			LARc[6] = sr & 0x7;  sr >>= 3;
+			LARc[7] = sr & 0x7;  sr >>= 3;
+			sr = *c++;				/* 5 */
+			Nc[0] = sr & 0x7f;  sr >>= 7;
+			sr |= (uword)*c++ << 1;
+			bc[0] = sr & 0x3;  sr >>= 2;
+			Mc[0] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 5;
+			xmaxc[0] = sr & 0x3f;  sr >>= 6;
+			xmc[0] = sr & 0x7;  sr >>= 3;
+			xmc[1] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[2] = sr & 0x7;  sr >>= 3;
+			xmc[3] = sr & 0x7;  sr >>= 3;
+			xmc[4] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[5] = sr & 0x7;  sr >>= 3;
+			xmc[6] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;			/* 10 */
+			xmc[7] = sr & 0x7;  sr >>= 3;
+			xmc[8] = sr & 0x7;  sr >>= 3;
+			xmc[9] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[10] = sr & 0x7;  sr >>= 3;
+			xmc[11] = sr & 0x7;  sr >>= 3;
+			xmc[12] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			Nc[1] = sr & 0x7f;  sr >>= 7;
+			sr |= (uword)*c++ << 1;
+			bc[1] = sr & 0x3;  sr >>= 2;
+			Mc[1] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 5;
+			xmaxc[1] = sr & 0x3f;  sr >>= 6;
+			xmc[13] = sr & 0x7;  sr >>= 3;
+			xmc[14] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;			/* 15 */
+			xmc[15] = sr & 0x7;  sr >>= 3;
+			xmc[16] = sr & 0x7;  sr >>= 3;
+			xmc[17] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[18] = sr & 0x7;  sr >>= 3;
+			xmc[19] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[20] = sr & 0x7;  sr >>= 3;
+			xmc[21] = sr & 0x7;  sr >>= 3;
+			xmc[22] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[23] = sr & 0x7;  sr >>= 3;
+			xmc[24] = sr & 0x7;  sr >>= 3;
+			xmc[25] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			Nc[2] = sr & 0x7f;  sr >>= 7;
+			sr |= (uword)*c++ << 1;			/* 20 */
+			bc[2] = sr & 0x3;  sr >>= 2;
+			Mc[2] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 5;
+			xmaxc[2] = sr & 0x3f;  sr >>= 6;
+			xmc[26] = sr & 0x7;  sr >>= 3;
+			xmc[27] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;	
+			xmc[28] = sr & 0x7;  sr >>= 3;
+			xmc[29] = sr & 0x7;  sr >>= 3;
+			xmc[30] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[31] = sr & 0x7;  sr >>= 3;
+			xmc[32] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[33] = sr & 0x7;  sr >>= 3;
+			xmc[34] = sr & 0x7;  sr >>= 3;
+			xmc[35] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;			/* 25 */
+			xmc[36] = sr & 0x7;  sr >>= 3;
+			xmc[37] = sr & 0x7;  sr >>= 3;
+			xmc[38] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			Nc[3] = sr & 0x7f;  sr >>= 7;
+			sr |= (uword)*c++ << 1;		
+			bc[3] = sr & 0x3;  sr >>= 2;
+			Mc[3] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 5;
+			xmaxc[3] = sr & 0x3f;  sr >>= 6;
+			xmc[39] = sr & 0x7;  sr >>= 3;
+			xmc[40] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[41] = sr & 0x7;  sr >>= 3;
+			xmc[42] = sr & 0x7;  sr >>= 3;
+			xmc[43] = sr & 0x7;  sr >>= 3;
+			sr = *c++;				/* 30 */
+			xmc[44] = sr & 0x7;  sr >>= 3;
+			xmc[45] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[46] = sr & 0x7;  sr >>= 3;
+			xmc[47] = sr & 0x7;  sr >>= 3;
+			xmc[48] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[49] = sr & 0x7;  sr >>= 3;
+			xmc[50] = sr & 0x7;  sr >>= 3;
+			xmc[51] = sr & 0x7;  sr >>= 3;
+		}
+	}
+	else
+#endif
+	{
+		/* GSM_MAGIC  = (*c >> 4) & 0xF; */
+
+		if (((*c >> 4) & 0x0F) != GSM_MAGIC) return -1;
+
+		LARc[0]  = (*c++ & 0xF) << 2;		/* 1 */
+		LARc[0] |= (*c >> 6) & 0x3;
+		LARc[1]  = *c++ & 0x3F;
+		LARc[2]  = (*c >> 3) & 0x1F;
+		LARc[3]  = (*c++ & 0x7) << 2;
+		LARc[3] |= (*c >> 6) & 0x3;
+		LARc[4]  = (*c >> 2) & 0xF;
+		LARc[5]  = (*c++ & 0x3) << 2;
+		LARc[5] |= (*c >> 6) & 0x3;
+		LARc[6]  = (*c >> 3) & 0x7;
+		LARc[7]  = *c++ & 0x7;
+		Nc[0]  = (*c >> 1) & 0x7F;
+		bc[0]  = (*c++ & 0x1) << 1;
+		bc[0] |= (*c >> 7) & 0x1;
+		Mc[0]  = (*c >> 5) & 0x3;
+		xmaxc[0]  = (*c++ & 0x1F) << 1;
+		xmaxc[0] |= (*c >> 7) & 0x1;
+		xmc[0]  = (*c >> 4) & 0x7;
+		xmc[1]  = (*c >> 1) & 0x7;
+		xmc[2]  = (*c++ & 0x1) << 2;
+		xmc[2] |= (*c >> 6) & 0x3;
+		xmc[3]  = (*c >> 3) & 0x7;
+		xmc[4]  = *c++ & 0x7;
+		xmc[5]  = (*c >> 5) & 0x7;
+		xmc[6]  = (*c >> 2) & 0x7;
+		xmc[7]  = (*c++ & 0x3) << 1;		/* 10 */
+		xmc[7] |= (*c >> 7) & 0x1;
+		xmc[8]  = (*c >> 4) & 0x7;
+		xmc[9]  = (*c >> 1) & 0x7;
+		xmc[10]  = (*c++ & 0x1) << 2;
+		xmc[10] |= (*c >> 6) & 0x3;
+		xmc[11]  = (*c >> 3) & 0x7;
+		xmc[12]  = *c++ & 0x7;
+		Nc[1]  = (*c >> 1) & 0x7F;
+		bc[1]  = (*c++ & 0x1) << 1;
+		bc[1] |= (*c >> 7) & 0x1;
+		Mc[1]  = (*c >> 5) & 0x3;
+		xmaxc[1]  = (*c++ & 0x1F) << 1;
+		xmaxc[1] |= (*c >> 7) & 0x1;
+		xmc[13]  = (*c >> 4) & 0x7;
+		xmc[14]  = (*c >> 1) & 0x7;
+		xmc[15]  = (*c++ & 0x1) << 2;
+		xmc[15] |= (*c >> 6) & 0x3;
+		xmc[16]  = (*c >> 3) & 0x7;
+		xmc[17]  = *c++ & 0x7;
+		xmc[18]  = (*c >> 5) & 0x7;
+		xmc[19]  = (*c >> 2) & 0x7;
+		xmc[20]  = (*c++ & 0x3) << 1;
+		xmc[20] |= (*c >> 7) & 0x1;
+		xmc[21]  = (*c >> 4) & 0x7;
+		xmc[22]  = (*c >> 1) & 0x7;
+		xmc[23]  = (*c++ & 0x1) << 2;
+		xmc[23] |= (*c >> 6) & 0x3;
+		xmc[24]  = (*c >> 3) & 0x7;
+		xmc[25]  = *c++ & 0x7;
+		Nc[2]  = (*c >> 1) & 0x7F;
+		bc[2]  = (*c++ & 0x1) << 1;		/* 20 */
+		bc[2] |= (*c >> 7) & 0x1;
+		Mc[2]  = (*c >> 5) & 0x3;
+		xmaxc[2]  = (*c++ & 0x1F) << 1;
+		xmaxc[2] |= (*c >> 7) & 0x1;
+		xmc[26]  = (*c >> 4) & 0x7;
+		xmc[27]  = (*c >> 1) & 0x7;
+		xmc[28]  = (*c++ & 0x1) << 2;
+		xmc[28] |= (*c >> 6) & 0x3;
+		xmc[29]  = (*c >> 3) & 0x7;
+		xmc[30]  = *c++ & 0x7;
+		xmc[31]  = (*c >> 5) & 0x7;
+		xmc[32]  = (*c >> 2) & 0x7;
+		xmc[33]  = (*c++ & 0x3) << 1;
+		xmc[33] |= (*c >> 7) & 0x1;
+		xmc[34]  = (*c >> 4) & 0x7;
+		xmc[35]  = (*c >> 1) & 0x7;
+		xmc[36]  = (*c++ & 0x1) << 2;
+		xmc[36] |= (*c >> 6) & 0x3;
+		xmc[37]  = (*c >> 3) & 0x7;
+		xmc[38]  = *c++ & 0x7;
+		Nc[3]  = (*c >> 1) & 0x7F;
+		bc[3]  = (*c++ & 0x1) << 1;
+		bc[3] |= (*c >> 7) & 0x1;
+		Mc[3]  = (*c >> 5) & 0x3;
+		xmaxc[3]  = (*c++ & 0x1F) << 1;
+		xmaxc[3] |= (*c >> 7) & 0x1;
+		xmc[39]  = (*c >> 4) & 0x7;
+		xmc[40]  = (*c >> 1) & 0x7;
+		xmc[41]  = (*c++ & 0x1) << 2;
+		xmc[41] |= (*c >> 6) & 0x3;
+		xmc[42]  = (*c >> 3) & 0x7;
+		xmc[43]  = *c++ & 0x7;			/* 30  */
+		xmc[44]  = (*c >> 5) & 0x7;
+		xmc[45]  = (*c >> 2) & 0x7;
+		xmc[46]  = (*c++ & 0x3) << 1;
+		xmc[46] |= (*c >> 7) & 0x1;
+		xmc[47]  = (*c >> 4) & 0x7;
+		xmc[48]  = (*c >> 1) & 0x7;
+		xmc[49]  = (*c++ & 0x1) << 2;
+		xmc[49] |= (*c >> 6) & 0x3;
+		xmc[50]  = (*c >> 3) & 0x7;
+		xmc[51]  = *c & 0x7;			/* 33 */
+	}
+
+	Gsm_Decoder(s, LARc, Nc, bc, Mc, xmaxc, xmc, target);
+
+	return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_destroy.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_destroy.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_destroy.c	(revision 1163)
@@ -0,0 +1,26 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_destroy.c,v 1.3 1994/11/28 19:52:25 jutta Exp $ */
+
+#include "gsm.h"
+#include "config.h"
+#include "proto.h"
+
+#ifdef	HAS_STDLIB_H
+#	include	<stdlib.h>
+#else
+#	ifdef	HAS_MALLOC_H
+#		include 	<malloc.h>
+#	else
+		extern void free();
+#	endif
+#endif
+
+void gsm_destroy P1((S), gsm S)
+{
+	if (S) free((char *)S);
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_encode.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_encode.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_encode.c	(revision 1163)
@@ -0,0 +1,451 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_encode.c,v 1.2 1996/07/02 09:59:05 jutta Exp $ */
+
+#include "private.h"
+#include "gsm.h"
+#include "proto.h"
+
+void gsm_encode P3((s, source, c), gsm s, gsm_signal * source, gsm_byte * c)
+{
+	word	 	LARc[8], Nc[4], Mc[4], bc[4], xmaxc[4], xmc[13*4];
+
+	Gsm_Coder(s, source, LARc, Nc, bc, Mc, xmaxc, xmc);
+
+
+	/*	variable	size
+
+		GSM_MAGIC	4
+
+		LARc[0]		6
+		LARc[1]		6
+		LARc[2]		5
+		LARc[3]		5
+		LARc[4]		4
+		LARc[5]		4
+		LARc[6]		3
+		LARc[7]		3
+
+		Nc[0]		7
+		bc[0]		2
+		Mc[0]		2
+		xmaxc[0]	6
+		xmc[0]		3
+		xmc[1]		3
+		xmc[2]		3
+		xmc[3]		3
+		xmc[4]		3
+		xmc[5]		3
+		xmc[6]		3
+		xmc[7]		3
+		xmc[8]		3
+		xmc[9]		3
+		xmc[10]		3
+		xmc[11]		3
+		xmc[12]		3
+
+		Nc[1]		7
+		bc[1]		2
+		Mc[1]		2
+		xmaxc[1]	6
+		xmc[13]		3
+		xmc[14]		3
+		xmc[15]		3
+		xmc[16]		3
+		xmc[17]		3
+		xmc[18]		3
+		xmc[19]		3
+		xmc[20]		3
+		xmc[21]		3
+		xmc[22]		3
+		xmc[23]		3
+		xmc[24]		3
+		xmc[25]		3
+
+		Nc[2]		7
+		bc[2]		2
+		Mc[2]		2
+		xmaxc[2]	6
+		xmc[26]		3
+		xmc[27]		3
+		xmc[28]		3
+		xmc[29]		3
+		xmc[30]		3
+		xmc[31]		3
+		xmc[32]		3
+		xmc[33]		3
+		xmc[34]		3
+		xmc[35]		3
+		xmc[36]		3
+		xmc[37]		3
+		xmc[38]		3
+
+		Nc[3]		7
+		bc[3]		2
+		Mc[3]		2
+		xmaxc[3]	6
+		xmc[39]		3
+		xmc[40]		3
+		xmc[41]		3
+		xmc[42]		3
+		xmc[43]		3
+		xmc[44]		3
+		xmc[45]		3
+		xmc[46]		3
+		xmc[47]		3
+		xmc[48]		3
+		xmc[49]		3
+		xmc[50]		3
+		xmc[51]		3
+	*/
+
+#ifdef WAV49
+
+	if (s->wav_fmt) {
+		s->frame_index = !s->frame_index;
+		if (s->frame_index) {
+
+			uword sr;
+
+			sr = 0;
+			sr = sr >> 6 | LARc[0] << 10;
+			sr = sr >> 6 | LARc[1] << 10;
+			*c++ = sr >> 4;
+			sr = sr >> 5 | LARc[2] << 11;
+			*c++ = sr >> 7;
+			sr = sr >> 5 | LARc[3] << 11;
+			sr = sr >> 4 | LARc[4] << 12;
+			*c++ = sr >> 6;
+			sr = sr >> 4 | LARc[5] << 12;
+			sr = sr >> 3 | LARc[6] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | LARc[7] << 13;
+			sr = sr >> 7 | Nc[0] << 9;
+			*c++ = sr >> 5;
+			sr = sr >> 2 | bc[0] << 14;
+			sr = sr >> 2 | Mc[0] << 14;
+			sr = sr >> 6 | xmaxc[0] << 10;
+			*c++ = sr >> 3;
+			sr = sr >> 3 | xmc[0] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[1] << 13;
+			sr = sr >> 3 | xmc[2] << 13;
+			sr = sr >> 3 | xmc[3] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[4] << 13;
+			sr = sr >> 3 | xmc[5] << 13;
+			sr = sr >> 3 | xmc[6] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[7] << 13;
+			sr = sr >> 3 | xmc[8] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[9] << 13;
+			sr = sr >> 3 | xmc[10] << 13;
+			sr = sr >> 3 | xmc[11] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[12] << 13;
+			sr = sr >> 7 | Nc[1] << 9;
+			*c++ = sr >> 5;
+			sr = sr >> 2 | bc[1] << 14;
+			sr = sr >> 2 | Mc[1] << 14;
+			sr = sr >> 6 | xmaxc[1] << 10;
+			*c++ = sr >> 3;
+			sr = sr >> 3 | xmc[13] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[14] << 13;
+			sr = sr >> 3 | xmc[15] << 13;
+			sr = sr >> 3 | xmc[16] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[17] << 13;
+			sr = sr >> 3 | xmc[18] << 13;
+			sr = sr >> 3 | xmc[19] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[20] << 13;
+			sr = sr >> 3 | xmc[21] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[22] << 13;
+			sr = sr >> 3 | xmc[23] << 13;
+			sr = sr >> 3 | xmc[24] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[25] << 13;
+			sr = sr >> 7 | Nc[2] << 9;
+			*c++ = sr >> 5;
+			sr = sr >> 2 | bc[2] << 14;
+			sr = sr >> 2 | Mc[2] << 14;
+			sr = sr >> 6 | xmaxc[2] << 10;
+			*c++ = sr >> 3;
+			sr = sr >> 3 | xmc[26] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[27] << 13;
+			sr = sr >> 3 | xmc[28] << 13;
+			sr = sr >> 3 | xmc[29] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[30] << 13;
+			sr = sr >> 3 | xmc[31] << 13;
+			sr = sr >> 3 | xmc[32] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[33] << 13;
+			sr = sr >> 3 | xmc[34] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[35] << 13;
+			sr = sr >> 3 | xmc[36] << 13;
+			sr = sr >> 3 | xmc[37] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[38] << 13;
+			sr = sr >> 7 | Nc[3] << 9;
+			*c++ = sr >> 5;
+			sr = sr >> 2 | bc[3] << 14;
+			sr = sr >> 2 | Mc[3] << 14;
+			sr = sr >> 6 | xmaxc[3] << 10;
+			*c++ = sr >> 3;
+			sr = sr >> 3 | xmc[39] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[40] << 13;
+			sr = sr >> 3 | xmc[41] << 13;
+			sr = sr >> 3 | xmc[42] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[43] << 13;
+			sr = sr >> 3 | xmc[44] << 13;
+			sr = sr >> 3 | xmc[45] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[46] << 13;
+			sr = sr >> 3 | xmc[47] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[48] << 13;
+			sr = sr >> 3 | xmc[49] << 13;
+			sr = sr >> 3 | xmc[50] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[51] << 13;
+			sr = sr >> 4;
+			*c = sr >> 8;
+			s->frame_chain = *c;
+		}
+		else {
+			uword sr;
+
+			sr = 0;
+			sr = sr >> 4 | s->frame_chain << 12;
+			sr = sr >> 6 | LARc[0] << 10;
+			*c++ = sr >> 6;
+			sr = sr >> 6 | LARc[1] << 10;
+			*c++ = sr >> 8;
+			sr = sr >> 5 | LARc[2] << 11;
+			sr = sr >> 5 | LARc[3] << 11;
+			*c++ = sr >> 6;
+			sr = sr >> 4 | LARc[4] << 12;
+			sr = sr >> 4 | LARc[5] << 12;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | LARc[6] << 13;
+			sr = sr >> 3 | LARc[7] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 7 | Nc[0] << 9;
+			sr = sr >> 2 | bc[0] << 14;
+			*c++ = sr >> 7;
+			sr = sr >> 2 | Mc[0] << 14;
+			sr = sr >> 6 | xmaxc[0] << 10;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[0] << 13;
+			sr = sr >> 3 | xmc[1] << 13;
+			sr = sr >> 3 | xmc[2] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[3] << 13;
+			sr = sr >> 3 | xmc[4] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[5] << 13;
+			sr = sr >> 3 | xmc[6] << 13;
+			sr = sr >> 3 | xmc[7] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[8] << 13;
+			sr = sr >> 3 | xmc[9] << 13;
+			sr = sr >> 3 | xmc[10] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[11] << 13;
+			sr = sr >> 3 | xmc[12] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 7 | Nc[1] << 9;
+			sr = sr >> 2 | bc[1] << 14;
+			*c++ = sr >> 7;
+			sr = sr >> 2 | Mc[1] << 14;
+			sr = sr >> 6 | xmaxc[1] << 10;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[13] << 13;
+			sr = sr >> 3 | xmc[14] << 13;
+			sr = sr >> 3 | xmc[15] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[16] << 13;
+			sr = sr >> 3 | xmc[17] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[18] << 13;
+			sr = sr >> 3 | xmc[19] << 13;
+			sr = sr >> 3 | xmc[20] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[21] << 13;
+			sr = sr >> 3 | xmc[22] << 13;
+			sr = sr >> 3 | xmc[23] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[24] << 13;
+			sr = sr >> 3 | xmc[25] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 7 | Nc[2] << 9;
+			sr = sr >> 2 | bc[2] << 14;
+			*c++ = sr >> 7;
+			sr = sr >> 2 | Mc[2] << 14;
+			sr = sr >> 6 | xmaxc[2] << 10;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[26] << 13;
+			sr = sr >> 3 | xmc[27] << 13;
+			sr = sr >> 3 | xmc[28] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[29] << 13;
+			sr = sr >> 3 | xmc[30] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[31] << 13;
+			sr = sr >> 3 | xmc[32] << 13;
+			sr = sr >> 3 | xmc[33] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[34] << 13;
+			sr = sr >> 3 | xmc[35] << 13;
+			sr = sr >> 3 | xmc[36] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[37] << 13;
+			sr = sr >> 3 | xmc[38] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 7 | Nc[3] << 9;
+			sr = sr >> 2 | bc[3] << 14;
+			*c++ = sr >> 7;
+			sr = sr >> 2 | Mc[3] << 14;
+			sr = sr >> 6 | xmaxc[3] << 10;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[39] << 13;
+			sr = sr >> 3 | xmc[40] << 13;
+			sr = sr >> 3 | xmc[41] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[42] << 13;
+			sr = sr >> 3 | xmc[43] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[44] << 13;
+			sr = sr >> 3 | xmc[45] << 13;
+			sr = sr >> 3 | xmc[46] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[47] << 13;
+			sr = sr >> 3 | xmc[48] << 13;
+			sr = sr >> 3 | xmc[49] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[50] << 13;
+			sr = sr >> 3 | xmc[51] << 13;
+			*c++ = sr >> 8;
+		}
+	}
+
+	else
+
+#endif	/* WAV49 */
+	{
+
+		*c++ =   ((GSM_MAGIC & 0xF) << 4)		/* 1 */
+		       | ((LARc[0] >> 2) & 0xF);
+		*c++ =   ((LARc[0] & 0x3) << 6)
+		       | (LARc[1] & 0x3F);
+		*c++ =   ((LARc[2] & 0x1F) << 3)
+		       | ((LARc[3] >> 2) & 0x7);
+		*c++ =   ((LARc[3] & 0x3) << 6)
+		       | ((LARc[4] & 0xF) << 2)
+		       | ((LARc[5] >> 2) & 0x3);
+		*c++ =   ((LARc[5] & 0x3) << 6)
+		       | ((LARc[6] & 0x7) << 3)
+		       | (LARc[7] & 0x7);
+		*c++ =   ((Nc[0] & 0x7F) << 1)
+		       | ((bc[0] >> 1) & 0x1);
+		*c++ =   ((bc[0] & 0x1) << 7)
+		       | ((Mc[0] & 0x3) << 5)
+		       | ((xmaxc[0] >> 1) & 0x1F);
+		*c++ =   ((xmaxc[0] & 0x1) << 7)
+		       | ((xmc[0] & 0x7) << 4)
+		       | ((xmc[1] & 0x7) << 1)
+		       | ((xmc[2] >> 2) & 0x1);
+		*c++ =   ((xmc[2] & 0x3) << 6)
+		       | ((xmc[3] & 0x7) << 3)
+		       | (xmc[4] & 0x7);
+		*c++ =   ((xmc[5] & 0x7) << 5)			/* 10 */
+		       | ((xmc[6] & 0x7) << 2)
+		       | ((xmc[7] >> 1) & 0x3);
+		*c++ =   ((xmc[7] & 0x1) << 7)
+		       | ((xmc[8] & 0x7) << 4)
+		       | ((xmc[9] & 0x7) << 1)
+		       | ((xmc[10] >> 2) & 0x1);
+		*c++ =   ((xmc[10] & 0x3) << 6)
+		       | ((xmc[11] & 0x7) << 3)
+		       | (xmc[12] & 0x7);
+		*c++ =   ((Nc[1] & 0x7F) << 1)
+		       | ((bc[1] >> 1) & 0x1);
+		*c++ =   ((bc[1] & 0x1) << 7)
+		       | ((Mc[1] & 0x3) << 5)
+		       | ((xmaxc[1] >> 1) & 0x1F);
+		*c++ =   ((xmaxc[1] & 0x1) << 7)
+		       | ((xmc[13] & 0x7) << 4)
+		       | ((xmc[14] & 0x7) << 1)
+		       | ((xmc[15] >> 2) & 0x1);
+		*c++ =   ((xmc[15] & 0x3) << 6)
+		       | ((xmc[16] & 0x7) << 3)
+		       | (xmc[17] & 0x7);
+		*c++ =   ((xmc[18] & 0x7) << 5)
+		       | ((xmc[19] & 0x7) << 2)
+		       | ((xmc[20] >> 1) & 0x3);
+		*c++ =   ((xmc[20] & 0x1) << 7)
+		       | ((xmc[21] & 0x7) << 4)
+		       | ((xmc[22] & 0x7) << 1)
+		       | ((xmc[23] >> 2) & 0x1);
+		*c++ =   ((xmc[23] & 0x3) << 6)
+		       | ((xmc[24] & 0x7) << 3)
+		       | (xmc[25] & 0x7);
+		*c++ =   ((Nc[2] & 0x7F) << 1)			/* 20 */
+		       | ((bc[2] >> 1) & 0x1);
+		*c++ =   ((bc[2] & 0x1) << 7)
+		       | ((Mc[2] & 0x3) << 5)
+		       | ((xmaxc[2] >> 1) & 0x1F);
+		*c++ =   ((xmaxc[2] & 0x1) << 7)
+		       | ((xmc[26] & 0x7) << 4)
+		       | ((xmc[27] & 0x7) << 1)
+		       | ((xmc[28] >> 2) & 0x1);
+		*c++ =   ((xmc[28] & 0x3) << 6)
+		       | ((xmc[29] & 0x7) << 3)
+		       | (xmc[30] & 0x7);
+		*c++ =   ((xmc[31] & 0x7) << 5)
+		       | ((xmc[32] & 0x7) << 2)
+		       | ((xmc[33] >> 1) & 0x3);
+		*c++ =   ((xmc[33] & 0x1) << 7)
+		       | ((xmc[34] & 0x7) << 4)
+		       | ((xmc[35] & 0x7) << 1)
+		       | ((xmc[36] >> 2) & 0x1);
+		*c++ =   ((xmc[36] & 0x3) << 6)
+		       | ((xmc[37] & 0x7) << 3)
+		       | (xmc[38] & 0x7);
+		*c++ =   ((Nc[3] & 0x7F) << 1)
+		       | ((bc[3] >> 1) & 0x1);
+		*c++ =   ((bc[3] & 0x1) << 7)
+		       | ((Mc[3] & 0x3) << 5)
+		       | ((xmaxc[3] >> 1) & 0x1F);
+		*c++ =   ((xmaxc[3] & 0x1) << 7)
+		       | ((xmc[39] & 0x7) << 4)
+		       | ((xmc[40] & 0x7) << 1)
+		       | ((xmc[41] >> 2) & 0x1);
+		*c++ =   ((xmc[41] & 0x3) << 6)			/* 30 */
+		       | ((xmc[42] & 0x7) << 3)
+		       | (xmc[43] & 0x7);
+		*c++ =   ((xmc[44] & 0x7) << 5)
+		       | ((xmc[45] & 0x7) << 2)
+		       | ((xmc[46] >> 1) & 0x3);
+		*c++ =   ((xmc[46] & 0x1) << 7)
+		       | ((xmc[47] & 0x7) << 4)
+		       | ((xmc[48] & 0x7) << 1)
+		       | ((xmc[49] >> 2) & 0x1);
+		*c++ =   ((xmc[49] & 0x3) << 6)
+		       | ((xmc[50] & 0x7) << 3)
+		       | (xmc[51] & 0x7);
+
+	}
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_explode.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_explode.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_explode.c	(revision 1163)
@@ -0,0 +1,417 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_explode.c,v 1.2 1996/07/02 14:32:42 jutta Exp jutta $ */
+
+#include "private.h"
+#include "gsm.h"
+#include "proto.h"
+
+int gsm_explode P3((s, c, target), gsm s, gsm_byte * c, gsm_signal * target)
+{
+#	define	LARc	target
+#	define	Nc	*((gsm_signal (*) [17])(target + 8))
+#	define	bc	*((gsm_signal (*) [17])(target + 9))
+#	define	Mc	*((gsm_signal (*) [17])(target + 10))
+#	define	xmaxc	*((gsm_signal (*) [17])(target + 11))
+
+
+#ifdef WAV49
+	if (s->wav_fmt) {
+
+		uword sr = 0;
+
+		if (s->frame_index == 1) {
+
+			sr = *c++;
+			LARc[0] = sr & 0x3f;  sr >>= 6;
+			sr |= (uword)*c++ << 2;
+			LARc[1] = sr & 0x3f;  sr >>= 6;
+			sr |= (uword)*c++ << 4;
+			LARc[2] = sr & 0x1f;  sr >>= 5;
+			LARc[3] = sr & 0x1f;  sr >>= 5;
+			sr |= (uword)*c++ << 2;
+			LARc[4] = sr & 0xf;  sr >>= 4;
+			LARc[5] = sr & 0xf;  sr >>= 4;
+			sr |= (uword)*c++ << 2;			/* 5 */
+			LARc[6] = sr & 0x7;  sr >>= 3;
+			LARc[7] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 4;
+			Nc[0] = sr & 0x7f;  sr >>= 7;
+			bc[0] = sr & 0x3;  sr >>= 2;
+			Mc[0] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 1;
+			xmaxc[0] = sr & 0x3f;  sr >>= 6;
+#undef	xmc
+#define	xmc	(target + 12)
+			xmc[0] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[1] = sr & 0x7;  sr >>= 3;
+			xmc[2] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[3] = sr & 0x7;  sr >>= 3;
+			xmc[4] = sr & 0x7;  sr >>= 3;
+			xmc[5] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;			/* 10 */
+			xmc[6] = sr & 0x7;  sr >>= 3;
+			xmc[7] = sr & 0x7;  sr >>= 3;
+			xmc[8] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[9] = sr & 0x7;  sr >>= 3;
+			xmc[10] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[11] = sr & 0x7;  sr >>= 3;
+			xmc[12] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 4;
+			Nc[1] = sr & 0x7f;  sr >>= 7;
+			bc[1] = sr & 0x3;  sr >>= 2;
+			Mc[1] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 1;
+			xmaxc[1] = sr & 0x3f;  sr >>= 6;
+#undef	xmc
+#define	xmc	(target + 29 - 13)
+
+			xmc[13] = sr & 0x7;  sr >>= 3;
+			sr = *c++;				/* 15 */
+			xmc[14] = sr & 0x7;  sr >>= 3;
+			xmc[15] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[16] = sr & 0x7;  sr >>= 3;
+			xmc[17] = sr & 0x7;  sr >>= 3;
+			xmc[18] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[19] = sr & 0x7;  sr >>= 3;
+			xmc[20] = sr & 0x7;  sr >>= 3;
+			xmc[21] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[22] = sr & 0x7;  sr >>= 3;
+			xmc[23] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[24] = sr & 0x7;  sr >>= 3;
+			xmc[25] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 4;			/* 20 */
+			Nc[2] = sr & 0x7f;  sr >>= 7;
+			bc[2] = sr & 0x3;  sr >>= 2;
+			Mc[2] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 1;
+			xmaxc[2] = sr & 0x3f;  sr >>= 6;
+
+#undef	xmc
+#define	xmc	(target + 46 - 26)
+
+			xmc[26] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[27] = sr & 0x7;  sr >>= 3;
+			xmc[28] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[29] = sr & 0x7;  sr >>= 3;
+			xmc[30] = sr & 0x7;  sr >>= 3;
+			xmc[31] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[32] = sr & 0x7;  sr >>= 3;
+			xmc[33] = sr & 0x7;  sr >>= 3;
+			xmc[34] = sr & 0x7;  sr >>= 3;
+			sr = *c++;				/* 25 */
+			xmc[35] = sr & 0x7;  sr >>= 3;
+			xmc[36] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[37] = sr & 0x7;  sr >>= 3;
+			xmc[38] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 4;
+			Nc[3] = sr & 0x7f;  sr >>= 7;
+			bc[3] = sr & 0x3;  sr >>= 2;
+			Mc[3] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 1;
+			xmaxc[3] = sr & 0x3f;  sr >>= 6;
+#undef	xmc
+#define	xmc	(target + 63 - 39)
+
+			xmc[39] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[40] = sr & 0x7;  sr >>= 3;
+			xmc[41] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;			/* 30 */
+			xmc[42] = sr & 0x7;  sr >>= 3;
+			xmc[43] = sr & 0x7;  sr >>= 3;
+			xmc[44] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[45] = sr & 0x7;  sr >>= 3;
+			xmc[46] = sr & 0x7;  sr >>= 3;
+			xmc[47] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[48] = sr & 0x7;  sr >>= 3;
+			xmc[49] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[50] = sr & 0x7;  sr >>= 3;
+			xmc[51] = sr & 0x7;  sr >>= 3;
+
+			s->frame_chain = sr & 0xf;
+		}
+		else {
+			sr = s->frame_chain;
+			sr |= (uword)*c++ << 4;			/* 1 */
+			LARc[0] = sr & 0x3f;  sr >>= 6;
+			LARc[1] = sr & 0x3f;  sr >>= 6;
+			sr = *c++;
+			LARc[2] = sr & 0x1f;  sr >>= 5;
+			sr |= (uword)*c++ << 3;
+			LARc[3] = sr & 0x1f;  sr >>= 5;
+			LARc[4] = sr & 0xf;  sr >>= 4;
+			sr |= (uword)*c++ << 2;
+			LARc[5] = sr & 0xf;  sr >>= 4;
+			LARc[6] = sr & 0x7;  sr >>= 3;
+			LARc[7] = sr & 0x7;  sr >>= 3;
+			sr = *c++;				/* 5 */
+			Nc[0] = sr & 0x7f;  sr >>= 7;
+			sr |= (uword)*c++ << 1;
+			bc[0] = sr & 0x3;  sr >>= 2;
+			Mc[0] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 5;
+			xmaxc[0] = sr & 0x3f;  sr >>= 6;
+#undef	xmc
+#define	xmc	(target + 12)
+			xmc[0] = sr & 0x7;  sr >>= 3;
+			xmc[1] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[2] = sr & 0x7;  sr >>= 3;
+			xmc[3] = sr & 0x7;  sr >>= 3;
+			xmc[4] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[5] = sr & 0x7;  sr >>= 3;
+			xmc[6] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;			/* 10 */
+			xmc[7] = sr & 0x7;  sr >>= 3;
+			xmc[8] = sr & 0x7;  sr >>= 3;
+			xmc[9] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[10] = sr & 0x7;  sr >>= 3;
+			xmc[11] = sr & 0x7;  sr >>= 3;
+			xmc[12] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			Nc[1] = sr & 0x7f;  sr >>= 7;
+			sr |= (uword)*c++ << 1;
+			bc[1] = sr & 0x3;  sr >>= 2;
+			Mc[1] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 5;
+			xmaxc[1] = sr & 0x3f;  sr >>= 6;
+#undef	xmc
+#define	xmc	(target + 29 - 13)
+
+			xmc[13] = sr & 0x7;  sr >>= 3;
+			xmc[14] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;			/* 15 */
+			xmc[15] = sr & 0x7;  sr >>= 3;
+			xmc[16] = sr & 0x7;  sr >>= 3;
+			xmc[17] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[18] = sr & 0x7;  sr >>= 3;
+			xmc[19] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[20] = sr & 0x7;  sr >>= 3;
+			xmc[21] = sr & 0x7;  sr >>= 3;
+			xmc[22] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[23] = sr & 0x7;  sr >>= 3;
+			xmc[24] = sr & 0x7;  sr >>= 3;
+			xmc[25] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			Nc[2] = sr & 0x7f;  sr >>= 7;
+			sr |= (uword)*c++ << 1;			/* 20 */
+			bc[2] = sr & 0x3;  sr >>= 2;
+			Mc[2] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 5;
+			xmaxc[2] = sr & 0x3f;  sr >>= 6;
+#undef	xmc
+#define	xmc	(target + 46 - 26)
+			xmc[26] = sr & 0x7;  sr >>= 3;
+			xmc[27] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;	
+			xmc[28] = sr & 0x7;  sr >>= 3;
+			xmc[29] = sr & 0x7;  sr >>= 3;
+			xmc[30] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			xmc[31] = sr & 0x7;  sr >>= 3;
+			xmc[32] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[33] = sr & 0x7;  sr >>= 3;
+			xmc[34] = sr & 0x7;  sr >>= 3;
+			xmc[35] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;			/* 25 */
+			xmc[36] = sr & 0x7;  sr >>= 3;
+			xmc[37] = sr & 0x7;  sr >>= 3;
+			xmc[38] = sr & 0x7;  sr >>= 3;
+			sr = *c++;
+			Nc[3] = sr & 0x7f;  sr >>= 7;
+			sr |= (uword)*c++ << 1;		
+			bc[3] = sr & 0x3;  sr >>= 2;
+			Mc[3] = sr & 0x3;  sr >>= 2;
+			sr |= (uword)*c++ << 5;
+			xmaxc[3] = sr & 0x3f;  sr >>= 6;
+
+#undef	xmc
+#define	xmc	(target + 63 - 39)
+
+			xmc[39] = sr & 0x7;  sr >>= 3;
+			xmc[40] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[41] = sr & 0x7;  sr >>= 3;
+			xmc[42] = sr & 0x7;  sr >>= 3;
+			xmc[43] = sr & 0x7;  sr >>= 3;
+			sr = *c++;				/* 30 */
+			xmc[44] = sr & 0x7;  sr >>= 3;
+			xmc[45] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 2;
+			xmc[46] = sr & 0x7;  sr >>= 3;
+			xmc[47] = sr & 0x7;  sr >>= 3;
+			xmc[48] = sr & 0x7;  sr >>= 3;
+			sr |= (uword)*c++ << 1;
+			xmc[49] = sr & 0x7;  sr >>= 3;
+			xmc[50] = sr & 0x7;  sr >>= 3;
+			xmc[51] = sr & 0x7;  sr >>= 3;
+		}
+	}
+	else 
+#endif
+	{
+	/* GSM_MAGIC  = (*c >> 4) & 0xF; */
+
+	if (((*c >> 4) & 0x0F) != GSM_MAGIC) return -1;
+
+	LARc[0]  = (*c++ & 0xF) << 2;		/* 1 */
+	LARc[0] |= (*c >> 6) & 0x3;
+	LARc[1]  = *c++ & 0x3F;
+	LARc[2]  = (*c >> 3) & 0x1F;
+	LARc[3]  = (*c++ & 0x7) << 2;
+	LARc[3] |= (*c >> 6) & 0x3;
+	LARc[4]  = (*c >> 2) & 0xF;
+	LARc[5]  = (*c++ & 0x3) << 2;
+	LARc[5] |= (*c >> 6) & 0x3;
+	LARc[6]  = (*c >> 3) & 0x7;
+	LARc[7]  = *c++ & 0x7;
+
+	Nc[0]  = (*c >> 1) & 0x7F;
+
+	bc[0]  = (*c++ & 0x1) << 1;
+	bc[0] |= (*c >> 7) & 0x1;
+
+	Mc[0]  = (*c >> 5) & 0x3;
+
+	xmaxc[0]  = (*c++ & 0x1F) << 1;
+	xmaxc[0] |= (*c >> 7) & 0x1;
+
+#undef	xmc
+#define	xmc	(target + 12)
+
+	xmc[0]  = (*c >> 4) & 0x7;
+	xmc[1]  = (*c >> 1) & 0x7;
+	xmc[2]  = (*c++ & 0x1) << 2;
+	xmc[2] |= (*c >> 6) & 0x3;
+	xmc[3]  = (*c >> 3) & 0x7;
+	xmc[4]  = *c++ & 0x7;
+	xmc[5]  = (*c >> 5) & 0x7;
+	xmc[6]  = (*c >> 2) & 0x7;
+	xmc[7]  = (*c++ & 0x3) << 1;		/* 10 */
+	xmc[7] |= (*c >> 7) & 0x1;
+	xmc[8]  = (*c >> 4) & 0x7;
+	xmc[9]  = (*c >> 1) & 0x7;
+	xmc[10]  = (*c++ & 0x1) << 2;
+	xmc[10] |= (*c >> 6) & 0x3;
+	xmc[11]  = (*c >> 3) & 0x7;
+	xmc[12]  = *c++ & 0x7;
+
+	Nc[1]  = (*c >> 1) & 0x7F;
+
+	bc[1]  = (*c++ & 0x1) << 1;
+	bc[1] |= (*c >> 7) & 0x1;
+
+	Mc[1]  = (*c >> 5) & 0x3;
+
+	xmaxc[1]  = (*c++ & 0x1F) << 1;
+	xmaxc[1] |= (*c >> 7) & 0x1;
+
+#undef	xmc
+#define	xmc	(target + 29 - 13)
+
+	xmc[13]  = (*c >> 4) & 0x7;
+	xmc[14]  = (*c >> 1) & 0x7;
+	xmc[15]  = (*c++ & 0x1) << 2;
+	xmc[15] |= (*c >> 6) & 0x3;
+	xmc[16]  = (*c >> 3) & 0x7;
+	xmc[17]  = *c++ & 0x7;
+	xmc[18]  = (*c >> 5) & 0x7;
+	xmc[19]  = (*c >> 2) & 0x7;
+	xmc[20]  = (*c++ & 0x3) << 1;
+	xmc[20] |= (*c >> 7) & 0x1;
+	xmc[21]  = (*c >> 4) & 0x7;
+	xmc[22]  = (*c >> 1) & 0x7;
+	xmc[23]  = (*c++ & 0x1) << 2;
+	xmc[23] |= (*c >> 6) & 0x3;
+	xmc[24]  = (*c >> 3) & 0x7;
+	xmc[25]  = *c++ & 0x7;
+
+	Nc[2]  = (*c >> 1) & 0x7F;
+
+	bc[2]  = (*c++ & 0x1) << 1;		/* 20 */
+	bc[2] |= (*c >> 7) & 0x1;
+
+	Mc[2]  = (*c >> 5) & 0x3;
+
+	xmaxc[2]  = (*c++ & 0x1F) << 1;
+	xmaxc[2] |= (*c >> 7) & 0x1;
+
+#undef	xmc
+#define	xmc	(target + 46 - 26)
+
+	xmc[26]  = (*c >> 4) & 0x7;
+	xmc[27]  = (*c >> 1) & 0x7;
+	xmc[28]  = (*c++ & 0x1) << 2;
+	xmc[28] |= (*c >> 6) & 0x3;
+	xmc[29]  = (*c >> 3) & 0x7;
+	xmc[30]  = *c++ & 0x7;
+	xmc[31]  = (*c >> 5) & 0x7;
+	xmc[32]  = (*c >> 2) & 0x7;
+	xmc[33]  = (*c++ & 0x3) << 1;
+	xmc[33] |= (*c >> 7) & 0x1;
+	xmc[34]  = (*c >> 4) & 0x7;
+	xmc[35]  = (*c >> 1) & 0x7;
+	xmc[36]  = (*c++ & 0x1) << 2;
+	xmc[36] |= (*c >> 6) & 0x3;
+	xmc[37]  = (*c >> 3) & 0x7;
+	xmc[38]  = *c++ & 0x7;
+
+	Nc[3]  = (*c >> 1) & 0x7F;
+
+	bc[3]  = (*c++ & 0x1) << 1;
+	bc[3] |= (*c >> 7) & 0x1;
+
+	Mc[3]  = (*c >> 5) & 0x3;
+
+	xmaxc[3]  = (*c++ & 0x1F) << 1;
+	xmaxc[3] |= (*c >> 7) & 0x1;
+
+#undef	xmc
+#define	xmc	(target + 63 - 39)
+
+	xmc[39]  = (*c >> 4) & 0x7;
+	xmc[40]  = (*c >> 1) & 0x7;
+	xmc[41]  = (*c++ & 0x1) << 2;
+	xmc[41] |= (*c >> 6) & 0x3;
+	xmc[42]  = (*c >> 3) & 0x7;
+	xmc[43]  = *c++ & 0x7;			/* 30  */
+	xmc[44]  = (*c >> 5) & 0x7;
+	xmc[45]  = (*c >> 2) & 0x7;
+	xmc[46]  = (*c++ & 0x3) << 1;
+	xmc[46] |= (*c >> 7) & 0x1;
+	xmc[47]  = (*c >> 4) & 0x7;
+	xmc[48]  = (*c >> 1) & 0x7;
+	xmc[49]  = (*c++ & 0x1) << 2;
+	xmc[49] |= (*c >> 6) & 0x3;
+	xmc[50]  = (*c >> 3) & 0x7;
+	xmc[51]  = *c & 0x7;			/* 33 */
+	}
+
+	return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_implode.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_implode.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_implode.c	(revision 1163)
@@ -0,0 +1,521 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_implode.c,v 1.2 1996/07/02 14:32:43 jutta Exp jutta $ */
+
+#include "private.h"
+
+#include "gsm.h"
+#include "proto.h"
+
+void gsm_implode P3((s, source, c), gsm s, gsm_signal * source, gsm_byte * c)
+{
+	/*	variable	size	index
+
+		GSM_MAGIC	4	-
+
+		LARc[0]		6	0
+		LARc[1]		6	1
+		LARc[2]		5	2
+		LARc[3]		5	3
+		LARc[4]		4	4
+		LARc[5]		4	5
+		LARc[6]		3	6
+		LARc[7]		3	7
+
+		Nc[0]		7	8
+		bc[0]		2	9
+		Mc[0]		2	10
+		xmaxc[0]	6	11
+		xmc[0]		3	12
+		xmc[1]		3	13
+		xmc[2]		3	14
+		xmc[3]		3	15
+		xmc[4]		3	16
+		xmc[5]		3	17
+		xmc[6]		3	18
+		xmc[7]		3	19
+		xmc[8]		3	20
+		xmc[9]		3	21
+		xmc[10]		3	22
+		xmc[11]		3	23
+		xmc[12]		3	24
+
+		Nc[1]		7	25
+		bc[1]		2	26
+		Mc[1]		2	27
+		xmaxc[1]	6	28
+		xmc[13]		3	29
+		xmc[14]		3	30
+		xmc[15]		3	31
+		xmc[16]		3	32
+		xmc[17]		3	33
+		xmc[18]		3	34
+		xmc[19]		3	35
+		xmc[20]		3	36
+		xmc[21]		3	37
+		xmc[22]		3	38
+		xmc[23]		3	39
+		xmc[24]		3	40
+		xmc[25]		3	41
+
+		Nc[2]		7	42
+		bc[2]		2	43
+		Mc[2]		2	44
+		xmaxc[2]	6	45
+		xmc[26]		3	46
+		xmc[27]		3	47
+		xmc[28]		3	48
+		xmc[29]		3	49
+		xmc[30]		3	50
+		xmc[31]		3	51
+		xmc[32]		3	52
+		xmc[33]		3	53
+		xmc[34]		3	54
+		xmc[35]		3	55
+		xmc[36]		3	56
+		xmc[37]		3	57
+		xmc[38]		3	58
+
+		Nc[3]		7	59
+		bc[3]		2	60
+		Mc[3]		2	61
+		xmaxc[3]	6	62
+		xmc[39]		3	63
+		xmc[40]		3	64
+		xmc[41]		3	65
+		xmc[42]		3	66
+		xmc[43]		3	67
+		xmc[44]		3	68
+		xmc[45]		3	69
+		xmc[46]		3	70
+		xmc[47]		3	71
+		xmc[48]		3	72
+		xmc[49]		3	73
+		xmc[50]		3	74
+		xmc[51]		3	75
+	*/
+
+	/*	There are 76 parameters per frame.  The first eight are
+	 * 	unique.  The remaining 68 are four identical subframes of
+	 * 	17 parameters each.  gsm_implode converts from a representation
+	 * 	of these parameters as values in one array of signed words
+	 * 	to the "packed" version of a GSM frame.
+	 */
+
+#	define	LARc	source
+#	define	Nc	*((gsm_signal (*) [17])(source + 8))
+#	define	bc	*((gsm_signal (*) [17])(source + 9))
+#	define	Mc	*((gsm_signal (*) [17])(source + 10))
+#	define	xmaxc	*((gsm_signal (*) [17])(source + 11))
+
+#ifdef WAV49
+	if (s->wav_fmt) {
+
+		uword sr = 0;
+		if (s->frame_index) {
+			sr = sr >> 6 | LARc[0] << 10;
+			sr = sr >> 6 | LARc[1] << 10;
+			*c++ = sr >> 4;
+			sr = sr >> 5 | LARc[2] << 11;
+			*c++ = sr >> 7;
+			sr = sr >> 5 | LARc[3] << 11;
+			sr = sr >> 4 | LARc[4] << 12;
+			*c++ = sr >> 6;
+			sr = sr >> 4 | LARc[5] << 12;
+			sr = sr >> 3 | LARc[6] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | LARc[7] << 13;
+			sr = sr >> 7 | Nc[0] << 9;
+			*c++ = sr >> 5;
+			sr = sr >> 2 | bc[0] << 14;
+			sr = sr >> 2 | Mc[0] << 14;
+			sr = sr >> 6 | xmaxc[0] << 10;
+			*c++ = sr >> 3;
+#undef xmc
+#define	xmc	(source + 12)
+
+			sr = sr >> 3 | xmc[0] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[1] << 13;
+			sr = sr >> 3 | xmc[2] << 13;
+			sr = sr >> 3 | xmc[3] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[4] << 13;
+			sr = sr >> 3 | xmc[5] << 13;
+			sr = sr >> 3 | xmc[6] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[7] << 13;
+			sr = sr >> 3 | xmc[8] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[9] << 13;
+			sr = sr >> 3 | xmc[10] << 13;
+			sr = sr >> 3 | xmc[11] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[12] << 13;
+			sr = sr >> 7 | Nc[1] << 9;
+			*c++ = sr >> 5;
+			sr = sr >> 2 | bc[1] << 14;
+			sr = sr >> 2 | Mc[1] << 14;
+			sr = sr >> 6 | xmaxc[1] << 10;
+			*c++ = sr >> 3;
+#undef	xmc
+#define	xmc	(source + 29 - 13)
+
+			sr = sr >> 3 | xmc[13] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[14] << 13;
+			sr = sr >> 3 | xmc[15] << 13;
+			sr = sr >> 3 | xmc[16] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[17] << 13;
+			sr = sr >> 3 | xmc[18] << 13;
+			sr = sr >> 3 | xmc[19] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[20] << 13;
+			sr = sr >> 3 | xmc[21] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[22] << 13;
+			sr = sr >> 3 | xmc[23] << 13;
+			sr = sr >> 3 | xmc[24] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[25] << 13;
+			sr = sr >> 7 | Nc[2] << 9;
+			*c++ = sr >> 5;
+			sr = sr >> 2 | bc[2] << 14;
+			sr = sr >> 2 | Mc[2] << 14;
+			sr = sr >> 6 | xmaxc[2] << 10;
+			*c++ = sr >> 3;
+#undef	xmc
+#define	xmc	(source + 46 - 26)
+
+			sr = sr >> 3 | xmc[26] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[27] << 13;
+			sr = sr >> 3 | xmc[28] << 13;
+			sr = sr >> 3 | xmc[29] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[30] << 13;
+			sr = sr >> 3 | xmc[31] << 13;
+			sr = sr >> 3 | xmc[32] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[33] << 13;
+			sr = sr >> 3 | xmc[34] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[35] << 13;
+			sr = sr >> 3 | xmc[36] << 13;
+			sr = sr >> 3 | xmc[37] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[38] << 13;
+			sr = sr >> 7 | Nc[3] << 9;
+			*c++ = sr >> 5;
+			sr = sr >> 2 | bc[3] << 14;
+			sr = sr >> 2 | Mc[3] << 14;
+			sr = sr >> 6 | xmaxc[3] << 10;
+			*c++ = sr >> 3;
+#undef	xmc
+#define	xmc	(source + 63 - 39)
+
+			sr = sr >> 3 | xmc[39] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[40] << 13;
+			sr = sr >> 3 | xmc[41] << 13;
+			sr = sr >> 3 | xmc[42] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[43] << 13;
+			sr = sr >> 3 | xmc[44] << 13;
+			sr = sr >> 3 | xmc[45] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[46] << 13;
+			sr = sr >> 3 | xmc[47] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[48] << 13;
+			sr = sr >> 3 | xmc[49] << 13;
+			sr = sr >> 3 | xmc[50] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[51] << 13;
+			sr = sr >> 4;
+			*c = sr >> 8;
+			s->frame_chain = *c;
+		}
+		else {
+			sr = sr >> 4 | s->frame_chain << 12;
+			sr = sr >> 6 | LARc[0] << 10;
+			*c++ = sr >> 6;
+			sr = sr >> 6 | LARc[1] << 10;
+			*c++ = sr >> 8;
+			sr = sr >> 5 | LARc[2] << 11;
+			sr = sr >> 5 | LARc[3] << 11;
+			*c++ = sr >> 6;
+			sr = sr >> 4 | LARc[4] << 12;
+			sr = sr >> 4 | LARc[5] << 12;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | LARc[6] << 13;
+			sr = sr >> 3 | LARc[7] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 7 | Nc[0] << 9;
+			sr = sr >> 2 | bc[0] << 14;
+			*c++ = sr >> 7;
+			sr = sr >> 2 | Mc[0] << 14;
+			sr = sr >> 6 | xmaxc[0] << 10;
+			*c++ = sr >> 7;
+#undef xmc
+#define	xmc	(source + 12)
+
+			sr = sr >> 3 | xmc[0] << 13;
+			sr = sr >> 3 | xmc[1] << 13;
+			sr = sr >> 3 | xmc[2] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[3] << 13;
+			sr = sr >> 3 | xmc[4] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[5] << 13;
+			sr = sr >> 3 | xmc[6] << 13;
+			sr = sr >> 3 | xmc[7] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[8] << 13;
+			sr = sr >> 3 | xmc[9] << 13;
+			sr = sr >> 3 | xmc[10] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[11] << 13;
+			sr = sr >> 3 | xmc[12] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 7 | Nc[1] << 9;
+			sr = sr >> 2 | bc[1] << 14;
+			*c++ = sr >> 7;
+			sr = sr >> 2 | Mc[1] << 14;
+			sr = sr >> 6 | xmaxc[1] << 10;
+			*c++ = sr >> 7;
+#undef	xmc
+#define	xmc	(source + 29 - 13)
+
+			sr = sr >> 3 | xmc[13] << 13;
+			sr = sr >> 3 | xmc[14] << 13;
+			sr = sr >> 3 | xmc[15] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[16] << 13;
+			sr = sr >> 3 | xmc[17] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[18] << 13;
+			sr = sr >> 3 | xmc[19] << 13;
+			sr = sr >> 3 | xmc[20] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[21] << 13;
+			sr = sr >> 3 | xmc[22] << 13;
+			sr = sr >> 3 | xmc[23] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[24] << 13;
+			sr = sr >> 3 | xmc[25] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 7 | Nc[2] << 9;
+			sr = sr >> 2 | bc[2] << 14;
+			*c++ = sr >> 7;
+			sr = sr >> 2 | Mc[2] << 14;
+			sr = sr >> 6 | xmaxc[2] << 10;
+			*c++ = sr >> 7;
+#undef	xmc
+#define	xmc	(source + 46 - 26)
+
+			sr = sr >> 3 | xmc[26] << 13;
+			sr = sr >> 3 | xmc[27] << 13;
+			sr = sr >> 3 | xmc[28] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[29] << 13;
+			sr = sr >> 3 | xmc[30] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[31] << 13;
+			sr = sr >> 3 | xmc[32] << 13;
+			sr = sr >> 3 | xmc[33] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[34] << 13;
+			sr = sr >> 3 | xmc[35] << 13;
+			sr = sr >> 3 | xmc[36] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[37] << 13;
+			sr = sr >> 3 | xmc[38] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 7 | Nc[3] << 9;
+			sr = sr >> 2 | bc[3] << 14;
+			*c++ = sr >> 7;
+			sr = sr >> 2 | Mc[3] << 14;
+			sr = sr >> 6 | xmaxc[3] << 10;
+			*c++ = sr >> 7;
+#undef	xmc
+#define	xmc	(source + 63 - 39)
+
+			sr = sr >> 3 | xmc[39] << 13;
+			sr = sr >> 3 | xmc[40] << 13;
+			sr = sr >> 3 | xmc[41] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[42] << 13;
+			sr = sr >> 3 | xmc[43] << 13;
+			*c++ = sr >> 8;
+			sr = sr >> 3 | xmc[44] << 13;
+			sr = sr >> 3 | xmc[45] << 13;
+			sr = sr >> 3 | xmc[46] << 13;
+			*c++ = sr >> 7;
+			sr = sr >> 3 | xmc[47] << 13;
+			sr = sr >> 3 | xmc[48] << 13;
+			sr = sr >> 3 | xmc[49] << 13;
+			*c++ = sr >> 6;
+			sr = sr >> 3 | xmc[50] << 13;
+			sr = sr >> 3 | xmc[51] << 13;
+			*c++ = sr >> 8;
+		}
+	}
+	else
+#endif 
+	{
+
+		*c++ =   ((GSM_MAGIC & 0xF) << 4)		/* 1 */
+		       | ((LARc[0] >> 2) & 0xF);
+		*c++ =   ((LARc[0] & 0x3) << 6)
+		       | (LARc[1] & 0x3F);
+		*c++ =   ((LARc[2] & 0x1F) << 3)
+		       | ((LARc[3] >> 2) & 0x7);
+		*c++ =   ((LARc[3] & 0x3) << 6)
+		       | ((LARc[4] & 0xF) << 2)
+		       | ((LARc[5] >> 2) & 0x3);
+		*c++ =   ((LARc[5] & 0x3) << 6)
+		       | ((LARc[6] & 0x7) << 3)
+		       | (LARc[7] & 0x7);
+
+
+		*c++ =   ((Nc[0] & 0x7F) << 1)
+
+
+		       | ((bc[0] >> 1) & 0x1);
+		*c++ =   ((bc[0] & 0x1) << 7)
+
+
+		       | ((Mc[0] & 0x3) << 5)
+
+		       | ((xmaxc[0] >> 1) & 0x1F);
+		*c++ =   ((xmaxc[0] & 0x1) << 7)
+
+#undef xmc
+#define	xmc	(source + 12)
+
+		       | ((xmc[0] & 0x7) << 4)
+		       | ((xmc[1] & 0x7) << 1)
+		       | ((xmc[2] >> 2) & 0x1);
+		*c++ =   ((xmc[2] & 0x3) << 6)
+		       | ((xmc[3] & 0x7) << 3)
+		       | (xmc[4] & 0x7);
+		*c++ =   ((xmc[5] & 0x7) << 5)			/* 10 */
+		       | ((xmc[6] & 0x7) << 2)
+		       | ((xmc[7] >> 1) & 0x3);
+		*c++ =   ((xmc[7] & 0x1) << 7)
+		       | ((xmc[8] & 0x7) << 4)
+		       | ((xmc[9] & 0x7) << 1)
+		       | ((xmc[10] >> 2) & 0x1);
+		*c++ =   ((xmc[10] & 0x3) << 6)
+		       | ((xmc[11] & 0x7) << 3)
+		       | (xmc[12] & 0x7);
+
+
+		*c++ =   ((Nc[1] & 0x7F) << 1)
+
+
+		       | ((bc[1] >> 1) & 0x1);
+		*c++ =   ((bc[1] & 0x1) << 7)
+
+
+		       | ((Mc[1] & 0x3) << 5)
+
+
+		       | ((xmaxc[1] >> 1) & 0x1F);
+		*c++ =   ((xmaxc[1] & 0x1) << 7)
+
+#undef	xmc
+#define	xmc	(source + 29 - 13)
+
+		       | ((xmc[13] & 0x7) << 4)
+		       | ((xmc[14] & 0x7) << 1)
+		       | ((xmc[15] >> 2) & 0x1);
+		*c++ =   ((xmc[15] & 0x3) << 6)
+		       | ((xmc[16] & 0x7) << 3)
+		       | (xmc[17] & 0x7);
+		*c++ =   ((xmc[18] & 0x7) << 5)
+		       | ((xmc[19] & 0x7) << 2)
+		       | ((xmc[20] >> 1) & 0x3);
+		*c++ =   ((xmc[20] & 0x1) << 7)
+		       | ((xmc[21] & 0x7) << 4)
+		       | ((xmc[22] & 0x7) << 1)
+		       | ((xmc[23] >> 2) & 0x1);
+		*c++ =   ((xmc[23] & 0x3) << 6)
+		       | ((xmc[24] & 0x7) << 3)
+		       | (xmc[25] & 0x7);
+
+
+		*c++ =   ((Nc[2] & 0x7F) << 1)			/* 20 */
+
+
+		       | ((bc[2] >> 1) & 0x1);
+		*c++ =   ((bc[2] & 0x1) << 7)
+
+
+		       | ((Mc[2] & 0x3) << 5)
+
+
+		       | ((xmaxc[2] >> 1) & 0x1F);
+		*c++ =   ((xmaxc[2] & 0x1) << 7)
+
+#undef	xmc
+#define	xmc	(source + 46 - 26)
+
+		       | ((xmc[26] & 0x7) << 4)
+		       | ((xmc[27] & 0x7) << 1)
+		       | ((xmc[28] >> 2) & 0x1);
+		*c++ =   ((xmc[28] & 0x3) << 6)
+		       | ((xmc[29] & 0x7) << 3)
+		       | (xmc[30] & 0x7);
+		*c++ =   ((xmc[31] & 0x7) << 5)
+		       | ((xmc[32] & 0x7) << 2)
+		       | ((xmc[33] >> 1) & 0x3);
+		*c++ =   ((xmc[33] & 0x1) << 7)
+		       | ((xmc[34] & 0x7) << 4)
+		       | ((xmc[35] & 0x7) << 1)
+		       | ((xmc[36] >> 2) & 0x1);
+		*c++ =   ((xmc[36] & 0x3) << 6)
+		       | ((xmc[37] & 0x7) << 3)
+		       | (xmc[38] & 0x7);
+
+
+		*c++ =   ((Nc[3] & 0x7F) << 1)
+
+
+		       | ((bc[3] >> 1) & 0x1);
+		*c++ =   ((bc[3] & 0x1) << 7)
+
+
+		       | ((Mc[3] & 0x3) << 5)
+
+
+		       | ((xmaxc[3] >> 1) & 0x1F);
+		*c++ =   ((xmaxc[3] & 0x1) << 7)
+
+#undef	xmc
+#define	xmc	(source + 63 - 39)
+
+		       | ((xmc[39] & 0x7) << 4)
+		       | ((xmc[40] & 0x7) << 1)
+		       | ((xmc[41] >> 2) & 0x1);
+		*c++ =   ((xmc[41] & 0x3) << 6)			/* 30 */
+		       | ((xmc[42] & 0x7) << 3)
+		       | (xmc[43] & 0x7);
+		*c++ =   ((xmc[44] & 0x7) << 5)
+		       | ((xmc[45] & 0x7) << 2)
+		       | ((xmc[46] >> 1) & 0x3);
+		*c++ =   ((xmc[46] & 0x1) << 7)
+		       | ((xmc[47] & 0x7) << 4)
+		       | ((xmc[48] & 0x7) << 1)
+		       | ((xmc[49] >> 2) & 0x1);
+		*c++ =   ((xmc[49] & 0x3) << 6)
+		       | ((xmc[50] & 0x7) << 3)
+		       | (xmc[51] & 0x7);
+	}
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_option.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_option.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_option.c	(revision 1163)
@@ -0,0 +1,69 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_option.c,v 1.3 1996/07/02 09:59:05 jutta Exp $ */
+
+#include "private.h"
+
+#include "gsm.h"
+#include "proto.h"
+
+int gsm_option P3((r, opt, val), gsm r, int opt, int * val)
+{
+	int 	result = -1;
+
+	switch (opt) {
+	case GSM_OPT_LTP_CUT:
+#ifdef 	LTP_CUT
+		result = r->ltp_cut;
+		if (val) r->ltp_cut = *val;
+#endif
+		break;
+
+	case GSM_OPT_VERBOSE:
+#ifndef	NDEBUG
+		result = r->verbose;
+		if (val) r->verbose = *val;
+#endif
+		break;
+
+	case GSM_OPT_FAST:
+
+#if	defined(FAST) && defined(USE_FLOAT_MUL)
+		result = r->fast;
+		if (val) r->fast = !!*val;
+#endif
+		break;
+
+	case GSM_OPT_FRAME_CHAIN:
+
+#ifdef WAV49
+		result = r->frame_chain;
+		if (val) r->frame_chain = *val;
+#endif
+		break;
+
+	case GSM_OPT_FRAME_INDEX:
+
+#ifdef WAV49
+		result = r->frame_index;
+		if (val) r->frame_index = *val;
+#endif
+		break;
+
+	case GSM_OPT_WAV49:
+
+#ifdef WAV49 
+		result = r->wav_fmt;
+		if (val) r->wav_fmt = !!*val;
+#endif
+		break;
+
+	default:
+		break;
+	}
+	return result;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_print.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_print.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/gsm_print.c	(revision 1163)
@@ -0,0 +1,167 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_print.c,v 1.1 1992/10/28 00:15:50 jutta Exp $ */
+
+#include	<stdio.h>
+
+#include "private.h"
+
+#include "gsm.h"
+#include "proto.h"
+
+int gsm_print P3((f, s, c), FILE * f, gsm s, gsm_byte * c)
+{
+	word  	LARc[8], Nc[4], Mc[4], bc[4], xmaxc[4], xmc[13*4];
+
+	/* GSM_MAGIC  = (*c >> 4) & 0xF; */
+
+	if (((*c >> 4) & 0x0F) != GSM_MAGIC) return -1;
+
+	LARc[0]  = (*c++ & 0xF) << 2;		/* 1 */
+	LARc[0] |= (*c >> 6) & 0x3;
+	LARc[1]  = *c++ & 0x3F;
+	LARc[2]  = (*c >> 3) & 0x1F;
+	LARc[3]  = (*c++ & 0x7) << 2;
+	LARc[3] |= (*c >> 6) & 0x3;
+	LARc[4]  = (*c >> 2) & 0xF;
+	LARc[5]  = (*c++ & 0x3) << 2;
+	LARc[5] |= (*c >> 6) & 0x3;
+	LARc[6]  = (*c >> 3) & 0x7;
+	LARc[7]  = *c++ & 0x7;
+
+
+	Nc[0]  = (*c >> 1) & 0x7F;
+	bc[0]  = (*c++ & 0x1) << 1;
+	bc[0] |= (*c >> 7) & 0x1;
+	Mc[0]  = (*c >> 5) & 0x3;
+	xmaxc[0]  = (*c++ & 0x1F) << 1;
+	xmaxc[0] |= (*c >> 7) & 0x1;
+	xmc[0]  = (*c >> 4) & 0x7;
+	xmc[1]  = (*c >> 1) & 0x7;
+	xmc[2]  = (*c++ & 0x1) << 2;
+	xmc[2] |= (*c >> 6) & 0x3;
+	xmc[3]  = (*c >> 3) & 0x7;
+	xmc[4]  = *c++ & 0x7;
+	xmc[5]  = (*c >> 5) & 0x7;
+	xmc[6]  = (*c >> 2) & 0x7;
+	xmc[7]  = (*c++ & 0x3) << 1;		/* 10 */
+	xmc[7] |= (*c >> 7) & 0x1;
+	xmc[8]  = (*c >> 4) & 0x7;
+	xmc[9]  = (*c >> 1) & 0x7;
+	xmc[10]  = (*c++ & 0x1) << 2;
+	xmc[10] |= (*c >> 6) & 0x3;
+	xmc[11]  = (*c >> 3) & 0x7;
+	xmc[12]  = *c++ & 0x7;
+
+	Nc[1]  = (*c >> 1) & 0x7F;
+	bc[1]  = (*c++ & 0x1) << 1;
+	bc[1] |= (*c >> 7) & 0x1;
+	Mc[1]  = (*c >> 5) & 0x3;
+	xmaxc[1]  = (*c++ & 0x1F) << 1;
+	xmaxc[1] |= (*c >> 7) & 0x1;
+	xmc[13]  = (*c >> 4) & 0x7;
+	xmc[14]  = (*c >> 1) & 0x7;
+	xmc[15]  = (*c++ & 0x1) << 2;
+	xmc[15] |= (*c >> 6) & 0x3;
+	xmc[16]  = (*c >> 3) & 0x7;
+	xmc[17]  = *c++ & 0x7;
+	xmc[18]  = (*c >> 5) & 0x7;
+	xmc[19]  = (*c >> 2) & 0x7;
+	xmc[20]  = (*c++ & 0x3) << 1;
+	xmc[20] |= (*c >> 7) & 0x1;
+	xmc[21]  = (*c >> 4) & 0x7;
+	xmc[22]  = (*c >> 1) & 0x7;
+	xmc[23]  = (*c++ & 0x1) << 2;
+	xmc[23] |= (*c >> 6) & 0x3;
+	xmc[24]  = (*c >> 3) & 0x7;
+	xmc[25]  = *c++ & 0x7;
+
+
+	Nc[2]  = (*c >> 1) & 0x7F;
+	bc[2]  = (*c++ & 0x1) << 1;		/* 20 */
+	bc[2] |= (*c >> 7) & 0x1;
+	Mc[2]  = (*c >> 5) & 0x3;
+	xmaxc[2]  = (*c++ & 0x1F) << 1;
+	xmaxc[2] |= (*c >> 7) & 0x1;
+	xmc[26]  = (*c >> 4) & 0x7;
+	xmc[27]  = (*c >> 1) & 0x7;
+	xmc[28]  = (*c++ & 0x1) << 2;
+	xmc[28] |= (*c >> 6) & 0x3;
+	xmc[29]  = (*c >> 3) & 0x7;
+	xmc[30]  = *c++ & 0x7;
+	xmc[31]  = (*c >> 5) & 0x7;
+	xmc[32]  = (*c >> 2) & 0x7;
+	xmc[33]  = (*c++ & 0x3) << 1;
+	xmc[33] |= (*c >> 7) & 0x1;
+	xmc[34]  = (*c >> 4) & 0x7;
+	xmc[35]  = (*c >> 1) & 0x7;
+	xmc[36]  = (*c++ & 0x1) << 2;
+	xmc[36] |= (*c >> 6) & 0x3;
+	xmc[37]  = (*c >> 3) & 0x7;
+	xmc[38]  = *c++ & 0x7;
+
+	Nc[3]  = (*c >> 1) & 0x7F;
+	bc[3]  = (*c++ & 0x1) << 1;
+	bc[3] |= (*c >> 7) & 0x1;
+	Mc[3]  = (*c >> 5) & 0x3;
+	xmaxc[3]  = (*c++ & 0x1F) << 1;
+	xmaxc[3] |= (*c >> 7) & 0x1;
+
+	xmc[39]  = (*c >> 4) & 0x7;
+	xmc[40]  = (*c >> 1) & 0x7;
+	xmc[41]  = (*c++ & 0x1) << 2;
+	xmc[41] |= (*c >> 6) & 0x3;
+	xmc[42]  = (*c >> 3) & 0x7;
+	xmc[43]  = *c++ & 0x7;			/* 30  */
+	xmc[44]  = (*c >> 5) & 0x7;
+	xmc[45]  = (*c >> 2) & 0x7;
+	xmc[46]  = (*c++ & 0x3) << 1;
+	xmc[46] |= (*c >> 7) & 0x1;
+	xmc[47]  = (*c >> 4) & 0x7;
+	xmc[48]  = (*c >> 1) & 0x7;
+	xmc[49]  = (*c++ & 0x1) << 2;
+	xmc[49] |= (*c >> 6) & 0x3;
+	xmc[50]  = (*c >> 3) & 0x7;
+	xmc[51]  = *c & 0x7;			/* 33 */
+
+	fprintf(f,
+	      "LARc:\t%2.2d  %2.2d  %2.2d  %2.2d  %2.2d  %2.2d  %2.2d  %2.2d\n",
+	       LARc[0],LARc[1],LARc[2],LARc[3],LARc[4],LARc[5],LARc[6],LARc[7]);
+
+	fprintf(f, "#1: 	Nc %4.4d    bc %d    Mc %d    xmaxc %d\n",
+		Nc[0], bc[0], Mc[0], xmaxc[0]);
+	fprintf(f,
+"\t%.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d\n",
+		xmc[0],xmc[1],xmc[2],xmc[3],xmc[4],xmc[5],xmc[6],
+		xmc[7],xmc[8],xmc[9],xmc[10],xmc[11],xmc[12] );
+
+	fprintf(f, "#2: 	Nc %4.4d    bc %d    Mc %d    xmaxc %d\n",
+		Nc[1], bc[1], Mc[1], xmaxc[1]);
+	fprintf(f,
+"\t%.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d\n",
+		xmc[13+0],xmc[13+1],xmc[13+2],xmc[13+3],xmc[13+4],xmc[13+5],
+		xmc[13+6], xmc[13+7],xmc[13+8],xmc[13+9],xmc[13+10],xmc[13+11],
+		xmc[13+12] );
+
+	fprintf(f, "#3: 	Nc %4.4d    bc %d    Mc %d    xmaxc %d\n",
+		Nc[2], bc[2], Mc[2], xmaxc[2]);
+	fprintf(f,
+"\t%.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d\n",
+		xmc[26+0],xmc[26+1],xmc[26+2],xmc[26+3],xmc[26+4],xmc[26+5],
+		xmc[26+6], xmc[26+7],xmc[26+8],xmc[26+9],xmc[26+10],xmc[26+11],
+		xmc[26+12] );
+
+	fprintf(f, "#4: 	Nc %4.4d    bc %d    Mc %d    xmaxc %d\n",
+		Nc[3], bc[3], Mc[3], xmaxc[3]);
+	fprintf(f,
+"\t%.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d %.2d\n",
+		xmc[39+0],xmc[39+1],xmc[39+2],xmc[39+3],xmc[39+4],xmc[39+5],
+		xmc[39+6], xmc[39+7],xmc[39+8],xmc[39+9],xmc[39+10],xmc[39+11],
+		xmc[39+12] );
+
+	return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/long_term.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/long_term.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/long_term.c	(revision 1163)
@@ -0,0 +1,949 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/long_term.c,v 1.6 1996/07/02 12:33:19 jutta Exp $ */
+
+#include <stdio.h>
+#include <assert.h>
+
+#include "private.h"
+
+#include "gsm.h"
+#include "proto.h"
+
+/*
+ *  4.2.11 .. 4.2.12 LONG TERM PREDICTOR (LTP) SECTION
+ */
+
+
+/*
+ * This module computes the LTP gain (bc) and the LTP lag (Nc)
+ * for the long term analysis filter.   This is done by calculating a
+ * maximum of the cross-correlation function between the current
+ * sub-segment short term residual signal d[0..39] (output of
+ * the short term analysis filter; for simplification the index
+ * of this array begins at 0 and ends at 39 for each sub-segment of the
+ * RPE-LTP analysis) and the previous reconstructed short term
+ * residual signal dp[ -120 .. -1 ].  A dynamic scaling must be
+ * performed to avoid overflow.
+ */
+
+ /* The next procedure exists in six versions.  First two integer
+  * version (if USE_FLOAT_MUL is not defined); then four floating
+  * point versions, twice with proper scaling (USE_FLOAT_MUL defined),
+  * once without (USE_FLOAT_MUL and FAST defined, and fast run-time
+  * option used).  Every pair has first a Cut version (see the -C
+  * option to toast or the LTP_CUT option to gsm_option()), then the
+  * uncut one.  (For a detailed explanation of why this is altogether
+  * a bad idea, see Henry Spencer and Geoff Collyer, ``#ifdef Considered
+  * Harmful''.)
+  */
+
+#ifndef  USE_FLOAT_MUL
+
+#ifdef	LTP_CUT
+
+static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),
+
+	struct gsm_state * st,
+
+	register word	* d,		/* [0..39]	IN	*/
+	register word	* dp,		/* [-120..-1]	IN	*/
+	word		* bc_out,	/* 		OUT	*/
+	word		* Nc_out	/* 		OUT	*/
+)
+{
+	register int  	k, lambda;
+	word		Nc, bc;
+	word		wt[40];
+
+	longword	L_result;
+	longword	L_max, L_power;
+	word		R, S, dmax, scal, best_k;
+	word		ltp_cut;
+
+	register word	temp, wt_k;
+
+	/*  Search of the optimum scaling of d[0..39].
+	 */
+	dmax = 0;
+	for (k = 0; k <= 39; k++) {
+		temp = d[k];
+		temp = GSM_ABS( temp );
+		if (temp > dmax) {
+			dmax = temp;
+			best_k = k;
+		}
+	}
+	temp = 0;
+	if (dmax == 0) scal = 0;
+	else {
+		assert(dmax > 0);
+		temp = gsm_norm( (longword)dmax << 16 );
+	}
+	if (temp > 6) scal = 0;
+	else scal = 6 - temp;
+	assert(scal >= 0);
+
+	/* Search for the maximum cross-correlation and coding of the LTP lag
+	 */
+	L_max = 0;
+	Nc    = 40;	/* index for the maximum cross-correlation */
+	wt_k  = SASR(d[best_k], scal);
+
+	for (lambda = 40; lambda <= 120; lambda++) {
+		L_result = (longword)wt_k * dp[best_k - lambda];
+		if (L_result > L_max) {
+			Nc    = lambda;
+			L_max = L_result;
+		}
+	}
+	*Nc_out = Nc;
+	L_max <<= 1;
+
+	/*  Rescaling of L_max
+	 */
+	assert(scal <= 100 && scal >= -100);
+	L_max = L_max >> (6 - scal);	/* sub(6, scal) */
+
+	assert( Nc <= 120 && Nc >= 40);
+
+	/*   Compute the power of the reconstructed short term residual
+	 *   signal dp[..]
+	 */
+	L_power = 0;
+	for (k = 0; k <= 39; k++) {
+
+		register longword L_temp;
+
+		L_temp   = SASR( dp[k - Nc], 3 );
+		L_power += L_temp * L_temp;
+	}
+	L_power <<= 1;	/* from L_MULT */
+
+	/*  Normalization of L_max and L_power
+	 */
+
+	if (L_max <= 0)  {
+		*bc_out = 0;
+		return;
+	}
+	if (L_max >= L_power) {
+		*bc_out = 3;
+		return;
+	}
+
+	temp = gsm_norm( L_power );
+
+	R = SASR( L_max   << temp, 16 );
+	S = SASR( L_power << temp, 16 );
+
+	/*  Coding of the LTP gain
+	 */
+
+	/*  Table 4.3a must be used to obtain the level DLB[i] for the
+	 *  quantization of the LTP gain b to get the coded version bc.
+	 */
+	for (bc = 0; bc <= 2; bc++) if (R <= gsm_mult(S, gsm_DLB[bc])) break;
+	*bc_out = bc;
+}
+
+#endif 	/* LTP_CUT */
+
+static void Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),
+	register word	* d,		/* [0..39]	IN	*/
+	register word	* dp,		/* [-120..-1]	IN	*/
+	word		* bc_out,	/* 		OUT	*/
+	word		* Nc_out	/* 		OUT	*/
+)
+{
+	register int  	k, lambda;
+	word		Nc, bc;
+	word		wt[40];
+
+	longword	L_max, L_power;
+	word		R, S, dmax, scal;
+	register word	temp;
+
+	/*  Search of the optimum scaling of d[0..39].
+	 */
+	dmax = 0;
+
+	for (k = 0; k <= 39; k++) {
+		temp = d[k];
+		temp = GSM_ABS( temp );
+		if (temp > dmax) dmax = temp;
+	}
+
+	temp = 0;
+	if (dmax == 0) scal = 0;
+	else {
+		assert(dmax > 0);
+		temp = gsm_norm( (longword)dmax << 16 );
+	}
+
+	if (temp > 6) scal = 0;
+	else scal = 6 - temp;
+
+	assert(scal >= 0);
+
+	/*  Initialization of a working array wt
+	 */
+
+	for (k = 0; k <= 39; k++) wt[k] = SASR( d[k], scal );
+
+	/* Search for the maximum cross-correlation and coding of the LTP lag
+	 */
+	L_max = 0;
+	Nc    = 40;	/* index for the maximum cross-correlation */
+
+	for (lambda = 40; lambda <= 120; lambda++) {
+
+# undef STEP
+#		define STEP(k) 	(longword)wt[k] * dp[k - lambda]
+
+		register longword L_result;
+
+		L_result  = STEP(0)  ; L_result += STEP(1) ;
+		L_result += STEP(2)  ; L_result += STEP(3) ;
+		L_result += STEP(4)  ; L_result += STEP(5)  ;
+		L_result += STEP(6)  ; L_result += STEP(7)  ;
+		L_result += STEP(8)  ; L_result += STEP(9)  ;
+		L_result += STEP(10) ; L_result += STEP(11) ;
+		L_result += STEP(12) ; L_result += STEP(13) ;
+		L_result += STEP(14) ; L_result += STEP(15) ;
+		L_result += STEP(16) ; L_result += STEP(17) ;
+		L_result += STEP(18) ; L_result += STEP(19) ;
+		L_result += STEP(20) ; L_result += STEP(21) ;
+		L_result += STEP(22) ; L_result += STEP(23) ;
+		L_result += STEP(24) ; L_result += STEP(25) ;
+		L_result += STEP(26) ; L_result += STEP(27) ;
+		L_result += STEP(28) ; L_result += STEP(29) ;
+		L_result += STEP(30) ; L_result += STEP(31) ;
+		L_result += STEP(32) ; L_result += STEP(33) ;
+		L_result += STEP(34) ; L_result += STEP(35) ;
+		L_result += STEP(36) ; L_result += STEP(37) ;
+		L_result += STEP(38) ; L_result += STEP(39) ;
+
+		if (L_result > L_max) {
+
+			Nc    = lambda;
+			L_max = L_result;
+		}
+	}
+
+	*Nc_out = Nc;
+
+	L_max <<= 1;
+
+	/*  Rescaling of L_max
+	 */
+	assert(scal <= 100 && scal >=  -100);
+	L_max = L_max >> (6 - scal);	/* sub(6, scal) */
+
+	assert( Nc <= 120 && Nc >= 40);
+
+	/*   Compute the power of the reconstructed short term residual
+	 *   signal dp[..]
+	 */
+	L_power = 0;
+	for (k = 0; k <= 39; k++) {
+
+		register longword L_temp;
+
+		L_temp   = SASR( dp[k - Nc], 3 );
+		L_power += L_temp * L_temp;
+	}
+	L_power <<= 1;	/* from L_MULT */
+
+	/*  Normalization of L_max and L_power
+	 */
+
+	if (L_max <= 0)  {
+		*bc_out = 0;
+		return;
+	}
+	if (L_max >= L_power) {
+		*bc_out = 3;
+		return;
+	}
+
+	temp = gsm_norm( L_power );
+
+	R = SASR( L_max   << temp, 16 );
+	S = SASR( L_power << temp, 16 );
+
+	/*  Coding of the LTP gain
+	 */
+
+	/*  Table 4.3a must be used to obtain the level DLB[i] for the
+	 *  quantization of the LTP gain b to get the coded version bc.
+	 */
+	for (bc = 0; bc <= 2; bc++) if (R <= gsm_mult(S, gsm_DLB[bc])) break;
+	*bc_out = bc;
+}
+
+#else	/* USE_FLOAT_MUL */
+
+#ifdef	LTP_CUT
+
+static void Cut_Calculation_of_the_LTP_parameters P5((st, d,dp,bc_out,Nc_out),
+	struct gsm_state * st,		/*              IN 	*/
+	register word	* d,		/* [0..39]	IN	*/
+	register word	* dp,		/* [-120..-1]	IN	*/
+	word		* bc_out,	/* 		OUT	*/
+	word		* Nc_out	/* 		OUT	*/
+)
+{
+	register int  	k, lambda;
+	word		Nc, bc;
+	word		ltp_cut;
+
+	float		wt_float[40];
+	float		dp_float_base[120], * dp_float = dp_float_base + 120;
+
+	longword	L_max, L_power;
+	word		R, S, dmax, scal;
+	register word	temp;
+
+	/*  Search of the optimum scaling of d[0..39].
+	 */
+	dmax = 0;
+
+	for (k = 0; k <= 39; k++) {
+		temp = d[k];
+		temp = GSM_ABS( temp );
+		if (temp > dmax) dmax = temp;
+	}
+
+	temp = 0;
+	if (dmax == 0) scal = 0;
+	else {
+		assert(dmax > 0);
+		temp = gsm_norm( (longword)dmax << 16 );
+	}
+
+	if (temp > 6) scal = 0;
+	else scal = 6 - temp;
+
+	assert(scal >= 0);
+	ltp_cut = (longword)SASR(dmax, scal) * st->ltp_cut / 100; 
+
+
+	/*  Initialization of a working array wt
+	 */
+
+	for (k = 0; k < 40; k++) {
+		register word w = SASR( d[k], scal );
+		if (w < 0 ? w > -ltp_cut : w < ltp_cut) {
+			wt_float[k] = 0.0;
+		}
+		else {
+			wt_float[k] =  w;
+		}
+	}
+	for (k = -120; k <  0; k++) dp_float[k] =  dp[k];
+
+	/* Search for the maximum cross-correlation and coding of the LTP lag
+	 */
+	L_max = 0;
+	Nc    = 40;	/* index for the maximum cross-correlation */
+
+	for (lambda = 40; lambda <= 120; lambda += 9) {
+
+		/*  Calculate L_result for l = lambda .. lambda + 9.
+		 */
+		register float *lp = dp_float - lambda;
+
+		register float	W;
+		register float	a = lp[-8], b = lp[-7], c = lp[-6],
+				d = lp[-5], e = lp[-4], f = lp[-3],
+				g = lp[-2], h = lp[-1];
+		register float  E; 
+		register float  S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0,
+				S5 = 0, S6 = 0, S7 = 0, S8 = 0;
+
+#		undef STEP
+#		define	STEP(K, a, b, c, d, e, f, g, h) \
+			if ((W = wt_float[K]) != 0.0) {	\
+			E = W * a; S8 += E;		\
+			E = W * b; S7 += E;		\
+			E = W * c; S6 += E;		\
+			E = W * d; S5 += E;		\
+			E = W * e; S4 += E;		\
+			E = W * f; S3 += E;		\
+			E = W * g; S2 += E;		\
+			E = W * h; S1 += E;		\
+			a  = lp[K];			\
+			E = W * a; S0 += E; } else (a = lp[K])
+
+#		define	STEP_A(K)	STEP(K, a, b, c, d, e, f, g, h)
+#		define	STEP_B(K)	STEP(K, b, c, d, e, f, g, h, a)
+#		define	STEP_C(K)	STEP(K, c, d, e, f, g, h, a, b)
+#		define	STEP_D(K)	STEP(K, d, e, f, g, h, a, b, c)
+#		define	STEP_E(K)	STEP(K, e, f, g, h, a, b, c, d)
+#		define	STEP_F(K)	STEP(K, f, g, h, a, b, c, d, e)
+#		define	STEP_G(K)	STEP(K, g, h, a, b, c, d, e, f)
+#		define	STEP_H(K)	STEP(K, h, a, b, c, d, e, f, g)
+
+		STEP_A( 0); STEP_B( 1); STEP_C( 2); STEP_D( 3);
+		STEP_E( 4); STEP_F( 5); STEP_G( 6); STEP_H( 7);
+
+		STEP_A( 8); STEP_B( 9); STEP_C(10); STEP_D(11);
+		STEP_E(12); STEP_F(13); STEP_G(14); STEP_H(15);
+
+		STEP_A(16); STEP_B(17); STEP_C(18); STEP_D(19);
+		STEP_E(20); STEP_F(21); STEP_G(22); STEP_H(23);
+
+		STEP_A(24); STEP_B(25); STEP_C(26); STEP_D(27);
+		STEP_E(28); STEP_F(29); STEP_G(30); STEP_H(31);
+
+		STEP_A(32); STEP_B(33); STEP_C(34); STEP_D(35);
+		STEP_E(36); STEP_F(37); STEP_G(38); STEP_H(39);
+
+		if (S0 > L_max) { L_max = S0; Nc = lambda;     }
+		if (S1 > L_max) { L_max = S1; Nc = lambda + 1; }
+		if (S2 > L_max) { L_max = S2; Nc = lambda + 2; }
+		if (S3 > L_max) { L_max = S3; Nc = lambda + 3; }
+		if (S4 > L_max) { L_max = S4; Nc = lambda + 4; }
+		if (S5 > L_max) { L_max = S5; Nc = lambda + 5; }
+		if (S6 > L_max) { L_max = S6; Nc = lambda + 6; }
+		if (S7 > L_max) { L_max = S7; Nc = lambda + 7; }
+		if (S8 > L_max) { L_max = S8; Nc = lambda + 8; }
+
+	}
+	*Nc_out = Nc;
+
+	L_max <<= 1;
+
+	/*  Rescaling of L_max
+	 */
+	assert(scal <= 100 && scal >=  -100);
+	L_max = L_max >> (6 - scal);	/* sub(6, scal) */
+
+	assert( Nc <= 120 && Nc >= 40);
+
+	/*   Compute the power of the reconstructed short term residual
+	 *   signal dp[..]
+	 */
+	L_power = 0;
+	for (k = 0; k <= 39; k++) {
+
+		register longword L_temp;
+
+		L_temp   = SASR( dp[k - Nc], 3 );
+		L_power += L_temp * L_temp;
+	}
+	L_power <<= 1;	/* from L_MULT */
+
+	/*  Normalization of L_max and L_power
+	 */
+
+	if (L_max <= 0)  {
+		*bc_out = 0;
+		return;
+	}
+	if (L_max >= L_power) {
+		*bc_out = 3;
+		return;
+	}
+
+	temp = gsm_norm( L_power );
+
+	R = SASR( L_max   << temp, 16 );
+	S = SASR( L_power << temp, 16 );
+
+	/*  Coding of the LTP gain
+	 */
+
+	/*  Table 4.3a must be used to obtain the level DLB[i] for the
+	 *  quantization of the LTP gain b to get the coded version bc.
+	 */
+	for (bc = 0; bc <= 2; bc++) if (R <= gsm_mult(S, gsm_DLB[bc])) break;
+	*bc_out = bc;
+}
+
+#endif /* LTP_CUT */
+
+static void Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),
+	register word	* d,		/* [0..39]	IN	*/
+	register word	* dp,		/* [-120..-1]	IN	*/
+	word		* bc_out,	/* 		OUT	*/
+	word		* Nc_out	/* 		OUT	*/
+)
+{
+	register int  	k, lambda;
+	word		Nc, bc;
+
+	float		wt_float[40];
+	float		dp_float_base[120], * dp_float = dp_float_base + 120;
+
+	longword	L_max, L_power;
+	word		R, S, dmax, scal;
+	register word	temp;
+
+	/*  Search of the optimum scaling of d[0..39].
+	 */
+	dmax = 0;
+
+	for (k = 0; k <= 39; k++) {
+		temp = d[k];
+		temp = GSM_ABS( temp );
+		if (temp > dmax) dmax = temp;
+	}
+
+	temp = 0;
+	if (dmax == 0) scal = 0;
+	else {
+		assert(dmax > 0);
+		temp = gsm_norm( (longword)dmax << 16 );
+	}
+
+	if (temp > 6) scal = 0;
+	else scal = 6 - temp;
+
+	assert(scal >= 0);
+
+	/*  Initialization of a working array wt
+	 */
+
+	for (k =    0; k < 40; k++) wt_float[k] =  SASR( d[k], scal );
+	for (k = -120; k <  0; k++) dp_float[k] =  dp[k];
+
+	/* Search for the maximum cross-correlation and coding of the LTP lag
+	 */
+	L_max = 0;
+	Nc    = 40;	/* index for the maximum cross-correlation */
+
+	for (lambda = 40; lambda <= 120; lambda += 9) {
+
+		/*  Calculate L_result for l = lambda .. lambda + 9.
+		 */
+		register float *lp = dp_float - lambda;
+
+		register float	W;
+		register float	a = lp[-8], b = lp[-7], c = lp[-6],
+				d = lp[-5], e = lp[-4], f = lp[-3],
+				g = lp[-2], h = lp[-1];
+		register float  E; 
+		register float  S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0,
+				S5 = 0, S6 = 0, S7 = 0, S8 = 0;
+
+#		undef STEP
+#		define	STEP(K, a, b, c, d, e, f, g, h) \
+			W = wt_float[K];		\
+			E = W * a; S8 += E;		\
+			E = W * b; S7 += E;		\
+			E = W * c; S6 += E;		\
+			E = W * d; S5 += E;		\
+			E = W * e; S4 += E;		\
+			E = W * f; S3 += E;		\
+			E = W * g; S2 += E;		\
+			E = W * h; S1 += E;		\
+			a  = lp[K];			\
+			E = W * a; S0 += E
+
+#		define	STEP_A(K)	STEP(K, a, b, c, d, e, f, g, h)
+#		define	STEP_B(K)	STEP(K, b, c, d, e, f, g, h, a)
+#		define	STEP_C(K)	STEP(K, c, d, e, f, g, h, a, b)
+#		define	STEP_D(K)	STEP(K, d, e, f, g, h, a, b, c)
+#		define	STEP_E(K)	STEP(K, e, f, g, h, a, b, c, d)
+#		define	STEP_F(K)	STEP(K, f, g, h, a, b, c, d, e)
+#		define	STEP_G(K)	STEP(K, g, h, a, b, c, d, e, f)
+#		define	STEP_H(K)	STEP(K, h, a, b, c, d, e, f, g)
+
+		STEP_A( 0); STEP_B( 1); STEP_C( 2); STEP_D( 3);
+		STEP_E( 4); STEP_F( 5); STEP_G( 6); STEP_H( 7);
+
+		STEP_A( 8); STEP_B( 9); STEP_C(10); STEP_D(11);
+		STEP_E(12); STEP_F(13); STEP_G(14); STEP_H(15);
+
+		STEP_A(16); STEP_B(17); STEP_C(18); STEP_D(19);
+		STEP_E(20); STEP_F(21); STEP_G(22); STEP_H(23);
+
+		STEP_A(24); STEP_B(25); STEP_C(26); STEP_D(27);
+		STEP_E(28); STEP_F(29); STEP_G(30); STEP_H(31);
+
+		STEP_A(32); STEP_B(33); STEP_C(34); STEP_D(35);
+		STEP_E(36); STEP_F(37); STEP_G(38); STEP_H(39);
+
+		if (S0 > L_max) { L_max = S0; Nc = lambda;     }
+		if (S1 > L_max) { L_max = S1; Nc = lambda + 1; }
+		if (S2 > L_max) { L_max = S2; Nc = lambda + 2; }
+		if (S3 > L_max) { L_max = S3; Nc = lambda + 3; }
+		if (S4 > L_max) { L_max = S4; Nc = lambda + 4; }
+		if (S5 > L_max) { L_max = S5; Nc = lambda + 5; }
+		if (S6 > L_max) { L_max = S6; Nc = lambda + 6; }
+		if (S7 > L_max) { L_max = S7; Nc = lambda + 7; }
+		if (S8 > L_max) { L_max = S8; Nc = lambda + 8; }
+	}
+	*Nc_out = Nc;
+
+	L_max <<= 1;
+
+	/*  Rescaling of L_max
+	 */
+	assert(scal <= 100 && scal >=  -100);
+	L_max = L_max >> (6 - scal);	/* sub(6, scal) */
+
+	assert( Nc <= 120 && Nc >= 40);
+
+	/*   Compute the power of the reconstructed short term residual
+	 *   signal dp[..]
+	 */
+	L_power = 0;
+	for (k = 0; k <= 39; k++) {
+
+		register longword L_temp;
+
+		L_temp   = SASR( dp[k - Nc], 3 );
+		L_power += L_temp * L_temp;
+	}
+	L_power <<= 1;	/* from L_MULT */
+
+	/*  Normalization of L_max and L_power
+	 */
+
+	if (L_max <= 0)  {
+		*bc_out = 0;
+		return;
+	}
+	if (L_max >= L_power) {
+		*bc_out = 3;
+		return;
+	}
+
+	temp = gsm_norm( L_power );
+
+	R = SASR( L_max   << temp, 16 );
+	S = SASR( L_power << temp, 16 );
+
+	/*  Coding of the LTP gain
+	 */
+
+	/*  Table 4.3a must be used to obtain the level DLB[i] for the
+	 *  quantization of the LTP gain b to get the coded version bc.
+	 */
+	for (bc = 0; bc <= 2; bc++) if (R <= gsm_mult(S, gsm_DLB[bc])) break;
+	*bc_out = bc;
+}
+
+#ifdef	FAST
+#ifdef	LTP_CUT
+
+static void Cut_Fast_Calculation_of_the_LTP_parameters P5((st,
+							d,dp,bc_out,Nc_out),
+	struct gsm_state * st,		/*              IN	*/
+	register word	* d,		/* [0..39]	IN	*/
+	register word	* dp,		/* [-120..-1]	IN	*/
+	word		* bc_out,	/* 		OUT	*/
+	word		* Nc_out	/* 		OUT	*/
+)
+{
+	register int  	k, lambda;
+	register float	wt_float;
+	word		Nc, bc;
+	word		wt_max, best_k, ltp_cut;
+
+	float		dp_float_base[120], * dp_float = dp_float_base + 120;
+
+	register float	L_result, L_max, L_power;
+
+	wt_max = 0;
+
+	for (k = 0; k < 40; ++k) {
+		if      ( d[k] > wt_max) wt_max =  d[best_k = k];
+		else if (-d[k] > wt_max) wt_max = -d[best_k = k];
+	}
+
+	assert(wt_max >= 0);
+	wt_float = (float)wt_max;
+
+	for (k = -120; k < 0; ++k) dp_float[k] = (float)dp[k];
+
+	/* Search for the maximum cross-correlation and coding of the LTP lag
+	 */
+	L_max = 0;
+	Nc    = 40;	/* index for the maximum cross-correlation */
+
+	for (lambda = 40; lambda <= 120; lambda++) {
+		L_result = wt_float * dp_float[best_k - lambda];
+		if (L_result > L_max) {
+			Nc    = lambda;
+			L_max = L_result;
+		}
+	}
+
+	*Nc_out = Nc;
+	if (L_max <= 0.)  {
+		*bc_out = 0;
+		return;
+	}
+
+	/*  Compute the power of the reconstructed short term residual
+	 *  signal dp[..]
+	 */
+	dp_float -= Nc;
+	L_power = 0;
+	for (k = 0; k < 40; ++k) {
+		register float f = dp_float[k];
+		L_power += f * f;
+	}
+
+	if (L_max >= L_power) {
+		*bc_out = 3;
+		return;
+	}
+
+	/*  Coding of the LTP gain
+	 *  Table 4.3a must be used to obtain the level DLB[i] for the
+	 *  quantization of the LTP gain b to get the coded version bc.
+	 */
+	lambda = L_max / L_power * 32768.;
+	for (bc = 0; bc <= 2; ++bc) if (lambda <= gsm_DLB[bc]) break;
+	*bc_out = bc;
+}
+
+#endif /* LTP_CUT */
+
+static void Fast_Calculation_of_the_LTP_parameters P4((d,dp,bc_out,Nc_out),
+	register word	* d,		/* [0..39]	IN	*/
+	register word	* dp,		/* [-120..-1]	IN	*/
+	word		* bc_out,	/* 		OUT	*/
+	word		* Nc_out	/* 		OUT	*/
+)
+{
+	register int  	k, lambda;
+	word		Nc, bc;
+
+	float		wt_float[40];
+	float		dp_float_base[120], * dp_float = dp_float_base + 120;
+
+	register float	L_max, L_power;
+
+	for (k = 0; k < 40; ++k) wt_float[k] = (float)d[k];
+	for (k = -120; k < 0; ++k) dp_float[k] = (float)dp[k];
+
+	/* Search for the maximum cross-correlation and coding of the LTP lag
+	 */
+	L_max = 0;
+	Nc    = 40;	/* index for the maximum cross-correlation */
+
+	for (lambda = 40; lambda <= 120; lambda += 9) {
+
+		/*  Calculate L_result for l = lambda .. lambda + 9.
+		 */
+		register float *lp = dp_float - lambda;
+
+		register float	W;
+		register float	a = lp[-8], b = lp[-7], c = lp[-6],
+				d = lp[-5], e = lp[-4], f = lp[-3],
+				g = lp[-2], h = lp[-1];
+		register float  E; 
+		register float  S0 = 0, S1 = 0, S2 = 0, S3 = 0, S4 = 0,
+				S5 = 0, S6 = 0, S7 = 0, S8 = 0;
+
+#		undef STEP
+#		define	STEP(K, a, b, c, d, e, f, g, h) \
+			W = wt_float[K];		\
+			E = W * a; S8 += E;		\
+			E = W * b; S7 += E;		\
+			E = W * c; S6 += E;		\
+			E = W * d; S5 += E;		\
+			E = W * e; S4 += E;		\
+			E = W * f; S3 += E;		\
+			E = W * g; S2 += E;		\
+			E = W * h; S1 += E;		\
+			a  = lp[K];			\
+			E = W * a; S0 += E
+
+#		define	STEP_A(K)	STEP(K, a, b, c, d, e, f, g, h)
+#		define	STEP_B(K)	STEP(K, b, c, d, e, f, g, h, a)
+#		define	STEP_C(K)	STEP(K, c, d, e, f, g, h, a, b)
+#		define	STEP_D(K)	STEP(K, d, e, f, g, h, a, b, c)
+#		define	STEP_E(K)	STEP(K, e, f, g, h, a, b, c, d)
+#		define	STEP_F(K)	STEP(K, f, g, h, a, b, c, d, e)
+#		define	STEP_G(K)	STEP(K, g, h, a, b, c, d, e, f)
+#		define	STEP_H(K)	STEP(K, h, a, b, c, d, e, f, g)
+
+		STEP_A( 0); STEP_B( 1); STEP_C( 2); STEP_D( 3);
+		STEP_E( 4); STEP_F( 5); STEP_G( 6); STEP_H( 7);
+
+		STEP_A( 8); STEP_B( 9); STEP_C(10); STEP_D(11);
+		STEP_E(12); STEP_F(13); STEP_G(14); STEP_H(15);
+
+		STEP_A(16); STEP_B(17); STEP_C(18); STEP_D(19);
+		STEP_E(20); STEP_F(21); STEP_G(22); STEP_H(23);
+
+		STEP_A(24); STEP_B(25); STEP_C(26); STEP_D(27);
+		STEP_E(28); STEP_F(29); STEP_G(30); STEP_H(31);
+
+		STEP_A(32); STEP_B(33); STEP_C(34); STEP_D(35);
+		STEP_E(36); STEP_F(37); STEP_G(38); STEP_H(39);
+
+		if (S0 > L_max) { L_max = S0; Nc = lambda;     }
+		if (S1 > L_max) { L_max = S1; Nc = lambda + 1; }
+		if (S2 > L_max) { L_max = S2; Nc = lambda + 2; }
+		if (S3 > L_max) { L_max = S3; Nc = lambda + 3; }
+		if (S4 > L_max) { L_max = S4; Nc = lambda + 4; }
+		if (S5 > L_max) { L_max = S5; Nc = lambda + 5; }
+		if (S6 > L_max) { L_max = S6; Nc = lambda + 6; }
+		if (S7 > L_max) { L_max = S7; Nc = lambda + 7; }
+		if (S8 > L_max) { L_max = S8; Nc = lambda + 8; }
+	}
+	*Nc_out = Nc;
+
+	if (L_max <= 0.)  {
+		*bc_out = 0;
+		return;
+	}
+
+	/*  Compute the power of the reconstructed short term residual
+	 *  signal dp[..]
+	 */
+	dp_float -= Nc;
+	L_power = 0;
+	for (k = 0; k < 40; ++k) {
+		register float f = dp_float[k];
+		L_power += f * f;
+	}
+
+	if (L_max >= L_power) {
+		*bc_out = 3;
+		return;
+	}
+
+	/*  Coding of the LTP gain
+	 *  Table 4.3a must be used to obtain the level DLB[i] for the
+	 *  quantization of the LTP gain b to get the coded version bc.
+	 */
+	lambda = L_max / L_power * 32768.;
+	for (bc = 0; bc <= 2; ++bc) if (lambda <= gsm_DLB[bc]) break;
+	*bc_out = bc;
+}
+
+#endif	/* FAST 	 */
+#endif	/* USE_FLOAT_MUL */
+
+
+/* 4.2.12 */
+
+static void Long_term_analysis_filtering P6((bc,Nc,dp,d,dpp,e),
+	word		bc,	/* 					IN  */
+	word		Nc,	/* 					IN  */
+	register word	* dp,	/* previous d	[-120..-1]		IN  */
+	register word	* d,	/* d		[0..39]			IN  */
+	register word	* dpp,	/* estimate	[0..39]			OUT */
+	register word	* e	/* long term res. signal [0..39]	OUT */
+)
+/*
+ *  In this part, we have to decode the bc parameter to compute
+ *  the samples of the estimate dpp[0..39].  The decoding of bc needs the
+ *  use of table 4.3b.  The long term residual signal e[0..39]
+ *  is then calculated to be fed to the RPE encoding section.
+ */
+{
+	register int      k;
+	register longword ltmp;
+
+#	undef STEP
+#	define STEP(BP)					\
+	for (k = 0; k <= 39; k++) {			\
+		dpp[k]  = GSM_MULT_R( BP, dp[k - Nc]);	\
+		e[k]	= GSM_SUB( d[k], dpp[k] );	\
+	}
+
+	switch (bc) {
+	case 0:	STEP(  3277 ); break;
+	case 1:	STEP( 11469 ); break;
+	case 2: STEP( 21299 ); break;
+	case 3: STEP( 32767 ); break; 
+	}
+}
+
+void Gsm_Long_Term_Predictor P7((S,d,dp,e,dpp,Nc,bc), 	/* 4x for 160 samples */
+
+	struct gsm_state	* S,
+
+	word	* d,	/* [0..39]   residual signal	IN	*/
+	word	* dp,	/* [-120..-1] d'		IN	*/
+
+	word	* e,	/* [0..39] 			OUT	*/
+	word	* dpp,	/* [0..39] 			OUT	*/
+	word	* Nc,	/* correlation lag		OUT	*/
+	word	* bc	/* gain factor			OUT	*/
+)
+{
+	assert( d  ); assert( dp ); assert( e  );
+	assert( dpp); assert( Nc ); assert( bc );
+
+#if defined(FAST) && defined(USE_FLOAT_MUL)
+	if (S->fast) 
+#if   defined (LTP_CUT)
+		if (S->ltp_cut)
+			Cut_Fast_Calculation_of_the_LTP_parameters(S,
+				d, dp, bc, Nc);
+		else
+#endif /* LTP_CUT */
+			Fast_Calculation_of_the_LTP_parameters(d, dp, bc, Nc );
+	else 
+#endif /* FAST & USE_FLOAT_MUL */
+#ifdef LTP_CUT
+		if (S->ltp_cut)
+			Cut_Calculation_of_the_LTP_parameters(S, d, dp, bc, Nc);
+		else
+#endif
+			Calculation_of_the_LTP_parameters(d, dp, bc, Nc);
+
+	Long_term_analysis_filtering( *bc, *Nc, dp, d, dpp, e );
+}
+
+/* 4.3.2 */
+void Gsm_Long_Term_Synthesis_Filtering P5((S,Ncr,bcr,erp,drp),
+	struct gsm_state	* S,
+
+	word			Ncr,
+	word			bcr,
+	register word		* erp,	   /* [0..39]		  	 IN */
+	register word		* drp	   /* [-120..-1] IN, [-120..40] OUT */
+)
+/*
+ *  This procedure uses the bcr and Ncr parameter to realize the
+ *  long term synthesis filtering.  The decoding of bcr needs
+ *  table 4.3b.
+ */
+{
+	register longword	ltmp;	/* for ADD */
+	register int 		k;
+	word			brp, drpp, Nr;
+
+	/*  Check the limits of Nr.
+	 */
+	Nr = Ncr < 40 || Ncr > 120 ? S->nrp : Ncr;
+	S->nrp = Nr;
+	assert(Nr >= 40 && Nr <= 120);
+
+	/*  Decoding of the LTP gain bcr
+	 */
+	brp = gsm_QLB[ bcr ];
+
+	/*  Computation of the reconstructed short term residual 
+	 *  signal drp[0..39]
+	 */
+	assert(brp != MIN_WORD);
+
+	for (k = 0; k <= 39; k++) {
+		drpp   = GSM_MULT_R( brp, drp[ k - Nr ] );
+		drp[k] = GSM_ADD( erp[k], drpp );
+	}
+
+	/*
+	 *  Update of the reconstructed short term residual signal
+	 *  drp[ -1..-120 ]
+	 */
+
+	for (k = 0; k <= 119; k++) drp[ -120 + k ] = drp[ -80 + k ];
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/lpc.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/lpc.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/lpc.c	(revision 1163)
@@ -0,0 +1,341 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/lpc.c,v 1.5 1994/12/30 23:14:54 jutta Exp $ */
+
+#include <stdio.h>
+#include <assert.h>
+
+#include "private.h"
+
+#include "gsm.h"
+#include "proto.h"
+
+#undef	P
+
+/*
+ *  4.2.4 .. 4.2.7 LPC ANALYSIS SECTION
+ */
+
+/* 4.2.4 */
+
+
+static void Autocorrelation P2((s, L_ACF),
+	word     * s,		/* [0..159]	IN/OUT  */
+ 	longword * L_ACF)	/* [0..8]	OUT     */
+/*
+ *  The goal is to compute the array L_ACF[k].  The signal s[i] must
+ *  be scaled in order to avoid an overflow situation.
+ */
+{
+	register int	k, i;
+
+	word		temp, smax, scalauto;
+
+#ifdef	USE_FLOAT_MUL
+	float		float_s[160];
+#endif
+
+	/*  Dynamic scaling of the array  s[0..159]
+	 */
+
+	/*  Search for the maximum.
+	 */
+	smax = 0;
+	for (k = 0; k <= 159; k++) {
+		temp = GSM_ABS( s[k] );
+		if (temp > smax) smax = temp;
+	}
+
+	/*  Computation of the scaling factor.
+	 */
+	if (smax == 0) scalauto = 0;
+	else {
+		assert(smax > 0);
+		scalauto = 4 - gsm_norm( (longword)smax << 16 );/* sub(4,..) */
+	}
+
+	/*  Scaling of the array s[0...159]
+	 */
+
+	if (scalauto > 0) {
+
+# ifdef USE_FLOAT_MUL
+#   define SCALE(n)	\
+	case n: for (k = 0; k <= 159; k++) \
+			float_s[k] = (float)	\
+				(s[k] = GSM_MULT_R(s[k], 16384 >> (n-1)));\
+		break;
+# else 
+#   define SCALE(n)	\
+	case n: for (k = 0; k <= 159; k++) \
+			s[k] = GSM_MULT_R( s[k], 16384 >> (n-1) );\
+		break;
+# endif /* USE_FLOAT_MUL */
+
+		switch (scalauto) {
+		SCALE(1)
+		SCALE(2)
+		SCALE(3)
+		SCALE(4)
+		}
+# undef	SCALE
+	}
+# ifdef	USE_FLOAT_MUL
+	else for (k = 0; k <= 159; k++) float_s[k] = (float) s[k];
+# endif
+
+	/*  Compute the L_ACF[..].
+	 */
+	{
+# ifdef	USE_FLOAT_MUL
+		register float * sp = float_s;
+		register float   sl = *sp;
+
+#		define STEP(k)	 L_ACF[k] += (longword)(sl * sp[ -(k) ]);
+# else
+		word  * sp = s;
+		word    sl = *sp;
+
+#		define STEP(k)	 L_ACF[k] += ((longword)sl * sp[ -(k) ]);
+# endif
+
+#	define NEXTI	 sl = *++sp
+
+
+	for (k = 9; k--; L_ACF[k] = 0) ;
+
+	STEP (0);
+	NEXTI;
+	STEP(0); STEP(1);
+	NEXTI;
+	STEP(0); STEP(1); STEP(2);
+	NEXTI;
+	STEP(0); STEP(1); STEP(2); STEP(3);
+	NEXTI;
+	STEP(0); STEP(1); STEP(2); STEP(3); STEP(4);
+	NEXTI;
+	STEP(0); STEP(1); STEP(2); STEP(3); STEP(4); STEP(5);
+	NEXTI;
+	STEP(0); STEP(1); STEP(2); STEP(3); STEP(4); STEP(5); STEP(6);
+	NEXTI;
+	STEP(0); STEP(1); STEP(2); STEP(3); STEP(4); STEP(5); STEP(6); STEP(7);
+
+	for (i = 8; i <= 159; i++) {
+
+		NEXTI;
+
+		STEP(0);
+		STEP(1); STEP(2); STEP(3); STEP(4);
+		STEP(5); STEP(6); STEP(7); STEP(8);
+	}
+
+	for (k = 9; k--; L_ACF[k] <<= 1) ; 
+
+	}
+	/*   Rescaling of the array s[0..159]
+	 */
+	if (scalauto > 0) {
+		assert(scalauto <= 4); 
+		for (k = 160; k--; *s++ <<= scalauto) ;
+	}
+}
+
+#if defined(USE_FLOAT_MUL) && defined(FAST)
+
+static void Fast_Autocorrelation P2((s, L_ACF),
+	word * s,		/* [0..159]	IN/OUT  */
+ 	longword * L_ACF)	/* [0..8]	OUT     */
+{
+	register int	k, i;
+	float f_L_ACF[9];
+	float scale;
+
+	float          s_f[160];
+	register float *sf = s_f;
+
+	for (i = 0; i < 160; ++i) sf[i] = s[i];
+	for (k = 0; k <= 8; k++) {
+		register float L_temp2 = 0;
+		register float *sfl = sf - k;
+		for (i = k; i < 160; ++i) L_temp2 += sf[i] * sfl[i];
+		f_L_ACF[k] = L_temp2;
+	}
+	scale = MAX_LONGWORD / f_L_ACF[0];
+
+	for (k = 0; k <= 8; k++) {
+		L_ACF[k] = f_L_ACF[k] * scale;
+	}
+}
+#endif	/* defined (USE_FLOAT_MUL) && defined (FAST) */
+
+/* 4.2.5 */
+
+static void Reflection_coefficients P2( (L_ACF, r),
+	longword	* L_ACF,		/* 0...8	IN	*/
+	register word	* r			/* 0...7	OUT 	*/
+)
+{
+	register int	i, m, n;
+	register word	temp;
+	register longword ltmp;
+	word		ACF[9];	/* 0..8 */
+	word		P[  9];	/* 0..8 */
+	word		K[  9]; /* 2..8 */
+
+	/*  Schur recursion with 16 bits arithmetic.
+	 */
+
+	if (L_ACF[0] == 0) {
+		for (i = 8; i--; *r++ = 0) ;
+		return;
+	}
+
+	assert( L_ACF[0] != 0 );
+	temp = gsm_norm( L_ACF[0] );
+
+	assert(temp >= 0 && temp < 32);
+
+	/* ? overflow ? */
+	for (i = 0; i <= 8; i++) ACF[i] = SASR( L_ACF[i] << temp, 16 );
+
+	/*   Initialize array P[..] and K[..] for the recursion.
+	 */
+
+	for (i = 1; i <= 7; i++) K[ i ] = ACF[ i ];
+	for (i = 0; i <= 8; i++) P[ i ] = ACF[ i ];
+
+	/*   Compute reflection coefficients
+	 */
+	for (n = 1; n <= 8; n++, r++) {
+
+		temp = P[1];
+		temp = GSM_ABS(temp);
+		if (P[0] < temp) {
+			for (i = n; i <= 8; i++) *r++ = 0;
+			return;
+		}
+
+		*r = gsm_div( temp, P[0] );
+
+		assert(*r >= 0);
+		if (P[1] > 0) *r = -*r;		/* r[n] = sub(0, r[n]) */
+		assert (*r != MIN_WORD);
+		if (n == 8) return; 
+
+		/*  Schur recursion
+		 */
+		temp = GSM_MULT_R( P[1], *r );
+		P[0] = GSM_ADD( P[0], temp );
+
+		for (m = 1; m <= 8 - n; m++) {
+			temp     = GSM_MULT_R( K[ m   ],    *r );
+			P[m]     = GSM_ADD(    P[ m+1 ],  temp );
+
+			temp     = GSM_MULT_R( P[ m+1 ],    *r );
+			K[m]     = GSM_ADD(    K[ m   ],  temp );
+		}
+	}
+}
+
+/* 4.2.6 */
+
+static void Transformation_to_Log_Area_Ratios P1((r),
+	register word	* r 			/* 0..7	   IN/OUT */
+)
+/*
+ *  The following scaling for r[..] and LAR[..] has been used:
+ *
+ *  r[..]   = integer( real_r[..]*32768. ); -1 <= real_r < 1.
+ *  LAR[..] = integer( real_LAR[..] * 16384 );
+ *  with -1.625 <= real_LAR <= 1.625
+ */
+{
+	register word	temp;
+	register int	i;
+
+
+	/* Computation of the LAR[0..7] from the r[0..7]
+	 */
+	for (i = 1; i <= 8; i++, r++) {
+
+		temp = *r;
+		temp = GSM_ABS(temp);
+		assert(temp >= 0);
+
+		if (temp < 22118) {
+			temp >>= 1;
+		} else if (temp < 31130) {
+			assert( temp >= 11059 );
+			temp -= 11059;
+		} else {
+			assert( temp >= 26112 );
+			temp -= 26112;
+			temp <<= 2;
+		}
+
+		*r = *r < 0 ? -temp : temp;
+		assert( *r != MIN_WORD );
+	}
+}
+
+/* 4.2.7 */
+
+static void Quantization_and_coding P1((LAR),
+	register word * LAR    	/* [0..7]	IN/OUT	*/
+)
+{
+	register word	temp;
+	longword	ltmp;
+
+
+	/*  This procedure needs four tables; the following equations
+	 *  give the optimum scaling for the constants:
+	 *  
+	 *  A[0..7] = integer( real_A[0..7] * 1024 )
+	 *  B[0..7] = integer( real_B[0..7] *  512 )
+	 *  MAC[0..7] = maximum of the LARc[0..7]
+	 *  MIC[0..7] = minimum of the LARc[0..7]
+	 */
+
+#	undef STEP
+#	define	STEP( A, B, MAC, MIC )		\
+		temp = GSM_MULT( A,   *LAR );	\
+		temp = GSM_ADD(  temp,   B );	\
+		temp = GSM_ADD(  temp, 256 );	\
+		temp = SASR(     temp,   9 );	\
+		*LAR  =  temp>MAC ? MAC - MIC : (temp<MIC ? 0 : temp - MIC); \
+		LAR++;
+
+	STEP(  20480,     0,  31, -32 );
+	STEP(  20480,     0,  31, -32 );
+	STEP(  20480,  2048,  15, -16 );
+	STEP(  20480, -2560,  15, -16 );
+
+	STEP(  13964,    94,   7,  -8 );
+	STEP(  15360, -1792,   7,  -8 );
+	STEP(   8534,  -341,   3,  -4 );
+	STEP(   9036, -1144,   3,  -4 );
+
+#	undef	STEP
+}
+
+void Gsm_LPC_Analysis P3((S, s,LARc),
+	struct gsm_state *S,
+	word 		 * s,		/* 0..159 signals	IN/OUT	*/
+        word 		 * LARc)	/* 0..7   LARc's	OUT	*/
+{
+	longword	L_ACF[9];
+
+#if defined(USE_FLOAT_MUL) && defined(FAST)
+	if (S->fast) Fast_Autocorrelation (s,	  L_ACF );
+	else
+#endif
+	Autocorrelation			  (s,	  L_ACF	);
+	Reflection_coefficients		  (L_ACF, LARc	);
+	Transformation_to_Log_Area_Ratios (LARc);
+	Quantization_and_coding		  (LARc);
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/preprocess.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/preprocess.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/preprocess.c	(revision 1163)
@@ -0,0 +1,113 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/preprocess.c,v 1.2 1994/05/10 20:18:45 jutta Exp $ */
+
+#include	<stdio.h>
+#include	<assert.h>
+
+#include "private.h"
+
+#include	"gsm.h"
+#include 	"proto.h"
+
+/*	4.2.0 .. 4.2.3	PREPROCESSING SECTION
+ *  
+ *  	After A-law to linear conversion (or directly from the
+ *   	Ato D converter) the following scaling is assumed for
+ * 	input to the RPE-LTP algorithm:
+ *
+ *      in:  0.1.....................12
+ *	     S.v.v.v.v.v.v.v.v.v.v.v.v.*.*.*
+ *
+ *	Where S is the sign bit, v a valid bit, and * a "don't care" bit.
+ * 	The original signal is called sop[..]
+ *
+ *      out:   0.1................... 12 
+ *	     S.S.v.v.v.v.v.v.v.v.v.v.v.v.0.0
+ */
+
+
+void Gsm_Preprocess P3((S, s, so),
+	struct gsm_state * S,
+	word		 * s,
+	word 		 * so )		/* [0..159] 	IN/OUT	*/
+{
+
+	word       z1 = S->z1;
+	longword L_z2 = S->L_z2;
+	word 	   mp = S->mp;
+
+	word 	   	s1;
+	longword      L_s2;
+
+	longword      L_temp;
+
+	word		msp, lsp;
+	word		SO;
+
+	longword	ltmp;		/* for   ADD */
+	ulongword	utmp;		/* for L_ADD */
+
+	register int		k = 160;
+
+	while (k--) {
+
+	/*  4.2.1   Downscaling of the input signal
+	 */
+		SO = SASR( *s, 3 ) << 2;
+		s++;
+
+		assert (SO >= -0x4000);	/* downscaled by     */
+		assert (SO <=  0x3FFC);	/* previous routine. */
+
+
+	/*  4.2.2   Offset compensation
+	 * 
+	 *  This part implements a high-pass filter and requires extended
+	 *  arithmetic precision for the recursive part of this filter.
+	 *  The input of this procedure is the array so[0...159] and the
+	 *  output the array sof[ 0...159 ].
+	 */
+		/*   Compute the non-recursive part
+		 */
+
+		s1 = SO - z1;			/* s1 = gsm_sub( *so, z1 ); */
+		z1 = SO;
+
+		assert(s1 != MIN_WORD);
+
+		/*   Compute the recursive part
+		 */
+		L_s2 = s1;
+		L_s2 <<= 15;
+
+		/*   Execution of a 31 bv 16 bits multiplication
+		 */
+
+		msp = SASR( L_z2, 15 );
+		lsp = L_z2-((longword)msp<<15); /* gsm_L_sub(L_z2,(msp<<15)); */
+
+		L_s2  += GSM_MULT_R( lsp, 32735 );
+		L_temp = (longword)msp * 32735; /* GSM_L_MULT(msp,32735) >> 1;*/
+		L_z2   = GSM_L_ADD( L_temp, L_s2 );
+
+		/*    Compute sof[k] with rounding
+		 */
+		L_temp = GSM_L_ADD( L_z2, 16384 );
+
+	/*   4.2.3  Preemphasis
+	 */
+
+		msp   = GSM_MULT_R( mp, -28180 );
+		mp    = SASR( L_temp, 15 );
+		*so++ = GSM_ADD( mp, msp );
+	}
+
+	S->z1   = z1;
+	S->L_z2 = L_z2;
+	S->mp   = mp;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/private.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/private.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/private.h	(revision 1163)
@@ -0,0 +1,269 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/*$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/private.h,v 1.6 1996/07/02 10:15:26 jutta Exp $*/
+
+#ifndef	PRIVATE_H
+#define	PRIVATE_H
+
+typedef short			word;		/* 16 bit signed int	*/
+typedef long			longword;	/* 32 bit signed int	*/
+
+typedef unsigned short		uword;		/* unsigned word	*/
+typedef unsigned long		ulongword;	/* unsigned longword	*/
+
+struct gsm_state {
+
+	word		dp0[ 280 ];
+	word		e[ 50 ];	/* code.c 			*/
+
+	word		z1;		/* preprocessing.c, Offset_com. */
+	longword	L_z2;		/*                  Offset_com. */
+	int		mp;		/*                  Preemphasis	*/
+
+	word		u[8];		/* short_term_aly_filter.c	*/
+	word		LARpp[2][8]; 	/*                              */
+	word		j;		/*                              */
+
+	word            ltp_cut;        /* long_term.c, LTP crosscorr.  */
+	word		nrp; /* 40 */	/* long_term.c, synthesis	*/
+	word		v[9];		/* short_term.c, synthesis	*/
+	word		msr;		/* decoder.c,	Postprocessing	*/
+
+	char		verbose;	/* only used if !NDEBUG		*/
+	char		fast;		/* only used if FAST		*/
+
+	char		wav_fmt;	/* only used if WAV49 defined	*/
+	unsigned char	frame_index;	/*            odd/even chaining	*/
+	unsigned char	frame_chain;	/*   half-byte to carry forward	*/
+};
+
+
+#define	MIN_WORD	(-32767 - 1)
+#define	MAX_WORD	  32767
+
+#define	MIN_LONGWORD	(-2147483647 - 1)
+#define	MAX_LONGWORD	  2147483647
+
+#ifdef	SASR		/* flag: >> is a signed arithmetic shift right */
+#undef	SASR
+#define	SASR(x, by)	((x) >> (by))
+#else
+#define	SASR(x, by)	((x) >= 0 ? (x) >> (by) : (~(-((x) + 1) >> (by))))
+#endif	/* SASR */
+
+#include "proto.h"
+
+/*
+ *	Prototypes from add.c
+ */
+extern word	gsm_mult 	P((word a, word b));
+extern longword gsm_L_mult 	P((word a, word b));
+extern word	gsm_mult_r	P((word a, word b));
+
+extern word	gsm_div  	P((word num, word denum));
+
+extern word	gsm_add 	P(( word a, word b ));
+extern longword gsm_L_add 	P(( longword a, longword b ));
+
+extern word	gsm_sub 	P((word a, word b));
+extern longword gsm_L_sub 	P((longword a, longword b));
+
+extern word	gsm_abs 	P((word a));
+
+extern word	gsm_norm 	P(( longword a ));
+
+extern longword gsm_L_asl  	P((longword a, int n));
+extern word	gsm_asl 	P((word a, int n));
+
+extern longword gsm_L_asr  	P((longword a, int n));
+extern word	gsm_asr  	P((word a, int n));
+
+/*
+ *  Inlined functions from add.h 
+ */
+
+/* 
+ * #define GSM_MULT_R(a, b) (* word a, word b, !(a == b == MIN_WORD) *)	\
+ *	(0x0FFFF & SASR(((longword)(a) * (longword)(b) + 16384), 15))
+ */
+#define GSM_MULT_R(a, b) /* word a, word b, !(a == b == MIN_WORD) */	\
+	(SASR( ((longword)(a) * (longword)(b) + 16384), 15 ))
+
+# define GSM_MULT(a,b)	 /* word a, word b, !(a == b == MIN_WORD) */	\
+	(SASR( ((longword)(a) * (longword)(b)), 15 ))
+
+# define GSM_L_MULT(a, b) /* word a, word b */	\
+	(((longword)(a) * (longword)(b)) << 1)
+
+# define GSM_L_ADD(a, b)	\
+	( (a) <  0 ? ( (b) >= 0 ? (a) + (b)	\
+		 : (utmp = (ulongword)-((a) + 1) + (ulongword)-((b) + 1)) \
+		   >= MAX_LONGWORD ? MIN_LONGWORD : -(longword)utmp-2 )   \
+	: ((b) <= 0 ? (a) + (b)   \
+	          : (utmp = (ulongword)(a) + (ulongword)(b)) >= MAX_LONGWORD \
+		    ? MAX_LONGWORD : utmp))
+
+/*
+ * # define GSM_ADD(a, b)	\
+ * 	((ltmp = (longword)(a) + (longword)(b)) >= MAX_WORD \
+ * 	? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)
+ */
+/* Nonportable, but faster: */
+
+#define	GSM_ADD(a, b)	\
+	((ulongword)((ltmp = (longword)(a) + (longword)(b)) - MIN_WORD) > \
+		MAX_WORD - MIN_WORD ? (ltmp > 0 ? MAX_WORD : MIN_WORD) : ltmp)
+
+# define GSM_SUB(a, b)	\
+	((ltmp = (longword)(a) - (longword)(b)) >= MAX_WORD \
+	? MAX_WORD : ltmp <= MIN_WORD ? MIN_WORD : ltmp)
+
+# define GSM_ABS(a)	((a) < 0 ? ((a) == MIN_WORD ? MAX_WORD : -(a)) : (a))
+
+/* Use these if necessary:
+
+# define GSM_MULT_R(a, b)	gsm_mult_r(a, b)
+# define GSM_MULT(a, b)		gsm_mult(a, b)
+# define GSM_L_MULT(a, b)	gsm_L_mult(a, b)
+
+# define GSM_L_ADD(a, b)	gsm_L_add(a, b)
+# define GSM_ADD(a, b)		gsm_add(a, b)
+# define GSM_SUB(a, b)		gsm_sub(a, b)
+
+# define GSM_ABS(a)		gsm_abs(a)
+
+*/
+
+/*
+ *  More prototypes from implementations..
+ */
+extern void Gsm_Coder P((
+		struct gsm_state	* S,
+		word	* s,	/* [0..159] samples		IN	*/
+		word	* LARc,	/* [0..7] LAR coefficients	OUT	*/
+		word	* Nc,	/* [0..3] LTP lag		OUT 	*/
+		word	* bc,	/* [0..3] coded LTP gain	OUT 	*/
+		word	* Mc,	/* [0..3] RPE grid selection	OUT     */
+		word	* xmaxc,/* [0..3] Coded maximum amplitude OUT	*/
+		word	* xMc	/* [13*4] normalized RPE samples OUT	*/));
+
+extern void Gsm_Long_Term_Predictor P((		/* 4x for 160 samples */
+		struct gsm_state * S,
+		word	* d,	/* [0..39]   residual signal	IN	*/
+		word	* dp,	/* [-120..-1] d'		IN	*/
+		word	* e,	/* [0..40] 			OUT	*/
+		word	* dpp,	/* [0..40] 			OUT	*/
+		word	* Nc,	/* correlation lag		OUT	*/
+		word	* bc	/* gain factor			OUT	*/));
+
+extern void Gsm_LPC_Analysis P((
+		struct gsm_state * S,
+		word * s,	 /* 0..159 signals	IN/OUT	*/
+	        word * LARc));   /* 0..7   LARc's	OUT	*/
+
+extern void Gsm_Preprocess P((
+		struct gsm_state * S,
+		word * s, word * so));
+
+extern void Gsm_Encoding P((
+		struct gsm_state * S,
+		word	* e,	
+		word	* ep,	
+		word	* xmaxc,
+		word	* Mc,	
+		word	* xMc));
+
+extern void Gsm_Short_Term_Analysis_Filter P((
+		struct gsm_state * S,
+		word	* LARc,	/* coded log area ratio [0..7]  IN	*/
+		word	* d	/* st res. signal [0..159]	IN/OUT	*/));
+
+extern void Gsm_Decoder P((
+		struct gsm_state * S,
+		word	* LARcr,	/* [0..7]		IN	*/
+		word	* Ncr,		/* [0..3] 		IN 	*/
+		word	* bcr,		/* [0..3]		IN	*/
+		word	* Mcr,		/* [0..3] 		IN 	*/
+		word	* xmaxcr,	/* [0..3]		IN 	*/
+		word	* xMcr,		/* [0..13*4]		IN	*/
+		word	* s));		/* [0..159]		OUT 	*/
+
+extern void Gsm_Decoding P((
+		struct gsm_state * S,
+		word 	xmaxcr,
+		word	Mcr,
+		word	* xMcr,  	/* [0..12]		IN	*/
+		word	* erp)); 	/* [0..39]		OUT 	*/
+
+extern void Gsm_Long_Term_Synthesis_Filtering P((
+		struct gsm_state* S,
+		word	Ncr,
+		word	bcr,
+		word	* erp,		/* [0..39]		  IN 	*/
+		word	* drp)); 	/* [-120..-1] IN, [0..40] OUT 	*/
+
+void Gsm_RPE_Decoding P((
+	struct gsm_state *S,
+		word xmaxcr,
+		word Mcr,
+		word * xMcr,  /* [0..12], 3 bits             IN      */
+		word * erp)); /* [0..39]                     OUT     */
+
+void Gsm_RPE_Encoding P((
+		struct gsm_state * S,
+		word    * e,            /* -5..-1][0..39][40..44     IN/OUT  */
+		word    * xmaxc,        /*                              OUT */
+		word    * Mc,           /*                              OUT */
+		word    * xMc));        /* [0..12]                      OUT */
+
+extern void Gsm_Short_Term_Synthesis_Filter P((
+		struct gsm_state * S,
+		word	* LARcr, 	/* log area ratios [0..7]  IN	*/
+		word	* drp,		/* received d [0...39]	   IN	*/
+		word	* s));		/* signal   s [0..159]	  OUT	*/
+
+extern void Gsm_Update_of_reconstructed_short_time_residual_signal P((
+		word	* dpp,		/* [0...39]	IN	*/
+		word	* ep,		/* [0...39]	IN	*/
+		word	* dp));		/* [-120...-1]  IN/OUT 	*/
+
+/*
+ *  Tables from table.c
+ */
+#ifndef	GSM_TABLE_C
+
+extern word gsm_A[8], gsm_B[8], gsm_MIC[8], gsm_MAC[8];
+extern word gsm_INVA[8];
+extern word gsm_DLB[4], gsm_QLB[4];
+extern word gsm_H[11];
+extern word gsm_NRFAC[8];
+extern word gsm_FAC[8];
+
+#endif	/* GSM_TABLE_C */
+
+/*
+ *  Debugging
+ */
+#ifdef NDEBUG
+
+#	define	gsm_debug_words(a, b, c, d)		/* nil */
+#	define	gsm_debug_longwords(a, b, c, d)		/* nil */
+#	define	gsm_debug_word(a, b)			/* nil */
+#	define	gsm_debug_longword(a, b)		/* nil */
+
+#else	/* !NDEBUG => DEBUG */
+
+	extern void  gsm_debug_words     P((char * name, int, int, word *));
+	extern void  gsm_debug_longwords P((char * name, int, int, longword *));
+	extern void  gsm_debug_longword  P((char * name, longword));
+	extern void  gsm_debug_word      P((char * name, word));
+
+#endif /* !NDEBUG */
+
+#include "unproto.h"
+
+#endif	/* PRIVATE_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/proto.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/proto.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/proto.h	(revision 1163)
@@ -0,0 +1,70 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/*$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/proto.h,v 1.1 1992/10/28 00:11:08 jutta Exp $*/
+
+#ifndef	PROTO_H
+#define	PROTO_H
+
+#if __cplusplus
+#	define	NeedFunctionPrototypes	1
+#endif
+
+#if __STDC__
+#	define	NeedFunctionPrototypes	1
+#endif
+
+#ifdef	_NO_PROTO
+#	undef	NeedFunctionPrototypes
+#endif
+
+/* PJMEDIA: always use NeedFunctionPrototypes */
+#ifndef NeedFunctionPrototypes
+#	define NeedFunctionPrototypes	1
+#endif
+
+#undef	P	/* gnu stdio.h actually defines this... 	*/
+#undef	P0
+#undef	P1
+#undef	P2
+#undef	P3
+#undef	P4
+#undef	P5
+#undef	P6
+#undef	P7
+#undef	P8
+
+#if NeedFunctionPrototypes
+
+#	define	P( protos )	protos
+
+#	define	P0()				(void)
+#	define	P1(x, a)			(a)
+#	define	P2(x, a, b)			(a, b)
+#	define	P3(x, a, b, c)			(a, b, c)
+#	define	P4(x, a, b, c, d)		(a, b, c, d)	
+#	define	P5(x, a, b, c, d, e)		(a, b, c, d, e)
+#	define	P6(x, a, b, c, d, e, f)		(a, b, c, d, e, f)
+#	define	P7(x, a, b, c, d, e, f, g)	(a, b, c, d, e, f, g)
+#	define	P8(x, a, b, c, d, e, f, g, h)	(a, b, c, d, e, f, g, h)
+
+#else /* !NeedFunctionPrototypes */
+
+#	define	P( protos )	( /* protos */ )
+
+#	define	P0()				()
+#	define	P1(x, a)			x a;
+#	define	P2(x, a, b)			x a; b;
+#	define	P3(x, a, b, c)			x a; b; c;
+#	define	P4(x, a, b, c, d)		x a; b; c; d;
+#	define	P5(x, a, b, c, d, e)		x a; b; c; d; e;
+#	define	P6(x, a, b, c, d, e, f)		x a; b; c; d; e; f;
+#	define	P7(x, a, b, c, d, e, f, g)	x a; b; c; d; e; f; g;
+#	define	P8(x, a, b, c, d, e, f, g, h)	x a; b; c; d; e; f; g; h;
+
+#endif  /* !NeedFunctionPrototypes */
+
+#endif	/* PROTO_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/rpe.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/rpe.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/rpe.c	(revision 1163)
@@ -0,0 +1,488 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/rpe.c,v 1.3 1994/05/10 20:18:46 jutta Exp $ */
+
+#include <stdio.h>
+#include <assert.h>
+
+#include "private.h"
+
+#include "gsm.h"
+#include "proto.h"
+
+/*  4.2.13 .. 4.2.17  RPE ENCODING SECTION
+ */
+
+/* 4.2.13 */
+
+static void Weighting_filter P2((e, x),
+	register word	* e,		/* signal [-5..0.39.44]	IN  */
+	word		* x		/* signal [0..39]	OUT */
+)
+/*
+ *  The coefficients of the weighting filter are stored in a table
+ *  (see table 4.4).  The following scaling is used:
+ *
+ *	H[0..10] = integer( real_H[ 0..10] * 8192 ); 
+ */
+{
+	/* word			wt[ 50 ]; */
+
+	register longword	L_result;
+	register int		k /* , i */ ;
+
+	/*  Initialization of a temporary working array wt[0...49]
+	 */
+
+	/* for (k =  0; k <=  4; k++) wt[k] = 0;
+	 * for (k =  5; k <= 44; k++) wt[k] = *e++;
+	 * for (k = 45; k <= 49; k++) wt[k] = 0;
+	 *
+	 *  (e[-5..-1] and e[40..44] are allocated by the caller,
+	 *  are initially zero and are not written anywhere.)
+	 */
+	e -= 5;
+
+	/*  Compute the signal x[0..39]
+	 */ 
+	for (k = 0; k <= 39; k++) {
+
+		L_result = 8192 >> 1;
+
+		/* for (i = 0; i <= 10; i++) {
+		 *	L_temp   = GSM_L_MULT( wt[k+i], gsm_H[i] );
+		 *	L_result = GSM_L_ADD( L_result, L_temp );
+		 * }
+		 */
+
+#undef	STEP
+#define	STEP( i, H )	(e[ k + i ] * (longword)H)
+
+		/*  Every one of these multiplications is done twice --
+		 *  but I don't see an elegant way to optimize this. 
+		 *  Do you?
+		 */
+
+#ifdef	STUPID_COMPILER
+		L_result += STEP(	0, 	-134 ) ;
+		L_result += STEP(	1, 	-374 )  ;
+	               /* + STEP(	2, 	0    )  */
+		L_result += STEP(	3, 	2054 ) ;
+		L_result += STEP(	4, 	5741 ) ;
+		L_result += STEP(	5, 	8192 ) ;
+		L_result += STEP(	6, 	5741 ) ;
+		L_result += STEP(	7, 	2054 ) ;
+	 	       /* + STEP(	8, 	0    )  */
+		L_result += STEP(	9, 	-374 ) ;
+		L_result += STEP(	10, 	-134 ) ;
+#else
+		L_result +=
+		  STEP(	0, 	-134 ) 
+		+ STEP(	1, 	-374 ) 
+	     /* + STEP(	2, 	0    )  */
+		+ STEP(	3, 	2054 ) 
+		+ STEP(	4, 	5741 ) 
+		+ STEP(	5, 	8192 ) 
+		+ STEP(	6, 	5741 ) 
+		+ STEP(	7, 	2054 ) 
+	     /* + STEP(	8, 	0    )  */
+		+ STEP(	9, 	-374 ) 
+		+ STEP(10, 	-134 )
+		;
+#endif
+
+		/* L_result = GSM_L_ADD( L_result, L_result ); (* scaling(x2) *)
+		 * L_result = GSM_L_ADD( L_result, L_result ); (* scaling(x4) *)
+		 *
+		 * x[k] = SASR( L_result, 16 );
+		 */
+
+		/* 2 adds vs. >>16 => 14, minus one shift to compensate for
+		 * those we lost when replacing L_MULT by '*'.
+		 */
+
+		L_result = SASR( L_result, 13 );
+		x[k] =  (  L_result < MIN_WORD ? MIN_WORD
+			: (L_result > MAX_WORD ? MAX_WORD : L_result ));
+	}
+}
+
+/* 4.2.14 */
+
+static void RPE_grid_selection P3((x,xM,Mc_out),
+	word		* x,		/* [0..39]		IN  */ 
+	word		* xM,		/* [0..12]		OUT */
+	word		* Mc_out	/*			OUT */
+)
+/*
+ *  The signal x[0..39] is used to select the RPE grid which is
+ *  represented by Mc.
+ */
+{
+	/* register word	temp1;	*/
+	register int		/* m, */  i;
+	register longword	L_result, L_temp;
+	longword		EM;	/* xxx should be L_EM? */
+	word			Mc;
+
+	longword		L_common_0_3;
+
+	EM = 0;
+	Mc = 0;
+
+	/* for (m = 0; m <= 3; m++) {
+	 *	L_result = 0;
+	 *
+	 *
+	 *	for (i = 0; i <= 12; i++) {
+	 *
+	 *		temp1    = SASR( x[m + 3*i], 2 );
+	 *
+	 *		assert(temp1 != MIN_WORD);
+	 *
+	 *		L_temp   = GSM_L_MULT( temp1, temp1 );
+	 *		L_result = GSM_L_ADD( L_temp, L_result );
+	 *	}
+	 * 
+	 *	if (L_result > EM) {
+	 *		Mc = m;
+	 *		EM = L_result;
+	 *	}
+	 * }
+	 */
+
+#undef	STEP
+#define	STEP( m, i )		L_temp = SASR( x[m + 3 * i], 2 );	\
+				L_result += L_temp * L_temp;
+
+	/* common part of 0 and 3 */
+
+	L_result = 0;
+	STEP( 0, 1 ); STEP( 0, 2 ); STEP( 0, 3 ); STEP( 0, 4 );
+	STEP( 0, 5 ); STEP( 0, 6 ); STEP( 0, 7 ); STEP( 0, 8 );
+	STEP( 0, 9 ); STEP( 0, 10); STEP( 0, 11); STEP( 0, 12);
+	L_common_0_3 = L_result;
+
+	/* i = 0 */
+
+	STEP( 0, 0 );
+	L_result <<= 1;	/* implicit in L_MULT */
+	EM = L_result;
+
+	/* i = 1 */
+
+	L_result = 0;
+	STEP( 1, 0 );
+	STEP( 1, 1 ); STEP( 1, 2 ); STEP( 1, 3 ); STEP( 1, 4 );
+	STEP( 1, 5 ); STEP( 1, 6 ); STEP( 1, 7 ); STEP( 1, 8 );
+	STEP( 1, 9 ); STEP( 1, 10); STEP( 1, 11); STEP( 1, 12);
+	L_result <<= 1;
+	if (L_result > EM) {
+		Mc = 1;
+	 	EM = L_result;
+	}
+
+	/* i = 2 */
+
+	L_result = 0;
+	STEP( 2, 0 );
+	STEP( 2, 1 ); STEP( 2, 2 ); STEP( 2, 3 ); STEP( 2, 4 );
+	STEP( 2, 5 ); STEP( 2, 6 ); STEP( 2, 7 ); STEP( 2, 8 );
+	STEP( 2, 9 ); STEP( 2, 10); STEP( 2, 11); STEP( 2, 12);
+	L_result <<= 1;
+	if (L_result > EM) {
+		Mc = 2;
+	 	EM = L_result;
+	}
+
+	/* i = 3 */
+
+	L_result = L_common_0_3;
+	STEP( 3, 12 );
+	L_result <<= 1;
+	if (L_result > EM) {
+		Mc = 3;
+	 	EM = L_result;
+	}
+
+	/**/
+
+	/*  Down-sampling by a factor 3 to get the selected xM[0..12]
+	 *  RPE sequence.
+	 */
+	for (i = 0; i <= 12; i ++) xM[i] = x[Mc + 3*i];
+	*Mc_out = Mc;
+}
+
+/* 4.12.15 */
+
+static void APCM_quantization_xmaxc_to_exp_mant P3((xmaxc,exp_out,mant_out),
+	word		xmaxc,		/* IN 	*/
+	word		* exp_out,	/* OUT	*/
+	word		* mant_out )	/* OUT  */
+{
+	word	exp, mant;
+
+	/* Compute exponent and mantissa of the decoded version of xmaxc
+	 */
+
+	exp = 0;
+	if (xmaxc > 15) exp = SASR(xmaxc, 3) - 1;
+	mant = xmaxc - (exp << 3);
+
+	if (mant == 0) {
+		exp  = -4;
+		mant = 7;
+	}
+	else {
+		while (mant <= 7) {
+			mant = mant << 1 | 1;
+			exp--;
+		}
+		mant -= 8;
+	}
+
+	assert( exp  >= -4 && exp <= 6 );
+	assert( mant >= 0 && mant <= 7 );
+
+	*exp_out  = exp;
+	*mant_out = mant;
+}
+
+static void APCM_quantization P5((xM,xMc,mant_out,exp_out,xmaxc_out),
+	word		* xM,		/* [0..12]		IN	*/
+
+	word		* xMc,		/* [0..12]		OUT	*/
+	word		* mant_out,	/* 			OUT	*/
+	word		* exp_out,	/*			OUT	*/
+	word		* xmaxc_out	/*			OUT	*/
+)
+{
+	int	i, itest;
+
+	word	xmax, xmaxc, temp, temp1, temp2;
+	word	exp, mant;
+
+
+	/*  Find the maximum absolute value xmax of xM[0..12].
+	 */
+
+	xmax = 0;
+	for (i = 0; i <= 12; i++) {
+		temp = xM[i];
+		temp = GSM_ABS(temp);
+		if (temp > xmax) xmax = temp;
+	}
+
+	/*  Qantizing and coding of xmax to get xmaxc.
+	 */
+
+	exp   = 0;
+	temp  = SASR( xmax, 9 );
+	itest = 0;
+
+	for (i = 0; i <= 5; i++) {
+
+		itest |= (temp <= 0);
+		temp = SASR( temp, 1 );
+
+		assert(exp <= 5);
+		if (itest == 0) exp++;		/* exp = add (exp, 1) */
+	}
+
+	assert(exp <= 6 && exp >= 0);
+	temp = exp + 5;
+
+	assert(temp <= 11 && temp >= 0);
+	xmaxc = gsm_add( (word)SASR(xmax, temp), (word)(exp << 3) );
+
+	/*   Quantizing and coding of the xM[0..12] RPE sequence
+	 *   to get the xMc[0..12]
+	 */
+
+	APCM_quantization_xmaxc_to_exp_mant( xmaxc, &exp, &mant );
+
+	/*  This computation uses the fact that the decoded version of xmaxc
+	 *  can be calculated by using the exponent and the mantissa part of
+	 *  xmaxc (logarithmic table).
+	 *  So, this method avoids any division and uses only a scaling
+	 *  of the RPE samples by a function of the exponent.  A direct 
+	 *  multiplication by the inverse of the mantissa (NRFAC[0..7]
+	 *  found in table 4.5) gives the 3 bit coded version xMc[0..12]
+	 *  of the RPE samples.
+	 */
+
+
+	/* Direct computation of xMc[0..12] using table 4.5
+	 */
+
+	assert( exp <= 4096 && exp >= -4096);
+	assert( mant >= 0 && mant <= 7 ); 
+
+	temp1 = 6 - exp;		/* normalization by the exponent */
+	temp2 = gsm_NRFAC[ mant ];  	/* inverse mantissa 		 */
+
+	for (i = 0; i <= 12; i++) {
+
+		assert(temp1 >= 0 && temp1 < 16);
+
+		temp = xM[i] << temp1;
+		temp = GSM_MULT( temp, temp2 );
+		temp = SASR(temp, 12);
+		xMc[i] = temp + 4;		/* see note below */
+	}
+
+	/*  NOTE: This equation is used to make all the xMc[i] positive.
+	 */
+
+	*mant_out  = mant;
+	*exp_out   = exp;
+	*xmaxc_out = xmaxc;
+}
+
+/* 4.2.16 */
+
+static void APCM_inverse_quantization P4((xMc,mant,exp,xMp),
+	register word	* xMc,	/* [0..12]			IN 	*/
+	word		mant,
+	word		exp,
+	register word	* xMp)	/* [0..12]			OUT 	*/
+/* 
+ *  This part is for decoding the RPE sequence of coded xMc[0..12]
+ *  samples to obtain the xMp[0..12] array.  Table 4.6 is used to get
+ *  the mantissa of xmaxc (FAC[0..7]).
+ */
+{
+	int	i;
+	word	temp, temp1, temp2, temp3;
+	longword	ltmp;
+
+	assert( mant >= 0 && mant <= 7 ); 
+
+	temp1 = gsm_FAC[ mant ];	/* see 4.2-15 for mant */
+	temp2 = gsm_sub( 6, exp );	/* see 4.2-15 for exp  */
+	temp3 = gsm_asl( 1, gsm_sub( temp2, 1 ));
+
+	for (i = 13; i--;) {
+
+		assert( *xMc <= 7 && *xMc >= 0 ); 	/* 3 bit unsigned */
+
+		/* temp = gsm_sub( *xMc++ << 1, 7 ); */
+		temp = (*xMc++ << 1) - 7;	        /* restore sign   */
+		assert( temp <= 7 && temp >= -7 ); 	/* 4 bit signed   */
+
+		temp <<= 12;				/* 16 bit signed  */
+		temp = GSM_MULT_R( temp1, temp );
+		temp = GSM_ADD( temp, temp3 );
+		*xMp++ = gsm_asr( temp, temp2 );
+	}
+}
+
+/* 4.2.17 */
+
+static void RPE_grid_positioning P3((Mc,xMp,ep),
+	word		Mc,		/* grid position	IN	*/
+	register word	* xMp,		/* [0..12]		IN	*/
+	register word	* ep		/* [0..39]		OUT	*/
+)
+/*
+ *  This procedure computes the reconstructed long term residual signal
+ *  ep[0..39] for the LTP analysis filter.  The inputs are the Mc
+ *  which is the grid position selection and the xMp[0..12] decoded
+ *  RPE samples which are upsampled by a factor of 3 by inserting zero
+ *  values.
+ */
+{
+	int	i = 13;
+
+	assert(0 <= Mc && Mc <= 3);
+
+        switch (Mc) {
+                case 3: *ep++ = 0;
+                case 2:  do {
+                                *ep++ = 0;
+                case 1:         *ep++ = 0;
+                case 0:         *ep++ = *xMp++;
+                         } while (--i);
+        }
+        while (++Mc < 4) *ep++ = 0;
+
+	/*
+
+	int i, k;
+	for (k = 0; k <= 39; k++) ep[k] = 0;
+	for (i = 0; i <= 12; i++) {
+		ep[ Mc + (3*i) ] = xMp[i];
+	}
+	*/
+}
+
+/* 4.2.18 */
+
+/*  This procedure adds the reconstructed long term residual signal
+ *  ep[0..39] to the estimated signal dpp[0..39] from the long term
+ *  analysis filter to compute the reconstructed short term residual
+ *  signal dp[-40..-1]; also the reconstructed short term residual
+ *  array dp[-120..-41] is updated.
+ */
+
+#if 0	/* Has been inlined in code.c */
+void Gsm_Update_of_reconstructed_short_time_residual_signal P3((dpp, ep, dp),
+	word	* dpp,		/* [0...39]	IN	*/
+	word	* ep,		/* [0...39]	IN	*/
+	word	* dp)		/* [-120...-1]  IN/OUT 	*/
+{
+	int 		k;
+
+	for (k = 0; k <= 79; k++) 
+		dp[ -120 + k ] = dp[ -80 + k ];
+
+	for (k = 0; k <= 39; k++)
+		dp[ -40 + k ] = gsm_add( ep[k], dpp[k] );
+}
+#endif	/* Has been inlined in code.c */
+
+void Gsm_RPE_Encoding P5((S,e,xmaxc,Mc,xMc),
+
+	struct gsm_state * S,
+
+	word	* e,		/* -5..-1][0..39][40..44	IN/OUT  */
+	word	* xmaxc,	/* 				OUT */
+	word	* Mc,		/* 			  	OUT */
+	word	* xMc)		/* [0..12]			OUT */
+{
+	word	x[40];
+	word	xM[13], xMp[13];
+	word	mant, exp;
+
+	Weighting_filter(e, x);
+	RPE_grid_selection(x, xM, Mc);
+
+	APCM_quantization(	xM, xMc, &mant, &exp, xmaxc);
+	APCM_inverse_quantization(  xMc,  mant,  exp, xMp);
+
+	RPE_grid_positioning( *Mc, xMp, e );
+
+}
+
+void Gsm_RPE_Decoding P5((S, xmaxcr, Mcr, xMcr, erp),
+	struct gsm_state	* S,
+
+	word 		xmaxcr,
+	word		Mcr,
+	word		* xMcr,  /* [0..12], 3 bits 		IN	*/
+	word		* erp	 /* [0..39]			OUT 	*/
+)
+{
+	word	exp, mant;
+	word	xMp[ 13 ];
+
+	APCM_quantization_xmaxc_to_exp_mant( xmaxcr, &exp, &mant );
+	APCM_inverse_quantization( xMcr, mant, exp, xMp );
+	RPE_grid_positioning( Mcr, xMp, erp );
+
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/short_term.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/short_term.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/short_term.c	(revision 1163)
@@ -0,0 +1,429 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/short_term.c,v 1.2 1994/05/10 20:18:47 jutta Exp $ */
+
+#include <stdio.h>
+#include <assert.h>
+
+#include "private.h"
+
+#include "gsm.h"
+#include "proto.h"
+
+/*
+ *  SHORT TERM ANALYSIS FILTERING SECTION
+ */
+
+/* 4.2.8 */
+
+static void Decoding_of_the_coded_Log_Area_Ratios P2((LARc,LARpp),
+	word 	* LARc,		/* coded log area ratio	[0..7] 	IN	*/
+	word	* LARpp)	/* out: decoded ..			*/
+{
+	register word	temp1 /* , temp2 */;
+	register long	ltmp;	/* for GSM_ADD */
+
+	/*  This procedure requires for efficient implementation
+	 *  two tables.
+ 	 *
+	 *  INVA[1..8] = integer( (32768 * 8) / real_A[1..8])
+	 *  MIC[1..8]  = minimum value of the LARc[1..8]
+	 */
+
+	/*  Compute the LARpp[1..8]
+	 */
+
+	/* 	for (i = 1; i <= 8; i++, B++, MIC++, INVA++, LARc++, LARpp++) {
+	 *
+	 *		temp1  = GSM_ADD( *LARc, *MIC ) << 10;
+	 *		temp2  = *B << 1;
+	 *		temp1  = GSM_SUB( temp1, temp2 );
+	 *
+	 *		assert(*INVA != MIN_WORD);
+	 *
+	 *		temp1  = GSM_MULT_R( *INVA, temp1 );
+	 *		*LARpp = GSM_ADD( temp1, temp1 );
+	 *	}
+	 */
+
+#undef	STEP
+#define	STEP( B, MIC, INVA )	\
+		temp1    = GSM_ADD( *LARc++, MIC ) << 10;	\
+		temp1    = GSM_SUB( temp1, B << 1 );		\
+		temp1    = GSM_MULT_R( INVA, temp1 );		\
+		*LARpp++ = GSM_ADD( temp1, temp1 );
+
+	STEP(      0,  -32,  13107 );
+	STEP(      0,  -32,  13107 );
+	STEP(   2048,  -16,  13107 );
+	STEP(  -2560,  -16,  13107 );
+
+	STEP(     94,   -8,  19223 );
+	STEP(  -1792,   -8,  17476 );
+	STEP(   -341,   -4,  31454 );
+	STEP(  -1144,   -4,  29708 );
+
+	/* NOTE: the addition of *MIC is used to restore
+	 * 	 the sign of *LARc.
+	 */
+}
+
+/* 4.2.9 */
+/* Computation of the quantized reflection coefficients 
+ */
+
+/* 4.2.9.1  Interpolation of the LARpp[1..8] to get the LARp[1..8]
+ */
+
+/*
+ *  Within each frame of 160 analyzed speech samples the short term
+ *  analysis and synthesis filters operate with four different sets of
+ *  coefficients, derived from the previous set of decoded LARs(LARpp(j-1))
+ *  and the actual set of decoded LARs (LARpp(j))
+ *
+ * (Initial value: LARpp(j-1)[1..8] = 0.)
+ */
+
+static void Coefficients_0_12 P3((LARpp_j_1, LARpp_j, LARp),
+	register word * LARpp_j_1,
+	register word * LARpp_j,
+	register word * LARp)
+{
+	register int 	i;
+	register longword ltmp;
+
+	for (i = 1; i <= 8; i++, LARp++, LARpp_j_1++, LARpp_j++) {
+		*LARp = GSM_ADD( SASR( *LARpp_j_1, 2 ), SASR( *LARpp_j, 2 ));
+		*LARp = GSM_ADD( *LARp,  SASR( *LARpp_j_1, 1));
+	}
+}
+
+static void Coefficients_13_26 P3((LARpp_j_1, LARpp_j, LARp),
+	register word * LARpp_j_1,
+	register word * LARpp_j,
+	register word * LARp)
+{
+	register int i;
+	register longword ltmp;
+	for (i = 1; i <= 8; i++, LARpp_j_1++, LARpp_j++, LARp++) {
+		*LARp = GSM_ADD( SASR( *LARpp_j_1, 1), SASR( *LARpp_j, 1 ));
+	}
+}
+
+static void Coefficients_27_39 P3((LARpp_j_1, LARpp_j, LARp),
+	register word * LARpp_j_1,
+	register word * LARpp_j,
+	register word * LARp)
+{
+	register int i;
+	register longword ltmp;
+
+	for (i = 1; i <= 8; i++, LARpp_j_1++, LARpp_j++, LARp++) {
+		*LARp = GSM_ADD( SASR( *LARpp_j_1, 2 ), SASR( *LARpp_j, 2 ));
+		*LARp = GSM_ADD( *LARp, SASR( *LARpp_j, 1 ));
+	}
+}
+
+
+static void Coefficients_40_159 P2((LARpp_j, LARp),
+	register word * LARpp_j,
+	register word * LARp)
+{
+	register int i;
+
+	for (i = 1; i <= 8; i++, LARp++, LARpp_j++)
+		*LARp = *LARpp_j;
+}
+
+/* 4.2.9.2 */
+
+static void LARp_to_rp P1((LARp),
+	register word * LARp)	/* [0..7] IN/OUT  */
+/*
+ *  The input of this procedure is the interpolated LARp[0..7] array.
+ *  The reflection coefficients, rp[i], are used in the analysis
+ *  filter and in the synthesis filter.
+ */
+{
+	register int 		i;
+	register word		temp;
+	register longword	ltmp;
+
+	for (i = 1; i <= 8; i++, LARp++) {
+
+		/* temp = GSM_ABS( *LARp );
+	         *
+		 * if (temp < 11059) temp <<= 1;
+		 * else if (temp < 20070) temp += 11059;
+		 * else temp = GSM_ADD( temp >> 2, 26112 );
+		 *
+		 * *LARp = *LARp < 0 ? -temp : temp;
+		 */
+
+		if (*LARp < 0) {
+			temp = *LARp == MIN_WORD ? MAX_WORD : -(*LARp);
+			*LARp = - ((temp < 11059) ? temp << 1
+				: ((temp < 20070) ? temp + 11059
+				:  GSM_ADD( temp >> 2, 26112 )));
+		} else {
+			temp  = *LARp;
+			*LARp =    (temp < 11059) ? temp << 1
+				: ((temp < 20070) ? temp + 11059
+				:  GSM_ADD( temp >> 2, 26112 ));
+		}
+	}
+}
+
+
+/* 4.2.10 */
+static void Short_term_analysis_filtering P4((S,rp,k_n,s),
+	struct gsm_state * S,
+	register word	* rp,	/* [0..7]	IN	*/
+	register int 	k_n, 	/*   k_end - k_start	*/
+	register word	* s	/* [0..n-1]	IN/OUT	*/
+)
+/*
+ *  This procedure computes the short term residual signal d[..] to be fed
+ *  to the RPE-LTP loop from the s[..] signal and from the local rp[..]
+ *  array (quantized reflection coefficients).  As the call of this
+ *  procedure can be done in many ways (see the interpolation of the LAR
+ *  coefficient), it is assumed that the computation begins with index
+ *  k_start (for arrays d[..] and s[..]) and stops with index k_end
+ *  (k_start and k_end are defined in 4.2.9.1).  This procedure also
+ *  needs to keep the array u[0..7] in memory for each call.
+ */
+{
+	register word		* u = S->u;
+	register int		i;
+	register word		di, zzz, ui, sav, rpi;
+	register longword 	ltmp;
+
+	for (; k_n--; s++) {
+
+		di = sav = *s;
+
+		for (i = 0; i < 8; i++) {		/* YYY */
+
+			ui    = u[i];
+			rpi   = rp[i];
+			u[i]  = sav;
+
+			zzz   = GSM_MULT_R(rpi, di);
+			sav   = GSM_ADD(   ui,  zzz);
+
+			zzz   = GSM_MULT_R(rpi, ui);
+			di    = GSM_ADD(   di,  zzz );
+		}
+
+		*s = di;
+	}
+}
+
+#if defined(USE_FLOAT_MUL) && defined(FAST)
+
+static void Fast_Short_term_analysis_filtering P4((S,rp,k_n,s),
+	struct gsm_state * S,
+	register word	* rp,	/* [0..7]	IN	*/
+	register int 	k_n, 	/*   k_end - k_start	*/
+	register word	* s	/* [0..n-1]	IN/OUT	*/
+)
+{
+	register word		* u = S->u;
+	register int		i;
+
+	float 	  uf[8],
+		 rpf[8];
+
+	register float scalef = 3.0517578125e-5;
+	register float		sav, di, temp;
+
+	for (i = 0; i < 8; ++i) {
+		uf[i]  = u[i];
+		rpf[i] = rp[i] * scalef;
+	}
+	for (; k_n--; s++) {
+		sav = di = *s;
+		for (i = 0; i < 8; ++i) {
+			register float rpfi = rpf[i];
+			register float ufi  = uf[i];
+
+			uf[i] = sav;
+			temp  = rpfi * di + ufi;
+			di   += rpfi * ufi;
+			sav   = temp;
+		}
+		*s = di;
+	}
+	for (i = 0; i < 8; ++i) u[i] = uf[i];
+}
+#endif /* ! (defined (USE_FLOAT_MUL) && defined (FAST)) */
+
+static void Short_term_synthesis_filtering P5((S,rrp,k,wt,sr),
+	struct gsm_state * S,
+	register word	* rrp,	/* [0..7]	IN	*/
+	register int	k,	/* k_end - k_start	*/
+	register word	* wt,	/* [0..k-1]	IN	*/
+	register word	* sr	/* [0..k-1]	OUT	*/
+)
+{
+	register word		* v = S->v;
+	register int		i;
+	register word		sri, tmp1, tmp2;
+	register longword	ltmp;	/* for GSM_ADD  & GSM_SUB */
+
+	while (k--) {
+		sri = *wt++;
+		for (i = 8; i--;) {
+
+			/* sri = GSM_SUB( sri, gsm_mult_r( rrp[i], v[i] ) );
+			 */
+			tmp1 = rrp[i];
+			tmp2 = v[i];
+			tmp2 =  ( tmp1 == MIN_WORD && tmp2 == MIN_WORD
+				? MAX_WORD
+				: 0x0FFFF & (( (longword)tmp1 * (longword)tmp2
+					     + 16384) >> 15)) ;
+
+			sri  = GSM_SUB( sri, tmp2 );
+
+			/* v[i+1] = GSM_ADD( v[i], gsm_mult_r( rrp[i], sri ) );
+			 */
+			tmp1  = ( tmp1 == MIN_WORD && sri == MIN_WORD
+				? MAX_WORD
+				: 0x0FFFF & (( (longword)tmp1 * (longword)sri
+					     + 16384) >> 15)) ;
+
+			v[i+1] = GSM_ADD( v[i], tmp1);
+		}
+		*sr++ = v[0] = sri;
+	}
+}
+
+
+#if defined(FAST) && defined(USE_FLOAT_MUL)
+
+static void Fast_Short_term_synthesis_filtering P5((S,rrp,k,wt,sr),
+	struct gsm_state * S,
+	register word	* rrp,	/* [0..7]	IN	*/
+	register int	k,	/* k_end - k_start	*/
+	register word	* wt,	/* [0..k-1]	IN	*/
+	register word	* sr	/* [0..k-1]	OUT	*/
+)
+{
+	register word		* v = S->v;
+	register int		i;
+
+	float va[9], rrpa[8];
+	register float scalef = 3.0517578125e-5, temp;
+
+	for (i = 0; i < 8; ++i) {
+		va[i]   = v[i];
+		rrpa[i] = (float)rrp[i] * scalef;
+	}
+	while (k--) {
+		register float sri = *wt++;
+		for (i = 8; i--;) {
+			sri -= rrpa[i] * va[i];
+			if     (sri < -32768.) sri = -32768.;
+			else if (sri > 32767.) sri =  32767.;
+
+			temp = va[i] + rrpa[i] * sri;
+			if     (temp < -32768.) temp = -32768.;
+			else if (temp > 32767.) temp =  32767.;
+			va[i+1] = temp;
+		}
+		*sr++ = va[0] = sri;
+	}
+	for (i = 0; i < 9; ++i) v[i] = va[i];
+}
+
+#endif /* defined(FAST) && defined(USE_FLOAT_MUL) */
+
+void Gsm_Short_Term_Analysis_Filter P3((S,LARc,s),
+
+	struct gsm_state * S,
+
+	word	* LARc,		/* coded log area ratio [0..7]  IN	*/
+	word	* s		/* signal [0..159]		IN/OUT	*/
+)
+{
+	word		* LARpp_j	= S->LARpp[ S->j      ];
+	word		* LARpp_j_1	= S->LARpp[ S->j ^= 1 ];
+
+	word		LARp[8];
+
+#undef	FILTER
+#if 	defined(FAST) && defined(USE_FLOAT_MUL)
+# 	define	FILTER 	(* (S->fast			\
+			   ? Fast_Short_term_analysis_filtering	\
+		    	   : Short_term_analysis_filtering	))
+
+#else
+# 	define	FILTER	Short_term_analysis_filtering
+#endif
+
+	Decoding_of_the_coded_Log_Area_Ratios( LARc, LARpp_j );
+
+	Coefficients_0_12(  LARpp_j_1, LARpp_j, LARp );
+	LARp_to_rp( LARp );
+	FILTER( S, LARp, 13, s);
+
+	Coefficients_13_26( LARpp_j_1, LARpp_j, LARp);
+	LARp_to_rp( LARp );
+	FILTER( S, LARp, 14, s + 13);
+
+	Coefficients_27_39( LARpp_j_1, LARpp_j, LARp);
+	LARp_to_rp( LARp );
+	FILTER( S, LARp, 13, s + 27);
+
+	Coefficients_40_159( LARpp_j, LARp);
+	LARp_to_rp( LARp );
+	FILTER( S, LARp, 120, s + 40);
+}
+
+void Gsm_Short_Term_Synthesis_Filter P4((S, LARcr, wt, s),
+	struct gsm_state * S,
+
+	word	* LARcr,	/* received log area ratios [0..7] IN  */
+	word	* wt,		/* received d [0..159]		   IN  */
+
+	word	* s		/* signal   s [0..159]		  OUT  */
+)
+{
+	word		* LARpp_j	= S->LARpp[ S->j     ];
+	word		* LARpp_j_1	= S->LARpp[ S->j ^=1 ];
+
+	word		LARp[8];
+
+#undef	FILTER
+#if 	defined(FAST) && defined(USE_FLOAT_MUL)
+
+# 	define	FILTER 	(* (S->fast			\
+			   ? Fast_Short_term_synthesis_filtering	\
+		    	   : Short_term_synthesis_filtering	))
+#else
+#	define	FILTER	Short_term_synthesis_filtering
+#endif
+
+	Decoding_of_the_coded_Log_Area_Ratios( LARcr, LARpp_j );
+
+	Coefficients_0_12( LARpp_j_1, LARpp_j, LARp );
+	LARp_to_rp( LARp );
+	FILTER( S, LARp, 13, wt, s );
+
+	Coefficients_13_26( LARpp_j_1, LARpp_j, LARp);
+	LARp_to_rp( LARp );
+	FILTER( S, LARp, 14, wt + 13, s + 13 );
+
+	Coefficients_27_39( LARpp_j_1, LARpp_j, LARp);
+	LARp_to_rp( LARp );
+	FILTER( S, LARp, 13, wt + 27, s + 27 );
+
+	Coefficients_40_159( LARpp_j, LARp );
+	LARp_to_rp( LARp );
+	FILTER(S, LARp, 120, wt + 40, s + 40);
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/table.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/table.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/table.c	(revision 1163)
@@ -0,0 +1,63 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/table.c,v 1.1 1992/10/28 00:15:50 jutta Exp $ */
+
+/*  Most of these tables are inlined at their point of use.
+ */
+
+/*  4.4 TABLES USED IN THE FIXED POINT IMPLEMENTATION OF THE RPE-LTP
+ *      CODER AND DECODER
+ *
+ *	(Most of them inlined, so watch out.)
+ */
+
+#define	GSM_TABLE_C
+#include "private.h"
+#include	"gsm.h"
+
+/*  Table 4.1  Quantization of the Log.-Area Ratios
+ */
+/* i 		     1      2      3        4      5      6        7       8 */
+word gsm_A[8]   = {20480, 20480, 20480,  20480,  13964,  15360,   8534,  9036};
+word gsm_B[8]   = {    0,     0,  2048,  -2560,     94,  -1792,   -341, -1144};
+word gsm_MIC[8] = { -32,   -32,   -16,    -16,     -8,     -8,     -4,    -4 };
+word gsm_MAC[8] = {  31,    31,    15,     15,      7,      7,      3,     3 };
+
+
+/*  Table 4.2  Tabulation  of 1/A[1..8]
+ */
+word gsm_INVA[8]={ 13107, 13107,  13107, 13107,  19223, 17476,  31454, 29708 };
+
+
+/*   Table 4.3a  Decision level of the LTP gain quantizer
+ */
+/*  bc		      0	        1	  2	     3			*/
+word gsm_DLB[4] = {  6554,    16384,	26214,	   32767	};
+
+
+/*   Table 4.3b   Quantization levels of the LTP gain quantizer
+ */
+/* bc		      0          1        2          3			*/
+word gsm_QLB[4] = {  3277,    11469,	21299,	   32767	};
+
+
+/*   Table 4.4	 Coefficients of the weighting filter
+ */
+/* i		    0      1   2    3   4      5      6     7   8   9    10  */
+word gsm_H[11] = {-134, -374, 0, 2054, 5741, 8192, 5741, 2054, 0, -374, -134 };
+
+
+/*   Table 4.5 	 Normalized inverse mantissa used to compute xM/xmax 
+ */
+/* i		 	0        1    2      3      4      5     6      7   */
+word gsm_NRFAC[8] = { 29128, 26215, 23832, 21846, 20165, 18725, 17476, 16384 };
+
+
+/*   Table 4.6	 Normalized direct mantissa used to compute xM/xmax
+ */
+/* i                  0      1       2      3      4      5      6      7   */
+word gsm_FAC[8]	= { 18431, 20479, 22527, 24575, 26623, 28671, 30719, 32767 };
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/toast.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/toast.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/toast.h	(revision 1163)
@@ -0,0 +1,109 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/toast.h,v 1.4 1995/03/07 21:26:16 jutta Exp $ */
+
+#ifndef	TOAST_H
+#define	TOAST_H				/* Guard against multiple includes */
+
+#include "config.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <stdio.h>
+#include <ctype.h>
+#include <signal.h>
+
+#include <errno.h>
+#ifndef	HAS_ERRNO_DECL
+	 extern int	errno;
+#endif
+
+#ifdef	HAS_LIMITS_H
+#include <limits.h>
+#endif
+
+#ifdef	HAS_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#ifdef	HAS_UTIME
+# ifdef	HAS_UTIME_H
+#  include <utime.h>
+# endif
+#endif
+
+#include "gsm.h"
+
+#ifndef	S_ISREG
+#define	S_ISREG(x)	((x) & S_IFREG)
+#endif	/* S_ISREG */
+
+
+# define	READ	"rb"
+# define	WRITE	"wb"
+#ifdef  O_BINARY
+# define	O_WRITE_EXCL	O_WRONLY|O_CREAT|O_EXCL|O_BINARY
+#else
+# define	O_WRITE_EXCL	O_WRONLY|O_CREAT|O_EXCL
+#endif
+
+#ifndef SIGHANDLER_T
+#define SIGHANDLER_T	void	/* what does a signal handler return? */
+#endif
+
+
+#ifdef	HAS_STRING_H
+#include	<string.h>
+#else
+#	ifdef HAS_STRINGS_H
+#	include <strings.h>
+#	else
+#		include "proto.h"
+
+		extern int	strlen	P((char *));
+		extern char *	strcpy  P((char *, char *));
+		extern char *	strcat  P((char *,  char *));
+		extern char *	strrchr P((char *, int));
+
+#		include "unproto.h"
+#	endif
+#endif
+
+
+#ifdef	HAS_STDLIB_H
+#include	<stdlib.h>
+#else
+#	include "proto.h"
+#	ifdef	HAS_MALLOC_H
+#	include <malloc.h>
+#	else
+		extern char	* malloc P((unsigned));
+#	endif
+	extern int	exit P((int));
+#	include "unproto.h"
+#endif
+
+
+#ifdef	HAS_UNISTD_H
+#	include	<unistd.h>
+#endif
+
+/*
+ *	This suffix is tacked onto/removed from filenames
+ *	similar to the way freeze and compress do it.
+ */
+#define	SUFFIX_TOASTED		".gsm"
+
+#include	"proto.h"
+
+extern int 	audio_init_input P((void)), audio_init_output P((void));
+extern int	ulaw_input   P((gsm_signal*)), ulaw_output   P((gsm_signal *));
+extern int	alaw_input   P((gsm_signal*)), alaw_output   P((gsm_signal *));
+extern int	linear_input P((gsm_signal*)), linear_output P((gsm_signal *));
+
+#endif		/* TOAST_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/unproto.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/unproto.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/gsm/unproto.h	(revision 1163)
@@ -0,0 +1,23 @@
+/*
+ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
+ * Universitaet Berlin.  See the accompanying file "COPYRIGHT" for
+ * details.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+ */
+
+/*$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/unproto.h,v 1.1 1992/10/28 00:11:08 jutta Exp $*/
+
+#ifdef	PROTO_H		/* sic */
+#undef	PROTO_H
+
+#undef	P
+#undef	P0
+#undef	P1
+#undef	P2
+#undef	P3
+#undef	P4
+#undef	P5
+#undef	P6
+#undef	P7
+#undef	P8
+
+#endif	/* PROTO_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc.c	(revision 1163)
@@ -0,0 +1,634 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 <pjmedia-codec/ilbc.h>
+#include <pjmedia-codec/types.h>
+#include <pjmedia/codec.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/endpoint.h>
+#include <pjmedia/plc.h>
+#include <pjmedia/port.h>
+#include <pjmedia/silencedet.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/os.h>
+#include "ilbc/iLBC_encode.h"
+#include "ilbc/iLBC_decode.h"
+
+
+/*
+ * Only build this file if PJMEDIA_HAS_ILBC_CODEC != 0
+ */
+#if defined(PJMEDIA_HAS_ILBC_CODEC) && PJMEDIA_HAS_ILBC_CODEC != 0
+
+
+#define THIS_FILE	"ilbc.c"
+#define CLOCK_RATE	8000
+#define DEFAULT_MODE	30
+
+
+/* Prototypes for iLBC factory */
+static pj_status_t ilbc_test_alloc(pjmedia_codec_factory *factory, 
+				   const pjmedia_codec_info *id );
+static pj_status_t ilbc_default_attr(pjmedia_codec_factory *factory, 
+				     const pjmedia_codec_info *id, 
+				     pjmedia_codec_param *attr );
+static pj_status_t ilbc_enum_codecs(pjmedia_codec_factory *factory, 
+				    unsigned *count, 
+				    pjmedia_codec_info codecs[]);
+static pj_status_t ilbc_alloc_codec(pjmedia_codec_factory *factory, 
+				    const pjmedia_codec_info *id, 
+				    pjmedia_codec **p_codec);
+static pj_status_t ilbc_dealloc_codec(pjmedia_codec_factory *factory, 
+				      pjmedia_codec *codec );
+
+/* Prototypes for iLBC implementation. */
+static pj_status_t  ilbc_codec_init(pjmedia_codec *codec, 
+				    pj_pool_t *pool );
+static pj_status_t  ilbc_codec_open(pjmedia_codec *codec, 
+				    pjmedia_codec_param *attr );
+static pj_status_t  ilbc_codec_close(pjmedia_codec *codec );
+static pj_status_t  ilbc_codec_modify(pjmedia_codec *codec, 
+				      const pjmedia_codec_param *attr );
+static pj_status_t  ilbc_codec_parse(pjmedia_codec *codec,
+				     void *pkt,
+				     pj_size_t pkt_size,
+				     const pj_timestamp *ts,
+				     unsigned *frame_cnt,
+				     pjmedia_frame frames[]);
+static pj_status_t  ilbc_codec_encode(pjmedia_codec *codec, 
+				      const struct pjmedia_frame *input,
+				      unsigned output_buf_len, 
+				      struct pjmedia_frame *output);
+static pj_status_t  ilbc_codec_decode(pjmedia_codec *codec, 
+				      const struct pjmedia_frame *input,
+				      unsigned output_buf_len, 
+				      struct pjmedia_frame *output);
+static pj_status_t  ilbc_codec_recover(pjmedia_codec *codec,
+				       unsigned output_buf_len,
+				       struct pjmedia_frame *output);
+
+/* Definition for iLBC codec operations. */
+static pjmedia_codec_op ilbc_op = 
+{
+    &ilbc_codec_init,
+    &ilbc_codec_open,
+    &ilbc_codec_close,
+    &ilbc_codec_modify,
+    &ilbc_codec_parse,
+    &ilbc_codec_encode,
+    &ilbc_codec_decode,
+    &ilbc_codec_recover
+};
+
+/* Definition for iLBC codec factory operations. */
+static pjmedia_codec_factory_op ilbc_factory_op =
+{
+    &ilbc_test_alloc,
+    &ilbc_default_attr,
+    &ilbc_enum_codecs,
+    &ilbc_alloc_codec,
+    &ilbc_dealloc_codec
+};
+
+/* iLBC factory */
+static struct ilbc_factory
+{
+    pjmedia_codec_factory    base;
+    pjmedia_endpt	    *endpt;
+
+    int			     mode;
+    int			     bps;
+} ilbc_factory;
+
+
+/* iLBC codec private data. */
+struct ilbc_codec
+{
+    pjmedia_codec	 base;
+    pj_pool_t		*pool;
+    char		 obj_name[PJ_MAX_OBJ_NAME];
+    pjmedia_silence_det	*vad;
+    pj_bool_t		 vad_enabled;
+    pj_bool_t		 plc_enabled;
+    pj_timestamp	 last_tx;
+
+    pj_bool_t		 enc_ready;
+    iLBC_Enc_Inst_t	 enc;
+    unsigned		 enc_frame_size;
+    unsigned		 enc_samples_per_frame;
+    float		 enc_block[BLOCKL_MAX];
+
+    pj_bool_t		 dec_ready;
+    iLBC_Dec_Inst_t	 dec;
+    unsigned		 dec_frame_size;
+    unsigned		 dec_samples_per_frame;
+    float		 dec_block[BLOCKL_MAX];
+};
+
+
+
+/*
+ * Initialize and register iLBC codec factory to pjmedia endpoint.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_ilbc_init( pjmedia_endpt *endpt,
+					     int mode )
+{
+    pjmedia_codec_mgr *codec_mgr;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(endpt != NULL, PJ_EINVAL);
+    PJ_ASSERT_RETURN(mode==0 || mode==20 || mode==30, PJ_EINVAL);
+
+    /* Create iLBC codec factory. */
+    ilbc_factory.base.op = &ilbc_factory_op;
+    ilbc_factory.base.factory_data = NULL;
+    ilbc_factory.endpt = endpt;
+
+    if (mode == 0)
+	mode = DEFAULT_MODE;
+
+    ilbc_factory.mode = mode;
+
+    if (mode == 20) {
+	ilbc_factory.bps = 15200;	
+    } else {
+	ilbc_factory.bps = 13333;
+    }
+
+    /* Get the codec manager. */
+    codec_mgr = pjmedia_endpt_get_codec_mgr(endpt);
+    if (!codec_mgr)
+	return PJ_EINVALIDOP;
+
+    /* Register codec factory to endpoint. */
+    status = pjmedia_codec_mgr_register_factory(codec_mgr, 
+						&ilbc_factory.base);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    /* Done. */
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * Unregister iLBC codec factory from pjmedia endpoint and deinitialize
+ * the iLBC codec library.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_ilbc_deinit(void)
+{
+    pjmedia_codec_mgr *codec_mgr;
+    pj_status_t status;
+
+
+    /* Get the codec manager. */
+    codec_mgr = pjmedia_endpt_get_codec_mgr(ilbc_factory.endpt);
+    if (!codec_mgr)
+	return PJ_EINVALIDOP;
+
+    /* Unregister iLBC codec factory. */
+    status = pjmedia_codec_mgr_unregister_factory(codec_mgr,
+						  &ilbc_factory.base);
+    
+    return status;
+}
+
+/* 
+ * Check if factory can allocate the specified codec. 
+ */
+static pj_status_t ilbc_test_alloc( pjmedia_codec_factory *factory, 
+				   const pjmedia_codec_info *info )
+{
+    const pj_str_t ilbc_tag = { "iLBC", 4};
+
+    PJ_UNUSED_ARG(factory);
+    PJ_ASSERT_RETURN(factory==&ilbc_factory.base, PJ_EINVAL);
+
+
+    /* Type MUST be audio. */
+    if (info->type != PJMEDIA_TYPE_AUDIO)
+	return PJMEDIA_CODEC_EUNSUP;
+
+    /* Check encoding name. */
+    if (pj_stricmp(&info->encoding_name, &ilbc_tag) != 0)
+	return PJMEDIA_CODEC_EUNSUP;
+
+    /* Check clock-rate */
+    if (info->clock_rate != CLOCK_RATE)
+	return PJMEDIA_CODEC_EUNSUP;
+    
+    /* Channel count must be one */
+    if (info->channel_cnt != 1)
+	return PJMEDIA_CODEC_EUNSUP;
+
+    /* Yes, this should be iLBC! */
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Generate default attribute.
+ */
+static pj_status_t ilbc_default_attr (pjmedia_codec_factory *factory, 
+				      const pjmedia_codec_info *id, 
+				      pjmedia_codec_param *attr )
+{
+    PJ_UNUSED_ARG(factory);
+    PJ_ASSERT_RETURN(factory==&ilbc_factory.base, PJ_EINVAL);
+
+    PJ_UNUSED_ARG(id);
+    PJ_ASSERT_RETURN(pj_stricmp2(&id->encoding_name, "iLBC")==0, PJ_EINVAL);
+
+    pj_bzero(attr, sizeof(pjmedia_codec_param));
+
+    attr->info.clock_rate = CLOCK_RATE;
+    attr->info.channel_cnt = 1;
+    attr->info.avg_bps = ilbc_factory.bps;
+    attr->info.pcm_bits_per_sample = 16;
+    attr->info.frm_ptime = (short)ilbc_factory.mode;
+    attr->info.pt = PJMEDIA_RTP_PT_ILBC;
+
+    attr->setting.frm_per_pkt = 1;
+    attr->setting.vad = 1;
+    attr->setting.plc = 1;
+    attr->setting.penh = 1;
+    attr->setting.dec_fmtp_mode = (pj_uint8_t)ilbc_factory.mode;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Enum codecs supported by this factory (i.e. only iLBC!).
+ */
+static pj_status_t ilbc_enum_codecs(pjmedia_codec_factory *factory, 
+				    unsigned *count, 
+				    pjmedia_codec_info codecs[])
+{
+    PJ_UNUSED_ARG(factory);
+    PJ_ASSERT_RETURN(factory==&ilbc_factory.base, PJ_EINVAL);
+
+    PJ_ASSERT_RETURN(codecs && *count > 0, PJ_EINVAL);
+
+    pj_bzero(&codecs[0], sizeof(pjmedia_codec_info));
+
+    codecs[0].encoding_name = pj_str("iLBC");
+    codecs[0].pt = PJMEDIA_RTP_PT_ILBC;
+    codecs[0].type = PJMEDIA_TYPE_AUDIO;
+    codecs[0].clock_rate = 8000;
+    codecs[0].channel_cnt = 1;
+
+    *count = 1;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Allocate a new iLBC codec instance.
+ */
+static pj_status_t ilbc_alloc_codec(pjmedia_codec_factory *factory, 
+				    const pjmedia_codec_info *id,
+				    pjmedia_codec **p_codec)
+{
+    pj_pool_t *pool;
+    struct ilbc_codec *codec;
+
+    PJ_ASSERT_RETURN(factory && id && p_codec, PJ_EINVAL);
+    PJ_ASSERT_RETURN(factory == &ilbc_factory.base, PJ_EINVAL);
+
+    pool = pjmedia_endpt_create_pool(ilbc_factory.endpt, "iLBC%p",
+				     2000, 2000);
+    PJ_ASSERT_RETURN(pool != NULL, PJ_ENOMEM);
+
+    codec = pj_pool_zalloc(pool, sizeof(struct ilbc_codec));
+    codec->base.op = &ilbc_op;
+    codec->base.factory = factory;
+    codec->pool = pool;
+
+    pj_ansi_snprintf(codec->obj_name,  sizeof(codec->obj_name),
+		     "ilbc%p", codec);
+
+    *p_codec = &codec->base;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Free codec.
+ */
+static pj_status_t ilbc_dealloc_codec( pjmedia_codec_factory *factory, 
+				      pjmedia_codec *codec )
+{
+    struct ilbc_codec *ilbc_codec;
+
+    PJ_ASSERT_RETURN(factory && codec, PJ_EINVAL);
+    PJ_UNUSED_ARG(factory);
+    PJ_ASSERT_RETURN(factory == &ilbc_factory.base, PJ_EINVAL);
+
+    ilbc_codec = (struct ilbc_codec*) codec;
+    pj_pool_release(ilbc_codec->pool);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Init codec.
+ */
+static pj_status_t ilbc_codec_init(pjmedia_codec *codec, 
+				   pj_pool_t *pool )
+{
+    PJ_UNUSED_ARG(codec);
+    PJ_UNUSED_ARG(pool);
+    return PJ_SUCCESS;
+}
+
+/*
+ * Open codec.
+ */
+static pj_status_t ilbc_codec_open(pjmedia_codec *codec, 
+				   pjmedia_codec_param *attr )
+{
+    struct ilbc_codec *ilbc_codec = (struct ilbc_codec*)codec;
+    pj_status_t status;
+
+    pj_assert(ilbc_codec != NULL);
+    pj_assert(ilbc_codec->enc_ready == PJ_FALSE && 
+	      ilbc_codec->dec_ready == PJ_FALSE);
+
+    /* Decoder mode must be set */
+    PJ_ASSERT_RETURN(attr->setting.dec_fmtp_mode==20 ||
+		     attr->setting.dec_fmtp_mode==30, PJMEDIA_CODEC_EINMODE);
+
+    /* The enc mode must be set in the attribute 
+     * (from the mode parameter in fmtp attribute in the SDP
+     * received from remote) 
+     */
+    if (attr->setting.enc_fmtp_mode == 0)
+	attr->setting.enc_fmtp_mode = attr->setting.dec_fmtp_mode;
+
+    PJ_ASSERT_RETURN(attr->setting.enc_fmtp_mode==20 ||
+		     attr->setting.enc_fmtp_mode==30, PJMEDIA_CODEC_EINMODE);
+
+    /* Update enc_ptime in the param */
+    if (attr->setting.enc_fmtp_mode != attr->setting.dec_fmtp_mode) {
+	attr->info.enc_ptime = attr->setting.enc_fmtp_mode;
+    } else {
+	attr->info.enc_ptime = 0;
+    }
+
+    /* Create enc */
+    ilbc_codec->enc_frame_size = initEncode(&ilbc_codec->enc, 
+					    attr->setting.enc_fmtp_mode);
+    ilbc_codec->enc_samples_per_frame = CLOCK_RATE*attr->setting.enc_fmtp_mode/
+					1000;
+    ilbc_codec->enc_ready = PJ_TRUE;
+
+    /* Create decoder */
+    ilbc_codec->dec_samples_per_frame = initDecode(&ilbc_codec->dec,
+						   attr->setting.dec_fmtp_mode,
+						   attr->setting.penh);
+    if (attr->setting.dec_fmtp_mode == 20)
+	ilbc_codec->dec_frame_size = 38;
+    else if (attr->setting.dec_fmtp_mode == 30)
+	ilbc_codec->dec_frame_size = 50;
+    else {
+	pj_assert(!"Invalid iLBC mode");
+	ilbc_codec->dec_frame_size = ilbc_codec->enc_frame_size;
+    }
+    ilbc_codec->dec_ready = PJ_TRUE;
+
+    /* Save plc flags */
+    ilbc_codec->plc_enabled = (attr->setting.plc != 0);
+
+    /* Create silence detector. */
+    ilbc_codec->vad_enabled = (attr->setting.vad != 0);
+    status = pjmedia_silence_det_create(ilbc_codec->pool, CLOCK_RATE,
+					ilbc_codec->enc_samples_per_frame,
+					&ilbc_codec->vad);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Init last_tx (not necessary because of zalloc, but better
+     * be safe in case someone remove zalloc later.
+     */
+    pj_set_timestamp32(&ilbc_codec->last_tx, 0, 0);
+
+    PJ_LOG(5,(ilbc_codec->obj_name, 
+	      "iLBC codec opened, encoder mode=%d, decoder mode=%d",
+	      attr->setting.enc_fmtp_mode, attr->setting.dec_fmtp_mode));
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Close codec.
+ */
+static pj_status_t ilbc_codec_close( pjmedia_codec *codec )
+{
+    struct ilbc_codec *ilbc_codec = (struct ilbc_codec*)codec;
+
+    PJ_UNUSED_ARG(codec);
+
+    PJ_LOG(5,(ilbc_codec->obj_name, "iLBC codec closed"));
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Modify codec settings.
+ */
+static pj_status_t  ilbc_codec_modify(pjmedia_codec *codec, 
+				      const pjmedia_codec_param *attr )
+{
+    struct ilbc_codec *ilbc_codec = (struct ilbc_codec*)codec;
+
+    ilbc_codec->plc_enabled = (attr->setting.plc != 0);
+    ilbc_codec->vad_enabled = (attr->setting.vad != 0);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Get frames in the packet.
+ */
+static pj_status_t  ilbc_codec_parse( pjmedia_codec *codec,
+				     void *pkt,
+				     pj_size_t pkt_size,
+				     const pj_timestamp *ts,
+				     unsigned *frame_cnt,
+				     pjmedia_frame frames[])
+{
+    struct ilbc_codec *ilbc_codec = (struct ilbc_codec*)codec;
+    unsigned count;
+
+    PJ_ASSERT_RETURN(frame_cnt, PJ_EINVAL);
+
+    count = 0;
+    while (pkt_size >= ilbc_codec->dec_frame_size && count < *frame_cnt) {
+	frames[count].type = PJMEDIA_FRAME_TYPE_AUDIO;
+	frames[count].buf = pkt;
+	frames[count].size = ilbc_codec->dec_frame_size;
+	frames[count].timestamp.u64 = ts->u64 + count * 
+					  ilbc_codec->dec_samples_per_frame;
+
+	pkt = ((char*)pkt) + ilbc_codec->dec_frame_size;
+	pkt_size -= ilbc_codec->dec_frame_size;
+
+	++count;
+    }
+
+    *frame_cnt = count;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Encode frame.
+ */
+static pj_status_t ilbc_codec_encode(pjmedia_codec *codec, 
+				     const struct pjmedia_frame *input,
+				     unsigned output_buf_len, 
+				     struct pjmedia_frame *output)
+{
+    struct ilbc_codec *ilbc_codec = (struct ilbc_codec*)codec;
+    unsigned i;
+
+    pj_assert(ilbc_codec != NULL);
+    PJ_ASSERT_RETURN(input && output, PJ_EINVAL);
+
+    if (output_buf_len < ilbc_codec->enc_frame_size)
+	return PJMEDIA_CODEC_EFRMTOOSHORT;
+
+    if (input->size != (ilbc_codec->enc_samples_per_frame << 1))
+	return PJMEDIA_CODEC_EPCMFRMINLEN;
+
+    /* Detect silence */
+    if (ilbc_codec->vad_enabled) {
+	pj_bool_t is_silence;
+	pj_int32_t silence_period;
+
+	silence_period = pj_timestamp_diff32(&ilbc_codec->last_tx,
+					      &input->timestamp);
+
+	is_silence = pjmedia_silence_det_detect(ilbc_codec->vad, 
+					        input->buf,
+						(input->size >> 1),
+						NULL);
+	if (is_silence &&
+	    PJMEDIA_CODEC_MAX_SILENCE_PERIOD != -1 &&
+	    silence_period < PJMEDIA_CODEC_MAX_SILENCE_PERIOD)
+	{
+	    output->type = PJMEDIA_FRAME_TYPE_NONE;
+	    output->buf = NULL;
+	    output->size = 0;
+	    output->timestamp = input->timestamp;
+	    return PJ_SUCCESS;
+	} else {
+	    ilbc_codec->last_tx = input->timestamp;
+	}
+    }
+
+    /* Convert to float */
+    for (i=0; i<ilbc_codec->enc_samples_per_frame; ++i) {
+	ilbc_codec->enc_block[i] = (float) (((pj_int16_t*)input->buf)[i]);
+    }
+
+    /* Encode */
+    iLBC_encode((unsigned char *)output->buf, 
+		ilbc_codec->enc_block, 
+		&ilbc_codec->enc);
+
+    output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+    output->size = ilbc_codec->enc.no_of_bytes;
+    output->timestamp = input->timestamp;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Decode frame.
+ */
+static pj_status_t ilbc_codec_decode(pjmedia_codec *codec, 
+				     const struct pjmedia_frame *input,
+				     unsigned output_buf_len, 
+				     struct pjmedia_frame *output)
+{
+    struct ilbc_codec *ilbc_codec = (struct ilbc_codec*)codec;
+    unsigned i;
+
+    pj_assert(ilbc_codec != NULL);
+    PJ_ASSERT_RETURN(input && output, PJ_EINVAL);
+
+    if (output_buf_len < (ilbc_codec->dec_samples_per_frame << 1))
+	return PJMEDIA_CODEC_EPCMTOOSHORT;
+
+    if (input->size != ilbc_codec->dec_frame_size)
+	return PJMEDIA_CODEC_EFRMINLEN;
+
+    /* Decode to temporary buffer */
+    iLBC_decode(ilbc_codec->dec_block, input->buf,
+		&ilbc_codec->dec, 1);
+
+    /* Convert decodec samples from float to short */
+    for (i=0; i<ilbc_codec->dec_samples_per_frame; ++i) {
+	((short*)output->buf)[i] = (short)ilbc_codec->dec_block[i];
+    }
+    output->size = (ilbc_codec->dec_samples_per_frame << 1);
+    output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+    output->timestamp = input->timestamp;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Recover lost frame.
+ */
+static pj_status_t  ilbc_codec_recover(pjmedia_codec *codec,
+				      unsigned output_buf_len,
+				      struct pjmedia_frame *output)
+{
+    struct ilbc_codec *ilbc_codec = (struct ilbc_codec*)codec;
+    unsigned i;
+
+    pj_assert(ilbc_codec != NULL);
+    PJ_ASSERT_RETURN(output, PJ_EINVAL);
+
+    if (output_buf_len < (ilbc_codec->dec_samples_per_frame << 1))
+	return PJMEDIA_CODEC_EPCMTOOSHORT;
+
+    /* Decode to temporary buffer */
+    iLBC_decode(ilbc_codec->dec_block, NULL, &ilbc_codec->dec, 0);
+
+    /* Convert decodec samples from float to short */
+    for (i=0; i<ilbc_codec->dec_samples_per_frame; ++i) {
+	((short*)output->buf)[i] = (short)ilbc_codec->dec_block[i];
+    }
+    output->size = (ilbc_codec->dec_samples_per_frame << 1);
+    output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+
+    return PJ_SUCCESS;
+}
+
+
+#endif	/* PJMEDIA_HAS_ILBC_CODEC */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/FrameClassify.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/FrameClassify.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/FrameClassify.c	(revision 1163)
@@ -0,0 +1,114 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       FrameClassify.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include "iLBC_define.h"
+
+   /*---------------------------------------------------------------*
+    *  Classification of subframes to localize start state
+    *--------------------------------------------------------------*/
+
+   int FrameClassify(      /* index to the max-energy sub-frame */
+       iLBC_Enc_Inst_t *iLBCenc_inst,
+                           /* (i/o) the encoder state structure */
+       float *residual     /* (i) lpc residual signal */
+   ) {
+       float max_ssqEn, fssqEn[NSUB_MAX], bssqEn[NSUB_MAX], *pp;
+       int n, l, max_ssqEn_n;
+       const float ssqEn_win[NSUB_MAX-1]={(float)0.8,(float)0.9,
+           (float)1.0,(float)0.9,(float)0.8};
+       const float sampEn_win[5]={(float)1.0/(float)6.0,
+           (float)2.0/(float)6.0, (float)3.0/(float)6.0,
+           (float)4.0/(float)6.0, (float)5.0/(float)6.0};
+
+       /* init the front and back energies to zero */
+
+       memset(fssqEn, 0, NSUB_MAX*sizeof(float));
+       memset(bssqEn, 0, NSUB_MAX*sizeof(float));
+
+       /* Calculate front of first seqence */
+
+       n=0;
+       pp=residual;
+       for (l=0; l<5; l++) {
+           fssqEn[n] += sampEn_win[l] * (*pp) * (*pp);
+           pp++;
+       }
+       for (l=5; l<SUBL; l++) {
+
+
+
+
+
+           fssqEn[n] += (*pp) * (*pp);
+           pp++;
+       }
+
+       /* Calculate front and back of all middle sequences */
+
+       for (n=1; n<iLBCenc_inst->nsub-1; n++) {
+           pp=residual+n*SUBL;
+           for (l=0; l<5; l++) {
+               fssqEn[n] += sampEn_win[l] * (*pp) * (*pp);
+               bssqEn[n] += (*pp) * (*pp);
+               pp++;
+           }
+           for (l=5; l<SUBL-5; l++) {
+               fssqEn[n] += (*pp) * (*pp);
+               bssqEn[n] += (*pp) * (*pp);
+               pp++;
+           }
+           for (l=SUBL-5; l<SUBL; l++) {
+               fssqEn[n] += (*pp) * (*pp);
+               bssqEn[n] += sampEn_win[SUBL-l-1] * (*pp) * (*pp);
+               pp++;
+           }
+       }
+
+       /* Calculate back of last seqence */
+
+       n=iLBCenc_inst->nsub-1;
+       pp=residual+n*SUBL;
+       for (l=0; l<SUBL-5; l++) {
+           bssqEn[n] += (*pp) * (*pp);
+           pp++;
+       }
+       for (l=SUBL-5; l<SUBL; l++) {
+           bssqEn[n] += sampEn_win[SUBL-l-1] * (*pp) * (*pp);
+           pp++;
+       }
+
+       /* find the index to the weighted 80 sample with
+          most energy */
+
+       if (iLBCenc_inst->mode==20) l=1;
+       else                        l=0;
+
+       max_ssqEn=(fssqEn[0]+bssqEn[1])*ssqEn_win[l];
+       max_ssqEn_n=1;
+       for (n=2; n<iLBCenc_inst->nsub; n++) {
+
+
+
+
+
+
+           l++;
+           if ((fssqEn[n-1]+bssqEn[n])*ssqEn_win[l] > max_ssqEn) {
+               max_ssqEn=(fssqEn[n-1]+bssqEn[n]) *
+                               ssqEn_win[l];
+               max_ssqEn_n=n;
+           }
+       }
+
+       return max_ssqEn_n;
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/FrameClassify.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/FrameClassify.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/FrameClassify.h	(revision 1163)
@@ -0,0 +1,27 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       FrameClassify.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_FRAMECLASSIFY_H
+   #define __iLBC_FRAMECLASSIFY_H
+
+   int FrameClassify(      /* index to the max-energy sub-frame */
+       iLBC_Enc_Inst_t *iLBCenc_inst,
+                           /* (i/o) the encoder state structure */
+       float *residual     /* (i) lpc residual signal */
+   );
+
+
+
+
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/LPCdecode.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/LPCdecode.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/LPCdecode.c	(revision 1163)
@@ -0,0 +1,158 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       LPC_decode.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <math.h>
+   #include <string.h>
+
+   #include "helpfun.h"
+   #include "lsf.h"
+   #include "iLBC_define.h"
+   #include "constants.h"
+
+   /*---------------------------------------------------------------*
+    *  interpolation of lsf coefficients for the decoder
+    *--------------------------------------------------------------*/
+
+   void LSFinterpolate2a_dec(
+       float *a,           /* (o) lpc coefficients for a sub-frame */
+       float *lsf1,    /* (i) first lsf coefficient vector */
+       float *lsf2,    /* (i) second lsf coefficient vector */
+       float coef,         /* (i) interpolation weight */
+       int length          /* (i) length of lsf vectors */
+   ){
+       float  lsftmp[LPC_FILTERORDER];
+
+       interpolate(lsftmp, lsf1, lsf2, coef, length);
+       lsf2a(a, lsftmp);
+   }
+
+   /*---------------------------------------------------------------*
+    *  obtain dequantized lsf coefficients from quantization index
+    *--------------------------------------------------------------*/
+
+   void SimplelsfDEQ(
+       float *lsfdeq,    /* (o) dequantized lsf coefficients */
+       int *index,         /* (i) quantization index */
+       int lpc_n           /* (i) number of LPCs */
+   ){
+       int i, j, pos, cb_pos;
+
+
+
+
+
+       /* decode first LSF */
+
+       pos = 0;
+       cb_pos = 0;
+       for (i = 0; i < LSF_NSPLIT; i++) {
+           for (j = 0; j < dim_lsfCbTbl[i]; j++) {
+               lsfdeq[pos + j] = lsfCbTbl[cb_pos +
+                   (long)(index[i])*dim_lsfCbTbl[i] + j];
+           }
+           pos += dim_lsfCbTbl[i];
+           cb_pos += size_lsfCbTbl[i]*dim_lsfCbTbl[i];
+       }
+
+       if (lpc_n>1) {
+
+           /* decode last LSF */
+
+           pos = 0;
+           cb_pos = 0;
+           for (i = 0; i < LSF_NSPLIT; i++) {
+               for (j = 0; j < dim_lsfCbTbl[i]; j++) {
+                   lsfdeq[LPC_FILTERORDER + pos + j] =
+                       lsfCbTbl[cb_pos +
+                       (long)(index[LSF_NSPLIT + i])*
+                       dim_lsfCbTbl[i] + j];
+               }
+               pos += dim_lsfCbTbl[i];
+               cb_pos += size_lsfCbTbl[i]*dim_lsfCbTbl[i];
+           }
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  obtain synthesis and weighting filters form lsf coefficients
+    *---------------------------------------------------------------*/
+
+   void DecoderInterpolateLSF(
+       float *syntdenum, /* (o) synthesis filter coefficients */
+       float *weightdenum, /* (o) weighting denumerator
+                                  coefficients */
+       float *lsfdeq,       /* (i) dequantized lsf coefficients */
+       int length,         /* (i) length of lsf coefficient vector */
+       iLBC_Dec_Inst_t *iLBCdec_inst
+                           /* (i) the decoder state structure */
+   ){
+       int    i, pos, lp_length;
+       float  lp[LPC_FILTERORDER + 1], *lsfdeq2;
+
+
+
+
+
+
+       lsfdeq2 = lsfdeq + length;
+       lp_length = length + 1;
+
+       if (iLBCdec_inst->mode==30) {
+           /* sub-frame 1: Interpolation between old and first */
+
+           LSFinterpolate2a_dec(lp, iLBCdec_inst->lsfdeqold, lsfdeq,
+               lsf_weightTbl_30ms[0], length);
+           memcpy(syntdenum,lp,lp_length*sizeof(float));
+           bwexpand(weightdenum, lp, LPC_CHIRP_WEIGHTDENUM,
+               lp_length);
+
+           /* sub-frames 2 to 6: interpolation between first
+              and last LSF */
+
+           pos = lp_length;
+           for (i = 1; i < 6; i++) {
+               LSFinterpolate2a_dec(lp, lsfdeq, lsfdeq2,
+                   lsf_weightTbl_30ms[i], length);
+               memcpy(syntdenum + pos,lp,lp_length*sizeof(float));
+               bwexpand(weightdenum + pos, lp,
+                   LPC_CHIRP_WEIGHTDENUM, lp_length);
+               pos += lp_length;
+           }
+       }
+       else {
+           pos = 0;
+           for (i = 0; i < iLBCdec_inst->nsub; i++) {
+               LSFinterpolate2a_dec(lp, iLBCdec_inst->lsfdeqold,
+                   lsfdeq, lsf_weightTbl_20ms[i], length);
+               memcpy(syntdenum+pos,lp,lp_length*sizeof(float));
+               bwexpand(weightdenum+pos, lp, LPC_CHIRP_WEIGHTDENUM,
+                   lp_length);
+               pos += lp_length;
+           }
+       }
+
+       /* update memory */
+
+       if (iLBCdec_inst->mode==30)
+           memcpy(iLBCdec_inst->lsfdeqold, lsfdeq2,
+                       length*sizeof(float));
+       else
+           memcpy(iLBCdec_inst->lsfdeqold, lsfdeq,
+                       length*sizeof(float));
+
+   }
+
+
+
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/LPCdecode.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/LPCdecode.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/LPCdecode.h	(revision 1163)
@@ -0,0 +1,52 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       LPC_decode.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_LPC_DECODE_H
+   #define __iLBC_LPC_DECODE_H
+
+   void LSFinterpolate2a_dec(
+       float *a,           /* (o) lpc coefficients for a sub-frame */
+       float *lsf1,    /* (i) first lsf coefficient vector */
+       float *lsf2,    /* (i) second lsf coefficient vector */
+       float coef,         /* (i) interpolation weight */
+       int length          /* (i) length of lsf vectors */
+   );
+
+   void SimplelsfDEQ(
+       float *lsfdeq,      /* (o) dequantized lsf coefficients */
+       int *index,         /* (i) quantization index */
+       int lpc_n           /* (i) number of LPCs */
+   );
+
+   void DecoderInterpolateLSF(
+       float *syntdenum,   /* (o) synthesis filter coefficients */
+       float *weightdenum, /* (o) weighting denumerator
+                                  coefficients */
+       float *lsfdeq,      /* (i) dequantized lsf coefficients */
+       int length,         /* (i) length of lsf coefficient vector */
+       iLBC_Dec_Inst_t *iLBCdec_inst
+                           /* (i) the decoder state structure */
+   );
+
+   #endif
+
+
+
+
+
+
+
+
+
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/LPCencode.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/LPCencode.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/LPCencode.c	(revision 1163)
@@ -0,0 +1,241 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       LPCencode.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <string.h>
+
+   #include "iLBC_define.h"
+   #include "helpfun.h"
+   #include "lsf.h"
+   #include "constants.h"
+
+
+
+
+
+   /*----------------------------------------------------------------*
+    *  lpc analysis (subrutine to LPCencode)
+    *---------------------------------------------------------------*/
+
+   void SimpleAnalysis(
+       float *lsf,         /* (o) lsf coefficients */
+       float *data,    /* (i) new data vector */
+       iLBC_Enc_Inst_t *iLBCenc_inst
+                           /* (i/o) the encoder state structure */
+   ){
+       int k, is;
+       float temp[BLOCKL_MAX], lp[LPC_FILTERORDER + 1];
+       float lp2[LPC_FILTERORDER + 1];
+       float r[LPC_FILTERORDER + 1];
+
+       is=LPC_LOOKBACK+BLOCKL_MAX-iLBCenc_inst->blockl;
+       memcpy(iLBCenc_inst->lpc_buffer+is,data,
+           iLBCenc_inst->blockl*sizeof(float));
+
+       /* No lookahead, last window is asymmetric */
+
+       for (k = 0; k < iLBCenc_inst->lpc_n; k++) {
+
+           is = LPC_LOOKBACK;
+
+           if (k < (iLBCenc_inst->lpc_n - 1)) {
+               window(temp, lpc_winTbl,
+                   iLBCenc_inst->lpc_buffer, BLOCKL_MAX);
+           } else {
+               window(temp, lpc_asymwinTbl,
+                   iLBCenc_inst->lpc_buffer + is, BLOCKL_MAX);
+           }
+
+           autocorr(r, temp, BLOCKL_MAX, LPC_FILTERORDER);
+           window(r, r, lpc_lagwinTbl, LPC_FILTERORDER + 1);
+
+           levdurb(lp, temp, r, LPC_FILTERORDER);
+           bwexpand(lp2, lp, LPC_CHIRP_SYNTDENUM, LPC_FILTERORDER+1);
+
+           a2lsf(lsf + k*LPC_FILTERORDER, lp2);
+       }
+       is=LPC_LOOKBACK+BLOCKL_MAX-iLBCenc_inst->blockl;
+       memmove(iLBCenc_inst->lpc_buffer,
+           iLBCenc_inst->lpc_buffer+LPC_LOOKBACK+BLOCKL_MAX-is,
+           is*sizeof(float));
+   }
+
+   /*----------------------------------------------------------------*
+
+
+
+
+
+    *  lsf interpolator and conversion from lsf to a coefficients
+    *  (subrutine to SimpleInterpolateLSF)
+    *---------------------------------------------------------------*/
+
+   void LSFinterpolate2a_enc(
+       float *a,       /* (o) lpc coefficients */
+       float *lsf1,/* (i) first set of lsf coefficients */
+       float *lsf2,/* (i) second set of lsf coefficients */
+       float coef,     /* (i) weighting coefficient to use between
+                              lsf1 and lsf2 */
+       long length      /* (i) length of coefficient vectors */
+   ){
+       float  lsftmp[LPC_FILTERORDER];
+
+       interpolate(lsftmp, lsf1, lsf2, coef, length);
+       lsf2a(a, lsftmp);
+   }
+
+   /*----------------------------------------------------------------*
+    *  lsf interpolator (subrutine to LPCencode)
+    *---------------------------------------------------------------*/
+
+   void SimpleInterpolateLSF(
+       float *syntdenum,   /* (o) the synthesis filter denominator
+                                  resulting from the quantized
+                                  interpolated lsf */
+       float *weightdenum, /* (o) the weighting filter denominator
+                                  resulting from the unquantized
+                                  interpolated lsf */
+       float *lsf,         /* (i) the unquantized lsf coefficients */
+       float *lsfdeq,      /* (i) the dequantized lsf coefficients */
+       float *lsfold,      /* (i) the unquantized lsf coefficients of
+                                  the previous signal frame */
+       float *lsfdeqold, /* (i) the dequantized lsf coefficients of
+                                  the previous signal frame */
+       int length,         /* (i) should equate LPC_FILTERORDER */
+       iLBC_Enc_Inst_t *iLBCenc_inst
+                           /* (i/o) the encoder state structure */
+   ){
+       int    i, pos, lp_length;
+       float  lp[LPC_FILTERORDER + 1], *lsf2, *lsfdeq2;
+
+       lsf2 = lsf + length;
+       lsfdeq2 = lsfdeq + length;
+       lp_length = length + 1;
+
+       if (iLBCenc_inst->mode==30) {
+           /* sub-frame 1: Interpolation between old and first
+
+
+
+
+
+              set of lsf coefficients */
+
+           LSFinterpolate2a_enc(lp, lsfdeqold, lsfdeq,
+               lsf_weightTbl_30ms[0], length);
+           memcpy(syntdenum,lp,lp_length*sizeof(float));
+           LSFinterpolate2a_enc(lp, lsfold, lsf,
+               lsf_weightTbl_30ms[0], length);
+           bwexpand(weightdenum, lp, LPC_CHIRP_WEIGHTDENUM, lp_length);
+
+           /* sub-frame 2 to 6: Interpolation between first
+              and second set of lsf coefficients */
+
+           pos = lp_length;
+           for (i = 1; i < iLBCenc_inst->nsub; i++) {
+               LSFinterpolate2a_enc(lp, lsfdeq, lsfdeq2,
+                   lsf_weightTbl_30ms[i], length);
+               memcpy(syntdenum + pos,lp,lp_length*sizeof(float));
+
+               LSFinterpolate2a_enc(lp, lsf, lsf2,
+                   lsf_weightTbl_30ms[i], length);
+               bwexpand(weightdenum + pos, lp,
+                   LPC_CHIRP_WEIGHTDENUM, lp_length);
+               pos += lp_length;
+           }
+       }
+       else {
+           pos = 0;
+           for (i = 0; i < iLBCenc_inst->nsub; i++) {
+               LSFinterpolate2a_enc(lp, lsfdeqold, lsfdeq,
+                   lsf_weightTbl_20ms[i], length);
+               memcpy(syntdenum+pos,lp,lp_length*sizeof(float));
+               LSFinterpolate2a_enc(lp, lsfold, lsf,
+                   lsf_weightTbl_20ms[i], length);
+               bwexpand(weightdenum+pos, lp,
+                   LPC_CHIRP_WEIGHTDENUM, lp_length);
+               pos += lp_length;
+           }
+       }
+
+       /* update memory */
+
+       if (iLBCenc_inst->mode==30) {
+           memcpy(lsfold, lsf2, length*sizeof(float));
+           memcpy(lsfdeqold, lsfdeq2, length*sizeof(float));
+       }
+       else {
+           memcpy(lsfold, lsf, length*sizeof(float));
+           memcpy(lsfdeqold, lsfdeq, length*sizeof(float));
+
+
+
+
+
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  lsf quantizer (subrutine to LPCencode)
+    *---------------------------------------------------------------*/
+
+   void SimplelsfQ(
+       float *lsfdeq,    /* (o) dequantized lsf coefficients
+                              (dimension FILTERORDER) */
+       int *index,     /* (o) quantization index */
+       float *lsf,      /* (i) the lsf coefficient vector to be
+                              quantized (dimension FILTERORDER ) */
+       int lpc_n     /* (i) number of lsf sets to quantize */
+   ){
+       /* Quantize first LSF with memoryless split VQ */
+       SplitVQ(lsfdeq, index, lsf, lsfCbTbl, LSF_NSPLIT,
+           dim_lsfCbTbl, size_lsfCbTbl);
+
+       if (lpc_n==2) {
+           /* Quantize second LSF with memoryless split VQ */
+           SplitVQ(lsfdeq + LPC_FILTERORDER, index + LSF_NSPLIT,
+               lsf + LPC_FILTERORDER, lsfCbTbl, LSF_NSPLIT,
+               dim_lsfCbTbl, size_lsfCbTbl);
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  lpc encoder
+    *---------------------------------------------------------------*/
+
+   void LPCencode(
+       float *syntdenum, /* (i/o) synthesis filter coefficients
+                                  before/after encoding */
+       float *weightdenum, /* (i/o) weighting denumerator
+                                  coefficients before/after
+                                  encoding */
+       int *lsf_index,     /* (o) lsf quantization index */
+       float *data,    /* (i) lsf coefficients to quantize */
+       iLBC_Enc_Inst_t *iLBCenc_inst
+                           /* (i/o) the encoder state structure */
+   ){
+       float lsf[LPC_FILTERORDER * LPC_N_MAX];
+       float lsfdeq[LPC_FILTERORDER * LPC_N_MAX];
+       int change=0;
+
+       SimpleAnalysis(lsf, data, iLBCenc_inst);
+       SimplelsfQ(lsfdeq, lsf_index, lsf, iLBCenc_inst->lpc_n);
+
+
+
+
+
+       change=LSF_check(lsfdeq, LPC_FILTERORDER, iLBCenc_inst->lpc_n);
+       SimpleInterpolateLSF(syntdenum, weightdenum,
+           lsf, lsfdeq, iLBCenc_inst->lsfold,
+           iLBCenc_inst->lsfdeqold, LPC_FILTERORDER, iLBCenc_inst);
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/LPCencode.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/LPCencode.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/LPCencode.h	(revision 1163)
@@ -0,0 +1,28 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       LPCencode.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_LPCENCOD_H
+   #define __iLBC_LPCENCOD_H
+
+   void LPCencode(
+       float *syntdenum,   /* (i/o) synthesis filter coefficients
+                                  before/after encoding */
+       float *weightdenum, /* (i/o) weighting denumerator coefficients
+                                  before/after encoding */
+       int *lsf_index,     /* (o) lsf quantization index */
+       float *data,    /* (i) lsf coefficients to quantize */
+       iLBC_Enc_Inst_t *iLBCenc_inst
+                           /* (i/o) the encoder state structure */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/StateConstructW.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/StateConstructW.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/StateConstructW.c	(revision 1163)
@@ -0,0 +1,86 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       StateConstructW.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <math.h>
+   #include <string.h>
+
+   #include "iLBC_define.h"
+   #include "constants.h"
+   #include "filter.h"
+
+   /*----------------------------------------------------------------*
+    *  decoding of the start state
+    *---------------------------------------------------------------*/
+
+   void StateConstructW(
+       int idxForMax,      /* (i) 6-bit index for the quantization of
+                                  max amplitude */
+       int *idxVec,    /* (i) vector of quantization indexes */
+       float *syntDenum,   /* (i) synthesis filter denumerator */
+
+
+
+
+
+       float *out,         /* (o) the decoded state vector */
+       int len             /* (i) length of a state vector */
+   ){
+       float maxVal, tmpbuf[LPC_FILTERORDER+2*STATE_LEN], *tmp,
+           numerator[LPC_FILTERORDER+1];
+       float foutbuf[LPC_FILTERORDER+2*STATE_LEN], *fout;
+       int k,tmpi;
+
+       /* decoding of the maximum value */
+
+       maxVal = state_frgqTbl[idxForMax];
+       maxVal = (float)pow(10,maxVal)/(float)4.5;
+
+       /* initialization of buffers and coefficients */
+
+       memset(tmpbuf, 0, LPC_FILTERORDER*sizeof(float));
+       memset(foutbuf, 0, LPC_FILTERORDER*sizeof(float));
+       for (k=0; k<LPC_FILTERORDER; k++) {
+           numerator[k]=syntDenum[LPC_FILTERORDER-k];
+       }
+       numerator[LPC_FILTERORDER]=syntDenum[0];
+       tmp = &tmpbuf[LPC_FILTERORDER];
+       fout = &foutbuf[LPC_FILTERORDER];
+
+       /* decoding of the sample values */
+
+       for (k=0; k<len; k++) {
+           tmpi = len-1-k;
+           /* maxVal = 1/scal */
+           tmp[k] = maxVal*state_sq3Tbl[idxVec[tmpi]];
+       }
+
+       /* circular convolution with all-pass filter */
+
+       memset(tmp+len, 0, len*sizeof(float));
+       ZeroPoleFilter(tmp, numerator, syntDenum, 2*len,
+           LPC_FILTERORDER, fout);
+       for (k=0;k<len;k++) {
+           out[k] = fout[len-1-k]+fout[2*len-1-k];
+       }
+   }
+
+
+
+
+
+
+
+
+
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/StateConstructW.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/StateConstructW.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/StateConstructW.h	(revision 1163)
@@ -0,0 +1,31 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       StateConstructW.h
+
+
+
+
+
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_STATECONSTRUCTW_H
+   #define __iLBC_STATECONSTRUCTW_H
+
+   void StateConstructW(
+       int idxForMax,      /* (i) 6-bit index for the quantization of
+                                  max amplitude */
+       int *idxVec,    /* (i) vector of quantization indexes */
+       float *syntDenum,   /* (i) synthesis filter denumerator */
+       float *out,         /* (o) the decoded state vector */
+       int len             /* (i) length of a state vector */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/StateSearchW.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/StateSearchW.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/StateSearchW.c	(revision 1163)
@@ -0,0 +1,211 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       StateSearchW.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <math.h>
+   #include <string.h>
+
+   #include "iLBC_define.h"
+   #include "constants.h"
+   #include "filter.h"
+   #include "helpfun.h"
+
+   /*----------------------------------------------------------------*
+    *  predictive noise shaping encoding of scaled start state
+    *  (subrutine for StateSearchW)
+    *---------------------------------------------------------------*/
+
+   void AbsQuantW(
+       iLBC_Enc_Inst_t *iLBCenc_inst,
+                           /* (i) Encoder instance */
+       float *in,          /* (i) vector to encode */
+       float *syntDenum,   /* (i) denominator of synthesis filter */
+       float *weightDenum, /* (i) denominator of weighting filter */
+       int *out,           /* (o) vector of quantizer indexes */
+       int len,        /* (i) length of vector to encode and
+                                  vector of quantizer indexes */
+       int state_first     /* (i) position of start state in the
+                                  80 vec */
+   ){
+       float *syntOut;
+       float syntOutBuf[LPC_FILTERORDER+STATE_SHORT_LEN_30MS];
+       float toQ, xq;
+       int n;
+       int index;
+
+       /* initialization of buffer for filtering */
+
+       memset(syntOutBuf, 0, LPC_FILTERORDER*sizeof(float));
+
+
+
+
+
+
+       /* initialization of pointer for filtering */
+
+       syntOut = &syntOutBuf[LPC_FILTERORDER];
+
+       /* synthesis and weighting filters on input */
+
+       if (state_first) {
+           AllPoleFilter (in, weightDenum, SUBL, LPC_FILTERORDER);
+       } else {
+           AllPoleFilter (in, weightDenum,
+               iLBCenc_inst->state_short_len-SUBL,
+               LPC_FILTERORDER);
+       }
+
+       /* encoding loop */
+
+       for (n=0; n<len; n++) {
+
+           /* time update of filter coefficients */
+
+           if ((state_first)&&(n==SUBL)){
+               syntDenum += (LPC_FILTERORDER+1);
+               weightDenum += (LPC_FILTERORDER+1);
+
+               /* synthesis and weighting filters on input */
+               AllPoleFilter (&in[n], weightDenum, len-n,
+                   LPC_FILTERORDER);
+
+           } else if ((state_first==0)&&
+               (n==(iLBCenc_inst->state_short_len-SUBL))) {
+               syntDenum += (LPC_FILTERORDER+1);
+               weightDenum += (LPC_FILTERORDER+1);
+
+               /* synthesis and weighting filters on input */
+               AllPoleFilter (&in[n], weightDenum, len-n,
+                   LPC_FILTERORDER);
+
+           }
+
+           /* prediction of synthesized and weighted input */
+
+           syntOut[n] = 0.0;
+           AllPoleFilter (&syntOut[n], weightDenum, 1,
+               LPC_FILTERORDER);
+
+           /* quantization */
+
+           toQ = in[n]-syntOut[n];
+
+
+
+
+
+           sort_sq(&xq, &index, toQ, state_sq3Tbl, 8);
+           out[n]=index;
+           syntOut[n] = state_sq3Tbl[out[n]];
+
+           /* update of the prediction filter */
+
+           AllPoleFilter(&syntOut[n], weightDenum, 1,
+               LPC_FILTERORDER);
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  encoding of start state
+    *---------------------------------------------------------------*/
+
+   void StateSearchW(
+       iLBC_Enc_Inst_t *iLBCenc_inst,
+                           /* (i) Encoder instance */
+       float *residual,/* (i) target residual vector */
+       float *syntDenum,   /* (i) lpc synthesis filter */
+       float *weightDenum, /* (i) weighting filter denuminator */
+       int *idxForMax,     /* (o) quantizer index for maximum
+                                  amplitude */
+       int *idxVec,    /* (o) vector of quantization indexes */
+       int len,        /* (i) length of all vectors */
+       int state_first     /* (i) position of start state in the
+                                  80 vec */
+   ){
+       float dtmp, maxVal;
+       float tmpbuf[LPC_FILTERORDER+2*STATE_SHORT_LEN_30MS];
+       float *tmp, numerator[1+LPC_FILTERORDER];
+       float foutbuf[LPC_FILTERORDER+2*STATE_SHORT_LEN_30MS], *fout;
+       int k;
+       float qmax, scal;
+
+       /* initialization of buffers and filter coefficients */
+
+       memset(tmpbuf, 0, LPC_FILTERORDER*sizeof(float));
+       memset(foutbuf, 0, LPC_FILTERORDER*sizeof(float));
+       for (k=0; k<LPC_FILTERORDER; k++) {
+           numerator[k]=syntDenum[LPC_FILTERORDER-k];
+       }
+       numerator[LPC_FILTERORDER]=syntDenum[0];
+       tmp = &tmpbuf[LPC_FILTERORDER];
+       fout = &foutbuf[LPC_FILTERORDER];
+
+       /* circular convolution with the all-pass filter */
+
+
+
+
+
+
+       memcpy(tmp, residual, len*sizeof(float));
+       memset(tmp+len, 0, len*sizeof(float));
+       ZeroPoleFilter(tmp, numerator, syntDenum, 2*len,
+           LPC_FILTERORDER, fout);
+       for (k=0; k<len; k++) {
+           fout[k] += fout[k+len];
+       }
+
+       /* identification of the maximum amplitude value */
+
+       maxVal = fout[0];
+       for (k=1; k<len; k++) {
+
+           if (fout[k]*fout[k] > maxVal*maxVal){
+               maxVal = fout[k];
+           }
+       }
+       maxVal=(float)fabs(maxVal);
+
+       /* encoding of the maximum amplitude value */
+
+       if (maxVal < 10.0) {
+           maxVal = 10.0;
+       }
+       maxVal = (float)log10(maxVal);
+       sort_sq(&dtmp, idxForMax, maxVal, state_frgqTbl, 64);
+
+       /* decoding of the maximum amplitude representation value,
+          and corresponding scaling of start state */
+
+       maxVal=state_frgqTbl[*idxForMax];
+       qmax = (float)pow(10,maxVal);
+       scal = (float)(4.5)/qmax;
+       for (k=0; k<len; k++){
+           fout[k] *= scal;
+       }
+
+       /* predictive noise shaping encoding of scaled start state */
+
+       AbsQuantW(iLBCenc_inst, fout,syntDenum,
+           weightDenum,idxVec, len, state_first);
+   }
+
+
+
+
+
+
+
+
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/StateSearchW.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/StateSearchW.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/StateSearchW.h	(revision 1163)
@@ -0,0 +1,52 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       StateSearchW.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_STATESEARCHW_H
+   #define __iLBC_STATESEARCHW_H
+
+   void AbsQuantW(
+       iLBC_Enc_Inst_t *iLBCenc_inst,
+                           /* (i) Encoder instance */
+       float *in,          /* (i) vector to encode */
+       float *syntDenum,   /* (i) denominator of synthesis filter */
+       float *weightDenum, /* (i) denominator of weighting filter */
+       int *out,           /* (o) vector of quantizer indexes */
+       int len,        /* (i) length of vector to encode and
+                                  vector of quantizer indexes */
+       int state_first     /* (i) position of start state in the
+                                  80 vec */
+   );
+
+   void StateSearchW(
+       iLBC_Enc_Inst_t *iLBCenc_inst,
+                           /* (i) Encoder instance */
+       float *residual,/* (i) target residual vector */
+       float *syntDenum,   /* (i) lpc synthesis filter */
+       float *weightDenum, /* (i) weighting filter denuminator */
+       int *idxForMax,     /* (o) quantizer index for maximum
+                                  amplitude */
+       int *idxVec,    /* (o) vector of quantization indexes */
+       int len,        /* (i) length of all vectors */
+       int state_first     /* (i) position of start state in the
+                                  80 vec */
+   );
+
+
+   #endif
+
+
+
+
+
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/anaFilter.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/anaFilter.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/anaFilter.c	(revision 1163)
@@ -0,0 +1,72 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       anaFilter.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <string.h>
+   #include "iLBC_define.h"
+
+   /*----------------------------------------------------------------*
+    *  LP analysis filter.
+    *---------------------------------------------------------------*/
+
+   void anaFilter(
+       float *In,  /* (i) Signal to be filtered */
+       float *a,   /* (i) LP parameters */
+       int len,/* (i) Length of signal */
+       float *Out, /* (o) Filtered signal */
+       float *mem  /* (i/o) Filter state */
+   ){
+       int i, j;
+       float *po, *pi, *pm, *pa;
+
+       po = Out;
+
+       /* Filter first part using memory from past */
+
+       for (i=0; i<LPC_FILTERORDER; i++) {
+           pi = &In[i];
+           pm = &mem[LPC_FILTERORDER-1];
+           pa = a;
+           *po=0.0;
+
+
+
+
+
+           for (j=0; j<=i; j++) {
+               *po+=(*pa++)*(*pi--);
+           }
+           for (j=i+1; j<LPC_FILTERORDER+1; j++) {
+
+               *po+=(*pa++)*(*pm--);
+           }
+           po++;
+       }
+
+       /* Filter last part where the state is entirely
+          in the input vector */
+
+       for (i=LPC_FILTERORDER; i<len; i++) {
+           pi = &In[i];
+           pa = a;
+           *po=0.0;
+           for (j=0; j<LPC_FILTERORDER+1; j++) {
+               *po+=(*pa++)*(*pi--);
+           }
+           po++;
+       }
+
+       /* Update state vector */
+
+       memcpy(mem, &In[len-LPC_FILTERORDER],
+           LPC_FILTERORDER*sizeof(float));
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/anaFilter.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/anaFilter.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/anaFilter.h	(revision 1163)
@@ -0,0 +1,30 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       anaFilter.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_ANAFILTER_H
+   #define __iLBC_ANAFILTER_H
+
+   void anaFilter(
+
+
+
+
+
+       float *In,  /* (i) Signal to be filtered */
+       float *a,   /* (i) LP parameters */
+       int len,/* (i) Length of signal */
+       float *Out, /* (o) Filtered signal */
+       float *mem  /* (i/o) Filter state */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/constants.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/constants.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/constants.c	(revision 1163)
@@ -0,0 +1,770 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       constants.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include "iLBC_define.h"
+
+   /* ULP bit allocation */
+
+       /* 20 ms frame */
+
+   const iLBC_ULP_Inst_t ULP_20msTbl = {
+       /* LSF */
+       {   {6,0,0,0,0}, {7,0,0,0,0}, {7,0,0,0,0},
+           {0,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0}},
+       /* Start state location, gain and samples */
+       {2,0,0,0,0},
+       {1,0,0,0,0},
+       {6,0,0,0,0},
+       {0,1,2,0,0},
+       /* extra CB index and extra CB gain */
+       {{6,0,1,0,0}, {0,0,7,0,0}, {0,0,7,0,0}},
+       {{2,0,3,0,0}, {1,1,2,0,0}, {0,0,3,0,0}},
+       /* CB index and CB gain */
+       {   {{7,0,1,0,0}, {0,0,7,0,0}, {0,0,7,0,0}},
+           {{0,0,8,0,0}, {0,0,8,0,0}, {0,0,8,0,0}},
+           {{0,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0}},
+           {{0,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0}}},
+       {   {{1,2,2,0,0}, {1,1,2,0,0}, {0,0,3,0,0}},
+           {{1,1,3,0,0}, {0,2,2,0,0}, {0,0,3,0,0}},
+           {{0,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0}},
+           {{0,0,0,0,0}, {0,0,0,0,0}, {0,0,0,0,0}}}
+   };
+
+       /* 30 ms frame */
+
+   const iLBC_ULP_Inst_t ULP_30msTbl = {
+       /* LSF */
+
+
+
+
+
+       {   {6,0,0,0,0}, {7,0,0,0,0}, {7,0,0,0,0},
+           {6,0,0,0,0}, {7,0,0,0,0}, {7,0,0,0,0}},
+       /* Start state location, gain and samples */
+       {3,0,0,0,0},
+       {1,0,0,0,0},
+       {6,0,0,0,0},
+       {0,1,2,0,0},
+       /* extra CB index and extra CB gain */
+       {{4,2,1,0,0}, {0,0,7,0,0}, {0,0,7,0,0}},
+       {{1,1,3,0,0}, {1,1,2,0,0}, {0,0,3,0,0}},
+       /* CB index and CB gain */
+       {   {{6,1,1,0,0}, {0,0,7,0,0}, {0,0,7,0,0}},
+           {{0,7,1,0,0}, {0,0,8,0,0}, {0,0,8,0,0}},
+           {{0,7,1,0,0}, {0,0,8,0,0}, {0,0,8,0,0}},
+           {{0,7,1,0,0}, {0,0,8,0,0}, {0,0,8,0,0}}},
+       {   {{1,2,2,0,0}, {1,2,1,0,0}, {0,0,3,0,0}},
+           {{0,2,3,0,0}, {0,2,2,0,0}, {0,0,3,0,0}},
+           {{0,1,4,0,0}, {0,1,3,0,0}, {0,0,3,0,0}},
+           {{0,1,4,0,0}, {0,1,3,0,0}, {0,0,3,0,0}}}
+   };
+
+   /* HP Filters */
+
+   float hpi_zero_coefsTbl[3] = {
+       (float)0.92727436, (float)-1.8544941, (float)0.92727436
+   };
+   float hpi_pole_coefsTbl[3] = {
+       (float)1.0, (float)-1.9059465, (float)0.9114024
+   };
+   float hpo_zero_coefsTbl[3] = {
+       (float)0.93980581, (float)-1.8795834, (float)0.93980581
+   };
+   float hpo_pole_coefsTbl[3] = {
+       (float)1.0, (float)-1.9330735, (float)0.93589199
+   };
+
+   /* LP Filter */
+
+   float lpFilt_coefsTbl[FILTERORDER_DS]={
+       (float)-0.066650, (float)0.125000, (float)0.316650,
+       (float)0.414063, (float)0.316650,
+       (float)0.125000, (float)-0.066650
+   };
+
+   /* State quantization tables */
+
+   float state_sq3Tbl[8] = {
+       (float)-3.719849, (float)-2.177490, (float)-1.130005,
+
+
+
+
+
+       (float)-0.309692, (float)0.444214, (float)1.329712,
+       (float)2.436279, (float)3.983887
+   };
+
+   float state_frgqTbl[64] = {
+       (float)1.000085, (float)1.071695, (float)1.140395,
+       (float)1.206868, (float)1.277188, (float)1.351503,
+       (float)1.429380, (float)1.500727, (float)1.569049,
+       (float)1.639599, (float)1.707071, (float)1.781531,
+       (float)1.840799, (float)1.901550, (float)1.956695,
+       (float)2.006750, (float)2.055474, (float)2.102787,
+       (float)2.142819, (float)2.183592, (float)2.217962,
+       (float)2.257177, (float)2.295739, (float)2.332967,
+       (float)2.369248, (float)2.402792, (float)2.435080,
+       (float)2.468598, (float)2.503394, (float)2.539284,
+       (float)2.572944, (float)2.605036, (float)2.636331,
+       (float)2.668939, (float)2.698780, (float)2.729101,
+       (float)2.759786, (float)2.789834, (float)2.818679,
+       (float)2.848074, (float)2.877470, (float)2.906899,
+       (float)2.936655, (float)2.967804, (float)3.000115,
+       (float)3.033367, (float)3.066355, (float)3.104231,
+       (float)3.141499, (float)3.183012, (float)3.222952,
+       (float)3.265433, (float)3.308441, (float)3.350823,
+       (float)3.395275, (float)3.442793, (float)3.490801,
+       (float)3.542514, (float)3.604064, (float)3.666050,
+       (float)3.740994, (float)3.830749, (float)3.938770,
+       (float)4.101764
+   };
+
+   /* CB tables */
+
+   int search_rangeTbl[5][CB_NSTAGES]={{58,58,58}, {108,44,44},
+               {108,108,108}, {108,108,108}, {108,108,108}};
+   int stMemLTbl=85;
+   int memLfTbl[NASUB_MAX]={147,147,147,147};
+
+   /* expansion filter(s) */
+
+   float cbfiltersTbl[CB_FILTERLEN]={
+       (float)-0.034180, (float)0.108887, (float)-0.184326,
+       (float)0.806152,  (float)0.713379, (float)-0.144043,
+       (float)0.083740,  (float)-0.033691
+   };
+
+   /* Gain Quantization */
+
+   float gain_sq3Tbl[8]={
+       (float)-1.000000,  (float)-0.659973,  (float)-0.330017,
+
+
+
+
+
+       (float)0.000000, (float)0.250000, (float)0.500000,
+       (float)0.750000, (float)1.00000};
+
+   float gain_sq4Tbl[16]={
+       (float)-1.049988, (float)-0.900024, (float)-0.750000,
+       (float)-0.599976, (float)-0.450012, (float)-0.299988,
+       (float)-0.150024, (float)0.000000, (float)0.150024,
+       (float)0.299988, (float)0.450012, (float)0.599976,
+       (float)0.750000, (float)0.900024, (float)1.049988,
+       (float)1.200012};
+
+   float gain_sq5Tbl[32]={
+       (float)0.037476, (float)0.075012, (float)0.112488,
+       (float)0.150024, (float)0.187500, (float)0.224976,
+       (float)0.262512, (float)0.299988, (float)0.337524,
+       (float)0.375000, (float)0.412476, (float)0.450012,
+       (float)0.487488, (float)0.525024, (float)0.562500,
+       (float)0.599976, (float)0.637512, (float)0.674988,
+       (float)0.712524, (float)0.750000, (float)0.787476,
+       (float)0.825012, (float)0.862488, (float)0.900024,
+       (float)0.937500, (float)0.974976, (float)1.012512,
+       (float)1.049988, (float)1.087524, (float)1.125000,
+       (float)1.162476, (float)1.200012};
+
+   /* Enhancer - Upsamling a factor 4 (ENH_UPS0 = 4) */
+   float polyphaserTbl[ENH_UPS0*(2*ENH_FL0+1)]={
+       (float)0.000000, (float)0.000000, (float)0.000000,
+   (float)1.000000,
+           (float)0.000000, (float)0.000000, (float)0.000000,
+       (float)0.015625, (float)-0.076904, (float)0.288330,
+   (float)0.862061,
+           (float)-0.106445, (float)0.018799, (float)-0.015625,
+       (float)0.023682, (float)-0.124268, (float)0.601563,
+   (float)0.601563,
+           (float)-0.124268, (float)0.023682, (float)-0.023682,
+       (float)0.018799, (float)-0.106445, (float)0.862061,
+   (float)0.288330,
+           (float)-0.076904, (float)0.015625, (float)-0.018799};
+
+   float enh_plocsTbl[ENH_NBLOCKS_TOT] = {(float)40.0, (float)120.0,
+               (float)200.0, (float)280.0, (float)360.0,
+               (float)440.0, (float)520.0, (float)600.0};
+
+   /* LPC analysis and quantization */
+
+   int dim_lsfCbTbl[LSF_NSPLIT] = {3, 3, 4};
+   int size_lsfCbTbl[LSF_NSPLIT] = {64,128,128};
+
+
+
+
+
+
+   float lsfmeanTbl[LPC_FILTERORDER] = {
+       (float)0.281738, (float)0.445801, (float)0.663330,
+       (float)0.962524, (float)1.251831, (float)1.533081,
+       (float)1.850586, (float)2.137817, (float)2.481445,
+       (float)2.777344};
+
+   float lsf_weightTbl_30ms[6] = {(float)(1.0/2.0), (float)1.0,
+   (float)(2.0/3.0),
+       (float)(1.0/3.0), (float)0.0, (float)0.0};
+
+   float lsf_weightTbl_20ms[4] = {(float)(3.0/4.0), (float)(2.0/4.0),
+       (float)(1.0/4.0), (float)(0.0)};
+
+   /* Hanning LPC window */
+   float lpc_winTbl[BLOCKL_MAX]={
+       (float)0.000183, (float)0.000671, (float)0.001526,
+       (float)0.002716, (float)0.004242, (float)0.006104,
+       (float)0.008301, (float)0.010834, (float)0.013702,
+       (float)0.016907, (float)0.020416, (float)0.024261,
+       (float)0.028442, (float)0.032928, (float)0.037750,
+       (float)0.042877, (float)0.048309, (float)0.054047,
+       (float)0.060089, (float)0.066437, (float)0.073090,
+       (float)0.080017, (float)0.087219, (float)0.094727,
+       (float)0.102509, (float)0.110535, (float)0.118835,
+       (float)0.127411, (float)0.136230, (float)0.145294,
+       (float)0.154602, (float)0.164154, (float)0.173920,
+       (float)0.183899, (float)0.194122, (float)0.204529,
+       (float)0.215149, (float)0.225952, (float)0.236938,
+       (float)0.248108, (float)0.259460, (float)0.270966,
+       (float)0.282654, (float)0.294464, (float)0.306396,
+       (float)0.318481, (float)0.330688, (float)0.343018,
+       (float)0.355438, (float)0.367981, (float)0.380585,
+       (float)0.393280, (float)0.406067, (float)0.418884,
+       (float)0.431763, (float)0.444702, (float)0.457672,
+       (float)0.470673, (float)0.483704, (float)0.496735,
+       (float)0.509766, (float)0.522797, (float)0.535828,
+       (float)0.548798, (float)0.561768, (float)0.574677,
+       (float)0.587524, (float)0.600342, (float)0.613068,
+       (float)0.625732, (float)0.638306, (float)0.650787,
+       (float)0.663147, (float)0.675415, (float)0.687561,
+       (float)0.699585, (float)0.711487, (float)0.723206,
+       (float)0.734802, (float)0.746216, (float)0.757477,
+       (float)0.768585, (float)0.779480, (float)0.790192,
+       (float)0.800720, (float)0.811005, (float)0.821106,
+       (float)0.830994, (float)0.840668, (float)0.850067,
+       (float)0.859253, (float)0.868225, (float)0.876892,
+       (float)0.885345, (float)0.893524, (float)0.901428,
+       (float)0.909058, (float)0.916412, (float)0.923492,
+
+
+
+
+
+       (float)0.930267, (float)0.936768, (float)0.942963,
+       (float)0.948853, (float)0.954437, (float)0.959717,
+       (float)0.964691, (float)0.969360, (float)0.973694,
+       (float)0.977692, (float)0.981384, (float)0.984741,
+       (float)0.987762, (float)0.990479, (float)0.992828,
+       (float)0.994873, (float)0.996552, (float)0.997925,
+       (float)0.998932, (float)0.999603, (float)0.999969,
+       (float)0.999969, (float)0.999603, (float)0.998932,
+       (float)0.997925, (float)0.996552, (float)0.994873,
+       (float)0.992828, (float)0.990479, (float)0.987762,
+       (float)0.984741, (float)0.981384, (float)0.977692,
+       (float)0.973694, (float)0.969360, (float)0.964691,
+       (float)0.959717, (float)0.954437, (float)0.948853,
+       (float)0.942963, (float)0.936768, (float)0.930267,
+       (float)0.923492, (float)0.916412, (float)0.909058,
+       (float)0.901428, (float)0.893524, (float)0.885345,
+       (float)0.876892, (float)0.868225, (float)0.859253,
+       (float)0.850067, (float)0.840668, (float)0.830994,
+       (float)0.821106, (float)0.811005, (float)0.800720,
+       (float)0.790192, (float)0.779480, (float)0.768585,
+       (float)0.757477, (float)0.746216, (float)0.734802,
+       (float)0.723206, (float)0.711487, (float)0.699585,
+       (float)0.687561, (float)0.675415, (float)0.663147,
+       (float)0.650787, (float)0.638306, (float)0.625732,
+       (float)0.613068, (float)0.600342, (float)0.587524,
+       (float)0.574677, (float)0.561768, (float)0.548798,
+       (float)0.535828, (float)0.522797, (float)0.509766,
+       (float)0.496735, (float)0.483704, (float)0.470673,
+       (float)0.457672, (float)0.444702, (float)0.431763,
+       (float)0.418884, (float)0.406067, (float)0.393280,
+       (float)0.380585, (float)0.367981, (float)0.355438,
+       (float)0.343018, (float)0.330688, (float)0.318481,
+       (float)0.306396, (float)0.294464, (float)0.282654,
+       (float)0.270966, (float)0.259460, (float)0.248108,
+       (float)0.236938, (float)0.225952, (float)0.215149,
+       (float)0.204529, (float)0.194122, (float)0.183899,
+       (float)0.173920, (float)0.164154, (float)0.154602,
+       (float)0.145294, (float)0.136230, (float)0.127411,
+       (float)0.118835, (float)0.110535, (float)0.102509,
+       (float)0.094727, (float)0.087219, (float)0.080017,
+       (float)0.073090, (float)0.066437, (float)0.060089,
+       (float)0.054047, (float)0.048309, (float)0.042877,
+       (float)0.037750, (float)0.032928, (float)0.028442,
+       (float)0.024261, (float)0.020416, (float)0.016907,
+       (float)0.013702, (float)0.010834, (float)0.008301,
+       (float)0.006104, (float)0.004242, (float)0.002716,
+       (float)0.001526, (float)0.000671, (float)0.000183
+   };
+
+
+
+
+
+   /* Asymmetric LPC window */
+   float lpc_asymwinTbl[BLOCKL_MAX]={
+       (float)0.000061, (float)0.000214, (float)0.000458,
+       (float)0.000824, (float)0.001282, (float)0.001831,
+       (float)0.002472, (float)0.003235, (float)0.004120,
+       (float)0.005066, (float)0.006134, (float)0.007294,
+       (float)0.008545, (float)0.009918, (float)0.011383,
+       (float)0.012939, (float)0.014587, (float)0.016357,
+       (float)0.018219, (float)0.020172, (float)0.022217,
+       (float)0.024353, (float)0.026611, (float)0.028961,
+       (float)0.031372, (float)0.033905, (float)0.036530,
+       (float)0.039276, (float)0.042084, (float)0.044983,
+       (float)0.047974, (float)0.051086, (float)0.054260,
+       (float)0.057526, (float)0.060883, (float)0.064331,
+       (float)0.067871, (float)0.071503, (float)0.075226,
+       (float)0.079010, (float)0.082916, (float)0.086884,
+       (float)0.090942, (float)0.095062, (float)0.099304,
+       (float)0.103607, (float)0.107971, (float)0.112427,
+       (float)0.116974, (float)0.121582, (float)0.126282,
+       (float)0.131073, (float)0.135895, (float)0.140839,
+       (float)0.145813, (float)0.150879, (float)0.156006,
+       (float)0.161224, (float)0.166504, (float)0.171844,
+       (float)0.177246, (float)0.182709, (float)0.188263,
+       (float)0.193848, (float)0.199524, (float)0.205231,
+       (float)0.211029, (float)0.216858, (float)0.222778,
+       (float)0.228729, (float)0.234741, (float)0.240814,
+       (float)0.246918, (float)0.253082, (float)0.259308,
+       (float)0.265564, (float)0.271881, (float)0.278259,
+       (float)0.284668, (float)0.291107, (float)0.297607,
+       (float)0.304138, (float)0.310730, (float)0.317322,
+       (float)0.323975, (float)0.330658, (float)0.337372,
+       (float)0.344147, (float)0.350922, (float)0.357727,
+       (float)0.364594, (float)0.371460, (float)0.378357,
+       (float)0.385284, (float)0.392212, (float)0.399170,
+       (float)0.406158, (float)0.413177, (float)0.420197,
+       (float)0.427246, (float)0.434296, (float)0.441376,
+       (float)0.448456, (float)0.455536, (float)0.462646,
+       (float)0.469757, (float)0.476868, (float)0.483978,
+       (float)0.491089, (float)0.498230, (float)0.505341,
+       (float)0.512451, (float)0.519592, (float)0.526703,
+       (float)0.533813, (float)0.540924, (float)0.548004,
+       (float)0.555084, (float)0.562164, (float)0.569244,
+       (float)0.576294, (float)0.583313, (float)0.590332,
+       (float)0.597321, (float)0.604309, (float)0.611267,
+       (float)0.618195, (float)0.625092, (float)0.631989,
+       (float)0.638855, (float)0.645660, (float)0.652466,
+       (float)0.659241, (float)0.665985, (float)0.672668,
+       (float)0.679352, (float)0.685974, (float)0.692566,
+
+
+
+
+
+       (float)0.699127, (float)0.705658, (float)0.712128,
+       (float)0.718536, (float)0.724945, (float)0.731262,
+       (float)0.737549, (float)0.743805, (float)0.750000,
+       (float)0.756134, (float)0.762238, (float)0.768280,
+       (float)0.774261, (float)0.780182, (float)0.786072,
+       (float)0.791870, (float)0.797638, (float)0.803314,
+       (float)0.808960, (float)0.814514, (float)0.820038,
+       (float)0.825470, (float)0.830841, (float)0.836151,
+       (float)0.841400, (float)0.846558, (float)0.851654,
+       (float)0.856689, (float)0.861633, (float)0.866516,
+       (float)0.871338, (float)0.876068, (float)0.880737,
+       (float)0.885315, (float)0.889801, (float)0.894226,
+       (float)0.898560, (float)0.902832, (float)0.907013,
+       (float)0.911102, (float)0.915100, (float)0.919037,
+       (float)0.922882, (float)0.926636, (float)0.930328,
+       (float)0.933899, (float)0.937408, (float)0.940796,
+       (float)0.944122, (float)0.947357, (float)0.950470,
+       (float)0.953522, (float)0.956482, (float)0.959351,
+       (float)0.962097, (float)0.964783, (float)0.967377,
+       (float)0.969849, (float)0.972229, (float)0.974518,
+       (float)0.976715, (float)0.978821, (float)0.980835,
+       (float)0.982727, (float)0.984528, (float)0.986237,
+       (float)0.987854, (float)0.989380, (float)0.990784,
+       (float)0.992096, (float)0.993317, (float)0.994415,
+       (float)0.995422, (float)0.996338, (float)0.997162,
+       (float)0.997864, (float)0.998474, (float)0.998962,
+       (float)0.999390, (float)0.999695, (float)0.999878,
+       (float)0.999969, (float)0.999969, (float)0.996918,
+       (float)0.987701, (float)0.972382, (float)0.951050,
+       (float)0.923889, (float)0.891022, (float)0.852631,
+       (float)0.809021, (float)0.760406, (float)0.707092,
+       (float)0.649445, (float)0.587799, (float)0.522491,
+       (float)0.453979, (float)0.382690, (float)0.309021,
+       (float)0.233459, (float)0.156433, (float)0.078461
+   };
+
+   /* Lag window for LPC */
+   float lpc_lagwinTbl[LPC_FILTERORDER + 1]={
+       (float)1.000100, (float)0.998890, (float)0.995569,
+           (float)0.990057, (float)0.982392,
+       (float)0.972623, (float)0.960816, (float)0.947047,
+           (float)0.931405, (float)0.913989, (float)0.894909};
+
+   /* LSF quantization*/
+   float lsfCbTbl[64 * 3 + 128 * 3 + 128 * 4] = {
+   (float)0.155396, (float)0.273193, (float)0.451172,
+   (float)0.390503, (float)0.648071, (float)1.002075,
+   (float)0.440186, (float)0.692261, (float)0.955688,
+
+
+
+
+
+   (float)0.343628, (float)0.642334, (float)1.071533,
+   (float)0.318359, (float)0.491577, (float)0.670532,
+   (float)0.193115, (float)0.375488, (float)0.725708,
+   (float)0.364136, (float)0.510376, (float)0.658691,
+   (float)0.297485, (float)0.527588, (float)0.842529,
+   (float)0.227173, (float)0.365967, (float)0.563110,
+   (float)0.244995, (float)0.396729, (float)0.636475,
+   (float)0.169434, (float)0.300171, (float)0.520264,
+   (float)0.312866, (float)0.464478, (float)0.643188,
+   (float)0.248535, (float)0.429932, (float)0.626099,
+   (float)0.236206, (float)0.491333, (float)0.817139,
+   (float)0.334961, (float)0.625122, (float)0.895752,
+   (float)0.343018, (float)0.518555, (float)0.698608,
+   (float)0.372803, (float)0.659790, (float)0.945435,
+   (float)0.176880, (float)0.316528, (float)0.581421,
+   (float)0.416382, (float)0.625977, (float)0.805176,
+   (float)0.303223, (float)0.568726, (float)0.915039,
+   (float)0.203613, (float)0.351440, (float)0.588135,
+   (float)0.221191, (float)0.375000, (float)0.614746,
+   (float)0.199951, (float)0.323364, (float)0.476074,
+   (float)0.300781, (float)0.433350, (float)0.566895,
+   (float)0.226196, (float)0.354004, (float)0.507568,
+   (float)0.300049, (float)0.508179, (float)0.711670,
+   (float)0.312012, (float)0.492676, (float)0.763428,
+   (float)0.329956, (float)0.541016, (float)0.795776,
+   (float)0.373779, (float)0.604614, (float)0.928833,
+   (float)0.210571, (float)0.452026, (float)0.755249,
+   (float)0.271118, (float)0.473267, (float)0.662476,
+   (float)0.285522, (float)0.436890, (float)0.634399,
+   (float)0.246704, (float)0.565552, (float)0.859009,
+   (float)0.270508, (float)0.406250, (float)0.553589,
+   (float)0.361450, (float)0.578491, (float)0.813843,
+   (float)0.342651, (float)0.482788, (float)0.622437,
+   (float)0.340332, (float)0.549438, (float)0.743164,
+   (float)0.200439, (float)0.336304, (float)0.540894,
+   (float)0.407837, (float)0.644775, (float)0.895142,
+   (float)0.294678, (float)0.454834, (float)0.699097,
+   (float)0.193115, (float)0.344482, (float)0.643188,
+   (float)0.275757, (float)0.420776, (float)0.598755,
+   (float)0.380493, (float)0.608643, (float)0.861084,
+   (float)0.222778, (float)0.426147, (float)0.676514,
+   (float)0.407471, (float)0.700195, (float)1.053101,
+   (float)0.218384, (float)0.377197, (float)0.669922,
+   (float)0.313232, (float)0.454102, (float)0.600952,
+   (float)0.347412, (float)0.571533, (float)0.874146,
+   (float)0.238037, (float)0.405396, (float)0.729492,
+   (float)0.223877, (float)0.412964, (float)0.822021,
+   (float)0.395264, (float)0.582153, (float)0.743896,
+
+
+
+
+
+   (float)0.247925, (float)0.485596, (float)0.720581,
+   (float)0.229126, (float)0.496582, (float)0.907715,
+   (float)0.260132, (float)0.566895, (float)1.012695,
+   (float)0.337402, (float)0.611572, (float)0.978149,
+   (float)0.267822, (float)0.447632, (float)0.769287,
+   (float)0.250610, (float)0.381714, (float)0.530029,
+   (float)0.430054, (float)0.805054, (float)1.221924,
+   (float)0.382568, (float)0.544067, (float)0.701660,
+   (float)0.383545, (float)0.710327, (float)1.149170,
+   (float)0.271362, (float)0.529053, (float)0.775513,
+   (float)0.246826, (float)0.393555, (float)0.588623,
+   (float)0.266846, (float)0.422119, (float)0.676758,
+   (float)0.311523, (float)0.580688, (float)0.838623,
+   (float)1.331177, (float)1.576782, (float)1.779541,
+   (float)1.160034, (float)1.401978, (float)1.768188,
+   (float)1.161865, (float)1.525146, (float)1.715332,
+   (float)0.759521, (float)0.913940, (float)1.119873,
+   (float)0.947144, (float)1.121338, (float)1.282471,
+   (float)1.015015, (float)1.557007, (float)1.804932,
+   (float)1.172974, (float)1.402100, (float)1.692627,
+   (float)1.087524, (float)1.474243, (float)1.665405,
+   (float)0.899536, (float)1.105225, (float)1.406250,
+   (float)1.148438, (float)1.484741, (float)1.796265,
+   (float)0.785645, (float)1.209839, (float)1.567749,
+   (float)0.867798, (float)1.166504, (float)1.450684,
+   (float)0.922485, (float)1.229858, (float)1.420898,
+   (float)0.791260, (float)1.123291, (float)1.409546,
+   (float)0.788940, (float)0.966064, (float)1.340332,
+   (float)1.051147, (float)1.272827, (float)1.556641,
+   (float)0.866821, (float)1.181152, (float)1.538818,
+   (float)0.906738, (float)1.373535, (float)1.607910,
+   (float)1.244751, (float)1.581421, (float)1.933838,
+   (float)0.913940, (float)1.337280, (float)1.539673,
+   (float)0.680542, (float)0.959229, (float)1.662720,
+   (float)0.887207, (float)1.430542, (float)1.800781,
+   (float)0.912598, (float)1.433594, (float)1.683960,
+   (float)0.860474, (float)1.060303, (float)1.455322,
+   (float)1.005127, (float)1.381104, (float)1.706909,
+   (float)0.800781, (float)1.363892, (float)1.829102,
+   (float)0.781860, (float)1.124390, (float)1.505981,
+   (float)1.003662, (float)1.471436, (float)1.684692,
+   (float)0.981323, (float)1.309570, (float)1.618042,
+   (float)1.228760, (float)1.554321, (float)1.756470,
+   (float)0.734375, (float)0.895752, (float)1.225586,
+   (float)0.841797, (float)1.055664, (float)1.249268,
+   (float)0.920166, (float)1.119385, (float)1.486206,
+   (float)0.894409, (float)1.539063, (float)1.828979,
+   (float)1.283691, (float)1.543335, (float)1.858276,
+
+
+
+
+
+   (float)0.676025, (float)0.933105, (float)1.490845,
+   (float)0.821289, (float)1.491821, (float)1.739868,
+   (float)0.923218, (float)1.144653, (float)1.580566,
+   (float)1.057251, (float)1.345581, (float)1.635864,
+   (float)0.888672, (float)1.074951, (float)1.353149,
+   (float)0.942749, (float)1.195435, (float)1.505493,
+   (float)1.492310, (float)1.788086, (float)2.039673,
+   (float)1.070313, (float)1.634399, (float)1.860962,
+   (float)1.253296, (float)1.488892, (float)1.686035,
+   (float)0.647095, (float)0.864014, (float)1.401855,
+   (float)0.866699, (float)1.254883, (float)1.453369,
+   (float)1.063965, (float)1.532593, (float)1.731323,
+   (float)1.167847, (float)1.521484, (float)1.884033,
+   (float)0.956055, (float)1.502075, (float)1.745605,
+   (float)0.928711, (float)1.288574, (float)1.479614,
+   (float)1.088013, (float)1.380737, (float)1.570801,
+   (float)0.905029, (float)1.186768, (float)1.371948,
+   (float)1.057861, (float)1.421021, (float)1.617432,
+   (float)1.108276, (float)1.312500, (float)1.501465,
+   (float)0.979492, (float)1.416992, (float)1.624268,
+   (float)1.276001, (float)1.661011, (float)2.007935,
+   (float)0.993042, (float)1.168579, (float)1.331665,
+   (float)0.778198, (float)0.944946, (float)1.235962,
+   (float)1.223755, (float)1.491333, (float)1.815674,
+   (float)0.852661, (float)1.350464, (float)1.722290,
+   (float)1.134766, (float)1.593140, (float)1.787354,
+   (float)1.051392, (float)1.339722, (float)1.531006,
+   (float)0.803589, (float)1.271240, (float)1.652100,
+   (float)0.755737, (float)1.143555, (float)1.639404,
+   (float)0.700928, (float)0.837280, (float)1.130371,
+   (float)0.942749, (float)1.197876, (float)1.669800,
+   (float)0.993286, (float)1.378296, (float)1.566528,
+   (float)0.801025, (float)1.095337, (float)1.298950,
+   (float)0.739990, (float)1.032959, (float)1.383667,
+   (float)0.845703, (float)1.072266, (float)1.543823,
+   (float)0.915649, (float)1.072266, (float)1.224487,
+   (float)1.021973, (float)1.226196, (float)1.481323,
+   (float)0.999878, (float)1.204102, (float)1.555908,
+   (float)0.722290, (float)0.913940, (float)1.340210,
+   (float)0.673340, (float)0.835938, (float)1.259521,
+   (float)0.832397, (float)1.208374, (float)1.394165,
+   (float)0.962158, (float)1.576172, (float)1.912842,
+   (float)1.166748, (float)1.370850, (float)1.556763,
+   (float)0.946289, (float)1.138550, (float)1.400391,
+   (float)1.035034, (float)1.218262, (float)1.386475,
+   (float)1.393799, (float)1.717773, (float)2.000244,
+   (float)0.972656, (float)1.260986, (float)1.760620,
+   (float)1.028198, (float)1.288452, (float)1.484619,
+
+
+
+
+
+   (float)0.773560, (float)1.258057, (float)1.756714,
+   (float)1.080322, (float)1.328003, (float)1.742676,
+   (float)0.823975, (float)1.450806, (float)1.917725,
+   (float)0.859009, (float)1.016602, (float)1.191895,
+   (float)0.843994, (float)1.131104, (float)1.645020,
+   (float)1.189697, (float)1.702759, (float)1.894409,
+   (float)1.346680, (float)1.763184, (float)2.066040,
+   (float)0.980469, (float)1.253784, (float)1.441650,
+   (float)1.338135, (float)1.641968, (float)1.932739,
+   (float)1.223267, (float)1.424194, (float)1.626465,
+   (float)0.765747, (float)1.004150, (float)1.579102,
+   (float)1.042847, (float)1.269165, (float)1.647461,
+   (float)0.968750, (float)1.257568, (float)1.555786,
+   (float)0.826294, (float)0.993408, (float)1.275146,
+   (float)0.742310, (float)0.950439, (float)1.430542,
+   (float)1.054321, (float)1.439819, (float)1.828003,
+   (float)1.072998, (float)1.261719, (float)1.441895,
+   (float)0.859375, (float)1.036377, (float)1.314819,
+   (float)0.895752, (float)1.267212, (float)1.605591,
+   (float)0.805420, (float)0.962891, (float)1.142334,
+   (float)0.795654, (float)1.005493, (float)1.468506,
+   (float)1.105347, (float)1.313843, (float)1.584839,
+   (float)0.792236, (float)1.221802, (float)1.465698,
+   (float)1.170532, (float)1.467651, (float)1.664063,
+   (float)0.838257, (float)1.153198, (float)1.342163,
+   (float)0.968018, (float)1.198242, (float)1.391235,
+   (float)1.250122, (float)1.623535, (float)1.823608,
+   (float)0.711670, (float)1.058350, (float)1.512085,
+   (float)1.204834, (float)1.454468, (float)1.739136,
+   (float)1.137451, (float)1.421753, (float)1.620117,
+   (float)0.820435, (float)1.322754, (float)1.578247,
+   (float)0.798706, (float)1.005005, (float)1.213867,
+   (float)0.980713, (float)1.324951, (float)1.512939,
+   (float)1.112305, (float)1.438843, (float)1.735596,
+   (float)1.135498, (float)1.356689, (float)1.635742,
+   (float)1.101318, (float)1.387451, (float)1.686523,
+   (float)0.849854, (float)1.276978, (float)1.523438,
+   (float)1.377930, (float)1.627563, (float)1.858154,
+   (float)0.884888, (float)1.095459, (float)1.287476,
+   (float)1.289795, (float)1.505859, (float)1.756592,
+   (float)0.817505, (float)1.384155, (float)1.650513,
+   (float)1.446655, (float)1.702148, (float)1.931885,
+   (float)0.835815, (float)1.023071, (float)1.385376,
+   (float)0.916626, (float)1.139038, (float)1.335327,
+   (float)0.980103, (float)1.174072, (float)1.453735,
+   (float)1.705688, (float)2.153809, (float)2.398315, (float)2.743408,
+   (float)1.797119, (float)2.016846, (float)2.445679, (float)2.701904,
+   (float)1.990356, (float)2.219116, (float)2.576416, (float)2.813477,
+
+
+
+
+
+   (float)1.849365, (float)2.190918, (float)2.611572, (float)2.835083,
+   (float)1.657959, (float)1.854370, (float)2.159058, (float)2.726196,
+   (float)1.437744, (float)1.897705, (float)2.253174, (float)2.655396,
+   (float)2.028687, (float)2.247314, (float)2.542358, (float)2.875854,
+   (float)1.736938, (float)1.922119, (float)2.185913, (float)2.743408,
+   (float)1.521606, (float)1.870972, (float)2.526855, (float)2.786987,
+   (float)1.841431, (float)2.050659, (float)2.463623, (float)2.857666,
+   (float)1.590088, (float)2.067261, (float)2.427979, (float)2.794434,
+   (float)1.746826, (float)2.057373, (float)2.320190, (float)2.800781,
+   (float)1.734619, (float)1.940552, (float)2.306030, (float)2.826416,
+   (float)1.786255, (float)2.204468, (float)2.457520, (float)2.795288,
+   (float)1.861084, (float)2.170532, (float)2.414551, (float)2.763672,
+   (float)2.001465, (float)2.307617, (float)2.552734, (float)2.811890,
+   (float)1.784424, (float)2.124146, (float)2.381592, (float)2.645508,
+   (float)1.888794, (float)2.135864, (float)2.418579, (float)2.861206,
+   (float)2.301147, (float)2.531250, (float)2.724976, (float)2.913086,
+   (float)1.837769, (float)2.051270, (float)2.261963, (float)2.553223,
+   (float)2.012939, (float)2.221191, (float)2.440186, (float)2.678101,
+   (float)1.429565, (float)1.858276, (float)2.582275, (float)2.845703,
+   (float)1.622803, (float)1.897705, (float)2.367310, (float)2.621094,
+   (float)1.581543, (float)1.960449, (float)2.515869, (float)2.736450,
+   (float)1.419434, (float)1.933960, (float)2.394653, (float)2.746704,
+   (float)1.721924, (float)2.059570, (float)2.421753, (float)2.769653,
+   (float)1.911011, (float)2.220703, (float)2.461060, (float)2.740723,
+   (float)1.581177, (float)1.860840, (float)2.516968, (float)2.874634,
+   (float)1.870361, (float)2.098755, (float)2.432373, (float)2.656494,
+   (float)2.059692, (float)2.279785, (float)2.495605, (float)2.729370,
+   (float)1.815674, (float)2.181519, (float)2.451538, (float)2.680542,
+   (float)1.407959, (float)1.768311, (float)2.343018, (float)2.668091,
+   (float)2.168701, (float)2.394653, (float)2.604736, (float)2.829346,
+   (float)1.636230, (float)1.865723, (float)2.329102, (float)2.824219,
+   (float)1.878906, (float)2.139526, (float)2.376709, (float)2.679810,
+   (float)1.765381, (float)1.971802, (float)2.195435, (float)2.586914,
+   (float)2.164795, (float)2.410889, (float)2.673706, (float)2.903198,
+   (float)2.071899, (float)2.331055, (float)2.645874, (float)2.907104,
+   (float)2.026001, (float)2.311523, (float)2.594849, (float)2.863892,
+   (float)1.948975, (float)2.180786, (float)2.514893, (float)2.797852,
+   (float)1.881836, (float)2.130859, (float)2.478149, (float)2.804199,
+   (float)2.238159, (float)2.452759, (float)2.652832, (float)2.868286,
+   (float)1.897949, (float)2.101685, (float)2.524292, (float)2.880127,
+   (float)1.856445, (float)2.074585, (float)2.541016, (float)2.791748,
+   (float)1.695557, (float)2.199097, (float)2.506226, (float)2.742676,
+   (float)1.612671, (float)1.877075, (float)2.435425, (float)2.732910,
+   (float)1.568848, (float)1.786499, (float)2.194580, (float)2.768555,
+   (float)1.953369, (float)2.164551, (float)2.486938, (float)2.874023,
+   (float)1.388306, (float)1.725342, (float)2.384521, (float)2.771851,
+   (float)2.115356, (float)2.337769, (float)2.592896, (float)2.864014,
+   (float)1.905762, (float)2.111328, (float)2.363525, (float)2.789307,
+
+
+
+
+
+   (float)1.882568, (float)2.332031, (float)2.598267, (float)2.827637,
+   (float)1.683594, (float)2.088745, (float)2.361938, (float)2.608643,
+   (float)1.874023, (float)2.182129, (float)2.536133, (float)2.766968,
+   (float)1.861938, (float)2.070435, (float)2.309692, (float)2.700562,
+   (float)1.722168, (float)2.107422, (float)2.477295, (float)2.837646,
+   (float)1.926880, (float)2.184692, (float)2.442627, (float)2.663818,
+   (float)2.123901, (float)2.337280, (float)2.553101, (float)2.777466,
+   (float)1.588135, (float)1.911499, (float)2.212769, (float)2.543945,
+   (float)2.053955, (float)2.370850, (float)2.712158, (float)2.939941,
+   (float)2.210449, (float)2.519653, (float)2.770386, (float)2.958618,
+   (float)2.199463, (float)2.474731, (float)2.718262, (float)2.919922,
+   (float)1.960083, (float)2.175415, (float)2.608032, (float)2.888794,
+   (float)1.953735, (float)2.185181, (float)2.428223, (float)2.809570,
+   (float)1.615234, (float)2.036499, (float)2.576538, (float)2.834595,
+   (float)1.621094, (float)2.028198, (float)2.431030, (float)2.664673,
+   (float)1.824951, (float)2.267456, (float)2.514526, (float)2.747925,
+   (float)1.994263, (float)2.229126, (float)2.475220, (float)2.833984,
+   (float)1.746338, (float)2.011353, (float)2.588257, (float)2.826904,
+   (float)1.562866, (float)2.135986, (float)2.471680, (float)2.687256,
+   (float)1.748901, (float)2.083496, (float)2.460938, (float)2.686279,
+   (float)1.758057, (float)2.131470, (float)2.636597, (float)2.891602,
+   (float)2.071289, (float)2.299072, (float)2.550781, (float)2.814331,
+   (float)1.839600, (float)2.094360, (float)2.496460, (float)2.723999,
+   (float)1.882202, (float)2.088257, (float)2.636841, (float)2.923096,
+   (float)1.957886, (float)2.153198, (float)2.384399, (float)2.615234,
+   (float)1.992920, (float)2.351196, (float)2.654419, (float)2.889771,
+   (float)2.012817, (float)2.262451, (float)2.643799, (float)2.903076,
+   (float)2.025635, (float)2.254761, (float)2.508423, (float)2.784058,
+   (float)2.316040, (float)2.589355, (float)2.794189, (float)2.963623,
+   (float)1.741211, (float)2.279541, (float)2.578491, (float)2.816284,
+   (float)1.845337, (float)2.055786, (float)2.348511, (float)2.822021,
+   (float)1.679932, (float)1.926514, (float)2.499756, (float)2.835693,
+   (float)1.722534, (float)1.946899, (float)2.448486, (float)2.728760,
+   (float)1.829834, (float)2.043213, (float)2.580444, (float)2.867676,
+   (float)1.676636, (float)2.071655, (float)2.322510, (float)2.704834,
+   (float)1.791504, (float)2.113525, (float)2.469727, (float)2.784058,
+   (float)1.977051, (float)2.215088, (float)2.497437, (float)2.726929,
+   (float)1.800171, (float)2.106689, (float)2.357788, (float)2.738892,
+   (float)1.827759, (float)2.170166, (float)2.525879, (float)2.852417,
+   (float)1.918335, (float)2.132813, (float)2.488403, (float)2.728149,
+   (float)1.916748, (float)2.225098, (float)2.542603, (float)2.857666,
+   (float)1.761230, (float)1.976074, (float)2.507446, (float)2.884521,
+   (float)2.053711, (float)2.367432, (float)2.608032, (float)2.837646,
+   (float)1.595337, (float)2.000977, (float)2.307129, (float)2.578247,
+   (float)1.470581, (float)2.031250, (float)2.375854, (float)2.647583,
+   (float)1.801392, (float)2.128052, (float)2.399780, (float)2.822876,
+   (float)1.853638, (float)2.066650, (float)2.429199, (float)2.751465,
+   (float)1.956299, (float)2.163696, (float)2.394775, (float)2.734253,
+
+
+
+
+
+   (float)1.963623, (float)2.275757, (float)2.585327, (float)2.865234,
+   (float)1.887451, (float)2.105469, (float)2.331787, (float)2.587402,
+   (float)2.120117, (float)2.443359, (float)2.733887, (float)2.941406,
+   (float)1.506348, (float)1.766968, (float)2.400513, (float)2.851807,
+   (float)1.664551, (float)1.981079, (float)2.375732, (float)2.774414,
+   (float)1.720703, (float)1.978882, (float)2.391479, (float)2.640991,
+   (float)1.483398, (float)1.814819, (float)2.434448, (float)2.722290,
+   (float)1.769043, (float)2.136597, (float)2.563721, (float)2.774414,
+   (float)1.810791, (float)2.049316, (float)2.373901, (float)2.613647,
+   (float)1.788330, (float)2.005981, (float)2.359131, (float)2.723145,
+   (float)1.785156, (float)1.993164, (float)2.399780, (float)2.832520,
+   (float)1.695313, (float)2.022949, (float)2.522583, (float)2.745117,
+   (float)1.584106, (float)1.965576, (float)2.299927, (float)2.715576,
+   (float)1.894897, (float)2.249878, (float)2.655884, (float)2.897705,
+   (float)1.720581, (float)1.995728, (float)2.299438, (float)2.557007,
+   (float)1.619385, (float)2.173950, (float)2.574219, (float)2.787964,
+   (float)1.883179, (float)2.220459, (float)2.474365, (float)2.825073,
+   (float)1.447632, (float)2.045044, (float)2.555542, (float)2.744873,
+   (float)1.502686, (float)2.156616, (float)2.653320, (float)2.846558,
+   (float)1.711548, (float)1.944092, (float)2.282959, (float)2.685791,
+   (float)1.499756, (float)1.867554, (float)2.341064, (float)2.578857,
+   (float)1.916870, (float)2.135132, (float)2.568237, (float)2.826050,
+   (float)1.498047, (float)1.711182, (float)2.223267, (float)2.755127,
+   (float)1.808716, (float)1.997559, (float)2.256470, (float)2.758545,
+   (float)2.088501, (float)2.402710, (float)2.667358, (float)2.890259,
+   (float)1.545044, (float)1.819214, (float)2.324097, (float)2.692993,
+   (float)1.796021, (float)2.012573, (float)2.505737, (float)2.784912,
+   (float)1.786499, (float)2.041748, (float)2.290405, (float)2.650757,
+   (float)1.938232, (float)2.264404, (float)2.529053, (float)2.796143
+   };
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/constants.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/constants.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/constants.h	(revision 1163)
@@ -0,0 +1,80 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       constants.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_CONSTANTS_H
+   #define __iLBC_CONSTANTS_H
+
+   #include "iLBC_define.h"
+
+
+   /* ULP bit allocation */
+
+
+
+
+
+
+   extern const iLBC_ULP_Inst_t ULP_20msTbl;
+   extern const iLBC_ULP_Inst_t ULP_30msTbl;
+
+   /* high pass filters */
+
+   extern float hpi_zero_coefsTbl[];
+   extern float hpi_pole_coefsTbl[];
+   extern float hpo_zero_coefsTbl[];
+   extern float hpo_pole_coefsTbl[];
+
+   /* low pass filters */
+   extern float lpFilt_coefsTbl[];
+
+   /* LPC analysis and quantization */
+
+   extern float lpc_winTbl[];
+   extern float lpc_asymwinTbl[];
+   extern float lpc_lagwinTbl[];
+   extern float lsfCbTbl[];
+   extern float lsfmeanTbl[];
+   extern int   dim_lsfCbTbl[];
+   extern int   size_lsfCbTbl[];
+   extern float lsf_weightTbl_30ms[];
+   extern float lsf_weightTbl_20ms[];
+
+   /* state quantization tables */
+
+   extern float state_sq3Tbl[];
+   extern float state_frgqTbl[];
+
+   /* gain quantization tables */
+
+   extern float gain_sq3Tbl[];
+   extern float gain_sq4Tbl[];
+   extern float gain_sq5Tbl[];
+
+   /* adaptive codebook definitions */
+
+   extern int search_rangeTbl[5][CB_NSTAGES];
+   extern int memLfTbl[];
+   extern int stMemLTbl;
+   extern float cbfiltersTbl[CB_FILTERLEN];
+
+   /* enhancer definitions */
+
+   extern float polyphaserTbl[];
+   extern float enh_plocsTbl[];
+
+
+
+
+
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/createCB.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/createCB.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/createCB.c	(revision 1163)
@@ -0,0 +1,231 @@
+
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       createCB.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+
+
+
+
+   #include "iLBC_define.h"
+   #include "constants.h"
+   #include <string.h>
+   #include <math.h>
+
+   /*----------------------------------------------------------------*
+    *  Construct an additional codebook vector by filtering the
+    *  initial codebook buffer. This vector is then used to expand
+    *  the codebook with an additional section.
+    *---------------------------------------------------------------*/
+
+   void filteredCBvecs(
+       float *cbvectors,   /* (o) Codebook vectors for the
+                                  higher section */
+       float *mem,         /* (i) Buffer to create codebook
+                                  vector from */
+       int lMem        /* (i) Length of buffer */
+   ){
+       int j, k;
+       float *pp, *pp1;
+       float tempbuff2[CB_MEML+CB_FILTERLEN];
+       float *pos;
+
+       memset(tempbuff2, 0, (CB_HALFFILTERLEN-1)*sizeof(float));
+       memcpy(&tempbuff2[CB_HALFFILTERLEN-1], mem, lMem*sizeof(float));
+       memset(&tempbuff2[lMem+CB_HALFFILTERLEN-1], 0,
+           (CB_HALFFILTERLEN+1)*sizeof(float));
+
+       /* Create codebook vector for higher section by filtering */
+
+       /* do filtering */
+       pos=cbvectors;
+       memset(pos, 0, lMem*sizeof(float));
+       for (k=0; k<lMem; k++) {
+           pp=&tempbuff2[k];
+           pp1=&cbfiltersTbl[CB_FILTERLEN-1];
+           for (j=0;j<CB_FILTERLEN;j++) {
+               (*pos)+=(*pp++)*(*pp1--);
+           }
+           pos++;
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  Search the augmented part of the codebook to find the best
+    *  measure.
+    *----------------------------------------------------------------*/
+
+
+
+
+
+
+   void searchAugmentedCB(
+       int low,        /* (i) Start index for the search */
+       int high,           /* (i) End index for the search */
+       int stage,          /* (i) Current stage */
+       int startIndex,     /* (i) Codebook index for the first
+                                  aug vector */
+       float *target,      /* (i) Target vector for encoding */
+       float *buffer,      /* (i) Pointer to the end of the buffer for
+                                  augmented codebook construction */
+       float *max_measure, /* (i/o) Currently maximum measure */
+       int *best_index,/* (o) Currently the best index */
+       float *gain,    /* (o) Currently the best gain */
+       float *energy,      /* (o) Energy of augmented codebook
+                                  vectors */
+       float *invenergy/* (o) Inv energy of augmented codebook
+                                  vectors */
+   ) {
+       int icount, ilow, j, tmpIndex;
+       float *pp, *ppo, *ppi, *ppe, crossDot, alfa;
+       float weighted, measure, nrjRecursive;
+       float ftmp;
+
+       /* Compute the energy for the first (low-5)
+          noninterpolated samples */
+       nrjRecursive = (float) 0.0;
+       pp = buffer - low + 1;
+       for (j=0; j<(low-5); j++) {
+           nrjRecursive += ( (*pp)*(*pp) );
+           pp++;
+       }
+       ppe = buffer - low;
+
+
+       for (icount=low; icount<=high; icount++) {
+
+           /* Index of the codebook vector used for retrieving
+              energy values */
+           tmpIndex = startIndex+icount-20;
+
+           ilow = icount-4;
+
+           /* Update the energy recursively to save complexity */
+           nrjRecursive = nrjRecursive + (*ppe)*(*ppe);
+           ppe--;
+           energy[tmpIndex] = nrjRecursive;
+
+           /* Compute cross dot product for the first (low-5)
+              samples */
+
+
+
+
+
+           crossDot = (float) 0.0;
+           pp = buffer-icount;
+           for (j=0; j<ilow; j++) {
+               crossDot += target[j]*(*pp++);
+           }
+
+           /* interpolation */
+           alfa = (float) 0.2;
+           ppo = buffer-4;
+           ppi = buffer-icount-4;
+           for (j=ilow; j<icount; j++) {
+               weighted = ((float)1.0-alfa)*(*ppo)+alfa*(*ppi);
+               ppo++;
+               ppi++;
+               energy[tmpIndex] += weighted*weighted;
+               crossDot += target[j]*weighted;
+               alfa += (float)0.2;
+           }
+
+           /* Compute energy and cross dot product for the
+              remaining samples */
+           pp = buffer - icount;
+           for (j=icount; j<SUBL; j++) {
+               energy[tmpIndex] += (*pp)*(*pp);
+               crossDot += target[j]*(*pp++);
+           }
+
+           if (energy[tmpIndex]>0.0) {
+               invenergy[tmpIndex]=(float)1.0/(energy[tmpIndex]+EPS);
+           } else {
+               invenergy[tmpIndex] = (float) 0.0;
+           }
+
+           if (stage==0) {
+               measure = (float)-10000000.0;
+
+               if (crossDot > 0.0) {
+                   measure = crossDot*crossDot*invenergy[tmpIndex];
+               }
+           }
+           else {
+               measure = crossDot*crossDot*invenergy[tmpIndex];
+           }
+
+           /* check if measure is better */
+           ftmp = crossDot*invenergy[tmpIndex];
+
+           if ((measure>*max_measure) && (fabs(ftmp)<CB_MAXGAIN)) {
+
+
+
+
+
+               *best_index = tmpIndex;
+               *max_measure = measure;
+               *gain = ftmp;
+           }
+       }
+   }
+
+
+   /*----------------------------------------------------------------*
+    *  Recreate a specific codebook vector from the augmented part.
+    *
+    *----------------------------------------------------------------*/
+
+   void createAugmentedVec(
+       int index,      /* (i) Index for the augmented vector
+                              to be created */
+       float *buffer,  /* (i) Pointer to the end of the buffer for
+                              augmented codebook construction */
+       float *cbVec/* (o) The construced codebook vector */
+   ) {
+       int ilow, j;
+       float *pp, *ppo, *ppi, alfa, alfa1, weighted;
+
+       ilow = index-5;
+
+       /* copy the first noninterpolated part */
+
+       pp = buffer-index;
+       memcpy(cbVec,pp,sizeof(float)*index);
+
+       /* interpolation */
+
+       alfa1 = (float)0.2;
+       alfa = 0.0;
+       ppo = buffer-5;
+       ppi = buffer-index-5;
+       for (j=ilow; j<index; j++) {
+           weighted = ((float)1.0-alfa)*(*ppo)+alfa*(*ppi);
+           ppo++;
+           ppi++;
+           cbVec[j] = weighted;
+           alfa += alfa1;
+       }
+
+       /* copy the second noninterpolated part */
+
+       pp = buffer - index;
+       memcpy(cbVec+index,pp,sizeof(float)*(SUBL-index));
+
+
+
+
+
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/createCB.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/createCB.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/createCB.h	(revision 1163)
@@ -0,0 +1,58 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       createCB.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_CREATECB_H
+   #define __iLBC_CREATECB_H
+
+   void filteredCBvecs(
+       float *cbvectors,   /* (o) Codebook vector for the
+                                  higher section */
+
+
+
+
+
+       float *mem,         /* (i) Buffer to create codebook
+                                  vectors from */
+       int lMem        /* (i) Length of buffer */
+   );
+
+   void searchAugmentedCB(
+       int low,        /* (i) Start index for the search */
+       int high,           /* (i) End index for the search */
+       int stage,          /* (i) Current stage */
+       int startIndex,     /* (i) CB index for the first
+                                  augmented vector */
+       float *target,      /* (i) Target vector for encoding */
+       float *buffer,      /* (i) Pointer to the end of the
+                                  buffer for augmented codebook
+                                  construction */
+       float *max_measure, /* (i/o) Currently maximum measure */
+       int *best_index,/* (o) Currently the best index */
+       float *gain,    /* (o) Currently the best gain */
+       float *energy,      /* (o) Energy of augmented
+                                  codebook vectors */
+       float *invenergy/* (o) Inv energy of aug codebook
+                                  vectors */
+   );
+
+   void createAugmentedVec(
+       int index,          /* (i) Index for the aug vector
+                                  to be created */
+       float *buffer,      /* (i) Pointer to the end of the
+                                  buffer for augmented codebook
+                                  construction */
+       float *cbVec    /* (o) The construced codebook vector */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/doCPLC.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/doCPLC.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/doCPLC.c	(revision 1163)
@@ -0,0 +1,270 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       doCPLC.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <math.h>
+   #include <string.h>
+   #include <stdio.h>
+
+
+
+
+
+   #include "iLBC_define.h"
+
+   /*----------------------------------------------------------------*
+    *  Compute cross correlation and pitch gain for pitch prediction
+    *  of last subframe at given lag.
+    *---------------------------------------------------------------*/
+
+   void compCorr(
+       float *cc,      /* (o) cross correlation coefficient */
+       float *gc,      /* (o) gain */
+       float *pm,
+       float *buffer,  /* (i) signal buffer */
+       int lag,    /* (i) pitch lag */
+       int bLen,       /* (i) length of buffer */
+       int sRange      /* (i) correlation search length */
+   ){
+       int i;
+       float ftmp1, ftmp2, ftmp3;
+
+       /* Guard against getting outside buffer */
+       if ((bLen-sRange-lag)<0) {
+           sRange=bLen-lag;
+       }
+
+       ftmp1 = 0.0;
+       ftmp2 = 0.0;
+       ftmp3 = 0.0;
+       for (i=0; i<sRange; i++) {
+           ftmp1 += buffer[bLen-sRange+i] *
+               buffer[bLen-sRange+i-lag];
+           ftmp2 += buffer[bLen-sRange+i-lag] *
+                   buffer[bLen-sRange+i-lag];
+           ftmp3 += buffer[bLen-sRange+i] *
+                   buffer[bLen-sRange+i];
+       }
+
+       if (ftmp2 > 0.0) {
+           *cc = ftmp1*ftmp1/ftmp2;
+           *gc = (float)fabs(ftmp1/ftmp2);
+           *pm=(float)fabs(ftmp1)/
+               ((float)sqrt(ftmp2)*(float)sqrt(ftmp3));
+       }
+       else {
+           *cc = 0.0;
+           *gc = 0.0;
+           *pm=0.0;
+       }
+   }
+
+
+
+
+
+   /*----------------------------------------------------------------*
+    *  Packet loss concealment routine. Conceals a residual signal
+    *  and LP parameters. If no packet loss, update state.
+    *---------------------------------------------------------------*/
+
+   void doThePLC(
+       float *PLCresidual, /* (o) concealed residual */
+       float *PLClpc,      /* (o) concealed LP parameters */
+       int PLI,        /* (i) packet loss indicator
+                                  0 - no PL, 1 = PL */
+       float *decresidual, /* (i) decoded residual */
+       float *lpc,         /* (i) decoded LPC (only used for no PL) */
+       int inlag,          /* (i) pitch lag */
+       iLBC_Dec_Inst_t *iLBCdec_inst
+                           /* (i/o) decoder instance */
+   ){
+       int lag=20, randlag;
+       float gain, maxcc;
+       float use_gain;
+       float gain_comp, maxcc_comp, per, max_per=0;
+       int i, pick, use_lag;
+       float ftmp, randvec[BLOCKL_MAX], pitchfact, energy;
+
+       /* Packet Loss */
+
+       if (PLI == 1) {
+
+           iLBCdec_inst->consPLICount += 1;
+
+           /* if previous frame not lost,
+              determine pitch pred. gain */
+
+           if (iLBCdec_inst->prevPLI != 1) {
+
+               /* Search around the previous lag to find the
+                  best pitch period */
+
+               lag=inlag-3;
+               compCorr(&maxcc, &gain, &max_per,
+                   iLBCdec_inst->prevResidual,
+                   lag, iLBCdec_inst->blockl, 60);
+               for (i=inlag-2;i<=inlag+3;i++) {
+                   compCorr(&maxcc_comp, &gain_comp, &per,
+                       iLBCdec_inst->prevResidual,
+                       i, iLBCdec_inst->blockl, 60);
+
+                   if (maxcc_comp>maxcc) {
+                       maxcc=maxcc_comp;
+
+
+
+
+
+                       gain=gain_comp;
+                       lag=i;
+                       max_per=per;
+                   }
+               }
+
+           }
+
+           /* previous frame lost, use recorded lag and periodicity */
+
+           else {
+               lag=iLBCdec_inst->prevLag;
+               max_per=iLBCdec_inst->per;
+           }
+
+           /* downscaling */
+
+           use_gain=1.0;
+           if (iLBCdec_inst->consPLICount*iLBCdec_inst->blockl>320)
+               use_gain=(float)0.9;
+           else if (iLBCdec_inst->consPLICount*
+                           iLBCdec_inst->blockl>2*320)
+               use_gain=(float)0.7;
+           else if (iLBCdec_inst->consPLICount*
+                           iLBCdec_inst->blockl>3*320)
+               use_gain=(float)0.5;
+           else if (iLBCdec_inst->consPLICount*
+                           iLBCdec_inst->blockl>4*320)
+               use_gain=(float)0.0;
+
+           /* mix noise and pitch repeatition */
+           ftmp=(float)sqrt(max_per);
+           if (ftmp>(float)0.7)
+               pitchfact=(float)1.0;
+           else if (ftmp>(float)0.4)
+               pitchfact=(ftmp-(float)0.4)/((float)0.7-(float)0.4);
+           else
+               pitchfact=0.0;
+
+
+           /* avoid repetition of same pitch cycle */
+           use_lag=lag;
+           if (lag<80) {
+               use_lag=2*lag;
+           }
+
+           /* compute concealed residual */
+
+
+
+
+
+
+           energy = 0.0;
+           for (i=0; i<iLBCdec_inst->blockl; i++) {
+
+               /* noise component */
+
+               iLBCdec_inst->seed=(iLBCdec_inst->seed*69069L+1) &
+                   (0x80000000L-1);
+               randlag = 50 + ((signed long) iLBCdec_inst->seed)%70;
+               pick = i - randlag;
+
+               if (pick < 0) {
+                   randvec[i] =
+                       iLBCdec_inst->prevResidual[
+                                   iLBCdec_inst->blockl+pick];
+               } else {
+                   randvec[i] =  randvec[pick];
+               }
+
+               /* pitch repeatition component */
+               pick = i - use_lag;
+
+               if (pick < 0) {
+                   PLCresidual[i] =
+                       iLBCdec_inst->prevResidual[
+                                   iLBCdec_inst->blockl+pick];
+               } else {
+                   PLCresidual[i] = PLCresidual[pick];
+               }
+
+               /* mix random and periodicity component */
+
+               if (i<80)
+                   PLCresidual[i] = use_gain*(pitchfact *
+                               PLCresidual[i] +
+                               ((float)1.0 - pitchfact) * randvec[i]);
+               else if (i<160)
+                   PLCresidual[i] = (float)0.95*use_gain*(pitchfact *
+                               PLCresidual[i] +
+                               ((float)1.0 - pitchfact) * randvec[i]);
+               else
+                   PLCresidual[i] = (float)0.9*use_gain*(pitchfact *
+                               PLCresidual[i] +
+                               ((float)1.0 - pitchfact) * randvec[i]);
+
+               energy += PLCresidual[i] * PLCresidual[i];
+           }
+
+           /* less than 30 dB, use only noise */
+
+
+
+
+
+
+           if (sqrt(energy/(float)iLBCdec_inst->blockl) < 30.0) {
+               gain=0.0;
+               for (i=0; i<iLBCdec_inst->blockl; i++) {
+                   PLCresidual[i] = randvec[i];
+               }
+           }
+
+           /* use old LPC */
+
+           memcpy(PLClpc,iLBCdec_inst->prevLpc,
+               (LPC_FILTERORDER+1)*sizeof(float));
+
+       }
+
+       /* no packet loss, copy input */
+
+       else {
+           memcpy(PLCresidual, decresidual,
+               iLBCdec_inst->blockl*sizeof(float));
+           memcpy(PLClpc, lpc, (LPC_FILTERORDER+1)*sizeof(float));
+           iLBCdec_inst->consPLICount = 0;
+       }
+
+       /* update state */
+
+       if (PLI) {
+           iLBCdec_inst->prevLag = lag;
+           iLBCdec_inst->per=max_per;
+       }
+
+       iLBCdec_inst->prevPLI = PLI;
+       memcpy(iLBCdec_inst->prevLpc, PLClpc,
+           (LPC_FILTERORDER+1)*sizeof(float));
+       memcpy(iLBCdec_inst->prevResidual, PLCresidual,
+           iLBCdec_inst->blockl*sizeof(float));
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/doCPLC.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/doCPLC.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/doCPLC.h	(revision 1163)
@@ -0,0 +1,29 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       doCPLC.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_DOLPC_H
+   #define __iLBC_DOLPC_H
+
+   void doThePLC(
+       float *PLCresidual, /* (o) concealed residual */
+       float *PLClpc,      /* (o) concealed LP parameters */
+       int PLI,        /* (i) packet loss indicator
+                                  0 - no PL, 1 = PL */
+       float *decresidual, /* (i) decoded residual */
+       float *lpc,         /* (i) decoded LPC (only used for no PL) */
+       int inlag,          /* (i) pitch lag */
+       iLBC_Dec_Inst_t *iLBCdec_inst
+                           /* (i/o) decoder instance */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/enhancer.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/enhancer.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/enhancer.c	(revision 1163)
@@ -0,0 +1,701 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       enhancer.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <math.h>
+   #include <string.h>
+   #include "iLBC_define.h"
+   #include "constants.h"
+   #include "filter.h"
+
+   /*----------------------------------------------------------------*
+    * Find index in array such that the array element with said
+    * index is the element of said array closest to "value"
+    * according to the squared-error criterion
+    *---------------------------------------------------------------*/
+
+   void NearestNeighbor(
+
+
+
+
+
+       int   *index,   /* (o) index of array element closest
+                              to value */
+       float *array,   /* (i) data array */
+       float value,/* (i) value */
+       int arlength/* (i) dimension of data array */
+   ){
+       int i;
+       float bestcrit,crit;
+
+       crit=array[0]-value;
+       bestcrit=crit*crit;
+       *index=0;
+       for (i=1; i<arlength; i++) {
+           crit=array[i]-value;
+           crit=crit*crit;
+
+           if (crit<bestcrit) {
+               bestcrit=crit;
+               *index=i;
+           }
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    * compute cross correlation between sequences
+    *---------------------------------------------------------------*/
+
+   void mycorr1(
+       float* corr,    /* (o) correlation of seq1 and seq2 */
+       float* seq1,    /* (i) first sequence */
+       int dim1,           /* (i) dimension first seq1 */
+       const float *seq2,  /* (i) second sequence */
+       int dim2        /* (i) dimension seq2 */
+   ){
+       int i,j;
+
+       for (i=0; i<=dim1-dim2; i++) {
+           corr[i]=0.0;
+           for (j=0; j<dim2; j++) {
+               corr[i] += seq1[i+j] * seq2[j];
+           }
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    * upsample finite array assuming zeros outside bounds
+    *---------------------------------------------------------------*/
+
+
+
+
+
+
+   void enh_upsample(
+       float* useq1,   /* (o) upsampled output sequence */
+       float* seq1,/* (i) unupsampled sequence */
+       int dim1,       /* (i) dimension seq1 */
+       int hfl         /* (i) polyphase filter length=2*hfl+1 */
+   ){
+       float *pu,*ps;
+       int i,j,k,q,filterlength,hfl2;
+       const float *polyp[ENH_UPS0]; /* pointers to
+                                        polyphase columns */
+       const float *pp;
+
+       /* define pointers for filter */
+
+       filterlength=2*hfl+1;
+
+       if ( filterlength > dim1 ) {
+           hfl2=(int) (dim1/2);
+           for (j=0; j<ENH_UPS0; j++) {
+               polyp[j]=polyphaserTbl+j*filterlength+hfl-hfl2;
+           }
+           hfl=hfl2;
+           filterlength=2*hfl+1;
+       }
+       else {
+           for (j=0; j<ENH_UPS0; j++) {
+               polyp[j]=polyphaserTbl+j*filterlength;
+           }
+       }
+
+       /* filtering: filter overhangs left side of sequence */
+
+       pu=useq1;
+       for (i=hfl; i<filterlength; i++) {
+           for (j=0; j<ENH_UPS0; j++) {
+               *pu=0.0;
+               pp = polyp[j];
+               ps = seq1+i;
+               for (k=0; k<=i; k++) {
+                   *pu += *ps-- * *pp++;
+               }
+               pu++;
+           }
+       }
+
+       /* filtering: simple convolution=inner products */
+
+       for (i=filterlength; i<dim1; i++) {
+
+
+
+
+
+           for (j=0;j<ENH_UPS0; j++){
+               *pu=0.0;
+               pp = polyp[j];
+               ps = seq1+i;
+               for (k=0; k<filterlength; k++) {
+                   *pu += *ps-- * *pp++;
+               }
+               pu++;
+           }
+       }
+
+       /* filtering: filter overhangs right side of sequence */
+
+       for (q=1; q<=hfl; q++) {
+           for (j=0; j<ENH_UPS0; j++) {
+               *pu=0.0;
+               pp = polyp[j]+q;
+               ps = seq1+dim1-1;
+               for (k=0; k<filterlength-q; k++) {
+                   *pu += *ps-- * *pp++;
+               }
+               pu++;
+           }
+       }
+   }
+
+
+   /*----------------------------------------------------------------*
+    * find segment starting near idata+estSegPos that has highest
+    * correlation with idata+centerStartPos through
+    * idata+centerStartPos+ENH_BLOCKL-1 segment is found at a
+    * resolution of ENH_UPSO times the original of the original
+    * sampling rate
+    *---------------------------------------------------------------*/
+
+   void refiner(
+       float *seg,         /* (o) segment array */
+       float *updStartPos, /* (o) updated start point */
+       float* idata,       /* (i) original data buffer */
+       int idatal,         /* (i) dimension of idata */
+       int centerStartPos, /* (i) beginning center segment */
+       float estSegPos,/* (i) estimated beginning other segment */
+       float period    /* (i) estimated pitch period */
+   ){
+       int estSegPosRounded,searchSegStartPos,searchSegEndPos,corrdim;
+       int tloc,tloc2,i,st,en,fraction;
+       float vect[ENH_VECTL],corrVec[ENH_CORRDIM],maxv;
+       float corrVecUps[ENH_CORRDIM*ENH_UPS0];
+
+       (void)period;
+
+
+
+       /* defining array bounds */
+
+       estSegPosRounded=(int)(estSegPos - 0.5);
+
+       searchSegStartPos=estSegPosRounded-ENH_SLOP;
+
+       if (searchSegStartPos<0) {
+           searchSegStartPos=0;
+       }
+       searchSegEndPos=estSegPosRounded+ENH_SLOP;
+
+       if (searchSegEndPos+ENH_BLOCKL >= idatal) {
+           searchSegEndPos=idatal-ENH_BLOCKL-1;
+       }
+       corrdim=searchSegEndPos-searchSegStartPos+1;
+
+       /* compute upsampled correlation (corr33) and find
+          location of max */
+
+       mycorr1(corrVec,idata+searchSegStartPos,
+           corrdim+ENH_BLOCKL-1,idata+centerStartPos,ENH_BLOCKL);
+       enh_upsample(corrVecUps,corrVec,corrdim,ENH_FL0);
+       tloc=0; maxv=corrVecUps[0];
+       for (i=1; i<ENH_UPS0*corrdim; i++) {
+
+           if (corrVecUps[i]>maxv) {
+               tloc=i;
+               maxv=corrVecUps[i];
+           }
+       }
+
+       /* make vector can be upsampled without ever running outside
+          bounds */
+
+       *updStartPos= (float)searchSegStartPos +
+           (float)tloc/(float)ENH_UPS0+(float)1.0;
+       tloc2=(int)(tloc/ENH_UPS0);
+
+       if (tloc>tloc2*ENH_UPS0) {
+           tloc2++;
+       }
+       st=searchSegStartPos+tloc2-ENH_FL0;
+
+       if (st<0) {
+           memset(vect,0,-st*sizeof(float));
+           memcpy(&vect[-st],idata, (ENH_VECTL+st)*sizeof(float));
+       }
+       else {
+
+
+
+
+
+           en=st+ENH_VECTL;
+
+           if (en>idatal) {
+               memcpy(vect, &idata[st],
+                   (ENH_VECTL-(en-idatal))*sizeof(float));
+               memset(&vect[ENH_VECTL-(en-idatal)], 0,
+                   (en-idatal)*sizeof(float));
+           }
+           else {
+               memcpy(vect, &idata[st], ENH_VECTL*sizeof(float));
+           }
+       }
+       fraction=tloc2*ENH_UPS0-tloc;
+
+       /* compute the segment (this is actually a convolution) */
+
+       mycorr1(seg,vect,ENH_VECTL,polyphaserTbl+(2*ENH_FL0+1)*fraction,
+           2*ENH_FL0+1);
+   }
+
+   /*----------------------------------------------------------------*
+    * find the smoothed output data
+    *---------------------------------------------------------------*/
+
+   void smath(
+       float *odata,   /* (o) smoothed output */
+       float *sseq,/* (i) said second sequence of waveforms */
+       int hl,         /* (i) 2*hl+1 is sseq dimension */
+       float alpha0/* (i) max smoothing energy fraction */
+   ){
+       int i,k;
+       float w00,w10,w11,A,B,C,*psseq,err,errs;
+       float surround[BLOCKL_MAX]; /* shape contributed by other than
+                                      current */
+       float wt[2*ENH_HL+1];       /* waveform weighting to get
+                                      surround shape */
+       float denom;
+
+       /* create shape of contribution from all waveforms except the
+          current one */
+
+       for (i=1; i<=2*hl+1; i++) {
+           wt[i-1] = (float)0.5*(1 - (float)cos(2*PI*i/(2*hl+2)));
+       }
+       wt[hl]=0.0; /* for clarity, not used */
+       for (i=0; i<ENH_BLOCKL; i++) {
+           surround[i]=sseq[i]*wt[0];
+       }
+
+
+
+
+
+       for (k=1; k<hl; k++) {
+           psseq=sseq+k*ENH_BLOCKL;
+           for(i=0;i<ENH_BLOCKL; i++) {
+               surround[i]+=psseq[i]*wt[k];
+           }
+       }
+       for (k=hl+1; k<=2*hl; k++) {
+           psseq=sseq+k*ENH_BLOCKL;
+           for(i=0;i<ENH_BLOCKL; i++) {
+               surround[i]+=psseq[i]*wt[k];
+           }
+       }
+
+       /* compute some inner products */
+
+       w00 = w10 = w11 = 0.0;
+       psseq=sseq+hl*ENH_BLOCKL; /* current block  */
+       for (i=0; i<ENH_BLOCKL;i++) {
+           w00+=psseq[i]*psseq[i];
+           w11+=surround[i]*surround[i];
+           w10+=surround[i]*psseq[i];
+       }
+
+       if (fabs(w11) < 1.0) {
+           w11=1.0;
+       }
+       C = (float)sqrt( w00/w11);
+
+       /* first try enhancement without power-constraint */
+
+       errs=0.0;
+       psseq=sseq+hl*ENH_BLOCKL;
+       for (i=0; i<ENH_BLOCKL; i++) {
+           odata[i]=C*surround[i];
+           err=psseq[i]-odata[i];
+           errs+=err*err;
+       }
+
+       /* if constraint violated by first try, add constraint */
+
+       if (errs > alpha0 * w00) {
+           if ( w00 < 1) {
+               w00=1;
+           }
+           denom = (w11*w00-w10*w10)/(w00*w00);
+
+           if (denom > 0.0001) { /* eliminates numerical problems
+                                    for if smooth */
+
+
+
+
+
+               A = (float)sqrt( (alpha0- alpha0*alpha0/4)/denom);
+               B = -alpha0/2 - A * w10/w00;
+               B = B+1;
+           }
+           else { /* essentially no difference between cycles;
+                     smoothing not needed */
+               A= 0.0;
+               B= 1.0;
+           }
+
+           /* create smoothed sequence */
+
+           psseq=sseq+hl*ENH_BLOCKL;
+           for (i=0; i<ENH_BLOCKL; i++) {
+               odata[i]=A*surround[i]+B*psseq[i];
+           }
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    * get the pitch-synchronous sample sequence
+    *---------------------------------------------------------------*/
+
+   void getsseq(
+       float *sseq,    /* (o) the pitch-synchronous sequence */
+       float *idata,       /* (i) original data */
+       int idatal,         /* (i) dimension of data */
+       int centerStartPos, /* (i) where current block starts */
+       float *period,      /* (i) rough-pitch-period array */
+       float *plocs,       /* (i) where periods of period array
+                                  are taken */
+       int periodl,    /* (i) dimension period array */
+       int hl              /* (i) 2*hl+1 is the number of sequences */
+   ){
+       int i,centerEndPos,q;
+       float blockStartPos[2*ENH_HL+1];
+       int lagBlock[2*ENH_HL+1];
+       float plocs2[ENH_PLOCSL];
+       float *psseq;
+
+       centerEndPos=centerStartPos+ENH_BLOCKL-1;
+
+       /* present */
+
+       NearestNeighbor(lagBlock+hl,plocs,
+           (float)0.5*(centerStartPos+centerEndPos),periodl);
+
+       blockStartPos[hl]=(float)centerStartPos;
+
+
+
+
+
+       psseq=sseq+ENH_BLOCKL*hl;
+       memcpy(psseq, idata+centerStartPos, ENH_BLOCKL*sizeof(float));
+
+       /* past */
+
+       for (q=hl-1; q>=0; q--) {
+           blockStartPos[q]=blockStartPos[q+1]-period[lagBlock[q+1]];
+           NearestNeighbor(lagBlock+q,plocs,
+               blockStartPos[q]+
+               ENH_BLOCKL_HALF-period[lagBlock[q+1]], periodl);
+
+
+           if (blockStartPos[q]-ENH_OVERHANG>=0) {
+               refiner(sseq+q*ENH_BLOCKL, blockStartPos+q, idata,
+                   idatal, centerStartPos, blockStartPos[q],
+                   period[lagBlock[q+1]]);
+           } else {
+               psseq=sseq+q*ENH_BLOCKL;
+               memset(psseq, 0, ENH_BLOCKL*sizeof(float));
+           }
+       }
+
+       /* future */
+
+       for (i=0; i<periodl; i++) {
+           plocs2[i]=plocs[i]-period[i];
+       }
+       for (q=hl+1; q<=2*hl; q++) {
+           NearestNeighbor(lagBlock+q,plocs2,
+               blockStartPos[q-1]+ENH_BLOCKL_HALF,periodl);
+
+           blockStartPos[q]=blockStartPos[q-1]+period[lagBlock[q]];
+           if (blockStartPos[q]+ENH_BLOCKL+ENH_OVERHANG<idatal) {
+               refiner(sseq+ENH_BLOCKL*q, blockStartPos+q, idata,
+                   idatal, centerStartPos, blockStartPos[q],
+                   period[lagBlock[q]]);
+           }
+           else {
+               psseq=sseq+q*ENH_BLOCKL;
+               memset(psseq, 0, ENH_BLOCKL*sizeof(float));
+           }
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    * perform enhancement on idata+centerStartPos through
+    * idata+centerStartPos+ENH_BLOCKL-1
+    *---------------------------------------------------------------*/
+
+
+
+
+
+   void enhancer(
+       float *odata,       /* (o) smoothed block, dimension blockl */
+       float *idata,       /* (i) data buffer used for enhancing */
+       int idatal,         /* (i) dimension idata */
+       int centerStartPos, /* (i) first sample current block
+                                  within idata */
+       float alpha0,       /* (i) max correction-energy-fraction
+                                 (in [0,1]) */
+       float *period,      /* (i) pitch period array */
+       float *plocs,       /* (i) locations where period array
+                                  values valid */
+       int periodl         /* (i) dimension of period and plocs */
+   ){
+       float sseq[(2*ENH_HL+1)*ENH_BLOCKL];
+
+       /* get said second sequence of segments */
+
+       getsseq(sseq,idata,idatal,centerStartPos,period,
+           plocs,periodl,ENH_HL);
+
+       /* compute the smoothed output from said second sequence */
+
+       smath(odata,sseq,ENH_HL,alpha0);
+
+   }
+
+   /*----------------------------------------------------------------*
+    * cross correlation
+    *---------------------------------------------------------------*/
+
+   float xCorrCoef(
+       float *target,      /* (i) first array */
+       float *regressor,   /* (i) second array */
+       int subl        /* (i) dimension arrays */
+   ){
+       int i;
+       float ftmp1, ftmp2;
+
+       ftmp1 = 0.0;
+       ftmp2 = 0.0;
+       for (i=0; i<subl; i++) {
+           ftmp1 += target[i]*regressor[i];
+           ftmp2 += regressor[i]*regressor[i];
+       }
+
+       if (ftmp1 > 0.0) {
+           return (float)(ftmp1*ftmp1/ftmp2);
+       }
+
+
+
+
+
+       else {
+           return (float)0.0;
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    * interface for enhancer
+    *---------------------------------------------------------------*/
+
+   int enhancerInterface(
+       float *out,                     /* (o) enhanced signal */
+       float *in,                      /* (i) unenhanced signal */
+       iLBC_Dec_Inst_t *iLBCdec_inst   /* (i) buffers etc */
+   ){
+       float *enh_buf, *enh_period;
+       int iblock, isample;
+       int lag=0, ilag, i, ioffset;
+       float cc, maxcc;
+       float ftmp1, ftmp2;
+       float *inPtr, *enh_bufPtr1, *enh_bufPtr2;
+       float plc_pred[ENH_BLOCKL];
+
+       float lpState[6], downsampled[(ENH_NBLOCKS*ENH_BLOCKL+120)/2];
+       int inLen=ENH_NBLOCKS*ENH_BLOCKL+120;
+       int start, plc_blockl, inlag;
+
+       enh_buf=iLBCdec_inst->enh_buf;
+       enh_period=iLBCdec_inst->enh_period;
+
+       memmove(enh_buf, &enh_buf[iLBCdec_inst->blockl],
+           (ENH_BUFL-iLBCdec_inst->blockl)*sizeof(float));
+
+       memcpy(&enh_buf[ENH_BUFL-iLBCdec_inst->blockl], in,
+           iLBCdec_inst->blockl*sizeof(float));
+
+       if (iLBCdec_inst->mode==30)
+           plc_blockl=ENH_BLOCKL;
+       else
+           plc_blockl=40;
+
+       /* when 20 ms frame, move processing one block */
+       ioffset=0;
+       if (iLBCdec_inst->mode==20) ioffset=1;
+
+       i=3-ioffset;
+       memmove(enh_period, &enh_period[i],
+           (ENH_NBLOCKS_TOT-i)*sizeof(float));
+
+
+
+
+
+
+       /* Set state information to the 6 samples right before
+          the samples to be downsampled. */
+
+       memcpy(lpState,
+           enh_buf+(ENH_NBLOCKS_EXTRA+ioffset)*ENH_BLOCKL-126,
+           6*sizeof(float));
+
+       /* Down sample a factor 2 to save computations */
+
+       DownSample(enh_buf+(ENH_NBLOCKS_EXTRA+ioffset)*ENH_BLOCKL-120,
+                   lpFilt_coefsTbl, inLen-ioffset*ENH_BLOCKL,
+                   lpState, downsampled);
+
+       /* Estimate the pitch in the down sampled domain. */
+       for (iblock = 0; iblock<ENH_NBLOCKS-ioffset; iblock++) {
+
+           lag = 10;
+           maxcc = xCorrCoef(downsampled+60+iblock*
+               ENH_BLOCKL_HALF, downsampled+60+iblock*
+               ENH_BLOCKL_HALF-lag, ENH_BLOCKL_HALF);
+           for (ilag=11; ilag<60; ilag++) {
+               cc = xCorrCoef(downsampled+60+iblock*
+                   ENH_BLOCKL_HALF, downsampled+60+iblock*
+                   ENH_BLOCKL_HALF-ilag, ENH_BLOCKL_HALF);
+
+               if (cc > maxcc) {
+                   maxcc = cc;
+                   lag = ilag;
+               }
+           }
+
+           /* Store the estimated lag in the non-downsampled domain */
+           enh_period[iblock+ENH_NBLOCKS_EXTRA+ioffset] = (float)lag*2;
+
+
+       }
+
+
+       /* PLC was performed on the previous packet */
+       if (iLBCdec_inst->prev_enh_pl==1) {
+
+           inlag=(int)enh_period[ENH_NBLOCKS_EXTRA+ioffset];
+
+           lag = inlag-1;
+           maxcc = xCorrCoef(in, in+lag, plc_blockl);
+           for (ilag=inlag; ilag<=inlag+1; ilag++) {
+               cc = xCorrCoef(in, in+ilag, plc_blockl);
+
+
+
+
+
+
+               if (cc > maxcc) {
+                   maxcc = cc;
+                   lag = ilag;
+               }
+           }
+
+           enh_period[ENH_NBLOCKS_EXTRA+ioffset-1]=(float)lag;
+
+           /* compute new concealed residual for the old lookahead,
+              mix the forward PLC with a backward PLC from
+              the new frame */
+
+           inPtr=&in[lag-1];
+
+           enh_bufPtr1=&plc_pred[plc_blockl-1];
+
+           if (lag>plc_blockl) {
+               start=plc_blockl;
+           } else {
+               start=lag;
+           }
+
+           for (isample = start; isample>0; isample--) {
+               *enh_bufPtr1-- = *inPtr--;
+           }
+
+           enh_bufPtr2=&enh_buf[ENH_BUFL-1-iLBCdec_inst->blockl];
+           for (isample = (plc_blockl-1-lag); isample>=0; isample--) {
+               *enh_bufPtr1-- = *enh_bufPtr2--;
+           }
+
+           /* limit energy change */
+           ftmp2=0.0;
+           ftmp1=0.0;
+           for (i=0;i<plc_blockl;i++) {
+               ftmp2+=enh_buf[ENH_BUFL-1-iLBCdec_inst->blockl-i]*
+                   enh_buf[ENH_BUFL-1-iLBCdec_inst->blockl-i];
+               ftmp1+=plc_pred[i]*plc_pred[i];
+           }
+           ftmp1=(float)sqrt(ftmp1/(float)plc_blockl);
+           ftmp2=(float)sqrt(ftmp2/(float)plc_blockl);
+           if (ftmp1>(float)2.0*ftmp2 && ftmp1>0.0) {
+               for (i=0;i<plc_blockl-10;i++) {
+                   plc_pred[i]*=(float)2.0*ftmp2/ftmp1;
+               }
+               for (i=plc_blockl-10;i<plc_blockl;i++) {
+                   plc_pred[i]*=(float)(i-plc_blockl+10)*
+                       ((float)1.0-(float)2.0*ftmp2/ftmp1)/(float)(10)+
+
+
+
+
+
+                       (float)2.0*ftmp2/ftmp1;
+               }
+           }
+
+           enh_bufPtr1=&enh_buf[ENH_BUFL-1-iLBCdec_inst->blockl];
+           for (i=0; i<plc_blockl; i++) {
+               ftmp1 = (float) (i+1) / (float) (plc_blockl+1);
+               *enh_bufPtr1 *= ftmp1;
+               *enh_bufPtr1 += ((float)1.0-ftmp1)*
+                                   plc_pred[plc_blockl-1-i];
+               enh_bufPtr1--;
+           }
+       }
+
+       if (iLBCdec_inst->mode==20) {
+           /* Enhancer with 40 samples delay */
+           for (iblock = 0; iblock<2; iblock++) {
+               enhancer(out+iblock*ENH_BLOCKL, enh_buf,
+                   ENH_BUFL, (5+iblock)*ENH_BLOCKL+40,
+                   ENH_ALPHA0, enh_period, enh_plocsTbl,
+                       ENH_NBLOCKS_TOT);
+           }
+       } else if (iLBCdec_inst->mode==30) {
+           /* Enhancer with 80 samples delay */
+           for (iblock = 0; iblock<3; iblock++) {
+               enhancer(out+iblock*ENH_BLOCKL, enh_buf,
+                   ENH_BUFL, (4+iblock)*ENH_BLOCKL,
+                   ENH_ALPHA0, enh_period, enh_plocsTbl,
+                       ENH_NBLOCKS_TOT);
+           }
+       }
+
+       return (lag*2);
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/enhancer.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/enhancer.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/enhancer.h	(revision 1163)
@@ -0,0 +1,36 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       enhancer.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+
+
+
+
+   ******************************************************************/
+
+   #ifndef __ENHANCER_H
+   #define __ENHANCER_H
+
+   #include "iLBC_define.h"
+
+   float xCorrCoef(
+       float *target,      /* (i) first array */
+       float *regressor,   /* (i) second array */
+       int subl        /* (i) dimension arrays */
+   );
+
+   int enhancerInterface(
+       float *out,         /* (o) the enhanced recidual signal */
+       float *in,          /* (i) the recidual signal to enhance */
+       iLBC_Dec_Inst_t *iLBCdec_inst
+                           /* (i/o) the decoder state structure */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/filter.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/filter.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/filter.c	(revision 1163)
@@ -0,0 +1,175 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       filter.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include "iLBC_define.h"
+
+   /*----------------------------------------------------------------*
+    *  all-pole filter
+    *---------------------------------------------------------------*/
+
+   void AllPoleFilter(
+       float *InOut,   /* (i/o) on entrance InOut[-orderCoef] to
+                              InOut[-1] contain the state of the
+                              filter (delayed samples). InOut[0] to
+                              InOut[lengthInOut-1] contain the filter
+                              input, on en exit InOut[-orderCoef] to
+                              InOut[-1] is unchanged and InOut[0] to
+                              InOut[lengthInOut-1] contain filtered
+                              samples */
+       float *Coef,/* (i) filter coefficients, Coef[0] is assumed
+                              to be 1.0 */
+       int lengthInOut,/* (i) number of input/output samples */
+       int orderCoef   /* (i) number of filter coefficients */
+   ){
+       int n,k;
+
+       for(n=0;n<lengthInOut;n++){
+           for(k=1;k<=orderCoef;k++){
+               *InOut -= Coef[k]*InOut[-k];
+
+
+
+
+
+           }
+           InOut++;
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  all-zero filter
+    *---------------------------------------------------------------*/
+
+   void AllZeroFilter(
+       float *In,      /* (i) In[0] to In[lengthInOut-1] contain
+                              filter input samples */
+       float *Coef,/* (i) filter coefficients (Coef[0] is assumed
+                              to be 1.0) */
+       int lengthInOut,/* (i) number of input/output samples */
+       int orderCoef,  /* (i) number of filter coefficients */
+       float *Out      /* (i/o) on entrance Out[-orderCoef] to Out[-1]
+                              contain the filter state, on exit Out[0]
+                              to Out[lengthInOut-1] contain filtered
+                              samples */
+   ){
+       int n,k;
+
+       for(n=0;n<lengthInOut;n++){
+           *Out = Coef[0]*In[0];
+           for(k=1;k<=orderCoef;k++){
+               *Out += Coef[k]*In[-k];
+           }
+           Out++;
+           In++;
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  pole-zero filter
+    *---------------------------------------------------------------*/
+
+   void ZeroPoleFilter(
+       float *In,      /* (i) In[0] to In[lengthInOut-1] contain
+                              filter input samples In[-orderCoef] to
+                              In[-1] contain state of all-zero
+                              section */
+       float *ZeroCoef,/* (i) filter coefficients for all-zero
+                              section (ZeroCoef[0] is assumed to
+                              be 1.0) */
+       float *PoleCoef,/* (i) filter coefficients for all-pole section
+                              (ZeroCoef[0] is assumed to be 1.0) */
+       int lengthInOut,/* (i) number of input/output samples */
+
+
+
+
+
+       int orderCoef,  /* (i) number of filter coefficients */
+       float *Out      /* (i/o) on entrance Out[-orderCoef] to Out[-1]
+                              contain state of all-pole section. On
+                              exit Out[0] to Out[lengthInOut-1]
+                              contain filtered samples */
+   ){
+       AllZeroFilter(In,ZeroCoef,lengthInOut,orderCoef,Out);
+       AllPoleFilter(Out,PoleCoef,lengthInOut,orderCoef);
+   }
+
+   /*----------------------------------------------------------------*
+    * downsample (LP filter and decimation)
+    *---------------------------------------------------------------*/
+
+   void DownSample (
+       float  *In,     /* (i) input samples */
+       float  *Coef,   /* (i) filter coefficients */
+       int lengthIn,   /* (i) number of input samples */
+       float  *state,  /* (i) filter state */
+       float  *Out     /* (o) downsampled output */
+   ){
+       float   o;
+       float *Out_ptr = Out;
+       float *Coef_ptr, *In_ptr;
+       float *state_ptr;
+       int i, j, stop;
+
+       /* LP filter and decimate at the same time */
+
+       for (i = DELAY_DS; i < lengthIn; i+=FACTOR_DS)
+       {
+           Coef_ptr = &Coef[0];
+           In_ptr = &In[i];
+           state_ptr = &state[FILTERORDER_DS-2];
+
+           o = (float)0.0;
+
+           stop = (i < FILTERORDER_DS) ? i + 1 : FILTERORDER_DS;
+
+           for (j = 0; j < stop; j++)
+           {
+               o += *Coef_ptr++ * (*In_ptr--);
+           }
+           for (j = i + 1; j < FILTERORDER_DS; j++)
+           {
+               o += *Coef_ptr++ * (*state_ptr--);
+           }
+
+
+
+
+
+
+           *Out_ptr++ = o;
+       }
+
+       /* Get the last part (use zeros as input for the future) */
+
+       for (i=(lengthIn+FACTOR_DS); i<(lengthIn+DELAY_DS);
+               i+=FACTOR_DS) {
+
+           o=(float)0.0;
+
+           if (i<lengthIn) {
+               Coef_ptr = &Coef[0];
+               In_ptr = &In[i];
+               for (j=0; j<FILTERORDER_DS; j++) {
+                       o += *Coef_ptr++ * (*Out_ptr--);
+               }
+           } else {
+               Coef_ptr = &Coef[i-lengthIn];
+               In_ptr = &In[lengthIn-1];
+               for (j=0; j<FILTERORDER_DS-(i-lengthIn); j++) {
+                       o += *Coef_ptr++ * (*In_ptr--);
+               }
+           }
+           *Out_ptr++ = o;
+       }
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/filter.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/filter.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/filter.h	(revision 1163)
@@ -0,0 +1,80 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       filter.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+
+
+
+
+
+   #ifndef __iLBC_FILTER_H
+   #define __iLBC_FILTER_H
+
+   void AllPoleFilter(
+       float *InOut,   /* (i/o) on entrance InOut[-orderCoef] to
+                              InOut[-1] contain the state of the
+                              filter (delayed samples). InOut[0] to
+                              InOut[lengthInOut-1] contain the filter
+                              input, on en exit InOut[-orderCoef] to
+                              InOut[-1] is unchanged and InOut[0] to
+                              InOut[lengthInOut-1] contain filtered
+                              samples */
+       float *Coef,/* (i) filter coefficients, Coef[0] is assumed
+                              to be 1.0 */
+       int lengthInOut,/* (i) number of input/output samples */
+       int orderCoef   /* (i) number of filter coefficients */
+   );
+
+   void AllZeroFilter(
+       float *In,      /* (i) In[0] to In[lengthInOut-1] contain
+                              filter input samples */
+       float *Coef,/* (i) filter coefficients (Coef[0] is assumed
+                              to be 1.0) */
+       int lengthInOut,/* (i) number of input/output samples */
+       int orderCoef,  /* (i) number of filter coefficients */
+       float *Out      /* (i/o) on entrance Out[-orderCoef] to Out[-1]
+                              contain the filter state, on exit Out[0]
+                              to Out[lengthInOut-1] contain filtered
+                              samples */
+   );
+
+   void ZeroPoleFilter(
+       float *In,      /* (i) In[0] to In[lengthInOut-1] contain filter
+                              input samples In[-orderCoef] to In[-1]
+                              contain state of all-zero section */
+       float *ZeroCoef,/* (i) filter coefficients for all-zero
+                              section (ZeroCoef[0] is assumed to
+                              be 1.0) */
+       float *PoleCoef,/* (i) filter coefficients for all-pole section
+                              (ZeroCoef[0] is assumed to be 1.0) */
+       int lengthInOut,/* (i) number of input/output samples */
+       int orderCoef,  /* (i) number of filter coefficients */
+       float *Out      /* (i/o) on entrance Out[-orderCoef] to Out[-1]
+                              contain state of all-pole section. On
+                              exit Out[0] to Out[lengthInOut-1]
+                              contain filtered samples */
+   );
+
+
+
+
+
+
+   void DownSample (
+       float  *In,     /* (i) input samples */
+       float  *Coef,   /* (i) filter coefficients */
+       int lengthIn,   /* (i) number of input samples */
+       float  *state,  /* (i) filter state */
+       float  *Out     /* (o) downsampled output */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/gainquant.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/gainquant.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/gainquant.c	(revision 1163)
@@ -0,0 +1,116 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+
+
+
+
+
+       gainquant.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <string.h>
+   #include <math.h>
+   #include "constants.h"
+   #include "filter.h"
+
+   /*----------------------------------------------------------------*
+    *  quantizer for the gain in the gain-shape coding of residual
+    *---------------------------------------------------------------*/
+
+   float gainquant(/* (o) quantized gain value */
+       float in,       /* (i) gain value */
+       float maxIn,/* (i) maximum of gain value */
+       int cblen,      /* (i) number of quantization indices */
+       int *index      /* (o) quantization index */
+   ){
+       int i, tindex;
+       float minmeasure,measure, *cb, scale;
+
+       /* ensure a lower bound on the scaling factor */
+
+       scale=maxIn;
+
+       if (scale<0.1) {
+           scale=(float)0.1;
+       }
+
+       /* select the quantization table */
+
+       if (cblen == 8) {
+           cb = gain_sq3Tbl;
+       } else if (cblen == 16) {
+           cb = gain_sq4Tbl;
+       } else  {
+           cb = gain_sq5Tbl;
+       }
+
+       /* select the best index in the quantization table */
+
+       minmeasure=10000000.0;
+       tindex=0;
+       for (i=0; i<cblen; i++) {
+
+
+
+
+
+           measure=(in-scale*cb[i])*(in-scale*cb[i]);
+
+           if (measure<minmeasure) {
+               tindex=i;
+               minmeasure=measure;
+           }
+       }
+       *index=tindex;
+
+       /* return the quantized value */
+
+       return scale*cb[tindex];
+   }
+
+   /*----------------------------------------------------------------*
+    *  decoder for quantized gains in the gain-shape coding of
+    *  residual
+    *---------------------------------------------------------------*/
+
+   float gaindequant(  /* (o) quantized gain value */
+       int index,      /* (i) quantization index */
+       float maxIn,/* (i) maximum of unquantized gain */
+       int cblen       /* (i) number of quantization indices */
+   ){
+       float scale;
+
+       /* obtain correct scale factor */
+
+       scale=(float)fabs(maxIn);
+
+       if (scale<0.1) {
+           scale=(float)0.1;
+       }
+
+       /* select the quantization table and return the decoded value */
+
+       if (cblen==8) {
+           return scale*gain_sq3Tbl[index];
+       } else if (cblen==16) {
+           return scale*gain_sq4Tbl[index];
+       }
+       else if (cblen==32) {
+           return scale*gain_sq5Tbl[index];
+       }
+
+       return 0.0;
+   }
+
+
+
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/gainquant.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/gainquant.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/gainquant.h	(revision 1163)
@@ -0,0 +1,30 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       gainquant.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_GAINQUANT_H
+   #define __iLBC_GAINQUANT_H
+
+   float gainquant(/* (o) quantized gain value */
+       float in,       /* (i) gain value */
+       float maxIn,/* (i) maximum of gain value */
+       int cblen,      /* (i) number of quantization indices */
+       int *index      /* (o) quantization index */
+   );
+
+   float gaindequant(  /* (o) quantized gain value */
+       int index,      /* (i) quantization index */
+       float maxIn,/* (i) maximum of unquantized gain */
+       int cblen       /* (i) number of quantization indices */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/getCBvec.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/getCBvec.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/getCBvec.c	(revision 1163)
@@ -0,0 +1,193 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       getCBvec.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include "iLBC_define.h"
+   #include "constants.h"
+   #include <string.h>
+
+   /*----------------------------------------------------------------*
+    *  Construct codebook vector for given index.
+    *---------------------------------------------------------------*/
+
+   void getCBvec(
+
+
+
+
+
+       float *cbvec,   /* (o) Constructed codebook vector */
+       float *mem,     /* (i) Codebook buffer */
+       int index,      /* (i) Codebook index */
+       int lMem,       /* (i) Length of codebook buffer */
+       int cbveclen/* (i) Codebook vector length */
+   ){
+       int j, k, n, memInd, sFilt;
+       float tmpbuf[CB_MEML];
+       int base_size;
+       int ilow, ihigh;
+       float alfa, alfa1;
+
+       /* Determine size of codebook sections */
+
+       base_size=lMem-cbveclen+1;
+
+       if (cbveclen==SUBL) {
+           base_size+=cbveclen/2;
+       }
+
+       /* No filter -> First codebook section */
+
+       if (index<lMem-cbveclen+1) {
+
+           /* first non-interpolated vectors */
+
+           k=index+cbveclen;
+           /* get vector */
+           memcpy(cbvec, mem+lMem-k, cbveclen*sizeof(float));
+
+       } else if (index < base_size) {
+
+           k=2*(index-(lMem-cbveclen+1))+cbveclen;
+
+           ihigh=k/2;
+           ilow=ihigh-5;
+
+           /* Copy first noninterpolated part */
+
+           memcpy(cbvec, mem+lMem-k/2, ilow*sizeof(float));
+
+           /* interpolation */
+
+           alfa1=(float)0.2;
+           alfa=0.0;
+           for (j=ilow; j<ihigh; j++) {
+               cbvec[j]=((float)1.0-alfa)*mem[lMem-k/2+j]+
+                   alfa*mem[lMem-k+j];
+
+
+
+
+
+               alfa+=alfa1;
+           }
+
+           /* Copy second noninterpolated part */
+
+           memcpy(cbvec+ihigh, mem+lMem-k+ihigh,
+               (cbveclen-ihigh)*sizeof(float));
+
+       }
+
+       /* Higher codebook section based on filtering */
+
+       else {
+
+           /* first non-interpolated vectors */
+
+           if (index-base_size<lMem-cbveclen+1) {
+               float tempbuff2[CB_MEML+CB_FILTERLEN+1];
+               float *pos;
+               float *pp, *pp1;
+
+               memset(tempbuff2, 0,
+                   CB_HALFFILTERLEN*sizeof(float));
+               memcpy(&tempbuff2[CB_HALFFILTERLEN], mem,
+                   lMem*sizeof(float));
+               memset(&tempbuff2[lMem+CB_HALFFILTERLEN], 0,
+                   (CB_HALFFILTERLEN+1)*sizeof(float));
+
+               k=index-base_size+cbveclen;
+               sFilt=lMem-k;
+               memInd=sFilt+1-CB_HALFFILTERLEN;
+
+               /* do filtering */
+               pos=cbvec;
+               memset(pos, 0, cbveclen*sizeof(float));
+               for (n=0; n<cbveclen; n++) {
+                   pp=&tempbuff2[memInd+n+CB_HALFFILTERLEN];
+                   pp1=&cbfiltersTbl[CB_FILTERLEN-1];
+                   for (j=0; j<CB_FILTERLEN; j++) {
+                       (*pos)+=(*pp++)*(*pp1--);
+                   }
+                   pos++;
+               }
+           }
+
+           /* interpolated vectors */
+
+           else {
+
+
+
+
+
+               float tempbuff2[CB_MEML+CB_FILTERLEN+1];
+
+               float *pos;
+               float *pp, *pp1;
+               int i;
+
+               memset(tempbuff2, 0,
+                   CB_HALFFILTERLEN*sizeof(float));
+               memcpy(&tempbuff2[CB_HALFFILTERLEN], mem,
+                   lMem*sizeof(float));
+               memset(&tempbuff2[lMem+CB_HALFFILTERLEN], 0,
+                   (CB_HALFFILTERLEN+1)*sizeof(float));
+
+               k=2*(index-base_size-
+                   (lMem-cbveclen+1))+cbveclen;
+               sFilt=lMem-k;
+               memInd=sFilt+1-CB_HALFFILTERLEN;
+
+               /* do filtering */
+               pos=&tmpbuf[sFilt];
+               memset(pos, 0, k*sizeof(float));
+               for (i=0; i<k; i++) {
+                   pp=&tempbuff2[memInd+i+CB_HALFFILTERLEN];
+                   pp1=&cbfiltersTbl[CB_FILTERLEN-1];
+                   for (j=0; j<CB_FILTERLEN; j++) {
+                       (*pos)+=(*pp++)*(*pp1--);
+                   }
+                   pos++;
+               }
+
+               ihigh=k/2;
+               ilow=ihigh-5;
+
+               /* Copy first noninterpolated part */
+
+               memcpy(cbvec, tmpbuf+lMem-k/2,
+                   ilow*sizeof(float));
+
+               /* interpolation */
+
+               alfa1=(float)0.2;
+               alfa=0.0;
+               for (j=ilow; j<ihigh; j++) {
+                   cbvec[j]=((float)1.0-alfa)*
+                       tmpbuf[lMem-k/2+j]+alfa*tmpbuf[lMem-k+j];
+                   alfa+=alfa1;
+               }
+
+
+
+
+
+
+               /* Copy second noninterpolated part */
+
+               memcpy(cbvec+ihigh, tmpbuf+lMem-k+ihigh,
+                   (cbveclen-ihigh)*sizeof(float));
+           }
+       }
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/getCBvec.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/getCBvec.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/getCBvec.h	(revision 1163)
@@ -0,0 +1,25 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       getCBvec.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_GETCBVEC_H
+   #define __iLBC_GETCBVEC_H
+
+   void getCBvec(
+       float *cbvec,   /* (o) Constructed codebook vector */
+       float *mem,     /* (i) Codebook buffer */
+       int index,      /* (i) Codebook index */
+       int lMem,       /* (i) Length of codebook buffer */
+       int cbveclen/* (i) Codebook vector length */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/helpfun.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/helpfun.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/helpfun.c	(revision 1163)
@@ -0,0 +1,326 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       helpfun.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <math.h>
+
+   #include "iLBC_define.h"
+   #include "constants.h"
+
+   /*----------------------------------------------------------------*
+    *  calculation of auto correlation
+    *---------------------------------------------------------------*/
+
+   void autocorr(
+       float *r,       /* (o) autocorrelation vector */
+       const float *x, /* (i) data vector */
+       int N,          /* (i) length of data vector */
+       int order       /* largest lag for calculated
+                          autocorrelations */
+   ){
+       int     lag, n;
+       float   sum;
+
+       for (lag = 0; lag <= order; lag++) {
+           sum = 0;
+           for (n = 0; n < N - lag; n++) {
+               sum += x[n] * x[n+lag];
+           }
+           r[lag] = sum;
+       }
+
+
+
+
+
+   }
+
+   /*----------------------------------------------------------------*
+    *  window multiplication
+    *---------------------------------------------------------------*/
+
+   void window(
+       float *z,       /* (o) the windowed data */
+       const float *x, /* (i) the original data vector */
+       const float *y, /* (i) the window */
+       int N           /* (i) length of all vectors */
+   ){
+       int     i;
+
+       for (i = 0; i < N; i++) {
+           z[i] = x[i] * y[i];
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  levinson-durbin solution for lpc coefficients
+    *---------------------------------------------------------------*/
+
+   void levdurb(
+       float *a,       /* (o) lpc coefficient vector starting
+                              with 1.0 */
+       float *k,       /* (o) reflection coefficients */
+       float *r,       /* (i) autocorrelation vector */
+       int order       /* (i) order of lpc filter */
+   ){
+       float  sum, alpha;
+       int     m, m_h, i;
+
+       a[0] = 1.0;
+
+       if (r[0] < EPS) { /* if r[0] <= 0, set LPC coeff. to zero */
+           for (i = 0; i < order; i++) {
+               k[i] = 0;
+               a[i+1] = 0;
+           }
+       } else {
+           a[1] = k[0] = -r[1]/r[0];
+           alpha = r[0] + r[1] * k[0];
+           for (m = 1; m < order; m++){
+               sum = r[m + 1];
+               for (i = 0; i < m; i++){
+                   sum += a[i+1] * r[m - i];
+               }
+
+
+
+
+
+               k[m] = -sum / alpha;
+               alpha += k[m] * sum;
+               m_h = (m + 1) >> 1;
+               for (i = 0; i < m_h; i++){
+                   sum = a[i+1] + k[m] * a[m - i];
+                   a[m - i] += k[m] * a[i+1];
+                   a[i+1] = sum;
+               }
+               a[m+1] = k[m];
+           }
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  interpolation between vectors
+    *---------------------------------------------------------------*/
+
+   void interpolate(
+       float *out,      /* (o) the interpolated vector */
+       float *in1,     /* (i) the first vector for the
+                              interpolation */
+       float *in2,     /* (i) the second vector for the
+                              interpolation */
+       float coef,      /* (i) interpolation weights */
+       int length      /* (i) length of all vectors */
+   ){
+       int i;
+       float invcoef;
+
+       invcoef = (float)1.0 - coef;
+       for (i = 0; i < length; i++) {
+           out[i] = coef * in1[i] + invcoef * in2[i];
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  lpc bandwidth expansion
+    *---------------------------------------------------------------*/
+
+   void bwexpand(
+       float *out,      /* (o) the bandwidth expanded lpc
+                              coefficients */
+       float *in,      /* (i) the lpc coefficients before bandwidth
+                              expansion */
+       float coef,     /* (i) the bandwidth expansion factor */
+       int length      /* (i) the length of lpc coefficient vectors */
+   ){
+       int i;
+
+
+
+
+
+       float  chirp;
+
+       chirp = coef;
+
+       out[0] = in[0];
+       for (i = 1; i < length; i++) {
+           out[i] = chirp * in[i];
+           chirp *= coef;
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  vector quantization
+    *---------------------------------------------------------------*/
+
+   void vq(
+       float *Xq,      /* (o) the quantized vector */
+       int *index,     /* (o) the quantization index */
+       const float *CB,/* (i) the vector quantization codebook */
+       float *X,       /* (i) the vector to quantize */
+       int n_cb,       /* (i) the number of vectors in the codebook */
+       int dim         /* (i) the dimension of all vectors */
+   ){
+       int     i, j;
+       int     pos, minindex;
+       float   dist, tmp, mindist;
+
+       pos = 0;
+       mindist = FLOAT_MAX;
+       minindex = 0;
+       for (j = 0; j < n_cb; j++) {
+           dist = X[0] - CB[pos];
+           dist *= dist;
+           for (i = 1; i < dim; i++) {
+               tmp = X[i] - CB[pos + i];
+               dist += tmp*tmp;
+           }
+
+           if (dist < mindist) {
+               mindist = dist;
+               minindex = j;
+           }
+           pos += dim;
+       }
+       for (i = 0; i < dim; i++) {
+           Xq[i] = CB[minindex*dim + i];
+       }
+       *index = minindex;
+
+
+
+
+
+   }
+
+   /*----------------------------------------------------------------*
+    *  split vector quantization
+    *---------------------------------------------------------------*/
+
+   void SplitVQ(
+       float *qX,      /* (o) the quantized vector */
+       int *index,     /* (o) a vector of indexes for all vector
+                              codebooks in the split */
+       float *X,       /* (i) the vector to quantize */
+       const float *CB,/* (i) the quantizer codebook */
+       int nsplit,     /* the number of vector splits */
+       const int *dim, /* the dimension of X and qX */
+       const int *cbsize /* the number of vectors in the codebook */
+   ){
+       int    cb_pos, X_pos, i;
+
+       cb_pos = 0;
+       X_pos= 0;
+       for (i = 0; i < nsplit; i++) {
+           vq(qX + X_pos, index + i, CB + cb_pos, X + X_pos,
+               cbsize[i], dim[i]);
+           X_pos += dim[i];
+           cb_pos += dim[i] * cbsize[i];
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  scalar quantization
+    *---------------------------------------------------------------*/
+
+   void sort_sq(
+       float *xq,      /* (o) the quantized value */
+       int *index,     /* (o) the quantization index */
+       float x,    /* (i) the value to quantize */
+       const float *cb,/* (i) the quantization codebook */
+       int cb_size      /* (i) the size of the quantization codebook */
+   ){
+       int i;
+
+       if (x <= cb[0]) {
+           *index = 0;
+           *xq = cb[0];
+       } else {
+           i = 0;
+           while ((x > cb[i]) && i < cb_size - 1) {
+               i++;
+
+
+
+
+
+           }
+
+           if (x > ((cb[i] + cb[i - 1])/2)) {
+               *index = i;
+               *xq = cb[i];
+           } else {
+               *index = i - 1;
+               *xq = cb[i - 1];
+           }
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  check for stability of lsf coefficients
+    *---------------------------------------------------------------*/
+
+   int LSF_check(    /* (o) 1 for stable lsf vectors and 0 for
+                              nonstable ones */
+       float *lsf,     /* (i) a table of lsf vectors */
+       int dim,    /* (i) the dimension of each lsf vector */
+       int NoAn    /* (i) the number of lsf vectors in the
+                              table */
+   ){
+       int k,n,m, Nit=2, change=0,pos;
+       float tmp;
+       static float eps=(float)0.039; /* 50 Hz */
+       static float eps2=(float)0.0195;
+       static float maxlsf=(float)3.14; /* 4000 Hz */
+       static float minlsf=(float)0.01; /* 0 Hz */
+
+       /* LSF separation check*/
+
+       for (n=0; n<Nit; n++) { /* Run through a couple of times */
+           for (m=0; m<NoAn; m++) { /* Number of analyses per frame */
+               for (k=0; k<(dim-1); k++) {
+                   pos=m*dim+k;
+
+                   if ((lsf[pos+1]-lsf[pos])<eps) {
+
+                       if (lsf[pos+1]<lsf[pos]) {
+                           tmp=lsf[pos+1];
+                           lsf[pos+1]= lsf[pos]+eps2;
+                           lsf[pos]= lsf[pos+1]-eps2;
+                       } else {
+                           lsf[pos]-=eps2;
+                           lsf[pos+1]+=eps2;
+                       }
+                       change=1;
+
+
+
+
+
+                   }
+
+                   if (lsf[pos]<minlsf) {
+                       lsf[pos]=minlsf;
+                       change=1;
+                   }
+
+                   if (lsf[pos]>maxlsf) {
+                       lsf[pos]=maxlsf;
+                       change=1;
+                   }
+               }
+           }
+       }
+
+       return change;
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/helpfun.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/helpfun.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/helpfun.h	(revision 1163)
@@ -0,0 +1,106 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       helpfun.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_HELPFUN_H
+   #define __iLBC_HELPFUN_H
+
+   void autocorr(
+       float *r,       /* (o) autocorrelation vector */
+       const float *x, /* (i) data vector */
+       int N,          /* (i) length of data vector */
+       int order       /* largest lag for calculated
+                          autocorrelations */
+   );
+
+   void window(
+       float *z,       /* (o) the windowed data */
+       const float *x, /* (i) the original data vector */
+       const float *y, /* (i) the window */
+       int N           /* (i) length of all vectors */
+   );
+
+   void levdurb(
+       float *a,       /* (o) lpc coefficient vector starting
+                              with 1.0 */
+       float *k,       /* (o) reflection coefficients */
+       float *r,       /* (i) autocorrelation vector */
+       int order       /* (i) order of lpc filter */
+   );
+
+   void interpolate(
+
+
+
+
+
+       float *out,     /* (o) the interpolated vector */
+       float *in1,     /* (i) the first vector for the
+                              interpolation */
+       float *in2,     /* (i) the second vector for the
+                              interpolation */
+       float coef,     /* (i) interpolation weights */
+       int length      /* (i) length of all vectors */
+   );
+
+   void bwexpand(
+       float *out,     /* (o) the bandwidth expanded lpc
+                              coefficients */
+       float *in,      /* (i) the lpc coefficients before bandwidth
+                              expansion */
+       float coef,     /* (i) the bandwidth expansion factor */
+       int length      /* (i) the length of lpc coefficient vectors */
+   );
+
+   void vq(
+       float *Xq,      /* (o) the quantized vector */
+       int *index,     /* (o) the quantization index */
+       const float *CB,/* (i) the vector quantization codebook */
+       float *X,       /* (i) the vector to quantize */
+       int n_cb,       /* (i) the number of vectors in the codebook */
+       int dim         /* (i) the dimension of all vectors */
+   );
+
+   void SplitVQ(
+       float *qX,      /* (o) the quantized vector */
+       int *index,     /* (o) a vector of indexes for all vector
+                              codebooks in the split */
+       float *X,       /* (i) the vector to quantize */
+       const float *CB,/* (i) the quantizer codebook */
+       int nsplit,     /* the number of vector splits */
+       const int *dim, /* the dimension of X and qX */
+       const int *cbsize /* the number of vectors in the codebook */
+   );
+
+
+   void sort_sq(
+       float *xq,      /* (o) the quantized value */
+       int *index,     /* (o) the quantization index */
+       float x,    /* (i) the value to quantize */
+       const float *cb,/* (i) the quantization codebook */
+       int cb_size     /* (i) the size of the quantization codebook */
+   );
+
+   int LSF_check(      /* (o) 1 for stable lsf vectors and 0 for
+
+
+
+
+
+                              nonstable ones */
+       float *lsf,     /* (i) a table of lsf vectors */
+       int dim,    /* (i) the dimension of each lsf vector */
+       int NoAn    /* (i) the number of lsf vectors in the
+                              table */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/hpInput.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/hpInput.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/hpInput.c	(revision 1163)
@@ -0,0 +1,65 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+
+
+
+
+       hpInput.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include "constants.h"
+
+   /*----------------------------------------------------------------*
+    *  Input high-pass filter
+    *---------------------------------------------------------------*/
+
+   void hpInput(
+       float *In,  /* (i) vector to filter */
+       int len,    /* (i) length of vector to filter */
+       float *Out, /* (o) the resulting filtered vector */
+       float *mem  /* (i/o) the filter state */
+   ){
+       int i;
+       float *pi, *po;
+
+       /* all-zero section*/
+
+       pi = &In[0];
+       po = &Out[0];
+       for (i=0; i<len; i++) {
+           *po = hpi_zero_coefsTbl[0] * (*pi);
+           *po += hpi_zero_coefsTbl[1] * mem[0];
+           *po += hpi_zero_coefsTbl[2] * mem[1];
+
+           mem[1] = mem[0];
+           mem[0] = *pi;
+           po++;
+           pi++;
+
+       }
+
+       /* all-pole section*/
+
+       po = &Out[0];
+       for (i=0; i<len; i++) {
+           *po -= hpi_pole_coefsTbl[1] * mem[2];
+           *po -= hpi_pole_coefsTbl[2] * mem[3];
+
+           mem[3] = mem[2];
+           mem[2] = *po;
+           po++;
+
+
+
+
+
+       }
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/hpInput.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/hpInput.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/hpInput.h	(revision 1163)
@@ -0,0 +1,24 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       hpInput.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_HPINPUT_H
+   #define __iLBC_HPINPUT_H
+
+   void hpInput(
+       float *In,  /* (i) vector to filter */
+       int len,    /* (i) length of vector to filter */
+       float *Out, /* (o) the resulting filtered vector */
+       float *mem  /* (i/o) the filter state */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/hpOutput.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/hpOutput.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/hpOutput.c	(revision 1163)
@@ -0,0 +1,61 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       hpOutput.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include "constants.h"
+
+   /*----------------------------------------------------------------*
+    *  Output high-pass filter
+    *---------------------------------------------------------------*/
+
+   void hpOutput(
+
+
+
+
+
+       float *In,  /* (i) vector to filter */
+       int len,/* (i) length of vector to filter */
+       float *Out, /* (o) the resulting filtered vector */
+       float *mem  /* (i/o) the filter state */
+   ){
+       int i;
+       float *pi, *po;
+
+       /* all-zero section*/
+
+       pi = &In[0];
+       po = &Out[0];
+       for (i=0; i<len; i++) {
+           *po = hpo_zero_coefsTbl[0] * (*pi);
+           *po += hpo_zero_coefsTbl[1] * mem[0];
+           *po += hpo_zero_coefsTbl[2] * mem[1];
+
+           mem[1] = mem[0];
+           mem[0] = *pi;
+           po++;
+           pi++;
+
+       }
+
+       /* all-pole section*/
+
+       po = &Out[0];
+       for (i=0; i<len; i++) {
+           *po -= hpo_pole_coefsTbl[1] * mem[2];
+           *po -= hpo_pole_coefsTbl[2] * mem[3];
+
+           mem[3] = mem[2];
+           mem[2] = *po;
+           po++;
+       }
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/hpOutput.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/hpOutput.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/hpOutput.h	(revision 1163)
@@ -0,0 +1,24 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       hpOutput.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_HPOUTPUT_H
+   #define __iLBC_HPOUTPUT_H
+
+   void hpOutput(
+       float *In,  /* (i) vector to filter */
+       int len,/* (i) length of vector to filter */
+       float *Out, /* (o) the resulting filtered vector */
+       float *mem  /* (i/o) the filter state */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iCBConstruct.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iCBConstruct.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iCBConstruct.c	(revision 1163)
@@ -0,0 +1,112 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       iCBConstruct.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <math.h>
+
+   #include "iLBC_define.h"
+   #include "gainquant.h"
+   #include "getCBvec.h"
+
+   /*----------------------------------------------------------------*
+    *  Convert the codebook indexes to make the search easier
+    *---------------------------------------------------------------*/
+
+
+
+
+
+
+   void index_conv_enc(
+       int *index          /* (i/o) Codebook indexes */
+   ){
+       int k;
+
+       for (k=1; k<CB_NSTAGES; k++) {
+
+           if ((index[k]>=108)&&(index[k]<172)) {
+               index[k]-=64;
+           } else if (index[k]>=236) {
+               index[k]-=128;
+           } else {
+               /* ERROR */
+           }
+       }
+   }
+
+   void index_conv_dec(
+       int *index          /* (i/o) Codebook indexes */
+   ){
+       int k;
+
+       for (k=1; k<CB_NSTAGES; k++) {
+
+           if ((index[k]>=44)&&(index[k]<108)) {
+               index[k]+=64;
+           } else if ((index[k]>=108)&&(index[k]<128)) {
+               index[k]+=128;
+           } else {
+               /* ERROR */
+           }
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  Construct decoded vector from codebook and gains.
+    *---------------------------------------------------------------*/
+
+   void iCBConstruct(
+       float *decvector,   /* (o) Decoded vector */
+       int *index,         /* (i) Codebook indices */
+       int *gain_index,/* (i) Gain quantization indices */
+       float *mem,         /* (i) Buffer for codevector construction */
+       int lMem,           /* (i) Length of buffer */
+       int veclen,         /* (i) Length of vector */
+       int nStages         /* (i) Number of codebook stages */
+   ){
+       int j,k;
+
+
+
+
+
+       float gain[CB_NSTAGES];
+       float cbvec[SUBL];
+
+       /* gain de-quantization */
+
+       gain[0] = gaindequant(gain_index[0], 1.0, 32);
+       if (nStages > 1) {
+           gain[1] = gaindequant(gain_index[1],
+               (float)fabs(gain[0]), 16);
+       }
+       if (nStages > 2) {
+           gain[2] = gaindequant(gain_index[2],
+               (float)fabs(gain[1]), 8);
+       }
+
+       /* codebook vector construction and construction of
+       total vector */
+
+       getCBvec(cbvec, mem, index[0], lMem, veclen);
+       for (j=0;j<veclen;j++){
+           decvector[j] = gain[0]*cbvec[j];
+       }
+       if (nStages > 1) {
+           for (k=1; k<nStages; k++) {
+               getCBvec(cbvec, mem, index[k], lMem, veclen);
+               for (j=0;j<veclen;j++) {
+                   decvector[j] += gain[k]*cbvec[j];
+               }
+           }
+       }
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iCBConstruct.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iCBConstruct.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iCBConstruct.h	(revision 1163)
@@ -0,0 +1,40 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       iCBConstruct.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+
+
+
+
+
+   ******************************************************************/
+
+   #ifndef __iLBC_ICBCONSTRUCT_H
+   #define __iLBC_ICBCONSTRUCT_H
+
+   void index_conv_enc(
+       int *index          /* (i/o) Codebook indexes */
+   );
+
+   void index_conv_dec(
+       int *index          /* (i/o) Codebook indexes */
+   );
+
+   void iCBConstruct(
+       float *decvector,   /* (o) Decoded vector */
+       int *index,         /* (i) Codebook indices */
+       int *gain_index,/* (i) Gain quantization indices */
+       float *mem,         /* (i) Buffer for codevector construction */
+       int lMem,           /* (i) Length of buffer */
+       int veclen,         /* (i) Length of vector */
+       int nStages         /* (i) Number of codebook stages */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iCBSearch.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iCBSearch.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iCBSearch.c	(revision 1163)
@@ -0,0 +1,514 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       iCBSearch.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <math.h>
+   #include <string.h>
+
+   #include "iLBC_define.h"
+   #include "gainquant.h"
+   #include "createCB.h"
+   #include "filter.h"
+   #include "constants.h"
+
+   /*----------------------------------------------------------------*
+    *  Search routine for codebook encoding and gain quantization.
+    *---------------------------------------------------------------*/
+
+   void iCBSearch(
+       iLBC_Enc_Inst_t *iLBCenc_inst,
+                           /* (i) the encoder state structure */
+       int *index,         /* (o) Codebook indices */
+       int *gain_index,/* (o) Gain quantization indices */
+
+
+
+
+
+       float *intarget,/* (i) Target vector for encoding */
+       float *mem,         /* (i) Buffer for codebook construction */
+       int lMem,           /* (i) Length of buffer */
+       int lTarget,    /* (i) Length of vector */
+       int nStages,    /* (i) Number of codebook stages */
+       float *weightDenum, /* (i) weighting filter coefficients */
+       float *weightState, /* (i) weighting filter state */
+       int block           /* (i) the sub-block number */
+   ){
+       int i, j, icount, stage, best_index, range, counter;
+       float max_measure, gain, measure, crossDot, ftmp;
+       float gains[CB_NSTAGES];
+       float target[SUBL];
+       int base_index, sInd, eInd, base_size;
+       int sIndAug=0, eIndAug=0;
+       float buf[CB_MEML+SUBL+2*LPC_FILTERORDER];
+       float invenergy[CB_EXPAND*128], energy[CB_EXPAND*128];
+       float *pp, *ppi=0, *ppo=0, *ppe=0;
+       float cbvectors[CB_MEML];
+       float tene, cene, cvec[SUBL];
+       float aug_vec[SUBL];
+
+       memset(cvec,0,SUBL*sizeof(float));
+
+       /* Determine size of codebook sections */
+
+       base_size=lMem-lTarget+1;
+
+       if (lTarget==SUBL) {
+           base_size=lMem-lTarget+1+lTarget/2;
+       }
+
+       /* setup buffer for weighting */
+
+       memcpy(buf,weightState,sizeof(float)*LPC_FILTERORDER);
+       memcpy(buf+LPC_FILTERORDER,mem,lMem*sizeof(float));
+       memcpy(buf+LPC_FILTERORDER+lMem,intarget,lTarget*sizeof(float));
+
+       /* weighting */
+
+       AllPoleFilter(buf+LPC_FILTERORDER, weightDenum,
+           lMem+lTarget, LPC_FILTERORDER);
+
+       /* Construct the codebook and target needed */
+
+       memcpy(target, buf+LPC_FILTERORDER+lMem, lTarget*sizeof(float));
+
+       tene=0.0;
+
+
+
+
+
+       for (i=0; i<lTarget; i++) {
+           tene+=target[i]*target[i];
+       }
+
+       /* Prepare search over one more codebook section. This section
+          is created by filtering the original buffer with a filter. */
+
+       filteredCBvecs(cbvectors, buf+LPC_FILTERORDER, lMem);
+
+       /* The Main Loop over stages */
+
+       for (stage=0; stage<nStages; stage++) {
+
+           range = search_rangeTbl[block][stage];
+
+           /* initialize search measure */
+
+           max_measure = (float)-10000000.0;
+           gain = (float)0.0;
+           best_index = 0;
+
+           /* Compute cross dot product between the target
+              and the CB memory */
+
+           crossDot=0.0;
+           pp=buf+LPC_FILTERORDER+lMem-lTarget;
+           for (j=0; j<lTarget; j++) {
+               crossDot += target[j]*(*pp++);
+           }
+
+           if (stage==0) {
+
+               /* Calculate energy in the first block of
+                 'lTarget' samples. */
+               ppe = energy;
+               ppi = buf+LPC_FILTERORDER+lMem-lTarget-1;
+               ppo = buf+LPC_FILTERORDER+lMem-1;
+
+               *ppe=0.0;
+               pp=buf+LPC_FILTERORDER+lMem-lTarget;
+               for (j=0; j<lTarget; j++) {
+                   *ppe+=(*pp)*(*pp);
+		   ++pp;
+               }
+
+               if (*ppe>0.0) {
+                   invenergy[0] = (float) 1.0 / (*ppe + EPS);
+               } else {
+                   invenergy[0] = (float) 0.0;
+
+
+
+
+
+               }
+               ppe++;
+
+               measure=(float)-10000000.0;
+
+               if (crossDot > 0.0) {
+                      measure = crossDot*crossDot*invenergy[0];
+               }
+           }
+           else {
+               measure = crossDot*crossDot*invenergy[0];
+           }
+
+           /* check if measure is better */
+           ftmp = crossDot*invenergy[0];
+
+           if ((measure>max_measure) && (fabs(ftmp)<CB_MAXGAIN)) {
+               best_index = 0;
+               max_measure = measure;
+               gain = ftmp;
+           }
+
+           /* loop over the main first codebook section,
+              full search */
+
+           for (icount=1; icount<range; icount++) {
+
+               /* calculate measure */
+
+               crossDot=0.0;
+               pp = buf+LPC_FILTERORDER+lMem-lTarget-icount;
+
+               for (j=0; j<lTarget; j++) {
+                   crossDot += target[j]*(*pp++);
+               }
+
+               if (stage==0) {
+                   *ppe++ = energy[icount-1] + (*ppi)*(*ppi) -
+                       (*ppo)*(*ppo);
+                   ppo--;
+                   ppi--;
+
+                   if (energy[icount]>0.0) {
+                       invenergy[icount] =
+                           (float)1.0/(energy[icount]+EPS);
+                   } else {
+                       invenergy[icount] = (float) 0.0;
+                   }
+
+
+
+
+
+                   measure=(float)-10000000.0;
+
+                   if (crossDot > 0.0) {
+                       measure = crossDot*crossDot*invenergy[icount];
+                   }
+               }
+               else {
+                   measure = crossDot*crossDot*invenergy[icount];
+               }
+
+               /* check if measure is better */
+               ftmp = crossDot*invenergy[icount];
+
+               if ((measure>max_measure) && (fabs(ftmp)<CB_MAXGAIN)) {
+                   best_index = icount;
+                   max_measure = measure;
+                   gain = ftmp;
+               }
+           }
+
+           /* Loop over augmented part in the first codebook
+            * section, full search.
+            * The vectors are interpolated.
+            */
+
+           if (lTarget==SUBL) {
+
+               /* Search for best possible cb vector and
+                  compute the CB-vectors' energy. */
+               searchAugmentedCB(20, 39, stage, base_size-lTarget/2,
+                   target, buf+LPC_FILTERORDER+lMem,
+                   &max_measure, &best_index, &gain, energy,
+                   invenergy);
+           }
+
+           /* set search range for following codebook sections */
+
+           base_index=best_index;
+
+           /* unrestricted search */
+
+           if (CB_RESRANGE == -1) {
+               sInd=0;
+               eInd=range-1;
+               sIndAug=20;
+               eIndAug=39;
+           }
+
+
+
+
+
+
+           /* restricted search around best index from first
+           codebook section */
+
+           else {
+               /* Initialize search indices */
+               sIndAug=0;
+               eIndAug=0;
+               sInd=base_index-CB_RESRANGE/2;
+               eInd=sInd+CB_RESRANGE;
+
+               if (lTarget==SUBL) {
+
+                   if (sInd<0) {
+
+                       sIndAug = 40 + sInd;
+                       eIndAug = 39;
+                       sInd=0;
+
+                   } else if ( base_index < (base_size-20) ) {
+
+                       if (eInd > range) {
+                           sInd -= (eInd-range);
+                           eInd = range;
+                       }
+                   } else { /* base_index >= (base_size-20) */
+
+                       if (sInd < (base_size-20)) {
+                           sIndAug = 20;
+                           sInd = 0;
+                           eInd = 0;
+                           eIndAug = 19 + CB_RESRANGE;
+
+                           if(eIndAug > 39) {
+                               eInd = eIndAug-39;
+                               eIndAug = 39;
+                           }
+                       } else {
+                           sIndAug = 20 + sInd - (base_size-20);
+                           eIndAug = 39;
+                           sInd = 0;
+                           eInd = CB_RESRANGE - (eIndAug-sIndAug+1);
+                       }
+                   }
+
+               } else { /* lTarget = 22 or 23 */
+
+                   if (sInd < 0) {
+                       eInd -= sInd;
+
+
+
+
+
+                       sInd = 0;
+                   }
+
+                   if(eInd > range) {
+                       sInd -= (eInd - range);
+                       eInd = range;
+                   }
+               }
+           }
+
+           /* search of higher codebook section */
+
+           /* index search range */
+           counter = sInd;
+           sInd += base_size;
+           eInd += base_size;
+
+
+           if (stage==0) {
+               ppe = energy+base_size;
+               *ppe=0.0;
+
+               pp=cbvectors+lMem-lTarget;
+               for (j=0; j<lTarget; j++) {
+                   *ppe+=(*pp)*(*pp);
+		   ++pp;
+               }
+
+               ppi = cbvectors + lMem - 1 - lTarget;
+               ppo = cbvectors + lMem - 1;
+
+               for (j=0; j<(range-1); j++) {
+                   *(ppe+1) = *ppe + (*ppi)*(*ppi) - (*ppo)*(*ppo);
+                   ppo--;
+                   ppi--;
+                   ppe++;
+               }
+           }
+
+           /* loop over search range */
+
+           for (icount=sInd; icount<eInd; icount++) {
+
+               /* calculate measure */
+
+               crossDot=0.0;
+               pp=cbvectors + lMem - (counter++) - lTarget;
+
+               for (j=0;j<lTarget;j++) {
+
+
+
+
+
+                   crossDot += target[j]*(*pp++);
+               }
+
+               if (energy[icount]>0.0) {
+                   invenergy[icount] =(float)1.0/(energy[icount]+EPS);
+               } else {
+                   invenergy[icount] =(float)0.0;
+               }
+
+               if (stage==0) {
+
+                   measure=(float)-10000000.0;
+
+                   if (crossDot > 0.0) {
+                       measure = crossDot*crossDot*
+                           invenergy[icount];
+                   }
+               }
+               else {
+                   measure = crossDot*crossDot*invenergy[icount];
+               }
+
+               /* check if measure is better */
+               ftmp = crossDot*invenergy[icount];
+
+               if ((measure>max_measure) && (fabs(ftmp)<CB_MAXGAIN)) {
+                   best_index = icount;
+                   max_measure = measure;
+                   gain = ftmp;
+               }
+           }
+
+           /* Search the augmented CB inside the limited range. */
+
+           if ((lTarget==SUBL)&&(sIndAug!=0)) {
+               searchAugmentedCB(sIndAug, eIndAug, stage,
+                   2*base_size-20, target, cbvectors+lMem,
+                   &max_measure, &best_index, &gain, energy,
+                   invenergy);
+           }
+
+           /* record best index */
+
+           index[stage] = best_index;
+
+           /* gain quantization */
+
+           if (stage==0){
+
+
+
+
+
+
+               if (gain<0.0){
+                   gain = 0.0;
+               }
+
+               if (gain>CB_MAXGAIN) {
+                   gain = (float)CB_MAXGAIN;
+               }
+               gain = gainquant(gain, 1.0, 32, &gain_index[stage]);
+           }
+           else {
+               if (stage==1) {
+                   gain = gainquant(gain, (float)fabs(gains[stage-1]),
+                       16, &gain_index[stage]);
+               } else {
+                   gain = gainquant(gain, (float)fabs(gains[stage-1]),
+                       8, &gain_index[stage]);
+               }
+           }
+
+           /* Extract the best (according to measure)
+              codebook vector */
+
+           if (lTarget==(STATE_LEN-iLBCenc_inst->state_short_len)) {
+
+               if (index[stage]<base_size) {
+                   pp=buf+LPC_FILTERORDER+lMem-lTarget-index[stage];
+               } else {
+                   pp=cbvectors+lMem-lTarget-
+                       index[stage]+base_size;
+               }
+           } else {
+
+               if (index[stage]<base_size) {
+                   if (index[stage]<(base_size-20)) {
+                       pp=buf+LPC_FILTERORDER+lMem-
+                           lTarget-index[stage];
+                   } else {
+                       createAugmentedVec(index[stage]-base_size+40,
+                               buf+LPC_FILTERORDER+lMem,aug_vec);
+                       pp=aug_vec;
+                   }
+               } else {
+                   int filterno, position;
+
+                   filterno=index[stage]/base_size;
+                   position=index[stage]-filterno*base_size;
+
+
+
+
+
+
+
+                   if (position<(base_size-20)) {
+                       pp=cbvectors+filterno*lMem-lTarget-
+                           index[stage]+filterno*base_size;
+                   } else {
+                       createAugmentedVec(
+                           index[stage]-(filterno+1)*base_size+40,
+                           cbvectors+filterno*lMem,aug_vec);
+                       pp=aug_vec;
+                   }
+               }
+           }
+
+           /* Subtract the best codebook vector, according
+              to measure, from the target vector */
+
+           for (j=0;j<lTarget;j++) {
+               cvec[j] += gain*(*pp);
+               target[j] -= gain*(*pp++);
+           }
+
+           /* record quantized gain */
+
+           gains[stage]=gain;
+
+       }/* end of Main Loop. for (stage=0;... */
+
+       /* Gain adjustment for energy matching */
+       cene=0.0;
+       for (i=0; i<lTarget; i++) {
+           cene+=cvec[i]*cvec[i];
+       }
+       j=gain_index[0];
+
+       for (i=gain_index[0]; i<32; i++) {
+           ftmp=cene*gain_sq5Tbl[i]*gain_sq5Tbl[i];
+
+           if ((ftmp<(tene*gains[0]*gains[0])) &&
+               (gain_sq5Tbl[j]<(2.0*gains[0]))) {
+               j=i;
+           }
+       }
+       gain_index[0]=j;
+   }
+
+
+
+
+
+
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iCBSearch.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iCBSearch.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iCBSearch.h	(revision 1163)
@@ -0,0 +1,37 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       iCBSearch.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_ICBSEARCH_H
+   #define __iLBC_ICBSEARCH_H
+
+
+
+
+
+
+   void iCBSearch(
+       iLBC_Enc_Inst_t *iLBCenc_inst,
+                           /* (i) the encoder state structure */
+       int *index,         /* (o) Codebook indices */
+       int *gain_index,/* (o) Gain quantization indices */
+       float *intarget,/* (i) Target vector for encoding */
+       float *mem,         /* (i) Buffer for codebook construction */
+       int lMem,           /* (i) Length of buffer */
+       int lTarget,    /* (i) Length of vector */
+       int nStages,    /* (i) Number of codebook stages */
+       float *weightDenum, /* (i) weighting filter coefficients */
+       float *weightState, /* (i) weighting filter state */
+       int block           /* (i) the sub-block number */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_decode.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_decode.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_decode.c	(revision 1163)
@@ -0,0 +1,652 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       iLBC_decode.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <math.h>
+   #include <stdlib.h>
+
+   #include "iLBC_define.h"
+   #include "StateConstructW.h"
+   #include "LPCdecode.h"
+   #include "iCBConstruct.h"
+   #include "doCPLC.h"
+   #include "helpfun.h"
+   #include "constants.h"
+   #include "packing.h"
+   #include "string.h"
+   #include "enhancer.h"
+   #include "hpOutput.h"
+   #include "syntFilter.h"
+
+   /*----------------------------------------------------------------*
+    *  Initiation of decoder instance.
+    *---------------------------------------------------------------*/
+
+   short initDecode(                   /* (o) Number of decoded
+                                              samples */
+       iLBC_Dec_Inst_t *iLBCdec_inst,  /* (i/o) Decoder instance */
+       int mode,                       /* (i) frame size mode */
+       int use_enhancer                /* (i) 1 to use enhancer
+                                              0 to run without
+                                                enhancer */
+   ){
+       int i;
+
+       iLBCdec_inst->mode = mode;
+
+
+
+
+
+       if (mode==30) {
+           iLBCdec_inst->blockl = BLOCKL_30MS;
+           iLBCdec_inst->nsub = NSUB_30MS;
+           iLBCdec_inst->nasub = NASUB_30MS;
+           iLBCdec_inst->lpc_n = LPC_N_30MS;
+           iLBCdec_inst->no_of_bytes = NO_OF_BYTES_30MS;
+           iLBCdec_inst->no_of_words = NO_OF_WORDS_30MS;
+           iLBCdec_inst->state_short_len=STATE_SHORT_LEN_30MS;
+           /* ULP init */
+           iLBCdec_inst->ULP_inst=&ULP_30msTbl;
+       }
+       else if (mode==20) {
+           iLBCdec_inst->blockl = BLOCKL_20MS;
+           iLBCdec_inst->nsub = NSUB_20MS;
+           iLBCdec_inst->nasub = NASUB_20MS;
+           iLBCdec_inst->lpc_n = LPC_N_20MS;
+           iLBCdec_inst->no_of_bytes = NO_OF_BYTES_20MS;
+           iLBCdec_inst->no_of_words = NO_OF_WORDS_20MS;
+           iLBCdec_inst->state_short_len=STATE_SHORT_LEN_20MS;
+           /* ULP init */
+           iLBCdec_inst->ULP_inst=&ULP_20msTbl;
+       }
+       else {
+           exit(2);
+       }
+
+       memset(iLBCdec_inst->syntMem, 0,
+           LPC_FILTERORDER*sizeof(float));
+       memcpy((*iLBCdec_inst).lsfdeqold, lsfmeanTbl,
+           LPC_FILTERORDER*sizeof(float));
+
+       memset(iLBCdec_inst->old_syntdenum, 0,
+           ((LPC_FILTERORDER + 1)*NSUB_MAX)*sizeof(float));
+       for (i=0; i<NSUB_MAX; i++)
+           iLBCdec_inst->old_syntdenum[i*(LPC_FILTERORDER+1)]=1.0;
+
+       iLBCdec_inst->last_lag = 20;
+
+       iLBCdec_inst->prevLag = 120;
+       iLBCdec_inst->per = 0.0;
+       iLBCdec_inst->consPLICount = 0;
+       iLBCdec_inst->prevPLI = 0;
+       iLBCdec_inst->prevLpc[0] = 1.0;
+       memset(iLBCdec_inst->prevLpc+1,0,
+           LPC_FILTERORDER*sizeof(float));
+       memset(iLBCdec_inst->prevResidual, 0, BLOCKL_MAX*sizeof(float));
+       iLBCdec_inst->seed=777;
+
+
+
+
+
+
+       memset(iLBCdec_inst->hpomem, 0, 4*sizeof(float));
+
+       iLBCdec_inst->use_enhancer = use_enhancer;
+       memset(iLBCdec_inst->enh_buf, 0, ENH_BUFL*sizeof(float));
+       for (i=0;i<ENH_NBLOCKS_TOT;i++)
+           iLBCdec_inst->enh_period[i]=(float)40.0;
+
+       iLBCdec_inst->prev_enh_pl = 0;
+
+       return (short)(iLBCdec_inst->blockl);
+   }
+
+   /*----------------------------------------------------------------*
+    *  frame residual decoder function (subrutine to iLBC_decode)
+    *---------------------------------------------------------------*/
+
+   void Decode(
+       iLBC_Dec_Inst_t *iLBCdec_inst,  /* (i/o) the decoder state
+                                                structure */
+       float *decresidual,             /* (o) decoded residual frame */
+       int start,                      /* (i) location of start
+                                              state */
+       int idxForMax,                  /* (i) codebook index for the
+                                              maximum value */
+       int *idxVec,                /* (i) codebook indexes for the
+                                              samples  in the start
+                                              state */
+       float *syntdenum,               /* (i) the decoded synthesis
+                                              filter coefficients */
+       int *cb_index,                  /* (i) the indexes for the
+                                              adaptive codebook */
+       int *gain_index,            /* (i) the indexes for the
+                                              corresponding gains */
+       int *extra_cb_index,        /* (i) the indexes for the
+                                              adaptive codebook part
+                                              of start state */
+       int *extra_gain_index,          /* (i) the indexes for the
+                                              corresponding gains */
+       int state_first                 /* (i) 1 if non adaptive part
+                                              of start state comes
+                                              first 0 if that part
+                                              comes last */
+   ){
+       float reverseDecresidual[BLOCKL_MAX], mem[CB_MEML];
+       int k, meml_gotten, Nfor, Nback, i;
+       int diff, start_pos;
+       int subcount, subframe;
+
+
+
+
+
+
+       diff = STATE_LEN - iLBCdec_inst->state_short_len;
+
+       if (state_first == 1) {
+           start_pos = (start-1)*SUBL;
+       } else {
+           start_pos = (start-1)*SUBL + diff;
+       }
+
+       /* decode scalar part of start state */
+
+       StateConstructW(idxForMax, idxVec,
+           &syntdenum[(start-1)*(LPC_FILTERORDER+1)],
+           &decresidual[start_pos], iLBCdec_inst->state_short_len);
+
+
+       if (state_first) { /* put adaptive part in the end */
+
+           /* setup memory */
+
+           memset(mem, 0,
+               (CB_MEML-iLBCdec_inst->state_short_len)*sizeof(float));
+           memcpy(mem+CB_MEML-iLBCdec_inst->state_short_len,
+               decresidual+start_pos,
+               iLBCdec_inst->state_short_len*sizeof(float));
+
+           /* construct decoded vector */
+
+           iCBConstruct(
+               &decresidual[start_pos+iLBCdec_inst->state_short_len],
+               extra_cb_index, extra_gain_index, mem+CB_MEML-stMemLTbl,
+               stMemLTbl, diff, CB_NSTAGES);
+
+       }
+       else {/* put adaptive part in the beginning */
+
+           /* create reversed vectors for prediction */
+
+           for (k=0; k<diff; k++) {
+               reverseDecresidual[k] =
+                   decresidual[(start+1)*SUBL-1-
+                           (k+iLBCdec_inst->state_short_len)];
+           }
+
+           /* setup memory */
+
+           meml_gotten = iLBCdec_inst->state_short_len;
+           for (k=0; k<meml_gotten; k++){
+               mem[CB_MEML-1-k] = decresidual[start_pos + k];
+
+
+
+
+
+           }
+           memset(mem, 0, (CB_MEML-k)*sizeof(float));
+
+           /* construct decoded vector */
+
+           iCBConstruct(reverseDecresidual, extra_cb_index,
+               extra_gain_index, mem+CB_MEML-stMemLTbl, stMemLTbl,
+               diff, CB_NSTAGES);
+
+           /* get decoded residual from reversed vector */
+
+           for (k=0; k<diff; k++) {
+               decresidual[start_pos-1-k] = reverseDecresidual[k];
+           }
+       }
+
+       /* counter for predicted sub-frames */
+
+       subcount=0;
+
+       /* forward prediction of sub-frames */
+
+       Nfor = iLBCdec_inst->nsub-start-1;
+
+       if ( Nfor > 0 ){
+
+           /* setup memory */
+
+           memset(mem, 0, (CB_MEML-STATE_LEN)*sizeof(float));
+           memcpy(mem+CB_MEML-STATE_LEN, decresidual+(start-1)*SUBL,
+               STATE_LEN*sizeof(float));
+
+           /* loop over sub-frames to encode */
+
+           for (subframe=0; subframe<Nfor; subframe++) {
+
+               /* construct decoded vector */
+
+               iCBConstruct(&decresidual[(start+1+subframe)*SUBL],
+                   cb_index+subcount*CB_NSTAGES,
+                   gain_index+subcount*CB_NSTAGES,
+                   mem+CB_MEML-memLfTbl[subcount],
+                   memLfTbl[subcount], SUBL, CB_NSTAGES);
+
+               /* update memory */
+
+               memcpy(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
+               memcpy(mem+CB_MEML-SUBL,
+
+
+
+
+
+                   &decresidual[(start+1+subframe)*SUBL],
+                   SUBL*sizeof(float));
+
+               subcount++;
+
+           }
+
+       }
+
+       /* backward prediction of sub-frames */
+
+       Nback = start-1;
+
+       if ( Nback > 0 ) {
+
+           /* setup memory */
+
+           meml_gotten = SUBL*(iLBCdec_inst->nsub+1-start);
+
+           if ( meml_gotten > CB_MEML ) {
+               meml_gotten=CB_MEML;
+           }
+           for (k=0; k<meml_gotten; k++) {
+               mem[CB_MEML-1-k] = decresidual[(start-1)*SUBL + k];
+           }
+           memset(mem, 0, (CB_MEML-k)*sizeof(float));
+
+           /* loop over subframes to decode */
+
+           for (subframe=0; subframe<Nback; subframe++) {
+
+               /* construct decoded vector */
+
+               iCBConstruct(&reverseDecresidual[subframe*SUBL],
+                   cb_index+subcount*CB_NSTAGES,
+                   gain_index+subcount*CB_NSTAGES,
+                   mem+CB_MEML-memLfTbl[subcount], memLfTbl[subcount],
+                   SUBL, CB_NSTAGES);
+
+               /* update memory */
+
+               memcpy(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
+               memcpy(mem+CB_MEML-SUBL,
+                   &reverseDecresidual[subframe*SUBL],
+                   SUBL*sizeof(float));
+
+               subcount++;
+           }
+
+
+
+
+
+           /* get decoded residual from reversed vector */
+
+           for (i=0; i<SUBL*Nback; i++)
+               decresidual[SUBL*Nback - i - 1] =
+               reverseDecresidual[i];
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  main decoder function
+    *---------------------------------------------------------------*/
+
+   void iLBC_decode(
+       float *decblock,            /* (o) decoded signal block */
+       unsigned char *bytes,           /* (i) encoded signal bits */
+       iLBC_Dec_Inst_t *iLBCdec_inst,  /* (i/o) the decoder state
+                                                structure */
+       int mode                    /* (i) 0: bad packet, PLC,
+                                              1: normal */
+   ){
+       float data[BLOCKL_MAX];
+       float lsfdeq[LPC_FILTERORDER*LPC_N_MAX];
+       float PLCresidual[BLOCKL_MAX], PLClpc[LPC_FILTERORDER + 1];
+       float zeros[BLOCKL_MAX], one[LPC_FILTERORDER + 1];
+       int k, i, start, idxForMax, pos, lastpart, ulp;
+       int lag, ilag;
+       float cc, maxcc;
+       int idxVec[STATE_LEN];
+       int check;
+       int gain_index[NASUB_MAX*CB_NSTAGES],
+           extra_gain_index[CB_NSTAGES];
+       int cb_index[CB_NSTAGES*NASUB_MAX], extra_cb_index[CB_NSTAGES];
+       int lsf_i[LSF_NSPLIT*LPC_N_MAX];
+       int state_first;
+       int last_bit;
+       unsigned char *pbytes;
+       float weightdenum[(LPC_FILTERORDER + 1)*NSUB_MAX];
+       int order_plus_one;
+       float syntdenum[NSUB_MAX*(LPC_FILTERORDER+1)];
+       float decresidual[BLOCKL_MAX];
+
+       if (mode>0) { /* the data are good */
+
+           /* decode data */
+
+           pbytes=bytes;
+           pos=0;
+
+
+
+
+
+
+           /* Set everything to zero before decoding */
+
+           for (k=0; k<LSF_NSPLIT*LPC_N_MAX; k++) {
+               lsf_i[k]=0;
+           }
+           start=0;
+           state_first=0;
+           idxForMax=0;
+           for (k=0; k<iLBCdec_inst->state_short_len; k++) {
+               idxVec[k]=0;
+           }
+           for (k=0; k<CB_NSTAGES; k++) {
+               extra_cb_index[k]=0;
+           }
+           for (k=0; k<CB_NSTAGES; k++) {
+               extra_gain_index[k]=0;
+           }
+           for (i=0; i<iLBCdec_inst->nasub; i++) {
+               for (k=0; k<CB_NSTAGES; k++) {
+                   cb_index[i*CB_NSTAGES+k]=0;
+               }
+           }
+           for (i=0; i<iLBCdec_inst->nasub; i++) {
+               for (k=0; k<CB_NSTAGES; k++) {
+                   gain_index[i*CB_NSTAGES+k]=0;
+               }
+           }
+
+           /* loop over ULP classes */
+
+           for (ulp=0; ulp<3; ulp++) {
+
+               /* LSF */
+               for (k=0; k<LSF_NSPLIT*iLBCdec_inst->lpc_n; k++){
+                   unpack( &pbytes, &lastpart,
+                       iLBCdec_inst->ULP_inst->lsf_bits[k][ulp], &pos);
+                   packcombine(&lsf_i[k], lastpart,
+                       iLBCdec_inst->ULP_inst->lsf_bits[k][ulp]);
+               }
+
+               /* Start block info */
+
+               unpack( &pbytes, &lastpart,
+                   iLBCdec_inst->ULP_inst->start_bits[ulp], &pos);
+               packcombine(&start, lastpart,
+                   iLBCdec_inst->ULP_inst->start_bits[ulp]);
+
+               unpack( &pbytes, &lastpart,
+
+
+
+
+
+                   iLBCdec_inst->ULP_inst->startfirst_bits[ulp], &pos);
+               packcombine(&state_first, lastpart,
+                   iLBCdec_inst->ULP_inst->startfirst_bits[ulp]);
+
+               unpack( &pbytes, &lastpart,
+                   iLBCdec_inst->ULP_inst->scale_bits[ulp], &pos);
+               packcombine(&idxForMax, lastpart,
+                   iLBCdec_inst->ULP_inst->scale_bits[ulp]);
+
+               for (k=0; k<iLBCdec_inst->state_short_len; k++) {
+                   unpack( &pbytes, &lastpart,
+                       iLBCdec_inst->ULP_inst->state_bits[ulp], &pos);
+                   packcombine(idxVec+k, lastpart,
+                       iLBCdec_inst->ULP_inst->state_bits[ulp]);
+               }
+
+               /* 23/22 (20ms/30ms) sample block */
+
+               for (k=0; k<CB_NSTAGES; k++) {
+                   unpack( &pbytes, &lastpart,
+                       iLBCdec_inst->ULP_inst->extra_cb_index[k][ulp],
+                       &pos);
+                   packcombine(extra_cb_index+k, lastpart,
+                       iLBCdec_inst->ULP_inst->extra_cb_index[k][ulp]);
+               }
+               for (k=0; k<CB_NSTAGES; k++) {
+                   unpack( &pbytes, &lastpart,
+                       iLBCdec_inst->ULP_inst->extra_cb_gain[k][ulp],
+                       &pos);
+                   packcombine(extra_gain_index+k, lastpart,
+                       iLBCdec_inst->ULP_inst->extra_cb_gain[k][ulp]);
+               }
+
+               /* The two/four (20ms/30ms) 40 sample sub-blocks */
+
+               for (i=0; i<iLBCdec_inst->nasub; i++) {
+                   for (k=0; k<CB_NSTAGES; k++) {
+                       unpack( &pbytes, &lastpart,
+                       iLBCdec_inst->ULP_inst->cb_index[i][k][ulp],
+                           &pos);
+                       packcombine(cb_index+i*CB_NSTAGES+k, lastpart,
+                       iLBCdec_inst->ULP_inst->cb_index[i][k][ulp]);
+                   }
+               }
+
+               for (i=0; i<iLBCdec_inst->nasub; i++) {
+                   for (k=0; k<CB_NSTAGES; k++) {
+                       unpack( &pbytes, &lastpart,
+
+
+
+
+
+                       iLBCdec_inst->ULP_inst->cb_gain[i][k][ulp],
+                           &pos);
+                       packcombine(gain_index+i*CB_NSTAGES+k, lastpart,
+                           iLBCdec_inst->ULP_inst->cb_gain[i][k][ulp]);
+                   }
+               }
+           }
+           /* Extract last bit. If it is 1 this indicates an
+              empty/lost frame */
+           unpack( &pbytes, &last_bit, 1, &pos);
+
+           /* Check for bit errors or empty/lost frames */
+           if (start<1)
+               mode = 0;
+           if (iLBCdec_inst->mode==20 && start>3)
+               mode = 0;
+           if (iLBCdec_inst->mode==30 && start>5)
+               mode = 0;
+           if (last_bit==1)
+               mode = 0;
+
+           if (mode==1) { /* No bit errors was detected,
+                             continue decoding */
+
+               /* adjust index */
+               index_conv_dec(cb_index);
+
+               /* decode the lsf */
+
+               SimplelsfDEQ(lsfdeq, lsf_i, iLBCdec_inst->lpc_n);
+               check=LSF_check(lsfdeq, LPC_FILTERORDER,
+                   iLBCdec_inst->lpc_n);
+               DecoderInterpolateLSF(syntdenum, weightdenum,
+                   lsfdeq, LPC_FILTERORDER, iLBCdec_inst);
+
+               Decode(iLBCdec_inst, decresidual, start, idxForMax,
+                   idxVec, syntdenum, cb_index, gain_index,
+                   extra_cb_index, extra_gain_index,
+                   state_first);
+
+               /* preparing the plc for a future loss! */
+
+               doThePLC(PLCresidual, PLClpc, 0, decresidual,
+                   syntdenum +
+                   (LPC_FILTERORDER + 1)*(iLBCdec_inst->nsub - 1),
+                   (*iLBCdec_inst).last_lag, iLBCdec_inst);
+
+
+
+
+
+
+
+               memcpy(decresidual, PLCresidual,
+                   iLBCdec_inst->blockl*sizeof(float));
+           }
+
+       }
+
+       if (mode == 0) {
+           /* the data is bad (either a PLC call
+            * was made or a severe bit error was detected)
+            */
+
+           /* packet loss conceal */
+
+           memset(zeros, 0, BLOCKL_MAX*sizeof(float));
+
+           one[0] = 1;
+           memset(one+1, 0, LPC_FILTERORDER*sizeof(float));
+
+           start=0;
+
+           doThePLC(PLCresidual, PLClpc, 1, zeros, one,
+               (*iLBCdec_inst).last_lag, iLBCdec_inst);
+           memcpy(decresidual, PLCresidual,
+               iLBCdec_inst->blockl*sizeof(float));
+
+           order_plus_one = LPC_FILTERORDER + 1;
+           for (i = 0; i < iLBCdec_inst->nsub; i++) {
+               memcpy(syntdenum+(i*order_plus_one), PLClpc,
+                   order_plus_one*sizeof(float));
+           }
+       }
+
+       if (iLBCdec_inst->use_enhancer == 1) {
+
+           /* post filtering */
+
+           iLBCdec_inst->last_lag =
+               enhancerInterface(data, decresidual, iLBCdec_inst);
+
+           /* synthesis filtering */
+
+           if (iLBCdec_inst->mode==20) {
+               /* Enhancer has 40 samples delay */
+               i=0;
+               syntFilter(data + i*SUBL,
+                   iLBCdec_inst->old_syntdenum +
+                   (i+iLBCdec_inst->nsub-1)*(LPC_FILTERORDER+1),
+                   SUBL, iLBCdec_inst->syntMem);
+
+
+
+
+
+               for (i=1; i < iLBCdec_inst->nsub; i++) {
+                   syntFilter(data + i*SUBL,
+                       syntdenum + (i-1)*(LPC_FILTERORDER+1),
+                       SUBL, iLBCdec_inst->syntMem);
+               }
+           } else if (iLBCdec_inst->mode==30) {
+               /* Enhancer has 80 samples delay */
+               for (i=0; i < 2; i++) {
+                   syntFilter(data + i*SUBL,
+                       iLBCdec_inst->old_syntdenum +
+                       (i+iLBCdec_inst->nsub-2)*(LPC_FILTERORDER+1),
+                       SUBL, iLBCdec_inst->syntMem);
+               }
+               for (i=2; i < iLBCdec_inst->nsub; i++) {
+                   syntFilter(data + i*SUBL,
+                       syntdenum + (i-2)*(LPC_FILTERORDER+1), SUBL,
+                       iLBCdec_inst->syntMem);
+               }
+           }
+
+       } else {
+
+           /* Find last lag */
+           lag = 20;
+           maxcc = xCorrCoef(&decresidual[BLOCKL_MAX-ENH_BLOCKL],
+               &decresidual[BLOCKL_MAX-ENH_BLOCKL-lag], ENH_BLOCKL);
+
+           for (ilag=21; ilag<120; ilag++) {
+               cc = xCorrCoef(&decresidual[BLOCKL_MAX-ENH_BLOCKL],
+                   &decresidual[BLOCKL_MAX-ENH_BLOCKL-ilag],
+                   ENH_BLOCKL);
+
+               if (cc > maxcc) {
+                   maxcc = cc;
+                   lag = ilag;
+               }
+           }
+           iLBCdec_inst->last_lag = lag;
+
+           /* copy data and run synthesis filter */
+
+           memcpy(data, decresidual,
+               iLBCdec_inst->blockl*sizeof(float));
+           for (i=0; i < iLBCdec_inst->nsub; i++) {
+               syntFilter(data + i*SUBL,
+                   syntdenum + i*(LPC_FILTERORDER+1), SUBL,
+                   iLBCdec_inst->syntMem);
+           }
+
+
+
+
+
+       }
+
+       /* high pass filtering on output if desired, otherwise
+          copy to out */
+
+       hpOutput(data, iLBCdec_inst->blockl,
+                   decblock,iLBCdec_inst->hpomem);
+
+       /* memcpy(decblock,data,iLBCdec_inst->blockl*sizeof(float));*/
+
+       memcpy(iLBCdec_inst->old_syntdenum, syntdenum,
+
+           iLBCdec_inst->nsub*(LPC_FILTERORDER+1)*sizeof(float));
+
+       iLBCdec_inst->prev_enh_pl=0;
+
+       if (mode==0) { /* PLC was used */
+           iLBCdec_inst->prev_enh_pl=1;
+       }
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_decode.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_decode.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_decode.h	(revision 1163)
@@ -0,0 +1,42 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       iLBC_decode.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_ILBCDECODE_H
+   #define __iLBC_ILBCDECODE_H
+
+   #include "iLBC_define.h"
+
+   short initDecode(                   /* (o) Number of decoded
+                                              samples */
+       iLBC_Dec_Inst_t *iLBCdec_inst,  /* (i/o) Decoder instance */
+       int mode,                       /* (i) frame size mode */
+       int use_enhancer                /* (i) 1 to use enhancer
+                                              0 to run without
+                                                enhancer */
+   );
+
+   void iLBC_decode(
+       float *decblock,            /* (o) decoded signal block */
+       unsigned char *bytes,           /* (i) encoded signal bits */
+       iLBC_Dec_Inst_t *iLBCdec_inst,  /* (i/o) the decoder state
+                                                structure */
+       int mode                    /* (i) 0: bad packet, PLC,
+                                              1: normal */
+
+
+
+
+
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_define.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_define.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_define.h	(revision 1163)
@@ -0,0 +1,217 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       iLBC_define.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+   #include <string.h>
+
+   #ifndef __iLBC_ILBCDEFINE_H
+   #define __iLBC_ILBCDEFINE_H
+
+   /* general codec settings */
+
+   #define FS                      (float)8000.0
+   #define BLOCKL_20MS             160
+   #define BLOCKL_30MS             240
+   #define BLOCKL_MAX              240
+   #define NSUB_20MS               4
+   #define NSUB_30MS               6
+   #define NSUB_MAX            6
+   #define NASUB_20MS              2
+
+
+
+
+
+   #define NASUB_30MS              4
+   #define NASUB_MAX               4
+   #define SUBL                40
+   #define STATE_LEN               80
+   #define STATE_SHORT_LEN_30MS    58
+   #define STATE_SHORT_LEN_20MS    57
+
+   /* LPC settings */
+
+   #define LPC_FILTERORDER         10
+   #define LPC_CHIRP_SYNTDENUM     (float)0.9025
+   #define LPC_CHIRP_WEIGHTDENUM   (float)0.4222
+   #define LPC_LOOKBACK        60
+   #define LPC_N_20MS              1
+   #define LPC_N_30MS              2
+   #define LPC_N_MAX               2
+   #define LPC_ASYMDIFF        20
+   #define LPC_BW                  (float)60.0
+   #define LPC_WN                  (float)1.0001
+   #define LSF_NSPLIT              3
+   #define LSF_NUMBER_OF_STEPS     4
+   #define LPC_HALFORDER           (LPC_FILTERORDER/2)
+
+   /* cb settings */
+
+   #define CB_NSTAGES              3
+   #define CB_EXPAND               2
+   #define CB_MEML                 147
+   #define CB_FILTERLEN        2*4
+   #define CB_HALFFILTERLEN    4
+   #define CB_RESRANGE             34
+   #define CB_MAXGAIN              (float)1.3
+
+   /* enhancer */
+
+   #define ENH_BLOCKL              80  /* block length */
+   #define ENH_BLOCKL_HALF         (ENH_BLOCKL/2)
+   #define ENH_HL                  3   /* 2*ENH_HL+1 is number blocks
+                                          in said second sequence */
+   #define ENH_SLOP            2   /* max difference estimated and
+                                          correct pitch period */
+   #define ENH_PLOCSL              20  /* pitch-estimates and pitch-
+                                          locations buffer length */
+   #define ENH_OVERHANG        2
+   #define ENH_UPS0            4   /* upsampling rate */
+   #define ENH_FL0                 3   /* 2*FLO+1 is the length of
+                                          each filter */
+   #define ENH_VECTL               (ENH_BLOCKL+2*ENH_FL0)
+
+
+
+
+
+   #define ENH_CORRDIM             (2*ENH_SLOP+1)
+   #define ENH_NBLOCKS             (BLOCKL_MAX/ENH_BLOCKL)
+   #define ENH_NBLOCKS_EXTRA       5
+   #define ENH_NBLOCKS_TOT         8   /* ENH_NBLOCKS +
+                                          ENH_NBLOCKS_EXTRA */
+   #define ENH_BUFL            (ENH_NBLOCKS_TOT)*ENH_BLOCKL
+   #define ENH_ALPHA0              (float)0.05
+
+   /* Down sampling */
+
+   #define FILTERORDER_DS          7
+   #define DELAY_DS            3
+   #define FACTOR_DS               2
+
+   /* bit stream defs */
+
+   #define NO_OF_BYTES_20MS    38
+   #define NO_OF_BYTES_30MS    50
+   #define NO_OF_WORDS_20MS    19
+   #define NO_OF_WORDS_30MS    25
+   #define STATE_BITS              3
+   #define BYTE_LEN            8
+   #define ULP_CLASSES             3
+
+   /* help parameters */
+
+   #define FLOAT_MAX               (float)1.0e37
+   #define EPS                     (float)2.220446049250313e-016
+   #define PI                      (float)3.14159265358979323846
+   #define MIN_SAMPLE              -32768
+   #define MAX_SAMPLE              32767
+   #define TWO_PI                  (float)6.283185307
+   #define PI2                     (float)0.159154943
+
+   /* type definition encoder instance */
+   typedef struct iLBC_ULP_Inst_t_ {
+       int lsf_bits[6][ULP_CLASSES+2];
+       int start_bits[ULP_CLASSES+2];
+       int startfirst_bits[ULP_CLASSES+2];
+       int scale_bits[ULP_CLASSES+2];
+       int state_bits[ULP_CLASSES+2];
+       int extra_cb_index[CB_NSTAGES][ULP_CLASSES+2];
+       int extra_cb_gain[CB_NSTAGES][ULP_CLASSES+2];
+       int cb_index[NSUB_MAX][CB_NSTAGES][ULP_CLASSES+2];
+       int cb_gain[NSUB_MAX][CB_NSTAGES][ULP_CLASSES+2];
+   } iLBC_ULP_Inst_t;
+
+   /* type definition encoder instance */
+
+
+
+
+
+   typedef struct iLBC_Enc_Inst_t_ {
+
+       /* flag for frame size mode */
+       int mode;
+
+       /* basic parameters for different frame sizes */
+       int blockl;
+       int nsub;
+       int nasub;
+       int no_of_bytes, no_of_words;
+       int lpc_n;
+       int state_short_len;
+       const iLBC_ULP_Inst_t *ULP_inst;
+
+       /* analysis filter state */
+       float anaMem[LPC_FILTERORDER];
+
+       /* old lsf parameters for interpolation */
+       float lsfold[LPC_FILTERORDER];
+       float lsfdeqold[LPC_FILTERORDER];
+
+       /* signal buffer for LP analysis */
+       float lpc_buffer[LPC_LOOKBACK + BLOCKL_MAX];
+
+       /* state of input HP filter */
+       float hpimem[4];
+
+   } iLBC_Enc_Inst_t;
+
+   /* type definition decoder instance */
+   typedef struct iLBC_Dec_Inst_t_ {
+
+       /* flag for frame size mode */
+       int mode;
+
+       /* basic parameters for different frame sizes */
+       int blockl;
+       int nsub;
+       int nasub;
+       int no_of_bytes, no_of_words;
+       int lpc_n;
+       int state_short_len;
+       const iLBC_ULP_Inst_t *ULP_inst;
+
+       /* synthesis filter state */
+       float syntMem[LPC_FILTERORDER];
+
+       /* old LSF for interpolation */
+
+
+
+
+
+       float lsfdeqold[LPC_FILTERORDER];
+
+       /* pitch lag estimated in enhancer and used in PLC */
+       int last_lag;
+
+       /* PLC state information */
+       int prevLag, consPLICount, prevPLI, prev_enh_pl;
+       float prevLpc[LPC_FILTERORDER+1];
+       float prevResidual[NSUB_MAX*SUBL];
+       float per;
+       unsigned long seed;
+
+       /* previous synthesis filter parameters */
+       float old_syntdenum[(LPC_FILTERORDER + 1)*NSUB_MAX];
+
+       /* state of output HP filter */
+       float hpomem[4];
+
+       /* enhancer state information */
+       int use_enhancer;
+       float enh_buf[ENH_BUFL];
+       float enh_period[ENH_NBLOCKS_TOT];
+
+   } iLBC_Dec_Inst_t;
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_encode.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_encode.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_encode.c	(revision 1163)
@@ -0,0 +1,543 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       iLBC_encode.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <math.h>
+   #include <stdlib.h>
+   #include <string.h>
+
+   #include "iLBC_define.h"
+   #include "LPCencode.h"
+   #include "FrameClassify.h"
+   #include "StateSearchW.h"
+   #include "StateConstructW.h"
+   #include "helpfun.h"
+   #include "constants.h"
+   #include "packing.h"
+   #include "iCBSearch.h"
+   #include "iCBConstruct.h"
+   #include "hpInput.h"
+   #include "anaFilter.h"
+   #include "syntFilter.h"
+
+   /*----------------------------------------------------------------*
+    *  Initiation of encoder instance.
+    *---------------------------------------------------------------*/
+
+   short initEncode(                   /* (o) Number of bytes
+                                              encoded */
+       iLBC_Enc_Inst_t *iLBCenc_inst,  /* (i/o) Encoder instance */
+       int mode                    /* (i) frame size mode */
+   ){
+       iLBCenc_inst->mode = mode;
+       if (mode==30) {
+           iLBCenc_inst->blockl = BLOCKL_30MS;
+           iLBCenc_inst->nsub = NSUB_30MS;
+           iLBCenc_inst->nasub = NASUB_30MS;
+           iLBCenc_inst->lpc_n = LPC_N_30MS;
+           iLBCenc_inst->no_of_bytes = NO_OF_BYTES_30MS;
+           iLBCenc_inst->no_of_words = NO_OF_WORDS_30MS;
+
+
+
+
+
+           iLBCenc_inst->state_short_len=STATE_SHORT_LEN_30MS;
+           /* ULP init */
+           iLBCenc_inst->ULP_inst=&ULP_30msTbl;
+       }
+       else if (mode==20) {
+           iLBCenc_inst->blockl = BLOCKL_20MS;
+           iLBCenc_inst->nsub = NSUB_20MS;
+           iLBCenc_inst->nasub = NASUB_20MS;
+           iLBCenc_inst->lpc_n = LPC_N_20MS;
+           iLBCenc_inst->no_of_bytes = NO_OF_BYTES_20MS;
+           iLBCenc_inst->no_of_words = NO_OF_WORDS_20MS;
+           iLBCenc_inst->state_short_len=STATE_SHORT_LEN_20MS;
+           /* ULP init */
+           iLBCenc_inst->ULP_inst=&ULP_20msTbl;
+       }
+       else {
+           exit(2);
+       }
+
+       memset((*iLBCenc_inst).anaMem, 0,
+           LPC_FILTERORDER*sizeof(float));
+       memcpy((*iLBCenc_inst).lsfold, lsfmeanTbl,
+           LPC_FILTERORDER*sizeof(float));
+       memcpy((*iLBCenc_inst).lsfdeqold, lsfmeanTbl,
+           LPC_FILTERORDER*sizeof(float));
+       memset((*iLBCenc_inst).lpc_buffer, 0,
+           (LPC_LOOKBACK+BLOCKL_MAX)*sizeof(float));
+       memset((*iLBCenc_inst).hpimem, 0, 4*sizeof(float));
+
+       return (short)(iLBCenc_inst->no_of_bytes);
+   }
+
+   /*----------------------------------------------------------------*
+    *  main encoder function
+    *---------------------------------------------------------------*/
+
+   void iLBC_encode(
+       unsigned char *bytes,           /* (o) encoded data bits iLBC */
+       float *block,                   /* (o) speech vector to
+                                              encode */
+       iLBC_Enc_Inst_t *iLBCenc_inst   /* (i/o) the general encoder
+                                              state */
+   ){
+
+       float data[BLOCKL_MAX];
+       float residual[BLOCKL_MAX], reverseResidual[BLOCKL_MAX];
+
+       int start, idxForMax, idxVec[STATE_LEN];
+
+
+
+
+
+       float reverseDecresidual[BLOCKL_MAX], mem[CB_MEML];
+       int n, k, meml_gotten, Nfor, Nback, i, pos;
+       int gain_index[CB_NSTAGES*NASUB_MAX],
+           extra_gain_index[CB_NSTAGES];
+       int cb_index[CB_NSTAGES*NASUB_MAX],extra_cb_index[CB_NSTAGES];
+       int lsf_i[LSF_NSPLIT*LPC_N_MAX];
+       unsigned char *pbytes;
+       int diff, start_pos, state_first;
+       float en1, en2;
+       int index, ulp, firstpart;
+       int subcount, subframe;
+       float weightState[LPC_FILTERORDER];
+       float syntdenum[NSUB_MAX*(LPC_FILTERORDER+1)];
+       float weightdenum[NSUB_MAX*(LPC_FILTERORDER+1)];
+       float decresidual[BLOCKL_MAX];
+
+       /* high pass filtering of input signal if such is not done
+              prior to calling this function */
+
+       hpInput(block, iLBCenc_inst->blockl,
+                   data, (*iLBCenc_inst).hpimem);
+
+       /* otherwise simply copy */
+
+       /*memcpy(data,block,iLBCenc_inst->blockl*sizeof(float));*/
+
+       /* LPC of hp filtered input data */
+
+       LPCencode(syntdenum, weightdenum, lsf_i, data, iLBCenc_inst);
+
+
+       /* inverse filter to get residual */
+
+       for (n=0; n<iLBCenc_inst->nsub; n++) {
+           anaFilter(&data[n*SUBL], &syntdenum[n*(LPC_FILTERORDER+1)],
+               SUBL, &residual[n*SUBL], iLBCenc_inst->anaMem);
+       }
+
+       /* find state location */
+
+       start = FrameClassify(iLBCenc_inst, residual);
+
+       /* check if state should be in first or last part of the
+       two subframes */
+
+       diff = STATE_LEN - iLBCenc_inst->state_short_len;
+       en1 = 0;
+       index = (start-1)*SUBL;
+
+
+
+
+
+       for (i = 0; i < iLBCenc_inst->state_short_len; i++) {
+           en1 += residual[index+i]*residual[index+i];
+       }
+       en2 = 0;
+       index = (start-1)*SUBL+diff;
+       for (i = 0; i < iLBCenc_inst->state_short_len; i++) {
+           en2 += residual[index+i]*residual[index+i];
+       }
+
+
+       if (en1 > en2) {
+           state_first = 1;
+           start_pos = (start-1)*SUBL;
+       } else {
+           state_first = 0;
+           start_pos = (start-1)*SUBL + diff;
+       }
+
+       /* scalar quantization of state */
+
+       StateSearchW(iLBCenc_inst, &residual[start_pos],
+           &syntdenum[(start-1)*(LPC_FILTERORDER+1)],
+           &weightdenum[(start-1)*(LPC_FILTERORDER+1)], &idxForMax,
+           idxVec, iLBCenc_inst->state_short_len, state_first);
+
+       StateConstructW(idxForMax, idxVec,
+           &syntdenum[(start-1)*(LPC_FILTERORDER+1)],
+           &decresidual[start_pos], iLBCenc_inst->state_short_len);
+
+       /* predictive quantization in state */
+
+       if (state_first) { /* put adaptive part in the end */
+
+           /* setup memory */
+
+           memset(mem, 0,
+               (CB_MEML-iLBCenc_inst->state_short_len)*sizeof(float));
+           memcpy(mem+CB_MEML-iLBCenc_inst->state_short_len,
+               decresidual+start_pos,
+               iLBCenc_inst->state_short_len*sizeof(float));
+           memset(weightState, 0, LPC_FILTERORDER*sizeof(float));
+
+           /* encode sub-frames */
+
+           iCBSearch(iLBCenc_inst, extra_cb_index, extra_gain_index,
+               &residual[start_pos+iLBCenc_inst->state_short_len],
+               mem+CB_MEML-stMemLTbl,
+               stMemLTbl, diff, CB_NSTAGES,
+
+
+
+
+
+               &weightdenum[start*(LPC_FILTERORDER+1)],
+               weightState, 0);
+
+           /* construct decoded vector */
+
+           iCBConstruct(
+               &decresidual[start_pos+iLBCenc_inst->state_short_len],
+               extra_cb_index, extra_gain_index,
+               mem+CB_MEML-stMemLTbl,
+               stMemLTbl, diff, CB_NSTAGES);
+
+       }
+       else { /* put adaptive part in the beginning */
+
+           /* create reversed vectors for prediction */
+
+           for (k=0; k<diff; k++) {
+               reverseResidual[k] = residual[(start+1)*SUBL-1
+                   -(k+iLBCenc_inst->state_short_len)];
+           }
+
+           /* setup memory */
+
+           meml_gotten = iLBCenc_inst->state_short_len;
+           for (k=0; k<meml_gotten; k++) {
+               mem[CB_MEML-1-k] = decresidual[start_pos + k];
+           }
+           memset(mem, 0, (CB_MEML-k)*sizeof(float));
+           memset(weightState, 0, LPC_FILTERORDER*sizeof(float));
+
+           /* encode sub-frames */
+
+           iCBSearch(iLBCenc_inst, extra_cb_index, extra_gain_index,
+               reverseResidual, mem+CB_MEML-stMemLTbl, stMemLTbl,
+               diff, CB_NSTAGES,
+               &weightdenum[(start-1)*(LPC_FILTERORDER+1)],
+               weightState, 0);
+
+           /* construct decoded vector */
+
+           iCBConstruct(reverseDecresidual, extra_cb_index,
+               extra_gain_index, mem+CB_MEML-stMemLTbl, stMemLTbl,
+               diff, CB_NSTAGES);
+
+           /* get decoded residual from reversed vector */
+
+           for (k=0; k<diff; k++) {
+               decresidual[start_pos-1-k] = reverseDecresidual[k];
+
+
+
+
+
+           }
+       }
+
+       /* counter for predicted sub-frames */
+
+       subcount=0;
+
+       /* forward prediction of sub-frames */
+
+       Nfor = iLBCenc_inst->nsub-start-1;
+
+
+       if ( Nfor > 0 ) {
+
+           /* setup memory */
+
+           memset(mem, 0, (CB_MEML-STATE_LEN)*sizeof(float));
+           memcpy(mem+CB_MEML-STATE_LEN, decresidual+(start-1)*SUBL,
+               STATE_LEN*sizeof(float));
+           memset(weightState, 0, LPC_FILTERORDER*sizeof(float));
+
+           /* loop over sub-frames to encode */
+
+           for (subframe=0; subframe<Nfor; subframe++) {
+
+               /* encode sub-frame */
+
+               iCBSearch(iLBCenc_inst, cb_index+subcount*CB_NSTAGES,
+                   gain_index+subcount*CB_NSTAGES,
+                   &residual[(start+1+subframe)*SUBL],
+                   mem+CB_MEML-memLfTbl[subcount],
+                   memLfTbl[subcount], SUBL, CB_NSTAGES,
+                   &weightdenum[(start+1+subframe)*
+                               (LPC_FILTERORDER+1)],
+                   weightState, subcount+1);
+
+               /* construct decoded vector */
+
+               iCBConstruct(&decresidual[(start+1+subframe)*SUBL],
+                   cb_index+subcount*CB_NSTAGES,
+                   gain_index+subcount*CB_NSTAGES,
+                   mem+CB_MEML-memLfTbl[subcount],
+                   memLfTbl[subcount], SUBL, CB_NSTAGES);
+
+               /* update memory */
+
+               memcpy(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
+               memcpy(mem+CB_MEML-SUBL,
+
+
+
+
+
+                   &decresidual[(start+1+subframe)*SUBL],
+                   SUBL*sizeof(float));
+               memset(weightState, 0, LPC_FILTERORDER*sizeof(float));
+
+               subcount++;
+           }
+       }
+
+
+       /* backward prediction of sub-frames */
+
+       Nback = start-1;
+
+
+       if ( Nback > 0 ) {
+
+           /* create reverse order vectors */
+
+           for (n=0; n<Nback; n++) {
+               for (k=0; k<SUBL; k++) {
+                   reverseResidual[n*SUBL+k] =
+                       residual[(start-1)*SUBL-1-n*SUBL-k];
+                   reverseDecresidual[n*SUBL+k] =
+                       decresidual[(start-1)*SUBL-1-n*SUBL-k];
+               }
+           }
+
+           /* setup memory */
+
+           meml_gotten = SUBL*(iLBCenc_inst->nsub+1-start);
+
+
+           if ( meml_gotten > CB_MEML ) {
+               meml_gotten=CB_MEML;
+           }
+           for (k=0; k<meml_gotten; k++) {
+               mem[CB_MEML-1-k] = decresidual[(start-1)*SUBL + k];
+           }
+           memset(mem, 0, (CB_MEML-k)*sizeof(float));
+           memset(weightState, 0, LPC_FILTERORDER*sizeof(float));
+
+           /* loop over sub-frames to encode */
+
+           for (subframe=0; subframe<Nback; subframe++) {
+
+               /* encode sub-frame */
+
+               iCBSearch(iLBCenc_inst, cb_index+subcount*CB_NSTAGES,
+
+
+
+
+
+                   gain_index+subcount*CB_NSTAGES,
+                   &reverseResidual[subframe*SUBL],
+                   mem+CB_MEML-memLfTbl[subcount],
+                   memLfTbl[subcount], SUBL, CB_NSTAGES,
+                   &weightdenum[(start-2-subframe)*
+                               (LPC_FILTERORDER+1)],
+                   weightState, subcount+1);
+
+               /* construct decoded vector */
+
+               iCBConstruct(&reverseDecresidual[subframe*SUBL],
+                   cb_index+subcount*CB_NSTAGES,
+                   gain_index+subcount*CB_NSTAGES,
+                   mem+CB_MEML-memLfTbl[subcount],
+                   memLfTbl[subcount], SUBL, CB_NSTAGES);
+
+               /* update memory */
+
+               memcpy(mem, mem+SUBL, (CB_MEML-SUBL)*sizeof(float));
+               memcpy(mem+CB_MEML-SUBL,
+                   &reverseDecresidual[subframe*SUBL],
+                   SUBL*sizeof(float));
+               memset(weightState, 0, LPC_FILTERORDER*sizeof(float));
+
+               subcount++;
+
+           }
+
+           /* get decoded residual from reversed vector */
+
+           for (i=0; i<SUBL*Nback; i++) {
+               decresidual[SUBL*Nback - i - 1] =
+                   reverseDecresidual[i];
+           }
+       }
+       /* end encoding part */
+
+       /* adjust index */
+       index_conv_enc(cb_index);
+
+       /* pack bytes */
+
+       pbytes=bytes;
+       pos=0;
+
+       /* loop over the 3 ULP classes */
+
+       for (ulp=0; ulp<3; ulp++) {
+
+
+
+
+
+
+           /* LSF */
+           for (k=0; k<LSF_NSPLIT*iLBCenc_inst->lpc_n; k++) {
+               packsplit(&lsf_i[k], &firstpart, &lsf_i[k],
+                   iLBCenc_inst->ULP_inst->lsf_bits[k][ulp],
+                   iLBCenc_inst->ULP_inst->lsf_bits[k][ulp]+
+                   iLBCenc_inst->ULP_inst->lsf_bits[k][ulp+1]+
+                   iLBCenc_inst->ULP_inst->lsf_bits[k][ulp+2]);
+               dopack( &pbytes, firstpart,
+                   iLBCenc_inst->ULP_inst->lsf_bits[k][ulp], &pos);
+           }
+
+           /* Start block info */
+
+           packsplit(&start, &firstpart, &start,
+               iLBCenc_inst->ULP_inst->start_bits[ulp],
+               iLBCenc_inst->ULP_inst->start_bits[ulp]+
+               iLBCenc_inst->ULP_inst->start_bits[ulp+1]+
+               iLBCenc_inst->ULP_inst->start_bits[ulp+2]);
+           dopack( &pbytes, firstpart,
+               iLBCenc_inst->ULP_inst->start_bits[ulp], &pos);
+
+           packsplit(&state_first, &firstpart, &state_first,
+               iLBCenc_inst->ULP_inst->startfirst_bits[ulp],
+               iLBCenc_inst->ULP_inst->startfirst_bits[ulp]+
+               iLBCenc_inst->ULP_inst->startfirst_bits[ulp+1]+
+               iLBCenc_inst->ULP_inst->startfirst_bits[ulp+2]);
+           dopack( &pbytes, firstpart,
+               iLBCenc_inst->ULP_inst->startfirst_bits[ulp], &pos);
+
+           packsplit(&idxForMax, &firstpart, &idxForMax,
+               iLBCenc_inst->ULP_inst->scale_bits[ulp],
+               iLBCenc_inst->ULP_inst->scale_bits[ulp]+
+               iLBCenc_inst->ULP_inst->scale_bits[ulp+1]+
+               iLBCenc_inst->ULP_inst->scale_bits[ulp+2]);
+           dopack( &pbytes, firstpart,
+               iLBCenc_inst->ULP_inst->scale_bits[ulp], &pos);
+
+           for (k=0; k<iLBCenc_inst->state_short_len; k++) {
+               packsplit(idxVec+k, &firstpart, idxVec+k,
+                   iLBCenc_inst->ULP_inst->state_bits[ulp],
+                   iLBCenc_inst->ULP_inst->state_bits[ulp]+
+                   iLBCenc_inst->ULP_inst->state_bits[ulp+1]+
+                   iLBCenc_inst->ULP_inst->state_bits[ulp+2]);
+               dopack( &pbytes, firstpart,
+                   iLBCenc_inst->ULP_inst->state_bits[ulp], &pos);
+           }
+
+
+
+
+
+
+           /* 23/22 (20ms/30ms) sample block */
+
+           for (k=0;k<CB_NSTAGES;k++) {
+               packsplit(extra_cb_index+k, &firstpart,
+                   extra_cb_index+k,
+                   iLBCenc_inst->ULP_inst->extra_cb_index[k][ulp],
+                   iLBCenc_inst->ULP_inst->extra_cb_index[k][ulp]+
+                   iLBCenc_inst->ULP_inst->extra_cb_index[k][ulp+1]+
+                   iLBCenc_inst->ULP_inst->extra_cb_index[k][ulp+2]);
+               dopack( &pbytes, firstpart,
+                   iLBCenc_inst->ULP_inst->extra_cb_index[k][ulp],
+                   &pos);
+           }
+
+           for (k=0;k<CB_NSTAGES;k++) {
+               packsplit(extra_gain_index+k, &firstpart,
+                   extra_gain_index+k,
+                   iLBCenc_inst->ULP_inst->extra_cb_gain[k][ulp],
+                   iLBCenc_inst->ULP_inst->extra_cb_gain[k][ulp]+
+                   iLBCenc_inst->ULP_inst->extra_cb_gain[k][ulp+1]+
+                   iLBCenc_inst->ULP_inst->extra_cb_gain[k][ulp+2]);
+               dopack( &pbytes, firstpart,
+                   iLBCenc_inst->ULP_inst->extra_cb_gain[k][ulp],
+                   &pos);
+           }
+
+           /* The two/four (20ms/30ms) 40 sample sub-blocks */
+
+           for (i=0; i<iLBCenc_inst->nasub; i++) {
+               for (k=0; k<CB_NSTAGES; k++) {
+                   packsplit(cb_index+i*CB_NSTAGES+k, &firstpart,
+                       cb_index+i*CB_NSTAGES+k,
+                       iLBCenc_inst->ULP_inst->cb_index[i][k][ulp],
+                       iLBCenc_inst->ULP_inst->cb_index[i][k][ulp]+
+                       iLBCenc_inst->ULP_inst->cb_index[i][k][ulp+1]+
+                       iLBCenc_inst->ULP_inst->cb_index[i][k][ulp+2]);
+                   dopack( &pbytes, firstpart,
+                       iLBCenc_inst->ULP_inst->cb_index[i][k][ulp],
+                       &pos);
+               }
+           }
+
+           for (i=0; i<iLBCenc_inst->nasub; i++) {
+               for (k=0; k<CB_NSTAGES; k++) {
+                   packsplit(gain_index+i*CB_NSTAGES+k, &firstpart,
+                       gain_index+i*CB_NSTAGES+k,
+                       iLBCenc_inst->ULP_inst->cb_gain[i][k][ulp],
+                       iLBCenc_inst->ULP_inst->cb_gain[i][k][ulp]+
+
+
+
+
+
+                       iLBCenc_inst->ULP_inst->cb_gain[i][k][ulp+1]+
+                       iLBCenc_inst->ULP_inst->cb_gain[i][k][ulp+2]);
+                   dopack( &pbytes, firstpart,
+                       iLBCenc_inst->ULP_inst->cb_gain[i][k][ulp],
+                       &pos);
+               }
+           }
+       }
+
+       /* set the last bit to zero (otherwise the decoder
+          will treat it as a lost frame) */
+       dopack( &pbytes, 0, 1, &pos);
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_encode.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_encode.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_encode.h	(revision 1163)
@@ -0,0 +1,39 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       iLBC_encode.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_ILBCENCODE_H
+   #define __iLBC_ILBCENCODE_H
+
+   #include "iLBC_define.h"
+
+   short initEncode(                   /* (o) Number of bytes
+                                              encoded */
+       iLBC_Enc_Inst_t *iLBCenc_inst,  /* (i/o) Encoder instance */
+       int mode                    /* (i) frame size mode */
+   );
+
+   void iLBC_encode(
+
+       unsigned char *bytes,           /* (o) encoded data bits iLBC */
+       float *block,                   /* (o) speech vector to
+                                              encode */
+       iLBC_Enc_Inst_t *iLBCenc_inst   /* (i/o) the general encoder
+                                              state */
+   );
+
+   #endif
+
+
+
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/iLBC_test.c	(revision 1163)
@@ -0,0 +1,310 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       iLBC_test.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <math.h>
+   #include <stdlib.h>
+   #include <stdio.h>
+   #include <string.h>
+   #include "iLBC_define.h"
+   #include "iLBC_encode.h"
+   #include "iLBC_decode.h"
+
+   /* Runtime statistics */
+   #include <time.h>
+
+   #define ILBCNOOFWORDS_MAX   (NO_OF_BYTES_30MS/2)
+
+   /*----------------------------------------------------------------*
+    *  Encoder interface function
+
+
+
+
+
+    *---------------------------------------------------------------*/
+
+   short encode(   /* (o) Number of bytes encoded */
+       iLBC_Enc_Inst_t *iLBCenc_inst,
+                                   /* (i/o) Encoder instance */
+       short *encoded_data,    /* (o) The encoded bytes */
+       short *data                 /* (i) The signal block to encode*/
+   ){
+       float block[BLOCKL_MAX];
+       int k;
+
+       /* convert signal to float */
+
+       for (k=0; k<iLBCenc_inst->blockl; k++)
+           block[k] = (float)data[k];
+
+       /* do the actual encoding */
+
+       iLBC_encode((unsigned char *)encoded_data, block, iLBCenc_inst);
+
+
+       return (iLBCenc_inst->no_of_bytes);
+   }
+
+   /*----------------------------------------------------------------*
+    *  Decoder interface function
+    *---------------------------------------------------------------*/
+
+   short decode(       /* (o) Number of decoded samples */
+       iLBC_Dec_Inst_t *iLBCdec_inst,  /* (i/o) Decoder instance */
+       short *decoded_data,        /* (o) Decoded signal block*/
+       short *encoded_data,        /* (i) Encoded bytes */
+       short mode                       /* (i) 0=PL, 1=Normal */
+   ){
+       int k;
+       float decblock[BLOCKL_MAX], dtmp;
+
+       /* check if mode is valid */
+
+       if (mode<0 || mode>1) {
+           printf("\nERROR - Wrong mode - 0, 1 allowed\n"); exit(3);}
+
+       /* do actual decoding of block */
+
+       iLBC_decode(decblock, (unsigned char *)encoded_data,
+           iLBCdec_inst, mode);
+
+       /* convert to short */
+
+
+
+
+
+       for (k=0; k<iLBCdec_inst->blockl; k++){
+           dtmp=decblock[k];
+
+           if (dtmp<MIN_SAMPLE)
+               dtmp=MIN_SAMPLE;
+           else if (dtmp>MAX_SAMPLE)
+               dtmp=MAX_SAMPLE;
+           decoded_data[k] = (short) dtmp;
+       }
+
+       return (iLBCdec_inst->blockl);
+   }
+
+   /*---------------------------------------------------------------*
+    *  Main program to test iLBC encoding and decoding
+    *
+    *  Usage:
+    *    exefile_name.exe <infile> <bytefile> <outfile> <channel>
+    *
+    *    <infile>   : Input file, speech for encoder (16-bit pcm file)
+    *    <bytefile> : Bit stream output from the encoder
+    *    <outfile>  : Output file, decoded speech (16-bit pcm file)
+    *    <channel>  : Bit error file, optional (16-bit)
+    *                     1 - Packet received correctly
+    *                     0 - Packet Lost
+    *
+    *--------------------------------------------------------------*/
+
+   int main(int argc, char* argv[])
+   {
+
+       /* Runtime statistics */
+
+       float starttime;
+       float runtime;
+       float outtime;
+
+       FILE *ifileid,*efileid,*ofileid, *cfileid;
+       short data[BLOCKL_MAX];
+       short encoded_data[ILBCNOOFWORDS_MAX], decoded_data[BLOCKL_MAX];
+       int len;
+       short pli, mode;
+       int blockcount = 0;
+       int packetlosscount = 0;
+
+       /* Create structs */
+       iLBC_Enc_Inst_t Enc_Inst;
+       iLBC_Dec_Inst_t Dec_Inst;
+
+
+
+
+
+       /* get arguments and open files */
+
+       if ((argc!=5) && (argc!=6)) {
+           fprintf(stderr,
+           "\n*-----------------------------------------------*\n");
+           fprintf(stderr,
+           "   %s <20,30> input encoded decoded (channel)\n\n",
+               argv[0]);
+           fprintf(stderr,
+           "   mode    : Frame size for the encoding/decoding\n");
+           fprintf(stderr,
+           "                 20 - 20 ms\n");
+           fprintf(stderr,
+           "                 30 - 30 ms\n");
+           fprintf(stderr,
+           "   input   : Speech for encoder (16-bit pcm file)\n");
+           fprintf(stderr,
+           "   encoded : Encoded bit stream\n");
+           fprintf(stderr,
+           "   decoded : Decoded speech (16-bit pcm file)\n");
+           fprintf(stderr,
+           "   channel : Packet loss pattern, optional (16-bit)\n");
+           fprintf(stderr,
+           "                  1 - Packet received correctly\n");
+           fprintf(stderr,
+           "                  0 - Packet Lost\n");
+           fprintf(stderr,
+           "*-----------------------------------------------*\n\n");
+           exit(1);
+       }
+       mode=atoi(argv[1]);
+       if (mode != 20 && mode != 30) {
+           fprintf(stderr,"Wrong mode %s, must be 20, or 30\n",
+               argv[1]);
+           exit(2);
+       }
+       if ( (ifileid=fopen(argv[2],"rb")) == NULL) {
+           fprintf(stderr,"Cannot open input file %s\n", argv[2]);
+           exit(2);}
+       if ( (efileid=fopen(argv[3],"wb")) == NULL) {
+           fprintf(stderr, "Cannot open encoded file %s\n",
+               argv[3]); exit(1);}
+       if ( (ofileid=fopen(argv[4],"wb")) == NULL) {
+           fprintf(stderr, "Cannot open decoded file %s\n",
+               argv[4]); exit(1);}
+       if (argc==6) {
+           if( (cfileid=fopen(argv[5],"rb")) == NULL) {
+               fprintf(stderr, "Cannot open channel file %s\n",
+
+
+
+
+
+                   argv[5]);
+               exit(1);
+           }
+       } else {
+           cfileid=NULL;
+       }
+
+       /* print info */
+
+       fprintf(stderr, "\n");
+       fprintf(stderr,
+           "*---------------------------------------------------*\n");
+       fprintf(stderr,
+           "*                                                   *\n");
+       fprintf(stderr,
+           "*      iLBC test program                            *\n");
+       fprintf(stderr,
+           "*                                                   *\n");
+       fprintf(stderr,
+           "*                                                   *\n");
+       fprintf(stderr,
+           "*---------------------------------------------------*\n");
+       fprintf(stderr,"\nMode           : %2d ms\n", mode);
+       fprintf(stderr,"Input file     : %s\n", argv[2]);
+       fprintf(stderr,"Encoded file   : %s\n", argv[3]);
+       fprintf(stderr,"Output file    : %s\n", argv[4]);
+       if (argc==6) {
+           fprintf(stderr,"Channel file   : %s\n", argv[5]);
+       }
+       fprintf(stderr,"\n");
+
+       /* Initialization */
+
+       initEncode(&Enc_Inst, mode);
+       initDecode(&Dec_Inst, mode, 1);
+
+       /* Runtime statistics */
+
+       starttime=clock()/(float)CLOCKS_PER_SEC;
+
+       /* loop over input blocks */
+
+       while (fread(data,sizeof(short),Enc_Inst.blockl,ifileid)==
+               Enc_Inst.blockl) {
+
+           blockcount++;
+
+           /* encoding */
+
+
+
+
+
+           fprintf(stderr, "--- Encoding block %i --- ",blockcount);
+           len=encode(&Enc_Inst, encoded_data, data);
+           fprintf(stderr, "\r");
+
+           /* write byte file */
+
+           fwrite(encoded_data, sizeof(unsigned char), len, efileid);
+
+           /* get channel data if provided */
+           if (argc==6) {
+               if (fread(&pli, sizeof(short), 1, cfileid)) {
+                   if ((pli!=0)&&(pli!=1)) {
+                       fprintf(stderr, "Error in channel file\n");
+                       exit(0);
+                   }
+                   if (pli==0) {
+                       /* Packet loss -> remove info from frame */
+                       memset(encoded_data, 0,
+                           sizeof(short)*ILBCNOOFWORDS_MAX);
+                       packetlosscount++;
+                   }
+               } else {
+                   fprintf(stderr, "Error. Channel file too short\n");
+                   exit(0);
+               }
+           } else {
+               pli=1;
+           }
+
+           /* decoding */
+
+           fprintf(stderr, "--- Decoding block %i --- ",blockcount);
+
+           len=decode(&Dec_Inst, decoded_data, encoded_data, pli);
+           fprintf(stderr, "\r");
+
+           /* write output file */
+
+           fwrite(decoded_data,sizeof(short),len,ofileid);
+       }
+
+       /* Runtime statistics */
+
+       runtime = (float)(clock()/(float)CLOCKS_PER_SEC-starttime);
+       outtime = (float)((float)blockcount*(float)mode/1000.0);
+       printf("\n\nLength of speech file: %.1f s\n", outtime);
+       printf("Packet loss          : %.1f%%\n",
+           100.0*(float)packetlosscount/(float)blockcount);
+
+
+
+
+
+       printf("Time to run iLBC     :");
+       printf(" %.1f s (%.1f %% of realtime)\n\n", runtime,
+           (100*runtime/outtime));
+
+       /* close files */
+
+       fclose(ifileid);  fclose(efileid); fclose(ofileid);
+       if (argc==6) {
+           fclose(cfileid);
+       }
+       return(0);
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/lsf.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/lsf.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/lsf.c	(revision 1163)
@@ -0,0 +1,283 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       lsf.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <string.h>
+
+
+
+
+
+   #include <math.h>
+
+   #include "iLBC_define.h"
+
+   /*----------------------------------------------------------------*
+    *  conversion from lpc coefficients to lsf coefficients
+    *---------------------------------------------------------------*/
+
+   void a2lsf(
+       float *freq,/* (o) lsf coefficients */
+       float *a    /* (i) lpc coefficients */
+   ){
+       float steps[LSF_NUMBER_OF_STEPS] =
+           {(float)0.00635, (float)0.003175, (float)0.0015875,
+           (float)0.00079375};
+       float step;
+       int step_idx;
+       int lsp_index;
+       float p[LPC_HALFORDER];
+       float q[LPC_HALFORDER];
+       float p_pre[LPC_HALFORDER];
+       float q_pre[LPC_HALFORDER];
+       float old_p, old_q, *old;
+       float *pq_coef;
+       float omega, old_omega;
+       int i;
+       float hlp, hlp1, hlp2, hlp3, hlp4, hlp5;
+
+       for (i=0; i<LPC_HALFORDER; i++) {
+           p[i] = (float)-1.0 * (a[i + 1] + a[LPC_FILTERORDER - i]);
+           q[i] = a[LPC_FILTERORDER - i] - a[i + 1];
+       }
+
+       p_pre[0] = (float)-1.0 - p[0];
+       p_pre[1] = - p_pre[0] - p[1];
+       p_pre[2] = - p_pre[1] - p[2];
+       p_pre[3] = - p_pre[2] - p[3];
+       p_pre[4] = - p_pre[3] - p[4];
+       p_pre[4] = p_pre[4] / 2;
+
+       q_pre[0] = (float)1.0 - q[0];
+       q_pre[1] = q_pre[0] - q[1];
+       q_pre[2] = q_pre[1] - q[2];
+       q_pre[3] = q_pre[2] - q[3];
+       q_pre[4] = q_pre[3] - q[4];
+       q_pre[4] = q_pre[4] / 2;
+
+       omega = 0.0;
+
+
+
+
+
+       old_omega = 0.0;
+
+       old_p = FLOAT_MAX;
+       old_q = FLOAT_MAX;
+
+       /* Here we loop through lsp_index to find all the
+          LPC_FILTERORDER roots for omega. */
+
+       for (lsp_index = 0; lsp_index<LPC_FILTERORDER; lsp_index++) {
+
+           /* Depending on lsp_index being even or odd, we
+           alternatively solve the roots for the two LSP equations. */
+
+
+           if ((lsp_index & 0x1) == 0) {
+               pq_coef = p_pre;
+               old = &old_p;
+           } else {
+               pq_coef = q_pre;
+               old = &old_q;
+           }
+
+           /* Start with low resolution grid */
+
+           for (step_idx = 0, step = steps[step_idx];
+               step_idx < LSF_NUMBER_OF_STEPS;){
+
+               /*  cos(10piw) + pq(0)cos(8piw) + pq(1)cos(6piw) +
+               pq(2)cos(4piw) + pq(3)cod(2piw) + pq(4) */
+
+               hlp = (float)cos(omega * TWO_PI);
+               hlp1 = (float)2.0 * hlp + pq_coef[0];
+               hlp2 = (float)2.0 * hlp * hlp1 - (float)1.0 +
+                   pq_coef[1];
+               hlp3 = (float)2.0 * hlp * hlp2 - hlp1 + pq_coef[2];
+               hlp4 = (float)2.0 * hlp * hlp3 - hlp2 + pq_coef[3];
+               hlp5 = hlp * hlp4 - hlp3 + pq_coef[4];
+
+
+               if (((hlp5 * (*old)) <= 0.0) || (omega >= 0.5)){
+
+                   if (step_idx == (LSF_NUMBER_OF_STEPS - 1)){
+
+                       if (fabs(hlp5) >= fabs(*old)) {
+                           freq[lsp_index] = omega - step;
+                       } else {
+                           freq[lsp_index] = omega;
+                       }
+
+
+
+
+
+
+
+                       if ((*old) >= 0.0){
+                           *old = (float)-1.0 * FLOAT_MAX;
+                       } else {
+                           *old = FLOAT_MAX;
+                       }
+
+                       omega = old_omega;
+                       step_idx = 0;
+
+                       step_idx = LSF_NUMBER_OF_STEPS;
+                   } else {
+
+                       if (step_idx == 0) {
+                           old_omega = omega;
+                       }
+
+                       step_idx++;
+                       omega -= steps[step_idx];
+
+                       /* Go back one grid step */
+
+                       step = steps[step_idx];
+                   }
+               } else {
+
+               /* increment omega until they are of different sign,
+               and we know there is at least one root between omega
+               and old_omega */
+                   *old = hlp5;
+                   omega += step;
+               }
+           }
+       }
+
+       for (i = 0; i<LPC_FILTERORDER; i++) {
+           freq[i] = freq[i] * TWO_PI;
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  conversion from lsf coefficients to lpc coefficients
+    *---------------------------------------------------------------*/
+
+   void lsf2a(
+       float *a_coef,  /* (o) lpc coefficients */
+       float *freq     /* (i) lsf coefficients */
+
+
+
+
+
+   ){
+       int i, j;
+       float hlp;
+       float p[LPC_HALFORDER], q[LPC_HALFORDER];
+       float a[LPC_HALFORDER + 1], a1[LPC_HALFORDER],
+           a2[LPC_HALFORDER];
+       float b[LPC_HALFORDER + 1], b1[LPC_HALFORDER],
+           b2[LPC_HALFORDER];
+
+       for (i=0; i<LPC_FILTERORDER; i++) {
+           freq[i] = freq[i] * PI2;
+       }
+
+       /* Check input for ill-conditioned cases.  This part is not
+       found in the TIA standard.  It involves the following 2 IF
+       blocks.  If "freq" is judged ill-conditioned, then we first
+       modify freq[0] and freq[LPC_HALFORDER-1] (normally
+       LPC_HALFORDER = 10 for LPC applications), then we adjust
+       the other "freq" values slightly */
+
+
+       if ((freq[0] <= 0.0) || (freq[LPC_FILTERORDER - 1] >= 0.5)){
+
+
+           if (freq[0] <= 0.0) {
+               freq[0] = (float)0.022;
+           }
+
+
+           if (freq[LPC_FILTERORDER - 1] >= 0.5) {
+               freq[LPC_FILTERORDER - 1] = (float)0.499;
+           }
+
+           hlp = (freq[LPC_FILTERORDER - 1] - freq[0]) /
+               (float) (LPC_FILTERORDER - 1);
+
+           for (i=1; i<LPC_FILTERORDER; i++) {
+               freq[i] = freq[i - 1] + hlp;
+           }
+       }
+
+       memset(a1, 0, LPC_HALFORDER*sizeof(float));
+       memset(a2, 0, LPC_HALFORDER*sizeof(float));
+       memset(b1, 0, LPC_HALFORDER*sizeof(float));
+       memset(b2, 0, LPC_HALFORDER*sizeof(float));
+       memset(a, 0, (LPC_HALFORDER+1)*sizeof(float));
+       memset(b, 0, (LPC_HALFORDER+1)*sizeof(float));
+
+
+
+
+
+
+       /* p[i] and q[i] compute cos(2*pi*omega_{2j}) and
+       cos(2*pi*omega_{2j-1} in eqs. 4.2.2.2-1 and 4.2.2.2-2.
+       Note that for this code p[i] specifies the coefficients
+       used in .Q_A(z) while q[i] specifies the coefficients used
+       in .P_A(z) */
+
+       for (i=0; i<LPC_HALFORDER; i++) {
+           p[i] = (float)cos(TWO_PI * freq[2 * i]);
+           q[i] = (float)cos(TWO_PI * freq[2 * i + 1]);
+       }
+
+       a[0] = 0.25;
+       b[0] = 0.25;
+
+       for (i= 0; i<LPC_HALFORDER; i++) {
+           a[i + 1] = a[i] - 2 * p[i] * a1[i] + a2[i];
+           b[i + 1] = b[i] - 2 * q[i] * b1[i] + b2[i];
+           a2[i] = a1[i];
+           a1[i] = a[i];
+           b2[i] = b1[i];
+           b1[i] = b[i];
+       }
+
+       for (j=0; j<LPC_FILTERORDER; j++) {
+
+           if (j == 0) {
+               a[0] = 0.25;
+               b[0] = -0.25;
+           } else {
+               a[0] = b[0] = 0.0;
+           }
+
+           for (i=0; i<LPC_HALFORDER; i++) {
+               a[i + 1] = a[i] - 2 * p[i] * a1[i] + a2[i];
+               b[i + 1] = b[i] - 2 * q[i] * b1[i] + b2[i];
+               a2[i] = a1[i];
+               a1[i] = a[i];
+               b2[i] = b1[i];
+               b1[i] = b[i];
+           }
+
+           a_coef[j + 1] = 2 * (a[LPC_HALFORDER] + b[LPC_HALFORDER]);
+       }
+
+       a_coef[0] = 1.0;
+   }
+
+
+
+
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/lsf.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/lsf.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/lsf.h	(revision 1163)
@@ -0,0 +1,27 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       lsf.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_LSF_H
+   #define __iLBC_LSF_H
+
+   void a2lsf(
+       float *freq,/* (o) lsf coefficients */
+       float *a    /* (i) lpc coefficients */
+   );
+
+   void lsf2a(
+       float *a_coef,  /* (o) lpc coefficients */
+       float *freq     /* (i) lsf coefficients */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/packing.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/packing.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/packing.c	(revision 1163)
@@ -0,0 +1,182 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       packing.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include <math.h>
+   #include <stdlib.h>
+
+   #include "iLBC_define.h"
+   #include "constants.h"
+   #include "helpfun.h"
+   #include "string.h"
+
+   /*----------------------------------------------------------------*
+    *  splitting an integer into first most significant bits and
+    *  remaining least significant bits
+    *---------------------------------------------------------------*/
+
+   void packsplit(
+       int *index,                 /* (i) the value to split */
+       int *firstpart,             /* (o) the value specified by most
+                                          significant bits */
+       int *rest,                  /* (o) the value specified by least
+                                          significant bits */
+
+
+
+
+
+       int bitno_firstpart,    /* (i) number of bits in most
+                                          significant part */
+       int bitno_total             /* (i) number of bits in full range
+                                          of value */
+   ){
+       int bitno_rest = bitno_total-bitno_firstpart;
+
+       *firstpart = *index>>(bitno_rest);
+       *rest = *index-(*firstpart<<(bitno_rest));
+   }
+
+   /*----------------------------------------------------------------*
+    *  combining a value corresponding to msb's with a value
+    *  corresponding to lsb's
+    *---------------------------------------------------------------*/
+
+   void packcombine(
+       int *index,                 /* (i/o) the msb value in the
+                                          combined value out */
+       int rest,                   /* (i) the lsb value */
+       int bitno_rest              /* (i) the number of bits in the
+                                          lsb part */
+   ){
+       *index = *index<<bitno_rest;
+       *index += rest;
+   }
+
+   /*----------------------------------------------------------------*
+    *  packing of bits into bitstream, i.e., vector of bytes
+    *---------------------------------------------------------------*/
+
+   void dopack(
+       unsigned char **bitstream,  /* (i/o) on entrance pointer to
+                                          place in bitstream to pack
+                                          new data, on exit pointer
+                                          to place in bitstream to
+                                          pack future data */
+       int index,                  /* (i) the value to pack */
+       int bitno,                  /* (i) the number of bits that the
+                                          value will fit within */
+       int *pos                /* (i/o) write position in the
+                                          current byte */
+   ){
+       int posLeft;
+
+       /* Clear the bits before starting in a new byte */
+
+       if ((*pos)==0) {
+
+
+
+
+
+           **bitstream=0;
+       }
+
+       while (bitno>0) {
+
+           /* Jump to the next byte if end of this byte is reached*/
+
+           if (*pos==8) {
+               *pos=0;
+               (*bitstream)++;
+               **bitstream=0;
+           }
+
+           posLeft=8-(*pos);
+
+           /* Insert index into the bitstream */
+
+           if (bitno <= posLeft) {
+               **bitstream |= (unsigned char)(index<<(posLeft-bitno));
+               *pos+=bitno;
+               bitno=0;
+           } else {
+               **bitstream |= (unsigned char)(index>>(bitno-posLeft));
+
+               *pos=8;
+               index-=((index>>(bitno-posLeft))<<(bitno-posLeft));
+
+               bitno-=posLeft;
+           }
+       }
+   }
+
+   /*----------------------------------------------------------------*
+    *  unpacking of bits from bitstream, i.e., vector of bytes
+    *---------------------------------------------------------------*/
+
+   void unpack(
+       unsigned char **bitstream,  /* (i/o) on entrance pointer to
+                                          place in bitstream to
+                                          unpack new data from, on
+                                          exit pointer to place in
+                                          bitstream to unpack future
+                                          data from */
+       int *index,                 /* (o) resulting value */
+       int bitno,                  /* (i) number of bits used to
+                                          represent the value */
+       int *pos                /* (i/o) read position in the
+                                          current byte */
+
+
+
+
+
+   ){
+       int BitsLeft;
+
+       *index=0;
+
+       while (bitno>0) {
+
+           /* move forward in bitstream when the end of the
+              byte is reached */
+
+           if (*pos==8) {
+               *pos=0;
+               (*bitstream)++;
+           }
+
+           BitsLeft=8-(*pos);
+
+           /* Extract bits to index */
+
+           if (BitsLeft>=bitno) {
+               *index+=((((**bitstream)<<(*pos)) & 0xFF)>>(8-bitno));
+
+               *pos+=bitno;
+               bitno=0;
+           } else {
+
+               if ((8-bitno)>0) {
+                   *index+=((((**bitstream)<<(*pos)) & 0xFF)>>
+                       (8-bitno));
+                   *pos=8;
+               } else {
+                   *index+=(((int)(((**bitstream)<<(*pos)) & 0xFF))<<
+                       (bitno-8));
+                   *pos=8;
+               }
+               bitno-=BitsLeft;
+           }
+       }
+   }
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/packing.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/packing.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/packing.h	(revision 1163)
@@ -0,0 +1,68 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       packing.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __PACKING_H
+   #define __PACKING_H
+
+   void packsplit(
+       int *index,                 /* (i) the value to split */
+       int *firstpart,             /* (o) the value specified by most
+                                          significant bits */
+       int *rest,                  /* (o) the value specified by least
+                                          significant bits */
+       int bitno_firstpart,    /* (i) number of bits in most
+                                          significant part */
+       int bitno_total             /* (i) number of bits in full range
+                                          of value */
+   );
+
+   void packcombine(
+       int *index,                 /* (i/o) the msb value in the
+                                          combined value out */
+       int rest,                   /* (i) the lsb value */
+       int bitno_rest              /* (i) the number of bits in the
+                                          lsb part */
+   );
+
+   void dopack(
+       unsigned char **bitstream,  /* (i/o) on entrance pointer to
+                                          place in bitstream to pack
+                                          new data, on exit pointer
+                                          to place in bitstream to
+                                          pack future data */
+       int index,                  /* (i) the value to pack */
+       int bitno,                  /* (i) the number of bits that the
+                                          value will fit within */
+       int *pos                /* (i/o) write position in the
+                                          current byte */
+   );
+
+
+
+
+
+   void unpack(
+       unsigned char **bitstream,  /* (i/o) on entrance pointer to
+                                          place in bitstream to
+                                          unpack new data from, on
+                                          exit pointer to place in
+                                          bitstream to unpack future
+                                          data from */
+       int *index,                 /* (o) resulting value */
+       int bitno,                  /* (i) number of bits used to
+                                          represent the value */
+       int *pos                /* (i/o) read position in the
+                                          current byte */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/syntFilter.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/syntFilter.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/syntFilter.c	(revision 1163)
@@ -0,0 +1,80 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       syntFilter.c
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #include "iLBC_define.h"
+
+   /*----------------------------------------------------------------*
+    *  LP synthesis filter.
+    *---------------------------------------------------------------*/
+
+   void syntFilter(
+       float *Out,     /* (i/o) Signal to be filtered */
+       float *a,       /* (i) LP parameters */
+       int len,    /* (i) Length of signal */
+
+
+
+
+
+       float *mem      /* (i/o) Filter state */
+   ){
+       int i, j;
+       float *po, *pi, *pa, *pm;
+
+       po=Out;
+
+       /* Filter first part using memory from past */
+
+       for (i=0; i<LPC_FILTERORDER; i++) {
+           pi=&Out[i-1];
+           pa=&a[1];
+           pm=&mem[LPC_FILTERORDER-1];
+           for (j=1; j<=i; j++) {
+               *po-=(*pa++)*(*pi--);
+           }
+           for (j=i+1; j<LPC_FILTERORDER+1; j++) {
+               *po-=(*pa++)*(*pm--);
+           }
+           po++;
+       }
+
+       /* Filter last part where the state is entirely in
+          the output vector */
+
+       for (i=LPC_FILTERORDER; i<len; i++) {
+           pi=&Out[i-1];
+           pa=&a[1];
+           for (j=1; j<LPC_FILTERORDER+1; j++) {
+               *po-=(*pa++)*(*pi--);
+           }
+           po++;
+       }
+
+       /* Update state vector */
+
+       memcpy(mem, &Out[len-LPC_FILTERORDER],
+           LPC_FILTERORDER*sizeof(float));
+   }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/syntFilter.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/syntFilter.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/ilbc/syntFilter.h	(revision 1163)
@@ -0,0 +1,24 @@
+
+   /******************************************************************
+
+       iLBC Speech Coder ANSI-C Source Code
+
+       syntFilter.h
+
+       Copyright (C) The Internet Society (2004).
+       All Rights Reserved.
+
+   ******************************************************************/
+
+   #ifndef __iLBC_SYNTFILTER_H
+   #define __iLBC_SYNTFILTER_H
+
+   void syntFilter(
+       float *Out,     /* (i/o) Signal to be filtered */
+       float *a,       /* (i) LP parameters */
+       int len,    /* (i) Length of signal */
+       float *mem      /* (i/o) Filter state */
+   );
+
+   #endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/l16.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/l16.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/l16.c	(revision 1163)
@@ -0,0 +1,611 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 <pjmedia-codec/l16.h>
+#include <pjmedia/codec.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/endpoint.h>
+#include <pj/assert.h>
+#include <pj/pool.h>
+#include <pj/sock.h>
+#include <pj/string.h>
+
+
+/*
+ * Only build this file if PJMEDIA_HAS_L16_CODEC != 0
+ */
+#if defined(PJMEDIA_HAS_L16_CODEC) && PJMEDIA_HAS_L16_CODEC != 0
+
+
+static const pj_str_t STR_L16 = { "L16", 3 };
+
+/* To keep frame size below 1400 MTU, set ptime to 10ms for
+ * sampling rate > 35 KHz
+ */
+#define GET_PTIME(clock_rate)	((pj_uint16_t)(clock_rate > 35000 ? 10 : 20))
+
+
+/* Prototypes for L16 factory */
+static pj_status_t l16_test_alloc( pjmedia_codec_factory *factory, 
+				    const pjmedia_codec_info *id );
+static pj_status_t l16_default_attr( pjmedia_codec_factory *factory, 
+				      const pjmedia_codec_info *id, 
+				      pjmedia_codec_param *attr );
+static pj_status_t l16_enum_codecs (pjmedia_codec_factory *factory, 
+				     unsigned *count, 
+				     pjmedia_codec_info codecs[]);
+static pj_status_t l16_alloc_codec( pjmedia_codec_factory *factory, 
+				     const pjmedia_codec_info *id, 
+				     pjmedia_codec **p_codec);
+static pj_status_t l16_dealloc_codec( pjmedia_codec_factory *factory, 
+				       pjmedia_codec *codec );
+
+/* Prototypes for L16 implementation. */
+static pj_status_t  l16_init( pjmedia_codec *codec, 
+			       pj_pool_t *pool );
+static pj_status_t  l16_open( pjmedia_codec *codec, 
+			      pjmedia_codec_param *attr );
+static pj_status_t  l16_close( pjmedia_codec *codec );
+static pj_status_t  l16_modify(pjmedia_codec *codec, 
+			       const pjmedia_codec_param *attr );
+static pj_status_t  l16_parse(pjmedia_codec *codec,
+			      void *pkt,
+			      pj_size_t pkt_size,
+			      const pj_timestamp *ts,
+			      unsigned *frame_cnt,
+			      pjmedia_frame frames[]);
+static pj_status_t  l16_encode( pjmedia_codec *codec, 
+				 const struct pjmedia_frame *input,
+				 unsigned output_buf_len, 
+				 struct pjmedia_frame *output);
+static pj_status_t  l16_decode( pjmedia_codec *codec, 
+				 const struct pjmedia_frame *input,
+				 unsigned output_buf_len, 
+				 struct pjmedia_frame *output);
+
+/* Definition for L16 codec operations. */
+static pjmedia_codec_op l16_op = 
+{
+    &l16_init,
+    &l16_open,
+    &l16_close,
+    &l16_modify,
+    &l16_parse,
+    &l16_encode,
+    &l16_decode
+};
+
+/* Definition for L16 codec factory operations. */
+static pjmedia_codec_factory_op l16_factory_op =
+{
+    &l16_test_alloc,
+    &l16_default_attr,
+    &l16_enum_codecs,
+    &l16_alloc_codec,
+    &l16_dealloc_codec
+};
+
+/* L16 factory private data */
+static struct l16_factory
+{
+    pjmedia_codec_factory	base;
+    pjmedia_endpt	       *endpt;
+    pj_pool_t		       *pool;
+    pj_mutex_t		       *mutex;
+    pjmedia_codec		codec_list;
+} l16_factory;
+
+
+/* L16 codec private data. */
+struct l16_data
+{
+    unsigned frame_size;    /* Frame size, in bytes */
+};
+
+
+
+PJ_DEF(pj_status_t) pjmedia_codec_l16_init(pjmedia_endpt *endpt,
+					   unsigned options)
+{
+    pjmedia_codec_mgr *codec_mgr;
+    pj_status_t status;
+
+
+    PJ_UNUSED_ARG(options);
+
+
+    if (l16_factory.endpt != NULL) {
+	/* Already initialized. */
+	return PJ_SUCCESS;
+    }
+
+    /* Init factory */
+    l16_factory.base.op = &l16_factory_op;
+    l16_factory.base.factory_data = NULL;
+    l16_factory.endpt = endpt;
+
+    pj_list_init(&l16_factory.codec_list);
+
+    /* Create pool */
+    l16_factory.pool = pjmedia_endpt_create_pool(endpt, "l16", 4000, 4000);
+    if (!l16_factory.pool)
+	return PJ_ENOMEM;
+
+    /* Create mutex. */
+    status = pj_mutex_create_simple(l16_factory.pool, "l16", 
+				    &l16_factory.mutex);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Get the codec manager. */
+    codec_mgr = pjmedia_endpt_get_codec_mgr(endpt);
+    if (!codec_mgr) {
+	return PJ_EINVALIDOP;
+    }
+
+    /* Register codec factory to endpoint. */
+    status = pjmedia_codec_mgr_register_factory(codec_mgr, 
+						&l16_factory.base);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    return PJ_SUCCESS;
+
+on_error:
+    if (l16_factory.mutex) {
+	pj_mutex_destroy(l16_factory.mutex);
+	l16_factory.mutex = NULL;
+    }
+    if (l16_factory.pool) {
+	pj_pool_release(l16_factory.pool);
+	l16_factory.pool = NULL;
+    }
+    return status;
+}
+
+PJ_DEF(pj_status_t) pjmedia_codec_l16_deinit(void)
+{
+    pjmedia_codec_mgr *codec_mgr;
+    pj_status_t status;
+
+    if (l16_factory.endpt == NULL) {
+	/* Not registered. */
+	return PJ_SUCCESS;
+    }
+
+    /* Lock mutex. */
+    pj_mutex_lock(l16_factory.mutex);
+
+    /* Get the codec manager. */
+    codec_mgr = pjmedia_endpt_get_codec_mgr(l16_factory.endpt);
+    if (!codec_mgr) {
+	l16_factory.endpt = NULL;
+	pj_mutex_unlock(l16_factory.mutex);
+	return PJ_EINVALIDOP;
+    }
+
+    /* Unregister L16 codec factory. */
+    status = pjmedia_codec_mgr_unregister_factory(codec_mgr,
+						  &l16_factory.base);
+    l16_factory.endpt = NULL;
+
+    /* Destroy mutex. */
+    pj_mutex_destroy(l16_factory.mutex);
+    l16_factory.mutex = NULL;
+
+
+    /* Release pool. */
+    pj_pool_release(l16_factory.pool);
+    l16_factory.pool = NULL;
+
+
+    return status;
+}
+
+static pj_status_t l16_test_alloc(pjmedia_codec_factory *factory, 
+				  const pjmedia_codec_info *id )
+{
+    PJ_UNUSED_ARG(factory);
+
+    if (pj_stricmp(&id->encoding_name, &STR_L16)==0) {
+	/* Match! */
+	return PJ_SUCCESS;
+    }
+
+    return -1;
+}
+
+static pj_status_t l16_default_attr( pjmedia_codec_factory *factory, 
+				     const pjmedia_codec_info *id, 
+				     pjmedia_codec_param *attr )
+{
+    PJ_UNUSED_ARG(factory);
+
+    pj_bzero(attr, sizeof(pjmedia_codec_param));
+    attr->info.pt = (pj_uint8_t)id->pt;
+    attr->info.clock_rate = id->clock_rate;
+    attr->info.channel_cnt = id->channel_cnt;
+    attr->info.avg_bps = id->clock_rate * id->channel_cnt * 16;
+    attr->info.pcm_bits_per_sample = 16;
+
+    /* To keep frame size below 1400 MTU, set ptime to 10ms for
+     * sampling rate > 35 KHz
+     */
+    attr->info.frm_ptime = GET_PTIME(id->clock_rate);
+
+    attr->setting.frm_per_pkt = 1;
+
+    /* Default all flag bits disabled. */
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t l16_enum_codecs( pjmedia_codec_factory *factory, 
+				    unsigned *max_count, 
+				    pjmedia_codec_info codecs[])
+{
+    unsigned count = 0;
+
+    PJ_UNUSED_ARG(factory);
+
+    if (count < *max_count) {
+	/* Register 44100Hz 1 channel L16 codec */
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_L16_1;
+	codecs[count].encoding_name = STR_L16;
+	codecs[count].clock_rate = 44100;
+	codecs[count].channel_cnt = 1;
+	++count;
+    }
+
+    if (count < *max_count) {
+	/* Register 44100Hz 2 channels L16 codec */
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_L16_2;
+	codecs[count].encoding_name = STR_L16;
+	codecs[count].clock_rate = 44100;
+	codecs[count].channel_cnt = 2;
+	++count;
+    }
+
+    if (count < *max_count) {
+	/* 8KHz mono */
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_L16_8KHZ_MONO;
+	codecs[count].encoding_name = STR_L16;
+	codecs[count].clock_rate = 8000;
+	codecs[count].channel_cnt = 1;
+	++count;
+    }
+
+    if (count < *max_count) {
+	/* 8KHz stereo */
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_L16_8KHZ_STEREO;
+	codecs[count].encoding_name = STR_L16;
+	codecs[count].clock_rate = 8000;
+	codecs[count].channel_cnt = 2;
+	++count;
+    }
+
+    if (count < *max_count) {
+	/* 11025 Hz mono */
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_L16_11KHZ_MONO;
+	codecs[count].encoding_name = STR_L16;
+	codecs[count].clock_rate = 11025;
+	codecs[count].channel_cnt = 1;
+	++count;
+    }
+
+    if (count < *max_count) {
+	/* 11025 Hz stereo */
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_L16_11KHZ_STEREO;
+	codecs[count].encoding_name = STR_L16;
+	codecs[count].clock_rate = 11025;
+	codecs[count].channel_cnt = 2;
+	++count;
+    }
+
+    if (count < *max_count) {
+	/* 16000 Hz mono */
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_L16_16KHZ_MONO;
+	codecs[count].encoding_name = STR_L16;
+	codecs[count].clock_rate = 16000;
+	codecs[count].channel_cnt = 1;
+	++count;
+    }
+
+
+    if (count < *max_count) {
+	/* 16000 Hz stereo */
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_L16_16KHZ_STEREO;
+	codecs[count].encoding_name = STR_L16;
+	codecs[count].clock_rate = 16000;
+	codecs[count].channel_cnt = 2;
+	++count;
+    }
+
+    if (count < *max_count) {
+	/* 22050 Hz mono */
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_L16_22KHZ_MONO;
+	codecs[count].encoding_name = STR_L16;
+	codecs[count].clock_rate = 22050;
+	codecs[count].channel_cnt = 1;
+	++count;
+    }
+
+
+    if (count < *max_count) {
+	/* 22050 Hz stereo */
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_L16_22KHZ_STEREO;
+	codecs[count].encoding_name = STR_L16;
+	codecs[count].clock_rate = 22050;
+	codecs[count].channel_cnt = 2;
+	++count;
+    }
+
+    if (count < *max_count) {
+	/* 32000 Hz mono */
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_L16_32KHZ_MONO;
+	codecs[count].encoding_name = STR_L16;
+	codecs[count].clock_rate = 32000;
+	codecs[count].channel_cnt = 1;
+	++count;
+    }
+
+    if (count < *max_count) {
+	/* 32000 Hz stereo */
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_L16_32KHZ_STEREO;
+	codecs[count].encoding_name = STR_L16;
+	codecs[count].clock_rate = 32000;
+	codecs[count].channel_cnt = 2;
+	++count;
+    }
+
+    if (count < *max_count) {
+	/* 48KHz mono */
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_L16_48KHZ_MONO;
+	codecs[count].encoding_name = STR_L16;
+	codecs[count].clock_rate = 48000;
+	codecs[count].channel_cnt = 1;
+	++count;
+    }
+
+    if (count < *max_count) {
+	/* 48KHz stereo */
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_L16_48KHZ_MONO;
+	codecs[count].encoding_name = STR_L16;
+	codecs[count].clock_rate = 48000;
+	codecs[count].channel_cnt = 2;
+	++count;
+    }
+
+
+    *max_count = count;
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t l16_alloc_codec( pjmedia_codec_factory *factory, 
+				    const pjmedia_codec_info *id,
+				    pjmedia_codec **p_codec)
+{
+    pjmedia_codec *codec = NULL;
+    struct l16_data *data;
+    unsigned ptime;
+
+    PJ_ASSERT_RETURN(factory==&l16_factory.base, PJ_EINVAL);
+
+    /* Lock mutex. */
+    pj_mutex_lock(l16_factory.mutex);
+
+    /* Allocate new codec if no more is available */
+    if (pj_list_empty(&l16_factory.codec_list)) {
+
+	codec = pj_pool_alloc(l16_factory.pool, sizeof(pjmedia_codec));
+	codec->codec_data = pj_pool_alloc(l16_factory.pool, 
+					  sizeof(struct l16_data));
+	codec->factory = factory;
+	codec->op = &l16_op;
+
+    } else {
+	codec = l16_factory.codec_list.next;
+	pj_list_erase(codec);
+    }
+
+    /* Init private data */
+    ptime = GET_PTIME(id->clock_rate);
+    data = codec->codec_data;
+    data->frame_size = ptime * id->clock_rate * id->channel_cnt * 2 / 1000;
+
+    /* Zero the list, for error detection in l16_dealloc_codec */
+    codec->next = codec->prev = NULL;
+
+    *p_codec = codec;
+
+    /* Unlock mutex. */
+    pj_mutex_unlock(l16_factory.mutex);
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t l16_dealloc_codec(pjmedia_codec_factory *factory, 
+				     pjmedia_codec *codec )
+{
+    
+    PJ_ASSERT_RETURN(factory==&l16_factory.base, PJ_EINVAL);
+
+    /* Check that this node has not been deallocated before */
+    pj_assert (codec->next==NULL && codec->prev==NULL);
+    if (codec->next!=NULL || codec->prev!=NULL) {
+	return PJ_EINVALIDOP;
+    }
+
+    /* Lock mutex. */
+    pj_mutex_lock(l16_factory.mutex);
+
+    /* Insert at the back of the list */
+    pj_list_insert_before(&l16_factory.codec_list, codec);
+
+    /* Unlock mutex. */
+    pj_mutex_unlock(l16_factory.mutex);
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t l16_init( pjmedia_codec *codec, pj_pool_t *pool )
+{
+    /* There's nothing to do here really */
+    PJ_UNUSED_ARG(codec);
+    PJ_UNUSED_ARG(pool);
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t l16_open(pjmedia_codec *codec, 
+			    pjmedia_codec_param *attr )
+{
+    /* Nothing to do.. */
+    PJ_UNUSED_ARG(codec);
+    PJ_UNUSED_ARG(attr);
+    return PJ_SUCCESS;
+}
+
+static pj_status_t l16_close( pjmedia_codec *codec )
+{
+    PJ_UNUSED_ARG(codec);
+    /* Nothing to do */
+    return PJ_SUCCESS;
+}
+
+static pj_status_t  l16_modify(pjmedia_codec *codec, 
+			       const pjmedia_codec_param *attr )
+{
+    /* Don't want to do anything. */
+    PJ_UNUSED_ARG(codec);
+    PJ_UNUSED_ARG(attr);
+    return PJ_EINVALIDOP;
+}
+
+static pj_status_t  l16_parse( pjmedia_codec *codec,
+			       void *pkt,
+			       pj_size_t pkt_size,
+			       const pj_timestamp *ts,
+			       unsigned *frame_cnt,
+			       pjmedia_frame frames[])
+{
+    unsigned count = 0;
+    struct l16_data *data = (struct l16_data*) codec->codec_data;
+
+    PJ_UNUSED_ARG(codec);
+    PJ_ASSERT_RETURN(frame_cnt, PJ_EINVAL);
+
+    while (pkt_size >= data->frame_size && count < *frame_cnt) {
+	frames[count].type = PJMEDIA_FRAME_TYPE_AUDIO;
+	frames[count].buf = pkt;
+	frames[count].size = data->frame_size;
+	frames[count].timestamp.u64 = ts->u64 + (count * data->frame_size);
+
+	pkt = ((char*)pkt) + data->frame_size;
+	pkt_size -= data->frame_size;
+
+	++count;
+    }
+
+    *frame_cnt = count;
+    return PJ_SUCCESS;
+}
+
+static pj_status_t l16_encode(pjmedia_codec *codec, 
+			      const struct pjmedia_frame *input,
+			      unsigned output_buf_len, 
+			      struct pjmedia_frame *output)
+{
+    const pj_int16_t *samp = (const pj_int16_t*) input->buf;
+    const pj_int16_t *samp_end = samp + input->size/sizeof(pj_int16_t);
+    pj_int16_t *samp_out = (pj_int16_t*) output->buf;    
+
+
+    PJ_UNUSED_ARG(codec);
+
+
+    /* Check output buffer length */
+    if (output_buf_len < input->size)
+	return PJMEDIA_CODEC_EFRMTOOSHORT;
+
+
+    /* Encode */
+#if defined(PJ_IS_LITTLE_ENDIAN) && PJ_IS_LITTLE_ENDIAN!=0
+    while (samp!=samp_end)
+	*samp_out++ = pj_htons(*samp++);
+#endif
+
+
+    /* Done */
+    output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+    output->size = input->size;
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t l16_decode(pjmedia_codec *codec, 
+			      const struct pjmedia_frame *input,
+			      unsigned output_buf_len, 
+			      struct pjmedia_frame *output)
+{
+    const pj_int16_t *samp = (const pj_int16_t*) input->buf;
+    const pj_int16_t *samp_end = samp + input->size/sizeof(pj_int16_t);
+    pj_int16_t *samp_out = (pj_int16_t*) output->buf;    
+
+
+    PJ_UNUSED_ARG(codec);
+
+
+    /* Check output buffer length */
+    if (output_buf_len < input->size)
+	return PJMEDIA_CODEC_EPCMTOOSHORT;
+
+
+    /* Decode */
+#if defined(PJ_IS_LITTLE_ENDIAN) && PJ_IS_LITTLE_ENDIAN!=0
+    while (samp!=samp_end)
+	*samp_out++ = pj_htons(*samp++);
+#endif
+
+
+    output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+    output->size = input->size;
+
+    return PJ_SUCCESS;
+}
+
+
+#endif	/* PJMEDIA_HAS_L16_CODEC */
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/AUTHORS
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/AUTHORS	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/AUTHORS	(revision 1163)
@@ -0,0 +1,18 @@
+Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
+   All the code except the following
+
+David Rowe <david@voicetronix.com.au> via VoiceTronix
+   lsp.c lsp.h 
+   Also ideas and feedback
+
+John Francis Edwards:
+   wave_out.[ch], some #ifdefs for windows port and MSVC project files
+
+Segher Boessenkool
+   Misc. optimizations (for QMF in particular)
+
+Atsuhiko Yamanaka <ymnk@jcraft.com>:
+   Patch to speexenc.c to add Vorbis comment format
+
+Radim Kolar <hsn@cybermail.net>:
+   Patch to speexenc.c for supporting more input formats
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/COPYING
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/COPYING	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/COPYING	(revision 1163)
@@ -0,0 +1,33 @@
+Copyright 2002-2005 
+        Xiph.org Foundation
+        Jean-Marc Valin
+        David Rowe
+        EpicGames
+        Analog Devices
+
+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 Xiph.org Foundation 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 FOUNDATION 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.
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ChangeLog
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ChangeLog	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ChangeLog	(revision 1163)
@@ -0,0 +1,21 @@
+2005-09-07  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+	* libspeex/cb_search.c: (split_cb_search_shape_sign_N1):
+	  add declaration for n, seems like an obvious build fix, slap
+	  me down if it's not
+
+2004-02-18 Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
+	Patch for compiling with mingw32 sent by j@thing.net 
+
+2004-02-18 Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
+	Integrated IRIX patch (getopt stuff) from Michael Pruett <michael@68k.org> 
+
+2004-02-18 Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
+	Changed the Makefile.am so that KDevelop can parse SUBDIRS correctly 
+
+2002/03/27 Jean-Marc Valin:
+Working encoder and decoder for both narrowband and wideband.
+
+2002/02/27 Jean-Marc Valin:
+Got the basic encoder working as a demo with quantization only on some 
+parameters.
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/VERSION.TXT
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/VERSION.TXT	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/VERSION.TXT	(revision 1163)
@@ -0,0 +1,9 @@
+This Speex taken from SVN 
+   url="http://svn.xiph.org/trunk/speex",
+   committed-rev="12136"
+   name=""
+   committed-date="2006-11-22T02:21:19.831305Z"
+   last-author="jm"
+   kind="dir"
+   uuid="0101bb08-14d6-0310-b084-bc0e0c8e3800"
+   revision="12140"
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/_kiss_fft_guts.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/_kiss_fft_guts.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/_kiss_fft_guts.h	(revision 1163)
@@ -0,0 +1,153 @@
+/*
+Copyright (c) 2003-2004, Mark Borgerding
+
+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 author nor the names of any 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 OWNER 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.
+*/
+
+#define MIN(a,b) ((a)<(b) ? (a):(b))
+#define MAX(a,b) ((a)>(b) ? (a):(b))
+
+/* kiss_fft.h
+   defines kiss_fft_scalar as either short or a float type
+   and defines
+   typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; */
+#include "kiss_fft.h"
+#include "math_approx.h"
+
+#define MAXFACTORS 32
+/* e.g. an fft of length 128 has 4 factors 
+ as far as kissfft is concerned
+ 4*4*4*2
+ */
+
+struct kiss_fft_state{
+    int nfft;
+    int inverse;
+    int factors[2*MAXFACTORS];
+    kiss_fft_cpx twiddles[1];
+};
+
+/*
+  Explanation of macros dealing with complex math:
+
+   C_MUL(m,a,b)         : m = a*b
+   C_FIXDIV( c , div )  : if a fixed point impl., c /= div. noop otherwise
+   C_SUB( res, a,b)     : res = a - b
+   C_SUBFROM( res , a)  : res -= a
+   C_ADDTO( res , a)    : res += a
+ * */
+#ifdef FIXED_POINT
+#include "misc.h"
+# define FRACBITS 15
+# define SAMPPROD spx_int32_t 
+#define SAMP_MAX 32767
+
+#define SAMP_MIN -SAMP_MAX
+
+#if defined(CHECK_OVERFLOW)
+#  define CHECK_OVERFLOW_OP(a,op,b)  \
+	if ( (SAMPPROD)(a) op (SAMPPROD)(b) > SAMP_MAX || (SAMPPROD)(a) op (SAMPPROD)(b) < SAMP_MIN ) { \
+		fprintf(stderr,"WARNING:overflow @ " __FILE__ "(%d): (%d " #op" %d) = %ld\n",__LINE__,(a),(b),(SAMPPROD)(a) op (SAMPPROD)(b) );  }
+#endif
+
+
+#   define smul(a,b) ( (SAMPPROD)(a)*(b) )
+#   define sround( x )  (kiss_fft_scalar)( ( (x) + (1<<(FRACBITS-1)) ) >> FRACBITS )
+
+#   define S_MUL(a,b) sround( smul(a,b) )
+
+#   define C_MUL(m,a,b) \
+      do{ (m).r = sround( smul((a).r,(b).r) - smul((a).i,(b).i) ); \
+          (m).i = sround( smul((a).r,(b).i) + smul((a).i,(b).r) ); }while(0)
+
+#   define DIVSCALAR(x,k) \
+	(x) = sround( smul(  x, SAMP_MAX/k ) )
+
+#   define C_FIXDIV(c,div) \
+	do {    DIVSCALAR( (c).r , div);  \
+		DIVSCALAR( (c).i  , div); }while (0)
+
+#   define C_MULBYSCALAR( c, s ) \
+    do{ (c).r =  sround( smul( (c).r , s ) ) ;\
+        (c).i =  sround( smul( (c).i , s ) ) ; }while(0)
+
+#else  /* not FIXED_POINT*/
+
+#   define S_MUL(a,b) ( (a)*(b) )
+#define C_MUL(m,a,b) \
+    do{ (m).r = (a).r*(b).r - (a).i*(b).i;\
+        (m).i = (a).r*(b).i + (a).i*(b).r; }while(0)
+#   define C_FIXDIV(c,div) /* NOOP */
+#   define C_MULBYSCALAR( c, s ) \
+    do{ (c).r *= (s);\
+        (c).i *= (s); }while(0)
+#endif
+
+#ifndef CHECK_OVERFLOW_OP
+#  define CHECK_OVERFLOW_OP(a,op,b) /* noop */
+#endif
+
+#define  C_ADD( res, a,b)\
+    do { \
+	    CHECK_OVERFLOW_OP((a).r,+,(b).r)\
+	    CHECK_OVERFLOW_OP((a).i,+,(b).i)\
+	    (res).r=(a).r+(b).r;  (res).i=(a).i+(b).i; \
+    }while(0)
+#define  C_SUB( res, a,b)\
+    do { \
+	    CHECK_OVERFLOW_OP((a).r,-,(b).r)\
+	    CHECK_OVERFLOW_OP((a).i,-,(b).i)\
+	    (res).r=(a).r-(b).r;  (res).i=(a).i-(b).i; \
+    }while(0)
+#define C_ADDTO( res , a)\
+    do { \
+	    CHECK_OVERFLOW_OP((res).r,+,(a).r)\
+	    CHECK_OVERFLOW_OP((res).i,+,(a).i)\
+	    (res).r += (a).r;  (res).i += (a).i;\
+    }while(0)
+
+#define C_SUBFROM( res , a)\
+    do {\
+	    CHECK_OVERFLOW_OP((res).r,-,(a).r)\
+	    CHECK_OVERFLOW_OP((res).i,-,(a).i)\
+	    (res).r -= (a).r;  (res).i -= (a).i; \
+    }while(0)
+
+
+#ifdef FIXED_POINT
+#  define KISS_FFT_COS(phase)  floor(MIN(32767,MAX(-32767,.5+32768 * cos (phase))))
+#  define KISS_FFT_SIN(phase)  floor(MIN(32767,MAX(-32767,.5+32768 * sin (phase))))
+#  define HALF_OF(x) ((x)>>1)
+#elif defined(USE_SIMD)
+#  define KISS_FFT_COS(phase) _mm_set1_ps( cos(phase) )
+#  define KISS_FFT_SIN(phase) _mm_set1_ps( sin(phase) )
+#  define HALF_OF(x) ((x)*_mm_set1_ps(.5))
+#else
+#  define KISS_FFT_COS(phase) (kiss_fft_scalar) cos(phase)
+#  define KISS_FFT_SIN(phase) (kiss_fft_scalar) sin(phase)
+#  define HALF_OF(x) ((x)*.5)
+#endif
+
+#define  kf_cexp(x,phase) \
+	do{ \
+		(x)->r = KISS_FFT_COS(phase);\
+		(x)->i = KISS_FFT_SIN(phase);\
+	}while(0)
+#define  kf_cexp2(x,phase) \
+               do{ \
+               (x)->r = spx_cos_norm((phase));\
+               (x)->i = spx_cos_norm((phase)-32768);\
+}while(0)
+
+
+/* a debugging function */
+#define pcpx(c)\
+    fprintf(stderr,"%g + %gi\n",(double)((c)->r),(double)((c)->i) )
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/arch.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/arch.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/arch.h	(revision 1163)
@@ -0,0 +1,195 @@
+/* Copyright (C) 2003 Jean-Marc Valin */
+/**
+   @file arch.h
+   @brief Various architecture definitions Speex
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef ARCH_H
+#define ARCH_H
+
+#include "speex/speex_types.h"
+
+#define ABS(x) ((x) < 0 ? (-(x)) : (x))      /**< Absolute integer value. */
+#define ABS16(x) ((x) < 0 ? (-(x)) : (x))    /**< Absolute 16-bit value.  */
+#define MIN16(a,b) ((a) < (b) ? (a) : (b))   /**< Maximum 16-bit value.   */
+#define MAX16(a,b) ((a) > (b) ? (a) : (b))   /**< Maximum 16-bit value.   */
+#define ABS32(x) ((x) < 0 ? (-(x)) : (x))    /**< Absolute 32-bit value.  */
+#define MIN32(a,b) ((a) < (b) ? (a) : (b))   /**< Maximum 32-bit value.   */
+#define MAX32(a,b) ((a) > (b) ? (a) : (b))   /**< Maximum 32-bit value.   */
+
+#ifdef FIXED_POINT
+
+typedef spx_int16_t spx_word16_t;
+typedef spx_int32_t   spx_word32_t;
+typedef spx_word32_t spx_mem_t;
+typedef spx_word16_t spx_coef_t;
+typedef spx_word16_t spx_lsp_t;
+typedef spx_word32_t spx_sig_t;
+
+#define Q15ONE 32767
+
+#define LPC_SCALING  8192
+#define SIG_SCALING  16384
+#define LSP_SCALING  8192.
+#define GAMMA_SCALING 32768.
+#define GAIN_SCALING 64
+#define GAIN_SCALING_1 0.015625
+
+#define LPC_SHIFT    13
+#define LSP_SHIFT    13
+#define SIG_SHIFT    14
+
+#define VERY_SMALL 0
+#define VERY_LARGE32 ((spx_word32_t)2147483647)
+#define VERY_LARGE16 ((spx_word16_t)32767)
+#define Q15_ONE ((spx_word16_t)32767)
+
+
+#ifdef FIXED_DEBUG
+#include "fixed_debug.h"
+#else
+
+#include "fixed_generic.h"
+
+#ifdef ARM5E_ASM
+#include "fixed_arm5e.h"
+#elif defined (ARM4_ASM)
+#include "fixed_arm4.h"
+#elif defined (ARM5E_ASM)
+#include "fixed_arm5e.h"
+#elif defined (BFIN_ASM)
+#include "fixed_bfin.h"
+#endif
+
+#endif
+
+
+#else
+
+typedef float spx_mem_t;
+typedef float spx_coef_t;
+typedef float spx_lsp_t;
+typedef float spx_sig_t;
+typedef float spx_word16_t;
+typedef float spx_word32_t;
+
+#define Q15ONE 1.0f
+#define LPC_SCALING  1.f
+#define SIG_SCALING  1.f
+#define LSP_SCALING  1.f
+#define GAMMA_SCALING 1.f
+#define GAIN_SCALING 1.f
+#define GAIN_SCALING_1 1.f
+
+#define LPC_SHIFT    0
+#define LSP_SHIFT    0
+#define SIG_SHIFT    0
+
+#define VERY_SMALL 1e-15f
+#define VERY_LARGE32 1e15f
+#define VERY_LARGE16 1e15f
+#define Q15_ONE ((spx_word16_t)1.f)
+
+#define QCONST16(x,bits) (x)
+#define QCONST32(x,bits) (x)
+
+#define NEG16(x) (-(x))
+#define NEG32(x) (-(x))
+#define EXTRACT16(x) (x)
+#define EXTEND32(x) (x)
+#define SHR16(a,shift) (a)
+#define SHL16(a,shift) (a)
+#define SHR32(a,shift) (a)
+#define SHL32(a,shift) (a)
+#define PSHR16(a,shift) (a)
+#define PSHR32(a,shift) (a)
+#define VSHR32(a,shift) (a)
+#define SATURATE16(x,a) (x)
+#define SATURATE32(x,a) (x)
+
+#define PSHR(a,shift)       (a)
+#define SHR(a,shift)       (a)
+#define SHL(a,shift)       (a)
+#define SATURATE(x,a) (x)
+
+#define ADD16(a,b) ((a)+(b))
+#define SUB16(a,b) ((a)-(b))
+#define ADD32(a,b) ((a)+(b))
+#define SUB32(a,b) ((a)-(b))
+#define MULT16_16_16(a,b)     ((a)*(b))
+#define MULT16_16(a,b)     ((spx_word32_t)(a)*(spx_word32_t)(b))
+#define MAC16_16(c,a,b)     ((c)+(spx_word32_t)(a)*(spx_word32_t)(b))
+
+#define MULT16_32_Q11(a,b)     ((a)*(b))
+#define MULT16_32_Q13(a,b)     ((a)*(b))
+#define MULT16_32_Q14(a,b)     ((a)*(b))
+#define MULT16_32_Q15(a,b)     ((a)*(b))
+#define MULT16_32_P15(a,b)     ((a)*(b))
+
+#define MAC16_32_Q11(c,a,b)     ((c)+(a)*(b))
+#define MAC16_32_Q15(c,a,b)     ((c)+(a)*(b))
+
+#define MAC16_16_Q11(c,a,b)     ((c)+(a)*(b))
+#define MAC16_16_Q13(c,a,b)     ((c)+(a)*(b))
+#define MAC16_16_P13(c,a,b)     ((c)+(a)*(b))
+#define MULT16_16_Q11_32(a,b)     ((a)*(b))
+#define MULT16_16_Q13(a,b)     ((a)*(b))
+#define MULT16_16_Q14(a,b)     ((a)*(b))
+#define MULT16_16_Q15(a,b)     ((a)*(b))
+#define MULT16_16_P15(a,b)     ((a)*(b))
+#define MULT16_16_P13(a,b)     ((a)*(b))
+#define MULT16_16_P14(a,b)     ((a)*(b))
+
+#define DIV32_16(a,b)     (((spx_word32_t)(a))/(spx_word16_t)(b))
+#define PDIV32_16(a,b)     (((spx_word32_t)(a))/(spx_word16_t)(b))
+#define DIV32(a,b)     (((spx_word32_t)(a))/(spx_word32_t)(b))
+#define PDIV32(a,b)     (((spx_word32_t)(a))/(spx_word32_t)(b))
+
+
+#endif
+
+
+#if defined (CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)
+
+/* 2 on TI C5x DSP */
+#define BYTES_PER_CHAR 2 
+#define BITS_PER_CHAR 16
+#define LOG2_BITS_PER_CHAR 4
+
+#else 
+
+#define BYTES_PER_CHAR 1
+#define BITS_PER_CHAR 8
+#define LOG2_BITS_PER_CHAR 3
+
+#endif
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/bits.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/bits.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/bits.c	(revision 1163)
@@ -0,0 +1,363 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: speex_bits.c
+
+   Handles bit packing/unpacking
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <speex/speex_bits.h>
+#include "misc.h"
+
+/* Maximum size of the bit-stream (for fixed-size allocation) */
+#ifndef MAX_CHARS_PER_FRAME
+#define MAX_CHARS_PER_FRAME (2000/BYTES_PER_CHAR)
+#endif
+
+void speex_bits_init(SpeexBits *bits)
+{
+   bits->chars = (char*)speex_alloc(MAX_CHARS_PER_FRAME);
+   if (!bits->chars)
+      return;
+
+   bits->buf_size = MAX_CHARS_PER_FRAME;
+
+   bits->owner=1;
+
+   speex_bits_reset(bits);
+}
+
+void speex_bits_init_buffer(SpeexBits *bits, void *buff, int buf_size)
+{
+   bits->chars = (char*)buff;
+   bits->buf_size = buf_size;
+
+   bits->owner=0;
+
+   speex_bits_reset(bits);
+}
+
+void speex_bits_destroy(SpeexBits *bits)
+{
+   if (bits->owner)
+      speex_free(bits->chars);
+   /* Will do something once the allocation is dynamic */
+}
+
+void speex_bits_reset(SpeexBits *bits)
+{
+   bits->chars[0]=0;
+   bits->nbBits=0;
+   bits->charPtr=0;
+   bits->bitPtr=0;
+   bits->overflow=0;
+}
+
+void speex_bits_rewind(SpeexBits *bits)
+{
+   bits->charPtr=0;
+   bits->bitPtr=0;
+   bits->overflow=0;
+}
+
+void speex_bits_read_from(SpeexBits *bits, char *chars, int len)
+{
+   int i;
+   int nchars = len / BYTES_PER_CHAR;
+   if (nchars > bits->buf_size)
+   {
+      speex_warning_int("Packet is larger than allocated buffer: ", len);
+      if (bits->owner)
+      {
+         char *tmp = (char*)speex_realloc(bits->chars, nchars);
+         if (tmp)
+         {
+            bits->buf_size=nchars;
+            bits->chars=tmp;
+         } else {
+            nchars=bits->buf_size;
+            speex_warning("Could not resize input buffer: truncating input");
+         }
+      } else {
+         speex_warning("Do not own input buffer: truncating input");
+         nchars=bits->buf_size;
+      }
+   }
+#if (BYTES_PER_CHAR==2)
+/* Swap bytes to proper endian order (could be done externally) */
+#define HTOLS(A) ((((A) >> 8)&0xff)|(((A) & 0xff)<<8))
+#else
+#define HTOLS(A) (A)
+#endif
+   for (i=0;i<nchars;i++)
+      bits->chars[i]=HTOLS(chars[i]);
+
+   bits->nbBits=nchars<<LOG2_BITS_PER_CHAR;
+   bits->charPtr=0;
+   bits->bitPtr=0;
+   bits->overflow=0;
+}
+
+static void speex_bits_flush(SpeexBits *bits)
+{
+   int i;
+   int nchars = ((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR);
+   if (bits->charPtr>0)
+   {
+     for (i=bits->charPtr;i<nchars; i++) 
+       bits->chars[i-bits->charPtr]=bits->chars[i];
+   }
+   bits->nbBits -= bits->charPtr<<LOG2_BITS_PER_CHAR;
+   bits->charPtr=0;
+}
+
+void speex_bits_read_whole_bytes(SpeexBits *bits, char *chars, int nbytes)
+{
+   int i,pos;
+   int nchars = nbytes/BYTES_PER_CHAR;
+
+   if (((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR)+nchars > bits->buf_size)
+   {
+      /* Packet is larger than allocated buffer */
+      if (bits->owner)
+      {
+         char *tmp = (char*)speex_realloc(bits->chars, (bits->nbBits>>LOG2_BITS_PER_CHAR)+nchars+1);
+         if (tmp)
+         {
+            bits->buf_size=(bits->nbBits>>LOG2_BITS_PER_CHAR)+nchars+1;
+            bits->chars=tmp;
+         } else {
+            nchars=bits->buf_size-(bits->nbBits>>LOG2_BITS_PER_CHAR)-1;
+            speex_warning("Could not resize input buffer: truncating input");
+         }
+      } else {
+         speex_warning("Do not own input buffer: truncating input");
+         nchars=bits->buf_size;
+      }
+   }
+
+   speex_bits_flush(bits);
+   pos=bits->nbBits>>LOG2_BITS_PER_CHAR;
+   for (i=0;i<nchars;i++)
+      bits->chars[pos+i]=HTOLS(chars[i]);
+   bits->nbBits+=nchars<<LOG2_BITS_PER_CHAR;
+}
+
+int speex_bits_write(SpeexBits *bits, char *chars, int max_nbytes)
+{
+   int i;
+   int max_nchars = max_nbytes/BYTES_PER_CHAR;
+   int charPtr, bitPtr, nbBits;
+
+   /* Insert terminator, but save the data so we can put it back after */
+   bitPtr=bits->bitPtr;
+   charPtr=bits->charPtr;
+   nbBits=bits->nbBits;
+   speex_bits_insert_terminator(bits);
+   bits->bitPtr=bitPtr;
+   bits->charPtr=charPtr;
+   bits->nbBits=nbBits;
+
+   if (max_nchars > ((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR))
+      max_nchars = ((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR);
+
+   for (i=0;i<max_nchars;i++)
+      chars[i]=HTOLS(bits->chars[i]);
+   return max_nchars*BYTES_PER_CHAR;
+}
+
+int speex_bits_write_whole_bytes(SpeexBits *bits, char *chars, int max_nbytes)
+{
+   int max_nchars = max_nbytes/BYTES_PER_CHAR;
+   int i;
+   if (max_nchars > ((bits->nbBits)>>LOG2_BITS_PER_CHAR))
+      max_nchars = ((bits->nbBits)>>LOG2_BITS_PER_CHAR);
+   for (i=0;i<max_nchars;i++)
+      chars[i]=HTOLS(bits->chars[i]);
+
+   if (bits->bitPtr>0)
+      bits->chars[0]=bits->chars[max_nchars];
+   else
+      bits->chars[0]=0;
+   for (i=1;i<((bits->nbBits)>>LOG2_BITS_PER_CHAR)+1;i++)
+      bits->chars[i]=0;
+   bits->charPtr=0;
+   bits->nbBits &= (BITS_PER_CHAR-1);
+   return max_nchars*BYTES_PER_CHAR;
+}
+
+void speex_bits_pack(SpeexBits *bits, int data, int nbBits)
+{
+   unsigned int d=data;
+
+   if (bits->charPtr+((nbBits+bits->bitPtr)>>LOG2_BITS_PER_CHAR) >= bits->buf_size)
+   {
+      speex_warning("Buffer too small to pack bits");
+      if (bits->owner)
+      {
+	int new_nchars = ((bits->buf_size+5)*3)>>1;
+         char *tmp = (char*)speex_realloc(bits->chars, new_nchars);
+         if (tmp)
+         {
+	    speex_memset_bytes(tmp, 0, new_nchars);
+            bits->buf_size=new_nchars;
+            bits->chars=tmp;
+         } else {
+            speex_warning("Could not resize input buffer: not packing");
+            return;
+         }
+      } else {
+         speex_warning("Do not own input buffer: not packing");
+         return;
+      }
+   }
+
+   while(nbBits)
+   {
+      int bit;
+      bit = (d>>(nbBits-1))&1;
+      bits->chars[bits->charPtr] |= bit<<(BITS_PER_CHAR-1-bits->bitPtr);
+      bits->bitPtr++;
+
+      if (bits->bitPtr==BITS_PER_CHAR)
+      {
+         bits->bitPtr=0;
+         bits->charPtr++;
+         bits->chars[bits->charPtr] = 0;
+      }
+      bits->nbBits++;
+      nbBits--;
+   }
+}
+
+int speex_bits_unpack_signed(SpeexBits *bits, int nbBits)
+{
+   unsigned int d=speex_bits_unpack_unsigned(bits,nbBits);
+   /* If number is negative */
+   if (d>>(nbBits-1))
+   {
+      d |= (-1)<<nbBits;
+   }
+   return d;
+}
+
+unsigned int speex_bits_unpack_unsigned(SpeexBits *bits, int nbBits)
+{
+   unsigned int d=0;
+   if ((bits->charPtr<<LOG2_BITS_PER_CHAR)+bits->bitPtr+nbBits>bits->nbBits)
+      bits->overflow=1;
+   if (bits->overflow)
+      return 0;
+   while(nbBits)
+   {
+      d<<=1;
+      d |= (bits->chars[bits->charPtr]>>(BITS_PER_CHAR-1 - bits->bitPtr))&1;
+      bits->bitPtr++;
+      if (bits->bitPtr==BITS_PER_CHAR)
+      {
+         bits->bitPtr=0;
+         bits->charPtr++;
+      }
+      nbBits--;
+   }
+   return d;
+}
+
+unsigned int speex_bits_peek_unsigned(SpeexBits *bits, int nbBits)
+{
+   unsigned int d=0;
+   int bitPtr, charPtr;
+   char *chars;
+
+   if ((bits->charPtr<<LOG2_BITS_PER_CHAR)+bits->bitPtr+nbBits>bits->nbBits)
+     bits->overflow=1;
+   if (bits->overflow)
+      return 0;
+
+   bitPtr=bits->bitPtr;
+   charPtr=bits->charPtr;
+   chars = bits->chars;
+   while(nbBits)
+   {
+      d<<=1;
+      d |= (chars[charPtr]>>(BITS_PER_CHAR-1 - bitPtr))&1;
+      bitPtr++;
+      if (bitPtr==BITS_PER_CHAR)
+      {
+         bitPtr=0;
+         charPtr++;
+      }
+      nbBits--;
+   }
+   return d;
+}
+
+int speex_bits_peek(SpeexBits *bits)
+{
+   if ((bits->charPtr<<LOG2_BITS_PER_CHAR)+bits->bitPtr+1>bits->nbBits)
+      bits->overflow=1;
+   if (bits->overflow)
+      return 0;
+   return (bits->chars[bits->charPtr]>>(BITS_PER_CHAR-1 - bits->bitPtr))&1;
+}
+
+void speex_bits_advance(SpeexBits *bits, int n)
+{
+    if (((bits->charPtr<<LOG2_BITS_PER_CHAR)+bits->bitPtr+n>bits->nbBits) || bits->overflow){
+      bits->overflow=1;
+      return;
+    }
+   bits->charPtr += (bits->bitPtr+n) >> LOG2_BITS_PER_CHAR; /* divide by BITS_PER_CHAR */
+   bits->bitPtr = (bits->bitPtr+n) & (BITS_PER_CHAR-1);       /* modulo by BITS_PER_CHAR */
+}
+
+int speex_bits_remaining(SpeexBits *bits)
+{
+   if (bits->overflow)
+      return -1;
+   else
+      return bits->nbBits-((bits->charPtr<<LOG2_BITS_PER_CHAR)+bits->bitPtr);
+}
+
+int speex_bits_nbytes(SpeexBits *bits)
+{
+   return ((bits->nbBits+BITS_PER_CHAR-1)>>LOG2_BITS_PER_CHAR);
+}
+
+void speex_bits_insert_terminator(SpeexBits *bits)
+{
+   if (bits->bitPtr)
+      speex_bits_pack(bits, 0, 1);
+   while (bits->bitPtr)
+      speex_bits_pack(bits, 1, 1);
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search.c	(revision 1163)
@@ -0,0 +1,606 @@
+/* Copyright (C) 2002-2006 Jean-Marc Valin 
+   File: cb_search.c
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "cb_search.h"
+#include "filters.h"
+#include "stack_alloc.h"
+#include "vq.h"
+#include "misc.h"
+
+#ifdef _USE_SSE
+#include "cb_search_sse.h"
+#elif defined(ARM4_ASM) || defined(ARM5E_ASM)
+#include "cb_search_arm4.h"
+#elif defined(BFIN_ASM)
+#include "cb_search_bfin.h"
+#endif
+
+#ifndef OVERRIDE_COMPUTE_WEIGHTED_CODEBOOK
+static void compute_weighted_codebook(const signed char *shape_cb, const spx_word16_t *r, spx_word16_t *resp, spx_word16_t *resp2, spx_word32_t *E, int shape_cb_size, int subvect_size, char *stack)
+{
+   int i, j, k;
+   VARDECL(spx_word16_t *shape);
+   ALLOC(shape, subvect_size, spx_word16_t);
+   for (i=0;i<shape_cb_size;i++)
+   {
+      spx_word16_t *res;
+      
+      res = resp+i*subvect_size;
+      for (k=0;k<subvect_size;k++)
+         shape[k] = (spx_word16_t)shape_cb[i*subvect_size+k];
+      E[i]=0;
+
+      /* Compute codeword response using convolution with impulse response */
+      for(j=0;j<subvect_size;j++)
+      {
+         spx_word32_t resj=0;
+         spx_word16_t res16;
+         for (k=0;k<=j;k++)
+            resj = MAC16_16(resj,shape[k],r[j-k]);
+#ifdef FIXED_POINT
+         res16 = EXTRACT16(SHR32(resj, 13));
+#else
+         res16 = 0.03125f*resj;
+#endif
+         /* Compute codeword energy */
+         E[i]=MAC16_16(E[i],res16,res16);
+         res[j] = res16;
+         /*printf ("%d\n", (int)res[j]);*/
+      }
+   }
+
+}
+#endif
+
+#ifndef OVERRIDE_TARGET_UPDATE
+static inline void target_update(spx_word16_t *t, spx_word16_t g, spx_word16_t *r, int len)
+{
+   int n;
+   for (n=0;n<len;n++)
+      t[n] = SUB16(t[n],PSHR32(MULT16_16(g,r[n]),13));
+}
+#endif
+
+
+
+static void split_cb_search_shape_sign_N1(
+spx_word16_t target[],			/* target vector */
+spx_coef_t ak[],			/* LPCs for this subframe */
+spx_coef_t awk1[],			/* Weighted LPCs for this subframe */
+spx_coef_t awk2[],			/* Weighted LPCs for this subframe */
+const void *par,                      /* Codebook/search parameters*/
+int   p,                        /* number of LPC coeffs */
+int   nsf,                      /* number of samples in subframe */
+spx_sig_t *exc,
+spx_word16_t *r,
+SpeexBits *bits,
+char *stack,
+int   update_target
+)
+{
+   int i,j,m,q;
+   VARDECL(spx_word16_t *resp);
+#ifdef _USE_SSE
+   VARDECL(__m128 *resp2);
+   VARDECL(__m128 *E);
+#else
+   spx_word16_t *resp2;
+   VARDECL(spx_word32_t *E);
+#endif
+   VARDECL(spx_word16_t *t);
+   VARDECL(spx_sig_t *e);
+   const signed char *shape_cb;
+   int shape_cb_size, subvect_size, nb_subvect;
+   const split_cb_params *params;
+   int best_index;
+   spx_word32_t best_dist;
+   int have_sign;
+   
+   params = (const split_cb_params *) par;
+   subvect_size = params->subvect_size;
+   nb_subvect = params->nb_subvect;
+   shape_cb_size = 1<<params->shape_bits;
+   shape_cb = params->shape_cb;
+   have_sign = params->have_sign;
+   ALLOC(resp, shape_cb_size*subvect_size, spx_word16_t);
+#ifdef _USE_SSE
+   ALLOC(resp2, (shape_cb_size*subvect_size)>>2, __m128);
+   ALLOC(E, shape_cb_size>>2, __m128);
+#else
+   resp2 = resp;
+   ALLOC(E, shape_cb_size, spx_word32_t);
+#endif
+   ALLOC(t, nsf, spx_word16_t);
+   ALLOC(e, nsf, spx_sig_t);
+   
+   /* FIXME: Do we still need to copy the target? */
+   for (i=0;i<nsf;i++)
+      t[i]=target[i];
+
+   compute_weighted_codebook(shape_cb, r, resp, resp2, E, shape_cb_size, subvect_size, stack);
+
+   for (i=0;i<nb_subvect;i++)
+   {
+      spx_word16_t *x=t+subvect_size*i;
+      /*Find new n-best based on previous n-best j*/
+      if (have_sign)
+         vq_nbest_sign(x, resp2, subvect_size, shape_cb_size, E, 1, &best_index, &best_dist, stack);
+      else
+         vq_nbest(x, resp2, subvect_size, shape_cb_size, E, 1, &best_index, &best_dist, stack);
+      
+      speex_bits_pack(bits,best_index,params->shape_bits+have_sign);
+      
+      {
+         int rind;
+         spx_word16_t *res;
+         spx_word16_t sign=1;
+         rind = best_index;
+         if (rind>=shape_cb_size)
+         {
+            sign=-1;
+            rind-=shape_cb_size;
+         }
+         res = resp+rind*subvect_size;
+         if (sign>0)
+            for (m=0;m<subvect_size;m++)
+               t[subvect_size*i+m] = SUB16(t[subvect_size*i+m], res[m]);
+         else
+            for (m=0;m<subvect_size;m++)
+               t[subvect_size*i+m] = ADD16(t[subvect_size*i+m], res[m]);
+
+#ifdef FIXED_POINT
+         if (sign)
+         {
+            for (j=0;j<subvect_size;j++)
+               e[subvect_size*i+j]=SHL32(EXTEND32(shape_cb[rind*subvect_size+j]),SIG_SHIFT-5);
+         } else {
+            for (j=0;j<subvect_size;j++)
+               e[subvect_size*i+j]=NEG32(SHL32(EXTEND32(shape_cb[rind*subvect_size+j]),SIG_SHIFT-5));
+         }
+#else
+         for (j=0;j<subvect_size;j++)
+            e[subvect_size*i+j]=sign*0.03125*shape_cb[rind*subvect_size+j];
+#endif
+      
+      }
+            
+      for (m=0;m<subvect_size;m++)
+      {
+         spx_word16_t g;
+         int rind;
+         spx_word16_t sign=1;
+         rind = best_index;
+         if (rind>=shape_cb_size)
+         {
+            sign=-1;
+            rind-=shape_cb_size;
+         }
+         
+         q=subvect_size-m;
+#ifdef FIXED_POINT
+         g=sign*shape_cb[rind*subvect_size+m];
+#else
+         g=sign*0.03125*shape_cb[rind*subvect_size+m];
+#endif
+         target_update(t+subvect_size*(i+1), g, r+q, nsf-subvect_size*(i+1));
+      }
+   }
+
+   /* Update excitation */
+   /* FIXME: We could update the excitation directly above */
+   for (j=0;j<nsf;j++)
+      exc[j]=ADD32(exc[j],e[j]);
+   
+   /* Update target: only update target if necessary */
+   if (update_target)
+   {
+      VARDECL(spx_sig_t *r2);
+      ALLOC(r2, nsf, spx_sig_t);
+      syn_percep_zero(e, ak, awk1, awk2, r2, nsf,p, stack);
+      for (j=0;j<nsf;j++)
+         target[j]=SUB16(target[j],EXTRACT16(PSHR32(r2[j],8)));
+   }
+}
+
+
+
+void split_cb_search_shape_sign(
+spx_word16_t target[],			/* target vector */
+spx_coef_t ak[],			/* LPCs for this subframe */
+spx_coef_t awk1[],			/* Weighted LPCs for this subframe */
+spx_coef_t awk2[],			/* Weighted LPCs for this subframe */
+const void *par,                      /* Codebook/search parameters*/
+int   p,                        /* number of LPC coeffs */
+int   nsf,                      /* number of samples in subframe */
+spx_sig_t *exc,
+spx_word16_t *r,
+SpeexBits *bits,
+char *stack,
+int   complexity,
+int   update_target
+)
+{
+   int i,j,k,m,n,q;
+   VARDECL(spx_word16_t *resp);
+#ifdef _USE_SSE
+   VARDECL(__m128 *resp2);
+   VARDECL(__m128 *E);
+#else
+   spx_word16_t *resp2;
+   VARDECL(spx_word32_t *E);
+#endif
+   VARDECL(spx_word16_t *t);
+   VARDECL(spx_sig_t *e);
+   VARDECL(spx_sig_t *r2);
+   VARDECL(spx_word16_t *tmp);
+   VARDECL(spx_word32_t *ndist);
+   VARDECL(spx_word32_t *odist);
+   VARDECL(int *itmp);
+   VARDECL(spx_word16_t **ot2);
+   VARDECL(spx_word16_t **nt2);
+   spx_word16_t **ot, **nt;
+   VARDECL(int **nind);
+   VARDECL(int **oind);
+   VARDECL(int *ind);
+   const signed char *shape_cb;
+   int shape_cb_size, subvect_size, nb_subvect;
+   const split_cb_params *params;
+   int N=2;
+   VARDECL(int *best_index);
+   VARDECL(spx_word32_t *best_dist);
+   VARDECL(int *best_nind);
+   VARDECL(int *best_ntarget);
+   int have_sign;
+   N=complexity;
+   if (N>10)
+      N=10;
+   /* Complexity isn't as important for the codebooks as it is for the pitch */
+   N=(2*N)/3;
+   if (N<1)
+      N=1;
+   if (N==1)
+   {
+      split_cb_search_shape_sign_N1(target,ak,awk1,awk2,par,p,nsf,exc,r,bits,stack,update_target);
+      return;
+   }
+   ALLOC(ot2, N, spx_word16_t*);
+   ALLOC(nt2, N, spx_word16_t*);
+   ALLOC(oind, N, int*);
+   ALLOC(nind, N, int*);
+
+   params = (const split_cb_params *) par;
+   subvect_size = params->subvect_size;
+   nb_subvect = params->nb_subvect;
+   shape_cb_size = 1<<params->shape_bits;
+   shape_cb = params->shape_cb;
+   have_sign = params->have_sign;
+   ALLOC(resp, shape_cb_size*subvect_size, spx_word16_t);
+#ifdef _USE_SSE
+   ALLOC(resp2, (shape_cb_size*subvect_size)>>2, __m128);
+   ALLOC(E, shape_cb_size>>2, __m128);
+#else
+   resp2 = resp;
+   ALLOC(E, shape_cb_size, spx_word32_t);
+#endif
+   ALLOC(t, nsf, spx_word16_t);
+   ALLOC(e, nsf, spx_sig_t);
+   ALLOC(r2, nsf, spx_sig_t);
+   ALLOC(ind, nb_subvect, int);
+
+   ALLOC(tmp, 2*N*nsf, spx_word16_t);
+   for (i=0;i<N;i++)
+   {
+      ot2[i]=tmp+2*i*nsf;
+      nt2[i]=tmp+(2*i+1)*nsf;
+   }
+   ot=ot2;
+   nt=nt2;
+   ALLOC(best_index, N, int);
+   ALLOC(best_dist, N, spx_word32_t);
+   ALLOC(best_nind, N, int);
+   ALLOC(best_ntarget, N, int);
+   ALLOC(ndist, N, spx_word32_t);
+   ALLOC(odist, N, spx_word32_t);
+   
+   ALLOC(itmp, 2*N*nb_subvect, int);
+   for (i=0;i<N;i++)
+   {
+      nind[i]=itmp+2*i*nb_subvect;
+      oind[i]=itmp+(2*i+1)*nb_subvect;
+   }
+   
+   for (i=0;i<nsf;i++)
+      t[i]=target[i];
+
+   for (j=0;j<N;j++)
+      speex_move(&ot[j][0], t, nsf*sizeof(spx_word16_t));
+
+   /* Pre-compute codewords response and energy */
+   compute_weighted_codebook(shape_cb, r, resp, resp2, E, shape_cb_size, subvect_size, stack);
+
+   for (j=0;j<N;j++)
+      odist[j]=0;
+   
+   /*For all subvectors*/
+   for (i=0;i<nb_subvect;i++)
+   {
+      /*"erase" nbest list*/
+      for (j=0;j<N;j++)
+         ndist[j]=VERY_LARGE32;
+
+      /*For all n-bests of previous subvector*/
+      for (j=0;j<N;j++)
+      {
+         spx_word16_t *x=ot[j]+subvect_size*i;
+         spx_word32_t tener = 0;
+         for (m=0;m<subvect_size;m++)
+            tener = MAC16_16(tener, x[m],x[m]);
+#ifdef FIXED_POINT
+         tener = SHR32(tener,1);
+#else
+         tener *= .5;
+#endif
+         /*Find new n-best based on previous n-best j*/
+         if (have_sign)
+            vq_nbest_sign(x, resp2, subvect_size, shape_cb_size, E, N, best_index, best_dist, stack);
+         else
+            vq_nbest(x, resp2, subvect_size, shape_cb_size, E, N, best_index, best_dist, stack);
+
+         /*For all new n-bests*/
+         for (k=0;k<N;k++)
+         {
+            /* Compute total distance (including previous sub-vectors */
+            spx_word32_t err = ADD32(ADD32(odist[j],best_dist[k]),tener);
+            
+            /*update n-best list*/
+            if (err<ndist[N-1])
+            {
+               for (m=0;m<N;m++)
+               {
+                  if (err < ndist[m])
+                  {
+                     for (n=N-1;n>m;n--)
+                     {
+                        ndist[n] = ndist[n-1];
+                        best_nind[n] = best_nind[n-1];
+                        best_ntarget[n] = best_ntarget[n-1];
+                     }
+                     ndist[m] = err;
+                     best_nind[n] = best_index[k];
+                     best_ntarget[n] = j;
+                     break;
+                  }
+               }
+            }
+         }
+         if (i==0)
+            break;
+      }
+      for (j=0;j<N;j++)
+      {
+         /*previous target (we don't care what happened before*/
+         for (m=(i+1)*subvect_size;m<nsf;m++)
+            nt[j][m]=ot[best_ntarget[j]][m];
+         
+         /* New code: update the rest of the target only if it's worth it */
+         for (m=0;m<subvect_size;m++)
+         {
+            spx_word16_t g;
+            int rind;
+            spx_word16_t sign=1;
+            rind = best_nind[j];
+            if (rind>=shape_cb_size)
+            {
+               sign=-1;
+               rind-=shape_cb_size;
+            }
+
+            q=subvect_size-m;
+#ifdef FIXED_POINT
+            g=sign*shape_cb[rind*subvect_size+m];
+#else
+            g=sign*0.03125*shape_cb[rind*subvect_size+m];
+#endif
+            target_update(nt[j]+subvect_size*(i+1), g, r+q, nsf-subvect_size*(i+1));
+         }
+
+         for (q=0;q<nb_subvect;q++)
+            nind[j][q]=oind[best_ntarget[j]][q];
+         nind[j][i]=best_nind[j];
+      }
+
+      /*update old-new data*/
+      /* just swap pointers instead of a long copy */
+      {
+         spx_word16_t **tmp2;
+         tmp2=ot;
+         ot=nt;
+         nt=tmp2;
+      }
+      for (j=0;j<N;j++)
+         for (m=0;m<nb_subvect;m++)
+            oind[j][m]=nind[j][m];
+      for (j=0;j<N;j++)
+         odist[j]=ndist[j];
+   }
+
+   /*save indices*/
+   for (i=0;i<nb_subvect;i++)
+   {
+      ind[i]=nind[0][i];
+      speex_bits_pack(bits,ind[i],params->shape_bits+have_sign);
+   }
+   
+   /* Put everything back together */
+   for (i=0;i<nb_subvect;i++)
+   {
+      int rind;
+      spx_word16_t sign=1;
+      rind = ind[i];
+      if (rind>=shape_cb_size)
+      {
+         sign=-1;
+         rind-=shape_cb_size;
+      }
+#ifdef FIXED_POINT
+      if (sign==1)
+      {
+         for (j=0;j<subvect_size;j++)
+            e[subvect_size*i+j]=SHL32(EXTEND32(shape_cb[rind*subvect_size+j]),SIG_SHIFT-5);
+      } else {
+         for (j=0;j<subvect_size;j++)
+            e[subvect_size*i+j]=NEG32(SHL32(EXTEND32(shape_cb[rind*subvect_size+j]),SIG_SHIFT-5));
+      }
+#else
+      for (j=0;j<subvect_size;j++)
+         e[subvect_size*i+j]=sign*0.03125*shape_cb[rind*subvect_size+j];
+#endif
+   }   
+   /* Update excitation */
+   for (j=0;j<nsf;j++)
+      exc[j]=ADD32(exc[j],e[j]);
+   
+   /* Update target: only update target if necessary */
+   if (update_target)
+   {
+      syn_percep_zero(e, ak, awk1, awk2, r2, nsf,p, stack);
+      for (j=0;j<nsf;j++)
+         target[j]=SUB16(target[j],EXTRACT16(PSHR32(r2[j],8)));
+   }
+}
+
+
+void split_cb_shape_sign_unquant(
+spx_sig_t *exc,
+const void *par,                      /* non-overlapping codebook */
+int   nsf,                      /* number of samples in subframe */
+SpeexBits *bits,
+char *stack,
+spx_int32_t *seed
+)
+{
+   int i,j;
+   VARDECL(int *ind);
+   VARDECL(int *signs);
+   const signed char *shape_cb;
+   int shape_cb_size, subvect_size, nb_subvect;
+   const split_cb_params *params;
+   int have_sign;
+
+   params = (const split_cb_params *) par;
+   subvect_size = params->subvect_size;
+   nb_subvect = params->nb_subvect;
+   shape_cb_size = 1<<params->shape_bits;
+   shape_cb = params->shape_cb;
+   have_sign = params->have_sign;
+
+   ALLOC(ind, nb_subvect, int);
+   ALLOC(signs, nb_subvect, int);
+
+   /* Decode codewords and gains */
+   for (i=0;i<nb_subvect;i++)
+   {
+      if (have_sign)
+         signs[i] = speex_bits_unpack_unsigned(bits, 1);
+      else
+         signs[i] = 0;
+      ind[i] = speex_bits_unpack_unsigned(bits, params->shape_bits);
+   }
+   /* Compute decoded excitation */
+   for (i=0;i<nb_subvect;i++)
+   {
+      spx_word16_t s=1;
+      if (signs[i])
+         s=-1;
+#ifdef FIXED_POINT
+      if (s==1)
+      {
+         for (j=0;j<subvect_size;j++)
+            exc[subvect_size*i+j]=SHL32(EXTEND32(shape_cb[ind[i]*subvect_size+j]),SIG_SHIFT-5);
+      } else {
+         for (j=0;j<subvect_size;j++)
+            exc[subvect_size*i+j]=NEG32(SHL32(EXTEND32(shape_cb[ind[i]*subvect_size+j]),SIG_SHIFT-5));
+      }
+#else
+      for (j=0;j<subvect_size;j++)
+         exc[subvect_size*i+j]+=s*0.03125*shape_cb[ind[i]*subvect_size+j];      
+#endif
+   }
+}
+
+void noise_codebook_quant(
+spx_word16_t target[],			/* target vector */
+spx_coef_t ak[],			/* LPCs for this subframe */
+spx_coef_t awk1[],			/* Weighted LPCs for this subframe */
+spx_coef_t awk2[],			/* Weighted LPCs for this subframe */
+const void *par,                      /* Codebook/search parameters*/
+int   p,                        /* number of LPC coeffs */
+int   nsf,                      /* number of samples in subframe */
+spx_sig_t *exc,
+spx_word16_t *r,
+SpeexBits *bits,
+char *stack,
+int   complexity,
+int   update_target
+)
+{
+   int i;
+   VARDECL(spx_sig_t *tmp);
+   ALLOC(tmp, nsf, spx_sig_t);
+   for (i=0;i<nsf;i++)
+      tmp[i]=PSHR32(EXTEND32(target[i]),SIG_SHIFT);
+   residue_percep_zero(tmp, ak, awk1, awk2, tmp, nsf, p, stack);
+
+   for (i=0;i<nsf;i++)
+      exc[i]+=tmp[i];
+   for (i=0;i<nsf;i++)
+      target[i]=0;
+}
+
+
+void noise_codebook_unquant(
+spx_sig_t *exc,
+const void *par,                      /* non-overlapping codebook */
+int   nsf,                      /* number of samples in subframe */
+SpeexBits *bits,
+char *stack,
+spx_int32_t *seed
+)
+{
+   int i;
+   /* FIXME: This is bad, but I don't think the function ever gets called anyway */
+   for (i=0;i<nsf;i++)
+      exc[i]=SHL32(EXTEND32(speex_rand(1, seed)),SIG_SHIFT);
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search.h	(revision 1163)
@@ -0,0 +1,103 @@
+/* Copyright (C) 2002 Jean-Marc Valin & David Rowe */
+/**
+   @file cb_search.h
+   @brief Overlapped codebook search
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef CB_SEARCH_H
+#define CB_SEARCH_H
+
+#include <speex/speex_bits.h>
+#include "misc.h"
+
+/** Split codebook parameters. */
+typedef struct split_cb_params {
+   int     subvect_size;
+   int     nb_subvect;
+   const signed char  *shape_cb;
+   int     shape_bits;
+   int     have_sign;
+} split_cb_params;
+
+
+void split_cb_search_shape_sign(
+spx_word16_t target[],             /* target vector */
+spx_coef_t ak[],                /* LPCs for this subframe */
+spx_coef_t awk1[],              /* Weighted LPCs for this subframe */
+spx_coef_t awk2[],              /* Weighted LPCs for this subframe */
+const void *par,                /* Codebook/search parameters */
+int   p,                        /* number of LPC coeffs */
+int   nsf,                      /* number of samples in subframe */
+spx_sig_t *exc,
+spx_word16_t *r,
+SpeexBits *bits,
+char *stack,
+int   complexity,
+int   update_target
+);
+
+void split_cb_shape_sign_unquant(
+spx_sig_t *exc,
+const void *par,                /* non-overlapping codebook */
+int   nsf,                      /* number of samples in subframe */
+SpeexBits *bits,
+char *stack,
+spx_int32_t *seed
+);
+
+
+void noise_codebook_quant(
+spx_word16_t target[],             /* target vector */
+spx_coef_t ak[],                /* LPCs for this subframe */
+spx_coef_t awk1[],              /* Weighted LPCs for this subframe */
+spx_coef_t awk2[],              /* Weighted LPCs for this subframe */
+const void *par,                /* Codebook/search parameters */
+int   p,                        /* number of LPC coeffs */
+int   nsf,                      /* number of samples in subframe */
+spx_sig_t *exc,
+spx_word16_t *r,
+SpeexBits *bits,
+char *stack,
+int   complexity,
+int   update_target
+);
+
+
+void noise_codebook_unquant(
+spx_sig_t *exc,
+const void *par,                /* non-overlapping codebook */
+int   nsf,                      /* number of samples in subframe */
+SpeexBits *bits,
+char *stack,
+spx_int32_t *seed
+);
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search_arm4.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search_arm4.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search_arm4.h	(revision 1163)
@@ -0,0 +1,137 @@
+/* Copyright (C) 2004 Jean-Marc Valin */
+/**
+   @file cb_search_arm4.h
+   @brief Fixed codebook functions (ARM4 version)
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+/* This optimization is temporaly disabled until it is fixed to account for the fact 
+   that "r" is now a 16-bit array */
+#if 0
+#define OVERRIDE_COMPUTE_WEIGHTED_CODEBOOK
+static void compute_weighted_codebook(const signed char *shape_cb, const spx_word16_t *r, spx_word16_t *resp, spx_word16_t *resp2, spx_word32_t *E, int shape_cb_size, int subvect_size, char *stack)
+{
+   int i, j, k;
+  //const signed char *shape;
+   for (i=0;i<shape_cb_size;i+=4)
+   {
+
+      //shape = shape_cb;
+      E[0]=0;
+      E[1]=0;
+      E[2]=0;
+      E[3]=0;
+
+      /* Compute codeword response using convolution with impulse response */
+      for(j=0;j<subvect_size;j++)
+      {
+#if 1
+          spx_word16_t *res;
+          res = resp+j;
+          spx_word32_t resj0,resj1,resj2,resj3;
+          spx_word32_t dead1, dead2, dead3, dead4, dead5, dead6, dead7, dead8;
+          __asm__ __volatile__ (
+                "mov %0, #0 \n\t"
+                "mov %1, #0 \n\t"
+                "mov %2, #0 \n\t"
+                "mov %3, #0 \n\t"
+                ".weighted%=: \n\t"
+                "ldrsb %8, [%6] \n\t"
+                "ldr %10, [%5], #-4 \n\t"
+                "mov %9, %6 \n\t"
+                "ldrsb %11, [%9, %7]! \n\t"
+                "mla %0, %10, %8, %0 \n\t"
+                "ldrsb %8, [%9, %7]! \n\t"
+                "mla %1, %10, %11, %1 \n\t"
+                "ldrsb %11, [%9, %7]! \n\t"
+                "mla %2, %10, %8, %2 \n\t"
+                "subs %4, %4, #1 \n\t"
+                "mla %3, %10, %11, %3 \n\t"
+                "add %6, %6, #1 \n\t"
+                "bne .weighted%= \n\t"
+            : "=r" (resj0), "=r" (resj1), "=r" (resj2), "=r" (resj3),
+          "=r" (dead1), "=r" (dead2), "=r" (dead3), "=r" (dead4),
+          "=r" (dead5), "=r" (dead6), "=r" (dead7), "=r" (dead8)
+            : "4" (j+1), "5" (r+j), "6" (shape_cb), "7" (subvect_size)
+            : "cc", "memory");
+#else
+          spx_word16_t *res;
+          res = resp+j;
+          spx_word32_t resj0=0;
+          spx_word32_t resj1=0;
+          spx_word32_t resj2=0;
+          spx_word32_t resj3=0;
+          for (k=0;k<=j;k++)
+          {
+             const signed char *shape=shape_cb+k;
+             resj0 = MAC16_16(resj0,*shape,r[j-k]);
+             shape += subvect_size;
+             resj1 = MAC16_16(resj1,*shape,r[j-k]);
+             shape += subvect_size;
+             resj2 = MAC16_16(resj2,*shape,r[j-k]);
+             shape += subvect_size;
+             resj3 = MAC16_16(resj3,*shape,r[j-k]);
+             shape += subvect_size;
+          }
+#endif
+
+#ifdef FIXED_POINT
+          resj0 = SHR(resj0, 11);
+          resj1 = SHR(resj1, 11);
+          resj2 = SHR(resj2, 11);
+          resj3 = SHR(resj3, 11);
+#else
+          resj0 *= 0.03125;
+          resj1 *= 0.03125;
+          resj2 *= 0.03125;
+          resj3 *= 0.03125;
+#endif
+
+          /* Compute codeword energy */
+          E[0]=ADD32(E[0],MULT16_16(resj0,resj0));
+          E[1]=ADD32(E[1],MULT16_16(resj1,resj1));
+          E[2]=ADD32(E[2],MULT16_16(resj2,resj2));
+          E[3]=ADD32(E[3],MULT16_16(resj3,resj3));
+          *res = resj0;
+          res += subvect_size;
+          *res = resj1;
+          res += subvect_size;
+          *res = resj2;
+          res += subvect_size;
+          *res = resj3;
+          res += subvect_size;
+      }
+      resp += subvect_size<<2;
+      shape_cb += subvect_size<<2;
+      E+=4;
+   }
+
+}
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search_bfin.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search_bfin.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search_bfin.h	(revision 1163)
@@ -0,0 +1,112 @@
+/* Copyright (C) 2005 Analog Devices */
+/**
+   @author Jean-Marc Valin 
+   @file cb_search_bfin.h
+   @brief Fixed codebook functions (Blackfin version)
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#define OVERRIDE_COMPUTE_WEIGHTED_CODEBOOK 
+void compute_weighted_codebook(const signed char *shape_cb, const spx_word16_t *r, spx_word16_t *resp, spx_word16_t *resp2, spx_word32_t *E, int shape_cb_size, int subvect_size, char *stack)
+{
+   int i;
+   for (i=0;i<shape_cb_size;i++)
+   {
+      __asm__ __volatile__ (
+         "P0 = %0;\n\t"
+         "LC0 = P0;\n\t"
+         "P1 = %1;\n\t"
+         "P2 = %2;\n\t"
+         "P3 = %3;\n\t"
+         "P0 = 1;\n\t"
+         "L0 = 0;\n\t"
+         "L1 = 0;\n\t"
+         "R2 = 0;\n\t"
+         "A1 = 0;\n\t"
+         "LOOP outter%= LC0;\n\t"
+         "LOOP_BEGIN outter%=;\n\t"
+            "A0 = 0;\n\t"
+            "P4 = P1;\n\t"
+            "I1 = P2;\n\t"
+            "R0 = B[P4++] (X) || R1.L = W[I1--];\n\t"
+            "LOOP inner%= LC1 = P0;\n\t"
+            "LOOP_BEGIN inner%=;\n\t"
+               "A0 += R0.L*R1.L (IS) || R0 = B[P4++] (X) || R1.L = W[I1--];\n\t"
+            "LOOP_END inner%=;\n\t"
+            "R0 = A0;\n\t"
+            "R0 >>>= 13;\n\t"
+            "A1 += R0.L*R0.L (IS);\n\t"
+            "W[P3++] = R0;\n\t"
+            "P0 += 1;\n\t"
+            "P2 += 2;\n\t"
+         "LOOP_END outter%=;\n\t"
+         "P4 = %4;\n\t"
+         "R1 = A1;\n\t"
+         "[P4] = R1;\n\t"
+         :
+      : "m" (subvect_size), "m" (shape_cb), "m" (r), "m" (resp), "m" (E)
+      : "A0", "P0", "P1", "P2", "P3", "P4", "R0", "R1", "R2", "I0", "I1", "L0", 
+        "L1", "A0", "A1", "memory"
+#if !(__GNUC__ == 3)
+         , "LC0", "LC1" /* gcc 3.4 doesn't know about LC registers */
+#endif
+      );
+      shape_cb += subvect_size;
+      resp += subvect_size;
+      E++;
+   }
+}
+
+#define OVERRIDE_TARGET_UPDATE
+static inline void target_update(spx_word16_t *t, spx_word16_t g, spx_word16_t *r, int len)
+{
+   if (!len)
+      return;
+   __asm__ __volatile__
+         (
+         "I0 = %0;\n\t"
+         "I1 = %1;\n\t"
+         "L0 = 0;\n\t"
+         "L1 = 0;\n\t"
+         "R2 = 4096;\n\t"
+         "LOOP tupdate%= LC0 = %3;\n\t"
+         "LOOP_BEGIN tupdate%=;\n\t"
+            "R0.L = W[I0] || R1.L = W[I1++];\n\t"
+            "R1 = (A1 = R1.L*%2.L) (IS);\n\t"
+            "R1 = R1 + R2;\n\t"
+            "R1 >>>= 13;\n\t"
+            "R0.L = R0.L - R1.L;\n\t"
+            "W[I0++] = R0.L;\n\t"
+         "LOOP_END tupdate%=;\n\t"
+   :
+   : "a" (t), "a" (r), "d" (g), "a" (len)
+   : "R0", "R1", "R2", "A1", "I0", "I1", "L0", "L1"
+         );
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search_sse.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search_sse.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/cb_search_sse.h	(revision 1163)
@@ -0,0 +1,84 @@
+/* Copyright (C) 2004 Jean-Marc Valin */
+/**
+   @file cb_search_sse.h
+   @brief Fixed codebook functions (SSE version)
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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 <xmmintrin.h>
+
+static inline void _spx_mm_getr_ps (__m128 U, float *__Z, float *__Y, float *__X, float *__W)
+{
+  union {
+    float __a[4];
+    __m128 __v;
+  } __u;
+  
+  __u.__v = U;
+
+  *__Z = __u.__a[0];
+  *__Y = __u.__a[1];
+  *__X = __u.__a[2];
+  *__W = __u.__a[3];
+
+}
+
+#define OVERRIDE_COMPUTE_WEIGHTED_CODEBOOK
+static void compute_weighted_codebook(const signed char *shape_cb, const spx_sig_t *_r, float *resp, __m128 *resp2, __m128 *E, int shape_cb_size, int subvect_size, char *stack)
+{
+   int i, j, k;
+   __m128 resj, EE;
+   VARDECL(__m128 *r);
+   VARDECL(__m128 *shape);
+   ALLOC(r, subvect_size, __m128);
+   ALLOC(shape, subvect_size, __m128);
+   for(j=0;j<subvect_size;j++)
+      r[j] = _mm_load_ps1(_r+j);
+   for (i=0;i<shape_cb_size;i+=4)
+   {
+      float *_res = resp+i*subvect_size;
+      const signed char *_shape = shape_cb+i*subvect_size;
+      EE = _mm_setzero_ps();
+      for(j=0;j<subvect_size;j++)
+      {
+         shape[j] = _mm_setr_ps(0.03125*_shape[j], 0.03125*_shape[subvect_size+j], 0.03125*_shape[2*subvect_size+j], 0.03125*_shape[3*subvect_size+j]);
+      }
+      for(j=0;j<subvect_size;j++)
+      {
+         resj = _mm_setzero_ps();
+         for (k=0;k<=j;k++)
+            resj = _mm_add_ps(resj, _mm_mul_ps(shape[k],r[j-k]));
+         _spx_mm_getr_ps(resj, _res+j, _res+subvect_size+j, _res+2*subvect_size+j, _res+3*subvect_size+j);
+         *resp2++ = resj;
+         EE = _mm_add_ps(EE, _mm_mul_ps(resj, resj));
+      }
+      E[i>>2] = EE;
+   }
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/config.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/config.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/config.h	(revision 1163)
@@ -0,0 +1,34 @@
+
+#include <pj/log.h>
+
+/* Check if we need to use the fixed point version */
+#if !defined(PJ_HAS_FLOATING_POINT) || PJ_HAS_FLOATING_POINT==0
+#   define FIXED_POINT
+#endif
+
+
+#define inline __inline
+#define restrict
+
+#include "misc.h"
+
+#ifdef _MSC_VER
+#   pragma warning(disable: 4100)   // unreferenced formal parameter
+#   pragma warning(disable: 4101)   // unreferenced local variable
+#   pragma warning(disable: 4244)   // conversion from 'double ' to 'float '
+#   pragma warning(disable: 4305)   // truncation from 'const double ' to 'float '
+#   pragma warning(disable: 4701)   // local variable used without initialized
+#endif
+
+/*
+ * Override miscellaneous Speex functions.
+ */
+#define OVERRIDE_SPEEX_ERROR
+#define speex_error(str) PJ_LOG(4,("speex", "error: %s", str))
+
+#define OVERRIDE_SPEEX_WARNING
+#define speex_warning(str) PJ_LOG(5,("speex", "warning: %s", str))
+
+#define OVERRIDE_SPEEX_WARNING_INT
+#define speex_warning_int(str,val)  PJ_LOG(5,("speex", "warning: %s: %d", str, val))
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_10_16_table.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_10_16_table.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_10_16_table.c	(revision 1163)
@@ -0,0 +1,50 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: exc_10_16_table.c
+   Codebook for excitation in narrowband CELP mode (3200 bps)
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+
+const signed char exc_10_16_table[160] = {
+22,39,14,44,11,35,-2,23,-4,6,
+46,-28,13,-27,-23,12,4,20,-5,9,
+37,-18,-23,23,0,9,-6,-20,4,-1,
+-17,-5,-4,17,0,1,9,-2,1,2,
+2,-12,8,-25,39,15,9,16,-55,-11,
+9,11,5,10,-2,-60,8,13,-6,11,
+-16,27,-47,-12,11,1,16,-7,9,-3,
+-29,9,-14,25,-19,34,36,12,40,-10,
+-3,-24,-14,-37,-21,-35,-2,-36,3,-6,
+67,28,6,-17,-3,-12,-16,-15,-17,-7,
+-59,-36,-13,1,7,1,2,10,2,11,
+13,10,8,-2,7,3,5,4,2,2,
+-3,-8,4,-5,6,7,-42,15,35,-2,
+-46,38,28,-20,-9,1,7,-3,0,-2,
+0,0,0,0,0,0,0,0,0,0,
+-15,-28,52,32,5,-5,-17,-20,-10,-1};
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_10_32_table.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_10_32_table.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_10_32_table.c	(revision 1163)
@@ -0,0 +1,66 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: exc_10_32_table.c
+   Codebook for excitation in narrowband CELP mode (4000 bps)
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+
+const signed char exc_10_32_table[320] = {
+7,17,17,27,25,22,12,4,-3,0,
+28,-36,39,-24,-15,3,-9,15,-5,10,
+31,-28,11,31,-21,9,-11,-11,-2,-7,
+-25,14,-22,31,4,-14,19,-12,14,-5,
+4,-7,4,-5,9,0,-2,42,-47,-16,
+1,8,0,9,23,-57,0,28,-11,6,
+-31,55,-45,3,-5,4,2,-2,4,-7,
+-3,6,-2,7,-3,12,5,8,54,-10,
+8,-7,-8,-24,-25,-27,-14,-5,8,5,
+44,23,5,-9,-11,-11,-13,-9,-12,-8,
+-29,-8,-22,6,-15,3,-12,-1,-5,-3,
+34,-1,29,-16,17,-4,12,2,1,4,
+-2,-4,2,-1,11,-3,-52,28,30,-9,
+-32,25,44,-20,-24,4,6,-1,0,0,
+0,0,0,0,0,0,0,0,0,0,
+-25,-10,22,29,13,-13,-22,-13,-4,0,
+-4,-16,10,15,-36,-24,28,25,-1,-3,
+66,-33,-11,-15,6,0,3,4,-2,5,
+24,-20,-47,29,19,-2,-4,-1,0,-1,
+-2,3,1,8,-11,5,5,-57,28,28,
+0,-16,4,-4,12,-6,-1,2,-20,61,
+-9,24,-22,-42,29,6,17,8,4,2,
+-65,15,8,10,5,6,5,3,2,-2,
+-3,5,-9,4,-5,23,13,23,-3,-63,
+3,-5,-4,-6,0,-3,23,-36,-46,9,
+5,5,8,4,9,-5,1,-3,10,1,
+-6,10,-11,24,-47,31,22,-12,14,-10,
+6,11,-7,-7,7,-31,51,-12,-6,7,
+6,-17,9,-11,-20,52,-19,3,-6,-6,
+-8,-5,23,-41,37,1,-21,10,-14,8,
+7,5,-15,-15,23,39,-26,-33,7,2,
+-32,-30,-21,-8,4,12,17,15,14,11};
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_20_32_table.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_20_32_table.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_20_32_table.c	(revision 1163)
@@ -0,0 +1,66 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: exc_20_32_table.c
+   Codebook for excitation in narrowband CELP mode (2000 bps)
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+
+const signed char exc_20_32_table[640] = {
+12,32,25,46,36,33,9,14,-3,6,1,-8,0,-10,-5,-7,-7,-7,-5,-5,
+31,-27,24,-32,-4,10,-11,21,-3,19,23,-9,22,24,-10,-1,-10,-13,-7,-11,
+42,-33,31,19,-8,0,-10,-16,1,-21,-17,10,-8,14,8,4,11,-2,5,-2,
+-33,11,-16,33,11,-4,9,-4,11,2,6,-5,8,-5,11,-4,-6,26,-36,-16,
+0,4,-2,-8,12,6,-1,34,-46,-22,9,9,21,9,5,-66,-5,26,2,10,
+13,2,19,9,12,-81,3,13,13,0,-14,22,-35,6,-7,-4,6,-6,10,-6,
+-31,38,-33,0,-10,-11,5,-12,12,-17,5,0,-6,13,-9,10,8,25,33,2,
+-12,8,-6,10,-2,21,7,17,43,5,11,-7,-9,-20,-36,-20,-23,-4,-4,-3,
+27,-9,-9,-49,-39,-38,-11,-9,6,5,23,25,5,3,3,4,1,2,-3,-1,
+87,39,17,-21,-9,-19,-9,-15,-13,-14,-17,-11,-10,-11,-8,-6,-1,-3,-3,-1,
+-54,-34,-27,-8,-11,-4,-5,0,0,4,8,6,9,7,9,7,6,5,5,5,
+48,10,19,-10,12,-1,9,-3,2,5,-3,2,-2,-2,0,-2,-26,6,9,-7,
+-16,-9,2,7,7,-5,-43,11,22,-11,-9,34,37,-15,-13,-6,1,-1,1,1,
+-64,56,52,-11,-27,5,4,3,1,2,1,3,-1,-4,-4,-10,-7,-4,-4,2,
+-1,-7,-7,-12,-10,-15,-9,-5,-5,-11,-16,-13,6,16,4,-13,-16,-10,-4,2,
+-47,-13,25,47,19,-14,-20,-8,-17,0,-3,-13,1,6,-17,-14,15,1,10,6,
+-24,0,-10,19,-69,-8,14,49,17,-5,33,-29,3,-4,0,2,-8,5,-6,2,
+120,-56,-12,-47,23,-9,6,-5,1,2,-5,1,-10,4,-1,-1,4,-1,0,-3,
+30,-52,-67,30,22,11,-1,-4,3,0,7,2,0,1,-10,-4,-8,-13,5,1,
+1,-1,5,13,-9,-3,-10,-62,22,48,-4,-6,2,3,5,1,1,4,1,13,
+3,-20,10,-9,13,-2,-4,9,-20,44,-1,20,-32,-67,19,0,28,11,8,2,
+-11,15,-19,-53,31,2,34,10,6,-4,-58,8,10,13,14,1,12,2,0,0,
+-128,37,-8,44,-9,26,-3,18,2,6,11,-1,9,1,5,3,0,1,1,2,
+12,3,-2,-3,7,25,9,18,-6,-37,3,-8,-16,3,-10,-7,17,-34,-44,11,
+17,-15,-3,-16,-1,-13,11,-46,-65,-2,8,13,2,4,4,5,15,5,9,6,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+-9,19,-12,12,-28,38,29,-1,12,2,5,23,-10,3,4,-15,21,-4,3,3,
+6,17,-9,-4,-8,-20,26,5,-10,6,1,-19,18,-15,-12,47,-6,-2,-7,-9,
+-1,-17,-2,-2,-14,30,-14,2,-7,-4,-1,-12,11,-25,16,-3,-12,11,-7,7,
+-17,1,19,-28,31,-7,-10,7,-10,3,12,5,-16,6,24,41,-29,-54,0,1,
+7,-1,5,-6,13,10,-4,-8,8,-9,-27,-53,-38,-1,10,19,17,16,12,12,
+0,3,-7,-4,13,12,-31,-14,6,-5,3,5,17,43,50,25,10,1,-6,-2};
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_5_256_table.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_5_256_table.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_5_256_table.c	(revision 1163)
@@ -0,0 +1,290 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: exc_5_256_table.c
+   Codebook for excitation in narrowband CELP mode (12800 bps)
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+
+const signed char exc_5_256_table[1280] = {
+-8,-37,5,-43,5,
+73,61,39,12,-3,
+-61,-32,2,42,30,
+-3,17,-27,9,34,
+20,-1,-5,2,23,
+-7,-46,26,53,-47,
+20,-2,-33,-89,-51,
+-64,27,11,15,-34,
+-5,-56,25,-9,-1,
+-29,1,40,67,-23,
+-16,16,33,19,7,
+14,85,22,-10,-10,
+-12,-7,-1,52,89,
+29,11,-20,-37,-46,
+-15,17,-24,-28,24,
+2,1,0,23,-101,
+23,14,-1,-23,-18,
+9,5,-13,38,1,
+-28,-28,4,27,51,
+-26,34,-40,35,47,
+54,38,-54,-26,-6,
+42,-25,13,-30,-36,
+18,41,-4,-33,23,
+-32,-7,-4,51,-3,
+17,-52,56,-47,36,
+-2,-21,36,10,8,
+-33,31,19,9,-5,
+-40,10,-9,-21,19,
+18,-78,-18,-5,0,
+-26,-36,-47,-51,-44,
+18,40,27,-2,29,
+49,-26,2,32,-54,
+30,-73,54,3,-5,
+36,22,53,10,-1,
+-84,-53,-29,-5,3,
+-44,53,-51,4,22,
+71,-35,-1,33,-5,
+-27,-7,36,17,-23,
+-39,16,-9,-55,-15,
+-20,39,-35,6,-39,
+-14,18,48,-64,-17,
+-15,9,39,81,37,
+-68,37,47,-21,-6,
+-104,13,6,9,-2,
+35,8,-23,18,42,
+45,21,33,-5,-49,
+9,-6,-43,-56,39,
+2,-16,-25,87,1,
+-3,-9,17,-25,-11,
+-9,-1,10,2,-14,
+-14,4,-1,-10,28,
+-23,40,-32,26,-9,
+26,4,-27,-23,3,
+42,-60,1,49,-3,
+27,10,-52,-40,-2,
+18,45,-23,17,-44,
+3,-3,17,-46,52,
+-40,-47,25,75,31,
+-49,53,30,-30,-32,
+-36,38,-6,-15,-16,
+54,-27,-48,3,38,
+-29,-32,-22,-14,-4,
+-23,-13,32,-39,9,
+8,-45,-13,34,-16,
+49,40,32,31,28,
+23,23,32,47,59,
+-68,8,62,44,25,
+-14,-24,-65,-16,36,
+67,-25,-38,-21,4,
+-33,-2,42,5,-63,
+40,11,26,-42,-23,
+-61,79,-31,23,-20,
+10,-32,53,-25,-36,
+10,-26,-5,3,0,
+-71,5,-10,-37,1,
+-24,21,-54,-17,1,
+-29,-25,-15,-27,32,
+68,45,-16,-37,-18,
+-5,1,0,-77,71,
+-6,3,-20,71,-67,
+29,-35,10,-30,19,
+4,16,17,5,0,
+-14,19,2,28,26,
+59,3,2,24,39,
+55,-50,-45,-18,-17,
+33,-35,14,-1,1,
+8,87,-35,-29,0,
+-27,13,-7,23,-13,
+37,-40,50,-35,14,
+19,-7,-14,49,54,
+-5,22,-2,-29,-8,
+-27,38,13,27,48,
+12,-41,-21,-15,28,
+7,-16,-24,-19,-20,
+11,-20,9,2,13,
+23,-20,11,27,-27,
+71,-69,8,2,-6,
+22,12,16,16,9,
+-16,-8,-17,1,25,
+1,40,-37,-33,66,
+94,53,4,-22,-25,
+-41,-42,25,35,-16,
+-15,57,31,-29,-32,
+21,16,-60,45,15,
+-1,7,57,-26,-47,
+-29,11,8,15,19,
+-105,-8,54,27,10,
+-17,6,-12,-1,-10,
+4,0,23,-10,31,
+13,11,10,12,-64,
+23,-3,-8,-19,16,
+52,24,-40,16,10,
+40,5,9,0,-13,
+-7,-21,-8,-6,-7,
+-21,59,16,-53,18,
+-60,11,-47,14,-18,
+25,-13,-24,4,-39,
+16,-28,54,26,-67,
+30,27,-20,-52,20,
+-12,55,12,18,-16,
+39,-14,-6,-26,56,
+-88,-55,12,25,26,
+-37,6,75,0,-34,
+-81,54,-30,1,-7,
+49,-23,-14,21,10,
+-62,-58,-57,-47,-34,
+15,-4,34,-78,31,
+25,-11,7,50,-10,
+42,-63,14,-36,-4,
+57,55,57,53,42,
+-42,-1,15,40,37,
+15,25,-11,6,1,
+31,-2,-6,-1,-7,
+-64,34,28,30,-1,
+3,21,0,-88,-12,
+-56,25,-28,40,8,
+-28,-14,9,12,2,
+-6,-17,22,49,-6,
+-26,14,28,-20,4,
+-12,50,35,40,13,
+-38,-58,-29,17,30,
+22,60,26,-54,-39,
+-12,58,-28,-63,10,
+-21,-8,-12,26,-62,
+6,-10,-11,-22,-6,
+-7,4,1,18,2,
+-70,11,14,4,13,
+19,-24,-34,24,67,
+17,51,-21,13,23,
+54,-30,48,1,-13,
+80,26,-16,-2,13,
+-4,6,-30,29,-24,
+73,-58,30,-27,20,
+-2,-21,41,45,30,
+-27,-3,-5,-18,-20,
+-49,-3,-35,10,42,
+-19,-67,-53,-11,9,
+13,-15,-33,-51,-30,
+15,7,25,-30,4,
+28,-22,-34,54,-29,
+39,-46,20,16,34,
+-4,47,75,1,-44,
+-55,-24,7,-1,9,
+-42,50,-8,-36,41,
+68,0,-4,-10,-23,
+-15,-50,64,36,-9,
+-27,12,25,-38,-47,
+-37,32,-49,51,-36,
+2,-4,69,-26,19,
+7,45,67,46,13,
+-63,46,15,-47,4,
+-41,13,-6,5,-21,
+37,26,-55,-7,33,
+-1,-28,10,-17,-64,
+-14,0,-36,-17,93,
+-3,-9,-66,44,-21,
+3,-12,38,-6,-13,
+-12,19,13,43,-43,
+-10,-12,6,-5,9,
+-49,32,-5,2,4,
+5,15,-16,10,-21,
+8,-62,-8,64,8,
+79,-1,-66,-49,-18,
+5,40,-5,-30,-45,
+1,-6,21,-32,93,
+-18,-30,-21,32,21,
+-18,22,8,5,-41,
+-54,80,22,-10,-7,
+-8,-23,-64,66,56,
+-14,-30,-41,-46,-14,
+-29,-37,27,-14,42,
+-2,-9,-29,34,14,
+33,-14,22,4,10,
+26,26,28,32,23,
+-72,-32,3,0,-14,
+35,-42,-78,-32,6,
+29,-18,-45,-5,7,
+-33,-45,-3,-22,-34,
+8,-8,4,-51,-25,
+-9,59,-78,21,-5,
+-25,-48,66,-15,-17,
+-24,-49,-13,25,-23,
+-64,-6,40,-24,-19,
+-11,57,-33,-8,1,
+10,-52,-54,28,39,
+49,34,-11,-61,-41,
+-43,10,15,-15,51,
+30,15,-51,32,-34,
+-2,-34,14,18,16,
+1,1,-3,-3,1,
+1,-18,6,16,48,
+12,-5,-42,7,36,
+48,7,-20,-10,7,
+12,2,54,39,-38,
+37,54,4,-11,-8,
+-46,-10,5,-10,-34,
+46,-12,29,-37,39,
+36,-11,24,56,17,
+14,20,25,0,-25,
+-28,55,-7,-5,27,
+3,9,-26,-8,6,
+-24,-10,-30,-31,-34,
+18,4,22,21,40,
+-1,-29,-37,-8,-21,
+92,-29,11,-3,11,
+73,23,22,7,4,
+-44,-9,-11,21,-13,
+11,9,-78,-1,47,
+114,-12,-37,-19,-5,
+-11,-22,19,12,-30,
+7,38,45,-21,-8,
+-9,55,-45,56,-21,
+7,17,46,-57,-87,
+-6,27,31,31,7,
+-56,-12,46,21,-5,
+-12,36,3,3,-21,
+43,19,12,-7,9,
+-14,0,-9,-33,-91,
+7,26,3,-11,64,
+83,-31,-46,25,2,
+9,5,2,2,-1,
+20,-17,10,-5,-27,
+-8,20,8,-19,16,
+-21,-13,-31,5,5,
+42,24,9,34,-20,
+28,-61,22,11,-39,
+64,-20,-1,-30,-9,
+-20,24,-25,-24,-29,
+22,-60,6,-5,41,
+-9,-87,14,34,15,
+-57,52,69,15,-3,
+-102,58,16,3,6,
+60,-75,-32,26,7,
+-57,-27,-32,-24,-21,
+-29,-16,62,-46,31,
+30,-27,-15,7,15};
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_5_64_table.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_5_64_table.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_5_64_table.c	(revision 1163)
@@ -0,0 +1,98 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: exc_5_64_table.c
+   Codebook for excitation in narrowband CELP mode (9600 bps)
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+
+const signed char exc_5_64_table[320]={
+1,5,-15,49,-66,
+-48,-4,50,-44,7,
+37,16,-18,25,-26,
+-26,-15,19,19,-27,
+-47,28,57,5,-17,
+-32,-41,68,21,-2,
+64,56,8,-16,-13,
+-26,-9,-16,11,6,
+-39,25,-19,22,-31,
+20,-45,55,-43,10,
+-16,47,-40,40,-20,
+-51,3,-17,-14,-15,
+-24,53,-20,-46,46,
+27,-68,32,3,-18,
+-5,9,-31,16,-9,
+-10,-1,-23,48,95,
+47,25,-41,-32,-3,
+15,-25,-55,36,41,
+-27,20,5,13,14,
+-22,5,2,-23,18,
+46,-15,17,-18,-34,
+-5,-8,27,-55,73,
+16,2,-1,-17,40,
+-78,33,0,2,19,
+4,53,-16,-15,-16,
+-28,-3,-13,49,8,
+-7,-29,27,-13,32,
+20,32,-61,16,14,
+41,44,40,24,20,
+7,4,48,-60,-77,
+17,-6,-48,65,-15,
+32,-30,-71,-10,-3,
+-6,10,-2,-7,-29,
+-56,67,-30,7,-5,
+86,-6,-10,0,5,
+-31,60,34,-38,-3,
+24,10,-2,30,23,
+24,-41,12,70,-43,
+15,-17,6,13,16,
+-13,8,30,-15,-8,
+5,23,-34,-98,-4,
+-13,13,-48,-31,70,
+12,31,25,24,-24,
+26,-7,33,-16,8,
+5,-11,-14,-8,-65,
+13,10,-2,-9,0,
+-3,-68,5,35,7,
+0,-31,-1,-17,-9,
+-9,16,-37,-18,-1,
+69,-48,-28,22,-21,
+-11,5,49,55,23,
+-86,-36,16,2,13,
+63,-51,30,-11,13,
+24,-18,-6,14,-19,
+1,41,9,-5,27,
+-36,-44,-34,-37,-21,
+-26,31,-39,15,43,
+5,-8,29,20,-8,
+-20,-52,-28,-1,13,
+26,-34,-10,-9,27,
+-8,8,27,-66,4,
+12,-22,49,10,-77,
+32,-18,3,-38,12,
+-3,-1,2,2,0};
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_8_128_table.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_8_128_table.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/exc_8_128_table.c	(revision 1163)
@@ -0,0 +1,162 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: exc_8_128_table.c
+   Codebook for excitation in narrowband CELP mode (7000 bps)
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+
+const signed char exc_8_128_table[1024] = {
+-14,9,13,-32,2,-10,31,-10,
+-8,-8,6,-4,-1,10,-64,23,
+6,20,13,6,8,-22,16,34,
+7,42,-49,-28,5,26,4,-15,
+41,34,41,32,33,24,23,14,
+8,40,34,4,-24,-41,-19,-15,
+13,-13,33,-54,24,27,-44,33,
+27,-15,-15,24,-19,14,-36,14,
+-9,24,-12,-4,37,-5,16,-34,
+5,10,33,-15,-54,-16,12,25,
+12,1,2,0,3,-1,-4,-4,
+11,2,-56,54,27,-20,13,-6,
+-46,-41,-33,-11,-5,7,12,14,
+-14,-5,8,20,6,3,4,-8,
+-5,-42,11,8,-14,25,-2,2,
+13,11,-22,39,-9,9,5,-45,
+-9,7,-9,12,-7,34,-17,-102,
+7,2,-42,18,35,-9,-34,11,
+-5,-2,3,22,46,-52,-25,-9,
+-94,8,11,-5,-5,-5,4,-7,
+-35,-7,54,5,-32,3,24,-9,
+-22,8,65,37,-1,-12,-23,-6,
+-9,-28,55,-33,14,-3,2,18,
+-60,41,-17,8,-16,17,-11,0,
+-11,29,-28,37,9,-53,33,-14,
+-9,7,-25,-7,-11,26,-32,-8,
+24,-21,22,-19,19,-10,29,-14,
+0,0,0,0,0,0,0,0,
+-5,-52,10,41,6,-30,-4,16,
+32,22,-27,-22,32,-3,-28,-3,
+3,-35,6,17,23,21,8,2,
+4,-45,-17,14,23,-4,-31,-11,
+-3,14,1,19,-11,2,61,-8,
+9,-12,7,-10,12,-3,-24,99,
+-48,23,50,-37,-5,-23,0,8,
+-14,35,-64,-5,46,-25,13,-1,
+-49,-19,-15,9,34,50,25,11,
+-6,-9,-16,-20,-32,-33,-32,-27,
+10,-8,12,-15,56,-14,-32,33,
+3,-9,1,65,-9,-9,-10,-2,
+-6,-23,9,17,3,-28,13,-32,
+4,-2,-10,4,-16,76,12,-52,
+6,13,33,-6,4,-14,-9,-3,
+1,-15,-16,28,1,-15,11,16,
+9,4,-21,-37,-40,-6,22,12,
+-15,-23,-14,-17,-16,-9,-10,-9,
+13,-39,41,5,-9,16,-38,25,
+46,-47,4,49,-14,17,-2,6,
+18,5,-6,-33,-22,44,50,-2,
+1,3,-6,7,7,-3,-21,38,
+-18,34,-14,-41,60,-13,6,16,
+-24,35,19,-13,-36,24,3,-17,
+-14,-10,36,44,-44,-29,-3,3,
+-54,-8,12,55,26,4,-2,-5,
+2,-11,22,-23,2,22,1,-25,
+-39,66,-49,21,-8,-2,10,-14,
+-60,25,6,10,27,-25,16,5,
+-2,-9,26,-13,-20,58,-2,7,
+52,-9,2,5,-4,-15,23,-1,
+-38,23,8,27,-6,0,-27,-7,
+39,-10,-14,26,11,-45,-12,9,
+-5,34,4,-35,10,43,-22,-11,
+56,-7,20,1,10,1,-26,9,
+94,11,-27,-14,-13,1,-11,0,
+14,-5,-6,-10,-4,-15,-8,-41,
+21,-5,1,-28,-8,22,-9,33,
+-23,-4,-4,-12,39,4,-7,3,
+-60,80,8,-17,2,-6,12,-5,
+1,9,15,27,31,30,27,23,
+61,47,26,10,-5,-8,-12,-13,
+5,-18,25,-15,-4,-15,-11,12,
+-2,-2,-16,-2,-6,24,12,11,
+-4,9,1,-9,14,-45,57,12,
+20,-35,26,11,-64,32,-10,-10,
+42,-4,-9,-16,32,24,7,10,
+52,-11,-57,29,0,8,0,-6,
+17,-17,-56,-40,7,20,18,12,
+-6,16,5,7,-1,9,1,10,
+29,12,16,13,-2,23,7,9,
+-3,-4,-5,18,-64,13,55,-25,
+9,-9,24,14,-25,15,-11,-40,
+-30,37,1,-19,22,-5,-31,13,
+-2,0,7,-4,16,-67,12,66,
+-36,24,-8,18,-15,-23,19,0,
+-45,-7,4,3,-13,13,35,5,
+13,33,10,27,23,0,-7,-11,
+43,-74,36,-12,2,5,-8,6,
+-33,11,-16,-14,-5,-7,-3,17,
+-34,27,-16,11,-9,15,33,-31,
+8,-16,7,-6,-7,63,-55,-17,
+11,-1,20,-46,34,-30,6,9,
+19,28,-9,5,-24,-8,-23,-2,
+31,-19,-16,-5,-15,-18,0,26,
+18,37,-5,-15,-2,17,5,-27,
+21,-33,44,12,-27,-9,17,11,
+25,-21,-31,-7,13,33,-8,-25,
+-7,7,-10,4,-6,-9,48,-82,
+-23,-8,6,11,-23,3,-3,49,
+-29,25,31,4,14,16,9,-4,
+-18,10,-26,3,5,-44,-9,9,
+-47,-55,15,9,28,1,4,-3,
+46,6,-6,-38,-29,-31,-15,-6,
+3,0,14,-6,8,-54,-50,33,
+-5,1,-14,33,-48,26,-4,-5,
+-3,-5,-3,-5,-28,-22,77,55,
+-1,2,10,10,-9,-14,-66,-49,
+11,-36,-6,-20,10,-10,16,12,
+4,-1,-16,45,-44,-50,31,-2,
+25,42,23,-32,-22,0,11,20,
+-40,-35,-40,-36,-32,-26,-21,-13,
+52,-22,6,-24,-20,17,-5,-8,
+36,-25,-11,21,-26,6,34,-8,
+7,20,-3,5,-25,-8,18,-5,
+-9,-4,1,-9,20,20,39,48,
+-24,9,5,-65,22,29,4,3,
+-43,-11,32,-6,9,19,-27,-10,
+-47,-14,24,10,-7,-36,-7,-1,
+-4,-5,-5,16,53,25,-26,-29,
+-4,-12,45,-58,-34,33,-5,2,
+-1,27,-48,31,-15,22,-5,4,
+7,7,-25,-3,11,-22,16,-12,
+8,-3,7,-11,45,14,-73,-19,
+56,-46,24,-20,28,-12,-2,-1,
+-36,-3,-33,19,-6,7,2,-15,
+5,-31,-45,8,35,13,20,0,
+-9,48,-13,-43,-3,-13,2,-5,
+72,-68,-27,2,1,-2,-7,5,
+36,33,-40,-12,-4,-5,23,19};
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fftwrap.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fftwrap.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fftwrap.c	(revision 1163)
@@ -0,0 +1,314 @@
+/* Copyright (C) 2005-2006 Jean-Marc Valin 
+   File: fftwrap.c
+
+   Wrapper for various FFTs 
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/*#define USE_SMALLFT*/
+#define USE_KISS_FFT
+
+
+#include "misc.h"
+
+#define MAX_FFT_SIZE 2048
+
+#ifdef FIXED_POINT
+static int maximize_range(spx_word16_t *in, spx_word16_t *out, spx_word16_t bound, int len)
+{
+   int i, shift;
+   spx_word16_t max_val = 0;
+   for (i=0;i<len;i++)
+   {
+      if (in[i]>max_val)
+         max_val = in[i];
+      if (-in[i]>max_val)
+         max_val = -in[i];
+   }
+   shift=0;
+   while (max_val <= (bound>>1) && max_val != 0)
+   {
+      max_val <<= 1;
+      shift++;
+   }
+   for (i=0;i<len;i++)
+   {
+      out[i] = in[i] << shift;
+   }   
+   return shift;
+}
+
+static void renorm_range(spx_word16_t *in, spx_word16_t *out, int shift, int len)
+{
+   int i;
+   for (i=0;i<len;i++)
+   {
+      out[i] = (in[i] + (1<<(shift-1))) >> shift;
+   }
+}
+#endif
+
+#ifdef USE_SMALLFT
+
+#include "smallft.h"
+#include <math.h>
+
+void *spx_fft_init(int size)
+{
+   struct drft_lookup *table;
+   table = speex_alloc(sizeof(struct drft_lookup));
+   spx_drft_init((struct drft_lookup *)table, size);
+   return (void*)table;
+}
+
+void spx_fft_destroy(void *table)
+{
+   spx_drft_clear(table);
+   speex_free(table);
+}
+
+void spx_fft(void *table, float *in, float *out)
+{
+   if (in==out)
+   {
+      int i;
+      float scale = 1./((struct drft_lookup *)table)->n;
+      speex_warning("FFT should not be done in-place");
+      for (i=0;i<((struct drft_lookup *)table)->n;i++)
+         out[i] = scale*in[i];
+   } else {
+      int i;
+      float scale = 1./((struct drft_lookup *)table)->n;
+      for (i=0;i<((struct drft_lookup *)table)->n;i++)
+         out[i] = scale*in[i];
+   }
+   spx_drft_forward((struct drft_lookup *)table, out);
+}
+
+void spx_ifft(void *table, float *in, float *out)
+{
+   if (in==out)
+   {
+      speex_warning("FFT should not be done in-place");
+   } else {
+      int i;
+      for (i=0;i<((struct drft_lookup *)table)->n;i++)
+         out[i] = in[i];
+   }
+   spx_drft_backward((struct drft_lookup *)table, out);
+}
+
+#elif defined(USE_KISS_FFT)
+
+#include "kiss_fftr.h"
+#include "kiss_fft.h"
+
+struct kiss_config {
+   kiss_fftr_cfg forward;
+   kiss_fftr_cfg backward;
+   kiss_fft_cpx *freq_data;
+   int N;
+};
+
+void *spx_fft_init(int size)
+{
+   struct kiss_config *table;
+   table = (struct kiss_config*)speex_alloc(sizeof(struct kiss_config));
+   table->freq_data = (kiss_fft_cpx*)speex_alloc(sizeof(kiss_fft_cpx)*((size>>1)+1));
+   table->forward = kiss_fftr_alloc(size,0,NULL,NULL);
+   table->backward = kiss_fftr_alloc(size,1,NULL,NULL);
+   table->N = size;
+   return table;
+}
+
+void spx_fft_destroy(void *table)
+{
+   struct kiss_config *t = (struct kiss_config *)table;
+   kiss_fftr_free(t->forward);
+   kiss_fftr_free(t->backward);
+   speex_free(t->freq_data);
+   speex_free(table);
+}
+
+#ifdef FIXED_POINT
+
+void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
+{
+   int i;
+   int shift;
+   struct kiss_config *t = (struct kiss_config *)table;
+   shift = maximize_range(in, in, 32000, t->N);
+   kiss_fftr(t->forward, in, t->freq_data);
+   out[0] = t->freq_data[0].r;
+   for (i=1;i<t->N>>1;i++)
+   {
+      out[(i<<1)-1] = t->freq_data[i].r;
+      out[(i<<1)] = t->freq_data[i].i;
+   }
+   out[(i<<1)-1] = t->freq_data[i].r;
+   renorm_range(in, in, shift, t->N);
+   renorm_range(out, out, shift, t->N);
+}
+
+#else
+
+void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
+{
+   int i;
+   float scale;
+   struct kiss_config *t = (struct kiss_config *)table;
+   scale = 1./t->N;
+   kiss_fftr(t->forward, in, t->freq_data);
+   out[0] = scale*t->freq_data[0].r;
+   for (i=1;i<t->N>>1;i++)
+   {
+      out[(i<<1)-1] = scale*t->freq_data[i].r;
+      out[(i<<1)] = scale*t->freq_data[i].i;
+   }
+   out[(i<<1)-1] = scale*t->freq_data[i].r;
+}
+#endif
+
+void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
+{
+   int i;
+   struct kiss_config *t = (struct kiss_config *)table;
+   t->freq_data[0].r = in[0];
+   t->freq_data[0].i = 0;
+   for (i=1;i<t->N>>1;i++)
+   {
+      t->freq_data[i].r = in[(i<<1)-1];
+      t->freq_data[i].i = in[(i<<1)];
+   }
+   t->freq_data[i].r = in[(i<<1)-1];
+   t->freq_data[i].i = 0;
+
+   kiss_fftri(t->backward, t->freq_data, out);
+}
+
+
+#else
+
+#error No other FFT implemented
+
+#endif
+
+
+#ifdef FIXED_POINT
+/*#include "smallft.h"*/
+
+
+void spx_fft_float(void *table, float *in, float *out)
+{
+   int i;
+#ifdef USE_SMALLFT
+   int N = ((struct drft_lookup *)table)->n;
+#elif defined(USE_KISS_FFT)
+   int N = ((struct kiss_config *)table)->N;
+#else
+#endif
+#ifdef VAR_ARRAYS
+   spx_word16_t _in[N];
+   spx_word16_t _out[N];
+#else
+   spx_word16_t _in[MAX_FFT_SIZE];
+   spx_word16_t _out[MAX_FFT_SIZE];
+#endif
+   for (i=0;i<N;i++)
+      _in[i] = (int)floor(.5+in[i]);
+   spx_fft(table, _in, _out);
+   for (i=0;i<N;i++)
+      out[i] = _out[i];
+#if 0
+   if (!fixed_point)
+   {
+      float scale;
+      struct drft_lookup t;
+      spx_drft_init(&t, ((struct kiss_config *)table)->N);
+      scale = 1./((struct kiss_config *)table)->N;
+      for (i=0;i<((struct kiss_config *)table)->N;i++)
+         out[i] = scale*in[i];
+      spx_drft_forward(&t, out);
+      spx_drft_clear(&t);
+   }
+#endif
+}
+
+void spx_ifft_float(void *table, float *in, float *out)
+{
+   int i;
+#ifdef USE_SMALLFT
+   int N = ((struct drft_lookup *)table)->n;
+#elif defined(USE_KISS_FFT)
+   int N = ((struct kiss_config *)table)->N;
+#else
+#endif
+#ifdef VAR_ARRAYS
+   spx_word16_t _in[N];
+   spx_word16_t _out[N];
+#else
+   spx_word16_t _in[MAX_FFT_SIZE];
+   spx_word16_t _out[MAX_FFT_SIZE];
+#endif
+   for (i=0;i<N;i++)
+      _in[i] = (int)floor(.5+in[i]);
+   spx_ifft(table, _in, _out);
+   for (i=0;i<N;i++)
+      out[i] = _out[i];
+#if 0
+   if (!fixed_point)
+   {
+      int i;
+      struct drft_lookup t;
+      spx_drft_init(&t, ((struct kiss_config *)table)->N);
+      for (i=0;i<((struct kiss_config *)table)->N;i++)
+         out[i] = in[i];
+      spx_drft_backward(&t, out);
+      spx_drft_clear(&t);
+   }
+#endif
+}
+
+#else
+
+void spx_fft_float(void *table, float *in, float *out)
+{
+   spx_fft(table, in, out);
+}
+void spx_ifft_float(void *table, float *in, float *out)
+{
+   spx_ifft(table, in, out);
+}
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fftwrap.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fftwrap.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fftwrap.h	(revision 1163)
@@ -0,0 +1,58 @@
+/* Copyright (C) 2005 Jean-Marc Valin 
+   File: fftwrap.h
+
+   Wrapper for various FFTs 
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifndef FFTWRAP_H
+#define FFTWRAP_H
+
+#include "misc.h"
+
+/** Compute tables for an FFT */
+void *spx_fft_init(int size);
+
+/** Destroy tables for an FFT */
+void spx_fft_destroy(void *table);
+
+/** Forward (real to half-complex) transform */
+void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out);
+
+/** Backward (half-complex to real) transform */
+void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out);
+
+/** Forward (real to half-complex) transform of float data */
+void spx_fft_float(void *table, float *in, float *out);
+
+/** Backward (half-complex to real) transform of float data */
+void spx_ifft_float(void *table, float *in, float *out);
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filterbank.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filterbank.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filterbank.c	(revision 1163)
@@ -0,0 +1,200 @@
+/* Copyright (C) 2006 Jean-Marc Valin */
+/**
+   @file filterbank.c
+   @brief Converting between psd and filterbank
+ */
+/*
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+
+   2. 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.
+
+   3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "filterbank.h"
+#include "misc.h"
+#include <math.h>
+#include "math_approx.h"
+      
+#ifdef FIXED_POINT
+
+#define toBARK(n)   (MULT16_16(26829,spx_atan(SHR32(MULT16_16(97,n),2))) + MULT16_16(4588,spx_atan(MULT16_32_Q15(20,MULT16_16(n,n)))) + MULT16_16(3355,n))
+      
+#else
+#define toBARK(n)   (13.1f*atan(.00074f*(n))+2.24f*atan((n)*(n)*1.85e-8f)+1e-4f*(n))
+#endif
+       
+#define toMEL(n)    (2595.f*log10(1.f+(n)/700.f))
+
+FilterBank *filterbank_new(int banks, spx_word32_t sampling, int len, int type)
+{
+   FilterBank *bank;
+   spx_word32_t df;
+   spx_word32_t max_mel, mel_interval;
+   int i;
+   int id1;
+   int id2;
+   df = DIV32(SHL32(sampling,15),MULT16_16(2,len));
+   max_mel = toBARK(EXTRACT16(MULT16_16_Q15(QCONST16(.5f,15),sampling)));
+   mel_interval = PDIV32(max_mel,banks-1);
+   
+   bank = (FilterBank*)speex_alloc(sizeof(FilterBank));
+   bank->nb_banks = banks;
+   bank->len = len;
+   bank->bank_left = (int*)speex_alloc(len*sizeof(int));
+   bank->bank_right = (int*)speex_alloc(len*sizeof(int));
+   bank->filter_left = (spx_word16_t*)speex_alloc(len*sizeof(spx_word16_t));
+   bank->filter_right = (spx_word16_t*)speex_alloc(len*sizeof(spx_word16_t));
+   /* Think I can safely disable normalisation that for fixed-point (and probably float as well) */
+#ifndef FIXED_POINT
+   bank->scaling = (float*)speex_alloc(banks*sizeof(float));
+#endif
+   for (i=0;i<len;i++)
+   {
+      spx_word16_t curr_freq;
+      spx_word32_t mel;
+      spx_word16_t val;
+      curr_freq = EXTRACT16(MULT16_32_P15(i,df));
+      mel = toBARK(curr_freq);
+      if (mel > max_mel)
+         break;
+#ifdef FIXED_POINT
+      id1 = DIV32(mel,mel_interval);
+#else      
+      id1 = (int)(floor(mel/mel_interval));
+#endif
+      if (id1>banks-2)
+      {
+         id1 = banks-2;
+         val = Q15_ONE;
+      } else {
+         val = DIV32_16(mel - id1*mel_interval,EXTRACT16(PSHR32(mel_interval,15)));
+      }
+      id2 = id1+1;
+      bank->bank_left[i] = id1;
+      bank->filter_left[i] = SUB16(Q15_ONE,val);
+      bank->bank_right[i] = id2;
+      bank->filter_right[i] = val;
+   }
+   
+   /* Think I can safely disable normalisation for fixed-point (and probably float as well) */
+#ifndef FIXED_POINT
+   for (i=0;i<bank->nb_banks;i++)
+      bank->scaling[i] = 0;
+   for (i=0;i<bank->len;i++)
+   {
+      int id = bank->bank_left[i];
+      bank->scaling[id] += bank->filter_left[i];
+      id = bank->bank_right[i];
+      bank->scaling[id] += bank->filter_right[i];
+   }
+   for (i=0;i<bank->nb_banks;i++)
+      bank->scaling[i] = Q15_ONE/(bank->scaling[i]);
+#endif
+   return bank;
+}
+
+void filterbank_destroy(FilterBank *bank)
+{
+   speex_free(bank->bank_left);
+   speex_free(bank->bank_right);
+   speex_free(bank->filter_left);
+   speex_free(bank->filter_right);
+#ifndef FIXED_POINT
+   speex_free(bank->scaling);
+#endif
+   speex_free(bank);
+}
+
+void filterbank_compute_bank32(FilterBank *bank, spx_word32_t *ps, spx_word32_t *mel)
+{
+   int i;
+   for (i=0;i<bank->nb_banks;i++)
+      mel[i] = 0;
+
+   for (i=0;i<bank->len;i++)
+   {
+      int id;
+      id = bank->bank_left[i];
+      mel[id] += MULT16_32_P15(bank->filter_left[i],ps[i]);
+      id = bank->bank_right[i];
+      mel[id] += MULT16_32_P15(bank->filter_right[i],ps[i]);
+   }
+   /* Think I can safely disable normalisation that for fixed-point (and probably float as well) */
+#ifndef FIXED_POINT
+   /*for (i=0;i<bank->nb_banks;i++)
+      mel[i] = MULT16_32_P15(Q15(bank->scaling[i]),mel[i]);
+   */
+#endif
+}
+
+void filterbank_compute_psd16(FilterBank *bank, spx_word16_t *mel, spx_word16_t *ps)
+{
+   int i;
+   for (i=0;i<bank->len;i++)
+   {
+      spx_word32_t tmp;
+      int id1, id2;
+      id1 = bank->bank_left[i];
+      id2 = bank->bank_right[i];
+      tmp = MULT16_16(mel[id1],bank->filter_left[i]);
+      tmp += MULT16_16(mel[id2],bank->filter_right[i]);
+      ps[i] = EXTRACT16(PSHR32(tmp,15));
+   }
+}
+
+
+#ifndef FIXED_POINT
+void filterbank_compute_bank(FilterBank *bank, float *ps, float *mel)
+{
+   int i;
+   for (i=0;i<bank->nb_banks;i++)
+      mel[i] = 0;
+
+   for (i=0;i<bank->len;i++)
+   {
+      int id = bank->bank_left[i];
+      mel[id] += bank->filter_left[i]*ps[i];
+      id = bank->bank_right[i];
+      mel[id] += bank->filter_right[i]*ps[i];
+   }
+   for (i=0;i<bank->nb_banks;i++)
+      mel[i] *= bank->scaling[i];
+}
+
+void filterbank_compute_psd(FilterBank *bank, float *mel, float *ps)
+{
+   int i;
+   for (i=0;i<bank->len;i++)
+   {
+      int id = bank->bank_left[i];
+      ps[i] = mel[id]*bank->filter_left[i];
+      id = bank->bank_right[i];
+      ps[i] += mel[id]*bank->filter_right[i];
+   }
+}
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filterbank.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filterbank.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filterbank.h	(revision 1163)
@@ -0,0 +1,66 @@
+/* Copyright (C) 2006 Jean-Marc Valin */
+/**
+   @file filterbank.h
+   @brief Converting between psd and filterbank
+ */
+/*
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+
+   2. 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.
+
+   3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+*/
+
+#ifndef FILTERBANK_H
+#define FILTERBANK_H
+
+#include "misc.h"
+
+typedef struct {
+   int *bank_left;
+   int *bank_right;
+   spx_word16_t *filter_left;
+   spx_word16_t *filter_right;
+#ifndef FIXED_POINT
+   float *scaling;
+#endif
+   int nb_banks;
+   int len;
+} FilterBank;
+
+
+FilterBank *filterbank_new(int banks, spx_word32_t sampling, int len, int type);
+
+void filterbank_destroy(FilterBank *bank);
+
+void filterbank_compute_bank32(FilterBank *bank, spx_word32_t *ps, spx_word32_t *mel);
+
+void filterbank_compute_psd16(FilterBank *bank, spx_word16_t *mel, spx_word16_t *psd);
+
+#ifndef FIXED_POINT
+void filterbank_compute_bank(FilterBank *bank, float *psd, float *mel);
+void filterbank_compute_psd(FilterBank *bank, float *mel, float *psd);
+#endif
+
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters.c	(revision 1163)
@@ -0,0 +1,930 @@
+/* Copyright (C) 2002-2006 Jean-Marc Valin 
+   File: filters.c
+   Various analysis/synthesis filters
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "filters.h"
+#include "stack_alloc.h"
+#include "misc.h"
+#include "math_approx.h"
+#include "ltp.h"
+#include <math.h>
+
+#ifdef _USE_SSE
+#include "filters_sse.h"
+#elif defined (ARM4_ASM) || defined(ARM5E_ASM)
+#include "filters_arm4.h"
+#elif defined (BFIN_ASM)
+#include "filters_bfin.h"
+#endif
+
+
+
+void bw_lpc(spx_word16_t gamma, const spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order)
+{
+   int i;
+   spx_word16_t tmp=gamma;
+   for (i=0;i<order;i++)
+   {
+      lpc_out[i] = MULT16_16_P15(tmp,lpc_in[i]);
+      tmp = MULT16_16_P15(tmp, gamma);
+   }
+}
+
+void highpass(const spx_word16_t *x, spx_word16_t *y, int len, int filtID, spx_mem_t *mem)
+{
+   int i;
+#ifdef FIXED_POINT
+   const spx_word16_t Pcoef[5][3] = {{16384, -31313, 14991}, {16384, -31569, 15249}, {16384, -31677, 15328}, {16384, -32313, 15947}, {16384, -22446, 6537}};
+   const spx_word16_t Zcoef[5][3] = {{15672, -31344, 15672}, {15802, -31601, 15802}, {15847, -31694, 15847}, {16162, -32322, 16162}, {14418, -28836, 14418}};
+#else
+   const spx_word16_t Pcoef[5][3] = {{1.00000f, -1.91120f, 0.91498f}, {1.00000f, -1.92683f, 0.93071f}, {1.00000f, -1.93338f, 0.93553f}, {1.00000f, -1.97226f, 0.97332f}, {1.00000f, -1.37000f, 0.39900f}};
+   const spx_word16_t Zcoef[5][3] = {{0.95654f, -1.91309f, 0.95654f}, {0.96446f, -1.92879f, 0.96446f}, {0.96723f, -1.93445f, 0.96723f}, {0.98645f, -1.97277f, 0.98645f}, {0.88000f, -1.76000f, 0.88000f}};
+#endif
+   const spx_word16_t *den, *num;
+   if (filtID>4)
+      filtID=4;
+   
+   den = Pcoef[filtID]; num = Zcoef[filtID];
+   /*return;*/
+   for (i=0;i<len;i++)
+   {
+      spx_word16_t yi;
+      spx_word32_t vout = ADD32(MULT16_16(num[0], x[i]),mem[0]);
+      yi = EXTRACT16(SATURATE(PSHR32(vout,14),32767));
+      mem[0] = ADD32(MAC16_16(mem[1], num[1],x[i]), SHL32(MULT16_32_Q15(-den[1],vout),1));
+      mem[1] = ADD32(MULT16_16(num[2],x[i]), SHL32(MULT16_32_Q15(-den[2],vout),1));
+      y[i] = yi;
+   }
+}
+
+#ifdef FIXED_POINT
+
+/* FIXME: These functions are ugly and probably introduce too much error */
+void signal_mul(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
+{
+   int i;
+   for (i=0;i<len;i++)
+   {
+      y[i] = SHL32(MULT16_32_Q14(EXTRACT16(SHR32(x[i],7)),scale),7);
+   }
+}
+
+void signal_div(const spx_word16_t *x, spx_word16_t *y, spx_word32_t scale, int len)
+{
+   int i;
+   if (scale > SHL32(EXTEND32(SIG_SCALING), 8))
+   {
+      spx_word16_t scale_1;
+      scale = PSHR32(scale, SIG_SHIFT);
+      scale_1 = EXTRACT16(PDIV32_16(SHL32(EXTEND32(SIG_SCALING),7),scale));
+      for (i=0;i<len;i++)
+      {
+         y[i] = MULT16_16_P15(scale_1, x[i]);
+      }
+   } else if (scale > SHR32(EXTEND32(SIG_SCALING), 2)) {
+      spx_word16_t scale_1;
+      scale = PSHR32(scale, SIG_SHIFT-5);
+      scale_1 = DIV32_16(SHL32(EXTEND32(SIG_SCALING),3),scale);
+      for (i=0;i<len;i++)
+      {
+         y[i] = PSHR32(MULT16_16(scale_1, SHL16(x[i],2)),8);
+      }
+   } else {
+      spx_word16_t scale_1;
+      scale = PSHR32(scale, SIG_SHIFT-7);
+      if (scale < 5)
+         scale = 5;
+      scale_1 = DIV32_16(SHL32(EXTEND32(SIG_SCALING),3),scale);
+      for (i=0;i<len;i++)
+      {
+         y[i] = PSHR32(MULT16_16(scale_1, SHL16(x[i],2)),6);
+      }
+   }
+}
+
+#else
+
+void signal_mul(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
+{
+   int i;
+   for (i=0;i<len;i++)
+      y[i] = scale*x[i];
+}
+
+void signal_div(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
+{
+   int i;
+   float scale_1 = 1/scale;
+   for (i=0;i<len;i++)
+      y[i] = scale_1*x[i];
+}
+#endif
+
+
+
+#ifdef FIXED_POINT
+
+
+
+spx_word16_t compute_rms(const spx_sig_t *x, int len)
+{
+   int i;
+   spx_word32_t sum=0;
+   spx_sig_t max_val=1;
+   int sig_shift;
+
+   for (i=0;i<len;i++)
+   {
+      spx_sig_t tmp = x[i];
+      if (tmp<0)
+         tmp = -tmp;
+      if (tmp > max_val)
+         max_val = tmp;
+   }
+
+   sig_shift=0;
+   while (max_val>16383)
+   {
+      sig_shift++;
+      max_val >>= 1;
+   }
+
+   for (i=0;i<len;i+=4)
+   {
+      spx_word32_t sum2=0;
+      spx_word16_t tmp;
+      tmp = EXTRACT16(SHR32(x[i],sig_shift));
+      sum2 = MAC16_16(sum2,tmp,tmp);
+      tmp = EXTRACT16(SHR32(x[i+1],sig_shift));
+      sum2 = MAC16_16(sum2,tmp,tmp);
+      tmp = EXTRACT16(SHR32(x[i+2],sig_shift));
+      sum2 = MAC16_16(sum2,tmp,tmp);
+      tmp = EXTRACT16(SHR32(x[i+3],sig_shift));
+      sum2 = MAC16_16(sum2,tmp,tmp);
+      sum = ADD32(sum,SHR32(sum2,6));
+   }
+   
+   return EXTRACT16(PSHR32(SHL32(EXTEND32(spx_sqrt(DIV32(sum,len))),(sig_shift+3)),SIG_SHIFT));
+}
+
+spx_word16_t compute_rms16(const spx_word16_t *x, int len)
+{
+   int i;
+   spx_word16_t max_val=10; 
+
+   for (i=0;i<len;i++)
+   {
+      spx_sig_t tmp = x[i];
+      if (tmp<0)
+         tmp = -tmp;
+      if (tmp > max_val)
+         max_val = tmp;
+   }
+   if (max_val>16383)
+   {
+      spx_word32_t sum=0;
+      for (i=0;i<len;i+=4)
+      {
+         spx_word32_t sum2=0;
+         sum2 = MAC16_16(sum2,SHR16(x[i],1),SHR16(x[i],1));
+         sum2 = MAC16_16(sum2,SHR16(x[i+1],1),SHR16(x[i+1],1));
+         sum2 = MAC16_16(sum2,SHR16(x[i+2],1),SHR16(x[i+2],1));
+         sum2 = MAC16_16(sum2,SHR16(x[i+3],1),SHR16(x[i+3],1));
+         sum = ADD32(sum,SHR32(sum2,6));
+      }
+      return SHL16(spx_sqrt(DIV32(sum,len)),4);
+   } else {
+      spx_word32_t sum=0;
+      int sig_shift=0;
+      if (max_val < 8192)
+         sig_shift=1;
+      if (max_val < 4096)
+         sig_shift=2;
+      if (max_val < 2048)
+         sig_shift=3;
+      for (i=0;i<len;i+=4)
+      {
+         spx_word32_t sum2=0;
+         sum2 = MAC16_16(sum2,SHL16(x[i],sig_shift),SHL16(x[i],sig_shift));
+         sum2 = MAC16_16(sum2,SHL16(x[i+1],sig_shift),SHL16(x[i+1],sig_shift));
+         sum2 = MAC16_16(sum2,SHL16(x[i+2],sig_shift),SHL16(x[i+2],sig_shift));
+         sum2 = MAC16_16(sum2,SHL16(x[i+3],sig_shift),SHL16(x[i+3],sig_shift));
+         sum = ADD32(sum,SHR32(sum2,6));
+      }
+      return SHL16(spx_sqrt(DIV32(sum,len)),3-sig_shift);   
+   }
+}
+
+#ifndef OVERRIDE_NORMALIZE16
+int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int len)
+{
+   int i;
+   spx_sig_t max_val=1;
+   int sig_shift;
+   
+   for (i=0;i<len;i++)
+   {
+      spx_sig_t tmp = x[i];
+      if (tmp<0)
+         tmp = NEG32(tmp);
+      if (tmp >= max_val)
+         max_val = tmp;
+   }
+
+   sig_shift=0;
+   while (max_val>max_scale)
+   {
+      sig_shift++;
+      max_val >>= 1;
+   }
+
+   for (i=0;i<len;i++)
+      y[i] = EXTRACT16(SHR32(x[i], sig_shift));
+   
+   return sig_shift;
+}
+#endif
+
+#else
+
+spx_word16_t compute_rms(const spx_sig_t *x, int len)
+{
+   int i;
+   float sum=0;
+   for (i=0;i<len;i++)
+   {
+      sum += x[i]*x[i];
+   }
+   return sqrt(.1+sum/len);
+}
+spx_word16_t compute_rms16(const spx_word16_t *x, int len)
+{
+   return compute_rms(x, len);
+}
+#endif
+
+
+
+#ifndef OVERRIDE_FILTER_MEM2
+#ifdef PRECISION16
+void filter_mem2(const spx_sig_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
+{
+   int i,j;
+   spx_word16_t xi,yi,nyi;
+
+   for (i=0;i<N;i++)
+   {
+      xi= EXTRACT16(PSHR32(SATURATE(x[i],536870911),SIG_SHIFT));
+      yi = EXTRACT16(PSHR32(SATURATE(ADD32(x[i], SHL32(mem[0],1)),536870911),SIG_SHIFT));
+      nyi = NEG16(yi);
+      for (j=0;j<ord-1;j++)
+      {
+         mem[j] = MAC16_16(MAC16_16(mem[j+1], num[j],xi), den[j],nyi);
+      }
+      mem[ord-1] = ADD32(MULT16_16(num[ord-1],xi), MULT16_16(den[ord-1],nyi));
+      y[i] = SHL32(EXTEND32(yi),SIG_SHIFT);
+   }
+}
+#else
+void filter_mem2(const spx_sig_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
+{
+   int i,j;
+   spx_sig_t xi,yi,nyi;
+
+   for (i=0;i<ord;i++)
+      mem[i] = SHR32(mem[i],1);   
+   for (i=0;i<N;i++)
+   {
+      xi=SATURATE(x[i],805306368);
+      yi = SATURATE(ADD32(xi, SHL32(mem[0],2)),805306368);
+      nyi = NEG32(yi);
+      for (j=0;j<ord-1;j++)
+      {
+         mem[j] = MAC16_32_Q15(MAC16_32_Q15(mem[j+1], num[j],xi), den[j],nyi);
+      }
+      mem[ord-1] = SUB32(MULT16_32_Q15(num[ord-1],xi), MULT16_32_Q15(den[ord-1],yi));
+      y[i] = yi;
+   }
+   for (i=0;i<ord;i++)
+      mem[i] = SHL32(mem[i],1);   
+}
+#endif
+#endif
+
+#ifdef FIXED_POINT
+#ifndef OVERRIDE_FILTER_MEM16
+void filter_mem16(const spx_word16_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
+{
+   int i,j;
+   spx_word16_t xi,yi,nyi;
+   for (i=0;i<N;i++)
+   {
+      xi= x[i];
+      yi = EXTRACT16(SATURATE(ADD32(EXTEND32(x[i]),PSHR32(mem[0],LPC_SHIFT)),32767));
+      nyi = NEG16(yi);
+      for (j=0;j<ord-1;j++)
+      {
+         mem[j] = MAC16_16(MAC16_16(mem[j+1], num[j],xi), den[j],nyi);
+      }
+      mem[ord-1] = ADD32(MULT16_16(num[ord-1],xi), MULT16_16(den[ord-1],nyi));
+      y[i] = yi;
+   }
+}
+#endif
+#else
+void filter_mem16(const spx_word16_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
+{
+   filter_mem2(x, num, den, y, N, ord, mem);
+}
+#endif
+
+
+#ifndef OVERRIDE_IIR_MEM2
+#ifdef PRECISION16
+void iir_mem2(const spx_sig_t *x, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
+{
+   int i,j;
+   spx_word16_t yi,nyi;
+
+   for (i=0;i<N;i++)
+   {
+      yi = EXTRACT16(PSHR32(SATURATE(x[i] + SHL32(mem[0],1),536870911),SIG_SHIFT));
+      nyi = NEG16(yi);
+      for (j=0;j<ord-1;j++)
+      {
+         mem[j] = MAC16_16(mem[j+1],den[j],nyi);
+      }
+      mem[ord-1] = MULT16_16(den[ord-1],nyi);
+      y[i] = SHL32(EXTEND32(yi),SIG_SHIFT);
+   }
+}
+#else
+void iir_mem2(const spx_sig_t *x, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
+{
+   int i,j;
+   spx_word32_t xi,yi,nyi;
+
+   for (i=0;i<ord;i++)
+      mem[i] = SHR32(mem[i],1);   
+   for (i=0;i<N;i++)
+   {
+      xi=SATURATE(x[i],805306368);
+      yi = SATURATE(xi + SHL32(mem[0],2),805306368);
+      nyi = NEG32(yi);
+      for (j=0;j<ord-1;j++)
+      {
+         mem[j] = MAC16_32_Q15(mem[j+1],den[j],nyi);
+      }
+      mem[ord-1] = MULT16_32_Q15(den[ord-1],nyi);
+      y[i] = yi;
+   }
+   for (i=0;i<ord;i++)
+      mem[i] = SHL32(mem[i],1);   
+}
+#endif
+#endif
+
+#ifdef FIXED_POINT
+#ifndef OVERRIDE_IIR_MEM16
+void iir_mem16(const spx_word16_t *x, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
+{
+   int i,j;
+   spx_word16_t yi,nyi;
+
+   for (i=0;i<N;i++)
+   {
+      yi = EXTRACT16(SATURATE(ADD32(EXTEND32(x[i]),PSHR32(mem[0],LPC_SHIFT)),32767));
+      nyi = NEG16(yi);
+      for (j=0;j<ord-1;j++)
+      {
+         mem[j] = MAC16_16(mem[j+1],den[j],nyi);
+      }
+      mem[ord-1] = MULT16_16(den[ord-1],nyi);
+      y[i] = yi;
+   }
+}
+#endif
+#else
+void iir_mem16(const spx_word16_t *x, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
+{
+   iir_mem2(x, den, y, N, ord, mem);
+}
+#endif
+
+
+#ifndef OVERRIDE_FIR_MEM2
+#ifdef PRECISION16
+void fir_mem2(const spx_sig_t *x, const spx_coef_t *num, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
+{
+   int i,j;
+   spx_word16_t xi,yi;
+
+   for (i=0;i<N;i++)
+   {
+      xi= EXTRACT16(PSHR32(SATURATE(x[i],536870911),SIG_SHIFT));
+      yi = EXTRACT16(PSHR32(SATURATE(x[i] + SHL32(mem[0],1),536870911),SIG_SHIFT));
+      for (j=0;j<ord-1;j++)
+      {
+         mem[j] = MAC16_16(mem[j+1], num[j],xi);
+      }
+      mem[ord-1] = MULT16_16(num[ord-1],xi);
+      y[i] = SHL32(EXTEND32(yi),SIG_SHIFT);
+   }
+}
+#else
+void fir_mem2(const spx_sig_t *x, const spx_coef_t *num, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
+{
+   int i,j;
+   spx_word32_t xi,yi;
+
+   for (i=0;i<ord;i++)
+      mem[i] = SHR32(mem[i],1);   
+   for (i=0;i<N;i++)
+   {
+      xi=SATURATE(x[i],805306368);
+      yi = xi + SHL32(mem[0],2);
+      for (j=0;j<ord-1;j++)
+      {
+         mem[j] = MAC16_32_Q15(mem[j+1], num[j],xi);
+      }
+      mem[ord-1] = MULT16_32_Q15(num[ord-1],xi);
+      y[i] = SATURATE(yi,805306368);
+   }
+   for (i=0;i<ord;i++)
+      mem[i] = SHL32(mem[i],1);   
+}
+#endif
+#endif
+
+#ifdef FIXED_POINT
+#ifndef OVERRIDE_FIR_MEM16
+void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
+{
+   int i,j;
+   spx_word16_t xi,yi;
+
+   for (i=0;i<N;i++)
+   {
+      xi=x[i];
+      yi = EXTRACT16(SATURATE(ADD32(EXTEND32(x[i]),PSHR32(mem[0],LPC_SHIFT)),32767));
+      for (j=0;j<ord-1;j++)
+      {
+         mem[j] = MAC16_16(mem[j+1], num[j],xi);
+      }
+      mem[ord-1] = MULT16_16(num[ord-1],xi);
+      y[i] = yi;
+   }
+}
+#endif
+#else
+void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
+{
+   fir_mem2(x, num, y, N, ord, mem);
+}
+#endif
+
+
+
+
+
+
+void syn_percep_zero(const spx_sig_t *xx, const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_sig_t *y, int N, int ord, char *stack)
+{
+   int i;
+   VARDECL(spx_mem_t *mem);
+   ALLOC(mem, ord, spx_mem_t);
+   for (i=0;i<ord;i++)
+     mem[i]=0;
+   iir_mem2(xx, ak, y, N, ord, mem);
+   for (i=0;i<ord;i++)
+      mem[i]=0;
+   filter_mem2(y, awk1, awk2, y, N, ord, mem);
+}
+
+void residue_percep_zero(const spx_sig_t *xx, const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_sig_t *y, int N, int ord, char *stack)
+{
+   int i;
+   VARDECL(spx_mem_t *mem);
+   ALLOC(mem, ord, spx_mem_t);
+   for (i=0;i<ord;i++)
+      mem[i]=0;
+   filter_mem2(xx, ak, awk1, y, N, ord, mem);
+   for (i=0;i<ord;i++)
+     mem[i]=0;
+   fir_mem2(y, awk2, y, N, ord, mem);
+}
+
+#ifndef OVERRIDE_COMPUTE_IMPULSE_RESPONSE
+void compute_impulse_response(const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack)
+{
+   int i,j;
+   spx_word16_t y1, ny1i, ny2i;
+   VARDECL(spx_mem_t *mem1);
+   VARDECL(spx_mem_t *mem2);
+   ALLOC(mem1, ord, spx_mem_t);
+   ALLOC(mem2, ord, spx_mem_t);
+   
+   y[0] = LPC_SCALING;
+   for (i=0;i<ord;i++)
+      y[i+1] = awk1[i];
+   i++;
+   for (;i<N;i++)
+      y[i] = VERY_SMALL;
+   for (i=0;i<ord;i++)
+      mem1[i] = mem2[i] = 0;
+   for (i=0;i<N;i++)
+   {
+      y1 = ADD16(y[i], EXTRACT16(PSHR32(mem1[0],LPC_SHIFT)));
+      ny1i = NEG16(y1);
+      y[i] = PSHR32(ADD32(SHL32(EXTEND32(y1),LPC_SHIFT+1),mem2[0]),LPC_SHIFT);
+      ny2i = NEG16(y[i]);
+      for (j=0;j<ord-1;j++)
+      {
+         mem1[j] = MAC16_16(mem1[j+1], awk2[j],ny1i);
+         mem2[j] = MAC16_16(mem2[j+1], ak[j],ny2i);
+      }
+      mem1[ord-1] = MULT16_16(awk2[ord-1],ny1i);
+      mem2[ord-1] = MULT16_16(ak[ord-1],ny2i);
+   }
+}
+#endif
+
+void qmf_decomp(const spx_word16_t *xx, const spx_word16_t *aa, spx_sig_t *y1, spx_sig_t *y2, int N, int M, spx_word16_t *mem, char *stack)
+{
+   int i,j,k,M2;
+   VARDECL(spx_word16_t *a);
+   VARDECL(spx_word16_t *x);
+   spx_word16_t *x2;
+   
+   ALLOC(a, M, spx_word16_t);
+   ALLOC(x, N+M-1, spx_word16_t);
+   x2=x+M-1;
+   M2=M>>1;
+   for (i=0;i<M;i++)
+      a[M-i-1]= aa[i];
+
+   for (i=0;i<M-1;i++)
+      x[i]=mem[M-i-2];
+   for (i=0;i<N;i++)
+      x[i+M-1]=SATURATE(PSHR(xx[i],1),16383);
+   for (i=0,k=0;i<N;i+=2,k++)
+   {
+      y1[k]=0;
+      y2[k]=0;
+      for (j=0;j<M2;j++)
+      {
+         y1[k]=ADD32(y1[k],MULT16_16(a[j],ADD16(x[i+j],x2[i-j])));
+         y2[k]=SUB32(y2[k],MULT16_16(a[j],SUB16(x[i+j],x2[i-j])));
+         j++;
+         y1[k]=ADD32(y1[k],MULT16_16(a[j],ADD16(x[i+j],x2[i-j])));
+         y2[k]=ADD32(y2[k],MULT16_16(a[j],SUB16(x[i+j],x2[i-j])));
+      }
+      y1[k] = SHR32(y1[k],1);
+      y2[k] = SHR32(y2[k],1);
+   }
+   for (i=0;i<M-1;i++)
+     mem[i]=SATURATE(PSHR(xx[N-i-1],1),16383);
+}
+
+
+/* By segher */
+void fir_mem_up(const spx_sig_t *x, const spx_word16_t *a, spx_sig_t *y, int N, int M, spx_word32_t *mem, char *stack)
+   /* assumptions:
+      all odd x[i] are zero -- well, actually they are left out of the array now
+      N and M are multiples of 4 */
+{
+   int i, j;
+   VARDECL(spx_word16_t *xx);
+   
+   ALLOC(xx, M+N-1, spx_word16_t);
+
+   for (i = 0; i < N/2; i++)
+      xx[2*i] = PSHR32(x[N/2-1-i],SIG_SHIFT);
+   for (i = 0; i < M - 1; i += 2)
+      xx[N+i] = mem[i+1];
+
+   for (i = 0; i < N; i += 4) {
+      spx_sig_t y0, y1, y2, y3;
+      spx_word16_t x0;
+
+      y0 = y1 = y2 = y3 = 0;
+      x0 = xx[N-4-i];
+
+      for (j = 0; j < M; j += 4) {
+         spx_word16_t x1;
+         spx_word16_t a0, a1;
+
+         a0 = a[j];
+         a1 = a[j+1];
+         x1 = xx[N-2+j-i];
+
+         y0 = ADD32(y0,SHR32(MULT16_16(a0, x1),2));
+         y1 = ADD32(y1,SHR32(MULT16_16(a1, x1),2));
+         y2 = ADD32(y2,SHR32(MULT16_16(a0, x0),2));
+         y3 = ADD32(y3,SHR32(MULT16_16(a1, x0),2));
+
+         a0 = a[j+2];
+         a1 = a[j+3];
+         x0 = xx[N+j-i];
+
+         y0 = ADD32(y0,SHR32(MULT16_16(a0, x0),2));
+         y1 = ADD32(y1,SHR32(MULT16_16(a1, x0),2));
+         y2 = ADD32(y2,SHR32(MULT16_16(a0, x1),2));
+         y3 = ADD32(y3,SHR32(MULT16_16(a1, x1),2));
+      }
+      y[i] = y0;
+      y[i+1] = y1;
+      y[i+2] = y2;
+      y[i+3] = y3;
+   }
+
+   for (i = 0; i < M - 1; i += 2)
+      mem[i+1] = xx[i];
+}
+
+#ifdef FIXED_POINT
+#if 0
+const spx_word16_t shift_filt[3][7] = {{-33,    1043,   -4551,   19959,   19959,   -4551,    1043},
+                                 {-98,    1133,   -4425,   29179,    8895,   -2328,     444},
+                                 {444,   -2328,    8895,   29179,   -4425,    1133,     -98}};
+#else
+const spx_word16_t shift_filt[3][7] = {{-390,    1540,   -4993,   20123,   20123,   -4993,    1540},
+                                {-1064,    2817,   -6694,   31589,    6837,    -990,    -209},
+                                 {-209,    -990,    6837,   31589,   -6694,    2817,   -1064}};
+#endif
+#else
+#if 0
+const float shift_filt[3][7] = {{-9.9369e-04, 3.1831e-02, -1.3889e-01, 6.0910e-01, 6.0910e-01, -1.3889e-01, 3.1831e-02},
+                          {-0.0029937, 0.0345613, -0.1350474, 0.8904793, 0.2714479, -0.0710304, 0.0135403},
+                          {0.0135403, -0.0710304, 0.2714479, 0.8904793, -0.1350474, 0.0345613,  -0.0029937}};
+#else
+const float shift_filt[3][7] = {{-0.011915f, 0.046995f, -0.152373f, 0.614108f, 0.614108f, -0.152373f, 0.046995f},
+                          {-0.0324855f, 0.0859768f, -0.2042986f, 0.9640297f, 0.2086420f, -0.0302054f, -0.0063646f},
+                          {-0.0063646f, -0.0302054f, 0.2086420f, 0.9640297f, -0.2042986f, 0.0859768f, -0.0324855f}};
+#endif
+#endif
+
+int interp_pitch(
+spx_word16_t *exc,          /*decoded excitation*/
+spx_word16_t *interp,          /*decoded excitation*/
+int pitch,               /*pitch period*/
+int len
+)
+{
+   int i,j,k;
+   spx_word32_t corr[4][7];
+   spx_word32_t maxcorr;
+   int maxi, maxj;
+   for (i=0;i<7;i++)
+   {
+      corr[0][i] = inner_prod(exc, exc-pitch-3+i, len);
+   }
+   for (i=0;i<3;i++)
+   {
+      for (j=0;j<7;j++)
+      {
+         int i1, i2;
+         spx_word32_t tmp=0;
+         i1 = 3-j;
+         if (i1<0)
+            i1 = 0;
+         i2 = 10-j;
+         if (i2>7)
+            i2 = 7;
+         for (k=i1;k<i2;k++)
+            tmp += MULT16_32_Q15(shift_filt[i][k],corr[0][j+k-3]);
+         corr[i+1][j] = tmp;
+      }
+   }
+   maxi=maxj=0;
+   maxcorr = corr[0][0];
+   for (i=0;i<4;i++)
+   {
+      for (j=0;j<7;j++)
+      {
+         if (corr[i][j] > maxcorr)
+         {
+            maxcorr = corr[i][j];
+            maxi=i;
+            maxj=j;
+         }
+      }
+   }
+   for (i=0;i<len;i++)
+   {
+      spx_word32_t tmp = 0;
+      if (maxi>0)
+      {
+         for (k=0;k<7;k++)
+         {
+            tmp += MULT16_16(exc[i-(pitch-maxj+3)+k-3],shift_filt[maxi-1][k]);
+         }
+      } else {
+         tmp = SHL32(exc[i-(pitch-maxj+3)],15);
+      }
+      interp[i] = PSHR32(tmp,15);
+   }
+   return pitch-maxj+3;
+}
+
+void multicomb(
+spx_word16_t *exc,          /*decoded excitation*/
+spx_word16_t *new_exc,      /*enhanced excitation*/
+spx_coef_t *ak,           /*LPC filter coefs*/
+int p,               /*LPC order*/
+int nsf,             /*sub-frame size*/
+int pitch,           /*pitch period*/
+int max_pitch,
+spx_word16_t  comb_gain,    /*gain of comb filter*/
+char *stack
+)
+{
+   int i; 
+   VARDECL(spx_word16_t *iexc);
+   spx_word16_t old_ener, new_ener;
+   int corr_pitch;
+   
+   spx_word16_t iexc0_mag, iexc1_mag, exc_mag;
+   spx_word32_t corr0, corr1;
+   spx_word16_t gain0, gain1;
+   spx_word16_t pgain1, pgain2;
+   spx_word16_t c1, c2;
+   spx_word16_t g1, g2;
+   spx_word16_t ngain;
+   spx_word16_t gg1, gg2;
+#ifdef FIXED_POINT
+   int scaledown=0;
+#endif
+#if 0 /* Set to 1 to enable full pitch search */
+   int nol_pitch[6];
+   spx_word16_t nol_pitch_coef[6];
+   spx_word16_t ol_pitch_coef;
+   open_loop_nbest_pitch(exc, 20, 120, nsf, 
+                         nol_pitch, nol_pitch_coef, 6, stack);
+   corr_pitch=nol_pitch[0];
+   ol_pitch_coef = nol_pitch_coef[0];
+   /*Try to remove pitch multiples*/
+   for (i=1;i<6;i++)
+   {
+#ifdef FIXED_POINT
+      if ((nol_pitch_coef[i]>MULT16_16_Q15(nol_pitch_coef[0],19661)) && 
+#else
+      if ((nol_pitch_coef[i]>.6*nol_pitch_coef[0]) && 
+#endif
+         (ABS(2*nol_pitch[i]-corr_pitch)<=2 || ABS(3*nol_pitch[i]-corr_pitch)<=3 || 
+         ABS(4*nol_pitch[i]-corr_pitch)<=4 || ABS(5*nol_pitch[i]-corr_pitch)<=5))
+      {
+         corr_pitch = nol_pitch[i];
+      }
+   }
+#else
+   corr_pitch = pitch;
+#endif
+   
+   ALLOC(iexc, 2*nsf, spx_word16_t);
+   
+   interp_pitch(exc, iexc, corr_pitch, 80);
+   if (corr_pitch>max_pitch)
+      interp_pitch(exc, iexc+nsf, 2*corr_pitch, 80);
+   else
+      interp_pitch(exc, iexc+nsf, -corr_pitch, 80);
+
+#ifdef FIXED_POINT
+   for (i=0;i<nsf;i++)
+   {
+      if (ABS16(exc[i])>16383)
+      {
+         scaledown = 1;
+         break;
+      }
+   }
+   if (scaledown)
+   {
+      for (i=0;i<nsf;i++)
+         exc[i] = SHR16(exc[i],1);
+      for (i=0;i<2*nsf;i++)
+         iexc[i] = SHR16(iexc[i],1);
+   }
+#endif
+   /*interp_pitch(exc, iexc+2*nsf, 2*corr_pitch, 80);*/
+   
+   /*printf ("%d %d %f\n", pitch, corr_pitch, max_corr*ener_1);*/
+   iexc0_mag = spx_sqrt(1000+inner_prod(iexc,iexc,nsf));
+   iexc1_mag = spx_sqrt(1000+inner_prod(iexc+nsf,iexc+nsf,nsf));
+   exc_mag = spx_sqrt(1+inner_prod(exc,exc,nsf));
+   corr0  = inner_prod(iexc,exc,nsf);
+   if (corr0<0)
+      corr0=0;
+   corr1 = inner_prod(iexc+nsf,exc,nsf);
+   if (corr1<0)
+      corr1=0;
+#ifdef FIXED_POINT
+   /* Doesn't cost much to limit the ratio and it makes the rest easier */
+   if (SHL32(EXTEND32(iexc0_mag),6) < EXTEND32(exc_mag))
+      iexc0_mag = ADD16(1,PSHR16(exc_mag,6));
+   if (SHL32(EXTEND32(iexc1_mag),6) < EXTEND32(exc_mag))
+      iexc1_mag = ADD16(1,PSHR16(exc_mag,6));
+#endif
+   if (corr0 > MULT16_16(iexc0_mag,exc_mag))
+      pgain1 = QCONST16(1., 14);
+   else
+      pgain1 = PDIV32_16(SHL32(PDIV32(corr0, exc_mag),14),iexc0_mag);
+   if (corr1 > MULT16_16(iexc1_mag,exc_mag))
+      pgain2 = QCONST16(1., 14);
+   else
+      pgain2 = PDIV32_16(SHL32(PDIV32(corr1, exc_mag),14),iexc1_mag);
+   gg1 = PDIV32_16(SHL32(EXTEND32(exc_mag),8), iexc0_mag);
+   gg2 = PDIV32_16(SHL32(EXTEND32(exc_mag),8), iexc1_mag);
+   if (comb_gain>0)
+   {
+#ifdef FIXED_POINT
+      c1 = (MULT16_16_Q15(QCONST16(.4,15),comb_gain)+QCONST16(.07,15));
+      c2 = QCONST16(.5,15)+MULT16_16_Q14(QCONST16(1.72,14),(c1-QCONST16(.07,15)));
+#else
+      c1 = .4*comb_gain+.07;
+      c2 = .5+1.72*(c1-.07);
+#endif
+   } else 
+   {
+      c1=c2=0;
+   }
+#ifdef FIXED_POINT
+   g1 = 32767 - MULT16_16_Q13(MULT16_16_Q15(c2, pgain1),pgain1);
+   g2 = 32767 - MULT16_16_Q13(MULT16_16_Q15(c2, pgain2),pgain2);
+#else
+   g1 = 1-c2*pgain1*pgain1;
+   g2 = 1-c2*pgain2*pgain2;
+#endif
+   if (g1<c1)
+      g1 = c1;
+   if (g2<c1)
+      g2 = c1;
+   g1 = (spx_word16_t)PDIV32_16(SHL32(EXTEND32(c1),14),(spx_word16_t)g1);
+   g2 = (spx_word16_t)PDIV32_16(SHL32(EXTEND32(c1),14),(spx_word16_t)g2);
+   if (corr_pitch>max_pitch)
+   {
+      gain0 = MULT16_16_Q15(QCONST16(.7,15),MULT16_16_Q14(g1,gg1));
+      gain1 = MULT16_16_Q15(QCONST16(.3,15),MULT16_16_Q14(g2,gg2));
+   } else {
+      gain0 = MULT16_16_Q15(QCONST16(.6,15),MULT16_16_Q14(g1,gg1));
+      gain1 = MULT16_16_Q15(QCONST16(.6,15),MULT16_16_Q14(g2,gg2));
+   }
+   for (i=0;i<nsf;i++)
+      new_exc[i] = ADD16(exc[i], EXTRACT16(PSHR32(ADD32(MULT16_16(gain0,iexc[i]), MULT16_16(gain1,iexc[i+nsf])),8)));
+   /* FIXME: compute_rms16 is currently not quite accurate enough (but close) */
+   new_ener = compute_rms16(new_exc, nsf);
+   old_ener = compute_rms16(exc, nsf);
+   
+   if (old_ener < 1)
+      old_ener = 1;
+   if (new_ener < 1)
+      new_ener = 1;
+   if (old_ener > new_ener)
+      old_ener = new_ener;
+   ngain = PDIV32_16(SHL32(EXTEND32(old_ener),14),new_ener);
+   
+   for (i=0;i<nsf;i++)
+      new_exc[i] = MULT16_16_Q14(ngain, new_exc[i]);
+#ifdef FIXED_POINT
+   if (scaledown)
+   {
+      for (i=0;i<nsf;i++)
+         exc[i] = SHL16(exc[i],1);
+      for (i=0;i<nsf;i++)
+         new_exc[i] = SHL16(SATURATE16(new_exc[i],16383),1);
+   }
+#endif
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters.h	(revision 1163)
@@ -0,0 +1,96 @@
+/* Copyright (C) 2002 Jean-Marc Valin */
+/**
+   @file filters.h
+   @brief Various analysis/synthesis filters
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef FILTERS_H
+#define FILTERS_H
+
+#include "misc.h"
+
+spx_word16_t compute_rms(const spx_sig_t *x, int len);
+spx_word16_t compute_rms16(const spx_word16_t *x, int len);
+void signal_mul(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len);
+void signal_div(const spx_word16_t *x, spx_word16_t *y, spx_word32_t scale, int len);
+
+#ifdef FIXED_POINT
+
+int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int len);
+
+#endif
+
+
+#define HIGHPASS_NARROWBAND 0
+#define HIGHPASS_WIDEBAND 2
+#define HIGHPASS_INPUT 0
+#define HIGHPASS_OUTPUT 1
+#define HIGHPASS_IRS 4
+
+void highpass(const spx_word16_t *x, spx_word16_t *y, int len, int filtID, spx_mem_t *mem);
+
+
+void qmf_decomp(const spx_word16_t *xx, const spx_word16_t *aa, spx_sig_t *, spx_sig_t *y2, int N, int M, spx_word16_t *mem, char *stack);
+void fir_mem_up(const spx_sig_t *x, const spx_word16_t *a, spx_sig_t *y, int N, int M, spx_word32_t *mem, char *stack);
+
+
+void filter_mem2(const spx_sig_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem);
+void fir_mem2(const spx_sig_t *x, const spx_coef_t *num, spx_sig_t *y, int N, int ord, spx_mem_t *mem);
+void iir_mem2(const spx_sig_t *x, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem);
+
+void filter_mem16(const spx_word16_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack);
+void iir_mem16(const spx_word16_t *x, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack);
+void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack);
+
+/* Apply bandwidth expansion on LPC coef */
+void bw_lpc(spx_word16_t , const spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order);
+
+
+
+void syn_percep_zero(const spx_sig_t *x, const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_sig_t *y, int N, int ord, char *stack);
+
+void residue_percep_zero(const spx_sig_t *xx, const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_sig_t *y, int N, int ord, char *stack);
+
+void compute_impulse_response(const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack);
+
+void multicomb(
+spx_word16_t *exc,          /*decoded excitation*/
+spx_word16_t *new_exc,      /*enhanced excitation*/
+spx_coef_t *ak,           /*LPC filter coefs*/
+int p,               /*LPC order*/
+int nsf,             /*sub-frame size*/
+int pitch,           /*pitch period*/
+int max_pitch,   /*pitch gain (3-tap)*/
+spx_word16_t  comb_gain,    /*gain of comb filter*/
+char *stack
+);
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters_arm4.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters_arm4.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters_arm4.h	(revision 1163)
@@ -0,0 +1,389 @@
+/* Copyright (C) 2004 Jean-Marc Valin */
+/**
+   @file filters_arm4.h
+   @brief Various analysis/synthesis filters (ARM4 version)
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#define OVERRIDE_NORMALIZE16
+int normalize16(const spx_sig_t *x, spx_word16_t *y, int max_scale, int len)
+{
+   int i;
+   spx_sig_t max_val=1;
+   int sig_shift;
+   int dead1, dead2, dead3, dead4, dead5, dead6;
+
+   __asm__ __volatile__ (
+         "\tmov %1, #1 \n"
+         "\tmov %3, #0 \n"
+
+         ".normalize16loop1%=: \n"
+
+         "\tldr %4, [%0], #4 \n"
+         "\tcmps %4, %1 \n"
+         "\tmovgt %1, %4 \n"
+         "\tcmps %4, %3 \n"
+         "\tmovlt %3, %4 \n"
+
+         "\tsubs %2, %2, #1 \n"
+         "\tbne .normalize16loop1%=\n"
+
+         "\trsb %3, %3, #0 \n"
+         "\tcmp %1, %3 \n"
+         "\tmovlt %1, %3 \n"
+   : "=r" (dead1), "=r" (max_val), "=r" (dead3), "=r" (dead4),
+   "=r" (dead5), "=r" (dead6)
+   : "0" (x), "2" (len)
+   : "cc");
+
+   sig_shift=0;
+   while (max_val>max_scale)
+   {
+      sig_shift++;
+      max_val >>= 1;
+   }
+   
+   __asm__ __volatile__ (
+         ".normalize16loop%=: \n"
+
+         "\tldr %4, [%0], #4 \n"
+         "\tldr %5, [%0], #4 \n"
+         "\tmov %4, %4, asr %3 \n"
+         "\tstrh %4, [%1], #2 \n"
+         "\tldr %4, [%0], #4 \n"
+         "\tmov %5, %5, asr %3 \n"
+         "\tstrh %5, [%1], #2 \n"
+         "\tldr %5, [%0], #4 \n"
+         "\tmov %4, %4, asr %3 \n"
+         "\tstrh %4, [%1], #2 \n"
+         "\tsubs %2, %2, #1 \n"
+         "\tmov %5, %5, asr %3 \n"
+         "\tstrh %5, [%1], #2 \n"
+
+         "\tbge .normalize16loop%=\n"
+   : "=r" (dead1), "=r" (dead2), "=r" (dead3), "=r" (dead4),
+   "=r" (dead5), "=r" (dead6)
+   : "0" (x), "1" (y), "2" (len>>2), "3" (sig_shift)
+   : "cc", "memory");
+   return sig_shift;
+}
+
+#define OVERRIDE_FILTER_MEM2
+void filter_mem2(const spx_sig_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
+{
+   int i,j;
+   spx_sig_t xi,yi,nyi;
+
+   for (i=0;i<ord;i++)
+      mem[i] = SHR32(mem[i],1);   
+   for (i=0;i<N;i++)
+   {
+      int deadm, deadn, deadd, deadidx, x1, y1, dead1, dead2, dead3, dead4, dead5, dead6;
+      xi=SATURATE(x[i],805306368);
+      yi = SATURATE(ADD32(xi, SHL(mem[0],2)),805306368);
+      nyi = -yi;
+      y[i] = yi;
+      __asm__ __volatile__ (
+            "\tldrsh %6, [%1], #2\n"
+            "\tsmull %8, %9, %4, %6\n"
+#ifdef SHORTCUTS
+            "\tldrsh %6, [%2], #2\n"
+            "\tldr %10, [%0, #4]\n"
+            "\tmov %8, %8, lsr #15\n"
+            "\tsmull %7, %11, %5, %6\n"
+            "\tldrsh %6, [%1], #2\n"
+            "\tadd %8, %8, %9, lsl #17\n"
+            "\tadd %10, %10, %8\n"
+            "\tsmull %8, %9, %4, %6\n"
+            "\tadd %10, %10, %7, lsr #15\n"
+            "\tadd %10, %10, %11, lsl #17\n"
+            "\tstr %10, [%0], #4 \n"
+
+            "\tldrsh %6, [%2], #2\n"
+            "\tldr %10, [%0, #4]\n"
+            "\tmov %8, %8, lsr #15\n"
+            "\tsmull %7, %11, %5, %6\n"
+            "\tldrsh %6, [%1], #2\n"
+            "\tadd %8, %8, %9, lsl #17\n"
+            "\tadd %10, %10, %8\n"
+            "\tsmull %8, %9, %4, %6\n"
+            "\tadd %10, %10, %7, lsr #15\n"
+            "\tadd %10, %10, %11, lsl #17\n"
+            "\tstr %10, [%0], #4 \n"
+
+            "\tldrsh %6, [%2], #2\n"
+            "\tldr %10, [%0, #4]\n"
+            "\tmov %8, %8, lsr #15\n"
+            "\tsmull %7, %11, %5, %6\n"
+            "\tldrsh %6, [%1], #2\n"
+            "\tadd %8, %8, %9, lsl #17\n"
+            "\tadd %10, %10, %8\n"
+            "\tsmull %8, %9, %4, %6\n"
+            "\tadd %10, %10, %7, lsr #15\n"
+            "\tadd %10, %10, %11, lsl #17\n"
+            "\tstr %10, [%0], #4 \n"
+
+            "\tldrsh %6, [%2], #2\n"
+            "\tldr %10, [%0, #4]\n"
+            "\tmov %8, %8, lsr #15\n"
+            "\tsmull %7, %11, %5, %6\n"
+            "\tldrsh %6, [%1], #2\n"
+            "\tadd %8, %8, %9, lsl #17\n"
+            "\tadd %10, %10, %8\n"
+            "\tsmull %8, %9, %4, %6\n"
+            "\tadd %10, %10, %7, lsr #15\n"
+            "\tadd %10, %10, %11, lsl #17\n"
+            "\tstr %10, [%0], #4 \n"
+
+            "\tldrsh %6, [%2], #2\n"
+            "\tldr %10, [%0, #4]\n"
+            "\tmov %8, %8, lsr #15\n"
+            "\tsmull %7, %11, %5, %6\n"
+            "\tldrsh %6, [%1], #2\n"
+            "\tadd %8, %8, %9, lsl #17\n"
+            "\tadd %10, %10, %8\n"
+            "\tsmull %8, %9, %4, %6\n"
+            "\tadd %10, %10, %7, lsr #15\n"
+            "\tadd %10, %10, %11, lsl #17\n"
+            "\tstr %10, [%0], #4 \n"
+
+            "\tldrsh %6, [%2], #2\n"
+            "\tldr %10, [%0, #4]\n"
+            "\tmov %8, %8, lsr #15\n"
+            "\tsmull %7, %11, %5, %6\n"
+            "\tldrsh %6, [%1], #2\n"
+            "\tadd %8, %8, %9, lsl #17\n"
+            "\tadd %10, %10, %8\n"
+            "\tsmull %8, %9, %4, %6\n"
+            "\tadd %10, %10, %7, lsr #15\n"
+            "\tadd %10, %10, %11, lsl #17\n"
+            "\tstr %10, [%0], #4 \n"
+
+            "\tldrsh %6, [%2], #2\n"
+            "\tldr %10, [%0, #4]\n"
+            "\tmov %8, %8, lsr #15\n"
+            "\tsmull %7, %11, %5, %6\n"
+            "\tldrsh %6, [%1], #2\n"
+            "\tadd %8, %8, %9, lsl #17\n"
+            "\tadd %10, %10, %8\n"
+            "\tsmull %8, %9, %4, %6\n"
+            "\tadd %10, %10, %7, lsr #15\n"
+            "\tadd %10, %10, %11, lsl #17\n"
+            "\tstr %10, [%0], #4 \n"
+
+            "\tldrsh %6, [%2], #2\n"
+            "\tldr %10, [%0, #4]\n"
+            "\tmov %8, %8, lsr #15\n"
+            "\tsmull %7, %11, %5, %6\n"
+            "\tldrsh %6, [%1], #2\n"
+            "\tadd %8, %8, %9, lsl #17\n"
+            "\tadd %10, %10, %8\n"
+            "\tsmull %8, %9, %4, %6\n"
+            "\tadd %10, %10, %7, lsr #15\n"
+            "\tadd %10, %10, %11, lsl #17\n"
+            "\tstr %10, [%0], #4 \n"
+
+            "\tldrsh %6, [%2], #2\n"
+            "\tldr %10, [%0, #4]\n"
+            "\tmov %8, %8, lsr #15\n"
+            "\tsmull %7, %11, %5, %6\n"
+            "\tldrsh %6, [%1], #2\n"
+            "\tadd %8, %8, %9, lsl #17\n"
+            "\tadd %10, %10, %8\n"
+            "\tsmull %8, %9, %4, %6\n"
+            "\tadd %10, %10, %7, lsr #15\n"
+            "\tadd %10, %10, %11, lsl #17\n"
+            "\tstr %10, [%0], #4 \n"
+
+
+#else
+            ".filterloop%=: \n"
+            "\tldrsh %6, [%2], #2\n"
+            "\tldr %10, [%0, #4]\n"
+            "\tmov %8, %8, lsr #15\n"
+            "\tsmull %7, %11, %5, %6\n"
+            "\tadd %8, %8, %9, lsl #17\n"
+            "\tldrsh %6, [%1], #2\n"
+            "\tadd %10, %10, %8\n"
+            "\tsmull %8, %9, %4, %6\n"
+            "\tadd %10, %10, %7, lsr #15\n"
+            "\tsubs %3, %3, #1\n"
+            "\tadd %10, %10, %11, lsl #17\n"
+            "\tstr %10, [%0], #4 \n"
+            "\t bne .filterloop%=\n"
+#endif
+            "\tmov %8, %8, lsr #15\n"
+            "\tadd %10, %8, %9, lsl #17\n"
+            "\tldrsh %6, [%2], #2\n"
+            "\tsmull %8, %9, %5, %6\n"
+            "\tadd %10, %10, %8, lsr #15\n"
+            "\tadd %10, %10, %9, lsl #17\n"
+            "\tstr %10, [%0], #4 \n"
+
+         : "=r" (deadm), "=r" (deadn), "=r" (deadd), "=r" (deadidx),
+      "=r" (xi), "=r" (nyi), "=r" (dead1), "=r" (dead2),
+      "=r" (dead3), "=r" (dead4), "=r" (dead5), "=r" (dead6)
+         : "0" (mem), "1" (num), "2" (den), "3" (ord-1), "4" (xi), "5" (nyi)
+         : "cc", "memory");
+   
+   }
+   for (i=0;i<ord;i++)
+      mem[i] = SHL32(mem[i],1);   
+}
+
+#define OVERRIDE_IIR_MEM2
+void iir_mem2(const spx_sig_t *x, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
+{
+   int i,j;
+   spx_sig_t xi,yi,nyi;
+
+   for (i=0;i<ord;i++)
+      mem[i] = SHR32(mem[i],1);   
+
+   for (i=0;i<N;i++)
+   {
+      int deadm, deadd, deadidx, dead1, dead2, dead3, dead4, dead5, dead6;
+      xi=SATURATE(x[i],805306368);
+      yi = SATURATE(ADD32(xi, SHL(mem[0],2)),805306368);
+      nyi = -yi;
+      y[i] = yi;
+      __asm__ __volatile__ (
+            "\tldrsh %4, [%1], #2\n"
+            "\tsmull %5, %6, %3, %4\n"
+
+#ifdef SHORTCUTS
+                        
+            "\tldrsh %4, [%1], #2\n"
+            "\tmov %5, %5, lsr #15\n"
+            "\tldr %7, [%0, #4]\n"
+            "\tadd %8, %5, %6, lsl #17\n"
+            "\tsmull %5, %6, %3, %4\n"
+            "\tadd %7, %7, %8\n"
+            "\tstr %7, [%0], #4 \n"
+
+                 
+            "\tldrsh %4, [%1], #2\n"
+            "\tmov %5, %5, lsr #15\n"
+            "\tldr %9, [%0, #4]\n"
+            "\tadd %8, %5, %6, lsl #17\n"
+            "\tsmull %5, %6, %3, %4\n"
+            "\tadd %9, %9, %8\n"
+            "\tstr %9, [%0], #4 \n"
+
+            "\tldrsh %4, [%1], #2\n"
+            "\tmov %5, %5, lsr #15\n"
+            "\tldr %7, [%0, #4]\n"
+            "\tadd %8, %5, %6, lsl #17\n"
+            "\tsmull %5, %6, %3, %4\n"
+            "\tadd %7, %7, %8\n"
+            "\tstr %7, [%0], #4 \n"
+
+            
+            "\tldrsh %4, [%1], #2\n"
+            "\tmov %5, %5, lsr #15\n"
+            "\tldr %9, [%0, #4]\n"
+            "\tadd %8, %5, %6, lsl #17\n"
+            "\tsmull %5, %6, %3, %4\n"
+            "\tadd %9, %9, %8\n"
+            "\tstr %9, [%0], #4 \n"
+
+            "\tldrsh %4, [%1], #2\n"
+            "\tmov %5, %5, lsr #15\n"
+            "\tldr %7, [%0, #4]\n"
+            "\tadd %8, %5, %6, lsl #17\n"
+            "\tsmull %5, %6, %3, %4\n"
+            "\tadd %7, %7, %8\n"
+            "\tstr %7, [%0], #4 \n"
+
+            
+            "\tldrsh %4, [%1], #2\n"
+            "\tmov %5, %5, lsr #15\n"
+            "\tldr %9, [%0, #4]\n"
+            "\tadd %8, %5, %6, lsl #17\n"
+            "\tsmull %5, %6, %3, %4\n"
+            "\tadd %9, %9, %8\n"
+            "\tstr %9, [%0], #4 \n"
+
+            "\tldrsh %4, [%1], #2\n"
+            "\tmov %5, %5, lsr #15\n"
+            "\tldr %7, [%0, #4]\n"
+            "\tadd %8, %5, %6, lsl #17\n"
+            "\tsmull %5, %6, %3, %4\n"
+            "\tadd %7, %7, %8\n"
+            "\tstr %7, [%0], #4 \n"
+
+            
+            "\tldrsh %4, [%1], #2\n"
+            "\tmov %5, %5, lsr #15\n"
+            "\tldr %9, [%0, #4]\n"
+            "\tadd %8, %5, %6, lsl #17\n"
+            "\tsmull %5, %6, %3, %4\n"
+            "\tadd %9, %9, %8\n"
+            "\tstr %9, [%0], #4 \n"
+
+            "\tldrsh %4, [%1], #2\n"
+            "\tmov %5, %5, lsr #15\n"
+            "\tldr %7, [%0, #4]\n"
+            "\tadd %8, %5, %6, lsl #17\n"
+            "\tsmull %5, %6, %3, %4\n"
+            "\tadd %7, %7, %8\n"
+            "\tstr %7, [%0], #4 \n"
+
+            
+            
+#else
+            ".iirloop%=: \n"
+            "\tldr %7, [%0, #4]\n"
+
+            "\tldrsh %4, [%1], #2\n"
+            "\tmov %5, %5, lsr #15\n"
+            "\tadd %8, %5, %6, lsl #17\n"
+            "\tsmull %5, %6, %3, %4\n"
+            "\tadd %7, %7, %8\n"
+            "\tstr %7, [%0], #4 \n"
+            "\tsubs %2, %2, #1\n"
+            "\t bne .iirloop%=\n"
+            
+#endif
+            "\tmov %5, %5, lsr #15\n"
+            "\tadd %7, %5, %6, lsl #17\n"
+            "\tstr %7, [%0], #4 \n"
+
+         : "=r" (deadm), "=r" (deadd), "=r" (deadidx), "=r" (nyi),
+      "=r" (dead1), "=r" (dead2), "=r" (dead3), "=r" (dead4),
+      "=r" (dead5), "=r" (dead6)
+         : "0" (mem), "1" (den), "2" (ord-1), "3" (nyi)
+         : "cc", "memory");
+   
+   }
+   for (i=0;i<ord;i++)
+      mem[i] = SHL32(mem[i],1);   
+
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters_bfin.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters_bfin.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters_bfin.h	(revision 1163)
@@ -0,0 +1,788 @@
+/* Copyright (C) 2005 Analog Devices */
+/**
+   @file filters_bfin.h
+   @brief Various analysis/synthesis filters (Blackfin version)
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#define OVERRIDE_NORMALIZE16
+int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int len)
+{
+   spx_sig_t max_val=1;
+   int sig_shift;
+   __asm__ 
+   (
+   "%0 = 0;\n\t"
+   "I0 = %1;\n\t"
+   "L0 = 0;\n\t"
+   "R1 = [I0++];\n\t"
+   "LOOP norm_max%= LC0 = %2;\n\t"
+   "LOOP_BEGIN norm_max%=;\n\t"
+      "R2 = ABS R1 || R1 = [I0++];\n\t"
+      "%0 = MAX(%0, R2);\n\t"
+   "LOOP_END norm_max%=;\n\t"
+   : "=&d" (max_val)
+   : "a" (x), "a" (len)
+   : "R1", "R2"
+   );
+
+   sig_shift=0;
+   while (max_val>max_scale)
+   {
+      sig_shift++;
+      max_val >>= 1;
+   }
+
+   __asm__ __volatile__ 
+   (
+   "I0 = %0;\n\t"
+   "L0 = 0;\n\t"
+   "P1 = %1;\n\t"
+   "R0 = [I0++];\n\t"
+   "LOOP norm_shift%= LC0 = %3;\n\t"
+   "LOOP_BEGIN norm_shift%=;\n\t"
+      "R1 = ASHIFT R0 by %2.L || R0 = [I0++];\n\t"
+      "W[P1++] = R1;\n\t"
+   "LOOP_END norm_shift%=;\n\t"
+   "R1 = ASHIFT R0 by %2.L;\n\t"
+   "W[P1++] = R1;\n\t"
+   : : "a" (x), "a" (y), "d" (-sig_shift), "a" (len-1)
+   : "I0", "L0", "P1", "R0", "R1", "memory"
+   );
+   return sig_shift;
+}
+
+#define OVERRIDE_FILTER_MEM2
+void filter_mem2(const spx_sig_t *_x, const spx_coef_t *num, const spx_coef_t *den, spx_sig_t *_y, int N, int ord, spx_mem_t *mem)
+{
+   spx_word32_t xy2[N+1];
+   spx_word32_t *xy = xy2+1;
+   spx_word32_t numden_a[2*ord+2];
+   spx_word16_t *numden = (spx_word16_t*) numden_a;
+   int i;
+   for (i=0;i<ord;i++)
+   {
+      numden[2*i] = num[i];
+      numden[2*i+1] = den[i];
+   }
+   __asm__ __volatile__
+   (
+   /* Register setup */
+   "R0 = %5;\n\t"      /*ord */
+   
+   "P0 = %3;\n\t"
+   "I0 = P0;\n\t"
+   "B0 = P0;\n\t" /* numden */
+   "L0 = 0;\n\t"
+      
+   "P2 = %0;\n\t" /* Fused xy */
+   "I2 = P2;\n\t"
+   "L2 = 0;\n\t"
+   
+   "P4 = %6;\n\t" /* mem */
+   "P0 = %1;\n\t" /* _x */
+   "P1 = %2;\n\t" /* _y */
+   
+   /* First sample */
+   "R1 = [P4++];\n\t"
+   "R1 <<= 1;\n\t" /* shift mem */
+   "R2 = [P0++];\n\t" /* load x[0] */
+   "R1 = R1 + R2;\n\t"
+   "[P1++] = R1;\n\t" /* store y[0] */
+   "R1 <<= 2;\n\t"
+   "R2 <<= 2;\n\t"
+   "R2 = PACK(R1.H, R2.H);\n\t" /* pack x16 and y16 */
+   "[P2] = R2;\n\t"
+               
+   /* Samples 1 to ord-1 (using memory) */
+   "R0 += -1;\n\t"
+   "R3 = 0;\n\t"
+   "LC0 = R0;\n\t"
+   "LOOP filter_start%= LC0;\n\t"
+   "LOOP_BEGIN filter_start%=;\n\t"
+      "R3 += 1;\n\t"
+      "LC1 = R3;\n\t"
+      
+      "R1 = [P4++];\n\t"
+      "A1 = R1;\n\t"
+      "A0 = 0;\n\t"
+      "I0 = B0;\n\t"
+      "I2 = P2;\n\t"
+      "P2 += 4;\n\t"
+      "R4 = [I0++] || R5 = [I2--];\n\t"
+      "LOOP filter_start_inner%= LC1;\n\t"
+      "LOOP_BEGIN filter_start_inner%=;\n\t"
+         "A1 -= R4.H*R5.H, A0 += R4.L*R5.L (IS) || R4 = [I0++] || R5 = [I2--];\n\t"
+      "LOOP_END filter_start_inner%=;\n\t"
+      "A0 += A1;\n\t"
+      "R4 = A0;\n\t"
+      "R4 <<= 1;\n\t" /* shift mem */
+      "R2 = [P0++];\n\t" /* load x */
+      "R4 = R4 + R2;\n\t"
+      "[P1++] = R4;\n\t" /* store y */
+      "R4 <<= 2;\n\t"
+      "R2 <<= 2;\n\t"
+      "R2 = PACK(R4.H, R2.H);\n\t" /* pack x16 and y16 */
+      "[P2] = R2;\n\t"
+
+   "LOOP_END filter_start%=;\n\t"
+
+   /* Samples ord to N*/   
+   "R0 = %5;\n\t"
+   "R0 <<= 1;\n\t"
+   "I0 = B0;\n\t" /* numden */
+   "R0 <<= 1;\n\t"   
+   "L0 = R0;\n\t"
+   
+   "R0 = %5;\n\t" /* org */
+   "R2 = %4;\n\t" /* N */
+   "R2 = R2 - R0;\n\t"
+   "R4 = [I0++];\n\t" /* numden */
+   "LC0 = R2;\n\t"
+   "P3 = R0;\n\t"
+   "R0 <<= 2;\n\t"
+   "R0 += 8;\n\t"
+   "I2 = P2;\n\t"
+   "M0 = R0;\n\t"
+   "A1 = A0 = 0;\n\t"
+   "R5 = [I2--];\n\t" /* load xy */
+   "LOOP filter_mid%= LC0;\n\t"
+   "LOOP_BEGIN filter_mid%=;\n\t"
+      "LOOP filter_mid_inner%= LC1=P3;\n\t"
+      "LOOP_BEGIN filter_mid_inner%=;\n\t"
+         "A1 -= R4.H*R5.H, A0 += R4.L*R5.L (IS) || R4 = [I0++] || R5 = [I2--];\n\t"
+      "LOOP_END filter_mid_inner%=;\n\t"
+      "R0 = (A0 += A1) || I2 += M0;\n\t"
+      "R0 = R0 << 1 || R5 = [P0++];\n\t" /* load x */
+      "R0 = R0 + R5;\n\t"
+      "R0 = R0 << 2 || [P1++] = R0;\n\t" /* shift y | store y */
+      "R5 = R5 << 2;\n\t"
+      "R5 = PACK(R0.H, R5.H);\n\t"
+      "A1 = A0 = 0 || [I2--] = R5\n\t"
+      "LOOP_END filter_mid%=;\n\t"
+   "I2 += 4;\n\t"
+   "P2 = I2;\n\t"
+   /* Update memory */
+   "P4 = %6;\n\t"
+   "R0 = %5;\n\t"
+   "LC0 = R0;\n\t"
+   "P0 = B0;\n\t"
+   "A1 = A0 = 0;\n\t"
+   "LOOP mem_update%= LC0;\n\t"
+   "LOOP_BEGIN mem_update%=;\n\t"
+      "I2 = P2;\n\t"
+      "I0 = P0;\n\t"
+      "P0 += 4;\n\t"
+      "R0 = LC0;\n\t"
+      "LC1 = R0;\n\t"
+      "R5 = [I2--] || R4 = [I0++];\n\t"
+      "LOOP mem_accum%= LC1;\n\t"
+      "LOOP_BEGIN mem_accum%=;\n\t"
+         "A1 -= R4.H*R5.H, A0 += R4.L*R5.L (IS) || R4 = [I0++] || R5 = [I2--];\n\t"
+      "LOOP_END mem_accum%=;\n\t"
+      "R0 = (A0 += A1);\n\t"
+      "A1 = A0 = 0 || [P4++] = R0;\n\t"
+   "LOOP_END mem_update%=;\n\t"
+   "L0 = 0;\n\t"
+   : : "m" (xy), "m" (_x), "m" (_y), "m" (numden), "m" (N), "m" (ord), "m" (mem)
+   : "A0", "A1", "R0", "R1", "R2", "R3", "R4", "R5", "P0", "P1", "P2", "P3", "P4", "B0", "I0", "I2", "L0", "L2", "M0", "memory"
+   );
+
+}
+
+
+#define OVERRIDE_FILTER_MEM16
+void filter_mem16(const spx_word16_t *_x, const spx_coef_t *num, const spx_coef_t *den, spx_word16_t *_y, int N, int ord, spx_mem_t *mem, char *stack)
+{
+   VARDECL(spx_word32_t *xy2);
+   VARDECL(spx_word32_t *numden_a);
+   spx_word32_t *xy;
+   spx_word16_t *numden;
+   int i;
+
+   ALLOC(xy2, (N+1), spx_word32_t);
+   ALLOC(numden_a, (2*ord+2), spx_word32_t);
+   xy = xy2+1;  
+   numden = (spx_word16_t*) numden_a;
+
+   for (i=0;i<ord;i++)
+   {
+      numden[2*i] = num[i];
+      numden[2*i+1] = den[i];
+   }
+   __asm__ __volatile__
+   (
+   /* Register setup */
+   "R0 = %5;\n\t"      /*ord */
+   
+   "P0 = %3;\n\t"
+   "I0 = P0;\n\t"
+   "B0 = P0;\n\t" /* numden */
+   "L0 = 0;\n\t"
+      
+   "P2 = %0;\n\t" /* Fused xy */
+   "I2 = P2;\n\t"
+   "L2 = 0;\n\t"
+   
+   "P4 = %6;\n\t" /* mem */
+   "P0 = %1;\n\t" /* _x */
+   "P1 = %2;\n\t" /* _y */
+   
+   /* First sample */
+   "R1 = [P4++];\n\t"
+   "R1 <<= 3;\n\t" /* shift mem */
+   "R1.L = R1 (RND);\n\t"
+   "R2 = W[P0++];\n\t" /* load x[0] */
+   "R1.L = R1.L + R2.L;\n\t"
+   "W[P1++] = R1;\n\t" /* store y[0] */
+   "R2 = PACK(R1.L, R2.L);\n\t" /* pack x16 and y16 */
+   "[P2] = R2;\n\t"
+               
+   /* Samples 1 to ord-1 (using memory) */
+   "R0 += -1;\n\t"
+   "R3 = 0;\n\t"
+   "LC0 = R0;\n\t"
+   "LOOP filter_start%= LC0;\n\t"
+   "LOOP_BEGIN filter_start%=;\n\t"
+      "R3 += 1;\n\t"
+      "LC1 = R3;\n\t"
+      
+      "R1 = [P4++];\n\t"
+      "A1 = R1;\n\t"
+      "A0 = 0;\n\t"
+      "I0 = B0;\n\t"
+      "I2 = P2;\n\t"
+      "P2 += 4;\n\t"
+      "R4 = [I0++] || R5 = [I2--];\n\t"
+      "LOOP filter_start_inner%= LC1;\n\t"
+      "LOOP_BEGIN filter_start_inner%=;\n\t"
+         "A1 -= R4.H*R5.H, A0 += R4.L*R5.L (IS) || R4 = [I0++] || R5 = [I2--];\n\t"
+      "LOOP_END filter_start_inner%=;\n\t"
+      "A0 += A1;\n\t"
+      "R4 = A0;\n\t"
+      "R4 <<= 3;\n\t" /* shift mem */
+      "R4.L = R4 (RND);\n\t"
+      "R2 = W[P0++];\n\t" /* load x */
+      "R4.L = R4.L + R2.L;\n\t"
+      "W[P1++] = R4;\n\t" /* store y */
+      //"R4 <<= 2;\n\t"
+      //"R2 <<= 2;\n\t"
+      "R2 = PACK(R4.L, R2.L);\n\t" /* pack x16 and y16 */
+      "[P2] = R2;\n\t"
+
+   "LOOP_END filter_start%=;\n\t"
+
+   /* Samples ord to N*/   
+   "R0 = %5;\n\t"
+   "R0 <<= 1;\n\t"
+   "I0 = B0;\n\t" /* numden */
+   "R0 <<= 1;\n\t"   
+   "L0 = R0;\n\t"
+   
+   "R0 = %5;\n\t" /* org */
+   "R2 = %4;\n\t" /* N */
+   "R2 = R2 - R0;\n\t"
+   "R4 = [I0++];\n\t" /* numden */
+   "LC0 = R2;\n\t"
+   "P3 = R0;\n\t"
+   "R0 <<= 2;\n\t"
+   "R0 += 8;\n\t"
+   "I2 = P2;\n\t"
+   "M0 = R0;\n\t"
+   "A1 = A0 = 0;\n\t"
+   "R5 = [I2--];\n\t" /* load xy */
+   "LOOP filter_mid%= LC0;\n\t"
+   "LOOP_BEGIN filter_mid%=;\n\t"
+      "LOOP filter_mid_inner%= LC1=P3;\n\t"
+      "LOOP_BEGIN filter_mid_inner%=;\n\t"
+         "A1 -= R4.H*R5.H, A0 += R4.L*R5.L (IS) || R4 = [I0++] || R5 = [I2--];\n\t"
+      "LOOP_END filter_mid_inner%=;\n\t"
+      "R0 = (A0 += A1) || I2 += M0;\n\t"
+      "R0 = R0 << 3 || R5 = W[P0++];\n\t" /* load x */
+      "R0.L = R0 (RND);\n\t"
+      "R0.L = R0.L + R5.L;\n\t"
+      "R5 = PACK(R0.L, R5.L) || W[P1++] = R0;\n\t" /* shift y | store y */
+      "A1 = A0 = 0 || [I2--] = R5\n\t"
+      "LOOP_END filter_mid%=;\n\t"
+   "I2 += 4;\n\t"
+   "P2 = I2;\n\t"
+   /* Update memory */
+   "P4 = %6;\n\t"
+   "R0 = %5;\n\t"
+   "LC0 = R0;\n\t"
+   "P0 = B0;\n\t"
+   "A1 = A0 = 0;\n\t"
+   "LOOP mem_update%= LC0;\n\t"
+   "LOOP_BEGIN mem_update%=;\n\t"
+      "I2 = P2;\n\t"
+      "I0 = P0;\n\t"
+      "P0 += 4;\n\t"
+      "R0 = LC0;\n\t"
+      "LC1 = R0;\n\t"
+      "R5 = [I2--] || R4 = [I0++];\n\t"
+      "LOOP mem_accum%= LC1;\n\t"
+      "LOOP_BEGIN mem_accum%=;\n\t"
+         "A1 -= R4.H*R5.H, A0 += R4.L*R5.L (IS) || R4 = [I0++] || R5 = [I2--];\n\t"
+      "LOOP_END mem_accum%=;\n\t"
+      "R0 = (A0 += A1);\n\t"
+      "A1 = A0 = 0 || [P4++] = R0;\n\t"
+   "LOOP_END mem_update%=;\n\t"
+   "L0 = 0;\n\t"
+   : : "m" (xy), "m" (_x), "m" (_y), "m" (numden), "m" (N), "m" (ord), "m" (mem)
+   : "A0", "A1", "R0", "R1", "R2", "R3", "R4", "R5", "P0", "P1", "P2", "P3", "P4", "B0", "I0", "I2", "L0", "L2", "M0", "memory"
+   );
+
+}
+
+
+
+
+#define OVERRIDE_IIR_MEM2
+void iir_mem2(const spx_sig_t *_x, const spx_coef_t *den, spx_sig_t *_y, int N, int ord, spx_mem_t *mem)
+{
+   spx_word16_t y[N+2];
+   spx_word16_t *yy;
+   yy = y+2;
+   __asm__ __volatile__
+   (
+   /* Register setup */
+   "R0 = %5;\n\t"      /*ord */
+   
+   "P1 = %3;\n\t"
+   "I1 = P1;\n\t"
+   "B1 = P1;\n\t"
+   "L1 = 0;\n\t"
+   
+   "P3 = %0;\n\t"
+   "I3 = P3;\n\t"
+   "L3 = 0;\n\t"
+   
+   "P4 = %6;\n\t"
+   "P0 = %1;\n\t"
+   "P1 = %2;\n\t"
+   
+   /* First sample */
+   "R1 = [P4++];\n\t"
+   "R1 <<= 1;\n\t"
+   "R2 = [P0++];\n\t"
+   "R1 = R1 + R2;\n\t"
+   "[P1++] = R1;\n\t"
+   "R1 <<= 2;\n\t"
+   "W[P3] = R1.H;\n\t"
+   "R2 <<= 2;\n\t"
+
+   /* Samples 1 to ord-1 (using memory) */
+   "R0 += -1;\n\t"
+   "R3 = 0;\n\t"
+   "LC0 = R0;\n\t"
+   "LOOP filter_start%= LC0;\n\t"
+   "LOOP_BEGIN filter_start%=;\n\t"
+      "R3 += 1;\n\t"
+      "LC1 = R3;\n\t"
+      
+      "R1 = [P4++];\n\t"
+      "A1 = R1;\n\t"
+      "I1 = B1;\n\t"
+      "I3 = P3;\n\t"
+      "P3 += 2;\n\t"
+      "LOOP filter_start_inner%= LC1;\n\t"
+      "LOOP_BEGIN filter_start_inner%=;\n\t"
+         "R4.L = W[I1++];\n\t"
+         "R5.L = W[I3--];\n\t"
+         "A1 -= R4.L*R5.L (IS);\n\t"
+      "LOOP_END filter_start_inner%=;\n\t"
+   
+      "R1 = A1;\n\t"
+      "R1 <<= 1;\n\t"
+      "R2 = [P0++];\n\t"
+      "R1 = R1 + R2;\n\t"
+      "[P1++] = R1;\n\t"
+      "R1 <<= 2;\n\t"
+      "W[P3] = R1.H;\n\t"
+      "R2 <<= 2;\n\t"
+   "LOOP_END filter_start%=;\n\t"
+
+   /* Samples ord to N*/   
+   "R0 = %5;\n\t"
+   "R0 <<= 1;\n\t"
+   "I1 = B1;\n\t"
+   "L1 = R0;\n\t"
+   
+   "R0 = %5;\n\t"
+   "R2 = %4;\n\t"
+   "R2 = R2 - R0;\n\t"
+   "R4.L = W[I1++];\n\t"
+   "LC0 = R2;\n\t"
+   "LOOP filter_mid%= LC0;\n\t"
+   "LOOP_BEGIN filter_mid%=;\n\t"
+      "LC1 = R0;\n\t"
+      "A1 = 0;\n\t"
+      "I3 = P3;\n\t"
+      "P3 += 2;\n\t"
+      "R5.L = W[I3--];\n\t"
+      "LOOP filter_mid_inner%= LC1;\n\t"
+      "LOOP_BEGIN filter_mid_inner%=;\n\t"
+         "A1 -= R4.L*R5.L (IS) || R4.L = W[I1++] || R5.L = W[I3--];\n\t"
+      "LOOP_END filter_mid_inner%=;\n\t"
+      "R1 = A1;\n\t"
+      "R1 = R1 << 1 || R2 = [P0++];\n\t"
+      "R1 = R1 + R2;\n\t"
+      "R1 = R1 << 2 || [P1++] = R1;\n\t"
+      "W[P3] = R1.H;\n\t"
+   "LOOP_END filter_mid%=;\n\t"
+     
+   /* Update memory */
+   "P4 = %6;\n\t"
+   "R0 = %5;\n\t"
+   "LC0 = R0;\n\t"
+   "P1 = B1;\n\t"
+   "LOOP mem_update%= LC0;\n\t"
+   "LOOP_BEGIN mem_update%=;\n\t"
+      "A0 = 0;\n\t"
+      "I3 = P3;\n\t"
+      "I1 = P1;\n\t"
+      "P1 += 2;\n\t"
+      "R0 = LC0;\n\t"
+      "LC1=R0;\n\t"
+      "R5.L = W[I3--] || R4.L = W[I1++];\n\t"
+      "LOOP mem_accum%= LC1;\n\t"
+      "LOOP_BEGIN mem_accum%=;\n\t"
+         "A0 -= R4.L*R5.L (IS) || R4.L = W[I1++] || R5.L = W[I3--];\n\t"
+      "LOOP_END mem_accum%=;\n\t"
+      "R0 = A0;\n\t"
+      "[P4++] = R0;\n\t"
+   "LOOP_END mem_update%=;\n\t"
+   "L1 = 0;\n\t"
+   : : "m" (yy), "m" (_x), "m" (_y), "m" (den), "m" (N), "m" (ord), "m" (mem)
+   : "A0", "A1", "R0", "R1", "R2", "R3", "R4", "R5", "P0", "P1", "P2", "P3", "P4", "B1", "I1", "I3", "L1", "L3", "memory"
+   );
+
+}
+
+
+#define OVERRIDE_IIR_MEM16
+void iir_mem16(const spx_word16_t *_x, const spx_coef_t *den, spx_word16_t *_y, int N, int ord, spx_mem_t *mem, char *stack)
+{
+   VARDECL(spx_word16_t *y);
+   spx_word16_t *yy;
+
+   ALLOC(y, (N+2), spx_word16_t);
+   yy = y+2;
+
+   __asm__ __volatile__
+   (
+   /* Register setup */
+   "R0 = %5;\n\t"      /*ord */
+   
+   "P1 = %3;\n\t"
+   "I1 = P1;\n\t"
+   "B1 = P1;\n\t"
+   "L1 = 0;\n\t"
+   
+   "P3 = %0;\n\t"
+   "I3 = P3;\n\t"
+   "L3 = 0;\n\t"
+   
+   "P4 = %6;\n\t"
+   "P0 = %1;\n\t"
+   "P1 = %2;\n\t"
+   
+   /* First sample */
+   "R1 = [P4++];\n\t"
+   "R1 = R1 << 3 (S);\n\t"
+   "R1.L = R1 (RND);\n\t"
+   "R2 = W[P0++];\n\t"
+   "R1 = R1 + R2;\n\t"
+   "W[P1++] = R1;\n\t"
+   "W[P3] = R1;\n\t"
+
+   /* Samples 1 to ord-1 (using memory) */
+   "R0 += -1;\n\t"
+   "R3 = 0;\n\t"
+   "LC0 = R0;\n\t"
+   "LOOP filter_start%= LC0;\n\t"
+   "LOOP_BEGIN filter_start%=;\n\t"
+      "R3 += 1;\n\t"
+      "LC1 = R3;\n\t"
+      
+      "R1 = [P4++];\n\t"
+      "A1 = R1;\n\t"
+      "I1 = B1;\n\t"
+      "I3 = P3;\n\t"
+      "P3 += 2;\n\t"
+      "LOOP filter_start_inner%= LC1;\n\t"
+      "LOOP_BEGIN filter_start_inner%=;\n\t"
+         "R4.L = W[I1++];\n\t"
+         "R5.L = W[I3--];\n\t"
+         "A1 -= R4.L*R5.L (IS);\n\t"
+      "LOOP_END filter_start_inner%=;\n\t"
+   
+      "R1 = A1;\n\t"
+      "R1 <<= 3;\n\t"
+      "R1.L = R1 (RND);\n\t"
+      "R2 = W[P0++];\n\t"
+      "R1 = R1 + R2;\n\t"
+      "W[P1++] = R1;\n\t"
+      "W[P3] = R1;\n\t"
+   "LOOP_END filter_start%=;\n\t"
+
+   /* Samples ord to N*/   
+   "R0 = %5;\n\t"
+   "R0 <<= 1;\n\t"
+   "I1 = B1;\n\t"
+   "L1 = R0;\n\t"
+   
+   "R0 = %5;\n\t"
+   "R2 = %4;\n\t"
+   "R2 = R2 - R0;\n\t"
+   "R4.L = W[I1++];\n\t"
+   "LC0 = R2;\n\t"
+   "LOOP filter_mid%= LC0;\n\t"
+   "LOOP_BEGIN filter_mid%=;\n\t"
+      "LC1 = R0;\n\t"
+      "A1 = 0;\n\t"
+      "I3 = P3;\n\t"
+      "P3 += 2;\n\t"
+      "R5.L = W[I3--];\n\t"
+      "LOOP filter_mid_inner%= LC1;\n\t"
+      "LOOP_BEGIN filter_mid_inner%=;\n\t"
+         "A1 -= R4.L*R5.L (IS) || R4.L = W[I1++] || R5.L = W[I3--];\n\t"
+      "LOOP_END filter_mid_inner%=;\n\t"
+      "R1 = A1;\n\t"
+      "R1 = R1 << 3 || R2 = W[P0++];\n\t"
+      "R1.L = R1 (RND);\n\t"
+      "R1 = R1 + R2;\n\t"
+      "W[P1++] = R1;\n\t"
+      "W[P3] = R1;\n\t"
+   "LOOP_END filter_mid%=;\n\t"
+     
+   /* Update memory */
+   "P4 = %6;\n\t"
+   "R0 = %5;\n\t"
+   "LC0 = R0;\n\t"
+   "P1 = B1;\n\t"
+   "LOOP mem_update%= LC0;\n\t"
+   "LOOP_BEGIN mem_update%=;\n\t"
+      "A0 = 0;\n\t"
+      "I3 = P3;\n\t"
+      "I1 = P1;\n\t"
+      "P1 += 2;\n\t"
+      "R0 = LC0;\n\t"
+      "LC1=R0;\n\t"
+      "R5.L = W[I3--] || R4.L = W[I1++];\n\t"
+      "LOOP mem_accum%= LC1;\n\t"
+      "LOOP_BEGIN mem_accum%=;\n\t"
+         "A0 -= R4.L*R5.L (IS) || R4.L = W[I1++] || R5.L = W[I3--];\n\t"
+      "LOOP_END mem_accum%=;\n\t"
+      "R0 = A0;\n\t"
+      "[P4++] = R0;\n\t"
+   "LOOP_END mem_update%=;\n\t"
+   "L1 = 0;\n\t"
+   : : "m" (yy), "m" (_x), "m" (_y), "m" (den), "m" (N), "m" (ord), "m" (mem)
+   : "A0", "A1", "R0", "R1", "R2", "R3", "R4", "R5", "P0", "P1", "P2", "P3", "P4", "B1", "I1", "I3", "L1", "L3", "memory"
+   );
+
+}
+
+
+#define OVERRIDE_FIR_MEM2
+void fir_mem2(const spx_sig_t *x, const spx_coef_t *num, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
+{
+   int i;
+   spx_coef_t den2[12];
+   spx_coef_t *den;
+   den = (spx_coef_t*)((((int)den2)+4)&0xfffffffc);
+   for (i=0;i<10;i++)
+      den[i] = 0;
+   filter_mem2(x, num, den, y, N, ord, mem);
+}
+
+#define OVERRIDE_FIR_MEM16
+void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
+{
+   int i;
+   spx_coef_t den2[12];
+   spx_coef_t *den;
+   den = (spx_coef_t*)((((int)den2)+4)&0xfffffffc);
+   for (i=0;i<10;i++)
+      den[i] = 0;
+   filter_mem16(x, num, den, y, N, ord, mem, stack);
+}
+
+
+#define OVERRIDE_COMPUTE_IMPULSE_RESPONSE
+void compute_impulse_response(const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack)
+{
+   int i;
+   VARDECL(spx_word16_t *ytmp);
+   ALLOC(ytmp, N, spx_word16_t);
+   spx_word16_t *ytmp2 = ytmp;
+   y[0] = LPC_SCALING;
+   for (i=0;i<ord;i++)
+      y[i+1] = awk1[i];
+   i++;
+   for (;i<N;i++)
+      y[i] = 0;
+
+   N-=1;
+   __asm__ __volatile__
+   (
+         "I0 = %0;\n\t"
+         "I1 = %1;\n\t"
+         "L0 = 0;\n\t"
+         "L1 = 0;\n\t"
+         "L2 = 0;\n\t"
+         "L3 = 0;\n\t"
+         "R0 = 1;\n\t"
+         "R0 <<= 13;\n\t"
+         "W[I0] = R0.L;\n\t"
+         "R0 <<= 1;\n\t"
+         "W[I1] = R0.L;\n\t"
+         "R0 = %5;\n\t"
+         "LC0 = R0;\n\t"
+         "R2 = 0;\n\t"
+         "LOOP samples%= LC0;\n\t"
+         "LOOP_BEGIN samples%=;\n\t"
+            "R2 += 1;\n\t"
+            "R2 = MIN(R2, %4);\n\t"
+            "I0 = %0;\n\t"
+            "I1 = %1;\n\t"
+            "I2 = %2;\n\t"
+            "I3 = %3;\n\t"
+            "%0 += 2;\n\t"
+            "%1 += 2;\n\t"
+            "A1 = A0 = 0;\n\t"
+            "R0.L = W[I0--] || R1.L = W[I2++];\n\t"
+            "LC1 = R2;\n\t"
+            "LOOP filter%= LC1;\n\t"
+            "LOOP_BEGIN filter%=;\n\t"
+               "A0 -= R0.L*R1.L (IS) || R0.L = W[I1--] || R1.L = W[I3++];\n\t"
+               "A1 -= R0.L*R1.L (IS) || R0.L = W[I0--] || R1.L = W[I2++];\n\t"
+            "LOOP_END filter%=;\n\t"
+            "R0 = A0, R1 = A1;\n\t"
+            "R3 = W[%1] (X);\n\t"
+            "R3 <<= 13;\n\t"
+            "R0 = R0 + R3;\n\t"
+            "R3 = R0 >>> 13;\n\t"
+            "W[%0] = R3.L;\n\t"
+            "R0 <<= 1;\n\t"
+            "R1 = R1 + R0;\n\t"
+            "R1 >>>= 13;\n\t"
+            "W[%1] = R1.L;\n\t"
+         "LOOP_END samples%=;\n\t"
+   : "=a" (ytmp2), "=a" (y)
+   : "a" (awk2), "a" (ak), "d" (ord), "m" (N), "0" (ytmp2), "1" (y)
+   : "A0", "A1", "R0", "R1", "R2", "R3", "I0", "I1", "I2", "I3", "L0", "L1", "L2", "L3", "A0", "A1"
+   );
+}
+
+
+
+#if 0 /* Equivalent C function for filter_mem2 and compute_impulse_response */
+#define min(a,b) ((a)<(b) ? (a):(b))
+
+void compute_impulse_response(const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack)
+{
+   int i,j;
+   VARDECL(spx_word16_t *ytmp);
+   ALLOC(ytmp, N, spx_word16_t);
+   
+   y[0] = LPC_SCALING;
+   for (i=0;i<ord;i++)
+      y[i+1] = awk1[i];
+   i++;
+   for (;i<N;i++)
+      y[i] = 0;
+
+   for (i=0;i<N;i++)
+   {
+      spx_word32_t yi = SHL32(EXTEND32(y[i]),LPC_SHIFT);
+      spx_word32_t yi2 = 0;
+      for (j=0;j<min(i,ord);j++)
+      {
+         yi = MAC16_16(yi, awk2[j], -ytmp[i-j-1]);
+         yi2 = MAC16_16(yi2, ak[j], -y[i-j-1]);
+      }
+      ytmp[i] = EXTRACT16(SHR32(yi,LPC_SHIFT));
+      yi2 = ADD32(yi2,SHL32(yi,1));
+      y[i] = EXTRACT16(SHR32(yi2,LPC_SHIFT));
+   }
+
+}
+
+
+void filter_mem2(const spx_sig_t *_x, const spx_coef_t *num, const spx_coef_t *den, spx_sig_t *_y, int N, int ord, spx_mem_t *mem)
+{
+   int i,j;
+   spx_word16_t xi,yi,nyi;
+   spx_word16_t x[N],y[N];
+   spx_word16_t *xx, *yy;
+   xx = x;
+   yy = y;
+   for (i=0;i<N;i++)
+   {
+      x[i] = EXTRACT16(SHR32(_x[i],SIG_SHIFT));
+   }
+   
+   for (i=0;i<ord;i++)
+   {
+      spx_word32_t yi = mem[i];
+      for (j=0;j<i;j++)
+      {
+         yi = MAC16_16(yi, num[j], x[i-j-1]);
+         yi = MAC16_16(yi, den[j], -y[i-j-1]);
+      }
+      _y[i] = ADD32(_x[i],SHL32(yi,1));
+      y[i] = EXTRACT16(SHR32(_y[i],SIG_SHIFT));
+   }
+   for (i=ord;i<N;i++)
+   {
+      spx_word32_t yi = 0;
+      for (j=0;j<ord;j++)
+      {
+         yi = MAC16_16(yi, num[j], x[i-j-1]);
+         yi = MAC16_16(yi, den[j], -y[i-j-1]);
+      }
+      _y[i] = ADD32(_x[i],SHL32(yi,1));
+      y[i] = EXTRACT16(SHR32(_y[i],SIG_SHIFT));
+   }
+
+   for (i=0;i<ord;i++)
+   {
+      spx_mem_t m = 0;
+      for (j=0;j<ord-i;j++)
+      {
+         m = MAC16_16(m, x[N-1-j], num[j+i]);
+         m = MAC16_16(m, -y[N-1-j], den[j+i]);
+      }
+      mem[i] = m;
+   }
+}
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters_sse.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters_sse.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/filters_sse.h	(revision 1163)
@@ -0,0 +1,336 @@
+/* Copyright (C) 2002 Jean-Marc Valin */
+/**
+   @file filters_sse.h
+   @brief Various analysis/synthesis filters (SSE version)
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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 <xmmintrin.h>
+
+void filter_mem2_10(const float *x, const float *_num, const float *_den, float *y, int N, int ord, float *_mem)
+{
+   __m128 num[3], den[3], mem[3];
+
+   int i;
+
+   /* Copy numerator, denominator and memory to aligned xmm */
+   for (i=0;i<2;i++)
+   {
+      mem[i] = _mm_loadu_ps(_mem+4*i);
+      num[i] = _mm_loadu_ps(_num+4*i);
+      den[i] = _mm_loadu_ps(_den+4*i);
+   }
+   mem[2] = _mm_setr_ps(_mem[8], _mem[9], 0, 0);
+   num[2] = _mm_setr_ps(_num[8], _num[9], 0, 0);
+   den[2] = _mm_setr_ps(_den[8], _den[9], 0, 0);
+   
+   for (i=0;i<N;i++)
+   {
+      __m128 xx;
+      __m128 yy;
+      /* Compute next filter result */
+      xx = _mm_load_ps1(x+i);
+      yy = _mm_add_ss(xx, mem[0]);
+      _mm_store_ss(y+i, yy);
+      yy = _mm_shuffle_ps(yy, yy, 0);
+      
+      /* Update memory */
+      mem[0] = _mm_move_ss(mem[0], mem[1]);
+      mem[0] = _mm_shuffle_ps(mem[0], mem[0], 0x39);
+
+      mem[0] = _mm_add_ps(mem[0], _mm_mul_ps(xx, num[0]));
+      mem[0] = _mm_sub_ps(mem[0], _mm_mul_ps(yy, den[0]));
+
+      mem[1] = _mm_move_ss(mem[1], mem[2]);
+      mem[1] = _mm_shuffle_ps(mem[1], mem[1], 0x39);
+
+      mem[1] = _mm_add_ps(mem[1], _mm_mul_ps(xx, num[1]));
+      mem[1] = _mm_sub_ps(mem[1], _mm_mul_ps(yy, den[1]));
+
+      mem[2] = _mm_shuffle_ps(mem[2], mem[2], 0xfd);
+
+      mem[2] = _mm_add_ps(mem[2], _mm_mul_ps(xx, num[2]));
+      mem[2] = _mm_sub_ps(mem[2], _mm_mul_ps(yy, den[2]));
+   }
+   /* Put memory back in its place */
+   _mm_storeu_ps(_mem, mem[0]);
+   _mm_storeu_ps(_mem+4, mem[1]);
+   _mm_store_ss(_mem+8, mem[2]);
+   mem[2] = _mm_shuffle_ps(mem[2], mem[2], 0x55);
+   _mm_store_ss(_mem+9, mem[2]);
+}
+
+void filter_mem2_8(const float *x, const float *_num, const float *_den, float *y, int N, int ord, float *_mem)
+{
+   __m128 num[2], den[2], mem[2];
+
+   int i;
+
+   /* Copy numerator, denominator and memory to aligned xmm */
+   for (i=0;i<2;i++)
+   {
+      mem[i] = _mm_loadu_ps(_mem+4*i);
+      num[i] = _mm_loadu_ps(_num+4*i);
+      den[i] = _mm_loadu_ps(_den+4*i);
+   }
+   
+   for (i=0;i<N;i++)
+   {
+      __m128 xx;
+      __m128 yy;
+      /* Compute next filter result */
+      xx = _mm_load_ps1(x+i);
+      yy = _mm_add_ss(xx, mem[0]);
+      _mm_store_ss(y+i, yy);
+      yy = _mm_shuffle_ps(yy, yy, 0);
+      
+      /* Update memory */
+      mem[0] = _mm_move_ss(mem[0], mem[1]);
+      mem[0] = _mm_shuffle_ps(mem[0], mem[0], 0x39);
+
+      mem[0] = _mm_add_ps(mem[0], _mm_mul_ps(xx, num[0]));
+      mem[0] = _mm_sub_ps(mem[0], _mm_mul_ps(yy, den[0]));
+
+      mem[1] = _mm_sub_ss(mem[1], mem[1]);
+      mem[1] = _mm_shuffle_ps(mem[1], mem[1], 0x39);
+
+      mem[1] = _mm_add_ps(mem[1], _mm_mul_ps(xx, num[1]));
+      mem[1] = _mm_sub_ps(mem[1], _mm_mul_ps(yy, den[1]));
+   }
+   /* Put memory back in its place */
+   _mm_storeu_ps(_mem, mem[0]);
+   _mm_storeu_ps(_mem+4, mem[1]);
+}
+
+
+#define OVERRIDE_FILTER_MEM2
+void filter_mem2(const float *x, const float *_num, const float *_den, float *y, int N, int ord, float *_mem)
+{
+   if(ord==10)
+      filter_mem2_10(x, _num, _den, y, N, ord, _mem);
+   else if (ord==8)
+      filter_mem2_8(x, _num, _den, y, N, ord, _mem);
+}
+
+
+
+void iir_mem2_10(const float *x, const float *_den, float *y, int N, int ord, float *_mem)
+{
+   __m128 den[3], mem[3];
+
+   int i;
+
+   /* Copy numerator, denominator and memory to aligned xmm */
+   for (i=0;i<2;i++)
+   {
+      mem[i] = _mm_loadu_ps(_mem+4*i);
+      den[i] = _mm_loadu_ps(_den+4*i);
+   }
+   mem[2] = _mm_setr_ps(_mem[8], _mem[9], 0, 0);
+   den[2] = _mm_setr_ps(_den[8], _den[9], 0, 0);
+   
+   for (i=0;i<N;i++)
+   {
+      __m128 xx;
+      __m128 yy;
+      /* Compute next filter result */
+      xx = _mm_load_ps1(x+i);
+      yy = _mm_add_ss(xx, mem[0]);
+      _mm_store_ss(y+i, yy);
+      yy = _mm_shuffle_ps(yy, yy, 0);
+      
+      /* Update memory */
+      mem[0] = _mm_move_ss(mem[0], mem[1]);
+      mem[0] = _mm_shuffle_ps(mem[0], mem[0], 0x39);
+
+      mem[0] = _mm_sub_ps(mem[0], _mm_mul_ps(yy, den[0]));
+
+      mem[1] = _mm_move_ss(mem[1], mem[2]);
+      mem[1] = _mm_shuffle_ps(mem[1], mem[1], 0x39);
+
+      mem[1] = _mm_sub_ps(mem[1], _mm_mul_ps(yy, den[1]));
+
+      mem[2] = _mm_shuffle_ps(mem[2], mem[2], 0xfd);
+
+      mem[2] = _mm_sub_ps(mem[2], _mm_mul_ps(yy, den[2]));
+   }
+   /* Put memory back in its place */
+   _mm_storeu_ps(_mem, mem[0]);
+   _mm_storeu_ps(_mem+4, mem[1]);
+   _mm_store_ss(_mem+8, mem[2]);
+   mem[2] = _mm_shuffle_ps(mem[2], mem[2], 0x55);
+   _mm_store_ss(_mem+9, mem[2]);
+}
+
+
+void iir_mem2_8(const float *x, const float *_den, float *y, int N, int ord, float *_mem)
+{
+   __m128 den[2], mem[2];
+
+   int i;
+
+   /* Copy numerator, denominator and memory to aligned xmm */
+   for (i=0;i<2;i++)
+   {
+      mem[i] = _mm_loadu_ps(_mem+4*i);
+      den[i] = _mm_loadu_ps(_den+4*i);
+   }
+   
+   for (i=0;i<N;i++)
+   {
+      __m128 xx;
+      __m128 yy;
+      /* Compute next filter result */
+      xx = _mm_load_ps1(x+i);
+      yy = _mm_add_ss(xx, mem[0]);
+      _mm_store_ss(y+i, yy);
+      yy = _mm_shuffle_ps(yy, yy, 0);
+      
+      /* Update memory */
+      mem[0] = _mm_move_ss(mem[0], mem[1]);
+      mem[0] = _mm_shuffle_ps(mem[0], mem[0], 0x39);
+
+      mem[0] = _mm_sub_ps(mem[0], _mm_mul_ps(yy, den[0]));
+
+      mem[1] = _mm_sub_ss(mem[1], mem[1]);
+      mem[1] = _mm_shuffle_ps(mem[1], mem[1], 0x39);
+
+      mem[1] = _mm_sub_ps(mem[1], _mm_mul_ps(yy, den[1]));
+   }
+   /* Put memory back in its place */
+   _mm_storeu_ps(_mem, mem[0]);
+   _mm_storeu_ps(_mem+4, mem[1]);
+}
+
+#define OVERRIDE_IIR_MEM2
+void iir_mem2(const float *x, const float *_den, float *y, int N, int ord, float *_mem)
+{
+   if(ord==10)
+      iir_mem2_10(x, _den, y, N, ord, _mem);
+   else if (ord==8)
+      iir_mem2_8(x, _den, y, N, ord, _mem);
+}
+
+
+void fir_mem2_10(const float *x, const float *_num, float *y, int N, int ord, float *_mem)
+{
+   __m128 num[3], mem[3];
+
+   int i;
+
+   /* Copy numerator, denominator and memory to aligned xmm */
+   for (i=0;i<2;i++)
+   {
+      mem[i] = _mm_loadu_ps(_mem+4*i);
+      num[i] = _mm_loadu_ps(_num+4*i);
+   }
+   mem[2] = _mm_setr_ps(_mem[8], _mem[9], 0, 0);
+   num[2] = _mm_setr_ps(_num[8], _num[9], 0, 0);
+   
+   for (i=0;i<N;i++)
+   {
+      __m128 xx;
+      __m128 yy;
+      /* Compute next filter result */
+      xx = _mm_load_ps1(x+i);
+      yy = _mm_add_ss(xx, mem[0]);
+      _mm_store_ss(y+i, yy);
+      yy = _mm_shuffle_ps(yy, yy, 0);
+      
+      /* Update memory */
+      mem[0] = _mm_move_ss(mem[0], mem[1]);
+      mem[0] = _mm_shuffle_ps(mem[0], mem[0], 0x39);
+
+      mem[0] = _mm_add_ps(mem[0], _mm_mul_ps(xx, num[0]));
+
+      mem[1] = _mm_move_ss(mem[1], mem[2]);
+      mem[1] = _mm_shuffle_ps(mem[1], mem[1], 0x39);
+
+      mem[1] = _mm_add_ps(mem[1], _mm_mul_ps(xx, num[1]));
+
+      mem[2] = _mm_shuffle_ps(mem[2], mem[2], 0xfd);
+
+      mem[2] = _mm_add_ps(mem[2], _mm_mul_ps(xx, num[2]));
+   }
+   /* Put memory back in its place */
+   _mm_storeu_ps(_mem, mem[0]);
+   _mm_storeu_ps(_mem+4, mem[1]);
+   _mm_store_ss(_mem+8, mem[2]);
+   mem[2] = _mm_shuffle_ps(mem[2], mem[2], 0x55);
+   _mm_store_ss(_mem+9, mem[2]);
+}
+
+void fir_mem2_8(const float *x, const float *_num, float *y, int N, int ord, float *_mem)
+{
+   __m128 num[2], mem[2];
+
+   int i;
+
+   /* Copy numerator, denominator and memory to aligned xmm */
+   for (i=0;i<2;i++)
+   {
+      mem[i] = _mm_loadu_ps(_mem+4*i);
+      num[i] = _mm_loadu_ps(_num+4*i);
+   }
+   
+   for (i=0;i<N;i++)
+   {
+      __m128 xx;
+      __m128 yy;
+      /* Compute next filter result */
+      xx = _mm_load_ps1(x+i);
+      yy = _mm_add_ss(xx, mem[0]);
+      _mm_store_ss(y+i, yy);
+      yy = _mm_shuffle_ps(yy, yy, 0);
+      
+      /* Update memory */
+      mem[0] = _mm_move_ss(mem[0], mem[1]);
+      mem[0] = _mm_shuffle_ps(mem[0], mem[0], 0x39);
+
+      mem[0] = _mm_add_ps(mem[0], _mm_mul_ps(xx, num[0]));
+
+      mem[1] = _mm_sub_ss(mem[1], mem[1]);
+      mem[1] = _mm_shuffle_ps(mem[1], mem[1], 0x39);
+
+      mem[1] = _mm_add_ps(mem[1], _mm_mul_ps(xx, num[1]));
+   }
+   /* Put memory back in its place */
+   _mm_storeu_ps(_mem, mem[0]);
+   _mm_storeu_ps(_mem+4, mem[1]);
+}
+
+#define OVERRIDE_FIR_MEM2
+void fir_mem2(const float *x, const float *_num, float *y, int N, int ord, float *_mem)
+{
+   if(ord==10)
+      fir_mem2_10(x, _num, y, N, ord, _mem);
+   else if (ord==8)
+      fir_mem2_8(x, _num, y, N, ord, _mem);
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_arm4.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_arm4.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_arm4.h	(revision 1163)
@@ -0,0 +1,148 @@
+/* Copyright (C) 2004 Jean-Marc Valin */
+/**
+   @file fixed_arm4.h
+   @brief ARM4 fixed-point operations
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef FIXED_ARM4_H
+#define FIXED_ARM4_H
+
+#undef MULT16_32_Q14
+static inline spx_word32_t MULT16_32_Q14(spx_word16_t x, spx_word32_t y) {
+  int res;
+  int dummy;
+  asm (
+        "smull  %0,%1,%2,%3 \n\t"
+        "mov %0, %0, lsr #14 \n\t"
+        "add %0, %0, %1, lsl #18 \n\t"
+   : "=&r"(res), "=&r" (dummy)
+   : "r"(y),"r"((int)x));
+  return(res);
+}
+
+#undef MULT16_32_Q15
+static inline spx_word32_t MULT16_32_Q15(spx_word16_t x, spx_word32_t y) {
+  int res;
+  int dummy;
+  asm (
+        "smull  %0,%1,%2,%3 \n\t"
+        "mov %0, %0, lsr #15 \n\t"
+        "add %0, %0, %1, lsl #17 \n\t"
+   : "=&r"(res), "=&r" (dummy)
+   : "r"(y),"r"((int)x));
+  return(res);
+}
+
+#undef DIV32_16
+static inline short DIV32_16(int a, int b)
+{
+   int res=0;
+   int dead1, dead2, dead3, dead4, dead5;
+   __asm__ __volatile__ (
+         "\teor %5, %0, %1\n"
+         "\tmovs %4, %0\n"
+         "\trsbmi %0, %0, #0 \n"
+         "\tmovs %4, %1\n"
+         "\trsbmi %1, %1, #0 \n"
+         "\tmov %4, #1\n"
+
+         "\tsubs %3, %0, %1, asl #14 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4, asl #14 \n"
+
+         "\tsubs %3, %0, %1, asl #13 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4, asl #13 \n"
+
+         "\tsubs %3, %0, %1, asl #12 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4, asl #12 \n"
+
+         "\tsubs %3, %0, %1, asl #11 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4, asl #11 \n"
+
+         "\tsubs %3, %0, %1, asl #10 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4, asl #10 \n"
+
+         "\tsubs %3, %0, %1, asl #9 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4, asl #9 \n"
+
+         "\tsubs %3, %0, %1, asl #8 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4, asl #8 \n"
+
+         "\tsubs %3, %0, %1, asl #7 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4, asl #7 \n"
+
+         "\tsubs %3, %0, %1, asl #6 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4, asl #6 \n"
+         
+         "\tsubs %3, %0, %1, asl #5 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4, asl #5 \n"
+
+         "\tsubs %3, %0, %1, asl #4 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4, asl #4 \n"
+
+         "\tsubs %3, %0, %1, asl #3 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4, asl #3 \n"
+
+         "\tsubs %3, %0, %1, asl #2 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4, asl #2 \n"
+
+         "\tsubs %3, %0, %1, asl #1 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4, asl #1 \n"
+
+         "\tsubs %3, %0, %1 \n"
+         "\tmovpl %0, %3 \n"
+         "\torrpl %2, %2, %4 \n"
+
+         "\tmovs %5, %5, lsr #31 \n"
+         "\trsbne %2, %2, #0 \n"
+   : "=r" (dead1), "=r" (dead2), "=r" (res),
+   "=r" (dead3), "=r" (dead4), "=r" (dead5)
+   : "0" (a), "1" (b), "2" (res)
+   : "cc"
+                        );
+   return res;
+}
+
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_arm5e.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_arm5e.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_arm5e.h	(revision 1163)
@@ -0,0 +1,178 @@
+/* Copyright (C) 2003 Jean-Marc Valin */
+/**
+   @file fixed_arm5e.h
+   @brief ARM-tuned fixed-point operations
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef FIXED_ARM5E_H
+#define FIXED_ARM5E_H
+
+#undef MULT16_16
+static inline spx_word32_t MULT16_16(spx_word16_t x, spx_word16_t y) {
+  int res;
+  asm ("smulbb  %0,%1,%2;\n"
+              : "=&r"(res)
+              : "%r"(x),"r"(y));
+  return(res);
+}
+
+#undef MAC16_16
+static inline spx_word32_t MAC16_16(spx_word32_t a, spx_word16_t x, spx_word32_t y) {
+  int res;
+  asm ("smlabb  %0,%1,%2,%3;\n"
+              : "=&r"(res)
+               : "%r"(x),"r"(y),"r"(a));
+  return(res);
+}
+
+#undef MULT16_32_Q15
+static inline spx_word32_t MULT16_32_Q15(spx_word16_t x, spx_word32_t y) {
+  int res;
+  asm ("smulwb  %0,%1,%2;\n"
+              : "=&r"(res)
+               : "%r"(y<<1),"r"(x));
+  return(res);
+}
+
+#undef MAC16_32_Q15
+static inline spx_word32_t MAC16_32_Q15(spx_word32_t a, spx_word16_t x, spx_word32_t y) {
+  int res;
+  asm ("smlawb  %0,%1,%2,%3;\n"
+              : "=&r"(res)
+               : "%r"(y<<1),"r"(x),"r"(a));
+  return(res);
+}
+
+#undef MULT16_32_Q11
+static inline spx_word32_t MULT16_32_Q11(spx_word16_t x, spx_word32_t y) {
+  int res;
+  asm ("smulwb  %0,%1,%2;\n"
+              : "=&r"(res)
+               : "%r"(y<<5),"r"(x));
+  return(res);
+}
+
+#undef MAC16_32_Q11
+static inline spx_word32_t MAC16_32_Q11(spx_word32_t a, spx_word16_t x, spx_word32_t y) {
+  int res;
+  asm ("smlawb  %0,%1,%2,%3;\n"
+              : "=&r"(res)
+               : "%r"(y<<5),"r"(x),"r"(a));
+  return(res);
+}
+
+#undef DIV32_16
+static inline short DIV32_16(int a, int b)
+{
+   int res=0;
+   int dead1, dead2, dead3, dead4, dead5;
+   __asm__ __volatile__ (
+         "\teor %5, %0, %1\n"
+         "\tmovs %4, %0\n"
+         "\trsbmi %0, %0, #0 \n"
+         "\tmovs %4, %1\n"
+         "\trsbmi %1, %1, #0 \n"
+         "\tmov %4, #1\n"
+
+         "\tsubs %3, %0, %1, asl #14 \n"
+         "\torrpl %2, %2, %4, asl #14 \n"
+         "\tmovpl %0, %3 \n"
+
+         "\tsubs %3, %0, %1, asl #13 \n"
+         "\torrpl %2, %2, %4, asl #13 \n"
+         "\tmovpl %0, %3 \n"
+
+         "\tsubs %3, %0, %1, asl #12 \n"
+         "\torrpl %2, %2, %4, asl #12 \n"
+         "\tmovpl %0, %3 \n"
+
+         "\tsubs %3, %0, %1, asl #11 \n"
+         "\torrpl %2, %2, %4, asl #11 \n"
+         "\tmovpl %0, %3 \n"
+
+         "\tsubs %3, %0, %1, asl #10 \n"
+         "\torrpl %2, %2, %4, asl #10 \n"
+         "\tmovpl %0, %3 \n"
+
+         "\tsubs %3, %0, %1, asl #9 \n"
+         "\torrpl %2, %2, %4, asl #9 \n"
+         "\tmovpl %0, %3 \n"
+
+         "\tsubs %3, %0, %1, asl #8 \n"
+         "\torrpl %2, %2, %4, asl #8 \n"
+         "\tmovpl %0, %3 \n"
+
+         "\tsubs %3, %0, %1, asl #7 \n"
+         "\torrpl %2, %2, %4, asl #7 \n"
+         "\tmovpl %0, %3 \n"
+
+         "\tsubs %3, %0, %1, asl #6 \n"
+         "\torrpl %2, %2, %4, asl #6 \n"
+         "\tmovpl %0, %3 \n"
+
+         "\tsubs %3, %0, %1, asl #5 \n"
+         "\torrpl %2, %2, %4, asl #5 \n"
+         "\tmovpl %0, %3 \n"
+
+         "\tsubs %3, %0, %1, asl #4 \n"
+         "\torrpl %2, %2, %4, asl #4 \n"
+         "\tmovpl %0, %3 \n"
+
+         "\tsubs %3, %0, %1, asl #3 \n"
+         "\torrpl %2, %2, %4, asl #3 \n"
+         "\tmovpl %0, %3 \n"
+
+         "\tsubs %3, %0, %1, asl #2 \n"
+         "\torrpl %2, %2, %4, asl #2 \n"
+         "\tmovpl %0, %3 \n"
+
+         "\tsubs %3, %0, %1, asl #1 \n"
+         "\torrpl %2, %2, %4, asl #1 \n"
+         "\tmovpl %0, %3 \n"
+
+         "\tsubs %3, %0, %1 \n"
+         "\torrpl %2, %2, %4 \n"
+         "\tmovpl %0, %3 \n"
+         
+         "\tmovs %5, %5, lsr #31 \n"
+         "\trsbne %2, %2, #0 \n"
+   : "=r" (dead1), "=r" (dead2), "=r" (res),
+   "=r" (dead3), "=r" (dead4), "=r" (dead5)
+   : "0" (a), "1" (b), "2" (res)
+   : "memory", "cc"
+                        );
+   return res;
+}
+
+
+
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_bfin.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_bfin.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_bfin.h	(revision 1163)
@@ -0,0 +1,173 @@
+/* Copyright (C) 2005 Analog Devices
+   Author: Jean-Marc Valin */
+/**
+   @file fixed_bfin.h
+   @brief Blackfin fixed-point operations
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef FIXED_BFIN_H
+#define FIXED_BFIN_H
+
+#undef PDIV32_16
+static inline spx_word16_t PDIV32_16(spx_word32_t a, spx_word16_t b)
+{
+   spx_word32_t res, bb;
+   bb = b;
+   a += b>>1;
+   __asm__  (
+         "P0 = 15;\n\t"
+         "R0 = %1;\n\t"
+         "R1 = %2;\n\t"
+         //"R0 = R0 + R1;\n\t"
+         "R0 <<= 1;\n\t"
+         "DIVS (R0, R1);\n\t"
+         "LOOP divide%= LC0 = P0;\n\t"
+         "LOOP_BEGIN divide%=;\n\t"
+            "DIVQ (R0, R1);\n\t"
+         "LOOP_END divide%=;\n\t"
+         "R0 = R0.L;\n\t"
+         "%0 = R0;\n\t"
+   : "=m" (res)
+   : "m" (a), "m" (bb)
+   : "P0", "R0", "R1", "cc");
+   return res;
+}
+
+#undef DIV32_16
+static inline spx_word16_t DIV32_16(spx_word32_t a, spx_word16_t b)
+{
+   spx_word32_t res, bb;
+   bb = b;
+   /* Make the roundinf consistent with the C version 
+      (do we need to do that?)*/
+   if (a<0) 
+      a += (b-1);
+   __asm__  (
+         "P0 = 15;\n\t"
+         "R0 = %1;\n\t"
+         "R1 = %2;\n\t"
+         "R0 <<= 1;\n\t"
+         "DIVS (R0, R1);\n\t"
+         "LOOP divide%= LC0 = P0;\n\t"
+         "LOOP_BEGIN divide%=;\n\t"
+            "DIVQ (R0, R1);\n\t"
+         "LOOP_END divide%=;\n\t"
+         "R0 = R0.L;\n\t"
+         "%0 = R0;\n\t"
+   : "=m" (res)
+   : "m" (a), "m" (bb)
+   : "P0", "R0", "R1", "cc");
+   return res;
+}
+
+#undef MAX16
+static inline spx_word16_t MAX16(spx_word16_t a, spx_word16_t b)
+{
+   spx_word32_t res;
+   __asm__  (
+         "%1 = %1.L (X);\n\t"
+         "%2 = %2.L (X);\n\t"
+         "%0 = MAX(%1,%2);"
+   : "=d" (res)
+   : "%d" (a), "d" (b)
+   );
+   return res;
+}
+
+#undef MULT16_32_Q15
+static inline spx_word32_t MULT16_32_Q15(spx_word16_t a, spx_word32_t b)
+{
+   spx_word32_t res;
+   __asm__
+   (
+         "A1 = %2.L*%1.L (M);\n\t"
+         "A1 = A1 >>> 15;\n\t"
+         "%0 = (A1 += %2.L*%1.H) ;\n\t"
+   : "=&W" (res), "=&d" (b)
+   : "d" (a), "1" (b)
+   : "A1"
+   );
+   return res;
+}
+
+#undef MAC16_32_Q15
+static inline spx_word32_t MAC16_32_Q15(spx_word32_t c, spx_word16_t a, spx_word32_t b)
+{
+   spx_word32_t res;
+   __asm__
+         (
+         "A1 = %2.L*%1.L (M);\n\t"
+         "A1 = A1 >>> 15;\n\t"
+         "%0 = (A1 += %2.L*%1.H);\n\t"
+         "%0 = %0 + %4;\n\t"
+   : "=&W" (res), "=&d" (b)
+   : "d" (a), "1" (b), "d" (c)
+   : "A1"
+         );
+   return res;
+}
+
+#undef MULT16_32_Q14
+static inline spx_word32_t MULT16_32_Q14(spx_word16_t a, spx_word32_t b)
+{
+   spx_word32_t res;
+   __asm__
+         (
+         "%2 <<= 1;\n\t"
+         "A1 = %1.L*%2.L (M);\n\t"
+         "A1 = A1 >>> 15;\n\t"
+         "%0 = (A1 += %1.L*%2.H);\n\t"
+   : "=W" (res), "=d" (a), "=d" (b)
+   : "1" (a), "2" (b)
+   : "A1"
+         );
+   return res;
+}
+
+#undef MAC16_32_Q14
+static inline spx_word32_t MAC16_32_Q14(spx_word32_t c, spx_word16_t a, spx_word32_t b)
+{
+   spx_word32_t res;
+   __asm__
+         (
+         "%1 <<= 1;\n\t"
+         "A1 = %2.L*%1.L (M);\n\t"
+         "A1 = A1 >>> 15;\n\t"
+         "%0 = (A1 += %2.L*%1.H);\n\t"
+         "%0 = %0 + %4;\n\t"
+   : "=&W" (res), "=&d" (b)
+   : "d" (a), "1" (b), "d" (c)
+   : "A1"
+         );
+   return res;
+}
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_debug.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_debug.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_debug.h	(revision 1163)
@@ -0,0 +1,475 @@
+/* Copyright (C) 2003 Jean-Marc Valin */
+/**
+   @file fixed_debug.h
+   @brief Fixed-point operations with debugging
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef FIXED_DEBUG_H
+#define FIXED_DEBUG_H
+
+#include <stdio.h>
+
+extern long long spx_mips;
+#define MIPS_INC spx_mips++,
+
+#define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
+#define QCONST32(x,bits) ((spx_word32_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
+
+
+#define VERIFY_SHORT(x) ((x)<=32767&&(x)>=-32768)
+#define VERIFY_INT(x) ((x)<=2147483647LL&&(x)>=-2147483648LL)
+
+static inline short NEG16(int x)
+{
+   int res;
+   if (!VERIFY_SHORT(x))
+   {
+      fprintf (stderr, "NEG16: input is not short: %d\n", (int)x);
+   }
+   res = -x;
+   if (!VERIFY_SHORT(res))
+      fprintf (stderr, "NEG16: output is not short: %d\n", (int)res);
+   spx_mips++;
+   return res;
+}
+static inline int NEG32(long long x)
+{
+   long long res;
+   if (!VERIFY_INT(x))
+   {
+      fprintf (stderr, "NEG16: input is not int: %d\n", (int)x);
+   }
+   res = -x;
+   if (!VERIFY_INT(res))
+      fprintf (stderr, "NEG16: output is not int: %d\n", (int)res);
+   spx_mips++;
+   return res;
+}
+
+static inline short EXTRACT16(int x)
+{
+   int res;
+   if (!VERIFY_SHORT(x))
+   {
+      fprintf (stderr, "EXTRACT16: input is not short: %d\n", x);
+   }
+   res = x;
+   spx_mips++;
+   return res;
+}
+
+static inline int EXTEND32(int x)
+{
+   int res;
+   if (!VERIFY_SHORT(x))
+   {
+      fprintf (stderr, "EXTEND32: input is not short: %d\n", x);
+   }
+   res = x;
+   spx_mips++;
+   return res;
+}
+
+static inline short SHR16(int a, int shift) 
+{
+   int res;
+   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
+   {
+      fprintf (stderr, "SHR16: inputs are not short: %d %d\n", a, shift);
+   }
+   res = a>>shift;
+   if (!VERIFY_SHORT(res))
+      fprintf (stderr, "SHR16: output is not short: %d\n", res);
+   spx_mips++;
+   return res;
+}
+static inline short SHL16(int a, int shift) 
+{
+   int res;
+   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
+   {
+      fprintf (stderr, "SHL16: inputs are not short: %d %d\n", a, shift);
+   }
+   res = a<<shift;
+   if (!VERIFY_SHORT(res))
+      fprintf (stderr, "SHL16: output is not short: %d\n", res);
+   spx_mips++;
+   return res;
+}
+
+static inline int SHR32(long long a, int shift) 
+{
+   long long  res;
+   if (!VERIFY_INT(a) || !VERIFY_SHORT(shift))
+   {
+      fprintf (stderr, "SHR32: inputs are not int: %d %d\n", (int)a, shift);
+   }
+   res = a>>shift;
+   if (!VERIFY_INT(res))
+   {
+      fprintf (stderr, "SHR32: output is not int: %d\n", (int)res);
+   }
+   spx_mips++;
+   return res;
+}
+static inline int SHL32(long long a, int shift) 
+{
+   long long  res;
+   if (!VERIFY_INT(a) || !VERIFY_SHORT(shift))
+   {
+      fprintf (stderr, "SHL32: inputs are not int: %d %d\n", (int)a, shift);
+   }
+   res = a<<shift;
+   if (!VERIFY_INT(res))
+   {
+      fprintf (stderr, "SHL32: output is not int: %d\n", (int)res);
+   }
+   spx_mips++;
+   return res;
+}
+
+#define PSHR16(a,shift) (SHR16((a)+((1<<((shift))>>1)),shift))
+#define PSHR32(a,shift) (SHR32((a)+((1<<((shift))>>1)),shift))
+#define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift)))
+
+#define SATURATE16(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
+#define SATURATE32(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
+
+#define SHR(a,shift) ((a) >> (shift))
+#define SHL(a,shift) ((a) << (shift))
+
+static inline short ADD16(int a, int b) 
+{
+   int res;
+   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
+   {
+      fprintf (stderr, "ADD16: inputs are not short: %d %d\n", a, b);
+   }
+   res = a+b;
+   if (!VERIFY_SHORT(res))
+   {
+     fprintf (stderr, "ADD16: output is not short: %d+%d=%d\n", a,b,res);
+   }
+   spx_mips++;
+   return res;
+}
+static inline short SUB16(int a, int b) 
+{
+   int res;
+   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
+   {
+      fprintf (stderr, "SUB16: inputs are not short: %d %d\n", a, b);
+   }
+   res = a-b;
+   if (!VERIFY_SHORT(res))
+      fprintf (stderr, "SUB16: output is not short: %d\n", res);
+   spx_mips++;
+   return res;
+}
+
+static inline int ADD32(long long a, long long b) 
+{
+   long long res;
+   if (!VERIFY_INT(a) || !VERIFY_INT(b))
+   {
+      fprintf (stderr, "ADD32: inputs are not int: %d %d\n", (int)a, (int)b);
+   }
+   res = a+b;
+   if (!VERIFY_INT(res))
+   {
+      fprintf (stderr, "ADD32: output is not int: %d\n", (int)res);
+   }
+   spx_mips++;
+   return res;
+}
+
+static inline int SUB32(long long a, long long b) 
+{
+   long long res;
+   if (!VERIFY_INT(a) || !VERIFY_INT(b))
+   {
+      fprintf (stderr, "SUB32: inputs are not int: %d %d\n", (int)a, (int)b);
+   }
+   res = a-b;
+   if (!VERIFY_INT(res))
+      fprintf (stderr, "SUB32: output is not int: %d\n", (int)res);
+   spx_mips++;
+   return res;
+}
+
+#define ADD64(a,b) (MIPS_INC(a)+(b))
+
+#define PSHR(a,shift) (SHR((a)+((1<<((shift))>>1)),shift))
+/* result fits in 16 bits */
+static inline short MULT16_16_16(int a, int b) 
+{
+   int res;
+   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
+   {
+      fprintf (stderr, "MULT16_16_16: inputs are not short: %d %d\n", a, b);
+   }
+   res = a*b;
+   if (!VERIFY_SHORT(res))
+      fprintf (stderr, "MULT16_16_16: output is not short: %d\n", res);
+   spx_mips++;
+   return res;
+}
+
+static inline int MULT16_16(int a, int b) 
+{
+   long long res;
+   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
+   {
+      fprintf (stderr, "MULT16_16: inputs are not short: %d %d\n", a, b);
+   }
+   res = ((long long)a)*b;
+   if (!VERIFY_INT(res))
+      fprintf (stderr, "MULT16_16: output is not int: %d\n", (int)res);
+   spx_mips++;
+   return res;
+}
+
+#define MAC16_16(c,a,b)     (spx_mips--,ADD32((c),MULT16_16((a),(b))))
+#define MAC16_16_Q11(c,a,b)     (ADD16((c),EXTRACT16(SHR32(MULT16_16((a),(b)),11))))
+#define MAC16_16_Q13(c,a,b)     (ADD16((c),EXTRACT16(SHR32(MULT16_16((a),(b)),13))))
+#define MAC16_16_P13(c,a,b)     (ADD32((c),SHR(ADD32(4096,MULT16_16((a),(b))),13)))
+
+
+static inline int MULT16_32_QX(int a, long long b, int Q)
+{
+   long long res;
+   if (!VERIFY_SHORT(a) || !VERIFY_INT(b))
+   {
+      fprintf (stderr, "MULT16_32_Q%d: inputs are not short+int: %d %d\n", Q, (int)a, (int)b);
+   }
+   if (ABS32(b)>=(1<<(15+Q)))
+      fprintf (stderr, "MULT16_32_Q%d: second operand too large: %d %d\n", Q, (int)a, (int)b);      
+   res = (((long long)a)*(long long)b) >> Q;
+   if (!VERIFY_INT(res))
+      fprintf (stderr, "MULT16_32_Q%d: output is not int: %d*%d=%d\n", Q, (int)a, (int)b,(int)res);
+   spx_mips+=5;
+   return res;
+}
+
+static inline int MULT16_32_PX(int a, long long b, int Q)
+{
+   long long res;
+   if (!VERIFY_SHORT(a) || !VERIFY_INT(b))
+   {
+      fprintf (stderr, "MULT16_32_P%d: inputs are not short+int: %d %d\n", Q, (int)a, (int)b);
+   }
+   if (ABS32(b)>=(1<<(15+Q)))
+      fprintf (stderr, "MULT16_32_Q%d: second operand too large: %d %d\n", Q, (int)a, (int)b);      
+   res = ((((long long)a)*(long long)b) + ((1<<Q)>>1))>> Q;
+   if (!VERIFY_INT(res))
+      fprintf (stderr, "MULT16_32_P%d: output is not int: %d*%d=%d\n", Q, (int)a, (int)b,(int)res);
+   spx_mips+=5;
+   return res;
+}
+
+
+#define MULT16_32_Q11(a,b) MULT16_32_QX(a,b,11)
+#define MAC16_32_Q11(c,a,b) ADD32((c),MULT16_32_Q11((a),(b)))
+#define MULT16_32_Q12(a,b) MULT16_32_QX(a,b,12)
+#define MULT16_32_Q13(a,b) MULT16_32_QX(a,b,13)
+#define MULT16_32_Q14(a,b) MULT16_32_QX(a,b,14)
+#define MULT16_32_Q15(a,b) MULT16_32_QX(a,b,15)
+#define MULT16_32_P15(a,b) MULT16_32_PX(a,b,15)
+#define MAC16_32_Q15(c,a,b) ADD32((c),MULT16_32_Q15((a),(b)))
+
+static inline int SATURATE(int a, int b)
+{
+   if (a>b)
+      a=b;
+   if (a<-b)
+      a = -b;
+   return a;
+}
+
+static inline int MULT16_16_Q11_32(int a, int b) 
+{
+   long long res;
+   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
+   {
+      fprintf (stderr, "MULT16_16_Q11: inputs are not short: %d %d\n", a, b);
+   }
+   res = ((long long)a)*b;
+   res >>= 11;
+   if (!VERIFY_INT(res))
+      fprintf (stderr, "MULT16_16_Q11: output is not short: %d*%d=%d\n", (int)a, (int)b, (int)res);
+   spx_mips+=3;
+   return res;
+}
+static inline short MULT16_16_Q13(int a, int b) 
+{
+   long long res;
+   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
+   {
+      fprintf (stderr, "MULT16_16_Q13: inputs are not short: %d %d\n", a, b);
+   }
+   res = ((long long)a)*b;
+   res >>= 13;
+   if (!VERIFY_SHORT(res))
+      fprintf (stderr, "MULT16_16_Q13: output is not short: %d*%d=%d\n", a, b, (int)res);
+   spx_mips+=3;
+   return res;
+}
+static inline short MULT16_16_Q14(int a, int b) 
+{
+   long long res;
+   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
+   {
+      fprintf (stderr, "MULT16_16_Q14: inputs are not short: %d %d\n", a, b);
+   }
+   res = ((long long)a)*b;
+   res >>= 14;
+   if (!VERIFY_SHORT(res))
+      fprintf (stderr, "MULT16_16_Q14: output is not short: %d\n", (int)res);
+   spx_mips+=3;
+   return res;
+}
+static inline short MULT16_16_Q15(int a, int b) 
+{
+   long long res;
+   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
+   {
+      fprintf (stderr, "MULT16_16_Q15: inputs are not short: %d %d\n", a, b);
+   }
+   res = ((long long)a)*b;
+   res >>= 15;
+   if (!VERIFY_SHORT(res))
+   {
+      fprintf (stderr, "MULT16_16_Q15: output is not short: %d\n", (int)res);
+   }
+   spx_mips+=3;
+   return res;
+}
+
+static inline short MULT16_16_P13(int a, int b) 
+{
+   long long res;
+   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
+   {
+      fprintf (stderr, "MULT16_16_P13: inputs are not short: %d %d\n", a, b);
+   }
+   res = ((long long)a)*b;
+   res += 4096;
+   if (!VERIFY_INT(res))
+      fprintf (stderr, "MULT16_16_P13: overflow: %d*%d=%d\n", a, b, (int)res);
+   res >>= 13;
+   if (!VERIFY_SHORT(res))
+      fprintf (stderr, "MULT16_16_P13: output is not short: %d*%d=%d\n", a, b, (int)res);
+   spx_mips+=4;
+   return res;
+}
+static inline short MULT16_16_P14(int a, int b) 
+{
+   long long res;
+   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
+   {
+      fprintf (stderr, "MULT16_16_P14: inputs are not short: %d %d\n", a, b);
+   }
+   res = ((long long)a)*b;
+   res += 8192;
+   if (!VERIFY_INT(res))
+      fprintf (stderr, "MULT16_16_P14: overflow: %d*%d=%d\n", a, b, (int)res);
+   res >>= 14;
+   if (!VERIFY_SHORT(res))
+      fprintf (stderr, "MULT16_16_P14: output is not short: %d*%d=%d\n", a, b, (int)res);
+   spx_mips+=4;
+   return res;
+}
+static inline short MULT16_16_P15(int a, int b) 
+{
+   long long res;
+   if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
+   {
+      fprintf (stderr, "MULT16_16_P15: inputs are not short: %d %d\n", a, b);
+   }
+   res = ((long long)a)*b;
+   res += 16384;
+   if (!VERIFY_INT(res))
+      fprintf (stderr, "MULT16_16_P15: overflow: %d*%d=%d\n", a, b, (int)res);
+   res >>= 15;
+   if (!VERIFY_SHORT(res))
+      fprintf (stderr, "MULT16_16_P15: output is not short: %d*%d=%d\n", a, b, (int)res);
+   spx_mips+=4;
+   return res;
+}
+
+
+static inline int DIV32_16(long long a, long long b) 
+{
+   long long res;
+   if (b==0)
+   {
+      fprintf(stderr, "DIV32_16: divide by zero: %d/%d\n", (int)a, (int)b);
+      return 0;
+   }
+   if (!VERIFY_INT(a) || !VERIFY_SHORT(b))
+   {
+      fprintf (stderr, "DIV32_16: inputs are not int/short: %d %d\n", (int)a, (int)b);
+   }
+   res = a/b;
+   if (!VERIFY_SHORT(res))
+   {
+      fprintf (stderr, "DIV32_16: output is not short: %d / %d = %d\n", (int)a,(int)b,(int)res);
+      if (res>32767)
+         res = 32767;
+      if (res<-32768)
+         res = -32768;
+   }
+   spx_mips+=20;
+   return res;
+}
+static inline int DIV32(long long a, long long b) 
+{
+   long long res;
+   if (b==0)
+   {
+      fprintf(stderr, "DIV32: divide by zero: %d/%d\n", (int)a, (int)b);
+      return 0;
+   }
+
+   if (!VERIFY_INT(a) || !VERIFY_INT(b))
+   {
+      fprintf (stderr, "DIV32: inputs are not int/short: %d %d\n", (int)a, (int)b);
+   }
+   res = a/b;
+   if (!VERIFY_INT(res))
+      fprintf (stderr, "DIV32: output is not int: %d\n", (int)res);
+   spx_mips+=36;
+   return res;
+}
+#define PDIV32(a,b) DIV32(ADD32((a),(b)>>1),b)
+#define PDIV32_16(a,b) DIV32_16(ADD32((a),(b)>>1),b)
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_generic.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_generic.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/fixed_generic.h	(revision 1163)
@@ -0,0 +1,106 @@
+/* Copyright (C) 2003 Jean-Marc Valin */
+/**
+   @file fixed_generic.h
+   @brief Generic fixed-point operations
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef FIXED_GENERIC_H
+#define FIXED_GENERIC_H
+
+#define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
+#define QCONST32(x,bits) ((spx_word32_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
+
+#define NEG16(x) (-(x))
+#define NEG32(x) (-(x))
+#define EXTRACT16(x) ((spx_word16_t)(x))
+#define EXTEND32(x) ((spx_word32_t)(x))
+#define SHR16(a,shift) ((a) >> (shift))
+#define SHL16(a,shift) ((a) << (shift))
+#define SHR32(a,shift) ((a) >> (shift))
+#define SHL32(a,shift) ((a) << (shift))
+#define PSHR16(a,shift) (SHR16((a)+((1<<((shift))>>1)),shift))
+#define PSHR32(a,shift) (SHR32((a)+((1<<((shift))>>1)),shift))
+#define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift)))
+#define SATURATE16(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
+#define SATURATE32(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
+
+#define SHR(a,shift) ((a) >> (shift))
+#define SHL(a,shift) ((spx_word32_t)(a) << (shift))
+#define PSHR(a,shift) (SHR((a)+((1<<((shift))>>1)),shift))
+#define SATURATE(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
+
+
+#define ADD16(a,b) ((spx_word16_t)((spx_word16_t)(a)+(spx_word16_t)(b)))
+#define SUB16(a,b) ((spx_word16_t)(a)-(spx_word16_t)(b))
+#define ADD32(a,b) ((spx_word32_t)(a)+(spx_word32_t)(b))
+#define SUB32(a,b) ((spx_word32_t)(a)-(spx_word32_t)(b))
+
+
+/* result fits in 16 bits */
+#define MULT16_16_16(a,b)     ((((spx_word16_t)(a))*((spx_word16_t)(b))))
+
+/* (spx_word32_t)(spx_word16_t) gives TI compiler a hint that it's 16x16->32 multiply */
+#define MULT16_16(a,b)     (((spx_word32_t)(spx_word16_t)(a))*((spx_word32_t)(spx_word16_t)(b)))
+
+#define MAC16_16(c,a,b) (ADD32((c),MULT16_16((a),(b))))
+#define MULT16_32_Q12(a,b) ADD32(MULT16_16((a),SHR((b),12)), SHR(MULT16_16((a),((b)&0x00000fff)),12))
+#define MULT16_32_Q13(a,b) ADD32(MULT16_16((a),SHR((b),13)), SHR(MULT16_16((a),((b)&0x00001fff)),13))
+#define MULT16_32_Q14(a,b) ADD32(MULT16_16((a),SHR((b),14)), SHR(MULT16_16((a),((b)&0x00003fff)),14))
+
+#define MULT16_32_Q11(a,b) ADD32(MULT16_16((a),SHR((b),11)), SHR(MULT16_16((a),((b)&0x000007ff)),11))
+#define MAC16_32_Q11(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),11)), SHR(MULT16_16((a),((b)&0x000007ff)),11)))
+
+#define MULT16_32_P15(a,b) ADD32(MULT16_16((a),SHR((b),15)), PSHR(MULT16_16((a),((b)&0x00007fff)),15))
+#define MULT16_32_Q15(a,b) ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15))
+#define MAC16_32_Q15(c,a,b) ADD32(c,ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),15)))
+
+
+#define MAC16_16_Q11(c,a,b)     (ADD32((c),SHR(MULT16_16((a),(b)),11)))
+#define MAC16_16_Q13(c,a,b)     (ADD32((c),SHR(MULT16_16((a),(b)),13)))
+#define MAC16_16_P13(c,a,b)     (ADD32((c),SHR(ADD32(4096,MULT16_16((a),(b))),13)))
+
+#define MULT16_16_Q11_32(a,b) (SHR(MULT16_16((a),(b)),11))
+#define MULT16_16_Q13(a,b) (SHR(MULT16_16((a),(b)),13))
+#define MULT16_16_Q14(a,b) (SHR(MULT16_16((a),(b)),14))
+#define MULT16_16_Q15(a,b) (SHR(MULT16_16((a),(b)),15))
+
+#define MULT16_16_P13(a,b) (SHR(ADD32(4096,MULT16_16((a),(b))),13))
+#define MULT16_16_P14(a,b) (SHR(ADD32(8192,MULT16_16((a),(b))),14))
+#define MULT16_16_P15(a,b) (SHR(ADD32(16384,MULT16_16((a),(b))),15))
+
+#define MUL_16_32_R15(a,bh,bl) ADD32(MULT16_16((a),(bh)), SHR(MULT16_16((a),(bl)),15))
+
+#define DIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a))/((spx_word16_t)(b))))
+#define PDIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a)+((spx_word16_t)(b)>>1))/((spx_word16_t)(b))))
+#define DIV32(a,b) (((spx_word32_t)(a))/((spx_word32_t)(b)))
+#define PDIV32(a,b) (((spx_word32_t)(a)+((spx_word16_t)(b)>>1))/((spx_word32_t)(b)))
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/gain_table.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/gain_table.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/gain_table.c	(revision 1163)
@@ -0,0 +1,160 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: gain_table.c
+   Codebook for 3-tap pitch prediction gain (128 entries)
+  
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.  
+
+   2. 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.
+
+   3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+*/
+
+const signed char gain_cdbk_nb[512] = {
+-32, -32, -32, 0,
+-28, -67, -5, 33,
+-42, -6, -32, 18,
+-57, -10, -54, 35,
+-16, 27, -41, 42,
+19, -19, -40, 36,
+-45, 24, -21, 40,
+-8, -14, -18, 28,
+1, 14, -58, 53,
+-18, -88, -39, 39,
+-38, 21, -18, 37,
+-19, 20, -43, 38,
+10, 17, -48, 54,
+-52, -58, -13, 33,
+-44, -1, -11, 32,
+-12, -11, -34, 22,
+14, 0, -46, 46,
+-37, -35, -34, 5,
+-25, 44, -30, 43,
+6, -4, -63, 49,
+-31, 43, -41, 43,
+-23, 30, -43, 41,
+-43, 26, -14, 44,
+-33, 1, -13, 27,
+-13, 18, -37, 37,
+-46, -73, -45, 34,
+-36, 24, -25, 34,
+-36, -11, -20, 19,
+-25, 12, -18, 33,
+-36, -69, -59, 34,
+-45, 6, 8, 46,
+-22, -14, -24, 18,
+-1, 13, -44, 44,
+-39, -48, -26, 15,
+-32, 31, -37, 34,
+-33, 15, -46, 31,
+-24, 30, -36, 37,
+-41, 31, -23, 41,
+-50, 22, -4, 50,
+-22, 2, -21, 28,
+-17, 30, -34, 40,
+-7, -60, -28, 29,
+-38, 42, -28, 42,
+-44, -11, 21, 43,
+-16, 8, -44, 34,
+-39, -55, -43, 21,
+-11, -35, 26, 41,
+-9, 0, -34, 29,
+-8, 121, -81, 113,
+7, -16, -22, 33,
+-37, 33, -31, 36,
+-27, -7, -36, 17,
+-34, 70, -57, 65,
+-37, -11, -48, 21,
+-40, 17, -1, 44,
+-33, 6, -6, 33,
+-9, 0, -20, 34,
+-21, 69, -33, 57,
+-29, 33, -31, 35,
+-55, 12, -1, 49,
+-33, 27, -22, 35,
+-50, -33, -47, 17,
+-50, 54, 51, 94,
+-1, -5, -44, 35,
+-4, 22, -40, 45,
+-39, -66, -25, 24,
+-33, 1, -26, 20,
+-24, -23, -25, 12,
+-11, 21, -45, 44,
+-25, -45, -19, 17,
+-43, 105, -16, 82,
+5, -21, 1, 41,
+-16, 11, -33, 30,
+-13, -99, -4, 57,
+-37, 33, -15, 44,
+-25, 37, -63, 54,
+-36, 24, -31, 31,
+-53, -56, -38, 26,
+-41, -4, 4, 37,
+-33, 13, -30, 24,
+49, 52, -94, 114,
+-5, -30, -15, 23,
+1, 38, -40, 56,
+-23, 12, -36, 29,
+-17, 40, -47, 51,
+-37, -41, -39, 11,
+-49, 34, 0, 58,
+-18, -7, -4, 34,
+-16, 17, -27, 35,
+30, 5, -62, 65,
+4, 48, -68, 76,
+-43, 11, -11, 38,
+-18, 19, -15, 41,
+-23, -62, -39, 23,
+-42, 10, -2, 41,
+-21, -13, -13, 25,
+-9, 13, -47, 42,
+-23, -62, -24, 24,
+-44, 60, -21, 58,
+-18, -3, -52, 32,
+-22, 22, -36, 34,
+-75, 57, 16, 90,
+-19, 3, 10, 45,
+-29, 23, -38, 32,
+-5, -62, -51, 38,
+-51, 40, -18, 53,
+-42, 13, -24, 32,
+-34, 14, -20, 30,
+-56, -75, -26, 37,
+-26, 32, 15, 59,
+-26, 17, -29, 29,
+-7, 28, -52, 53,
+-12, -30, 5, 30,
+-5, -48, -5, 35,
+2, 2, -43, 40,
+21, 16, 16, 75,
+-25, -45, -32, 10,
+-43, 18, -10, 42,
+9, 0, -1, 52,
+-1, 7, -30, 36,
+19, -48, -4, 48,
+-28, 25, -29, 32,
+-22, 0, -31, 22,
+-32, 17, -10, 36,
+-64, -41, -62, 36,
+-52, 15, 16, 58,
+-30, -22, -32, 6,
+-7, 9, -38, 36};
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/gain_table_lbr.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/gain_table_lbr.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/gain_table_lbr.c	(revision 1163)
@@ -0,0 +1,64 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: gain_table_lbr.c
+   Codebook for 3-tap pitch prediction gain (32 entries)
+  
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.  
+
+   2. 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.
+
+   3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+*/
+
+const signed char gain_cdbk_lbr[128] = {
+-32, -32, -32, 0,
+-31, -58, -16, 22,
+-41, -24, -43, 14,
+-56, -22, -55, 29,
+-13, 33, -41, 47,
+-4, -39, -9, 29,
+-41, 15, -12, 38,
+-8, -15, -12, 31,
+1, 2, -44, 40,
+-22, -66, -42, 27,
+-38, 28, -23, 38,
+-21, 14, -37, 31,
+0, 21, -50, 52,
+-53, -71, -27, 33,
+-37, -1, -19, 25,
+-19, -5, -28, 22,
+6, 65, -44, 74,
+-33, -48, -33, 9,
+-40, 57, -14, 58,
+-17, 4, -45, 32,
+-31, 38, -33, 36,
+-23, 28, -40, 39,
+-43, 29, -12, 46,
+-34, 13, -23, 28,
+-16, 15, -27, 34,
+-14, -82, -15, 43,
+-31, 25, -32, 29,
+-21, 5, -5, 38,
+-47, -63, -51, 33,
+-46, 12, 3, 47,
+-28, -17, -29, 11,
+-10, 14, -40, 38};
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/hexc_10_32_table.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/hexc_10_32_table.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/hexc_10_32_table.c	(revision 1163)
@@ -0,0 +1,66 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: hexc_10_32_table.c
+   Codebook for high-band excitation in SB-CELP mode (4000 bps)
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+const signed char hexc_10_32_table[320] = {
+-3, -2, -1, 0, -4, 5, 35, -40, -9, 13, 
+-44, 5, -27, -1, -7, 6, -11, 7, -8, 7, 
+19, -14, 15, -4, 9, -10, 10, -8, 10, -9, 
+-1, 1, 0, 0, 2, 5, -18, 22, -53, 50, 
+1, -23, 50, -36, 15, 3, -13, 14, -10, 6, 
+1, 5, -3, 4, -2, 5, -32, 25, 5, -2, 
+-1, -4, 1, 11, -29, 26, -6, -15, 30, -18, 
+0, 15, -17, 40, -41, 3, 9, -2, -2, 3, 
+-3, -1, -5, 2, 21, -6, -16, -21, 23, 2, 
+60, 15, 16, -16, -9, 14, 9, -1, 7, -9, 
+0, 1, 1, 0, -1, -6, 17, -28, 54, -45, 
+-1, 1, -1, -6, -6, 2, 11, 26, -29, -2, 
+46, -21, 34, 12, -23, 32, -23, 16, -10, 3, 
+66, 19, -20, 24, 7, 11, -3, 0, -3, -1, 
+-50, -46, 2, -18, -3, 4, -1, -2, 3, -3, 
+-19, 41, -36, 9, 11, -24, 21, -16, 9, -3, 
+-25, -3, 10, 18, -9, -2, -5, -1, -5, 6, 
+-4, -3, 2, -26, 21, -19, 35, -15, 7, -13, 
+17, -19, 39, -43, 48, -31, 16, -9, 7, -2, 
+-5, 3, -4, 9, -19, 27, -55, 63, -35, 10, 
+26, -44, -2, 9, 4, 1, -6, 8, -9, 5, 
+-8, -1, -3, -16, 45, -42, 5, 15, -16, 10, 
+0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+-16, 24, -55, 47, -38, 27, -19, 7, -3, 1, 
+16, 27, 20, -19, 18, 5, -7, 1, -5, 2, 
+-6, 8, -22, 0, -3, -3, 8, -1, 7, -8, 
+1, -3, 5, 0, 17, -48, 58, -52, 29, -7, 
+-2, 3, -10, 6, -26, 58, -31, 1, -6, 3, 
+93, -29, 39, 3, 17, 5, 6, -1, -1, -1, 
+27, 13, 10, 19, -7, -34, 12, 10, -4, 9, 
+-76, 9, 8, -28, -2, -11, 2, -1, 3, 1, 
+-83, 38, -39, 4, -16, -6, -2, -5, 5, -2, 
+};
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/hexc_table.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/hexc_table.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/hexc_table.c	(revision 1163)
@@ -0,0 +1,162 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: hexc_table.c
+   Codebook for high-band excitation in SB-CELP mode (8000 bps with sign)
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+const signed char hexc_table[1024] = {
+-24, 21, -20, 5, -5, -7, 14, -10, 
+2, -27, 16, -20, 0, -32, 26, 19, 
+8, -11, -41, 31, 28, -27, -32, 34, 
+42, 34, -17, 22, -10, 13, -29, 18, 
+-12, -26, -24, 11, 22, 5, -5, -5, 
+54, -68, -43, 57, -25, 24, 4, 4, 
+26, -8, -12, -17, 54, 30, -45, 1, 
+10, -15, 18, -41, 11, 68, -67, 37, 
+-16, -24, -16, 38, -22, 6, -29, 30, 
+66, -27, 5, 7, -16, 13, 2, -12, 
+-7, -3, -20, 36, 4, -28, 9, 3, 
+32, 48, 26, 39, 3, 0, 7, -21, 
+-13, 5, -82, -7, 73, -20, 34, -9, 
+-5, 1, -1, 10, -5, -10, -1, 9, 
+1, -9, 10, 0, -14, 11, -1, -2, 
+-1, 11, 20, 96, -81, -22, -12, -9, 
+-58, 9, 24, -30, 26, -35, 27, -12, 
+13, -18, 56, -59, 15, -7, 23, -15, 
+-1, 6, -25, 14, -22, -20, 47, -11, 
+16, 2, 38, -23, -19, -30, -9, 40, 
+-11, 5, 4, -6, 8, 26, -21, -11, 
+127, 4, 1, 6, -9, 2, -7, -2, 
+-3, 7, -5, 10, -19, 7, -106, 91, 
+-3, 9, -4, 21, -8, 26, -80, 8, 
+1, -2, -10, -17, -17, -27, 32, 71, 
+6, -29, 11, -23, 54, -38, 29, -22, 
+39, 87, -31, -12, -20, 3, -2, -2, 
+2, 20, 0, -1, -35, 27, 9, -6, 
+-12, 3, -12, -6, 13, 1, 14, -22, 
+-59, -15, -17, -25, 13, -7, 7, 3, 
+0, 1, -7, 6, -3, 61, -37, -23, 
+-23, -29, 38, -31, 27, 1, -8, 2, 
+-27, 23, -26, 36, -34, 5, 24, -24, 
+-6, 7, 3, -59, 78, -62, 44, -16, 
+1, 6, 0, 17, 8, 45, 0, -110, 
+6, 14, -2, 32, -77, -56, 62, -3, 
+3, -13, 4, -16, 102, -15, -36, -1, 
+9, -113, 6, 23, 0, 9, 9, 5, 
+-8, -1, -14, 5, -12, 121, -53, -27, 
+-8, -9, 22, -13, 3, 2, -3, 1, 
+-2, -71, 95, 38, -19, 15, -16, -5, 
+71, 10, 2, -32, -13, -5, 15, -1, 
+-2, -14, -85, 30, 29, 6, 3, 2, 
+0, 0, 0, 0, 0, 0, 0, 0, 
+2, -65, -56, -9, 18, 18, 23, -14, 
+-2, 0, 12, -29, 26, -12, 1, 2, 
+-12, -64, 90, -6, 4, 1, 5, -5, 
+-110, -3, -31, 22, -29, 9, 0, 8, 
+-40, -5, 21, -5, -5, 13, 10, -18, 
+40, 1, 35, -20, 30, -28, 11, -6, 
+19, 7, 14, 18, -64, 9, -6, 16, 
+51, 68, 8, 16, 12, -8, 0, -9, 
+20, -22, 25, 7, -4, -13, 41, -35, 
+93, -18, -54, 11, -1, 1, -9, 4, 
+-66, 66, -31, 20, -22, 25, -23, 11, 
+10, 9, 19, 15, 11, -5, -31, -10, 
+-23, -28, -6, -6, -3, -4, 5, 3, 
+-28, 22, -11, -42, 25, -25, -16, 41, 
+34, 47, -6, 2, 42, -19, -22, 5, 
+-39, 32, 6, -35, 22, 17, -30, 8, 
+-26, -11, -11, 3, -12, 33, 33, -37, 
+21, -1, 6, -4, 3, 0, -5, 5, 
+12, -12, 57, 27, -61, -3, 20, -17, 
+2, 0, 4, 0, -2, -33, -58, 81, 
+-23, 39, -10, -5, 2, 6, -7, 5, 
+4, -3, -2, -13, -23, -72, 107, 15, 
+-5, 0, -7, -3, -6, 5, -4, 15, 
+47, 12, -31, 25, -16, 8, 22, -25, 
+-62, -56, -18, 14, 28, 12, 2, -11, 
+74, -66, 41, -20, -7, 16, -20, 16, 
+-8, 0, -16, 4, -19, 92, 12, -59, 
+-14, -39, 49, -25, -16, 23, -27, 19, 
+-3, -33, 19, 85, -29, 6, -7, -10, 
+16, -7, -12, 1, -6, 2, 4, -2, 
+64, 10, -25, 41, -2, -31, 15, 0, 
+110, 50, 69, 35, 28, 19, -10, 2, 
+-43, -49, -56, -15, -16, 10, 3, 12, 
+-1, -8, 1, 26, -12, -1, 7, -11, 
+-27, 41, 25, 1, -11, -18, 22, -7, 
+-1, -47, -8, 23, -3, -17, -7, 18, 
+-125, 59, -5, 3, 18, 1, 2, 3, 
+27, -35, 65, -53, 50, -46, 37, -21, 
+-28, 7, 14, -37, -5, -5, 12, 5, 
+-8, 78, -19, 21, -6, -16, 8, -7, 
+5, 2, 7, 2, 10, -6, 12, -60, 
+44, 11, -36, -32, 31, 0, 2, -2, 
+2, 1, -3, 7, -10, 17, -21, 10, 
+6, -2, 19, -2, 59, -38, -86, 38, 
+8, -41, -30, -45, -33, 7, 15, 28, 
+29, -7, 24, -40, 7, 7, 5, -2, 
+9, 24, -23, -18, 6, -29, 30, 2, 
+28, 49, -11, -46, 10, 43, -13, -9, 
+-1, -3, -7, -7, -17, -6, 97, -33, 
+-21, 3, 5, 1, 12, -43, -8, 28, 
+7, -43, -7, 17, -20, 19, -1, 2, 
+-13, 9, 54, 34, 9, -28, -11, -9, 
+-17, 110, -59, 44, -26, 0, 3, -12, 
+-47, 73, -34, -43, 38, -33, 16, -5, 
+-46, -4, -6, -2, -25, 19, -29, 28, 
+-13, 5, 14, 27, -40, -43, 4, 32, 
+-13, -2, -35, -4, 112, -42, 9, -12, 
+37, -28, 17, 14, -19, 35, -39, 23, 
+3, -14, -1, -57, -5, 94, -9, 3, 
+-39, 5, 30, -10, -32, 42, -13, -14, 
+-97, -63, 30, -9, 1, -7, 12, 5, 
+20, 17, -9, -36, -30, 25, 47, -9, 
+-15, 12, -22, 98, -8, -50, 15, -27, 
+21, -16, -11, 2, 12, -10, 10, -3, 
+33, 36, -96, 0, -17, 31, -9, 9, 
+3, -20, 13, -11, 8, -4, 10, -10, 
+9, 1, 112, -70, -27, 5, -21, 2, 
+-57, -3, -29, 10, 19, -21, 21, -10, 
+-66, -3, 91, -35, 30, -12, 0, -7, 
+59, -28, 26, 2, 14, -18, 1, 1, 
+11, 17, 20, -54, -59, 27, 4, 29, 
+32, 5, 19, 12, -4, 1, 7, -10, 
+5, -2, 10, 0, 23, -5, 28, -104, 
+46, 11, 16, 3, 29, 1, -8, -14, 
+1, 7, -50, 88, -62, 26, 8, -17, 
+-14, 50, 0, 32, -12, -3, -27, 18, 
+-8, -5, 8, 3, -20, -11, 37, -12, 
+9, 33, 46, -101, -1, -4, 1, 6, 
+-1, 28, -42, -15, 16, 5, -1, -2, 
+-55, 85, 38, -9, -4, 11, -2, -9, 
+-6, 3, -20, -10, -77, 89, 24, -3, 
+-104, -57, -26, -31, -20, -6, -9, 14, 
+20, -23, 46, -15, -31, 28, 1, -15, 
+-2, 6, -2, 31, 45, -76, 23, -25, 
+};
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/high_lsp_tables.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/high_lsp_tables.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/high_lsp_tables.c	(revision 1163)
@@ -0,0 +1,163 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: high_lsp_tables.c
+   Codebooks for high-band LSPs in SB-CELP mode
+  
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.  
+
+   2. 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.
+
+   3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+*/
+ 
+const signed char high_lsp_cdbk[512]={
+39,12,-14,-20,-29,-61,-67,-76,
+-32,-71,-67,68,77,46,34,5,
+-13,-48,-46,-72,-81,-84,-60,-58,
+-40,-28,82,93,68,45,29,3,
+-19,-47,-28,-43,-35,-30,-8,-13,
+-39,-91,-91,-123,-96,10,10,-6,
+-18,-55,-60,-91,-56,-36,-27,-16,
+-48,-75,40,28,-10,-28,35,9,
+37,19,1,-20,-31,-41,-18,-25,
+-35,-68,-80,45,27,-1,47,13,
+0,-29,-35,-57,-50,-79,-73,-38,
+-19,5,35,14,-10,-23,16,-8,
+5,-24,-40,-62,-23,-27,-22,-16,
+-18,-46,-72,-77,43,21,33,1,
+-80,-70,-70,-64,-56,-52,-39,-33,
+-31,-38,-19,-19,-15,32,33,-2,
+7,-15,-15,-24,-23,-33,-41,-56,
+-24,-57,5,89,64,41,27,5,
+-9,-47,-60,-97,-97,-124,-20,-9,
+-44,-73,31,29,-4,64,48,7,
+-35,-57,0,-3,-26,-47,-3,-6,
+-40,-76,-79,-48,12,81,55,10,
+9,-24,-43,-73,-57,-69,16,5,
+-28,-53,18,29,20,0,-4,-11,
+6,-13,23,7,-17,-35,-37,-37,
+-30,-68,-63,6,24,-9,-14,3,
+21,-13,-27,-57,-49,-80,-24,-41,
+-5,-16,-5,1,45,25,12,-7,
+3,-15,-6,-16,-15,-8,6,-13,
+-42,-81,-80,-87,14,1,-10,-3,
+-43,-69,-46,-24,-28,-29,36,6,
+-43,-56,-12,12,54,79,43,9,
+54,22,2,8,-12,-43,-46,-52,
+-38,-69,-89,-5,75,38,33,5,
+-13,-53,-62,-87,-89,-113,-99,-55,
+-34,-37,62,55,33,16,21,-2,
+-17,-46,-29,-38,-38,-48,-39,-42,
+-36,-75,-72,-88,-48,-30,21,2,
+-15,-57,-64,-98,-84,-76,25,1,
+-46,-80,-12,18,-7,3,34,6,
+38,31,23,4,-1,20,14,-15,
+-43,-78,-91,-24,14,-3,54,16,
+0,-27,-28,-44,-56,-83,-92,-89,
+-3,34,56,41,36,22,20,-8,
+-7,-35,-42,-62,-49,3,12,-10,
+-50,-87,-96,-66,92,70,38,9,
+-70,-71,-62,-42,-39,-43,-11,-7,
+-50,-79,-58,-50,-31,32,31,-6,
+-4,-25,7,-17,-38,-70,-58,-27,
+-43,-83,-28,59,36,20,31,2,
+-27,-71,-80,-109,-98,-75,-33,-32,
+-31,-2,33,15,-6,43,33,-5,
+0,-22,-10,-27,-34,-49,-11,-20,
+-41,-91,-100,-121,-39,57,41,10,
+-19,-50,-38,-59,-60,-70,-18,-20,
+-8,-31,-8,-15,1,-14,-26,-25,
+33,21,32,17,1,-19,-19,-26,
+-58,-81,-35,-22,45,30,11,-11,
+3,-26,-48,-87,-67,-83,-58,3,
+-1,-26,-20,44,10,25,39,5,
+-9,-35,-27,-38,7,10,4,-9,
+-42,-85,-102,-127,52,44,28,10,
+-47,-61,-40,-39,-17,-1,-10,-33,
+-42,-74,-48,21,-4,70,52,10};
+
+
+const signed char high_lsp_cdbk2[512]={
+-36,-62,6,-9,-10,-14,-56,23,
+1,-26,23,-48,-17,12,8,-7,
+23,29,-36,-28,-6,-29,-17,-5,
+40,23,10,10,-46,-13,36,6,
+4,-30,-29,62,32,-32,-1,22,
+-14,1,-4,-22,-45,2,54,4,
+-30,-57,-59,-12,27,-3,-31,8,
+-9,5,10,-14,32,66,19,9,
+2,-25,-37,23,-15,18,-38,-31,
+5,-9,-21,15,0,22,62,30,
+15,-12,-14,-46,77,21,33,3,
+34,29,-19,50,2,11,9,-38,
+-12,-37,62,1,-15,54,32,6,
+2,-24,20,35,-21,2,19,24,
+-13,55,4,9,39,-19,30,-1,
+-21,73,54,33,8,18,3,15,
+6,-19,-47,6,-3,-48,-50,1,
+26,20,8,-23,-50,65,-14,-55,
+-17,-31,-37,-28,53,-1,-17,-53,
+1,57,11,-8,-25,-30,-37,64,
+5,-52,-45,15,23,31,15,14,
+-25,24,33,-2,-44,-56,-18,6,
+-21,-43,4,-12,17,-37,20,-10,
+34,15,2,15,55,21,-11,-31,
+-6,46,25,16,-9,-25,-8,-62,
+28,17,20,-32,-29,26,30,25,
+-19,2,-16,-17,26,-51,2,50,
+42,19,-66,23,29,-2,3,19,
+-19,-37,32,15,6,30,-34,13,
+11,-5,40,31,10,-42,4,-9,
+26,-9,-70,17,-2,-23,20,-22,
+-55,51,-24,-31,22,-22,15,-13,
+3,-10,-28,-16,56,4,-63,11,
+-18,-15,-18,-38,-35,16,-7,34,
+-1,-21,-49,-47,9,-37,7,8,
+69,55,20,6,-33,-45,-10,-9,
+6,-9,12,71,15,-3,-42,-7,
+-24,32,-35,-2,-42,-17,-5,0,
+-2,-33,-54,13,-12,-34,47,23,
+19,55,7,-8,74,31,14,16,
+-23,-26,19,12,-18,-49,-28,-31,
+-20,2,-14,-20,-47,78,40,13,
+-23,-11,21,-6,18,1,47,5,
+38,35,32,46,22,8,13,16,
+-14,18,51,19,40,39,11,-26,
+-1,-17,47,2,-53,-15,31,-22,
+38,21,-15,-16,5,-33,53,15,
+-38,86,11,-3,-24,49,13,-4,
+-11,-18,28,20,-12,-27,-26,35,
+-25,-35,-3,-20,-61,30,10,-55,
+-12,-22,-52,-54,-14,19,-32,-12,
+45,15,-8,-48,-9,11,-32,8,
+-16,-34,-13,51,18,38,-2,-32,
+-17,22,-2,-18,-28,-70,59,27,
+-28,-19,-10,-20,-9,-9,-8,-21,
+21,-8,35,-2,45,-3,-9,12,
+0,30,7,-39,43,27,-38,-91,
+30,26,19,-55,-4,63,14,-17,
+13,9,13,2,7,4,6,61,
+72,-1,-17,29,-1,-22,-17,8,
+-28,-37,63,44,41,3,2,14,
+9,-6,75,-8,-7,-12,-15,-12,
+13,9,-4,30,-22,-65,15,0,
+-45,4,-4,1,5,22,11,23};
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/jitter.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/jitter.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/jitter.c	(revision 1163)
@@ -0,0 +1,508 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: speex_jitter.h
+
+   Adaptive jitter buffer for Speex
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
+#include "misc.h"
+#include <speex/speex.h>
+#include <speex/speex_bits.h>
+#include <speex/speex_jitter.h>
+#include <stdio.h>
+
+#define LATE_BINS 10
+#define MAX_MARGIN 30                     /**< Number of bins in margin histogram */
+
+#define SPEEX_JITTER_MAX_BUFFER_SIZE 200   /**< Maximum number of packets in jitter buffer */
+
+
+
+#define GT32(a,b) (((spx_int32_t)((a)-(b)))>0)
+#define GE32(a,b) (((spx_int32_t)((a)-(b)))>=0)
+#define LT32(a,b) (((spx_int32_t)((a)-(b)))<0)
+#define LE32(a,b) (((spx_int32_t)((a)-(b)))<=0)
+
+/** Jitter buffer structure */
+struct JitterBuffer_ {
+   spx_uint32_t pointer_timestamp;                                        /**< Timestamp of what we will *get* next */
+   spx_uint32_t current_timestamp;                                        /**< Timestamp of the local clock (what we will *play* next) */
+
+   char *buf[SPEEX_JITTER_MAX_BUFFER_SIZE];                               /**< Buffer of packets (NULL if slot is free) */
+   spx_uint32_t timestamp[SPEEX_JITTER_MAX_BUFFER_SIZE];                  /**< Timestamp of packet                 */
+   int span[SPEEX_JITTER_MAX_BUFFER_SIZE];                                /**< Timestamp of packet                 */
+   int len[SPEEX_JITTER_MAX_BUFFER_SIZE];                                 /**< Number of bytes in packet           */
+
+   int tick_size;                                                         /**< Output granularity                  */
+   int reset_state;                                                       /**< True if state was just reset        */
+   int buffer_margin;                                                     /**< How many frames we want to keep in the buffer (lower bound) */
+   
+   int lost_count;                                                        /**< Number of consecutive lost packets  */
+   float shortterm_margin[MAX_MARGIN];                                    /**< Short term margin histogram         */
+   float longterm_margin[MAX_MARGIN];                                     /**< Long term margin histogram          */
+   float loss_rate;                                                       /**< Average loss rate                   */
+};
+
+/** Initialise jitter buffer */
+JitterBuffer *jitter_buffer_init(int tick)
+{
+   JitterBuffer *jitter = (JitterBuffer*)speex_alloc(sizeof(JitterBuffer));
+   if (jitter)
+   {
+      int i;
+      for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
+         jitter->buf[i]=NULL;
+      jitter->tick_size = tick;
+      jitter->buffer_margin = 1;
+      jitter_buffer_reset(jitter);
+   }
+   return jitter;
+}
+
+/** Reset jitter buffer */
+void jitter_buffer_reset(JitterBuffer *jitter)
+{
+   int i;
+   for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
+   {
+      if (jitter->buf[i])
+      {
+         speex_free(jitter->buf[i]);
+         jitter->buf[i] = NULL;
+      }
+   }
+   /* Timestamp is actually undefined at this point */
+   jitter->pointer_timestamp = 0;
+   jitter->current_timestamp = 0;
+   jitter->reset_state = 1;
+   jitter->lost_count = 0;
+   jitter->loss_rate = 0;
+   for (i=0;i<MAX_MARGIN;i++)
+   {
+      jitter->shortterm_margin[i] = 0;
+      jitter->longterm_margin[i] = 0;
+   }
+   /*fprintf (stderr, "reset\n");*/
+}
+
+/** Destroy jitter buffer */
+void jitter_buffer_destroy(JitterBuffer *jitter)
+{
+   jitter_buffer_reset(jitter);
+   speex_free(jitter);
+}
+
+/** Put one packet into the jitter buffer */
+void jitter_buffer_put(JitterBuffer *jitter, const JitterBufferPacket *packet)
+{
+   int i,j;
+   spx_int32_t arrival_margin;
+   /*fprintf (stderr, "put packet %d %d\n", timestamp, span);*/
+   if (jitter->reset_state)
+   {
+      jitter->reset_state=0;
+      jitter->pointer_timestamp = packet->timestamp;
+      jitter->current_timestamp = packet->timestamp;
+      /*fprintf(stderr, "reset to %d\n", timestamp);*/
+   }
+   
+   /* Cleanup buffer (remove old packets that weren't played) */
+   for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
+   {
+      if (jitter->buf[i] && LE32(jitter->timestamp[i] + jitter->span[i], jitter->pointer_timestamp))
+      {
+         /*fprintf (stderr, "cleaned (not played)\n");*/
+         speex_free(jitter->buf[i]);
+         jitter->buf[i] = NULL;
+      }
+   }
+
+   /*Find an empty slot in the buffer*/
+   for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
+   {
+      if (jitter->buf[i]==NULL)
+         break;
+   }
+
+   /*fprintf(stderr, "%d %d %f\n", timestamp, jitter->pointer_timestamp, jitter->drift_average);*/
+   /*No place left in the buffer*/
+   if (i==SPEEX_JITTER_MAX_BUFFER_SIZE)
+   {
+      int earliest=jitter->timestamp[0];
+      i=0;
+      for (j=1;j<SPEEX_JITTER_MAX_BUFFER_SIZE;j++)
+      {
+         if (!jitter->buf[i] || LT32(jitter->timestamp[j],earliest))
+         {
+            earliest = jitter->timestamp[j];
+            i=j;
+         }
+      }
+      speex_free(jitter->buf[i]);
+      jitter->buf[i]=NULL;
+      if (jitter->lost_count>20)
+      {
+         jitter_buffer_reset(jitter);
+      }
+      /*fprintf (stderr, "Buffer is full, discarding earliest frame %d (currently at %d)\n", timestamp, jitter->pointer_timestamp);*/      
+   }
+   
+   /* Copy packet in buffer */
+   jitter->buf[i]=(char*)speex_alloc(packet->len);
+   for (j=0;j<packet->len;j++)
+      jitter->buf[i][j]=packet->data[j];
+   jitter->timestamp[i]=packet->timestamp;
+   jitter->span[i]=packet->span;
+   jitter->len[i]=packet->len;
+   
+   /* Adjust the buffer size depending on network conditions */
+   arrival_margin = (packet->timestamp - jitter->current_timestamp) - jitter->buffer_margin*jitter->tick_size;
+   
+   if (arrival_margin >= -LATE_BINS*jitter->tick_size)
+   {
+      spx_int32_t int_margin;
+      for (i=0;i<MAX_MARGIN;i++)
+      {
+         jitter->shortterm_margin[i] *= .98;
+         jitter->longterm_margin[i] *= .995;
+      }
+      int_margin = LATE_BINS + arrival_margin/jitter->tick_size;
+      if (int_margin>MAX_MARGIN-1)
+         int_margin = MAX_MARGIN-1;
+      if (int_margin>=0)
+      {
+         jitter->shortterm_margin[int_margin] += .02;
+         jitter->longterm_margin[int_margin] += .005;
+      }
+   } else {
+      
+      /*fprintf (stderr, "way too late = %d\n", arrival_margin);*/
+      if (jitter->lost_count>20)
+      {
+         jitter_buffer_reset(jitter);
+      }
+   }
+#if 0 /* Enable to check how much is being buffered */
+   if (rand()%1000==0)
+   {
+      int count = 0;
+      for (j=0;j<SPEEX_JITTER_MAX_BUFFER_SIZE;j++)
+      {
+         if (jitter->buf[j])
+            count++;
+      }
+      fprintf (stderr, "buffer_size = %d\n", count);
+   }
+#endif
+}
+
+/** Get one packet from the jitter buffer */
+int jitter_buffer_get(JitterBuffer *jitter, JitterBufferPacket *packet, spx_uint32_t *start_offset)
+{
+   int i, j;
+   float late_ratio_short;
+   float late_ratio_long;
+   float ontime_ratio_short;
+   float ontime_ratio_long;
+   float early_ratio_short;
+   float early_ratio_long;
+   int chunk_size;
+   int incomplete = 0;
+   
+   if (LT32(jitter->current_timestamp+jitter->tick_size, jitter->pointer_timestamp))
+   {
+      jitter->current_timestamp = jitter->pointer_timestamp;
+      speex_warning("did you forget to call jitter_buffer_tick() by any chance?");
+   }
+   /*fprintf (stderr, "get packet %d %d\n", jitter->pointer_timestamp, jitter->current_timestamp);*/
+
+   /* FIXME: This should be only what remaining of the current tick */
+   chunk_size = jitter->tick_size;
+   
+   /* Compiling arrival statistics */
+   
+   late_ratio_short = 0;
+   late_ratio_long = 0;
+   for (i=0;i<LATE_BINS;i++)
+   {
+      late_ratio_short += jitter->shortterm_margin[i];
+      late_ratio_long += jitter->longterm_margin[i];
+   }
+   ontime_ratio_short = jitter->shortterm_margin[LATE_BINS];
+   ontime_ratio_long = jitter->longterm_margin[LATE_BINS];
+   early_ratio_short = early_ratio_long = 0;
+   for (i=LATE_BINS+1;i<MAX_MARGIN;i++)
+   {
+      early_ratio_short += jitter->shortterm_margin[i];
+      early_ratio_long += jitter->longterm_margin[i];
+   }
+   if (0&&jitter->pointer_timestamp%1000==0)
+   {
+      /*fprintf (stderr, "%f %f %f %f %f %f\n", early_ratio_short, early_ratio_long, ontime_ratio_short, ontime_ratio_long, late_ratio_short, late_ratio_long);*/
+      /*fprintf (stderr, "%f %f\n", early_ratio_short + ontime_ratio_short + late_ratio_short, early_ratio_long + ontime_ratio_long + late_ratio_long);*/
+   }
+   
+   /* Adjusting the buffering */
+   
+   if (late_ratio_short > .1 || late_ratio_long > .03)
+   {
+      /* If too many packets are arriving late */
+      jitter->shortterm_margin[MAX_MARGIN-1] += jitter->shortterm_margin[MAX_MARGIN-2];
+      jitter->longterm_margin[MAX_MARGIN-1] += jitter->longterm_margin[MAX_MARGIN-2];
+      for (i=MAX_MARGIN-3;i>=0;i--)
+      {
+         jitter->shortterm_margin[i+1] = jitter->shortterm_margin[i];
+         jitter->longterm_margin[i+1] = jitter->longterm_margin[i];         
+      }
+      jitter->shortterm_margin[0] = 0;
+      jitter->longterm_margin[0] = 0;            
+      jitter->pointer_timestamp -= jitter->tick_size;
+      jitter->current_timestamp -= jitter->tick_size;
+      /*fprintf (stderr, "i");*/
+      /*fprintf (stderr, "interpolate (getting some slack)\n");*/
+   } else if (late_ratio_short + ontime_ratio_short < .005 && late_ratio_long + ontime_ratio_long < .01 && early_ratio_short > .8)
+   {
+      /* Many frames arriving early */
+      jitter->shortterm_margin[0] += jitter->shortterm_margin[1];
+      jitter->longterm_margin[0] += jitter->longterm_margin[1];
+      for (i=1;i<MAX_MARGIN-1;i++)
+      {
+         jitter->shortterm_margin[i] = jitter->shortterm_margin[i+1];
+         jitter->longterm_margin[i] = jitter->longterm_margin[i+1];         
+      }
+      jitter->shortterm_margin[MAX_MARGIN-1] = 0;
+      jitter->longterm_margin[MAX_MARGIN-1] = 0;      
+      /*fprintf (stderr, "drop frame\n");*/
+      /*fprintf (stderr, "d");*/
+      jitter->pointer_timestamp += jitter->tick_size;
+      jitter->current_timestamp += jitter->tick_size;
+      /*fprintf (stderr, "dropping packet (getting more aggressive)\n");*/
+   }
+   
+   /* Searching for the packet that fits best */
+   
+   /* Search the buffer for a packet with the right timestamp and spanning the whole current chunk */
+   for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
+   {
+      if (jitter->buf[i] && jitter->timestamp[i]==jitter->pointer_timestamp && GE32(jitter->timestamp[i]+jitter->span[i],jitter->pointer_timestamp+chunk_size))
+         break;
+   }
+   
+   /* If no match, try for an "older" packet that still spans (fully) the current chunk */
+   if (i==SPEEX_JITTER_MAX_BUFFER_SIZE)
+   {
+      for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
+      {
+         if (jitter->buf[i] && jitter->timestamp[i]<=jitter->pointer_timestamp && GE32(jitter->timestamp[i]+jitter->span[i],jitter->pointer_timestamp+chunk_size))
+            break;
+      }
+   }
+   
+   /* If still no match, try for an "older" packet that spans part of the current chunk */
+   if (i==SPEEX_JITTER_MAX_BUFFER_SIZE)
+   {
+      for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
+      {
+         if (jitter->buf[i] && jitter->timestamp[i]<=jitter->pointer_timestamp && GT32(jitter->timestamp[i]+jitter->span[i],jitter->pointer_timestamp))
+            break;
+      }
+   }
+   
+   /* If still no match, try for earliest packet possible */
+   if (i==SPEEX_JITTER_MAX_BUFFER_SIZE)
+   {
+      int found = 0;
+      spx_uint32_t best_time=0;
+      int best_span=0;
+      int besti=0;
+      for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
+      {
+         /* check if packet starts within current chunk */
+         if (jitter->buf[i] && LT32(jitter->timestamp[i],jitter->pointer_timestamp+chunk_size) && GE32(jitter->timestamp[i],jitter->pointer_timestamp))
+         {
+            if (!found || LT32(jitter->timestamp[i],best_time) || (jitter->timestamp[i]==best_time && GT32(jitter->span[i],best_span)))
+            {
+               best_time = jitter->timestamp[i];
+               best_span = jitter->span[i];
+               besti = i;
+               found = 1;
+            }
+         }
+      }
+      if (found)
+      {
+         i=besti;
+         incomplete = 1;
+         /*fprintf (stderr, "incomplete: %d %d %d %d\n", jitter->timestamp[i], jitter->pointer_timestamp, chunk_size, jitter->span[i]);*/
+      }
+   }
+
+   /* If we find something */
+   if (i!=SPEEX_JITTER_MAX_BUFFER_SIZE)
+   {
+      /* We (obviously) haven't lost this packet */
+      jitter->lost_count = 0;
+      jitter->loss_rate = .999*jitter->loss_rate;
+      /* Check for potential overflow */
+      packet->len = jitter->len[i];
+      /* Copy packet */
+      for (j=0;j<packet->len;j++)
+         packet->data[j] = jitter->buf[i][j];
+      /* Remove packet */
+      speex_free(jitter->buf[i]);
+      jitter->buf[i] = NULL;
+      /* Set timestamp and span (if requested) */
+      if (start_offset)
+         *start_offset = jitter->timestamp[i]-jitter->pointer_timestamp;
+      packet->timestamp = jitter->timestamp[i];
+      packet->span = jitter->span[i];
+      /* Point at the end of the current packet */
+      jitter->pointer_timestamp = jitter->timestamp[i]+jitter->span[i];
+      if (incomplete)
+         return JITTER_BUFFER_INCOMPLETE;
+      else
+         return JITTER_BUFFER_OK;
+   }
+   
+   
+   /* If we haven't found anything worth returning */
+   /*fprintf (stderr, "not found\n");*/
+   jitter->lost_count++;
+   /*fprintf (stderr, "m");*/
+   /*fprintf (stderr, "lost_count = %d\n", jitter->lost_count);*/
+   jitter->loss_rate = .999*jitter->loss_rate + .001;
+   if (start_offset)
+      *start_offset = 0;
+   packet->timestamp = jitter->pointer_timestamp;
+   packet->span = jitter->tick_size;
+   jitter->pointer_timestamp += chunk_size;
+   packet->len = 0;
+   return JITTER_BUFFER_MISSING;
+
+}
+
+/** Get pointer timestamp of jitter buffer */
+int jitter_buffer_get_pointer_timestamp(JitterBuffer *jitter)
+{
+   return jitter->pointer_timestamp;
+}
+
+void jitter_buffer_tick(JitterBuffer *jitter)
+{
+   jitter->current_timestamp += jitter->tick_size;
+}
+
+
+
+
+
+void speex_jitter_init(SpeexJitter *jitter, void *decoder, int sampling_rate)
+{
+   jitter->dec = decoder;
+   speex_decoder_ctl(decoder, SPEEX_GET_FRAME_SIZE, &jitter->frame_size);
+
+   jitter->packets = jitter_buffer_init(jitter->frame_size);
+
+   speex_bits_init(&jitter->current_packet);
+   jitter->valid_bits = 0;
+
+}
+
+void speex_jitter_destroy(SpeexJitter *jitter)
+{
+   jitter_buffer_destroy(jitter->packets);
+   speex_bits_destroy(&jitter->current_packet);
+}
+
+void speex_jitter_put(SpeexJitter *jitter, char *packet, int len, int timestamp)
+{
+   JitterBufferPacket p;
+   p.data = packet;
+   p.len = len;
+   p.timestamp = timestamp;
+   p.span = jitter->frame_size;
+   jitter_buffer_put(jitter->packets, &p);
+}
+
+void speex_jitter_get(SpeexJitter *jitter, short *out, int *current_timestamp)
+{
+   int i;
+   int ret;
+   char data[2048];
+   JitterBufferPacket packet;
+   packet.data = data;
+   
+   if (jitter->valid_bits)
+   {
+      /* Try decoding last received packet */
+      ret = speex_decode_int(jitter->dec, &jitter->current_packet, out);
+      if (ret == 0)
+      {
+         jitter_buffer_tick(jitter->packets);
+         return;
+      } else {
+         jitter->valid_bits = 0;
+      }
+   }
+
+   ret = jitter_buffer_get(jitter->packets, &packet, NULL);
+   
+   if (ret != JITTER_BUFFER_OK)
+   {
+      /* No packet found */
+
+      /*fprintf (stderr, "lost/late frame\n");*/
+      /*Packet is late or lost*/
+      speex_decode_int(jitter->dec, NULL, out);
+   } else {
+      speex_bits_read_from(&jitter->current_packet, packet.data, packet.len);
+      /* Decode packet */
+      ret = speex_decode_int(jitter->dec, &jitter->current_packet, out);
+      if (ret == 0)
+      {
+         jitter->valid_bits = 1;
+      } else {
+         /* Error while decoding */
+         for (i=0;i<jitter->frame_size;i++)
+            out[i]=0;
+      }
+   }
+   jitter_buffer_tick(jitter->packets);
+}
+
+int speex_jitter_get_pointer_timestamp(SpeexJitter *jitter)
+{
+   return jitter_buffer_get_pointer_timestamp(jitter->packets);
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/kiss_fft.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/kiss_fft.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/kiss_fft.c	(revision 1163)
@@ -0,0 +1,434 @@
+/*
+Copyright (c) 2003-2004, Mark Borgerding
+
+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 author nor the names of any 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 OWNER 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.
+*/
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "_kiss_fft_guts.h"
+#include "misc.h"
+
+/* The guts header contains all the multiplication and addition macros that are defined for
+ fixed or floating point complex numbers.  It also delares the kf_ internal functions.
+ */
+
+static kiss_fft_cpx *scratchbuf=NULL;
+static size_t nscratchbuf=0;
+static kiss_fft_cpx *tmpbuf=NULL;
+static size_t ntmpbuf=0;
+
+#define CHECKBUF(buf,nbuf,n) \
+    do { \
+        if ( nbuf < (size_t)(n) ) {\
+            speex_free(buf); \
+            buf = (kiss_fft_cpx*)KISS_FFT_MALLOC(sizeof(kiss_fft_cpx)*(n)); \
+            nbuf = (size_t)(n); \
+        } \
+   }while(0)
+        
+static void kf_bfly2(
+        kiss_fft_cpx * Fout,
+        const size_t fstride,
+        const kiss_fft_cfg st,
+        int m
+        )
+{
+    kiss_fft_cpx * Fout2;
+    kiss_fft_cpx * tw1 = st->twiddles;
+    kiss_fft_cpx t;
+    Fout2 = Fout + m;
+    if (!st->inverse) {
+       int i;
+       kiss_fft_cpx *x=Fout;
+       for (i=0;i<2*m;i++)
+       {
+          x[i].r = SHR(x[i].r,1);
+          x[i].i = SHR(x[i].i,1);
+       }
+    }
+
+    do{
+        C_MUL (t,  *Fout2 , *tw1);
+        tw1 += fstride;
+        C_SUB( *Fout2 ,  *Fout , t );
+        C_ADDTO( *Fout ,  t );
+        ++Fout2;
+        ++Fout;
+    }while (--m);
+}
+
+static void kf_bfly4(
+        kiss_fft_cpx * Fout,
+        const size_t fstride,
+        const kiss_fft_cfg st,
+        const size_t m
+        )
+{
+    kiss_fft_cpx *tw1,*tw2,*tw3;
+    kiss_fft_cpx scratch[6];
+    size_t k=m;
+    const size_t m2=2*m;
+    const size_t m3=3*m;
+
+    tw3 = tw2 = tw1 = st->twiddles;
+
+    if (!st->inverse) {
+       int i;
+       kiss_fft_cpx *x=Fout;
+       for (i=0;i<4*m;i++)
+       {
+          x[i].r = PSHR16(x[i].r,2);
+          x[i].i = PSHR16(x[i].i,2);
+       }
+    }
+    if (st->inverse)
+    {
+       do {
+          C_MUL(scratch[0],Fout[m] , *tw1 );
+          C_MUL(scratch[1],Fout[m2] , *tw2 );
+          C_MUL(scratch[2],Fout[m3] , *tw3 );
+          
+          C_SUB( scratch[5] , *Fout, scratch[1] );
+          C_ADDTO(*Fout, scratch[1]);
+          C_ADD( scratch[3] , scratch[0] , scratch[2] );
+          C_SUB( scratch[4] , scratch[0] , scratch[2] );
+          C_SUB( Fout[m2], *Fout, scratch[3] );
+          tw1 += fstride;
+          tw2 += fstride*2;
+          tw3 += fstride*3;
+          C_ADDTO( *Fout , scratch[3] );
+
+          Fout[m].r = scratch[5].r - scratch[4].i;
+          Fout[m].i = scratch[5].i + scratch[4].r;
+          Fout[m3].r = scratch[5].r + scratch[4].i;
+          Fout[m3].i = scratch[5].i - scratch[4].r;
+          ++Fout;
+       } while(--k);
+    } else
+    {
+       do {
+          C_MUL(scratch[0],Fout[m] , *tw1 );
+          C_MUL(scratch[1],Fout[m2] , *tw2 );
+          C_MUL(scratch[2],Fout[m3] , *tw3 );
+          
+          C_SUB( scratch[5] , *Fout, scratch[1] );
+          C_ADDTO(*Fout, scratch[1]);
+          C_ADD( scratch[3] , scratch[0] , scratch[2] );
+          C_SUB( scratch[4] , scratch[0] , scratch[2] );
+          C_SUB( Fout[m2], *Fout, scratch[3] );
+          tw1 += fstride;
+          tw2 += fstride*2;
+          tw3 += fstride*3;
+          C_ADDTO( *Fout , scratch[3] );
+          
+          Fout[m].r = scratch[5].r + scratch[4].i;
+          Fout[m].i = scratch[5].i - scratch[4].r;
+          Fout[m3].r = scratch[5].r - scratch[4].i;
+          Fout[m3].i = scratch[5].i + scratch[4].r;
+          ++Fout;
+       }while(--k);
+    }
+}
+
+static void kf_bfly3(
+         kiss_fft_cpx * Fout,
+         const size_t fstride,
+         const kiss_fft_cfg st,
+         size_t m
+         )
+{
+     size_t k=m;
+     const size_t m2 = 2*m;
+     kiss_fft_cpx *tw1,*tw2;
+     kiss_fft_cpx scratch[5];
+     kiss_fft_cpx epi3;
+     epi3 = st->twiddles[fstride*m];
+
+     tw1=tw2=st->twiddles;
+
+     do{
+        if (!st->inverse) {
+         C_FIXDIV(*Fout,3); C_FIXDIV(Fout[m],3); C_FIXDIV(Fout[m2],3);
+	}
+
+         C_MUL(scratch[1],Fout[m] , *tw1);
+         C_MUL(scratch[2],Fout[m2] , *tw2);
+
+         C_ADD(scratch[3],scratch[1],scratch[2]);
+         C_SUB(scratch[0],scratch[1],scratch[2]);
+         tw1 += fstride;
+         tw2 += fstride*2;
+
+         Fout[m].r = Fout->r - HALF_OF(scratch[3].r);
+         Fout[m].i = Fout->i - HALF_OF(scratch[3].i);
+
+         C_MULBYSCALAR( scratch[0] , epi3.i );
+
+         C_ADDTO(*Fout,scratch[3]);
+
+         Fout[m2].r = Fout[m].r + scratch[0].i;
+         Fout[m2].i = Fout[m].i - scratch[0].r;
+
+         Fout[m].r -= scratch[0].i;
+         Fout[m].i += scratch[0].r;
+
+         ++Fout;
+     }while(--k);
+}
+
+static void kf_bfly5(
+        kiss_fft_cpx * Fout,
+        const size_t fstride,
+        const kiss_fft_cfg st,
+        int m
+        )
+{
+    kiss_fft_cpx *Fout0,*Fout1,*Fout2,*Fout3,*Fout4;
+    int u;
+    kiss_fft_cpx scratch[13];
+    kiss_fft_cpx * twiddles = st->twiddles;
+    kiss_fft_cpx *tw;
+    kiss_fft_cpx ya,yb;
+    ya = twiddles[fstride*m];
+    yb = twiddles[fstride*2*m];
+
+    Fout0=Fout;
+    Fout1=Fout0+m;
+    Fout2=Fout0+2*m;
+    Fout3=Fout0+3*m;
+    Fout4=Fout0+4*m;
+
+    tw=st->twiddles;
+    for ( u=0; u<m; ++u ) {
+        if (!st->inverse) {
+        C_FIXDIV( *Fout0,5); C_FIXDIV( *Fout1,5); C_FIXDIV( *Fout2,5); C_FIXDIV( *Fout3,5); C_FIXDIV( *Fout4,5);
+	}
+        scratch[0] = *Fout0;
+
+        C_MUL(scratch[1] ,*Fout1, tw[u*fstride]);
+        C_MUL(scratch[2] ,*Fout2, tw[2*u*fstride]);
+        C_MUL(scratch[3] ,*Fout3, tw[3*u*fstride]);
+        C_MUL(scratch[4] ,*Fout4, tw[4*u*fstride]);
+
+        C_ADD( scratch[7],scratch[1],scratch[4]);
+        C_SUB( scratch[10],scratch[1],scratch[4]);
+        C_ADD( scratch[8],scratch[2],scratch[3]);
+        C_SUB( scratch[9],scratch[2],scratch[3]);
+
+        Fout0->r += scratch[7].r + scratch[8].r;
+        Fout0->i += scratch[7].i + scratch[8].i;
+
+        scratch[5].r = scratch[0].r + S_MUL(scratch[7].r,ya.r) + S_MUL(scratch[8].r,yb.r);
+        scratch[5].i = scratch[0].i + S_MUL(scratch[7].i,ya.r) + S_MUL(scratch[8].i,yb.r);
+
+        scratch[6].r =  S_MUL(scratch[10].i,ya.i) + S_MUL(scratch[9].i,yb.i);
+        scratch[6].i = -S_MUL(scratch[10].r,ya.i) - S_MUL(scratch[9].r,yb.i);
+
+        C_SUB(*Fout1,scratch[5],scratch[6]);
+        C_ADD(*Fout4,scratch[5],scratch[6]);
+
+        scratch[11].r = scratch[0].r + S_MUL(scratch[7].r,yb.r) + S_MUL(scratch[8].r,ya.r);
+        scratch[11].i = scratch[0].i + S_MUL(scratch[7].i,yb.r) + S_MUL(scratch[8].i,ya.r);
+        scratch[12].r = - S_MUL(scratch[10].i,yb.i) + S_MUL(scratch[9].i,ya.i);
+        scratch[12].i = S_MUL(scratch[10].r,yb.i) - S_MUL(scratch[9].r,ya.i);
+
+        C_ADD(*Fout2,scratch[11],scratch[12]);
+        C_SUB(*Fout3,scratch[11],scratch[12]);
+
+        ++Fout0;++Fout1;++Fout2;++Fout3;++Fout4;
+    }
+}
+
+/* perform the butterfly for one stage of a mixed radix FFT */
+static void kf_bfly_generic(
+        kiss_fft_cpx * Fout,
+        const size_t fstride,
+        const kiss_fft_cfg st,
+        int m,
+        int p
+        )
+{
+    int u,k,q1,q;
+    kiss_fft_cpx * twiddles = st->twiddles;
+    kiss_fft_cpx t;
+    int Norig = st->nfft;
+
+    CHECKBUF(scratchbuf,nscratchbuf,p);
+
+    for ( u=0; u<m; ++u ) {
+        k=u;
+        for ( q1=0 ; q1<p ; ++q1 ) {
+            scratchbuf[q1] = Fout[ k  ];
+        if (!st->inverse) {
+            C_FIXDIV(scratchbuf[q1],p);
+	}
+            k += m;
+        }
+
+        k=u;
+        for ( q1=0 ; q1<p ; ++q1 ) {
+            int twidx=0;
+            Fout[ k ] = scratchbuf[0];
+            for (q=1;q<p;++q ) {
+                twidx += fstride * k;
+                if (twidx>=Norig) twidx-=Norig;
+                C_MUL(t,scratchbuf[q] , twiddles[twidx] );
+                C_ADDTO( Fout[ k ] ,t);
+            }
+            k += m;
+        }
+    }
+}
+
+static
+void kf_work(
+        kiss_fft_cpx * Fout,
+        const kiss_fft_cpx * f,
+        const size_t fstride,
+        int in_stride,
+        int * factors,
+        const kiss_fft_cfg st
+        )
+{
+    kiss_fft_cpx * Fout_beg=Fout;
+    const int p=*factors++; /* the radix  */
+    const int m=*factors++; /* stage's fft length/p */
+    const kiss_fft_cpx * Fout_end = Fout + p*m;
+
+    if (m==1) {
+        do{
+            *Fout = *f;
+            f += fstride*in_stride;
+        }while(++Fout != Fout_end );
+    }else{
+        do{
+            kf_work( Fout , f, fstride*p, in_stride, factors,st);
+            f += fstride*in_stride;
+        }while( (Fout += m) != Fout_end );
+    }
+
+    Fout=Fout_beg;
+
+    switch (p) {
+        case 2: kf_bfly2(Fout,fstride,st,m); break;
+        case 3: kf_bfly3(Fout,fstride,st,m); break; 
+        case 4: kf_bfly4(Fout,fstride,st,m); break;
+        case 5: kf_bfly5(Fout,fstride,st,m); break; 
+        default: kf_bfly_generic(Fout,fstride,st,m,p); break;
+    }
+}
+
+/*  facbuf is populated by p1,m1,p2,m2, ...
+    where 
+    p[i] * m[i] = m[i-1]
+    m0 = n                  */
+static 
+void kf_factor(int n,int * facbuf)
+{
+    int p=4;
+
+    /*factor out powers of 4, powers of 2, then any remaining primes */
+    do {
+        while (n % p) {
+            switch (p) {
+                case 4: p = 2; break;
+                case 2: p = 3; break;
+                default: p += 2; break;
+            }
+            if (p>32000 || (spx_int32_t)p*(spx_int32_t)p > n)
+                p = n;          /* no more factors, skip to end */
+        }
+        n /= p;
+        *facbuf++ = p;
+        *facbuf++ = n;
+    } while (n > 1);
+}
+/*
+ *
+ * User-callable function to allocate all necessary storage space for the fft.
+ *
+ * The return value is a contiguous block of memory, allocated with malloc.  As such,
+ * It can be freed with free(), rather than a kiss_fft-specific function.
+ * */
+kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem )
+{
+    kiss_fft_cfg st=NULL;
+    size_t memneeded = sizeof(struct kiss_fft_state)
+        + sizeof(kiss_fft_cpx)*(nfft-1); /* twiddle factors*/
+
+    if ( lenmem==NULL ) {
+        st = ( kiss_fft_cfg)KISS_FFT_MALLOC( memneeded );
+    }else{
+        if (mem != NULL && *lenmem >= memneeded)
+            st = (kiss_fft_cfg)mem;
+        *lenmem = memneeded;
+    }
+    if (st) {
+        int i;
+        st->nfft=nfft;
+        st->inverse = inverse_fft;
+#ifdef FIXED_POINT
+        for (i=0;i<nfft;++i) {
+            spx_word32_t phase = i;
+            if (!st->inverse)
+                phase = -phase;
+            kf_cexp2(st->twiddles+i, DIV32(SHL32(phase,17),nfft));
+        }
+#else
+        for (i=0;i<nfft;++i) {
+           const double pi=3.14159265358979323846264338327;
+           double phase = ( -2*pi /nfft ) * i;
+           if (st->inverse)
+              phase *= -1;
+           kf_cexp(st->twiddles+i, phase );
+        }
+#endif
+        kf_factor(nfft,st->factors);
+    }
+    return st;
+}
+
+
+
+    
+void kiss_fft_stride(kiss_fft_cfg st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int in_stride)
+{
+    if (fin == fout) {
+        CHECKBUF(tmpbuf,ntmpbuf,st->nfft);
+        kf_work(tmpbuf,fin,1,in_stride, st->factors,st);
+        speex_move(fout,tmpbuf,sizeof(kiss_fft_cpx)*st->nfft);
+    }else{
+        kf_work( fout, fin, 1,in_stride, st->factors,st );
+    }
+}
+
+void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout)
+{
+    kiss_fft_stride(cfg,fin,fout,1);
+}
+
+
+/* not really necessary to call, but if someone is doing in-place ffts, they may want to free the 
+   buffers from CHECKBUF
+ */ 
+void kiss_fft_cleanup(void)
+{
+    speex_free(scratchbuf);
+    scratchbuf = NULL;
+    nscratchbuf=0;
+    speex_free(tmpbuf);
+    tmpbuf=NULL;
+    ntmpbuf=0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/kiss_fft.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/kiss_fft.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/kiss_fft.h	(revision 1163)
@@ -0,0 +1,108 @@
+#ifndef KISS_FFT_H
+#define KISS_FFT_H
+
+#include <stdlib.h>
+#include <math.h>
+#include "misc.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ ATTENTION!
+ If you would like a :
+ -- a utility that will handle the caching of fft objects
+ -- real-only (no imaginary time component ) FFT
+ -- a multi-dimensional FFT
+ -- a command-line utility to perform ffts
+ -- a command-line utility to perform fast-convolution filtering
+
+ Then see kfc.h kiss_fftr.h kiss_fftnd.h fftutil.c kiss_fastfir.c
+  in the tools/ directory.
+*/
+
+#ifdef USE_SIMD
+# include <xmmintrin.h>
+# define kiss_fft_scalar __m128
+#define KISS_FFT_MALLOC(nbytes) memalign(16,nbytes)
+#else	
+#define KISS_FFT_MALLOC speex_alloc
+#endif	
+
+
+#ifdef FIXED_POINT
+#include "misc.h"	
+#  define kiss_fft_scalar spx_int16_t
+#else
+# ifndef kiss_fft_scalar
+/*  default is float */
+#   define kiss_fft_scalar float
+# endif
+#endif
+
+typedef struct {
+    kiss_fft_scalar r;
+    kiss_fft_scalar i;
+}kiss_fft_cpx;
+
+typedef struct kiss_fft_state* kiss_fft_cfg;
+
+/* 
+ *  kiss_fft_alloc
+ *  
+ *  Initialize a FFT (or IFFT) algorithm's cfg/state buffer.
+ *
+ *  typical usage:      kiss_fft_cfg mycfg=kiss_fft_alloc(1024,0,NULL,NULL);
+ *
+ *  The return value from fft_alloc is a cfg buffer used internally
+ *  by the fft routine or NULL.
+ *
+ *  If lenmem is NULL, then kiss_fft_alloc will allocate a cfg buffer using malloc.
+ *  The returned value should be free()d when done to avoid memory leaks.
+ *  
+ *  The state can be placed in a user supplied buffer 'mem':
+ *  If lenmem is not NULL and mem is not NULL and *lenmem is large enough,
+ *      then the function places the cfg in mem and the size used in *lenmem
+ *      and returns mem.
+ *  
+ *  If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough),
+ *      then the function returns NULL and places the minimum cfg 
+ *      buffer size in *lenmem.
+ * */
+
+kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem); 
+
+/*
+ * kiss_fft(cfg,in_out_buf)
+ *
+ * Perform an FFT on a complex input buffer.
+ * for a forward FFT,
+ * fin should be  f[0] , f[1] , ... ,f[nfft-1]
+ * fout will be   F[0] , F[1] , ... ,F[nfft-1]
+ * Note that each element is complex and can be accessed like
+    f[k].r and f[k].i
+ * */
+void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout);
+
+/*
+ A more generic version of the above function. It reads its input from every Nth sample.
+ * */
+void kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int fin_stride);
+
+/* If kiss_fft_alloc allocated a buffer, it is one contiguous 
+   buffer and can be simply free()d when no longer needed*/
+#define kiss_fft_free speex_free
+
+/*
+ Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up 
+ your compiler output to call this before you exit.
+*/
+void kiss_fft_cleanup(void);
+	
+
+#ifdef __cplusplus
+} 
+#endif
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/kiss_fftr.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/kiss_fftr.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/kiss_fftr.c	(revision 1163)
@@ -0,0 +1,170 @@
+/*
+Copyright (c) 2003-2004, Mark Borgerding
+
+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 author nor the names of any 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 OWNER 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "kiss_fftr.h"
+#include "_kiss_fft_guts.h"
+
+struct kiss_fftr_state{
+    kiss_fft_cfg substate;
+    kiss_fft_cpx * tmpbuf;
+    kiss_fft_cpx * super_twiddles;
+#ifdef USE_SIMD    
+    long pad;
+#endif    
+};
+
+kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem)
+{
+    int i;
+    kiss_fftr_cfg st = NULL;
+    size_t subsize, memneeded;
+
+    if (nfft & 1) {
+        speex_warning("Real FFT optimization must be even.\n");
+        return NULL;
+    }
+    nfft >>= 1;
+
+    kiss_fft_alloc (nfft, inverse_fft, NULL, &subsize);
+    memneeded = sizeof(struct kiss_fftr_state) + subsize + sizeof(kiss_fft_cpx) * ( nfft * 2);
+
+    if (lenmem == NULL) {
+        st = (kiss_fftr_cfg) KISS_FFT_MALLOC (memneeded);
+    } else {
+        if (*lenmem >= memneeded)
+            st = (kiss_fftr_cfg) mem;
+        *lenmem = memneeded;
+    }
+    if (!st)
+        return NULL;
+
+    st->substate = (kiss_fft_cfg) (st + 1); /*just beyond kiss_fftr_state struct */
+    st->tmpbuf = (kiss_fft_cpx *) (((char *) st->substate) + subsize);
+    st->super_twiddles = st->tmpbuf + nfft;
+    kiss_fft_alloc(nfft, inverse_fft, st->substate, &subsize);
+
+#ifdef FIXED_POINT
+    for (i=0;i<nfft;++i) {
+       spx_word32_t phase = i+(nfft>>1);
+       if (!inverse_fft)
+          phase = -phase;
+       kf_cexp2(st->super_twiddles+i, DIV32(SHL32(phase,16),nfft));
+    }
+#else
+    for (i=0;i<nfft;++i) {
+       const double pi=3.14159265358979323846264338327;
+       double phase = pi*(((double)i) /nfft + .5);
+       if (!inverse_fft)
+          phase = -phase;
+       kf_cexp(st->super_twiddles+i, phase );
+    }
+#endif
+    return st;
+}
+
+void kiss_fftr(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata)
+{
+    /* input buffer timedata is stored row-wise */
+    int k,ncfft;
+    kiss_fft_cpx fpnk,fpk,f1k,f2k,tw,tdc;
+
+    if ( st->substate->inverse) {
+        speex_error("kiss fft usage error: improper alloc\n");
+    }
+
+    ncfft = st->substate->nfft;
+
+    /*perform the parallel fft of two real signals packed in real,imag*/
+    kiss_fft( st->substate , (const kiss_fft_cpx*)timedata, st->tmpbuf );
+    /* The real part of the DC element of the frequency spectrum in st->tmpbuf
+     * contains the sum of the even-numbered elements of the input time sequence
+     * The imag part is the sum of the odd-numbered elements
+     *
+     * The sum of tdc.r and tdc.i is the sum of the input time sequence. 
+     *      yielding DC of input time sequence
+     * The difference of tdc.r - tdc.i is the sum of the input (dot product) [1,-1,1,-1... 
+     *      yielding Nyquist bin of input time sequence
+     */
+ 
+    tdc.r = st->tmpbuf[0].r;
+    tdc.i = st->tmpbuf[0].i;
+    C_FIXDIV(tdc,2);
+    CHECK_OVERFLOW_OP(tdc.r ,+, tdc.i);
+    CHECK_OVERFLOW_OP(tdc.r ,-, tdc.i);
+    freqdata[0].r = tdc.r + tdc.i;
+    freqdata[ncfft].r = tdc.r - tdc.i;
+#ifdef USE_SIMD    
+    freqdata[ncfft].i = freqdata[0].i = _mm_set1_ps(0);
+#else
+    freqdata[ncfft].i = freqdata[0].i = 0;
+#endif
+
+    for ( k=1;k <= ncfft/2 ; ++k ) {
+        fpk    = st->tmpbuf[k]; 
+        fpnk.r =   st->tmpbuf[ncfft-k].r;
+        fpnk.i = - st->tmpbuf[ncfft-k].i;
+        C_FIXDIV(fpk,2);
+        C_FIXDIV(fpnk,2);
+
+        C_ADD( f1k, fpk , fpnk );
+        C_SUB( f2k, fpk , fpnk );
+        C_MUL( tw , f2k , st->super_twiddles[k]);
+
+        freqdata[k].r = HALF_OF(f1k.r + tw.r);
+        freqdata[k].i = HALF_OF(f1k.i + tw.i);
+        freqdata[ncfft-k].r = HALF_OF(f1k.r - tw.r);
+        freqdata[ncfft-k].i = HALF_OF(tw.i - f1k.i);
+    }
+}
+
+void kiss_fftri(kiss_fftr_cfg st,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata)
+{
+    /* input buffer timedata is stored row-wise */
+    int k, ncfft;
+
+    if (st->substate->inverse == 0) {
+        speex_error ("kiss fft usage error: improper alloc\n");
+    }
+
+    ncfft = st->substate->nfft;
+
+    st->tmpbuf[0].r = freqdata[0].r + freqdata[ncfft].r;
+    st->tmpbuf[0].i = freqdata[0].r - freqdata[ncfft].r;
+    /*C_FIXDIV(st->tmpbuf[0],2);*/
+
+    for (k = 1; k <= ncfft / 2; ++k) {
+        kiss_fft_cpx fk, fnkc, fek, fok, tmp;
+        fk = freqdata[k];
+        fnkc.r = freqdata[ncfft - k].r;
+        fnkc.i = -freqdata[ncfft - k].i;
+        /*C_FIXDIV( fk , 2 );
+        C_FIXDIV( fnkc , 2 );*/
+
+        C_ADD (fek, fk, fnkc);
+        C_SUB (tmp, fk, fnkc);
+        C_MUL (fok, tmp, st->super_twiddles[k]);
+        C_ADD (st->tmpbuf[k],     fek, fok);
+        C_SUB (st->tmpbuf[ncfft - k], fek, fok);
+#ifdef USE_SIMD        
+        st->tmpbuf[ncfft - k].i *= _mm_set1_ps(-1.0);
+#else
+        st->tmpbuf[ncfft - k].i *= -1;
+#endif
+    }
+    kiss_fft (st->substate, st->tmpbuf, (kiss_fft_cpx *) timedata);
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/kiss_fftr.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/kiss_fftr.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/kiss_fftr.h	(revision 1163)
@@ -0,0 +1,46 @@
+#ifndef KISS_FTR_H
+#define KISS_FTR_H
+
+#include "kiss_fft.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    
+/* 
+ 
+ Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
+
+ 
+ 
+ */
+
+typedef struct kiss_fftr_state *kiss_fftr_cfg;
+
+
+kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem);
+/*
+ nfft must be even
+
+ If you don't care to allocate space, use mem = lenmem = NULL 
+*/
+
+
+void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata);
+/*
+ input timedata has nfft scalar points
+ output freqdata has nfft/2+1 complex points
+*/
+
+void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata);
+/*
+ input freqdata has  nfft/2+1 complex points
+ output timedata has nfft scalar points
+*/
+
+#define kiss_fftr_free speex_free
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lbr_48k_tables.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lbr_48k_tables.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lbr_48k_tables.c	(revision 1163)
@@ -0,0 +1,678 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: lbr_48k_tables.c
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
+const int dummy_epic_48k_variable=0;
+#ifdef EPIC_48K
+
+const signed char gain_cdbk_ulbr[192] = {
+-31, -48, -30, 
+-19, -10, -18, 
+-33, -22, -45, 
+-5, -56, -43, 
+-30, -56, -3, 
+-59, -17, -52, 
+-41, -60, -58, 
+-64, -47, -22, 
+-30, -31, -31, 
+-29, -14, -31, 
+-22, -37, -58, 
+-31, -44, 13, 
+-37, 0, 1, 
+-46, -55, -35, 
+-56, -14, -53, 
+-8, 1, -36, 
+-29, -15, -27, 
+-29, -39, -28, 
+-43, -5, 3, 
+-51, -27, -54, 
+10, -46, -36, 
+3, -3, -42, 
+-27, 16, -22, 
+-34, -52, 13, 
+-31, -21, -28, 
+-34, -45, -40, 
+-20, -48, 4, 
+-40, -27, 16, 
+-6, 11, -44, 
+-35, 12, -5, 
+19, -33, -37, 
+-29, 18, -32, 
+-29, -23, -19, 
+16, -47, -28, 
+-34, -30, 17, 
+-20, 2, -26, 
+-38, -40, -36, 
+15, -14, -40, 
+-39, 14, -9, 
+-15, 25, -39, 
+-26, 19, -32, 
+-39, 17, -14, 
+10, -36, -26, 
+14, -13, -40, 
+-29, -21, -12, 
+-8, 19, -39, 
+-36, -18, 15, 
+-32, -38, -38, 
+-19, 4, -23, 
+-38, -7, 11, 
+9, -10, -39, 
+-37, 24, -19, 
+-34, -5, -8, 
+-20, 23, -41, 
+-4, 17, -31, 
+-17, -26, -26, 
+-24, 28, -36, 
+-7, 15, -39, 
+-42, 16, -11, 
+-29, 14, -6, 
+-36, 28, -27, 
+-21, 5, -26, 
+11, -9, -39, 
+-38, -7, 13, 
+};
+
+
+const signed char exc_12_32_table[384] = {
+34, 55, 9, 55, 4, 44, -2, 25, 4, -6, 13, -22, 
+20, 26, -13, -56, -37, 18, 5, 28, 4, 10, 6, -7, 
+37, -24, -31, 22, 12, -6, -4, -7, 2, 0, -3, -2, 
+-16, -13, -1, 9, -2, 4, 6, 5, -3, 3, 8, -1, 
+-1, -6, -2, -1, 8, 24, 19, 33, -73, -53, 6, -18, 
+14, 7, 11, 8, -33, -94, -5, 7, 0, 44, 1, 19, 
+-9, -7, -34, -16, 8, 2, 5, 0, 3, 1, -2, 3, 
+-22, 6, -2, 12, 16, 30, 39, 25, 25, 2, 10, -2, 
+-1, -40, -6, -51, -5, -48, -9, -33, -14, -1, -24, 15, 
+104, 39, 12, -9, -20, -12, -30, -10, -31, -7, -30, -8, 
+-71, -53, -4, -11, 9, -10, 7, -10, 10, -1, 11, 8, 
+24, 14, 6, -3, 10, 8, 8, 11, -6, 11, 0, -2, 
+-6, -2, 1, -1, -3, 8, -41, 27, 57, -7, 11, -16, 
+-61, 50, 10, -10, 4, -13, 14, -7, 1, 5, -4, 4, 
+0, 2, -1, -2, -1, 1, 1, 0, -1, -1, -2, -3, 
+-3, -15, 69, 60, 10, -10, -10, -29, -21, -7, -16, 2, 
+24, -32, 24, -18, -14, -2, -11, 11, -6, 10, 1, 3, 
+24, -10, 14, 18, -13, 17, -16, 4, -3, -21, -3, -11, 
+-19, 12, -14, 26, 20, -9, 24, -15, 18, 1, -32, -2, 
+-1, 8, -3, 4, 11, -47, 7, 46, -4, -10, -10, -2, 
+-24, 29, -33, 6, -20, -3, 0, -12, 5, -30, 8, -13, 
+28, 9, 5, -11, 0, -14, -13, -22, -12, -8, -4, 1, 
+-6, 28, 45, -18, -31, -5, 1, 2, 1, 5, 0, -3, 
+-19, -10, 10, 27, 8, -16, -28, -9, 2, -5, 8, -1, 
+100, -49, 4, -43, 25, -7, 1, 9, -13, 13, -18, 13, 
+-1, -1, 0, 2, -2, -8, 9, -46, -7, 70, 23, 7, 
+-103, 20, 8, 42, -5, 21, -4, 4, 1, -8, 16, -8, 
+3, 3, 8, 4, 7, -3, -3, -4, 9, 6, 2, 13, 
+6, 3, -15, 11, -43, 31, 40, -13, 12, -21, -2, -3, 
+-10, -9, 16, -35, 31, -3, -12, 8, -34, 7, 12, 22, 
+-3, -4, -7, -12, 24, 53, -19, -43, 4, -3, -4, 6, 
+-18, -30, -58, -17, -11, 17, 23, 34, 30, 28, 28, 15, 
+};
+
+
+const signed char cdbk_lsp_vlbr[5120]={
+23, 34, 108, 100, 102, 82, 69, 48, 52, 25,
+0, -37, -55, -78, -111, -79, 58, 57, 45, 32,
+27, -9, -12, -14, -41, -29, -17, -41, 44, 35,
+-24, -68, -72, 61, 100, 73, 100, 80, 70, 37,
+12, -5, 22, 11, -10, -40, -33, -17, 19, 12,
+-20, -57, -94, -92, 56, 71, 48, 31, 22, -5,
+41, 28, 6, -6, -12, -39, -18, -16, -30, -23,
+65, 54, 41, 28, 23, 9, 26, 18, 22, 6,
+17, -16, -33, -54, -87, -79, 8, -8, 44, 35,
+-20, -62, -78, 22, 78, 47, 44, 33, 26, 14,
+8, 1, 45, 47, 72, 68, 55, 31, 36, 17,
+-27, -68, -86, -65, -10, 23, 8, -22, -31, 25,
+-4, -38, -55, -68, -96, -118, -39, 30, 28, 31,
+-21, -66, -47, 99, 91, 68, 78, 56, 64, 36,
+33, 22, 13, -13, -36, -22, 44, 37, 54, 33,
+-31, -76, -106, -100, -5, 21, 7, -17, 13, 48,
+-26, -65, -84, -84, -46, 67, 97, 66, 58, 31,
+-20, -52, -32, -20, 3, 16, 27, 40, 54, 29,
+-6, -35, -56, -64, -8, -31, -36, 21, 26, -3,
+32, 23, 1, -23, -19, -44, -45, -7, 10, -10,
+-24, -55, 2, 67, 72, 85, 90, 74, 77, 45,
+-21, -58, -45, -49, 16, 34, 13, -15, -16, 16,
+8, -31, -34, -61, -83, 10, 24, 8, 56, 25,
+-8, -49, -74, -95, -123, -77, 6, 40, 46, 42,
+-21, -60, -59, -34, -12, 27, 8, -19, -48, -17,
+-25, -66, -78, -73, -81, -16, 14, 0, -2, 33,
+78, 79, 69, 49, 44, 32, 50, 44, 46, 22,
+24, 9, -4, -18, -37, -56, 22, 34, 22, 11,
+-19, -59, -85, -41, 46, 72, 60, 33, 29, -3,
+-21, -66, -70, 65, 92, 57, 61, 41, 40, 23,
+-4, -41, -60, -72, -102, -106, 4, 56, 57, 31,
+-5, -48, -62, -91, -109, 1, 76, 54, 72, 39,
+-21, -61, -86, -46, -34, -39, 42, 25, 15, 12,
+5, -16, -36, -56, 5, 18, 11, 13, 52, 23,
+12, -6, 30, 40, 59, 40, 27, 8, 19, 6,
+25, 8, -9, -19, -25, -53, -40, -38, -46, -4,
+-17, -59, -83, 2, 58, 29, 18, -2, -17, -5,
+-35, -80, -111, -117, -41, -9, 14, 23, 36, 56,
+48, 67, 93, 71, 77, 91, 110, 95, 83, 47,
+-25, -62, -97, -93, 76, 96, 73, 52, 61, 28,
+-9, -55, -46, 49, 33, 8, 1, -25, 28, 23,
+-10, -47, -60, -45, -62, -58, 56, 57, 48, 28,
+34, 12, -9, 0, 34, 4, 6, 11, 3, -18,
+21, -9, -16, -13, -39, -41, 14, -8, 33, 28,
+-7, -49, -61, 15, 34, 3, 2, -13, -28, -17,
+-14, -50, -46, -65, -76, -13, -10, -29, -30, 22,
+-28, -68, -97, -98, -8, 38, 36, 26, 25, 15,
+6, -33, -9, 1, -28, -11, -19, -24, 61, 36,
+-15, -60, -19, 81, 58, 52, 42, 28, 66, 36,
+-15, -52, -71, -15, 11, -13, 38, 28, 11, -4,
+34, 1, -9, -27, -57, -19, 36, 6, 14, 0,
+-1, -43, -14, 16, -12, -5, -14, -29, -33, -32,
+-13, -57, -75, -100, -111, 1, 2, 13, 48, 33,
+12, 16, 100, 85, 69, 49, 40, 29, 46, 23,
+-4, -26, -41, -44, -7, -26, -39, -27, 18, 0,
+-4, -47, -51, 17, 7, -19, 13, -10, -16, 9,
+-24, -63, -93, -53, 25, 14, 73, 51, 35, 8,
+-34, -77, -106, -83, -51, -47, 2, 12, 41, 53,
+-13, -47, -67, -44, 42, 20, 24, 33, 21, -3,
+11, -15, -29, -51, -79, -88, 22, 56, 43, 20,
+11, -22, -37, -1, 61, 40, 28, 24, 22, -6,
+-3, -33, -50, -66, -93, -100, -16, -16, 3, 41,
+-18, -58, -82, -5, 95, 78, 56, 39, 30, 1,
+-6, -47, -28, -26, -36, 49, 55, 51, 71, 35,
+-6, -50, -42, -4, -32, -1, -1, -18, 67, 40,
+-23, -63, -56, -48, -32, 0, -14, -43, -46, 25,
+-17, -61, -63, 13, -1, 28, 23, 10, 67, 36,
+45, 92, 124, 111, 108, 86, 77, 56, 57, 28,
+50, 35, 13, 3, -2, -32, 3, 14, 6, -8,
+12, -17, -24, -42, -67, -23, 67, 49, 64, 38,
+-21, -60, -90, -45, 32, 6, 7, -3, -15, 9,
+-16, -62, -73, 50, 46, 18, 7, -13, 63, 39,
+19, -16, -19, 20, 5, -15, 16, -9, 5, 8,
+-11, -46, -42, -39, -55, -68, -62, -27, -18, 23,
+-23, -61, -67, -71, -29, 44, 32, 10, -15, -12,
+-6, -45, -43, -40, -67, -22, 42, 19, 61, 38,
+9, -13, -38, -37, 40, 30, 15, 9, 11, -16,
+0, -18, -29, -34, -17, -44, -50, -3, 47, 15,
+-3, -46, -26, 20, -10, 16, 20, -2, 43, 18,
+-23, -46, 46, 91, 99, 100, 99, 79, 72, 42,
+-1, -44, -33, -36, -56, 22, 17, 4, 71, 37,
+0, -38, -49, 0, -1, -30, -21, -35, -44, -6,
+-32, -74, -101, -98, -14, -21, -23, 7, 26, 45,
+8, -28, -44, -63, -96, -84, 34, 21, 13, 23,
+10, -24, -38, -17, -29, -53, -16, -41, -14, 23,
+-19, -61, -76, -12, 97, 99, 79, 60, 59, 25,
+5, -11, -26, -54, -26, -8, -13, 3, 25, 4,
+17, 16, 4, -24, -1, 42, 60, 63, 70, 37,
+10, -27, -22, -43, -62, -7, -16, 10, 75, 40,
+-26, -64, -96, -106, -3, 73, 73, 46, 55, 29,
+-2, -45, -43, 45, 46, 17, 37, 10, 30, 32,
+21, -2, -18, -28, -47, -63, -38, -56, -3, 27,
+-17, -48, -9, 9, 3, 28, 50, 58, 73, 44,
+8, -14, -32, -56, -81, -106, -35, 41, 53, 26,
+1, -38, -51, -66, -100, -61, 32, 17, 66, 42,
+17, 5, -6, -21, -26, -52, -36, 23, 56, 22,
+6, -20, -31, -22, -19, -48, 16, 38, 22, -2,
+-25, -67, -93, -51, 82, 62, 71, 69, 63, 35,
+-12, -51, -71, -60, -76, -91, -14, 41, 35, 20,
+-16, -31, 22, 32, 55, 80, 98, 91, 85, 49,
+-21, -63, -92, -6, 57, 27, 36, 11, 60, 39,
+-7, -45, -67, -81, -114, -110, 0, 24, 23, 45,
+-18, -55, -61, -56, -60, -64, -32, -2, 58, 36,
+-3, -33, -51, -24, 19, -10, -19, 4, 14, -15,
+-19, -59, -81, -12, 7, -12, 36, 16, 48, 36,
+17, -13, -32, -49, -78, -95, -1, -3, -10, 25,
+15, 5, 41, 59, 108, 101, 103, 81, 70, 35,
+-14, -52, -37, 15, 93, 83, 66, 50, 47, 15,
+-3, -31, -49, -52, -9, -31, -10, 37, 62, 27,
+-15, -56, -82, -17, 75, 56, 36, 22, 7, -16,
+-24, -63, -93, -84, 25, 94, 98, 65, 60, 31,
+-2, -45, -39, -61, -61, 48, 35, 32, 54, 18,
+-19, -51, -45, -57, -28, -8, 10, 14, 38, 26,
+-2, -46, -38, 45, 26, 22, 48, 21, 63, 40,
+-22, -61, -73, -75, -67, -31, 13, 18, 51, 34,
+-12, -2, -1, -17, -3, -27, -3, 6, -1, -15,
+-16, -59, -78, 10, 36, 9, 4, -18, 33, 22,
+-25, -62, -97, -107, 39, 87, 69, 46, 42, 12,
+11, -7, -30, -36, 19, 2, -10, -7, -4, -24,
+11, -8, 25, 28, 28, 5, -4, -10, 5, -2,
+-10, -48, -37, -17, -38, -9, -2, -19, -30, -22,
+-23, -61, -79, -81, -2, 15, -4, 17, 20, 2,
+25, -14, -3, -10, -38, 1, 14, -14, -9, -27,
+2, -18, -38, -36, -11, -39, -36, -28, -36, -11,
+32, 59, 127, 124, 127, 108, 91, 68, 64, 34,
+3, -32, -37, -10, -25, -46, 12, 1, -17, -24,
+-29, -69, -102, -100, 2, -7, 11, 14, 1, 31,
+30, -6, -4, -16, -44, -5, 3, -9, 66, 40,
+-9, -45, -52, -5, 37, 19, 26, 6, 51, 32,
+-31, -73, -96, -45, -25, -37, -15, -16, 32, 39,
+3, -15, 18, 21, 28, 33, 58, 58, 69, 42,
+-31, -73, -99, -99, -48, 14, 21, 5, 2, 39,
+7, -35, -20, 29, 2, -8, -8, -28, 38, 26,
+-5, -39, -64, -36, 15, -15, -11, -21, -23, 5,
+-8, -51, -56, 15, -1, -14, -8, -31, 36, 22,
+-8, -53, -68, -98, -101, 42, 49, 38, 41, 12,
+10, -27, -22, 4, -23, -21, 30, -1, 22, 26,
+-13, -56, -42, 31, 9, -1, -10, -2, 22, -4,
+15, 8, 56, 57, 45, 55, 57, 46, 72, 44,
+-7, -53, -26, 53, 21, 17, 0, 0, 74, 41,
+3, -18, -2, 0, 19, 17, 42, 36, 47, 26,
+24, -7, -23, -34, -62, -60, 6, -22, 18, 25,
+-11, -42, -46, -61, -83, -99, -67, -11, 28, 39,
+30, -3, -10, -1, -24, -30, -1, -28, 15, 18,
+19, -15, -10, -6, -35, -26, 33, 10, 56, 39,
+-13, -53, -82, -42, 53, 37, 18, 10, -3, -21,
+-21, -60, -89, -46, 89, 94, 71, 46, 42, 9,
+-2, -34, -44, -46, -64, -84, -1, 37, 16, 0,
+-17, -51, -65, -64, -7, -17, -29, -11, 52, 27,
+22, -15, -16, -39, -55, 26, 36, 21, 62, 28,
+-2, -26, -38, -49, -55, -80, -75, 8, 20, 9,
+-6, -47, -61, -82, -103, -17, -15, -25, 53, 40,
+-8, -47, -66, -18, 56, 43, 25, 29, 39, 3,
+-27, -66, -86, -69, -50, -59, -34, -1, 19, 42,
+3, -20, 2, 21, 72, 57, 52, 36, 31, 7,
+-12, -49, -61, -13, -1, -33, 5, 37, 26, 2,
+-27, -69, -92, -62, 2, 43, 88, 67, 64, 36,
+0, -40, -4, -6, -20, 43, 33, 25, 50, 20,
+14, -20, -30, -44, -73, -37, -24, -47, 26, 20,
+31, 53, 111, 118, 127, 126, 121, 99, 85, 46,
+-14, -45, -51, -39, 24, 5, -6, 17, 46, 14,
+-4, -43, -45, -70, -63, 8, 14, 58, 78, 39,
+-8, -47, -66, -84, -114, -55, 10, -8, 32, 40,
+28, 22, 42, 26, 8, -21, -16, -6, 22, 10,
+24, 10, 34, 31, 35, 31, 46, 39, 59, 36,
+-4, -43, -62, -10, 20, -14, 2, 14, -6, -19,
+-21, -62, -89, -22, 62, 33, 30, 16, 15, 15,
+0, -22, -31, -45, -58, -80, -66, 13, 68, 34,
+-16, -45, -6, 7, -6, -17, -14, -15, 2, 2,
+10, -5, -22, -38, -40, -70, -60, -15, -23, 0,
+22, -11, -22, -39, -67, -25, 30, 5, 58, 37,
+-21, -47, 6, 43, 37, 45, 65, 66, 73, 43,
+2, -25, -40, -53, -72, -94, -35, 24, 9, 8,
+-3, 0, -3, -9, 4, -23, -10, 20, 43, 14,
+-2, -41, -60, -9, 57, 32, 17, 16, 6, -19,
+1, -31, -36, -36, -54, -68, -77, -75, 21, 37,
+-19, -32, 79, 90, 92, 81, 67, 47, 52, 28,
+-6, -36, -57, -62, 27, 40, 21, 11, 9, -19,
+-10, -47, -49, -59, -74, -18, -14, -30, 25, 18,
+-23, -69, -82, 60, 66, 40, 75, 54, 65, 38,
+-19, -57, -92, -68, 66, 58, 34, 18, 1, -16,
+-29, -68, -99, -88, -37, -38, 13, 8, 5, 40,
+-22, -63, -75, 14, 15, 7, 75, 58, 59, 34,
+-23, -62, -82, -39, -31, -53, -27, 5, -3, 20,
+13, -26, -20, 22, 2, -3, 35, 13, 54, 39,
+32, 5, -13, -22, -45, -58, -1, -20, -19, 7,
+30, 46, 70, 55, 89, 88, 91, 67, 56, 28,
+-13, -50, -63, -25, -28, -50, -23, -32, -34, 19,
+-13, -54, -65, -9, -20, -37, 29, 6, 11, 25,
+0, -40, -55, -78, -107, -25, 47, 20, 34, 16,
+-20, -58, -96, -103, 38, 43, 27, 30, 15, -1,
+-16, -49, -52, -66, -80, -57, -44, -39, 6, 38,
+0, -38, 5, 13, -8, 23, 24, 1, 7, -9,
+-18, -56, -64, -7, 38, 13, 11, 32, 28, 0,
+14, -3, -20, -17, 4, -26, -34, -8, 19, -9,
+-23, -60, -83, -38, -8, -32, 11, 19, -1, -5,
+-5, -47, -12, 56, 38, 22, 18, -8, -5, -8,
+18, -4, -24, -16, 27, 2, -6, 5, 25, -5,
+13, 0, -19, -35, -23, -45, -59, -30, 19, 3,
+19, -12, -23, 1, -7, -35, -14, -32, -23, 4,
+-23, -64, -67, -22, -27, -5, -5, -20, 20, 5,
+20, 11, 83, 92, 85, 89, 69, 53, 80, 48,
+15, -2, -21, -29, -18, -48, -52, -12, -11, -21,
+-6, -38, -55, -68, -9, 33, 22, 19, 25, -1,
+-8, -46, -49, -67, -64, 16, 8, -6, 32, 15,
+3, -25, -46, -46, 39, 50, 34, 21, 46, 14,
+8, -33, -37, -68, -82, 31, 34, 13, 19, -6,
+33, 0, 5, -7, -32, 2, 22, -3, 35, 17,
+-23, -62, -91, -64, 6, 3, 36, 26, 7, -3,
+-12, -54, -60, 26, 46, 16, 30, 22, 8, -4,
+-23, -61, -40, 31, 58, 73, 88, 77, 74, 41,
+-2, -42, -49, 13, 5, -15, 22, -4, 26, 27,
+-13, -54, -39, 18, 2, -8, -12, 34, 56, 23,
+-20, -31, 27, 23, 24, 28, 39, 33, 47, 27,
+36, 17, -4, -20, -30, -61, -8, 20, 0, -15,
+-10, -51, -72, -82, -111, -73, 34, 25, 19, 38,
+-10, -45, -63, -55, -46, -75, -45, 34, 34, 12,
+6, -18, 29, 26, 7, -9, 0, 5, 38, 22,
+-7, -52, -16, 69, 43, 26, 23, 2, 51, 34,
+-12, -51, -59, -78, -88, 15, 20, 0, -14, 12,
+-3, -36, -59, -45, 60, 49, 28, 20, 16, -13,
+-28, -70, -90, 9, 67, 48, 90, 77, 70, 38,
+-10, -39, -58, -54, 15, -12, 3, 35, 27, -3,
+12, -1, 28, 29, 55, 53, 80, 65, 51, 23,
+-17, -61, -39, 74, 56, 43, 75, 51, 58, 36,
+-30, -71, -93, -43, -29, -26, 4, -19, -14, 37,
+3, -13, -31, -38, 11, -5, -22, -11, 43, 14,
+-25, -65, -80, -79, -71, 3, 37, 32, 20, 9,
+-20, -60, -77, -26, 18, 43, 44, 24, 22, -3,
+-4, -42, -22, -19, -45, -32, -35, -39, -46, 1,
+-25, -59, -27, -10, -7, -4, 7, 13, 25, 12,
+8, -25, -32, -47, -74, -32, 27, 6, 25, 7,
+41, 40, 62, 64, 64, 50, 54, 42, 49, 25,
+-21, -63, -88, -21, 16, -3, -4, -26, 57, 38,
+8, -25, -34, 2, -8, -28, 2, -22, 12, 23,
+-19, -49, 10, 71, 84, 71, 66, 48, 42, 22,
+-20, -58, -89, -57, 62, 44, 33, 36, 25, -1,
+-22, -55, -27, 1, 43, 37, 46, 50, 51, 26,
+1, -38, -46, 22, 34, 4, 20, -2, 3, 9,
+-4, -42, -49, -75, -89, -24, -25, 19, 71, 39,
+5, -28, -45, -43, -63, -75, -17, -38, 14, 30,
+-4, -36, -62, -59, -29, -43, -4, -16, 11, 23,
+-19, -57, -82, -39, 26, 2, -2, 20, 11, -10,
+-28, -68, -92, -70, 9, -1, -15, -30, 11, 31,
+1, -22, -41, -49, -30, -58, -48, 8, 4, -9,
+38, 41, 108, 115, 96, 98, 103, 84, 86, 51,
+15, 1, 58, 46, 26, 6, 16, 18, 41, 24,
+4, -34, -14, -27, -42, 20, 18, 2, 23, 1,
+-22, -59, -83, -70, -22, -42, -26, 29, 29, 15,
+-14, -34, 11, -1, -21, -35, -3, 1, 29, 16,
+-16, -57, -78, -7, 17, -13, 8, -13, -6, 22,
+-22, -32, -21, -20, 20, -4, 10, 13, 12, -4,
+8, -30, -30, -46, -71, -4, 3, -11, 4, -11,
+16, 5, -15, -21, 3, -23, -25, -19, -28, -32,
+-28, -68, -98, -101, -34, 19, 71, 52, 49, 30,
+-18, -57, -82, -56, -56, -66, 15, 12, 1, 29,
+-21, -62, -76, -27, -33, -38, 18, 30, 54, 32,
+3, -36, -10, -17, -34, -3, -8, 32, 63, 27,
+1, -30, -44, -20, -13, -49, -25, 3, -14, -18,
+-26, -68, -80, -46, -28, 17, 42, 37, 58, 34,
+30, 26, 57, 55, 49, 25, 16, 3, 24, 11,
+35, 35, 67, 57, 60, 82, 114, 103, 93, 55,
+18, -8, -23, -32, -53, -68, 15, 11, -6, -7,
+-2, -43, -29, 0, -28, -5, -5, -15, 25, -1,
+4, -13, -35, -45, 14, -6, -2, 19, 16, -9,
+-30, -72, -93, -93, -73, -10, -15, 6, 30, 45,
+-23, -58, -50, -55, -74, -60, -23, 0, 6, 21,
+-4, -40, -63, -24, 7, -19, 4, -18, 27, 28,
+-12, 1, 88, 76, 74, 88, 93, 90, 80, 44,
+-13, -59, -43, 52, 27, 21, 15, 12, 42, 11,
+22, -14, -17, -33, -57, -4, 5, -18, 40, 18,
+-3, -23, -43, -44, 8, -16, -14, -4, -20, -29,
+35, 45, 75, 82, 111, 117, 125, 105, 89, 51,
+-3, -38, -57, -30, 79, 71, 48, 33, 33, 0,
+-17, -62, -57, 66, 67, 35, 29, 5, 22, 17,
+3, -31, -34, -21, -44, -49, 42, 23, 24, 26,
+-23, -62, -74, -49, -30, -30, -37, -50, 9, 35,
+-17, -57, -71, -81, -45, 61, 58, 37, 31, 9,
+3, -7, 28, 14, -2, 0, 40, 41, 58, 33,
+-11, -51, -74, -17, 40, 12, 8, 13, -4, -22,
+-16, -46, -31, -35, -49, -49, -26, -9, -7, -7,
+17, -9, -24, -41, -68, -73, 38, 33, 19, 16,
+-15, -50, -47, -16, -24, -21, 59, 56, 53, 30,
+-14, -54, -57, 2, -17, -33, -34, -21, 4, -4,
+-23, -62, -93, -72, 48, 31, 21, 6, 3, 17,
+-18, -63, -79, 44, 68, 36, 45, 20, 57, 37,
+-29, -72, -99, -111, -86, -31, 7, 25, 39, 55,
+-14, -49, -53, -63, -80, -31, 24, 13, 1, -1,
+-9, -45, -55, -27, -31, -63, -23, 25, 13, -5,
+-20, -61, -80, 7, 44, 16, 54, 40, 32, 17,
+24, 7, -8, -43, -62, -54, -11, 7, 35, 27,
+-12, -55, -59, -48, -69, -4, -1, -12, 68, 39,
+-12, -31, 52, 63, 53, 34, 29, 22, 36, 19,
+-26, -66, -97, -79, 50, 41, 40, 48, 54, 28,
+-2, -37, -41, -2, -11, -30, 29, 16, 4, -2,
+40, 49, 56, 37, 39, 40, 64, 59, 67, 39,
+11, -5, 20, 14, 25, 16, 25, 22, 37, 17,
+-3, -43, -46, -10, -35, -38, -35, -39, 67, 43,
+-7, -47, -33, -39, -60, -12, -18, 11, 43, 11,
+-25, -65, -91, -76, -91, -81, 0, 13, 34, 50,
+-9, -50, -52, 17, 0, -4, 43, 18, 63, 42,
+-8, -15, 15, 41, 56, 35, 51, 45, 51, 29,
+0, -14, -24, -36, -43, -70, -39, 27, 33, 5,
+-25, -62, -81, -66, -12, -26, -16, -4, -13, 21,
+-29, -68, -60, -24, -3, 11, 18, 19, 30, 20,
+1, -35, -42, -30, -57, -51, 13, -17, 3, 22,
+-8, -27, -12, -2, -7, -21, 36, 41, 34, 12,
+-17, -56, -62, -72, -73, -17, -26, 9, 16, 13,
+11, -21, -37, -3, 16, -17, 1, -3, -18, -19,
+15, -20, -19, -22, -49, -30, -7, -29, 3, -2,
+17, -4, 11, 6, 51, 40, 36, 34, 48, 22,
+-19, -55, -29, 37, 68, 49, 45, 33, 42, 23,
+7, -30, -22, 3, -22, -36, -36, -54, 20, 22,
+20, 2, -15, -39, -59, -85, -10, 37, 21, 2,
+-15, -54, -77, -54, 74, 70, 48, 32, 51, 20,
+-25, -64, -70, -75, -52, 17, 6, -20, -30, 26,
+-13, -55, -15, 39, 16, 42, 30, 33, 62, 28,
+-21, -56, -30, -35, 6, 13, -4, -29, 33, 27,
+-17, -55, -75, -31, 3, -28, -26, 16, 18, -4,
+-13, -44, -60, -52, -9, -36, -38, 1, -9, -9,
+-12, -50, -77, -70, 43, 47, 28, 13, 43, 16,
+-13, -57, -80, -104, -113, -30, 43, 45, 52, 39,
+3, -28, -42, -37, -58, -67, 23, 4, 38, 33,
+-21, -64, -74, -22, 43, 83, 81, 56, 62, 32,
+34, 26, 23, 9, 14, 17, 26, 16, 37, 19,
+-5, -48, -49, -75, -65, 9, -6, 41, 45, 15,
+32, 30, 63, 83, 90, 91, 100, 84, 85, 52,
+-19, -54, -68, -71, 11, 30, 13, 1, 63, 37,
+44, 76, 99, 87, 117, 113, 103, 77, 64, 32,
+-16, -45, -12, 30, 27, 15, 57, 49, 42, 22,
+9, -15, -31, -28, -36, -61, -13, -18, -33, -5,
+-12, -55, -8, 82, 64, 47, 42, 21, 27, 9,
+-15, -56, -74, -12, -19, -28, 7, -16, 53, 38,
+-7, -45, -64, -55, -74, -80, 35, 45, 24, 15,
+-25, -48, -34, -42, -6, -27, -9, 9, 13, -7,
+-25, -65, -84, -35, 30, 14, 24, 39, 48, 28,
+-22, -62, -86, -51, 64, 104, 94, 61, 62, 31,
+16, -15, -25, -28, -55, -56, -10, -23, 52, 36,
+10, -10, -22, -46, -71, -92, -45, -13, 16, 26,
+-22, -65, -84, 17, 85, 55, 66, 48, 55, 31,
+-1, -38, -33, -25, -49, -15, 18, -10, 41, 30,
+-3, -24, -47, -60, -30, -46, -17, -13, -27, 1,
+-7, -41, -61, -54, -50, -78, -28, 5, -2, 20,
+17, -12, -27, -4, 8, -27, -5, 23, 14, -12,
+-36, -81, -111, -75, -17, -9, 9, 9, 39, 49,
+-13, -59, -54, 68, 51, 32, 35, 14, 64, 38,
+-11, -44, -69, -57, 11, -11, -5, 3, -16, -15,
+34, 36, 41, 16, -8, -24, 11, 23, 48, 28,
+-17, -42, 8, 17, 45, 69, 71, 55, 49, 23,
+3, -30, -46, -64, -95, -109, 2, 39, 19, 19,
+25, -13, -7, 16, -11, -5, 8, -11, 52, 33,
+-8, -37, -57, -60, 13, 7, -14, -4, 20, -7,
+7, -31, 9, 44, 20, 22, 29, 10, 52, 31,
+3, -22, -36, -53, -80, -77, -35, -41, 54, 41,
+-21, -59, -87, -83, 12, 69, 57, 36, 32, 2,
+6, -14, -34, -42, -4, -32, -27, 10, 4, -20,
+-11, -56, -59, 25, 8, -5, -9, -26, 68, 43,
+22, 13, 40, 39, 73, 81, 95, 88, 82, 45,
+-18, -62, -79, 28, 60, 28, 29, 3, 23, 25,
+6, -31, -39, -55, -85, -32, 7, -17, 48, 30,
+7, -24, -42, -8, 39, 10, 7, 11, 1, -20,
+-1, -36, -26, -30, -48, 2, 46, 26, 35, 14,
+-17, -57, -56, -10, -4, 26, 22, 6, -4, -16,
+-18, -55, -59, -67, -86, -50, 3, 29, 29, 16,
+-25, -61, -33, 2, 26, 25, 23, 10, 24, 16,
+26, 15, -8, -20, 6, -21, -16, 3, 0, -22,
+13, -17, -26, -12, -31, -48, 15, -3, 1, 14,
+4, -27, -33, -21, -29, -53, -52, -64, -42, 22,
+-11, -41, -42, -40, -42, -64, 0, 48, 50, 19,
+-13, -47, -42, -56, -50, 10, 3, -9, -30, -16,
+-4, -47, -12, 14, -13, 21, 13, 6, 73, 40,
+-15, -50, -63, -41, -31, -55, -60, -13, 28, 15,
+-6, -50, -56, -81, -95, 30, 29, 21, 71, 35,
+-14, -58, -65, 37, 40, 9, 18, -10, -4, 20,
+31, 33, 79, 106, 119, 103, 100, 77, 64, 33,
+14, 7, 56, 81, 97, 85, 85, 61, 45, 20,
+-24, -66, -74, -51, -17, 16, 5, -21, 22, 26,
+-1, -25, -38, -24, -2, -35, -26, 21, 34, 1,
+20, 15, 75, 59, 39, 26, 48, 43, 50, 29,
+26, 1, -15, -4, -9, -38, 9, 2, -9, -8,
+20, 14, 19, 13, 2, -16, 24, 25, 19, 3,
+-8, -41, -58, -78, -109, -106, -27, 9, 53, 46,
+17, 5, -13, -25, -24, -54, -20, 2, -21, -25,
+-11, -50, -48, 19, 10, -7, 46, 26, 24, 17,
+-28, -68, -69, -50, -49, -33, -7, 10, 20, 21,
+4, -36, -21, 38, 19, 1, 25, -3, 20, 22,
+-18, -58, -87, -44, 82, 73, 49, 31, 19, -7,
+-21, -61, -78, -44, -58, -66, -9, -23, 10, 40,
+-25, -66, -76, -33, -33, 6, 16, -6, -21, 5,
+-27, -69, -77, 5, -2, -7, 6, 9, 24, 6,
+1, -41, -41, -58, -79, 25, 69, 43, 68, 36,
+-28, -67, -85, -71, -34, 0, 14, 12, -2, 4,
+-2, -33, -55, -37, 37, 25, 6, 6, 29, -4,
+-8, -25, -11, -9, 40, 23, 17, 25, 37, 12,
+-21, -27, 52, 60, 47, 58, 76, 70, 69, 38,
+23, 15, 22, -8, -32, -50, -10, 3, 31, 21,
+-10, -44, -67, -61, -29, -54, 8, 39, 21, 4,
+31, 18, 30, 36, 46, 28, 50, 42, 35, 13,
+-21, -57, -24, -16, -15, 14, 3, -25, -17, 20,
+23, 6, 24, 35, 90, 72, 64, 55, 55, 23,
+7, -28, -42, -19, -36, -50, -15, -40, 29, 28,
+-21, -59, -66, -59, -6, 85, 83, 53, 54, 26,
+2, -20, -42, -52, -27, -49, 5, 9, -9, -8,
+-18, -56, -84, -72, 24, 51, 32, 20, 13, -10,
+-13, -53, -64, -39, -63, -40, 24, 0, 34, 29,
+0, -31, -45, -63, -90, -53, 3, -18, -9, 24,
+-13, -57, -71, 27, 19, -3, 25, -3, 45, 35,
+12, -9, -26, -40, -51, -78, -24, 11, -9, -6,
+-12, -49, -45, -33, -50, -48, -46, -52, 2, 25,
+-14, -56, -84, -108, -122, -50, 4, 22, 42, 53,
+-6, -44, -54, -28, -41, -61, 19, 25, 6, 1,
+-32, -75, -95, -38, -1, -15, 7, 14, 23, 23,
+11, 12, 37, 30, 38, 51, 80, 80, 82, 47,
+-19, -56, -69, -82, -98, -64, -29, 2, 28, 42,
+-18, -49, 3, 34, 41, 39, 32, 18, 21, 7,
+-8, 23, 39, 30, 30, 27, 41, 36, 44, 23,
+-16, -49, -69, -46, 1, -27, 41, 48, 35, 15,
+6, -32, -36, 5, -17, -30, 2, -16, 51, 35,
+-23, -64, -91, -21, 71, 44, 52, 44, 40, 21,
+-22, -55, -40, -20, 62, 52, 38, 29, 27, 5,
+-27, -69, -75, -6, -8, 3, -2, -30, -42, 13,
+2, -29, -42, -10, 29, 2, 15, 30, 26, 0,
+-27, -69, -85, -75, -54, -8, -14, -31, 16, 42,
+-2, -44, -54, -75, -101, -6, 4, -3, 32, 13,
+7, -3, -22, -43, -14, -27, -24, -11, -14, -12,
+-18, -57, -85, -66, 47, 86, 75, 45, 42, 10,
+18, 3, 39, 76, 80, 48, 48, 41, 44, 21,
+-13, -51, -73, -22, -15, -41, 3, -4, -22, 3,
+-10, -50, -63, -9, -23, -42, -6, -30, 11, 28,
+15, -11, -29, -39, -57, -71, -23, -40, -33, 20,
+-2, -40, -48, -5, -21, -25, 31, 7, 53, 35,
+-19, -63, -72, 39, 34, 16, 37, 17, 54, 31,
+-18, -49, -28, -27, -40, -29, 4, 4, 19, 11,
+-1, -43, -41, 24, 15, -12, -4, -31, -4, 23,
+-11, -46, -79, -74, 34, 21, 9, 15, 3, -13,
+-16, -51, -56, -55, 8, 62, 50, 30, 43, 14,
+-1, -25, -27, -32, -46, -62, -66, -36, 53, 32,
+-12, -49, -77, -50, 2, -21, 23, 6, 14, 21,
+-5, -47, -58, -77, -105, -14, 30, 9, 73, 44,
+-24, -52, -4, 10, 13, 13, 27, 27, 42, 24,
+-10, -38, -27, -15, -24, -52, -53, 1, 14, -6,
+-17, -45, -13, 2, 19, 53, 83, 79, 76, 43,
+-21, -62, -86, -48, 40, 17, 14, -9, 40, 30,
+-1, -32, -51, -33, -3, -35, 2, 17, -2, -12,
+-21, -60, -85, -70, 33, 73, 58, 37, 67, 36,
+-1, -45, -39, 37, 17, 3, 18, -8, 53, 35,
+-8, -47, -65, -61, -87, -93, 9, 9, 2, 33,
+-13, -55, -56, -19, -29, 14, 17, 6, 55, 28,
+5, 1, -7, -23, -26, -56, -39, 14, 11, -13,
+-28, -69, -89, -74, -83, -45, 1, 0, 16, 45,
+-3, 5, 91, 104, 119, 111, 97, 76, 72, 39,
+19, 5, -12, -34, -41, -72, -67, 14, 21, 1,
+-17, -49, 15, 27, 13, 6, 2, 12, 27, 10,
+-10, -30, 18, 36, 93, 87, 87, 69, 58, 26,
+37, 32, 64, 54, 53, 67, 78, 73, 80, 48,
+48, 46, 38, 9, -1, 8, 47, 44, 58, 33,
+-23, -61, -88, -76, 27, 14, 9, 36, 36, 10,
+-24, -66, -88, -97, -55, 20, 19, 16, 52, 31,
+4, -16, -1, -8, 2, 0, 15, 13, 29, 14,
+-9, -44, -66, -72, 8, 32, 37, 38, 46, 16,
+-22, -65, -62, 30, 22, 51, 57, 45, 68, 38,
+-4, -42, -53, -33, -54, -53, -4, -18, 62, 40,
+-5, -37, -61, -41, 35, 15, -2, -3, -12, -28,
+-18, -65, -55, 90, 80, 49, 44, 21, 59, 36,
+5, -16, -31, -32, -37, -62, -19, -11, 9, 16,
+-22, -60, -67, -51, -61, -35, -5, -18, -27, 24,
+-18, -55, -39, -42, -40, 20, 25, 6, 6, 7,
+0, -25, -42, -50, -59, -84, -31, -13, -22, 17,
+-32, -73, -100, -89, -21, -10, 18, 38, 31, 23,
+-15, -54, -57, -13, -18, -41, -32, 17, 50, 21,
+-16, -57, -71, -10, -8, -26, -38, -47, 42, 25,
+-17, -58, -82, -7, 33, 3, 30, 11, 13, 24,
+-23, -61, -97, -83, 82, 81, 57, 39, 31, 2,
+26, 32, 104, 86, 62, 55, 77, 70, 74, 43,
+-8, -29, -33, -52, -74, -73, -17, 14, 39, 25,
+-21, -60, -68, -22, 43, 37, 51, 54, 64, 36,
+-5, -30, -50, -52, 22, 7, 10, 13, 0, -20,
+-15, -53, -61, -34, -50, -25, 15, 6, 0, -14,
+-10, -51, -60, 20, 77, 50, 34, 22, 8, -8,
+-8, -45, -52, -59, -76, -35, -43, -49, 47, 40,
+41, 44, 53, 40, 41, 30, 38, 31, 46, 24,
+19, 3, -15, -26, -16, -45, -13, 24, 18, -5,
+-3, -39, -54, -35, -49, -70, 2, -6, -19, 15,
+-13, -53, -36, 6, -3, 45, 50, 30, 33, 10,
+15, -25, -16, -4, -32, 7, 23, 6, 67, 36,
+-21, -58, -87, -71, 10, -12, -16, 19, 10, 0,
+9, -15, -6, 25, 31, 7, 30, 28, 20, 2,
+2, -28, -42, -50, -67, -75, 12, 12, -4, 8,
+-17, -63, -58, 56, 49, 36, 60, 38, 37, 14,
+-13, -48, -38, -29, -44, -25, -20, -33, 38, 20,
+2, -37, -42, -1, -18, -42, 3, -17, -19, 12,
+-20, -60, -73, -7, 12, -13, -22, -38, 4, 10,
+-8, -41, -63, -65, 42, 63, 45, 31, 31, 0,
+-4, -46, -38, -9, -35, 15, 50, 27, 67, 39,
+3, -7, -13, -34, -51, -47, 9, 39, 54, 29,
+-29, -71, -89, -52, -39, -6, 3, 2, 38, 28,
+-14, -42, -13, -15, -19, 0, 20, 12, 37, 25,
+11, -26, -24, -40, -65, -11, -13, -27, 65, 37,
+0, -31, -46, -17, -21, -45, 11, -2, 25, 24,
+51, 91, 102, 87, 85, 63, 57, 42, 48, 23,
+-4, -34, -56, -70, -10, -14, 4, 18, 3, -8,
+-23, -59, -39, -44, -42, -14, -10, -23, -4, 17,
+-2, 4, 35, 63, 69, 75, 82, 63, 78, 48,
+-17, -55, -60, -3, -4, -19, 4, -4, -18, -29,
+2, -20, -36, -50, -32, -59, -16, 30, 16, -6,
+-12, -47, 24, 68, 45, 46, 41, 32, 65, 37,
+-4, -40, -54, -67, -96, -66, -9, -25, 42, 38,
+-15, 13, 58, 58, 84, 104, 119, 104, 89, 51,
+-15, -24, -9, -24, -27, -50, -7, 28, 29, 6,
+-7, -33, -35, -49, -65, -53, -37, -10, 33, 14,
+31, 19, 46, 72, 67, 45, 83, 68, 63, 41,
+-14, -53, -59, -17, 55, 79, 64, 39, 43, 10,
+};
+
+const signed char cdbk_lsp2_vlbr[160]={
+-20, -30, -24, 17, 7, -13, -21, 61, 56, 16,
+12, 1, 10, 77, 32, 3, 7, 3, -25, -31,
+-4, 2, -36, -83, 18, 5, -5, 5, 11, 23,
+-2, -1, -11, -12, -20, -28, 68, 50, -17, -20,
+5, 2, 1, 20, 17, 4, -52, -66, 36, 24,
+-4, -10, 7, -15, -32, 80, 37, 8, -13, -29,
+33, 37, 28, 15, 8, 14, 35, 18, 50, 36,
+-4, -1, 4, -7, 3, 3, -11, -58, -75, 13,
+13, 21, 24, -11, -12, -38, -72, 33, 15, -12,
+-44, -17, 83, 21, 2, 7, 0, 4, 0, -1,
+-25, -42, -51, 33, 20, 15, 30, -13, 9, 32,
+6, 2, -8, 7, -38, -77, 6, -13, -7, 32,
+48, 57, 32, -12, -10, -4, 2, -15, -29, -29,
+2, 10, -9, -16, 79, 44, 7, 12, -5, -18,
+-23, -29, -35, -3, -3, -18, -34, -3, -39, -50,
+-5, -10, -8, -37, -76, 11, -4, -19, 30, 16,
+};
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lpc.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lpc.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lpc.h	(revision 1163)
@@ -0,0 +1,53 @@
+/* Copyright (C) 2002 Jean-Marc Valin */
+/**
+   @file lpc.h
+   @brief Functions for LPC (Linear Prediction Coefficients) analysis
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef LPC_H
+#define LPC_H
+
+#include "misc.h"
+
+void _spx_autocorr(
+              const spx_word16_t * x,   /*  in: [0...n-1] samples x   */
+              spx_word16_t *ac,   /* out: [0...lag-1] ac values */
+              int lag, int   n);
+
+spx_word32_t                      /* returns minimum mean square error    */
+_spx_lpc(
+    spx_coef_t       * lpc, /*      [0...p-1] LPC coefficients      */
+    const spx_word16_t * ac,  /*  in: [0...p] autocorrelation values  */
+    int p
+    );
+
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lpc_bfin.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lpc_bfin.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lpc_bfin.h	(revision 1163)
@@ -0,0 +1,131 @@
+/* Copyright (C) 2005 Analog Devices */
+/**
+   @file lpc_bfin.h
+   @author Jean-Marc Valin 
+   @brief Functions for LPC (Linear Prediction Coefficients) analysis (Blackfin version)
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#define OVERRIDE_SPEEX_AUTOCORR
+void _spx_autocorr(
+const spx_word16_t *x,   /*  in: [0...n-1] samples x   */
+spx_word16_t       *ac,  /* out: [0...lag-1] ac values */
+int          lag, 
+int          n
+                  )
+{
+   spx_word32_t d;
+   const spx_word16_t *xs;
+   int i, j;
+   spx_word32_t ac0=1;
+   spx_word32_t ac32[11], *ac32top;
+   int shift, ac_shift;
+   ac32top = ac32+lag-1;
+   int lag_1, N_lag;
+   int nshift;
+   lag_1 = lag-1;
+   N_lag = n-lag_1;
+   for (j=0;j<n;j++)
+      ac0 = ADD32(ac0,SHR32(MULT16_16(x[j],x[j]),8));
+   ac0 = ADD32(ac0,n);
+   shift = 8;
+   while (shift && ac0<0x40000000)
+   {
+      shift--;
+      ac0 <<= 1;
+   }
+   ac_shift = 18;
+   while (ac_shift && ac0<0x40000000)
+   {
+      ac_shift--;
+      ac0 <<= 1;
+   }
+   
+   xs = x+lag-1;
+   nshift = -shift;
+   __asm__ __volatile__ 
+   (
+         "P2 = %0;\n\t"
+         "I0 = P2;\n\t" /* x in I0 */
+         "B0 = P2;\n\t" /* x in B0 */
+         "R0 = %3;\n\t" /* len in R0 */
+         "P3 = %3;\n\t" /* len in R0 */
+         "P4 = %4;\n\t" /* nb_pitch in R0 */
+         "R1 = R0 << 1;\n\t" /* number of bytes in x */
+         "L0 = R1;\n\t"
+         "P0 = %1;\n\t"
+         "P1 = %2;\n\t"
+         "B1 = P1;\n\t"
+         "R4 = %5;\n\t"
+         "L1 = 0;\n\t" /*Disable looping on I1*/
+
+         "r0 = [I0++];\n\t"
+         "R2 = 0;R3=0;"
+         "LOOP pitch%= LC0 = P4 >> 1;\n\t"
+         "LOOP_BEGIN pitch%=;\n\t"
+            "I1 = P0;\n\t"
+            "A1 = A0 = 0;\n\t"
+            "R1 = [I1++];\n\t"
+            "LOOP inner_prod%= LC1 = P3 >> 1;\n\t"
+            "LOOP_BEGIN inner_prod%=;\n\t"
+               "A1 += R0.L*R1.H, A0 += R0.L*R1.L (IS) || R1.L = W[I1++];\n\t"
+               "A1 += R0.H*R1.L, A0 += R0.H*R1.H (IS) || R1.H = W[I1++] || R0 = [I0++];\n\t"
+            "LOOP_END inner_prod%=;\n\t"
+            "A0 = ASHIFT A0 by R4.L;\n\t"
+            "A1 = ASHIFT A1 by R4.L;\n\t"
+   
+            "R2 = A0, R3 = A1;\n\t"
+            "[P1--] = R2;\n\t"
+            "[P1--] = R3;\n\t"
+            "P0 += 4;\n\t"
+         "LOOP_END pitch%=;\n\t"
+   : : "m" (xs), "m" (x), "m" (ac32top), "m" (N_lag), "m" (lag_1), "m" (nshift)
+   : "A0", "A1", "P0", "P1", "P2", "P3", "P4", "R0", "R1", "R2", "R3", "R4", "I0", "I1", "L0", "L1", "B0", "B1", "memory"
+   );
+   d=0;
+   for (j=0;j<n;j++)
+   {
+      d = ADD32(d,SHR32(MULT16_16(x[j],x[j]), shift));
+   }
+   ac32[0] = d;
+   
+   for (i=0;i<lag;i++)
+   {
+      d=0;
+      for (j=i;j<lag_1;j++)
+      {
+         d = ADD32(d,SHR32(MULT16_16(x[j],x[j-i]), shift));
+      }
+      if (i)
+         ac32[i] += d;
+      ac[i] = SHR32(ac32[i], ac_shift);
+   }
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lpc_spx.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lpc_spx.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lpc_spx.c	(revision 1163)
@@ -0,0 +1,201 @@
+/*
+  Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann,
+  Technische Universitaet Berlin
+
+  Any use of this software is permitted provided that this notice is not
+  removed and that neither the authors nor the Technische Universitaet Berlin
+  are deemed to have made any representations as to the suitability of this
+  software for any purpose nor are held responsible for any defects of
+  this software.  THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
+
+  As a matter of courtesy, the authors request to be informed about uses
+  this software has found, about bugs in this software, and about any
+  improvements that may be of general interest.
+
+  Berlin, 28.11.1994
+  Jutta Degener
+  Carsten Bormann
+
+
+   Code modified by Jean-Marc Valin
+
+   Speex License:
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "lpc.h"
+
+#ifdef BFIN_ASM
+#include "lpc_bfin.h"
+#endif
+
+/* LPC analysis
+ *
+ * The next two functions calculate linear prediction coefficients
+ * and/or the related reflection coefficients from the first P_MAX+1
+ * values of the autocorrelation function.
+ */
+
+/* Invented by N. Levinson in 1947, modified by J. Durbin in 1959.
+ */
+
+/* returns minimum mean square error    */
+spx_word32_t _spx_lpc(
+spx_coef_t       *lpc, /* out: [0...p-1] LPC coefficients      */
+const spx_word16_t *ac,  /* in:  [0...p] autocorrelation values  */
+int          p
+)
+{
+   int i, j;  
+   spx_word16_t r;
+   spx_word16_t error = ac[0];
+
+   if (ac[0] == 0)
+   {
+      for (i = 0; i < p; i++)
+         lpc[i] = 0;
+      return 0;
+   }
+
+   for (i = 0; i < p; i++) {
+
+      /* Sum up this iteration's reflection coefficient */
+      spx_word32_t rr = NEG32(SHL32(EXTEND32(ac[i + 1]),13));
+      for (j = 0; j < i; j++) 
+         rr = SUB32(rr,MULT16_16(lpc[j],ac[i - j]));
+#ifdef FIXED_POINT
+      r = DIV32_16(rr+PSHR32(error,1),ADD16(error,8));
+#else
+      r = rr/(error+.003*ac[0]);
+#endif
+      /*  Update LPC coefficients and total error */
+      lpc[i] = r;
+      for (j = 0; j < i>>1; j++) 
+      {
+         spx_word16_t tmp  = lpc[j];
+         lpc[j]     = MAC16_16_P13(lpc[j],r,lpc[i-1-j]);
+         lpc[i-1-j] = MAC16_16_P13(lpc[i-1-j],r,tmp);
+      }
+      if (i & 1) 
+         lpc[j] = MAC16_16_P13(lpc[j],lpc[j],r);
+
+      error = SUB16(error,MULT16_16_Q13(r,MULT16_16_Q13(error,r)));
+   }
+   return error;
+}
+
+
+#ifdef FIXED_POINT
+
+/* Compute the autocorrelation
+ *                      ,--,
+ *              ac(i) = >  x(n) * x(n-i)  for all n
+ *                      `--'
+ * for lags between 0 and lag-1, and x == 0 outside 0...n-1
+ */
+
+#ifndef OVERRIDE_SPEEX_AUTOCORR
+void _spx_autocorr(
+const spx_word16_t *x,   /*  in: [0...n-1] samples x   */
+spx_word16_t       *ac,  /* out: [0...lag-1] ac values */
+int          lag, 
+int          n
+)
+{
+   spx_word32_t d;
+   int i, j;
+   spx_word32_t ac0=1;
+   int shift, ac_shift;
+   
+   for (j=0;j<n;j++)
+      ac0 = ADD32(ac0,SHR32(MULT16_16(x[j],x[j]),8));
+   ac0 = ADD32(ac0,n);
+   shift = 8;
+   while (shift && ac0<0x40000000)
+   {
+      shift--;
+      ac0 <<= 1;
+   }
+   ac_shift = 18;
+   while (ac_shift && ac0<0x40000000)
+   {
+      ac_shift--;
+      ac0 <<= 1;
+   }
+   
+   
+   for (i=0;i<lag;i++)
+   {
+      d=0;
+      for (j=i;j<n;j++)
+      {
+         d = ADD32(d,SHR32(MULT16_16(x[j],x[j-i]), shift));
+      }
+      
+      ac[i] = SHR32(d, ac_shift);
+   }
+}
+#endif
+
+
+#else
+
+
+
+/* Compute the autocorrelation
+ *                      ,--,
+ *              ac(i) = >  x(n) * x(n-i)  for all n
+ *                      `--'
+ * for lags between 0 and lag-1, and x == 0 outside 0...n-1
+ */
+void _spx_autocorr(
+const spx_word16_t *x,   /*  in: [0...n-1] samples x   */
+float       *ac,  /* out: [0...lag-1] ac values */
+int          lag, 
+int          n
+)
+{
+   float d;
+   int i;
+   while (lag--) 
+   {
+      for (i = lag, d = 0; i < n; i++) 
+         d += x[i] * x[i-lag];
+      ac[lag] = d;
+   }
+   ac[0] += 10;
+}
+
+#endif
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lsp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lsp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lsp.c	(revision 1163)
@@ -0,0 +1,656 @@
+/*---------------------------------------------------------------------------*\
+Original copyright
+	FILE........: lsp.c
+	AUTHOR......: David Rowe
+	DATE CREATED: 24/2/93
+
+Heavily modified by Jean-Marc Valin (c) 2002-2006 (fixed-point, 
+                       optimizations, additional functions, ...)
+
+   This file contains functions for converting Linear Prediction
+   Coefficients (LPC) to Line Spectral Pair (LSP) and back. Note that the
+   LSP coefficients are not in radians format but in the x domain of the
+   unit circle.
+
+   Speex License:
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+/*---------------------------------------------------------------------------*\
+
+  Introduction to Line Spectrum Pairs (LSPs)
+  ------------------------------------------
+
+  LSPs are used to encode the LPC filter coefficients {ak} for
+  transmission over the channel.  LSPs have several properties (like
+  less sensitivity to quantisation noise) that make them superior to
+  direct quantisation of {ak}.
+
+  A(z) is a polynomial of order lpcrdr with {ak} as the coefficients.
+
+  A(z) is transformed to P(z) and Q(z) (using a substitution and some
+  algebra), to obtain something like:
+
+    A(z) = 0.5[P(z)(z+z^-1) + Q(z)(z-z^-1)]  (1)
+
+  As you can imagine A(z) has complex zeros all over the z-plane. P(z)
+  and Q(z) have the very neat property of only having zeros _on_ the
+  unit circle.  So to find them we take a test point z=exp(jw) and
+  evaluate P (exp(jw)) and Q(exp(jw)) using a grid of points between 0
+  and pi.
+
+  The zeros (roots) of P(z) also happen to alternate, which is why we
+  swap coefficients as we find roots.  So the process of finding the
+  LSP frequencies is basically finding the roots of 5th order
+  polynomials.
+
+  The root so P(z) and Q(z) occur in symmetrical pairs at +/-w, hence
+  the name Line Spectrum Pairs (LSPs).
+
+  To convert back to ak we just evaluate (1), "clocking" an impulse
+  thru it lpcrdr times gives us the impulse response of A(z) which is
+  {ak}.
+
+\*---------------------------------------------------------------------------*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include "lsp.h"
+#include "stack_alloc.h"
+#include "math_approx.h"
+
+#ifndef M_PI
+#define M_PI           3.14159265358979323846  /* pi */
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#ifdef FIXED_POINT
+
+#define FREQ_SCALE 16384
+
+/*#define ANGLE2X(a) (32768*cos(((a)/8192.)))*/
+#define ANGLE2X(a) (SHL16(spx_cos(a),2))
+
+/*#define X2ANGLE(x) (acos(.00006103515625*(x))*LSP_SCALING)*/
+#define X2ANGLE(x) (spx_acos(x))
+
+#ifdef BFIN_ASM
+#include "lsp_bfin.h"
+#endif
+
+#else
+
+/*#define C1 0.99940307
+#define C2 -0.49558072
+#define C3 0.03679168*/
+
+#define FREQ_SCALE 1.
+#define ANGLE2X(a) (spx_cos(a))
+#define X2ANGLE(x) (acos(x))
+
+#endif
+
+
+/*---------------------------------------------------------------------------*\
+
+   FUNCTION....: cheb_poly_eva()
+
+   AUTHOR......: David Rowe
+   DATE CREATED: 24/2/93
+
+   This function evaluates a series of Chebyshev polynomials
+
+\*---------------------------------------------------------------------------*/
+
+#ifdef FIXED_POINT
+
+#ifndef OVERRIDE_CHEB_POLY_EVA
+static inline spx_word32_t cheb_poly_eva(
+  spx_word16_t *coef, /* P or Q coefs in Q13 format               */
+  spx_word16_t     x, /* cos of freq (-1.0 to 1.0) in Q14 format  */
+  int              m, /* LPC order/2                              */
+  char         *stack
+)
+{
+    int i;
+    spx_word16_t b0, b1;
+    spx_word32_t sum;
+
+    /*Prevents overflows*/
+    if (x>16383)
+       x = 16383;
+    if (x<-16383)
+       x = -16383;
+
+    /* Initialise values */
+    b1=16384;
+    b0=x;
+
+    /* Evaluate Chebyshev series formulation usin g iterative approach  */
+    sum = ADD32(EXTEND32(coef[m]), EXTEND32(MULT16_16_P14(coef[m-1],x)));
+    for(i=2;i<=m;i++)
+    {
+       spx_word16_t tmp=b0;
+       b0 = SUB16(MULT16_16_Q13(x,b0), b1);
+       b1 = tmp;
+       sum = ADD32(sum, EXTEND32(MULT16_16_P14(coef[m-i],b0)));
+    }
+    
+    return sum;
+}
+#endif
+
+#else
+
+static float cheb_poly_eva(spx_word32_t *coef, spx_word16_t x, int m, char *stack)
+{
+   int k;
+   float b0, b1, tmp;
+
+   /* Initial conditions */
+   b0=0; /* b_(m+1) */
+   b1=0; /* b_(m+2) */
+
+   x*=2;
+
+   /* Calculate the b_(k) */
+   for(k=m;k>0;k--)
+   {
+      tmp=b0;                           /* tmp holds the previous value of b0 */
+      b0=x*b0-b1+coef[m-k];    /* b0 holds its new value based on b0 and b1 */
+      b1=tmp;                           /* b1 holds the previous value of b0 */
+   }
+
+   return(-b1+.5*x*b0+coef[m]);
+}
+#endif
+
+/*---------------------------------------------------------------------------*\
+
+    FUNCTION....: lpc_to_lsp()
+
+    AUTHOR......: David Rowe
+    DATE CREATED: 24/2/93
+
+    This function converts LPC coefficients to LSP
+    coefficients.
+
+\*---------------------------------------------------------------------------*/
+
+#ifdef FIXED_POINT
+#define SIGN_CHANGE(a,b) (((a)&0x70000000)^((b)&0x70000000)||(b==0))
+#else
+#define SIGN_CHANGE(a,b) (((a)*(b))<0.0)
+#endif
+
+
+int lpc_to_lsp (spx_coef_t *a,int lpcrdr,spx_lsp_t *freq,int nb,spx_word16_t delta, char *stack)
+/*  float *a 		     	lpc coefficients			*/
+/*  int lpcrdr			order of LPC coefficients (10) 		*/
+/*  float *freq 	      	LSP frequencies in the x domain       	*/
+/*  int nb			number of sub-intervals (4) 		*/
+/*  float delta			grid spacing interval (0.02) 		*/
+
+
+{
+    spx_word16_t temp_xr,xl,xr,xm=0;
+    spx_word32_t psuml,psumr,psumm,temp_psumr/*,temp_qsumr*/;
+    int i,j,m,flag,k;
+    VARDECL(spx_word32_t *Q);                 	/* ptrs for memory allocation 		*/
+    VARDECL(spx_word32_t *P);
+    VARDECL(spx_word16_t *Q16);         /* ptrs for memory allocation 		*/
+    VARDECL(spx_word16_t *P16);
+    spx_word32_t *px;                	/* ptrs of respective P'(z) & Q'(z)	*/
+    spx_word32_t *qx;
+    spx_word32_t *p;
+    spx_word32_t *q;
+    spx_word16_t *pt;                	/* ptr used for cheb_poly_eval()
+				whether P' or Q' 			*/
+    int roots=0;              	/* DR 8/2/94: number of roots found 	*/
+    flag = 1;                	/*  program is searching for a root when,
+				1 else has found one 			*/
+    m = lpcrdr/2;            	/* order of P'(z) & Q'(z) polynomials 	*/
+
+    /* Allocate memory space for polynomials */
+    ALLOC(Q, (m+1), spx_word32_t);
+    ALLOC(P, (m+1), spx_word32_t);
+
+    /* determine P'(z)'s and Q'(z)'s coefficients where
+      P'(z) = P(z)/(1 + z^(-1)) and Q'(z) = Q(z)/(1-z^(-1)) */
+
+    px = P;                      /* initialise ptrs 			*/
+    qx = Q;
+    p = px;
+    q = qx;
+
+#ifdef FIXED_POINT
+    *px++ = LPC_SCALING;
+    *qx++ = LPC_SCALING;
+    for(i=0;i<m;i++){
+       *px++ = SUB32(ADD32(EXTEND32(a[i]),EXTEND32(a[lpcrdr-i-1])), *p++);
+       *qx++ = ADD32(SUB32(EXTEND32(a[i]),EXTEND32(a[lpcrdr-i-1])), *q++);
+    }
+    px = P;
+    qx = Q;
+    for(i=0;i<m;i++)
+    {
+       /*if (fabs(*px)>=32768)
+          speex_warning_int("px", *px);
+       if (fabs(*qx)>=32768)
+       speex_warning_int("qx", *qx);*/
+       *px = PSHR32(*px,2);
+       *qx = PSHR32(*qx,2);
+       px++;
+       qx++;
+    }
+    /* The reason for this lies in the way cheb_poly_eva() is implemented for fixed-point */
+    P[m] = PSHR32(P[m],3);
+    Q[m] = PSHR32(Q[m],3);
+#else
+    *px++ = LPC_SCALING;
+    *qx++ = LPC_SCALING;
+    for(i=0;i<m;i++){
+       *px++ = (a[i]+a[lpcrdr-1-i]) - *p++;
+       *qx++ = (a[i]-a[lpcrdr-1-i]) + *q++;
+    }
+    px = P;
+    qx = Q;
+    for(i=0;i<m;i++){
+       *px = 2**px;
+       *qx = 2**qx;
+       px++;
+       qx++;
+    }
+#endif
+
+    px = P;             	/* re-initialise ptrs 			*/
+    qx = Q;
+
+    /* now that we have computed P and Q convert to 16 bits to
+       speed up cheb_poly_eval */
+
+    ALLOC(P16, m+1, spx_word16_t);
+    ALLOC(Q16, m+1, spx_word16_t);
+
+    for (i=0;i<m+1;i++)
+    {
+       P16[i] = P[i];
+       Q16[i] = Q[i];
+    }
+
+    /* Search for a zero in P'(z) polynomial first and then alternate to Q'(z).
+    Keep alternating between the two polynomials as each zero is found 	*/
+
+    xr = 0;             	/* initialise xr to zero 		*/
+    xl = FREQ_SCALE;               	/* start at point xl = 1 		*/
+
+    for(j=0;j<lpcrdr;j++){
+	if(j&1)            	/* determines whether P' or Q' is eval. */
+	    pt = Q16;
+	else
+	    pt = P16;
+
+	psuml = cheb_poly_eva(pt,xl,m,stack);	/* evals poly. at xl 	*/
+	flag = 1;
+	while(flag && (xr >= -FREQ_SCALE)){
+           spx_word16_t dd;
+           /* Modified by JMV to provide smaller steps around x=+-1 */
+#ifdef FIXED_POINT
+           dd = MULT16_16_Q15(delta,SUB16(FREQ_SCALE, MULT16_16_Q14(MULT16_16_Q14(xl,xl),14000)));
+           if (psuml<512 && psuml>-512)
+              dd = PSHR16(dd,1);
+#else
+           dd=delta*(1-.9*xl*xl);
+           if (fabs(psuml)<.2)
+              dd *= .5;
+#endif
+           xr = SUB16(xl, dd);                        	/* interval spacing 	*/
+	    psumr = cheb_poly_eva(pt,xr,m,stack);/* poly(xl-delta_x) 	*/
+	    temp_psumr = psumr;
+	    temp_xr = xr;
+
+    /* if no sign change increment xr and re-evaluate poly(xr). Repeat til
+    sign change.
+    if a sign change has occurred the interval is bisected and then
+    checked again for a sign change which determines in which
+    interval the zero lies in.
+    If there is no sign change between poly(xm) and poly(xl) set interval
+    between xm and xr else set interval between xl and xr and repeat till
+    root is located within the specified limits 			*/
+
+	    if(SIGN_CHANGE(psumr,psuml))
+            {
+		roots++;
+
+		psumm=psuml;
+		for(k=0;k<=nb;k++){
+#ifdef FIXED_POINT
+		    xm = ADD16(PSHR16(xl,1),PSHR16(xr,1));        	/* bisect the interval 	*/
+#else
+                    xm = .5*(xl+xr);        	/* bisect the interval 	*/
+#endif
+		    psumm=cheb_poly_eva(pt,xm,m,stack);
+		    /*if(psumm*psuml>0.)*/
+		    if(!SIGN_CHANGE(psumm,psuml))
+                    {
+			psuml=psumm;
+			xl=xm;
+		    } else {
+			psumr=psumm;
+			xr=xm;
+		    }
+		}
+
+	       /* once zero is found, reset initial interval to xr 	*/
+	       freq[j] = X2ANGLE(xm);
+	       xl = xm;
+	       flag = 0;       		/* reset flag for next search 	*/
+	    }
+	    else{
+		psuml=temp_psumr;
+		xl=temp_xr;
+	    }
+	}
+    }
+    return(roots);
+}
+
+/*---------------------------------------------------------------------------*\
+
+	FUNCTION....: lsp_to_lpc()
+
+	AUTHOR......: David Rowe
+	DATE CREATED: 24/2/93
+
+        Converts LSP coefficients to LPC coefficients.
+
+\*---------------------------------------------------------------------------*/
+
+#ifdef FIXED_POINT
+
+void lsp_to_lpc(spx_lsp_t *freq,spx_coef_t *ak,int lpcrdr, char *stack)
+/*  float *freq 	array of LSP frequencies in the x domain	*/
+/*  float *ak 		array of LPC coefficients 			*/
+/*  int lpcrdr  	order of LPC coefficients 			*/
+{
+    int i,j;
+    spx_word32_t xout1,xout2,xin;
+    spx_word32_t mult, a;
+    VARDECL(spx_word16_t *freqn);
+    VARDECL(spx_word32_t **xp);
+    VARDECL(spx_word32_t *xpmem);
+    VARDECL(spx_word32_t **xq);
+    VARDECL(spx_word32_t *xqmem);
+    int m = lpcrdr>>1;
+
+    /* 
+    
+       Reconstruct P(z) and Q(z) by cascading second order polynomials
+       in form 1 - 2cos(w)z(-1) + z(-2), where w is the LSP frequency.
+       In the time domain this is:
+
+       y(n) = x(n) - 2cos(w)x(n-1) + x(n-2)
+    
+       This is what the ALLOCS below are trying to do:
+
+         int xp[m+1][lpcrdr+1+2]; // P matrix in QIMP
+         int xq[m+1][lpcrdr+1+2]; // Q matrix in QIMP
+
+       These matrices store the output of each stage on each row.  The
+       final (m-th) row has the output of the final (m-th) cascaded
+       2nd order filter.  The first row is the impulse input to the
+       system (not written as it is known).
+
+       The version below takes advantage of the fact that a lot of the
+       outputs are zero or known, for example if we put an inpulse
+       into the first section the "clock" it 10 times only the first 3
+       outputs samples are non-zero (it's an FIR filter).
+    */
+
+    ALLOC(xp, (m+1), spx_word32_t*);
+    ALLOC(xpmem, (m+1)*(lpcrdr+1+2), spx_word32_t);
+
+    ALLOC(xq, (m+1), spx_word32_t*);
+    ALLOC(xqmem, (m+1)*(lpcrdr+1+2), spx_word32_t);
+    
+    for(i=0; i<=m; i++) {
+      xp[i] = xpmem + i*(lpcrdr+1+2);
+      xq[i] = xqmem + i*(lpcrdr+1+2);
+    }
+
+    /* work out 2cos terms in Q14 */
+
+    ALLOC(freqn, lpcrdr, spx_word16_t);
+    for (i=0;i<lpcrdr;i++) 
+       freqn[i] = ANGLE2X(freq[i]);
+
+    #define QIMP  21   /* scaling for impulse */
+
+    xin = SHL32(EXTEND32(1), (QIMP-1)); /* 0.5 in QIMP format */
+   
+    /* first col and last non-zero values of each row are trivial */
+    
+    for(i=0;i<=m;i++) {
+     xp[i][1] = 0;
+     xp[i][2] = xin;
+     xp[i][2+2*i] = xin;
+     xq[i][1] = 0;
+     xq[i][2] = xin;
+     xq[i][2+2*i] = xin;
+    }
+
+    /* 2nd row (first output row) is trivial */
+
+    xp[1][3] = -MULT16_32_Q14(freqn[0],xp[0][2]);
+    xq[1][3] = -MULT16_32_Q14(freqn[1],xq[0][2]);
+
+    xout1 = xout2 = 0;
+
+    /* now generate remaining rows */
+
+    for(i=1;i<m;i++) {
+
+      for(j=1;j<2*(i+1)-1;j++) {
+	mult = MULT16_32_Q14(freqn[2*i],xp[i][j+1]);
+	xp[i+1][j+2] = ADD32(SUB32(xp[i][j+2], mult), xp[i][j]);
+	mult = MULT16_32_Q14(freqn[2*i+1],xq[i][j+1]);
+	xq[i+1][j+2] = ADD32(SUB32(xq[i][j+2], mult), xq[i][j]);
+      }
+
+      /* for last col xp[i][j+2] = xq[i][j+2] = 0 */
+
+      mult = MULT16_32_Q14(freqn[2*i],xp[i][j+1]);
+      xp[i+1][j+2] = SUB32(xp[i][j], mult);
+      mult = MULT16_32_Q14(freqn[2*i+1],xq[i][j+1]);
+      xq[i+1][j+2] = SUB32(xq[i][j], mult);
+    }
+
+    /* process last row to extra a{k} */
+
+    for(j=1;j<=lpcrdr;j++) {
+      int shift = QIMP-13;
+
+      /* final filter sections */
+      a = PSHR32(xp[m][j+2] + xout1 + xq[m][j+2] - xout2, shift); 
+      xout1 = xp[m][j+2];
+      xout2 = xq[m][j+2];
+      
+      /* hard limit ak's to +/- 32767 */
+
+      if (a < -32767) a = -32767;
+      if (a > 32767) a = 32767;
+      ak[j-1] = (short)a;
+     
+    }
+
+}
+
+#else
+
+void lsp_to_lpc(spx_lsp_t *freq,spx_coef_t *ak,int lpcrdr, char *stack)
+/*  float *freq 	array of LSP frequencies in the x domain	*/
+/*  float *ak 		array of LPC coefficients 			*/
+/*  int lpcrdr  	order of LPC coefficients 			*/
+
+
+{
+    int i,j;
+    float xout1,xout2,xin1,xin2;
+    VARDECL(float *Wp);
+    float *pw,*n1,*n2,*n3,*n4=NULL;
+    VARDECL(float *x_freq);
+    int m = lpcrdr>>1;
+
+    ALLOC(Wp, 4*m+2, float);
+    pw = Wp;
+
+    /* initialise contents of array */
+
+    for(i=0;i<=4*m+1;i++){       	/* set contents of buffer to 0 */
+	*pw++ = 0.0;
+    }
+
+    /* Set pointers up */
+
+    pw = Wp;
+    xin1 = 1.0;
+    xin2 = 1.0;
+
+    ALLOC(x_freq, lpcrdr, float);
+    for (i=0;i<lpcrdr;i++)
+       x_freq[i] = ANGLE2X(freq[i]);
+
+    /* reconstruct P(z) and Q(z) by  cascading second order
+      polynomials in form 1 - 2xz(-1) +z(-2), where x is the
+      LSP coefficient */
+
+    for(j=0;j<=lpcrdr;j++){
+       int i2=0;
+	for(i=0;i<m;i++,i2+=2){
+	    n1 = pw+(i*4);
+	    n2 = n1 + 1;
+	    n3 = n2 + 1;
+	    n4 = n3 + 1;
+	    xout1 = xin1 - 2.f*x_freq[i2] * *n1 + *n2;
+	    xout2 = xin2 - 2.f*x_freq[i2+1] * *n3 + *n4;
+	    *n2 = *n1;
+	    *n4 = *n3;
+	    *n1 = xin1;
+	    *n3 = xin2;
+	    xin1 = xout1;
+	    xin2 = xout2;
+	}
+	xout1 = xin1 + *(n4+1);
+	xout2 = xin2 - *(n4+2);
+	if (j>0)
+	   ak[j-1] = (xout1 + xout2)*0.5f;
+	*(n4+1) = xin1;
+	*(n4+2) = xin2;
+
+	xin1 = 0.0;
+	xin2 = 0.0;
+    }
+
+}
+#endif
+
+
+#ifdef FIXED_POINT
+
+/*Makes sure the LSPs are stable*/
+void lsp_enforce_margin(spx_lsp_t *lsp, int len, spx_word16_t margin)
+{
+   int i;
+   spx_word16_t m = margin;
+   spx_word16_t m2 = 25736-margin;
+  
+   if (lsp[0]<m)
+      lsp[0]=m;
+   if (lsp[len-1]>m2)
+      lsp[len-1]=m2;
+   for (i=1;i<len-1;i++)
+   {
+      if (lsp[i]<lsp[i-1]+m)
+         lsp[i]=lsp[i-1]+m;
+
+      if (lsp[i]>lsp[i+1]-m)
+         lsp[i]= SHR16(lsp[i],1) + SHR16(lsp[i+1]-m,1);
+   }
+}
+
+
+void lsp_interpolate(spx_lsp_t *old_lsp, spx_lsp_t *new_lsp, spx_lsp_t *interp_lsp, int len, int subframe, int nb_subframes)
+{
+   int i;
+   spx_word16_t tmp = DIV32_16(SHL32(EXTEND32(1 + subframe),14),nb_subframes);
+   spx_word16_t tmp2 = 16384-tmp;
+   for (i=0;i<len;i++)
+   {
+      interp_lsp[i] = MULT16_16_P14(tmp2,old_lsp[i]) + MULT16_16_P14(tmp,new_lsp[i]);
+   }
+}
+
+#else
+
+/*Makes sure the LSPs are stable*/
+void lsp_enforce_margin(spx_lsp_t *lsp, int len, spx_word16_t margin)
+{
+   int i;
+   if (lsp[0]<LSP_SCALING*margin)
+      lsp[0]=LSP_SCALING*margin;
+   if (lsp[len-1]>LSP_SCALING*(M_PI-margin))
+      lsp[len-1]=LSP_SCALING*(M_PI-margin);
+   for (i=1;i<len-1;i++)
+   {
+      if (lsp[i]<lsp[i-1]+LSP_SCALING*margin)
+         lsp[i]=lsp[i-1]+LSP_SCALING*margin;
+
+      if (lsp[i]>lsp[i+1]-LSP_SCALING*margin)
+         lsp[i]= .5f* (lsp[i] + lsp[i+1]-LSP_SCALING*margin);
+   }
+}
+
+
+void lsp_interpolate(spx_lsp_t *old_lsp, spx_lsp_t *new_lsp, spx_lsp_t *interp_lsp, int len, int subframe, int nb_subframes)
+{
+   int i;
+   float tmp = (1.0f + subframe)/nb_subframes;
+   for (i=0;i<len;i++)
+   {
+      interp_lsp[i] = (1-tmp)*old_lsp[i] + tmp*new_lsp[i];
+   }
+}
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lsp.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lsp.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lsp.h	(revision 1163)
@@ -0,0 +1,64 @@
+/*---------------------------------------------------------------------------*\
+Original Copyright
+	FILE........: AK2LSPD.H
+	TYPE........: Turbo C header file
+	COMPANY.....: Voicetronix
+	AUTHOR......: James Whitehall
+	DATE CREATED: 21/11/95
+
+Modified by Jean-Marc Valin
+
+    This file contains functions for converting Linear Prediction
+    Coefficients (LPC) to Line Spectral Pair (LSP) and back. Note that the
+    LSP coefficients are not in radians format but in the x domain of the
+    unit circle.
+
+\*---------------------------------------------------------------------------*/
+/**
+   @file lsp.h
+   @brief Line Spectral Pair (LSP) functions.
+*/
+/* Speex License:
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef __AK2LSPD__
+#define __AK2LSPD__
+
+#include "misc.h"
+
+int lpc_to_lsp (spx_coef_t *a, int lpcrdr, spx_lsp_t *freq, int nb, spx_word16_t delta, char *stack);
+void lsp_to_lpc(spx_lsp_t *freq, spx_coef_t *ak, int lpcrdr, char *stack);
+
+/*Added by JMV*/
+void lsp_enforce_margin(spx_lsp_t *lsp, int len, spx_word16_t margin);
+
+void lsp_interpolate(spx_lsp_t *old_lsp, spx_lsp_t *new_lsp, spx_lsp_t *interp_lsp, int len, int subframe, int nb_subframes);
+
+#endif	/* __AK2LSPD__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lsp_bfin.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lsp_bfin.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lsp_bfin.h	(revision 1163)
@@ -0,0 +1,89 @@
+/* Copyright (C) 2006 David Rowe */
+/**
+   @file lsp_bfin.h
+   @author David Rowe
+   @brief LSP routines optimised for the Blackfin
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#define OVERRIDE_CHEB_POLY_EVA
+#ifdef OVERRIDE_CHEB_POLY_EVA
+static inline spx_word32_t cheb_poly_eva(
+  spx_word16_t *coef, /* P or Q coefs in Q13 format               */
+  spx_word16_t     x, /* cos of freq (-1.0 to 1.0) in Q14 format  */
+  int              m, /* LPC order/2                              */
+  char         *stack
+)
+{
+    spx_word32_t sum;
+
+   __asm__ __volatile__
+     (
+      "P0 = %2;\n\t"           /* P0: coef[m], coef[m-1],..., coef[0] */
+      "R4 = 8192;\n\t"         /* R4: rounding constant               */
+      "R2 = %1;\n\t"           /* R2: x  */
+
+      "R5 = -16383;\n\t"
+      "R2 = MAX(R2,R5);\n\t"
+      "R5 = 16383;\n\t"
+      "R2 = MIN(R2,R5);\n\t"
+
+      "R3 = W[P0--] (X);\n\t"  /* R3: sum */
+      "R5 = W[P0--] (X);\n\t"
+      "R5 = R5.L * R2.L (IS);\n\t"
+      "R5 = R5 + R4;\n\t"
+      "R5 >>>= 14;\n\t"
+      "R3 = R3 + R5;\n\t" 
+      
+      "R0 = R2;\n\t"           /* R0: b0 */
+      "R1 = 16384;\n\t"        /* R1: b1 */
+      "LOOP cpe%= LC0 = %3;\n\t"
+      "LOOP_BEGIN cpe%=;\n\t"
+        "P1 = R0;\n\t" 
+        "R0 = R2.L * R0.L (IS) || R5 = W[P0--] (X);\n\t"
+        "R0 >>>= 13;\n\t"
+        "R0 = R0 - R1;\n\t"
+        "R1 = P1;\n\t"
+        "R5 = R5.L * R0.L (IS);\n\t"
+        "R5 = R5 + R4;\n\t"
+        "R5 >>>= 14;\n\t"
+        "R3 = R3 + R5;\n\t"
+      "LOOP_END cpe%=;\n\t"
+      "%0 = R3;\n\t"
+      : "=&d" (sum)
+      : "a" (x), "a" (&coef[m]), "a" (m-1)
+      : "R0", "R1", "R3", "R2", "R4", "R5", "P0", "P1"
+      );
+    return sum;
+}
+#endif
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lsp_tables_nb.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lsp_tables_nb.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/lsp_tables_nb.c	(revision 1163)
@@ -0,0 +1,360 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: lsp_tables_nb.c
+   Codebooks for LSPs in narrowband CELP mode
+  
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.  
+
+   2. 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.
+
+   3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+*/
+
+const signed char cdbk_nb[640]={
+30,19,38,34,40,32,46,43,58,43,
+5,-18,-25,-40,-33,-55,-52,20,34,28,
+-20,-63,-97,-92,61,53,47,49,53,75,
+-14,-53,-77,-79,0,-3,-5,19,22,26,
+-9,-53,-55,66,90,72,85,68,74,52,
+-4,-41,-58,-31,-18,-31,27,32,30,18,
+24,3,8,5,-12,-3,26,28,74,63,
+-2,-39,-67,-77,-106,-74,59,59,73,65,
+44,40,71,72,82,83,98,88,89,60,
+-6,-31,-47,-48,-13,-39,-9,7,2,79,
+-1,-39,-60,-17,87,81,65,50,45,19,
+-21,-67,-91,-87,-41,-50,7,18,39,74,
+10,-31,-28,39,24,13,23,5,56,45,
+29,10,-5,-13,-11,-35,-18,-8,-10,-8,
+-25,-71,-77,-21,2,16,50,63,87,87,
+5,-32,-40,-51,-68,0,12,6,54,34,
+5,-12,32,52,68,64,69,59,65,45,
+14,-16,-31,-40,-65,-67,41,49,47,37,
+-11,-52,-75,-84,-4,57,48,42,42,33,
+-11,-51,-68,-6,13,0,8,-8,26,32,
+-23,-53,0,36,56,76,97,105,111,97,
+-1,-28,-39,-40,-43,-54,-44,-40,-18,35,
+16,-20,-19,-28,-42,29,47,38,74,45,
+3,-29,-48,-62,-80,-104,-33,56,59,59,
+10,17,46,72,84,101,117,123,123,106,
+-7,-33,-49,-51,-70,-67,-27,-31,70,67,
+-16,-62,-85,-20,82,71,86,80,85,74,
+-19,-58,-75,-45,-29,-33,-18,-25,45,57,
+-12,-42,-5,12,28,36,52,64,81,82,
+13,-9,-27,-28,22,3,2,22,26,6,
+-6,-44,-51,2,15,10,48,43,49,34,
+-19,-62,-84,-89,-102,-24,8,17,61,68,
+39,24,23,19,16,-5,12,15,27,15,
+-8,-44,-49,-60,-18,-32,-28,52,54,62,
+-8,-48,-77,-70,66,101,83,63,61,37,
+-12,-50,-75,-64,33,17,13,25,15,77,
+1,-42,-29,72,64,46,49,31,61,44,
+-8,-47,-54,-46,-30,19,20,-1,-16,0,
+16,-12,-18,-9,-26,-27,-10,-22,53,45,
+-10,-47,-75,-82,-105,-109,8,25,49,77,
+50,65,114,117,124,118,115,96,90,61,
+-9,-45,-63,-60,-75,-57,8,11,20,29,
+0,-35,-49,-43,40,47,35,40,55,38,
+-24,-76,-103,-112,-27,3,23,34,52,75,
+8,-29,-43,12,63,38,35,29,24,8,
+25,11,1,-15,-18,-43,-7,37,40,21,
+-20,-56,-19,-19,-4,-2,11,29,51,63,
+-2,-44,-62,-75,-89,30,57,51,74,51,
+50,46,68,64,65,52,63,55,65,43,
+18,-9,-26,-35,-55,-69,3,6,8,17,
+-15,-61,-86,-97,1,86,93,74,78,67,
+-1,-38,-66,-48,48,39,29,25,17,-1,
+13,13,29,39,50,51,69,82,97,98,
+-2,-36,-46,-27,-16,-30,-13,-4,-7,-4,
+25,-5,-11,-6,-25,-21,33,12,31,29,
+-8,-38,-52,-63,-68,-89,-33,-1,10,74,
+-2,-15,59,91,105,105,101,87,84,62,
+-7,-33,-50,-35,-54,-47,25,17,82,81,
+-13,-56,-83,21,58,31,42,25,72,65,
+-24,-66,-91,-56,9,-2,21,10,69,75,
+2,-24,11,22,25,28,38,34,48,33,
+7,-29,-26,17,15,-1,14,0,-2,0,
+-6,-41,-67,6,-2,-9,19,2,85,74,
+-22,-67,-84,-71,-50,3,11,-9,2,62};
+
+const signed char cdbk_nb_low1[320]={
+-34,-52,-15,45,2,
+23,21,52,24,-33,
+-9,-1,9,-44,-41,
+-13,-17,44,22,-17,
+-6,-4,-1,22,38,
+26,16,2,50,27,
+-35,-34,-9,-41,6,
+0,-16,-34,51,8,
+-14,-31,-49,15,-33,
+45,49,33,-11,-37,
+-62,-54,45,11,-5,
+-72,11,-1,-12,-11,
+24,27,-11,-43,46,
+43,33,-12,-9,-1,
+1,-4,-23,-57,-71,
+11,8,16,17,-8,
+-20,-31,-41,53,48,
+-16,3,65,-24,-8,
+-23,-32,-37,-32,-49,
+-10,-17,6,38,5,
+-9,-17,-46,8,52,
+3,6,45,40,39,
+-7,-6,-34,-74,31,
+8,1,-16,43,68,
+-11,-19,-31,4,6,
+0,-6,-17,-16,-38,
+-16,-30,2,9,-39,
+-16,-1,43,-10,48,
+3,3,-16,-31,-3,
+62,68,43,13,3,
+-10,8,20,-56,12,
+12,-2,-18,22,-15,
+-40,-36,1,7,41,
+0,1,46,-6,-62,
+-4,-12,-2,-11,-83,
+-13,-2,91,33,-10,
+0,4,-11,-16,79,
+32,37,14,9,51,
+-21,-28,-56,-34,0,
+21,9,-26,11,28,
+-42,-54,-23,-2,-15,
+31,30,8,-39,-66,
+-39,-36,31,-28,-40,
+-46,35,40,22,24,
+33,48,23,-34,14,
+40,32,17,27,-3,
+25,26,-13,-61,-17,
+11,4,31,60,-6,
+-26,-41,-64,13,16,
+-26,54,31,-11,-23,
+-9,-11,-34,-71,-21,
+-34,-35,55,50,29,
+-22,-27,-50,-38,57,
+33,42,57,48,26,
+11,0,-49,-31,26,
+-4,-14,5,78,37,
+17,0,-49,-12,-23,
+26,14,2,2,-43,
+-17,-12,10,-8,-4,
+8,18,12,-6,20,
+-12,-6,-13,-25,34,
+15,40,49,7,8,
+13,20,20,-19,-22,
+-2,-8,2,51,-51};
+
+const signed char cdbk_nb_low2[320]={
+-6,53,-21,-24,4,
+26,17,-4,-37,25,
+17,-36,-13,31,3,
+-6,27,15,-10,31,
+28,26,-10,-10,-40,
+16,-7,15,13,41,
+-9,0,-4,50,-6,
+-7,14,38,22,0,
+-48,2,1,-13,-19,
+32,-3,-60,11,-17,
+-1,-24,-34,-1,35,
+-5,-27,28,44,13,
+25,15,42,-11,15,
+51,35,-36,20,8,
+-4,-12,-29,19,-47,
+49,-15,-4,16,-29,
+-39,14,-30,4,25,
+-9,-5,-51,-14,-3,
+-40,-32,38,5,-9,
+-8,-4,-1,-22,71,
+-3,14,26,-18,-22,
+24,-41,-25,-24,6,
+23,19,-10,39,-26,
+-27,65,45,2,-7,
+-26,-8,22,-12,16,
+15,16,-35,-5,33,
+-21,-8,0,23,33,
+34,6,21,36,6,
+-7,-22,8,-37,-14,
+31,38,11,-4,-3,
+-39,-32,-8,32,-23,
+-6,-12,16,20,-28,
+-4,23,13,-52,-1,
+22,6,-33,-40,-6,
+4,-62,13,5,-26,
+35,39,11,2,57,
+-11,9,-20,-28,-33,
+52,-5,-6,-2,22,
+-14,-16,-48,35,1,
+-58,20,13,33,-1,
+-74,56,-18,-22,-31,
+12,6,-14,4,-2,
+-9,-47,10,-3,29,
+-17,-5,61,14,47,
+-12,2,72,-39,-17,
+92,64,-53,-51,-15,
+-30,-38,-41,-29,-28,
+27,9,36,9,-35,
+-42,81,-21,20,25,
+-16,-5,-17,-35,21,
+15,-28,48,2,-2,
+9,-19,29,-40,30,
+-18,-18,18,-16,-57,
+15,-20,-12,-15,-37,
+-15,33,-39,21,-22,
+-13,35,11,13,-38,
+-63,29,23,-27,32,
+18,3,-26,42,33,
+-64,-66,-17,16,56,
+2,36,3,31,21,
+-41,-39,8,-57,14,
+37,-2,19,-36,-19,
+-23,-29,-16,1,-3,
+-8,-10,31,64,-65};
+
+const signed char cdbk_nb_high1[320]={
+-26,-8,29,21,4,
+19,-39,33,-7,-36,
+56,54,48,40,29,
+-4,-24,-42,-66,-43,
+-60,19,-2,37,41,
+-10,-37,-60,-64,18,
+-22,77,73,40,25,
+4,19,-19,-66,-2,
+11,5,21,14,26,
+-25,-86,-4,18,1,
+26,-37,10,37,-1,
+24,-12,-59,-11,20,
+-6,34,-16,-16,42,
+19,-28,-51,53,32,
+4,10,62,21,-12,
+-34,27,4,-48,-48,
+-50,-49,31,-7,-21,
+-42,-25,-4,-43,-22,
+59,2,27,12,-9,
+-6,-16,-8,-32,-58,
+-16,-29,-5,41,23,
+-30,-33,-46,-13,-10,
+-38,52,52,1,-17,
+-9,10,26,-25,-6,
+33,-20,53,55,25,
+-32,-5,-42,23,21,
+66,5,-28,20,9,
+75,29,-7,-42,-39,
+15,3,-23,21,6,
+11,1,-29,14,63,
+10,54,26,-24,-51,
+-49,7,-23,-51,15,
+-66,1,60,25,10,
+0,-30,-4,-15,17,
+19,59,40,4,-5,
+33,6,-22,-58,-70,
+-5,23,-6,60,44,
+-29,-16,-47,-29,52,
+-19,50,28,16,35,
+31,36,0,-21,6,
+21,27,22,42,7,
+-66,-40,-8,7,19,
+46,0,-4,60,36,
+45,-7,-29,-6,-32,
+-39,2,6,-9,33,
+20,-51,-34,18,-6,
+19,6,11,5,-19,
+-29,-2,42,-11,-45,
+-21,-55,57,37,2,
+-14,-67,-16,-27,-38,
+69,48,19,2,-17,
+20,-20,-16,-34,-17,
+-25,-61,10,73,45,
+16,-40,-64,-17,-29,
+-22,56,17,-39,8,
+-11,8,-25,-18,-13,
+-19,8,54,57,36,
+-17,-26,-4,6,-21,
+40,42,-4,20,31,
+53,10,-34,-53,31,
+-17,35,0,15,-6,
+-20,-63,-73,22,25,
+29,17,8,-29,-39,
+-69,18,15,-15,-5};
+
+const signed char cdbk_nb_high2[320]={
+11,47,16,-9,-46,
+-32,26,-64,34,-5,
+38,-7,47,20,2,
+-73,-99,-3,-45,20,
+70,-52,15,-6,-7,
+-82,31,21,47,51,
+39,-3,9,0,-41,
+-7,-15,-54,2,0,
+27,-31,9,-45,-22,
+-38,-24,-24,8,-33,
+23,5,50,-36,-17,
+-18,-51,-2,13,19,
+43,12,-15,-12,61,
+38,38,7,13,0,
+6,-1,3,62,9,
+27,22,-33,38,-35,
+-9,30,-43,-9,-32,
+-1,4,-4,1,-5,
+-11,-8,38,31,11,
+-10,-42,-21,-37,1,
+43,15,-13,-35,-19,
+-18,15,23,-26,59,
+1,-21,53,8,-41,
+-50,-14,-28,4,21,
+25,-28,-40,5,-40,
+-41,4,51,-33,-8,
+-8,1,17,-60,12,
+25,-41,17,34,43,
+19,45,7,-37,24,
+-15,56,-2,35,-10,
+48,4,-47,-2,5,
+-5,-54,5,-3,-33,
+-10,30,-2,-44,-24,
+-38,9,-9,42,4,
+6,-56,44,-16,9,
+-40,-26,18,-20,10,
+28,-41,-21,-4,13,
+-18,32,-30,-3,37,
+15,22,28,50,-40,
+3,-29,-64,7,51,
+-19,-11,17,-27,-40,
+-64,24,-12,-7,-27,
+3,37,48,-1,2,
+-9,-38,-34,46,1,
+27,-6,19,-13,26,
+10,34,20,25,40,
+50,-6,-7,30,9,
+-24,0,-23,71,-61,
+22,58,-34,-4,2,
+-49,-33,25,30,-8,
+-6,-16,77,2,38,
+-8,-35,-6,-30,56,
+78,31,33,-20,13,
+-39,20,22,4,21,
+-8,4,-6,10,-83,
+-41,9,-25,-43,15,
+-7,-12,-34,-39,-37,
+-33,19,30,16,-33,
+42,-25,25,-68,44,
+-15,-11,-4,23,50,
+14,4,-39,-43,20,
+-30,60,9,-20,7,
+16,19,-33,37,29,
+16,-35,7,38,-27};
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp.c	(revision 1163)
@@ -0,0 +1,854 @@
+/* Copyright (C) 2002-2006 Jean-Marc Valin 
+   File: ltp.c
+   Long-Term Prediction functions
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include "ltp.h"
+#include "stack_alloc.h"
+#include "filters.h"
+#include <speex/speex_bits.h>
+#include "math_approx.h"
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+
+#ifdef _USE_SSE
+#include "ltp_sse.h"
+#elif defined (ARM4_ASM) || defined(ARM5E_ASM)
+#include "ltp_arm4.h"
+#elif defined (BFIN_ASM)
+#include "ltp_bfin.h"
+#endif
+
+#ifndef OVERRIDE_INNER_PROD
+spx_word32_t inner_prod(const spx_word16_t *x, const spx_word16_t *y, int len)
+{
+   spx_word32_t sum=0;
+   len >>= 2;
+   while(len--)
+   {
+      spx_word32_t part=0;
+      part = MAC16_16(part,*x++,*y++);
+      part = MAC16_16(part,*x++,*y++);
+      part = MAC16_16(part,*x++,*y++);
+      part = MAC16_16(part,*x++,*y++);
+      /* HINT: If you had a 40-bit accumulator, you could shift only at the end */
+      sum = ADD32(sum,SHR32(part,6));
+   }
+   return sum;
+}
+#endif
+
+#ifndef OVERRIDE_PITCH_XCORR
+#if 0 /* HINT: Enable this for machines with enough registers (i.e. not x86) */
+void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int nb_pitch, char *stack)
+{
+   int i,j;
+   for (i=0;i<nb_pitch;i+=4)
+   {
+      /* Compute correlation*/
+      /*corr[nb_pitch-1-i]=inner_prod(x, _y+i, len);*/
+      spx_word32_t sum1=0;
+      spx_word32_t sum2=0;
+      spx_word32_t sum3=0;
+      spx_word32_t sum4=0;
+      const spx_word16_t *y = _y+i;
+      const spx_word16_t *x = _x;
+      spx_word16_t y0, y1, y2, y3;
+      /*y0=y[0];y1=y[1];y2=y[2];y3=y[3];*/
+      y0=*y++;
+      y1=*y++;
+      y2=*y++;
+      y3=*y++;
+      for (j=0;j<len;j+=4)
+      {
+         spx_word32_t part1;
+         spx_word32_t part2;
+         spx_word32_t part3;
+         spx_word32_t part4;
+         part1 = MULT16_16(*x,y0);
+         part2 = MULT16_16(*x,y1);
+         part3 = MULT16_16(*x,y2);
+         part4 = MULT16_16(*x,y3);
+         x++;
+         y0=*y++;
+         part1 = MAC16_16(part1,*x,y1);
+         part2 = MAC16_16(part2,*x,y2);
+         part3 = MAC16_16(part3,*x,y3);
+         part4 = MAC16_16(part4,*x,y0);
+         x++;
+         y1=*y++;
+         part1 = MAC16_16(part1,*x,y2);
+         part2 = MAC16_16(part2,*x,y3);
+         part3 = MAC16_16(part3,*x,y0);
+         part4 = MAC16_16(part4,*x,y1);
+         x++;
+         y2=*y++;
+         part1 = MAC16_16(part1,*x,y3);
+         part2 = MAC16_16(part2,*x,y0);
+         part3 = MAC16_16(part3,*x,y1);
+         part4 = MAC16_16(part4,*x,y2);
+         x++;
+         y3=*y++;
+         
+         sum1 = ADD32(sum1,SHR32(part1,6));
+         sum2 = ADD32(sum2,SHR32(part2,6));
+         sum3 = ADD32(sum3,SHR32(part3,6));
+         sum4 = ADD32(sum4,SHR32(part4,6));
+      }
+      corr[nb_pitch-1-i]=sum1;
+      corr[nb_pitch-2-i]=sum2;
+      corr[nb_pitch-3-i]=sum3;
+      corr[nb_pitch-4-i]=sum4;
+   }
+
+}
+#else
+void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int nb_pitch, char *stack)
+{
+   int i;
+   for (i=0;i<nb_pitch;i++)
+   {
+      /* Compute correlation*/
+      corr[nb_pitch-1-i]=inner_prod(_x, _y+i, len);
+   }
+
+}
+#endif
+#endif
+
+#ifndef OVERRIDE_COMPUTE_PITCH_ERROR
+static inline spx_word32_t compute_pitch_error(spx_word16_t *C, spx_word16_t *g, spx_word16_t pitch_control)
+{
+   spx_word32_t sum = 0;
+   sum = ADD32(sum,MULT16_16(MULT16_16_16(g[0],pitch_control),C[0]));
+   sum = ADD32(sum,MULT16_16(MULT16_16_16(g[1],pitch_control),C[1]));
+   sum = ADD32(sum,MULT16_16(MULT16_16_16(g[2],pitch_control),C[2]));
+   sum = SUB32(sum,MULT16_16(MULT16_16_16(g[0],g[1]),C[3]));
+   sum = SUB32(sum,MULT16_16(MULT16_16_16(g[2],g[1]),C[4]));
+   sum = SUB32(sum,MULT16_16(MULT16_16_16(g[2],g[0]),C[5]));
+   sum = SUB32(sum,MULT16_16(MULT16_16_16(g[0],g[0]),C[6]));
+   sum = SUB32(sum,MULT16_16(MULT16_16_16(g[1],g[1]),C[7]));
+   sum = SUB32(sum,MULT16_16(MULT16_16_16(g[2],g[2]),C[8]));
+   return sum;
+}
+#endif
+
+#ifndef OVERRIDE_OPEN_LOOP_NBEST_PITCH
+void open_loop_nbest_pitch(spx_word16_t *sw, int start, int end, int len, int *pitch, spx_word16_t *gain, int N, char *stack)
+{
+   int i,j,k;
+   VARDECL(spx_word32_t *best_score);
+   VARDECL(spx_word32_t *best_ener);
+   spx_word32_t e0;
+   VARDECL(spx_word32_t *corr);
+   VARDECL(spx_word32_t *energy);
+#ifdef FIXED_POINT
+   int scaledown = 0;
+#endif
+   
+   ALLOC(best_score, N, spx_word32_t);
+   ALLOC(best_ener, N, spx_word32_t);
+   ALLOC(corr, end-start+1, spx_word32_t);
+   ALLOC(energy, end-start+2, spx_word32_t);
+
+   for (i=0;i<N;i++)
+   {
+        best_score[i]=-1;
+        best_ener[i]=0;
+        pitch[i]=start;
+   }
+#ifdef FIXED_POINT
+   for (i=-end;i<len;i++)
+   {
+      if (ABS16(sw[i])>16383)
+      {
+         scaledown=1;
+         break;
+      }
+   }
+   /* If the weighted input is close to saturation, then we scale it down */
+   if (scaledown)
+   {
+      for (i=-end;i<len;i++)
+      {
+         sw[i]=SHR16(sw[i],1);
+      }
+   }      
+#endif
+   energy[0]=inner_prod(sw-start, sw-start, len);
+   e0=inner_prod(sw, sw, len);
+   for (i=start;i<end;i++)
+   {
+      /* Update energy for next pitch*/
+      energy[i-start+1] = SUB32(ADD32(energy[i-start],SHR32(MULT16_16(sw[-i-1],sw[-i-1]),6)), SHR32(MULT16_16(sw[-i+len-1],sw[-i+len-1]),6));
+      if (energy[i-start+1] < 0)
+         energy[i-start+1] = 0;
+   }
+
+   pitch_xcorr(sw, sw-end, corr, len, end-start+1, stack);
+#ifdef FIXED_POINT
+   /* If we scaled weighted input down, we need to scale it up again (OK, so we've just lost the LSB, who cares?) */
+   if (scaledown)
+   {
+      for (i=-end;i<len;i++)
+      {
+         sw[i]=SHL16(sw[i],1);
+      }
+   }      
+#endif
+
+   /* FIXME: Fixed-point and floating-point code should be merged */
+#ifdef FIXED_POINT
+   {
+      VARDECL(spx_word16_t *corr16);
+      VARDECL(spx_word16_t *ener16);
+      ALLOC(corr16, end-start+1, spx_word16_t);
+      ALLOC(ener16, end-start+1, spx_word16_t);
+      /* Normalize to 180 so we can square it and it still fits in 16 bits */
+      normalize16(corr, corr16, 180, end-start+1);
+      normalize16(energy, ener16, 180, end-start+1);
+
+      for (i=start;i<=end;i++)
+      {
+         spx_word16_t tmp = MULT16_16_16(corr16[i-start],corr16[i-start]);
+         /* Instead of dividing the tmp by the energy, we multiply on the other side */
+         if (MULT16_16(tmp,best_ener[N-1])>MULT16_16(best_score[N-1],ADD16(1,ener16[i-start])))
+         {
+            /* We can safely put it last and then check */
+            best_score[N-1]=tmp;
+            best_ener[N-1]=ener16[i-start]+1;
+            pitch[N-1]=i;
+            /* Check if it comes in front of others */
+            for (j=0;j<N-1;j++)
+            {
+               if (MULT16_16(tmp,best_ener[j])>MULT16_16(best_score[j],ADD16(1,ener16[i-start])))
+               {
+                  for (k=N-1;k>j;k--)
+                  {
+                     best_score[k]=best_score[k-1];
+                     best_ener[k]=best_ener[k-1];
+                     pitch[k]=pitch[k-1];
+                  }
+                  best_score[j]=tmp;
+                  best_ener[j]=ener16[i-start]+1;
+                  pitch[j]=i;
+                  break;
+               }
+            }
+         }
+      }
+   }
+#else
+   for (i=start;i<=end;i++)
+   {
+      float tmp = corr[i-start]*corr[i-start];
+      if (tmp*best_ener[N-1]>best_score[N-1]*(1+energy[i-start]))
+      {
+         for (j=0;j<N;j++)
+         {
+            if (tmp*best_ener[j]>best_score[j]*(1+energy[i-start]))
+            {
+               for (k=N-1;k>j;k--)
+               {
+                  best_score[k]=best_score[k-1];
+                  best_ener[k]=best_ener[k-1];
+                  pitch[k]=pitch[k-1];
+               }
+               best_score[j]=tmp;
+               best_ener[j]=energy[i-start]+1;
+               pitch[j]=i;
+               break;
+            }
+         }
+      }
+   }
+#endif
+
+   /* Compute open-loop gain */
+   if (gain)
+   {
+       for (j=0;j<N;j++)
+       {
+          spx_word16_t g;
+          i=pitch[j];
+          g = DIV32(corr[i-start], 10+SHR32(MULT16_16(spx_sqrt(e0),spx_sqrt(energy[i-start])),6));
+          /* FIXME: g = max(g,corr/energy) */
+                   if (g<0)
+                   g = 0;
+             gain[j]=g;
+       }
+   }
+}
+#endif
+
+#ifndef OVERRIDE_PITCH_GAIN_SEARCH_3TAP_VQ
+static int pitch_gain_search_3tap_vq(
+  const signed char *gain_cdbk,
+  int                gain_cdbk_size,
+  spx_word16_t      *C16,
+  spx_word16_t       max_gain
+)
+{
+  const signed char *ptr=gain_cdbk;
+  int                best_cdbk=0;
+  spx_word32_t       best_sum=-VERY_LARGE32;
+  spx_word32_t       sum=0;
+  spx_word16_t       g[3];
+  spx_word16_t       pitch_control=64;
+  spx_word16_t       gain_sum;
+  int                i;
+
+  for (i=0;i<gain_cdbk_size;i++) {
+         
+    ptr = gain_cdbk+4*i;
+    g[0]=ADD16((spx_word16_t)ptr[0],32);
+    g[1]=ADD16((spx_word16_t)ptr[1],32);
+    g[2]=ADD16((spx_word16_t)ptr[2],32);
+    gain_sum = (spx_word16_t)ptr[3];
+         
+    sum = compute_pitch_error(C16, g, pitch_control);
+         
+    if (sum>best_sum && gain_sum<=max_gain) {
+      best_sum=sum;
+      best_cdbk=i;
+    }
+  }
+
+  return best_cdbk;
+}
+#endif
+
+/** Finds the best quantized 3-tap pitch predictor by analysis by synthesis */
+static spx_word32_t pitch_gain_search_3tap(
+const spx_word16_t target[],       /* Target vector */
+const spx_coef_t ak[],          /* LPCs for this subframe */
+const spx_coef_t awk1[],        /* Weighted LPCs #1 for this subframe */
+const spx_coef_t awk2[],        /* Weighted LPCs #2 for this subframe */
+spx_sig_t exc[],                /* Excitation */
+const signed char *gain_cdbk,
+int gain_cdbk_size,
+int   pitch,                    /* Pitch value */
+int   p,                        /* Number of LPC coeffs */
+int   nsf,                      /* Number of samples in subframe */
+SpeexBits *bits,
+char *stack,
+const spx_word16_t *exc2,
+const spx_word16_t *r,
+spx_word16_t *new_target,
+int  *cdbk_index,
+int plc_tuning,
+spx_word32_t cumul_gain,
+int scaledown
+)
+{
+   int i,j;
+   VARDECL(spx_word16_t *tmp1);
+   VARDECL(spx_word16_t *e);
+   spx_word16_t *x[3];
+   spx_word32_t corr[3];
+   spx_word32_t A[3][3];
+   spx_word16_t gain[3];
+   spx_word32_t err;
+   spx_word16_t max_gain=128;
+   int          best_cdbk=0;
+
+   ALLOC(tmp1, 3*nsf, spx_word16_t);
+   ALLOC(e, nsf, spx_word16_t);
+
+   if (cumul_gain > 262144)
+      max_gain = 31;
+   
+   x[0]=tmp1;
+   x[1]=tmp1+nsf;
+   x[2]=tmp1+2*nsf;
+   
+   for (j=0;j<nsf;j++)
+      new_target[j] = target[j];
+
+   {
+      VARDECL(spx_mem_t *mm);
+      int pp=pitch-1;
+      ALLOC(mm, p, spx_mem_t);
+      for (j=0;j<nsf;j++)
+      {
+         if (j-pp<0)
+            e[j]=exc2[j-pp];
+         else if (j-pp-pitch<0)
+            e[j]=exc2[j-pp-pitch];
+         else
+            e[j]=0;
+      }
+#ifdef FIXED_POINT
+      /* Scale target and excitation down if needed (avoiding overflow) */
+      if (scaledown)
+      {
+         for (j=0;j<nsf;j++)
+            e[j] = SHR16(e[j],1);
+         for (j=0;j<nsf;j++)
+            new_target[j] = SHR16(new_target[j],1);
+      }
+#endif
+      for (j=0;j<p;j++)
+         mm[j] = 0;
+      iir_mem16(e, ak, e, nsf, p, mm, stack);
+      for (j=0;j<p;j++)
+         mm[j] = 0;
+      filter_mem16(e, awk1, awk2, e, nsf, p, mm, stack);
+      for (j=0;j<nsf;j++)
+         x[2][j] = e[j];
+   }
+   for (i=1;i>=0;i--)
+   {
+      spx_word16_t e0=exc2[-pitch-1+i];
+#ifdef FIXED_POINT
+      /* Scale excitation down if needed (avoiding overflow) */
+      if (scaledown)
+         e0 = SHR16(e0,1);
+#endif
+      x[i][0]=MULT16_16_Q14(r[0], e0);
+      for (j=0;j<nsf-1;j++)
+         x[i][j+1]=ADD32(x[i+1][j],MULT16_16_P14(r[j+1], e0));
+   }
+
+   for (i=0;i<3;i++)
+      corr[i]=inner_prod(x[i],new_target,nsf);
+   for (i=0;i<3;i++)
+      for (j=0;j<=i;j++)
+         A[i][j]=A[j][i]=inner_prod(x[i],x[j],nsf);
+
+   {
+      spx_word32_t C[9];
+#ifdef FIXED_POINT
+      spx_word16_t C16[9];
+#else
+      spx_word16_t *C16=C;
+#endif      
+      C[0]=corr[2];
+      C[1]=corr[1];
+      C[2]=corr[0];
+      C[3]=A[1][2];
+      C[4]=A[0][1];
+      C[5]=A[0][2];      
+      C[6]=A[2][2];
+      C[7]=A[1][1];
+      C[8]=A[0][0];
+      
+      /*plc_tuning *= 2;*/
+      if (plc_tuning<2)
+         plc_tuning=2;
+      if (plc_tuning>30)
+         plc_tuning=30;
+#ifdef FIXED_POINT
+      C[0] = SHL32(C[0],1);
+      C[1] = SHL32(C[1],1);
+      C[2] = SHL32(C[2],1);
+      C[3] = SHL32(C[3],1);
+      C[4] = SHL32(C[4],1);
+      C[5] = SHL32(C[5],1);
+      C[6] = MAC16_32_Q15(C[6],MULT16_16_16(plc_tuning,655),C[6]);
+      C[7] = MAC16_32_Q15(C[7],MULT16_16_16(plc_tuning,655),C[7]);
+      C[8] = MAC16_32_Q15(C[8],MULT16_16_16(plc_tuning,655),C[8]);
+      normalize16(C, C16, 32767, 9);
+#else
+      C[6]*=.5*(1+.02*plc_tuning);
+      C[7]*=.5*(1+.02*plc_tuning);
+      C[8]*=.5*(1+.02*plc_tuning);
+#endif
+
+      best_cdbk = pitch_gain_search_3tap_vq(gain_cdbk, gain_cdbk_size, C16, max_gain);
+
+#ifdef FIXED_POINT
+      gain[0] = ADD16(32,(spx_word16_t)gain_cdbk[best_cdbk*4]);
+      gain[1] = ADD16(32,(spx_word16_t)gain_cdbk[best_cdbk*4+1]);
+      gain[2] = ADD16(32,(spx_word16_t)gain_cdbk[best_cdbk*4+2]);
+      /*printf ("%d %d %d %d\n",gain[0],gain[1],gain[2], best_cdbk);*/
+#else
+      gain[0] = 0.015625*gain_cdbk[best_cdbk*4]  + .5;
+      gain[1] = 0.015625*gain_cdbk[best_cdbk*4+1]+ .5;
+      gain[2] = 0.015625*gain_cdbk[best_cdbk*4+2]+ .5;
+#endif
+      *cdbk_index=best_cdbk;
+   }
+
+   for (i=0;i<nsf;i++)
+      exc[i]=0;
+   for (i=0;i<3;i++)
+   {
+      int j;
+      int tmp1, tmp3;
+      int pp=pitch+1-i;
+      tmp1=nsf;
+      if (tmp1>pp)
+         tmp1=pp;
+      for (j=0;j<tmp1;j++)
+         exc[j]=MAC16_16(exc[j],SHL16(gain[2-i],7),exc2[j-pp]);
+      tmp3=nsf;
+      if (tmp3>pp+pitch)
+         tmp3=pp+pitch;
+      for (j=tmp1;j<tmp3;j++)
+         exc[j]=MAC16_16(exc[j],SHL16(gain[2-i],7),exc2[j-pp-pitch]);
+   }
+   for (i=0;i<nsf;i++)
+   {
+      spx_word32_t tmp = ADD32(ADD32(MULT16_16(gain[0],x[2][i]),MULT16_16(gain[1],x[1][i])),
+                            MULT16_16(gain[2],x[0][i]));
+      new_target[i] = SUB16(new_target[i], EXTRACT16(PSHR32(tmp,6)));
+   }
+   err = inner_prod(new_target, new_target, nsf);
+
+   return err;
+}
+
+/** Finds the best quantized 3-tap pitch predictor by analysis by synthesis */
+int pitch_search_3tap(
+spx_word16_t target[],                 /* Target vector */
+spx_word16_t *sw,
+spx_coef_t ak[],                     /* LPCs for this subframe */
+spx_coef_t awk1[],                   /* Weighted LPCs #1 for this subframe */
+spx_coef_t awk2[],                   /* Weighted LPCs #2 for this subframe */
+spx_sig_t exc[],                    /* Excitation */
+const void *par,
+int   start,                    /* Smallest pitch value allowed */
+int   end,                      /* Largest pitch value allowed */
+spx_word16_t pitch_coef,               /* Voicing (pitch) coefficient */
+int   p,                        /* Number of LPC coeffs */
+int   nsf,                      /* Number of samples in subframe */
+SpeexBits *bits,
+char *stack,
+spx_word16_t *exc2,
+spx_word16_t *r,
+int complexity,
+int cdbk_offset,
+int plc_tuning,
+spx_word32_t *cumul_gain
+)
+{
+   int i,j;
+   int cdbk_index, pitch=0, best_gain_index=0;
+   VARDECL(spx_sig_t *best_exc);
+   VARDECL(spx_word16_t *new_target);
+   VARDECL(spx_word16_t *best_target);
+   int best_pitch=0;
+   spx_word32_t err, best_err=-1;
+   int N;
+   const ltp_params *params;
+   const signed char *gain_cdbk;
+   int   gain_cdbk_size;
+   int scaledown=0;
+         
+   VARDECL(int *nbest);
+   
+   params = (const ltp_params*) par;
+   gain_cdbk_size = 1<<params->gain_bits;
+   gain_cdbk = params->gain_cdbk + 4*gain_cdbk_size*cdbk_offset;
+   
+   N=complexity;
+   if (N>10)
+      N=10;
+   if (N<1)
+      N=1;
+
+   ALLOC(nbest, N, int);
+   params = (const ltp_params*) par;
+
+   if (end<start)
+   {
+      speex_bits_pack(bits, 0, params->pitch_bits);
+      speex_bits_pack(bits, 0, params->gain_bits);
+      for (i=0;i<nsf;i++)
+         exc[i]=0;
+      return start;
+   }
+   
+#ifdef FIXED_POINT
+   /* Check if we need to scale everything down in the pitch search to avoid overflows */
+   for (i=0;i<nsf;i++)
+   {
+      if (ABS16(target[i])>16383)
+      {
+         scaledown=1;
+         break;
+      }
+   }
+   for (i=-end;i<nsf;i++)
+   {
+      if (ABS16(exc2[i])>16383)
+      {
+         scaledown=1;
+         break;
+      }
+   }
+#endif
+   if (N>end-start+1)
+      N=end-start+1;
+   if (end != start)
+      open_loop_nbest_pitch(sw, start, end, nsf, nbest, NULL, N, stack);
+   else
+      nbest[0] = start;
+   
+   ALLOC(best_exc, nsf, spx_sig_t);
+   ALLOC(new_target, nsf, spx_word16_t);
+   ALLOC(best_target, nsf, spx_word16_t);
+   
+   for (i=0;i<N;i++)
+   {
+      pitch=nbest[i];
+      for (j=0;j<nsf;j++)
+         exc[j]=0;
+      err=pitch_gain_search_3tap(target, ak, awk1, awk2, exc, gain_cdbk, gain_cdbk_size, pitch, p, nsf,
+                                 bits, stack, exc2, r, new_target, &cdbk_index, plc_tuning, *cumul_gain, scaledown);
+      if (err<best_err || best_err<0)
+      {
+         for (j=0;j<nsf;j++)
+            best_exc[j]=exc[j];
+         for (j=0;j<nsf;j++)
+            best_target[j]=new_target[j];
+         best_err=err;
+         best_pitch=pitch;
+         best_gain_index=cdbk_index;
+      }
+   }
+   /*printf ("pitch: %d %d\n", best_pitch, best_gain_index);*/
+   speex_bits_pack(bits, best_pitch-start, params->pitch_bits);
+   speex_bits_pack(bits, best_gain_index, params->gain_bits);
+#ifdef FIXED_POINT
+   *cumul_gain = MULT16_32_Q13(SHL16(params->gain_cdbk[4*best_gain_index+3],8), MAX32(1024,*cumul_gain));
+#else
+   *cumul_gain = 0.03125*MAX32(1024,*cumul_gain)*params->gain_cdbk[4*best_gain_index+3];
+#endif
+   /*printf ("%f\n", cumul_gain);*/
+   /*printf ("encode pitch: %d %d\n", best_pitch, best_gain_index);*/
+   for (i=0;i<nsf;i++)
+      exc[i]=best_exc[i];
+   for (i=0;i<nsf;i++)
+      target[i]=best_target[i];
+#ifdef FIXED_POINT
+   /* Scale target back up if needed */
+   if (scaledown)
+   {
+      for (i=0;i<nsf;i++)
+         target[i]=SHL16(target[i],1);
+   }
+#endif
+   return pitch;
+}
+
+void pitch_unquant_3tap(
+spx_word16_t exc[],             /* Input excitation */
+spx_word32_t exc_out[],         /* Output excitation */
+int   start,                    /* Smallest pitch value allowed */
+int   end,                      /* Largest pitch value allowed */
+spx_word16_t pitch_coef,        /* Voicing (pitch) coefficient */
+const void *par,
+int   nsf,                      /* Number of samples in subframe */
+int *pitch_val,
+spx_word16_t *gain_val,
+SpeexBits *bits,
+char *stack,
+int count_lost,
+int subframe_offset,
+spx_word16_t last_pitch_gain,
+int cdbk_offset
+)
+{
+   int i;
+   int pitch;
+   int gain_index;
+   spx_word16_t gain[3];
+   const signed char *gain_cdbk;
+   int gain_cdbk_size;
+   const ltp_params *params;
+
+   params = (const ltp_params*) par;
+   gain_cdbk_size = 1<<params->gain_bits;
+   gain_cdbk = params->gain_cdbk + 4*gain_cdbk_size*cdbk_offset;
+
+   pitch = speex_bits_unpack_unsigned(bits, params->pitch_bits);
+   pitch += start;
+   gain_index = speex_bits_unpack_unsigned(bits, params->gain_bits);
+   /*printf ("decode pitch: %d %d\n", pitch, gain_index);*/
+#ifdef FIXED_POINT
+   gain[0] = ADD16(32,(spx_word16_t)gain_cdbk[gain_index*4]);
+   gain[1] = ADD16(32,(spx_word16_t)gain_cdbk[gain_index*4+1]);
+   gain[2] = ADD16(32,(spx_word16_t)gain_cdbk[gain_index*4+2]);
+#else
+   gain[0] = 0.015625*gain_cdbk[gain_index*4]+.5;
+   gain[1] = 0.015625*gain_cdbk[gain_index*4+1]+.5;
+   gain[2] = 0.015625*gain_cdbk[gain_index*4+2]+.5;
+#endif
+
+   if (count_lost && pitch > subframe_offset)
+   {
+      spx_word16_t gain_sum;
+      if (1) {
+#ifdef FIXED_POINT
+         spx_word16_t tmp = count_lost < 4 ? last_pitch_gain : SHR16(last_pitch_gain,1);
+         if (tmp>62)
+            tmp=62;
+#else
+         spx_word16_t tmp = count_lost < 4 ? last_pitch_gain : 0.5 * last_pitch_gain;
+         if (tmp>.95)
+            tmp=.95;
+#endif
+         gain_sum = gain_3tap_to_1tap(gain);
+
+         if (gain_sum > tmp)
+         {
+            spx_word16_t fact = DIV32_16(SHL32(EXTEND32(tmp),14),gain_sum);
+            for (i=0;i<3;i++)
+               gain[i]=MULT16_16_Q14(fact,gain[i]);
+         }
+
+      }
+
+   }
+
+   *pitch_val = pitch;
+   gain_val[0]=gain[0];
+   gain_val[1]=gain[1];
+   gain_val[2]=gain[2];
+   gain[0] = SHL16(gain[0],7);
+   gain[1] = SHL16(gain[1],7);
+   gain[2] = SHL16(gain[2],7);
+   for (i=0;i<nsf;i++)
+      exc_out[i]=0;
+   for (i=0;i<3;i++)
+   {
+      int j;
+      int tmp1, tmp3;
+      int pp=pitch+1-i;
+      tmp1=nsf;
+      if (tmp1>pp)
+         tmp1=pp;
+      for (j=0;j<tmp1;j++)
+         exc_out[j]=MAC16_16(exc_out[j],gain[2-i],exc[j-pp]);
+      tmp3=nsf;
+      if (tmp3>pp+pitch)
+         tmp3=pp+pitch;
+      for (j=tmp1;j<tmp3;j++)
+         exc_out[j]=MAC16_16(exc_out[j],gain[2-i],exc[j-pp-pitch]);
+   }
+   /*for (i=0;i<nsf;i++)
+   exc[i]=PSHR32(exc32[i],13);*/
+}
+
+
+/** Forced pitch delay and gain */
+int forced_pitch_quant(
+spx_word16_t target[],                 /* Target vector */
+spx_word16_t *sw,
+spx_coef_t ak[],                     /* LPCs for this subframe */
+spx_coef_t awk1[],                   /* Weighted LPCs #1 for this subframe */
+spx_coef_t awk2[],                   /* Weighted LPCs #2 for this subframe */
+spx_sig_t exc[],                    /* Excitation */
+const void *par,
+int   start,                    /* Smallest pitch value allowed */
+int   end,                      /* Largest pitch value allowed */
+spx_word16_t pitch_coef,               /* Voicing (pitch) coefficient */
+int   p,                        /* Number of LPC coeffs */
+int   nsf,                      /* Number of samples in subframe */
+SpeexBits *bits,
+char *stack,
+spx_word16_t *exc2,
+spx_word16_t *r,
+int complexity,
+int cdbk_offset,
+int plc_tuning,
+spx_word32_t *cumul_gain
+)
+{
+   int i;
+   VARDECL(spx_sig_t *res);
+   ALLOC(res, nsf, spx_sig_t);
+#ifdef FIXED_POINT
+   if (pitch_coef>63)
+      pitch_coef=63;
+#else
+   if (pitch_coef>.99)
+      pitch_coef=.99;
+#endif
+   for (i=0;i<nsf&&i<start;i++)
+   {
+      exc[i]=MULT16_16(SHL16(pitch_coef, 7),exc2[i-start]);
+   }
+   for (;i<nsf;i++)
+   {
+      exc[i]=MULT16_32_Q15(SHL16(pitch_coef, 9),exc[i-start]);
+   }
+   syn_percep_zero(exc, ak, awk1, awk2, res, nsf, p, stack);
+   for (i=0;i<nsf;i++)
+      target[i]=EXTRACT16(SATURATE(SUB32(EXTEND32(target[i]),PSHR32(res[i],SIG_SHIFT-1)),32700));
+   return start;
+}
+
+/** Unquantize forced pitch delay and gain */
+void forced_pitch_unquant(
+spx_word16_t exc[],             /* Input excitation */
+spx_word32_t exc_out[],         /* Output excitation */
+int   start,                    /* Smallest pitch value allowed */
+int   end,                      /* Largest pitch value allowed */
+spx_word16_t pitch_coef,        /* Voicing (pitch) coefficient */
+const void *par,
+int   nsf,                      /* Number of samples in subframe */
+int *pitch_val,
+spx_word16_t *gain_val,
+SpeexBits *bits,
+char *stack,
+int count_lost,
+int subframe_offset,
+spx_word16_t last_pitch_gain,
+int cdbk_offset
+)
+{
+   int i;
+#ifdef FIXED_POINT
+   if (pitch_coef>63)
+      pitch_coef=63;
+#else
+   if (pitch_coef>.99)
+      pitch_coef=.99;
+#endif
+   for (i=0;i<nsf;i++)
+   {
+      exc_out[i]=MULT16_16(exc[i-start],SHL16(pitch_coef,7));
+      exc[i] = PSHR(exc_out[i],13);
+   }
+   *pitch_val = start;
+   gain_val[0]=gain_val[2]=0;
+   gain_val[1] = pitch_coef;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp.h	(revision 1163)
@@ -0,0 +1,141 @@
+/* Copyright (C) 2002 Jean-Marc Valin */
+/**
+   @file ltp.h
+   @brief Long-Term Prediction functions
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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 <speex/speex_bits.h>
+#include "misc.h"
+
+/** LTP parameters. */
+typedef struct {
+   const signed char *gain_cdbk;
+   int     gain_bits;
+   int     pitch_bits;
+} ltp_params;
+
+#ifdef FIXED_POINT
+#define gain_3tap_to_1tap(g) (ABS(g[1]) + (g[0]>0 ? g[0] : -SHR16(g[0],1)) + (g[2]>0 ? g[2] : -SHR16(g[2],1)))
+#else
+#define gain_3tap_to_1tap(g) (ABS(g[1]) + (g[0]>0 ? g[0] : -.5*g[0]) + (g[2]>0 ? g[2] : -.5*g[2]))
+#endif
+
+spx_word32_t inner_prod(const spx_word16_t *x, const spx_word16_t *y, int len);
+void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int nb_pitch, char *stack);
+
+void open_loop_nbest_pitch(spx_word16_t *sw, int start, int end, int len, int *pitch, spx_word16_t *gain, int N, char *stack);
+
+
+/** Finds the best quantized 3-tap pitch predictor by analysis by synthesis */
+int pitch_search_3tap(
+spx_word16_t target[],                 /* Target vector */
+spx_word16_t *sw,
+spx_coef_t ak[],                     /* LPCs for this subframe */
+spx_coef_t awk1[],                   /* Weighted LPCs #1 for this subframe */
+spx_coef_t awk2[],                   /* Weighted LPCs #2 for this subframe */
+spx_sig_t exc[],                    /* Overlapping codebook */
+const void *par,
+int   start,                    /* Smallest pitch value allowed */
+int   end,                      /* Largest pitch value allowed */
+spx_word16_t pitch_coef,               /* Voicing (pitch) coefficient */
+int   p,                        /* Number of LPC coeffs */
+int   nsf,                      /* Number of samples in subframe */
+SpeexBits *bits,
+char *stack,
+spx_word16_t *exc2,
+spx_word16_t *r,
+int   complexity,
+int   cdbk_offset,
+int plc_tuning,
+spx_word32_t *cumul_gain
+);
+
+/*Unquantize adaptive codebook and update pitch contribution*/
+void pitch_unquant_3tap(
+spx_word16_t exc[],             /* Input excitation */
+spx_word32_t exc_out[],         /* Output excitation */
+int   start,                    /* Smallest pitch value allowed */
+int   end,                      /* Largest pitch value allowed */
+spx_word16_t pitch_coef,        /* Voicing (pitch) coefficient */
+const void *par,
+int   nsf,                      /* Number of samples in subframe */
+int *pitch_val,
+spx_word16_t *gain_val,
+SpeexBits *bits,
+char *stack,
+int lost,
+int subframe_offset,
+spx_word16_t last_pitch_gain,
+int cdbk_offset
+);
+
+/** Forced pitch delay and gain */
+int forced_pitch_quant(
+spx_word16_t target[],                 /* Target vector */
+spx_word16_t *sw,
+spx_coef_t ak[],                     /* LPCs for this subframe */
+spx_coef_t awk1[],                   /* Weighted LPCs #1 for this subframe */
+spx_coef_t awk2[],                   /* Weighted LPCs #2 for this subframe */
+spx_sig_t exc[],                    /* Excitation */
+const void *par,
+int   start,                    /* Smallest pitch value allowed */
+int   end,                      /* Largest pitch value allowed */
+spx_word16_t pitch_coef,               /* Voicing (pitch) coefficient */
+int   p,                        /* Number of LPC coeffs */
+int   nsf,                      /* Number of samples in subframe */
+SpeexBits *bits,
+char *stack,
+spx_word16_t *exc2,
+spx_word16_t *r,
+int complexity,
+int cdbk_offset,
+int plc_tuning,
+spx_word32_t *cumul_gain
+);
+
+/** Unquantize forced pitch delay and gain */
+void forced_pitch_unquant(
+spx_word16_t exc[],             /* Input excitation */
+spx_word32_t exc_out[],         /* Output excitation */
+int   start,                    /* Smallest pitch value allowed */
+int   end,                      /* Largest pitch value allowed */
+spx_word16_t pitch_coef,        /* Voicing (pitch) coefficient */
+const void *par,
+int   nsf,                      /* Number of samples in subframe */
+int *pitch_val,
+spx_word16_t *gain_val,
+SpeexBits *bits,
+char *stack,
+int lost,
+int subframe_offset,
+spx_word16_t last_pitch_gain,
+int cdbk_offset
+);
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp_arm4.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp_arm4.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp_arm4.h	(revision 1163)
@@ -0,0 +1,188 @@
+/* Copyright (C) 2004 Jean-Marc Valin */
+/**
+   @file ltp_arm4.h
+   @brief Long-Term Prediction functions (ARM4 version)
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#define OVERRIDE_INNER_PROD
+spx_word32_t inner_prod(const spx_word16_t *x, const spx_word16_t *y, int len)
+{
+   spx_word32_t sum1=0,sum2=0;
+   spx_word16_t *deadx, *deady;
+   int deadlen, dead1, dead2, dead3, dead4, dead5, dead6;
+   __asm__ __volatile__ (
+         "\tldrsh %5, [%0], #2 \n"
+         "\tldrsh %6, [%1], #2 \n"
+         ".inner_prod_loop%=:\n"
+         "\tsub %7, %7, %7\n"
+         "\tsub %10, %10, %10\n"
+
+         "\tldrsh %8, [%0], #2 \n"
+         "\tldrsh %9, [%1], #2 \n"
+         "\tmla %7, %5, %6, %7\n"
+         "\tldrsh %5, [%0], #2 \n"
+         "\tldrsh %6, [%1], #2 \n"
+         "\tmla %10, %8, %9, %10\n"
+         "\tldrsh %8, [%0], #2 \n"
+         "\tldrsh %9, [%1], #2 \n"
+         "\tmla %7, %5, %6, %7\n"
+         "\tldrsh %5, [%0], #2 \n"
+         "\tldrsh %6, [%1], #2 \n"
+         "\tmla %10, %8, %9, %10\n"
+
+         "\tldrsh %8, [%0], #2 \n"
+         "\tldrsh %9, [%1], #2 \n"
+         "\tmla %7, %5, %6, %7\n"
+         "\tldrsh %5, [%0], #2 \n"
+         "\tldrsh %6, [%1], #2 \n"
+         "\tmla %10, %8, %9, %10\n"
+         "\tldrsh %8, [%0], #2 \n"
+         "\tldrsh %9, [%1], #2 \n"
+         "\tmla %7, %5, %6, %7\n"
+         "\tldrsh %5, [%0], #2 \n"
+         "\tldrsh %6, [%1], #2 \n"
+         "\tmla %10, %8, %9, %10\n"
+
+         "\tsubs %4, %4, #1\n"
+         "\tadd %2, %2, %7, asr #5\n"
+         "\tadd %3, %3, %10, asr #5\n"
+         "\tbne .inner_prod_loop%=\n"
+   : "=r" (deadx), "=r" (deady), "=r" (sum1),  "=r" (sum2), "=r" (deadlen),
+   "=r" (dead1), "=r" (dead2), "=r" (dead3), "=r" (dead4), "=r" (dead5), "=r" (dead6)
+   : "0" (x), "1" (y), "2" (sum1), "3" (sum2), "4" (len>>3)
+   : "cc"
+                        );
+   return (sum1+sum2)>>1;
+}
+
+#define OVERRIDE_PITCH_XCORR
+void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int nb_pitch, char *stack)
+{
+   int i,j;
+   for (i=0;i<nb_pitch;i+=4)
+   {
+      /* Compute correlation*/
+      //corr[nb_pitch-1-i]=inner_prod(x, _y+i, len);
+      spx_word32_t sum1=0;
+      spx_word32_t sum2=0;
+      spx_word32_t sum3=0;
+      spx_word32_t sum4=0;
+      const spx_word16_t *y = _y+i;
+      const spx_word16_t *x = _x;
+      spx_word32_t y0, y1, y2, y3;
+      y0=*y++;
+      y1=*y++;
+      y2=*y++;
+      y3=*y++;
+      for (j=0;j<len;j+=4)
+      {
+         spx_word32_t part1, part2, part3, part4, x0;
+         spx_word32_t dead1;
+         __asm__ __volatile__ (
+#ifdef SHORTCUTS
+               "\tldrsh %10, [%8], #4 \n"
+               "\tmul %4, %10, %0 \n"
+               "\tldrsh %15, [%8], #4 \n"
+               "\tmul %5, %10, %1 \n"
+               "\tldrsh %0, [%9], #2 \n"
+               "\tmul %6, %10, %2 \n"
+               "\tldrsh %1, [%9], #2 \n"
+               "\tmul %7, %10, %3 \n"
+               
+               
+               "\tmla %4, %15, %2, %4 \n"
+               "\tldrsh %2, [%9], #2 \n"
+               "\tmla %5, %15, %3, %5 \n"
+               "\tldrsh %3, [%9], #2 \n"
+               "\tmla %6, %15, %0, %6 \n"
+               "\tmla %7, %15, %1, %7 \n"
+
+#else
+               "\tldrsh %10, [%8], #2 \n"
+               "\tmul %4, %10, %0 \n"
+               "\tmul %5, %10, %1 \n"
+               "\tmul %6, %10, %2 \n"
+               "\tmul %7, %10, %3 \n"
+
+               "\tldrsh %10, [%8], #2 \n"
+               "\tldrsh %0, [%9], #2 \n"
+               "\tmla %4, %10, %1, %4 \n"
+               "\tmla %5, %10, %2, %5 \n"
+               "\tmla %6, %10, %3, %6 \n"
+               "\tmla %7, %10, %0, %7 \n"
+
+               "\tldrsh %10, [%8], #2 \n"
+               "\tldrsh %1, [%9], #2 \n"
+               "\tmla %4, %10, %2, %4 \n"
+               "\tmla %5, %10, %3, %5 \n"
+               "\tmla %6, %10, %0, %6 \n"
+               "\tmla %7, %10, %1, %7 \n"
+
+               "\tldrsh %10, [%8], #2 \n"
+               "\tldrsh %2, [%9], #2 \n"
+               "\tmla %4, %10, %3, %4 \n"
+               "\tmla %5, %10, %0, %5 \n"
+               "\tmla %6, %10, %1, %6 \n"
+               "\tmla %7, %10, %2, %7 \n"
+
+               "\tldrsh %3, [%9], #2 \n"
+#endif
+
+               "\tldr %10, %11 \n"
+               "\tldr %15, %12 \n"
+               "\tadd %4, %10, %4, asr #6 \n"
+               "\tstr %4, %11 \n"
+               "\tldr %10, %13 \n"
+               "\tadd %5, %15, %5, asr #6 \n"
+               "\tstr %5, %12 \n"
+               "\tldr %15, %14 \n"
+               "\tadd %6, %10, %6, asr #6 \n"
+               "\tadd %7, %15, %7, asr #6 \n"
+               "\tstr %6, %13 \n"
+               "\tstr %7, %14 \n"
+
+            : "=r" (y0), "=r" (y1), "=r" (y2), "=r" (y3),
+         "=r" (part1),  "=r" (part2),  "=r" (part3),  "=r" (part4),
+         "=r" (x), "=r" (y), "=r" (x0),
+         "=m" (sum1), "=m" (sum2), "=m" (sum3), "=m" (sum4), "=r" (dead1)
+            : "0" (y0), "1" (y1), "2" (y2), "3" (y3),
+            "8" (x), "9" (y),
+            "11" (sum1), "12" (sum2), "13" (sum3), "14" (sum4)
+            : "cc", "memory"
+                              );
+      }
+      corr[nb_pitch-1-i]=sum1;
+      corr[nb_pitch-2-i]=sum2;
+      corr[nb_pitch-3-i]=sum3;
+      corr[nb_pitch-4-i]=sum4;
+   }
+
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp_bfin.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp_bfin.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp_bfin.h	(revision 1163)
@@ -0,0 +1,419 @@
+/* Copyright (C) 2005 Analog Devices */
+/**
+   @file ltp_bfin.h
+   @author Jean-Marc Valin
+   @brief Long-Term Prediction functions (Blackfin version)
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#define OVERRIDE_INNER_PROD
+spx_word32_t inner_prod(const spx_word16_t *x, const spx_word16_t *y, int len)
+{
+   spx_word32_t sum=0;
+   __asm__ __volatile__ (
+      "P0 = %3;\n\t"
+      "P1 = %1;\n\t"
+      "P2 = %2;\n\t"
+      "I0 = P1;\n\t"
+      "I1 = P2;\n\t"
+      "L0 = 0;\n\t"
+      "L1 = 0;\n\t"
+      "A0 = 0;\n\t"
+      "R0.L = W[I0++] || R1.L = W[I1++];\n\t"
+      "LOOP inner%= LC0 = P0;\n\t"
+      "LOOP_BEGIN inner%=;\n\t"
+         "A0 += R0.L*R1.L (IS) || R0.L = W[I0++] || R1.L = W[I1++];\n\t"
+      "LOOP_END inner%=;\n\t"
+      "A0 += R0.L*R1.L (IS);\n\t"
+      "A0 = A0 >>> 6;\n\t"
+      "R0 = A0;\n\t"
+      "%0 = R0;\n\t"
+   : "=m" (sum)
+   : "m" (x), "m" (y), "d" (len-1)
+   : "P0", "P1", "P2", "R0", "R1", "A0", "I0", "I1", "L0", "L1", "R3"
+   );
+   return sum;
+}
+
+#define OVERRIDE_PITCH_XCORR
+void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int nb_pitch, char *stack)
+{
+   corr += nb_pitch - 1;
+   __asm__ __volatile__ (
+      "P2 = %0;\n\t"
+      "I0 = P2;\n\t" /* x in I0 */
+      "B0 = P2;\n\t" /* x in B0 */
+      "R0 = %3;\n\t" /* len in R0 */
+      "P3 = %3;\n\t"
+      "P3 += -2;\n\t" /* len in R0 */
+      "P4 = %4;\n\t" /* nb_pitch in R0 */
+      "R1 = R0 << 1;\n\t" /* number of bytes in x */
+      "L0 = R1;\n\t"
+      "P0 = %1;\n\t"
+
+      "P1 = %2;\n\t"
+      "B1 = P1;\n\t"
+      "L1 = 0;\n\t" /*Disable looping on I1*/
+
+      "r0 = [I0++];\n\t"
+      "LOOP pitch%= LC0 = P4 >> 1;\n\t"
+      "LOOP_BEGIN pitch%=;\n\t"
+         "I1 = P0;\n\t"
+         "A1 = A0 = 0;\n\t"
+         "R1 = [I1++];\n\t"
+         "LOOP inner_prod%= LC1 = P3 >> 1;\n\t"
+         "LOOP_BEGIN inner_prod%=;\n\t"
+            "A1 += R0.L*R1.H, A0 += R0.L*R1.L (IS) || R1.L = W[I1++];\n\t"
+            "A1 += R0.H*R1.L, A0 += R0.H*R1.H (IS) || R1.H = W[I1++] || R0 = [I0++];\n\t"
+         "LOOP_END inner_prod%=;\n\t"
+         "A1 += R0.L*R1.H, A0 += R0.L*R1.L (IS) || R1.L = W[I1++];\n\t"
+         "A1 += R0.H*R1.L, A0 += R0.H*R1.H (IS) || R0 = [I0++];\n\t"
+         "A0 = A0 >>> 6;\n\t"
+         "A1 = A1 >>> 6;\n\t"
+         "R2 = A0, R3 = A1;\n\t"
+         "[P1--] = r2;\n\t"
+         "[P1--] = r3;\n\t"
+         "P0 += 4;\n\t"
+      "LOOP_END pitch%=;\n\t"
+      "L0 = 0;\n\t"
+   : : "m" (_x), "m" (_y), "m" (corr), "m" (len), "m" (nb_pitch)
+   : "A0", "A1", "P0", "P1", "P2", "P3", "P4", "R0", "R1", "R2", "R3", "I0", "I1", "L0", "L1", "B0", "B1", "memory"
+   );
+}
+
+#define OVERRIDE_COMPUTE_PITCH_ERROR
+static inline spx_word32_t compute_pitch_error(spx_word16_t *C, spx_word16_t *g, spx_word16_t pitch_control)
+{
+   spx_word32_t sum;
+   __asm__ __volatile__
+         (
+         "A0 = 0;\n\t"
+         
+         "R0 = W[%1++];\n\t"
+         "R1.L = %2.L*%5.L (IS);\n\t"
+         "A0 += R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
+         
+         "R1.L = %3.L*%5.L (IS);\n\t"
+         "A0 += R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
+         
+         "R1.L = %4.L*%5.L (IS);\n\t"
+         "A0 += R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
+         
+         "R1.L = %2.L*%3.L (IS);\n\t"
+         "A0 -= R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
+
+         "R1.L = %4.L*%3.L (IS);\n\t"
+         "A0 -= R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
+         
+         "R1.L = %4.L*%2.L (IS);\n\t"
+         "A0 -= R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
+         
+         "R1.L = %2.L*%2.L (IS);\n\t"
+         "A0 -= R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
+
+         "R1.L = %3.L*%3.L (IS);\n\t"
+         "A0 -= R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
+         
+         "R1.L = %4.L*%4.L (IS);\n\t"
+         "A0 -= R1.L*R0.L (IS);\n\t"
+         
+         "%0 = A0;\n\t"
+   : "=&D" (sum), "=a" (C)
+   : "d" (g[0]), "d" (g[1]), "d" (g[2]), "d" (pitch_control), "1" (C)
+   : "R0", "R1", "R2", "A0"
+         );
+   return sum;
+}
+
+#define OVERRIDE_OPEN_LOOP_NBEST_PITCH
+#ifdef OVERRIDE_OPEN_LOOP_NBEST_PITCH
+void open_loop_nbest_pitch(spx_word16_t *sw, int start, int end, int len, int *pitch, spx_word16_t *gain, int N, char *stack)
+{
+   int i,j,k;
+   VARDECL(spx_word32_t *best_score);
+   VARDECL(spx_word32_t *best_ener);
+   spx_word32_t e0;
+   VARDECL(spx_word32_t *corr);
+   VARDECL(spx_word32_t *energy);
+
+   ALLOC(best_score, N, spx_word32_t);
+   ALLOC(best_ener, N, spx_word32_t);
+   ALLOC(corr, end-start+1, spx_word32_t);
+   ALLOC(energy, end-start+2, spx_word32_t);
+
+   for (i=0;i<N;i++)
+   {
+        best_score[i]=-1;
+        best_ener[i]=0;
+        pitch[i]=start;
+   }
+
+   energy[0]=inner_prod(sw-start, sw-start, len);
+   e0=inner_prod(sw, sw, len);
+
+   /* energy update -------------------------------------*/
+
+      __asm__ __volatile__
+      (
+"        P0 = %0;\n\t"
+"        I1 = %1;\n\t"
+"        L1 = 0;\n\t"
+"        I2 = %2;\n\t"
+"        L2 = 0;\n\t"
+"        R2 = [P0++];\n\t"
+"        R3 = 0;\n\t"
+"        LSETUP (eu1, eu2) LC1 = %3;\n\t"
+"eu1:      R1.L = W [I1--] || R0.L = W [I2--] ;\n\t"
+"          R1 = R1.L * R1.L (IS);\n\t"
+"          R0 = R0.L * R0.L (IS);\n\t"
+"          R1 >>>= 6;\n\t"
+"          R1 = R1 + R2;\n\t"
+"          R0 >>>= 6;\n\t"
+"          R1 = R1 - R0;\n\t"
+"          R2 = MAX(R1,R3);\n\t"
+"eu2:      [P0++] = R2;\n\t"
+       : : "d" (energy), "d" (&sw[-start-1]), "d" (&sw[-start+len-1]),
+           "a" (end-start)  
+       : "P0", "I1", "I2", "R0", "R1", "R2", "R3"
+#if (__GNUC__ == 4)
+         , "LC1"
+#endif
+       );
+
+   pitch_xcorr(sw, sw-end, corr, len, end-start+1, stack);
+
+   /* FIXME: Fixed-point and floating-point code should be merged */
+   {
+      VARDECL(spx_word16_t *corr16);
+      VARDECL(spx_word16_t *ener16);
+      ALLOC(corr16, end-start+1, spx_word16_t);
+      ALLOC(ener16, end-start+1, spx_word16_t);
+      /* Normalize to 180 so we can square it and it still fits in 16 bits */
+      normalize16(corr, corr16, 180, end-start+1);
+      normalize16(energy, ener16, 180, end-start+1);
+
+      if (N == 1) {
+	/* optimised asm to handle N==1 case */
+      __asm__ __volatile__
+      (
+"        I0 = %1;\n\t"                     /* I0: corr16[]    */
+"        L0 = 0;\n\t"
+"        I1 = %2;\n\t"                     /* I1: energy      */
+"        L1 = 0;\n\t"
+"        R2 = -1;\n\t"                     /* R2: best score  */
+"        R3 = 0;\n\t"                      /* R3: best energy */
+"        P0 = %4;\n\t"                     /* P0: best pitch  */
+"        P1 = %4;\n\t"                     /* P1: counter     */
+"        LSETUP (sl1, sl2) LC1 = %3;\n\t"
+"sl1:      R0.L = W [I0++] || R1.L = W [I1++];\n\t"         
+"          R0 = R0.L * R0.L (IS);\n\t"
+"          R1   += 1;\n\t"
+"          R4   = R0.L * R3.L;\n\t"
+"          R5   = R2.L * R1.L;\n\t"
+"          cc   = R5 < R4;\n\t"
+"          if cc R2 = R0;\n\t"
+"          if cc R3 = R1;\n\t"
+"          if cc P0 = P1;\n\t"
+"sl2:      P1 += 1;\n\t"
+"        %0 = P0;\n\t"
+       : "=&d" (pitch[0])
+       : "a" (corr16), "a" (ener16), "a" (end+1-start), "d" (start) 
+       : "P0", "P1", "I0", "I1", "R0", "R1", "R2", "R3", "R4", "R5"
+#if (__GNUC__ == 4)
+         , "LC1"
+#endif
+       );
+
+      }
+      else {
+	for (i=start;i<=end;i++)
+	  {
+	    spx_word16_t tmp = MULT16_16_16(corr16[i-start],corr16[i-start]);
+	    /* Instead of dividing the tmp by the energy, we multiply on the other side */
+	    if (MULT16_16(tmp,best_ener[N-1])>MULT16_16(best_score[N-1],ADD16(1,ener16[i-start])))
+	      {
+		/* We can safely put it last and then check */
+		best_score[N-1]=tmp;
+		best_ener[N-1]=ener16[i-start]+1;
+		pitch[N-1]=i;
+		/* Check if it comes in front of others */
+		for (j=0;j<N-1;j++)
+		  {
+		    if (MULT16_16(tmp,best_ener[j])>MULT16_16(best_score[j],ADD16(1,ener16[i-start])))
+		      {
+			for (k=N-1;k>j;k--)
+			  {
+			    best_score[k]=best_score[k-1];
+			    best_ener[k]=best_ener[k-1];
+			    pitch[k]=pitch[k-1];
+			  }
+			best_score[j]=tmp;
+			best_ener[j]=ener16[i-start]+1;
+			pitch[j]=i;
+			break;
+		      }
+		  }
+	      }
+	  }
+      }
+   }
+
+   /* Compute open-loop gain */
+   if (gain)
+   {
+       for (j=0;j<N;j++)
+       {
+          spx_word16_t g;
+          i=pitch[j];
+          g = DIV32(corr[i-start], 10+SHR32(MULT16_16(spx_sqrt(e0),spx_sqrt(energy[i-start])),6));
+          /* FIXME: g = max(g,corr/energy) */
+                   if (g<0)
+                   g = 0;
+             gain[j]=g;
+       }
+   }
+}
+#endif
+
+#define OVERRIDE_PITCH_GAIN_SEARCH_3TAP_VQ
+#ifdef OVERRIDE_PITCH_GAIN_SEARCH_3TAP_VQ
+static int pitch_gain_search_3tap_vq(
+  const signed char *gain_cdbk,
+  int                gain_cdbk_size,
+  spx_word16_t      *C16,
+  spx_word16_t       max_gain
+)
+{
+  const signed char *ptr=gain_cdbk;
+  int                best_cdbk=0;
+  spx_word32_t       best_sum=-VERY_LARGE32;
+  spx_word32_t       sum=0;
+  spx_word16_t       g[3];
+  spx_word16_t       pitch_control=64;
+  spx_word16_t       gain_sum;
+  int                i;
+
+      /* fast asm version of VQ codebook search */
+
+      __asm__ __volatile__
+      (
+
+"        P0 = %2;\n\t"                     /* P0: ptr to gain_cdbk */
+"        L1 = 0;\n\t"                      /* no circ addr for L1  */
+"        %0 = 0;\n\t"                      /* %0: best_sum         */
+"        %1 = 0;\n\t"                      /* %1: best_cbdk        */
+"        P1 = 0;\n\t"                      /* P1: loop counter     */
+"        R5 = 64;\n\t"                     /* R5: pitch_control    */
+
+"        LSETUP (pgs1, pgs2) LC1 = %4;\n\t"
+"pgs1:     R2  = B [P0++] (X);\n\t"        /* R2: g[0]             */
+"          R3  = B [P0++] (X);\n\t"        /* R3: g[1]             */
+"          R4  = B [P0++] (X);\n\t"        /* R4: g[2]             */
+"          R2 += 32;\n\t"
+"          R3 += 32;\n\t"
+"          R4 += 32;\n\t"
+
+"          R0  = B [P0++] (X);\n\t"              
+"          B0  = R0;\n\t"                  /* BO: gain_sum         */
+          
+           /* compute_pitch_error() -------------------------------*/
+
+"          I1 = %3;\n\t"                   /* I1: ptr to C         */
+"          A0 = 0;\n\t"
+         
+"          R0.L = W[I1++];\n\t"
+"          R1.L = R2.L*R5.L (IS);\n\t"
+"          A0 += R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
+         
+"          R1.L = R3.L*R5.L (IS);\n\t"
+"          A0 += R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
+         
+"          R1.L = R4.L*R5.L (IS);\n\t"
+"          A0 += R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
+         
+"          R1.L = R2.L*R3.L (IS);\n\t"
+"          A0 -= R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
+
+"          R1.L = R4.L*R3.L (IS);\n\t"
+"          A0 -= R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
+         
+"          R1.L = R4.L*R2.L (IS);\n\t"
+"          A0 -= R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
+         
+"          R1.L = R2.L*R2.L (IS);\n\t"
+"          A0 -= R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
+
+"          R1.L = R3.L*R3.L (IS);\n\t"
+"          A0 -= R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
+         
+"          R1.L = R4.L*R4.L (IS);\n\t"
+"          R0 = (A0 -= R1.L*R0.L) (IS);\n\t"
+
+/*
+    Re-arrange the if-then to code efficiently on the Blackfin:
+
+      if (sum>best_sum && gain_sum<=max_gain)   ------ (1)
+
+      if (sum>best_sum && !(gain_sum>max_gain)) ------ (2)
+
+      if (max_gain<=gain_sum) {                 ------ (3)
+      sum = -VERY_LARGE32;
+      }
+      if (best_sum<=sum)
+
+    The blackin cc instructions are all of the form:
+
+      cc = x < y (or cc = x <= y)
+*/
+"          R1 = B0\n\t"
+"          R2 = %5\n\t"
+"          R3 = %6\n\t"
+"          cc = R2 <= R1;\n\t" 
+"          if cc R0 = R3;\n\t"
+"          cc = %0 <= R0;\n\t"
+"          if cc %0 = R0;\n\t"
+"          if cc %1 = P1;\n\t"
+
+"pgs2:     P1 += 1;\n\t"
+   
+       : "=&d" (best_sum), "=&d" (best_cdbk) 
+       : "a" (gain_cdbk), "a" (C16), "a" (gain_cdbk_size), "a" (max_gain),
+         "b" (-VERY_LARGE32)
+       : "R0", "R1", "R2", "R3", "R4", "R5", "P0", 
+         "P1", "I1", "L1", "A0", "B0"
+#if (__GNUC__ == 4)
+         , "LC1"
+#endif
+       );
+
+  return best_cdbk;
+}
+#endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp_sse.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp_sse.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/ltp_sse.h	(revision 1163)
@@ -0,0 +1,92 @@
+/* Copyright (C) 2002 Jean-Marc Valin */
+/**
+   @file ltp_sse.h
+   @brief Long-Term Prediction functions (SSE version)
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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 <xmmintrin.h>
+
+#define OVERRIDE_INNER_PROD
+float inner_prod(const float *a, const float *b, int len)
+{
+   int i;
+   float ret;
+   __m128 sum = _mm_setzero_ps();
+   for (i=0;i<(len>>2);i+=2)
+   {
+      sum = _mm_add_ps(sum, _mm_mul_ps(_mm_loadu_ps(a+0), _mm_loadu_ps(b+0)));
+      sum = _mm_add_ps(sum, _mm_mul_ps(_mm_loadu_ps(a+4), _mm_loadu_ps(b+4)));
+      a += 8;
+      b += 8;
+   }
+   sum = _mm_add_ps(sum, _mm_movehl_ps(sum, sum));
+   sum = _mm_add_ss(sum, _mm_shuffle_ps(sum, sum, 0x55));
+   _mm_store_ss(&ret, sum);
+   return ret;
+}
+
+#define OVERRIDE_PITCH_XCORR
+void pitch_xcorr(const float *_x, const float *_y, float *corr, int len, int nb_pitch, char *stack)
+{
+   int i, offset;
+   VARDECL(__m128 *x);
+   VARDECL(__m128 *y);
+   int N, L;
+   N = len>>2;
+   L = nb_pitch>>2;
+   ALLOC(x, N, __m128);
+   ALLOC(y, N+L, __m128);
+   for (i=0;i<N;i++)
+      x[i] = _mm_loadu_ps(_x+(i<<2));
+   for (offset=0;offset<4;offset++)
+   {
+      for (i=0;i<N+L;i++)
+         y[i] = _mm_loadu_ps(_y+(i<<2)+offset);
+      for (i=0;i<L;i++)
+      {
+         int j;
+         __m128 sum, *xx, *yy;
+         sum = _mm_setzero_ps();
+         yy = y+i;
+         xx = x;
+         for (j=0;j<N;j+=2)
+         {
+            sum = _mm_add_ps(sum, _mm_mul_ps(xx[0], yy[0]));
+            sum = _mm_add_ps(sum, _mm_mul_ps(xx[1], yy[1]));
+            xx += 2;
+            yy += 2;
+         }
+         sum = _mm_add_ps(sum, _mm_movehl_ps(sum, sum));
+         sum = _mm_add_ss(sum, _mm_shuffle_ps(sum, sum, 0x55));
+         _mm_store_ss(corr+nb_pitch-1-(i<<2)-offset, sum);
+      }
+   }
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/math_approx.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/math_approx.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/math_approx.c	(revision 1163)
@@ -0,0 +1,291 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: math_approx.c
+   Various math approximation functions for Speex
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "math_approx.h"
+#include "misc.h"
+
+spx_int16_t spx_ilog2(spx_uint32_t x)
+{
+   int r=0;
+   if (x>=(spx_int32_t)65536)
+   {
+      x >>= 16;
+      r += 16;
+   }
+   if (x>=256)
+   {
+      x >>= 8;
+      r += 8;
+   }
+   if (x>=16)
+   {
+      x >>= 4;
+      r += 4;
+   }
+   if (x>=4)
+   {
+      x >>= 2;
+      r += 2;
+   }
+   if (x>=2)
+   {
+      r += 1;
+   }
+   return r;
+}
+
+spx_int16_t spx_ilog4(spx_uint32_t x)
+{
+   int r=0;
+   if (x>=(spx_int32_t)65536)
+   {
+      x >>= 16;
+      r += 8;
+   }
+   if (x>=256)
+   {
+      x >>= 8;
+      r += 4;
+   }
+   if (x>=16)
+   {
+      x >>= 4;
+      r += 2;
+   }
+   if (x>=4)
+   {
+      r += 1;
+   }
+   return r;
+}
+
+#ifdef FIXED_POINT
+
+/* sqrt(x) ~= 0.22178 + 1.29227*x - 0.77070*x^2 + 0.25723*x^3 (for .25 < x < 1) */
+/*#define C0 3634
+#define C1 21173
+#define C2 -12627
+#define C3 4215*/
+
+/* sqrt(x) ~= 0.22178 + 1.29227*x - 0.77070*x^2 + 0.25659*x^3 (for .25 < x < 1) */
+#define C0 3634
+#define C1 21173
+#define C2 -12627
+#define C3 4204
+
+spx_word16_t spx_sqrt(spx_word32_t x)
+{
+   int k;
+   spx_word32_t rt;
+   k = spx_ilog4(x)-6;
+   x = VSHR32(x, (k<<1));
+   rt = ADD16(C0, MULT16_16_Q14(x, ADD16(C1, MULT16_16_Q14(x, ADD16(C2, MULT16_16_Q14(x, (C3)))))));
+   rt = VSHR32(rt,7-k);
+   return rt;
+}
+
+/* log(x) ~= -2.18151 + 4.20592*x - 2.88938*x^2 + 0.86535*x^3 (for .5 < x < 1) */
+
+
+#define A1 16469
+#define A2 2242
+#define A3 1486
+
+spx_word16_t spx_acos(spx_word16_t x)
+{
+   int s=0;
+   spx_word16_t ret;
+   spx_word16_t sq;
+   if (x<0)
+   {
+      s=1;
+      x = NEG16(x);
+   }
+   x = SUB16(16384,x);
+   
+   x = x >> 1;
+   sq = MULT16_16_Q13(x, ADD16(A1, MULT16_16_Q13(x, ADD16(A2, MULT16_16_Q13(x, (A3))))));
+   ret = spx_sqrt(SHL32(EXTEND32(sq),13));
+   
+   /*ret = spx_sqrt(67108864*(-1.6129e-04 + 2.0104e+00*f + 2.7373e-01*f*f + 1.8136e-01*f*f*f));*/
+   if (s)
+      ret = SUB16(25736,ret);
+   return ret;
+}
+
+
+#define K1 8192
+#define K2 -4096
+#define K3 340
+#define K4 -10
+
+spx_word16_t spx_cos(spx_word16_t x)
+{
+   spx_word16_t x2;
+
+   if (x<12868)
+   {
+      x2 = MULT16_16_P13(x,x);
+      return ADD32(K1, MULT16_16_P13(x2, ADD32(K2, MULT16_16_P13(x2, ADD32(K3, MULT16_16_P13(K4, x2))))));
+   } else {
+      x = SUB16(25736,x);
+      x2 = MULT16_16_P13(x,x);
+      return SUB32(-K1, MULT16_16_P13(x2, ADD32(K2, MULT16_16_P13(x2, ADD32(K3, MULT16_16_P13(K4, x2))))));
+   }
+}
+
+#define L1 32767
+#define L2 -7651
+#define L3 8277
+#define L4 -626
+
+static inline spx_word16_t _spx_cos_pi_2(spx_word16_t x)
+{
+   spx_word16_t x2;
+   
+   x2 = MULT16_16_P15(x,x);
+   return ADD16(1,MIN16(32766,ADD32(SUB16(L1,x2), MULT16_16_P15(x2, ADD32(L2, MULT16_16_P15(x2, ADD32(L3, MULT16_16_P15(L4, x2))))))));
+}
+
+spx_word16_t spx_cos_norm(spx_word32_t x)
+{
+   x = x&0x0001ffff;
+   if (x>SHL32(EXTEND32(1), 16))
+      x = SUB32(SHL32(EXTEND32(1), 17),x);
+   if (x&0x00007fff)
+   {
+      if (x<SHL32(EXTEND32(1), 15))
+      {
+         return _spx_cos_pi_2(EXTRACT16(x));
+      } else {
+         return NEG32(_spx_cos_pi_2(EXTRACT16(65536-x)));
+      }
+   } else {
+      if (x&0x0000ffff)
+         return 0;
+      else if (x&0x0001ffff)
+         return -32767;
+      else
+         return 32767;
+   }
+}
+
+/*
+ K0 = 1
+ K1 = log(2)
+ K2 = 3-4*log(2)
+ K3 = 3*log(2) - 2
+*/
+#define D0 16384
+#define D1 11356
+#define D2 3726
+#define D3 1301
+/* Input in Q11 format, output in Q16 */
+static spx_word32_t spx_exp2(spx_word16_t x)
+{
+   int integer;
+   spx_word16_t frac;
+   integer = SHR16(x,11);
+   if (integer>14)
+      return 0x7fffffff;
+   else if (integer < -15)
+      return 0;
+   frac = SHL16(x-SHL16(integer,11),3);
+   frac = ADD16(D0, MULT16_16_Q14(frac, ADD16(D1, MULT16_16_Q14(frac, ADD16(D2 , MULT16_16_Q14(D3,frac))))));
+   return VSHR32(EXTEND32(frac), -integer-2);
+}
+
+/* Input in Q11 format, output in Q16 */
+spx_word32_t spx_exp(spx_word16_t x)
+{
+   if (x>21290)
+      return 0x7fffffff;
+   else if (x<-21290)
+      return 0;
+   else
+      return spx_exp2(MULT16_16_P14(23637,x));
+}
+#define M1 32767
+#define M2 -21
+#define M3 -11943
+#define M4 4936
+
+static inline spx_word16_t spx_atan01(spx_word16_t x)
+{
+   return MULT16_16_P15(x, ADD32(M1, MULT16_16_P15(x, ADD32(M2, MULT16_16_P15(x, ADD32(M3, MULT16_16_P15(M4, x)))))));
+}
+
+/* Input in Q15, output in Q14 */
+spx_word16_t spx_atan(spx_word32_t x)
+{
+   if (x <= 32767)
+   {
+      return SHR16(spx_atan01(x),1);
+   } else {
+      int e = spx_ilog2(x);
+      if (e>=29)
+         return 25736;
+      x = DIV32_16(SHL32(EXTEND32(32767),29-e), EXTRACT16(SHR32(x, e-14)));
+      return SUB16(25736, SHR16(spx_atan01(x),1));
+   }
+}
+#else
+
+#ifndef M_PI
+#define M_PI           3.14159265358979323846  /* pi */
+#endif
+
+#define C1 0.9999932946f
+#define C2 -0.4999124376f
+#define C3 0.0414877472f
+#define C4 -0.0012712095f
+
+
+#define SPX_PI_2 1.5707963268
+spx_word16_t spx_cos(spx_word16_t x)
+{
+   if (x<SPX_PI_2)
+   {
+      x *= x;
+      return C1 + x*(C2+x*(C3+C4*x));
+   } else {
+      x = M_PI-x;
+      x *= x;
+      return NEG16(C1 + x*(C2+x*(C3+C4*x)));
+   }
+}
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/math_approx.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/math_approx.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/math_approx.h	(revision 1163)
@@ -0,0 +1,62 @@
+/* Copyright (C) 2002 Jean-Marc Valin */
+/**
+   @file math_approx.h
+   @brief Various math approximation functions for Speex
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef MATH_APPROX_H
+#define MATH_APPROX_H
+
+#include "misc.h"
+
+spx_word16_t spx_cos(spx_word16_t x);
+spx_int16_t spx_ilog2(spx_uint32_t x);
+spx_int16_t spx_ilog4(spx_uint32_t x);
+#ifdef FIXED_POINT
+spx_word16_t spx_sqrt(spx_word32_t x);
+spx_word16_t spx_acos(spx_word16_t x);
+spx_word32_t spx_exp(spx_word16_t x);
+spx_word16_t spx_cos_norm(spx_word32_t x);
+
+/* Input in Q15, output in Q14 */
+spx_word16_t spx_atan(spx_word32_t x);
+
+#else
+
+#define spx_sqrt sqrt
+#define spx_acos acos
+#define spx_exp exp
+#define spx_cos_norm(x) (cos((.5f*M_PI)*(x)))
+#define spx_atan atan
+
+#endif
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/mdf.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/mdf.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/mdf.c	(revision 1163)
@@ -0,0 +1,948 @@
+/* Copyright (C) 2003-2007 Jean-Marc Valin
+
+   File: mdf.c
+   Echo canceller based on the MDF algorithm (see below)
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+
+   2. 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.
+
+   3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+*/
+
+/*
+   The echo canceller is based on the MDF algorithm described in:
+
+   J. S. Soo, K. K. Pang Multidelay block frequency adaptive filter, 
+   IEEE Trans. Acoust. Speech Signal Process., Vol. ASSP-38, No. 2, 
+   February 1990.
+   
+   We use the Alternatively Updated MDF (AUMDF) variant. Robustness to 
+   double-talk is achieved using a variable learning rate as described in:
+   
+   Valin, J.-M., On Adjusting the Learning Rate in Frequency Domain Echo 
+   Cancellation With Double-Talk. To appear in IEEE Transactions on Audio,
+   Speech and Language Processing, 2006.
+   http://people.xiph.org/~jm/papers/valin_taslp2006.pdf
+   
+   There is no explicit double-talk detection, but a continuous variation
+   in the learning rate based on residual echo, double-talk and background
+   noise.
+   
+   About the fixed-point version:
+   All the signals are represented with 16-bit words. The filter weights 
+   are represented with 32-bit words, but only the top 16 bits are used
+   in most cases. The lower 16 bits are completely unreliable (due to the
+   fact that the update is done only on the top bits), but help in the
+   adaptation -- probably by removing a "threshold effect" due to
+   quantization (rounding going to zero) when the gradient is small.
+   
+   Another kludge that seems to work good: when performing the weight
+   update, we only move half the way toward the "goal" this seems to
+   reduce the effect of quantization noise in the update phase. This
+   can be seen as applying a gradient descent on a "soft constraint"
+   instead of having a hard constraint.
+   
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "misc.h"
+#include "speex/speex_echo.h"
+#include "fftwrap.h"
+#include "pseudofloat.h"
+#include "math_approx.h"
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+#ifdef FIXED_POINT
+#define WEIGHT_SHIFT 11
+#define NORMALIZE_SCALEDOWN 5
+#define NORMALIZE_SCALEUP 3
+#else
+#define WEIGHT_SHIFT 0
+#endif
+
+/* If enabled, the transition between blocks is smooth, so there isn't any blocking
+aftifact when adapting. The cost is an extra FFT and a matrix-vector multiply */
+#define SMOOTH_BLOCKS
+
+#ifdef FIXED_POINT
+static const spx_float_t MIN_LEAK = {16777, -19};
+#define TOP16(x) ((x)>>16)
+#else
+static const spx_float_t MIN_LEAK = .032f;
+#define TOP16(x) (x)
+#endif
+
+
+#define PLAYBACK_DELAY 2
+
+void speex_echo_get_residual(SpeexEchoState *st, spx_word32_t *Yout, int len);
+
+
+/** Speex echo cancellation state. */
+struct SpeexEchoState_ {
+   int frame_size;           /**< Number of samples processed each time */
+   int window_size;
+   int M;
+   int cancel_count;
+   int adapted;
+   int saturated;
+   int screwed_up;
+   spx_int32_t sampling_rate;
+   spx_word16_t spec_average;
+   spx_word16_t beta0;
+   spx_word16_t beta_max;
+   spx_word32_t sum_adapt;
+   spx_word16_t leak_estimate;
+   
+   spx_word16_t *e;      /* scratch */
+   spx_word16_t *x;
+   spx_word16_t *X;
+   spx_word16_t *input;  /* scratch */
+   spx_word16_t *y;      /* scratch */
+   spx_word16_t *last_y;
+   spx_word16_t *Y;      /* scratch */
+   spx_word16_t *E;
+   spx_word32_t *PHI;    /* scratch */
+   spx_word32_t *W;
+   spx_word32_t *power;
+   spx_float_t *power_1;
+   spx_word16_t *wtmp;   /* scratch */
+#ifdef FIXED_POINT
+   spx_word16_t *wtmp2;  /* scratch */
+#endif
+   spx_word32_t *Rf;     /* scratch */
+   spx_word32_t *Yf;     /* scratch */
+   spx_word32_t *Xf;     /* scratch */
+   spx_word32_t *Eh;
+   spx_word32_t *Yh;
+   spx_float_t Pey;
+   spx_float_t Pyy;
+   spx_word16_t *window;
+   spx_word16_t *prop;
+   void *fft_table;
+   spx_word16_t memX, memD, memE;
+   spx_word16_t preemph;
+   spx_word16_t notch_radius;
+   spx_mem_t notch_mem[2];
+
+   /* NOTE: If you only use speex_echo_cancel() and want to save some memory, remove this */
+   spx_int16_t *play_buf;
+   int play_buf_pos;
+   int play_buf_started;
+};
+
+static inline void filter_dc_notch16(const spx_int16_t *in, spx_word16_t radius, spx_word16_t *out, int len, spx_mem_t *mem)
+{
+   int i;
+   spx_word16_t den2;
+#ifdef FIXED_POINT
+   den2 = MULT16_16_Q15(radius,radius) + MULT16_16_Q15(QCONST16(.7,15),MULT16_16_Q15(32767-radius,32767-radius));
+#else
+   den2 = radius*radius + .7*(1-radius)*(1-radius);
+#endif   
+   /*printf ("%d %d %d %d %d %d\n", num[0], num[1], num[2], den[0], den[1], den[2]);*/
+   for (i=0;i<len;i++)
+   {
+      spx_word16_t vin = in[i];
+      spx_word32_t vout = mem[0] + SHL32(EXTEND32(vin),15);
+#ifdef FIXED_POINT
+      mem[0] = mem[1] + SHL32(SHL32(-EXTEND32(vin),15) + MULT16_32_Q15(radius,vout),1);
+#else
+      mem[0] = mem[1] + 2*(-vin + radius*vout);
+#endif
+      mem[1] = SHL32(EXTEND32(vin),15) - MULT16_32_Q15(den2,vout);
+      out[i] = SATURATE32(PSHR32(MULT16_32_Q15(radius,vout),15),32767);
+   }
+}
+
+static inline spx_word32_t mdf_inner_prod(const spx_word16_t *x, const spx_word16_t *y, int len)
+{
+   spx_word32_t sum=0;
+   len >>= 1;
+   while(len--)
+   {
+      spx_word32_t part=0;
+      part = MAC16_16(part,*x++,*y++);
+      part = MAC16_16(part,*x++,*y++);
+      /* HINT: If you had a 40-bit accumulator, you could shift only at the end */
+      sum = ADD32(sum,SHR32(part,6));
+   }
+   return sum;
+}
+
+/** Compute power spectrum of a half-complex (packed) vector */
+static inline void power_spectrum(const spx_word16_t *X, spx_word32_t *ps, int N)
+{
+   int i, j;
+   ps[0]=MULT16_16(X[0],X[0]);
+   for (i=1,j=1;i<N-1;i+=2,j++)
+   {
+      ps[j] =  MULT16_16(X[i],X[i]) + MULT16_16(X[i+1],X[i+1]);
+   }
+   ps[j]=MULT16_16(X[i],X[i]);
+}
+
+/** Compute cross-power spectrum of a half-complex (packed) vectors and add to acc */
+#ifdef FIXED_POINT
+static inline void spectral_mul_accum(const spx_word16_t *X, const spx_word32_t *Y, spx_word16_t *acc, int N, int M)
+{
+   int i,j;
+   spx_word32_t tmp1=0,tmp2=0;
+   for (j=0;j<M;j++)
+   {
+      tmp1 = MAC16_16(tmp1, X[j*N],TOP16(Y[j*N]));
+   }
+   acc[0] = PSHR32(tmp1,WEIGHT_SHIFT);
+   for (i=1;i<N-1;i+=2)
+   {
+      tmp1 = tmp2 = 0;
+      for (j=0;j<M;j++)
+      {
+         tmp1 = SUB32(MAC16_16(tmp1, X[j*N+i],TOP16(Y[j*N+i])), MULT16_16(X[j*N+i+1],TOP16(Y[j*N+i+1])));
+         tmp2 = MAC16_16(MAC16_16(tmp2, X[j*N+i+1],TOP16(Y[j*N+i])), X[j*N+i], TOP16(Y[j*N+i+1]));
+      }
+      acc[i] = PSHR32(tmp1,WEIGHT_SHIFT);
+      acc[i+1] = PSHR32(tmp2,WEIGHT_SHIFT);
+   }
+   tmp1 = tmp2 = 0;
+   for (j=0;j<M;j++)
+   {
+      tmp1 = MAC16_16(tmp1, X[(j+1)*N-1],TOP16(Y[(j+1)*N-1]));
+   }
+   acc[N-1] = PSHR32(tmp1,WEIGHT_SHIFT);
+}
+#else
+static inline void spectral_mul_accum(const spx_word16_t *X, const spx_word32_t *Y, spx_word16_t *acc, int N, int M)
+{
+   int i,j;
+   for (i=0;i<N;i++)
+      acc[i] = 0;
+   for (j=0;j<M;j++)
+   {
+      acc[0] += X[0]*Y[0];
+      for (i=1;i<N-1;i+=2)
+      {
+         acc[i] += (X[i]*Y[i] - X[i+1]*Y[i+1]);
+         acc[i+1] += (X[i+1]*Y[i] + X[i]*Y[i+1]);
+      }
+      acc[i] += X[i]*Y[i];
+      X += N;
+      Y += N;
+   }
+}
+#endif
+
+/** Compute weighted cross-power spectrum of a half-complex (packed) vector with conjugate */
+static inline void weighted_spectral_mul_conj(const spx_float_t *w, const spx_float_t p, const spx_word16_t *X, const spx_word16_t *Y, spx_word32_t *prod, int N)
+{
+   int i, j;
+   spx_float_t W;
+   W = FLOAT_AMULT(p, w[0]);
+   prod[0] = FLOAT_MUL32(W,MULT16_16(X[0],Y[0]));
+   for (i=1,j=1;i<N-1;i+=2,j++)
+   {
+      W = FLOAT_AMULT(p, w[j]);
+      prod[i] = FLOAT_MUL32(W,MAC16_16(MULT16_16(X[i],Y[i]), X[i+1],Y[i+1]));
+      prod[i+1] = FLOAT_MUL32(W,MAC16_16(MULT16_16(-X[i+1],Y[i]), X[i],Y[i+1]));
+   }
+   W = FLOAT_AMULT(p, w[j]);
+   prod[i] = FLOAT_MUL32(W,MULT16_16(X[i],Y[i]));
+}
+
+
+/** Creates a new echo canceller state */
+SpeexEchoState *speex_echo_state_init(int frame_size, int filter_length)
+{
+   int i,N,M;
+   SpeexEchoState *st = (SpeexEchoState *)speex_alloc(sizeof(SpeexEchoState));
+
+   st->frame_size = frame_size;
+   st->window_size = 2*frame_size;
+   N = st->window_size;
+   M = st->M = (filter_length+st->frame_size-1)/frame_size;
+   st->cancel_count=0;
+   st->sum_adapt = 0;
+   st->saturated = 0;
+   st->screwed_up = 0;
+   /* This is the default sampling rate */
+   st->sampling_rate = 8000;
+   st->spec_average = DIV32_16(SHL32(EXTEND32(st->frame_size), 15), st->sampling_rate);
+#ifdef FIXED_POINT
+   st->beta0 = DIV32_16(SHL32(EXTEND32(st->frame_size), 16), st->sampling_rate);
+   st->beta_max = DIV32_16(SHL32(EXTEND32(st->frame_size), 14), st->sampling_rate);
+#else
+   st->beta0 = (2.0f*st->frame_size)/st->sampling_rate;
+   st->beta_max = (.5f*st->frame_size)/st->sampling_rate;
+#endif
+   st->leak_estimate = 0;
+
+   st->fft_table = spx_fft_init(N);
+   
+   st->e = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->x = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->input = (spx_word16_t*)speex_alloc(st->frame_size*sizeof(spx_word16_t));
+   st->y = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->last_y = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->Yf = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
+   st->Rf = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
+   st->Xf = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
+   st->Yh = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
+   st->Eh = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
+
+   st->X = (spx_word16_t*)speex_alloc((M+1)*N*sizeof(spx_word16_t));
+   st->Y = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->E = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->W = (spx_word32_t*)speex_alloc(M*N*sizeof(spx_word32_t));
+   st->PHI = (spx_word32_t*)speex_alloc(N*sizeof(spx_word32_t));
+   st->power = (spx_word32_t*)speex_alloc((frame_size+1)*sizeof(spx_word32_t));
+   st->power_1 = (spx_float_t*)speex_alloc((frame_size+1)*sizeof(spx_float_t));
+   st->window = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->prop = (spx_word16_t*)speex_alloc(M*sizeof(spx_word16_t));
+   st->wtmp = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+#ifdef FIXED_POINT
+   st->wtmp2 = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   for (i=0;i<N>>1;i++)
+   {
+      st->window[i] = (16383-SHL16(spx_cos(DIV32_16(MULT16_16(25736,i<<1),N)),1));
+      st->window[N-i-1] = st->window[i];
+   }
+#else
+   for (i=0;i<N;i++)
+      st->window[i] = .5-.5*cos(2*M_PI*i/N);
+#endif
+   for (i=0;i<=st->frame_size;i++)
+      st->power_1[i] = FLOAT_ONE;
+   for (i=0;i<N*M;i++)
+      st->W[i] = 0;
+   {
+      spx_word32_t sum = 0;
+      /* Ratio of ~10 between adaptation rate of first and last block */
+      spx_word16_t decay = SHR32(spx_exp(NEG16(DIV32_16(QCONST16(2.4,11),M))),1);
+      st->prop[0] = QCONST16(.7, 15);
+      sum = EXTEND32(st->prop[0]);
+      for (i=1;i<M;i++)
+      {
+         st->prop[i] = MULT16_16_Q15(st->prop[i-1], decay);
+         sum = ADD32(sum, EXTEND32(st->prop[i]));
+      }
+      for (i=M-1;i>=0;i--)
+      {
+         st->prop[i] = DIV32(MULT16_16(QCONST16(.8,15), st->prop[i]),sum);
+      }
+   }
+   
+   st->memX=st->memD=st->memE=0;
+   st->preemph = QCONST16(.9,15);
+   if (st->sampling_rate<12000)
+      st->notch_radius = QCONST16(.9, 15);
+   else if (st->sampling_rate<24000)
+      st->notch_radius = QCONST16(.982, 15);
+   else
+      st->notch_radius = QCONST16(.992, 15);
+
+   st->notch_mem[0] = st->notch_mem[1] = 0;
+   st->adapted = 0;
+   st->Pey = st->Pyy = FLOAT_ONE;
+   
+   st->play_buf = (spx_int16_t*)speex_alloc((PLAYBACK_DELAY+1)*st->frame_size*sizeof(spx_int16_t));
+   st->play_buf_pos = PLAYBACK_DELAY*st->frame_size;
+   st->play_buf_started = 0;
+   
+   return st;
+}
+
+/** Resets echo canceller state */
+void speex_echo_state_reset(SpeexEchoState *st)
+{
+   int i, M, N;
+   st->cancel_count=0;
+   st->screwed_up = 0;
+   N = st->window_size;
+   M = st->M;
+   for (i=0;i<N*M;i++)
+      st->W[i] = 0;
+   for (i=0;i<N*(M+1);i++)
+      st->X[i] = 0;
+   for (i=0;i<=st->frame_size;i++)
+   {
+      st->power[i] = 0;
+      st->power_1[i] = FLOAT_ONE;
+      st->Eh[i] = 0;
+      st->Yh[i] = 0;
+   }
+   for (i=0;i<st->frame_size;i++)
+   {
+      st->last_y[i] = 0;
+   }
+   for (i=0;i<N;i++)
+   {
+      st->E[i] = 0;
+      st->x[i] = 0;
+   }
+   st->notch_mem[0] = st->notch_mem[1] = 0;
+   st->memX=st->memD=st->memE=0;
+
+   st->saturated = 0;
+   st->adapted = 0;
+   st->sum_adapt = 0;
+   st->Pey = st->Pyy = FLOAT_ONE;
+   for (i=0;i<3*st->frame_size;i++)
+      st->play_buf[i] = 0;
+   st->play_buf_pos = PLAYBACK_DELAY*st->frame_size;
+   st->play_buf_started = 0;
+
+}
+
+/** Destroys an echo canceller state */
+void speex_echo_state_destroy(SpeexEchoState *st)
+{
+   spx_fft_destroy(st->fft_table);
+
+   speex_free(st->e);
+   speex_free(st->x);
+   speex_free(st->input);
+   speex_free(st->y);
+   speex_free(st->last_y);
+   speex_free(st->Yf);
+   speex_free(st->Rf);
+   speex_free(st->Xf);
+   speex_free(st->Yh);
+   speex_free(st->Eh);
+
+   speex_free(st->X);
+   speex_free(st->Y);
+   speex_free(st->E);
+   speex_free(st->W);
+   speex_free(st->PHI);
+   speex_free(st->power);
+   speex_free(st->power_1);
+   speex_free(st->window);
+   speex_free(st->prop);
+   speex_free(st->wtmp);
+#ifdef FIXED_POINT
+   speex_free(st->wtmp2);
+#endif
+   speex_free(st->play_buf);
+   speex_free(st);
+}
+
+void speex_echo_capture(SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out)
+{
+   int i;
+   /*speex_warning_int("capture with fill level ", st->play_buf_pos/st->frame_size);*/
+   st->play_buf_started = 1;
+   if (st->play_buf_pos>=st->frame_size)
+   {
+      speex_echo_cancellation(st, rec, st->play_buf, out);
+      st->play_buf_pos -= st->frame_size;
+      for (i=0;i<st->play_buf_pos;i++)
+         st->play_buf[i] = st->play_buf[i+st->frame_size];
+   } else {
+      speex_warning("No playback frame available (your application is buggy and/or got xruns)");
+      if (st->play_buf_pos!=0)
+      {
+         speex_warning("internal playback buffer corruption?");
+         st->play_buf_pos = 0;
+      }
+      for (i=0;i<st->frame_size;i++)
+         out[i] = rec[i];
+   }
+}
+
+void speex_echo_playback(SpeexEchoState *st, const spx_int16_t *play)
+{
+   /*speex_warning_int("playback with fill level ", st->play_buf_pos/st->frame_size);*/
+   if (!st->play_buf_started)
+   {
+      speex_warning("discarded first playback frame");
+      return;
+   }
+   if (st->play_buf_pos<=PLAYBACK_DELAY*st->frame_size)
+   {
+      int i;
+      for (i=0;i<st->frame_size;i++)
+         st->play_buf[st->play_buf_pos+i] = play[i];
+      st->play_buf_pos += st->frame_size;
+      if (st->play_buf_pos <= (PLAYBACK_DELAY-1)*st->frame_size)
+      {
+         speex_warning("Auto-filling the buffer (your application is buggy and/or got xruns)");
+         for (i=0;i<st->frame_size;i++)
+            st->play_buf[st->play_buf_pos+i] = play[i];
+         st->play_buf_pos += st->frame_size;
+      }
+   } else {
+      speex_warning("Had to discard a playback frame (your application is buggy and/or got xruns)");
+   }
+}
+
+/** Performs echo cancellation on a frame */
+void speex_echo_cancel(SpeexEchoState *st, const spx_int16_t *in, const spx_int16_t *far_end, spx_int16_t *out, spx_int32_t *Yout)
+{
+   speex_echo_cancellation(st, in, far_end, out);
+}
+
+/** Performs echo cancellation on a frame (deprecated, last arg now ignored) */
+void speex_echo_cancellation(SpeexEchoState *st, const spx_int16_t *in, const spx_int16_t *far_end, spx_int16_t *out)
+{
+   int i,j;
+   int N,M;
+   spx_word32_t Syy,See,Sxx,Sdd;
+   spx_word32_t Sey;
+   spx_word16_t ss, ss_1;
+   spx_float_t Pey = FLOAT_ONE, Pyy=FLOAT_ONE;
+   spx_float_t alpha, alpha_1;
+   spx_word16_t RER;
+   spx_word32_t tmp32;
+   
+   N = st->window_size;
+   M = st->M;
+   st->cancel_count++;
+#ifdef FIXED_POINT
+   ss=DIV32_16(11469,M);
+   ss_1 = SUB16(32767,ss);
+#else
+   ss=.35/M;
+   ss_1 = 1-ss;
+#endif
+
+   filter_dc_notch16(in, st->notch_radius, st->input, st->frame_size, st->notch_mem);
+   /* Copy input data to buffer and apply pre-emphasis */
+   for (i=0;i<st->frame_size;i++)
+   {
+      spx_word32_t tmp32;
+      st->x[i] = st->x[i+st->frame_size];
+      tmp32 = SUB32(EXTEND32(far_end[i]), EXTEND32(MULT16_16_P15(st->preemph, st->memX)));
+#ifdef FIXED_POINT
+      /* If saturation occurs here, we need to freeze adaptation for M+1 frames (not just one) */
+      if (tmp32 > 32767)
+      {
+         tmp32 = 32767;
+         st->saturated = M+1;
+      }
+      if (tmp32 < -32767)
+      {
+         tmp32 = -32767;
+         st->saturated = M+1;
+      }      
+#endif
+      st->x[i+st->frame_size] = EXTRACT16(tmp32);
+      st->memX = far_end[i];
+      
+      tmp32 = SUB32(EXTEND32(st->input[i]), EXTEND32(MULT16_16_P15(st->preemph, st->memD)));
+#ifdef FIXED_POINT
+      if (tmp32 > 32767)
+      {
+         tmp32 = 32767;
+         if (st->saturated == 0)
+            st->saturated = 1;
+      }      
+      if (tmp32 < -32767)
+      {
+         tmp32 = -32767;
+         if (st->saturated == 0)
+            st->saturated = 1;
+      }
+#endif
+      st->memD = st->input[i];
+      st->input[i] = tmp32;
+   }
+
+   /* Shift memory: this could be optimized eventually*/
+   for (j=M-1;j>=0;j--)
+   {
+      for (i=0;i<N;i++)
+         st->X[(j+1)*N+i] = st->X[j*N+i];
+   }
+
+   /* Convert x (far end) to frequency domain */
+   spx_fft(st->fft_table, st->x, &st->X[0]);
+   
+#ifdef SMOOTH_BLOCKS
+   spectral_mul_accum(st->X, st->W, st->Y, N, M);   
+   spx_ifft(st->fft_table, st->Y, st->e);
+#endif
+
+   /* Compute weight gradient */
+   if (st->saturated == 0)
+   {
+      for (j=M-1;j>=0;j--)
+      {
+         weighted_spectral_mul_conj(st->power_1, FLOAT_SHL(PSEUDOFLOAT(st->prop[j]),-15), &st->X[(j+1)*N], st->E, st->PHI, N);
+         for (i=0;i<N;i++)
+            st->W[j*N+i] = ADD32(st->W[j*N+i], st->PHI[i]);
+         
+      }
+   } else {
+      st->saturated--;
+   }
+   
+   /* Update weight to prevent circular convolution (MDF / AUMDF) */
+   for (j=0;j<M;j++)
+   {
+      /* This is a variant of the Alternatively Updated MDF (AUMDF) */
+      /* Remove the "if" to make this an MDF filter */
+      if (j==0 || st->cancel_count%(M-1) == j-1)
+      {
+#ifdef FIXED_POINT
+         for (i=0;i<N;i++)
+            st->wtmp2[i] = EXTRACT16(PSHR32(st->W[j*N+i],NORMALIZE_SCALEDOWN+16));
+         spx_ifft(st->fft_table, st->wtmp2, st->wtmp);
+         for (i=0;i<st->frame_size;i++)
+         {
+            st->wtmp[i]=0;
+         }
+         for (i=st->frame_size;i<N;i++)
+         {
+            st->wtmp[i]=SHL16(st->wtmp[i],NORMALIZE_SCALEUP);
+         }
+         spx_fft(st->fft_table, st->wtmp, st->wtmp2);
+         /* The "-1" in the shift is a sort of kludge that trades less efficient update speed for decrease noise */
+         for (i=0;i<N;i++)
+            st->W[j*N+i] -= SHL32(EXTEND32(st->wtmp2[i]),16+NORMALIZE_SCALEDOWN-NORMALIZE_SCALEUP-1);
+#else
+         spx_ifft(st->fft_table, &st->W[j*N], st->wtmp);
+         for (i=st->frame_size;i<N;i++)
+         {
+            st->wtmp[i]=0;
+         }
+         spx_fft(st->fft_table, st->wtmp, &st->W[j*N]);
+#endif
+      }
+   }
+
+   /* Compute filter response Y */
+   spectral_mul_accum(st->X, st->W, st->Y, N, M);
+   spx_ifft(st->fft_table, st->Y, st->y);
+
+   
+   /* Compute error signal (for the output with de-emphasis) */ 
+   for (i=0;i<st->frame_size;i++)
+   {
+      spx_word32_t tmp_out;
+#ifdef SMOOTH_BLOCKS
+      spx_word16_t y = MULT16_16_Q15(st->window[i+st->frame_size],st->e[i+st->frame_size]) + MULT16_16_Q15(st->window[i],st->y[i+st->frame_size]);
+      tmp_out = SUB32(EXTEND32(st->input[i]), EXTEND32(y));
+#else
+      tmp_out = SUB32(EXTEND32(st->input[i]), EXTEND32(st->y[i+st->frame_size]));
+#endif
+
+      /* Saturation */
+      if (tmp_out>32767)
+         tmp_out = 32767;
+      else if (tmp_out<-32768)
+         tmp_out = -32768;
+      tmp_out = ADD32(tmp_out, EXTEND32(MULT16_16_P15(st->preemph, st->memE)));
+      /* This is an arbitrary test for saturation in the microphone signal */
+      if (in[i] <= -32000 || in[i] >= 32000)
+      {
+         tmp_out = 0;
+         if (st->saturated == 0)
+            st->saturated = 1;
+      }
+      out[i] = (spx_int16_t)tmp_out;
+      st->memE = tmp_out;
+   }
+
+   /* Compute error signal (filter update version) */ 
+   for (i=0;i<st->frame_size;i++)
+   {
+      st->e[i] = 0;
+      st->e[i+st->frame_size] = st->input[i] - st->y[i+st->frame_size];
+   }
+
+   /* Compute a bunch of correlations */
+   Sey = mdf_inner_prod(st->e+st->frame_size, st->y+st->frame_size, st->frame_size);
+   See = mdf_inner_prod(st->e+st->frame_size, st->e+st->frame_size, st->frame_size);
+   Syy = mdf_inner_prod(st->y+st->frame_size, st->y+st->frame_size, st->frame_size);
+   Sxx = mdf_inner_prod(st->x+st->frame_size, st->x+st->frame_size, st->frame_size);
+   Sdd = mdf_inner_prod(st->input, st->input, st->frame_size);
+   
+   /* Do some sanity check */
+   if (!(Syy>=0 && Sxx>=0 && See >= 0)
+#ifndef FIXED_POINT
+       || !(See < N*1e9 && Syy < N*1e9 && Sxx < N*1e9)
+#endif
+      )
+   {
+      /* Things have gone really bad */
+      st->screwed_up += 50;
+      for (i=0;i<st->frame_size;i++)
+         out[i] = 0;
+   } else if (SHR32(See, 2) > ADD32(Sdd, SHR32(MULT16_16(N, 100),6)))
+   {
+      /* AEC seems to add lots of echo instead of removing it, let's see if it will improve */
+      st->screwed_up++;
+   } else {
+      /* Everything's fine */
+      st->screwed_up=0;
+   }
+   if (st->screwed_up>=50)
+   {
+      speex_warning("The echo canceller started acting funny and got slapped (reset). It swears it will behave now.");
+      speex_echo_state_reset(st);
+      return;
+   }
+
+   /* Add a small noise floor to make sure not to have problems when dividing */
+   See = MAX32(See, SHR32(MULT16_16(N, 100),6));
+
+   /* Convert error to frequency domain */
+   spx_fft(st->fft_table, st->e, st->E);
+   for (i=0;i<st->frame_size;i++)
+      st->y[i] = 0;
+   spx_fft(st->fft_table, st->y, st->Y);
+
+   /* Compute power spectrum of far end (X), error (E) and filter response (Y) */
+   power_spectrum(st->E, st->Rf, N);
+   power_spectrum(st->Y, st->Yf, N);
+   power_spectrum(st->X, st->Xf, N);
+   
+   /* Smooth far end energy estimate over time */
+   for (j=0;j<=st->frame_size;j++)
+      st->power[j] = MULT16_32_Q15(ss_1,st->power[j]) + 1 + MULT16_32_Q15(ss,st->Xf[j]);
+   
+   /* Enable this to compute the power based only on the tail (would need to compute more 
+      efficiently to make this really useful */
+   if (0)
+   {
+      float scale2 = .5f/M;
+      for (j=0;j<=st->frame_size;j++)
+         st->power[j] = 100;
+      for (i=0;i<M;i++)
+      {
+         power_spectrum(&st->X[i*N], st->Xf, N);
+         for (j=0;j<=st->frame_size;j++)
+            st->power[j] += scale2*st->Xf[j];
+      }
+   }
+
+   /* Compute filtered spectra and (cross-)correlations */
+   for (j=st->frame_size;j>=0;j--)
+   {
+      spx_float_t Eh, Yh;
+      Eh = PSEUDOFLOAT(st->Rf[j] - st->Eh[j]);
+      Yh = PSEUDOFLOAT(st->Yf[j] - st->Yh[j]);
+      Pey = FLOAT_ADD(Pey,FLOAT_MULT(Eh,Yh));
+      Pyy = FLOAT_ADD(Pyy,FLOAT_MULT(Yh,Yh));
+#ifdef FIXED_POINT
+      st->Eh[j] = MAC16_32_Q15(MULT16_32_Q15(SUB16(32767,st->spec_average),st->Eh[j]), st->spec_average, st->Rf[j]);
+      st->Yh[j] = MAC16_32_Q15(MULT16_32_Q15(SUB16(32767,st->spec_average),st->Yh[j]), st->spec_average, st->Yf[j]);
+#else
+      st->Eh[j] = (1-st->spec_average)*st->Eh[j] + st->spec_average*st->Rf[j];
+      st->Yh[j] = (1-st->spec_average)*st->Yh[j] + st->spec_average*st->Yf[j];
+#endif
+   }
+   
+   Pyy = FLOAT_SQRT(Pyy);
+   Pey = FLOAT_DIVU(Pey,Pyy);
+
+   /* Compute correlation updatete rate */
+   tmp32 = MULT16_32_Q15(st->beta0,Syy);
+   if (tmp32 > MULT16_32_Q15(st->beta_max,See))
+      tmp32 = MULT16_32_Q15(st->beta_max,See);
+   alpha = FLOAT_DIV32(tmp32, See);
+   alpha_1 = FLOAT_SUB(FLOAT_ONE, alpha);
+   /* Update correlations (recursive average) */
+   st->Pey = FLOAT_ADD(FLOAT_MULT(alpha_1,st->Pey) , FLOAT_MULT(alpha,Pey));
+   st->Pyy = FLOAT_ADD(FLOAT_MULT(alpha_1,st->Pyy) , FLOAT_MULT(alpha,Pyy));
+   if (FLOAT_LT(st->Pyy, FLOAT_ONE))
+      st->Pyy = FLOAT_ONE;
+   /* We don't really hope to get better than 33 dB (MIN_LEAK-3dB) attenuation anyway */
+   if (FLOAT_LT(st->Pey, FLOAT_MULT(MIN_LEAK,st->Pyy)))
+      st->Pey = FLOAT_MULT(MIN_LEAK,st->Pyy);
+   if (FLOAT_GT(st->Pey, st->Pyy))
+      st->Pey = st->Pyy;
+   /* leak_estimate is the linear regression result */
+   st->leak_estimate = FLOAT_EXTRACT16(FLOAT_SHL(FLOAT_DIVU(st->Pey, st->Pyy),14));
+   /* This looks like a stupid bug, but it's right (because we convert from Q14 to Q15) */
+   if (st->leak_estimate > 16383)
+      st->leak_estimate = 32767;
+   else
+      st->leak_estimate = SHL16(st->leak_estimate,1);
+   /*printf ("%f\n", st->leak_estimate);*/
+   
+   /* Compute Residual to Error Ratio */
+#ifdef FIXED_POINT
+   tmp32 = MULT16_32_Q15(st->leak_estimate,Syy);
+   tmp32 = ADD32(SHR32(Sxx,13), ADD32(tmp32, SHL32(tmp32,1)));
+   /* Check for y in e (lower bound on RER) */
+   {
+      spx_float_t bound = PSEUDOFLOAT(Sey);
+      bound = FLOAT_DIVU(FLOAT_MULT(bound, bound), PSEUDOFLOAT(ADD32(1,Syy)));
+      if (FLOAT_GT(bound, PSEUDOFLOAT(See)))
+         tmp32 = See;
+      else if (tmp32 < FLOAT_EXTRACT32(bound))
+         tmp32 = FLOAT_EXTRACT32(bound);
+   }
+   if (tmp32 > SHR32(See,1))
+      tmp32 = SHR32(See,1);
+   RER = FLOAT_EXTRACT16(FLOAT_SHL(FLOAT_DIV32(tmp32,See),15));
+#else
+   RER = (.0001*Sxx + 3.*MULT16_32_Q15(st->leak_estimate,Syy)) / See;
+   /* Check for y in e (lower bound on RER) */
+   if (RER < Sey*Sey/(1+See*Syy))
+      RER = Sey*Sey/(1+See*Syy);
+   if (RER > .5)
+      RER = .5;
+#endif
+
+   /* We consider that the filter has had minimal adaptation if the following is true*/
+   if (!st->adapted && st->sum_adapt > QCONST32(M,15))
+   {
+      st->adapted = 1;
+   }
+
+   if (st->adapted)
+   {
+      for (i=0;i<=st->frame_size;i++)
+      {
+         spx_word32_t r, e;
+         /* Compute frequency-domain adaptation mask */
+         r = MULT16_32_Q15(st->leak_estimate,SHL32(st->Yf[i],3));
+         e = SHL32(st->Rf[i],3)+1;
+#ifdef FIXED_POINT
+         if (r>SHR32(e,1))
+            r = SHR32(e,1);
+#else
+         if (r>.5*e)
+            r = .5*e;
+#endif
+         r = MULT16_32_Q15(QCONST16(.7,15),r) + MULT16_32_Q15(QCONST16(.3,15),(spx_word32_t)(MULT16_32_Q15(RER,e)));
+         /*st->power_1[i] = adapt_rate*r/(e*(1+st->power[i]));*/
+         st->power_1[i] = FLOAT_SHL(FLOAT_DIV32_FLOAT(r,FLOAT_MUL32U(e,st->power[i]+10)),WEIGHT_SHIFT+16);
+      }
+   } else {
+      /* Temporary adaption rate if filter is not yet adapted enough */
+      spx_word16_t adapt_rate=0;
+
+      if (Sxx > SHR32(MULT16_16(N, 1000),6)) 
+      {
+         tmp32 = MULT16_32_Q15(QCONST16(.25f, 15), Sxx);
+#ifdef FIXED_POINT
+         if (tmp32 > SHR32(See,2))
+            tmp32 = SHR32(See,2);
+#else
+         if (tmp32 > .25*See)
+            tmp32 = .25*See;
+#endif
+         adapt_rate = FLOAT_EXTRACT16(FLOAT_SHL(FLOAT_DIV32(tmp32, See),15));
+      }
+      for (i=0;i<=st->frame_size;i++)
+         st->power_1[i] = FLOAT_SHL(FLOAT_DIV32(EXTEND32(adapt_rate),ADD32(st->power[i],10)),WEIGHT_SHIFT+1);
+
+
+      /* How much have we adapted so far? */
+      st->sum_adapt = ADD32(st->sum_adapt,adapt_rate);
+   }
+
+   /* Save residual echo so it can be used by the nonlinear processor */
+   if (st->adapted)
+   {
+      /* If the filter is adapted, take the filtered echo */
+      for (i=0;i<st->frame_size;i++)
+         st->last_y[i] = st->last_y[st->frame_size+i];
+      for (i=0;i<st->frame_size;i++)
+         st->last_y[st->frame_size+i] = in[i]-out[i];
+   } else {
+      /* If filter isn't adapted yet, all we can do is take the far end signal directly */
+      for (i=0;i<N;i++)
+         st->last_y[i] = st->x[i];
+   }
+
+}
+
+/* Compute spectrum of estimated echo for use in an echo post-filter */
+void speex_echo_get_residual(SpeexEchoState *st, spx_word32_t *residual_echo, int len)
+{
+   int i;
+   spx_word16_t leak2;
+   int N;
+   
+   N = st->window_size;
+
+   /* Apply hanning window (should pre-compute it)*/
+   for (i=0;i<N;i++)
+      st->y[i] = MULT16_16_Q15(st->window[i],st->last_y[i]);
+      
+   /* Compute power spectrum of the echo */
+   spx_fft(st->fft_table, st->y, st->Y);
+   power_spectrum(st->Y, residual_echo, N);
+      
+#ifdef FIXED_POINT
+   if (st->leak_estimate > 16383)
+      leak2 = 32767;
+   else
+      leak2 = SHL16(st->leak_estimate, 1);
+#else
+   if (st->leak_estimate>.5)
+      leak2 = 1;
+   else
+      leak2 = 2*st->leak_estimate;
+#endif
+   /* Estimate residual echo */
+   for (i=0;i<=st->frame_size;i++)
+      residual_echo[i] = (spx_int32_t)MULT16_32_Q15(leak2,residual_echo[i]);
+   
+}
+
+int speex_echo_ctl(SpeexEchoState *st, int request, void *ptr)
+{
+   switch(request)
+   {
+      
+      case SPEEX_ECHO_GET_FRAME_SIZE:
+         (*(int*)ptr) = st->frame_size;
+         break;
+      case SPEEX_ECHO_SET_SAMPLING_RATE:
+         st->sampling_rate = (*(int*)ptr);
+         st->spec_average = DIV32_16(SHL32(EXTEND32(st->frame_size), 15), st->sampling_rate);
+#ifdef FIXED_POINT
+         st->beta0 = DIV32_16(SHL32(EXTEND32(st->frame_size), 16), st->sampling_rate);
+         st->beta_max = DIV32_16(SHL32(EXTEND32(st->frame_size), 14), st->sampling_rate);
+#else
+         st->beta0 = (2.0f*st->frame_size)/st->sampling_rate;
+         st->beta_max = (.5f*st->frame_size)/st->sampling_rate;
+#endif
+         if (st->sampling_rate<12000)
+            st->notch_radius = QCONST16(.9, 15);
+         else if (st->sampling_rate<24000)
+            st->notch_radius = QCONST16(.982, 15);
+         else
+            st->notch_radius = QCONST16(.992, 15);
+         break;
+      case SPEEX_ECHO_GET_SAMPLING_RATE:
+         (*(int*)ptr) = st->sampling_rate;
+         break;
+      default:
+         speex_warning_int("Unknown speex_echo_ctl request: ", request);
+         return -1;
+   }
+   return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/medfilter.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/medfilter.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/medfilter.c	(revision 1163)
@@ -0,0 +1,97 @@
+/* Copyright (C) 2004 Jean-Marc Valin
+   File medfilter.c
+   Median filter
+
+
+   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 Xiph.org Foundation 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 FOUNDATION 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 "medfilter.h"
+#include "misc.h"
+
+MedianFilter *median_filter_new(int N)
+{
+   MedianFilter *f = (MedianFilter*)speex_alloc(sizeof(MedianFilter));
+   f->N = N;
+   f->ids = (int*)speex_alloc(sizeof(int)*N);
+   f->val = (float*)speex_alloc(sizeof(float)*N);
+   f->filled = 0;
+   return f;
+}
+
+void median_filter_update(MedianFilter *f, float val)
+{
+   int i=0;
+   int insert = 0;
+   while (insert<f->filled && f->val[insert] < val)
+   {
+      insert++;
+   }
+   if (f->filled == f->N)
+   {
+      int remove;
+      for (remove=0;remove<f->N;remove++)
+         if (f->ids[remove] == 0)
+            break;
+      if (insert>remove)
+         insert--;
+      if (insert > remove)
+      {
+         for (i=remove;i<insert;i++)
+         {
+            f->val[i] = f->val[i+1];
+            f->ids[i] = f->ids[i+1];
+         }
+      } else if (insert < remove)
+      {
+         for (i=remove;i>insert;i--)
+         {
+            f->val[i] = f->val[i-1];
+            f->ids[i] = f->ids[i-1];
+         }
+      }
+      for (i=0;i<f->filled;i++)
+         f->ids[i]--;
+   } else {
+      for (i=f->filled;i>insert;i--)
+      {
+         f->val[i] = f->val[i-1];
+         f->ids[i] = f->ids[i-1];
+      }
+      f->filled++;
+   }
+   f->val[insert]=val;
+   f->ids[insert]=f->filled-1;
+}
+
+float median_filter_get(MedianFilter *f)
+{
+   return f->val[f->filled>>1];
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/medfilter.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/medfilter.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/medfilter.h	(revision 1163)
@@ -0,0 +1,51 @@
+/* Copyright (C) 2004 Jean-Marc Valin */
+/**
+   @file medfilter.h
+   @brief Median filter
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifndef MEDFILTER_H
+#define MEDFILTER_H
+
+/** Median filter. */
+typedef struct {
+   int N;
+   int filled;
+   int *ids;
+   float *val;
+} MedianFilter;
+
+MedianFilter *median_filter_new(int N);
+void median_filter_update(MedianFilter *f, float val);
+float median_filter_get(MedianFilter *f);
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/misc.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/misc.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/misc.c	(revision 1163)
@@ -0,0 +1,225 @@
+/* Copyright (C) 2002-2005 Jean-Marc Valin 
+   File: misc.c
+   Various utility routines for Speex
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include "misc.h"
+
+#ifdef USER_MISC
+#include "user_misc.h"
+#endif
+
+#ifdef BFIN_ASM
+#include "misc_bfin.h"
+#endif
+
+#ifndef RELEASE
+void print_vec(float *vec, int len, char *name)
+{
+   int i;
+   printf ("%s ", name);
+   for (i=0;i<len;i++)
+      printf (" %f", vec[i]);
+   printf ("\n");
+}
+#endif
+
+#ifdef FIXED_DEBUG
+long long spx_mips=0;
+#endif
+
+
+spx_uint32_t be_int(spx_uint32_t i)
+{
+   spx_uint32_t ret=i;
+#ifndef WORDS_BIGENDIAN
+   ret =  i>>24;
+   ret += (i>>8)&0x0000ff00;
+   ret += (i<<8)&0x00ff0000;
+   ret += (i<<24);
+#endif
+   return ret;
+}
+
+spx_uint32_t le_int(spx_uint32_t i)
+{
+   spx_uint32_t ret=i;
+#ifdef WORDS_BIGENDIAN
+   ret =  i>>24;
+   ret += (i>>8)&0x0000ff00;
+   ret += (i<<8)&0x00ff0000;
+   ret += (i<<24);
+#endif
+   return ret;
+}
+
+#if BYTES_PER_CHAR == 2
+void speex_memcpy_bytes(char *dst, char *src, int nbytes)
+{
+  int i;
+  int nchars = nbytes/BYTES_PER_CHAR;
+  for (i=0;i<nchars;i++)
+    dst[i]=src[i];
+  if (nbytes & 1) {
+    /* copy in the last byte */
+    int last_i = nchars;
+    char last_dst_char = dst[last_i];
+    char last_src_char = src[last_i];
+    last_dst_char &= 0xff00;
+    last_dst_char |= (last_src_char & 0x00ff);
+    dst[last_i] = last_dst_char;
+  }
+}
+void speex_memset_bytes(char *dst, char c, int nbytes)
+{
+  int i;
+  spx_int16_t cc = ((c << 8) | c);
+  int nchars = nbytes/BYTES_PER_CHAR;
+  for (i=0;i<nchars;i++)
+    dst[i]=cc;
+  if (nbytes & 1) {
+    /* copy in the last byte */
+    int last_i = nchars;
+    char last_dst_char = dst[last_i];
+    last_dst_char &= 0xff00;
+    last_dst_char |= (c & 0x00ff);
+    dst[last_i] = last_dst_char;
+  }
+}
+#else
+void speex_memcpy_bytes(char *dst, char *src, int nbytes)
+{
+  memcpy(dst, src, nbytes);
+}
+void speex_memset_bytes(char *dst, char src, int nbytes)
+{
+  memset(dst, src, nbytes);
+}
+#endif
+
+#ifndef OVERRIDE_SPEEX_ALLOC
+void *speex_alloc (int size)
+{
+   return calloc(size,1);
+}
+#endif
+
+#ifndef OVERRIDE_SPEEX_ALLOC_SCRATCH
+void *speex_alloc_scratch (int size)
+{
+   return calloc(size,1);
+}
+#endif
+
+#ifndef OVERRIDE_SPEEX_REALLOC
+void *speex_realloc (void *ptr, int size)
+{
+   return realloc(ptr, size);
+}
+#endif
+
+#ifndef OVERRIDE_SPEEX_FREE
+void speex_free (void *ptr)
+{
+   free(ptr);
+}
+#endif
+
+#ifndef OVERRIDE_SPEEX_FREE_SCRATCH
+void speex_free_scratch (void *ptr)
+{
+   free(ptr);
+}
+#endif
+
+#ifndef OVERRIDE_SPEEX_MOVE
+void *speex_move (void *dest, void *src, int n)
+{
+   return memmove(dest,src,n);
+}
+#endif
+
+#ifndef OVERRIDE_SPEEX_ERROR
+void speex_error(const char *str)
+{
+   fprintf (stderr, "Fatal error: %s\n", str);
+   exit(1);
+}
+#endif
+
+#ifndef OVERRIDE_SPEEX_WARNING
+void speex_warning(const char *str)
+{
+   fprintf (stderr, "warning: %s\n", str);
+}
+#endif
+
+#ifndef OVERRIDE_SPEEX_WARNING_INT
+void speex_warning_int(const char *str, int val)
+{
+   fprintf (stderr, "warning: %s %d\n", str, val);
+}
+#endif
+
+#ifdef FIXED_POINT
+spx_word16_t speex_rand(spx_word16_t std, spx_int32_t *seed)
+{
+   spx_word32_t res;
+   *seed = 1664525 * *seed + 1013904223;
+   res = MULT16_16(EXTRACT16(SHR32(*seed,16)),std);
+   return PSHR32(SUB32(res, SHR(res, 3)),14);
+}
+#else
+spx_word16_t speex_rand(spx_word16_t std, spx_int32_t *seed)
+{
+   const unsigned int jflone = 0x3f800000;
+   const unsigned int jflmsk = 0x007fffff;
+   union {int i; float f;} ran;
+   *seed = 1664525 * *seed + 1013904223;
+   ran.i = jflone | (jflmsk & *seed);
+   ran.f -= 1.5;
+   return 3.4642*std*ran.f;
+}
+#endif
+
+#ifndef OVERRIDE_SPEEX_PUTC
+void _speex_putc(int ch, void *file)
+{
+   FILE *f = (FILE *)file;
+   fprintf(f, "%c", ch);
+}
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/misc.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/misc.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/misc.h	(revision 1163)
@@ -0,0 +1,122 @@
+/* Copyright (C) 2002 Jean-Marc Valin */
+/**
+   @file misc.h
+   @brief Various compatibility routines for Speex
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef MISC_H
+#define MISC_H
+
+#ifndef SPEEX_VERSION
+#define SPEEX_MAJOR_VERSION 1         /**< Major Speex version. */
+#define SPEEX_MINOR_VERSION 1         /**< Minor Speex version. */
+#define SPEEX_MICRO_VERSION 13        /**< Micro Speex version. */
+#define SPEEX_EXTRA_VERSION ""        /**< Extra Speex version. */
+#define SPEEX_VERSION "speex-1.2beta1"  /**< Speex version string. */
+#endif
+
+/* A couple test to catch stupid option combinations */
+#ifdef FIXED_POINT
+
+#ifdef _USE_SSE
+#error SSE is only for floating-point
+#endif
+#if ((defined (ARM4_ASM)||defined (ARM4_ASM)) && defined(BFIN_ASM)) || (defined (ARM4_ASM)&&defined(ARM5E_ASM))
+#error Make up your mind. What CPU do you have?
+#endif
+#ifdef VORBIS_PSYCHO
+#error Vorbis-psy model currently not implemented in fixed-point
+#endif
+
+#else
+
+#if defined (ARM4_ASM) || defined(ARM5E_ASM) || defined(BFIN_ASM)
+#error I suppose you can have a [ARM4/ARM5E/Blackfin] that has float instructions?
+#endif
+#ifdef FIXED_POINT_DEBUG
+#error "Don't you think enabling fixed-point is a good thing to do if you want to debug that?"
+#endif
+
+
+#endif
+
+#include "arch.h"
+
+#ifndef RELEASE
+/** Print a named vector to stdout */
+void print_vec(float *vec, int len, char *name);
+#endif
+
+/** Convert big endian */
+spx_uint32_t be_int(spx_uint32_t i);
+/** Convert little endian */
+spx_uint32_t le_int(spx_uint32_t i);
+
+/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free */
+void *speex_alloc (int size);
+
+/** Same as speex_alloc, except that the area is only needed inside a Speex call (might cause problem with wideband though) */
+void *speex_alloc_scratch (int size);
+
+/** Speex wrapper for realloc. To do your own dynamic allocation, all you need to do is replace this function, speex_alloc and speex_free */
+void *speex_realloc (void *ptr, int size);
+
+/** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_alloc */
+void speex_free (void *ptr);
+
+/** Same as speex_alloc, except that the area is only needed inside a Speex call (might cause problem with wideband though) */
+void speex_free_scratch (void *ptr);
+
+/** Speex wrapper for mem_move */
+void *speex_move (void *dest, void *src, int n);
+
+/** Speex wrapper for memcpy */
+void speex_memcpy_bytes(char *dst, char *src, int nbytes);
+
+/** Speex wrapper for memset */
+void speex_memset_bytes(char *dst, char src, int nbytes);
+
+/** Print error message to stderr */
+void speex_error(const char *str);
+
+/** Print warning message to stderr */
+void speex_warning(const char *str);
+
+/** Print warning message with integer argument to stderr */
+void speex_warning_int(const char *str, int val);
+
+/** Generate a random number */
+spx_word16_t speex_rand(spx_word16_t std, spx_int32_t *seed);
+
+/** Speex wrapper for putc */
+void _speex_putc(int ch, void *file);
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/misc_bfin.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/misc_bfin.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/misc_bfin.h	(revision 1163)
@@ -0,0 +1,54 @@
+/* Copyright (C) 2005 Analog Devices */
+/**
+   @file misc_bfin.h
+   @author Jean-Marc Valin 
+   @brief Various compatibility routines for Speex (Blackfin version)
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#define OVERRIDE_SPEEX_MOVE
+void *speex_move (void *dest, void *src, int n)
+{
+   __asm__ __volatile__
+         (
+         "L0 = 0;\n\t"
+         "I0 = %0;\n\t"
+         "R0 = [I0++];\n\t"
+         "LOOP move%= LC0 = %2;\n\t"
+         "LOOP_BEGIN move%=;\n\t"
+            "[%1++] = R0 || R0 = [I0++];\n\t"
+         "LOOP_END move%=;\n\t"
+         "[%1++] = R0;\n\t"
+   : "=a" (src), "=a" (dest)
+   : "a" ((n>>2)-1), "0" (src), "1" (dest)
+   : "R0", "I0", "L0", "memory"
+         );
+   return dest;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/modes.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/modes.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/modes.c	(revision 1163)
@@ -0,0 +1,673 @@
+/* Copyright (C) 2002-2006 Jean-Marc Valin 
+   File: modes.c
+
+   Describes the different modes of the codec
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "modes.h"
+#include "ltp.h"
+#include "quant_lsp.h"
+#include "cb_search.h"
+#include "sb_celp.h"
+#include "nb_celp.h"
+#include "vbr.h"
+#include "misc.h"
+#include <math.h>
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#define MAX_IN_SAMPLES 640
+
+const SpeexMode * const speex_mode_list[SPEEX_NB_MODES] = {&speex_nb_mode, &speex_wb_mode, &speex_uwb_mode};
+
+/* Extern declarations for all codebooks we use here */
+extern const signed char gain_cdbk_nb[];
+extern const signed char gain_cdbk_lbr[];
+extern const signed char hexc_table[];
+extern const signed char exc_5_256_table[];
+extern const signed char exc_5_64_table[];
+extern const signed char exc_8_128_table[];
+extern const signed char exc_10_32_table[];
+extern const signed char exc_10_16_table[];
+extern const signed char exc_20_32_table[];
+extern const signed char hexc_10_32_table[];
+
+
+/* Parameters for Long-Term Prediction (LTP)*/
+static const ltp_params ltp_params_nb = {
+   gain_cdbk_nb,
+   7,
+   7
+};
+
+/* Parameters for Long-Term Prediction (LTP)*/
+static const ltp_params ltp_params_vlbr = {
+   gain_cdbk_lbr,
+   5,
+   0
+};
+
+/* Parameters for Long-Term Prediction (LTP)*/
+static const ltp_params ltp_params_lbr = {
+   gain_cdbk_lbr,
+   5,
+   7
+};
+
+/* Parameters for Long-Term Prediction (LTP)*/
+static const ltp_params ltp_params_med = {
+   gain_cdbk_lbr,
+   5,
+   7
+};
+
+/* Split-VQ innovation parameters for very low bit-rate narrowband */
+static const split_cb_params split_cb_nb_vlbr = {
+   10,               /*subvect_size*/
+   4,               /*nb_subvect*/
+   exc_10_16_table, /*shape_cb*/
+   4,               /*shape_bits*/
+   0,
+};
+
+/* Split-VQ innovation parameters for very low bit-rate narrowband */
+static const split_cb_params split_cb_nb_ulbr = {
+   20,               /*subvect_size*/
+   2,               /*nb_subvect*/
+   exc_20_32_table, /*shape_cb*/
+   5,               /*shape_bits*/
+   0,
+};
+
+/* Split-VQ innovation parameters for low bit-rate narrowband */
+static const split_cb_params split_cb_nb_lbr = {
+   10,              /*subvect_size*/
+   4,               /*nb_subvect*/
+   exc_10_32_table, /*shape_cb*/
+   5,               /*shape_bits*/
+   0,
+};
+
+
+/* Split-VQ innovation parameters narrowband */
+static const split_cb_params split_cb_nb = {
+   5,               /*subvect_size*/
+   8,               /*nb_subvect*/
+   exc_5_64_table, /*shape_cb*/
+   6,               /*shape_bits*/
+   0,
+};
+
+/* Split-VQ innovation parameters narrowband */
+static const split_cb_params split_cb_nb_med = {
+   8,               /*subvect_size*/
+   5,               /*nb_subvect*/
+   exc_8_128_table, /*shape_cb*/
+   7,               /*shape_bits*/
+   0,
+};
+
+/* Split-VQ innovation for low-band wideband */
+static const split_cb_params split_cb_sb = {
+   5,               /*subvect_size*/
+   8,              /*nb_subvect*/
+   exc_5_256_table,    /*shape_cb*/
+   8,               /*shape_bits*/
+   0,
+};
+
+#ifndef DISABLE_WIDEBAND
+
+/* Split-VQ innovation for high-band wideband */
+static const split_cb_params split_cb_high = {
+   8,               /*subvect_size*/
+   5,               /*nb_subvect*/
+   hexc_table,       /*shape_cb*/
+   7,               /*shape_bits*/
+   1,
+};
+
+
+/* Split-VQ innovation for high-band wideband */
+static const split_cb_params split_cb_high_lbr = {
+   10,               /*subvect_size*/
+   4,               /*nb_subvect*/
+   hexc_10_32_table,       /*shape_cb*/
+   5,               /*shape_bits*/
+   0,
+};
+
+#endif
+
+/* 2150 bps "vocoder-like" mode for comfort noise */
+static const SpeexSubmode nb_submode1 = {
+   0,
+   1,
+   0,
+   0,
+   /* LSP quantization */
+   lsp_quant_lbr,
+   lsp_unquant_lbr,
+   /* No pitch quantization */
+   forced_pitch_quant,
+   forced_pitch_unquant,
+   NULL,
+   /* No innovation quantization (noise only) */
+   noise_codebook_quant,
+   noise_codebook_unquant,
+   NULL,
+   -1,
+   43
+};
+
+/* 3.95 kbps very low bit-rate mode */
+static const SpeexSubmode nb_submode8 = {
+   0,
+   1,
+   0,
+   0,
+   /*LSP quantization*/
+   lsp_quant_lbr,
+   lsp_unquant_lbr,
+   /*No pitch quantization*/
+   forced_pitch_quant,
+   forced_pitch_unquant,
+   NULL,
+   /*Innovation quantization*/
+   split_cb_search_shape_sign,
+   split_cb_shape_sign_unquant,
+   &split_cb_nb_ulbr,
+   QCONST16(.5,15),
+   79
+};
+
+/* 5.95 kbps very low bit-rate mode */
+static const SpeexSubmode nb_submode2 = {
+   0,
+   0,
+   0,
+   0,
+   /*LSP quantization*/
+   lsp_quant_lbr,
+   lsp_unquant_lbr,
+   /*No pitch quantization*/
+   pitch_search_3tap,
+   pitch_unquant_3tap,
+   &ltp_params_vlbr,
+   /*Innovation quantization*/
+   split_cb_search_shape_sign,
+   split_cb_shape_sign_unquant,
+   &split_cb_nb_vlbr,
+   QCONST16(.6,15),
+   119
+};
+
+/* 8 kbps low bit-rate mode */
+static const SpeexSubmode nb_submode3 = {
+   -1,
+   0,
+   1,
+   0,
+   /*LSP quantization*/
+   lsp_quant_lbr,
+   lsp_unquant_lbr,
+   /*Pitch quantization*/
+   pitch_search_3tap,
+   pitch_unquant_3tap,
+   &ltp_params_lbr,
+   /*Innovation quantization*/
+   split_cb_search_shape_sign,
+   split_cb_shape_sign_unquant,
+   &split_cb_nb_lbr,
+   QCONST16(.55,15),
+   160
+};
+
+/* 11 kbps medium bit-rate mode */
+static const SpeexSubmode nb_submode4 = {
+   -1,
+   0,
+   1,
+   0,
+   /*LSP quantization*/
+   lsp_quant_lbr,
+   lsp_unquant_lbr,
+   /*Pitch quantization*/
+   pitch_search_3tap,
+   pitch_unquant_3tap,
+   &ltp_params_med,
+   /*Innovation quantization*/
+   split_cb_search_shape_sign,
+   split_cb_shape_sign_unquant,
+   &split_cb_nb_med,
+   QCONST16(.45,15),
+   220
+};
+
+/* 15 kbps high bit-rate mode */
+static const SpeexSubmode nb_submode5 = {
+   -1,
+   0,
+   3,
+   0,
+   /*LSP quantization*/
+   lsp_quant_nb,
+   lsp_unquant_nb,
+   /*Pitch quantization*/
+   pitch_search_3tap,
+   pitch_unquant_3tap,
+   &ltp_params_nb,
+   /*Innovation quantization*/
+   split_cb_search_shape_sign,
+   split_cb_shape_sign_unquant,
+   &split_cb_nb,
+   QCONST16(.3,15),
+   300
+};
+
+/* 18.2 high bit-rate mode */
+static const SpeexSubmode nb_submode6 = {
+   -1,
+   0,
+   3,
+   0,
+   /*LSP quantization*/
+   lsp_quant_nb,
+   lsp_unquant_nb,
+   /*Pitch quantization*/
+   pitch_search_3tap,
+   pitch_unquant_3tap,
+   &ltp_params_nb,
+   /*Innovation quantization*/
+   split_cb_search_shape_sign,
+   split_cb_shape_sign_unquant,
+   &split_cb_sb,
+   QCONST16(.2,15),
+   364
+};
+
+/* 24.6 kbps high bit-rate mode */
+static const SpeexSubmode nb_submode7 = {
+   -1,
+   0,
+   3,
+   1,
+   /*LSP quantization*/
+   lsp_quant_nb,
+   lsp_unquant_nb,
+   /*Pitch quantization*/
+   pitch_search_3tap,
+   pitch_unquant_3tap,
+   &ltp_params_nb,
+   /*Innovation quantization*/
+   split_cb_search_shape_sign,
+   split_cb_shape_sign_unquant,
+   &split_cb_nb,
+   QCONST16(.1,15),
+   492
+};
+
+
+/* Default mode for narrowband */
+static const SpeexNBMode nb_mode = {
+   160,    /*frameSize*/
+   40,     /*subframeSize*/
+   10,     /*lpcSize*/
+   17,     /*pitchStart*/
+   144,    /*pitchEnd*/
+#ifdef FIXED_POINT
+   29491, 19661, /* gamma1, gamma2 */
+#else
+   0.9, 0.6, /* gamma1, gamma2 */
+#endif
+   .012,   /*lag_factor*/
+   QCONST16(.0002,15), /*lpc_floor*/
+#ifdef EPIC_48K
+   0,
+#endif
+   {NULL, &nb_submode1, &nb_submode2, &nb_submode3, &nb_submode4, &nb_submode5, &nb_submode6, &nb_submode7,
+   &nb_submode8, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
+   5,
+   {1, 8, 2, 3, 3, 4, 4, 5, 5, 6, 7}
+};
+
+
+/* Default mode for narrowband */
+const SpeexMode speex_nb_mode = {
+   &nb_mode,
+   nb_mode_query,
+   "narrowband",
+   0,
+   4,
+   &nb_encoder_init,
+   &nb_encoder_destroy,
+   &nb_encode,
+   &nb_decoder_init,
+   &nb_decoder_destroy,
+   &nb_decode,
+   &nb_encoder_ctl,
+   &nb_decoder_ctl,
+};
+
+
+/* Wideband part */
+
+static const SpeexSubmode wb_submode1 = {
+   0,
+   0,
+   1,
+   0,
+   /*LSP quantization*/
+   lsp_quant_high,
+   lsp_unquant_high,
+   /*Pitch quantization*/
+   NULL,
+   NULL,
+   NULL,
+   /*No innovation quantization*/
+   NULL,
+   NULL,
+   NULL,
+   -1,
+   36
+};
+
+
+static const SpeexSubmode wb_submode2 = {
+   0,
+   0,
+   1,
+   0,
+   /*LSP quantization*/
+   lsp_quant_high,
+   lsp_unquant_high,
+   /*Pitch quantization*/
+   NULL,
+   NULL,
+   NULL,
+   /*Innovation quantization*/
+   split_cb_search_shape_sign,
+   split_cb_shape_sign_unquant,
+#ifdef DISABLE_WIDEBAND
+   NULL,
+#else
+   &split_cb_high_lbr,
+#endif
+   -1,
+   112
+};
+
+
+static const SpeexSubmode wb_submode3 = {
+   0,
+   0,
+   1,
+   0,
+   /*LSP quantization*/
+   lsp_quant_high,
+   lsp_unquant_high,
+   /*Pitch quantization*/
+   NULL,
+   NULL,
+   NULL,
+   /*Innovation quantization*/
+   split_cb_search_shape_sign,
+   split_cb_shape_sign_unquant,
+#ifdef DISABLE_WIDEBAND
+   NULL,
+#else
+   &split_cb_high,
+#endif
+   -1,
+   192
+};
+
+static const SpeexSubmode wb_submode4 = {
+   0,
+   0,
+   1,
+   1,
+   /*LSP quantization*/
+   lsp_quant_high,
+   lsp_unquant_high,
+   /*Pitch quantization*/
+   NULL,
+   NULL,
+   NULL,
+   /*Innovation quantization*/
+   split_cb_search_shape_sign,
+   split_cb_shape_sign_unquant,
+#ifdef DISABLE_WIDEBAND
+   NULL,
+#else
+   &split_cb_high,
+#endif
+   -1,
+   352
+};
+
+
+/* Split-band wideband CELP mode*/
+static const SpeexSBMode sb_wb_mode = {
+   &speex_nb_mode,
+   160,    /*frameSize*/
+   40,     /*subframeSize*/
+   8,     /*lpcSize*/
+   640,    /*bufSize*/
+#ifdef FIXED_POINT
+   29491, 19661, /* gamma1, gamma2 */
+#else
+   0.9, 0.6, /* gamma1, gamma2 */
+#endif
+   .012,   /*lag_factor*/
+   QCONST16(.0002,15), /*lpc_floor*/
+   0.9,
+   {NULL, &wb_submode1, &wb_submode2, &wb_submode3, &wb_submode4, NULL, NULL, NULL},
+   3,
+   {1, 8, 2, 3, 4, 5, 5, 6, 6, 7, 7},
+   {1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4},
+   vbr_hb_thresh,
+   5
+};
+
+
+const SpeexMode speex_wb_mode = {
+   &sb_wb_mode,
+   wb_mode_query,
+   "wideband (sub-band CELP)",
+   1,
+   4,
+   &sb_encoder_init,
+   &sb_encoder_destroy,
+   &sb_encode,
+   &sb_decoder_init,
+   &sb_decoder_destroy,
+   &sb_decode,
+   &sb_encoder_ctl,
+   &sb_decoder_ctl,
+};
+
+
+
+/* "Ultra-wideband" mode stuff */
+
+
+
+/* Split-band "ultra-wideband" (32 kbps) CELP mode*/
+static const SpeexSBMode sb_uwb_mode = {
+   &speex_wb_mode,
+   320,    /*frameSize*/
+   80,     /*subframeSize*/
+   8,     /*lpcSize*/
+   1280,    /*bufSize*/
+#ifdef FIXED_POINT
+   29491, 19661, /* gamma1, gamma2 */
+#else
+   0.9, 0.6, /* gamma1, gamma2 */
+#endif
+   .012,   /*lag_factor*/
+   QCONST16(.0002,15), /*lpc_floor*/
+   0.7,
+   {NULL, &wb_submode1, NULL, NULL, NULL, NULL, NULL, NULL},
+   1,
+   {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
+   {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
+   vbr_uhb_thresh,
+   2
+};
+
+
+const SpeexMode speex_uwb_mode = {
+   &sb_uwb_mode,
+   wb_mode_query,
+   "ultra-wideband (sub-band CELP)",
+   2,
+   4,
+   &sb_encoder_init,
+   &sb_encoder_destroy,
+   &sb_encode,
+   &sb_decoder_init,
+   &sb_decoder_destroy,
+   &sb_decode,
+   &sb_encoder_ctl,
+   &sb_decoder_ctl,
+};
+
+
+
+
+#ifdef EPIC_48K
+
+extern const signed char gain_cdbk_ulbr[];
+extern const signed char exc_12_32_table[];
+
+/* Parameters for Long-Term Prediction (LTP)*/
+static const ltp_params ltp_params_48k = {
+   gain_cdbk_ulbr,
+   3,
+   0
+};
+
+static const split_cb_params split_cb_nb_48k = {
+   12,               /*subvect_size*/
+   4,               /*nb_subvect*/
+   exc_12_32_table, /*shape_cb*/
+   5,               /*shape_bits*/
+   0,
+};
+
+
+/* 4.8 kbps very low bit-rate mode */
+static const SpeexSubmode nb_48k_submode = {
+   0,
+   0,
+   0,
+   0,
+   /*LSP quantization*/
+   lsp_quant_48k,
+   lsp_unquant_48k,
+   /*No pitch quantization*/
+   pitch_search_3tap,
+   pitch_unquant_3tap,
+   &ltp_params_48k,
+   /*Innovation quantization*/
+   split_cb_search_shape_sign,
+   split_cb_shape_sign_unquant,
+   &split_cb_nb_48k,
+#ifdef FIXED_POINT
+   22938, 16384, 11796, 18022,
+#else
+   0.7, 0.5, .36, .55,
+#endif
+   144
+};
+
+
+/* Special, non-standard 4.8 kbps mode */
+static const SpeexNBMode nb_48k_mode = {
+   240,    /*frameSize*/
+   48,     /*subframeSize*/
+   10,     /*lpcSize*/
+   640,    /*bufSize*/
+   17,     /*pitchStart*/
+   144,    /*pitchEnd*/
+   0.9,    /*gamma1*/
+   0.6,    /*gamma2*/
+   .01,   /*lag_factor*/
+   QCONST16(.0003,15), /*lpc_floor*/
+   1,
+   {NULL, NULL, &nb_48k_submode, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
+   2,
+   {2,2,2,2,2,2,2,2,2,2,2}
+};
+
+
+/* Default mode for narrowband */
+const SpeexMode speex_nb_48k_mode = {
+   &nb_48k_mode,
+   nb_mode_query,
+   "narrowband 4.8 kbps",
+   1000,
+   4,
+   &nb_encoder_init,
+   &nb_encoder_destroy,
+   &nb_encode,
+   &nb_decoder_init,
+   &nb_decoder_destroy,
+   &nb_decode,
+   &nb_encoder_ctl,
+   &nb_decoder_ctl,
+};
+
+
+#endif
+
+int speex_mode_query(const SpeexMode *mode, int request, void *ptr)
+{
+   return mode->query(mode->mode, request, ptr);
+}
+
+const SpeexMode * speex_lib_get_mode (int mode)
+{
+#ifdef EPIC_48K
+  if (mode == SPEEX_MODEID_NB_48K) return &speex_nb_48k_mode;
+#endif
+
+  if (mode < 0 || mode > SPEEX_NB_MODES) return NULL;
+
+  return speex_mode_list[mode];
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/modes.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/modes.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/modes.h	(revision 1163)
@@ -0,0 +1,149 @@
+/* Copyright (C) 2002-2006 Jean-Marc Valin */
+/**
+   @file modes.h
+   @brief Describes the different modes of the codec
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifndef MODES_H
+#define MODES_H
+
+#include <speex/speex.h>
+#include <speex/speex_bits.h>
+#include "misc.h"
+
+#define NB_SUBMODES 16
+#define NB_SUBMODE_BITS 4
+
+#define SB_SUBMODES 8
+#define SB_SUBMODE_BITS 3
+
+
+/** Quantizes LSPs */
+typedef void (*lsp_quant_func)(spx_lsp_t *, spx_lsp_t *, int, SpeexBits *);
+
+/** Decodes quantized LSPs */
+typedef void (*lsp_unquant_func)(spx_lsp_t *, int, SpeexBits *);
+
+
+/** Long-term predictor quantization */
+typedef int (*ltp_quant_func)(spx_word16_t *, spx_word16_t *, spx_coef_t *, spx_coef_t *, 
+                              spx_coef_t *, spx_sig_t *, const void *, int, int, spx_word16_t, 
+                              int, int, SpeexBits*, char *, spx_word16_t *, spx_word16_t *, int, int, int, spx_word32_t *);
+
+/** Long-term un-quantize */
+typedef void (*ltp_unquant_func)(spx_word16_t *, spx_word32_t *, int, int, spx_word16_t, const void *, int, int *,
+                                 spx_word16_t *, SpeexBits*, char*, int, int, spx_word16_t, int);
+
+
+/** Innovation quantization function */
+typedef void (*innovation_quant_func)(spx_word16_t *, spx_coef_t *, spx_coef_t *, spx_coef_t *, const void *, int, int, 
+                                      spx_sig_t *, spx_word16_t *, SpeexBits *, char *, int, int);
+
+/** Innovation unquantization function */
+typedef void (*innovation_unquant_func)(spx_sig_t *, const void *, int, SpeexBits*, char *, spx_int32_t *);
+
+/** Description of a Speex sub-mode (wither narrowband or wideband */
+typedef struct SpeexSubmode {
+   int     lbr_pitch;          /**< Set to -1 for "normal" modes, otherwise encode pitch using a global pitch and allowing a +- lbr_pitch variation (for low not-rates)*/
+   int     forced_pitch_gain;  /**< Use the same (forced) pitch gain for all sub-frames */
+   int     have_subframe_gain; /**< Number of bits to use as sub-frame innovation gain */
+   int     double_codebook;    /**< Apply innovation quantization twice for higher quality (and higher bit-rate)*/
+   /*LSP functions*/
+   lsp_quant_func    lsp_quant; /**< LSP quantization function */
+   lsp_unquant_func  lsp_unquant; /**< LSP unquantization function */
+
+   /*Lont-term predictor functions*/
+   ltp_quant_func    ltp_quant; /**< Long-term predictor (pitch) quantizer */
+   ltp_unquant_func  ltp_unquant; /**< Long-term predictor (pitch) un-quantizer */
+   const void       *ltp_params; /**< Pitch parameters (options) */
+
+   /*Quantization of innovation*/
+   innovation_quant_func innovation_quant; /**< Innovation quantization */
+   innovation_unquant_func innovation_unquant; /**< Innovation un-quantization */
+   const void             *innovation_params; /**< Innovation quantization parameters*/
+
+   spx_word16_t      comb_gain;  /**< Gain of enhancer comb filter */
+
+   int               bits_per_frame; /**< Number of bits per frame after encoding*/
+} SpeexSubmode;
+
+/** Struct defining the encoding/decoding mode*/
+typedef struct SpeexNBMode {
+   int     frameSize;      /**< Size of frames used for encoding */
+   int     subframeSize;   /**< Size of sub-frames used for encoding */
+   int     lpcSize;        /**< Order of LPC filter */
+   int     pitchStart;     /**< Smallest pitch value allowed */
+   int     pitchEnd;       /**< Largest pitch value allowed */
+
+   spx_word16_t gamma1;    /**< Perceptual filter parameter #1 */
+   spx_word16_t gamma2;    /**< Perceptual filter parameter #2 */
+   float   lag_factor;     /**< Lag-windowing parameter */
+   spx_word16_t   lpc_floor;      /**< Noise floor for LPC analysis */
+
+#ifdef EPIC_48K
+   int     lbr48k;         /**< 1 for the special 4.8 kbps mode */
+#endif
+
+   const SpeexSubmode *submodes[NB_SUBMODES]; /**< Sub-mode data for the mode */
+   int     defaultSubmode; /**< Default sub-mode to use when encoding */
+   int     quality_map[11]; /**< Mode corresponding to each quality setting */
+} SpeexNBMode;
+
+
+/** Struct defining the encoding/decoding mode for SB-CELP (wideband) */
+typedef struct SpeexSBMode {
+   const SpeexMode *nb_mode;    /**< Embedded narrowband mode */
+   int     frameSize;     /**< Size of frames used for encoding */
+   int     subframeSize;  /**< Size of sub-frames used for encoding */
+   int     lpcSize;       /**< Order of LPC filter */
+   int     bufSize;       /**< Signal buffer size in encoder */
+   spx_word16_t gamma1;   /**< Perceptual filter parameter #1 */
+   spx_word16_t gamma2;   /**< Perceptual filter parameter #1 */
+   float   lag_factor;    /**< Lag-windowing parameter */
+   spx_word16_t   lpc_floor;     /**< Noise floor for LPC analysis */
+   float   folding_gain;
+
+   const SpeexSubmode *submodes[SB_SUBMODES]; /**< Sub-mode data for the mode */
+   int     defaultSubmode; /**< Default sub-mode to use when encoding */
+   int     low_quality_map[11]; /**< Mode corresponding to each quality setting */
+   int     quality_map[11]; /**< Mode corresponding to each quality setting */
+   const float (*vbr_thresh)[11];
+   int     nb_modes;
+} SpeexSBMode;
+
+int speex_encode_native(void *state, spx_word16_t *in, SpeexBits *bits);
+int speex_decode_native(void *state, SpeexBits *bits, spx_word16_t *out);
+
+int nb_mode_query(const void *mode, int request, void *ptr);
+int wb_mode_query(const void *mode, int request, void *ptr);
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/nb_celp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/nb_celp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/nb_celp.c	(revision 1163)
@@ -0,0 +1,2057 @@
+/* Copyright (C) 2002-2006 Jean-Marc Valin 
+   File: nb_celp.c
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include "nb_celp.h"
+#include "lpc.h"
+#include "lsp.h"
+#include "ltp.h"
+#include "quant_lsp.h"
+#include "cb_search.h"
+#include "filters.h"
+#include "stack_alloc.h"
+#include "vq.h"
+#include <speex/speex_bits.h>
+#include "vbr.h"
+#include "misc.h"
+#include "math_approx.h"
+#include <speex/speex_callbacks.h>
+
+#ifdef VORBIS_PSYCHO
+#include "vorbis_psy.h"
+#endif
+
+#ifndef M_PI
+#define M_PI           3.14159265358979323846  /* pi */
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#define SUBMODE(x) st->submodes[st->submodeID]->x
+
+/* Default size for the encoder and decoder stack (can be changed at compile time).
+   This does not apply when using variable-size arrays or alloca. */
+#ifndef NB_ENC_STACK
+#define NB_ENC_STACK (8000*sizeof(spx_sig_t))
+#endif
+
+#ifndef NB_DEC_STACK
+#define NB_DEC_STACK (4000*sizeof(spx_sig_t))
+#endif
+
+
+#ifdef FIXED_POINT
+const spx_word32_t ol_gain_table[32]={18900, 25150, 33468, 44536, 59265, 78865, 104946, 139653, 185838, 247297, 329081, 437913, 582736, 775454, 1031906, 1373169, 1827293, 2431601, 3235761, 4305867, 5729870, 7624808, 10146425, 13501971, 17967238, 23909222, 31816294, 42338330, 56340132, 74972501, 99766822, 132760927};
+const spx_word16_t exc_gain_quant_scal3_bound[7]={1841, 3883, 6051, 8062, 10444, 13580, 18560};
+const spx_word16_t exc_gain_quant_scal3[8]={1002, 2680, 5086, 7016, 9108, 11781, 15380, 21740};
+const spx_word16_t exc_gain_quant_scal1_bound[1]={14385};
+const spx_word16_t exc_gain_quant_scal1[2]={11546, 17224};
+
+#define LSP_MARGIN 16
+#define LSP_DELTA1 6553
+#define LSP_DELTA2 1638
+
+#else
+
+const float exc_gain_quant_scal3_bound[7]={0.112338f, 0.236980f, 0.369316f, 0.492054f, 0.637471f, 0.828874f, 1.132784f};
+const float exc_gain_quant_scal3[8]={0.061130f, 0.163546f, 0.310413f, 0.428220f, 0.555887f, 0.719055f, 0.938694f, 1.326874f};
+const float exc_gain_quant_scal1_bound[1]={0.87798f};
+const float exc_gain_quant_scal1[2]={0.70469f, 1.05127f};
+
+#define LSP_MARGIN .002f
+#define LSP_DELTA1 .2f
+#define LSP_DELTA2 .05f
+
+#endif
+
+#ifdef VORBIS_PSYCHO
+#define EXTRA_BUFFER 100
+#else
+#define EXTRA_BUFFER 0
+#endif
+
+
+#define sqr(x) ((x)*(x))
+
+extern const spx_word16_t lpc_window[];
+
+void *nb_encoder_init(const SpeexMode *m)
+{
+   EncState *st;
+   const SpeexNBMode *mode;
+   int i;
+
+   mode=(const SpeexNBMode *)m->mode;
+   st = (EncState*)speex_alloc(sizeof(EncState));
+   if (!st)
+      return NULL;
+#if defined(VAR_ARRAYS) || defined (USE_ALLOCA)
+   st->stack = NULL;
+#else
+   st->stack = (char*)speex_alloc_scratch(NB_ENC_STACK);
+#endif
+   
+   st->mode=m;
+
+   st->frameSize = mode->frameSize;
+   st->nbSubframes=mode->frameSize/mode->subframeSize;
+   st->subframeSize=mode->subframeSize;
+   st->windowSize = st->frameSize+st->subframeSize;
+   st->lpcSize = mode->lpcSize;
+   st->gamma1=mode->gamma1;
+   st->gamma2=mode->gamma2;
+   st->min_pitch=mode->pitchStart;
+   st->max_pitch=mode->pitchEnd;
+   st->lag_factor=mode->lag_factor;
+   st->lpc_floor = mode->lpc_floor;
+  
+   st->submodes=mode->submodes;
+   st->submodeID=st->submodeSelect=mode->defaultSubmode;
+   st->bounded_pitch = 1;
+
+   st->encode_submode = 1;
+#ifdef EPIC_48K
+   st->lbr_48k=mode->lbr48k;
+#endif
+
+#ifdef VORBIS_PSYCHO
+   st->psy = vorbis_psy_init(8000, 256);
+   st->curve = (float*)speex_alloc(128*sizeof(float));
+   st->old_curve = (float*)speex_alloc(128*sizeof(float));
+   st->psy_window = (float*)speex_alloc(256*sizeof(float));
+#endif
+
+   st->cumul_gain = 1024;
+
+   /* Allocating input buffer */
+   st->winBuf = (spx_word16_t*)speex_alloc((st->windowSize-st->frameSize)*sizeof(spx_word16_t));
+   /* Allocating excitation buffer */
+   st->excBuf = (spx_word16_t*)speex_alloc((mode->frameSize+mode->pitchEnd+2)*sizeof(spx_word16_t));
+   st->exc = st->excBuf + mode->pitchEnd + 2;
+   st->swBuf = (spx_word16_t*)speex_alloc((mode->frameSize+mode->pitchEnd+2)*sizeof(spx_word16_t));
+   st->sw = st->swBuf + mode->pitchEnd + 2;
+
+   st->window= lpc_window;
+   
+   /* Create the window for autocorrelation (lag-windowing) */
+   st->lagWindow = (spx_word16_t*)speex_alloc((st->lpcSize+1)*sizeof(spx_word16_t));
+   for (i=0;i<st->lpcSize+1;i++)
+      st->lagWindow[i]=16384*exp(-.5*sqr(2*M_PI*st->lag_factor*i));
+
+   st->old_lsp = (spx_lsp_t*)speex_alloc((st->lpcSize)*sizeof(spx_lsp_t));
+   st->old_qlsp = (spx_lsp_t*)speex_alloc((st->lpcSize)*sizeof(spx_lsp_t));
+   st->first = 1;
+   for (i=0;i<st->lpcSize;i++)
+   {
+      st->old_lsp[i]=LSP_SCALING*(M_PI*((float)(i+1)))/(st->lpcSize+1);
+   }
+
+   st->mem_sp = (spx_mem_t*)speex_alloc((st->lpcSize)*sizeof(spx_mem_t));
+   st->mem_sw = (spx_mem_t*)speex_alloc((st->lpcSize)*sizeof(spx_mem_t));
+   st->mem_sw_whole = (spx_mem_t*)speex_alloc((st->lpcSize)*sizeof(spx_mem_t));
+   st->mem_exc = (spx_mem_t*)speex_alloc((st->lpcSize)*sizeof(spx_mem_t));
+   st->mem_exc2 = (spx_mem_t*)speex_alloc((st->lpcSize)*sizeof(spx_mem_t));
+
+   st->pi_gain = (spx_word32_t*)speex_alloc((st->nbSubframes)*sizeof(spx_word32_t));
+   st->innov_save = NULL;
+   
+   st->pitch = (int*)speex_alloc((st->nbSubframes)*sizeof(int));
+
+   st->vbr = (VBRState*)speex_alloc(sizeof(VBRState));
+   vbr_init(st->vbr);
+   st->vbr_quality = 8;
+   st->vbr_enabled = 0;
+   st->vbr_max = 0;
+   st->vad_enabled = 0;
+   st->dtx_enabled = 0;
+   st->abr_enabled = 0;
+   st->abr_drift = 0;
+
+   st->plc_tuning = 2;
+   st->complexity=2;
+   st->sampling_rate=8000;
+   st->dtx_count=0;
+   st->isWideband = 0;
+   st->highpass_enabled = 1;
+   
+#ifdef ENABLE_VALGRIND
+   VALGRIND_MAKE_READABLE(st, (st->stack-(char*)st));
+#endif
+   return st;
+}
+
+void nb_encoder_destroy(void *state)
+{
+   EncState *st=(EncState *)state;
+   /* Free all allocated memory */
+#if !(defined(VAR_ARRAYS) || defined (USE_ALLOCA))
+   speex_free_scratch(st->stack);
+#endif
+
+   speex_free (st->winBuf);
+   speex_free (st->excBuf);
+   speex_free (st->old_qlsp);
+   speex_free (st->swBuf);
+
+   speex_free (st->lagWindow);
+
+   speex_free (st->old_lsp);
+   speex_free (st->mem_sp);
+   speex_free (st->mem_sw);
+   speex_free (st->mem_sw_whole);
+   speex_free (st->mem_exc);
+   speex_free (st->mem_exc2);
+   speex_free (st->pi_gain);
+   speex_free (st->pitch);
+
+   vbr_destroy(st->vbr);
+   speex_free (st->vbr);
+
+#ifdef VORBIS_PSYCHO
+   vorbis_psy_destroy(st->psy);
+   speex_free (st->curve);
+   speex_free (st->old_curve);
+   speex_free (st->psy_window);
+#endif
+
+   /*Free state memory... should be last*/
+   speex_free(st);
+}
+
+int nb_encode(void *state, void *vin, SpeexBits *bits)
+{
+   EncState *st;
+   int i, sub, roots;
+   int ol_pitch;
+   spx_word16_t ol_pitch_coef;
+   spx_word32_t ol_gain;
+   VARDECL(spx_word16_t *ringing);
+   VARDECL(spx_word16_t *target);
+   VARDECL(spx_sig_t *innov);
+   VARDECL(spx_word32_t *exc32);
+   VARDECL(spx_mem_t *mem);
+   VARDECL(spx_coef_t *bw_lpc1);
+   VARDECL(spx_coef_t *bw_lpc2);
+   VARDECL(spx_coef_t *lpc);
+   VARDECL(spx_lsp_t *lsp);
+   VARDECL(spx_lsp_t *qlsp);
+   VARDECL(spx_lsp_t *interp_lsp);
+   VARDECL(spx_lsp_t *interp_qlsp);
+   VARDECL(spx_coef_t *interp_lpc);
+   VARDECL(spx_coef_t *interp_qlpc);
+   char *stack;
+   VARDECL(spx_word16_t *syn_resp);
+   VARDECL(spx_word16_t *real_exc);
+#ifdef EPIC_48K
+   int pitch_half[2];
+   int ol_pitch_id=0;
+#endif
+   spx_word16_t *in = (spx_word16_t*)vin;
+
+   st=(EncState *)state;
+   stack=st->stack;
+
+   ALLOC(lpc, st->lpcSize, spx_coef_t);
+   ALLOC(bw_lpc1, st->lpcSize, spx_coef_t);
+   ALLOC(bw_lpc2, st->lpcSize, spx_coef_t);
+   ALLOC(lsp, st->lpcSize, spx_lsp_t);
+   ALLOC(qlsp, st->lpcSize, spx_lsp_t);
+   ALLOC(interp_lsp, st->lpcSize, spx_lsp_t);
+   ALLOC(interp_qlsp, st->lpcSize, spx_lsp_t);
+   ALLOC(interp_lpc, st->lpcSize, spx_coef_t);
+   ALLOC(interp_qlpc, st->lpcSize, spx_coef_t);
+
+   /* Move signals 1 frame towards the past */
+   speex_move(st->excBuf, st->excBuf+st->frameSize, (st->max_pitch+2)*sizeof(spx_word16_t));
+   speex_move(st->swBuf, st->swBuf+st->frameSize, (st->max_pitch+2)*sizeof(spx_word16_t));
+
+   if (st->highpass_enabled)
+      highpass(in, in, st->frameSize, (st->isWideband?HIGHPASS_WIDEBAND:HIGHPASS_NARROWBAND)|HIGHPASS_INPUT, st->mem_hp);
+   
+   {
+      VARDECL(spx_word16_t *w_sig);
+      VARDECL(spx_word16_t *autocorr);
+      ALLOC(w_sig, st->windowSize, spx_word16_t);
+      ALLOC(autocorr, st->lpcSize+1, spx_word16_t);
+      /* Window for analysis */
+      for (i=0;i<st->windowSize-st->frameSize;i++)
+         w_sig[i] = EXTRACT16(SHR32(MULT16_16(st->winBuf[i],st->window[i]),SIG_SHIFT));
+      for (;i<st->windowSize;i++)
+         w_sig[i] = EXTRACT16(SHR32(MULT16_16(in[i-st->windowSize+st->frameSize],st->window[i]),SIG_SHIFT));
+      /* Compute auto-correlation */
+      _spx_autocorr(w_sig, autocorr, st->lpcSize+1, st->windowSize);
+      autocorr[0] = ADD16(autocorr[0],MULT16_16_Q15(autocorr[0],st->lpc_floor)); /* Noise floor in auto-correlation domain */
+
+      /* Lag windowing: equivalent to filtering in the power-spectrum domain */
+      for (i=0;i<st->lpcSize+1;i++)
+         autocorr[i] = MULT16_16_Q14(autocorr[i],st->lagWindow[i]);
+
+      /* Levinson-Durbin */
+      _spx_lpc(lpc, autocorr, st->lpcSize);
+      /* LPC to LSPs (x-domain) transform */
+      roots=lpc_to_lsp (lpc, st->lpcSize, lsp, 10, LSP_DELTA1, stack);
+      /* Check if we found all the roots */
+      if (roots!=st->lpcSize)
+      {
+         /*If we can't find all LSP's, do some damage control and use previous filter*/
+         for (i=0;i<st->lpcSize;i++)
+         {
+            lsp[i]=st->old_lsp[i];
+         }
+      }
+   }
+
+
+
+
+   /* Whole frame analysis (open-loop estimation of pitch and excitation gain) */
+   {
+      if (st->first)
+         for (i=0;i<st->lpcSize;i++)
+            interp_lsp[i] = lsp[i];
+      else
+         lsp_interpolate(st->old_lsp, lsp, interp_lsp, st->lpcSize, st->nbSubframes, st->nbSubframes<<1);
+
+      lsp_enforce_margin(interp_lsp, st->lpcSize, LSP_MARGIN);
+
+      /* Compute interpolated LPCs (unquantized) for whole frame*/
+      lsp_to_lpc(interp_lsp, interp_lpc, st->lpcSize,stack);
+
+
+      /*Open-loop pitch*/
+      if (st->complexity>2 || !st->submodes[st->submodeID] || st->vbr_enabled || st->vad_enabled || SUBMODE(forced_pitch_gain) ||
+          SUBMODE(lbr_pitch) != -1)
+      {
+         int nol_pitch[6];
+         spx_word16_t nol_pitch_coef[6];
+         
+         bw_lpc(st->gamma1, interp_lpc, bw_lpc1, st->lpcSize);
+         bw_lpc(st->gamma2, interp_lpc, bw_lpc2, st->lpcSize);
+         
+         for (i=0;i<st->windowSize-st->frameSize;i++)
+            st->sw[i] = st->winBuf[i];
+         for (;i<st->frameSize;i++)
+            st->sw[i] = in[i-st->windowSize+st->frameSize];
+         filter_mem16(st->sw, bw_lpc1, bw_lpc2, st->sw, st->frameSize, st->lpcSize, st->mem_sw_whole, stack);
+
+         open_loop_nbest_pitch(st->sw, st->min_pitch, st->max_pitch, st->frameSize, 
+                               nol_pitch, nol_pitch_coef, 6, stack);
+         ol_pitch=nol_pitch[0];
+         ol_pitch_coef = nol_pitch_coef[0];
+         /*Try to remove pitch multiples*/
+         for (i=1;i<6;i++)
+         {
+#ifdef FIXED_POINT
+            if ((nol_pitch_coef[i]>MULT16_16_Q15(nol_pitch_coef[0],27853)) && 
+#else
+            if ((nol_pitch_coef[i]>.85*nol_pitch_coef[0]) && 
+#endif
+                (ABS(2*nol_pitch[i]-ol_pitch)<=2 || ABS(3*nol_pitch[i]-ol_pitch)<=3 || 
+                 ABS(4*nol_pitch[i]-ol_pitch)<=4 || ABS(5*nol_pitch[i]-ol_pitch)<=5))
+            {
+               /*ol_pitch_coef=nol_pitch_coef[i];*/
+               ol_pitch = nol_pitch[i];
+            }
+         }
+         /*if (ol_pitch>50)
+           ol_pitch/=2;*/
+         /*ol_pitch_coef = sqrt(ol_pitch_coef);*/
+
+#ifdef EPIC_48K
+         if (st->lbr_48k)
+         {
+            if (ol_pitch < st->min_pitch+2)
+               ol_pitch = st->min_pitch+2;
+            if (ol_pitch > st->max_pitch-2)
+               ol_pitch = st->max_pitch-2;
+            open_loop_nbest_pitch(st->sw, ol_pitch-2, ol_pitch+2, st->frameSize>>1, 
+                                  &pitch_half[0], nol_pitch_coef, 1, stack);
+            open_loop_nbest_pitch(st->sw+(st->frameSize>>1), pitch_half[0]-1, pitch_half[0]+2, st->frameSize>>1, 
+                                  &pitch_half[1], nol_pitch_coef, 1, stack);
+         }
+#endif
+      } else {
+         ol_pitch=0;
+         ol_pitch_coef=0;
+      }
+      
+      /*Compute "real" excitation*/
+      for (i=0;i<st->windowSize-st->frameSize;i++)
+         st->exc[i] = st->winBuf[i];
+      for (;i<st->frameSize;i++)
+         st->exc[i] = in[i-st->windowSize+st->frameSize];
+      fir_mem16(st->exc, interp_lpc, st->exc, st->frameSize, st->lpcSize, st->mem_exc, stack);
+
+      /* Compute open-loop excitation gain */
+#ifdef EPIC_48K
+      if (st->lbr_48k)
+      {
+         float ol1=0,ol2=0;
+         float ol_gain2;
+         ol1 = compute_rms16(st->exc, st->frameSize>>1);
+         ol2 = compute_rms16(st->exc+(st->frameSize>>1), st->frameSize>>1);
+         ol1 *= ol1*(st->frameSize>>1);
+         ol2 *= ol2*(st->frameSize>>1);
+
+         ol_gain2=ol1;
+         if (ol2>ol1)
+            ol_gain2=ol2;
+         ol_gain2 = sqrt(2*ol_gain2*(ol1+ol2))*1.3*(1-.5*GAIN_SCALING_1*GAIN_SCALING_1*ol_pitch_coef*ol_pitch_coef);
+      
+         ol_gain=SHR(sqrt(1+ol_gain2/st->frameSize),SIG_SHIFT);
+
+      } else
+#endif
+      {
+         spx_word16_t g = compute_rms16(st->exc, st->frameSize);
+         if (ol_pitch>0)
+            ol_gain = MULT16_16(g, MULT16_16_Q14(QCONST16(1.1,14),
+                                spx_sqrt(QCONST32(1.,28)-MULT16_32_Q15(QCONST16(.8,15),SHL32(MULT16_16(ol_pitch_coef,ol_pitch_coef),16)))));
+         else
+            ol_gain = SHL32(EXTEND32(g),SIG_SHIFT);
+      }
+   }
+
+#ifdef VORBIS_PSYCHO
+   for(i=0;i<256-st->frameSize;i++)
+      st->psy_window[i] = st->psy_window[i+st->frameSize];
+   for(i=0;i<st->frameSize;i++)
+      st->psy_window[256-st->frameSize+i] = in[i];
+   compute_curve(st->psy, st->psy_window, st->curve);
+   /*print_vec(st->curve, 128, "curve");*/
+   if (st->first)
+      for (i=0;i<128;i++)
+         st->old_curve[i] = st->curve[i];
+#endif
+
+   /*VBR stuff*/
+   if (st->vbr && (st->vbr_enabled||st->vad_enabled))
+   {
+      float lsp_dist=0;
+      for (i=0;i<st->lpcSize;i++)
+         lsp_dist += (st->old_lsp[i] - lsp[i])*(st->old_lsp[i] - lsp[i]);
+      lsp_dist /= LSP_SCALING*LSP_SCALING;
+      
+      if (st->abr_enabled)
+      {
+         float qual_change=0;
+         if (st->abr_drift2 * st->abr_drift > 0)
+         {
+            /* Only adapt if long-term and short-term drift are the same sign */
+            qual_change = -.00001*st->abr_drift/(1+st->abr_count);
+            if (qual_change>.05)
+               qual_change=.05;
+            if (qual_change<-.05)
+               qual_change=-.05;
+         }
+         st->vbr_quality += qual_change;
+         if (st->vbr_quality>10)
+            st->vbr_quality=10;
+         if (st->vbr_quality<0)
+            st->vbr_quality=0;
+      }
+
+      st->relative_quality = vbr_analysis(st->vbr, in, st->frameSize, ol_pitch, GAIN_SCALING_1*ol_pitch_coef);
+      /*if (delta_qual<0)*/
+      /*  delta_qual*=.1*(3+st->vbr_quality);*/
+      if (st->vbr_enabled) 
+      {
+         spx_int32_t mode;
+         int choice=0;
+         float min_diff=100;
+         mode = 8;
+         while (mode)
+         {
+            int v1;
+            float thresh;
+            v1=(int)floor(st->vbr_quality);
+            if (v1==10)
+               thresh = vbr_nb_thresh[mode][v1];
+            else
+               thresh = (st->vbr_quality-v1)*vbr_nb_thresh[mode][v1+1] + (1+v1-st->vbr_quality)*vbr_nb_thresh[mode][v1];
+            if (st->relative_quality > thresh && 
+                st->relative_quality-thresh<min_diff)
+            {
+               choice = mode;
+               min_diff = st->relative_quality-thresh;
+            }
+            mode--;
+         }
+         mode=choice;
+         if (mode==0)
+         {
+            if (st->dtx_count==0 || lsp_dist>.05 || !st->dtx_enabled || st->dtx_count>20)
+            {
+               mode=1;
+               st->dtx_count=1;
+            } else {
+               mode=0;
+               st->dtx_count++;
+            }
+         } else {
+            st->dtx_count=0;
+         }
+
+         speex_encoder_ctl(state, SPEEX_SET_MODE, &mode);
+         if (st->vbr_max>0)
+         {
+            spx_int32_t rate;
+            speex_encoder_ctl(state, SPEEX_GET_BITRATE, &rate);
+            if (rate > st->vbr_max)
+            {
+               rate = st->vbr_max;
+               speex_encoder_ctl(state, SPEEX_SET_BITRATE, &rate);
+            }
+         }
+         
+         if (st->abr_enabled)
+         {
+            spx_int32_t bitrate;
+            speex_encoder_ctl(state, SPEEX_GET_BITRATE, &bitrate);
+            st->abr_drift+=(bitrate-st->abr_enabled);
+            st->abr_drift2 = .95*st->abr_drift2 + .05*(bitrate-st->abr_enabled);
+            st->abr_count += 1.0;
+         }
+
+      } else {
+         /*VAD only case*/
+         int mode;
+         if (st->relative_quality<2)
+         {
+            if (st->dtx_count==0 || lsp_dist>.05 || !st->dtx_enabled || st->dtx_count>20)
+            {
+               st->dtx_count=1;
+               mode=1;
+            } else {
+               mode=0;
+               st->dtx_count++;
+            }
+         } else {
+            st->dtx_count = 0;
+            mode=st->submodeSelect;
+         }
+         /*speex_encoder_ctl(state, SPEEX_SET_MODE, &mode);*/
+         st->submodeID=mode;
+      } 
+   } else {
+      st->relative_quality = -1;
+   }
+
+   if (st->encode_submode)
+   {
+#ifdef EPIC_48K
+   if (!st->lbr_48k) {
+#endif
+
+   /* First, transmit a zero for narrowband */
+   speex_bits_pack(bits, 0, 1);
+
+   /* Transmit the sub-mode we use for this frame */
+   speex_bits_pack(bits, st->submodeID, NB_SUBMODE_BITS);
+
+#ifdef EPIC_48K
+   }
+#endif
+   }
+
+   /* If null mode (no transmission), just set a couple things to zero*/
+   if (st->submodes[st->submodeID] == NULL)
+   {
+      for (i=0;i<st->frameSize;i++)
+         st->exc[i]=st->sw[i]=VERY_SMALL;
+
+      for (i=0;i<st->lpcSize;i++)
+         st->mem_sw[i]=0;
+      st->first=1;
+      st->bounded_pitch = 1;
+
+      speex_move(st->winBuf, in+2*st->frameSize-st->windowSize, (st->windowSize-st->frameSize)*sizeof(spx_word16_t));
+
+      /* Clear memory (no need to really compute it) */
+      for (i=0;i<st->lpcSize;i++)
+         st->mem_sp[i] = 0;
+      return 0;
+
+   }
+
+   /* LSP Quantization */
+   if (st->first)
+   {
+      for (i=0;i<st->lpcSize;i++)
+         st->old_lsp[i] = lsp[i];
+   }
+
+
+   /*Quantize LSPs*/
+#if 1 /*0 for unquantized*/
+   SUBMODE(lsp_quant)(lsp, qlsp, st->lpcSize, bits);
+#else
+   for (i=0;i<st->lpcSize;i++)
+     qlsp[i]=lsp[i];
+#endif
+
+#ifdef EPIC_48K
+   if (st->lbr_48k) {
+      speex_bits_pack(bits, pitch_half[0]-st->min_pitch, 7);
+      speex_bits_pack(bits, pitch_half[1]-pitch_half[0]+1, 2);
+      
+      {
+         int quant = (int)floor(.5+7.4*GAIN_SCALING_1*ol_pitch_coef);
+         if (quant>7)
+            quant=7;
+         if (quant<0)
+            quant=0;
+         ol_pitch_id=quant;
+         speex_bits_pack(bits, quant, 3);
+         ol_pitch_coef=GAIN_SCALING*0.13514*quant;
+         
+      }
+      {
+         int qe = (int)(floor(.5+2.1*log(ol_gain*1.0/SIG_SCALING)))-2;
+         if (qe<0)
+            qe=0;
+         if (qe>15)
+            qe=15;
+         ol_gain = exp((qe+2)/2.1)*SIG_SCALING;
+         speex_bits_pack(bits, qe, 4);
+      }
+
+   } else {
+#endif
+
+   /*If we use low bit-rate pitch mode, transmit open-loop pitch*/
+   if (SUBMODE(lbr_pitch)!=-1)
+   {
+      speex_bits_pack(bits, ol_pitch-st->min_pitch, 7);
+   } 
+
+   if (SUBMODE(forced_pitch_gain))
+   {
+      int quant;
+      quant = (int)floor(.5+15*ol_pitch_coef*GAIN_SCALING_1);
+      if (quant>15)
+         quant=15;
+      if (quant<0)
+         quant=0;
+      speex_bits_pack(bits, quant, 4);
+      ol_pitch_coef=GAIN_SCALING*0.066667*quant;
+   }
+   
+   
+   /*Quantize and transmit open-loop excitation gain*/
+#ifdef FIXED_POINT
+   {
+      int qe = scal_quant32(ol_gain, ol_gain_table, 32);
+      /*ol_gain = exp(qe/3.5)*SIG_SCALING;*/
+      ol_gain = MULT16_32_Q15(28406,ol_gain_table[qe]);
+      speex_bits_pack(bits, qe, 5);
+   }
+#else
+   {
+      int qe = (int)(floor(.5+3.5*log(ol_gain*1.0/SIG_SCALING)));
+      if (qe<0)
+         qe=0;
+      if (qe>31)
+         qe=31;
+      ol_gain = exp(qe/3.5)*SIG_SCALING;
+      speex_bits_pack(bits, qe, 5);
+   }
+#endif
+
+
+#ifdef EPIC_48K
+   }
+#endif
+
+
+   /* Special case for first frame */
+   if (st->first)
+   {
+      for (i=0;i<st->lpcSize;i++)
+         st->old_qlsp[i] = qlsp[i];
+   }
+
+   /* Target signal */
+   ALLOC(target, st->subframeSize, spx_word16_t);
+   ALLOC(innov, st->subframeSize, spx_sig_t);
+   ALLOC(exc32, st->subframeSize, spx_word32_t);
+   ALLOC(ringing, st->subframeSize, spx_word16_t);
+   ALLOC(syn_resp, st->subframeSize, spx_word16_t);
+   ALLOC(real_exc, st->subframeSize, spx_word16_t);
+   ALLOC(mem, st->lpcSize, spx_mem_t);
+
+   /* Loop on sub-frames */
+   for (sub=0;sub<st->nbSubframes;sub++)
+   {
+      int   offset;
+      spx_word16_t *sw;
+      spx_word16_t *exc;
+      spx_sig_t *innov_save = NULL;
+      int pitch;
+      int response_bound = st->subframeSize;
+#ifdef EPIC_48K
+      if (st->lbr_48k)
+      {
+         if (sub*2 < st->nbSubframes)
+            ol_pitch = pitch_half[0];
+         else
+            ol_pitch = pitch_half[1];
+      }
+#endif
+
+      /* Offset relative to start of frame */
+      offset = st->subframeSize*sub;
+      /* Excitation */
+      exc=st->exc+offset;
+      /* Weighted signal */
+      sw=st->sw+offset;
+      /* Pointer for saving innovation */
+      if (st->innov_save)
+         innov_save = st->innov_save+offset;
+      
+      /* LSP interpolation (quantized and unquantized) */
+      lsp_interpolate(st->old_lsp, lsp, interp_lsp, st->lpcSize, sub, st->nbSubframes);
+      lsp_interpolate(st->old_qlsp, qlsp, interp_qlsp, st->lpcSize, sub, st->nbSubframes);
+
+      /* Make sure the filters are stable */
+      lsp_enforce_margin(interp_lsp, st->lpcSize, LSP_MARGIN);
+      lsp_enforce_margin(interp_qlsp, st->lpcSize, LSP_MARGIN);
+
+      /* Compute interpolated LPCs (quantized and unquantized) */
+      lsp_to_lpc(interp_lsp, interp_lpc, st->lpcSize,stack);
+
+      lsp_to_lpc(interp_qlsp, interp_qlpc, st->lpcSize, stack);
+
+      /* Compute analysis filter gain at w=pi (for use in SB-CELP) */
+      {
+         spx_word32_t pi_g=LPC_SCALING;
+         for (i=0;i<st->lpcSize;i+=2)
+         {
+            /*pi_g += -st->interp_qlpc[i] +  st->interp_qlpc[i+1];*/
+            pi_g = ADD32(pi_g, SUB32(EXTEND32(interp_qlpc[i+1]),EXTEND32(interp_qlpc[i])));
+         }
+         st->pi_gain[sub] = pi_g;
+      }
+
+#ifdef VORBIS_PSYCHO
+      {
+         float curr_curve[128];
+         float fact = ((float)sub+1.0f)/st->nbSubframes;
+         for (i=0;i<128;i++)
+            curr_curve[i] = (1.0f-fact)*st->old_curve[i] + fact*st->curve[i];
+         curve_to_lpc(st->psy, curr_curve, bw_lpc1, bw_lpc2, 10);
+      }
+#else
+      /* Compute bandwidth-expanded (unquantized) LPCs for perceptual weighting */
+      bw_lpc(st->gamma1, interp_lpc, bw_lpc1, st->lpcSize);
+      if (st->gamma2>=0)
+         bw_lpc(st->gamma2, interp_lpc, bw_lpc2, st->lpcSize);
+      else
+      {
+         bw_lpc2[0]=1;
+         for (i=1;i<=st->lpcSize;i++)
+            bw_lpc2[i]=0;
+      }
+      /*print_vec(st->bw_lpc1, 10, "bw_lpc");*/
+#endif
+
+      {
+         /*FIXME: This will break if we change the window size */
+         if (st->windowSize-st->frameSize != st->subframeSize)
+            speex_error("windowSize-frameSize != subframeSize");
+         if (sub==0)
+         {
+            for (i=0;i<st->subframeSize;i++)
+               real_exc[i] = sw[i] = st->winBuf[i];
+         } else {
+            for (i=0;i<st->subframeSize;i++)
+               real_exc[i] = sw[i] = in[i+((sub-1)*st->subframeSize)];
+         }
+      }
+      fir_mem16(real_exc, interp_qlpc, real_exc, st->subframeSize, st->lpcSize, st->mem_exc2, stack);
+      
+      if (st->complexity==0)
+         response_bound >>= 1;
+      compute_impulse_response(interp_qlpc, bw_lpc1, bw_lpc2, syn_resp, response_bound, st->lpcSize, stack);
+      for (i=response_bound;i<st->subframeSize;i++)
+         syn_resp[i]=VERY_SMALL;
+      
+      /* Compute zero response of A(z/g1) / ( A(z/g2) * A(z) ) */
+      for (i=0;i<st->lpcSize;i++)
+         mem[i]=SHL32(st->mem_sp[i],1);
+      for (i=0;i<st->subframeSize;i++)
+         ringing[i] = VERY_SMALL;
+#ifdef SHORTCUTS2
+      iir_mem16(ringing, interp_qlpc, ringing, response_bound, st->lpcSize, mem, stack);
+      for (i=0;i<st->lpcSize;i++)
+         mem[i]=SHL32(st->mem_sw[i],1);
+      filter_mem16(ringing, st->bw_lpc1, st->bw_lpc2, ringing, response_bound, st->lpcSize, mem, stack);
+      for (i=response_bound;i<st->subframeSize;i++)
+         ringing[i]=0;
+#else
+      iir_mem16(ringing, interp_qlpc, ringing, st->subframeSize, st->lpcSize, mem, stack);
+      for (i=0;i<st->lpcSize;i++)
+         mem[i]=SHL32(st->mem_sw[i],1);
+      filter_mem16(ringing, bw_lpc1, bw_lpc2, ringing, st->subframeSize, st->lpcSize, mem, stack);
+#endif
+      
+      /* Compute weighted signal */
+      for (i=0;i<st->lpcSize;i++)
+         mem[i]=st->mem_sw[i];
+      filter_mem16(sw, bw_lpc1, bw_lpc2, sw, st->subframeSize, st->lpcSize, mem, stack);
+      
+      if (st->complexity==0)
+         for (i=0;i<st->lpcSize;i++)
+            st->mem_sw[i]=mem[i];
+      
+      /* Compute target signal (saturation prevents overflows on clipped input speech) */
+      for (i=0;i<st->subframeSize;i++)
+         target[i]=EXTRACT16(SATURATE(SUB32(sw[i],PSHR32(ringing[i],1)),32767));
+
+      /* Reset excitation */
+      for (i=0;i<st->subframeSize;i++)
+         exc[i]=0;
+
+      /* If we have a long-term predictor (otherwise, something's wrong) */
+      if (SUBMODE(ltp_quant))
+      {
+         int pit_min, pit_max;
+         /* Long-term prediction */
+         if (SUBMODE(lbr_pitch) != -1)
+         {
+            /* Low bit-rate pitch handling */
+            int margin;
+            margin = SUBMODE(lbr_pitch);
+            if (margin)
+            {
+               if (ol_pitch < st->min_pitch+margin-1)
+                  ol_pitch=st->min_pitch+margin-1;
+               if (ol_pitch > st->max_pitch-margin)
+                  ol_pitch=st->max_pitch-margin;
+               pit_min = ol_pitch-margin+1;
+               pit_max = ol_pitch+margin;
+            } else {
+               pit_min=pit_max=ol_pitch;
+            }
+         } else {
+            pit_min = st->min_pitch;
+            pit_max = st->max_pitch;
+         }
+         
+         /* Force pitch to use only the current frame if needed */
+         if (st->bounded_pitch && pit_max>offset)
+            pit_max=offset;
+
+#ifdef EPIC_48K
+         if (st->lbr_48k)
+         {
+            pitch = SUBMODE(ltp_quant)(target, sw, interp_qlpc, bw_lpc1, bw_lpc2,
+                                       exc32, SUBMODE(ltp_params), pit_min, pit_max, ol_pitch_coef,
+                                       st->lpcSize, st->subframeSize, bits, stack, 
+                                       exc, syn_resp, st->complexity, ol_pitch_id, st->plc_tuning, &st->cumul_gain);
+         } else {
+#endif
+
+         /* Perform pitch search */
+         pitch = SUBMODE(ltp_quant)(target, sw, interp_qlpc, bw_lpc1, bw_lpc2,
+                                    exc32, SUBMODE(ltp_params), pit_min, pit_max, ol_pitch_coef,
+                                    st->lpcSize, st->subframeSize, bits, stack, 
+                                    exc, syn_resp, st->complexity, 0, st->plc_tuning, &st->cumul_gain);
+#ifdef EPIC_48K
+         }
+#endif
+
+         st->pitch[sub]=pitch;
+      } else {
+         speex_error ("No pitch prediction, what's wrong");
+      }
+
+      /* Quantization of innovation */
+      {
+         spx_word32_t ener=0;
+         spx_word16_t fine_gain;
+
+         for (i=0;i<st->subframeSize;i++)
+            innov[i]=0;
+         
+         /* FIXME: Make sure this is save from overflows (so far so good) */
+         for (i=0;i<st->subframeSize;i++)
+            real_exc[i] = SUB16(real_exc[i], EXTRACT16(PSHR32(exc32[i],SIG_SHIFT-1)));
+
+         ener = SHL32(EXTEND32(compute_rms16(real_exc, st->subframeSize)),SIG_SHIFT);
+         
+         /*FIXME: Should use DIV32_16 and make sure result fits in 16 bits */
+#ifdef FIXED_POINT
+         {
+            spx_word32_t f = PDIV32(ener,PSHR32(ol_gain,SIG_SHIFT));
+            if (f<=32767)
+               fine_gain = f;
+            else
+               fine_gain = 32767;
+         }
+#else
+         fine_gain = PDIV32_16(ener,PSHR32(ol_gain,SIG_SHIFT));
+#endif
+         /* Calculate gain correction for the sub-frame (if any) */
+         if (SUBMODE(have_subframe_gain)) 
+         {
+            int qe;
+            if (SUBMODE(have_subframe_gain)==3)
+            {
+               qe = scal_quant(fine_gain, exc_gain_quant_scal3_bound, 8);
+               speex_bits_pack(bits, qe, 3);
+               ener=MULT16_32_Q14(exc_gain_quant_scal3[qe],ol_gain);
+            } else {
+               qe = scal_quant(fine_gain, exc_gain_quant_scal1_bound, 2);
+               speex_bits_pack(bits, qe, 1);
+               ener=MULT16_32_Q14(exc_gain_quant_scal1[qe],ol_gain);               
+            }
+         } else {
+            ener=ol_gain;
+         }
+
+         /*printf ("%f %f\n", ener, ol_gain);*/
+
+         /* Normalize innovation */
+         signal_div(target, target, ener, st->subframeSize);
+
+         /* Quantize innovation */
+         if (SUBMODE(innovation_quant))
+         {
+            /* Codebook search */
+            SUBMODE(innovation_quant)(target, interp_qlpc, bw_lpc1, bw_lpc2, 
+                                      SUBMODE(innovation_params), st->lpcSize, st->subframeSize, 
+                                      innov, syn_resp, bits, stack, st->complexity, SUBMODE(double_codebook));
+            
+            /* De-normalize innovation and update excitation */
+            signal_mul(innov, innov, ener, st->subframeSize);
+
+            for (i=0;i<st->subframeSize;i++)
+               exc[i] = EXTRACT16(SATURATE32(PSHR32(ADD32(SHL32(exc32[i],1),innov[i]),SIG_SHIFT),32767));
+         } else {
+            speex_error("No fixed codebook");
+         }
+
+         if (innov_save)
+         {
+            for (i=0;i<st->subframeSize;i++)
+               innov_save[i] = innov[i];
+         }
+         /* In some (rare) modes, we do a second search (more bits) to reduce noise even more */
+         if (SUBMODE(double_codebook)) {
+            char *tmp_stack=stack;
+            VARDECL(spx_sig_t *innov2);
+            ALLOC(innov2, st->subframeSize, spx_sig_t);
+            for (i=0;i<st->subframeSize;i++)
+               innov2[i]=0;
+            for (i=0;i<st->subframeSize;i++)
+               target[i]=MULT16_16_P13(QCONST16(2.2,13), target[i]);
+            SUBMODE(innovation_quant)(target, interp_qlpc, bw_lpc1, bw_lpc2, 
+                                      SUBMODE(innovation_params), st->lpcSize, st->subframeSize, 
+                                      innov2, syn_resp, bits, stack, st->complexity, 0);
+            signal_mul(innov2, innov2, MULT16_32_Q15(QCONST16(0.454545,15),ener), st->subframeSize);
+            for (i=0;i<st->subframeSize;i++)
+               exc[i] = ADD32(exc[i],PSHR32(innov2[i],SIG_SHIFT));
+            if (innov_save)
+            {
+               for (i=0;i<st->subframeSize;i++)
+                  innov_save[i] = ADD32(innov_save[i],innov2[i]);
+            }
+            stack = tmp_stack;
+         }
+
+      }
+
+      for (i=0;i<st->subframeSize;i++)
+         sw[i] = exc[i];
+      /* Final signal synthesis from excitation */
+      iir_mem16(sw, interp_qlpc, sw, st->subframeSize, st->lpcSize, st->mem_sp, stack);
+
+      /* Compute weighted signal again, from synthesized speech (not sure it's the right thing) */
+      if (st->complexity!=0)
+         filter_mem16(sw, bw_lpc1, bw_lpc2, sw, st->subframeSize, st->lpcSize, st->mem_sw, stack);
+      
+   }
+
+   /* Store the LSPs for interpolation in the next frame */
+   if (st->submodeID>=1)
+   {
+      for (i=0;i<st->lpcSize;i++)
+         st->old_lsp[i] = lsp[i];
+      for (i=0;i<st->lpcSize;i++)
+         st->old_qlsp[i] = qlsp[i];
+   }
+
+#ifdef VORBIS_PSYCHO
+   if (st->submodeID>=1)
+   {
+      for (i=0;i<128;i++)
+         st->old_curve[i] = st->curve[i];
+   }
+#endif
+
+   if (st->submodeID==1)
+   {
+      if (st->dtx_count)
+         speex_bits_pack(bits, 15, 4);
+      else
+         speex_bits_pack(bits, 0, 4);
+   }
+
+   /* The next frame will not be the first (Duh!) */
+   st->first = 0;
+   speex_move(st->winBuf, in+2*st->frameSize-st->windowSize, (st->windowSize-st->frameSize)*sizeof(spx_word16_t));
+
+   if (SUBMODE(innovation_quant) == noise_codebook_quant || st->submodeID==0)
+      st->bounded_pitch = 1;
+   else
+      st->bounded_pitch = 0;
+
+   return 1;
+}
+
+void *nb_decoder_init(const SpeexMode *m)
+{
+   DecState *st;
+   const SpeexNBMode *mode;
+   int i;
+
+   mode=(const SpeexNBMode*)m->mode;
+   st = (DecState *)speex_alloc(sizeof(DecState));
+   if (!st)
+      return NULL;
+#if defined(VAR_ARRAYS) || defined (USE_ALLOCA)
+   st->stack = NULL;
+#else
+   st->stack = (char*)speex_alloc_scratch(NB_DEC_STACK);
+#endif
+
+   st->mode=m;
+
+
+   st->encode_submode = 1;
+#ifdef EPIC_48K
+   st->lbr_48k=mode->lbr48k;
+#endif
+
+   st->first=1;
+   /* Codec parameters, should eventually have several "modes"*/
+   st->frameSize = mode->frameSize;
+   st->nbSubframes=mode->frameSize/mode->subframeSize;
+   st->subframeSize=mode->subframeSize;
+   st->lpcSize = mode->lpcSize;
+   st->min_pitch=mode->pitchStart;
+   st->max_pitch=mode->pitchEnd;
+
+   st->submodes=mode->submodes;
+   st->submodeID=mode->defaultSubmode;
+
+   st->lpc_enh_enabled=1;
+
+   st->excBuf = (spx_word16_t*)speex_alloc((st->frameSize + 2*st->max_pitch + st->subframeSize + 12)*sizeof(spx_word16_t));
+   st->exc = st->excBuf + 2*st->max_pitch + st->subframeSize + 6;
+   for (i=0;i<st->frameSize + st->max_pitch + 1;i++)
+      st->excBuf[i]=0;
+
+   st->interp_qlpc = (spx_coef_t*)speex_alloc(st->lpcSize*sizeof(spx_coef_t));
+   st->old_qlsp = (spx_lsp_t*)speex_alloc(st->lpcSize*sizeof(spx_lsp_t));
+   st->mem_sp = (spx_mem_t*)speex_alloc(st->lpcSize*sizeof(spx_mem_t));
+   st->pi_gain = (spx_word32_t*)speex_alloc((st->nbSubframes)*sizeof(spx_word32_t));
+   st->last_pitch = 40;
+   st->count_lost=0;
+   st->pitch_gain_buf[0] = st->pitch_gain_buf[1] = st->pitch_gain_buf[2] = 0;
+   st->pitch_gain_buf_idx = 0;
+   st->seed = 1000;
+   
+   st->sampling_rate=8000;
+   st->last_ol_gain = 0;
+
+   st->user_callback.func = &speex_default_user_handler;
+   st->user_callback.data = NULL;
+   for (i=0;i<16;i++)
+      st->speex_callbacks[i].func = NULL;
+
+   st->voc_m1=st->voc_m2=st->voc_mean=0;
+   st->voc_offset=0;
+   st->dtx_enabled=0;
+   st->isWideband = 0;
+   st->highpass_enabled = 1;
+
+#ifdef ENABLE_VALGRIND
+   VALGRIND_MAKE_READABLE(st, (st->stack-(char*)st));
+#endif
+   return st;
+}
+
+void nb_decoder_destroy(void *state)
+{
+   DecState *st;
+   st=(DecState*)state;
+   
+#if !(defined(VAR_ARRAYS) || defined (USE_ALLOCA))
+   speex_free_scratch(st->stack);
+#endif
+
+   speex_free (st->excBuf);
+   speex_free (st->interp_qlpc);
+   speex_free (st->old_qlsp);
+   speex_free (st->mem_sp);
+   speex_free (st->pi_gain);
+
+   speex_free(state);
+}
+
+#define median3(a, b, c)	((a) < (b) ? ((b) < (c) ? (b) : ((a) < (c) ? (c) : (a))) : ((c) < (b) ? (b) : ((c) < (a) ? (c) : (a))))
+
+#ifdef FIXED_POINT
+const spx_word16_t attenuation[10] = {32767, 31483, 27923, 22861, 17278, 12055, 7764, 4616, 2533, 1283};
+#else
+const spx_word16_t attenuation[10] = {1., 0.961, 0.852, 0.698, 0.527, 0.368, 0.237, 0.141, 0.077, 0.039};
+
+#endif
+
+static void nb_decode_lost(DecState *st, spx_word16_t *out, char *stack)
+{
+   int i;
+   int pitch_val;
+   spx_word16_t pitch_gain;
+   spx_word16_t fact;
+   spx_word16_t gain_med;
+   spx_word16_t innov_gain;
+   spx_word16_t noise_gain;
+   
+   if (st->count_lost<10)
+      fact = attenuation[st->count_lost];
+   else
+      fact = 0;
+
+   gain_med = median3(st->pitch_gain_buf[0], st->pitch_gain_buf[1], st->pitch_gain_buf[2]);
+   if (gain_med < st->last_pitch_gain)
+      st->last_pitch_gain = gain_med;
+   
+#ifdef FIXED_POINT
+   pitch_gain = st->last_pitch_gain;
+   if (pitch_gain>54)
+      pitch_gain = 54;
+   pitch_gain = SHL(pitch_gain, 9);
+#else   
+   pitch_gain = GAIN_SCALING_1*st->last_pitch_gain;
+   if (pitch_gain>.85)
+      pitch_gain=.85;
+#endif
+   pitch_gain = MULT16_16_Q15(fact,pitch_gain) + VERY_SMALL;
+   /* FIXME: This was rms of innovation (not exc) */
+   innov_gain = compute_rms16(st->exc, st->frameSize);
+   noise_gain = MULT16_16_Q15(innov_gain, MULT16_16_Q15(fact, SUB16(Q15ONE,MULT16_16_Q15(pitch_gain,pitch_gain))));
+   /* Shift all buffers by one frame */
+   speex_move(st->excBuf, st->excBuf+st->frameSize, (2*st->max_pitch + st->subframeSize + 12)*sizeof(spx_word16_t));
+   
+
+   pitch_val = st->last_pitch + SHR32((spx_int32_t)speex_rand(1+st->count_lost, &st->seed),SIG_SHIFT);
+   if (pitch_val > st->max_pitch)
+      pitch_val = st->max_pitch;
+   if (pitch_val < st->min_pitch)
+      pitch_val = st->min_pitch;
+   for (i=0;i<st->frameSize;i++)
+   {
+      st->exc[i]= MULT16_16_Q15(pitch_gain, (st->exc[i-pitch_val]+VERY_SMALL)) + 
+            speex_rand(noise_gain, &st->seed);
+   }
+
+   for (i=0;i<st->frameSize;i++)
+      out[i]=st->exc[i-st->subframeSize];
+   bw_lpc(QCONST16(.98,15), st->interp_qlpc, st->interp_qlpc, st->lpcSize);
+   iir_mem16(out, st->interp_qlpc, out, st->frameSize, st->lpcSize, 
+             st->mem_sp, stack);
+   highpass(out, out, st->frameSize, HIGHPASS_NARROWBAND|HIGHPASS_OUTPUT, st->mem_hp);
+   
+   st->first = 0;
+   st->count_lost++;
+   st->pitch_gain_buf[st->pitch_gain_buf_idx++] = PSHR(pitch_gain,9);
+   if (st->pitch_gain_buf_idx > 2) /* rollover */
+      st->pitch_gain_buf_idx = 0;
+}
+
+
+int nb_decode(void *state, SpeexBits *bits, void *vout)
+{
+   DecState *st;
+   int i, sub;
+   int pitch;
+   spx_word16_t pitch_gain[3];
+   spx_word32_t ol_gain=0;
+   int ol_pitch=0;
+   spx_word16_t ol_pitch_coef=0;
+   int best_pitch=40;
+   spx_word16_t best_pitch_gain=0;
+   int wideband;
+   int m;
+   char *stack;
+   VARDECL(spx_sig_t *innov);
+   VARDECL(spx_word32_t *exc32);
+   VARDECL(spx_coef_t *ak);
+   VARDECL(spx_lsp_t *qlsp);
+   spx_word16_t pitch_average=0;
+#ifdef EPIC_48K
+   int pitch_half[2];
+   int ol_pitch_id=0;
+#endif
+   spx_word16_t *out = (spx_word16_t*)vout;
+   VARDECL(spx_lsp_t *interp_qlsp);
+
+   st=(DecState*)state;
+   stack=st->stack;
+
+   /* Check if we're in DTX mode*/
+   if (!bits && st->dtx_enabled)
+   {
+      st->submodeID=0;
+   } else 
+   {
+      /* If bits is NULL, consider the packet to be lost (what could we do anyway) */
+      if (!bits)
+      {
+         nb_decode_lost(st, out, stack);
+         return 0;
+      }
+
+      if (st->encode_submode)
+      {
+#ifdef EPIC_48K
+         if (!st->lbr_48k) {
+#endif
+
+      /* Search for next narrowband block (handle requests, skip wideband blocks) */
+      do {
+         if (speex_bits_remaining(bits)<5)
+            return -1;
+         wideband = speex_bits_unpack_unsigned(bits, 1);
+         if (wideband) /* Skip wideband block (for compatibility) */
+         {
+            int submode;
+            int advance;
+            advance = submode = speex_bits_unpack_unsigned(bits, SB_SUBMODE_BITS);
+            speex_mode_query(&speex_wb_mode, SPEEX_SUBMODE_BITS_PER_FRAME, &advance);
+            if (advance < 0)
+            {
+               speex_warning ("Invalid wideband mode encountered. Corrupted stream?");
+               return -2;
+            } 
+            advance -= (SB_SUBMODE_BITS+1);
+            speex_bits_advance(bits, advance);
+            
+            if (speex_bits_remaining(bits)<5)
+               return -1;
+            wideband = speex_bits_unpack_unsigned(bits, 1);
+            if (wideband)
+            {
+               advance = submode = speex_bits_unpack_unsigned(bits, SB_SUBMODE_BITS);
+               speex_mode_query(&speex_wb_mode, SPEEX_SUBMODE_BITS_PER_FRAME, &advance);
+               if (advance < 0)
+               {
+                  speex_warning ("Invalid wideband mode encountered: corrupted stream?");
+                  return -2;
+               } 
+               advance -= (SB_SUBMODE_BITS+1);
+               speex_bits_advance(bits, advance);
+               wideband = speex_bits_unpack_unsigned(bits, 1);
+               if (wideband)
+               {
+                  speex_warning ("More than two wideband layers found: corrupted stream?");
+                  return -2;
+               }
+
+            }
+         }
+         if (speex_bits_remaining(bits)<4)
+            return -1;
+         /* FIXME: Check for overflow */
+         m = speex_bits_unpack_unsigned(bits, 4);
+         if (m==15) /* We found a terminator */
+         {
+            return -1;
+         } else if (m==14) /* Speex in-band request */
+         {
+            int ret = speex_inband_handler(bits, st->speex_callbacks, state);
+            if (ret)
+               return ret;
+         } else if (m==13) /* User in-band request */
+         {
+            int ret = st->user_callback.func(bits, state, st->user_callback.data);
+            if (ret)
+               return ret;
+         } else if (m>8) /* Invalid mode */
+         {
+            speex_warning("Invalid mode encountered: corrupted stream?");
+            return -2;
+         }
+      
+      } while (m>8);
+
+      /* Get the sub-mode that was used */
+      st->submodeID = m;
+#ifdef EPIC_48K
+         }
+#endif
+      }
+
+   }
+
+   /* Shift all buffers by one frame */
+   speex_move(st->excBuf, st->excBuf+st->frameSize, (2*st->max_pitch + st->subframeSize + 12)*sizeof(spx_word16_t));
+
+   /* If null mode (no transmission), just set a couple things to zero*/
+   if (st->submodes[st->submodeID] == NULL)
+   {
+      VARDECL(spx_coef_t *lpc);
+      ALLOC(lpc, st->lpcSize, spx_coef_t);
+      bw_lpc(GAMMA_SCALING*.93, st->interp_qlpc, lpc, st->lpcSize);
+      {
+         float innov_gain=0;
+         float pgain=GAIN_SCALING_1*st->last_pitch_gain;
+         if (pgain>.6)
+            pgain=.6;
+         /* FIXME: This was innov, not exc */
+         innov_gain = compute_rms16(st->exc, st->frameSize);
+         for (i=0;i<st->frameSize;i++)
+            st->exc[i]=speex_rand(innov_gain, &st->seed);
+      }
+
+
+      st->first=1;
+
+      for (i=0;i<st->frameSize;i++)
+         out[i] = st->exc[i];
+      /* Final signal synthesis from excitation */
+      iir_mem16(out, lpc, out, st->frameSize, st->lpcSize, st->mem_sp, stack);
+
+      st->count_lost=0;
+      return 0;
+   }
+
+   ALLOC(qlsp, st->lpcSize, spx_lsp_t);
+
+   /* Unquantize LSPs */
+   SUBMODE(lsp_unquant)(qlsp, st->lpcSize, bits);
+
+   /*Damp memory if a frame was lost and the LSP changed too much*/
+   if (st->count_lost)
+   {
+      spx_word16_t fact;
+      spx_word32_t lsp_dist=0;
+      for (i=0;i<st->lpcSize;i++)
+         lsp_dist = ADD32(lsp_dist, EXTEND32(ABS(st->old_qlsp[i] - qlsp[i])));
+#ifdef FIXED_POINT
+      fact = SHR16(19661,SHR32(lsp_dist,LSP_SHIFT+2));      
+#else
+      fact = .6*exp(-.2*lsp_dist);
+#endif
+      for (i=0;i<st->lpcSize;i++)
+         st->mem_sp[i] = MULT16_32_Q15(fact,st->mem_sp[i]);
+   }
+
+
+   /* Handle first frame and lost-packet case */
+   if (st->first || st->count_lost)
+   {
+      for (i=0;i<st->lpcSize;i++)
+         st->old_qlsp[i] = qlsp[i];
+   }
+
+#ifdef EPIC_48K
+   if (st->lbr_48k) {
+      pitch_half[0] = st->min_pitch+speex_bits_unpack_unsigned(bits, 7);
+      pitch_half[1] = pitch_half[0]+speex_bits_unpack_unsigned(bits, 2)-1;
+
+      ol_pitch_id = speex_bits_unpack_unsigned(bits, 3);
+      ol_pitch_coef=GAIN_SCALING*0.13514*ol_pitch_id;
+
+      {
+         int qe;
+         qe = speex_bits_unpack_unsigned(bits, 4);
+         ol_gain = SIG_SCALING*exp((qe+2)/2.1),SIG_SHIFT;
+      }
+
+   } else {
+#endif
+
+   /* Get open-loop pitch estimation for low bit-rate pitch coding */
+   if (SUBMODE(lbr_pitch)!=-1)
+   {
+      ol_pitch = st->min_pitch+speex_bits_unpack_unsigned(bits, 7);
+   } 
+   
+   if (SUBMODE(forced_pitch_gain))
+   {
+      int quant;
+      quant = speex_bits_unpack_unsigned(bits, 4);
+      ol_pitch_coef=GAIN_SCALING*0.066667*quant;
+   }
+   
+   /* Get global excitation gain */
+   {
+      int qe;
+      qe = speex_bits_unpack_unsigned(bits, 5);
+#ifdef FIXED_POINT
+      /* FIXME: Perhaps we could slightly lower the gain here when the output is going to saturate? */
+      ol_gain = MULT16_32_Q15(28406,ol_gain_table[qe]);
+#else
+      ol_gain = SIG_SCALING*exp(qe/3.5);
+#endif
+   }
+#ifdef EPIC_48K
+   }
+#endif
+
+   ALLOC(ak, st->lpcSize, spx_coef_t);
+   ALLOC(innov, st->subframeSize, spx_sig_t);
+   ALLOC(exc32, st->subframeSize, spx_word32_t);
+
+   if (st->submodeID==1)
+   {
+      int extra;
+      extra = speex_bits_unpack_unsigned(bits, 4);
+
+      if (extra==15)
+         st->dtx_enabled=1;
+      else
+         st->dtx_enabled=0;
+   }
+   if (st->submodeID>1)
+      st->dtx_enabled=0;
+
+   /*Loop on subframes */
+   for (sub=0;sub<st->nbSubframes;sub++)
+   {
+      int offset;
+      spx_word16_t *exc;
+      spx_word16_t *sp;
+      spx_sig_t *innov_save = NULL;
+      spx_word16_t tmp;
+
+#ifdef EPIC_48K
+      if (st->lbr_48k)
+      {
+         if (sub*2 < st->nbSubframes)
+            ol_pitch = pitch_half[0];
+         else
+            ol_pitch = pitch_half[1];
+      }
+#endif
+
+      /* Offset relative to start of frame */
+      offset = st->subframeSize*sub;
+      /* Excitation */
+      exc=st->exc+offset;
+      /* Original signal */
+      sp=out+offset;
+      if (st->innov_save)
+         innov_save = st->innov_save+offset;
+
+
+      /* Reset excitation */
+      for (i=0;i<st->subframeSize;i++)
+         exc[i]=0;
+
+      /*Adaptive codebook contribution*/
+      if (SUBMODE(ltp_unquant))
+      {
+         int pit_min, pit_max;
+         /* Handle pitch constraints if any */
+         if (SUBMODE(lbr_pitch) != -1)
+         {
+            int margin;
+            margin = SUBMODE(lbr_pitch);
+            if (margin)
+            {
+/* GT - need optimization?
+               if (ol_pitch < st->min_pitch+margin-1)
+                  ol_pitch=st->min_pitch+margin-1;
+               if (ol_pitch > st->max_pitch-margin)
+                  ol_pitch=st->max_pitch-margin;
+               pit_min = ol_pitch-margin+1;
+               pit_max = ol_pitch+margin;
+*/
+               pit_min = ol_pitch-margin+1;
+               if (pit_min < st->min_pitch)
+		  pit_min = st->min_pitch;
+               pit_max = ol_pitch+margin;
+               if (pit_max > st->max_pitch)
+		  pit_max = st->max_pitch;
+            } else {
+               pit_min = pit_max = ol_pitch;
+            }
+         } else {
+            pit_min = st->min_pitch;
+            pit_max = st->max_pitch;
+         }
+
+
+#ifdef EPIC_48K
+         if (st->lbr_48k)
+         {
+             SUBMODE(ltp_unquant)(exc, exc32, pit_min, pit_max, ol_pitch_coef, SUBMODE(ltp_params), 
+                                  st->subframeSize, &pitch, &pitch_gain[0], bits, stack, 
+                                  st->count_lost, offset, st->last_pitch_gain, ol_pitch_id);
+         } else {
+#endif
+
+             SUBMODE(ltp_unquant)(exc, exc32, pit_min, pit_max, ol_pitch_coef, SUBMODE(ltp_params), 
+                                  st->subframeSize, &pitch, &pitch_gain[0], bits, stack, 
+                                  st->count_lost, offset, st->last_pitch_gain, 0);
+
+#ifdef EPIC_48K
+         }
+#endif
+
+         tmp = gain_3tap_to_1tap(pitch_gain);
+
+         pitch_average += tmp;
+         if ((tmp>best_pitch_gain&&ABS(2*best_pitch-pitch)>=3&&ABS(3*best_pitch-pitch)>=4&&ABS(4*best_pitch-pitch)>=5) 
+              || (tmp>MULT16_16_Q15(QCONST16(.6,15),best_pitch_gain)&&(ABS(best_pitch-2*pitch)<3||ABS(best_pitch-3*pitch)<4||ABS(best_pitch-4*pitch)<5)) 
+              || (MULT16_16_Q15(QCONST16(.67,15),tmp)>best_pitch_gain&&(ABS(2*best_pitch-pitch)<3||ABS(3*best_pitch-pitch)<4||ABS(4*best_pitch-pitch)<5)) )
+         {
+            best_pitch = pitch;
+            if (tmp > best_pitch_gain)
+               best_pitch_gain = tmp;
+         }
+      } else {
+         speex_error("No pitch prediction, what's wrong");
+      }
+      
+      /* Unquantize the innovation */
+      {
+         int q_energy;
+         spx_word32_t ener;
+         
+         for (i=0;i<st->subframeSize;i++)
+            innov[i]=0;
+
+         /* Decode sub-frame gain correction */
+         if (SUBMODE(have_subframe_gain)==3)
+         {
+            q_energy = speex_bits_unpack_unsigned(bits, 3);
+            ener = MULT16_32_Q14(exc_gain_quant_scal3[q_energy],ol_gain);
+         } else if (SUBMODE(have_subframe_gain)==1)
+         {
+            q_energy = speex_bits_unpack_unsigned(bits, 1);
+            ener = MULT16_32_Q14(exc_gain_quant_scal1[q_energy],ol_gain);
+         } else {
+            ener = ol_gain;
+         }
+                  
+         if (SUBMODE(innovation_unquant))
+         {
+            /*Fixed codebook contribution*/
+            SUBMODE(innovation_unquant)(innov, SUBMODE(innovation_params), st->subframeSize, bits, stack, &st->seed);
+         } else {
+            speex_error("No fixed codebook");
+         }
+
+         /* De-normalize innovation and update excitation */
+#ifdef FIXED_POINT
+         signal_mul(innov, innov, ener, st->subframeSize);
+#else
+         signal_mul(innov, innov, ener, st->subframeSize);
+#endif
+         /*Vocoder mode*/
+         if (st->submodeID==1) 
+         {
+            float g=ol_pitch_coef*GAIN_SCALING_1;
+
+            
+            for (i=0;i<st->subframeSize;i++)
+               exc[i]=0;
+            while (st->voc_offset<st->subframeSize)
+            {
+               if (st->voc_offset>=0)
+                  exc[st->voc_offset]=sqrt(1.0*ol_pitch);
+               st->voc_offset+=ol_pitch;
+            }
+            st->voc_offset -= st->subframeSize;
+
+            g=.5+2*(g-.6);
+            if (g<0)
+               g=0;
+            if (g>1)
+               g=1;
+            for (i=0;i<st->subframeSize;i++)
+            {
+               spx_word16_t exci=exc[i];
+               /* FIXME: cleanup the innov[i]/SIG_SCALING */
+               exc[i]=.8*g*exc[i]*PSHR32(ol_gain,SIG_SHIFT) + .6*g*st->voc_m1*PSHR32(ol_gain,SIG_SHIFT) + (1-.5*g)*PSHR32(innov[i],SIG_SHIFT) - .5*g*PSHR32(st->voc_m2,SIG_SHIFT);
+               st->voc_m1 = exci;
+               st->voc_m2=innov[i];
+               st->voc_mean = .95*st->voc_mean + .05*exc[i];
+               exc[i]-=st->voc_mean;
+            }
+         } else {
+            for (i=0;i<st->subframeSize;i++)
+               exc[i]=EXTRACT16(SATURATE32(PSHR32(ADD32(SHL32(exc32[i],1),innov[i]),SIG_SHIFT),32767));
+            /*print_vec(exc, 40, "innov");*/
+         }
+         if (innov_save)
+         {
+            for (i=0;i<st->subframeSize;i++)
+               innov_save[i] = innov[i];
+         }
+         /* Decode second codebook (only for some modes) */
+         if (SUBMODE(double_codebook))
+         {
+            char *tmp_stack=stack;
+            VARDECL(spx_sig_t *innov2);
+            ALLOC(innov2, st->subframeSize, spx_sig_t);
+            for (i=0;i<st->subframeSize;i++)
+               innov2[i]=0;
+            SUBMODE(innovation_unquant)(innov2, SUBMODE(innovation_params), st->subframeSize, bits, stack, &st->seed);
+            signal_mul(innov2, innov2, MULT16_32_Q15(QCONST16(0.454545,15),ener), st->subframeSize);
+            for (i=0;i<st->subframeSize;i++)
+               exc[i] = EXTRACT16(SATURATE32(ADD32(EXTEND32(exc[i]),PSHR32(innov2[i],SIG_SHIFT)),32767));
+            if (innov_save)
+            {
+               for (i=0;i<st->subframeSize;i++)
+                  innov_save[i] = ADD32(innov_save[i],innov2[i]);
+            }
+            stack = tmp_stack;
+         }
+      }
+   }
+   
+   ALLOC(interp_qlsp, st->lpcSize, spx_lsp_t);
+
+   if (st->lpc_enh_enabled && SUBMODE(comb_gain)>0 && !st->count_lost)
+   {
+      multicomb(st->exc-st->subframeSize, out, st->interp_qlpc, st->lpcSize, 2*st->subframeSize, best_pitch, 40, SUBMODE(comb_gain), stack);
+      multicomb(st->exc+st->subframeSize, out+2*st->subframeSize, st->interp_qlpc, st->lpcSize, 2*st->subframeSize, best_pitch, 40, SUBMODE(comb_gain), stack);
+   } else {
+      for (i=0;i<st->frameSize;i++)
+         out[i]=st->exc[i-st->subframeSize];
+   }
+   
+   /* If the last packet was lost, re-scale the excitation to obtain the same energy as encoded in ol_gain */
+   if (st->count_lost) 
+   {
+      spx_word16_t exc_ener;
+      spx_word32_t gain32;
+      spx_word16_t gain;
+      exc_ener = compute_rms16 (st->exc, st->frameSize);
+      gain32 = PDIV32(ol_gain, ADD16(exc_ener,1));
+#ifdef FIXED_POINT
+      if (gain32 > 32767)
+         gain32 = 32767;
+      gain = EXTRACT16(gain32);
+#else
+      if (gain32 > 2)
+         gain32=2;
+      gain = gain32;
+#endif
+      for (i=0;i<st->frameSize;i++)
+      {
+         st->exc[i] = MULT16_16_Q14(gain, st->exc[i]);
+         out[i]=st->exc[i-st->subframeSize];
+      }
+   }
+
+   /*Loop on subframes */
+   for (sub=0;sub<st->nbSubframes;sub++)
+   {
+      int offset;
+      spx_word16_t *sp;
+      spx_word16_t *exc;
+      /* Offset relative to start of frame */
+      offset = st->subframeSize*sub;
+      /* Original signal */
+      sp=out+offset;
+      /* Excitation */
+      exc=st->exc+offset;
+
+      /* LSP interpolation (quantized and unquantized) */
+      lsp_interpolate(st->old_qlsp, qlsp, interp_qlsp, st->lpcSize, sub, st->nbSubframes);
+
+      /* Make sure the LSP's are stable */
+      lsp_enforce_margin(interp_qlsp, st->lpcSize, LSP_MARGIN);
+
+      /* Compute interpolated LPCs (unquantized) */
+      lsp_to_lpc(interp_qlsp, ak, st->lpcSize, stack);
+
+      /* Compute analysis filter at w=pi */
+      {
+         spx_word32_t pi_g=LPC_SCALING;
+         for (i=0;i<st->lpcSize;i+=2)
+         {
+            /*pi_g += -st->interp_qlpc[i] +  st->interp_qlpc[i+1];*/
+            pi_g = ADD32(pi_g, SUB32(EXTEND32(st->interp_qlpc[i+1]),EXTEND32(st->interp_qlpc[i])));
+         }
+         st->pi_gain[sub] = pi_g;
+      }
+      
+      iir_mem16(sp, st->interp_qlpc, sp, st->subframeSize, st->lpcSize, 
+                st->mem_sp, stack);
+      
+      for (i=0;i<st->lpcSize;i++)
+         st->interp_qlpc[i] = ak[i];
+
+   }
+
+   if (st->highpass_enabled)
+      highpass(out, out, st->frameSize, (st->isWideband?HIGHPASS_WIDEBAND:HIGHPASS_NARROWBAND)|HIGHPASS_OUTPUT, st->mem_hp);
+   /*for (i=0;i<st->frameSize;i++)
+     printf ("%d\n", (int)st->frame[i]);*/
+
+   /* Store the LSPs for interpolation in the next frame */
+   for (i=0;i<st->lpcSize;i++)
+      st->old_qlsp[i] = qlsp[i];
+
+   /* The next frame will not be the first (Duh!) */
+   st->first = 0;
+   st->count_lost=0;
+   st->last_pitch = best_pitch;
+#ifdef FIXED_POINT
+   st->last_pitch_gain = PSHR16(pitch_average,2);
+#else
+   st->last_pitch_gain = .25*pitch_average;   
+#endif
+   st->pitch_gain_buf[st->pitch_gain_buf_idx++] = st->last_pitch_gain;
+   if (st->pitch_gain_buf_idx > 2) /* rollover */
+      st->pitch_gain_buf_idx = 0;
+
+   st->last_ol_gain = ol_gain;
+
+   return 0;
+}
+
+int nb_encoder_ctl(void *state, int request, void *ptr)
+{
+   EncState *st;
+   st=(EncState*)state;     
+   switch(request)
+   {
+   case SPEEX_GET_FRAME_SIZE:
+      (*(spx_int32_t*)ptr) = st->frameSize;
+      break;
+   case SPEEX_SET_LOW_MODE:
+   case SPEEX_SET_MODE:
+      st->submodeSelect = st->submodeID = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_GET_LOW_MODE:
+   case SPEEX_GET_MODE:
+      (*(spx_int32_t*)ptr) = st->submodeID;
+      break;
+   case SPEEX_SET_VBR:
+      st->vbr_enabled = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_GET_VBR:
+      (*(spx_int32_t*)ptr) = st->vbr_enabled;
+      break;
+   case SPEEX_SET_VAD:
+      st->vad_enabled = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_GET_VAD:
+      (*(spx_int32_t*)ptr) = st->vad_enabled;
+      break;
+   case SPEEX_SET_DTX:
+      st->dtx_enabled = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_GET_DTX:
+      (*(spx_int32_t*)ptr) = st->dtx_enabled;
+      break;
+   case SPEEX_SET_ABR:
+      st->abr_enabled = (*(spx_int32_t*)ptr);
+      st->vbr_enabled = st->abr_enabled!=0;
+      if (st->vbr_enabled) 
+      {
+         spx_int32_t i=10;
+         spx_int32_t rate, target;
+         float vbr_qual;
+         target = (*(spx_int32_t*)ptr);
+         while (i>=0)
+         {
+            speex_encoder_ctl(st, SPEEX_SET_QUALITY, &i);
+            speex_encoder_ctl(st, SPEEX_GET_BITRATE, &rate);
+            if (rate <= target)
+               break;
+            i--;
+         }
+         vbr_qual=i;
+         if (vbr_qual<0)
+            vbr_qual=0;
+         speex_encoder_ctl(st, SPEEX_SET_VBR_QUALITY, &vbr_qual);
+         st->abr_count=0;
+         st->abr_drift=0;
+         st->abr_drift2=0;
+      }
+      
+      break;
+   case SPEEX_GET_ABR:
+      (*(spx_int32_t*)ptr) = st->abr_enabled;
+      break;
+   case SPEEX_SET_VBR_QUALITY:
+      st->vbr_quality = (*(float*)ptr);
+      break;
+   case SPEEX_GET_VBR_QUALITY:
+      (*(float*)ptr) = st->vbr_quality;
+      break;
+   case SPEEX_SET_QUALITY:
+      {
+         int quality = (*(spx_int32_t*)ptr);
+         if (quality < 0)
+            quality = 0;
+         if (quality > 10)
+            quality = 10;
+         st->submodeSelect = st->submodeID = ((const SpeexNBMode*)(st->mode->mode))->quality_map[quality];
+      }
+      break;
+   case SPEEX_SET_COMPLEXITY:
+      st->complexity = (*(spx_int32_t*)ptr);
+      if (st->complexity<0)
+         st->complexity=0;
+      break;
+   case SPEEX_GET_COMPLEXITY:
+      (*(spx_int32_t*)ptr) = st->complexity;
+      break;
+   case SPEEX_SET_BITRATE:
+      {
+         spx_int32_t i=10;
+         spx_int32_t rate, target;
+         target = (*(spx_int32_t*)ptr);
+         while (i>=0)
+         {
+            speex_encoder_ctl(st, SPEEX_SET_QUALITY, &i);
+            speex_encoder_ctl(st, SPEEX_GET_BITRATE, &rate);
+            if (rate <= target)
+               break;
+            i--;
+         }
+      }
+      break;
+   case SPEEX_GET_BITRATE:
+      if (st->submodes[st->submodeID])
+         (*(spx_int32_t*)ptr) = st->sampling_rate*SUBMODE(bits_per_frame)/st->frameSize;
+      else
+         (*(spx_int32_t*)ptr) = st->sampling_rate*(NB_SUBMODE_BITS+1)/st->frameSize;
+      break;
+   case SPEEX_SET_SAMPLING_RATE:
+      st->sampling_rate = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_GET_SAMPLING_RATE:
+      (*(spx_int32_t*)ptr)=st->sampling_rate;
+      break;
+   case SPEEX_RESET_STATE:
+      {
+         int i;
+         st->bounded_pitch = 1;
+         st->first = 1;
+         for (i=0;i<st->lpcSize;i++)
+            st->old_lsp[i]=(M_PI*((float)(i+1)))/(st->lpcSize+1);
+         for (i=0;i<st->lpcSize;i++)
+            st->mem_sw[i]=st->mem_sw_whole[i]=st->mem_sp[i]=st->mem_exc[i]=0;
+         for (i=0;i<st->frameSize+st->max_pitch+1;i++)
+            st->excBuf[i]=st->swBuf[i]=0;
+         for (i=0;i<st->windowSize-st->frameSize;i++)
+            st->winBuf[i]=0;
+      }
+      break;
+   case SPEEX_SET_SUBMODE_ENCODING:
+      st->encode_submode = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_GET_SUBMODE_ENCODING:
+      (*(spx_int32_t*)ptr) = st->encode_submode;
+      break;
+   case SPEEX_GET_LOOKAHEAD:
+      (*(spx_int32_t*)ptr)=(st->windowSize-st->frameSize);
+      break;
+   case SPEEX_SET_PLC_TUNING:
+      st->plc_tuning = (*(spx_int32_t*)ptr);
+      if (st->plc_tuning>100)
+         st->plc_tuning=100;
+      break;
+   case SPEEX_GET_PLC_TUNING:
+      (*(spx_int32_t*)ptr)=(st->plc_tuning);
+      break;
+   case SPEEX_SET_VBR_MAX_BITRATE:
+      st->vbr_max = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_GET_VBR_MAX_BITRATE:
+      (*(spx_int32_t*)ptr) = st->vbr_max;
+      break;
+   case SPEEX_SET_HIGHPASS:
+      st->highpass_enabled = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_GET_HIGHPASS:
+      (*(spx_int32_t*)ptr) = st->highpass_enabled;
+      break;
+
+   /* This is all internal stuff past this point */
+   case SPEEX_GET_PI_GAIN:
+      {
+         int i;
+         spx_word32_t *g = (spx_word32_t*)ptr;
+         for (i=0;i<st->nbSubframes;i++)
+            g[i]=st->pi_gain[i];
+      }
+      break;
+   case SPEEX_GET_EXC:
+      {
+         int i;
+         spx_word16_t *e = (spx_word16_t*)ptr;
+         for (i=0;i<st->frameSize;i++)
+            e[i]=st->exc[i];
+      }
+      break;
+   case SPEEX_GET_RELATIVE_QUALITY:
+      (*(float*)ptr)=st->relative_quality;
+      break;
+   case SPEEX_SET_INNOVATION_SAVE:
+      st->innov_save = (spx_sig_t*)ptr;
+      break;
+   case SPEEX_SET_WIDEBAND:
+      st->isWideband = *((spx_int32_t*)ptr);
+      break;
+   default:
+      speex_warning_int("Unknown nb_ctl request: ", request);
+      return -1;
+   }
+   return 0;
+}
+
+int nb_decoder_ctl(void *state, int request, void *ptr)
+{
+   DecState *st;
+   st=(DecState*)state;
+   switch(request)
+   {
+   case SPEEX_SET_LOW_MODE:
+   case SPEEX_SET_MODE:
+      st->submodeID = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_GET_LOW_MODE:
+   case SPEEX_GET_MODE:
+      (*(spx_int32_t*)ptr) = st->submodeID;
+      break;
+   case SPEEX_SET_ENH:
+      st->lpc_enh_enabled = *((spx_int32_t*)ptr);
+      break;
+   case SPEEX_GET_ENH:
+      *((spx_int32_t*)ptr) = st->lpc_enh_enabled;
+      break;
+   case SPEEX_GET_FRAME_SIZE:
+      (*(spx_int32_t*)ptr) = st->frameSize;
+      break;
+   case SPEEX_GET_BITRATE:
+      if (st->submodes[st->submodeID])
+         (*(spx_int32_t*)ptr) = st->sampling_rate*SUBMODE(bits_per_frame)/st->frameSize;
+      else
+         (*(spx_int32_t*)ptr) = st->sampling_rate*(NB_SUBMODE_BITS+1)/st->frameSize;
+      break;
+   case SPEEX_SET_SAMPLING_RATE:
+      st->sampling_rate = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_GET_SAMPLING_RATE:
+      (*(spx_int32_t*)ptr)=st->sampling_rate;
+      break;
+   case SPEEX_SET_HANDLER:
+      {
+         SpeexCallback *c = (SpeexCallback*)ptr;
+         st->speex_callbacks[c->callback_id].func=c->func;
+         st->speex_callbacks[c->callback_id].data=c->data;
+         st->speex_callbacks[c->callback_id].callback_id=c->callback_id;
+      }
+      break;
+   case SPEEX_SET_USER_HANDLER:
+      {
+         SpeexCallback *c = (SpeexCallback*)ptr;
+         st->user_callback.func=c->func;
+         st->user_callback.data=c->data;
+         st->user_callback.callback_id=c->callback_id;
+      }
+      break;
+   case SPEEX_RESET_STATE:
+      {
+         int i;
+         for (i=0;i<st->lpcSize;i++)
+            st->mem_sp[i]=0;
+         for (i=0;i<st->frameSize + st->max_pitch + 1;i++)
+            st->excBuf[i]=0;
+      }
+      break;
+   case SPEEX_SET_SUBMODE_ENCODING:
+      st->encode_submode = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_GET_SUBMODE_ENCODING:
+      (*(spx_int32_t*)ptr) = st->encode_submode;
+      break;
+   case SPEEX_GET_LOOKAHEAD:
+      (*(spx_int32_t*)ptr)=st->subframeSize;
+      break;
+   case SPEEX_SET_HIGHPASS:
+      st->highpass_enabled = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_GET_HIGHPASS:
+      (*(spx_int32_t*)ptr) = st->highpass_enabled;
+      break;
+
+   case SPEEX_GET_PI_GAIN:
+      {
+         int i;
+         spx_word32_t *g = (spx_word32_t*)ptr;
+         for (i=0;i<st->nbSubframes;i++)
+            g[i]=st->pi_gain[i];
+      }
+      break;
+   case SPEEX_GET_EXC:
+      {
+         int i;
+         spx_word16_t *e = (spx_word16_t*)ptr;
+         for (i=0;i<st->frameSize;i++)
+            e[i]=st->exc[i];
+      }
+      break;
+   case SPEEX_GET_DTX_STATUS:
+      *((spx_int32_t*)ptr) = st->dtx_enabled;
+      break;
+   case SPEEX_SET_INNOVATION_SAVE:
+      st->innov_save = (spx_sig_t*)ptr;
+      break;
+   case SPEEX_SET_WIDEBAND:
+      st->isWideband = *((spx_int32_t*)ptr);
+      break;
+   default:
+      speex_warning_int("Unknown nb_ctl request: ", request);
+      return -1;
+   }
+   return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/nb_celp.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/nb_celp.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/nb_celp.h	(revision 1163)
@@ -0,0 +1,205 @@
+/* Copyright (C) 2002-2006 Jean-Marc Valin */
+/**
+    @file nb_celp.h
+    @brief Narrowband CELP encoder/decoder
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifndef NB_CELP_H
+#define NB_CELP_H
+
+#include "modes.h"
+#include <speex/speex_bits.h>
+#include <speex/speex_callbacks.h>
+#include "vbr.h"
+#include "filters.h"
+
+#ifdef VORBIS_PSYCHO
+#include "vorbis_psy.h"
+#endif
+
+/**Structure representing the full state of the narrowband encoder*/
+typedef struct EncState {
+   const SpeexMode *mode;        /**< Mode corresponding to the state */
+   int    first;                 /**< Is this the first frame? */
+   int    frameSize;             /**< Size of frames */
+   int    subframeSize;          /**< Size of sub-frames */
+   int    nbSubframes;           /**< Number of sub-frames */
+   int    windowSize;            /**< Analysis (LPC) window length */
+   int    lpcSize;               /**< LPC order */
+   int    min_pitch;             /**< Minimum pitch value allowed */
+   int    max_pitch;             /**< Maximum pitch value allowed */
+
+   spx_word32_t cumul_gain;      /**< Product of previously used pitch gains (Q10) */
+   int    bounded_pitch;         /**< Next frame should not rely on previous frames for pitch */
+   int    ol_pitch;              /**< Open-loop pitch */
+   int    ol_voiced;             /**< Open-loop voiced/non-voiced decision */
+   int   *pitch;
+
+#ifdef EPIC_48K
+   int    lbr_48k;
+#endif
+
+#ifdef VORBIS_PSYCHO
+   VorbisPsy *psy;
+   float *psy_window;
+   float *curve;
+   float *old_curve;
+#endif
+
+   spx_word16_t  gamma1;         /**< Perceptual filter: A(z/gamma1) */
+   spx_word16_t  gamma2;         /**< Perceptual filter: A(z/gamma2) */
+   float  lag_factor;            /**< Lag windowing Gaussian width */
+   spx_word16_t  lpc_floor;      /**< Noise floor multiplier for A[0] in LPC analysis*/
+   char  *stack;                 /**< Pseudo-stack allocation for temporary memory */
+   spx_word16_t *winBuf;         /**< Input buffer (original signal) */
+   spx_word16_t *excBuf;         /**< Excitation buffer */
+   spx_word16_t *exc;            /**< Start of excitation frame */
+   spx_word16_t *swBuf;          /**< Weighted signal buffer */
+   spx_word16_t *sw;             /**< Start of weighted signal frame */
+   const spx_word16_t *window;   /**< Temporary (Hanning) window */
+   spx_word16_t *lagWindow;      /**< Window applied to auto-correlation */
+   spx_lsp_t *old_lsp;           /**< LSPs for previous frame */
+   spx_lsp_t *old_qlsp;          /**< Quantized LSPs for previous frame */
+   spx_mem_t *mem_sp;            /**< Filter memory for signal synthesis */
+   spx_mem_t *mem_sw;            /**< Filter memory for perceptually-weighted signal */
+   spx_mem_t *mem_sw_whole;      /**< Filter memory for perceptually-weighted signal (whole frame)*/
+   spx_mem_t *mem_exc;           /**< Filter memory for excitation (whole frame) */
+   spx_mem_t *mem_exc2;          /**< Filter memory for excitation (whole frame) */
+   spx_mem_t mem_hp[2];          /**< High-pass filter memory */
+   spx_word32_t *pi_gain;        /**< Gain of LPC filter at theta=pi (fe/2) */
+   spx_sig_t *innov_save;        /**< If non-NULL, innovation is copied here */
+         
+   VBRState *vbr;                /**< State of the VBR data */
+   float  vbr_quality;           /**< Quality setting for VBR encoding */
+   float  relative_quality;      /**< Relative quality that will be needed by VBR */
+   spx_int32_t vbr_enabled;      /**< 1 for enabling VBR, 0 otherwise */
+   spx_int32_t vbr_max;          /**< Max bit-rate allowed in VBR mode */
+   int    vad_enabled;           /**< 1 for enabling VAD, 0 otherwise */
+   int    dtx_enabled;           /**< 1 for enabling DTX, 0 otherwise */
+   int    dtx_count;             /**< Number of consecutive DTX frames */
+   spx_int32_t abr_enabled;      /**< ABR setting (in bps), 0 if off */
+   float  abr_drift;
+   float  abr_drift2;
+   float  abr_count;
+   int    complexity;            /**< Complexity setting (0-10 from least complex to most complex) */
+   spx_int32_t sampling_rate;
+   int    plc_tuning;
+   int    encode_submode;
+   const SpeexSubmode * const *submodes; /**< Sub-mode data */
+   int    submodeID;             /**< Activated sub-mode */
+   int    submodeSelect;         /**< Mode chosen by the user (may differ from submodeID if VAD is on) */
+   int    isWideband;            /**< Is this used as part of the embedded wideband codec */
+   int    highpass_enabled;        /**< Is the input filter enabled */
+} EncState;
+
+/**Structure representing the full state of the narrowband decoder*/
+typedef struct DecState {
+   const SpeexMode *mode;       /**< Mode corresponding to the state */
+   int    first;                /**< Is this the first frame? */
+   int    count_lost;           /**< Was the last frame lost? */
+   int    frameSize;            /**< Size of frames */
+   int    subframeSize;         /**< Size of sub-frames */
+   int    nbSubframes;          /**< Number of sub-frames */
+   int    lpcSize;              /**< LPC order */
+   int    min_pitch;            /**< Minimum pitch value allowed */
+   int    max_pitch;            /**< Maximum pitch value allowed */
+   spx_int32_t sampling_rate;
+
+#ifdef EPIC_48K
+   int    lbr_48k;
+#endif
+
+   spx_word16_t  last_ol_gain;  /**< Open-loop gain for previous frame */
+
+   char  *stack;                /**< Pseudo-stack allocation for temporary memory */
+   spx_word16_t *excBuf;        /**< Excitation buffer */
+   spx_word16_t *exc;           /**< Start of excitation frame */
+   spx_lsp_t *old_qlsp;         /**< Quantized LSPs for previous frame */
+   spx_coef_t *interp_qlpc;     /**< Interpolated quantized LPCs */
+   spx_mem_t *mem_sp;           /**< Filter memory for synthesis signal */
+   spx_mem_t mem_hp[2];         /**< High-pass filter memory */
+   spx_word32_t *pi_gain;       /**< Gain of LPC filter at theta=pi (fe/2) */
+   spx_sig_t *innov_save;       /** If non-NULL, innovation is copied here */
+   
+   /* This is used in packet loss concealment */
+   int    last_pitch;           /**< Pitch of last correctly decoded frame */
+   spx_word16_t  last_pitch_gain; /**< Pitch gain of last correctly decoded frame */
+   spx_word16_t  pitch_gain_buf[3]; /**< Pitch gain of last decoded frames */
+   int    pitch_gain_buf_idx;   /**< Tail of the buffer */
+   spx_int32_t seed;            /** Seed used for random number generation */
+   
+   int    encode_submode;
+   const SpeexSubmode * const *submodes; /**< Sub-mode data */
+   int    submodeID;            /**< Activated sub-mode */
+   int    lpc_enh_enabled;      /**< 1 when LPC enhancer is on, 0 otherwise */
+   SpeexCallback speex_callbacks[SPEEX_MAX_CALLBACKS];
+
+   SpeexCallback user_callback;
+
+   /*Vocoder data*/
+   spx_word16_t  voc_m1;
+   spx_word32_t  voc_m2;
+   float  voc_mean;
+   int    voc_offset;
+
+   int    dtx_enabled;
+   int    isWideband;            /**< Is this used as part of the embedded wideband codec */
+   int    highpass_enabled;        /**< Is the input filter enabled */
+} DecState;
+
+/** Initializes encoder state*/
+void *nb_encoder_init(const SpeexMode *m);
+
+/** De-allocates encoder state resources*/
+void nb_encoder_destroy(void *state);
+
+/** Encodes one frame*/
+int nb_encode(void *state, void *in, SpeexBits *bits);
+
+
+/** Initializes decoder state*/
+void *nb_decoder_init(const SpeexMode *m);
+
+/** De-allocates decoder state resources*/
+void nb_decoder_destroy(void *state);
+
+/** Decodes one frame*/
+int nb_decode(void *state, SpeexBits *bits, void *out);
+
+/** ioctl-like function for controlling a narrowband encoder */
+int nb_encoder_ctl(void *state, int request, void *ptr);
+
+/** ioctl-like function for controlling a narrowband decoder */
+int nb_decoder_ctl(void *state, int request, void *ptr);
+
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/preprocess_spx.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/preprocess_spx.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/preprocess_spx.c	(revision 1163)
@@ -0,0 +1,1144 @@
+/* Copyright (C) 2003 Epic Games (written by Jean-Marc Valin)
+   Copyright (C) 2004-2006 Epic Games 
+   
+   File: preprocess.c
+   Preprocessor with denoising based on the algorithm by Ephraim and Malah
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+
+   2. 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.
+
+   3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+*/
+
+
+/*
+   Recommended papers:
+   
+   Y. Ephraim and D. Malah, "Speech enhancement using minimum mean-square error
+   short-time spectral amplitude estimator". IEEE Transactions on Acoustics, 
+   Speech and Signal Processing, vol. ASSP-32, no. 6, pp. 1109-1121, 1984.
+   
+   Y. Ephraim and D. Malah, "Speech enhancement using minimum mean-square error
+   log-spectral amplitude estimator". IEEE Transactions on Acoustics, Speech and 
+   Signal Processing, vol. ASSP-33, no. 2, pp. 443-445, 1985.
+   
+   I. Cohen and B. Berdugo, "Speech enhancement for non-stationary noise environments".
+   Signal Processing, vol. 81, no. 2, pp. 2403-2418, 2001.
+
+   Stefan Gustafsson, Rainer Martin, Peter Jax, and Peter Vary. "A psychoacoustic 
+   approach to combined acoustic echo cancellation and noise reduction". IEEE 
+   Transactions on Speech and Audio Processing, 2002.
+   
+   J.-M. Valin, J. Rouat, and F. Michaud, "Microphone array post-filter for separation
+   of simultaneous non-stationary sources". In Proceedings IEEE International 
+   Conference on Acoustics, Speech, and Signal Processing, 2004.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include "speex/speex_preprocess.h"
+#include "speex/speex_echo.h"
+#include "misc.h"
+#include "fftwrap.h"
+#include "filterbank.h"
+#include "math_approx.h"
+
+#ifndef M_PI
+#define M_PI 3.14159263
+#endif
+
+#define LOUDNESS_EXP 2.5
+
+#define NB_BANDS 24
+
+#define SPEECH_PROB_START_DEFAULT       QCONST16(0.35f,15)
+#define SPEECH_PROB_CONTINUE_DEFAULT    QCONST16(0.20f,15)
+#define NOISE_SUPPRESS_DEFAULT       -25
+#define ECHO_SUPPRESS_DEFAULT        -45
+#define ECHO_SUPPRESS_ACTIVE_DEFAULT -15
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#define SQR(x) ((x)*(x))
+#define SQR16(x) (MULT16_16((x),(x)))
+#define SQR16_Q15(x) (MULT16_16_Q15((x),(x)))
+
+#ifdef FIXED_POINT
+static inline spx_word16_t DIV32_16_Q8(spx_word32_t a, spx_word32_t b)
+{
+   if (SHR32(a,7) >= b)
+   {
+      return 32767;
+   } else {
+      if (b>=QCONST32(1,23))
+      {
+         a = SHR32(a,8);
+         b = SHR32(b,8);
+      }
+      if (b>=QCONST32(1,19))
+      {
+         a = SHR32(a,4);
+         b = SHR32(b,4);
+      }
+      if (b>=QCONST32(1,15))
+      {
+         a = SHR32(a,4);
+         b = SHR32(b,4);
+      }
+      a = SHL32(a,8);
+      return PDIV32_16(a,b);
+   }
+   
+}
+static inline spx_word16_t DIV32_16_Q15(spx_word32_t a, spx_word32_t b)
+{
+   if (SHR32(a,15) >= b)
+   {
+      return 32767;
+   } else {
+      if (b>=QCONST32(1,23))
+      {
+         a = SHR32(a,8);
+         b = SHR32(b,8);
+      }
+      if (b>=QCONST32(1,19))
+      {
+         a = SHR32(a,4);
+         b = SHR32(b,4);
+      }
+      if (b>=QCONST32(1,15))
+      {
+         a = SHR32(a,4);
+         b = SHR32(b,4);
+      }
+      a = SHL32(a,15)-a;
+      return DIV32_16(a,b);
+   }
+}
+#define SNR_SCALING 256.f
+#define SNR_SCALING_1 0.0039062f
+#define SNR_SHIFT 8
+
+#define FRAC_SCALING 32767.f
+#define FRAC_SCALING_1 3.0518e-05
+#define FRAC_SHIFT 1
+
+#define EXPIN_SCALING 2048.f
+#define EXPIN_SCALING_1 0.00048828f
+#define EXPIN_SHIFT 11
+#define EXPOUT_SCALING_1 1.5259e-05
+
+#define NOISE_SHIFT 7
+
+#else
+
+#define DIV32_16_Q8(a,b) ((a)/(b))
+#define DIV32_16_Q15(a,b) ((a)/(b))
+#define SNR_SCALING 1.f
+#define SNR_SCALING_1 1.f
+#define SNR_SHIFT 0
+#define FRAC_SCALING 1.f
+#define FRAC_SCALING_1 1.f
+#define FRAC_SHIFT 0
+#define NOISE_SHIFT 0
+
+#define EXPIN_SCALING 1.f
+#define EXPIN_SCALING_1 1.f
+#define EXPOUT_SCALING_1 1.f
+
+#endif
+
+/** Speex pre-processor state. */
+struct SpeexPreprocessState_ {
+   /* Basic info */
+   int    frame_size;        /**< Number of samples processed each time */
+   int    ps_size;           /**< Number of points in the power spectrum */
+   int    sampling_rate;     /**< Sampling rate of the input/output */
+   int    nbands;
+   FilterBank *bank;
+   
+   /* Parameters */
+   int    denoise_enabled;
+   int    agc_enabled;
+   float  agc_level;
+   int    vad_enabled;
+   int    dereverb_enabled;
+   spx_word16_t  reverb_decay;
+   spx_word16_t  reverb_level;
+   spx_word16_t speech_prob_start;
+   spx_word16_t speech_prob_continue;
+   int    noise_suppress;
+   int    echo_suppress;
+   int    echo_suppress_active;
+   SpeexEchoState *echo_state;
+   
+   /* DSP-related arrays */
+   spx_word16_t *frame;      /**< Processing frame (2*ps_size) */
+   spx_word16_t *ft;         /**< Processing frame in freq domain (2*ps_size) */
+   spx_word32_t *ps;         /**< Current power spectrum */
+   spx_word16_t *gain2;      /**< Adjusted gains */
+   spx_word16_t *gain_floor; /**< Minimum gain allowed */
+   spx_word16_t *window;     /**< Analysis/Synthesis window */
+   spx_word32_t *noise;      /**< Noise estimate */
+   spx_word32_t *reverb_estimate; /**< Estimate of reverb energy */
+   spx_word32_t *old_ps;     /**< Power spectrum for last frame */
+   spx_word16_t *gain;       /**< Ephraim Malah gain */
+   spx_word16_t *prior;      /**< A-priori SNR */
+   spx_word16_t *post;       /**< A-posteriori SNR */
+
+   spx_word32_t *S;          /**< Smoothed power spectrum */
+   spx_word32_t *Smin;       /**< See Cohen paper */
+   spx_word32_t *Stmp;       /**< See Cohen paper */
+   int *update_prob;       /**< Propability of speech presence for noise update */
+
+   spx_word16_t *zeta;       /**< Smoothed a priori SNR */
+   spx_word32_t *echo_noise;
+   spx_word32_t *residual_echo;
+
+   /* Misc */
+   spx_word16_t *inbuf;      /**< Input buffer (overlapped analysis) */
+   spx_word16_t *outbuf;     /**< Output buffer (for overlap and add) */
+
+#ifndef FIXED_POINT
+   float *loudness_weight;   /**< Perceptual loudness curve */
+   float  loudness;          /**< loudness estimate */
+   float  loudness2;         /**< loudness estimate */
+   int    nb_loudness_adapt; /**< Number of frames used for loudness adaptation so far */
+#endif
+   int    nb_adapt;          /**< Number of frames used for adaptation so far */
+   int    was_speech;
+   int    min_count;         /**< Number of frames processed so far */
+   void  *fft_lookup;        /**< Lookup table for the FFT */
+#ifdef FIXED_POINT
+   int    frame_shift;
+#endif
+};
+
+
+static void conj_window(spx_word16_t *w, int len)
+{
+   int i;
+   for (i=0;i<len;i++)
+   {
+      spx_word16_t tmp;
+      spx_word16_t x = DIV32_16(MULT16_16(QCONST16(4.f,13),i),len);
+      int inv=0;
+      if (x<QCONST16(1.f,13))
+      {
+      } else if (x<QCONST16(2.f,13))
+      {
+         x=QCONST16(2.f,13)-x;
+         inv=1;
+      } else if (x<QCONST16(3.f,13))
+      {
+         x=x-QCONST16(2.f,13);
+         inv=1;
+      } else {
+         x=QCONST16(2.f,13)-x+QCONST16(2.f,13); /* 4 - x */
+      }
+      x = MULT16_16_Q14(QCONST16(1.271903f,14), x);
+      tmp = SQR16_Q15(QCONST16(.5f,15)-MULT16_16_P15(QCONST16(.5f,15),spx_cos_norm(QCONST32(x,2))));
+      if (inv)
+         tmp=SUB16(Q15_ONE,tmp);
+      w[i]=spx_sqrt(SHL32(EXTEND32(tmp),15));
+   }
+}
+
+      
+#ifdef FIXED_POINT
+/* This function approximates the gain function 
+   y = gamma(1.25)^2 * M(-.25;1;-x) / sqrt(x)  
+   which multiplied by xi/(1+xi) is the optimal gain
+   in the loudness domain ( sqrt[amplitude] )
+   Input in Q11 format, output in Q15
+*/
+static inline spx_word32_t hypergeom_gain(spx_word32_t xx)
+{
+   int ind;
+   spx_word16_t frac;
+   /* Q13 table */
+   static const spx_word16_t table[21] = {
+       6730,  8357,  9868, 11267, 12563, 13770, 14898,
+      15959, 16961, 17911, 18816, 19682, 20512, 21311,
+      22082, 22827, 23549, 24250, 24931, 25594, 26241};
+      ind = SHR32(xx,10);
+      if (ind<0)
+         return Q15_ONE;
+      if (ind>19)
+         return ADD32(EXTEND32(Q15_ONE),EXTEND32(DIV32_16(QCONST32(.1296,23), SHR32(xx,EXPIN_SHIFT-SNR_SHIFT))));
+      frac = SHL32(xx-SHL32(ind,10),5);
+      return SHL32(DIV32_16(PSHR32(MULT16_16(Q15_ONE-frac,table[ind]) + MULT16_16(frac,table[ind+1]),7),(spx_sqrt(SHL32(xx,15)+6711))),7);
+}
+
+static inline spx_word16_t qcurve(spx_word16_t x)
+{
+   x = MAX16(x, 1);
+   return DIV32_16(SHL32(EXTEND32(32767),9),ADD16(512,MULT16_16_Q15(QCONST16(.60f,15),DIV32_16(32767,x))));
+}
+
+/* Compute the gain floor based on different floors for the background noise and residual echo */
+static void compute_gain_floor(int noise_suppress, int effective_echo_suppress, spx_word32_t *noise, spx_word32_t *echo, spx_word16_t *gain_floor, int len)
+{
+   int i;
+   
+   if (noise_suppress > effective_echo_suppress)
+   {
+      spx_word16_t noise_gain, gain_ratio;
+      noise_gain = EXTRACT16(MIN32(Q15_ONE,SHR32(spx_exp(MULT16_16(QCONST16(0.11513,11),noise_suppress)),1)));
+      gain_ratio = EXTRACT16(MIN32(Q15_ONE,SHR32(spx_exp(MULT16_16(QCONST16(.2302585f,11),effective_echo_suppress-noise_suppress)),1)));
+
+      /* gain_floor = sqrt [ (noise*noise_floor + echo*echo_floor) / (noise+echo) ] */
+      for (i=0;i<len;i++)
+         gain_floor[i] = MULT16_16_Q15(noise_gain,
+                                       spx_sqrt(SHL32(EXTEND32(DIV32_16_Q15(PSHR32(noise[i],NOISE_SHIFT) + MULT16_32_Q15(gain_ratio,echo[i]),
+                                             (1+PSHR32(noise[i],NOISE_SHIFT) + echo[i]) )),15)));
+   } else {
+      spx_word16_t echo_gain, gain_ratio;
+      echo_gain = EXTRACT16(MIN32(Q15_ONE,SHR32(spx_exp(MULT16_16(QCONST16(0.11513,11),effective_echo_suppress)),1)));
+      gain_ratio = EXTRACT16(MIN32(Q15_ONE,SHR32(spx_exp(MULT16_16(QCONST16(.2302585f,11),noise_suppress-effective_echo_suppress)),1)));
+
+      /* gain_floor = sqrt [ (noise*noise_floor + echo*echo_floor) / (noise+echo) ] */
+      for (i=0;i<len;i++)
+         gain_floor[i] = MULT16_16_Q15(echo_gain,
+                                       spx_sqrt(SHL32(EXTEND32(DIV32_16_Q15(MULT16_32_Q15(gain_ratio,PSHR32(noise[i],NOISE_SHIFT)) + echo[i],
+                                             (1+PSHR32(noise[i],NOISE_SHIFT) + echo[i]) )),15)));
+   }
+}
+
+#else
+/* This function approximates the gain function 
+   y = gamma(1.25)^2 * M(-.25;1;-x) / sqrt(x)  
+   which multiplied by xi/(1+xi) is the optimal gain
+   in the loudness domain ( sqrt[amplitude] )
+*/
+static inline spx_word32_t hypergeom_gain(spx_word32_t xx)
+{
+   int ind;
+   float integer, frac;
+   float x;
+   static const float table[21] = {
+      0.82157f, 1.02017f, 1.20461f, 1.37534f, 1.53363f, 1.68092f, 1.81865f,
+      1.94811f, 2.07038f, 2.18638f, 2.29688f, 2.40255f, 2.50391f, 2.60144f,
+      2.69551f, 2.78647f, 2.87458f, 2.96015f, 3.04333f, 3.12431f, 3.20326f};
+      x = EXPIN_SCALING_1*xx;
+      integer = floor(2*x);
+      ind = (int)integer;
+      if (ind<0)
+         return FRAC_SCALING;
+      if (ind>19)
+         return FRAC_SCALING*(1+.1296/x);
+      frac = 2*x-integer;
+      return FRAC_SCALING*((1-frac)*table[ind] + frac*table[ind+1])/sqrt(x+.0001f);
+}
+
+static inline spx_word16_t qcurve(spx_word16_t x)
+{
+   return 1.f/(1.f+.15f/(SNR_SCALING_1*x));
+}
+
+static void compute_gain_floor(int noise_suppress, int effective_echo_suppress, spx_word32_t *noise, spx_word32_t *echo, spx_word16_t *gain_floor, int len)
+{
+   int i;
+   float echo_floor;
+   float noise_floor;
+
+   noise_floor = exp(.2302585f*noise_suppress);
+   echo_floor = exp(.2302585f*effective_echo_suppress);
+
+   /* Compute the gain floor based on different floors for the background noise and residual echo */
+   for (i=0;i<len;i++)
+      gain_floor[i] = FRAC_SCALING*sqrt(noise_floor*PSHR32(noise[i],NOISE_SHIFT) + echo_floor*echo[i])/sqrt(1+PSHR32(noise[i],NOISE_SHIFT) + echo[i]);
+}
+
+#endif
+SpeexPreprocessState *speex_preprocess_state_init(int frame_size, int sampling_rate)
+{
+   int i;
+   int N, N3, N4, M;
+
+   SpeexPreprocessState *st = (SpeexPreprocessState *)speex_alloc(sizeof(SpeexPreprocessState));
+   st->frame_size = frame_size;
+
+   /* Round ps_size down to the nearest power of two */
+#if 0
+   i=1;
+   st->ps_size = st->frame_size;
+   while(1)
+   {
+      if (st->ps_size & ~i)
+      {
+         st->ps_size &= ~i;
+         i<<=1;
+      } else {
+         break;
+      }
+   }
+   
+   
+   if (st->ps_size < 3*st->frame_size/4)
+      st->ps_size = st->ps_size * 3 / 2;
+#else
+   st->ps_size = st->frame_size;
+#endif
+
+   N = st->ps_size;
+   N3 = 2*N - st->frame_size;
+   N4 = st->frame_size - N3;
+   
+   st->sampling_rate = sampling_rate;
+   st->denoise_enabled = 1;
+   st->agc_enabled = 0;
+   st->agc_level = 8000;
+   st->vad_enabled = 0;
+   st->dereverb_enabled = 0;
+   st->reverb_decay = 0;
+   st->reverb_level = 0;
+   st->noise_suppress = NOISE_SUPPRESS_DEFAULT;
+   st->echo_suppress = ECHO_SUPPRESS_DEFAULT;
+   st->echo_suppress_active = ECHO_SUPPRESS_ACTIVE_DEFAULT;
+
+   st->speech_prob_start = SPEECH_PROB_START_DEFAULT;
+   st->speech_prob_continue = SPEECH_PROB_CONTINUE_DEFAULT;
+
+   st->echo_state = NULL;
+   
+   st->nbands = NB_BANDS;
+   M = st->nbands;
+   st->bank = filterbank_new(M, sampling_rate, N, 1);
+   
+   st->frame = (spx_word16_t*)speex_alloc(2*N*sizeof(spx_word16_t));
+   st->window = (spx_word16_t*)speex_alloc(2*N*sizeof(spx_word16_t));
+   st->ft = (spx_word16_t*)speex_alloc(2*N*sizeof(spx_word16_t));
+   
+   st->ps = (spx_word32_t*)speex_alloc((N+M)*sizeof(spx_word32_t));
+   st->noise = (spx_word32_t*)speex_alloc((N+M)*sizeof(spx_word32_t));
+   st->echo_noise = (spx_word32_t*)speex_alloc((N+M)*sizeof(spx_word32_t));
+   st->residual_echo = (spx_word32_t*)speex_alloc((N+M)*sizeof(spx_word32_t));
+   st->reverb_estimate = (spx_word32_t*)speex_alloc((N+M)*sizeof(spx_word32_t));
+   st->old_ps = (spx_word32_t*)speex_alloc((N+M)*sizeof(spx_word32_t));
+   st->prior = (spx_word16_t*)speex_alloc((N+M)*sizeof(spx_word16_t));
+   st->post = (spx_word16_t*)speex_alloc((N+M)*sizeof(spx_word16_t));
+   st->gain = (spx_word16_t*)speex_alloc((N+M)*sizeof(spx_word16_t));
+   st->gain2 = (spx_word16_t*)speex_alloc((N+M)*sizeof(spx_word16_t));
+   st->gain_floor = (spx_word16_t*)speex_alloc((N+M)*sizeof(spx_word16_t));
+   st->zeta = (spx_word16_t*)speex_alloc((N+M)*sizeof(spx_word16_t));
+   
+   st->S = (spx_word32_t*)speex_alloc(N*sizeof(spx_word32_t));
+   st->Smin = (spx_word32_t*)speex_alloc(N*sizeof(spx_word32_t));
+   st->Stmp = (spx_word32_t*)speex_alloc(N*sizeof(spx_word32_t));
+   st->update_prob = (int*)speex_alloc(N*sizeof(int));
+   
+   st->inbuf = (spx_word16_t*)speex_alloc(N3*sizeof(spx_word16_t));
+   st->outbuf = (spx_word16_t*)speex_alloc(N3*sizeof(spx_word16_t));
+
+   conj_window(st->window, 2*N3);
+   for (i=2*N3;i<2*st->ps_size;i++)
+      st->window[i]=Q15_ONE;
+   
+   if (N4>0)
+   {
+      for (i=N3-1;i>=0;i--)
+      {
+         st->window[i+N3+N4]=st->window[i+N3];
+         st->window[i+N3]=1;
+      }
+   }
+   for (i=0;i<N+M;i++)
+   {
+      st->noise[i]=QCONST32(1.f,NOISE_SHIFT);
+      st->reverb_estimate[i]=0;
+      st->old_ps[i]=1;
+      st->gain[i]=Q15_ONE;
+      st->post[i]=SHL16(1, SNR_SHIFT);
+      st->prior[i]=SHL16(1, SNR_SHIFT);
+   }
+
+   for (i=0;i<N;i++)
+      st->update_prob[i] = 1;
+   for (i=0;i<N3;i++)
+   {
+      st->inbuf[i]=0;
+      st->outbuf[i]=0;
+   }
+#ifndef FIXED_POINT
+   st->loudness_weight = (float*)speex_alloc(N*sizeof(float));
+   for (i=0;i<N;i++)
+   {
+      float ff=((float)i)*.5*sampling_rate/((float)N);
+      st->loudness_weight[i] = .35f-.35f*ff/16000.f+.73f*exp(-.5f*(ff-3800)*(ff-3800)/9e5f);
+      if (st->loudness_weight[i]<.01f)
+         st->loudness_weight[i]=.01f;
+      st->loudness_weight[i] *= st->loudness_weight[i];
+   }
+   st->loudness = pow(6000,LOUDNESS_EXP);
+   st->loudness2 = 6000;
+   st->nb_loudness_adapt = 0;
+#endif
+   st->was_speech = 0;
+
+   st->fft_lookup = spx_fft_init(2*N);
+
+   st->nb_adapt=0;
+   st->min_count=0;
+   return st;
+}
+
+void speex_preprocess_state_destroy(SpeexPreprocessState *st)
+{
+   speex_free(st->frame);
+   speex_free(st->ft);
+   speex_free(st->ps);
+   speex_free(st->gain2);
+   speex_free(st->gain_floor);
+   speex_free(st->window);
+   speex_free(st->noise);
+   speex_free(st->reverb_estimate);
+   speex_free(st->old_ps);
+   speex_free(st->gain);
+   speex_free(st->prior);
+   speex_free(st->post);
+#ifndef FIXED_POINT
+   speex_free(st->loudness_weight);
+#endif
+   speex_free(st->echo_noise);
+   speex_free(st->residual_echo);
+
+   speex_free(st->S);
+   speex_free(st->Smin);
+   speex_free(st->Stmp);
+   speex_free(st->update_prob);
+   speex_free(st->zeta);
+
+   speex_free(st->inbuf);
+   speex_free(st->outbuf);
+
+   spx_fft_destroy(st->fft_lookup);
+   filterbank_destroy(st->bank);
+   speex_free(st);
+}
+
+/* FIXME: The AGC doesn't work yet with fixed-point*/
+#ifndef FIXED_POINT
+static void speex_compute_agc(SpeexPreprocessState *st)
+{
+   int i;
+   int N = st->ps_size;
+   float scale=.5f/N;
+   float agc_gain;
+   int freq_start, freq_end;
+   float active_bands = 0;
+
+   freq_start = (int)(300.0f*2*N/st->sampling_rate);
+   freq_end   = (int)(2000.0f*2*N/st->sampling_rate);
+   for (i=freq_start;i<freq_end;i++)
+   {
+      if (st->S[i] > 20.f*st->Smin[i]+1000.f)
+         active_bands+=1;
+   }
+   active_bands /= (freq_end-freq_start+1);
+
+   if (active_bands > .2f)
+   {
+      float loudness=0.f;
+      float rate, rate2=.2f;
+      st->nb_loudness_adapt++;
+      rate=2.0f/(1+st->nb_loudness_adapt);
+      if (rate < .05f)
+         rate = .05f;
+      if (rate < .1f && pow(loudness, LOUDNESS_EXP) > st->loudness)
+         rate = .1f;
+      if (rate < .2f && pow(loudness, LOUDNESS_EXP) > 3.f*st->loudness)
+         rate = .2f;
+      if (rate < .4f && pow(loudness, LOUDNESS_EXP) > 10.f*st->loudness)
+         rate = .4f;
+
+      for (i=2;i<N;i++)
+      {
+         loudness += scale*st->ps[i] * FRAC_SCALING_1*FRAC_SCALING_1*st->gain2[i] * st->gain2[i] * st->loudness_weight[i];
+      }
+      loudness=sqrt(loudness);
+      /*if (loudness < 2*pow(st->loudness, 1.0/LOUDNESS_EXP) &&
+        loudness*2 > pow(st->loudness, 1.0/LOUDNESS_EXP))*/
+      st->loudness = (1-rate)*st->loudness + (rate)*pow(loudness, LOUDNESS_EXP);
+      
+      st->loudness2 = (1-rate2)*st->loudness2 + rate2*pow(st->loudness, 1.0f/LOUDNESS_EXP);
+
+      loudness = pow(st->loudness, 1.0f/LOUDNESS_EXP);
+
+      /*fprintf (stderr, "%f %f %f\n", loudness, st->loudness2, rate);*/
+   }
+   
+   agc_gain = st->agc_level/st->loudness2;
+   /*fprintf (stderr, "%f %f %f %f\n", active_bands, st->loudness, st->loudness2, agc_gain);*/
+   if (agc_gain>200)
+      agc_gain = 200;
+
+   for (i=0;i<N;i++)
+      st->gain2[i] *= agc_gain;
+   
+}
+#endif
+
+static void preprocess_analysis(SpeexPreprocessState *st, spx_int16_t *x)
+{
+   int i;
+   int N = st->ps_size;
+   int N3 = 2*N - st->frame_size;
+   int N4 = st->frame_size - N3;
+   spx_word32_t *ps=st->ps;
+
+   /* 'Build' input frame */
+   for (i=0;i<N3;i++)
+      st->frame[i]=st->inbuf[i];
+   for (i=0;i<st->frame_size;i++)
+      st->frame[N3+i]=x[i];
+   
+   /* Update inbuf */
+   for (i=0;i<N3;i++)
+      st->inbuf[i]=x[N4+i];
+
+   /* Windowing */
+   for (i=0;i<2*N;i++)
+      st->frame[i] = MULT16_16_Q15(st->frame[i], st->window[i]);
+
+#ifdef FIXED_POINT
+   {
+      spx_word16_t max_val=0;
+      for (i=0;i<2*N;i++)
+         max_val = MAX16(max_val, ABS16(st->frame[i]));
+      st->frame_shift = 14-spx_ilog2(EXTEND32(max_val));
+      for (i=0;i<2*N;i++)
+         st->frame[i] = SHL16(st->frame[i], st->frame_shift);
+   }
+#endif
+   
+   /* Perform FFT */
+   spx_fft(st->fft_lookup, st->frame, st->ft);
+         
+   /* Power spectrum */
+   ps[0]=MULT16_16(st->ft[0],st->ft[0]);
+   for (i=1;i<N;i++)
+      ps[i]=MULT16_16(st->ft[2*i-1],st->ft[2*i-1]) + MULT16_16(st->ft[2*i],st->ft[2*i]);
+   for (i=0;i<N;i++)
+      st->ps[i] = PSHR32(st->ps[i], 2*st->frame_shift);
+
+   filterbank_compute_bank32(st->bank, ps, ps+N);
+}
+
+static void update_noise_prob(SpeexPreprocessState *st)
+{
+   int i;
+   int min_range;
+   int N = st->ps_size;
+
+   for (i=1;i<N-1;i++)
+      st->S[i] =  MULT16_32_Q15(QCONST16(.8f,15),st->S[i]) + MULT16_32_Q15(QCONST16(.05f,15),st->ps[i-1]) 
+                      + MULT16_32_Q15(QCONST16(.1f,15),st->ps[i]) + MULT16_32_Q15(QCONST16(.05f,15),st->ps[i+1]);
+   st->S[0] =  MULT16_32_Q15(QCONST16(.8f,15),st->S[0]) + MULT16_32_Q15(QCONST16(.2f,15),st->ps[0]);
+   st->S[N-1] =  MULT16_32_Q15(QCONST16(.8f,15),st->S[N-1]) + MULT16_32_Q15(QCONST16(.2f,15),st->ps[N-1]);
+   
+   if (st->nb_adapt==1)
+   {
+      for (i=0;i<N;i++)
+         st->Smin[i] = st->Stmp[i] = 0;
+   }
+
+   if (st->nb_adapt < 100)
+      min_range = 15;
+   else if (st->nb_adapt < 1000)
+      min_range = 50;
+   else if (st->nb_adapt < 10000)
+      min_range = 150;
+   else
+      min_range = 300;
+   if (st->min_count > min_range)
+   {
+      st->min_count = 0;
+      for (i=0;i<N;i++)
+      {
+         st->Smin[i] = MIN32(st->Stmp[i], st->S[i]);
+         st->Stmp[i] = st->S[i];
+      }
+   } else {
+      for (i=0;i<N;i++)
+      {
+         st->Smin[i] = MIN32(st->Smin[i], st->S[i]);
+         st->Stmp[i] = MIN32(st->Stmp[i], st->S[i]);      
+      }
+   }
+   for (i=0;i<N;i++)
+   {
+      if (MULT16_32_Q15(QCONST16(.4f,15),st->S[i]) > ADD32(st->Smin[i],EXTEND32(20)))
+         st->update_prob[i] = 1;
+      else
+         st->update_prob[i] = 0;
+      /*fprintf (stderr, "%f ", st->S[i]/st->Smin[i]);*/
+      /*fprintf (stderr, "%f ", st->update_prob[i]);*/
+   }
+
+}
+
+#define NOISE_OVERCOMPENS 1.
+
+void speex_echo_get_residual(SpeexEchoState *st, spx_word32_t *Yout, int len);
+
+int speex_preprocess(SpeexPreprocessState *st, spx_int16_t *x, spx_int32_t *echo)
+{
+   return speex_preprocess_run(st, x);
+}
+
+int speex_preprocess_run(SpeexPreprocessState *st, spx_int16_t *x)
+{
+   int i;
+   int M;
+   int N = st->ps_size;
+   int N3 = 2*N - st->frame_size;
+   int N4 = st->frame_size - N3;
+   spx_word32_t *ps=st->ps;
+   spx_word32_t Zframe;
+   spx_word16_t Pframe;
+   spx_word16_t beta, beta_1;
+   spx_word16_t effective_echo_suppress;
+   
+   st->nb_adapt++;
+   st->min_count++;
+   
+   beta = MAX16(QCONST16(.03,15),DIV32_16(Q15_ONE,st->nb_adapt));
+   beta_1 = Q15_ONE-beta;
+   M = st->nbands;
+   /* Deal with residual echo if provided */
+   if (st->echo_state)
+   {
+      speex_echo_get_residual(st->echo_state, st->residual_echo, N);
+#ifndef FIXED_POINT
+      /* If there are NaNs or ridiculous values, it'll show up in the DC and we just reset everything to zero */
+      if (!(st->residual_echo[0] >=0 && st->residual_echo[0]<N*1e9f))
+      {
+         for (i=0;i<N;i++)
+            st->residual_echo[i] = 0;
+      }
+#endif
+      for (i=0;i<N;i++)
+         st->echo_noise[i] = MAX32(MULT16_32_Q15(QCONST16(.6f,15),st->echo_noise[i]), st->residual_echo[i]);
+      filterbank_compute_bank32(st->bank, st->echo_noise, st->echo_noise+N);
+   } else {
+      for (i=0;i<N+M;i++)
+         st->echo_noise[i] = 0;
+   }
+   preprocess_analysis(st, x);
+
+   update_noise_prob(st);
+
+   /* Noise estimation always updated for the 10 first frames */
+   /*if (st->nb_adapt<10)
+   {
+      for (i=1;i<N-1;i++)
+         st->update_prob[i] = 0;
+   }
+   */
+   
+   /* Update the noise estimate for the frequencies where it can be */
+   for (i=0;i<N;i++)
+   {
+      if (!st->update_prob[i] || st->ps[i] < PSHR32(st->noise[i], NOISE_SHIFT))
+         st->noise[i] = MAX32(EXTEND32(0),MULT16_32_Q15(beta_1,st->noise[i]) + MULT16_32_Q15(beta,SHL32(st->ps[i],NOISE_SHIFT)));
+   }
+   filterbank_compute_bank32(st->bank, st->noise, st->noise+N);
+
+   /* Special case for first frame */
+   if (st->nb_adapt==1)
+      for (i=0;i<N+M;i++)
+         st->old_ps[i] = ps[i];
+
+   /* Compute a posteriori SNR */
+   for (i=0;i<N+M;i++)
+   {
+      spx_word16_t gamma;
+      
+      /* Total noise estimate including residual echo and reverberation */
+      spx_word32_t tot_noise = ADD32(ADD32(ADD32(EXTEND32(1), PSHR32(st->noise[i],NOISE_SHIFT)) , st->echo_noise[i]) , st->reverb_estimate[i]);
+      
+      /* A posteriori SNR = ps/noise - 1*/
+      st->post[i] = SUB16(DIV32_16_Q8(ps[i],tot_noise), QCONST16(1.f,SNR_SHIFT));
+      st->post[i]=MIN16(st->post[i], QCONST16(100.f,SNR_SHIFT));
+      
+      /* Computing update gamma = .1 + .9*(old/(old+noise))^2 */
+      gamma = QCONST16(.1f,15)+MULT16_16_Q15(QCONST16(.89f,15),SQR16_Q15(DIV32_16_Q15(st->old_ps[i],ADD32(st->old_ps[i],tot_noise))));
+      
+      /* A priori SNR update = gamma*max(0,post) + (1-gamma)*old/noise */
+      st->prior[i] = EXTRACT16(PSHR32(ADD32(MULT16_16(gamma,MAX16(0,st->post[i])), MULT16_16(Q15_ONE-gamma,DIV32_16_Q8(st->old_ps[i],tot_noise))), 15));
+      st->prior[i]=MIN16(st->prior[i], QCONST16(100.f,SNR_SHIFT));
+   }
+
+   /*print_vec(st->post, N+M, "");*/
+
+   /* Recursive average of the a priori SNR. A bit smoothed for the psd components */
+   st->zeta[0] = PSHR32(ADD32(MULT16_16(QCONST16(.7f,15),st->zeta[0]), MULT16_16(QCONST16(.3f,15),st->prior[0])),15);
+   for (i=1;i<N-1;i++)
+      st->zeta[i] = PSHR32(ADD32(ADD32(ADD32(MULT16_16(QCONST16(.7f,15),st->zeta[i]), MULT16_16(QCONST16(.15f,15),st->prior[i])),
+                           MULT16_16(QCONST16(.075f,15),st->prior[i-1])), MULT16_16(QCONST16(.075f,15),st->prior[i+1])),15);
+   for (i=N-1;i<N+M;i++)
+      st->zeta[i] = PSHR32(ADD32(MULT16_16(QCONST16(.7f,15),st->zeta[i]), MULT16_16(QCONST16(.3f,15),st->prior[i])),15);
+
+   /* Speech probability of presence for the entire frame is based on the average filterbank a priori SNR */
+   Zframe = 0;
+   for (i=N;i<N+M;i++)
+      Zframe = ADD32(Zframe, EXTEND32(st->zeta[i]));
+   Pframe = QCONST16(.1f,15)+MULT16_16_Q15(QCONST16(.899f,15),qcurve(DIV32_16(Zframe,st->nbands)));
+   
+   effective_echo_suppress = EXTRACT16(PSHR32(ADD32(MULT16_16(SUB16(Q15_ONE,Pframe), st->echo_suppress), MULT16_16(Pframe, st->echo_suppress_active)),15));
+   
+   compute_gain_floor(st->noise_suppress, effective_echo_suppress, st->noise+N, st->echo_noise+N, st->gain_floor+N, M);
+         
+   /* Compute Ephraim & Malah gain speech probability of presence for each critical band (Bark scale) 
+      Technically this is actually wrong because the EM gaim assumes a slightly different probability 
+      distribution */
+   for (i=N;i<N+M;i++)
+   {
+      /* See EM and Cohen papers*/
+      spx_word32_t theta;
+      /* Gain from hypergeometric function */
+      spx_word32_t MM;
+      /* Weiner filter gain */
+      spx_word16_t prior_ratio;
+      /* a priority probability of speech presence based on Bark sub-band alone */
+      spx_word16_t P1;
+      /* Speech absence a priori probability (considering sub-band and frame) */
+      spx_word16_t q;
+#ifdef FIXED_POINT
+      spx_word16_t tmp;
+#endif
+      
+      prior_ratio = PDIV32_16(SHL32(EXTEND32(st->prior[i]), 15), ADD16(st->prior[i], SHL32(1,SNR_SHIFT)));
+      theta = MULT16_32_P15(prior_ratio, QCONST32(1.f,EXPIN_SHIFT)+SHL32(EXTEND32(st->post[i]),EXPIN_SHIFT-SNR_SHIFT));
+
+      MM = hypergeom_gain(theta);
+      /* Gain with bound */
+      st->gain[i] = EXTRACT16(MIN32(Q15_ONE, MULT16_32_Q15(prior_ratio, MM)));
+      /* Save old Bark power spectrum */
+      st->old_ps[i] = MULT16_32_P15(QCONST16(.2f,15),st->old_ps[i]) + MULT16_32_P15(MULT16_16_P15(QCONST16(.8f,15),SQR16_Q15(st->gain[i])),ps[i]);
+
+      P1 = QCONST16(.199f,15)+MULT16_16_Q15(QCONST16(.8f,15),qcurve (st->zeta[i]));
+      q = Q15_ONE-MULT16_16_Q15(Pframe,P1);
+#ifdef FIXED_POINT
+      theta = MIN32(theta, EXTEND32(32767));
+/*Q8*/tmp = MULT16_16_Q15((SHL32(1,SNR_SHIFT)+st->prior[i]),EXTRACT16(MIN32(Q15ONE,SHR32(spx_exp(-EXTRACT16(theta)),1))));
+      tmp = MIN16(QCONST16(3.,SNR_SHIFT), tmp); /* Prevent overflows in the next line*/
+/*Q8*/tmp = PSHR(MULT16_16(PDIV32_16(SHL32(EXTEND32(q),8),(Q15_ONE-q)),tmp),8);
+      st->gain2[i]=DIV32_16(SHL(EXTEND32(32767),SNR_SHIFT), ADD16(256,tmp));
+#else
+      st->gain2[i]=1/(1.f + (q/(1.f-q))*(1+st->prior[i])*exp(-theta));
+#endif
+   }
+   /* Convert the EM gains and speech prob to linear frequency */
+   filterbank_compute_psd16(st->bank,st->gain2+N, st->gain2);
+   filterbank_compute_psd16(st->bank,st->gain+N, st->gain);
+   
+   /* Use 1 for linear gain resolution (best) or 0 for Bark gain resolution (faster) */
+   if (1)
+   {
+      filterbank_compute_psd16(st->bank,st->gain_floor+N, st->gain_floor);
+   
+      /* Compute gain according to the Ephraim-Malah algorithm -- linear frequency */
+      for (i=0;i<N;i++)
+      {
+         spx_word32_t MM;
+         spx_word32_t theta;
+         spx_word16_t prior_ratio;
+         spx_word16_t tmp;
+         spx_word16_t p;
+         spx_word16_t g;
+         
+         /* Wiener filter gain */
+         prior_ratio = PDIV32_16(SHL32(EXTEND32(st->prior[i]), 15), ADD16(st->prior[i], SHL32(1,SNR_SHIFT)));
+         theta = MULT16_32_P15(prior_ratio, QCONST32(1.f,EXPIN_SHIFT)+SHL32(EXTEND32(st->post[i]),EXPIN_SHIFT-SNR_SHIFT));
+
+         /* Optimal estimator for loudness domain */
+         MM = hypergeom_gain(theta);
+         /* EM gain with bound */
+         g = EXTRACT16(MIN32(Q15_ONE, MULT16_32_Q15(prior_ratio, MM)));
+         /* Interpolated speech probability of presence */
+         p = st->gain2[i];
+                  
+         /* Constrain the gain to be close to the Bark scale gain */
+         if (MULT16_16_Q15(QCONST16(.333f,15),g) > st->gain[i])
+            g = MULT16_16(3,st->gain[i]);
+         st->gain[i] = g;
+         
+         /* Save old power spectrum */
+         st->old_ps[i] = MULT16_32_P15(QCONST16(.2f,15),st->old_ps[i]) + MULT16_32_P15(MULT16_16_P15(QCONST16(.8f,15),SQR16_Q15(st->gain[i])),ps[i]);
+         
+         /* Apply gain floor */
+         if (st->gain[i] < st->gain_floor[i])
+            st->gain[i] = st->gain_floor[i];
+
+         /* Exponential decay model for reverberation (unused) */
+         /*st->reverb_estimate[i] = st->reverb_decay*st->reverb_estimate[i] + st->reverb_decay*st->reverb_level*st->gain[i]*st->gain[i]*st->ps[i];*/
+         
+         /* Take into account speech probability of presence (loudness domain MMSE estimator) */
+         /* gain2 = [p*sqrt(gain)+(1-p)*sqrt(gain _floor) ]^2 */
+         tmp = MULT16_16_P15(p,spx_sqrt(SHL32(EXTEND32(st->gain[i]),15))) + MULT16_16_P15(SUB16(Q15_ONE,p),spx_sqrt(SHL32(EXTEND32(st->gain_floor[i]),15)));
+         st->gain2[i]=SQR16_Q15(tmp);
+
+         /* Use this if you want a log-domain MMSE estimator instead */
+         /*st->gain2[i] = pow(st->gain[i], p) * pow(st->gain_floor[i],1.f-p);*/
+      }
+   } else {
+      for (i=N;i<N+M;i++)
+      {
+         spx_word16_t tmp;
+         spx_word16_t p = st->gain2[i];
+         st->gain[i] = MAX16(st->gain[i], st->gain_floor[i]);         
+         tmp = MULT16_16_P15(p,spx_sqrt(SHL32(EXTEND32(st->gain[i]),15))) + MULT16_16_P15(SUB16(Q15_ONE,p),spx_sqrt(SHL32(EXTEND32(st->gain_floor[i]),15)));
+         st->gain2[i]=SQR16_Q15(tmp);
+      }
+      filterbank_compute_psd16(st->bank,st->gain2+N, st->gain2);
+   }
+   
+   /* If noise suppression is off, don't apply the gain (but then why call this in the first place!) */
+   if (!st->denoise_enabled)
+   {
+      for (i=0;i<N+M;i++)
+         st->gain2[i]=Q15_ONE;
+   }
+   
+   /*FIXME: This *will* not work for fixed-point */
+#ifndef FIXED_POINT
+   if (st->agc_enabled)
+      speex_compute_agc(st);
+#endif
+   
+   /* Apply computed gain */
+   for (i=1;i<N;i++)
+   {
+      st->ft[2*i-1] = MULT16_16_P15(st->gain2[i],st->ft[2*i-1]);
+      st->ft[2*i] = MULT16_16_P15(st->gain2[i],st->ft[2*i]);
+   }
+   st->ft[0] = MULT16_16_P15(st->gain2[0],st->ft[0]);
+   st->ft[2*N-1] = MULT16_16_P15(st->gain2[N-1],st->ft[2*N-1]);
+   
+   /* Inverse FFT with 1/N scaling */
+   spx_ifft(st->fft_lookup, st->ft, st->frame);
+   /* Scale back to original (lower) amplitude */
+   for (i=0;i<2*N;i++)
+      st->frame[i] = PSHR16(st->frame[i], st->frame_shift);
+
+   /*FIXME: This *will* not work for fixed-point */
+#ifndef FIXED_POINT
+   if (st->agc_enabled)
+   {
+      float max_sample=0;
+      for (i=0;i<2*N;i++)
+         if (fabs(st->frame[i])>max_sample)
+            max_sample = fabs(st->frame[i]);
+      if (max_sample>28000.f)
+      {
+         float damp = 28000.f/max_sample;
+         for (i=0;i<2*N;i++)
+            st->frame[i] *= damp;
+      }
+   }
+#endif
+   
+   /* Synthesis window (for WOLA) */
+   for (i=0;i<2*N;i++)
+      st->frame[i] = MULT16_16_Q15(st->frame[i], st->window[i]);
+
+   /* Perform overlap and add */
+   for (i=0;i<N3;i++)
+      x[i] = st->outbuf[i] + st->frame[i];
+   for (i=0;i<N4;i++)
+      x[N3+i] = st->frame[N3+i];
+   
+   /* Update outbuf */
+   for (i=0;i<N3;i++)
+      st->outbuf[i] = st->frame[st->frame_size+i];
+
+   /* FIXME: This VAD is a kludge */
+   if (st->vad_enabled)
+   {
+      if (Pframe > st->speech_prob_start || (st->was_speech && Pframe > st->speech_prob_continue))
+      {
+         st->was_speech=1;
+         return 1;
+      } else
+      {
+         st->was_speech=0;
+         return 0;
+      }
+   } else {
+      return 1;
+   }
+}
+
+void speex_preprocess_estimate_update(SpeexPreprocessState *st, spx_int16_t *x)
+{
+   int i;
+   int N = st->ps_size;
+   int N3 = 2*N - st->frame_size;
+   int M;
+   spx_word32_t *ps=st->ps;
+
+   M = st->nbands;
+   st->min_count++;
+   
+   preprocess_analysis(st, x);
+
+   update_noise_prob(st);
+   
+   for (i=1;i<N-1;i++)
+   {
+      if (!st->update_prob[i] || st->ps[i] < PSHR32(st->noise[i],NOISE_SHIFT))
+      {
+         st->noise[i] = MULT16_32_Q15(QCONST16(.95f,15),st->noise[i]) + MULT16_32_Q15(QCONST16(.05f,15),SHL32(st->ps[i],NOISE_SHIFT));
+      }
+   }
+
+   for (i=0;i<N3;i++)
+      st->outbuf[i] = MULT16_16_Q15(x[st->frame_size-N3+i],st->window[st->frame_size+i]);
+
+   /* Save old power spectrum */
+   for (i=0;i<N+M;i++)
+      st->old_ps[i] = ps[i];
+
+   for (i=0;i<N;i++)
+      st->reverb_estimate[i] = MULT16_32_Q15(st->reverb_decay, st->reverb_estimate[i]);
+}
+
+
+int speex_preprocess_ctl(SpeexPreprocessState *state, int request, void *ptr)
+{
+   int i;
+   SpeexPreprocessState *st;
+   st=(SpeexPreprocessState*)state;
+   switch(request)
+   {
+   case SPEEX_PREPROCESS_SET_DENOISE:
+      st->denoise_enabled = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_PREPROCESS_GET_DENOISE:
+      (*(spx_int32_t*)ptr) = st->denoise_enabled;
+      break;
+#ifndef FIXED_POINT
+   case SPEEX_PREPROCESS_SET_AGC:
+      st->agc_enabled = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_PREPROCESS_GET_AGC:
+      (*(spx_int32_t*)ptr) = st->agc_enabled;
+      break;
+
+   case SPEEX_PREPROCESS_SET_AGC_LEVEL:
+      st->agc_level = (*(float*)ptr);
+      if (st->agc_level<1)
+         st->agc_level=1;
+      if (st->agc_level>32768)
+         st->agc_level=32768;
+      break;
+   case SPEEX_PREPROCESS_GET_AGC_LEVEL:
+      (*(float*)ptr) = st->agc_level;
+      break;
+#endif
+   case SPEEX_PREPROCESS_SET_VAD:
+      speex_warning("The VAD has been replaced by a hack pending a complete rewrite");
+      st->vad_enabled = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_PREPROCESS_GET_VAD:
+      (*(spx_int32_t*)ptr) = st->vad_enabled;
+      break;
+   
+   case SPEEX_PREPROCESS_SET_DEREVERB:
+      st->dereverb_enabled = (*(spx_int32_t*)ptr);
+      for (i=0;i<st->ps_size;i++)
+         st->reverb_estimate[i]=0;
+      break;
+   case SPEEX_PREPROCESS_GET_DEREVERB:
+      (*(spx_int32_t*)ptr) = st->dereverb_enabled;
+      break;
+
+   case SPEEX_PREPROCESS_SET_DEREVERB_LEVEL:
+      st->reverb_level = (*(float*)ptr);
+      break;
+   case SPEEX_PREPROCESS_GET_DEREVERB_LEVEL:
+      (*(float*)ptr) = st->reverb_level;
+      break;
+   
+   case SPEEX_PREPROCESS_SET_DEREVERB_DECAY:
+      st->reverb_decay = (*(float*)ptr);
+      break;
+   case SPEEX_PREPROCESS_GET_DEREVERB_DECAY:
+      (*(float*)ptr) = st->reverb_decay;
+      break;
+
+   case SPEEX_PREPROCESS_SET_PROB_START:
+      *(spx_int32_t*)ptr = MIN32(Q15_ONE,MAX32(0, *(spx_int32_t*)ptr));
+      st->speech_prob_start = DIV32_16(MULT16_16(32767,*(spx_int32_t*)ptr), 100);
+      break;
+   case SPEEX_PREPROCESS_GET_PROB_START:
+      (*(spx_int32_t*)ptr) = MULT16_16_Q15(st->speech_prob_start, 100);
+      break;
+
+   case SPEEX_PREPROCESS_SET_PROB_CONTINUE:
+      *(spx_int32_t*)ptr = MIN32(Q15_ONE,MAX32(0, *(spx_int32_t*)ptr));
+      st->speech_prob_continue = DIV32_16(MULT16_16(32767,*(spx_int32_t*)ptr), 100);
+      break;
+   case SPEEX_PREPROCESS_GET_PROB_CONTINUE:
+      (*(spx_int32_t*)ptr) = MULT16_16_Q15(st->speech_prob_continue, 100);
+      break;
+
+   case SPEEX_PREPROCESS_SET_NOISE_SUPPRESS:
+      st->noise_suppress = -ABS(*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_PREPROCESS_GET_NOISE_SUPPRESS:
+      (*(spx_int32_t*)ptr) = st->noise_suppress;
+      break;
+   case SPEEX_PREPROCESS_SET_ECHO_SUPPRESS:
+      st->echo_suppress = -ABS(*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_PREPROCESS_GET_ECHO_SUPPRESS:
+      (*(spx_int32_t*)ptr) = st->echo_suppress;
+      break;
+   case SPEEX_PREPROCESS_SET_ECHO_SUPPRESS_ACTIVE:
+      st->echo_suppress_active = -ABS(*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_PREPROCESS_GET_ECHO_SUPPRESS_ACTIVE:
+      (*(spx_int32_t*)ptr) = st->echo_suppress_active;
+      break;
+   case SPEEX_PREPROCESS_SET_ECHO_STATE:
+      st->echo_state = (SpeexEchoState*)ptr;
+      break;
+   case SPEEX_PREPROCESS_GET_ECHO_STATE:
+      ptr = (void*)st->echo_state;
+      break;
+
+   default:
+      speex_warning_int("Unknown speex_preprocess_ctl request: ", request);
+      return -1;
+   }
+   return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/pseudofloat.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/pseudofloat.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/pseudofloat.h	(revision 1163)
@@ -0,0 +1,369 @@
+/* Copyright (C) 2005 Jean-Marc Valin */
+/**
+   @file pseudofloat.h
+   @brief Pseudo-floating point
+ */
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef PSEUDOFLOAT_H
+#define PSEUDOFLOAT_H
+
+#include "misc.h"
+#include "math_approx.h"
+#include <math.h>
+
+#ifdef FIXED_POINT
+
+typedef struct {
+   spx_int16_t m;
+   spx_int16_t e;
+} spx_float_t;
+
+static const spx_float_t FLOAT_ZERO = {0,0};
+static const spx_float_t FLOAT_ONE = {16384,-14};
+static const spx_float_t FLOAT_HALF = {16384,-15};
+
+#define MIN(a,b) ((a)<(b)?(a):(b))
+static inline spx_float_t PSEUDOFLOAT(spx_int32_t x)
+{
+   int e=0;
+   int sign=0;
+   if (x<0)
+   {
+      sign = 1;
+      x = -x;
+   }
+   if (x==0)
+   {
+      spx_float_t r = {0,0};
+      return r;
+   }
+   e = spx_ilog2(ABS32(x))-14;
+   x = VSHR32(x, e);
+   if (sign)
+   {
+      spx_float_t r;
+      r.m = -x;
+      r.e = e;
+      return r;
+   }
+   else      
+   {
+      spx_float_t r;
+      r.m = x;
+      r.e = e;
+      return r;
+   }
+}
+
+
+static inline spx_float_t FLOAT_ADD(spx_float_t a, spx_float_t b)
+{
+   spx_float_t r;
+   if (a.m==0)
+      return b;
+   else if (b.m==0)
+      return a;
+   if ((a).e > (b).e) 
+   {
+      r.m = ((a).m>>1) + ((b).m>>MIN(15,(a).e-(b).e+1));
+      r.e = (a).e+1;
+   }
+   else 
+   {
+      r.m = ((b).m>>1) + ((a).m>>MIN(15,(b).e-(a).e+1));
+      r.e = (b).e+1;
+   }
+   if (r.m>0)
+   {
+      if (r.m<16384)
+      {
+         r.m<<=1;
+         r.e-=1;
+      }
+   } else {
+      if (r.m>-16384)
+      {
+         r.m<<=1;
+         r.e-=1;
+      }
+   }
+   /*printf ("%f + %f = %f\n", REALFLOAT(a), REALFLOAT(b), REALFLOAT(r));*/
+   return r;
+}
+
+static inline spx_float_t FLOAT_SUB(spx_float_t a, spx_float_t b)
+{
+   spx_float_t r;
+   if (a.m==0)
+      return b;
+   else if (b.m==0)
+      return a;
+   if ((a).e > (b).e)
+   {
+      r.m = ((a).m>>1) - ((b).m>>MIN(15,(a).e-(b).e+1));
+      r.e = (a).e+1;
+   }
+   else 
+   {
+      r.m = ((a).m>>MIN(15,(b).e-(a).e+1)) - ((b).m>>1);
+      r.e = (b).e+1;
+   }
+   if (r.m>0)
+   {
+      if (r.m<16384)
+      {
+         r.m<<=1;
+         r.e-=1;
+      }
+   } else {
+      if (r.m>-16384)
+      {
+         r.m<<=1;
+         r.e-=1;
+      }
+   }
+   /*printf ("%f + %f = %f\n", REALFLOAT(a), REALFLOAT(b), REALFLOAT(r));*/
+   return r;
+}
+
+static inline int FLOAT_LT(spx_float_t a, spx_float_t b)
+{
+   if (a.m==0)
+      return b.m>0;
+   else if (b.m==0)
+      return a.m<0;   
+   if ((a).e > (b).e)
+      return ((a).m>>1) < ((b).m>>MIN(15,(a).e-(b).e+1));
+   else 
+      return ((b).m>>1) > ((a).m>>MIN(15,(b).e-(a).e+1));
+
+}
+
+static inline int FLOAT_GT(spx_float_t a, spx_float_t b)
+{
+   return FLOAT_LT(b,a);
+}
+
+static inline spx_float_t FLOAT_MULT(spx_float_t a, spx_float_t b)
+{
+   spx_float_t r;
+   r.m = (spx_int16_t)((spx_int32_t)(a).m*(b).m>>15);
+   r.e = (a).e+(b).e+15;
+   if (r.m>0)
+   {
+      if (r.m<16384)
+      {
+         r.m<<=1;
+         r.e-=1;
+      }
+   } else {
+      if (r.m>-16384)
+      {
+         r.m<<=1;
+         r.e-=1;
+      }
+   }
+   /*printf ("%f * %f = %f\n", REALFLOAT(a), REALFLOAT(b), REALFLOAT(r));*/
+   return r;   
+}
+
+static inline spx_float_t FLOAT_AMULT(spx_float_t a, spx_float_t b)
+{
+   spx_float_t r;
+   r.m = (spx_int16_t)((spx_int32_t)(a).m*(b).m>>15);
+   r.e = (a).e+(b).e+15;
+   return r;   
+}
+
+
+static inline spx_float_t FLOAT_SHL(spx_float_t a, int b)
+{
+   spx_float_t r;
+   r.m = a.m;
+   r.e = a.e+b;
+   return r;
+}
+
+static inline spx_int16_t FLOAT_EXTRACT16(spx_float_t a)
+{
+   if (a.e<0)
+      return EXTRACT16((EXTEND32(a.m)+(EXTEND32(1)<<(-a.e-1)))>>-a.e);
+   else
+      return a.m<<a.e;
+}
+
+static inline spx_int32_t FLOAT_EXTRACT32(spx_float_t a)
+{
+   if (a.e<0)
+      return (EXTEND32(a.m)+(EXTEND32(1)<<(-a.e-1)))>>-a.e;
+   else
+      return EXTEND32(a.m)<<a.e;
+}
+
+static inline spx_int32_t FLOAT_MUL32(spx_float_t a, spx_word32_t b)
+{
+   return VSHR32(MULT16_32_Q15(a.m, b),-a.e-15);
+}
+
+static inline spx_float_t FLOAT_MUL32U(spx_word32_t a, spx_word32_t b)
+{
+   int e1, e2;
+   spx_float_t r;
+   if (a==0 || b==0)
+   {
+      return FLOAT_ZERO;
+   }
+   e1 = spx_ilog2(ABS32(a));
+   a = VSHR32(a, e1-14);
+   e2 = spx_ilog2(ABS32(b));
+   b = VSHR32(b, e2-14);
+   r.m = MULT16_16_Q15(a,b);
+   r.e = e1+e2-13;
+   return r;
+}
+
+/* Do NOT attempt to divide by a negative number */
+static inline spx_float_t FLOAT_DIV32_FLOAT(spx_word32_t a, spx_float_t b)
+{
+   int e=0;
+   spx_float_t r;
+   if (a==0)
+   {
+      return FLOAT_ZERO;
+   }
+   e = spx_ilog2(ABS32(a))-spx_ilog2(b.m-1)-15;
+   a = VSHR32(a, e);
+   if (ABS32(a)>=SHL32(EXTEND32(b.m-1),15))
+   {
+      a >>= 1;
+      e++;
+   }
+   r.m = DIV32_16(a,b.m);
+   r.e = e-b.e;
+   return r;
+}
+
+
+/* Do NOT attempt to divide by a negative number */
+static inline spx_float_t FLOAT_DIV32(spx_word32_t a, spx_word32_t b)
+{
+   int e0=0,e=0;
+   spx_float_t r;
+   if (a==0)
+   {
+      return FLOAT_ZERO;
+   }
+   if (b>32767)
+   {
+      e0 = spx_ilog2(b)-14;
+      b = VSHR32(b, e0);
+      e0 = -e0;
+   }
+   e = spx_ilog2(ABS32(a))-spx_ilog2(b-1)-15;
+   a = VSHR32(a, e);
+   if (ABS32(a)>=SHL32(EXTEND32(b-1),15))
+   {
+      a >>= 1;
+      e++;
+   }
+   e += e0;
+   r.m = DIV32_16(a,b);
+   r.e = e;
+   return r;
+}
+
+/* Do NOT attempt to divide by a negative number */
+static inline spx_float_t FLOAT_DIVU(spx_float_t a, spx_float_t b)
+{
+   int e=0;
+   spx_int32_t num;
+   spx_float_t r;
+   if (b.m<=0)
+   {
+      speex_warning_int("Attempted to divide by", b.m);
+      return FLOAT_ONE;
+   }
+   num = a.m;
+   a.m = ABS16(a.m);
+   while (a.m >= b.m)
+   {
+      e++;
+      a.m >>= 1;
+   }
+   num = num << (15-e);
+   r.m = DIV32_16(num,b.m);
+   r.e = a.e-b.e-15+e;
+   return r;
+}
+
+static inline spx_float_t FLOAT_SQRT(spx_float_t a)
+{
+   spx_float_t r;
+   spx_int32_t m;
+   m = SHL32(EXTEND32(a.m), 14);
+   r.e = a.e - 14;
+   if (r.e & 1)
+   {
+      r.e -= 1;
+      m <<= 1;
+   }
+   r.e >>= 1;
+   r.m = spx_sqrt(m);
+   return r;
+}
+
+#else
+
+#define spx_float_t float
+#define FLOAT_ZERO 0.f
+#define FLOAT_ONE 1.f
+#define FLOAT_HALF 0.5f
+#define PSEUDOFLOAT(x) (x)
+#define FLOAT_MULT(a,b) ((a)*(b))
+#define FLOAT_AMULT(a,b) ((a)*(b))
+#define FLOAT_MUL32(a,b) ((a)*(b))
+#define FLOAT_DIV32(a,b) ((a)/(b))
+#define FLOAT_EXTRACT16(a) (a)
+#define FLOAT_EXTRACT32(a) (a)
+#define FLOAT_ADD(a,b) ((a)+(b))
+#define FLOAT_SUB(a,b) ((a)-(b))
+#define REALFLOAT(x) (x)
+#define FLOAT_DIV32_FLOAT(a,b) ((a)/(b))
+#define FLOAT_MUL32U(a,b) ((a)*(b))
+#define FLOAT_SHL(a,b) (a)
+#define FLOAT_LT(a,b) ((a)<(b))
+#define FLOAT_GT(a,b) ((a)>(b))
+#define FLOAT_DIVU(a,b) ((a)/(b))
+#define FLOAT_SQRT(a) (spx_sqrt(a))
+
+#endif
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/quant_lsp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/quant_lsp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/quant_lsp.c	(revision 1163)
@@ -0,0 +1,447 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: quant_lsp.c
+   LSP vector quantization
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "quant_lsp.h"
+#include <math.h>
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+#include "misc.h"
+
+#ifdef BFIN_ASM
+#include "quant_lsp_bfin.h"
+#endif
+
+#ifdef FIXED_POINT
+
+#define LSP_LINEAR(i) (SHL16(i+1,11))
+#define LSP_LINEAR_HIGH(i) (ADD16(MULT16_16_16(i,2560),6144))
+#define LSP_DIV_256(x) (SHL16((spx_word16_t)x, 5))
+#define LSP_DIV_512(x) (SHL16((spx_word16_t)x, 4))
+#define LSP_DIV_1024(x) (SHL16((spx_word16_t)x, 3))
+#define LSP_PI 25736
+
+#else
+
+#define LSP_LINEAR(i) (.25*(i)+.25)
+#define LSP_LINEAR_HIGH(i) (.3125*(i)+.75)
+#define LSP_SCALE 256.
+#define LSP_DIV_256(x) (0.0039062*(x))
+#define LSP_DIV_512(x) (0.0019531*(x))
+#define LSP_DIV_1024(x) (0.00097656*(x))
+#define LSP_PI M_PI
+
+#endif
+
+static void compute_quant_weights(spx_lsp_t *qlsp, spx_word16_t *quant_weight, int order)
+{
+   int i;
+   spx_word16_t tmp1, tmp2;
+   for (i=0;i<order;i++)
+   {
+      if (i==0)
+         tmp1 = qlsp[i];
+      else
+         tmp1 = qlsp[i]-qlsp[i-1];
+      if (i==order-1)
+         tmp2 = LSP_PI-qlsp[i];
+      else
+         tmp2 = qlsp[i+1]-qlsp[i];
+      if (tmp2<tmp1)
+         tmp1 = tmp2;
+#ifdef FIXED_POINT
+      quant_weight[i] = DIV32_16(81920,ADD16(300,tmp1));
+#else
+      quant_weight[i] = 10/(.04+tmp1);
+#endif
+   }
+
+}
+
+/* Note: x is modified*/
+#ifndef OVERRIDE_LSP_QUANT
+static int lsp_quant(spx_word16_t *x, const signed char *cdbk, int nbVec, int nbDim)
+{
+   int i,j;
+   spx_word32_t dist;
+   spx_word16_t tmp;
+   spx_word32_t best_dist=VERY_LARGE32;
+   int best_id=0;
+   const signed char *ptr=cdbk;
+   for (i=0;i<nbVec;i++)
+   {
+      dist=0;
+      for (j=0;j<nbDim;j++)
+      {
+         tmp=SUB16(x[j],SHL16((spx_word16_t)*ptr++,5));
+         dist=MAC16_16(dist,tmp,tmp);
+      } 
+      if (dist<best_dist)
+      {
+         best_dist=dist;
+         best_id=i;
+      }
+   }
+
+   for (j=0;j<nbDim;j++)
+      x[j] = SUB16(x[j],SHL16((spx_word16_t)cdbk[best_id*nbDim+j],5));
+    
+   return best_id;
+}
+#endif
+
+/* Note: x is modified*/
+#ifndef OVERRIDE_LSP_WEIGHT_QUANT
+static int lsp_weight_quant(spx_word16_t *x, spx_word16_t *weight, const signed char *cdbk, int nbVec, int nbDim)
+{
+   int i,j;
+   spx_word32_t dist;
+   spx_word16_t tmp;
+   spx_word32_t best_dist=VERY_LARGE32;
+   int best_id=0;
+   const signed char *ptr=cdbk;
+   for (i=0;i<nbVec;i++)
+   {
+      dist=0;
+      for (j=0;j<nbDim;j++)
+      {
+         tmp=SUB16(x[j],SHL16((spx_word16_t)*ptr++,5));
+         dist=MAC16_32_Q15(dist,weight[j],MULT16_16(tmp,tmp));
+      }
+      if (dist<best_dist)
+      {
+         best_dist=dist;
+         best_id=i;
+      }
+   }
+   
+   for (j=0;j<nbDim;j++)
+      x[j] = SUB16(x[j],SHL16((spx_word16_t)cdbk[best_id*nbDim+j],5));
+   return best_id;
+}
+#endif
+
+void lsp_quant_nb(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits)
+{
+   int i;
+   int id;
+   spx_word16_t quant_weight[10];
+   
+   for (i=0;i<order;i++)
+      qlsp[i]=lsp[i];
+
+   compute_quant_weights(qlsp, quant_weight, order);
+
+   for (i=0;i<order;i++)
+      qlsp[i]=SUB16(qlsp[i],LSP_LINEAR(i));
+
+#ifndef FIXED_POINT
+   for (i=0;i<order;i++)
+      qlsp[i] = LSP_SCALE*qlsp[i];
+#endif
+   id = lsp_quant(qlsp, cdbk_nb, NB_CDBK_SIZE, order);
+   speex_bits_pack(bits, id, 6);
+
+   for (i=0;i<order;i++)
+      qlsp[i]*=2;
+ 
+   id = lsp_weight_quant(qlsp, quant_weight, cdbk_nb_low1, NB_CDBK_SIZE_LOW1, 5);
+   speex_bits_pack(bits, id, 6);
+
+   for (i=0;i<5;i++)
+      qlsp[i]*=2;
+
+   id = lsp_weight_quant(qlsp, quant_weight, cdbk_nb_low2, NB_CDBK_SIZE_LOW2, 5);
+   speex_bits_pack(bits, id, 6);
+
+   id = lsp_weight_quant(qlsp+5, quant_weight+5, cdbk_nb_high1, NB_CDBK_SIZE_HIGH1, 5);
+   speex_bits_pack(bits, id, 6);
+
+   for (i=5;i<10;i++)
+      qlsp[i]*=2;
+
+   id = lsp_weight_quant(qlsp+5, quant_weight+5, cdbk_nb_high2, NB_CDBK_SIZE_HIGH2, 5);
+   speex_bits_pack(bits, id, 6);
+
+#ifdef FIXED_POINT
+   for (i=0;i<order;i++)
+      qlsp[i]=PSHR16(qlsp[i],2);
+#else
+   for (i=0;i<order;i++)
+      qlsp[i]=qlsp[i] * .00097656;
+#endif
+
+   for (i=0;i<order;i++)
+      qlsp[i]=lsp[i]-qlsp[i];
+}
+
+void lsp_unquant_nb(spx_lsp_t *lsp, int order, SpeexBits *bits)
+{
+   int i, id;
+   for (i=0;i<order;i++)
+      lsp[i]=LSP_LINEAR(i);
+
+
+   id=speex_bits_unpack_unsigned(bits, 6);
+   for (i=0;i<10;i++)
+      lsp[i] = ADD32(lsp[i], LSP_DIV_256(cdbk_nb[id*10+i]));
+
+   id=speex_bits_unpack_unsigned(bits, 6);
+   for (i=0;i<5;i++)
+      lsp[i] = ADD16(lsp[i], LSP_DIV_512(cdbk_nb_low1[id*5+i]));
+
+   id=speex_bits_unpack_unsigned(bits, 6);
+   for (i=0;i<5;i++)
+      lsp[i] = ADD32(lsp[i], LSP_DIV_1024(cdbk_nb_low2[id*5+i]));
+
+   id=speex_bits_unpack_unsigned(bits, 6);
+   for (i=0;i<5;i++)
+      lsp[i+5] = ADD32(lsp[i+5], LSP_DIV_512(cdbk_nb_high1[id*5+i]));
+   
+   id=speex_bits_unpack_unsigned(bits, 6);
+   for (i=0;i<5;i++)
+      lsp[i+5] = ADD32(lsp[i+5], LSP_DIV_1024(cdbk_nb_high2[id*5+i]));
+}
+
+
+void lsp_quant_lbr(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits)
+{
+   int i;
+   int id;
+   spx_word16_t quant_weight[10];
+
+   for (i=0;i<order;i++)
+      qlsp[i]=lsp[i];
+
+   compute_quant_weights(qlsp, quant_weight, order);
+
+   for (i=0;i<order;i++)
+      qlsp[i]=SUB16(qlsp[i],LSP_LINEAR(i));
+#ifndef FIXED_POINT
+   for (i=0;i<order;i++)
+      qlsp[i]=qlsp[i]*LSP_SCALE;
+#endif
+   id = lsp_quant(qlsp, cdbk_nb, NB_CDBK_SIZE, order);
+   speex_bits_pack(bits, id, 6);
+   
+   for (i=0;i<order;i++)
+      qlsp[i]*=2;
+   
+   id = lsp_weight_quant(qlsp, quant_weight, cdbk_nb_low1, NB_CDBK_SIZE_LOW1, 5);
+   speex_bits_pack(bits, id, 6);
+
+   id = lsp_weight_quant(qlsp+5, quant_weight+5, cdbk_nb_high1, NB_CDBK_SIZE_HIGH1, 5);
+   speex_bits_pack(bits, id, 6);
+
+#ifdef FIXED_POINT
+   for (i=0;i<order;i++)
+      qlsp[i] = PSHR16(qlsp[i],1);
+#else
+   for (i=0;i<order;i++)
+      qlsp[i] = qlsp[i]*0.0019531;
+#endif
+
+   for (i=0;i<order;i++)
+      qlsp[i]=lsp[i]-qlsp[i];
+}
+
+void lsp_unquant_lbr(spx_lsp_t *lsp, int order, SpeexBits *bits)
+{
+   int i, id;
+   for (i=0;i<order;i++)
+      lsp[i]=LSP_LINEAR(i);
+
+
+   id=speex_bits_unpack_unsigned(bits, 6);
+   for (i=0;i<10;i++)
+      lsp[i] += LSP_DIV_256(cdbk_nb[id*10+i]);
+
+   id=speex_bits_unpack_unsigned(bits, 6);
+   for (i=0;i<5;i++)
+      lsp[i] += LSP_DIV_512(cdbk_nb_low1[id*5+i]);
+
+   id=speex_bits_unpack_unsigned(bits, 6);
+   for (i=0;i<5;i++)
+      lsp[i+5] += LSP_DIV_512(cdbk_nb_high1[id*5+i]);
+   
+}
+
+
+#ifdef DISABLE_WIDEBAND
+void lsp_quant_high(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits)
+{
+   speex_error("Wideband and Ultra-wideband are disabled");
+}
+void lsp_unquant_high(spx_lsp_t *lsp, int order, SpeexBits *bits)
+{
+   speex_error("Wideband and Ultra-wideband are disabled");
+}
+#else
+extern const signed char high_lsp_cdbk[];
+extern const signed char high_lsp_cdbk2[];
+
+
+void lsp_quant_high(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits)
+{
+   int i;
+   int id;
+   spx_word16_t quant_weight[10];
+
+   for (i=0;i<order;i++)
+      qlsp[i]=lsp[i];
+
+   compute_quant_weights(qlsp, quant_weight, order);
+
+   /*   quant_weight[0] = 10/(qlsp[1]-qlsp[0]);
+   quant_weight[order-1] = 10/(qlsp[order-1]-qlsp[order-2]);
+   for (i=1;i<order-1;i++)
+   {
+      tmp1 = 10/(qlsp[i]-qlsp[i-1]);
+      tmp2 = 10/(qlsp[i+1]-qlsp[i]);
+      quant_weight[i] = tmp1 > tmp2 ? tmp1 : tmp2;
+      }*/
+
+   for (i=0;i<order;i++)
+      qlsp[i]=SUB16(qlsp[i],LSP_LINEAR_HIGH(i));
+#ifndef FIXED_POINT
+   for (i=0;i<order;i++)
+      qlsp[i] = qlsp[i]*LSP_SCALE;
+#endif
+   id = lsp_quant(qlsp, high_lsp_cdbk, 64, order);
+   speex_bits_pack(bits, id, 6);
+
+   for (i=0;i<order;i++)
+      qlsp[i]*=2;
+
+   id = lsp_weight_quant(qlsp, quant_weight, high_lsp_cdbk2, 64, order);
+   speex_bits_pack(bits, id, 6);
+
+#ifdef FIXED_POINT
+   for (i=0;i<order;i++)
+      qlsp[i] = PSHR16(qlsp[i],1);
+#else
+   for (i=0;i<order;i++)
+      qlsp[i] = qlsp[i]*0.0019531;
+#endif
+
+   for (i=0;i<order;i++)
+      qlsp[i]=lsp[i]-qlsp[i];
+}
+
+void lsp_unquant_high(spx_lsp_t *lsp, int order, SpeexBits *bits)
+{
+
+   int i, id;
+   for (i=0;i<order;i++)
+      lsp[i]=LSP_LINEAR_HIGH(i);
+
+
+   id=speex_bits_unpack_unsigned(bits, 6);
+   for (i=0;i<order;i++)
+      lsp[i] += LSP_DIV_256(high_lsp_cdbk[id*order+i]);
+
+
+   id=speex_bits_unpack_unsigned(bits, 6);
+   for (i=0;i<order;i++)
+      lsp[i] += LSP_DIV_512(high_lsp_cdbk2[id*order+i]);
+}
+
+#endif
+
+
+#ifdef EPIC_48K
+
+extern const signed char cdbk_lsp_vlbr[5120];
+extern const signed char cdbk_lsp2_vlbr[160];
+
+void lsp_quant_48k(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits)
+{
+   int i;
+   int id;
+   spx_word16_t quant_weight[10];
+
+   for (i=0;i<order;i++)
+      qlsp[i]=lsp[i];
+
+   compute_quant_weights(qlsp, quant_weight, order);
+
+   for (i=0;i<order;i++)
+      qlsp[i]=SUB16(qlsp[i],LSP_SCALING*(.25*i+.3125));
+#ifndef FIXED_POINT
+   for (i=0;i<order;i++)
+      qlsp[i] = qlsp[i]*LSP_SCALE;
+#endif
+   
+   id = lsp_quant(qlsp, cdbk_lsp_vlbr, 512, order);
+   speex_bits_pack(bits, id, 9);
+
+   for (i=0;i<order;i++)
+      qlsp[i]*=4;
+   
+   id = lsp_weight_quant(qlsp, quant_weight, cdbk_lsp2_vlbr, 16, 10);
+   speex_bits_pack(bits, id, 4);
+
+#ifdef FIXED_POINT
+   for (i=0;i<order;i++)
+      qlsp[i]=PSHR(qlsp[i],2);
+#else
+   for (i=0;i<order;i++)
+      qlsp[i]=qlsp[i]*0.00097655;
+#endif
+
+   for (i=0;i<order;i++)
+      qlsp[i]=lsp[i]-qlsp[i];
+}
+
+void lsp_unquant_48k(spx_lsp_t *lsp, int order, SpeexBits *bits)
+{
+   int i, id;
+   for (i=0;i<order;i++)
+      lsp[i]=LSP_SCALING*(.25*i+.3125);
+
+
+   id=speex_bits_unpack_unsigned(bits, 9);
+   for (i=0;i<10;i++)
+      lsp[i] += LSP_SCALING*0.0039062*cdbk_lsp_vlbr[id*10+i];
+
+   id=speex_bits_unpack_unsigned(bits, 4);
+   for (i=0;i<10;i++)
+      lsp[i] += LSP_SCALING*0.00097655*cdbk_lsp2_vlbr[id*10+i];
+   
+}
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/quant_lsp.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/quant_lsp.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/quant_lsp.h	(revision 1163)
@@ -0,0 +1,83 @@
+/* Copyright (C) 2002 Jean-Marc Valin */
+/**
+   @file quant_lsp.h
+   @brief LSP vector quantization
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef QUANT_LSP_H
+#define QUANT_LSP_H
+
+#include <speex/speex_bits.h>
+#include "misc.h"
+
+#define MAX_LSP_SIZE 20
+
+#define NB_CDBK_SIZE 64
+#define NB_CDBK_SIZE_LOW1 64
+#define NB_CDBK_SIZE_LOW2 64
+#define NB_CDBK_SIZE_HIGH1 64
+#define NB_CDBK_SIZE_HIGH2 64
+
+/*Narrowband codebooks*/
+extern const signed char cdbk_nb[];
+extern const signed char cdbk_nb_low1[];
+extern const signed char cdbk_nb_low2[];
+extern const signed char cdbk_nb_high1[];
+extern const signed char cdbk_nb_high2[];
+
+/* Quantizes narrowband LSPs with 30 bits */
+void lsp_quant_nb(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits);
+
+/* Decodes quantized narrowband LSPs */
+void lsp_unquant_nb(spx_lsp_t *lsp, int order, SpeexBits *bits);
+
+/* Quantizes low bit-rate narrowband LSPs with 18 bits */
+void lsp_quant_lbr(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits);
+
+/* Decodes quantized low bit-rate narrowband LSPs */
+void lsp_unquant_lbr(spx_lsp_t *lsp, int order, SpeexBits *bits);
+
+/* Quantizes high-band LSPs with 12 bits */
+void lsp_quant_high(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits);
+
+/* Decodes high-band LSPs */
+void lsp_unquant_high(spx_lsp_t *lsp, int order, SpeexBits *bits);
+
+#ifdef EPIC_48K
+/* Quantizes narrowband LSPs with 14 bits */
+void lsp_quant_48k(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits);
+
+/* Decodes quantized narrowband LSPs (14 bits) */
+void lsp_unquant_48k(spx_lsp_t *lsp, int order, SpeexBits *bits);
+#endif
+
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/quant_lsp_bfin.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/quant_lsp_bfin.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/quant_lsp_bfin.h	(revision 1163)
@@ -0,0 +1,165 @@
+/* Copyright (C) 2006 David Rowe */
+/**
+   @file quant_lsp_bfin.h
+   @author David Rowe
+   @brief Various compatibility routines for Speex (Blackfin version)
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#define OVERRIDE_LSP_QUANT
+#ifdef OVERRIDE_LSP_QUANT
+
+/*
+  Note http://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html
+  well tell you all the magic resgister constraints used below
+  for gcc in-line asm.
+*/
+
+static int lsp_quant(
+  spx_word16_t      *x, 
+  const signed char *cdbk, 
+  int                nbVec, 
+  int                nbDim
+)
+{
+   int          j;
+   spx_word32_t best_dist=1<<30;
+   int          best_id=0;
+
+   __asm__ __volatile__
+     (
+"	%0 = 1 (X);\n\t"                       /* %0: best_dist */    
+"	%0 <<= 30;\n\t"     
+"	%1 = 0 (X);\n\t"                       /* %1: best_i         */
+"       P2 = %3\n\t"                           /* P2: ptr to cdbk    */
+"       R5 = 0;\n\t"                           /* R5: best cb entry  */
+
+"       R0 = %5;\n\t"                          /* set up circ addr   */
+"       R0 <<= 1;\n\t"
+"       L0 = R0;\n\t"                          
+"       I0 = %2;\n\t"                          /* %2: &x[0]          */
+"       B0 = %2;\n\t"                          
+
+"       R2.L = W [I0++];\n\t"
+"	LSETUP (lq1, lq2) LC0 = %4;\n\t"
+"lq1:	  R3 = 0;\n\t"                         /* R3: dist           */
+"	  LSETUP (lq3, lq4) LC1 = %5;\n\t"
+"lq3:       R1 = B [P2++] (X);\n\t"            
+"	    R1 <<= 5;\n\t"
+"	    R0.L = R2.L - R1.L || R2.L = W [I0++];\n\t"
+"	    R0 = R0.L*R0.L;\n\t"
+"lq4:	    R3 = R3 + R0;\n\t"
+
+"	  cc =R3<%0;\n\t"
+"	  if cc %0=R3;\n\t"
+"	  if cc %1=R5;\n\t"
+"lq2:     R5 += 1;\n\t"
+"         L0 = 0;\n\t"
+   : "=&d" (best_dist), "=&d" (best_id)
+   : "a" (x), "b" (cdbk), "a" (nbVec), "a" (nbDim)
+   : "I0", "P2", "R0", "R1", "R2", "R3", "R5", "L0", "B0", "A0"
+   );
+
+   for (j=0;j<nbDim;j++) {
+      x[j] = SUB16(x[j],SHL16((spx_word16_t)cdbk[best_id*nbDim+j],5));
+   }
+   return best_id;
+}
+#endif
+
+#define OVERRIDE_LSP_WEIGHT_QUANT
+#ifdef OVERRIDE_LSP_WEIGHT_QUANT
+
+/*
+  Note http://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html
+  well tell you all the magic resgister constraints used below
+  for gcc in-line asm.
+*/
+
+static int lsp_weight_quant(
+  spx_word16_t      *x, 
+  spx_word16_t      *weight, 
+  const signed char *cdbk, 
+  int                nbVec, 
+  int                nbDim
+)
+{
+   int          j;
+   spx_word32_t best_dist=1<<30;
+   int          best_id=0;
+
+   __asm__ __volatile__
+     (
+"	%0 = 1 (X);\n\t"                       /* %0: best_dist */    
+"	%0 <<= 30;\n\t"     
+"	%1 = 0 (X);\n\t"                       /* %1: best_i         */
+"       P2 = %4\n\t"                           /* P2: ptr to cdbk    */
+"       R5 = 0;\n\t"                           /* R5: best cb entry  */
+
+"       R0 = %6;\n\t"                          /* set up circ addr   */
+"       R0 <<= 1;\n\t"
+"       L0 = R0;\n\t"                          
+"       L1 = R0;\n\t"
+"       I0 = %2;\n\t"                          /* %2: &x[0]          */
+"	I1 = %3;\n\t"                          /* %3: &weight[0]     */
+"       B0 = %2;\n\t"                          
+"	B1 = %3;\n\t"                          
+
+"	LSETUP (lwq1, lwq2) LC0 = %5;\n\t"
+"lwq1:	  R3 = 0 (X);\n\t"                     /* R3: dist           */
+"	  LSETUP (lwq3, lwq4) LC1 = %6;\n\t"
+"lwq3:	    R0.L = W [I0++] || R2.L = W [I1++];\n\t"
+"           R1 = B [P2++] (X);\n\t"            
+"	    R1 <<= 5;\n\t"
+"	    R0.L = R0.L - R1.L;\n\t"
+"           R0 = R0.L*R0.L;\n\t"
+"	    A1 = R2.L*R0.L (M,IS);\n\t"
+"	    A1 = A1 >>> 16;\n\t"
+"	    R1 = (A1 += R2.L*R0.H) (IS);\n\t"
+"lwq4:	    R3 = R3 + R1;\n\t"
+
+"	  cc =R3<%0;\n\t"
+"	  if cc %0=R3;\n\t"
+"	  if cc %1=R5;\n\t"
+"lwq2:    R5 += 1;\n\t"
+"         L0 = 0;\n\t"
+"         L1 = 0;\n\t"
+   : "=&d" (best_dist), "=&d" (best_id)
+   : "a" (x), "a" (weight), "b" (cdbk), "a" (nbVec), "a" (nbDim)
+   : "I0", "I1", "P2", "R0", "R1", "R2", "R3", "R5", "A1",
+     "L0", "L1", "B0", "B1"
+   );
+
+   for (j=0;j<nbDim;j++) {
+      x[j] = SUB16(x[j],SHL16((spx_word16_t)cdbk[best_id*nbDim+j],5));
+   }
+   return best_id;
+}
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/sb_celp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/sb_celp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/sb_celp.c	(revision 1163)
@@ -0,0 +1,1650 @@
+/* Copyright (C) 2002-2006 Jean-Marc Valin 
+   File: sb_celp.c
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include "sb_celp.h"
+#include "stdlib.h"
+#include "filters.h"
+#include "lpc.h"
+#include "lsp.h"
+#include "stack_alloc.h"
+#include "cb_search.h"
+#include "quant_lsp.h"
+#include "vq.h"
+#include "ltp.h"
+#include "misc.h"
+
+/* Default size for the encoder and decoder stack (can be changed at compile time).
+   This does not apply when using variable-size arrays or alloca. */
+#ifndef SB_ENC_STACK
+#define SB_ENC_STACK (10000*sizeof(spx_sig_t))
+#endif
+
+#ifndef SB_DEC_STACK
+#define SB_DEC_STACK (6000*sizeof(spx_sig_t))
+#endif
+
+
+#ifdef DISABLE_WIDEBAND
+void *sb_encoder_init(const SpeexMode *m)
+{
+   speex_error("Wideband and Ultra-wideband are disabled");
+   return NULL;
+}
+void sb_encoder_destroy(void *state)
+{
+   speex_error("Wideband and Ultra-wideband are disabled");
+}
+int sb_encode(void *state, void *vin, SpeexBits *bits)
+{
+   speex_error("Wideband and Ultra-wideband are disabled");
+   return -2;
+}
+void *sb_decoder_init(const SpeexMode *m)
+{
+   speex_error("Wideband and Ultra-wideband are disabled");
+   return NULL;
+}
+void sb_decoder_destroy(void *state)
+{
+   speex_error("Wideband and Ultra-wideband are disabled");
+}
+int sb_decode(void *state, SpeexBits *bits, void *vout)
+{
+   speex_error("Wideband and Ultra-wideband are disabled");
+   return -2;
+}
+int sb_encoder_ctl(void *state, int request, void *ptr)
+{
+   speex_error("Wideband and Ultra-wideband are disabled");
+   return -2;
+}
+int sb_decoder_ctl(void *state, int request, void *ptr)
+{
+   speex_error("Wideband and Ultra-wideband are disabled");
+   return -2;
+}
+#else
+
+
+#ifndef M_PI
+#define M_PI           3.14159265358979323846  /* pi */
+#endif
+
+#define sqr(x) ((x)*(x))
+
+#define SUBMODE(x) st->submodes[st->submodeID]->x
+
+#ifdef FIXED_POINT
+static const spx_word16_t gc_quant_bound[16] = {125, 164, 215, 282, 370, 484, 635, 832, 1090, 1428, 1871, 2452, 3213, 4210, 5516, 7228};
+#define LSP_MARGIN 410
+#define LSP_DELTA1 6553
+#define LSP_DELTA2 1638
+
+#else
+
+#define LSP_MARGIN .05
+#define LSP_DELTA1 .2
+#define LSP_DELTA2 .05
+
+#endif
+
+#define QMF_ORDER 64
+
+#ifdef FIXED_POINT
+static const spx_word16_t h0[64] = {2, -7, -7, 18, 15, -39, -25, 75, 35, -130, -41, 212, 38, -327, -17, 483, -32, -689, 124, 956, -283, -1307, 543, 1780, -973, -2467, 1733, 3633, -3339, -6409, 9059, 30153, 30153, 9059, -6409, -3339, 3633, 1733, -2467, -973, 1780, 543, -1307, -283, 956, 124, -689, -32, 483, -17, -327, 38, 212, -41, -130, 35, 75, -25, -39, 15, 18, -7, -7, 2};
+
+static const spx_word16_t h1[64] = {2, 7, -7, -18, 15, 39, -25, -75, 35, 130, -41, -212, 38, 327, -17, -483, -32, 689, 124, -956, -283, 1307, 543, -1780, -973, 2467, 1733, -3633, -3339, 6409, 9059, -30153, 30153, -9059, -6409, 3339, 3633, -1733, -2467, 973, 1780, -543, -1307, 283, 956, -124, -689, 32, 483, 17, -327, -38, 212, 41, -130, -35, 75, 25, -39, -15, 18, 7, -7, -2};
+
+
+#else
+static const float h0[64] = {
+   3.596189e-05f, -0.0001123515f,
+   -0.0001104587f, 0.0002790277f,
+   0.0002298438f, -0.0005953563f,
+   -0.0003823631f, 0.00113826f,
+   0.0005308539f, -0.001986177f,
+   -0.0006243724f, 0.003235877f,
+   0.0005743159f, -0.004989147f,
+   -0.0002584767f, 0.007367171f,
+   -0.0004857935f, -0.01050689f,
+   0.001894714f, 0.01459396f,
+   -0.004313674f, -0.01994365f,
+   0.00828756f, 0.02716055f,
+   -0.01485397f, -0.03764973f,
+   0.026447f, 0.05543245f,
+   -0.05095487f, -0.09779096f,
+   0.1382363f, 0.4600981f,
+   0.4600981f, 0.1382363f,
+   -0.09779096f, -0.05095487f,
+   0.05543245f, 0.026447f,
+   -0.03764973f, -0.01485397f,
+   0.02716055f, 0.00828756f,
+   -0.01994365f, -0.004313674f,
+   0.01459396f, 0.001894714f,
+   -0.01050689f, -0.0004857935f,
+   0.007367171f, -0.0002584767f,
+   -0.004989147f, 0.0005743159f,
+   0.003235877f, -0.0006243724f,
+   -0.001986177f, 0.0005308539f,
+   0.00113826f, -0.0003823631f,
+   -0.0005953563f, 0.0002298438f,
+   0.0002790277f, -0.0001104587f,
+   -0.0001123515f, 3.596189e-05f
+};
+
+static const float h1[64] = {
+   3.596189e-05f, 0.0001123515f,
+   -0.0001104587f, -0.0002790277f,
+   0.0002298438f, 0.0005953563f,
+   -0.0003823631f, -0.00113826f,
+   0.0005308539f, 0.001986177f,
+   -0.0006243724f, -0.003235877f,
+   0.0005743159f, 0.004989147f,
+   -0.0002584767f, -0.007367171f,
+   -0.0004857935f, 0.01050689f,
+   0.001894714f, -0.01459396f,
+   -0.004313674f, 0.01994365f,
+   0.00828756f, -0.02716055f,
+   -0.01485397f, 0.03764973f,
+   0.026447f, -0.05543245f,
+   -0.05095487f, 0.09779096f,
+   0.1382363f, -0.4600981f,
+   0.4600981f, -0.1382363f,
+   -0.09779096f, 0.05095487f,
+   0.05543245f, -0.026447f,
+   -0.03764973f, 0.01485397f,
+   0.02716055f, -0.00828756f,
+   -0.01994365f, 0.004313674f,
+   0.01459396f, -0.001894714f,
+   -0.01050689f, 0.0004857935f,
+   0.007367171f, 0.0002584767f,
+   -0.004989147f, -0.0005743159f,
+   0.003235877f, 0.0006243724f,
+   -0.001986177f, -0.0005308539f,
+   0.00113826f, 0.0003823631f,
+   -0.0005953563f, -0.0002298438f,
+   0.0002790277f, 0.0001104587f,
+   -0.0001123515f, -3.596189e-05f
+};
+#endif
+
+extern const spx_word16_t lpc_window[];
+
+static void mix_and_saturate(spx_word32_t *x0, spx_word32_t *x1, spx_word16_t *out, int len)
+{
+   int i;
+   for (i=0;i<len;i++)
+   {
+      spx_word32_t tmp;
+#ifdef FIXED_POINT
+      tmp=PSHR32(SUB32(x0[i],x1[i]),SIG_SHIFT-1);
+#else
+      tmp=2*(x0[i]-x1[i]);
+#endif
+      if (tmp>32767)
+         out[i] = 32767;
+      else if (tmp<-32767)
+         out[i] = -32767;
+      else
+         out[i] = EXTRACT16(tmp);
+   }
+}
+
+void *sb_encoder_init(const SpeexMode *m)
+{
+   int i;
+   spx_int32_t tmp;
+   SBEncState *st;
+   const SpeexSBMode *mode;
+
+   st = (SBEncState*)speex_alloc(sizeof(SBEncState));
+   if (!st)
+      return NULL;
+#if defined(VAR_ARRAYS) || defined (USE_ALLOCA)
+   st->stack = NULL;
+#else
+   st->stack = (char*)speex_alloc_scratch(SB_ENC_STACK);
+#endif
+   st->mode = m;
+   mode = (const SpeexSBMode*)m->mode;
+
+
+   st->st_low = speex_encoder_init(mode->nb_mode);
+   st->full_frame_size = 2*mode->frameSize;
+   st->frame_size = mode->frameSize;
+   st->subframeSize = mode->subframeSize;
+   st->nbSubframes = mode->frameSize/mode->subframeSize;
+   st->windowSize = st->frame_size+st->subframeSize;
+   st->lpcSize=mode->lpcSize;
+   st->bufSize=mode->bufSize;
+
+   st->encode_submode = 1;
+   st->submodes=mode->submodes;
+   st->submodeSelect = st->submodeID=mode->defaultSubmode;
+   
+   tmp=9;
+   speex_encoder_ctl(st->st_low, SPEEX_SET_QUALITY, &tmp);
+   tmp=1;
+   speex_encoder_ctl(st->st_low, SPEEX_SET_WIDEBAND, &tmp);
+
+   st->lag_factor = mode->lag_factor;
+   st->lpc_floor = mode->lpc_floor;
+   st->gamma1=mode->gamma1;
+   st->gamma2=mode->gamma2;
+   st->first=1;
+
+   st->x0d=(spx_sig_t*)speex_alloc((st->frame_size)*sizeof(spx_sig_t));
+   st->x1d=(spx_sig_t*)speex_alloc((st->frame_size)*sizeof(spx_sig_t));
+   st->high=(spx_sig_t*)speex_alloc((st->full_frame_size)*sizeof(spx_sig_t));
+   st->y0=(spx_sig_t*)speex_alloc((st->full_frame_size)*sizeof(spx_sig_t));
+   st->y1=(spx_sig_t*)speex_alloc((st->full_frame_size)*sizeof(spx_sig_t));
+
+   st->h0_mem=(spx_word16_t*)speex_alloc((QMF_ORDER)*sizeof(spx_word16_t));
+   st->h1_mem=(spx_word16_t*)speex_alloc((QMF_ORDER)*sizeof(spx_word16_t));
+   st->g0_mem=(spx_word32_t*)speex_alloc((QMF_ORDER)*sizeof(spx_word32_t));
+   st->g1_mem=(spx_word32_t*)speex_alloc((QMF_ORDER)*sizeof(spx_word32_t));
+
+   st->excBuf=(spx_sig_t*)speex_alloc((st->bufSize)*sizeof(spx_sig_t));
+   st->exc = st->excBuf + st->bufSize - st->windowSize;
+
+   st->res=(spx_sig_t*)speex_alloc((st->frame_size)*sizeof(spx_sig_t));
+   st->sw=(spx_sig_t*)speex_alloc((st->frame_size)*sizeof(spx_sig_t));
+   st->window= lpc_window;
+
+   st->lagWindow = (spx_word16_t*)speex_alloc((st->lpcSize+1)*sizeof(spx_word16_t));
+   for (i=0;i<st->lpcSize+1;i++)
+      st->lagWindow[i]=16384*exp(-.5*sqr(2*M_PI*st->lag_factor*i));
+
+   st->autocorr = (spx_word16_t*)speex_alloc((st->lpcSize+1)*sizeof(spx_word16_t));
+   st->lpc = (spx_coef_t*)speex_alloc(st->lpcSize*sizeof(spx_coef_t));
+   st->bw_lpc1 = (spx_coef_t*)speex_alloc(st->lpcSize*sizeof(spx_coef_t));
+   st->bw_lpc2 = (spx_coef_t*)speex_alloc(st->lpcSize*sizeof(spx_coef_t));
+   st->lsp = (spx_lsp_t*)speex_alloc(st->lpcSize*sizeof(spx_lsp_t));
+   st->qlsp = (spx_lsp_t*)speex_alloc(st->lpcSize*sizeof(spx_lsp_t));
+   st->old_lsp = (spx_lsp_t*)speex_alloc(st->lpcSize*sizeof(spx_lsp_t));
+   st->old_qlsp = (spx_lsp_t*)speex_alloc(st->lpcSize*sizeof(spx_lsp_t));
+   st->interp_lsp = (spx_lsp_t*)speex_alloc(st->lpcSize*sizeof(spx_lsp_t));
+   st->interp_qlsp = (spx_lsp_t*)speex_alloc(st->lpcSize*sizeof(spx_lsp_t));
+   st->interp_lpc = (spx_coef_t*)speex_alloc(st->lpcSize*sizeof(spx_coef_t));
+   st->interp_qlpc = (spx_coef_t*)speex_alloc(st->lpcSize*sizeof(spx_coef_t));
+   st->pi_gain = (spx_word32_t*)speex_alloc((st->nbSubframes)*sizeof(spx_word32_t));
+   st->low_innov = (spx_word32_t*)speex_alloc((st->frame_size)*sizeof(spx_word32_t));
+   speex_encoder_ctl(st->st_low, SPEEX_SET_INNOVATION_SAVE, st->low_innov);
+   st->innov_save = NULL;
+   
+   st->mem_sp = (spx_mem_t*)speex_alloc((st->lpcSize)*sizeof(spx_mem_t));
+   st->mem_sp2 = (spx_mem_t*)speex_alloc((st->lpcSize)*sizeof(spx_mem_t));
+   st->mem_sw = (spx_mem_t*)speex_alloc((st->lpcSize)*sizeof(spx_mem_t));
+
+   st->vbr_quality = 8;
+   st->vbr_enabled = 0;
+   st->vbr_max = 0;
+   st->vbr_max_high = 20000;  /* We just need a big value here */
+   st->vad_enabled = 0;
+   st->abr_enabled = 0;
+   st->relative_quality=0;
+
+   st->complexity=2;
+   speex_encoder_ctl(st->st_low, SPEEX_GET_SAMPLING_RATE, &st->sampling_rate);
+   st->sampling_rate*=2;
+#ifdef ENABLE_VALGRIND
+   VALGRIND_MAKE_READABLE(st, (st->stack-(char*)st));
+#endif
+   return st;
+}
+
+void sb_encoder_destroy(void *state)
+{
+   SBEncState *st=(SBEncState*)state;
+
+   speex_encoder_destroy(st->st_low);
+#if !(defined(VAR_ARRAYS) || defined (USE_ALLOCA))
+   speex_free_scratch(st->stack);
+#endif
+
+   speex_free(st->x0d);
+   speex_free(st->x1d);
+   speex_free(st->high);
+   speex_free(st->y0);
+   speex_free(st->y1);
+
+   speex_free(st->h0_mem);
+   speex_free(st->h1_mem);
+   speex_free(st->g0_mem);
+   speex_free(st->g1_mem);
+
+   speex_free(st->excBuf);
+   speex_free(st->res);
+   speex_free(st->sw);
+   speex_free(st->lagWindow);
+
+   speex_free(st->autocorr);
+   speex_free(st->lpc);
+   speex_free(st->bw_lpc1);
+   speex_free(st->bw_lpc2);
+   speex_free(st->lsp);
+   speex_free(st->qlsp);
+   speex_free(st->old_lsp);
+   speex_free(st->old_qlsp);
+   speex_free(st->interp_lsp);
+   speex_free(st->interp_qlsp);
+   speex_free(st->interp_lpc);
+   speex_free(st->interp_qlpc);
+   speex_free(st->pi_gain);
+   speex_free(st->low_innov);
+
+   speex_free(st->mem_sp);
+   speex_free(st->mem_sp2);
+   speex_free(st->mem_sw);
+
+   
+   speex_free(st);
+}
+
+
+int sb_encode(void *state, void *vin, SpeexBits *bits)
+{
+   SBEncState *st;
+   int i, roots, sub;
+   char *stack;
+   VARDECL(spx_mem_t *mem);
+   VARDECL(spx_sig_t *innov);
+   VARDECL(spx_word16_t *target);
+   VARDECL(spx_word16_t *syn_resp);
+   VARDECL(spx_word32_t *low_pi_gain);
+   VARDECL(spx_word16_t *low_exc);
+   const SpeexSBMode *mode;
+   spx_int32_t dtx;
+   spx_word16_t *in = (spx_word16_t*)vin;
+
+   st = (SBEncState*)state;
+   stack=st->stack;
+   mode = (const SpeexSBMode*)(st->mode->mode);
+
+   {
+      VARDECL(spx_word16_t *low);
+      ALLOC(low, st->frame_size, spx_word16_t);
+
+      /* Compute the two sub-bands by filtering with h0 and h1*/
+      qmf_decomp(in, h0, st->x0d, st->x1d, st->full_frame_size, QMF_ORDER, st->h0_mem, stack);
+      
+      for (i=0;i<st->frame_size;i++)
+         low[i] = SATURATE(PSHR(st->x0d[i],SIG_SHIFT),32767);
+      
+      /* Encode the narrowband part*/
+      speex_encode_native(st->st_low, low, bits);
+
+      for (i=0;i<st->frame_size;i++)
+         st->x0d[i] = SHL(low[i],SIG_SHIFT);
+   }
+   /* High-band buffering / sync with low band */
+   for (i=0;i<st->windowSize-st->frame_size;i++)
+      st->high[i] = st->high[st->frame_size+i];
+   for (i=0;i<st->frame_size;i++)
+      st->high[st->windowSize-st->frame_size+i]=SATURATE(st->x1d[i],536854528);
+
+   speex_move(st->excBuf, st->excBuf+st->frame_size, (st->bufSize-st->frame_size)*sizeof(spx_sig_t));
+
+
+   ALLOC(low_pi_gain, st->nbSubframes, spx_word32_t);
+   ALLOC(low_exc, st->frame_size, spx_word16_t);
+   speex_encoder_ctl(st->st_low, SPEEX_GET_PI_GAIN, low_pi_gain);
+   speex_encoder_ctl(st->st_low, SPEEX_GET_EXC, low_exc);
+   
+   speex_encoder_ctl(st->st_low, SPEEX_GET_LOW_MODE, &dtx);
+
+   if (dtx==0)
+      dtx=1;
+   else
+      dtx=0;
+
+   {
+      VARDECL(spx_word16_t *w_sig);
+      ALLOC(w_sig, st->windowSize, spx_word16_t);
+      /* Window for analysis */
+      for (i=0;i<st->windowSize;i++)
+         w_sig[i] = SHR(MULT16_16(SHR((spx_word32_t)(st->high[i]),SIG_SHIFT),st->window[i]),SIG_SHIFT);
+
+      /* Compute auto-correlation */
+      _spx_autocorr(w_sig, st->autocorr, st->lpcSize+1, st->windowSize);
+   }
+   st->autocorr[0] = ADD16(st->autocorr[0],MULT16_16_Q15(st->autocorr[0],st->lpc_floor)); /* Noise floor in auto-correlation domain */
+
+   /* Lag windowing: equivalent to filtering in the power-spectrum domain */
+   for (i=0;i<st->lpcSize+1;i++)
+      st->autocorr[i] = MULT16_16_Q14(st->autocorr[i],st->lagWindow[i]);
+
+   /* Levinson-Durbin */
+   _spx_lpc(st->lpc, st->autocorr, st->lpcSize);
+
+   /* LPC to LSPs (x-domain) transform */
+   roots=lpc_to_lsp (st->lpc, st->lpcSize, st->lsp, 10, LSP_DELTA1, stack);
+   if (roots!=st->lpcSize)
+   {
+      roots = lpc_to_lsp (st->lpc, st->lpcSize, st->lsp, 10, LSP_DELTA2, stack);
+      if (roots!=st->lpcSize) {
+         /*If we can't find all LSP's, do some damage control and use a flat filter*/
+         for (i=0;i<st->lpcSize;i++)
+         {
+            st->lsp[i]=LSP_SCALING*M_PI*((float)(i+1))/(st->lpcSize+1);
+         }
+      }
+   }
+
+   /* VBR code */
+   if ((st->vbr_enabled || st->vad_enabled) && !dtx)
+   {
+      float e_low=0, e_high=0;
+      float ratio;
+      if (st->abr_enabled)
+      {
+         float qual_change=0;
+         if (st->abr_drift2 * st->abr_drift > 0)
+         {
+            /* Only adapt if long-term and short-term drift are the same sign */
+            qual_change = -.00001*st->abr_drift/(1+st->abr_count);
+            if (qual_change>.1)
+               qual_change=.1;
+            if (qual_change<-.1)
+               qual_change=-.1;
+         }
+         st->vbr_quality += qual_change;
+         if (st->vbr_quality>10)
+            st->vbr_quality=10;
+         if (st->vbr_quality<0)
+            st->vbr_quality=0;
+      }
+
+
+      /*FIXME: Are the two signals (low, high) in sync? */
+      e_low = compute_rms(st->x0d, st->frame_size);
+      e_high = compute_rms(st->high, st->frame_size);
+      ratio = 2*log((1+e_high)/(1+e_low));
+      
+      speex_encoder_ctl(st->st_low, SPEEX_GET_RELATIVE_QUALITY, &st->relative_quality);
+      if (ratio<-4)
+         ratio=-4;
+      if (ratio>2)
+         ratio=2;
+      /*if (ratio>-2)*/
+      if (st->vbr_enabled) 
+      {
+         spx_int32_t modeid;
+         modeid = mode->nb_modes-1;
+         st->relative_quality+=1.0*(ratio+2);
+	 if (st->relative_quality<-1)
+            st->relative_quality=-1;
+         while (modeid)
+         {
+            int v1;
+            float thresh;
+            v1=(int)floor(st->vbr_quality);
+            if (v1==10)
+               thresh = mode->vbr_thresh[modeid][v1];
+            else
+               thresh = (st->vbr_quality-v1)   * mode->vbr_thresh[modeid][v1+1] + 
+                        (1+v1-st->vbr_quality) * mode->vbr_thresh[modeid][v1];
+            if (st->relative_quality >= thresh && st->sampling_rate*st->submodes[modeid]->bits_per_frame/st->full_frame_size <= st->vbr_max_high)
+               break;
+            modeid--;
+         }
+         speex_encoder_ctl(state, SPEEX_SET_HIGH_MODE, &modeid);
+         if (st->abr_enabled)
+         {
+            spx_int32_t bitrate;
+            speex_encoder_ctl(state, SPEEX_GET_BITRATE, &bitrate);
+            st->abr_drift+=(bitrate-st->abr_enabled);
+            st->abr_drift2 = .95*st->abr_drift2 + .05*(bitrate-st->abr_enabled);
+            st->abr_count += 1.0;
+         }
+
+      } else {
+         /* VAD only */
+         int modeid;
+         if (st->relative_quality<2.0)
+            modeid=1;
+         else
+            modeid=st->submodeSelect;
+         /*speex_encoder_ctl(state, SPEEX_SET_MODE, &mode);*/
+         st->submodeID=modeid;
+
+      }
+      /*fprintf (stderr, "%f %f\n", ratio, low_qual);*/
+   }
+
+   if (st->encode_submode)
+   {
+      speex_bits_pack(bits, 1, 1);
+      if (dtx)
+         speex_bits_pack(bits, 0, SB_SUBMODE_BITS);
+      else
+         speex_bits_pack(bits, st->submodeID, SB_SUBMODE_BITS);
+   }
+
+   /* If null mode (no transmission), just set a couple things to zero*/
+   if (dtx || st->submodes[st->submodeID] == NULL)
+   {
+      for (i=0;i<st->frame_size;i++)
+         st->exc[i]=st->sw[i]=VERY_SMALL;
+
+      for (i=0;i<st->lpcSize;i++)
+         st->mem_sw[i]=0;
+      st->first=1;
+
+      /* Final signal synthesis from excitation */
+      iir_mem2(st->exc, st->interp_qlpc, st->high, st->frame_size, st->lpcSize, st->mem_sp);
+
+#ifdef RESYNTH
+      /* Reconstruct the original */
+      fir_mem_up(st->x0d, h0, st->y0, st->full_frame_size, QMF_ORDER, st->g0_mem, stack);
+      fir_mem_up(st->high, h1, st->y1, st->full_frame_size, QMF_ORDER, st->g1_mem, stack);
+
+      for (i=0;i<st->full_frame_size;i++)
+         in[i]=SHR(st->y0[i]-st->y1[i], SIG_SHIFT-1);
+#endif
+
+      if (dtx)
+         return 0;
+      else
+         return 1;
+   }
+
+
+   /* LSP quantization */
+   SUBMODE(lsp_quant)(st->lsp, st->qlsp, st->lpcSize, bits);   
+
+   if (st->first)
+   {
+      for (i=0;i<st->lpcSize;i++)
+         st->old_lsp[i] = st->lsp[i];
+      for (i=0;i<st->lpcSize;i++)
+         st->old_qlsp[i] = st->qlsp[i];
+   }
+   
+   ALLOC(mem, st->lpcSize, spx_mem_t);
+   ALLOC(syn_resp, st->subframeSize, spx_word16_t);
+   ALLOC(innov, st->subframeSize, spx_sig_t);
+   ALLOC(target, st->subframeSize, spx_word16_t);
+
+   for (sub=0;sub<st->nbSubframes;sub++)
+   {
+      spx_sig_t *exc, *sp, *res, *sw, *innov_save=NULL;
+      spx_word16_t filter_ratio;
+      int offset;
+      spx_word32_t rl, rh;
+      spx_word16_t eh=0;
+
+      offset = st->subframeSize*sub;
+      sp=st->high+offset;
+      exc=st->exc+offset;
+      res=st->res+offset;
+      sw=st->sw+offset;
+      /* Pointer for saving innovation */
+      if (st->innov_save)
+      {
+         innov_save = st->innov_save+2*offset;
+         for (i=0;i<2*st->subframeSize;i++)
+            innov_save[i]=0;
+      }
+      
+      /* LSP interpolation (quantized and unquantized) */
+      lsp_interpolate(st->old_lsp, st->lsp, st->interp_lsp, st->lpcSize, sub, st->nbSubframes);
+      lsp_interpolate(st->old_qlsp, st->qlsp, st->interp_qlsp, st->lpcSize, sub, st->nbSubframes);
+
+      lsp_enforce_margin(st->interp_lsp, st->lpcSize, LSP_MARGIN);
+      lsp_enforce_margin(st->interp_qlsp, st->lpcSize, LSP_MARGIN);
+
+      lsp_to_lpc(st->interp_lsp, st->interp_lpc, st->lpcSize,stack);
+      lsp_to_lpc(st->interp_qlsp, st->interp_qlpc, st->lpcSize, stack);
+
+      bw_lpc(st->gamma1, st->interp_lpc, st->bw_lpc1, st->lpcSize);
+      bw_lpc(st->gamma2, st->interp_lpc, st->bw_lpc2, st->lpcSize);
+
+      /* Compute mid-band (4000 Hz for wideband) response of low-band and high-band
+         filters */
+      st->pi_gain[sub]=LPC_SCALING;
+      rh = LPC_SCALING;
+      for (i=0;i<st->lpcSize;i+=2)
+      {
+         rh += st->interp_qlpc[i+1] - st->interp_qlpc[i];
+         st->pi_gain[sub] += st->interp_qlpc[i] + st->interp_qlpc[i+1];
+      }
+      
+      rl = low_pi_gain[sub];
+#ifdef FIXED_POINT
+      filter_ratio=PDIV32_16(SHL(rl+82,2),SHR(82+rh,5));
+#else
+      filter_ratio=(rl+.01)/(rh+.01);
+#endif
+      
+      /* Compute "real excitation" */
+      fir_mem2(sp, st->interp_qlpc, exc, st->subframeSize, st->lpcSize, st->mem_sp2);
+      /* Compute energy of low-band and high-band excitation */
+
+      eh = compute_rms(exc, st->subframeSize);
+
+      if (!SUBMODE(innovation_quant)) {/* 1 for spectral folding excitation, 0 for stochastic */
+         float g;
+         spx_word16_t el;
+         el = compute_rms(st->low_innov+offset, st->subframeSize);
+
+         /* Gain to use if we want to use the low-band excitation for high-band */
+         g=eh/(1.+el);
+         
+#if 0
+         {
+            char *tmp_stack=stack;
+            float *tmp_sig;
+            float g2;
+            ALLOC(tmp_sig, st->subframeSize, spx_sig_t);
+            for (i=0;i<st->lpcSize;i++)
+               mem[i]=st->mem_sp[i];
+            iir_mem2(st->low_innov+offset, st->interp_qlpc, tmp_sig, st->subframeSize, st->lpcSize, mem);
+            g2 = compute_rms(sp, st->subframeSize)/(.01+compute_rms(tmp_sig, st->subframeSize));
+            /*fprintf (stderr, "gains: %f %f\n", g, g2);*/
+            g = g2;
+            stack = tmp_stack;
+         }
+#endif
+
+#ifdef FIXED_POINT
+         g *= filter_ratio/128.;
+#else
+         g *= filter_ratio;
+#endif
+         /*print_vec(&g, 1, "gain factor");*/
+         /* Gain quantization */
+         {
+            int quant = (int) floor(.5 + 10 + 8.0 * log((g+.0001)));
+            /*speex_warning_int("tata", quant);*/
+            if (quant<0)
+               quant=0;
+            if (quant>31)
+               quant=31;
+            speex_bits_pack(bits, quant, 5);
+         }
+
+      } else {
+         spx_word16_t gc;
+         spx_word32_t scale;
+         spx_word16_t el;
+         el = compute_rms16(low_exc+offset, st->subframeSize);
+
+         gc = PDIV32_16(MULT16_16(filter_ratio,1+eh),1+el);
+
+         /* This is a kludge that cleans up a historical bug */
+         if (st->subframeSize==80)
+            gc *= 0.70711;
+         /*printf ("%f %f %f %f\n", el, eh, filter_ratio, gc);*/
+#ifdef FIXED_POINT
+         {
+            int qgc = scal_quant(gc, gc_quant_bound, 16);
+            speex_bits_pack(bits, qgc, 4);
+            gc = MULT16_32_Q15(28626,gc_quant_bound[qgc]);
+         }
+#else
+         {
+            int qgc = (int)floor(.5+3.7*(log(gc)+0.15556));
+            if (qgc<0)
+               qgc=0;
+            if (qgc>15)
+               qgc=15;
+            speex_bits_pack(bits, qgc, 4);
+            gc = exp((1/3.7)*qgc-0.15556);
+         }         
+#endif
+         if (st->subframeSize==80)
+            gc *= 1.4142;
+
+         scale = SHL32(MULT16_16(PDIV32_16(SHL32(EXTEND32(gc),SIG_SHIFT-6),filter_ratio),(1+el)),6);
+
+         compute_impulse_response(st->interp_qlpc, st->bw_lpc1, st->bw_lpc2, syn_resp, st->subframeSize, st->lpcSize, stack);
+
+         
+         /* Reset excitation */
+         for (i=0;i<st->subframeSize;i++)
+            exc[i]=VERY_SMALL;
+         
+         /* Compute zero response (ringing) of A(z/g1) / ( A(z/g2) * Aq(z) ) */
+         for (i=0;i<st->lpcSize;i++)
+            mem[i]=st->mem_sp[i];
+         iir_mem2(exc, st->interp_qlpc, exc, st->subframeSize, st->lpcSize, mem);
+
+         for (i=0;i<st->lpcSize;i++)
+            mem[i]=st->mem_sw[i];
+         filter_mem2(exc, st->bw_lpc1, st->bw_lpc2, res, st->subframeSize, st->lpcSize, mem);
+
+         /* Compute weighted signal */
+         for (i=0;i<st->lpcSize;i++)
+            mem[i]=st->mem_sw[i];
+         filter_mem2(sp, st->bw_lpc1, st->bw_lpc2, sw, st->subframeSize, st->lpcSize, mem);
+
+         /* Compute target signal */
+         for (i=0;i<st->subframeSize;i++)
+            target[i]=PSHR32(sw[i]-res[i],SIG_SHIFT);
+
+         for (i=0;i<st->subframeSize;i++)
+           exc[i]=0;
+
+         signal_div(target, target, scale, st->subframeSize);
+
+         /* Reset excitation */
+         for (i=0;i<st->subframeSize;i++)
+            innov[i]=0;
+
+         /*print_vec(target, st->subframeSize, "\ntarget");*/
+         SUBMODE(innovation_quant)(target, st->interp_qlpc, st->bw_lpc1, st->bw_lpc2, 
+                                   SUBMODE(innovation_params), st->lpcSize, st->subframeSize, 
+                                   innov, syn_resp, bits, stack, st->complexity, SUBMODE(double_codebook));
+         /*print_vec(target, st->subframeSize, "after");*/
+
+         signal_mul(innov, innov, scale, st->subframeSize);
+
+         for (i=0;i<st->subframeSize;i++)
+            exc[i] = ADD32(exc[i], innov[i]);
+
+         if (st->innov_save)
+         {
+            for (i=0;i<st->subframeSize;i++)
+               innov_save[2*i]=innov[i];
+         }
+         
+         if (SUBMODE(double_codebook)) {
+            char *tmp_stack=stack;
+            VARDECL(spx_sig_t *innov2);
+            ALLOC(innov2, st->subframeSize, spx_sig_t);
+            for (i=0;i<st->subframeSize;i++)
+               innov2[i]=0;
+            for (i=0;i<st->subframeSize;i++)
+               target[i]*=2.5;
+            SUBMODE(innovation_quant)(target, st->interp_qlpc, st->bw_lpc1, st->bw_lpc2, 
+                                      SUBMODE(innovation_params), st->lpcSize, st->subframeSize, 
+                                      innov2, syn_resp, bits, stack, st->complexity, 0);
+            for (i=0;i<st->subframeSize;i++)
+               innov2[i]*=scale*(1/2.5)/SIG_SCALING;
+            for (i=0;i<st->subframeSize;i++)
+               exc[i] = ADD32(exc[i],innov2[i]);
+            stack = tmp_stack;
+         }
+
+      }
+
+      /*Keep the previous memory*/
+      for (i=0;i<st->lpcSize;i++)
+         mem[i]=st->mem_sp[i];
+      /* Final signal synthesis from excitation */
+      iir_mem2(exc, st->interp_qlpc, sp, st->subframeSize, st->lpcSize, st->mem_sp);
+      
+      /* Compute weighted signal again, from synthesized speech (not sure it's the right thing) */
+      filter_mem2(sp, st->bw_lpc1, st->bw_lpc2, sw, st->subframeSize, st->lpcSize, st->mem_sw);
+   }
+
+
+#ifdef RESYNTH
+   /* Reconstruct the original */
+   fir_mem_up(st->x0d, h0, st->y0, st->full_frame_size, QMF_ORDER, st->g0_mem, stack);
+   fir_mem_up(st->high, h1, st->y1, st->full_frame_size, QMF_ORDER, st->g1_mem, stack);
+
+   for (i=0;i<st->full_frame_size;i++)
+      in[i]=SHR(st->y0[i]-st->y1[i], SIG_SHIFT-1);
+#endif
+   for (i=0;i<st->lpcSize;i++)
+      st->old_lsp[i] = st->lsp[i];
+   for (i=0;i<st->lpcSize;i++)
+      st->old_qlsp[i] = st->qlsp[i];
+
+   st->first=0;
+
+   return 1;
+}
+
+
+
+
+
+void *sb_decoder_init(const SpeexMode *m)
+{
+   spx_int32_t tmp;
+   SBDecState *st;
+   const SpeexSBMode *mode;
+   st = (SBDecState*)speex_alloc(sizeof(SBDecState));
+   if (!st)
+      return NULL;
+#if defined(VAR_ARRAYS) || defined (USE_ALLOCA)
+   st->stack = NULL;
+#else
+   st->stack = (char*)speex_alloc_scratch(SB_DEC_STACK);
+#endif
+   st->mode = m;
+   mode=(const SpeexSBMode*)m->mode;
+
+   st->encode_submode = 1;
+
+
+
+
+   st->st_low = speex_decoder_init(mode->nb_mode);
+   st->full_frame_size = 2*mode->frameSize;
+   st->frame_size = mode->frameSize;
+   st->subframeSize = mode->subframeSize;
+   st->nbSubframes = mode->frameSize/mode->subframeSize;
+   st->lpcSize=mode->lpcSize;
+   speex_decoder_ctl(st->st_low, SPEEX_GET_SAMPLING_RATE, &st->sampling_rate);
+   st->sampling_rate*=2;
+   tmp=1;
+   speex_decoder_ctl(st->st_low, SPEEX_SET_WIDEBAND, &tmp);
+
+   st->submodes=mode->submodes;
+   st->submodeID=mode->defaultSubmode;
+
+   st->first=1;
+
+
+   st->x0d = (spx_sig_t*)speex_alloc((st->frame_size)*sizeof(spx_sig_t));
+   st->x1d = (spx_sig_t*)speex_alloc((st->frame_size)*sizeof(spx_sig_t));
+   st->high = (spx_sig_t*)speex_alloc((st->full_frame_size)*sizeof(spx_sig_t));
+   st->y0 = (spx_sig_t*)speex_alloc((st->full_frame_size)*sizeof(spx_sig_t));
+   st->y1 = (spx_sig_t*)speex_alloc((st->full_frame_size)*sizeof(spx_sig_t));
+
+   st->g0_mem = (spx_word32_t*)speex_alloc((QMF_ORDER)*sizeof(spx_word32_t));
+   st->g1_mem = (spx_word32_t*)speex_alloc((QMF_ORDER)*sizeof(spx_word32_t));
+
+   st->exc = (spx_sig_t*)speex_alloc((st->frame_size)*sizeof(spx_sig_t));
+   st->excBuf = (spx_sig_t*)speex_alloc((st->subframeSize)*sizeof(spx_sig_t));
+
+   st->qlsp = (spx_lsp_t*)speex_alloc((st->lpcSize)*sizeof(spx_lsp_t));
+   st->old_qlsp = (spx_lsp_t*)speex_alloc((st->lpcSize)*sizeof(spx_lsp_t));
+   st->interp_qlsp = (spx_lsp_t*)speex_alloc(st->lpcSize*sizeof(spx_lsp_t));
+   st->interp_qlpc = (spx_coef_t*)speex_alloc(st->lpcSize*sizeof(spx_coef_t));
+
+   st->pi_gain = (spx_word32_t*)speex_alloc((st->nbSubframes)*sizeof(spx_word32_t));
+   st->mem_sp = (spx_mem_t*)speex_alloc((2*st->lpcSize)*sizeof(spx_mem_t));
+   
+   st->low_innov = (spx_word32_t*)speex_alloc((st->frame_size)*sizeof(spx_word32_t));
+   speex_decoder_ctl(st->st_low, SPEEX_SET_INNOVATION_SAVE, st->low_innov);
+   st->innov_save = NULL;
+
+
+   st->lpc_enh_enabled=0;
+   st->seed = 1000;
+
+#ifdef ENABLE_VALGRIND
+   VALGRIND_MAKE_READABLE(st, (st->stack-(char*)st));
+#endif
+   return st;
+}
+
+void sb_decoder_destroy(void *state)
+{
+   SBDecState *st;
+   st = (SBDecState*)state;
+   speex_decoder_destroy(st->st_low);
+#if !(defined(VAR_ARRAYS) || defined (USE_ALLOCA))
+   speex_free_scratch(st->stack);
+#endif
+
+   speex_free(st->x0d);
+   speex_free(st->x1d);
+   speex_free(st->high);
+   speex_free(st->y0);
+   speex_free(st->y1);
+   speex_free(st->g0_mem);
+   speex_free(st->g1_mem);
+   speex_free(st->exc);
+   speex_free(st->excBuf);
+   speex_free(st->qlsp);
+   speex_free(st->old_qlsp);
+   speex_free(st->interp_qlsp);
+   speex_free(st->interp_qlpc);
+   speex_free(st->pi_gain);
+   speex_free(st->low_innov);
+   speex_free(st->mem_sp);
+
+   speex_free(state);
+}
+
+static void sb_decode_lost(SBDecState *st, spx_word16_t *out, int dtx, char *stack)
+{
+   int i;
+   int saved_modeid=0;
+
+   if (dtx)
+   {
+      saved_modeid=st->submodeID;
+      st->submodeID=1;
+   } else {
+      bw_lpc(GAMMA_SCALING*0.99, st->interp_qlpc, st->interp_qlpc, st->lpcSize);
+   }
+
+   st->first=1;
+   
+   
+   /* Final signal synthesis from excitation */
+   if (!dtx)
+   {
+      spx_word16_t low_ener;
+      low_ener = .9*compute_rms(st->exc, st->frame_size);
+      for (i=0;i<st->frame_size;i++)
+         st->exc[i] = speex_rand(low_ener, &st->seed);
+   }
+
+   for (i=0;i<st->frame_size;i++)
+      st->high[i]=st->exc[i];
+
+   iir_mem2(st->high, st->interp_qlpc, st->high, st->frame_size, st->lpcSize, 
+            st->mem_sp);
+   
+   
+   /* Reconstruct the original */
+   fir_mem_up(st->x0d, h0, st->y0, st->full_frame_size, QMF_ORDER, st->g0_mem, stack);
+   fir_mem_up(st->high, h1, st->y1, st->full_frame_size, QMF_ORDER, st->g1_mem, stack);
+
+   mix_and_saturate(st->y0, st->y1, out, st->full_frame_size);
+
+   if (dtx)
+   {
+      st->submodeID=saved_modeid;
+   }
+
+   return;
+}
+
+int sb_decode(void *state, SpeexBits *bits, void *vout)
+{
+   int i, sub;
+   SBDecState *st;
+   int wideband;
+   int ret;
+   char *stack;
+   VARDECL(spx_word32_t *low_pi_gain);
+   VARDECL(spx_word16_t *low_exc);
+   VARDECL(spx_coef_t *ak);
+   spx_int32_t dtx;
+   const SpeexSBMode *mode;
+   spx_word16_t *out = (spx_word16_t*)vout;
+   
+   st = (SBDecState*)state;
+   stack=st->stack;
+   mode = (const SpeexSBMode*)(st->mode->mode);
+
+   {
+      VARDECL(spx_word16_t *low);
+      ALLOC(low, st->frame_size, spx_word16_t);
+      
+      /* Decode the low-band */
+      ret = speex_decode_native(st->st_low, bits, low);
+      
+      for (i=0;i<st->frame_size;i++)
+         st->x0d[i] = SHL((spx_sig_t)low[i], SIG_SHIFT);
+   }
+
+   speex_decoder_ctl(st->st_low, SPEEX_GET_DTX_STATUS, &dtx);
+
+   /* If error decoding the narrowband part, propagate error */
+   if (ret!=0)
+   {
+      return ret;
+   }
+
+   if (!bits)
+   {
+      sb_decode_lost(st, out, dtx, stack);
+      return 0;
+   }
+
+   if (st->encode_submode)
+   {
+
+      /*Check "wideband bit"*/
+      if (speex_bits_remaining(bits)>0)
+         wideband = speex_bits_peek(bits);
+      else
+         wideband = 0;
+      if (wideband)
+      {
+         /*Regular wideband frame, read the submode*/
+         wideband = speex_bits_unpack_unsigned(bits, 1);
+         st->submodeID = speex_bits_unpack_unsigned(bits, SB_SUBMODE_BITS);
+      } else
+      {
+         /*Was a narrowband frame, set "null submode"*/
+         st->submodeID = 0;
+      }
+      if (st->submodeID != 0 && st->submodes[st->submodeID] == NULL)
+      {
+         speex_warning("Invalid mode encountered: corrupted stream?");
+         return -2;
+      }
+   }
+
+   /* If null mode (no transmission), just set a couple things to zero*/
+   if (st->submodes[st->submodeID] == NULL)
+   {
+      if (dtx)
+      {
+         sb_decode_lost(st, out, 1, stack);
+         return 0;
+      }
+
+      for (i=0;i<st->frame_size;i++)
+         st->exc[i]=VERY_SMALL;
+
+      st->first=1;
+
+      /* Final signal synthesis from excitation */
+      iir_mem2(st->exc, st->interp_qlpc, st->high, st->frame_size, st->lpcSize, st->mem_sp);
+
+      fir_mem_up(st->x0d, h0, st->y0, st->full_frame_size, QMF_ORDER, st->g0_mem, stack);
+      fir_mem_up(st->high, h1, st->y1, st->full_frame_size, QMF_ORDER, st->g1_mem, stack);
+
+      mix_and_saturate(st->y0, st->y1, out, st->full_frame_size);
+
+      return 0;
+
+   }
+
+   for (i=0;i<st->frame_size;i++)
+      st->exc[i]=0;
+
+   ALLOC(low_pi_gain, st->nbSubframes, spx_word32_t);
+   ALLOC(low_exc, st->frame_size, spx_word16_t);
+   speex_decoder_ctl(st->st_low, SPEEX_GET_PI_GAIN, low_pi_gain);
+   speex_decoder_ctl(st->st_low, SPEEX_GET_EXC, low_exc);
+
+   SUBMODE(lsp_unquant)(st->qlsp, st->lpcSize, bits);
+   
+   if (st->first)
+   {
+      for (i=0;i<st->lpcSize;i++)
+         st->old_qlsp[i] = st->qlsp[i];
+   }
+   
+   ALLOC(ak, st->lpcSize, spx_coef_t);
+
+   for (sub=0;sub<st->nbSubframes;sub++)
+   {
+      spx_sig_t *exc, *sp, *innov_save=NULL;
+      spx_word16_t filter_ratio;
+      spx_word16_t el=0;
+      int offset;
+      spx_word32_t rl=0,rh=0;
+      
+      offset = st->subframeSize*sub;
+      sp=st->high+offset;
+      exc=st->exc+offset;
+      /* Pointer for saving innovation */
+      if (st->innov_save)
+      {
+         innov_save = st->innov_save+2*offset;
+         for (i=0;i<2*st->subframeSize;i++)
+            innov_save[i]=0;
+      }
+      
+      /* LSP interpolation */
+      lsp_interpolate(st->old_qlsp, st->qlsp, st->interp_qlsp, st->lpcSize, sub, st->nbSubframes);
+
+      lsp_enforce_margin(st->interp_qlsp, st->lpcSize, LSP_MARGIN);
+
+      /* LSP to LPC */
+      lsp_to_lpc(st->interp_qlsp, ak, st->lpcSize, stack);
+
+      /* Calculate reponse ratio between the low and high filter in the middle
+         of the band (4000 Hz) */
+      
+         st->pi_gain[sub]=LPC_SCALING;
+         rh = LPC_SCALING;
+         for (i=0;i<st->lpcSize;i+=2)
+         {
+            rh += st->interp_qlpc[i+1] - st->interp_qlpc[i];
+            st->pi_gain[sub] += st->interp_qlpc[i] + st->interp_qlpc[i+1];
+         }
+
+         rl = low_pi_gain[sub];
+#ifdef FIXED_POINT
+         filter_ratio=PDIV32_16(SHL(rl+82,2),SHR(82+rh,5));
+#else
+         filter_ratio=(rl+.01)/(rh+.01);
+#endif
+      
+      for (i=0;i<st->subframeSize;i++)
+         exc[i]=0;
+      if (!SUBMODE(innovation_unquant))
+      {
+         float g;
+         int quant;
+
+         quant = speex_bits_unpack_unsigned(bits, 5);
+         g= exp(((float)quant-10)/8.0);
+         
+#ifdef FIXED_POINT
+         g /= filter_ratio/128.;
+#else
+         g /= filter_ratio;
+#endif
+         /* High-band excitation using the low-band excitation and a gain */
+         
+#if 0
+         for (i=0;i<st->subframeSize;i++)
+            exc[i]=mode->folding_gain*g*st->low_innov[offset+i];
+#else
+         {
+            float tmp=1;
+            /*static tmp1=0,tmp2=0;
+            static int seed=1;
+            el = compute_rms(low_innov+offset, st->subframeSize);*/
+            for (i=0;i<st->subframeSize;i++)
+            {
+               float e=tmp*g*mode->folding_gain*st->low_innov[offset+i];
+               tmp *= -1;
+               exc[i] = e;
+               /*float r = speex_rand(g*el,&seed);
+               exc[i] = .5*(r+tmp2 + e-tmp1);
+               tmp1 = e;
+               tmp2 = r;*/               
+            }
+            
+         }
+         
+#endif    
+      } else {
+         spx_word16_t gc;
+         spx_word32_t scale;
+         int qgc = speex_bits_unpack_unsigned(bits, 4);
+
+         el = compute_rms16(low_exc+offset, st->subframeSize);
+
+#ifdef FIXED_POINT
+         gc = MULT16_32_Q15(28626,gc_quant_bound[qgc]);
+#else
+         gc = exp((1/3.7)*qgc-0.15556);
+#endif
+
+         if (st->subframeSize==80)
+            gc *= 1.4142;
+
+         scale = SHL(MULT16_16(PDIV32_16(SHL(gc,SIG_SHIFT-6),filter_ratio),(1+el)),6);
+
+         SUBMODE(innovation_unquant)(exc, SUBMODE(innovation_params), st->subframeSize, 
+                                     bits, stack, &st->seed);
+
+         signal_mul(exc,exc,scale,st->subframeSize);
+
+         if (SUBMODE(double_codebook)) {
+            char *tmp_stack=stack;
+            VARDECL(spx_sig_t *innov2);
+            ALLOC(innov2, st->subframeSize, spx_sig_t);
+            for (i=0;i<st->subframeSize;i++)
+               innov2[i]=0;
+            SUBMODE(innovation_unquant)(innov2, SUBMODE(innovation_params), st->subframeSize, 
+                                        bits, stack, &st->seed);
+            for (i=0;i<st->subframeSize;i++)
+               innov2[i]*=scale/(float)SIG_SCALING*(1/2.5);
+            for (i=0;i<st->subframeSize;i++)
+               exc[i] = ADD32(exc[i],innov2[i]);
+            stack = tmp_stack;
+         }
+
+      }
+      
+      if (st->innov_save)
+      {
+         for (i=0;i<st->subframeSize;i++)
+            innov_save[2*i]=exc[i];
+      }
+      
+      for (i=0;i<st->subframeSize;i++)
+         sp[i]=st->excBuf[i];
+      iir_mem2(sp, st->interp_qlpc, sp, st->subframeSize, st->lpcSize, 
+               st->mem_sp);
+      for (i=0;i<st->subframeSize;i++)
+         st->excBuf[i]=exc[i];
+      for (i=0;i<st->lpcSize;i++)
+         st->interp_qlpc[i] = ak[i];
+
+   }
+
+   fir_mem_up(st->x0d, h0, st->y0, st->full_frame_size, QMF_ORDER, st->g0_mem, stack);
+   fir_mem_up(st->high, h1, st->y1, st->full_frame_size, QMF_ORDER, st->g1_mem, stack);
+
+   mix_and_saturate(st->y0, st->y1, out, st->full_frame_size);
+
+   for (i=0;i<st->lpcSize;i++)
+      st->old_qlsp[i] = st->qlsp[i];
+
+   st->first=0;
+
+   return 0;
+}
+
+
+int sb_encoder_ctl(void *state, int request, void *ptr)
+{
+   SBEncState *st;
+   st=(SBEncState*)state;
+   switch(request)
+   {
+   case SPEEX_GET_FRAME_SIZE:
+      (*(spx_int32_t*)ptr) = st->full_frame_size;
+      break;
+   case SPEEX_SET_HIGH_MODE:
+      st->submodeSelect = st->submodeID = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_SET_LOW_MODE:
+      speex_encoder_ctl(st->st_low, SPEEX_SET_LOW_MODE, ptr);
+      break;
+   case SPEEX_SET_DTX:
+      speex_encoder_ctl(st->st_low, SPEEX_SET_DTX, ptr);
+      break;
+   case SPEEX_GET_DTX:
+      speex_encoder_ctl(st->st_low, SPEEX_GET_DTX, ptr);
+      break;
+   case SPEEX_GET_LOW_MODE:
+      speex_encoder_ctl(st->st_low, SPEEX_GET_LOW_MODE, ptr);
+      break;
+   case SPEEX_SET_MODE:
+      speex_encoder_ctl(st, SPEEX_SET_QUALITY, ptr);
+      break;
+   case SPEEX_SET_VBR:
+      st->vbr_enabled = (*(spx_int32_t*)ptr);
+      speex_encoder_ctl(st->st_low, SPEEX_SET_VBR, ptr);
+      break;
+   case SPEEX_GET_VBR:
+      (*(spx_int32_t*)ptr) = st->vbr_enabled;
+      break;
+   case SPEEX_SET_VAD:
+      st->vad_enabled = (*(spx_int32_t*)ptr);
+      speex_encoder_ctl(st->st_low, SPEEX_SET_VAD, ptr);
+      break;
+   case SPEEX_GET_VAD:
+      (*(spx_int32_t*)ptr) = st->vad_enabled;
+      break;
+   case SPEEX_SET_VBR_QUALITY:
+      {
+         spx_int32_t q;
+         float qual = (*(float*)ptr)+.6;
+         st->vbr_quality = (*(float*)ptr);
+         if (qual>10)
+            qual=10;
+         q=(int)floor(.5+*(float*)ptr);
+         if (q>10)
+            q=10;
+         speex_encoder_ctl(st->st_low, SPEEX_SET_VBR_QUALITY, &qual);
+         speex_encoder_ctl(state, SPEEX_SET_QUALITY, &q);
+         break;
+      }
+   case SPEEX_GET_VBR_QUALITY:
+      (*(float*)ptr) = st->vbr_quality;
+      break;
+   case SPEEX_SET_ABR:
+      st->abr_enabled = (*(spx_int32_t*)ptr);
+      st->vbr_enabled = st->abr_enabled!=0;
+      speex_encoder_ctl(st->st_low, SPEEX_SET_VBR, &st->vbr_enabled);
+      if (st->vbr_enabled) 
+      {
+         spx_int32_t i=10, rate, target;
+         float vbr_qual;
+         target = (*(spx_int32_t*)ptr);
+         while (i>=0)
+         {
+            speex_encoder_ctl(st, SPEEX_SET_QUALITY, &i);
+            speex_encoder_ctl(st, SPEEX_GET_BITRATE, &rate);
+            if (rate <= target)
+               break;
+            i--;
+         }
+         vbr_qual=i;
+         if (vbr_qual<0)
+            vbr_qual=0;
+         speex_encoder_ctl(st, SPEEX_SET_VBR_QUALITY, &vbr_qual);
+         st->abr_count=0;
+         st->abr_drift=0;
+         st->abr_drift2=0;
+      }
+      
+      break;
+   case SPEEX_GET_ABR:
+      (*(spx_int32_t*)ptr) = st->abr_enabled;
+      break;
+   case SPEEX_SET_QUALITY:
+      {
+         spx_int32_t nb_qual;
+         int quality = (*(spx_int32_t*)ptr);
+         if (quality < 0)
+            quality = 0;
+         if (quality > 10)
+            quality = 10;
+         st->submodeSelect = st->submodeID = ((const SpeexSBMode*)(st->mode->mode))->quality_map[quality];
+         nb_qual = ((const SpeexSBMode*)(st->mode->mode))->low_quality_map[quality];
+         speex_encoder_ctl(st->st_low, SPEEX_SET_MODE, &nb_qual);
+      }
+      break;
+   case SPEEX_SET_COMPLEXITY:
+      speex_encoder_ctl(st->st_low, SPEEX_SET_COMPLEXITY, ptr);
+      st->complexity = (*(spx_int32_t*)ptr);
+      if (st->complexity<1)
+         st->complexity=1;
+      break;
+   case SPEEX_GET_COMPLEXITY:
+      (*(spx_int32_t*)ptr) = st->complexity;
+      break;
+   case SPEEX_SET_BITRATE:
+      {
+         spx_int32_t i=10;
+         spx_int32_t rate, target;
+         target = (*(spx_int32_t*)ptr);
+         while (i>=0)
+         {
+            speex_encoder_ctl(st, SPEEX_SET_QUALITY, &i);
+            speex_encoder_ctl(st, SPEEX_GET_BITRATE, &rate);
+            if (rate <= target)
+               break;
+            i--;
+         }
+      }
+      break;
+   case SPEEX_GET_BITRATE:
+      speex_encoder_ctl(st->st_low, request, ptr);
+      /*fprintf (stderr, "before: %d\n", (*(int*)ptr));*/
+      if (st->submodes[st->submodeID])
+         (*(spx_int32_t*)ptr) += st->sampling_rate*SUBMODE(bits_per_frame)/st->full_frame_size;
+      else
+         (*(spx_int32_t*)ptr) += st->sampling_rate*(SB_SUBMODE_BITS+1)/st->full_frame_size;
+      /*fprintf (stderr, "after: %d\n", (*(int*)ptr));*/
+      break;
+   case SPEEX_SET_SAMPLING_RATE:
+      {
+         spx_int32_t tmp=(*(spx_int32_t*)ptr);
+         st->sampling_rate = tmp;
+         tmp>>=1;
+         speex_encoder_ctl(st->st_low, SPEEX_SET_SAMPLING_RATE, &tmp);
+      }
+      break;
+   case SPEEX_GET_SAMPLING_RATE:
+      (*(spx_int32_t*)ptr)=st->sampling_rate;
+      break;
+   case SPEEX_RESET_STATE:
+      {
+         int i;
+         st->first = 1;
+         for (i=0;i<st->lpcSize;i++)
+            st->lsp[i]=(M_PI*((float)(i+1)))/(st->lpcSize+1);
+         for (i=0;i<st->lpcSize;i++)
+            st->mem_sw[i]=st->mem_sp[i]=st->mem_sp2[i]=0;
+         for (i=0;i<st->bufSize;i++)
+            st->excBuf[i]=0;
+         for (i=0;i<QMF_ORDER;i++)
+            st->h0_mem[i]=st->h1_mem[i]=st->g0_mem[i]=st->g1_mem[i]=0;
+      }
+      break;
+   case SPEEX_SET_SUBMODE_ENCODING:
+      st->encode_submode = (*(spx_int32_t*)ptr);
+      speex_encoder_ctl(st->st_low, SPEEX_SET_SUBMODE_ENCODING, &ptr);
+      break;
+   case SPEEX_GET_SUBMODE_ENCODING:
+      (*(spx_int32_t*)ptr) = st->encode_submode;
+      break;
+   case SPEEX_GET_LOOKAHEAD:
+      speex_encoder_ctl(st->st_low, SPEEX_GET_LOOKAHEAD, ptr);
+      (*(spx_int32_t*)ptr) = 2*(*(spx_int32_t*)ptr) + QMF_ORDER - 1;
+      break;
+   case SPEEX_SET_PLC_TUNING:
+      speex_encoder_ctl(st->st_low, SPEEX_SET_PLC_TUNING, ptr);
+      break;
+   case SPEEX_GET_PLC_TUNING:
+      speex_encoder_ctl(st->st_low, SPEEX_GET_PLC_TUNING, ptr);
+      break;
+   case SPEEX_SET_VBR_MAX_BITRATE:
+      {
+         st->vbr_max = (*(spx_int32_t*)ptr);
+         if (SPEEX_SET_VBR_MAX_BITRATE<1)
+         {
+            speex_encoder_ctl(st->st_low, SPEEX_SET_VBR_MAX_BITRATE, &st->vbr_max);
+            st->vbr_max_high = 17600;
+         } else {
+            spx_int32_t low_rate;
+            if (st->vbr_max >= 42200)
+            {
+               st->vbr_max_high = 17600;
+            } else if (st->vbr_max >= 27800)
+            {
+               st->vbr_max_high = 9600;
+            } else if (st->vbr_max > 20600)
+            {
+               st->vbr_max_high = 5600;
+            } else {
+               st->vbr_max_high = 1800;
+            }
+            if (st->subframeSize==80)
+               st->vbr_max_high = 1800;
+            low_rate = st->vbr_max - st->vbr_max_high;
+            speex_encoder_ctl(st->st_low, SPEEX_SET_VBR_MAX_BITRATE, &low_rate);
+         }
+      }
+      break;
+   case SPEEX_GET_VBR_MAX_BITRATE:
+      (*(spx_int32_t*)ptr) = st->vbr_max;
+      break;
+   case SPEEX_SET_HIGHPASS:
+      speex_encoder_ctl(st->st_low, SPEEX_SET_HIGHPASS, ptr);
+      break;
+   case SPEEX_GET_HIGHPASS:
+      speex_encoder_ctl(st->st_low, SPEEX_GET_HIGHPASS, ptr);
+      break;
+
+
+   /* This is all internal stuff past this point */
+   case SPEEX_GET_PI_GAIN:
+      {
+         int i;
+         spx_word32_t *g = (spx_word32_t*)ptr;
+         for (i=0;i<st->nbSubframes;i++)
+            g[i]=st->pi_gain[i];
+      }
+      break;
+   case SPEEX_GET_EXC:
+      {
+         int i;
+         spx_sig_t *e = (spx_sig_t*)ptr;
+         for (i=0;i<st->full_frame_size;i++)
+            e[i]=0;
+         for (i=0;i<st->frame_size;i++)
+            e[2*i]=2*st->exc[i];
+      }
+      break;
+   case SPEEX_GET_INNOV:
+      {
+         int i;
+         spx_sig_t *e = (spx_sig_t*)ptr;
+         for (i=0;i<st->full_frame_size;i++)
+            e[i]=0;
+         for (i=0;i<st->frame_size;i++)
+            e[2*i]=2*st->exc[i];
+      }
+      break;
+   case SPEEX_GET_RELATIVE_QUALITY:
+      (*(float*)ptr)=st->relative_quality;
+      break;
+   case SPEEX_SET_INNOVATION_SAVE:
+      st->innov_save = (spx_sig_t*)ptr;
+      break;
+   case SPEEX_SET_WIDEBAND:
+      speex_encoder_ctl(st->st_low, SPEEX_SET_WIDEBAND, ptr);
+      break;
+
+   default:
+      speex_warning_int("Unknown nb_ctl request: ", request);
+      return -1;
+   }
+   return 0;
+}
+
+int sb_decoder_ctl(void *state, int request, void *ptr)
+{
+   SBDecState *st;
+   st=(SBDecState*)state;
+   switch(request)
+   {
+   case SPEEX_SET_HIGH_MODE:
+      st->submodeID = (*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_SET_LOW_MODE:
+      speex_decoder_ctl(st->st_low, SPEEX_SET_LOW_MODE, ptr);
+      break;
+   case SPEEX_GET_LOW_MODE:
+      speex_decoder_ctl(st->st_low, SPEEX_GET_LOW_MODE, ptr);
+      break;
+   case SPEEX_GET_FRAME_SIZE:
+      (*(spx_int32_t*)ptr) = st->full_frame_size;
+      break;
+   case SPEEX_SET_ENH:
+      speex_decoder_ctl(st->st_low, request, ptr);
+      st->lpc_enh_enabled = *((spx_int32_t*)ptr);
+      break;
+   case SPEEX_GET_ENH:
+      *((spx_int32_t*)ptr) = st->lpc_enh_enabled;
+      break;
+   case SPEEX_SET_MODE:
+   case SPEEX_SET_QUALITY:
+      {
+         spx_int32_t nb_qual;
+         int quality = (*(spx_int32_t*)ptr);
+         if (quality < 0)
+            quality = 0;
+         if (quality > 10)
+            quality = 10;
+         st->submodeID = ((const SpeexSBMode*)(st->mode->mode))->quality_map[quality];
+         nb_qual = ((const SpeexSBMode*)(st->mode->mode))->low_quality_map[quality];
+         speex_decoder_ctl(st->st_low, SPEEX_SET_MODE, &nb_qual);
+      }
+      break;
+   case SPEEX_GET_BITRATE:
+      speex_decoder_ctl(st->st_low, request, ptr);
+      if (st->submodes[st->submodeID])
+         (*(spx_int32_t*)ptr) += st->sampling_rate*SUBMODE(bits_per_frame)/st->full_frame_size;
+      else
+         (*(spx_int32_t*)ptr) += st->sampling_rate*(SB_SUBMODE_BITS+1)/st->full_frame_size;
+      break;
+   case SPEEX_SET_SAMPLING_RATE:
+      {
+         spx_int32_t tmp=(*(spx_int32_t*)ptr);
+         st->sampling_rate = tmp;
+         tmp>>=1;
+         speex_decoder_ctl(st->st_low, SPEEX_SET_SAMPLING_RATE, &tmp);
+      }
+      break;
+   case SPEEX_GET_SAMPLING_RATE:
+      (*(spx_int32_t*)ptr)=st->sampling_rate;
+      break;
+   case SPEEX_SET_HANDLER:
+      speex_decoder_ctl(st->st_low, SPEEX_SET_HANDLER, ptr);
+      break;
+   case SPEEX_SET_USER_HANDLER:
+      speex_decoder_ctl(st->st_low, SPEEX_SET_USER_HANDLER, ptr);
+      break;
+   case SPEEX_RESET_STATE:
+      {
+         int i;
+         for (i=0;i<2*st->lpcSize;i++)
+            st->mem_sp[i]=0;
+         for (i=0;i<QMF_ORDER;i++)
+            st->g0_mem[i]=st->g1_mem[i]=0;
+      }
+      break;
+   case SPEEX_SET_SUBMODE_ENCODING:
+      st->encode_submode = (*(spx_int32_t*)ptr);
+      speex_decoder_ctl(st->st_low, SPEEX_SET_SUBMODE_ENCODING, &ptr);
+      break;
+   case SPEEX_GET_SUBMODE_ENCODING:
+      (*(spx_int32_t*)ptr) = st->encode_submode;
+      break;
+   case SPEEX_GET_LOOKAHEAD:
+      speex_decoder_ctl(st->st_low, SPEEX_GET_LOOKAHEAD, ptr);
+      (*(spx_int32_t*)ptr) = 2*(*(spx_int32_t*)ptr);
+      break;
+   case SPEEX_SET_HIGHPASS:
+      speex_decoder_ctl(st->st_low, SPEEX_SET_HIGHPASS, ptr);
+      break;
+   case SPEEX_GET_HIGHPASS:
+      speex_decoder_ctl(st->st_low, SPEEX_GET_HIGHPASS, ptr);
+      break;
+
+   case SPEEX_GET_PI_GAIN:
+      {
+         int i;
+         spx_word32_t *g = (spx_word32_t*)ptr;
+         for (i=0;i<st->nbSubframes;i++)
+            g[i]=st->pi_gain[i];
+      }
+      break;
+   case SPEEX_GET_EXC:
+      {
+         int i;
+         spx_sig_t *e = (spx_sig_t*)ptr;
+         for (i=0;i<st->full_frame_size;i++)
+            e[i]=0;
+         for (i=0;i<st->frame_size;i++)
+            e[2*i]=2*st->exc[i];
+      }
+      break;
+   case SPEEX_GET_INNOV:
+      {
+         int i;
+         spx_sig_t *e = (spx_sig_t*)ptr;
+         for (i=0;i<st->full_frame_size;i++)
+            e[i]=0;
+         for (i=0;i<st->frame_size;i++)
+            e[2*i]=2*st->exc[i];
+      }
+      break;
+   case SPEEX_GET_DTX_STATUS:
+      speex_decoder_ctl(st->st_low, SPEEX_GET_DTX_STATUS, ptr);
+      break;
+   case SPEEX_SET_INNOVATION_SAVE:
+      st->innov_save = (spx_sig_t*)ptr;
+      break;
+   case SPEEX_SET_WIDEBAND:
+      speex_decoder_ctl(st->st_low, SPEEX_SET_WIDEBAND, ptr);
+      break;
+
+   default:
+      speex_warning_int("Unknown nb_ctl request: ", request);
+      return -1;
+   }
+   return 0;
+}
+
+#endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/sb_celp.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/sb_celp.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/sb_celp.h	(revision 1163)
@@ -0,0 +1,176 @@
+/* Copyright (C) 2002-2006 Jean-Marc Valin */
+/**
+   @file sb_celp.h
+   @brief Sub-band CELP mode used for wideband encoding
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifndef SB_CELP_H
+#define SB_CELP_H
+
+#include "modes.h"
+#include <speex/speex_bits.h>
+#include "nb_celp.h"
+
+/**Structure representing the full state of the sub-band encoder*/
+typedef struct SBEncState {
+   const SpeexMode *mode;         /**< Pointer to the mode (containing for vtable info) */
+   void *st_low;                  /**< State of the low-band (narrowband) encoder */
+   int    full_frame_size;        /**< Length of full-band frames*/
+   int    frame_size;             /**< Length of high-band frames*/
+   int    subframeSize;           /**< Length of high-band sub-frames*/
+   int    nbSubframes;            /**< Number of high-band sub-frames*/
+   int    windowSize;             /**< Length of high-band LPC window*/
+   int    lpcSize;                /**< Order of high-band LPC analysis */
+   int    bufSize;                /**< Buffer size */
+   int    first;                  /**< First frame? */
+   float  lag_factor;             /**< Lag-windowing control parameter */
+   spx_word16_t  lpc_floor;       /**< Controls LPC analysis noise floor */
+   spx_word16_t  gamma1;          /**< Perceptual weighting coef 1 */
+   spx_word16_t  gamma2;          /**< Perceptual weighting coef 2 */
+
+   char  *stack;                  /**< Temporary allocation stack */
+   spx_sig_t *x0d, *x1d;          /**< QMF filter signals*/
+   spx_sig_t *high;               /**< High-band signal (buffer) */
+   spx_sig_t *y0, *y1;            /**< QMF synthesis signals */
+   spx_word16_t *h0_mem, *h1_mem;
+   spx_word32_t *g0_mem, *g1_mem; /**< QMF memories */
+
+   spx_sig_t *excBuf;             /**< High-band excitation */
+   spx_sig_t *exc;                /**< High-band excitation (for QMF only)*/
+   spx_sig_t *res;                /**< Zero-input response (ringing) */
+   spx_sig_t *sw;                 /**< Perceptually weighted signal */
+   const spx_word16_t *window;    /**< LPC analysis window */
+   spx_word16_t *lagWindow;       /**< Auto-correlation window */
+   spx_word16_t *autocorr;        /**< Auto-correlation (for LPC analysis) */
+   spx_coef_t *lpc;               /**< LPC coefficients */
+   spx_lsp_t *lsp;                /**< LSP coefficients */
+   spx_lsp_t *qlsp;               /**< Quantized LSPs */
+   spx_lsp_t *old_lsp;            /**< LSPs of previous frame */
+   spx_lsp_t *old_qlsp;           /**< Quantized LSPs of previous frame */
+   spx_lsp_t *interp_lsp;         /**< Interpolated LSPs for current sub-frame */
+   spx_lsp_t *interp_qlsp;        /**< Interpolated quantized LSPs for current sub-frame */
+   spx_coef_t *interp_lpc;        /**< Interpolated LPCs for current sub-frame */
+   spx_coef_t *interp_qlpc;       /**< Interpolated quantized LPCs for current sub-frame */
+   spx_coef_t *bw_lpc1;           /**< Bandwidth-expanded version of LPCs (#1) */
+   spx_coef_t *bw_lpc2;           /**< Bandwidth-expanded version of LPCs (#2) */
+
+   spx_mem_t *mem_sp;             /**< Synthesis signal memory */
+   spx_mem_t *mem_sp2;
+   spx_mem_t *mem_sw;             /**< Perceptual signal memory */
+   spx_word32_t *pi_gain;
+   spx_sig_t *innov_save;         /**< If non-NULL, innovation is copied here */
+   spx_sig_t *low_innov;          /**< Lower-band innovation is copied here magically */
+
+   float  vbr_quality;            /**< Quality setting for VBR encoding */
+   int    vbr_enabled;            /**< 1 for enabling VBR, 0 otherwise */
+   spx_int32_t vbr_max;           /**< Max bit-rate allowed in VBR mode (total) */
+   spx_int32_t vbr_max_high;      /**< Max bit-rate allowed in VBR mode for the high-band */
+   spx_int32_t abr_enabled;       /**< ABR setting (in bps), 0 if off */
+   float  abr_drift;
+   float  abr_drift2;
+   float  abr_count;
+   int    vad_enabled;            /**< 1 for enabling VAD, 0 otherwise */
+   float  relative_quality;
+
+   int    encode_submode;
+   const SpeexSubmode * const *submodes;
+   int    submodeID;
+   int    submodeSelect;
+   int    complexity;
+   spx_int32_t sampling_rate;
+
+} SBEncState;
+
+
+/**Structure representing the full state of the sub-band decoder*/
+typedef struct SBDecState {
+   const SpeexMode *mode;            /**< Pointer to the mode (containing for vtable info) */
+   void *st_low;               /**< State of the low-band (narrowband) encoder */
+   int    full_frame_size;
+   int    frame_size;
+   int    subframeSize;
+   int    nbSubframes;
+   int    lpcSize;
+   int    first;
+   spx_int32_t sampling_rate;
+   int    lpc_enh_enabled;
+
+   char  *stack;
+   spx_sig_t *x0d, *x1d;
+   spx_sig_t *high;
+   spx_sig_t *y0, *y1;
+   spx_word32_t *g0_mem, *g1_mem;
+
+   spx_sig_t *exc;
+   spx_sig_t *excBuf;
+   spx_lsp_t *qlsp;
+   spx_lsp_t *old_qlsp;
+   spx_lsp_t *interp_qlsp;
+   spx_coef_t *interp_qlpc;
+
+   spx_mem_t *mem_sp;
+   spx_word32_t *pi_gain;
+   spx_sig_t *innov_save;      /** If non-NULL, innovation is copied here */
+   spx_sig_t *low_innov;       /** Lower-band innovation is copied here magically */
+   
+   spx_int32_t seed;
+
+   int    encode_submode;
+   const SpeexSubmode * const *submodes;
+   int    submodeID;
+} SBDecState;
+
+
+/**Initializes encoder state*/
+void *sb_encoder_init(const SpeexMode *m);
+
+/**De-allocates encoder state resources*/
+void sb_encoder_destroy(void *state);
+
+/**Encodes one frame*/
+int sb_encode(void *state, void *in, SpeexBits *bits);
+
+
+/**Initializes decoder state*/
+void *sb_decoder_init(const SpeexMode *m);
+
+/**De-allocates decoder state resources*/
+void sb_decoder_destroy(void *state);
+
+/**Decodes one frame*/
+int sb_decode(void *state, SpeexBits *bits, void *out);
+
+int sb_encoder_ctl(void *state, int request, void *ptr);
+
+int sb_decoder_ctl(void *state, int request, void *ptr);
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/smallft.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/smallft.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/smallft.c	(revision 1163)
@@ -0,0 +1,1260 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: *unnormalized* fft transform
+ last mod: $Id$
+
+ ********************************************************************/
+
+/* FFT implementation from OggSquish, minus cosine transforms,
+ * minus all but radix 2/4 case.  In Vorbis we only need this
+ * cut-down version.
+ *
+ * To do more than just power-of-two sized vectors, see the full
+ * version I wrote for NetLib.
+ *
+ * Note that the packing is a little strange; rather than the FFT r/i
+ * packing following R_0, I_n, R_1, I_1, R_2, I_2 ... R_n-1, I_n-1,
+ * it follows R_0, R_1, I_1, R_2, I_2 ... R_n-1, I_n-1, I_n like the
+ * FORTRAN version
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <math.h>
+#include "smallft.h"
+#include "misc.h"
+
+static void drfti1(int n, float *wa, int *ifac){
+  static int ntryh[4] = { 4,2,3,5 };
+  static float tpi = 6.28318530717958648f;
+  float arg,argh,argld,fi;
+  int ntry=0,i,j=-1;
+  int k1, l1, l2, ib;
+  int ld, ii, ip, is, nq, nr;
+  int ido, ipm, nfm1;
+  int nl=n;
+  int nf=0;
+
+ L101:
+  j++;
+  if (j < 4)
+    ntry=ntryh[j];
+  else
+    ntry+=2;
+
+ L104:
+  nq=nl/ntry;
+  nr=nl-ntry*nq;
+  if (nr!=0) goto L101;
+
+  nf++;
+  ifac[nf+1]=ntry;
+  nl=nq;
+  if(ntry!=2)goto L107;
+  if(nf==1)goto L107;
+
+  for (i=1;i<nf;i++){
+    ib=nf-i+1;
+    ifac[ib+1]=ifac[ib];
+  }
+  ifac[2] = 2;
+
+ L107:
+  if(nl!=1)goto L104;
+  ifac[0]=n;
+  ifac[1]=nf;
+  argh=tpi/n;
+  is=0;
+  nfm1=nf-1;
+  l1=1;
+
+  if(nfm1==0)return;
+
+  for (k1=0;k1<nfm1;k1++){
+    ip=ifac[k1+2];
+    ld=0;
+    l2=l1*ip;
+    ido=n/l2;
+    ipm=ip-1;
+
+    for (j=0;j<ipm;j++){
+      ld+=l1;
+      i=is;
+      argld=(float)ld*argh;
+      fi=0.f;
+      for (ii=2;ii<ido;ii+=2){
+	fi+=1.f;
+	arg=fi*argld;
+	wa[i++]=cos(arg);
+	wa[i++]=sin(arg);
+      }
+      is+=ido;
+    }
+    l1=l2;
+  }
+}
+
+static void fdrffti(int n, float *wsave, int *ifac){
+
+  if (n == 1) return;
+  drfti1(n, wsave+n, ifac);
+}
+
+static void dradf2(int ido,int l1,float *cc,float *ch,float *wa1){
+  int i,k;
+  float ti2,tr2;
+  int t0,t1,t2,t3,t4,t5,t6;
+
+  t1=0;
+  t0=(t2=l1*ido);
+  t3=ido<<1;
+  for(k=0;k<l1;k++){
+    ch[t1<<1]=cc[t1]+cc[t2];
+    ch[(t1<<1)+t3-1]=cc[t1]-cc[t2];
+    t1+=ido;
+    t2+=ido;
+  }
+    
+  if(ido<2)return;
+  if(ido==2)goto L105;
+
+  t1=0;
+  t2=t0;
+  for(k=0;k<l1;k++){
+    t3=t2;
+    t4=(t1<<1)+(ido<<1);
+    t5=t1;
+    t6=t1+t1;
+    for(i=2;i<ido;i+=2){
+      t3+=2;
+      t4-=2;
+      t5+=2;
+      t6+=2;
+      tr2=wa1[i-2]*cc[t3-1]+wa1[i-1]*cc[t3];
+      ti2=wa1[i-2]*cc[t3]-wa1[i-1]*cc[t3-1];
+      ch[t6]=cc[t5]+ti2;
+      ch[t4]=ti2-cc[t5];
+      ch[t6-1]=cc[t5-1]+tr2;
+      ch[t4-1]=cc[t5-1]-tr2;
+    }
+    t1+=ido;
+    t2+=ido;
+  }
+
+  if(ido%2==1)return;
+
+ L105:
+  t3=(t2=(t1=ido)-1);
+  t2+=t0;
+  for(k=0;k<l1;k++){
+    ch[t1]=-cc[t2];
+    ch[t1-1]=cc[t3];
+    t1+=ido<<1;
+    t2+=ido;
+    t3+=ido;
+  }
+}
+
+static void dradf4(int ido,int l1,float *cc,float *ch,float *wa1,
+	    float *wa2,float *wa3){
+  static float hsqt2 = .70710678118654752f;
+  int i,k,t0,t1,t2,t3,t4,t5,t6;
+  float ci2,ci3,ci4,cr2,cr3,cr4,ti1,ti2,ti3,ti4,tr1,tr2,tr3,tr4;
+  t0=l1*ido;
+  
+  t1=t0;
+  t4=t1<<1;
+  t2=t1+(t1<<1);
+  t3=0;
+
+  for(k=0;k<l1;k++){
+    tr1=cc[t1]+cc[t2];
+    tr2=cc[t3]+cc[t4];
+
+    ch[t5=t3<<2]=tr1+tr2;
+    ch[(ido<<2)+t5-1]=tr2-tr1;
+    ch[(t5+=(ido<<1))-1]=cc[t3]-cc[t4];
+    ch[t5]=cc[t2]-cc[t1];
+
+    t1+=ido;
+    t2+=ido;
+    t3+=ido;
+    t4+=ido;
+  }
+
+  if(ido<2)return;
+  if(ido==2)goto L105;
+
+
+  t1=0;
+  for(k=0;k<l1;k++){
+    t2=t1;
+    t4=t1<<2;
+    t5=(t6=ido<<1)+t4;
+    for(i=2;i<ido;i+=2){
+      t3=(t2+=2);
+      t4+=2;
+      t5-=2;
+
+      t3+=t0;
+      cr2=wa1[i-2]*cc[t3-1]+wa1[i-1]*cc[t3];
+      ci2=wa1[i-2]*cc[t3]-wa1[i-1]*cc[t3-1];
+      t3+=t0;
+      cr3=wa2[i-2]*cc[t3-1]+wa2[i-1]*cc[t3];
+      ci3=wa2[i-2]*cc[t3]-wa2[i-1]*cc[t3-1];
+      t3+=t0;
+      cr4=wa3[i-2]*cc[t3-1]+wa3[i-1]*cc[t3];
+      ci4=wa3[i-2]*cc[t3]-wa3[i-1]*cc[t3-1];
+
+      tr1=cr2+cr4;
+      tr4=cr4-cr2;
+      ti1=ci2+ci4;
+      ti4=ci2-ci4;
+
+      ti2=cc[t2]+ci3;
+      ti3=cc[t2]-ci3;
+      tr2=cc[t2-1]+cr3;
+      tr3=cc[t2-1]-cr3;
+
+      ch[t4-1]=tr1+tr2;
+      ch[t4]=ti1+ti2;
+
+      ch[t5-1]=tr3-ti4;
+      ch[t5]=tr4-ti3;
+
+      ch[t4+t6-1]=ti4+tr3;
+      ch[t4+t6]=tr4+ti3;
+
+      ch[t5+t6-1]=tr2-tr1;
+      ch[t5+t6]=ti1-ti2;
+    }
+    t1+=ido;
+  }
+  if(ido&1)return;
+
+ L105:
+  
+  t2=(t1=t0+ido-1)+(t0<<1);
+  t3=ido<<2;
+  t4=ido;
+  t5=ido<<1;
+  t6=ido;
+
+  for(k=0;k<l1;k++){
+    ti1=-hsqt2*(cc[t1]+cc[t2]);
+    tr1=hsqt2*(cc[t1]-cc[t2]);
+
+    ch[t4-1]=tr1+cc[t6-1];
+    ch[t4+t5-1]=cc[t6-1]-tr1;
+
+    ch[t4]=ti1-cc[t1+t0];
+    ch[t4+t5]=ti1+cc[t1+t0];
+
+    t1+=ido;
+    t2+=ido;
+    t4+=t3;
+    t6+=ido;
+  }
+}
+
+static void dradfg(int ido,int ip,int l1,int idl1,float *cc,float *c1,
+                          float *c2,float *ch,float *ch2,float *wa){
+
+  static float tpi=6.283185307179586f;
+  int idij,ipph,i,j,k,l,ic,ik,is;
+  int t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
+  float dc2,ai1,ai2,ar1,ar2,ds2;
+  int nbd;
+  float dcp,arg,dsp,ar1h,ar2h;
+  int idp2,ipp2;
+  
+  arg=tpi/(float)ip;
+  dcp=cos(arg);
+  dsp=sin(arg);
+  ipph=(ip+1)>>1;
+  ipp2=ip;
+  idp2=ido;
+  nbd=(ido-1)>>1;
+  t0=l1*ido;
+  t10=ip*ido;
+
+  if(ido==1)goto L119;
+  for(ik=0;ik<idl1;ik++)ch2[ik]=c2[ik];
+
+  t1=0;
+  for(j=1;j<ip;j++){
+    t1+=t0;
+    t2=t1;
+    for(k=0;k<l1;k++){
+      ch[t2]=c1[t2];
+      t2+=ido;
+    }
+  }
+
+  is=-ido;
+  t1=0;
+  if(nbd>l1){
+    for(j=1;j<ip;j++){
+      t1+=t0;
+      is+=ido;
+      t2= -ido+t1;
+      for(k=0;k<l1;k++){
+        idij=is-1;
+        t2+=ido;
+        t3=t2;
+        for(i=2;i<ido;i+=2){
+          idij+=2;
+          t3+=2;
+          ch[t3-1]=wa[idij-1]*c1[t3-1]+wa[idij]*c1[t3];
+          ch[t3]=wa[idij-1]*c1[t3]-wa[idij]*c1[t3-1];
+        }
+      }
+    }
+  }else{
+
+    for(j=1;j<ip;j++){
+      is+=ido;
+      idij=is-1;
+      t1+=t0;
+      t2=t1;
+      for(i=2;i<ido;i+=2){
+        idij+=2;
+        t2+=2;
+        t3=t2;
+        for(k=0;k<l1;k++){
+          ch[t3-1]=wa[idij-1]*c1[t3-1]+wa[idij]*c1[t3];
+          ch[t3]=wa[idij-1]*c1[t3]-wa[idij]*c1[t3-1];
+          t3+=ido;
+        }
+      }
+    }
+  }
+
+  t1=0;
+  t2=ipp2*t0;
+  if(nbd<l1){
+    for(j=1;j<ipph;j++){
+      t1+=t0;
+      t2-=t0;
+      t3=t1;
+      t4=t2;
+      for(i=2;i<ido;i+=2){
+        t3+=2;
+        t4+=2;
+        t5=t3-ido;
+        t6=t4-ido;
+        for(k=0;k<l1;k++){
+          t5+=ido;
+          t6+=ido;
+          c1[t5-1]=ch[t5-1]+ch[t6-1];
+          c1[t6-1]=ch[t5]-ch[t6];
+          c1[t5]=ch[t5]+ch[t6];
+          c1[t6]=ch[t6-1]-ch[t5-1];
+        }
+      }
+    }
+  }else{
+    for(j=1;j<ipph;j++){
+      t1+=t0;
+      t2-=t0;
+      t3=t1;
+      t4=t2;
+      for(k=0;k<l1;k++){
+        t5=t3;
+        t6=t4;
+        for(i=2;i<ido;i+=2){
+          t5+=2;
+          t6+=2;
+          c1[t5-1]=ch[t5-1]+ch[t6-1];
+          c1[t6-1]=ch[t5]-ch[t6];
+          c1[t5]=ch[t5]+ch[t6];
+          c1[t6]=ch[t6-1]-ch[t5-1];
+        }
+        t3+=ido;
+        t4+=ido;
+      }
+    }
+  }
+
+L119:
+  for(ik=0;ik<idl1;ik++)c2[ik]=ch2[ik];
+
+  t1=0;
+  t2=ipp2*idl1;
+  for(j=1;j<ipph;j++){
+    t1+=t0;
+    t2-=t0;
+    t3=t1-ido;
+    t4=t2-ido;
+    for(k=0;k<l1;k++){
+      t3+=ido;
+      t4+=ido;
+      c1[t3]=ch[t3]+ch[t4];
+      c1[t4]=ch[t4]-ch[t3];
+    }
+  }
+
+  ar1=1.f;
+  ai1=0.f;
+  t1=0;
+  t2=ipp2*idl1;
+  t3=(ip-1)*idl1;
+  for(l=1;l<ipph;l++){
+    t1+=idl1;
+    t2-=idl1;
+    ar1h=dcp*ar1-dsp*ai1;
+    ai1=dcp*ai1+dsp*ar1;
+    ar1=ar1h;
+    t4=t1;
+    t5=t2;
+    t6=t3;
+    t7=idl1;
+
+    for(ik=0;ik<idl1;ik++){
+      ch2[t4++]=c2[ik]+ar1*c2[t7++];
+      ch2[t5++]=ai1*c2[t6++];
+    }
+
+    dc2=ar1;
+    ds2=ai1;
+    ar2=ar1;
+    ai2=ai1;
+
+    t4=idl1;
+    t5=(ipp2-1)*idl1;
+    for(j=2;j<ipph;j++){
+      t4+=idl1;
+      t5-=idl1;
+
+      ar2h=dc2*ar2-ds2*ai2;
+      ai2=dc2*ai2+ds2*ar2;
+      ar2=ar2h;
+
+      t6=t1;
+      t7=t2;
+      t8=t4;
+      t9=t5;
+      for(ik=0;ik<idl1;ik++){
+        ch2[t6++]+=ar2*c2[t8++];
+        ch2[t7++]+=ai2*c2[t9++];
+      }
+    }
+  }
+
+  t1=0;
+  for(j=1;j<ipph;j++){
+    t1+=idl1;
+    t2=t1;
+    for(ik=0;ik<idl1;ik++)ch2[ik]+=c2[t2++];
+  }
+
+  if(ido<l1)goto L132;
+
+  t1=0;
+  t2=0;
+  for(k=0;k<l1;k++){
+    t3=t1;
+    t4=t2;
+    for(i=0;i<ido;i++)cc[t4++]=ch[t3++];
+    t1+=ido;
+    t2+=t10;
+  }
+
+  goto L135;
+
+ L132:
+  for(i=0;i<ido;i++){
+    t1=i;
+    t2=i;
+    for(k=0;k<l1;k++){
+      cc[t2]=ch[t1];
+      t1+=ido;
+      t2+=t10;
+    }
+  }
+
+ L135:
+  t1=0;
+  t2=ido<<1;
+  t3=0;
+  t4=ipp2*t0;
+  for(j=1;j<ipph;j++){
+
+    t1+=t2;
+    t3+=t0;
+    t4-=t0;
+
+    t5=t1;
+    t6=t3;
+    t7=t4;
+
+    for(k=0;k<l1;k++){
+      cc[t5-1]=ch[t6];
+      cc[t5]=ch[t7];
+      t5+=t10;
+      t6+=ido;
+      t7+=ido;
+    }
+  }
+
+  if(ido==1)return;
+  if(nbd<l1)goto L141;
+
+  t1=-ido;
+  t3=0;
+  t4=0;
+  t5=ipp2*t0;
+  for(j=1;j<ipph;j++){
+    t1+=t2;
+    t3+=t2;
+    t4+=t0;
+    t5-=t0;
+    t6=t1;
+    t7=t3;
+    t8=t4;
+    t9=t5;
+    for(k=0;k<l1;k++){
+      for(i=2;i<ido;i+=2){
+        ic=idp2-i;
+        cc[i+t7-1]=ch[i+t8-1]+ch[i+t9-1];
+        cc[ic+t6-1]=ch[i+t8-1]-ch[i+t9-1];
+        cc[i+t7]=ch[i+t8]+ch[i+t9];
+        cc[ic+t6]=ch[i+t9]-ch[i+t8];
+      }
+      t6+=t10;
+      t7+=t10;
+      t8+=ido;
+      t9+=ido;
+    }
+  }
+  return;
+
+ L141:
+
+  t1=-ido;
+  t3=0;
+  t4=0;
+  t5=ipp2*t0;
+  for(j=1;j<ipph;j++){
+    t1+=t2;
+    t3+=t2;
+    t4+=t0;
+    t5-=t0;
+    for(i=2;i<ido;i+=2){
+      t6=idp2+t1-i;
+      t7=i+t3;
+      t8=i+t4;
+      t9=i+t5;
+      for(k=0;k<l1;k++){
+        cc[t7-1]=ch[t8-1]+ch[t9-1];
+        cc[t6-1]=ch[t8-1]-ch[t9-1];
+        cc[t7]=ch[t8]+ch[t9];
+        cc[t6]=ch[t9]-ch[t8];
+        t6+=t10;
+        t7+=t10;
+        t8+=ido;
+        t9+=ido;
+      }
+    }
+  }
+}
+
+static void drftf1(int n,float *c,float *ch,float *wa,int *ifac){
+  int i,k1,l1,l2;
+  int na,kh,nf;
+  int ip,iw,ido,idl1,ix2,ix3;
+
+  nf=ifac[1];
+  na=1;
+  l2=n;
+  iw=n;
+
+  for(k1=0;k1<nf;k1++){
+    kh=nf-k1;
+    ip=ifac[kh+1];
+    l1=l2/ip;
+    ido=n/l2;
+    idl1=ido*l1;
+    iw-=(ip-1)*ido;
+    na=1-na;
+
+    if(ip!=4)goto L102;
+
+    ix2=iw+ido;
+    ix3=ix2+ido;
+    if(na!=0)
+      dradf4(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1);
+    else
+      dradf4(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1);
+    goto L110;
+
+ L102:
+    if(ip!=2)goto L104;
+    if(na!=0)goto L103;
+
+    dradf2(ido,l1,c,ch,wa+iw-1);
+    goto L110;
+
+  L103:
+    dradf2(ido,l1,ch,c,wa+iw-1);
+    goto L110;
+
+  L104:
+    if(ido==1)na=1-na;
+    if(na!=0)goto L109;
+
+    dradfg(ido,ip,l1,idl1,c,c,c,ch,ch,wa+iw-1);
+    na=1;
+    goto L110;
+
+  L109:
+    dradfg(ido,ip,l1,idl1,ch,ch,ch,c,c,wa+iw-1);
+    na=0;
+
+  L110:
+    l2=l1;
+  }
+
+  if(na==1)return;
+
+  for(i=0;i<n;i++)c[i]=ch[i];
+}
+
+static void dradb2(int ido,int l1,float *cc,float *ch,float *wa1){
+  int i,k,t0,t1,t2,t3,t4,t5,t6;
+  float ti2,tr2;
+
+  t0=l1*ido;
+  
+  t1=0;
+  t2=0;
+  t3=(ido<<1)-1;
+  for(k=0;k<l1;k++){
+    ch[t1]=cc[t2]+cc[t3+t2];
+    ch[t1+t0]=cc[t2]-cc[t3+t2];
+    t2=(t1+=ido)<<1;
+  }
+
+  if(ido<2)return;
+  if(ido==2)goto L105;
+
+  t1=0;
+  t2=0;
+  for(k=0;k<l1;k++){
+    t3=t1;
+    t5=(t4=t2)+(ido<<1);
+    t6=t0+t1;
+    for(i=2;i<ido;i+=2){
+      t3+=2;
+      t4+=2;
+      t5-=2;
+      t6+=2;
+      ch[t3-1]=cc[t4-1]+cc[t5-1];
+      tr2=cc[t4-1]-cc[t5-1];
+      ch[t3]=cc[t4]-cc[t5];
+      ti2=cc[t4]+cc[t5];
+      ch[t6-1]=wa1[i-2]*tr2-wa1[i-1]*ti2;
+      ch[t6]=wa1[i-2]*ti2+wa1[i-1]*tr2;
+    }
+    t2=(t1+=ido)<<1;
+  }
+
+  if(ido%2==1)return;
+
+L105:
+  t1=ido-1;
+  t2=ido-1;
+  for(k=0;k<l1;k++){
+    ch[t1]=cc[t2]+cc[t2];
+    ch[t1+t0]=-(cc[t2+1]+cc[t2+1]);
+    t1+=ido;
+    t2+=ido<<1;
+  }
+}
+
+static void dradb3(int ido,int l1,float *cc,float *ch,float *wa1,
+                          float *wa2){
+  static float taur = -.5f;
+  static float taui = .8660254037844386f;
+  int i,k,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
+  float ci2,ci3,di2,di3,cr2,cr3,dr2,dr3,ti2,tr2;
+  t0=l1*ido;
+
+  t1=0;
+  t2=t0<<1;
+  t3=ido<<1;
+  t4=ido+(ido<<1);
+  t5=0;
+  for(k=0;k<l1;k++){
+    tr2=cc[t3-1]+cc[t3-1];
+    cr2=cc[t5]+(taur*tr2);
+    ch[t1]=cc[t5]+tr2;
+    ci3=taui*(cc[t3]+cc[t3]);
+    ch[t1+t0]=cr2-ci3;
+    ch[t1+t2]=cr2+ci3;
+    t1+=ido;
+    t3+=t4;
+    t5+=t4;
+  }
+
+  if(ido==1)return;
+
+  t1=0;
+  t3=ido<<1;
+  for(k=0;k<l1;k++){
+    t7=t1+(t1<<1);
+    t6=(t5=t7+t3);
+    t8=t1;
+    t10=(t9=t1+t0)+t0;
+
+    for(i=2;i<ido;i+=2){
+      t5+=2;
+      t6-=2;
+      t7+=2;
+      t8+=2;
+      t9+=2;
+      t10+=2;
+      tr2=cc[t5-1]+cc[t6-1];
+      cr2=cc[t7-1]+(taur*tr2);
+      ch[t8-1]=cc[t7-1]+tr2;
+      ti2=cc[t5]-cc[t6];
+      ci2=cc[t7]+(taur*ti2);
+      ch[t8]=cc[t7]+ti2;
+      cr3=taui*(cc[t5-1]-cc[t6-1]);
+      ci3=taui*(cc[t5]+cc[t6]);
+      dr2=cr2-ci3;
+      dr3=cr2+ci3;
+      di2=ci2+cr3;
+      di3=ci2-cr3;
+      ch[t9-1]=wa1[i-2]*dr2-wa1[i-1]*di2;
+      ch[t9]=wa1[i-2]*di2+wa1[i-1]*dr2;
+      ch[t10-1]=wa2[i-2]*dr3-wa2[i-1]*di3;
+      ch[t10]=wa2[i-2]*di3+wa2[i-1]*dr3;
+    }
+    t1+=ido;
+  }
+}
+
+static void dradb4(int ido,int l1,float *cc,float *ch,float *wa1,
+			  float *wa2,float *wa3){
+  static float sqrt2=1.414213562373095f;
+  int i,k,t0,t1,t2,t3,t4,t5,t6,t7,t8;
+  float ci2,ci3,ci4,cr2,cr3,cr4,ti1,ti2,ti3,ti4,tr1,tr2,tr3,tr4;
+  t0=l1*ido;
+  
+  t1=0;
+  t2=ido<<2;
+  t3=0;
+  t6=ido<<1;
+  for(k=0;k<l1;k++){
+    t4=t3+t6;
+    t5=t1;
+    tr3=cc[t4-1]+cc[t4-1];
+    tr4=cc[t4]+cc[t4]; 
+    tr1=cc[t3]-cc[(t4+=t6)-1];
+    tr2=cc[t3]+cc[t4-1];
+    ch[t5]=tr2+tr3;
+    ch[t5+=t0]=tr1-tr4;
+    ch[t5+=t0]=tr2-tr3;
+    ch[t5+=t0]=tr1+tr4;
+    t1+=ido;
+    t3+=t2;
+  }
+
+  if(ido<2)return;
+  if(ido==2)goto L105;
+
+  t1=0;
+  for(k=0;k<l1;k++){
+    t5=(t4=(t3=(t2=t1<<2)+t6))+t6;
+    t7=t1;
+    for(i=2;i<ido;i+=2){
+      t2+=2;
+      t3+=2;
+      t4-=2;
+      t5-=2;
+      t7+=2;
+      ti1=cc[t2]+cc[t5];
+      ti2=cc[t2]-cc[t5];
+      ti3=cc[t3]-cc[t4];
+      tr4=cc[t3]+cc[t4];
+      tr1=cc[t2-1]-cc[t5-1];
+      tr2=cc[t2-1]+cc[t5-1];
+      ti4=cc[t3-1]-cc[t4-1];
+      tr3=cc[t3-1]+cc[t4-1];
+      ch[t7-1]=tr2+tr3;
+      cr3=tr2-tr3;
+      ch[t7]=ti2+ti3;
+      ci3=ti2-ti3;
+      cr2=tr1-tr4;
+      cr4=tr1+tr4;
+      ci2=ti1+ti4;
+      ci4=ti1-ti4;
+
+      ch[(t8=t7+t0)-1]=wa1[i-2]*cr2-wa1[i-1]*ci2;
+      ch[t8]=wa1[i-2]*ci2+wa1[i-1]*cr2;
+      ch[(t8+=t0)-1]=wa2[i-2]*cr3-wa2[i-1]*ci3;
+      ch[t8]=wa2[i-2]*ci3+wa2[i-1]*cr3;
+      ch[(t8+=t0)-1]=wa3[i-2]*cr4-wa3[i-1]*ci4;
+      ch[t8]=wa3[i-2]*ci4+wa3[i-1]*cr4;
+    }
+    t1+=ido;
+  }
+
+  if(ido%2 == 1)return;
+
+ L105:
+
+  t1=ido;
+  t2=ido<<2;
+  t3=ido-1;
+  t4=ido+(ido<<1);
+  for(k=0;k<l1;k++){
+    t5=t3;
+    ti1=cc[t1]+cc[t4];
+    ti2=cc[t4]-cc[t1];
+    tr1=cc[t1-1]-cc[t4-1];
+    tr2=cc[t1-1]+cc[t4-1];
+    ch[t5]=tr2+tr2;
+    ch[t5+=t0]=sqrt2*(tr1-ti1);
+    ch[t5+=t0]=ti2+ti2;
+    ch[t5+=t0]=-sqrt2*(tr1+ti1);
+
+    t3+=ido;
+    t1+=t2;
+    t4+=t2;
+  }
+}
+
+static void dradbg(int ido,int ip,int l1,int idl1,float *cc,float *c1,
+            float *c2,float *ch,float *ch2,float *wa){
+  static float tpi=6.283185307179586f;
+  int idij,ipph,i,j,k,l,ik,is,t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,
+      t11,t12;
+  float dc2,ai1,ai2,ar1,ar2,ds2;
+  int nbd;
+  float dcp,arg,dsp,ar1h,ar2h;
+  int ipp2;
+
+  t10=ip*ido;
+  t0=l1*ido;
+  arg=tpi/(float)ip;
+  dcp=cos(arg);
+  dsp=sin(arg);
+  nbd=(ido-1)>>1;
+  ipp2=ip;
+  ipph=(ip+1)>>1;
+  if(ido<l1)goto L103;
+  
+  t1=0;
+  t2=0;
+  for(k=0;k<l1;k++){
+    t3=t1;
+    t4=t2;
+    for(i=0;i<ido;i++){
+      ch[t3]=cc[t4];
+      t3++;
+      t4++;
+    }
+    t1+=ido;
+    t2+=t10;
+  }
+  goto L106;
+
+ L103:
+  t1=0;
+  for(i=0;i<ido;i++){
+    t2=t1;
+    t3=t1;
+    for(k=0;k<l1;k++){
+      ch[t2]=cc[t3];
+      t2+=ido;
+      t3+=t10;
+    }
+    t1++;
+  }
+
+ L106:
+  t1=0;
+  t2=ipp2*t0;
+  t7=(t5=ido<<1);
+  for(j=1;j<ipph;j++){
+    t1+=t0;
+    t2-=t0;
+    t3=t1;
+    t4=t2;
+    t6=t5;
+    for(k=0;k<l1;k++){
+      ch[t3]=cc[t6-1]+cc[t6-1];
+      ch[t4]=cc[t6]+cc[t6];
+      t3+=ido;
+      t4+=ido;
+      t6+=t10;
+    }
+    t5+=t7;
+  }
+
+  if (ido == 1)goto L116;
+  if(nbd<l1)goto L112;
+
+  t1=0;
+  t2=ipp2*t0;
+  t7=0;
+  for(j=1;j<ipph;j++){
+    t1+=t0;
+    t2-=t0;
+    t3=t1;
+    t4=t2;
+
+    t7+=(ido<<1);
+    t8=t7;
+    for(k=0;k<l1;k++){
+      t5=t3;
+      t6=t4;
+      t9=t8;
+      t11=t8;
+      for(i=2;i<ido;i+=2){
+        t5+=2;
+        t6+=2;
+        t9+=2;
+        t11-=2;
+        ch[t5-1]=cc[t9-1]+cc[t11-1];
+        ch[t6-1]=cc[t9-1]-cc[t11-1];
+        ch[t5]=cc[t9]-cc[t11];
+        ch[t6]=cc[t9]+cc[t11];
+      }
+      t3+=ido;
+      t4+=ido;
+      t8+=t10;
+    }
+  }
+  goto L116;
+
+ L112:
+  t1=0;
+  t2=ipp2*t0;
+  t7=0;
+  for(j=1;j<ipph;j++){
+    t1+=t0;
+    t2-=t0;
+    t3=t1;
+    t4=t2;
+    t7+=(ido<<1);
+    t8=t7;
+    t9=t7;
+    for(i=2;i<ido;i+=2){
+      t3+=2;
+      t4+=2;
+      t8+=2;
+      t9-=2;
+      t5=t3;
+      t6=t4;
+      t11=t8;
+      t12=t9;
+      for(k=0;k<l1;k++){
+        ch[t5-1]=cc[t11-1]+cc[t12-1];
+        ch[t6-1]=cc[t11-1]-cc[t12-1];
+        ch[t5]=cc[t11]-cc[t12];
+        ch[t6]=cc[t11]+cc[t12];
+        t5+=ido;
+        t6+=ido;
+        t11+=t10;
+        t12+=t10;
+      }
+    }
+  }
+
+L116:
+  ar1=1.f;
+  ai1=0.f;
+  t1=0;
+  t9=(t2=ipp2*idl1);
+  t3=(ip-1)*idl1;
+  for(l=1;l<ipph;l++){
+    t1+=idl1;
+    t2-=idl1;
+
+    ar1h=dcp*ar1-dsp*ai1;
+    ai1=dcp*ai1+dsp*ar1;
+    ar1=ar1h;
+    t4=t1;
+    t5=t2;
+    t6=0;
+    t7=idl1;
+    t8=t3;
+    for(ik=0;ik<idl1;ik++){
+      c2[t4++]=ch2[t6++]+ar1*ch2[t7++];
+      c2[t5++]=ai1*ch2[t8++];
+    }
+    dc2=ar1;
+    ds2=ai1;
+    ar2=ar1;
+    ai2=ai1;
+
+    t6=idl1;
+    t7=t9-idl1;
+    for(j=2;j<ipph;j++){
+      t6+=idl1;
+      t7-=idl1;
+      ar2h=dc2*ar2-ds2*ai2;
+      ai2=dc2*ai2+ds2*ar2;
+      ar2=ar2h;
+      t4=t1;
+      t5=t2;
+      t11=t6;
+      t12=t7;
+      for(ik=0;ik<idl1;ik++){
+        c2[t4++]+=ar2*ch2[t11++];
+        c2[t5++]+=ai2*ch2[t12++];
+      }
+    }
+  }
+
+  t1=0;
+  for(j=1;j<ipph;j++){
+    t1+=idl1;
+    t2=t1;
+    for(ik=0;ik<idl1;ik++)ch2[ik]+=ch2[t2++];
+  }
+
+  t1=0;
+  t2=ipp2*t0;
+  for(j=1;j<ipph;j++){
+    t1+=t0;
+    t2-=t0;
+    t3=t1;
+    t4=t2;
+    for(k=0;k<l1;k++){
+      ch[t3]=c1[t3]-c1[t4];
+      ch[t4]=c1[t3]+c1[t4];
+      t3+=ido;
+      t4+=ido;
+    }
+  }
+
+  if(ido==1)goto L132;
+  if(nbd<l1)goto L128;
+
+  t1=0;
+  t2=ipp2*t0;
+  for(j=1;j<ipph;j++){
+    t1+=t0;
+    t2-=t0;
+    t3=t1;
+    t4=t2;
+    for(k=0;k<l1;k++){
+      t5=t3;
+      t6=t4;
+      for(i=2;i<ido;i+=2){
+        t5+=2;
+        t6+=2;
+        ch[t5-1]=c1[t5-1]-c1[t6];
+        ch[t6-1]=c1[t5-1]+c1[t6];
+        ch[t5]=c1[t5]+c1[t6-1];
+        ch[t6]=c1[t5]-c1[t6-1];
+      }
+      t3+=ido;
+      t4+=ido;
+    }
+  }
+  goto L132;
+
+ L128:
+  t1=0;
+  t2=ipp2*t0;
+  for(j=1;j<ipph;j++){
+    t1+=t0;
+    t2-=t0;
+    t3=t1;
+    t4=t2;
+    for(i=2;i<ido;i+=2){
+      t3+=2;
+      t4+=2;
+      t5=t3;
+      t6=t4;
+      for(k=0;k<l1;k++){
+        ch[t5-1]=c1[t5-1]-c1[t6];
+        ch[t6-1]=c1[t5-1]+c1[t6];
+        ch[t5]=c1[t5]+c1[t6-1];
+        ch[t6]=c1[t5]-c1[t6-1];
+        t5+=ido;
+        t6+=ido;
+      }
+    }
+  }
+
+L132:
+  if(ido==1)return;
+
+  for(ik=0;ik<idl1;ik++)c2[ik]=ch2[ik];
+
+  t1=0;
+  for(j=1;j<ip;j++){
+    t2=(t1+=t0);
+    for(k=0;k<l1;k++){
+      c1[t2]=ch[t2];
+      t2+=ido;
+    }
+  }
+
+  if(nbd>l1)goto L139;
+
+  is= -ido-1;
+  t1=0;
+  for(j=1;j<ip;j++){
+    is+=ido;
+    t1+=t0;
+    idij=is;
+    t2=t1;
+    for(i=2;i<ido;i+=2){
+      t2+=2;
+      idij+=2;
+      t3=t2;
+      for(k=0;k<l1;k++){
+        c1[t3-1]=wa[idij-1]*ch[t3-1]-wa[idij]*ch[t3];
+        c1[t3]=wa[idij-1]*ch[t3]+wa[idij]*ch[t3-1];
+        t3+=ido;
+      }
+    }
+  }
+  return;
+
+ L139:
+  is= -ido-1;
+  t1=0;
+  for(j=1;j<ip;j++){
+    is+=ido;
+    t1+=t0;
+    t2=t1;
+    for(k=0;k<l1;k++){
+      idij=is;
+      t3=t2;
+      for(i=2;i<ido;i+=2){
+        idij+=2;
+        t3+=2;
+        c1[t3-1]=wa[idij-1]*ch[t3-1]-wa[idij]*ch[t3];
+        c1[t3]=wa[idij-1]*ch[t3]+wa[idij]*ch[t3-1];
+      }
+      t2+=ido;
+    }
+  }
+}
+
+static void drftb1(int n, float *c, float *ch, float *wa, int *ifac){
+  int i,k1,l1,l2;
+  int na;
+  int nf,ip,iw,ix2,ix3,ido,idl1;
+
+  nf=ifac[1];
+  na=0;
+  l1=1;
+  iw=1;
+
+  for(k1=0;k1<nf;k1++){
+    ip=ifac[k1 + 2];
+    l2=ip*l1;
+    ido=n/l2;
+    idl1=ido*l1;
+    if(ip!=4)goto L103;
+    ix2=iw+ido;
+    ix3=ix2+ido;
+
+    if(na!=0)
+      dradb4(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1);
+    else
+      dradb4(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1);
+    na=1-na;
+    goto L115;
+
+  L103:
+    if(ip!=2)goto L106;
+
+    if(na!=0)
+      dradb2(ido,l1,ch,c,wa+iw-1);
+    else
+      dradb2(ido,l1,c,ch,wa+iw-1);
+    na=1-na;
+    goto L115;
+
+  L106:
+    if(ip!=3)goto L109;
+
+    ix2=iw+ido;
+    if(na!=0)
+      dradb3(ido,l1,ch,c,wa+iw-1,wa+ix2-1);
+    else
+      dradb3(ido,l1,c,ch,wa+iw-1,wa+ix2-1);
+    na=1-na;
+    goto L115;
+
+  L109:
+/*    The radix five case can be translated later..... */
+/*    if(ip!=5)goto L112;
+
+    ix2=iw+ido;
+    ix3=ix2+ido;
+    ix4=ix3+ido;
+    if(na!=0)
+      dradb5(ido,l1,ch,c,wa+iw-1,wa+ix2-1,wa+ix3-1,wa+ix4-1);
+    else
+      dradb5(ido,l1,c,ch,wa+iw-1,wa+ix2-1,wa+ix3-1,wa+ix4-1);
+    na=1-na;
+    goto L115;
+
+  L112:*/
+    if(na!=0)
+      dradbg(ido,ip,l1,idl1,ch,ch,ch,c,c,wa+iw-1);
+    else
+      dradbg(ido,ip,l1,idl1,c,c,c,ch,ch,wa+iw-1);
+    if(ido==1)na=1-na;
+
+  L115:
+    l1=l2;
+    iw+=(ip-1)*ido;
+  }
+
+  if(na==0)return;
+
+  for(i=0;i<n;i++)c[i]=ch[i];
+}
+
+void spx_drft_forward(struct drft_lookup *l,float *data){
+  if(l->n==1)return;
+  drftf1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache);
+}
+
+void spx_drft_backward(struct drft_lookup *l,float *data){
+  if (l->n==1)return;
+  drftb1(l->n,data,l->trigcache,l->trigcache+l->n,l->splitcache);
+}
+
+void spx_drft_init(struct drft_lookup *l,int n)
+{
+  l->n=n;
+  l->trigcache=(float*)speex_alloc(3*n*sizeof(*l->trigcache));
+  l->splitcache=(int*)speex_alloc(32*sizeof(*l->splitcache));
+  fdrffti(n, l->trigcache, l->splitcache);
+}
+
+void spx_drft_clear(struct drft_lookup *l)
+{
+  if(l)
+  {
+    if(l->trigcache)
+      speex_free(l->trigcache);
+    if(l->splitcache)
+      speex_free(l->splitcache);
+  }
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/smallft.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/smallft.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/smallft.h	(revision 1163)
@@ -0,0 +1,46 @@
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001             *
+ * by the XIPHOPHORUS Company http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: fft transform
+ last mod: $Id$
+
+ ********************************************************************/
+/**
+   @file smallft.h
+   @brief Discrete Rotational Fourier Transform (DRFT)
+*/
+
+#ifndef _V_SMFT_H_
+#define _V_SMFT_H_
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Discrete Rotational Fourier Transform lookup */
+struct drft_lookup{
+  int n;
+  float *trigcache;
+  int *splitcache;
+};
+
+extern void spx_drft_forward(struct drft_lookup *l,float *data);
+extern void spx_drft_backward(struct drft_lookup *l,float *data);
+extern void spx_drft_init(struct drft_lookup *l,int n);
+extern void spx_drft_clear(struct drft_lookup *l);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex.c	(revision 1163)
@@ -0,0 +1,268 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: speex.c
+
+   Basic Speex functions
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "modes.h"
+#include <math.h>
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#define MAX_IN_SAMPLES 640
+
+
+
+void *speex_encoder_init(const SpeexMode *mode)
+{
+   return mode->enc_init(mode);
+}
+
+void *speex_decoder_init(const SpeexMode *mode)
+{
+   return mode->dec_init(mode);
+}
+
+void speex_encoder_destroy(void *state)
+{
+   (*((SpeexMode**)state))->enc_destroy(state);
+}
+
+void speex_decoder_destroy(void *state)
+{
+   (*((SpeexMode**)state))->dec_destroy(state);
+}
+
+
+
+int speex_encode_native(void *state, spx_word16_t *in, SpeexBits *bits)
+{
+   return (*((SpeexMode**)state))->enc(state, in, bits);
+}
+
+int speex_decode_native(void *state, SpeexBits *bits, spx_word16_t *out)
+{
+   return (*((SpeexMode**)state))->dec(state, bits, out);
+}
+
+
+
+#ifdef FIXED_POINT
+
+int speex_encode(void *state, float *in, SpeexBits *bits)
+{
+   int i;
+   spx_int32_t N;
+   spx_int16_t short_in[MAX_IN_SAMPLES];
+   speex_encoder_ctl(state, SPEEX_GET_FRAME_SIZE, &N);
+   for (i=0;i<N;i++)
+   {
+      if (in[i]>32767.f)
+         short_in[i] = 32767;
+      else if (in[i]<-32768.f)
+         short_in[i] = -32768;
+      else
+         short_in[i] = (spx_int16_t)floor(.5+in[i]);
+   }
+   return (*((SpeexMode**)state))->enc(state, short_in, bits);
+}
+
+int speex_encode_int(void *state, spx_int16_t *in, SpeexBits *bits)
+{
+   SpeexMode *mode;
+   mode = *(SpeexMode**)state;
+   return (mode)->enc(state, in, bits);
+}
+
+int speex_decode(void *state, SpeexBits *bits, float *out)
+{
+   int i, ret;
+   spx_int32_t N;
+   spx_int16_t short_out[MAX_IN_SAMPLES];
+   speex_decoder_ctl(state, SPEEX_GET_FRAME_SIZE, &N);
+   ret = (*((SpeexMode**)state))->dec(state, bits, short_out);
+   for (i=0;i<N;i++)
+      out[i] = short_out[i];
+   return ret;
+}
+
+int speex_decode_int(void *state, SpeexBits *bits, spx_int16_t *out)
+{
+   SpeexMode *mode = *(SpeexMode**)state;
+   return (mode)->dec(state, bits, out);
+}
+
+#else
+
+int speex_encode(void *state, float *in, SpeexBits *bits)
+{
+   return (*((SpeexMode**)state))->enc(state, in, bits);
+}
+
+int speex_encode_int(void *state, spx_int16_t *in, SpeexBits *bits)
+{
+   int i;
+   spx_int32_t N;
+   float float_in[MAX_IN_SAMPLES];
+   speex_encoder_ctl(state, SPEEX_GET_FRAME_SIZE, &N);
+   for (i=0;i<N;i++)
+      float_in[i] = in[i];
+   return (*((SpeexMode**)state))->enc(state, float_in, bits);
+}
+
+int speex_decode(void *state, SpeexBits *bits, float *out)
+{
+   return (*((SpeexMode**)state))->dec(state, bits, out);
+}
+
+int speex_decode_int(void *state, SpeexBits *bits, spx_int16_t *out)
+{
+   int i;
+   spx_int32_t N;
+   float float_out[MAX_IN_SAMPLES];
+   int ret;
+   speex_decoder_ctl(state, SPEEX_GET_FRAME_SIZE, &N);
+   ret = (*((SpeexMode**)state))->dec(state, bits, float_out);
+   for (i=0;i<N;i++)
+   {
+      if (float_out[i]>32767.f)
+         out[i] = 32767;
+      else if (float_out[i]<-32768.f)
+         out[i] = -32768;
+      else
+         out[i] = (spx_int16_t)floor(.5+float_out[i]);
+   }
+   return ret;
+}
+#endif
+
+
+
+int speex_encoder_ctl(void *state, int request, void *ptr)
+{
+   return (*((SpeexMode**)state))->enc_ctl(state, request, ptr);
+}
+
+int speex_decoder_ctl(void *state, int request, void *ptr)
+{
+   return (*((SpeexMode**)state))->dec_ctl(state, request, ptr);
+}
+
+
+
+int nb_mode_query(const void *mode, int request, void *ptr)
+{
+   const SpeexNBMode *m = (const SpeexNBMode*)mode;
+   
+   switch (request)
+   {
+   case SPEEX_MODE_FRAME_SIZE:
+      *((int*)ptr)=m->frameSize;
+      break;
+   case SPEEX_SUBMODE_BITS_PER_FRAME:
+      if (*((int*)ptr)==0)
+         *((int*)ptr) = NB_SUBMODE_BITS+1;
+      else if (m->submodes[*((int*)ptr)]==NULL)
+         *((int*)ptr) = -1;
+      else
+         *((int*)ptr) = m->submodes[*((int*)ptr)]->bits_per_frame;
+      break;
+   default:
+      speex_warning_int("Unknown nb_mode_query request: ", request);
+      return -1;
+   }
+   return 0;
+}
+
+int wb_mode_query(const void *mode, int request, void *ptr)
+{
+   const SpeexSBMode *m = (const SpeexSBMode*)mode;
+
+   switch (request)
+   {
+   case SPEEX_MODE_FRAME_SIZE:
+      *((int*)ptr)=2*m->frameSize;
+      break;
+   case SPEEX_SUBMODE_BITS_PER_FRAME:
+      if (*((int*)ptr)==0)
+         *((int*)ptr) = SB_SUBMODE_BITS+1;
+      else if (m->submodes[*((int*)ptr)]==NULL)
+         *((int*)ptr) = -1;
+      else
+         *((int*)ptr) = m->submodes[*((int*)ptr)]->bits_per_frame;
+      break;
+   default:
+      speex_warning_int("Unknown wb_mode_query request: ", request);
+      return -1;
+   }
+   return 0;
+}
+
+
+int speex_lib_ctl(int request, void *ptr)
+{
+   switch (request)
+   {
+      case SPEEX_LIB_GET_MAJOR_VERSION:
+         *((int*)ptr) = SPEEX_MAJOR_VERSION;
+         break;
+      case SPEEX_LIB_GET_MINOR_VERSION:
+         *((int*)ptr) = SPEEX_MINOR_VERSION;
+         break;
+      case SPEEX_LIB_GET_MICRO_VERSION:
+         *((int*)ptr) = SPEEX_MICRO_VERSION;
+         break;
+      case SPEEX_LIB_GET_EXTRA_VERSION:
+         *((const char**)ptr) = SPEEX_EXTRA_VERSION;
+         break;
+      case SPEEX_LIB_GET_VERSION_STRING:
+         *((const char**)ptr) = SPEEX_VERSION;
+         break;
+      /*case SPEEX_LIB_SET_ALLOC_FUNC:
+         break;
+      case SPEEX_LIB_GET_ALLOC_FUNC:
+         break;
+      case SPEEX_LIB_SET_FREE_FUNC:
+         break;
+      case SPEEX_LIB_GET_FREE_FUNC:
+         break;*/
+      default:
+         speex_warning_int("Unknown wb_mode_query request: ", request);
+         return -1;
+   }
+   return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex.h	(revision 1163)
@@ -0,0 +1,435 @@
+/* Copyright (C) 2002-2006 Jean-Marc Valin*/
+/**
+  @file speex.h
+  @brief Describes the different modes of the codec
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifndef SPEEX_H
+#define SPEEX_H
+/** @defgroup Codec Speex encoder and decoder
+ *  This is the Speex codec itself.
+ *  @{
+ */
+
+#include "speex/speex_bits.h"
+#include "speex/speex_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Values allowed for *ctl() requests */
+
+/** Set enhancement on/off (decoder only) */
+#define SPEEX_SET_ENH 0
+/** Get enhancement state (decoder only) */
+#define SPEEX_GET_ENH 1
+
+/*Would be SPEEX_SET_FRAME_SIZE, but it's (currently) invalid*/
+/** Obtain frame size used by encoder/decoder */
+#define SPEEX_GET_FRAME_SIZE 3
+
+/** Set quality value */
+#define SPEEX_SET_QUALITY 4
+/** Get current quality setting */
+/* #define SPEEX_GET_QUALITY 5 -- Doesn't make much sense, does it? */
+
+/** Set sub-mode to use */
+#define SPEEX_SET_MODE 6
+/** Get current sub-mode in use */
+#define SPEEX_GET_MODE 7
+
+/** Set low-band sub-mode to use (wideband only)*/
+#define SPEEX_SET_LOW_MODE 8
+/** Get current low-band mode in use (wideband only)*/
+#define SPEEX_GET_LOW_MODE 9
+
+/** Set high-band sub-mode to use (wideband only)*/
+#define SPEEX_SET_HIGH_MODE 10
+/** Get current high-band mode in use (wideband only)*/
+#define SPEEX_GET_HIGH_MODE 11
+
+/** Set VBR on (1) or off (0) */
+#define SPEEX_SET_VBR 12
+/** Get VBR status (1 for on, 0 for off) */
+#define SPEEX_GET_VBR 13
+
+/** Set quality value for VBR encoding (0-10) */
+#define SPEEX_SET_VBR_QUALITY 14
+/** Get current quality value for VBR encoding (0-10) */
+#define SPEEX_GET_VBR_QUALITY 15
+
+/** Set complexity of the encoder (0-10) */
+#define SPEEX_SET_COMPLEXITY 16
+/** Get current complexity of the encoder (0-10) */
+#define SPEEX_GET_COMPLEXITY 17
+
+/** Set bit-rate used by the encoder (or lower) */
+#define SPEEX_SET_BITRATE 18
+/** Get current bit-rate used by the encoder or decoder */
+#define SPEEX_GET_BITRATE 19
+
+/** Define a handler function for in-band Speex request*/
+#define SPEEX_SET_HANDLER 20
+
+/** Define a handler function for in-band user-defined request*/
+#define SPEEX_SET_USER_HANDLER 22
+
+/** Set sampling rate used in bit-rate computation */
+#define SPEEX_SET_SAMPLING_RATE 24
+/** Get sampling rate used in bit-rate computation */
+#define SPEEX_GET_SAMPLING_RATE 25
+
+/** Reset the encoder/decoder memories to zero*/
+#define SPEEX_RESET_STATE 26
+
+/** Get VBR info (mostly used internally) */
+#define SPEEX_GET_RELATIVE_QUALITY 29
+
+/** Set VAD status (1 for on, 0 for off) */
+#define SPEEX_SET_VAD 30
+
+/** Get VAD status (1 for on, 0 for off) */
+#define SPEEX_GET_VAD 31
+
+/** Set Average Bit-Rate (ABR) to n bits per seconds */
+#define SPEEX_SET_ABR 32
+/** Get Average Bit-Rate (ABR) setting (in bps) */
+#define SPEEX_GET_ABR 33
+
+/** Set DTX status (1 for on, 0 for off) */
+#define SPEEX_SET_DTX 34
+/** Get DTX status (1 for on, 0 for off) */
+#define SPEEX_GET_DTX 35
+
+/** Set submode encoding in each frame (1 for yes, 0 for no, setting to no breaks the standard) */
+#define SPEEX_SET_SUBMODE_ENCODING 36
+/** Get submode encoding in each frame */
+#define SPEEX_GET_SUBMODE_ENCODING 37
+
+/*#define SPEEX_SET_LOOKAHEAD 38*/
+/** Returns the lookahead used by Speex */
+#define SPEEX_GET_LOOKAHEAD 39
+
+/** Sets tuning for packet-loss concealment (expected loss rate) */
+#define SPEEX_SET_PLC_TUNING 40
+/** Gets tuning for PLC */
+#define SPEEX_GET_PLC_TUNING 41
+
+/** Sets the max bit-rate allowed in VBR mode */
+#define SPEEX_SET_VBR_MAX_BITRATE 42
+/** Gets the max bit-rate allowed in VBR mode */
+#define SPEEX_GET_VBR_MAX_BITRATE 43
+
+/** Turn on/off input/output high-pass filtering */
+#define SPEEX_SET_HIGHPASS 44
+/** Get status of input/output high-pass filtering */
+#define SPEEX_GET_HIGHPASS 45
+
+/* Used internally, NOT TO BE USED in applications */
+/** Used internally*/
+#define SPEEX_GET_PI_GAIN 100
+/** Used internally*/
+#define SPEEX_GET_EXC     101
+/** Used internally*/
+#define SPEEX_GET_INNOV   102
+/** Used internally*/
+#define SPEEX_GET_DTX_STATUS   103
+/** Used internally*/
+#define SPEEX_SET_INNOVATION_SAVE   104
+/** Used internally*/
+#define SPEEX_SET_WIDEBAND   105
+
+
+/* Preserving compatibility:*/
+/** Equivalent to SPEEX_SET_ENH */
+#define SPEEX_SET_PF 0
+/** Equivalent to SPEEX_GET_ENH */
+#define SPEEX_GET_PF 1
+
+
+
+
+/* Values allowed for mode queries */
+/** Query the frame size of a mode */
+#define SPEEX_MODE_FRAME_SIZE 0
+
+/** Query the size of an encoded frame for a particular sub-mode */
+#define SPEEX_SUBMODE_BITS_PER_FRAME 1
+
+
+
+/** Get major Speex version */
+#define SPEEX_LIB_GET_MAJOR_VERSION 1
+/** Get minor Speex version */
+#define SPEEX_LIB_GET_MINOR_VERSION 3
+/** Get micro Speex version */
+#define SPEEX_LIB_GET_MICRO_VERSION 5
+/** Get extra Speex version */
+#define SPEEX_LIB_GET_EXTRA_VERSION 7
+/** Get Speex version string */
+#define SPEEX_LIB_GET_VERSION_STRING 9
+
+/*#define SPEEX_LIB_SET_ALLOC_FUNC 10
+#define SPEEX_LIB_GET_ALLOC_FUNC 11
+#define SPEEX_LIB_SET_FREE_FUNC 12
+#define SPEEX_LIB_GET_FREE_FUNC 13
+
+#define SPEEX_LIB_SET_WARNING_FUNC 14
+#define SPEEX_LIB_GET_WARNING_FUNC 15
+#define SPEEX_LIB_SET_ERROR_FUNC 16
+#define SPEEX_LIB_GET_ERROR_FUNC 17
+*/
+
+/** Number of defined modes in Speex */
+#define SPEEX_NB_MODES 3
+
+/** modeID for the defined narrowband mode */
+#define SPEEX_MODEID_NB 0
+
+/** modeID for the defined wideband mode */
+#define SPEEX_MODEID_WB 1
+
+/** modeID for the defined ultra-wideband mode */
+#define SPEEX_MODEID_UWB 2
+
+#ifdef EPIC_48K
+/** modeID for the Epic 48K mode */
+#define SPEEX_MODEID_NB_48K 1000
+#endif
+
+struct SpeexMode;
+
+
+/* Prototypes for mode function pointers */
+
+/** Encoder state initialization function */
+typedef void *(*encoder_init_func)(const struct SpeexMode *mode);
+
+/** Encoder state destruction function */
+typedef void (*encoder_destroy_func)(void *st);
+
+/** Main encoding function */
+typedef int (*encode_func)(void *state, void *in, SpeexBits *bits);
+
+/** Function for controlling the encoder options */
+typedef int (*encoder_ctl_func)(void *state, int request, void *ptr);
+
+/** Decoder state initialization function */
+typedef void *(*decoder_init_func)(const struct SpeexMode *mode);
+
+/** Decoder state destruction function */
+typedef void (*decoder_destroy_func)(void *st);
+
+/** Main decoding function */
+typedef int  (*decode_func)(void *state, SpeexBits *bits, void *out);
+
+/** Function for controlling the decoder options */
+typedef int (*decoder_ctl_func)(void *state, int request, void *ptr);
+
+
+/** Query function for a mode */
+typedef int (*mode_query_func)(const void *mode, int request, void *ptr);
+
+/** Struct defining a Speex mode */ 
+typedef struct SpeexMode {
+   /** Pointer to the low-level mode data */
+   const void *mode;
+
+   /** Pointer to the mode query function */
+   mode_query_func query;
+   
+   /** The name of the mode (you should not rely on this to identify the mode)*/
+   const char *modeName;
+
+   /**ID of the mode*/
+   int modeID;
+
+   /**Version number of the bitstream (incremented every time we break
+    bitstream compatibility*/
+   int bitstream_version;
+
+   /** Pointer to encoder initialization function */
+   encoder_init_func enc_init;
+
+   /** Pointer to encoder destruction function */
+   encoder_destroy_func enc_destroy;
+
+   /** Pointer to frame encoding function */
+   encode_func enc;
+
+   /** Pointer to decoder initialization function */
+   decoder_init_func dec_init;
+
+   /** Pointer to decoder destruction function */
+   decoder_destroy_func dec_destroy;
+
+   /** Pointer to frame decoding function */
+   decode_func dec;
+
+   /** ioctl-like requests for encoder */
+   encoder_ctl_func enc_ctl;
+
+   /** ioctl-like requests for decoder */
+   decoder_ctl_func dec_ctl;
+
+} SpeexMode;
+
+/**
+ * Returns a handle to a newly created Speex encoder state structure. For now, 
+ * the "mode" argument can be &nb_mode or &wb_mode . In the future, more modes 
+ * may be added. Note that for now if you have more than one channels to 
+ * encode, you need one state per channel.
+ *
+ * @param mode The mode to use (either speex_nb_mode or speex_wb.mode) 
+ * @return A newly created encoder
+ */
+void *speex_encoder_init(const SpeexMode *mode);
+
+/** Frees all resources associated to an existing Speex encoder state. 
+ * @param state Encoder state to be destroyed */
+void speex_encoder_destroy(void *state);
+
+/** Uses an existing encoder state to encode one frame of speech pointed to by
+    "in". The encoded bit-stream is saved in "bits".
+ @param state Encoder state
+ @param in Frame that will be encoded with a +-2^15 range
+ @param bits Bit-stream where the data will be written
+ @return 0 if frame needs not be transmitted (DTX only), 1 otherwise
+ */
+int speex_encode(void *state, float *in, SpeexBits *bits);
+
+/** Uses an existing encoder state to encode one frame of speech pointed to by
+    "in". The encoded bit-stream is saved in "bits".
+ @param state Encoder state
+ @param in Frame that will be encoded with a +-2^15 range
+ @param bits Bit-stream where the data will be written
+ @return 0 if frame needs not be transmitted (DTX only), 1 otherwise
+ */
+int speex_encode_int(void *state, spx_int16_t *in, SpeexBits *bits);
+
+/** Used like the ioctl function to control the encoder parameters
+ *
+ * @param state Encoder state
+ * @param request ioctl-type request (one of the SPEEX_* macros)
+ * @param ptr Data exchanged to-from function
+ * @return 0 if no error, -1 if request in unknown
+ */
+int speex_encoder_ctl(void *state, int request, void *ptr);
+
+
+/** Returns a handle to a newly created decoder state structure. For now, 
+ * the mode argument can be &nb_mode or &wb_mode . In the future, more modes
+ * may be added.  Note that for now if you have more than one channels to
+ * decode, you need one state per channel.
+ *
+ * @param mode Speex mode (one of speex_nb_mode or speex_wb_mode)
+ * @return A newly created decoder state
+ */ 
+void *speex_decoder_init(const SpeexMode *mode);
+
+/** Frees all resources associated to an existing decoder state.
+ *
+ * @param state State to be destroyed
+ */
+void speex_decoder_destroy(void *state);
+
+/** Uses an existing decoder state to decode one frame of speech from
+ * bit-stream bits. The output speech is saved written to out.
+ *
+ * @param state Decoder state
+ * @param bits Bit-stream from which to decode the frame (NULL if the packet was lost)
+ * @param out Where to write the decoded frame
+ * @return return status (0 for no error, -1 for end of stream, -2 corrupt stream)
+ */
+int speex_decode(void *state, SpeexBits *bits, float *out);
+
+/** Uses an existing decoder state to decode one frame of speech from
+ * bit-stream bits. The output speech is saved written to out.
+ *
+ * @param state Decoder state
+ * @param bits Bit-stream from which to decode the frame (NULL if the packet was lost)
+ * @param out Where to write the decoded frame
+ * @return return status (0 for no error, -1 for end of stream, -2 corrupt stream)
+ */
+int speex_decode_int(void *state, SpeexBits *bits, spx_int16_t *out);
+
+/** Used like the ioctl function to control the encoder parameters
+ *
+ * @param state Decoder state
+ * @param request ioctl-type request (one of the SPEEX_* macros)
+ * @param ptr Data exchanged to-from function
+ * @return 0 if no error, -1 if request in unknown
+ */
+int speex_decoder_ctl(void *state, int request, void *ptr);
+
+
+/** Query function for mode information
+ *
+ * @param mode Speex mode
+ * @param request ioctl-type request (one of the SPEEX_* macros)
+ * @param ptr Data exchanged to-from function
+ */
+int speex_mode_query(const SpeexMode *mode, int request, void *ptr);
+
+/** Functions for controlling the behavior of libspeex
+ * @param request ioctl-type request (one of the SPEEX_LIB_* macros)
+ * @param ptr Data exchanged to-from function
+ */
+int speex_lib_ctl(int request, void *ptr);
+
+/** Default narrowband mode */
+extern const SpeexMode speex_nb_mode;
+
+/** Default wideband mode */
+extern const SpeexMode speex_wb_mode;
+
+/** Default "ultra-wideband" mode */
+extern const SpeexMode speex_uwb_mode;
+
+#ifdef EPIC_48K
+/** 4.8 kbps narrowband mode */
+extern const SpeexMode speex_nb_48k_mode;
+#endif
+
+/** List of all modes available */
+extern const SpeexMode * const speex_mode_list[SPEEX_NB_MODES];
+
+/** Obtain one of the modes available */
+const SpeexMode * speex_lib_get_mode (int mode);
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @}*/
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_bits.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_bits.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_bits.h	(revision 1163)
@@ -0,0 +1,171 @@
+/* Copyright (C) 2002 Jean-Marc Valin */
+/**
+   @file speex_bits.h
+   @brief Handles bit packing/unpacking
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifndef BITS_H
+#define BITS_H
+/** @defgroup SpeexBits SpeexBits: Bit-stream manipulations
+ *  This is the structure that holds the bit-stream when encoding or decoding
+ * with Speex. It allows some manipulations as well.
+ *  @{
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Bit-packing data structure representing (part of) a bit-stream. */
+typedef struct SpeexBits {
+   char *chars;   /**< "raw" data */
+   int   nbBits;  /**< Total number of bits stored in the stream*/
+   int   charPtr; /**< Position of the byte "cursor" */
+   int   bitPtr;  /**< Position of the bit "cursor" within the current char */
+   int   owner;   /**< Does the struct "own" the "raw" buffer (member "chars") */
+   int   overflow;/**< Set to one if we try to read past the valid data */
+   int   buf_size;/**< Allocated size for buffer */
+   int   reserved1; /**< Reserved for future use */
+   void *reserved2; /**< Reserved for future use */
+} SpeexBits;
+
+/** Initializes and allocates resources for a SpeexBits struct */
+void speex_bits_init(SpeexBits *bits);
+
+/** Initializes SpeexBits struct using a pre-allocated buffer*/
+void speex_bits_init_buffer(SpeexBits *bits, void *buff, int buf_size);
+
+/** Frees all resources associated to a SpeexBits struct. Right now this does nothing since no resources are allocated, but this could change in the future.*/
+void speex_bits_destroy(SpeexBits *bits);
+
+/** Resets bits to initial value (just after initialization, erasing content)*/
+void speex_bits_reset(SpeexBits *bits);
+
+/** Rewind the bit-stream to the beginning (ready for read) without erasing the content */
+void speex_bits_rewind(SpeexBits *bits);
+
+/** Initializes the bit-stream from the data in an area of memory */
+void speex_bits_read_from(SpeexBits *bits, char *bytes, int len);
+
+/** Append bytes to the bit-stream
+ * 
+ * @param bits Bit-stream to operate on
+ * @param bytes pointer to the bytes what will be appended
+ * @param len Number of bytes of append
+ */
+void speex_bits_read_whole_bytes(SpeexBits *bits, char *bytes, int len);
+
+/** Write the content of a bit-stream to an area of memory
+ * 
+ * @param bits Bit-stream to operate on
+ * @param bytes Memory location where to write the bits
+ * @param max_len Maximum number of bytes to write (i.e. size of the "bytes" buffer)
+ * @return Number of bytes written to the "bytes" buffer
+*/
+int speex_bits_write(SpeexBits *bits, char *bytes, int max_len);
+
+/** Like speex_bits_write, but writes only the complete bytes in the stream. Also removes the written bytes from the stream */
+int speex_bits_write_whole_bytes(SpeexBits *bits, char *bytes, int max_len);
+
+/** Append bits to the bit-stream
+ * @param bits Bit-stream to operate on
+ * @param data Value to append as integer
+ * @param nbBits number of bits to consider in "data"
+ */
+void speex_bits_pack(SpeexBits *bits, int data, int nbBits);
+
+/** Interpret the next bits in the bit-stream as a signed integer
+ *
+ * @param bits Bit-stream to operate on
+ * @param nbBits Number of bits to interpret
+ * @return A signed integer represented by the bits read
+ */
+int speex_bits_unpack_signed(SpeexBits *bits, int nbBits);
+
+/** Interpret the next bits in the bit-stream as an unsigned integer
+ *
+ * @param bits Bit-stream to operate on
+ * @param nbBits Number of bits to interpret
+ * @return An unsigned integer represented by the bits read
+ */
+unsigned int speex_bits_unpack_unsigned(SpeexBits *bits, int nbBits);
+
+/** Returns the number of bytes in the bit-stream, including the last one even if it is not "full"
+ *
+ * @param bits Bit-stream to operate on
+ * @return Number of bytes in the stream
+ */
+int speex_bits_nbytes(SpeexBits *bits);
+
+/** Same as speex_bits_unpack_unsigned, but without modifying the cursor position 
+ * 
+ * @param bits Bit-stream to operate on
+ * @param nbBits Number of bits to look for
+ * @return Value of the bits peeked, interpreted as unsigned
+ */
+unsigned int speex_bits_peek_unsigned(SpeexBits *bits, int nbBits);
+
+/** Get the value of the next bit in the stream, without modifying the
+ * "cursor" position 
+ * 
+ * @param bits Bit-stream to operate on
+ * @return Value of the bit peeked (one bit only)
+ */
+int speex_bits_peek(SpeexBits *bits);
+
+/** Advances the position of the "bit cursor" in the stream 
+ *
+ * @param bits Bit-stream to operate on
+ * @param n Number of bits to advance
+ */
+void speex_bits_advance(SpeexBits *bits, int n);
+
+/** Returns the number of bits remaining to be read in a stream
+ *
+ * @param bits Bit-stream to operate on
+ * @return Number of bits that can still be read from the stream
+ */
+int speex_bits_remaining(SpeexBits *bits);
+
+/** Insert a terminator so that the data can be sent as a packet while auto-detecting 
+ * the number of frames in each packet 
+ *
+ * @param bits Bit-stream to operate on
+ */
+void speex_bits_insert_terminator(SpeexBits *bits);
+
+#ifdef __cplusplus
+}
+#endif
+
+/* @} */
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_callbacks.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_callbacks.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_callbacks.c	(revision 1163)
@@ -0,0 +1,140 @@
+/* Copyright (C) 2002 Jean-Marc Valin
+   File speex_callbacks.c
+   Callback handling and in-band signalling
+
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <speex/speex_callbacks.h>
+#include "misc.h"
+
+int speex_inband_handler(SpeexBits *bits, SpeexCallback *callback_list, void *state)
+{
+   int id;
+   SpeexCallback *callback;
+   /*speex_bits_advance(bits, 5);*/
+   id=speex_bits_unpack_unsigned(bits, 4);
+   callback = callback_list+id;
+
+   if (callback->func)
+   {
+      return callback->func(bits, state, callback->data);
+   } else
+      /*If callback is not registered, skip the right number of bits*/
+   {
+      int adv;
+      if (id<2)
+         adv = 1;
+      else if (id<8)
+         adv = 4;
+      else if (id<10)
+         adv = 8;
+      else if (id<12)
+         adv = 16;
+      else if (id<14)
+         adv = 32;
+      else 
+         adv = 64;
+      speex_bits_advance(bits, adv);
+   }
+   return 0;
+}
+
+int speex_std_mode_request_handler(SpeexBits *bits, void *state, void *data)
+{
+   spx_int32_t m;
+   m = speex_bits_unpack_unsigned(bits, 4);
+   speex_encoder_ctl(data, SPEEX_SET_MODE, &m);
+   return 0;
+}
+
+int speex_std_low_mode_request_handler(SpeexBits *bits, void *state, void *data)
+{
+   spx_int32_t m;
+   m = speex_bits_unpack_unsigned(bits, 4);
+   speex_encoder_ctl(data, SPEEX_SET_LOW_MODE, &m);
+   return 0;
+}
+
+int speex_std_high_mode_request_handler(SpeexBits *bits, void *state, void *data)
+{
+   spx_int32_t m;
+   m = speex_bits_unpack_unsigned(bits, 4);
+   speex_encoder_ctl(data, SPEEX_SET_HIGH_MODE, &m);
+   return 0;
+}
+
+int speex_std_vbr_request_handler(SpeexBits *bits, void *state, void *data)
+{
+   spx_int32_t vbr;
+   vbr = speex_bits_unpack_unsigned(bits, 1);
+   speex_encoder_ctl(data, SPEEX_SET_VBR, &vbr);
+   return 0;
+}
+
+int speex_std_enh_request_handler(SpeexBits *bits, void *state, void *data)
+{
+   spx_int32_t enh;
+   enh = speex_bits_unpack_unsigned(bits, 1);
+   speex_decoder_ctl(data, SPEEX_SET_ENH, &enh);
+   return 0;
+}
+
+int speex_std_vbr_quality_request_handler(SpeexBits *bits, void *state, void *data)
+{
+   float qual;
+   qual = speex_bits_unpack_unsigned(bits, 4);
+   speex_encoder_ctl(data, SPEEX_SET_VBR_QUALITY, &qual);
+   return 0;
+}
+
+
+int speex_std_char_handler(SpeexBits *bits, void *state, void *data)
+{
+   unsigned char ch;
+   ch = speex_bits_unpack_unsigned(bits, 8);
+   _speex_putc(ch, data);
+   /*printf("speex_std_char_handler ch=%x\n", ch);*/
+   return 0;
+}
+
+
+
+/* Default handler for user callbacks: skip it */
+int speex_default_user_handler(SpeexBits *bits, void *state, void *data)
+{
+   int req_size = speex_bits_unpack_unsigned(bits, 4);
+   speex_bits_advance(bits, 5+8*req_size);
+   return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_callbacks.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_callbacks.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_callbacks.h	(revision 1163)
@@ -0,0 +1,134 @@
+/* Copyright (C) 2002 Jean-Marc Valin*/
+/**
+  @file speex_callbacks.h
+  @brief Describes callback handling and in-band signalling
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifndef SPEEX_CALLBACKS_H
+#define SPEEX_CALLBACKS_H
+/** @defgroup SpeexCallbacks Various definitions for Speex callbacks supported by the decoder.
+ *  @{
+ */
+
+#include "speex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Total number of callbacks */
+#define SPEEX_MAX_CALLBACKS 16
+
+/* Describes all the in-band requests */
+
+/*These are 1-bit requests*/
+/** Request for perceptual enhancement (1 for on, 0 for off) */
+#define SPEEX_INBAND_ENH_REQUEST         0
+/** Reserved */
+#define SPEEX_INBAND_RESERVED1           1
+
+/*These are 4-bit requests*/
+/** Request for a mode change */
+#define SPEEX_INBAND_MODE_REQUEST        2
+/** Request for a low mode change */
+#define SPEEX_INBAND_LOW_MODE_REQUEST    3
+/** Request for a high mode change */
+#define SPEEX_INBAND_HIGH_MODE_REQUEST   4
+/** Request for VBR (1 on, 0 off) */
+#define SPEEX_INBAND_VBR_QUALITY_REQUEST 5
+/** Request to be sent acknowledge */
+#define SPEEX_INBAND_ACKNOWLEDGE_REQUEST 6
+/** Request for VBR (1 for on, 0 for off) */
+#define SPEEX_INBAND_VBR_REQUEST         7
+
+/*These are 8-bit requests*/
+/** Send a character in-band */
+#define SPEEX_INBAND_CHAR                8
+/** Intensity stereo information */
+#define SPEEX_INBAND_STEREO              9
+
+/*These are 16-bit requests*/
+/** Transmit max bit-rate allowed */
+#define SPEEX_INBAND_MAX_BITRATE         10
+
+/*These are 32-bit requests*/
+/** Acknowledge packet reception */
+#define SPEEX_INBAND_ACKNOWLEDGE         12
+
+/** Callback function type */
+typedef int (*speex_callback_func)(SpeexBits *bits, void *state, void *data);
+
+/** Callback information */
+typedef struct SpeexCallback {
+   int callback_id;             /**< ID associated to the callback */
+   speex_callback_func func;    /**< Callback handler function */
+   void *data;                  /**< Data that will be sent to the handler */
+   void *reserved1;             /**< Reserved for future use */
+   int   reserved2;             /**< Reserved for future use */
+} SpeexCallback;
+
+/** Handle in-band request */
+int speex_inband_handler(SpeexBits *bits, SpeexCallback *callback_list, void *state);
+
+/** Standard handler for mode request (change mode, no questions asked) */
+int speex_std_mode_request_handler(SpeexBits *bits, void *state, void *data);
+
+/** Standard handler for high mode request (change high mode, no questions asked) */
+int speex_std_high_mode_request_handler(SpeexBits *bits, void *state, void *data);
+
+/** Standard handler for in-band characters (write to stderr) */
+int speex_std_char_handler(SpeexBits *bits, void *state, void *data);
+
+/** Default handler for user-defined requests: in this case, just ignore */
+int speex_default_user_handler(SpeexBits *bits, void *state, void *data);
+
+
+
+/** Standard handler for low mode request (change low mode, no questions asked) */
+int speex_std_low_mode_request_handler(SpeexBits *bits, void *state, void *data);
+
+/** Standard handler for VBR request (Set VBR, no questions asked) */
+int speex_std_vbr_request_handler(SpeexBits *bits, void *state, void *data);
+
+/** Standard handler for enhancer request (Turn ehnancer on/off, no questions asked) */
+int speex_std_enh_request_handler(SpeexBits *bits, void *state, void *data);
+
+/** Standard handler for VBR quality request (Set VBR quality, no questions asked) */
+int speex_std_vbr_quality_request_handler(SpeexBits *bits, void *state, void *data);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @} */
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_config_types.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_config_types.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_config_types.h	(revision 1163)
@@ -0,0 +1,13 @@
+#ifndef __SPEEX_TYPES_H__
+#define __SPEEX_TYPES_H__
+
+#include <pj/types.h>
+
+typedef pj_int16_t  spx_int16_t;
+typedef pj_uint16_t spx_uint16_t;
+typedef pj_int32_t  spx_int32_t;
+typedef pj_uint32_t spx_uint32_t;
+
+#endif
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_echo.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_echo.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_echo.h	(revision 1163)
@@ -0,0 +1,123 @@
+/* Copyright (C) Jean-Marc Valin */
+/**
+   @file speex_echo.h
+   @brief Echo cancellation
+*/
+/*
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+
+   2. 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.
+
+   3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+*/
+
+#ifndef SPEEX_ECHO_H
+#define SPEEX_ECHO_H
+/** @defgroup SpeexEchoState SpeexEchoState: Acoustic echo canceller
+ *  This is the acoustic echo canceller module.
+ *  @{
+ */
+#include "speex/speex_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Obtain frame size used by the AEC */
+#define SPEEX_ECHO_GET_FRAME_SIZE 3
+
+/** Set sampling rate */
+#define SPEEX_ECHO_SET_SAMPLING_RATE 24
+/** Get sampling rate */
+#define SPEEX_ECHO_GET_SAMPLING_RATE 25
+
+/** Internal echo canceller state. Should never be accessed directly. */
+struct SpeexEchoState_;
+
+/** @class SpeexEchoState
+ * This holds the state of the echo canceller. You need one per channel. 
+*/
+
+/** Internal echo canceller state. Should never be accessed directly. */
+typedef struct SpeexEchoState_ SpeexEchoState;
+
+/** Creates a new echo canceller state
+ * @param frame_size Number of samples to process at one time (should correspond to 10-20 ms)
+ * @param filter_length Number of samples of echo to cancel (should generally correspond to 100-500 ms)
+ * @return Newly-created echo canceller state
+ */
+SpeexEchoState *speex_echo_state_init(int frame_size, int filter_length);
+
+/** Destroys an echo canceller state 
+ * @param st Echo canceller state
+*/
+void speex_echo_state_destroy(SpeexEchoState *st);
+
+/** Performs echo cancellation a frame, based on the audio sent to the speaker (no delay is added
+ * to playback ni this form)
+ *
+ * @param st Echo canceller state
+ * @param rec signal from the microphone (near end + far end echo)
+ * @param play Signal played to the speaker (received from far end)
+ * @param out Returns near-end signal with echo removed
+ */
+void speex_echo_cancellation(SpeexEchoState *st, const spx_int16_t *rec, const spx_int16_t *play, spx_int16_t *out);
+
+/** Performs echo cancellation a frame (deprecated) */
+void speex_echo_cancel(SpeexEchoState *st, const spx_int16_t *rec, const spx_int16_t *play, spx_int16_t *out, spx_int32_t *Yout);
+
+/** Perform echo cancellation using internal playback buffer, which is delayed by two frames
+ * to account for the delay introduced by most soundcards (but it could be off!)
+ * @param st Echo canceller state
+ * @param rec signal from the microphone (near end + far end echo)
+ * @param out Returns near-end signal with echo removed
+*/
+void speex_echo_capture(SpeexEchoState *st, const spx_int16_t *rec, spx_int16_t *out);
+
+/** Let the echo canceller know that a frame was just queued to the soundcard
+ * @param st Echo canceller state
+ * @param play Signal played to the speaker (received from far end)
+*/
+void speex_echo_playback(SpeexEchoState *st, const spx_int16_t *play);
+
+/** Reset the echo canceller to its original state 
+ * @param st Echo canceller state
+ */
+void speex_echo_state_reset(SpeexEchoState *st);
+
+/** Used like the ioctl function to control the echo canceller parameters
+ *
+ * @param st Echo canceller state
+ * @param request ioctl-type request (one of the SPEEX_ECHO_* macros)
+ * @param ptr Data exchanged to-from function
+ * @return 0 if no error, -1 if request in unknown
+ */
+int speex_echo_ctl(SpeexEchoState *st, int request, void *ptr);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/** @}*/
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_header.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_header.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_header.c	(revision 1163)
@@ -0,0 +1,166 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: speex_header.c
+   Describes the Speex header
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "misc.h"
+#include <speex/speex_header.h>
+#include <speex/speex.h>
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#define ENDIAN_SWITCH(x) {x=le_int(x);}
+
+
+/*
+typedef struct SpeexHeader {
+   char speex_string[8];
+   char speex_version[SPEEX_HEADER_VERSION_LENGTH];
+   int speex_version_id;
+   int header_size;
+   int rate;
+   int mode;
+   int mode_bitstream_version;
+   int nb_channels;
+   int bitrate;
+   int frame_size;
+   int vbr;
+   int frames_per_packet;
+   int extra_headers;
+   int reserved1;
+   int reserved2;
+} SpeexHeader;
+*/
+
+void speex_init_header(SpeexHeader *header, int rate, int nb_channels, const SpeexMode *m)
+{
+   int i;
+   const char *h="Speex   ";
+   /*
+   strncpy(header->speex_string, "Speex   ", 8);
+   strncpy(header->speex_version, SPEEX_VERSION, SPEEX_HEADER_VERSION_LENGTH-1);
+   header->speex_version[SPEEX_HEADER_VERSION_LENGTH-1]=0;
+   */
+   for (i=0;i<8;i++)
+      header->speex_string[i]=h[i];
+   for (i=0;i<SPEEX_HEADER_VERSION_LENGTH-1 && SPEEX_VERSION[i];i++)
+      header->speex_version[i]=SPEEX_VERSION[i];
+   for (;i<SPEEX_HEADER_VERSION_LENGTH;i++)
+      header->speex_version[i]=0;
+   
+   header->speex_version_id = 1;
+   header->header_size = sizeof(SpeexHeader);
+   
+   header->rate = rate;
+   header->mode = m->modeID;
+   header->mode_bitstream_version = m->bitstream_version;
+   if (m->modeID<0)
+      speex_warning("This mode is meant to be used alone");
+   header->nb_channels = nb_channels;
+   header->bitrate = -1;
+   speex_mode_query(m, SPEEX_MODE_FRAME_SIZE, &header->frame_size);
+   header->vbr = 0;
+   
+   header->frames_per_packet = 0;
+   header->extra_headers = 0;
+   header->reserved1 = 0;
+   header->reserved2 = 0;
+}
+
+char *speex_header_to_packet(SpeexHeader *header, int *size)
+{
+   SpeexHeader *le_header;
+   le_header = (SpeexHeader*)speex_alloc(sizeof(SpeexHeader));
+   
+   speex_move(le_header, header, sizeof(SpeexHeader));
+   
+   /*Make sure everything is now little-endian*/
+   ENDIAN_SWITCH(le_header->speex_version_id);
+   ENDIAN_SWITCH(le_header->header_size);
+   ENDIAN_SWITCH(le_header->rate);
+   ENDIAN_SWITCH(le_header->mode);
+   ENDIAN_SWITCH(le_header->mode_bitstream_version);
+   ENDIAN_SWITCH(le_header->nb_channels);
+   ENDIAN_SWITCH(le_header->bitrate);
+   ENDIAN_SWITCH(le_header->frame_size);
+   ENDIAN_SWITCH(le_header->vbr);
+   ENDIAN_SWITCH(le_header->frames_per_packet);
+   ENDIAN_SWITCH(le_header->extra_headers);
+
+   *size = sizeof(SpeexHeader);
+   return (char *)le_header;
+}
+
+SpeexHeader *speex_packet_to_header(char *packet, int size)
+{
+   int i;
+   SpeexHeader *le_header;
+   const char *h = "Speex   ";
+   for (i=0;i<8;i++)
+      if (packet[i]!=h[i])
+      {
+         speex_warning ("This doesn't look like a Speex file");
+         return NULL;
+      }
+   
+   /*FIXME: Do we allow larger headers?*/
+   if (size < (int)sizeof(SpeexHeader))
+   {
+      speex_warning("Speex header too small");
+      return NULL;
+   }
+   
+   le_header = (SpeexHeader*)speex_alloc(sizeof(SpeexHeader));
+   
+   speex_move(le_header, packet, sizeof(SpeexHeader));
+   
+   /*Make sure everything is converted correctly from little-endian*/
+   ENDIAN_SWITCH(le_header->speex_version_id);
+   ENDIAN_SWITCH(le_header->header_size);
+   ENDIAN_SWITCH(le_header->rate);
+   ENDIAN_SWITCH(le_header->mode);
+   ENDIAN_SWITCH(le_header->mode_bitstream_version);
+   ENDIAN_SWITCH(le_header->nb_channels);
+   ENDIAN_SWITCH(le_header->bitrate);
+   ENDIAN_SWITCH(le_header->frame_size);
+   ENDIAN_SWITCH(le_header->vbr);
+   ENDIAN_SWITCH(le_header->frames_per_packet);
+   ENDIAN_SWITCH(le_header->extra_headers);
+
+   return le_header;
+
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_header.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_header.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_header.h	(revision 1163)
@@ -0,0 +1,91 @@
+/* Copyright (C) 2002 Jean-Marc Valin */
+/**
+   @file speex_header.h
+   @brief Describes the Speex header
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+
+#ifndef SPEEX_HEADER_H
+#define SPEEX_HEADER_H
+/** @defgroup SpeexHeader SpeexHeader: Makes it easy to write/parse an Ogg/Speex header
+ *  This is the Speex header for the Ogg encapsulation. You don't need that if you just use RTP.
+ *  @{
+ */
+
+#include "speex/speex_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct SpeexMode;
+
+/** Length of the Speex header identifier */
+#define SPEEX_HEADER_STRING_LENGTH 8
+
+/** Maximum number of characters for encoding the Speex version number in the header */
+#define SPEEX_HEADER_VERSION_LENGTH 20
+
+/** Speex header info for file-based formats */
+typedef struct SpeexHeader {
+   char speex_string[SPEEX_HEADER_STRING_LENGTH];   /**< Identifies a Speex bit-stream, always set to "Speex   " */
+   char speex_version[SPEEX_HEADER_VERSION_LENGTH]; /**< Speex version */ 
+   spx_int32_t speex_version_id;       /**< Version for Speex (for checking compatibility) */
+   spx_int32_t header_size;            /**< Total size of the header ( sizeof(SpeexHeader) ) */
+   spx_int32_t rate;                   /**< Sampling rate used */
+   spx_int32_t mode;                   /**< Mode used (0 for narrowband, 1 for wideband) */
+   spx_int32_t mode_bitstream_version; /**< Version ID of the bit-stream */
+   spx_int32_t nb_channels;            /**< Number of channels encoded */
+   spx_int32_t bitrate;                /**< Bit-rate used */
+   spx_int32_t frame_size;             /**< Size of frames */
+   spx_int32_t vbr;                    /**< 1 for a VBR encoding, 0 otherwise */
+   spx_int32_t frames_per_packet;      /**< Number of frames stored per Ogg packet */
+   spx_int32_t extra_headers;          /**< Number of additional headers after the comments */
+   spx_int32_t reserved1;              /**< Reserved for future use, must be zero */
+   spx_int32_t reserved2;              /**< Reserved for future use, must be zero */
+} SpeexHeader;
+
+/** Initializes a SpeexHeader using basic information */
+void speex_init_header(SpeexHeader *header, int rate, int nb_channels, const struct SpeexMode *m);
+
+/** Creates the header packet from the header itself (mostly involves endianness conversion) */
+char *speex_header_to_packet(SpeexHeader *header, int *size);
+
+/** Creates a SpeexHeader from a packet */
+SpeexHeader *speex_packet_to_header(char *packet, int size);
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @} */
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_jitter.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_jitter.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_jitter.h	(revision 1163)
@@ -0,0 +1,153 @@
+/* Copyright (C) 2002 Jean-Marc Valin */
+/**
+   @file speex_jitter.h
+   @brief Adaptive jitter buffer for Speex
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifndef SPEEX_JITTER_H
+#define SPEEX_JITTER_H
+/** @defgroup JitterBuffer JitterBuffer: Adaptive jitter buffer
+ *  This is the jitter buffer that reorders UDP/RTP packets and adjusts the buffer size
+ * to maintain good quality and low latency.
+ *  @{
+ */
+
+#include "speex.h"
+#include "speex_bits.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Generic adaptive jitter buffer state */
+struct JitterBuffer_;
+
+/** Generic adaptive jitter buffer state */
+typedef struct JitterBuffer_ JitterBuffer;
+
+/** Definition of an incoming packet */
+typedef struct _JitterBufferPacket JitterBufferPacket;
+
+/** Definition of an incoming packet */
+struct _JitterBufferPacket {
+   char        *data;       /**< Data bytes contained in the packet */
+   spx_uint32_t len;        /**< Length of the packet in bytes */
+   spx_uint32_t timestamp;  /**< Timestamp for the packet */
+   spx_uint32_t span;       /**< Time covered by the packet (same units as timestamp) */
+};
+
+/** Packet has been retrieved */
+#define JITTER_BUFFER_OK 0
+/** Packet is missing */
+#define JITTER_BUFFER_MISSING 1
+/** Packet is incomplete (does not cover the entive tick */
+#define JITTER_BUFFER_INCOMPLETE 2
+/** There was an error in the jitter buffer */
+#define JITTER_BUFFER_INTERNAL_ERROR -1
+/** Invalid argument */
+#define JITTER_BUFFER_BAD_ARGUMENT -2
+
+/** Initialises jitter buffer 
+ * 
+ * @param tick Number of samples per "tick", i.e. the time period of the elements that will be retrieved
+ * @return Newly created jitter buffer state
+ */
+JitterBuffer *jitter_buffer_init(int tick);
+
+/** Restores jitter buffer to its original state 
+ * 
+ * @param jitter Jitter buffer state
+ */
+void jitter_buffer_reset(JitterBuffer *jitter);
+
+/** Destroys jitter buffer 
+ * 
+ * @param jitter Jitter buffer state
+ */
+void jitter_buffer_destroy(JitterBuffer *jitter);
+
+/** Put one packet into the jitter buffer */
+void jitter_buffer_put(JitterBuffer *jitter, const JitterBufferPacket *packet);
+
+/** Get one packet from the jitter buffer */
+int jitter_buffer_get(JitterBuffer *jitter, JitterBufferPacket *packet, spx_uint32_t *current_timestamp);
+
+/** Get pointer timestamp of jitter buffer */
+int jitter_buffer_get_pointer_timestamp(JitterBuffer *jitter);
+
+/** Advance by one tick */
+void jitter_buffer_tick(JitterBuffer *jitter);
+
+/* @} */
+
+/** @defgroup SpeexJitter SpeexJitter: Adaptive jitter buffer specifically for Speex
+ *  This is the jitter buffer that reorders UDP/RTP packets and adjusts the buffer size
+ * to maintain good quality and low latency. This is a simplified version that works only
+ * with Speex, but is much easier to use.
+ *  @{
+ */
+
+/** Speex jitter-buffer state. Never use it directly! */
+typedef struct SpeexJitter {
+   SpeexBits current_packet;         /**< Current Speex packet */
+   int valid_bits;                   /**< True if Speex bits are valid */
+   JitterBuffer *packets;            /**< Generic jitter buffer state */
+   void *dec;                        /**< Pointer to Speex decoder */
+   spx_int32_t frame_size;           /**< Frame size of Speex decoder */
+} SpeexJitter;
+
+/** Initialise jitter buffer 
+ * 
+ * @param jitter State of the Speex jitter buffer
+ * @param decoder Speex decoder to call
+ * @param sampling_rate Sampling rate used by the decoder
+*/
+void speex_jitter_init(SpeexJitter *jitter, void *decoder, int sampling_rate);
+
+/** Destroy jitter buffer */
+void speex_jitter_destroy(SpeexJitter *jitter);
+
+/** Put one packet into the jitter buffer */
+void speex_jitter_put(SpeexJitter *jitter, char *packet, int len, int timestamp);
+
+/** Get one packet from the jitter buffer */
+void speex_jitter_get(SpeexJitter *jitter, spx_int16_t *out, int *start_offset);
+
+/** Get pointer timestamp of jitter buffer */
+int speex_jitter_get_pointer_timestamp(SpeexJitter *jitter);
+
+#ifdef __cplusplus
+}
+#endif
+
+/* @} */
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_preprocess.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_preprocess.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_preprocess.h	(revision 1163)
@@ -0,0 +1,168 @@
+/* Copyright (C) 2003 Epic Games
+   Written by Jean-Marc Valin */
+/**
+ *  @file speex_preprocess.h
+ *  @brief Speex preprocessor. The preprocess can do noise suppression, 
+ * residual echo suppression (after using the echo canceller), automatic
+ * gain control (AGC) and voice activity detection (VAD).
+*/
+/*
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+
+   2. 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.
+
+   3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+*/
+
+#ifndef SPEEX_PREPROCESS_H
+#define SPEEX_PREPROCESS_H
+/** @defgroup SpeexPreprocessState SpeexPreprocessState: The Speex preprocessor
+ *  This is the Speex preprocessor. The preprocess can do noise suppression, 
+ * residual echo suppression (after using the echo canceller), automatic
+ * gain control (AGC) and voice activity detection (VAD).
+ *  @{
+ */
+
+#include "speex/speex_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+   
+/** State of the preprocessor (one per channel). Should never be accessed directly. */
+struct SpeexPreprocessState_;
+
+/** State of the preprocessor (one per channel). Should never be accessed directly. */
+typedef struct SpeexPreprocessState_ SpeexPreprocessState;
+
+
+/** Creates a new preprocessing state. You MUST create one state per channel processed.
+ * @param frame_size Number of samples to process at one time (should correspond to 10-20 ms). Must be
+ * the same value as that used for the echo canceller for residual echo cancellation to work.
+ * @param sampling_rate Sampling rate used for the input.
+ * @return Newly created preprocessor state
+*/
+SpeexPreprocessState *speex_preprocess_state_init(int frame_size, int sampling_rate);
+
+/** Destroys a preprocessor state 
+ * @param st Preprocessor state to destroy
+*/
+void speex_preprocess_state_destroy(SpeexPreprocessState *st);
+
+/** Preprocess a frame 
+ * @param st Preprocessor state
+ * @param x Audio sample vector (in and out). Must be same size as specified in speex_preprocess_state_init().
+ * @return Bool value for voice activity (1 for speech, 0 for noise/silence), ONLY if VAD turned on.
+*/
+int speex_preprocess_run(SpeexPreprocessState *st, spx_int16_t *x);
+
+/** Preprocess a frame (deprecated, use speex_preprocess_run() instead)*/
+int speex_preprocess(SpeexPreprocessState *st, spx_int16_t *x, spx_int32_t *echo);
+
+/** Update preprocessor state, but do not compute the output
+ * @param st Preprocessor state
+ * @param x Audio sample vector (in only). Must be same size as specified in speex_preprocess_state_init().
+*/
+void speex_preprocess_estimate_update(SpeexPreprocessState *st, spx_int16_t *x);
+
+/** Used like the ioctl function to control the preprocessor parameters 
+ * @param st Preprocessor state
+ * @param request ioctl-type request (one of the SPEEX_PREPROCESS_* macros)
+ * @param ptr Data exchanged to-from function
+ * @return 0 if no error, -1 if request in unknown
+*/
+int speex_preprocess_ctl(SpeexPreprocessState *st, int request, void *ptr);
+
+
+
+/** Set preprocessor denoiser state */
+#define SPEEX_PREPROCESS_SET_DENOISE 0
+/** Get preprocessor denoiser state */
+#define SPEEX_PREPROCESS_GET_DENOISE 1
+
+/** Set preprocessor Automatic Gain Control state */
+#define SPEEX_PREPROCESS_SET_AGC 2
+/** Get preprocessor Automatic Gain Control state */
+#define SPEEX_PREPROCESS_GET_AGC 3
+
+/** Set preprocessor Voice Activity Detection state */
+#define SPEEX_PREPROCESS_SET_VAD 4
+/** Get preprocessor Voice Activity Detection state */
+#define SPEEX_PREPROCESS_GET_VAD 5
+
+/** Set preprocessor Automatic Gain Control level */
+#define SPEEX_PREPROCESS_SET_AGC_LEVEL 6
+/** Get preprocessor Automatic Gain Control level */
+#define SPEEX_PREPROCESS_GET_AGC_LEVEL 7
+
+/** Set preprocessor dereverb state */
+#define SPEEX_PREPROCESS_SET_DEREVERB 8
+/** Get preprocessor dereverb state */
+#define SPEEX_PREPROCESS_GET_DEREVERB 9
+
+/** Set preprocessor dereverb level */
+#define SPEEX_PREPROCESS_SET_DEREVERB_LEVEL 10
+/** Get preprocessor dereverb level */
+#define SPEEX_PREPROCESS_GET_DEREVERB_LEVEL 11
+
+/** Set preprocessor dereverb decay */
+#define SPEEX_PREPROCESS_SET_DEREVERB_DECAY 12
+/** Get preprocessor dereverb decay */
+#define SPEEX_PREPROCESS_GET_DEREVERB_DECAY 13
+
+/** Set probability required for the VAD to go from silence to voice */
+#define SPEEX_PREPROCESS_SET_PROB_START 14
+/** Get probability required for the VAD to go from silence to voice */
+#define SPEEX_PREPROCESS_GET_PROB_START 15
+
+/** Set probability required for the VAD to stay in the voice state (integer percent) */
+#define SPEEX_PREPROCESS_SET_PROB_CONTINUE 16
+/** Get probability required for the VAD to stay in the voice state (integer percent) */
+#define SPEEX_PREPROCESS_GET_PROB_CONTINUE 17
+
+/** Set maximum attenuation of the noise in dB (negative number) */
+#define SPEEX_PREPROCESS_SET_NOISE_SUPPRESS 18
+/** Get maximum attenuation of the noise in dB (negative number) */
+#define SPEEX_PREPROCESS_GET_NOISE_SUPPRESS 19
+
+/** Set maximum attenuation of the residual echo in dB (negative number) */
+#define SPEEX_PREPROCESS_SET_ECHO_SUPPRESS 20
+/** Get maximum attenuation of the residual echo in dB (negative number) */
+#define SPEEX_PREPROCESS_GET_ECHO_SUPPRESS 21
+
+/** Set maximum attenuation of the residual echo in dB when near end is active (negative number) */
+#define SPEEX_PREPROCESS_SET_ECHO_SUPPRESS_ACTIVE 22
+/** Get maximum attenuation of the residual echo in dB when near end is active (negative number) */
+#define SPEEX_PREPROCESS_GET_ECHO_SUPPRESS_ACTIVE 23
+
+/** Set the corresponding echo canceller state so that residual echo suppression can be performed (NULL for no residual echo suppression) */
+#define SPEEX_PREPROCESS_SET_ECHO_STATE 24
+/** Get the corresponding echo canceller state */
+#define SPEEX_PREPROCESS_GET_ECHO_STATE 25
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @}*/
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_stereo.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_stereo.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_stereo.h	(revision 1163)
@@ -0,0 +1,82 @@
+/* Copyright (C) 2002 Jean-Marc Valin*/
+/**
+   @file speex_stereo.h
+   @brief Describes the handling for intensity stereo
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef STEREO_H
+#define STEREO_H
+/** @defgroup SpeexStereoState SpeexStereoState: Handling Speex stereo files
+ *  This describes the Speex intensity stereo encoding/decoding
+ *  @{
+ */
+
+#include "speex/speex_types.h"
+#include "speex/speex_bits.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** State used for decoding (intensity) stereo information */
+typedef struct SpeexStereoState {
+   float balance;      /**< Left/right balance info */
+   float e_ratio;      /**< Ratio of energies: E(left+right)/[E(left)+E(right)]  */
+   float smooth_left;  /**< Smoothed left channel gain */
+   float smooth_right; /**< Smoothed right channel gain */
+   float reserved1;    /**< Reserved for future use */
+   float reserved2;    /**< Reserved for future use */
+} SpeexStereoState;
+
+/** Initialization value for a stereo state */
+#define SPEEX_STEREO_STATE_INIT {1,.5,1,1,0,0}
+
+/** Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits' */
+void speex_encode_stereo(float *data, int frame_size, SpeexBits *bits);
+
+/** Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits' */
+void speex_encode_stereo_int(spx_int16_t *data, int frame_size, SpeexBits *bits);
+
+/** Transforms a mono frame into a stereo frame using intensity stereo info */
+void speex_decode_stereo(float *data, int frame_size, SpeexStereoState *stereo);
+
+/** Transforms a mono frame into a stereo frame using intensity stereo info */
+void speex_decode_stereo_int(spx_int16_t *data, int frame_size, SpeexStereoState *stereo);
+
+/** Callback handler for intensity stereo info */
+int speex_std_stereo_request_handler(SpeexBits *bits, void *state, void *data);
+
+#ifdef __cplusplus
+}
+#endif
+
+/** @} */
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_types.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_types.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/speex_types.h	(revision 1163)
@@ -0,0 +1,126 @@
+/* speex_types.h taken from libogg */
+/********************************************************************
+ *                                                                  *
+ * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
+ *                                                                  *
+ * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
+ * by the Xiph.Org Foundation http://www.xiph.org/                  *
+ *                                                                  *
+ ********************************************************************
+
+ function: #ifdef jail to whip a few platforms into the UNIX ideal.
+ last mod: $Id$
+
+ ********************************************************************/
+/**
+   @file speex_types.h
+   @brief Speex types
+*/
+#ifndef _SPEEX_TYPES_H
+#define _SPEEX_TYPES_H
+
+#if defined(_WIN32) 
+
+#  if defined(__CYGWIN__)
+#    include <_G_config.h>
+     typedef _G_int32_t spx_int32_t;
+     typedef _G_uint32_t spx_uint32_t;
+     typedef _G_int16_t spx_int16_t;
+     typedef _G_uint16_t spx_uint16_t;
+#  elif defined(__MINGW32__)
+     typedef short spx_int16_t;                                                                             
+     typedef unsigned short spx_uint16_t;                                                                   
+     typedef int spx_int32_t;                                                                               
+     typedef unsigned int spx_uint32_t;                                                                     
+#  elif defined(__MWERKS__)
+     typedef int spx_int32_t;
+     typedef unsigned int spx_uint32_t;
+     typedef short spx_int16_t;
+     typedef unsigned short spx_uint16_t;
+#  else
+     /* MSVC/Borland */
+     typedef __int32 spx_int32_t;
+     typedef unsigned __int32 spx_uint32_t;
+     typedef __int16 spx_int16_t;
+     typedef unsigned __int16 spx_uint16_t;
+#  endif
+
+#elif defined(__MACOS__)
+
+#  include <sys/types.h>
+   typedef SInt16 spx_int16_t;
+   typedef UInt16 spx_uint16_t;
+   typedef SInt32 spx_int32_t;
+   typedef UInt32 spx_uint32_t;
+
+#elif defined(__MACOSX__) /* MacOS X Framework build */
+
+#  include <sys/types.h>
+   typedef int16_t spx_int16_t;
+   typedef u_int16_t spx_uint16_t;
+   typedef int32_t spx_int32_t;
+   typedef u_int32_t spx_uint32_t;
+
+#elif defined(__BEOS__)
+
+   /* Be */
+#  include <inttypes.h>
+   typedef int16_t spx_int16_t;
+   typedef u_int16_t spx_uint16_t;
+   typedef int32_t spx_int32_t;
+   typedef u_int32_t spx_uint32_t;
+
+#elif defined (__EMX__)
+
+   /* OS/2 GCC */
+   typedef short spx_int16_t;
+   typedef unsigned short spx_uint16_t;
+   typedef int spx_int32_t;
+   typedef unsigned int spx_uint32_t;
+
+#elif defined (DJGPP)
+
+   /* DJGPP */
+   typedef short spx_int16_t;
+   typedef int spx_int32_t;
+   typedef unsigned int spx_uint32_t;
+
+#elif defined(R5900)
+
+   /* PS2 EE */
+   typedef int spx_int32_t;
+   typedef unsigned spx_uint32_t;
+   typedef short spx_int16_t;
+
+#elif defined(__SYMBIAN32__)
+
+   /* Symbian GCC */
+   typedef signed short spx_int16_t;
+   typedef unsigned short spx_uint16_t;
+   typedef signed int spx_int32_t;
+   typedef unsigned int spx_uint32_t;
+
+#elif defined(CONFIG_TI_C54X) || defined (CONFIG_TI_C55X)
+
+   typedef short spx_int16_t;
+   typedef unsigned short spx_uint16_t;
+   typedef long spx_int32_t;
+   typedef unsigned long spx_uint32_t;
+
+#elif defined(CONFIG_TI_C6X)
+
+   typedef short spx_int16_t;
+   typedef unsigned short spx_uint16_t;
+   typedef int spx_int32_t;
+   typedef unsigned int spx_uint32_t;
+
+#else
+
+#  include <speex/speex_config_types.h>
+
+#endif
+
+#endif  /* _SPEEX_TYPES_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/stack_alloc.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/stack_alloc.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/stack_alloc.h	(revision 1163)
@@ -0,0 +1,124 @@
+/* Copyright (C) 2002 Jean-Marc Valin */
+/**
+   @file stack_alloc.h
+   @brief Temporary memory allocation on stack
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef STACK_ALLOC_H
+#define STACK_ALLOC_H
+
+#ifdef USE_ALLOCA
+#ifdef WIN32
+#include <malloc.h>
+#else
+#include <alloca.h>
+#endif
+#endif
+
+/**
+ * @def ALIGN(stack, size)
+ *
+ * Aligns the stack to a 'size' boundary
+ *
+ * @param stack Stack
+ * @param size  New size boundary
+ */
+
+/**
+ * @def PUSH(stack, size, type)
+ *
+ * Allocates 'size' elements of type 'type' on the stack
+ *
+ * @param stack Stack
+ * @param size  Number of elements
+ * @param type  Type of element
+ */
+
+/**
+ * @def PUSHS(stack, type)
+ *
+ * Allocates a struct stack 
+ *
+ * @param stack Stack
+ * @param type  Struct type
+ */
+
+/**
+ * @def VARDECL(var)
+ *
+ * Declare variable on stack
+ *
+ * @param var Variable to declare
+ */
+
+/**
+ * @def ALLOC(var, size, type)
+ *
+ * Allocate 'size' elements of 'type' on stack
+ *
+ * @param var  Name of variable to allocate
+ * @param size Number of elements
+ * @param type Type of element
+ */
+
+#ifdef ENABLE_VALGRIND
+
+#include <valgrind/memcheck.h>
+
+#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
+
+#define PUSH(stack, size, type) (VALGRIND_MAKE_NOACCESS(stack, 1000),ALIGN((stack),sizeof(type)),VALGRIND_MAKE_WRITABLE(stack, ((size)*sizeof(type))),(stack)+=((size)*sizeof(type)),(type*)((stack)-((size)*sizeof(type))))
+
+#define PUSHS(stack, type) (VALGRIND_MAKE_NOACCESS(stack, 1000),ALIGN((stack),sizeof(long)),VALGRIND_MAKE_WRITABLE(stack, (sizeof(type))),(stack)+=(sizeof(type)),(type*)((stack)-(sizeof(type))))
+
+#else
+
+#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
+
+#define PUSH(stack, size, type) (ALIGN((stack),sizeof(type)),(stack)+=((size)*sizeof(type)),(type*)((stack)-((size)*sizeof(type))))
+
+#define PUSHS(stack, type) (ALIGN((stack),sizeof(long)),(stack)+=(sizeof(type)),(type*)((stack)-(sizeof(type))))
+
+#endif
+
+#if defined(VAR_ARRAYS)
+#define VARDECL(var) 
+#define ALLOC(var, size, type) type var[size]
+#elif defined(USE_ALLOCA)
+#define VARDECL(var) var
+#define ALLOC(var, size, type) var = alloca(sizeof(type)*(size))
+#else
+#define VARDECL(var) var
+#define ALLOC(var, size, type) var = PUSH(stack, size, type)
+#endif
+
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/stereo.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/stereo.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/stereo.c	(revision 1163)
@@ -0,0 +1,192 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: stereo.c
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <speex/speex_stereo.h>
+#include <speex/speex_callbacks.h>
+#include "vq.h"
+#include <math.h>
+
+/*float e_ratio_quant[4] = {1, 1.26, 1.587, 2};*/
+static const float e_ratio_quant[4] = {.25f, .315f, .397f, .5f};
+
+void speex_encode_stereo(float *data, int frame_size, SpeexBits *bits)
+{
+   int i, tmp;
+   float e_left=0, e_right=0, e_tot=0;
+   float balance, e_ratio;
+   for (i=0;i<frame_size;i++)
+   {
+      e_left  += ((float)data[2*i])*data[2*i];
+      e_right += ((float)data[2*i+1])*data[2*i+1];
+      data[i] =  .5*(((float)data[2*i])+data[2*i+1]);
+      e_tot   += ((float)data[i])*data[i];
+   }
+   balance=(e_left+1)/(e_right+1);
+   e_ratio = e_tot/(1+e_left+e_right);
+
+   /*Quantization*/
+   speex_bits_pack(bits, 14, 5);
+   speex_bits_pack(bits, SPEEX_INBAND_STEREO, 4);
+   
+   balance=4*log(balance);
+
+   /*Pack sign*/
+   if (balance>0)
+      speex_bits_pack(bits, 0, 1);
+   else
+      speex_bits_pack(bits, 1, 1);
+   balance=floor(.5+fabs(balance));
+   if (balance>30)
+      balance=31;
+   
+   speex_bits_pack(bits, (int)balance, 5);
+   
+   /*Quantize energy ratio*/
+   tmp=vq_index(&e_ratio, e_ratio_quant, 1, 4);
+   speex_bits_pack(bits, tmp, 2);
+}
+
+void speex_encode_stereo_int(spx_int16_t *data, int frame_size, SpeexBits *bits)
+{
+   int i, tmp;
+   float e_left=0, e_right=0, e_tot=0;
+   float balance, e_ratio;
+   for (i=0;i<frame_size;i++)
+   {
+      e_left  += ((float)data[2*i])*data[2*i];
+      e_right += ((float)data[2*i+1])*data[2*i+1];
+      data[i] =  .5*(((float)data[2*i])+data[2*i+1]);
+      e_tot   += ((float)data[i])*data[i];
+   }
+   balance=(e_left+1)/(e_right+1);
+   e_ratio = e_tot/(1+e_left+e_right);
+
+   /*Quantization*/
+   speex_bits_pack(bits, 14, 5);
+   speex_bits_pack(bits, SPEEX_INBAND_STEREO, 4);
+   
+   balance=4*log(balance);
+
+   /*Pack sign*/
+   if (balance>0)
+      speex_bits_pack(bits, 0, 1);
+   else
+      speex_bits_pack(bits, 1, 1);
+   balance=floor(.5+fabs(balance));
+   if (balance>30)
+      balance=31;
+   
+   speex_bits_pack(bits, (int)balance, 5);
+   
+   /*Quantize energy ratio*/
+   tmp=vq_index(&e_ratio, e_ratio_quant, 1, 4);
+   speex_bits_pack(bits, tmp, 2);
+}
+
+void speex_decode_stereo(float *data, int frame_size, SpeexStereoState *stereo)
+{
+   float balance, e_ratio;
+   int i;
+   float e_tot=0, e_left, e_right, e_sum;
+
+   balance=stereo->balance;
+   e_ratio=stereo->e_ratio;
+   for (i=frame_size-1;i>=0;i--)
+   {
+      e_tot += ((float)data[i])*data[i];
+   }
+   e_sum=e_tot/e_ratio;
+   e_left  = e_sum*balance / (1+balance);
+   e_right = e_sum-e_left;
+
+   e_left  = sqrt(e_left/(e_tot+.01));
+   e_right = sqrt(e_right/(e_tot+.01));
+
+   for (i=frame_size-1;i>=0;i--)
+   {
+      float ftmp=data[i];
+      stereo->smooth_left  = .98*stereo->smooth_left  + .02*e_left;
+      stereo->smooth_right = .98*stereo->smooth_right + .02*e_right;
+      data[2*i] = stereo->smooth_left*ftmp;
+      data[2*i+1] = stereo->smooth_right*ftmp;
+   }
+}
+
+void speex_decode_stereo_int(spx_int16_t *data, int frame_size, SpeexStereoState *stereo)
+{
+   float balance, e_ratio;
+   int i;
+   float e_tot=0, e_left, e_right, e_sum;
+
+   balance=stereo->balance;
+   e_ratio=stereo->e_ratio;
+   for (i=frame_size-1;i>=0;i--)
+   {
+      e_tot += ((float)data[i])*data[i];
+   }
+   e_sum=e_tot/e_ratio;
+   e_left  = e_sum*balance / (1+balance);
+   e_right = e_sum-e_left;
+
+   e_left  = sqrt(e_left/(e_tot+.01));
+   e_right = sqrt(e_right/(e_tot+.01));
+
+   for (i=frame_size-1;i>=0;i--)
+   {
+      float ftmp=data[i];
+      stereo->smooth_left  = .98*stereo->smooth_left  + .02*e_left;
+      stereo->smooth_right = .98*stereo->smooth_right + .02*e_right;
+      data[2*i] = stereo->smooth_left*ftmp;
+      data[2*i+1] = stereo->smooth_right*ftmp;
+   }
+}
+
+int speex_std_stereo_request_handler(SpeexBits *bits, void *state, void *data)
+{
+   SpeexStereoState *stereo;
+   float sign=1;
+   int tmp;
+
+   stereo = (SpeexStereoState*)data;
+   if (speex_bits_unpack_unsigned(bits, 1))
+      sign=-1;
+   tmp = speex_bits_unpack_unsigned(bits, 5);
+   stereo->balance = exp(sign*.25*tmp);
+
+   tmp = speex_bits_unpack_unsigned(bits, 2);
+   stereo->e_ratio = e_ratio_quant[tmp];
+
+   return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vbr.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vbr.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vbr.c	(revision 1163)
@@ -0,0 +1,272 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: vbr.c
+
+   VBR-related routines
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "vbr.h"
+#include <math.h>
+
+
+#define sqr(x) ((x)*(x))
+
+#define MIN_ENERGY 6000
+#define NOISE_POW .3
+
+
+const float vbr_nb_thresh[9][11]={
+   {-1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f}, /*   CNG   */
+   { 3.5f,  2.5f,  2.0f,  1.2f,  0.5f,  0.0f, -0.5f, -0.7f, -0.8f, -0.9f, -1.0f}, /*  2 kbps */
+   {10.0f,  6.5f,  5.2f,  4.5f,  3.9f,  3.5f,  3.0f,  2.5f,  2.3f,  1.8f,  1.0f}, /*  6 kbps */
+   {11.0f,  8.8f,  7.5f,  6.5f,  5.0f,  3.9f,  3.9f,  3.9f,  3.5f,  3.0f,  1.0f}, /*  8 kbps */
+   {11.0f, 11.0f,  9.9f,  9.0f,  8.0f,  7.0f,  6.5f,  6.0f,  5.0f,  4.0f,  2.0f}, /* 11 kbps */
+   {11.0f, 11.0f, 11.0f, 11.0f,  9.5f,  9.0f,  8.0f,  7.0f,  6.5f,  5.0f,  3.0f}, /* 15 kbps */
+   {11.0f, 11.0f, 11.0f, 11.0f, 11.0f, 11.0f,  9.5f,  8.5f,  8.0f,  6.5f,  4.0f}, /* 18 kbps */
+   {11.0f, 11.0f, 11.0f, 11.0f, 11.0f, 11.0f, 11.0f, 11.0f,  9.8f,  7.5f,  5.5f}, /* 24 kbps */ 
+   { 8.0f,  5.0f,  3.7f,  3.0f,  2.5f,  2.0f,  1.8f,  1.5f,  1.0f,  0.0f,  0.0f}  /*  4 kbps */
+};
+
+
+const float vbr_hb_thresh[5][11]={
+   {-1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f}, /* silence */
+   {-1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f}, /*  2 kbps */
+   {11.0f, 11.0f,  9.5f,  8.5f,  7.5f,  6.0f,  5.0f,  3.9f,  3.0f,  2.0f,  1.0f}, /*  6 kbps */
+   {11.0f, 11.0f, 11.0f, 11.0f, 11.0f,  9.5f,  8.7f,  7.8f,  7.0f,  6.5f,  4.0f}, /* 10 kbps */
+   {11.0f, 11.0f, 11.0f, 11.0f, 11.0f, 11.0f, 11.0f, 11.0f,  9.8f,  7.5f,  5.5f}  /* 18 kbps */ 
+};
+
+const float vbr_uhb_thresh[2][11]={
+   {-1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f}, /* silence */
+   { 3.9f,  2.5f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f,  0.0f, -1.0f}  /*  2 kbps */
+};
+
+void vbr_init(VBRState *vbr)
+{
+   int i;
+
+   vbr->average_energy=0;
+   vbr->last_energy=1;
+   vbr->accum_sum=0;
+   vbr->energy_alpha=.1;
+   vbr->soft_pitch=0;
+   vbr->last_pitch_coef=0;
+   vbr->last_quality=0;
+
+   vbr->noise_accum = .05*pow(MIN_ENERGY, NOISE_POW);
+   vbr->noise_accum_count=.05;
+   vbr->noise_level=vbr->noise_accum/vbr->noise_accum_count;
+   vbr->consec_noise=0;
+
+
+   for (i=0;i<VBR_MEMORY_SIZE;i++)
+      vbr->last_log_energy[i] = log(MIN_ENERGY);
+}
+
+
+/*
+  This function should analyse the signal and decide how critical the
+  coding error will be perceptually. The following factors should be
+  taken into account:
+
+  -Attacks (positive energy derivative) should be coded with more bits
+
+  -Stationary voiced segments should receive more bits
+
+  -Segments with (very) low absolute energy should receive less bits (maybe
+  only shaped noise?)
+
+  -DTX for near-zero energy?
+
+  -Stationary fricative segments should have less bits
+
+  -Temporal masking: when energy slope is decreasing, decrease the bit-rate
+
+  -Decrease bit-rate for males (low pitch)?
+
+  -(wideband only) less bits in the high-band when signal is very 
+  non-stationary (harder to notice high-frequency noise)???
+
+*/
+
+float vbr_analysis(VBRState *vbr, spx_word16_t *sig, int len, int pitch, float pitch_coef)
+{
+   int i;
+   float ener=0, ener1=0, ener2=0;
+   float qual=7;
+   int va;
+   float log_energy;
+   float non_st=0;
+   float voicing;
+   float pow_ener;
+
+   for (i=0;i<len>>1;i++)
+      ener1 += ((float)sig[i])*sig[i];
+
+   for (i=len>>1;i<len;i++)
+      ener2 += ((float)sig[i])*sig[i];
+   ener=ener1+ener2;
+
+   log_energy = log(ener+MIN_ENERGY);
+   for (i=0;i<VBR_MEMORY_SIZE;i++)
+      non_st += sqr(log_energy-vbr->last_log_energy[i]);
+   non_st =  non_st/(30*VBR_MEMORY_SIZE);
+   if (non_st>1)
+      non_st=1;
+
+   voicing = 3*(pitch_coef-.4)*fabs(pitch_coef-.4);
+   vbr->average_energy = (1-vbr->energy_alpha)*vbr->average_energy + vbr->energy_alpha*ener;
+   vbr->noise_level=vbr->noise_accum/vbr->noise_accum_count;
+   pow_ener = pow(ener,NOISE_POW);
+   if (vbr->noise_accum_count<.06 && ener>MIN_ENERGY)
+      vbr->noise_accum = .05*pow_ener;
+
+   if ((voicing<.3 && non_st < .2 && pow_ener < 1.2*vbr->noise_level)
+       || (voicing<.3 && non_st < .05 && pow_ener < 1.5*vbr->noise_level)
+       || (voicing<.4 && non_st < .05 && pow_ener < 1.2*vbr->noise_level)
+       || (voicing<0 && non_st < .05))
+   {
+      float tmp;
+      va = 0;
+      vbr->consec_noise++;
+      if (pow_ener > 3*vbr->noise_level)
+         tmp = 3*vbr->noise_level;
+      else 
+         tmp = pow_ener;
+      if (vbr->consec_noise>=4)
+      {
+         vbr->noise_accum = .95*vbr->noise_accum + .05*tmp;
+         vbr->noise_accum_count = .95*vbr->noise_accum_count + .05;
+      }
+   } else {
+      va = 1;
+      vbr->consec_noise=0;
+   }
+
+   if (pow_ener < vbr->noise_level && ener>MIN_ENERGY)
+   {
+      vbr->noise_accum = .95*vbr->noise_accum + .05*pow_ener;
+      vbr->noise_accum_count = .95*vbr->noise_accum_count + .05;      
+   }
+
+   /* Checking for very low absolute energy */
+   if (ener < 30000)
+   {
+      qual -= .7;
+      if (ener < 10000)
+         qual-=.7;
+      if (ener < 3000)
+         qual-=.7;
+   } else {
+      float short_diff, long_diff;
+      short_diff = log((ener+1)/(1+vbr->last_energy));
+      long_diff = log((ener+1)/(1+vbr->average_energy));
+      /*fprintf (stderr, "%f %f\n", short_diff, long_diff);*/
+
+      if (long_diff<-5)
+         long_diff=-5;
+      if (long_diff>2)
+         long_diff=2;
+
+      if (long_diff>0)
+         qual += .6*long_diff;
+      if (long_diff<0)
+         qual += .5*long_diff;
+      if (short_diff>0)
+      {
+         if (short_diff>5)
+            short_diff=5;
+         qual += .5*short_diff;
+      }
+      /* Checking for energy increases */
+      if (ener2 > 1.6*ener1)
+         qual += .5;
+   }
+   vbr->last_energy = ener;
+   vbr->soft_pitch = .6*vbr->soft_pitch + .4*pitch_coef;
+   qual += 2.2*((pitch_coef-.4) + (vbr->soft_pitch-.4));
+
+   if (qual < vbr->last_quality)
+      qual = .5*qual + .5*vbr->last_quality;
+   if (qual<4)
+      qual=4;
+   if (qual>10)
+      qual=10;
+   
+   /*
+   if (vbr->consec_noise>=2)
+      qual-=1.3;
+   if (vbr->consec_noise>=5)
+      qual-=1.3;
+   if (vbr->consec_noise>=12)
+      qual-=1.3;
+   */
+   if (vbr->consec_noise>=3)
+      qual=4;
+
+   if (vbr->consec_noise)
+      qual -= 1.0 * (log(3.0 + vbr->consec_noise)-log(3));
+   if (qual<0)
+      qual=0;
+   
+   if (ener<60000)
+   {
+      if (vbr->consec_noise>2)
+         qual-=0.5*(log(3.0 + vbr->consec_noise)-log(3));
+      if (ener<10000&&vbr->consec_noise>2)
+         qual-=0.5*(log(3.0 + vbr->consec_noise)-log(3));
+      if (qual<0)
+         qual=0;
+      qual += .3*log(.0001+ener/60000.0);
+   }
+   if (qual<-1)
+      qual=-1;
+
+   /*printf ("%f %f %f %f %d\n", qual, voicing, non_st, pow_ener/(.01+vbr->noise_level), va);*/
+
+   vbr->last_pitch_coef = pitch_coef;
+   vbr->last_quality = qual;
+
+   for (i=VBR_MEMORY_SIZE-1;i>0;i--)
+      vbr->last_log_energy[i] = vbr->last_log_energy[i-1];
+   vbr->last_log_energy[0] = log_energy;
+
+   /*printf ("VBR: %f %f %f %d %f\n", (float)(log_energy-log(vbr->average_energy+MIN_ENERGY)), non_st, voicing, va, vbr->noise_level);*/
+
+   return qual;
+}
+
+void vbr_destroy(VBRState *vbr)
+{
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vbr.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vbr.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vbr.h	(revision 1163)
@@ -0,0 +1,70 @@
+/* Copyright (C) 2002 Jean-Marc Valin */
+/**
+   @file vbr.h
+   @brief Variable Bit-Rate (VBR) related routines
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+
+#ifndef VBR_H
+#define VBR_H
+
+#include "misc.h"
+
+#define VBR_MEMORY_SIZE 5
+
+extern const float vbr_nb_thresh[9][11];
+extern const float vbr_hb_thresh[5][11];
+extern const float vbr_uhb_thresh[2][11];
+
+/** VBR state. */
+typedef struct VBRState {
+   float energy_alpha;
+   float average_energy;
+   float last_energy;
+   float last_log_energy[VBR_MEMORY_SIZE];
+   float accum_sum;
+   float last_pitch_coef;
+   float soft_pitch;
+   float last_quality;
+   float noise_level;
+   float noise_accum;
+   float noise_accum_count;
+   int   consec_noise;
+} VBRState;
+
+void vbr_init(VBRState *vbr);
+
+float vbr_analysis(VBRState *vbr, spx_word16_t *sig, int len, int pitch, float pitch_coef);
+
+void vbr_destroy(VBRState *vbr);
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vorbis_psy.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vorbis_psy.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vorbis_psy.c	(revision 1163)
@@ -0,0 +1,508 @@
+/* Copyright (C) 2005 Jean-Marc Valin, CSIRO, Christopher Montgomery
+   File: vorbis_psy.c
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef VORBIS_PSYCHO
+
+#include "misc.h"
+#include "smallft.h"
+#include "lpc.h"
+#include "vorbis_psy.h"
+
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+/* psychoacoustic setup ********************************************/
+
+static VorbisPsyInfo example_tuning = {
+  
+  .5,.5,  
+  3,3,25,
+  
+  /*63     125     250     500      1k      2k      4k      8k     16k*/
+  // vorbis mode 4 style
+  //{-32,-32,-32,-32,-28,-24,-22,-20,-20, -20, -20, -8, -6, -6, -6, -6, -6},
+  { -4, -6, -6, -6, -6, -6, -6, -6, -8, -8,-10,-10, -8, -6, -4, -4, -2},
+  
+  {
+    0, 1, 2, 3, 4, 5, 5,  5,     /* 7dB */
+    6, 6, 6, 5, 4, 4, 4,  4,     /* 15dB */
+    4, 4, 5, 5, 5, 6, 6,  6,     /* 23dB */
+    7, 7, 7, 8, 8, 8, 9, 10,     /* 31dB */
+    11,12,13,14,15,16,17, 18,     /* 39dB */
+  }
+
+};
+
+
+
+/* there was no great place to put this.... */
+#include <stdio.h>
+static void _analysis_output(char *base,int i,float *v,int n,int bark,int dB){
+  int j;
+  FILE *of;
+  char buffer[80];
+
+  sprintf(buffer,"%s_%d.m",base,i);
+  of=fopen(buffer,"w");
+  
+  if(!of)perror("failed to open data dump file");
+  
+  for(j=0;j<n;j++){
+    if(bark){
+      float b=toBARK((4000.f*j/n)+.25);
+      fprintf(of,"%f ",b);
+    }else
+      fprintf(of,"%f ",(double)j);
+    
+    if(dB){
+      float val;
+      if(v[j]==0.)
+	val=-140.;
+      else
+	val=todB(v[j]);
+      fprintf(of,"%f\n",val);
+    }else{
+      fprintf(of,"%f\n",v[j]);
+    }
+  }
+  fclose(of);
+}
+
+static void bark_noise_hybridmp(int n,const long *b,
+                                const float *f,
+                                float *noise,
+                                const float offset,
+                                const int fixed){
+  
+  float *N=alloca(n*sizeof(*N));
+  float *X=alloca(n*sizeof(*N));
+  float *XX=alloca(n*sizeof(*N));
+  float *Y=alloca(n*sizeof(*N));
+  float *XY=alloca(n*sizeof(*N));
+
+  float tN, tX, tXX, tY, tXY;
+  int i;
+
+  int lo, hi;
+  float R, A, B, D;
+  float w, x, y;
+
+  tN = tX = tXX = tY = tXY = 0.f;
+
+  y = f[0] + offset;
+  if (y < 1.f) y = 1.f;
+
+  w = y * y * .5;
+    
+  tN += w;
+  tX += w;
+  tY += w * y;
+
+  N[0] = tN;
+  X[0] = tX;
+  XX[0] = tXX;
+  Y[0] = tY;
+  XY[0] = tXY;
+
+  for (i = 1, x = 1.f; i < n; i++, x += 1.f) {
+    
+    y = f[i] + offset;
+    if (y < 1.f) y = 1.f;
+
+    w = y * y;
+    
+    tN += w;
+    tX += w * x;
+    tXX += w * x * x;
+    tY += w * y;
+    tXY += w * x * y;
+
+    N[i] = tN;
+    X[i] = tX;
+    XX[i] = tXX;
+    Y[i] = tY;
+    XY[i] = tXY;
+  }
+  
+  for (i = 0, x = 0.f;; i++, x += 1.f) {
+    
+    lo = b[i] >> 16;
+    if( lo>=0 ) break;
+    hi = b[i] & 0xffff;
+    
+    tN = N[hi] + N[-lo];
+    tX = X[hi] - X[-lo];
+    tXX = XX[hi] + XX[-lo];
+    tY = Y[hi] + Y[-lo];    
+    tXY = XY[hi] - XY[-lo];
+    
+    A = tY * tXX - tX * tXY;
+    B = tN * tXY - tX * tY;
+    D = tN * tXX - tX * tX;
+    R = (A + x * B) / D;
+    if (R < 0.f)
+      R = 0.f;
+    
+    noise[i] = R - offset;
+  }
+  
+  for ( ;; i++, x += 1.f) {
+    
+    lo = b[i] >> 16;
+    hi = b[i] & 0xffff;
+    if(hi>=n)break;
+    
+    tN = N[hi] - N[lo];
+    tX = X[hi] - X[lo];
+    tXX = XX[hi] - XX[lo];
+    tY = Y[hi] - Y[lo];
+    tXY = XY[hi] - XY[lo];
+    
+    A = tY * tXX - tX * tXY;
+    B = tN * tXY - tX * tY;
+    D = tN * tXX - tX * tX;
+    R = (A + x * B) / D;
+    if (R < 0.f) R = 0.f;
+    
+    noise[i] = R - offset;
+  }
+  for ( ; i < n; i++, x += 1.f) {
+    
+    R = (A + x * B) / D;
+    if (R < 0.f) R = 0.f;
+    
+    noise[i] = R - offset;
+  }
+  
+  if (fixed <= 0) return;
+  
+  for (i = 0, x = 0.f;; i++, x += 1.f) {
+    hi = i + fixed / 2;
+    lo = hi - fixed;
+    if(lo>=0)break;
+
+    tN = N[hi] + N[-lo];
+    tX = X[hi] - X[-lo];
+    tXX = XX[hi] + XX[-lo];
+    tY = Y[hi] + Y[-lo];
+    tXY = XY[hi] - XY[-lo];
+    
+    
+    A = tY * tXX - tX * tXY;
+    B = tN * tXY - tX * tY;
+    D = tN * tXX - tX * tX;
+    R = (A + x * B) / D;
+
+    if (R - offset < noise[i]) noise[i] = R - offset;
+  }
+  for ( ;; i++, x += 1.f) {
+    
+    hi = i + fixed / 2;
+    lo = hi - fixed;
+    if(hi>=n)break;
+    
+    tN = N[hi] - N[lo];
+    tX = X[hi] - X[lo];
+    tXX = XX[hi] - XX[lo];
+    tY = Y[hi] - Y[lo];
+    tXY = XY[hi] - XY[lo];
+    
+    A = tY * tXX - tX * tXY;
+    B = tN * tXY - tX * tY;
+    D = tN * tXX - tX * tX;
+    R = (A + x * B) / D;
+    
+    if (R - offset < noise[i]) noise[i] = R - offset;
+  }
+  for ( ; i < n; i++, x += 1.f) {
+    R = (A + x * B) / D;
+    if (R - offset < noise[i]) noise[i] = R - offset;
+  }
+}
+
+static void _vp_noisemask(VorbisPsy *p,
+			  float *logfreq, 
+			  float *logmask){
+
+  int i,n=p->n/2;
+  float *work=alloca(n*sizeof(*work));
+
+  bark_noise_hybridmp(n,p->bark,logfreq,logmask,
+		      140.,-1);
+
+  for(i=0;i<n;i++)work[i]=logfreq[i]-logmask[i];
+
+  bark_noise_hybridmp(n,p->bark,work,logmask,0.,
+		      p->vi->noisewindowfixed);
+
+  for(i=0;i<n;i++)work[i]=logfreq[i]-work[i];
+  
+  {
+    static int seq=0;
+    
+    float work2[n];
+    for(i=0;i<n;i++){
+      work2[i]=logmask[i]+work[i];
+    }
+    
+    //_analysis_output("logfreq",seq,logfreq,n,0,0);
+    //_analysis_output("median",seq,work,n,0,0);
+    //_analysis_output("envelope",seq,work2,n,0,0);
+    seq++;
+  }
+
+  for(i=0;i<n;i++){
+    int dB=logmask[i]+.5;
+    if(dB>=NOISE_COMPAND_LEVELS)dB=NOISE_COMPAND_LEVELS-1;
+    if(dB<0)dB=0;
+    logmask[i]= work[i]+p->vi->noisecompand[dB]+p->noiseoffset[i];
+  }
+
+}
+
+VorbisPsy *vorbis_psy_init(int rate, int n)
+{
+  long i,j,lo=-99,hi=1;
+  VorbisPsy *p = speex_alloc(sizeof(VorbisPsy));
+  memset(p,0,sizeof(*p));
+  
+  p->n = n;
+  spx_drft_init(&p->lookup, n);
+  p->bark = speex_alloc(n*sizeof(*p->bark));
+  p->rate=rate;
+  p->vi = &example_tuning;
+
+  /* BH4 window */
+  p->window = speex_alloc(sizeof(*p->window)*n);
+  float a0 = .35875f;
+  float a1 = .48829f;
+  float a2 = .14128f;
+  float a3 = .01168f;
+  for(i=0;i<n;i++)
+    p->window[i] = //a0 - a1*cos(2.*M_PI/n*(i+.5)) + a2*cos(4.*M_PI/n*(i+.5)) - a3*cos(6.*M_PI/n*(i+.5));
+      sin((i+.5)/n * M_PI)*sin((i+.5)/n * M_PI);
+  /* bark scale lookups */
+  for(i=0;i<n;i++){
+    float bark=toBARK(rate/(2*n)*i); 
+    
+    for(;lo+p->vi->noisewindowlomin<i && 
+	  toBARK(rate/(2*n)*lo)<(bark-p->vi->noisewindowlo);lo++);
+    
+    for(;hi<=n && (hi<i+p->vi->noisewindowhimin ||
+	  toBARK(rate/(2*n)*hi)<(bark+p->vi->noisewindowhi));hi++);
+    
+    p->bark[i]=((lo-1)<<16)+(hi-1);
+
+  }
+
+  /* set up rolling noise median */
+  p->noiseoffset=speex_alloc(n*sizeof(*p->noiseoffset));
+  
+  for(i=0;i<n;i++){
+    float halfoc=toOC((i+.5)*rate/(2.*n))*2.;
+    int inthalfoc;
+    float del;
+    
+    if(halfoc<0)halfoc=0;
+    if(halfoc>=P_BANDS-1)halfoc=P_BANDS-1;
+    inthalfoc=(int)halfoc;
+    del=halfoc-inthalfoc;
+    
+    p->noiseoffset[i]=
+      p->vi->noiseoff[inthalfoc]*(1.-del) + 
+      p->vi->noiseoff[inthalfoc+1]*del;
+    
+  }
+#if 0
+  _analysis_output_always("noiseoff0",ls,p->noiseoffset,n,1,0,0);
+#endif
+
+   return p;
+}
+
+void vorbis_psy_destroy(VorbisPsy *p)
+{
+  if(p){
+    spx_drft_clear(&p->lookup);
+    if(p->bark)
+      speex_free(p->bark);
+    if(p->noiseoffset)
+      speex_free(p->noiseoffset);
+    if(p->window)
+      speex_free(p->window);
+    memset(p,0,sizeof(*p));
+    speex_free(p);
+  }
+}
+
+void compute_curve(VorbisPsy *psy, float *audio, float *curve)
+{
+   int i;
+   float work[psy->n];
+
+   float scale=4.f/psy->n;
+   float scale_dB;
+
+   scale_dB=todB(scale);
+  
+   /* window the PCM data; use a BH4 window, not vorbis */
+   for(i=0;i<psy->n;i++)
+     work[i]=audio[i] * psy->window[i];
+
+   {
+     static int seq=0;
+     
+     //_analysis_output("win",seq,work,psy->n,0,0);
+
+     seq++;
+   }
+
+    /* FFT yields more accurate tonal estimation (not phase sensitive) */
+    spx_drft_forward(&psy->lookup,work);
+
+    /* magnitudes */
+    work[0]=scale_dB+todB(work[0]);
+    for(i=1;i<psy->n-1;i+=2){
+      float temp = work[i]*work[i] + work[i+1]*work[i+1];
+      work[(i+1)>>1] = scale_dB+.5f * todB(temp);
+    }
+
+    /* derive a noise curve */
+    _vp_noisemask(psy,work,curve);
+#define SIDEL 12
+    for (i=0;i<SIDEL;i++)
+    {
+       curve[i]=curve[SIDEL];
+    }
+#define SIDEH 12
+    for (i=0;i<SIDEH;i++)
+    {
+       curve[(psy->n>>1)-i-1]=curve[(psy->n>>1)-SIDEH];
+    }
+    for(i=0;i<((psy->n)>>1);i++)
+       curve[i] = fromdB(1.2*curve[i]+.2*i);
+       //curve[i] = fromdB(0.8*curve[i]+.35*i);
+       //curve[i] = fromdB(0.9*curve[i])*pow(1.0*i+45,1.3);
+}
+
+/* Transform a masking curve (power spectrum) into a pole-zero filter */
+void curve_to_lpc(VorbisPsy *psy, float *curve, float *awk1, float *awk2, int ord)
+{
+   int i;
+   float ac[psy->n];
+   float tmp;
+   int len = psy->n >> 1;
+   for (i=0;i<2*len;i++)
+      ac[i] = 0;
+   for (i=1;i<len;i++)
+      ac[2*i-1] = curve[i];
+   ac[0] = curve[0];
+   ac[2*len-1] = curve[len-1];
+   
+   spx_drft_backward(&psy->lookup, ac);
+   _spx_lpc(awk1, ac, ord);
+   tmp = 1.;
+   for (i=0;i<ord;i++)
+   {
+      tmp *= .99;
+      awk1[i] *= tmp;
+   }
+#if 0
+   for (i=0;i<ord;i++)
+      awk2[i] = 0;
+#else
+   /* Use the second (awk2) filter to correct the first one */
+   for (i=0;i<2*len;i++)
+      ac[i] = 0;   
+   for (i=0;i<ord;i++)
+      ac[i+1] = awk1[i];
+   ac[0] = 1;
+   spx_drft_forward(&psy->lookup, ac);
+   /* Compute (power) response of awk1 (all zero) */
+   ac[0] *= ac[0];
+   for (i=1;i<len;i++)
+      ac[i] = ac[2*i-1]*ac[2*i-1] + ac[2*i]*ac[2*i];
+   ac[len] = ac[2*len-1]*ac[2*len-1];
+   /* Compute correction required */
+   for (i=0;i<len;i++)
+      curve[i] = 1. / (1e-6f+curve[i]*ac[i]);
+
+   for (i=0;i<2*len;i++)
+      ac[i] = 0;
+   for (i=1;i<len;i++)
+      ac[2*i-1] = curve[i];
+   ac[0] = curve[0];
+   ac[2*len-1] = curve[len-1];
+   
+   spx_drft_backward(&psy->lookup, ac);
+   _spx_lpc(awk2, ac, ord);
+   tmp = 1;
+   for (i=0;i<ord;i++)
+   {
+      tmp *= .99;
+      awk2[i] *= tmp;
+   }
+#endif
+}
+
+#if 0
+#include <stdio.h>
+#include <math.h>
+
+#define ORDER 10
+#define CURVE_SIZE 24
+
+int main()
+{
+   int i;
+   float curve[CURVE_SIZE];
+   float awk1[ORDER], awk2[ORDER];
+   for (i=0;i<CURVE_SIZE;i++)
+      scanf("%f ", &curve[i]);
+   for (i=0;i<CURVE_SIZE;i++)
+      curve[i] = pow(10.f, .1*curve[i]);
+   curve_to_lpc(curve, CURVE_SIZE, awk1, awk2, ORDER);
+   for (i=0;i<ORDER;i++)
+      printf("%f ", awk1[i]);
+   printf ("\n");
+   for (i=0;i<ORDER;i++)
+      printf("%f ", awk2[i]);
+   printf ("\n");
+   return 0;
+}
+#endif
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vorbis_psy.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vorbis_psy.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vorbis_psy.h	(revision 1163)
@@ -0,0 +1,97 @@
+/* Copyright (C) 2005 Jean-Marc Valin, CSIRO, Christopher Montgomery
+   File: vorbis_psy.h
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef VORBIS_PSY_H
+#define VORBIS_PSY_H
+
+#ifdef VORBIS_PSYCHO
+
+#include "smallft.h"
+#define P_BANDS 17      /* 62Hz to 16kHz */
+#define NOISE_COMPAND_LEVELS 40
+
+
+#define todB(x)   ((x)==0?-400.f:log((x)*(x))*4.34294480f)
+#define fromdB(x) (exp((x)*.11512925f))  
+
+/* The bark scale equations are approximations, since the original
+   table was somewhat hand rolled.  The below are chosen to have the
+   best possible fit to the rolled tables, thus their somewhat odd
+   appearance (these are more accurate and over a longer range than
+   the oft-quoted bark equations found in the texts I have).  The
+   approximations are valid from 0 - 30kHz (nyquist) or so.
+
+   all f in Hz, z in Bark */
+
+#define toBARK(n)   (13.1f*atan(.00074f*(n))+2.24f*atan((n)*(n)*1.85e-8f)+1e-4f*(n))
+#define fromBARK(z) (102.f*(z)-2.f*pow(z,2.f)+.4f*pow(z,3.f)+pow(1.46f,z)-1.f)
+
+/* Frequency to octave.  We arbitrarily declare 63.5 Hz to be octave
+   0.0 */
+
+#define toOC(n)     (log(n)*1.442695f-5.965784f)
+#define fromOC(o)   (exp(((o)+5.965784f)*.693147f))
+
+
+typedef struct {
+
+  float noisewindowlo;
+  float noisewindowhi;
+  int   noisewindowlomin;
+  int   noisewindowhimin;
+  int   noisewindowfixed;
+  float noiseoff[P_BANDS];
+  float noisecompand[NOISE_COMPAND_LEVELS];
+
+} VorbisPsyInfo;
+
+
+
+typedef struct {
+  int n;
+  int rate;
+  struct drft_lookup lookup;
+  VorbisPsyInfo *vi;
+
+  float *window;
+  float *noiseoffset;
+  long  *bark;
+
+} VorbisPsy;
+
+
+VorbisPsy *vorbis_psy_init(int rate, int size);
+void vorbis_psy_destroy(VorbisPsy *psy);
+void compute_curve(VorbisPsy *psy, float *audio, float *curve);
+void curve_to_lpc(VorbisPsy *psy, float *curve, float *awk1, float *awk2, int ord);
+
+#endif
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq.c	(revision 1163)
@@ -0,0 +1,170 @@
+/* Copyright (C) 2002 Jean-Marc Valin
+   File: vq.c
+   Vector quantization
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "vq.h"
+#include "stack_alloc.h"
+#include "misc.h"
+
+#ifdef _USE_SSE
+#include <xmmintrin.h>
+#include "vq_sse.h"
+#elif defined(SHORTCUTS) && (defined(ARM4_ASM) || defined(ARM5E_ASM))
+#include "vq_arm4.h"
+#elif defined(BFIN_ASM)
+#include "vq_bfin.h"
+#endif
+
+
+int scal_quant(spx_word16_t in, const spx_word16_t *boundary, int entries)
+{
+   int i=0;
+   while (i<entries-1 && in>boundary[0])
+   {
+      boundary++;
+      i++;
+   }
+   return i;
+}
+
+int scal_quant32(spx_word32_t in, const spx_word32_t *boundary, int entries)
+{
+   int i=0;
+   while (i<entries-1 && in>boundary[0])
+   {
+      boundary++;
+      i++;
+   }
+   return i;
+}
+
+/*Finds the index of the entry in a codebook that best matches the input*/
+int vq_index(float *in, const float *codebook, int len, int entries)
+{
+   int i,j;
+   float min_dist=0;
+   int best_index=0;
+   for (i=0;i<entries;i++)
+   {
+      float dist=0;
+      for (j=0;j<len;j++)
+      {
+         float tmp = in[j]-*codebook++;
+         dist += tmp*tmp;
+      }
+      if (i==0 || dist<min_dist)
+      {
+         min_dist=dist;
+         best_index=i;
+      }
+   }
+   return best_index;
+}
+
+
+#ifndef OVERRIDE_VQ_NBEST
+/*Finds the indices of the n-best entries in a codebook*/
+void vq_nbest(spx_word16_t *in, const spx_word16_t *codebook, int len, int entries, spx_word32_t *E, int N, int *nbest, spx_word32_t *best_dist, char *stack)
+{
+   int i,j,k,used;
+   used = 0;
+   for (i=0;i<entries;i++)
+   {
+      spx_word32_t dist=0;
+      for (j=0;j<len;j++)
+         dist = MAC16_16(dist,in[j],*codebook++);
+#ifdef FIXED_POINT
+      dist=SUB32(SHR32(E[i],1),dist);
+#else
+      dist=.5f*E[i]-dist;
+#endif
+      if (i<N || dist<best_dist[N-1])
+      {
+         for (k=N-1; (k >= 1) && (k > used || dist < best_dist[k-1]); k--)
+         {
+            best_dist[k]=best_dist[k-1];
+            nbest[k] = nbest[k-1];
+         }
+         best_dist[k]=dist;
+         nbest[k]=i;
+         used++;
+      }
+   }
+}
+#endif
+
+
+
+
+#ifndef OVERRIDE_VQ_NBEST_SIGN
+/*Finds the indices of the n-best entries in a codebook with sign*/
+void vq_nbest_sign(spx_word16_t *in, const spx_word16_t *codebook, int len, int entries, spx_word32_t *E, int N, int *nbest, spx_word32_t *best_dist, char *stack)
+{
+   int i,j,k, sign, used;
+   used=0;
+   for (i=0;i<entries;i++)
+   {
+      spx_word32_t dist=0;
+      for (j=0;j<len;j++)
+         dist = MAC16_16(dist,in[j],*codebook++);
+      if (dist>0)
+      {
+         sign=0;
+         dist=-dist;
+      } else
+      {
+         sign=1;
+      }
+#ifdef FIXED_POINT
+      dist = ADD32(dist,SHR32(E[i],1));
+#else
+      dist = ADD32(dist,.5f*E[i]);
+#endif
+      if (i<N || dist<best_dist[N-1])
+      {
+         for (k=N-1; (k >= 1) && (k > used || dist < best_dist[k-1]); k--)
+         {
+            best_dist[k]=best_dist[k-1];
+            nbest[k] = nbest[k-1];
+         }
+         best_dist[k]=dist;
+         nbest[k]=i;
+         used++;
+         if (sign)
+            nbest[k]+=entries;
+      }
+   }
+}
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq.h	(revision 1163)
@@ -0,0 +1,55 @@
+/* Copyright (C) 2002 Jean-Marc Valin */
+/**
+   @file vq.h
+   @brief Vector quantization
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef VQ_H
+#define VQ_H
+
+#include "misc.h"
+
+int scal_quant(spx_word16_t in, const spx_word16_t *boundary, int entries);
+int scal_quant32(spx_word32_t in, const spx_word32_t *boundary, int entries);
+
+int vq_index(float *in, const float *codebook, int len, int entries);
+#ifdef _USE_SSE
+#include <xmmintrin.h>
+void vq_nbest(spx_word16_t *in, const __m128 *codebook, int len, int entries, __m128 *E, int N, int *nbest, spx_word32_t *best_dist, char *stack);
+
+void vq_nbest_sign(spx_word16_t *in, const __m128 *codebook, int len, int entries, __m128 *E, int N, int *nbest, spx_word32_t *best_dist, char *stack);
+#else
+void vq_nbest(spx_word16_t *in, const spx_word16_t *codebook, int len, int entries, spx_word32_t *E, int N, int *nbest, spx_word32_t *best_dist, char *stack);
+
+void vq_nbest_sign(spx_word16_t *in, const spx_word16_t *codebook, int len, int entries, spx_word32_t *E, int N, int *nbest, spx_word32_t *best_dist, char *stack);
+#endif
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq_arm4.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq_arm4.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq_arm4.h	(revision 1163)
@@ -0,0 +1,115 @@
+/* Copyright (C) 2004 Jean-Marc Valin */
+/**
+   @file vq_arm4.h
+   @brief ARM4-optimized vq routine
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#define OVERRIDE_VQ_NBEST
+void vq_nbest(spx_word16_t *in, const spx_word16_t *codebook, int len, int entries, spx_word32_t *E, int N, int *nbest, spx_word32_t *best_dist, char *stack)
+{
+   int i,j;
+   for (i=0;i<entries;i+=4)
+   {
+#if 1
+      spx_word32_t dist1, dist2, dist3, dist4;
+      int dead1, dead2, dead3, dead4, dead5, dead6, dead7, dead8;
+      __asm__ __volatile__ (
+            "mov %0, #0 \n\t"
+            "mov %1, #0 \n\t"
+            "mov %2, #0 \n\t"
+            "mov %3, #0 \n\t"
+            "mov %10, %4 \n\t"
+            "add %4, %4, %4\n\t"
+            ".vqloop%=:\n\t"
+            "ldrsh %7, [%5], #2 \n\t"
+            "ldrsh %8, [%6] \n\t"
+            "mov %9, %6 \n\t"
+            "mla %0, %7, %8, %0 \n\t"
+            "ldrsh %8, [%9, %4]! \n\t"
+            "mla %1, %7, %8, %1 \n\t"
+            "ldrsh %8, [%9, %4]!\n\t"
+            "mla %2, %7, %8, %2 \n\t"
+            "ldrsh %8, [%9, %4]! \n\t"
+            "mla %3, %7, %8, %3 \n\t"
+            "subs %10, %10, #1 \n\t"
+            "add %6, %6, #2 \n\t"
+            "bne .vqloop%="
+         : "=r" (dist1), "=r" (dist2), "=r" (dist3), "=r" (dist4),
+      "=r" (dead1), "=r" (dead2), "=r" (codebook), "=r" (dead4),
+      "=r" (dead5), "=r" (dead6), "=r" (dead7)
+         : "4" (len), "5" (in), "6" (codebook)
+         : "cc");
+#else
+dist1=dist2=dist3=dist4=0;
+   /*   spx_word32_t dist1=0;
+      spx_word32_t dist2=0;
+      spx_word32_t dist3=0;
+      spx_word32_t dist4=0;*/
+      for (j=0;j<2;j++)
+      {
+         const spx_word16_t *code = codebook;
+         dist1 = MAC16_16(dist1,in[j],*code);
+         code += len;
+         dist2 = MAC16_16(dist2,in[j],*code);
+         code += len;
+         dist3 = MAC16_16(dist3,in[j],*code);
+         code += len;
+         dist4 = MAC16_16(dist4,in[j],*code);
+         codebook++;
+      }
+#endif
+      dist1=SUB32(SHR(*E++,1),dist1);
+      if (dist1<*best_dist || i==0)
+      {
+         *best_dist=dist1;
+         *nbest=i;
+      }
+      dist2=SUB32(SHR(*E++,1),dist2);
+      if (dist2<*best_dist)
+      {
+         *best_dist=dist2;
+         *nbest=i+1;
+      }
+      dist3=SUB32(SHR(*E++,1),dist3);
+      if (dist3<*best_dist)
+      {
+         *best_dist=dist3;
+         *nbest=i+2;
+      }
+      dist4=SUB32(SHR(*E++,1),dist4);
+      if (dist4<*best_dist)
+      {
+         *best_dist=dist4;
+         *nbest=i+3;
+      }
+      codebook += 3*len;
+   }
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq_bfin.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq_bfin.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq_bfin.h	(revision 1163)
@@ -0,0 +1,107 @@
+/* Copyright (C) 2005 Analog Devices */
+/**
+   @file vq_bfin.h
+   @author Jean-Marc Valin 
+   @brief Blackfin-optimized vq routine
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#define OVERRIDE_VQ_NBEST
+void vq_nbest(spx_word16_t *in, const spx_word16_t *codebook, int len, int entries, spx_word32_t *E, int N, int *nbest, spx_word32_t *best_dist, char *stack)
+{
+   if (N==1)
+   {
+      best_dist[0] = 2147483647;
+      {
+         spx_word32_t dist;
+         __asm__ __volatile__
+               (
+            "LC0 = %8;\n\t"
+            "R2 = 0;\n\t"
+            "I0 = %6;\n\t"
+            "B0 = %6;\n\t"
+            "L0 = %9;\n\t"
+            "LOOP entries_loop%= LC0;\n\t"
+            "LOOP_BEGIN entries_loop%=;\n\t"
+               "%0 = [%4++];\n\t"
+               "%0 >>= 1;\n\t"
+               "A0 = %0;\n\t"
+               "R0.L = W[%1++%7] || R1.L = W[I0++];\n\t"
+               "LOOP vq_loop%= LC1 = %5;\n\t"
+               "LOOP_BEGIN vq_loop%=;\n\t"
+                  "%0 = (A0 -= R0.L*R1.L) (IS) || R0.L = W[%1++%7] || R1.L = W[I0++];\n\t"
+               "LOOP_END vq_loop%=;\n\t"
+               "%0 = (A0 -= R0.L*R1.L) (IS);\n\t"
+               "cc = %0 < %2;\n\t"
+               "if cc %2 = %0;\n\t"
+               "if cc %3 = R2;\n\t"
+               "R2 += 1;\n\t"
+            "LOOP_END entries_loop%=;\n\t"
+            : "=&D" (dist), "=&a" (codebook), "=&d" (best_dist[0]), "=&d" (nbest[0]), "=&a" (E)
+            : "a" (len-1), "a" (in), "a" (2), "d" (entries), "d" (len<<1), "1" (codebook), "4" (E), "2" (best_dist[0]), "3" (nbest[0])
+            : "R0", "R1", "R2", "I0", "L0", "B0", "A0", "cc", "memory"
+               );
+      }
+   } else {
+   int i,k,used;
+   used = 0;
+   for (i=0;i<entries;i++)
+   {
+      spx_word32_t dist;
+      __asm__
+            (
+            "%0 >>= 1;\n\t"
+            "A0 = %0;\n\t"
+            "I0 = %3;\n\t"
+            "L0 = 0;\n\t"
+            "R0.L = W[%1++%4] || R1.L = W[I0++];\n\t"
+            "LOOP vq_loop%= LC0 = %2;\n\t"
+            "LOOP_BEGIN vq_loop%=;\n\t"
+               "%0 = (A0 -= R0.L*R1.L) (IS) || R0.L = W[%1++%4] || R1.L = W[I0++];\n\t"
+            "LOOP_END vq_loop%=;\n\t"
+            "%0 = (A0 -= R0.L*R1.L) (IS);\n\t"
+         : "=D" (dist), "=a" (codebook)
+         : "a" (len-1), "a" (in), "a" (2), "1" (codebook), "0" (E[i])
+         : "R0", "R1", "I0", "L0", "A0"
+            );
+      if (i<N || dist<best_dist[N-1])
+      {
+         for (k=N-1; (k >= 1) && (k > used || dist < best_dist[k-1]); k--)
+         {
+            best_dist[k]=best_dist[k-1];
+            nbest[k] = nbest[k-1];
+         }
+         best_dist[k]=dist;
+         nbest[k]=i;
+         used++;
+      }
+   }
+   }
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq_sse.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq_sse.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/vq_sse.h	(revision 1163)
@@ -0,0 +1,120 @@
+/* Copyright (C) 2004 Jean-Marc Valin */
+/**
+   @file vq_sse.h
+   @brief SSE-optimized vq routine
+*/
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#define OVERRIDE_VQ_NBEST
+void vq_nbest(spx_word16_t *_in, const __m128 *codebook, int len, int entries, __m128 *E, int N, int *nbest, spx_word32_t *best_dist, char *stack)
+{
+   int i,j,k,used;
+   VARDECL(float *dist);
+   VARDECL(__m128 *in);
+   __m128 half;
+   used = 0;
+   ALLOC(dist, entries, float);
+   half = _mm_set_ps1(.5f);
+   ALLOC(in, len, __m128);
+   for (i=0;i<len;i++)
+      in[i] = _mm_set_ps1(_in[i]);
+   for (i=0;i<entries>>2;i++)
+   {
+      __m128 d = _mm_mul_ps(E[i], half);
+      for (j=0;j<len;j++)
+         d = _mm_sub_ps(d, _mm_mul_ps(in[j], *codebook++));
+      _mm_storeu_ps(dist+4*i, d);
+   }
+   for (i=0;i<entries;i++)
+   {
+      if (i<N || dist[i]<best_dist[N-1])
+      {
+         for (k=N-1; (k >= 1) && (k > used || dist[i] < best_dist[k-1]); k--)
+         {
+            best_dist[k]=best_dist[k-1];
+            nbest[k] = nbest[k-1];
+         }
+         best_dist[k]=dist[i];
+         nbest[k]=i;
+         used++;
+      }
+   }
+}
+
+
+
+
+#define OVERRIDE_VQ_NBEST_SIGN
+void vq_nbest_sign(spx_word16_t *_in, const __m128 *codebook, int len, int entries, __m128 *E, int N, int *nbest, spx_word32_t *best_dist, char *stack)
+{
+   int i,j,k,used;
+   VARDECL(float *dist);
+   VARDECL(__m128 *in);
+   __m128 half;
+   used = 0;
+   ALLOC(dist, entries, float);
+   half = _mm_set_ps1(.5f);
+   ALLOC(in, len, __m128);
+   for (i=0;i<len;i++)
+      in[i] = _mm_set_ps1(_in[i]);
+   for (i=0;i<entries>>2;i++)
+   {
+      __m128 d = _mm_setzero_ps();
+      for (j=0;j<len;j++)
+         d = _mm_add_ps(d, _mm_mul_ps(in[j], *codebook++));
+      _mm_storeu_ps(dist+4*i, d);
+   }
+   for (i=0;i<entries;i++)
+   {
+      int sign;
+      if (dist[i]>0)
+      {
+         sign=0;
+         dist[i]=-dist[i];
+      } else
+      {
+         sign=1;
+      }
+      dist[i] += .5f*((float*)E)[i];
+      if (i<N || dist[i]<best_dist[N-1])
+      {
+         for (k=N-1; (k >= 1) && (k > used || dist[i] < best_dist[k-1]); k--)
+         {
+            best_dist[k]=best_dist[k-1];
+            nbest[k] = nbest[k-1];
+         }
+         best_dist[k]=dist[i];
+         nbest[k]=i;
+         used++;
+         if (sign)
+            nbest[k]+=entries;
+      }
+   }
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/window.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/window.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/window.c	(revision 1163)
@@ -0,0 +1,94 @@
+/* Copyright (C) 2006 Jean-Marc Valin 
+   File: window.c
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "misc.h"
+
+#ifdef FIXED_POINT
+const spx_word16_t lpc_window[200] = {
+1310, 1313, 1321, 1333, 1352, 1375, 1403, 1436,
+1475, 1518, 1567, 1621, 1679, 1743, 1811, 1884,
+1962, 2044, 2132, 2224, 2320, 2421, 2526, 2636,
+2750, 2868, 2990, 3116, 3246, 3380, 3518, 3659,
+3804, 3952, 4104, 4259, 4417, 4578, 4742, 4909,
+5079, 5251, 5425, 5602, 5781, 5963, 6146, 6331,
+6518, 6706, 6896, 7087, 7280, 7473, 7668, 7863,
+8059, 8256, 8452, 8650, 8847, 9044, 9241, 9438,
+9635, 9831, 10026, 10220, 10414, 10606, 10797, 10987,
+11176, 11363, 11548, 11731, 11912, 12091, 12268, 12443,
+12615, 12785, 12952, 13116, 13277, 13435, 13590, 13742,
+13890, 14035, 14176, 14314, 14448, 14578, 14704, 14826,
+14944, 15058, 15168, 15273, 15374, 15470, 15562, 15649,
+15732, 15810, 15883, 15951, 16015, 16073, 16127, 16175,
+16219, 16257, 16291, 16319, 16342, 16360, 16373, 16381,
+16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
+16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
+16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
+16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
+16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
+16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
+16384, 16384, 16384, 16361, 16294, 16183, 16028, 15830,
+15588, 15304, 14979, 14613, 14207, 13763, 13282, 12766,
+12215, 11631, 11016, 10373, 9702, 9007, 8289, 7551,
+6797, 6028, 5251, 4470, 3695, 2943, 2248, 1696
+};
+#else
+const spx_word16_t lpc_window[200] = {
+   0.080000f, 0.080158f, 0.080630f, 0.081418f, 0.082520f, 0.083935f, 0.085663f, 0.087703f,
+   0.090052f, 0.092710f, 0.095674f, 0.098943f, 0.102514f, 0.106385f, 0.110553f, 0.115015f,
+   0.119769f, 0.124811f, 0.130137f, 0.135744f, 0.141628f, 0.147786f, 0.154212f, 0.160902f,
+   0.167852f, 0.175057f, 0.182513f, 0.190213f, 0.198153f, 0.206328f, 0.214731f, 0.223357f,
+   0.232200f, 0.241254f, 0.250513f, 0.259970f, 0.269619f, 0.279453f, 0.289466f, 0.299651f,
+   0.310000f, 0.320507f, 0.331164f, 0.341965f, 0.352901f, 0.363966f, 0.375151f, 0.386449f,
+   0.397852f, 0.409353f, 0.420943f, 0.432615f, 0.444361f, 0.456172f, 0.468040f, 0.479958f,
+   0.491917f, 0.503909f, 0.515925f, 0.527959f, 0.540000f, 0.552041f, 0.564075f, 0.576091f,
+   0.588083f, 0.600042f, 0.611960f, 0.623828f, 0.635639f, 0.647385f, 0.659057f, 0.670647f,
+   0.682148f, 0.693551f, 0.704849f, 0.716034f, 0.727099f, 0.738035f, 0.748836f, 0.759493f,
+   0.770000f, 0.780349f, 0.790534f, 0.800547f, 0.810381f, 0.820030f, 0.829487f, 0.838746f,
+   0.847800f, 0.856643f, 0.865269f, 0.873672f, 0.881847f, 0.889787f, 0.897487f, 0.904943f,
+   0.912148f, 0.919098f, 0.925788f, 0.932214f, 0.938372f, 0.944256f, 0.949863f, 0.955189f,
+   0.960231f, 0.964985f, 0.969447f, 0.973615f, 0.977486f, 0.981057f, 0.984326f, 0.987290f,
+   0.989948f, 0.992297f, 0.994337f, 0.996065f, 0.997480f, 0.998582f, 0.999370f, 0.999842f,
+   1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f,
+   1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f,
+   1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f,
+   1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f,
+   1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f,
+   1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f, 1.000000f,
+   1.000000f, 1.000000f, 1.000000f, 0.998640f, 0.994566f, 0.987787f, 0.978324f, 0.966203f,
+   0.951458f, 0.934131f, 0.914270f, 0.891931f, 0.867179f, 0.840084f, 0.810723f, 0.779182f,
+   0.745551f, 0.709930f, 0.672424f, 0.633148f, 0.592223f, 0.549781f, 0.505964f, 0.460932f,
+   0.414863f, 0.367968f, 0.320511f, 0.272858f, 0.225569f, 0.179655f, 0.137254f, 0.103524f
+};
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-_kiss_fft_guts.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-_kiss_fft_guts.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-_kiss_fft_guts.h	(revision 1163)
@@ -0,0 +1,147 @@
+/*
+Copyright (c) 2003-2004, Mark Borgerding
+
+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 author nor the names of any 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 OWNER 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.
+*/
+
+#define MIN(a,b) ((a)<(b) ? (a):(b))
+#define MAX(a,b) ((a)>(b) ? (a):(b))
+
+/* kiss_fft.h
+   defines kiss_fft_scalar as either short or a float type
+   and defines
+   typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; */
+#include "kiss_fft.h"
+#include <limits.h>
+
+#define MAXFACTORS 32
+/* e.g. an fft of length 128 has 4 factors 
+ as far as kissfft is concerned
+ 4*4*4*2
+ */
+
+struct kiss_fft_state{
+    int nfft;
+    int inverse;
+    int factors[2*MAXFACTORS];
+    kiss_fft_cpx twiddles[1];
+};
+
+/*
+  Explanation of macros dealing with complex math:
+
+   C_MUL(m,a,b)         : m = a*b
+   C_FIXDIV( c , div )  : if a fixed point impl., c /= div. noop otherwise
+   C_SUB( res, a,b)     : res = a - b
+   C_SUBFROM( res , a)  : res -= a
+   C_ADDTO( res , a)    : res += a
+ * */
+#ifdef FIXED_POINT
+# define FRACBITS 15
+# define SAMPPROD int32_t 
+#define SAMP_MAX 32767
+
+#define SAMP_MIN -SAMP_MAX
+
+#if defined(CHECK_OVERFLOW)
+#  define CHECK_OVERFLOW_OP(a,op,b)  \
+	if ( (SAMPPROD)(a) op (SAMPPROD)(b) > SAMP_MAX || (SAMPPROD)(a) op (SAMPPROD)(b) < SAMP_MIN ) { \
+		fprintf(stderr,"WARNING:overflow @ " __FILE__ "(%d): (%d " #op" %d) = %ld\n",__LINE__,(a),(b),(SAMPPROD)(a) op (SAMPPROD)(b) );  }
+#endif
+
+
+#   define smul(a,b) ( (SAMPPROD)(a)*(b) )
+#   define sround( x )  (kiss_fft_scalar)( ( (x) + (1<<(FRACBITS-1)) ) >> FRACBITS )
+
+#   define S_MUL(a,b) sround( smul(a,b) )
+
+#   define C_MUL(m,a,b) \
+      do{ (m).r = sround( smul((a).r,(b).r) - smul((a).i,(b).i) ); \
+          (m).i = sround( smul((a).r,(b).i) + smul((a).i,(b).r) ); }while(0)
+
+#   define DIVSCALAR(x,k) \
+	(x) = sround( smul(  x, SAMP_MAX/k ) )
+
+#   define C_FIXDIV(c,div) \
+	do {    DIVSCALAR( (c).r , div);  \
+		DIVSCALAR( (c).i  , div); }while (0)
+
+#   define C_MULBYSCALAR( c, s ) \
+    do{ (c).r =  sround( smul( (c).r , s ) ) ;\
+        (c).i =  sround( smul( (c).i , s ) ) ; }while(0)
+
+#else  /* not FIXED_POINT*/
+
+#   define S_MUL(a,b) ( (a)*(b) )
+#define C_MUL(m,a,b) \
+    do{ (m).r = (a).r*(b).r - (a).i*(b).i;\
+        (m).i = (a).r*(b).i + (a).i*(b).r; }while(0)
+#   define C_FIXDIV(c,div) /* NOOP */
+#   define C_MULBYSCALAR( c, s ) \
+    do{ (c).r *= (s);\
+        (c).i *= (s); }while(0)
+#endif
+
+#ifndef CHECK_OVERFLOW_OP
+#  define CHECK_OVERFLOW_OP(a,op,b) /* noop */
+#endif
+
+#define  C_ADD( res, a,b)\
+    do { \
+	    CHECK_OVERFLOW_OP((a).r,+,(b).r)\
+	    CHECK_OVERFLOW_OP((a).i,+,(b).i)\
+	    (res).r=(a).r+(b).r;  (res).i=(a).i+(b).i; \
+    }while(0)
+#define  C_SUB( res, a,b)\
+    do { \
+	    CHECK_OVERFLOW_OP((a).r,-,(b).r)\
+	    CHECK_OVERFLOW_OP((a).i,-,(b).i)\
+	    (res).r=(a).r-(b).r;  (res).i=(a).i-(b).i; \
+    }while(0)
+#define C_ADDTO( res , a)\
+    do { \
+	    CHECK_OVERFLOW_OP((res).r,+,(a).r)\
+	    CHECK_OVERFLOW_OP((res).i,+,(a).i)\
+	    (res).r += (a).r;  (res).i += (a).i;\
+    }while(0)
+
+#define C_SUBFROM( res , a)\
+    do {\
+	    CHECK_OVERFLOW_OP((res).r,-,(a).r)\
+	    CHECK_OVERFLOW_OP((res).i,-,(a).i)\
+	    (res).r -= (a).r;  (res).i -= (a).i; \
+    }while(0)
+
+
+#ifdef FIXED_POINT
+#  define KISS_FFT_COS(phase)  floor(MIN(32767,MAX(-32767,.5+32768 * cos (phase))))
+#  define KISS_FFT_SIN(phase)  floor(MIN(32767,MAX(-32767,.5+32768 * sin (phase))))
+#  define HALF_OF(x) ((x)>>1)
+#elif defined(USE_SIMD)
+#  define KISS_FFT_COS(phase) _mm_set1_ps( cos(phase) )
+#  define KISS_FFT_SIN(phase) _mm_set1_ps( sin(phase) )
+#  define HALF_OF(x) ((x)*_mm_set1_ps(.5))
+#else
+#  define KISS_FFT_COS(phase) (kiss_fft_scalar) cos(phase)
+#  define KISS_FFT_SIN(phase) (kiss_fft_scalar) sin(phase)
+#  define HALF_OF(x) ((x)*.5)
+#endif
+
+#define  kf_cexp(x,phase) \
+	do{ \
+		(x)->r = KISS_FFT_COS(phase);\
+		(x)->i = KISS_FFT_SIN(phase);\
+	}while(0)
+
+
+/* a debugging function */
+#define pcpx(c)\
+    fprintf(stderr,"%g + %gi\n",(double)((c)->r),(double)((c)->i) )
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-fftwrap.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-fftwrap.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-fftwrap.c	(revision 1163)
@@ -0,0 +1,301 @@
+/* Copyright (C) 2005 Jean-Marc Valin 
+   File: fftwrap.c
+
+   Wrapper for various FFTs 
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/*#define USE_SMALLFT*/
+#define USE_KISS_FFT
+
+
+#include "misc.h"
+
+
+#ifdef FIXED_POINT
+static int maximize_range(spx_word16_t *in, spx_word16_t *out, spx_word16_t bound, int len)
+{
+   int i, shift;
+   spx_word16_t max_val = 0;
+   for (i=0;i<len;i++)
+   {
+      if (in[i]>max_val)
+         max_val = in[i];
+      if (-in[i]>max_val)
+         max_val = -in[i];
+   }
+   shift=0;
+   while (max_val <= (bound>>1) && max_val != 0)
+   {
+      max_val <<= 1;
+      shift++;
+   }
+   for (i=0;i<len;i++)
+   {
+      out[i] = in[i] << shift;
+   }   
+   return shift;
+}
+
+static void renorm_range(spx_word16_t *in, spx_word16_t *out, int shift, int len)
+{
+   int i;
+   for (i=0;i<len;i++)
+   {
+      out[i] = (in[i] + (1<<(shift-1))) >> shift;
+   }
+}
+#endif
+
+#ifdef USE_SMALLFT
+
+#include "smallft.h"
+#include <math.h>
+
+void *spx_fft_init(int size)
+{
+   struct drft_lookup *table;
+   table = speex_alloc(sizeof(struct drft_lookup));
+   spx_drft_init((struct drft_lookup *)table, size);
+   return (void*)table;
+}
+
+void spx_fft_destroy(void *table)
+{
+   spx_drft_clear(table);
+   speex_free(table);
+}
+
+void spx_fft(void *table, float *in, float *out)
+{
+   if (in==out)
+   {
+      int i;
+      speex_warning("FFT should not be done in-place");
+      float scale = 1./((struct drft_lookup *)table)->n;
+      for (i=0;i<((struct drft_lookup *)table)->n;i++)
+         out[i] = scale*in[i];
+   } else {
+      int i;
+      float scale = 1./((struct drft_lookup *)table)->n;
+      for (i=0;i<((struct drft_lookup *)table)->n;i++)
+         out[i] = scale*in[i];
+   }
+   spx_drft_forward((struct drft_lookup *)table, out);
+}
+
+void spx_ifft(void *table, float *in, float *out)
+{
+   if (in==out)
+   {
+      int i;
+      speex_warning("FFT should not be done in-place");
+   } else {
+      int i;
+      for (i=0;i<((struct drft_lookup *)table)->n;i++)
+         out[i] = in[i];
+   }
+   spx_drft_backward((struct drft_lookup *)table, out);
+}
+
+#elif defined(USE_KISS_FFT)
+
+#include "kiss_fftr.h"
+#include "kiss_fft.h"
+
+struct kiss_config {
+   kiss_fftr_cfg forward;
+   kiss_fftr_cfg backward;
+   kiss_fft_cpx *freq_data;
+   int N;
+};
+
+void *spx_fft_init(int size)
+{
+   struct kiss_config *table;
+   table = speex_alloc(sizeof(struct kiss_config));
+   table->freq_data = speex_alloc(sizeof(kiss_fft_cpx)*((size>>1)+1));
+   table->forward = kiss_fftr_alloc(size,0,NULL,NULL);
+   table->backward = kiss_fftr_alloc(size,1,NULL,NULL);
+   table->N = size;
+   return table;
+}
+
+void spx_fft_destroy(void *table)
+{
+   struct kiss_config *t = (struct kiss_config *)table;
+   kiss_fftr_free(t->forward);
+   kiss_fftr_free(t->backward);
+   speex_free(t->freq_data);
+   speex_free(table);
+}
+
+#ifdef FIXED_POINT
+
+void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
+{
+   int i;
+   int shift;
+   struct kiss_config *t = (struct kiss_config *)table;
+   shift = maximize_range(in, in, 32000, t->N);
+   kiss_fftr(t->forward, in, t->freq_data);
+   out[0] = t->freq_data[0].r;
+   for (i=1;i<t->N>>1;i++)
+   {
+      out[(i<<1)-1] = t->freq_data[i].r;
+      out[(i<<1)] = t->freq_data[i].i;
+   }
+   out[(i<<1)-1] = t->freq_data[i].r;
+   renorm_range(in, in, shift, t->N);
+   renorm_range(out, out, shift, t->N);
+}
+
+#else
+
+void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out)
+{
+   int i;
+   float scale;
+   struct kiss_config *t = (struct kiss_config *)table;
+   scale = 1./t->N;
+   kiss_fftr(t->forward, in, t->freq_data);
+   out[0] = scale*t->freq_data[0].r;
+   for (i=1;i<t->N>>1;i++)
+   {
+      out[(i<<1)-1] = scale*t->freq_data[i].r;
+      out[(i<<1)] = scale*t->freq_data[i].i;
+   }
+   out[(i<<1)-1] = scale*t->freq_data[i].r;
+}
+#endif
+
+void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out)
+{
+   int i;
+   struct kiss_config *t = (struct kiss_config *)table;
+   t->freq_data[0].r = in[0];
+   t->freq_data[0].i = 0;
+   for (i=1;i<t->N>>1;i++)
+   {
+      t->freq_data[i].r = in[(i<<1)-1];
+      t->freq_data[i].i = in[(i<<1)];
+   }
+   t->freq_data[i].r = in[(i<<1)-1];
+   t->freq_data[i].i = 0;
+
+   kiss_fftri(t->backward, t->freq_data, out);
+}
+
+
+#else
+
+#error No other FFT implemented
+
+#endif
+
+
+int fixed_point = 1;
+#ifdef FIXED_POINT
+#include "smallft.h"
+
+
+void spx_fft_float(void *table, float *in, float *out)
+{
+   int i;
+#ifdef USE_SMALLFT
+   int N = ((struct drft_lookup *)table)->n;
+#elif defined(USE_KISS_FFT)
+   int N = ((struct kiss_config *)table)->N;
+#else
+#endif
+   spx_word16_t _in[N];
+   spx_word16_t _out[N];
+   for (i=0;i<N;i++)
+      _in[i] = (int)floor(.5+in[i]);
+   spx_fft(table, _in, _out);
+   for (i=0;i<N;i++)
+      out[i] = _out[i];
+   if (!fixed_point)
+   {
+      float scale;
+      struct drft_lookup t;
+      spx_drft_init(&t, ((struct kiss_config *)table)->N);
+      scale = 1./((struct kiss_config *)table)->N;
+      for (i=0;i<((struct kiss_config *)table)->N;i++)
+         out[i] = scale*in[i];
+      spx_drft_forward(&t, out);
+      spx_drft_clear(&t);
+   }
+}
+
+void spx_ifft_float(void *table, float *in, float *out)
+{
+   int i;
+#ifdef USE_SMALLFT
+   int N = ((struct drft_lookup *)table)->n;
+#elif defined(USE_KISS_FFT)
+   int N = ((struct kiss_config *)table)->N;
+#else
+#endif
+   spx_word16_t _in[N];
+   spx_word16_t _out[N];
+   for (i=0;i<N;i++)
+      _in[i] = (int)floor(.5+in[i]);
+   spx_ifft(table, _in, _out);
+   for (i=0;i<N;i++)
+      out[i] = _out[i];
+   if (!fixed_point)
+   {
+      int i;
+      struct drft_lookup t;
+      spx_drft_init(&t, ((struct kiss_config *)table)->N);
+      for (i=0;i<((struct kiss_config *)table)->N;i++)
+         out[i] = in[i];
+      spx_drft_backward(&t, out);
+      spx_drft_clear(&t);
+   }
+}
+
+#else
+
+void spx_fft_float(void *table, float *in, float *out)
+{
+   spx_fft(table, in, out);
+}
+void spx_ifft_float(void *table, float *in, float *out)
+{
+   spx_ifft(table, in, out);
+}
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-fftwrap.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-fftwrap.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-fftwrap.h	(revision 1163)
@@ -0,0 +1,58 @@
+/* Copyright (C) 2005 Jean-Marc Valin 
+   File: fftwrap.h
+
+   Wrapper for various FFTs 
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifndef FFTWRAP_H
+#define FFTWRAP_H
+
+#include "misc.h"
+
+/** Compute tables for an FFT */
+void *spx_fft_init(int size);
+
+/** Destroy tables for an FFT */
+void spx_fft_destroy(void *table);
+
+/** Forward (real to half-complex) transform */
+void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out);
+
+/** Backward (half-complex to real) transform */
+void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out);
+
+/** Forward (real to half-complex) transform of float data */
+void spx_fft_float(void *table, float *in, float *out);
+
+/** Backward (half-complex to real) transform of float data */
+void spx_ifft_float(void *table, float *in, float *out);
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-jitter.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-jitter.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-jitter.c	(revision 1163)
@@ -0,0 +1,316 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: speex_jitter.h
+
+   Adaptive jitter buffer for Speex
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+#include "misc.h"
+#include <speex/speex.h>
+#include <speex/speex_bits.h>
+#include <speex/speex_jitter.h>
+#include <stdio.h>
+
+#define LATE_BINS 4
+
+void speex_jitter_init(SpeexJitter *jitter, void *decoder, int sampling_rate)
+{
+   int i;
+   for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
+   {
+      jitter->len[i]=-1;
+      jitter->timestamp[i]=-1;
+   }
+
+   jitter->dec = decoder;
+   speex_decoder_ctl(decoder, SPEEX_GET_FRAME_SIZE, &jitter->frame_size);
+   jitter->frame_time = jitter->frame_size;
+
+   speex_bits_init(&jitter->current_packet);
+   jitter->valid_bits = 0;
+
+   jitter->buffer_size = 4;
+
+   jitter->pointer_timestamp = -jitter->frame_time * jitter->buffer_size;
+   jitter->reset_state = 1;
+   jitter->lost_count = 0;
+   jitter->loss_rate = 0;
+}
+
+void speex_jitter_destroy(SpeexJitter *jitter)
+{
+   speex_bits_destroy(&jitter->current_packet);
+}
+
+
+void speex_jitter_put(SpeexJitter *jitter, char *packet, int len, int timestamp)
+{
+   int i,j;
+   int arrival_margin;
+
+   if (jitter->reset_state)
+   {
+      jitter->reset_state=0;
+      jitter->pointer_timestamp = timestamp-jitter->frame_time * jitter->buffer_size;
+      for (i=0;i<MAX_MARGIN;i++)
+      {
+         jitter->shortterm_margin[i] = 0;
+         jitter->longterm_margin[i] = 0;
+      }
+      for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
+      {
+         jitter->len[i]=-1;
+         jitter->timestamp[i]=-1;
+      }
+      fprintf(stderr, "reset to %d\n", timestamp);
+   }
+   
+   /* Cleanup buffer (remove old packets that weren't played) */
+   for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
+   {
+      if (jitter->timestamp[i]<jitter->pointer_timestamp)
+      {
+         jitter->len[i]=-1;
+         /*if (jitter->timestamp[i] != -1)
+            fprintf (stderr, "discarding %d %d\n", jitter->timestamp[i], jitter->pointer_timestamp);*/
+      }
+   }
+
+   /*Find an empty slot in the buffer*/
+   for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
+   {
+      if (jitter->len[i]==-1)
+         break;
+   }
+
+   /*fprintf(stderr, "%d %d %f\n", timestamp, jitter->pointer_timestamp, jitter->drift_average);*/
+   if (i==SPEEX_JITTER_MAX_BUFFER_SIZE)
+   {
+      int earliest=jitter->timestamp[0];
+      i=0;
+      for (j=1;j<SPEEX_JITTER_MAX_BUFFER_SIZE;j++)
+      {
+         if (jitter->timestamp[j]<earliest)
+         {
+            earliest = jitter->timestamp[j];
+            i=j;
+         }
+      }
+      /*fprintf (stderr, "Buffer is full, discarding earliest frame %d (currently at %d)\n", timestamp, jitter->pointer_timestamp);*/
+      /*No place left in the buffer*/
+      
+      /*skip some frame(s) */
+      /*return;*/
+   }
+   
+   /* Copy packet in buffer */
+   if (len>SPEEX_JITTER_MAX_PACKET_SIZE)
+      len=SPEEX_JITTER_MAX_PACKET_SIZE;
+   for (j=0;j<len/BYTES_PER_CHAR;j++)
+      jitter->buf[i][j]=packet[j];
+   jitter->timestamp[i]=timestamp;
+   jitter->len[i]=len;
+   
+   /* Don't count late packets when adjusting the synchro (we're taking care of them elsewhere) */
+   /*if (timestamp <= jitter->pointer_timestamp)
+   {
+      fprintf (stderr, "frame for timestamp %d arrived too late (at time %d)\n", timestamp, jitter->pointer_timestamp);
+   }*/
+
+   /* Adjust the buffer size depending on network conditions */
+   arrival_margin = (timestamp - jitter->pointer_timestamp - jitter->frame_time);
+   
+   if (arrival_margin >= -LATE_BINS*jitter->frame_time)
+   {
+      int int_margin;
+      for (i=0;i<MAX_MARGIN;i++)
+      {
+         jitter->shortterm_margin[i] *= .98;
+         jitter->longterm_margin[i] *= .995;
+      }
+      int_margin = (arrival_margin + LATE_BINS*jitter->frame_time)/jitter->frame_time;
+      if (int_margin>MAX_MARGIN-1)
+         int_margin = MAX_MARGIN-1;
+      if (int_margin>=0)
+      {
+         jitter->shortterm_margin[int_margin] += .02;
+         jitter->longterm_margin[int_margin] += .005;
+      }
+   }
+   
+   /*fprintf (stderr, "margin : %d %d %f %f %f %f\n", arrival_margin, jitter->buffer_size, 100*jitter->loss_rate, 100*jitter->late_ratio, 100*jitter->ontime_ratio, 100*jitter->early_ratio);*/
+}
+
+void speex_jitter_get(SpeexJitter *jitter, short *out, int *current_timestamp)
+{
+   int i;
+   int ret;
+   float late_ratio_short;
+   float late_ratio_long;
+   float ontime_ratio_short;
+   float ontime_ratio_long;
+   float early_ratio_short;
+   float early_ratio_long;
+   
+   late_ratio_short = 0;
+   late_ratio_long = 0;
+   for (i=0;i<LATE_BINS;i++)
+   {
+      late_ratio_short += jitter->shortterm_margin[i];
+      late_ratio_long += jitter->longterm_margin[i];
+   }
+   ontime_ratio_short = jitter->shortterm_margin[LATE_BINS];
+   ontime_ratio_long = jitter->longterm_margin[LATE_BINS];
+   early_ratio_short = early_ratio_long = 0;
+   for (i=LATE_BINS+1;i<MAX_MARGIN;i++)
+   {
+      early_ratio_short += jitter->shortterm_margin[i];
+      early_ratio_long += jitter->longterm_margin[i];
+   }
+   if (0&&jitter->pointer_timestamp%1000==0)
+   {
+      fprintf (stderr, "%f %f %f %f %f %f\n", early_ratio_short, early_ratio_long, ontime_ratio_short, ontime_ratio_long, late_ratio_short, late_ratio_long);
+      /*fprintf (stderr, "%f %f\n", early_ratio_short + ontime_ratio_short + late_ratio_short, early_ratio_long + ontime_ratio_long + late_ratio_long);*/
+   }
+   
+   if (late_ratio_short > .1 || late_ratio_long > .03)
+   {
+      jitter->shortterm_margin[MAX_MARGIN-1] += jitter->shortterm_margin[MAX_MARGIN-2];
+      jitter->longterm_margin[MAX_MARGIN-1] += jitter->longterm_margin[MAX_MARGIN-2];
+      for (i=MAX_MARGIN-3;i>=0;i--)
+      {
+         jitter->shortterm_margin[i+1] = jitter->shortterm_margin[i];
+         jitter->longterm_margin[i+1] = jitter->longterm_margin[i];         
+      }
+      jitter->shortterm_margin[0] = 0;
+      jitter->longterm_margin[0] = 0;            
+      /*fprintf (stderr, "interpolate frame\n");*/
+      speex_decode_int(jitter->dec, NULL, out);
+      if (current_timestamp)
+         *current_timestamp = jitter->pointer_timestamp;
+      return;
+   }
+   
+   /* Increment timestamp */
+   jitter->pointer_timestamp += jitter->frame_time;
+   
+   if (late_ratio_short + ontime_ratio_short < .005 && late_ratio_long + ontime_ratio_long < .01 && early_ratio_short > .8)
+   {
+      jitter->shortterm_margin[0] += jitter->shortterm_margin[1];
+      jitter->longterm_margin[0] += jitter->longterm_margin[1];
+      for (i=1;i<MAX_MARGIN-1;i++)
+      {
+         jitter->shortterm_margin[i] = jitter->shortterm_margin[i+1];
+         jitter->longterm_margin[i] = jitter->longterm_margin[i+1];         
+      }
+      jitter->shortterm_margin[MAX_MARGIN-1] = 0;
+      jitter->longterm_margin[MAX_MARGIN-1] = 0;      
+      /*fprintf (stderr, "drop frame\n");*/
+      jitter->pointer_timestamp += jitter->frame_time;
+   }
+
+   if (current_timestamp)
+      *current_timestamp = jitter->pointer_timestamp;
+
+   /* Send zeros while we fill in the buffer */
+   if (jitter->pointer_timestamp<0)
+   {
+      for (i=0;i<jitter->frame_size;i++)
+         out[i]=0;
+      return;
+   }
+   
+   /* Search the buffer for a packet with the right timestamp */
+   for (i=0;i<SPEEX_JITTER_MAX_BUFFER_SIZE;i++)
+   {
+      if (jitter->len[i]!=-1 && jitter->timestamp[i]==jitter->pointer_timestamp)
+         break;
+   }
+   
+   if (i==SPEEX_JITTER_MAX_BUFFER_SIZE)
+   {
+      /* No packet found */
+      if (jitter->valid_bits)
+      {
+         /* Try decoding last received packet */
+         ret = speex_decode_int(jitter->dec, &jitter->current_packet, out);
+         if (ret == 0)
+         {
+            jitter->lost_count = 0;
+            return;
+         } else {
+            jitter->valid_bits = 0;
+         }
+      }
+
+      /*fprintf (stderr, "lost/late frame %d\n", jitter->pointer_timestamp);*/
+      /*Packet is late or lost*/
+      speex_decode_int(jitter->dec, NULL, out);
+      jitter->lost_count++;
+      if (jitter->lost_count>=25)
+      {
+         jitter->lost_count = 0;
+         jitter->reset_state = 1;
+         speex_decoder_ctl(jitter->dec, SPEEX_RESET_STATE, NULL);
+      }
+      jitter->loss_rate = .999*jitter->loss_rate + .001;
+   } else {
+      jitter->lost_count = 0;
+      /* Found the right packet */
+      speex_bits_read_from(&jitter->current_packet, jitter->buf[i], jitter->len[i]);
+      jitter->len[i]=-1;
+      /* Decode packet */
+      ret = speex_decode_int(jitter->dec, &jitter->current_packet, out);
+      if (ret == 0)
+      {
+         jitter->valid_bits = 1;
+      } else {
+         /* Error while decoding */
+         for (i=0;i<jitter->frame_size;i++)
+            out[i]=0;
+      }
+      jitter->loss_rate = .999*jitter->loss_rate;
+   }
+
+
+}
+
+int speex_jitter_get_pointer_timestamp(SpeexJitter *jitter)
+{
+   return jitter->pointer_timestamp;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-kiss_fft.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-kiss_fft.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-kiss_fft.c	(revision 1163)
@@ -0,0 +1,430 @@
+/*
+Copyright (c) 2003-2004, Mark Borgerding
+
+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 author nor the names of any 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 OWNER 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.
+*/
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "_kiss_fft_guts.h"
+#include "misc.h"
+
+/* The guts header contains all the multiplication and addition macros that are defined for
+ fixed or floating point complex numbers.  It also delares the kf_ internal functions.
+ */
+
+static kiss_fft_cpx *scratchbuf=NULL;
+static size_t nscratchbuf=0;
+static kiss_fft_cpx *tmpbuf=NULL;
+static size_t ntmpbuf=0;
+
+#define CHECKBUF(buf,nbuf,n) \
+    do { \
+        if ( nbuf < (size_t)(n) ) {\
+            free(buf); \
+            buf = (kiss_fft_cpx*)KISS_FFT_MALLOC(sizeof(kiss_fft_cpx)*(n)); \
+            nbuf = (size_t)(n); \
+        } \
+   }while(0)
+        
+static void kf_bfly2(
+        kiss_fft_cpx * Fout,
+        const size_t fstride,
+        const kiss_fft_cfg st,
+        int m
+        )
+{
+    kiss_fft_cpx * Fout2;
+    kiss_fft_cpx * tw1 = st->twiddles;
+    kiss_fft_cpx t;
+    Fout2 = Fout + m;
+    if (!st->inverse) {
+       int i;
+       kiss_fft_cpx *x=Fout;
+       for (i=0;i<2*m;i++)
+       {
+          x[i].r = SHR(x[i].r,1);
+          x[i].i = SHR(x[i].i,1);
+       }
+    }
+
+    do{
+        C_MUL (t,  *Fout2 , *tw1);
+        tw1 += fstride;
+        C_SUB( *Fout2 ,  *Fout , t );
+        C_ADDTO( *Fout ,  t );
+        ++Fout2;
+        ++Fout;
+    }while (--m);
+}
+
+static void kf_bfly4(
+        kiss_fft_cpx * Fout,
+        const size_t fstride,
+        const kiss_fft_cfg st,
+        const size_t m
+        )
+{
+    kiss_fft_cpx *tw1,*tw2,*tw3;
+    kiss_fft_cpx scratch[6];
+    size_t k=m;
+    const size_t m2=2*m;
+    const size_t m3=3*m;
+
+    tw3 = tw2 = tw1 = st->twiddles;
+
+    if (!st->inverse) {
+       int i;
+       kiss_fft_cpx *x=Fout;
+       for (i=0;i<4*m;i++)
+       {
+          x[i].r = PSHR16(x[i].r,2);
+          x[i].i = PSHR16(x[i].i,2);
+       }
+    }
+    if (st->inverse)
+    {
+       do {
+          C_MUL(scratch[0],Fout[m] , *tw1 );
+          C_MUL(scratch[1],Fout[m2] , *tw2 );
+          C_MUL(scratch[2],Fout[m3] , *tw3 );
+          
+          C_SUB( scratch[5] , *Fout, scratch[1] );
+          C_ADDTO(*Fout, scratch[1]);
+          C_ADD( scratch[3] , scratch[0] , scratch[2] );
+          C_SUB( scratch[4] , scratch[0] , scratch[2] );
+          C_SUB( Fout[m2], *Fout, scratch[3] );
+          tw1 += fstride;
+          tw2 += fstride*2;
+          tw3 += fstride*3;
+          C_ADDTO( *Fout , scratch[3] );
+
+          Fout[m].r = scratch[5].r - scratch[4].i;
+          Fout[m].i = scratch[5].i + scratch[4].r;
+          Fout[m3].r = scratch[5].r + scratch[4].i;
+          Fout[m3].i = scratch[5].i - scratch[4].r;
+          ++Fout;
+       } while(--k);
+    } else
+    {
+       do {
+          C_MUL(scratch[0],Fout[m] , *tw1 );
+          C_MUL(scratch[1],Fout[m2] , *tw2 );
+          C_MUL(scratch[2],Fout[m3] , *tw3 );
+          
+          C_SUB( scratch[5] , *Fout, scratch[1] );
+          C_ADDTO(*Fout, scratch[1]);
+          C_ADD( scratch[3] , scratch[0] , scratch[2] );
+          C_SUB( scratch[4] , scratch[0] , scratch[2] );
+          C_SUB( Fout[m2], *Fout, scratch[3] );
+          tw1 += fstride;
+          tw2 += fstride*2;
+          tw3 += fstride*3;
+          C_ADDTO( *Fout , scratch[3] );
+          
+          Fout[m].r = scratch[5].r + scratch[4].i;
+          Fout[m].i = scratch[5].i - scratch[4].r;
+          Fout[m3].r = scratch[5].r - scratch[4].i;
+          Fout[m3].i = scratch[5].i + scratch[4].r;
+          ++Fout;
+       }while(--k);
+    }
+}
+
+static void kf_bfly3(
+         kiss_fft_cpx * Fout,
+         const size_t fstride,
+         const kiss_fft_cfg st,
+         size_t m
+         )
+{
+     size_t k=m;
+     const size_t m2 = 2*m;
+     kiss_fft_cpx *tw1,*tw2;
+     kiss_fft_cpx scratch[5];
+     kiss_fft_cpx epi3;
+     epi3 = st->twiddles[fstride*m];
+
+     tw1=tw2=st->twiddles;
+
+     do{
+        if (!st->inverse) {
+         C_FIXDIV(*Fout,3); C_FIXDIV(Fout[m],3); C_FIXDIV(Fout[m2],3);
+	}
+
+         C_MUL(scratch[1],Fout[m] , *tw1);
+         C_MUL(scratch[2],Fout[m2] , *tw2);
+
+         C_ADD(scratch[3],scratch[1],scratch[2]);
+         C_SUB(scratch[0],scratch[1],scratch[2]);
+         tw1 += fstride;
+         tw2 += fstride*2;
+
+         Fout[m].r = Fout->r - HALF_OF(scratch[3].r);
+         Fout[m].i = Fout->i - HALF_OF(scratch[3].i);
+
+         C_MULBYSCALAR( scratch[0] , epi3.i );
+
+         C_ADDTO(*Fout,scratch[3]);
+
+         Fout[m2].r = Fout[m].r + scratch[0].i;
+         Fout[m2].i = Fout[m].i - scratch[0].r;
+
+         Fout[m].r -= scratch[0].i;
+         Fout[m].i += scratch[0].r;
+
+         ++Fout;
+     }while(--k);
+}
+
+static void kf_bfly5(
+        kiss_fft_cpx * Fout,
+        const size_t fstride,
+        const kiss_fft_cfg st,
+        int m
+        )
+{
+    kiss_fft_cpx *Fout0,*Fout1,*Fout2,*Fout3,*Fout4;
+    int u;
+    kiss_fft_cpx scratch[13];
+    kiss_fft_cpx * twiddles = st->twiddles;
+    kiss_fft_cpx *tw;
+    kiss_fft_cpx ya,yb;
+    ya = twiddles[fstride*m];
+    yb = twiddles[fstride*2*m];
+
+    Fout0=Fout;
+    Fout1=Fout0+m;
+    Fout2=Fout0+2*m;
+    Fout3=Fout0+3*m;
+    Fout4=Fout0+4*m;
+
+    tw=st->twiddles;
+    for ( u=0; u<m; ++u ) {
+        if (!st->inverse) {
+        C_FIXDIV( *Fout0,5); C_FIXDIV( *Fout1,5); C_FIXDIV( *Fout2,5); C_FIXDIV( *Fout3,5); C_FIXDIV( *Fout4,5);
+	}
+        scratch[0] = *Fout0;
+
+        C_MUL(scratch[1] ,*Fout1, tw[u*fstride]);
+        C_MUL(scratch[2] ,*Fout2, tw[2*u*fstride]);
+        C_MUL(scratch[3] ,*Fout3, tw[3*u*fstride]);
+        C_MUL(scratch[4] ,*Fout4, tw[4*u*fstride]);
+
+        C_ADD( scratch[7],scratch[1],scratch[4]);
+        C_SUB( scratch[10],scratch[1],scratch[4]);
+        C_ADD( scratch[8],scratch[2],scratch[3]);
+        C_SUB( scratch[9],scratch[2],scratch[3]);
+
+        Fout0->r += scratch[7].r + scratch[8].r;
+        Fout0->i += scratch[7].i + scratch[8].i;
+
+        scratch[5].r = scratch[0].r + S_MUL(scratch[7].r,ya.r) + S_MUL(scratch[8].r,yb.r);
+        scratch[5].i = scratch[0].i + S_MUL(scratch[7].i,ya.r) + S_MUL(scratch[8].i,yb.r);
+
+        scratch[6].r =  S_MUL(scratch[10].i,ya.i) + S_MUL(scratch[9].i,yb.i);
+        scratch[6].i = -S_MUL(scratch[10].r,ya.i) - S_MUL(scratch[9].r,yb.i);
+
+        C_SUB(*Fout1,scratch[5],scratch[6]);
+        C_ADD(*Fout4,scratch[5],scratch[6]);
+
+        scratch[11].r = scratch[0].r + S_MUL(scratch[7].r,yb.r) + S_MUL(scratch[8].r,ya.r);
+        scratch[11].i = scratch[0].i + S_MUL(scratch[7].i,yb.r) + S_MUL(scratch[8].i,ya.r);
+        scratch[12].r = - S_MUL(scratch[10].i,yb.i) + S_MUL(scratch[9].i,ya.i);
+        scratch[12].i = S_MUL(scratch[10].r,yb.i) - S_MUL(scratch[9].r,ya.i);
+
+        C_ADD(*Fout2,scratch[11],scratch[12]);
+        C_SUB(*Fout3,scratch[11],scratch[12]);
+
+        ++Fout0;++Fout1;++Fout2;++Fout3;++Fout4;
+    }
+}
+
+/* perform the butterfly for one stage of a mixed radix FFT */
+static void kf_bfly_generic(
+        kiss_fft_cpx * Fout,
+        const size_t fstride,
+        const kiss_fft_cfg st,
+        int m,
+        int p
+        )
+{
+    int u,k,q1,q;
+    kiss_fft_cpx * twiddles = st->twiddles;
+    kiss_fft_cpx t;
+    int Norig = st->nfft;
+
+    CHECKBUF(scratchbuf,nscratchbuf,p);
+
+    for ( u=0; u<m; ++u ) {
+        k=u;
+        for ( q1=0 ; q1<p ; ++q1 ) {
+            scratchbuf[q1] = Fout[ k  ];
+        if (!st->inverse) {
+            C_FIXDIV(scratchbuf[q1],p);
+	}
+            k += m;
+        }
+
+        k=u;
+        for ( q1=0 ; q1<p ; ++q1 ) {
+            int twidx=0;
+            Fout[ k ] = scratchbuf[0];
+            for (q=1;q<p;++q ) {
+                twidx += fstride * k;
+                if (twidx>=Norig) twidx-=Norig;
+                C_MUL(t,scratchbuf[q] , twiddles[twidx] );
+                C_ADDTO( Fout[ k ] ,t);
+            }
+            k += m;
+        }
+    }
+}
+
+static
+void kf_work(
+        kiss_fft_cpx * Fout,
+        const kiss_fft_cpx * f,
+        const size_t fstride,
+        int in_stride,
+        int * factors,
+        const kiss_fft_cfg st
+        )
+{
+    kiss_fft_cpx * Fout_beg=Fout;
+    const int p=*factors++; /* the radix  */
+    const int m=*factors++; /* stage's fft length/p */
+    const kiss_fft_cpx * Fout_end = Fout + p*m;
+
+    if (m==1) {
+        do{
+            *Fout = *f;
+            f += fstride*in_stride;
+        }while(++Fout != Fout_end );
+    }else{
+        do{
+            kf_work( Fout , f, fstride*p, in_stride, factors,st);
+            f += fstride*in_stride;
+        }while( (Fout += m) != Fout_end );
+    }
+
+    Fout=Fout_beg;
+
+    switch (p) {
+        case 2: kf_bfly2(Fout,fstride,st,m); break;
+        case 3: kf_bfly3(Fout,fstride,st,m); break; 
+        case 4: kf_bfly4(Fout,fstride,st,m); break;
+        case 5: kf_bfly5(Fout,fstride,st,m); break; 
+        default: kf_bfly_generic(Fout,fstride,st,m,p); break;
+    }
+}
+
+/*  facbuf is populated by p1,m1,p2,m2, ...
+    where 
+    p[i] * m[i] = m[i-1]
+    m0 = n                  */
+static 
+void kf_factor(int n,int * facbuf)
+{
+    int p=4;
+    double floor_sqrt;
+    floor_sqrt = floor( sqrt((double)n) );
+
+    /*factor out powers of 4, powers of 2, then any remaining primes */
+    do {
+        while (n % p) {
+            switch (p) {
+                case 4: p = 2; break;
+                case 2: p = 3; break;
+                default: p += 2; break;
+            }
+            if (p > floor_sqrt)
+                p = n;          /* no more factors, skip to end */
+        }
+        n /= p;
+        *facbuf++ = p;
+        *facbuf++ = n;
+    } while (n > 1);
+}
+
+/*
+ *
+ * User-callable function to allocate all necessary storage space for the fft.
+ *
+ * The return value is a contiguous block of memory, allocated with malloc.  As such,
+ * It can be freed with free(), rather than a kiss_fft-specific function.
+ * */
+kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem )
+{
+    kiss_fft_cfg st=NULL;
+    size_t memneeded = sizeof(struct kiss_fft_state)
+        + sizeof(kiss_fft_cpx)*(nfft-1); /* twiddle factors*/
+
+    if ( lenmem==NULL ) {
+        st = ( kiss_fft_cfg)KISS_FFT_MALLOC( memneeded );
+    }else{
+        if (mem != NULL && *lenmem >= memneeded)
+            st = (kiss_fft_cfg)mem;
+        *lenmem = memneeded;
+    }
+    if (st) {
+        int i;
+        st->nfft=nfft;
+        st->inverse = inverse_fft;
+
+        for (i=0;i<nfft;++i) {
+            const double pi=3.14159265358979323846264338327;
+            double phase = ( -2*pi /nfft ) * i;
+            if (st->inverse)
+                phase *= -1;
+            kf_cexp(st->twiddles+i, phase );
+        }
+
+        kf_factor(nfft,st->factors);
+    }
+    return st;
+}
+
+
+
+    
+void kiss_fft_stride(kiss_fft_cfg st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int in_stride)
+{
+    if (fin == fout) {
+        CHECKBUF(tmpbuf,ntmpbuf,st->nfft);
+        kf_work(tmpbuf,fin,1,in_stride, st->factors,st);
+        memcpy(fout,tmpbuf,sizeof(kiss_fft_cpx)*st->nfft);
+    }else{
+        kf_work( fout, fin, 1,in_stride, st->factors,st );
+    }
+}
+
+void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout)
+{
+    kiss_fft_stride(cfg,fin,fout,1);
+}
+
+
+/* not really necessary to call, but if someone is doing in-place ffts, they may want to free the 
+   buffers from CHECKBUF
+ */ 
+void kiss_fft_cleanup(void)
+{
+    free(scratchbuf);
+    scratchbuf = NULL;
+    nscratchbuf=0;
+    free(tmpbuf);
+    tmpbuf=NULL;
+    ntmpbuf=0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-kiss_fft.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-kiss_fft.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-kiss_fft.h	(revision 1163)
@@ -0,0 +1,110 @@
+#ifndef KISS_FFT_H
+#define KISS_FFT_H
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+#include <memory.h>
+#include <malloc.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ ATTENTION!
+ If you would like a :
+ -- a utility that will handle the caching of fft objects
+ -- real-only (no imaginary time component ) FFT
+ -- a multi-dimensional FFT
+ -- a command-line utility to perform ffts
+ -- a command-line utility to perform fast-convolution filtering
+
+ Then see kfc.h kiss_fftr.h kiss_fftnd.h fftutil.c kiss_fastfir.c
+  in the tools/ directory.
+*/
+
+#ifdef USE_SIMD
+# include <xmmintrin.h>
+# define kiss_fft_scalar __m128
+#define KISS_FFT_MALLOC(nbytes) memalign(16,nbytes)
+#else	
+#define KISS_FFT_MALLOC malloc
+#endif	
+
+
+#ifdef FIXED_POINT
+#include <sys/types.h>	
+#  define kiss_fft_scalar int16_t
+#else
+# ifndef kiss_fft_scalar
+/*  default is float */
+#   define kiss_fft_scalar float
+# endif
+#endif
+
+typedef struct {
+    kiss_fft_scalar r;
+    kiss_fft_scalar i;
+}kiss_fft_cpx;
+
+typedef struct kiss_fft_state* kiss_fft_cfg;
+
+/* 
+ *  kiss_fft_alloc
+ *  
+ *  Initialize a FFT (or IFFT) algorithm's cfg/state buffer.
+ *
+ *  typical usage:      kiss_fft_cfg mycfg=kiss_fft_alloc(1024,0,NULL,NULL);
+ *
+ *  The return value from fft_alloc is a cfg buffer used internally
+ *  by the fft routine or NULL.
+ *
+ *  If lenmem is NULL, then kiss_fft_alloc will allocate a cfg buffer using malloc.
+ *  The returned value should be free()d when done to avoid memory leaks.
+ *  
+ *  The state can be placed in a user supplied buffer 'mem':
+ *  If lenmem is not NULL and mem is not NULL and *lenmem is large enough,
+ *      then the function places the cfg in mem and the size used in *lenmem
+ *      and returns mem.
+ *  
+ *  If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough),
+ *      then the function returns NULL and places the minimum cfg 
+ *      buffer size in *lenmem.
+ * */
+
+kiss_fft_cfg kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem); 
+
+/*
+ * kiss_fft(cfg,in_out_buf)
+ *
+ * Perform an FFT on a complex input buffer.
+ * for a forward FFT,
+ * fin should be  f[0] , f[1] , ... ,f[nfft-1]
+ * fout will be   F[0] , F[1] , ... ,F[nfft-1]
+ * Note that each element is complex and can be accessed like
+    f[k].r and f[k].i
+ * */
+void kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout);
+
+/*
+ A more generic version of the above function. It reads its input from every Nth sample.
+ * */
+void kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int fin_stride);
+
+/* If kiss_fft_alloc allocated a buffer, it is one contiguous 
+   buffer and can be simply free()d when no longer needed*/
+#define kiss_fft_free free
+
+/*
+ Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up 
+ your compiler output to call this before you exit.
+*/
+void kiss_fft_cleanup(void);
+	
+
+#ifdef __cplusplus
+} 
+#endif
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-kiss_fftr.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-kiss_fftr.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-kiss_fftr.c	(revision 1163)
@@ -0,0 +1,163 @@
+/*
+Copyright (c) 2003-2004, Mark Borgerding
+
+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 author nor the names of any 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 OWNER 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "kiss_fftr.h"
+#include "_kiss_fft_guts.h"
+
+struct kiss_fftr_state{
+    kiss_fft_cfg substate;
+    kiss_fft_cpx * tmpbuf;
+    kiss_fft_cpx * super_twiddles;
+#ifdef USE_SIMD    
+    long pad;
+#endif    
+};
+
+kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem)
+{
+    int i;
+    kiss_fftr_cfg st = NULL;
+    size_t subsize, memneeded;
+
+    if (nfft & 1) {
+        fprintf(stderr,"Real FFT optimization must be even.\n");
+        return NULL;
+    }
+    nfft >>= 1;
+
+    kiss_fft_alloc (nfft, inverse_fft, NULL, &subsize);
+    memneeded = sizeof(struct kiss_fftr_state) + subsize + sizeof(kiss_fft_cpx) * ( nfft * 2);
+
+    if (lenmem == NULL) {
+        st = (kiss_fftr_cfg) KISS_FFT_MALLOC (memneeded);
+    } else {
+        if (*lenmem >= memneeded)
+            st = (kiss_fftr_cfg) mem;
+        *lenmem = memneeded;
+    }
+    if (!st)
+        return NULL;
+
+    st->substate = (kiss_fft_cfg) (st + 1); /*just beyond kiss_fftr_state struct */
+    st->tmpbuf = (kiss_fft_cpx *) (((char *) st->substate) + subsize);
+    st->super_twiddles = st->tmpbuf + nfft;
+    kiss_fft_alloc(nfft, inverse_fft, st->substate, &subsize);
+
+    for (i = 0; i < nfft; ++i) {
+        double phase =
+            -3.14159265358979323846264338327 * ((double) i / nfft + .5);
+        if (inverse_fft)
+            phase *= -1;
+        kf_cexp (st->super_twiddles+i,phase);
+    }
+    return st;
+}
+
+void kiss_fftr(kiss_fftr_cfg st,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata)
+{
+    /* input buffer timedata is stored row-wise */
+    int k,ncfft;
+    kiss_fft_cpx fpnk,fpk,f1k,f2k,tw,tdc;
+
+    if ( st->substate->inverse) {
+        fprintf(stderr,"kiss fft usage error: improper alloc\n");
+        exit(1);
+    }
+
+    ncfft = st->substate->nfft;
+
+    /*perform the parallel fft of two real signals packed in real,imag*/
+    kiss_fft( st->substate , (const kiss_fft_cpx*)timedata, st->tmpbuf );
+    /* The real part of the DC element of the frequency spectrum in st->tmpbuf
+     * contains the sum of the even-numbered elements of the input time sequence
+     * The imag part is the sum of the odd-numbered elements
+     *
+     * The sum of tdc.r and tdc.i is the sum of the input time sequence. 
+     *      yielding DC of input time sequence
+     * The difference of tdc.r - tdc.i is the sum of the input (dot product) [1,-1,1,-1... 
+     *      yielding Nyquist bin of input time sequence
+     */
+ 
+    tdc.r = st->tmpbuf[0].r;
+    tdc.i = st->tmpbuf[0].i;
+    C_FIXDIV(tdc,2);
+    CHECK_OVERFLOW_OP(tdc.r ,+, tdc.i);
+    CHECK_OVERFLOW_OP(tdc.r ,-, tdc.i);
+    freqdata[0].r = tdc.r + tdc.i;
+    freqdata[ncfft].r = tdc.r - tdc.i;
+#ifdef USE_SIMD    
+    freqdata[ncfft].i = freqdata[0].i = _mm_set1_ps(0);
+#else
+    freqdata[ncfft].i = freqdata[0].i = 0;
+#endif
+
+    for ( k=1;k <= ncfft/2 ; ++k ) {
+        fpk    = st->tmpbuf[k]; 
+        fpnk.r =   st->tmpbuf[ncfft-k].r;
+        fpnk.i = - st->tmpbuf[ncfft-k].i;
+        C_FIXDIV(fpk,2);
+        C_FIXDIV(fpnk,2);
+
+        C_ADD( f1k, fpk , fpnk );
+        C_SUB( f2k, fpk , fpnk );
+        C_MUL( tw , f2k , st->super_twiddles[k]);
+
+        freqdata[k].r = HALF_OF(f1k.r + tw.r);
+        freqdata[k].i = HALF_OF(f1k.i + tw.i);
+        freqdata[ncfft-k].r = HALF_OF(f1k.r - tw.r);
+        freqdata[ncfft-k].i = HALF_OF(tw.i - f1k.i);
+    }
+}
+
+void kiss_fftri(kiss_fftr_cfg st,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata)
+{
+    /* input buffer timedata is stored row-wise */
+    int k, ncfft;
+
+    if (st->substate->inverse == 0) {
+        fprintf (stderr, "kiss fft usage error: improper alloc\n");
+        exit (1);
+    }
+
+    ncfft = st->substate->nfft;
+
+    st->tmpbuf[0].r = freqdata[0].r + freqdata[ncfft].r;
+    st->tmpbuf[0].i = freqdata[0].r - freqdata[ncfft].r;
+    /*C_FIXDIV(st->tmpbuf[0],2);*/
+
+    for (k = 1; k <= ncfft / 2; ++k) {
+        kiss_fft_cpx fk, fnkc, fek, fok, tmp;
+        fk = freqdata[k];
+        fnkc.r = freqdata[ncfft - k].r;
+        fnkc.i = -freqdata[ncfft - k].i;
+        /*C_FIXDIV( fk , 2 );
+        C_FIXDIV( fnkc , 2 );*/
+
+        C_ADD (fek, fk, fnkc);
+        C_SUB (tmp, fk, fnkc);
+        C_MUL (fok, tmp, st->super_twiddles[k]);
+        C_ADD (st->tmpbuf[k],     fek, fok);
+        C_SUB (st->tmpbuf[ncfft - k], fek, fok);
+#ifdef USE_SIMD        
+        st->tmpbuf[ncfft - k].i *= _mm_set1_ps(-1.0);
+#else
+        st->tmpbuf[ncfft - k].i *= -1;
+#endif
+    }
+    kiss_fft (st->substate, st->tmpbuf, (kiss_fft_cpx *) timedata);
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-kiss_fftr.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-kiss_fftr.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-kiss_fftr.h	(revision 1163)
@@ -0,0 +1,46 @@
+#ifndef KISS_FTR_H
+#define KISS_FTR_H
+
+#include "kiss_fft.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    
+/* 
+ 
+ Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
+
+ 
+ 
+ */
+
+typedef struct kiss_fftr_state *kiss_fftr_cfg;
+
+
+kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem);
+/*
+ nfft must be even
+
+ If you don't care to allocate space, use mem = lenmem = NULL 
+*/
+
+
+void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata);
+/*
+ input timedata has nfft scalar points
+ output freqdata has nfft/2+1 complex points
+*/
+
+void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata);
+/*
+ input freqdata has  nfft/2+1 complex points
+ output timedata has nfft scalar points
+*/
+
+#define kiss_fftr_free free
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-lbr_48k_tables.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-lbr_48k_tables.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-lbr_48k_tables.c	(revision 1163)
@@ -0,0 +1,678 @@
+/* Copyright (C) 2002 Jean-Marc Valin 
+   File: lbr_48k_tables.c
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
+int dummy_epic_48k_variable=0;
+#ifdef EPIC_48K
+
+const signed char gain_cdbk_ulbr[192] = {
+-31, -48, -30, 
+-19, -10, -18, 
+-33, -22, -45, 
+-5, -56, -43, 
+-30, -56, -3, 
+-59, -17, -52, 
+-41, -60, -58, 
+-64, -47, -22, 
+-30, -31, -31, 
+-29, -14, -31, 
+-22, -37, -58, 
+-31, -44, 13, 
+-37, 0, 1, 
+-46, -55, -35, 
+-56, -14, -53, 
+-8, 1, -36, 
+-29, -15, -27, 
+-29, -39, -28, 
+-43, -5, 3, 
+-51, -27, -54, 
+10, -46, -36, 
+3, -3, -42, 
+-27, 16, -22, 
+-34, -52, 13, 
+-31, -21, -28, 
+-34, -45, -40, 
+-20, -48, 4, 
+-40, -27, 16, 
+-6, 11, -44, 
+-35, 12, -5, 
+19, -33, -37, 
+-29, 18, -32, 
+-29, -23, -19, 
+16, -47, -28, 
+-34, -30, 17, 
+-20, 2, -26, 
+-38, -40, -36, 
+15, -14, -40, 
+-39, 14, -9, 
+-15, 25, -39, 
+-26, 19, -32, 
+-39, 17, -14, 
+10, -36, -26, 
+14, -13, -40, 
+-29, -21, -12, 
+-8, 19, -39, 
+-36, -18, 15, 
+-32, -38, -38, 
+-19, 4, -23, 
+-38, -7, 11, 
+9, -10, -39, 
+-37, 24, -19, 
+-34, -5, -8, 
+-20, 23, -41, 
+-4, 17, -31, 
+-17, -26, -26, 
+-24, 28, -36, 
+-7, 15, -39, 
+-42, 16, -11, 
+-29, 14, -6, 
+-36, 28, -27, 
+-21, 5, -26, 
+11, -9, -39, 
+-38, -7, 13, 
+};
+
+
+const signed char exc_12_32_table[384] = {
+34, 55, 9, 55, 4, 44, -2, 25, 4, -6, 13, -22, 
+20, 26, -13, -56, -37, 18, 5, 28, 4, 10, 6, -7, 
+37, -24, -31, 22, 12, -6, -4, -7, 2, 0, -3, -2, 
+-16, -13, -1, 9, -2, 4, 6, 5, -3, 3, 8, -1, 
+-1, -6, -2, -1, 8, 24, 19, 33, -73, -53, 6, -18, 
+14, 7, 11, 8, -33, -94, -5, 7, 0, 44, 1, 19, 
+-9, -7, -34, -16, 8, 2, 5, 0, 3, 1, -2, 3, 
+-22, 6, -2, 12, 16, 30, 39, 25, 25, 2, 10, -2, 
+-1, -40, -6, -51, -5, -48, -9, -33, -14, -1, -24, 15, 
+104, 39, 12, -9, -20, -12, -30, -10, -31, -7, -30, -8, 
+-71, -53, -4, -11, 9, -10, 7, -10, 10, -1, 11, 8, 
+24, 14, 6, -3, 10, 8, 8, 11, -6, 11, 0, -2, 
+-6, -2, 1, -1, -3, 8, -41, 27, 57, -7, 11, -16, 
+-61, 50, 10, -10, 4, -13, 14, -7, 1, 5, -4, 4, 
+0, 2, -1, -2, -1, 1, 1, 0, -1, -1, -2, -3, 
+-3, -15, 69, 60, 10, -10, -10, -29, -21, -7, -16, 2, 
+24, -32, 24, -18, -14, -2, -11, 11, -6, 10, 1, 3, 
+24, -10, 14, 18, -13, 17, -16, 4, -3, -21, -3, -11, 
+-19, 12, -14, 26, 20, -9, 24, -15, 18, 1, -32, -2, 
+-1, 8, -3, 4, 11, -47, 7, 46, -4, -10, -10, -2, 
+-24, 29, -33, 6, -20, -3, 0, -12, 5, -30, 8, -13, 
+28, 9, 5, -11, 0, -14, -13, -22, -12, -8, -4, 1, 
+-6, 28, 45, -18, -31, -5, 1, 2, 1, 5, 0, -3, 
+-19, -10, 10, 27, 8, -16, -28, -9, 2, -5, 8, -1, 
+100, -49, 4, -43, 25, -7, 1, 9, -13, 13, -18, 13, 
+-1, -1, 0, 2, -2, -8, 9, -46, -7, 70, 23, 7, 
+-103, 20, 8, 42, -5, 21, -4, 4, 1, -8, 16, -8, 
+3, 3, 8, 4, 7, -3, -3, -4, 9, 6, 2, 13, 
+6, 3, -15, 11, -43, 31, 40, -13, 12, -21, -2, -3, 
+-10, -9, 16, -35, 31, -3, -12, 8, -34, 7, 12, 22, 
+-3, -4, -7, -12, 24, 53, -19, -43, 4, -3, -4, 6, 
+-18, -30, -58, -17, -11, 17, 23, 34, 30, 28, 28, 15, 
+};
+
+
+const signed char cdbk_lsp_vlbr[5120]={
+23, 34, 108, 100, 102, 82, 69, 48, 52, 25,
+0, -37, -55, -78, -111, -79, 58, 57, 45, 32,
+27, -9, -12, -14, -41, -29, -17, -41, 44, 35,
+-24, -68, -72, 61, 100, 73, 100, 80, 70, 37,
+12, -5, 22, 11, -10, -40, -33, -17, 19, 12,
+-20, -57, -94, -92, 56, 71, 48, 31, 22, -5,
+41, 28, 6, -6, -12, -39, -18, -16, -30, -23,
+65, 54, 41, 28, 23, 9, 26, 18, 22, 6,
+17, -16, -33, -54, -87, -79, 8, -8, 44, 35,
+-20, -62, -78, 22, 78, 47, 44, 33, 26, 14,
+8, 1, 45, 47, 72, 68, 55, 31, 36, 17,
+-27, -68, -86, -65, -10, 23, 8, -22, -31, 25,
+-4, -38, -55, -68, -96, -118, -39, 30, 28, 31,
+-21, -66, -47, 99, 91, 68, 78, 56, 64, 36,
+33, 22, 13, -13, -36, -22, 44, 37, 54, 33,
+-31, -76, -106, -100, -5, 21, 7, -17, 13, 48,
+-26, -65, -84, -84, -46, 67, 97, 66, 58, 31,
+-20, -52, -32, -20, 3, 16, 27, 40, 54, 29,
+-6, -35, -56, -64, -8, -31, -36, 21, 26, -3,
+32, 23, 1, -23, -19, -44, -45, -7, 10, -10,
+-24, -55, 2, 67, 72, 85, 90, 74, 77, 45,
+-21, -58, -45, -49, 16, 34, 13, -15, -16, 16,
+8, -31, -34, -61, -83, 10, 24, 8, 56, 25,
+-8, -49, -74, -95, -123, -77, 6, 40, 46, 42,
+-21, -60, -59, -34, -12, 27, 8, -19, -48, -17,
+-25, -66, -78, -73, -81, -16, 14, 0, -2, 33,
+78, 79, 69, 49, 44, 32, 50, 44, 46, 22,
+24, 9, -4, -18, -37, -56, 22, 34, 22, 11,
+-19, -59, -85, -41, 46, 72, 60, 33, 29, -3,
+-21, -66, -70, 65, 92, 57, 61, 41, 40, 23,
+-4, -41, -60, -72, -102, -106, 4, 56, 57, 31,
+-5, -48, -62, -91, -109, 1, 76, 54, 72, 39,
+-21, -61, -86, -46, -34, -39, 42, 25, 15, 12,
+5, -16, -36, -56, 5, 18, 11, 13, 52, 23,
+12, -6, 30, 40, 59, 40, 27, 8, 19, 6,
+25, 8, -9, -19, -25, -53, -40, -38, -46, -4,
+-17, -59, -83, 2, 58, 29, 18, -2, -17, -5,
+-35, -80, -111, -117, -41, -9, 14, 23, 36, 56,
+48, 67, 93, 71, 77, 91, 110, 95, 83, 47,
+-25, -62, -97, -93, 76, 96, 73, 52, 61, 28,
+-9, -55, -46, 49, 33, 8, 1, -25, 28, 23,
+-10, -47, -60, -45, -62, -58, 56, 57, 48, 28,
+34, 12, -9, 0, 34, 4, 6, 11, 3, -18,
+21, -9, -16, -13, -39, -41, 14, -8, 33, 28,
+-7, -49, -61, 15, 34, 3, 2, -13, -28, -17,
+-14, -50, -46, -65, -76, -13, -10, -29, -30, 22,
+-28, -68, -97, -98, -8, 38, 36, 26, 25, 15,
+6, -33, -9, 1, -28, -11, -19, -24, 61, 36,
+-15, -60, -19, 81, 58, 52, 42, 28, 66, 36,
+-15, -52, -71, -15, 11, -13, 38, 28, 11, -4,
+34, 1, -9, -27, -57, -19, 36, 6, 14, 0,
+-1, -43, -14, 16, -12, -5, -14, -29, -33, -32,
+-13, -57, -75, -100, -111, 1, 2, 13, 48, 33,
+12, 16, 100, 85, 69, 49, 40, 29, 46, 23,
+-4, -26, -41, -44, -7, -26, -39, -27, 18, 0,
+-4, -47, -51, 17, 7, -19, 13, -10, -16, 9,
+-24, -63, -93, -53, 25, 14, 73, 51, 35, 8,
+-34, -77, -106, -83, -51, -47, 2, 12, 41, 53,
+-13, -47, -67, -44, 42, 20, 24, 33, 21, -3,
+11, -15, -29, -51, -79, -88, 22, 56, 43, 20,
+11, -22, -37, -1, 61, 40, 28, 24, 22, -6,
+-3, -33, -50, -66, -93, -100, -16, -16, 3, 41,
+-18, -58, -82, -5, 95, 78, 56, 39, 30, 1,
+-6, -47, -28, -26, -36, 49, 55, 51, 71, 35,
+-6, -50, -42, -4, -32, -1, -1, -18, 67, 40,
+-23, -63, -56, -48, -32, 0, -14, -43, -46, 25,
+-17, -61, -63, 13, -1, 28, 23, 10, 67, 36,
+45, 92, 124, 111, 108, 86, 77, 56, 57, 28,
+50, 35, 13, 3, -2, -32, 3, 14, 6, -8,
+12, -17, -24, -42, -67, -23, 67, 49, 64, 38,
+-21, -60, -90, -45, 32, 6, 7, -3, -15, 9,
+-16, -62, -73, 50, 46, 18, 7, -13, 63, 39,
+19, -16, -19, 20, 5, -15, 16, -9, 5, 8,
+-11, -46, -42, -39, -55, -68, -62, -27, -18, 23,
+-23, -61, -67, -71, -29, 44, 32, 10, -15, -12,
+-6, -45, -43, -40, -67, -22, 42, 19, 61, 38,
+9, -13, -38, -37, 40, 30, 15, 9, 11, -16,
+0, -18, -29, -34, -17, -44, -50, -3, 47, 15,
+-3, -46, -26, 20, -10, 16, 20, -2, 43, 18,
+-23, -46, 46, 91, 99, 100, 99, 79, 72, 42,
+-1, -44, -33, -36, -56, 22, 17, 4, 71, 37,
+0, -38, -49, 0, -1, -30, -21, -35, -44, -6,
+-32, -74, -101, -98, -14, -21, -23, 7, 26, 45,
+8, -28, -44, -63, -96, -84, 34, 21, 13, 23,
+10, -24, -38, -17, -29, -53, -16, -41, -14, 23,
+-19, -61, -76, -12, 97, 99, 79, 60, 59, 25,
+5, -11, -26, -54, -26, -8, -13, 3, 25, 4,
+17, 16, 4, -24, -1, 42, 60, 63, 70, 37,
+10, -27, -22, -43, -62, -7, -16, 10, 75, 40,
+-26, -64, -96, -106, -3, 73, 73, 46, 55, 29,
+-2, -45, -43, 45, 46, 17, 37, 10, 30, 32,
+21, -2, -18, -28, -47, -63, -38, -56, -3, 27,
+-17, -48, -9, 9, 3, 28, 50, 58, 73, 44,
+8, -14, -32, -56, -81, -106, -35, 41, 53, 26,
+1, -38, -51, -66, -100, -61, 32, 17, 66, 42,
+17, 5, -6, -21, -26, -52, -36, 23, 56, 22,
+6, -20, -31, -22, -19, -48, 16, 38, 22, -2,
+-25, -67, -93, -51, 82, 62, 71, 69, 63, 35,
+-12, -51, -71, -60, -76, -91, -14, 41, 35, 20,
+-16, -31, 22, 32, 55, 80, 98, 91, 85, 49,
+-21, -63, -92, -6, 57, 27, 36, 11, 60, 39,
+-7, -45, -67, -81, -114, -110, 0, 24, 23, 45,
+-18, -55, -61, -56, -60, -64, -32, -2, 58, 36,
+-3, -33, -51, -24, 19, -10, -19, 4, 14, -15,
+-19, -59, -81, -12, 7, -12, 36, 16, 48, 36,
+17, -13, -32, -49, -78, -95, -1, -3, -10, 25,
+15, 5, 41, 59, 108, 101, 103, 81, 70, 35,
+-14, -52, -37, 15, 93, 83, 66, 50, 47, 15,
+-3, -31, -49, -52, -9, -31, -10, 37, 62, 27,
+-15, -56, -82, -17, 75, 56, 36, 22, 7, -16,
+-24, -63, -93, -84, 25, 94, 98, 65, 60, 31,
+-2, -45, -39, -61, -61, 48, 35, 32, 54, 18,
+-19, -51, -45, -57, -28, -8, 10, 14, 38, 26,
+-2, -46, -38, 45, 26, 22, 48, 21, 63, 40,
+-22, -61, -73, -75, -67, -31, 13, 18, 51, 34,
+-12, -2, -1, -17, -3, -27, -3, 6, -1, -15,
+-16, -59, -78, 10, 36, 9, 4, -18, 33, 22,
+-25, -62, -97, -107, 39, 87, 69, 46, 42, 12,
+11, -7, -30, -36, 19, 2, -10, -7, -4, -24,
+11, -8, 25, 28, 28, 5, -4, -10, 5, -2,
+-10, -48, -37, -17, -38, -9, -2, -19, -30, -22,
+-23, -61, -79, -81, -2, 15, -4, 17, 20, 2,
+25, -14, -3, -10, -38, 1, 14, -14, -9, -27,
+2, -18, -38, -36, -11, -39, -36, -28, -36, -11,
+32, 59, 127, 124, 127, 108, 91, 68, 64, 34,
+3, -32, -37, -10, -25, -46, 12, 1, -17, -24,
+-29, -69, -102, -100, 2, -7, 11, 14, 1, 31,
+30, -6, -4, -16, -44, -5, 3, -9, 66, 40,
+-9, -45, -52, -5, 37, 19, 26, 6, 51, 32,
+-31, -73, -96, -45, -25, -37, -15, -16, 32, 39,
+3, -15, 18, 21, 28, 33, 58, 58, 69, 42,
+-31, -73, -99, -99, -48, 14, 21, 5, 2, 39,
+7, -35, -20, 29, 2, -8, -8, -28, 38, 26,
+-5, -39, -64, -36, 15, -15, -11, -21, -23, 5,
+-8, -51, -56, 15, -1, -14, -8, -31, 36, 22,
+-8, -53, -68, -98, -101, 42, 49, 38, 41, 12,
+10, -27, -22, 4, -23, -21, 30, -1, 22, 26,
+-13, -56, -42, 31, 9, -1, -10, -2, 22, -4,
+15, 8, 56, 57, 45, 55, 57, 46, 72, 44,
+-7, -53, -26, 53, 21, 17, 0, 0, 74, 41,
+3, -18, -2, 0, 19, 17, 42, 36, 47, 26,
+24, -7, -23, -34, -62, -60, 6, -22, 18, 25,
+-11, -42, -46, -61, -83, -99, -67, -11, 28, 39,
+30, -3, -10, -1, -24, -30, -1, -28, 15, 18,
+19, -15, -10, -6, -35, -26, 33, 10, 56, 39,
+-13, -53, -82, -42, 53, 37, 18, 10, -3, -21,
+-21, -60, -89, -46, 89, 94, 71, 46, 42, 9,
+-2, -34, -44, -46, -64, -84, -1, 37, 16, 0,
+-17, -51, -65, -64, -7, -17, -29, -11, 52, 27,
+22, -15, -16, -39, -55, 26, 36, 21, 62, 28,
+-2, -26, -38, -49, -55, -80, -75, 8, 20, 9,
+-6, -47, -61, -82, -103, -17, -15, -25, 53, 40,
+-8, -47, -66, -18, 56, 43, 25, 29, 39, 3,
+-27, -66, -86, -69, -50, -59, -34, -1, 19, 42,
+3, -20, 2, 21, 72, 57, 52, 36, 31, 7,
+-12, -49, -61, -13, -1, -33, 5, 37, 26, 2,
+-27, -69, -92, -62, 2, 43, 88, 67, 64, 36,
+0, -40, -4, -6, -20, 43, 33, 25, 50, 20,
+14, -20, -30, -44, -73, -37, -24, -47, 26, 20,
+31, 53, 111, 118, 127, 126, 121, 99, 85, 46,
+-14, -45, -51, -39, 24, 5, -6, 17, 46, 14,
+-4, -43, -45, -70, -63, 8, 14, 58, 78, 39,
+-8, -47, -66, -84, -114, -55, 10, -8, 32, 40,
+28, 22, 42, 26, 8, -21, -16, -6, 22, 10,
+24, 10, 34, 31, 35, 31, 46, 39, 59, 36,
+-4, -43, -62, -10, 20, -14, 2, 14, -6, -19,
+-21, -62, -89, -22, 62, 33, 30, 16, 15, 15,
+0, -22, -31, -45, -58, -80, -66, 13, 68, 34,
+-16, -45, -6, 7, -6, -17, -14, -15, 2, 2,
+10, -5, -22, -38, -40, -70, -60, -15, -23, 0,
+22, -11, -22, -39, -67, -25, 30, 5, 58, 37,
+-21, -47, 6, 43, 37, 45, 65, 66, 73, 43,
+2, -25, -40, -53, -72, -94, -35, 24, 9, 8,
+-3, 0, -3, -9, 4, -23, -10, 20, 43, 14,
+-2, -41, -60, -9, 57, 32, 17, 16, 6, -19,
+1, -31, -36, -36, -54, -68, -77, -75, 21, 37,
+-19, -32, 79, 90, 92, 81, 67, 47, 52, 28,
+-6, -36, -57, -62, 27, 40, 21, 11, 9, -19,
+-10, -47, -49, -59, -74, -18, -14, -30, 25, 18,
+-23, -69, -82, 60, 66, 40, 75, 54, 65, 38,
+-19, -57, -92, -68, 66, 58, 34, 18, 1, -16,
+-29, -68, -99, -88, -37, -38, 13, 8, 5, 40,
+-22, -63, -75, 14, 15, 7, 75, 58, 59, 34,
+-23, -62, -82, -39, -31, -53, -27, 5, -3, 20,
+13, -26, -20, 22, 2, -3, 35, 13, 54, 39,
+32, 5, -13, -22, -45, -58, -1, -20, -19, 7,
+30, 46, 70, 55, 89, 88, 91, 67, 56, 28,
+-13, -50, -63, -25, -28, -50, -23, -32, -34, 19,
+-13, -54, -65, -9, -20, -37, 29, 6, 11, 25,
+0, -40, -55, -78, -107, -25, 47, 20, 34, 16,
+-20, -58, -96, -103, 38, 43, 27, 30, 15, -1,
+-16, -49, -52, -66, -80, -57, -44, -39, 6, 38,
+0, -38, 5, 13, -8, 23, 24, 1, 7, -9,
+-18, -56, -64, -7, 38, 13, 11, 32, 28, 0,
+14, -3, -20, -17, 4, -26, -34, -8, 19, -9,
+-23, -60, -83, -38, -8, -32, 11, 19, -1, -5,
+-5, -47, -12, 56, 38, 22, 18, -8, -5, -8,
+18, -4, -24, -16, 27, 2, -6, 5, 25, -5,
+13, 0, -19, -35, -23, -45, -59, -30, 19, 3,
+19, -12, -23, 1, -7, -35, -14, -32, -23, 4,
+-23, -64, -67, -22, -27, -5, -5, -20, 20, 5,
+20, 11, 83, 92, 85, 89, 69, 53, 80, 48,
+15, -2, -21, -29, -18, -48, -52, -12, -11, -21,
+-6, -38, -55, -68, -9, 33, 22, 19, 25, -1,
+-8, -46, -49, -67, -64, 16, 8, -6, 32, 15,
+3, -25, -46, -46, 39, 50, 34, 21, 46, 14,
+8, -33, -37, -68, -82, 31, 34, 13, 19, -6,
+33, 0, 5, -7, -32, 2, 22, -3, 35, 17,
+-23, -62, -91, -64, 6, 3, 36, 26, 7, -3,
+-12, -54, -60, 26, 46, 16, 30, 22, 8, -4,
+-23, -61, -40, 31, 58, 73, 88, 77, 74, 41,
+-2, -42, -49, 13, 5, -15, 22, -4, 26, 27,
+-13, -54, -39, 18, 2, -8, -12, 34, 56, 23,
+-20, -31, 27, 23, 24, 28, 39, 33, 47, 27,
+36, 17, -4, -20, -30, -61, -8, 20, 0, -15,
+-10, -51, -72, -82, -111, -73, 34, 25, 19, 38,
+-10, -45, -63, -55, -46, -75, -45, 34, 34, 12,
+6, -18, 29, 26, 7, -9, 0, 5, 38, 22,
+-7, -52, -16, 69, 43, 26, 23, 2, 51, 34,
+-12, -51, -59, -78, -88, 15, 20, 0, -14, 12,
+-3, -36, -59, -45, 60, 49, 28, 20, 16, -13,
+-28, -70, -90, 9, 67, 48, 90, 77, 70, 38,
+-10, -39, -58, -54, 15, -12, 3, 35, 27, -3,
+12, -1, 28, 29, 55, 53, 80, 65, 51, 23,
+-17, -61, -39, 74, 56, 43, 75, 51, 58, 36,
+-30, -71, -93, -43, -29, -26, 4, -19, -14, 37,
+3, -13, -31, -38, 11, -5, -22, -11, 43, 14,
+-25, -65, -80, -79, -71, 3, 37, 32, 20, 9,
+-20, -60, -77, -26, 18, 43, 44, 24, 22, -3,
+-4, -42, -22, -19, -45, -32, -35, -39, -46, 1,
+-25, -59, -27, -10, -7, -4, 7, 13, 25, 12,
+8, -25, -32, -47, -74, -32, 27, 6, 25, 7,
+41, 40, 62, 64, 64, 50, 54, 42, 49, 25,
+-21, -63, -88, -21, 16, -3, -4, -26, 57, 38,
+8, -25, -34, 2, -8, -28, 2, -22, 12, 23,
+-19, -49, 10, 71, 84, 71, 66, 48, 42, 22,
+-20, -58, -89, -57, 62, 44, 33, 36, 25, -1,
+-22, -55, -27, 1, 43, 37, 46, 50, 51, 26,
+1, -38, -46, 22, 34, 4, 20, -2, 3, 9,
+-4, -42, -49, -75, -89, -24, -25, 19, 71, 39,
+5, -28, -45, -43, -63, -75, -17, -38, 14, 30,
+-4, -36, -62, -59, -29, -43, -4, -16, 11, 23,
+-19, -57, -82, -39, 26, 2, -2, 20, 11, -10,
+-28, -68, -92, -70, 9, -1, -15, -30, 11, 31,
+1, -22, -41, -49, -30, -58, -48, 8, 4, -9,
+38, 41, 108, 115, 96, 98, 103, 84, 86, 51,
+15, 1, 58, 46, 26, 6, 16, 18, 41, 24,
+4, -34, -14, -27, -42, 20, 18, 2, 23, 1,
+-22, -59, -83, -70, -22, -42, -26, 29, 29, 15,
+-14, -34, 11, -1, -21, -35, -3, 1, 29, 16,
+-16, -57, -78, -7, 17, -13, 8, -13, -6, 22,
+-22, -32, -21, -20, 20, -4, 10, 13, 12, -4,
+8, -30, -30, -46, -71, -4, 3, -11, 4, -11,
+16, 5, -15, -21, 3, -23, -25, -19, -28, -32,
+-28, -68, -98, -101, -34, 19, 71, 52, 49, 30,
+-18, -57, -82, -56, -56, -66, 15, 12, 1, 29,
+-21, -62, -76, -27, -33, -38, 18, 30, 54, 32,
+3, -36, -10, -17, -34, -3, -8, 32, 63, 27,
+1, -30, -44, -20, -13, -49, -25, 3, -14, -18,
+-26, -68, -80, -46, -28, 17, 42, 37, 58, 34,
+30, 26, 57, 55, 49, 25, 16, 3, 24, 11,
+35, 35, 67, 57, 60, 82, 114, 103, 93, 55,
+18, -8, -23, -32, -53, -68, 15, 11, -6, -7,
+-2, -43, -29, 0, -28, -5, -5, -15, 25, -1,
+4, -13, -35, -45, 14, -6, -2, 19, 16, -9,
+-30, -72, -93, -93, -73, -10, -15, 6, 30, 45,
+-23, -58, -50, -55, -74, -60, -23, 0, 6, 21,
+-4, -40, -63, -24, 7, -19, 4, -18, 27, 28,
+-12, 1, 88, 76, 74, 88, 93, 90, 80, 44,
+-13, -59, -43, 52, 27, 21, 15, 12, 42, 11,
+22, -14, -17, -33, -57, -4, 5, -18, 40, 18,
+-3, -23, -43, -44, 8, -16, -14, -4, -20, -29,
+35, 45, 75, 82, 111, 117, 125, 105, 89, 51,
+-3, -38, -57, -30, 79, 71, 48, 33, 33, 0,
+-17, -62, -57, 66, 67, 35, 29, 5, 22, 17,
+3, -31, -34, -21, -44, -49, 42, 23, 24, 26,
+-23, -62, -74, -49, -30, -30, -37, -50, 9, 35,
+-17, -57, -71, -81, -45, 61, 58, 37, 31, 9,
+3, -7, 28, 14, -2, 0, 40, 41, 58, 33,
+-11, -51, -74, -17, 40, 12, 8, 13, -4, -22,
+-16, -46, -31, -35, -49, -49, -26, -9, -7, -7,
+17, -9, -24, -41, -68, -73, 38, 33, 19, 16,
+-15, -50, -47, -16, -24, -21, 59, 56, 53, 30,
+-14, -54, -57, 2, -17, -33, -34, -21, 4, -4,
+-23, -62, -93, -72, 48, 31, 21, 6, 3, 17,
+-18, -63, -79, 44, 68, 36, 45, 20, 57, 37,
+-29, -72, -99, -111, -86, -31, 7, 25, 39, 55,
+-14, -49, -53, -63, -80, -31, 24, 13, 1, -1,
+-9, -45, -55, -27, -31, -63, -23, 25, 13, -5,
+-20, -61, -80, 7, 44, 16, 54, 40, 32, 17,
+24, 7, -8, -43, -62, -54, -11, 7, 35, 27,
+-12, -55, -59, -48, -69, -4, -1, -12, 68, 39,
+-12, -31, 52, 63, 53, 34, 29, 22, 36, 19,
+-26, -66, -97, -79, 50, 41, 40, 48, 54, 28,
+-2, -37, -41, -2, -11, -30, 29, 16, 4, -2,
+40, 49, 56, 37, 39, 40, 64, 59, 67, 39,
+11, -5, 20, 14, 25, 16, 25, 22, 37, 17,
+-3, -43, -46, -10, -35, -38, -35, -39, 67, 43,
+-7, -47, -33, -39, -60, -12, -18, 11, 43, 11,
+-25, -65, -91, -76, -91, -81, 0, 13, 34, 50,
+-9, -50, -52, 17, 0, -4, 43, 18, 63, 42,
+-8, -15, 15, 41, 56, 35, 51, 45, 51, 29,
+0, -14, -24, -36, -43, -70, -39, 27, 33, 5,
+-25, -62, -81, -66, -12, -26, -16, -4, -13, 21,
+-29, -68, -60, -24, -3, 11, 18, 19, 30, 20,
+1, -35, -42, -30, -57, -51, 13, -17, 3, 22,
+-8, -27, -12, -2, -7, -21, 36, 41, 34, 12,
+-17, -56, -62, -72, -73, -17, -26, 9, 16, 13,
+11, -21, -37, -3, 16, -17, 1, -3, -18, -19,
+15, -20, -19, -22, -49, -30, -7, -29, 3, -2,
+17, -4, 11, 6, 51, 40, 36, 34, 48, 22,
+-19, -55, -29, 37, 68, 49, 45, 33, 42, 23,
+7, -30, -22, 3, -22, -36, -36, -54, 20, 22,
+20, 2, -15, -39, -59, -85, -10, 37, 21, 2,
+-15, -54, -77, -54, 74, 70, 48, 32, 51, 20,
+-25, -64, -70, -75, -52, 17, 6, -20, -30, 26,
+-13, -55, -15, 39, 16, 42, 30, 33, 62, 28,
+-21, -56, -30, -35, 6, 13, -4, -29, 33, 27,
+-17, -55, -75, -31, 3, -28, -26, 16, 18, -4,
+-13, -44, -60, -52, -9, -36, -38, 1, -9, -9,
+-12, -50, -77, -70, 43, 47, 28, 13, 43, 16,
+-13, -57, -80, -104, -113, -30, 43, 45, 52, 39,
+3, -28, -42, -37, -58, -67, 23, 4, 38, 33,
+-21, -64, -74, -22, 43, 83, 81, 56, 62, 32,
+34, 26, 23, 9, 14, 17, 26, 16, 37, 19,
+-5, -48, -49, -75, -65, 9, -6, 41, 45, 15,
+32, 30, 63, 83, 90, 91, 100, 84, 85, 52,
+-19, -54, -68, -71, 11, 30, 13, 1, 63, 37,
+44, 76, 99, 87, 117, 113, 103, 77, 64, 32,
+-16, -45, -12, 30, 27, 15, 57, 49, 42, 22,
+9, -15, -31, -28, -36, -61, -13, -18, -33, -5,
+-12, -55, -8, 82, 64, 47, 42, 21, 27, 9,
+-15, -56, -74, -12, -19, -28, 7, -16, 53, 38,
+-7, -45, -64, -55, -74, -80, 35, 45, 24, 15,
+-25, -48, -34, -42, -6, -27, -9, 9, 13, -7,
+-25, -65, -84, -35, 30, 14, 24, 39, 48, 28,
+-22, -62, -86, -51, 64, 104, 94, 61, 62, 31,
+16, -15, -25, -28, -55, -56, -10, -23, 52, 36,
+10, -10, -22, -46, -71, -92, -45, -13, 16, 26,
+-22, -65, -84, 17, 85, 55, 66, 48, 55, 31,
+-1, -38, -33, -25, -49, -15, 18, -10, 41, 30,
+-3, -24, -47, -60, -30, -46, -17, -13, -27, 1,
+-7, -41, -61, -54, -50, -78, -28, 5, -2, 20,
+17, -12, -27, -4, 8, -27, -5, 23, 14, -12,
+-36, -81, -111, -75, -17, -9, 9, 9, 39, 49,
+-13, -59, -54, 68, 51, 32, 35, 14, 64, 38,
+-11, -44, -69, -57, 11, -11, -5, 3, -16, -15,
+34, 36, 41, 16, -8, -24, 11, 23, 48, 28,
+-17, -42, 8, 17, 45, 69, 71, 55, 49, 23,
+3, -30, -46, -64, -95, -109, 2, 39, 19, 19,
+25, -13, -7, 16, -11, -5, 8, -11, 52, 33,
+-8, -37, -57, -60, 13, 7, -14, -4, 20, -7,
+7, -31, 9, 44, 20, 22, 29, 10, 52, 31,
+3, -22, -36, -53, -80, -77, -35, -41, 54, 41,
+-21, -59, -87, -83, 12, 69, 57, 36, 32, 2,
+6, -14, -34, -42, -4, -32, -27, 10, 4, -20,
+-11, -56, -59, 25, 8, -5, -9, -26, 68, 43,
+22, 13, 40, 39, 73, 81, 95, 88, 82, 45,
+-18, -62, -79, 28, 60, 28, 29, 3, 23, 25,
+6, -31, -39, -55, -85, -32, 7, -17, 48, 30,
+7, -24, -42, -8, 39, 10, 7, 11, 1, -20,
+-1, -36, -26, -30, -48, 2, 46, 26, 35, 14,
+-17, -57, -56, -10, -4, 26, 22, 6, -4, -16,
+-18, -55, -59, -67, -86, -50, 3, 29, 29, 16,
+-25, -61, -33, 2, 26, 25, 23, 10, 24, 16,
+26, 15, -8, -20, 6, -21, -16, 3, 0, -22,
+13, -17, -26, -12, -31, -48, 15, -3, 1, 14,
+4, -27, -33, -21, -29, -53, -52, -64, -42, 22,
+-11, -41, -42, -40, -42, -64, 0, 48, 50, 19,
+-13, -47, -42, -56, -50, 10, 3, -9, -30, -16,
+-4, -47, -12, 14, -13, 21, 13, 6, 73, 40,
+-15, -50, -63, -41, -31, -55, -60, -13, 28, 15,
+-6, -50, -56, -81, -95, 30, 29, 21, 71, 35,
+-14, -58, -65, 37, 40, 9, 18, -10, -4, 20,
+31, 33, 79, 106, 119, 103, 100, 77, 64, 33,
+14, 7, 56, 81, 97, 85, 85, 61, 45, 20,
+-24, -66, -74, -51, -17, 16, 5, -21, 22, 26,
+-1, -25, -38, -24, -2, -35, -26, 21, 34, 1,
+20, 15, 75, 59, 39, 26, 48, 43, 50, 29,
+26, 1, -15, -4, -9, -38, 9, 2, -9, -8,
+20, 14, 19, 13, 2, -16, 24, 25, 19, 3,
+-8, -41, -58, -78, -109, -106, -27, 9, 53, 46,
+17, 5, -13, -25, -24, -54, -20, 2, -21, -25,
+-11, -50, -48, 19, 10, -7, 46, 26, 24, 17,
+-28, -68, -69, -50, -49, -33, -7, 10, 20, 21,
+4, -36, -21, 38, 19, 1, 25, -3, 20, 22,
+-18, -58, -87, -44, 82, 73, 49, 31, 19, -7,
+-21, -61, -78, -44, -58, -66, -9, -23, 10, 40,
+-25, -66, -76, -33, -33, 6, 16, -6, -21, 5,
+-27, -69, -77, 5, -2, -7, 6, 9, 24, 6,
+1, -41, -41, -58, -79, 25, 69, 43, 68, 36,
+-28, -67, -85, -71, -34, 0, 14, 12, -2, 4,
+-2, -33, -55, -37, 37, 25, 6, 6, 29, -4,
+-8, -25, -11, -9, 40, 23, 17, 25, 37, 12,
+-21, -27, 52, 60, 47, 58, 76, 70, 69, 38,
+23, 15, 22, -8, -32, -50, -10, 3, 31, 21,
+-10, -44, -67, -61, -29, -54, 8, 39, 21, 4,
+31, 18, 30, 36, 46, 28, 50, 42, 35, 13,
+-21, -57, -24, -16, -15, 14, 3, -25, -17, 20,
+23, 6, 24, 35, 90, 72, 64, 55, 55, 23,
+7, -28, -42, -19, -36, -50, -15, -40, 29, 28,
+-21, -59, -66, -59, -6, 85, 83, 53, 54, 26,
+2, -20, -42, -52, -27, -49, 5, 9, -9, -8,
+-18, -56, -84, -72, 24, 51, 32, 20, 13, -10,
+-13, -53, -64, -39, -63, -40, 24, 0, 34, 29,
+0, -31, -45, -63, -90, -53, 3, -18, -9, 24,
+-13, -57, -71, 27, 19, -3, 25, -3, 45, 35,
+12, -9, -26, -40, -51, -78, -24, 11, -9, -6,
+-12, -49, -45, -33, -50, -48, -46, -52, 2, 25,
+-14, -56, -84, -108, -122, -50, 4, 22, 42, 53,
+-6, -44, -54, -28, -41, -61, 19, 25, 6, 1,
+-32, -75, -95, -38, -1, -15, 7, 14, 23, 23,
+11, 12, 37, 30, 38, 51, 80, 80, 82, 47,
+-19, -56, -69, -82, -98, -64, -29, 2, 28, 42,
+-18, -49, 3, 34, 41, 39, 32, 18, 21, 7,
+-8, 23, 39, 30, 30, 27, 41, 36, 44, 23,
+-16, -49, -69, -46, 1, -27, 41, 48, 35, 15,
+6, -32, -36, 5, -17, -30, 2, -16, 51, 35,
+-23, -64, -91, -21, 71, 44, 52, 44, 40, 21,
+-22, -55, -40, -20, 62, 52, 38, 29, 27, 5,
+-27, -69, -75, -6, -8, 3, -2, -30, -42, 13,
+2, -29, -42, -10, 29, 2, 15, 30, 26, 0,
+-27, -69, -85, -75, -54, -8, -14, -31, 16, 42,
+-2, -44, -54, -75, -101, -6, 4, -3, 32, 13,
+7, -3, -22, -43, -14, -27, -24, -11, -14, -12,
+-18, -57, -85, -66, 47, 86, 75, 45, 42, 10,
+18, 3, 39, 76, 80, 48, 48, 41, 44, 21,
+-13, -51, -73, -22, -15, -41, 3, -4, -22, 3,
+-10, -50, -63, -9, -23, -42, -6, -30, 11, 28,
+15, -11, -29, -39, -57, -71, -23, -40, -33, 20,
+-2, -40, -48, -5, -21, -25, 31, 7, 53, 35,
+-19, -63, -72, 39, 34, 16, 37, 17, 54, 31,
+-18, -49, -28, -27, -40, -29, 4, 4, 19, 11,
+-1, -43, -41, 24, 15, -12, -4, -31, -4, 23,
+-11, -46, -79, -74, 34, 21, 9, 15, 3, -13,
+-16, -51, -56, -55, 8, 62, 50, 30, 43, 14,
+-1, -25, -27, -32, -46, -62, -66, -36, 53, 32,
+-12, -49, -77, -50, 2, -21, 23, 6, 14, 21,
+-5, -47, -58, -77, -105, -14, 30, 9, 73, 44,
+-24, -52, -4, 10, 13, 13, 27, 27, 42, 24,
+-10, -38, -27, -15, -24, -52, -53, 1, 14, -6,
+-17, -45, -13, 2, 19, 53, 83, 79, 76, 43,
+-21, -62, -86, -48, 40, 17, 14, -9, 40, 30,
+-1, -32, -51, -33, -3, -35, 2, 17, -2, -12,
+-21, -60, -85, -70, 33, 73, 58, 37, 67, 36,
+-1, -45, -39, 37, 17, 3, 18, -8, 53, 35,
+-8, -47, -65, -61, -87, -93, 9, 9, 2, 33,
+-13, -55, -56, -19, -29, 14, 17, 6, 55, 28,
+5, 1, -7, -23, -26, -56, -39, 14, 11, -13,
+-28, -69, -89, -74, -83, -45, 1, 0, 16, 45,
+-3, 5, 91, 104, 119, 111, 97, 76, 72, 39,
+19, 5, -12, -34, -41, -72, -67, 14, 21, 1,
+-17, -49, 15, 27, 13, 6, 2, 12, 27, 10,
+-10, -30, 18, 36, 93, 87, 87, 69, 58, 26,
+37, 32, 64, 54, 53, 67, 78, 73, 80, 48,
+48, 46, 38, 9, -1, 8, 47, 44, 58, 33,
+-23, -61, -88, -76, 27, 14, 9, 36, 36, 10,
+-24, -66, -88, -97, -55, 20, 19, 16, 52, 31,
+4, -16, -1, -8, 2, 0, 15, 13, 29, 14,
+-9, -44, -66, -72, 8, 32, 37, 38, 46, 16,
+-22, -65, -62, 30, 22, 51, 57, 45, 68, 38,
+-4, -42, -53, -33, -54, -53, -4, -18, 62, 40,
+-5, -37, -61, -41, 35, 15, -2, -3, -12, -28,
+-18, -65, -55, 90, 80, 49, 44, 21, 59, 36,
+5, -16, -31, -32, -37, -62, -19, -11, 9, 16,
+-22, -60, -67, -51, -61, -35, -5, -18, -27, 24,
+-18, -55, -39, -42, -40, 20, 25, 6, 6, 7,
+0, -25, -42, -50, -59, -84, -31, -13, -22, 17,
+-32, -73, -100, -89, -21, -10, 18, 38, 31, 23,
+-15, -54, -57, -13, -18, -41, -32, 17, 50, 21,
+-16, -57, -71, -10, -8, -26, -38, -47, 42, 25,
+-17, -58, -82, -7, 33, 3, 30, 11, 13, 24,
+-23, -61, -97, -83, 82, 81, 57, 39, 31, 2,
+26, 32, 104, 86, 62, 55, 77, 70, 74, 43,
+-8, -29, -33, -52, -74, -73, -17, 14, 39, 25,
+-21, -60, -68, -22, 43, 37, 51, 54, 64, 36,
+-5, -30, -50, -52, 22, 7, 10, 13, 0, -20,
+-15, -53, -61, -34, -50, -25, 15, 6, 0, -14,
+-10, -51, -60, 20, 77, 50, 34, 22, 8, -8,
+-8, -45, -52, -59, -76, -35, -43, -49, 47, 40,
+41, 44, 53, 40, 41, 30, 38, 31, 46, 24,
+19, 3, -15, -26, -16, -45, -13, 24, 18, -5,
+-3, -39, -54, -35, -49, -70, 2, -6, -19, 15,
+-13, -53, -36, 6, -3, 45, 50, 30, 33, 10,
+15, -25, -16, -4, -32, 7, 23, 6, 67, 36,
+-21, -58, -87, -71, 10, -12, -16, 19, 10, 0,
+9, -15, -6, 25, 31, 7, 30, 28, 20, 2,
+2, -28, -42, -50, -67, -75, 12, 12, -4, 8,
+-17, -63, -58, 56, 49, 36, 60, 38, 37, 14,
+-13, -48, -38, -29, -44, -25, -20, -33, 38, 20,
+2, -37, -42, -1, -18, -42, 3, -17, -19, 12,
+-20, -60, -73, -7, 12, -13, -22, -38, 4, 10,
+-8, -41, -63, -65, 42, 63, 45, 31, 31, 0,
+-4, -46, -38, -9, -35, 15, 50, 27, 67, 39,
+3, -7, -13, -34, -51, -47, 9, 39, 54, 29,
+-29, -71, -89, -52, -39, -6, 3, 2, 38, 28,
+-14, -42, -13, -15, -19, 0, 20, 12, 37, 25,
+11, -26, -24, -40, -65, -11, -13, -27, 65, 37,
+0, -31, -46, -17, -21, -45, 11, -2, 25, 24,
+51, 91, 102, 87, 85, 63, 57, 42, 48, 23,
+-4, -34, -56, -70, -10, -14, 4, 18, 3, -8,
+-23, -59, -39, -44, -42, -14, -10, -23, -4, 17,
+-2, 4, 35, 63, 69, 75, 82, 63, 78, 48,
+-17, -55, -60, -3, -4, -19, 4, -4, -18, -29,
+2, -20, -36, -50, -32, -59, -16, 30, 16, -6,
+-12, -47, 24, 68, 45, 46, 41, 32, 65, 37,
+-4, -40, -54, -67, -96, -66, -9, -25, 42, 38,
+-15, 13, 58, 58, 84, 104, 119, 104, 89, 51,
+-15, -24, -9, -24, -27, -50, -7, 28, 29, 6,
+-7, -33, -35, -49, -65, -53, -37, -10, 33, 14,
+31, 19, 46, 72, 67, 45, 83, 68, 63, 41,
+-14, -53, -59, -17, 55, 79, 64, 39, 43, 10,
+};
+
+const signed char cdbk_lsp2_vlbr[160]={
+-20, -30, -24, 17, 7, -13, -21, 61, 56, 16,
+12, 1, 10, 77, 32, 3, 7, 3, -25, -31,
+-4, 2, -36, -83, 18, 5, -5, 5, 11, 23,
+-2, -1, -11, -12, -20, -28, 68, 50, -17, -20,
+5, 2, 1, 20, 17, 4, -52, -66, 36, 24,
+-4, -10, 7, -15, -32, 80, 37, 8, -13, -29,
+33, 37, 28, 15, 8, 14, 35, 18, 50, 36,
+-4, -1, 4, -7, 3, 3, -11, -58, -75, 13,
+13, 21, 24, -11, -12, -38, -72, 33, 15, -12,
+-44, -17, 83, 21, 2, 7, 0, 4, 0, -1,
+-25, -42, -51, 33, 20, 15, 30, -13, 9, 32,
+6, 2, -8, 7, -38, -77, 6, -13, -7, 32,
+48, 57, 32, -12, -10, -4, 2, -15, -29, -29,
+2, 10, -9, -16, 79, 44, 7, 12, -5, -18,
+-23, -29, -35, -3, -3, -18, -34, -3, -39, -50,
+-5, -10, -8, -37, -76, 11, -4, -19, 30, 16,
+};
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-mdf.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-mdf.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-mdf.c	(revision 1163)
@@ -0,0 +1,741 @@
+/* Copyright (C) 2003-2007 Jean-Marc Valin
+
+   File: mdf.c
+   Echo canceller based on the MDF algorithm (see below)
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions are
+   met:
+
+   1. Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+
+   2. 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.
+
+   3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+*/
+
+/*
+   The echo canceller is based on the MDF algorithm described in:
+
+   J. S. Soo, K. K. Pang Multidelay block frequency adaptive filter, 
+   IEEE Trans. Acoust. Speech Signal Process., Vol. ASSP-38, No. 2, 
+   February 1990.
+   
+   We use the Alternatively Updated MDF (AUMDF) variant. Robustness to 
+   double-talk is achieved using a variable learning rate as described in:
+   
+   Valin, J.-M., On Adjusting the Learning Rate in Frequency Domain Echo 
+   Cancellation With Double-Talk. Submitted to IEEE Transactions on Speech 
+   and Audio Processing, 2006.
+   
+   There is no explicit double-talk detection, but a continuous variation
+   in the learning rate based on residual echo, double-talk and background
+   noise.
+   
+   About the fixed-point version:
+   All the signals are represented with 16-bit words. The filter weights 
+   are represented with 32-bit words, but only the top 16 bits are used
+   in most cases. The lower 16 bits are completely unreliable (due to the
+   fact that the update is done only on the top bits), but help in the
+   adaptation -- probably by removing a "threshold effect" due to
+   quantization (rounding going to zero) when the gradient is small.
+   
+   Another kludge that seems to work good: when performing the weight
+   update, we only move half the way toward the "goal" this seems to
+   reduce the effect of quantization noise in the update phase. This
+   can be seen as applying a gradient descent on a "soft constraint"
+   instead of having a hard constraint.
+   
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "misc.h"
+#include "speex/speex_echo.h"
+#include "fftwrap.h"
+#include "pseudofloat.h"
+#include "math_approx.h"
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+#define min(a,b) ((a)<(b) ? (a) : (b))
+#define max(a,b) ((a)>(b) ? (a) : (b))
+
+#ifdef FIXED_POINT
+#define WEIGHT_SHIFT 11
+#define NORMALIZE_SCALEDOWN 5
+#define NORMALIZE_SCALEUP 3
+#else
+#define WEIGHT_SHIFT 0
+#endif
+
+#ifdef FIXED_POINT
+static const spx_float_t MIN_LEAK = ((spx_float_t){16777, -24});
+#define TOP16(x) ((x)>>16)
+#else
+static const spx_float_t MIN_LEAK = .001f;
+#define TOP16(x) (x)
+#endif
+
+
+/** Speex echo cancellation state. */
+struct SpeexEchoState_ {
+   int frame_size;           /**< Number of samples processed each time */
+   int window_size;
+   int M;
+   int cancel_count;
+   int adapted;
+   spx_int32_t sampling_rate;
+   spx_word16_t spec_average;
+   spx_word16_t beta0;
+   spx_word16_t beta_max;
+   spx_word32_t sum_adapt;
+   spx_word16_t *e;
+   spx_word16_t *x;
+   spx_word16_t *X;
+   spx_word16_t *d;
+   spx_word16_t *y;
+   spx_word16_t *last_y;
+   spx_word32_t *Yps;
+   spx_word16_t *Y;
+   spx_word16_t *E;
+   spx_word32_t *PHI;
+   spx_word32_t *W;
+   spx_word32_t *power;
+   spx_float_t *power_1;
+   spx_word16_t *wtmp;
+#ifdef FIXED_POINT
+   spx_word16_t *wtmp2;
+#endif
+   spx_word32_t *Rf;
+   spx_word32_t *Yf;
+   spx_word32_t *Xf;
+   spx_word32_t *Eh;
+   spx_word32_t *Yh;
+   spx_float_t Pey;
+   spx_float_t Pyy;
+   spx_word16_t *window;
+   void *fft_table;
+   spx_word16_t memX, memD, memE;
+   spx_word16_t preemph;
+   spx_word16_t notch_radius;
+   spx_mem_t notch_mem[2];
+};
+
+static inline void filter_dc_notch16(spx_int16_t *in, spx_word16_t radius, spx_word16_t *out, int len, spx_mem_t *mem)
+{
+   int i;
+   spx_word16_t den2;
+#ifdef FIXED_POINT
+   den2 = MULT16_16_Q15(radius,radius) + MULT16_16_Q15(QCONST16(.7,15),MULT16_16_Q15(32767-radius,32767-radius));
+#else
+   den2 = radius*radius + .7*(1-radius)*(1-radius);
+#endif   
+   /*printf ("%d %d %d %d %d %d\n", num[0], num[1], num[2], den[0], den[1], den[2]);*/
+   for (i=0;i<len;i++)
+   {
+      spx_word16_t vin = in[i];
+      spx_word32_t vout = mem[0] + SHL32(EXTEND32(vin),15);
+#ifdef FIXED_POINT
+      mem[0] = mem[1] + SHL32(SHL32(-EXTEND32(vin),15) + MULT16_32_Q15(radius,vout),1);
+#else
+      mem[0] = mem[1] + 2*(-vin + radius*vout);
+#endif
+      mem[1] = SHL32(EXTEND32(vin),15) - MULT16_32_Q15(den2,vout);
+      out[i] = SATURATE32(PSHR32(MULT16_32_Q15(radius,vout),15),32767);
+   }
+}
+
+static inline spx_word32_t inner_prod(const spx_word16_t *x, const spx_word16_t *y, int len)
+{
+   spx_word32_t sum=0;
+   len >>= 2;
+   while(len--)
+   {
+      spx_word32_t part=0;
+      part = MAC16_16(part,*x++,*y++);
+      part = MAC16_16(part,*x++,*y++);
+      part = MAC16_16(part,*x++,*y++);
+      part = MAC16_16(part,*x++,*y++);
+      /* HINT: If you had a 40-bit accumulator, you could shift only at the end */
+      sum = ADD32(sum,SHR32(part,6));
+   }
+   return sum;
+}
+
+/** Compute power spectrum of a half-complex (packed) vector */
+static inline void power_spectrum(spx_word16_t *X, spx_word32_t *ps, int N)
+{
+   int i, j;
+   ps[0]=MULT16_16(X[0],X[0]);
+   for (i=1,j=1;i<N-1;i+=2,j++)
+   {
+      ps[j] =  MULT16_16(X[i],X[i]) + MULT16_16(X[i+1],X[i+1]);
+   }
+   ps[j]=MULT16_16(X[i],X[i]);
+}
+
+/** Compute cross-power spectrum of a half-complex (packed) vectors and add to acc */
+#ifdef FIXED_POINT
+static inline void spectral_mul_accum(spx_word16_t *X, spx_word32_t *Y, spx_word16_t *acc, int N, int M)
+{
+   int i,j;
+   spx_word32_t tmp1=0,tmp2=0;
+   for (j=0;j<M;j++)
+   {
+      tmp1 = MAC16_16(tmp1, X[j*N],TOP16(Y[j*N]));
+   }
+   acc[0] = PSHR32(tmp1,WEIGHT_SHIFT);
+   for (i=1;i<N-1;i+=2)
+   {
+      tmp1 = tmp2 = 0;
+      for (j=0;j<M;j++)
+      {
+         tmp1 = SUB32(MAC16_16(tmp1, X[j*N+i],TOP16(Y[j*N+i])), MULT16_16(X[j*N+i+1],TOP16(Y[j*N+i+1])));
+         tmp2 = MAC16_16(MAC16_16(tmp2, X[j*N+i+1],TOP16(Y[j*N+i])), X[j*N+i], TOP16(Y[j*N+i+1]));
+      }
+      acc[i] = PSHR32(tmp1,WEIGHT_SHIFT);
+      acc[i+1] = PSHR32(tmp2,WEIGHT_SHIFT);
+   }
+   tmp1 = tmp2 = 0;
+   for (j=0;j<M;j++)
+   {
+      tmp1 = MAC16_16(tmp1, X[(j+1)*N-1],TOP16(Y[(j+1)*N-1]));
+   }
+   acc[N-1] = PSHR32(tmp1,WEIGHT_SHIFT);
+}
+#else
+static inline void spectral_mul_accum(spx_word16_t *X, spx_word32_t *Y, spx_word16_t *acc, int N, int M)
+{
+   int i,j;
+   for (i=0;i<N;i++)
+      acc[i] = 0;
+   for (j=0;j<M;j++)
+   {
+      acc[0] += X[0]*Y[0];
+      for (i=1;i<N-1;i+=2)
+      {
+         acc[i] += (X[i]*Y[i] - X[i+1]*Y[i+1]);
+         acc[i+1] += (X[i+1]*Y[i] + X[i]*Y[i+1]);
+      }
+      acc[i] += X[i]*Y[i];
+      X += N;
+      Y += N;
+   }
+}
+#endif
+
+/** Compute weighted cross-power spectrum of a half-complex (packed) vector with conjugate */
+static inline void weighted_spectral_mul_conj(spx_float_t *w, spx_word16_t *X, spx_word16_t *Y, spx_word32_t *prod, int N)
+{
+   int i, j;
+   prod[0] = FLOAT_MUL32(w[0],MULT16_16(X[0],Y[0]));
+   for (i=1,j=1;i<N-1;i+=2,j++)
+   {
+      prod[i] = FLOAT_MUL32(w[j],MAC16_16(MULT16_16(X[i],Y[i]), X[i+1],Y[i+1]));
+      prod[i+1] = FLOAT_MUL32(w[j],MAC16_16(MULT16_16(-X[i+1],Y[i]), X[i],Y[i+1]));
+   }
+   prod[i] = FLOAT_MUL32(w[j],MULT16_16(X[i],Y[i]));
+}
+
+
+/** Creates a new echo canceller state */
+SpeexEchoState *speex_echo_state_init(int frame_size, int filter_length)
+{
+   int i,N,M;
+   SpeexEchoState *st = (SpeexEchoState *)speex_alloc(sizeof(SpeexEchoState));
+
+   st->frame_size = frame_size;
+   st->window_size = 2*frame_size;
+   N = st->window_size;
+   M = st->M = (filter_length+st->frame_size-1)/frame_size;
+   st->cancel_count=0;
+   st->sum_adapt = 0;
+   /* FIXME: Make that an init option (new API call?) */
+   st->sampling_rate = 8000;
+   st->spec_average = DIV32_16(SHL32(st->frame_size, 15), st->sampling_rate);
+#ifdef FIXED_POINT
+   st->beta0 = DIV32_16(SHL32(st->frame_size, 16), st->sampling_rate);
+   st->beta_max = DIV32_16(SHL32(st->frame_size, 14), st->sampling_rate);
+#else
+   st->beta0 = (2.0f*st->frame_size)/st->sampling_rate;
+   st->beta_max = (.5f*st->frame_size)/st->sampling_rate;
+#endif
+
+   st->fft_table = spx_fft_init(N);
+   
+   st->e = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->x = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->d = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->y = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->Yps = (spx_word32_t*)speex_alloc(N*sizeof(spx_word32_t));
+   st->last_y = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->Yf = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
+   st->Rf = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
+   st->Xf = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
+   st->Yh = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
+   st->Eh = (spx_word32_t*)speex_alloc((st->frame_size+1)*sizeof(spx_word32_t));
+
+   st->X = (spx_word16_t*)speex_alloc(M*N*sizeof(spx_word16_t));
+   st->Y = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->E = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->W = (spx_word32_t*)speex_alloc(M*N*sizeof(spx_word32_t));
+   st->PHI = (spx_word32_t*)speex_alloc(M*N*sizeof(spx_word32_t));
+   st->power = (spx_word32_t*)speex_alloc((frame_size+1)*sizeof(spx_word32_t));
+   st->power_1 = (spx_float_t*)speex_alloc((frame_size+1)*sizeof(spx_float_t));
+   st->window = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   st->wtmp = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+#ifdef FIXED_POINT
+   st->wtmp2 = (spx_word16_t*)speex_alloc(N*sizeof(spx_word16_t));
+   for (i=0;i<N>>1;i++)
+   {
+      st->window[i] = (16383-SHL16(spx_cos(DIV32_16(MULT16_16(25736,i<<1),N)),1));
+      st->window[N-i-1] = st->window[i];
+   }
+#else
+   for (i=0;i<N;i++)
+      st->window[i] = .5-.5*cos(2*M_PI*i/N);
+#endif
+   for (i=0;i<N*M;i++)
+   {
+      st->W[i] = st->PHI[i] = 0;
+   }
+   st->memX=st->memD=st->memE=0;
+   st->preemph = QCONST16(.9,15);
+   if (st->sampling_rate<12000)
+      st->notch_radius = QCONST16(.9, 15);
+   else if (st->sampling_rate<24000)
+      st->notch_radius = QCONST16(.982, 15);
+   else
+      st->notch_radius = QCONST16(.992, 15);
+
+   st->notch_mem[0] = st->notch_mem[1] = 0;
+   st->adapted = 0;
+   st->Pey = st->Pyy = FLOAT_ONE;
+   return st;
+}
+
+/** Resets echo canceller state */
+void speex_echo_state_reset(SpeexEchoState *st)
+{
+   int i, M, N;
+   st->cancel_count=0;
+   N = st->window_size;
+   M = st->M;
+   for (i=0;i<N*M;i++)
+   {
+      st->W[i] = 0;
+      st->X[i] = 0;
+   }
+   for (i=0;i<=st->frame_size;i++)
+      st->power[i] = 0;
+   
+   st->adapted = 0;
+   st->sum_adapt = 0;
+   st->Pey = st->Pyy = FLOAT_ONE;
+
+}
+
+/** Destroys an echo canceller state */
+void speex_echo_state_destroy(SpeexEchoState *st)
+{
+   spx_fft_destroy(st->fft_table);
+
+   speex_free(st->e);
+   speex_free(st->x);
+   speex_free(st->d);
+   speex_free(st->y);
+   speex_free(st->last_y);
+   speex_free(st->Yps);
+   speex_free(st->Yf);
+   speex_free(st->Rf);
+   speex_free(st->Xf);
+   speex_free(st->Yh);
+   speex_free(st->Eh);
+
+   speex_free(st->X);
+   speex_free(st->Y);
+   speex_free(st->E);
+   speex_free(st->W);
+   speex_free(st->PHI);
+   speex_free(st->power);
+   speex_free(st->power_1);
+   speex_free(st->window);
+   speex_free(st->wtmp);
+#ifdef FIXED_POINT
+   speex_free(st->wtmp2);
+#endif
+   speex_free(st);
+}
+
+extern int fixed_point;
+/** Performs echo cancellation on a frame */
+void speex_echo_cancel(SpeexEchoState *st, short *ref, short *echo, short *out, spx_int32_t *Yout)
+{
+   int i,j;
+   int N,M;
+   spx_word32_t Syy,See;
+   spx_word16_t leak_estimate;
+   spx_word16_t ss, ss_1;
+   spx_float_t Pey = FLOAT_ONE, Pyy=FLOAT_ONE;
+   spx_float_t alpha, alpha_1;
+   spx_word16_t RER;
+   spx_word32_t tmp32;
+   spx_word16_t M_1;
+   
+   N = st->window_size;
+   M = st->M;
+   st->cancel_count++;
+#ifdef FIXED_POINT
+   ss=DIV32_16(11469,M);
+   ss_1 = SUB16(32767,ss);
+   M_1 = DIV32_16(32767,M);
+#else
+   ss=.35/M;
+   ss_1 = 1-ss;
+   M_1 = 1.f/M;
+#endif
+
+   filter_dc_notch16(ref, st->notch_radius, st->d, st->frame_size, st->notch_mem);
+   /* Copy input data to buffer */
+   for (i=0;i<st->frame_size;i++)
+   {
+      spx_word16_t tmp;
+      st->x[i] = st->x[i+st->frame_size];
+      st->x[i+st->frame_size] = SUB16(echo[i], MULT16_16_P15(st->preemph, st->memX));
+      st->memX = echo[i];
+      
+      tmp = st->d[i];
+      st->d[i] = st->d[i+st->frame_size];
+      st->d[i+st->frame_size] = SUB16(tmp, MULT16_16_P15(st->preemph, st->memD));
+      st->memD = tmp;
+   }
+
+   /* Shift memory: this could be optimized eventually*/
+   for (i=0;i<N*(M-1);i++)
+      st->X[i]=st->X[i+N];
+
+   /* Convert x (echo input) to frequency domain */
+   spx_fft(st->fft_table, st->x, &st->X[(M-1)*N]);
+   
+   /* Compute filter response Y */
+   spectral_mul_accum(st->X, st->W, st->Y, N, M);
+   
+   spx_ifft(st->fft_table, st->Y, st->y);
+
+#if 1
+   spectral_mul_accum(st->X, st->PHI, st->Y, N, M);   
+   spx_ifft(st->fft_table, st->Y, st->e);
+#endif
+
+   /* Compute error signal (for the output with de-emphasis) */ 
+   for (i=0;i<st->frame_size;i++)
+   {
+      spx_word32_t tmp_out;
+#if 1
+      spx_word16_t y = MULT16_16_Q15(st->window[i+st->frame_size],st->e[i+st->frame_size]) + MULT16_16_Q15(st->window[i],st->y[i+st->frame_size]);
+      tmp_out = SUB32(EXTEND32(st->d[i+st->frame_size]), EXTEND32(y));
+#else
+      tmp_out = SUB32(EXTEND32(st->d[i+st->frame_size]), EXTEND32(st->y[i+st->frame_size]));
+#endif
+
+      /* Saturation */
+      if (tmp_out>32767)
+         tmp_out = 32767;
+      else if (tmp_out<-32768)
+         tmp_out = -32768;
+      tmp_out = ADD32(tmp_out, EXTEND32(MULT16_16_P15(st->preemph, st->memE)));
+      out[i] = tmp_out;
+      st->memE = tmp_out;
+   }
+
+   /* Compute error signal (filter update version) */ 
+   for (i=0;i<st->frame_size;i++)
+   {
+      st->e[i] = 0;
+      st->e[i+st->frame_size] = st->d[i+st->frame_size] - st->y[i+st->frame_size];
+   }
+
+   /* Compute a bunch of correlations */
+   See = inner_prod(st->e+st->frame_size, st->e+st->frame_size, st->frame_size);
+   See = ADD32(See, SHR32(10000,6));
+   Syy = inner_prod(st->y+st->frame_size, st->y+st->frame_size, st->frame_size);
+   
+   /* Convert error to frequency domain */
+   spx_fft(st->fft_table, st->e, st->E);
+   for (i=0;i<st->frame_size;i++)
+      st->y[i] = 0;
+   spx_fft(st->fft_table, st->y, st->Y);
+
+   /* Compute power spectrum of echo (X), error (E) and filter response (Y) */
+   power_spectrum(st->E, st->Rf, N);
+   power_spectrum(st->Y, st->Yf, N);
+   power_spectrum(&st->X[(M-1)*N], st->Xf, N);
+   
+   /* Smooth echo energy estimate over time */
+   for (j=0;j<=st->frame_size;j++)
+      st->power[j] = MULT16_32_Q15(ss_1,st->power[j]) + 1 + MULT16_32_Q15(ss,st->Xf[j]);
+   
+   /* Enable this to compute the power based only on the tail (would need to compute more 
+      efficiently to make this really useful */
+   if (0)
+   {
+      float scale2 = .5f/M;
+      for (j=0;j<=st->frame_size;j++)
+         st->power[j] = 0;
+      for (i=0;i<M;i++)
+      {
+         power_spectrum(&st->X[i*N], st->Xf, N);
+         for (j=0;j<=st->frame_size;j++)
+            st->power[j] += scale2*st->Xf[j];
+      }
+   }
+
+   /* Compute filtered spectra and (cross-)correlations */
+   for (j=st->frame_size;j>=0;j--)
+   {
+      spx_float_t Eh, Yh;
+      Eh = PSEUDOFLOAT(st->Rf[j] - st->Eh[j]);
+      Yh = PSEUDOFLOAT(st->Yf[j] - st->Yh[j]);
+      Pey = FLOAT_ADD(Pey,FLOAT_MULT(Eh,Yh));
+      Pyy = FLOAT_ADD(Pyy,FLOAT_MULT(Yh,Yh));
+#ifdef FIXED_POINT
+      st->Eh[j] = MAC16_32_Q15(MULT16_32_Q15(SUB16(32767,st->spec_average),st->Eh[j]), st->spec_average, st->Rf[j]);
+      st->Yh[j] = MAC16_32_Q15(MULT16_32_Q15(SUB16(32767,st->spec_average),st->Yh[j]), st->spec_average, st->Yf[j]);
+#else
+      st->Eh[j] = (1-st->spec_average)*st->Eh[j] + st->spec_average*st->Rf[j];
+      st->Yh[j] = (1-st->spec_average)*st->Yh[j] + st->spec_average*st->Yf[j];
+#endif
+   }
+   
+   /* Compute correlation updatete rate */
+   tmp32 = MULT16_32_Q15(st->beta0,Syy);
+   if (tmp32 > MULT16_32_Q15(st->beta_max,See))
+      tmp32 = MULT16_32_Q15(st->beta_max,See);
+   alpha = FLOAT_DIV32(tmp32, See);
+   alpha_1 = FLOAT_SUB(FLOAT_ONE, alpha);
+   /* Update correlations (recursive average) */
+   st->Pey = FLOAT_ADD(FLOAT_MULT(alpha_1,st->Pey) , FLOAT_MULT(alpha,Pey));
+   st->Pyy = FLOAT_ADD(FLOAT_MULT(alpha_1,st->Pyy) , FLOAT_MULT(alpha,Pyy));
+   if (FLOAT_LT(st->Pyy, FLOAT_ONE))
+      st->Pyy = FLOAT_ONE;
+   /* We don't really hope to get better than 33 dB (MIN_LEAK-3dB) attenuation anyway */
+   if (FLOAT_LT(st->Pey, FLOAT_MULT(MIN_LEAK,st->Pyy)))
+      st->Pey = FLOAT_MULT(MIN_LEAK,st->Pyy);
+   if (FLOAT_GT(st->Pey, st->Pyy))
+      st->Pey = st->Pyy;
+   /* leak_estimate is the limear regression result */
+   leak_estimate = FLOAT_EXTRACT16(FLOAT_SHL(FLOAT_DIVU(st->Pey, st->Pyy),14));
+   if (leak_estimate > 16383)
+      leak_estimate = 32767;
+   else
+      leak_estimate = SHL16(leak_estimate,1);
+   /*printf ("%f\n", leak_estimate);*/
+   
+   /* Compute Residual to Error Ratio */
+#ifdef FIXED_POINT
+   tmp32 = MULT16_32_Q15(leak_estimate,Syy);
+   tmp32 = ADD32(tmp32, SHL32(tmp32,1));
+   if (tmp32 > SHR32(See,1))
+      tmp32 = SHR32(See,1);
+   RER = FLOAT_EXTRACT16(FLOAT_SHL(FLOAT_DIV32(tmp32,See),15));
+#else
+   RER = 3.*MULT16_32_Q15(leak_estimate,Syy) / See;
+   if (RER > .5)
+      RER = .5;
+#endif
+
+   /* We consider that the filter has had minimal adaptation if the following is true*/
+   if (!st->adapted && st->sum_adapt > QCONST32(1,15))
+   {
+      st->adapted = 1;
+   }
+
+   if (st->adapted)
+   {
+      for (i=0;i<=st->frame_size;i++)
+      {
+         spx_word32_t r, e;
+         /* Compute frequency-domain adaptation mask */
+         r = MULT16_32_Q15(leak_estimate,SHL32(st->Yf[i],3));
+         e = SHL32(st->Rf[i],3)+1;
+#ifdef FIXED_POINT
+         if (r>SHR32(e,1))
+            r = SHR32(e,1);
+#else
+         if (r>.5*e)
+            r = .5*e;
+#endif
+         r = MULT16_32_Q15(QCONST16(.8,15),r) + MULT16_32_Q15(QCONST16(.2,15),(spx_word32_t)(MULT16_32_Q15(RER,e)));
+         /*st->power_1[i] = adapt_rate*r/(e*(1+st->power[i]));*/
+         st->power_1[i] = FLOAT_SHL(FLOAT_DIV32_FLOAT(MULT16_32_Q15(M_1,r),FLOAT_MUL32U(e,st->power[i]+10)),WEIGHT_SHIFT+16);
+      }
+   } else {
+      spx_word32_t Sxx;
+      spx_word16_t adapt_rate=0;
+
+      Sxx = inner_prod(st->x+st->frame_size, st->x+st->frame_size, st->frame_size);
+      /* Temporary adaption rate if filter is not adapted correctly */
+
+      tmp32 = MULT16_32_Q15(QCONST16(.15f, 15), Sxx);
+#ifdef FIXED_POINT
+      if (Sxx > SHR32(See,2))
+         Sxx = SHR32(See,2);
+#else
+      if (Sxx > .25*See)
+         Sxx = .25*See;      
+#endif
+      adapt_rate = FLOAT_EXTRACT16(FLOAT_SHL(FLOAT_DIV32(MULT16_32_Q15(M_1,Sxx), See),15));
+      
+      for (i=0;i<=st->frame_size;i++)
+         st->power_1[i] = FLOAT_SHL(FLOAT_DIV32(EXTEND32(adapt_rate),ADD32(st->power[i],10)),WEIGHT_SHIFT+1);
+
+
+      /* How much have we adapted so far? */
+      st->sum_adapt = ADD32(st->sum_adapt,adapt_rate);
+   }
+   /* Compute weight gradient */
+   for (j=0;j<M;j++)
+   {
+      weighted_spectral_mul_conj(st->power_1, &st->X[j*N], st->E, st->PHI+N*j, N);
+   }
+
+   /* Gradient descent */
+   for (i=0;i<M*N;i++)
+   {
+      st->W[i] += st->PHI[i];
+      /* Old value of W in PHI */
+      st->PHI[i] = st->W[i] - st->PHI[i];
+   }
+   
+   /* Update weight to prevent circular convolution (MDF / AUMDF) */
+   for (j=0;j<M;j++)
+   {
+      /* This is a variant of the Alternatively Updated MDF (AUMDF) */
+      /* Remove the "if" to make this an MDF filter */
+      if (j==M-1 || st->cancel_count%(M-1) == j)
+      {
+#ifdef FIXED_POINT
+         for (i=0;i<N;i++)
+            st->wtmp2[i] = PSHR32(st->W[j*N+i],NORMALIZE_SCALEDOWN+16);
+         spx_ifft(st->fft_table, st->wtmp2, st->wtmp);
+         for (i=0;i<st->frame_size;i++)
+         {
+            st->wtmp[i]=0;
+         }
+         for (i=st->frame_size;i<N;i++)
+         {
+            st->wtmp[i]=SHL(st->wtmp[i],NORMALIZE_SCALEUP);
+         }
+         spx_fft(st->fft_table, st->wtmp, st->wtmp2);
+         /* The "-1" in the shift is a sort of kludge that trades less efficient update speed for decrease noise */
+         for (i=0;i<N;i++)
+            st->W[j*N+i] -= SHL32(st->wtmp2[i],16+NORMALIZE_SCALEDOWN-NORMALIZE_SCALEUP-1);
+#else
+         spx_ifft(st->fft_table, &st->W[j*N], st->wtmp);
+         for (i=st->frame_size;i<N;i++)
+         {
+            st->wtmp[i]=0;
+         }
+         spx_fft(st->fft_table, st->wtmp, &st->W[j*N]);
+#endif
+      }
+   }
+
+   /* Compute spectrum of estimated echo for use in an echo post-filter (if necessary)*/
+   if (Yout)
+   {
+      spx_word16_t leak2;
+      if (st->adapted)
+      {
+         /* If the filter is adapted, take the filtered echo */
+         for (i=0;i<st->frame_size;i++)
+            st->last_y[i] = st->last_y[st->frame_size+i];
+         for (i=0;i<st->frame_size;i++)
+            st->last_y[st->frame_size+i] = ref[i]-out[i];
+      } else {
+         /* If filter isn't adapted yet, all we can do is take the echo signal directly */
+         for (i=0;i<N;i++)
+            st->last_y[i] = st->x[i];
+      }
+      
+      /* Apply hanning window (should pre-compute it)*/
+      for (i=0;i<N;i++)
+         st->y[i] = MULT16_16_Q15(st->window[i],st->last_y[i]);
+      
+      /* Compute power spectrum of the echo */
+      spx_fft(st->fft_table, st->y, st->Y);
+      power_spectrum(st->Y, st->Yps, N);
+      
+#ifdef FIXED_POINT
+      if (leak_estimate > 16383)
+         leak2 = 32767;
+      else
+         leak2 = SHL16(leak_estimate, 1);
+#else
+      if (leak_estimate>.5)
+         leak2 = 1;
+      else
+         leak2 = 2*leak_estimate;
+#endif
+      /* Estimate residual echo */
+      for (i=0;i<=st->frame_size;i++)
+         Yout[i] = MULT16_32_Q15(leak2,st->Yps[i]);
+   }
+}
+
+
+int speex_echo_ctl(SpeexEchoState *st, int request, void *ptr)
+{
+   switch(request)
+   {
+      
+      case SPEEX_ECHO_GET_FRAME_SIZE:
+         (*(int*)ptr) = st->frame_size;
+         break;
+      case SPEEX_ECHO_SET_SAMPLING_RATE:
+         st->sampling_rate = (*(int*)ptr);
+         st->spec_average = DIV32_16(SHL32(st->frame_size, 15), st->sampling_rate);
+#ifdef FIXED_POINT
+         st->beta0 = DIV32_16(SHL32(st->frame_size, 16), st->sampling_rate);
+         st->beta_max = DIV32_16(SHL32(st->frame_size, 14), st->sampling_rate);
+#else
+         st->beta0 = (2.0f*st->frame_size)/st->sampling_rate;
+         st->beta_max = (.5f*st->frame_size)/st->sampling_rate;
+#endif
+         if (st->sampling_rate<12000)
+            st->notch_radius = QCONST16(.9, 15);
+         else if (st->sampling_rate<24000)
+            st->notch_radius = QCONST16(.982, 15);
+         else
+            st->notch_radius = QCONST16(.992, 15);
+         break;
+      case SPEEX_ECHO_GET_SAMPLING_RATE:
+         (*(int*)ptr) = st->sampling_rate;
+         break;
+      default:
+         speex_warning_int("Unknown speex_echo_ctl request: ", request);
+         return -1;
+   }
+   return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-pcm_wrapper.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-pcm_wrapper.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-pcm_wrapper.c	(revision 1163)
@@ -0,0 +1,184 @@
+/* Copyright (C) 2005 Jean-Marc Valin */
+/**
+  @file pcm_wrapper.c
+  @brief PCM encoding wrapped as a Speex mode
+ */
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "speex/pcm_wrapper.h"
+#include "misc.h"
+
+
+typedef struct {
+   const SpeexMode *mode;
+   int frame_size;
+   int format;
+} PCMState;
+
+/** Initializes encoder state*/
+static void *pcm_encoder_init(const SpeexMode *m)
+{
+   PCMState *st = (PCMState*)speex_alloc(sizeof(PCMState));
+   st->mode = m;
+   st->frame_size = 64;
+   return st;
+}
+
+/** De-allocates encoder state resources*/
+static void pcm_encoder_destroy(void *state)
+{
+   speex_free(state);
+}
+
+/** Encodes one frame*/
+static int pcm_encode(void *state, void *vin, SpeexBits *bits)
+{
+   int i;
+   PCMState *st = (PCMState*)state;
+   spx_word16_t *in = vin;
+   for (i=0;i<st->frame_size;i++)
+   {
+      spx_int16_t x;
+      x = in[i];
+      speex_bits_pack(bits, x, 16);
+   }
+   return 0;
+}
+
+/** Initializes decoder state*/
+static void *pcm_decoder_init(const SpeexMode *m)
+{
+   PCMState *st = (PCMState*)speex_alloc(sizeof(PCMState));
+   st->mode = m;
+   st->frame_size = 64;
+   return st;
+}
+
+/** De-allocates decoder state resources*/
+static void pcm_decoder_destroy(void *state)
+{
+   speex_free(state);
+}
+
+/** Decodes one frame*/
+static int pcm_decode(void *state, SpeexBits *bits, void *vout)
+{
+   int i;
+   PCMState *st = (PCMState*)state;
+   spx_word16_t *out = vout;
+   for (i=0;i<st->frame_size;i++)
+   {
+      spx_int16_t x;
+      x = speex_bits_unpack_signed(bits, 16);
+      out[i] = x;
+   }
+   return 0;
+}
+
+/** ioctl-like function for controlling a narrowband encoder */
+static int pcm_encoder_ctl(void *state, int request, void *ptr)
+{
+   PCMState *st;
+   st=(PCMState*)state;
+   switch(request)
+   {
+      case PCM_SET_FRAME_SIZE:
+         st->frame_size = (*(int*)ptr);
+         break;
+      case PCM_GET_FRAME_SIZE:
+         (*(int*)ptr) = st->frame_size;
+         break;
+      default:
+         speex_warning_int("Unknown nb_ctl request: ", request);
+         return -1;
+   }
+   return 0;
+}
+
+/** ioctl-like function for controlling a narrowband decoder */
+static int pcm_decoder_ctl(void *state, int request, void *ptr)
+{
+   PCMState *st;
+   st=(PCMState*)state;
+   switch(request)
+   {
+      case PCM_SET_FRAME_SIZE:
+         st->frame_size = (*(int*)ptr);
+         break;
+      case PCM_GET_FRAME_SIZE:
+         (*(int*)ptr) = st->frame_size;
+         break;
+      default:
+         speex_warning_int("Unknown nb_ctl request: ", request);
+         return -1;
+   }
+   return 0;
+}
+
+typedef struct {
+} PCMMode;
+
+static PCMMode pcmmode;
+
+int pcm_mode_query(const void *mode, int request, void *ptr)
+{
+   /*const PCMMode *m = (const PCMMode*)mode;*/
+   
+   switch (request)
+   {
+      default:
+         speex_warning_int("Unknown nb_mode_query request: ", request);
+         return -1;
+   }
+   return 0;
+}
+/* Default mode for narrowband */
+const SpeexMode pcm_wrapper_mode = {
+   &pcmmode,
+   pcm_mode_query,
+   "PCM",
+   0,
+   4,
+   &pcm_encoder_init,
+   &pcm_encoder_destroy,
+   &pcm_encode,
+   &pcm_decoder_init,
+   &pcm_decoder_destroy,
+   &pcm_decode,
+   &pcm_encoder_ctl,
+   &pcm_decoder_ctl,
+};
+
+const SpeexMode *speex_pcm_wrapper = &pcm_wrapper_mode;
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-pcm_wrapper.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-pcm_wrapper.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-pcm_wrapper.h	(revision 1163)
@@ -0,0 +1,62 @@
+/* Copyright (C) 2005 Jean-Marc Valin */
+/**
+  @file pcm_wrapper.h
+  @brief PCM encoding wrapped as a Speex mode
+ */
+/*
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+
+*/
+
+
+#ifndef PCM_WRAPPER_H
+#define PCM_WRAPPER_H
+
+#include "speex.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define PCM_SET_FRAME_SIZE 2
+#define PCM_GET_FRAME_SIZE 3
+
+#define PCM_SET_FORMAT 2000
+#define PCM_GET_FORMAT 2001
+
+/** PCM wrapper mode */
+extern const SpeexMode *speex_pcm_wrapper;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testdenoise.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testdenoise.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testdenoise.c	(revision 1163)
@@ -0,0 +1,44 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <speex/speex_preprocess.h>
+#include <stdio.h>
+
+#define NN 160
+
+int main()
+{
+   short in[NN];
+   int i;
+   SpeexPreprocessState *st;
+   int count=0;
+   float f;
+
+   st = speex_preprocess_state_init(NN, 8000);
+   i=1;
+   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DENOISE, &i);
+   i=0;
+   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC, &i);
+   f=8000;
+   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_AGC_LEVEL, &f);
+   i=0;
+   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB, &i);
+   f=.4;
+   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_DECAY, &f);
+   f=.3;
+   speex_preprocess_ctl(st, SPEEX_PREPROCESS_SET_DEREVERB_LEVEL, &f);
+   while (1)
+   {
+      int vad;
+      fread(in, sizeof(short), NN, stdin);
+      if (feof(stdin))
+         break;
+      vad = speex_preprocess(st, in, NULL);
+      /*fprintf (stderr, "%d\n", vad);*/
+      fwrite(in, sizeof(short), NN, stdout);
+      count++;
+   }
+   speex_preprocess_state_destroy(st);
+   return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testecho.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testecho.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testecho.c	(revision 1163)
@@ -0,0 +1,53 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include "speex/speex_echo.h"
+#include "speex/speex_preprocess.h"
+
+
+#define NN 128
+#define TAIL 1024
+
+int main(int argc, char **argv)
+{
+   int echo_fd, ref_fd, e_fd;
+   spx_int32_t noise[NN+1];
+   short echo_buf[NN], ref_buf[NN], e_buf[NN];
+   SpeexEchoState *st;
+   SpeexPreprocessState *den;
+
+   if (argc != 4)
+   {
+      fprintf (stderr, "testecho mic_signal.sw speaker_signal.sw output.sw\n");
+      exit(1);
+   }
+   echo_fd = open (argv[2], O_RDONLY);
+   ref_fd  = open (argv[1],  O_RDONLY);
+   e_fd    = open (argv[3], O_WRONLY | O_CREAT | O_TRUNC, 0644);
+
+   st = speex_echo_state_init(NN, TAIL);
+   den = speex_preprocess_state_init(NN, 8000);
+   int tmp = 8000;
+   speex_echo_ctl(st, SPEEX_ECHO_SET_SAMPLING_RATE, &tmp);
+
+   while (read(ref_fd, ref_buf, NN*2))
+   {
+      read(echo_fd, echo_buf, NN*2);
+      speex_echo_cancel(st, ref_buf, echo_buf, e_buf, noise);
+      /*speex_preprocess(den, e_buf, noise);*/
+      write(e_fd, e_buf, NN*2);
+   }
+   speex_echo_state_destroy(st);
+   speex_preprocess_state_destroy(den);
+   close(e_fd);
+   close(echo_fd);
+   close(ref_fd);
+   return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testenc.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testenc.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testenc.c	(revision 1163)
@@ -0,0 +1,134 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <speex/speex.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <speex/speex_callbacks.h>
+
+#ifdef FIXED_DEBUG
+extern long long spx_mips;
+#endif
+
+#define FRAME_SIZE 160
+#include <math.h>
+int main(int argc, char **argv)
+{
+   char *inFile, *outFile, *bitsFile;
+   FILE *fin, *fout, *fbits=NULL;
+   short in_short[FRAME_SIZE];
+   short out_short[FRAME_SIZE];
+   float sigpow,errpow,snr, seg_snr=0;
+   int snr_frames = 0;
+   char cbits[200];
+   int nbBits;
+   int i;
+   void *st;
+   void *dec;
+   SpeexBits bits;
+   int tmp;
+   int bitCount=0;
+   int skip_group_delay;
+   SpeexCallback callback;
+
+   sigpow = 0;
+   errpow = 0;
+
+   st = speex_encoder_init(&speex_nb_mode);
+   dec = speex_decoder_init(&speex_nb_mode);
+
+   callback.callback_id = SPEEX_INBAND_CHAR;
+   callback.func = speex_std_char_handler;
+   callback.data = stderr;
+   speex_decoder_ctl(dec, SPEEX_SET_HANDLER, &callback);
+
+   callback.callback_id = SPEEX_INBAND_MODE_REQUEST;
+   callback.func = speex_std_mode_request_handler;
+   callback.data = st;
+   speex_decoder_ctl(dec, SPEEX_SET_HANDLER, &callback);
+
+   tmp=0;
+   speex_decoder_ctl(dec, SPEEX_SET_ENH, &tmp);
+   tmp=0;
+   speex_encoder_ctl(st, SPEEX_SET_VBR, &tmp);
+   tmp=8;
+   speex_encoder_ctl(st, SPEEX_SET_QUALITY, &tmp);
+   tmp=1;
+   speex_encoder_ctl(st, SPEEX_SET_COMPLEXITY, &tmp);
+
+   speex_mode_query(&speex_nb_mode, SPEEX_MODE_FRAME_SIZE, &tmp);
+   fprintf (stderr, "frame size: %d\n", tmp);
+   skip_group_delay = tmp / 2;
+
+   if (argc != 4 && argc != 3)
+   {
+      fprintf (stderr, "Usage: encode [in file] [out file] [bits file]\nargc = %d", argc);
+      exit(1);
+   }
+   inFile = argv[1];
+   fin = fopen(inFile, "r");
+   outFile = argv[2];
+   fout = fopen(outFile, "w+");
+   if (argc==4)
+   {
+      bitsFile = argv[3];
+      fbits = fopen(bitsFile, "w");
+   }
+   speex_bits_init(&bits);
+   while (!feof(fin))
+   {
+      fread(in_short, sizeof(short), FRAME_SIZE, fin);
+      if (feof(fin))
+         break;
+      speex_bits_reset(&bits);
+
+      speex_encode_int(st, in_short, &bits);
+      nbBits = speex_bits_write(&bits, cbits, 200);
+      bitCount+=bits.nbBits;
+
+      if (argc==4)
+         fwrite(cbits, 1, nbBits, fbits);
+      speex_bits_rewind(&bits);
+
+      speex_decode_int(dec, &bits, out_short);
+      speex_bits_reset(&bits);
+
+      fwrite(&out_short[skip_group_delay], sizeof(short), FRAME_SIZE-skip_group_delay, fout);
+      skip_group_delay = 0;
+   }
+   fprintf (stderr, "Total encoded size: %d bits\n", bitCount);
+   speex_encoder_destroy(st);
+   speex_decoder_destroy(dec);
+   speex_bits_destroy(&bits);
+
+   rewind(fin);
+   rewind(fout);
+
+   while ( FRAME_SIZE == fread(in_short, sizeof(short), FRAME_SIZE, fin) 
+           &&
+           FRAME_SIZE ==  fread(out_short, sizeof(short), FRAME_SIZE,fout) )
+   {
+	float s=0, e=0;
+        for (i=0;i<FRAME_SIZE;++i) {
+            s += (float)in_short[i] * in_short[i];
+            e += ((float)in_short[i]-out_short[i]) * ((float)in_short[i]-out_short[i]);
+        }
+	seg_snr += 10*log10((s+160)/(e+160));
+	sigpow += s;
+	errpow += e;
+	snr_frames++;
+   }
+   fclose(fin);
+   fclose(fout);
+
+   snr = 10 * log10( sigpow / errpow );
+   seg_snr /= snr_frames;
+   fprintf(stderr,"SNR = %f\nsegmental SNR = %f\n",snr, seg_snr);
+
+#ifdef FIXED_DEBUG
+   printf ("Total: %f MIPS\n", (float)(1e-6*50*spx_mips/snr_frames));
+#endif
+   
+   return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testenc_uwb.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testenc_uwb.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testenc_uwb.c	(revision 1163)
@@ -0,0 +1,136 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <speex/speex.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <speex/speex_callbacks.h>
+
+#ifdef FIXED_DEBUG
+extern long long spx_mips;
+#endif
+
+#define FRAME_SIZE 640
+#include <math.h>
+int main(int argc, char **argv)
+{
+   char *inFile, *outFile, *bitsFile;
+   FILE *fin, *fout, *fbits=NULL;
+   short in_short[FRAME_SIZE];
+   short out_short[FRAME_SIZE];
+   float in_float[FRAME_SIZE];
+   float sigpow,errpow,snr, seg_snr=0;
+   int snr_frames = 0;
+   char cbits[200];
+   int nbBits;
+   int i;
+   void *st;
+   void *dec;
+   SpeexBits bits;
+   int tmp;
+   int bitCount=0;
+   int skip_group_delay;
+   SpeexCallback callback;
+
+   sigpow = 0;
+   errpow = 0;
+
+   st = speex_encoder_init(&speex_uwb_mode);
+   dec = speex_decoder_init(&speex_uwb_mode);
+
+   callback.callback_id = SPEEX_INBAND_CHAR;
+   callback.func = speex_std_char_handler;
+   callback.data = stderr;
+   speex_decoder_ctl(dec, SPEEX_SET_HANDLER, &callback);
+
+   callback.callback_id = SPEEX_INBAND_MODE_REQUEST;
+   callback.func = speex_std_mode_request_handler;
+   callback.data = st;
+   speex_decoder_ctl(dec, SPEEX_SET_HANDLER, &callback);
+
+   tmp=0;
+   speex_decoder_ctl(dec, SPEEX_SET_ENH, &tmp);
+   tmp=0;
+   speex_encoder_ctl(st, SPEEX_SET_VBR, &tmp);
+   tmp=7;
+   speex_encoder_ctl(st, SPEEX_SET_QUALITY, &tmp);
+   tmp=1;
+   speex_encoder_ctl(st, SPEEX_SET_COMPLEXITY, &tmp);
+
+   speex_mode_query(&speex_nb_mode, SPEEX_MODE_FRAME_SIZE, &tmp);
+   fprintf (stderr, "frame size: %d\n", tmp);
+   skip_group_delay = 509;
+
+   if (argc != 4 && argc != 3)
+   {
+      fprintf (stderr, "Usage: encode [in file] [out file] [bits file]\nargc = %d", argc);
+      exit(1);
+   }
+   inFile = argv[1];
+   fin = fopen(inFile, "r");
+   outFile = argv[2];
+   fout = fopen(outFile, "w+");
+   if (argc==4)
+   {
+      bitsFile = argv[3];
+      fbits = fopen(bitsFile, "w");
+   }
+   speex_bits_init(&bits);
+   while (!feof(fin))
+   {
+      fread(in_short, sizeof(short), FRAME_SIZE, fin);
+      if (feof(fin))
+         break;
+      for (i=0;i<FRAME_SIZE;i++)
+         in_float[i]=in_short[i];
+      speex_bits_reset(&bits);
+
+      speex_encode_int(st, in_short, &bits);
+      nbBits = speex_bits_write(&bits, cbits, 200);
+      bitCount+=bits.nbBits;
+
+      if (argc==4)
+         fwrite(cbits, 1, nbBits, fbits);
+      speex_bits_rewind(&bits);
+
+      speex_decode_int(dec, &bits, out_short);
+      speex_bits_reset(&bits);
+
+      fwrite(&out_short[skip_group_delay], sizeof(short), FRAME_SIZE-skip_group_delay, fout);
+      skip_group_delay = 0;
+   }
+   fprintf (stderr, "Total encoded size: %d bits\n", bitCount);
+   speex_encoder_destroy(st);
+   speex_decoder_destroy(dec);
+
+   rewind(fin);
+   rewind(fout);
+
+   while ( FRAME_SIZE == fread(in_short, sizeof(short), FRAME_SIZE, fin) 
+           &&
+           FRAME_SIZE ==  fread(out_short, sizeof(short), FRAME_SIZE,fout) )
+   {
+	float s=0, e=0;
+        for (i=0;i<FRAME_SIZE;++i) {
+            s += (float)in_short[i] * in_short[i];
+            e += ((float)in_short[i]-out_short[i]) * ((float)in_short[i]-out_short[i]);
+        }
+	seg_snr += 10*log10((s+1)/(e+1));
+	sigpow += s;
+	errpow += e;
+	snr_frames++;
+   }
+   fclose(fin);
+   fclose(fout);
+
+   snr = 10 * log10( sigpow / errpow );
+   seg_snr /= snr_frames;
+   fprintf(stderr,"SNR = %f\nsegmental SNR = %f\n",snr, seg_snr);
+
+#ifdef FIXED_DEBUG
+   printf ("Total: %f MIPS\n", (float)(1e-6*50*spx_mips/snr_frames));
+#endif
+   
+   return 1;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testenc_wb.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testenc_wb.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-testenc_wb.c	(revision 1163)
@@ -0,0 +1,142 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <speex/speex.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <speex/speex_callbacks.h>
+
+#ifdef FIXED_DEBUG
+extern long long spx_mips;
+#endif
+
+#define FRAME_SIZE 320
+#include <math.h>
+int main(int argc, char **argv)
+{
+   char *inFile, *outFile, *bitsFile;
+   FILE *fin, *fout, *fbits=NULL;
+   short in_short[FRAME_SIZE];
+   short out_short[FRAME_SIZE];
+   float in_float[FRAME_SIZE];
+   float sigpow,errpow,snr, seg_snr=0;
+   int snr_frames = 0;
+   char cbits[200];
+   int nbBits;
+   int i;
+   void *st;
+   void *dec;
+   SpeexBits bits;
+   int tmp;
+   int bitCount=0;
+   int skip_group_delay;
+   SpeexCallback callback;
+
+   sigpow = 0;
+   errpow = 0;
+
+   st = speex_encoder_init(&speex_wb_mode);
+   dec = speex_decoder_init(&speex_wb_mode);
+
+   callback.callback_id = SPEEX_INBAND_CHAR;
+   callback.func = speex_std_char_handler;
+   callback.data = stderr;
+   speex_decoder_ctl(dec, SPEEX_SET_HANDLER, &callback);
+
+   callback.callback_id = SPEEX_INBAND_MODE_REQUEST;
+   callback.func = speex_std_mode_request_handler;
+   callback.data = st;
+   speex_decoder_ctl(dec, SPEEX_SET_HANDLER, &callback);
+
+   tmp=0;
+   speex_decoder_ctl(dec, SPEEX_SET_ENH, &tmp);
+   tmp=0;
+   speex_encoder_ctl(st, SPEEX_SET_VBR, &tmp);
+   tmp=8;
+   speex_encoder_ctl(st, SPEEX_SET_QUALITY, &tmp);
+   tmp=2;
+   speex_encoder_ctl(st, SPEEX_SET_COMPLEXITY, &tmp);
+   tmp=3;
+   speex_encoder_ctl(st, SPEEX_SET_HIGH_MODE, &tmp);
+   tmp=6;
+   speex_encoder_ctl(st, SPEEX_SET_LOW_MODE, &tmp);
+
+
+   speex_mode_query(&speex_wb_mode, SPEEX_MODE_FRAME_SIZE, &tmp);
+   fprintf (stderr, "frame size: %d\n", tmp);
+   skip_group_delay = 223;
+
+   if (argc != 4 && argc != 3)
+   {
+      fprintf (stderr, "Usage: encode [in file] [out file] [bits file]\nargc = %d", argc);
+      exit(1);
+   }
+   inFile = argv[1];
+   fin = fopen(inFile, "r");
+   outFile = argv[2];
+   fout = fopen(outFile, "w+");
+   if (argc==4)
+   {
+      bitsFile = argv[3];
+      fbits = fopen(bitsFile, "w");
+   }
+   speex_bits_init(&bits);
+   while (!feof(fin))
+   {
+      fread(in_short, sizeof(short), FRAME_SIZE, fin);
+      if (feof(fin))
+         break;
+      for (i=0;i<FRAME_SIZE;i++)
+         in_float[i]=in_short[i];
+      speex_bits_reset(&bits);
+
+      speex_encode_int(st, in_short, &bits);
+      nbBits = speex_bits_write(&bits, cbits, 200);
+      bitCount+=bits.nbBits;
+
+      if (argc==4)
+         fwrite(cbits, 1, nbBits, fbits);
+      speex_bits_rewind(&bits);
+
+      speex_decode_int(dec, &bits, out_short);
+      speex_bits_reset(&bits);
+
+      fwrite(&out_short[skip_group_delay], sizeof(short), FRAME_SIZE-skip_group_delay, fout);
+      skip_group_delay = 0;
+   }
+   fprintf (stderr, "Total encoded size: %d bits\n", bitCount);
+   speex_encoder_destroy(st);
+   speex_decoder_destroy(dec);
+   speex_bits_destroy(&bits);
+
+   rewind(fin);
+   rewind(fout);
+
+   while ( FRAME_SIZE == fread(in_short, sizeof(short), FRAME_SIZE, fin) 
+           &&
+           FRAME_SIZE ==  fread(out_short, sizeof(short), FRAME_SIZE,fout) )
+   {
+	float s=0, e=0;
+        for (i=0;i<FRAME_SIZE;++i) {
+            s += (float)in_short[i] * in_short[i];
+            e += ((float)in_short[i]-out_short[i]) * ((float)in_short[i]-out_short[i]);
+        }
+	seg_snr += 10*log10((s+160)/(e+160));
+	sigpow += s;
+	errpow += e;
+	snr_frames++;
+   }
+   fclose(fin);
+   fclose(fout);
+
+   snr = 10 * log10( sigpow / errpow );
+   seg_snr /= snr_frames;
+   fprintf(stderr,"SNR = %f\nsegmental SNR = %f\n",snr, seg_snr);
+
+#ifdef FIXED_DEBUG
+   printf ("Total: %f MIPS\n", (float)(1e-6*50*spx_mips/snr_frames));
+#endif
+   
+   return 1;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-vorbis_psy.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-vorbis_psy.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-vorbis_psy.c	(revision 1163)
@@ -0,0 +1,508 @@
+/* Copyright (C) 2005 Jean-Marc Valin, CSIRO, Christopher Montgomery
+   File: vorbis_psy.c
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef VORBIS_PSYCHO
+
+#include "misc.h"
+#include "smallft.h"
+#include "lpc.h"
+#include "vorbis_psy.h"
+
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+/* psychoacoustic setup ********************************************/
+
+static VorbisPsyInfo example_tuning = {
+  
+  .5,.5,  
+  3,3,25,
+  
+  /*63     125     250     500      1k      2k      4k      8k     16k*/
+  // vorbis mode 4 style
+  //{-32,-32,-32,-32,-28,-24,-22,-20,-20, -20, -20, -8, -6, -6, -6, -6, -6},
+  { -4, -6, -6, -6, -6, -6, -6, -6, -8, -8,-10,-10, -8, -6, -4, -4, -2},
+  
+  {
+    0, 1, 2, 3, 4, 5, 5,  5,     /* 7dB */
+    6, 6, 6, 5, 4, 4, 4,  4,     /* 15dB */
+    4, 4, 5, 5, 5, 6, 6,  6,     /* 23dB */
+    7, 7, 7, 8, 8, 8, 9, 10,     /* 31dB */
+    11,12,13,14,15,16,17, 18,     /* 39dB */
+  }
+
+};
+
+
+
+/* there was no great place to put this.... */
+#include <stdio.h>
+static void _analysis_output(char *base,int i,float *v,int n,int bark,int dB){
+  int j;
+  FILE *of;
+  char buffer[80];
+
+  sprintf(buffer,"%s_%d.m",base,i);
+  of=fopen(buffer,"w");
+  
+  if(!of)perror("failed to open data dump file");
+  
+  for(j=0;j<n;j++){
+    if(bark){
+      float b=toBARK((4000.f*j/n)+.25);
+      fprintf(of,"%f ",b);
+    }else
+      fprintf(of,"%f ",(double)j);
+    
+    if(dB){
+      float val;
+      if(v[j]==0.)
+	val=-140.;
+      else
+	val=todB(v[j]);
+      fprintf(of,"%f\n",val);
+    }else{
+      fprintf(of,"%f\n",v[j]);
+    }
+  }
+  fclose(of);
+}
+
+static void bark_noise_hybridmp(int n,const long *b,
+                                const float *f,
+                                float *noise,
+                                const float offset,
+                                const int fixed){
+  
+  float *N=alloca(n*sizeof(*N));
+  float *X=alloca(n*sizeof(*N));
+  float *XX=alloca(n*sizeof(*N));
+  float *Y=alloca(n*sizeof(*N));
+  float *XY=alloca(n*sizeof(*N));
+
+  float tN, tX, tXX, tY, tXY;
+  int i;
+
+  int lo, hi;
+  float R, A, B, D;
+  float w, x, y;
+
+  tN = tX = tXX = tY = tXY = 0.f;
+
+  y = f[0] + offset;
+  if (y < 1.f) y = 1.f;
+
+  w = y * y * .5;
+    
+  tN += w;
+  tX += w;
+  tY += w * y;
+
+  N[0] = tN;
+  X[0] = tX;
+  XX[0] = tXX;
+  Y[0] = tY;
+  XY[0] = tXY;
+
+  for (i = 1, x = 1.f; i < n; i++, x += 1.f) {
+    
+    y = f[i] + offset;
+    if (y < 1.f) y = 1.f;
+
+    w = y * y;
+    
+    tN += w;
+    tX += w * x;
+    tXX += w * x * x;
+    tY += w * y;
+    tXY += w * x * y;
+
+    N[i] = tN;
+    X[i] = tX;
+    XX[i] = tXX;
+    Y[i] = tY;
+    XY[i] = tXY;
+  }
+  
+  for (i = 0, x = 0.f;; i++, x += 1.f) {
+    
+    lo = b[i] >> 16;
+    if( lo>=0 ) break;
+    hi = b[i] & 0xffff;
+    
+    tN = N[hi] + N[-lo];
+    tX = X[hi] - X[-lo];
+    tXX = XX[hi] + XX[-lo];
+    tY = Y[hi] + Y[-lo];    
+    tXY = XY[hi] - XY[-lo];
+    
+    A = tY * tXX - tX * tXY;
+    B = tN * tXY - tX * tY;
+    D = tN * tXX - tX * tX;
+    R = (A + x * B) / D;
+    if (R < 0.f)
+      R = 0.f;
+    
+    noise[i] = R - offset;
+  }
+  
+  for ( ;; i++, x += 1.f) {
+    
+    lo = b[i] >> 16;
+    hi = b[i] & 0xffff;
+    if(hi>=n)break;
+    
+    tN = N[hi] - N[lo];
+    tX = X[hi] - X[lo];
+    tXX = XX[hi] - XX[lo];
+    tY = Y[hi] - Y[lo];
+    tXY = XY[hi] - XY[lo];
+    
+    A = tY * tXX - tX * tXY;
+    B = tN * tXY - tX * tY;
+    D = tN * tXX - tX * tX;
+    R = (A + x * B) / D;
+    if (R < 0.f) R = 0.f;
+    
+    noise[i] = R - offset;
+  }
+  for ( ; i < n; i++, x += 1.f) {
+    
+    R = (A + x * B) / D;
+    if (R < 0.f) R = 0.f;
+    
+    noise[i] = R - offset;
+  }
+  
+  if (fixed <= 0) return;
+  
+  for (i = 0, x = 0.f;; i++, x += 1.f) {
+    hi = i + fixed / 2;
+    lo = hi - fixed;
+    if(lo>=0)break;
+
+    tN = N[hi] + N[-lo];
+    tX = X[hi] - X[-lo];
+    tXX = XX[hi] + XX[-lo];
+    tY = Y[hi] + Y[-lo];
+    tXY = XY[hi] - XY[-lo];
+    
+    
+    A = tY * tXX - tX * tXY;
+    B = tN * tXY - tX * tY;
+    D = tN * tXX - tX * tX;
+    R = (A + x * B) / D;
+
+    if (R - offset < noise[i]) noise[i] = R - offset;
+  }
+  for ( ;; i++, x += 1.f) {
+    
+    hi = i + fixed / 2;
+    lo = hi - fixed;
+    if(hi>=n)break;
+    
+    tN = N[hi] - N[lo];
+    tX = X[hi] - X[lo];
+    tXX = XX[hi] - XX[lo];
+    tY = Y[hi] - Y[lo];
+    tXY = XY[hi] - XY[lo];
+    
+    A = tY * tXX - tX * tXY;
+    B = tN * tXY - tX * tY;
+    D = tN * tXX - tX * tX;
+    R = (A + x * B) / D;
+    
+    if (R - offset < noise[i]) noise[i] = R - offset;
+  }
+  for ( ; i < n; i++, x += 1.f) {
+    R = (A + x * B) / D;
+    if (R - offset < noise[i]) noise[i] = R - offset;
+  }
+}
+
+static void _vp_noisemask(VorbisPsy *p,
+			  float *logfreq, 
+			  float *logmask){
+
+  int i,n=p->n/2;
+  float *work=alloca(n*sizeof(*work));
+
+  bark_noise_hybridmp(n,p->bark,logfreq,logmask,
+		      140.,-1);
+
+  for(i=0;i<n;i++)work[i]=logfreq[i]-logmask[i];
+
+  bark_noise_hybridmp(n,p->bark,work,logmask,0.,
+		      p->vi->noisewindowfixed);
+
+  for(i=0;i<n;i++)work[i]=logfreq[i]-work[i];
+  
+  {
+    static int seq=0;
+    
+    float work2[n];
+    for(i=0;i<n;i++){
+      work2[i]=logmask[i]+work[i];
+    }
+    
+    //_analysis_output("logfreq",seq,logfreq,n,0,0);
+    //_analysis_output("median",seq,work,n,0,0);
+    //_analysis_output("envelope",seq,work2,n,0,0);
+    seq++;
+  }
+
+  for(i=0;i<n;i++){
+    int dB=logmask[i]+.5;
+    if(dB>=NOISE_COMPAND_LEVELS)dB=NOISE_COMPAND_LEVELS-1;
+    if(dB<0)dB=0;
+    logmask[i]= work[i]+p->vi->noisecompand[dB]+p->noiseoffset[i];
+  }
+
+}
+
+VorbisPsy *vorbis_psy_init(int rate, int n)
+{
+  long i,j,lo=-99,hi=1;
+  VorbisPsy *p = speex_alloc(sizeof(VorbisPsy));
+  memset(p,0,sizeof(*p));
+  
+  p->n = n;
+  spx_drft_init(&p->lookup, n);
+  p->bark = speex_alloc(n*sizeof(*p->bark));
+  p->rate=rate;
+  p->vi = &example_tuning;
+
+  /* BH4 window */
+  p->window = speex_alloc(sizeof(*p->window)*n);
+  float a0 = .35875f;
+  float a1 = .48829f;
+  float a2 = .14128f;
+  float a3 = .01168f;
+  for(i=0;i<n;i++)
+    p->window[i] = //a0 - a1*cos(2.*M_PI/n*(i+.5)) + a2*cos(4.*M_PI/n*(i+.5)) - a3*cos(6.*M_PI/n*(i+.5));
+      sin((i+.5)/n * M_PI)*sin((i+.5)/n * M_PI);
+  /* bark scale lookups */
+  for(i=0;i<n;i++){
+    float bark=toBARK(rate/(2*n)*i); 
+    
+    for(;lo+p->vi->noisewindowlomin<i && 
+	  toBARK(rate/(2*n)*lo)<(bark-p->vi->noisewindowlo);lo++);
+    
+    for(;hi<=n && (hi<i+p->vi->noisewindowhimin ||
+	  toBARK(rate/(2*n)*hi)<(bark+p->vi->noisewindowhi));hi++);
+    
+    p->bark[i]=((lo-1)<<16)+(hi-1);
+
+  }
+
+  /* set up rolling noise median */
+  p->noiseoffset=speex_alloc(n*sizeof(*p->noiseoffset));
+  
+  for(i=0;i<n;i++){
+    float halfoc=toOC((i+.5)*rate/(2.*n))*2.;
+    int inthalfoc;
+    float del;
+    
+    if(halfoc<0)halfoc=0;
+    if(halfoc>=P_BANDS-1)halfoc=P_BANDS-1;
+    inthalfoc=(int)halfoc;
+    del=halfoc-inthalfoc;
+    
+    p->noiseoffset[i]=
+      p->vi->noiseoff[inthalfoc]*(1.-del) + 
+      p->vi->noiseoff[inthalfoc+1]*del;
+    
+  }
+#if 0
+  _analysis_output_always("noiseoff0",ls,p->noiseoffset,n,1,0,0);
+#endif
+
+   return p;
+}
+
+void vorbis_psy_destroy(VorbisPsy *p)
+{
+  if(p){
+    spx_drft_clear(&p->lookup);
+    if(p->bark)
+      speex_free(p->bark);
+    if(p->noiseoffset)
+      speex_free(p->noiseoffset);
+    if(p->window)
+      speex_free(p->window);
+    memset(p,0,sizeof(*p));
+    speex_free(p);
+  }
+}
+
+void compute_curve(VorbisPsy *psy, float *audio, float *curve)
+{
+   int i;
+   float work[psy->n];
+
+   float scale=4.f/psy->n;
+   float scale_dB;
+
+   scale_dB=todB(scale);
+  
+   /* window the PCM data; use a BH4 window, not vorbis */
+   for(i=0;i<psy->n;i++)
+     work[i]=audio[i] * psy->window[i];
+
+   {
+     static int seq=0;
+     
+     //_analysis_output("win",seq,work,psy->n,0,0);
+
+     seq++;
+   }
+
+    /* FFT yields more accurate tonal estimation (not phase sensitive) */
+    spx_drft_forward(&psy->lookup,work);
+
+    /* magnitudes */
+    work[0]=scale_dB+todB(work[0]);
+    for(i=1;i<psy->n-1;i+=2){
+      float temp = work[i]*work[i] + work[i+1]*work[i+1];
+      work[(i+1)>>1] = scale_dB+.5f * todB(temp);
+    }
+
+    /* derive a noise curve */
+    _vp_noisemask(psy,work,curve);
+#define SIDEL 12
+    for (i=0;i<SIDEL;i++)
+    {
+       curve[i]=curve[SIDEL];
+    }
+#define SIDEH 12
+    for (i=0;i<SIDEH;i++)
+    {
+       curve[(psy->n>>1)-i-1]=curve[(psy->n>>1)-SIDEH];
+    }
+    for(i=0;i<((psy->n)>>1);i++)
+       curve[i] = fromdB(1.2*curve[i]+.2*i);
+       //curve[i] = fromdB(0.8*curve[i]+.35*i);
+       //curve[i] = fromdB(0.9*curve[i])*pow(1.0*i+45,1.3);
+}
+
+/* Transform a masking curve (power spectrum) into a pole-zero filter */
+void curve_to_lpc(VorbisPsy *psy, float *curve, float *awk1, float *awk2, int ord)
+{
+   int i;
+   float ac[psy->n];
+   float tmp;
+   int len = psy->n >> 1;
+   for (i=0;i<2*len;i++)
+      ac[i] = 0;
+   for (i=1;i<len;i++)
+      ac[2*i-1] = curve[i];
+   ac[0] = curve[0];
+   ac[2*len-1] = curve[len-1];
+   
+   spx_drft_backward(&psy->lookup, ac);
+   _spx_lpc(awk1, ac, ord);
+   tmp = 1.;
+   for (i=0;i<ord;i++)
+   {
+      tmp *= .99;
+      awk1[i] *= tmp;
+   }
+#if 0
+   for (i=0;i<ord;i++)
+      awk2[i] = 0;
+#else
+   /* Use the second (awk2) filter to correct the first one */
+   for (i=0;i<2*len;i++)
+      ac[i] = 0;   
+   for (i=0;i<ord;i++)
+      ac[i+1] = awk1[i];
+   ac[0] = 1;
+   spx_drft_forward(&psy->lookup, ac);
+   /* Compute (power) response of awk1 (all zero) */
+   ac[0] *= ac[0];
+   for (i=1;i<len;i++)
+      ac[i] = ac[2*i-1]*ac[2*i-1] + ac[2*i]*ac[2*i];
+   ac[len] = ac[2*len-1]*ac[2*len-1];
+   /* Compute correction required */
+   for (i=0;i<len;i++)
+      curve[i] = 1. / (1e-6f+curve[i]*ac[i]);
+
+   for (i=0;i<2*len;i++)
+      ac[i] = 0;
+   for (i=1;i<len;i++)
+      ac[2*i-1] = curve[i];
+   ac[0] = curve[0];
+   ac[2*len-1] = curve[len-1];
+   
+   spx_drft_backward(&psy->lookup, ac);
+   _spx_lpc(awk2, ac, ord);
+   tmp = 1;
+   for (i=0;i<ord;i++)
+   {
+      tmp *= .99;
+      awk2[i] *= tmp;
+   }
+#endif
+}
+
+#if 0
+#include <stdio.h>
+#include <math.h>
+
+#define ORDER 10
+#define CURVE_SIZE 24
+
+int main()
+{
+   int i;
+   float curve[CURVE_SIZE];
+   float awk1[ORDER], awk2[ORDER];
+   for (i=0;i<CURVE_SIZE;i++)
+      scanf("%f ", &curve[i]);
+   for (i=0;i<CURVE_SIZE;i++)
+      curve[i] = pow(10.f, .1*curve[i]);
+   curve_to_lpc(curve, CURVE_SIZE, awk1, awk2, ORDER);
+   for (i=0;i<ORDER;i++)
+      printf("%f ", awk1[i]);
+   printf ("\n");
+   for (i=0;i<ORDER;i++)
+      printf("%f ", awk2[i]);
+   printf ("\n");
+   return 0;
+}
+#endif
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-vorbis_psy.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-vorbis_psy.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex/z-vorbis_psy.h	(revision 1163)
@@ -0,0 +1,97 @@
+/* Copyright (C) 2005 Jean-Marc Valin, CSIRO, Christopher Montgomery
+   File: vorbis_psy.h
+
+   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 Xiph.org Foundation 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 FOUNDATION 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.
+*/
+
+#ifndef VORBIS_PSY_H
+#define VORBIS_PSY_H
+
+#ifdef VORBIS_PSYCHO
+
+#include "smallft.h"
+#define P_BANDS 17      /* 62Hz to 16kHz */
+#define NOISE_COMPAND_LEVELS 40
+
+
+#define todB(x)   ((x)==0?-400.f:log((x)*(x))*4.34294480f)
+#define fromdB(x) (exp((x)*.11512925f))  
+
+/* The bark scale equations are approximations, since the original
+   table was somewhat hand rolled.  The below are chosen to have the
+   best possible fit to the rolled tables, thus their somewhat odd
+   appearance (these are more accurate and over a longer range than
+   the oft-quoted bark equations found in the texts I have).  The
+   approximations are valid from 0 - 30kHz (nyquist) or so.
+
+   all f in Hz, z in Bark */
+
+#define toBARK(n)   (13.1f*atan(.00074f*(n))+2.24f*atan((n)*(n)*1.85e-8f)+1e-4f*(n))
+#define fromBARK(z) (102.f*(z)-2.f*pow(z,2.f)+.4f*pow(z,3.f)+pow(1.46f,z)-1.f)
+
+/* Frequency to octave.  We arbitrarily declare 63.5 Hz to be octave
+   0.0 */
+
+#define toOC(n)     (log(n)*1.442695f-5.965784f)
+#define fromOC(o)   (exp(((o)+5.965784f)*.693147f))
+
+
+typedef struct {
+
+  float noisewindowlo;
+  float noisewindowhi;
+  int   noisewindowlomin;
+  int   noisewindowhimin;
+  int   noisewindowfixed;
+  float noiseoff[P_BANDS];
+  float noisecompand[NOISE_COMPAND_LEVELS];
+
+} VorbisPsyInfo;
+
+
+
+typedef struct {
+  int n;
+  int rate;
+  struct drft_lookup lookup;
+  VorbisPsyInfo *vi;
+
+  float *window;
+  float *noiseoffset;
+  long  *bark;
+
+} VorbisPsy;
+
+
+VorbisPsy *vorbis_psy_init(int rate, int size);
+void vorbis_psy_destroy(VorbisPsy *psy);
+void compute_curve(VorbisPsy *psy, float *audio, float *curve);
+void curve_to_lpc(VorbisPsy *psy, float *curve, float *awk1, float *awk2, int ord);
+
+#endif
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex_codec.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex_codec.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia-codec/speex_codec.c	(revision 1163)
@@ -0,0 +1,825 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 <pjmedia-codec/speex.h>
+#include <pjmedia/codec.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/endpoint.h>
+#include <pjmedia/port.h>
+#include <speex/speex.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/os.h>
+
+/*
+ * Only build this file if PJMEDIA_HAS_SPEEX_CODEC != 0
+ */
+#if defined(PJMEDIA_HAS_SPEEX_CODEC) && PJMEDIA_HAS_SPEEX_CODEC!=0
+
+
+#define THIS_FILE   "speex_codec.c"
+
+#define DEFAULT_QUALITY	    10
+#define DEFAULT_COMPLEXITY  10
+
+/* Prototypes for Speex factory */
+static pj_status_t spx_test_alloc( pjmedia_codec_factory *factory, 
+				   const pjmedia_codec_info *id );
+static pj_status_t spx_default_attr( pjmedia_codec_factory *factory, 
+				     const pjmedia_codec_info *id, 
+				     pjmedia_codec_param *attr );
+static pj_status_t spx_enum_codecs( pjmedia_codec_factory *factory, 
+				    unsigned *count, 
+				    pjmedia_codec_info codecs[]);
+static pj_status_t spx_alloc_codec( pjmedia_codec_factory *factory, 
+				    const pjmedia_codec_info *id, 
+				    pjmedia_codec **p_codec);
+static pj_status_t spx_dealloc_codec( pjmedia_codec_factory *factory, 
+				      pjmedia_codec *codec );
+
+/* Prototypes for Speex implementation. */
+static pj_status_t  spx_codec_init( pjmedia_codec *codec, 
+				    pj_pool_t *pool );
+static pj_status_t  spx_codec_open( pjmedia_codec *codec, 
+				    pjmedia_codec_param *attr );
+static pj_status_t  spx_codec_close( pjmedia_codec *codec );
+static pj_status_t  spx_codec_modify(pjmedia_codec *codec, 
+				     const pjmedia_codec_param *attr );
+static pj_status_t  spx_codec_parse( pjmedia_codec *codec,
+				     void *pkt,
+				     pj_size_t pkt_size,
+				     const pj_timestamp *ts,
+				     unsigned *frame_cnt,
+				     pjmedia_frame frames[]);
+static pj_status_t  spx_codec_encode( pjmedia_codec *codec, 
+				      const struct pjmedia_frame *input,
+				      unsigned output_buf_len, 
+				      struct pjmedia_frame *output);
+static pj_status_t  spx_codec_decode( pjmedia_codec *codec, 
+				      const struct pjmedia_frame *input,
+				      unsigned output_buf_len, 
+				      struct pjmedia_frame *output);
+static pj_status_t  spx_codec_recover(pjmedia_codec *codec, 
+				      unsigned output_buf_len, 
+				      struct pjmedia_frame *output);
+
+/* Definition for Speex codec operations. */
+static pjmedia_codec_op spx_op = 
+{
+    &spx_codec_init,
+    &spx_codec_open,
+    &spx_codec_close,
+    &spx_codec_modify,
+    &spx_codec_parse,
+    &spx_codec_encode,
+    &spx_codec_decode,
+    &spx_codec_recover
+};
+
+/* Definition for Speex codec factory operations. */
+static pjmedia_codec_factory_op spx_factory_op =
+{
+    &spx_test_alloc,
+    &spx_default_attr,
+    &spx_enum_codecs,
+    &spx_alloc_codec,
+    &spx_dealloc_codec
+};
+
+/* Index to Speex parameter. */
+enum
+{
+    PARAM_NB,	/* Index for narrowband parameter.	*/
+    PARAM_WB,	/* Index for wideband parameter.	*/
+    PARAM_UWB,	/* Index for ultra-wideband parameter	*/
+};
+
+/* Speex default parameter */
+struct speex_param
+{
+    int		     enabled;		/* Is this mode enabled?	    */
+    const SpeexMode *mode;		/* Speex mode.			    */
+    int		     pt;		/* Payload type.		    */
+    unsigned	     clock_rate;	/* Default sampling rate to be used.*/
+    int		     quality;		/* Default encoder quality.	    */
+    int		     complexity;	/* Default encoder complexity.	    */
+    int		     samples_per_frame;	/* Samples per frame.		    */
+    int		     framesize;		/* Frame size for current mode.	    */
+    int		     bitrate;		/* Bit rate for current mode.	    */
+};
+
+/* Speex factory */
+static struct spx_factory
+{
+    pjmedia_codec_factory    base;
+    pjmedia_endpt	    *endpt;
+    pj_pool_t		    *pool;
+    pj_mutex_t		    *mutex;
+    pjmedia_codec	     codec_list;
+    struct speex_param	     speex_param[3];
+
+} spx_factory;
+
+/* Speex codec private data. */
+struct spx_private
+{
+    int			 param_id;	    /**< Index to speex param.	*/
+
+    void		*enc;		    /**< Encoder state.		*/
+    SpeexBits		 enc_bits;	    /**< Encoder bits.		*/
+    void		*dec;		    /**< Decoder state.		*/
+    SpeexBits		 dec_bits;	    /**< Decoder bits.		*/
+};
+
+
+/*
+ * Get codec bitrate and frame size.
+ */
+static pj_status_t get_speex_info( struct speex_param *p )
+{
+    void *state;
+    int tmp;
+
+    /* Create temporary encoder */
+    state = speex_encoder_init(p->mode);
+    if (!state)
+	return PJMEDIA_CODEC_EFAILED;
+
+    /* Set the quality */
+    if (p->quality != -1)
+	speex_encoder_ctl(state, SPEEX_SET_QUALITY, &p->quality);
+
+    /* Sampling rate. */
+    speex_encoder_ctl(state, SPEEX_SET_SAMPLING_RATE, &p->clock_rate);
+
+    /* VAD off to have max bitrate */
+    tmp = 0;
+    speex_encoder_ctl(state, SPEEX_SET_VAD, &tmp);
+
+    /* Complexity. */
+    if (p->complexity != -1)
+	speex_encoder_ctl(state, SPEEX_SET_COMPLEXITY, &p->complexity);
+
+    /* Now get the frame size */
+    speex_encoder_ctl(state, SPEEX_GET_FRAME_SIZE, &p->samples_per_frame);
+
+    /* Now get the the averate bitrate */
+    speex_encoder_ctl(state, SPEEX_GET_BITRATE, &p->bitrate);
+
+    /* Calculate framesize. */
+    p->framesize = p->bitrate * 20 / 1000;
+
+    /* Destroy encoder. */
+    speex_encoder_destroy(state);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Initialize and register Speex codec factory to pjmedia endpoint.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_speex_init( pjmedia_endpt *endpt,
+					      unsigned options,
+					      int quality,
+					      int complexity )
+{
+    pjmedia_codec_mgr *codec_mgr;
+    unsigned i;
+    pj_status_t status;
+
+    if (spx_factory.pool != NULL) {
+	/* Already initialized. */
+	return PJ_SUCCESS;
+    }
+
+    /* Get defaults */
+    if (quality <= 0) quality = DEFAULT_QUALITY;
+    if (complexity <= 0) complexity = DEFAULT_COMPLEXITY;
+
+    /* Create Speex codec factory. */
+    spx_factory.base.op = &spx_factory_op;
+    spx_factory.base.factory_data = NULL;
+    spx_factory.endpt = endpt;
+
+    spx_factory.pool = pjmedia_endpt_create_pool(endpt, "speex", 
+						       4000, 4000);
+    if (!spx_factory.pool)
+	return PJ_ENOMEM;
+
+    pj_list_init(&spx_factory.codec_list);
+
+    /* Create mutex. */
+    status = pj_mutex_create_simple(spx_factory.pool, "speex", 
+				    &spx_factory.mutex);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Initialize default Speex parameter. */
+    spx_factory.speex_param[PARAM_NB].enabled = 
+	((options & PJMEDIA_SPEEX_NO_NB) == 0);
+    spx_factory.speex_param[PARAM_NB].pt = PJMEDIA_RTP_PT_SPEEX_NB;
+    spx_factory.speex_param[PARAM_NB].mode = &speex_nb_mode;
+    spx_factory.speex_param[PARAM_NB].clock_rate = 8000;
+    spx_factory.speex_param[PARAM_NB].quality = quality;
+    spx_factory.speex_param[PARAM_NB].complexity = complexity;
+
+    spx_factory.speex_param[PARAM_WB].enabled = 
+	((options & PJMEDIA_SPEEX_NO_WB) == 0);
+    spx_factory.speex_param[PARAM_WB].pt = PJMEDIA_RTP_PT_SPEEX_WB;
+    spx_factory.speex_param[PARAM_WB].mode = &speex_wb_mode;
+    spx_factory.speex_param[PARAM_WB].clock_rate = 16000;
+    spx_factory.speex_param[PARAM_WB].quality = quality;
+    spx_factory.speex_param[PARAM_WB].complexity = complexity;
+
+    spx_factory.speex_param[PARAM_UWB].enabled = 
+	((options & PJMEDIA_SPEEX_NO_UWB) == 0);
+    spx_factory.speex_param[PARAM_UWB].pt = PJMEDIA_RTP_PT_SPEEX_UWB;
+    spx_factory.speex_param[PARAM_UWB].mode = &speex_uwb_mode;
+    spx_factory.speex_param[PARAM_UWB].clock_rate = 32000;
+    spx_factory.speex_param[PARAM_UWB].quality = quality;
+    spx_factory.speex_param[PARAM_UWB].complexity = complexity;
+
+    /* Somehow quality <=4 is broken in linux. */
+    if (quality <= 4 && quality >= 0) {
+	PJ_LOG(5,(THIS_FILE, "Adjusting quality to 5 for uwb"));
+	spx_factory.speex_param[PARAM_UWB].quality = 5;
+    }
+
+    /* Get codec framesize and avg bitrate for each mode. */
+    for (i=0; i<PJ_ARRAY_SIZE(spx_factory.speex_param); ++i) {
+	status = get_speex_info(&spx_factory.speex_param[i]);
+    }
+
+    /* Get the codec manager. */
+    codec_mgr = pjmedia_endpt_get_codec_mgr(endpt);
+    if (!codec_mgr) {
+	status = PJ_EINVALIDOP;
+	goto on_error;
+    }
+
+    /* Register codec factory to endpoint. */
+    status = pjmedia_codec_mgr_register_factory(codec_mgr, 
+						&spx_factory.base);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Done. */
+    return PJ_SUCCESS;
+
+on_error:
+    pj_pool_release(spx_factory.pool);
+    spx_factory.pool = NULL;
+    return status;
+}
+
+
+/*
+ * Initialize with default settings.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_speex_init_default(pjmedia_endpt *endpt)
+{
+    return pjmedia_codec_speex_init(endpt, 0, -1, -1);
+}
+
+/*
+ * Unregister Speex codec factory from pjmedia endpoint and deinitialize
+ * the Speex codec library.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_speex_deinit(void)
+{
+    pjmedia_codec_mgr *codec_mgr;
+    pj_status_t status;
+
+    if (spx_factory.pool == NULL) {
+	/* Already deinitialized */
+	return PJ_SUCCESS;
+    }
+
+    pj_mutex_lock(spx_factory.mutex);
+
+    /* We don't want to deinit if there's outstanding codec. */
+    /* This is silly, as we'll always have codec in the list if
+       we ever allocate a codec! A better behavior maybe is to 
+       deallocate all codecs in the list.
+    if (!pj_list_empty(&spx_factory.codec_list)) {
+	pj_mutex_unlock(spx_factory.mutex);
+	return PJ_EBUSY;
+    }
+    */
+
+    /* Get the codec manager. */
+    codec_mgr = pjmedia_endpt_get_codec_mgr(spx_factory.endpt);
+    if (!codec_mgr) {
+	pj_pool_release(spx_factory.pool);
+	spx_factory.pool = NULL;
+	return PJ_EINVALIDOP;
+    }
+
+    /* Unregister Speex codec factory. */
+    status = pjmedia_codec_mgr_unregister_factory(codec_mgr,
+						  &spx_factory.base);
+    
+    /* Destroy mutex. */
+    pj_mutex_destroy(spx_factory.mutex);
+
+    /* Destroy pool. */
+    pj_pool_release(spx_factory.pool);
+    spx_factory.pool = NULL;
+
+    return status;
+}
+
+/* 
+ * Check if factory can allocate the specified codec. 
+ */
+static pj_status_t spx_test_alloc( pjmedia_codec_factory *factory, 
+				   const pjmedia_codec_info *info )
+{
+    const pj_str_t speex_tag = { "speex", 5};
+    unsigned i;
+
+    PJ_UNUSED_ARG(factory);
+
+    /* Type MUST be audio. */
+    if (info->type != PJMEDIA_TYPE_AUDIO)
+	return PJMEDIA_CODEC_EUNSUP;
+
+    /* Check encoding name. */
+    if (pj_stricmp(&info->encoding_name, &speex_tag) != 0)
+	return PJMEDIA_CODEC_EUNSUP;
+
+    /* Check clock-rate */
+    for (i=0; i<PJ_ARRAY_SIZE(spx_factory.speex_param); ++i) {
+	if (info->clock_rate == spx_factory.speex_param[i].clock_rate) {
+	    /* Okay, let's Speex! */
+	    return PJ_SUCCESS;
+	}
+    }
+
+    
+    /* Unsupported, or mode is disabled. */
+    return PJMEDIA_CODEC_EUNSUP;
+}
+
+/*
+ * Generate default attribute.
+ */
+static pj_status_t spx_default_attr (pjmedia_codec_factory *factory, 
+				      const pjmedia_codec_info *id, 
+				      pjmedia_codec_param *attr )
+{
+
+    PJ_ASSERT_RETURN(factory==&spx_factory.base, PJ_EINVAL);
+
+    pj_bzero(attr, sizeof(pjmedia_codec_param));
+    attr->info.pt = (pj_uint8_t)id->pt;
+    attr->info.channel_cnt = 1;
+
+    if (id->clock_rate <= 8000) {
+	attr->info.clock_rate = spx_factory.speex_param[PARAM_NB].clock_rate;
+	attr->info.avg_bps = spx_factory.speex_param[PARAM_NB].bitrate;
+
+    } else if (id->clock_rate <= 16000) {
+	attr->info.clock_rate = spx_factory.speex_param[PARAM_WB].clock_rate;
+	attr->info.avg_bps = spx_factory.speex_param[PARAM_WB].bitrate;
+
+    } else {
+	/* Wow.. somebody is doing ultra-wideband. Cool...! */
+	attr->info.clock_rate = spx_factory.speex_param[PARAM_UWB].clock_rate;
+	attr->info.avg_bps = spx_factory.speex_param[PARAM_UWB].bitrate;
+    }
+
+    attr->info.pcm_bits_per_sample = 16;
+    attr->info.frm_ptime = 20;
+    attr->info.pt = (pj_uint8_t)id->pt;
+
+    attr->setting.frm_per_pkt = 1;
+
+    /* Default flags. */
+    attr->setting.cng = 1;
+    attr->setting.plc = 1;
+    attr->setting.penh =1 ;
+    attr->setting.vad = 1;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Enum codecs supported by this factory (i.e. only Speex!).
+ */
+static pj_status_t spx_enum_codecs(pjmedia_codec_factory *factory, 
+				    unsigned *count, 
+				    pjmedia_codec_info codecs[])
+{
+    unsigned max;
+    int i;  /* Must be signed */
+
+    PJ_UNUSED_ARG(factory);
+    PJ_ASSERT_RETURN(codecs && *count > 0, PJ_EINVAL);
+
+    max = *count;
+    *count = 0;
+
+    /*
+     * We return three codecs here, and in this order:
+     *	- ultra-wideband, wideband, and narrowband.
+     */
+    for (i=PJ_ARRAY_SIZE(spx_factory.speex_param)-1; i>=0 && *count<max; --i) {
+
+	if (!spx_factory.speex_param[i].enabled)
+	    continue;
+
+	pj_bzero(&codecs[*count], sizeof(pjmedia_codec_info));
+	codecs[*count].encoding_name = pj_str("speex");
+	codecs[*count].pt = spx_factory.speex_param[i].pt;
+	codecs[*count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[*count].clock_rate = spx_factory.speex_param[i].clock_rate;
+	codecs[*count].channel_cnt = 1;
+
+	++*count;
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Allocate a new Speex codec instance.
+ */
+static pj_status_t spx_alloc_codec( pjmedia_codec_factory *factory, 
+				    const pjmedia_codec_info *id,
+				    pjmedia_codec **p_codec)
+{
+    pjmedia_codec *codec;
+    struct spx_private *spx;
+
+    PJ_ASSERT_RETURN(factory && id && p_codec, PJ_EINVAL);
+    PJ_ASSERT_RETURN(factory == &spx_factory.base, PJ_EINVAL);
+
+
+    pj_mutex_lock(spx_factory.mutex);
+
+    /* Get free nodes, if any. */
+    if (!pj_list_empty(&spx_factory.codec_list)) {
+	codec = spx_factory.codec_list.next;
+	pj_list_erase(codec);
+    } else {
+	codec = pj_pool_zalloc(spx_factory.pool, 
+			       sizeof(pjmedia_codec));
+	PJ_ASSERT_RETURN(codec != NULL, PJ_ENOMEM);
+	codec->op = &spx_op;
+	codec->factory = factory;
+	codec->codec_data = pj_pool_alloc(spx_factory.pool,
+					  sizeof(struct spx_private));
+    }
+
+    pj_mutex_unlock(spx_factory.mutex);
+
+    spx = (struct spx_private*) codec->codec_data;
+    spx->enc = NULL;
+    spx->dec = NULL;
+
+    if (id->clock_rate <= 8000)
+	spx->param_id = PARAM_NB;
+    else if (id->clock_rate <= 16000)
+	spx->param_id = PARAM_WB;
+    else
+	spx->param_id = PARAM_UWB;
+
+    *p_codec = codec;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Free codec.
+ */
+static pj_status_t spx_dealloc_codec( pjmedia_codec_factory *factory, 
+				      pjmedia_codec *codec )
+{
+    struct spx_private *spx;
+
+    PJ_ASSERT_RETURN(factory && codec, PJ_EINVAL);
+    PJ_ASSERT_RETURN(factory == &spx_factory.base, PJ_EINVAL);
+
+    /* Close codec, if it's not closed. */
+    spx = (struct spx_private*) codec->codec_data;
+    if (spx->enc != NULL || spx->dec != NULL) {
+	spx_codec_close(codec);
+    }
+
+    /* Put in the free list. */
+    pj_mutex_lock(spx_factory.mutex);
+    pj_list_push_front(&spx_factory.codec_list, codec);
+    pj_mutex_unlock(spx_factory.mutex);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Init codec.
+ */
+static pj_status_t spx_codec_init( pjmedia_codec *codec, 
+				   pj_pool_t *pool )
+{
+    PJ_UNUSED_ARG(codec);
+    PJ_UNUSED_ARG(pool);
+    return PJ_SUCCESS;
+}
+
+/*
+ * Open codec.
+ */
+static pj_status_t spx_codec_open( pjmedia_codec *codec, 
+				   pjmedia_codec_param *attr )
+{
+    struct spx_private *spx;
+    int id, tmp;
+
+    spx = (struct spx_private*) codec->codec_data;
+    id = spx->param_id;
+
+    /* Only supports one frame per packet */
+    PJ_ASSERT_RETURN(attr->setting.frm_per_pkt==1, PJ_EINVAL);
+
+    /* 
+     * Create and initialize encoder. 
+     */
+    spx->enc = speex_encoder_init(spx_factory.speex_param[id].mode);
+    if (!spx->enc)
+	return PJMEDIA_CODEC_EFAILED;
+    speex_bits_init(&spx->enc_bits);
+
+    /* Set the quality*/
+    if (spx_factory.speex_param[id].quality != -1) {
+	speex_encoder_ctl(spx->enc, SPEEX_SET_QUALITY, 
+			  &spx_factory.speex_param[id].quality);
+    }
+
+    /* Sampling rate. */
+    tmp = attr->info.clock_rate;
+    speex_encoder_ctl(spx->enc, SPEEX_SET_SAMPLING_RATE, 
+		      &spx_factory.speex_param[id].clock_rate);
+
+    /* VAD */
+    tmp = (attr->setting.vad != 0);
+    speex_encoder_ctl(spx->enc, SPEEX_SET_VAD, &tmp);
+    speex_encoder_ctl(spx->enc, SPEEX_SET_DTX, &tmp);
+
+    /* Complexity */
+    if (spx_factory.speex_param[id].complexity != -1) {
+	speex_encoder_ctl(spx->enc, SPEEX_SET_COMPLEXITY, 
+			  &spx_factory.speex_param[id].complexity);
+    }
+
+    /* 
+     * Create and initialize decoder. 
+     */
+    spx->dec = speex_decoder_init(spx_factory.speex_param[id].mode);
+    if (!spx->dec) {
+	spx_codec_close(codec);
+	return PJMEDIA_CODEC_EFAILED;
+    }
+    speex_bits_init(&spx->dec_bits);
+
+    /* Sampling rate. */
+    speex_decoder_ctl(spx->dec, SPEEX_SET_SAMPLING_RATE, 
+		      &spx_factory.speex_param[id].clock_rate);
+
+    /* PENH */
+    tmp = attr->setting.penh;
+    speex_decoder_ctl(spx->dec, SPEEX_SET_ENH, &tmp);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Close codec.
+ */
+static pj_status_t spx_codec_close( pjmedia_codec *codec )
+{
+    struct spx_private *spx;
+
+    spx = (struct spx_private*) codec->codec_data;
+
+    /* Destroy encoder*/
+    if (spx->enc) {
+	speex_encoder_destroy( spx->enc );
+	spx->enc = NULL;
+	speex_bits_destroy( &spx->enc_bits );
+    }
+
+    /* Destroy decoder */
+    if (spx->dec) {
+	speex_decoder_destroy( spx->dec);
+	spx->dec = NULL;
+	speex_bits_destroy( &spx->dec_bits );
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Modify codec settings.
+ */
+static pj_status_t  spx_codec_modify(pjmedia_codec *codec, 
+				     const pjmedia_codec_param *attr )
+{
+    struct spx_private *spx;
+    int tmp;
+
+    spx = (struct spx_private*) codec->codec_data;
+
+    /* Only supports one frame per packet */
+    PJ_ASSERT_RETURN(attr->setting.frm_per_pkt==1, PJ_EINVAL);
+
+    /* VAD */
+    tmp = (attr->setting.vad != 0);
+    speex_encoder_ctl(spx->enc, SPEEX_SET_VAD, &tmp);
+    speex_encoder_ctl(spx->enc, SPEEX_SET_DTX, &tmp);
+
+    /* PENH */
+    tmp = attr->setting.penh;
+    speex_decoder_ctl(spx->dec, SPEEX_SET_ENH, &tmp);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get frames in the packet.
+ */
+static pj_status_t  spx_codec_parse( pjmedia_codec *codec,
+				     void *pkt,
+				     pj_size_t pkt_size,
+				     const pj_timestamp *ts,
+				     unsigned *frame_cnt,
+				     pjmedia_frame frames[])
+{
+    struct spx_private *spx;
+    unsigned frame_size, samples_per_frame;
+    unsigned count;
+
+    spx = (struct spx_private*) codec->codec_data;
+
+    frame_size = spx_factory.speex_param[spx->param_id].framesize;
+    samples_per_frame = spx_factory.speex_param[spx->param_id].samples_per_frame;
+
+    /* Don't really know how to do this... */
+    count = 0;
+    while (pkt_size >= frame_size && count < *frame_cnt) {
+	frames[count].buf = pkt;
+	frames[count].size = frame_size;
+	frames[count].type = PJMEDIA_FRAME_TYPE_AUDIO;
+	frames[count].timestamp.u64 = ts->u64 + count * samples_per_frame;
+
+	pkt_size -= frame_size;
+	++count;
+	pkt = ((char*)pkt) + frame_size;
+    }
+
+    /* Just in case speex has silence frame which size is less than normal
+     * frame size...
+     */
+    if (pkt_size && count < *frame_cnt) {
+	frames[count].buf = pkt;
+	frames[count].size = pkt_size;
+	frames[count].type = PJMEDIA_FRAME_TYPE_AUDIO;
+	frames[count].timestamp.u64 = ts->u64 + count * samples_per_frame;
+	++count;
+    }
+
+    *frame_cnt = count;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Encode frame.
+ */
+static pj_status_t spx_codec_encode( pjmedia_codec *codec, 
+				     const struct pjmedia_frame *input,
+				     unsigned output_buf_len, 
+				     struct pjmedia_frame *output)
+{
+    struct spx_private *spx;
+    unsigned sz;
+    int tx;
+
+    spx = (struct spx_private*) codec->codec_data;
+
+    if (input->type != PJMEDIA_FRAME_TYPE_AUDIO) {
+	output->size = 0;
+	output->buf = NULL;
+	output->timestamp = input->timestamp;
+	output->type = input->type;
+	return PJ_SUCCESS;
+    }
+
+    /* Flush all the bits in the struct so we can encode a new frame */
+    speex_bits_reset(&spx->enc_bits);
+
+    /* Encode the frame */
+    tx = speex_encode_int(spx->enc, input->buf, &spx->enc_bits);
+
+    /* Check if we need not to transmit the frame (DTX) */
+    if (tx == 0) {
+	output->buf = NULL;
+	output->size = 0;
+	output->timestamp.u64 = input->timestamp.u64;
+	output->type = PJMEDIA_FRAME_TYPE_NONE;
+	return PJ_SUCCESS;
+    }
+
+    /* Check size. */
+    sz = speex_bits_nbytes(&spx->enc_bits);
+    pj_assert(sz <= output_buf_len);
+
+    /* Copy the bits to an array of char that can be written */
+    output->size = speex_bits_write(&spx->enc_bits, 
+				    output->buf, output_buf_len);
+    output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+    output->timestamp = input->timestamp;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Decode frame.
+ */
+static pj_status_t spx_codec_decode( pjmedia_codec *codec, 
+				     const struct pjmedia_frame *input,
+				     unsigned output_buf_len, 
+				     struct pjmedia_frame *output)
+{
+    struct spx_private *spx;
+
+    spx = (struct spx_private*) codec->codec_data;
+
+    if (input->type != PJMEDIA_FRAME_TYPE_AUDIO) {
+	pj_bzero(output->buf, output_buf_len);
+	output->size = 320;
+	output->timestamp.u64 = input->timestamp.u64;
+	output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+	return PJ_SUCCESS;
+    }
+
+    /* Copy the data into the bit-stream struct */
+    speex_bits_read_from(&spx->dec_bits, input->buf, input->size);
+
+    /* Decode the data */
+    speex_decode_int(spx->dec, &spx->dec_bits, output->buf);
+
+    output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+    output->size = speex_bits_nbytes(&spx->dec_bits);
+    pj_assert(output->size <= (int)output_buf_len);
+    output->timestamp.u64 = input->timestamp.u64;
+
+
+    return PJ_SUCCESS;
+}
+
+/* 
+ * Recover lost frame.
+ */
+static pj_status_t  spx_codec_recover(pjmedia_codec *codec, 
+				      unsigned output_buf_len, 
+				      struct pjmedia_frame *output)
+{
+    struct spx_private *spx;
+    unsigned count;
+
+    /* output_buf_len is unreferenced when building in Release mode */
+    PJ_UNUSED_ARG(output_buf_len);
+
+    spx = (struct spx_private*) codec->codec_data;
+
+    count = spx_factory.speex_param[spx->param_id].clock_rate * 20 / 1000;
+    pj_assert(count <= output_buf_len/2);
+
+    /* Recover packet loss */
+    speex_decode_int(spx->dec, NULL, output->buf);
+
+    output->size = count * 2;
+
+    return PJ_SUCCESS;
+}
+
+
+#endif	/* PJMEDIA_HAS_SPEEX_CODEC */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/BladeMP3EncDLL.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/BladeMP3EncDLL.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/BladeMP3EncDLL.h	(revision 1163)
@@ -0,0 +1,283 @@
+/*
+ * Blade Type of DLL Interface for Lame encoder
+ *
+ * Copyright (c) 1999-2002 A.L. Faber
+ * Based on bladedll.h version 1.0 written by Jukka Poikolainen
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ * 
+ * This 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
+ * Lesser General Public License for more details.
+ * 
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA  02111-1307, USA.
+ */
+
+//#define _BLADEDLL 1
+
+#ifndef ___BLADEDLL_H_INCLUDED___
+#define ___BLADEDLL_H_INCLUDED___
+
+#ifdef __GNUC__
+//#define ATTRIBUTE_PACKED	__attribute__((packed))
+#define ATTRIBUTE_PACKED
+#else
+#define ATTRIBUTE_PACKED
+#pragma pack(push)
+#pragma pack(1)
+#endif
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+/* encoding formats */
+
+#define		BE_CONFIG_MP3			0										
+#define		BE_CONFIG_LAME			256		
+
+/* type definitions */
+
+typedef		unsigned long			HBE_STREAM;
+typedef		HBE_STREAM				*PHBE_STREAM;
+typedef		unsigned long			BE_ERR;
+
+/* error codes */
+
+#define		BE_ERR_SUCCESSFUL					0x00000000
+#define		BE_ERR_INVALID_FORMAT				0x00000001
+#define		BE_ERR_INVALID_FORMAT_PARAMETERS	0x00000002
+#define		BE_ERR_NO_MORE_HANDLES				0x00000003
+#define		BE_ERR_INVALID_HANDLE				0x00000004
+#define		BE_ERR_BUFFER_TOO_SMALL				0x00000005
+
+/* other constants */
+
+#define		BE_MAX_HOMEPAGE			128
+
+/* format specific variables */
+
+#define		BE_MP3_MODE_STEREO		0
+#define		BE_MP3_MODE_JSTEREO		1
+#define		BE_MP3_MODE_DUALCHANNEL	2
+#define		BE_MP3_MODE_MONO		3
+
+
+
+#define		MPEG1	1
+#define		MPEG2	0
+
+#ifdef _BLADEDLL
+#undef FLOAT
+	#include <Windows.h>
+#endif
+
+#define CURRENT_STRUCT_VERSION 1
+#define CURRENT_STRUCT_SIZE sizeof(BE_CONFIG)	// is currently 331 bytes
+
+
+typedef enum
+{
+	VBR_METHOD_NONE			= -1,
+	VBR_METHOD_DEFAULT		=  0,
+	VBR_METHOD_OLD			=  1,
+	VBR_METHOD_NEW			=  2,
+	VBR_METHOD_MTRH			=  3,
+	VBR_METHOD_ABR			=  4
+} VBRMETHOD;
+
+typedef enum 
+{
+	LQP_NOPRESET			=-1,
+
+	// QUALITY PRESETS
+	LQP_NORMAL_QUALITY		= 0,
+	LQP_LOW_QUALITY			= 1,
+	LQP_HIGH_QUALITY		= 2,
+	LQP_VOICE_QUALITY		= 3,
+	LQP_R3MIX				= 4,
+	LQP_VERYHIGH_QUALITY	= 5,
+	LQP_STANDARD			= 6,
+	LQP_FAST_STANDARD		= 7,
+	LQP_EXTREME				= 8,
+	LQP_FAST_EXTREME		= 9,
+	LQP_INSANE				= 10,
+	LQP_ABR					= 11,
+	LQP_CBR					= 12,
+	LQP_MEDIUM				= 13,
+	LQP_FAST_MEDIUM			= 14,
+
+	// NEW PRESET VALUES
+	LQP_PHONE	=1000,
+	LQP_SW		=2000,
+	LQP_AM		=3000,
+	LQP_FM		=4000,
+	LQP_VOICE	=5000,
+	LQP_RADIO	=6000,
+	LQP_TAPE	=7000,
+	LQP_HIFI	=8000,
+	LQP_CD		=9000,
+	LQP_STUDIO	=10000
+
+} LAME_QUALITY_PRESET;
+
+
+
+typedef struct	{
+	unsigned long	dwConfig;			// BE_CONFIG_XXXXX
+								// Currently only BE_CONFIG_MP3 is supported
+	union	{
+
+		struct	{
+
+			unsigned long	dwSampleRate;		// 48000, 44100 and 32000 allowed
+			unsigned char	byMode;			// BE_MP3_MODE_STEREO, BE_MP3_MODE_DUALCHANNEL, BE_MP3_MODE_MONO
+			unsigned short	wBitrate;		// 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256 and 320 allowed
+			int	bPrivate;		
+			int	bCRC;
+			int	bCopyright;
+			int	bOriginal;
+
+			} mp3;					// BE_CONFIG_MP3
+
+			struct
+			{
+			// STRUCTURE INFORMATION
+			unsigned long			dwStructVersion;	
+			unsigned long			dwStructSize;
+
+			// BASIC ENCODER SETTINGS
+			unsigned long			dwSampleRate;		// SAMPLERATE OF INPUT FILE
+			unsigned long			dwReSampleRate;		// DOWNSAMPLERATE, 0=ENCODER DECIDES  
+			long			nMode;				// BE_MP3_MODE_STEREO, BE_MP3_MODE_DUALCHANNEL, BE_MP3_MODE_MONO
+			unsigned long			dwBitrate;			// CBR bitrate, VBR min bitrate
+			unsigned long			dwMaxBitrate;		// CBR ignored, VBR Max bitrate
+			long			nPreset;			// Quality preset, use one of the settings of the LAME_QUALITY_PRESET enum
+			unsigned long			dwMpegVersion;		// FUTURE USE, MPEG-1 OR MPEG-2
+			unsigned long			dwPsyModel;			// FUTURE USE, SET TO 0
+			unsigned long			dwEmphasis;			// FUTURE USE, SET TO 0
+
+			// BIT STREAM SETTINGS
+			int			bPrivate;			// Set Private Bit (TRUE/FALSE)
+			int			bCRC;				// Insert CRC (TRUE/FALSE)
+			int			bCopyright;			// Set Copyright Bit (TRUE/FALSE)
+			int			bOriginal;			// Set Original Bit (TRUE/FALSE)
+			
+			// VBR STUFF
+			int			bWriteVBRHeader;	// WRITE XING VBR HEADER (TRUE/FALSE)
+			int			bEnableVBR;			// USE VBR ENCODING (TRUE/FALSE)
+			int				nVBRQuality;		// VBR QUALITY 0..9
+			unsigned long			dwVbrAbr_bps;		// Use ABR in stead of nVBRQuality
+			VBRMETHOD		nVbrMethod;
+			int			bNoRes;				// Disable Bit resorvoir (TRUE/FALSE)
+
+			// MISC SETTINGS
+			int			bStrictIso;			// Use strict ISO encoding rules (TRUE/FALSE)
+			unsigned short			nQuality;			// Quality Setting, HIGH unsigned char should be NOT LOW byte, otherwhise quality=5
+
+			// FUTURE USE, SET TO 0, align strucutre to 331 bytes
+			unsigned char			btReserved[255-4*sizeof(unsigned long) - sizeof( unsigned short )];
+
+			} LHV1;					// LAME header version 1
+
+		struct	{
+
+			unsigned long	dwSampleRate;
+			unsigned char	byMode;
+			unsigned short	wBitrate;
+			unsigned char	byEncodingMethod;
+
+		} aac;
+
+	} format;
+		
+} BE_CONFIG, *PBE_CONFIG ATTRIBUTE_PACKED;
+
+
+typedef struct	{
+
+	// BladeEnc DLL Version number
+
+	unsigned char	byDLLMajorVersion;
+	unsigned char	byDLLMinorVersion;
+
+	// BladeEnc Engine Version Number
+
+	unsigned char	byMajorVersion;
+	unsigned char	byMinorVersion;
+
+	// DLL Release date
+
+	unsigned char	byDay;
+	unsigned char	byMonth;
+	unsigned short	wYear;
+
+	// BladeEnc	Homepage URL
+
+	char	zHomepage[BE_MAX_HOMEPAGE + 1];	
+
+	unsigned char	byAlphaLevel;
+	unsigned char	byBetaLevel;
+	unsigned char	byMMXEnabled;
+
+	unsigned char	btReserved[125];
+
+
+} BE_VERSION, *PBE_VERSION ATTRIBUTE_PACKED;
+
+#ifndef _BLADEDLL
+
+typedef unsigned long	(*BEINITSTREAM)			(PBE_CONFIG, unsigned long *, unsigned long *, PHBE_STREAM);
+typedef unsigned long	(*BEENCODECHUNK)		(HBE_STREAM, unsigned long, short *, unsigned char *, unsigned long *);
+
+// added for floating point audio  -- DSPguru, jd
+typedef unsigned long	(*BEENCODECHUNKFLOATS16NI)	(HBE_STREAM, unsigned long, float *, float *, unsigned char *, unsigned long *);
+typedef unsigned long	(*BEDEINITSTREAM)			(HBE_STREAM, unsigned char *, unsigned long *);
+typedef unsigned long	(*BECLOSESTREAM)			(HBE_STREAM);
+typedef void	(*BEVERSION)				(PBE_VERSION);
+typedef unsigned long	(*BEWRITEVBRHEADER)			(const char*);
+typedef unsigned long	(*BEWRITEINFOTAG)			(HBE_STREAM, const char * );
+
+#define	TEXT_BEINITSTREAM				"beInitStream"
+#define	TEXT_BEENCODECHUNK				"beEncodeChunk"
+#define	TEXT_BEENCODECHUNKFLOATS16NI	"beEncodeChunkFloatS16NI"
+#define	TEXT_BEDEINITSTREAM				"beDeinitStream"
+#define	TEXT_BECLOSESTREAM				"beCloseStream"
+#define	TEXT_BEVERSION					"beVersion"
+#define	TEXT_BEWRITEVBRHEADER			"beWriteVBRHeader"
+#define	TEXT_BEFLUSHNOGAP				"beFlushNoGap"
+#define	TEXT_BEWRITEINFOTAG				"beWriteInfoTag"
+
+
+#else
+
+__declspec(dllexport) unsigned long	beInitStream(PBE_CONFIG pbeConfig, Punsigned long dwSamples, Punsigned long dwBufferSize, PHBE_STREAM phbeStream);
+__declspec(dllexport) unsigned long	beEncodeChunk(HBE_STREAM hbeStream, unsigned long nSamples, PSHORT pSamples, Punsigned char pOutput, Punsigned long pdwOutput);
+
+// added for floating point audio  -- DSPguru, jd
+__declspec(dllexport) unsigned long	beEncodeChunkFloatS16NI(HBE_STREAM hbeStream, unsigned long nSamples, PFLOAT buffer_l, PFLOAT buffer_r, Punsigned char pOutput, Punsigned long pdwOutput);
+__declspec(dllexport) unsigned long	beDeinitStream(HBE_STREAM hbeStream, Punsigned char pOutput, Punsigned long pdwOutput);
+__declspec(dllexport) unsigned long	beCloseStream(HBE_STREAM hbeStream);
+__declspec(dllexport) VOID		beVersion(PBE_VERSION pbeVersion);
+__declspec(dllexport) unsigned long	beWriteVBRHeader(LPCSTR lpszFileName);
+__declspec(dllexport) unsigned long	beFlushNoGap(HBE_STREAM hbeStream, Punsigned char pOutput, Punsigned long pdwOutput);
+__declspec(dllexport) unsigned long	beWriteInfoTag( HBE_STREAM hbeStream, LPCSTR lpszFileName );
+
+#endif
+
+#ifndef __GNUC__
+#pragma pack(pop)
+#endif
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/alaw_ulaw.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/alaw_ulaw.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/alaw_ulaw.c	(revision 1163)
@@ -0,0 +1,300 @@
+/*
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use.  Users may copy or modify this source code without
+ * charge.
+ *
+ * SUN SOURCE CODE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING
+ * THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+ *
+ * Sun source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS SOFTWARE
+ * OR ANY PART THEREOF.
+ *
+ * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+ * or profits or other special, indirect and consequential damages, even if
+ * Sun has been advised of the possibility of such damages.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California  94043
+ */
+#include <pjmedia/alaw_ulaw.h>
+
+#if !defined(PJMEDIA_HAS_ALAW_ULAW_TABLE) || PJMEDIA_HAS_ALAW_ULAW_TABLE==0
+
+#ifdef _MSC_VER
+#  pragma warning ( disable: 4244 ) /* Conversion from int to char etc */
+#endif
+
+/*
+ * g711.c
+ *
+ * u-law, A-law and linear PCM conversions.
+ */
+#define	SIGN_BIT	(0x80)		/* Sign bit for a A-law byte. */
+#define	QUANT_MASK	(0xf)		/* Quantization field mask. */
+#define	NSEGS		(8)		/* Number of A-law segments. */
+#define	SEG_SHIFT	(4)		/* Left shift for segment number. */
+#define	SEG_MASK	(0x70)		/* Segment field mask. */
+
+static short seg_end[8] = {0xFF, 0x1FF, 0x3FF, 0x7FF,
+			    0xFFF, 0x1FFF, 0x3FFF, 0x7FFF};
+
+/* copy from CCITT G.711 specifications */
+static unsigned char _u2a[128] = {		/* u- to A-law conversions */
+	1,	1,	2,	2,	3,	3,	4,	4,
+	5,	5,	6,	6,	7,	7,	8,	8,
+	9,	10,	11,	12,	13,	14,	15,	16,
+	17,	18,	19,	20,	21,	22,	23,	24,
+	25,	27,	29,	31,	33,	34,	35,	36,
+	37,	38,	39,	40,	41,	42,	43,	44,
+	46,	48,	49,	50,	51,	52,	53,	54,
+	55,	56,	57,	58,	59,	60,	61,	62,
+	64,	65,	66,	67,	68,	69,	70,	71,
+	72,	73,	74,	75,	76,	77,	78,	79,
+	81,	82,	83,	84,	85,	86,	87,	88,
+	89,	90,	91,	92,	93,	94,	95,	96,
+	97,	98,	99,	100,	101,	102,	103,	104,
+	105,	106,	107,	108,	109,	110,	111,	112,
+	113,	114,	115,	116,	117,	118,	119,	120,
+	121,	122,	123,	124,	125,	126,	127,	128};
+
+static unsigned char _a2u[128] = {		/* A- to u-law conversions */
+	1,	3,	5,	7,	9,	11,	13,	15,
+	16,	17,	18,	19,	20,	21,	22,	23,
+	24,	25,	26,	27,	28,	29,	30,	31,
+	32,	32,	33,	33,	34,	34,	35,	35,
+	36,	37,	38,	39,	40,	41,	42,	43,
+	44,	45,	46,	47,	48,	48,	49,	49,
+	50,	51,	52,	53,	54,	55,	56,	57,
+	58,	59,	60,	61,	62,	63,	64,	64,
+	65,	66,	67,	68,	69,	70,	71,	72,
+	73,	74,	75,	76,	77,	78,	79,	79,
+	80,	81,	82,	83,	84,	85,	86,	87,
+	88,	89,	90,	91,	92,	93,	94,	95,
+	96,	97,	98,	99,	100,	101,	102,	103,
+	104,	105,	106,	107,	108,	109,	110,	111,
+	112,	113,	114,	115,	116,	117,	118,	119,
+	120,	121,	122,	123,	124,	125,	126,	127};
+
+static int
+search(
+	int		val,
+	short		*table,
+	int		size)
+{
+	int		i;
+
+	for (i = 0; i < size; i++) {
+		if (val <= *table++)
+			return (i);
+	}
+	return (size);
+}
+
+/*
+ * linear2alaw() - Convert a 16-bit linear PCM value to 8-bit A-law
+ *
+ * linear2alaw() accepts an 16-bit integer and encodes it as A-law data.
+ *
+ *		Linear Input Code	Compressed Code
+ *	------------------------	---------------
+ *	0000000wxyza			000wxyz
+ *	0000001wxyza			001wxyz
+ *	000001wxyzab			010wxyz
+ *	00001wxyzabc			011wxyz
+ *	0001wxyzabcd			100wxyz
+ *	001wxyzabcde			101wxyz
+ *	01wxyzabcdef			110wxyz
+ *	1wxyzabcdefg			111wxyz
+ *
+ * For further information see John C. Bellamy's Digital Telephony, 1982,
+ * John Wiley & Sons, pps 98-111 and 472-476.
+ */
+PJ_DEF(pj_uint8_t)
+pjmedia_linear2alaw(
+	int		pcm_val)	/* 2's complement (16-bit range) */
+{
+	int		mask;
+	int		seg;
+	unsigned char	aval;
+
+	if (pcm_val >= 0) {
+		mask = 0xD5;		/* sign (7th) bit = 1 */
+	} else {
+		mask = 0x55;		/* sign bit = 0 */
+		pcm_val = -pcm_val - 8;
+	}
+
+	/* Convert the scaled magnitude to segment number. */
+	seg = search(pcm_val, seg_end, 8);
+
+	/* Combine the sign, segment, and quantization bits. */
+
+	if (seg >= 8)		/* out of range, return maximum value. */
+		return (0x7F ^ mask);
+	else {
+		aval = seg << SEG_SHIFT;
+		if (seg < 2)
+			aval |= (pcm_val >> 4) & QUANT_MASK;
+		else
+			aval |= (pcm_val >> (seg + 3)) & QUANT_MASK;
+		return (aval ^ mask);
+	}
+}
+
+/*
+ * alaw2linear() - Convert an A-law value to 16-bit linear PCM
+ *
+ */
+PJ_DEF(int)
+pjmedia_alaw2linear(
+	unsigned char	a_val)
+{
+	int		t;
+	int		seg;
+
+	a_val ^= 0x55;
+
+	t = (a_val & QUANT_MASK) << 4;
+	seg = ((unsigned)a_val & SEG_MASK) >> SEG_SHIFT;
+	switch (seg) {
+	case 0:
+		t += 8;
+		break;
+	case 1:
+		t += 0x108;
+		break;
+	default:
+		t += 0x108;
+		t <<= seg - 1;
+	}
+	return ((a_val & SIGN_BIT) ? t : -t);
+}
+
+#define	BIAS		(0x84)		/* Bias for linear code. */
+
+/*
+ * linear2ulaw() - Convert a linear PCM value to u-law
+ *
+ * In order to simplify the encoding process, the original linear magnitude
+ * is biased by adding 33 which shifts the encoding range from (0 - 8158) to
+ * (33 - 8191). The result can be seen in the following encoding table:
+ *
+ *	Biased Linear Input Code	Compressed Code
+ *	------------------------	---------------
+ *	00000001wxyza			000wxyz
+ *	0000001wxyzab			001wxyz
+ *	000001wxyzabc			010wxyz
+ *	00001wxyzabcd			011wxyz
+ *	0001wxyzabcde			100wxyz
+ *	001wxyzabcdef			101wxyz
+ *	01wxyzabcdefg			110wxyz
+ *	1wxyzabcdefgh			111wxyz
+ *
+ * Each biased linear code has a leading 1 which identifies the segment
+ * number. The value of the segment number is equal to 7 minus the number
+ * of leading 0's. The quantization interval is directly available as the
+ * four bits wxyz.  * The trailing bits (a - h) are ignored.
+ *
+ * Ordinarily the complement of the resulting code word is used for
+ * transmission, and so the code word is complemented before it is returned.
+ *
+ * For further information see John C. Bellamy's Digital Telephony, 1982,
+ * John Wiley & Sons, pps 98-111 and 472-476.
+ */
+PJ_DECL(unsigned char)
+pjmedia_linear2ulaw(
+	int		pcm_val)	/* 2's complement (16-bit range) */
+{
+	int		mask;
+	int		seg;
+	unsigned char	uval;
+
+	/* Get the sign and the magnitude of the value. */
+	if (pcm_val < 0) {
+		pcm_val = BIAS - pcm_val;
+		mask = 0x7F;
+	} else {
+		pcm_val += BIAS;
+		mask = 0xFF;
+	}
+
+	/* Convert the scaled magnitude to segment number. */
+	seg = search(pcm_val, seg_end, 8);
+
+	/*
+	 * Combine the sign, segment, quantization bits;
+	 * and complement the code word.
+	 */
+	if (seg >= 8)		/* out of range, return maximum value. */
+		return (0x7F ^ mask);
+	else {
+		uval = (seg << 4) | ((pcm_val >> (seg + 3)) & 0xF);
+		return (uval ^ mask);
+	}
+
+}
+
+/*
+ * ulaw2linear() - Convert a u-law value to 16-bit linear PCM
+ *
+ * First, a biased linear code is derived from the code word. An unbiased
+ * output can then be obtained by subtracting 33 from the biased code.
+ *
+ * Note that this function expects to be passed the complement of the
+ * original code word. This is in keeping with ISDN conventions.
+ */
+PJ_DEF(int)
+pjmedia_ulaw2linear(
+	unsigned char	u_val)
+{
+	int		t;
+
+	/* Shortcut: when input is zero, output is zero 
+	 * This will also make the VAD works harder.
+	 *  -bennylp
+	 */
+	if (u_val == 0) return 0;
+
+	/* Complement to obtain normal u-law value. */
+	u_val = ~u_val;
+
+	/*
+	 * Extract and bias the quantization bits. Then
+	 * shift up by the segment number and subtract out the bias.
+	 */
+	t = ((u_val & QUANT_MASK) << 3) + BIAS;
+	t <<= ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT;
+
+	return ((u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS));
+}
+
+/* A-law to u-law conversion */
+PJ_DEF(unsigned char)
+pjmedia_alaw2ulaw(
+	unsigned char	aval)
+{
+	aval &= 0xff;
+	return ((aval & 0x80) ? (0xFF ^ _a2u[aval ^ 0xD5]) :
+	    (0x7F ^ _a2u[aval ^ 0x55]));
+}
+
+/* u-law to A-law conversion */
+PJ_DEF(unsigned char)
+pjmedia_ulaw2alaw(
+	unsigned char	uval)
+{
+	uval &= 0xff;
+	return ((uval & 0x80) ? (0xD5 ^ (_u2a[0xFF ^ uval] - 1)) :
+	    (0x55 ^ (_u2a[0x7F ^ uval] - 1)));
+}
+
+
+#endif	/* PJMEDIA_HAS_ALAW_ULAW_TABLE */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/alaw_ulaw_table.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/alaw_ulaw_table.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/alaw_ulaw_table.c	(revision 1163)
@@ -0,0 +1,4206 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/*
+ * The tables here and also the conversion ideas are contributed by 
+ * Toni Rutar <toni at aufbix.org>. Many thanks!
+ */
+#include <pjmedia/alaw_ulaw.h>
+
+#if defined(PJMEDIA_HAS_ALAW_ULAW_TABLE) && PJMEDIA_HAS_ALAW_ULAW_TABLE!=0
+
+const pj_uint8_t pjmedia_linear2ulaw_tab[16384] = 
+{
+    0xff,0xfe,0xfe,0xfd,0xfd,0xfc,0xfc,0xfb,
+    0xfb,0xfa,0xfa,0xf9,0xf9,0xf8,0xf8,0xf7,
+    0xf7,0xf6,0xf6,0xf5,0xf5,0xf4,0xf4,0xf3,
+    0xf3,0xf2,0xf2,0xf1,0xf1,0xf0,0xf0,0xef,
+    0xef,0xef,0xef,0xee,0xee,0xee,0xee,0xed,
+    0xed,0xed,0xed,0xec,0xec,0xec,0xec,0xeb,
+    0xeb,0xeb,0xeb,0xea,0xea,0xea,0xea,0xe9,
+    0xe9,0xe9,0xe9,0xe8,0xe8,0xe8,0xe8,0xe7,
+    0xe7,0xe7,0xe7,0xe6,0xe6,0xe6,0xe6,0xe5,
+    0xe5,0xe5,0xe5,0xe4,0xe4,0xe4,0xe4,0xe3,
+    0xe3,0xe3,0xe3,0xe2,0xe2,0xe2,0xe2,0xe1,
+    0xe1,0xe1,0xe1,0xe0,0xe0,0xe0,0xe0,0xdf,
+    0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xdf,0xde,
+    0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xdd,
+    0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdd,0xdc,
+    0xdc,0xdc,0xdc,0xdc,0xdc,0xdc,0xdc,0xdb,
+    0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xda,
+    0xda,0xda,0xda,0xda,0xda,0xda,0xda,0xd9,
+    0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd9,0xd8,
+    0xd8,0xd8,0xd8,0xd8,0xd8,0xd8,0xd8,0xd7,
+    0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd7,0xd6,
+    0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd5,
+    0xd5,0xd5,0xd5,0xd5,0xd5,0xd5,0xd5,0xd4,
+    0xd4,0xd4,0xd4,0xd4,0xd4,0xd4,0xd4,0xd3,
+    0xd3,0xd3,0xd3,0xd3,0xd3,0xd3,0xd3,0xd2,
+    0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd1,
+    0xd1,0xd1,0xd1,0xd1,0xd1,0xd1,0xd1,0xd0,
+    0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xd0,0xcf,
+    0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,
+    0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xce,
+    0xce,0xce,0xce,0xce,0xce,0xce,0xce,0xce,
+    0xce,0xce,0xce,0xce,0xce,0xce,0xce,0xcd,
+    0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,
+    0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcd,0xcc,
+    0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,
+    0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcb,
+    0xcb,0xcb,0xcb,0xcb,0xcb,0xcb,0xcb,0xcb,
+    0xcb,0xcb,0xcb,0xcb,0xcb,0xcb,0xcb,0xca,
+    0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,
+    0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xc9,
+    0xc9,0xc9,0xc9,0xc9,0xc9,0xc9,0xc9,0xc9,
+    0xc9,0xc9,0xc9,0xc9,0xc9,0xc9,0xc9,0xc8,
+    0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,
+    0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc8,0xc7,
+    0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,
+    0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc6,
+    0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,
+    0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc5,
+    0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,
+    0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,0xc5,0xc4,
+    0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,
+    0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc4,0xc3,
+    0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,
+    0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc2,
+    0xc2,0xc2,0xc2,0xc2,0xc2,0xc2,0xc2,0xc2,
+    0xc2,0xc2,0xc2,0xc2,0xc2,0xc2,0xc2,0xc1,
+    0xc1,0xc1,0xc1,0xc1,0xc1,0xc1,0xc1,0xc1,
+    0xc1,0xc1,0xc1,0xc1,0xc1,0xc1,0xc1,0xc0,
+    0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,
+    0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xbf,
+    0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,
+    0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,
+    0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,
+    0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbf,0xbe,
+    0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,
+    0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,
+    0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,
+    0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,0xbe,0xbd,
+    0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,
+    0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,
+    0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,
+    0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbc,
+    0xbc,0xbc,0xbc,0xbc,0xbc,0xbc,0xbc,0xbc,
+    0xbc,0xbc,0xbc,0xbc,0xbc,0xbc,0xbc,0xbc,
+    0xbc,0xbc,0xbc,0xbc,0xbc,0xbc,0xbc,0xbc,
+    0xbc,0xbc,0xbc,0xbc,0xbc,0xbc,0xbc,0xbb,
+    0xbb,0xbb,0xbb,0xbb,0xbb,0xbb,0xbb,0xbb,
+    0xbb,0xbb,0xbb,0xbb,0xbb,0xbb,0xbb,0xbb,
+    0xbb,0xbb,0xbb,0xbb,0xbb,0xbb,0xbb,0xbb,
+    0xbb,0xbb,0xbb,0xbb,0xbb,0xbb,0xbb,0xba,
+    0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,
+    0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,
+    0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,
+    0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xb9,
+    0xb9,0xb9,0xb9,0xb9,0xb9,0xb9,0xb9,0xb9,
+    0xb9,0xb9,0xb9,0xb9,0xb9,0xb9,0xb9,0xb9,
+    0xb9,0xb9,0xb9,0xb9,0xb9,0xb9,0xb9,0xb9,
+    0xb9,0xb9,0xb9,0xb9,0xb9,0xb9,0xb9,0xb8,
+    0xb8,0xb8,0xb8,0xb8,0xb8,0xb8,0xb8,0xb8,
+    0xb8,0xb8,0xb8,0xb8,0xb8,0xb8,0xb8,0xb8,
+    0xb8,0xb8,0xb8,0xb8,0xb8,0xb8,0xb8,0xb8,
+    0xb8,0xb8,0xb8,0xb8,0xb8,0xb8,0xb8,0xb7,
+    0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,
+    0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,
+    0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,
+    0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb6,
+    0xb6,0xb6,0xb6,0xb6,0xb6,0xb6,0xb6,0xb6,
+    0xb6,0xb6,0xb6,0xb6,0xb6,0xb6,0xb6,0xb6,
+    0xb6,0xb6,0xb6,0xb6,0xb6,0xb6,0xb6,0xb6,
+    0xb6,0xb6,0xb6,0xb6,0xb6,0xb6,0xb6,0xb5,
+    0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,
+    0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,
+    0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,
+    0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,0xb5,0xb4,
+    0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,
+    0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,
+    0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,
+    0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb3,
+    0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,
+    0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,
+    0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,
+    0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb3,0xb2,
+    0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,
+    0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,
+    0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,
+    0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb2,0xb1,
+    0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
+    0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
+    0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,
+    0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb0,
+    0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,
+    0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,
+    0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,
+    0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xb0,0xaf,
+    0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,
+    0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,
+    0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,
+    0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,
+    0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,
+    0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,
+    0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,
+    0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xaf,0xae,
+    0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,
+    0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,
+    0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,
+    0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,
+    0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,
+    0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,
+    0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,
+    0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xad,
+    0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,
+    0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,
+    0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,
+    0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,
+    0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,
+    0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,
+    0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xad,
+    0xad,0xad,0xad,0xad,0xad,0xad,0xad,0xac,
+    0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,
+    0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,
+    0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,
+    0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,
+    0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,
+    0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,
+    0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xac,
+    0xac,0xac,0xac,0xac,0xac,0xac,0xac,0xab,
+    0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,
+    0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,
+    0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,
+    0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,
+    0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,
+    0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,
+    0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,
+    0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xaa,
+    0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+    0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+    0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+    0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+    0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+    0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+    0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
+    0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xa9,
+    0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,
+    0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,
+    0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,
+    0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,
+    0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,
+    0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,
+    0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,
+    0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa9,0xa8,
+    0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,
+    0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,
+    0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,
+    0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,
+    0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,
+    0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,
+    0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,
+    0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa7,
+    0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,
+    0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,
+    0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,
+    0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,
+    0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,
+    0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,
+    0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,
+    0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa7,0xa6,
+    0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,
+    0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,
+    0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,
+    0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,
+    0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,
+    0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,
+    0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,
+    0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa6,0xa5,
+    0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,
+    0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,
+    0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,
+    0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,
+    0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,
+    0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,
+    0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,
+    0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa4,
+    0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,
+    0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,
+    0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,
+    0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,
+    0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,
+    0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,
+    0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,
+    0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa4,0xa3,
+    0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,
+    0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,
+    0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,
+    0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,
+    0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,
+    0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,
+    0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,
+    0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa3,0xa2,
+    0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,
+    0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,
+    0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,
+    0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,
+    0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,
+    0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,
+    0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,
+    0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa1,
+    0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,
+    0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,
+    0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,
+    0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,
+    0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,
+    0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,
+    0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,
+    0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa1,0xa0,
+    0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,
+    0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,
+    0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,
+    0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,
+    0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,
+    0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,
+    0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,
+    0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,
+    0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,
+    0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,
+    0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9d,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,
+    0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,
+    0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9b,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,
+    0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x9a,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+    0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+    0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+    0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+    0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+    0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+    0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+    0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+    0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+    0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+    0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,
+    0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8f,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,
+    0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8e,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,
+    0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8d,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,
+    0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8c,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,
+    0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8b,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,
+    0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+    0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+    0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+    0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+    0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+    0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+    0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+    0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+    0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+    0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+    0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+    0x01,0x01,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+    0x02,0x02,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+    0x03,0x03,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+    0x04,0x04,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+    0x05,0x05,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+    0x06,0x06,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+    0x07,0x07,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+    0x08,0x08,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+    0x09,0x09,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,0x0a,
+    0x0a,0x0a,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,0x0b,
+    0x0b,0x0b,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,
+    0x0c,0x0c,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,0x0d,
+    0x0d,0x0d,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,0x0e,
+    0x0e,0x0e,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,
+    0x0f,0x0f,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+    0x10,0x10,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+    0x11,0x11,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+    0x12,0x12,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+    0x13,0x13,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+    0x14,0x14,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+    0x15,0x15,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+    0x16,0x16,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+    0x17,0x17,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+    0x18,0x18,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+    0x19,0x19,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,
+    0x1a,0x1a,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,
+    0x1b,0x1b,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
+    0x1c,0x1c,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,0x1d,
+    0x1d,0x1d,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
+    0x1e,0x1e,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,0x1f,
+    0x1f,0x1f,0x20,0x20,0x20,0x20,0x20,0x20,
+    0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+    0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+    0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+    0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+    0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+    0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+    0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+    0x20,0x20,0x21,0x21,0x21,0x21,0x21,0x21,
+    0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+    0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+    0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+    0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+    0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+    0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+    0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+    0x21,0x21,0x22,0x22,0x22,0x22,0x22,0x22,
+    0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+    0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+    0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+    0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+    0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+    0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+    0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+    0x22,0x22,0x23,0x23,0x23,0x23,0x23,0x23,
+    0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+    0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+    0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+    0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+    0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+    0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+    0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+    0x23,0x23,0x24,0x24,0x24,0x24,0x24,0x24,
+    0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+    0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+    0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+    0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+    0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+    0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+    0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+    0x24,0x24,0x25,0x25,0x25,0x25,0x25,0x25,
+    0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+    0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+    0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+    0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+    0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+    0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+    0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+    0x25,0x25,0x26,0x26,0x26,0x26,0x26,0x26,
+    0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+    0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+    0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+    0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+    0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+    0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+    0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+    0x26,0x26,0x27,0x27,0x27,0x27,0x27,0x27,
+    0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+    0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+    0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+    0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+    0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+    0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+    0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+    0x27,0x27,0x28,0x28,0x28,0x28,0x28,0x28,
+    0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+    0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+    0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+    0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+    0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+    0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+    0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+    0x28,0x28,0x29,0x29,0x29,0x29,0x29,0x29,
+    0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+    0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+    0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+    0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+    0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+    0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+    0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+    0x29,0x29,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,
+    0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,
+    0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,
+    0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,
+    0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,
+    0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,
+    0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,
+    0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,
+    0x2a,0x2a,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,
+    0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,
+    0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,
+    0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,
+    0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,
+    0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,
+    0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,
+    0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,0x2b,
+    0x2b,0x2b,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,
+    0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,
+    0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,
+    0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,
+    0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,
+    0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,
+    0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,
+    0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,0x2c,
+    0x2c,0x2c,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+    0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+    0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+    0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+    0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+    0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+    0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+    0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,0x2d,
+    0x2d,0x2d,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+    0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+    0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+    0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+    0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+    0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+    0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+    0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,0x2e,
+    0x2e,0x2e,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,
+    0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,
+    0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,
+    0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,
+    0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,
+    0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,
+    0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,
+    0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,0x2f,
+    0x2f,0x2f,0x30,0x30,0x30,0x30,0x30,0x30,
+    0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+    0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+    0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+    0x30,0x30,0x31,0x31,0x31,0x31,0x31,0x31,
+    0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+    0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+    0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+    0x31,0x31,0x32,0x32,0x32,0x32,0x32,0x32,
+    0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+    0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+    0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+    0x32,0x32,0x33,0x33,0x33,0x33,0x33,0x33,
+    0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+    0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+    0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+    0x33,0x33,0x34,0x34,0x34,0x34,0x34,0x34,
+    0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+    0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+    0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+    0x34,0x34,0x35,0x35,0x35,0x35,0x35,0x35,
+    0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+    0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+    0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+    0x35,0x35,0x36,0x36,0x36,0x36,0x36,0x36,
+    0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+    0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+    0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+    0x36,0x36,0x37,0x37,0x37,0x37,0x37,0x37,
+    0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+    0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+    0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+    0x37,0x37,0x38,0x38,0x38,0x38,0x38,0x38,
+    0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+    0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+    0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+    0x38,0x38,0x39,0x39,0x39,0x39,0x39,0x39,
+    0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+    0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+    0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+    0x39,0x39,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,
+    0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,
+    0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,
+    0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,0x3a,
+    0x3a,0x3a,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,
+    0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,
+    0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,
+    0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,
+    0x3b,0x3b,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,
+    0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,
+    0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,
+    0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,
+    0x3c,0x3c,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,
+    0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,
+    0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,
+    0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,0x3d,
+    0x3d,0x3d,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,
+    0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,
+    0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,
+    0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,0x3e,
+    0x3e,0x3e,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
+    0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
+    0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
+    0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,0x3f,
+    0x3f,0x3f,0x40,0x40,0x40,0x40,0x40,0x40,
+    0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
+    0x40,0x40,0x41,0x41,0x41,0x41,0x41,0x41,
+    0x41,0x41,0x41,0x41,0x41,0x41,0x41,0x41,
+    0x41,0x41,0x42,0x42,0x42,0x42,0x42,0x42,
+    0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,
+    0x42,0x42,0x43,0x43,0x43,0x43,0x43,0x43,
+    0x43,0x43,0x43,0x43,0x43,0x43,0x43,0x43,
+    0x43,0x43,0x44,0x44,0x44,0x44,0x44,0x44,
+    0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
+    0x44,0x44,0x45,0x45,0x45,0x45,0x45,0x45,
+    0x45,0x45,0x45,0x45,0x45,0x45,0x45,0x45,
+    0x45,0x45,0x46,0x46,0x46,0x46,0x46,0x46,
+    0x46,0x46,0x46,0x46,0x46,0x46,0x46,0x46,
+    0x46,0x46,0x47,0x47,0x47,0x47,0x47,0x47,
+    0x47,0x47,0x47,0x47,0x47,0x47,0x47,0x47,
+    0x47,0x47,0x48,0x48,0x48,0x48,0x48,0x48,
+    0x48,0x48,0x48,0x48,0x48,0x48,0x48,0x48,
+    0x48,0x48,0x49,0x49,0x49,0x49,0x49,0x49,
+    0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x49,
+    0x49,0x49,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
+    0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,0x4a,
+    0x4a,0x4a,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
+    0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,
+    0x4b,0x4b,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
+    0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,0x4c,
+    0x4c,0x4c,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
+    0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,0x4d,
+    0x4d,0x4d,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
+    0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,
+    0x4e,0x4e,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
+    0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,0x4f,
+    0x4f,0x4f,0x50,0x50,0x50,0x50,0x50,0x50,
+    0x50,0x50,0x51,0x51,0x51,0x51,0x51,0x51,
+    0x51,0x51,0x52,0x52,0x52,0x52,0x52,0x52,
+    0x52,0x52,0x53,0x53,0x53,0x53,0x53,0x53,
+    0x53,0x53,0x54,0x54,0x54,0x54,0x54,0x54,
+    0x54,0x54,0x55,0x55,0x55,0x55,0x55,0x55,
+    0x55,0x55,0x56,0x56,0x56,0x56,0x56,0x56,
+    0x56,0x56,0x57,0x57,0x57,0x57,0x57,0x57,
+    0x57,0x57,0x58,0x58,0x58,0x58,0x58,0x58,
+    0x58,0x58,0x59,0x59,0x59,0x59,0x59,0x59,
+    0x59,0x59,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,
+    0x5a,0x5a,0x5b,0x5b,0x5b,0x5b,0x5b,0x5b,
+    0x5b,0x5b,0x5c,0x5c,0x5c,0x5c,0x5c,0x5c,
+    0x5c,0x5c,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,
+    0x5d,0x5d,0x5e,0x5e,0x5e,0x5e,0x5e,0x5e,
+    0x5e,0x5e,0x5f,0x5f,0x5f,0x5f,0x5f,0x5f,
+    0x5f,0x5f,0x60,0x60,0x60,0x60,0x61,0x61,
+    0x61,0x61,0x62,0x62,0x62,0x62,0x63,0x63,
+    0x63,0x63,0x64,0x64,0x64,0x64,0x65,0x65,
+    0x65,0x65,0x66,0x66,0x66,0x66,0x67,0x67,
+    0x67,0x67,0x68,0x68,0x68,0x68,0x69,0x69,
+    0x69,0x69,0x6a,0x6a,0x6a,0x6a,0x6b,0x6b,
+    0x6b,0x6b,0x6c,0x6c,0x6c,0x6c,0x6d,0x6d,
+    0x6d,0x6d,0x6e,0x6e,0x6e,0x6e,0x6f,0x6f,
+    0x6f,0x6f,0x70,0x70,0x71,0x71,0x72,0x72,
+    0x73,0x73,0x74,0x74,0x75,0x75,0x76,0x76,
+    0x77,0x77,0x78,0x78,0x79,0x79,0x7a,0x7a,
+    0x7b,0x7b,0x7c,0x7c,0x7d,0x7d,0x7e,0x7e
+};
+
+
+const pj_uint8_t pjmedia_linear2alaw_tab[16384] = 
+{
+     0xD5,0xD5,0xD5,0xD5,0xD4,0xD4,0xD4,0xD4,
+     0xD7,0xD7,0xD7,0xD7,0xD6,0xD6,0xD6,0xD6,
+     0xD1,0xD1,0xD1,0xD1,0xD0,0xD0,0xD0,0xD0,
+     0xD3,0xD3,0xD3,0xD3,0xD2,0xD2,0xD2,0xD2,
+     0xDD,0xDD,0xDD,0xDD,0xDC,0xDC,0xDC,0xDC,
+     0xDF,0xDF,0xDF,0xDF,0xDE,0xDE,0xDE,0xDE,
+     0xD9,0xD9,0xD9,0xD9,0xD8,0xD8,0xD8,0xD8,
+     0xDB,0xDB,0xDB,0xDB,0xDA,0xDA,0xDA,0xDA,
+     0xC5,0xC5,0xC5,0xC5,0xC4,0xC4,0xC4,0xC4,
+     0xC7,0xC7,0xC7,0xC7,0xC6,0xC6,0xC6,0xC6,
+     0xC1,0xC1,0xC1,0xC1,0xC0,0xC0,0xC0,0xC0,
+     0xC3,0xC3,0xC3,0xC3,0xC2,0xC2,0xC2,0xC2,
+     0xCD,0xCD,0xCD,0xCD,0xCC,0xCC,0xCC,0xCC,
+     0xCF,0xCF,0xCF,0xCF,0xCE,0xCE,0xCE,0xCE,
+     0xC9,0xC9,0xC9,0xC9,0xC8,0xC8,0xC8,0xC8,
+     0xCB,0xCB,0xCB,0xCB,0xCA,0xCA,0xCA,0xCA,
+     0xF5,0xF5,0xF5,0xF5,0xF5,0xF5,0xF5,0xF5,
+     0xF4,0xF4,0xF4,0xF4,0xF4,0xF4,0xF4,0xF4,
+     0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,0xF7,
+     0xF6,0xF6,0xF6,0xF6,0xF6,0xF6,0xF6,0xF6,
+     0xF1,0xF1,0xF1,0xF1,0xF1,0xF1,0xF1,0xF1,
+     0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,
+     0xF3,0xF3,0xF3,0xF3,0xF3,0xF3,0xF3,0xF3,
+     0xF2,0xF2,0xF2,0xF2,0xF2,0xF2,0xF2,0xF2,
+     0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,0xFD,
+     0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,
+     0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+     0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,
+     0xF9,0xF9,0xF9,0xF9,0xF9,0xF9,0xF9,0xF9,
+     0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,
+     0xFB,0xFB,0xFB,0xFB,0xFB,0xFB,0xFB,0xFB,
+     0xFA,0xFA,0xFA,0xFA,0xFA,0xFA,0xFA,0xFA,
+     0xE5,0xE5,0xE5,0xE5,0xE5,0xE5,0xE5,0xE5,
+     0xE5,0xE5,0xE5,0xE5,0xE5,0xE5,0xE5,0xE5,
+     0xE4,0xE4,0xE4,0xE4,0xE4,0xE4,0xE4,0xE4,
+     0xE4,0xE4,0xE4,0xE4,0xE4,0xE4,0xE4,0xE4,
+     0xE7,0xE7,0xE7,0xE7,0xE7,0xE7,0xE7,0xE7,
+     0xE7,0xE7,0xE7,0xE7,0xE7,0xE7,0xE7,0xE7,
+     0xE6,0xE6,0xE6,0xE6,0xE6,0xE6,0xE6,0xE6,
+     0xE6,0xE6,0xE6,0xE6,0xE6,0xE6,0xE6,0xE6,
+     0xE1,0xE1,0xE1,0xE1,0xE1,0xE1,0xE1,0xE1,
+     0xE1,0xE1,0xE1,0xE1,0xE1,0xE1,0xE1,0xE1,
+     0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,
+     0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,
+     0xE3,0xE3,0xE3,0xE3,0xE3,0xE3,0xE3,0xE3,
+     0xE3,0xE3,0xE3,0xE3,0xE3,0xE3,0xE3,0xE3,
+     0xE2,0xE2,0xE2,0xE2,0xE2,0xE2,0xE2,0xE2,
+     0xE2,0xE2,0xE2,0xE2,0xE2,0xE2,0xE2,0xE2,
+     0xED,0xED,0xED,0xED,0xED,0xED,0xED,0xED,
+     0xED,0xED,0xED,0xED,0xED,0xED,0xED,0xED,
+     0xEC,0xEC,0xEC,0xEC,0xEC,0xEC,0xEC,0xEC,
+     0xEC,0xEC,0xEC,0xEC,0xEC,0xEC,0xEC,0xEC,
+     0xEF,0xEF,0xEF,0xEF,0xEF,0xEF,0xEF,0xEF,
+     0xEF,0xEF,0xEF,0xEF,0xEF,0xEF,0xEF,0xEF,
+     0xEE,0xEE,0xEE,0xEE,0xEE,0xEE,0xEE,0xEE,
+     0xEE,0xEE,0xEE,0xEE,0xEE,0xEE,0xEE,0xEE,
+     0xE9,0xE9,0xE9,0xE9,0xE9,0xE9,0xE9,0xE9,
+     0xE9,0xE9,0xE9,0xE9,0xE9,0xE9,0xE9,0xE9,
+     0xE8,0xE8,0xE8,0xE8,0xE8,0xE8,0xE8,0xE8,
+     0xE8,0xE8,0xE8,0xE8,0xE8,0xE8,0xE8,0xE8,
+     0xEB,0xEB,0xEB,0xEB,0xEB,0xEB,0xEB,0xEB,
+     0xEB,0xEB,0xEB,0xEB,0xEB,0xEB,0xEB,0xEB,
+     0xEA,0xEA,0xEA,0xEA,0xEA,0xEA,0xEA,0xEA,
+     0xEA,0xEA,0xEA,0xEA,0xEA,0xEA,0xEA,0xEA,
+     0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+     0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+     0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+     0x95,0x95,0x95,0x95,0x95,0x95,0x95,0x95,
+     0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+     0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+     0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+     0x94,0x94,0x94,0x94,0x94,0x94,0x94,0x94,
+     0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+     0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+     0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+     0x97,0x97,0x97,0x97,0x97,0x97,0x97,0x97,
+     0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+     0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+     0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+     0x96,0x96,0x96,0x96,0x96,0x96,0x96,0x96,
+     0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+     0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+     0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+     0x91,0x91,0x91,0x91,0x91,0x91,0x91,0x91,
+     0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+     0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+     0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+     0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,
+     0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+     0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+     0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+     0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,
+     0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+     0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+     0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+     0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,
+     0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,
+     0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,
+     0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,
+     0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,0x9D,
+     0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,
+     0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,
+     0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,
+     0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,0x9C,
+     0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,
+     0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,
+     0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,
+     0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,0x9F,
+     0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,
+     0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,
+     0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,
+     0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,0x9E,
+     0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+     0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+     0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+     0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,
+     0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+     0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+     0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+     0x98,0x98,0x98,0x98,0x98,0x98,0x98,0x98,
+     0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,
+     0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,
+     0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,
+     0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,0x9B,
+     0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,
+     0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,
+     0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,
+     0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,0x9A,
+     0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+     0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+     0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+     0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+     0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+     0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+     0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+     0x85,0x85,0x85,0x85,0x85,0x85,0x85,0x85,
+     0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+     0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+     0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+     0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+     0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+     0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+     0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+     0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,
+     0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+     0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+     0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+     0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+     0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+     0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+     0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+     0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,
+     0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+     0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+     0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+     0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+     0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+     0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+     0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+     0x86,0x86,0x86,0x86,0x86,0x86,0x86,0x86,
+     0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+     0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+     0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+     0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+     0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+     0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+     0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+     0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
+     0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+     0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+     0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+     0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+     0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+     0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+     0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+     0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
+     0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+     0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+     0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+     0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+     0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+     0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+     0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+     0x83,0x83,0x83,0x83,0x83,0x83,0x83,0x83,
+     0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+     0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+     0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+     0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+     0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+     0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+     0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+     0x82,0x82,0x82,0x82,0x82,0x82,0x82,0x82,
+     0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,
+     0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,
+     0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,
+     0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,
+     0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,
+     0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,
+     0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,
+     0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,0x8D,
+     0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,
+     0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,
+     0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,
+     0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,
+     0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,
+     0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,
+     0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,
+     0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,0x8C,
+     0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,
+     0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,
+     0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,
+     0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,
+     0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,
+     0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,
+     0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,
+     0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,0x8F,
+     0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,
+     0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,
+     0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,
+     0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,
+     0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,
+     0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,
+     0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,
+     0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,0x8E,
+     0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+     0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+     0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+     0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+     0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+     0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+     0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+     0x89,0x89,0x89,0x89,0x89,0x89,0x89,0x89,
+     0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+     0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+     0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+     0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+     0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+     0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+     0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+     0x88,0x88,0x88,0x88,0x88,0x88,0x88,0x88,
+     0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,
+     0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,
+     0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,
+     0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,
+     0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,
+     0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,
+     0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,
+     0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,0x8B,
+     0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,
+     0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,
+     0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,
+     0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,
+     0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,
+     0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,
+     0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,
+     0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,0x8A,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,0xB5,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,0xB4,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,0xB7,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,0xB6,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,0xB1,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,0xB0,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,0xB3,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,0xB2,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,0xBD,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,0xBC,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,0xBF,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,0xBE,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,0xB9,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,0xB8,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,0xBB,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,0xBA,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,0xA5,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,0xA4,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,0xA7,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,0xA6,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,0xA1,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,0xA0,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,0xA3,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,0xA2,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,0xAD,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,0xAC,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,0xAF,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,0xAE,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,0xA9,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,0xA8,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,0xAB,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,
+     0x2A,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,0x2B,
+     0x2B,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,
+     0x28,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x29,0x29,0x29,0x29,0x29,0x29,0x29,
+     0x29,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,0x2E,
+     0x2E,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,0x2F,
+     0x2F,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,
+     0x2C,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,0x2D,
+     0x2D,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,
+     0x22,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,
+     0x23,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,
+     0x20,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,
+     0x21,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x26,0x26,0x26,0x26,0x26,0x26,0x26,
+     0x26,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x27,
+     0x27,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,
+     0x24,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x25,0x25,0x25,0x25,0x25,0x25,0x25,
+     0x25,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,0x3A,
+     0x3A,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,0x3B,
+     0x3B,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
+     0x38,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,
+     0x39,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,
+     0x3E,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
+     0x3F,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,0x3C,
+     0x3C,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,0x3D,
+     0x3D,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x32,0x32,0x32,0x32,0x32,0x32,0x32,
+     0x32,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,
+     0x33,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
+     0x30,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x31,0x31,0x31,0x31,0x31,0x31,0x31,
+     0x31,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
+     0x36,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x37,0x37,0x37,0x37,0x37,0x37,0x37,
+     0x37,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x34,0x34,0x34,0x34,0x34,0x34,0x34,
+     0x34,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,
+     0x35,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,
+     0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,
+     0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,
+     0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,
+     0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,
+     0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,
+     0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,
+     0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,
+     0x0A,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,
+     0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,
+     0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,
+     0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,
+     0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,
+     0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,
+     0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,
+     0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,
+     0x0B,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+     0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+     0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+     0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+     0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+     0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+     0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+     0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
+     0x08,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+     0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+     0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+     0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+     0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+     0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+     0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+     0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,
+     0x09,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,
+     0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,
+     0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,
+     0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,
+     0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,
+     0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,
+     0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,
+     0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,
+     0x0E,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
+     0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
+     0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
+     0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
+     0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
+     0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
+     0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
+     0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,
+     0x0F,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,
+     0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,
+     0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,
+     0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,
+     0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,
+     0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,
+     0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,
+     0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,
+     0x0C,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,
+     0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,
+     0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,
+     0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,
+     0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,
+     0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,
+     0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,
+     0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,
+     0x0D,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+     0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+     0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+     0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+     0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+     0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+     0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+     0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
+     0x02,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+     0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+     0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+     0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+     0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+     0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+     0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+     0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
+     0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+     0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+     0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+     0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+     0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+     0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+     0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+     0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+     0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
+     0x01,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+     0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+     0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+     0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+     0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+     0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+     0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+     0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,
+     0x06,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+     0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+     0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+     0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+     0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+     0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+     0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+     0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,
+     0x07,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+     0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+     0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+     0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+     0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+     0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+     0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+     0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x04,
+     0x04,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+     0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+     0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+     0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+     0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+     0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+     0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+     0x05,0x05,0x05,0x05,0x05,0x05,0x05,0x05,
+     0x05,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,
+     0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,
+     0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,
+     0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,0x1A,
+     0x1A,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,
+     0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,
+     0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,
+     0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,0x1B,
+     0x1B,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+     0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+     0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+     0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
+     0x18,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+     0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+     0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+     0x19,0x19,0x19,0x19,0x19,0x19,0x19,0x19,
+     0x19,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
+     0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
+     0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
+     0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,
+     0x1E,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,
+     0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,
+     0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,
+     0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,
+     0x1F,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,
+     0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,
+     0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,
+     0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,
+     0x1C,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,
+     0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,
+     0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,
+     0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,0x1D,
+     0x1D,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+     0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+     0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+     0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,
+     0x12,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+     0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+     0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+     0x13,0x13,0x13,0x13,0x13,0x13,0x13,0x13,
+     0x13,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+     0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+     0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+     0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,
+     0x10,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+     0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+     0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+     0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
+     0x11,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+     0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+     0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+     0x16,0x16,0x16,0x16,0x16,0x16,0x16,0x16,
+     0x16,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+     0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+     0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+     0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,
+     0x17,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+     0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+     0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+     0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,
+     0x14,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+     0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+     0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+     0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,
+     0x15,0x6A,0x6A,0x6A,0x6A,0x6A,0x6A,0x6A,
+     0x6A,0x6A,0x6A,0x6A,0x6A,0x6A,0x6A,0x6A,
+     0x6A,0x6B,0x6B,0x6B,0x6B,0x6B,0x6B,0x6B,
+     0x6B,0x6B,0x6B,0x6B,0x6B,0x6B,0x6B,0x6B,
+     0x6B,0x68,0x68,0x68,0x68,0x68,0x68,0x68,
+     0x68,0x68,0x68,0x68,0x68,0x68,0x68,0x68,
+     0x68,0x69,0x69,0x69,0x69,0x69,0x69,0x69,
+     0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,
+     0x69,0x6E,0x6E,0x6E,0x6E,0x6E,0x6E,0x6E,
+     0x6E,0x6E,0x6E,0x6E,0x6E,0x6E,0x6E,0x6E,
+     0x6E,0x6F,0x6F,0x6F,0x6F,0x6F,0x6F,0x6F,
+     0x6F,0x6F,0x6F,0x6F,0x6F,0x6F,0x6F,0x6F,
+     0x6F,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,
+     0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,
+     0x6C,0x6D,0x6D,0x6D,0x6D,0x6D,0x6D,0x6D,
+     0x6D,0x6D,0x6D,0x6D,0x6D,0x6D,0x6D,0x6D,
+     0x6D,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
+     0x62,0x62,0x62,0x62,0x62,0x62,0x62,0x62,
+     0x62,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
+     0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,
+     0x63,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
+     0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,
+     0x60,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
+     0x61,0x61,0x61,0x61,0x61,0x61,0x61,0x61,
+     0x61,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
+     0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,
+     0x66,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
+     0x67,0x67,0x67,0x67,0x67,0x67,0x67,0x67,
+     0x67,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
+     0x64,0x64,0x64,0x64,0x64,0x64,0x64,0x64,
+     0x64,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
+     0x65,0x65,0x65,0x65,0x65,0x65,0x65,0x65,
+     0x65,0x7A,0x7A,0x7A,0x7A,0x7A,0x7A,0x7A,
+     0x7A,0x7B,0x7B,0x7B,0x7B,0x7B,0x7B,0x7B,
+     0x7B,0x78,0x78,0x78,0x78,0x78,0x78,0x78,
+     0x78,0x79,0x79,0x79,0x79,0x79,0x79,0x79,
+     0x79,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,
+     0x7E,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,
+     0x7F,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,
+     0x7C,0x7D,0x7D,0x7D,0x7D,0x7D,0x7D,0x7D,
+     0x7D,0x72,0x72,0x72,0x72,0x72,0x72,0x72,
+     0x72,0x73,0x73,0x73,0x73,0x73,0x73,0x73,
+     0x73,0x70,0x70,0x70,0x70,0x70,0x70,0x70,
+     0x70,0x71,0x71,0x71,0x71,0x71,0x71,0x71,
+     0x71,0x76,0x76,0x76,0x76,0x76,0x76,0x76,
+     0x76,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
+     0x77,0x74,0x74,0x74,0x74,0x74,0x74,0x74,
+     0x74,0x75,0x75,0x75,0x75,0x75,0x75,0x75,
+     0x75,0x4A,0x4A,0x4A,0x4A,0x4B,0x4B,0x4B,
+     0x4B,0x48,0x48,0x48,0x48,0x49,0x49,0x49,
+     0x49,0x4E,0x4E,0x4E,0x4E,0x4F,0x4F,0x4F,
+     0x4F,0x4C,0x4C,0x4C,0x4C,0x4D,0x4D,0x4D,
+     0x4D,0x42,0x42,0x42,0x42,0x43,0x43,0x43,
+     0x43,0x40,0x40,0x40,0x40,0x41,0x41,0x41,
+     0x41,0x46,0x46,0x46,0x46,0x47,0x47,0x47,
+     0x47,0x44,0x44,0x44,0x44,0x45,0x45,0x45,
+     0x45,0x5A,0x5A,0x5A,0x5A,0x5B,0x5B,0x5B,
+     0x5B,0x58,0x58,0x58,0x58,0x59,0x59,0x59,
+     0x59,0x5E,0x5E,0x5E,0x5E,0x5F,0x5F,0x5F,
+     0x5F,0x5C,0x5C,0x5C,0x5C,0x5D,0x5D,0x5D,
+     0x5D,0x52,0x52,0x52,0x52,0x53,0x53,0x53,
+     0x53,0x50,0x50,0x50,0x50,0x51,0x51,0x51,
+     0x51,0x56,0x56,0x56,0x56,0x57,0x57,0x57,
+     0x57,0x54,0x54,0x54,0x54,0x55,0x55,0x55
+};
+
+const pj_int16_t pjmedia_ulaw2linear_tab[256] = 
+{
+   -32124,-31100,-30076,-29052,-28028,-27004,-25980,-24956,
+   -23932,-22908,-21884,-20860,-19836,-18812,-17788,-16764,
+   -15996,-15484,-14972,-14460,-13948,-13436,-12924,-12412,
+   -11900,-11388,-10876,-10364, -9852, -9340, -8828, -8316,
+    -7932, -7676, -7420, -7164, -6908, -6652, -6396, -6140,
+    -5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092,
+    -3900, -3772, -3644, -3516, -3388, -3260, -3132, -3004,
+    -2876, -2748, -2620, -2492, -2364, -2236, -2108, -1980,
+    -1884, -1820, -1756, -1692, -1628, -1564, -1500, -1436,
+    -1372, -1308, -1244, -1180, -1116, -1052,  -988,  -924,
+     -876,  -844,  -812,  -780,  -748,  -716,  -684,  -652,
+     -620,  -588,  -556,  -524,  -492,  -460,  -428,  -396,
+     -372,  -356,  -340,  -324,  -308,  -292,  -276,  -260,
+     -244,  -228,  -212,  -196,  -180,  -164,  -148,  -132,
+     -120,  -112,  -104,   -96,   -88,   -80,   -72,   -64,
+      -56,   -48,   -40,   -32,   -24,   -16,    -8,     0,
+    32124, 31100, 30076, 29052, 28028, 27004, 25980, 24956,
+    23932, 22908, 21884, 20860, 19836, 18812, 17788, 16764,
+    15996, 15484, 14972, 14460, 13948, 13436, 12924, 12412,
+    11900, 11388, 10876, 10364,  9852,  9340,  8828,  8316,
+     7932,  7676,  7420,  7164,  6908,  6652,  6396,  6140,
+     5884,  5628,  5372,  5116,  4860,  4604,  4348,  4092,
+     3900,  3772,  3644,  3516,  3388,  3260,  3132,  3004,
+     2876,  2748,  2620,  2492,  2364,  2236,  2108,  1980,
+     1884,  1820,  1756,  1692,  1628,  1564,  1500,  1436,
+     1372,  1308,  1244,  1180,  1116,  1052,   988,   924,
+      876,   844,   812,   780,   748,   716,   684,   652,
+      620,   588,   556,   524,   492,   460,   428,   396,
+      372,   356,   340,   324,   308,   292,   276,   260,
+      244,   228,   212,   196,   180,   164,   148,   132,
+      120,   112,   104,    96,    88,    80,    72,    64,
+       56,    48,    40,    32,    24,    16,     8,     0
+};
+
+const pj_int16_t pjmedia_alaw2linear_tab[256] = 
+{
+      -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736,
+      -7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784,
+      -2752, -2624, -3008, -2880, -2240, -2112, -2496, -2368,
+      -3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392,
+     -22016,-20992,-24064,-23040,-17920,-16896,-19968,-18944,
+     -30208,-29184,-32256,-31232,-26112,-25088,-28160,-27136,
+     -11008,-10496,-12032,-11520, -8960, -8448, -9984, -9472,
+     -15104,-14592,-16128,-15616,-13056,-12544,-14080,-13568,
+       -344,  -328,  -376,  -360,  -280,  -264,  -312,  -296,
+       -472,  -456,  -504,  -488,  -408,  -392,  -440,  -424,
+	-88,   -72,  -120,  -104,   -24,    -8,   -56,   -40,
+       -216,  -200,  -248,  -232,  -152,  -136,  -184,  -168,
+      -1376, -1312, -1504, -1440, -1120, -1056, -1248, -1184,
+      -1888, -1824, -2016, -1952, -1632, -1568, -1760, -1696,
+       -688,  -656,  -752,  -720,  -560,  -528,  -624,  -592,
+       -944,  -912, -1008,  -976,  -816,  -784,  -880,  -848,
+       5504,  5248,  6016,  5760,  4480,  4224,  4992,  4736,
+       7552,  7296,  8064,  7808,  6528,  6272,  7040,  6784,
+       2752,  2624,  3008,  2880,  2240,  2112,  2496,  2368,
+       3776,  3648,  4032,  3904,  3264,  3136,  3520,  3392,
+      22016, 20992, 24064, 23040, 17920, 16896, 19968, 18944,
+      30208, 29184, 32256, 31232, 26112, 25088, 28160, 27136,
+      11008, 10496, 12032, 11520,  8960,  8448,  9984,  9472,
+      15104, 14592, 16128, 15616, 13056, 12544, 14080, 13568,
+	344,   328,   376,   360,   280,   264,   312,   296,
+	472,   456,   504,   488,   408,   392,   440,   424,
+	 88,    72,   120,   104,    24,     8,    56,    40,
+	216,   200,   248,   232,   152,   136,   184,   168,
+       1376,  1312,  1504,  1440,  1120,  1056,  1248,  1184,
+       1888,  1824,  2016,  1952,  1632,  1568,  1760,  1696,
+	688,   656,   752,   720,   560,   528,   624,   592,
+	944,   912,  1008,   976,   816,   784,   880,   848
+};
+
+#endif
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/bidirectional.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/bidirectional.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/bidirectional.c	(revision 1163)
@@ -0,0 +1,75 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/bidirectional.h>
+#include <pj/pool.h>
+
+
+#define THIS_FILE   "bidirectional.c"
+#define SIGNATURE   PJMEDIA_PORT_SIGNATURE('B', 'D', 'I', 'R')
+
+struct bidir_port
+{
+    pjmedia_port     base;
+    pjmedia_port    *get_port;
+    pjmedia_port    *put_port;
+};
+
+
+static pj_status_t put_frame(pjmedia_port *this_port, 
+			     const pjmedia_frame *frame)
+{
+    struct bidir_port *p = (struct bidir_port*)this_port;
+    return pjmedia_port_put_frame(p->put_port, frame);
+}
+
+
+static pj_status_t get_frame(pjmedia_port *this_port, 
+			     pjmedia_frame *frame)
+{
+    struct bidir_port *p = (struct bidir_port*)this_port;
+    return pjmedia_port_get_frame(p->get_port, frame);
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_bidirectional_port_create( pj_pool_t *pool,
+						       pjmedia_port *get_port,
+						       pjmedia_port *put_port,
+						       pjmedia_port **p_port )
+{
+    struct bidir_port *port;
+
+    port = pj_pool_zalloc(pool, sizeof(struct bidir_port));
+
+    pjmedia_port_info_init(&port->base.info, &get_port->info.name, SIGNATURE,
+			   get_port->info.clock_rate,
+			   get_port->info.channel_count,
+			   get_port->info.bits_per_sample,
+			   get_port->info.samples_per_frame);
+
+    port->get_port = get_port;
+    port->put_port = put_port;
+
+    port->base.get_frame = &get_frame;
+    port->base.put_frame = &put_frame;
+
+    *p_port = &port->base;
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/clock_thread.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/clock_thread.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/clock_thread.c	(revision 1163)
@@ -0,0 +1,265 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/clock.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/lock.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+
+
+/*
+ * Implementation of media clock with OS thread.
+ */
+
+
+struct pjmedia_clock
+{
+    pj_timestamp	     freq;
+    pj_timestamp	     interval;
+    pj_timestamp	     next_tick;
+    pj_timestamp	     timestamp;
+    unsigned		     samples_per_frame;
+    unsigned		     options;
+    pjmedia_clock_callback  *cb;
+    void		    *user_data;
+    pj_thread_t		    *thread;
+    pj_bool_t		     running;
+    pj_bool_t		     quitting;
+    pj_lock_t		    *lock;
+};
+
+
+static int clock_thread(void *arg);
+
+
+/*
+ * Create media clock.
+ */
+PJ_DEF(pj_status_t) pjmedia_clock_create( pj_pool_t *pool,
+					  unsigned clock_rate,
+					  unsigned samples_per_frame,
+					  unsigned options,
+					  pjmedia_clock_callback *cb,
+					  void *user_data,
+					  pjmedia_clock **p_clock)
+{
+    pjmedia_clock *clock;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(pool && clock_rate && samples_per_frame && p_clock,
+		     PJ_EINVAL);
+
+    clock = pj_pool_alloc(pool, sizeof(pjmedia_clock));
+
+    
+    status = pj_get_timestamp_freq(&clock->freq);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    clock->interval.u64 = samples_per_frame * clock->freq.u64 / clock_rate;
+    clock->next_tick.u64 = 0;
+    clock->timestamp.u64 = 0;
+    clock->samples_per_frame = samples_per_frame;
+    clock->options = options;
+    clock->cb = cb;
+    clock->user_data = user_data;
+    clock->thread = NULL;
+    clock->running = PJ_FALSE;
+    clock->quitting = PJ_FALSE;
+    
+    /* I don't think we need a mutex, so we'll use null. */
+    status = pj_lock_create_null_mutex(pool, "clock", &clock->lock);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    status = pj_thread_create(pool, "clock", &clock_thread, clock,
+			      0, 0, &clock->thread);
+    if (status != PJ_SUCCESS) {
+	pj_lock_destroy(clock->lock);
+	return status;
+    }
+
+
+    *p_clock = clock;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Start the clock. 
+ */
+PJ_DEF(pj_status_t) pjmedia_clock_start(pjmedia_clock *clock)
+{
+    pj_timestamp now;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(clock != NULL, PJ_EINVAL);
+
+    if (clock->running)
+	return PJ_SUCCESS;
+
+    status = pj_get_timestamp(&now);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    pj_lock_acquire(clock->lock);
+    clock->next_tick.u64 = now.u64 + clock->interval.u64;
+    clock->running = PJ_TRUE;
+    pj_lock_release(clock->lock);
+
+    return status;
+}
+
+
+/*
+ * Stop the clock. 
+ */
+PJ_DEF(pj_status_t) pjmedia_clock_stop(pjmedia_clock *clock)
+{
+    PJ_ASSERT_RETURN(clock != NULL, PJ_EINVAL);
+
+    clock->running = PJ_FALSE;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Poll the clock. 
+ */
+PJ_DEF(pj_bool_t) pjmedia_clock_wait( pjmedia_clock *clock,
+				      pj_bool_t wait,
+				      pj_timestamp *ts)
+{
+    pj_timestamp now;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(clock != NULL, PJ_FALSE);
+    PJ_ASSERT_RETURN((clock->options & PJMEDIA_CLOCK_NO_ASYNC) != 0,
+		     PJ_FALSE);
+    PJ_ASSERT_RETURN(clock->running, PJ_FALSE);
+
+    status = pj_get_timestamp(&now);
+    if (status != PJ_SUCCESS)
+	return PJ_FALSE;
+
+    /* Wait for the next tick to happen */
+    if (now.u64 < clock->next_tick.u64) {
+	unsigned msec;
+
+	if (!wait)
+	    return PJ_FALSE;
+
+	msec = pj_elapsed_msec(&now, &clock->next_tick);
+	pj_thread_sleep(msec);
+    }
+
+    /* Call callback, if any */
+    if (clock->cb)
+	(*clock->cb)(&clock->timestamp, clock->user_data);
+
+    /* Report timestamp to caller */
+    if (ts)
+	ts->u64 = clock->timestamp.u64;
+
+    /* Increment timestamp */
+    clock->timestamp.u64 += clock->samples_per_frame;
+
+    /* Calculate next tick */
+    clock->next_tick.u64 += clock->interval.u64;
+
+    /* Done */
+    return PJ_TRUE;
+}
+
+
+/*
+ * Clock thread
+ */
+static int clock_thread(void *arg)
+{
+    pj_timestamp now;
+    pjmedia_clock *clock = arg;
+
+    /* Get the first tick */
+    pj_get_timestamp(&clock->next_tick);
+    clock->next_tick.u64 += clock->interval.u64;
+
+
+    while (!clock->quitting) {
+
+	pj_get_timestamp(&now);
+
+	/* Wait for the next tick to happen */
+	if (now.u64 < clock->next_tick.u64) {
+	    unsigned msec;
+	    msec = pj_elapsed_msec(&now, &clock->next_tick);
+	    pj_thread_sleep(msec);
+	}
+
+	/* Skip if not running */
+	if (!clock->running)
+	    continue;
+
+	pj_lock_acquire(clock->lock);
+
+	/* Call callback, if any */
+	if (clock->cb)
+	    (*clock->cb)(&clock->timestamp, clock->user_data);
+
+	/* Increment timestamp */
+	clock->timestamp.u64 += clock->samples_per_frame;
+
+	/* Calculate next tick */
+	clock->next_tick.u64 += clock->interval.u64;
+
+	pj_lock_release(clock->lock);
+    }
+
+    return 0;
+}
+
+
+/*
+ * Destroy the clock. 
+ */
+PJ_DEF(pj_status_t) pjmedia_clock_destroy(pjmedia_clock *clock)
+{
+    PJ_ASSERT_RETURN(clock != NULL, PJ_EINVAL);
+
+    clock->running = PJ_FALSE;
+    clock->quitting = PJ_TRUE;
+
+    if (clock->thread) {
+	pj_thread_join(clock->thread);
+	pj_thread_destroy(clock->thread);
+	clock->thread = NULL;
+    }
+
+    if (clock->lock) {
+	pj_lock_destroy(clock->lock);
+	clock->lock = NULL;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/codec.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/codec.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/codec.c	(revision 1163)
@@ -0,0 +1,415 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/codec.h>
+#include <pjmedia/errno.h>
+#include <pj/array.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+#define THIS_FILE   "codec.c"
+
+
+
+
+/* Sort codecs in codec manager based on priorities */
+static void sort_codecs(pjmedia_codec_mgr *mgr);
+
+
+/*
+ * Initialize codec manager.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_mgr_init (pjmedia_codec_mgr *mgr)
+{
+    PJ_ASSERT_RETURN(mgr, PJ_EINVAL);
+
+    pj_list_init (&mgr->factory_list);
+    mgr->codec_cnt = 0;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Register a codec factory.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_codec_mgr_register_factory( pjmedia_codec_mgr *mgr,
+				    pjmedia_codec_factory *factory)
+{
+    pjmedia_codec_info info[PJMEDIA_CODEC_MGR_MAX_CODECS];
+    unsigned i, count;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(mgr && factory, PJ_EINVAL);
+
+    /* Enum codecs */
+    count = PJ_ARRAY_SIZE(info);
+    status = factory->op->enum_info(factory, &count, info);
+    if (status != PJ_SUCCESS)
+	return status;
+    
+
+    /* Check codec count */
+    if (count + mgr->codec_cnt > PJ_ARRAY_SIZE(mgr->codec_desc))
+	return PJ_ETOOMANY;
+
+
+    /* Save the codecs */
+    for (i=0; i<count; ++i) {
+	pj_memcpy( &mgr->codec_desc[mgr->codec_cnt+i],
+		   &info[i], sizeof(pjmedia_codec_info));
+	mgr->codec_desc[mgr->codec_cnt+i].prio = PJMEDIA_CODEC_PRIO_NORMAL;
+	mgr->codec_desc[mgr->codec_cnt+i].factory = factory;
+	pjmedia_codec_info_to_id( &info[i],
+				  mgr->codec_desc[mgr->codec_cnt+i].id,
+				  sizeof(pjmedia_codec_id));
+    }
+
+    /* Update count */
+    mgr->codec_cnt += count;
+
+    /* Re-sort codec based on priorities */
+    sort_codecs(mgr);
+
+    /* Add factory to the list */
+    pj_list_push_back(&mgr->factory_list, factory);
+
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Unregister a codec factory.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_codec_mgr_unregister_factory(pjmedia_codec_mgr *mgr, 
+				     pjmedia_codec_factory *factory)
+{
+    unsigned i;
+    PJ_ASSERT_RETURN(mgr && factory, PJ_EINVAL);
+
+    /* Factory must be registered. */
+    PJ_ASSERT_RETURN(pj_list_find_node(&mgr->factory_list, factory)==factory,
+		     PJ_ENOTFOUND);
+
+    /* Erase factory from the factory list */
+    pj_list_erase(factory);
+
+
+    /* Remove all supported codecs from the codec manager that were created 
+     * by the specified factory.
+     */
+    for (i=0; i<mgr->codec_cnt; ) {
+
+	if (mgr->codec_desc[i].factory == factory) {
+
+	    pj_array_erase(mgr->codec_desc, sizeof(mgr->codec_desc[0]), 
+			   mgr->codec_cnt, i);
+	    --mgr->codec_cnt;
+
+	} else {
+	    ++i;
+	}
+    }
+
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Enum all codecs.
+ */
+PJ_DEF(pj_status_t)
+pjmedia_codec_mgr_enum_codecs(pjmedia_codec_mgr *mgr, 
+			      unsigned *count, 
+			      pjmedia_codec_info codecs[],
+			      unsigned *prio)
+{
+    unsigned i;
+
+    PJ_ASSERT_RETURN(mgr && count && codecs, PJ_EINVAL);
+
+    if (*count > mgr->codec_cnt)
+	*count = mgr->codec_cnt;
+    
+    for (i=0; i<*count; ++i) {
+	pj_memcpy(&codecs[i], 
+		  &mgr->codec_desc[i].info, 
+		  sizeof(pjmedia_codec_info));
+    }
+
+    if (prio) {
+	for (i=0; i < *count; ++i)
+	    prio[i] = mgr->codec_desc[i].prio;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get codec info for static payload type.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_codec_mgr_get_codec_info( pjmedia_codec_mgr *mgr,
+				  unsigned pt,
+				  const pjmedia_codec_info **p_info)
+{
+    unsigned i;
+
+    PJ_ASSERT_RETURN(mgr && p_info && pt>=0 && pt < 96, PJ_EINVAL);
+
+    for (i=0; i<mgr->codec_cnt; ++i) {
+	if (mgr->codec_desc[i].info.pt == pt) {
+	    *p_info = &mgr->codec_desc[i].info;
+	    return PJ_SUCCESS;
+	}
+    }
+
+    return PJMEDIA_CODEC_EUNSUP;
+}
+
+
+/*
+ * Convert codec info struct into a unique codec identifier.
+ * A codec identifier looks something like "L16/44100/2".
+ */
+PJ_DEF(char*) pjmedia_codec_info_to_id( const pjmedia_codec_info *info,
+				        char *id, unsigned max_len )
+{
+    int len;
+
+    PJ_ASSERT_RETURN(info && id && max_len, NULL);
+
+    len = pj_ansi_snprintf(id, max_len, "%.*s/%u/%u", 
+			   (int)info->encoding_name.slen,
+			   info->encoding_name.ptr,
+			   info->clock_rate,
+			   info->channel_cnt);
+
+    if (len < 1 || len >= (int)max_len) {
+	id[0] = '\0';
+	return NULL;
+    }
+
+    return id;
+}
+
+
+/*
+ * Find codecs by the unique codec identifier. This function will find
+ * all codecs that match the codec identifier prefix. For example, if
+ * "L16" is specified, then it will find "L16/8000/1", "L16/16000/1",
+ * and so on, up to the maximum count specified in the argument.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_codec_mgr_find_codecs_by_id( pjmedia_codec_mgr *mgr,
+				     const pj_str_t *codec_id,
+				     unsigned *count,
+				     const pjmedia_codec_info *p_info[],
+				     unsigned prio[])
+{
+    unsigned i, found = 0;
+
+    PJ_ASSERT_RETURN(mgr && codec_id && count && *count, PJ_EINVAL);
+
+    for (i=0; i<mgr->codec_cnt; ++i) {
+
+	if (pj_strnicmp2(codec_id, mgr->codec_desc[i].id, 
+			 codec_id->slen) == 0) 
+	{
+
+	    if (p_info)
+		p_info[found] = &mgr->codec_desc[i].info;
+	    if (prio)
+		prio[found] = mgr->codec_desc[i].prio;
+
+	    ++found;
+
+	    if (found >= *count)
+		break;
+	}
+
+    }
+
+    *count = found;
+
+    return found ? PJ_SUCCESS : PJ_ENOTFOUND;
+}
+
+
+/* Swap two codecs positions in codec manager */
+static void swap_codec(pjmedia_codec_mgr *mgr, unsigned i, unsigned j)
+{
+    struct pjmedia_codec_desc tmp;
+
+    pj_memcpy(&tmp, &mgr->codec_desc[i], sizeof(struct pjmedia_codec_desc));
+
+    pj_memcpy(&mgr->codec_desc[i], &mgr->codec_desc[j], 
+	       sizeof(struct pjmedia_codec_desc));
+
+    pj_memcpy(&mgr->codec_desc[j], &tmp, sizeof(struct pjmedia_codec_desc));
+}
+
+
+/* Sort codecs in codec manager based on priorities */
+static void sort_codecs(pjmedia_codec_mgr *mgr)
+{
+    unsigned i;
+
+   /* Re-sort */
+    for (i=0; i<mgr->codec_cnt; ++i) {
+	unsigned j, max;
+
+	for (max=i, j=i+1; j<mgr->codec_cnt; ++j) {
+	    if (mgr->codec_desc[j].prio > mgr->codec_desc[max].prio)
+		max = j;
+	}
+
+	if (max != i)
+	    swap_codec(mgr, i, max);
+    }
+
+    /* Change PJMEDIA_CODEC_PRIO_HIGHEST codecs to NEXT_HIGHER */
+    for (i=0; i<mgr->codec_cnt; ++i) {
+	if (mgr->codec_desc[i].prio == PJMEDIA_CODEC_PRIO_HIGHEST)
+	    mgr->codec_desc[i].prio = PJMEDIA_CODEC_PRIO_NEXT_HIGHER;
+	else
+	    break;
+    }
+}
+
+
+/**
+ * Set codec priority. The codec priority determines the order of
+ * the codec in the SDP created by the endpoint. If more than one codecs
+ * are found with the same codec_id prefix, then the function sets the
+ * priorities of all those codecs.
+ */
+PJ_DEF(pj_status_t)
+pjmedia_codec_mgr_set_codec_priority(pjmedia_codec_mgr *mgr, 
+				     const pj_str_t *codec_id,
+				     pj_uint8_t prio)
+{
+    unsigned i, found = 0;
+
+    PJ_ASSERT_RETURN(mgr && codec_id, PJ_EINVAL);
+
+    /* Update the priorities of affected codecs */
+    for (i=0; i<mgr->codec_cnt; ++i) 
+    {
+	if (codec_id->slen == 0 ||
+	    pj_strnicmp2(codec_id, mgr->codec_desc[i].id, 
+			 codec_id->slen) == 0) 
+	{
+	    mgr->codec_desc[i].prio = prio;
+	    ++found;
+	}
+    }
+
+    if (!found)
+	return PJ_ENOTFOUND;
+
+    /* Re-sort codecs */
+    sort_codecs(mgr);
+ 
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Allocate one codec.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_mgr_alloc_codec(pjmedia_codec_mgr *mgr, 
+						  const pjmedia_codec_info *info,
+						  pjmedia_codec **p_codec)
+{
+    pjmedia_codec_factory *factory;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(mgr && info && p_codec, PJ_EINVAL);
+
+    *p_codec = NULL;
+
+    factory = mgr->factory_list.next;
+    while (factory != &mgr->factory_list) {
+
+	if ( (*factory->op->test_alloc)(factory, info) == PJ_SUCCESS ) {
+
+	    status = (*factory->op->alloc_codec)(factory, info, p_codec);
+	    if (status == PJ_SUCCESS)
+		return PJ_SUCCESS;
+
+	}
+
+	factory = factory->next;
+    }
+
+
+    return PJMEDIA_CODEC_EUNSUP;
+}
+
+
+/*
+ * Get default codec parameter.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_mgr_get_default_param( pjmedia_codec_mgr *mgr,
+							const pjmedia_codec_info *info,
+							pjmedia_codec_param *param )
+{
+    pjmedia_codec_factory *factory;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(mgr && info && param, PJ_EINVAL);
+
+    factory = mgr->factory_list.next;
+    while (factory != &mgr->factory_list) {
+
+	if ( (*factory->op->test_alloc)(factory, info) == PJ_SUCCESS ) {
+
+	    status = (*factory->op->default_attr)(factory, info, param);
+	    if (status == PJ_SUCCESS)
+		return PJ_SUCCESS;
+
+	}
+
+	factory = factory->next;
+    }
+
+
+    return PJMEDIA_CODEC_EUNSUP;
+}
+
+
+/*
+ * Dealloc codec.
+ */
+PJ_DEF(pj_status_t) pjmedia_codec_mgr_dealloc_codec(pjmedia_codec_mgr *mgr, 
+						    pjmedia_codec *codec)
+{
+    PJ_ASSERT_RETURN(mgr && codec, PJ_EINVAL);
+
+    return (*codec->factory->op->dealloc_codec)(codec->factory, codec);
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/conference.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/conference.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/conference.c	(revision 1163)
@@ -0,0 +1,1931 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/conference.h>
+#include <pjmedia/alaw_ulaw.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/port.h>
+#include <pjmedia/resample.h>
+#include <pjmedia/silencedet.h>
+#include <pjmedia/sound_port.h>
+#include <pjmedia/stream.h>
+#include <pj/array.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+
+/* CONF_DEBUG enables detailed operation of the conference bridge.
+ * Beware that it prints large amounts of logs (several lines per frame).
+ */
+//#define CONF_DEBUG
+#ifdef CONF_DEBUG
+#   include <stdio.h>
+#   define TRACE_(x)   PJ_LOG(5,x)
+#else
+#   define TRACE_(x)
+#endif
+
+
+/* REC_FILE macro enables recording of the samples written to the sound
+ * device. The file contains RAW PCM data with no header, and has the
+ * same settings (clock rate etc) as the conference bridge.
+ * This should only be enabled when debugging audio quality *only*.
+ */
+//#define REC_FILE    "confrec.pcm"
+#ifdef REC_FILE
+static FILE *fhnd_rec;
+#endif
+
+
+#define THIS_FILE	"conference.c"
+#define RX_BUF_COUNT	PJMEDIA_SOUND_BUFFER_COUNT
+
+#define BYTES_PER_SAMPLE    2
+
+#define SIGNATURE	    PJMEDIA_PORT_SIGNATURE('C', 'O', 'N', 'F')
+#define SIGNATURE_PORT	    PJMEDIA_PORT_SIGNATURE('C', 'O', 'N', 'P')
+/* Normal level is hardcodec to 128 in all over places */
+#define NORMAL_LEVEL	    128
+#define SLOT_TYPE	    unsigned
+#define INVALID_SLOT	    ((SLOT_TYPE)-1)
+
+
+/* These are settings to control the adaptivity of changes in the
+ * signal level of the ports, so that sudden change in signal level
+ * in the port does not cause misaligned signal (which causes noise).
+ */
+#if 1
+#   define ATTACK_A	    10
+#   define ATTACK_B	    2
+#   define DECAY_A	    10
+#   define DECAY_B	    2
+#else
+    /* To simulate old behavior */
+#   define ATTACK_A	    0
+#   define ATTACK_B	    1
+#   define DECAY_A	    0
+#   define DECAY_B	    1
+#endif
+
+
+
+/*
+ * DON'T GET CONFUSED WITH TX/RX!!
+ *
+ * TX and RX directions are always viewed from the conference bridge's point
+ * of view, and NOT from the port's point of view. So TX means the bridge
+ * is transmitting to the port, RX means the bridge is receiving from the
+ * port.
+ */
+
+
+/**
+ * This is a port connected to conference bridge.
+ */
+struct conf_port
+{
+    pj_str_t		 name;		/**< Port name.			    */
+    pjmedia_port	*port;		/**< get_frame() and put_frame()    */
+    pjmedia_port_op	 rx_setting;	/**< Can we receive from this port  */
+    pjmedia_port_op	 tx_setting;	/**< Can we transmit to this port   */
+    unsigned		 listener_cnt;	/**< Number of listeners.	    */
+    SLOT_TYPE		*listener_slots;/**< Array of listeners.	    */
+    unsigned		 transmitter_cnt;/**<Number of transmitters.	    */
+    pjmedia_silence_det	*vad;		/**< VAD for this port.		    */
+
+    /* Shortcut for port info. */
+    unsigned		 clock_rate;	/**< Port's clock rate.		    */
+    unsigned		 samples_per_frame; /**< Port's samples per frame.  */
+
+    /* Last level calculated from this port */
+    pj_int32_t		 last_level;
+
+    /* Calculated signal levels: */
+    unsigned		 tx_level;	/**< Last tx level to this port.    */
+    unsigned		 rx_level;	/**< Last rx level from this port.  */
+
+    /* The normalized signal level adjustment.
+     * A value of 128 (NORMAL_LEVEL) means there's no adjustment.
+     */
+    unsigned		 tx_adj_level;	/**< Adjustment for TX.		    */
+    unsigned		 rx_adj_level;	/**< Adjustment for RX.		    */
+
+    /* Resample, for converting clock rate, if they're different. */
+    pjmedia_resample	*rx_resample;
+    pjmedia_resample	*tx_resample;
+
+    /* RX buffer is temporary buffer to be used when there is mismatch
+     * between port's sample rate or ptime with conference's sample rate
+     * or ptime. The buffer is used for sampling rate conversion AND/OR to
+     * buffer the samples until there are enough samples to fulfill a 
+     * complete frame to be processed by the bridge.
+     *
+     * When both sample rate AND ptime of the port match the conference 
+     * settings, this buffer will not be created.
+     * 
+     * This buffer contains samples at port's clock rate.
+     * The size of this buffer is the sum between port's samples per frame
+     * and bridge's samples per frame.
+     */
+    pj_int16_t		*rx_buf;	/**< The RX buffer.		    */
+    unsigned		 rx_buf_cap;	/**< Max size, in samples	    */
+    unsigned		 rx_buf_count;	/**< # of samples in the buf.	    */
+
+    /* Mix buf is a temporary buffer used to calculate the average signal
+     * received by this port from all other ports. Samples from all ports
+     * that are transmitting to this port will be accumulated here, then
+     * they will be divided by the source level before the samples are put
+     * to the TX buffer of this port.
+     *
+     * This buffer contains samples at bridge's clock rate.
+     * The size of this buffer is equal to samples per frame of the bridge.
+     *
+     * Note that the samples here are unsigned 32bit.
+     */
+    unsigned		 src_level;	/**< Sum of input levels	    */
+    unsigned		 src_cnt;	/**< Number of sources.		    */
+    pj_uint32_t		*mix_buf;	/**< Total sum of signal.	    */
+
+    /* Tx buffer is a temporary buffer to be used when there's mismatch 
+     * between port's clock rate or ptime with conference's sample rate
+     * or ptime. This buffer is used as the source of the sampling rate
+     * conversion AND/OR to buffer the samples until there are enough
+     * samples to fulfill a complete frame to be transmitted to the port.
+     *
+     * When both sample rate and ptime of the port match the bridge's 
+     * settings, this buffer will not be created.
+     * 
+     * This buffer contains samples at port's clock rate.
+     * The size of this buffer is the sum between port's samples per frame
+     * and bridge's samples per frame.
+     */
+    pj_int16_t		*tx_buf;	/**< Tx buffer.			    */
+    unsigned		 tx_buf_cap;	/**< Max size, in samples.	    */
+    unsigned		 tx_buf_count;	/**< # of samples in the buffer.    */
+
+    /* Snd buffers is a special buffer for sound device port (port 0, master
+     * port). It's not used by other ports.
+     *
+     * There are multiple numbers of this buffer, because we can not expect
+     * the mic and speaker thread to run equally after one another. In most
+     * systems, each thread will run multiple times before the other thread
+     * gains execution time. For example, in my system, mic thread is called
+     * three times, then speaker thread is called three times, and so on.
+     */
+    int			 snd_write_pos, snd_read_pos;
+    pj_int16_t		*snd_buf[RX_BUF_COUNT];	/**< Buffer 		    */
+};
+
+
+/*
+ * Conference bridge.
+ */
+struct pjmedia_conf
+{
+    unsigned		  options;	/**< Bitmask options.		    */
+    unsigned		  max_ports;	/**< Maximum ports.		    */
+    unsigned		  port_cnt;	/**< Current number of ports.	    */
+    unsigned		  connect_cnt;	/**< Total number of connections    */
+    pjmedia_snd_port	 *snd_dev_port;	/**< Sound device port.		    */
+    pjmedia_port	 *master_port;	/**< Port zero's port.		    */
+    char		  master_name_buf[80]; /**< Port0 name buffer.	    */
+    pj_mutex_t		 *mutex;	/**< Conference mutex.		    */
+    struct conf_port	**ports;	/**< Array of ports.		    */
+    pj_uint16_t		 *uns_buf;	/**< Buf for unsigned conversion    */
+    unsigned		  clock_rate;	/**< Sampling rate.		    */
+    unsigned		  channel_count;/**< Number of channels (1=mono).   */
+    unsigned		  samples_per_frame;	/**< Samples per frame.	    */
+    unsigned		  bits_per_sample;	/**< Bits per sample.	    */
+};
+
+
+/* Prototypes */
+static pj_status_t put_frame(pjmedia_port *this_port, 
+			     const pjmedia_frame *frame);
+static pj_status_t get_frame(pjmedia_port *this_port, 
+			     pjmedia_frame *frame);
+static pj_status_t get_frame_pasv(pjmedia_port *this_port, 
+				  pjmedia_frame *frame);
+static pj_status_t destroy_port(pjmedia_port *this_port);
+
+
+/*
+ * Create port.
+ */
+static pj_status_t create_conf_port( pj_pool_t *pool,
+				     pjmedia_conf *conf,
+				     pjmedia_port *port,
+				     const pj_str_t *name,
+				     struct conf_port **p_conf_port)
+{
+    struct conf_port *conf_port;
+    pj_status_t status;
+
+    /* Create port. */
+    conf_port = pj_pool_zalloc(pool, sizeof(struct conf_port));
+    PJ_ASSERT_RETURN(conf_port, PJ_ENOMEM);
+
+    /* Set name */
+    pj_strdup_with_null(pool, &conf_port->name, name);
+
+    /* Default has tx and rx enabled. */
+    conf_port->rx_setting = PJMEDIA_PORT_ENABLE;
+    conf_port->tx_setting = PJMEDIA_PORT_ENABLE;
+
+    /* Default level adjustment is 128 (which means no adjustment) */
+    conf_port->tx_adj_level = NORMAL_LEVEL;
+    conf_port->rx_adj_level = NORMAL_LEVEL;
+
+    /* Create transmit flag array */
+    conf_port->listener_slots = pj_pool_zalloc(pool, 
+					  conf->max_ports * sizeof(SLOT_TYPE));
+    PJ_ASSERT_RETURN(conf_port->listener_slots, PJ_ENOMEM);
+
+    /* Save some port's infos, for convenience. */
+    if (port) {
+	conf_port->port = port;
+	conf_port->clock_rate = port->info.clock_rate;
+	conf_port->samples_per_frame = port->info.samples_per_frame;
+    } else {
+	conf_port->port = NULL;
+	conf_port->clock_rate = conf->clock_rate;
+	conf_port->samples_per_frame = conf->samples_per_frame;
+    }
+
+    /* Create and init vad. */
+    status = pjmedia_silence_det_create( pool, 
+					 conf_port->clock_rate,
+					 conf_port->samples_per_frame,
+					 &conf_port->vad);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Set fixed */
+    pjmedia_silence_det_set_fixed(conf_port->vad, 2);
+
+    /* Set VAD name */
+    pjmedia_silence_det_set_name(conf_port->vad, conf_port->name.ptr);
+
+    /* If port's clock rate is different than conference's clock rate,
+     * create a resample sessions.
+     */
+    if (conf_port->clock_rate != conf->clock_rate) {
+
+	pj_bool_t high_quality;
+	pj_bool_t large_filter;
+
+	high_quality = ((conf->options & PJMEDIA_CONF_USE_LINEAR)==0);
+	large_filter = ((conf->options & PJMEDIA_CONF_SMALL_FILTER)==0);
+
+	/* Create resample for rx buffer. */
+	status = pjmedia_resample_create( pool, 
+					  high_quality,
+					  large_filter,
+					  conf_port->clock_rate,/* Rate in */
+					  conf->clock_rate, /* Rate out */
+					  conf->samples_per_frame * 
+					    conf_port->clock_rate /
+					    conf->clock_rate,
+					  &conf_port->rx_resample);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+
+	/* Create resample for tx buffer. */
+	status = pjmedia_resample_create(pool,
+					 high_quality,
+					 large_filter,
+					 conf->clock_rate,  /* Rate in */
+					 conf_port->clock_rate, /* Rate out */
+					 conf->samples_per_frame,
+					 &conf_port->tx_resample);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    /*
+     * Initialize rx and tx buffer, only when port's samples per frame or 
+     * port's clock rate is different then the conference bridge settings.
+     */
+    if (conf_port->clock_rate != conf->clock_rate ||
+	conf_port->samples_per_frame != conf->samples_per_frame)
+    {
+	/* Create RX buffer. */
+	conf_port->rx_buf_cap = (unsigned)(conf_port->samples_per_frame +
+					   conf->samples_per_frame * 
+					   conf_port->clock_rate * 1.0 /
+					   conf->clock_rate);
+	conf_port->rx_buf_count = 0;
+	conf_port->rx_buf = pj_pool_alloc(pool, conf_port->rx_buf_cap *
+						sizeof(conf_port->rx_buf[0]));
+	PJ_ASSERT_RETURN(conf_port->rx_buf, PJ_ENOMEM);
+
+	/* Create TX buffer. */
+	conf_port->tx_buf_cap = conf_port->rx_buf_cap;
+	conf_port->tx_buf_count = 0;
+	conf_port->tx_buf = pj_pool_alloc(pool, conf_port->tx_buf_cap *
+						sizeof(conf_port->tx_buf[0]));
+	PJ_ASSERT_RETURN(conf_port->tx_buf, PJ_ENOMEM);
+    }
+
+
+    /* Create mix buffer. */
+    conf_port->mix_buf = pj_pool_zalloc(pool, conf->samples_per_frame *
+					      sizeof(conf_port->mix_buf[0]));
+    PJ_ASSERT_RETURN(conf_port->mix_buf, PJ_ENOMEM);
+
+
+    /* Done */
+    *p_conf_port = conf_port;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Add passive port.
+ */
+static pj_status_t create_pasv_port( pjmedia_conf *conf,
+				     pj_pool_t *pool,
+				     const pj_str_t *name,
+				     pjmedia_port *port,
+				     struct conf_port **p_conf_port)
+{
+    struct conf_port *conf_port;
+    unsigned i;
+    pj_status_t status;
+
+    /* Create port */
+    status = create_conf_port(pool, conf, port, name, &conf_port);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Passive port has rx buffers. */
+    for (i=0; i<RX_BUF_COUNT; ++i) {
+	conf_port->snd_buf[i] = pj_pool_zalloc(pool, conf->samples_per_frame *
+					      sizeof(conf_port->snd_buf[0][0]));
+	if (conf_port->snd_buf[i] == NULL) {
+	    return PJ_ENOMEM;
+	}
+    }
+    conf_port->snd_write_pos = 0;
+    conf_port->snd_read_pos = 0;
+
+    *p_conf_port = conf_port;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create port zero for the sound device.
+ */
+static pj_status_t create_sound_port( pj_pool_t *pool,
+				      pjmedia_conf *conf )
+{
+    struct conf_port *conf_port;
+    pj_str_t name = { "Master/sound", 12 };
+    pj_status_t status;
+
+
+    status = create_pasv_port(conf, pool, &name, NULL, &conf_port);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    /* Create sound device port: */
+
+    if ((conf->options & PJMEDIA_CONF_NO_DEVICE) == 0) {
+	pjmedia_snd_stream *strm;
+	pjmedia_snd_stream_info si;
+
+	/*
+	 * If capture is disabled then create player only port.
+	 * Otherwise create bidirectional sound device port.
+	 */
+	if (conf->options & PJMEDIA_CONF_NO_MIC)  {
+	    status = pjmedia_snd_port_create_player(pool, -1, conf->clock_rate,
+						    conf->channel_count,
+						    conf->samples_per_frame,
+						    conf->bits_per_sample, 
+						    0,	/* options */
+						    &conf->snd_dev_port);
+
+	} else {
+	    status = pjmedia_snd_port_create( pool, -1, -1, conf->clock_rate, 
+					      conf->channel_count, 
+					      conf->samples_per_frame,
+					      conf->bits_per_sample,
+					      0,    /* Options */
+					      &conf->snd_dev_port);
+	}
+
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	strm = pjmedia_snd_port_get_snd_stream(conf->snd_dev_port);
+	status = pjmedia_snd_stream_get_info(strm, &si);
+	if (status == PJ_SUCCESS) {
+	    const pjmedia_snd_dev_info *snd_dev_info;
+	    if (conf->options & PJMEDIA_CONF_NO_MIC)
+		snd_dev_info = pjmedia_snd_get_dev_info(si.play_id);
+	    else
+		snd_dev_info = pjmedia_snd_get_dev_info(si.rec_id);
+	    pj_strdup2_with_null(pool, &conf_port->name, snd_dev_info->name);
+	}
+    }
+
+
+     /* Add the port to the bridge */
+    conf->ports[0] = conf_port;
+    conf->port_cnt++;
+
+
+    PJ_LOG(5,(THIS_FILE, "Sound device successfully created for port 0"));
+    return PJ_SUCCESS;
+}
+
+/*
+ * Create conference bridge.
+ */
+PJ_DEF(pj_status_t) pjmedia_conf_create( pj_pool_t *pool,
+					 unsigned max_ports,
+					 unsigned clock_rate,
+					 unsigned channel_count,
+					 unsigned samples_per_frame,
+					 unsigned bits_per_sample,
+					 unsigned options,
+					 pjmedia_conf **p_conf )
+{
+    pjmedia_conf *conf;
+    const pj_str_t name = { "Conf", 4 };
+    pj_status_t status;
+
+    /* Can only accept 16bits per sample, for now.. */
+    PJ_ASSERT_RETURN(bits_per_sample == 16, PJ_EINVAL);
+
+    PJ_LOG(5,(THIS_FILE, "Creating conference bridge with %d ports",
+	      max_ports));
+
+    /* Create and init conf structure. */
+    conf = pj_pool_zalloc(pool, sizeof(pjmedia_conf));
+    PJ_ASSERT_RETURN(conf, PJ_ENOMEM);
+
+    conf->ports = pj_pool_zalloc(pool, max_ports*sizeof(void*));
+    PJ_ASSERT_RETURN(conf->ports, PJ_ENOMEM);
+
+    conf->options = options;
+    conf->max_ports = max_ports;
+    conf->clock_rate = clock_rate;
+    conf->channel_count = channel_count;
+    conf->samples_per_frame = samples_per_frame;
+    conf->bits_per_sample = bits_per_sample;
+
+    
+    /* Create and initialize the master port interface. */
+    conf->master_port = pj_pool_zalloc(pool, sizeof(pjmedia_port));
+    PJ_ASSERT_RETURN(conf->master_port, PJ_ENOMEM);
+    
+    pjmedia_port_info_init(&conf->master_port->info, &name, SIGNATURE,
+			   clock_rate, channel_count, bits_per_sample,
+			   samples_per_frame);
+
+    conf->master_port->port_data.pdata = conf;
+    conf->master_port->port_data.ldata = 0;
+
+    conf->master_port->get_frame = &get_frame;
+    conf->master_port->put_frame = &put_frame;
+    conf->master_port->on_destroy = &destroy_port;
+
+
+    /* Create port zero for sound device. */
+    status = create_sound_port(pool, conf);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create temporary buffer. */
+    conf->uns_buf = pj_pool_zalloc(pool, samples_per_frame *
+					 sizeof(conf->uns_buf[0]));
+
+    /* Create mutex. */
+    status = pj_mutex_create_recursive(pool, "conf", &conf->mutex);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* If sound device was created, connect sound device to the
+     * master port.
+     */
+    if (conf->snd_dev_port) {
+	status = pjmedia_snd_port_connect( conf->snd_dev_port, 
+					   conf->master_port );
+	if (status != PJ_SUCCESS) {
+	    pjmedia_conf_destroy(conf);
+	    return status;
+	}
+    }
+
+
+    /* Done */
+
+    *p_conf = conf;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Pause sound device.
+ */
+static pj_status_t pause_sound( pjmedia_conf *conf )
+{
+    /* Do nothing. */
+    PJ_UNUSED_ARG(conf);
+    return PJ_SUCCESS;
+}
+
+/*
+ * Resume sound device.
+ */
+static pj_status_t resume_sound( pjmedia_conf *conf )
+{
+    /* Do nothing. */
+    PJ_UNUSED_ARG(conf);
+    return PJ_SUCCESS;
+}
+
+
+/**
+ * Destroy conference bridge.
+ */
+PJ_DEF(pj_status_t) pjmedia_conf_destroy( pjmedia_conf *conf )
+{
+    PJ_ASSERT_RETURN(conf != NULL, PJ_EINVAL);
+
+    /* Destroy sound device port. */
+    if (conf->snd_dev_port) {
+	pjmedia_snd_port_destroy(conf->snd_dev_port);
+	conf->snd_dev_port = NULL;
+    }
+
+    /* Destroy mutex */
+    pj_mutex_destroy(conf->mutex);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Destroy the master port (will destroy the conference)
+ */
+static pj_status_t destroy_port(pjmedia_port *this_port)
+{
+    pjmedia_conf *conf = this_port->port_data.pdata;
+    return pjmedia_conf_destroy(conf);
+}
+
+
+/*
+ * Get port zero interface.
+ */
+PJ_DEF(pjmedia_port*) pjmedia_conf_get_master_port(pjmedia_conf *conf)
+{
+    /* Sanity check. */
+    PJ_ASSERT_RETURN(conf != NULL, NULL);
+
+    /* Can only return port interface when PJMEDIA_CONF_NO_DEVICE was
+     * present in the option.
+     */
+    PJ_ASSERT_RETURN((conf->options & PJMEDIA_CONF_NO_DEVICE) != 0, NULL);
+    
+    return conf->master_port;
+}
+
+
+/*
+ * Set master port name.
+ */
+PJ_DEF(pj_status_t) pjmedia_conf_set_port0_name(pjmedia_conf *conf,
+						const pj_str_t *name)
+{
+    int len;
+
+    /* Sanity check. */
+    PJ_ASSERT_RETURN(conf != NULL && name != NULL, PJ_EINVAL);
+
+    len = name->slen;
+    if (len > sizeof(conf->master_name_buf))
+	len = sizeof(conf->master_name_buf);
+    
+    if (len > 0) pj_memcpy(conf->master_name_buf, name->ptr, len);
+
+    conf->ports[0]->name.ptr = conf->master_name_buf;
+    conf->ports[0]->name.slen = len;
+
+    if (conf->master_port)
+	conf->master_port->info.name = conf->ports[0]->name;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Add stream port to the conference bridge.
+ */
+PJ_DEF(pj_status_t) pjmedia_conf_add_port( pjmedia_conf *conf,
+					   pj_pool_t *pool,
+					   pjmedia_port *strm_port,
+					   const pj_str_t *port_name,
+					   unsigned *p_port )
+{
+    struct conf_port *conf_port;
+    unsigned index;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(conf && pool && strm_port, PJ_EINVAL);
+
+    /* If port_name is not specified, use the port's name */
+    if (!port_name)
+	port_name = &strm_port->info.name;
+
+    /* For this version of PJMEDIA, port MUST have the same number of
+     * PCM channels.
+     */
+    if (strm_port->info.channel_count != conf->channel_count) {
+	pj_assert(!"Number of channels mismatch");
+	return PJMEDIA_ENCCHANNEL;
+    }
+
+    pj_mutex_lock(conf->mutex);
+
+    if (conf->port_cnt >= conf->max_ports) {
+	pj_assert(!"Too many ports");
+	pj_mutex_unlock(conf->mutex);
+	return PJ_ETOOMANY;
+    }
+
+    /* Find empty port in the conference bridge. */
+    for (index=0; index < conf->max_ports; ++index) {
+	if (conf->ports[index] == NULL)
+	    break;
+    }
+
+    pj_assert(index != conf->max_ports);
+
+    /* Create conf port structure. */
+    status = create_conf_port(pool, conf, strm_port, port_name, &conf_port);
+    if (status != PJ_SUCCESS) {
+	pj_mutex_unlock(conf->mutex);
+	return status;
+    }
+
+    /* Put the port. */
+    conf->ports[index] = conf_port;
+    conf->port_cnt++;
+
+    /* Done. */
+    if (p_port) {
+	*p_port = index;
+    }
+
+    pj_mutex_unlock(conf->mutex);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Add passive port.
+ */
+PJ_DEF(pj_status_t) pjmedia_conf_add_passive_port( pjmedia_conf *conf,
+						   pj_pool_t *pool,
+						   const pj_str_t *name,
+						   unsigned clock_rate,
+						   unsigned channel_count,
+						   unsigned samples_per_frame,
+						   unsigned bits_per_sample,
+						   unsigned options,
+						   unsigned *p_slot,
+						   pjmedia_port **p_port )
+{
+    struct conf_port *conf_port;
+    pjmedia_port *port;
+    unsigned index;
+    pj_str_t tmp;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(conf && pool, PJ_EINVAL);
+
+    /* For this version of PJMEDIA, port MUST have the same number of
+     * PCM channels.
+     */
+    if (channel_count != conf->channel_count) {
+	pj_assert(!"Number of channels mismatch");
+	return PJMEDIA_ENCCHANNEL;
+    }
+
+    /* For this version, options must be zero */
+    PJ_ASSERT_RETURN(options == 0, PJ_EINVAL);
+    PJ_UNUSED_ARG(options);
+
+    pj_mutex_lock(conf->mutex);
+
+    if (conf->port_cnt >= conf->max_ports) {
+	pj_assert(!"Too many ports");
+	pj_mutex_unlock(conf->mutex);
+	return PJ_ETOOMANY;
+    }
+
+    /* Find empty port in the conference bridge. */
+    for (index=0; index < conf->max_ports; ++index) {
+	if (conf->ports[index] == NULL)
+	    break;
+    }
+
+    pj_assert(index != conf->max_ports);
+
+    if (name == NULL) {
+	name = &tmp;
+
+	tmp.ptr = pj_pool_alloc(pool, 32);
+	tmp.slen = pj_ansi_snprintf(tmp.ptr, 32, "ConfPort#%d", index);
+    }
+
+    /* Create and initialize the media port structure. */
+    port = pj_pool_zalloc(pool, sizeof(pjmedia_port));
+    PJ_ASSERT_RETURN(port, PJ_ENOMEM);
+    
+    pjmedia_port_info_init(&port->info, name, SIGNATURE_PORT,
+			   clock_rate, channel_count, bits_per_sample,
+			   samples_per_frame);
+
+    port->port_data.pdata = conf;
+    port->port_data.ldata = index;
+
+    port->get_frame = &get_frame_pasv;
+    port->put_frame = &put_frame;
+    port->on_destroy = NULL;
+
+    
+    /* Create conf port structure. */
+    status = create_pasv_port(conf, pool, name, port, &conf_port);
+    if (status != PJ_SUCCESS) {
+	pj_mutex_unlock(conf->mutex);
+	return status;
+    }
+
+
+    /* Put the port. */
+    conf->ports[index] = conf_port;
+    conf->port_cnt++;
+
+    /* Done. */
+    if (p_slot)
+	*p_slot = index;
+    if (p_port)
+	*p_port = port;
+
+    pj_mutex_unlock(conf->mutex);
+
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * Change TX and RX settings for the port.
+ */
+PJ_DECL(pj_status_t) pjmedia_conf_configure_port( pjmedia_conf *conf,
+						  unsigned slot,
+						  pjmedia_port_op tx,
+						  pjmedia_port_op rx)
+{
+    struct conf_port *conf_port;
+
+    /* Check arguments */
+    PJ_ASSERT_RETURN(conf && slot<conf->max_ports, PJ_EINVAL);
+
+    /* Port must be valid. */
+    PJ_ASSERT_RETURN(conf->ports[slot] != NULL, PJ_EINVAL);
+
+    conf_port = conf->ports[slot];
+
+    if (tx != PJMEDIA_PORT_NO_CHANGE)
+	conf_port->tx_setting = tx;
+
+    if (rx != PJMEDIA_PORT_NO_CHANGE)
+	conf_port->rx_setting = rx;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Connect port.
+ */
+PJ_DEF(pj_status_t) pjmedia_conf_connect_port( pjmedia_conf *conf,
+					       unsigned src_slot,
+					       unsigned sink_slot,
+					       int level )
+{
+    struct conf_port *src_port, *dst_port;
+    pj_bool_t start_sound = PJ_FALSE;
+    unsigned i;
+
+    /* Check arguments */
+    PJ_ASSERT_RETURN(conf && src_slot<conf->max_ports && 
+		     sink_slot<conf->max_ports, PJ_EINVAL);
+
+    /* Ports must be valid. */
+    PJ_ASSERT_RETURN(conf->ports[src_slot] != NULL, PJ_EINVAL);
+    PJ_ASSERT_RETURN(conf->ports[sink_slot] != NULL, PJ_EINVAL);
+
+    /* For now, level MUST be zero. */
+    PJ_ASSERT_RETURN(level == 0, PJ_EINVAL);
+
+    pj_mutex_lock(conf->mutex);
+
+    src_port = conf->ports[src_slot];
+    dst_port = conf->ports[sink_slot];
+
+    /* Check if connection has been made */
+    for (i=0; i<src_port->listener_cnt; ++i) {
+	if (src_port->listener_slots[i] == sink_slot)
+	    break;
+    }
+
+    if (i == src_port->listener_cnt) {
+	src_port->listener_slots[src_port->listener_cnt] = sink_slot;
+	++conf->connect_cnt;
+	++src_port->listener_cnt;
+	++dst_port->transmitter_cnt;
+
+	if (conf->connect_cnt == 1)
+	    start_sound = 1;
+
+	PJ_LOG(4,(THIS_FILE,"Port %d (%.*s) transmitting to port %d (%.*s)",
+		  src_slot,
+		  (int)src_port->name.slen,
+		  src_port->name.ptr,
+		  sink_slot,
+		  (int)dst_port->name.slen,
+		  dst_port->name.ptr));
+    }
+
+    pj_mutex_unlock(conf->mutex);
+
+    /* Sound device must be started without mutex, otherwise the
+     * sound thread will deadlock (?)
+     */
+    if (start_sound)
+	resume_sound(conf);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Disconnect port
+ */
+PJ_DEF(pj_status_t) pjmedia_conf_disconnect_port( pjmedia_conf *conf,
+						  unsigned src_slot,
+						  unsigned sink_slot )
+{
+    struct conf_port *src_port, *dst_port;
+    unsigned i;
+
+    /* Check arguments */
+    PJ_ASSERT_RETURN(conf && src_slot<conf->max_ports && 
+		     sink_slot<conf->max_ports, PJ_EINVAL);
+
+    /* Ports must be valid. */
+    PJ_ASSERT_RETURN(conf->ports[src_slot] != NULL, PJ_EINVAL);
+    PJ_ASSERT_RETURN(conf->ports[sink_slot] != NULL, PJ_EINVAL);
+
+    pj_mutex_lock(conf->mutex);
+
+    src_port = conf->ports[src_slot];
+    dst_port = conf->ports[sink_slot];
+
+    /* Check if connection has been made */
+    for (i=0; i<src_port->listener_cnt; ++i) {
+	if (src_port->listener_slots[i] == sink_slot)
+	    break;
+    }
+
+    if (i != src_port->listener_cnt) {
+	pj_assert(src_port->listener_cnt > 0 && 
+		  src_port->listener_cnt < conf->max_ports);
+	pj_assert(dst_port->transmitter_cnt > 0 && 
+		  dst_port->transmitter_cnt < conf->max_ports);
+	pj_array_erase(src_port->listener_slots, sizeof(SLOT_TYPE), 
+		       src_port->listener_cnt, i);
+	--conf->connect_cnt;
+	--src_port->listener_cnt;
+	--dst_port->transmitter_cnt;
+
+	PJ_LOG(4,(THIS_FILE,
+		  "Port %d (%.*s) stop transmitting to port %d (%.*s)",
+		  src_slot,
+		  (int)src_port->name.slen,
+		  src_port->name.ptr,
+		  sink_slot,
+		  (int)dst_port->name.slen,
+		  dst_port->name.ptr));
+
+	
+    }
+
+    pj_mutex_unlock(conf->mutex);
+
+    if (conf->connect_cnt == 0) {
+	pause_sound(conf);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get total number of ports connections currently set up in the bridge.
+ */
+PJ_DECL(unsigned) pjmedia_conf_get_connect_count(pjmedia_conf *conf)
+{
+    return conf->connect_cnt;
+}
+
+
+/*
+ * Remove the specified port.
+ */
+PJ_DEF(pj_status_t) pjmedia_conf_remove_port( pjmedia_conf *conf,
+					      unsigned port )
+{
+    struct conf_port *conf_port;
+    unsigned i;
+
+    /* Check arguments */
+    PJ_ASSERT_RETURN(conf && port < conf->max_ports, PJ_EINVAL);
+
+    /* Port must be valid. */
+    PJ_ASSERT_RETURN(conf->ports[port] != NULL, PJ_EINVAL);
+
+    /* Suspend the sound devices.
+     * Don't want to remove port while port is being accessed by sound
+     * device's threads!
+     */
+
+    pj_mutex_lock(conf->mutex);
+
+    conf_port = conf->ports[port];
+    conf_port->tx_setting = PJMEDIA_PORT_DISABLE;
+    conf_port->rx_setting = PJMEDIA_PORT_DISABLE;
+
+    /* Remove this port from transmit array of other ports. */
+    for (i=0; i<conf->max_ports; ++i) {
+	unsigned j;
+
+	conf_port = conf->ports[i];
+
+	if (!conf_port)
+	    continue;
+
+	if (conf_port->listener_cnt == 0)
+	    continue;
+
+	for (j=0; j<conf_port->listener_cnt; ++j) {
+	    if (conf_port->listener_slots[j] == port) {
+		pj_array_erase(conf_port->listener_slots, sizeof(SLOT_TYPE),
+			       conf_port->listener_cnt, j);
+		--conf->connect_cnt;
+		--conf_port->listener_cnt;
+		break;
+	    }
+	}
+    }
+
+    /* Update conf's connection count. */
+    conf_port = conf->ports[port];
+    conf->connect_cnt -= conf_port->listener_cnt;
+
+    /* Remove the port. */
+    conf->ports[port] = NULL;
+    --conf->port_cnt;
+
+    pj_mutex_unlock(conf->mutex);
+
+
+    /* Stop sound if there's no connection. */
+    if (conf->connect_cnt == 0) {
+	pause_sound(conf);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Enum ports.
+ */
+PJ_DEF(pj_status_t) pjmedia_conf_enum_ports( pjmedia_conf *conf,
+					     unsigned ports[],
+					     unsigned *p_count )
+{
+    unsigned i, count=0;
+
+    PJ_ASSERT_RETURN(conf && p_count && ports, PJ_EINVAL);
+
+    for (i=0; i<conf->max_ports && count<*p_count; ++i) {
+	if (!conf->ports[i])
+	    continue;
+
+	ports[count++] = i;
+    }
+
+    *p_count = count;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Get port info
+ */
+PJ_DEF(pj_status_t) pjmedia_conf_get_port_info( pjmedia_conf *conf,
+						unsigned slot,
+						pjmedia_conf_port_info *info)
+{
+    struct conf_port *conf_port;
+
+    /* Check arguments */
+    PJ_ASSERT_RETURN(conf && slot<conf->max_ports, PJ_EINVAL);
+
+    /* Port must be valid. */
+    PJ_ASSERT_RETURN(conf->ports[slot] != NULL, PJ_EINVAL);
+
+    conf_port = conf->ports[slot];
+
+    info->slot = slot;
+    info->name = conf_port->name;
+    info->tx_setting = conf_port->tx_setting;
+    info->rx_setting = conf_port->rx_setting;
+    info->listener_cnt = conf_port->listener_cnt;
+    info->listener_slots = conf_port->listener_slots;
+    info->clock_rate = conf_port->clock_rate;
+    info->channel_count = conf->channel_count;
+    info->samples_per_frame = conf_port->samples_per_frame;
+    info->bits_per_sample = conf->bits_per_sample;
+    info->tx_adj_level = conf_port->tx_adj_level - NORMAL_LEVEL;
+    info->rx_adj_level = conf_port->rx_adj_level - NORMAL_LEVEL;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_conf_get_ports_info(pjmedia_conf *conf,
+						unsigned *size,
+						pjmedia_conf_port_info info[])
+{
+    unsigned i, count=0;
+
+    PJ_ASSERT_RETURN(conf && size && info, PJ_EINVAL);
+
+    for (i=0; i<conf->max_ports && count<*size; ++i) {
+	if (!conf->ports[i])
+	    continue;
+
+	pjmedia_conf_get_port_info(conf, i, &info[count]);
+	++count;
+    }
+
+    *size = count;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get signal level.
+ */
+PJ_DEF(pj_status_t) pjmedia_conf_get_signal_level( pjmedia_conf *conf,
+						   unsigned slot,
+						   unsigned *tx_level,
+						   unsigned *rx_level)
+{
+    struct conf_port *conf_port;
+
+    /* Check arguments */
+    PJ_ASSERT_RETURN(conf && slot<conf->max_ports, PJ_EINVAL);
+
+    /* Port must be valid. */
+    PJ_ASSERT_RETURN(conf->ports[slot] != NULL, PJ_EINVAL);
+
+    conf_port = conf->ports[slot];
+
+    if (tx_level != NULL) {
+	*tx_level = conf_port->tx_level;
+    }
+
+    if (rx_level != NULL) 
+	*rx_level = conf_port->rx_level;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Adjust RX level of individual port.
+ */
+PJ_DEF(pj_status_t) pjmedia_conf_adjust_rx_level( pjmedia_conf *conf,
+						  unsigned slot,
+						  int adj_level )
+{
+    struct conf_port *conf_port;
+
+    /* Check arguments */
+    PJ_ASSERT_RETURN(conf && slot<conf->max_ports, PJ_EINVAL);
+
+    /* Port must be valid. */
+    PJ_ASSERT_RETURN(conf->ports[slot] != NULL, PJ_EINVAL);
+
+    /* Value must be from -128 to +127 */
+    /* Disabled, you can put more than +127, at your own risk: 
+     PJ_ASSERT_RETURN(adj_level >= -128 && adj_level <= 127, PJ_EINVAL);
+     */
+    PJ_ASSERT_RETURN(adj_level >= -128, PJ_EINVAL);
+
+    conf_port = conf->ports[slot];
+
+    /* Set normalized adjustment level. */
+    conf_port->rx_adj_level = adj_level + NORMAL_LEVEL;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Adjust TX level of individual port.
+ */
+PJ_DEF(pj_status_t) pjmedia_conf_adjust_tx_level( pjmedia_conf *conf,
+						  unsigned slot,
+						  int adj_level )
+{
+    struct conf_port *conf_port;
+
+    /* Check arguments */
+    PJ_ASSERT_RETURN(conf && slot<conf->max_ports, PJ_EINVAL);
+
+    /* Port must be valid. */
+    PJ_ASSERT_RETURN(conf->ports[slot] != NULL, PJ_EINVAL);
+
+    /* Value must be from -128 to +127 */
+    /* Disabled, you can put more than +127,, at your own risk:
+     PJ_ASSERT_RETURN(adj_level >= -128 && adj_level <= 127, PJ_EINVAL);
+     */
+    PJ_ASSERT_RETURN(adj_level >= -128, PJ_EINVAL);
+
+    conf_port = conf->ports[slot];
+
+    /* Set normalized adjustment level. */
+    conf_port->tx_adj_level = adj_level + NORMAL_LEVEL;
+
+    return PJ_SUCCESS;
+}
+
+
+/* Convert signed 16bit pcm sample to unsigned 16bit sample */
+static pj_uint16_t pcm2unsigned(pj_int32_t pcm)
+{
+    return (pj_uint16_t)(pcm + 32768);
+}
+
+/* Convert unsigned 16bit sample to signed 16bit pcm sample */
+static pj_int16_t unsigned2pcm(pj_uint32_t uns)
+{
+    return (pj_int16_t)(uns - 32768);
+}
+
+
+/*
+ * Read from port.
+ */
+static pj_status_t read_port( pjmedia_conf *conf,
+			      struct conf_port *cport, pj_int16_t *frame,
+			      pj_size_t count, pjmedia_frame_type *type )
+{
+
+    pj_assert(count == conf->samples_per_frame);
+
+    TRACE_((THIS_FILE, "read_port %.*s: count=%d", 
+		       (int)cport->name.slen, cport->name.ptr,
+		       count));
+
+    /* If port's samples per frame and sampling rate matches conference
+     * bridge's settings, get the frame directly from the port.
+     */
+    if (cport->rx_buf_cap == 0) {
+	pjmedia_frame f;
+	pj_status_t status;
+
+	f.buf = frame;
+	f.size = count * BYTES_PER_SAMPLE;
+
+	TRACE_((THIS_FILE, "  get_frame %.*s: count=%d", 
+		   (int)cport->name.slen, cport->name.ptr,
+		   count));
+
+	status = pjmedia_port_get_frame(cport->port, &f);
+
+	*type = f.type;
+
+	return status;
+
+    } else {
+
+	/*
+	 * If we don't have enough samples in rx_buf, read from the port 
+	 * first. Remember that rx_buf may be in different clock rate!
+	 */
+	while (cport->rx_buf_count < count * 1.0 *
+		cport->clock_rate / conf->clock_rate) {
+
+	    pjmedia_frame f;
+	    pj_status_t status;
+
+	    f.buf = cport->rx_buf + cport->rx_buf_count;
+	    f.size = cport->samples_per_frame * BYTES_PER_SAMPLE;
+
+	    TRACE_((THIS_FILE, "  get_frame, count=%d", 
+		       cport->samples_per_frame));
+
+	    status = pjmedia_port_get_frame(cport->port, &f);
+
+	    if (status != PJ_SUCCESS) {
+		/* Fatal error! */
+		return status;
+	    }
+
+	    if (f.type != PJMEDIA_FRAME_TYPE_AUDIO) {
+		TRACE_((THIS_FILE, "  get_frame returned non-audio"));
+		pjmedia_zero_samples( cport->rx_buf + cport->rx_buf_count,
+				      cport->samples_per_frame);
+	    }
+
+	    cport->rx_buf_count += cport->samples_per_frame;
+
+	    TRACE_((THIS_FILE, "  rx buffer size is now %d",
+		    cport->rx_buf_count));
+
+	    pj_assert(cport->rx_buf_count <= cport->rx_buf_cap);
+	}
+
+	/*
+	 * If port's clock_rate is different, resample.
+	 * Otherwise just copy.
+	 */
+	if (cport->clock_rate != conf->clock_rate) {
+	    
+	    unsigned src_count;
+
+	    TRACE_((THIS_FILE, "  resample, input count=%d", 
+		    pjmedia_resample_get_input_size(cport->rx_resample)));
+
+	    pjmedia_resample_run( cport->rx_resample,cport->rx_buf, frame);
+
+	    src_count = (unsigned)(count * 1.0 * cport->clock_rate / 
+				   conf->clock_rate);
+	    cport->rx_buf_count -= src_count;
+	    if (cport->rx_buf_count) {
+		pjmedia_copy_samples(cport->rx_buf, cport->rx_buf+src_count,
+				     cport->rx_buf_count);
+	    }
+
+	    TRACE_((THIS_FILE, "  rx buffer size is now %d",
+		    cport->rx_buf_count));
+
+	} else {
+
+	    pjmedia_copy_samples(frame, cport->rx_buf, count);
+	    cport->rx_buf_count -= count;
+	    if (cport->rx_buf_count) {
+		pjmedia_copy_samples(cport->rx_buf, cport->rx_buf+count,
+				     cport->rx_buf_count);
+	    }
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Write the mixed signal to the port.
+ */
+static pj_status_t write_port(pjmedia_conf *conf, struct conf_port *cport,
+			      const pj_timestamp *timestamp, 
+			      pjmedia_frame_type *frm_type)
+{
+    pj_int16_t *buf;
+    unsigned j, ts;
+    pj_status_t status;
+
+    *frm_type = PJMEDIA_FRAME_TYPE_AUDIO;
+
+    /* If port is muted or nobody is transmitting to this port, 
+     * transmit NULL frame. 
+     */
+    if (cport->tx_setting == PJMEDIA_PORT_MUTE || cport->transmitter_cnt==0) {
+
+	pjmedia_frame frame;
+
+	/* Adjust the timestamp */
+	frame.timestamp.u64 = timestamp->u64 * cport->clock_rate /
+				conf->clock_rate;
+	frame.type = PJMEDIA_FRAME_TYPE_NONE;
+	frame.buf = NULL;
+	frame.size = 0;
+
+	if (cport->port && cport->port->put_frame) {
+	    pjmedia_port_put_frame(cport->port, &frame);
+	}
+
+	cport->tx_level = 0;
+	*frm_type = PJMEDIA_FRAME_TYPE_NONE;
+	return PJ_SUCCESS;
+
+    } else if (cport->src_level==0) {
+
+	pjmedia_frame frame;
+
+	/* If silence is transmitted to this port, transmit silence
+	 * PCM frame (otherwise if we transmit NULL frame, nothing will
+	 * be written to WAV port). This would work with stream too
+	 * since stream has it's own silence detector.
+	 */
+	pjmedia_zero_samples((pj_int16_t*)cport->mix_buf, 
+			     cport->samples_per_frame);
+
+	/* Adjust the timestamp */
+	frame.timestamp.u64 = timestamp->u64 * cport->clock_rate /
+				conf->clock_rate;
+	frame.type = PJMEDIA_FRAME_TYPE_NONE;
+	frame.buf = (void*)cport->mix_buf;
+	frame.size = (cport->samples_per_frame << 1);
+
+	if (cport->port && cport->port->put_frame) {
+	    pjmedia_port_put_frame(cport->port, &frame);
+	}
+
+	cport->tx_level = 0;
+	*frm_type = PJMEDIA_FRAME_TYPE_NONE;
+	return PJ_SUCCESS;
+
+
+    } else if (cport->tx_setting != PJMEDIA_PORT_ENABLE) {
+	cport->tx_level = 0;
+	*frm_type = PJMEDIA_FRAME_TYPE_NONE;
+	return PJ_SUCCESS;
+    }
+
+    buf = (pj_int16_t*)cport->mix_buf;
+
+    /* This is the convention set in get_frame(). For optimization purpose,
+     * if we only have one transmitter transmitting to this port, then
+     * the transmitter will directly copy the original 16bit frame to
+     * mix_buf.
+     */
+    if (cport->transmitter_cnt==1 && cport->src_cnt == 1) {
+
+	/* But still see if we need to adjust the level */
+	if (cport->tx_adj_level != NORMAL_LEVEL) {
+	    pj_int16_t *input = buf;
+	    pj_int32_t adj = cport->tx_adj_level;
+
+	    for (j=0; j<conf->samples_per_frame; ++j) {
+		pj_int32_t itemp;
+
+		/* For the level adjustment, we need to store the sample to
+		 * a temporary 32bit integer value to avoid overflowing the
+		 * 16bit sample storage.
+		 */
+		itemp = input[j];
+		/*itemp = itemp * adj / NORMAL_LEVEL; */
+		itemp = (itemp * adj) >> 7;
+
+		/* Clip the signal if it's too loud */
+		if (itemp > 32767) itemp = 32767;
+		else if (itemp < -32768) itemp = -32768;
+
+		input[j] = (pj_int16_t) itemp;
+	    }
+	}
+
+    } 
+    /* If there are sources in the mix buffer, convert the mixed samples
+     * to the mixed samples itself. This is possible because mixed sample
+     * is 32bit.
+     *
+     * In addition to this process, if we need to change the level of
+     * TX signal, we adjust is here too.
+     */
+    else if (cport->tx_adj_level != NORMAL_LEVEL && cport->src_level) {
+
+	pj_int32_t adj_level = cport->tx_adj_level;
+
+	/* We need to adjust signal level. */
+	for (j=0; j<conf->samples_per_frame; ++j) {
+	    pj_int32_t itemp;
+
+	    /* Calculate average level, and convert the sample to
+	     * 16bit signed integer.
+	     */
+	    itemp = unsigned2pcm(cport->mix_buf[j] / cport->src_level);
+
+	    /* Adjust the level */
+	    /*itemp = itemp * adj_level / NORMAL_LEVEL;*/
+	    itemp = (itemp * adj_level) >> 7;
+
+	    /* Clip the signal if it's too loud */
+	    if (itemp > 32767) itemp = 32767;
+	    else if (itemp < -32768) itemp = -32768;
+
+	    /* Put back in the buffer. */
+	    buf[j] = (pj_int16_t) itemp;
+	}
+
+    } else if (cport->src_level) {
+	/* No need to adjust signal level. */
+	for (j=0; j<conf->samples_per_frame; ++j) {
+	    buf[j] = unsigned2pcm(cport->mix_buf[j] / cport->src_level);
+	}
+    } else {
+	// Not necessarry. Buffer has been zeroed before.
+	// pjmedia_zero_samples(buf, conf->samples_per_frame);
+	//pj_assert(buf[0] == 0);
+
+	// This shouldn't happen. Function should've already bailed out when
+	// cport->src_level == 0.
+	pj_assert(0);
+    }
+
+    /* Calculate TX level if we need to do so. 
+     * This actually is not the most correct place to calculate TX signal 
+     * level of the port; it should calculate the level of the actual
+     * frame just before put_frame() is called.
+     * But doing so would make the code more complicated than it is
+     * necessary, since the purpose of level calculation mostly is just
+     * for VU meter display. By doing it here, it should give the acceptable
+     * indication of the signal level of the port.
+     */
+    if (cport->src_cnt) {
+	cport->tx_level = cport->src_level / cport->src_cnt;
+    } else {
+	cport->tx_level = 0;
+    }
+
+    /* If port has the same clock_rate and samples_per_frame settings as
+     * the conference bridge, transmit the frame as is.
+     */
+    if (cport->clock_rate == conf->clock_rate &&
+	cport->samples_per_frame == conf->samples_per_frame)
+    {
+	if (cport->port != NULL) {
+	    pjmedia_frame frame;
+
+	    frame.type = PJMEDIA_FRAME_TYPE_AUDIO;
+	    frame.buf = (pj_int16_t*)cport->mix_buf;
+	    frame.size = conf->samples_per_frame * BYTES_PER_SAMPLE;
+	    /* No need to adjust timestamp, port has the same
+	     * clock rate as conference bridge 
+	     */
+	    frame.timestamp = *timestamp;
+
+	    TRACE_((THIS_FILE, "put_frame %.*s, count=%d", 
+			       (int)cport->name.slen, cport->name.ptr,
+			       frame.size / BYTES_PER_SAMPLE));
+
+	    return pjmedia_port_put_frame(cport->port, &frame);
+	} else
+	    return PJ_SUCCESS;
+    }
+
+    /* If it has different clock_rate, must resample. */
+    if (cport->clock_rate != conf->clock_rate) {
+
+	unsigned dst_count;
+
+	pjmedia_resample_run( cport->tx_resample, buf, 
+			      cport->tx_buf + cport->tx_buf_count );
+
+	dst_count = (unsigned)(conf->samples_per_frame * 1.0 *
+			       cport->clock_rate / conf->clock_rate);
+	cport->tx_buf_count += dst_count;
+
+    } else {
+	/* Same clock rate.
+	 * Just copy the samples to tx_buffer.
+	 */
+	pjmedia_copy_samples( cport->tx_buf + cport->tx_buf_count,
+			      buf, conf->samples_per_frame );
+	cport->tx_buf_count += conf->samples_per_frame;
+    }
+
+    /* Transmit while we have enough frame in the tx_buf. */
+    status = PJ_SUCCESS;
+    ts = 0;
+    while (cport->tx_buf_count >= cport->samples_per_frame &&
+	   status == PJ_SUCCESS) 
+    {
+	
+	TRACE_((THIS_FILE, "write_port %.*s: count=%d", 
+			   (int)cport->name.slen, cport->name.ptr,
+			   cport->samples_per_frame));
+
+	if (cport->port) {
+	    pjmedia_frame frame;
+
+	    frame.type = PJMEDIA_FRAME_TYPE_AUDIO;
+	    frame.buf = cport->tx_buf;
+	    frame.size = cport->samples_per_frame * BYTES_PER_SAMPLE;
+	    /* Adjust timestamp as port may have different clock rate
+	     * than the bridge.
+	     */
+	    frame.timestamp.u64 = timestamp->u64 * cport->clock_rate /
+				  conf->clock_rate;
+
+	    /* Add timestamp for individual frame */
+	    frame.timestamp.u64 += ts;
+	    ts += cport->samples_per_frame;
+
+	    TRACE_((THIS_FILE, "put_frame %.*s, count=%d", 
+			       (int)cport->name.slen, cport->name.ptr,
+			       frame.size / BYTES_PER_SAMPLE));
+
+	    status = pjmedia_port_put_frame(cport->port, &frame);
+
+	} else
+	    status = PJ_SUCCESS;
+
+	cport->tx_buf_count -= cport->samples_per_frame;
+	if (cport->tx_buf_count) {
+	    pjmedia_copy_samples(cport->tx_buf, 
+				 cport->tx_buf + cport->samples_per_frame,
+				 cport->tx_buf_count);
+	}
+
+	TRACE_((THIS_FILE, " tx_buf count now is %d", 
+			   cport->tx_buf_count));
+    }
+
+    return status;
+}
+
+
+/*
+ * Player callback.
+ */
+static pj_status_t get_frame(pjmedia_port *this_port, 
+			     pjmedia_frame *frame)
+{
+    pjmedia_conf *conf = this_port->port_data.pdata;
+    pjmedia_frame_type speaker_frame_type = PJMEDIA_FRAME_TYPE_NONE;
+    unsigned ci, cj, i, j;
+    
+    TRACE_((THIS_FILE, "- clock -"));
+
+    /* Check that correct size is specified. */
+    pj_assert(frame->size == conf->samples_per_frame *
+			     conf->bits_per_sample / 8);
+
+    /* Must lock mutex */
+    pj_mutex_lock(conf->mutex);
+
+    /* Reset port source count. We will only reset port's mix
+     * buffer when we have someone transmitting to it.
+     */
+    for (i=0, ci=0; i<conf->max_ports && ci < conf->port_cnt; ++i) {
+	struct conf_port *conf_port = conf->ports[i];
+
+	/* Skip empty slot. */
+	if (!conf_port)
+	    continue;
+
+	++ci;
+
+	/* Reset sources */
+	conf_port->src_level = 0;
+	conf_port->src_cnt = 0;
+    }
+
+    /* Get frames from all ports, and "mix" the signal 
+     * to mix_buf of all listeners of the port.
+     */
+    for (i=0, ci=0; i<conf->max_ports && ci<conf->port_cnt; ++i) {
+	struct conf_port *conf_port = conf->ports[i];
+	pj_int32_t level;
+
+	/* Skip empty port. */
+	if (!conf_port)
+	    continue;
+
+	/* Var "ci" is to count how many ports have been visited so far. */
+	++ci;
+
+	/* Skip if we're not allowed to receive from this port. */
+	if (conf_port->rx_setting == PJMEDIA_PORT_DISABLE) {
+	    conf_port->rx_level = 0;
+	    continue;
+	}
+
+	/* Also skip if this port doesn't have listeners. */
+	if (conf_port->listener_cnt == 0) {
+	    conf_port->rx_level = 0;
+	    continue;
+	}
+
+	/* Get frame from this port. 
+	 * For port zero (sound port) and passive ports, get the frame  from 
+	 * the rx_buffer instead.
+	 */
+	if (conf_port->port == NULL) {
+	    pj_int16_t *snd_buf;
+
+	    if (conf_port->snd_read_pos == conf_port->snd_write_pos) {
+		conf_port->snd_read_pos = 
+		    (conf_port->snd_write_pos+RX_BUF_COUNT-RX_BUF_COUNT/2) % 
+			RX_BUF_COUNT;
+	    }
+
+	    /* Skip if this port is muted/disabled. */
+	    if (conf_port->rx_setting != PJMEDIA_PORT_ENABLE) {
+		conf_port->rx_level = 0;
+		continue;
+	    }
+
+	    snd_buf = conf_port->snd_buf[conf_port->snd_read_pos];
+	    pjmedia_copy_samples(frame->buf, snd_buf, conf->samples_per_frame);
+	    conf_port->snd_read_pos = (conf_port->snd_read_pos+1) % RX_BUF_COUNT;
+
+	} else {
+
+	    pj_status_t status;
+	    pjmedia_frame_type frame_type;
+
+	    status = read_port(conf, conf_port, frame->buf, 
+			       conf->samples_per_frame, &frame_type);
+	    
+	    if (status != PJ_SUCCESS) {
+		/* bennylp: why do we need this????
+		 * Also see comments on similar issue with write_port().
+		PJ_LOG(4,(THIS_FILE, "Port %.*s get_frame() returned %d. "
+				     "Port is now disabled",
+				     (int)conf_port->name.slen,
+				     conf_port->name.ptr,
+				     status));
+		conf_port->rx_setting = PJMEDIA_PORT_DISABLE;
+		 */
+		continue;
+	    }
+
+	    /* Check that the port is not removed when we call get_frame() */
+	    if (conf->ports[i] == NULL)
+		continue;
+	}
+
+	/* If we need to adjust the RX level from this port, adjust the level
+	 * and calculate the average level at the same time.
+	 * Otherwise just calculate the averate level.
+	 */
+	if (conf_port->rx_adj_level != NORMAL_LEVEL) {
+	    pj_int16_t *input = frame->buf;
+	    pj_int32_t adj = conf_port->rx_adj_level;
+
+	    level = 0;
+	    for (j=0; j<conf->samples_per_frame; ++j) {
+		pj_int32_t itemp;
+
+		/* For the level adjustment, we need to store the sample to
+		 * a temporary 32bit integer value to avoid overflowing the
+		 * 16bit sample storage.
+		 */
+		itemp = input[j];
+		/*itemp = itemp * adj / NORMAL_LEVEL;*/
+		itemp = (itemp * adj) >> 7;
+
+		/* Clip the signal if it's too loud */
+		if (itemp > 32767) itemp = 32767;
+		else if (itemp < -32768) itemp = -32768;
+
+		input[j] = (pj_int16_t) itemp;
+
+		if (itemp >=0 ) level += itemp;
+		else level -= itemp;
+	    }
+
+	    level /= conf->samples_per_frame;
+
+	} else {
+	    level = pjmedia_calc_avg_signal(frame->buf, 
+					    conf->samples_per_frame);
+	}
+
+	/* Apply simple AGC to the level, to avoid dramatic change in the
+	 * level thus causing noise because the signal now is not aligned
+	 * with the signal from the previous frame.
+	 */
+	if (level >= conf_port->last_level) {
+	    level = (conf_port->last_level * ATTACK_A + level * ATTACK_B) / 
+		    (ATTACK_A + ATTACK_B);
+	} else {
+	    level = (conf_port->last_level * DECAY_A + level * DECAY_B) / 
+		    (DECAY_A + DECAY_B);
+	}
+	conf_port->last_level = level;
+
+
+	/* Convert level to 8bit complement ulaw */
+	level = pjmedia_linear2ulaw(level) ^ 0xff;
+
+	/* Put this level to port's last RX level. */
+	conf_port->rx_level = level;
+
+	/* Skip processing frame if level is zero */
+	if (level == 0)
+	    continue;
+
+	/* Convert the buffer to unsigned 16bit value */
+	for (j=0; j<conf->samples_per_frame; ++j)
+	    conf->uns_buf[j] = pcm2unsigned(((pj_int16_t*)frame->buf)[j]);
+
+	/* Add the signal to all listeners. */
+	for (cj=0; cj < conf_port->listener_cnt; ++cj) 
+	{
+	    struct conf_port *listener;
+	    pj_uint32_t *mix_buf;
+	    unsigned k;
+
+	    listener = conf->ports[conf_port->listener_slots[cj]];
+
+	    /* Skip if this listener doesn't want to receive audio */
+	    if (listener->tx_setting != PJMEDIA_PORT_ENABLE)
+		continue;
+
+	    /* Mix the buffer. If this is the first source for target port,
+	     * zero the mix buffer of target port first.
+	     */
+	    mix_buf = listener->mix_buf;
+	    if (listener->src_level == 0) {
+		pj_bzero( mix_buf, conf->samples_per_frame*sizeof(mix_buf[0]));
+	    }
+
+	    /* A little bit of optimization:
+	     *  When "conf_port" is the only transmitter to "listener",
+	     *  just add copy the frame directly from the original
+	     *  16bit frame (avoiding unsigned2pcm() conversion).
+	     *  But write_port() needs to be aware of this trick!
+	     */
+	    if (listener->transmitter_cnt == 1) {
+		pjmedia_copy_samples((pj_int16_t*)mix_buf, 
+				     frame->buf, conf->samples_per_frame);
+		listener->src_level = level;
+	    } else {
+		for (k=0; k<conf->samples_per_frame; ++k)
+		    mix_buf[k] += (conf->uns_buf[k] * level);
+
+		listener->src_level += level;
+	    }
+	    listener->src_cnt++;
+	}
+    }
+
+    /* Time for all ports to transmit whetever they have in their
+     * buffer. 
+     */
+    for (i=0, ci=0; i<conf->max_ports && ci<conf->port_cnt; ++i) {
+	struct conf_port *conf_port = conf->ports[i];
+	pjmedia_frame_type frm_type;
+	pj_status_t status;
+
+	if (!conf_port)
+	    continue;
+
+	/* Var "ci" is to count how many ports have been visited. */
+	++ci;
+
+	status = write_port( conf, conf_port, &frame->timestamp,
+			     &frm_type);
+	if (status != PJ_SUCCESS) {
+	    /* bennylp: why do we need this????
+	       One thing for sure, put_frame()/write_port() may return
+	       non-successfull status on Win32 if there's temporary glitch
+	       on network interface, so disabling the port here does not
+	       sound like a good idea.
+
+	    PJ_LOG(4,(THIS_FILE, "Port %.*s put_frame() returned %d. "
+				 "Port is now disabled",
+				 (int)conf_port->name.slen,
+				 conf_port->name.ptr,
+				 status));
+	    conf_port->tx_setting = PJMEDIA_PORT_DISABLE;
+	    */
+	    continue;
+	}
+
+	/* Set the type of frame to be returned to sound playback
+	 * device.
+	 */
+	if (i == 0)
+	    speaker_frame_type = frm_type;
+    }
+
+    /* Return sound playback frame. */
+    if (conf->ports[0]->src_level) {
+	TRACE_((THIS_FILE, "write to audio, count=%d", 
+			   conf->samples_per_frame));
+
+	pjmedia_copy_samples( frame->buf, (pj_int16_t*)conf->ports[0]->mix_buf, 
+			      conf->samples_per_frame);
+    } else {
+	pjmedia_zero_samples( frame->buf, conf->samples_per_frame ); 
+    }
+
+    /* MUST set frame type */
+    frame->type = speaker_frame_type;
+
+    pj_mutex_unlock(conf->mutex);
+
+#ifdef REC_FILE
+    if (fhnd_rec == NULL)
+	fhnd_rec = fopen(REC_FILE, "wb");
+    if (fhnd_rec)
+	fwrite(frame->buf, frame->size, 1, fhnd_rec);
+#endif
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * get_frame() for passive port
+ */
+static pj_status_t get_frame_pasv(pjmedia_port *this_port, 
+				  pjmedia_frame *frame)
+{
+    pj_assert(0);
+    PJ_UNUSED_ARG(this_port);
+    PJ_UNUSED_ARG(frame);
+    return -1;
+}
+
+
+/*
+ * Recorder callback.
+ */
+static pj_status_t put_frame(pjmedia_port *this_port, 
+			     const pjmedia_frame *frame)
+{
+    pjmedia_conf *conf = this_port->port_data.pdata;
+    struct conf_port *port = conf->ports[this_port->port_data.ldata];
+    const pj_int16_t *input = frame->buf;
+    pj_int16_t *target_snd_buf;
+
+    /* Check for correct size. */
+    PJ_ASSERT_RETURN( frame->size == conf->samples_per_frame *
+				     conf->bits_per_sample / 8,
+		      PJMEDIA_ENCSAMPLESPFRAME);
+
+    /* Skip if this port is muted/disabled. */
+    if (port->rx_setting != PJMEDIA_PORT_ENABLE) {
+	return PJ_SUCCESS;
+    }
+
+    /* Skip if no port is listening to the microphone */
+    if (port->listener_cnt == 0) {
+	return PJ_SUCCESS;
+    }
+
+
+    /* Determine which rx_buffer to fill in */
+    target_snd_buf = port->snd_buf[port->snd_write_pos];
+    
+    /* Copy samples from audio device to target rx_buffer */
+    pjmedia_copy_samples(target_snd_buf, input, conf->samples_per_frame);
+
+    /* Switch buffer */
+    port->snd_write_pos = (port->snd_write_pos+1)%RX_BUF_COUNT;
+
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/dsound.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/dsound.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/dsound.c	(revision 1163)
@@ -0,0 +1,981 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/sound.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/string.h>
+
+#if PJMEDIA_SOUND_IMPLEMENTATION == PJMEDIA_SOUND_WIN32_DIRECT_SOUND
+
+#ifdef _MSC_VER
+#   pragma warning(push, 3)
+#endif
+
+#include <windows.h>
+#include <mmsystem.h>
+#include <dsound.h>
+
+#ifdef _MSC_VER
+#   pragma warning(pop)
+#endif
+
+
+
+#define THIS_FILE	    "dsound.c"
+#define BITS_PER_SAMPLE	    16
+#define BYTES_PER_SAMPLE    (BITS_PER_SAMPLE/8)
+
+#define MAX_PACKET_BUFFER_COUNT	    PJMEDIA_SOUND_BUFFER_COUNT
+#define DEFAULT_BUFFER_COUNT	    PJMEDIA_SOUND_BUFFER_COUNT
+
+#define MAX_HARDWARE		    16
+
+struct dsound_dev_info
+{
+    pjmedia_snd_dev_info    info;
+    LPGUID		    lpGuid;
+};
+
+static unsigned dev_count;
+static struct dsound_dev_info dev_info[MAX_HARDWARE];
+static int snd_init_count;
+
+
+/* Individual DirectSound capture/playback stream descriptor */
+struct dsound_stream
+{
+    union 
+    {
+	struct
+	{
+	    LPDIRECTSOUND	    lpDs;
+	    LPDIRECTSOUNDBUFFER	    lpDsBuffer;
+	} play;
+
+	struct
+	{
+	    LPDIRECTSOUNDCAPTURE	lpDs;
+	    LPDIRECTSOUNDCAPTUREBUFFER	lpDsBuffer;
+	} capture;
+    } ds;
+
+    HANDLE		    hEvent;
+    LPDIRECTSOUNDNOTIFY	    lpDsNotify;
+    DWORD		    dwBytePos;
+    DWORD		    dwDsBufferSize;
+    pj_timestamp	    timestamp;
+};
+
+
+/* Sound stream.    */
+struct pjmedia_snd_stream
+{
+    pjmedia_dir		    dir;		/**< Sound direction.	    */
+    int			    play_id;		/**< Playback dev id.	    */
+    int			    rec_id;		/**< Recording dev id.	    */
+    pj_pool_t		   *pool;		/**< Memory pool.	    */
+  
+    pjmedia_snd_rec_cb	    rec_cb;		/**< Capture callback.	    */
+    pjmedia_snd_play_cb	    play_cb;		/**< Playback callback.	    */
+    void		   *user_data;		/**< Application data.	    */
+
+    struct dsound_stream    play_strm;		/**< Playback stream.	    */
+    struct dsound_stream    rec_strm;		/**< Capture stream.	    */
+
+    void		   *buffer;		/**< Temp. frame buffer.    */
+    unsigned		    clock_rate;		/**< Clock rate.	    */
+    unsigned		    samples_per_frame;	/**< Samples per frame.	    */
+    unsigned		    bits_per_sample;	/**< Bits per sample.	    */
+    unsigned		    channel_count;	/**< Channel count.	    */
+
+    pj_thread_t		   *thread;		/**< Thread handle.	    */
+    pj_bool_t		    thread_quit_flag;	/**< Quit signal to thread  */
+};
+
+
+static pj_pool_factory *pool_factory;
+
+
+static void init_waveformatex (PCMWAVEFORMAT *pcmwf, 
+			       unsigned clock_rate,
+			       unsigned channel_count)
+{
+    pj_bzero(pcmwf, sizeof(PCMWAVEFORMAT)); 
+    pcmwf->wf.wFormatTag = WAVE_FORMAT_PCM; 
+    pcmwf->wf.nChannels = (pj_uint16_t)channel_count;
+    pcmwf->wf.nSamplesPerSec = clock_rate;
+    pcmwf->wf.nBlockAlign = (pj_uint16_t)(channel_count * BYTES_PER_SAMPLE);
+    pcmwf->wf.nAvgBytesPerSec = clock_rate * channel_count * BYTES_PER_SAMPLE;
+    pcmwf->wBitsPerSample = BITS_PER_SAMPLE;
+}
+
+
+/*
+ * Initialize DirectSound player device.
+ */
+static pj_status_t init_player_stream( struct dsound_stream *ds_strm,
+				       int dev_id,
+				       unsigned clock_rate,
+				       unsigned channel_count,
+				       unsigned samples_per_frame,
+				       unsigned buffer_count)
+{
+    HRESULT hr;
+    HWND hwnd;
+    PCMWAVEFORMAT pcmwf; 
+    DSBUFFERDESC dsbdesc;
+    DSBPOSITIONNOTIFY dsPosNotify[MAX_PACKET_BUFFER_COUNT];
+    unsigned bytes_per_frame;
+    unsigned i;
+
+
+    PJ_ASSERT_RETURN(buffer_count <= MAX_PACKET_BUFFER_COUNT, PJ_EINVAL);
+
+    /* Check device ID */
+    if (dev_id == -1)
+	dev_id = 0;
+
+    PJ_ASSERT_RETURN(dev_id>=0 && dev_id < (int)dev_count, PJ_EINVAL);
+
+    /*
+     * Create DirectSound device.
+     */
+    hr = DirectSoundCreate(dev_info[dev_id].lpGuid, &ds_strm->ds.play.lpDs, 
+			   NULL);
+    if (FAILED(hr))
+	return PJ_RETURN_OS_ERROR(hr);
+
+    hwnd = GetForegroundWindow();
+    if (hwnd == NULL) {
+	hwnd = GetDesktopWindow();
+    }    
+    hr = IDirectSound_SetCooperativeLevel( ds_strm->ds.play.lpDs, hwnd, 
+					   DSSCL_PRIORITY);
+    if FAILED(hr)
+	return PJ_RETURN_OS_ERROR(hr);
+    
+    /*
+     * Set up wave format structure for initialize DirectSound play
+     * buffer. 
+     */
+    init_waveformatex(&pcmwf, clock_rate, channel_count);
+    bytes_per_frame = samples_per_frame * BYTES_PER_SAMPLE;
+
+    /* Set up DSBUFFERDESC structure. */
+    pj_bzero(&dsbdesc, sizeof(DSBUFFERDESC)); 
+    dsbdesc.dwSize = sizeof(DSBUFFERDESC); 
+    dsbdesc.dwFlags = DSBCAPS_CTRLVOLUME | DSBCAPS_CTRLPOSITIONNOTIFY |
+		      DSBCAPS_GETCURRENTPOSITION2 | DSBCAPS_GLOBALFOCUS;
+
+    dsbdesc.dwBufferBytes = buffer_count * bytes_per_frame;
+    dsbdesc.lpwfxFormat = (LPWAVEFORMATEX)&pcmwf; 
+
+    /*
+     * Create DirectSound playback buffer. 
+     */
+    hr = IDirectSound_CreateSoundBuffer(ds_strm->ds.play.lpDs, &dsbdesc, 
+					&ds_strm->ds.play.lpDsBuffer, NULL); 
+    if (FAILED(hr) )
+	return PJ_RETURN_OS_ERROR(hr);
+
+    /*
+     * Create event for play notification.
+     */
+    ds_strm->hEvent = CreateEvent( NULL, FALSE, FALSE, NULL);
+    if (ds_strm->hEvent == NULL)
+	return pj_get_os_error();
+
+    /*
+     * Setup notification for play.
+     */
+    hr = IDirectSoundBuffer_QueryInterface( ds_strm->ds.play.lpDsBuffer, 
+					    &IID_IDirectSoundNotify, 
+					    (LPVOID *)&ds_strm->lpDsNotify); 
+    if (FAILED(hr))
+	return PJ_RETURN_OS_ERROR(hr);
+
+    
+    for (i=0; i<buffer_count; ++i) {
+	dsPosNotify[i].dwOffset = i * bytes_per_frame;
+	dsPosNotify[i].hEventNotify = ds_strm->hEvent;
+    }
+    
+    hr = IDirectSoundNotify_SetNotificationPositions( ds_strm->lpDsNotify, 
+						      buffer_count, 
+						      dsPosNotify);
+    if (FAILED(hr))
+	return PJ_RETURN_OS_ERROR(hr);
+
+
+    hr = IDirectSoundBuffer_SetCurrentPosition(ds_strm->ds.play.lpDsBuffer, 0);
+    if (FAILED(hr))
+	return PJ_RETURN_OS_ERROR(hr);
+
+
+    ds_strm->dwBytePos = 0;
+    ds_strm->dwDsBufferSize = buffer_count * bytes_per_frame;
+    ds_strm->timestamp.u64 = 0;
+
+
+    /* Done setting up play device. */
+    PJ_LOG(5,(THIS_FILE, 
+	      " DirectSound player \"%s\" initialized (clock_rate=%d, "
+	      "channel_count=%d, samples_per_frame=%d (%dms))",
+	      dev_info[dev_id].info.name,
+	      clock_rate, channel_count, samples_per_frame,
+	      samples_per_frame * 1000 / clock_rate));
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Initialize DirectSound recorder device
+ */
+static pj_status_t init_capture_stream( struct dsound_stream *ds_strm,
+				        int dev_id,
+				        unsigned clock_rate,
+				        unsigned channel_count,
+				        unsigned samples_per_frame,
+				        unsigned buffer_count)
+{
+    HRESULT hr;
+    PCMWAVEFORMAT pcmwf; 
+    DSCBUFFERDESC dscbdesc;
+    DSBPOSITIONNOTIFY dsPosNotify[MAX_PACKET_BUFFER_COUNT];
+    unsigned bytes_per_frame;
+    unsigned i;
+
+
+    PJ_ASSERT_RETURN(buffer_count <= MAX_PACKET_BUFFER_COUNT, PJ_EINVAL);
+
+
+    /* Check device id */
+    if (dev_id == -1)
+	dev_id = 0;
+
+    PJ_ASSERT_RETURN(dev_id>=0 && dev_id < (int)dev_count, PJ_EINVAL);
+
+    /*
+     * Creating recorder device.
+     */
+    hr = DirectSoundCaptureCreate(dev_info[dev_id].lpGuid, 
+				  &ds_strm->ds.capture.lpDs, NULL);
+    if (FAILED(hr))
+	return PJ_RETURN_OS_ERROR(hr);
+
+
+    /* Init wave format to initialize buffer */
+    init_waveformatex( &pcmwf, clock_rate, channel_count);
+    bytes_per_frame = samples_per_frame * BYTES_PER_SAMPLE;
+
+    /* 
+     * Setup capture buffer using sound buffer structure that was passed
+     * to play buffer creation earlier.
+     */
+    pj_bzero(&dscbdesc, sizeof(DSCBUFFERDESC));
+    dscbdesc.dwSize = sizeof(DSCBUFFERDESC); 
+    dscbdesc.dwFlags = DSCBCAPS_WAVEMAPPED ;
+    dscbdesc.dwBufferBytes = buffer_count * bytes_per_frame; 
+    dscbdesc.lpwfxFormat = (LPWAVEFORMATEX)&pcmwf; 
+
+    hr = IDirectSoundCapture_CreateCaptureBuffer( ds_strm->ds.capture.lpDs,
+						  &dscbdesc, 
+						  &ds_strm->ds.capture.lpDsBuffer,
+						  NULL);
+    if (FAILED(hr))
+	return PJ_RETURN_OS_ERROR(hr);
+
+    /*
+     * Create event for play notification.
+     */
+    ds_strm->hEvent = CreateEvent( NULL, FALSE, FALSE, NULL);
+    if (ds_strm->hEvent == NULL)
+	return pj_get_os_error();
+
+    /*
+     * Setup notifications for recording.
+     */
+    hr = IDirectSoundCaptureBuffer_QueryInterface( ds_strm->ds.capture.lpDsBuffer, 
+						   &IID_IDirectSoundNotify, 
+						   (LPVOID *)&ds_strm->lpDsNotify); 
+    if (FAILED(hr))
+	return PJ_RETURN_OS_ERROR(hr);
+
+    
+    for (i=0; i<buffer_count; ++i) {
+	dsPosNotify[i].dwOffset = i * bytes_per_frame;
+	dsPosNotify[i].hEventNotify = ds_strm->hEvent;
+    }
+    
+    hr = IDirectSoundNotify_SetNotificationPositions( ds_strm->lpDsNotify, 
+						      buffer_count, 
+						      dsPosNotify);
+    if (FAILED(hr))
+	return PJ_RETURN_OS_ERROR(hr);
+
+    hr = IDirectSoundCaptureBuffer_GetCurrentPosition( ds_strm->ds.capture.lpDsBuffer, 
+						       NULL, &ds_strm->dwBytePos );
+    if (FAILED(hr))
+	return PJ_RETURN_OS_ERROR(hr);
+
+    ds_strm->timestamp.u64 = 0;
+    ds_strm->dwDsBufferSize = buffer_count * bytes_per_frame;
+
+    /* Done setting up recorder device. */
+    PJ_LOG(5,(THIS_FILE, 
+	      " DirectSound capture \"%s\" initialized (clock_rate=%d, "
+	      "channel_count=%d, samples_per_frame=%d (%dms))",
+	      dev_info[dev_id].info.name,
+	      clock_rate, channel_count, samples_per_frame,
+	      samples_per_frame * 1000 / clock_rate));
+
+    return PJ_SUCCESS;
+}
+
+
+
+static BOOL AppReadDataFromBuffer(LPDIRECTSOUNDCAPTUREBUFFER lpDsb, // The buffer.
+				  DWORD dwOffset,		    // Our own write cursor.
+				  LPBYTE lpbSoundData,		    // Start of our data.
+				  DWORD dwSoundBytes)		    // Size of block to copy.
+{ 
+    LPVOID  lpvPtr1; 
+    DWORD dwBytes1; 
+    LPVOID  lpvPtr2; 
+    DWORD dwBytes2; 
+    HRESULT hr; 
+    
+    // Obtain memory address of write block. This will be in two parts
+    // if the block wraps around.
+    
+    hr = IDirectSoundCaptureBuffer_Lock( lpDsb, dwOffset, dwSoundBytes, &lpvPtr1, 
+					 &dwBytes1, &lpvPtr2, &dwBytes2, 0); 
+    
+    if SUCCEEDED(hr) { 
+	// Read from pointers. 
+	pj_memcpy(lpbSoundData, lpvPtr1, dwBytes1); 
+	if (lpvPtr2 != NULL)
+	    pj_memcpy(lpbSoundData+dwBytes1, lpvPtr2, dwBytes2); 
+	
+	// Release the data back to DirectSound. 
+	hr = IDirectSoundCaptureBuffer_Unlock(lpDsb, lpvPtr1, dwBytes1, lpvPtr2, dwBytes2); 
+	if SUCCEEDED(hr)
+	    return TRUE; 
+    } 
+    
+    // Lock, Unlock, or Restore failed. 
+    return FALSE; 
+}
+
+
+static BOOL AppWriteDataToBuffer(LPDIRECTSOUNDBUFFER lpDsb,  // The buffer.
+				 DWORD dwOffset,	      // Our own write cursor.
+				 LPBYTE lpbSoundData,	      // Start of our data.
+				 DWORD dwSoundBytes)	      // Size of block to copy.
+{ 
+    LPVOID  lpvPtr1; 
+    DWORD dwBytes1; 
+    LPVOID  lpvPtr2; 
+    DWORD dwBytes2; 
+    HRESULT hr; 
+    
+    // Obtain memory address of write block. This will be in two parts
+    // if the block wraps around.
+    
+    hr = IDirectSoundBuffer_Lock( lpDsb, dwOffset, dwSoundBytes, &lpvPtr1, 
+				  &dwBytes1, &lpvPtr2, &dwBytes2, 0); 
+    
+    // If the buffer was lost, restore and retry lock. 
+    if (DSERR_BUFFERLOST == hr) { 
+	IDirectSoundBuffer_Restore(lpDsb); 
+	hr = IDirectSoundBuffer_Lock( lpDsb, dwOffset, dwSoundBytes, 
+				      &lpvPtr1, &dwBytes1, &lpvPtr2, &dwBytes2, 0); 
+    } 
+    if SUCCEEDED(hr) { 
+	pj_memcpy(lpvPtr1, lpbSoundData, dwBytes1); 
+	if (NULL != lpvPtr2) 
+	    pj_memcpy(lpvPtr2, lpbSoundData+dwBytes1, dwBytes2); 
+	
+	hr = IDirectSoundBuffer_Unlock(lpDsb, lpvPtr1, dwBytes1, lpvPtr2, dwBytes2); 
+	if SUCCEEDED(hr)
+	    return TRUE; 
+    } 
+    
+    return FALSE; 
+}
+
+
+/*
+ * Check if there are captured frames in DirectSound capture buffer.
+ */
+static unsigned dsound_captured_size(struct dsound_stream *dsound_strm)
+{
+    HRESULT hr;
+    long size_available;
+    DWORD writePos, readPos;
+
+    hr = IDirectSoundCaptureBuffer_GetCurrentPosition(dsound_strm->ds.capture.lpDsBuffer, 
+						      &writePos, &readPos);
+    if FAILED(hr)
+	return PJ_FALSE;
+
+    if (readPos < dsound_strm->dwBytePos)
+	size_available = readPos +
+		    (dsound_strm->dwDsBufferSize) - dsound_strm->dwBytePos;
+    else
+	size_available = readPos - dsound_strm->dwBytePos;
+
+    return size_available;
+}
+
+/*
+ * DirectSound capture and playback thread.
+ */
+static int dsound_dev_thread(void *arg)
+{
+    pjmedia_snd_stream *strm = arg;
+    HANDLE events[2];
+    unsigned eventCount;
+    unsigned bytes_per_frame;
+    pj_status_t status;
+
+
+    eventCount = 0;
+    if (strm->dir & PJMEDIA_DIR_PLAYBACK)
+	events[eventCount++] = strm->play_strm.hEvent;
+    if (strm->dir & PJMEDIA_DIR_CAPTURE)
+	events[eventCount++] = strm->rec_strm.hEvent;
+
+
+    /* Raise self priority. We don't want the audio to be distorted by
+     * system activity.
+     */
+    //SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_HIGHEST);
+
+    /* Calculate bytes per frame */
+    bytes_per_frame = strm->samples_per_frame * BYTES_PER_SAMPLE;
+
+    /*
+     * Loop while not signalled to quit, wait for event objects to be 
+     * signalled by DirectSound capture and play buffer.
+     */
+    while (!strm->thread_quit_flag) {
+	
+	DWORD rc;
+	pjmedia_dir signalled_dir;
+
+	rc = WaitForMultipleObjects(eventCount, events, FALSE, 
+				    100);
+	if (rc < WAIT_OBJECT_0 || rc >= WAIT_OBJECT_0+eventCount)
+	    continue;
+
+
+	if (rc == WAIT_OBJECT_0) {
+	    if (events[0] == strm->play_strm.hEvent)
+		signalled_dir = PJMEDIA_DIR_PLAYBACK;
+	    else
+		signalled_dir = PJMEDIA_DIR_CAPTURE;
+	} else {
+	    if (events[1] == strm->play_strm.hEvent)
+		signalled_dir = PJMEDIA_DIR_PLAYBACK;
+	    else
+		signalled_dir = PJMEDIA_DIR_CAPTURE;
+	}
+
+
+	if (signalled_dir == PJMEDIA_DIR_PLAYBACK) {
+	    
+	    struct dsound_stream *dsound_strm;
+
+	    /*
+	     * DirectSound has requested us to feed some frames to
+	     * playback buffer.
+	     */
+
+	    dsound_strm = &strm->play_strm;
+	    status = PJ_SUCCESS;
+
+	    /* Get frame from application. */
+	    status = (*strm->play_cb)(strm->user_data, 
+				      dsound_strm->timestamp.u32.lo,
+				      strm->buffer,
+				      bytes_per_frame);
+	    if (status != PJ_SUCCESS)
+		break;
+
+	    /* Write to DirectSound buffer. */
+	    AppWriteDataToBuffer( dsound_strm->ds.play.lpDsBuffer, 
+				  dsound_strm->dwBytePos,
+				  (LPBYTE)strm->buffer, 
+				  bytes_per_frame);
+
+	    /* Increment position. */
+	    dsound_strm->dwBytePos += bytes_per_frame;
+	    if (dsound_strm->dwBytePos >= dsound_strm->dwDsBufferSize)
+		dsound_strm->dwBytePos -= dsound_strm->dwDsBufferSize;
+	    dsound_strm->timestamp.u64 += strm->samples_per_frame;
+
+	} else {
+	    /*
+	     * DirectSound has indicated that it has some frames ready
+	     * in the capture buffer. Get as much frames as possible to
+	     * prevent overflows.
+	     */
+	    struct dsound_stream *dsound_strm;
+	    BOOL rc;
+
+	    dsound_strm = &strm->rec_strm;
+
+	    do {
+		/* Capture from DirectSound buffer. */
+		rc = AppReadDataFromBuffer(dsound_strm->ds.capture.lpDsBuffer, 
+					   dsound_strm->dwBytePos,
+					   (LPBYTE)strm->buffer, 
+					   bytes_per_frame);
+		
+		if (!rc) {
+		    pj_bzero(strm->buffer, bytes_per_frame);
+		} 
+
+		/* Call callback */
+		status = (*strm->rec_cb)(strm->user_data, 
+					 dsound_strm->timestamp.u32.lo, 
+					 strm->buffer, 
+					 bytes_per_frame);
+
+		/* Quit thread on error. */
+		if (status != PJ_SUCCESS)
+		    goto on_error;
+
+
+		/* Increment position. */
+		dsound_strm->dwBytePos += bytes_per_frame;
+		if (dsound_strm->dwBytePos >= dsound_strm->dwDsBufferSize)
+		    dsound_strm->dwBytePos -= dsound_strm->dwDsBufferSize;
+		dsound_strm->timestamp.u64 += strm->samples_per_frame;
+
+		/* Fetch while we have more than 1 frame */
+	    } while (dsound_captured_size(dsound_strm) > bytes_per_frame);
+
+	}
+    }
+
+
+on_error:
+    PJ_LOG(5,(THIS_FILE, "DirectSound: thread stopping.."));
+    return 0;
+}
+
+
+/* DirectSound enum device callback */
+static BOOL CALLBACK DSEnumCallback( LPGUID lpGuid, LPCSTR lpcstrDescription,  
+				     LPCSTR lpcstrModule, LPVOID lpContext)
+{
+    unsigned index, max = sizeof(dev_info[index].info.name);
+    pj_bool_t is_capture_device = (lpContext != NULL);
+
+
+    PJ_UNUSED_ARG(lpcstrModule);
+
+
+    /* Put the capture and playback of the same devices to the same 
+     * dev_info item, by looking at the GUID.
+     */
+    for (index=0; index<dev_count; ++index) {
+	if (dev_info[index].lpGuid == lpGuid)
+	    break;
+    }
+
+    if (index == dev_count)
+	++dev_count;
+    else if (dev_count >= MAX_HARDWARE) {
+	pj_assert(!"Too many DirectSound hardware found");
+	PJ_LOG(4,(THIS_FILE, "Too many hardware found, some devices will "
+			     "not be listed"));
+	return FALSE;
+    }
+
+    strncpy(dev_info[index].info.name, lpcstrDescription, max);
+    dev_info[index].info.name[max-1] = '\0';
+    dev_info[index].lpGuid = lpGuid;
+    dev_info[index].info.default_samples_per_sec = 44100;
+    
+    /* Just assumed that device supports stereo capture/playback */
+    if (is_capture_device)
+	dev_info[index].info.input_count+=2;
+    else
+	dev_info[index].info.output_count+=2;
+
+    return TRUE;
+}
+
+
+/*
+ * Init sound library.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_init(pj_pool_factory *factory)
+{
+    HRESULT hr;
+    unsigned i;
+
+    if (++snd_init_count != 1)
+	return PJ_SUCCESS;
+
+    pool_factory = factory;
+
+    /* Enumerate sound playback devices */
+    hr = DirectSoundEnumerate(&DSEnumCallback, NULL);
+    if (FAILED(hr))
+	return PJ_RETURN_OS_ERROR(hr);
+
+    /* Enumerate sound capture devices */
+    hr = DirectSoundCaptureEnumerate(&DSEnumCallback, (void*)1);
+    if (FAILED(hr))
+	return PJ_RETURN_OS_ERROR(hr);
+
+    PJ_LOG(4,(THIS_FILE, "DirectSound initialized, found %d devices:",
+	      dev_count));
+    for (i=0; i<dev_count; ++i) {
+	PJ_LOG(4,(THIS_FILE, " dev_id %d: %s  (in=%d, out=%d)", 
+		  i, dev_info[i].info.name, 
+		  dev_info[i].info.input_count, 
+		  dev_info[i].info.output_count));
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Deinitialize sound library.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_deinit(void)
+{
+    --snd_init_count;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Get device count.
+ */
+PJ_DEF(int) pjmedia_snd_get_dev_count(void)
+{
+    return dev_count;
+}
+
+/*
+ * Get device info.
+ */
+PJ_DEF(const pjmedia_snd_dev_info*) pjmedia_snd_get_dev_info(unsigned index)
+{
+    if (index == (unsigned)-1) 
+	index = 0;
+
+    PJ_ASSERT_RETURN(index < dev_count, NULL);
+
+    return &dev_info[index].info;
+}
+
+
+/*
+ * Open stream.
+ */
+static pj_status_t open_stream( pjmedia_dir dir,
+			        int rec_id,
+				int play_id,
+				unsigned clock_rate,
+				unsigned channel_count,
+				unsigned samples_per_frame,
+				unsigned bits_per_sample,
+				pjmedia_snd_rec_cb rec_cb,
+				pjmedia_snd_play_cb play_cb,
+				void *user_data,
+				pjmedia_snd_stream **p_snd_strm)
+{
+    pj_pool_t *pool;
+    pjmedia_snd_stream *strm;
+    pj_status_t status;
+
+
+    /* Make sure sound subsystem has been initialized with
+     * pjmedia_snd_init()
+     */
+    PJ_ASSERT_RETURN( pool_factory != NULL, PJ_EINVALIDOP );
+
+
+    /* Can only support 16bits per sample */
+    PJ_ASSERT_RETURN(bits_per_sample == BITS_PER_SAMPLE, PJ_EINVAL);
+
+    /* Create and Initialize stream descriptor */
+    pool = pj_pool_create(pool_factory, "dsound-dev", 1000, 1000, NULL);
+    PJ_ASSERT_RETURN(pool != NULL, PJ_ENOMEM);
+
+    strm = pj_pool_zalloc(pool, sizeof(pjmedia_snd_stream));
+    strm->dir = dir;
+    strm->play_id = play_id;
+    strm->rec_id = rec_id;
+    strm->pool = pool;
+    strm->rec_cb = rec_cb;
+    strm->play_cb = play_cb;
+    strm->user_data = user_data;
+    strm->clock_rate = clock_rate;
+    strm->samples_per_frame = samples_per_frame;
+    strm->bits_per_sample = bits_per_sample;
+    strm->channel_count = channel_count;
+    strm->buffer = pj_pool_alloc(pool, samples_per_frame * BYTES_PER_SAMPLE);
+    if (!strm->buffer) {
+	pj_pool_release(pool);
+	return PJ_ENOMEM;
+    }
+
+    /* Create player stream */
+    if (dir & PJMEDIA_DIR_PLAYBACK) {
+	status = init_player_stream( &strm->play_strm, play_id, clock_rate,
+				     channel_count, samples_per_frame,
+				     DEFAULT_BUFFER_COUNT );
+	if (status != PJ_SUCCESS) {
+	    pjmedia_snd_stream_close(strm);
+	    return status;
+	}
+    }
+
+    /* Create capture stream */
+    if (dir & PJMEDIA_DIR_CAPTURE) {
+	status = init_capture_stream( &strm->rec_strm, rec_id, clock_rate,
+				      channel_count, samples_per_frame,
+				      DEFAULT_BUFFER_COUNT);
+	if (status != PJ_SUCCESS) {
+	    pjmedia_snd_stream_close(strm);
+	    return status;
+	}
+    }
+
+
+    /* Create and start the thread */
+    status = pj_thread_create(pool, "dsound", &dsound_dev_thread, strm,
+			      0, 0, &strm->thread);
+    if (status != PJ_SUCCESS) {
+	pjmedia_snd_stream_close(strm);
+	return status;
+    }
+
+    *p_snd_strm = strm;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Open stream.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_open_rec( int index,
+					  unsigned clock_rate,
+					  unsigned channel_count,
+					  unsigned samples_per_frame,
+					  unsigned bits_per_sample,
+					  pjmedia_snd_rec_cb rec_cb,
+					  void *user_data,
+					  pjmedia_snd_stream **p_snd_strm)
+{
+    PJ_ASSERT_RETURN(rec_cb && p_snd_strm, PJ_EINVAL);
+
+    return open_stream( PJMEDIA_DIR_CAPTURE, index, -1,
+			clock_rate, channel_count, samples_per_frame,
+			bits_per_sample, rec_cb, NULL, user_data,
+			p_snd_strm);
+}
+
+PJ_DEF(pj_status_t) pjmedia_snd_open_player( int index,
+					unsigned clock_rate,
+					unsigned channel_count,
+					unsigned samples_per_frame,
+					unsigned bits_per_sample,
+					pjmedia_snd_play_cb play_cb,
+					void *user_data,
+					pjmedia_snd_stream **p_snd_strm)
+{
+    PJ_ASSERT_RETURN(play_cb && p_snd_strm, PJ_EINVAL);
+
+    return open_stream( PJMEDIA_DIR_PLAYBACK, -1, index,
+			clock_rate, channel_count, samples_per_frame,
+			bits_per_sample, NULL, play_cb, user_data,
+			p_snd_strm);
+}
+
+/*
+ * Open both player and recorder.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_open( int rec_id,
+				      int play_id,
+				      unsigned clock_rate,
+				      unsigned channel_count,
+				      unsigned samples_per_frame,
+				      unsigned bits_per_sample,
+				      pjmedia_snd_rec_cb rec_cb,
+				      pjmedia_snd_play_cb play_cb,
+				      void *user_data,
+				      pjmedia_snd_stream **p_snd_strm)
+{
+    PJ_ASSERT_RETURN(rec_cb && play_cb && p_snd_strm, PJ_EINVAL);
+
+    return open_stream( PJMEDIA_DIR_CAPTURE_PLAYBACK, rec_id, play_id,
+			clock_rate, channel_count, samples_per_frame,
+			bits_per_sample, rec_cb, play_cb, user_data,
+			p_snd_strm );
+}
+
+/*
+ * Get stream info.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_stream_get_info(pjmedia_snd_stream *strm,
+						pjmedia_snd_stream_info *pi)
+{
+
+    PJ_ASSERT_RETURN(strm && pi, PJ_EINVAL);
+
+    pj_bzero(pi, sizeof(*pi));
+    pi->dir = strm->dir;
+    pi->play_id = strm->play_id;
+    pi->rec_id = strm->rec_id;
+    pi->clock_rate = strm->clock_rate;
+    pi->channel_count = strm->channel_count;
+    pi->samples_per_frame = strm->samples_per_frame;
+    pi->bits_per_sample = strm->bits_per_sample;
+    pi->rec_latency = 0;
+    pi->play_latency = 0;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Start stream.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_stream_start(pjmedia_snd_stream *stream)
+{
+    HRESULT hr;
+
+    PJ_UNUSED_ARG(stream);
+
+    if (stream->play_strm.ds.play.lpDsBuffer) {
+	hr = IDirectSoundBuffer_Play(stream->play_strm.ds.play.lpDsBuffer, 
+				     0, 0, DSBPLAY_LOOPING);
+	if (FAILED(hr))
+	    return PJ_RETURN_OS_ERROR(hr);
+	PJ_LOG(5,(THIS_FILE, "DirectSound playback stream started"));
+    }
+    
+    if (stream->rec_strm.ds.capture.lpDsBuffer) {
+	hr = IDirectSoundCaptureBuffer_Start(stream->rec_strm.ds.capture.lpDsBuffer,
+					     DSCBSTART_LOOPING );
+	if (FAILED(hr))
+	    return PJ_RETURN_OS_ERROR(hr);
+	PJ_LOG(5,(THIS_FILE, "DirectSound capture stream started"));
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Stop stream.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_stream_stop(pjmedia_snd_stream *stream)
+{
+    PJ_ASSERT_RETURN(stream != NULL, PJ_EINVAL);
+
+    if (stream->play_strm.ds.play.lpDsBuffer) {
+	PJ_LOG(5,(THIS_FILE, "Stopping DirectSound playback stream"));
+	IDirectSoundBuffer_Stop( stream->play_strm.ds.play.lpDsBuffer );
+    }
+
+    if (stream->rec_strm.ds.capture.lpDsBuffer) {
+	PJ_LOG(5,(THIS_FILE, "Stopping DirectSound capture stream"));
+	IDirectSoundCaptureBuffer_Stop(stream->rec_strm.ds.capture.lpDsBuffer);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Destroy stream.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_stream_close(pjmedia_snd_stream *stream)
+{
+    PJ_ASSERT_RETURN(stream != NULL, PJ_EINVAL);
+
+    pjmedia_snd_stream_stop(stream);
+
+    if (stream->thread) {
+	stream->thread_quit_flag = 1;
+	pj_thread_join(stream->thread);
+	pj_thread_destroy(stream->thread);
+	stream->thread = NULL;
+    }
+
+    if (stream->play_strm.lpDsNotify) {
+	IDirectSoundNotify_Release( stream->play_strm.lpDsNotify );
+	stream->play_strm.lpDsNotify = NULL;
+    }
+    
+    if (stream->play_strm.hEvent) {
+	CloseHandle(stream->play_strm.hEvent);
+	stream->play_strm.hEvent = NULL;
+    }
+
+    if (stream->play_strm.ds.play.lpDsBuffer) {
+	IDirectSoundBuffer_Release( stream->play_strm.ds.play.lpDsBuffer );
+	stream->play_strm.ds.play.lpDsBuffer = NULL;
+    }
+
+    if (stream->play_strm.ds.play.lpDs) {
+	IDirectSound_Release( stream->play_strm.ds.play.lpDs );
+	stream->play_strm.ds.play.lpDs = NULL;
+    }
+
+    if (stream->rec_strm.lpDsNotify) {
+	IDirectSoundNotify_Release( stream->rec_strm.lpDsNotify );
+	stream->rec_strm.lpDsNotify = NULL;
+    }
+    
+    if (stream->rec_strm.hEvent) {
+	CloseHandle(stream->rec_strm.hEvent);
+	stream->rec_strm.hEvent = NULL;
+    }
+
+    if (stream->rec_strm.ds.capture.lpDsBuffer) {
+	IDirectSoundCaptureBuffer_Release( stream->rec_strm.ds.capture.lpDsBuffer );
+	stream->rec_strm.ds.capture.lpDsBuffer = NULL;
+    }
+
+    if (stream->rec_strm.ds.capture.lpDs) {
+	IDirectSoundCapture_Release( stream->rec_strm.ds.capture.lpDs );
+	stream->rec_strm.ds.capture.lpDs = NULL;
+    }
+
+
+    pj_pool_release(stream->pool);
+
+    return PJ_SUCCESS;
+}
+
+
+#endif	/* PJMEDIA_SOUND_IMPLEMENTATION */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/echo_common.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/echo_common.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/echo_common.c	(revision 1163)
@@ -0,0 +1,218 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/echo.h>
+#include <pj/assert.h>
+#include <pj/pool.h>
+
+
+typedef struct ec_operations ec_operations;
+
+struct pjmedia_echo_state
+{
+    void	    *state;
+    ec_operations   *op;
+};
+
+
+struct ec_operations
+{
+    pj_status_t (*ec_create)(pj_pool_t *pool,
+			    unsigned clock_rate,
+			    unsigned samples_per_frame,
+			    unsigned tail_ms,
+			    unsigned latency_ms,
+			    unsigned options,
+			    void **p_state );
+    pj_status_t (*ec_destroy)(void *state );
+    pj_status_t (*ec_playback)(void *state,
+			      pj_int16_t *play_frm );
+    pj_status_t (*ec_capture)(void *state,
+			      pj_int16_t *rec_frm,
+			      unsigned options );
+    pj_status_t (*ec_cancel)(void *state,
+			     pj_int16_t *rec_frm,
+			     const pj_int16_t *play_frm,
+			     unsigned options,
+			     void *reserved );
+};
+
+
+
+/*
+ * Simple echo suppressor
+ */
+PJ_DECL(pj_status_t) echo_supp_create(pj_pool_t *pool,
+				      unsigned clock_rate,
+				      unsigned samples_per_frame,
+				      unsigned tail_ms,
+				      unsigned latency_ms,
+				      unsigned options,
+				      void **p_state );
+PJ_DECL(pj_status_t) echo_supp_destroy(void *state);
+PJ_DECL(pj_status_t) echo_supp_playback(void *state,
+					pj_int16_t *play_frm );
+PJ_DECL(pj_status_t) echo_supp_capture(void *state,
+				       pj_int16_t *rec_frm,
+				       unsigned options );
+PJ_DECL(pj_status_t) echo_supp_cancel_echo(void *state,
+					   pj_int16_t *rec_frm,
+					   const pj_int16_t *play_frm,
+					   unsigned options,
+					   void *reserved );
+
+static struct ec_operations echo_supp_op = 
+{
+    &echo_supp_create,
+    &echo_supp_destroy,
+    &echo_supp_playback,
+    &echo_supp_capture,
+    &echo_supp_cancel_echo
+};
+
+
+
+/*
+ * Speex AEC prototypes
+ */
+#if defined(PJMEDIA_HAS_SPEEX_AEC) && PJMEDIA_HAS_SPEEX_AEC!=0
+PJ_DECL(pj_status_t) speex_aec_create(pj_pool_t *pool,
+				      unsigned clock_rate,
+				      unsigned samples_per_frame,
+				      unsigned tail_ms,
+				      unsigned latency_ms,
+				      unsigned options,
+				      void **p_state );
+PJ_DECL(pj_status_t) speex_aec_destroy(void *state );
+PJ_DECL(pj_status_t) speex_aec_playback(void *state,
+				        pj_int16_t *play_frm );
+PJ_DECL(pj_status_t) speex_aec_capture(void *state,
+				       pj_int16_t *rec_frm,
+				       unsigned options );
+PJ_DECL(pj_status_t) speex_aec_cancel_echo(void *state,
+					   pj_int16_t *rec_frm,
+					   const pj_int16_t *play_frm,
+					   unsigned options,
+					   void *reserved );
+
+static struct ec_operations aec_op = 
+{
+    &speex_aec_create,
+    &speex_aec_destroy,
+    &speex_aec_playback,
+    &speex_aec_capture,
+    &speex_aec_cancel_echo
+};
+
+#else
+#define aec_op echo_supp_op
+#endif
+
+
+
+/*
+ * Create the echo canceller. 
+ */
+PJ_DEF(pj_status_t) pjmedia_echo_create( pj_pool_t *pool,
+					 unsigned clock_rate,
+					 unsigned samples_per_frame,
+					 unsigned tail_ms,
+					 unsigned latency_ms,
+					 unsigned options,
+					 pjmedia_echo_state **p_echo )
+{
+    pjmedia_echo_state *ec;
+    pj_status_t status;
+
+    /* Force to use simple echo suppressor if AEC is not available */
+#if !defined(PJMEDIA_HAS_SPEEX_AEC) || PJMEDIA_HAS_SPEEX_AEC==0
+    options |= PJMEDIA_ECHO_SIMPLE;
+#endif
+
+    ec = pj_pool_zalloc(pool, sizeof(struct pjmedia_echo_state));
+
+    if (options & PJMEDIA_ECHO_SIMPLE) {
+	ec->op = &echo_supp_op;
+	status = (*echo_supp_op.ec_create)(pool, clock_rate, samples_per_frame,
+					   tail_ms, latency_ms, options,
+					   &ec->state);
+    } else {
+	ec->op = &aec_op;
+	status = (*aec_op.ec_create)(pool, clock_rate, 
+				     samples_per_frame,
+				     tail_ms, latency_ms, options,
+				     &ec->state);
+    }
+
+    if (status != PJ_SUCCESS)
+	return status;
+
+    pj_assert(ec->state != NULL);
+
+    *p_echo = ec;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Destroy the Echo Canceller. 
+ */
+PJ_DEF(pj_status_t) pjmedia_echo_destroy(pjmedia_echo_state *echo )
+{
+    return (*echo->op->ec_destroy)(echo->state);
+}
+
+
+
+/*
+ * Let the Echo Canceller knows that a frame has been played to the speaker.
+ */
+PJ_DEF(pj_status_t) pjmedia_echo_playback( pjmedia_echo_state *echo,
+					   pj_int16_t *play_frm )
+{
+    return (*echo->op->ec_playback)(echo->state, play_frm);
+}
+
+
+/*
+ * Let the Echo Canceller knows that a frame has been captured from 
+ * the microphone.
+ */
+PJ_DEF(pj_status_t) pjmedia_echo_capture( pjmedia_echo_state *echo,
+					  pj_int16_t *rec_frm,
+					  unsigned options )
+{
+    return (*echo->op->ec_capture)(echo->state, rec_frm, options);
+}
+
+
+/*
+ * Perform echo cancellation.
+ */
+PJ_DEF(pj_status_t) pjmedia_echo_cancel( pjmedia_echo_state *echo,
+					 pj_int16_t *rec_frm,
+					 const pj_int16_t *play_frm,
+					 unsigned options,
+					 void *reserved )
+{
+    return (*echo->op->ec_cancel)( echo->state, rec_frm, play_frm, options, 
+				   reserved);
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/echo_port.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/echo_port.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/echo_port.c	(revision 1163)
@@ -0,0 +1,139 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/echo_port.h>
+#include <pjmedia/echo.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+
+
+#define THIS_FILE   "ec_port.c"
+#define SIGNATURE   PJMEDIA_PORT_SIGNATURE('E', 'C', 'H', 'O')
+#define BUF_COUNT   32
+
+struct ec
+{
+    pjmedia_port	 base;
+    pjmedia_port	*dn_port;
+    pjmedia_echo_state	*ec;
+};
+
+
+static pj_status_t ec_put_frame(pjmedia_port *this_port, 
+				const pjmedia_frame *frame);
+static pj_status_t ec_get_frame(pjmedia_port *this_port, 
+				pjmedia_frame *frame);
+static pj_status_t ec_on_destroy(pjmedia_port *this_port);
+
+
+PJ_DEF(pj_status_t) pjmedia_echo_port_create(pj_pool_t *pool,
+					     pjmedia_port *dn_port,
+					     unsigned tail_ms,
+					     unsigned latency_ms,
+					     unsigned options,
+					     pjmedia_port **p_port )
+{
+    const pj_str_t AEC = { "EC", 2 };
+    struct ec *ec;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(pool && dn_port && p_port, PJ_EINVAL);
+    PJ_ASSERT_RETURN(dn_port->info.bits_per_sample==16 && tail_ms, 
+		     PJ_EINVAL);
+
+    /* Create the port and the AEC itself */
+    ec = pj_pool_zalloc(pool, sizeof(struct ec));
+    
+    pjmedia_port_info_init(&ec->base.info, &AEC, SIGNATURE,
+			   dn_port->info.clock_rate, 
+			   dn_port->info.channel_count, 
+			   dn_port->info.bits_per_sample,
+			   dn_port->info.samples_per_frame);
+
+    status = pjmedia_echo_create(pool, dn_port->info.clock_rate, 
+				 dn_port->info.samples_per_frame,
+				 tail_ms, latency_ms, options, &ec->ec);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* More init */
+    ec->dn_port = dn_port;
+    ec->base.get_frame = &ec_get_frame;
+    ec->base.put_frame = &ec_put_frame;
+    ec->base.on_destroy = &ec_on_destroy;
+
+    /* Done */
+    *p_port = &ec->base;
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t ec_put_frame( pjmedia_port *this_port, 
+				 const pjmedia_frame *frame)
+{
+    struct ec *ec = (struct ec*)this_port;
+
+    PJ_ASSERT_RETURN(this_port->info.signature == SIGNATURE, PJ_EINVAL);
+
+    if (frame->type == PJMEDIA_FRAME_TYPE_NONE ) {
+	return pjmedia_port_put_frame(ec->dn_port, frame);
+    }
+
+    PJ_ASSERT_RETURN(frame->size == this_port->info.samples_per_frame * 2,
+		     PJ_EINVAL);
+
+    pjmedia_echo_capture(ec->ec, frame->buf, 0);
+
+    return pjmedia_port_put_frame(ec->dn_port, frame);
+}
+
+
+static pj_status_t ec_get_frame( pjmedia_port *this_port, 
+				 pjmedia_frame *frame)
+{
+    struct ec *ec = (struct ec*)this_port;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(this_port->info.signature == SIGNATURE, PJ_EINVAL);
+
+    status = pjmedia_port_get_frame(ec->dn_port, frame);
+    if (status!=PJ_SUCCESS || frame->type!=PJMEDIA_FRAME_TYPE_AUDIO) {
+	pjmedia_zero_samples(frame->buf, this_port->info.samples_per_frame);
+    }
+
+    pjmedia_echo_playback(ec->ec, frame->buf);
+
+    return status;
+}
+
+
+static pj_status_t ec_on_destroy(pjmedia_port *this_port)
+{
+    struct ec *ec = (struct ec*)this_port;
+
+    PJ_ASSERT_RETURN(this_port->info.signature == SIGNATURE, PJ_EINVAL);
+
+    pjmedia_echo_destroy(ec->ec);
+
+    return PJ_SUCCESS;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/echo_speex.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/echo_speex.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/echo_speex.c	(revision 1163)
@@ -0,0 +1,575 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/echo.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/silencedet.h>
+#include <pj/assert.h>
+#include <pj/lock.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <speex/speex_echo.h>
+#include <speex/speex_preprocess.h>
+
+
+#define THIS_FILE	"echo_speex.c"
+#define BUF_COUNT	16
+#define MIN_PREFETCH	2
+#define MAX_PREFETCH	(BUF_COUNT*2/3)
+
+
+
+#if 0
+# define TRACE_(expr)  PJ_LOG(5,expr)
+#else
+# define TRACE_(expr)
+#endif
+
+
+typedef struct pjmedia_frame_queue pjmedia_frame_queue;
+
+struct fq_frame
+{
+    PJ_DECL_LIST_MEMBER(struct fq_frame);
+    void	*buf;
+    unsigned	 size;
+    pj_uint32_t	 seq;
+};
+
+struct pjmedia_frame_queue
+{
+    char	     obj_name[PJ_MAX_OBJ_NAME];
+    unsigned	     frame_size;
+    int		     samples_per_frame;
+    unsigned	     count;
+    unsigned	     max_count;
+    struct fq_frame  frame_list;
+    struct fq_frame  free_list;
+
+    int		     seq_delay;
+    int		     prefetch_count;
+};
+
+PJ_DEF(pj_status_t) pjmedia_frame_queue_create( pj_pool_t *pool,
+					        const char *name,
+					        unsigned frame_size,
+					        unsigned samples_per_frame,
+					        unsigned max_count,
+					        pjmedia_frame_queue **p_fq)
+{
+    pjmedia_frame_queue *fq;
+    unsigned i;
+
+    fq = pj_pool_zalloc(pool, sizeof(pjmedia_frame_queue));
+
+    pj_ansi_snprintf(fq->obj_name, sizeof(fq->obj_name), name, fq);
+    fq->obj_name[sizeof(fq->obj_name)-1] = '\0';
+
+    fq->max_count = max_count;
+    fq->frame_size = frame_size;
+    fq->samples_per_frame = samples_per_frame;
+    fq->count = 0;
+
+    pj_list_init(&fq->frame_list);
+    pj_list_init(&fq->free_list);
+
+    for (i=0; i<max_count; ++i) {
+	struct fq_frame *f;
+
+	f = pj_pool_zalloc(pool, sizeof(struct fq_frame));
+	f->buf = pj_pool_alloc(pool, frame_size);
+
+	pj_list_push_back(&fq->free_list, f);
+	
+    }
+
+    *p_fq = fq;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjmedia_frame_queue_init( pjmedia_frame_queue *fq,
+					      int seq_delay,
+					      int prefetch_count)
+{
+    if (prefetch_count > MAX_PREFETCH)
+	prefetch_count = MAX_PREFETCH;
+
+    fq->seq_delay = seq_delay;
+    fq->prefetch_count = prefetch_count;
+    fq->count = 0;
+    pj_list_merge_first(&fq->free_list, &fq->frame_list);
+
+    PJ_LOG(5,(fq->obj_name, "AEC reset, delay=%d, prefetch=%d", 
+	      fq->seq_delay, fq->prefetch_count));
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_bool_t) pjmedia_frame_queue_empty( pjmedia_frame_queue *fq )
+{
+    return pj_list_empty(&fq->frame_list);
+}
+
+PJ_DEF(int) pjmedia_frame_queue_get_prefetch( pjmedia_frame_queue *fq )
+{
+    return fq->prefetch_count;
+}
+
+PJ_DEF(pj_status_t) pjmedia_frame_queue_put( pjmedia_frame_queue *fq,
+					     const void *framebuf,
+					     unsigned size,
+					     pj_uint32_t timestamp )
+{
+    struct fq_frame *f;
+
+    TRACE_((fq->obj_name, "PUT seq=%d, count=%d", 
+	    timestamp / fq->samples_per_frame, fq->count));
+
+    if (pj_list_empty(&fq->free_list)) {
+	PJ_LOG(5,(fq->obj_name, 
+		  " AEC info: queue is full, frame discarded "
+		  "[count=%d, seq=%d]",
+		  fq->max_count, timestamp / fq->samples_per_frame));
+	//pjmedia_frame_queue_init(fq, fq->seq_delay, fq->prefetch_count);
+	return PJ_ETOOMANY;
+    }
+
+    PJ_ASSERT_RETURN(size <= fq->frame_size, PJ_ETOOBIG);
+
+    f = fq->free_list.next;
+    pj_list_erase(f);
+
+    pj_memcpy(f->buf, framebuf, size);
+    f->size = size;
+    f->seq = timestamp / fq->samples_per_frame;
+
+    pj_list_push_back(&fq->frame_list, f);
+    ++fq->count;
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjmedia_frame_queue_get( pjmedia_frame_queue *fq,
+					     pj_uint32_t get_timestamp,
+					     void **framebuf,
+					     unsigned *size )
+{
+    pj_uint32_t frame_seq;
+    struct fq_frame *f;
+
+    frame_seq = get_timestamp/fq->samples_per_frame + fq->seq_delay -
+		fq->prefetch_count;
+
+    TRACE_((fq->obj_name, "GET seq=%d for seq=%d delay=%d, prefetch=%d", 
+	    get_timestamp/fq->samples_per_frame, frame_seq, fq->seq_delay, 
+	    fq->prefetch_count));
+
+    *size = 0;
+
+    /* Remove old frames */
+    for (;!pj_list_empty(&fq->frame_list);) {
+	f = fq->frame_list.next;
+	if (f->seq >= frame_seq)
+	    break;
+
+	PJ_LOG(5,(fq->obj_name, 
+		  " AEC Info: old frame removed (seq=%d, want=%d, count=%d)",
+		  f->seq, frame_seq, fq->count));
+	pj_list_erase(f);
+	--fq->count;
+	pj_list_push_back(&fq->free_list, f);
+    }
+
+    if (pj_list_empty(&fq->frame_list)) {
+	PJ_LOG(5,(fq->obj_name, 
+		  " AEC Info: empty queue for seq=%d!",
+		  frame_seq));
+	return PJ_ENOTFOUND;
+    }
+
+    f = fq->frame_list.next;
+
+    if (f->seq > frame_seq) {
+	PJ_LOG(5,(fq->obj_name, 
+		  " AEC Info: prefetching (first seq=%d)",
+		  f->seq));
+	return -1;
+    }
+
+    pj_list_erase(f);
+    --fq->count;
+
+    *framebuf = (void*)f->buf;
+    *size = f->size;
+
+    TRACE_((fq->obj_name, " returning frame with seq=%d, count=%d", 
+	    f->seq, fq->count));
+
+    pj_list_push_front(&fq->free_list, f);
+    return PJ_SUCCESS;
+}
+
+/*
+ * Prototypes
+ */
+PJ_DECL(pj_status_t) speex_aec_create(pj_pool_t *pool,
+				      unsigned clock_rate,
+				      unsigned samples_per_frame,
+				      unsigned tail_ms,
+				      unsigned latency_ms,
+				      unsigned options,
+				      void **p_state );
+PJ_DECL(pj_status_t) speex_aec_destroy(void *state );
+PJ_DECL(pj_status_t) speex_aec_playback(void *state,
+				        pj_int16_t *play_frm );
+PJ_DECL(pj_status_t) speex_aec_capture(void *state,
+				       pj_int16_t *rec_frm,
+				       unsigned options );
+PJ_DECL(pj_status_t) speex_aec_cancel_echo(void *state,
+					   pj_int16_t *rec_frm,
+					   const pj_int16_t *play_frm,
+					   unsigned options,
+					   void *reserved );
+
+
+enum
+{
+    TS_FLAG_PLAY = 1,
+    TS_FLAG_REC	 = 2,
+    TS_FLAG_OK	 = 3,
+};
+
+typedef struct speex_ec
+{
+    SpeexEchoState	 *state;
+    SpeexPreprocessState *preprocess;
+
+    unsigned		  samples_per_frame;
+    unsigned		  prefetch;
+    unsigned		  options;
+    pj_int16_t		 *tmp_frame;
+    spx_int32_t		 *residue;
+
+    pj_uint32_t		  play_ts,
+			  rec_ts,
+			  ts_flag;
+
+    pjmedia_frame_queue	 *frame_queue;
+    pj_lock_t		 *lock;		/* To protect buffers, if required  */
+} speex_ec;
+
+
+
+/*
+ * Create the AEC. 
+ */
+PJ_DEF(pj_status_t) speex_aec_create(pj_pool_t *pool,
+				     unsigned clock_rate,
+				     unsigned samples_per_frame,
+				     unsigned tail_ms,
+				     unsigned latency_ms,
+				     unsigned options,
+				     void **p_echo )
+{
+    speex_ec *echo;
+    int sampling_rate;
+    pj_status_t status;
+
+    *p_echo = NULL;
+
+    echo = pj_pool_zalloc(pool, sizeof(speex_ec));
+    PJ_ASSERT_RETURN(echo != NULL, PJ_ENOMEM);
+
+    if (options & PJMEDIA_ECHO_NO_LOCK) {
+	status = pj_lock_create_null_mutex(pool, "aec%p", &echo->lock);
+	if (status != PJ_SUCCESS)
+	    return status;
+    } else {
+	status = pj_lock_create_simple_mutex(pool, "aec%p", &echo->lock);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    echo->samples_per_frame = samples_per_frame;
+    echo->prefetch = (latency_ms * clock_rate / 1000) / samples_per_frame;
+    if (echo->prefetch < MIN_PREFETCH)
+	echo->prefetch = MIN_PREFETCH;
+    if (echo->prefetch > MAX_PREFETCH)
+	echo->prefetch = MAX_PREFETCH;
+    echo->options = options;
+
+    echo->state = speex_echo_state_init(samples_per_frame,
+					clock_rate * tail_ms / 1000);
+    if (echo->state == NULL) {
+	pj_lock_destroy(echo->lock);
+	return PJ_ENOMEM;
+    }
+
+    /* Set sampling rate */
+    sampling_rate = clock_rate;
+    speex_echo_ctl(echo->state, SPEEX_ECHO_SET_SAMPLING_RATE, 
+		   &sampling_rate);
+
+    echo->preprocess = speex_preprocess_state_init(samples_per_frame, 
+						   clock_rate);
+    if (echo->preprocess == NULL) {
+	speex_echo_state_destroy(echo->state);
+	pj_lock_destroy(echo->lock);
+	return PJ_ENOMEM;
+    }
+
+    /* Disable all preprocessing, we only want echo cancellation */
+#if 0
+    disabled = 0;
+    enabled = 1;
+    speex_preprocess_ctl(echo->preprocess, SPEEX_PREPROCESS_SET_DENOISE, 
+			 &enabled);
+    speex_preprocess_ctl(echo->preprocess, SPEEX_PREPROCESS_SET_AGC, 
+			 &disabled);
+    speex_preprocess_ctl(echo->preprocess, SPEEX_PREPROCESS_SET_VAD, 
+			 &disabled);
+    speex_preprocess_ctl(echo->preprocess, SPEEX_PREPROCESS_SET_DEREVERB, 
+			 &disabled);
+#endif
+
+    /* Control echo cancellation in the preprocessor */
+   speex_preprocess_ctl(echo->preprocess, SPEEX_PREPROCESS_SET_ECHO_STATE, 
+			echo->state);
+
+
+    /* Create temporary frame for echo cancellation */
+    echo->tmp_frame = pj_pool_zalloc(pool, 2 * samples_per_frame);
+    PJ_ASSERT_RETURN(echo->tmp_frame != NULL, PJ_ENOMEM);
+
+    /* Create temporary frame to receive residue */
+    echo->residue = pj_pool_zalloc(pool, sizeof(spx_int32_t) * 
+					    (samples_per_frame+1));
+    PJ_ASSERT_RETURN(echo->residue != NULL, PJ_ENOMEM);
+
+    /* Create frame queue */
+    status = pjmedia_frame_queue_create(pool, "aec%p", samples_per_frame*2,
+					samples_per_frame, BUF_COUNT, 
+					&echo->frame_queue);
+    if (status != PJ_SUCCESS) {
+	speex_preprocess_state_destroy(echo->preprocess);
+	speex_echo_state_destroy(echo->state);
+	pj_lock_destroy(echo->lock);
+	return status;
+    }
+
+    /* Done */
+    *p_echo = echo;
+
+    PJ_LOG(4,(THIS_FILE, "Speex Echo canceller/AEC created, clock_rate=%d, "
+			 "samples per frame=%d, tail length=%d ms, "
+			 "latency=%d ms", 
+			 clock_rate, samples_per_frame, tail_ms, latency_ms));
+    return PJ_SUCCESS;
+
+}
+
+
+/*
+ * Destroy AEC
+ */
+PJ_DEF(pj_status_t) speex_aec_destroy(void *state )
+{
+    speex_ec *echo = state;
+
+    PJ_ASSERT_RETURN(echo && echo->state, PJ_EINVAL);
+
+    if (echo->lock)
+	pj_lock_acquire(echo->lock);
+
+    if (echo->state) {
+	speex_echo_state_destroy(echo->state);
+	echo->state = NULL;
+    }
+
+    if (echo->preprocess) {
+	speex_preprocess_state_destroy(echo->preprocess);
+	echo->preprocess = NULL;
+    }
+
+    if (echo->lock) {
+	pj_lock_destroy(echo->lock);
+	echo->lock = NULL;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Let the AEC knows that a frame has been played to the speaker.
+ */
+PJ_DEF(pj_status_t) speex_aec_playback(void *state,
+				       pj_int16_t *play_frm )
+{
+    speex_ec *echo = state;
+
+    /* Sanity checks */
+    PJ_ASSERT_RETURN(echo && play_frm, PJ_EINVAL);
+
+    /* The AEC must be configured to support internal playback buffer */
+    PJ_ASSERT_RETURN(echo->frame_queue!= NULL, PJ_EINVALIDOP);
+
+    pj_lock_acquire(echo->lock);
+
+    /* Inc timestamp */
+    echo->play_ts += echo->samples_per_frame;
+
+    /* Initialize frame delay. */
+    if ((echo->ts_flag & TS_FLAG_PLAY) == 0) {
+	echo->ts_flag |= TS_FLAG_PLAY;
+
+	if (echo->ts_flag == TS_FLAG_OK) {
+	    int seq_delay;
+
+	    seq_delay = ((int)echo->play_ts - (int)echo->rec_ts) / 
+			    (int)echo->samples_per_frame;
+	    pjmedia_frame_queue_init(echo->frame_queue, seq_delay, 
+				     echo->prefetch);
+	}
+    }
+
+    if (pjmedia_frame_queue_put(echo->frame_queue, play_frm, 
+				echo->samples_per_frame*2, 
+				echo->play_ts) != PJ_SUCCESS)
+    {
+	int seq_delay;
+
+	/* On full reset frame queue */
+	seq_delay = ((int)echo->play_ts - (int)echo->rec_ts) / 
+			(int)echo->samples_per_frame;
+	pjmedia_frame_queue_init(echo->frame_queue, seq_delay,
+				 echo->prefetch);
+
+	/* And re-put */
+	pjmedia_frame_queue_put(echo->frame_queue, play_frm, 
+				echo->samples_per_frame*2, 
+				echo->play_ts);
+    }
+
+    pj_lock_release(echo->lock);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Let the AEC knows that a frame has been captured from the microphone.
+ */
+PJ_DEF(pj_status_t) speex_aec_capture( void *state,
+				       pj_int16_t *rec_frm,
+				       unsigned options )
+{
+    speex_ec *echo = state;
+    pj_status_t status = PJ_SUCCESS;
+
+    /* Sanity checks */
+    PJ_ASSERT_RETURN(echo && rec_frm, PJ_EINVAL);
+
+    /* The AEC must be configured to support internal playback buffer */
+    PJ_ASSERT_RETURN(echo->frame_queue!= NULL, PJ_EINVALIDOP);
+
+    /* Lock mutex */
+    pj_lock_acquire(echo->lock);
+
+    /* Inc timestamp */
+    echo->rec_ts += echo->samples_per_frame;
+
+    /* Init frame delay. */
+    if ((echo->ts_flag & TS_FLAG_REC) == 0) {
+	echo->ts_flag |= TS_FLAG_REC;
+
+	if (echo->ts_flag == TS_FLAG_OK) {
+	    int seq_delay;
+
+	    seq_delay = ((int)echo->play_ts - (int)echo->rec_ts) / 
+			    (int)echo->samples_per_frame;
+	    pjmedia_frame_queue_init(echo->frame_queue, seq_delay, 
+				     echo->prefetch);
+	}
+    }
+
+    /* Cancel echo */
+    if (echo->ts_flag == TS_FLAG_OK) {
+	void *play_buf;
+	unsigned size = 0;
+	
+	if (pjmedia_frame_queue_empty(echo->frame_queue)) {
+	    int seq_delay;
+
+	    seq_delay = ((int)echo->play_ts - (int)echo->rec_ts) / 
+			    (int)echo->samples_per_frame;
+	    pjmedia_frame_queue_init(echo->frame_queue, seq_delay, 
+				     echo->prefetch);
+	    status = -1;
+
+	} else {
+	    status = pjmedia_frame_queue_get(echo->frame_queue, echo->rec_ts,
+					     &play_buf, &size);
+	    if (size != 0) {
+		speex_aec_cancel_echo(echo, rec_frm, (pj_int16_t*)play_buf,
+				      options, NULL);
+	    }	
+	}
+
+	if (status != PJ_SUCCESS)
+	    speex_echo_state_reset(echo->state);
+    }
+
+    pj_lock_release(echo->lock);
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Perform echo cancellation.
+ */
+PJ_DEF(pj_status_t) speex_aec_cancel_echo( void *state,
+					   pj_int16_t *rec_frm,
+					   const pj_int16_t *play_frm,
+					   unsigned options,
+					   void *reserved )
+{
+    speex_ec *echo = state;
+
+    /* Sanity checks */
+    PJ_ASSERT_RETURN(echo && rec_frm && play_frm && options==0 &&
+		     reserved==NULL, PJ_EINVAL);
+
+    /* Cancel echo, put output in temporary buffer */
+    speex_echo_cancellation(echo->state, (const spx_int16_t*)rec_frm,
+			    (const spx_int16_t*)play_frm,
+			    (spx_int16_t*)echo->tmp_frame);
+
+
+    /* Preprocess output */
+    speex_preprocess_run(echo->preprocess, (spx_int16_t*)echo->tmp_frame);
+
+    /* Copy temporary buffer back to original rec_frm */
+    pjmedia_copy_samples(rec_frm, echo->tmp_frame, echo->samples_per_frame);
+
+    return PJ_SUCCESS;
+
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/echo_suppress.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/echo_suppress.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/echo_suppress.c	(revision 1163)
@@ -0,0 +1,211 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/types.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/silencedet.h>
+#include <pj/assert.h>
+#include <pj/lock.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+
+
+#define THIS_FILE			    "echo_suppress.c"
+
+
+/*
+ * Simple echo suppresor
+ */
+typedef struct echo_supp
+{
+    pj_bool_t		 suppressing;
+    pjmedia_silence_det	*sd;
+    pj_time_val		 last_signal;
+    unsigned		 samples_per_frame;
+    unsigned		 tail_ms;
+} echo_supp;
+
+
+
+/*
+ * Prototypes.
+ */
+PJ_DECL(pj_status_t) echo_supp_create(pj_pool_t *pool,
+				      unsigned clock_rate,
+				      unsigned samples_per_frame,
+				      unsigned tail_ms,
+				      unsigned latency_ms,
+				      unsigned options,
+				      void **p_state );
+PJ_DECL(pj_status_t) echo_supp_destroy(void *state);
+PJ_DECL(pj_status_t) echo_supp_playback(void *state,
+					pj_int16_t *play_frm );
+PJ_DECL(pj_status_t) echo_supp_capture(void *state,
+				       pj_int16_t *rec_frm,
+				       unsigned options );
+PJ_DECL(pj_status_t) echo_supp_cancel_echo(void *state,
+					   pj_int16_t *rec_frm,
+					   const pj_int16_t *play_frm,
+					   unsigned options,
+					   void *reserved );
+
+
+
+/*
+ * Create. 
+ */
+PJ_DEF(pj_status_t) echo_supp_create( pj_pool_t *pool,
+				      unsigned clock_rate,
+				      unsigned samples_per_frame,
+				      unsigned tail_ms,
+				      unsigned latency_ms,
+				      unsigned options,
+				      void **p_state )
+{
+    echo_supp *ec;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(clock_rate);
+    PJ_UNUSED_ARG(options);
+    PJ_UNUSED_ARG(latency_ms);
+
+    ec = pj_pool_zalloc(pool, sizeof(struct echo_supp));
+    ec->samples_per_frame = samples_per_frame;
+    ec->tail_ms = tail_ms;
+
+    status = pjmedia_silence_det_create(pool, clock_rate, samples_per_frame,
+					&ec->sd);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    pjmedia_silence_det_set_name(ec->sd, "ecsu%p");
+    pjmedia_silence_det_set_adaptive(ec->sd, PJMEDIA_ECHO_SUPPRESS_THRESHOLD);
+    pjmedia_silence_det_set_params(ec->sd, 100, 500, 3000);
+
+    *p_state = ec;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Destroy. 
+ */
+PJ_DEF(pj_status_t) echo_supp_destroy(void *state)
+{
+    PJ_UNUSED_ARG(state);
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Let the AEC knows that a frame has been played to the speaker.
+ */
+PJ_DEF(pj_status_t) echo_supp_playback( void *state,
+					pj_int16_t *play_frm )
+{
+    echo_supp *ec = state;
+    pj_bool_t silence;
+    pj_bool_t last_suppressing = ec->suppressing;
+
+    silence = pjmedia_silence_det_detect(ec->sd, play_frm,
+					 ec->samples_per_frame, NULL);
+
+    ec->suppressing = !silence;
+
+    if (ec->suppressing) {
+	pj_gettimeofday(&ec->last_signal);
+    }
+
+    if (ec->suppressing!=0 && last_suppressing==0) {
+	PJ_LOG(5,(THIS_FILE, "Start suppressing.."));
+    } else if (ec->suppressing==0 && last_suppressing!=0) {
+	PJ_LOG(5,(THIS_FILE, "Stop suppressing.."));
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Let the AEC knows that a frame has been captured from the microphone.
+ */
+PJ_DEF(pj_status_t) echo_supp_capture( void *state,
+				       pj_int16_t *rec_frm,
+				       unsigned options )
+{
+    echo_supp *ec = state;
+    pj_time_val now;
+    unsigned delay_ms;
+
+    PJ_UNUSED_ARG(options);
+
+    pj_gettimeofday(&now);
+
+    PJ_TIME_VAL_SUB(now, ec->last_signal);
+    delay_ms = PJ_TIME_VAL_MSEC(now);
+
+    if (delay_ms < ec->tail_ms) {
+#if defined(PJMEDIA_ECHO_SUPPRESS_FACTOR) && PJMEDIA_ECHO_SUPPRESS_FACTOR!=0
+	unsigned i;
+	for (i=0; i<ec->samples_per_frame; ++i) {
+	    rec_frm[i] = (pj_int16_t)(rec_frm[i] >> 
+				      PJMEDIA_ECHO_SUPPRESS_FACTOR);
+	}
+#else
+	pjmedia_zero_samples(rec_frm, ec->samples_per_frame);
+#endif
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Perform echo cancellation.
+ */
+PJ_DEF(pj_status_t) echo_supp_cancel_echo( void *state,
+					   pj_int16_t *rec_frm,
+					   const pj_int16_t *play_frm,
+					   unsigned options,
+					   void *reserved )
+{
+    echo_supp *ec = state;
+    pj_bool_t silence;
+
+    PJ_UNUSED_ARG(options);
+    PJ_UNUSED_ARG(reserved);
+
+    silence = pjmedia_silence_det_detect(ec->sd, play_frm, 
+					 ec->samples_per_frame, NULL);
+
+    if (!silence) {
+#if defined(PJMEDIA_ECHO_SUPPRESS_FACTOR) && PJMEDIA_ECHO_SUPPRESS_FACTOR!=0
+	unsigned i;
+	for (i=0; i<ec->samples_per_frame; ++i) {
+	    rec_frm[i] = (pj_int16_t)(rec_frm[i] >> 
+				      PJMEDIA_ECHO_SUPPRESS_FACTOR);
+	}
+#else
+	pjmedia_zero_samples(rec_frm, ec->samples_per_frame);
+#endif
+    }
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/endpoint.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/endpoint.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/endpoint.c	(revision 1163)
@@ -0,0 +1,529 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/endpoint.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/sdp.h>
+#include <pj/assert.h>
+#include <pj/ioqueue.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/sock.h>
+#include <pj/string.h>
+
+
+#define THIS_FILE   "endpoint.c"
+
+static const pj_str_t STR_AUDIO = { "audio", 5};
+static const pj_str_t STR_VIDEO = { "video", 5};
+static const pj_str_t STR_IN = { "IN", 2 };
+static const pj_str_t STR_IP4 = { "IP4", 3};
+static const pj_str_t STR_RTP_AVP = { "RTP/AVP", 7 };
+static const pj_str_t STR_SDP_NAME = { "pjmedia", 7 };
+static const pj_str_t STR_SENDRECV = { "sendrecv", 8 };
+
+
+
+/* Flag to indicate whether pjmedia error subsystem has been registered
+ * to pjlib.
+ */
+static int error_subsys_registered;
+
+
+/**
+ * Defined in pjmedia/errno.c
+ * 
+ * Get error message for the specified error code. Note that this
+ * function is only able to decode PJMEDIA specific error code.
+ * Application should use pj_strerror(), which should be able to
+ * decode all error codes belonging to all subsystems (e.g. pjlib,
+ * pjmedia, pjsip, etc).
+ *
+ * @param status    The error code.
+ * @param buffer    The buffer where to put the error message.
+ * @param bufsize   Size of the buffer.
+ *
+ * @return	    The error message as NULL terminated string,
+ *                  wrapped with pj_str_t.
+ */
+PJ_DECL(pj_str_t) pjmedia_strerror( pj_status_t status, char *buffer,
+				    pj_size_t bufsize);
+
+
+/* Worker thread proc. */
+static int PJ_THREAD_FUNC worker_proc(void*);
+
+
+#define MAX_THREADS	16
+
+
+/** Concrete declaration of media endpoint. */
+struct pjmedia_endpt
+{
+    /** Pool. */
+    pj_pool_t		 *pool;
+
+    /** Pool factory. */
+    pj_pool_factory	 *pf;
+
+    /** Codec manager. */
+    pjmedia_codec_mgr	  codec_mgr;
+
+    /** IOqueue instance. */
+    pj_ioqueue_t 	 *ioqueue;
+
+    /** Do we own the ioqueue? */
+    pj_bool_t		  own_ioqueue;
+
+    /** Number of threads. */
+    unsigned		  thread_cnt;
+
+    /** IOqueue polling thread, if any. */
+    pj_thread_t		 *thread[MAX_THREADS];
+
+    /** To signal polling thread to quit. */
+    pj_bool_t		  quit_flag;
+};
+
+/**
+ * Initialize and get the instance of media endpoint.
+ */
+PJ_DEF(pj_status_t) pjmedia_endpt_create(pj_pool_factory *pf,
+					 pj_ioqueue_t *ioqueue,
+					 unsigned worker_cnt,
+					 pjmedia_endpt **p_endpt)
+{
+    pj_pool_t *pool;
+    pjmedia_endpt *endpt;
+    unsigned i;
+    pj_status_t status;
+
+    if (!error_subsys_registered) {
+	pj_register_strerror(PJMEDIA_ERRNO_START, PJ_ERRNO_SPACE_SIZE, 
+			     &pjmedia_strerror);
+	error_subsys_registered = 1;
+    }
+
+    PJ_ASSERT_RETURN(pf && p_endpt, PJ_EINVAL);
+
+    pool = pj_pool_create(pf, "med-ept", 512, 512, NULL);
+    if (!pool)
+	return PJ_ENOMEM;
+
+    endpt = pj_pool_zalloc(pool, sizeof(struct pjmedia_endpt));
+    endpt->pool = pool;
+    endpt->pf = pf;
+    endpt->ioqueue = ioqueue;
+    endpt->thread_cnt = worker_cnt;
+
+    /* Sound */
+    status = pjmedia_snd_init(pf);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Init codec manager. */
+    status = pjmedia_codec_mgr_init(&endpt->codec_mgr);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Create ioqueue if none is specified. */
+    if (endpt->ioqueue == NULL) {
+	
+	endpt->own_ioqueue = PJ_TRUE;
+
+	status = pj_ioqueue_create( endpt->pool, PJ_IOQUEUE_MAX_HANDLES,
+				    &endpt->ioqueue);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+
+	if (worker_cnt == 0) {
+	    PJ_LOG(4,(THIS_FILE, "Warning: no worker thread is created in"  
+				 "media endpoint for internal ioqueue"));
+	}
+    }
+
+    /* Create worker threads if asked. */
+    for (i=0; i<worker_cnt; ++i) {
+	status = pj_thread_create( endpt->pool, "media", &worker_proc,
+				   endpt, 0, 0, &endpt->thread[i]);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+    }
+
+
+    *p_endpt = endpt;
+    return PJ_SUCCESS;
+
+on_error:
+
+    /* Destroy threads */
+    for (i=0; i<endpt->thread_cnt; ++i) {
+	if (endpt->thread[i]) {
+	    pj_thread_destroy(endpt->thread[i]);
+	}
+    }
+
+    /* Destroy internal ioqueue */
+    if (endpt->ioqueue && endpt->own_ioqueue)
+	pj_ioqueue_destroy(endpt->ioqueue);
+
+    pjmedia_snd_deinit();
+    pj_pool_release(pool);
+    return status;
+}
+
+/**
+ * Get the codec manager instance.
+ */
+PJ_DEF(pjmedia_codec_mgr*) pjmedia_endpt_get_codec_mgr(pjmedia_endpt *endpt)
+{
+    return &endpt->codec_mgr;
+}
+
+/**
+ * Deinitialize media endpoint.
+ */
+PJ_DEF(pj_status_t) pjmedia_endpt_destroy (pjmedia_endpt *endpt)
+{
+    unsigned i;
+
+    PJ_ASSERT_RETURN(endpt, PJ_EINVAL);
+
+    endpt->quit_flag = 1;
+
+    /* Destroy threads */
+    for (i=0; i<endpt->thread_cnt; ++i) {
+	if (endpt->thread[i]) {
+	    pj_thread_join(endpt->thread[i]);
+	    pj_thread_destroy(endpt->thread[i]);
+	    endpt->thread[i] = NULL;
+	}
+    }
+
+    /* Destroy internal ioqueue */
+    if (endpt->ioqueue && endpt->own_ioqueue) {
+	pj_ioqueue_destroy(endpt->ioqueue);
+	endpt->ioqueue = NULL;
+    }
+
+    endpt->pf = NULL;
+
+    pjmedia_snd_deinit();
+    pj_pool_release (endpt->pool);
+
+    return PJ_SUCCESS;
+}
+
+
+/**
+ * Get the ioqueue instance of the media endpoint.
+ */
+PJ_DEF(pj_ioqueue_t*) pjmedia_endpt_get_ioqueue(pjmedia_endpt *endpt)
+{
+    PJ_ASSERT_RETURN(endpt, NULL);
+    return endpt->ioqueue;
+}
+
+
+/**
+ * Worker thread proc.
+ */
+static int PJ_THREAD_FUNC worker_proc(void *arg)
+{
+    pjmedia_endpt *endpt = arg;
+
+    while (!endpt->quit_flag) {
+	pj_time_val timeout = { 0, 500 };
+	pj_ioqueue_poll(endpt->ioqueue, &timeout);
+    }
+
+    return 0;
+}
+
+/**
+ * Create pool.
+ */
+PJ_DEF(pj_pool_t*) pjmedia_endpt_create_pool( pjmedia_endpt *endpt,
+					      const char *name,
+					      pj_size_t initial,
+					      pj_size_t increment)
+{
+    pj_assert(endpt != NULL);
+
+    return pj_pool_create(endpt->pf, name, initial, increment, NULL);
+}
+
+/**
+ * Create a SDP session description that describes the endpoint
+ * capability.
+ */
+PJ_DEF(pj_status_t) pjmedia_endpt_create_sdp( pjmedia_endpt *endpt,
+					      pj_pool_t *pool,
+					      unsigned stream_cnt,
+					      const pjmedia_sock_info sock_info[],
+					      pjmedia_sdp_session **p_sdp )
+{
+    pj_time_val tv;
+    unsigned i;
+    pjmedia_sdp_session *sdp;
+    pjmedia_sdp_media *m;
+    pjmedia_sdp_attr *attr;
+
+    /* Sanity check arguments */
+    PJ_ASSERT_RETURN(endpt && pool && p_sdp && stream_cnt, PJ_EINVAL);
+
+    /* Check that there are not too many codecs */
+    PJ_ASSERT_RETURN(endpt->codec_mgr.codec_cnt <= PJMEDIA_MAX_SDP_FMT,
+		     PJ_ETOOMANY);
+
+    /* Create and initialize basic SDP session */
+    sdp = pj_pool_zalloc (pool, sizeof(pjmedia_sdp_session));
+
+    pj_gettimeofday(&tv);
+    sdp->origin.user = pj_str("-");
+    sdp->origin.version = sdp->origin.id = tv.sec + 2208988800UL;
+    sdp->origin.net_type = STR_IN;
+    sdp->origin.addr_type = STR_IP4;
+    pj_strdup2(pool, &sdp->origin.addr, 
+	       pj_inet_ntoa(sock_info[0].rtp_addr_name.sin_addr));
+    sdp->name = STR_SDP_NAME;
+
+    /* Since we only support one media stream at present, put the
+     * SDP connection line in the session level.
+     */
+    sdp->conn = pj_pool_zalloc (pool, sizeof(pjmedia_sdp_conn));
+    sdp->conn->net_type = STR_IN;
+    sdp->conn->addr_type = STR_IP4;
+    pj_strdup2(pool, &sdp->conn->addr, 
+	       pj_inet_ntoa(sock_info[0].rtp_addr_name.sin_addr));
+
+
+    /* SDP time and attributes. */
+    sdp->time.start = sdp->time.stop = 0;
+    sdp->attr_count = 0;
+
+    /* Create media stream 0: */
+
+    sdp->media_count = 1;
+    m = pj_pool_zalloc (pool, sizeof(pjmedia_sdp_media));
+    sdp->media[0] = m;
+
+    /* Standard media info: */
+    pj_strdup(pool, &m->desc.media, &STR_AUDIO);
+    m->desc.port = pj_ntohs(sock_info[0].rtp_addr_name.sin_port);
+    m->desc.port_count = 1;
+    pj_strdup (pool, &m->desc.transport, &STR_RTP_AVP);
+
+    /* Init media line and attribute list. */
+    m->desc.fmt_count = 0;
+    m->attr_count = 0;
+
+    /* Add "rtcp" attribute */
+#if defined(PJMEDIA_HAS_RTCP_IN_SDP) && PJMEDIA_HAS_RTCP_IN_SDP!=0
+    if (sock_info->rtcp_addr_name.sin_family != 0) {
+	attr = pj_pool_alloc(pool, sizeof(pjmedia_sdp_attr));
+	attr->name = pj_str("rtcp");
+	attr->value.ptr = pj_pool_alloc(pool, 80);
+	attr->value.slen = 
+	    pj_ansi_snprintf(attr->value.ptr, 80,
+			    "%u IN IP4 %s",
+			    pj_ntohs(sock_info[0].rtcp_addr_name.sin_port),
+			    pj_inet_ntoa(sock_info[0].rtcp_addr_name.sin_addr));
+	pjmedia_sdp_attr_add(&m->attr_count, m->attr, attr);
+    }
+#endif
+
+    /* Add format, rtpmap, and fmtp (when applicable) for each codec */
+    for (i=0; i<endpt->codec_mgr.codec_cnt; ++i) {
+
+	pjmedia_codec_info *codec_info;
+	pjmedia_sdp_rtpmap rtpmap;
+	char tmp_param[3];
+	pjmedia_sdp_attr *attr;
+	pjmedia_codec_param codec_param;
+	pj_str_t *fmt;
+
+	if (endpt->codec_mgr.codec_desc[i].prio == PJMEDIA_CODEC_PRIO_DISABLED)
+	    break;
+
+	codec_info = &endpt->codec_mgr.codec_desc[i].info;
+	pjmedia_codec_mgr_get_default_param(&endpt->codec_mgr, codec_info,
+					    &codec_param);
+	fmt = &m->desc.fmt[m->desc.fmt_count++];
+
+	fmt->ptr = pj_pool_alloc(pool, 8);
+	fmt->slen = pj_utoa(codec_info->pt, fmt->ptr);
+
+	rtpmap.pt = *fmt;
+	rtpmap.clock_rate = codec_info->clock_rate;
+	rtpmap.enc_name = codec_info->encoding_name;
+	
+	/* For audio codecs, rtpmap parameters denotes the number
+	 * of channels, which can be omited if the value is 1.
+	 */
+	if (codec_info->type == PJMEDIA_TYPE_AUDIO &&
+	    codec_info->channel_cnt > 1)
+	{
+	    /* Can only support one digit channel count */
+	    pj_assert(codec_info->channel_cnt < 10);
+
+	    tmp_param[0] = '/';
+	    tmp_param[1] = (char)('0' + codec_info->channel_cnt);
+
+	    rtpmap.param.ptr = tmp_param;
+	    rtpmap.param.slen = 2;
+
+	} else {
+	    rtpmap.param.slen = 0;
+	}
+
+	pjmedia_sdp_rtpmap_to_attr(pool, &rtpmap, &attr);
+	m->attr[m->attr_count++] = attr;
+
+	/* Add fmtp mode where applicable */
+	if (codec_param.setting.dec_fmtp_mode != 0) {
+	    const pj_str_t fmtp = { "fmtp", 4 };
+	    attr = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_attr));
+
+	    attr->name = fmtp;
+	    attr->value.ptr = pj_pool_alloc(pool, 32);
+	    attr->value.slen = 
+		pj_ansi_snprintf( attr->value.ptr, 32,
+				  "%d mode=%d",
+				  codec_info->pt,
+				  codec_param.setting.dec_fmtp_mode);
+	    m->attr[m->attr_count++] = attr;
+	}
+    }
+
+    /* Add sendrecv attribute. */
+    attr = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_attr));
+    attr->name = STR_SENDRECV;
+    m->attr[m->attr_count++] = attr;
+
+#if defined(PJMEDIA_RTP_PT_TELEPHONE_EVENTS) && \
+    PJMEDIA_RTP_PT_TELEPHONE_EVENTS != 0
+
+    /*
+     * Add support telephony event
+     */
+    m->desc.fmt[m->desc.fmt_count++] = 
+	pj_str(PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR);
+
+    /* Add rtpmap. */
+    attr = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_attr));
+    attr->name = pj_str("rtpmap");
+    attr->value = pj_str(PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR 
+			 " telephone-event/8000");
+    m->attr[m->attr_count++] = attr;
+
+    /* Add fmtp */
+    attr = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_attr));
+    attr->name = pj_str("fmtp");
+    attr->value = pj_str(PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR " 0-15");
+    m->attr[m->attr_count++] = attr;
+#endif
+
+    /* Done */
+    *p_sdp = sdp;
+
+    return PJ_SUCCESS;
+
+}
+
+
+
+#if PJ_LOG_MAX_LEVEL >= 3
+static const char *good_number(char *buf, pj_int32_t val)
+{
+    if (val < 1000) {
+	pj_ansi_sprintf(buf, "%d", val);
+    } else if (val < 1000000) {
+	pj_ansi_sprintf(buf, "%d.%dK", 
+			val / 1000,
+			(val % 1000) / 100);
+    } else {
+	pj_ansi_sprintf(buf, "%d.%02dM", 
+			val / 1000000,
+			(val % 1000000) / 10000);
+    }
+
+    return buf;
+}
+#endif
+
+PJ_DEF(pj_status_t) pjmedia_endpt_dump(pjmedia_endpt *endpt)
+{
+
+#if PJ_LOG_MAX_LEVEL >= 3
+    unsigned i, count;
+    pjmedia_codec_info codec_info[32];
+    unsigned prio[32];
+
+    PJ_LOG(3,(THIS_FILE, "Dumping PJMEDIA capabilities:"));
+
+    count = PJ_ARRAY_SIZE(codec_info);
+    if (pjmedia_codec_mgr_enum_codecs(&endpt->codec_mgr, 
+				      &count, codec_info, prio) != PJ_SUCCESS)
+    {
+	PJ_LOG(3,(THIS_FILE, " -error: failed to enum codecs"));
+	return PJ_SUCCESS;
+    }
+
+    PJ_LOG(3,(THIS_FILE, "  Total number of installed codecs: %d", count));
+    for (i=0; i<count; ++i) {
+	const char *type;
+	pjmedia_codec_param param;
+	char bps[32];
+
+	switch (codec_info[i].type) {
+	case PJMEDIA_TYPE_AUDIO:
+	    type = "Audio"; break;
+	case PJMEDIA_TYPE_VIDEO:
+	    type = "Video"; break;
+	default:
+	    type = "Unknown type"; break;
+	}
+
+	if (pjmedia_codec_mgr_get_default_param(&endpt->codec_mgr,
+						&codec_info[i],
+						&param) != PJ_SUCCESS)
+	{
+	    pj_bzero(&param, sizeof(pjmedia_codec_param));
+	}
+
+	PJ_LOG(3,(THIS_FILE, 
+		  "   %s codec #%2d: pt=%d (%.*s @%dKHz/%d, %sbps, %dms%s%s%s%s%s)",
+		  type, i, codec_info[i].pt,
+		  (int)codec_info[i].encoding_name.slen,
+		  codec_info[i].encoding_name.ptr,
+		  codec_info[i].clock_rate/1000,
+		  codec_info[i].channel_cnt,
+		  good_number(bps, param.info.avg_bps), 
+		  param.info.frm_ptime * param.setting.frm_per_pkt,
+		  (param.setting.vad ? " vad" : ""),
+		  (param.setting.cng ? " cng" : ""),
+		  (param.setting.plc ? " plc" : ""),
+		  (param.setting.penh ? " penh" : ""),
+		  (prio[i]==PJMEDIA_CODEC_PRIO_DISABLED?" disabled":"")));
+    }
+#endif
+
+    return PJ_SUCCESS;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/errno.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/errno.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/errno.c	(revision 1163)
@@ -0,0 +1,223 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/errno.h>
+#include <pjmedia/types.h>
+#include <pj/string.h>
+#include <portaudio.h>
+
+
+
+/* PJMEDIA's own error codes/messages 
+ * MUST KEEP THIS ARRAY SORTED!!
+ * Message must be limited to 64 chars!
+ */
+
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0)
+
+static const struct 
+{
+    int code;
+    const char *msg;
+} err_str[] = 
+{
+    /* Generic PJMEDIA errors, shouldn't be used! */
+    PJ_BUILD_ERR( PJMEDIA_ERROR,	    "Unspecified PJMEDIA error" ),
+
+    /* SDP error. */
+    PJ_BUILD_ERR( PJMEDIA_SDP_EINSDP,	    "Invalid SDP descriptor" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EINVER,	    "Invalid SDP version line" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EINORIGIN,    "Invalid SDP origin line" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EINTIME,	    "Invalid SDP time line"),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EINNAME,	    "SDP name/subject line is empty"),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EINCONN,	    "Invalid SDP connection line"),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EMISSINGCONN, "Missing SDP connection info line"),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EINATTR,	    "Invalid SDP attributes"),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EINRTPMAP,    "Invalid SDP rtpmap attribute"),
+    PJ_BUILD_ERR( PJMEDIA_SDP_ERTPMAPTOOLONG,"SDP rtpmap attribute too long"),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EMISSINGRTPMAP,"Missing SDP rtpmap for dynamic payload type"),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EINMEDIA,	    "Invalid SDP media line" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_ENOFMT,	    "No SDP payload format in the media line" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EINPT,	    "Invalid SDP payload type in media line" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EINFMTP,	    "Invalid SDP fmtp attribute" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EINRTCP,	    "Invalid SDP rtcp attribyte" ),
+
+    /* SDP negotiator errors. */
+    PJ_BUILD_ERR( PJMEDIA_SDPNEG_EINSTATE,	"Invalid SDP negotiator state for operation" ),
+    PJ_BUILD_ERR( PJMEDIA_SDPNEG_ENOINITIAL,	"No initial local SDP in SDP negotiator" ),
+    PJ_BUILD_ERR( PJMEDIA_SDPNEG_ENOACTIVE,	"No active SDP in SDP negotiator" ),
+    PJ_BUILD_ERR( PJMEDIA_SDPNEG_ENONEG,	"No current local/remote offer/answer" ),
+    PJ_BUILD_ERR( PJMEDIA_SDPNEG_EMISMEDIA,	"SDP media count mismatch in offer/answer" ),
+    PJ_BUILD_ERR( PJMEDIA_SDPNEG_EINVANSMEDIA,	"SDP media type mismatch in offer/answer" ),
+    PJ_BUILD_ERR( PJMEDIA_SDPNEG_EINVANSTP,	"SDP media transport type mismatch in offer/answer" ),
+    PJ_BUILD_ERR( PJMEDIA_SDPNEG_EANSNOMEDIA,	"No common SDP media payload in answer" ),
+    PJ_BUILD_ERR( PJMEDIA_SDPNEG_ENOMEDIA,	"No active media stream after negotiation" ),
+    PJ_BUILD_ERR( PJMEDIA_SDPNEG_NOANSCODEC,	"No suitable codec for remote offer"),
+    PJ_BUILD_ERR( PJMEDIA_SDPNEG_NOANSTELEVENT,	"No suitable telephone-event for remote offer"),
+    PJ_BUILD_ERR( PJMEDIA_SDPNEG_NOANSUNKNOWN,	"No suitable answer for unknown remote offer"),
+
+    /* SDP comparison results */
+    PJ_BUILD_ERR( PJMEDIA_SDP_EMEDIANOTEQUAL,   "SDP media descriptor not equal" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EPORTNOTEQUAL,    "Port in SDP media descriptor not equal" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_ETPORTNOTEQUAL,   "Transport in SDP media descriptor not equal" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EFORMATNOTEQUAL,  "Format in SDP media descriptor not equal" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_ECONNNOTEQUAL,    "SDP connection line not equal" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EATTRNOTEQUAL,    "SDP attributes not equal" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EDIRNOTEQUAL,     "SDP media direction not equal" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EFMTPNOTEQUAL,    "SDP fmtp attribute not equal" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_ERTPMAPNOTEQUAL,  "SDP rtpmap attribute not equal" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_ESESSNOTEQUAL,    "SDP session descriptor not equal" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_EORIGINNOTEQUAL,  "SDP origin line not equal" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_ENAMENOTEQUAL,    "SDP name/subject line not equal" ),
+    PJ_BUILD_ERR( PJMEDIA_SDP_ETIMENOTEQUAL,    "SDP time line not equal" ),
+
+    /* Codec errors. */
+    PJ_BUILD_ERR( PJMEDIA_CODEC_EUNSUP,		"Unsupported media codec" ),
+    PJ_BUILD_ERR( PJMEDIA_CODEC_EFAILED,	"Codec internal creation error" ),
+    PJ_BUILD_ERR( PJMEDIA_CODEC_EFRMTOOSHORT,   "Codec frame is too short" ),
+    PJ_BUILD_ERR( PJMEDIA_CODEC_EPCMTOOSHORT,   "PCM frame is too short" ),
+    PJ_BUILD_ERR( PJMEDIA_CODEC_EFRMINLEN,      "Invalid codec frame length" ),
+    PJ_BUILD_ERR( PJMEDIA_CODEC_EPCMFRMINLEN,   "Invalid PCM frame length" ),
+    PJ_BUILD_ERR( PJMEDIA_CODEC_EINMODE,	"Invalid codec mode (no fmtp?)" ),
+
+    /* Media errors. */
+    PJ_BUILD_ERR( PJMEDIA_EINVALIDIP,	    "Invalid remote media (IP) address" ),
+    PJ_BUILD_ERR( PJMEDIA_EASYMCODEC,	    "Asymetric media codec is not supported" ),
+    PJ_BUILD_ERR( PJMEDIA_EINVALIDPT,	    "Invalid media payload type" ),
+    PJ_BUILD_ERR( PJMEDIA_EMISSINGRTPMAP,   "Missing rtpmap in media description" ),
+    PJ_BUILD_ERR( PJMEDIA_EINVALIMEDIATYPE, "Invalid media type" ),
+    PJ_BUILD_ERR( PJMEDIA_EREMOTENODTMF,    "Remote does not support DTMF" ),
+    PJ_BUILD_ERR( PJMEDIA_RTP_EINDTMF,	    "Invalid DTMF digit" ),
+    PJ_BUILD_ERR( PJMEDIA_RTP_EREMNORFC2833,"Remote does not support RFC 2833" ),
+
+    /* RTP session errors. */
+    PJ_BUILD_ERR( PJMEDIA_RTP_EINPKT,	    "Invalid RTP packet" ),
+    PJ_BUILD_ERR( PJMEDIA_RTP_EINPACK,	    "Invalid RTP packing (internal error)" ),
+    PJ_BUILD_ERR( PJMEDIA_RTP_EINVER,	    "Invalid RTP version" ),
+    PJ_BUILD_ERR( PJMEDIA_RTP_EINSSRC,	    "RTP packet SSRC id mismatch" ),
+    PJ_BUILD_ERR( PJMEDIA_RTP_EINPT,	    "RTP packet payload type mismatch" ),
+    PJ_BUILD_ERR( PJMEDIA_RTP_EINLEN,	    "Invalid RTP packet length" ),
+    PJ_BUILD_ERR( PJMEDIA_RTP_ESESSRESTART,    "RTP session restarted" ),
+    PJ_BUILD_ERR( PJMEDIA_RTP_ESESSPROBATION,  "RTP session in probation" ),
+    PJ_BUILD_ERR( PJMEDIA_RTP_EBADSEQ,	    "Bad sequence number in RTP packet" ),
+    PJ_BUILD_ERR( PJMEDIA_RTP_EBADDEST,	    "RTP media port destination is not configured" ),
+    PJ_BUILD_ERR( PJMEDIA_RTP_ENOCONFIG,    "RTP is not configured" ),
+    
+    /* Media port errors: */
+    PJ_BUILD_ERR( PJMEDIA_ENOTCOMPATIBLE,   "Media ports are not compatible" ),
+    PJ_BUILD_ERR( PJMEDIA_ENCCLOCKRATE,	    "Media ports have incompatible clock rate" ),
+    PJ_BUILD_ERR( PJMEDIA_ENCSAMPLESPFRAME, "Media ports have incompatible samples per frame" ),
+    PJ_BUILD_ERR( PJMEDIA_ENCTYPE,	    "Media ports have incompatible media type" ),
+    PJ_BUILD_ERR( PJMEDIA_ENCBITS,	    "Media ports have incompatible bits per sample" ),
+    PJ_BUILD_ERR( PJMEDIA_ENCBYTES,	    "Media ports have incompatible bytes per frame" ),
+    PJ_BUILD_ERR( PJMEDIA_ENCCHANNEL,	    "Media ports have incompatible number of channels" ),
+
+    /* Media file errors: */
+    PJ_BUILD_ERR( PJMEDIA_ENOTVALIDWAVE,    "Not a valid WAVE file" ),
+    PJ_BUILD_ERR( PJMEDIA_EWAVEUNSUPP,	    "Unsupported WAVE file format" ),
+    PJ_BUILD_ERR( PJMEDIA_EWAVETOOSHORT,    "WAVE file too short" ),
+    PJ_BUILD_ERR( PJMEDIA_EFRMFILETOOBIG,   "Sound frame too large for file buffer"),
+
+    /* Sound device errors: */
+    PJ_BUILD_ERR( PJMEDIA_ENOSNDREC,	    "No suitable sound capture device" ),
+    PJ_BUILD_ERR( PJMEDIA_ENOSNDPLAY,	    "No suitable sound playback device" ),
+    PJ_BUILD_ERR( PJMEDIA_ESNDINDEVID,	    "Invalid sound device ID" ),
+    PJ_BUILD_ERR( PJMEDIA_ESNDINSAMPLEFMT,  "Invalid sample format for sound device" ),
+};
+
+#endif	/* PJ_HAS_ERROR_STRING */
+
+
+
+/*
+ * pjmedia_strerror()
+ */
+PJ_DEF(pj_str_t) pjmedia_strerror( pj_status_t statcode, 
+				   char *buf, pj_size_t bufsize )
+{
+    pj_str_t errstr;
+
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0)
+
+    /* See if the error comes from PortAudio. */
+#if PJMEDIA_SOUND_IMPLEMENTATION==PJMEDIA_SOUND_PORTAUDIO_SOUND
+    if (statcode >= PJMEDIA_ERRNO_FROM_PORTAUDIO(paNotInitialized) &&
+	statcode <  PJMEDIA_ERRNO_FROM_PORTAUDIO(paNotInitialized + 10000))
+    {
+
+	int pa_err = statcode - PJMEDIA_ERRNO_FROM_PORTAUDIO(0);
+	pj_str_t msg;
+	
+	msg.ptr = (char*)Pa_GetErrorText(pa_err);
+	msg.slen = pj_ansi_strlen(msg.ptr);
+
+	errstr.ptr = buf;
+	pj_strncpy_with_null(&errstr, &msg, bufsize);
+	return errstr;
+
+    } else 
+#endif	/* PJMEDIA_SOUND_IMPLEMENTATION */
+    if (statcode >= PJMEDIA_ERRNO_START && 
+	       statcode < PJMEDIA_ERRNO_START + PJ_ERRNO_SPACE_SIZE)
+    {
+	/* Find the error in the table.
+	 * Use binary search!
+	 */
+	int first = 0;
+	int n = PJ_ARRAY_SIZE(err_str);
+
+	while (n > 0) {
+	    int half = n/2;
+	    int mid = first + half;
+
+	    if (err_str[mid].code < statcode) {
+		first = mid+1;
+		n -= (half+1);
+	    } else if (err_str[mid].code > statcode) {
+		n = half;
+	    } else {
+		first = mid;
+		break;
+	    }
+	}
+
+
+	if (PJ_ARRAY_SIZE(err_str) && err_str[first].code == statcode) {
+	    pj_str_t msg;
+	    
+	    msg.ptr = (char*)err_str[first].msg;
+	    msg.slen = pj_ansi_strlen(err_str[first].msg);
+
+	    errstr.ptr = buf;
+	    pj_strncpy_with_null(&errstr, &msg, bufsize);
+	    return errstr;
+
+	} 
+    }
+
+#endif	/* PJ_HAS_ERROR_STRING */
+
+    /* Error not found. */
+    errstr.ptr = buf;
+    errstr.slen = pj_ansi_snprintf(buf, bufsize, 
+				   "Unknown pjmedia error %d",
+				   statcode);
+
+    return errstr;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/g711.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/g711.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/g711.c	(revision 1163)
@@ -0,0 +1,591 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+/* This file contains file from Sun Microsystems, Inc, with the complete 
+ * notice in the second half of this file.
+ */
+#include <pjmedia/codec.h>
+#include <pjmedia/alaw_ulaw.h>
+#include <pjmedia/endpoint.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/port.h>
+#include <pjmedia/plc.h>
+#include <pjmedia/silencedet.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+
+#if defined(PJMEDIA_HAS_G711_CODEC) && PJMEDIA_HAS_G711_CODEC!=0
+
+
+#define G711_BPS	    64000
+#define G711_CODEC_CNT	    0	/* number of codec to preallocate in memory */
+#define PTIME		    10	/* basic frame size is 10 msec	    */
+#define FRAME_SIZE	    (8000 * PTIME / 1000)   /* 80 bytes	    */
+#define SAMPLES_PER_FRAME   (8000 * PTIME / 1000)   /* 80 samples   */
+
+/* These are the only public functions exported to applications */
+PJ_DECL(pj_status_t) g711_init_factory (pjmedia_codec_factory *factory, 
+					pj_pool_t *pool);
+
+/* Prototypes for G711 factory */
+static pj_status_t g711_test_alloc( pjmedia_codec_factory *factory, 
+				    const pjmedia_codec_info *id );
+static pj_status_t g711_default_attr( pjmedia_codec_factory *factory, 
+				      const pjmedia_codec_info *id, 
+				      pjmedia_codec_param *attr );
+static pj_status_t g711_enum_codecs (pjmedia_codec_factory *factory, 
+				     unsigned *count, 
+				     pjmedia_codec_info codecs[]);
+static pj_status_t g711_alloc_codec( pjmedia_codec_factory *factory, 
+				     const pjmedia_codec_info *id, 
+				     pjmedia_codec **p_codec);
+static pj_status_t g711_dealloc_codec( pjmedia_codec_factory *factory, 
+				       pjmedia_codec *codec );
+
+/* Prototypes for G711 implementation. */
+static pj_status_t  g711_init( pjmedia_codec *codec, 
+			       pj_pool_t *pool );
+static pj_status_t  g711_open( pjmedia_codec *codec, 
+			       pjmedia_codec_param *attr );
+static pj_status_t  g711_close( pjmedia_codec *codec );
+static pj_status_t  g711_modify(pjmedia_codec *codec, 
+			        const pjmedia_codec_param *attr );
+static pj_status_t  g711_parse(pjmedia_codec *codec,
+			       void *pkt,
+			       pj_size_t pkt_size,
+			       const pj_timestamp *timestamp,
+			       unsigned *frame_cnt,
+			       pjmedia_frame frames[]);
+static pj_status_t  g711_encode( pjmedia_codec *codec, 
+				 const struct pjmedia_frame *input,
+				 unsigned output_buf_len, 
+				 struct pjmedia_frame *output);
+static pj_status_t  g711_decode( pjmedia_codec *codec, 
+				 const struct pjmedia_frame *input,
+				 unsigned output_buf_len, 
+				 struct pjmedia_frame *output);
+static pj_status_t  g711_recover( pjmedia_codec *codec,
+				  unsigned output_buf_len,
+				  struct pjmedia_frame *output);
+
+/* Definition for G711 codec operations. */
+static pjmedia_codec_op g711_op = 
+{
+    &g711_init,
+    &g711_open,
+    &g711_close,
+    &g711_modify,
+    &g711_parse,
+    &g711_encode,
+    &g711_decode,
+    &g711_recover
+};
+
+/* Definition for G711 codec factory operations. */
+static pjmedia_codec_factory_op g711_factory_op =
+{
+    &g711_test_alloc,
+    &g711_default_attr,
+    &g711_enum_codecs,
+    &g711_alloc_codec,
+    &g711_dealloc_codec
+};
+
+/* G711 factory private data */
+static struct g711_factory
+{
+    pjmedia_codec_factory	base;
+    pjmedia_endpt	       *endpt;
+    pj_pool_t		       *pool;
+    pj_mutex_t		       *mutex;
+    pjmedia_codec		codec_list;
+} g711_factory;
+
+/* G711 codec private data. */
+struct g711_private
+{
+    unsigned		 pt;
+    pj_bool_t		 plc_enabled;
+    pjmedia_plc		*plc;
+    pj_bool_t		 vad_enabled;
+    pjmedia_silence_det *vad;
+    pj_timestamp	 last_tx;
+};
+
+
+PJ_DEF(pj_status_t) pjmedia_codec_g711_init(pjmedia_endpt *endpt)
+{
+    pjmedia_codec_mgr *codec_mgr;
+    pj_status_t status;
+
+    if (g711_factory.endpt != NULL) {
+	/* Already initialized. */
+	return PJ_SUCCESS;
+    }
+
+    /* Init factory */
+    g711_factory.base.op = &g711_factory_op;
+    g711_factory.base.factory_data = NULL;
+    g711_factory.endpt = endpt;
+
+    pj_list_init(&g711_factory.codec_list);
+
+    /* Create pool */
+    g711_factory.pool = pjmedia_endpt_create_pool(endpt, "g711", 4000, 4000);
+    if (!g711_factory.pool)
+	return PJ_ENOMEM;
+
+    /* Create mutex. */
+    status = pj_mutex_create_simple(g711_factory.pool, "g611", 
+				    &g711_factory.mutex);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Get the codec manager. */
+    codec_mgr = pjmedia_endpt_get_codec_mgr(endpt);
+    if (!codec_mgr) {
+	return PJ_EINVALIDOP;
+    }
+
+    /* Register codec factory to endpoint. */
+    status = pjmedia_codec_mgr_register_factory(codec_mgr, 
+						&g711_factory.base);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    return PJ_SUCCESS;
+
+on_error:
+    if (g711_factory.mutex) {
+	pj_mutex_destroy(g711_factory.mutex);
+	g711_factory.mutex = NULL;
+    }
+    if (g711_factory.pool) {
+	pj_pool_release(g711_factory.pool);
+	g711_factory.pool = NULL;
+    }
+    return status;
+}
+
+PJ_DEF(pj_status_t) pjmedia_codec_g711_deinit(void)
+{
+    pjmedia_codec_mgr *codec_mgr;
+    pj_status_t status;
+
+    if (g711_factory.endpt == NULL) {
+	/* Not registered. */
+	return PJ_SUCCESS;
+    }
+
+    /* Lock mutex. */
+    pj_mutex_lock(g711_factory.mutex);
+
+    /* Get the codec manager. */
+    codec_mgr = pjmedia_endpt_get_codec_mgr(g711_factory.endpt);
+    if (!codec_mgr) {
+	g711_factory.endpt = NULL;
+	pj_mutex_unlock(g711_factory.mutex);
+	return PJ_EINVALIDOP;
+    }
+
+    /* Unregister G711 codec factory. */
+    status = pjmedia_codec_mgr_unregister_factory(codec_mgr,
+						  &g711_factory.base);
+    g711_factory.endpt = NULL;
+
+    /* Destroy mutex. */
+    pj_mutex_destroy(g711_factory.mutex);
+    g711_factory.mutex = NULL;
+
+
+    /* Release pool. */
+    pj_pool_release(g711_factory.pool);
+    g711_factory.pool = NULL;
+
+
+    return status;
+}
+
+static pj_status_t g711_test_alloc(pjmedia_codec_factory *factory, 
+				   const pjmedia_codec_info *id )
+{
+    PJ_UNUSED_ARG(factory);
+
+    /* It's sufficient to check payload type only. */
+    return (id->pt==PJMEDIA_RTP_PT_PCMU || id->pt==PJMEDIA_RTP_PT_PCMA)? 0:-1;
+}
+
+static pj_status_t g711_default_attr (pjmedia_codec_factory *factory, 
+				      const pjmedia_codec_info *id, 
+				      pjmedia_codec_param *attr )
+{
+    PJ_UNUSED_ARG(factory);
+
+    pj_bzero(attr, sizeof(pjmedia_codec_param));
+    attr->info.clock_rate = 8000;
+    attr->info.channel_cnt = 1;
+    attr->info.avg_bps = G711_BPS;
+    attr->info.pcm_bits_per_sample = 16;
+    attr->info.frm_ptime = PTIME;
+    attr->info.pt = (pj_uint8_t)id->pt;
+
+    /* Set default frames per packet to 2 (or 20ms) */
+    attr->setting.frm_per_pkt = 2;
+
+    /* Enable plc by default. */
+    attr->setting.plc = 1;
+
+    /* Enable VAD by default. */
+    attr->setting.vad = 1;
+
+    /* Default all other flag bits disabled. */
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t g711_enum_codecs(pjmedia_codec_factory *factory, 
+				    unsigned *max_count, 
+				    pjmedia_codec_info codecs[])
+{
+    unsigned count = 0;
+
+    PJ_UNUSED_ARG(factory);
+
+    if (count < *max_count) {
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_PCMU;
+	codecs[count].encoding_name = pj_str("PCMU");
+	codecs[count].clock_rate = 8000;
+	codecs[count].channel_cnt = 1;
+	++count;
+    }
+    if (count < *max_count) {
+	codecs[count].type = PJMEDIA_TYPE_AUDIO;
+	codecs[count].pt = PJMEDIA_RTP_PT_PCMA;
+	codecs[count].encoding_name = pj_str("PCMA");
+	codecs[count].clock_rate = 8000;
+	codecs[count].channel_cnt = 1;
+	++count;
+    }
+
+    *max_count = count;
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t g711_alloc_codec( pjmedia_codec_factory *factory, 
+				     const pjmedia_codec_info *id,
+				     pjmedia_codec **p_codec)
+{
+    pjmedia_codec *codec = NULL;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(factory==&g711_factory.base, PJ_EINVAL);
+
+    /* Lock mutex. */
+    pj_mutex_lock(g711_factory.mutex);
+
+    /* Allocate new codec if no more is available */
+    if (pj_list_empty(&g711_factory.codec_list)) {
+	struct g711_private *codec_priv;
+
+	codec = pj_pool_alloc(g711_factory.pool, sizeof(pjmedia_codec));
+	codec_priv = pj_pool_zalloc(g711_factory.pool, 
+				    sizeof(struct g711_private));
+	if (!codec || !codec_priv) {
+	    pj_mutex_unlock(g711_factory.mutex);
+	    return PJ_ENOMEM;
+	}
+
+	/* Set the payload type */
+	codec_priv->pt = id->pt;
+
+	/* Create PLC, always with 10ms ptime */
+	status = pjmedia_plc_create(g711_factory.pool, 8000, 80,
+				    0, &codec_priv->plc);
+	if (status != PJ_SUCCESS) {
+	    pj_mutex_unlock(g711_factory.mutex);
+	    return status;
+	}
+
+	/* Create VAD */
+	status = pjmedia_silence_det_create(g711_factory.pool,
+					    8000, 80,
+					    &codec_priv->vad);
+	if (status != PJ_SUCCESS) {
+	    pj_mutex_unlock(g711_factory.mutex);
+	    return status;
+	}
+
+	codec->factory = factory;
+	codec->op = &g711_op;
+	codec->codec_data = codec_priv;
+    } else {
+	codec = g711_factory.codec_list.next;
+	pj_list_erase(codec);
+    }
+
+    /* Zero the list, for error detection in g711_dealloc_codec */
+    codec->next = codec->prev = NULL;
+
+    *p_codec = codec;
+
+    /* Unlock mutex. */
+    pj_mutex_unlock(g711_factory.mutex);
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t g711_dealloc_codec(pjmedia_codec_factory *factory, 
+				      pjmedia_codec *codec )
+{
+    struct g711_private *priv = codec->codec_data;
+    pj_int16_t frame[SAMPLES_PER_FRAME];
+    int i;
+
+    PJ_ASSERT_RETURN(factory==&g711_factory.base, PJ_EINVAL);
+
+    /* Check that this node has not been deallocated before */
+    pj_assert (codec->next==NULL && codec->prev==NULL);
+    if (codec->next!=NULL || codec->prev!=NULL) {
+	return PJ_EINVALIDOP;
+    }
+
+    /* Clear left samples in the PLC, since codec+plc will be reused
+     * next time.
+     */
+    for (i=0; i<2; ++i) {
+	pjmedia_zero_samples(frame, PJ_ARRAY_SIZE(frame));
+	pjmedia_plc_save(priv->plc, frame);
+    }
+
+    /* Lock mutex. */
+    pj_mutex_lock(g711_factory.mutex);
+
+    /* Insert at the back of the list */
+    pj_list_insert_before(&g711_factory.codec_list, codec);
+
+    /* Unlock mutex. */
+    pj_mutex_unlock(g711_factory.mutex);
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t g711_init( pjmedia_codec *codec, pj_pool_t *pool )
+{
+    /* There's nothing to do here really */
+    PJ_UNUSED_ARG(codec);
+    PJ_UNUSED_ARG(pool);
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t g711_open(pjmedia_codec *codec, 
+			     pjmedia_codec_param *attr )
+{
+    struct g711_private *priv = codec->codec_data;
+    priv->pt = attr->info.pt;
+    priv->plc_enabled = (attr->setting.plc != 0);
+    priv->vad_enabled = (attr->setting.vad != 0);
+    return PJ_SUCCESS;
+}
+
+static pj_status_t g711_close( pjmedia_codec *codec )
+{
+    PJ_UNUSED_ARG(codec);
+    /* Nothing to do */
+    return PJ_SUCCESS;
+}
+
+static pj_status_t  g711_modify(pjmedia_codec *codec, 
+			        const pjmedia_codec_param *attr )
+{
+    struct g711_private *priv = codec->codec_data;
+
+    if (attr->info.pt != priv->pt)
+	return PJMEDIA_EINVALIDPT;
+
+    priv->plc_enabled = (attr->setting.plc != 0);
+    priv->vad_enabled = (attr->setting.vad != 0);
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t  g711_parse( pjmedia_codec *codec,
+				void *pkt,
+				pj_size_t pkt_size,
+				const pj_timestamp *ts,
+				unsigned *frame_cnt,
+				pjmedia_frame frames[])
+{
+    unsigned count = 0;
+
+    PJ_UNUSED_ARG(codec);
+
+    PJ_ASSERT_RETURN(ts && frame_cnt && frames, PJ_EINVAL);
+
+    while (pkt_size >= FRAME_SIZE && count < *frame_cnt) {
+	frames[count].type = PJMEDIA_FRAME_TYPE_AUDIO;
+	frames[count].buf = pkt;
+	frames[count].size = FRAME_SIZE;
+	frames[count].timestamp.u64 = ts->u64 + SAMPLES_PER_FRAME * count;
+
+	pkt = ((char*)pkt) + FRAME_SIZE;
+	pkt_size -= FRAME_SIZE;
+
+	++count;
+    }
+
+    *frame_cnt = count;
+    return PJ_SUCCESS;
+}
+
+static pj_status_t  g711_encode(pjmedia_codec *codec, 
+				const struct pjmedia_frame *input,
+				unsigned output_buf_len, 
+				struct pjmedia_frame *output)
+{
+    pj_int16_t *samples = (pj_int16_t*) input->buf;
+    struct g711_private *priv = codec->codec_data;
+
+    /* Check output buffer length */
+    if (output_buf_len < (input->size >> 1))
+	return PJMEDIA_CODEC_EFRMTOOSHORT;
+
+    /* Detect silence if VAD is enabled */
+    if (priv->vad_enabled) {
+	pj_bool_t is_silence;
+	pj_int32_t silence_period;
+
+	silence_period = pj_timestamp_diff32(&priv->last_tx,
+					     &input->timestamp);
+
+	is_silence = pjmedia_silence_det_detect(priv->vad, input->buf, 
+						(input->size >> 1), NULL);
+	if (is_silence && 
+	    PJMEDIA_CODEC_MAX_SILENCE_PERIOD != -1 &&
+	    silence_period < PJMEDIA_CODEC_MAX_SILENCE_PERIOD) 
+	{
+	    output->type = PJMEDIA_FRAME_TYPE_NONE;
+	    output->buf = NULL;
+	    output->size = 0;
+	    output->timestamp = input->timestamp;
+	    return PJ_SUCCESS;
+	} else {
+	    priv->last_tx = input->timestamp;
+	}
+    }
+
+    /* Encode */
+    if (priv->pt == PJMEDIA_RTP_PT_PCMA) {
+	unsigned i, n;
+	pj_uint8_t *dst = output->buf;
+
+	n = (input->size >> 1);
+	for (i=0; i!=n; ++i, ++dst) {
+	    *dst = pjmedia_linear2alaw(samples[i]);
+	}
+    } else if (priv->pt == PJMEDIA_RTP_PT_PCMU) {
+	unsigned i, n;
+	pj_uint8_t *dst = output->buf;
+
+	n = (input->size >> 1);
+	for (i=0; i!=n; ++i, ++dst) {
+	    *dst = pjmedia_linear2ulaw(samples[i]);
+	}
+
+    } else {
+	return PJMEDIA_EINVALIDPT;
+    }
+
+    output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+    output->size = (input->size >> 1);
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t  g711_decode(pjmedia_codec *codec, 
+				const struct pjmedia_frame *input,
+				unsigned output_buf_len, 
+				struct pjmedia_frame *output)
+{
+    struct g711_private *priv = codec->codec_data;
+
+    /* Check output buffer length */
+    PJ_ASSERT_RETURN(output_buf_len >= (input->size << 1),
+		     PJMEDIA_CODEC_EPCMTOOSHORT);
+
+    /* Input buffer MUST have exactly 80 bytes long */
+    PJ_ASSERT_RETURN(input->size == FRAME_SIZE, 
+		     PJMEDIA_CODEC_EFRMINLEN);
+
+    /* Decode */
+    if (priv->pt == PJMEDIA_RTP_PT_PCMA) {
+	unsigned i;
+	pj_uint8_t *src = input->buf;
+	pj_uint16_t *dst = output->buf;
+
+	for (i=0; i!=input->size; ++i) {
+	    *dst++ = (pj_uint16_t) pjmedia_alaw2linear(*src++);
+	}
+    } else if (priv->pt == PJMEDIA_RTP_PT_PCMU) {
+	unsigned i;
+	pj_uint8_t *src = input->buf;
+	pj_uint16_t *dst = output->buf;
+
+	for (i=0; i!=input->size; ++i) {
+	    *dst++ = (pj_uint16_t) pjmedia_ulaw2linear(*src++);
+	}
+
+    } else {
+	return PJMEDIA_EINVALIDPT;
+    }
+
+    output->type = PJMEDIA_FRAME_TYPE_AUDIO;
+    output->size = (input->size << 1);
+
+    if (priv->plc_enabled)
+	pjmedia_plc_save( priv->plc, output->buf);
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t  g711_recover( pjmedia_codec *codec,
+				  unsigned output_buf_len,
+				  struct pjmedia_frame *output)
+{
+    struct g711_private *priv = codec->codec_data;
+
+    if (!priv->plc_enabled)
+	return PJ_EINVALIDOP;
+
+    PJ_ASSERT_RETURN(output_buf_len >= SAMPLES_PER_FRAME * 2, 
+		     PJMEDIA_CODEC_EPCMTOOSHORT);
+
+    pjmedia_plc_generate(priv->plc, output->buf);
+    output->size = SAMPLES_PER_FRAME * 2;
+
+    return PJ_SUCCESS;
+}
+
+#endif	/* PJMEDIA_HAS_G711_CODEC */
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/jbuf.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/jbuf.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/jbuf.c	(revision 1163)
@@ -0,0 +1,571 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+/*
+ * Based on implementation kindly contributed by Switchlab, Ltd.
+ */
+#include <pjmedia/jbuf.h>
+#include <pjmedia/errno.h>
+#include <pj/pool.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/string.h>
+
+
+#define THIS_FILE   "jbuf.c"
+
+
+struct jb_framelist
+{
+    char	*flist_buffer;
+    int		*flist_frame_type;
+    unsigned	 flist_frame_size;
+    unsigned	 flist_max_count;
+    unsigned	 flist_empty;
+    unsigned	 flist_head;
+    unsigned	 flist_tail;
+    unsigned	 flist_origin;
+};
+
+
+typedef struct jb_framelist jb_framelist;
+
+struct pjmedia_jbuf
+{
+    pj_str_t	    name;		  // jitter buffer name
+    jb_framelist    jb_framelist;
+    pj_size_t	    jb_frame_size;	  // frame size	
+    unsigned	    jb_frame_ptime;	  // frame duration.
+    pj_size_t	    jb_max_count;	  // max frames in the jitter framelist->flist_buffer
+
+    int		    jb_level;		  // delay between source & destination
+					  // (calculated according of the number of get/put operations)
+    int		    jb_last_level;	  // last delay	
+    int		    jb_last_jitter;	  // last jitter calculated
+    int		    jb_max_hist_jitter;   // max jitter	during the last	jitter calculations
+    int		    jb_stable_hist;	  // num of times the delay has	been lower then	the prefetch num
+    unsigned	    jb_op_count;	  // of of operations.
+    int		    jb_last_op;		  // last operation executed on	the framelist->flist_buffer (put/get)
+    int		    jb_last_seq_no;	  // seq no. of	the last frame inserted	to the framelist->flist_buffer
+    int		    jb_prefetch;	  // no. of frame to insert before removing some
+					  // (at the beginning of the framelist->flist_buffer operation)
+    int		    jb_prefetch_cnt;	  // prefetch counter
+    int		    jb_min_prefetch;	  // Minimum allowable prefetch
+    int		    jb_max_prefetch;	  // Maximum allowable prefetch
+    int		    jb_status;		  // status is 'init' until the	first 'put' operation
+
+
+};
+
+
+#define JB_STATUS_INITIALIZING	0
+#define JB_STATUS_PROCESSING	1
+
+#define	PJ_ABS(x)	((x > 0) ? (x) : -(x))
+#define	PJ_MAX(x, y)	((x > y) ? (x) : (y))
+#define	PJ_MIN(x, y)	((x < y) ? (x) : (y))
+
+
+/* Enabling this would log the jitter buffer state about once per 
+ * second.
+ */
+#if 0
+#  define TRACE__(args)	    PJ_LOG(4,args)
+#else
+#  define TRACE__(args)
+#endif
+
+
+static pj_status_t jb_framelist_init( pj_pool_t *pool,
+				      jb_framelist *framelist,
+				      unsigned frame_size,
+				      unsigned max_count) 
+{
+    PJ_ASSERT_RETURN(pool && framelist, PJ_EINVAL);
+
+    pj_bzero(framelist, sizeof(jb_framelist));
+
+    framelist->flist_frame_size = frame_size;
+    framelist->flist_max_count = max_count;
+    framelist->flist_buffer = pj_pool_zalloc(pool,
+					     framelist->flist_frame_size * 
+					     framelist->flist_max_count);
+
+    framelist->flist_frame_type = 
+	pj_pool_zalloc(pool, sizeof(framelist->flist_frame_type[0]) * 
+				framelist->flist_max_count);
+
+    framelist->flist_empty = 1;
+
+    return PJ_SUCCESS;
+
+}
+
+static pj_status_t jb_framelist_destroy(jb_framelist *framelist) 
+{
+    PJ_UNUSED_ARG(framelist);
+    return PJ_SUCCESS;
+}
+
+
+static unsigned jb_framelist_size(jb_framelist *framelist) 
+{
+    if (framelist->flist_tail == framelist->flist_head) {
+	return framelist->flist_empty ? 0 : framelist->flist_max_count;
+    } else {
+	return (framelist->flist_tail - framelist->flist_head + 
+		framelist->flist_max_count) % framelist->flist_max_count;
+    }
+}
+
+
+static pj_bool_t jb_framelist_get(jb_framelist *framelist,
+				  void *frame,
+				  pjmedia_jb_frame_type *p_type) 
+{
+    if (!framelist->flist_empty) {
+	pj_memcpy(frame, 
+		  framelist->flist_buffer + 
+		    framelist->flist_head * framelist->flist_frame_size,
+		  framelist->flist_frame_size);
+	*p_type = (pjmedia_jb_frame_type) 
+		  framelist->flist_frame_type[framelist->flist_head];
+
+	pj_bzero(framelist->flist_buffer + 
+		    framelist->flist_head * framelist->flist_frame_size,
+		  framelist->flist_frame_size);
+	framelist->flist_frame_type[framelist->flist_head] = 
+	    PJMEDIA_JB_MISSING_FRAME;
+
+	framelist->flist_origin++;
+	framelist->flist_head = (framelist->flist_head + 1 ) % 
+				framelist->flist_max_count;
+	if (framelist->flist_head == framelist->flist_tail) 
+	    framelist->flist_empty = PJ_TRUE;
+	
+	return PJ_TRUE;
+
+    } else {
+	pj_bzero(frame, framelist->flist_frame_size);
+	return PJ_FALSE;
+    }
+}
+
+
+static void jb_framelist_remove_head( jb_framelist *framelist,
+				      unsigned count) 
+{
+    unsigned cur_size;
+
+    cur_size = jb_framelist_size(framelist);
+    if (count > cur_size) 
+	count = cur_size;
+
+    if (count) {
+	// may be done in two steps if overlapping
+	unsigned step1,step2;
+	unsigned tmp = framelist->flist_head+count;
+
+	if (tmp > framelist->flist_max_count) {
+	    step1 = framelist->flist_max_count - framelist->flist_head;
+	    step2 = count-step1;
+	} else {
+	    step1 = count;
+	    step2 = 0;
+	}
+
+	pj_bzero(framelist->flist_buffer + 
+		    framelist->flist_head * framelist->flist_frame_size,
+	          step1*framelist->flist_frame_size);
+	pj_memset(framelist->flist_frame_type+framelist->flist_head,
+		  PJMEDIA_JB_MISSING_FRAME,
+		  step1*sizeof(framelist->flist_frame_type[0]));
+
+	if (step2) {
+	    pj_bzero( framelist->flist_buffer,
+		      step2*framelist->flist_frame_size);
+	    pj_memset(framelist->flist_frame_type,
+		      PJMEDIA_JB_MISSING_FRAME,
+		      step2*sizeof(framelist->flist_frame_type[0]));
+	}
+
+	// update pointers
+	framelist->flist_origin += count;
+	framelist->flist_head = (framelist->flist_head + count) % 
+			        framelist->flist_max_count;
+	if (framelist->flist_head == framelist->flist_tail) 
+	    framelist->flist_empty = PJ_TRUE;
+    }
+}
+
+
+static pj_bool_t jb_framelist_put_at(jb_framelist *framelist,
+				     unsigned index,
+				     const void *frame,
+				     unsigned frame_size) 
+{
+    unsigned where;
+
+    assert(frame_size <= framelist->flist_frame_size);
+
+    if (!framelist->flist_empty) {
+	unsigned max_index;
+	unsigned cur_size;
+
+	// too late
+	if (index < framelist->flist_origin) 
+	    return PJ_FALSE;
+
+	// too soon
+	max_index = framelist->flist_origin + framelist->flist_max_count - 1;
+	if (index > max_index)
+	    return PJ_FALSE;
+
+	where = (index - framelist->flist_origin + framelist->flist_head) % 
+	        framelist->flist_max_count;
+
+	// update framelist->flist_tail pointer
+	cur_size = jb_framelist_size(framelist);
+	if (index >= framelist->flist_origin + cur_size) {
+	    unsigned diff = (index - (framelist->flist_origin + cur_size));
+	    framelist->flist_tail = (framelist->flist_tail + diff + 1) % 
+				    framelist->flist_max_count;
+	}
+    } else {
+	where = framelist->flist_tail;
+	framelist->flist_origin = index;
+	framelist->flist_tail = (framelist->flist_tail + 1) % 
+				framelist->flist_max_count;
+	framelist->flist_empty = PJ_FALSE;
+    }
+
+    pj_memcpy(framelist->flist_buffer + where * framelist->flist_frame_size, 
+	      frame, frame_size);
+
+    framelist->flist_frame_type[where] = PJMEDIA_JB_NORMAL_FRAME;
+
+    return PJ_TRUE;
+}
+
+
+
+enum pjmedia_jb_op
+{
+    JB_OP_INIT  = -1,
+    JB_OP_PUT   = 1,
+    JB_OP_GET   = 2
+};
+
+
+PJ_DEF(pj_status_t) pjmedia_jbuf_create(pj_pool_t *pool, 
+					const pj_str_t *name,
+					unsigned frame_size, 
+					unsigned ptime,
+					unsigned max_count,
+					pjmedia_jbuf **p_jb)
+{
+    pjmedia_jbuf *jb;
+    pj_status_t status;
+
+    jb = pj_pool_zalloc(pool, sizeof(pjmedia_jbuf));
+
+    status = jb_framelist_init(pool, &jb->jb_framelist, frame_size, max_count);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    pj_strdup_with_null(pool, &jb->name, name);
+    jb->jb_frame_size	 = frame_size;
+    jb->jb_frame_ptime   = ptime;
+    jb->jb_last_seq_no	 = -1;
+    jb->jb_level	 = 0;
+    jb->jb_last_level	 = 0;
+    jb->jb_last_jitter	 = 0;
+    jb->jb_last_op	 = JB_OP_INIT;
+    jb->jb_prefetch	 = PJ_MIN(PJMEDIA_JB_DEFAULT_INIT_DELAY,max_count*4/5);
+    jb->jb_prefetch_cnt	 = 0;
+    jb->jb_min_prefetch  = 0;
+    jb->jb_max_prefetch  = max_count*4/5;
+    jb->jb_stable_hist	 = 0;
+    jb->jb_status	 = JB_STATUS_INITIALIZING;
+    jb->jb_max_hist_jitter = 0;
+    jb->jb_max_count	 = max_count;
+
+    *p_jb = jb;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Set the jitter buffer to fixed delay mode. The default behavior
+ * is to adapt the delay with actual packet delay.
+ *
+ */
+PJ_DEF(pj_status_t) pjmedia_jbuf_set_fixed( pjmedia_jbuf *jb,
+					    unsigned prefetch)
+{
+    PJ_ASSERT_RETURN(jb, PJ_EINVAL);
+    PJ_ASSERT_RETURN(prefetch <= jb->jb_max_count, PJ_EINVAL);
+
+    jb->jb_min_prefetch = jb->jb_max_prefetch = 
+	jb->jb_prefetch = prefetch;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Set the jitter buffer to adaptive mode.
+ */
+PJ_DEF(pj_status_t) pjmedia_jbuf_set_adaptive( pjmedia_jbuf *jb,
+					       unsigned prefetch,
+					       unsigned min_prefetch,
+					       unsigned max_prefetch)
+{
+    PJ_ASSERT_RETURN(jb, PJ_EINVAL);
+    PJ_ASSERT_RETURN(min_prefetch < max_prefetch &&
+		     prefetch >= min_prefetch &&
+		     prefetch <= max_prefetch &&
+		     max_prefetch <= jb->jb_max_count,
+		     PJ_EINVAL);
+
+    jb->jb_prefetch = prefetch;
+    jb->jb_min_prefetch = min_prefetch;
+    jb->jb_max_prefetch = max_prefetch;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_jbuf_reset(pjmedia_jbuf *jb)
+{
+    jb->jb_last_seq_no	 = -1;
+    jb->jb_level	 = 0;
+    jb->jb_last_level	 = 0;
+    jb->jb_last_jitter	 = 0;
+    jb->jb_last_op	 = JB_OP_INIT;
+    jb->jb_prefetch_cnt	 = 0;
+    jb->jb_stable_hist	 = 0;
+    jb->jb_status	 = JB_STATUS_INITIALIZING;
+    jb->jb_max_hist_jitter = 0;
+
+    jb_framelist_remove_head(&jb->jb_framelist, 
+			     jb_framelist_size(&jb->jb_framelist));
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_jbuf_destroy(pjmedia_jbuf *jb)
+{
+    return jb_framelist_destroy(&jb->jb_framelist);
+}
+
+
+static void jbuf_calculate_jitter(pjmedia_jbuf *jb)
+{
+    unsigned stable_history_limit;
+
+    stable_history_limit = 1000 / jb->jb_frame_ptime;
+
+    jb->jb_last_jitter = PJ_ABS(jb->jb_level-jb->jb_last_level);
+    jb->jb_last_level = jb->jb_level;
+    jb->jb_max_hist_jitter = PJ_MAX(jb->jb_max_hist_jitter,jb->jb_last_jitter);
+    jb->jb_op_count++;
+
+    if (jb->jb_last_jitter < jb->jb_prefetch) {
+	jb->jb_stable_hist += jb->jb_last_jitter;
+	if (jb->jb_stable_hist > (int)stable_history_limit) {
+	    int seq_diff = (jb->jb_prefetch - jb->jb_max_hist_jitter)/3;
+	    if (seq_diff<1) seq_diff = 1;
+
+	    jb->jb_prefetch -= seq_diff;
+	    if (jb->jb_prefetch < jb->jb_min_prefetch) 
+		jb->jb_prefetch = jb->jb_min_prefetch;
+
+	    jb->jb_stable_hist = 0;
+	    jb->jb_max_hist_jitter = 0;
+
+	    TRACE__((THIS_FILE,"jb updated(1), prefetch=%d, size=%d", 
+		     jb->jb_prefetch, jb_framelist_size(&jb->jb_framelist)));
+
+	    /* These code is used to shorten the delay in the jitter buffer.
+
+	    if (jb->jb_op_count >= stable_history_limit*2 &&
+		(int)jb_framelist_size(&jb->jb_framelist) > jb->jb_prefetch+2)
+	    {
+		jb_framelist_remove_head(&jb->jb_framelist,1);
+
+		PJ_LOG(5,(jb->name.ptr, 
+			  "jbuf optimizing, prefetch: %d, size=%d", 
+			  jb->jb_prefetch,
+			  jb_framelist_size(&jb->jb_framelist)));
+		jb->jb_op_count = 0;
+	    }
+	    */
+
+	}
+    } else {
+	jb->jb_prefetch = PJ_MIN(jb->jb_last_jitter,
+				 (int)(jb->jb_max_count*4/5));
+	if (jb->jb_prefetch > jb->jb_max_prefetch)
+	    jb->jb_prefetch = jb->jb_max_prefetch;
+	jb->jb_stable_hist = 0;
+	jb->jb_max_hist_jitter = 0;
+
+	TRACE__((THIS_FILE,"jb updated(2), prefetch=%d, size=%d", 
+	         jb->jb_prefetch, jb_framelist_size(&jb->jb_framelist)));
+
+	/* These code is used to shorten the delay in the jitter buffer
+	   when the current size is larger than the prefetch. But it does
+	   not really work when the stream supports multiple frames, since
+	   the size may grow only temporarily.
+
+	if (jb->jb_op_count >= stable_history_limit * 2) {
+	    if ((int)jb_framelist_size(&jb->jb_framelist) > jb->jb_prefetch+2) 
+	    {
+		jb_framelist_remove_head(&jb->jb_framelist,1);
+
+		PJ_LOG(5,(jb->name.ptr, 
+			  "jbuf optimizing prefetch: %d, size=%d",
+			  jb->jb_prefetch,
+			  jb_framelist_size(&jb->jb_framelist)));
+	    }
+
+	    jb->jb_op_count = 0;
+	}
+	*/
+    }
+}
+
+static void jbuf_update(pjmedia_jbuf *jb, int oper)
+{
+    if(jb->jb_last_op != oper) {
+	jbuf_calculate_jitter(jb);
+	jb->jb_last_op = oper;
+    }
+}
+
+PJ_DEF(void) pjmedia_jbuf_put_frame( pjmedia_jbuf *jb, 
+				     const void *frame, 
+				     pj_size_t frame_size, 
+				     int frame_seq)
+{
+    pj_size_t min_frame_size;
+    int seq_diff;
+
+    if (jb->jb_last_seq_no == -1)	{
+	jb->jb_last_seq_no = frame_seq - 1;
+    }
+
+    seq_diff = frame_seq - jb->jb_last_seq_no;
+    jb->jb_last_seq_no = PJ_MAX(jb->jb_last_seq_no, frame_seq);
+    if (seq_diff > 0) jb->jb_level += seq_diff;
+
+    if(jb->jb_status ==	JB_STATUS_INITIALIZING) {
+	jb->jb_status = JB_STATUS_PROCESSING;
+	jb->jb_level = 0;
+	jb->jb_last_level = 0;
+	jb->jb_last_jitter = 0;
+    } else {
+	jbuf_update(jb, JB_OP_PUT);
+    }
+
+    min_frame_size = PJ_MIN(frame_size, jb->jb_frame_size);
+    if (seq_diff > 0) {
+
+	while (jb_framelist_put_at(&jb->jb_framelist,
+				   frame_seq,frame,min_frame_size) ==PJ_FALSE)
+	{
+	    jb_framelist_remove_head(&jb->jb_framelist,
+				     PJ_MAX(jb->jb_max_count/4,1) );
+	}
+
+	if (jb->jb_prefetch_cnt < jb->jb_prefetch)	
+	    jb->jb_prefetch_cnt += seq_diff;
+
+    }
+    else
+    {
+	jb_framelist_put_at(&jb->jb_framelist,frame_seq,frame,min_frame_size);
+    }
+}
+
+/*
+ * Get frame from jitter buffer.
+ */
+PJ_DEF(void) pjmedia_jbuf_get_frame( pjmedia_jbuf *jb, 
+				     void *frame, 
+				     char *p_frame_type)
+{
+    pjmedia_jb_frame_type ftype;
+
+    jb->jb_level--;
+
+    jbuf_update(jb, JB_OP_GET);
+
+    if (jb_framelist_size(&jb->jb_framelist) == 0) {
+	jb->jb_prefetch_cnt = 0;
+    }
+
+    if ((jb->jb_prefetch_cnt < jb->jb_prefetch)) {
+	/* Can't return frame because jitter buffer is filling up
+	 * minimum prefetch.
+	 */
+	pj_bzero(frame, jb->jb_frame_size);
+	if (jb_framelist_size(&jb->jb_framelist) == 0)
+	    *p_frame_type = PJMEDIA_JB_ZERO_EMPTY_FRAME;
+	else
+	    *p_frame_type = PJMEDIA_JB_ZERO_PREFETCH_FRAME;
+
+	return;
+    }
+
+    /* Retrieve a frame from frame list */
+    if (jb_framelist_get(&jb->jb_framelist,frame,&ftype) == PJ_FALSE) {
+	/* Can't return frame because jitter buffer is empty! */
+	pj_bzero(frame, jb->jb_frame_size);
+	*p_frame_type = PJMEDIA_JB_ZERO_EMPTY_FRAME;
+
+	return;
+    }
+
+    /* We've successfully retrieved a frame from the frame list, but
+     * the frame could be a blank frame!
+     */
+    if (ftype == PJMEDIA_JB_NORMAL_FRAME) 
+	*p_frame_type	= PJMEDIA_JB_NORMAL_FRAME;
+    else 
+	*p_frame_type	= PJMEDIA_JB_MISSING_FRAME;
+}
+
+/*
+ * Get jitter buffer state.
+ */
+PJ_DEF(pj_status_t) pjmedia_jbuf_get_state( pjmedia_jbuf *jb,
+					    pjmedia_jb_state *state )
+{
+    PJ_ASSERT_RETURN(jb && state, PJ_EINVAL);
+
+    state->frame_size = jb->jb_frame_size;
+    state->prefetch = jb->jb_prefetch;
+    state->min_prefetch = jb->jb_min_prefetch;
+    state->max_prefetch = jb->jb_max_prefetch;
+    state->size = jb_framelist_size(&jb->jb_framelist);
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/largefilter.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/largefilter.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/largefilter.h	(revision 1163)
@@ -0,0 +1,16391 @@
+/* Included by resamplesubs.c */
+#define LARGE_FILTER_NMULT ((RES_HWORD)65)
+#define LARGE_FILTER_SCALE 14746 /* Unity-gain scale factor */
+#define LARGE_FILTER_NWING 8192 /* Filter table length */
+static const RES_HWORD LARGE_FILTER_IMP[] /* Impulse response */ = {
+32767,
+32766,
+32764,
+32761,
+32756,
+32750,
+32743,
+32734,
+32724,
+32713,
+32700,
+32686,
+32671,
+32654,
+32636,
+32617,
+32596,
+32574,
+32551,
+32526,
+32500,
+32473,
+32445,
+32415,
+32383,
+32351,
+32317,
+32282,
+32246,
+32208,
+32169,
+32129,
+32087,
+32044,
+32000,
+31955,
+31908,
+31860,
+31811,
+31760,
+31708,
+31655,
+31601,
+31545,
+31489,
+31431,
+31371,
+31311,
+31249,
+31186,
+31122,
+31056,
+30990,
+30922,
+30853,
+30783,
+30711,
+30639,
+30565,
+30490,
+30414,
+30337,
+30258,
+30179,
+30098,
+30016,
+29933,
+29849,
+29764,
+29677,
+29590,
+29501,
+29411,
+29321,
+29229,
+29136,
+29042,
+28947,
+28851,
+28753,
+28655,
+28556,
+28456,
+28354,
+28252,
+28149,
+28044,
+27939,
+27833,
+27725,
+27617,
+27508,
+27398,
+27287,
+27175,
+27062,
+26948,
+26833,
+26717,
+26601,
+26483,
+26365,
+26246,
+26125,
+26005,
+25883,
+25760,
+25637,
+25512,
+25387,
+25261,
+25135,
+25007,
+24879,
+24750,
+24620,
+24490,
+24358,
+24226,
+24094,
+23960,
+23826,
+23691,
+23556,
+23420,
+23283,
+23146,
+23008,
+22869,
+22730,
+22590,
+22449,
+22308,
+22166,
+22024,
+21881,
+21738,
+21594,
+21449,
+21304,
+21159,
+21013,
+20866,
+20719,
+20572,
+20424,
+20275,
+20127,
+19977,
+19828,
+19678,
+19527,
+19376,
+19225,
+19073,
+18921,
+18769,
+18616,
+18463,
+18310,
+18157,
+18003,
+17849,
+17694,
+17539,
+17384,
+17229,
+17074,
+16918,
+16762,
+16606,
+16450,
+16294,
+16137,
+15980,
+15823,
+15666,
+15509,
+15352,
+15195,
+15037,
+14880,
+14722,
+14564,
+14407,
+14249,
+14091,
+13933,
+13775,
+13618,
+13460,
+13302,
+13144,
+12987,
+12829,
+12671,
+12514,
+12356,
+12199,
+12042,
+11885,
+11728,
+11571,
+11414,
+11257,
+11101,
+10945,
+10789,
+10633,
+10477,
+10322,
+10167,
+10012,
+9857,
+9702,
+9548,
+9394,
+9241,
+9087,
+8934,
+8781,
+8629,
+8477,
+8325,
+8174,
+8023,
+7872,
+7722,
+7572,
+7422,
+7273,
+7124,
+6976,
+6828,
+6681,
+6534,
+6387,
+6241,
+6096,
+5951,
+5806,
+5662,
+5518,
+5375,
+5233,
+5091,
+4949,
+4808,
+4668,
+4528,
+4389,
+4250,
+4112,
+3975,
+3838,
+3702,
+3566,
+3431,
+3297,
+3163,
+3030,
+2898,
+2766,
+2635,
+2505,
+2375,
+2246,
+2118,
+1990,
+1864,
+1738,
+1612,
+1487,
+1364,
+1240,
+1118,
+996,
+875,
+755,
+636,
+517,
+400,
+283,
+166,
+51,
+-63,
+-176,
+-289,
+-401,
+-513,
+-623,
+-733,
+-841,
+-949,
+-1056,
+-1162,
+-1268,
+-1372,
+-1476,
+-1578,
+-1680,
+-1781,
+-1881,
+-1980,
+-2078,
+-2176,
+-2272,
+-2367,
+-2462,
+-2556,
+-2648,
+-2740,
+-2831,
+-2921,
+-3010,
+-3098,
+-3185,
+-3271,
+-3356,
+-3441,
+-3524,
+-3606,
+-3688,
+-3768,
+-3848,
+-3926,
+-4004,
+-4080,
+-4156,
+-4231,
+-4304,
+-4377,
+-4449,
+-4519,
+-4589,
+-4658,
+-4726,
+-4792,
+-4858,
+-4923,
+-4987,
+-5050,
+-5111,
+-5172,
+-5232,
+-5291,
+-5349,
+-5406,
+-5462,
+-5517,
+-5571,
+-5624,
+-5675,
+-5726,
+-5776,
+-5825,
+-5873,
+-5920,
+-5966,
+-6011,
+-6055,
+-6098,
+-6140,
+-6181,
+-6222,
+-6261,
+-6299,
+-6336,
+-6372,
+-6407,
+-6441,
+-6475,
+-6507,
+-6538,
+-6569,
+-6598,
+-6626,
+-6654,
+-6680,
+-6706,
+-6730,
+-6754,
+-6777,
+-6798,
+-6819,
+-6839,
+-6858,
+-6876,
+-6893,
+-6909,
+-6924,
+-6938,
+-6951,
+-6964,
+-6975,
+-6986,
+-6995,
+-7004,
+-7012,
+-7019,
+-7025,
+-7030,
+-7035,
+-7038,
+-7040,
+-7042,
+-7043,
+-7043,
+-7042,
+-7040,
+-7038,
+-7034,
+-7030,
+-7025,
+-7019,
+-7012,
+-7004,
+-6996,
+-6986,
+-6976,
+-6965,
+-6954,
+-6941,
+-6928,
+-6914,
+-6899,
+-6884,
+-6867,
+-6850,
+-6832,
+-6814,
+-6794,
+-6774,
+-6753,
+-6732,
+-6709,
+-6686,
+-6663,
+-6638,
+-6613,
+-6587,
+-6561,
+-6534,
+-6506,
+-6478,
+-6448,
+-6419,
+-6388,
+-6357,
+-6325,
+-6293,
+-6260,
+-6226,
+-6192,
+-6157,
+-6122,
+-6086,
+-6049,
+-6012,
+-5975,
+-5936,
+-5897,
+-5858,
+-5818,
+-5778,
+-5737,
+-5695,
+-5653,
+-5611,
+-5568,
+-5524,
+-5480,
+-5436,
+-5391,
+-5345,
+-5300,
+-5253,
+-5207,
+-5159,
+-5112,
+-5064,
+-5015,
+-4966,
+-4917,
+-4868,
+-4818,
+-4767,
+-4716,
+-4665,
+-4614,
+-4562,
+-4510,
+-4457,
+-4404,
+-4351,
+-4298,
+-4244,
+-4190,
+-4136,
+-4081,
+-4026,
+-3971,
+-3916,
+-3860,
+-3804,
+-3748,
+-3692,
+-3635,
+-3578,
+-3521,
+-3464,
+-3406,
+-3349,
+-3291,
+-3233,
+-3175,
+-3117,
+-3058,
+-3000,
+-2941,
+-2882,
+-2823,
+-2764,
+-2705,
+-2646,
+-2587,
+-2527,
+-2468,
+-2408,
+-2349,
+-2289,
+-2229,
+-2169,
+-2110,
+-2050,
+-1990,
+-1930,
+-1870,
+-1811,
+-1751,
+-1691,
+-1631,
+-1571,
+-1512,
+-1452,
+-1392,
+-1333,
+-1273,
+-1214,
+-1154,
+-1095,
+-1036,
+-977,
+-918,
+-859,
+-800,
+-741,
+-683,
+-624,
+-566,
+-508,
+-450,
+-392,
+-335,
+-277,
+-220,
+-163,
+-106,
+-49,
+6,
+63,
+119,
+175,
+230,
+286,
+341,
+396,
+450,
+505,
+559,
+613,
+667,
+720,
+773,
+826,
+878,
+931,
+983,
+1034,
+1086,
+1137,
+1187,
+1238,
+1288,
+1337,
+1387,
+1436,
+1484,
+1533,
+1581,
+1628,
+1675,
+1722,
+1769,
+1815,
+1861,
+1906,
+1951,
+1996,
+2040,
+2084,
+2127,
+2170,
+2212,
+2255,
+2296,
+2338,
+2378,
+2419,
+2459,
+2498,
+2538,
+2576,
+2615,
+2652,
+2690,
+2727,
+2763,
+2799,
+2834,
+2870,
+2904,
+2938,
+2972,
+3005,
+3038,
+3070,
+3102,
+3133,
+3164,
+3194,
+3224,
+3253,
+3282,
+3310,
+3338,
+3365,
+3392,
+3418,
+3444,
+3469,
+3494,
+3518,
+3542,
+3566,
+3588,
+3611,
+3632,
+3653,
+3674,
+3694,
+3714,
+3733,
+3752,
+3770,
+3788,
+3805,
+3821,
+3837,
+3853,
+3868,
+3882,
+3896,
+3910,
+3923,
+3935,
+3947,
+3958,
+3969,
+3980,
+3989,
+3999,
+4007,
+4016,
+4023,
+4031,
+4037,
+4044,
+4049,
+4054,
+4059,
+4063,
+4067,
+4070,
+4073,
+4075,
+4076,
+4077,
+4078,
+4078,
+4078,
+4077,
+4076,
+4074,
+4071,
+4068,
+4065,
+4061,
+4057,
+4052,
+4047,
+4041,
+4035,
+4028,
+4021,
+4013,
+4005,
+3997,
+3988,
+3978,
+3968,
+3958,
+3947,
+3936,
+3924,
+3912,
+3899,
+3886,
+3872,
+3858,
+3844,
+3829,
+3814,
+3798,
+3782,
+3766,
+3749,
+3731,
+3714,
+3696,
+3677,
+3658,
+3639,
+3619,
+3599,
+3578,
+3558,
+3536,
+3515,
+3493,
+3470,
+3448,
+3425,
+3401,
+3378,
+3353,
+3329,
+3304,
+3279,
+3254,
+3228,
+3202,
+3175,
+3149,
+3122,
+3094,
+3067,
+3039,
+3011,
+2982,
+2953,
+2924,
+2895,
+2865,
+2835,
+2805,
+2775,
+2744,
+2713,
+2682,
+2651,
+2619,
+2587,
+2555,
+2523,
+2490,
+2457,
+2424,
+2391,
+2358,
+2324,
+2290,
+2256,
+2222,
+2188,
+2153,
+2119,
+2084,
+2049,
+2014,
+1978,
+1943,
+1907,
+1872,
+1836,
+1800,
+1764,
+1727,
+1691,
+1655,
+1618,
+1581,
+1545,
+1508,
+1471,
+1434,
+1397,
+1360,
+1322,
+1285,
+1248,
+1210,
+1173,
+1135,
+1098,
+1060,
+1023,
+985,
+947,
+910,
+872,
+834,
+797,
+759,
+721,
+684,
+646,
+608,
+571,
+533,
+496,
+458,
+421,
+383,
+346,
+308,
+271,
+234,
+197,
+160,
+123,
+86,
+49,
+12,
+-23,
+-60,
+-96,
+-133,
+-169,
+-205,
+-241,
+-277,
+-313,
+-348,
+-384,
+-419,
+-455,
+-490,
+-525,
+-559,
+-594,
+-628,
+-663,
+-697,
+-731,
+-765,
+-798,
+-832,
+-865,
+-898,
+-931,
+-963,
+-996,
+-1028,
+-1060,
+-1092,
+-1124,
+-1155,
+-1186,
+-1217,
+-1248,
+-1279,
+-1309,
+-1339,
+-1369,
+-1398,
+-1428,
+-1457,
+-1486,
+-1514,
+-1542,
+-1571,
+-1598,
+-1626,
+-1653,
+-1680,
+-1707,
+-1733,
+-1760,
+-1785,
+-1811,
+-1836,
+-1862,
+-1886,
+-1911,
+-1935,
+-1959,
+-1982,
+-2006,
+-2029,
+-2051,
+-2074,
+-2096,
+-2118,
+-2139,
+-2160,
+-2181,
+-2202,
+-2222,
+-2242,
+-2261,
+-2280,
+-2299,
+-2318,
+-2336,
+-2354,
+-2372,
+-2389,
+-2406,
+-2423,
+-2439,
+-2455,
+-2470,
+-2486,
+-2500,
+-2515,
+-2529,
+-2543,
+-2557,
+-2570,
+-2583,
+-2595,
+-2607,
+-2619,
+-2631,
+-2642,
+-2652,
+-2663,
+-2673,
+-2683,
+-2692,
+-2701,
+-2710,
+-2718,
+-2726,
+-2734,
+-2741,
+-2748,
+-2754,
+-2760,
+-2766,
+-2772,
+-2777,
+-2782,
+-2786,
+-2790,
+-2794,
+-2797,
+-2800,
+-2803,
+-2805,
+-2807,
+-2809,
+-2810,
+-2811,
+-2812,
+-2812,
+-2812,
+-2812,
+-2811,
+-2810,
+-2808,
+-2807,
+-2804,
+-2802,
+-2799,
+-2796,
+-2792,
+-2789,
+-2785,
+-2780,
+-2775,
+-2770,
+-2765,
+-2759,
+-2753,
+-2746,
+-2740,
+-2732,
+-2725,
+-2717,
+-2709,
+-2701,
+-2692,
+-2683,
+-2674,
+-2664,
+-2655,
+-2644,
+-2634,
+-2623,
+-2612,
+-2601,
+-2589,
+-2577,
+-2565,
+-2552,
+-2539,
+-2526,
+-2513,
+-2499,
+-2485,
+-2471,
+-2457,
+-2442,
+-2427,
+-2412,
+-2396,
+-2380,
+-2364,
+-2348,
+-2331,
+-2315,
+-2297,
+-2280,
+-2263,
+-2245,
+-2227,
+-2209,
+-2190,
+-2171,
+-2152,
+-2133,
+-2114,
+-2094,
+-2075,
+-2055,
+-2034,
+-2014,
+-1993,
+-1972,
+-1951,
+-1930,
+-1909,
+-1887,
+-1865,
+-1843,
+-1821,
+-1799,
+-1776,
+-1754,
+-1731,
+-1708,
+-1685,
+-1662,
+-1638,
+-1614,
+-1591,
+-1567,
+-1543,
+-1519,
+-1494,
+-1470,
+-1445,
+-1421,
+-1396,
+-1371,
+-1346,
+-1321,
+-1295,
+-1270,
+-1244,
+-1219,
+-1193,
+-1167,
+-1142,
+-1116,
+-1090,
+-1064,
+-1037,
+-1011,
+-985,
+-958,
+-932,
+-905,
+-879,
+-852,
+-826,
+-799,
+-772,
+-745,
+-719,
+-692,
+-665,
+-638,
+-611,
+-584,
+-557,
+-530,
+-503,
+-476,
+-449,
+-422,
+-395,
+-368,
+-341,
+-314,
+-287,
+-260,
+-234,
+-207,
+-180,
+-153,
+-126,
+-100,
+-73,
+-46,
+-20,
+6,
+32,
+59,
+85,
+111,
+138,
+164,
+190,
+216,
+242,
+268,
+294,
+319,
+345,
+370,
+396,
+421,
+446,
+471,
+496,
+521,
+546,
+571,
+595,
+619,
+644,
+668,
+692,
+716,
+739,
+763,
+787,
+810,
+833,
+856,
+879,
+902,
+924,
+947,
+969,
+991,
+1013,
+1035,
+1056,
+1078,
+1099,
+1120,
+1141,
+1162,
+1182,
+1202,
+1223,
+1243,
+1262,
+1282,
+1301,
+1320,
+1339,
+1358,
+1377,
+1395,
+1413,
+1431,
+1449,
+1467,
+1484,
+1501,
+1518,
+1535,
+1551,
+1567,
+1583,
+1599,
+1615,
+1630,
+1645,
+1660,
+1674,
+1689,
+1703,
+1717,
+1731,
+1744,
+1757,
+1770,
+1783,
+1795,
+1808,
+1820,
+1831,
+1843,
+1854,
+1865,
+1876,
+1886,
+1897,
+1907,
+1916,
+1926,
+1935,
+1944,
+1953,
+1961,
+1970,
+1978,
+1985,
+1993,
+2000,
+2007,
+2014,
+2020,
+2026,
+2032,
+2038,
+2043,
+2048,
+2053,
+2058,
+2062,
+2066,
+2070,
+2073,
+2077,
+2080,
+2083,
+2085,
+2087,
+2089,
+2091,
+2093,
+2094,
+2095,
+2095,
+2096,
+2096,
+2096,
+2096,
+2095,
+2094,
+2093,
+2092,
+2090,
+2088,
+2086,
+2084,
+2081,
+2079,
+2075,
+2072,
+2069,
+2065,
+2061,
+2056,
+2052,
+2047,
+2042,
+2037,
+2031,
+2025,
+2019,
+2013,
+2006,
+2000,
+1993,
+1986,
+1978,
+1971,
+1963,
+1955,
+1946,
+1938,
+1929,
+1920,
+1911,
+1901,
+1892,
+1882,
+1872,
+1862,
+1851,
+1841,
+1830,
+1819,
+1807,
+1796,
+1784,
+1772,
+1760,
+1748,
+1735,
+1723,
+1710,
+1697,
+1684,
+1670,
+1657,
+1643,
+1629,
+1615,
+1601,
+1586,
+1572,
+1557,
+1542,
+1527,
+1512,
+1496,
+1481,
+1465,
+1449,
+1433,
+1417,
+1401,
+1384,
+1368,
+1351,
+1334,
+1317,
+1300,
+1283,
+1265,
+1248,
+1230,
+1212,
+1195,
+1177,
+1159,
+1140,
+1122,
+1104,
+1085,
+1067,
+1048,
+1029,
+1010,
+991,
+972,
+953,
+934,
+915,
+895,
+876,
+856,
+837,
+817,
+797,
+777,
+758,
+738,
+718,
+698,
+678,
+658,
+637,
+617,
+597,
+577,
+556,
+536,
+516,
+495,
+475,
+454,
+434,
+414,
+393,
+373,
+352,
+332,
+311,
+291,
+270,
+250,
+229,
+208,
+188,
+168,
+147,
+127,
+106,
+86,
+65,
+45,
+25,
+5,
+-15,
+-35,
+-55,
+-75,
+-95,
+-115,
+-135,
+-155,
+-175,
+-195,
+-215,
+-234,
+-254,
+-274,
+-293,
+-313,
+-332,
+-351,
+-370,
+-390,
+-409,
+-428,
+-446,
+-465,
+-484,
+-503,
+-521,
+-539,
+-558,
+-576,
+-594,
+-612,
+-630,
+-648,
+-666,
+-683,
+-701,
+-718,
+-735,
+-752,
+-769,
+-786,
+-803,
+-819,
+-836,
+-852,
+-868,
+-885,
+-900,
+-916,
+-932,
+-947,
+-963,
+-978,
+-993,
+-1008,
+-1023,
+-1038,
+-1052,
+-1066,
+-1081,
+-1095,
+-1108,
+-1122,
+-1136,
+-1149,
+-1162,
+-1175,
+-1188,
+-1201,
+-1214,
+-1226,
+-1238,
+-1250,
+-1262,
+-1274,
+-1285,
+-1297,
+-1308,
+-1319,
+-1330,
+-1340,
+-1351,
+-1361,
+-1371,
+-1381,
+-1390,
+-1400,
+-1409,
+-1418,
+-1427,
+-1436,
+-1445,
+-1453,
+-1461,
+-1469,
+-1477,
+-1485,
+-1492,
+-1499,
+-1506,
+-1513,
+-1520,
+-1526,
+-1532,
+-1538,
+-1544,
+-1550,
+-1555,
+-1560,
+-1566,
+-1570,
+-1575,
+-1579,
+-1584,
+-1588,
+-1592,
+-1595,
+-1599,
+-1602,
+-1605,
+-1608,
+-1610,
+-1613,
+-1615,
+-1617,
+-1619,
+-1620,
+-1622,
+-1623,
+-1624,
+-1625,
+-1625,
+-1626,
+-1626,
+-1626,
+-1626,
+-1625,
+-1625,
+-1624,
+-1623,
+-1622,
+-1621,
+-1619,
+-1617,
+-1615,
+-1613,
+-1611,
+-1608,
+-1605,
+-1603,
+-1599,
+-1596,
+-1593,
+-1589,
+-1585,
+-1581,
+-1577,
+-1572,
+-1568,
+-1563,
+-1558,
+-1553,
+-1547,
+-1542,
+-1536,
+-1530,
+-1524,
+-1518,
+-1511,
+-1505,
+-1498,
+-1491,
+-1484,
+-1477,
+-1469,
+-1462,
+-1454,
+-1446,
+-1438,
+-1430,
+-1421,
+-1413,
+-1404,
+-1395,
+-1386,
+-1377,
+-1367,
+-1358,
+-1348,
+-1338,
+-1328,
+-1318,
+-1308,
+-1297,
+-1287,
+-1276,
+-1265,
+-1254,
+-1243,
+-1232,
+-1221,
+-1209,
+-1198,
+-1186,
+-1174,
+-1162,
+-1150,
+-1138,
+-1125,
+-1113,
+-1100,
+-1087,
+-1075,
+-1062,
+-1049,
+-1035,
+-1022,
+-1009,
+-995,
+-982,
+-968,
+-954,
+-941,
+-927,
+-913,
+-898,
+-884,
+-870,
+-856,
+-841,
+-827,
+-812,
+-797,
+-783,
+-768,
+-753,
+-738,
+-723,
+-708,
+-692,
+-677,
+-662,
+-647,
+-631,
+-616,
+-600,
+-585,
+-569,
+-554,
+-538,
+-522,
+-506,
+-491,
+-475,
+-459,
+-443,
+-427,
+-411,
+-395,
+-379,
+-363,
+-347,
+-331,
+-315,
+-299,
+-283,
+-267,
+-251,
+-235,
+-218,
+-202,
+-186,
+-170,
+-154,
+-138,
+-122,
+-106,
+-90,
+-74,
+-58,
+-42,
+-26,
+-10,
+5,
+21,
+37,
+53,
+69,
+85,
+100,
+116,
+132,
+147,
+163,
+179,
+194,
+209,
+225,
+240,
+256,
+271,
+286,
+301,
+316,
+331,
+346,
+361,
+376,
+391,
+405,
+420,
+434,
+449,
+463,
+477,
+492,
+506,
+520,
+534,
+548,
+561,
+575,
+589,
+602,
+615,
+629,
+642,
+655,
+668,
+681,
+694,
+706,
+719,
+731,
+744,
+756,
+768,
+780,
+792,
+804,
+816,
+827,
+839,
+850,
+861,
+872,
+883,
+894,
+905,
+915,
+926,
+936,
+946,
+956,
+966,
+976,
+986,
+995,
+1005,
+1014,
+1023,
+1032,
+1041,
+1049,
+1058,
+1066,
+1075,
+1083,
+1091,
+1099,
+1106,
+1114,
+1121,
+1128,
+1135,
+1142,
+1149,
+1156,
+1162,
+1169,
+1175,
+1181,
+1187,
+1192,
+1198,
+1203,
+1208,
+1214,
+1218,
+1223,
+1228,
+1232,
+1237,
+1241,
+1245,
+1249,
+1252,
+1256,
+1259,
+1262,
+1265,
+1268,
+1271,
+1273,
+1276,
+1278,
+1280,
+1282,
+1284,
+1285,
+1287,
+1288,
+1289,
+1290,
+1291,
+1292,
+1292,
+1292,
+1293,
+1293,
+1292,
+1292,
+1292,
+1291,
+1290,
+1289,
+1288,
+1287,
+1285,
+1284,
+1282,
+1280,
+1278,
+1276,
+1274,
+1271,
+1269,
+1266,
+1263,
+1260,
+1257,
+1253,
+1250,
+1246,
+1242,
+1238,
+1234,
+1230,
+1225,
+1221,
+1216,
+1211,
+1206,
+1201,
+1196,
+1190,
+1185,
+1179,
+1173,
+1167,
+1161,
+1155,
+1149,
+1142,
+1136,
+1129,
+1122,
+1115,
+1108,
+1101,
+1094,
+1086,
+1078,
+1071,
+1063,
+1055,
+1047,
+1039,
+1030,
+1022,
+1013,
+1005,
+996,
+987,
+978,
+969,
+960,
+951,
+941,
+932,
+922,
+913,
+903,
+893,
+883,
+873,
+863,
+853,
+842,
+832,
+821,
+811,
+800,
+789,
+778,
+768,
+757,
+746,
+734,
+723,
+712,
+701,
+689,
+678,
+666,
+654,
+643,
+631,
+619,
+607,
+596,
+584,
+572,
+559,
+547,
+535,
+523,
+511,
+498,
+486,
+474,
+461,
+449,
+436,
+424,
+411,
+399,
+386,
+373,
+361,
+348,
+335,
+322,
+310,
+297,
+284,
+271,
+258,
+246,
+233,
+220,
+207,
+194,
+181,
+168,
+156,
+143,
+130,
+117,
+104,
+91,
+78,
+65,
+53,
+40,
+27,
+14,
+1,
+-10,
+-23,
+-36,
+-48,
+-61,
+-74,
+-86,
+-99,
+-111,
+-124,
+-136,
+-149,
+-161,
+-174,
+-186,
+-198,
+-211,
+-223,
+-235,
+-247,
+-259,
+-271,
+-283,
+-295,
+-307,
+-319,
+-330,
+-342,
+-354,
+-365,
+-377,
+-388,
+-399,
+-411,
+-422,
+-433,
+-444,
+-455,
+-466,
+-477,
+-488,
+-499,
+-509,
+-520,
+-530,
+-541,
+-551,
+-561,
+-571,
+-581,
+-591,
+-601,
+-611,
+-621,
+-631,
+-640,
+-650,
+-659,
+-668,
+-677,
+-686,
+-695,
+-704,
+-713,
+-722,
+-730,
+-739,
+-747,
+-755,
+-763,
+-771,
+-779,
+-787,
+-795,
+-803,
+-810,
+-817,
+-825,
+-832,
+-839,
+-846,
+-853,
+-859,
+-866,
+-873,
+-879,
+-885,
+-891,
+-897,
+-903,
+-909,
+-915,
+-920,
+-926,
+-931,
+-936,
+-941,
+-946,
+-951,
+-955,
+-960,
+-964,
+-969,
+-973,
+-977,
+-981,
+-985,
+-988,
+-992,
+-995,
+-999,
+-1002,
+-1005,
+-1008,
+-1011,
+-1013,
+-1016,
+-1018,
+-1020,
+-1023,
+-1025,
+-1026,
+-1028,
+-1030,
+-1031,
+-1033,
+-1034,
+-1035,
+-1036,
+-1037,
+-1038,
+-1038,
+-1039,
+-1039,
+-1039,
+-1039,
+-1039,
+-1039,
+-1039,
+-1038,
+-1038,
+-1037,
+-1036,
+-1036,
+-1034,
+-1033,
+-1032,
+-1031,
+-1029,
+-1027,
+-1026,
+-1024,
+-1022,
+-1019,
+-1017,
+-1015,
+-1012,
+-1010,
+-1007,
+-1004,
+-1001,
+-998,
+-995,
+-991,
+-988,
+-984,
+-980,
+-977,
+-973,
+-969,
+-965,
+-960,
+-956,
+-951,
+-947,
+-942,
+-937,
+-932,
+-927,
+-922,
+-917,
+-912,
+-906,
+-901,
+-895,
+-889,
+-883,
+-877,
+-871,
+-865,
+-859,
+-853,
+-846,
+-840,
+-833,
+-826,
+-819,
+-812,
+-805,
+-798,
+-791,
+-784,
+-777,
+-769,
+-762,
+-754,
+-746,
+-739,
+-731,
+-723,
+-715,
+-707,
+-699,
+-691,
+-682,
+-674,
+-665,
+-657,
+-648,
+-640,
+-631,
+-622,
+-614,
+-605,
+-596,
+-587,
+-578,
+-569,
+-559,
+-550,
+-541,
+-532,
+-522,
+-513,
+-503,
+-494,
+-484,
+-474,
+-465,
+-455,
+-445,
+-436,
+-426,
+-416,
+-406,
+-396,
+-386,
+-376,
+-366,
+-356,
+-346,
+-336,
+-325,
+-315,
+-305,
+-295,
+-285,
+-274,
+-264,
+-254,
+-243,
+-233,
+-223,
+-212,
+-202,
+-192,
+-181,
+-171,
+-161,
+-150,
+-140,
+-129,
+-119,
+-108,
+-98,
+-88,
+-77,
+-67,
+-57,
+-46,
+-36,
+-25,
+-15,
+-5,
+5,
+15,
+25,
+35,
+46,
+56,
+66,
+76,
+86,
+97,
+107,
+117,
+127,
+137,
+147,
+157,
+167,
+177,
+186,
+196,
+206,
+216,
+225,
+235,
+245,
+254,
+264,
+273,
+283,
+292,
+301,
+311,
+320,
+329,
+338,
+347,
+356,
+365,
+374,
+383,
+392,
+400,
+409,
+418,
+426,
+435,
+443,
+451,
+460,
+468,
+476,
+484,
+492,
+500,
+508,
+515,
+523,
+531,
+538,
+546,
+553,
+560,
+568,
+575,
+582,
+589,
+596,
+602,
+609,
+616,
+622,
+629,
+635,
+642,
+648,
+654,
+660,
+666,
+672,
+678,
+683,
+689,
+694,
+700,
+705,
+710,
+715,
+720,
+725,
+730,
+735,
+739,
+744,
+748,
+753,
+757,
+761,
+765,
+769,
+773,
+777,
+780,
+784,
+787,
+791,
+794,
+797,
+800,
+803,
+806,
+809,
+811,
+814,
+816,
+818,
+821,
+823,
+825,
+827,
+828,
+830,
+832,
+833,
+835,
+836,
+837,
+838,
+839,
+840,
+841,
+841,
+842,
+842,
+843,
+843,
+843,
+843,
+843,
+843,
+843,
+842,
+842,
+841,
+840,
+840,
+839,
+838,
+837,
+835,
+834,
+833,
+831,
+830,
+828,
+826,
+824,
+822,
+820,
+818,
+816,
+813,
+811,
+808,
+806,
+803,
+800,
+797,
+794,
+791,
+788,
+784,
+781,
+777,
+774,
+770,
+766,
+763,
+759,
+755,
+750,
+746,
+742,
+738,
+733,
+729,
+724,
+719,
+714,
+710,
+705,
+700,
+694,
+689,
+684,
+679,
+673,
+668,
+662,
+657,
+651,
+645,
+639,
+633,
+627,
+621,
+615,
+609,
+603,
+596,
+590,
+584,
+577,
+571,
+564,
+557,
+551,
+544,
+537,
+530,
+523,
+516,
+509,
+502,
+495,
+487,
+480,
+473,
+465,
+458,
+450,
+443,
+435,
+428,
+420,
+413,
+405,
+397,
+389,
+381,
+374,
+366,
+358,
+350,
+342,
+334,
+326,
+318,
+310,
+301,
+293,
+285,
+277,
+269,
+260,
+252,
+244,
+236,
+227,
+219,
+211,
+202,
+194,
+185,
+177,
+169,
+160,
+152,
+143,
+135,
+126,
+118,
+110,
+101,
+93,
+84,
+76,
+67,
+59,
+50,
+42,
+34,
+25,
+17,
+8,
+0,
+-7,
+-16,
+-24,
+-32,
+-41,
+-49,
+-57,
+-66,
+-74,
+-82,
+-90,
+-98,
+-106,
+-115,
+-123,
+-131,
+-139,
+-147,
+-155,
+-163,
+-171,
+-179,
+-186,
+-194,
+-202,
+-210,
+-217,
+-225,
+-233,
+-240,
+-248,
+-255,
+-263,
+-270,
+-278,
+-285,
+-292,
+-299,
+-307,
+-314,
+-321,
+-328,
+-335,
+-342,
+-349,
+-356,
+-362,
+-369,
+-376,
+-382,
+-389,
+-396,
+-402,
+-408,
+-415,
+-421,
+-427,
+-433,
+-439,
+-445,
+-451,
+-457,
+-463,
+-469,
+-475,
+-480,
+-486,
+-491,
+-497,
+-502,
+-507,
+-513,
+-518,
+-523,
+-528,
+-533,
+-538,
+-542,
+-547,
+-552,
+-556,
+-561,
+-565,
+-570,
+-574,
+-578,
+-582,
+-586,
+-590,
+-594,
+-598,
+-602,
+-605,
+-609,
+-612,
+-616,
+-619,
+-622,
+-625,
+-629,
+-632,
+-634,
+-637,
+-640,
+-643,
+-645,
+-648,
+-650,
+-653,
+-655,
+-657,
+-659,
+-661,
+-663,
+-665,
+-667,
+-668,
+-670,
+-671,
+-673,
+-674,
+-675,
+-676,
+-678,
+-679,
+-679,
+-680,
+-681,
+-682,
+-682,
+-683,
+-683,
+-683,
+-684,
+-684,
+-684,
+-684,
+-684,
+-684,
+-683,
+-683,
+-682,
+-682,
+-681,
+-681,
+-680,
+-679,
+-678,
+-677,
+-676,
+-675,
+-674,
+-672,
+-671,
+-669,
+-668,
+-666,
+-664,
+-662,
+-661,
+-659,
+-657,
+-654,
+-652,
+-650,
+-648,
+-645,
+-643,
+-640,
+-637,
+-635,
+-632,
+-629,
+-626,
+-623,
+-620,
+-617,
+-613,
+-610,
+-607,
+-603,
+-600,
+-596,
+-593,
+-589,
+-585,
+-581,
+-577,
+-573,
+-569,
+-565,
+-561,
+-557,
+-552,
+-548,
+-544,
+-539,
+-534,
+-530,
+-525,
+-520,
+-516,
+-511,
+-506,
+-501,
+-496,
+-491,
+-486,
+-481,
+-475,
+-470,
+-465,
+-460,
+-454,
+-449,
+-443,
+-438,
+-432,
+-426,
+-421,
+-415,
+-409,
+-403,
+-398,
+-392,
+-386,
+-380,
+-374,
+-368,
+-362,
+-355,
+-349,
+-343,
+-337,
+-331,
+-324,
+-318,
+-312,
+-305,
+-299,
+-292,
+-286,
+-280,
+-273,
+-266,
+-260,
+-253,
+-247,
+-240,
+-234,
+-227,
+-220,
+-213,
+-207,
+-200,
+-193,
+-187,
+-180,
+-173,
+-166,
+-159,
+-153,
+-146,
+-139,
+-132,
+-125,
+-118,
+-112,
+-105,
+-98,
+-91,
+-84,
+-77,
+-70,
+-64,
+-57,
+-50,
+-43,
+-36,
+-29,
+-22,
+-16,
+-9,
+-2,
+4,
+11,
+17,
+24,
+31,
+38,
+44,
+51,
+58,
+64,
+71,
+78,
+84,
+91,
+98,
+104,
+111,
+117,
+124,
+130,
+137,
+143,
+149,
+156,
+162,
+168,
+175,
+181,
+187,
+193,
+199,
+205,
+212,
+218,
+224,
+230,
+236,
+241,
+247,
+253,
+259,
+265,
+270,
+276,
+282,
+287,
+293,
+298,
+304,
+309,
+314,
+320,
+325,
+330,
+335,
+340,
+345,
+350,
+355,
+360,
+365,
+370,
+375,
+380,
+384,
+389,
+393,
+398,
+402,
+407,
+411,
+415,
+419,
+424,
+428,
+432,
+436,
+440,
+443,
+447,
+451,
+455,
+458,
+462,
+465,
+469,
+472,
+475,
+479,
+482,
+485,
+488,
+491,
+494,
+497,
+499,
+502,
+505,
+507,
+510,
+512,
+515,
+517,
+519,
+522,
+524,
+526,
+528,
+530,
+532,
+533,
+535,
+537,
+538,
+540,
+541,
+543,
+544,
+545,
+546,
+548,
+549,
+550,
+550,
+551,
+552,
+553,
+553,
+554,
+554,
+555,
+555,
+555,
+556,
+556,
+556,
+556,
+556,
+556,
+555,
+555,
+555,
+554,
+554,
+553,
+553,
+552,
+551,
+551,
+550,
+549,
+548,
+547,
+546,
+545,
+543,
+542,
+541,
+539,
+538,
+536,
+534,
+533,
+531,
+529,
+527,
+525,
+523,
+521,
+519,
+517,
+514,
+512,
+510,
+507,
+505,
+502,
+500,
+497,
+494,
+492,
+489,
+486,
+483,
+480,
+477,
+474,
+471,
+467,
+464,
+461,
+457,
+454,
+450,
+447,
+443,
+440,
+436,
+432,
+429,
+425,
+421,
+417,
+413,
+409,
+405,
+401,
+397,
+393,
+388,
+384,
+380,
+375,
+371,
+367,
+362,
+358,
+353,
+349,
+344,
+339,
+335,
+330,
+325,
+321,
+316,
+311,
+306,
+301,
+296,
+291,
+286,
+281,
+276,
+271,
+266,
+261,
+256,
+251,
+245,
+240,
+235,
+230,
+225,
+219,
+214,
+209,
+203,
+198,
+193,
+187,
+182,
+176,
+171,
+165,
+160,
+154,
+149,
+144,
+138,
+132,
+127,
+121,
+116,
+110,
+105,
+99,
+94,
+88,
+83,
+77,
+71,
+66,
+60,
+55,
+49,
+44,
+38,
+33,
+27,
+21,
+16,
+10,
+5,
+0,
+-5,
+-11,
+-16,
+-22,
+-27,
+-33,
+-38,
+-43,
+-49,
+-54,
+-60,
+-65,
+-70,
+-76,
+-81,
+-86,
+-92,
+-97,
+-102,
+-107,
+-113,
+-118,
+-123,
+-128,
+-133,
+-138,
+-143,
+-148,
+-153,
+-158,
+-163,
+-168,
+-173,
+-178,
+-183,
+-188,
+-192,
+-197,
+-202,
+-207,
+-211,
+-216,
+-221,
+-225,
+-230,
+-234,
+-239,
+-243,
+-247,
+-252,
+-256,
+-260,
+-265,
+-269,
+-273,
+-277,
+-281,
+-285,
+-289,
+-293,
+-297,
+-301,
+-305,
+-308,
+-312,
+-316,
+-319,
+-323,
+-327,
+-330,
+-334,
+-337,
+-340,
+-344,
+-347,
+-350,
+-353,
+-357,
+-360,
+-363,
+-366,
+-369,
+-372,
+-374,
+-377,
+-380,
+-383,
+-385,
+-388,
+-390,
+-393,
+-395,
+-398,
+-400,
+-402,
+-405,
+-407,
+-409,
+-411,
+-413,
+-415,
+-417,
+-419,
+-420,
+-422,
+-424,
+-425,
+-427,
+-429,
+-430,
+-431,
+-433,
+-434,
+-435,
+-436,
+-438,
+-439,
+-440,
+-441,
+-442,
+-442,
+-443,
+-444,
+-445,
+-445,
+-446,
+-446,
+-447,
+-447,
+-448,
+-448,
+-448,
+-448,
+-449,
+-449,
+-449,
+-449,
+-449,
+-448,
+-448,
+-448,
+-448,
+-447,
+-447,
+-446,
+-446,
+-445,
+-445,
+-444,
+-443,
+-442,
+-442,
+-441,
+-440,
+-439,
+-438,
+-437,
+-435,
+-434,
+-433,
+-432,
+-430,
+-429,
+-427,
+-426,
+-424,
+-423,
+-421,
+-419,
+-418,
+-416,
+-414,
+-412,
+-410,
+-408,
+-406,
+-404,
+-402,
+-400,
+-397,
+-395,
+-393,
+-390,
+-388,
+-385,
+-383,
+-380,
+-378,
+-375,
+-373,
+-370,
+-367,
+-364,
+-361,
+-359,
+-356,
+-353,
+-350,
+-347,
+-344,
+-340,
+-337,
+-334,
+-331,
+-328,
+-324,
+-321,
+-318,
+-314,
+-311,
+-307,
+-304,
+-300,
+-297,
+-293,
+-290,
+-286,
+-282,
+-279,
+-275,
+-271,
+-267,
+-263,
+-260,
+-256,
+-252,
+-248,
+-244,
+-240,
+-236,
+-232,
+-228,
+-224,
+-220,
+-216,
+-212,
+-207,
+-203,
+-199,
+-195,
+-191,
+-186,
+-182,
+-178,
+-174,
+-169,
+-165,
+-161,
+-156,
+-152,
+-148,
+-143,
+-139,
+-134,
+-130,
+-126,
+-121,
+-117,
+-112,
+-108,
+-103,
+-99,
+-95,
+-90,
+-86,
+-81,
+-77,
+-72,
+-68,
+-63,
+-59,
+-54,
+-50,
+-45,
+-41,
+-36,
+-32,
+-27,
+-23,
+-18,
+-14,
+-9,
+-5,
+0,
+3,
+7,
+12,
+16,
+21,
+25,
+29,
+34,
+38,
+43,
+47,
+51,
+56,
+60,
+64,
+69,
+73,
+77,
+81,
+85,
+90,
+94,
+98,
+102,
+106,
+110,
+115,
+119,
+123,
+127,
+131,
+135,
+139,
+143,
+146,
+150,
+154,
+158,
+162,
+166,
+169,
+173,
+177,
+181,
+184,
+188,
+192,
+195,
+199,
+202,
+206,
+209,
+212,
+216,
+219,
+223,
+226,
+229,
+232,
+236,
+239,
+242,
+245,
+248,
+251,
+254,
+257,
+260,
+263,
+266,
+268,
+271,
+274,
+277,
+279,
+282,
+284,
+287,
+289,
+292,
+294,
+297,
+299,
+301,
+304,
+306,
+308,
+310,
+312,
+314,
+316,
+318,
+320,
+322,
+324,
+326,
+328,
+329,
+331,
+333,
+334,
+336,
+337,
+339,
+340,
+341,
+343,
+344,
+345,
+346,
+348,
+349,
+350,
+351,
+352,
+353,
+354,
+354,
+355,
+356,
+357,
+357,
+358,
+358,
+359,
+359,
+360,
+360,
+361,
+361,
+361,
+361,
+362,
+362,
+362,
+362,
+362,
+362,
+362,
+361,
+361,
+361,
+361,
+360,
+360,
+360,
+359,
+359,
+358,
+358,
+357,
+356,
+356,
+355,
+354,
+353,
+352,
+351,
+350,
+349,
+348,
+347,
+346,
+345,
+344,
+343,
+341,
+340,
+339,
+337,
+336,
+334,
+333,
+331,
+330,
+328,
+326,
+324,
+323,
+321,
+319,
+317,
+315,
+313,
+311,
+309,
+307,
+305,
+303,
+301,
+299,
+297,
+294,
+292,
+290,
+288,
+285,
+283,
+280,
+278,
+275,
+273,
+270,
+268,
+265,
+263,
+260,
+257,
+254,
+252,
+249,
+246,
+243,
+240,
+238,
+235,
+232,
+229,
+226,
+223,
+220,
+217,
+214,
+211,
+208,
+204,
+201,
+198,
+195,
+192,
+188,
+185,
+182,
+179,
+175,
+172,
+169,
+165,
+162,
+159,
+155,
+152,
+149,
+145,
+142,
+138,
+135,
+131,
+128,
+124,
+121,
+117,
+114,
+110,
+107,
+103,
+100,
+96,
+93,
+89,
+85,
+82,
+78,
+75,
+71,
+67,
+64,
+60,
+57,
+53,
+49,
+46,
+42,
+39,
+35,
+31,
+28,
+24,
+21,
+17,
+14,
+10,
+6,
+3,
+0,
+-3,
+-7,
+-10,
+-14,
+-18,
+-21,
+-25,
+-28,
+-32,
+-35,
+-39,
+-42,
+-45,
+-49,
+-52,
+-56,
+-59,
+-63,
+-66,
+-69,
+-73,
+-76,
+-79,
+-83,
+-86,
+-89,
+-93,
+-96,
+-99,
+-102,
+-105,
+-109,
+-112,
+-115,
+-118,
+-121,
+-124,
+-127,
+-130,
+-133,
+-136,
+-139,
+-142,
+-145,
+-148,
+-151,
+-154,
+-157,
+-160,
+-162,
+-165,
+-168,
+-171,
+-173,
+-176,
+-179,
+-181,
+-184,
+-186,
+-189,
+-191,
+-194,
+-196,
+-199,
+-201,
+-204,
+-206,
+-208,
+-211,
+-213,
+-215,
+-217,
+-219,
+-221,
+-224,
+-226,
+-228,
+-230,
+-232,
+-234,
+-236,
+-237,
+-239,
+-241,
+-243,
+-245,
+-246,
+-248,
+-250,
+-251,
+-253,
+-254,
+-256,
+-257,
+-259,
+-260,
+-262,
+-263,
+-264,
+-266,
+-267,
+-268,
+-269,
+-270,
+-271,
+-273,
+-274,
+-275,
+-275,
+-276,
+-277,
+-278,
+-279,
+-280,
+-281,
+-281,
+-282,
+-283,
+-283,
+-284,
+-284,
+-285,
+-285,
+-286,
+-286,
+-286,
+-287,
+-287,
+-287,
+-287,
+-288,
+-288,
+-288,
+-288,
+-288,
+-288,
+-288,
+-288,
+-288,
+-288,
+-287,
+-287,
+-287,
+-287,
+-286,
+-286,
+-286,
+-285,
+-285,
+-284,
+-284,
+-283,
+-283,
+-282,
+-281,
+-281,
+-280,
+-279,
+-278,
+-277,
+-277,
+-276,
+-275,
+-274,
+-273,
+-272,
+-271,
+-270,
+-269,
+-267,
+-266,
+-265,
+-264,
+-262,
+-261,
+-260,
+-258,
+-257,
+-256,
+-254,
+-253,
+-251,
+-250,
+-248,
+-247,
+-245,
+-243,
+-242,
+-240,
+-238,
+-236,
+-235,
+-233,
+-231,
+-229,
+-227,
+-225,
+-223,
+-221,
+-219,
+-217,
+-215,
+-213,
+-211,
+-209,
+-207,
+-205,
+-203,
+-201,
+-198,
+-196,
+-194,
+-192,
+-189,
+-187,
+-185,
+-182,
+-180,
+-178,
+-175,
+-173,
+-170,
+-168,
+-165,
+-163,
+-160,
+-158,
+-155,
+-153,
+-150,
+-148,
+-145,
+-142,
+-140,
+-137,
+-135,
+-132,
+-129,
+-127,
+-124,
+-121,
+-118,
+-116,
+-113,
+-110,
+-108,
+-105,
+-102,
+-99,
+-96,
+-94,
+-91,
+-88,
+-85,
+-82,
+-80,
+-77,
+-74,
+-71,
+-68,
+-65,
+-63,
+-60,
+-57,
+-54,
+-51,
+-48,
+-45,
+-42,
+-40,
+-37,
+-34,
+-31,
+-28,
+-25,
+-22,
+-20,
+-17,
+-14,
+-11,
+-8,
+-5,
+-2,
+0,
+2,
+5,
+8,
+11,
+13,
+16,
+19,
+22,
+25,
+27,
+30,
+33,
+36,
+38,
+41,
+44,
+47,
+49,
+52,
+55,
+57,
+60,
+63,
+65,
+68,
+71,
+73,
+76,
+78,
+81,
+83,
+86,
+88,
+91,
+93,
+96,
+98,
+101,
+103,
+106,
+108,
+110,
+113,
+115,
+117,
+120,
+122,
+124,
+127,
+129,
+131,
+133,
+135,
+137,
+140,
+142,
+144,
+146,
+148,
+150,
+152,
+154,
+156,
+158,
+160,
+161,
+163,
+165,
+167,
+169,
+171,
+172,
+174,
+176,
+177,
+179,
+181,
+182,
+184,
+185,
+187,
+188,
+190,
+191,
+193,
+194,
+195,
+197,
+198,
+199,
+201,
+202,
+203,
+204,
+205,
+207,
+208,
+209,
+210,
+211,
+212,
+213,
+214,
+215,
+216,
+216,
+217,
+218,
+219,
+219,
+220,
+221,
+222,
+222,
+223,
+223,
+224,
+224,
+225,
+225,
+226,
+226,
+227,
+227,
+227,
+227,
+228,
+228,
+228,
+228,
+228,
+229,
+229,
+229,
+229,
+229,
+229,
+229,
+229,
+228,
+228,
+228,
+228,
+228,
+228,
+227,
+227,
+227,
+226,
+226,
+225,
+225,
+225,
+224,
+224,
+223,
+222,
+222,
+221,
+221,
+220,
+219,
+218,
+218,
+217,
+216,
+215,
+214,
+214,
+213,
+212,
+211,
+210,
+209,
+208,
+207,
+206,
+205,
+203,
+202,
+201,
+200,
+199,
+197,
+196,
+195,
+194,
+192,
+191,
+190,
+188,
+187,
+185,
+184,
+182,
+181,
+179,
+178,
+176,
+175,
+173,
+172,
+170,
+168,
+167,
+165,
+163,
+162,
+160,
+158,
+156,
+155,
+153,
+151,
+149,
+147,
+146,
+144,
+142,
+140,
+138,
+136,
+134,
+132,
+130,
+128,
+126,
+124,
+122,
+120,
+118,
+116,
+114,
+112,
+110,
+108,
+106,
+104,
+102,
+99,
+97,
+95,
+93,
+91,
+89,
+87,
+84,
+82,
+80,
+78,
+76,
+73,
+71,
+69,
+67,
+64,
+62,
+60,
+58,
+56,
+53,
+51,
+49,
+47,
+44,
+42,
+40,
+38,
+35,
+33,
+31,
+28,
+26,
+24,
+22,
+19,
+17,
+15,
+13,
+10,
+8,
+6,
+4,
+1,
+0,
+-2,
+-4,
+-6,
+-9,
+-11,
+-13,
+-15,
+-17,
+-20,
+-22,
+-24,
+-26,
+-28,
+-30,
+-33,
+-35,
+-37,
+-39,
+-41,
+-43,
+-45,
+-47,
+-49,
+-52,
+-54,
+-56,
+-58,
+-60,
+-62,
+-64,
+-66,
+-68,
+-70,
+-72,
+-74,
+-76,
+-77,
+-79,
+-81,
+-83,
+-85,
+-87,
+-89,
+-90,
+-92,
+-94,
+-96,
+-98,
+-99,
+-101,
+-103,
+-105,
+-106,
+-108,
+-110,
+-111,
+-113,
+-114,
+-116,
+-118,
+-119,
+-121,
+-122,
+-124,
+-125,
+-127,
+-128,
+-130,
+-131,
+-132,
+-134,
+-135,
+-136,
+-138,
+-139,
+-140,
+-142,
+-143,
+-144,
+-145,
+-146,
+-148,
+-149,
+-150,
+-151,
+-152,
+-153,
+-154,
+-155,
+-156,
+-157,
+-158,
+-159,
+-160,
+-161,
+-162,
+-162,
+-163,
+-164,
+-165,
+-166,
+-166,
+-167,
+-168,
+-168,
+-169,
+-170,
+-170,
+-171,
+-171,
+-172,
+-172,
+-173,
+-173,
+-174,
+-174,
+-175,
+-175,
+-175,
+-176,
+-176,
+-176,
+-177,
+-177,
+-177,
+-177,
+-178,
+-178,
+-178,
+-178,
+-178,
+-178,
+-178,
+-178,
+-178,
+-178,
+-178,
+-178,
+-178,
+-178,
+-178,
+-178,
+-177,
+-177,
+-177,
+-177,
+-177,
+-176,
+-176,
+-176,
+-175,
+-175,
+-175,
+-174,
+-174,
+-173,
+-173,
+-172,
+-172,
+-171,
+-171,
+-170,
+-170,
+-169,
+-168,
+-168,
+-167,
+-166,
+-166,
+-165,
+-164,
+-163,
+-163,
+-162,
+-161,
+-160,
+-159,
+-158,
+-158,
+-157,
+-156,
+-155,
+-154,
+-153,
+-152,
+-151,
+-150,
+-149,
+-148,
+-147,
+-145,
+-144,
+-143,
+-142,
+-141,
+-140,
+-139,
+-137,
+-136,
+-135,
+-134,
+-132,
+-131,
+-130,
+-128,
+-127,
+-126,
+-124,
+-123,
+-122,
+-120,
+-119,
+-118,
+-116,
+-115,
+-113,
+-112,
+-110,
+-109,
+-107,
+-106,
+-104,
+-103,
+-101,
+-100,
+-98,
+-97,
+-95,
+-94,
+-92,
+-90,
+-89,
+-87,
+-86,
+-84,
+-82,
+-81,
+-79,
+-77,
+-76,
+-74,
+-72,
+-71,
+-69,
+-67,
+-66,
+-64,
+-62,
+-60,
+-59,
+-57,
+-55,
+-54,
+-52,
+-50,
+-48,
+-47,
+-45,
+-43,
+-41,
+-40,
+-38,
+-36,
+-34,
+-33,
+-31,
+-29,
+-27,
+-25,
+-24,
+-22,
+-20,
+-18,
+-17,
+-15,
+-13,
+-11,
+-10,
+-8,
+-6,
+-4,
+-3,
+-1,
+0,
+2,
+3,
+5,
+7,
+8,
+10,
+12,
+14,
+15,
+17,
+19,
+20,
+22,
+24,
+25,
+27,
+29,
+30,
+32,
+34,
+35,
+37,
+39,
+40,
+42,
+43,
+45,
+47,
+48,
+50,
+51,
+53,
+54,
+56,
+57,
+59,
+60,
+62,
+63,
+65,
+66,
+68,
+69,
+70,
+72,
+73,
+75,
+76,
+77,
+79,
+80,
+81,
+83,
+84,
+85,
+87,
+88,
+89,
+90,
+92,
+93,
+94,
+95,
+96,
+97,
+99,
+100,
+101,
+102,
+103,
+104,
+105,
+106,
+107,
+108,
+109,
+110,
+111,
+112,
+113,
+114,
+115,
+116,
+117,
+117,
+118,
+119,
+120,
+121,
+121,
+122,
+123,
+124,
+124,
+125,
+126,
+126,
+127,
+128,
+128,
+129,
+129,
+130,
+130,
+131,
+131,
+132,
+132,
+133,
+133,
+134,
+134,
+135,
+135,
+135,
+136,
+136,
+136,
+136,
+137,
+137,
+137,
+137,
+138,
+138,
+138,
+138,
+138,
+138,
+138,
+138,
+139,
+139,
+139,
+139,
+139,
+139,
+139,
+138,
+138,
+138,
+138,
+138,
+138,
+138,
+138,
+137,
+137,
+137,
+137,
+136,
+136,
+136,
+136,
+135,
+135,
+134,
+134,
+134,
+133,
+133,
+132,
+132,
+132,
+131,
+131,
+130,
+129,
+129,
+128,
+128,
+127,
+127,
+126,
+125,
+125,
+124,
+123,
+123,
+122,
+121,
+121,
+120,
+119,
+118,
+117,
+117,
+116,
+115,
+114,
+113,
+113,
+112,
+111,
+110,
+109,
+108,
+107,
+106,
+105,
+104,
+103,
+102,
+101,
+100,
+99,
+98,
+97,
+96,
+95,
+94,
+93,
+92,
+91,
+90,
+89,
+87,
+86,
+85,
+84,
+83,
+82,
+81,
+79,
+78,
+77,
+76,
+75,
+73,
+72,
+71,
+70,
+68,
+67,
+66,
+65,
+63,
+62,
+61,
+60,
+58,
+57,
+56,
+54,
+53,
+52,
+50,
+49,
+48,
+47,
+45,
+44,
+43,
+41,
+40,
+39,
+37,
+36,
+34,
+33,
+32,
+30,
+29,
+28,
+26,
+25,
+24,
+22,
+21,
+20,
+18,
+17,
+16,
+14,
+13,
+11,
+10,
+9,
+7,
+6,
+5,
+3,
+2,
+1,
+0,
+-1,
+-2,
+-4,
+-5,
+-6,
+-8,
+-9,
+-10,
+-11,
+-13,
+-14,
+-15,
+-17,
+-18,
+-19,
+-20,
+-22,
+-23,
+-24,
+-26,
+-27,
+-28,
+-29,
+-30,
+-32,
+-33,
+-34,
+-35,
+-37,
+-38,
+-39,
+-40,
+-41,
+-42,
+-44,
+-45,
+-46,
+-47,
+-48,
+-49,
+-50,
+-51,
+-53,
+-54,
+-55,
+-56,
+-57,
+-58,
+-59,
+-60,
+-61,
+-62,
+-63,
+-64,
+-65,
+-66,
+-67,
+-68,
+-69,
+-70,
+-71,
+-71,
+-72,
+-73,
+-74,
+-75,
+-76,
+-77,
+-77,
+-78,
+-79,
+-80,
+-81,
+-81,
+-82,
+-83,
+-84,
+-84,
+-85,
+-86,
+-87,
+-87,
+-88,
+-89,
+-89,
+-90,
+-90,
+-91,
+-92,
+-92,
+-93,
+-93,
+-94,
+-94,
+-95,
+-95,
+-96,
+-96,
+-97,
+-97,
+-98,
+-98,
+-99,
+-99,
+-99,
+-100,
+-100,
+-100,
+-101,
+-101,
+-101,
+-102,
+-102,
+-102,
+-102,
+-103,
+-103,
+-103,
+-103,
+-103,
+-104,
+-104,
+-104,
+-104,
+-104,
+-104,
+-104,
+-105,
+-105,
+-105,
+-105,
+-105,
+-105,
+-105,
+-105,
+-105,
+-105,
+-105,
+-105,
+-104,
+-104,
+-104,
+-104,
+-104,
+-104,
+-104,
+-104,
+-103,
+-103,
+-103,
+-103,
+-103,
+-102,
+-102,
+-102,
+-102,
+-101,
+-101,
+-101,
+-100,
+-100,
+-100,
+-99,
+-99,
+-99,
+-98,
+-98,
+-97,
+-97,
+-97,
+-96,
+-96,
+-95,
+-95,
+-94,
+-94,
+-93,
+-93,
+-92,
+-92,
+-91,
+-90,
+-90,
+-89,
+-89,
+-88,
+-87,
+-87,
+-86,
+-86,
+-85,
+-84,
+-84,
+-83,
+-82,
+-81,
+-81,
+-80,
+-79,
+-79,
+-78,
+-77,
+-76,
+-76,
+-75,
+-74,
+-73,
+-72,
+-72,
+-71,
+-70,
+-69,
+-68,
+-67,
+-67,
+-66,
+-65,
+-64,
+-63,
+-62,
+-61,
+-61,
+-60,
+-59,
+-58,
+-57,
+-56,
+-55,
+-54,
+-53,
+-52,
+-51,
+-50,
+-49,
+-48,
+-48,
+-47,
+-46,
+-45,
+-44,
+-43,
+-42,
+-41,
+-40,
+-39,
+-38,
+-37,
+-36,
+-35,
+-34,
+-33,
+-32,
+-31,
+-30,
+-29,
+-28,
+-27,
+-26,
+-25,
+-24,
+-23,
+-21,
+-20,
+-19,
+-18,
+-17,
+-16,
+-15,
+-14,
+-13,
+-12,
+-11,
+-10,
+-9,
+-8,
+-7,
+-6,
+-5,
+-4,
+-3,
+-2,
+-1,
+0,
+0,
+1,
+2,
+3,
+4,
+5,
+6,
+7,
+8,
+9,
+10,
+11,
+12,
+13,
+14,
+15,
+16,
+17,
+18,
+19,
+20,
+21,
+22,
+22,
+23,
+24,
+25,
+26,
+27,
+28,
+29,
+30,
+31,
+32,
+32,
+33,
+34,
+35,
+36,
+37,
+38,
+38,
+39,
+40,
+41,
+42,
+42,
+43,
+44,
+45,
+46,
+46,
+47,
+48,
+49,
+49,
+50,
+51,
+52,
+52,
+53,
+54,
+54,
+55,
+56,
+56,
+57,
+58,
+58,
+59,
+59,
+60,
+61,
+61,
+62,
+62,
+63,
+64,
+64,
+65,
+65,
+66,
+66,
+67,
+67,
+68,
+68,
+69,
+69,
+69,
+70,
+70,
+71,
+71,
+72,
+72,
+72,
+73,
+73,
+73,
+74,
+74,
+74,
+75,
+75,
+75,
+76,
+76,
+76,
+76,
+77,
+77,
+77,
+77,
+77,
+78,
+78,
+78,
+78,
+78,
+78,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+79,
+78,
+78,
+78,
+78,
+78,
+78,
+77,
+77,
+77,
+77,
+77,
+76,
+76,
+76,
+76,
+75,
+75,
+75,
+74,
+74,
+74,
+74,
+73,
+73,
+72,
+72,
+72,
+71,
+71,
+71,
+70,
+70,
+69,
+69,
+69,
+68,
+68,
+67,
+67,
+66,
+66,
+65,
+65,
+64,
+64,
+63,
+63,
+62,
+62,
+61,
+61,
+60,
+60,
+59,
+59,
+58,
+57,
+57,
+56,
+56,
+55,
+55,
+54,
+53,
+53,
+52,
+51,
+51,
+50,
+50,
+49,
+48,
+48,
+47,
+46,
+46,
+45,
+44,
+44,
+43,
+42,
+41,
+41,
+40,
+39,
+39,
+38,
+37,
+37,
+36,
+35,
+34,
+34,
+33,
+32,
+31,
+31,
+30,
+29,
+28,
+28,
+27,
+26,
+25,
+25,
+24,
+23,
+22,
+22,
+21,
+20,
+19,
+19,
+18,
+17,
+16,
+16,
+15,
+14,
+13,
+12,
+12,
+11,
+10,
+9,
+9,
+8,
+7,
+6,
+6,
+5,
+4,
+3,
+3,
+2,
+1,
+0,
+0,
+0,
+-1,
+-2,
+-2,
+-3,
+-4,
+-5,
+-5,
+-6,
+-7,
+-8,
+-8,
+-9,
+-10,
+-10,
+-11,
+-12,
+-13,
+-13,
+-14,
+-15,
+-15,
+-16,
+-17,
+-17,
+-18,
+-19,
+-19,
+-20,
+-21,
+-21,
+-22,
+-23,
+-23,
+-24,
+-25,
+-25,
+-26,
+-27,
+-27,
+-28,
+-28,
+-29,
+-30,
+-30,
+-31,
+-31,
+-32,
+-33,
+-33,
+-34,
+-34,
+-35,
+-35,
+-36,
+-36,
+-37,
+-37,
+-38,
+-38,
+-39,
+-39,
+-40,
+-40,
+-41,
+-41,
+-42,
+-42,
+-43,
+-43,
+-44,
+-44,
+-45,
+-45,
+-45,
+-46,
+-46,
+-47,
+-47,
+-47,
+-48,
+-48,
+-49,
+-49,
+-49,
+-50,
+-50,
+-50,
+-51,
+-51,
+-51,
+-51,
+-52,
+-52,
+-52,
+-53,
+-53,
+-53,
+-53,
+-54,
+-54,
+-54,
+-54,
+-54,
+-55,
+-55,
+-55,
+-55,
+-55,
+-56,
+-56,
+-56,
+-56,
+-56,
+-56,
+-56,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-57,
+-56,
+-56,
+-56,
+-56,
+-56,
+-56,
+-56,
+-55,
+-55,
+-55,
+-55,
+-55,
+-54,
+-54,
+-54,
+-54,
+-54,
+-53,
+-53,
+-53,
+-53,
+-52,
+-52,
+-52,
+-52,
+-51,
+-51,
+-51,
+-50,
+-50,
+-50,
+-50,
+-49,
+-49,
+-49,
+-48,
+-48,
+-48,
+-47,
+-47,
+-46,
+-46,
+-46,
+-45,
+-45,
+-45,
+-44,
+-44,
+-43,
+-43,
+-43,
+-42,
+-42,
+-41,
+-41,
+-40,
+-40,
+-40,
+-39,
+-39,
+-38,
+-38,
+-37,
+-37,
+-36,
+-36,
+-35,
+-35,
+-35,
+-34,
+-34,
+-33,
+-33,
+-32,
+-32,
+-31,
+-31,
+-30,
+-30,
+-29,
+-29,
+-28,
+-28,
+-27,
+-26,
+-26,
+-25,
+-25,
+-24,
+-24,
+-23,
+-23,
+-22,
+-22,
+-21,
+-21,
+-20,
+-19,
+-19,
+-18,
+-18,
+-17,
+-17,
+-16,
+-16,
+-15,
+-15,
+-14,
+-13,
+-13,
+-12,
+-12,
+-11,
+-11,
+-10,
+-9,
+-9,
+-8,
+-8,
+-7,
+-7,
+-6,
+-6,
+-5,
+-4,
+-4,
+-3,
+-3,
+-2,
+-2,
+-1,
+-1,
+0,
+0,
+0,
+1,
+1,
+2,
+2,
+3,
+3,
+4,
+4,
+5,
+5,
+6,
+7,
+7,
+8,
+8,
+9,
+9,
+10,
+10,
+11,
+11,
+12,
+12,
+13,
+13,
+14,
+14,
+15,
+15,
+16,
+16,
+17,
+17,
+18,
+18,
+18,
+19,
+19,
+20,
+20,
+21,
+21,
+22,
+22,
+22,
+23,
+23,
+24,
+24,
+25,
+25,
+25,
+26,
+26,
+27,
+27,
+27,
+28,
+28,
+28,
+29,
+29,
+30,
+30,
+30,
+31,
+31,
+31,
+32,
+32,
+32,
+33,
+33,
+33,
+33,
+34,
+34,
+34,
+35,
+35,
+35,
+35,
+36,
+36,
+36,
+36,
+37,
+37,
+37,
+37,
+38,
+38,
+38,
+38,
+38,
+39,
+39,
+39,
+39,
+39,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+41,
+41,
+41,
+41,
+41,
+41,
+41,
+41,
+41,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+42,
+41,
+41,
+41,
+41,
+41,
+41,
+41,
+41,
+41,
+41,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+39,
+39,
+39,
+39,
+39,
+38,
+38,
+38,
+38,
+38,
+37,
+37,
+37,
+37,
+37,
+36,
+36,
+36,
+36,
+35,
+35,
+35,
+35,
+34,
+34,
+34,
+34,
+33,
+33,
+33,
+33,
+32,
+32,
+32,
+31,
+31,
+31,
+30,
+30,
+30,
+30,
+29,
+29,
+29,
+28,
+28,
+28,
+27,
+27,
+27,
+26,
+26,
+26,
+25,
+25,
+25,
+24,
+24,
+23,
+23,
+23,
+22,
+22,
+22,
+21,
+21,
+21,
+20,
+20,
+19,
+19,
+19,
+18,
+18,
+18,
+17,
+17,
+16,
+16,
+16,
+15,
+15,
+14,
+14,
+14,
+13,
+13,
+12,
+12,
+12,
+11,
+11,
+10,
+10,
+10,
+9,
+9,
+8,
+8,
+8,
+7,
+7,
+6,
+6,
+6,
+5,
+5,
+4,
+4,
+4,
+3,
+3,
+2,
+2,
+2,
+1,
+1,
+1,
+0,
+0,
+0,
+0,
+0,
+-1,
+-1,
+-2,
+-2,
+-2,
+-3,
+-3,
+-3,
+-4,
+-4,
+-5,
+-5,
+-5,
+-6,
+-6,
+-6,
+-7,
+-7,
+-7,
+-8,
+-8,
+-9,
+-9,
+-9,
+-10,
+-10,
+-10,
+-11,
+-11,
+-11,
+-12,
+-12,
+-12,
+-13,
+-13,
+-13,
+-14,
+-14,
+-14,
+-14,
+-15,
+-15,
+-15,
+-16,
+-16,
+-16,
+-17,
+-17,
+-17,
+-17,
+-18,
+-18,
+-18,
+-19,
+-19,
+-19,
+-19,
+-20,
+-20,
+-20,
+-20,
+-21,
+-21,
+-21,
+-21,
+-21,
+-22,
+-22,
+-22,
+-22,
+-23,
+-23,
+-23,
+-23,
+-23,
+-24,
+-24,
+-24,
+-24,
+-24,
+-25,
+-25,
+-25,
+-25,
+-25,
+-25,
+-26,
+-26,
+-26,
+-26,
+-26,
+-26,
+-26,
+-27,
+-27,
+-27,
+-27,
+-27,
+-27,
+-27,
+-27,
+-27,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-29,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-28,
+-27,
+-27,
+-27,
+-27,
+-27,
+-27,
+-27,
+-27,
+-27,
+-27,
+-26,
+-26,
+-26,
+-26,
+-26,
+-26,
+-26,
+-25,
+-25,
+-25,
+-25,
+-25,
+-25,
+-25,
+-24,
+-24,
+-24,
+-24,
+-24,
+-24,
+-23,
+-23,
+-23,
+-23,
+-23,
+-22,
+-22,
+-22,
+-22,
+-22,
+-21,
+-21,
+-21,
+-21,
+-21,
+-20,
+-20,
+-20,
+-20,
+-20,
+-19,
+-19,
+-19,
+-19,
+-18,
+-18,
+-18,
+-18,
+-17,
+-17,
+-17,
+-17,
+-16,
+-16,
+-16,
+-16,
+-15,
+-15,
+-15,
+-15,
+-14,
+-14,
+-14,
+-14,
+-13,
+-13,
+-13,
+-13,
+-12,
+-12,
+-12,
+-12,
+-11,
+-11,
+-11,
+-11,
+-10,
+-10,
+-10,
+-9,
+-9,
+-9,
+-9,
+-8,
+-8,
+-8,
+-7,
+-7,
+-7,
+-7,
+-6,
+-6,
+-6,
+-6,
+-5,
+-5,
+-5,
+-4,
+-4,
+-4,
+-4,
+-3,
+-3,
+-3,
+-2,
+-2,
+-2,
+-2,
+-1,
+-1,
+-1,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+1,
+1,
+1,
+2,
+2,
+2,
+2,
+3,
+3,
+3,
+3,
+4,
+4,
+4,
+5,
+5,
+5,
+5,
+6,
+6,
+6,
+6,
+6,
+7,
+7,
+7,
+7,
+8,
+8,
+8,
+8,
+9,
+9,
+9,
+9,
+10,
+10,
+10,
+10,
+10,
+11,
+11,
+11,
+11,
+11,
+12,
+12,
+12,
+12,
+12,
+13,
+13,
+13,
+13,
+13,
+14,
+14,
+14,
+14,
+14,
+14,
+15,
+15,
+15,
+15,
+15,
+15,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+17,
+17,
+17,
+17,
+17,
+17,
+17,
+17,
+18,
+18,
+18,
+18,
+18,
+18,
+18,
+18,
+18,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+20,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+19,
+18,
+18,
+18,
+18,
+18,
+18,
+18,
+18,
+18,
+18,
+17,
+17,
+17,
+17,
+17,
+17,
+17,
+17,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+15,
+15,
+15,
+15,
+15,
+15,
+15,
+14,
+14,
+14,
+14,
+14,
+14,
+14,
+13,
+13,
+13,
+13,
+13,
+13,
+12,
+12,
+12,
+12,
+12,
+12,
+11,
+11,
+11,
+11,
+11,
+11,
+10,
+10,
+10,
+10,
+10,
+9,
+9,
+9,
+9,
+9,
+9,
+8,
+8,
+8,
+8,
+8,
+7,
+7,
+7,
+7,
+7,
+7,
+6,
+6,
+6,
+6,
+6,
+5,
+5,
+5,
+5,
+5,
+4,
+4,
+4,
+4,
+4,
+4,
+3,
+3,
+3,
+3,
+3,
+2,
+2,
+2,
+2,
+2,
+2,
+1,
+1,
+1,
+1,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-7,
+-7,
+-7,
+-7,
+-7,
+-7,
+-7,
+-7,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-7,
+-7,
+-7,
+-7,
+-7,
+-7,
+-7,
+-7,
+-7,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+8,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0};
+
+static const RES_HWORD LARGE_FILTER_IMPD[] /* Impulse response differences */ = {
+-1,
+-2,
+-3,
+-5,
+-6,
+-7,
+-9,
+-10,
+-11,
+-13,
+-14,
+-15,
+-17,
+-18,
+-19,
+-21,
+-22,
+-23,
+-25,
+-26,
+-27,
+-28,
+-30,
+-32,
+-32,
+-34,
+-35,
+-36,
+-38,
+-39,
+-40,
+-42,
+-43,
+-44,
+-45,
+-47,
+-48,
+-49,
+-51,
+-52,
+-53,
+-54,
+-56,
+-56,
+-58,
+-60,
+-60,
+-62,
+-63,
+-64,
+-66,
+-66,
+-68,
+-69,
+-70,
+-72,
+-72,
+-74,
+-75,
+-76,
+-77,
+-79,
+-79,
+-81,
+-82,
+-83,
+-84,
+-85,
+-87,
+-87,
+-89,
+-90,
+-90,
+-92,
+-93,
+-94,
+-95,
+-96,
+-98,
+-98,
+-99,
+-100,
+-102,
+-102,
+-103,
+-105,
+-105,
+-106,
+-108,
+-108,
+-109,
+-110,
+-111,
+-112,
+-113,
+-114,
+-115,
+-116,
+-116,
+-118,
+-118,
+-119,
+-121,
+-120,
+-122,
+-123,
+-123,
+-125,
+-125,
+-126,
+-126,
+-128,
+-128,
+-129,
+-130,
+-130,
+-132,
+-132,
+-132,
+-134,
+-134,
+-135,
+-135,
+-136,
+-137,
+-137,
+-138,
+-139,
+-139,
+-140,
+-141,
+-141,
+-142,
+-142,
+-143,
+-143,
+-144,
+-145,
+-145,
+-145,
+-146,
+-147,
+-147,
+-147,
+-148,
+-149,
+-148,
+-150,
+-149,
+-150,
+-151,
+-151,
+-151,
+-152,
+-152,
+-152,
+-153,
+-153,
+-153,
+-153,
+-154,
+-154,
+-155,
+-155,
+-155,
+-155,
+-155,
+-156,
+-156,
+-156,
+-156,
+-156,
+-157,
+-157,
+-157,
+-157,
+-157,
+-157,
+-157,
+-158,
+-157,
+-158,
+-158,
+-157,
+-158,
+-158,
+-158,
+-158,
+-157,
+-158,
+-158,
+-158,
+-157,
+-158,
+-158,
+-157,
+-158,
+-157,
+-157,
+-157,
+-157,
+-157,
+-157,
+-157,
+-156,
+-156,
+-156,
+-156,
+-156,
+-155,
+-155,
+-155,
+-155,
+-155,
+-154,
+-154,
+-153,
+-154,
+-153,
+-153,
+-152,
+-152,
+-152,
+-151,
+-151,
+-151,
+-150,
+-150,
+-150,
+-149,
+-149,
+-148,
+-148,
+-147,
+-147,
+-147,
+-146,
+-145,
+-145,
+-145,
+-144,
+-144,
+-143,
+-142,
+-142,
+-142,
+-141,
+-140,
+-140,
+-139,
+-139,
+-138,
+-137,
+-137,
+-136,
+-136,
+-135,
+-134,
+-134,
+-133,
+-132,
+-132,
+-131,
+-130,
+-130,
+-129,
+-128,
+-128,
+-126,
+-126,
+-126,
+-125,
+-123,
+-124,
+-122,
+-122,
+-121,
+-120,
+-119,
+-119,
+-117,
+-117,
+-117,
+-115,
+-114,
+-113,
+-113,
+-112,
+-112,
+-110,
+-110,
+-108,
+-108,
+-107,
+-106,
+-106,
+-104,
+-104,
+-102,
+-102,
+-101,
+-100,
+-99,
+-98,
+-98,
+-96,
+-95,
+-95,
+-94,
+-92,
+-92,
+-91,
+-90,
+-89,
+-88,
+-87,
+-86,
+-85,
+-85,
+-83,
+-82,
+-82,
+-80,
+-80,
+-78,
+-78,
+-76,
+-76,
+-75,
+-73,
+-73,
+-72,
+-70,
+-70,
+-69,
+-68,
+-66,
+-66,
+-65,
+-64,
+-63,
+-61,
+-61,
+-60,
+-59,
+-58,
+-57,
+-56,
+-55,
+-54,
+-53,
+-51,
+-51,
+-50,
+-49,
+-48,
+-47,
+-46,
+-45,
+-44,
+-43,
+-42,
+-41,
+-41,
+-39,
+-38,
+-37,
+-36,
+-35,
+-34,
+-34,
+-32,
+-31,
+-31,
+-29,
+-28,
+-28,
+-26,
+-26,
+-24,
+-24,
+-23,
+-21,
+-21,
+-20,
+-19,
+-18,
+-17,
+-16,
+-15,
+-14,
+-13,
+-13,
+-11,
+-11,
+-9,
+-9,
+-8,
+-7,
+-6,
+-5,
+-5,
+-3,
+-2,
+-2,
+-1,
+0,
+1,
+2,
+2,
+4,
+4,
+5,
+6,
+7,
+8,
+8,
+10,
+10,
+11,
+11,
+13,
+13,
+14,
+15,
+15,
+17,
+17,
+18,
+18,
+20,
+20,
+21,
+21,
+23,
+23,
+23,
+25,
+25,
+26,
+26,
+27,
+28,
+28,
+30,
+29,
+31,
+31,
+32,
+32,
+33,
+34,
+34,
+35,
+35,
+36,
+37,
+37,
+37,
+39,
+39,
+39,
+40,
+40,
+41,
+42,
+42,
+42,
+43,
+44,
+44,
+44,
+45,
+46,
+45,
+47,
+46,
+48,
+47,
+48,
+49,
+49,
+49,
+49,
+50,
+51,
+51,
+51,
+51,
+52,
+52,
+53,
+53,
+53,
+53,
+54,
+54,
+54,
+55,
+55,
+55,
+55,
+56,
+56,
+56,
+56,
+57,
+57,
+57,
+57,
+58,
+57,
+58,
+58,
+58,
+58,
+59,
+58,
+59,
+59,
+59,
+59,
+59,
+59,
+59,
+60,
+59,
+60,
+59,
+60,
+60,
+60,
+59,
+60,
+60,
+60,
+60,
+59,
+60,
+60,
+60,
+60,
+59,
+60,
+60,
+59,
+60,
+59,
+60,
+59,
+59,
+59,
+59,
+59,
+59,
+59,
+58,
+59,
+58,
+58,
+58,
+58,
+57,
+58,
+57,
+57,
+57,
+57,
+55,
+57,
+56,
+56,
+55,
+56,
+55,
+55,
+54,
+55,
+54,
+54,
+54,
+53,
+53,
+53,
+52,
+53,
+52,
+51,
+52,
+51,
+50,
+51,
+50,
+49,
+50,
+49,
+48,
+49,
+48,
+47,
+47,
+47,
+47,
+46,
+46,
+45,
+45,
+45,
+44,
+44,
+43,
+43,
+42,
+43,
+41,
+42,
+40,
+41,
+40,
+39,
+40,
+38,
+39,
+37,
+38,
+37,
+36,
+36,
+35,
+36,
+34,
+34,
+34,
+33,
+33,
+32,
+32,
+31,
+31,
+30,
+30,
+29,
+29,
+28,
+28,
+27,
+27,
+26,
+26,
+25,
+25,
+24,
+24,
+24,
+22,
+23,
+21,
+21,
+21,
+20,
+20,
+19,
+19,
+18,
+18,
+17,
+16,
+16,
+16,
+15,
+14,
+14,
+14,
+13,
+12,
+12,
+11,
+11,
+11,
+9,
+10,
+8,
+9,
+7,
+8,
+6,
+7,
+5,
+5,
+5,
+4,
+4,
+3,
+3,
+2,
+1,
+1,
+1,
+0,
+0,
+-1,
+-1,
+-2,
+-3,
+-3,
+-3,
+-4,
+-4,
+-5,
+-5,
+-6,
+-6,
+-7,
+-7,
+-8,
+-8,
+-8,
+-9,
+-10,
+-10,
+-10,
+-11,
+-11,
+-12,
+-12,
+-13,
+-13,
+-14,
+-14,
+-14,
+-15,
+-15,
+-16,
+-16,
+-16,
+-17,
+-18,
+-17,
+-18,
+-19,
+-19,
+-19,
+-20,
+-20,
+-21,
+-20,
+-22,
+-21,
+-22,
+-23,
+-22,
+-23,
+-24,
+-23,
+-25,
+-24,
+-25,
+-25,
+-25,
+-26,
+-26,
+-27,
+-26,
+-27,
+-28,
+-27,
+-28,
+-28,
+-29,
+-29,
+-29,
+-29,
+-30,
+-30,
+-30,
+-30,
+-31,
+-31,
+-31,
+-31,
+-32,
+-32,
+-32,
+-32,
+-33,
+-33,
+-33,
+-33,
+-33,
+-34,
+-34,
+-34,
+-34,
+-34,
+-35,
+-34,
+-35,
+-35,
+-35,
+-36,
+-35,
+-36,
+-35,
+-36,
+-36,
+-36,
+-37,
+-36,
+-36,
+-37,
+-37,
+-36,
+-37,
+-37,
+-37,
+-37,
+-37,
+-38,
+-37,
+-37,
+-38,
+-37,
+-38,
+-37,
+-38,
+-37,
+-38,
+-38,
+-37,
+-38,
+-38,
+-37,
+-38,
+-38,
+-37,
+-38,
+-38,
+-37,
+-38,
+-37,
+-38,
+-37,
+-38,
+-37,
+-38,
+-37,
+-37,
+-37,
+-37,
+-37,
+-37,
+-37,
+-37,
+-35,
+-37,
+-36,
+-37,
+-36,
+-36,
+-36,
+-36,
+-36,
+-35,
+-36,
+-35,
+-36,
+-35,
+-35,
+-34,
+-35,
+-34,
+-35,
+-34,
+-34,
+-34,
+-33,
+-34,
+-33,
+-33,
+-33,
+-32,
+-33,
+-32,
+-32,
+-32,
+-32,
+-31,
+-31,
+-31,
+-31,
+-31,
+-30,
+-30,
+-30,
+-29,
+-30,
+-29,
+-29,
+-28,
+-28,
+-29,
+-27,
+-28,
+-27,
+-27,
+-27,
+-26,
+-27,
+-25,
+-26,
+-25,
+-26,
+-24,
+-25,
+-24,
+-24,
+-23,
+-24,
+-23,
+-22,
+-23,
+-22,
+-22,
+-21,
+-21,
+-21,
+-21,
+-20,
+-20,
+-19,
+-19,
+-19,
+-19,
+-18,
+-18,
+-18,
+-17,
+-17,
+-17,
+-16,
+-16,
+-15,
+-16,
+-14,
+-15,
+-14,
+-14,
+-14,
+-13,
+-13,
+-12,
+-12,
+-12,
+-12,
+-11,
+-10,
+-11,
+-10,
+-10,
+-9,
+-9,
+-9,
+-8,
+-8,
+-8,
+-7,
+-7,
+-6,
+-6,
+-6,
+-6,
+-5,
+-5,
+-4,
+-4,
+-4,
+-3,
+-3,
+-3,
+-2,
+-2,
+-2,
+-1,
+-1,
+-1,
+0,
+0,
+0,
+1,
+1,
+2,
+1,
+3,
+2,
+3,
+3,
+4,
+3,
+4,
+5,
+5,
+5,
+5,
+6,
+6,
+7,
+6,
+8,
+7,
+8,
+8,
+8,
+9,
+9,
+9,
+10,
+9,
+11,
+10,
+11,
+11,
+11,
+12,
+12,
+12,
+13,
+13,
+13,
+13,
+14,
+14,
+14,
+14,
+15,
+15,
+15,
+16,
+16,
+16,
+16,
+17,
+16,
+18,
+17,
+17,
+18,
+18,
+18,
+19,
+19,
+19,
+19,
+19,
+20,
+19,
+20,
+21,
+20,
+21,
+21,
+21,
+21,
+21,
+22,
+22,
+22,
+22,
+22,
+23,
+22,
+23,
+23,
+23,
+23,
+24,
+24,
+23,
+24,
+24,
+24,
+25,
+24,
+25,
+24,
+25,
+25,
+25,
+25,
+26,
+25,
+26,
+25,
+26,
+26,
+25,
+26,
+26,
+26,
+27,
+26,
+26,
+27,
+26,
+27,
+26,
+27,
+26,
+27,
+27,
+27,
+26,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+27,
+26,
+27,
+27,
+27,
+27,
+26,
+27,
+27,
+26,
+26,
+26,
+27,
+26,
+26,
+27,
+26,
+26,
+26,
+26,
+26,
+26,
+25,
+26,
+25,
+26,
+25,
+25,
+25,
+25,
+25,
+25,
+25,
+24,
+24,
+25,
+24,
+24,
+24,
+23,
+24,
+24,
+23,
+23,
+23,
+23,
+23,
+22,
+23,
+22,
+22,
+22,
+22,
+21,
+22,
+21,
+21,
+21,
+21,
+20,
+20,
+21,
+20,
+19,
+20,
+19,
+19,
+19,
+19,
+19,
+18,
+18,
+18,
+18,
+18,
+17,
+17,
+17,
+17,
+16,
+16,
+16,
+16,
+16,
+15,
+15,
+15,
+14,
+15,
+14,
+14,
+14,
+13,
+13,
+13,
+13,
+12,
+13,
+12,
+11,
+12,
+11,
+11,
+11,
+10,
+11,
+10,
+9,
+10,
+9,
+9,
+9,
+8,
+9,
+8,
+7,
+8,
+7,
+7,
+7,
+6,
+6,
+6,
+6,
+5,
+5,
+5,
+5,
+4,
+4,
+4,
+3,
+4,
+3,
+3,
+2,
+2,
+2,
+2,
+2,
+1,
+1,
+0,
+1,
+0,
+0,
+0,
+-1,
+-1,
+-1,
+-1,
+-2,
+-2,
+-2,
+-2,
+-3,
+-2,
+-4,
+-3,
+-3,
+-4,
+-4,
+-5,
+-4,
+-5,
+-5,
+-5,
+-6,
+-6,
+-6,
+-6,
+-7,
+-6,
+-7,
+-7,
+-8,
+-7,
+-8,
+-8,
+-9,
+-8,
+-9,
+-9,
+-9,
+-10,
+-9,
+-10,
+-10,
+-10,
+-11,
+-10,
+-11,
+-11,
+-12,
+-11,
+-12,
+-12,
+-12,
+-12,
+-13,
+-12,
+-13,
+-13,
+-13,
+-14,
+-13,
+-14,
+-14,
+-14,
+-14,
+-15,
+-14,
+-15,
+-15,
+-15,
+-15,
+-16,
+-15,
+-16,
+-16,
+-16,
+-16,
+-16,
+-17,
+-16,
+-17,
+-17,
+-17,
+-17,
+-17,
+-18,
+-17,
+-18,
+-18,
+-17,
+-18,
+-18,
+-19,
+-18,
+-18,
+-19,
+-18,
+-19,
+-19,
+-19,
+-19,
+-19,
+-19,
+-19,
+-19,
+-20,
+-19,
+-20,
+-19,
+-20,
+-20,
+-20,
+-19,
+-20,
+-20,
+-20,
+-20,
+-20,
+-21,
+-20,
+-20,
+-20,
+-21,
+-20,
+-20,
+-21,
+-20,
+-21,
+-20,
+-20,
+-21,
+-20,
+-21,
+-20,
+-21,
+-20,
+-21,
+-20,
+-21,
+-21,
+-20,
+-20,
+-21,
+-20,
+-21,
+-20,
+-21,
+-20,
+-20,
+-20,
+-20,
+-20,
+-20,
+-20,
+-20,
+-20,
+-20,
+-20,
+-20,
+-20,
+-20,
+-19,
+-20,
+-20,
+-19,
+-20,
+-19,
+-19,
+-19,
+-20,
+-19,
+-19,
+-18,
+-19,
+-19,
+-19,
+-18,
+-18,
+-19,
+-18,
+-18,
+-18,
+-18,
+-18,
+-18,
+-17,
+-18,
+-17,
+-17,
+-17,
+-17,
+-17,
+-17,
+-16,
+-17,
+-16,
+-16,
+-17,
+-15,
+-16,
+-16,
+-15,
+-16,
+-15,
+-15,
+-15,
+-15,
+-15,
+-14,
+-14,
+-15,
+-14,
+-13,
+-14,
+-14,
+-13,
+-13,
+-13,
+-13,
+-13,
+-13,
+-12,
+-12,
+-12,
+-12,
+-12,
+-11,
+-12,
+-11,
+-11,
+-11,
+-10,
+-11,
+-10,
+-10,
+-10,
+-9,
+-10,
+-9,
+-9,
+-9,
+-9,
+-9,
+-8,
+-8,
+-8,
+-8,
+-8,
+-7,
+-7,
+-7,
+-7,
+-7,
+-6,
+-6,
+-6,
+-6,
+-6,
+-5,
+-5,
+-6,
+-4,
+-5,
+-4,
+-5,
+-4,
+-4,
+-3,
+-4,
+-3,
+-3,
+-3,
+-2,
+-3,
+-2,
+-2,
+-2,
+-1,
+-2,
+-1,
+-1,
+-1,
+0,
+-1,
+0,
+0,
+0,
+1,
+0,
+1,
+1,
+1,
+1,
+2,
+2,
+2,
+2,
+2,
+3,
+3,
+2,
+4,
+3,
+3,
+4,
+4,
+4,
+4,
+5,
+4,
+5,
+5,
+5,
+6,
+5,
+6,
+6,
+6,
+6,
+7,
+6,
+7,
+7,
+7,
+7,
+8,
+7,
+8,
+8,
+8,
+8,
+9,
+8,
+9,
+9,
+9,
+9,
+10,
+9,
+10,
+10,
+10,
+10,
+10,
+11,
+10,
+11,
+11,
+11,
+11,
+11,
+11,
+12,
+11,
+12,
+12,
+12,
+12,
+12,
+13,
+12,
+13,
+13,
+12,
+13,
+13,
+14,
+13,
+13,
+14,
+13,
+14,
+14,
+13,
+14,
+14,
+15,
+14,
+14,
+14,
+15,
+14,
+15,
+15,
+14,
+15,
+15,
+15,
+15,
+15,
+16,
+15,
+15,
+15,
+16,
+15,
+16,
+15,
+16,
+15,
+16,
+16,
+16,
+15,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+17,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+16,
+15,
+16,
+16,
+16,
+16,
+16,
+15,
+16,
+16,
+15,
+16,
+16,
+15,
+15,
+16,
+15,
+16,
+15,
+15,
+15,
+15,
+15,
+15,
+15,
+15,
+15,
+14,
+15,
+14,
+15,
+14,
+14,
+15,
+14,
+14,
+14,
+14,
+13,
+14,
+14,
+13,
+13,
+14,
+13,
+13,
+13,
+13,
+13,
+12,
+13,
+12,
+13,
+12,
+12,
+12,
+12,
+12,
+12,
+11,
+12,
+11,
+11,
+11,
+11,
+11,
+11,
+10,
+11,
+10,
+10,
+10,
+10,
+10,
+10,
+9,
+10,
+9,
+9,
+9,
+9,
+8,
+9,
+8,
+9,
+8,
+8,
+8,
+7,
+8,
+7,
+7,
+7,
+7,
+7,
+7,
+6,
+7,
+6,
+6,
+6,
+5,
+6,
+5,
+5,
+6,
+4,
+5,
+5,
+4,
+5,
+4,
+4,
+4,
+3,
+4,
+3,
+3,
+3,
+3,
+3,
+2,
+3,
+2,
+2,
+2,
+2,
+1,
+2,
+1,
+1,
+1,
+1,
+1,
+0,
+0,
+1,
+0,
+-1,
+0,
+0,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-1,
+-2,
+-2,
+-2,
+-2,
+-2,
+-3,
+-2,
+-3,
+-3,
+-3,
+-3,
+-4,
+-3,
+-4,
+-4,
+-4,
+-4,
+-4,
+-5,
+-4,
+-5,
+-5,
+-5,
+-5,
+-5,
+-6,
+-5,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-7,
+-6,
+-7,
+-7,
+-7,
+-7,
+-7,
+-7,
+-8,
+-8,
+-7,
+-8,
+-8,
+-8,
+-8,
+-9,
+-8,
+-9,
+-8,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-10,
+-9,
+-10,
+-9,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-11,
+-10,
+-11,
+-10,
+-11,
+-11,
+-11,
+-10,
+-11,
+-11,
+-12,
+-11,
+-11,
+-11,
+-12,
+-11,
+-12,
+-12,
+-11,
+-12,
+-12,
+-12,
+-11,
+-12,
+-12,
+-13,
+-12,
+-12,
+-12,
+-12,
+-13,
+-12,
+-12,
+-13,
+-12,
+-13,
+-12,
+-13,
+-12,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-13,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-13,
+-13,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-13,
+-11,
+-13,
+-13,
+-12,
+-13,
+-13,
+-12,
+-13,
+-12,
+-13,
+-12,
+-13,
+-12,
+-13,
+-12,
+-12,
+-13,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-11,
+-12,
+-12,
+-11,
+-12,
+-11,
+-11,
+-12,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-10,
+-11,
+-10,
+-11,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-9,
+-10,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-8,
+-9,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-7,
+-7,
+-8,
+-7,
+-7,
+-7,
+-7,
+-6,
+-7,
+-7,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-5,
+-6,
+-5,
+-5,
+-5,
+-5,
+-5,
+-4,
+-5,
+-4,
+-5,
+-4,
+-4,
+-4,
+-4,
+-3,
+-4,
+-3,
+-4,
+-3,
+-3,
+-3,
+-3,
+-2,
+-3,
+-2,
+-2,
+-3,
+-2,
+-1,
+-2,
+-2,
+-1,
+-2,
+-1,
+-1,
+-1,
+-1,
+-1,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+1,
+1,
+0,
+2,
+1,
+1,
+1,
+2,
+2,
+1,
+2,
+2,
+3,
+2,
+2,
+3,
+2,
+3,
+3,
+3,
+3,
+3,
+4,
+3,
+4,
+4,
+3,
+4,
+4,
+4,
+5,
+4,
+5,
+4,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+6,
+5,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+6,
+7,
+6,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+7,
+8,
+7,
+8,
+8,
+7,
+8,
+8,
+8,
+8,
+8,
+8,
+9,
+8,
+9,
+8,
+9,
+8,
+9,
+9,
+8,
+9,
+9,
+9,
+9,
+9,
+10,
+9,
+9,
+9,
+10,
+9,
+10,
+9,
+10,
+10,
+9,
+10,
+10,
+9,
+10,
+10,
+10,
+10,
+10,
+10,
+10,
+10,
+10,
+10,
+11,
+10,
+10,
+10,
+10,
+11,
+10,
+10,
+11,
+10,
+10,
+11,
+10,
+10,
+11,
+10,
+10,
+11,
+10,
+11,
+10,
+11,
+10,
+10,
+11,
+10,
+10,
+11,
+10,
+11,
+10,
+10,
+10,
+10,
+10,
+10,
+11,
+10,
+10,
+10,
+10,
+11,
+10,
+10,
+10,
+10,
+10,
+10,
+10,
+10,
+9,
+10,
+10,
+10,
+9,
+10,
+10,
+9,
+10,
+9,
+10,
+9,
+9,
+10,
+9,
+9,
+9,
+9,
+9,
+9,
+9,
+9,
+9,
+8,
+9,
+9,
+8,
+9,
+8,
+8,
+9,
+8,
+8,
+8,
+8,
+8,
+8,
+7,
+8,
+8,
+7,
+8,
+7,
+7,
+8,
+7,
+7,
+7,
+7,
+6,
+7,
+7,
+6,
+7,
+6,
+7,
+6,
+6,
+6,
+6,
+6,
+6,
+5,
+6,
+5,
+6,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+4,
+5,
+4,
+5,
+4,
+4,
+4,
+4,
+4,
+4,
+3,
+4,
+3,
+4,
+3,
+3,
+3,
+3,
+3,
+3,
+2,
+3,
+2,
+2,
+3,
+2,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-3,
+-2,
+-3,
+-2,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-4,
+-3,
+-4,
+-3,
+-4,
+-4,
+-3,
+-4,
+-4,
+-5,
+-4,
+-4,
+-4,
+-5,
+-4,
+-5,
+-5,
+-5,
+-4,
+-5,
+-5,
+-6,
+-5,
+-5,
+-5,
+-6,
+-5,
+-6,
+-5,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-7,
+-6,
+-6,
+-7,
+-6,
+-7,
+-7,
+-6,
+-7,
+-7,
+-7,
+-7,
+-7,
+-7,
+-7,
+-7,
+-8,
+-7,
+-7,
+-8,
+-7,
+-8,
+-7,
+-8,
+-7,
+-8,
+-7,
+-8,
+-8,
+-8,
+-8,
+-7,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-9,
+-8,
+-8,
+-8,
+-8,
+-9,
+-8,
+-8,
+-8,
+-9,
+-8,
+-8,
+-9,
+-8,
+-9,
+-8,
+-8,
+-9,
+-8,
+-9,
+-8,
+-9,
+-8,
+-8,
+-9,
+-8,
+-9,
+-8,
+-9,
+-8,
+-9,
+-8,
+-8,
+-9,
+-8,
+-9,
+-8,
+-7,
+-9,
+-8,
+-8,
+-9,
+-8,
+-8,
+-9,
+-8,
+-8,
+-8,
+-8,
+-8,
+-9,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-8,
+-7,
+-8,
+-8,
+-8,
+-7,
+-8,
+-8,
+-7,
+-8,
+-7,
+-8,
+-7,
+-8,
+-7,
+-7,
+-7,
+-8,
+-7,
+-7,
+-7,
+-7,
+-7,
+-7,
+-7,
+-6,
+-7,
+-7,
+-6,
+-7,
+-7,
+-6,
+-6,
+-7,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-5,
+-6,
+-5,
+-6,
+-5,
+-5,
+-6,
+-5,
+-5,
+-5,
+-5,
+-5,
+-4,
+-5,
+-5,
+-4,
+-5,
+-4,
+-5,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-3,
+-4,
+-3,
+-4,
+-3,
+-3,
+-3,
+-4,
+-3,
+-2,
+-3,
+-3,
+-3,
+-2,
+-3,
+-2,
+-3,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-1,
+-2,
+-1,
+-2,
+-1,
+-1,
+-1,
+-2,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+2,
+1,
+2,
+1,
+2,
+2,
+2,
+1,
+2,
+2,
+3,
+2,
+2,
+2,
+3,
+2,
+3,
+3,
+2,
+3,
+3,
+3,
+3,
+3,
+3,
+4,
+3,
+3,
+4,
+3,
+4,
+3,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+5,
+4,
+4,
+5,
+5,
+4,
+5,
+5,
+4,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+6,
+5,
+5,
+5,
+6,
+5,
+6,
+5,
+6,
+6,
+5,
+6,
+6,
+6,
+5,
+6,
+6,
+6,
+6,
+6,
+6,
+7,
+6,
+6,
+6,
+6,
+7,
+6,
+6,
+7,
+6,
+7,
+6,
+6,
+7,
+7,
+6,
+7,
+6,
+7,
+6,
+7,
+7,
+7,
+6,
+7,
+7,
+6,
+7,
+7,
+7,
+7,
+6,
+7,
+7,
+7,
+7,
+7,
+6,
+7,
+7,
+7,
+7,
+7,
+7,
+6,
+7,
+7,
+7,
+7,
+7,
+7,
+6,
+7,
+7,
+6,
+7,
+6,
+7,
+7,
+7,
+6,
+7,
+7,
+6,
+7,
+7,
+6,
+7,
+7,
+6,
+7,
+6,
+7,
+6,
+7,
+6,
+6,
+7,
+6,
+6,
+7,
+6,
+6,
+6,
+6,
+6,
+7,
+6,
+6,
+6,
+6,
+5,
+6,
+6,
+6,
+6,
+5,
+6,
+6,
+5,
+6,
+5,
+6,
+5,
+5,
+6,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+5,
+4,
+5,
+4,
+5,
+4,
+5,
+4,
+4,
+4,
+5,
+4,
+4,
+4,
+4,
+3,
+4,
+4,
+4,
+3,
+4,
+3,
+4,
+3,
+3,
+4,
+3,
+3,
+3,
+3,
+3,
+3,
+2,
+3,
+3,
+2,
+3,
+2,
+3,
+2,
+2,
+3,
+2,
+2,
+2,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+1,
+2,
+1,
+1,
+1,
+2,
+1,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-2,
+-2,
+-1,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-3,
+-2,
+-3,
+-2,
+-3,
+-3,
+-2,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-4,
+-3,
+-3,
+-4,
+-3,
+-4,
+-3,
+-4,
+-3,
+-4,
+-4,
+-3,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-5,
+-4,
+-4,
+-5,
+-4,
+-4,
+-5,
+-4,
+-5,
+-4,
+-5,
+-5,
+-4,
+-5,
+-5,
+-4,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-6,
+-5,
+-5,
+-5,
+-5,
+-6,
+-5,
+-5,
+-6,
+-5,
+-5,
+-6,
+-5,
+-6,
+-5,
+-6,
+-5,
+-6,
+-5,
+-5,
+-6,
+-6,
+-5,
+-6,
+-5,
+-6,
+-5,
+-6,
+-5,
+-6,
+-5,
+-6,
+-6,
+-5,
+-6,
+-5,
+-6,
+-5,
+-6,
+-5,
+-6,
+-6,
+-5,
+-6,
+-5,
+-5,
+-5,
+-6,
+-5,
+-6,
+-5,
+-6,
+-5,
+-5,
+-6,
+-5,
+-6,
+-5,
+-5,
+-6,
+-5,
+-5,
+-6,
+-5,
+-5,
+-5,
+-6,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-4,
+-5,
+-5,
+-5,
+-4,
+-5,
+-5,
+-4,
+-5,
+-4,
+-5,
+-4,
+-4,
+-5,
+-4,
+-4,
+-5,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-4,
+-3,
+-4,
+-4,
+-3,
+-4,
+-4,
+-3,
+-4,
+-3,
+-3,
+-4,
+-3,
+-3,
+-3,
+-4,
+-3,
+-3,
+-3,
+-3,
+-3,
+-2,
+-3,
+-3,
+-3,
+-2,
+-3,
+-2,
+-3,
+-2,
+-3,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-1,
+-2,
+-2,
+-1,
+-2,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+1,
+2,
+1,
+1,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+2,
+1,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+3,
+2,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+3,
+4,
+3,
+3,
+4,
+3,
+4,
+3,
+4,
+3,
+4,
+3,
+4,
+4,
+3,
+4,
+4,
+4,
+4,
+3,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+5,
+4,
+4,
+4,
+4,
+5,
+4,
+4,
+4,
+5,
+4,
+4,
+5,
+4,
+4,
+5,
+4,
+5,
+4,
+4,
+5,
+4,
+5,
+4,
+5,
+4,
+4,
+5,
+4,
+5,
+4,
+5,
+4,
+5,
+4,
+5,
+4,
+5,
+4,
+5,
+4,
+5,
+4,
+5,
+4,
+5,
+4,
+5,
+3,
+4,
+5,
+4,
+5,
+4,
+4,
+5,
+4,
+5,
+4,
+4,
+5,
+4,
+4,
+5,
+4,
+4,
+4,
+4,
+5,
+4,
+4,
+4,
+4,
+4,
+5,
+4,
+4,
+4,
+4,
+4,
+4,
+4,
+3,
+4,
+4,
+4,
+4,
+4,
+3,
+4,
+4,
+4,
+3,
+4,
+4,
+3,
+4,
+3,
+4,
+3,
+3,
+4,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+2,
+3,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+1,
+2,
+1,
+1,
+2,
+1,
+1,
+1,
+2,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-2,
+-1,
+-2,
+-1,
+-2,
+-2,
+-2,
+-1,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-3,
+-2,
+-3,
+-2,
+-3,
+-2,
+-3,
+-2,
+-3,
+-2,
+-3,
+-3,
+-3,
+-2,
+-3,
+-3,
+-3,
+-3,
+-2,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-4,
+-3,
+-3,
+-3,
+-3,
+-4,
+-3,
+-3,
+-3,
+-4,
+-3,
+-3,
+-4,
+-3,
+-3,
+-4,
+-3,
+-3,
+-4,
+-3,
+-4,
+-3,
+-4,
+-3,
+-4,
+-3,
+-4,
+-3,
+-4,
+-3,
+-4,
+-3,
+-4,
+-3,
+-4,
+-4,
+-3,
+-4,
+-3,
+-4,
+-4,
+-3,
+-4,
+-3,
+-4,
+-4,
+-3,
+-4,
+-3,
+-4,
+-4,
+-3,
+-4,
+-3,
+-4,
+-3,
+-4,
+-4,
+-3,
+-3,
+-3,
+-4,
+-3,
+-4,
+-4,
+-3,
+-4,
+-3,
+-4,
+-3,
+-4,
+-3,
+-3,
+-4,
+-3,
+-4,
+-3,
+-4,
+-3,
+-3,
+-4,
+-3,
+-3,
+-4,
+-3,
+-3,
+-4,
+-3,
+-3,
+-3,
+-3,
+-4,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-3,
+-2,
+-3,
+-3,
+-3,
+-2,
+-3,
+-3,
+-2,
+-3,
+-2,
+-3,
+-2,
+-3,
+-2,
+-3,
+-2,
+-3,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-1,
+-2,
+-2,
+-2,
+-2,
+-1,
+-2,
+-2,
+-1,
+-2,
+-1,
+-2,
+-1,
+-2,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+2,
+1,
+1,
+1,
+2,
+1,
+1,
+2,
+1,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+2,
+1,
+2,
+2,
+2,
+1,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+3,
+2,
+2,
+2,
+3,
+2,
+2,
+3,
+2,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+3,
+2,
+3,
+2,
+3,
+3,
+2,
+3,
+3,
+3,
+2,
+3,
+3,
+2,
+3,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+3,
+3,
+3,
+2,
+2,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+2,
+3,
+3,
+2,
+3,
+3,
+2,
+3,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+2,
+3,
+2,
+2,
+3,
+2,
+2,
+3,
+2,
+2,
+2,
+2,
+2,
+3,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+1,
+2,
+2,
+2,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+1,
+2,
+1,
+1,
+2,
+1,
+1,
+1,
+1,
+2,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-2,
+-1,
+-2,
+-1,
+-2,
+-1,
+-2,
+-1,
+-2,
+-1,
+-2,
+-2,
+-1,
+-2,
+-2,
+-1,
+-2,
+-2,
+-2,
+-1,
+-2,
+-2,
+-2,
+-2,
+-1,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-3,
+-1,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-3,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-1,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-1,
+-2,
+-2,
+-2,
+-2,
+-1,
+-2,
+-2,
+-2,
+-1,
+-2,
+-2,
+-1,
+-2,
+-1,
+-2,
+-2,
+-1,
+-2,
+-1,
+-2,
+-1,
+-2,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+1,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+2,
+1,
+1,
+1,
+1,
+1,
+1,
+2,
+1,
+1,
+1,
+2,
+1,
+1,
+2,
+1,
+1,
+2,
+1,
+1,
+2,
+1,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+2,
+1,
+2,
+1,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+2,
+2,
+1,
+2,
+2,
+2,
+1,
+2,
+2,
+2,
+1,
+2,
+2,
+2,
+2,
+1,
+2,
+2,
+2,
+1,
+2,
+2,
+2,
+1,
+2,
+2,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+2,
+1,
+2,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+1,
+2,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+1,
+2,
+1,
+2,
+1,
+1,
+2,
+1,
+1,
+2,
+1,
+1,
+2,
+1,
+1,
+1,
+2,
+1,
+1,
+1,
+1,
+1,
+2,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+1,
+0,
+1,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+2,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+1,
+0,
+1,
+1,
+0,
+1,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0};
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/master_port.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/master_port.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/master_port.c	(revision 1163)
@@ -0,0 +1,294 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/master_port.h>
+#include <pjmedia/clock.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/lock.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+
+struct pjmedia_master_port
+{
+    unsigned	     options;
+    pjmedia_clock   *clock;
+    pjmedia_port    *u_port;
+    pjmedia_port    *d_port;
+    unsigned	     buff_size;
+    void	    *buff;
+    pj_lock_t	    *lock;
+};
+
+
+static void clock_callback(const pj_timestamp *ts, void *user_data);
+
+
+/*
+ * Create a master port.
+ *
+ */
+PJ_DEF(pj_status_t) pjmedia_master_port_create( pj_pool_t *pool,
+						pjmedia_port *u_port,
+						pjmedia_port *d_port,
+						unsigned options,
+						pjmedia_master_port **p_m)
+{
+    pjmedia_master_port *m;
+    unsigned clock_rate;
+    unsigned samples_per_frame;
+    unsigned bytes_per_frame;
+    pj_status_t status;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(pool && u_port && d_port && p_m, PJ_EINVAL);
+
+
+    /* Both ports MUST have equal clock rate */
+    PJ_ASSERT_RETURN(u_port->info.clock_rate == d_port->info.clock_rate,
+		     PJMEDIA_ENCCLOCKRATE);
+
+    /* Both ports MUST have equal ptime */
+    PJ_ASSERT_RETURN(u_port->info.clock_rate/u_port->info.samples_per_frame==
+		     d_port->info.clock_rate/d_port->info.samples_per_frame,
+		     PJMEDIA_ENCSAMPLESPFRAME);
+
+
+    /* Get clock_rate and samples_per_frame from one of the port. */
+    clock_rate = u_port->info.clock_rate;
+    samples_per_frame = u_port->info.samples_per_frame;
+
+
+    /* Get the bytes_per_frame value, to determine the size of the
+     * buffer. We take the larger size of the two ports.
+     */
+    bytes_per_frame = u_port->info.bytes_per_frame;
+    if (d_port->info.bytes_per_frame > bytes_per_frame)
+	bytes_per_frame = d_port->info.bytes_per_frame;
+
+
+    /* Create the master port instance */
+    m = pj_pool_zalloc(pool, sizeof(pjmedia_master_port));
+    m->options = options;
+    m->u_port = u_port;
+    m->d_port = d_port;
+
+    
+    /* Create buffer */
+    m->buff_size = bytes_per_frame;
+    m->buff = pj_pool_alloc(pool, m->buff_size);
+    if (!m->buff)
+	return PJ_ENOMEM;
+
+    /* Create lock object */
+    status = pj_lock_create_simple_mutex(pool, "mport", &m->lock);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create media clock */
+    status = pjmedia_clock_create(pool, clock_rate, samples_per_frame, 0,
+				  &clock_callback, m, &m->clock);
+    if (status != PJ_SUCCESS) {
+	pj_lock_destroy(m->lock);
+	return status;
+    }
+
+    /* Done */
+    *p_m = m;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Start the media flow.
+ */
+PJ_DEF(pj_status_t) pjmedia_master_port_start(pjmedia_master_port *m)
+{
+    PJ_ASSERT_RETURN(m && m->clock, PJ_EINVAL);
+    PJ_ASSERT_RETURN(m->u_port && m->d_port, PJ_EINVALIDOP);
+
+    return pjmedia_clock_start(m->clock);
+}
+
+
+/*
+ * Stop the media flow.
+ */
+PJ_DEF(pj_status_t) pjmedia_master_port_stop(pjmedia_master_port *m)
+{
+    PJ_ASSERT_RETURN(m && m->clock, PJ_EINVAL);
+    
+    return pjmedia_clock_stop(m->clock);
+}
+
+
+/*
+ * Callback to be called for each clock ticks.
+ */
+static void clock_callback(const pj_timestamp *ts, void *user_data)
+{
+    pjmedia_master_port *m = user_data;
+    pjmedia_frame frame;
+    pj_status_t status;
+
+    
+    /* Lock access to ports. */
+    pj_lock_acquire(m->lock);
+
+    /* Get frame from upstream port and pass it to downstream port */
+    pj_bzero(&frame, sizeof(frame));
+    frame.buf = m->buff;
+    frame.size = m->buff_size;
+    frame.timestamp.u64 = ts->u64;
+
+    status = pjmedia_port_get_frame(m->u_port, &frame);
+    if (status != PJ_SUCCESS)
+	frame.type = PJMEDIA_FRAME_TYPE_NONE;
+
+    status = pjmedia_port_put_frame(m->d_port, &frame);
+
+    /* Get frame from downstream port and pass it to upstream port */
+    pj_bzero(&frame, sizeof(frame));
+    frame.buf = m->buff;
+    frame.size = m->buff_size;
+    frame.timestamp.u64 = ts->u64;
+
+    status = pjmedia_port_get_frame(m->d_port, &frame);
+    if (status != PJ_SUCCESS)
+	frame.type = PJMEDIA_FRAME_TYPE_NONE;
+
+    status = pjmedia_port_put_frame(m->u_port, &frame);
+
+    /* Release lock */
+    pj_lock_release(m->lock);
+}
+
+
+/*
+ * Change the upstream port.
+ */
+PJ_DEF(pj_status_t) pjmedia_master_port_set_uport(pjmedia_master_port *m,
+						     pjmedia_port *port)
+{
+    PJ_ASSERT_RETURN(m && port, PJ_EINVAL);
+
+    /* If we have downstream port, make sure they have matching samples per
+     * frame.
+     */
+    if (m->d_port) {
+	PJ_ASSERT_RETURN(
+	    port->info.clock_rate/port->info.samples_per_frame==
+	    m->d_port->info.clock_rate/m->d_port->info.samples_per_frame,
+	    PJMEDIA_ENCSAMPLESPFRAME
+	);
+    }
+
+    pj_lock_acquire(m->lock);
+
+    m->u_port = port;
+
+    pj_lock_release(m->lock);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get the upstream port.
+ */
+PJ_DEF(pjmedia_port*) pjmedia_master_port_get_uport(pjmedia_master_port*m)
+{
+    PJ_ASSERT_RETURN(m, NULL);
+    return m->u_port;
+}
+
+
+/*
+ * Change the downstream port.
+ */
+PJ_DEF(pj_status_t) pjmedia_master_port_set_dport(pjmedia_master_port *m,
+						  pjmedia_port *port)
+{
+    PJ_ASSERT_RETURN(m && port, PJ_EINVAL);
+
+    /* If we have upstream port, make sure they have matching samples per
+     * frame.
+     */
+    if (m->u_port) {
+	PJ_ASSERT_RETURN(
+	    port->info.clock_rate/port->info.samples_per_frame==
+	    m->u_port->info.clock_rate/m->u_port->info.samples_per_frame,
+	    PJMEDIA_ENCSAMPLESPFRAME
+	);
+    }
+
+    pj_lock_acquire(m->lock);
+
+    m->d_port = port;
+
+    pj_lock_release(m->lock);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get the downstream port.
+ */
+PJ_DEF(pjmedia_port*) pjmedia_master_port_get_dport(pjmedia_master_port*m)
+{
+    PJ_ASSERT_RETURN(m, NULL);
+    return m->d_port;
+}
+
+
+/*
+ * Destroy the master port, and optionally destroy the u_port and 
+ * d_port ports.
+ */
+PJ_DEF(pj_status_t) pjmedia_master_port_destroy(pjmedia_master_port *m,
+						pj_bool_t destroy_ports)
+{
+    PJ_ASSERT_RETURN(m, PJ_EINVAL);
+
+    if (m->clock) {
+	pjmedia_clock_destroy(m->clock);
+	m->clock = NULL;
+    }
+
+    if (m->u_port && destroy_ports) {
+	pjmedia_port_destroy(m->u_port);
+	m->u_port = NULL;
+    }
+
+    if (m->d_port && destroy_ports) {
+	pjmedia_port_destroy(m->d_port);
+	m->d_port = NULL;
+    }
+
+    if (m->lock) {
+	pj_lock_destroy(m->lock);
+	m->lock = NULL;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/mem_capture.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/mem_capture.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/mem_capture.c	(revision 1163)
@@ -0,0 +1,235 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/mem_port.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+#include <pj/pool.h>
+
+
+#define THIS_FILE	    "mem_capture.c"
+
+#define SIGNATURE	    PJMEDIA_PORT_SIGNATURE('M', 'R', 'e', 'c')
+#define BYTES_PER_SAMPLE    2
+
+struct mem_rec
+{
+    pjmedia_port     base;
+
+    unsigned	     options;
+
+    char	    *buffer;
+    pj_size_t	     buf_size;
+    char	    *write_pos;
+
+    pj_bool_t        eof;
+    void	    *user_data;
+    pj_status_t    (*cb)(pjmedia_port *port,
+			 void *user_data);
+};
+
+
+static pj_status_t rec_put_frame(pjmedia_port *this_port, 
+				  const pjmedia_frame *frame);
+static pj_status_t rec_get_frame(pjmedia_port *this_port, 
+				  pjmedia_frame *frame);
+static pj_status_t rec_on_destroy(pjmedia_port *this_port);
+
+
+PJ_DECL(pj_status_t) pjmedia_mem_capture_create(pj_pool_t *pool,
+						void *buffer,
+						pj_size_t size,
+						unsigned clock_rate,
+						unsigned channel_count,
+						unsigned samples_per_frame,
+						unsigned bits_per_sample,
+						unsigned options,
+						pjmedia_port **p_port)
+{
+    struct mem_rec *rec;
+    const pj_str_t name = { "memrec", 6 };
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(pool && buffer && size && clock_rate && channel_count &&
+		     samples_per_frame && bits_per_sample && p_port,
+		     PJ_EINVAL);
+
+    /* Can only support 16bit PCM */
+    PJ_ASSERT_RETURN(bits_per_sample == 16, PJ_EINVAL);
+
+
+    rec = pj_pool_zalloc(pool, sizeof(struct mem_rec));
+    PJ_ASSERT_RETURN(rec != NULL, PJ_ENOMEM);
+
+    /* Create the rec */
+    pjmedia_port_info_init(&rec->base.info, &name, SIGNATURE,
+			   clock_rate, channel_count, bits_per_sample, 
+			   samples_per_frame);
+
+
+    rec->base.put_frame = &rec_put_frame;
+    rec->base.get_frame = &rec_get_frame;
+    rec->base.on_destroy = &rec_on_destroy;
+
+
+    /* Save the buffer */
+    rec->buffer = rec->write_pos = (char*)buffer;
+    rec->buf_size = size;
+
+    /* Options */
+    rec->options = options;
+
+    *p_port = &rec->base;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Register a callback to be called when the file reading has reached the
+ * end of buffer.
+ */
+PJ_DEF(pj_status_t)
+pjmedia_mem_capture_set_eof_cb( pjmedia_port *port,
+				void *user_data,
+				pj_status_t (*cb)(pjmedia_port *port,
+						  void *usr_data))
+{
+    struct mem_rec *rec;
+
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE,
+		     PJ_EINVALIDOP);
+
+    rec = (struct mem_rec*) port;
+    rec->user_data = user_data;
+    rec->cb = cb;
+
+    return PJ_SUCCESS;
+} 
+
+
+/* Get current buffer size */
+PJ_DEF(pj_size_t) pjmedia_mem_capture_get_size(pjmedia_port *port)
+{
+    struct mem_rec *rec;
+
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE,
+                     0);
+
+    rec = (struct mem_rec*) port;
+    if (rec->eof){
+        return rec->buf_size;
+    }
+    return rec->write_pos - rec->buffer;
+}
+
+
+static pj_status_t rec_put_frame( pjmedia_port *this_port, 
+				  const pjmedia_frame *frame)
+{
+    struct mem_rec *rec;
+    char *endpos;
+    pj_size_t size_written;
+
+    PJ_ASSERT_RETURN(this_port->info.signature == SIGNATURE,
+		     PJ_EINVALIDOP);
+
+    rec = (struct mem_rec*) this_port;
+
+    if (rec->eof) {
+	return PJ_EEOF;
+    }
+ 
+    size_written = 0;
+    endpos = rec->buffer + rec->buf_size;
+
+    while (size_written < frame->size) {
+	pj_size_t max;
+	
+	max = frame->size - size_written;
+	if ((endpos - rec->write_pos) < (int)max)
+	    max = endpos - rec->write_pos;
+	
+	pj_memcpy(rec->write_pos, ((char*)frame->buf)+size_written, max);
+	size_written += max;
+	rec->write_pos += max;
+	
+	pj_assert(rec->write_pos <= endpos);
+	
+        if (rec->write_pos == endpos) {
+	    
+	    /* Rewind */
+	    rec->write_pos = rec->buffer;
+	    
+	    /* Call callback, if any */
+            if (rec->cb) {
+		pj_status_t status;
+		
+		rec->eof = PJ_TRUE;
+		status = (*rec->cb)(this_port, rec->user_data);
+		if (status != PJ_SUCCESS) {
+		    /* Must not access recorder from here on. It may be
+		     * destroyed by application.
+		     */
+                    return status;
+		}
+		rec->eof = PJ_FALSE;
+	    }
+        } 
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t rec_get_frame( pjmedia_port *this_port, 
+				  pjmedia_frame *frame)
+{
+    PJ_ASSERT_RETURN(this_port->info.signature == SIGNATURE,
+		     PJ_EINVALIDOP);
+
+    PJ_UNUSED_ARG(this_port);
+
+    frame->size = 0;
+    frame->type = PJMEDIA_FRAME_TYPE_NONE;
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t rec_on_destroy(pjmedia_port *this_port)
+{
+    /* Call callback if data was captured
+     * and we're not in the callback already.
+     */
+    struct mem_rec *rec;
+
+    PJ_ASSERT_RETURN(this_port->info.signature == SIGNATURE,
+                     PJ_EINVALIDOP);
+
+    rec = (struct mem_rec*) this_port;
+
+    if(rec->cb && PJ_FALSE == rec->eof) {
+	rec->eof = PJ_TRUE;
+        (*rec->cb)(this_port, rec->user_data);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/mem_player.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/mem_player.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/mem_player.c	(revision 1163)
@@ -0,0 +1,212 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/mem_port.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+#include <pj/pool.h>
+
+
+#define THIS_FILE	    "mem_player.c"
+
+#define SIGNATURE	    PJMEDIA_PORT_SIGNATURE('M', 'P', 'l', 'y')
+#define BYTES_PER_SAMPLE    2
+
+struct mem_player
+{
+    pjmedia_port     base;
+
+    unsigned	     options;
+    pj_timestamp     timestamp;
+
+    char	    *buffer;
+    pj_size_t	     buf_size;
+    char	    *read_pos;
+
+    pj_bool_t	     eof;
+    void	    *user_data;
+    pj_status_t    (*cb)(pjmedia_port *port,
+			 void *user_data);
+
+};
+
+
+static pj_status_t mem_put_frame(pjmedia_port *this_port, 
+				  const pjmedia_frame *frame);
+static pj_status_t mem_get_frame(pjmedia_port *this_port, 
+				  pjmedia_frame *frame);
+static pj_status_t mem_on_destroy(pjmedia_port *this_port);
+
+
+PJ_DEF(pj_status_t) pjmedia_mem_player_create( pj_pool_t *pool,
+					       const void *buffer,
+					       pj_size_t size,
+					       unsigned clock_rate,
+					       unsigned channel_count,
+					       unsigned samples_per_frame,
+					       unsigned bits_per_sample,
+					       unsigned options,
+					       pjmedia_port **p_port )
+{
+    struct mem_player *port;
+    pj_str_t name = pj_str("memplayer");
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(pool && buffer && size && clock_rate && channel_count &&
+		     samples_per_frame && bits_per_sample && p_port,
+		     PJ_EINVAL);
+
+    /* Can only support 16bit PCM */
+    PJ_ASSERT_RETURN(bits_per_sample == 16, PJ_EINVAL);
+
+
+    port = pj_pool_zalloc(pool, sizeof(struct mem_player));
+    PJ_ASSERT_RETURN(port != NULL, PJ_ENOMEM);
+
+    /* Create the port */
+    pjmedia_port_info_init(&port->base.info, &name, SIGNATURE, clock_rate,
+			   channel_count, bits_per_sample, samples_per_frame);
+
+    port->base.put_frame = &mem_put_frame;
+    port->base.get_frame = &mem_get_frame;
+    port->base.on_destroy = &mem_on_destroy;
+
+
+    /* Save the buffer */
+    port->buffer = port->read_pos = (char*)buffer;
+    port->buf_size = size;
+
+    /* Options */
+    port->options = options;
+
+    *p_port = &port->base;
+
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * Register a callback to be called when the file reading has reached the
+ * end of buffer.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_mem_player_set_eof_cb( pjmedia_port *port,
+			       void *user_data,
+			       pj_status_t (*cb)(pjmedia_port *port,
+						 void *usr_data))
+{
+    struct mem_player *player;
+
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE,
+		     PJ_EINVALIDOP);
+
+    player = (struct mem_player*) port;
+    player->user_data = user_data;
+    player->cb = cb;
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t mem_put_frame( pjmedia_port *this_port, 
+				  const pjmedia_frame *frame)
+{
+    PJ_UNUSED_ARG(this_port);
+    PJ_UNUSED_ARG(frame);
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t mem_get_frame( pjmedia_port *this_port, 
+				  pjmedia_frame *frame)
+{
+    struct mem_player *player;
+    char *endpos;
+    pj_size_t size_needed, size_written;
+
+    PJ_ASSERT_RETURN(this_port->info.signature == SIGNATURE,
+		     PJ_EINVALIDOP);
+
+    player = (struct mem_player*) this_port;
+
+    if (player->eof) {
+	frame->type = PJMEDIA_FRAME_TYPE_NONE;
+	return PJ_EEOF;
+    }
+
+    size_needed = this_port->info.bytes_per_frame;
+    size_written = 0;
+    endpos = player->buffer + player->buf_size;
+
+    while (size_written < size_needed) {
+	char *dst = ((char*)frame->buf) + size_written;
+	pj_size_t max;
+	
+	max = size_needed - size_written;
+	if (endpos - player->read_pos < (int)max)
+	    max = endpos - player->read_pos;
+
+	pj_memcpy(dst, player->read_pos, max);
+	size_written += max;
+	player->read_pos += max;
+
+	pj_assert(player->read_pos <= endpos);
+
+	if (player->read_pos == endpos) {
+	    player->read_pos = player->buffer;
+
+	    /* Call callback, if any */
+	    if (player->cb) {
+		pj_status_t status;
+
+		player->eof = PJ_TRUE;
+		status = (*player->cb)(this_port, player->user_data);
+		if (status != PJ_SUCCESS) {
+		    /* Must not access player from here on. It may be
+		     * destroyed by application.
+		     */
+		    frame->size = size_written;
+		    frame->timestamp.u64 = player->timestamp.u64;
+		    frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
+		    return status;
+		}
+		player->eof = PJ_FALSE;
+	    }
+	}
+    }
+
+    frame->size = this_port->info.bytes_per_frame;
+    frame->timestamp.u64 = player->timestamp.u64;
+    frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
+
+    player->timestamp.u64 += this_port->info.samples_per_frame;
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t mem_on_destroy(pjmedia_port *this_port)
+{
+    /* Nothing to do */
+    PJ_UNUSED_ARG(this_port);
+    return PJ_SUCCESS;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/mp3_writer.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/mp3_writer.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/mp3_writer.c	(revision 1163)
@@ -0,0 +1,563 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/*
+ * Contributed by:
+ *  Toni < buldozer at aufbix dot org >
+ */
+#include <pjmedia/mp3_port.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/file_access.h>
+#include <pj/file_io.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/unicode.h>
+
+
+/* Include BladeDLL declarations */
+#include "BladeMP3EncDLL.h"
+
+
+#define THIS_FILE	    "mp3_writer.c"
+#define SIGNATURE	    PJMEDIA_PORT_SIGNATURE('F', 'W', 'M', '3')
+#define BYTES_PER_SAMPLE    2
+
+static struct BladeDLL
+{
+    void		*hModule;
+    int			 refCount;
+    BEINITSTREAM	 beInitStream;
+    BEENCODECHUNK	 beEncodeChunk;
+    BEDEINITSTREAM	 beDeinitStream;
+    BECLOSESTREAM	 beCloseStream;
+    BEVERSION		 beVersion;
+    BEWRITEVBRHEADER	 beWriteVBRHeader;
+    BEWRITEINFOTAG	 beWriteInfoTag;
+} BladeDLL;
+
+
+struct mp3_file_port
+{
+    pjmedia_port    base;
+    pj_size_t	    total;
+    pj_oshandle_t   fd;
+    pj_size_t	    cb_size;
+    pj_status_t	   (*cb)(pjmedia_port*, void*);
+
+    unsigned	    silence_duration;
+
+    pj_str_t			mp3_filename;
+    pjmedia_mp3_encoder_option  mp3_option;
+    unsigned		        mp3_samples_per_frame;
+    pj_int16_t		       *mp3_sample_buf;
+    unsigned			mp3_sample_pos;
+    HBE_STREAM		        mp3_stream;
+    unsigned char	       *mp3_buf;
+};
+
+
+static pj_status_t file_put_frame(pjmedia_port *this_port, 
+				  const pjmedia_frame *frame);
+static pj_status_t file_get_frame(pjmedia_port *this_port, 
+				  pjmedia_frame *frame);
+static pj_status_t file_on_destroy(pjmedia_port *this_port);
+
+
+#if defined(PJ_WIN32) || defined(_WIN32) || defined(WIN32)
+
+#include <windows.h>
+#define DLL_NAME    PJ_T("LAME_ENC.DLL")
+
+/*
+ * Load BladeEncoder DLL.
+ */
+static pj_status_t init_blade_dll(void)
+{
+    if (BladeDLL.refCount == 0) {
+	#define GET_PROC(type, name)  \
+	    BladeDLL.name = (type)GetProcAddress(BladeDLL.hModule, PJ_T(#name)); \
+	    if (BladeDLL.name == NULL) { \
+		PJ_LOG(1,(THIS_FILE, "Unable to find %s in %s", #name, DLL_NAME)); \
+		return PJ_RETURN_OS_ERROR(GetLastError()); \
+	    }
+
+	BE_VERSION beVersion;
+	BladeDLL.hModule = (void*)LoadLibrary(DLL_NAME);
+	if (BladeDLL.hModule == NULL) {
+	    pj_status_t status = PJ_RETURN_OS_ERROR(GetLastError());
+	    char errmsg[PJ_ERR_MSG_SIZE];
+
+	    pj_strerror(status, errmsg, sizeof(errmsg));
+	    PJ_LOG(1,(THIS_FILE, "Unable to load %s: %s", DLL_NAME, errmsg));
+	    return status;
+	}
+
+	GET_PROC(BEINITSTREAM, beInitStream);
+	GET_PROC(BEENCODECHUNK, beEncodeChunk);
+	GET_PROC(BEDEINITSTREAM, beDeinitStream);
+	GET_PROC(BECLOSESTREAM, beCloseStream);
+	GET_PROC(BEVERSION, beVersion);
+	GET_PROC(BEWRITEVBRHEADER, beWriteVBRHeader);
+	GET_PROC(BEWRITEINFOTAG, beWriteInfoTag);
+
+	#undef GET_PROC
+
+	BladeDLL.beVersion(&beVersion);
+	PJ_LOG(4,(THIS_FILE, "%s encoder v%d.%d loaded (%s)", DLL_NAME,
+		  beVersion.byMajorVersion, beVersion.byMinorVersion,
+		  beVersion.zHomepage));
+    }
+    ++BladeDLL.refCount;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Decrement the reference counter of the DLL.
+ */
+static void deinit_blade_dll()
+{
+    --BladeDLL.refCount;
+    if (BladeDLL.refCount == 0 && BladeDLL.hModule) {
+	FreeLibrary(BladeDLL.hModule);
+	BladeDLL.hModule = NULL;
+	PJ_LOG(4,(THIS_FILE, "%s unloaded", DLL_NAME));
+    }
+}
+
+#else
+
+static pj_status_t init_blade_dll(void)
+{
+    PJ_LOG(1,(THIS_FILE, "Error: MP3 writer port only works on Windows for now"));
+    return PJ_ENOTSUP;
+}
+
+static void deinit_blade_dll()
+{
+}
+#endif
+
+
+
+/*
+ * Initialize MP3 encoder.
+ */
+static pj_status_t init_mp3_encoder(struct mp3_file_port *fport,
+				    pj_pool_t *pool)
+{
+    BE_CONFIG LConfig;
+    unsigned  long InSamples;
+    unsigned  long OutBuffSize;
+    long MP3Err;
+
+    /*
+     * Initialize encoder configuration.
+     */
+    pj_bzero(&LConfig, sizeof(BE_CONFIG));
+    LConfig.dwConfig = BE_CONFIG_LAME;
+    LConfig.format.LHV1.dwStructVersion = 1;
+    LConfig.format.LHV1.dwStructSize = sizeof(BE_CONFIG);
+    LConfig.format.LHV1.dwSampleRate = fport->base.info.clock_rate;
+    LConfig.format.LHV1.dwReSampleRate = 0;
+
+    if (fport->base.info.channel_count==1)
+	LConfig.format.LHV1.nMode = BE_MP3_MODE_MONO;
+    else if (fport->base.info.channel_count==2)
+	LConfig.format.LHV1.nMode = BE_MP3_MODE_STEREO;
+    else
+	return PJMEDIA_ENCCHANNEL;
+
+    LConfig.format.LHV1.dwBitrate = fport->mp3_option.bit_rate / 1000;
+    LConfig.format.LHV1.nPreset = LQP_NOPRESET;
+    LConfig.format.LHV1.bCopyright = 0;
+    LConfig.format.LHV1.bCRC = 1;
+    LConfig.format.LHV1.bOriginal = 1;
+    LConfig.format.LHV1.bPrivate = 0;
+
+    if (!fport->mp3_option.vbr) {
+	LConfig.format.LHV1.nVbrMethod = VBR_METHOD_NONE;
+	LConfig.format.LHV1.bWriteVBRHeader = 0;
+	LConfig.format.LHV1.bEnableVBR = 0;
+    } else {
+	LConfig.format.LHV1.nVbrMethod = VBR_METHOD_DEFAULT;
+	LConfig.format.LHV1.bWriteVBRHeader = 1;
+	LConfig.format.LHV1.dwVbrAbr_bps = fport->mp3_option.bit_rate;
+	LConfig.format.LHV1.nVBRQuality =  (pj_uint16_t)
+					   fport->mp3_option.quality;
+	LConfig.format.LHV1.bEnableVBR = 1;
+    }
+
+    LConfig.format.LHV1.nQuality = (pj_uint16_t) 
+				   (((0-fport->mp3_option.quality-1)<<8) | 
+				    fport->mp3_option.quality);
+
+    /*
+     * Init MP3 stream.
+     */
+    InSamples = 0;
+    MP3Err = BladeDLL.beInitStream(&LConfig, &InSamples, &OutBuffSize,
+				   &fport->mp3_stream);
+    if (MP3Err != BE_ERR_SUCCESSFUL) 
+	return PJMEDIA_ERROR;
+
+    /*
+     * Allocate sample buffer.
+     */
+    fport->mp3_samples_per_frame = (unsigned)InSamples;
+    fport->mp3_sample_buf = pj_pool_alloc(pool, fport->mp3_samples_per_frame * 2);
+    if (!fport->mp3_sample_buf)
+	return PJ_ENOMEM;
+
+    /*
+     * Allocate encoded MP3 buffer.
+     */
+    fport->mp3_buf = pj_pool_alloc(pool, (pj_size_t)OutBuffSize);
+    if (fport->mp3_buf == NULL)
+	return PJ_ENOMEM;
+
+    
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create MP3 file writer port.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_mp3_writer_port_create( pj_pool_t *pool,
+				const char *filename,
+				unsigned sampling_rate,
+				unsigned channel_count,
+				unsigned samples_per_frame,
+				unsigned bits_per_sample,
+				const pjmedia_mp3_encoder_option *param_option,
+				pjmedia_port **p_port )
+{
+    struct mp3_file_port *fport;
+    pj_status_t status;
+
+    status = init_blade_dll();
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(pool && filename && p_port, PJ_EINVAL);
+
+    /* Only supports 16bits per sample for now. */
+    PJ_ASSERT_RETURN(bits_per_sample == 16, PJ_EINVAL);
+
+    /* Create file port instance. */
+    fport = pj_pool_zalloc(pool, sizeof(struct mp3_file_port));
+    PJ_ASSERT_RETURN(fport != NULL, PJ_ENOMEM);
+
+    /* Initialize port info. */
+    pj_strdup2_with_null(pool, &fport->mp3_filename, filename);
+    pjmedia_port_info_init(&fport->base.info, &fport->mp3_filename, SIGNATURE,
+			   sampling_rate, channel_count, bits_per_sample,
+			   samples_per_frame);
+
+    fport->base.get_frame = &file_get_frame;
+    fport->base.put_frame = &file_put_frame;
+    fport->base.on_destroy = &file_on_destroy;
+
+
+    /* Open file in write and read mode.
+     * We need the read mode because we'll modify the WAVE header once
+     * the recording has completed.
+     */
+    status = pj_file_open(pool, filename, PJ_O_WRONLY, &fport->fd);
+    if (status != PJ_SUCCESS) {
+	deinit_blade_dll();
+	return status;
+    }
+
+    /* Copy and initialize option with default settings */
+    if (param_option) {
+	pj_memcpy(&fport->mp3_option, param_option, 
+		   sizeof(pjmedia_mp3_encoder_option));
+    } else {
+	pj_bzero(&fport->mp3_option, sizeof(pjmedia_mp3_encoder_option));
+	fport->mp3_option.vbr = PJ_TRUE;
+    }
+
+    /* Calculate bitrate if it's not specified, only if it's not VBR. */
+    if (fport->mp3_option.bit_rate == 0 && !fport->mp3_option.vbr) 
+	fport->mp3_option.bit_rate = sampling_rate * channel_count;
+
+    /* Set default quality if it's not specified */
+    if (fport->mp3_option.quality == 0) 
+	fport->mp3_option.quality = 2;
+
+    /* Init mp3 encoder */
+    status = init_mp3_encoder(fport, pool);
+    if (status != PJ_SUCCESS) {
+	pj_file_close(fport->fd);
+	deinit_blade_dll();
+	return status;
+    }
+
+    /* Done. */
+    *p_port = &fport->base;
+
+    PJ_LOG(4,(THIS_FILE, 
+	      "MP3 file writer '%.*s' created: samp.rate=%dKHz, "
+	      "bitrate=%dkbps%s, quality=%d",
+	      (int)fport->base.info.name.slen,
+	      fport->base.info.name.ptr,
+	      fport->base.info.clock_rate/1000,
+	      fport->mp3_option.bit_rate/1000,
+	      (fport->mp3_option.vbr ? " (VBR)" : ""),
+	      fport->mp3_option.quality));
+
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * Register callback.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_mp3_writer_port_set_cb( pjmedia_port *port,
+				pj_size_t pos,
+				void *user_data,
+			        pj_status_t (*cb)(pjmedia_port *port,
+						  void *usr_data))
+{
+    struct mp3_file_port *fport;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(port && cb, PJ_EINVAL);
+
+    /* Check that this is really a writer port */
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, PJ_EINVALIDOP);
+
+    fport = (struct mp3_file_port*) port;
+
+    fport->cb_size = pos;
+    fport->base.port_data.pdata = user_data;
+    fport->cb = cb;
+
+    return PJ_SUCCESS;
+
+}
+
+
+/*
+ * Put a frame into the buffer. When the buffer is full, flush the buffer
+ * to the file.
+ */
+static pj_status_t file_put_frame(pjmedia_port *this_port, 
+				  const pjmedia_frame *frame)
+{
+    struct mp3_file_port *fport = (struct mp3_file_port *)this_port;
+    unsigned long MP3Err;
+    pj_ssize_t	bytes;
+    pj_status_t status;
+    unsigned long WriteSize;
+
+    /* Record silence if input is no-frame */
+    if (frame->type == PJMEDIA_FRAME_TYPE_NONE || frame->size == 0) {
+	unsigned samples_left = fport->base.info.samples_per_frame;
+	unsigned samples_copied = 0;
+
+	/* Only want to record at most 1 second of silence */
+	if (fport->silence_duration >= fport->base.info.clock_rate)
+	    return PJ_SUCCESS;
+
+	while (samples_left) {
+	    unsigned samples_needed = fport->mp3_samples_per_frame -
+				      fport->mp3_sample_pos;
+	    if (samples_needed > samples_left)
+		samples_needed = samples_left;
+
+	    pjmedia_zero_samples(fport->mp3_sample_buf + fport->mp3_sample_pos,
+				 samples_needed);
+	    fport->mp3_sample_pos += samples_needed;
+	    samples_left -= samples_needed;
+	    samples_copied += samples_needed;
+
+	    /* Encode if we have full frame */
+	    if (fport->mp3_sample_pos == fport->mp3_samples_per_frame) {
+		
+		/* Clear position */
+		fport->mp3_sample_pos = 0;
+
+		/* Encode ! */
+		MP3Err = BladeDLL.beEncodeChunk(fport->mp3_stream,
+						fport->mp3_samples_per_frame,
+						fport->mp3_sample_buf, 
+						fport->mp3_buf, 
+						&WriteSize);
+		if (MP3Err != BE_ERR_SUCCESSFUL)
+		    return PJMEDIA_ERROR;
+
+		/* Write the chunk */
+		bytes = WriteSize;
+		status = pj_file_write(fport->fd, fport->mp3_buf, &bytes);
+		if (status != PJ_SUCCESS)
+		    return status;
+
+		/* Increment total written. */
+		fport->total += bytes;
+	    }
+	}
+
+	fport->silence_duration += fport->base.info.samples_per_frame;
+
+    }
+    /* If encoder is expecting different sample size, then we need to
+     * buffer the samples.
+     */
+    else if (fport->mp3_samples_per_frame != 
+	     fport->base.info.samples_per_frame) 
+    {
+	unsigned samples_left = frame->size / 2;
+	unsigned samples_copied = 0;
+	const pj_int16_t *src_samples = frame->buf;
+
+	fport->silence_duration = 0;
+
+	while (samples_left) {
+	    unsigned samples_needed = fport->mp3_samples_per_frame -
+				      fport->mp3_sample_pos;
+	    if (samples_needed > samples_left)
+		samples_needed = samples_left;
+
+	    pjmedia_copy_samples(fport->mp3_sample_buf + fport->mp3_sample_pos,
+				 src_samples + samples_copied,
+				 samples_needed);
+	    fport->mp3_sample_pos += samples_needed;
+	    samples_left -= samples_needed;
+	    samples_copied += samples_needed;
+
+	    /* Encode if we have full frame */
+	    if (fport->mp3_sample_pos == fport->mp3_samples_per_frame) {
+		
+		/* Clear position */
+		fport->mp3_sample_pos = 0;
+
+		/* Encode ! */
+		MP3Err = BladeDLL.beEncodeChunk(fport->mp3_stream,
+						fport->mp3_samples_per_frame,
+						fport->mp3_sample_buf, 
+						fport->mp3_buf, 
+						&WriteSize);
+		if (MP3Err != BE_ERR_SUCCESSFUL)
+		    return PJMEDIA_ERROR;
+
+		/* Write the chunk */
+		bytes = WriteSize;
+		status = pj_file_write(fport->fd, fport->mp3_buf, &bytes);
+		if (status != PJ_SUCCESS)
+		    return status;
+
+		/* Increment total written. */
+		fport->total += bytes;
+	    }
+	}
+
+    } else {
+
+	fport->silence_duration = 0;
+
+	/* Encode ! */
+	MP3Err = BladeDLL.beEncodeChunk(fport->mp3_stream,
+					fport->mp3_samples_per_frame,
+					frame->buf, 
+					fport->mp3_buf, 
+					&WriteSize);
+	if (MP3Err != BE_ERR_SUCCESSFUL)
+	    return PJMEDIA_ERROR;
+
+	/* Write the chunk */
+	bytes = WriteSize;
+	status = pj_file_write(fport->fd, fport->mp3_buf, &bytes);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	/* Increment total written. */
+	fport->total += bytes;
+    }
+
+    /* Increment total written, and check if we need to call callback */
+    
+    if (fport->cb && fport->total >= fport->cb_size) {
+	pj_status_t (*cb)(pjmedia_port*, void*);
+	pj_status_t status;
+
+	cb = fport->cb;
+	fport->cb = NULL;
+
+	status = (*cb)(this_port, this_port->port_data.pdata);
+	return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Get frame, basicy is a no-op operation.
+ */
+static pj_status_t file_get_frame(pjmedia_port *this_port, 
+				  pjmedia_frame *frame)
+{
+    PJ_UNUSED_ARG(this_port);
+    PJ_UNUSED_ARG(frame);
+    return PJ_EINVALIDOP;
+}
+
+
+/*
+ * Close the port, modify file header with updated file length.
+ */
+static pj_status_t file_on_destroy(pjmedia_port *this_port)
+{
+    struct mp3_file_port *fport = (struct mp3_file_port*)this_port;
+    pj_status_t status;
+    unsigned long WriteSize;
+    unsigned long MP3Err;
+
+
+    /* Close encoder */
+    MP3Err = BladeDLL.beDeinitStream(fport->mp3_stream, fport->mp3_buf, 
+				     &WriteSize);
+    if (MP3Err == BE_ERR_SUCCESSFUL) {
+	pj_ssize_t bytes = WriteSize;
+	status = pj_file_write(fport->fd, fport->mp3_buf, &bytes);
+    }
+
+    /* Close file */
+    status = pj_file_close(fport->fd);
+
+    /* Write additional VBR header */
+    if (fport->mp3_option.vbr) {
+	MP3Err = BladeDLL.beWriteVBRHeader(fport->mp3_filename.ptr);
+    }
+
+
+    /* Decrement DLL reference counter */
+    deinit_blade_dll();
+
+    /* Done. */
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/null_port.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/null_port.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/null_port.c	(revision 1163)
@@ -0,0 +1,99 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/null_port.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+
+#define SIGNATURE   PJMEDIA_PORT_SIGNATURE('N', 'U', 'L', 'L')
+
+static pj_status_t null_get_frame(pjmedia_port *this_port, 
+				  pjmedia_frame *frame);
+static pj_status_t null_put_frame(pjmedia_port *this_port, 
+				  const pjmedia_frame *frame);
+static pj_status_t null_on_destroy(pjmedia_port *this_port);
+
+
+PJ_DEF(pj_status_t) pjmedia_null_port_create( pj_pool_t *pool,
+					      unsigned sampling_rate,
+					      unsigned channel_count,
+					      unsigned samples_per_frame,
+					      unsigned bits_per_sample,
+					      pjmedia_port **p_port )
+{
+    pjmedia_port *port;
+    const pj_str_t name = pj_str("null-port");
+
+    PJ_ASSERT_RETURN(pool && p_port, PJ_EINVAL);
+
+    port = pj_pool_zalloc(pool, sizeof(pjmedia_port));
+    PJ_ASSERT_RETURN(pool != NULL, PJ_ENOMEM);
+
+    pjmedia_port_info_init(&port->info, &name, SIGNATURE, sampling_rate,
+			   channel_count, bits_per_sample, samples_per_frame);
+
+    port->get_frame = &null_get_frame;
+    port->put_frame = &null_put_frame;
+    port->on_destroy = &null_on_destroy;
+
+
+    *p_port = port;
+    
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * Put frame to file.
+ */
+static pj_status_t null_put_frame(pjmedia_port *this_port, 
+				  const pjmedia_frame *frame)
+{
+    PJ_UNUSED_ARG(this_port);
+    PJ_UNUSED_ARG(frame);
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get frame from file.
+ */
+static pj_status_t null_get_frame(pjmedia_port *this_port, 
+				  pjmedia_frame *frame)
+{
+    frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
+    frame->size = this_port->info.samples_per_frame * 2;
+    frame->timestamp.u32.lo += this_port->info.samples_per_frame;
+    pjmedia_zero_samples(frame->buf, this_port->info.samples_per_frame);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Destroy port.
+ */
+static pj_status_t null_on_destroy(pjmedia_port *this_port)
+{
+    PJ_UNUSED_ARG(this_port);
+    return PJ_SUCCESS;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/nullsound.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/nullsound.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/nullsound.c	(revision 1163)
@@ -0,0 +1,155 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/sound.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+
+#if PJMEDIA_SOUND_IMPLEMENTATION==PJMEDIA_SOUND_NULL_SOUND
+
+static pjmedia_snd_dev_info null_info = 
+{
+    "Null Device",
+    1,
+    1,
+    8000
+};
+
+
+PJ_DEF(pj_status_t) pjmedia_snd_init(pj_pool_factory *factory)
+{
+    PJ_UNUSED_ARG(factory);
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(int) pjmedia_snd_get_dev_count(void)
+{
+    return 1;
+}
+
+PJ_DEF(const pjmedia_snd_dev_info*) pjmedia_snd_get_dev_info(unsigned index)
+{
+    PJ_ASSERT_RETURN(index==0, NULL);
+    return &null_info;
+}
+
+PJ_DEF(pj_status_t) pjmedia_snd_open_rec( int index,
+					  unsigned clock_rate,
+					  unsigned channel_count,
+					  unsigned samples_per_frame,
+					  unsigned bits_per_sample,
+					  pjmedia_snd_rec_cb rec_cb,
+					  void *user_data,
+					  pjmedia_snd_stream **p_snd_strm)
+{
+    PJ_UNUSED_ARG(index);
+    PJ_UNUSED_ARG(clock_rate);
+    PJ_UNUSED_ARG(channel_count);
+    PJ_UNUSED_ARG(samples_per_frame);
+    PJ_UNUSED_ARG(bits_per_sample);
+    PJ_UNUSED_ARG(rec_cb);
+    PJ_UNUSED_ARG(user_data);
+
+    *p_snd_strm = (void*)1;
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjmedia_snd_open_player( int index,
+					unsigned clock_rate,
+					unsigned channel_count,
+					unsigned samples_per_frame,
+					unsigned bits_per_sample,
+					pjmedia_snd_play_cb play_cb,
+					void *user_data,
+					pjmedia_snd_stream **p_snd_strm )
+{
+    PJ_UNUSED_ARG(index);
+    PJ_UNUSED_ARG(clock_rate);
+    PJ_UNUSED_ARG(channel_count);
+    PJ_UNUSED_ARG(samples_per_frame);
+    PJ_UNUSED_ARG(bits_per_sample);
+    PJ_UNUSED_ARG(play_cb);
+    PJ_UNUSED_ARG(user_data);
+
+    *p_snd_strm = (void*)1;
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjmedia_snd_open( int rec_id,
+				      int play_id,
+				      unsigned clock_rate,
+				      unsigned channel_count,
+				      unsigned samples_per_frame,
+				      unsigned bits_per_sample,
+				      pjmedia_snd_rec_cb rec_cb,
+				      pjmedia_snd_play_cb play_cb,
+				      void *user_data,
+				      pjmedia_snd_stream **p_snd_strm)
+{
+    PJ_UNUSED_ARG(rec_id);
+    PJ_UNUSED_ARG(play_id);
+    PJ_UNUSED_ARG(clock_rate);
+    PJ_UNUSED_ARG(channel_count);
+    PJ_UNUSED_ARG(samples_per_frame);
+    PJ_UNUSED_ARG(bits_per_sample);
+    PJ_UNUSED_ARG(rec_cb);
+    PJ_UNUSED_ARG(play_cb);
+    PJ_UNUSED_ARG(user_data);
+
+    *p_snd_strm = (void*)1;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_snd_stream_start(pjmedia_snd_stream *stream)
+{
+    PJ_UNUSED_ARG(stream);
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjmedia_snd_stream_stop(pjmedia_snd_stream *stream)
+{
+    PJ_UNUSED_ARG(stream);
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjmedia_snd_stream_get_info(pjmedia_snd_stream *strm,
+						pjmedia_snd_stream_info *pi)
+{
+
+    PJ_ASSERT_RETURN(strm && pi, PJ_EINVAL);
+    return PJ_EINVALIDOP;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_snd_stream_close(pjmedia_snd_stream *stream)
+{
+    PJ_UNUSED_ARG(stream);
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjmedia_snd_deinit(void)
+{
+    return PJ_SUCCESS;
+}
+
+
+#endif	/* PJMEDIA_SOUND_IMPLEMENTATION */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/pasound.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/pasound.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/pasound.c	(revision 1163)
@@ -0,0 +1,828 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/sound.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/string.h>
+#include <portaudio.h>
+
+#if PJMEDIA_SOUND_IMPLEMENTATION==PJMEDIA_SOUND_PORTAUDIO_SOUND
+
+#define THIS_FILE	"pasound.c"
+
+static int snd_init_count;
+
+static struct snd_mgr
+{
+    pj_pool_factory *factory;
+} snd_mgr;
+
+/* 
+ * Sound stream descriptor.
+ * This struct may be used for both unidirectional or bidirectional sound
+ * streams.
+ */
+struct pjmedia_snd_stream
+{
+    pj_pool_t		*pool;
+    pj_str_t		 name;
+    pjmedia_dir		 dir;
+    int			 play_id;
+    int			 rec_id;
+    int			 bytes_per_sample;
+    pj_uint32_t		 samples_per_sec;
+    unsigned		 samples_per_frame;
+    int			 channel_count;
+
+    PaStream		*rec_strm;
+    PaStream		*play_strm;
+
+    void		*user_data;
+    pjmedia_snd_rec_cb   rec_cb;
+    pjmedia_snd_play_cb  play_cb;
+
+    pj_uint32_t		 timestamp;
+    pj_uint32_t		 underflow;
+    pj_uint32_t		 overflow;
+
+    pj_bool_t		 quit_flag;
+
+    pj_bool_t		 rec_thread_exited;
+    pj_bool_t		 rec_thread_initialized;
+    pj_thread_desc	 rec_thread_desc;
+    pj_thread_t		*rec_thread;
+
+    pj_bool_t		 play_thread_exited;
+    pj_bool_t		 play_thread_initialized;
+    pj_thread_desc	 play_thread_desc;
+    pj_thread_t		*play_thread;
+};
+
+
+static int PaRecorderCallback(const void *input, 
+			      void *output,
+			      unsigned long frameCount,
+			      const PaStreamCallbackTimeInfo* timeInfo,
+			      PaStreamCallbackFlags statusFlags,
+			      void *userData )
+{
+    pjmedia_snd_stream *stream = userData;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(output);
+    PJ_UNUSED_ARG(timeInfo);
+
+    if (stream->quit_flag)
+	goto on_break;
+
+    if (input == NULL)
+	return paContinue;
+
+    if (stream->rec_thread_initialized == 0) {
+	status = pj_thread_register("pa_rec", stream->rec_thread_desc, 
+				    &stream->rec_thread);
+	stream->rec_thread_initialized = 1;
+	PJ_LOG(5,(THIS_FILE, "Recorder thread started"));
+    }
+
+    if (statusFlags & paInputUnderflow)
+	++stream->underflow;
+    if (statusFlags & paInputOverflow)
+	++stream->overflow;
+
+    stream->timestamp += frameCount;
+
+    status = (*stream->rec_cb)(stream->user_data, stream->timestamp, 
+			       (void*)input, 
+			       frameCount * stream->bytes_per_sample *
+				 stream->channel_count);
+    
+    if (status==0) 
+	return paContinue;
+
+on_break:
+    stream->rec_thread_exited = 1;
+    return paAbort;
+}
+
+static int PaPlayerCallback( const void *input, 
+			     void *output,
+			     unsigned long frameCount,
+			     const PaStreamCallbackTimeInfo* timeInfo,
+			     PaStreamCallbackFlags statusFlags,
+			     void *userData )
+{
+    pjmedia_snd_stream *stream = userData;
+    pj_status_t status;
+    unsigned size = frameCount * stream->bytes_per_sample *
+		    stream->channel_count;
+
+    PJ_UNUSED_ARG(input);
+    PJ_UNUSED_ARG(timeInfo);
+
+    if (stream->quit_flag)
+	goto on_break;
+
+    if (output == NULL)
+	return paContinue;
+
+    if (stream->play_thread_initialized == 0) {
+	status = pj_thread_register("portaudio", stream->play_thread_desc,
+				    &stream->play_thread);
+	stream->play_thread_initialized = 1;
+	PJ_LOG(5,(THIS_FILE, "Player thread started"));
+    }
+
+    if (statusFlags & paOutputUnderflow)
+	++stream->underflow;
+    if (statusFlags & paOutputOverflow)
+	++stream->overflow;
+
+    stream->timestamp += frameCount;
+
+    status = (*stream->play_cb)(stream->user_data, stream->timestamp, 
+			        output, size);
+    
+    if (status==0) 
+	return paContinue;
+
+on_break:
+    stream->play_thread_exited = 1;
+    return paAbort;
+}
+
+
+static int PaRecorderPlayerCallback( const void *input, 
+				     void *output,
+				     unsigned long frameCount,
+				     const PaStreamCallbackTimeInfo* timeInfo,
+				     PaStreamCallbackFlags statusFlags,
+				     void *userData )
+{
+    int rc;
+
+    rc = PaRecorderCallback(input, output, frameCount, timeInfo,
+			    statusFlags, userData);
+    if (rc != paContinue)
+	return rc;
+
+    rc = PaPlayerCallback(input, output, frameCount, timeInfo,
+			  statusFlags, userData);
+    return rc;
+}
+
+
+/*
+ * Init sound library.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_init(pj_pool_factory *factory)
+{
+    if (++snd_init_count == 1) {
+	int err;
+
+	snd_mgr.factory = factory;
+	err = Pa_Initialize();
+
+	PJ_LOG(4,(THIS_FILE, 
+		  "PortAudio sound library initialized, status=%d", err));
+	PJ_LOG(4,(THIS_FILE, "PortAudio host api count=%d",
+			     Pa_GetHostApiCount()));
+	PJ_LOG(4,(THIS_FILE, "Sound device count=%d",
+			     pjmedia_snd_get_dev_count()));
+
+	return err ? PJMEDIA_ERRNO_FROM_PORTAUDIO(err) : PJ_SUCCESS;
+    } else {
+	return PJ_SUCCESS;
+    }
+}
+
+
+/*
+ * Get device count.
+ */
+PJ_DEF(int) pjmedia_snd_get_dev_count(void)
+{
+    return Pa_GetDeviceCount();
+}
+
+
+/*
+ * Get device info.
+ */
+PJ_DEF(const pjmedia_snd_dev_info*) pjmedia_snd_get_dev_info(unsigned index)
+{
+    static pjmedia_snd_dev_info info;
+    const PaDeviceInfo *pa_info;
+
+    pa_info = Pa_GetDeviceInfo(index);
+    if (!pa_info)
+	return NULL;
+
+    pj_bzero(&info, sizeof(info));
+    strncpy(info.name, pa_info->name, sizeof(info.name));
+    info.name[sizeof(info.name)-1] = '\0';
+    info.input_count = pa_info->maxInputChannels;
+    info.output_count = pa_info->maxOutputChannels;
+    info.default_samples_per_sec = (unsigned)pa_info->defaultSampleRate;
+
+    return &info;
+}
+
+
+/* Get PortAudio default input device ID */
+static int pa_get_default_input_dev(int channel_count)
+{
+    int i, count;
+
+    /* Enumerate the host api's for the default devices, and return
+     * the device with suitable channels.
+     */
+    count = Pa_GetHostApiCount();
+    for (i=0; i < count; ++i) {
+	const PaHostApiInfo *pHAInfo;
+
+	pHAInfo = Pa_GetHostApiInfo(i);
+	if (!pHAInfo)
+	    continue;
+
+	if (pHAInfo->defaultInputDevice >= 0) {
+	    const PaDeviceInfo *paDevInfo;
+
+	    paDevInfo = Pa_GetDeviceInfo(pHAInfo->defaultInputDevice);
+
+	    if (paDevInfo->maxInputChannels >= channel_count)
+		return pHAInfo->defaultInputDevice;
+	}
+    }
+
+    /* If still no device is found, enumerate all devices */
+    count = Pa_GetDeviceCount();
+    for (i=0; i<count; ++i) {
+	const PaDeviceInfo *paDevInfo;
+
+	paDevInfo = Pa_GetDeviceInfo(i);
+	if (paDevInfo->maxInputChannels >= channel_count)
+	    return i;
+    }
+    
+    return -1;
+}
+
+/* Get PortAudio default output device ID */
+static int pa_get_default_output_dev(int channel_count)
+{
+    int i, count;
+
+    /* Enumerate the host api's for the default devices, and return
+     * the device with suitable channels.
+     */
+    count = Pa_GetHostApiCount();
+    for (i=0; i < count; ++i) {
+	const PaHostApiInfo *pHAInfo;
+
+	pHAInfo = Pa_GetHostApiInfo(i);
+	if (!pHAInfo)
+	    continue;
+
+	if (pHAInfo->defaultOutputDevice >= 0) {
+	    const PaDeviceInfo *paDevInfo;
+
+	    paDevInfo = Pa_GetDeviceInfo(pHAInfo->defaultOutputDevice);
+
+	    if (paDevInfo->maxOutputChannels >= channel_count)
+		return pHAInfo->defaultOutputDevice;
+	}
+    }
+
+    /* If still no device is found, enumerate all devices */
+    count = Pa_GetDeviceCount();
+    for (i=0; i<count; ++i) {
+	const PaDeviceInfo *paDevInfo;
+
+	paDevInfo = Pa_GetDeviceInfo(i);
+	if (paDevInfo->maxOutputChannels >= channel_count)
+	    return i;
+    }
+    
+    return -1;
+}
+
+
+/*
+ * Open stream.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_open_rec( int index,
+					  unsigned clock_rate,
+					  unsigned channel_count,
+					  unsigned samples_per_frame,
+					  unsigned bits_per_sample,
+					  pjmedia_snd_rec_cb rec_cb,
+					  void *user_data,
+					  pjmedia_snd_stream **p_snd_strm)
+{
+    pj_pool_t *pool;
+    pjmedia_snd_stream *stream;
+    PaStreamParameters inputParam;
+    int sampleFormat;
+    const PaDeviceInfo *paDevInfo = NULL;
+    const PaHostApiInfo *paHostApiInfo = NULL;
+    unsigned paFrames, paRate, paLatency;
+    const PaStreamInfo *paSI;
+    PaError err;
+
+    if (index < 0) {
+	index = pa_get_default_input_dev(channel_count);
+	if (index < 0) {
+	    /* No such device. */
+	    return PJMEDIA_ENOSNDREC;
+	}
+    }
+
+    paDevInfo = Pa_GetDeviceInfo(index);
+    if (!paDevInfo) {
+	/* Assumed it is "No such device" error. */
+	return PJMEDIA_ESNDINDEVID;
+    }
+
+    if (bits_per_sample == 8)
+	sampleFormat = paUInt8;
+    else if (bits_per_sample == 16)
+	sampleFormat = paInt16;
+    else if (bits_per_sample == 32)
+	sampleFormat = paInt32;
+    else
+	return PJMEDIA_ESNDINSAMPLEFMT;
+    
+    pool = pj_pool_create( snd_mgr.factory, "sndstream", 1024, 1024, NULL);
+    if (!pool)
+	return PJ_ENOMEM;
+
+    stream = pj_pool_zalloc(pool, sizeof(*stream));
+    stream->pool = pool;
+    pj_strdup2_with_null(pool, &stream->name, paDevInfo->name);
+    stream->dir = PJMEDIA_DIR_CAPTURE;
+    stream->rec_id = index;
+    stream->play_id = -1;
+    stream->user_data = user_data;
+    stream->samples_per_sec = clock_rate;
+    stream->samples_per_frame = samples_per_frame;
+    stream->bytes_per_sample = bits_per_sample / 8;
+    stream->channel_count = channel_count;
+    stream->rec_cb = rec_cb;
+
+    pj_bzero(&inputParam, sizeof(inputParam));
+    inputParam.device = index;
+    inputParam.channelCount = channel_count;
+    inputParam.hostApiSpecificStreamInfo = NULL;
+    inputParam.sampleFormat = sampleFormat;
+    inputParam.suggestedLatency = paDevInfo->defaultLowInputLatency;
+
+    paHostApiInfo = Pa_GetHostApiInfo(paDevInfo->hostApi);
+
+    /* Frames in PortAudio is number of samples in a single channel */
+    paFrames = samples_per_frame / channel_count;
+
+    err = Pa_OpenStream( &stream->rec_strm, &inputParam, NULL,
+			 clock_rate, paFrames, 
+			 paClipOff, &PaRecorderCallback, stream );
+    if (err != paNoError) {
+	pj_pool_release(pool);
+	return PJMEDIA_ERRNO_FROM_PORTAUDIO(err);
+    }
+
+    paSI = Pa_GetStreamInfo(stream->rec_strm);
+    paRate = (unsigned)paSI->sampleRate;
+    paLatency = (unsigned)(paSI->inputLatency * 1000);
+
+    PJ_LOG(5,(THIS_FILE, "Opened device %s (%s) for recording, sample "
+			 "rate=%d, ch=%d, "
+			 "bits=%d, %d samples per frame, latency=%d ms",
+			 paDevInfo->name, paHostApiInfo->name,
+			 paRate, channel_count,
+			 bits_per_sample, samples_per_frame,
+			 paLatency));
+
+    *p_snd_strm = stream;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_snd_open_player( int index,
+					unsigned clock_rate,
+					unsigned channel_count,
+					unsigned samples_per_frame,
+					unsigned bits_per_sample,
+					pjmedia_snd_play_cb play_cb,
+					void *user_data,
+					pjmedia_snd_stream **p_snd_strm)
+{
+    pj_pool_t *pool;
+    pjmedia_snd_stream *stream;
+    PaStreamParameters outputParam;
+    int sampleFormat;
+    const PaDeviceInfo *paDevInfo = NULL;
+    const PaHostApiInfo *paHostApiInfo = NULL;
+    const PaStreamInfo *paSI;
+    unsigned paFrames, paRate, paLatency;
+    PaError err;
+
+    if (index < 0) {
+	index = pa_get_default_output_dev(channel_count);
+	if (index < 0) {
+	    /* No such device. */
+	    return PJMEDIA_ENOSNDPLAY;
+	}
+    } 
+
+    paDevInfo = Pa_GetDeviceInfo(index);
+    if (!paDevInfo) {
+	/* Assumed it is "No such device" error. */
+	return PJMEDIA_ESNDINDEVID;
+    }
+
+    if (bits_per_sample == 8)
+	sampleFormat = paUInt8;
+    else if (bits_per_sample == 16)
+	sampleFormat = paInt16;
+    else if (bits_per_sample == 32)
+	sampleFormat = paInt32;
+    else
+	return PJMEDIA_ESNDINSAMPLEFMT;
+    
+    pool = pj_pool_create( snd_mgr.factory, "sndstream", 1024, 1024, NULL);
+    if (!pool)
+	return PJ_ENOMEM;
+
+    stream = pj_pool_calloc(pool, 1, sizeof(*stream));
+    stream->pool = pool;
+    pj_strdup2_with_null(pool, &stream->name, paDevInfo->name);
+    stream->dir = stream->dir = PJMEDIA_DIR_PLAYBACK;
+    stream->play_id = index;
+    stream->rec_id = -1;
+    stream->user_data = user_data;
+    stream->samples_per_sec = clock_rate;
+    stream->samples_per_frame = samples_per_frame;
+    stream->bytes_per_sample = bits_per_sample / 8;
+    stream->channel_count = channel_count;
+    stream->play_cb = play_cb;
+
+    pj_bzero(&outputParam, sizeof(outputParam));
+    outputParam.device = index;
+    outputParam.channelCount = channel_count;
+    outputParam.hostApiSpecificStreamInfo = NULL;
+    outputParam.sampleFormat = sampleFormat;
+    outputParam.suggestedLatency = 1.0 * samples_per_frame / clock_rate;;
+
+    paHostApiInfo = Pa_GetHostApiInfo(paDevInfo->hostApi);
+
+    /* Frames in PortAudio is number of samples in a single channel */
+    paFrames = samples_per_frame / channel_count;
+
+    err = Pa_OpenStream( &stream->play_strm, NULL, &outputParam,
+			 clock_rate,  paFrames, 
+			 paClipOff, &PaPlayerCallback, stream );
+    if (err != paNoError) {
+	pj_pool_release(pool);
+	return PJMEDIA_ERRNO_FROM_PORTAUDIO(err);
+    }
+
+    paSI = Pa_GetStreamInfo(stream->play_strm);
+    paRate = (unsigned)(paSI->sampleRate);
+    paLatency = (unsigned)(paSI->outputLatency * 1000);
+
+    PJ_LOG(5,(THIS_FILE, "Opened device %d: %s(%s) for playing, sample rate=%d"
+			 ", ch=%d, "
+			 "bits=%d, %d samples per frame, latency=%d ms",
+			 index, paDevInfo->name, paHostApiInfo->name, 
+			 paRate, channel_count,
+		 	 bits_per_sample, samples_per_frame, paLatency));
+
+    *p_snd_strm = stream;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Open both player and recorder.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_open( int rec_id,
+				      int play_id,
+				      unsigned clock_rate,
+				      unsigned channel_count,
+				      unsigned samples_per_frame,
+				      unsigned bits_per_sample,
+				      pjmedia_snd_rec_cb rec_cb,
+				      pjmedia_snd_play_cb play_cb,
+				      void *user_data,
+				      pjmedia_snd_stream **p_snd_strm)
+{
+    pj_pool_t *pool;
+    pjmedia_snd_stream *stream;
+    PaStream *paStream = NULL;
+    PaStreamParameters inputParam;
+    PaStreamParameters outputParam;
+    int sampleFormat;
+    const PaDeviceInfo *paRecDevInfo = NULL;
+    const PaDeviceInfo *paPlayDevInfo = NULL;
+    const PaHostApiInfo *paRecHostApiInfo = NULL;
+    const PaHostApiInfo *paPlayHostApiInfo = NULL;
+    const PaStreamInfo *paSI;
+    unsigned paFrames, paRate, paInputLatency, paOutputLatency;
+    PaError err;
+
+    if (rec_id < 0) {
+	rec_id = pa_get_default_input_dev(channel_count);
+	if (rec_id < 0) {
+	    /* No such device. */
+	    return PJMEDIA_ENOSNDREC;
+	}
+    }
+
+    paRecDevInfo = Pa_GetDeviceInfo(rec_id);
+    if (!paRecDevInfo) {
+	/* Assumed it is "No such device" error. */
+	return PJMEDIA_ESNDINDEVID;
+    }
+
+    if (play_id < 0) {
+	play_id = pa_get_default_output_dev(channel_count);
+	if (play_id < 0) {
+	    /* No such device. */
+	    return PJMEDIA_ENOSNDPLAY;
+	}
+    } 
+
+    paPlayDevInfo = Pa_GetDeviceInfo(play_id);
+    if (!paPlayDevInfo) {
+	/* Assumed it is "No such device" error. */
+	return PJMEDIA_ESNDINDEVID;
+    }
+
+
+    if (bits_per_sample == 8)
+	sampleFormat = paUInt8;
+    else if (bits_per_sample == 16)
+	sampleFormat = paInt16;
+    else if (bits_per_sample == 32)
+	sampleFormat = paInt32;
+    else
+	return PJMEDIA_ESNDINSAMPLEFMT;
+    
+    pool = pj_pool_create( snd_mgr.factory, "sndstream", 1024, 1024, NULL);
+    if (!pool)
+	return PJ_ENOMEM;
+
+    stream = pj_pool_zalloc(pool, sizeof(*stream));
+    stream->pool = pool;
+    pj_strdup2_with_null(pool, &stream->name, paRecDevInfo->name);
+    stream->dir = PJMEDIA_DIR_CAPTURE_PLAYBACK;
+    stream->play_id = play_id;
+    stream->rec_id = rec_id;
+    stream->user_data = user_data;
+    stream->samples_per_sec = clock_rate;
+    stream->samples_per_frame = samples_per_frame;
+    stream->bytes_per_sample = bits_per_sample / 8;
+    stream->channel_count = channel_count;
+    stream->rec_cb = rec_cb;
+    stream->play_cb = play_cb;
+
+    pj_bzero(&inputParam, sizeof(inputParam));
+    inputParam.device = rec_id;
+    inputParam.channelCount = channel_count;
+    inputParam.hostApiSpecificStreamInfo = NULL;
+    inputParam.sampleFormat = sampleFormat;
+    inputParam.suggestedLatency = paRecDevInfo->defaultLowInputLatency;
+
+    paRecHostApiInfo = Pa_GetHostApiInfo(paRecDevInfo->hostApi);
+
+    pj_bzero(&outputParam, sizeof(outputParam));
+    outputParam.device = play_id;
+    outputParam.channelCount = channel_count;
+    outputParam.hostApiSpecificStreamInfo = NULL;
+    outputParam.sampleFormat = sampleFormat;
+    outputParam.suggestedLatency = paPlayDevInfo->defaultLowOutputLatency;
+
+    paPlayHostApiInfo = Pa_GetHostApiInfo(paPlayDevInfo->hostApi);
+
+    /* Frames in PortAudio is number of samples in a single channel */
+    paFrames = samples_per_frame / channel_count;
+
+    /* If both input and output are on the same device, open a single stream
+     * for both input and output.
+     */
+    if (rec_id == play_id) {
+	err = Pa_OpenStream( &paStream, &inputParam, &outputParam,
+			     clock_rate, paFrames, 
+			     paClipOff, &PaRecorderPlayerCallback, stream );
+	if (err == paNoError) {
+	    /* Set play stream and record stream to the same stream */
+	    stream->play_strm = stream->rec_strm = paStream;
+	}
+    } else {
+	err = -1;
+    }
+
+    /* .. otherwise if input and output are on the same device, OR if we're
+     * unable to open a bidirectional stream, then open two separate
+     * input and output stream.
+     */
+    if (paStream == NULL) {
+	/* Open input stream */
+	err = Pa_OpenStream( &stream->rec_strm, &inputParam, NULL,
+			     clock_rate, paFrames, 
+			     paClipOff, &PaRecorderCallback, stream );
+	if (err == paNoError) {
+	    /* Open output stream */
+	    err = Pa_OpenStream( &stream->play_strm, NULL, &outputParam,
+				 clock_rate, paFrames, 
+				 paClipOff, &PaPlayerCallback, stream );
+	    if (err != paNoError)
+		Pa_CloseStream(stream->rec_strm);
+	}
+    }
+
+    if (err != paNoError) {
+	pj_pool_release(pool);
+	return PJMEDIA_ERRNO_FROM_PORTAUDIO(err);
+    }
+
+    paSI = Pa_GetStreamInfo(stream->rec_strm);
+    paRate = (unsigned)(paSI->sampleRate);
+    paInputLatency = (unsigned)(paSI->inputLatency * 1000);
+    paSI = Pa_GetStreamInfo(stream->play_strm);
+    paOutputLatency = (unsigned)(paSI->outputLatency * 1000);
+
+    PJ_LOG(5,(THIS_FILE, "Opened device %s(%s)/%s(%s) for recording and "
+			 "playback, sample rate=%d, ch=%d, "
+			 "bits=%d, %d samples per frame, input latency=%d ms, "
+			 "output latency=%d ms",
+			 paRecDevInfo->name, paRecHostApiInfo->name,
+			 paPlayDevInfo->name, paPlayHostApiInfo->name,
+			 paRate, channel_count,
+			 bits_per_sample, samples_per_frame,
+			 paInputLatency, paOutputLatency));
+
+    *p_snd_strm = stream;
+
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get stream info.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_stream_get_info(pjmedia_snd_stream *strm,
+						pjmedia_snd_stream_info *pi)
+{
+    const PaStreamInfo *paPlaySI = NULL, *paRecSI = NULL;
+
+    PJ_ASSERT_RETURN(strm && pi, PJ_EINVAL);
+    PJ_ASSERT_RETURN(strm->play_strm || strm->rec_strm, PJ_EINVALIDOP);
+
+    if (strm->play_strm) {
+	paPlaySI = Pa_GetStreamInfo(strm->play_strm);
+    }
+    if (strm->rec_strm) {
+	paRecSI = Pa_GetStreamInfo(strm->rec_strm);
+    }
+
+    pj_bzero(pi, sizeof(*pi));
+    pi->dir = strm->dir;
+    pi->play_id = strm->play_id;
+    pi->rec_id = strm->rec_id;
+    pi->clock_rate = (unsigned)(paPlaySI ? paPlaySI->sampleRate : 
+				paRecSI->sampleRate);
+    pi->channel_count = strm->channel_count;
+    pi->samples_per_frame = strm->samples_per_frame;
+    pi->bits_per_sample = strm->bytes_per_sample * 8;
+    pi->rec_latency = (unsigned)(paRecSI ? paRecSI->inputLatency * 
+					   paRecSI->sampleRate : 0);
+    pi->play_latency = (unsigned)(paPlaySI ? paPlaySI->outputLatency * 
+					     paPlaySI->sampleRate : 0);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Start stream.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_stream_start(pjmedia_snd_stream *stream)
+{
+    int err = 0;
+
+    PJ_LOG(5,(THIS_FILE, "Starting %s stream..", stream->name.ptr));
+
+    if (stream->play_strm)
+	err = Pa_StartStream(stream->play_strm);
+
+    if (err==0 && stream->rec_strm && stream->rec_strm != stream->play_strm) {
+	err = Pa_StartStream(stream->rec_strm);
+	if (err != 0)
+	    Pa_StopStream(stream->play_strm);
+    }
+
+    PJ_LOG(5,(THIS_FILE, "Done, status=%d", err));
+
+    return err ? PJMEDIA_ERRNO_FROM_PORTAUDIO(err) : PJ_SUCCESS;
+}
+
+/*
+ * Stop stream.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_stream_stop(pjmedia_snd_stream *stream)
+{
+    int i, err = 0;
+
+    stream->quit_flag = 1;
+    for (i=0; !stream->rec_thread_exited && i<100; ++i)
+	pj_thread_sleep(10);
+    for (i=0; !stream->play_thread_exited && i<100; ++i)
+	pj_thread_sleep(10);
+
+    pj_thread_sleep(1);
+
+    PJ_LOG(5,(THIS_FILE, "Stopping stream.."));
+
+    if (stream->play_strm)
+	err = Pa_StopStream(stream->play_strm);
+
+    if (stream->rec_strm && stream->rec_strm != stream->play_strm)
+	err = Pa_StopStream(stream->rec_strm);
+
+    PJ_LOG(5,(THIS_FILE, "Done, status=%d", err));
+
+    return err ? PJMEDIA_ERRNO_FROM_PORTAUDIO(err) : PJ_SUCCESS;
+}
+
+/*
+ * Destroy stream.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_stream_close(pjmedia_snd_stream *stream)
+{
+    int i, err = 0;
+
+    stream->quit_flag = 1;
+    for (i=0; !stream->rec_thread_exited && i<100; ++i) {
+	pj_thread_sleep(1);
+    }
+    for (i=0; !stream->play_thread_exited && i<100; ++i) {
+	pj_thread_sleep(1);
+    }
+
+    PJ_LOG(5,(THIS_FILE, "Closing %.*s: %lu underflow, %lu overflow",
+			 (int)stream->name.slen,
+			 stream->name.ptr,
+			 stream->underflow, stream->overflow));
+
+    if (stream->play_strm)
+	err = Pa_CloseStream(stream->play_strm);
+
+    if (stream->rec_strm && stream->rec_strm != stream->play_strm)
+	err = Pa_CloseStream(stream->rec_strm);
+
+    pj_pool_release(stream->pool);
+
+    return err ? PJMEDIA_ERRNO_FROM_PORTAUDIO(err) : PJ_SUCCESS;
+}
+
+/*
+ * Deinitialize sound library.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_deinit(void)
+{
+    if (--snd_init_count == 0) {
+	int err;
+
+	PJ_LOG(4,(THIS_FILE, "PortAudio sound library shutting down.."));
+
+	err = Pa_Terminate();
+
+	return err ? PJMEDIA_ERRNO_FROM_PORTAUDIO(err) : PJ_SUCCESS;
+    } else {
+	return PJ_SUCCESS;
+    }
+}
+
+
+#endif	/* PJMEDIA_SOUND_IMPLEMENTATION */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/plc_common.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/plc_common.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/plc_common.c	(revision 1163)
@@ -0,0 +1,191 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/plc.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+
+static void* plc_replay_create(pj_pool_t*, unsigned c, unsigned f);
+static void  plc_replay_save(void*, pj_int16_t*);
+static void  plc_replay_generate(void*, pj_int16_t*);
+
+extern void* pjmedia_plc_steveu_create(pj_pool_t*, unsigned c, unsigned f);
+extern void  pjmedia_plc_steveu_save(void*, pj_int16_t*);
+extern void  pjmedia_plc_steveu_generate(void*, pj_int16_t*);
+
+
+/**
+ * This struct is used internally to represent a PLC backend.
+ */
+struct plc_alg
+{
+    void* (*plc_create)(pj_pool_t*, unsigned c, unsigned f);
+    void  (*plc_save)(void*, pj_int16_t*);
+    void  (*plc_generate)(void*, pj_int16_t*);
+};
+
+
+#if defined(PJMEDIA_HAS_STEVEU_PLC) && PJMEDIA_HAS_STEVEU_PLC!=0
+static struct plc_alg plc_steveu =
+{
+    &pjmedia_plc_steveu_create,
+    &pjmedia_plc_steveu_save,
+    &pjmedia_plc_steveu_generate
+};
+#endif
+
+
+static struct plc_alg plc_replay =
+{
+    &plc_replay_create,
+    &plc_replay_save,
+    &plc_replay_generate
+};
+
+
+struct pjmedia_plc
+{
+    void	    *obj;
+    struct plc_alg  *op;
+};
+
+
+/*
+ * Create PLC session. This function will select the PLC algorithm to
+ * use based on the arguments.
+ */
+PJ_DEF(pj_status_t) pjmedia_plc_create( pj_pool_t *pool,
+					unsigned clock_rate,
+					unsigned samples_per_frame,
+					unsigned options,
+					pjmedia_plc **p_plc)
+{
+    pjmedia_plc *plc;
+
+    PJ_ASSERT_RETURN(pool && clock_rate && samples_per_frame && p_plc,
+		     PJ_EINVAL);
+    PJ_ASSERT_RETURN(options == 0, PJ_EINVAL);
+
+    PJ_UNUSED_ARG(options);
+
+    plc = pj_pool_zalloc(pool, sizeof(pjmedia_plc));
+
+    if (0)
+	;
+#if defined(PJMEDIA_HAS_STEVEU_PLC) && PJMEDIA_HAS_STEVEU_PLC!=0
+    else if (clock_rate == 8000)
+	plc->op = &plc_steveu;
+#endif
+    else
+	plc->op = &plc_replay;
+
+    plc->obj = plc->op->plc_create(pool, clock_rate, samples_per_frame);
+
+    *p_plc = plc;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Save a good frame to PLC.
+ */
+PJ_DEF(pj_status_t) pjmedia_plc_save( pjmedia_plc *plc,
+				      pj_int16_t *frame )
+{
+    PJ_ASSERT_RETURN(plc && frame, PJ_EINVAL);
+ 
+    plc->op->plc_save(plc->obj, frame);
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Generate a replacement for lost frame.
+ */
+PJ_DEF(pj_status_t) pjmedia_plc_generate( pjmedia_plc *plc,
+					  pj_int16_t *frame )
+{
+    PJ_ASSERT_RETURN(plc && frame, PJ_EINVAL);
+    
+    plc->op->plc_generate(plc->obj, frame);
+    return PJ_SUCCESS;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+ * Simple replay based plc
+ */
+struct replay_plc
+{
+    unsigned	size;
+    unsigned	replay_cnt;
+    pj_int16_t *frame;
+};
+
+
+static void* plc_replay_create(pj_pool_t *pool, unsigned clock_rate, 
+			       unsigned samples_per_frame)
+{
+    struct replay_plc *o;
+
+    PJ_UNUSED_ARG(clock_rate);
+
+    o = pj_pool_alloc(pool, sizeof(struct replay_plc));
+    o->size = samples_per_frame * 2;
+    o->replay_cnt = 0;
+    o->frame = pj_pool_zalloc(pool, o->size);
+
+    return o;
+}
+
+static void plc_replay_save(void *plc, pj_int16_t *frame)
+{
+    struct replay_plc *o = plc;
+
+    pj_memcpy(o->frame, frame, o->size);
+    o->replay_cnt = 0;
+}
+
+static void plc_replay_generate(void *plc, pj_int16_t *frame)
+{
+    struct replay_plc *o = plc;
+    unsigned i, count;
+    pj_int16_t *samp;
+
+    ++o->replay_cnt;
+
+    if (o->replay_cnt < 16) {
+	pj_memcpy(frame, o->frame, o->size);
+    
+
+	count = o->size / 2;
+	samp = o->frame;
+	for (i=0; i<count; ++i)
+	    samp[i] = (pj_int16_t)(samp[i] >> 1);
+    } else {
+	pj_bzero(frame, o->size);
+    }
+}
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/plc_steveu.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/plc_steveu.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/plc_steveu.c	(revision 1163)
@@ -0,0 +1,338 @@
+/*
+ * SpanDSP - a series of DSP components for telephony
+ *
+ * plc.c
+ *
+ * Written by Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This version may be optionally licenced under the GNU LGPL licence.
+ * This version is disclaimed to DIGIUM for inclusion in the Asterisk project.
+ */
+
+/*! \file */
+
+#include <pjmedia/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <limits.h>
+
+#include "plc_steveu.h"
+
+#if !defined(FALSE)
+#define FALSE 0
+#endif
+#if !defined(TRUE)
+#define TRUE (!FALSE)
+#endif
+
+#ifndef INT16_MAX
+#define INT16_MAX   (32767)
+#endif
+
+#ifndef INT16_MIN
+#define INT16_MIN   (-32767-1)
+#endif
+
+//#define PJ_HAS_RINT	1
+
+
+/* We do a straight line fade to zero volume in 50ms when we are filling in for missing data. */
+#define ATTENUATION_INCREMENT       0.0025                              /* Attenuation per sample */
+
+#define ms_to_samples(t)            (((t)*SAMPLE_RATE)/1000)
+
+
+#if defined(PJ_HAS_RINT) && PJ_HAS_RINT!=0
+#define RINT(d)	rint(d)
+#else
+double RINT(double d)
+{
+    double f = floor(d);
+    double c = ceil(d);
+    
+    if (c-d > d-f)
+	return f;
+    else if (c-d < d-f)
+	return c;
+    else if (d >= 0) {
+	if (f/2==f)
+	    return f;
+	else
+	    return c;
+    } else {
+	if (c/2==c)
+	    return c;
+	else
+	    return f;
+    }
+}
+#endif
+
+
+PJ_INLINE(pj_int16_t) fsaturate(double damp)
+{
+    if (damp > 32767.0)
+	return  INT16_MAX;
+    else if (damp < -32768.0)
+	return  INT16_MIN;
+    else {
+	return (pj_int16_t) RINT(damp);
+    }
+}
+
+static void save_history(plc_state_t *s, pj_int16_t *buf, int len)
+{
+    if (len >= PLC_HISTORY_LEN)
+    {
+        /* Just keep the last part of the new data, starting at the beginning of the buffer */
+        memcpy(s->history, buf + len - PLC_HISTORY_LEN, sizeof(pj_int16_t)*PLC_HISTORY_LEN);
+        s->buf_ptr = 0;
+        return;
+    }
+    if (s->buf_ptr + len > PLC_HISTORY_LEN)
+    {
+        /* Wraps around - must break into two sections */
+        memcpy(s->history + s->buf_ptr, buf, sizeof(pj_int16_t)*(PLC_HISTORY_LEN - s->buf_ptr));
+        len -= (PLC_HISTORY_LEN - s->buf_ptr);
+        memcpy(s->history, buf + (PLC_HISTORY_LEN - s->buf_ptr), sizeof(pj_int16_t)*len);
+        s->buf_ptr = len;
+        return;
+    }
+    /* Can use just one section */
+    memcpy(s->history + s->buf_ptr, buf, sizeof(pj_int16_t)*len);
+    s->buf_ptr += len;
+}
+/*- End of function --------------------------------------------------------*/
+
+static void normalise_history(plc_state_t *s)
+{
+    pj_int16_t tmp[PLC_HISTORY_LEN];
+
+    if (s->buf_ptr == 0)
+        return;
+    memcpy(tmp, s->history, sizeof(pj_int16_t)*s->buf_ptr);
+    memcpy(s->history, s->history + s->buf_ptr, sizeof(pj_int16_t)*(PLC_HISTORY_LEN - s->buf_ptr));
+    memcpy(s->history + PLC_HISTORY_LEN - s->buf_ptr, tmp, sizeof(pj_int16_t)*s->buf_ptr);
+    s->buf_ptr = 0;
+}
+/*- End of function --------------------------------------------------------*/
+
+PJ_INLINE(int) amdf_pitch(int min_pitch, int max_pitch, pj_int16_t amp[], int len)
+{
+    int i;
+    int j;
+    int acc;
+    int min_acc;
+    int pitch;
+
+    pitch = min_pitch;
+    min_acc = INT_MAX;
+    for (i = max_pitch;  i <= min_pitch;  i++)
+    {
+        acc = 0;
+        for (j = 0;  j < len;  j++)
+            acc += abs(amp[i + j] - amp[j]);
+        if (acc < min_acc)
+        {
+            min_acc = acc;
+            pitch = i;
+        }
+    }
+    return pitch;
+}
+/*- End of function --------------------------------------------------------*/
+
+int plc_rx(plc_state_t *s, pj_int16_t amp[], int len)
+{
+    int i;
+    /*int overlap_len;*/
+    int pitch_overlap;
+    float old_step;
+    float new_step;
+    float old_weight;
+    float new_weight;
+    float gain;
+    
+    if (s->missing_samples)
+    {
+        /* Although we have a real signal, we need to smooth it to fit well
+           with the synthetic signal we used for the previous block */
+
+        /* The start of the real data is overlapped with the next 1/4 cycle
+           of the synthetic data. */
+        pitch_overlap = s->pitch >> 2;
+        if (pitch_overlap > len)
+            pitch_overlap = len;
+        gain = 1.0 - s->missing_samples*ATTENUATION_INCREMENT;
+        if (gain < 0.0)
+            gain = 0.0;
+        new_step = 1.0/pitch_overlap;
+        old_step = new_step*gain;
+        new_weight = new_step;
+        old_weight = (1.0 - new_step)*gain;
+        for (i = 0;  i < pitch_overlap;  i++)
+        {
+            amp[i] = fsaturate(old_weight*s->pitchbuf[s->pitch_offset] + new_weight*amp[i]);
+            if (++s->pitch_offset >= s->pitch)
+                s->pitch_offset = 0;
+            new_weight += new_step;
+            old_weight -= old_step;
+            if (old_weight < 0.0)
+                old_weight = 0.0;
+        }
+        s->missing_samples = 0;
+    }
+    save_history(s, amp, len);
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+int plc_fillin(plc_state_t *s, pj_int16_t amp[], int len)
+{
+    /*pj_int16_t tmp[PLC_PITCH_OVERLAP_MAX];*/
+    int i;
+    int pitch_overlap;
+    float old_step;
+    float new_step;
+    float old_weight;
+    float new_weight;
+    float gain;
+    pj_int16_t *orig_amp;
+    int orig_len;
+
+    orig_amp = amp;
+    orig_len = len;
+    if (s->missing_samples == 0)
+    {
+        /* As the gap in real speech starts we need to assess the last known pitch,
+           and prepare the synthetic data we will use for fill-in */
+        normalise_history(s);
+        s->pitch = amdf_pitch(PLC_PITCH_MIN, PLC_PITCH_MAX, s->history + PLC_HISTORY_LEN - CORRELATION_SPAN - PLC_PITCH_MIN, CORRELATION_SPAN);
+        /* We overlap a 1/4 wavelength */
+        pitch_overlap = s->pitch >> 2;
+        /* Cook up a single cycle of pitch, using a single of the real signal with 1/4
+           cycle OLA'ed to make the ends join up nicely */
+        /* The first 3/4 of the cycle is a simple copy */
+        for (i = 0;  i < s->pitch - pitch_overlap;  i++)
+            s->pitchbuf[i] = s->history[PLC_HISTORY_LEN - s->pitch + i];
+        /* The last 1/4 of the cycle is overlapped with the end of the previous cycle */
+        new_step = 1.0/pitch_overlap;
+        new_weight = new_step;
+        for (  ;  i < s->pitch;  i++)
+        {
+            s->pitchbuf[i] = s->history[PLC_HISTORY_LEN - s->pitch + i]*(1.0 - new_weight) + s->history[PLC_HISTORY_LEN - 2*s->pitch + i]*new_weight;
+            new_weight += new_step;
+        }
+        /* We should now be ready to fill in the gap with repeated, decaying cycles
+           of what is in pitchbuf */
+
+        /* We need to OLA the first 1/4 wavelength of the synthetic data, to smooth
+           it into the previous real data. To avoid the need to introduce a delay
+           in the stream, reverse the last 1/4 wavelength, and OLA with that. */
+        gain = 1.0;
+        new_step = 1.0/pitch_overlap;
+        old_step = new_step;
+        new_weight = new_step;
+        old_weight = 1.0 - new_step;
+        for (i = 0;  i < pitch_overlap;  i++)
+        {
+            amp[i] = fsaturate(old_weight*s->history[PLC_HISTORY_LEN - 1 - i] + new_weight*s->pitchbuf[i]);
+            new_weight += new_step;
+            old_weight -= old_step;
+            if (old_weight < 0.0)
+                old_weight = 0.0;
+        }
+        s->pitch_offset = i;
+    }
+    else
+    {
+        gain = 1.0 - s->missing_samples*ATTENUATION_INCREMENT;
+        i = 0;
+    }
+    for (  ;  gain > 0.0  &&  i < len;  i++)
+    {
+        amp[i] = (pj_int16_t)(s->pitchbuf[s->pitch_offset]*gain);
+        gain = gain - ATTENUATION_INCREMENT;
+        if (++s->pitch_offset >= s->pitch)
+            s->pitch_offset = 0;
+    }
+    for (  ;  i < len;  i++)
+        amp[i] = 0;
+    s->missing_samples += orig_len;
+    save_history(s, amp, len);
+    return len;
+}
+/*- End of function --------------------------------------------------------*/
+
+plc_state_t *plc_init(plc_state_t *s)
+{
+    memset(s, 0, sizeof(*s));
+    return s;
+}
+/*- End of function --------------------------------------------------------*/
+
+
+/*
+ * PJMEDIA specifics
+ */
+#include <pj/assert.h>
+#include <pj/pool.h>
+#include <pj/log.h>
+
+#define THIS_FILE	"plc_steveu.c"
+
+struct steveu_plc
+{
+    plc_state_t	    state;
+    unsigned	    samples_per_frame;
+};
+
+void* pjmedia_plc_steveu_create(pj_pool_t *pool, unsigned c, unsigned f)
+{
+    struct steveu_plc *splc;
+
+    PJ_ASSERT_RETURN(c==8000, NULL);
+    PJ_UNUSED_ARG(c);
+
+    splc = pj_pool_alloc(pool, sizeof(struct steveu_plc));
+    plc_init(&splc->state);
+    splc->samples_per_frame = f;
+
+    return splc;
+}
+
+void  pjmedia_plc_steveu_save(void *obj, pj_int16_t *samples)
+{
+    struct steveu_plc *splc = obj;
+    plc_rx(&splc->state, samples, splc->samples_per_frame);
+}
+
+void  pjmedia_plc_steveu_generate(void *obj, pj_int16_t *samples)
+{
+    struct steveu_plc *splc = obj;
+    //PJ_LOG(5,(THIS_FILE, "PLC: generating lost frame"));
+    plc_fillin(&splc->state, samples, splc->samples_per_frame);
+}
+
+/*- End of file ------------------------------------------------------------*/
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/plc_steveu.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/plc_steveu.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/plc_steveu.h	(revision 1163)
@@ -0,0 +1,153 @@
+/*! \file
+ * \brief SpanDSP - a series of DSP components for telephony
+ *
+ * plc.h
+ *
+ * \author Steve Underwood <steveu@coppice.org>
+ *
+ * Copyright (C) 2004 Steve Underwood
+ *
+ * All rights reserved.
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This version may be optionally licenced under the GNU LGPL licence.
+ *
+ * A license has been granted to Digium (via disclaimer) for the use of
+ * this code.
+ */
+
+
+#if !defined(_PLC_H_)
+#define _PLC_H_
+
+
+/*! \page plc_page Packet loss concealment
+\section plc_page_sec_1 What does it do?
+The packet loss concealment module provides a suitable synthetic fill-in signal,
+to minimise the audible effect of lost packets in VoIP applications. It is not
+tied to any particular codec, and could be used with almost any codec which does not
+specify its own procedure for packet loss concealment.
+
+Where a codec specific concealment procedure exists, the algorithm is usually built
+around knowledge of the characteristics of the particular codec. It will, therefore,
+generally give better results for that particular codec than this generic concealer will.
+
+\section plc_page_sec_2 How does it work?
+While good packets are being received, the plc_rx() routine keeps a record of the trailing
+section of the known speech signal. If a packet is missed, plc_fillin() is called to produce
+a synthetic replacement for the real speech signal. The average mean difference function
+(AMDF) is applied to the last known good signal, to determine its effective pitch.
+Based on this, the last pitch period of signal is saved. Essentially, this cycle of speech
+will be repeated over and over until the real speech resumes. However, several refinements
+are needed to obtain smooth pleasant sounding results.
+
+- The two ends of the stored cycle of speech will not always fit together smoothly. This can
+  cause roughness, or even clicks, at the joins between cycles. To soften this, the
+  1/4 pitch period of real speech preceeding the cycle to be repeated is blended with the last
+  1/4 pitch period of the cycle to be repeated, using an overlap-add (OLA) technique (i.e.
+  in total, the last 5/4 pitch periods of real speech are used).
+
+- The start of the synthetic speech will not always fit together smoothly with the tail of
+  real speech passed on before the erasure was identified. Ideally, we would like to modify
+  the last 1/4 pitch period of the real speech, to blend it into the synthetic speech. However,
+  it is too late for that. We could have delayed the real speech a little, but that would
+  require more buffer manipulation, and hurt the efficiency of the no-lost-packets case
+  (which we hope is the dominant case). Instead we use a degenerate form of OLA to modify
+  the start of the synthetic data. The last 1/4 pitch period of real speech is time reversed,
+  and OLA is used to blend it with the first 1/4 pitch period of synthetic speech. The result
+  seems quite acceptable.
+
+- As we progress into the erasure, the chances of the synthetic signal being anything like
+  correct steadily fall. Therefore, the volume of the synthesized signal is made to decay
+  linearly, such that after 50ms of missing audio it is reduced to silence.
+
+- When real speech resumes, an extra 1/4 pitch period of sythetic speech is blended with the
+  start of the real speech. If the erasure is small, this smoothes the transition. If the erasure
+  is long, and the synthetic signal has faded to zero, the blending softens the start up of the
+  real signal, avoiding a kind of "click" or "pop" effect that might occur with a sudden onset.
+
+\section plc_page_sec_3 How do I use it?
+Before audio is processed, call plc_init() to create an instance of the packet loss
+concealer. For each received audio packet that is acceptable (i.e. not including those being
+dropped for being too late) call plc_rx() to record the content of the packet. Note this may
+modify the packet a little after a period of packet loss, to blend real synthetic data smoothly.
+When a real packet is not available in time, call plc_fillin() to create a sythetic substitute.
+That's it!
+*/
+
+/*! Minimum allowed pitch (66 Hz) */
+#define PLC_PITCH_MIN           120
+/*! Maximum allowed pitch (200 Hz) */
+#define PLC_PITCH_MAX           40
+/*! Maximum pitch OLA window */
+#define PLC_PITCH_OVERLAP_MAX   (PLC_PITCH_MIN >> 2)
+/*! The length over which the AMDF function looks for similarity (20 ms) */
+#define CORRELATION_SPAN        160
+/*! History buffer length. The buffer much also be at leat 1.25 times
+    PLC_PITCH_MIN, but that is much smaller than the buffer needs to be for
+    the pitch assessment. */
+#define PLC_HISTORY_LEN         (CORRELATION_SPAN + PLC_PITCH_MIN)
+
+typedef struct
+{
+    /*! Consecutive erased samples */
+    int missing_samples;
+    /*! Current offset into pitch period */
+    int pitch_offset;
+    /*! Pitch estimate */
+    int pitch;
+    /*! Buffer for a cycle of speech */
+    float pitchbuf[PLC_PITCH_MIN];
+    /*! History buffer */
+    pj_int16_t history[PLC_HISTORY_LEN];
+    /*! Current pointer into the history buffer */
+    int buf_ptr;
+} plc_state_t;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*! Process a block of received audio samples.
+    \brief Process a block of received audio samples.
+    \param s The packet loss concealer context.
+    \param amp The audio sample buffer.
+    \param len The number of samples in the buffer.
+    \return The number of samples in the buffer. */
+int plc_rx(plc_state_t *s, pj_int16_t amp[], int len);
+
+/*! Fill-in a block of missing audio samples.
+    \brief Fill-in a block of missing audio samples.
+    \param s The packet loss concealer context.
+    \param amp The audio sample buffer.
+    \param len The number of samples to be synthesised.
+    \return The number of samples synthesized. */
+int plc_fillin(plc_state_t *s, pj_int16_t amp[], int len);
+
+/*! Process a block of received V.29 modem audio samples.
+    \brief Process a block of received V.29 modem audio samples.
+    \param s The packet loss concealer context.
+    \return A pointer to the he packet loss concealer context. */
+plc_state_t *plc_init(plc_state_t *s);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/*- End of file ------------------------------------------------------------*/
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/port.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/port.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/port.c	(revision 1163)
@@ -0,0 +1,108 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/port.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+
+#define THIS_FILE	"port.c"
+
+
+/**
+ * This is an auxiliary function to initialize port info for
+ * ports which deal with PCM audio.
+ */
+PJ_DEF(pj_status_t) pjmedia_port_info_init( pjmedia_port_info *info,
+					    const pj_str_t *name,
+					    unsigned signature,
+					    unsigned clock_rate,
+					    unsigned channel_count,
+					    unsigned bits_per_sample,
+					    unsigned samples_per_frame)
+{
+    pj_bzero(info, sizeof(*info));
+
+    info->name = *name;
+    info->signature = signature;
+    info->type = PJMEDIA_TYPE_AUDIO;
+    info->has_info = PJ_TRUE;
+    info->need_info = PJ_FALSE;
+    info->pt = 0xFF;
+    info->encoding_name = pj_str("pcm");
+    info->clock_rate = clock_rate;
+    info->channel_count = channel_count;
+    info->bits_per_sample = bits_per_sample;
+    info->samples_per_frame = samples_per_frame;
+    info->bytes_per_frame = samples_per_frame * bits_per_sample / 8;
+
+    return PJ_SUCCESS;
+}
+
+
+/**
+ * Get a frame from the port (and subsequent downstream ports).
+ */
+PJ_DEF(pj_status_t) pjmedia_port_get_frame( pjmedia_port *port,
+					    pjmedia_frame *frame )
+{
+    PJ_ASSERT_RETURN(port && frame, PJ_EINVAL);
+
+    if (port->get_frame)
+	return port->get_frame(port, frame);
+    else {
+	frame->type = PJMEDIA_FRAME_TYPE_NONE;
+	return PJ_EINVALIDOP;
+    }
+}
+
+
+/**
+ * Put a frame to the port (and subsequent downstream ports).
+ */
+PJ_DEF(pj_status_t) pjmedia_port_put_frame( pjmedia_port *port,
+					    const pjmedia_frame *frame )
+{
+    PJ_ASSERT_RETURN(port && frame, PJ_EINVAL);
+
+    if (port->put_frame)
+	return port->put_frame(port, frame);
+    else
+	return PJ_EINVALIDOP;
+}
+
+
+/**
+ * Destroy port (and subsequent downstream ports)
+ */
+PJ_DEF(pj_status_t) pjmedia_port_destroy( pjmedia_port *port )
+{
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(port, PJ_EINVAL);
+
+    if (port->on_destroy)
+	status = port->on_destroy(port);
+    else
+	status = PJ_SUCCESS;
+
+    return status;
+}
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/LICENSE.txt
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/LICENSE.txt	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/LICENSE.txt	(revision 1163)
@@ -0,0 +1,65 @@
+Portable header file to contain:
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * PortAudio API Header File
+ * Latest version available at: http://www.audiomulch.com/portaudio/
+ *
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+ 
+
+Implementation files to contain:
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Latest version at: http://www.audiomulch.com/portaudio/
+ * <platform> Implementation
+ * Copyright (c) 1999-2000 <author(s)>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/README.txt
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/README.txt	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/README.txt	(revision 1163)
@@ -0,0 +1,81 @@
+README for PortAudio
+Implementations for PC DirectSound and Mac SoundManager
+
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com//
+ *
+ * Copyright (c) 1999-2000 Phil Burk and Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+PortAudio is a portable audio I/O library designed for cross-platform
+support of audio. It uses a callback mechanism to request audio processing.
+Audio can be generated in various formats, including 32 bit floating point,
+and will be converted to the native format internally.
+
+Documentation:
+	See "pa_common/portaudio.h" for API spec.
+	See docs folder for a tutorial.
+	Also see http://www.portaudio.com/docs/
+	And see "pa_tests/patest_saw.c" for an example.
+
+For information on compiling programs with PortAudio, please see the
+tutorial at:
+
+  http://www.portaudio.com/docs/pa_tutorial.html
+  
+Important Files and Folders:
+	pa_common/              = platform independant code
+	pa_common/portaudio.h   = header file for PortAudio API. Specifies API.
+	pa_common/pa_lib.c      = host independant code for all implementations.
+
+    pablio                  = simple blocking read/write interface
+    
+Platform Implementations
+    pa_asio                 = ASIO for Windows and Macintosh
+    pa_beos                 = BeOS
+    pa_mac_sm               = Macintosh Sound Manager for OS 8,9 and Carbon
+    pa_mac_core             = Macintosh Core Audio for OS X
+    pa_sgi                  = Silicon Graphics AL
+    pa_unix_oss             = OSS implementation for various Unixes
+    pa_win_ds               = Windows Direct Sound
+    pa_win_wmme             = Windows MME (most widely supported)
+    
+Test Programs
+	pa_tests/pa_fuzz.c = guitar fuzz box
+	pa_tests/pa_devs.c = print a list of available devices
+	pa_tests/pa_minlat.c = determine minimum latency for your machine
+	pa_tests/paqa_devs.c = self test that opens all devices
+	pa_tests/paqa_errs.c = test error detection and reporting
+	pa_tests/patest_clip.c = hear a sine wave clipped and unclipped
+	pa_tests/patest_dither.c = hear effects of dithering (extremely subtle)
+	pa_tests/patest_pink.c = fun with pink noise
+	pa_tests/patest_record.c = record and playback some audio
+	pa_tests/patest_maxsines.c = how many sine waves can we play? Tests Pa_GetCPULoad().
+	pa_tests/patest_sine.c = output a sine wave in a simple PA app
+	pa_tests/patest_sync.c = test syncronization of audio and video
+	pa_tests/patest_wire.c = pass input to output, wire simulator
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/V19-devel-readme.txt
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/V19-devel-readme.txt	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/V19-devel-readme.txt	(revision 1163)
@@ -0,0 +1,222 @@
+STATUS:
+
+MME, DirectSound and ASIO versions are more-or-less working. See FIXMEs @todos
+and the proposals matrix at portaudio.com for further status.
+
+The pa_tests directory contains tests. pa_tests/README.txt notes which tests
+currently build.  
+
+The PaUtil support code is finished enough for other implementations to be
+ported. No changes are expected to be made to the definition of the PaUtil
+functions.
+
+Note that it's not yet 100% clear how the current support functions
+will interact with blocking read/write streams.
+
+BUILD INSTRUCTIONS
+
+to build tests/patest_sine.c you will need to compile and link the following
+files (MME)
+pa_common\pa_process.c
+pa_common\pa_skeleton.c
+pa_common\pa_stream.c
+pa_common\pa_trace.c
+pa_common\pa_converters.c
+pa_common\pa_cpuload.c
+pa_common\pa_dither.c
+pa_common\pa_front.c
+pa_common\pa_allocation.h
+pa_win\pa_win_util.c
+pa_win\pa_win_hostapis.c
+pa_win_wmme\pa_win_wmme.c
+
+see below for a description of these files.
+               
+
+FILES:
+
+portaudio.h
+    public api header file
+
+pa_front.c
+    implements the interface defined in portaudio.h. manages multiple host apis.
+    validates function parameters before calling through to host apis. tracks
+    open streams and closes them at Pa_Terminate().
+
+pa_util.h 
+    declares utility functions for use my implementations. including utility
+    functions which must be implemented separately for each platform.
+
+pa_hostapi.h
+    hostapi representation structure used to interface between pa_front.c
+    and implementations
+    
+pa_stream.c/h
+    stream interface and representation structures and helper functions
+    used to interface between pa_front.c and implementations
+
+pa_cpuload.c/h
+    source and header for cpu load calculation facility
+
+pa_trace.c/h
+    source and header for debug trace log facility
+
+pa_converters.c/h
+    sample buffer conversion facility
+
+pa_dither.c/h
+    dither noise generator
+
+pa_process.c/h
+    callback buffer processing facility including interleave and block adaption
+
+pa_allocation.c/h
+    allocation context for tracking groups of allocations
+
+pa_skeleton.c
+    an skeleton implementation showing how the common code can be used.
+
+pa_win_util.c
+    Win32 implementation of platform specific PaUtil functions (memory allocation,
+    usec clock, Pa_Sleep().)  The file will be used with all Win32 host APIs.
+    
+pa_win_hostapis.c
+    contains the paHostApiInitializers array and an implementation of
+    Pa_GetDefaultHostApi() for win32 builds.
+
+pa_win_wmme.c
+    Win32 host api implementation for the windows multimedia extensions audio API.
+
+pa_win_wmme.h
+    public header file containing interfaces to mme-specific functions and the
+    deviceInfo data structure.
+
+
+CODING GUIDELINES:
+
+naming conventions:
+    #defines begin with PA_
+    #defines local to a file end with _
+    global utility variables begin with paUtil
+    global utility types begin with PaUtil  (including function types)
+    global utility functions begin with PaUtil_
+    static variables end with _
+    static constants begin with const and end with _
+    static funtions have no special prefix/suffix
+
+In general, implementations should declare all of their members static,
+except for their initializer which should be exported. All exported names
+should be preceeded by Pa<MN>_ where MN is the module name, for example
+the windows mme initializer should be named PaWinWmme_Initialize().
+
+Every host api should define an initializer which returns an error code
+and a PaHostApiInterface*. The initializer should only return an error other
+than paNoError if it encounters an unexpected and fatal error (memory allocation
+error for example). In general, there may be conditions under which it returns
+a NULL interface pointer and also returns paNoError. For example, if the ASIO
+implementation detects that ASIO is not installed, it should return a
+NULL interface, and paNoError.
+
+Platform-specific shared functions should begin with Pa<PN>_ where PN is the
+platform name. eg. PaWin_ for windows, PaUnix_ for unix.
+
+The above two conventions should also be followed whenever it is necessary to
+share functions accross multiple source files.
+
+Two utilities for debug messages are provided. The PA_DEBUG macro defined in
+pa_implementation.h provides a simple way to print debug messages to stderr.
+Due to real-time performance issues, PA_DEBUG may not be suitable for use
+within the portaudio processing callback, or in other threads. In such cases
+the event tracing facility provided in pa_trace.h may be more appropriate.
+
+If PA_LOG_API_CALLS is defined, all calls to the public PortAudio API
+will be logged to stderr along with parameter and return values.
+
+
+TODO:
+    (this list is totally out of date)
+    
+    finish coding converter functions in pa_converters.c (anyone?)
+
+    implement block adaption in pa_process.c (phil?)
+
+    fix all current tests to work with new code. this should mostly involve
+    changing PortAudioStream to PaStream, and GetDefaultDeviceID to GetDefaultDevice etc.
+
+    write some new tests to exercise the multi-api functions
+
+    write (doxygen) documentation for pa_trace (phil?)
+
+    remove unused typeids from PaHostAPITypeID
+
+    create a global configuration file which documents which PA_ defines can be
+    used for configuration
+
+    need a coding standard for comment formatting
+
+    migrate directx (phil)
+
+    migrate asio (ross?, stephane?)
+
+    see top of pa_win_wmme.c for MME todo items (ross)
+
+    write style guide document (ross)
+    
+    
+DESIGN ISSUES:
+    (this list is totally out of date)
+    
+    consider removing Pa_ConvertHostApiDeviceIndexToGlobalDeviceIndex() from the API
+
+    switch to new latency parameter mechanism now (?)
+    
+    question: if input or outputDriverInfo structures are passed for a different
+    hostApi from the one being called, do we return an error or just ignore
+    them? (i think return error)
+
+    consider renaming PortAudioCallback to PaStreamCallback
+
+    consider renaming PaError, PaResult
+    
+
+ASSORTED DISORGANISED NOTES:
+
+    NOTE:
+        pa_lib.c performs the following validations for Pa_OpenStream() which we do not currently do:
+        - checks the device info to make sure that the device supports the requested sample rate,
+            it may also change the sample rate to the "closest available" sample rate if it
+            is within a particular error margin
+
+    rationale for breaking up internalPortAudioStream:
+        each implementation has its own requirements and behavior, and should be
+        able to choose the best way to operate without being limited by the
+        constraints imposed by a common infrastructure. in other words the
+        implementations should be able to pick and choose services from the
+        common infrastructure. currently identified services include:
+
+        - cpu load tracking
+        - buffering and conversion service (same code works for input and output)
+            - should support buffer multiplexing (non-integer length input and output buffers)
+            - in-place conversion where possible (only for callback, read/write always copies)
+            - should manage allocation of temporary buffers if necessary
+        - instrumentation (should be able to be disabled): callback count, framesProcessed
+        - common data: magic, streamInterface, callback, userdata
+
+
+- conversion functions: 
+	- should handle temp buffer allocation
+	- dithering (random number state per-stream)
+	- buffer size mismatches
+	- with new buffer slip rules, temp buffers may always be needed
+	- we should aim for in-place conversion wherever possible
+	- does phil's code support in-place conversion?  (yes)              
+
+- dicuss relationship between user and host buffer sizes
+	- completely independent.. individual implementations may constrain
+    host buffer sizes if necessary
+
+
+- discuss device capabilities:
+	- i'd like to be able to request certain information:
+	- channel count for example
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/dsound_wrapper.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/dsound_wrapper.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/dsound_wrapper.c	(revision 1163)
@@ -0,0 +1,621 @@
+/*
+ * $Id: dsound_wrapper.c,v 1.1.1.1.2.11 2003/09/07 13:04:53 rossbencina Exp $
+ * Simplified DirectSound interface.
+ *
+ * Author: Phil Burk & Robert Marsanyi
+ *
+ * PortAudio Portable Real-Time Audio Library
+ * For more information see: http://www.softsynth.com/portaudio/
+ * DirectSound Implementation
+ * Copyright (c) 1999-2000 Phil Burk & Robert Marsanyi
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+
+#include "dsound_wrapper.h"
+#include "pa_trace.h"
+
+/*
+    Rather than linking with dxguid.a or using "#define INITGUID" to force a
+    header file to instantiate the required GUID(s), we define them directly
+    below.
+*/
+#include <initguid.h> // needed for the DEFINE_GUID macro
+DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
+
+
+/************************************************************************************/
+DSoundEntryPoints dswDSoundEntryPoints = { 0, 0, 0, 0, 0, 0, 0 };
+/************************************************************************************/
+static HRESULT WINAPI DummyDirectSoundCreate(LPGUID lpcGuidDevice, LPDIRECTSOUND *ppDS, LPUNKNOWN pUnkOuter)
+{
+    (void)lpcGuidDevice; /* unused parameter */
+    (void)ppDS; /* unused parameter */
+    (void)pUnkOuter; /* unused parameter */
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI DummyDirectSoundEnumerateW(LPDSENUMCALLBACKW lpDSEnumCallback, LPVOID lpContext)
+{
+    (void)lpDSEnumCallback; /* unused parameter */
+    (void)lpContext; /* unused parameter */
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI DummyDirectSoundEnumerateA(LPDSENUMCALLBACKA lpDSEnumCallback, LPVOID lpContext)
+{
+    (void)lpDSEnumCallback; /* unused parameter */
+    (void)lpContext; /* unused parameter */
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI DummyDirectSoundCaptureCreate(LPGUID lpcGUID, LPDIRECTSOUNDCAPTURE *lplpDSC, LPUNKNOWN pUnkOuter)
+{
+    (void)lpcGUID; /* unused parameter */
+    (void)lplpDSC; /* unused parameter */
+    (void)pUnkOuter; /* unused parameter */
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI DummyDirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW lpDSCEnumCallback, LPVOID lpContext)
+{
+    (void)lpDSCEnumCallback; /* unused parameter */
+    (void)lpContext; /* unused parameter */
+    return E_NOTIMPL;
+}
+
+static HRESULT WINAPI DummyDirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA lpDSCEnumCallback, LPVOID lpContext)
+{
+    (void)lpDSCEnumCallback; /* unused parameter */
+    (void)lpContext; /* unused parameter */
+    return E_NOTIMPL;
+}
+
+#ifndef _T
+#   define _T(s)    s
+#endif
+
+/************************************************************************************/
+void DSW_InitializeDSoundEntryPoints(void)
+{
+    dswDSoundEntryPoints.hInstance_ = LoadLibrary(_T("dsound.dll"));
+    if( dswDSoundEntryPoints.hInstance_ != NULL )
+    {
+        dswDSoundEntryPoints.DirectSoundCreate =
+                (HRESULT (WINAPI *)(LPGUID, LPDIRECTSOUND *, LPUNKNOWN))
+                GetProcAddress( dswDSoundEntryPoints.hInstance_, _T("DirectSoundCreate") );
+        if( dswDSoundEntryPoints.DirectSoundCreate == NULL )
+            dswDSoundEntryPoints.DirectSoundCreate = DummyDirectSoundCreate;
+
+        dswDSoundEntryPoints.DirectSoundEnumerateW =
+                (HRESULT (WINAPI *)(LPDSENUMCALLBACKW, LPVOID))
+                GetProcAddress( dswDSoundEntryPoints.hInstance_, _T("DirectSoundEnumerateW") );
+        if( dswDSoundEntryPoints.DirectSoundEnumerateW == NULL )
+            dswDSoundEntryPoints.DirectSoundEnumerateW = DummyDirectSoundEnumerateW;
+
+        dswDSoundEntryPoints.DirectSoundEnumerateA =
+                (HRESULT (WINAPI *)(LPDSENUMCALLBACKA, LPVOID))
+                GetProcAddress( dswDSoundEntryPoints.hInstance_, _T("DirectSoundEnumerateA") );
+        if( dswDSoundEntryPoints.DirectSoundEnumerateA == NULL )
+            dswDSoundEntryPoints.DirectSoundEnumerateA = DummyDirectSoundEnumerateA;
+
+        dswDSoundEntryPoints.DirectSoundCaptureCreate =
+                (HRESULT (WINAPI *)(LPGUID, LPDIRECTSOUNDCAPTURE *, LPUNKNOWN))
+                GetProcAddress( dswDSoundEntryPoints.hInstance_, _T("DirectSoundCaptureCreate") );
+        if( dswDSoundEntryPoints.DirectSoundCaptureCreate == NULL )
+            dswDSoundEntryPoints.DirectSoundCaptureCreate = DummyDirectSoundCaptureCreate;
+
+        dswDSoundEntryPoints.DirectSoundCaptureEnumerateW =
+                (HRESULT (WINAPI *)(LPDSENUMCALLBACKW, LPVOID))
+                GetProcAddress( dswDSoundEntryPoints.hInstance_, _T("DirectSoundCaptureEnumerateW") );
+        if( dswDSoundEntryPoints.DirectSoundCaptureEnumerateW == NULL )
+            dswDSoundEntryPoints.DirectSoundCaptureEnumerateW = DummyDirectSoundCaptureEnumerateW;
+
+        dswDSoundEntryPoints.DirectSoundCaptureEnumerateA =
+                (HRESULT (WINAPI *)(LPDSENUMCALLBACKA, LPVOID))
+                GetProcAddress( dswDSoundEntryPoints.hInstance_, _T("DirectSoundCaptureEnumerateA") );
+        if( dswDSoundEntryPoints.DirectSoundCaptureEnumerateA == NULL )
+            dswDSoundEntryPoints.DirectSoundCaptureEnumerateA = DummyDirectSoundCaptureEnumerateA;
+    }
+    else
+    {
+        /* initialize with dummy entry points to make live easy when ds isn't present */
+        dswDSoundEntryPoints.DirectSoundCreate = DummyDirectSoundCreate;
+        dswDSoundEntryPoints.DirectSoundEnumerateW = DummyDirectSoundEnumerateW;
+        dswDSoundEntryPoints.DirectSoundEnumerateA = DummyDirectSoundEnumerateA;
+        dswDSoundEntryPoints.DirectSoundCaptureCreate = DummyDirectSoundCaptureCreate;
+        dswDSoundEntryPoints.DirectSoundCaptureEnumerateW = DummyDirectSoundCaptureEnumerateW;
+        dswDSoundEntryPoints.DirectSoundCaptureEnumerateA = DummyDirectSoundCaptureEnumerateA;
+    }
+}
+/************************************************************************************/
+void DSW_TerminateDSoundEntryPoints(void)
+{
+    if( dswDSoundEntryPoints.hInstance_ != NULL )
+    {
+        FreeLibrary( dswDSoundEntryPoints.hInstance_ );
+        dswDSoundEntryPoints.hInstance_ = NULL;
+        /* ensure that we crash reliably if the entry points arent initialised */
+        dswDSoundEntryPoints.DirectSoundCreate = 0;
+        dswDSoundEntryPoints.DirectSoundEnumerateW = 0;
+        dswDSoundEntryPoints.DirectSoundEnumerateA = 0;
+        dswDSoundEntryPoints.DirectSoundCaptureCreate = 0;
+        dswDSoundEntryPoints.DirectSoundCaptureEnumerateW = 0;
+        dswDSoundEntryPoints.DirectSoundCaptureEnumerateA = 0;
+    }
+}
+/************************************************************************************/
+void DSW_Term( DSoundWrapper *dsw )
+{
+    // Cleanup the sound buffers
+    if (dsw->dsw_OutputBuffer)
+    {
+        IDirectSoundBuffer_Stop( dsw->dsw_OutputBuffer );
+        IDirectSoundBuffer_Release( dsw->dsw_OutputBuffer );
+        dsw->dsw_OutputBuffer = NULL;
+    }
+
+    if (dsw->dsw_InputBuffer)
+    {
+        IDirectSoundCaptureBuffer_Stop( dsw->dsw_InputBuffer );
+        IDirectSoundCaptureBuffer_Release( dsw->dsw_InputBuffer );
+        dsw->dsw_InputBuffer = NULL;
+    }
+
+    if (dsw->dsw_pDirectSoundCapture)
+    {
+        IDirectSoundCapture_Release( dsw->dsw_pDirectSoundCapture );
+        dsw->dsw_pDirectSoundCapture = NULL;
+    }
+
+    if (dsw->dsw_pDirectSound)
+    {
+        IDirectSound_Release( dsw->dsw_pDirectSound );
+        dsw->dsw_pDirectSound = NULL;
+    }
+}
+/************************************************************************************/
+HRESULT DSW_Init( DSoundWrapper *dsw )
+{
+    memset( dsw, 0, sizeof(DSoundWrapper) );
+    return 0;
+}
+/************************************************************************************/
+HRESULT DSW_InitOutputDevice( DSoundWrapper *dsw, LPGUID lpGUID )
+{
+    // Create the DS object
+    HRESULT hr = dswDSoundEntryPoints.DirectSoundCreate( lpGUID, &dsw->dsw_pDirectSound, NULL );
+    if( hr != DS_OK ) return hr;
+    return hr;
+}
+
+/************************************************************************************/
+HRESULT DSW_InitOutputBuffer( DSoundWrapper *dsw, unsigned long nFrameRate, WORD nChannels, int bytesPerBuffer )
+{
+    DWORD          dwDataLen;
+    DWORD          playCursor;
+    HRESULT        result;
+    LPDIRECTSOUNDBUFFER pPrimaryBuffer;
+    HWND           hWnd;
+    HRESULT        hr;
+    WAVEFORMATEX   wfFormat;
+    DSBUFFERDESC   primaryDesc;
+    DSBUFFERDESC   secondaryDesc;
+    unsigned char* pDSBuffData;
+    LARGE_INTEGER  counterFrequency;
+
+    dsw->dsw_OutputSize = bytesPerBuffer;
+    dsw->dsw_OutputRunning = FALSE;
+    dsw->dsw_OutputUnderflows = 0;
+    dsw->dsw_FramesWritten = 0;
+    dsw->dsw_BytesPerOutputFrame = nChannels * sizeof(short);
+
+    // We were using getForegroundWindow() but sometimes the ForegroundWindow may not be the
+    // applications's window. Also if that window is closed before the Buffer is closed
+    // then DirectSound can crash. (Thanks for Scott Patterson for reporting this.)
+    // So we will use GetDesktopWindow() which was suggested by Miller Puckette.
+    // hWnd = GetForegroundWindow();
+    //
+    //  FIXME: The example code I have on the net creates a hidden window that
+    //      is managed by our code - I think we should do that - one hidden
+    //      window for the whole of Pa_DS
+    //
+    hWnd = GetDesktopWindow();
+
+    // Set cooperative level to DSSCL_EXCLUSIVE so that we can get 16 bit output, 44.1 KHz.
+    // Exclusize also prevents unexpected sounds from other apps during a performance.
+    if ((hr = IDirectSound_SetCooperativeLevel( dsw->dsw_pDirectSound,
+              hWnd, DSSCL_EXCLUSIVE)) != DS_OK)
+    {
+        return hr;
+    }
+
+    // -----------------------------------------------------------------------
+    // Create primary buffer and set format just so we can specify our custom format.
+    // Otherwise we would be stuck with the default which might be 8 bit or 22050 Hz.
+    // Setup the primary buffer description
+    ZeroMemory(&primaryDesc, sizeof(DSBUFFERDESC));
+    primaryDesc.dwSize        = sizeof(DSBUFFERDESC);
+    primaryDesc.dwFlags       = DSBCAPS_PRIMARYBUFFER; // all panning, mixing, etc done by synth
+    primaryDesc.dwBufferBytes = 0;
+    primaryDesc.lpwfxFormat   = NULL;
+    // Create the buffer
+    if ((result = IDirectSound_CreateSoundBuffer( dsw->dsw_pDirectSound,
+                  &primaryDesc, &pPrimaryBuffer, NULL)) != DS_OK) return result;
+    // Define the buffer format
+    wfFormat.wFormatTag = WAVE_FORMAT_PCM;
+    wfFormat.nChannels = nChannels;
+    wfFormat.nSamplesPerSec = nFrameRate;
+    wfFormat.wBitsPerSample = 8 * sizeof(short);
+    wfFormat.nBlockAlign = (WORD)(wfFormat.nChannels * (wfFormat.wBitsPerSample / 8));
+    wfFormat.nAvgBytesPerSec = wfFormat.nSamplesPerSec * wfFormat.nBlockAlign;
+    wfFormat.cbSize = 0;  /* No extended format info. */
+    // Set the primary buffer's format
+    if((result = IDirectSoundBuffer_SetFormat( pPrimaryBuffer, &wfFormat)) != DS_OK) return result;
+
+    // ----------------------------------------------------------------------
+    // Setup the secondary buffer description
+    ZeroMemory(&secondaryDesc, sizeof(DSBUFFERDESC));
+    secondaryDesc.dwSize = sizeof(DSBUFFERDESC);
+    secondaryDesc.dwFlags =  DSBCAPS_GLOBALFOCUS | DSBCAPS_GETCURRENTPOSITION2;
+    secondaryDesc.dwBufferBytes = bytesPerBuffer;
+    secondaryDesc.lpwfxFormat = &wfFormat;
+    // Create the secondary buffer
+    if ((result = IDirectSound_CreateSoundBuffer( dsw->dsw_pDirectSound,
+                  &secondaryDesc, &dsw->dsw_OutputBuffer, NULL)) != DS_OK) return result;
+    // Lock the DS buffer
+    if ((result = IDirectSoundBuffer_Lock( dsw->dsw_OutputBuffer, 0, dsw->dsw_OutputSize, (LPVOID*)&pDSBuffData,
+                                           &dwDataLen, NULL, 0, 0)) != DS_OK) return result;
+    // Zero the DS buffer
+    ZeroMemory(pDSBuffData, dwDataLen);
+    // Unlock the DS buffer
+    if ((result = IDirectSoundBuffer_Unlock( dsw->dsw_OutputBuffer, pDSBuffData, dwDataLen, NULL, 0)) != DS_OK) return result;
+    if( QueryPerformanceFrequency( &counterFrequency ) )
+    {
+        int framesInBuffer = bytesPerBuffer / (nChannels * sizeof(short));
+        dsw->dsw_CounterTicksPerBuffer.QuadPart = (counterFrequency.QuadPart * framesInBuffer) / nFrameRate;
+    }
+    else
+    {
+        dsw->dsw_CounterTicksPerBuffer.QuadPart = 0;
+    }
+    // Let DSound set the starting write position because if we set it to zero, it looks like the
+    // buffer is full to begin with. This causes a long pause before sound starts when using large buffers.
+    hr = IDirectSoundBuffer_GetCurrentPosition( dsw->dsw_OutputBuffer, &playCursor, &dsw->dsw_WriteOffset );
+    if( hr != DS_OK )
+    {
+        return hr;
+    }
+    dsw->dsw_FramesWritten = dsw->dsw_WriteOffset / dsw->dsw_BytesPerOutputFrame;
+    /* printf("DSW_InitOutputBuffer: playCursor = %d, writeCursor = %d\n", playCursor, dsw->dsw_WriteOffset ); */
+    return DS_OK;
+}
+
+/************************************************************************************/
+HRESULT DSW_StartOutput( DSoundWrapper *dsw )
+{
+    HRESULT        hr;
+    QueryPerformanceCounter( &dsw->dsw_LastPlayTime );
+    dsw->dsw_LastPlayCursor = 0;
+    dsw->dsw_FramesPlayed = 0;
+    hr = IDirectSoundBuffer_SetCurrentPosition( dsw->dsw_OutputBuffer, 0 );
+    if( hr != DS_OK )
+    {
+        return hr;
+    }
+    // Start the buffer playback in a loop.
+    if( dsw->dsw_OutputBuffer != NULL )
+    {
+        hr = IDirectSoundBuffer_Play( dsw->dsw_OutputBuffer, 0, 0, DSBPLAY_LOOPING );
+        if( hr != DS_OK )
+        {
+            return hr;
+        }
+        dsw->dsw_OutputRunning = TRUE;
+    }
+
+    return 0;
+}
+/************************************************************************************/
+HRESULT DSW_StopOutput( DSoundWrapper *dsw )
+{
+    // Stop the buffer playback
+    if( dsw->dsw_OutputBuffer != NULL )
+    {
+        dsw->dsw_OutputRunning = FALSE;
+        return IDirectSoundBuffer_Stop( dsw->dsw_OutputBuffer );
+    }
+    else return 0;
+}
+
+/************************************************************************************/
+HRESULT DSW_QueryOutputFilled( DSoundWrapper *dsw, long *bytesFilledPtr )
+{
+    HRESULT hr;
+    DWORD   playCursor;
+    DWORD   writeCursor;
+    long    bytesFilled;
+    // Query to see where play position is.
+    // We don't need the writeCursor but sometimes DirectSound doesn't handle NULLS correctly
+    // so let's pass a pointer just to be safe.
+    hr = IDirectSoundBuffer_GetCurrentPosition( dsw->dsw_OutputBuffer, &playCursor, &writeCursor );
+    if( hr != DS_OK )
+    {
+        return hr;
+    }
+    bytesFilled = dsw->dsw_WriteOffset - playCursor;
+    if( bytesFilled < 0 ) bytesFilled += dsw->dsw_OutputSize; // unwrap offset
+    *bytesFilledPtr = bytesFilled;
+    return hr;
+}
+
+/************************************************************************************
+ * Determine how much space can be safely written to in DS buffer.
+ * Detect underflows and overflows.
+ * Does not allow writing into safety gap maintained by DirectSound.
+ */
+HRESULT DSW_QueryOutputSpace( DSoundWrapper *dsw, long *bytesEmpty )
+{
+    HRESULT hr;
+    DWORD   playCursor;
+    DWORD   writeCursor;
+    long    numBytesEmpty;
+    long    playWriteGap;
+    // Query to see how much room is in buffer.
+    hr = IDirectSoundBuffer_GetCurrentPosition( dsw->dsw_OutputBuffer, &playCursor, &writeCursor );
+    if( hr != DS_OK )
+    {
+        return hr;
+    }
+    // Determine size of gap between playIndex and WriteIndex that we cannot write into.
+    playWriteGap = writeCursor - playCursor;
+    if( playWriteGap < 0 ) playWriteGap += dsw->dsw_OutputSize; // unwrap
+    /* DirectSound doesn't have a large enough playCursor so we cannot detect wrap-around. */
+    /* Attempt to detect playCursor wrap-around and correct it. */
+    if( dsw->dsw_OutputRunning && (dsw->dsw_CounterTicksPerBuffer.QuadPart != 0) )
+    {
+        /* How much time has elapsed since last check. */
+        LARGE_INTEGER   currentTime;
+        LARGE_INTEGER   elapsedTime;
+        long            bytesPlayed;
+        long            bytesExpected;
+        long            buffersWrapped;
+        QueryPerformanceCounter( &currentTime );
+        elapsedTime.QuadPart = currentTime.QuadPart - dsw->dsw_LastPlayTime.QuadPart;
+        dsw->dsw_LastPlayTime = currentTime;
+        /* How many bytes does DirectSound say have been played. */
+        bytesPlayed = playCursor - dsw->dsw_LastPlayCursor;
+        if( bytesPlayed < 0 ) bytesPlayed += dsw->dsw_OutputSize; // unwrap
+        dsw->dsw_LastPlayCursor = playCursor;
+        /* Calculate how many bytes we would have expected to been played by now. */
+        bytesExpected = (long) ((elapsedTime.QuadPart * dsw->dsw_OutputSize) / dsw->dsw_CounterTicksPerBuffer.QuadPart);
+        buffersWrapped = (bytesExpected - bytesPlayed) / dsw->dsw_OutputSize;
+        if( buffersWrapped > 0 )
+        {
+            playCursor += (buffersWrapped * dsw->dsw_OutputSize);
+            bytesPlayed += (buffersWrapped * dsw->dsw_OutputSize);
+        }
+        /* Maintain frame output cursor. */
+        dsw->dsw_FramesPlayed += (bytesPlayed / dsw->dsw_BytesPerOutputFrame);
+    }
+    numBytesEmpty = playCursor - dsw->dsw_WriteOffset;
+    if( numBytesEmpty < 0 ) numBytesEmpty += dsw->dsw_OutputSize; // unwrap offset
+    /* Have we underflowed? */
+    if( numBytesEmpty > (dsw->dsw_OutputSize - playWriteGap) )
+    {
+        if( dsw->dsw_OutputRunning )
+        {
+            dsw->dsw_OutputUnderflows += 1;
+        }
+        dsw->dsw_WriteOffset = writeCursor;
+        numBytesEmpty = dsw->dsw_OutputSize - playWriteGap;
+    }
+    *bytesEmpty = numBytesEmpty;
+    return hr;
+}
+
+/************************************************************************************/
+HRESULT DSW_ZeroEmptySpace( DSoundWrapper *dsw )
+{
+    HRESULT hr;
+    LPBYTE lpbuf1 = NULL;
+    LPBYTE lpbuf2 = NULL;
+    DWORD dwsize1 = 0;
+    DWORD dwsize2 = 0;
+    long  bytesEmpty;
+    hr = DSW_QueryOutputSpace( dsw, &bytesEmpty ); // updates dsw_FramesPlayed
+    if (hr != DS_OK) return hr;
+    if( bytesEmpty == 0 ) return DS_OK;
+    // Lock free space in the DS
+    hr = IDirectSoundBuffer_Lock( dsw->dsw_OutputBuffer, dsw->dsw_WriteOffset, bytesEmpty, (void **) &lpbuf1, &dwsize1,
+                                  (void **) &lpbuf2, &dwsize2, 0);
+    if (hr == DS_OK)
+    {
+        // Copy the buffer into the DS
+        ZeroMemory(lpbuf1, dwsize1);
+        if(lpbuf2 != NULL)
+        {
+            ZeroMemory(lpbuf2, dwsize2);
+        }
+        // Update our buffer offset and unlock sound buffer
+        dsw->dsw_WriteOffset = (dsw->dsw_WriteOffset + dwsize1 + dwsize2) % dsw->dsw_OutputSize;
+        IDirectSoundBuffer_Unlock( dsw->dsw_OutputBuffer, lpbuf1, dwsize1, lpbuf2, dwsize2);
+        dsw->dsw_FramesWritten += bytesEmpty / dsw->dsw_BytesPerOutputFrame;
+    }
+    return hr;
+}
+
+/************************************************************************************/
+HRESULT DSW_WriteBlock( DSoundWrapper *dsw, char *buf, long numBytes )
+{
+    HRESULT hr;
+    LPBYTE lpbuf1 = NULL;
+    LPBYTE lpbuf2 = NULL;
+    DWORD dwsize1 = 0;
+    DWORD dwsize2 = 0;
+    // Lock free space in the DS
+    hr = IDirectSoundBuffer_Lock( dsw->dsw_OutputBuffer, dsw->dsw_WriteOffset, numBytes, (void **) &lpbuf1, &dwsize1,
+                                  (void **) &lpbuf2, &dwsize2, 0);
+    if (hr == DS_OK)
+    {
+        // Copy the buffer into the DS
+        CopyMemory(lpbuf1, buf, dwsize1);
+        if(lpbuf2 != NULL)
+        {
+            CopyMemory(lpbuf2, buf+dwsize1, dwsize2);
+        }
+        // Update our buffer offset and unlock sound buffer
+        dsw->dsw_WriteOffset = (dsw->dsw_WriteOffset + dwsize1 + dwsize2) % dsw->dsw_OutputSize;
+        IDirectSoundBuffer_Unlock( dsw->dsw_OutputBuffer, lpbuf1, dwsize1, lpbuf2, dwsize2);
+        dsw->dsw_FramesWritten += numBytes / dsw->dsw_BytesPerOutputFrame;
+    }
+    return hr;
+}
+
+/************************************************************************************/
+DWORD DSW_GetOutputStatus( DSoundWrapper *dsw )
+{
+    DWORD status;
+    if (IDirectSoundBuffer_GetStatus( dsw->dsw_OutputBuffer, &status ) != DS_OK)
+        return( DSERR_INVALIDPARAM );
+    else
+        return( status );
+}
+
+/* These routines are used to support audio input.
+ * Do NOT compile these calls when using NT4 because it does
+ * not support the entry points.
+ */
+/************************************************************************************/
+HRESULT DSW_InitInputDevice( DSoundWrapper *dsw, LPGUID lpGUID )
+{
+    HRESULT hr = dswDSoundEntryPoints.DirectSoundCaptureCreate(  lpGUID, &dsw->dsw_pDirectSoundCapture,   NULL );
+    if( hr != DS_OK ) return hr;
+    return hr;
+}
+/************************************************************************************/
+HRESULT DSW_InitInputBuffer( DSoundWrapper *dsw, unsigned long nFrameRate, WORD nChannels, int bytesPerBuffer )
+{
+    DSCBUFFERDESC  captureDesc;
+    WAVEFORMATEX   wfFormat;
+    HRESULT        result;
+    
+    dsw->dsw_BytesPerInputFrame = nChannels * sizeof(short);
+
+    // Define the buffer format
+    wfFormat.wFormatTag      = WAVE_FORMAT_PCM;
+    wfFormat.nChannels       = nChannels;
+    wfFormat.nSamplesPerSec  = nFrameRate;
+    wfFormat.wBitsPerSample  = 8 * sizeof(short);
+    wfFormat.nBlockAlign     = (WORD)(wfFormat.nChannels * (wfFormat.wBitsPerSample / 8));
+    wfFormat.nAvgBytesPerSec = wfFormat.nSamplesPerSec * wfFormat.nBlockAlign;
+    wfFormat.cbSize          = 0;   /* No extended format info. */
+    dsw->dsw_InputSize = bytesPerBuffer;
+    // ----------------------------------------------------------------------
+    // Setup the secondary buffer description
+    ZeroMemory(&captureDesc, sizeof(DSCBUFFERDESC));
+    captureDesc.dwSize = sizeof(DSCBUFFERDESC);
+    captureDesc.dwFlags =  0;
+    captureDesc.dwBufferBytes = bytesPerBuffer;
+    captureDesc.lpwfxFormat = &wfFormat;
+    // Create the capture buffer
+    if ((result = IDirectSoundCapture_CreateCaptureBuffer( dsw->dsw_pDirectSoundCapture,
+                  &captureDesc, &dsw->dsw_InputBuffer, NULL)) != DS_OK) return result;
+    dsw->dsw_ReadOffset = 0;  // reset last read position to start of buffer
+    return DS_OK;
+}
+
+/************************************************************************************/
+HRESULT DSW_StartInput( DSoundWrapper *dsw )
+{
+    // Start the buffer playback
+    if( dsw->dsw_InputBuffer != NULL )
+    {
+        return IDirectSoundCaptureBuffer_Start( dsw->dsw_InputBuffer, DSCBSTART_LOOPING );
+    }
+    else return 0;
+}
+
+/************************************************************************************/
+HRESULT DSW_StopInput( DSoundWrapper *dsw )
+{
+    // Stop the buffer playback
+    if( dsw->dsw_InputBuffer != NULL )
+    {
+        return IDirectSoundCaptureBuffer_Stop( dsw->dsw_InputBuffer );
+    }
+    else return 0;
+}
+
+/************************************************************************************/
+HRESULT DSW_QueryInputFilled( DSoundWrapper *dsw, long *bytesFilled )
+{
+    HRESULT hr;
+    DWORD capturePos;
+    DWORD readPos;
+    long  filled;
+    // Query to see how much data is in buffer.
+    // We don't need the capture position but sometimes DirectSound doesn't handle NULLS correctly
+    // so let's pass a pointer just to be safe.
+    hr = IDirectSoundCaptureBuffer_GetCurrentPosition( dsw->dsw_InputBuffer, &capturePos, &readPos );
+    if( hr != DS_OK )
+    {
+        return hr;
+    }
+    filled = readPos - dsw->dsw_ReadOffset;
+    if( filled < 0 ) filled += dsw->dsw_InputSize; // unwrap offset
+    *bytesFilled = filled;
+    return hr;
+}
+
+/************************************************************************************/
+HRESULT DSW_ReadBlock( DSoundWrapper *dsw, char *buf, long numBytes )
+{
+    HRESULT hr;
+    LPBYTE lpbuf1 = NULL;
+    LPBYTE lpbuf2 = NULL;
+    DWORD dwsize1 = 0;
+    DWORD dwsize2 = 0;
+    // Lock free space in the DS
+    hr = IDirectSoundCaptureBuffer_Lock ( dsw->dsw_InputBuffer, dsw->dsw_ReadOffset, numBytes, (void **) &lpbuf1, &dwsize1,
+                                          (void **) &lpbuf2, &dwsize2, 0);
+    if (hr == DS_OK)
+    {
+        // Copy from DS to the buffer
+        CopyMemory( buf, lpbuf1, dwsize1);
+        if(lpbuf2 != NULL)
+        {
+            CopyMemory( buf+dwsize1, lpbuf2, dwsize2);
+        }
+        // Update our buffer offset and unlock sound buffer
+        dsw->dsw_ReadOffset = (dsw->dsw_ReadOffset + dwsize1 + dwsize2) % dsw->dsw_InputSize;
+        IDirectSoundCaptureBuffer_Unlock ( dsw->dsw_InputBuffer, lpbuf1, dwsize1, lpbuf2, dwsize2);
+    }
+    return hr;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/dsound_wrapper.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/dsound_wrapper.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/dsound_wrapper.h	(revision 1163)
@@ -0,0 +1,130 @@
+#ifndef __DSOUND_WRAPPER_H
+#define __DSOUND_WRAPPER_H
+/*
+ * $Id: dsound_wrapper.h,v 1.1.1.1.2.8 2005/01/16 20:48:37 rossbencina Exp $
+ * Simplified DirectSound interface.
+ *
+ * Author: Phil Burk & Robert Marsanyi
+ *
+ * For PortAudio Portable Real-Time Audio Library
+ * For more information see: http://www.softsynth.com/portaudio/
+ * DirectSound Implementation
+ * Copyright (c) 1999-2000 Phil Burk & Robert Marsanyi
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/* on Borland compilers, WIN32 doesn't seem to be defined by default, which
+    breaks DSound.h. Adding the define here fixes the problem. - rossb. */
+#ifdef __BORLANDC__
+#if !defined(WIN32)
+#define WIN32
+#endif
+#endif
+
+/*
+  We are only using DX3 in here, no need to polute the namespace - davidv
+*/
+#define DIRECTSOUND_VERSION 0x0300
+
+#include <DSound.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+typedef struct
+{
+    HINSTANCE hInstance_;
+    
+    HRESULT (WINAPI *DirectSoundCreate)(LPGUID, LPDIRECTSOUND *, LPUNKNOWN);
+    HRESULT (WINAPI *DirectSoundEnumerateW)(LPDSENUMCALLBACKW, LPVOID);
+    HRESULT (WINAPI *DirectSoundEnumerateA)(LPDSENUMCALLBACKA, LPVOID);
+
+    HRESULT (WINAPI *DirectSoundCaptureCreate)(LPGUID, LPDIRECTSOUNDCAPTURE *, LPUNKNOWN);
+    HRESULT (WINAPI *DirectSoundCaptureEnumerateW)(LPDSENUMCALLBACKW, LPVOID);
+    HRESULT (WINAPI *DirectSoundCaptureEnumerateA)(LPDSENUMCALLBACKA, LPVOID);
+}DSoundEntryPoints;
+
+extern DSoundEntryPoints dswDSoundEntryPoints;
+
+void DSW_InitializeDSoundEntryPoints(void);
+void DSW_TerminateDSoundEntryPoints(void);
+
+#define DSW_NUM_POSITIONS     (4)
+#define DSW_NUM_EVENTS        (5)
+#define DSW_TERMINATION_EVENT     (DSW_NUM_POSITIONS)
+
+typedef struct
+{
+/* Output */
+    LPDIRECTSOUND        dsw_pDirectSound;
+    LPDIRECTSOUNDBUFFER  dsw_OutputBuffer;
+    DWORD                dsw_WriteOffset;     /* last write position */
+    INT                  dsw_OutputSize;
+    INT                  dsw_BytesPerOutputFrame;
+    /* Try to detect play buffer underflows. */
+    LARGE_INTEGER        dsw_CounterTicksPerBuffer; /* counter ticks it should take to play a full buffer */
+    LARGE_INTEGER        dsw_LastPlayTime;
+    UINT                 dsw_LastPlayCursor;
+    UINT                 dsw_OutputUnderflows;
+    BOOL                 dsw_OutputRunning;
+    /* use double which lets us can play for several thousand years with enough precision */
+    double               dsw_FramesWritten;
+    double               dsw_FramesPlayed;
+/* Input */
+    INT                  dsw_BytesPerInputFrame;
+    LPDIRECTSOUNDCAPTURE dsw_pDirectSoundCapture;
+    LPDIRECTSOUNDCAPTUREBUFFER   dsw_InputBuffer;
+    UINT                 dsw_ReadOffset;      /* last read position */
+    UINT                 dsw_InputSize;
+} DSoundWrapper;
+
+HRESULT DSW_Init( DSoundWrapper *dsw );
+void DSW_Term( DSoundWrapper *dsw );
+HRESULT DSW_InitOutputBuffer( DSoundWrapper *dsw, unsigned long nFrameRate,
+                              WORD nChannels, int bufSize );
+HRESULT DSW_StartOutput( DSoundWrapper *dsw );
+HRESULT DSW_StopOutput( DSoundWrapper *dsw );
+DWORD   DSW_GetOutputStatus( DSoundWrapper *dsw );
+HRESULT DSW_WriteBlock( DSoundWrapper *dsw, char *buf, long numBytes );
+HRESULT DSW_ZeroEmptySpace( DSoundWrapper *dsw );
+HRESULT DSW_QueryOutputSpace( DSoundWrapper *dsw, long *bytesEmpty );
+HRESULT DSW_Enumerate( DSoundWrapper *dsw );
+
+HRESULT DSW_InitInputBuffer( DSoundWrapper *dsw, unsigned long nFrameRate,
+                             WORD nChannels, int bufSize );
+HRESULT DSW_StartInput( DSoundWrapper *dsw );
+HRESULT DSW_StopInput( DSoundWrapper *dsw );
+HRESULT DSW_ReadBlock( DSoundWrapper *dsw, char *buf, long numBytes );
+HRESULT DSW_QueryInputFilled( DSoundWrapper *dsw, long *bytesFilled );
+HRESULT DSW_QueryOutputFilled( DSoundWrapper *dsw, long *bytesFilled );
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif  /* __DSOUND_WRAPPER_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/notes.txt
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/notes.txt	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/notes.txt	(revision 1163)
@@ -0,0 +1,145 @@
+Notes on status of CoreAudio Implementation of PortAudio
+
+Document Last Updated December 9, 2005
+
+There are currently two implementations of PortAudio for Mac Core Audio.
+
+The original is in pa_mac_core_old.c, and the newer, default implementation
+is in pa_mac_core.c.
+Only pa_mac_core.c is currently developed and supported as it uses apple's
+current core audio technology. To select use the old implementation, replace
+pa_mac_core.c with pa_mac_core_old.c (eg. "cp pa_mac_core_auhal.c
+pa_mac_core.c"), then run configure and make as usual.
+
+----------------------------------------
+
+Notes on Original implementation:
+
+by Phil Burk and Darren Gibbs
+
+Last updated March 20, 2002
+
+WHAT WORKS
+
+Output with very low latency, <10 msec.
+Half duplex input or output.
+Full duplex on the same CoreAudio device.
+The paFLoat32, paInt16, paInt8, paUInt8 sample formats.
+Pa_GetCPULoad()
+Pa_StreamTime()
+
+KNOWN BUGS OR LIMITATIONS
+
+We do not yet support simultaneous input and output on different 
+devices. Note that some CoreAudio devices like the Roland UH30 look 
+like one device but are actually two different CoreAudio devices. The 
+Built-In audio is typically one CoreAudio device.
+
+Mono doesn't work.
+
+DEVICE MAPPING
+
+CoreAudio devices can support both input and output. But the sample 
+rates supported may be different. So we have map one or two PortAudio 
+device to each CoreAudio device depending on whether it supports 
+input, output or both.
+
+When we query devices, we first get a list of CoreAudio devices. Then 
+we scan the list and add a PortAudio device for each CoreAudio device 
+that supports input. Then we make a scan for output devices.
+
+-------------------------------------------
+
+Notes on Newer/Default AUHAL implementation:
+
+by Bjorn Roche
+
+Last Updated December 9, 2005
+
+Principle of Operation:
+
+This implementation uses AUHAL for audio I/O. To some extent, it also
+operates at the "HAL" Layer, though this behavior can be limited by
+platform specific flags (see pa_mac_core.h for details). The default
+settings should be reasonable: they don't change the SR of the device and
+don't cause interruptions if other devices are using the device.
+
+Major Software Elements Used: Apple's HAL AUs provide output SR
+conversion transparently, however, only on output, so this
+implementation uses AudioConverters to convert the sample rate on input.
+A PortAudio ring buffer is used to buffer input when sample rate
+conversion is required or when separate audio units are used for duplex
+IO. Finally, a PortAudio buffer processor is used to convert formats and
+provide additional buffers if needed. Internally, interleaved floating
+point data streams are used exclusively - the audio unit converts from
+the audio hardware's native format to interleaved float PCM and
+PortAudio's Buffer processor is used for conversion to user formats.
+
+Simplex Input: Simplex input uses a single callback. If sample rate
+conversion is required, a ring buffer and AudioConverter are used as
+well.
+
+Simplex output: Simplex output uses a single callback. No ring buffer or
+audio converter is used because AUHAL does its own output SR conversion.
+
+Duplex, one device (no SR conversion): When one device is used, a single
+callback is used. This achieves very low latency.
+
+Duplex, separate devices or SR conversion: When SR conversion is
+required, data must be buffered before it is converted and data is not
+always available at the same times on input and output, so SR conversion
+requires the same treatment as separate devices. The input callback
+reads data and puts it in the ring buffer. The output callback reads the
+data off the ring buffer, into an audio converter and finally to the
+buffer processor.
+
+Platform Specific Options:
+
+By using the flags in pa_mac_core.h, the user may specify several options.
+For example, the user can specify the sample-rate conversion quality, and
+the extent to which PA will attempt to "play nice" and to what extent it
+will interrupt other apps to improve performance. For example, if 44100 Hz
+sample rate is requested but the device is set at 48000 Hz, PA can either
+change the device for optimal playback ("Pro" mode), which may interrupt
+other programs playing back audio, or simple use a sample-rate coversion,
+which allows for friendlier sharing of the device ("Play Nice" mode).
+
+
+Known issues:
+
+- Latency: Latency settings are ignored in most cases. Exceptions are when
+doing I/O between different devices and as a hint for selecting a realtively
+low or relatively high latency in conjunction with
+paHostFramesPerBufferUnspecified. Latency settings are always automatically
+bound to "safe" values, however, so setting extreme values here should not be
+an issue.
+
+- Buffer Size: paHostFramesPerBufferUnspecified and specific host buffer sizes
+are supported. paHostFramesPerBufferUnspecified works best in "pro" mode,
+where the buffer size and sample rate of the audio device is most likely
+to match the expected values.
+
+- Timing info. It reports on stream time, but I'm probably doing something
+wrong since patest_sine_time often reports negative latency numbers.
+
+- xrun detection: The only xrun detection performed is when reading
+and writing the ring buffer. There is probably more that can be done.
+
+- abort/stop issues: stopping a stream is always a complete operation,
+but latency should be low enough to make the lack of a separate abort
+unnecessary. Apple clarifies its AudioOutputUnitStop() call here:
+http://lists.apple.com/archives/coreaudio-api/2005/Dec/msg00055.html
+
+- blocking interface: Not implemented.
+
+- multichannel: It has been tested successfully on multichannel hardware
+from MOTU: traveler and 896HD.
+
+- sample rate conversion quality: By default, SR conversion is the maximum
+available. This can be tweaked using flags pa_mac_core.h. Note that the AU
+render quyality property is used to set the sample rat conversion quality
+as "documented" here:
+http://lists.apple.com/archives/coreaudio-api/2004/Jan/msg00141.html
+
+- x86: I haven't tested it on an x86 Mac myself, but users have reported 
+being able to comiple and run it.
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_allocation.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_allocation.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_allocation.c	(revision 1163)
@@ -0,0 +1,234 @@
+/*
+ * $Id: pa_allocation.c,v 1.1.2.6 2004/12/20 12:07:51 rossbencina Exp $
+ * Portable Audio I/O Library allocation group implementation
+ * memory allocation group for tracking allocation groups
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Allocation Group implementation.
+*/
+
+
+#include "pa_allocation.h"
+#include "pa_util.h"
+
+
+/*
+    Maintain 3 singly linked lists...
+    linkBlocks: the buffers used to allocate the links
+    spareLinks: links available for use in the allocations list
+    allocations: the buffers currently allocated using PaUtil_ContextAllocateMemory()
+
+    Link block size is doubled every time new links are allocated.
+*/
+
+
+#define PA_INITIAL_LINK_COUNT_    16
+
+struct PaUtilAllocationGroupLink
+{
+    struct PaUtilAllocationGroupLink *next;
+    void *buffer;
+};
+
+/*
+    Allocate a block of links. The first link will have it's buffer member
+    pointing to the block, and it's next member set to <nextBlock>. The remaining
+    links will have NULL buffer members, and each link will point to
+    the next link except the last, which will point to <nextSpare>
+*/
+static struct PaUtilAllocationGroupLink *AllocateLinks( long count,
+        struct PaUtilAllocationGroupLink *nextBlock,
+        struct PaUtilAllocationGroupLink *nextSpare )
+{
+    struct PaUtilAllocationGroupLink *result;
+    int i;
+    
+    result = (struct PaUtilAllocationGroupLink *)PaUtil_AllocateMemory(
+            sizeof(struct PaUtilAllocationGroupLink) * count );
+    if( result )
+    {
+        /* the block link */
+        result[0].buffer = result;
+        result[0].next = nextBlock;
+
+        /* the spare links */
+        for( i=1; i<count; ++i )
+        {
+            result[i].buffer = 0;
+            result[i].next = &result[i+1];
+        }
+        result[count-1].next = nextSpare;
+    }
+    
+    return result;
+}
+
+
+PaUtilAllocationGroup* PaUtil_CreateAllocationGroup( void )
+{
+    PaUtilAllocationGroup* result = 0;
+    struct PaUtilAllocationGroupLink *links;
+
+
+    links = AllocateLinks( PA_INITIAL_LINK_COUNT_, 0, 0 );
+    if( links != 0 )
+    {
+        result = (PaUtilAllocationGroup*)PaUtil_AllocateMemory( sizeof(PaUtilAllocationGroup) );
+        if( result )
+        {
+            result->linkCount = PA_INITIAL_LINK_COUNT_;
+            result->linkBlocks = &links[0];
+            result->spareLinks = &links[1];
+            result->allocations = 0;
+        }
+        else
+        {
+            PaUtil_FreeMemory( links );
+        }
+    }
+
+    return result;
+}
+
+
+void PaUtil_DestroyAllocationGroup( PaUtilAllocationGroup* group )
+{
+    struct PaUtilAllocationGroupLink *current = group->linkBlocks;
+    struct PaUtilAllocationGroupLink *next;
+
+    while( current )
+    {
+        next = current->next;
+        PaUtil_FreeMemory( current->buffer );
+        current = next;
+    }
+
+    PaUtil_FreeMemory( group );
+}
+
+
+void* PaUtil_GroupAllocateMemory( PaUtilAllocationGroup* group, long size )
+{
+    struct PaUtilAllocationGroupLink *links, *link;
+    void *result = 0;
+    
+    /* allocate more links if necessary */
+    if( !group->spareLinks )
+    {
+        /* double the link count on each block allocation */
+        links = AllocateLinks( group->linkCount, group->linkBlocks, group->spareLinks );
+        if( links )
+        {
+            group->linkCount += group->linkCount;
+            group->linkBlocks = &links[0];
+            group->spareLinks = &links[1];
+        }
+    }
+
+    if( group->spareLinks )
+    {
+        result = PaUtil_AllocateMemory( size );
+        if( result )
+        {
+            link = group->spareLinks;
+            group->spareLinks = link->next;
+
+            link->buffer = result;
+            link->next = group->allocations;
+
+            group->allocations = link;
+        }
+    }
+
+    return result;    
+}
+
+
+void PaUtil_GroupFreeMemory( PaUtilAllocationGroup* group, void *buffer )
+{
+    struct PaUtilAllocationGroupLink *current = group->allocations;
+    struct PaUtilAllocationGroupLink *previous = 0;
+
+    if( buffer == 0 )
+        return;
+
+    /* find the right link and remove it */
+    while( current )
+    {
+        if( current->buffer == buffer )
+        {
+            if( previous )
+            {
+                previous->next = current->next;
+            }
+            else
+            {
+                group->allocations = current->next;
+            }
+
+            current->buffer = 0;
+            current->next = group->spareLinks;
+            group->spareLinks = current;
+
+            break;
+        }
+        
+        previous = current;
+        current = current->next;
+    }
+
+    PaUtil_FreeMemory( buffer ); /* free the memory whether we found it in the list or not */
+}
+
+
+void PaUtil_FreeAllAllocations( PaUtilAllocationGroup* group )
+{
+    struct PaUtilAllocationGroupLink *current = group->allocations;
+    struct PaUtilAllocationGroupLink *previous = 0;
+
+    /* free all buffers in the allocations list */
+    while( current )
+    {
+        PaUtil_FreeMemory( current->buffer );
+        current->buffer = 0;
+
+        previous = current;
+        current = current->next;
+    }
+
+    /* link the former allocations list onto the front of the spareLinks list */
+    if( previous )
+    {
+        previous->next = group->spareLinks;
+        group->spareLinks = group->allocations;
+        group->allocations = 0;
+    }
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_allocation.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_allocation.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_allocation.h	(revision 1163)
@@ -0,0 +1,95 @@
+#ifndef PA_ALLOCATION_H
+#define PA_ALLOCATION_H
+/*
+ * $Id: pa_allocation.h,v 1.1.2.4 2003/09/20 21:04:44 rossbencina Exp $
+ * Portable Audio I/O Library allocation context header
+ * memory allocation context for tracking allocation groups
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Allocation Group prototypes. An Allocation Group makes it easy to
+ allocate multiple blocks of memory and free them all simultanously.
+ 
+ An allocation group is useful for keeping track of multiple blocks
+ of memory which are allocated at the same time (such as during initialization)
+ and need to be deallocated at the same time. The allocation group maintains
+ a list of allocated blocks, and can deallocate them all simultaneously which
+ can be usefull for cleaning up after a partially initialized object fails.
+
+ The allocation group implementation is built on top of the lower
+ level allocation functions defined in pa_util.h
+*/
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+typedef struct
+{
+    long linkCount;
+    struct PaUtilAllocationGroupLink *linkBlocks;
+    struct PaUtilAllocationGroupLink *spareLinks;
+    struct PaUtilAllocationGroupLink *allocations;
+}PaUtilAllocationGroup;
+
+
+
+/** Create an allocation group.
+*/
+PaUtilAllocationGroup* PaUtil_CreateAllocationGroup( void );
+
+/** Destroy an allocation group, but not the memory allocated through the group.
+*/
+void PaUtil_DestroyAllocationGroup( PaUtilAllocationGroup* group );
+
+/** Allocate a block of memory though an allocation group.
+*/
+void* PaUtil_GroupAllocateMemory( PaUtilAllocationGroup* group, long size );
+
+/** Free a block of memory that was previously allocated though an allocation
+ group. Calling this function is a relatively time consuming operation.
+ Under normal circumstances clients should call PaUtil_FreeAllAllocations to
+ free all allocated blocks simultaneously.
+ @see PaUtil_FreeAllAllocations
+*/
+void PaUtil_GroupFreeMemory( PaUtilAllocationGroup* group, void *buffer );
+
+/** Free all blocks of memory which have been allocated through the allocation
+ group. This function doesn't destroy the group itself.
+*/
+void PaUtil_FreeAllAllocations( PaUtilAllocationGroup* group );
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PA_ALLOCATION_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_converters.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_converters.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_converters.c	(revision 1163)
@@ -0,0 +1,1928 @@
+/*
+ * $Id: pa_converters.c,v 1.1.2.26 2004/12/11 16:32:38 aknudsen Exp $
+ * Portable Audio I/O Library sample conversion mechanism
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Phil Burk, Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Conversion functions implementations.
+ 
+ If the C9x function lrintf() is available, define PA_USE_C99_LRINTF to use it
+
+ @todo Consider whether functions which dither but don't clip should exist,
+ V18 automatically enabled clipping whenever dithering was selected. Perhaps
+ we should do the same.
+
+ @todo implement the converters marked IMPLEMENT ME: Float32_To_UInt8_Dither,
+ Float32_To_UInt8_Clip, Float32_To_UInt8_DitherClip, Int32_To_Int24_Dither,
+ Int32_To_UInt8_Dither, Int24_To_Int16_Dither, Int24_To_Int8_Dither, 
+ Int24_To_UInt8_Dither, Int16_To_Int8_Dither, Int16_To_UInt8_Dither,
+
+ @todo review the converters marked REVIEW: Float32_To_Int32,
+ Float32_To_Int32_Dither, Float32_To_Int32_Clip, Float32_To_Int32_DitherClip,
+ Int32_To_Int16_Dither, Int32_To_Int8_Dither, Int16_To_Int32
+*/
+
+
+#include "pa_converters.h"
+#include "pa_dither.h"
+#include "pa_endianness.h"
+#include "pa_types.h"
+
+
+PaSampleFormat PaUtil_SelectClosestAvailableFormat(
+        PaSampleFormat availableFormats, PaSampleFormat format )
+{
+    PaSampleFormat result;
+
+    format &= ~paNonInterleaved;
+    availableFormats &= ~paNonInterleaved;
+    
+    if( (format & availableFormats) == 0 )
+    {
+        /* NOTE: this code depends on the sample format constants being in
+            descending order of quality - ie best quality is 0
+            FIXME: should write an assert which checks that all of the
+            known constants conform to that requirement.
+        */
+
+        if( format != 0x01 )
+        {
+            /* scan for better formats */
+            result = format;
+            do
+            {
+                result >>= 1;
+            }
+            while( (result & availableFormats) == 0 && result != 0 );
+        }
+        else
+        {
+            result = 0;
+        }
+        
+        if( result == 0 ){
+            /* scan for worse formats */
+            result = format;
+            do
+            {
+                result <<= 1;
+            }
+            while( (result & availableFormats) == 0 && result != paCustomFormat );
+
+            if( (result & availableFormats) == 0 )
+                result = paSampleFormatNotSupported;
+        }
+        
+    }else{
+        result = format;
+    }
+
+    return result;
+}
+
+/* -------------------------------------------------------------------------- */
+
+#define PA_SELECT_FORMAT_( format, float32, int32, int24, int16, int8, uint8 ) \
+    switch( format & ~paNonInterleaved ){                                      \
+    case paFloat32:                                                            \
+        float32                                                                \
+    case paInt32:                                                              \
+        int32                                                                  \
+    case paInt24:                                                              \
+        int24                                                                  \
+    case paInt16:                                                              \
+        int16                                                                  \
+    case paInt8:                                                               \
+        int8                                                                   \
+    case paUInt8:                                                              \
+        uint8                                                                  \
+    default: return 0;                                                         \
+    }
+
+/* -------------------------------------------------------------------------- */
+
+#define PA_SELECT_CONVERTER_DITHER_CLIP_( flags, source, destination )         \
+    if( flags & paClipOff ){ /* no clip */                                     \
+        if( flags & paDitherOff ){ /* no dither */                             \
+            return paConverters. source ## _To_ ## destination;                \
+        }else{ /* dither */                                                    \
+            return paConverters. source ## _To_ ## destination ## _Dither;     \
+        }                                                                      \
+    }else{ /* clip */                                                          \
+        if( flags & paDitherOff ){ /* no dither */                             \
+            return paConverters. source ## _To_ ## destination ## _Clip;       \
+        }else{ /* dither */                                                    \
+            return paConverters. source ## _To_ ## destination ## _DitherClip; \
+        }                                                                      \
+    }
+
+/* -------------------------------------------------------------------------- */
+
+#define PA_SELECT_CONVERTER_DITHER_( flags, source, destination )              \
+    if( flags & paDitherOff ){ /* no dither */                                 \
+        return paConverters. source ## _To_ ## destination;                    \
+    }else{ /* dither */                                                        \
+        return paConverters. source ## _To_ ## destination ## _Dither;         \
+    }
+
+/* -------------------------------------------------------------------------- */
+
+#define PA_USE_CONVERTER_( source, destination )\
+    return paConverters. source ## _To_ ## destination;
+
+/* -------------------------------------------------------------------------- */
+
+#define PA_UNITY_CONVERSION_( wordlength )\
+    return paConverters. Copy_ ## wordlength ## _To_ ## wordlength;
+
+/* -------------------------------------------------------------------------- */
+
+PaUtilConverter* PaUtil_SelectConverter( PaSampleFormat sourceFormat,
+        PaSampleFormat destinationFormat, PaStreamFlags flags )
+{
+    PA_SELECT_FORMAT_( sourceFormat,
+                       /* paFloat32: */
+                       PA_SELECT_FORMAT_( destinationFormat,
+                                          /* paFloat32: */        PA_UNITY_CONVERSION_( 32 ),
+                                          /* paInt32: */          PA_SELECT_CONVERTER_DITHER_CLIP_( flags, Float32, Int32 ),
+                                          /* paInt24: */          PA_SELECT_CONVERTER_DITHER_CLIP_( flags, Float32, Int24 ),
+                                          /* paInt16: */          PA_SELECT_CONVERTER_DITHER_CLIP_( flags, Float32, Int16 ),
+                                          /* paInt8: */           PA_SELECT_CONVERTER_DITHER_CLIP_( flags, Float32, Int8 ),
+                                          /* paUInt8: */          PA_SELECT_CONVERTER_DITHER_CLIP_( flags, Float32, UInt8 )
+                                        ),
+                       /* paInt32: */
+                       PA_SELECT_FORMAT_( destinationFormat,
+                                          /* paFloat32: */        PA_USE_CONVERTER_( Int32, Float32 ),
+                                          /* paInt32: */          PA_UNITY_CONVERSION_( 32 ),
+                                          /* paInt24: */          PA_SELECT_CONVERTER_DITHER_( flags, Int32, Int24 ),
+                                          /* paInt16: */          PA_SELECT_CONVERTER_DITHER_( flags, Int32, Int16 ),
+                                          /* paInt8: */           PA_SELECT_CONVERTER_DITHER_( flags, Int32, Int8 ),
+                                          /* paUInt8: */          PA_SELECT_CONVERTER_DITHER_( flags, Int32, UInt8 )
+                                        ),
+                       /* paInt24: */
+                       PA_SELECT_FORMAT_( destinationFormat,
+                                          /* paFloat32: */        PA_USE_CONVERTER_( Int24, Float32 ),
+                                          /* paInt32: */          PA_USE_CONVERTER_( Int24, Int32 ),
+                                          /* paInt24: */          PA_UNITY_CONVERSION_( 24 ),
+                                          /* paInt16: */          PA_SELECT_CONVERTER_DITHER_( flags, Int24, Int16 ),
+                                          /* paInt8: */           PA_SELECT_CONVERTER_DITHER_( flags, Int24, Int8 ),
+                                          /* paUInt8: */          PA_SELECT_CONVERTER_DITHER_( flags, Int24, UInt8 )
+                                        ),
+                       /* paInt16: */
+                       PA_SELECT_FORMAT_( destinationFormat,
+                                          /* paFloat32: */        PA_USE_CONVERTER_( Int16, Float32 ),
+                                          /* paInt32: */          PA_USE_CONVERTER_( Int16, Int32 ),
+                                          /* paInt24: */          PA_USE_CONVERTER_( Int16, Int24 ),
+                                          /* paInt16: */          PA_UNITY_CONVERSION_( 16 ),
+                                          /* paInt8: */           PA_SELECT_CONVERTER_DITHER_( flags, Int16, Int8 ),
+                                          /* paUInt8: */          PA_SELECT_CONVERTER_DITHER_( flags, Int16, UInt8 )
+                                        ),
+                       /* paInt8: */
+                       PA_SELECT_FORMAT_( destinationFormat,
+                                          /* paFloat32: */        PA_USE_CONVERTER_( Int8, Float32 ),
+                                          /* paInt32: */          PA_USE_CONVERTER_( Int8, Int32 ),
+                                          /* paInt24: */          PA_USE_CONVERTER_( Int8, Int24 ),
+                                          /* paInt16: */          PA_USE_CONVERTER_( Int8, Int16 ),
+                                          /* paInt8: */           PA_UNITY_CONVERSION_( 8 ),
+                                          /* paUInt8: */          PA_USE_CONVERTER_( Int8, UInt8 )
+                                        ),
+                       /* paUInt8: */
+                       PA_SELECT_FORMAT_( destinationFormat,
+                                          /* paFloat32: */        PA_USE_CONVERTER_( UInt8, Float32 ),
+                                          /* paInt32: */          PA_USE_CONVERTER_( UInt8, Int32 ),
+                                          /* paInt24: */          PA_USE_CONVERTER_( UInt8, Int24 ),
+                                          /* paInt16: */          PA_USE_CONVERTER_( UInt8, Int16 ),
+                                          /* paInt8: */           PA_USE_CONVERTER_( UInt8, Int8 ),
+                                          /* paUInt8: */          PA_UNITY_CONVERSION_( 8 )
+                                        )
+                     )
+}
+
+/* -------------------------------------------------------------------------- */
+
+#ifdef PA_NO_STANDARD_CONVERTERS
+
+/* -------------------------------------------------------------------------- */
+
+PaUtilConverterTable paConverters = {
+    0, /* PaUtilConverter *Float32_To_Int32; */
+    0, /* PaUtilConverter *Float32_To_Int32_Dither; */
+    0, /* PaUtilConverter *Float32_To_Int32_Clip; */
+    0, /* PaUtilConverter *Float32_To_Int32_DitherClip; */
+
+    0, /* PaUtilConverter *Float32_To_Int24; */
+    0, /* PaUtilConverter *Float32_To_Int24_Dither; */
+    0, /* PaUtilConverter *Float32_To_Int24_Clip; */
+    0, /* PaUtilConverter *Float32_To_Int24_DitherClip; */
+
+    0, /* PaUtilConverter *Float32_To_Int16; */
+    0, /* PaUtilConverter *Float32_To_Int16_Dither; */
+    0, /* PaUtilConverter *Float32_To_Int16_Clip; */
+    0, /* PaUtilConverter *Float32_To_Int16_DitherClip; */
+
+    0, /* PaUtilConverter *Float32_To_Int8; */
+    0, /* PaUtilConverter *Float32_To_Int8_Dither; */
+    0, /* PaUtilConverter *Float32_To_Int8_Clip; */
+    0, /* PaUtilConverter *Float32_To_Int8_DitherClip; */
+
+    0, /* PaUtilConverter *Float32_To_UInt8; */
+    0, /* PaUtilConverter *Float32_To_UInt8_Dither; */
+    0, /* PaUtilConverter *Float32_To_UInt8_Clip; */
+    0, /* PaUtilConverter *Float32_To_UInt8_DitherClip; */
+
+    0, /* PaUtilConverter *Int32_To_Float32; */
+    0, /* PaUtilConverter *Int32_To_Int24; */
+    0, /* PaUtilConverter *Int32_To_Int24_Dither; */
+    0, /* PaUtilConverter *Int32_To_Int16; */
+    0, /* PaUtilConverter *Int32_To_Int16_Dither; */
+    0, /* PaUtilConverter *Int32_To_Int8; */
+    0, /* PaUtilConverter *Int32_To_Int8_Dither; */
+    0, /* PaUtilConverter *Int32_To_UInt8; */
+    0, /* PaUtilConverter *Int32_To_UInt8_Dither; */
+
+    0, /* PaUtilConverter *Int24_To_Float32; */
+    0, /* PaUtilConverter *Int24_To_Int32; */
+    0, /* PaUtilConverter *Int24_To_Int16; */
+    0, /* PaUtilConverter *Int24_To_Int16_Dither; */
+    0, /* PaUtilConverter *Int24_To_Int8; */
+    0, /* PaUtilConverter *Int24_To_Int8_Dither; */
+    0, /* PaUtilConverter *Int24_To_UInt8; */
+    0, /* PaUtilConverter *Int24_To_UInt8_Dither; */
+    
+    0, /* PaUtilConverter *Int16_To_Float32; */
+    0, /* PaUtilConverter *Int16_To_Int32; */
+    0, /* PaUtilConverter *Int16_To_Int24; */
+    0, /* PaUtilConverter *Int16_To_Int8; */
+    0, /* PaUtilConverter *Int16_To_Int8_Dither; */
+    0, /* PaUtilConverter *Int16_To_UInt8; */
+    0, /* PaUtilConverter *Int16_To_UInt8_Dither; */
+
+    0, /* PaUtilConverter *Int8_To_Float32; */
+    0, /* PaUtilConverter *Int8_To_Int32; */
+    0, /* PaUtilConverter *Int8_To_Int24 */
+    0, /* PaUtilConverter *Int8_To_Int16; */
+    0, /* PaUtilConverter *Int8_To_UInt8; */
+
+    0, /* PaUtilConverter *UInt8_To_Float32; */
+    0, /* PaUtilConverter *UInt8_To_Int32; */
+    0, /* PaUtilConverter *UInt8_To_Int24; */
+    0, /* PaUtilConverter *UInt8_To_Int16; */
+    0, /* PaUtilConverter *UInt8_To_Int8; */
+
+    0, /* PaUtilConverter *Copy_8_To_8; */
+    0, /* PaUtilConverter *Copy_16_To_16; */
+    0, /* PaUtilConverter *Copy_24_To_24; */
+    0  /* PaUtilConverter *Copy_32_To_32; */
+};
+
+/* -------------------------------------------------------------------------- */
+
+#else /* PA_NO_STANDARD_CONVERTERS is not defined */
+
+/* -------------------------------------------------------------------------- */
+
+#define PA_CLIP_( val, min, max )\
+    { val = ((val) < (min)) ? (min) : (((val) > (max)) ? (max) : (val)); }
+
+
+static const float const_1_div_128_ = 1.0f / 128.0f;  /* 8 bit multiplier */
+
+static const float const_1_div_32768_ = 1.0f / 32768.f; /* 16 bit multiplier */
+
+static const double const_1_div_2147483648_ = 1.0 / 2147483648.0; /* 32 bit multiplier */
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int32(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    signed long *dest =  (signed long*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        /* REVIEW */
+#ifdef PA_USE_C99_LRINTF
+        float scaled = *src * 0x7FFFFFFF;
+        *dest = lrintf(scaled-0.5f);
+#else
+        double scaled = *src * 0x7FFFFFFF;
+        *dest = (signed long) scaled;        
+#endif
+        
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int32_Dither(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    signed long *dest =  (signed long*)destinationBuffer;
+
+    while( count-- )
+    {
+        /* REVIEW */
+#ifdef PA_USE_C99_LRINTF
+        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );
+        /* use smaller scaler to prevent overflow when we add the dither */
+        float dithered = ((float)*src * (2147483646.0f)) + dither;
+        *dest = lrintf(dithered - 0.5f);
+#else
+        double dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );
+        /* use smaller scaler to prevent overflow when we add the dither */
+        double dithered = ((double)*src * (2147483646.0)) + dither;
+        *dest = (signed long) dithered;
+#endif
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int32_Clip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    signed long *dest =  (signed long*)destinationBuffer;
+    (void) ditherGenerator; /* unused parameter */
+    
+    while( count-- )
+    {
+        /* REVIEW */
+#ifdef PA_USE_C99_LRINTF
+        float scaled = *src * 0x7FFFFFFF;
+        PA_CLIP_( scaled, -2147483648.f, 2147483647.f  );
+        *dest = lrintf(scaled-0.5f);
+#else
+        double scaled = *src * 0x7FFFFFFF;
+        PA_CLIP_( scaled, -2147483648., 2147483647.  );
+        *dest = (signed long) scaled;
+#endif
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int32_DitherClip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    signed long *dest =  (signed long*)destinationBuffer;
+
+    while( count-- )
+    {
+        /* REVIEW */
+#ifdef PA_USE_C99_LRINTF
+        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );
+        /* use smaller scaler to prevent overflow when we add the dither */
+        float dithered = ((float)*src * (2147483646.0f)) + dither;
+        PA_CLIP_( dithered, -2147483648.f, 2147483647.f  );
+        *dest = lrintf(dithered-0.5f);
+#else
+        double dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );
+        /* use smaller scaler to prevent overflow when we add the dither */
+        double dithered = ((double)*src * (2147483646.0)) + dither;
+        PA_CLIP_( dithered, -2147483648., 2147483647.  );
+        *dest = (signed long) dithered;
+#endif
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int24(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+    signed long temp;
+
+    (void) ditherGenerator; /* unused parameter */
+    
+    while( count-- )
+    {
+        /* convert to 32 bit and drop the low 8 bits */
+        double scaled = *src * 0x7FFFFFFF;
+        temp = (signed long) scaled;
+        
+#if defined(PA_LITTLE_ENDIAN)
+        dest[0] = (unsigned char)(temp >> 8);
+        dest[1] = (unsigned char)(temp >> 16);
+        dest[2] = (unsigned char)(temp >> 24);
+#elif defined(PA_BIG_ENDIAN)
+        dest[0] = (unsigned char)(temp >> 24);
+        dest[1] = (unsigned char)(temp >> 16);
+        dest[2] = (unsigned char)(temp >> 8);
+#endif
+
+        src += sourceStride;
+        dest += destinationStride * 3;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int24_Dither(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+    signed long temp;
+
+    while( count-- )
+    {
+        /* convert to 32 bit and drop the low 8 bits */
+
+        double dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );
+        /* use smaller scaler to prevent overflow when we add the dither */
+        double dithered = ((double)*src * (2147483646.0)) + dither;
+        
+        temp = (signed long) dithered;
+
+#if defined(PA_LITTLE_ENDIAN)
+        dest[0] = (unsigned char)(temp >> 8);
+        dest[1] = (unsigned char)(temp >> 16);
+        dest[2] = (unsigned char)(temp >> 24);
+#elif defined(PA_BIG_ENDIAN)
+        dest[0] = (unsigned char)(temp >> 24);
+        dest[1] = (unsigned char)(temp >> 16);
+        dest[2] = (unsigned char)(temp >> 8);
+#endif
+
+        src += sourceStride;
+        dest += destinationStride * 3;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int24_Clip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+    signed long temp;
+
+    (void) ditherGenerator; /* unused parameter */
+    
+    while( count-- )
+    {
+        /* convert to 32 bit and drop the low 8 bits */
+        double scaled = *src * 0x7FFFFFFF;
+        PA_CLIP_( scaled, -2147483648., 2147483647.  );
+        temp = (signed long) scaled;
+
+#if defined(PA_LITTLE_ENDIAN)
+        dest[0] = (unsigned char)(temp >> 8);
+        dest[1] = (unsigned char)(temp >> 16);
+        dest[2] = (unsigned char)(temp >> 24);
+#elif defined(PA_BIG_ENDIAN)
+        dest[0] = (unsigned char)(temp >> 24);
+        dest[1] = (unsigned char)(temp >> 16);
+        dest[2] = (unsigned char)(temp >> 8);
+#endif
+
+        src += sourceStride;
+        dest += destinationStride * 3;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int24_DitherClip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+    signed long temp;
+    
+    while( count-- )
+    {
+        /* convert to 32 bit and drop the low 8 bits */
+        
+        double dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );
+        /* use smaller scaler to prevent overflow when we add the dither */
+        double dithered = ((double)*src * (2147483646.0)) + dither;
+        PA_CLIP_( dithered, -2147483648., 2147483647.  );
+        
+        temp = (signed long) dithered;
+
+#if defined(PA_LITTLE_ENDIAN)
+        dest[0] = (unsigned char)(temp >> 8);
+        dest[1] = (unsigned char)(temp >> 16);
+        dest[2] = (unsigned char)(temp >> 24);
+#elif defined(PA_BIG_ENDIAN)
+        dest[0] = (unsigned char)(temp >> 24);
+        dest[1] = (unsigned char)(temp >> 16);
+        dest[2] = (unsigned char)(temp >> 8);
+#endif
+
+        src += sourceStride;
+        dest += destinationStride * 3;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int16(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    signed short *dest =  (signed short*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+#ifdef PA_USE_C99_LRINTF
+        float tempf = (*src * (32767.0f)) ;
+        *dest = lrintf(tempf-0.5f);
+#else
+        short samp = (short) (*src * (32767.0f));
+        *dest = samp;
+#endif
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int16_Dither(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    signed short *dest = (signed short*)destinationBuffer;
+
+    while( count-- )
+    {
+
+        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );
+        /* use smaller scaler to prevent overflow when we add the dither */
+        float dithered = (*src * (32766.0f)) + dither;
+
+#ifdef PA_USE_C99_LRINTF
+        *dest = lrintf(dithered-0.5f);
+#else
+        *dest = (signed short) dithered;
+#endif
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int16_Clip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    signed short *dest =  (signed short*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+#ifdef PA_USE_C99_LRINTF
+        long samp = lrintf((*src * (32767.0f)) -0.5f);
+#else
+        long samp = (signed long) (*src * (32767.0f));
+#endif
+        PA_CLIP_( samp, -0x8000, 0x7FFF );
+        *dest = (signed short) samp;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int16_DitherClip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    signed short *dest =  (signed short*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+
+        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );
+        /* use smaller scaler to prevent overflow when we add the dither */
+        float dithered = (*src * (32766.0f)) + dither;
+        signed long samp = (signed long) dithered;
+        PA_CLIP_( samp, -0x8000, 0x7FFF );
+#ifdef PA_USE_C99_LRINTF
+        *dest = lrintf(samp-0.5f);
+#else
+        *dest = (signed short) samp;
+#endif
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int8(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    signed char *dest =  (signed char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        signed char samp = (signed char) (*src * (127.0f));
+        *dest = samp;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int8_Dither(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    signed char *dest =  (signed char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );
+        /* use smaller scaler to prevent overflow when we add the dither */
+        float dithered = (*src * (126.0f)) + dither;
+        signed long samp = (signed long) dithered;
+        *dest = (signed char) samp;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int8_Clip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    signed char *dest =  (signed char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        signed long samp = (signed long)(*src * (127.0f));
+        PA_CLIP_( samp, -0x80, 0x7F );
+        *dest = (signed char) samp;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int8_DitherClip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    signed char *dest =  (signed char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );
+        /* use smaller scaler to prevent overflow when we add the dither */
+        float dithered = (*src * (126.0f)) + dither;
+        signed long samp = (signed long) dithered;
+        PA_CLIP_( samp, -0x80, 0x7F );
+        *dest = (signed char) samp;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_UInt8(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    unsigned char *dest =  (unsigned char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        unsigned char samp = (unsigned char)(128 + ((unsigned char) (*src * (127.0f))));
+        *dest = samp;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_UInt8_Dither(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    unsigned char *dest =  (unsigned char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        /* IMPLEMENT ME */
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_UInt8_Clip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    unsigned char *dest =  (unsigned char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        /* IMPLEMENT ME */
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_UInt8_DitherClip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    float *src = (float*)sourceBuffer;
+    unsigned char *dest =  (unsigned char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        /* IMPLEMENT ME */
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int32_To_Float32(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed long *src = (signed long*)sourceBuffer;
+    float *dest =  (float*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        *dest = (float) ((double)*src * const_1_div_2147483648_);
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int32_To_Int24(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed long *src    = (signed long*)sourceBuffer;
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+    (void) ditherGenerator; /* unused parameter */
+    
+	while( count-- )
+    {
+		/* REVIEW */
+#if defined(PA_LITTLE_ENDIAN)
+        dest[0] = (unsigned char)(*src >> 8);
+        dest[1] = (unsigned char)(*src >> 16);
+        dest[2] = (unsigned char)(*src >> 24);
+#elif defined(PA_BIG_ENDIAN)
+        dest[0] = (unsigned char)(*src >> 24);
+        dest[1] = (unsigned char)(*src >> 16);
+        dest[2] = (unsigned char)(*src >> 8);
+#endif
+        src += sourceStride;
+        dest += destinationStride * 3;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int32_To_Int24_Dither(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    (void) destinationBuffer; /* unused parameters */
+    (void) destinationStride; /* unused parameters */
+    (void) sourceBuffer; /* unused parameters */
+    (void) sourceStride; /* unused parameters */
+    (void) count; /* unused parameters */
+    (void) ditherGenerator; /* unused parameters */
+    /* IMPLEMENT ME */
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int32_To_Int16(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed long *src = (signed long*)sourceBuffer;
+    signed short *dest =  (signed short*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        *dest = (signed short) ((*src) >> 16);
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int32_To_Int16_Dither(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed long *src = (signed long*)sourceBuffer;
+    signed short *dest =  (signed short*)destinationBuffer;
+    signed long dither;
+
+    while( count-- )
+    {
+        /* REVIEW */
+        dither = PaUtil_Generate16BitTriangularDither( ditherGenerator );
+        *dest = (signed short) ((((*src)>>1) + dither) >> 15);
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int32_To_Int8(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed long *src = (signed long*)sourceBuffer;
+    signed char *dest =  (signed char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        *dest = (signed char) ((*src) >> 24);
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int32_To_Int8_Dither(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed long *src = (signed long*)sourceBuffer;
+    signed char *dest =  (signed char*)destinationBuffer;
+    signed long dither;
+
+    while( count-- )
+    {
+        /* REVIEW */
+        dither = PaUtil_Generate16BitTriangularDither( ditherGenerator );
+        *dest = (signed char) ((((*src)>>1) + dither) >> 23);
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int32_To_UInt8(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed long *src = (signed long*)sourceBuffer;
+    unsigned char *dest =  (unsigned char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+		(*dest) = (unsigned char)(((*src) >> 24) + 128); 
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int32_To_UInt8_Dither(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed long *src = (signed long*)sourceBuffer;
+    unsigned char *dest =  (unsigned char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        /* IMPLEMENT ME */
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int24_To_Float32(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    unsigned char *src = (unsigned char*)sourceBuffer;
+    float *dest = (float*)destinationBuffer;
+    signed long temp;
+
+    (void) ditherGenerator; /* unused parameter */
+    
+    while( count-- )
+    {
+
+#if defined(PA_LITTLE_ENDIAN)
+        temp = (((long)src[0]) << 8);  
+        temp = temp | (((long)src[1]) << 16);
+        temp = temp | (((long)src[2]) << 24);
+#elif defined(PA_BIG_ENDIAN)
+        temp = (((long)src[0]) << 24);
+        temp = temp | (((long)src[1]) << 16);
+        temp = temp | (((long)src[2]) << 8);
+#endif
+
+        *dest = (float) ((double)temp * const_1_div_2147483648_);
+
+        src += sourceStride * 3;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int24_To_Int32(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    unsigned char *src  = (unsigned char*)sourceBuffer;
+    signed long   *dest = (signed long*)  destinationBuffer;
+    signed long temp;
+
+    (void) ditherGenerator; /* unused parameter */
+    
+    while( count-- )
+    {
+
+#if defined(PA_LITTLE_ENDIAN)
+        temp = (((long)src[0]) << 8);  
+        temp = temp | (((long)src[1]) << 16);
+        temp = temp | (((long)src[2]) << 24);
+#elif defined(PA_BIG_ENDIAN)
+        temp = (((long)src[0]) << 24);
+        temp = temp | (((long)src[1]) << 16);
+        temp = temp | (((long)src[2]) << 8);
+#endif
+
+        *dest = temp;
+
+        src += sourceStride * 3;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int24_To_Int16(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    unsigned char *src = (unsigned char*)sourceBuffer;
+    signed short *dest = (signed short*)destinationBuffer;
+    
+	signed short temp;
+
+    (void) ditherGenerator; /* unused parameter */
+        
+    while( count-- )
+    {
+		
+#if defined(PA_LITTLE_ENDIAN)
+		/* src[0] is discarded */
+        temp = (((signed short)src[1]));
+        temp = temp | (signed short)(((signed short)src[2]) << 8);
+#elif defined(PA_BIG_ENDIAN)
+		/* src[2] is discarded */
+        temp = (signed short)(((signed short)src[0]) << 8);
+        temp = temp | (((signed short)src[1]));
+#endif
+
+        *dest = temp;
+
+        src += sourceStride * 3;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int24_To_Int16_Dither(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    (void) destinationBuffer; /* unused parameters */
+    (void) destinationStride; /* unused parameters */
+    (void) sourceBuffer; /* unused parameters */
+    (void) sourceStride; /* unused parameters */
+    (void) count; /* unused parameters */
+    (void) ditherGenerator; /* unused parameters */
+    /* IMPLEMENT ME */
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int24_To_Int8(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    unsigned char *src = (unsigned char*)sourceBuffer;
+    signed char  *dest = (signed char*)destinationBuffer;
+    
+    (void) ditherGenerator; /* unused parameter */
+        
+    while( count-- )
+    {	
+	
+#if defined(PA_LITTLE_ENDIAN)
+		/* src[0] is discarded */
+		/* src[1] is discarded */
+        *dest = src[2];
+#elif defined(PA_BIG_ENDIAN)
+		/* src[2] is discarded */
+		/* src[1] is discarded */
+		*dest = src[0];
+#endif
+
+        src += sourceStride * 3;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int24_To_Int8_Dither(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    (void) destinationBuffer; /* unused parameters */
+    (void) destinationStride; /* unused parameters */
+    (void) sourceBuffer; /* unused parameters */
+    (void) sourceStride; /* unused parameters */
+    (void) count; /* unused parameters */
+    (void) ditherGenerator; /* unused parameters */
+    /* IMPLEMENT ME */
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int24_To_UInt8(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    unsigned char *src = (unsigned char*)sourceBuffer;
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+    
+    (void) ditherGenerator; /* unused parameter */
+        
+    while( count-- )
+    {
+		
+#if defined(PA_LITTLE_ENDIAN)
+		/* src[0] is discarded */
+		/* src[1] is discarded */
+        *dest = (unsigned char)(src[2] + 128);
+#elif defined(PA_BIG_ENDIAN)
+        *dest = (unsigned char)(src[0] + 128);
+		/* src[1] is discarded */
+		/* src[2] is discarded */		
+#endif
+
+        src += sourceStride * 3;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int24_To_UInt8_Dither(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    (void) destinationBuffer; /* unused parameters */
+    (void) destinationStride; /* unused parameters */
+    (void) sourceBuffer; /* unused parameters */
+    (void) sourceStride; /* unused parameters */
+    (void) count; /* unused parameters */
+    (void) ditherGenerator; /* unused parameters */
+    /* IMPLEMENT ME */
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int16_To_Float32(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed short *src = (signed short*)sourceBuffer;
+    float *dest =  (float*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        float samp = *src * const_1_div_32768_; /* FIXME: i'm concerned about this being asymetrical with float->int16 -rb */
+        *dest = samp;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int16_To_Int32(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed short *src = (signed short*)sourceBuffer;
+    signed long *dest =  (signed long*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        /* REVIEW: we should consider something like
+            (*src << 16) | (*src & 0xFFFF)
+        */
+        
+        *dest = *src << 16;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int16_To_Int24(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed short *src   = (signed short*) sourceBuffer;
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+    signed short temp;
+
+    (void) ditherGenerator; /* unused parameter */
+    
+    while( count-- )
+    {
+        temp = *src;
+        
+#if defined(PA_LITTLE_ENDIAN)
+        dest[0] = 0;
+        dest[1] = (unsigned char)(temp);
+        dest[2] = (unsigned char)(temp >> 8);
+#elif defined(PA_BIG_ENDIAN)
+        dest[0] = (unsigned char)(temp >> 8);
+        dest[1] = (unsigned char)(temp);
+        dest[2] = 0;
+#endif
+
+        src += sourceStride;
+        dest += destinationStride * 3;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int16_To_Int8(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed short *src = (signed short*)sourceBuffer;
+    signed char *dest =  (signed char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        (*dest) = (signed char)((*src) >> 8);
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int16_To_Int8_Dither(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed short *src = (signed short*)sourceBuffer;
+    signed char *dest =  (signed char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        /* IMPLEMENT ME */
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int16_To_UInt8(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed short *src = (signed short*)sourceBuffer;
+    unsigned char *dest =  (unsigned char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+		(*dest) = (unsigned char)(((*src) >> 8) + 128); 
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int16_To_UInt8_Dither(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed short *src = (signed short*)sourceBuffer;
+    unsigned char *dest =  (unsigned char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        /* IMPLEMENT ME */
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int8_To_Float32(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed char *src = (signed char*)sourceBuffer;
+    float *dest =  (float*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        float samp = *src * const_1_div_128_;
+        *dest = samp;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int8_To_Int32(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed char *src = (signed char*)sourceBuffer;
+    signed long *dest =  (signed long*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+		(*dest) = (*src) << 24;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int8_To_Int24(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed char *src = (signed char*)sourceBuffer;
+    unsigned char *dest =  (unsigned char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+
+#if defined(PA_LITTLE_ENDIAN)
+        dest[0] = 0;
+        dest[1] = 0;
+        dest[2] = (*src);
+#elif defined(PA_BIG_ENDIAN)
+        dest[0] = (*src);
+        dest[1] = 0;
+        dest[2] = 0;
+#endif
+
+        src += sourceStride;
+        dest += destinationStride * 3;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int8_To_Int16(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed char *src = (signed char*)sourceBuffer;
+    signed short *dest =  (signed short*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+		(*dest) = (signed short)((*src) << 8);
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Int8_To_UInt8(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    signed char *src = (signed char*)sourceBuffer;
+    unsigned char *dest =  (unsigned char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        (*dest) = (unsigned char)(*src + 128);
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void UInt8_To_Float32(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    unsigned char *src = (unsigned char*)sourceBuffer;
+    float *dest =  (float*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        float samp = (*src - 128) * const_1_div_128_;
+        *dest = samp;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void UInt8_To_Int32(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    unsigned char *src = (unsigned char*)sourceBuffer;
+    signed long *dest =  (signed long*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+		(*dest) = (*src - 128) << 24;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void UInt8_To_Int24(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+	unsigned char *src  = (unsigned char*)sourceBuffer;
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+    (void) ditherGenerator; /* unused parameters */
+    
+	while( count-- )
+    {
+
+#if defined(PA_LITTLE_ENDIAN)
+        dest[0] = 0;
+        dest[1] = 0;
+        dest[2] = (unsigned char)(*src - 128);
+#elif defined(PA_BIG_ENDIAN)
+        dest[0] = (unsigned char)(*src - 128);
+        dest[1] = 0;
+        dest[2] = 0;
+#endif
+		
+        src += sourceStride;
+        dest += destinationStride * 3;    
+	}
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void UInt8_To_Int16(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    unsigned char *src = (unsigned char*)sourceBuffer;
+    signed short *dest =  (signed short*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+		(*dest) = (signed short)((*src - 128) << 8);
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void UInt8_To_Int8(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    unsigned char *src = (unsigned char*)sourceBuffer;
+    signed char  *dest = (signed char*)destinationBuffer;
+    (void)ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        (*dest) = (signed char)(*src - 128);
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Copy_8_To_8(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    unsigned char *src = (unsigned char*)sourceBuffer;
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+                                                      
+    (void) ditherGenerator; /* unused parameter */
+
+    while( count-- )
+    {
+        *dest = *src;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Copy_16_To_16(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    PaUint16 *src = (PaUint16 *)sourceBuffer;
+    PaUint16 *dest = (PaUint16 *)destinationBuffer;
+                                                  
+    if (dest==NULL) return;
+
+    (void) ditherGenerator; /* unused parameter */
+    
+    while( count-- )
+    {
+        *dest = *src;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Copy_24_To_24(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    unsigned char *src = (unsigned char*)sourceBuffer;
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+
+    (void) ditherGenerator; /* unused parameter */
+    
+    while( count-- )
+    {
+        dest[0] = src[0];
+        dest[1] = src[1];
+        dest[2] = src[2];
+
+        src += sourceStride * 3;
+        dest += destinationStride * 3;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Copy_32_To_32(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    PaUint32 *dest = (PaUint32 *)destinationBuffer;
+    PaUint32 *src = (PaUint32 *)sourceBuffer;
+
+    (void) ditherGenerator; /* unused parameter */
+    
+    while( count-- )
+    {
+        *dest = *src;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+PaUtilConverterTable paConverters = {
+    Float32_To_Int32,              /* PaUtilConverter *Float32_To_Int32; */
+    Float32_To_Int32_Dither,       /* PaUtilConverter *Float32_To_Int32_Dither; */
+    Float32_To_Int32_Clip,         /* PaUtilConverter *Float32_To_Int32_Clip; */
+    Float32_To_Int32_DitherClip,   /* PaUtilConverter *Float32_To_Int32_DitherClip; */
+
+    Float32_To_Int24,              /* PaUtilConverter *Float32_To_Int24; */
+    Float32_To_Int24_Dither,       /* PaUtilConverter *Float32_To_Int24_Dither; */
+    Float32_To_Int24_Clip,         /* PaUtilConverter *Float32_To_Int24_Clip; */
+    Float32_To_Int24_DitherClip,   /* PaUtilConverter *Float32_To_Int24_DitherClip; */
+    
+    Float32_To_Int16,              /* PaUtilConverter *Float32_To_Int16; */
+    Float32_To_Int16_Dither,       /* PaUtilConverter *Float32_To_Int16_Dither; */
+    Float32_To_Int16_Clip,         /* PaUtilConverter *Float32_To_Int16_Clip; */
+    Float32_To_Int16_DitherClip,   /* PaUtilConverter *Float32_To_Int16_DitherClip; */
+
+    Float32_To_Int8,               /* PaUtilConverter *Float32_To_Int8; */
+    Float32_To_Int8_Dither,        /* PaUtilConverter *Float32_To_Int8_Dither; */
+    Float32_To_Int8_Clip,          /* PaUtilConverter *Float32_To_Int8_Clip; */
+    Float32_To_Int8_DitherClip,    /* PaUtilConverter *Float32_To_Int8_DitherClip; */
+
+    Float32_To_UInt8,              /* PaUtilConverter *Float32_To_UInt8; */
+    Float32_To_UInt8_Dither,       /* PaUtilConverter *Float32_To_UInt8_Dither; */
+    Float32_To_UInt8_Clip,         /* PaUtilConverter *Float32_To_UInt8_Clip; */
+    Float32_To_UInt8_DitherClip,   /* PaUtilConverter *Float32_To_UInt8_DitherClip; */
+
+    Int32_To_Float32,              /* PaUtilConverter *Int32_To_Float32; */
+    Int32_To_Int24,                /* PaUtilConverter *Int32_To_Int24; */
+    Int32_To_Int24_Dither,         /* PaUtilConverter *Int32_To_Int24_Dither; */
+    Int32_To_Int16,                /* PaUtilConverter *Int32_To_Int16; */
+    Int32_To_Int16_Dither,         /* PaUtilConverter *Int32_To_Int16_Dither; */
+    Int32_To_Int8,                 /* PaUtilConverter *Int32_To_Int8; */
+    Int32_To_Int8_Dither,          /* PaUtilConverter *Int32_To_Int8_Dither; */
+    Int32_To_UInt8,                /* PaUtilConverter *Int32_To_UInt8; */
+    Int32_To_UInt8_Dither,         /* PaUtilConverter *Int32_To_UInt8_Dither; */
+
+    Int24_To_Float32,              /* PaUtilConverter *Int24_To_Float32; */
+    Int24_To_Int32,                /* PaUtilConverter *Int24_To_Int32; */
+    Int24_To_Int16,                /* PaUtilConverter *Int24_To_Int16; */
+    Int24_To_Int16_Dither,         /* PaUtilConverter *Int24_To_Int16_Dither; */
+    Int24_To_Int8,                 /* PaUtilConverter *Int24_To_Int8; */
+    Int24_To_Int8_Dither,          /* PaUtilConverter *Int24_To_Int8_Dither; */
+    Int24_To_UInt8,                /* PaUtilConverter *Int24_To_UInt8; */
+    Int24_To_UInt8_Dither,         /* PaUtilConverter *Int24_To_UInt8_Dither; */
+
+    Int16_To_Float32,              /* PaUtilConverter *Int16_To_Float32; */
+    Int16_To_Int32,                /* PaUtilConverter *Int16_To_Int32; */
+    Int16_To_Int24,                /* PaUtilConverter *Int16_To_Int24; */
+    Int16_To_Int8,                 /* PaUtilConverter *Int16_To_Int8; */
+    Int16_To_Int8_Dither,          /* PaUtilConverter *Int16_To_Int8_Dither; */
+    Int16_To_UInt8,                /* PaUtilConverter *Int16_To_UInt8; */
+    Int16_To_UInt8_Dither,         /* PaUtilConverter *Int16_To_UInt8_Dither; */
+
+    Int8_To_Float32,               /* PaUtilConverter *Int8_To_Float32; */
+    Int8_To_Int32,                 /* PaUtilConverter *Int8_To_Int32; */
+    Int8_To_Int24,                 /* PaUtilConverter *Int8_To_Int24 */
+    Int8_To_Int16,                 /* PaUtilConverter *Int8_To_Int16; */
+    Int8_To_UInt8,                 /* PaUtilConverter *Int8_To_UInt8; */
+
+    UInt8_To_Float32,              /* PaUtilConverter *UInt8_To_Float32; */
+    UInt8_To_Int32,                /* PaUtilConverter *UInt8_To_Int32; */
+    UInt8_To_Int24,                /* PaUtilConverter *UInt8_To_Int24; */
+    UInt8_To_Int16,                /* PaUtilConverter *UInt8_To_Int16; */
+    UInt8_To_Int8,                 /* PaUtilConverter *UInt8_To_Int8; */
+
+    Copy_8_To_8,                   /* PaUtilConverter *Copy_8_To_8; */
+    Copy_16_To_16,                 /* PaUtilConverter *Copy_16_To_16; */
+    Copy_24_To_24,                 /* PaUtilConverter *Copy_24_To_24; */
+    Copy_32_To_32                  /* PaUtilConverter *Copy_32_To_32; */
+};
+
+/* -------------------------------------------------------------------------- */
+
+#endif /* PA_NO_STANDARD_CONVERTERS */
+
+/* -------------------------------------------------------------------------- */
+
+PaUtilZeroer* PaUtil_SelectZeroer( PaSampleFormat destinationFormat )
+{
+    switch( destinationFormat & ~paNonInterleaved ){
+    case paFloat32:
+        return paZeroers.Zero32;
+    case paInt32:
+        return paZeroers.Zero32;
+    case paInt24:
+        return paZeroers.Zero24;
+    case paInt16:
+        return paZeroers.Zero16;
+    case paInt8:
+        return paZeroers.Zero8;
+    case paUInt8:
+        return paZeroers.ZeroU8;
+    default: return 0;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+#ifdef PA_NO_STANDARD_ZEROERS
+
+/* -------------------------------------------------------------------------- */
+
+PaUtilZeroerTable paZeroers = {
+    0,  /* PaUtilZeroer *ZeroU8; */
+    0,  /* PaUtilZeroer *Zero8; */
+    0,  /* PaUtilZeroer *Zero16; */
+    0,  /* PaUtilZeroer *Zero24; */
+    0,  /* PaUtilZeroer *Zero32; */
+};
+
+/* -------------------------------------------------------------------------- */
+
+#else /* PA_NO_STANDARD_ZEROERS is not defined */
+
+/* -------------------------------------------------------------------------- */
+
+static void ZeroU8( void *destinationBuffer, signed int destinationStride,
+        unsigned int count )
+{
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+
+    while( count-- )
+    {
+        *dest = 128;
+
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Zero8( void *destinationBuffer, signed int destinationStride,
+        unsigned int count )
+{
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+
+    while( count-- )
+    {
+        *dest = 0;
+
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Zero16( void *destinationBuffer, signed int destinationStride,
+        unsigned int count )
+{
+    PaUint16 *dest = (PaUint16 *)destinationBuffer;
+
+    while( count-- )
+    {
+        *dest = 0;
+
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Zero24( void *destinationBuffer, signed int destinationStride,
+        unsigned int count )
+{
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+
+    while( count-- )
+    {
+        dest[0] = 0;
+        dest[1] = 0;
+        dest[2] = 0;
+
+        dest += destinationStride * 3;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Zero32( void *destinationBuffer, signed int destinationStride,
+        unsigned int count )
+{
+    PaUint32 *dest = (PaUint32 *)destinationBuffer;
+
+    while( count-- )
+    {
+        *dest = 0;
+
+        dest += destinationStride;
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+PaUtilZeroerTable paZeroers = {
+    ZeroU8,  /* PaUtilZeroer *ZeroU8; */
+    Zero8,  /* PaUtilZeroer *Zero8; */
+    Zero16,  /* PaUtilZeroer *Zero16; */
+    Zero24,  /* PaUtilZeroer *Zero24; */
+    Zero32,  /* PaUtilZeroer *Zero32; */
+};
+
+/* -------------------------------------------------------------------------- */
+
+#endif /* PA_NO_STANDARD_ZEROERS */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_converters.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_converters.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_converters.h	(revision 1163)
@@ -0,0 +1,254 @@
+#ifndef PA_CONVERTERS_H
+#define PA_CONVERTERS_H
+/*
+ * $Id: pa_converters.h,v 1.1.2.9 2003/09/20 21:05:14 rossbencina Exp $
+ * Portable Audio I/O Library sample conversion mechanism
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Phil Burk, Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Conversion functions used to convert buffers of samples from one
+ format to another.
+*/
+
+
+#include "portaudio.h"  /* for PaSampleFormat */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+struct PaUtilTriangularDitherGenerator;
+
+
+/** Choose an available sample format which is most appropriate for
+ representing the requested format. If the requested format is not available
+ higher quality formats are considered before lower quality formates.
+ @param availableFormats A variable containing the logical OR of all available
+ formats.
+ @param format The desired format.
+ @return The most appropriate available format for representing the requested
+ format.
+*/
+PaSampleFormat PaUtil_SelectClosestAvailableFormat(
+        PaSampleFormat availableFormats, PaSampleFormat format );
+
+
+/* high level conversions functions for use by implementations */
+
+
+/** The generic sample converter prototype. Sample converters convert count
+    samples from sourceBuffer to destinationBuffer. The actual type of the data
+    pointed to by these parameters varys for different converter functions.
+    @param destinationBuffer A pointer to the first sample of the destination.
+    @param destinationStride An offset between successive destination samples
+    expressed in samples (not bytes.) It may be negative.
+    @param sourceBuffer A pointer to the first sample of the source.
+    @param sourceStride An offset between successive source samples
+    expressed in samples (not bytes.) It may be negative.
+    @param count The number of samples to convert.
+    @param ditherState State information used to calculate dither. Converters
+    that do not perform dithering will ignore this parameter, in which case
+    NULL or invalid dither state may be passed.
+*/
+typedef void PaUtilConverter(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, struct PaUtilTriangularDitherGenerator *ditherGenerator );
+
+
+/** Find a sample converter function for the given source and destinations
+    formats and flags (clip and dither.)
+    @return
+    A pointer to a PaUtilConverter which will perform the requested
+    conversion, or NULL if the given format conversion is not supported.
+    For conversions where clipping or dithering is not necessary, the
+    clip and dither flags are ignored and a non-clipping or dithering
+    version is returned.
+    If the source and destination formats are the same, a function which
+    copies data of the appropriate size will be returned.
+*/
+PaUtilConverter* PaUtil_SelectConverter( PaSampleFormat sourceFormat,
+        PaSampleFormat destinationFormat, PaStreamFlags flags );
+
+
+/** The generic buffer zeroer prototype. Buffer zeroers copy count zeros to
+    destinationBuffer. The actual type of the data pointed to varys for
+    different zeroer functions.
+    @param destinationBuffer A pointer to the first sample of the destination.
+    @param destinationStride An offset between successive destination samples
+    expressed in samples (not bytes.) It may be negative.
+    @param count The number of samples to zero.
+*/
+typedef void PaUtilZeroer(
+    void *destinationBuffer, signed int destinationStride, unsigned int count );
+
+    
+/** Find a buffer zeroer function for the given destination format.
+    @return
+    A pointer to a PaUtilZeroer which will perform the requested
+    zeroing.
+*/
+PaUtilZeroer* PaUtil_SelectZeroer( PaSampleFormat destinationFormat );
+
+/*----------------------------------------------------------------------------*/
+/* low level functions and data structures which may be used for
+    substituting conversion functions */
+
+
+/** The type used to store all sample conversion functions.
+    @see paConverters;
+*/
+typedef struct{
+    PaUtilConverter *Float32_To_Int32;
+    PaUtilConverter *Float32_To_Int32_Dither;
+    PaUtilConverter *Float32_To_Int32_Clip;
+    PaUtilConverter *Float32_To_Int32_DitherClip;
+
+    PaUtilConverter *Float32_To_Int24;
+    PaUtilConverter *Float32_To_Int24_Dither;
+    PaUtilConverter *Float32_To_Int24_Clip;
+    PaUtilConverter *Float32_To_Int24_DitherClip;
+    
+    PaUtilConverter *Float32_To_Int16;
+    PaUtilConverter *Float32_To_Int16_Dither;
+    PaUtilConverter *Float32_To_Int16_Clip;
+    PaUtilConverter *Float32_To_Int16_DitherClip;
+
+    PaUtilConverter *Float32_To_Int8;
+    PaUtilConverter *Float32_To_Int8_Dither;
+    PaUtilConverter *Float32_To_Int8_Clip;
+    PaUtilConverter *Float32_To_Int8_DitherClip;
+
+    PaUtilConverter *Float32_To_UInt8;
+    PaUtilConverter *Float32_To_UInt8_Dither;
+    PaUtilConverter *Float32_To_UInt8_Clip;
+    PaUtilConverter *Float32_To_UInt8_DitherClip;
+
+    PaUtilConverter *Int32_To_Float32;
+    PaUtilConverter *Int32_To_Int24;
+    PaUtilConverter *Int32_To_Int24_Dither;
+    PaUtilConverter *Int32_To_Int16;
+    PaUtilConverter *Int32_To_Int16_Dither;
+    PaUtilConverter *Int32_To_Int8;
+    PaUtilConverter *Int32_To_Int8_Dither;
+    PaUtilConverter *Int32_To_UInt8;
+    PaUtilConverter *Int32_To_UInt8_Dither;
+
+    PaUtilConverter *Int24_To_Float32;
+    PaUtilConverter *Int24_To_Int32;
+    PaUtilConverter *Int24_To_Int16;
+    PaUtilConverter *Int24_To_Int16_Dither;
+    PaUtilConverter *Int24_To_Int8;
+    PaUtilConverter *Int24_To_Int8_Dither;
+    PaUtilConverter *Int24_To_UInt8;
+    PaUtilConverter *Int24_To_UInt8_Dither;
+
+    PaUtilConverter *Int16_To_Float32;
+    PaUtilConverter *Int16_To_Int32;
+    PaUtilConverter *Int16_To_Int24;
+    PaUtilConverter *Int16_To_Int8;
+    PaUtilConverter *Int16_To_Int8_Dither;
+    PaUtilConverter *Int16_To_UInt8;
+    PaUtilConverter *Int16_To_UInt8_Dither;
+
+    PaUtilConverter *Int8_To_Float32;
+    PaUtilConverter *Int8_To_Int32;
+    PaUtilConverter *Int8_To_Int24;
+    PaUtilConverter *Int8_To_Int16;
+    PaUtilConverter *Int8_To_UInt8;
+    
+    PaUtilConverter *UInt8_To_Float32;
+    PaUtilConverter *UInt8_To_Int32;
+    PaUtilConverter *UInt8_To_Int24;
+    PaUtilConverter *UInt8_To_Int16;
+    PaUtilConverter *UInt8_To_Int8;
+
+    PaUtilConverter *Copy_8_To_8;       /* copy without any conversion */
+    PaUtilConverter *Copy_16_To_16;     /* copy without any conversion */
+    PaUtilConverter *Copy_24_To_24;     /* copy without any conversion */
+    PaUtilConverter *Copy_32_To_32;     /* copy without any conversion */
+} PaUtilConverterTable;
+
+
+/** A table of pointers to all required converter functions.
+    PaUtil_SelectConverter() uses this table to lookup the appropriate
+    conversion functions. The fields of this structure are initialized
+    with default conversion functions. Fields may be NULL, indicating that
+    no conversion function is available. User code may substitue optimised
+    conversion functions by assigning different function pointers to
+    these fields.
+
+    @note
+    If the PA_NO_STANDARD_CONVERTERS preprocessor variable is defined,
+    PortAudio's standard converters will not be compiled, and all fields
+    of this structure will be initialized to NULL. In such cases, users
+    should supply their own conversion functions if the require PortAudio
+    to open a stream that requires sample conversion.
+
+    @see PaUtilConverterTable, PaUtilConverter, PaUtil_SelectConverter
+*/
+extern PaUtilConverterTable paConverters;
+
+
+/** The type used to store all buffer zeroing functions.
+    @see paZeroers;
+*/
+typedef struct{
+    PaUtilZeroer *ZeroU8; /* unsigned 8 bit, zero == 128 */
+    PaUtilZeroer *Zero8;
+    PaUtilZeroer *Zero16;
+    PaUtilZeroer *Zero24;
+    PaUtilZeroer *Zero32;
+} PaUtilZeroerTable;
+
+
+/** A table of pointers to all required zeroer functions.
+    PaUtil_SelectZeroer() uses this table to lookup the appropriate
+    conversion functions. The fields of this structure are initialized
+    with default conversion functions. User code may substitue optimised
+    conversion functions by assigning different function pointers to
+    these fields.
+
+    @note
+    If the PA_NO_STANDARD_ZEROERS preprocessor variable is defined,
+    PortAudio's standard zeroers will not be compiled, and all fields
+    of this structure will be initialized to NULL. In such cases, users
+    should supply their own zeroing functions for the sample sizes which
+    they intend to use.
+
+    @see PaUtilZeroerTable, PaUtilZeroer, PaUtil_SelectZeroer
+*/
+extern PaUtilZeroerTable paZeroers;
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PA_CONVERTERS_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_cpuload.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_cpuload.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_cpuload.c	(revision 1163)
@@ -0,0 +1,96 @@
+/*
+ * $Id: pa_cpuload.c,v 1.1.2.14 2004/01/08 22:01:12 rossbencina Exp $
+ * Portable Audio I/O Library CPU Load measurement functions
+ * Portable CPU load measurement facility.
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 2002 Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Functions to assist in measuring the CPU utilization of a callback
+ stream. Used to implement the Pa_GetStreamCpuLoad() function.
+
+ @todo Dynamically calculate the coefficients used to smooth the CPU Load
+ Measurements over time to provide a uniform characterisation of CPU Load
+ independent of rate at which PaUtil_BeginCpuLoadMeasurement /
+ PaUtil_EndCpuLoadMeasurement are called.
+*/
+
+
+#include "pa_cpuload.h"
+
+#include <assert.h>
+
+#include "pa_util.h"   /* for PaUtil_GetTime() */
+
+
+void PaUtil_InitializeCpuLoadMeasurer( PaUtilCpuLoadMeasurer* measurer, double sampleRate )
+{
+    assert( sampleRate > 0 );
+
+    measurer->samplingPeriod = 1. / sampleRate;
+    measurer->averageLoad = 0.;
+}
+
+void PaUtil_ResetCpuLoadMeasurer( PaUtilCpuLoadMeasurer* measurer )
+{
+    measurer->averageLoad = 0.;
+}
+
+void PaUtil_BeginCpuLoadMeasurement( PaUtilCpuLoadMeasurer* measurer )
+{
+    measurer->measurementStartTime = PaUtil_GetTime();
+}
+
+
+void PaUtil_EndCpuLoadMeasurement( PaUtilCpuLoadMeasurer* measurer, unsigned long framesProcessed )
+{
+    double measurementEndTime, secondsFor100Percent, measuredLoad;
+
+    if( framesProcessed > 0 ){
+        measurementEndTime = PaUtil_GetTime();
+
+        assert( framesProcessed > 0 );
+        secondsFor100Percent = framesProcessed * measurer->samplingPeriod;
+
+        measuredLoad = (measurementEndTime - measurer->measurementStartTime) / secondsFor100Percent;
+
+        /* Low pass filter the calculated CPU load to reduce jitter using a simple IIR low pass filter. */
+        /** FIXME @todo these coefficients shouldn't be hardwired */
+#define LOWPASS_COEFFICIENT_0   (0.9)
+#define LOWPASS_COEFFICIENT_1   (0.99999 - LOWPASS_COEFFICIENT_0)
+
+        measurer->averageLoad = (LOWPASS_COEFFICIENT_0 * measurer->averageLoad) +
+                               (LOWPASS_COEFFICIENT_1 * measuredLoad);
+    }
+}
+
+
+double PaUtil_GetCpuLoad( PaUtilCpuLoadMeasurer* measurer )
+{
+    return measurer->averageLoad;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_cpuload.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_cpuload.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_cpuload.h	(revision 1163)
@@ -0,0 +1,63 @@
+#ifndef PA_CPULOAD_H
+#define PA_CPULOAD_H
+/*
+ * $Id: pa_cpuload.h,v 1.1.2.10 2004/01/08 22:01:12 rossbencina Exp $
+ * Portable Audio I/O Library CPU Load measurement functions
+ * Portable CPU load measurement facility.
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 2002 Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Functions to assist in measuring the CPU utilization of a callback
+ stream. Used to implement the Pa_GetStreamCpuLoad() function.
+*/
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+typedef struct {
+    double samplingPeriod;
+    double measurementStartTime;
+    double averageLoad;
+} PaUtilCpuLoadMeasurer; /**< @todo need better name than measurer */
+
+void PaUtil_InitializeCpuLoadMeasurer( PaUtilCpuLoadMeasurer* measurer, double sampleRate );
+void PaUtil_BeginCpuLoadMeasurement( PaUtilCpuLoadMeasurer* measurer );
+void PaUtil_EndCpuLoadMeasurement( PaUtilCpuLoadMeasurer* measurer, unsigned long framesProcessed );
+void PaUtil_ResetCpuLoadMeasurer( PaUtilCpuLoadMeasurer* measurer );
+double PaUtil_GetCpuLoad( PaUtilCpuLoadMeasurer* measurer );
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */     
+#endif /* PA_CPULOAD_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_dither.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_dither.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_dither.c	(revision 1163)
@@ -0,0 +1,204 @@
+/*
+ * $Id: pa_dither.c,v 1.1.2.6 2005/05/28 22:49:02 rossbencina Exp $
+ * Portable Audio I/O Library triangular dither generator
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Phil Burk, Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Functions for generating dither noise
+*/
+
+
+#include "pa_dither.h"
+#include "pa_types.h"
+
+#define PA_DITHER_BITS_   (15)
+
+
+void PaUtil_InitializeTriangularDitherState( PaUtilTriangularDitherGenerator *state )
+{
+    state->previous = 0;
+    state->randSeed1 = 22222;
+    state->randSeed2 = 5555555;
+}
+
+
+signed long PaUtil_Generate16BitTriangularDither( PaUtilTriangularDitherGenerator *state )
+{
+    signed long current, highPass;
+
+    /* Generate two random numbers. */
+    state->randSeed1 = (state->randSeed1 * 196314165) + 907633515;
+    state->randSeed2 = (state->randSeed2 * 196314165) + 907633515;
+
+    /* Generate triangular distribution about 0.
+     * Shift before adding to prevent overflow which would skew the distribution.
+     * Also shift an extra bit for the high pass filter. 
+     */
+#define DITHER_SHIFT_  ((SIZEOF_LONG*8 - PA_DITHER_BITS_) + 1)
+    current = (((signed long)state->randSeed1)>>DITHER_SHIFT_) +
+              (((signed long)state->randSeed2)>>DITHER_SHIFT_);
+
+    /* High pass filter to reduce audibility. */
+    highPass = current - state->previous;
+    state->previous = current;
+    return highPass;
+}
+
+
+/* Multiply by PA_FLOAT_DITHER_SCALE_ to get a float between -2.0 and +1.99999 */
+#define PA_FLOAT_DITHER_SCALE_  (1.0f / ((1<<PA_DITHER_BITS_)-1))
+static const float const_float_dither_scale_ = PA_FLOAT_DITHER_SCALE_;
+
+float PaUtil_GenerateFloatTriangularDither( PaUtilTriangularDitherGenerator *state )
+{
+    signed long current, highPass;
+
+    /* Generate two random numbers. */
+    state->randSeed1 = (state->randSeed1 * 196314165) + 907633515;
+    state->randSeed2 = (state->randSeed2 * 196314165) + 907633515;
+
+    /* Generate triangular distribution about 0.
+     * Shift before adding to prevent overflow which would skew the distribution.
+     * Also shift an extra bit for the high pass filter. 
+     */
+#define DITHER_SHIFT_  ((SIZEOF_LONG*8 - PA_DITHER_BITS_) + 1)
+    current = (((signed long)state->randSeed1)>>DITHER_SHIFT_) +
+              (((signed long)state->randSeed2)>>DITHER_SHIFT_);
+
+    /* High pass filter to reduce audibility. */
+    highPass = current - state->previous;
+    state->previous = current;
+    return ((float)highPass) * const_float_dither_scale_;
+}
+
+
+/*
+The following alternate dither algorithms (from musicdsp.org) could be
+considered
+*/
+
+/*Noise shaped dither  (March 2000)
+-------------------
+
+This is a simple implementation of highpass triangular-PDF dither with
+2nd-order noise shaping, for use when truncating floating point audio
+data to fixed point.
+
+The noise shaping lowers the noise floor by 11dB below 5kHz (@ 44100Hz
+sample rate) compared to triangular-PDF dither. The code below assumes
+input data is in the range +1 to -1 and doesn't check for overloads!
+
+To save time when generating dither for multiple channels you can do
+things like this:  r3=(r1 & 0x7F)<<8; instead of calling rand() again.
+
+
+
+  int   r1, r2;                //rectangular-PDF random numbers
+  float s1, s2;                //error feedback buffers
+  float s = 0.5f;              //set to 0.0f for no noise shaping
+  float w = pow(2.0,bits-1);   //word length (usually bits=16)
+  float wi= 1.0f/w;            
+  float d = wi / RAND_MAX;     //dither amplitude (2 lsb)
+  float o = wi * 0.5f;         //remove dc offset
+  float in, tmp;
+  int   out;
+
+
+//for each sample...
+
+  r2=r1;                               //can make HP-TRI dither by
+  r1=rand();                           //subtracting previous rand()
+    
+  in += s * (s1 + s1 - s2);            //error feedback
+  tmp = in + o + d * (float)(r1 - r2); //dc offset and dither 
+  
+  out = (int)(w * tmp);                //truncate downwards
+  if(tmp<0.0f) out--;                  //this is faster than floor()
+
+  s2 = s1;                            
+  s1 = in - wi * (float)out;           //error
+
+
+
+-- 
+paul.kellett@maxim.abel.co.uk
+http://www.maxim.abel.co.uk
+*/
+
+
+/*
+16-to-8-bit first-order dither
+
+Type : First order error feedforward dithering code
+References : Posted by Jon Watte
+
+Notes : 
+This is about as simple a dithering algorithm as you can implement, but it's
+likely to sound better than just truncating to N bits.
+
+Note that you might not want to carry forward the full difference for infinity.
+It's probably likely that the worst performance hit comes from the saturation
+conditionals, which can be avoided with appropriate instructions on many DSPs
+and integer SIMD type instructions, or CMOV.
+
+Last, if sound quality is paramount (such as when going from > 16 bits to 16
+bits) you probably want to use a higher-order dither function found elsewhere
+on this site. 
+
+
+Code : 
+// This code will down-convert and dither a 16-bit signed short 
+// mono signal into an 8-bit unsigned char signal, using a first 
+// order forward-feeding error term dither. 
+
+#define uchar unsigned char 
+
+void dither_one_channel_16_to_8( short * input, uchar * output, int count, int * memory ) 
+{ 
+  int m = *memory; 
+  while( count-- > 0 ) { 
+    int i = *input++; 
+    i += m; 
+    int j = i + 32768 - 128; 
+    uchar o; 
+    if( j < 0 ) { 
+      o = 0; 
+    } 
+    else if( j > 65535 ) { 
+      o = 255; 
+    } 
+    else { 
+      o = (uchar)((j>>8)&0xff); 
+    } 
+    m = ((j-32768+128)-i); 
+    *output++ = o; 
+  } 
+  *memory = m; 
+} 
+*/
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_dither.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_dither.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_dither.h	(revision 1163)
@@ -0,0 +1,91 @@
+#ifndef PA_DITHER_H
+#define PA_DITHER_H
+/*
+ * $Id: pa_dither.h,v 1.1.2.4 2003/09/20 21:06:19 rossbencina Exp $
+ * Portable Audio I/O Library triangular dither generator
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Phil Burk, Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Functions for generating dither noise
+*/
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/** @brief State needed to generate a dither signal */
+typedef struct PaUtilTriangularDitherGenerator{
+    unsigned long previous;
+    unsigned long randSeed1;
+    unsigned long randSeed2;
+} PaUtilTriangularDitherGenerator;
+
+
+/** @brief Initialize dither state */
+void PaUtil_InitializeTriangularDitherState( PaUtilTriangularDitherGenerator *ditherState );
+
+
+/**
+ @brief Calculate 2 LSB dither signal with a triangular distribution.
+ Ranged for adding to a 1 bit right-shifted 32 bit integer
+ prior to >>15. eg:
+<pre>
+    signed long in = *
+    signed long dither = PaUtil_Generate16BitTriangularDither( ditherState );
+    signed short out = (signed short)(((in>>1) + dither) >> 15);
+</pre>
+ @return
+ A signed long with a range of +32767 to -32768
+*/
+signed long PaUtil_Generate16BitTriangularDither( PaUtilTriangularDitherGenerator *ditherState );
+
+
+/**
+ @brief Calculate 2 LSB dither signal with a triangular distribution.
+ Ranged for adding to a pre-scaled float.
+<pre>
+    float in = *
+    float dither = PaUtil_GenerateFloatTriangularDither( ditherState );
+    // use smaller scaler to prevent overflow when we add the dither
+    signed short out = (signed short)(in*(32766.0f) + dither );
+</pre>
+ @return
+ A float with a range of -2.0 to +1.99999.
+*/
+float PaUtil_GenerateFloatTriangularDither( PaUtilTriangularDitherGenerator *ditherState );
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PA_DITHER_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_endianness.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_endianness.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_endianness.h	(revision 1163)
@@ -0,0 +1,122 @@
+#ifndef PA_ENDIANNESS_H
+#define PA_ENDIANNESS_H
+/*
+ * $Id: pa_endianness.h,v 1.1.2.3 2003/09/20 21:06:19 rossbencina Exp $
+ * Portable Audio I/O Library current platform endianness macros
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Phil Burk, Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Configure endianness symbols for the target processor.
+
+ Arrange for either the PA_LITTLE_ENDIAN or PA_BIG_ENDIAN preprocessor symbols
+ to be defined. The one that is defined reflects the endianness of the target
+ platform and may be used to implement conditional compilation of byte-order
+ dependent code.
+
+ If either PA_LITTLE_ENDIAN or PA_BIG_ENDIAN is defined already, then no attempt
+ is made to override that setting. This may be useful if you have a better way
+ of determining the platform's endianness. The autoconf mechanism uses this for
+ example.
+
+ A PA_VALIDATE_ENDIANNESS macro is provided to compare the compile time
+ and runtime endiannes and raise an assertion if they don't match.
+*/
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#include <pj/config.h>
+
+#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0
+#  define PA_BIG_ENDIAN     1
+#elif defined(PJ_IS_LITTLE_ENDIAN) && PJ_IS_LITTLE_ENDIAN!=0
+#  define PA_LITTLE_ENDIAN  1
+#else
+#  error "Unable to detect PJLIB's endianness"
+#endif
+
+
+
+#if defined(PA_LITTLE_ENDIAN) || defined(PA_BIG_ENDIAN)
+    /* endianness define has been set externally, such as by autoconf */
+
+    #if defined(PA_LITTLE_ENDIAN) && defined(PA_BIG_ENDIAN)
+    #error both PA_LITTLE_ENDIAN and PA_BIG_ENDIAN have been defined externally to pa_endianness.h - only one endianness at a time please
+    #endif
+
+#else
+    /* endianness define has not been set externally */
+
+    /* set PA_LITTLE_ENDIAN or PA_BIG_ENDIAN by testing well known platform specific defines */
+
+    #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
+
+    #define PA_LITTLE_ENDIAN /* win32, assume intel byte order */
+
+    #else
+
+#endif
+
+    #if !defined(PA_LITTLE_ENDIAN) && !defined(PA_BIG_ENDIAN)
+    /*
+     If the following error is raised, you either need to modify the code above
+     to automatically determine the endianness from other symbols defined on your
+     platform, or define either PA_LITTLE_ENDIAN or PA_BIG_ENDIAN externally.
+    */
+    #error pa_endianness.h was unable to automatically determine the endianness of the target platform
+    #endif
+    
+#endif
+
+/* PA_VALIDATE_ENDIANNESS compares the compile time and runtime endianness,
+ and raises an assertion if they don't match. <assert.h> must be included in
+ the context in which this macro is used.
+*/
+#if defined(PA_LITTLE_ENDIAN)
+    #define PA_VALIDATE_ENDIANNESS \
+    { \
+        const long nativeOne = 1; \
+        assert( "PortAudio: compile time and runtime endianness don't match" && (((char *)&nativeOne)[0]) == 1 ); \
+    }
+#elif defined(PA_BIG_ENDIAN)
+    #define PA_VALIDATE_ENDIANNESS \
+    { \
+        const long nativeOne = 1; \
+        assert( "PortAudio: compile time and runtime endianness don't match" && (((char *)&nativeOne)[0]) == 0 ); \
+    }
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PA_ENDIANNESS_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_front.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_front.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_front.c	(revision 1163)
@@ -0,0 +1,1976 @@
+/*
+ * $Id: pa_front.c,v 1.1.2.51 2005/02/05 15:52:12 rossbencina Exp $
+ * Portable Audio I/O Library Multi-Host API front end
+ * Validate function parameters and manage multiple host APIs.
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/* doxygen index page */
+/** @mainpage
+
+PortAudio is an open-source cross-platform CË library for audio input
+and output. It is designed to simplify the porting of audio applications
+between various platforms, and also to simplify the development of audio
+software in general by hiding the complexities of device interfacing.
+
+See the PortAudio website for further information http://www.portaudio.com/
+
+This documentation pertains to PortAudio V19, API version 2.0 which is
+currently under development. API version 2.0 differs in a number of ways from
+previous versions, please consult the enhancement proposals for further details:
+http://www.portaudio.com/docs/proposals/index.html
+
+This documentation is under construction. Things you might be interested in
+include:
+
+- The PortAudio API 2.0, as documented in portaudio.h
+
+- The <a href="todo.html">TODO List</a>
+
+Feel free to pick an item off TODO list and fix/implement it. You may want to
+enquire about status on the PortAudio mailing list first.
+*/
+
+
+/** @file
+ @brief Implements public PortAudio API, checks some errors, forwards to
+ host API implementations.
+ 
+ Implements the functions defined in the PortAudio API, checks for
+ some parameter and state inconsistencies and forwards API requests to
+ specific Host API implementations (via the interface declared in
+ pa_hostapi.h), and Streams (via the interface declared in pa_stream.h).
+
+ This file handles initialization and termination of Host API
+ implementations via initializers stored in the paHostApiInitializers
+ global variable.
+
+ Some utility functions declared in pa_util.h are implemented in this file.
+
+ All PortAudio API functions can be conditionally compiled with logging code.
+ To compile with logging, define the PA_LOG_API_CALLS precompiler symbol.
+
+    @todo Consider adding host API specific error text in Pa_GetErrorText() for
+    paUnanticipatedHostError
+
+    @todo Consider adding a new error code for when (inputParameters == NULL)
+    && (outputParameters == NULL)
+
+    @todo review whether Pa_CloseStream() should call the interface's
+    CloseStream function if aborting the stream returns an error code.
+
+    @todo Create new error codes if a NULL buffer pointer, or a
+    zero frame count is passed to Pa_ReadStream or Pa_WriteStream.
+*/
+
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <memory.h>
+#include <string.h>
+#include <assert.h> /* needed by PA_VALIDATE_ENDIANNESS */
+
+#include "portaudio.h"
+#include "pa_util.h"
+#include "pa_endianness.h"
+#include "pa_types.h"
+#include "pa_hostapi.h"
+#include "pa_stream.h"
+
+#include "pa_trace.h"
+
+
+#define PA_VERSION_  1899
+#define PA_VERSION_TEXT_ "PortAudio V19-devel"
+
+
+
+/* #define PA_LOG_API_CALLS */
+
+/*
+    The basic format for log messages is described below. If you need to
+    add any log messages, please follow this format.
+ 
+    Function entry (void function):
+ 
+        "FunctionName called.\n"
+ 
+    Function entry (non void function):
+ 
+        "FunctionName called:\n"
+        "\tParam1Type param1: param1Value\n"
+        "\tParam2Type param2: param2Value\n"      (etc...)
+ 
+ 
+    Function exit (no return value):
+ 
+        "FunctionName returned.\n"
+ 
+    Function exit (simple return value):
+ 
+        "FunctionName returned:\n"
+        "\tReturnType: returnValue\n\n"
+ 
+    If the return type is an error code, the error text is displayed in ()
+ 
+    If the return type is not an error code, but has taken a special value
+    because an error occurred, then the reason for the error is shown in []
+ 
+    If the return type is a struct ptr, the struct is dumped.
+ 
+    See the code below for examples
+*/
+
+
+int Pa_GetVersion( void )
+{
+    return PA_VERSION_;
+}
+
+
+const char* Pa_GetVersionText( void )
+{
+    return PA_VERSION_TEXT_;
+}
+
+
+
+#define PA_LAST_HOST_ERROR_TEXT_LENGTH_  1024
+
+static char lastHostErrorText_[ PA_LAST_HOST_ERROR_TEXT_LENGTH_ + 1 ] = {0};
+
+static PaHostErrorInfo lastHostErrorInfo_ = { (PaHostApiTypeId)-1, 0, lastHostErrorText_ };
+
+
+void PaUtil_SetLastHostErrorInfo( PaHostApiTypeId hostApiType, long errorCode,
+        const char *errorText )
+{
+    lastHostErrorInfo_.hostApiType = hostApiType;
+    lastHostErrorInfo_.errorCode = errorCode;
+
+    strncpy( lastHostErrorText_, errorText, PA_LAST_HOST_ERROR_TEXT_LENGTH_ );
+}
+
+
+void PaUtil_DebugPrint( const char *format, ... )
+{
+    va_list ap;
+
+    va_start( ap, format );
+    vfprintf( stderr, format, ap );
+    va_end( ap );
+
+    fflush( stderr );
+}
+
+
+static PaUtilHostApiRepresentation **hostApis_ = 0;
+static int hostApisCount_ = 0;
+static int initializationCount_ = 0;
+static int deviceCount_ = 0;
+
+PaUtilStreamRepresentation *firstOpenStream_ = NULL;
+
+
+#define PA_IS_INITIALISED_ (initializationCount_ != 0)
+
+
+static int CountHostApiInitializers( void )
+{
+    int result = 0;
+
+    while( paHostApiInitializers[ result ] != 0 )
+        ++result;
+    return result;
+}
+
+
+static void TerminateHostApis( void )
+{
+    /* terminate in reverse order from initialization */
+
+    while( hostApisCount_ > 0 )
+    {
+        --hostApisCount_;
+        hostApis_[hostApisCount_]->Terminate( hostApis_[hostApisCount_] );
+    }
+    hostApisCount_ = 0;
+    deviceCount_ = 0;
+
+    if( hostApis_ != 0 )
+        PaUtil_FreeMemory( hostApis_ );
+    hostApis_ = 0;
+}
+
+
+static PaError InitializeHostApis( void )
+{
+    PaError result = paNoError;
+    int i, initializerCount, baseDeviceIndex;
+
+    initializerCount = CountHostApiInitializers();
+
+    hostApis_ = (PaUtilHostApiRepresentation**)PaUtil_AllocateMemory(
+            sizeof(PaUtilHostApiRepresentation*) * initializerCount );
+    if( !hostApis_ )
+    {
+        result = paInsufficientMemory;
+        goto error; 
+    }
+
+    hostApisCount_ = 0;
+    deviceCount_ = 0;
+    baseDeviceIndex = 0;
+
+    for( i=0; i< initializerCount; ++i )
+    {
+        hostApis_[hostApisCount_] = NULL;
+        result = paHostApiInitializers[i]( &hostApis_[hostApisCount_], hostApisCount_ );
+        if( result != paNoError )
+            goto error;
+
+        if( hostApis_[hostApisCount_] )
+        {
+
+            hostApis_[hostApisCount_]->privatePaFrontInfo.baseDeviceIndex = baseDeviceIndex;
+
+            if( hostApis_[hostApisCount_]->info.defaultInputDevice != paNoDevice )
+                hostApis_[hostApisCount_]->info.defaultInputDevice += baseDeviceIndex;
+
+            if( hostApis_[hostApisCount_]->info.defaultOutputDevice != paNoDevice )
+                hostApis_[hostApisCount_]->info.defaultOutputDevice += baseDeviceIndex;
+
+            baseDeviceIndex += hostApis_[hostApisCount_]->info.deviceCount;
+            deviceCount_ += hostApis_[hostApisCount_]->info.deviceCount;
+
+            ++hostApisCount_;
+        }
+    }
+
+    return result;
+
+error:
+    TerminateHostApis();
+    return result;
+}
+
+
+/*
+    FindHostApi() finds the index of the host api to which
+    <device> belongs and returns it. if <hostSpecificDeviceIndex> is
+    non-null, the host specific device index is returned in it.
+    returns -1 if <device> is out of range.
+ 
+*/
+static int FindHostApi( PaDeviceIndex device, int *hostSpecificDeviceIndex )
+{
+    int i=0;
+
+    if( !PA_IS_INITIALISED_ )
+        return -1;
+
+    if( device < 0 )
+        return -1;
+
+    while( i < hostApisCount_
+            && device >= hostApis_[i]->info.deviceCount )
+    {
+
+        device -= hostApis_[i]->info.deviceCount;
+        ++i;
+    }
+
+    if( i >= hostApisCount_ )
+        return -1;
+
+    if( hostSpecificDeviceIndex )
+        *hostSpecificDeviceIndex = device;
+
+    return i;
+}
+
+
+static void AddOpenStream( PaStream* stream )
+{
+    ((PaUtilStreamRepresentation*)stream)->nextOpenStream = firstOpenStream_;
+    firstOpenStream_ = (PaUtilStreamRepresentation*)stream;
+}
+
+
+static void RemoveOpenStream( PaStream* stream )
+{
+    PaUtilStreamRepresentation *previous = NULL;
+    PaUtilStreamRepresentation *current = firstOpenStream_;
+
+    while( current != NULL )
+    {
+        if( ((PaStream*)current) == stream )
+        {
+            if( previous == NULL )
+            {
+                firstOpenStream_ = current->nextOpenStream;
+            }
+            else
+            {
+                previous->nextOpenStream = current->nextOpenStream;
+            }
+            return;
+        }
+        else
+        {
+            previous = current;
+            current = current->nextOpenStream;
+        }
+    }
+}
+
+
+static void CloseOpenStreams( void )
+{
+    /* we call Pa_CloseStream() here to ensure that the same destruction
+        logic is used for automatically closed streams */
+
+    while( firstOpenStream_ != NULL )
+        Pa_CloseStream( firstOpenStream_ );
+}
+
+
+PaError Pa_Initialize( void )
+{
+    PaError result;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint( "Pa_Initialize called.\n" );
+#endif
+
+    if( PA_IS_INITIALISED_ )
+    {
+        ++initializationCount_;
+        result = paNoError;
+    }
+    else
+    {
+        PA_VALIDATE_TYPE_SIZES;
+        PA_VALIDATE_ENDIANNESS;
+        
+        PaUtil_InitializeClock();
+        PaUtil_ResetTraceMessages();
+
+        result = InitializeHostApis();
+        if( result == paNoError )
+            ++initializationCount_;
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint( "Pa_Initialize returned:\n" );
+    PaUtil_DebugPrint( "\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return result;
+}
+
+
+PaError Pa_Terminate( void )
+{
+    PaError result;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_Terminate called.\n" );
+#endif
+
+    if( PA_IS_INITIALISED_ )
+    {
+        if( --initializationCount_ == 0 )
+        {
+            CloseOpenStreams();
+
+            TerminateHostApis();
+
+            PaUtil_DumpTraceMessages();
+        }
+        result = paNoError;
+    }
+    else
+    {
+        result=  paNotInitialized;
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_Terminate returned:\n" );
+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return result;
+}
+
+
+const PaHostErrorInfo* Pa_GetLastHostErrorInfo( void )
+{
+    return &lastHostErrorInfo_;
+}
+
+
+const char *Pa_GetErrorText( PaError errorCode )
+{
+    const char *result;
+
+    switch( errorCode )
+    {
+    case paNoError:                  result = "Success"; break;
+    case paNotInitialized:           result = "PortAudio not initialized"; break;
+    /** @todo could catenate the last host error text to result in the case of paUnanticipatedHostError */
+    case paUnanticipatedHostError:   result = "Unanticipated host error"; break;
+    case paInvalidChannelCount:      result = "Invalid number of channels"; break;
+    case paInvalidSampleRate:        result = "Invalid sample rate"; break;
+    case paInvalidDevice:            result = "Invalid device"; break;
+    case paInvalidFlag:              result = "Invalid flag"; break;
+    case paSampleFormatNotSupported: result = "Sample format not supported"; break;
+    case paBadIODeviceCombination:   result = "Illegal combination of I/O devices"; break;
+    case paInsufficientMemory:       result = "Insufficient memory"; break;
+    case paBufferTooBig:             result = "Buffer too big"; break;
+    case paBufferTooSmall:           result = "Buffer too small"; break;
+    case paNullCallback:             result = "No callback routine specified"; break;
+    case paBadStreamPtr:             result = "Invalid stream pointer"; break;
+    case paTimedOut:                 result = "Wait timed out"; break;
+    case paInternalError:            result = "Internal PortAudio error"; break;
+    case paDeviceUnavailable:        result = "Device unavailable"; break;
+    case paIncompatibleHostApiSpecificStreamInfo:   result = "Incompatible host API specific stream info"; break;
+    case paStreamIsStopped:          result = "Stream is stopped"; break;
+    case paStreamIsNotStopped:       result = "Stream is not stopped"; break;
+    case paInputOverflowed:          result = "Input overflowed"; break;
+    case paOutputUnderflowed:        result = "Output underflowed"; break;
+    case paHostApiNotFound:          result = "Host API not found"; break;
+    case paInvalidHostApi:           result = "Invalid host API"; break;
+    case paCanNotReadFromACallbackStream:       result = "Can't read from a callback stream"; break;
+    case paCanNotWriteToACallbackStream:        result = "Can't write to a callback stream"; break;
+    case paCanNotReadFromAnOutputOnlyStream:    result = "Can't read from an output only stream"; break;
+    case paCanNotWriteToAnInputOnlyStream:      result = "Can't write to an input only stream"; break;
+    default:                         result = "Illegal error number"; break;
+    }
+    return result;
+}
+
+
+PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type )
+{
+    PaHostApiIndex result;
+    int i;
+    
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_HostApiTypeIdToHostApiIndex called:\n" );
+    PaUtil_DebugPrint("\tPaHostApiTypeId type: %d\n", type );
+#endif
+
+    if( !PA_IS_INITIALISED_ )
+    {
+        result = paNotInitialized;
+    }
+    else
+    {
+        result = paHostApiNotFound;
+        
+        for( i=0; i < hostApisCount_; ++i )
+        {
+            if( hostApis_[i]->info.type == type )
+            {
+                result = i;
+                break;
+            }         
+        }
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_HostApiTypeIdToHostApiIndex returned:\n" );
+    if( result < 0 )
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+    else
+        PaUtil_DebugPrint("\tPaHostApiIndex: %d\n\n", result );
+#endif
+
+    return result;
+}
+
+
+PaError PaUtil_GetHostApiRepresentation( struct PaUtilHostApiRepresentation **hostApi,
+        PaHostApiTypeId type )
+{
+    PaError result;
+    int i;
+    
+    if( !PA_IS_INITIALISED_ )
+    {
+        result = paNotInitialized;
+    }
+    else
+    {
+        result = paHostApiNotFound;
+                
+        for( i=0; i < hostApisCount_; ++i )
+        {
+            if( hostApis_[i]->info.type == type )
+            {
+                *hostApi = hostApis_[i];
+                result = paNoError;
+                break;
+            }
+        }
+    }
+
+    return result;
+}
+
+
+PaError PaUtil_DeviceIndexToHostApiDeviceIndex(
+        PaDeviceIndex *hostApiDevice, PaDeviceIndex device, struct PaUtilHostApiRepresentation *hostApi )
+{
+    PaError result;
+    PaDeviceIndex x;
+    
+    x = device - hostApi->privatePaFrontInfo.baseDeviceIndex;
+
+    if( x < 0 || x >= hostApi->info.deviceCount )
+    {
+        result = paInvalidDevice;
+    }
+    else
+    {
+        *hostApiDevice = x;
+        result = paNoError;
+    }
+
+    return result;
+}
+
+
+PaHostApiIndex Pa_GetHostApiCount( void )
+{
+    int result;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetHostApiCount called.\n" );
+#endif
+
+    if( !PA_IS_INITIALISED_ )
+    {
+        result = paNotInitialized;
+    }
+    else
+    {
+        result = hostApisCount_;
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetHostApiCount returned:\n" );
+    if( result < 0 )
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+    else
+        PaUtil_DebugPrint("\tPaHostApiIndex %d\n\n", result );
+#endif
+
+    return result;
+}
+
+
+PaHostApiIndex Pa_GetDefaultHostApi( void )
+{
+    int result;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetDefaultHostApi called.\n" );
+#endif
+
+    if( !PA_IS_INITIALISED_ )
+    {
+        result = paNotInitialized;
+    }
+    else
+    {
+        result = paDefaultHostApiIndex;
+
+        /* internal consistency check: make sure that the default host api
+         index is within range */
+
+        if( result < 0 || result >= hostApisCount_ )
+        {
+            result = paInternalError;
+        }
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetDefaultHostApi returned:\n" );
+    if( result < 0 )
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+    else
+        PaUtil_DebugPrint("\tPaHostApiIndex %d\n\n", result );
+#endif
+
+    return result;
+}
+
+
+const PaHostApiInfo* Pa_GetHostApiInfo( PaHostApiIndex hostApi )
+{
+    PaHostApiInfo *info;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetHostApiInfo called:\n" );
+    PaUtil_DebugPrint("\tPaHostApiIndex hostApi: %d\n", hostApi );
+#endif
+
+    if( !PA_IS_INITIALISED_ )
+    {
+        info = NULL;
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetHostApiInfo returned:\n" );
+        PaUtil_DebugPrint("\tPaHostApiInfo*: NULL [ PortAudio not initialized ]\n\n" );
+#endif
+
+    }
+    else if( hostApi < 0 || hostApi >= hostApisCount_ )
+    {
+        info = NULL;
+        
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetHostApiInfo returned:\n" );
+        PaUtil_DebugPrint("\tPaHostApiInfo*: NULL [ hostApi out of range ]\n\n" );
+#endif
+
+    }
+    else
+    {
+        info = &hostApis_[hostApi]->info;
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetHostApiInfo returned:\n" );
+        PaUtil_DebugPrint("\tPaHostApiInfo*: 0x%p\n", info );
+        PaUtil_DebugPrint("\t{" );
+        PaUtil_DebugPrint("\t\tint structVersion: %d\n", info->structVersion );
+        PaUtil_DebugPrint("\t\tPaHostApiTypeId type: %d\n", info->type );
+        PaUtil_DebugPrint("\t\tconst char *name: %s\n\n", info->name );
+        PaUtil_DebugPrint("\t}\n\n" );
+#endif
+
+    }
+
+     return info;
+}
+
+
+PaDeviceIndex Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi, int hostApiDeviceIndex )
+{
+    PaDeviceIndex result;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_HostApiDeviceIndexToPaDeviceIndex called:\n" );
+    PaUtil_DebugPrint("\tPaHostApiIndex hostApi: %d\n", hostApi );
+    PaUtil_DebugPrint("\tint hostApiDeviceIndex: %d\n", hostApiDeviceIndex );
+#endif
+
+    if( !PA_IS_INITIALISED_ )
+    {
+        result = paNotInitialized;
+    }
+    else
+    {
+        if( hostApi < 0 || hostApi >= hostApisCount_ )
+        {
+            result = paInvalidHostApi;
+        }
+        else
+        {
+            if( hostApiDeviceIndex < 0 ||
+                    hostApiDeviceIndex >= hostApis_[hostApi]->info.deviceCount )
+            {
+                result = paInvalidDevice;
+            }
+            else
+            {
+                result = hostApis_[hostApi]->privatePaFrontInfo.baseDeviceIndex + hostApiDeviceIndex;
+            }
+        }
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_HostApiDeviceIndexToPaDeviceIndex returned:\n" );
+    if( result < 0 )
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+    else
+        PaUtil_DebugPrint("\tPaDeviceIndex: %d\n\n", result );
+#endif
+
+    return result;
+}
+
+
+PaDeviceIndex Pa_GetDeviceCount( void )
+{
+    PaDeviceIndex result;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetDeviceCount called.\n" );
+#endif
+
+    if( !PA_IS_INITIALISED_ )
+    {
+        result = paNotInitialized;
+    }
+    else
+    {
+        result = deviceCount_;
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetDeviceCount returned:\n" );
+    if( result < 0 )
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+    else
+        PaUtil_DebugPrint("\tPaDeviceIndex: %d\n\n", result );
+#endif
+
+    return result;
+}
+
+
+PaDeviceIndex Pa_GetDefaultInputDevice( void )
+{
+    PaHostApiIndex hostApi;
+    PaDeviceIndex result;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetDefaultInputDevice called.\n" );
+#endif
+
+    hostApi = Pa_GetDefaultHostApi();
+    if( hostApi < 0 )
+    {
+        result = paNoDevice;
+    }
+    else
+    {
+        result = hostApis_[hostApi]->info.defaultInputDevice;
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetDefaultInputDevice returned:\n" );
+    PaUtil_DebugPrint("\tPaDeviceIndex: %d\n\n", result );
+#endif
+
+    return result;
+}
+
+
+PaDeviceIndex Pa_GetDefaultOutputDevice( void )
+{
+    PaHostApiIndex hostApi;
+    PaDeviceIndex result;
+    
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetDefaultOutputDevice called.\n" );
+#endif
+
+    hostApi = Pa_GetDefaultHostApi();
+    if( hostApi < 0 )
+    {
+        result = paNoDevice;
+    }
+    else
+    {
+        result = hostApis_[hostApi]->info.defaultOutputDevice;
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetDefaultOutputDevice returned:\n" );
+    PaUtil_DebugPrint("\tPaDeviceIndex: %d\n\n", result );
+#endif
+
+    return result;
+}
+
+
+const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceIndex device )
+{
+    int hostSpecificDeviceIndex;
+    int hostApiIndex = FindHostApi( device, &hostSpecificDeviceIndex );
+    PaDeviceInfo *result;
+
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetDeviceInfo called:\n" );
+    PaUtil_DebugPrint("\tPaDeviceIndex device: %d\n", device );
+#endif
+
+    if( hostApiIndex < 0 )
+    {
+        result = NULL;
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetDeviceInfo returned:\n" );
+        PaUtil_DebugPrint("\tPaDeviceInfo* NULL [ invalid device index ]\n\n" );
+#endif
+
+    }
+    else
+    {
+        result = hostApis_[hostApiIndex]->deviceInfos[ hostSpecificDeviceIndex ];
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetDeviceInfo returned:\n" );
+        PaUtil_DebugPrint("\tPaDeviceInfo*: 0x%p:\n", result );
+        PaUtil_DebugPrint("\t{\n" );
+
+        PaUtil_DebugPrint("\t\tint structVersion: %d\n", result->structVersion );
+        PaUtil_DebugPrint("\t\tconst char *name: %s\n", result->name );
+        PaUtil_DebugPrint("\t\tPaHostApiIndex hostApi: %d\n", result->hostApi );
+        PaUtil_DebugPrint("\t\tint maxInputChannels: %d\n", result->maxInputChannels );
+        PaUtil_DebugPrint("\t\tint maxOutputChannels: %d\n", result->maxOutputChannels );
+        PaUtil_DebugPrint("\t}\n\n" );
+#endif
+
+    }
+
+    return result;
+}
+
+
+/*
+    SampleFormatIsValid() returns 1 if sampleFormat is a sample format
+    defined in portaudio.h, or 0 otherwise.
+*/
+static int SampleFormatIsValid( PaSampleFormat format )
+{
+    switch( format & ~paNonInterleaved )
+    {
+    case paFloat32: return 1;
+    case paInt16: return 1;
+    case paInt32: return 1;
+    case paInt24: return 1;
+    case paInt8: return 1;
+    case paUInt8: return 1;
+    case paCustomFormat: return 1;
+    default: return 0;
+    }
+}
+
+/*
+    NOTE: make sure this validation list is kept syncronised with the one in
+            pa_hostapi.h
+
+    ValidateOpenStreamParameters() checks that parameters to Pa_OpenStream()
+    conform to the expected values as described below. This function is
+    also designed to be used with the proposed Pa_IsFormatSupported() function.
+    
+    There are basically two types of validation that could be performed:
+    Generic conformance validation, and device capability mismatch
+    validation. This function performs only generic conformance validation.
+    Validation that would require knowledge of device capabilities is
+    not performed because of potentially complex relationships between
+    combinations of parameters - for example, even if the sampleRate
+    seems ok, it might not be for a duplex stream - we have no way of
+    checking this in an API-neutral way, so we don't try.
+ 
+    On success the function returns PaNoError and fills in hostApi,
+    hostApiInputDeviceID, and hostApiOutputDeviceID fields. On failure
+    the function returns an error code indicating the first encountered
+    parameter error.
+ 
+ 
+    If ValidateOpenStreamParameters() returns paNoError, the following
+    assertions are guaranteed to be true.
+ 
+    - at least one of inputParameters & outputParmeters is valid (not NULL)
+
+    - if inputParameters & outputParmeters are both valid, that
+        inputParameters->device & outputParmeters->device  both use the same host api
+ 
+    PaDeviceIndex inputParameters->device
+        - is within range (0 to Pa_GetDeviceCount-1) Or:
+        - is paUseHostApiSpecificDeviceSpecification and
+            inputParameters->hostApiSpecificStreamInfo is non-NULL and refers
+            to a valid host api
+
+    int inputParameters->channelCount
+        - if inputParameters->device is not paUseHostApiSpecificDeviceSpecification, channelCount is > 0
+        - upper bound is NOT validated against device capabilities
+ 
+    PaSampleFormat inputParameters->sampleFormat
+        - is one of the sample formats defined in portaudio.h
+
+    void *inputParameters->hostApiSpecificStreamInfo
+        - if supplied its hostApi field matches the input device's host Api
+ 
+    PaDeviceIndex outputParmeters->device
+        - is within range (0 to Pa_GetDeviceCount-1)
+ 
+    int outputParmeters->channelCount
+        - if inputDevice is valid, channelCount is > 0
+        - upper bound is NOT validated against device capabilities
+ 
+    PaSampleFormat outputParmeters->sampleFormat
+        - is one of the sample formats defined in portaudio.h
+        
+    void *outputParmeters->hostApiSpecificStreamInfo
+        - if supplied its hostApi field matches the output device's host Api
+ 
+    double sampleRate
+        - is not an 'absurd' rate (less than 1000. or greater than 200000.)
+        - sampleRate is NOT validated against device capabilities
+ 
+    PaStreamFlags streamFlags
+        - unused platform neutral flags are zero
+        - paNeverDropInput is only used for full-duplex callback streams with
+            variable buffer size (paFramesPerBufferUnspecified)
+*/
+static PaError ValidateOpenStreamParameters(
+    const PaStreamParameters *inputParameters,
+    const PaStreamParameters *outputParameters,
+    double sampleRate,
+    unsigned long framesPerBuffer,
+    PaStreamFlags streamFlags,
+    PaStreamCallback *streamCallback,
+    PaUtilHostApiRepresentation **hostApi,
+    PaDeviceIndex *hostApiInputDevice,
+    PaDeviceIndex *hostApiOutputDevice )
+{
+    int inputHostApiIndex  = -1, /* Surpress uninitialised var warnings: compiler does */
+        outputHostApiIndex = -1; /* not see that if inputParameters and outputParame-  */
+                                 /* ters are both nonzero, these indices are set.      */
+
+    if( (inputParameters == NULL) && (outputParameters == NULL) )
+    {
+        return paInvalidDevice; /** @todo should be a new error code "invalid device parameters" or something */
+    }
+    else
+    {
+        if( inputParameters == NULL )
+        {
+            *hostApiInputDevice = paNoDevice;
+        }
+        else if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )
+        {
+            if( inputParameters->hostApiSpecificStreamInfo )
+            {
+                inputHostApiIndex = Pa_HostApiTypeIdToHostApiIndex(
+                        ((PaUtilHostApiSpecificStreamInfoHeader*)inputParameters->hostApiSpecificStreamInfo)->hostApiType );
+
+                if( inputHostApiIndex != -1 )
+                {
+                    *hostApiInputDevice = paUseHostApiSpecificDeviceSpecification;
+                    *hostApi = hostApis_[inputHostApiIndex];
+                }
+                else
+                {
+                    return paInvalidDevice;
+                }
+            }
+            else
+            {
+                return paInvalidDevice;
+            }
+        }
+        else
+        {
+            if( inputParameters->device < 0 || inputParameters->device >= deviceCount_ )
+                return paInvalidDevice;
+
+            inputHostApiIndex = FindHostApi( inputParameters->device, hostApiInputDevice );
+            if( inputHostApiIndex < 0 )
+                return paInternalError;
+
+            *hostApi = hostApis_[inputHostApiIndex];
+
+            if( inputParameters->channelCount <= 0 )
+                return paInvalidChannelCount;
+
+            if( !SampleFormatIsValid( inputParameters->sampleFormat ) )
+                return paSampleFormatNotSupported;
+
+            if( inputParameters->hostApiSpecificStreamInfo != NULL )
+            {
+                if( ((PaUtilHostApiSpecificStreamInfoHeader*)inputParameters->hostApiSpecificStreamInfo)->hostApiType
+                        != (*hostApi)->info.type )
+                    return paIncompatibleHostApiSpecificStreamInfo;
+            }
+        }
+
+        if( outputParameters == NULL )
+        {
+            *hostApiOutputDevice = paNoDevice;
+        }
+        else if( outputParameters->device == paUseHostApiSpecificDeviceSpecification  )
+        {
+            if( outputParameters->hostApiSpecificStreamInfo )
+            {
+                outputHostApiIndex = Pa_HostApiTypeIdToHostApiIndex(
+                        ((PaUtilHostApiSpecificStreamInfoHeader*)outputParameters->hostApiSpecificStreamInfo)->hostApiType );
+
+                if( outputHostApiIndex != -1 )
+                {
+                    *hostApiOutputDevice = paUseHostApiSpecificDeviceSpecification;
+                    *hostApi = hostApis_[outputHostApiIndex];
+                }
+                else
+                {
+                    return paInvalidDevice;
+                }
+            }
+            else
+            {
+                return paInvalidDevice;
+            }
+        }
+        else
+        {
+            if( outputParameters->device < 0 || outputParameters->device >= deviceCount_ )
+                return paInvalidDevice;
+
+            outputHostApiIndex = FindHostApi( outputParameters->device, hostApiOutputDevice );
+            if( outputHostApiIndex < 0 )
+                return paInternalError;
+
+            *hostApi = hostApis_[outputHostApiIndex];
+
+            if( outputParameters->channelCount <= 0 )
+                return paInvalidChannelCount;
+
+            if( !SampleFormatIsValid( outputParameters->sampleFormat ) )
+                return paSampleFormatNotSupported;
+
+            if( outputParameters->hostApiSpecificStreamInfo != NULL )
+            {
+                if( ((PaUtilHostApiSpecificStreamInfoHeader*)outputParameters->hostApiSpecificStreamInfo)->hostApiType
+                        != (*hostApi)->info.type )
+                    return paIncompatibleHostApiSpecificStreamInfo;
+            }
+        }   
+
+        if( (inputParameters != NULL) && (outputParameters != NULL) )
+        {
+            /* ensure that both devices use the same API */
+            if( inputHostApiIndex != outputHostApiIndex )
+                return paBadIODeviceCombination;
+        }
+    }
+    
+    
+    /* Check for absurd sample rates. */
+    if( (sampleRate < 1000.0) || (sampleRate > 200000.0) )
+        return paInvalidSampleRate;
+
+    if( ((streamFlags & ~paPlatformSpecificFlags) & ~(paClipOff | paDitherOff | paNeverDropInput | paPrimeOutputBuffersUsingStreamCallback ) ) != 0 )
+        return paInvalidFlag;
+
+    if( streamFlags & paNeverDropInput )
+    {
+        /* must be a callback stream */
+        if( !streamCallback )
+             return paInvalidFlag;
+
+        /* must be a full duplex stream */
+        if( (inputParameters == NULL) || (outputParameters == NULL) )
+            return paInvalidFlag;
+
+        /* must use paFramesPerBufferUnspecified */
+        if( framesPerBuffer != paFramesPerBufferUnspecified )
+            return paInvalidFlag;
+    }
+    
+    return paNoError;
+}
+
+
+PaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters,
+                              const PaStreamParameters *outputParameters,
+                              double sampleRate )
+{
+    PaError result;
+    PaUtilHostApiRepresentation *hostApi;
+    PaDeviceIndex hostApiInputDevice, hostApiOutputDevice;
+    PaStreamParameters hostApiInputParameters, hostApiOutputParameters;
+    PaStreamParameters *hostApiInputParametersPtr, *hostApiOutputParametersPtr;
+
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_IsFormatSupported called:\n" );
+
+    if( inputParameters == NULL ){
+        PaUtil_DebugPrint("\tPaStreamParameters *inputParameters: NULL\n" );
+    }else{
+        PaUtil_DebugPrint("\tPaStreamParameters *inputParameters: 0x%p\n", inputParameters );
+        PaUtil_DebugPrint("\tPaDeviceIndex inputParameters->device: %d\n", inputParameters->device );
+        PaUtil_DebugPrint("\tint inputParameters->channelCount: %d\n", inputParameters->channelCount );
+        PaUtil_DebugPrint("\tPaSampleFormat inputParameters->sampleFormat: %d\n", inputParameters->sampleFormat );
+        PaUtil_DebugPrint("\tPaTime inputParameters->suggestedLatency: %f\n", inputParameters->suggestedLatency );
+        PaUtil_DebugPrint("\tvoid *inputParameters->hostApiSpecificStreamInfo: 0x%p\n", inputParameters->hostApiSpecificStreamInfo );
+    }
+
+    if( outputParameters == NULL ){
+        PaUtil_DebugPrint("\tPaStreamParameters *outputParameters: NULL\n" );
+    }else{
+        PaUtil_DebugPrint("\tPaStreamParameters *outputParameters: 0x%p\n", outputParameters );
+        PaUtil_DebugPrint("\tPaDeviceIndex outputParameters->device: %d\n", outputParameters->device );
+        PaUtil_DebugPrint("\tint outputParameters->channelCount: %d\n", outputParameters->channelCount );
+        PaUtil_DebugPrint("\tPaSampleFormat outputParameters->sampleFormat: %d\n", outputParameters->sampleFormat );
+        PaUtil_DebugPrint("\tPaTime outputParameters->suggestedLatency: %f\n", outputParameters->suggestedLatency );
+        PaUtil_DebugPrint("\tvoid *outputParameters->hostApiSpecificStreamInfo: 0x%p\n", outputParameters->hostApiSpecificStreamInfo );
+    }
+    
+    PaUtil_DebugPrint("\tdouble sampleRate: %g\n", sampleRate );
+#endif
+
+    if( !PA_IS_INITIALISED_ )
+    {
+        result = paNotInitialized;
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_IsFormatSupported returned:\n" );
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+        return result;
+    }
+
+    result = ValidateOpenStreamParameters( inputParameters,
+                                           outputParameters,
+                                           sampleRate, 0, paNoFlag, 0,
+                                           &hostApi,
+                                           &hostApiInputDevice,
+                                           &hostApiOutputDevice );
+    if( result != paNoError )
+    {
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_IsFormatSupported returned:\n" );
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+        return result;
+    }
+    
+
+    if( inputParameters )
+    {
+        hostApiInputParameters.device = hostApiInputDevice;
+        hostApiInputParameters.channelCount = inputParameters->channelCount;
+        hostApiInputParameters.sampleFormat = inputParameters->sampleFormat;
+        hostApiInputParameters.suggestedLatency = inputParameters->suggestedLatency;
+        hostApiInputParameters.hostApiSpecificStreamInfo = inputParameters->hostApiSpecificStreamInfo;
+        hostApiInputParametersPtr = &hostApiInputParameters;
+    }
+    else
+    {
+        hostApiInputParametersPtr = NULL;
+    }
+
+    if( outputParameters )
+    {
+        hostApiOutputParameters.device = hostApiOutputDevice;
+        hostApiOutputParameters.channelCount = outputParameters->channelCount;
+        hostApiOutputParameters.sampleFormat = outputParameters->sampleFormat;
+        hostApiOutputParameters.suggestedLatency = outputParameters->suggestedLatency;
+        hostApiOutputParameters.hostApiSpecificStreamInfo = outputParameters->hostApiSpecificStreamInfo;
+        hostApiOutputParametersPtr = &hostApiOutputParameters;
+    }
+    else
+    {
+        hostApiOutputParametersPtr = NULL;
+    }
+
+    result = hostApi->IsFormatSupported( hostApi,
+                                  hostApiInputParametersPtr, hostApiOutputParametersPtr,
+                                  sampleRate );
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_OpenStream returned:\n" );
+    if( result == paFormatIsSupported )
+        PaUtil_DebugPrint("\tPaError: 0 [ paFormatIsSupported ]\n\n" );
+    else
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return result;
+}
+
+
+PaError Pa_OpenStream( PaStream** stream,
+                       const PaStreamParameters *inputParameters,
+                       const PaStreamParameters *outputParameters,
+                       double sampleRate,
+                       unsigned long framesPerBuffer,
+                       PaStreamFlags streamFlags,
+                       PaStreamCallback *streamCallback,
+                       void *userData )
+{
+    PaError result;
+    PaUtilHostApiRepresentation *hostApi;
+    PaDeviceIndex hostApiInputDevice, hostApiOutputDevice;
+    PaStreamParameters hostApiInputParameters, hostApiOutputParameters;
+    PaStreamParameters *hostApiInputParametersPtr, *hostApiOutputParametersPtr;
+
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_OpenStream called:\n" );
+    PaUtil_DebugPrint("\tPaStream** stream: 0x%p\n", stream );
+
+    if( inputParameters == NULL ){
+        PaUtil_DebugPrint("\tPaStreamParameters *inputParameters: NULL\n" );
+    }else{
+        PaUtil_DebugPrint("\tPaStreamParameters *inputParameters: 0x%p\n", inputParameters );
+        PaUtil_DebugPrint("\tPaDeviceIndex inputParameters->device: %d\n", inputParameters->device );
+        PaUtil_DebugPrint("\tint inputParameters->channelCount: %d\n", inputParameters->channelCount );
+        PaUtil_DebugPrint("\tPaSampleFormat inputParameters->sampleFormat: %d\n", inputParameters->sampleFormat );
+        PaUtil_DebugPrint("\tPaTime inputParameters->suggestedLatency: %f\n", inputParameters->suggestedLatency );
+        PaUtil_DebugPrint("\tvoid *inputParameters->hostApiSpecificStreamInfo: 0x%p\n", inputParameters->hostApiSpecificStreamInfo );
+    }
+
+    if( outputParameters == NULL ){
+        PaUtil_DebugPrint("\tPaStreamParameters *outputParameters: NULL\n" );
+    }else{
+        PaUtil_DebugPrint("\tPaStreamParameters *outputParameters: 0x%p\n", outputParameters );
+        PaUtil_DebugPrint("\tPaDeviceIndex outputParameters->device: %d\n", outputParameters->device );
+        PaUtil_DebugPrint("\tint outputParameters->channelCount: %d\n", outputParameters->channelCount );
+        PaUtil_DebugPrint("\tPaSampleFormat outputParameters->sampleFormat: %d\n", outputParameters->sampleFormat );
+        PaUtil_DebugPrint("\tPaTime outputParameters->suggestedLatency: %f\n", outputParameters->suggestedLatency );
+        PaUtil_DebugPrint("\tvoid *outputParameters->hostApiSpecificStreamInfo: 0x%p\n", outputParameters->hostApiSpecificStreamInfo );
+    }
+    
+    PaUtil_DebugPrint("\tdouble sampleRate: %g\n", sampleRate );
+    PaUtil_DebugPrint("\tunsigned long framesPerBuffer: %d\n", framesPerBuffer );
+    PaUtil_DebugPrint("\tPaStreamFlags streamFlags: 0x%x\n", streamFlags );
+    PaUtil_DebugPrint("\tPaStreamCallback *streamCallback: 0x%p\n", streamCallback );
+    PaUtil_DebugPrint("\tvoid *userData: 0x%p\n", userData );
+#endif
+
+    if( !PA_IS_INITIALISED_ )
+    {
+        result = paNotInitialized;
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_OpenStream returned:\n" );
+        PaUtil_DebugPrint("\t*(PaStream** stream): undefined\n" );
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+        return result;
+    }
+
+    /* Check for parameter errors.
+        NOTE: make sure this validation list is kept syncronised with the one
+        in pa_hostapi.h
+    */
+
+    if( stream == NULL )
+    {
+        result = paBadStreamPtr;
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_OpenStream returned:\n" );
+        PaUtil_DebugPrint("\t*(PaStream** stream): undefined\n" );
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+        return result;
+    }
+
+    result = ValidateOpenStreamParameters( inputParameters,
+                                           outputParameters,
+                                           sampleRate, framesPerBuffer,
+                                           streamFlags, streamCallback,
+                                           &hostApi,
+                                           &hostApiInputDevice,
+                                           &hostApiOutputDevice );
+    if( result != paNoError )
+    {
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_OpenStream returned:\n" );
+        PaUtil_DebugPrint("\t*(PaStream** stream): undefined\n" );
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+        return result;
+    }
+    
+
+    if( inputParameters )
+    {
+        hostApiInputParameters.device = hostApiInputDevice;
+        hostApiInputParameters.channelCount = inputParameters->channelCount;
+        hostApiInputParameters.sampleFormat = inputParameters->sampleFormat;
+        hostApiInputParameters.suggestedLatency = inputParameters->suggestedLatency;
+        hostApiInputParameters.hostApiSpecificStreamInfo = inputParameters->hostApiSpecificStreamInfo;
+        hostApiInputParametersPtr = &hostApiInputParameters;
+    }
+    else
+    {
+        hostApiInputParametersPtr = NULL;
+    }
+
+    if( outputParameters )
+    {
+        hostApiOutputParameters.device = hostApiOutputDevice;
+        hostApiOutputParameters.channelCount = outputParameters->channelCount;
+        hostApiOutputParameters.sampleFormat = outputParameters->sampleFormat;
+        hostApiOutputParameters.suggestedLatency = outputParameters->suggestedLatency;
+        hostApiOutputParameters.hostApiSpecificStreamInfo = outputParameters->hostApiSpecificStreamInfo;
+        hostApiOutputParametersPtr = &hostApiOutputParameters;
+    }
+    else
+    {
+        hostApiOutputParametersPtr = NULL;
+    }
+
+    result = hostApi->OpenStream( hostApi, stream,
+                                  hostApiInputParametersPtr, hostApiOutputParametersPtr,
+                                  sampleRate, framesPerBuffer, streamFlags, streamCallback, userData );
+
+    if( result == paNoError )
+        AddOpenStream( *stream );
+
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_OpenStream returned:\n" );
+    PaUtil_DebugPrint("\t*(PaStream** stream): 0x%p\n", *stream );
+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return result;
+}
+
+
+PaError Pa_OpenDefaultStream( PaStream** stream,
+                              int inputChannelCount,
+                              int outputChannelCount,
+                              PaSampleFormat sampleFormat,
+                              double sampleRate,
+                              unsigned long framesPerBuffer,
+                              PaStreamCallback *streamCallback,
+                              void *userData )
+{
+    PaError result;
+    PaStreamParameters hostApiInputParameters, hostApiOutputParameters;
+    PaStreamParameters *hostApiInputParametersPtr, *hostApiOutputParametersPtr;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_OpenDefaultStream called:\n" );
+    PaUtil_DebugPrint("\tPaStream** stream: 0x%p\n", stream );
+    PaUtil_DebugPrint("\tint inputChannelCount: %d\n", inputChannelCount );
+    PaUtil_DebugPrint("\tint outputChannelCount: %d\n", outputChannelCount );
+    PaUtil_DebugPrint("\tPaSampleFormat sampleFormat: %d\n", sampleFormat );
+    PaUtil_DebugPrint("\tdouble sampleRate: %g\n", sampleRate );
+    PaUtil_DebugPrint("\tunsigned long framesPerBuffer: %d\n", framesPerBuffer );
+    PaUtil_DebugPrint("\tPaStreamCallback *streamCallback: 0x%p\n", streamCallback );
+    PaUtil_DebugPrint("\tvoid *userData: 0x%p\n", userData );
+#endif
+
+
+    if( inputChannelCount > 0 )
+    {
+        hostApiInputParameters.device = Pa_GetDefaultInputDevice();
+        hostApiInputParameters.channelCount = inputChannelCount;
+        hostApiInputParameters.sampleFormat = sampleFormat;
+        /* defaultHighInputLatency is used below instead of
+           defaultLowInputLatency because it is more important for the default
+           stream to work reliably than it is for it to work with the lowest
+           latency.
+         */
+        hostApiInputParameters.suggestedLatency = 
+             Pa_GetDeviceInfo( hostApiInputParameters.device )->defaultHighInputLatency;
+        hostApiInputParameters.hostApiSpecificStreamInfo = NULL;
+        hostApiInputParametersPtr = &hostApiInputParameters;
+    }
+    else
+    {
+        hostApiInputParametersPtr = NULL;
+    }
+
+    if( outputChannelCount > 0 )
+    {
+        hostApiOutputParameters.device = Pa_GetDefaultOutputDevice();
+        hostApiOutputParameters.channelCount = outputChannelCount;
+        hostApiOutputParameters.sampleFormat = sampleFormat;
+        /* defaultHighOutputLatency is used below instead of
+           defaultLowOutputLatency because it is more important for the default
+           stream to work reliably than it is for it to work with the lowest
+           latency.
+         */
+        hostApiOutputParameters.suggestedLatency =
+             Pa_GetDeviceInfo( hostApiOutputParameters.device )->defaultHighOutputLatency;
+        hostApiOutputParameters.hostApiSpecificStreamInfo = NULL;
+        hostApiOutputParametersPtr = &hostApiOutputParameters;
+    }
+    else
+    {
+        hostApiOutputParametersPtr = NULL;
+    }
+
+
+    result = Pa_OpenStream(
+                 stream, hostApiInputParametersPtr, hostApiOutputParametersPtr,
+                 sampleRate, framesPerBuffer, paNoFlag, streamCallback, userData );
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_OpenDefaultStream returned:\n" );
+    PaUtil_DebugPrint("\t*(PaStream** stream): 0x%p", *stream );
+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return result;
+}
+
+
+PaError PaUtil_ValidateStreamPointer( PaStream* stream )
+{
+    if( !PA_IS_INITIALISED_ ) return paNotInitialized;
+
+    if( stream == NULL ) return paBadStreamPtr;
+
+    if( ((PaUtilStreamRepresentation*)stream)->magic != PA_STREAM_MAGIC )
+        return paBadStreamPtr;
+
+    return paNoError;
+}
+
+
+PaError Pa_CloseStream( PaStream* stream )
+{
+    PaUtilStreamInterface *interface;
+    PaError result = PaUtil_ValidateStreamPointer( stream );
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_CloseStream called:\n" );
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
+#endif
+
+    /* always remove the open stream from our list, even if this function
+        eventually returns an error. Otherwise CloseOpenStreams() will
+        get stuck in an infinite loop */
+    RemoveOpenStream( stream ); /* be sure to call this _before_ closing the stream */
+
+    if( result == paNoError )
+    {
+        interface = PA_STREAM_INTERFACE(stream);
+
+        /* abort the stream if it isn't stopped */
+        result = interface->IsStopped( stream );
+        if( result == 1 )
+            result = paNoError;
+        else if( result == 0 )
+            result = interface->Abort( stream );
+
+        if( result == paNoError )                 /** @todo REVIEW: shouldn't we close anyway? */
+            result = interface->Close( stream );
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_CloseStream returned:\n" );
+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return result;
+}
+
+
+PaError Pa_SetStreamFinishedCallback( PaStream *stream, PaStreamFinishedCallback* streamFinishedCallback )
+{
+    PaError result = PaUtil_ValidateStreamPointer( stream );
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_SetStreamFinishedCallback called:\n" );
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
+    PaUtil_DebugPrint("\tPaStreamFinishedCallback* streamFinishedCallback: 0x%p\n", streamFinishedCallback );
+#endif
+
+    if( result == paNoError )
+    {
+        result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );
+        if( result == 0 )
+        {
+            result = paStreamIsNotStopped ;
+        }
+        if( result == 1 )
+        {
+            PA_STREAM_REP( stream )->streamFinishedCallback = streamFinishedCallback;
+            result = paNoError;
+        }
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_SetStreamFinishedCallback returned:\n" );
+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return result;
+
+}
+
+
+PaError Pa_StartStream( PaStream *stream )
+{
+    PaError result = PaUtil_ValidateStreamPointer( stream );
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_StartStream called:\n" );
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
+#endif
+
+    if( result == paNoError )
+    {
+        result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );
+        if( result == 0 )
+        {
+            result = paStreamIsNotStopped ;
+        }
+        else if( result == 1 )
+        {
+            result = PA_STREAM_INTERFACE(stream)->Start( stream );
+        }
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_StartStream returned:\n" );
+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return result;
+}
+
+
+PaError Pa_StopStream( PaStream *stream )
+{
+    PaError result = PaUtil_ValidateStreamPointer( stream );
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_StopStream called\n" );
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
+#endif
+
+    if( result == paNoError )
+    {
+        result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );
+        if( result == 0 )
+        {
+            result = PA_STREAM_INTERFACE(stream)->Stop( stream );
+        }
+        else if( result == 1 )
+        {
+            result = paStreamIsStopped;
+        }
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_StopStream returned:\n" );
+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return result;
+}
+
+
+PaError Pa_AbortStream( PaStream *stream )
+{
+    PaError result = PaUtil_ValidateStreamPointer( stream );
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_AbortStream called:\n" );
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
+#endif
+
+    if( result == paNoError )
+    {
+        result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );
+        if( result == 0 )
+        {
+            result = PA_STREAM_INTERFACE(stream)->Abort( stream );
+        }
+        else if( result == 1 )
+        {
+            result = paStreamIsStopped;
+        }
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_AbortStream returned:\n" );
+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return result;
+}
+
+
+PaError Pa_IsStreamStopped( PaStream *stream )
+{
+    PaError result = PaUtil_ValidateStreamPointer( stream );
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_IsStreamStopped called:\n" );
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
+#endif
+
+    if( result == paNoError )
+        result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_IsStreamStopped returned:\n" );
+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return result;
+}
+
+
+PaError Pa_IsStreamActive( PaStream *stream )
+{
+    PaError result = PaUtil_ValidateStreamPointer( stream );
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_IsStreamActive called:\n" );
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
+#endif
+
+    if( result == paNoError )
+        result = PA_STREAM_INTERFACE(stream)->IsActive( stream );
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_IsStreamActive returned:\n" );
+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return result;
+}
+
+
+const PaStreamInfo* Pa_GetStreamInfo( PaStream *stream )
+{
+    PaError error = PaUtil_ValidateStreamPointer( stream );
+    const PaStreamInfo *result;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetStreamInfo called:\n" );
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
+#endif
+
+    if( error != paNoError )
+    {
+        result = 0;
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetStreamInfo returned:\n" );
+        PaUtil_DebugPrint("\tconst PaStreamInfo*: 0 [PaError error:%d ( %s )]\n\n", result, error, Pa_GetErrorText( error ) );
+#endif
+
+    }
+    else
+    {
+        result = &PA_STREAM_REP( stream )->streamInfo;
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetStreamInfo returned:\n" );
+        PaUtil_DebugPrint("\tconst PaStreamInfo*: 0x%p:\n", result );
+        PaUtil_DebugPrint("\t{" );
+
+        PaUtil_DebugPrint("\t\tint structVersion: %d\n", result->structVersion );
+        PaUtil_DebugPrint("\t\tPaTime inputLatency: %f\n", result->inputLatency );
+        PaUtil_DebugPrint("\t\tPaTime outputLatency: %f\n", result->outputLatency );
+        PaUtil_DebugPrint("\t\tdouble sampleRate: %f\n", result->sampleRate );
+        PaUtil_DebugPrint("\t}\n\n" );
+#endif
+
+    }
+
+    return result;
+}
+
+
+PaTime Pa_GetStreamTime( PaStream *stream )
+{
+    PaError error = PaUtil_ValidateStreamPointer( stream );
+    PaTime result;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetStreamTime called:\n" );
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
+#endif
+
+    if( error != paNoError )
+    {
+        result = 0;
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetStreamTime returned:\n" );
+        PaUtil_DebugPrint("\tPaTime: 0 [PaError error:%d ( %s )]\n\n", result, error, Pa_GetErrorText( error ) );
+#endif
+
+    }
+    else
+    {
+        result = PA_STREAM_INTERFACE(stream)->GetTime( stream );
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetStreamTime returned:\n" );
+        PaUtil_DebugPrint("\tPaTime: %g\n\n", result );
+#endif
+
+    }
+
+    return result;
+}
+
+
+double Pa_GetStreamCpuLoad( PaStream* stream )
+{
+    PaError error = PaUtil_ValidateStreamPointer( stream );
+    double result;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetStreamCpuLoad called:\n" );
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
+#endif
+
+    if( error != paNoError )
+    {
+
+        result = 0.0;
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetStreamCpuLoad returned:\n" );
+        PaUtil_DebugPrint("\tdouble: 0.0 [PaError error: %d ( %s )]\n\n", error, Pa_GetErrorText( error ) );
+#endif
+
+    }
+    else
+    {
+        result = PA_STREAM_INTERFACE(stream)->GetCpuLoad( stream );
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetStreamCpuLoad returned:\n" );
+        PaUtil_DebugPrint("\tdouble: %g\n\n", result );
+#endif
+
+    }
+
+    return result;
+}
+
+
+PaError Pa_ReadStream( PaStream* stream,
+                       void *buffer,
+                       unsigned long frames )
+{
+    PaError result = PaUtil_ValidateStreamPointer( stream );
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_ReadStream called:\n" );
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
+#endif
+
+    if( result == paNoError )
+    {
+        if( frames == 0 )
+        {
+            result = paInternalError; /** @todo should return a different error code */
+        }
+        else if( buffer == 0 )
+        {
+            result = paInternalError; /** @todo should return a different error code */
+        }
+        else
+        {
+            result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );
+            if( result == 0 )
+            {
+                result = PA_STREAM_INTERFACE(stream)->Read( stream, buffer, frames );
+            }
+            else if( result == 1 )
+            {
+                result = paStreamIsStopped;
+            }
+        }
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_ReadStream returned:\n" );
+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return result;
+}
+
+
+PaError Pa_WriteStream( PaStream* stream,
+                        const void *buffer,
+                        unsigned long frames )
+{
+    PaError result = PaUtil_ValidateStreamPointer( stream );
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_WriteStream called:\n" );
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
+#endif
+
+    if( result == paNoError )
+    {
+        if( frames == 0 )
+        {
+            result = paInternalError; /** @todo should return a different error code */
+        }
+        else if( buffer == 0 )
+        {
+            result = paInternalError; /** @todo should return a different error code */
+        }
+        else
+        {
+            result = PA_STREAM_INTERFACE(stream)->IsStopped( stream );
+            if( result == 0 )
+            {
+                result = PA_STREAM_INTERFACE(stream)->Write( stream, buffer, frames );
+            }
+            else if( result == 1 )
+            {
+                result = paStreamIsStopped;
+            }  
+        }
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_WriteStream returned:\n" );
+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return result;
+}
+
+signed long Pa_GetStreamReadAvailable( PaStream* stream )
+{
+    PaError error = PaUtil_ValidateStreamPointer( stream );
+    signed long result;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetStreamReadAvailable called:\n" );
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
+#endif
+
+    if( error != paNoError )
+    {
+        result = 0;
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetStreamReadAvailable returned:\n" );
+        PaUtil_DebugPrint("\tunsigned long: 0 [ PaError error: %d ( %s ) ]\n\n", error, Pa_GetErrorText( error ) );
+#endif
+
+    }
+    else
+    {
+        result = PA_STREAM_INTERFACE(stream)->GetReadAvailable( stream );
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetStreamReadAvailable returned:\n" );
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    }
+
+    return result;
+}
+
+
+signed long Pa_GetStreamWriteAvailable( PaStream* stream )
+{
+    PaError error = PaUtil_ValidateStreamPointer( stream );
+    signed long result;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetStreamWriteAvailable called:\n" );
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
+#endif
+
+    if( error != paNoError )
+    {
+        result = 0;
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetStreamWriteAvailable returned:\n" );
+        PaUtil_DebugPrint("\tunsigned long: 0 [ PaError error: %d ( %s ) ]\n\n", error, Pa_GetErrorText( error ) );
+#endif
+
+    }
+    else
+    {
+        result = PA_STREAM_INTERFACE(stream)->GetWriteAvailable( stream );
+
+#ifdef PA_LOG_API_CALLS
+        PaUtil_DebugPrint("Pa_GetStreamWriteAvailable returned:\n" );
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    }
+
+    return result;
+}
+
+
+PaError Pa_GetSampleSize( PaSampleFormat format )
+{
+    int result;
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetSampleSize called:\n" );
+    PaUtil_DebugPrint("\tPaSampleFormat format: %d\n", format );
+#endif
+
+    switch( format & ~paNonInterleaved )
+    {
+
+    case paUInt8:
+    case paInt8:
+        result = 1;
+        break;
+
+    case paInt16:
+        result = 2;
+        break;
+
+    case paInt24:
+        result = 3;
+        break;
+
+    case paFloat32:
+    case paInt32:
+        result = 4;
+        break;
+
+    default:
+        result = paSampleFormatNotSupported;
+        break;
+    }
+
+#ifdef PA_LOG_API_CALLS
+    PaUtil_DebugPrint("Pa_GetSampleSize returned:\n" );
+    if( result > 0 )
+        PaUtil_DebugPrint("\tint: %d\n\n", result );
+    else
+        PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
+#endif
+
+    return (PaError) result;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_hostapi.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_hostapi.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_hostapi.h	(revision 1163)
@@ -0,0 +1,244 @@
+#ifndef PA_HOSTAPI_H
+#define PA_HOSTAPI_H
+/*
+ * $Id: pa_hostapi.h,v 1.1.2.14 2004/01/08 22:01:12 rossbencina Exp $
+ * Portable Audio I/O Library
+ * host api representation
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Interface used by pa_front to virtualize functions which operate on
+ host APIs.
+*/
+
+
+#include "portaudio.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/** **FOR THE USE OF pa_front.c ONLY**
+    Do NOT use fields in this structure, they my change at any time.
+    Use functions defined in pa_util.h if you think you need functionality
+    which can be derived from here.
+*/
+typedef struct PaUtilPrivatePaFrontHostApiInfo {
+
+
+    unsigned long baseDeviceIndex;
+}PaUtilPrivatePaFrontHostApiInfo;
+
+
+/** The common header for all data structures whose pointers are passed through
+ the hostApiSpecificStreamInfo field of the PaStreamParameters structure.
+ Note that in order to keep the public PortAudio interface clean, this structure
+ is not used explicitly when declaring hostApiSpecificStreamInfo data structures.
+ However, some code in pa_front depends on the first 3 members being equivalent
+ with this structure.
+ @see PaStreamParameters
+*/
+typedef struct PaUtilHostApiSpecificStreamInfoHeader
+{
+    unsigned long size;             /**< size of whole structure including this header */
+    PaHostApiTypeId hostApiType;    /**< host API for which this data is intended */
+    unsigned long version;          /**< structure version */
+} PaUtilHostApiSpecificStreamInfoHeader;
+
+
+
+/** A structure representing the interface to a host API. Contains both
+ concrete data and pointers to functions which implement the interface.
+*/
+typedef struct PaUtilHostApiRepresentation {
+    PaUtilPrivatePaFrontHostApiInfo privatePaFrontInfo;
+
+    /** The host api implementation should populate the info field. In the
+        case of info.defaultInputDevice and info.defaultOutputDevice the
+        values stored should be 0 based indices within the host api's own
+        device index range (0 to deviceCount). These values will be converted
+        to global device indices by pa_front after PaUtilHostApiInitializer()
+        returns.
+    */
+    PaHostApiInfo info;
+
+    PaDeviceInfo** deviceInfos;
+
+    /**
+        (*Terminate)() is guaranteed to be called with a valid <hostApi>
+        parameter, which was previously returned from the same implementation's
+        initializer.
+    */
+    void (*Terminate)( struct PaUtilHostApiRepresentation *hostApi );
+
+    /**
+        The inputParameters and outputParameters pointers should not be saved
+        as they will not remain valid after OpenStream is called.
+
+        
+        The following guarantees are made about parameters to (*OpenStream)():
+
+            [NOTE: the following list up to *END PA FRONT VALIDATIONS* should be
+                kept in sync with the one for ValidateOpenStreamParameters and
+                Pa_OpenStream in pa_front.c]
+                
+            PaHostApiRepresentation *hostApi
+                - is valid for this implementation
+
+            PaStream** stream
+                - is non-null
+
+            - at least one of inputParameters & outputParmeters is valid (not NULL)
+
+            - if inputParameters & outputParmeters are both valid, that
+                inputParameters->device & outputParmeters->device  both use the same host api
+ 
+            PaDeviceIndex inputParameters->device
+                - is within range (0 to Pa_CountDevices-1) Or:
+                - is paUseHostApiSpecificDeviceSpecification and
+                    inputParameters->hostApiSpecificStreamInfo is non-NULL and refers
+                    to a valid host api
+
+            int inputParameters->numChannels
+                - if inputParameters->device is not paUseHostApiSpecificDeviceSpecification, numInputChannels is > 0
+                - upper bound is NOT validated against device capabilities
+ 
+            PaSampleFormat inputParameters->sampleFormat
+                - is one of the sample formats defined in portaudio.h
+
+            void *inputParameters->hostApiSpecificStreamInfo
+                - if supplied its hostApi field matches the input device's host Api
+ 
+            PaDeviceIndex outputParmeters->device
+                - is within range (0 to Pa_CountDevices-1)
+ 
+            int outputParmeters->numChannels
+                - if inputDevice is valid, numInputChannels is > 0
+                - upper bound is NOT validated against device capabilities
+ 
+            PaSampleFormat outputParmeters->sampleFormat
+                - is one of the sample formats defined in portaudio.h
+        
+            void *outputParmeters->hostApiSpecificStreamInfo
+                - if supplied its hostApi field matches the output device's host Api
+ 
+            double sampleRate
+                - is not an 'absurd' rate (less than 1000. or greater than 200000.)
+                - sampleRate is NOT validated against device capabilities
+ 
+            PaStreamFlags streamFlags
+                - unused platform neutral flags are zero
+                - paNeverDropInput is only used for full-duplex callback streams
+                    with variable buffer size (paFramesPerBufferUnspecified)
+
+            [*END PA FRONT VALIDATIONS*]
+
+
+        The following validations MUST be performed by (*OpenStream)():
+
+            - check that input device can support numInputChannels
+            
+            - check that input device can support inputSampleFormat, or that
+                we have the capability to convert from outputSampleFormat to
+                a native format
+
+            - if inputStreamInfo is supplied, validate its contents,
+                or return an error if no inputStreamInfo is expected
+
+            - check that output device can support numOutputChannels
+            
+            - check that output device can support outputSampleFormat, or that
+                we have the capability to convert from outputSampleFormat to
+                a native format
+
+            - if outputStreamInfo is supplied, validate its contents,
+                or return an error if no outputStreamInfo is expected
+
+            - if a full duplex stream is requested, check that the combination
+                of input and output parameters is supported
+
+            - check that the device supports sampleRate
+
+            - alter sampleRate to a close allowable rate if necessary
+
+            - validate inputLatency and outputLatency
+
+            - validate any platform specific flags, if flags are supplied they
+                must be valid.
+    */
+    PaError (*OpenStream)( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** stream,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerCallback,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *streamCallback,
+                           void *userData );
+
+
+    PaError (*IsFormatSupported)( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate );
+} PaUtilHostApiRepresentation;
+
+
+/** Prototype for the initialization function which must be implemented by every
+ host API.
+ 
+ @see paHostApiInitializers
+*/
+typedef PaError PaUtilHostApiInitializer( PaUtilHostApiRepresentation**, PaHostApiIndex );
+
+
+/** paHostApiInitializers is a NULL-terminated array of host API initialization
+ functions. These functions are called by pa_front to initialize the host APIs
+ when the client calls Pa_Initialize().
+
+ There is a platform specific file which defines paHostApiInitializers for that
+ platform, pa_win/pa_win_hostapis.c contains the Win32 definitions for example.
+*/
+extern PaUtilHostApiInitializer *paHostApiInitializers[];
+
+
+/** The index of the default host API in the paHostApiInitializers array.
+ 
+ There is a platform specific file which defines paDefaultHostApiIndex for that
+ platform, see pa_win/pa_win_hostapis.c for example.
+*/
+extern int paDefaultHostApiIndex;
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PA_HOSTAPI_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_lib.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_lib.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_lib.c	(revision 1163)
@@ -0,0 +1,831 @@
+/*
+ * Portable Audio I/O Library
+ * Host Independant Layer
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2000 Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/* Modification History:
+ PLB20010422 - apply Mike Berry's changes for CodeWarrior on PC
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+/* PLB20010422 - "memory.h" doesn't work on CodeWarrior for PC. Thanks Mike Berry for the mod. */
+#ifdef _WIN32
+#ifndef __MWERKS__
+#include <memory.h>
+#endif  /* __MWERKS__ */
+#else   /* !_WIN32 */
+#include <memory.h>
+#endif  /* _WIN32 */
+
+#include "portaudio.h"
+//#include "pa_host.h"
+#include "pa_trace.h"
+
+typedef PaDeviceIndex PaDeviceID;
+typedef PaStream      PortAudioStream;
+#define DLL_API
+
+/* The reason we might NOT want to validate the rate before opening the stream
+ * is because many DirectSound drivers lie about the rates they actually support.
+ */
+#define PA_VALIDATE_RATE    (0)   /* If true validate sample rate against driver info. */
+
+/*
+O- maybe not allocate past_InputBuffer and past_OutputBuffer if not needed for conversion
+*/
+
+#ifndef FALSE
+ #define FALSE  (0)
+ #define TRUE   (!FALSE)
+#endif
+
+#define PRINT(x) { printf x; fflush(stdout); }
+#define ERR_RPT(x) PRINT(x)
+#define DBUG(x)  /* PRINT(x) */
+#define DBUGX(x) /* PRINT(x) */
+
+static int gInitCount = 0; /* Count number of times Pa_Initialize() called to allow nesting and overlapping. */
+
+static PaError Pa_KillStream(  PortAudioStream *stream, int abort );
+
+/***********************************************************************/
+int PaHost_FindClosestTableEntry( double allowableError,  const double *rateTable, int numRates, double frameRate )
+{
+    double err, minErr = allowableError;
+    int i, bestFit = -1;
+
+    for( i=0; i<numRates; i++ )
+    {
+        err = fabs( frameRate - rateTable[i] );
+        if( err < minErr )
+        {
+            minErr = err;
+            bestFit = i;
+        }
+    }
+    return bestFit;
+}
+
+/**************************************************************************
+** Make sure sample rate is legal and also convert to enumeration for driver.
+*/
+PaError PaHost_ValidateSampleRate( PaDeviceID id, double requestedFrameRate,
+                                   double *closestFrameRatePtr )
+{
+    long bestRateIndex;
+    const PaDeviceInfo *pdi;
+    pdi = Pa_GetDeviceInfo( id );
+    if( pdi == NULL ) return paInvalidDeviceId;
+
+    if( pdi->numSampleRates == -1 )
+    {
+        /* Is it out of range? */
+        if( (requestedFrameRate < pdi->sampleRates[0]) ||
+                (requestedFrameRate > pdi->sampleRates[1]) )
+        {
+            return paInvalidSampleRate;
+        }
+
+        *closestFrameRatePtr = requestedFrameRate;
+    }
+    else
+    {
+        bestRateIndex = PaHost_FindClosestTableEntry( 1.0, pdi->sampleRates, pdi->numSampleRates, requestedFrameRate );
+        if( bestRateIndex < 0 ) return paInvalidSampleRate;
+        *closestFrameRatePtr = pdi->sampleRates[bestRateIndex];
+    }
+    return paNoError;
+}
+
+/*************************************************************************/
+DLL_API PaError Pa_OpenStream(
+    PortAudioStream** streamPtrPtr,
+    PaDeviceID inputDeviceID,
+    int numInputChannels,
+    PaSampleFormat inputSampleFormat,
+    void *inputDriverInfo,
+    PaDeviceID outputDeviceID,
+    int numOutputChannels,
+    PaSampleFormat outputSampleFormat,
+    void *outputDriverInfo,
+    double sampleRate,
+    unsigned long framesPerBuffer,
+    unsigned long numberOfBuffers,
+    unsigned long streamFlags,
+    PortAudioCallback *callback,
+    void *userData )
+{
+    internalPortAudioStream   *past = NULL;
+    PaError                    result = paNoError;
+    int                        bitsPerInputSample;
+    int                        bitsPerOutputSample;
+    /* Print passed parameters. */
+    DBUG(("Pa_OpenStream( %p, %d, %d, %d, %p, /* input */ \n",
+          streamPtrPtr, inputDeviceID, numInputChannels,
+          inputSampleFormat, inputDriverInfo ));
+    DBUG(("               %d, %d, %d, %p, /* output */\n",
+          outputDeviceID, numOutputChannels,
+          outputSampleFormat, outputDriverInfo ));
+    DBUG(("               %g, %d, %d, 0x%x, , %p )\n",
+          sampleRate, framesPerBuffer, numberOfBuffers,
+          streamFlags, userData ));
+
+    /* Check for parameter errors. */
+    if( (streamFlags & ~(paClipOff | paDitherOff)) != 0 ) return paInvalidFlag;
+    if( streamPtrPtr == NULL ) return paBadStreamPtr;
+    if( inputDriverInfo != NULL ) return paHostError; /* REVIEW */
+    if( outputDriverInfo != NULL ) return paHostError; /* REVIEW */
+    if( (inputDeviceID < 0) && ( outputDeviceID < 0) ) return paInvalidDeviceId;
+    if( (outputDeviceID >= Pa_CountDevices()) || (inputDeviceID >= Pa_CountDevices()) ) return paInvalidDeviceId;
+    if( (numInputChannels <= 0) && ( numOutputChannels <= 0) ) return paInvalidChannelCount;
+
+#if SUPPORT_AUDIO_CAPTURE
+    if( inputDeviceID >= 0 )
+    {
+        PaError size = Pa_GetSampleSize( inputSampleFormat );
+        if( size < 0 ) return size;
+        bitsPerInputSample = 8 * size;
+        if( (numInputChannels <= 0) ) return paInvalidChannelCount;
+    }
+#else
+    if( inputDeviceID >= 0 )
+    {
+        return paInvalidChannelCount;
+    }
+#endif /* SUPPORT_AUDIO_CAPTURE */
+    else
+    {
+        if( numInputChannels > 0 ) return paInvalidChannelCount;
+        bitsPerInputSample = 0;
+    }
+
+    if( outputDeviceID >= 0 )
+    {
+        PaError size = Pa_GetSampleSize( outputSampleFormat );
+        if( size < 0 ) return size;
+        bitsPerOutputSample = 8 * size;
+        if( (numOutputChannels <= 0) ) return paInvalidChannelCount;
+    }
+    else
+    {
+        if( numOutputChannels > 0 ) return paInvalidChannelCount;
+        bitsPerOutputSample = 0;
+    }
+
+    if( callback == NULL ) return paNullCallback;
+
+    /* Allocate and clear stream structure. */
+    past = (internalPortAudioStream *) PaHost_AllocateFastMemory( sizeof(internalPortAudioStream) );
+    if( past == NULL ) return paInsufficientMemory;
+    memset( past, 0, sizeof(internalPortAudioStream) );
+    AddTraceMessage("Pa_OpenStream: past", (long) past );
+
+    past->past_Magic = PA_MAGIC;  /* Set ID to catch bugs. */
+    past->past_FramesPerUserBuffer = framesPerBuffer;
+    past->past_NumUserBuffers = numberOfBuffers; /* NOTE - PaHost_OpenStream() NMUST CHECK FOR ZERO! */
+    past->past_Callback = callback;
+    past->past_UserData = userData;
+    past->past_OutputSampleFormat = outputSampleFormat;
+    past->past_InputSampleFormat = inputSampleFormat;
+    past->past_OutputDeviceID = outputDeviceID;
+    past->past_InputDeviceID = inputDeviceID;
+    past->past_NumInputChannels = numInputChannels;
+    past->past_NumOutputChannels = numOutputChannels;
+    past->past_Flags = streamFlags;
+
+    /* Check for absurd sample rates. */
+    if( (sampleRate < 1000.0) || (sampleRate > 200000.0) )
+    {
+        result = paInvalidSampleRate;
+        goto cleanup;
+    }
+
+    /* Allocate buffers that may be used for format conversion from user to native buffers. */
+    if( numInputChannels > 0 )
+    {
+
+#if PA_VALIDATE_RATE
+        result = PaHost_ValidateSampleRate( inputDeviceID, sampleRate, &past->past_SampleRate );
+        if( result < 0 )
+        {
+            goto cleanup;
+        }
+#else
+        past->past_SampleRate = sampleRate;
+#endif
+        /* Allocate single Input buffer. */
+        past->past_InputBufferSize = framesPerBuffer * numInputChannels * ((bitsPerInputSample+7) / 8);
+        past->past_InputBuffer = PaHost_AllocateFastMemory(past->past_InputBufferSize);
+        if( past->past_InputBuffer == NULL )
+        {
+            result = paInsufficientMemory;
+            goto cleanup;
+        }
+    }
+    else
+    {
+        past->past_InputBuffer = NULL;
+    }
+
+    /* Allocate single Output buffer. */
+    if( numOutputChannels > 0 )
+    {
+#if PA_VALIDATE_RATE
+        result = PaHost_ValidateSampleRate( outputDeviceID, sampleRate, &past->past_SampleRate );
+        if( result < 0 )
+        {
+            goto cleanup;
+        }
+#else
+        past->past_SampleRate = sampleRate;
+#endif
+        past->past_OutputBufferSize = framesPerBuffer * numOutputChannels * ((bitsPerOutputSample+7) / 8);
+        past->past_OutputBuffer = PaHost_AllocateFastMemory(past->past_OutputBufferSize);
+        if( past->past_OutputBuffer == NULL )
+        {
+            result = paInsufficientMemory;
+            goto cleanup;
+        }
+    }
+    else
+    {
+        past->past_OutputBuffer = NULL;
+    }
+
+    result = PaHost_OpenStream( past );
+    if( result < 0 ) goto cleanup;
+
+    *streamPtrPtr = (void *) past;
+
+    return result;
+
+cleanup:
+    if( past != NULL ) Pa_CloseStream( past );
+    *streamPtrPtr = NULL;
+    return result;
+}
+
+
+/*************************************************************************/
+DLL_API PaError Pa_OpenDefaultStream( PortAudioStream** stream,
+                                      int numInputChannels,
+                                      int numOutputChannels,
+                                      PaSampleFormat sampleFormat,
+                                      double sampleRate,
+                                      unsigned long framesPerBuffer,
+                                      unsigned long numberOfBuffers,
+                                      PortAudioCallback *callback,
+                                      void *userData )
+{
+    return Pa_OpenStream(
+               stream,
+               ((numInputChannels > 0) ? Pa_GetDefaultInputDeviceID() : paNoDevice),
+               numInputChannels, sampleFormat, NULL,
+               ((numOutputChannels > 0) ? Pa_GetDefaultOutputDeviceID() : paNoDevice),
+               numOutputChannels, sampleFormat, NULL,
+               sampleRate, framesPerBuffer, numberOfBuffers, paNoFlag, callback, userData );
+}
+
+/*************************************************************************/
+DLL_API PaError Pa_CloseStream( PortAudioStream* stream)
+{
+    PaError   result;
+    internalPortAudioStream   *past;
+
+    DBUG(("Pa_CloseStream()\n"));
+    if( stream == NULL ) return paBadStreamPtr;
+    past = (internalPortAudioStream *) stream;
+
+    Pa_AbortStream( past );
+    result = PaHost_CloseStream( past );
+
+    if( past->past_InputBuffer ) PaHost_FreeFastMemory( past->past_InputBuffer, past->past_InputBufferSize );
+    if( past->past_OutputBuffer ) PaHost_FreeFastMemory( past->past_OutputBuffer, past->past_OutputBufferSize );
+    PaHost_FreeFastMemory( past, sizeof(internalPortAudioStream) );
+
+    return result;
+}
+
+/*************************************************************************/
+DLL_API PaError Pa_StartStream( PortAudioStream *stream )
+{
+    PaError result = paHostError;
+    internalPortAudioStream   *past;
+
+    if( stream == NULL ) return paBadStreamPtr;
+    past = (internalPortAudioStream *) stream;
+
+    past->past_FrameCount = 0.0;
+
+    if( past->past_NumInputChannels > 0 )
+    {
+        result = PaHost_StartInput( past );
+        DBUG(("Pa_StartStream: PaHost_StartInput returned = 0x%X.\n", result));
+        if( result < 0 ) goto error;
+    }
+
+    if( past->past_NumOutputChannels > 0 )
+    {
+        result = PaHost_StartOutput( past );
+        DBUG(("Pa_StartStream: PaHost_StartOutput returned = 0x%X.\n", result));
+        if( result < 0 ) goto error;
+    }
+
+    result = PaHost_StartEngine( past );
+    DBUG(("Pa_StartStream: PaHost_StartEngine returned = 0x%X.\n", result));
+    if( result < 0 ) goto error;
+
+    return paNoError;
+
+error:
+    return result;
+}
+
+/*************************************************************************/
+DLL_API PaError Pa_StopStream(  PortAudioStream *stream )
+{
+    return Pa_KillStream( stream, 0 );
+}
+
+/*************************************************************************/
+DLL_API PaError Pa_AbortStream(  PortAudioStream *stream )
+{
+    return Pa_KillStream( stream, 1 );
+}
+
+/*************************************************************************/
+static PaError Pa_KillStream(  PortAudioStream *stream, int abort )
+{
+    PaError result = paNoError;
+    internalPortAudioStream   *past;
+
+    DBUG(("Pa_StopStream().\n"));
+    if( stream == NULL ) return paBadStreamPtr;
+    past = (internalPortAudioStream *) stream;
+
+    if( (past->past_NumInputChannels > 0) || (past->past_NumOutputChannels > 0) )
+    {
+        result = PaHost_StopEngine( past, abort );
+        DBUG(("Pa_StopStream: PaHost_StopEngine returned = 0x%X.\n", result));
+        if( result < 0 ) goto error;
+    }
+
+    if( past->past_NumInputChannels > 0 )
+    {
+        result = PaHost_StopInput( past, abort );
+        DBUG(("Pa_StopStream: PaHost_StopInput returned = 0x%X.\n", result));
+        if( result != paNoError ) goto error;
+    }
+
+    if( past->past_NumOutputChannels > 0 )
+    {
+        result = PaHost_StopOutput( past, abort );
+        DBUG(("Pa_StopStream: PaHost_StopOutput returned = 0x%X.\n", result));
+        if( result != paNoError ) goto error;
+    }
+
+error:
+    past->past_Usage = 0;
+    past->past_IfLastExitValid = 0;
+
+    return result;
+}
+
+/*************************************************************************/
+DLL_API PaError Pa_StreamActive( PortAudioStream *stream )
+{
+    internalPortAudioStream   *past;
+    if( stream == NULL ) return paBadStreamPtr;
+    past = (internalPortAudioStream *) stream;
+    return PaHost_StreamActive( past );
+}
+
+/*************************************************************************/
+DLL_API const char *Pa_GetErrorText( PaError errnum )
+{
+    const char *msg;
+
+    switch(errnum)
+    {
+    case paNoError:                  msg = "Success"; break;
+    case paHostError:                msg = "Host error."; break;
+    case paInvalidChannelCount:      msg = "Invalid number of channels."; break;
+    case paInvalidSampleRate:        msg = "Invalid sample rate."; break;
+    case paInvalidDeviceId:          msg = "Invalid device ID."; break;
+    case paInvalidFlag:              msg = "Invalid flag."; break;
+    case paSampleFormatNotSupported: msg = "Sample format not supported"; break;
+    case paBadIODeviceCombination:   msg = "Illegal combination of I/O devices."; break;
+    case paInsufficientMemory:       msg = "Insufficient memory."; break;
+    case paBufferTooBig:             msg = "Buffer too big."; break;
+    case paBufferTooSmall:           msg = "Buffer too small."; break;
+    case paNullCallback:             msg = "No callback routine specified."; break;
+    case paBadStreamPtr:             msg = "Invalid stream pointer."; break;
+    case paTimedOut    :             msg = "Wait Timed Out."; break;
+    case paInternalError:            msg = "Internal PortAudio Error."; break;
+    default:                         msg = "Illegal error number."; break;
+    }
+    return msg;
+}
+
+/*
+ Get CPU Load as a fraction of total CPU time.
+ A value of 0.5 would imply that PortAudio and the sound generating
+ callback was consuming roughly 50% of the available CPU time.
+ The amount may vary depending on CPU load.
+ This function may be called from the callback function.
+*/
+DLL_API double Pa_GetCPULoad(  PortAudioStream* stream)
+{
+    internalPortAudioStream   *past;
+    if( stream == NULL ) return (double) paBadStreamPtr;
+    past = (internalPortAudioStream *) stream;
+    return past->past_Usage;
+}
+
+/*************************************************************
+** Calculate 2 LSB dither signal with a triangular distribution.
+** Ranged properly for adding to a 32 bit integer prior to >>15.
+*/
+#define DITHER_BITS   (15)
+#define DITHER_SCALE  (1.0f / ((1<<DITHER_BITS)-1))
+static long Pa_TriangularDither( void )
+{
+    static unsigned long previous = 0;
+    static unsigned long randSeed1 = 22222;
+    static unsigned long randSeed2 = 5555555;
+    long current, highPass;
+    /* Generate two random numbers. */
+    randSeed1 = (randSeed1 * 196314165) + 907633515;
+    randSeed2 = (randSeed2 * 196314165) + 907633515;
+    /* Generate triangular distribution about 0. */
+    current = (((long)randSeed1)>>(32-DITHER_BITS)) + (((long)randSeed2)>>(32-DITHER_BITS));
+    /* High pass filter to reduce audibility. */
+    highPass = current - previous;
+    previous = current;
+    return highPass;
+}
+
+/*************************************************************************
+** Called by host code.
+** Convert input from Int16, call user code, then convert output
+** to Int16 format for native use.
+** Assumes host native format is paInt16.
+** Returns result from user callback.
+*/
+long Pa_CallConvertInt16( internalPortAudioStream   *past,
+                          short *nativeInputBuffer,
+                          short *nativeOutputBuffer )
+{
+    long              temp;
+    long              bytesEmpty = 0;
+    long              bytesFilled = 0;
+    int               userResult;
+    unsigned int      i;
+    void             *inputBuffer = NULL;
+    void             *outputBuffer = NULL;
+
+#if SUPPORT_AUDIO_CAPTURE
+    /* Get native data from DirectSound. */
+    if( (past->past_NumInputChannels > 0) && (nativeInputBuffer != NULL) )
+    {
+        /* Convert from native format to PA format. */
+        unsigned int samplesPerBuffer = past->past_FramesPerUserBuffer * past->past_NumInputChannels;
+        switch(past->past_InputSampleFormat)
+        {
+
+        case paFloat32:
+            {
+                float *inBufPtr = (float *) past->past_InputBuffer;
+                inputBuffer = past->past_InputBuffer;
+                for( i=0; i<samplesPerBuffer; i++ )
+                {
+                    inBufPtr[i] = nativeInputBuffer[i] * (1.0f / 32767.0f);
+                }
+                break;
+            }
+
+        case paInt32:
+            {
+                /* Convert 16 bit data to 32 bit integers */
+                int *inBufPtr = (int *) past->past_InputBuffer;
+                inputBuffer = past->past_InputBuffer;
+                for( i=0; i<samplesPerBuffer; i++ )
+                {
+                    inBufPtr[i] = nativeInputBuffer[i] << 16;
+                }
+                break;
+            }
+
+        case paInt16:
+            {
+                /* Already in correct format so don't copy. */
+                inputBuffer = nativeInputBuffer;
+                break;
+            }
+
+        case paInt8:
+            {
+                /* Convert 16 bit data to 8 bit chars */
+                char *inBufPtr = (char *) past->past_InputBuffer;
+                inputBuffer = past->past_InputBuffer;
+                if( past->past_Flags & paDitherOff )
+                {
+                    for( i=0; i<samplesPerBuffer; i++ )
+                    {
+                        inBufPtr[i] = (char)(nativeInputBuffer[i] >> 8);
+                    }
+                }
+                else
+                {
+                    for( i=0; i<samplesPerBuffer; i++ )
+                    {
+                        temp = nativeInputBuffer[i];
+                        temp += Pa_TriangularDither() >> 7;
+                        temp = ((temp < -0x8000) ? -0x8000 : ((temp > 0x7FFF) ? 0x7FFF : temp));
+                        inBufPtr[i] = (char)(temp >> 8);
+                    }
+                }
+                break;
+            }
+
+        case paUInt8:
+            {
+                /* Convert 16 bit data to 8 bit unsigned chars */
+                unsigned char *inBufPtr = (unsigned char *) past->past_InputBuffer;
+                inputBuffer = past->past_InputBuffer;
+                if( past->past_Flags & paDitherOff )
+                {
+                    for( i=0; i<samplesPerBuffer; i++ )
+                    {
+                        inBufPtr[i] = ((unsigned char)(nativeInputBuffer[i] >> 8)) + 0x80;
+                    }
+                }
+                else
+                {
+                    /* If you dither then you have to clip because dithering could push the signal out of range! */
+                    for( i=0; i<samplesPerBuffer; i++ )
+                    {
+                        temp = nativeInputBuffer[i];
+                        temp += Pa_TriangularDither() >> 7;
+                        temp = ((temp < -0x8000) ? -0x8000 : ((temp > 0x7FFF) ? 0x7FFF : temp));
+                        inBufPtr[i] = (unsigned char)(temp + 0x80);
+                    }
+                }
+                break;
+            }
+
+        default:
+            break;
+        }
+    }
+#endif /* SUPPORT_AUDIO_CAPTURE */
+
+    /* Are we doing output time? */
+    if( (past->past_NumOutputChannels > 0) && (nativeOutputBuffer != NULL) )
+    {
+        /* May already be in native format so just write directly to native buffer. */
+        outputBuffer = (past->past_OutputSampleFormat == paInt16) ?
+                       nativeOutputBuffer : past->past_OutputBuffer;
+    }
+    /*
+     AddTraceMessage("Pa_CallConvertInt16: inputBuffer = ", (int) inputBuffer );
+     AddTraceMessage("Pa_CallConvertInt16: outputBuffer = ", (int) outputBuffer );
+    */
+    /* Call user callback routine. */
+    userResult = past->past_Callback(
+                     inputBuffer,
+                     outputBuffer,
+                     past->past_FramesPerUserBuffer,
+                     past->past_FrameCount,
+                     past->past_UserData );
+
+    past->past_FrameCount += (PaTimestamp) past->past_FramesPerUserBuffer;
+
+    /* Convert to native format if necessary. */
+    if( outputBuffer != NULL )
+    {
+        unsigned int samplesPerBuffer = past->past_FramesPerUserBuffer * past->past_NumOutputChannels;
+        switch(past->past_OutputSampleFormat)
+        {
+        case paFloat32:
+            {
+                float *outBufPtr = (float *) past->past_OutputBuffer;
+                if( past->past_Flags & paDitherOff )
+                {
+                    if( past->past_Flags & paClipOff ) /* NOTHING */
+                    {
+                        for( i=0; i<samplesPerBuffer; i++ )
+                        {
+                            *nativeOutputBuffer++ = (short) (outBufPtr[i] * (32767.0f));
+                        }
+                    }
+                    else /* CLIP */
+                    {
+                        for( i=0; i<samplesPerBuffer; i++ )
+                        {
+                            temp = (long)(outBufPtr[i] * 32767.0f);
+                            *nativeOutputBuffer++ = (short)((temp < -0x8000) ? -0x8000 : ((temp > 0x7FFF) ? 0x7FFF : temp));
+                        }
+                    }
+                }
+                else
+                {
+                    /* If you dither then you have to clip because dithering could push the signal out of range! */
+                    for( i=0; i<samplesPerBuffer; i++ )
+                    {
+                        float dither  = Pa_TriangularDither()*DITHER_SCALE;
+                        float dithered = (outBufPtr[i] * (32767.0f)) + dither;
+                        temp = (long) (dithered);
+                        *nativeOutputBuffer++ = (short)((temp < -0x8000) ? -0x8000 : ((temp > 0x7FFF) ? 0x7FFF : temp));
+                    }
+                }
+                break;
+            }
+
+        case paInt32:
+            {
+                int *outBufPtr = (int *) past->past_OutputBuffer;
+                if( past->past_Flags & paDitherOff )
+                {
+                    for( i=0; i<samplesPerBuffer; i++ )
+                    {
+                        *nativeOutputBuffer++ = (short) (outBufPtr[i] >> 16 );
+                    }
+                }
+                else
+                {
+                    for( i=0; i<samplesPerBuffer; i++ )
+                    {
+                        /* Shift one bit down before dithering so that we have room for overflow from add. */
+                        temp = (outBufPtr[i] >> 1) + Pa_TriangularDither();
+                        temp = temp >> 15;
+                        *nativeOutputBuffer++ = (short)((temp < -0x8000) ? -0x8000 : ((temp > 0x7FFF) ? 0x7FFF : temp));
+                    }
+                }
+                break;
+            }
+
+        case paInt8:
+            {
+                char *outBufPtr = (char *) past->past_OutputBuffer;
+                for( i=0; i<samplesPerBuffer; i++ )
+                {
+                    *nativeOutputBuffer++ = ((short)outBufPtr[i]) << 8;
+                }
+                break;
+            }
+
+        case paUInt8:
+            {
+                unsigned char *outBufPtr = (unsigned char *) past->past_OutputBuffer;
+                for( i=0; i<samplesPerBuffer; i++ )
+                {
+                    *nativeOutputBuffer++ = ((short)(outBufPtr[i] - 0x80)) << 8;
+                }
+                break;
+            }
+
+        default:
+            break;
+        }
+
+    }
+
+    return userResult;
+}
+
+/*************************************************************************
+** Called by host code.
+** Convert input from Float32, call user code, then convert output
+** to Float32 format for native use.
+** Assumes host native format is Float32.
+** Returns result from user callback.
+** FIXME - Unimplemented for formats other than paFloat32!!!!
+*/
+long Pa_CallConvertFloat32( internalPortAudioStream   *past,
+                            float *nativeInputBuffer,
+                            float *nativeOutputBuffer )
+{
+    long              bytesEmpty = 0;
+    long              bytesFilled = 0;
+    int               userResult;
+    void             *inputBuffer = NULL;
+    void             *outputBuffer = NULL;
+
+    /* Get native data from DirectSound. */
+    if( (past->past_NumInputChannels > 0) && (nativeInputBuffer != NULL) )
+    {
+        inputBuffer = nativeInputBuffer;  // FIXME
+    }
+
+    /* Are we doing output time? */
+    if( (past->past_NumOutputChannels > 0) && (nativeOutputBuffer != NULL) )
+    {
+        /* May already be in native format so just write directly to native buffer. */
+        outputBuffer = (past->past_OutputSampleFormat == paFloat32) ?
+                       nativeOutputBuffer : past->past_OutputBuffer;
+    }
+    /*
+     AddTraceMessage("Pa_CallConvertInt16: inputBuffer = ", (int) inputBuffer );
+     AddTraceMessage("Pa_CallConvertInt16: outputBuffer = ", (int) outputBuffer );
+    */
+    /* Call user callback routine. */
+    userResult = past->past_Callback(
+                     inputBuffer,
+                     outputBuffer,
+                     past->past_FramesPerUserBuffer,
+                     past->past_FrameCount,
+                     past->past_UserData );
+
+    past->past_FrameCount += (PaTimestamp) past->past_FramesPerUserBuffer;
+
+    /* Convert to native format if necessary. */ // FIXME
+    return userResult;
+}
+
+/*************************************************************************/
+DLL_API PaError Pa_Initialize( void )
+{
+    if( gInitCount++ > 0 ) return paNoError;
+    ResetTraceMessages();
+    return PaHost_Init();
+}
+
+DLL_API PaError Pa_Terminate( void )
+{
+    PaError result = paNoError;
+
+    if( gInitCount == 0 ) return paNoError;
+    else if( --gInitCount == 0 )
+    {
+        result = PaHost_Term();
+        DumpTraceMessages();
+    }
+    return result;
+}
+
+/*************************************************************************/
+DLL_API PaError Pa_GetSampleSize( PaSampleFormat format )
+{
+    int size;
+    switch(format )
+    {
+
+    case paUInt8:
+    case paInt8:
+        size = 1;
+        break;
+
+    case paInt16:
+        size = 2;
+        break;
+
+    case paPackedInt24:
+        size = 3;
+        break;
+
+    case paFloat32:
+    case paInt32:
+    case paInt24:
+        size = 4;
+        break;
+
+    default:
+        size = paSampleFormatNotSupported;
+        break;
+    }
+    return (PaError) size;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_linux_alsa.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_linux_alsa.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_linux_alsa.c	(revision 1163)
@@ -0,0 +1,3272 @@
+/*
+ * $Id: pa_linux_alsa.c,v 1.1.2.71 2005/04/15 18:20:18 aknudsen Exp $
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ * ALSA implementation by Joshua Haberman and Arve Knudsen
+ *
+ * Copyright (c) 2002 Joshua Haberman <joshua@haberman.com>
+ * Copyright (c) 2005 Arve Knudsen <aknuds-1@broadpark.no>
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#define ALSA_PCM_NEW_HW_PARAMS_API
+#define ALSA_PCM_NEW_SW_PARAMS_API
+#include <alsa/asoundlib.h>
+#undef ALSA_PCM_NEW_HW_PARAMS_API
+#undef ALSA_PCM_NEW_SW_PARAMS_API
+
+#include <sys/poll.h>
+#include <string.h> /* strlen() */
+#include <limits.h>
+#include <math.h>
+#include <pthread.h>
+#include <signal.h>
+#include <time.h>
+#include <sys/mman.h>
+#include <signal.h> /* For sig_atomic_t */
+
+#include "portaudio.h"
+#include "pa_util.h"
+#include "pa_unix_util.h"
+#include "pa_allocation.h"
+#include "pa_hostapi.h"
+#include "pa_stream.h"
+#include "pa_cpuload.h"
+#include "pa_process.h"
+
+#include "pa_linux_alsa.h"
+
+/* Check return value of ALSA function, and map it to PaError */
+#define ENSURE_(expr, code) \
+    do { \
+        if( UNLIKELY( (aErr_ = (expr)) < 0 ) ) \
+        { \
+            /* PaUtil_SetLastHostErrorInfo should only be used in the main thread */ \
+            if( (code) == paUnanticipatedHostError && pthread_self() != callbackThread_ ) \
+            { \
+                PaUtil_SetLastHostErrorInfo( paALSA, aErr_, snd_strerror( aErr_ ) ); \
+            } \
+            PaUtil_DebugPrint(( "Expression '" #expr "' failed in '" __FILE__ "', line: " STRINGIZE( __LINE__ ) "\n" )); \
+            result = (code); \
+            goto error; \
+        } \
+    } while( 0 );
+
+#define ASSERT_CALL_(expr, success) \
+    aErr_ = (expr); \
+    assert( aErr_ == success );
+
+static int aErr_;               /* Used with ENSURE_ */
+static pthread_t callbackThread_;
+
+typedef enum
+{
+    StreamDirection_In,
+    StreamDirection_Out
+} StreamDirection;
+
+/* Threading utility struct */
+typedef struct PaAlsaThreading
+{
+    pthread_t watchdogThread;
+    pthread_t callbackThread;
+    int watchdogRunning;
+    int rtSched;
+    int rtPrio;
+    int useWatchdog;
+    unsigned long throttledSleepTime;
+    volatile PaTime callbackTime;
+    volatile PaTime callbackCpuTime;
+    PaUtilCpuLoadMeasurer *cpuLoadMeasurer;
+} PaAlsaThreading;
+
+typedef struct
+{
+    PaSampleFormat hostSampleFormat;
+    unsigned long framesPerBuffer;
+    int numUserChannels, numHostChannels;
+    int userInterleaved, hostInterleaved;
+
+    snd_pcm_t *pcm;
+    snd_pcm_uframes_t bufferSize;
+    snd_pcm_format_t nativeFormat;
+    unsigned int nfds;
+    int ready;  /* Marked ready from poll */
+    void **userBuffers;
+    snd_pcm_uframes_t offset;
+    StreamDirection streamDir;
+
+    snd_pcm_channel_area_t *channelAreas;  /* Needed for channel adaption */
+} PaAlsaStreamComponent;
+
+/* Implementation specific stream structure */
+typedef struct PaAlsaStream
+{
+    PaUtilStreamRepresentation streamRepresentation;
+    PaUtilCpuLoadMeasurer cpuLoadMeasurer;
+    PaUtilBufferProcessor bufferProcessor;
+    PaAlsaThreading threading;
+
+    unsigned long framesPerUserBuffer;
+
+    int primeBuffers;
+    int callbackMode;              /* bool: are we running in callback mode? */
+    int pcmsSynced;	            /* Have we successfully synced pcms */
+
+    /* the callback thread uses these to poll the sound device(s), waiting
+     * for data to be ready/available */
+    struct pollfd *pfds;
+    int pollTimeout;
+
+    /* Used in communication between threads */
+    volatile sig_atomic_t callback_finished; /* bool: are we in the "callback finished" state? */
+    volatile sig_atomic_t callbackAbort;    /* Drop frames? */
+    volatile sig_atomic_t callbackStop;     /* Signal a stop */
+    volatile sig_atomic_t isActive;         /* Is stream in active state? (Between StartStream and StopStream || !paContinue) */
+    pthread_mutex_t stateMtx;               /* Used to synchronize access to stream state */
+    pthread_mutex_t startMtx;               /* Used to synchronize stream start in callback mode */
+    pthread_cond_t startCond;               /* Wait untill audio is started in callback thread */
+
+    int neverDropInput;
+
+    PaTime underrun;
+    PaTime overrun;
+
+    PaAlsaStreamComponent capture, playback;
+}
+PaAlsaStream;
+
+/* PaAlsaHostApiRepresentation - host api datastructure specific to this implementation */
+
+typedef struct PaAlsaHostApiRepresentation
+{
+    PaUtilHostApiRepresentation commonHostApiRep;
+    PaUtilStreamInterface callbackStreamInterface;
+    PaUtilStreamInterface blockingStreamInterface;
+
+    PaUtilAllocationGroup *allocations;
+
+    PaHostApiIndex hostApiIndex;
+}
+PaAlsaHostApiRepresentation;
+
+typedef struct PaAlsaDeviceInfo
+{
+    PaDeviceInfo commonDeviceInfo;
+    char *alsaName;
+    int isPlug;
+    int minInputChannels;
+    int minOutputChannels;
+}
+PaAlsaDeviceInfo;
+
+/* Threading utilities */
+
+static void InitializeThreading( PaAlsaThreading *th, PaUtilCpuLoadMeasurer *clm )
+{
+    th->watchdogRunning = 0;
+    th->rtSched = 0;
+    th->callbackTime = 0;
+    th->callbackCpuTime = 0;
+    th->useWatchdog = 1;
+    th->throttledSleepTime = 0;
+    th->cpuLoadMeasurer = clm;
+
+    th->rtPrio = (sched_get_priority_max( SCHED_FIFO ) - sched_get_priority_min( SCHED_FIFO )) / 2
+            + sched_get_priority_min( SCHED_FIFO );
+}
+
+static PaError KillCallbackThread( PaAlsaThreading *th, int wait, PaError *exitResult, PaError *watchdogExitResult )
+{
+    PaError result = paNoError;
+    void *pret;
+
+    if( exitResult )
+        *exitResult = paNoError;
+    if( watchdogExitResult )
+        *watchdogExitResult = paNoError;
+
+    if( th->watchdogRunning )
+    {
+        pthread_cancel( th->watchdogThread );
+        ASSERT_CALL_( pthread_join( th->watchdogThread, &pret ), 0 );
+
+        if( pret && pret != PTHREAD_CANCELED )
+        {
+            if( watchdogExitResult )
+                *watchdogExitResult = *(PaError *) pret;
+            free( pret );
+        }
+    }
+
+    /* Only kill the thread if it isn't in the process of stopping (flushing adaptation buffers) */
+    /* TODO: Make join time out */
+    if( !wait )
+        pthread_cancel( th->callbackThread );   /* XXX: Safe to call this if the thread has exited on its own? */
+    ASSERT_CALL_( pthread_join( th->callbackThread, &pret ), 0 );
+
+    if( pret && pret != PTHREAD_CANCELED )
+    {
+        if( exitResult )
+            *exitResult = *(PaError *) pret;
+        free( pret );
+    }
+
+    return result;
+}
+
+static void OnWatchdogExit( void *userData )
+{
+    PaAlsaThreading *th = (PaAlsaThreading *) userData;
+    struct sched_param spm = { 0 };
+    assert( th );
+
+    ASSERT_CALL_( pthread_setschedparam( th->callbackThread, SCHED_OTHER, &spm ), 0 );    /* Lower before exiting */
+    PA_DEBUG(( "Watchdog exiting\n" ));
+}
+
+static PaError BoostPriority( PaAlsaThreading *th )
+{
+    PaError result = paNoError;
+    struct sched_param spm = { 0 };
+    spm.sched_priority = th->rtPrio;
+
+    assert( th );
+
+    if( pthread_setschedparam( th->callbackThread, SCHED_FIFO, &spm ) != 0 )
+    {
+        PA_UNLESS( errno == EPERM, paInternalError );  /* Lack permission to raise priority */
+        PA_DEBUG(( "Failed bumping priority\n" ));
+        result = 0;
+    }
+    else
+        result = 1; /* Success */
+error:
+    return result;
+}
+
+static void *WatchdogFunc( void *userData )
+{
+    PaError result = paNoError, *pres = NULL;
+    int err;
+    PaAlsaThreading *th = (PaAlsaThreading *) userData;
+    unsigned intervalMsec = 500;
+    const PaTime maxSeconds = 3.;   /* Max seconds between callbacks */
+    PaTime timeThen = PaUtil_GetTime(), timeNow, timeElapsed, cpuTimeThen, cpuTimeNow, cpuTimeElapsed;
+    double cpuLoad, avgCpuLoad = 0.;
+    int throttled = 0;
+
+    assert( th );
+
+    pthread_cleanup_push( &OnWatchdogExit, th );	/* Execute OnWatchdogExit when exiting */
+
+    /* Boost priority of callback thread */
+    PA_ENSURE( result = BoostPriority( th ) );
+    if( !result )
+    {
+        pthread_exit( NULL );   /* Boost failed, might as well exit */
+    }
+
+    cpuTimeThen = th->callbackCpuTime;
+    {
+        int policy;
+        struct sched_param spm = { 0 };
+        pthread_getschedparam( pthread_self(), &policy, &spm );
+        PA_DEBUG(( "%s: Watchdog priority is %d\n", __FUNCTION__, spm.sched_priority ));
+    }
+
+    while( 1 )
+    {
+        double lowpassCoeff = 0.9, lowpassCoeff1 = 0.99999 - lowpassCoeff;
+        
+        /* Test before and after in case whatever underlying sleep call isn't interrupted by pthread_cancel */
+        pthread_testcancel();
+        Pa_Sleep( intervalMsec );
+        pthread_testcancel();
+
+        if( PaUtil_GetTime() - th->callbackTime > maxSeconds )
+        {
+            PA_DEBUG(( "Watchdog: Terminating callback thread\n" ));
+            /* Tell thread to terminate */
+            err = pthread_kill( th->callbackThread, SIGKILL );
+            pthread_exit( NULL );
+        }
+
+        PA_DEBUG(( "%s: PortAudio reports CPU load: %g\n", __FUNCTION__, PaUtil_GetCpuLoad( th->cpuLoadMeasurer ) ));
+
+        /* Check if we should throttle, or unthrottle :P */
+        cpuTimeNow = th->callbackCpuTime;
+        cpuTimeElapsed = cpuTimeNow - cpuTimeThen;
+        cpuTimeThen = cpuTimeNow;
+
+        timeNow = PaUtil_GetTime();
+        timeElapsed = timeNow - timeThen;
+        timeThen = timeNow;
+        cpuLoad = cpuTimeElapsed / timeElapsed;
+        avgCpuLoad = avgCpuLoad * lowpassCoeff + cpuLoad * lowpassCoeff1;
+        /*
+        if( throttled )
+            PA_DEBUG(( "Watchdog: CPU load: %g, %g\n", avgCpuLoad, cpuTimeElapsed ));
+            */
+        if( PaUtil_GetCpuLoad( th->cpuLoadMeasurer ) > .925 )
+        {
+            static int policy;
+            static struct sched_param spm = { 0 };
+            static const struct sched_param defaultSpm = { 0 };
+            PA_DEBUG(( "%s: Throttling audio thread, priority %d\n", __FUNCTION__, spm.sched_priority ));
+
+            pthread_getschedparam( th->callbackThread, &policy, &spm );
+            if( !pthread_setschedparam( th->callbackThread, SCHED_OTHER, &defaultSpm ) )
+            {
+                throttled = 1;
+            }
+            else
+                PA_DEBUG(( "Watchdog: Couldn't lower priority of audio thread: %s\n", strerror( errno ) ));
+
+            /* Give other processes a go, before raising priority again */
+            PA_DEBUG(( "%s: Watchdog sleeping for %lu msecs before unthrottling\n", __FUNCTION__, th->throttledSleepTime ));
+            Pa_Sleep( th->throttledSleepTime );
+
+            /* Reset callback priority */
+            if( pthread_setschedparam( th->callbackThread, SCHED_FIFO, &spm ) != 0 )
+            {
+                PA_DEBUG(( "%s: Couldn't raise priority of audio thread: %s\n", __FUNCTION__, strerror( errno ) ));
+            }
+
+            if( PaUtil_GetCpuLoad( th->cpuLoadMeasurer ) >= .99 )
+                intervalMsec = 50;
+            else
+                intervalMsec = 100;
+
+            /*
+            lowpassCoeff = .97;
+            lowpassCoeff1 = .99999 - lowpassCoeff;
+            */
+        }
+        else if( throttled && avgCpuLoad < .8 )
+        {
+            intervalMsec = 500;
+            throttled = 0;
+
+            /*
+            lowpassCoeff = .9;
+            lowpassCoeff1 = .99999 - lowpassCoeff;
+            */
+        }
+    }
+
+    pthread_cleanup_pop( 1 );   /* Execute cleanup on exit */
+
+error:
+    /* Shouldn't get here in the normal case */
+
+    /* Pass on error code */
+    pres = malloc( sizeof (PaError) );
+    *pres = result;
+    
+    pthread_exit( pres );
+}
+
+static PaError CreateCallbackThread( PaAlsaThreading *th, void *(*callbackThreadFunc)( void * ), PaStream *s )
+{
+    PaError result = paNoError;
+    pthread_attr_t attr;
+    int started = 0;
+
+#if defined _POSIX_MEMLOCK && (_POSIX_MEMLOCK != -1)
+    if( th->rtSched )
+    {
+        if( mlockall( MCL_CURRENT | MCL_FUTURE ) < 0 )
+        {
+            int savedErrno = errno;             /* In case errno gets overwritten */
+            assert( savedErrno != EINVAL );     /* Most likely a programmer error */
+            PA_UNLESS( (savedErrno == EPERM), paInternalError );
+            PA_DEBUG(( "%s: Failed locking memory\n", __FUNCTION__ ));
+        }
+        else
+            PA_DEBUG(( "%s: Successfully locked memory\n", __FUNCTION__ ));
+    }
+#endif
+
+    PA_UNLESS( !pthread_attr_init( &attr ), paInternalError );
+    /* Priority relative to other processes */
+    PA_UNLESS( !pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM ), paInternalError );   
+
+    PA_UNLESS( !pthread_create( &th->callbackThread, &attr, callbackThreadFunc, s ), paInternalError );
+    started = 1;
+
+    if( th->rtSched )
+    {
+        if( th->useWatchdog )
+        {
+            int err;
+            struct sched_param wdSpm = { 0 };
+            /* Launch watchdog, watchdog sets callback thread priority */
+            int prio = PA_MIN( th->rtPrio + 4, sched_get_priority_max( SCHED_FIFO ) );
+            wdSpm.sched_priority = prio;
+
+            PA_UNLESS( !pthread_attr_init( &attr ), paInternalError );
+            PA_UNLESS( !pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ), paInternalError );
+            PA_UNLESS( !pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM ), paInternalError );
+            PA_UNLESS( !pthread_attr_setschedpolicy( &attr, SCHED_FIFO ), paInternalError );
+            PA_UNLESS( !pthread_attr_setschedparam( &attr, &wdSpm ), paInternalError );
+            if( (err = pthread_create( &th->watchdogThread, &attr, &WatchdogFunc, th )) )
+            {
+                PA_UNLESS( err == EPERM, paInternalError );
+                /* Permission error, go on without realtime privileges */
+                PA_DEBUG(( "Failed bumping priority\n" ));
+            }
+            else
+            {
+                int policy;
+                th->watchdogRunning = 1;
+                ASSERT_CALL_( pthread_getschedparam( th->watchdogThread, &policy, &wdSpm ), 0 );
+                /* Check if priority is right, policy could potentially differ from SCHED_FIFO (but that's alright) */
+                if( wdSpm.sched_priority != prio )
+                {
+                    PA_DEBUG(( "Watchdog priority not set correctly (%d)\n", wdSpm.sched_priority ));
+                    PA_ENSURE( paInternalError );
+                }
+            }
+        }
+        else
+            PA_ENSURE( BoostPriority( th ) );
+    }
+
+end:
+    return result;
+error:
+    if( started )
+        KillCallbackThread( th, 0, NULL, NULL );
+
+    goto end;
+}
+
+static void CallbackUpdate( PaAlsaThreading *th )
+{
+    th->callbackTime = PaUtil_GetTime();
+    th->callbackCpuTime = PaUtil_GetCpuLoad( th->cpuLoadMeasurer );
+}
+
+/* prototypes for functions declared in this file */
+
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi );
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate );
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** s,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *callback,
+                           void *userData );
+static PaError CloseStream( PaStream* stream );
+static PaError StartStream( PaStream *stream );
+static PaError StopStream( PaStream *stream );
+static PaError AbortStream( PaStream *stream );
+static PaError IsStreamStopped( PaStream *s );
+static PaError IsStreamActive( PaStream *stream );
+static PaTime GetStreamTime( PaStream *stream );
+static double GetStreamCpuLoad( PaStream* stream );
+static PaError BuildDeviceList( PaAlsaHostApiRepresentation *hostApi );
+static int SetApproximateSampleRate( snd_pcm_t *pcm, snd_pcm_hw_params_t *hwParams, double sampleRate );
+static int GetExactSampleRate( snd_pcm_hw_params_t *hwParams, double *sampleRate );
+
+/* Callback prototypes */
+static void *CallbackThreadFunc( void *userData );
+
+/* Blocking prototypes */
+static signed long GetStreamReadAvailable( PaStream* s );
+static signed long GetStreamWriteAvailable( PaStream* s );
+static PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );
+static PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );
+
+
+static const PaAlsaDeviceInfo *GetDeviceInfo( const PaUtilHostApiRepresentation *hostApi, int device )
+{
+    return (const PaAlsaDeviceInfo *)hostApi->deviceInfos[device];
+}
+
+PaError PaAlsa_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+{
+    PaError result = paNoError;
+    PaAlsaHostApiRepresentation *alsaHostApi = NULL;
+
+    PA_UNLESS( alsaHostApi = (PaAlsaHostApiRepresentation*) PaUtil_AllocateMemory(
+                sizeof(PaAlsaHostApiRepresentation) ), paInsufficientMemory );
+    PA_UNLESS( alsaHostApi->allocations = PaUtil_CreateAllocationGroup(), paInsufficientMemory );
+    alsaHostApi->hostApiIndex = hostApiIndex;
+
+    *hostApi = (PaUtilHostApiRepresentation*)alsaHostApi;
+    (*hostApi)->info.structVersion = 1;
+    (*hostApi)->info.type = paALSA;
+    (*hostApi)->info.name = "ALSA";
+
+    (*hostApi)->Terminate = Terminate;
+    (*hostApi)->OpenStream = OpenStream;
+    (*hostApi)->IsFormatSupported = IsFormatSupported;
+
+    PA_ENSURE( BuildDeviceList( alsaHostApi ) );
+
+    PaUtil_InitializeStreamInterface( &alsaHostApi->callbackStreamInterface,
+                                      CloseStream, StartStream,
+                                      StopStream, AbortStream,
+                                      IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, GetStreamCpuLoad,
+                                      PaUtil_DummyRead, PaUtil_DummyWrite,
+                                      PaUtil_DummyGetReadAvailable,
+                                      PaUtil_DummyGetWriteAvailable );
+
+    PaUtil_InitializeStreamInterface( &alsaHostApi->blockingStreamInterface,
+                                      CloseStream, StartStream,
+                                      StopStream, AbortStream,
+                                      IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, PaUtil_DummyGetCpuLoad,
+                                      ReadStream, WriteStream,
+                                      GetStreamReadAvailable,
+                                      GetStreamWriteAvailable );
+
+    return result;
+
+error:
+    if( alsaHostApi )
+    {
+        if( alsaHostApi->allocations )
+        {
+            PaUtil_FreeAllAllocations( alsaHostApi->allocations );
+            PaUtil_DestroyAllocationGroup( alsaHostApi->allocations );
+        }
+
+        PaUtil_FreeMemory( alsaHostApi );
+    }
+
+    return result;
+}
+
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi )
+{
+    PaAlsaHostApiRepresentation *alsaHostApi = (PaAlsaHostApiRepresentation*)hostApi;
+
+    assert( hostApi );
+
+    if( alsaHostApi->allocations )
+    {
+        PaUtil_FreeAllAllocations( alsaHostApi->allocations );
+        PaUtil_DestroyAllocationGroup( alsaHostApi->allocations );
+    }
+
+    PaUtil_FreeMemory( alsaHostApi );
+    snd_config_update_free_global();
+}
+
+/*! Determine max channels and default latencies.
+ *
+ * This function provides functionality to grope an opened (might be opened for capture or playback) pcm device for 
+ * traits like max channels, suitable default latencies and default sample rate. Upon error, max channels is set to zero,
+ * and a suitable result returned. The device is closed before returning.
+ */
+static PaError GropeDevice( snd_pcm_t *pcm, int *minChannels, int *maxChannels, double *defaultLowLatency,
+        double *defaultHighLatency, double *defaultSampleRate, int isPlug )
+{
+    PaError result = paNoError;
+    snd_pcm_hw_params_t *hwParams;
+    snd_pcm_uframes_t lowLatency = 512, highLatency = 2048;
+    unsigned int minChans, maxChans;
+    double defaultSr = *defaultSampleRate;
+
+    assert( pcm );
+
+    ENSURE_( snd_pcm_nonblock( pcm, 0 ), paUnanticipatedHostError );
+
+    snd_pcm_hw_params_alloca( &hwParams );
+    snd_pcm_hw_params_any( pcm, hwParams );
+
+    if( defaultSr >= 0 )
+    {
+        /* Could be that the device opened in one mode supports samplerates that the other mode wont have,
+         * so try again .. */
+        if( SetApproximateSampleRate( pcm, hwParams, defaultSr ) < 0 )
+        {
+            defaultSr = -1.;
+            PA_DEBUG(( "%s: Original default samplerate failed, trying again ..\n", __FUNCTION__ ));
+        }
+    }
+
+    if( defaultSr < 0. )           /* Default sample rate not set */
+    {
+        unsigned int sampleRate = 44100;        /* Will contain approximate rate returned by alsa-lib */
+        ENSURE_( snd_pcm_hw_params_set_rate_near( pcm, hwParams, &sampleRate, NULL ), paUnanticipatedHostError );
+        ENSURE_( GetExactSampleRate( hwParams, &defaultSr ), paUnanticipatedHostError );
+    }
+
+    ENSURE_( snd_pcm_hw_params_get_channels_min( hwParams, &minChans ), paUnanticipatedHostError );
+    ENSURE_( snd_pcm_hw_params_get_channels_max( hwParams, &maxChans ), paUnanticipatedHostError );
+    assert( maxChans <= INT_MAX );
+    assert( maxChans > 0 );    /* Weird linking issue could cause wrong version of ALSA symbols to be called,
+                                   resulting in zeroed values */
+
+    /* XXX: Limit to sensible number (ALSA plugins accept a crazy amount of channels)? */
+    if( isPlug && maxChans > 128 )
+    {
+        maxChans = 128;
+        PA_DEBUG(( "%s: Limiting number of plugin channels to %u\n", __FUNCTION__, maxChans ));
+    }
+
+    /* TWEAKME:
+     *
+     * Giving values for default min and max latency is not
+     * straightforward.  Here are our objectives:
+     *
+     *         * for low latency, we want to give the lowest value
+     *         that will work reliably.  This varies based on the
+     *         sound card, kernel, CPU, etc.  I think it is better
+     *         to give sub-optimal latency than to give a number
+     *         too low and cause dropouts.  My conservative
+     *         estimate at this point is to base it on 4096-sample
+     *         latency at 44.1 kHz, which gives a latency of 23ms.
+     *         * for high latency we want to give a large enough
+     *         value that dropouts are basically impossible.  This
+     *         doesn't really require as much tweaking, since
+     *         providing too large a number will just cause us to
+     *         select the nearest setting that will work at stream
+     *         config time.
+     */
+    ENSURE_( snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &lowLatency ), paUnanticipatedHostError );
+
+    /* Have to reset hwParams, to set new buffer size */
+    ENSURE_( snd_pcm_hw_params_any( pcm, hwParams ), paUnanticipatedHostError ); 
+    ENSURE_( snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &highLatency ), paUnanticipatedHostError );
+
+    *minChannels = (int)minChans;
+    *maxChannels = (int)maxChans;
+    *defaultSampleRate = defaultSr;
+    *defaultLowLatency = (double) lowLatency / *defaultSampleRate;
+    *defaultHighLatency = (double) highLatency / *defaultSampleRate;
+
+end:
+    snd_pcm_close( pcm );
+    return result;
+
+error:
+    goto end;
+}
+
+/* Initialize device info with invalid values (maxInputChannels and maxOutputChannels are set to zero since these indicate
+ * wether input/output is available) */
+static void InitializeDeviceInfo( PaDeviceInfo *deviceInfo )
+{
+    deviceInfo->structVersion = -1;
+    deviceInfo->name = NULL;
+    deviceInfo->hostApi = -1;
+    deviceInfo->maxInputChannels = 0;
+    deviceInfo->maxOutputChannels = 0;
+    deviceInfo->defaultLowInputLatency = -1.;
+    deviceInfo->defaultLowOutputLatency = -1.;
+    deviceInfo->defaultHighInputLatency = -1.;
+    deviceInfo->defaultHighOutputLatency = -1.;
+    deviceInfo->defaultSampleRate = -1.;
+}
+
+/* Helper struct */
+typedef struct
+{
+    char *alsaName;
+    char *name;
+    int isPlug;
+    int hasPlayback;
+    int hasCapture;
+} DeviceNames;
+
+static PaError PaAlsa_StrDup( PaAlsaHostApiRepresentation *alsaApi,
+        char **dst,
+        const char *src)
+{
+    PaError result = paNoError;
+    int len = strlen( src ) + 1;
+
+    /* PA_DEBUG(("PaStrDup %s %d\n", src, len)); */
+
+    PA_UNLESS( *dst = (char *)PaUtil_GroupAllocateMemory( alsaApi->allocations, len ),
+            paInsufficientMemory );
+    strncpy( *dst, src, len );
+
+error:
+    return result;
+}
+
+/* Disregard standard plugins
+ * XXX: Might want to make the "default" plugin available, if we can make it work
+ */
+static int IgnorePlugin( const char *pluginId )
+{
+#define numIgnored 10
+    static const char *ignoredPlugins[numIgnored] = {"hw", "plughw", "plug", "default", "dsnoop", "dmix", "tee",
+        "file", "null", "shm"};
+    int i;
+
+    for( i = 0; i < numIgnored; ++i )
+    {
+        if( !strcmp( pluginId, ignoredPlugins[i] ) )
+        {
+            return 1;
+        }
+    }
+
+    return 0;
+}
+
+/* Build PaDeviceInfo list, ignore devices for which we cannot determine capabilities (possibly busy, sigh) */
+static PaError BuildDeviceList( PaAlsaHostApiRepresentation *alsaApi )
+{
+    PaUtilHostApiRepresentation *commonApi = &alsaApi->commonHostApiRep;
+    PaAlsaDeviceInfo *deviceInfoArray;
+    int cardIdx = -1, devIdx = 0;
+    snd_ctl_card_info_t *cardInfo;
+    PaError result = paNoError;
+    size_t numDeviceNames = 0, maxDeviceNames = 1, i;
+    DeviceNames *deviceNames = NULL;
+    snd_config_t *topNode = NULL;
+    snd_pcm_info_t *pcmInfo;
+    int res;
+    int blocking = SND_PCM_NONBLOCK;
+    char alsaCardName[50];
+    if( getenv( "PA_ALSA_INITIALIZE_BLOCK" ) && atoi( getenv( "PA_ALSA_INITIALIZE_BLOCK" ) ) )
+        blocking = 0;
+
+    /* These two will be set to the first working input and output device, respectively */
+    commonApi->info.defaultInputDevice = paNoDevice;
+    commonApi->info.defaultOutputDevice = paNoDevice;
+
+    /* count the devices by enumerating all the card numbers */
+
+    /* snd_card_next() modifies the integer passed to it to be:
+     *      the index of the first card if the parameter is -1
+     *      the index of the next card if the parameter is the index of a card
+     *      -1 if there are no more cards
+     *
+     * The function itself returns 0 if it succeeded. */
+    cardIdx = -1;
+    snd_ctl_card_info_alloca( &cardInfo );
+    snd_pcm_info_alloca( &pcmInfo );
+    while( snd_card_next( &cardIdx ) == 0 && cardIdx >= 0 )
+    {
+        char *cardName;
+        int devIdx = -1;
+        snd_ctl_t *ctl;
+        char buf[50];
+
+        snprintf( alsaCardName, sizeof (alsaCardName), "hw:%d", cardIdx );
+
+        /* Acquire name of card */
+        if( snd_ctl_open( &ctl, alsaCardName, 0 ) < 0 )
+            continue;   /* Unable to open card :( */
+        snd_ctl_card_info( ctl, cardInfo );
+
+        PA_ENSURE( PaAlsa_StrDup( alsaApi, &cardName, snd_ctl_card_info_get_name( cardInfo )) );
+
+        while( snd_ctl_pcm_next_device( ctl, &devIdx ) == 0 && devIdx >= 0 )
+        {
+            char *alsaDeviceName, *deviceName;
+            size_t len;
+            int hasPlayback = 0, hasCapture = 0;
+            snprintf( buf, sizeof (buf), "%s:%d,%d", "hw", cardIdx, devIdx );
+
+            /* Obtain info about this particular device */
+            snd_pcm_info_set_device( pcmInfo, devIdx );
+            snd_pcm_info_set_subdevice( pcmInfo, 0 );
+            snd_pcm_info_set_stream( pcmInfo, SND_PCM_STREAM_CAPTURE );
+            if( snd_ctl_pcm_info( ctl, pcmInfo ) >= 0 )
+                hasCapture = 1;
+            
+            snd_pcm_info_set_stream( pcmInfo, SND_PCM_STREAM_PLAYBACK );
+            if( snd_ctl_pcm_info( ctl, pcmInfo ) >= 0 )
+                hasPlayback = 1;
+
+            if( !hasPlayback && !hasCapture )
+            {
+                continue;   /* Error */
+            }
+
+            /* The length of the string written by snprintf plus terminating 0 */
+            len = snprintf( NULL, 0, "%s: %s (%s)", cardName, snd_pcm_info_get_name( pcmInfo ), buf ) + 1;
+            PA_UNLESS( deviceName = (char *)PaUtil_GroupAllocateMemory( alsaApi->allocations, len ),
+                    paInsufficientMemory );
+            snprintf( deviceName, len, "%s: %s (%s)", cardName,
+                    snd_pcm_info_get_name( pcmInfo ), buf );
+
+            ++numDeviceNames;
+            if( !deviceNames || numDeviceNames > maxDeviceNames )
+            {
+                maxDeviceNames *= 2;
+                PA_UNLESS( deviceNames = (DeviceNames *) realloc( deviceNames, maxDeviceNames * sizeof (DeviceNames) ),
+                        paInsufficientMemory );
+            }
+
+            PA_ENSURE( PaAlsa_StrDup( alsaApi, &alsaDeviceName, buf ) );
+
+            deviceNames[ numDeviceNames - 1 ].alsaName = alsaDeviceName;
+            deviceNames[ numDeviceNames - 1 ].name = deviceName;
+            deviceNames[ numDeviceNames - 1 ].isPlug = 0;
+            deviceNames[ numDeviceNames - 1 ].hasPlayback = hasPlayback;
+            deviceNames[ numDeviceNames - 1 ].hasCapture = hasCapture;
+        }
+        snd_ctl_close( ctl );
+    }
+
+    /* Iterate over plugin devices */
+    snd_config_update();
+    if( (res = snd_config_search( snd_config, "pcm", &topNode )) >= 0 )
+    {
+        snd_config_iterator_t i, next;
+
+        snd_config_for_each( i, next, topNode )
+        {
+            const char *tpStr = NULL, *idStr = NULL;
+            char *alsaDeviceName, *deviceName;
+            snd_config_t *n = snd_config_iterator_entry( i ), *tp = NULL;
+            if( snd_config_get_type( n ) != SND_CONFIG_TYPE_COMPOUND )
+                continue;
+
+            ENSURE_( snd_config_search( n, "type", &tp ), paUnanticipatedHostError );
+            ENSURE_( snd_config_get_string( tp, &tpStr ), paUnanticipatedHostError );
+
+            ENSURE_( snd_config_get_id( n, &idStr ), paUnanticipatedHostError );
+            if( IgnorePlugin( idStr ) )
+            {
+                PA_DEBUG(( "%s: Ignoring ALSA plugin device %s of type %s\n", __FUNCTION__, idStr, tpStr ));
+                continue;
+            }
+
+            PA_DEBUG(( "%s: Found plugin %s of type %s\n", __FUNCTION__, idStr, tpStr ));
+
+            PA_UNLESS( alsaDeviceName = (char*)PaUtil_GroupAllocateMemory( alsaApi->allocations,
+                                                            strlen(idStr) + 6 ), paInsufficientMemory );
+            strcpy( alsaDeviceName, idStr );
+            PA_UNLESS( deviceName = (char*)PaUtil_GroupAllocateMemory( alsaApi->allocations,
+                                                            strlen(idStr) + 1 ), paInsufficientMemory );
+            strcpy( deviceName, idStr );
+
+            ++numDeviceNames;
+            if( !deviceNames || numDeviceNames > maxDeviceNames )
+            {
+                maxDeviceNames *= 2;
+                PA_UNLESS( deviceNames = (DeviceNames *) realloc( deviceNames, maxDeviceNames * sizeof (DeviceNames) ),
+                        paInsufficientMemory );
+            }
+
+            deviceNames[numDeviceNames - 1].alsaName = alsaDeviceName;
+            deviceNames[numDeviceNames - 1].name = deviceName;
+            deviceNames[numDeviceNames - 1].isPlug = 1;
+            deviceNames[numDeviceNames - 1].hasPlayback = 1;
+            deviceNames[numDeviceNames - 1].hasCapture = 1;
+        }
+    }
+    else
+        PA_DEBUG(( "%s: Iterating over ALSA plugins failed: %s\n", __FUNCTION__, snd_strerror( res ) ));
+
+    /* allocate deviceInfo memory based on the number of devices */
+    PA_UNLESS( commonApi->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(
+            alsaApi->allocations, sizeof(PaDeviceInfo*) * (numDeviceNames) ), paInsufficientMemory );
+
+    /* allocate all device info structs in a contiguous block */
+    PA_UNLESS( deviceInfoArray = (PaAlsaDeviceInfo*)PaUtil_GroupAllocateMemory(
+            alsaApi->allocations, sizeof(PaAlsaDeviceInfo) * numDeviceNames ), paInsufficientMemory );
+
+    /* Loop over list of cards, filling in info, if a device is deemed unavailable (can't get name),
+     * it's ignored.
+     */
+    /* while( snd_card_next( &cardIdx ) == 0 && cardIdx >= 0 ) */
+    for( i = 0, devIdx = 0; i < numDeviceNames; ++i )
+    {
+        snd_pcm_t *pcm;
+        PaAlsaDeviceInfo *deviceInfo = &deviceInfoArray[devIdx];
+        PaDeviceInfo *commonDeviceInfo = &deviceInfo->commonDeviceInfo;
+
+        /* Zero fields */
+        InitializeDeviceInfo( commonDeviceInfo );
+
+        /* to determine device capabilities, we must open the device and query the
+         * hardware parameter configuration space */
+
+        /* Query capture */
+        if( deviceNames[i].hasCapture &&
+                snd_pcm_open( &pcm, deviceNames[i].alsaName, SND_PCM_STREAM_CAPTURE, blocking ) >= 0 )
+        {
+            if( GropeDevice( pcm, &deviceInfo->minInputChannels, &commonDeviceInfo->maxInputChannels,
+                        &commonDeviceInfo->defaultLowInputLatency, &commonDeviceInfo->defaultHighInputLatency,
+                        &commonDeviceInfo->defaultSampleRate, deviceNames[i].isPlug ) != paNoError )
+                continue;   /* Error */
+        }
+
+        /* Query playback */
+        if( deviceNames[i].hasPlayback &&
+                snd_pcm_open( &pcm, deviceNames[i].alsaName, SND_PCM_STREAM_PLAYBACK, blocking ) >= 0 )
+        {
+            if( GropeDevice( pcm, &deviceInfo->minOutputChannels, &commonDeviceInfo->maxOutputChannels,
+                        &commonDeviceInfo->defaultLowOutputLatency, &commonDeviceInfo->defaultHighOutputLatency,
+                        &commonDeviceInfo->defaultSampleRate, deviceNames[i].isPlug ) != paNoError )
+                continue;   /* Error */
+        }
+
+        commonDeviceInfo->structVersion = 2;
+        commonDeviceInfo->hostApi = alsaApi->hostApiIndex;
+        commonDeviceInfo->name = deviceNames[i].name;
+        deviceInfo->alsaName = deviceNames[i].alsaName;
+        deviceInfo->isPlug = deviceNames[i].isPlug;
+
+        /* A: Storing pointer to PaAlsaDeviceInfo object as pointer to PaDeviceInfo object.
+         * Should now be safe to add device info, unless the device supports neither capture nor playback
+         */
+        if( commonDeviceInfo->maxInputChannels > 0 || commonDeviceInfo->maxOutputChannels > 0 )
+        {
+            if( commonApi->info.defaultInputDevice == paNoDevice && commonDeviceInfo->maxInputChannels > 0 )
+                commonApi->info.defaultInputDevice = devIdx;
+            if(  commonApi->info.defaultOutputDevice == paNoDevice && commonDeviceInfo->maxOutputChannels > 0 )
+                commonApi->info.defaultOutputDevice = devIdx;
+
+            commonApi->deviceInfos[devIdx++] = (PaDeviceInfo *) deviceInfo;
+        }
+    }
+    free( deviceNames );
+
+    commonApi->info.deviceCount = devIdx;   /* Number of successfully queried devices */
+
+end:
+    return result;
+
+error:
+    goto end;   /* No particular action */
+}
+
+/* Check against known device capabilities */
+static PaError ValidateParameters( const PaStreamParameters *parameters, PaUtilHostApiRepresentation *hostApi, StreamDirection mode )
+{
+    PaError result = paNoError;
+    int maxChans;
+    const PaAlsaDeviceInfo *deviceInfo = NULL;
+    assert( parameters );
+
+    if( parameters->device != paUseHostApiSpecificDeviceSpecification )
+    {
+        assert( parameters->device < hostApi->info.deviceCount );
+        PA_UNLESS( parameters->hostApiSpecificStreamInfo == NULL, paBadIODeviceCombination );
+        deviceInfo = GetDeviceInfo( hostApi, parameters->device );
+    }
+    else
+    {
+        const PaAlsaStreamInfo *streamInfo = parameters->hostApiSpecificStreamInfo;
+
+        PA_UNLESS( parameters->device == paUseHostApiSpecificDeviceSpecification, paInvalidDevice );
+        PA_UNLESS( streamInfo->size == sizeof (PaAlsaStreamInfo) && streamInfo->version == 1,
+                paIncompatibleHostApiSpecificStreamInfo );
+
+        return paNoError;   /* Skip further checking */
+    }
+
+    assert( deviceInfo );
+    assert( parameters->hostApiSpecificStreamInfo == NULL );
+    maxChans = (StreamDirection_In == mode ? deviceInfo->commonDeviceInfo.maxInputChannels :
+        deviceInfo->commonDeviceInfo.maxOutputChannels);
+    PA_UNLESS( parameters->channelCount <= maxChans, paInvalidChannelCount );
+
+error:
+    return result;
+}
+
+/* Given an open stream, what sample formats are available? */
+
+static PaSampleFormat GetAvailableFormats( snd_pcm_t *pcm )
+{
+    PaSampleFormat available = 0;
+    snd_pcm_hw_params_t *hwParams;
+    snd_pcm_hw_params_alloca( &hwParams );
+
+    snd_pcm_hw_params_any( pcm, hwParams );
+
+    if( snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_FLOAT ) >= 0)
+        available |= paFloat32;
+
+    if( snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S32 ) >= 0)
+        available |= paInt32;
+
+    if( snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S24 ) >= 0)
+        available |= paInt24;
+
+    if( snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S16 ) >= 0)
+        available |= paInt16;
+
+    if( snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_U8 ) >= 0)
+        available |= paUInt8;
+
+    if( snd_pcm_hw_params_test_format( pcm, hwParams, SND_PCM_FORMAT_S8 ) >= 0)
+        available |= paInt8;
+
+    return available;
+}
+
+static snd_pcm_format_t Pa2AlsaFormat( PaSampleFormat paFormat )
+{
+    switch( paFormat )
+    {
+        case paFloat32:
+            return SND_PCM_FORMAT_FLOAT;
+
+        case paInt16:
+            return SND_PCM_FORMAT_S16;
+
+        case paInt24:
+            return SND_PCM_FORMAT_S24;
+
+        case paInt32:
+            return SND_PCM_FORMAT_S32;
+
+        case paInt8:
+            return SND_PCM_FORMAT_S8;
+
+        case paUInt8:
+            return SND_PCM_FORMAT_U8;
+
+        default:
+            return SND_PCM_FORMAT_UNKNOWN;
+    }
+}
+
+/** Open an ALSA pcm handle.
+ * 
+ * The device to be open can be specified in a custom PaAlsaStreamInfo struct, or it will be a device number. In case of a
+ * device number, it maybe specified through an env variable (PA_ALSA_PLUGHW) that we should open the corresponding plugin
+ * device.
+ */
+static PaError AlsaOpen( const PaUtilHostApiRepresentation *hostApi, const PaStreamParameters *params, StreamDirection
+        streamDir, snd_pcm_t **pcm )
+{
+    PaError result = paNoError;
+    int ret;
+    const char *deviceName = alloca( 50 );
+    const PaAlsaDeviceInfo *deviceInfo = NULL;
+    PaAlsaStreamInfo *streamInfo = (PaAlsaStreamInfo *)params->hostApiSpecificStreamInfo;
+
+    if( !streamInfo )
+    {
+        int usePlug = 0;
+        deviceInfo = GetDeviceInfo( hostApi, params->device );
+        
+        /* If device name starts with hw: and PA_ALSA_PLUGHW is 1, we open the plughw device instead */
+        if( !strncmp( "hw:", deviceInfo->alsaName, 3 ) && getenv( "PA_ALSA_PLUGHW" ) )
+            usePlug = atoi( getenv( "PA_ALSA_PLUGHW" ) );
+        if( usePlug )
+            snprintf( (char *) deviceName, 50, "plug%s", deviceInfo->alsaName );
+        else
+            deviceName = deviceInfo->alsaName;
+    }
+    else
+        deviceName = streamInfo->deviceString;
+
+    if( (ret = snd_pcm_open( pcm, deviceName, streamDir == StreamDirection_In ? SND_PCM_STREAM_CAPTURE : SND_PCM_STREAM_PLAYBACK,
+                    SND_PCM_NONBLOCK )) < 0 )
+    {
+        *pcm = NULL;     /* Not to be closed */
+        ENSURE_( ret, ret == -EBUSY ? paDeviceUnavailable : paBadIODeviceCombination );
+    }
+    ENSURE_( snd_pcm_nonblock( *pcm, 0 ), paUnanticipatedHostError );
+
+end:
+    return result;
+
+error:
+    goto end;
+}
+
+static PaError TestParameters( const PaUtilHostApiRepresentation *hostApi, const PaStreamParameters *parameters,
+        double sampleRate, StreamDirection streamDir )
+{
+    PaError result = paNoError;
+    snd_pcm_t *pcm = NULL;
+    PaSampleFormat availableFormats;
+    /* We are able to adapt to a number of channels less than what the device supports */
+    unsigned int numHostChannels;
+    PaSampleFormat hostFormat;
+    snd_pcm_hw_params_t *hwParams;
+    snd_pcm_hw_params_alloca( &hwParams );
+    
+    if( !parameters->hostApiSpecificStreamInfo )
+    {
+        const PaAlsaDeviceInfo *devInfo = GetDeviceInfo( hostApi, parameters->device );
+        numHostChannels = PA_MAX( parameters->channelCount, StreamDirection_In == streamDir ?
+                devInfo->minInputChannels : devInfo->minOutputChannels );
+    }
+    else
+        numHostChannels = parameters->channelCount;
+
+    PA_ENSURE( AlsaOpen( hostApi, parameters, streamDir, &pcm ) );
+
+    snd_pcm_hw_params_any( pcm, hwParams );
+
+    if( SetApproximateSampleRate( pcm, hwParams, sampleRate ) < 0 )
+    {
+        result = paInvalidSampleRate;
+        goto error;
+    }
+
+    if( snd_pcm_hw_params_set_channels( pcm, hwParams, numHostChannels ) < 0 )
+    {
+        result = paInvalidChannelCount;
+        goto error;
+    }
+
+    /* See if we can find a best possible match */
+    availableFormats = GetAvailableFormats( pcm );
+    PA_ENSURE( hostFormat = PaUtil_SelectClosestAvailableFormat( availableFormats, parameters->sampleFormat ) );
+    ENSURE_( snd_pcm_hw_params_set_format( pcm, hwParams, Pa2AlsaFormat( hostFormat ) ), paUnanticipatedHostError );
+
+    ENSURE_( snd_pcm_hw_params( pcm, hwParams ), paUnanticipatedHostError );
+
+end:
+    if( pcm )
+        snd_pcm_close( pcm );
+    return result;
+
+error:
+    goto end;
+}
+
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate )
+{
+    int inputChannelCount = 0, outputChannelCount = 0;
+    PaSampleFormat inputSampleFormat, outputSampleFormat;
+    PaError result = paFormatIsSupported;
+
+    if( inputParameters )
+    {
+        PA_ENSURE( ValidateParameters( inputParameters, hostApi, StreamDirection_In ) );
+
+        inputChannelCount = inputParameters->channelCount;
+        inputSampleFormat = inputParameters->sampleFormat;
+    }
+
+    if( outputParameters )
+    {
+        PA_ENSURE( ValidateParameters( outputParameters, hostApi, StreamDirection_Out ) );
+
+        outputChannelCount = outputParameters->channelCount;
+        outputSampleFormat = outputParameters->sampleFormat;
+    }
+
+    if( inputChannelCount )
+    {
+        if( (result = TestParameters( hostApi, inputParameters, sampleRate, StreamDirection_In ))
+                != paNoError )
+            goto error;
+    }
+    if ( outputChannelCount )
+    {
+        if( (result = TestParameters( hostApi, outputParameters, sampleRate, StreamDirection_Out ))
+                != paNoError )
+            goto error;
+    }
+
+    return paFormatIsSupported;
+
+error:
+    return result;
+}
+
+static PaError PaAlsaStreamComponent_Initialize( PaAlsaStreamComponent *self, PaAlsaHostApiRepresentation *alsaApi,
+        const PaStreamParameters *params, StreamDirection streamDir, int callbackMode )
+{
+    PaError result = paNoError;
+    PaSampleFormat userSampleFormat = params->sampleFormat, hostSampleFormat;
+    assert( params->channelCount > 0 );
+
+    /* Make sure things have an initial value */
+    memset( self, 0, sizeof (PaAlsaStreamComponent) );
+
+    if( NULL == params->hostApiSpecificStreamInfo )
+    {
+        const PaAlsaDeviceInfo *devInfo = GetDeviceInfo( &alsaApi->commonHostApiRep, params->device );
+        self->numHostChannels = PA_MAX( params->channelCount, StreamDirection_In == streamDir ? devInfo->minInputChannels
+                : devInfo->minOutputChannels );
+    }
+    else
+    {
+        /* We're blissfully unaware of the minimum channelCount */
+        self->numHostChannels = params->channelCount;
+    }
+
+    PA_ENSURE( AlsaOpen( &alsaApi->commonHostApiRep, params, streamDir, &self->pcm ) );
+    self->nfds = snd_pcm_poll_descriptors_count( self->pcm );
+    hostSampleFormat = PaUtil_SelectClosestAvailableFormat( GetAvailableFormats( self->pcm ), userSampleFormat );
+
+    self->hostSampleFormat = hostSampleFormat;
+    self->nativeFormat = Pa2AlsaFormat( hostSampleFormat );
+    self->hostInterleaved = self->userInterleaved = !(userSampleFormat & paNonInterleaved);
+    self->numUserChannels = params->channelCount;
+    self->streamDir = streamDir;
+
+    if( !callbackMode && !self->userInterleaved )
+    {
+        /* Pre-allocate non-interleaved user provided buffers */
+        PA_UNLESS( self->userBuffers = PaUtil_AllocateMemory( sizeof (void *) * self->numUserChannels ),
+                paInsufficientMemory );
+    }
+
+error:
+    return result;
+}
+
+static void PaAlsaStreamComponent_Terminate( PaAlsaStreamComponent *self )
+{
+    snd_pcm_close( self->pcm );
+    if( self->userBuffers )
+        PaUtil_FreeMemory( self->userBuffers );
+}
+
+/** Configure the associated ALSA pcm.
+ *
+ */
+static PaError PaAlsaStreamComponent_Configure( PaAlsaStreamComponent *self, const PaStreamParameters *params, unsigned long
+        framesPerHostBuffer, int primeBuffers, int callbackMode, double *sampleRate, PaTime *returnedLatency )
+{
+    /*
+    int numPeriods;
+
+    if( getenv("PA_NUMPERIODS") != NULL )
+        numPeriods = atoi( getenv("PA_NUMPERIODS") );
+    else
+        numPeriods = ( (latency * sampleRate) / *framesPerBuffer ) + 1;
+
+    PA_DEBUG(( "latency: %f, rate: %f, framesPerBuffer: %d\n", latency, sampleRate, *framesPerBuffer ));
+    if( numPeriods <= 1 )
+        numPeriods = 2;
+    */
+
+    /* Configuration consists of setting all of ALSA's parameters.
+     * These parameters come in two flavors: hardware parameters
+     * and software paramters.  Hardware parameters will affect
+     * the way the device is initialized, software parameters
+     * affect the way ALSA interacts with me, the user-level client.
+     */
+
+    snd_pcm_hw_params_t *hwParams;
+    snd_pcm_sw_params_t *swParams;
+    PaError result = paNoError;
+    snd_pcm_access_t accessMode, alternateAccessMode;
+    unsigned int numPeriods, minPeriods = 2;
+    int dir = 0;
+    snd_pcm_t *pcm = self->pcm;
+    PaTime latency = params->suggestedLatency;
+    double sr = *sampleRate;
+    *returnedLatency = -1.;
+
+    snd_pcm_hw_params_alloca( &hwParams );
+    snd_pcm_sw_params_alloca( &swParams );
+
+    self->framesPerBuffer = framesPerHostBuffer;
+
+    /* ... fill up the configuration space with all possibile
+     * combinations of parameters this device will accept */
+    ENSURE_( snd_pcm_hw_params_any( pcm, hwParams ), paUnanticipatedHostError );
+
+    ENSURE_( snd_pcm_hw_params_set_periods_integer( pcm, hwParams ), paUnanticipatedHostError );
+    ENSURE_( snd_pcm_hw_params_set_period_size_integer( pcm, hwParams ), paUnanticipatedHostError );
+
+    if( self->userInterleaved )
+    {
+        accessMode = SND_PCM_ACCESS_MMAP_INTERLEAVED;
+        alternateAccessMode = SND_PCM_ACCESS_MMAP_NONINTERLEAVED;
+    }
+    else
+    {
+        accessMode = SND_PCM_ACCESS_MMAP_NONINTERLEAVED;
+        alternateAccessMode = SND_PCM_ACCESS_MMAP_INTERLEAVED;
+    }
+
+    /* If requested access mode fails, try alternate mode */
+    if( snd_pcm_hw_params_set_access( pcm, hwParams, accessMode ) < 0 )
+    {
+        ENSURE_( snd_pcm_hw_params_set_access( pcm, hwParams, alternateAccessMode ), paUnanticipatedHostError );
+        /* Flip mode */
+        self->hostInterleaved = !self->userInterleaved;
+    }
+
+    ENSURE_( snd_pcm_hw_params_set_format( pcm, hwParams, self->nativeFormat ), paUnanticipatedHostError );
+
+    ENSURE_( SetApproximateSampleRate( pcm, hwParams, sr ), paInvalidSampleRate );
+    ENSURE_( GetExactSampleRate( hwParams, &sr ), paUnanticipatedHostError );
+    /* reject if there's no sample rate within 1% of the one requested */
+    if( (fabs( *sampleRate - sr ) / *sampleRate) > 0.01 )
+    {
+        PA_DEBUG(("%s: Wanted %f, closest sample rate was %d\n", __FUNCTION__, sampleRate, sr ));                 
+        PA_ENSURE( paInvalidSampleRate );
+    }
+
+    ENSURE_( snd_pcm_hw_params_set_channels( pcm, hwParams, self->numHostChannels ), paInvalidChannelCount );
+
+    /* I think there should be at least 2 periods (even though ALSA doesn't appear to enforce this) */
+    dir = 0;
+    ENSURE_( snd_pcm_hw_params_set_periods_min( pcm, hwParams, &minPeriods, &dir ), paUnanticipatedHostError );
+    dir = 0;
+    ENSURE_( snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &self->framesPerBuffer, &dir ), paUnanticipatedHostError );
+    
+    /* Find an acceptable number of periods */
+    numPeriods = (latency * sr) / self->framesPerBuffer + 1;
+    dir = 0;
+    ENSURE_( snd_pcm_hw_params_set_periods_near( pcm, hwParams, &numPeriods, &dir ), paUnanticipatedHostError );
+    /* Minimum of periods should already be 2 */
+    PA_UNLESS( numPeriods >= 2, paInternalError );
+
+    /* Set the parameters! */
+    ENSURE_( snd_pcm_hw_params( pcm, hwParams ), paUnanticipatedHostError );
+    ENSURE_( snd_pcm_hw_params_get_buffer_size( hwParams, &self->bufferSize ), paUnanticipatedHostError );
+
+    /* Latency in seconds, one period is not counted as latency */
+    latency = (numPeriods - 1) * self->framesPerBuffer / sr;
+
+    /* Now software parameters... */
+    ENSURE_( snd_pcm_sw_params_current( pcm, swParams ), paUnanticipatedHostError );
+
+    ENSURE_( snd_pcm_sw_params_set_start_threshold( pcm, swParams, self->framesPerBuffer ), paUnanticipatedHostError );
+    ENSURE_( snd_pcm_sw_params_set_stop_threshold( pcm, swParams, self->bufferSize ), paUnanticipatedHostError );
+
+    /* Silence buffer in the case of underrun */
+    if( !primeBuffers ) /* XXX: Make sense? */
+    {
+        snd_pcm_uframes_t boundary;
+        ENSURE_( snd_pcm_sw_params_get_boundary( swParams, &boundary ), paUnanticipatedHostError );
+        ENSURE_( snd_pcm_sw_params_set_silence_threshold( pcm, swParams, 0 ), paUnanticipatedHostError );
+        ENSURE_( snd_pcm_sw_params_set_silence_size( pcm, swParams, boundary ), paUnanticipatedHostError );
+    }
+        
+    ENSURE_( snd_pcm_sw_params_set_avail_min( pcm, swParams, self->framesPerBuffer ), paUnanticipatedHostError );
+    ENSURE_( snd_pcm_sw_params_set_xfer_align( pcm, swParams, 1 ), paUnanticipatedHostError );
+    ENSURE_( snd_pcm_sw_params_set_tstamp_mode( pcm, swParams, SND_PCM_TSTAMP_MMAP ), paUnanticipatedHostError );
+
+    /* Set the parameters! */
+    ENSURE_( snd_pcm_sw_params( pcm, swParams ), paUnanticipatedHostError );
+
+    *sampleRate = sr;
+    *returnedLatency = latency;
+
+end:
+    return result;
+
+error:
+    goto end;   /* No particular action */
+}
+
+static PaError PaAlsaStream_Initialize( PaAlsaStream *self, PaAlsaHostApiRepresentation *alsaApi, const PaStreamParameters *inParams,
+        const PaStreamParameters *outParams, double sampleRate, unsigned long framesPerUserBuffer, PaStreamCallback callback,
+        PaStreamFlags streamFlags, void *userData )
+{
+    PaError result = paNoError;
+    assert( self );
+
+    memset( self, 0, sizeof (PaAlsaStream) );
+
+    if( NULL != callback )
+    {
+        PaUtil_InitializeStreamRepresentation( &self->streamRepresentation,
+                                               &alsaApi->callbackStreamInterface,
+                                               callback, userData );
+        self->callbackMode = 1;
+    }
+    else
+    {
+        PaUtil_InitializeStreamRepresentation( &self->streamRepresentation,
+                                               &alsaApi->blockingStreamInterface,
+                                               NULL, userData );
+    }
+
+    self->framesPerUserBuffer = framesPerUserBuffer;
+    self->neverDropInput = streamFlags & paNeverDropInput;
+    /* XXX: Ignore paPrimeOutputBuffersUsingStreamCallback untill buffer priming is fully supported in pa_process.c */
+    /*
+    if( outParams & streamFlags & paPrimeOutputBuffersUsingStreamCallback )
+        self->primeBuffers = 1;
+        */
+    memset( &self->capture, 0, sizeof (PaAlsaStreamComponent) );
+    memset( &self->playback, 0, sizeof (PaAlsaStreamComponent) );
+    if( inParams )
+        PA_ENSURE( PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback ) );
+    if( outParams )
+        PA_ENSURE( PaAlsaStreamComponent_Initialize( &self->playback, alsaApi, outParams, StreamDirection_Out, NULL != callback ) );
+
+    assert( self->capture.nfds || self->playback.nfds );
+
+    PA_UNLESS( self->pfds = (struct pollfd*)PaUtil_AllocateMemory( (self->capture.nfds +
+                    self->playback.nfds) * sizeof (struct pollfd) ), paInsufficientMemory );
+
+    PaUtil_InitializeCpuLoadMeasurer( &self->cpuLoadMeasurer, sampleRate );
+    InitializeThreading( &self->threading, &self->cpuLoadMeasurer );
+    ASSERT_CALL_( pthread_mutex_init( &self->stateMtx, NULL ), 0 );
+    ASSERT_CALL_( pthread_mutex_init( &self->startMtx, NULL ), 0 );
+    ASSERT_CALL_( pthread_cond_init( &self->startCond, NULL ), 0 );
+
+error:
+    return result;
+}
+
+/** Free resources associated with stream, and eventually stream itself.
+ *
+ * Frees allocated memory, and terminates individual StreamComponents.
+ */
+static void PaAlsaStream_Terminate( PaAlsaStream *self )
+{
+    assert( self );
+
+    if( self->capture.pcm )
+    {
+        PaAlsaStreamComponent_Terminate( &self->capture );
+    }
+    if( self->playback.pcm )
+    {
+        PaAlsaStreamComponent_Terminate( &self->playback );
+    }
+
+    PaUtil_FreeMemory( self->pfds );
+    ASSERT_CALL_( pthread_mutex_destroy( &self->stateMtx ), 0 );
+    ASSERT_CALL_( pthread_mutex_destroy( &self->startMtx ), 0 );
+    ASSERT_CALL_( pthread_cond_destroy( &self->startCond ), 0 );
+
+    PaUtil_FreeMemory( self );
+}
+
+/** Calculate polling timeout
+ *
+ * @param frames Time to wait
+ * @return Polling timeout in milliseconds
+ */
+static int CalculatePollTimeout( const PaAlsaStream *stream, unsigned long frames )
+{
+    assert( stream->streamRepresentation.streamInfo.sampleRate > 0.0 );
+    /* Period in msecs, rounded up */
+    return (int)ceil( 1000 * frames / stream->streamRepresentation.streamInfo.sampleRate );
+}
+
+/** Set up ALSA stream parameters.
+ *
+ */
+static PaError PaAlsaStream_Configure( PaAlsaStream *self, const PaStreamParameters *inParams, const PaStreamParameters
+        *outParams, double sampleRate, unsigned long framesPerHostBuffer, double *inputLatency, double *outputLatency,
+        unsigned long *maxHostBufferSize )
+{
+    PaError result = paNoError;
+    double realSr = sampleRate;
+
+    if( self->capture.pcm )
+        PA_ENSURE( PaAlsaStreamComponent_Configure( &self->capture, inParams, framesPerHostBuffer, self->primeBuffers,
+                    self->callbackMode, &realSr, inputLatency ) );
+    if( self->playback.pcm )
+        PA_ENSURE( PaAlsaStreamComponent_Configure( &self->playback, outParams, framesPerHostBuffer, self->primeBuffers,
+                    self->callbackMode, &realSr, outputLatency ) );
+
+    /* Should be exact now */
+    self->streamRepresentation.streamInfo.sampleRate = realSr;
+
+    /* this will cause the two streams to automatically start/stop/prepare in sync.
+     * We only need to execute these operations on one of the pair.
+     * A: We don't want to do this on a blocking stream.
+     */
+    if( self->callbackMode && self->capture.pcm && self->playback.pcm )
+    {
+        int err = snd_pcm_link( self->capture.pcm, self->playback.pcm );
+        if( err >= 0 )
+            self->pcmsSynced = 1;
+        else
+            PA_DEBUG(( "%s: Unable to sync pcms: %s\n", __FUNCTION__, snd_strerror( err ) ));
+    }
+
+    /* Frames per host buffer for the stream is set as a compromise between the two directions */
+    framesPerHostBuffer = PA_MIN( self->capture.pcm ? self->capture.framesPerBuffer : ULONG_MAX,
+            self->playback.pcm ? self->playback.framesPerBuffer : ULONG_MAX );
+    self->pollTimeout = CalculatePollTimeout( self, framesPerHostBuffer );    /* Period in msecs, rounded up */
+
+    *maxHostBufferSize = PA_MAX( self->capture.pcm ? self->capture.bufferSize : 0,
+            self->playback.pcm ? self->playback.bufferSize : 0 );
+
+    /* Time before watchdog unthrottles realtime thread == 1/4 of period time in msecs */
+    self->threading.throttledSleepTime = (unsigned long) (framesPerHostBuffer / sampleRate / 4 * 1000);
+
+    if( self->callbackMode )
+    {
+        /* If the user expects a certain number of frames per callback we will either have to rely on block adaption
+         * (framesPerHostBuffer is not an integer multiple of framesPerBuffer) or we can simply align the number
+         * of host buffer frames with what the user specified */
+        if( self->framesPerUserBuffer != paFramesPerBufferUnspecified )
+        {
+            /* self->alignFrames = 1; */
+
+            /* Unless the ratio between number of host and user buffer frames is an integer we will have to rely
+             * on block adaption */
+        /*
+            if( framesPerHostBuffer % framesPerBuffer != 0 || (self->capture.pcm && self->playback.pcm &&
+                        self->capture.framesPerBuffer != self->playback.framesPerBuffer) )
+                self->useBlockAdaption = 1;
+            else
+                self->alignFrames = 1;
+        */
+        }
+    }
+
+error:
+    return result;
+}
+
+/* We need to determine how many frames per host buffer to use.  Our
+ * goals are to provide the best possible performance, but also to
+ * most closely honor the requested latency settings.  Therefore this
+ * decision is based on:
+ *
+ *   - the period sizes that playback and/or capture support.  The
+ *     host buffer size has to be one of these.
+ *   - the number of periods that playback and/or capture support.
+ *
+ * We want to make period_size*(num_periods-1) to be as close as possible
+ * to latency*rate for both playback and capture.
+ *
+ * This is one of those blocks of code that will just take a lot of
+ * refinement to be any good.
+ *
+ * In the full-duplex case it is possible that the routine was unable
+ * to find a number of frames per buffer acceptable to both devices
+ * TODO: Implement an algorithm to find the value closest to acceptance
+ * by both devices, to minimize difference between period sizes?
+ */
+static PaError DetermineFramesPerBuffer( const PaAlsaStream *stream, double sampleRate, const PaStreamParameters *inputParameters,
+        const PaStreamParameters *outputParameters, unsigned long *determinedFrames, const PaUtilHostApiRepresentation *hostApi )
+{
+    PaError result = paNoError;
+    unsigned long framesPerBuffer = 0;
+    int numHostInputChannels = 0, numHostOutputChannels = 0;
+
+    /* XXX: Clean this up */
+    if( stream->capture.pcm )
+    {
+        const PaAlsaDeviceInfo *devInfo = GetDeviceInfo( hostApi, inputParameters->device );
+        numHostInputChannels = PA_MAX( inputParameters->channelCount, devInfo->minInputChannels );
+    }
+    if( stream->playback.pcm )
+    {
+        const PaAlsaDeviceInfo *devInfo = GetDeviceInfo( hostApi, outputParameters->device );
+        numHostOutputChannels = PA_MAX( outputParameters->channelCount, devInfo->minOutputChannels );
+    }
+
+    if( stream->capture.pcm && stream->playback.pcm )
+    {
+        snd_pcm_uframes_t desiredLatency, e;
+        snd_pcm_uframes_t minPeriodSize, minPlayback, minCapture, maxPeriodSize, maxPlayback, maxCapture,
+                          optimalPeriodSize, periodSize;
+        int dir = 0;
+        unsigned int minPeriods = 2;
+
+        snd_pcm_t *pcm;
+        snd_pcm_hw_params_t *hwParamsPlayback, *hwParamsCapture;
+
+        snd_pcm_hw_params_alloca( &hwParamsPlayback );
+        snd_pcm_hw_params_alloca( &hwParamsCapture );
+
+        /* Come up with a common desired latency */
+        pcm = stream->playback.pcm;
+        snd_pcm_hw_params_any( pcm, hwParamsPlayback );
+        ENSURE_( SetApproximateSampleRate( pcm, hwParamsPlayback, sampleRate ), paInvalidSampleRate );
+        ENSURE_( snd_pcm_hw_params_set_channels( pcm, hwParamsPlayback, numHostOutputChannels ),
+                paBadIODeviceCombination );
+
+        ENSURE_( snd_pcm_hw_params_set_period_size_integer( pcm, hwParamsPlayback ), paUnanticipatedHostError );
+        ENSURE_( snd_pcm_hw_params_set_periods_integer( pcm, hwParamsPlayback ), paUnanticipatedHostError );
+        ENSURE_( snd_pcm_hw_params_set_periods_min( pcm, hwParamsPlayback, &minPeriods, &dir ), paUnanticipatedHostError );
+        ENSURE_( snd_pcm_hw_params_get_period_size_min( hwParamsPlayback, &minPlayback, &dir ), paUnanticipatedHostError );
+        ENSURE_( snd_pcm_hw_params_get_period_size_max( hwParamsPlayback, &maxPlayback, &dir ), paUnanticipatedHostError );
+
+        pcm = stream->capture.pcm;
+        ENSURE_( snd_pcm_hw_params_any( pcm, hwParamsCapture ), paUnanticipatedHostError );
+        ENSURE_( SetApproximateSampleRate( pcm, hwParamsCapture, sampleRate ), paBadIODeviceCombination );
+        ENSURE_( snd_pcm_hw_params_set_channels( pcm, hwParamsCapture, numHostInputChannels ),
+                paBadIODeviceCombination );
+
+        ENSURE_( snd_pcm_hw_params_set_period_size_integer( pcm, hwParamsCapture ), paUnanticipatedHostError );
+        ENSURE_( snd_pcm_hw_params_set_periods_integer( pcm, hwParamsCapture ), paUnanticipatedHostError );
+        ENSURE_( snd_pcm_hw_params_set_periods_min( pcm, hwParamsCapture, &minPeriods, &dir ), paUnanticipatedHostError );
+        ENSURE_( snd_pcm_hw_params_get_period_size_min( hwParamsCapture, &minCapture, &dir ), paUnanticipatedHostError );
+        ENSURE_( snd_pcm_hw_params_get_period_size_max( hwParamsCapture, &maxCapture, &dir ), paUnanticipatedHostError );
+
+        minPeriodSize = PA_MAX( minPlayback, minCapture );
+        maxPeriodSize = PA_MIN( maxPlayback, maxCapture );
+
+        desiredLatency = (snd_pcm_uframes_t) (PA_MIN( outputParameters->suggestedLatency, inputParameters->suggestedLatency )
+                * sampleRate);
+        /* Clamp desiredLatency */
+        {
+            snd_pcm_uframes_t tmp, maxBufferSize = ULONG_MAX;
+            ENSURE_( snd_pcm_hw_params_get_buffer_size_max( hwParamsPlayback, &maxBufferSize ), paUnanticipatedHostError );
+            ENSURE_( snd_pcm_hw_params_get_buffer_size_max( hwParamsCapture, &tmp ), paUnanticipatedHostError );
+            maxBufferSize = PA_MIN( maxBufferSize, tmp );
+
+            desiredLatency = PA_MIN( desiredLatency, maxBufferSize );
+        }
+
+        /* Find the closest power of 2 */
+        e = ilogb( minPeriodSize );
+        if( minPeriodSize & (minPeriodSize - 1) )
+            e += 1;
+        periodSize = (snd_pcm_uframes_t) pow( 2, e );
+
+        while( periodSize <= maxPeriodSize )
+        {
+            if( snd_pcm_hw_params_test_period_size( stream->playback.pcm, hwParamsPlayback, periodSize, 0 ) >= 0 &&
+                    snd_pcm_hw_params_test_period_size( stream->capture.pcm, hwParamsCapture, periodSize, 0 ) >= 0 )
+                break;  /* Ok! */
+
+            periodSize *= 2;
+        }
+
+        /* 4 periods considered optimal */
+        optimalPeriodSize = PA_MAX( desiredLatency / 4, minPeriodSize );
+        optimalPeriodSize = PA_MIN( optimalPeriodSize, maxPeriodSize );
+
+        /* Find the closest power of 2 */
+        e = ilogb( optimalPeriodSize );
+        if( optimalPeriodSize & (optimalPeriodSize - 1) )
+            e += 1;
+        optimalPeriodSize = (snd_pcm_uframes_t) pow( 2, e );
+
+        while( optimalPeriodSize >= periodSize )
+        {
+            pcm = stream->playback.pcm;
+            if( snd_pcm_hw_params_test_period_size( pcm, hwParamsPlayback, optimalPeriodSize, 0 ) < 0 )
+                continue;
+
+            pcm = stream->capture.pcm;
+            if( snd_pcm_hw_params_test_period_size( pcm, hwParamsCapture, optimalPeriodSize, 0 ) >= 0 )
+                break;
+
+            optimalPeriodSize /= 2;
+        }
+
+        if( optimalPeriodSize > periodSize )
+            periodSize = optimalPeriodSize;
+
+        if( periodSize <= maxPeriodSize )
+        {
+            /* Looks good */
+            framesPerBuffer = periodSize;
+        }
+        else
+        {
+            /* Unable to find a common period size, oh well */
+            optimalPeriodSize = PA_MAX( desiredLatency / 4, minPeriodSize );
+            optimalPeriodSize = PA_MIN( optimalPeriodSize, maxPeriodSize );
+
+            /* ConfigureStream should find individual period sizes acceptable for each device */
+            framesPerBuffer = optimalPeriodSize;
+            /* PA_ENSURE( paBadIODeviceCombination ); */
+        }
+    }
+    else    /* half-duplex is a slightly simpler case */
+    {
+        unsigned long bufferSize, channels;
+        snd_pcm_t *pcm;
+        snd_pcm_hw_params_t *hwParams;
+
+        snd_pcm_hw_params_alloca( &hwParams );
+
+        if( stream->capture.pcm )
+        {
+            pcm = stream->capture.pcm;
+            bufferSize = inputParameters->suggestedLatency * sampleRate;
+            channels = numHostInputChannels;
+        }
+        else
+        {
+            pcm = stream->playback.pcm;
+            bufferSize = outputParameters->suggestedLatency * sampleRate;
+            channels = numHostOutputChannels;
+        }
+
+        ENSURE_( snd_pcm_hw_params_any( pcm, hwParams ), paUnanticipatedHostError );
+        ENSURE_( SetApproximateSampleRate( pcm, hwParams, sampleRate ), paInvalidSampleRate );
+        ENSURE_( snd_pcm_hw_params_set_channels( pcm, hwParams, channels ), paBadIODeviceCombination );
+
+        ENSURE_( snd_pcm_hw_params_set_period_size_integer( pcm, hwParams ), paUnanticipatedHostError );
+        ENSURE_( snd_pcm_hw_params_set_periods_integer( pcm, hwParams ), paUnanticipatedHostError );
+
+        /* Using 5 as a base number of periods, we try to approximate the suggested latency (+1 period),
+           finding a combination of period/buffer size which best fits these constraints */
+        framesPerBuffer = bufferSize / 4;
+        bufferSize += framesPerBuffer;   /* One period doesn't count as latency */
+        ENSURE_( snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &bufferSize ), paUnanticipatedHostError );
+        ENSURE_( snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &framesPerBuffer, NULL ), paUnanticipatedHostError );
+    }
+
+    PA_UNLESS( framesPerBuffer != 0, paInternalError );
+    *determinedFrames = framesPerBuffer;
+
+error:
+    return result;
+}
+
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** s,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *callback,
+                           void *userData )
+{
+    PaError result = paNoError;
+    PaAlsaHostApiRepresentation *alsaHostApi = (PaAlsaHostApiRepresentation*)hostApi;
+    PaAlsaStream *stream = NULL;
+    PaSampleFormat hostInputSampleFormat = 0, hostOutputSampleFormat = 0;
+    PaSampleFormat inputSampleFormat = 0, outputSampleFormat = 0;
+    int numInputChannels = 0, numOutputChannels = 0;
+    PaTime inputLatency, outputLatency;
+    unsigned long framesPerHostBuffer;
+    PaUtilHostBufferSizeMode hostBufferSizeMode = paUtilBoundedHostBufferSize;
+    unsigned long maxHostBufferSize=0;    /* Upper bound of host buffer size */
+
+    if( (streamFlags & paPlatformSpecificFlags) != 0 )
+        return paInvalidFlag;
+
+    if( inputParameters )
+    {
+        PA_ENSURE( ValidateParameters( inputParameters, hostApi, StreamDirection_In ) );
+
+        numInputChannels = inputParameters->channelCount;
+        inputSampleFormat = inputParameters->sampleFormat;
+    }
+    if( outputParameters )
+    {
+        PA_ENSURE( ValidateParameters( outputParameters, hostApi, StreamDirection_Out ) );
+
+        numOutputChannels = outputParameters->channelCount;
+        outputSampleFormat = outputParameters->sampleFormat;
+    }
+
+    /* XXX: Why do we support this anyway? */
+    if( framesPerBuffer == paFramesPerBufferUnspecified && getenv( "PA_ALSA_PERIODSIZE" ) != NULL )
+    {
+        PA_DEBUG(( "%s: Getting framesPerBuffer from environment\n", __FUNCTION__ ));
+        framesPerBuffer = atoi( getenv("PA_ALSA_PERIODSIZE") );
+    }
+    framesPerHostBuffer = framesPerBuffer;
+
+    PA_UNLESS( stream = (PaAlsaStream*)PaUtil_AllocateMemory( sizeof(PaAlsaStream) ), paInsufficientMemory );
+    PA_ENSURE( PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate,
+                framesPerBuffer, callback, streamFlags, userData ) );
+
+    /* If the number of frames per buffer is unspecified, we have to come up with
+     * one. This is both a blessing and a curse: a blessing because we can optimize
+     * the number to best meet the requirements, but a curse because that's really
+     * hard to do well. For this reason we also support an interface where the user
+     * specifies these by setting environment variables. */
+    if( framesPerBuffer == paFramesPerBufferUnspecified )
+    {
+        PA_ENSURE( DetermineFramesPerBuffer( stream, sampleRate, inputParameters, outputParameters, &framesPerHostBuffer,
+                    hostApi ) );
+    }
+
+    PA_ENSURE( PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerHostBuffer,
+                &inputLatency, &outputLatency, &maxHostBufferSize ) );
+    hostInputSampleFormat = stream->capture.hostSampleFormat;
+    hostOutputSampleFormat = stream->playback.hostSampleFormat;
+
+    if( framesPerHostBuffer != framesPerBuffer )
+    {
+        PA_DEBUG(( "%s: Number of frames per user and host buffer differs\n", __FUNCTION__ ));
+    }
+
+    PA_ENSURE( PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,
+                    numInputChannels, inputSampleFormat, hostInputSampleFormat,
+                    numOutputChannels, outputSampleFormat, hostOutputSampleFormat,
+                    sampleRate, streamFlags, framesPerBuffer, maxHostBufferSize,
+                    hostBufferSizeMode, callback, userData ) );
+
+    /* Ok, buffer processor is initialized, now we can deduce it's latency */
+    if( numInputChannels > 0 )
+        stream->streamRepresentation.streamInfo.inputLatency = inputLatency + PaUtil_GetBufferProcessorInputLatency(
+                &stream->bufferProcessor );
+    if( numOutputChannels > 0 )
+        stream->streamRepresentation.streamInfo.outputLatency = outputLatency + PaUtil_GetBufferProcessorOutputLatency(
+                &stream->bufferProcessor );
+
+    *s = (PaStream*)stream;
+
+    return result;
+
+error:
+    if( stream )
+        PaAlsaStream_Terminate( stream );
+
+    return result;
+}
+
+static PaError CloseStream( PaStream* s )
+{
+    PaError result = paNoError;
+    PaAlsaStream *stream = (PaAlsaStream*)s;
+
+    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
+    PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );
+
+    PaAlsaStream_Terminate( stream );
+
+    return result;
+}
+
+static void SilenceBuffer( PaAlsaStream *stream )
+{
+    const snd_pcm_channel_area_t *areas;
+    snd_pcm_uframes_t frames = (snd_pcm_uframes_t)snd_pcm_avail_update( stream->playback.pcm ), offset;
+
+    snd_pcm_mmap_begin( stream->playback.pcm, &areas, &offset, &frames );
+    snd_pcm_areas_silence( areas, offset, stream->playback.numHostChannels, frames, stream->playback.nativeFormat );
+    snd_pcm_mmap_commit( stream->playback.pcm, offset, frames );
+}
+
+/** Start/prepare pcm(s) for streaming.
+ *
+ * Depending on wether the stream is in callback or blocking mode, we will respectively start or simply
+ * prepare the playback pcm. If the buffer has _not_ been primed, we will in callback mode prepare and
+ * silence the buffer before starting playback. In blocking mode we simply prepare, as the playback will
+ * be started automatically as the user writes to output. 
+ *
+ * The capture pcm, however, will simply be prepared and started.
+ *
+ * PaAlsaStream::startMtx makes sure access is synchronized (useful in callback mode)
+ */
+static PaError AlsaStart( PaAlsaStream *stream, int priming )
+{
+    PaError result = paNoError;
+
+    if( stream->playback.pcm )
+    {
+        if( stream->callbackMode )
+        {
+            if( !priming )
+            {
+                /* Buffer isn't primed, so prepare and silence */
+                ENSURE_( snd_pcm_prepare( stream->playback.pcm ), paUnanticipatedHostError );
+                SilenceBuffer( stream );
+            }
+            ENSURE_( snd_pcm_start( stream->playback.pcm ), paUnanticipatedHostError );
+        }
+        else
+            ENSURE_( snd_pcm_prepare( stream->playback.pcm ), paUnanticipatedHostError );
+    }
+    if( stream->capture.pcm && !stream->pcmsSynced )
+    {
+        ENSURE_( snd_pcm_prepare( stream->capture.pcm ), paUnanticipatedHostError );
+        /* For a blocking stream we want to start capture as well, since nothing will happen otherwise */
+        ENSURE_( snd_pcm_start( stream->capture.pcm ), paUnanticipatedHostError );
+    }
+
+end:
+    return result;
+error:
+    goto end;
+}
+
+/** Utility function for determining if pcms are in running state.
+ *
+ */
+static int IsRunning( PaAlsaStream *stream )
+{
+    int result = 0;
+
+    ASSERT_CALL_( pthread_mutex_lock( &stream->stateMtx ), 0 ); /* Synchronize access to pcm state */
+    if( stream->capture.pcm )
+    {
+        snd_pcm_state_t capture_state = snd_pcm_state( stream->capture.pcm );
+
+        if( capture_state == SND_PCM_STATE_RUNNING || capture_state == SND_PCM_STATE_XRUN
+                || capture_state == SND_PCM_STATE_DRAINING )
+        {
+            result = 1;
+            goto end;
+        }
+    }
+
+    if( stream->playback.pcm )
+    {
+        snd_pcm_state_t playback_state = snd_pcm_state( stream->playback.pcm );
+
+        if( playback_state == SND_PCM_STATE_RUNNING || playback_state == SND_PCM_STATE_XRUN
+                || playback_state == SND_PCM_STATE_DRAINING )
+        {
+            result = 1;
+            goto end;
+        }
+    }
+
+end:
+    ASSERT_CALL_( pthread_mutex_unlock( &stream->stateMtx ), 0 );
+
+    return result;
+}
+
+static PaError StartStream( PaStream *s )
+{
+    PaError result = paNoError;
+    PaAlsaStream *stream = (PaAlsaStream*)s;
+    int streamStarted = 0;  /* So we can know wether we need to take the stream down */
+
+    /* Ready the processor */
+    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );
+
+    /* Set now, so we can test for activity further down */
+    stream->isActive = 1;
+
+    if( stream->callbackMode )
+    {
+        int res = 0;
+        PaTime pt = PaUtil_GetTime();
+        struct timespec ts;
+
+        PA_ENSURE( CreateCallbackThread( &stream->threading, &CallbackThreadFunc, stream ) );
+        streamStarted = 1;
+
+        /* Wait for stream to be started */
+        ts.tv_sec = (time_t) floor( pt + 1 );
+        ts.tv_nsec = (long) ((pt - floor( pt )) * 1000000000);
+
+        /* Since we'll be holding a lock on the startMtx (when not waiting on the condition), IsRunning won't be checking
+         * stream state at the same time as the callback thread affects it. We also check IsStreamActive, in the unlikely
+         * case the callback thread exits in the meantime (the stream will be considered inactive after the thread exits) */
+        ASSERT_CALL_( pthread_mutex_lock( &stream->startMtx ), 0 );
+
+        /* Due to possible spurious wakeups, we enclose in a loop */
+        while( !IsRunning( stream ) && IsStreamActive( s ) && !res )
+        {
+            res = pthread_cond_timedwait( &stream->startCond, &stream->startMtx, &ts );
+        }
+        ASSERT_CALL_( pthread_mutex_unlock( &stream->startMtx ), 0 );
+
+        PA_UNLESS( !res || res == ETIMEDOUT, paInternalError );
+        PA_DEBUG(( "%s: Waited for %g seconds for stream to start\n", __FUNCTION__, PaUtil_GetTime() - pt ));
+
+        if( res == ETIMEDOUT )
+        {
+            PA_ENSURE( paTimedOut );
+        }
+    }
+    else
+    {
+        PA_ENSURE( AlsaStart( stream, 0 ) );
+        streamStarted = 1;
+    }
+
+end:
+    return result;
+error:
+    if( streamStarted )
+        AbortStream( stream );
+    stream->isActive = 0;
+    
+    goto end;
+}
+
+static PaError AlsaStop( PaAlsaStream *stream, int abort )
+{
+    PaError result = paNoError;
+
+    if( abort )
+    {
+        if( stream->playback.pcm )
+            ENSURE_( snd_pcm_drop( stream->playback.pcm ), paUnanticipatedHostError );
+        if( stream->capture.pcm && !stream->pcmsSynced )
+            ENSURE_( snd_pcm_drop( stream->capture.pcm ), paUnanticipatedHostError );
+
+        PA_DEBUG(( "Dropped frames\n" ));
+    }
+    else
+    {
+        if( stream->playback.pcm )
+            ENSURE_( snd_pcm_drain( stream->playback.pcm ), paUnanticipatedHostError );
+        if( stream->capture.pcm && !stream->pcmsSynced )
+            ENSURE_( snd_pcm_drain( stream->capture.pcm ), paUnanticipatedHostError );
+    }
+
+end:
+    return result;
+error:
+    goto end;
+}
+
+/** Stop or abort stream.
+ *
+ * If a stream is in callback mode we will have to inspect wether the background thread has
+ * finished, or we will have to take it out. In either case we join the thread before
+ * returning. In blocking mode, we simply tell ALSA to stop abruptly (abort) or finish
+ * buffers (drain)
+ *
+ * Stream will be considered inactive (!PaAlsaStream::isActive) after a call to this function
+ */
+static PaError RealStop( PaAlsaStream *stream, int abort )
+{
+    PaError result = paNoError;
+
+    /* First deal with the callback thread, cancelling and/or joining
+     * it if necessary
+     */
+    if( stream->callbackMode )
+    {
+        PaError threadRes, watchdogRes;
+        stream->callbackAbort = abort;
+
+        if( !abort )
+        {
+            PA_DEBUG(( "Stopping callback\n" ));
+            stream->callbackStop = 1;
+        }
+        PA_ENSURE( KillCallbackThread( &stream->threading, !abort, &threadRes, &watchdogRes ) );
+        if( threadRes != paNoError )
+            PA_DEBUG(( "Callback thread returned: %d\n", threadRes ));
+        if( watchdogRes != paNoError )
+            PA_DEBUG(( "Watchdog thread returned: %d\n", watchdogRes ));
+
+        stream->callbackStop = 0;   /* The deed is done */
+        stream->callback_finished = 0;
+    }
+    else
+    {
+        PA_ENSURE( AlsaStop( stream, abort ) );
+    }
+
+    stream->isActive = 0;
+
+end:
+    return result;
+
+error:
+    goto end;
+}
+
+static PaError StopStream( PaStream *s )
+{
+    return RealStop( (PaAlsaStream *) s, 0 );
+}
+
+static PaError AbortStream( PaStream *s )
+{
+    return RealStop( (PaAlsaStream * ) s, 1 );
+}
+
+/** The stream is considered stopped before StartStream, or AFTER a call to Abort/StopStream (callback
+ * returning !paContinue is not considered)
+ *
+ */
+static PaError IsStreamStopped( PaStream *s )
+{
+    PaAlsaStream *stream = (PaAlsaStream *)s;
+
+    /* callback_finished indicates we need to join callback thread (ie. in Abort/StopStream) */
+    return !IsStreamActive( s ) && !stream->callback_finished;
+}
+
+static PaError IsStreamActive( PaStream *s )
+{
+    PaAlsaStream *stream = (PaAlsaStream*)s;
+    return stream->isActive;
+}
+
+static PaTime GetStreamTime( PaStream *s )
+{
+    PaAlsaStream *stream = (PaAlsaStream*)s;
+
+    snd_timestamp_t timestamp;
+    snd_pcm_status_t *status;
+    snd_pcm_status_alloca( &status );
+
+    /* TODO: what if we have both?  does it really matter? */
+
+    /* TODO: if running in callback mode, this will mean
+     * libasound routines are being called from multiple threads.
+     * need to verify that libasound is thread-safe. */
+
+    if( stream->capture.pcm )
+    {
+        snd_pcm_status( stream->capture.pcm, status );
+    }
+    else if( stream->playback.pcm )
+    {
+        snd_pcm_status( stream->playback.pcm, status );
+    }
+
+    snd_pcm_status_get_tstamp( status, &timestamp );
+    return timestamp.tv_sec + (PaTime)timestamp.tv_usec / 1000000.0;
+}
+
+static double GetStreamCpuLoad( PaStream* s )
+{
+    PaAlsaStream *stream = (PaAlsaStream*)s;
+
+    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );
+}
+
+static int SetApproximateSampleRate( snd_pcm_t *pcm, snd_pcm_hw_params_t *hwParams, double sampleRate )
+{
+    unsigned long approx = (unsigned long) sampleRate;
+    int dir = 0;
+    double fraction = sampleRate - approx;
+
+    assert( pcm && hwParams );
+
+    if( fraction > 0.0 )
+    {
+        if( fraction > 0.5 )
+        {
+            ++approx;
+            dir = -1;
+        }
+        else
+            dir = 1;
+    }
+
+    return snd_pcm_hw_params_set_rate( pcm, hwParams, approx, dir );
+}
+
+/* Return exact sample rate in param sampleRate */
+static int GetExactSampleRate( snd_pcm_hw_params_t *hwParams, double *sampleRate )
+{
+    unsigned int num, den;
+    int err; 
+
+    assert( hwParams );
+
+    err = snd_pcm_hw_params_get_rate_numden( hwParams, &num, &den );
+    *sampleRate = (double) num / den;
+
+    return err;
+}
+
+/* Utility functions for blocking/callback interfaces */
+
+/* Atomic restart of stream (we don't want the intermediate state visible) */
+static PaError AlsaRestart( PaAlsaStream *stream )
+{
+    PaError result = paNoError;
+
+    ASSERT_CALL_( pthread_mutex_lock( &stream->stateMtx ), 0 );
+    PA_ENSURE( AlsaStop( stream, 0 ) );
+    PA_ENSURE( AlsaStart( stream, 0 ) );
+
+    PA_DEBUG(( "%s: Restarted audio\n", __FUNCTION__ ));
+
+error:
+    ASSERT_CALL_( pthread_mutex_unlock( &stream->stateMtx ), 0 );
+    return result;
+}
+
+/** Recover from xrun state.
+ *
+ */
+static PaError PaAlsaStream_HandleXrun( PaAlsaStream *self )
+{
+    PaError result = paNoError;
+    snd_pcm_status_t *st;
+    PaTime now = PaUtil_GetTime();
+    snd_timestamp_t t;
+
+    snd_pcm_status_alloca( &st );
+
+    if( self->playback.pcm )
+    {
+        snd_pcm_status( self->playback.pcm, st );
+        if( snd_pcm_status_get_state( st ) == SND_PCM_STATE_XRUN )
+        {
+            snd_pcm_status_get_trigger_tstamp( st, &t );
+            self->underrun = now * 1000 - ((PaTime) t.tv_sec * 1000 + (PaTime) t.tv_usec / 1000);
+        }
+    }
+    if( self->capture.pcm )
+    {
+        snd_pcm_status( self->capture.pcm, st );
+        if( snd_pcm_status_get_state( st ) == SND_PCM_STATE_XRUN )
+        {
+            snd_pcm_status_get_trigger_tstamp( st, &t );
+            self->overrun = now * 1000 - ((PaTime) t.tv_sec * 1000 + (PaTime) t.tv_usec / 1000);
+        }
+    }
+
+    PA_ENSURE( AlsaRestart( self ) );
+
+end:
+    return result;
+error:
+    goto end;
+}
+
+/** Decide if we should continue polling for specified direction, eventually adjust the poll timeout.
+ * 
+ */
+static PaError ContinuePoll( const PaAlsaStream *stream, StreamDirection streamDir, int *pollTimeout, int *continuePoll )
+{
+    PaError result = paNoError;
+    snd_pcm_sframes_t delay, margin;
+    int err;
+    const PaAlsaStreamComponent *component = NULL, *otherComponent = NULL;
+
+    *continuePoll = 1;
+
+    if( StreamDirection_In == streamDir )
+    {
+        component = &stream->capture;
+        otherComponent = &stream->playback;
+    }
+    else
+    {
+        component = &stream->playback;
+        otherComponent = &stream->capture;
+    }
+
+    /* ALSA docs say that negative delay should indicate xrun, but in my experience snd_pcm_delay returns -EPIPE */
+    if( (err = snd_pcm_delay( otherComponent->pcm, &delay )) < 0 )
+    {
+        if( err == -EPIPE )
+        {
+            /* Xrun */
+            *continuePoll = 0;
+            goto error;
+        }
+
+        ENSURE_( err, paUnanticipatedHostError );
+    }
+
+    if( StreamDirection_Out == streamDir )
+    {
+        /* Number of eligible frames before capture overrun */
+        delay = otherComponent->bufferSize - delay;
+    }
+    margin = delay - otherComponent->framesPerBuffer / 2;
+
+    if( margin < 0 )
+    {
+        PA_DEBUG(( "%s: Stopping poll for %s\n", __FUNCTION__, StreamDirection_In == streamDir ? "capture" : "playback" ));
+        *continuePoll = 0;
+    }
+    else if( margin < otherComponent->framesPerBuffer )
+    {
+        *pollTimeout = CalculatePollTimeout( stream, margin );
+        PA_DEBUG(( "%s: Trying to poll again for %s frames, pollTimeout: %d\n",
+                    __FUNCTION__, StreamDirection_In == streamDir ? "capture" : "playback", *pollTimeout ));
+    }
+
+error:
+    return result;
+}
+
+/* Callback interface */
+
+static void OnExit( void *data )
+{
+    PaAlsaStream *stream = (PaAlsaStream *) data;
+
+    assert( data );
+
+    PaUtil_ResetCpuLoadMeasurer( &stream->cpuLoadMeasurer );
+
+    stream->callback_finished = 1;  /* Let the outside world know stream was stopped in callback */
+    AlsaStop( stream, stream->callbackAbort );
+    stream->callbackAbort = 0;      /* Clear state */
+    
+    PA_DEBUG(( "OnExit: Stoppage\n" ));
+
+    /* Eventually notify user all buffers have played */
+    if( stream->streamRepresentation.streamFinishedCallback )
+        stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );
+    stream->isActive = 0;
+}
+
+static void CalculateTimeInfo( PaAlsaStream *stream, PaStreamCallbackTimeInfo *timeInfo )
+{
+    snd_pcm_status_t *capture_status, *playback_status;
+    snd_timestamp_t capture_timestamp, playback_timestamp;
+    PaTime capture_time = 0., playback_time = 0.;
+
+    snd_pcm_status_alloca( &capture_status );
+    snd_pcm_status_alloca( &playback_status );
+
+    if( stream->capture.pcm )
+    {
+        snd_pcm_sframes_t capture_delay;
+
+        snd_pcm_status( stream->capture.pcm, capture_status );
+        snd_pcm_status_get_tstamp( capture_status, &capture_timestamp );
+
+        capture_time = capture_timestamp.tv_sec +
+            ((PaTime)capture_timestamp.tv_usec / 1000000.0);
+        timeInfo->currentTime = capture_time;
+
+        capture_delay = snd_pcm_status_get_delay( capture_status );
+        timeInfo->inputBufferAdcTime = timeInfo->currentTime -
+            (PaTime)capture_delay / stream->streamRepresentation.streamInfo.sampleRate;
+    }
+    if( stream->playback.pcm )
+    {
+        snd_pcm_sframes_t playback_delay;
+
+        snd_pcm_status( stream->playback.pcm, playback_status );
+        snd_pcm_status_get_tstamp( playback_status, &playback_timestamp );
+
+        playback_time = playback_timestamp.tv_sec +
+            ((PaTime)playback_timestamp.tv_usec / 1000000.0);
+
+        if( stream->capture.pcm ) /* Full duplex */
+        {
+            /* Hmm, we have both a playback and a capture timestamp.
+             * Hopefully they are the same... */
+            if( fabs( capture_time - playback_time ) > 0.01 )
+                PA_DEBUG(("Capture time and playback time differ by %f\n", fabs(capture_time-playback_time)));
+        }
+        else
+            timeInfo->currentTime = playback_time;
+
+        playback_delay = snd_pcm_status_get_delay( playback_status );
+        timeInfo->outputBufferDacTime = timeInfo->currentTime +
+            (PaTime)playback_delay / stream->streamRepresentation.streamInfo.sampleRate;
+    }
+}
+
+/** Called after buffer processing is finished.
+ *
+ * A number of mmapped frames is committed, it is possible that an xrun has occurred in the meantime.
+ *
+ * @param numFrames The number of frames that has been processed
+ * @param xrun Return whether an xrun has occurred
+ */
+static PaError PaAlsaStreamComponent_EndProcessing( PaAlsaStreamComponent *self, unsigned long numFrames, int *xrun )
+{
+    PaError result = paNoError;
+    int res;
+
+    /* @concern FullDuplex It is possible that only one direction is marked ready after polling, and processed
+     * afterwards
+     */
+    if( !self->ready )
+        goto end;
+
+    res = snd_pcm_mmap_commit( self->pcm, self->offset, numFrames );
+    if( res == -EPIPE || res == -ESTRPIPE )
+    {
+        *xrun = 1;
+    }
+    else
+    {
+        ENSURE_( res, paUnanticipatedHostError );
+    }
+
+end:
+error:
+    return result;
+}
+
+/* Extract buffer from channel area */
+static unsigned char *ExtractAddress( const snd_pcm_channel_area_t *area, snd_pcm_uframes_t offset )
+{
+    return (unsigned char *) area->addr + (area->first + offset * area->step) / 8;
+}
+
+/** Do necessary adaption between user and host channels.
+ *
+    @concern ChannelAdaption Adapting between user and host channels can involve silencing unused channels and
+    duplicating mono information if host outputs come in pairs.
+ */
+static PaError PaAlsaStreamComponent_DoChannelAdaption( PaAlsaStreamComponent *self, PaUtilBufferProcessor *bp, int numFrames )
+{
+    PaError result = paNoError;
+    unsigned char *p;
+    int i;
+    int unusedChans = self->numHostChannels - self->numUserChannels;
+    unsigned char *src, *dst;
+    int convertMono = (self->numHostChannels % 2) == 0 && (self->numUserChannels % 2) != 0;
+
+    assert( StreamDirection_Out == self->streamDir );
+
+    if( self->hostInterleaved )
+    {
+        int swidth = snd_pcm_format_size( self->nativeFormat, 1 );
+        unsigned char *buffer = ExtractAddress( self->channelAreas, self->offset );
+
+        /* Start after the last user channel */
+        p = buffer + self->numUserChannels * swidth;
+
+        if( convertMono )
+        {
+            /* Convert the last user channel into stereo pair */
+            src = buffer + (self->numUserChannels - 1) * swidth;
+            for( i = 0; i < numFrames; ++i )
+            {
+                dst = src + swidth;
+                memcpy( dst, src, swidth );
+                src += self->numHostChannels * swidth;
+            }
+
+            /* Don't touch the channel we just wrote to */
+            p += swidth;
+            --unusedChans;
+        }
+
+        if( unusedChans > 0 )
+        {
+            /* Silence unused output channels */
+            for( i = 0; i < numFrames; ++i )
+            {
+                memset( p, 0, swidth * unusedChans );
+                p += self->numHostChannels * swidth;
+            }
+        }
+    }
+    else
+    {
+        /* We extract the last user channel */
+        if( convertMono )
+        {
+            ENSURE_( snd_pcm_area_copy( self->channelAreas + self->numUserChannels, self->offset, self->channelAreas +
+                    (self->numUserChannels - 1), self->offset, numFrames, self->nativeFormat ), paUnanticipatedHostError );
+            --unusedChans;
+        }
+        if( unusedChans > 0 )
+        {
+            snd_pcm_areas_silence( self->channelAreas + (self->numHostChannels - unusedChans), self->offset, unusedChans, numFrames,
+                    self->nativeFormat );
+        }
+    }
+
+error:
+    return result;
+}
+
+static PaError PaAlsaStream_EndProcessing( PaAlsaStream *self, unsigned long numFrames, int *xrunOccurred )
+{
+    PaError result = paNoError;
+    int xrun = 0;
+
+    if( self->capture.pcm )
+    {
+        PA_ENSURE( PaAlsaStreamComponent_EndProcessing( &self->capture, numFrames, &xrun ) );
+    }
+    if( self->playback.pcm )
+    {
+        if( self->playback.numHostChannels > self->playback.numUserChannels )
+            PA_ENSURE( PaAlsaStreamComponent_DoChannelAdaption( &self->playback, &self->bufferProcessor, numFrames ) );
+        PA_ENSURE( PaAlsaStreamComponent_EndProcessing( &self->playback, numFrames, &xrun ) );
+    }
+
+error:
+    *xrunOccurred = xrun;
+    return result;
+}
+
+/** Update the number of available frames.
+ *
+ */
+static PaError PaAlsaStreamComponent_GetAvailableFrames( PaAlsaStreamComponent *self, unsigned long *numFrames, int *xrunOccurred )
+{
+    PaError result = paNoError;
+    snd_pcm_sframes_t framesAvail = snd_pcm_avail_update( self->pcm );
+    *xrunOccurred = 0;
+
+    if( -EPIPE == framesAvail )
+    {
+        *xrunOccurred = 1;
+        framesAvail = 0;
+    }
+    else
+        ENSURE_( framesAvail, paUnanticipatedHostError );
+
+    *numFrames = framesAvail;
+
+error:
+    return result;
+}
+
+/** Fill in pollfd objects.
+ */
+static PaError PaAlsaStreamComponent_BeginPolling( PaAlsaStreamComponent *self, struct pollfd *pfds )
+{
+    PaError result = paNoError;
+    int ret = snd_pcm_poll_descriptors( self->pcm, pfds, self->nfds );
+    assert( ret == self->nfds );
+
+    self->ready = 0;
+
+    return result;
+}
+
+/** Examine results from poll().
+ *
+ * @param pfds pollfds to inspect
+ * @param shouldPoll Should we continue to poll
+ * @param xrun Has an xrun occurred
+ */
+static PaError PaAlsaStreamComponent_EndPolling( PaAlsaStreamComponent *self, struct pollfd *pfds, int *shouldPoll, int *xrun )
+{
+    PaError result = paNoError;
+    unsigned short revents;
+
+    ENSURE_( snd_pcm_poll_descriptors_revents( self->pcm, pfds, self->nfds, &revents ), paUnanticipatedHostError );
+    if( revents != 0 )
+    {
+        if( revents & POLLERR )
+        {
+            *xrun = 1;
+        }
+        else
+            self->ready = 1;
+
+        *shouldPoll = 0;
+    }
+
+error:
+    return result;
+}
+
+/** Return the number of available frames for this stream.
+ *
+ * @concern FullDuplex The minimum available for the two directions is calculated, it might be desirable to ignore
+ * one direction however (not marked ready from poll), so this is controlled by queryCapture and queryPlayback.
+ *
+ * @param queryCapture Check available for capture
+ * @param queryPlayback Check available for playback
+ * @param available The returned number of frames
+ * @param xrunOccurred Return whether an xrun has occurred
+ */
+static PaError PaAlsaStream_GetAvailableFrames( PaAlsaStream *self, int queryCapture, int queryPlayback, unsigned long
+        *available, int *xrunOccurred )
+{
+    PaError result = paNoError;
+    unsigned long captureFrames, playbackFrames;
+    *xrunOccurred = 0;
+
+    assert( queryCapture || queryPlayback );
+
+    if( queryCapture )
+    {
+        assert( self->capture.pcm );
+        PA_ENSURE( PaAlsaStreamComponent_GetAvailableFrames( &self->capture, &captureFrames, xrunOccurred ) );
+        if( *xrunOccurred )
+            goto end;
+    }
+    if( queryPlayback )
+    {
+        assert( self->playback.pcm );
+        PA_ENSURE( PaAlsaStreamComponent_GetAvailableFrames( &self->playback, &playbackFrames, xrunOccurred ) );
+        if( *xrunOccurred )
+            goto end;
+    }
+
+    if( queryCapture && queryPlayback )
+    {
+        *available = PA_MIN( captureFrames, playbackFrames );
+    }
+    else if( queryCapture )
+    {
+        *available = captureFrames;
+    }
+    else
+    {
+        *available = playbackFrames;
+    }
+
+end:
+error:
+    return result;
+}
+
+/** Wait for and report available buffer space from ALSA.
+ *
+ * Unless ALSA reports a minimum of frames available for I/O, we poll the ALSA filedescriptors for more.
+ * Both of these operations can uncover xrun conditions.
+ *
+ * @concern Xruns Both polling and querying available frames can report an xrun condition.
+ *
+ * @param framesAvail Return the number of available frames
+ * @param xrunOccurred Return whether an xrun has occurred
+ */ 
+static PaError PaAlsaStream_WaitForFrames( PaAlsaStream *self, unsigned long *framesAvail, int *xrunOccurred )
+{
+    PaError result = paNoError;
+    int pollPlayback = self->playback.pcm != NULL, pollCapture = self->capture.pcm != NULL;
+    int pollTimeout = self->pollTimeout;
+    int xrun = 0;
+
+    assert( self );
+    assert( framesAvail );
+
+    if( !self->callbackMode )
+    {
+        /* In blocking mode we will only wait if necessary */
+        PA_ENSURE( PaAlsaStream_GetAvailableFrames( self, self->capture.pcm != NULL, self->playback.pcm != NULL,
+                    framesAvail, &xrun ) );
+        if( xrun )
+        {
+            goto end;
+        }
+
+        if( *framesAvail > 0 )
+        {
+            /* Mark pcms ready from poll */
+            if( self->capture.pcm )
+                self->capture.ready = 1;
+            if( self->playback.pcm )
+                self->playback.ready = 1;
+
+            goto end;
+        }
+    }
+
+    while( pollPlayback || pollCapture )
+    {
+        int totalFds = 0;
+        struct pollfd *capturePfds = NULL, *playbackPfds = NULL;
+
+        pthread_testcancel();
+
+        if( pollCapture )
+        {
+            capturePfds = self->pfds;
+            PA_ENSURE( PaAlsaStreamComponent_BeginPolling( &self->capture, capturePfds ) );
+            totalFds += self->capture.nfds;
+        }
+        if( pollPlayback )
+        {
+            playbackPfds = self->pfds + (self->capture.pcm ? self->capture.nfds : 0);
+            PA_ENSURE( PaAlsaStreamComponent_BeginPolling( &self->playback, playbackPfds ) );
+            totalFds += self->playback.nfds;
+        }
+
+        if( poll( self->pfds, totalFds, pollTimeout ) < 0 )
+        {
+            /*  XXX: Depend on preprocessor condition? */
+            if( errno == EINTR ) {  /* gdb */
+                continue;
+            }
+
+            /* TODO: Add macro for checking system calls */
+            PA_ENSURE( paInternalError );
+        }
+
+        /* check the return status of our pfds */
+        if( pollCapture )
+        {
+            PA_ENSURE( PaAlsaStreamComponent_EndPolling( &self->capture, capturePfds, &pollCapture, &xrun ) );
+        }
+        if( pollPlayback )
+        {
+            PA_ENSURE( PaAlsaStreamComponent_EndPolling( &self->playback, playbackPfds, &pollPlayback, &xrun ) );
+        }
+        if( xrun )
+        {
+            break;
+        }
+
+        /* @concern FullDuplex If only one of two pcms is ready we may want to compromise between the two.
+         * If there is less than half a period's worth of samples left of frames in the other pcm's buffer we will
+         * stop polling.
+         */
+        if( self->capture.pcm && self->playback.pcm )
+        {
+            if( pollCapture && !pollPlayback )
+            {
+                PA_ENSURE( ContinuePoll( self, StreamDirection_In, &pollTimeout, &pollCapture ) );
+            }
+            else if( pollPlayback && !pollCapture )
+            {
+                PA_ENSURE( ContinuePoll( self, StreamDirection_Out, &pollTimeout, &pollPlayback ) );
+            }
+        }
+    }
+
+    if( !xrun )
+    {
+        /* Get the number of available frames for the pcms that are marked ready.
+         * @concern FullDuplex If only one direction is marked ready (from poll), the number of frames available for
+         * the other direction is returned. This under the assumption that input is dropped earlier if paNeverDropInput
+         * is not specified.
+         */
+        int captureReady = self->capture.pcm ? self->capture.ready : 0,
+            playbackReady = self->playback.pcm ? self->playback.ready : 0;
+        PA_ENSURE( PaAlsaStream_GetAvailableFrames( self, captureReady, playbackReady, framesAvail, &xrun ) );
+
+        if( self->capture.pcm && self->playback.pcm )
+        {
+            if( !self->playback.ready && !self->neverDropInput )
+            {
+                /* TODO: Drop input */
+            }
+        }
+    }
+
+end:
+error:
+    if( xrun )
+    {
+        /* Recover from the xrun state */
+        PA_ENSURE( PaAlsaStream_HandleXrun( self ) );
+        *framesAvail = 0;
+    }
+    *xrunOccurred = xrun;
+
+    return result;
+}
+
+/** Register per-channel ALSA buffer information with buffer processor.
+ *
+ * Mmapped buffer space is acquired from ALSA, and registered with the buffer processor. Differences between the
+ * number of host and user channels is taken into account.
+ * 
+ * @param numFrames On entrance the number of requested frames, on exit the number of contiguously accessible frames.
+ */
+static PaError PaAlsaStreamComponent_RegisterChannels( PaAlsaStreamComponent *self, PaUtilBufferProcessor *bp,
+        unsigned long *numFrames, int *xrun )
+{
+    PaError result = paNoError;
+    const snd_pcm_channel_area_t *areas, *area;
+    void (*setChannel)(PaUtilBufferProcessor *, unsigned int, void *, unsigned int) =
+        StreamDirection_In == self->streamDir ? PaUtil_SetInputChannel : PaUtil_SetOutputChannel;
+    unsigned char *buffer, *p;
+    int i;
+    unsigned long framesAvail;
+
+    /* This _must_ be called before mmap_begin */
+    PA_ENSURE( PaAlsaStreamComponent_GetAvailableFrames( self, &framesAvail, xrun ) );
+    if( *xrun )
+    {
+        *numFrames = 0;
+        goto end;
+    }
+
+    ENSURE_( snd_pcm_mmap_begin( self->pcm, &areas, &self->offset, numFrames ), paUnanticipatedHostError );
+
+    if( self->hostInterleaved )
+    {
+        int swidth = snd_pcm_format_size( self->nativeFormat, 1 );
+
+        p = buffer = ExtractAddress( areas, self->offset );
+        for( i = 0; i < self->numUserChannels; ++i )
+        {
+            /* We're setting the channels up to userChannels, but the stride will be hostChannels samples */
+            setChannel( bp, i, p, self->numHostChannels );
+            p += swidth;
+        }
+    }
+    else
+    {
+        for( i = 0; i < self->numUserChannels; ++i )
+        {
+            area = areas + i;
+            buffer = ExtractAddress( area, self->offset );
+            setChannel( bp, i, buffer, 1 );
+        }
+    }
+
+    /* @concern ChannelAdaption Buffer address is recorded so we can do some channel adaption later */
+    self->channelAreas = (snd_pcm_channel_area_t *)areas;
+
+end:
+error:
+    return result;
+}
+
+/** Initiate buffer processing.
+ *
+ * ALSA buffers are registered with the PA buffer processor and the buffer size (in frames) set.
+ *
+ * @concern FullDuplex If both directions are being processed, the minimum amount of frames for the two directions is
+ * calculated.
+ *
+ * @param numFrames On entrance the number of available frames, on exit the number of received frames
+ * @param xrunOccurred Return whether an xrun has occurred
+ */
+static PaError PaAlsaStream_SetUpBuffers( PaAlsaStream *self, unsigned long *numFrames, int *xrunOccurred )
+{
+    PaError result = paNoError;
+    unsigned long captureFrames = ULONG_MAX, playbackFrames = ULONG_MAX, commonFrames = 0;
+    int xrun = 0;
+
+    /* Extract per-channel ALSA buffer pointers and register them with the buffer processor.
+     * It is possible that a direction is not marked ready however, because it is out of sync with the other.
+     */
+    if( self->capture.pcm && self->capture.ready )
+    {
+        captureFrames = *numFrames;
+        PA_ENSURE( PaAlsaStreamComponent_RegisterChannels( &self->capture, &self->bufferProcessor, &captureFrames, 
+                    &xrun ) );
+    }
+    if( self->playback.pcm && self->playback.ready )
+    {
+        playbackFrames = *numFrames;
+        PA_ENSURE( PaAlsaStreamComponent_RegisterChannels( &self->playback, &self->bufferProcessor, &playbackFrames, 
+                    &xrun ) );
+    }
+    if( xrun )
+    {
+        /* Nothing more to do */
+        assert( 0 == commonFrames );
+        goto end;
+    }
+
+    commonFrames = PA_MIN( captureFrames, playbackFrames );
+    assert( commonFrames <= *numFrames );
+
+    /* Inform PortAudio of the number of frames we got.
+     * @concern FullDuplex We might be experiencing underflow in either end; if its an input underflow, we go on
+     * with output. If its output underflow however, depending on the paNeverDropInput flag, we may want to simply
+     * discard the excess input or call the callback with paOutputOverflow flagged.
+     */
+    if( self->capture.pcm )
+    {
+        if( self->capture.ready )
+        {
+            PaUtil_SetInputFrameCount( &self->bufferProcessor, commonFrames );
+        }
+        else
+        {
+            /* We have input underflow */
+            PaUtil_SetNoInput( &self->bufferProcessor );
+        }
+    }
+    if( self->playback.pcm )
+    {
+        if( self->playback.ready )
+        {
+            PaUtil_SetOutputFrameCount( &self->bufferProcessor, commonFrames );
+        }
+        else
+        {
+            /* We have output underflow, but keeping input data (paNeverDropInput) */
+            /* assert( self->neverDropInput ); */
+            PaUtil_SetNoOutput( &self->bufferProcessor );
+        }
+    }
+    
+end:
+    *numFrames = commonFrames;
+error:
+    if( xrun )
+    {
+        PA_ENSURE( PaAlsaStream_HandleXrun( self ) );
+        *numFrames = 0;
+    }
+    *xrunOccurred = xrun;
+
+    return result;
+}
+
+/** Callback thread's function.
+ *
+ * Roughly, the workflow can be described in the following way: The number of available frames that can be processed
+ * directly is obtained from ALSA, we then request as much directly accessible memory as possible within this amount
+ * from ALSA. The buffer memory is registered with the PA buffer processor and processing is carried out with
+ * PaUtil_EndBufferProcessing. Finally, the number of processed frames is reported to ALSA. The processing can
+ * happen in several iterations untill we have consumed the known number of available frames (or an xrun is detected).
+ */
+static void *CallbackThreadFunc( void *userData )
+{
+    PaError result = paNoError, *pres = NULL;
+    PaAlsaStream *stream = (PaAlsaStream*) userData;
+    PaStreamCallbackTimeInfo timeInfo = {0, 0, 0};
+    snd_pcm_sframes_t startThreshold = 0;
+    int callbackResult = paContinue;
+    PaStreamCallbackFlags cbFlags = 0;  /* We might want to keep state across iterations */
+    int streamStarted = 0;
+
+    assert( stream );
+
+    callbackThread_ = pthread_self();
+    /* Execute OnExit when exiting */
+    pthread_cleanup_push( &OnExit, stream );
+
+    /* Not implemented */
+    assert( !stream->primeBuffers );
+
+    /* @concern StreamStart If the output is being primed the output pcm needs to be prepared, otherwise the
+     * stream is started immediately. The latter involves signaling the waiting main thread.
+     */
+    if( stream->primeBuffers )
+    {
+        snd_pcm_sframes_t avail;
+        
+        if( stream->playback.pcm )
+            ENSURE_( snd_pcm_prepare( stream->playback.pcm ), paUnanticipatedHostError );
+        if( stream->capture.pcm && !stream->pcmsSynced )
+            ENSURE_( snd_pcm_prepare( stream->capture.pcm ), paUnanticipatedHostError );
+
+        /* We can't be certain that the whole ring buffer is available for priming, but there should be
+         * at least one period */
+        avail = snd_pcm_avail_update( stream->playback.pcm );
+        startThreshold = avail - (avail % stream->playback.framesPerBuffer);
+        assert( startThreshold >= stream->playback.framesPerBuffer );
+    }
+    else
+    {
+        ASSERT_CALL_( pthread_mutex_lock( &stream->startMtx ), 0 );
+        PA_ENSURE( AlsaStart( stream, 0 ) );    /* Buffer will be zeroed */
+        ASSERT_CALL_( pthread_cond_signal( &stream->startCond ), 0 );
+        ASSERT_CALL_( pthread_mutex_unlock( &stream->startMtx ), 0 );
+
+        streamStarted = 1;
+    }
+
+    while( 1 )
+    {
+        unsigned long framesAvail, framesGot;
+        int xrun = 0;
+
+        pthread_testcancel();
+
+        /* @concern StreamStop if the main thread has requested a stop and the stream has not been effectively
+         * stopped we signal this condition by modifying callbackResult (we'll want to flush buffered output).
+         */
+        if( stream->callbackStop && paContinue == callbackResult )
+        {
+            PA_DEBUG(( "Setting callbackResult to paComplete\n" ));
+            callbackResult = paComplete;
+        }
+
+        if( paContinue != callbackResult )
+        {
+            stream->callbackAbort = (paAbort == callbackResult);
+            if( stream->callbackAbort ||
+                    /** @concern BlockAdaption Go on if adaption buffers are empty */
+                    PaUtil_IsBufferProcessorOutputEmpty( &stream->bufferProcessor ) ) 
+                goto end;
+
+            PA_DEBUG(( "%s: Flushing buffer processor\n", __FUNCTION__ ));
+            /* There is still buffered output that needs to be processed */
+        }
+
+        /* Wait for data to become available, this comes down to polling the ALSA file descriptors untill we have
+         * a number of available frames.
+         */
+        PA_ENSURE( PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun ) );
+        if( xrun )
+        {
+            assert( 0 == framesAvail );
+            continue;
+
+            /* XXX: Report xruns to the user? A situation is conceivable where the callback is never invoked due
+             * to constant xruns, it might be desirable to notify the user of this.
+             */
+        }
+
+        /* Consume buffer space. Once we have a number of frames available for consumption we must retrieve the
+         * mmapped buffers from ALSA, this is contiguously accessible memory however, so we may receive smaller
+         * portions at a time than is available as a whole. Therefore we should be prepared to process several
+         * chunks successively. The buffers are passed to the PA buffer processor.
+         */
+        while( framesAvail > 0 )
+        {
+            xrun = 0;
+
+            pthread_testcancel();
+
+            /** @concern Xruns Under/overflows are to be reported to the callback */
+            if( stream->underrun > 0.0 )
+            {
+                cbFlags |= paOutputUnderflow;
+                stream->underrun = 0.0;
+            }
+            if( stream->overrun > 0.0 )
+            {
+                cbFlags |= paInputOverflow;
+                stream->overrun = 0.0;
+            }
+            if( stream->capture.pcm && stream->playback.pcm )
+            {
+                /** @concern FullDuplex It's possible that only one direction is being processed to avoid an
+                 * under- or overflow, this should be reported correspondingly */
+                if( !stream->capture.ready )
+                {
+                    cbFlags |= paInputUnderflow;
+                    PA_DEBUG(( "%s: Input underflow\n", __FUNCTION__ ));
+                }
+                else if( !stream->playback.ready )
+                {
+                    cbFlags |= paOutputOverflow;
+                    PA_DEBUG(( "%s: Output overflow\n", __FUNCTION__ ));
+                }
+            }
+
+            CallbackUpdate( &stream->threading );
+            CalculateTimeInfo( stream, &timeInfo );
+            PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, cbFlags );
+            cbFlags = 0;
+
+            /* CPU load measurement should include processing activivity external to the stream callback */
+            PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
+
+            framesGot = framesAvail;
+            PA_ENSURE( PaAlsaStream_SetUpBuffers( stream, &framesGot, &xrun ) );
+            framesAvail -= framesGot;
+
+            if( framesGot > 0 )
+            {
+                assert( !xrun );
+
+                PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );
+                PA_ENSURE( PaAlsaStream_EndProcessing( stream, framesGot, &xrun ) );
+            }
+            PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesGot );
+
+            if( framesGot == 0 )
+            {
+                if( !xrun )
+                    PA_DEBUG(( "%s: Received less frames than reported from ALSA!\n", __FUNCTION__ ));
+
+                /* Go back to polling for more frames */
+                break;
+
+            }
+
+            if( paContinue != callbackResult )
+                break;
+        }
+    }
+
+    /* Match pthread_cleanup_push */
+    pthread_cleanup_pop( 1 );
+
+end:
+    pthread_exit( pres );
+
+error:
+    /* Pass on error code */
+    pres = malloc( sizeof (PaError) );
+    *pres = result;
+    
+    goto end;
+}
+
+/* Blocking interface */
+
+static PaError ReadStream( PaStream* s, void *buffer, unsigned long frames )
+{
+    PaError result = paNoError;
+    PaAlsaStream *stream = (PaAlsaStream*)s;
+    unsigned long framesGot, framesAvail;
+    void *userBuffer;
+    snd_pcm_t *save = stream->playback.pcm;
+
+    assert( stream );
+
+    PA_UNLESS( stream->capture.pcm, paCanNotReadFromAnOutputOnlyStream );
+
+    /* Disregard playback */
+    stream->playback.pcm = NULL;
+
+    if( stream->overrun > 0. )
+    {
+        result = paInputOverflowed;
+        stream->overrun = 0.0;
+    }
+
+    if( stream->capture.userInterleaved )
+        userBuffer = buffer;
+    else
+    {
+        /* Copy channels into local array */
+        userBuffer = stream->capture.userBuffers;
+        memcpy( userBuffer, buffer, sizeof (void *) * stream->capture.numUserChannels );
+    }
+
+    /* Start stream if in prepared state */
+    if( snd_pcm_state( stream->capture.pcm ) == SND_PCM_STATE_PREPARED )
+    {
+        ENSURE_( snd_pcm_start( stream->capture.pcm ), paUnanticipatedHostError );
+    }
+
+    while( frames > 0 )
+    {
+        int xrun = 0;
+        PA_ENSURE( PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun ) );
+        framesGot = PA_MIN( framesAvail, frames );
+
+        PA_ENSURE( PaAlsaStream_SetUpBuffers( stream, &framesGot, &xrun ) );
+        if( framesGot > 0 )
+        {
+            framesGot = PaUtil_CopyInput( &stream->bufferProcessor, &userBuffer, framesGot );
+            PA_ENSURE( PaAlsaStream_EndProcessing( stream, framesGot, &xrun ) );
+            frames -= framesGot;
+        }
+    }
+
+end:
+    stream->playback.pcm = save;
+    return result;
+error:
+    goto end;
+}
+
+static PaError WriteStream( PaStream* s, const void *buffer, unsigned long frames )
+{
+    PaError result = paNoError;
+    signed long err;
+    PaAlsaStream *stream = (PaAlsaStream*)s;
+    snd_pcm_uframes_t framesGot, framesAvail;
+    const void *userBuffer;
+    snd_pcm_t *save = stream->capture.pcm;
+    
+    assert( stream );
+
+    PA_UNLESS( stream->playback.pcm, paCanNotWriteToAnInputOnlyStream );
+
+    /* Disregard capture */
+    stream->capture.pcm = NULL;
+
+    if( stream->underrun > 0. )
+    {
+        result = paOutputUnderflowed;
+        stream->underrun = 0.0;
+    }
+
+    if( stream->playback.userInterleaved )
+        userBuffer = buffer;
+    else /* Copy channels into local array */
+    {
+        userBuffer = stream->playback.userBuffers;
+        memcpy( (void *)userBuffer, buffer, sizeof (void *) * stream->playback.numUserChannels );
+    }
+
+    while( frames > 0 )
+    {
+        int xrun = 0;
+        snd_pcm_uframes_t hwAvail;
+
+        PA_ENSURE( PaAlsaStream_WaitForFrames( stream, &framesAvail, &xrun ) );
+        framesGot = PA_MIN( framesAvail, frames );
+
+        PA_ENSURE( PaAlsaStream_SetUpBuffers( stream, &framesGot, &xrun ) );
+        if( framesGot > 0 )
+        {
+            framesGot = PaUtil_CopyOutput( &stream->bufferProcessor, &userBuffer, framesGot );
+            PA_ENSURE( PaAlsaStream_EndProcessing( stream, framesGot, &xrun ) );
+            frames -= framesGot;
+        }
+
+        /* Frames residing in buffer */
+        PA_ENSURE( err = GetStreamWriteAvailable( stream ) );
+        framesAvail = err;
+        hwAvail = stream->playback.bufferSize - framesAvail;
+
+        /* Start stream after one period of samples worth */
+        if( snd_pcm_state( stream->playback.pcm ) == SND_PCM_STATE_PREPARED &&
+                hwAvail >= stream->playback.framesPerBuffer )
+        {
+            ENSURE_( snd_pcm_start( stream->playback.pcm ), paUnanticipatedHostError );
+        }
+    }
+
+end:
+    stream->capture.pcm = save;
+    return result;
+error:
+    goto end;
+}
+
+/* Return frames available for reading. In the event of an overflow, the capture pcm will be restarted */
+static signed long GetStreamReadAvailable( PaStream* s )
+{
+    PaError result = paNoError;
+    PaAlsaStream *stream = (PaAlsaStream*)s;
+    unsigned long avail;
+    int xrun;
+
+    PA_ENSURE( PaAlsaStreamComponent_GetAvailableFrames( &stream->capture, &avail, &xrun ) );
+    if( xrun )
+    {
+        PA_ENSURE( PaAlsaStream_HandleXrun( stream ) );
+        PA_ENSURE( PaAlsaStreamComponent_GetAvailableFrames( &stream->capture, &avail, &xrun ) );
+        if( xrun )
+            PA_ENSURE( paInputOverflowed );
+    }
+
+    return (signed long)avail;
+
+error:
+    return result;
+}
+
+static signed long GetStreamWriteAvailable( PaStream* s )
+{
+    PaError result = paNoError;
+    PaAlsaStream *stream = (PaAlsaStream*)s;
+    unsigned long avail;
+    int xrun;
+
+    PA_ENSURE( PaAlsaStreamComponent_GetAvailableFrames( &stream->playback, &avail, &xrun ) );
+    if( xrun )
+    {
+        snd_pcm_sframes_t savail;
+
+        PA_ENSURE( PaAlsaStream_HandleXrun( stream ) );
+        savail = snd_pcm_avail_update( stream->playback.pcm );
+
+        /* savail should not contain -EPIPE now, since PaAlsaStream_HandleXrun will only prepare the pcm */
+        ENSURE_( savail, paUnanticipatedHostError );
+
+        avail = (unsigned long) savail;
+    }
+
+    return (signed long)avail;
+
+error:
+    return result;
+}
+
+/* Extensions */
+
+/* Initialize host api specific structure */
+void PaAlsa_InitializeStreamInfo( PaAlsaStreamInfo *info )
+{
+    info->size = sizeof (PaAlsaStreamInfo);
+    info->hostApiType = paALSA;
+    info->version = 1;
+    info->deviceString = NULL;
+}
+
+void PaAlsa_EnableRealtimeScheduling( PaStream *s, int enable )
+{
+    PaAlsaStream *stream = (PaAlsaStream *) s;
+    stream->threading.rtSched = enable;
+}
+
+void PaAlsa_EnableWatchdog( PaStream *s, int enable )
+{
+    PaAlsaStream *stream = (PaAlsaStream *) s;
+    stream->threading.useWatchdog = enable;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_linux_alsa.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_linux_alsa.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_linux_alsa.h	(revision 1163)
@@ -0,0 +1,64 @@
+#ifndef PA_LINUX_ALSA_H
+#define PA_LINUX_ALSA_H
+
+/*
+ * $Id: pa_linux_alsa.h,v 1.1.2.12 2004/09/25 14:15:25 aknudsen Exp $
+ * PortAudio Portable Real-Time Audio Library
+ * ALSA-specific extensions
+ *
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/** @file
+ * ALSA-specific PortAudio API extension header file.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct PaAlsaStreamInfo
+{
+    unsigned long size;
+    PaHostApiTypeId hostApiType;
+    unsigned long version;
+
+    const char *deviceString;
+}
+PaAlsaStreamInfo;
+
+void PaAlsa_InitializeStreamInfo( PaAlsaStreamInfo *info );
+
+void PaAlsa_EnableRealtimeScheduling( PaStream *s, int enable );
+
+void PaAlsa_EnableWatchdog( PaStream *s, int enable );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core.c	(revision 1163)
@@ -0,0 +1,2042 @@
+/*
+ * Implementation of the PortAudio API for Apple AUHAL
+ *
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ *
+ * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.
+ * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)
+ *
+ * Dominic's code was based on code by Phil Burk, Darren Gibbs,
+ * Gord Peters, Stephane Letz, and Greg Pfiel.
+ *
+ * The following people also deserve acknowledgements:
+ *
+ * Olivier Tristan for feedback and testing
+ * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O
+ * interface.
+ * 
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/**
+ @file pa_mac_core
+ @ingroup hostapi_src
+ @author Bjorn Roche
+ @brief AUHAL implementation of PortAudio
+*/
+
+/* FIXME: not all error conditions call PaUtil_SetLastHostErrorInfo()
+ * PaMacCore_SetError() will do this.
+ */
+
+#include "pa_mac_core_internal.h"
+
+#include <string.h> /* strlen(), memcmp() etc. */
+
+#include "pa_mac_core.h"
+#include "pa_mac_core_utilities.h"
+#include "pa_mac_core_blocking.h"
+
+
+
+/* prototypes for functions declared in this file */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+PaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#define RING_BUFFER_ADVANCE_DENOMINATOR (4)
+
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi );
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate );
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** s,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *streamCallback,
+                           void *userData );
+static PaError CloseStream( PaStream* stream );
+static PaError StartStream( PaStream *stream );
+static PaError StopStream( PaStream *stream );
+static PaError AbortStream( PaStream *stream );
+static PaError IsStreamStopped( PaStream *s );
+static PaError IsStreamActive( PaStream *stream );
+static PaTime GetStreamTime( PaStream *stream );
+static void setStreamStartTime( PaStream *stream );
+static OSStatus AudioIOProc( void *inRefCon,
+                               AudioUnitRenderActionFlags *ioActionFlags,
+                               const AudioTimeStamp *inTimeStamp,
+                               UInt32 inBusNumber,
+                               UInt32 inNumberFrames,
+                               AudioBufferList *ioData );
+static double GetStreamCpuLoad( PaStream* stream );
+
+static PaError GetChannelInfo( PaMacAUHAL *auhalHostApi,
+                               PaDeviceInfo *deviceInfo,
+                               AudioDeviceID macCoreDeviceId,
+                               int isInput);
+
+static PaError OpenAndSetupOneAudioUnit(
+                                   const PaStreamParameters *inStreamParams,
+                                   const PaStreamParameters *outStreamParams,
+                                   const unsigned long requestedFramesPerBuffer,
+                                   unsigned long *actualInputFramesPerBuffer,
+                                   unsigned long *actualOutputFramesPerBuffer,
+                                   const PaMacAUHAL *auhalHostApi,
+                                   AudioUnit *audioUnit,
+                                   AudioConverterRef *srConverter,
+                                   AudioDeviceID *audioDevice,
+                                   const double sampleRate,
+                                   void *refCon );
+
+/* for setting errors. */
+#define PA_AUHAL_SET_LAST_HOST_ERROR( errorCode, errorText ) \
+    PaUtil_SetLastHostErrorInfo( paInDevelopment, errorCode, errorText )
+
+
+/*currently, this is only used in initialization, but it might be modified
+  to be used when the list of devices changes.*/
+static PaError gatherDeviceInfo(PaMacAUHAL *auhalHostApi)
+{
+    UInt32 size;
+    UInt32 propsize;
+    VVDBUG(("gatherDeviceInfo()\n"));
+    /* -- free any previous allocations -- */
+    if( auhalHostApi->devIds )
+        PaUtil_GroupFreeMemory(auhalHostApi->allocations, auhalHostApi->devIds);
+    auhalHostApi->devIds = NULL;
+
+    /* -- figure out how many devices there are -- */
+    AudioHardwareGetPropertyInfo( kAudioHardwarePropertyDevices,
+                                  &propsize,
+                                  NULL );
+    auhalHostApi->devCount = propsize / sizeof( AudioDeviceID );
+
+    VDBUG( ( "Found %ld device(s).\n", auhalHostApi->devCount ) );
+
+    /* -- copy the device IDs -- */
+    auhalHostApi->devIds = (AudioDeviceID *)PaUtil_GroupAllocateMemory(
+                             auhalHostApi->allocations,
+                             propsize );
+    if( !auhalHostApi->devIds )
+        return paInsufficientMemory;
+    AudioHardwareGetProperty( kAudioHardwarePropertyDevices,
+                                  &propsize,
+                                  auhalHostApi->devIds );
+#ifdef MAC_CORE_VERBOSE_DEBUG
+    {
+       int i;
+       for( i=0; i<auhalHostApi->devCount; ++i )
+          printf( "Device %d\t: %ld\n", i, auhalHostApi->devIds[i] );
+    }
+#endif
+
+    size = sizeof(AudioDeviceID);
+    auhalHostApi->defaultIn  = kAudioDeviceUnknown;
+    auhalHostApi->defaultOut = kAudioDeviceUnknown;
+
+    /* determine the default device. */
+    /* I am not sure how these calls to AudioHardwareGetProperty()
+       could fail, but in case they do, we use the first available
+       device as the default. */
+    if( 0 != AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice,
+                     &size,
+                     &auhalHostApi->defaultIn) ) {
+       int i;
+       auhalHostApi->defaultIn  = kAudioDeviceUnknown;
+       VDBUG(("Failed to get default input device from OS."));
+       VDBUG((" I will substitute the first available input Device."));
+       for( i=0; i<auhalHostApi->devCount; ++i ) {
+          PaDeviceInfo devInfo;
+          if( 0 != GetChannelInfo( auhalHostApi, &devInfo,
+                                   auhalHostApi->devIds[i], TRUE ) )
+             if( devInfo.maxInputChannels ) {
+                auhalHostApi->defaultIn = auhalHostApi->devIds[i];
+                break;
+             }
+       }
+    }   
+    if( 0 != AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice,
+                     &size,
+                     &auhalHostApi->defaultOut) ) {
+       int i;
+       auhalHostApi->defaultIn  = kAudioDeviceUnknown;
+       VDBUG(("Failed to get default output device from OS."));
+       VDBUG((" I will substitute the first available output Device."));
+       for( i=0; i<auhalHostApi->devCount; ++i ) {
+          PaDeviceInfo devInfo;
+          if( 0 != GetChannelInfo( auhalHostApi, &devInfo,
+                                   auhalHostApi->devIds[i], FALSE ) )
+             if( devInfo.maxOutputChannels ) {
+                auhalHostApi->defaultOut = auhalHostApi->devIds[i];
+                break;
+             }
+       }
+    }   
+
+    VDBUG( ( "Default in : %ld\n", auhalHostApi->defaultIn  ) );
+    VDBUG( ( "Default out: %ld\n", auhalHostApi->defaultOut ) );
+
+    return paNoError;
+}
+
+static PaError GetChannelInfo( PaMacAUHAL *auhalHostApi,
+                               PaDeviceInfo *deviceInfo,
+                               AudioDeviceID macCoreDeviceId,
+                               int isInput)
+{
+    UInt32 propSize;
+    PaError err = paNoError;
+    UInt32 i;
+    int numChannels = 0;
+    AudioBufferList *buflist = NULL;
+    UInt32 frameLatency;
+
+    VVDBUG(("GetChannelInfo()\n"));
+
+    /* Get the number of channels from the stream configuration.
+       Fail if we can't get this. */
+
+    err = ERR(AudioDeviceGetPropertyInfo(macCoreDeviceId, 0, isInput, kAudioDevicePropertyStreamConfiguration, &propSize, NULL));
+    if (err)
+        return err;
+
+    buflist = PaUtil_AllocateMemory(propSize);
+    if( !buflist )
+       return paInsufficientMemory;
+    err = ERR(AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyStreamConfiguration, &propSize, buflist));
+    if (err)
+        goto error;
+
+    for (i = 0; i < buflist->mNumberBuffers; ++i)
+        numChannels += buflist->mBuffers[i].mNumberChannels;
+
+    if (isInput)
+        deviceInfo->maxInputChannels = numChannels;
+    else
+        deviceInfo->maxOutputChannels = numChannels;
+      
+    if (numChannels > 0) /* do not try to retrieve the latency if there is no channels. */
+    {
+       /* Get the latency.  Don't fail if we can't get this. */
+       /* default to something reasonable */
+       deviceInfo->defaultLowInputLatency = .01;
+       deviceInfo->defaultHighInputLatency = .10;
+       deviceInfo->defaultLowOutputLatency = .01;
+       deviceInfo->defaultHighOutputLatency = .10;
+       propSize = sizeof(UInt32);
+       err = WARNING(AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyLatency, &propSize, &frameLatency));
+       if (!err)
+       {
+          /** FEEDBACK:
+           * This code was arrived at by trial and error, and some extentive, but not exhaustive
+           * testing. Sebastien Beaulieu <seb@plogue.com> has suggested using
+           * kAudioDevicePropertyLatency + kAudioDevicePropertySafetyOffset + buffer size instead.
+           * At the time this code was written, many users were reporting dropouts with audio
+           * programs that probably used this formula. This was probably
+           * around 10.4.4, and the problem is probably fixed now. So perhaps
+           * his formula should be reviewed and used.
+           * */
+          double secondLatency = frameLatency / deviceInfo->defaultSampleRate;
+          if (isInput)
+          {
+             deviceInfo->defaultLowInputLatency = 3 * secondLatency;
+             deviceInfo->defaultHighInputLatency = 3 * 10 * secondLatency;
+          }
+          else
+          {
+             deviceInfo->defaultLowOutputLatency = 3 * secondLatency;
+             deviceInfo->defaultHighOutputLatency = 3 * 10 * secondLatency;
+          }
+       }
+    }
+    PaUtil_FreeMemory( buflist );
+    return paNoError;
+ error:
+    PaUtil_FreeMemory( buflist );
+    return err;
+}
+
+static PaError InitializeDeviceInfo( PaMacAUHAL *auhalHostApi,
+                                     PaDeviceInfo *deviceInfo,
+                                     AudioDeviceID macCoreDeviceId,
+                                     PaHostApiIndex hostApiIndex )
+{
+    Float64 sampleRate;
+    char *name;
+    PaError err = paNoError;
+    UInt32 propSize;
+
+    VVDBUG(("InitializeDeviceInfo(): macCoreDeviceId=%ld\n", macCoreDeviceId));
+
+    memset(deviceInfo, 0, sizeof(deviceInfo));
+
+    deviceInfo->structVersion = 2;
+    deviceInfo->hostApi = hostApiIndex;
+
+    /* Get the device name.  Fail if we can't get it. */
+    err = ERR(AudioDeviceGetPropertyInfo(macCoreDeviceId, 0, 0, kAudioDevicePropertyDeviceName, &propSize, NULL));
+    if (err)
+        return err;
+
+    name = PaUtil_GroupAllocateMemory(auhalHostApi->allocations,propSize);
+    if ( !name )
+        return paInsufficientMemory;
+    err = ERR(AudioDeviceGetProperty(macCoreDeviceId, 0, 0, kAudioDevicePropertyDeviceName, &propSize, name));
+    if (err)
+        return err;
+    deviceInfo->name = name;
+
+    /* Try to get the default sample rate.  Don't fail if we can't get this. */
+    propSize = sizeof(Float64);
+    err = ERR(AudioDeviceGetProperty(macCoreDeviceId, 0, 0, kAudioDevicePropertyNominalSampleRate, &propSize, &sampleRate));
+    if (err)
+        deviceInfo->defaultSampleRate = 0.0;
+    else
+        deviceInfo->defaultSampleRate = sampleRate;
+
+    /* Get the maximum number of input and output channels.  Fail if we can't get this. */
+
+    err = GetChannelInfo(auhalHostApi, deviceInfo, macCoreDeviceId, 1);
+    if (err)
+        return err;
+
+    err = GetChannelInfo(auhalHostApi, deviceInfo, macCoreDeviceId, 0);
+    if (err)
+        return err;
+
+    return paNoError;
+}
+
+PaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+{
+    PaError result = paNoError;
+    int i;
+    PaMacAUHAL *auhalHostApi;
+    PaDeviceInfo *deviceInfoArray;
+
+    VVDBUG(("PaMacCore_Initialize(): hostApiIndex=%d\n", hostApiIndex));
+
+    auhalHostApi = (PaMacAUHAL*)PaUtil_AllocateMemory( sizeof(PaMacAUHAL) );
+    if( !auhalHostApi )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    auhalHostApi->allocations = PaUtil_CreateAllocationGroup();
+    if( !auhalHostApi->allocations )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    auhalHostApi->devIds = NULL;
+    auhalHostApi->devCount = 0;
+
+    /* get the info we need about the devices */
+    result = gatherDeviceInfo( auhalHostApi );
+    if( result != paNoError )
+       goto error;
+
+    *hostApi = &auhalHostApi->inheritedHostApiRep;
+    (*hostApi)->info.structVersion = 1;
+    (*hostApi)->info.type = paCoreAudio;
+    (*hostApi)->info.name = "Core Audio";
+
+    (*hostApi)->info.defaultInputDevice = paNoDevice;
+    (*hostApi)->info.defaultOutputDevice = paNoDevice;
+
+    (*hostApi)->info.deviceCount = 0;  
+
+    if( auhalHostApi->devCount > 0 )
+    {
+        (*hostApi)->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(
+                auhalHostApi->allocations, sizeof(PaDeviceInfo*) * auhalHostApi->devCount);
+        if( !(*hostApi)->deviceInfos )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        /* allocate all device info structs in a contiguous block */
+        deviceInfoArray = (PaDeviceInfo*)PaUtil_GroupAllocateMemory(
+                auhalHostApi->allocations, sizeof(PaDeviceInfo) * auhalHostApi->devCount );
+        if( !deviceInfoArray )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        for( i=0; i < auhalHostApi->devCount; ++i )
+        {
+            int err;
+            err = InitializeDeviceInfo( auhalHostApi, &deviceInfoArray[i],
+                                      auhalHostApi->devIds[i],
+                                      hostApiIndex );
+            if (err == paNoError)
+            { /* copy some info and set the defaults */
+                (*hostApi)->deviceInfos[(*hostApi)->info.deviceCount] = &deviceInfoArray[i];
+                if (auhalHostApi->devIds[i] == auhalHostApi->defaultIn)
+                    (*hostApi)->info.defaultInputDevice = (*hostApi)->info.deviceCount;
+                if (auhalHostApi->devIds[i] == auhalHostApi->defaultOut)
+                    (*hostApi)->info.defaultOutputDevice = (*hostApi)->info.deviceCount;
+                (*hostApi)->info.deviceCount++;
+            }
+            else
+            { /* there was an error. we need to shift the devices down, so we ignore this one */
+                int j;
+                auhalHostApi->devCount--;
+                for( j=i; j<auhalHostApi->devCount; ++j )
+                   auhalHostApi->devIds[j] = auhalHostApi->devIds[j+1];
+                i--;
+            }
+        }
+    }
+
+    (*hostApi)->Terminate = Terminate;
+    (*hostApi)->OpenStream = OpenStream;
+    (*hostApi)->IsFormatSupported = IsFormatSupported;
+
+    PaUtil_InitializeStreamInterface( &auhalHostApi->callbackStreamInterface,
+                                      CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped,
+                                      IsStreamActive,
+                                      GetStreamTime, GetStreamCpuLoad,
+                                      PaUtil_DummyRead, PaUtil_DummyWrite,
+                                      PaUtil_DummyGetReadAvailable,
+                                      PaUtil_DummyGetWriteAvailable );
+
+    PaUtil_InitializeStreamInterface( &auhalHostApi->blockingStreamInterface,
+                                      CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped,
+                                      IsStreamActive,
+                                      GetStreamTime, PaUtil_DummyGetCpuLoad,
+                                      ReadStream, WriteStream,
+                                      GetStreamReadAvailable,
+                                      GetStreamWriteAvailable );
+
+    return result;
+
+error:
+    if( auhalHostApi )
+    {
+        if( auhalHostApi->allocations )
+        {
+            PaUtil_FreeAllAllocations( auhalHostApi->allocations );
+            PaUtil_DestroyAllocationGroup( auhalHostApi->allocations );
+        }
+                
+        PaUtil_FreeMemory( auhalHostApi );
+    }
+    return result;
+}
+
+
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi )
+{
+    PaMacAUHAL *auhalHostApi = (PaMacAUHAL*)hostApi;
+
+    VVDBUG(("Terminate()\n"));
+
+    /*
+        IMPLEMENT ME:
+            - clean up any resources not handled by the allocation group
+        TODO: Double check that everything is handled by alloc group
+    */
+
+    if( auhalHostApi->allocations )
+    {
+        PaUtil_FreeAllAllocations( auhalHostApi->allocations );
+        PaUtil_DestroyAllocationGroup( auhalHostApi->allocations );
+    }
+
+    PaUtil_FreeMemory( auhalHostApi );
+}
+
+
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate )
+{
+    int inputChannelCount, outputChannelCount;
+    PaSampleFormat inputSampleFormat, outputSampleFormat;
+
+    VVDBUG(("IsFormatSupported(): in chan=%d, in fmt=%ld, out chan=%d, out fmt=%ld sampleRate=%g\n",
+                inputParameters  ? inputParameters->channelCount  : -1,
+                inputParameters  ? inputParameters->sampleFormat  : -1,
+                outputParameters ? outputParameters->channelCount : -1,
+                outputParameters ? outputParameters->sampleFormat : -1,
+                (float) sampleRate ));
+ 
+    /** These first checks are standard PA checks. We do some fancier checks
+        later. */
+    if( inputParameters )
+    {
+        inputChannelCount = inputParameters->channelCount;
+        inputSampleFormat = inputParameters->sampleFormat;
+
+        /* all standard sample formats are supported by the buffer adapter,
+            this implementation doesn't support any custom sample formats */
+        if( inputSampleFormat & paCustomFormat )
+            return paSampleFormatNotSupported;
+            
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+
+        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )
+            return paInvalidDevice;
+
+        /* check that input device can support inputChannelCount */
+        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )
+            return paInvalidChannelCount;
+    }
+    else
+    {
+        inputChannelCount = 0;
+    }
+
+    if( outputParameters )
+    {
+        outputChannelCount = outputParameters->channelCount;
+        outputSampleFormat = outputParameters->sampleFormat;
+
+        /* all standard sample formats are supported by the buffer adapter,
+            this implementation doesn't support any custom sample formats */
+        if( outputSampleFormat & paCustomFormat )
+            return paSampleFormatNotSupported;
+            
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+
+        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )
+            return paInvalidDevice;
+
+        /* check that output device can support outputChannelCount */
+        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )
+            return paInvalidChannelCount;
+
+    }
+    else
+    {
+        outputChannelCount = 0;
+    }
+ 
+    /* FEEDBACK */
+    /*        I think the only way to check a given format SR combo is     */
+    /*        to try opening it. This could be disruptive, is that Okay?   */
+    /*        The alternative is to just read off available sample rates,  */
+    /*        but this will not work %100 of the time (eg, a device that   */
+    /*        supports N output at one rate but only N/2 at a higher rate.)*/
+
+    /* The following code opens the device with the requested parameters to
+       see if it works. */
+    {
+       PaError err;
+       PaStream *s;
+       err = OpenStream( hostApi, &s, inputParameters, outputParameters,
+                           sampleRate, 1024, 0, (PaStreamCallback *)1, NULL );
+       if( err != paNoError && err != paInvalidSampleRate )
+          DBUG( ( "OpenStream @ %g returned: %d: %s\n",
+                  (float) sampleRate, err, Pa_GetErrorText( err ) ) );
+       if( err ) 
+          return err;
+       err = CloseStream( s );
+       if( err ) {
+          /* FEEDBACK: is this more serious? should we assert? */
+          DBUG( ( "WARNING: could not close Stream. %d: %s\n",
+                  err, Pa_GetErrorText( err ) ) );
+       }
+    }
+
+    return paFormatIsSupported;
+}
+
+static PaError OpenAndSetupOneAudioUnit(
+                                   const PaStreamParameters *inStreamParams,
+                                   const PaStreamParameters *outStreamParams,
+                                   const unsigned long requestedFramesPerBuffer,
+                                   unsigned long *actualInputFramesPerBuffer,
+                                   unsigned long *actualOutputFramesPerBuffer,
+                                   const PaMacAUHAL *auhalHostApi,
+                                   AudioUnit *audioUnit,
+                                   AudioConverterRef *srConverter,
+                                   AudioDeviceID *audioDevice,
+                                   const double sampleRate,
+                                   void *refCon )
+{
+    ComponentDescription desc;
+    Component comp;
+    /*An Apple TN suggests using CAStreamBasicDescription, but that is C++*/
+    AudioStreamBasicDescription desiredFormat;
+    OSErr result = noErr;
+    PaError paResult = paNoError;
+    int line = 0;
+    UInt32 callbackKey;
+    AURenderCallbackStruct rcbs;
+    unsigned long macInputStreamFlags  = paMacCorePlayNice;
+    unsigned long macOutputStreamFlags = paMacCorePlayNice;
+
+    VVDBUG(("OpenAndSetupOneAudioUnit(): in chan=%d, in fmt=%ld, out chan=%d, out fmt=%ld, requestedFramesPerBuffer=%ld\n",
+                inStreamParams  ? inStreamParams->channelCount  : -1,
+                inStreamParams  ? inStreamParams->sampleFormat  : -1,
+                outStreamParams ? outStreamParams->channelCount : -1,
+                outStreamParams ? outStreamParams->sampleFormat : -1,
+                requestedFramesPerBuffer ));
+
+    /* -- handle the degenerate case  -- */
+    if( !inStreamParams && !outStreamParams ) {
+       *audioUnit = NULL;
+       *audioDevice = kAudioDeviceUnknown;
+       return paNoError;
+    }
+
+    /* -- get the user's api specific info, if they set any -- */
+    if( inStreamParams && inStreamParams->hostApiSpecificStreamInfo )
+       macInputStreamFlags=
+            ((paMacCoreStreamInfo*)inStreamParams->hostApiSpecificStreamInfo)
+                  ->flags;
+    if( outStreamParams && outStreamParams->hostApiSpecificStreamInfo )
+       macOutputStreamFlags=
+            ((paMacCoreStreamInfo*)outStreamParams->hostApiSpecificStreamInfo)
+                  ->flags;
+    /* Override user's flags here, if desired for testing. */
+
+    /*
+     * The HAL AU is a Mac OS style "component".
+     * the first few steps deal with that.
+     * Later steps work on a combination of Mac OS
+     * components and the slightly lower level
+     * HAL.
+     */
+
+    /* -- describe the output type AudioUnit -- */
+    /*  Note: for the default AudioUnit, we could use the
+     *  componentSubType value kAudioUnitSubType_DefaultOutput;
+     *  but I don't think that's relevant here.
+     */
+    desc.componentType         = kAudioUnitType_Output;
+    desc.componentSubType      = kAudioUnitSubType_HALOutput;
+    desc.componentManufacturer = kAudioUnitManufacturer_Apple;
+    desc.componentFlags        = 0;
+    desc.componentFlagsMask    = 0;
+    /* -- find the component -- */
+    comp = FindNextComponent( NULL, &desc );
+    if( !comp )
+    {
+       DBUG( ( "AUHAL component not found." ) );
+       *audioUnit = NULL;
+       *audioDevice = kAudioDeviceUnknown;
+       return paUnanticipatedHostError;
+    }
+    /* -- open it -- */
+    result = OpenAComponent( comp, audioUnit );
+    if( result )
+    {
+       DBUG( ( "Failed to open AUHAL component." ) );
+       *audioUnit = NULL;
+       *audioDevice = kAudioDeviceUnknown;
+       return ERR( result );
+    }
+    /* -- prepare a little error handling logic / hackery -- */
+#define ERR_WRAP(mac_err) do { result = mac_err ; line = __LINE__ ; if ( result != noErr ) goto error ; } while(0)
+
+    /* -- if there is input, we have to explicitly enable input -- */
+    if( inStreamParams )
+    {
+       UInt32 enableIO;
+       enableIO = 1;
+       ERR_WRAP( AudioUnitSetProperty( *audioUnit,
+                 kAudioOutputUnitProperty_EnableIO,
+                 kAudioUnitScope_Input,
+                 INPUT_ELEMENT,
+                 &enableIO,
+                 sizeof(enableIO) ) );
+    }
+    /* -- if there is no output, we must explicitly disable output -- */
+    if( !outStreamParams )
+    {
+       UInt32 enableIO;
+       enableIO = 0;
+       ERR_WRAP( AudioUnitSetProperty( *audioUnit,
+                 kAudioOutputUnitProperty_EnableIO,
+                 kAudioUnitScope_Output,
+                 OUTPUT_ELEMENT,
+                 &enableIO,
+                 sizeof(enableIO) ) );
+    }
+    /* -- set the devices -- */
+    /* make sure input and output are the same device if we are doing input and
+       output. */
+    if( inStreamParams && outStreamParams )
+       assert( outStreamParams->device == inStreamParams->device );
+    if( inStreamParams )
+    {
+       *audioDevice = auhalHostApi->devIds[inStreamParams->device] ;
+       ERR_WRAP( AudioUnitSetProperty( *audioUnit,
+                    kAudioOutputUnitProperty_CurrentDevice,
+                    kAudioUnitScope_Global,
+                    INPUT_ELEMENT,
+                    audioDevice,
+                    sizeof(AudioDeviceID) ) );
+    }
+    if( outStreamParams )
+    {
+       *audioDevice = auhalHostApi->devIds[outStreamParams->device] ;
+       ERR_WRAP( AudioUnitSetProperty( *audioUnit,
+                    kAudioOutputUnitProperty_CurrentDevice,
+                    kAudioUnitScope_Global,
+                    OUTPUT_ELEMENT,
+                    audioDevice,
+                    sizeof(AudioDeviceID) ) );
+    }
+
+    /* -- set format -- */
+    bzero( &desiredFormat, sizeof(desiredFormat) );
+    desiredFormat.mFormatID         = kAudioFormatLinearPCM ;
+    desiredFormat.mFormatFlags      = kAudioFormatFlagsNativeFloatPacked;
+    desiredFormat.mFramesPerPacket  = 1;
+    desiredFormat.mBitsPerChannel   = sizeof( float ) * 8;
+
+    result = 0;
+    /*  set device format first, but only touch the device if the user asked */
+    if( inStreamParams ) {
+       /*The callback never calls back if we don't set the FPB */
+       /*This seems wierd, because I would think setting anything on the device
+         would be disruptive.*/
+       paResult = setBestFramesPerBuffer( *audioDevice, FALSE,
+                                          requestedFramesPerBuffer,
+                                          actualInputFramesPerBuffer );
+       if( paResult ) goto error;
+       if( macInputStreamFlags & paMacCore_ChangeDeviceParameters ) {
+          bool requireExact;
+          requireExact=macInputStreamFlags&paMacCore_FailIfConversionRequired;
+          paResult = setBestSampleRateForDevice( *audioDevice, FALSE,
+                                                 requireExact, sampleRate );
+          if( paResult ) goto error;
+       }
+       if( actualInputFramesPerBuffer && actualOutputFramesPerBuffer )
+          *actualOutputFramesPerBuffer = *actualInputFramesPerBuffer ;
+    }
+    if( outStreamParams && !inStreamParams ) {
+       /*The callback never calls back if we don't set the FPB */
+       /*This seems wierd, because I would think setting anything on the device
+         would be disruptive.*/
+       paResult = setBestFramesPerBuffer( *audioDevice, TRUE,
+                                          requestedFramesPerBuffer,
+                                          actualOutputFramesPerBuffer );
+       if( paResult ) goto error;
+       if( macOutputStreamFlags & paMacCore_ChangeDeviceParameters ) {
+          bool requireExact;
+          requireExact=macOutputStreamFlags&paMacCore_FailIfConversionRequired;
+          paResult = setBestSampleRateForDevice( *audioDevice, TRUE,
+                                                 requireExact, sampleRate );
+          if( paResult ) goto error;
+       }
+    }
+
+    /* -- set the quality of the output converter -- */
+    if( outStreamParams ) {
+       UInt32 value = kAudioConverterQuality_Max;
+       switch( macOutputStreamFlags & 0x0700 ) {
+       case 0x0100: /*paMacCore_ConversionQualityMin:*/
+          value=kRenderQuality_Min;
+          break;
+       case 0x0200: /*paMacCore_ConversionQualityLow:*/
+          value=kRenderQuality_Low;
+          break;
+       case 0x0300: /*paMacCore_ConversionQualityMedium:*/
+          value=kRenderQuality_Medium;
+          break;
+       case 0x0400: /*paMacCore_ConversionQualityHigh:*/
+          value=kRenderQuality_High;
+          break;
+       }
+       ERR_WRAP( AudioUnitSetProperty( *audioUnit,
+                    kAudioUnitProperty_RenderQuality,
+                    kAudioUnitScope_Global,
+                    OUTPUT_ELEMENT,
+                    &value,
+                    sizeof(value) ) );
+    }
+    /* now set the format on the Audio Units. */
+    if( outStreamParams )
+    {
+       desiredFormat.mSampleRate    =sampleRate;
+       desiredFormat.mBytesPerPacket=sizeof(float)*outStreamParams->channelCount;
+       desiredFormat.mBytesPerFrame =sizeof(float)*outStreamParams->channelCount;
+       desiredFormat.mChannelsPerFrame = outStreamParams->channelCount;
+       ERR_WRAP( AudioUnitSetProperty( *audioUnit,
+                            kAudioUnitProperty_StreamFormat,
+                            kAudioUnitScope_Input,
+                            OUTPUT_ELEMENT,
+                            &desiredFormat,
+                            sizeof(AudioStreamBasicDescription) ) );
+    }
+    if( inStreamParams )
+    {
+       AudioStreamBasicDescription sourceFormat;
+       UInt32 size = sizeof( AudioStreamBasicDescription );
+
+       /* keep the sample rate of the device, or we confuse AUHAL */
+       ERR_WRAP( AudioUnitGetProperty( *audioUnit,
+                            kAudioUnitProperty_StreamFormat,
+                            kAudioUnitScope_Input,
+                            INPUT_ELEMENT,
+                            &sourceFormat,
+                            &size ) );
+       desiredFormat.mSampleRate = sourceFormat.mSampleRate;
+       desiredFormat.mBytesPerPacket=sizeof(float)*inStreamParams->channelCount;
+       desiredFormat.mBytesPerFrame =sizeof(float)*inStreamParams->channelCount;
+       desiredFormat.mChannelsPerFrame = inStreamParams->channelCount;
+       ERR_WRAP( AudioUnitSetProperty( *audioUnit,
+                            kAudioUnitProperty_StreamFormat,
+                            kAudioUnitScope_Output,
+                            INPUT_ELEMENT,
+                            &desiredFormat,
+                            sizeof(AudioStreamBasicDescription) ) );
+    }
+    /* set the maximumFramesPerSlice */
+    /* not doing this causes real problems
+       (eg. the callback might not be called). The idea of setting both this
+       and the frames per buffer on the device is that we'll be most likely
+       to actually get the frame size we requested in the callback with the
+       minimum latency. */
+    if( outStreamParams ) {
+       UInt32 size = sizeof( *actualOutputFramesPerBuffer );
+       ERR_WRAP( AudioUnitSetProperty( *audioUnit,
+                            kAudioUnitProperty_MaximumFramesPerSlice,
+                            kAudioUnitScope_Input,
+                            OUTPUT_ELEMENT,
+                            actualOutputFramesPerBuffer,
+                            sizeof(unsigned long) ) );
+       ERR_WRAP( AudioUnitGetProperty( *audioUnit,
+                            kAudioUnitProperty_MaximumFramesPerSlice,
+                            kAudioUnitScope_Global,
+                            OUTPUT_ELEMENT,
+                            actualOutputFramesPerBuffer,
+                            &size ) );
+    }
+    if( inStreamParams ) {
+       /*UInt32 size = sizeof( *actualInputFramesPerBuffer );*/
+       ERR_WRAP( AudioUnitSetProperty( *audioUnit,
+                            kAudioUnitProperty_MaximumFramesPerSlice,
+                            kAudioUnitScope_Output,
+                            INPUT_ELEMENT,
+                            actualInputFramesPerBuffer,
+                            sizeof(unsigned long) ) );
+/* Don't know why this causes problems
+       ERR_WRAP( AudioUnitGetProperty( *audioUnit,
+                            kAudioUnitProperty_MaximumFramesPerSlice,
+                            kAudioUnitScope_Global, //Output,
+                            INPUT_ELEMENT,
+                            actualInputFramesPerBuffer,
+                            &size ) );
+*/
+    }
+
+    /* -- if we have input, we may need to setup an SR converter -- */
+    /* even if we got the sample rate we asked for, we need to do
+       the conversion in case another program changes the underlying SR. */
+    /* FIXME: I think we need to monitor stream and change the converter if the incoming format changes. */
+    if( inStreamParams ) {
+       AudioStreamBasicDescription desiredFormat;
+       AudioStreamBasicDescription sourceFormat;
+       UInt32 sourceSize = sizeof( sourceFormat );
+       bzero( &desiredFormat, sizeof(desiredFormat) );
+       desiredFormat.mSampleRate       = sampleRate;
+       desiredFormat.mFormatID         = kAudioFormatLinearPCM ;
+       desiredFormat.mFormatFlags      = kAudioFormatFlagsNativeFloatPacked;
+       desiredFormat.mFramesPerPacket  = 1;
+       desiredFormat.mBitsPerChannel   = sizeof( float ) * 8;
+       desiredFormat.mBytesPerPacket=sizeof(float)*inStreamParams->channelCount;
+       desiredFormat.mBytesPerFrame =sizeof(float)*inStreamParams->channelCount;
+       desiredFormat.mChannelsPerFrame = inStreamParams->channelCount;
+
+       /* get the source format */
+       ERR_WRAP( AudioUnitGetProperty(
+                         *audioUnit,
+                         kAudioUnitProperty_StreamFormat,
+                         kAudioUnitScope_Output,
+                         INPUT_ELEMENT,
+                         &sourceFormat,
+                         &sourceSize ) );
+
+       if( desiredFormat.mSampleRate != sourceFormat.mSampleRate )
+       {
+          UInt32 value = kAudioConverterQuality_Max;
+          switch( macInputStreamFlags & 0x0700 ) {
+          case 0x0100: /*paMacCore_ConversionQualityMin:*/
+             value=kAudioConverterQuality_Min;
+             break;
+          case 0x0200: /*paMacCore_ConversionQualityLow:*/
+             value=kAudioConverterQuality_Low;
+             break;
+          case 0x0300: /*paMacCore_ConversionQualityMedium:*/
+             value=kAudioConverterQuality_Medium;
+             break;
+          case 0x0400: /*paMacCore_ConversionQualityHigh:*/
+             value=kAudioConverterQuality_High;
+             break;
+          }
+          VDBUG(( "Creating sample rate converter for input"
+                  " to convert from %g to %g\n",
+                  (float)sourceFormat.mSampleRate,
+                  (float)desiredFormat.mSampleRate ) );
+          /* create our converter */
+          ERR_WRAP( AudioConverterNew( 
+                             &sourceFormat,
+                             &desiredFormat,
+                             srConverter ) );
+          /* Set quality */
+          ERR_WRAP( AudioConverterSetProperty(
+                             *srConverter,
+                             kAudioConverterSampleRateConverterQuality,
+                             sizeof( value ),
+                             &value ) );
+       }
+    }
+    /* -- set IOProc (callback) -- */
+    callbackKey = outStreamParams ? kAudioUnitProperty_SetRenderCallback
+                                  : kAudioOutputUnitProperty_SetInputCallback ;
+    rcbs.inputProc = AudioIOProc;
+    rcbs.inputProcRefCon = refCon;
+    ERR_WRAP( AudioUnitSetProperty(
+                               *audioUnit,
+                               callbackKey,
+                               kAudioUnitScope_Output,
+                               outStreamParams ? OUTPUT_ELEMENT : INPUT_ELEMENT,
+                               &rcbs,
+                               sizeof(rcbs)) );
+
+    if( inStreamParams && outStreamParams && *srConverter )
+           ERR_WRAP( AudioUnitSetProperty(
+                               *audioUnit,
+                               kAudioOutputUnitProperty_SetInputCallback,
+                               kAudioUnitScope_Output,
+                               INPUT_ELEMENT,
+                               &rcbs,
+                               sizeof(rcbs)) );
+
+    /*IMPLEMENTME: may need to worry about channel mapping.*/
+
+    /* initialize the audio unit */
+    ERR_WRAP( AudioUnitInitialize(*audioUnit) );
+
+    if( inStreamParams && outStreamParams )
+       VDBUG( ("Opened device %ld for input and output.\n", *audioDevice ) );
+    else if( inStreamParams )
+       VDBUG( ("Opened device %ld for input.\n", *audioDevice ) );
+    else if( outStreamParams )
+       VDBUG( ("Opened device %ld for output.\n", *audioDevice ) );
+    return paNoError;
+#undef ERR_WRAP
+
+    error:
+       CloseComponent( *audioUnit );
+       *audioUnit = NULL;
+       if( result )
+          return PaMacCore_SetError( result, line, 1 );
+       return paResult;
+}
+
+/* see pa_hostapi.h for a list of validity guarantees made about OpenStream parameters */
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** s,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *streamCallback,
+                           void *userData )
+{
+    PaError result = paNoError;
+    PaMacAUHAL *auhalHostApi = (PaMacAUHAL*)hostApi;
+    PaMacCoreStream *stream = 0;
+    int inputChannelCount, outputChannelCount;
+    PaSampleFormat inputSampleFormat, outputSampleFormat;
+    PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;
+    VVDBUG(("OpenStream(): in chan=%d, in fmt=%ld, out chan=%d, out fmt=%ld SR=%g, FPB=%ld\n",
+                inputParameters  ? inputParameters->channelCount  : -1,
+                inputParameters  ? inputParameters->sampleFormat  : -1,
+                outputParameters ? outputParameters->channelCount : -1,
+                outputParameters ? outputParameters->sampleFormat : -1,
+                (float) sampleRate,
+                framesPerBuffer ));
+    VDBUG( ("Opening Stream.\n") );
+
+    /*These first few bits of code are from paSkeleton with few modifications.*/
+    if( inputParameters )
+    {
+        inputChannelCount = inputParameters->channelCount;
+        inputSampleFormat = inputParameters->sampleFormat;
+
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+
+        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )
+            return paInvalidDevice;
+
+        /* check that input device can support inputChannelCount */
+        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )
+            return paInvalidChannelCount;
+
+        /* Host supports interleaved float32 */
+        hostInputSampleFormat = paFloat32;
+    }
+    else
+    {
+        inputChannelCount = 0;
+        inputSampleFormat = hostInputSampleFormat = paFloat32; /* Surpress 'uninitialised var' warnings. */
+    }
+
+    if( outputParameters )
+    {
+        outputChannelCount = outputParameters->channelCount;
+        outputSampleFormat = outputParameters->sampleFormat;
+        
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+
+        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )
+            return paInvalidDevice;
+
+        /* check that output device can support inputChannelCount */
+        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )
+            return paInvalidChannelCount;
+
+        /* Host supports interleaved float32 */
+        hostOutputSampleFormat = paFloat32;
+    }
+    else
+    {
+        outputChannelCount = 0;
+        outputSampleFormat = hostOutputSampleFormat = paFloat32; /* Surpress 'uninitialized var' warnings. */
+    }
+
+    /* validate platform specific flags */
+    if( (streamFlags & paPlatformSpecificFlags) != 0 )
+        return paInvalidFlag; /* unexpected platform specific flag */
+
+    stream = (PaMacCoreStream*)PaUtil_AllocateMemory( sizeof(PaMacCoreStream) );
+    if( !stream )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    /* If we fail after this point, we my be left in a bad state, with
+       some data structures setup and others not. So, first thing we
+       do is initialize everything so that if we fail, we know what hasn't
+       been touched.
+     */
+
+    stream->inputAudioBufferList.mBuffers[0].mData = NULL;
+    stream->inputRingBuffer.buffer = NULL;
+    bzero( &stream->blio, sizeof( PaMacBlio ) );
+/*
+    stream->blio.inputRingBuffer.buffer = NULL;
+    stream->blio.outputRingBuffer.buffer = NULL;
+    stream->blio.inputSampleFormat = inputParameters?inputParameters->sampleFormat:0;
+    stream->blio.inputSampleSize = computeSampleSizeFromFormat(stream->blio.inputSampleFormat);
+    stream->blio.outputSampleFormat=outputParameters?outputParameters->sampleFormat:0;
+    stream->blio.outputSampleSize = computeSampleSizeFromFormat(stream->blio.outputSampleFormat);
+*/
+    stream->inputSRConverter = NULL;
+    stream->inputUnit = NULL;
+    stream->outputUnit = NULL;
+    stream->inputFramesPerBuffer = 0;
+    stream->outputFramesPerBuffer = 0;
+    stream->bufferProcessorIsInitialized = FALSE;
+
+    /* assert( streamCallback ) ; */ /* only callback mode is implemented */
+    if( streamCallback )
+    {
+        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
+                                        &auhalHostApi->callbackStreamInterface,
+                                        streamCallback, userData );
+    }
+    else
+    {
+        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
+                                        &auhalHostApi->blockingStreamInterface,
+					BlioCallback, &stream->blio );
+    }
+
+    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );
+
+    /* -- handle paFramesPerBufferUnspecified -- */
+    if( framesPerBuffer == paFramesPerBufferUnspecified ) {
+       long requested = 64;
+       if( inputParameters )
+          requested = MAX( requested, inputParameters->suggestedLatency * sampleRate / 2 );
+       if( outputParameters )
+          requested = MAX( requested, outputParameters->suggestedLatency *sampleRate / 2 );
+       VDBUG( ("Block Size unspecified. Based on Latency, the user wants a Block Size near: %ld.\n",
+              requested ) );
+       if( requested <= 64 ) {
+          /*requested a realtively low latency. make sure this is in range of devices */
+          /*try to get the device's min natural buffer size and use that (but no smaller than 64).*/
+          AudioValueRange audioRange;
+          size_t size = sizeof( audioRange );
+          if( inputParameters ) {
+             WARNING( result = AudioDeviceGetProperty( auhalHostApi->devIds[inputParameters->device],
+                                          0,
+                                          false,
+                                          kAudioDevicePropertyBufferFrameSizeRange,
+                                          &size, &audioRange ) );
+             if( result )
+                requested = MAX( requested, audioRange.mMinimum );
+          }
+          if( outputParameters ) {
+             WARNING( result = AudioDeviceGetProperty( auhalHostApi->devIds[outputParameters->device],
+                                          0,
+                                          false,
+                                          kAudioDevicePropertyBufferFrameSizeRange,
+                                          &size, &audioRange ) );
+             if( result )
+                requested = MAX( requested, audioRange.mMinimum );
+          }
+       } else {
+          /* requested a realtively high latency. make sure this is in range of devices */
+          /*try to get the device's max natural buffer size and use that (but no larger than 1024).*/
+          AudioValueRange audioRange;
+          size_t size = sizeof( audioRange );
+          requested = MIN( requested, 1024 );
+          if( inputParameters ) {
+             WARNING( result = AudioDeviceGetProperty( auhalHostApi->devIds[inputParameters->device],
+                                          0,
+                                          false,
+                                          kAudioDevicePropertyBufferFrameSizeRange,
+                                          &size, &audioRange ) );
+             if( result )
+                requested = MIN( requested, audioRange.mMaximum );
+          }
+          if( outputParameters ) {
+             WARNING( result = AudioDeviceGetProperty( auhalHostApi->devIds[outputParameters->device],
+                                          0,
+                                          false,
+                                          kAudioDevicePropertyBufferFrameSizeRange,
+                                          &size, &audioRange ) );
+             if( result )
+                requested = MIN( requested, audioRange.mMaximum );
+          }
+       }
+       /* -- double check ranges -- */
+       if( requested > 1024 ) requested = 1024;
+       if( requested < 64 ) requested = 64;
+       VDBUG(("After querying hardware, setting block size to %ld.\n", requested));
+       framesPerBuffer = requested;
+    }
+
+    /* -- Now we actually open and setup streams. -- */
+    if( inputParameters && outputParameters && outputParameters->device == inputParameters->device )
+    { /* full duplex. One device. */
+       result = OpenAndSetupOneAudioUnit( inputParameters,
+                                          outputParameters,
+                                          framesPerBuffer,
+                                          &(stream->inputFramesPerBuffer),
+                                          &(stream->outputFramesPerBuffer),
+                                          auhalHostApi,
+                                          &(stream->inputUnit),
+                                          &(stream->inputSRConverter),
+                                          &(stream->inputDevice),
+                                          sampleRate,
+                                          stream );
+       stream->outputUnit = stream->inputUnit;
+       stream->outputDevice = stream->inputDevice;
+       if( result != paNoError )
+           goto error;
+    }
+    else
+    { /* full duplex, different devices OR simplex */
+       result = OpenAndSetupOneAudioUnit( NULL,
+                                          outputParameters,
+                                          framesPerBuffer,
+                                          NULL,
+                                          &(stream->outputFramesPerBuffer),
+                                          auhalHostApi,
+                                          &(stream->outputUnit),
+                                          NULL,
+                                          &(stream->outputDevice),
+                                          sampleRate,
+                                          stream );
+       if( result != paNoError )
+           goto error;
+       result = OpenAndSetupOneAudioUnit( inputParameters,
+                                          NULL,
+                                          framesPerBuffer,
+                                          &(stream->inputFramesPerBuffer),
+                                          NULL,
+                                          auhalHostApi,
+                                          &(stream->inputUnit),
+                                          &(stream->inputSRConverter),
+                                          &(stream->inputDevice),
+                                          sampleRate,
+                                          stream );
+       if( result != paNoError )
+           goto error;
+    }
+
+    if( stream->inputUnit ) {
+       const size_t szfl = sizeof(float);
+       /* setup the AudioBufferList used for input */
+       bzero( &stream->inputAudioBufferList, sizeof( AudioBufferList ) );
+       stream->inputAudioBufferList.mNumberBuffers = 1;
+       stream->inputAudioBufferList.mBuffers[0].mNumberChannels
+                 = inputChannelCount;
+       stream->inputAudioBufferList.mBuffers[0].mDataByteSize
+                 = stream->inputFramesPerBuffer*inputChannelCount*szfl;
+       stream->inputAudioBufferList.mBuffers[0].mData
+                 = (float *) calloc(
+                               stream->inputFramesPerBuffer*inputChannelCount,
+                               szfl );
+       if( !stream->inputAudioBufferList.mBuffers[0].mData )
+       {
+          result = paInsufficientMemory;
+          goto error;
+       }
+        
+       /*
+        * If input and output devs are different or we are doing SR conversion,
+        * we also need a
+        * ring buffer to store inpt data while waiting for output
+        * data.
+        */
+       if( (stream->outputUnit && stream->inputUnit != stream->outputUnit)
+           || stream->inputSRConverter )
+       {
+          /* May want the ringSize ot initial position in
+             ring buffer to depend somewhat on sample rate change */
+
+          void *data;
+          long ringSize;
+
+          ringSize = computeRingBufferSize( inputParameters,
+                                            outputParameters,
+                                            stream->inputFramesPerBuffer,
+                                            stream->outputFramesPerBuffer,
+                                            sampleRate );
+          /*ringSize <<= 4; *//*16x bigger, for testing */
+
+
+          /*now, we need to allocate memory for the ring buffer*/
+          data = calloc( ringSize, szfl );
+          if( !data )
+          {
+             result = paInsufficientMemory;
+             goto error;
+          }
+
+          /* now we can initialize the ring buffer */
+          /*assert( 0 ==*/
+            RingBuffer_Init( &stream->inputRingBuffer,
+                             ringSize*szfl, data ) /*)*/;
+          /* advance the read point a little, so we are reading from the
+             middle of the buffer */
+          if( stream->outputUnit )
+             RingBuffer_AdvanceWriteIndex( &stream->inputRingBuffer, ringSize*szfl / RING_BUFFER_ADVANCE_DENOMINATOR );
+       }
+    }
+
+    /* -- initialize Blio Buffer Processors -- */
+    if( !streamCallback )
+    {
+       long ringSize;
+
+       ringSize = computeRingBufferSize( inputParameters,
+                                         outputParameters,
+                                         stream->inputFramesPerBuffer,
+                                         stream->outputFramesPerBuffer,
+                                         sampleRate );
+       result = initializeBlioRingBuffers( &stream->blio,
+              inputParameters?inputParameters->sampleFormat:0 ,
+              outputParameters?outputParameters->sampleFormat:0 ,
+              MAX(stream->inputFramesPerBuffer,stream->outputFramesPerBuffer),
+              ringSize,
+              inputParameters?inputChannelCount:0 ,
+              outputParameters?outputChannelCount:0 ) ;
+       if( result != paNoError )
+          goto error;
+    }
+
+    /* -- initialize Buffer Processor -- */
+    {
+       unsigned long maxHostFrames = stream->inputFramesPerBuffer;
+       if( stream->outputFramesPerBuffer > maxHostFrames )
+          maxHostFrames = stream->outputFramesPerBuffer;
+       result = PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,
+                 inputChannelCount, inputSampleFormat,
+                 hostInputSampleFormat,
+                 outputChannelCount, outputSampleFormat,
+                 hostOutputSampleFormat,
+                 sampleRate,
+                 streamFlags,
+                 framesPerBuffer,
+                 /* If sample rate conversion takes place, the buffer size
+                    will not be known. */
+                 maxHostFrames,
+                 stream->inputSRConverter
+                              ? paUtilUnknownHostBufferSize
+                              : paUtilBoundedHostBufferSize,
+                 streamCallback ? streamCallback : BlioCallback,
+                 streamCallback ? userData : &stream->blio );
+       if( result != paNoError )
+           goto error;
+    }
+    stream->bufferProcessorIsInitialized = TRUE;
+
+    /*
+        IMPLEMENT ME: initialise the following fields with estimated or actual
+        values.
+        I think this is okay the way it is br 12/1/05
+        maybe need to change input latency estimate if IO devs differ
+    */
+    stream->streamRepresentation.streamInfo.inputLatency =
+            PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor)/sampleRate;
+    stream->streamRepresentation.streamInfo.outputLatency =
+            PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor)/sampleRate;
+    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
+
+    stream->sampleRate  = sampleRate;
+    stream->outDeviceSampleRate = 0;
+    if( stream->outputUnit ) {
+       Float64 rate;
+       UInt32 size = sizeof( rate );
+       result = ERR( AudioDeviceGetProperty( stream->outputDevice,
+                                    0,
+                                    FALSE,
+                                    kAudioDevicePropertyNominalSampleRate,
+                                    &size, &rate ) );
+       if( result )
+          goto error;
+       stream->outDeviceSampleRate = rate;
+    }
+    stream->inDeviceSampleRate = 0;
+    if( stream->inputUnit ) {
+       Float64 rate;
+       UInt32 size = sizeof( rate );
+       result = ERR( AudioDeviceGetProperty( stream->inputDevice,
+                                    0,
+                                    TRUE,
+                                    kAudioDevicePropertyNominalSampleRate,
+                                    &size, &rate ) );
+       if( result )
+          goto error;
+       stream->inDeviceSampleRate = rate;
+    }
+    stream->userInChan  = inputChannelCount;
+    stream->userOutChan = outputChannelCount;
+
+    stream->isTimeSet   = FALSE;
+    stream->state = STOPPED;
+    stream->xrunFlags = 0;
+
+    *s = (PaStream*)stream;
+
+    return result;
+
+error:
+    CloseStream( stream );
+    return result;
+}
+
+PaTime GetStreamTime( PaStream *s )
+{
+   /* FIXME: I am not at all sure this timing info stuff is right.
+             patest_sine_time reports negative latencies, which is wierd.*/
+    PaMacCoreStream *stream = (PaMacCoreStream*)s;
+    AudioTimeStamp timeStamp;
+
+    VVDBUG(("GetStreamTime()\n"));
+
+    if ( !stream->isTimeSet )
+        return (PaTime)0;
+
+    if ( stream->outputDevice ) {
+        AudioDeviceGetCurrentTime( stream->outputDevice, &timeStamp);
+        return (PaTime)(timeStamp.mSampleTime - stream->startTime.mSampleTime)/stream->outDeviceSampleRate;
+    } else if ( stream->inputDevice ) {
+        AudioDeviceGetCurrentTime( stream->inputDevice, &timeStamp);
+    return (PaTime)(timeStamp.mSampleTime - stream->startTime.mSampleTime)/stream->inDeviceSampleRate;
+    } else {
+        return (PaTime)0;
+    }
+}
+
+static void setStreamStartTime( PaStream *stream )
+{
+   /* FIXME: I am not at all sure this timing info stuff is right.
+             patest_sine_time reports negative latencies, which is wierd.*/
+   PaMacCoreStream *s = (PaMacCoreStream *) stream;
+   VVDBUG(("setStreamStartTime()\n"));
+   if( s->outputDevice )
+      AudioDeviceGetCurrentTime( s->outputDevice, &s->startTime);
+   else if( s->inputDevice )
+      AudioDeviceGetCurrentTime( s->inputDevice, &s->startTime);
+   else
+      bzero( &s->startTime, sizeof( s->startTime ) );
+
+   //FIXME: we need a memory barier here
+
+   s->isTimeSet = TRUE;
+}
+
+
+static PaTime TimeStampToSecs(PaMacCoreStream *stream, const AudioTimeStamp* timeStamp)
+{
+    VVDBUG(("TimeStampToSecs()\n"));
+    //printf( "ATS: %lu, %g, %g\n", timeStamp->mFlags, timeStamp->mSampleTime, timeStamp->mRateScalar );
+    if (timeStamp->mFlags & kAudioTimeStampSampleTimeValid)
+        return (timeStamp->mSampleTime / stream->sampleRate);
+    else
+        return 0;
+}
+
+#define RING_BUFFER_EMPTY (1000)
+
+static OSStatus ringBufferIOProc( AudioConverterRef inAudioConverter, 
+                             UInt32*ioDataSize, 
+                             void** outData, 
+                             void*inUserData )
+{
+   void *dummyData;
+   long dummySize;
+   RingBuffer *rb = (RingBuffer *) inUserData;
+
+   VVDBUG(("ringBufferIOProc()\n"));
+
+   assert( sizeof( UInt32 ) == sizeof( long ) );
+   if( RingBuffer_GetReadAvailable( rb ) == 0 ) {
+      *outData = NULL;
+      *ioDataSize = 0;
+      return RING_BUFFER_EMPTY;
+   }
+   RingBuffer_GetReadRegions( rb, *ioDataSize,
+                              outData, (long *)ioDataSize, 
+                              &dummyData, &dummySize );
+      
+   assert( *ioDataSize );
+   RingBuffer_AdvanceReadIndex( rb, *ioDataSize );
+
+   return noErr;
+}
+
+/*
+ * Called by the AudioUnit API to process audio from the sound card.
+ * This is where the magic happens.
+ */
+/* FEEDBACK: there is a lot of redundant code here because of how all the cases differ. This makes it hard to maintain, so if there are suggestinos for cleaning it up, I'm all ears. */
+static OSStatus AudioIOProc( void *inRefCon,
+                               AudioUnitRenderActionFlags *ioActionFlags,
+                               const AudioTimeStamp *inTimeStamp,
+                               UInt32 inBusNumber,
+                               UInt32 inNumberFrames,
+                               AudioBufferList *ioData )
+{
+   unsigned long framesProcessed     = 0;
+   PaStreamCallbackTimeInfo timeInfo = {0,0,0};
+   PaMacCoreStream *stream           = (PaMacCoreStream*)inRefCon;
+   const bool isRender               = inBusNumber == OUTPUT_ELEMENT;
+   int callbackResult                = paContinue ;
+
+   VVDBUG(("AudioIOProc()\n"));
+
+   PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
+
+   /* -----------------------------------------------------------------*\
+      This output may be useful for debugging,
+      But printing durring the callback is a bad enough idea that
+      this is not enabled by enableing the usual debugging calls.
+   \* -----------------------------------------------------------------*/
+   /*
+   static int renderCount = 0;
+   static int inputCount = 0;
+   printf( "-------------------  starting reder/input\n" );
+   if( isRender )
+      printf("Render callback (%d):\t", ++renderCount);
+   else
+      printf("Input callback  (%d):\t", ++inputCount);
+   printf( "Call totals: %d (input), %d (render)\n", inputCount, renderCount );
+
+   printf( "--- inBusNumber: %lu\n", inBusNumber );
+   printf( "--- inNumberFrames: %lu\n", inNumberFrames );
+   printf( "--- %x ioData\n", (unsigned) ioData );
+   if( ioData )
+   {
+      int i=0;
+      printf( "--- ioData.mNumBuffers %lu: \n", ioData->mNumberBuffers );
+      for( i=0; i<ioData->mNumberBuffers; ++i )
+         printf( "--- ioData buffer %d size: %lu.\n", i, ioData->mBuffers[i].mDataByteSize );
+   }
+      ----------------------------------------------------------------- */
+
+   if( !stream->isTimeSet )
+      setStreamStartTime( stream );
+
+   if( isRender ) {
+      AudioTimeStamp currentTime;
+      timeInfo.outputBufferDacTime = TimeStampToSecs(stream, inTimeStamp);
+      AudioDeviceGetCurrentTime(stream->outputDevice, &currentTime);
+      timeInfo.currentTime = TimeStampToSecs(stream, &currentTime);
+   }
+   if( isRender && stream->inputUnit == stream->outputUnit )
+      timeInfo.inputBufferAdcTime = TimeStampToSecs(stream, inTimeStamp);
+   if( !isRender ) {
+      AudioTimeStamp currentTime;
+      timeInfo.inputBufferAdcTime = TimeStampToSecs(stream, inTimeStamp);
+      AudioDeviceGetCurrentTime(stream->inputDevice, &currentTime);
+      timeInfo.currentTime = TimeStampToSecs(stream, &currentTime);
+   }
+
+   //printf( "---%g, %g, %g\n", timeInfo.inputBufferAdcTime, timeInfo.currentTime, timeInfo.outputBufferDacTime );
+
+   if( isRender && stream->inputUnit == stream->outputUnit
+                && !stream->inputSRConverter )
+   {
+      /* --------- Full Duplex, One Device, no SR Conversion -------
+       *
+       * This is the lowest latency case, and also the simplest.
+       * Input data and output data are available at the same time.
+       * we do not use the input SR converter or the input ring buffer.
+       *
+       */
+      OSErr err = 0;
+      unsigned long frames;
+
+      /* -- start processing -- */
+      PaUtil_BeginBufferProcessing( &(stream->bufferProcessor),
+                                    &timeInfo,
+                                    stream->xrunFlags );
+      stream->xrunFlags = 0;
+
+      /* -- compute frames. do some checks -- */
+      assert( ioData->mNumberBuffers == 1 );
+      assert( ioData->mBuffers[0].mNumberChannels == stream->userOutChan );
+      frames = ioData->mBuffers[0].mDataByteSize;
+      frames /= sizeof( float ) * ioData->mBuffers[0].mNumberChannels;
+      /* -- copy and process input data -- */
+      err= AudioUnitRender(stream->inputUnit,
+                    ioActionFlags,
+                    inTimeStamp,
+                    INPUT_ELEMENT,
+                    inNumberFrames,
+                    &stream->inputAudioBufferList );
+      /* FEEDBACK: I'm not sure what to do when this call fails */
+      assert( !err );
+
+      PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames );
+      PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),
+                          0,
+                          stream->inputAudioBufferList.mBuffers[0].mData,
+                          stream->inputAudioBufferList.mBuffers[0].mNumberChannels);
+      /* -- Copy and process output data -- */
+      PaUtil_SetOutputFrameCount( &(stream->bufferProcessor), frames );
+      PaUtil_SetInterleavedOutputChannels( &(stream->bufferProcessor),
+                                        0,
+                                        ioData->mBuffers[0].mData,
+                                        ioData->mBuffers[0].mNumberChannels);
+      /* -- complete processing -- */
+      framesProcessed =
+                 PaUtil_EndBufferProcessing( &(stream->bufferProcessor),
+                                             &callbackResult );
+   }
+   else if( isRender )
+   {
+      /* -------- Output Side of Full Duplex (Separate Devices or SR Conversion)
+       *       -- OR Simplex Output
+       *
+       * This case handles output data as in the full duplex case,
+       * and, if there is input data, reads it off the ring buffer 
+       * and into the PA buffer processor. If sample rate conversion
+       * is required on input, that is done here as well.
+       */
+      unsigned long frames;
+
+      /* Sometimes, when stopping a duplex stream we get erroneous
+         xrun flags, so if this is our last run, clear the flags. */
+      int xrunFlags = stream->xrunFlags;
+/*
+      if( xrunFlags & paInputUnderflow )
+         printf( "input underflow.\n" );
+      if( xrunFlags & paInputOverflow )
+         printf( "input overflow.\n" );
+*/
+      if( stream->state == STOPPING || stream->state == CALLBACK_STOPPED )
+         xrunFlags = 0;
+
+      /* -- start processing -- */
+      PaUtil_BeginBufferProcessing( &(stream->bufferProcessor),
+                                    &timeInfo,
+                                    xrunFlags );
+      stream->xrunFlags = 0; /* FEEDBACK: we only send flags to Buf Proc once */
+
+      /* -- Copy and process output data -- */
+      assert( ioData->mNumberBuffers == 1 );
+      frames = ioData->mBuffers[0].mDataByteSize;
+      frames /= sizeof( float ) * ioData->mBuffers[0].mNumberChannels;
+      assert( ioData->mBuffers[0].mNumberChannels == stream->userOutChan );
+      PaUtil_SetOutputFrameCount( &(stream->bufferProcessor), frames );
+      PaUtil_SetInterleavedOutputChannels( &(stream->bufferProcessor),
+                                     0,
+                                     ioData->mBuffers[0].mData,
+                                     ioData->mBuffers[0].mNumberChannels);
+
+      /* -- copy and process input data, and complete processing -- */
+      if( stream->inputUnit ) {
+         const int flsz = sizeof( float );
+         /* Here, we read the data out of the ring buffer, through the
+            audio converter. */
+         int inChan = stream->inputAudioBufferList.mBuffers[0].mNumberChannels;
+         if( stream->inputSRConverter )
+         {
+               OSStatus err;
+               UInt32 size;
+               float data[ inChan * frames ];
+               size = sizeof( data );
+               err = AudioConverterFillBuffer( 
+                             stream->inputSRConverter,
+                             ringBufferIOProc,
+                             &stream->inputRingBuffer,
+                             &size,
+                             (void *)&data );
+               if( err == RING_BUFFER_EMPTY )
+               { /*the ring buffer callback underflowed */
+                  err = 0;
+                  bzero( ((char *)data) + size, sizeof(data)-size );
+                  stream->xrunFlags |= paInputUnderflow;
+               }
+               ERR( err );
+               assert( !err );
+               
+               PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames );
+               PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),
+                                   0,
+                                   data,
+                                   inChan );
+               framesProcessed =
+                    PaUtil_EndBufferProcessing( &(stream->bufferProcessor),
+                                                &callbackResult );
+         }
+         else
+         {
+            /* Without the AudioConverter is actually a bit more complex
+               because we have to do a little buffer processing that the
+               AudioConverter would otherwise handle for us. */
+            void *data1, *data2;
+            long size1, size2;
+            RingBuffer_GetReadRegions( &stream->inputRingBuffer,
+                                       inChan*frames*flsz,
+                                       &data1, &size1,
+                                       &data2, &size2 );
+            if( size1 / ( flsz * inChan ) == frames ) {
+               /* simplest case: all in first buffer */
+               PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames );
+               PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),
+                                   0,
+                                   data1,
+                                   inChan );
+               framesProcessed =
+                    PaUtil_EndBufferProcessing( &(stream->bufferProcessor),
+                                                &callbackResult );
+               RingBuffer_AdvanceReadIndex(&stream->inputRingBuffer, size1 );
+            } else if( ( size1 + size2 ) / ( flsz * inChan ) < frames ) {
+               /*we underflowed. take what data we can, zero the rest.*/
+               float data[frames*inChan];
+               if( size1 )
+                  memcpy( data, data1, size1 );
+               if( size2 )
+                  memcpy( data+size1, data2, size2 );
+               bzero( data+size1+size2, frames*flsz*inChan - size1 - size2 );
+
+               PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames );
+               PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),
+                                   0,
+                                   data,
+                                   inChan );
+               framesProcessed =
+                    PaUtil_EndBufferProcessing( &(stream->bufferProcessor),
+                                                &callbackResult );
+               RingBuffer_AdvanceReadIndex( &stream->inputRingBuffer,
+                                            size1+size2 );
+               /* flag underflow */
+               stream->xrunFlags |= paInputUnderflow;
+            } else {
+               /*we got all the data, but split between buffers*/
+               PaUtil_SetInputFrameCount( &(stream->bufferProcessor),
+                                          size1 / ( flsz * inChan ) );
+               PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),
+                                   0,
+                                   data1,
+                                   inChan );
+               PaUtil_Set2ndInputFrameCount( &(stream->bufferProcessor),
+                                             size2 / ( flsz * inChan ) );
+               PaUtil_Set2ndInterleavedInputChannels( &(stream->bufferProcessor),
+                                   0,
+                                   data2,
+                                   inChan );
+               framesProcessed =
+                    PaUtil_EndBufferProcessing( &(stream->bufferProcessor),
+                                                &callbackResult );
+               RingBuffer_AdvanceReadIndex(&stream->inputRingBuffer, size1+size2 );
+            }
+         }
+      } else {
+         framesProcessed =
+                 PaUtil_EndBufferProcessing( &(stream->bufferProcessor),
+                                             &callbackResult );
+      }
+
+   }
+   else
+   {
+      /* ------------------ Input
+       *
+       * First, we read off the audio data and put it in the ring buffer.
+       * if this is an input-only stream, we need to process it more,
+       * otherwise, we let the output case deal with it.
+       */
+      OSErr err = 0;
+      int chan = stream->inputAudioBufferList.mBuffers[0].mNumberChannels ;
+      /* FIXME: looping here may not actually be necessary, but it was something I tried in testing. */
+      do {
+         err= AudioUnitRender(stream->inputUnit,
+                 ioActionFlags,
+                 inTimeStamp,
+                 INPUT_ELEMENT,
+                 inNumberFrames,
+                 &stream->inputAudioBufferList );
+         if( err == -10874 )
+            inNumberFrames /= 2;
+      } while( err == -10874 && inNumberFrames > 1 );
+      /* FEEDBACK: I'm not sure what to do when this call fails */
+      ERR( err );
+      assert( !err );
+      if( stream->inputSRConverter || stream->outputUnit )
+      {
+         /* If this is duplex or we use a converter, put the data
+            into the ring buffer. */
+         long bytesIn, bytesOut;
+         bytesIn = sizeof( float ) * inNumberFrames * chan;
+         bytesOut = RingBuffer_Write( &stream->inputRingBuffer,
+                                stream->inputAudioBufferList.mBuffers[0].mData,
+                                bytesIn );
+         if( bytesIn != bytesOut )
+            stream->xrunFlags |= paInputOverflow ;
+      }
+      else
+      {
+         /* for simplex input w/o SR conversion,
+            just pop the data into the buffer processor.*/
+         PaUtil_BeginBufferProcessing( &(stream->bufferProcessor),
+                              &timeInfo,
+                              stream->xrunFlags );
+         stream->xrunFlags = 0;
+
+         PaUtil_SetInputFrameCount( &(stream->bufferProcessor), inNumberFrames);
+         PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),
+                             0,
+                             stream->inputAudioBufferList.mBuffers[0].mData,
+                             chan );
+         framesProcessed =
+              PaUtil_EndBufferProcessing( &(stream->bufferProcessor),
+                                          &callbackResult );
+      }
+      if( !stream->outputUnit && stream->inputSRConverter )
+      {
+         /* ------------------ Simplex Input w/ SR Conversion
+          *
+          * if this is a simplex input stream, we need to read off the buffer,
+          * do our sample rate conversion and pass the results to the buffer
+          * processor.
+          * The logic here is complicated somewhat by the fact that we don't
+          * know how much data is available, so we loop on reasonably sized
+          * chunks, and let the BufferProcessor deal with the rest.
+          *
+          */
+         /*This might be too big or small depending on SR conversion*/
+         float data[ chan * inNumberFrames ];
+         OSStatus err;
+         do
+         { /*Run the buffer processor until we are out of data*/
+            UInt32 size;
+            long f;
+
+            size = sizeof( data );
+            err = AudioConverterFillBuffer( 
+                          stream->inputSRConverter,
+                          ringBufferIOProc,
+                          &stream->inputRingBuffer,
+                          &size,
+                          (void *)data );
+            if( err != RING_BUFFER_EMPTY )
+               ERR( err );
+            assert( err == 0 || err == RING_BUFFER_EMPTY );
+
+            f = size / ( chan * sizeof(float) );
+            PaUtil_SetInputFrameCount( &(stream->bufferProcessor), f );
+            if( f )
+            {
+               PaUtil_BeginBufferProcessing( &(stream->bufferProcessor),
+                                             &timeInfo,
+                                             stream->xrunFlags );
+               stream->xrunFlags = 0;
+
+               PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor),
+                                0,
+                                data,
+                                chan );
+               framesProcessed =
+                    PaUtil_EndBufferProcessing( &(stream->bufferProcessor),
+                                                &callbackResult );
+            }
+         } while( callbackResult == paContinue && !err );
+      }
+   }
+
+   switch( callbackResult )
+   {
+   case paContinue: break;
+   case paComplete:
+   case paAbort:
+      stream->isTimeSet = FALSE;
+      stream->state = CALLBACK_STOPPED ;
+      if( stream->outputUnit )
+         AudioOutputUnitStop(stream->outputUnit);
+      if( stream->inputUnit )
+         AudioOutputUnitStop(stream->inputUnit);
+      break;
+   }
+
+   PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );
+   return noErr;
+}
+
+
+/*
+    When CloseStream() is called, the multi-api layer ensures that
+    the stream has already been stopped or aborted.
+*/
+static PaError CloseStream( PaStream* s )
+{
+    /* This may be called from a failed OpenStream.
+       Therefore, each piece of info is treated seperately. */
+    PaError result = paNoError;
+    PaMacCoreStream *stream = (PaMacCoreStream*)s;
+
+    VVDBUG(("CloseStream()\n"));
+    VDBUG( ( "Closing stream.\n" ) );
+
+    if( stream ) {
+       if( stream->outputUnit && stream->outputUnit != stream->inputUnit ) {
+          AudioUnitUninitialize( stream->outputUnit );
+          CloseComponent( stream->outputUnit );
+       }
+       stream->outputUnit = NULL;
+       if( stream->inputUnit )
+       {
+          AudioUnitUninitialize( stream->inputUnit );
+          CloseComponent( stream->inputUnit );
+          stream->inputUnit = NULL;
+       }
+       if( stream->inputRingBuffer.buffer )
+          free( (void *) stream->inputRingBuffer.buffer );
+       stream->inputRingBuffer.buffer = NULL;
+       /*TODO: is there more that needs to be done on error
+               from AudioConverterDispose?*/
+       if( stream->inputSRConverter )
+          ERR( AudioConverterDispose( stream->inputSRConverter ) );
+       stream->inputSRConverter = NULL;
+       if( stream->inputAudioBufferList.mBuffers[0].mData )
+          free( stream->inputAudioBufferList.mBuffers[0].mData );
+       stream->inputAudioBufferList.mBuffers[0].mData = NULL;
+
+       result = destroyBlioRingBuffers( &stream->blio );
+       if( result )
+          return result;
+       if( stream->bufferProcessorIsInitialized )
+          PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
+       PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );
+       PaUtil_FreeMemory( stream );
+    }
+
+    return result;
+}
+
+
+static PaError StartStream( PaStream *s )
+{
+    PaMacCoreStream *stream = (PaMacCoreStream*)s;
+    OSErr result = noErr;
+    VVDBUG(("StartStream()\n"));
+    VDBUG( ( "Starting stream.\n" ) );
+
+#define ERR_WRAP(mac_err) do { result = mac_err ; if ( result != noErr ) return ERR(result) ; } while(0)
+
+    /*FIXME: maybe want to do this on close/abort for faster start? */
+    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );
+    if(  stream->inputSRConverter )
+       ERR_WRAP( AudioConverterReset( stream->inputSRConverter ) );
+
+    /* -- start -- */
+    stream->state = ACTIVE;
+    if( stream->inputUnit ) {
+       ERR_WRAP( AudioOutputUnitStart(stream->inputUnit) );
+    }
+    if( stream->outputUnit && stream->outputUnit != stream->inputUnit ) {
+       ERR_WRAP( AudioOutputUnitStart(stream->outputUnit) );
+    }
+
+    //setStreamStartTime( stream );
+    //stream->isTimeSet = TRUE;
+
+    return paNoError;
+#undef ERR_WRAP
+}
+
+
+static PaError StopStream( PaStream *s )
+{
+    PaMacCoreStream *stream = (PaMacCoreStream*)s;
+    OSErr result = noErr;
+    PaError paErr;
+    VVDBUG(("StopStream()\n"));
+
+    VDBUG( ("Waiting for BLIO.\n") );
+    waitUntilBlioWriteBufferIsFlushed( &stream->blio );
+    VDBUG( ( "Stopping stream.\n" ) );
+
+    stream->isTimeSet = FALSE;
+    stream->state = STOPPING;
+
+#define ERR_WRAP(mac_err) do { result = mac_err ; if ( result != noErr ) return ERR(result) ; } while(0)
+    /* -- stop and reset -- */
+    if( stream->inputUnit == stream->outputUnit && stream->inputUnit )
+    {
+       ERR_WRAP( AudioOutputUnitStop(stream->inputUnit) );
+       ERR_WRAP( AudioUnitReset(stream->inputUnit, kAudioUnitScope_Global, 1) );
+       ERR_WRAP( AudioUnitReset(stream->inputUnit, kAudioUnitScope_Global, 0) );
+    }
+    else
+    {
+       if( stream->inputUnit )
+       {
+          ERR_WRAP(AudioOutputUnitStop(stream->inputUnit) );
+          ERR_WRAP(AudioUnitReset(stream->inputUnit,kAudioUnitScope_Global,1));
+       }
+       if( stream->outputUnit )
+       {
+          ERR_WRAP(AudioOutputUnitStop(stream->outputUnit));
+          ERR_WRAP(AudioUnitReset(stream->outputUnit,kAudioUnitScope_Global,0));
+       }
+    }
+    if( stream->inputRingBuffer.buffer ) {
+       RingBuffer_Flush( &stream->inputRingBuffer );
+       bzero( (void *)stream->inputRingBuffer.buffer,
+              stream->inputRingBuffer.bufferSize );
+       /* advance the write point a little, so we are reading from the
+          middle of the buffer. We'll need extra at the end because
+          testing has shown that this helps. */
+       if( stream->outputUnit )
+          RingBuffer_AdvanceWriteIndex( &stream->inputRingBuffer,
+                                    stream->inputRingBuffer.bufferSize
+                                           / RING_BUFFER_ADVANCE_DENOMINATOR );
+    }
+
+    stream->xrunFlags = 0;
+    stream->state = STOPPED;
+
+    paErr = resetBlioRingBuffers( &stream->blio );
+    if( paErr )
+       return paErr;
+
+/*
+    //stream->isTimeSet = FALSE;
+*/
+
+    VDBUG( ( "Stream Stopped.\n" ) );
+    return paNoError;
+#undef ERR_WRAP
+}
+
+static PaError AbortStream( PaStream *s )
+{
+    VVDBUG(("AbortStream()->StopStream()\n"));
+    VDBUG( ( "Aborting stream.\n" ) );
+    /* We have nothing faster than StopStream. */
+    return StopStream(s);
+}
+
+
+static PaError IsStreamStopped( PaStream *s )
+{
+    PaMacCoreStream *stream = (PaMacCoreStream*)s;
+    VVDBUG(("IsStreamStopped()\n"));
+
+    return stream->state == STOPPED ? 1 : 0;
+}
+
+
+static PaError IsStreamActive( PaStream *s )
+{
+    PaMacCoreStream *stream = (PaMacCoreStream*)s;
+    VVDBUG(("IsStreamActive()\n"));
+    return ( stream->state == ACTIVE || stream->state == STOPPING );
+}
+
+
+static double GetStreamCpuLoad( PaStream* s )
+{
+    PaMacCoreStream *stream = (PaMacCoreStream*)s;
+    VVDBUG(("GetStreamCpuLoad()\n"));
+
+    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core.h	(revision 1163)
@@ -0,0 +1,118 @@
+/*
+ * PortAudio Portable Real-Time Audio Library
+ * Macintosh Core Audio specific extensions
+ * portaudio.h should be included before this file.
+ *
+ * Copyright (c) 2005-2006 Bjorn Roche
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ * A pointer to a paMacCoreStreamInfo may be passed as
+ * the hostApiSpecificStreamInfo in the PaStreamParameters struct
+ * when opening a stream or querying the format. Use NULL, for the
+ * defaults. Note that for duplex streams, both infos should be the
+ * same or behaviour is undefined.
+ */
+typedef struct paMacCoreStreamInfo
+{
+    unsigned long size;         /**size of whole structure including this header */
+    PaHostApiTypeId hostApiType;/**host API for which this data is intended */
+    unsigned long version;      /**structure version */
+    unsigned long flags;        /* flags to modify behaviour */
+} paMacCoreStreamInfo;
+
+/* Use this function to initialize a paMacCoreStreamInfo struct
+   using the requested flags. */
+void paSetupMacCoreStreamInfo( paMacCoreStreamInfo *data, unsigned long flags )
+{
+   bzero( data, sizeof( paMacCoreStreamInfo ) );
+   data->size = sizeof( paMacCoreStreamInfo );
+   data->hostApiType = paCoreAudio;
+   data->version = 0x01;
+   data->flags = flags;
+}
+
+/*
+ * The following flags alter the behaviour of PA on the mac platform.
+ * they can be ORed together. These should work both for opening and
+ * checking a device.
+ */
+/* Allows PortAudio to change things like the device's frame size,
+ * which allows for much lower latency, but might disrupt the device
+ * if other programs are using it, even when you are just Querying
+ * the device. */
+const unsigned long paMacCore_ChangeDeviceParameters      = 0x01;
+
+/* In combination with the above flag,
+ * causes the stream opening to fail, unless the exact sample rates
+ * are supported by the device. */
+const unsigned long paMacCore_FailIfConversionRequired    = 0x02;
+
+/* These flags set the SR conversion quality, if required. The wierd ordering
+ * allows Maximum Quality to be the default.*/
+const unsigned long paMacCore_ConversionQualityMin    = 0x0100;
+const unsigned long paMacCore_ConversionQualityMedium = 0x0200;
+const unsigned long paMacCore_ConversionQualityLow    = 0x0300;
+const unsigned long paMacCore_ConversionQualityHigh   = 0x0400;
+const unsigned long paMacCore_ConversionQualityMax    = 0x0000;
+
+/*
+ * Here are some "preset" combinations of flags (above) to get to some
+ * common configurations. THIS IS OVERKILL, but if more flags are added
+ * it won't be.
+ */
+/*This is the default setting: do as much sample rate conversion as possible
+ * and as little mucking with the device as possible. */
+const unsigned long paMacCorePlayNice = 0x00;
+/*This setting is tuned for pro audio apps. It allows SR conversion on input
+  and output, but it tries to set the appropriate SR on the device.*/
+const unsigned long paMacCorePro      = 0x01;
+/*This is a setting to minimize CPU usage and still play nice.*/
+const unsigned long paMacCoreMinimizeCPUButPlayNice = 0x0100;
+/*This is a setting to minimize CPU usage, even if that means interrupting the device. */
+const unsigned long paMacCoreMinimizeCPU = 0x0101;
+
+#ifdef PA_OLD_CORE_AUDIO
+#	define kAudioOutputUnitProperty_EnableIO         	2003
+#	define kAudioOutputUnitProperty_SetInputCallback 	2005
+#endif
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_blocking.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_blocking.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_blocking.c	(revision 1163)
@@ -0,0 +1,564 @@
+/*
+ * Implementation of the PortAudio API for Apple AUHAL
+ *
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ *
+ * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.
+ * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)
+ *
+ * Dominic's code was based on code by Phil Burk, Darren Gibbs,
+ * Gord Peters, Stephane Letz, and Greg Pfiel.
+ *
+ * The following people also deserve acknowledgements:
+ *
+ * Olivier Tristan for feedback and testing
+ * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O
+ * interface.
+ * 
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/**
+ @file
+ @ingroup hostaip_src
+
+ This file contains the implementation
+ required for blocking I/O. It is separated from pa_mac_core.c simply to ease
+ development.
+*/
+
+#include "pa_mac_core_blocking.h"
+#include "pa_mac_core_internal.h"
+#include <assert.h>
+#ifdef MOSX_USE_NON_ATOMIC_FLAG_BITS
+# define OSAtomicOr32( a, b ) ( (*(b)) |= (a) )
+# define OSAtomicAnd32( a, b ) ( (*(b)) &= (a) )
+#else
+# include <libkern/OSAtomic.h>
+#endif
+
+/*
+ * This fnuction determines the size of a particular sample format.
+ * if the format is not recognized, this returns zero.
+ */
+static size_t computeSampleSizeFromFormat( PaSampleFormat format )
+{
+   switch( format ) {
+   case paFloat32: return 4;
+   case paInt32: return 4;
+   case paInt24: return 3;
+   case paInt16: return 2;
+   case paInt8: case paUInt8: return 1;
+   default: return 0;
+   }
+}
+
+
+/*
+ * Functions for initializing, resetting, and destroying BLIO structures.
+ *
+ */
+
+/* This should be called with the relevant info when initializing a stream for
+   callback. */
+PaError initializeBlioRingBuffers(
+                                       PaMacBlio *blio,
+                                       PaSampleFormat inputSampleFormat,
+                                       PaSampleFormat outputSampleFormat,
+                                       size_t framesPerBuffer,
+                                       long ringBufferSize,
+                                       int inChan,
+                                       int outChan )
+{
+   void *data;
+   int result;
+
+   /* zeroify things */
+   bzero( blio, sizeof( PaMacBlio ) );
+   /* this is redundant, but the buffers are used to check
+      if the bufffers have been initialized, so we do it explicitly. */
+   blio->inputRingBuffer.buffer = NULL;
+   blio->outputRingBuffer.buffer = NULL;
+
+   /* initialize simple data */
+   blio->inputSampleFormat = inputSampleFormat;
+   blio->inputSampleSize = computeSampleSizeFromFormat(inputSampleFormat);
+   blio->outputSampleFormat = outputSampleFormat;
+   blio->outputSampleSize = computeSampleSizeFromFormat(outputSampleFormat);
+   blio->framesPerBuffer = framesPerBuffer;
+   blio->inChan = inChan;
+   blio->outChan = outChan;
+   blio->statusFlags = 0;
+   blio->errors = paNoError;
+#ifdef PA_MAC_BLIO_MUTEX
+   blio->isInputEmpty = false;
+   blio->isOutputFull = false;
+#endif
+
+   /* setup ring buffers */
+#ifdef PA_MAC_BLIO_MUTEX
+   result = PaMacCore_SetUnixError( pthread_mutex_init(&(blio->inputMutex),NULL), 0 );
+   if( result )
+      goto error;
+   result = UNIX_ERR( pthread_cond_init( &(blio->inputCond), NULL ) );
+   if( result )
+      goto error;
+   result = UNIX_ERR( pthread_mutex_init(&(blio->outputMutex),NULL) );
+   if( result )
+      goto error;
+   result = UNIX_ERR( pthread_cond_init( &(blio->outputCond), NULL ) );
+#endif
+   if( inChan ) {
+      data = calloc( ringBufferSize, blio->inputSampleSize );
+      if( !data )
+      {
+         result = paInsufficientMemory;
+         goto error;
+      }
+
+      assert( 0 == RingBuffer_Init(
+            &blio->inputRingBuffer,
+            ringBufferSize*blio->inputSampleSize,
+            data ) );
+   }
+   if( outChan ) {
+      data = calloc( ringBufferSize, blio->outputSampleSize );
+      if( !data )
+      {
+         result = paInsufficientMemory;
+         goto error;
+      }
+
+      assert( 0 == RingBuffer_Init(
+            &blio->outputRingBuffer,
+            ringBufferSize*blio->outputSampleSize,
+            data ) );
+   }
+
+   result = resetBlioRingBuffers( blio );
+   if( result )
+      goto error;
+
+   return 0;
+
+ error:
+   destroyBlioRingBuffers( blio );
+   return result;
+}
+
+#ifdef PA_MAC_BLIO_MUTEX
+PaError blioSetIsInputEmpty( PaMacBlio *blio, bool isEmpty )
+{
+   PaError result = paNoError;
+   if( isEmpty == blio->isInputEmpty )
+      goto done;
+
+   /* we need to update the value. Here's what we do:
+    * - Lock the mutex, so noone else can write.
+    * - update the value.
+    * - unlock.
+    * - broadcast to all listeners.
+    */
+   result = UNIX_ERR( pthread_mutex_lock( &blio->inputMutex ) );
+   if( result )
+      goto done;
+   blio->isInputEmpty = isEmpty;
+   result = UNIX_ERR( pthread_mutex_unlock( &blio->inputMutex ) );
+   if( result )
+      goto done;
+   result = UNIX_ERR( pthread_cond_broadcast( &blio->inputCond ) );
+   if( result )
+      goto done;
+
+ done:
+   return result;
+}
+PaError blioSetIsOutputFull( PaMacBlio *blio, bool isFull )
+{
+   PaError result = paNoError;
+   if( isFull == blio->isOutputFull )
+      goto done;
+
+   /* we need to update the value. Here's what we do:
+    * - Lock the mutex, so noone else can write.
+    * - update the value.
+    * - unlock.
+    * - broadcast to all listeners.
+    */
+   result = UNIX_ERR( pthread_mutex_lock( &blio->outputMutex ) );
+   if( result )
+      goto done;
+   blio->isOutputFull = isFull;
+   result = UNIX_ERR( pthread_mutex_unlock( &blio->outputMutex ) );
+   if( result )
+      goto done;
+   result = UNIX_ERR( pthread_cond_broadcast( &blio->outputCond ) );
+   if( result )
+      goto done;
+
+ done:
+   return result;
+}
+#endif
+
+/* This should be called after stopping or aborting the stream, so that on next
+   start, the buffers will be ready. */
+PaError resetBlioRingBuffers( PaMacBlio *blio )
+{
+#ifdef PA_MAC__BLIO_MUTEX
+   int result;
+#endif
+   blio->statusFlags = 0;
+   if( blio->outputRingBuffer.buffer ) {
+      RingBuffer_Flush( &blio->outputRingBuffer );
+      bzero( blio->outputRingBuffer.buffer,
+             blio->outputRingBuffer.bufferSize );
+      /* Advance buffer */
+      RingBuffer_AdvanceWriteIndex( &blio->outputRingBuffer, blio->outputRingBuffer.bufferSize );
+
+      /* Update isOutputFull. */
+#ifdef PA_MAC__BLIO_MUTEX
+      result = blioSetIsOutputFull( blio, toAdvance == blio->outputRingBuffer.bufferSize );
+      if( result )
+         goto error;
+#endif
+/*
+      printf( "------%d\n" ,  blio->framesPerBuffer );
+      printf( "------%d\n" ,  blio->outChan );
+      printf( "------%d\n" ,  blio->outputSampleSize );
+      printf( "------%d\n" ,  blio->framesPerBuffer*blio->outChan*blio->outputSampleSize );
+*/
+   }
+   if( blio->inputRingBuffer.buffer ) {
+      RingBuffer_Flush( &blio->inputRingBuffer );
+      bzero( blio->inputRingBuffer.buffer,
+             blio->inputRingBuffer.bufferSize );
+      /* Update isInputEmpty. */
+#ifdef PA_MAC__BLIO_MUTEX
+      result = blioSetIsInputEmpty( blio, true );
+      if( result )
+         goto error;
+#endif
+   }
+   return paNoError;
+#ifdef PA_MAC__BLIO_MUTEX
+ error:
+   return result;
+#endif
+}
+
+/*This should be called when you are done with the blio. It can safely be called
+  multiple times if there are no exceptions. */
+PaError destroyBlioRingBuffers( PaMacBlio *blio )
+{
+   PaError result = paNoError;
+   if( blio->inputRingBuffer.buffer ) {
+      free( blio->inputRingBuffer.buffer );
+#ifdef PA_MAC__BLIO_MUTEX
+      result = UNIX_ERR( pthread_mutex_destroy( & blio->inputMutex ) );
+      if( result ) return result;
+      result = UNIX_ERR( pthread_cond_destroy( & blio->inputCond ) );
+      if( result ) return result;
+#endif
+   }
+   blio->inputRingBuffer.buffer = NULL;
+   if( blio->outputRingBuffer.buffer ) {
+      free( blio->outputRingBuffer.buffer );
+#ifdef PA_MAC__BLIO_MUTEX
+      result = UNIX_ERR( pthread_mutex_destroy( & blio->outputMutex ) );
+      if( result ) return result;
+      result = UNIX_ERR( pthread_cond_destroy( & blio->outputCond ) );
+      if( result ) return result;
+#endif
+   }
+   blio->outputRingBuffer.buffer = NULL;
+
+   return result;
+}
+
+/*
+ * this is the BlioCallback function. It expects to recieve a PaMacBlio Object
+ * pointer as userData.
+ *
+ */
+int BlioCallback( const void *input, void *output, unsigned long frameCount,
+	const PaStreamCallbackTimeInfo* timeInfo,
+        PaStreamCallbackFlags statusFlags,
+        void *userData )
+{
+   PaMacBlio *blio = (PaMacBlio*)userData;
+   long avail;
+   long toRead;
+   long toWrite;
+
+   /* set flags returned by OS: */
+   OSAtomicOr32( statusFlags, &blio->statusFlags ) ;
+
+   /* --- Handle Input Buffer --- */
+   if( blio->inChan ) {
+      avail = RingBuffer_GetWriteAvailable( &blio->inputRingBuffer );
+
+      /* check for underflow */
+      if( avail < frameCount * blio->inputSampleSize * blio->inChan )
+         OSAtomicOr32( paInputOverflow, &blio->statusFlags );
+
+      toRead = MIN( avail, frameCount * blio->inputSampleSize * blio->inChan );
+
+      /* copy the data */
+      /*printf( "reading %d\n", toRead );*/
+      assert( toRead == RingBuffer_Write( &blio->inputRingBuffer, input, toRead ) );
+#ifdef PA_MAC__BLIO_MUTEX
+      /* Priority inversion. See notes below. */
+      blioSetIsInputEmpty( blio, false );
+#endif
+   }
+
+
+   /* --- Handle Output Buffer --- */
+   if( blio->outChan ) {
+      avail = RingBuffer_GetReadAvailable( &blio->outputRingBuffer );
+
+      /* check for underflow */
+      if( avail < frameCount * blio->outputSampleSize * blio->outChan )
+         OSAtomicOr32( paOutputUnderflow, &blio->statusFlags );
+
+      toWrite = MIN( avail, frameCount * blio->outputSampleSize * blio->outChan );
+
+      if( toWrite != frameCount * blio->outputSampleSize * blio->outChan )
+         bzero( ((char *)output)+toWrite,
+                frameCount * blio->outputSampleSize * blio->outChan - toWrite );
+      /* copy the data */
+      /*printf( "writing %d\n", toWrite );*/
+      assert( toWrite == RingBuffer_Read( &blio->outputRingBuffer, output, toWrite ) );
+#ifdef PA_MAC__BLIO_MUTEX
+      /* We have a priority inversion here. However, we will only have to
+         wait if this was true and is now false, which means we've got
+         some room in the buffer.
+         Hopefully problems will be minimized. */
+      blioSetIsOutputFull( blio, false );
+#endif
+   }
+
+   return paContinue;
+}
+
+PaError ReadStream( PaStream* stream,
+                           void *buffer,
+                           unsigned long frames )
+{
+    PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
+    char *cbuf = (char *) buffer;
+    PaError ret = paNoError;
+    VVDBUG(("ReadStream()\n"));
+
+    while( frames > 0 ) {
+       long avail;
+       long toRead;
+       do {
+          avail = RingBuffer_GetReadAvailable( &blio->inputRingBuffer );
+/*
+          printf( "Read Buffer is %%%g full: %ld of %ld.\n",
+                  100 * (float)avail / (float) blio->inputRingBuffer.bufferSize,
+                  avail, blio->inputRingBuffer.bufferSize );
+*/
+          if( avail == 0 ) {
+#ifdef PA_MAC_BLIO_MUTEX
+             /**block when empty*/
+             ret = UNIX_ERR( pthread_mutex_lock( &blio->inputMutex ) );
+             if( ret )
+                return ret;
+             while( blio->isInputEmpty ) {
+                ret = UNIX_ERR( pthread_cond_wait( &blio->inputCond, &blio->inputMutex ) );
+                if( ret )
+                   return ret;
+             }
+             ret = UNIX_ERR( pthread_mutex_unlock( &blio->inputMutex ) );
+             if( ret )
+                return ret;
+#else
+             Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );
+#endif
+          }
+       } while( avail == 0 );
+       toRead = MIN( avail, frames * blio->inputSampleSize * blio->inChan );
+       toRead -= toRead % blio->inputSampleSize * blio->inChan ;
+       RingBuffer_Read( &blio->inputRingBuffer, (void *)cbuf, toRead );
+       cbuf += toRead;
+       frames -= toRead / ( blio->inputSampleSize * blio->inChan );
+
+       if( toRead == avail ) {
+#ifdef PA_MAC_BLIO_MUTEX
+          /* we just emptied the buffer, so we need to mark it as empty. */
+          ret = blioSetIsInputEmpty( blio, true );
+          if( ret )
+             return ret;
+          /* of course, in the meantime, the callback may have put some sats
+             in, so
+             so check for that, too, to avoid a race condition. */
+          if( RingBuffer_GetReadAvailable( &blio->inputRingBuffer ) ) {
+             blioSetIsInputEmpty( blio, false );
+             if( ret )
+                return ret;
+          }
+#endif
+       }
+    }
+
+    /*   Report either paNoError or paInputOverflowed. */
+    /*   may also want to report other errors, but this is non-standard. */
+    ret = blio->statusFlags & paInputOverflow;
+
+    /* report underflow only once: */
+    if( ret ) {
+       OSAtomicAnd32( ~paInputOverflow, &blio->statusFlags );
+       ret = paInputOverflowed;
+    }
+
+    return ret;
+}
+
+
+PaError WriteStream( PaStream* stream,
+                            const void *buffer,
+                            unsigned long frames )
+{
+    PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
+    char *cbuf = (char *) buffer;
+    PaError ret = paNoError;
+    VVDBUG(("WriteStream()\n"));
+
+    while( frames > 0 ) {
+       long avail = 0;
+       long toWrite;
+
+       do {
+          avail = RingBuffer_GetWriteAvailable( &blio->outputRingBuffer );
+/*
+          printf( "Write Buffer is %%%g full: %ld of %ld.\n",
+                  100 - 100 * (float)avail / (float) blio->outputRingBuffer.bufferSize,
+                  avail, blio->outputRingBuffer.bufferSize );
+*/
+          if( avail == 0 ) {
+#ifdef PA_MAC_BLIO_MUTEX
+             /*block while full*/
+             ret = UNIX_ERR( pthread_mutex_lock( &blio->outputMutex ) );
+             if( ret )
+                return ret;
+             while( blio->isOutputFull ) {
+                ret = UNIX_ERR( pthread_cond_wait( &blio->outputCond, &blio->outputMutex ) );
+                if( ret )
+                   return ret;
+             }
+             ret = UNIX_ERR( pthread_mutex_unlock( &blio->outputMutex ) );
+             if( ret )
+                return ret;
+#else
+             Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );
+#endif
+          }
+       } while( avail == 0 );
+
+       toWrite = MIN( avail, frames * blio->outputSampleSize * blio->outChan );
+       toWrite -= toWrite % blio->outputSampleSize * blio->outChan ;
+       RingBuffer_Write( &blio->outputRingBuffer, (void *)cbuf, toWrite );
+       cbuf += toWrite;
+       frames -= toWrite / ( blio->outputSampleSize * blio->outChan );
+
+#ifdef PA_MAC_BLIO_MUTEX
+       if( toWrite == avail ) {
+          /* we just filled up the buffer, so we need to mark it as filled. */
+          ret = blioSetIsOutputFull( blio, true );
+          if( ret )
+             return ret;
+          /* of course, in the meantime, we may have emptied the buffer, so
+             so check for that, too, to avoid a race condition. */
+          if( RingBuffer_GetWriteAvailable( &blio->outputRingBuffer ) ) {
+             blioSetIsOutputFull( blio, false );
+             if( ret )
+                return ret;
+          }
+       }
+#endif
+    }
+
+    /*   Report either paNoError or paOutputUnderflowed. */
+    /*   may also want to report other errors, but this is non-standard. */
+    ret = blio->statusFlags & paOutputUnderflow;
+
+    /* report underflow only once: */
+    if( ret ) {
+      OSAtomicAnd32( ~paOutputUnderflow, &blio->statusFlags );
+      ret = paOutputUnderflowed;
+    }
+
+    return ret;
+}
+
+/*
+ *
+ */
+void waitUntilBlioWriteBufferIsFlushed( PaMacBlio *blio )
+{
+    if( blio->outputRingBuffer.buffer ) {
+       long avail = RingBuffer_GetWriteAvailable( &blio->outputRingBuffer );
+       while( avail != blio->outputRingBuffer.bufferSize ) {
+          if( avail == 0 )
+             Pa_Sleep( PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL );
+          avail = RingBuffer_GetWriteAvailable( &blio->outputRingBuffer );
+       }
+    }
+}
+
+
+signed long GetStreamReadAvailable( PaStream* stream )
+{
+    PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
+    VVDBUG(("GetStreamReadAvailable()\n"));
+
+    return RingBuffer_GetReadAvailable( &blio->inputRingBuffer )
+                         / ( blio->outputSampleSize * blio->outChan );
+}
+
+
+signed long GetStreamWriteAvailable( PaStream* stream )
+{
+    PaMacBlio *blio = & ((PaMacCoreStream*)stream) -> blio;
+    VVDBUG(("GetStreamWriteAvailable()\n"));
+
+    return RingBuffer_GetWriteAvailable( &blio->outputRingBuffer )
+                         / ( blio->outputSampleSize * blio->outChan );
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_blocking.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_blocking.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_blocking.h	(revision 1163)
@@ -0,0 +1,133 @@
+/*
+ * Internal blocking interfaces for PortAudio Apple AUHAL implementation
+ *
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ *
+ * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.
+ * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)
+ *
+ * Dominic's code was based on code by Phil Burk, Darren Gibbs,
+ * Gord Peters, Stephane Letz, and Greg Pfiel.
+ *
+ * The following people also deserve acknowledgements:
+ *
+ * Olivier Tristan for feedback and testing
+ * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O
+ * interface.
+ * 
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/**
+ @file
+ @ingroup hostaip_src
+*/
+
+#ifndef PA_MAC_CORE_BLOCKING_H_
+#define PA_MAC_CORE_BLOCKING_H_
+
+#include "ringbuffer.h"
+#include "portaudio.h"
+#include "pa_mac_core_utilities.h"
+
+/*
+ * Number of miliseconds to busy wait whil waiting for data in blocking calls.
+ */
+#define PA_MAC_BLIO_BUSY_WAIT_SLEEP_INTERVAL (5)
+/*
+ * Define exactly one of these blocking methods
+ * PA_MAC_BLIO_MUTEX is not actively maintained.
+ */
+#define PA_MAC_BLIO_BUSY_WAIT
+/*
+#define PA_MAC_BLIO_MUTEX
+*/
+
+typedef struct {
+    RingBuffer inputRingBuffer;
+    RingBuffer outputRingBuffer;
+    PaSampleFormat inputSampleFormat;
+    size_t inputSampleSize;
+    PaSampleFormat outputSampleFormat;
+    size_t outputSampleSize;
+
+    size_t framesPerBuffer;
+
+    int inChan;
+    int outChan;
+
+    //PaStreamCallbackFlags statusFlags;
+    uint32_t statusFlags;
+    PaError errors;
+
+    /* Here we handle blocking, using condition variables. */
+#ifdef  PA_MAC_BLIO_MUTEX
+    volatile bool isInputEmpty;
+    pthread_mutex_t inputMutex;
+    pthread_cond_t inputCond;
+
+    volatile bool isOutputFull;
+    pthread_mutex_t outputMutex;
+    pthread_cond_t outputCond;
+#endif
+}
+PaMacBlio;
+
+/*
+ * These functions operate on condition and related variables.
+ */
+
+PaError initializeBlioRingBuffers(
+                                       PaMacBlio *blio,
+                                       PaSampleFormat inputSampleFormat,
+                                       PaSampleFormat outputSampleFormat,
+                                       size_t framesPerBuffer,
+                                       long ringBufferSize,
+                                       int inChan,
+                                       int outChan );
+PaError destroyBlioRingBuffers( PaMacBlio *blio );
+PaError resetBlioRingBuffers( PaMacBlio *blio );
+
+int BlioCallback(
+        const void *input, void *output,
+        unsigned long frameCount,
+        const PaStreamCallbackTimeInfo* timeInfo,
+        PaStreamCallbackFlags statusFlags,
+        void *userData );
+
+void waitUntilBlioWriteBufferIsFlushed( PaMacBlio *blio );
+
+#endif /*PA_MAC_CORE_BLOCKING_H_*/
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_internal.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_internal.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_internal.h	(revision 1163)
@@ -0,0 +1,162 @@
+/*
+ * Internal interfaces for PortAudio Apple AUHAL implementation
+ *
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ *
+ * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.
+ * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)
+ *
+ * Dominic's code was based on code by Phil Burk, Darren Gibbs,
+ * Gord Peters, Stephane Letz, and Greg Pfiel.
+ *
+ * The following people also deserve acknowledgements:
+ *
+ * Olivier Tristan for feedback and testing
+ * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O
+ * interface.
+ * 
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/**
+ @file pa_mac_core
+ @ingroup hostapi_src
+ @author Bjorn Roche
+ @brief AUHAL implementation of PortAudio
+*/
+
+#ifndef PA_MAC_CORE_INTERNAL_H__
+#define PA_MAC_CORE_INTERNAL_H__
+
+#include <AudioUnit/AudioUnit.h>
+#include <AudioToolbox/AudioToolbox.h>
+
+
+#include "portaudio.h"
+#include "pa_util.h"
+#include "pa_hostapi.h"
+#include "pa_stream.h"
+#include "pa_allocation.h"
+#include "pa_cpuload.h"
+#include "pa_process.h"
+#include "ringbuffer.h"
+
+#include "pa_mac_core_blocking.h"
+
+/* function prototypes */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+PaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#define RING_BUFFER_ADVANCE_DENOMINATOR (4)
+
+PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );
+PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );
+signed long GetStreamReadAvailable( PaStream* stream );
+signed long GetStreamWriteAvailable( PaStream* stream );
+/* PaMacAUHAL - host api datastructure specific to this implementation */
+typedef struct
+{
+    PaUtilHostApiRepresentation inheritedHostApiRep;
+    PaUtilStreamInterface callbackStreamInterface;
+    PaUtilStreamInterface blockingStreamInterface;
+
+    PaUtilAllocationGroup *allocations;
+
+    /* implementation specific data goes here */
+    long devCount;
+    AudioDeviceID *devIds; /*array of all audio devices*/
+    AudioDeviceID defaultIn;
+    AudioDeviceID defaultOut;
+}
+PaMacAUHAL;
+
+
+
+/* stream data structure specifically for this implementation */
+typedef struct PaMacCoreStream
+{
+    PaUtilStreamRepresentation streamRepresentation;
+    PaUtilCpuLoadMeasurer cpuLoadMeasurer;
+    PaUtilBufferProcessor bufferProcessor;
+
+    /* implementation specific data goes here */
+    bool bufferProcessorIsInitialized;
+    AudioUnit inputUnit;
+    AudioUnit outputUnit;
+    AudioDeviceID inputDevice;
+    AudioDeviceID outputDevice;
+    size_t userInChan;
+    size_t userOutChan;
+    size_t inputFramesPerBuffer;
+    size_t outputFramesPerBuffer;
+    PaMacBlio blio;
+    /* We use this ring buffer when input and out devs are different. */
+    RingBuffer inputRingBuffer;
+    /* We may need to do SR conversion on input. */
+    AudioConverterRef inputSRConverter;
+    /* We need to preallocate an inputBuffer for reading data. */
+    AudioBufferList inputAudioBufferList;
+    AudioTimeStamp startTime;
+    volatile PaStreamCallbackFlags xrunFlags;
+    volatile bool isTimeSet;
+    volatile enum {
+       STOPPED          = 0, /* playback is completely stopped,
+                                and the user has called StopStream(). */
+       CALLBACK_STOPPED = 1, /* callback has requested stop,
+                                but user has not yet called StopStream(). */
+       STOPPING         = 2, /* The stream is in the process of closing.
+                                This state is just used internally;
+                                externally it is indistinguishable from
+                                ACTIVE.*/
+       ACTIVE           = 3  /* The stream is active and running. */
+    } state;
+    double sampleRate;
+    //these may be different from the stream sample rate due to SR conversion:
+    double outDeviceSampleRate;
+    double inDeviceSampleRate;
+}
+PaMacCoreStream;
+
+#endif /* PA_MAC_CORE_INTERNAL_H__ */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_old.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_old.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_old.c	(revision 1163)
@@ -0,0 +1,914 @@
+/*
+ * $Id$
+ * pa_mac_core.c
+ * Implementation of PortAudio for Mac OS X CoreAudio       
+ *                                                                                         
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ *
+ * Authors: Ross Bencina and Phil Burk
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+#include <CoreAudio/CoreAudio.h>
+#include <AudioToolbox/AudioToolbox.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <assert.h>
+
+#include "portaudio.h"
+#include "pa_trace.h"
+#include "pa_util.h"
+#include "pa_allocation.h"
+#include "pa_hostapi.h"
+#include "pa_stream.h"
+#include "pa_cpuload.h"
+#include "pa_process.h"
+
+// =====  constants  =====
+
+// =====  structs  =====
+#pragma mark structs
+
+// PaMacCoreHostApiRepresentation - host api datastructure specific to this implementation
+typedef struct PaMacCore_HAR
+{
+    PaUtilHostApiRepresentation inheritedHostApiRep;
+    PaUtilStreamInterface callbackStreamInterface;
+    PaUtilStreamInterface blockingStreamInterface;
+    
+    PaUtilAllocationGroup *allocations;
+    AudioDeviceID *macCoreDeviceIds;
+}
+PaMacCoreHostApiRepresentation;
+
+typedef struct PaMacCore_DI
+{
+    PaDeviceInfo inheritedDeviceInfo;
+}
+PaMacCoreDeviceInfo;
+
+// PaMacCoreStream - a stream data structure specifically for this implementation
+typedef struct PaMacCore_S
+{
+    PaUtilStreamRepresentation streamRepresentation;
+    PaUtilCpuLoadMeasurer cpuLoadMeasurer;
+    PaUtilBufferProcessor bufferProcessor;
+    
+    int primeStreamUsingCallback;
+    
+    AudioDeviceID inputDevice;
+    AudioDeviceID outputDevice;
+    
+    // Processing thread management --------------
+//    HANDLE abortEvent;
+//    HANDLE processingThread;
+//    DWORD processingThreadId;
+    
+    char throttleProcessingThreadOnOverload; // 0 -> don't throtte, non-0 -> throttle
+    int processingThreadPriority;
+    int highThreadPriority;
+    int throttledThreadPriority;
+    unsigned long throttledSleepMsecs;
+    
+    int isStopped;
+    volatile int isActive;
+    volatile int stopProcessing; // stop thread once existing buffers have been returned
+    volatile int abortProcessing; // stop thread immediately
+    
+//    DWORD allBuffersDurationMs; // used to calculate timeouts
+}
+PaMacCoreStream;
+
+// Data needed by the CoreAudio callback functions
+typedef struct PaMacCore_CD
+{
+    PaMacCoreStream *stream;
+    PaStreamCallback *callback;
+    void *userData;
+    PaUtilConverter *inputConverter;
+    PaUtilConverter *outputConverter;
+    void *inputBuffer;
+    void *outputBuffer;
+    int inputChannelCount;
+    int outputChannelCount;
+    PaSampleFormat inputSampleFormat;
+    PaSampleFormat outputSampleFormat;
+    PaUtilTriangularDitherGenerator *ditherGenerator;
+}
+PaMacClientData;
+
+// =====  CoreAudio-PortAudio bridge functions =====
+#pragma mark CoreAudio-PortAudio bridge functions
+
+// Maps CoreAudio OSStatus codes to PortAudio PaError codes
+static PaError conv_err(OSStatus error)
+{
+    PaError result;
+    
+    switch (error) {
+        case kAudioHardwareNoError:
+            result = paNoError; break;
+        case kAudioHardwareNotRunningError:
+            result = paInternalError; break;
+        case kAudioHardwareUnspecifiedError:
+            result = paInternalError; break;
+        case kAudioHardwareUnknownPropertyError:
+            result = paInternalError; break;
+        case kAudioHardwareBadPropertySizeError:
+            result = paInternalError; break;
+        case kAudioHardwareIllegalOperationError:
+            result = paInternalError; break;
+        case kAudioHardwareBadDeviceError:
+            result = paInvalidDevice; break;
+        case kAudioHardwareBadStreamError:
+            result = paBadStreamPtr; break;
+	//bennylp:
+        //case kAudioHardwareUnsupportedOperationError:
+        //    result = paInternalError; break;
+        case kAudioDeviceUnsupportedFormatError:
+            result = paSampleFormatNotSupported; break;
+        case kAudioDevicePermissionsError:
+            result = paDeviceUnavailable; break;
+        default:
+            result = paInternalError;
+    }
+    
+    return result;
+}
+
+/* This function is unused
+static AudioStreamBasicDescription *InitializeStreamDescription(const PaStreamParameters *parameters, double sampleRate)
+{
+    struct AudioStreamBasicDescription *streamDescription = PaUtil_AllocateMemory(sizeof(AudioStreamBasicDescription));
+    streamDescription->mSampleRate = sampleRate;
+    streamDescription->mFormatID = kAudioFormatLinearPCM;
+    streamDescription->mFormatFlags = 0;
+    streamDescription->mFramesPerPacket = 1;
+    
+    if (parameters->sampleFormat & paNonInterleaved) {
+        streamDescription->mFormatFlags |= kLinearPCMFormatFlagIsNonInterleaved;
+        streamDescription->mChannelsPerFrame = 1;
+        streamDescription->mBytesPerFrame = Pa_GetSampleSize(parameters->sampleFormat);
+        streamDescription->mBytesPerPacket = Pa_GetSampleSize(parameters->sampleFormat);
+    }
+    else {
+        streamDescription->mChannelsPerFrame = parameters->channelCount;
+    }
+    
+    streamDescription->mBytesPerFrame = Pa_GetSampleSize(parameters->sampleFormat) * streamDescription->mChannelsPerFrame;
+    streamDescription->mBytesPerPacket = streamDescription->mBytesPerFrame * streamDescription->mFramesPerPacket;
+    
+    if (parameters->sampleFormat & paFloat32) {
+        streamDescription->mFormatFlags |= kLinearPCMFormatFlagIsFloat;
+        streamDescription->mBitsPerChannel = 32;
+    }
+    else if (parameters->sampleFormat & paInt32) {
+        streamDescription->mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger;
+        streamDescription->mBitsPerChannel = 32;
+    }
+    else if (parameters->sampleFormat & paInt24) {
+        streamDescription->mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger;
+        streamDescription->mBitsPerChannel = 24;
+    }
+    else if (parameters->sampleFormat & paInt16) {
+        streamDescription->mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger;
+        streamDescription->mBitsPerChannel = 16;
+    }
+    else if (parameters->sampleFormat & paInt8) {
+        streamDescription->mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger;
+        streamDescription->mBitsPerChannel = 8;
+    }    
+    else if (parameters->sampleFormat & paInt32) {
+        streamDescription->mBitsPerChannel = 8;
+    }
+    
+    return streamDescription;
+}
+*/
+
+static PaStreamCallbackTimeInfo *InitializeTimeInfo(const AudioTimeStamp* now, const AudioTimeStamp* inputTime, const AudioTimeStamp* outputTime)
+{
+    PaStreamCallbackTimeInfo *timeInfo = PaUtil_AllocateMemory(sizeof(PaStreamCallbackTimeInfo));
+    
+    timeInfo->inputBufferAdcTime = inputTime->mSampleTime;
+    timeInfo->currentTime = now->mSampleTime;
+    timeInfo->outputBufferDacTime = outputTime->mSampleTime;
+    
+    return timeInfo;
+}
+
+// =====  support functions  =====
+#pragma mark support functions
+
+static void CleanUp(PaMacCoreHostApiRepresentation *macCoreHostApi)
+{
+    if( macCoreHostApi->allocations )
+    {
+        PaUtil_FreeAllAllocations( macCoreHostApi->allocations );
+        PaUtil_DestroyAllocationGroup( macCoreHostApi->allocations );
+    }
+    
+    PaUtil_FreeMemory( macCoreHostApi );    
+}
+
+static PaError GetChannelInfo(PaDeviceInfo *deviceInfo, AudioDeviceID macCoreDeviceId, int isInput)
+{
+    UInt32 propSize;
+    PaError err = paNoError;
+    UInt32 i;
+    int numChannels = 0;
+    AudioBufferList *buflist;
+
+    err = conv_err(AudioDeviceGetPropertyInfo(macCoreDeviceId, 0, isInput, kAudioDevicePropertyStreamConfiguration, &propSize, NULL));
+    buflist = PaUtil_AllocateMemory(propSize);
+    err = conv_err(AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyStreamConfiguration, &propSize, buflist));
+    if (!err) {
+        for (i = 0; i < buflist->mNumberBuffers; ++i) {
+            numChannels += buflist->mBuffers[i].mNumberChannels;
+        }
+		
+		if (isInput)
+			deviceInfo->maxInputChannels = numChannels;
+		else
+			deviceInfo->maxOutputChannels = numChannels;
+		
+        int frameLatency;
+        propSize = sizeof(UInt32);
+        err = conv_err(AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyLatency, &propSize, &frameLatency));
+        if (!err) {
+            double secondLatency = frameLatency / deviceInfo->defaultSampleRate;
+            if (isInput) {
+                deviceInfo->defaultLowInputLatency = secondLatency;
+                deviceInfo->defaultHighInputLatency = secondLatency;
+            }
+            else {
+                deviceInfo->defaultLowOutputLatency = secondLatency;
+                deviceInfo->defaultHighOutputLatency = secondLatency;
+            }
+        }
+    }
+    PaUtil_FreeMemory(buflist);
+    
+    return err;
+}
+
+static PaError InitializeDeviceInfo(PaMacCoreDeviceInfo *macCoreDeviceInfo,  AudioDeviceID macCoreDeviceId, PaHostApiIndex hostApiIndex )
+{
+    PaDeviceInfo *deviceInfo = &macCoreDeviceInfo->inheritedDeviceInfo;
+    deviceInfo->structVersion = 2;
+    deviceInfo->hostApi = hostApiIndex;
+    
+    PaError err = paNoError;
+    UInt32 propSize;
+
+    err = conv_err(AudioDeviceGetPropertyInfo(macCoreDeviceId, 0, 0, kAudioDevicePropertyDeviceName, &propSize, NULL));
+    // FIXME: this allocation should be part of the allocations group
+    char *name = PaUtil_AllocateMemory(propSize);
+    err = conv_err(AudioDeviceGetProperty(macCoreDeviceId, 0, 0, kAudioDevicePropertyDeviceName, &propSize, name));
+    if (!err) {
+        deviceInfo->name = name;
+    }
+    
+    Float64 sampleRate;
+    propSize = sizeof(Float64);
+    err = conv_err(AudioDeviceGetProperty(macCoreDeviceId, 0, 0, kAudioDevicePropertyNominalSampleRate, &propSize, &sampleRate));
+    if (!err) {
+        deviceInfo->defaultSampleRate = sampleRate;
+    }
+
+
+    // Get channel info
+    err = GetChannelInfo(deviceInfo, macCoreDeviceId, 1);
+    err = GetChannelInfo(deviceInfo, macCoreDeviceId, 0);
+
+    return err;
+}
+
+static PaError InitializeDeviceInfos( PaMacCoreHostApiRepresentation *macCoreHostApi, PaHostApiIndex hostApiIndex )
+{
+    PaError result = paNoError;
+    PaUtilHostApiRepresentation *hostApi;
+    PaMacCoreDeviceInfo *deviceInfoArray;
+
+    // initialise device counts and default devices under the assumption that there are no devices. These values are incremented below if and when devices are successfully initialized.
+    hostApi = &macCoreHostApi->inheritedHostApiRep;
+    hostApi->info.deviceCount = 0;
+    hostApi->info.defaultInputDevice = paNoDevice;
+    hostApi->info.defaultOutputDevice = paNoDevice;
+    
+    UInt32 propsize;
+    AudioHardwareGetPropertyInfo(kAudioHardwarePropertyDevices, &propsize, NULL);
+    int numDevices = propsize / sizeof(AudioDeviceID);
+    hostApi->info.deviceCount = numDevices;
+    if (numDevices > 0) {
+        hostApi->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(
+                                            macCoreHostApi->allocations, sizeof(PaDeviceInfo*) * numDevices );
+        if( !hostApi->deviceInfos )
+        {
+            return paInsufficientMemory;
+        }
+
+        // allocate all device info structs in a contiguous block
+        deviceInfoArray = (PaMacCoreDeviceInfo*)PaUtil_GroupAllocateMemory(
+                                macCoreHostApi->allocations, sizeof(PaMacCoreDeviceInfo) * numDevices );
+        if( !deviceInfoArray )
+        {
+            return paInsufficientMemory;
+        }
+        
+        macCoreHostApi->macCoreDeviceIds = PaUtil_GroupAllocateMemory(macCoreHostApi->allocations, propsize);
+        AudioHardwareGetProperty(kAudioHardwarePropertyDevices, &propsize, macCoreHostApi->macCoreDeviceIds);
+
+        AudioDeviceID defaultInputDevice, defaultOutputDevice;
+        propsize = sizeof(AudioDeviceID);
+        AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice, &propsize, &defaultInputDevice);
+        AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &propsize, &defaultOutputDevice);
+        
+        UInt32 i;
+        for (i = 0; i < numDevices; ++i) {
+            if (macCoreHostApi->macCoreDeviceIds[i] == defaultInputDevice) {
+                hostApi->info.defaultInputDevice = i;
+            }
+            if (macCoreHostApi->macCoreDeviceIds[i] == defaultOutputDevice) {
+                hostApi->info.defaultOutputDevice = i;
+            }
+            InitializeDeviceInfo(&deviceInfoArray[i], macCoreHostApi->macCoreDeviceIds[i], hostApiIndex);
+            hostApi->deviceInfos[i] = &(deviceInfoArray[i].inheritedDeviceInfo);      
+        }
+    }
+
+    return result;
+}
+
+static OSStatus CheckFormat(AudioDeviceID macCoreDeviceId, const PaStreamParameters *parameters, double sampleRate, int isInput)
+{
+    UInt32 propSize = sizeof(AudioStreamBasicDescription);
+    AudioStreamBasicDescription *streamDescription = PaUtil_AllocateMemory(propSize);
+
+    streamDescription->mSampleRate = sampleRate;
+    streamDescription->mFormatID = 0;
+    streamDescription->mFormatFlags = 0;
+    streamDescription->mBytesPerPacket = 0;
+    streamDescription->mFramesPerPacket = 0;
+    streamDescription->mBytesPerFrame = 0;
+    streamDescription->mChannelsPerFrame = 0;
+    streamDescription->mBitsPerChannel = 0;
+    streamDescription->mReserved = 0;
+
+    OSStatus result = AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyStreamFormatSupported, &propSize, streamDescription);
+    PaUtil_FreeMemory(streamDescription);
+    return result;
+}
+
+static OSStatus CopyInputData(PaMacClientData* destination, const AudioBufferList *source, unsigned long frameCount)
+{
+    int frameSpacing, channelSpacing;
+    if (destination->inputSampleFormat & paNonInterleaved) {
+        frameSpacing = 1;
+        channelSpacing = destination->inputChannelCount;
+    }
+    else {
+        frameSpacing = destination->inputChannelCount;
+        channelSpacing = 1;
+    }
+    
+    AudioBuffer const *inputBuffer = &source->mBuffers[0];
+    void *coreAudioBuffer = inputBuffer->mData;
+    void *portAudioBuffer = destination->inputBuffer;
+    UInt32 i, streamNumber, streamChannel;
+    for (i = streamNumber = streamChannel = 0; i < destination->inputChannelCount; ++i, ++streamChannel) {
+        if (streamChannel >= inputBuffer->mNumberChannels) {
+            ++streamNumber;
+            inputBuffer = &source->mBuffers[streamNumber];
+            coreAudioBuffer = inputBuffer->mData;
+            streamChannel = 0;
+        }
+        destination->inputConverter(portAudioBuffer, frameSpacing, coreAudioBuffer, inputBuffer->mNumberChannels, frameCount, destination->ditherGenerator);
+        coreAudioBuffer += sizeof(Float32);
+        portAudioBuffer += Pa_GetSampleSize(destination->inputSampleFormat) * channelSpacing;
+    }
+    return noErr;
+}
+
+static OSStatus CopyOutputData(AudioBufferList* destination, PaMacClientData *source, unsigned long frameCount)
+{
+    int frameSpacing, channelSpacing;
+    if (source->outputSampleFormat & paNonInterleaved) {
+        frameSpacing = 1;
+        channelSpacing = source->outputChannelCount;
+    }
+    else {
+        frameSpacing = source->outputChannelCount;
+        channelSpacing = 1;
+    }
+    
+    AudioBuffer *outputBuffer = &destination->mBuffers[0];
+    void *coreAudioBuffer = outputBuffer->mData;
+    void *portAudioBuffer = source->outputBuffer;
+    UInt32 i, streamNumber, streamChannel;
+    for (i = streamNumber = streamChannel = 0; i < source->outputChannelCount; ++i, ++streamChannel) {
+        if (streamChannel >= outputBuffer->mNumberChannels) {
+            ++streamNumber;
+            outputBuffer = &destination->mBuffers[streamNumber];
+            coreAudioBuffer = outputBuffer->mData;
+            streamChannel = 0;
+        }
+        source->outputConverter(coreAudioBuffer, outputBuffer->mNumberChannels, portAudioBuffer, frameSpacing, frameCount, NULL);
+        coreAudioBuffer += sizeof(Float32);
+        portAudioBuffer += Pa_GetSampleSize(source->outputSampleFormat) * channelSpacing;
+    }
+    return noErr;
+}
+
+static OSStatus AudioIOProc( AudioDeviceID inDevice,
+                      const AudioTimeStamp* inNow,
+                      const AudioBufferList* inInputData,
+                      const AudioTimeStamp* inInputTime,
+                      AudioBufferList* outOutputData, 
+                      const AudioTimeStamp* inOutputTime,
+                      void* inClientData)
+{
+    PaMacClientData *clientData = (PaMacClientData *)inClientData;
+    PaStreamCallbackTimeInfo *timeInfo = InitializeTimeInfo(inNow, inInputTime, inOutputTime);
+    
+    PaUtil_BeginCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer );
+    
+    AudioBuffer *outputBuffer = &outOutputData->mBuffers[0];
+    unsigned long frameCount = outputBuffer->mDataByteSize / (outputBuffer->mNumberChannels * sizeof(Float32));
+
+    if (clientData->inputBuffer) {
+        CopyInputData(clientData, inInputData, frameCount);
+    }
+    PaStreamCallbackResult result = clientData->callback(clientData->inputBuffer, clientData->outputBuffer, frameCount, timeInfo, paNoFlag, clientData->userData);
+    if (clientData->outputBuffer) {
+        CopyOutputData(outOutputData, clientData, frameCount);
+    }
+
+    PaUtil_EndCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer, frameCount );
+    
+    if (result == paComplete || result == paAbort) {
+        Pa_StopStream(clientData->stream);
+    }
+
+    PaUtil_FreeMemory( timeInfo );
+    return noErr;
+}
+
+// This is not for input-only streams, this is for streams where the input device is different from the output device
+static OSStatus AudioInputProc( AudioDeviceID inDevice,
+                         const AudioTimeStamp* inNow,
+                         const AudioBufferList* inInputData,
+                         const AudioTimeStamp* inInputTime,
+                         AudioBufferList* outOutputData, 
+                         const AudioTimeStamp* inOutputTime,
+                         void* inClientData)
+{
+    PaMacClientData *clientData = (PaMacClientData *)inClientData;
+    PaStreamCallbackTimeInfo *timeInfo = InitializeTimeInfo(inNow, inInputTime, inOutputTime);
+
+    PaUtil_BeginCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer );
+
+    AudioBuffer const *inputBuffer = &inInputData->mBuffers[0];
+    unsigned long frameCount = inputBuffer->mDataByteSize / (inputBuffer->mNumberChannels * sizeof(Float32));
+
+    CopyInputData(clientData, inInputData, frameCount);
+    PaStreamCallbackResult result = clientData->callback(clientData->inputBuffer, clientData->outputBuffer, frameCount, timeInfo, paNoFlag, clientData->userData);
+    
+    PaUtil_EndCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer, frameCount );
+    if( result == paComplete || result == paAbort )
+       Pa_StopStream(clientData->stream);
+    PaUtil_FreeMemory( timeInfo );
+    return noErr;
+}
+
+// This is not for output-only streams, this is for streams where the input device is different from the output device
+static OSStatus AudioOutputProc( AudioDeviceID inDevice,
+                          const AudioTimeStamp* inNow,
+                          const AudioBufferList* inInputData,
+                          const AudioTimeStamp* inInputTime,
+                          AudioBufferList* outOutputData, 
+                          const AudioTimeStamp* inOutputTime,
+                          void* inClientData)
+{
+    PaMacClientData *clientData = (PaMacClientData *)inClientData;
+    //PaStreamCallbackTimeInfo *timeInfo = InitializeTimeInfo(inNow, inInputTime, inOutputTime);
+
+    PaUtil_BeginCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer );
+
+    AudioBuffer *outputBuffer = &outOutputData->mBuffers[0];
+    unsigned long frameCount = outputBuffer->mDataByteSize / (outputBuffer->mNumberChannels * sizeof(Float32));
+
+    //clientData->callback(NULL, clientData->outputBuffer, frameCount, timeInfo, paNoFlag, clientData->userData);
+
+    CopyOutputData(outOutputData, clientData, frameCount);
+
+    PaUtil_EndCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer, frameCount );
+    return noErr;
+}
+
+static PaError SetSampleRate(AudioDeviceID device, double sampleRate, int isInput)
+{
+    PaError result = paNoError;
+    
+    double actualSampleRate;
+    UInt32 propSize = sizeof(double);
+    result = conv_err(AudioDeviceSetProperty(device, NULL, 0, isInput, kAudioDevicePropertyNominalSampleRate, propSize, &sampleRate));
+    
+    result = conv_err(AudioDeviceGetProperty(device, 0, isInput, kAudioDevicePropertyNominalSampleRate, &propSize, &actualSampleRate));
+    
+    if (result == paNoError && actualSampleRate != sampleRate) {
+        result = paInvalidSampleRate;
+    }
+    
+    return result;    
+}
+
+static PaError SetFramesPerBuffer(AudioDeviceID device, unsigned long framesPerBuffer, int isInput)
+{
+    PaError result = paNoError;
+    UInt32 preferredFramesPerBuffer = framesPerBuffer;
+    //    while (preferredFramesPerBuffer > UINT32_MAX) {
+    //        preferredFramesPerBuffer /= 2;
+    //    }
+    
+    UInt32 actualFramesPerBuffer;
+    UInt32 propSize = sizeof(UInt32);
+    result = conv_err(AudioDeviceSetProperty(device, NULL, 0, isInput, kAudioDevicePropertyBufferFrameSize, propSize, &preferredFramesPerBuffer));
+    
+    result = conv_err(AudioDeviceGetProperty(device, 0, isInput, kAudioDevicePropertyBufferFrameSize, &propSize, &actualFramesPerBuffer));
+    
+    if (result != paNoError) {
+        // do nothing
+    }
+    else if (actualFramesPerBuffer > framesPerBuffer) {
+        result = paBufferTooSmall;
+    }
+    else if (actualFramesPerBuffer < framesPerBuffer) {
+        result = paBufferTooBig;
+    }
+    
+    return result;    
+}
+    
+static PaError SetUpUnidirectionalStream(AudioDeviceID device, double sampleRate, unsigned long framesPerBuffer, int isInput)
+{
+    PaError err = paNoError;
+    err = SetSampleRate(device, sampleRate, isInput);
+    if( err == paNoError )
+        err = SetFramesPerBuffer(device, framesPerBuffer, isInput);
+    return err;
+}
+
+// =====  PortAudio functions  =====
+#pragma mark PortAudio functions
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif // __cplusplus
+    
+    PaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+    
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi )
+{
+    PaMacCoreHostApiRepresentation *macCoreHostApi = (PaMacCoreHostApiRepresentation*)hostApi;
+    
+    CleanUp(macCoreHostApi);
+}
+
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate )
+{
+    PaMacCoreHostApiRepresentation *macCoreHostApi = (PaMacCoreHostApiRepresentation*)hostApi;
+    PaDeviceInfo *deviceInfo;
+    
+    PaError result = paNoError;
+    if (inputParameters) {
+        deviceInfo = macCoreHostApi->inheritedHostApiRep.deviceInfos[inputParameters->device];
+        if (inputParameters->channelCount > deviceInfo->maxInputChannels)
+            result = paInvalidChannelCount;
+        else if (CheckFormat(macCoreHostApi->macCoreDeviceIds[inputParameters->device], inputParameters, sampleRate, 1) != kAudioHardwareNoError) {
+            result = paInvalidSampleRate;
+        }
+    }
+    if (outputParameters && result == paNoError) {
+        deviceInfo = macCoreHostApi->inheritedHostApiRep.deviceInfos[outputParameters->device];
+        if (outputParameters->channelCount > deviceInfo->maxOutputChannels)
+            result = paInvalidChannelCount;
+        else if (CheckFormat(macCoreHostApi->macCoreDeviceIds[outputParameters->device], outputParameters, sampleRate, 0) != kAudioHardwareNoError) {
+            result = paInvalidSampleRate;
+        }
+    }
+
+    return result;
+}
+
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** s,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *streamCallback,
+                           void *userData )
+{
+    PaError err = paNoError;
+    PaMacCoreHostApiRepresentation *macCoreHostApi = (PaMacCoreHostApiRepresentation *)hostApi;
+    PaMacCoreStream *stream = PaUtil_AllocateMemory(sizeof(PaMacCoreStream));
+    stream->isActive = 0;
+    stream->isStopped = 1;
+    stream->inputDevice = kAudioDeviceUnknown;
+    stream->outputDevice = kAudioDeviceUnknown;
+    
+    PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
+                                           ( (streamCallback)
+                                             ? &macCoreHostApi->callbackStreamInterface
+                                             : &macCoreHostApi->blockingStreamInterface ),
+                                           streamCallback, userData );
+    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );
+    
+    *s = (PaStream*)stream;
+    PaMacClientData *clientData = PaUtil_AllocateMemory(sizeof(PaMacClientData));
+    clientData->stream = stream;
+    clientData->callback = streamCallback;
+    clientData->userData = userData;
+    clientData->inputBuffer = 0;
+    clientData->outputBuffer = 0;
+    clientData->ditherGenerator = PaUtil_AllocateMemory(sizeof(PaUtilTriangularDitherGenerator));
+    PaUtil_InitializeTriangularDitherState(clientData->ditherGenerator);
+    
+    if (inputParameters != NULL) {
+        stream->inputDevice = macCoreHostApi->macCoreDeviceIds[inputParameters->device];
+        clientData->inputConverter = PaUtil_SelectConverter(paFloat32, inputParameters->sampleFormat, streamFlags);
+        clientData->inputBuffer = PaUtil_AllocateMemory(Pa_GetSampleSize(inputParameters->sampleFormat) * framesPerBuffer * inputParameters->channelCount);
+        clientData->inputChannelCount = inputParameters->channelCount;
+        clientData->inputSampleFormat = inputParameters->sampleFormat;
+        err = SetUpUnidirectionalStream(stream->inputDevice, sampleRate, framesPerBuffer, 1);
+    }
+    
+    if (err == paNoError && outputParameters != NULL) {
+        stream->outputDevice = macCoreHostApi->macCoreDeviceIds[outputParameters->device];
+        clientData->outputConverter = PaUtil_SelectConverter(outputParameters->sampleFormat, paFloat32, streamFlags);
+        clientData->outputBuffer = PaUtil_AllocateMemory(Pa_GetSampleSize(outputParameters->sampleFormat) * framesPerBuffer * outputParameters->channelCount);
+        clientData->outputChannelCount = outputParameters->channelCount;
+        clientData->outputSampleFormat = outputParameters->sampleFormat;
+        err = SetUpUnidirectionalStream(stream->outputDevice, sampleRate, framesPerBuffer, 0);
+    }
+
+    if (inputParameters == NULL || outputParameters == NULL || stream->inputDevice == stream->outputDevice) {
+        AudioDeviceID device = (inputParameters == NULL) ? stream->outputDevice : stream->inputDevice;
+
+        AudioDeviceAddIOProc(device, AudioIOProc, clientData);
+    }
+    else {
+        // using different devices for input and output
+        AudioDeviceAddIOProc(stream->inputDevice, AudioInputProc, clientData);
+        AudioDeviceAddIOProc(stream->outputDevice, AudioOutputProc, clientData);
+    }
+    
+    return err;
+}
+
+// Note: When CloseStream() is called, the multi-api layer ensures that the stream has already been stopped or aborted.
+static PaError CloseStream( PaStream* s )
+{
+    PaError err = paNoError;
+    PaMacCoreStream *stream = (PaMacCoreStream*)s;
+
+    PaUtil_ResetCpuLoadMeasurer( &stream->cpuLoadMeasurer );
+
+    if (stream->inputDevice != kAudioDeviceUnknown) {
+        if (stream->outputDevice == kAudioDeviceUnknown || stream->outputDevice == stream->inputDevice) {
+            err = conv_err(AudioDeviceRemoveIOProc(stream->inputDevice, AudioIOProc));
+        }
+        else {
+            err = conv_err(AudioDeviceRemoveIOProc(stream->inputDevice, AudioInputProc));
+            err = conv_err(AudioDeviceRemoveIOProc(stream->outputDevice, AudioOutputProc));
+        }
+    }
+    else {
+        err = conv_err(AudioDeviceRemoveIOProc(stream->outputDevice, AudioIOProc));
+    }
+    
+    return err;
+}
+
+
+static PaError StartStream( PaStream *s )
+{
+    PaError err = paNoError;
+    PaMacCoreStream *stream = (PaMacCoreStream*)s;
+
+    if (stream->inputDevice != kAudioDeviceUnknown) {
+        if (stream->outputDevice == kAudioDeviceUnknown || stream->outputDevice == stream->inputDevice) {
+            err = conv_err(AudioDeviceStart(stream->inputDevice, AudioIOProc));
+        }
+        else {
+            err = conv_err(AudioDeviceStart(stream->inputDevice, AudioInputProc));
+            err = conv_err(AudioDeviceStart(stream->outputDevice, AudioOutputProc));
+        }
+    }
+    else {
+        err = conv_err(AudioDeviceStart(stream->outputDevice, AudioIOProc));
+    }
+    
+    stream->isActive = 1;
+    stream->isStopped = 0;
+    return err;
+}
+
+static PaError AbortStream( PaStream *s )
+{
+    PaError err = paNoError;
+    PaMacCoreStream *stream = (PaMacCoreStream*)s;
+    
+    if (stream->inputDevice != kAudioDeviceUnknown) {
+        if (stream->outputDevice == kAudioDeviceUnknown || stream->outputDevice == stream->inputDevice) {
+            err = conv_err(AudioDeviceStop(stream->inputDevice, AudioIOProc));
+        }
+        else {
+            err = conv_err(AudioDeviceStop(stream->inputDevice, AudioInputProc));
+            err = conv_err(AudioDeviceStop(stream->outputDevice, AudioOutputProc));
+        }
+    }
+    else {
+        err = conv_err(AudioDeviceStop(stream->outputDevice, AudioIOProc));
+    }
+    
+    stream->isActive = 0;
+    stream->isStopped = 1;
+    return err;
+}    
+
+static PaError StopStream( PaStream *s )
+{
+    // TODO: this should be nicer than abort
+    return AbortStream(s);
+}
+
+static PaError IsStreamStopped( PaStream *s )
+{
+    PaMacCoreStream *stream = (PaMacCoreStream*)s;
+    
+    return stream->isStopped;
+}
+
+
+static PaError IsStreamActive( PaStream *s )
+{
+    PaMacCoreStream *stream = (PaMacCoreStream*)s;
+
+    return stream->isActive;
+}
+
+
+static PaTime GetStreamTime( PaStream *s )
+{
+    OSStatus err;
+    PaTime result;
+    PaMacCoreStream *stream = (PaMacCoreStream*)s;
+
+    AudioTimeStamp *timeStamp = PaUtil_AllocateMemory(sizeof(AudioTimeStamp));
+    if (stream->inputDevice != kAudioDeviceUnknown) {
+        err = AudioDeviceGetCurrentTime(stream->inputDevice, timeStamp);
+    }
+    else {
+        err = AudioDeviceGetCurrentTime(stream->outputDevice, timeStamp);
+    }
+    
+    result = err ? 0 : timeStamp->mSampleTime;
+    PaUtil_FreeMemory(timeStamp);
+
+    return result;
+}
+
+
+static double GetStreamCpuLoad( PaStream* s )
+{
+    PaMacCoreStream *stream = (PaMacCoreStream*)s;
+    
+    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );
+}
+
+
+// As separate stream interfaces are used for blocking and callback streams, the following functions can be guaranteed to only be called for blocking streams.
+
+static PaError ReadStream( PaStream* s,
+                           void *buffer,
+                           unsigned long frames )
+{
+    return paInternalError;
+}
+
+
+static PaError WriteStream( PaStream* s,
+                            const void *buffer,
+                            unsigned long frames )
+{
+    return paInternalError;
+}
+
+
+static signed long GetStreamReadAvailable( PaStream* s )
+{
+    return paInternalError;
+}
+
+
+static signed long GetStreamWriteAvailable( PaStream* s )
+{
+    return paInternalError;
+}
+
+// HostAPI-specific initialization function
+PaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+{
+    PaError result = paNoError;
+    PaMacCoreHostApiRepresentation *macCoreHostApi = (PaMacCoreHostApiRepresentation *)PaUtil_AllocateMemory( sizeof(PaMacCoreHostApiRepresentation) );
+    if( !macCoreHostApi )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+    
+    macCoreHostApi->allocations = PaUtil_CreateAllocationGroup();
+    if( !macCoreHostApi->allocations )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+    
+    *hostApi = &macCoreHostApi->inheritedHostApiRep;
+    (*hostApi)->info.structVersion = 1;
+    (*hostApi)->info.type = paCoreAudio;
+    (*hostApi)->info.name = "CoreAudio";
+
+    result = InitializeDeviceInfos(macCoreHostApi, hostApiIndex);
+    if (result != paNoError) {
+        goto error;
+    }
+    
+    // Set up the proper callbacks to this HostApi's functions
+    (*hostApi)->Terminate = Terminate;
+    (*hostApi)->OpenStream = OpenStream;
+    (*hostApi)->IsFormatSupported = IsFormatSupported;
+    
+    PaUtil_InitializeStreamInterface( &macCoreHostApi->callbackStreamInterface, CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, GetStreamCpuLoad,
+                                      PaUtil_DummyRead, PaUtil_DummyWrite,
+                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );
+    
+    PaUtil_InitializeStreamInterface( &macCoreHostApi->blockingStreamInterface, CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, PaUtil_DummyGetCpuLoad,
+                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );
+    
+    return result;
+    
+error:
+        if( macCoreHostApi ) {
+            CleanUp(macCoreHostApi);
+        }
+    
+    return result;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_utilities.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_utilities.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_utilities.c	(revision 1163)
@@ -0,0 +1,612 @@
+/*
+ * Helper and utility functions for pa_mac_core.c (Apple AUHAL implementation)
+ *
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ *
+ * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.
+ * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)
+ *
+ * Dominic's code was based on code by Phil Burk, Darren Gibbs,
+ * Gord Peters, Stephane Letz, and Greg Pfiel.
+ *
+ * The following people also deserve acknowledgements:
+ *
+ * Olivier Tristan for feedback and testing
+ * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O
+ * interface.
+ * 
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/**
+ @file
+ @ingroup hostapi_src
+*/
+
+#include "pa_mac_core_utilities.h"
+
+
+PaError PaMacCore_SetUnixError( int err, int line )
+{
+   PaError ret;
+   const char *errorText;
+
+   if( err == 0 )
+   {
+      return paNoError;
+   }
+
+   ret = paNoError;
+   errorText = strerror( err );
+
+   /** Map Unix error to PaError. Pretty much the only one that maps
+       is ENOMEM. */
+   if( err == ENOMEM )
+      ret = paInsufficientMemory;
+   else
+      ret = paInternalError;
+
+   DBUG(("%d on line %d: msg='%s'\n", err, line, errorText));
+   PaUtil_SetLastHostErrorInfo( paCoreAudio, err, errorText );
+
+   return ret;
+}
+
+/*
+ * Translates MacOS generated errors into PaErrors
+ */
+PaError PaMacCore_SetError(OSStatus error, int line, int isError)
+{
+    /*FIXME: still need to handle possible ComponentResult values.*/
+    /*       unfortunately, they don't seem to be documented anywhere.*/
+    PaError result;
+    const char *errorType; 
+    const char *errorText;
+    
+    switch (error) {
+    case kAudioHardwareNoError:
+        return paNoError;
+    case kAudioHardwareNotRunningError:
+        errorText = "Audio Hardware Not Running";
+        result = paInternalError; break;
+    case kAudioHardwareUnspecifiedError: 
+        errorText = "Unspecified Audio Hardware Error";
+        result = paInternalError; break;
+    case kAudioHardwareUnknownPropertyError:
+        errorText = "Audio Hardware: Unknown Property";
+        result = paInternalError; break;
+    case kAudioHardwareBadPropertySizeError:
+        errorText = "Audio Hardware: Bad Property Size";
+        result = paInternalError; break;
+    case kAudioHardwareIllegalOperationError: 
+        errorText = "Audio Hardware: Illegal Operation";
+        result = paInternalError; break;
+    case kAudioHardwareBadDeviceError:
+        errorText = "Audio Hardware: Bad Device";
+        result = paInvalidDevice; break;
+    case kAudioHardwareBadStreamError:
+        errorText = "Audio Hardware: BadStream";
+        result = paBadStreamPtr; break;
+    case kAudioHardwareUnsupportedOperationError:
+        errorText = "Audio Hardware: Unsupported Operation";
+        result = paInternalError; break;
+    case kAudioDeviceUnsupportedFormatError:
+        errorText = "Audio Device: Unsupported Format";
+        result = paSampleFormatNotSupported; break;
+    case kAudioDevicePermissionsError:
+        errorText = "Audio Device: Permissions Error";
+        result = paDeviceUnavailable; break;
+    /* Audio Unit Errors: http://developer.apple.com/documentation/MusicAudio/Reference/CoreAudio/audio_units/chapter_5_section_3.html */
+    case kAudioUnitErr_InvalidProperty:
+        errorText = "Audio Unit: Invalid Property";
+        result = paInternalError; break;
+    case kAudioUnitErr_InvalidParameter:
+        errorText = "Audio Unit: Invalid Parameter";
+        result = paInternalError; break;
+    case kAudioUnitErr_NoConnection:
+        errorText = "Audio Unit: No Connection";
+        result = paInternalError; break;
+    case kAudioUnitErr_FailedInitialization:
+        errorText = "Audio Unit: Initialization Failed";
+        result = paInternalError; break;
+    case kAudioUnitErr_TooManyFramesToProcess:
+        errorText = "Audio Unit: Too Many Frames";
+        result = paInternalError; break;
+    case kAudioUnitErr_IllegalInstrument:
+        errorText = "Audio Unit: Illegal Instrument";
+        result = paInternalError; break;
+    case kAudioUnitErr_InstrumentTypeNotFound:
+        errorText = "Audio Unit: Instrument Type Not Found";
+        result = paInternalError; break;
+    case kAudioUnitErr_InvalidFile:
+        errorText = "Audio Unit: Invalid File";
+        result = paInternalError; break;
+    case kAudioUnitErr_UnknownFileType:
+        errorText = "Audio Unit: Unknown File Type";
+        result = paInternalError; break;
+    case kAudioUnitErr_FileNotSpecified:
+        errorText = "Audio Unit: File Not Specified";
+        result = paInternalError; break;
+    case kAudioUnitErr_FormatNotSupported:
+        errorText = "Audio Unit: Format Not Supported";
+        result = paInternalError; break;
+    case kAudioUnitErr_Uninitialized:
+        errorText = "Audio Unit: Unitialized";
+        result = paInternalError; break;
+    case kAudioUnitErr_InvalidScope:
+        errorText = "Audio Unit: Invalid Scope";
+        result = paInternalError; break;
+    case kAudioUnitErr_PropertyNotWritable:
+        errorText = "Audio Unit: PropertyNotWritable";
+        result = paInternalError; break;
+    case kAudioUnitErr_InvalidPropertyValue:
+        errorText = "Audio Unit: Invalid Property Value";
+        result = paInternalError; break;
+    case kAudioUnitErr_PropertyNotInUse:
+        errorText = "Audio Unit: Property Not In Use";
+        result = paInternalError; break;
+    case kAudioUnitErr_Initialized:
+        errorText = "Audio Unit: Initialized";
+        result = paInternalError; break;
+    case kAudioUnitErr_InvalidOfflineRender:
+        errorText = "Audio Unit: Invalid Offline Render";
+        result = paInternalError; break;
+    case kAudioUnitErr_Unauthorized:
+        errorText = "Audio Unit: Unauthorized";
+        result = paInternalError; break;
+    case kAudioUnitErr_CannotDoInCurrentContext:
+        errorText = "Audio Unit: cannot do in current context";
+        result = paInternalError; break;
+    default:
+        errorText = "Unknown Error";
+        result = paInternalError;
+    }
+
+    if (isError)
+        errorType = "Error";
+    else
+        errorType = "Warning";
+
+    if ((int)error < -99999 || (int)error > 99999)
+        DBUG(("%s on line %d: err='%4s', msg='%s'\n", errorType, line, (const char *)&error, errorText));
+    else
+        DBUG(("%s on line %d: err=%d, 0x%x, msg='%s'\n", errorType, line, (int)error, (unsigned)error, errorText));
+
+    PaUtil_SetLastHostErrorInfo( paCoreAudio, error, errorText );
+
+    return result;
+}
+
+/*
+ * This function computes an appropriate ring buffer size given
+ * a requested latency (in seconds), sample rate and framesPerBuffer.
+ *
+ * The returned ringBufferSize is computed using the following
+ * constraints:
+ *   - it must be at least 4.
+ *   - it must be at least 3x framesPerBuffer.
+ *   - it must be at least 2x the suggestedLatency.
+ *   - it must be a power of 2.
+ * This function attempts to compute the minimum such size.
+ *
+ * FEEDBACK: too liberal/conservative/another way?
+ */
+long computeRingBufferSize( const PaStreamParameters *inputParameters,
+                                   const PaStreamParameters *outputParameters,
+                                   long inputFramesPerBuffer,
+                                   long outputFramesPerBuffer,
+                                   double sampleRate )
+{
+   long ringSize;
+   int index;
+   int i;
+   double latencyTimesChannelCount ;
+   long framesPerBufferTimesChannelCount ;
+
+   VVDBUG(( "computeRingBufferSize()\n" ));
+
+   assert( inputParameters || outputParameters );
+
+   if( outputParameters && inputParameters )
+   {
+      latencyTimesChannelCount = MAX(
+           inputParameters->suggestedLatency * inputParameters->channelCount,
+           outputParameters->suggestedLatency * outputParameters->channelCount );
+      framesPerBufferTimesChannelCount = MAX(
+           inputFramesPerBuffer * inputParameters->channelCount,
+           outputFramesPerBuffer * outputParameters->channelCount );
+   } 
+   else if( outputParameters )
+   {
+      latencyTimesChannelCount
+                = outputParameters->suggestedLatency * outputParameters->channelCount;
+      framesPerBufferTimesChannelCount
+                = outputFramesPerBuffer * outputParameters->channelCount;
+   }
+   else /* we have inputParameters  */
+   {
+      latencyTimesChannelCount
+                = inputParameters->suggestedLatency * inputParameters->channelCount;
+      framesPerBufferTimesChannelCount
+                = inputFramesPerBuffer * inputParameters->channelCount;
+   }
+
+   ringSize = (long) ( latencyTimesChannelCount * sampleRate * 2 + .5);
+   VDBUG( ( "suggested latency * channelCount: %d\n", (int) (latencyTimesChannelCount*sampleRate) ) );
+   if( ringSize < framesPerBufferTimesChannelCount * 3 )
+      ringSize = framesPerBufferTimesChannelCount * 3 ;
+   VDBUG(("framesPerBuffer*channelCount:%d\n",(int)framesPerBufferTimesChannelCount));
+   VDBUG(("Ringbuffer size (1): %d\n", (int)ringSize ));
+
+   /* make sure it's at least 4 */
+   ringSize = MAX( ringSize, 4 );
+
+   /* round up to the next power of 2 */
+   index = -1;
+   for( i=0; i<sizeof(long)*8; ++i )
+      if( ringSize >> i & 0x01 )
+         index = i;
+   assert( index > 0 );
+   if( ringSize <= ( 0x01 << index ) )
+      ringSize = 0x01 << index ;
+   else
+      ringSize = 0x01 << ( index + 1 );
+
+   VDBUG(( "Final Ringbuffer size (2): %d\n", (int)ringSize ));
+   return ringSize;
+}
+
+
+/*
+ * Durring testing of core audio, I found that serious crashes could occur
+ * if properties such as sample rate were changed multiple times in rapid
+ * succession. The function below has some fancy logic to make sure that changes
+ * are acknowledged before another is requested. That seems to help a lot.
+ */
+
+OSStatus propertyProc(
+    AudioDeviceID inDevice, 
+    UInt32 inChannel, 
+    Boolean isInput, 
+    AudioDevicePropertyID inPropertyID, 
+    void* inClientData )
+{
+   MutexAndBool *mab = (MutexAndBool *) inClientData;
+   mab->once = TRUE;
+   pthread_mutex_unlock( &(mab->mutex) );
+   return noErr;
+}
+
+/* sets the value of the given property and waits for the change to 
+   be acknowledged, and returns the final value, which is not guaranteed
+   by this function to be the same as the desired value. Obviously, this
+   function can only be used for data whose input and output are the
+   same size and format, and their size and format are known in advance.*/
+PaError AudioDeviceSetPropertyNowAndWaitForChange(
+    AudioDeviceID inDevice,
+    UInt32 inChannel, 
+    Boolean isInput, 
+    AudioDevicePropertyID inPropertyID,
+    UInt32 inPropertyDataSize, 
+    const void *inPropertyData,
+    void *outPropertyData )
+{
+   OSStatus macErr;
+   int unixErr;
+   MutexAndBool mab;
+   UInt32 outPropertyDataSize = inPropertyDataSize;
+
+   /* First, see if it already has that value. If so, return. */
+   macErr = AudioDeviceGetProperty( inDevice, inChannel,
+                                 isInput, inPropertyID, 
+                                 &outPropertyDataSize, outPropertyData );
+   if( macErr )
+      goto failMac2;
+   if( inPropertyDataSize!=outPropertyDataSize )
+      return paInternalError;
+   if( 0==memcmp( outPropertyData, inPropertyData, outPropertyDataSize ) )
+      return paNoError;
+
+   /* setup and lock mutex */
+   mab.once = FALSE;
+   unixErr = pthread_mutex_init( &mab.mutex, NULL );
+   if( unixErr )
+      goto failUnix2;
+   unixErr = pthread_mutex_lock( &mab.mutex );
+   if( unixErr )
+      goto failUnix;
+
+   /* add property listener */
+   macErr = AudioDeviceAddPropertyListener( inDevice, inChannel, isInput,
+                                   inPropertyID, propertyProc,
+                                   &mab ); 
+   if( macErr )
+      goto failMac;
+   /* set property */
+   macErr  = AudioDeviceSetProperty( inDevice, NULL, inChannel,
+                                 isInput, inPropertyID,
+                                 inPropertyDataSize, inPropertyData );
+   if( macErr ) {
+      /* we couldn't set the property, so we'll just unlock the mutex
+         and move on. */
+      pthread_mutex_unlock( &mab.mutex );
+   }
+
+   /* wait for property to change */                      
+   unixErr = pthread_mutex_lock( &mab.mutex );
+   if( unixErr )
+      goto failUnix;
+
+   /* now read the property back out */
+   macErr = AudioDeviceGetProperty( inDevice, inChannel,
+                                 isInput, inPropertyID, 
+                                 &outPropertyDataSize, outPropertyData );
+   if( macErr )
+      goto failMac;
+   /* cleanup */
+   AudioDeviceRemovePropertyListener( inDevice, inChannel, isInput,
+                                      inPropertyID, propertyProc );
+   unixErr = pthread_mutex_unlock( &mab.mutex );
+   if( unixErr )
+      goto failUnix2;
+   unixErr = pthread_mutex_destroy( &mab.mutex );
+   if( unixErr )
+      goto failUnix2;
+
+   return paNoError;
+
+ failUnix:
+   pthread_mutex_destroy( &mab.mutex );
+   AudioDeviceRemovePropertyListener( inDevice, inChannel, isInput,
+                                      inPropertyID, propertyProc );
+
+ failUnix2:
+   DBUG( ("Error #%d while setting a device property: %s\n", unixErr, strerror( unixErr ) ) );
+   return paUnanticipatedHostError;
+
+ failMac:
+   pthread_mutex_destroy( &mab.mutex );
+   AudioDeviceRemovePropertyListener( inDevice, inChannel, isInput,
+                                      inPropertyID, propertyProc );
+ failMac2:
+   return ERR( macErr );
+}
+
+/*
+ * Sets the sample rate the HAL device.
+ * if requireExact: set the sample rate or fail.
+ *
+ * otherwise      : set the exact sample rate.
+ *             If that fails, check for available sample rates, and choose one
+ *             higher than the requested rate. If there isn't a higher one,
+ *             just use the highest available.
+ */
+PaError setBestSampleRateForDevice( const AudioDeviceID device,
+                                    const bool isOutput,
+                                    const bool requireExact,
+                                    const Float64 desiredSrate )
+{
+   /*FIXME: changing the sample rate is disruptive to other programs using the
+            device, so it might be good to offer a custom flag to not change the
+            sample rate and just do conversion. (in my casual tests, there is
+            no disruption unless the sample rate really does need to change) */
+   const bool isInput = isOutput ? 0 : 1;
+   Float64 srate;
+   UInt32 propsize = sizeof( Float64 );
+   OSErr err;
+   AudioValueRange *ranges;
+   int i=0;
+   Float64 max  = -1; /*the maximum rate available*/
+   Float64 best = -1; /*the lowest sample rate still greater than desired rate*/
+   VDBUG(("Setting sample rate for device %ld to %g.\n",device,(float)desiredSrate));
+
+   /* -- try setting the sample rate -- */
+   err = AudioDeviceSetPropertyNowAndWaitForChange(
+                                 device, 0, isInput,
+                                 kAudioDevicePropertyNominalSampleRate,
+                                 propsize, &desiredSrate, &srate );
+   if( err )
+      return err;
+
+   /* -- if the rate agrees, and we got no errors, we are done -- */
+   if( !err && srate == desiredSrate )
+      return paNoError;
+   /* -- we've failed if the rates disagree and we are setting input -- */
+   if( requireExact )
+      return paInvalidSampleRate;
+
+   /* -- generate a list of available sample rates -- */
+   err = AudioDeviceGetPropertyInfo( device, 0, isInput,
+                                kAudioDevicePropertyAvailableNominalSampleRates,
+                                &propsize, NULL );
+   if( err )
+      return ERR( err );
+   ranges = (AudioValueRange *)calloc( 1, propsize );
+   if( !ranges )
+      return paInsufficientMemory;
+   err = AudioDeviceGetProperty( device, 0, isInput,
+                                kAudioDevicePropertyAvailableNominalSampleRates,
+                                &propsize, ranges );
+   if( err )
+   {
+      free( ranges );
+      return ERR( err );
+   }
+   VDBUG(("Requested sample rate of %g was not available.\n", (float)desiredSrate));
+   VDBUG(("%lu Available Sample Rates are:\n",propsize/sizeof(AudioValueRange)));
+#ifdef MAC_CORE_VERBOSE_DEBUG
+   for( i=0; i<propsize/sizeof(AudioValueRange); ++i )
+      VDBUG( ("\t%g-%g\n",
+              (float) ranges[i].mMinimum,
+              (float) ranges[i].mMaximum ) );
+#endif
+   VDBUG(("-----\n"));
+   
+   /* -- now pick the best available sample rate -- */
+   for( i=0; i<propsize/sizeof(AudioValueRange); ++i )
+   {
+      if( ranges[i].mMaximum > max ) max = ranges[i].mMaximum;
+      if( ranges[i].mMinimum > desiredSrate ) {
+         if( best < 0 )
+            best = ranges[i].mMinimum;
+         else if( ranges[i].mMinimum < best )
+            best = ranges[i].mMinimum;
+      }
+   }
+   if( best < 0 )
+      best = max;
+   VDBUG( ("Maximum Rate %g. best is %g.\n", max, best ) );
+   free( ranges );
+
+   /* -- set the sample rate -- */
+   propsize = sizeof( best );
+   err = AudioDeviceSetPropertyNowAndWaitForChange(
+                                 device, 0, isInput,
+                                 kAudioDevicePropertyNominalSampleRate,
+                                 propsize, &best, &srate );
+   if( err )
+      return err;
+
+   if( err )
+      return ERR( err );
+   /* -- if the set rate matches, we are done -- */
+   if( srate == best )
+      return paNoError;
+
+   /* -- otherwise, something wierd happened: we didn't set the rate, and we got no errors. Just bail. */
+   return paInternalError;
+}
+
+
+/*
+   Attempts to set the requestedFramesPerBuffer. If it can't set the exact
+   value, it settles for something smaller if available. If nothing smaller
+   is available, it uses the smallest available size.
+   actualFramesPerBuffer will be set to the actual value on successful return.
+   OK to pass NULL to actualFramesPerBuffer.
+   The logic is very simmilar too setBestSampleRate only failure here is
+   not usually catastrophic.
+*/
+PaError setBestFramesPerBuffer( const AudioDeviceID device,
+                                       const bool isOutput,
+                                       unsigned long requestedFramesPerBuffer, 
+                                       unsigned long *actualFramesPerBuffer )
+{
+   UInt32 afpb;
+   const bool isInput = !isOutput;
+   UInt32 propsize = sizeof(UInt32);
+   OSErr err;
+   Float64 min  = -1; /*the min blocksize*/
+   Float64 best = -1; /*the best blocksize*/
+   int i=0;
+   AudioValueRange *ranges;
+
+   if( actualFramesPerBuffer == NULL )
+      actualFramesPerBuffer = &afpb;
+
+
+   /* -- try and set exact FPB -- */
+   err = AudioDeviceSetProperty( device, NULL, 0, isInput,
+                                 kAudioDevicePropertyBufferFrameSize,
+                                 propsize, &requestedFramesPerBuffer);
+   err = AudioDeviceGetProperty( device, 0, isInput,
+                           kAudioDevicePropertyBufferFrameSize,
+                           &propsize, actualFramesPerBuffer);
+   if( err )
+      return ERR( err );
+   if( *actualFramesPerBuffer == requestedFramesPerBuffer )
+      return paNoError; /* we are done */
+
+   /* -- fetch available block sizes -- */
+   err = AudioDeviceGetPropertyInfo( device, 0, isInput,
+                           kAudioDevicePropertyBufferSizeRange,
+                           &propsize, NULL );
+   if( err )
+      return ERR( err );
+   ranges = (AudioValueRange *)calloc( 1, propsize );
+   if( !ranges )
+      return paInsufficientMemory;
+   err = AudioDeviceGetProperty( device, 0, isInput,
+                                kAudioDevicePropertyBufferSizeRange,
+                                &propsize, ranges );
+   if( err )
+   {
+      free( ranges );
+      return ERR( err );
+   }
+   VDBUG(("Requested block size of %lu was not available.\n",
+          requestedFramesPerBuffer ));
+   VDBUG(("%lu Available block sizes are:\n",propsize/sizeof(AudioValueRange)));
+#ifdef MAC_CORE_VERBOSE_DEBUG
+   for( i=0; i<propsize/sizeof(AudioValueRange); ++i )
+      VDBUG( ("\t%g-%g\n",
+              (float) ranges[i].mMinimum,
+              (float) ranges[i].mMaximum ) );
+#endif
+   VDBUG(("-----\n"));
+   
+   /* --- now pick the best available framesPerBuffer -- */
+   for( i=0; i<propsize/sizeof(AudioValueRange); ++i )
+   {
+      if( min == -1 || ranges[i].mMinimum < min ) min = ranges[i].mMinimum;
+      if( ranges[i].mMaximum < requestedFramesPerBuffer ) {
+         if( best < 0 )
+            best = ranges[i].mMaximum;
+         else if( ranges[i].mMaximum > best )
+            best = ranges[i].mMaximum;
+      }
+   }
+   if( best == -1 )
+      best = min;
+   VDBUG( ("Minimum FPB  %g. best is %g.\n", min, best ) );
+   free( ranges );
+
+   /* --- set the buffer size (ignore errors) -- */
+   requestedFramesPerBuffer = (UInt32) best ;
+   propsize = sizeof( UInt32 );
+   err = AudioDeviceSetProperty( device, NULL, 0, isInput,
+                                 kAudioDevicePropertyBufferSize,
+                                 propsize, &requestedFramesPerBuffer );
+   /* --- read the property to check that it was set -- */
+   err = AudioDeviceGetProperty( device, 0, isInput,
+                                 kAudioDevicePropertyBufferSize,
+                                 &propsize, actualFramesPerBuffer );
+
+   if( err )
+      return ERR( err );
+
+   return paNoError;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_utilities.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_utilities.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_core_utilities.h	(revision 1163)
@@ -0,0 +1,215 @@
+/*
+ * Helper and utility functions for pa_mac_core.c (Apple AUHAL implementation)
+ *
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ *
+ * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code.
+ * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation)
+ *
+ * Dominic's code was based on code by Phil Burk, Darren Gibbs,
+ * Gord Peters, Stephane Letz, and Greg Pfiel.
+ *
+ * The following people also deserve acknowledgements:
+ *
+ * Olivier Tristan for feedback and testing
+ * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O
+ * interface.
+ * 
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/**
+ @file
+ @ingroup hostapi_src
+*/
+
+#ifndef PA_MAC_CORE_UTILITIES_H__
+#define PA_MAC_CORE_UTILITIES_H__
+
+#include <pthread.h>
+#include "portaudio.h"
+#include "pa_util.h"
+#include <AudioUnit/AudioUnit.h>
+#include <AudioToolbox/AudioToolbox.h>
+
+#ifndef MIN
+#define MIN(a, b)  (((a)<(b))?(a):(b))
+#endif
+
+#ifndef MAX
+#define MAX(a, b)  (((a)<(b))?(b):(a))
+#endif
+
+#define ERR(mac_error) PaMacCore_SetError(mac_error, __LINE__, 1 ) 
+#define WARNING(mac_error) PaMacCore_SetError(mac_error, __LINE__, 0 )
+
+
+/* Help keep track of AUHAL element numbers */
+#define INPUT_ELEMENT  (1)
+#define OUTPUT_ELEMENT (0)
+
+/* Normal level of debugging: fine for most apps that don't mind the occational warning being printf'ed */
+/*
+ */
+#define MAC_CORE_DEBUG
+#ifdef MAC_CORE_DEBUG
+# define DBUG(MSG) do { printf("||PaMacCore (AUHAL)|| "); printf MSG ; fflush(stdout); } while(0)
+#else
+# define DBUG(MSG)
+#endif
+
+/* Verbose Debugging: useful for developement */
+/*
+#define MAC_CORE_VERBOSE_DEBUG
+*/
+#ifdef MAC_CORE_VERBOSE_DEBUG
+# define VDBUG(MSG) do { printf("||PaMacCore (v )|| "); printf MSG ; fflush(stdout); } while(0)
+#else
+# define VDBUG(MSG)
+#endif
+
+/* Very Verbose Debugging: Traces every call. */
+/*
+#define MAC_CORE_VERY_VERBOSE_DEBUG
+ */
+#ifdef MAC_CORE_VERY_VERBOSE_DEBUG
+# define VVDBUG(MSG) do { printf("||PaMacCore (vv)|| "); printf MSG ; fflush(stdout); } while(0)
+#else
+# define VVDBUG(MSG)
+#endif
+
+
+
+
+
+#define UNIX_ERR(err) PaMacCore_SetUnixError( err, __LINE__ )
+
+PaError PaMacCore_SetUnixError( int err, int line );
+
+/*
+ * Translates MacOS generated errors into PaErrors
+ */
+PaError PaMacCore_SetError(OSStatus error, int line, int isError);
+
+/*
+ * This function computes an appropriate ring buffer size given
+ * a requested latency (in seconds), sample rate and framesPerBuffer.
+ *
+ * The returned ringBufferSize is computed using the following
+ * constraints:
+ *   - it must be at least 4.
+ *   - it must be at least 3x framesPerBuffer.
+ *   - it must be at least 2x the suggestedLatency.
+ *   - it must be a power of 2.
+ * This function attempts to compute the minimum such size.
+ *
+ */
+long computeRingBufferSize( const PaStreamParameters *inputParameters,
+                                   const PaStreamParameters *outputParameters,
+                                   long inputFramesPerBuffer,
+                                   long outputFramesPerBuffer,
+                                   double sampleRate );
+
+/*
+ * Durring testing of core audio, I found that serious crashes could occur
+ * if properties such as sample rate were changed multiple times in rapid
+ * succession. The function below has some fancy logic to make sure that changes
+ * are acknowledged before another is requested. That seems to help a lot.
+ */
+
+typedef struct {
+   bool once; /* I didn't end up using this. bdr */
+   pthread_mutex_t mutex;
+} MutexAndBool ;
+
+OSStatus propertyProc(
+    AudioDeviceID inDevice, 
+    UInt32 inChannel, 
+    Boolean isInput, 
+    AudioDevicePropertyID inPropertyID, 
+    void* inClientData );
+
+/* sets the value of the given property and waits for the change to 
+   be acknowledged, and returns the final value, which is not guaranteed
+   by this function to be the same as the desired value. Obviously, this
+   function can only be used for data whose input and output are the
+   same size and format, and their size and format are known in advance.*/
+PaError AudioDeviceSetPropertyNowAndWaitForChange(
+    AudioDeviceID inDevice,
+    UInt32 inChannel, 
+    Boolean isInput, 
+    AudioDevicePropertyID inPropertyID,
+    UInt32 inPropertyDataSize, 
+    const void *inPropertyData,
+    void *outPropertyData );
+
+/*
+ * Sets the sample rate the HAL device.
+ * if requireExact: set the sample rate or fail.
+ *
+ * otherwise      : set the exact sample rate.
+ *             If that fails, check for available sample rates, and choose one
+ *             higher than the requested rate. If there isn't a higher one,
+ *             just use the highest available.
+ */
+PaError setBestSampleRateForDevice( const AudioDeviceID device,
+                                    const bool isOutput,
+                                    const bool requireExact,
+                                    const Float64 desiredSrate );
+/*
+   Attempts to set the requestedFramesPerBuffer. If it can't set the exact
+   value, it settles for something smaller if available. If nothing smaller
+   is available, it uses the smallest available size.
+   actualFramesPerBuffer will be set to the actual value on successful return.
+   OK to pass NULL to actualFramesPerBuffer.
+   The logic is very simmilar too setBestSampleRate only failure here is
+   not usually catastrophic.
+*/
+PaError setBestFramesPerBuffer( const AudioDeviceID device,
+                                       const bool isOutput,
+                                       unsigned long requestedFramesPerBuffer, 
+                                       unsigned long *actualFramesPerBuffer );
+
+#ifdef PA_OLD_CORE_AUDIO
+#	define kAudioUnitErr_PropertyNotInUse			10850
+#	define kAudioHardwareUnsupportedOperationError		1
+#	define kAudioUnitErr_Initialized			10849
+#	define kAudioUnitErr_InvalidOfflineRender		10848
+#	define kAudioUnitErr_Unauthorized			10847
+#endif
+
+#endif /* PA_MAC_CORE_UTILITIES_H__*/
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_hostapis.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_hostapis.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_mac_hostapis.c	(revision 1163)
@@ -0,0 +1,87 @@
+/*
+ * $Id$
+ * Portable Audio I/O Library Macintosh initialization table
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/** @file
+ @ingroup macosx_src
+Mac OS host API initialization function table.
+*/
+
+
+#include "pa_hostapi.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+    
+    PaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+    PaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+    PaError PaMacSm_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+    PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+    PaError PaMacAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+    
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+PaUtilHostApiInitializer *paHostApiInitializers[] =
+{
+#ifdef PA_USE_COREAUDIO
+    PaMacCore_Initialize,
+#endif
+    
+#ifdef PA_USE_SM
+    PaMacSm_Initialize,
+#endif
+    
+#ifdef PA_USE_JACK
+    PaJack_Initialize,
+#endif
+
+#ifdef PA_USE_ASIO
+    PaMacAsio_Initialize,
+#endif
+    
+    PaSkeleton_Initialize, /* just for testing */
+    
+    0   /* NULL terminated array */
+};
+
+
+int paDefaultHostApiIndex = 0;
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_process.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_process.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_process.c	(revision 1163)
@@ -0,0 +1,1756 @@
+/*
+ * $Id: pa_process.c,v 1.1.2.48 2004/12/13 09:48:43 rossbencina Exp $
+ * Portable Audio I/O Library
+ * streamCallback <-> host buffer processing adapter
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Buffer Processor implementation.
+    
+ The code in this file is not optimised yet - although it's not clear that
+ it needs to be. there may appear to be redundancies
+ that could be factored into common functions, but the redundanceis are left
+ intentionally as each appearance may have different optimisation possibilities.
+
+ The optimisations which are planned involve only converting data in-place
+ where possible, rather than copying to the temp buffer(s).
+
+ Note that in the extreme case of being able to convert in-place, and there
+ being no conversion necessary there should be some code which short-circuits
+ the operation.
+
+    @todo Consider cache tilings for intereave<->deinterleave.
+
+    @todo implement timeInfo->currentTime int PaUtil_BeginBufferProcessing()
+
+    @todo specify and implement some kind of logical policy for handling the
+        underflow and overflow stream flags when the underflow/overflow overlaps
+        multiple user buffers/callbacks.
+
+	@todo provide support for priming the buffers with data from the callback.
+        The client interface is now implemented through PaUtil_SetNoInput()
+        which sets bp->hostInputChannels[0][0].data to zero. However this is
+        currently only implemented in NonAdaptingProcess(). It shouldn't be
+        needed for AdaptingInputOnlyProcess() (no priming should ever be
+        requested for AdaptingInputOnlyProcess()).
+        Not sure if additional work should be required to make it work with
+        AdaptingOutputOnlyProcess, but it definitely is required for
+        AdaptingProcess.
+
+    @todo implement PaUtil_SetNoOutput for AdaptingProcess
+
+    @todo don't allocate temp buffers for blocking streams unless they are
+        needed. At the moment they are needed, but perhaps for host APIs
+        where the implementation passes a buffer to the host they could be
+        used.
+*/
+
+
+#include <assert.h>
+#include <string.h> /* memset() */
+
+#include "pa_process.h"
+#include "pa_util.h"
+
+
+#define PA_FRAMES_PER_TEMP_BUFFER_WHEN_HOST_BUFFER_SIZE_IS_UNKNOWN_    1024
+
+#define PA_MIN_( a, b ) ( ((a)<(b)) ? (a) : (b) )
+
+
+/* greatest common divisor - PGCD in French */
+static unsigned long GCD( unsigned long a, unsigned long b )
+{
+    return (b==0) ? a : GCD( b, a%b);
+}
+
+/* least common multiple - PPCM in French */
+static unsigned long LCM( unsigned long a, unsigned long b )
+{
+    return (a*b) / GCD(a,b);
+}
+
+#define PA_MAX_( a, b ) (((a) > (b)) ? (a) : (b))
+
+static unsigned long CalculateFrameShift( unsigned long M, unsigned long N )
+{
+    unsigned long result = 0;
+    unsigned long i;
+    unsigned long lcm;
+
+    assert( M > 0 );
+    assert( N > 0 );
+
+    lcm = LCM( M, N );
+    for( i = M; i < lcm; i += M )
+        result = PA_MAX_( result, i % N );
+
+    return result;
+}
+
+
+PaError PaUtil_InitializeBufferProcessor( PaUtilBufferProcessor* bp,
+        int inputChannelCount, PaSampleFormat userInputSampleFormat,
+        PaSampleFormat hostInputSampleFormat,
+        int outputChannelCount, PaSampleFormat userOutputSampleFormat,
+        PaSampleFormat hostOutputSampleFormat,
+        double sampleRate,
+        PaStreamFlags streamFlags,
+        unsigned long framesPerUserBuffer,
+        unsigned long framesPerHostBuffer,
+        PaUtilHostBufferSizeMode hostBufferSizeMode,
+        PaStreamCallback *streamCallback, void *userData )
+{
+    PaError result = paNoError;
+    PaError bytesPerSample;
+    unsigned long tempInputBufferSize, tempOutputBufferSize;
+
+    /* initialize buffer ptrs to zero so they can be freed if necessary in error */
+    bp->tempInputBuffer = 0;
+    bp->tempInputBufferPtrs = 0;
+    bp->tempOutputBuffer = 0;
+    bp->tempOutputBufferPtrs = 0;
+
+    bp->framesPerUserBuffer = framesPerUserBuffer;
+    bp->framesPerHostBuffer = framesPerHostBuffer;
+
+    bp->inputChannelCount = inputChannelCount;
+    bp->outputChannelCount = outputChannelCount;
+
+    bp->hostBufferSizeMode = hostBufferSizeMode;
+
+    bp->hostInputChannels[0] = bp->hostInputChannels[1] = 0;
+    bp->hostOutputChannels[0] = bp->hostOutputChannels[1] = 0;
+
+    if( framesPerUserBuffer == 0 ) /* streamCallback will accept any buffer size */
+    {
+        bp->useNonAdaptingProcess = 1;
+        bp->initialFramesInTempInputBuffer = 0;
+        bp->initialFramesInTempOutputBuffer = 0;
+
+        if( hostBufferSizeMode == paUtilFixedHostBufferSize
+                || hostBufferSizeMode == paUtilBoundedHostBufferSize )
+        {
+            bp->framesPerTempBuffer = framesPerHostBuffer;
+        }
+        else /* unknown host buffer size */
+        {
+             bp->framesPerTempBuffer = PA_FRAMES_PER_TEMP_BUFFER_WHEN_HOST_BUFFER_SIZE_IS_UNKNOWN_;
+        }
+    }
+    else
+    {
+        bp->framesPerTempBuffer = framesPerUserBuffer;
+
+        if( hostBufferSizeMode == paUtilFixedHostBufferSize
+                && framesPerHostBuffer % framesPerUserBuffer == 0 )
+        {
+            bp->useNonAdaptingProcess = 1;
+            bp->initialFramesInTempInputBuffer = 0;
+            bp->initialFramesInTempOutputBuffer = 0;
+        }
+        else
+        {
+            bp->useNonAdaptingProcess = 0;
+
+            if( inputChannelCount > 0 && outputChannelCount > 0 )
+            {
+                /* full duplex */
+                if( hostBufferSizeMode == paUtilFixedHostBufferSize )
+                {
+                    unsigned long frameShift =
+                        CalculateFrameShift( framesPerHostBuffer, framesPerUserBuffer );
+
+                    if( framesPerUserBuffer > framesPerHostBuffer )
+                    {
+                        bp->initialFramesInTempInputBuffer = frameShift;
+                        bp->initialFramesInTempOutputBuffer = 0;
+                    }
+                    else
+                    {
+                        bp->initialFramesInTempInputBuffer = 0;
+                        bp->initialFramesInTempOutputBuffer = frameShift;
+                    }
+                }
+                else /* variable host buffer size, add framesPerUserBuffer latency */
+                {
+                    bp->initialFramesInTempInputBuffer = 0;
+                    bp->initialFramesInTempOutputBuffer = framesPerUserBuffer;
+                }
+            }
+            else
+            {
+                /* half duplex */
+                bp->initialFramesInTempInputBuffer = 0;
+                bp->initialFramesInTempOutputBuffer = 0;
+            }
+        }
+    }
+
+
+    bp->framesInTempInputBuffer = bp->initialFramesInTempInputBuffer;
+    bp->framesInTempOutputBuffer = bp->initialFramesInTempOutputBuffer;
+
+    
+    if( inputChannelCount > 0 )
+    {
+        bytesPerSample = Pa_GetSampleSize( hostInputSampleFormat );
+        if( bytesPerSample > 0 )
+        {
+            bp->bytesPerHostInputSample = bytesPerSample;
+        }
+        else
+        {
+            result = bytesPerSample;
+            goto error;
+        }
+
+        bytesPerSample = Pa_GetSampleSize( userInputSampleFormat );
+        if( bytesPerSample > 0 )
+        {
+            bp->bytesPerUserInputSample = bytesPerSample;
+        }
+        else
+        {
+            result = bytesPerSample;
+            goto error;
+        }
+
+        bp->inputConverter =
+            PaUtil_SelectConverter( hostInputSampleFormat, userInputSampleFormat, streamFlags );
+
+        bp->inputZeroer = PaUtil_SelectZeroer( hostInputSampleFormat );
+            
+        bp->userInputIsInterleaved = (userInputSampleFormat & paNonInterleaved)?0:1;
+
+
+        tempInputBufferSize =
+            bp->framesPerTempBuffer * bp->bytesPerUserInputSample * inputChannelCount;
+         
+        bp->tempInputBuffer = PaUtil_AllocateMemory( tempInputBufferSize );
+        if( bp->tempInputBuffer == 0 )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+        
+        if( bp->framesInTempInputBuffer > 0 )
+            memset( bp->tempInputBuffer, 0, tempInputBufferSize );
+
+        if( userInputSampleFormat & paNonInterleaved )
+        {
+            bp->tempInputBufferPtrs =
+                (void **)PaUtil_AllocateMemory( sizeof(void*)*inputChannelCount );
+            if( bp->tempInputBufferPtrs == 0 )
+            {
+                result = paInsufficientMemory;
+                goto error;
+            }
+        }
+
+        bp->hostInputChannels[0] = (PaUtilChannelDescriptor*)
+                PaUtil_AllocateMemory( sizeof(PaUtilChannelDescriptor) * inputChannelCount * 2);
+        if( bp->hostInputChannels[0] == 0 )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        bp->hostInputChannels[1] = &bp->hostInputChannels[0][inputChannelCount];
+    }
+
+    if( outputChannelCount > 0 )
+    {
+        bytesPerSample = Pa_GetSampleSize( hostOutputSampleFormat );
+        if( bytesPerSample > 0 )
+        {
+            bp->bytesPerHostOutputSample = bytesPerSample;
+        }
+        else
+        {
+            result = bytesPerSample;
+            goto error;
+        }
+
+        bytesPerSample = Pa_GetSampleSize( userOutputSampleFormat );
+        if( bytesPerSample > 0 )
+        {
+            bp->bytesPerUserOutputSample = bytesPerSample;
+        }
+        else
+        {
+            result = bytesPerSample;
+            goto error;
+        }
+
+        bp->outputConverter =
+            PaUtil_SelectConverter( userOutputSampleFormat, hostOutputSampleFormat, streamFlags );
+
+        bp->outputZeroer = PaUtil_SelectZeroer( hostOutputSampleFormat );
+
+        bp->userOutputIsInterleaved = (userOutputSampleFormat & paNonInterleaved)?0:1;
+
+        tempOutputBufferSize =
+                bp->framesPerTempBuffer * bp->bytesPerUserOutputSample * outputChannelCount;
+
+        bp->tempOutputBuffer = PaUtil_AllocateMemory( tempOutputBufferSize );
+        if( bp->tempOutputBuffer == 0 )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        if( bp->framesInTempOutputBuffer > 0 )
+            memset( bp->tempOutputBuffer, 0, tempOutputBufferSize );
+        
+        if( userOutputSampleFormat & paNonInterleaved )
+        {
+            bp->tempOutputBufferPtrs =
+                (void **)PaUtil_AllocateMemory( sizeof(void*)*outputChannelCount );
+            if( bp->tempOutputBufferPtrs == 0 )
+            {
+                result = paInsufficientMemory;
+                goto error;
+            }
+        }
+
+        bp->hostOutputChannels[0] = (PaUtilChannelDescriptor*)
+                PaUtil_AllocateMemory( sizeof(PaUtilChannelDescriptor)*outputChannelCount * 2 );
+        if( bp->hostOutputChannels[0] == 0 )
+        {                                                                     
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        bp->hostOutputChannels[1] = &bp->hostOutputChannels[0][outputChannelCount];
+    }
+
+    PaUtil_InitializeTriangularDitherState( &bp->ditherGenerator );
+
+    bp->samplePeriod = 1. / sampleRate;
+
+    bp->streamCallback = streamCallback;
+    bp->userData = userData;
+
+    return result;
+
+error:
+    if( bp->tempInputBuffer )
+        PaUtil_FreeMemory( bp->tempInputBuffer );
+
+    if( bp->tempInputBufferPtrs )
+        PaUtil_FreeMemory( bp->tempInputBufferPtrs );
+
+    if( bp->hostInputChannels[0] )
+        PaUtil_FreeMemory( bp->hostInputChannels[0] );
+
+    if( bp->tempOutputBuffer )
+        PaUtil_FreeMemory( bp->tempOutputBuffer );
+
+    if( bp->tempOutputBufferPtrs )
+        PaUtil_FreeMemory( bp->tempOutputBufferPtrs );
+
+    if( bp->hostOutputChannels[0] )
+        PaUtil_FreeMemory( bp->hostOutputChannels[0] );
+
+    return result;
+}
+
+
+void PaUtil_TerminateBufferProcessor( PaUtilBufferProcessor* bp )
+{
+    if( bp->tempInputBuffer )
+        PaUtil_FreeMemory( bp->tempInputBuffer );
+
+    if( bp->tempInputBufferPtrs )
+        PaUtil_FreeMemory( bp->tempInputBufferPtrs );
+
+    if( bp->hostInputChannels[0] )
+        PaUtil_FreeMemory( bp->hostInputChannels[0] );
+        
+    if( bp->tempOutputBuffer )
+        PaUtil_FreeMemory( bp->tempOutputBuffer );
+
+    if( bp->tempOutputBufferPtrs )
+        PaUtil_FreeMemory( bp->tempOutputBufferPtrs );
+
+    if( bp->hostOutputChannels[0] )
+        PaUtil_FreeMemory( bp->hostOutputChannels[0] );
+}
+
+
+void PaUtil_ResetBufferProcessor( PaUtilBufferProcessor* bp )
+{
+    unsigned long tempInputBufferSize, tempOutputBufferSize;
+
+    bp->framesInTempInputBuffer = bp->initialFramesInTempInputBuffer;
+    bp->framesInTempOutputBuffer = bp->initialFramesInTempOutputBuffer;
+
+    if( bp->framesInTempInputBuffer > 0 )
+    {
+        tempInputBufferSize =
+            bp->framesPerTempBuffer * bp->bytesPerUserInputSample * bp->inputChannelCount;
+        memset( bp->tempInputBuffer, 0, tempInputBufferSize );
+    }
+
+    if( bp->framesInTempOutputBuffer > 0 )
+    {      
+        tempOutputBufferSize =
+            bp->framesPerTempBuffer * bp->bytesPerUserOutputSample * bp->outputChannelCount;
+        memset( bp->tempOutputBuffer, 0, tempOutputBufferSize );
+    }
+}
+
+
+unsigned long PaUtil_GetBufferProcessorInputLatency( PaUtilBufferProcessor* bp )
+{
+    return bp->initialFramesInTempInputBuffer;
+}
+
+
+unsigned long PaUtil_GetBufferProcessorOutputLatency( PaUtilBufferProcessor* bp )
+{
+    return bp->initialFramesInTempOutputBuffer;
+}
+
+
+void PaUtil_SetInputFrameCount( PaUtilBufferProcessor* bp,
+        unsigned long frameCount )
+{
+    if( frameCount == 0 )
+        bp->hostInputFrameCount[0] = bp->framesPerHostBuffer;
+    else
+        bp->hostInputFrameCount[0] = frameCount;
+}
+        
+
+void PaUtil_SetNoInput( PaUtilBufferProcessor* bp )
+{
+    assert( bp->inputChannelCount > 0 );
+
+    bp->hostInputChannels[0][0].data = 0;
+}
+
+
+void PaUtil_SetInputChannel( PaUtilBufferProcessor* bp,
+        unsigned int channel, void *data, unsigned int stride )
+{
+    assert( channel < bp->inputChannelCount );
+    
+    bp->hostInputChannels[0][channel].data = data;
+    bp->hostInputChannels[0][channel].stride = stride;
+}
+
+
+void PaUtil_SetInterleavedInputChannels( PaUtilBufferProcessor* bp,
+        unsigned int firstChannel, void *data, unsigned int channelCount )
+{
+    unsigned int i;
+    unsigned int channel = firstChannel;
+    unsigned char *p = (unsigned char*)data;
+
+    if( channelCount == 0 )
+        channelCount = bp->inputChannelCount;
+
+    assert( firstChannel < bp->inputChannelCount );
+    assert( firstChannel + channelCount <= bp->inputChannelCount );
+
+    for( i=0; i< channelCount; ++i )
+    {
+        bp->hostInputChannels[0][channel+i].data = p;
+        p += bp->bytesPerHostInputSample;
+        bp->hostInputChannels[0][channel+i].stride = channelCount;
+    }
+}
+
+
+void PaUtil_SetNonInterleavedInputChannel( PaUtilBufferProcessor* bp,
+        unsigned int channel, void *data )
+{
+    assert( channel < bp->inputChannelCount );
+    
+    bp->hostInputChannels[0][channel].data = data;
+    bp->hostInputChannels[0][channel].stride = 1;
+}
+
+
+void PaUtil_Set2ndInputFrameCount( PaUtilBufferProcessor* bp,
+        unsigned long frameCount )
+{
+    bp->hostInputFrameCount[1] = frameCount;
+}
+
+
+void PaUtil_Set2ndInputChannel( PaUtilBufferProcessor* bp,
+        unsigned int channel, void *data, unsigned int stride )
+{
+    assert( channel < bp->inputChannelCount );
+
+    bp->hostInputChannels[1][channel].data = data;
+    bp->hostInputChannels[1][channel].stride = stride;
+}
+
+
+void PaUtil_Set2ndInterleavedInputChannels( PaUtilBufferProcessor* bp,
+        unsigned int firstChannel, void *data, unsigned int channelCount )
+{
+    unsigned int i;
+    unsigned int channel = firstChannel;
+    unsigned char *p = (unsigned char*)data;
+
+    if( channelCount == 0 )
+        channelCount = bp->inputChannelCount;
+
+    assert( firstChannel < bp->inputChannelCount );
+    assert( firstChannel + channelCount <= bp->inputChannelCount );
+    
+    for( i=0; i< channelCount; ++i )
+    {
+        bp->hostInputChannels[1][channel+i].data = p;
+        p += bp->bytesPerHostInputSample;
+        bp->hostInputChannels[1][channel+i].stride = channelCount;
+    }
+}
+
+        
+void PaUtil_Set2ndNonInterleavedInputChannel( PaUtilBufferProcessor* bp,
+        unsigned int channel, void *data )
+{
+    assert( channel < bp->inputChannelCount );
+    
+    bp->hostInputChannels[1][channel].data = data;
+    bp->hostInputChannels[1][channel].stride = 1;
+}
+
+
+void PaUtil_SetOutputFrameCount( PaUtilBufferProcessor* bp,
+        unsigned long frameCount )
+{
+    if( frameCount == 0 )
+        bp->hostOutputFrameCount[0] = bp->framesPerHostBuffer;
+    else
+        bp->hostOutputFrameCount[0] = frameCount;
+}
+
+
+void PaUtil_SetNoOutput( PaUtilBufferProcessor* bp )
+{
+    assert( bp->outputChannelCount > 0 );
+
+    bp->hostOutputChannels[0][0].data = 0;
+}
+
+
+void PaUtil_SetOutputChannel( PaUtilBufferProcessor* bp,
+        unsigned int channel, void *data, unsigned int stride )
+{
+    assert( channel < bp->outputChannelCount );
+    
+    bp->hostOutputChannels[0][channel].data = data;
+    bp->hostOutputChannels[0][channel].stride = stride;
+}
+
+
+void PaUtil_SetInterleavedOutputChannels( PaUtilBufferProcessor* bp,
+        unsigned int firstChannel, void *data, unsigned int channelCount )
+{
+    unsigned int i;
+    unsigned int channel = firstChannel;
+    unsigned char *p = (unsigned char*)data;
+
+    if( channelCount == 0 )
+        channelCount = bp->outputChannelCount;
+
+    assert( firstChannel < bp->outputChannelCount );
+    assert( firstChannel + channelCount <= bp->outputChannelCount );
+    
+    for( i=0; i< channelCount; ++i )
+    {
+        bp->hostOutputChannels[0][channel+i].data = p;
+        p += bp->bytesPerHostOutputSample;
+        bp->hostOutputChannels[0][channel+i].stride = channelCount;
+    }
+}
+
+
+void PaUtil_SetNonInterleavedOutputChannel( PaUtilBufferProcessor* bp,
+        unsigned int channel, void *data )
+{
+    assert( channel < bp->outputChannelCount );
+
+    bp->hostOutputChannels[0][channel].data = data;
+    bp->hostOutputChannels[0][channel].stride = 1;
+}
+
+
+void PaUtil_Set2ndOutputFrameCount( PaUtilBufferProcessor* bp,
+        unsigned long frameCount )
+{
+    bp->hostOutputFrameCount[1] = frameCount;
+}
+
+
+void PaUtil_Set2ndOutputChannel( PaUtilBufferProcessor* bp,
+        unsigned int channel, void *data, unsigned int stride )
+{
+    assert( channel < bp->outputChannelCount );
+
+    bp->hostOutputChannels[1][channel].data = data;
+    bp->hostOutputChannels[1][channel].stride = stride;
+}
+
+
+void PaUtil_Set2ndInterleavedOutputChannels( PaUtilBufferProcessor* bp,
+        unsigned int firstChannel, void *data, unsigned int channelCount )
+{
+    unsigned int i;
+    unsigned int channel = firstChannel;
+    unsigned char *p = (unsigned char*)data;
+
+    if( channelCount == 0 )
+        channelCount = bp->outputChannelCount;
+
+    assert( firstChannel < bp->outputChannelCount );
+    assert( firstChannel + channelCount <= bp->outputChannelCount );
+    
+    for( i=0; i< channelCount; ++i )
+    {
+        bp->hostOutputChannels[1][channel+i].data = p;
+        p += bp->bytesPerHostOutputSample;
+        bp->hostOutputChannels[1][channel+i].stride = channelCount;
+    }
+}
+
+        
+void PaUtil_Set2ndNonInterleavedOutputChannel( PaUtilBufferProcessor* bp,
+        unsigned int channel, void *data )
+{
+    assert( channel < bp->outputChannelCount );
+    
+    bp->hostOutputChannels[1][channel].data = data;
+    bp->hostOutputChannels[1][channel].stride = 1;
+}
+
+
+void PaUtil_BeginBufferProcessing( PaUtilBufferProcessor* bp,
+        PaStreamCallbackTimeInfo* timeInfo, PaStreamCallbackFlags callbackStatusFlags )
+{
+    bp->timeInfo = timeInfo;
+
+    /* the first streamCallback will be called to process samples which are
+        currently in the input buffer before the ones starting at the timeInfo time */
+        
+    bp->timeInfo->inputBufferAdcTime -= bp->framesInTempInputBuffer * bp->samplePeriod;
+    
+    bp->timeInfo->currentTime = 0; /** FIXME: @todo time info currentTime not implemented */
+
+    /* the first streamCallback will be called to generate samples which will be
+        outputted after the frames currently in the output buffer have been
+        outputted. */
+    bp->timeInfo->outputBufferDacTime += bp->framesInTempOutputBuffer * bp->samplePeriod;
+
+    bp->callbackStatusFlags = callbackStatusFlags;
+
+    bp->hostInputFrameCount[1] = 0;
+    bp->hostOutputFrameCount[1] = 0;
+}
+
+
+/*
+    NonAdaptingProcess() is a simple buffer copying adaptor that can handle
+    both full and half duplex copies. It processes framesToProcess frames,
+    broken into blocks bp->framesPerTempBuffer long.
+    This routine can be used when the streamCallback doesn't care what length
+    the buffers are, or when framesToProcess is an integer multiple of
+    bp->framesPerTempBuffer, in which case streamCallback will always be called
+    with bp->framesPerTempBuffer samples.
+*/
+static unsigned long NonAdaptingProcess( PaUtilBufferProcessor *bp,
+        int *streamCallbackResult,
+        PaUtilChannelDescriptor *hostInputChannels,
+        PaUtilChannelDescriptor *hostOutputChannels,
+        unsigned long framesToProcess )
+{
+    void *userInput, *userOutput;
+    unsigned char *srcBytePtr, *destBytePtr;
+    unsigned int srcSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */
+    unsigned int srcChannelStrideBytes; /* stride from one channel to the next, in bytes */
+    unsigned int destSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */
+    unsigned int destChannelStrideBytes; /* stride from one channel to the next, in bytes */
+    unsigned int i;
+    unsigned long frameCount;
+    unsigned long framesToGo = framesToProcess;
+    unsigned long framesProcessed = 0;
+
+
+    if( *streamCallbackResult == paContinue )
+    {
+        do
+        {
+            frameCount = PA_MIN_( bp->framesPerTempBuffer, framesToGo );
+
+            /* configure user input buffer and convert input data (host -> user) */
+            if( bp->inputChannelCount == 0 )
+            {
+                /* no input */
+                userInput = 0;
+            }
+            else /* there are input channels */
+            {
+                /*
+                    could use more elaborate logic here and sometimes process
+                    buffers in-place.
+                */
+            
+                destBytePtr = (unsigned char *)bp->tempInputBuffer;
+
+                if( bp->userInputIsInterleaved )
+                {
+                    destSampleStrideSamples = bp->inputChannelCount;
+                    destChannelStrideBytes = bp->bytesPerUserInputSample;
+                    userInput = bp->tempInputBuffer;
+                }
+                else /* user input is not interleaved */
+                {
+                    destSampleStrideSamples = 1;
+                    destChannelStrideBytes = frameCount * bp->bytesPerUserInputSample;
+
+                    /* setup non-interleaved ptrs */
+                    for( i=0; i<bp->inputChannelCount; ++i )
+                    {
+                        bp->tempInputBufferPtrs[i] = ((unsigned char*)bp->tempInputBuffer) +
+                            i * bp->bytesPerUserInputSample * frameCount;
+                    }
+                
+                    userInput = bp->tempInputBufferPtrs;
+                }
+
+                if( !bp->hostInputChannels[0][0].data )
+                {
+                    /* no input was supplied (see PaUtil_SetNoInput), so
+                        zero the input buffer */
+
+                    for( i=0; i<bp->inputChannelCount; ++i )
+                    {
+                        bp->inputZeroer( destBytePtr, destSampleStrideSamples, frameCount );
+                        destBytePtr += destChannelStrideBytes;  /* skip to next destination channel */
+                    }
+                }
+                else
+                {
+                    for( i=0; i<bp->inputChannelCount; ++i )
+                    {
+                        bp->inputConverter( destBytePtr, destSampleStrideSamples,
+                                                hostInputChannels[i].data,
+                                                hostInputChannels[i].stride,
+                                                frameCount, &bp->ditherGenerator );
+
+                        destBytePtr += destChannelStrideBytes;  /* skip to next destination channel */
+
+                        /* advance src ptr for next iteration */
+                        hostInputChannels[i].data = ((unsigned char*)hostInputChannels[i].data) +
+                                frameCount * hostInputChannels[i].stride * bp->bytesPerHostInputSample;
+                    }
+                }
+            }
+
+            /* configure user output buffer */
+            if( bp->outputChannelCount == 0 )
+            {
+                /* no output */
+                userOutput = 0;
+            }
+            else /* there are output channels */
+            {
+                if( bp->userOutputIsInterleaved )
+                {
+                    userOutput = bp->tempOutputBuffer;
+                }
+                else /* user output is not interleaved */
+                {
+                    for( i = 0; i < bp->outputChannelCount; ++i )
+                    {
+                        bp->tempOutputBufferPtrs[i] = ((unsigned char*)bp->tempOutputBuffer) +
+                            i * bp->bytesPerUserOutputSample * frameCount;
+                    }
+
+                    userOutput = bp->tempOutputBufferPtrs;
+                }
+            }
+        
+            *streamCallbackResult = bp->streamCallback( userInput, userOutput,
+                    frameCount, bp->timeInfo, bp->callbackStatusFlags, bp->userData );
+
+            if( *streamCallbackResult == paAbort )
+            {
+                /* callback returned paAbort, don't advance framesProcessed
+                        and framesToGo, they will be handled below */
+            }
+            else
+            {
+                bp->timeInfo->inputBufferAdcTime += frameCount * bp->samplePeriod;
+                bp->timeInfo->outputBufferDacTime += frameCount * bp->samplePeriod;
+
+                /* convert output data (user -> host) */
+                
+                if( bp->outputChannelCount != 0 && bp->hostOutputChannels[0][0].data )
+                {
+                    /*
+                        could use more elaborate logic here and sometimes process
+                        buffers in-place.
+                    */
+            
+                    srcBytePtr = (unsigned char *)bp->tempOutputBuffer;
+
+                    if( bp->userOutputIsInterleaved )
+                    {
+                        srcSampleStrideSamples = bp->outputChannelCount;
+                        srcChannelStrideBytes = bp->bytesPerUserOutputSample;
+                    }
+                    else /* user output is not interleaved */
+                    {
+                        srcSampleStrideSamples = 1;
+                        srcChannelStrideBytes = frameCount * bp->bytesPerUserOutputSample;
+                    }
+
+                    for( i=0; i<bp->outputChannelCount; ++i )
+                    {
+                        bp->outputConverter(    hostOutputChannels[i].data,
+                                                hostOutputChannels[i].stride,
+                                                srcBytePtr, srcSampleStrideSamples,
+                                                frameCount, &bp->ditherGenerator );
+
+                        srcBytePtr += srcChannelStrideBytes;  /* skip to next source channel */
+
+                        /* advance dest ptr for next iteration */
+                        hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +
+                                frameCount * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;
+                    }
+                }
+             
+                framesProcessed += frameCount;
+
+                framesToGo -= frameCount;
+            }
+        }
+        while( framesToGo > 0  && *streamCallbackResult == paContinue );
+    }
+
+    if( framesToGo > 0 )
+    {
+        /* zero any remaining frames output. There will only be remaining frames
+            if the callback has returned paComplete or paAbort */
+
+        frameCount = framesToGo;
+
+        if( bp->outputChannelCount != 0 && bp->hostOutputChannels[0][0].data )
+        {
+            for( i=0; i<bp->outputChannelCount; ++i )
+            {
+                bp->outputZeroer(   hostOutputChannels[i].data,
+                                    hostOutputChannels[i].stride,
+                                    frameCount );
+
+                /* advance dest ptr for next iteration */
+                hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +
+                        frameCount * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;
+            }
+        }
+
+        framesProcessed += frameCount;
+    }
+
+    return framesProcessed;
+}
+
+
+/*
+    AdaptingInputOnlyProcess() is a half duplex input buffer processor. It
+    converts data from the input buffers into the temporary input buffer,
+    when the temporary input buffer is full, it calls the streamCallback.
+*/
+static unsigned long AdaptingInputOnlyProcess( PaUtilBufferProcessor *bp,
+        int *streamCallbackResult,
+        PaUtilChannelDescriptor *hostInputChannels,
+        unsigned long framesToProcess )
+{
+    void *userInput, *userOutput;
+    unsigned char *destBytePtr;
+    unsigned int destSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */
+    unsigned int destChannelStrideBytes; /* stride from one channel to the next, in bytes */
+    unsigned int i;
+    unsigned long frameCount;
+    unsigned long framesToGo = framesToProcess;
+    unsigned long framesProcessed = 0;
+    
+    userOutput = 0;
+
+    do
+    {
+        frameCount = ( bp->framesInTempInputBuffer + framesToGo > bp->framesPerUserBuffer )
+                ? ( bp->framesPerUserBuffer - bp->framesInTempInputBuffer )
+                : framesToGo;
+
+        /* convert frameCount samples into temp buffer */
+
+        if( bp->userInputIsInterleaved )
+        {
+            destBytePtr = ((unsigned char*)bp->tempInputBuffer) +
+                    bp->bytesPerUserInputSample * bp->inputChannelCount *
+                    bp->framesInTempInputBuffer;
+                      
+            destSampleStrideSamples = bp->inputChannelCount;
+            destChannelStrideBytes = bp->bytesPerUserInputSample;
+
+            userInput = bp->tempInputBuffer;
+        }
+        else /* user input is not interleaved */
+        {
+            destBytePtr = ((unsigned char*)bp->tempInputBuffer) +
+                    bp->bytesPerUserInputSample * bp->framesInTempInputBuffer;
+
+            destSampleStrideSamples = 1;
+            destChannelStrideBytes = bp->framesPerUserBuffer * bp->bytesPerUserInputSample;
+
+            /* setup non-interleaved ptrs */
+            for( i=0; i<bp->inputChannelCount; ++i )
+            {
+                bp->tempInputBufferPtrs[i] = ((unsigned char*)bp->tempInputBuffer) +
+                    i * bp->bytesPerUserInputSample * bp->framesPerUserBuffer;
+            }
+                    
+            userInput = bp->tempInputBufferPtrs;
+        }
+
+        for( i=0; i<bp->inputChannelCount; ++i )
+        {
+            bp->inputConverter( destBytePtr, destSampleStrideSamples,
+                                    hostInputChannels[i].data,
+                                    hostInputChannels[i].stride,
+                                    frameCount, &bp->ditherGenerator );
+
+            destBytePtr += destChannelStrideBytes;  /* skip to next destination channel */
+
+            /* advance src ptr for next iteration */
+            hostInputChannels[i].data = ((unsigned char*)hostInputChannels[i].data) +
+                    frameCount * hostInputChannels[i].stride * bp->bytesPerHostInputSample;
+        }
+
+        bp->framesInTempInputBuffer += frameCount;
+
+        if( bp->framesInTempInputBuffer == bp->framesPerUserBuffer )
+        {
+            /**
+            @todo (non-critical optimisation)
+            The conditional below implements the continue/complete/abort mechanism
+            simply by continuing on iterating through the input buffer, but not
+            passing the data to the callback. With care, the outer loop could be
+            terminated earlier, thus some unneeded conversion cycles would be
+            saved.
+            */
+            if( *streamCallbackResult == paContinue )
+            {
+                bp->timeInfo->outputBufferDacTime = 0;
+
+                *streamCallbackResult = bp->streamCallback( userInput, userOutput,
+                        bp->framesPerUserBuffer, bp->timeInfo,
+                        bp->callbackStatusFlags, bp->userData );
+
+                bp->timeInfo->inputBufferAdcTime += frameCount * bp->samplePeriod;
+            }
+            
+            bp->framesInTempInputBuffer = 0;
+        }
+
+        framesProcessed += frameCount;
+
+        framesToGo -= frameCount;
+    }while( framesToGo > 0 );
+
+    return framesProcessed;
+}
+
+
+/*
+    AdaptingOutputOnlyProcess() is a half duplex output buffer processor.
+    It converts data from the temporary output buffer, to the output buffers,
+    when the temporary output buffer is empty, it calls the streamCallback.
+*/
+static unsigned long AdaptingOutputOnlyProcess( PaUtilBufferProcessor *bp,
+        int *streamCallbackResult,
+        PaUtilChannelDescriptor *hostOutputChannels,
+        unsigned long framesToProcess )
+{
+    void *userInput, *userOutput;
+    unsigned char *srcBytePtr;
+    unsigned int srcSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */
+    unsigned int srcChannelStrideBytes;  /* stride from one channel to the next, in bytes */
+    unsigned int i;
+    unsigned long frameCount;
+    unsigned long framesToGo = framesToProcess;
+    unsigned long framesProcessed = 0;
+
+    do
+    {
+        if( bp->framesInTempOutputBuffer == 0 && *streamCallbackResult == paContinue )
+        {
+            userInput = 0;
+
+            /* setup userOutput */
+            if( bp->userOutputIsInterleaved )
+            {
+                userOutput = bp->tempOutputBuffer;
+            }
+            else /* user output is not interleaved */
+            {
+                for( i = 0; i < bp->outputChannelCount; ++i )
+                {
+                    bp->tempOutputBufferPtrs[i] = ((unsigned char*)bp->tempOutputBuffer) +
+                            i * bp->framesPerUserBuffer * bp->bytesPerUserOutputSample;
+                }
+
+                userOutput = bp->tempOutputBufferPtrs;
+            }
+
+            bp->timeInfo->inputBufferAdcTime = 0;
+            
+            *streamCallbackResult = bp->streamCallback( userInput, userOutput,
+                    bp->framesPerUserBuffer, bp->timeInfo,
+                    bp->callbackStatusFlags, bp->userData );
+
+            if( *streamCallbackResult == paAbort )
+            {
+                /* if the callback returned paAbort, we disregard its output */
+            }
+            else
+            {
+                bp->timeInfo->outputBufferDacTime += bp->framesPerUserBuffer * bp->samplePeriod;
+
+                bp->framesInTempOutputBuffer = bp->framesPerUserBuffer;
+            }
+        }
+
+        if( bp->framesInTempOutputBuffer > 0 )
+        {
+            /* convert frameCount frames from user buffer to host buffer */
+
+            frameCount = PA_MIN_( bp->framesInTempOutputBuffer, framesToGo );
+
+            if( bp->userOutputIsInterleaved )
+            {
+                srcBytePtr = ((unsigned char*)bp->tempOutputBuffer) +
+                        bp->bytesPerUserOutputSample * bp->outputChannelCount *
+                        (bp->framesPerUserBuffer - bp->framesInTempOutputBuffer);
+
+                srcSampleStrideSamples = bp->outputChannelCount;
+                srcChannelStrideBytes = bp->bytesPerUserOutputSample;
+            }
+            else /* user output is not interleaved */
+            {
+                srcBytePtr = ((unsigned char*)bp->tempOutputBuffer) +
+                        bp->bytesPerUserOutputSample *
+                        (bp->framesPerUserBuffer - bp->framesInTempOutputBuffer);
+                            
+                srcSampleStrideSamples = 1;
+                srcChannelStrideBytes = bp->framesPerUserBuffer * bp->bytesPerUserOutputSample;
+            }
+
+            for( i=0; i<bp->outputChannelCount; ++i )
+            {
+                bp->outputConverter(    hostOutputChannels[i].data,
+                                        hostOutputChannels[i].stride,
+                                        srcBytePtr, srcSampleStrideSamples,
+                                        frameCount, &bp->ditherGenerator );
+
+                srcBytePtr += srcChannelStrideBytes;  /* skip to next source channel */
+
+                /* advance dest ptr for next iteration */
+                hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +
+                        frameCount * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;
+            }
+
+            bp->framesInTempOutputBuffer -= frameCount;
+        }
+        else
+        {
+            /* no more user data is available because the callback has returned
+                paComplete or paAbort. Fill the remainder of the host buffer
+                with zeros.
+            */
+
+            frameCount = framesToGo;
+
+            for( i=0; i<bp->outputChannelCount; ++i )
+            {
+                bp->outputZeroer(   hostOutputChannels[i].data,
+                                    hostOutputChannels[i].stride,
+                                    frameCount );
+
+                /* advance dest ptr for next iteration */
+                hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +
+                        frameCount * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;
+            }
+        }
+        
+        framesProcessed += frameCount;
+        
+        framesToGo -= frameCount;
+
+    }while( framesToGo > 0 );
+
+    return framesProcessed;
+}
+
+/* CopyTempOutputBuffersToHostOutputBuffers is called from AdaptingProcess to copy frames from
+	tempOutputBuffer to hostOutputChannels. This includes data conversion
+	and interleaving. 
+*/
+static void CopyTempOutputBuffersToHostOutputBuffers( PaUtilBufferProcessor *bp)
+{
+    unsigned long maxFramesToCopy;
+    PaUtilChannelDescriptor *hostOutputChannels;
+    unsigned int frameCount;
+    unsigned char *srcBytePtr;
+    unsigned int srcSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */
+    unsigned int srcChannelStrideBytes; /* stride from one channel to the next, in bytes */
+    unsigned int i;
+
+     /* copy frames from user to host output buffers */
+     while( bp->framesInTempOutputBuffer > 0 &&
+             ((bp->hostOutputFrameCount[0] + bp->hostOutputFrameCount[1]) > 0) )
+     {
+         maxFramesToCopy = bp->framesInTempOutputBuffer;
+
+         /* select the output buffer set (1st or 2nd) */
+         if( bp->hostOutputFrameCount[0] > 0 )
+         {
+             hostOutputChannels = bp->hostOutputChannels[0];
+             frameCount = PA_MIN_( bp->hostOutputFrameCount[0], maxFramesToCopy );
+         }
+         else
+         {
+             hostOutputChannels = bp->hostOutputChannels[1];
+             frameCount = PA_MIN_( bp->hostOutputFrameCount[1], maxFramesToCopy );
+         }
+
+         if( bp->userOutputIsInterleaved )
+         {
+             srcBytePtr = ((unsigned char*)bp->tempOutputBuffer) +
+                     bp->bytesPerUserOutputSample * bp->outputChannelCount *
+                     (bp->framesPerUserBuffer - bp->framesInTempOutputBuffer);
+                         
+             srcSampleStrideSamples = bp->outputChannelCount;
+             srcChannelStrideBytes = bp->bytesPerUserOutputSample;
+         }
+         else /* user output is not interleaved */
+         {
+             srcBytePtr = ((unsigned char*)bp->tempOutputBuffer) +
+                     bp->bytesPerUserOutputSample *
+                     (bp->framesPerUserBuffer - bp->framesInTempOutputBuffer);
+
+             srcSampleStrideSamples = 1;
+             srcChannelStrideBytes = bp->framesPerUserBuffer * bp->bytesPerUserOutputSample;
+         }
+
+         for( i=0; i<bp->outputChannelCount; ++i )
+         {
+             bp->outputConverter(    hostOutputChannels[i].data,
+                                     hostOutputChannels[i].stride,
+                                     srcBytePtr, srcSampleStrideSamples,
+                                     frameCount, &bp->ditherGenerator );
+
+             srcBytePtr += srcChannelStrideBytes;  /* skip to next source channel */
+
+             /* advance dest ptr for next iteration */
+             hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +
+                     frameCount * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;
+         }
+
+         if( bp->hostOutputFrameCount[0] > 0 )
+             bp->hostOutputFrameCount[0] -= frameCount;
+         else
+             bp->hostOutputFrameCount[1] -= frameCount;
+
+         bp->framesInTempOutputBuffer -= frameCount;
+     }
+}
+
+/*
+    AdaptingProcess is a full duplex adapting buffer processor. It converts
+    data from the temporary output buffer into the host output buffers, then
+    from the host input buffers into the temporary input buffers. Calling the
+    streamCallback when necessary.
+    When processPartialUserBuffers is 0, all available input data will be
+    consumed and all available output space will be filled. When
+    processPartialUserBuffers is non-zero, as many full user buffers
+    as possible will be processed, but partial buffers will not be consumed.
+*/
+static unsigned long AdaptingProcess( PaUtilBufferProcessor *bp,
+        int *streamCallbackResult, int processPartialUserBuffers )
+{
+    void *userInput, *userOutput;
+    unsigned long framesProcessed = 0;
+    unsigned long framesAvailable;
+    unsigned long endProcessingMinFrameCount;
+    unsigned long maxFramesToCopy;
+    PaUtilChannelDescriptor *hostInputChannels, *hostOutputChannels;
+    unsigned int frameCount;
+    unsigned char *destBytePtr;
+    unsigned int destSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */
+    unsigned int destChannelStrideBytes; /* stride from one channel to the next, in bytes */
+    unsigned int i, j;
+ 
+
+    framesAvailable = bp->hostInputFrameCount[0] + bp->hostInputFrameCount[1];/* this is assumed to be the same as the output buffer's frame count */
+
+    if( processPartialUserBuffers )
+        endProcessingMinFrameCount = 0;
+    else
+        endProcessingMinFrameCount = (bp->framesPerUserBuffer - 1);
+
+    /* Fill host output with remaining frames in user output (tempOutputBuffer) */
+    CopyTempOutputBuffersToHostOutputBuffers( bp );		  	
+
+    while( framesAvailable > endProcessingMinFrameCount ) 
+    {
+
+        if( bp->framesInTempOutputBuffer == 0 && *streamCallbackResult != paContinue )
+        {
+            /* the callback will not be called any more, so zero what remains
+                of the host output buffers */
+
+            for( i=0; i<2; ++i )
+            {
+                frameCount = bp->hostOutputFrameCount[i];
+                if( frameCount > 0 )
+                {
+                    hostOutputChannels = bp->hostOutputChannels[i];
+                    
+                    for( j=0; j<bp->outputChannelCount; ++j )
+                    {
+                        bp->outputZeroer(   hostOutputChannels[j].data,
+                                            hostOutputChannels[j].stride,
+                                            frameCount );
+
+                        /* advance dest ptr for next iteration  */
+                        hostOutputChannels[j].data = ((unsigned char*)hostOutputChannels[j].data) +
+                                frameCount * hostOutputChannels[j].stride * bp->bytesPerHostOutputSample;
+                    }
+                    bp->hostOutputFrameCount[i] = 0;
+                }
+            }
+        }          
+
+
+        /* copy frames from host to user input buffers */
+        while( bp->framesInTempInputBuffer < bp->framesPerUserBuffer &&
+                ((bp->hostInputFrameCount[0] + bp->hostInputFrameCount[1]) > 0) )
+        {
+            maxFramesToCopy = bp->framesPerUserBuffer - bp->framesInTempInputBuffer;
+
+            /* select the input buffer set (1st or 2nd) */
+            if( bp->hostInputFrameCount[0] > 0 )
+            {
+                hostInputChannels = bp->hostInputChannels[0];
+                frameCount = PA_MIN_( bp->hostInputFrameCount[0], maxFramesToCopy );
+            }
+            else
+            {
+                hostInputChannels = bp->hostInputChannels[1];
+                frameCount = PA_MIN_( bp->hostInputFrameCount[1], maxFramesToCopy );
+            }
+
+            /* configure conversion destination pointers */
+            if( bp->userInputIsInterleaved )
+            {
+                destBytePtr = ((unsigned char*)bp->tempInputBuffer) +
+                        bp->bytesPerUserInputSample * bp->inputChannelCount *
+                        bp->framesInTempInputBuffer;
+
+                destSampleStrideSamples = bp->inputChannelCount;
+                destChannelStrideBytes = bp->bytesPerUserInputSample;
+            }
+            else /* user input is not interleaved */
+            {
+                destBytePtr = ((unsigned char*)bp->tempInputBuffer) +
+                        bp->bytesPerUserInputSample * bp->framesInTempInputBuffer;
+
+                destSampleStrideSamples = 1;
+                destChannelStrideBytes = bp->framesPerUserBuffer * bp->bytesPerUserInputSample;
+            }
+
+            for( i=0; i<bp->inputChannelCount; ++i )
+            {
+                bp->inputConverter( destBytePtr, destSampleStrideSamples,
+                                        hostInputChannels[i].data,
+                                        hostInputChannels[i].stride,
+                                        frameCount, &bp->ditherGenerator );
+
+                destBytePtr += destChannelStrideBytes;  /* skip to next destination channel */
+
+                /* advance src ptr for next iteration */
+                hostInputChannels[i].data = ((unsigned char*)hostInputChannels[i].data) +
+                        frameCount * hostInputChannels[i].stride * bp->bytesPerHostInputSample;
+            }
+
+            if( bp->hostInputFrameCount[0] > 0 )
+                bp->hostInputFrameCount[0] -= frameCount;
+            else
+                bp->hostInputFrameCount[1] -= frameCount;
+                
+            bp->framesInTempInputBuffer += frameCount;
+
+            /* update framesAvailable and framesProcessed based on input consumed
+                unless something is very wrong this will also correspond to the
+                amount of output generated */
+            framesAvailable -= frameCount;
+            framesProcessed += frameCount;
+        }
+
+        /* call streamCallback */
+        if( bp->framesInTempInputBuffer == bp->framesPerUserBuffer &&
+            bp->framesInTempOutputBuffer == 0 )
+        {
+            if( *streamCallbackResult == paContinue )
+            {
+                /* setup userInput */
+                if( bp->userInputIsInterleaved )
+                {
+                    userInput = bp->tempInputBuffer;
+                }
+                else /* user input is not interleaved */
+                {
+                    for( i = 0; i < bp->inputChannelCount; ++i )
+                    {
+                        bp->tempInputBufferPtrs[i] = ((unsigned char*)bp->tempInputBuffer) +
+                                i * bp->framesPerUserBuffer * bp->bytesPerUserInputSample;
+                    }
+
+                    userInput = bp->tempInputBufferPtrs;
+                }
+
+                /* setup userOutput */
+                if( bp->userOutputIsInterleaved )
+                {
+                    userOutput = bp->tempOutputBuffer;
+                }
+                else /* user output is not interleaved */
+                {
+                    for( i = 0; i < bp->outputChannelCount; ++i )
+                    {
+                        bp->tempOutputBufferPtrs[i] = ((unsigned char*)bp->tempOutputBuffer) +
+                                i * bp->framesPerUserBuffer * bp->bytesPerUserOutputSample;
+                    }
+
+                    userOutput = bp->tempOutputBufferPtrs;
+                }
+
+                /* call streamCallback */
+
+                *streamCallbackResult = bp->streamCallback( userInput, userOutput,
+                        bp->framesPerUserBuffer, bp->timeInfo,
+                        bp->callbackStatusFlags, bp->userData );
+
+                bp->timeInfo->inputBufferAdcTime += bp->framesPerUserBuffer * bp->samplePeriod;
+                bp->timeInfo->outputBufferDacTime += bp->framesPerUserBuffer * bp->samplePeriod;
+
+                bp->framesInTempInputBuffer = 0;
+
+                if( *streamCallbackResult == paAbort )
+                    bp->framesInTempOutputBuffer = 0;
+                else
+                    bp->framesInTempOutputBuffer = bp->framesPerUserBuffer;
+            }
+            else
+            {
+                /* paComplete or paAbort has already been called. */
+
+                bp->framesInTempInputBuffer = 0;
+            }
+        }
+
+        /* copy frames from user (tempOutputBuffer) to host output buffers (hostOutputChannels) 
+           Means to process the user output provided by the callback. Has to be called after
+            each callback. */
+        CopyTempOutputBuffersToHostOutputBuffers( bp );		  	
+
+    }
+    
+    return framesProcessed;
+}
+
+
+unsigned long PaUtil_EndBufferProcessing( PaUtilBufferProcessor* bp, int *streamCallbackResult )
+{
+    unsigned long framesToProcess, framesToGo;
+    unsigned long framesProcessed = 0;
+    
+    if( bp->inputChannelCount != 0 && bp->outputChannelCount != 0
+            && bp->hostInputChannels[0][0].data /* input was supplied (see PaUtil_SetNoInput) */
+            && bp->hostOutputChannels[0][0].data /* output was supplied (see PaUtil_SetNoOutput) */ )
+    {
+        assert( (bp->hostInputFrameCount[0] + bp->hostInputFrameCount[1]) ==
+                (bp->hostOutputFrameCount[0] + bp->hostOutputFrameCount[1]) );
+    }
+
+    assert( *streamCallbackResult == paContinue
+            || *streamCallbackResult == paComplete
+            || *streamCallbackResult == paAbort ); /* don't forget to pass in a valid callback result value */
+
+    if( bp->useNonAdaptingProcess )
+    {
+        if( bp->inputChannelCount != 0 && bp->outputChannelCount != 0 )
+        {
+            /* full duplex non-adapting process, splice buffers if they are
+                different lengths */
+
+            framesToGo = bp->hostOutputFrameCount[0] + bp->hostOutputFrameCount[1]; /* relies on assert above for input/output equivalence */
+
+            do{
+                unsigned long noInputInputFrameCount;
+                unsigned long *hostInputFrameCount;
+                PaUtilChannelDescriptor *hostInputChannels;
+                unsigned long noOutputOutputFrameCount;
+                unsigned long *hostOutputFrameCount;
+                PaUtilChannelDescriptor *hostOutputChannels;
+                unsigned long framesProcessedThisIteration;
+
+                if( !bp->hostInputChannels[0][0].data )
+                {
+                    /* no input was supplied (see PaUtil_SetNoInput)
+                        NonAdaptingProcess knows how to deal with this
+                    */
+                    noInputInputFrameCount = framesToGo;
+                    hostInputFrameCount = &noInputInputFrameCount;
+                    hostInputChannels = 0;
+                }
+                else if( bp->hostInputFrameCount[0] != 0 )
+                {
+                    hostInputFrameCount = &bp->hostInputFrameCount[0];
+                    hostInputChannels = bp->hostInputChannels[0];
+                }
+                else
+                {
+                    hostInputFrameCount = &bp->hostInputFrameCount[1];
+                    hostInputChannels = bp->hostInputChannels[1];
+                }
+
+                if( !bp->hostOutputChannels[0][0].data )
+                {
+                    /* no output was supplied (see PaUtil_SetNoOutput)
+                        NonAdaptingProcess knows how to deal with this
+                    */
+                    noOutputOutputFrameCount = framesToGo;
+                    hostOutputFrameCount = &noOutputOutputFrameCount;
+                    hostOutputChannels = 0;
+                }
+                if( bp->hostOutputFrameCount[0] != 0 )
+                {
+                    hostOutputFrameCount = &bp->hostOutputFrameCount[0];
+                    hostOutputChannels = bp->hostOutputChannels[0];
+                }
+                else
+                {
+                    hostOutputFrameCount = &bp->hostOutputFrameCount[1];
+                    hostOutputChannels = bp->hostOutputChannels[1];
+                }
+
+                framesToProcess = PA_MIN_( *hostInputFrameCount,
+                                       *hostOutputFrameCount );
+
+                assert( framesToProcess != 0 );
+                
+                framesProcessedThisIteration = NonAdaptingProcess( bp, streamCallbackResult,
+                        hostInputChannels, hostOutputChannels,
+                        framesToProcess );                                       
+
+                *hostInputFrameCount -= framesProcessedThisIteration;
+                *hostOutputFrameCount -= framesProcessedThisIteration;
+
+                framesProcessed += framesProcessedThisIteration;
+                framesToGo -= framesProcessedThisIteration;
+                
+            }while( framesToGo > 0 );
+        }
+        else
+        {
+            /* half duplex non-adapting process, just process 1st and 2nd buffer */
+            /* process first buffer */
+
+            framesToProcess = (bp->inputChannelCount != 0)
+                            ? bp->hostInputFrameCount[0]
+                            : bp->hostOutputFrameCount[0];
+
+            framesProcessed = NonAdaptingProcess( bp, streamCallbackResult,
+                        bp->hostInputChannels[0], bp->hostOutputChannels[0],
+                        framesToProcess );
+
+            /* process second buffer if provided */
+    
+            framesToProcess = (bp->inputChannelCount != 0)
+                            ? bp->hostInputFrameCount[1]
+                            : bp->hostOutputFrameCount[1];
+            if( framesToProcess > 0 )
+            {
+                framesProcessed += NonAdaptingProcess( bp, streamCallbackResult,
+                    bp->hostInputChannels[1], bp->hostOutputChannels[1],
+                    framesToProcess );
+            }
+        }
+    }
+    else /* block adaption necessary*/
+    {
+
+        if( bp->inputChannelCount != 0 && bp->outputChannelCount != 0 )
+        {
+            /* full duplex */
+            
+            if( bp->hostBufferSizeMode == paUtilVariableHostBufferSizePartialUsageAllowed  )
+            {
+                framesProcessed = AdaptingProcess( bp, streamCallbackResult,
+                        0 /* dont process partial user buffers */ );
+            }
+            else
+            {
+                framesProcessed = AdaptingProcess( bp, streamCallbackResult,
+                        1 /* process partial user buffers */ );
+            }
+        }
+        else if( bp->inputChannelCount != 0 )
+        {
+            /* input only */
+            framesToProcess = bp->hostInputFrameCount[0];
+
+            framesProcessed = AdaptingInputOnlyProcess( bp, streamCallbackResult,
+                        bp->hostInputChannels[0], framesToProcess );
+
+            framesToProcess = bp->hostInputFrameCount[1];
+            if( framesToProcess > 0 )
+            {
+                framesProcessed += AdaptingInputOnlyProcess( bp, streamCallbackResult,
+                        bp->hostInputChannels[1], framesToProcess );
+            }
+        }
+        else
+        {
+            /* output only */
+            framesToProcess = bp->hostOutputFrameCount[0];
+
+            framesProcessed = AdaptingOutputOnlyProcess( bp, streamCallbackResult,
+                        bp->hostOutputChannels[0], framesToProcess );
+
+            framesToProcess = bp->hostOutputFrameCount[1];
+            if( framesToProcess > 0 )
+            {
+                framesProcessed += AdaptingOutputOnlyProcess( bp, streamCallbackResult,
+                        bp->hostOutputChannels[1], framesToProcess );
+            }
+        }
+    }
+
+    return framesProcessed;
+}
+
+
+int PaUtil_IsBufferProcessorOutputEmpty( PaUtilBufferProcessor* bp )
+{
+    return (bp->framesInTempOutputBuffer) ? 0 : 1;
+} 
+
+
+unsigned long PaUtil_CopyInput( PaUtilBufferProcessor* bp,
+        void **buffer, unsigned long frameCount )
+{
+    PaUtilChannelDescriptor *hostInputChannels;
+    unsigned int framesToCopy;
+    unsigned char *destBytePtr;
+    void **nonInterleavedDestPtrs;
+    unsigned int destSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */
+    unsigned int destChannelStrideBytes; /* stride from one channel to the next, in bytes */
+    unsigned int i;
+
+    hostInputChannels = bp->hostInputChannels[0];
+    framesToCopy = PA_MIN_( bp->hostInputFrameCount[0], frameCount );
+
+    if( bp->userInputIsInterleaved )
+    {
+        destBytePtr = (unsigned char*)*buffer;
+        
+        destSampleStrideSamples = bp->inputChannelCount;
+        destChannelStrideBytes = bp->bytesPerUserInputSample;
+
+        for( i=0; i<bp->inputChannelCount; ++i )
+        {
+            bp->inputConverter( destBytePtr, destSampleStrideSamples,
+                                hostInputChannels[i].data,
+                                hostInputChannels[i].stride,
+                                framesToCopy, &bp->ditherGenerator );
+
+            destBytePtr += destChannelStrideBytes;  /* skip to next source channel */
+
+            /* advance dest ptr for next iteration */
+            hostInputChannels[i].data = ((unsigned char*)hostInputChannels[i].data) +
+                    framesToCopy * hostInputChannels[i].stride * bp->bytesPerHostInputSample;
+        }
+
+        /* advance callers dest pointer (buffer) */
+        *buffer = ((unsigned char *)*buffer) +
+                framesToCopy * bp->inputChannelCount * bp->bytesPerUserInputSample;
+    }
+    else
+    {
+        /* user input is not interleaved */
+        
+        nonInterleavedDestPtrs = (void**)*buffer;
+
+        destSampleStrideSamples = 1;
+        
+        for( i=0; i<bp->inputChannelCount; ++i )
+        {
+            destBytePtr = (unsigned char*)nonInterleavedDestPtrs[i];
+
+            bp->inputConverter( destBytePtr, destSampleStrideSamples,
+                                hostInputChannels[i].data,
+                                hostInputChannels[i].stride,
+                                framesToCopy, &bp->ditherGenerator );
+
+            /* advance callers dest pointer (nonInterleavedDestPtrs[i]) */
+            destBytePtr += bp->bytesPerUserInputSample * framesToCopy;
+            nonInterleavedDestPtrs[i] = destBytePtr;
+            
+            /* advance dest ptr for next iteration */
+            hostInputChannels[i].data = ((unsigned char*)hostInputChannels[i].data) +
+                    framesToCopy * hostInputChannels[i].stride * bp->bytesPerHostInputSample;
+        }
+    }
+
+    bp->hostInputFrameCount[0] -= framesToCopy;
+    
+    return framesToCopy;
+}
+
+unsigned long PaUtil_CopyOutput( PaUtilBufferProcessor* bp,
+        const void ** buffer, unsigned long frameCount )
+{
+    PaUtilChannelDescriptor *hostOutputChannels;
+    unsigned int framesToCopy;
+    unsigned char *srcBytePtr;
+    void **nonInterleavedSrcPtrs;
+    unsigned int srcSampleStrideSamples; /* stride from one sample to the next within a channel, in samples */
+    unsigned int srcChannelStrideBytes; /* stride from one channel to the next, in bytes */
+    unsigned int i;
+
+    hostOutputChannels = bp->hostOutputChannels[0];
+    framesToCopy = PA_MIN_( bp->hostOutputFrameCount[0], frameCount );
+
+    if( bp->userOutputIsInterleaved )
+    {
+        srcBytePtr = (unsigned char*)*buffer;
+        
+        srcSampleStrideSamples = bp->outputChannelCount;
+        srcChannelStrideBytes = bp->bytesPerUserOutputSample;
+
+        for( i=0; i<bp->outputChannelCount; ++i )
+        {
+            bp->outputConverter(    hostOutputChannels[i].data,
+                                    hostOutputChannels[i].stride,
+                                    srcBytePtr, srcSampleStrideSamples,
+                                    framesToCopy, &bp->ditherGenerator );
+
+            srcBytePtr += srcChannelStrideBytes;  /* skip to next source channel */
+
+            /* advance dest ptr for next iteration */
+            hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +
+                    framesToCopy * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;
+        }
+
+        /* advance callers source pointer (buffer) */
+        *buffer = ((unsigned char *)*buffer) +
+                framesToCopy * bp->outputChannelCount * bp->bytesPerUserOutputSample;
+
+    }
+    else
+    {
+        /* user output is not interleaved */
+        
+        nonInterleavedSrcPtrs = (void**)*buffer;
+
+        srcSampleStrideSamples = 1;
+        
+        for( i=0; i<bp->outputChannelCount; ++i )
+        {
+            srcBytePtr = (unsigned char*)nonInterleavedSrcPtrs[i];
+            
+            bp->outputConverter(    hostOutputChannels[i].data,
+                                    hostOutputChannels[i].stride,
+                                    srcBytePtr, srcSampleStrideSamples,
+                                    framesToCopy, &bp->ditherGenerator );
+
+
+            /* advance callers source pointer (nonInterleavedSrcPtrs[i]) */
+            srcBytePtr += bp->bytesPerUserOutputSample * framesToCopy;
+            nonInterleavedSrcPtrs[i] = srcBytePtr;
+            
+            /* advance dest ptr for next iteration */
+            hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +
+                    framesToCopy * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;
+        }
+    }
+
+    bp->hostOutputFrameCount[0] += framesToCopy;
+    
+    return framesToCopy;
+}
+
+
+unsigned long PaUtil_ZeroOutput( PaUtilBufferProcessor* bp, unsigned long frameCount )
+{
+    PaUtilChannelDescriptor *hostOutputChannels;
+    unsigned int framesToZero;
+    unsigned int i;
+
+    hostOutputChannels = bp->hostOutputChannels[0];
+    framesToZero = PA_MIN_( bp->hostOutputFrameCount[0], frameCount );
+
+    for( i=0; i<bp->outputChannelCount; ++i )
+    {
+        bp->outputZeroer(   hostOutputChannels[i].data,
+                            hostOutputChannels[i].stride,
+                            framesToZero );
+
+
+        /* advance dest ptr for next iteration */
+        hostOutputChannels[i].data = ((unsigned char*)hostOutputChannels[i].data) +
+                framesToZero * hostOutputChannels[i].stride * bp->bytesPerHostOutputSample;
+    }
+
+    bp->hostOutputFrameCount[0] += framesToZero;
+    
+    return framesToZero;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_process.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_process.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_process.h	(revision 1163)
@@ -0,0 +1,741 @@
+#ifndef PA_PROCESS_H
+#define PA_PROCESS_H
+/*
+ * $Id: pa_process.h,v 1.1.2.30 2004/12/13 09:48:44 rossbencina Exp $
+ * Portable Audio I/O Library callback buffer processing adapters
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Phil Burk, Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+ 
+/** @file
+ @brief Buffer Processor prototypes. A Buffer Processor performs buffer length
+ adaption, coordinates sample format conversion, and interleaves/deinterleaves
+ channels.
+
+ <h3>Overview</h3>
+
+ The "Buffer Processor" (PaUtilBufferProcessor) manages conversion of audio
+ data from host buffers to user buffers and back again. Where required, the
+ buffer processor takes care of converting between host and user sample formats,
+ interleaving and deinterleaving multichannel buffers, and adapting between host
+ and user buffers with different lengths. The buffer processor may be used with
+ full and half duplex streams, for both callback streams and blocking read/write
+ streams.
+
+ One of the important capabilities provided by the buffer processor is
+ the ability to adapt between user and host buffer sizes of different lengths
+ with minimum latency. Although this task is relatively easy to perform when
+ the host buffer size is an integer multiple of the user buffer size, the
+ problem is more complicated when this is not the case - especially for
+ full-duplex callback streams. Where necessary the adaption is implemented by
+ internally buffering some input and/or output data. The buffer adation
+ algorithm used by the buffer processor was originally implemented by
+ Stephan Letz for the ASIO version of PortAudio, and is described in his
+ Callback_adaption_.pdf which is included in the distribution.
+
+ The buffer processor performs sample conversion using the functions provided
+ by pa_converters.c.
+
+ The following sections provide an overview of how to use the buffer processor.
+ Interested readers are advised to consult the host API implementations for
+ examples of buffer processor usage.
+ 
+
+ <h4>Initialization, resetting and termination</h4>
+
+ When a stream is opened, the buffer processor should be initialized using
+ PaUtil_InitializeBufferProcessor. This function initializes internal state
+ and allocates temporary buffers as neccesary according to the supplied
+ configuration parameters. Some of the parameters correspond to those requested
+ by the user in their call to Pa_OpenStream(), others reflect the requirements
+ of the host API implementation - they indicate host buffer sizes, formats,
+ and the type of buffering which the Host API uses. The buffer processor should
+ be initialized for callback streams and blocking read/write streams.
+
+ Call PaUtil_ResetBufferProcessor to clear any sample data which is present
+ in the buffer processor before starting to use it (for example when
+ Pa_StartStream is called).
+
+ When the buffer processor is no longer used call
+ PaUtil_TerminateBufferProcessor.
+
+ 
+ <h4>Using the buffer processor for a callback stream</h4>
+
+ The buffer processor's role in a callback stream is to take host input buffers
+ process them with the stream callback, and fill host output buffers. For a
+ full duplex stream, the buffer processor handles input and output simultaneously
+ due to the requirements of the minimum-latency buffer adation algorithm.
+
+ When a host buffer becomes available, the implementation should call
+ the buffer processor to process the buffer. The buffer processor calls the
+ stream callback to consume and/or produce audio data as necessary. The buffer
+ processor will convert sample formats, interleave/deinterleave channels,
+ and slice or chunk the data to the appropriate buffer lengths according to
+ the requirements of the stream callback and the host API.
+
+ To process a host buffer (or a pair of host buffers for a full-duplex stream)
+ use the following calling sequence:
+
+ -# Call PaUtil_BeginBufferProcessing
+ -# For a stream which takes input:
+    - Call PaUtil_SetInputFrameCount with the number of frames in the host input
+        buffer.
+    - Call one of the following functions one or more times to tell the
+        buffer processor about the host input buffer(s): PaUtil_SetInputChannel,
+        PaUtil_SetInterleavedInputChannels, PaUtil_SetNonInterleavedInputChannel.
+        Which function you call will depend on whether the host buffer(s) are
+        interleaved or not.
+    - If the available host data is split accross two buffers (for example a
+        data range at the end of a circular buffer and another range at the
+        beginning of the circular buffer), also call
+        PaUtil_Set2ndInputFrameCount, PaUtil_Set2ndInputChannel,
+        PaUtil_Set2ndInterleavedInputChannels,
+        PaUtil_Set2ndNonInterleavedInputChannel as necessary to tell the buffer
+        processor about the second buffer.
+ -# For a stream which generates output:
+    - Call PaUtil_SetOutputFrameCount with the number of frames in the host
+        output buffer.
+    - Call one of the following functions one or more times to tell the
+        buffer processor about the host output buffer(s): PaUtil_SetOutputChannel,
+        PaUtil_SetInterleavedOutputChannels, PaUtil_SetNonInterleavedOutputChannel.
+        Which function you call will depend on whether the host buffer(s) are
+        interleaved or not.
+    - If the available host output buffer space is split accross two buffers
+        (for example a data range at the end of a circular buffer and another
+        range at the beginning of the circular buffer), call
+        PaUtil_Set2ndOutputFrameCount, PaUtil_Set2ndOutputChannel,
+        PaUtil_Set2ndInterleavedOutputChannels,
+        PaUtil_Set2ndNonInterleavedOutputChannel as necessary to tell the buffer
+        processor about the second buffer.
+ -# Call PaUtil_EndBufferProcessing, this function performs the actual data
+    conversion and processing.
+
+
+ <h4>Using the buffer processor for a blocking read/write stream</h4>
+
+ Blocking read/write streams use the buffer processor to convert and copy user
+ output data to a host buffer, and to convert and copy host input data to
+ the user's buffer. The buffer processor does not perform any buffer adaption.
+ When using the buffer processor in a blocking read/write stream the input and
+ output conversion are performed separately by the PaUtil_CopyInput and
+ PaUtil_CopyOutput functions.
+
+ To copy data from a host input buffer to the buffer(s) which the user supplies
+ to Pa_ReadStream, use the following calling sequence.
+
+ - Repeat the following three steps until the user buffer(s) have been filled
+    with samples from the host input buffers:
+     -# Call PaUtil_SetInputFrameCount with the number of frames in the host
+        input buffer.
+     -# Call one of the following functions one or more times to tell the
+        buffer processor about the host input buffer(s): PaUtil_SetInputChannel,
+        PaUtil_SetInterleavedInputChannels, PaUtil_SetNonInterleavedInputChannel.
+        Which function you call will depend on whether the host buffer(s) are
+        interleaved or not.
+     -# Call PaUtil_CopyInput with the user buffer pointer (or a copy of the
+        array of buffer pointers for a non-interleaved stream) passed to
+        Pa_ReadStream, along with the number of frames in the user buffer(s).
+        Be careful to pass a <i>copy</i> of the user buffer pointers to
+        PaUtil_CopyInput because PaUtil_CopyInput advances the pointers to
+        the start of the next region to copy.
+ - PaUtil_CopyInput will not copy more data than is available in the
+    host buffer(s), so the above steps need to be repeated until the user
+    buffer(s) are full.
+
+ 
+ To copy data to the host output buffer from the user buffers(s) supplied
+ to Pa_WriteStream use the following calling sequence.
+
+ - Repeat the following three steps until all frames from the user buffer(s)
+    have been copied to the host API:
+     -# Call PaUtil_SetOutputFrameCount with the number of frames in the host
+        output buffer.
+     -# Call one of the following functions one or more times to tell the
+        buffer processor about the host output buffer(s): PaUtil_SetOutputChannel,
+        PaUtil_SetInterleavedOutputChannels, PaUtil_SetNonInterleavedOutputChannel.
+        Which function you call will depend on whether the host buffer(s) are
+        interleaved or not.
+     -# Call PaUtil_CopyOutput with the user buffer pointer (or a copy of the
+        array of buffer pointers for a non-interleaved stream) passed to
+        Pa_WriteStream, along with the number of frames in the user buffer(s).
+        Be careful to pass a <i>copy</i> of the user buffer pointers to 
+        PaUtil_CopyOutput because PaUtil_CopyOutput advances the pointers to
+        the start of the next region to copy.
+ - PaUtil_CopyOutput will not copy more data than fits in the host buffer(s),
+    so the above steps need to be repeated until all user data is copied.
+*/
+
+
+#include "portaudio.h"
+#include "pa_converters.h"
+#include "pa_dither.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/** @brief Mode flag passed to PaUtil_InitializeBufferProcessor indicating the type
+ of buffering that the host API uses.
+
+ The mode used depends on whether the host API or the implementation manages
+ the buffers, and how these buffers are used (scatter gather, circular buffer).
+*/
+typedef enum {
+/** The host buffer size is a fixed known size. */
+    paUtilFixedHostBufferSize,
+
+/** The host buffer size may vary, but has a known maximum size. */
+    paUtilBoundedHostBufferSize,
+
+/** Nothing is known about the host buffer size. */
+    paUtilUnknownHostBufferSize,
+
+/** The host buffer size varies, and the client does not require the buffer
+ processor to consume all of the input and fill all of the output buffer. This
+ is useful when the implementation has access to the host API's circular buffer
+ and only needs to consume/fill some of it, not necessarily all of it, with each
+ call to the buffer processor. This is the only mode where
+ PaUtil_EndBufferProcessing() may not consume the whole buffer.
+*/
+    paUtilVariableHostBufferSizePartialUsageAllowed
+}PaUtilHostBufferSizeMode;
+
+
+/** @brief An auxilliary data structure used internally by the buffer processor
+ to represent host input and output buffers. */
+typedef struct PaUtilChannelDescriptor{
+    void *data;
+    unsigned int stride;  /**< stride in samples, not bytes */
+}PaUtilChannelDescriptor;
+
+
+/** @brief The main buffer processor data structure.
+
+ Allocate one of these, initialize it with PaUtil_InitializeBufferProcessor
+ and terminate it with PaUtil_TerminateBufferProcessor.
+*/
+typedef struct {
+    unsigned long framesPerUserBuffer;
+    unsigned long framesPerHostBuffer;
+
+    PaUtilHostBufferSizeMode hostBufferSizeMode;
+    int useNonAdaptingProcess;
+    unsigned long framesPerTempBuffer;
+
+    unsigned int inputChannelCount;
+    unsigned int bytesPerHostInputSample;
+    unsigned int bytesPerUserInputSample;
+    int userInputIsInterleaved;
+    PaUtilConverter *inputConverter;
+    PaUtilZeroer *inputZeroer;
+    
+    unsigned int outputChannelCount;
+    unsigned int bytesPerHostOutputSample;
+    unsigned int bytesPerUserOutputSample;
+    int userOutputIsInterleaved;
+    PaUtilConverter *outputConverter;
+    PaUtilZeroer *outputZeroer;
+
+    unsigned long initialFramesInTempInputBuffer;
+    unsigned long initialFramesInTempOutputBuffer;
+
+    void *tempInputBuffer;          /**< used for slips, block adaption, and conversion. */
+    void **tempInputBufferPtrs;     /**< storage for non-interleaved buffer pointers, NULL for interleaved user input */
+    unsigned long framesInTempInputBuffer; /**< frames remaining in input buffer from previous adaption iteration */
+
+    void *tempOutputBuffer;         /**< used for slips, block adaption, and conversion. */
+    void **tempOutputBufferPtrs;    /**< storage for non-interleaved buffer pointers, NULL for interleaved user output */
+    unsigned long framesInTempOutputBuffer; /**< frames remaining in input buffer from previous adaption iteration */
+
+    PaStreamCallbackTimeInfo *timeInfo;
+
+    PaStreamCallbackFlags callbackStatusFlags;
+
+    unsigned long hostInputFrameCount[2];
+    PaUtilChannelDescriptor *hostInputChannels[2]; /**< pointers to arrays of channel descriptors.
+                                                        pointers are NULL for half-duplex output processing.
+                                                        hostInputChannels[i].data is NULL when the caller
+                                                        calls PaUtil_SetNoInput()
+                                                        */
+    unsigned long hostOutputFrameCount[2];
+    PaUtilChannelDescriptor *hostOutputChannels[2]; /**< pointers to arrays of channel descriptors.
+                                                         pointers are NULL for half-duplex input processing.
+                                                         hostOutputChannels[i].data is NULL when the caller
+                                                         calls PaUtil_SetNoOutput()
+                                                         */
+
+    PaUtilTriangularDitherGenerator ditherGenerator;
+
+    double samplePeriod;
+
+    PaStreamCallback *streamCallback;
+    void *userData;
+} PaUtilBufferProcessor;
+
+
+/** @name Initialization, termination, resetting and info */
+/*@{*/
+
+/** Initialize a buffer processor's representation stored in a
+ PaUtilBufferProcessor structure. Be sure to call
+ PaUtil_TerminateBufferProcessor after finishing with a buffer processor.
+
+ @param bufferProcessor The buffer processor structure to initialize.
+
+ @param inputChannelCount The number of input channels as passed to
+ Pa_OpenStream or 0 for an output-only stream.
+
+ @param userInputSampleFormat Format of user input samples, as passed to
+ Pa_OpenStream. This parameter is ignored for ouput-only streams.
+ 
+ @param hostInputSampleFormat Format of host input samples. This parameter is
+ ignored for output-only streams. See note about host buffer interleave below.
+
+ @param outputChannelCount The number of output channels as passed to
+ Pa_OpenStream or 0 for an input-only stream.
+
+ @param userOutputSampleFormat Format of user output samples, as passed to
+ Pa_OpenStream. This parameter is ignored for input-only streams.
+ 
+ @param hostOutputSampleFormat Format of host output samples. This parameter is
+ ignored for input-only streams. See note about host buffer interleave below.
+
+ @param sampleRate Sample rate of the stream. The more accurate this is the
+ better - it is used for updating time stamps when adapting buffers.
+ 
+ @param streamFlags Stream flags as passed to Pa_OpenStream, this parameter is
+ used for selecting special sample conversion options such as clipping and
+ dithering.
+ 
+ @param framesPerUserBuffer Number of frames per user buffer, as requested
+ by the framesPerBuffer parameter to Pa_OpenStream. This parameter may be
+ zero to indicate that the user will accept any (and varying) buffer sizes.
+
+ @param framesPerHostBuffer Specifies the number of frames per host buffer
+ for the fixed buffer size mode, and the maximum number of frames
+ per host buffer for the bounded host buffer size mode. It is ignored for
+ the other modes.
+
+ @param hostBufferSizeMode A mode flag indicating the size variability of
+ host buffers that will be passed to the buffer processor. See
+ PaUtilHostBufferSizeMode for further details.
+ 
+ @param streamCallback The user stream callback passed to Pa_OpenStream.
+
+ @param userData The user data field passed to Pa_OpenStream.
+    
+ @note The interleave flag is ignored for host buffer formats. Host
+ interleave is determined by the use of different SetInput and SetOutput
+ functions.
+
+ @return An error code indicating whether the initialization was successful.
+ If the error code is not PaNoError, the buffer processor was not initialized
+ and should not be used.
+ 
+ @see Pa_OpenStream, PaUtilHostBufferSizeMode, PaUtil_TerminateBufferProcessor
+*/
+PaError PaUtil_InitializeBufferProcessor( PaUtilBufferProcessor* bufferProcessor,
+            int inputChannelCount, PaSampleFormat userInputSampleFormat,
+            PaSampleFormat hostInputSampleFormat,
+            int outputChannelCount, PaSampleFormat userOutputSampleFormat,
+            PaSampleFormat hostOutputSampleFormat,
+            double sampleRate,
+            PaStreamFlags streamFlags,
+            unsigned long framesPerUserBuffer, /* 0 indicates don't care */
+            unsigned long framesPerHostBuffer,
+            PaUtilHostBufferSizeMode hostBufferSizeMode,
+            PaStreamCallback *streamCallback, void *userData );
+
+
+/** Terminate a buffer processor's representation. Deallocates any temporary
+ buffers allocated by PaUtil_InitializeBufferProcessor.
+ 
+ @param bufferProcessor The buffer processor structure to terminate.
+
+ @see PaUtil_InitializeBufferProcessor.
+*/
+void PaUtil_TerminateBufferProcessor( PaUtilBufferProcessor* bufferProcessor );
+
+
+/** Clear any internally buffered data. If you call
+ PaUtil_InitializeBufferProcessor in your OpenStream routine, make sure you
+ call PaUtil_ResetBufferProcessor in your StartStream call.
+
+ @param bufferProcessor The buffer processor to reset.
+*/
+void PaUtil_ResetBufferProcessor( PaUtilBufferProcessor* bufferProcessor );
+
+
+/** Retrieve the input latency of a buffer processor.
+
+ @param bufferProcessor The buffer processor examine.
+
+ @return The input latency introduced by the buffer processor, in frames.
+
+ @see PaUtil_GetBufferProcessorOutputLatency
+*/
+unsigned long PaUtil_GetBufferProcessorInputLatency( PaUtilBufferProcessor* bufferProcessor );
+
+/** Retrieve the output latency of a buffer processor.
+
+ @param bufferProcessor The buffer processor examine.
+
+ @return The output latency introduced by the buffer processor, in frames.
+
+ @see PaUtil_GetBufferProcessorInputLatency
+*/
+unsigned long PaUtil_GetBufferProcessorOutputLatency( PaUtilBufferProcessor* bufferProcessor );
+
+/*@}*/
+
+
+/** @name Host buffer pointer configuration
+
+ Functions to set host input and output buffers, used by both callback streams
+ and blocking read/write streams.
+*/
+/*@{*/ 
+
+
+/** Set the number of frames in the input host buffer(s) specified by the
+ PaUtil_Set*InputChannel functions.
+
+ @param bufferProcessor The buffer processor.
+
+ @param frameCount The number of host input frames. A 0 frameCount indicates to
+ use the framesPerHostBuffer value passed to PaUtil_InitializeBufferProcessor.
+
+ @see PaUtil_SetNoInput, PaUtil_SetInputChannel,
+ PaUtil_SetInterleavedInputChannels, PaUtil_SetNonInterleavedInputChannel
+*/
+void PaUtil_SetInputFrameCount( PaUtilBufferProcessor* bufferProcessor,
+        unsigned long frameCount );
+
+        
+/** Indicate that no input is avalable. This function should be used when
+ priming the output of a full-duplex stream opened with the
+ paPrimeOutputBuffersUsingStreamCallback flag. Note that it is not necessary
+ to call this or any othe PaUtil_Set*Input* functions for ouput-only streams.
+
+ @param bufferProcessor The buffer processor.
+*/
+void PaUtil_SetNoInput( PaUtilBufferProcessor* bufferProcessor );
+
+
+/** Provide the buffer processor with a pointer to a host input channel.
+
+ @param bufferProcessor The buffer processor.
+ @param channel The channel number.
+ @param data The buffer.
+ @param stride The stride from one sample to the next, in samples. For
+ interleaved host buffers, the stride will usually be the same as the number of
+ channels in the buffer.
+*/
+void PaUtil_SetInputChannel( PaUtilBufferProcessor* bufferProcessor,
+        unsigned int channel, void *data, unsigned int stride );
+
+
+/** Provide the buffer processor with a pointer to an number of interleaved
+ host input channels.
+
+ @param bufferProcessor The buffer processor.
+ @param firstChannel The first channel number.
+ @param data The buffer.
+ @param channelCount The number of interleaved channels in the buffer. If
+ channelCount is zero, the number of channels specified to
+ PaUtil_InitializeBufferProcessor will be used.
+*/
+void PaUtil_SetInterleavedInputChannels( PaUtilBufferProcessor* bufferProcessor,
+        unsigned int firstChannel, void *data, unsigned int channelCount );
+
+
+/** Provide the buffer processor with a pointer to one non-interleaved host
+ output channel.
+
+ @param bufferProcessor The buffer processor.
+ @param channel The channel number.
+ @param data The buffer.
+*/
+void PaUtil_SetNonInterleavedInputChannel( PaUtilBufferProcessor* bufferProcessor,
+        unsigned int channel, void *data );
+
+
+/** Use for the second buffer half when the input buffer is split in two halves.
+ @see PaUtil_SetInputFrameCount
+*/
+void PaUtil_Set2ndInputFrameCount( PaUtilBufferProcessor* bufferProcessor,
+        unsigned long frameCount );
+
+/** Use for the second buffer half when the input buffer is split in two halves.
+ @see PaUtil_SetInputChannel
+*/
+void PaUtil_Set2ndInputChannel( PaUtilBufferProcessor* bufferProcessor,
+        unsigned int channel, void *data, unsigned int stride );
+
+/** Use for the second buffer half when the input buffer is split in two halves.
+ @see PaUtil_SetInterleavedInputChannels
+*/
+void PaUtil_Set2ndInterleavedInputChannels( PaUtilBufferProcessor* bufferProcessor,
+        unsigned int firstChannel, void *data, unsigned int channelCount );
+
+/** Use for the second buffer half when the input buffer is split in two halves.
+ @see PaUtil_SetNonInterleavedInputChannel
+*/
+void PaUtil_Set2ndNonInterleavedInputChannel( PaUtilBufferProcessor* bufferProcessor,
+        unsigned int channel, void *data );
+
+        
+/** Set the number of frames in the output host buffer(s) specified by the
+ PaUtil_Set*OutputChannel functions.
+
+ @param bufferProcessor The buffer processor.
+
+ @param frameCount The number of host output frames. A 0 frameCount indicates to
+ use the framesPerHostBuffer value passed to PaUtil_InitializeBufferProcessor.
+
+ @see PaUtil_SetOutputChannel, PaUtil_SetInterleavedOutputChannels,
+ PaUtil_SetNonInterleavedOutputChannel
+*/
+void PaUtil_SetOutputFrameCount( PaUtilBufferProcessor* bufferProcessor,
+        unsigned long frameCount );
+
+
+/** Indicate that the output will be discarded. This function should be used
+ when implementing the paNeverDropInput mode for full duplex streams.
+
+ @param bufferProcessor The buffer processor.
+*/
+void PaUtil_SetNoOutput( PaUtilBufferProcessor* bufferProcessor );
+
+
+/** Provide the buffer processor with a pointer to a host output channel.
+
+ @param bufferProcessor The buffer processor.
+ @param channel The channel number.
+ @param data The buffer.
+ @param stride The stride from one sample to the next, in samples. For
+ interleaved host buffers, the stride will usually be the same as the number of
+ channels in the buffer.
+*/
+void PaUtil_SetOutputChannel( PaUtilBufferProcessor* bufferProcessor,
+        unsigned int channel, void *data, unsigned int stride );
+
+
+/** Provide the buffer processor with a pointer to a number of interleaved
+ host output channels.
+
+ @param bufferProcessor The buffer processor.
+ @param firstChannel The first channel number.
+ @param data The buffer.
+ @param channelCount The number of interleaved channels in the buffer. If
+ channelCount is zero, the number of channels specified to
+ PaUtil_InitializeBufferProcessor will be used.
+*/
+void PaUtil_SetInterleavedOutputChannels( PaUtilBufferProcessor* bufferProcessor,
+        unsigned int firstChannel, void *data, unsigned int channelCount );
+
+        
+/** Provide the buffer processor with a pointer to one non-interleaved host
+ output channel.
+
+ @param bufferProcessor The buffer processor.
+ @param channel The channel number.
+ @param data The buffer.
+*/
+void PaUtil_SetNonInterleavedOutputChannel( PaUtilBufferProcessor* bufferProcessor,
+        unsigned int channel, void *data );
+
+
+/** Use for the second buffer half when the output buffer is split in two halves.
+ @see PaUtil_SetOutputFrameCount
+*/
+void PaUtil_Set2ndOutputFrameCount( PaUtilBufferProcessor* bufferProcessor,
+        unsigned long frameCount );
+
+/** Use for the second buffer half when the output buffer is split in two halves.
+ @see PaUtil_SetOutputChannel
+*/
+void PaUtil_Set2ndOutputChannel( PaUtilBufferProcessor* bufferProcessor,
+        unsigned int channel, void *data, unsigned int stride );
+
+/** Use for the second buffer half when the output buffer is split in two halves.
+ @see PaUtil_SetInterleavedOutputChannels
+*/
+void PaUtil_Set2ndInterleavedOutputChannels( PaUtilBufferProcessor* bufferProcessor,
+        unsigned int firstChannel, void *data, unsigned int channelCount );
+
+/** Use for the second buffer half when the output buffer is split in two halves.
+ @see PaUtil_SetNonInterleavedOutputChannel
+*/
+void PaUtil_Set2ndNonInterleavedOutputChannel( PaUtilBufferProcessor* bufferProcessor,
+        unsigned int channel, void *data );
+
+/*@}*/
+
+
+/** @name Buffer processing functions for callback streams
+*/
+/*@{*/
+
+/** Commence processing a host buffer (or a pair of host buffers in the
+ full-duplex case) for a callback stream.
+
+ @param bufferProcessor The buffer processor.
+
+ @param timeInfo Timing information for the first sample of the host
+ buffer(s). This information may be adjusted when buffer adaption is being
+ performed.
+
+ @param callbackStatusFlags Flags indicating whether underruns and overruns
+ have occurred since the last time the buffer processor was called.
+*/
+void PaUtil_BeginBufferProcessing( PaUtilBufferProcessor* bufferProcessor,
+        PaStreamCallbackTimeInfo* timeInfo, PaStreamCallbackFlags callbackStatusFlags );
+
+        
+/** Finish processing a host buffer (or a pair of host buffers in the
+ full-duplex case) for a callback stream.
+
+ @param bufferProcessor The buffer processor.
+ 
+ @param callbackResult On input, indicates a previous callback result, and on
+ exit, the result of the user stream callback, if it is called.
+ On entry callbackResult should contain one of { paContinue, paComplete, or
+ paAbort}. If paComplete is passed, the stream callback will not be called
+ but any audio that was generated by previous stream callbacks will be copied
+ to the output buffer(s). You can check whether the buffer processor's internal
+ buffer is empty by calling PaUtil_IsBufferProcessorOutputEmpty.
+
+ If the stream callback is called its result is stored in *callbackResult. If
+ the stream callback returns paComplete or paAbort, all output buffers will be
+ full of valid data - some of which may be zeros to acount for data that
+ wasn't generated by the terminating callback.
+
+ @return The number of frames processed. This usually corresponds to the
+ number of frames specified by the PaUtil_Set*FrameCount functions, exept in
+ the paUtilVariableHostBufferSizePartialUsageAllowed buffer size mode when a
+ smaller value may be returned.
+*/
+unsigned long PaUtil_EndBufferProcessing( PaUtilBufferProcessor* bufferProcessor,
+        int *callbackResult );
+
+
+/** Determine whether any callback generated output remains in the bufffer
+ processor's internal buffers. This method may be used to determine when to
+ continue calling PaUtil_EndBufferProcessing() after the callback has returned
+ a callbackResult of paComplete.
+
+ @param bufferProcessor The buffer processor.
+ 
+ @return Returns non-zero when callback generated output remains in the internal
+ buffer and zero (0) when there internal buffer contains no callback generated
+ data.
+*/
+int PaUtil_IsBufferProcessorOutputEmpty( PaUtilBufferProcessor* bufferProcessor );
+
+/*@}*/
+
+
+/** @name Buffer processing functions for blocking read/write streams
+*/
+/*@{*/
+
+/** Copy samples from host input channels set up by the PaUtil_Set*InputChannels
+ functions to a user supplied buffer. This function is intended for use with
+ blocking read/write streams. Copies the minimum of the number of
+ user frames (specified by the frameCount parameter) and the number of available
+ host frames (specified in a previous call to SetInputFrameCount()).
+
+ @param bufferProcessor The buffer processor.
+
+ @param buffer A pointer to the user buffer pointer, or a pointer to a pointer
+ to an array of user buffer pointers for a non-interleaved stream. It is
+ important that this parameter points to a copy of the user buffer pointers,
+ not to the actual user buffer pointers, because this function updates the
+ pointers before returning.
+
+ @param frameCount The number of frames of data in the buffer(s) pointed to by
+ the buffer parameter.
+
+ @return The number of frames copied. The buffer pointer(s) pointed to by the
+ buffer parameter are advanced to point to the frame(s) following the last one
+ filled.
+*/
+unsigned long PaUtil_CopyInput( PaUtilBufferProcessor* bufferProcessor,
+        void **buffer, unsigned long frameCount );
+
+
+/* Copy samples from a user supplied buffer to host output channels set up by
+ the PaUtil_Set*OutputChannels functions. This function is intended for use with
+ blocking read/write streams. Copies the minimum of the number of
+ user frames (specified by the frameCount parameter) and the number of
+ host frames (specified in a previous call to SetOutputFrameCount()).
+
+ @param bufferProcessor The buffer processor.
+
+ @param buffer A pointer to the user buffer pointer, or a pointer to a pointer
+ to an array of user buffer pointers for a non-interleaved stream. It is
+ important that this parameter points to a copy of the user buffer pointers,
+ not to the actual user buffer pointers, because this function updates the
+ pointers before returning.
+
+ @param frameCount The number of frames of data in the buffer(s) pointed to by
+ the buffer parameter.
+
+ @return The number of frames copied. The buffer pointer(s) pointed to by the
+ buffer parameter are advanced to point to the frame(s) following the last one
+ copied.
+*/
+unsigned long PaUtil_CopyOutput( PaUtilBufferProcessor* bufferProcessor,
+        const void ** buffer, unsigned long frameCount );
+
+
+/* Zero samples in host output channels set up by the PaUtil_Set*OutputChannels
+ functions. This function is useful for flushing streams.
+ Zeros the minimum of frameCount and the number of host frames specified in a
+ previous call to SetOutputFrameCount().
+
+ @param bufferProcessor The buffer processor.
+
+ @param frameCount The maximum number of frames to zero.
+ 
+ @return The number of frames zeroed.
+*/
+unsigned long PaUtil_ZeroOutput( PaUtilBufferProcessor* bufferProcessor,
+        unsigned long frameCount );
+
+
+/*@}*/
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PA_PROCESS_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_skeleton.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_skeleton.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_skeleton.c	(revision 1163)
@@ -0,0 +1,807 @@
+/*
+ * $Id: pa_skeleton.c,v 1.1.2.39 2003/11/26 14:56:09 rossbencina Exp $
+ * Portable Audio I/O Library skeleton implementation
+ * demonstrates how to use the common functions to implement support
+ * for a host API
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Skeleton implementation of support for a host API.
+
+ @note This file is provided as a starting point for implementing support for
+ a new host API. IMPLEMENT ME comments are used to indicate functionality
+ which much be customised for each implementation.
+*/
+
+
+#include <string.h> /* strlen() */
+
+#include "pa_util.h"
+#include "pa_allocation.h"
+#include "pa_hostapi.h"
+#include "pa_stream.h"
+#include "pa_cpuload.h"
+#include "pa_process.h"
+
+
+/* prototypes for functions declared in this file */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+PaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi );
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate );
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** s,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *streamCallback,
+                           void *userData );
+static PaError CloseStream( PaStream* stream );
+static PaError StartStream( PaStream *stream );
+static PaError StopStream( PaStream *stream );
+static PaError AbortStream( PaStream *stream );
+static PaError IsStreamStopped( PaStream *s );
+static PaError IsStreamActive( PaStream *stream );
+static PaTime GetStreamTime( PaStream *stream );
+static double GetStreamCpuLoad( PaStream* stream );
+static PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );
+static PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );
+static signed long GetStreamReadAvailable( PaStream* stream );
+static signed long GetStreamWriteAvailable( PaStream* stream );
+
+
+/* IMPLEMENT ME: a macro like the following one should be used for reporting
+ host errors */
+#define PA_SKELETON_SET_LAST_HOST_ERROR( errorCode, errorText ) \
+    PaUtil_SetLastHostErrorInfo( paInDevelopment, errorCode, errorText )
+
+/* PaSkeletonHostApiRepresentation - host api datastructure specific to this implementation */
+
+typedef struct
+{
+    PaUtilHostApiRepresentation inheritedHostApiRep;
+    PaUtilStreamInterface callbackStreamInterface;
+    PaUtilStreamInterface blockingStreamInterface;
+
+    PaUtilAllocationGroup *allocations;
+
+    /* implementation specific data goes here */
+}
+PaSkeletonHostApiRepresentation;  /* IMPLEMENT ME: rename this */
+
+
+PaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+{
+    PaError result = paNoError;
+    int i, deviceCount;
+    PaSkeletonHostApiRepresentation *skeletonHostApi;
+    PaDeviceInfo *deviceInfoArray;
+
+    skeletonHostApi = (PaSkeletonHostApiRepresentation*)PaUtil_AllocateMemory( sizeof(PaSkeletonHostApiRepresentation) );
+    if( !skeletonHostApi )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    skeletonHostApi->allocations = PaUtil_CreateAllocationGroup();
+    if( !skeletonHostApi->allocations )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    *hostApi = &skeletonHostApi->inheritedHostApiRep;
+    (*hostApi)->info.structVersion = 1;
+    (*hostApi)->info.type = paInDevelopment;            /* IMPLEMENT ME: change to correct type id */
+    (*hostApi)->info.name = "skeleton implementation";  /* IMPLEMENT ME: change to correct name */
+
+    (*hostApi)->info.defaultInputDevice = paNoDevice;  /* IMPLEMENT ME */
+    (*hostApi)->info.defaultOutputDevice = paNoDevice; /* IMPLEMENT ME */
+
+    (*hostApi)->info.deviceCount = 0;  
+
+    deviceCount = 0; /* IMPLEMENT ME */
+    
+    if( deviceCount > 0 )
+    {
+        (*hostApi)->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(
+                skeletonHostApi->allocations, sizeof(PaDeviceInfo*) * deviceCount );
+        if( !(*hostApi)->deviceInfos )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        /* allocate all device info structs in a contiguous block */
+        deviceInfoArray = (PaDeviceInfo*)PaUtil_GroupAllocateMemory(
+                skeletonHostApi->allocations, sizeof(PaDeviceInfo) * deviceCount );
+        if( !deviceInfoArray )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        for( i=0; i < deviceCount; ++i )
+        {
+            PaDeviceInfo *deviceInfo = &deviceInfoArray[i];
+            deviceInfo->structVersion = 2;
+            deviceInfo->hostApi = hostApiIndex;
+            deviceInfo->name = 0; /* IMPLEMENT ME: allocate block and copy name eg:
+                deviceName = (char*)PaUtil_GroupAllocateMemory( skeletonHostApi->allocations, strlen(srcName) + 1 );
+                if( !deviceName )
+                {
+                    result = paInsufficientMemory;
+                    goto error;
+                }
+                strcpy( deviceName, srcName );
+                deviceInfo->name = deviceName;
+            */
+
+            deviceInfo->maxInputChannels = 0;  /* IMPLEMENT ME */
+            deviceInfo->maxOutputChannels = 0;  /* IMPLEMENT ME */
+            
+            deviceInfo->defaultLowInputLatency = 0.;  /* IMPLEMENT ME */
+            deviceInfo->defaultLowOutputLatency = 0.;  /* IMPLEMENT ME */
+            deviceInfo->defaultHighInputLatency = 0.;  /* IMPLEMENT ME */
+            deviceInfo->defaultHighOutputLatency = 0.;  /* IMPLEMENT ME */  
+
+            deviceInfo->defaultSampleRate = 0.; /* IMPLEMENT ME */
+            
+            (*hostApi)->deviceInfos[i] = deviceInfo;
+            ++(*hostApi)->info.deviceCount;
+        }
+    }
+
+    (*hostApi)->Terminate = Terminate;
+    (*hostApi)->OpenStream = OpenStream;
+    (*hostApi)->IsFormatSupported = IsFormatSupported;
+
+    PaUtil_InitializeStreamInterface( &skeletonHostApi->callbackStreamInterface, CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, GetStreamCpuLoad,
+                                      PaUtil_DummyRead, PaUtil_DummyWrite,
+                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );
+
+    PaUtil_InitializeStreamInterface( &skeletonHostApi->blockingStreamInterface, CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, PaUtil_DummyGetCpuLoad,
+                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );
+
+    return result;
+
+error:
+    if( skeletonHostApi )
+    {
+        if( skeletonHostApi->allocations )
+        {
+            PaUtil_FreeAllAllocations( skeletonHostApi->allocations );
+            PaUtil_DestroyAllocationGroup( skeletonHostApi->allocations );
+        }
+                
+        PaUtil_FreeMemory( skeletonHostApi );
+    }
+    return result;
+}
+
+
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi )
+{
+    PaSkeletonHostApiRepresentation *skeletonHostApi = (PaSkeletonHostApiRepresentation*)hostApi;
+
+    /*
+        IMPLEMENT ME:
+            - clean up any resources not handled by the allocation group
+    */
+
+    if( skeletonHostApi->allocations )
+    {
+        PaUtil_FreeAllAllocations( skeletonHostApi->allocations );
+        PaUtil_DestroyAllocationGroup( skeletonHostApi->allocations );
+    }
+
+    PaUtil_FreeMemory( skeletonHostApi );
+}
+
+
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate )
+{
+    int inputChannelCount, outputChannelCount;
+    PaSampleFormat inputSampleFormat, outputSampleFormat;
+    
+    if( inputParameters )
+    {
+        inputChannelCount = inputParameters->channelCount;
+        inputSampleFormat = inputParameters->sampleFormat;
+
+        /* all standard sample formats are supported by the buffer adapter,
+            this implementation doesn't support any custom sample formats */
+        if( inputSampleFormat & paCustomFormat )
+            return paSampleFormatNotSupported;
+            
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+
+        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )
+            return paInvalidDevice;
+
+        /* check that input device can support inputChannelCount */
+        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )
+            return paInvalidChannelCount;
+
+        /* validate inputStreamInfo */
+        if( inputParameters->hostApiSpecificStreamInfo )
+            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
+    }
+    else
+    {
+        inputChannelCount = 0;
+    }
+
+    if( outputParameters )
+    {
+        outputChannelCount = outputParameters->channelCount;
+        outputSampleFormat = outputParameters->sampleFormat;
+
+        /* all standard sample formats are supported by the buffer adapter,
+            this implementation doesn't support any custom sample formats */
+        if( outputSampleFormat & paCustomFormat )
+            return paSampleFormatNotSupported;
+            
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+
+        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )
+            return paInvalidDevice;
+
+        /* check that output device can support outputChannelCount */
+        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )
+            return paInvalidChannelCount;
+
+        /* validate outputStreamInfo */
+        if( outputParameters->hostApiSpecificStreamInfo )
+            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
+    }
+    else
+    {
+        outputChannelCount = 0;
+    }
+    
+    /*
+        IMPLEMENT ME:
+
+            - if a full duplex stream is requested, check that the combination
+                of input and output parameters is supported if necessary
+
+            - check that the device supports sampleRate
+
+        Because the buffer adapter handles conversion between all standard
+        sample formats, the following checks are only required if paCustomFormat
+        is implemented, or under some other unusual conditions.
+
+            - check that input device can support inputSampleFormat, or that
+                we have the capability to convert from inputSampleFormat to
+                a native format
+
+            - check that output device can support outputSampleFormat, or that
+                we have the capability to convert from outputSampleFormat to
+                a native format
+    */
+
+
+    /* suppress unused variable warnings */
+    (void) sampleRate;
+
+    return paFormatIsSupported;
+}
+
+/* PaSkeletonStream - a stream data structure specifically for this implementation */
+
+typedef struct PaSkeletonStream
+{ /* IMPLEMENT ME: rename this */
+    PaUtilStreamRepresentation streamRepresentation;
+    PaUtilCpuLoadMeasurer cpuLoadMeasurer;
+    PaUtilBufferProcessor bufferProcessor;
+
+    /* IMPLEMENT ME:
+            - implementation specific data goes here
+    */
+    unsigned long framesPerHostCallback; /* just an example */
+}
+PaSkeletonStream;
+
+/* see pa_hostapi.h for a list of validity guarantees made about OpenStream parameters */
+
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** s,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *streamCallback,
+                           void *userData )
+{
+    PaError result = paNoError;
+    PaSkeletonHostApiRepresentation *skeletonHostApi = (PaSkeletonHostApiRepresentation*)hostApi;
+    PaSkeletonStream *stream = 0;
+    unsigned long framesPerHostBuffer = framesPerBuffer; /* these may not be equivalent for all implementations */
+    int inputChannelCount, outputChannelCount;
+    PaSampleFormat inputSampleFormat, outputSampleFormat;
+    PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;
+
+
+    if( inputParameters )
+    {
+        inputChannelCount = inputParameters->channelCount;
+        inputSampleFormat = inputParameters->sampleFormat;
+
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+
+        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )
+            return paInvalidDevice;
+
+        /* check that input device can support inputChannelCount */
+        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )
+            return paInvalidChannelCount;
+
+        /* validate inputStreamInfo */
+        if( inputParameters->hostApiSpecificStreamInfo )
+            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
+
+        /* IMPLEMENT ME - establish which  host formats are available */
+        hostInputSampleFormat =
+            PaUtil_SelectClosestAvailableFormat( paInt16 /* native formats */, inputSampleFormat );
+    }
+    else
+    {
+        inputChannelCount = 0;
+        inputSampleFormat = hostInputSampleFormat = paInt16; /* Surpress 'uninitialised var' warnings. */
+    }
+
+    if( outputParameters )
+    {
+        outputChannelCount = outputParameters->channelCount;
+        outputSampleFormat = outputParameters->sampleFormat;
+        
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+
+        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )
+            return paInvalidDevice;
+
+        /* check that output device can support inputChannelCount */
+        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )
+            return paInvalidChannelCount;
+
+        /* validate outputStreamInfo */
+        if( outputParameters->hostApiSpecificStreamInfo )
+            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
+
+        /* IMPLEMENT ME - establish which  host formats are available */
+        hostOutputSampleFormat =
+            PaUtil_SelectClosestAvailableFormat( paInt16 /* native formats */, outputSampleFormat );
+    }
+    else
+    {
+        outputChannelCount = 0;
+        outputSampleFormat = hostOutputSampleFormat = paInt16; /* Surpress 'uninitialized var' warnings. */
+    }
+
+    /*
+        IMPLEMENT ME:
+
+        ( the following two checks are taken care of by PaUtil_InitializeBufferProcessor() FIXME - checks needed? )
+
+            - check that input device can support inputSampleFormat, or that
+                we have the capability to convert from outputSampleFormat to
+                a native format
+
+            - check that output device can support outputSampleFormat, or that
+                we have the capability to convert from outputSampleFormat to
+                a native format
+
+            - if a full duplex stream is requested, check that the combination
+                of input and output parameters is supported
+
+            - check that the device supports sampleRate
+
+            - alter sampleRate to a close allowable rate if possible / necessary
+
+            - validate suggestedInputLatency and suggestedOutputLatency parameters,
+                use default values where necessary
+    */
+
+
+
+
+    /* validate platform specific flags */
+    if( (streamFlags & paPlatformSpecificFlags) != 0 )
+        return paInvalidFlag; /* unexpected platform specific flag */
+
+
+    stream = (PaSkeletonStream*)PaUtil_AllocateMemory( sizeof(PaSkeletonStream) );
+    if( !stream )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    if( streamCallback )
+    {
+        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
+                                               &skeletonHostApi->callbackStreamInterface, streamCallback, userData );
+    }
+    else
+    {
+        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
+                                               &skeletonHostApi->blockingStreamInterface, streamCallback, userData );
+    }
+
+    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );
+
+
+    /* we assume a fixed host buffer size in this example, but the buffer processor
+        can also support bounded and unknown host buffer sizes by passing 
+        paUtilBoundedHostBufferSize or paUtilUnknownHostBufferSize instead of
+        paUtilFixedHostBufferSize below. */
+        
+    result =  PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,
+              inputChannelCount, inputSampleFormat, hostInputSampleFormat,
+              outputChannelCount, outputSampleFormat, hostOutputSampleFormat,
+              sampleRate, streamFlags, framesPerBuffer,
+              framesPerHostBuffer, paUtilFixedHostBufferSize,
+              streamCallback, userData );
+    if( result != paNoError )
+        goto error;
+
+
+    /*
+        IMPLEMENT ME: initialise the following fields with estimated or actual
+        values.
+    */
+    stream->streamRepresentation.streamInfo.inputLatency =
+            PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor);
+    stream->streamRepresentation.streamInfo.outputLatency =
+            PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor);
+    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
+
+    
+    /*
+        IMPLEMENT ME:
+            - additional stream setup + opening
+    */
+
+    stream->framesPerHostCallback = framesPerHostBuffer;
+
+    *s = (PaStream*)stream;
+
+    return result;
+
+error:
+    if( stream )
+        PaUtil_FreeMemory( stream );
+
+    return result;
+}
+
+/*
+    ExampleHostProcessingLoop() illustrates the kind of processing which may
+    occur in a host implementation.
+ 
+*/
+static void ExampleHostProcessingLoop( void *inputBuffer, void *outputBuffer, void *userData )
+{
+    PaSkeletonStream *stream = (PaSkeletonStream*)userData;
+    PaStreamCallbackTimeInfo timeInfo = {0,0,0}; /* IMPLEMENT ME */
+    int callbackResult;
+    unsigned long framesProcessed;
+    
+    PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
+    
+    /*
+        IMPLEMENT ME:
+            - generate timing information
+            - handle buffer slips
+    */
+
+    /*
+        If you need to byte swap or shift inputBuffer to convert it into a
+        portaudio format, do it here.
+    */
+
+
+
+    PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, 0 /* IMPLEMENT ME: pass underflow/overflow flags when necessary */ );
+
+    /*
+        depending on whether the host buffers are interleaved, non-interleaved
+        or a mixture, you will want to call PaUtil_SetInterleaved*Channels(),
+        PaUtil_SetNonInterleaved*Channel() or PaUtil_Set*Channel() here.
+    */
+    
+    PaUtil_SetInputFrameCount( &stream->bufferProcessor, 0 /* default to host buffer size */ );
+    PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor,
+            0, /* first channel of inputBuffer is channel 0 */
+            inputBuffer,
+            0 ); /* 0 - use inputChannelCount passed to init buffer processor */
+
+    PaUtil_SetOutputFrameCount( &stream->bufferProcessor, 0 /* default to host buffer size */ );
+    PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor,
+            0, /* first channel of outputBuffer is channel 0 */
+            outputBuffer,
+            0 ); /* 0 - use outputChannelCount passed to init buffer processor */
+
+    /* you must pass a valid value of callback result to PaUtil_EndBufferProcessing()
+        in general you would pass paContinue for normal operation, and
+        paComplete to drain the buffer processor's internal output buffer.
+        You can check whether the buffer processor's output buffer is empty
+        using PaUtil_IsBufferProcessorOuputEmpty( bufferProcessor )
+    */
+    callbackResult = paContinue;
+    framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );
+
+    
+    /*
+        If you need to byte swap or shift outputBuffer to convert it to
+        host format, do it here.
+    */
+
+    PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );
+
+
+    if( callbackResult == paContinue )
+    {
+        /* nothing special to do */
+    }
+    else if( callbackResult == paAbort )
+    {
+        /* IMPLEMENT ME - finish playback immediately  */
+
+        /* once finished, call the finished callback */
+        if( stream->streamRepresentation.streamFinishedCallback != 0 )
+            stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );
+    }
+    else
+    {
+        /* User callback has asked us to stop with paComplete or other non-zero value */
+
+        /* IMPLEMENT ME - finish playback once currently queued audio has completed  */
+
+        /* once finished, call the finished callback */
+        if( stream->streamRepresentation.streamFinishedCallback != 0 )
+            stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );
+    }
+}
+
+
+/*
+    When CloseStream() is called, the multi-api layer ensures that
+    the stream has already been stopped or aborted.
+*/
+static PaError CloseStream( PaStream* s )
+{
+    PaError result = paNoError;
+    PaSkeletonStream *stream = (PaSkeletonStream*)s;
+
+    /*
+        IMPLEMENT ME:
+            - additional stream closing + cleanup
+    */
+
+    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
+    PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );
+    PaUtil_FreeMemory( stream );
+
+    return result;
+}
+
+
+static PaError StartStream( PaStream *s )
+{
+    PaError result = paNoError;
+    PaSkeletonStream *stream = (PaSkeletonStream*)s;
+
+    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );
+
+    /* IMPLEMENT ME, see portaudio.h for required behavior */
+
+    /* suppress unused function warning. the code in ExampleHostProcessingLoop or
+       something similar should be implemented to feed samples to and from the
+       host after StartStream() is called.
+    */
+    (void) ExampleHostProcessingLoop;
+
+    return result;
+}
+
+
+static PaError StopStream( PaStream *s )
+{
+    PaError result = paNoError;
+    PaSkeletonStream *stream = (PaSkeletonStream*)s;
+
+    /* suppress unused variable warnings */
+    (void) stream;
+
+    /* IMPLEMENT ME, see portaudio.h for required behavior */
+
+    return result;
+}
+
+
+static PaError AbortStream( PaStream *s )
+{
+    PaError result = paNoError;
+    PaSkeletonStream *stream = (PaSkeletonStream*)s;
+
+    /* suppress unused variable warnings */
+    (void) stream;
+    
+    /* IMPLEMENT ME, see portaudio.h for required behavior */
+
+    return result;
+}
+
+
+static PaError IsStreamStopped( PaStream *s )
+{
+    PaSkeletonStream *stream = (PaSkeletonStream*)s;
+
+    /* suppress unused variable warnings */
+    (void) stream;
+    
+    /* IMPLEMENT ME, see portaudio.h for required behavior */
+
+    return 0;
+}
+
+
+static PaError IsStreamActive( PaStream *s )
+{
+    PaSkeletonStream *stream = (PaSkeletonStream*)s;
+
+    /* suppress unused variable warnings */
+    (void) stream;
+    
+    /* IMPLEMENT ME, see portaudio.h for required behavior */
+
+    return 0;
+}
+
+
+static PaTime GetStreamTime( PaStream *s )
+{
+    PaSkeletonStream *stream = (PaSkeletonStream*)s;
+
+    /* suppress unused variable warnings */
+    (void) stream;
+    
+    /* IMPLEMENT ME, see portaudio.h for required behavior*/
+
+    return 0;
+}
+
+
+static double GetStreamCpuLoad( PaStream* s )
+{
+    PaSkeletonStream *stream = (PaSkeletonStream*)s;
+
+    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );
+}
+
+
+/*
+    As separate stream interfaces are used for blocking and callback
+    streams, the following functions can be guaranteed to only be called
+    for blocking streams.
+*/
+
+static PaError ReadStream( PaStream* s,
+                           void *buffer,
+                           unsigned long frames )
+{
+    PaSkeletonStream *stream = (PaSkeletonStream*)s;
+
+    /* suppress unused variable warnings */
+    (void) buffer;
+    (void) frames;
+    (void) stream;
+    
+    /* IMPLEMENT ME, see portaudio.h for required behavior*/
+
+    return paNoError;
+}
+
+
+static PaError WriteStream( PaStream* s,
+                            const void *buffer,
+                            unsigned long frames )
+{
+    PaSkeletonStream *stream = (PaSkeletonStream*)s;
+
+    /* suppress unused variable warnings */
+    (void) buffer;
+    (void) frames;
+    (void) stream;
+    
+    /* IMPLEMENT ME, see portaudio.h for required behavior*/
+
+    return paNoError;
+}
+
+
+static signed long GetStreamReadAvailable( PaStream* s )
+{
+    PaSkeletonStream *stream = (PaSkeletonStream*)s;
+
+    /* suppress unused variable warnings */
+    (void) stream;
+    
+    /* IMPLEMENT ME, see portaudio.h for required behavior*/
+
+    return 0;
+}
+
+
+static signed long GetStreamWriteAvailable( PaStream* s )
+{
+    PaSkeletonStream *stream = (PaSkeletonStream*)s;
+
+    /* suppress unused variable warnings */
+    (void) stream;
+    
+    /* IMPLEMENT ME, see portaudio.h for required behavior*/
+
+    return 0;
+}
+
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_stream.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_stream.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_stream.c	(revision 1163)
@@ -0,0 +1,141 @@
+/*
+ * $Id: pa_stream.c,v 1.1.2.12 2003/09/20 21:31:00 rossbencina Exp $
+ * Portable Audio I/O Library
+ * 
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 2002 Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Interface used by pa_front to virtualize functions which operate on
+ streams.
+*/
+
+
+#include "pa_stream.h"
+
+
+void PaUtil_InitializeStreamInterface( PaUtilStreamInterface *streamInterface,
+                                       PaError (*Close)( PaStream* ),
+                                       PaError (*Start)( PaStream* ),
+                                       PaError (*Stop)( PaStream* ),
+                                       PaError (*Abort)( PaStream* ),
+                                       PaError (*IsStopped)( PaStream* ),
+                                       PaError (*IsActive)( PaStream* ),
+                                       PaTime (*GetTime)( PaStream* ),
+                                       double (*GetCpuLoad)( PaStream* ),
+                                       PaError (*Read)( PaStream*, void *, unsigned long ),
+                                       PaError (*Write)( PaStream*, const void *, unsigned long ),
+                                       signed long (*GetReadAvailable)( PaStream* ),
+                                       signed long (*GetWriteAvailable)( PaStream* )  )
+{
+    streamInterface->Close = Close;
+    streamInterface->Start = Start;
+    streamInterface->Stop = Stop;
+    streamInterface->Abort = Abort;
+    streamInterface->IsStopped = IsStopped;
+    streamInterface->IsActive = IsActive;
+    streamInterface->GetTime = GetTime;
+    streamInterface->GetCpuLoad = GetCpuLoad;
+    streamInterface->Read = Read;
+    streamInterface->Write = Write;
+    streamInterface->GetReadAvailable = GetReadAvailable;
+    streamInterface->GetWriteAvailable = GetWriteAvailable;
+}
+
+
+void PaUtil_InitializeStreamRepresentation( PaUtilStreamRepresentation *streamRepresentation,
+        PaUtilStreamInterface *streamInterface,
+        PaStreamCallback *streamCallback,
+        void *userData )
+{
+    streamRepresentation->magic = PA_STREAM_MAGIC;
+    streamRepresentation->nextOpenStream = 0;
+    streamRepresentation->streamInterface = streamInterface;
+    streamRepresentation->streamCallback = streamCallback;
+    streamRepresentation->streamFinishedCallback = 0;
+
+    streamRepresentation->userData = userData;
+
+    streamRepresentation->streamInfo.inputLatency = 0.;
+    streamRepresentation->streamInfo.outputLatency = 0.;
+    streamRepresentation->streamInfo.sampleRate = 0.;
+}
+
+
+void PaUtil_TerminateStreamRepresentation( PaUtilStreamRepresentation *streamRepresentation )
+{
+    streamRepresentation->magic = 0;
+}
+
+
+PaError PaUtil_DummyRead( PaStream* stream,
+                               void *buffer,
+                               unsigned long frames )
+{
+    (void)stream; /* unused parameter */
+    (void)buffer; /* unused parameter */
+    (void)frames; /* unused parameter */
+
+    return paCanNotReadFromACallbackStream;
+}
+
+
+PaError PaUtil_DummyWrite( PaStream* stream,
+                               const void *buffer,
+                               unsigned long frames )
+{
+    (void)stream; /* unused parameter */
+    (void)buffer; /* unused parameter */
+    (void)frames; /* unused parameter */
+
+    return paCanNotWriteToACallbackStream;
+}
+
+
+signed long PaUtil_DummyGetReadAvailable( PaStream* stream )
+{
+    (void)stream; /* unused parameter */
+
+    return paCanNotReadFromACallbackStream;
+}
+
+
+signed long PaUtil_DummyGetWriteAvailable( PaStream* stream )
+{
+    (void)stream; /* unused parameter */
+
+    return paCanNotWriteToACallbackStream;
+}
+
+
+double PaUtil_DummyGetCpuLoad( PaStream* stream )
+{
+    (void)stream; /* unused parameter */
+
+    return 0.0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_stream.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_stream.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_stream.h	(revision 1163)
@@ -0,0 +1,196 @@
+#ifndef PA_STREAM_H
+#define PA_STREAM_H
+/*
+ * $Id: pa_stream.h,v 1.1.2.13 2003/11/01 06:37:28 rossbencina Exp $
+ * Portable Audio I/O Library
+ * stream interface
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Interface used by pa_front to virtualize functions which operate on
+ streams.
+*/
+
+
+#include "portaudio.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+#define PA_STREAM_MAGIC (0x18273645)
+
+
+/** A structure representing an (abstract) interface to a host API. Contains
+ pointers to functions which implement the interface.
+
+ All PaStreamInterface functions are guaranteed to be called with a non-null,
+ valid stream parameter.
+*/
+typedef struct {
+    PaError (*Close)( PaStream* stream );
+    PaError (*Start)( PaStream *stream );
+    PaError (*Stop)( PaStream *stream );
+    PaError (*Abort)( PaStream *stream );
+    PaError (*IsStopped)( PaStream *stream );
+    PaError (*IsActive)( PaStream *stream );
+    PaTime (*GetTime)( PaStream *stream );
+    double (*GetCpuLoad)( PaStream* stream );
+    PaError (*Read)( PaStream* stream, void *buffer, unsigned long frames );
+    PaError (*Write)( PaStream* stream, const void *buffer, unsigned long frames );
+    signed long (*GetReadAvailable)( PaStream* stream );
+    signed long (*GetWriteAvailable)( PaStream* stream );
+} PaUtilStreamInterface;
+
+
+/** Initialize the fields of a PaUtilStreamInterface structure.
+*/
+void PaUtil_InitializeStreamInterface( PaUtilStreamInterface *streamInterface,
+    PaError (*Close)( PaStream* ),
+    PaError (*Start)( PaStream* ),
+    PaError (*Stop)( PaStream* ),
+    PaError (*Abort)( PaStream* ),
+    PaError (*IsStopped)( PaStream* ),
+    PaError (*IsActive)( PaStream* ),
+    PaTime (*GetTime)( PaStream* ),
+    double (*GetCpuLoad)( PaStream* ),
+    PaError (*Read)( PaStream* stream, void *buffer, unsigned long frames ),
+    PaError (*Write)( PaStream* stream, const void *buffer, unsigned long frames ),
+    signed long (*GetReadAvailable)( PaStream* stream ),
+    signed long (*GetWriteAvailable)( PaStream* stream ) );
+
+
+/** Dummy Read function for use in interfaces to a callback based streams.
+ Pass to the Read parameter of PaUtil_InitializeStreamInterface.
+ @return An error code indicating that the function has no effect
+ because the stream is a callback stream.
+*/
+PaError PaUtil_DummyRead( PaStream* stream,
+                       void *buffer,
+                       unsigned long frames );
+
+
+/** Dummy Write function for use in an interfaces to callback based streams.
+ Pass to the Write parameter of PaUtil_InitializeStreamInterface.
+ @return An error code indicating that the function has no effect
+ because the stream is a callback stream.
+*/
+PaError PaUtil_DummyWrite( PaStream* stream,
+                       const void *buffer,
+                       unsigned long frames );
+
+
+/** Dummy GetReadAvailable function for use in interfaces to callback based
+ streams. Pass to the GetReadAvailable parameter of PaUtil_InitializeStreamInterface.
+ @return An error code indicating that the function has no effect
+ because the stream is a callback stream.
+*/
+signed long PaUtil_DummyGetReadAvailable( PaStream* stream );
+
+
+/** Dummy GetWriteAvailable function for use in interfaces to callback based
+ streams. Pass to the GetWriteAvailable parameter of PaUtil_InitializeStreamInterface.
+ @return An error code indicating that the function has no effect
+ because the stream is a callback stream.
+*/
+signed long PaUtil_DummyGetWriteAvailable( PaStream* stream );
+
+
+
+/** Dummy GetCpuLoad function for use in an interface to a read/write stream.
+ Pass to the GetCpuLoad parameter of PaUtil_InitializeStreamInterface.
+ @return Returns 0.
+*/
+double PaUtil_DummyGetCpuLoad( PaStream* stream );
+
+
+/** Non host specific data for a stream. This data is used by pa_front to
+ forward to the appropriate functions in the streamInterface structure.
+*/
+typedef struct PaUtilStreamRepresentation {
+    unsigned long magic;    /**< set to PA_STREAM_MAGIC */
+    struct PaUtilStreamRepresentation *nextOpenStream; /**< field used by multi-api code */
+    PaUtilStreamInterface *streamInterface;
+    PaStreamCallback *streamCallback;
+    PaStreamFinishedCallback *streamFinishedCallback;
+    void *userData;
+    PaStreamInfo streamInfo;
+} PaUtilStreamRepresentation;
+
+
+/** Initialize a PaUtilStreamRepresentation structure.
+
+ @see PaUtil_InitializeStreamRepresentation
+*/
+void PaUtil_InitializeStreamRepresentation(
+        PaUtilStreamRepresentation *streamRepresentation,
+        PaUtilStreamInterface *streamInterface,
+        PaStreamCallback *streamCallback,
+        void *userData );
+        
+
+/** Clean up a PaUtilStreamRepresentation structure previously initialized
+ by a call to PaUtil_InitializeStreamRepresentation.
+
+ @see PaUtil_InitializeStreamRepresentation
+*/
+void PaUtil_TerminateStreamRepresentation( PaUtilStreamRepresentation *streamRepresentation );
+
+
+/** Check that the stream pointer is valid.
+
+ @return Returns paNoError if the stream pointer appears to be OK, otherwise
+ returns an error indicating the cause of failure.
+*/
+PaError PaUtil_ValidateStreamPointer( PaStream *stream );
+
+
+/** Cast an opaque stream pointer into a pointer to a PaUtilStreamRepresentation.
+
+ @see PaUtilStreamRepresentation
+*/
+#define PA_STREAM_REP( stream )\
+    ((PaUtilStreamRepresentation*) (stream) )
+
+
+/** Cast an opaque stream pointer into a pointer to a PaUtilStreamInterface.
+
+ @see PaUtilStreamRepresentation, PaUtilStreamInterface
+*/
+#define PA_STREAM_INTERFACE( stream )\
+    PA_STREAM_REP( (stream) )->streamInterface
+
+
+    
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PA_STREAM_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_trace.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_trace.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_trace.c	(revision 1163)
@@ -0,0 +1,88 @@
+/*
+ * $Id: pa_trace.c,v 1.1.1.1.2.3 2003/09/20 21:09:15 rossbencina Exp $
+ * Portable Audio I/O Library Trace Facility
+ * Store trace information in real-time for later printing.
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2000 Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Event trace mechanism for debugging.
+*/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "pa_trace.h"
+
+#if PA_TRACE_REALTIME_EVENTS
+
+static char *traceTextArray[MAX_TRACE_RECORDS];
+static int traceIntArray[MAX_TRACE_RECORDS];
+static int traceIndex = 0;
+static int traceBlock = 0;
+
+/*********************************************************************/
+void PaUtil_ResetTraceMessages()
+{
+    traceIndex = 0;
+}
+
+/*********************************************************************/
+void PaUtil_DumpTraceMessages()
+{
+    int i;
+    int messageCount = (traceIndex < PA_MAX_TRACE_RECORDS) ? traceIndex : PA_MAX_TRACE_RECORDS;
+
+    printf("DumpTraceMessages: traceIndex = %d\n", traceIndex );
+    for( i=0; i<messageCount; i++ )
+    {
+        printf("%3d: %s = 0x%08X\n",
+               i, traceTextArray[i], traceIntArray[i] );
+    }
+    ResetTraceMessages();
+    fflush(stdout);
+}
+
+/*********************************************************************/
+void PaUtil_AddTraceMessage( const char *msg, int data )
+{
+    if( (traceIndex == PA_MAX_TRACE_RECORDS) && (traceBlock == 0) )
+    {
+        traceBlock = 1;
+        /*  PaUtil_DumpTraceMessages(); */
+    }
+    else if( traceIndex < PA_MAX_TRACE_RECORDS )
+    {
+        traceTextArray[traceIndex] = msg;
+        traceIntArray[traceIndex] = data;
+        traceIndex++;
+    }
+}
+
+#endif /* TRACE_REALTIME_EVENTS */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_trace.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_trace.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_trace.h	(revision 1163)
@@ -0,0 +1,70 @@
+#ifndef PA_TRACE_H
+#define PA_TRACE_H
+/*
+ * $Id: pa_trace.h,v 1.1.1.1.2.3 2003/09/20 21:09:15 rossbencina Exp $
+ * Portable Audio I/O Library Trace Facility
+ * Store trace information in real-time for later printing.
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2000 Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief Event trace mechanism for debugging.
+
+ Allows data to be written to the buffer at interrupt time and dumped later.
+*/
+
+
+#define PA_TRACE_REALTIME_EVENTS     (0)   /* Keep log of various real-time events. */
+#define PA_MAX_TRACE_RECORDS      (2048)
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+#if PA_TRACE_REALTIME_EVENTS
+
+void PaUtil_ResetTraceMessages();
+void PaUtil_AddTraceMessage( const char *msg, int data );
+void PaUtil_DumpTraceMessages();
+    
+#else
+
+#define PaUtil_ResetTraceMessages() /* noop */
+#define PaUtil_AddTraceMessage(msg,data) /* noop */
+#define PaUtil_DumpTraceMessages() /* noop */
+
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* PA_TRACE_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_types.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_types.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_types.h	(revision 1163)
@@ -0,0 +1,65 @@
+#ifndef PA_TYPES_H
+#define PA_TYPES_H
+
+/*
+    SIZEOF_SHORT, SIZEOF_INT and SIZEOF_LONG are set by the configure script
+    when it is used. Otherwise we default to the common 32 bit values, if your
+    platform doesn't use configure, and doesn't use the default values below
+    you will need to explicitly define these symbols in your make file.
+
+    A PA_VALIDATE_SIZES macro is provided to assert that the values set in this
+    file are correct.
+*/
+
+#ifndef SIZEOF_SHORT
+#define SIZEOF_SHORT 2
+#endif
+
+#ifndef SIZEOF_INT
+#define SIZEOF_INT 4
+#endif
+
+#ifndef SIZEOF_LONG
+#define SIZEOF_LONG 4
+#endif
+
+
+#if SIZEOF_SHORT == 2
+typedef signed short PaInt16;
+typedef unsigned short PaUint16;
+#elif SIZEOF_INT == 2
+typedef signed int PaInt16;
+typedef unsigned int PaUint16;
+#else
+#error pa_types.h was unable to determine which type to use for 16bit integers on the target platform
+#endif
+
+#if SIZEOF_SHORT == 4
+typedef signed short PaInt32;
+typedef unsigned short PaUint32;
+#elif SIZEOF_INT == 4
+typedef signed int PaInt32;
+typedef unsigned int PaUint32;
+#elif SIZEOF_LONG == 4
+typedef signed long PaInt32;
+typedef unsigned long PaUint32;
+#else
+#error pa_types.h was unable to determine which type to use for 32bit integers on the target platform
+#endif
+
+
+/* PA_VALIDATE_TYPE_SIZES compares the size of the integer types at runtime to
+ ensure that PortAudio was configured correctly, and raises an assertion if
+ they don't match the expected values. <assert.h> must be included in the
+ context in which this macro is used.
+*/
+#define PA_VALIDATE_TYPE_SIZES \
+    { \
+        assert( "PortAudio: type sizes are not correct in pa_types.h" && sizeof( PaUint16 ) == 2 ); \
+        assert( "PortAudio: type sizes are not correct in pa_types.h" && sizeof( PaInt16 ) == 2 ); \
+        assert( "PortAudio: type sizes are not correct in pa_types.h" && sizeof( PaUint32 ) == 4 ); \
+        assert( "PortAudio: type sizes are not correct in pa_types.h" && sizeof( PaInt32 ) == 4 ); \
+    }
+
+
+#endif /* PA_TYPES_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_unix_hostapis.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_unix_hostapis.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_unix_hostapis.c	(revision 1163)
@@ -0,0 +1,64 @@
+/*
+ * $Id: pa_unix_hostapis.c,v 1.1.2.5 2003/10/02 12:35:46 pieter Exp $
+ * Portable Audio I/O Library UNIX initialization table
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#include "pa_hostapi.h"
+
+PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+PaError PaAlsa_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+/* Added for IRIX, Pieter, oct 2, 2003: */
+PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+
+
+PaUtilHostApiInitializer *paHostApiInitializers[] =
+    {
+#ifdef PA_USE_ALSA
+        PaAlsa_Initialize,
+#endif
+
+#ifdef PA_USE_OSS
+        PaOSS_Initialize,
+#endif
+
+#ifdef PA_USE_JACK
+        PaJack_Initialize,
+#endif
+                    /* Added for IRIX, Pieter, oct 2, 2003: */
+#ifdef PA_USE_SGI 
+        PaSGI_Initialize,
+#endif
+        0   /* NULL terminated array */
+    };
+
+int paDefaultHostApiIndex = 0;
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_unix_oss.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_unix_oss.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_unix_oss.c	(revision 1163)
@@ -0,0 +1,1918 @@
+/*
+ * $Id: pa_unix_oss.c,v 1.6.2.22 2005/03/08 21:26:53 aknudsen Exp $
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ * OSS implementation by:
+ *   Douglas Repetto
+ *   Phil Burk
+ *   Dominic Mazzoni
+ *   Arve Knudsen
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <stdio.h>
+#include <string.h>
+#include <math.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <alloca.h>
+#include <malloc.h>
+#include <assert.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/poll.h>
+#include <limits.h>
+#include <semaphore.h>
+
+#ifdef __linux__
+# include <linux/soundcard.h>
+# define DEVICE_NAME_BASE            "/dev/dsp"
+#else
+# include <machine/soundcard.h> /* JH20010905 */
+# define DEVICE_NAME_BASE            "/dev/audio"
+#endif
+
+#include "portaudio.h"
+#include "pa_util.h"
+#include "pa_allocation.h"
+#include "pa_hostapi.h"
+#include "pa_stream.h"
+#include "pa_cpuload.h"
+#include "pa_process.h"
+#include "pa_unix_util.h"
+
+static int sysErr_;
+static pthread_t mainThread_;
+
+/* Check return value of system call, and map it to PaError */
+#define ENSURE_(expr, code) \
+    do { \
+        if( UNLIKELY( (sysErr_ = (expr)) < 0 ) ) \
+        { \
+            /* PaUtil_SetLastHostErrorInfo should only be used in the main thread */ \
+            if( (code) == paUnanticipatedHostError && pthread_self() == mainThread_ ) \
+            { \
+                PaUtil_SetLastHostErrorInfo( paALSA, sysErr_, strerror( errno ) ); \
+            } \
+            \
+            PaUtil_DebugPrint(( "Expression '" #expr "' failed in '" __FILE__ "', line: " STRINGIZE( __LINE__ ) "\n" )); \
+            result = (code); \
+            goto error; \
+        } \
+    } while( 0 );
+
+#ifndef AFMT_S16_NE
+#define AFMT_S16_NE  Get_AFMT_S16_NE()
+/*********************************************************************
+ * Some versions of OSS do not define AFMT_S16_NE. So check CPU.
+ * PowerPC is Big Endian. X86 is Little Endian.
+ */
+static int Get_AFMT_S16_NE( void )
+{
+    long testData = 1; 
+    char *ptr = (char *) &testData;
+    int isLittle = ( *ptr == 1 ); /* Does address point to least significant byte? */
+    return isLittle ? AFMT_S16_LE : AFMT_S16_BE;
+}
+#endif
+
+/* PaOSSHostApiRepresentation - host api datastructure specific to this implementation */
+
+typedef struct
+{
+    PaUtilHostApiRepresentation inheritedHostApiRep;
+    PaUtilStreamInterface callbackStreamInterface;
+    PaUtilStreamInterface blockingStreamInterface;
+
+    PaUtilAllocationGroup *allocations;
+
+    PaHostApiIndex hostApiIndex;
+}
+PaOSSHostApiRepresentation;
+
+/** Per-direction structure for PaOssStream.
+ *
+ * Aspect StreamChannels: In case the user requests to open the same device for both capture and playback,
+ * but with different number of channels we will have to adapt between the number of user and host
+ * channels for at least one direction, since the configuration space is the same for both directions
+ * of an OSS device.
+ */
+typedef struct
+{
+    int fd;
+    const char *devName;
+    int userChannelCount, hostChannelCount;
+    int userInterleaved;
+    void *buffer;
+    PaSampleFormat userFormat, hostFormat;
+    double latency;
+    unsigned long hostFrames, numBufs;
+    void **userBuffers; /* For non-interleaved blocking */
+} PaOssStreamComponent;
+
+/** Implementation specific representation of a PaStream.
+ *
+ */
+typedef struct PaOssStream
+{
+    PaUtilStreamRepresentation streamRepresentation;
+    PaUtilCpuLoadMeasurer cpuLoadMeasurer;
+    PaUtilBufferProcessor bufferProcessor;
+
+    PaUtilThreading threading;
+
+    int sharedDevice;
+    unsigned long framesPerHostBuffer;
+    int triggered;  /* Have the devices been triggered yet (first start) */
+
+    int isActive;
+    int isStopped;
+
+    int lastPosPtr;
+    double lastStreamBytes;
+
+    int framesProcessed;
+
+    double sampleRate;
+
+    int callbackMode;
+    int callbackStop, callbackAbort;
+
+    PaOssStreamComponent *capture, *playback;
+    unsigned long pollTimeout;
+    sem_t semaphore;
+}
+PaOssStream;
+
+typedef enum {
+    StreamMode_In,
+    StreamMode_Out
+} StreamMode;
+
+/* prototypes for functions declared in this file */
+
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi );
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate );
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** s,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *streamCallback,
+                           void *userData );
+static PaError CloseStream( PaStream* stream );
+static PaError StartStream( PaStream *stream );
+static PaError StopStream( PaStream *stream );
+static PaError AbortStream( PaStream *stream );
+static PaError IsStreamStopped( PaStream *s );
+static PaError IsStreamActive( PaStream *stream );
+static PaTime GetStreamTime( PaStream *stream );
+static double GetStreamCpuLoad( PaStream* stream );
+static PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );
+static PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );
+static signed long GetStreamReadAvailable( PaStream* stream );
+static signed long GetStreamWriteAvailable( PaStream* stream );
+static PaError BuildDeviceList( PaOSSHostApiRepresentation *hostApi );
+
+
+/** Initialize the OSS API implementation.
+ *
+ * This function will initialize host API datastructures and query host devices for information.
+ *
+ * Aspect DeviceCapabilities: Enumeration of host API devices is initiated from here
+ *
+ * Aspect FreeResources: If an error is encountered under way we have to free each resource allocated in this function,
+ * this happens with the usual "error" label.
+ */
+PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+{
+    PaError result = paNoError;
+    PaOSSHostApiRepresentation *ossHostApi = NULL;
+
+    PA_UNLESS( ossHostApi = (PaOSSHostApiRepresentation*)PaUtil_AllocateMemory( sizeof(PaOSSHostApiRepresentation) ),
+            paInsufficientMemory );
+    PA_UNLESS( ossHostApi->allocations = PaUtil_CreateAllocationGroup(), paInsufficientMemory );
+    ossHostApi->hostApiIndex = hostApiIndex;
+
+    /* Initialize host API structure */
+    *hostApi = &ossHostApi->inheritedHostApiRep;
+    (*hostApi)->info.structVersion = 1;
+    (*hostApi)->info.type = paOSS;
+    (*hostApi)->info.name = "OSS";
+    (*hostApi)->Terminate = Terminate;
+    (*hostApi)->OpenStream = OpenStream;
+    (*hostApi)->IsFormatSupported = IsFormatSupported;
+
+    PA_ENSURE( BuildDeviceList( ossHostApi ) );
+
+    PaUtil_InitializeStreamInterface( &ossHostApi->callbackStreamInterface, CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, GetStreamCpuLoad,
+                                      PaUtil_DummyRead, PaUtil_DummyWrite,
+                                      PaUtil_DummyGetReadAvailable,
+                                      PaUtil_DummyGetWriteAvailable );
+
+    PaUtil_InitializeStreamInterface( &ossHostApi->blockingStreamInterface, CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, PaUtil_DummyGetCpuLoad,
+                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );
+
+    mainThread_ = pthread_self();
+
+    return result;
+
+error:
+    if( ossHostApi )
+    {
+        if( ossHostApi->allocations )
+        {
+            PaUtil_FreeAllAllocations( ossHostApi->allocations );
+            PaUtil_DestroyAllocationGroup( ossHostApi->allocations );
+        }
+                
+        PaUtil_FreeMemory( ossHostApi );
+    }
+    return result;
+}
+
+PaError PaUtil_InitializeDeviceInfo( PaDeviceInfo *deviceInfo, const char *name, PaHostApiIndex hostApiIndex, int maxInputChannels,
+        int maxOutputChannels, PaTime defaultLowInputLatency, PaTime defaultLowOutputLatency, PaTime defaultHighInputLatency,
+        PaTime defaultHighOutputLatency, double defaultSampleRate, PaUtilAllocationGroup *allocations  )
+{
+    PaError result = paNoError;
+    
+    deviceInfo->structVersion = 2;
+    if( allocations )
+    {
+        size_t len = strlen( name ) + 1;
+        PA_UNLESS( deviceInfo->name = PaUtil_GroupAllocateMemory( allocations, len ), paInsufficientMemory );
+        strncpy( (char *)deviceInfo->name, name, len );
+    }
+    else
+        deviceInfo->name = name;
+
+    deviceInfo->hostApi = hostApiIndex;
+    deviceInfo->maxInputChannels = maxInputChannels;
+    deviceInfo->maxOutputChannels = maxOutputChannels;
+    deviceInfo->defaultLowInputLatency = defaultLowInputLatency;
+    deviceInfo->defaultLowOutputLatency = defaultLowOutputLatency;
+    deviceInfo->defaultHighInputLatency = defaultHighInputLatency;
+    deviceInfo->defaultHighOutputLatency = defaultHighOutputLatency;
+    deviceInfo->defaultSampleRate = defaultSampleRate;
+
+error:
+    return result;
+}
+
+static PaError QueryDirection( const char *deviceName, StreamMode mode, double *defaultSampleRate, int *maxChannelCount,
+        double *defaultLowLatency, double *defaultHighLatency )
+{
+    PaError result = paNoError;
+    int numChannels, maxNumChannels;
+    int busy = 0;
+    int devHandle = -1;
+    int sr;
+    *maxChannelCount = 0;  /* Default value in case this fails */
+
+    if ( (devHandle = open( deviceName, (mode == StreamMode_In ? O_RDONLY : O_WRONLY) | O_NONBLOCK ))  < 0 )
+    {
+        if( errno == EBUSY || errno == EAGAIN )
+        {
+            PA_DEBUG(( "%s: Device %s busy\n", __FUNCTION__, deviceName ));
+        }
+        else
+        {
+            PA_DEBUG(( "%s: Can't access device: %s\n", __FUNCTION__, strerror( errno ) ));
+        }
+
+        return paDeviceUnavailable;
+    }
+
+    /* Negotiate for the maximum number of channels for this device. PLB20010927
+     * Consider up to 16 as the upper number of channels.
+     * Variable maxNumChannels should contain the actual upper limit after the call.
+     * Thanks to John Lazzaro and Heiko Purnhagen for suggestions.
+     */
+    maxNumChannels = 0;
+    for( numChannels = 1; numChannels <= 16; numChannels++ )
+    {
+        int temp = numChannels;
+        if( ioctl( devHandle, SNDCTL_DSP_CHANNELS, &temp ) < 0 )
+        {
+            busy = EAGAIN == errno || EBUSY == errno;
+            /* ioctl() failed so bail out if we already have stereo */
+            if( maxNumChannels >= 2 )
+                break;
+        }
+        else
+        {
+            /* ioctl() worked but bail out if it does not support numChannels.
+             * We don't want to leave gaps in the numChannels supported.
+             */
+            if( (numChannels > 2) && (temp != numChannels) )
+                break;
+            if( temp > maxNumChannels )
+                maxNumChannels = temp; /* Save maximum. */
+        }
+    }
+    /* A: We're able to open a device for capture if it's busy playing back and vice versa,
+     * but we can't configure anything */
+    if( 0 == maxNumChannels && busy )
+    {
+        result = paDeviceUnavailable;
+        goto error;
+    }
+
+    /* The above negotiation may fail for an old driver so try this older technique. */
+    if( maxNumChannels < 1 )
+    {
+        int stereo = 1;
+        if( ioctl( devHandle, SNDCTL_DSP_STEREO, &stereo ) < 0 )
+        {
+            maxNumChannels = 1;
+        }
+        else
+        {
+            maxNumChannels = (stereo) ? 2 : 1;
+        }
+        PA_DEBUG(( "%s: use SNDCTL_DSP_STEREO, maxNumChannels = %d\n", __FUNCTION__, maxNumChannels ))
+    }
+
+    /* During channel negotiation, the last ioctl() may have failed. This can
+     * also cause sample rate negotiation to fail. Hence the following, to return
+     * to a supported number of channels. SG20011005 */
+    {
+        /* use most reasonable default value */
+        int temp = PA_MIN( maxNumChannels, 2 );
+        ENSURE_( ioctl( devHandle, SNDCTL_DSP_CHANNELS, &temp ), paUnanticipatedHostError );
+    }
+
+    /* Get supported sample rate closest to 44100 Hz */
+    if( *defaultSampleRate < 0 )
+    {
+        sr = 44100;
+        if( ioctl( devHandle, SNDCTL_DSP_SPEED, &sr ) < 0 )
+        {
+            result = paUnanticipatedHostError;
+            goto error;
+        }
+
+        *defaultSampleRate = sr;
+    }
+
+    *maxChannelCount = maxNumChannels;
+    /* TODO */
+    *defaultLowLatency = 512. / *defaultSampleRate;
+    *defaultHighLatency = 2048. / *defaultSampleRate;
+
+error:
+    if( devHandle >= 0 )
+        close( devHandle );
+
+    return result;
+}
+
+/** Query OSS device.
+ *
+ * This is where PaDeviceInfo objects are constructed and filled in with relevant information.
+ *
+ * Aspect DeviceCapabilities: The inferred device capabilities are recorded in a PaDeviceInfo object that is constructed
+ * in place.
+ */
+static PaError QueryDevice( char *deviceName, PaOSSHostApiRepresentation *ossApi, PaDeviceInfo **deviceInfo )
+{
+    PaError result = paNoError;
+    double sampleRate = -1.;
+    int maxInputChannels, maxOutputChannels;
+    PaTime defaultLowInputLatency, defaultLowOutputLatency, defaultHighInputLatency, defaultHighOutputLatency;
+    PaError tmpRes = paNoError;
+    int busy = 0;
+    *deviceInfo = NULL;
+
+    /* douglas:
+       we have to do this querying in a slightly different order. apparently
+       some sound cards will give you different info based on their settins. 
+       e.g. a card might give you stereo at 22kHz but only mono at 44kHz.
+       the correct order for OSS is: format, channels, sample rate
+    */
+
+    /* Aspect StreamChannels: The number of channels supported for a device may depend on the mode it is
+     * opened in, it may have more channels available for capture than playback and vice versa. Therefore
+     * we will open the device in both read- and write-only mode to determine the supported number.
+     */
+    if( (tmpRes = QueryDirection( deviceName, StreamMode_In, &sampleRate, &maxInputChannels, &defaultLowInputLatency,
+                &defaultHighInputLatency )) != paNoError )
+    {
+        if( tmpRes != paDeviceUnavailable )
+        {
+            PA_DEBUG(( "%s: Querying device %s for capture failed!\n", __FUNCTION__, deviceName ));
+            /* PA_ENSURE( tmpRes ); */
+        }
+        ++busy;
+    }
+    if( (tmpRes = QueryDirection( deviceName, StreamMode_Out, &sampleRate, &maxOutputChannels, &defaultLowOutputLatency,
+                &defaultHighOutputLatency )) != paNoError )
+    {
+        if( tmpRes != paDeviceUnavailable )
+        {
+            PA_DEBUG(( "%s: Querying device %s for playback failed!\n", __FUNCTION__, deviceName ));
+            /* PA_ENSURE( tmpRes ); */
+        }
+        ++busy;
+    }
+    assert( 0 <= busy && busy <= 2 );
+    if( 2 == busy )     /* Both directions are unavailable to us */
+    {
+        result = paDeviceUnavailable;
+        goto error;
+    }
+
+    PA_UNLESS( *deviceInfo = PaUtil_GroupAllocateMemory( ossApi->allocations, sizeof (PaDeviceInfo) ), paInsufficientMemory );
+    PA_ENSURE( PaUtil_InitializeDeviceInfo( *deviceInfo, deviceName, ossApi->hostApiIndex, maxInputChannels, maxOutputChannels,
+                defaultLowInputLatency, defaultLowOutputLatency, defaultHighInputLatency, defaultHighOutputLatency, sampleRate,
+                ossApi->allocations ) );
+
+error:
+    return result;
+}
+
+/** Query host devices.
+ *
+ * Loop over host devices and query their capabilitiesu
+ *
+ * Aspect DeviceCapabilities: This function calls QueryDevice on each device entry and receives a filled in PaDeviceInfo object
+ * per device, these are placed in the host api representation's deviceInfos array.
+ */
+static PaError BuildDeviceList( PaOSSHostApiRepresentation *ossApi )
+{
+    PaError result = paNoError;
+    PaUtilHostApiRepresentation *commonApi = &ossApi->inheritedHostApiRep;
+    int i;
+    int numDevices = 0, maxDeviceInfos = 1;
+    PaDeviceInfo **deviceInfos = NULL;
+
+    /* These two will be set to the first working input and output device, respectively */
+    commonApi->info.defaultInputDevice = paNoDevice;
+    commonApi->info.defaultOutputDevice = paNoDevice;
+
+    /* Find devices by calling QueryDevice on each
+     * potential device names.  When we find a valid one,
+     * add it to a linked list.
+     * A: Can there only be 10 devices? */
+
+    for( i = 0; i < 10; i++ )
+    {
+       char deviceName[32];
+       PaDeviceInfo *deviceInfo;
+       int testResult;
+       struct stat stbuf;
+
+       if( i == 0 )
+          snprintf(deviceName, sizeof (deviceName), "%s", DEVICE_NAME_BASE);
+       else
+          snprintf(deviceName, sizeof (deviceName), "%s%d", DEVICE_NAME_BASE, i);
+
+       /* PA_DEBUG(("PaOSS BuildDeviceList: trying device %s\n", deviceName )); */
+       if( stat( deviceName, &stbuf ) < 0 )
+       {
+           if( ENOENT != errno )
+               PA_DEBUG(( "%s: Error stat'ing %s: %s\n", __FUNCTION__, deviceName, strerror( errno ) ));
+           continue;
+       }
+       if( (testResult = QueryDevice( deviceName, ossApi, &deviceInfo )) != paNoError )
+       {
+           if( testResult != paDeviceUnavailable )
+               PA_ENSURE( testResult );
+
+           continue;
+       }
+
+       ++numDevices;
+       if( !deviceInfos || numDevices > maxDeviceInfos )
+       {
+           maxDeviceInfos *= 2;
+           PA_UNLESS( deviceInfos = (PaDeviceInfo **) realloc( deviceInfos, maxDeviceInfos * sizeof (PaDeviceInfo *) ),
+                   paInsufficientMemory );
+       }
+       deviceInfos[numDevices - 1] = deviceInfo;
+
+       if( commonApi->info.defaultInputDevice == paNoDevice && deviceInfo->maxInputChannels > 0 )
+           commonApi->info.defaultInputDevice = i;
+       if( commonApi->info.defaultOutputDevice == paNoDevice && deviceInfo->maxOutputChannels > 0 )
+           commonApi->info.defaultOutputDevice = i;
+    }
+
+    /* Make an array of PaDeviceInfo pointers out of the linked list */
+
+    PA_DEBUG(("PaOSS %s: Total number of devices found: %d\n", __FUNCTION__, numDevices));
+
+    commonApi->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(
+        ossApi->allocations, sizeof(PaDeviceInfo*) * numDevices );
+    memcpy( commonApi->deviceInfos, deviceInfos, numDevices * sizeof (PaDeviceInfo *) );
+
+    commonApi->info.deviceCount = numDevices;
+
+error:
+    free( deviceInfos );
+
+    return result;
+}
+
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi )
+{
+    PaOSSHostApiRepresentation *ossHostApi = (PaOSSHostApiRepresentation*)hostApi;
+
+    if( ossHostApi->allocations )
+    {
+        PaUtil_FreeAllAllocations( ossHostApi->allocations );
+        PaUtil_DestroyAllocationGroup( ossHostApi->allocations );
+    }
+
+    PaUtil_FreeMemory( ossHostApi );
+}
+
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate )
+{
+    PaError result = paNoError;
+    PaDeviceIndex device;
+    PaDeviceInfo *deviceInfo;
+    char *deviceName;
+    int inputChannelCount, outputChannelCount;
+    int tempDevHandle = -1;
+    int flags;
+    PaSampleFormat inputSampleFormat, outputSampleFormat;
+    
+    if( inputParameters )
+    {
+        inputChannelCount = inputParameters->channelCount;
+        inputSampleFormat = inputParameters->sampleFormat;
+
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+
+        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )
+            return paInvalidDevice;
+
+        /* check that input device can support inputChannelCount */
+        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )
+            return paInvalidChannelCount;
+
+        /* validate inputStreamInfo */
+        if( inputParameters->hostApiSpecificStreamInfo )
+            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
+    }
+    else
+    {
+        inputChannelCount = 0;
+    }
+
+    if( outputParameters )
+    {
+        outputChannelCount = outputParameters->channelCount;
+        outputSampleFormat = outputParameters->sampleFormat;
+        
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+
+        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )
+            return paInvalidDevice;
+
+        /* check that output device can support inputChannelCount */
+        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )
+            return paInvalidChannelCount;
+
+        /* validate outputStreamInfo */
+        if( outputParameters->hostApiSpecificStreamInfo )
+            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
+    }
+    else
+    {
+        outputChannelCount = 0;
+    }
+
+    if (inputChannelCount == 0 && outputChannelCount == 0)
+        return paInvalidChannelCount;
+
+    /* if full duplex, make sure that they're the same device */
+
+    if (inputChannelCount > 0 && outputChannelCount > 0 &&
+        inputParameters->device != outputParameters->device)
+        return paInvalidDevice;
+
+    /* if full duplex, also make sure that they're the same number of channels */
+
+    if (inputChannelCount > 0 && outputChannelCount > 0 &&
+        inputChannelCount != outputChannelCount)
+       return paInvalidChannelCount;
+
+    /* open the device so we can do more tests */
+    
+    if( inputChannelCount > 0 )
+    {
+        result = PaUtil_DeviceIndexToHostApiDeviceIndex(&device, inputParameters->device, hostApi);
+        if (result != paNoError)
+            return result;
+    }
+    else
+    {
+        result = PaUtil_DeviceIndexToHostApiDeviceIndex(&device, outputParameters->device, hostApi);
+        if (result != paNoError)
+            return result;
+    }
+
+    deviceInfo = hostApi->deviceInfos[device];
+    deviceName = (char *)deviceInfo->name;
+    
+    flags = O_NONBLOCK;
+    if (inputChannelCount > 0 && outputChannelCount > 0)
+       flags |= O_RDWR;
+    else if (inputChannelCount > 0)
+       flags |= O_RDONLY;
+    else
+       flags |= O_WRONLY;
+
+    ENSURE_( tempDevHandle = open( deviceInfo->name, flags ), paDeviceUnavailable );
+
+    /* PaOssStream_Configure will do the rest of the checking for us */
+    /* PA_ENSURE( PaOssStream_Configure( tempDevHandle, deviceName, outputChannelCount, &sampleRate ) ); */
+
+    /* everything succeeded! */
+
+ error:
+    if( tempDevHandle >= 0 )
+        close( tempDevHandle );         
+
+    return result;
+}
+
+/** Validate stream parameters.
+ *
+ * Aspect StreamChannels: We verify that the number of channels is within the allowed range for the device
+ */
+static PaError ValidateParameters( const PaStreamParameters *parameters, const PaDeviceInfo *deviceInfo, StreamMode mode )
+{
+    int maxChans;
+
+    assert( parameters );
+
+    if( parameters->device == paUseHostApiSpecificDeviceSpecification )
+    {
+        return paInvalidDevice;
+    }
+
+    maxChans = (mode == StreamMode_In ? deviceInfo->maxInputChannels :
+        deviceInfo->maxOutputChannels);
+    if( parameters->channelCount > maxChans )
+    {
+        return paInvalidChannelCount;
+    }
+
+    return paNoError;
+}
+
+static PaError PaOssStreamComponent_Initialize( PaOssStreamComponent *component, const PaStreamParameters *parameters,
+        int callbackMode, int fd, const char *deviceName )
+{
+    PaError result = paNoError;
+    assert( component );
+
+    memset( component, 0, sizeof (PaOssStreamComponent) );
+
+    component->fd = fd;
+    component->devName = deviceName;
+    component->userChannelCount = parameters->channelCount;
+    component->userFormat = parameters->sampleFormat;
+    component->latency = parameters->suggestedLatency;
+    component->userInterleaved = !(parameters->sampleFormat & paNonInterleaved);
+
+    if( !callbackMode && !component->userInterleaved )
+    {
+        /* Pre-allocate non-interleaved user provided buffers */
+        PA_UNLESS( component->userBuffers = PaUtil_AllocateMemory( sizeof (void *) * component->userChannelCount ),
+                paInsufficientMemory );
+    }
+
+error:
+    return result;
+}
+
+static void PaOssStreamComponent_Terminate( PaOssStreamComponent *component )
+{
+    assert( component );
+
+    if( component->fd >= 0 )
+        close( component->fd );
+    if( component->buffer )
+        PaUtil_FreeMemory( component->buffer );
+
+    if( component->userBuffers )
+        PaUtil_FreeMemory( component->userBuffers );
+
+    PaUtil_FreeMemory( component );
+}
+
+static PaError ModifyBlocking( int fd, int blocking )
+{
+    PaError result = paNoError;
+    int fflags;
+
+    ENSURE_( fflags = fcntl( fd, F_GETFL ), paUnanticipatedHostError );
+
+    if( blocking )
+        fflags &= ~O_NONBLOCK;
+    else
+        fflags |= O_NONBLOCK;
+
+    ENSURE_( fcntl( fd, F_SETFL, fflags ), paUnanticipatedHostError );
+
+error:
+    return result;
+}
+
+static PaError OpenDevices( const char *idevName, const char *odevName, int *idev, int *odev )
+{
+    PaError result = paNoError;
+    int flags = O_NONBLOCK, duplex = 0;
+    int enableBits = 0;
+    *idev = *odev = -1;
+
+    if( idevName && odevName )
+    {
+        duplex = 1;
+        flags |= O_RDWR;
+    }
+    else if( idevName )
+        flags |= O_RDONLY;
+    else
+        flags |= O_WRONLY;
+
+    /* open first in nonblocking mode, in case it's busy...
+     * A: then unset the non-blocking attribute */
+    assert( flags & O_NONBLOCK );
+    if( idevName )
+    {
+        ENSURE_( *idev = open( idevName, flags ), paDeviceUnavailable );
+        PA_ENSURE( ModifyBlocking( *idev, 1 ) ); /* Blocking */
+
+        /* Initially disable */
+        enableBits = ~PCM_ENABLE_INPUT;
+        ENSURE_( ioctl( *idev, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError );
+    }
+    if( odevName )
+    {
+        if( !idevName )
+        {
+            ENSURE_( *odev = open( odevName, flags ), paDeviceUnavailable );
+            PA_ENSURE( ModifyBlocking( *odev, 1 ) ); /* Blocking */
+
+            /* Initially disable */
+            enableBits = ~PCM_ENABLE_OUTPUT;
+            ENSURE_( ioctl( *odev, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError );
+        }
+        else
+        {
+            ENSURE_( *odev = dup( *idev ), paUnanticipatedHostError );
+        }
+    }
+
+error:
+    return result;
+}
+
+static PaError PaOssStream_Initialize( PaOssStream *stream, const PaStreamParameters *inputParameters, const PaStreamParameters *outputParameters,
+        PaStreamCallback callback, void *userData, PaStreamFlags streamFlags,
+        PaOSSHostApiRepresentation *ossApi )
+{
+    PaError result = paNoError;
+    int idev, odev;
+    PaUtilHostApiRepresentation *hostApi = &ossApi->inheritedHostApiRep;
+    const char *idevName = NULL, *odevName = NULL;
+
+    assert( stream );
+
+    memset( stream, 0, sizeof (PaOssStream) );
+    stream->isStopped = 1;
+
+    PA_ENSURE( PaUtil_InitializeThreading( &stream->threading ) );
+
+    if( inputParameters && outputParameters )
+    {
+        if( inputParameters->device == outputParameters->device )
+            stream->sharedDevice = 1;
+    }
+
+    if( inputParameters )
+        idevName = hostApi->deviceInfos[inputParameters->device]->name;
+    if( outputParameters )
+        odevName = hostApi->deviceInfos[outputParameters->device]->name;
+    PA_ENSURE( OpenDevices( idevName, odevName, &idev, &odev ) );
+    if( inputParameters )
+    {
+        PA_UNLESS( stream->capture = PaUtil_AllocateMemory( sizeof (PaOssStreamComponent) ), paInsufficientMemory );
+        PA_ENSURE( PaOssStreamComponent_Initialize( stream->capture, inputParameters, callback != NULL, idev, idevName ) );
+    }
+    if( outputParameters )
+    {
+        PA_UNLESS( stream->playback = PaUtil_AllocateMemory( sizeof (PaOssStreamComponent) ), paInsufficientMemory );
+        PA_ENSURE( PaOssStreamComponent_Initialize( stream->playback, outputParameters, callback != NULL, odev, odevName ) );
+    }
+
+    if( callback != NULL )
+    {
+        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
+                                               &ossApi->callbackStreamInterface, callback, userData );
+        stream->callbackMode = 1;
+    }
+    else
+    {
+        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
+                                               &ossApi->blockingStreamInterface, callback, userData );
+    }    
+
+    ENSURE_( sem_init( &stream->semaphore, 0, 0 ), paInternalError );
+
+error:
+    return result;
+}
+
+static void PaOssStream_Terminate( PaOssStream *stream )
+{
+    assert( stream );
+
+    PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );
+    PaUtil_TerminateThreading( &stream->threading );
+
+    if( stream->capture )
+        PaOssStreamComponent_Terminate( stream->capture );
+    if( stream->playback )
+        PaOssStreamComponent_Terminate( stream->playback );
+
+    sem_destroy( &stream->semaphore );
+
+    PaUtil_FreeMemory( stream );
+}
+
+/** Translate from PA format to OSS native.
+ *
+ */
+static PaError Pa2OssFormat( PaSampleFormat paFormat, int *ossFormat )
+{
+    switch( paFormat )
+    {
+        case paUInt8:
+            *ossFormat = AFMT_U8;
+            break;
+        case paInt8:
+            *ossFormat = AFMT_S8;
+            break;
+        case paInt16:
+            *ossFormat = AFMT_S16_NE;
+            break;
+        default:
+            return paInternalError;     /* This shouldn't happen */
+    }
+
+    return paNoError;
+}
+
+/** Return the PA-compatible formats that this device can support.
+ *
+ */
+static PaError GetAvailableFormats( PaOssStreamComponent *component, PaSampleFormat *availableFormats )
+{
+    PaError result = paNoError;
+    int mask = 0;
+    PaSampleFormat frmts = 0;
+
+    ENSURE_( ioctl( component->fd, SNDCTL_DSP_GETFMTS, &mask ), paUnanticipatedHostError );
+    if( mask & AFMT_U8 )
+        frmts |= paUInt8;
+    if( mask & AFMT_S8 )
+        frmts |= paInt8;
+    if( mask & AFMT_S16_NE )
+        frmts |= paInt16;
+    else
+        result = paSampleFormatNotSupported;
+    
+    *availableFormats = frmts;
+
+error:
+    return result;
+}
+
+static unsigned int PaOssStreamComponent_FrameSize( PaOssStreamComponent *component )
+{
+    return Pa_GetSampleSize( component->hostFormat ) * component->hostChannelCount;
+}
+
+/** Buffer size in bytes.
+ *
+ */
+static unsigned long PaOssStreamComponent_BufferSize( PaOssStreamComponent *component )
+{
+    return PaOssStreamComponent_FrameSize( component ) * component->hostFrames * component->numBufs;
+}
+
+static int CalcHigherLogTwo( int n )
+{
+    int log2 = 0;
+    while( (1<<log2) < n ) log2++;
+    return log2;
+}
+
+static PaError PaOssStreamComponent_Configure( PaOssStreamComponent *component, double sampleRate, unsigned long framesPerBuffer,
+        StreamMode streamMode, PaOssStreamComponent *master )
+{
+    PaError result = paNoError;
+    int temp, nativeFormat;
+    int sr = (int)sampleRate;
+    PaSampleFormat availableFormats = 0, hostFormat;
+    int chans = component->userChannelCount;
+    int frgmt;
+    int numBufs;
+    int bytesPerBuf;
+    double bufSz;
+    unsigned long fragSz;
+    audio_buf_info bufInfo;
+
+    /* We may have a situation where only one component (the master) is configured, if both point to the same device.
+     * In that case, the second component will copy settings from the other */
+    if( !master )
+    {
+        /* Aspect BufferSettings: If framesPerBuffer is unspecified we have to infer a suitable fragment size.
+         * The hardware need not respect the requested fragment size, so we may have to adapt.
+         */
+        if( framesPerBuffer == paFramesPerBufferUnspecified )
+        { 
+            bufSz = component->latency * sampleRate;
+            fragSz = bufSz / 4;
+        }
+        else
+        {
+            fragSz = framesPerBuffer;
+            bufSz = component->latency * sampleRate + fragSz; /* Latency + 1 buffer */
+        }
+
+        PA_ENSURE( GetAvailableFormats( component, &availableFormats ) );
+        hostFormat = PaUtil_SelectClosestAvailableFormat( availableFormats, component->userFormat );
+
+        /* OSS demands at least 2 buffers, and 16 bytes per buffer */
+        numBufs = PA_MAX( bufSz / fragSz, 2 );
+        bytesPerBuf = PA_MAX( fragSz * Pa_GetSampleSize( hostFormat ) * chans, 16 );
+
+        /* The fragment parameters are encoded like this:
+         * Most significant byte: number of fragments
+         * Least significant byte: exponent of fragment size (i.e., for 256, 8)
+         */
+        frgmt = (numBufs << 16) + (CalcHigherLogTwo( bytesPerBuf ) & 0xffff);
+        ENSURE_( ioctl( component->fd, SNDCTL_DSP_SETFRAGMENT, &frgmt ), paUnanticipatedHostError );
+
+        /* A: according to the OSS programmer's guide parameters should be set in this order:
+         * format, channels, rate */
+
+        /* This format should be deemed good before we get this far */
+        PA_ENSURE( Pa2OssFormat( hostFormat, &temp ) );
+        nativeFormat = temp;
+        ENSURE_( ioctl( component->fd, SNDCTL_DSP_SETFMT, &temp ), paUnanticipatedHostError );
+        PA_UNLESS( temp == nativeFormat, paInternalError );
+
+        /* try to set the number of channels */
+        ENSURE_( ioctl( component->fd, SNDCTL_DSP_CHANNELS, &chans ), paSampleFormatNotSupported );   /* XXX: Should be paInvalidChannelCount? */
+        /* It's possible that the minimum number of host channels is greater than what the user requested */
+        PA_UNLESS( chans >= component->userChannelCount, paInvalidChannelCount );
+
+        /* try to set the sample rate */
+        ENSURE_( ioctl( component->fd, SNDCTL_DSP_SPEED, &sr ), paInvalidSampleRate );
+
+        /* reject if there's no sample rate within 1% of the one requested */
+        if( (fabs( sampleRate - sr ) / sampleRate) > 0.01 )
+        {
+            PA_DEBUG(("%s: Wanted %f, closest sample rate was %d\n", __FUNCTION__, sampleRate, sr ));                 
+            PA_ENSURE( paInvalidSampleRate );
+        }
+
+        ENSURE_( ioctl( component->fd, streamMode == StreamMode_In ? SNDCTL_DSP_GETISPACE : SNDCTL_DSP_GETOSPACE, &bufInfo ),
+                paUnanticipatedHostError );
+        component->numBufs = bufInfo.fragstotal;
+
+        /* This needs to be the last ioctl call before the first read/write, according to the OSS programmer's guide */
+        ENSURE_( ioctl( component->fd, SNDCTL_DSP_GETBLKSIZE, &bytesPerBuf ), paUnanticipatedHostError );
+
+        component->hostFrames = bytesPerBuf / Pa_GetSampleSize( hostFormat ) / chans;
+        component->hostChannelCount = chans;
+        component->hostFormat = hostFormat;
+    }
+    else
+    {
+        component->hostFormat = master->hostFormat;
+        component->hostFrames = master->hostFrames;
+        component->hostChannelCount = master->hostChannelCount;
+        component->numBufs = master->numBufs;
+    }
+
+    PA_UNLESS( component->buffer = PaUtil_AllocateMemory( PaOssStreamComponent_BufferSize( component ) ),
+            paInsufficientMemory );
+
+error:
+    return result;
+}
+
+static PaError PaOssStreamComponent_Read( PaOssStreamComponent *component, unsigned long *frames )
+{
+    PaError result = paNoError;
+    size_t len = *frames * PaOssStreamComponent_FrameSize( component );
+    ssize_t bytesRead;
+
+    ENSURE_( bytesRead = read( component->fd, component->buffer, len ), paUnanticipatedHostError );
+    *frames = bytesRead / PaOssStreamComponent_FrameSize( component );
+
+error:
+    return result;
+}
+
+static PaError PaOssStreamComponent_Write( PaOssStreamComponent *component, unsigned long *frames )
+{
+    PaError result = paNoError;
+    size_t len = *frames * PaOssStreamComponent_FrameSize( component );
+    ssize_t bytesWritten;
+
+    ENSURE_( bytesWritten = write( component->fd, component->buffer, len ), paUnanticipatedHostError );
+    *frames = bytesWritten / PaOssStreamComponent_FrameSize( component );
+
+error:
+    return result;
+}
+
+/** Configure the stream according to input/output parameters.
+ *
+ * Aspect StreamChannels: The minimum number of channels supported by the device may exceed that requested by
+ * the user, if so we'll record the actual number of host channels and adapt later.
+ */
+static PaError PaOssStream_Configure( PaOssStream *stream, double sampleRate, unsigned long framesPerBuffer,
+        double *inputLatency, double *outputLatency )
+{
+    PaError result = paNoError;
+    int duplex = stream->capture && stream->playback;
+    unsigned long framesPerHostBuffer = 0;
+
+    /* We should request full duplex first thing after opening the device */
+    if( duplex && stream->sharedDevice )
+        ENSURE_( ioctl( stream->capture->fd, SNDCTL_DSP_SETDUPLEX, 0 ), paUnanticipatedHostError );
+
+    if( stream->capture )
+    {
+        PaOssStreamComponent *component = stream->capture;
+        PaOssStreamComponent_Configure( component, sampleRate, framesPerBuffer, StreamMode_In, NULL );
+
+        assert( component->hostChannelCount > 0 );
+        assert( component->hostFrames > 0 );
+
+        *inputLatency = component->hostFrames * (component->numBufs - 1) / sampleRate;
+    }
+    if( stream->playback )
+    {
+        PaOssStreamComponent *component = stream->playback, *master = stream->sharedDevice ? stream->capture : NULL;
+        PA_ENSURE( PaOssStreamComponent_Configure( component, sampleRate, framesPerBuffer, StreamMode_Out,
+                    master ) );
+
+        assert( component->hostChannelCount > 0 );
+        assert( component->hostFrames > 0 );
+
+        *outputLatency = component->hostFrames * (component->numBufs - 1) / sampleRate;
+    }
+
+    if( duplex )
+        framesPerHostBuffer = PA_MIN( stream->capture->hostFrames, stream->playback->hostFrames );
+    else if( stream->capture )
+        framesPerHostBuffer = stream->capture->hostFrames;
+    else if( stream->playback )
+        framesPerHostBuffer = stream->playback->hostFrames;
+
+    stream->framesPerHostBuffer = framesPerHostBuffer;
+    stream->pollTimeout = (int) ceil( 1e6 * framesPerHostBuffer / sampleRate );    /* Period in usecs, rounded up */
+
+    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
+
+error:
+    return result;
+}
+
+/* see pa_hostapi.h for a list of validity guarantees made about OpenStream parameters */
+
+/** Open a PA OSS stream.
+ *
+ * Aspect StreamChannels: The number of channels is specified per direction (in/out), and can differ between the
+ * two. However, OSS doesn't support separate configuration spaces for capture and playback so if both
+ * directions are the same device we will demand the same number of channels. The number of channels can range
+ * from 1 to the maximum supported by the device.
+ *
+ * Aspect BufferSettings: If framesPerBuffer != paFramesPerBufferUnspecified the number of frames per callback
+ * must reflect this, in addition the host latency per device should approximate the corresponding
+ * suggestedLatency. Based on these constraints we need to determine a number of frames per host buffer that
+ * both capture and playback can agree on (they can be different devices), the buffer processor can adapt
+ * between host and user buffer size, but the ratio should preferably be integral.
+ */
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** s,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *streamCallback,
+                           void *userData )
+{
+    PaError result = paNoError;
+    PaOSSHostApiRepresentation *ossHostApi = (PaOSSHostApiRepresentation*)hostApi;
+    PaOssStream *stream = NULL;
+    int inputChannelCount = 0, outputChannelCount = 0;
+    PaSampleFormat inputSampleFormat = 0, outputSampleFormat = 0, inputHostFormat = 0, outputHostFormat = 0;
+    const PaDeviceInfo *inputDeviceInfo = 0, *outputDeviceInfo = 0;
+    int bpInitialized = 0;
+    double inLatency=0, outLatency=0;
+
+    /* validate platform specific flags */
+    if( (streamFlags & paPlatformSpecificFlags) != 0 )
+        return paInvalidFlag; /* unexpected platform specific flag */
+
+    if( inputParameters )
+    {
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+        inputDeviceInfo = hostApi->deviceInfos[inputParameters->device];
+        PA_ENSURE( ValidateParameters( inputParameters, inputDeviceInfo, StreamMode_In ) );
+
+        inputChannelCount = inputParameters->channelCount;
+        inputSampleFormat = inputParameters->sampleFormat;
+    }
+    if( outputParameters )
+    {
+        outputDeviceInfo = hostApi->deviceInfos[outputParameters->device];
+        PA_ENSURE( ValidateParameters( outputParameters, outputDeviceInfo, StreamMode_Out ) );
+
+        outputChannelCount = outputParameters->channelCount;
+        outputSampleFormat = outputParameters->sampleFormat;
+    }
+
+    /* Aspect StreamChannels: We currently demand that number of input and output channels are the same, if the same
+     * device is opened for both directions
+     */
+    if( inputChannelCount > 0 && outputChannelCount > 0 )
+    {
+        if( inputParameters->device == outputParameters->device )
+        {
+            if( inputParameters->channelCount != outputParameters->channelCount )
+                return paInvalidChannelCount;
+        }
+    }
+    
+    /* allocate and do basic initialization of the stream structure */
+    PA_UNLESS( stream = (PaOssStream*)PaUtil_AllocateMemory( sizeof(PaOssStream) ), paInsufficientMemory );
+    PaOssStream_Initialize( stream, inputParameters, outputParameters, streamCallback, userData, streamFlags, ossHostApi );
+
+    PA_ENSURE( PaOssStream_Configure( stream, sampleRate, framesPerBuffer, &inLatency, &outLatency ) );
+
+    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );
+        
+    if( inputParameters )
+    {
+        inputHostFormat = stream->capture->hostFormat;
+        stream->streamRepresentation.streamInfo.inputLatency = inLatency +
+            PaUtil_GetBufferProcessorInputLatency( &stream->bufferProcessor ) / sampleRate;
+    }
+    if( outputParameters )
+    {
+        outputHostFormat = stream->playback->hostFormat;
+        stream->streamRepresentation.streamInfo.outputLatency = outLatency +
+            PaUtil_GetBufferProcessorOutputLatency( &stream->bufferProcessor ) / sampleRate;
+    }
+
+    /* Initialize buffer processor with fixed host buffer size.
+     * Aspect StreamSampleFormat: Here we commit the user and host sample formats, PA infrastructure will
+     * convert between the two.
+     */
+    PA_ENSURE( PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,
+              inputChannelCount, inputSampleFormat, inputHostFormat, outputChannelCount, outputSampleFormat,
+              outputHostFormat, sampleRate, streamFlags, framesPerBuffer, stream->framesPerHostBuffer,
+              paUtilFixedHostBufferSize, streamCallback, userData ) );
+    bpInitialized = 1;
+
+    *s = (PaStream*)stream;
+
+    return result;
+
+error:
+    if( bpInitialized )
+        PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
+    if( stream )
+        PaOssStream_Terminate( stream );
+
+    return result;
+}
+
+/*! Poll on I/O filedescriptors.
+
+  Poll till we've determined there's data for read or write. In the full-duplex case,
+  we don't want to hang around forever waiting for either input or output frames, so
+  whenever we have a timed out filedescriptor we check if we're nearing under/overrun
+  for the other direction (critical limit set at one buffer). If so, we exit the waiting
+  state, and go on with what we got. We align the number of frames on a host buffer
+  boundary because it is possible that the buffer size differs for the two directions and
+  the host buffer size is a compromise between the two.
+  */
+static PaError PaOssStream_WaitForFrames( PaOssStream *stream, unsigned long *frames )
+{
+    PaError result = paNoError;
+    int pollPlayback = 0, pollCapture = 0;
+    int captureAvail = INT_MAX, playbackAvail = INT_MAX, commonAvail;
+    audio_buf_info bufInfo;
+    /* int ofs = 0, nfds = stream->nfds; */
+    fd_set readFds, writeFds;
+    int nfds = 0;
+    struct timeval selectTimeval = {0, 0};
+    unsigned long timeout = stream->pollTimeout;    /* In usecs */
+    int captureFd = -1, playbackFd = -1;
+
+    assert( stream );
+    assert( frames );
+
+    if( stream->capture )
+    {
+        pollCapture = 1;
+        captureFd = stream->capture->fd;
+        /* stream->capture->pfd->events = POLLIN; */
+    }
+    if( stream->playback )
+    {
+        pollPlayback = 1;
+        playbackFd = stream->playback->fd;
+        /* stream->playback->pfd->events = POLLOUT; */
+    }
+
+    FD_ZERO( &readFds );
+    FD_ZERO( &writeFds );
+
+    while( pollPlayback || pollCapture )
+    {
+        pthread_testcancel();
+
+        /* select may modify the timeout parameter */
+        selectTimeval.tv_usec = timeout;
+        nfds = 0;
+
+        if( pollCapture )
+        {
+            FD_SET( captureFd, &readFds );
+            nfds = captureFd + 1;
+        }
+        if( pollPlayback )
+        {
+            FD_SET( playbackFd, &writeFds );
+            nfds = PA_MAX( nfds, playbackFd + 1 );
+        }
+        ENSURE_( select( nfds, &readFds, &writeFds, NULL, &selectTimeval ), paUnanticipatedHostError );
+        /*
+        if( poll( stream->pfds + ofs, nfds, stream->pollTimeout ) < 0 )
+        {
+
+            ENSURE_( -1, paUnanticipatedHostError );
+        }
+        */
+        pthread_testcancel();
+
+        if( pollCapture )
+        {
+            if( FD_ISSET( captureFd, &readFds ) )
+            {
+                FD_CLR( captureFd, &readFds );
+                pollCapture = 0;
+            }
+            /*
+            if( stream->capture->pfd->revents & POLLIN )
+            {
+                --nfds;
+                ++ofs;
+                pollCapture = 0;
+            }
+            */
+            else if( stream->playback ) /* Timed out, go on with playback? */ 
+            {
+                /*PA_DEBUG(( "%s: Trying to poll again for capture frames, pollTimeout: %d\n",
+                            __FUNCTION__, stream->pollTimeout ));*/
+            }
+        }
+        if( pollPlayback )
+        {
+            if( FD_ISSET( playbackFd, &writeFds ) )
+            {
+                FD_CLR( playbackFd, &writeFds );
+                pollPlayback = 0;
+            }
+            /*
+            if( stream->playback->pfd->revents & POLLOUT )
+            {
+                --nfds;
+                pollPlayback = 0;
+            }
+            */
+            else if( stream->capture )  /* Timed out, go on with capture? */
+            {
+                /*PA_DEBUG(( "%s: Trying to poll again for playback frames, pollTimeout: %d\n\n",
+                            __FUNCTION__, stream->pollTimeout ));*/
+            }
+        }
+    }
+
+    if( stream->capture )
+    {
+        ENSURE_( ioctl( captureFd, SNDCTL_DSP_GETISPACE, &bufInfo ), paUnanticipatedHostError );
+        captureAvail = bufInfo.fragments * stream->capture->hostFrames;
+        if( !captureAvail )
+            PA_DEBUG(( "%s: captureAvail: 0\n", __FUNCTION__ ));
+
+        captureAvail = captureAvail == 0 ? INT_MAX : captureAvail;      /* Disregard if zero */
+    }
+    if( stream->playback )
+    {
+        ENSURE_( ioctl( playbackFd, SNDCTL_DSP_GETOSPACE, &bufInfo ), paUnanticipatedHostError );
+        playbackAvail = bufInfo.fragments * stream->playback->hostFrames;
+        if( !playbackAvail )
+        {
+            PA_DEBUG(( "%s: playbackAvail: 0\n", __FUNCTION__ ));
+        }
+
+        playbackAvail = playbackAvail == 0 ? INT_MAX : playbackAvail;      /* Disregard if zero */
+    }
+
+    commonAvail = PA_MIN( captureAvail, playbackAvail );
+    if( commonAvail == INT_MAX )
+        commonAvail = 0;
+    commonAvail -= commonAvail % stream->framesPerHostBuffer;
+
+    assert( commonAvail != INT_MAX );
+    assert( commonAvail >= 0 );
+    *frames = commonAvail;
+
+error:
+    return result;
+}
+
+/** Prepare stream for capture/playback.
+ *
+ * In order to synchronize capture and playback properly we use the SETTRIGGER command.
+ */
+static PaError PaOssStream_Prepare( PaOssStream *stream )
+{
+    PaError result = paNoError;
+    int enableBits = 0;
+
+    if( stream->triggered )
+        return result;
+
+    if( stream->playback )
+    {
+        size_t bufSz = PaOssStreamComponent_BufferSize( stream->playback );
+        memset( stream->playback->buffer, 0, bufSz );
+
+        /* Looks like we have to turn off blocking before we try this, but if we don't fill the buffer
+         * OSS will complain. */
+        PA_ENSURE( ModifyBlocking( stream->playback->fd, 0 ) );
+        while (1)
+        {
+            if( write( stream->playback->fd, stream->playback->buffer, bufSz ) < 0 )
+                break;
+        }
+        PA_ENSURE( ModifyBlocking( stream->playback->fd, 1 ) );
+    }
+
+    if( stream->sharedDevice )
+    {
+        enableBits = PCM_ENABLE_INPUT | PCM_ENABLE_OUTPUT;
+        ENSURE_( ioctl( stream->capture->fd, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError );
+    }
+    else
+    {
+        if( stream->capture )
+        {
+            enableBits = PCM_ENABLE_INPUT;
+            ENSURE_( ioctl( stream->capture->fd, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError );
+        }
+        if( stream->playback )
+        {
+            enableBits = PCM_ENABLE_OUTPUT;
+            ENSURE_( ioctl( stream->playback->fd, SNDCTL_DSP_SETTRIGGER, &enableBits ), paUnanticipatedHostError );
+        }
+    }
+
+    /* Ok, we have triggered the stream */
+    stream->triggered = 1;
+    
+error:
+    return result;
+}
+
+/** Stop audio processing
+ *
+ */
+static PaError PaOssStream_Stop( PaOssStream *stream, int abort )
+{
+    PaError result = paNoError;
+
+    /* Looks like the only safe way to stop audio without reopening the device is SNDCTL_DSP_POST.
+     * Also disable capture/playback till the stream is started again */
+    if( stream->capture )
+    {
+        ENSURE_( ioctl( stream->capture->fd, SNDCTL_DSP_POST, 0 ), paUnanticipatedHostError );
+    }
+    if( stream->playback && !stream->sharedDevice )
+    {
+        ENSURE_( ioctl( stream->playback->fd, SNDCTL_DSP_POST, 0 ), paUnanticipatedHostError );
+    }
+
+error:
+    return result;
+}
+
+/** Clean up after thread exit.
+ *
+ * Aspect StreamState: If the user has registered a streamFinishedCallback it will be called here
+ */
+static void OnExit( void *data )
+{
+    PaOssStream *stream = (PaOssStream *) data;
+    assert( data );
+
+    PaUtil_ResetCpuLoadMeasurer( &stream->cpuLoadMeasurer );
+
+    PaOssStream_Stop( stream, stream->callbackAbort );
+    
+    PA_DEBUG(( "OnExit: Stoppage\n" ));
+
+    /* Eventually notify user all buffers have played */
+    if( stream->streamRepresentation.streamFinishedCallback )
+        stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );
+
+    stream->callbackAbort = 0;      /* Clear state */
+    stream->isActive = 0;
+}
+
+static PaError SetUpBuffers( PaOssStream *stream, unsigned long framesAvail )
+{
+    PaError result = paNoError;
+
+    if( stream->capture )
+    {
+        PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor, 0, stream->capture->buffer,
+                stream->capture->hostChannelCount );
+        PaUtil_SetInputFrameCount( &stream->bufferProcessor, framesAvail );
+    }
+    if( stream->playback )
+    {
+        PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor, 0, stream->playback->buffer,
+                stream->playback->hostChannelCount );
+        PaUtil_SetOutputFrameCount( &stream->bufferProcessor, framesAvail );
+    }
+
+    return result;
+}
+
+/** Thread procedure for callback processing.
+ *
+ * Aspect StreamState: StartStream will wait on this to initiate audio processing, useful in case the
+ * callback should be used for buffer priming. When the stream is cancelled a separate function will
+ * take care of the transition to the Callback Finished state (the stream isn't considered Stopped
+ * before StopStream() or AbortStream() are called).
+ */
+static void *PaOSS_AudioThreadProc( void *userData )
+{
+    PaError result = paNoError;
+    PaOssStream *stream = (PaOssStream*)userData;
+    unsigned long framesAvail=0, framesProcessed;
+    int callbackResult = paContinue;
+    int triggered = stream->triggered;  /* See if SNDCTL_DSP_TRIGGER has been issued already */
+    int initiateProcessing = triggered;    /* Already triggered? */
+    PaStreamCallbackFlags cbFlags = 0;  /* We might want to keep state across iterations */
+    
+    /*
+#if ( SOUND_VERSION > 0x030904 )
+        audio_errinfo errinfo;
+#endif
+*/
+    
+    assert( stream );
+
+    pthread_cleanup_push( &OnExit, stream );	/* Execute OnExit when exiting */
+
+    /* The first time the stream is started we use SNDCTL_DSP_TRIGGER to accurately start capture and
+     * playback in sync, when the stream is restarted after being stopped we simply start by reading/
+     * writing.
+     */
+    PA_ENSURE( PaOssStream_Prepare( stream ) );
+
+    /* If we are to initiate processing implicitly by reading/writing data, we start off in blocking mode */
+    if( initiateProcessing )
+    {
+        /* Make sure devices are in blocking mode */
+        if( stream->capture )
+            ModifyBlocking( stream->capture->fd, 1 );
+        if( stream->playback )
+            ModifyBlocking( stream->playback->fd, 1 );
+    }
+
+    while( 1 )
+    {
+        PaStreamCallbackTimeInfo timeInfo = {0,0,0}; /* TODO: IMPLEMENT ME */
+
+        pthread_testcancel();
+
+        if( stream->callbackStop && callbackResult == paContinue )
+        {
+            PA_DEBUG(( "Setting callbackResult to paComplete\n" ));
+            callbackResult = paComplete;
+        }
+
+        /* Aspect StreamState: Because of the messy OSS scheme we can't explicitly trigger device start unless
+         * the stream has been recently started, we will have to go right ahead and read/write in blocking
+         * fashion to trigger operation. Therefore we begin with processing one host buffer before we switch
+         * to non-blocking mode.
+         */
+        if( !initiateProcessing )
+        {
+            PA_ENSURE( PaOssStream_WaitForFrames( stream, &framesAvail ) );  /* Wait on available frames */
+            assert( framesAvail % stream->framesPerHostBuffer == 0 );
+        }
+        else
+        {
+            framesAvail = stream->framesPerHostBuffer;
+        }
+
+        while( framesAvail > 0 )
+        {
+            unsigned long frames = framesAvail;
+
+            pthread_testcancel();
+
+            PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
+
+            /* Read data */
+            if ( stream->capture )
+            {
+                PA_ENSURE( PaOssStreamComponent_Read( stream->capture, &frames ) );
+                assert( frames == framesAvail );
+            }
+
+#if ( SOUND_VERSION >= 0x030904 )
+            /*
+               Check with OSS to see if there have been any under/overruns
+               since last time we checked.
+               */
+            /*
+            if( ioctl( stream->deviceHandle, SNDCTL_DSP_GETERROR, &errinfo ) >= 0 )
+            {
+                if( errinfo.play_underruns )
+                    cbFlags |= paOutputUnderflow ;
+                if( errinfo.record_underruns )
+                    cbFlags |= paInputUnderflow ;
+            }
+            else
+                PA_DEBUG(( "SNDCTL_DSP_GETERROR command failed: %s\n", strerror( errno ) ));
+                */
+#endif
+
+            PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo,
+                    cbFlags );
+            cbFlags = 0;
+            PA_ENSURE( SetUpBuffers( stream, framesAvail ) );
+
+            framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor,
+                    &callbackResult );
+            assert( framesProcessed == framesAvail );
+            PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );
+
+            if ( stream->playback )
+            {
+                frames = framesAvail;
+
+                PA_ENSURE( PaOssStreamComponent_Write( stream->playback, &frames ) );
+                assert( frames == framesAvail );
+
+                /* TODO: handle bytesWritten != bytesRequested (slippage?) */
+            }
+
+            framesAvail -= framesProcessed;
+            stream->framesProcessed += framesProcessed;
+
+            if( callbackResult != paContinue )
+                break;
+        }
+
+        if( initiateProcessing || !triggered )
+        {
+            /* Non-blocking */
+            if( stream->capture )
+                PA_ENSURE( ModifyBlocking( stream->capture->fd, 0 ) );
+            if( stream->playback && !stream->sharedDevice )
+                PA_ENSURE( ModifyBlocking( stream->playback->fd, 0 ) );
+
+            initiateProcessing = 0;
+            sem_post( &stream->semaphore );
+        }
+
+        if( callbackResult != paContinue )
+        {
+            stream->callbackAbort = callbackResult == paAbort;
+            if( stream->callbackAbort || PaUtil_IsBufferProcessorOutputEmpty( &stream->bufferProcessor ) )
+                break;
+        }
+    }
+
+    pthread_cleanup_pop( 1 );
+
+error:
+    pthread_exit( NULL );
+}
+
+/** Close the stream.
+ *
+ */
+static PaError CloseStream( PaStream* s )
+{
+    PaError result = paNoError;
+    PaOssStream *stream = (PaOssStream*)s;
+
+    assert( stream );
+
+    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
+    PaOssStream_Terminate( stream );
+
+    return result;
+}
+
+/** Start the stream.
+ *
+ * Aspect StreamState: After returning, the stream shall be in the Active state, implying that an eventual
+ * callback will be repeatedly called in a separate thread. If a separate thread is started this function
+ * will block untill it has started processing audio, otherwise audio processing is started directly.
+ */
+static PaError StartStream( PaStream *s )
+{
+    PaError result = paNoError;
+    PaOssStream *stream = (PaOssStream*)s;
+
+    stream->isActive = 1;
+    stream->isStopped = 0;
+    stream->lastPosPtr = 0;
+    stream->lastStreamBytes = 0;
+    stream->framesProcessed = 0;
+
+    /* only use the thread for callback streams */
+    if( stream->bufferProcessor.streamCallback )
+    {
+        PA_ENSURE( PaUtil_StartThreading( &stream->threading, &PaOSS_AudioThreadProc, stream ) );
+        sem_wait( &stream->semaphore );
+    }
+    else
+        PA_ENSURE( PaOssStream_Prepare( stream ) );
+
+error:
+    return result;
+}
+
+static PaError RealStop( PaOssStream *stream, int abort )
+{
+    PaError result = paNoError;
+
+    if( stream->callbackMode )
+    {
+        if( abort )
+            stream->callbackAbort = 1;
+        else
+            stream->callbackStop = 1;
+
+        PA_ENSURE( PaUtil_CancelThreading( &stream->threading, !abort, NULL ) );
+
+        stream->callbackStop = stream->callbackAbort = 0;
+    }
+    else
+        PA_ENSURE( PaOssStream_Stop( stream, abort ) );
+
+    stream->isStopped = 1;
+
+error:
+    return result;
+}
+
+/** Stop the stream.
+ *
+ * Aspect StreamState: This will cause the stream to transition to the Stopped state, playing all enqueued
+ * buffers.
+ */
+static PaError StopStream( PaStream *s )
+{
+    return RealStop( (PaOssStream *)s, 0 );
+}
+
+/** Abort the stream.
+ *
+ * Aspect StreamState: This will cause the stream to transition to the Stopped state, discarding all enqueued
+ * buffers. Note that the buffers are not currently correctly discarded, this is difficult without closing
+ * the OSS device.
+ */
+static PaError AbortStream( PaStream *s )
+{
+    return RealStop( (PaOssStream *)s, 1 );
+}
+
+/** Is the stream in the Stopped state.
+ *
+ */
+static PaError IsStreamStopped( PaStream *s )
+{
+    PaOssStream *stream = (PaOssStream*)s;
+
+    return (stream->isStopped);
+}
+
+/** Is the stream in the Active state.
+ *
+ */
+static PaError IsStreamActive( PaStream *s )
+{
+    PaOssStream *stream = (PaOssStream*)s;
+
+    return (stream->isActive);
+}
+
+static PaTime GetStreamTime( PaStream *s )
+{
+    PaOssStream *stream = (PaOssStream*)s;
+    count_info info;
+    int delta;
+
+    if( stream->playback ) {
+        if( ioctl( stream->playback->fd, SNDCTL_DSP_GETOPTR, &info) == 0 ) {
+            delta = ( info.bytes - stream->lastPosPtr ) & 0x000FFFFF;
+            return ( stream->lastStreamBytes + delta) / PaOssStreamComponent_FrameSize( stream->playback ) / stream->sampleRate;
+        }
+    }
+    else {
+        if (ioctl( stream->capture->fd, SNDCTL_DSP_GETIPTR, &info) == 0) {
+            delta = (info.bytes - stream->lastPosPtr) & 0x000FFFFF;
+            return ( stream->lastStreamBytes + delta) / PaOssStreamComponent_FrameSize( stream->capture ) / stream->sampleRate;
+        }
+    }
+
+    /* the ioctl failed, but we can still give a coarse estimate */
+
+    return stream->framesProcessed / stream->sampleRate;
+}
+
+
+static double GetStreamCpuLoad( PaStream* s )
+{
+    PaOssStream *stream = (PaOssStream*)s;
+
+    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );
+}
+
+
+/*
+    As separate stream interfaces are used for blocking and callback
+    streams, the following functions can be guaranteed to only be called
+    for blocking streams.
+*/
+
+
+static PaError ReadStream( PaStream* s,
+                           void *buffer,
+                           unsigned long frames )
+{
+    PaOssStream *stream = (PaOssStream*)s;
+    int bytesRequested, bytesRead;
+    unsigned long framesRequested;
+    void *userBuffer;
+
+    /* If user input is non-interleaved, PaUtil_CopyInput will manipulate the channel pointers,
+     * so we copy the user provided pointers */
+    if( stream->bufferProcessor.userInputIsInterleaved )
+        userBuffer = buffer;
+    else /* Copy channels into local array */
+    {
+        userBuffer = stream->capture->userBuffers;
+        memcpy( (void *)userBuffer, buffer, sizeof (void *) * stream->capture->userChannelCount );
+    }
+
+    while( frames )
+    {
+        framesRequested = PA_MIN( frames, stream->capture->hostFrames );
+
+	bytesRequested = framesRequested * PaOssStreamComponent_FrameSize( stream->capture );
+	bytesRead = read( stream->capture->fd, stream->capture->buffer, bytesRequested );
+	if ( bytesRequested != bytesRead )
+	    return paUnanticipatedHostError;
+
+	PaUtil_SetInputFrameCount( &stream->bufferProcessor, stream->capture->hostFrames );
+	PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor, 0, stream->capture->buffer, stream->capture->hostChannelCount );
+        PaUtil_CopyInput( &stream->bufferProcessor, &userBuffer, framesRequested );
+	frames -= framesRequested;
+    }
+    return paNoError;
+}
+
+
+static PaError WriteStream( PaStream* s,
+                            const void *buffer,
+                            unsigned long frames )
+{
+    PaOssStream *stream = (PaOssStream*)s;
+    int bytesRequested, bytesWritten;
+    unsigned long framesConverted;
+    const void *userBuffer;
+
+    /* If user output is non-interleaved, PaUtil_CopyOutput will manipulate the channel pointers,
+     * so we copy the user provided pointers */
+    if( stream->bufferProcessor.userOutputIsInterleaved )
+        userBuffer = buffer;
+    else /* Copy channels into local array */
+    {
+        userBuffer = stream->playback->userBuffers;
+        memcpy( (void *)userBuffer, buffer, sizeof (void *) * stream->playback->userChannelCount );
+    }
+
+    while( frames )
+    {
+	PaUtil_SetOutputFrameCount( &stream->bufferProcessor, stream->playback->hostFrames );
+	PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor, 0, stream->playback->buffer, stream->playback->hostChannelCount );
+
+	framesConverted = PaUtil_CopyOutput( &stream->bufferProcessor, &userBuffer, frames );
+	frames -= framesConverted;
+
+	bytesRequested = framesConverted * PaOssStreamComponent_FrameSize( stream->playback );
+	bytesWritten = write( stream->playback->fd, stream->playback->buffer, bytesRequested );
+
+	if ( bytesRequested != bytesWritten )
+	    return paUnanticipatedHostError;
+    }
+    return paNoError;
+}
+
+
+static signed long GetStreamReadAvailable( PaStream* s )
+{
+    PaOssStream *stream = (PaOssStream*)s;
+    audio_buf_info info;
+
+    if( ioctl( stream->capture->fd, SNDCTL_DSP_GETISPACE, &info ) < 0 )
+        return paUnanticipatedHostError;
+    return info.fragments * stream->capture->hostFrames;
+}
+
+
+/* TODO: Compute number of allocated bytes somewhere else, can we use ODELAY with capture */
+static signed long GetStreamWriteAvailable( PaStream* s )
+{
+    PaOssStream *stream = (PaOssStream*)s;
+    int delay = 0;
+
+    if( ioctl( stream->playback->fd, SNDCTL_DSP_GETODELAY, &delay ) < 0 )
+        return paUnanticipatedHostError;
+    
+    return (PaOssStreamComponent_BufferSize( stream->playback ) - delay) / PaOssStreamComponent_FrameSize( stream->playback );
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_unix_util.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_unix_util.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_unix_util.c	(revision 1163)
@@ -0,0 +1,173 @@
+/*
+ * $Id: pa_unix_util.c,v 1.1.2.7 2005/03/31 15:02:48 aknudsen Exp $
+ * Portable Audio I/O Library
+ * UNIX platform-specific support functions
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2000 Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#include <pthread.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/time.h>
+#include <assert.h>
+#include <string.h> /* For memset */
+
+#include "pa_util.h"
+#include "pa_unix_util.h"
+
+/*
+   Track memory allocations to avoid leaks.
+ */
+
+#if PA_TRACK_MEMORY
+static int numAllocations_ = 0;
+#endif
+
+
+void *PaUtil_AllocateMemory( long size )
+{
+    void *result = malloc( size );
+
+#if PA_TRACK_MEMORY
+    if( result != NULL ) numAllocations_ += 1;
+#endif
+    return result;
+}
+
+
+void PaUtil_FreeMemory( void *block )
+{
+    if( block != NULL )
+    {
+        free( block );
+#if PA_TRACK_MEMORY
+        numAllocations_ -= 1;
+#endif
+
+    }
+}
+
+
+int PaUtil_CountCurrentlyAllocatedBlocks( void )
+{
+#if PA_TRACK_MEMORY
+    return numAllocations_;
+#else
+    return 0;
+#endif
+}
+
+
+void Pa_Sleep( long msec )
+{
+    while( msec > 999 )     /* For OpenBSD and IRIX, argument */
+        {                   /* to usleep must be < 1000000.   */
+        usleep( 999000 );
+        msec -= 999;
+        }
+    usleep( msec * 1000 );
+}
+
+/*            *** NOT USED YET: ***
+static int usePerformanceCounter_;
+static double microsecondsPerTick_;
+*/
+
+void PaUtil_InitializeClock( void )
+{
+    /* TODO */
+}
+
+
+PaTime PaUtil_GetTime( void )
+{
+    struct timeval tv;
+    gettimeofday( &tv, NULL );
+    return (PaTime) tv.tv_usec / 1000000. + tv.tv_sec;
+}
+
+PaError PaUtil_InitializeThreading( PaUtilThreading *threading )
+{
+    (void) paUtilErr_;
+    return paNoError;
+}
+
+void PaUtil_TerminateThreading( PaUtilThreading *threading )
+{
+}
+
+PaError PaUtil_StartThreading( PaUtilThreading *threading, void *(*threadRoutine)(void *), void *data )
+{
+    pthread_create( &threading->callbackThread, NULL, threadRoutine, data );
+    return paNoError;
+}
+
+PaError PaUtil_CancelThreading( PaUtilThreading *threading, int wait, PaError *exitResult )
+{
+    PaError result = paNoError;
+    void *pret;
+
+    if( exitResult )
+        *exitResult = paNoError;
+
+    /* Only kill the thread if it isn't in the process of stopping (flushing adaptation buffers) */
+    if( !wait )
+        pthread_cancel( threading->callbackThread );   /* XXX: Safe to call this if the thread has exited on its own? */
+    pthread_join( threading->callbackThread, &pret );
+
+#ifdef PTHREAD_CANCELED
+    if( pret && PTHREAD_CANCELED != pret )
+#else
+    /* !wait means the thread may have been canceled */
+    if( pret && wait )
+#endif
+    {
+        if( exitResult )
+            *exitResult = *(PaError *) pret;
+        free( pret );
+    }
+
+    return result;
+}
+
+/*
+static void *CanaryFunc( void *userData )
+{
+    const unsigned intervalMsec = 1000;
+    PaUtilThreading *th = (PaUtilThreading *) userData;
+
+    while( 1 )
+    {
+        th->canaryTime = PaUtil_GetTime();
+
+        pthread_testcancel();
+        Pa_Sleep( intervalMsec );
+    }
+
+    pthread_exit( NULL );
+}
+*/
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_unix_util.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_unix_util.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_unix_util.h	(revision 1163)
@@ -0,0 +1,73 @@
+#ifndef PA_UNIX_UTIL_H
+#define PA_UNIX_UTIL_H
+
+#include "pa_cpuload.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+#define PA_MIN(x,y) ( (x) < (y) ? (x) : (y) )
+#define PA_MAX(x,y) ( (x) > (y) ? (x) : (y) )
+
+/* Utilize GCC branch prediction for error tests */
+#if defined __GNUC__ && __GNUC__ >= 3
+#define UNLIKELY(expr) __builtin_expect( (expr), 0 )
+#else
+#define UNLIKELY(expr) (expr)
+#endif
+
+#define STRINGIZE_HELPER(expr) #expr
+#define STRINGIZE(expr) STRINGIZE_HELPER(expr)
+
+#define PA_UNLESS(expr, code) \
+    do { \
+        if( UNLIKELY( (expr) == 0 ) ) \
+        { \
+            PaUtil_DebugPrint(( "Expression '" #expr "' failed in '" __FILE__ "', line: " STRINGIZE( __LINE__ ) "\n" )); \
+            result = (code); \
+            goto error; \
+        } \
+    } while (0);
+
+static PaError paUtilErr_;          /* Used with PA_ENSURE */
+
+/* Check PaError */
+#define PA_ENSURE(expr) \
+    do { \
+        if( UNLIKELY( (paUtilErr_ = (expr)) < paNoError ) ) \
+        { \
+            PaUtil_DebugPrint(( "Expression '" #expr "' failed in '" __FILE__ "', line: " STRINGIZE( __LINE__ ) "\n" )); \
+            result = paUtilErr_; \
+            goto error; \
+        } \
+    } while (0);
+
+typedef struct {
+    pthread_t callbackThread;
+} PaUtilThreading;
+
+PaError PaUtil_InitializeThreading( PaUtilThreading *threading );
+void PaUtil_TerminateThreading( PaUtilThreading *threading );
+PaError PaUtil_StartThreading( PaUtilThreading *threading, void *(*threadRoutine)(void *), void *data );
+PaError PaUtil_CancelThreading( PaUtilThreading *threading, int wait, PaError *exitResult );
+
+/* State accessed by utility functions */
+
+/*
+void PaUnix_SetRealtimeScheduling( int rt );
+
+void PaUtil_InitializeThreading( PaUtilThreading *th, PaUtilCpuLoadMeasurer *clm );
+
+PaError PaUtil_CreateCallbackThread( PaUtilThreading *th, void *(*CallbackThreadFunc)( void * ), PaStream *s );
+
+PaError PaUtil_KillCallbackThread( PaUtilThreading *th, PaError *exitResult );
+
+void PaUtil_CallbackUpdate( PaUtilThreading *th );
+*/
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_util.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_util.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_util.h	(revision 1163)
@@ -0,0 +1,167 @@
+#ifndef PA_UTIL_H
+#define PA_UTIL_H
+/*
+ * $Id: pa_util.h,v 1.1.2.12 2003/09/20 21:09:55 rossbencina Exp $
+ * Portable Audio I/O Library implementation utilities header
+ * common implementation utilities and interfaces
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+    @brief Prototypes for utility functions used by PortAudio implementations.
+
+    @todo Document and adhere to the alignment guarantees provided by
+    PaUtil_AllocateMemory().
+*/
+
+
+#include "portaudio.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+struct PaUtilHostApiRepresentation;
+
+
+/** Retrieve a specific host API representation. This function can be used
+ by implementations to retrieve a pointer to their representation in
+ host api specific extension functions which aren't passed a rep pointer
+ by pa_front.c.
+
+ @param hostApi A pointer to a host API represenation pointer. Apon success
+ this will receive the requested representation pointer.
+
+ @param type A valid host API type identifier.
+
+ @returns An error code. If the result is PaNoError then a pointer to the
+ requested host API representation will be stored in *hostApi. If the host API
+ specified by type is not found, this function returns paHostApiNotFound.
+*/
+PaError PaUtil_GetHostApiRepresentation( struct PaUtilHostApiRepresentation **hostApi,
+        PaHostApiTypeId type );
+
+
+/** Convert a PortAudio device index into a host API specific device index.
+ @param hostApiDevice Pointer to a device index, on success this will recieve the
+ converted device index value.
+ @param device The PortAudio device index to convert.
+ @param hostApi The host api which the index should be converted for.
+
+ @returns On success returns PaNoError and places the converted index in the
+ hostApiDevice parameter.
+*/
+PaError PaUtil_DeviceIndexToHostApiDeviceIndex(
+        PaDeviceIndex *hostApiDevice, PaDeviceIndex device,
+        struct PaUtilHostApiRepresentation *hostApi );
+
+
+/** Set the host error information returned by Pa_GetLastHostErrorInfo. This
+ function and the paUnanticipatedHostError error code should be used as a
+ last resort.  Implementors should use existing PA error codes where possible,
+ or nominate new ones. Note that at it is always better to use
+ PaUtil_SetLastHostErrorInfo() and paUnanticipatedHostError than to return an
+ ambiguous or inaccurate PaError code.
+
+ @param hostApiType  The host API which encountered the error (ie of the caller)
+
+ @param errorCode The error code returned by the native API function.
+
+ @param errorText A string describing the error. PaUtil_SetLastHostErrorInfo
+ makes a copy of the string, so it is not necessary for the pointer to remain
+ valid after the call to PaUtil_SetLastHostErrorInfo() returns.
+
+*/
+void PaUtil_SetLastHostErrorInfo( PaHostApiTypeId hostApiType, long errorCode,
+        const char *errorText );
+
+
+        
+/** PA_DEBUG() provides a simple debug message printing facility. The macro
+ passes it's argument to a printf-like function called PaUtil_DebugPrint()
+ which prints to stderr and always flushes the stream after printing.
+ Because preprocessor macros cannot directly accept variable length argument
+ lists, calls to the macro must include an additional set of parenthesis, eg:
+ PA_DEBUG(("errorno: %d", 1001 ));
+*/
+
+void PaUtil_DebugPrint( const char *format, ... );
+
+#if (0) /* set to 1 to print debug messages */
+#define PA_DEBUG(x) PaUtil_DebugPrint x ;
+#else
+#define PA_DEBUG(x)
+#endif
+
+
+/* the following functions are implemented in a platform platform specific
+ .c file
+*/
+
+/** Allocate size bytes, guaranteed to be aligned to a FIXME byte boundary */
+void *PaUtil_AllocateMemory( long size );
+
+
+/** Realease block if non-NULL. block may be NULL */
+void PaUtil_FreeMemory( void *block );
+
+
+/** Return the number of currently allocated blocks. This function can be
+ used for detecting memory leaks.
+
+ @note Allocations will only be tracked if PA_TRACK_MEMORY is #defined. If
+ it isn't, this function will always return 0.
+*/
+int PaUtil_CountCurrentlyAllocatedBlocks( void );
+
+
+/** Initialize the clock used by PaUtil_GetTime(). Call this before calling
+ PaUtil_GetTime.
+
+ @see PaUtil_GetTime
+*/
+void PaUtil_InitializeClock( void );
+
+
+/** Return the system time in seconds. Used to implement CPU load functions
+
+ @see PaUtil_InitializeClock
+*/
+double PaUtil_GetTime( void );
+
+
+/* void Pa_Sleep( long msec );  must also be implemented in per-platform .c file */
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PA_UTIL_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_ds.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_ds.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_ds.c	(revision 1163)
@@ -0,0 +1,1835 @@
+/*
+ * $Id: pa_win_ds.c,v 1.1.2.49 2004/05/16 04:08:55 rossbencina Exp $
+ * Portable Audio I/O Library DirectSound implementation
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+
+    @todo implement paInputOverflow callback status flag
+    
+    @todo implement paNeverDropInput.
+
+    @todo implement host api specific extension to set i/o buffer sizes in frames
+
+    @todo implement initialisation of PaDeviceInfo default*Latency fields (currently set to 0.)
+
+    @todo implement ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable
+
+    @todo audit handling of DirectSound result codes - in many cases we could convert a HRESULT into
+        a native portaudio error code. Standard DirectSound result codes are documented at msdn.
+
+    @todo implement IsFormatSupported
+
+    @todo check that CoInitialize() CoUninitialize() are always correctly
+        paired, even in error cases.
+
+    @todo call PaUtil_SetLastHostErrorInfo with a specific error string (currently just "DSound error").
+
+    @todo make sure all buffers have been played before stopping the stream
+        when the stream callback returns paComplete
+
+    old TODOs from phil, need to work out if these have been done:
+        O- fix "patest_stop.c"
+*/
+
+#include <stdio.h>
+#include <string.h> /* strlen() */
+
+#include "pa_util.h"
+#include "pa_allocation.h"
+#include "pa_hostapi.h"
+#include "pa_stream.h"
+#include "pa_cpuload.h"
+#include "pa_process.h"
+#include "dsound_wrapper.h"
+
+#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */
+#pragma comment( lib, "dsound.lib" )
+#pragma comment( lib, "winmm.lib" )
+#endif
+
+
+#include <pj/unicode.h>
+
+#define PRINT(x) /* { printf x; fflush(stdout); } */
+#define ERR_RPT(x) PRINT(x)
+#define DBUG(x)  /* PRINT(x) */
+#define DBUGX(x) /* PRINT(x) */
+
+#define PA_USE_HIGH_LATENCY   (0)
+#if PA_USE_HIGH_LATENCY
+#define PA_WIN_9X_LATENCY     (500)
+#define PA_WIN_NT_LATENCY     (600)
+#else
+#define PA_WIN_9X_LATENCY     (140)
+#define PA_WIN_NT_LATENCY     (280)
+#endif
+
+#define PA_WIN_WDM_LATENCY       (120)
+
+#define SECONDS_PER_MSEC      (0.001)
+#define MSEC_PER_SECOND       (1000)
+
+/* prototypes for functions declared in this file */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+PaError PaWinDs_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi );
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** s,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *streamCallback,
+                           void *userData );
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate );
+static PaError CloseStream( PaStream* stream );
+static PaError StartStream( PaStream *stream );
+static PaError StopStream( PaStream *stream );
+static PaError AbortStream( PaStream *stream );
+static PaError IsStreamStopped( PaStream *s );
+static PaError IsStreamActive( PaStream *stream );
+static PaTime GetStreamTime( PaStream *stream );
+static double GetStreamCpuLoad( PaStream* stream );
+static PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );
+static PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );
+static signed long GetStreamReadAvailable( PaStream* stream );
+static signed long GetStreamWriteAvailable( PaStream* stream );
+
+
+/* FIXME: should convert hr to a string */
+#define PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr ) \
+    PaUtil_SetLastHostErrorInfo( paDirectSound, hr, "DirectSound error" )
+
+/************************************************* DX Prototypes **********/
+static BOOL CALLBACK CollectGUIDsProc(LPGUID lpGUID,
+                                     LPCTSTR lpszDesc,
+                                     LPCTSTR lpszDrvName,
+                                     LPVOID lpContext );
+
+/************************************************************************************/
+/********************** Structures **************************************************/
+/************************************************************************************/
+/* PaWinDsHostApiRepresentation - host api datastructure specific to this implementation */
+
+typedef struct PaWinDsDeviceInfo
+{
+    GUID                             guid;
+    GUID                            *lpGUID;
+    double                           sampleRates[3];
+} PaWinDsDeviceInfo;
+
+typedef struct
+{
+    PaUtilHostApiRepresentation inheritedHostApiRep;
+    PaUtilStreamInterface    callbackStreamInterface;
+    PaUtilStreamInterface    blockingStreamInterface;
+
+    PaUtilAllocationGroup   *allocations;
+
+    /* implementation specific data goes here */
+    PaWinDsDeviceInfo       *winDsDeviceInfos;
+
+} PaWinDsHostApiRepresentation;
+
+/* PaWinDsStream - a stream data structure specifically for this implementation */
+
+typedef struct PaWinDsStream
+{
+    PaUtilStreamRepresentation streamRepresentation;
+    PaUtilCpuLoadMeasurer cpuLoadMeasurer;
+    PaUtilBufferProcessor bufferProcessor;
+
+/* DirectSound specific data. */
+    DSoundWrapper    directSoundWrapper;
+    MMRESULT         timerID;
+    BOOL             ifInsideCallback;  /* Test for reentrancy. */
+    int              framesPerDSBuffer;
+    double           framesWritten;
+    double           secondsPerHostByte; /* Used to optimize latency calculation for outTime */
+
+    PaStreamCallbackFlags callbackFlags;
+    
+/* FIXME - move all below to PaUtilStreamRepresentation */
+    volatile int     isStarted;
+    volatile int     isActive;
+    volatile int     stopProcessing; /* stop thread once existing buffers have been returned */
+    volatile int     abortProcessing; /* stop thread immediately */
+} PaWinDsStream;
+
+
+/************************************************************************************
+** Duplicate the input string using the allocations allocator.
+** A NULL string is converted to a zero length string.
+** If memory cannot be allocated, NULL is returned.
+**/
+static char *DuplicateDeviceNameString( PaUtilAllocationGroup *allocations, const char* src )
+{
+    char *result = 0;
+    
+    if( src != NULL )
+    {
+        size_t len = strlen(src);
+        result = (char*)PaUtil_GroupAllocateMemory( allocations, (long)(len + 1) );
+        if( result )
+            memcpy( (void *) result, src, len+1 );
+    }
+    else
+    {
+        result = (char*)PaUtil_GroupAllocateMemory( allocations, 1 );
+        if( result )
+            result[0] = '\0';
+    }
+
+    return result;
+}
+
+/************************************************************************************
+** DSDeviceNameAndGUID, DSDeviceNameAndGUIDVector used for collecting preliminary
+** information during device enumeration.
+*/
+typedef struct DSDeviceNameAndGUID{
+    char *name; // allocated from parent's allocations, never deleted by this structure
+    GUID guid;
+    LPGUID lpGUID;
+} DSDeviceNameAndGUID;
+
+typedef struct DSDeviceNameAndGUIDVector{
+    PaUtilAllocationGroup *allocations;
+    PaError enumerationError;
+
+    int count;
+    int free;
+    DSDeviceNameAndGUID *items; // Allocated using LocalAlloc()
+} DSDeviceNameAndGUIDVector;
+
+static PaError InitializeDSDeviceNameAndGUIDVector(
+        DSDeviceNameAndGUIDVector *guidVector, PaUtilAllocationGroup *allocations )
+{
+    PaError result = paNoError;
+
+    guidVector->allocations = allocations;
+    guidVector->enumerationError = paNoError;
+
+    guidVector->count = 0;
+    guidVector->free = 8;
+    guidVector->items = (DSDeviceNameAndGUID*)LocalAlloc( LMEM_FIXED, sizeof(DSDeviceNameAndGUID) * guidVector->free );
+    if( guidVector->items == NULL )
+        result = paInsufficientMemory;
+    
+    return result;
+}
+
+static PaError ExpandDSDeviceNameAndGUIDVector( DSDeviceNameAndGUIDVector *guidVector )
+{
+    PaError result = paNoError;
+    DSDeviceNameAndGUID *newItems;
+    int i;
+    
+    /* double size of vector */
+    int size = guidVector->count + guidVector->free;
+    guidVector->free += size;
+
+    newItems = (DSDeviceNameAndGUID*)LocalAlloc( LMEM_FIXED, sizeof(DSDeviceNameAndGUID) * size * 2 );
+    if( newItems == NULL )
+    {
+        result = paInsufficientMemory;
+    }
+    else
+    {
+        for( i=0; i < guidVector->count; ++i )
+        {
+            newItems[i].name = guidVector->items[i].name;
+            if( guidVector->items[i].lpGUID == NULL )
+            {
+                newItems[i].lpGUID = NULL;
+            }
+            else
+            {
+                newItems[i].lpGUID = &newItems[i].guid;
+                memcpy( &newItems[i].guid, guidVector->items[i].lpGUID, sizeof(GUID) );;
+            }
+        }
+
+        LocalFree( guidVector->items );
+        guidVector->items = newItems;
+    }                                
+
+    return result;
+}
+
+/*
+    it's safe to call DSDeviceNameAndGUIDVector multiple times
+*/
+static PaError TerminateDSDeviceNameAndGUIDVector( DSDeviceNameAndGUIDVector *guidVector )
+{
+    PaError result = paNoError;
+
+    if( guidVector->items != NULL )
+    {
+        if( LocalFree( guidVector->items ) != NULL )
+            result = paInsufficientMemory;              /** @todo this isn't the correct error to return from a deallocation failure */
+
+        guidVector->items = NULL;
+    }
+
+    return result;
+}
+
+/************************************************************************************
+** Collect preliminary device information during DirectSound enumeration 
+*/
+static BOOL CALLBACK CollectGUIDsProc(LPGUID lpGUID,
+                                     LPCTSTR lpszDesc,
+                                     LPCTSTR lpszDrvName,
+                                     LPVOID lpContext )
+{
+    DSDeviceNameAndGUIDVector *namesAndGUIDs = (DSDeviceNameAndGUIDVector*)lpContext;
+    PaError error;
+    PJ_DECL_ANSI_TEMP_BUF(atemp,128)
+
+    (void) lpszDrvName; /* unused variable */
+
+    if( namesAndGUIDs->free == 0 )
+    {
+        error = ExpandDSDeviceNameAndGUIDVector( namesAndGUIDs );
+        if( error != paNoError )
+        {
+            namesAndGUIDs->enumerationError = error;
+            return FALSE;
+        }
+    }
+    
+    /* Set GUID pointer, copy GUID to storage in DSDeviceNameAndGUIDVector. */
+    if( lpGUID == NULL )
+    {
+        namesAndGUIDs->items[namesAndGUIDs->count].lpGUID = NULL;
+    }
+    else
+    {
+        namesAndGUIDs->items[namesAndGUIDs->count].lpGUID =
+                &namesAndGUIDs->items[namesAndGUIDs->count].guid;
+      
+        memcpy( &namesAndGUIDs->items[namesAndGUIDs->count].guid, lpGUID, sizeof(GUID) );
+    }
+
+    namesAndGUIDs->items[namesAndGUIDs->count].name =
+            DuplicateDeviceNameString( namesAndGUIDs->allocations, 
+	    PJ_NATIVE_TO_STRING(lpszDesc,atemp,sizeof(atemp)));
+    if( namesAndGUIDs->items[namesAndGUIDs->count].name == NULL )
+    {
+        namesAndGUIDs->enumerationError = paInsufficientMemory;
+        return FALSE;
+    }
+
+    ++namesAndGUIDs->count;
+    --namesAndGUIDs->free;
+    
+    return TRUE;
+}
+
+
+#define PA_DEFAULTSAMPLERATESEARCHORDER_COUNT_  (13) /* must match array length below */
+static double defaultSampleRateSearchOrder_[] =
+    { 44100.0, 48000.0, 32000.0, 24000.0, 22050.0, 88200.0, 96000.0, 192000.0,
+        16000.0, 12000.0, 11025.0, 9600.0, 8000.0 };
+
+
+/************************************************************************************
+** Extract capabilities from an output device, and add it to the device info list
+** if successful. This function assumes that there is enough room in the
+** device info list to accomodate all entries.
+**
+** The device will not be added to the device list if any errors are encountered.
+*/
+static PaError AddOutputDeviceInfoFromDirectSound(
+        PaWinDsHostApiRepresentation *winDsHostApi, char *name, LPGUID lpGUID )
+{
+    PaUtilHostApiRepresentation  *hostApi = &winDsHostApi->inheritedHostApiRep;
+    PaDeviceInfo                 *deviceInfo = hostApi->deviceInfos[hostApi->info.deviceCount];
+    PaWinDsDeviceInfo            *winDsDeviceInfo = &winDsHostApi->winDsDeviceInfos[hostApi->info.deviceCount];
+    HRESULT                       hr;
+    LPDIRECTSOUND                 lpDirectSound;
+    DSCAPS                        caps;
+    int                           deviceOK = TRUE;
+    PaError                       result = paNoError;
+    int                           i;
+    
+    /* Copy GUID to the device info structure. Set pointer. */
+    if( lpGUID == NULL )
+    {
+        winDsDeviceInfo->lpGUID = NULL;
+    }
+    else
+    {
+        memcpy( &winDsDeviceInfo->guid, lpGUID, sizeof(GUID) );
+        winDsDeviceInfo->lpGUID = &winDsDeviceInfo->guid;
+    }
+
+    
+    /* Create a DirectSound object for the specified GUID
+        Note that using CoCreateInstance doesn't work on windows CE.
+    */
+    hr = dswDSoundEntryPoints.DirectSoundCreate( lpGUID, &lpDirectSound, NULL );
+
+    /** try using CoCreateInstance because DirectSoundCreate was hanging under
+        some circumstances - note this was probably related to the
+        #define BOOL short bug which has now been fixed
+        @todo delete this comment and the following code once we've ensured
+        there is no bug.
+    */
+    /*
+    hr = CoCreateInstance( &CLSID_DirectSound, NULL, CLSCTX_INPROC_SERVER,
+            &IID_IDirectSound, (void**)&lpDirectSound );
+
+    if( hr == S_OK )
+    {
+        hr = IDirectSound_Initialize( lpDirectSound, lpGUID );
+    }
+    */
+    
+    if( hr != DS_OK )
+    {
+        DBUG(("Cannot create DirectSound for %s. Result = 0x%x\n", name, hr ));
+        deviceOK = FALSE;
+    }
+    else
+    {
+        /* Query device characteristics. */
+        memset( &caps, 0, sizeof(caps) ); 
+        caps.dwSize = sizeof(caps);
+        hr = IDirectSound_GetCaps( lpDirectSound, &caps );
+        if( hr != DS_OK )
+        {
+            DBUG(("Cannot GetCaps() for DirectSound device %s. Result = 0x%x\n", name, hr ));
+            deviceOK = FALSE;
+        }
+        else
+        {
+
+#ifndef PA_NO_WMME
+            if( caps.dwFlags & DSCAPS_EMULDRIVER )
+            {
+                /* If WMME supported, then reject Emulated drivers because they are lousy. */
+                deviceOK = FALSE;
+            }
+#endif
+
+            if( deviceOK )
+            {
+                deviceInfo->maxInputChannels = 0;
+                /* Mono or stereo device? */
+                deviceInfo->maxOutputChannels = ( caps.dwFlags & DSCAPS_PRIMARYSTEREO ) ? 2 : 1;
+
+                deviceInfo->defaultLowInputLatency = 0.;    /** @todo IMPLEMENT ME */
+                deviceInfo->defaultLowOutputLatency = 0.;   /** @todo IMPLEMENT ME */
+                deviceInfo->defaultHighInputLatency = 0.;   /** @todo IMPLEMENT ME */
+                deviceInfo->defaultHighOutputLatency = 0.;  /** @todo IMPLEMENT ME */
+                
+                /* initialize defaultSampleRate */
+                
+                if( caps.dwFlags & DSCAPS_CONTINUOUSRATE )
+                {
+                    /* initialize to caps.dwMaxSecondarySampleRate incase none of the standard rates match */
+                    deviceInfo->defaultSampleRate = caps.dwMaxSecondarySampleRate;
+
+                    for( i = 0; i < PA_DEFAULTSAMPLERATESEARCHORDER_COUNT_; ++i )
+                    {
+                        if( defaultSampleRateSearchOrder_[i] >= caps.dwMinSecondarySampleRate
+                                && defaultSampleRateSearchOrder_[i] <= caps.dwMaxSecondarySampleRate ){
+
+                            deviceInfo->defaultSampleRate = defaultSampleRateSearchOrder_[i];
+                            break;
+                        }
+                    }
+                }
+                else if( caps.dwMinSecondarySampleRate == caps.dwMaxSecondarySampleRate )
+                {
+                    if( caps.dwMinSecondarySampleRate == 0 )
+                    {
+                        /*
+                        ** On my Thinkpad 380Z, DirectSoundV6 returns min-max=0 !!
+                        ** But it supports continuous sampling.
+                        ** So fake range of rates, and hope it really supports it.
+                        */
+                        deviceInfo->defaultSampleRate = 44100.0f;
+
+                        DBUG(("PA - Reported rates both zero. Setting to fake values for device #%d\n", sDeviceIndex ));
+                    }
+                    else
+                    {
+	                    deviceInfo->defaultSampleRate = caps.dwMaxSecondarySampleRate;
+                    }
+                }
+                else if( (caps.dwMinSecondarySampleRate < 1000.0) && (caps.dwMaxSecondarySampleRate > 50000.0) )
+                {
+                    /* The EWS88MT drivers lie, lie, lie. The say they only support two rates, 100 & 100000.
+                    ** But we know that they really support a range of rates!
+                    ** So when we see a ridiculous set of rates, assume it is a range.
+                    */
+                  deviceInfo->defaultSampleRate = 44100.0f;
+                  DBUG(("PA - Sample rate range used instead of two odd values for device #%d\n", sDeviceIndex ));
+                }
+                else deviceInfo->defaultSampleRate = caps.dwMaxSecondarySampleRate;
+
+
+                //printf( "min %d max %d\n", caps.dwMinSecondarySampleRate, caps.dwMaxSecondarySampleRate );
+                // dwFlags | DSCAPS_CONTINUOUSRATE 
+            }
+        }
+
+        IDirectSound_Release( lpDirectSound );
+    }
+
+    if( deviceOK )
+    {
+        deviceInfo->name = name;
+
+        if( lpGUID == NULL )
+            hostApi->info.defaultOutputDevice = hostApi->info.deviceCount;
+            
+        hostApi->info.deviceCount++;
+    }
+
+    return result;
+}
+
+
+/************************************************************************************
+** Extract capabilities from an input device, and add it to the device info list
+** if successful. This function assumes that there is enough room in the
+** device info list to accomodate all entries.
+**
+** The device will not be added to the device list if any errors are encountered.
+*/
+static PaError AddInputDeviceInfoFromDirectSoundCapture(
+        PaWinDsHostApiRepresentation *winDsHostApi, char *name, LPGUID lpGUID )
+{
+    PaUtilHostApiRepresentation  *hostApi = &winDsHostApi->inheritedHostApiRep;
+    PaDeviceInfo                 *deviceInfo = hostApi->deviceInfos[hostApi->info.deviceCount];
+    PaWinDsDeviceInfo            *winDsDeviceInfo = &winDsHostApi->winDsDeviceInfos[hostApi->info.deviceCount];
+    HRESULT                       hr;
+    LPDIRECTSOUNDCAPTURE          lpDirectSoundCapture;
+    DSCCAPS                       caps;
+    int                           deviceOK = TRUE;
+    PaError                       result = paNoError;
+    
+    /* Copy GUID to the device info structure. Set pointer. */
+    if( lpGUID == NULL )
+    {
+        winDsDeviceInfo->lpGUID = NULL;
+    }
+    else
+    {
+        winDsDeviceInfo->lpGUID = &winDsDeviceInfo->guid;
+        memcpy( &winDsDeviceInfo->guid, lpGUID, sizeof(GUID) );
+    }
+
+
+    hr = dswDSoundEntryPoints.DirectSoundCaptureCreate( lpGUID, &lpDirectSoundCapture, NULL );
+
+    /** try using CoCreateInstance because DirectSoundCreate was hanging under
+        some circumstances - note this was probably related to the
+        #define BOOL short bug which has now been fixed
+        @todo delete this comment and the following code once we've ensured
+        there is no bug.
+    */
+    /*
+    hr = CoCreateInstance( &CLSID_DirectSoundCapture, NULL, CLSCTX_INPROC_SERVER,
+            &IID_IDirectSoundCapture, (void**)&lpDirectSoundCapture );
+    */
+    if( hr != DS_OK )
+    {
+        DBUG(("Cannot create Capture for %s. Result = 0x%x\n", name, hr ));
+        deviceOK = FALSE;
+    }
+    else
+    {
+        /* Query device characteristics. */
+        memset( &caps, 0, sizeof(caps) );
+        caps.dwSize = sizeof(caps);
+        hr = IDirectSoundCapture_GetCaps( lpDirectSoundCapture, &caps );
+        if( hr != DS_OK )
+        {
+            DBUG(("Cannot GetCaps() for Capture device %s. Result = 0x%x\n", name, hr ));
+            deviceOK = FALSE;
+        }
+        else
+        {
+#ifndef PA_NO_WMME
+            if( caps.dwFlags & DSCAPS_EMULDRIVER )
+            {
+                /* If WMME supported, then reject Emulated drivers because they are lousy. */
+                deviceOK = FALSE;
+            }
+#endif
+
+            if( deviceOK )
+            {
+                deviceInfo->maxInputChannels = caps.dwChannels;
+                deviceInfo->maxOutputChannels = 0;
+
+                deviceInfo->defaultLowInputLatency = 0.;    /** @todo IMPLEMENT ME */
+                deviceInfo->defaultLowOutputLatency = 0.;   /** @todo IMPLEMENT ME */
+                deviceInfo->defaultHighInputLatency = 0.;   /** @todo IMPLEMENT ME */
+                deviceInfo->defaultHighOutputLatency = 0.;  /** @todo IMPLEMENT ME */
+
+/*  constants from a WINE patch by Francois Gouget, see:
+    http://www.winehq.com/hypermail/wine-patches/2003/01/0290.html
+
+    ---
+    Date: Fri, 14 May 2004 10:38:12 +0200 (CEST)
+    From: Francois Gouget <fgouget@ ... .fr>
+    To: Ross Bencina <rbencina@ ... .au>
+    Subject: Re: Permission to use wine 48/96 wave patch in BSD licensed library
+
+    [snip]
+
+    I give you permission to use the patch below under the BSD license.
+    http://www.winehq.com/hypermail/wine-patches/2003/01/0290.html
+
+    [snip]
+*/
+#ifndef WAVE_FORMAT_48M08
+#define WAVE_FORMAT_48M08      0x00001000    /* 48     kHz, Mono,   8-bit  */
+#define WAVE_FORMAT_48S08      0x00002000    /* 48     kHz, Stereo, 8-bit  */
+#define WAVE_FORMAT_48M16      0x00004000    /* 48     kHz, Mono,   16-bit */
+#define WAVE_FORMAT_48S16      0x00008000    /* 48     kHz, Stereo, 16-bit */
+#define WAVE_FORMAT_96M08      0x00010000    /* 96     kHz, Mono,   8-bit  */
+#define WAVE_FORMAT_96S08      0x00020000    /* 96     kHz, Stereo, 8-bit  */
+#define WAVE_FORMAT_96M16      0x00040000    /* 96     kHz, Mono,   16-bit */
+#define WAVE_FORMAT_96S16      0x00080000    /* 96     kHz, Stereo, 16-bit */
+#endif
+
+                /* defaultSampleRate */
+                if( caps.dwChannels == 2 )
+                {
+                    if( caps.dwFormats & WAVE_FORMAT_4S16 )
+                        deviceInfo->defaultSampleRate = 44100.0;
+                    else if( caps.dwFormats & WAVE_FORMAT_48S16 )
+                        deviceInfo->defaultSampleRate = 48000.0;
+                    else if( caps.dwFormats & WAVE_FORMAT_2S16 )
+                        deviceInfo->defaultSampleRate = 22050.0;
+                    else if( caps.dwFormats & WAVE_FORMAT_1S16 )
+                        deviceInfo->defaultSampleRate = 11025.0;
+                    else if( caps.dwFormats & WAVE_FORMAT_96S16 )
+                        deviceInfo->defaultSampleRate = 96000.0;
+                    else
+                        deviceInfo->defaultSampleRate = 0.;
+                }
+                else if( caps.dwChannels == 1 )
+                {
+                    if( caps.dwFormats & WAVE_FORMAT_4M16 )
+                        deviceInfo->defaultSampleRate = 44100.0;
+                    else if( caps.dwFormats & WAVE_FORMAT_48M16 )
+                        deviceInfo->defaultSampleRate = 48000.0;
+                    else if( caps.dwFormats & WAVE_FORMAT_2M16 )
+                        deviceInfo->defaultSampleRate = 22050.0;
+                    else if( caps.dwFormats & WAVE_FORMAT_1M16 )
+                        deviceInfo->defaultSampleRate = 11025.0;
+                    else if( caps.dwFormats & WAVE_FORMAT_96M16 )
+                        deviceInfo->defaultSampleRate = 96000.0;
+                    else
+                        deviceInfo->defaultSampleRate = 0.;
+                }
+                else deviceInfo->defaultSampleRate = 0.;
+            }
+        }
+        
+        IDirectSoundCapture_Release( lpDirectSoundCapture );
+    }
+
+    if( deviceOK )
+    {
+        deviceInfo->name = name;
+
+        if( lpGUID == NULL )
+            hostApi->info.defaultInputDevice = hostApi->info.deviceCount;
+
+        hostApi->info.deviceCount++;
+    }
+
+    return result;
+}
+
+
+/***********************************************************************************/
+PaError PaWinDs_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+{
+    PaError result = paNoError;
+    int i, deviceCount;
+    PaWinDsHostApiRepresentation *winDsHostApi;
+    DSDeviceNameAndGUIDVector inputNamesAndGUIDs, outputNamesAndGUIDs;
+    PaDeviceInfo *deviceInfoArray;
+
+    HRESULT hr = CoInitialize(NULL);        /** @todo: should uninitialize too */
+    if( FAILED(hr) ){
+        return paUnanticipatedHostError;
+    }            
+
+    /* initialise guid vectors so they can be safely deleted on error */
+    inputNamesAndGUIDs.items = NULL;
+    outputNamesAndGUIDs.items = NULL;
+
+    DSW_InitializeDSoundEntryPoints();
+
+    winDsHostApi = (PaWinDsHostApiRepresentation*)PaUtil_AllocateMemory( sizeof(PaWinDsHostApiRepresentation) );
+    if( !winDsHostApi )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    winDsHostApi->allocations = PaUtil_CreateAllocationGroup();
+    if( !winDsHostApi->allocations )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    *hostApi = &winDsHostApi->inheritedHostApiRep;
+    (*hostApi)->info.structVersion = 1;
+    (*hostApi)->info.type = paDirectSound;
+    (*hostApi)->info.name = "Windows DirectSound";
+    
+    (*hostApi)->info.deviceCount = 0;
+    (*hostApi)->info.defaultInputDevice = paNoDevice;
+    (*hostApi)->info.defaultOutputDevice = paNoDevice;
+
+    
+/* DSound - enumerate devices to count them and to gather their GUIDs */
+
+
+    result = InitializeDSDeviceNameAndGUIDVector( &inputNamesAndGUIDs, winDsHostApi->allocations );
+    if( result != paNoError )
+        goto error;
+
+    result = InitializeDSDeviceNameAndGUIDVector( &outputNamesAndGUIDs, winDsHostApi->allocations );
+    if( result != paNoError )
+        goto error;
+
+    dswDSoundEntryPoints.DirectSoundCaptureEnumerate( (LPDSENUMCALLBACK)CollectGUIDsProc, (void *)&inputNamesAndGUIDs );
+
+    dswDSoundEntryPoints.DirectSoundEnumerate( (LPDSENUMCALLBACK)CollectGUIDsProc, (void *)&outputNamesAndGUIDs );
+
+    if( inputNamesAndGUIDs.enumerationError != paNoError )
+    {
+        result = inputNamesAndGUIDs.enumerationError;
+        goto error;
+    }
+
+    if( outputNamesAndGUIDs.enumerationError != paNoError )
+    {
+        result = outputNamesAndGUIDs.enumerationError;
+        goto error;
+    }
+
+    deviceCount = inputNamesAndGUIDs.count + outputNamesAndGUIDs.count;
+
+    if( deviceCount > 0 )
+    {
+        /* allocate array for pointers to PaDeviceInfo structs */
+        (*hostApi)->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(
+                winDsHostApi->allocations, sizeof(PaDeviceInfo*) * deviceCount );
+        if( !(*hostApi)->deviceInfos )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        /* allocate all PaDeviceInfo structs in a contiguous block */
+        deviceInfoArray = (PaDeviceInfo*)PaUtil_GroupAllocateMemory(
+                winDsHostApi->allocations, sizeof(PaDeviceInfo) * deviceCount );
+        if( !deviceInfoArray )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        /* allocate all DSound specific info structs in a contiguous block */
+        winDsHostApi->winDsDeviceInfos = (PaWinDsDeviceInfo*)PaUtil_GroupAllocateMemory(
+                winDsHostApi->allocations, sizeof(PaWinDsDeviceInfo) * deviceCount );
+        if( !winDsHostApi->winDsDeviceInfos )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        for( i=0; i < deviceCount; ++i )
+        {
+            PaDeviceInfo *deviceInfo = &deviceInfoArray[i];
+            deviceInfo->structVersion = 2;
+            deviceInfo->hostApi = hostApiIndex;
+            deviceInfo->name = 0;
+            (*hostApi)->deviceInfos[i] = deviceInfo;
+        }
+
+        for( i=0; i< inputNamesAndGUIDs.count; ++i )
+        {
+            result = AddInputDeviceInfoFromDirectSoundCapture( winDsHostApi,
+                    inputNamesAndGUIDs.items[i].name,
+                    inputNamesAndGUIDs.items[i].lpGUID );
+            if( result != paNoError )
+                goto error;
+        }
+
+        for( i=0; i< outputNamesAndGUIDs.count; ++i )
+        {
+            result = AddOutputDeviceInfoFromDirectSound( winDsHostApi,
+                    outputNamesAndGUIDs.items[i].name,
+                    outputNamesAndGUIDs.items[i].lpGUID );
+            if( result != paNoError )
+                goto error;
+        }
+    }    
+
+    result = TerminateDSDeviceNameAndGUIDVector( &inputNamesAndGUIDs );
+    if( result != paNoError )
+        goto error;
+
+    result = TerminateDSDeviceNameAndGUIDVector( &outputNamesAndGUIDs );
+    if( result != paNoError )
+        goto error;
+
+    
+    (*hostApi)->Terminate = Terminate;
+    (*hostApi)->OpenStream = OpenStream;
+    (*hostApi)->IsFormatSupported = IsFormatSupported;
+
+    PaUtil_InitializeStreamInterface( &winDsHostApi->callbackStreamInterface, CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, GetStreamCpuLoad,
+                                      PaUtil_DummyRead, PaUtil_DummyWrite,
+                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );
+
+    PaUtil_InitializeStreamInterface( &winDsHostApi->blockingStreamInterface, CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, PaUtil_DummyGetCpuLoad,
+                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );
+
+    return result;
+
+error:
+    if( winDsHostApi )
+    {
+        if( winDsHostApi->allocations )
+        {
+            PaUtil_FreeAllAllocations( winDsHostApi->allocations );
+            PaUtil_DestroyAllocationGroup( winDsHostApi->allocations );
+        }
+                
+        PaUtil_FreeMemory( winDsHostApi );
+    }
+
+    TerminateDSDeviceNameAndGUIDVector( &inputNamesAndGUIDs );
+    TerminateDSDeviceNameAndGUIDVector( &outputNamesAndGUIDs );
+
+    return result;
+}
+
+
+/***********************************************************************************/
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi )
+{
+    PaWinDsHostApiRepresentation *winDsHostApi = (PaWinDsHostApiRepresentation*)hostApi;
+
+    /*
+        IMPLEMENT ME:
+            - clean up any resources not handled by the allocation group
+    */
+
+    if( winDsHostApi->allocations )
+    {
+        PaUtil_FreeAllAllocations( winDsHostApi->allocations );
+        PaUtil_DestroyAllocationGroup( winDsHostApi->allocations );
+    }
+
+    PaUtil_FreeMemory( winDsHostApi );
+
+    DSW_TerminateDSoundEntryPoints();
+
+    CoUninitialize();
+}
+
+
+/* Set minimal latency based on whether NT or Win95.
+ * NT has higher latency.
+ */
+static int PaWinDS_GetMinSystemLatency( void )
+{
+    int minLatencyMsec;
+    /* Set minimal latency based on whether NT or other OS.
+     * NT has higher latency.
+     */
+    OSVERSIONINFO osvi;
+	osvi.dwOSVersionInfoSize = sizeof( osvi );
+	GetVersionEx( &osvi );
+    DBUG(("PA - PlatformId = 0x%x\n", osvi.dwPlatformId ));
+    DBUG(("PA - MajorVersion = 0x%x\n", osvi.dwMajorVersion ));
+    DBUG(("PA - MinorVersion = 0x%x\n", osvi.dwMinorVersion ));
+    /* Check for NT */
+	if( (osvi.dwMajorVersion == 4) && (osvi.dwPlatformId == 2) )
+	{
+		minLatencyMsec = PA_WIN_NT_LATENCY;
+	}
+	else if(osvi.dwMajorVersion >= 5)
+	{
+		minLatencyMsec = PA_WIN_WDM_LATENCY;
+	}
+	else
+	{
+		minLatencyMsec = PA_WIN_9X_LATENCY;
+	}
+    return minLatencyMsec;
+}
+
+/***********************************************************************************/
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate )
+{
+    int inputChannelCount, outputChannelCount;
+    PaSampleFormat inputSampleFormat, outputSampleFormat;
+    
+    if( inputParameters )
+    {
+        inputChannelCount = inputParameters->channelCount;
+        inputSampleFormat = inputParameters->sampleFormat;
+
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+
+        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )
+            return paInvalidDevice;
+
+        /* check that input device can support inputChannelCount */
+        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )
+            return paInvalidChannelCount;
+
+        /* validate inputStreamInfo */
+        if( inputParameters->hostApiSpecificStreamInfo )
+            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
+    }
+    else
+    {
+        inputChannelCount = 0;
+    }
+
+    if( outputParameters )
+    {
+        outputChannelCount = outputParameters->channelCount;
+        outputSampleFormat = outputParameters->sampleFormat;
+        
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+
+        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )
+            return paInvalidDevice;
+
+        /* check that output device can support inputChannelCount */
+        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )
+            return paInvalidChannelCount;
+
+        /* validate outputStreamInfo */
+        if( outputParameters->hostApiSpecificStreamInfo )
+            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
+    }
+    else
+    {
+        outputChannelCount = 0;
+    }
+    
+    /*
+        IMPLEMENT ME:
+
+            - if a full duplex stream is requested, check that the combination
+                of input and output parameters is supported if necessary
+
+            - check that the device supports sampleRate
+
+        Because the buffer adapter handles conversion between all standard
+        sample formats, the following checks are only required if paCustomFormat
+        is implemented, or under some other unusual conditions.
+
+            - check that input device can support inputSampleFormat, or that
+                we have the capability to convert from outputSampleFormat to
+                a native format
+
+            - check that output device can support outputSampleFormat, or that
+                we have the capability to convert from outputSampleFormat to
+                a native format
+    */
+
+    return paFormatIsSupported;
+}
+
+
+/*************************************************************************
+** Determine minimum number of buffers required for this host based
+** on minimum latency. Latency can be optionally set by user by setting
+** an environment variable. For example, to set latency to 200 msec, put:
+**
+**    set PA_MIN_LATENCY_MSEC=200
+**
+** in the AUTOEXEC.BAT file and reboot.
+** If the environment variable is not set, then the latency will be determined
+** based on the OS. Windows NT has higher latency than Win95.
+*/
+#define PA_LATENCY_ENV_NAME  ("PA_MIN_LATENCY_MSEC")
+#define PA_ENV_BUF_SIZE  (32)
+
+static int PaWinDs_GetMinLatencyFrames( double sampleRate )
+{
+    char      envbuf[PA_ENV_BUF_SIZE];
+    DWORD     hresult;
+    int       minLatencyMsec = 0;
+
+    /* Let user determine minimal latency by setting environment variable. */
+#ifdef UNDER_CE
+    hresult = 0;
+#else
+    hresult = GetEnvironmentVariable( PA_LATENCY_ENV_NAME, envbuf, PA_ENV_BUF_SIZE );
+#endif
+    if( (hresult > 0) && (hresult < PA_ENV_BUF_SIZE) )
+    {
+        minLatencyMsec = atoi( envbuf );
+    }
+    else
+    {
+        minLatencyMsec = PaWinDS_GetMinSystemLatency();
+#if PA_USE_HIGH_LATENCY
+        PRINT(("PA - Minimum Latency set to %d msec!\n", minLatencyMsec ));
+#endif
+
+    }
+
+    return (int) (minLatencyMsec * sampleRate * SECONDS_PER_MSEC);
+}
+
+#ifndef NDEBUG
+#define EZ  = 0
+#else
+#define EZ
+#endif
+
+/***********************************************************************************/
+/* see pa_hostapi.h for a list of validity guarantees made about OpenStream parameters */
+
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** s,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *streamCallback,
+                           void *userData )
+{
+    PaError result = paNoError;
+    PaWinDsHostApiRepresentation *winDsHostApi = (PaWinDsHostApiRepresentation*)hostApi;
+    PaWinDsStream *stream = 0;
+    int inputChannelCount, outputChannelCount;
+    PaSampleFormat inputSampleFormat EZ, outputSampleFormat EZ;
+    PaSampleFormat hostInputSampleFormat EZ, hostOutputSampleFormat EZ;
+    unsigned long suggestedInputLatencyFrames, suggestedOutputLatencyFrames;
+
+    if( inputParameters )
+    {
+        inputChannelCount = inputParameters->channelCount;
+        inputSampleFormat = inputParameters->sampleFormat;
+        suggestedInputLatencyFrames = (unsigned long)(inputParameters->suggestedLatency * sampleRate);
+
+        /* IDEA: the following 3 checks could be performed by default by pa_front
+            unless some flag indicated otherwise */
+            
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification )
+            return paInvalidDevice;
+
+        /* check that input device can support inputChannelCount */
+        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels )
+            return paInvalidChannelCount;
+            
+        /* validate hostApiSpecificStreamInfo */
+        if( inputParameters->hostApiSpecificStreamInfo )
+            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */
+    }
+    else
+    {
+        inputChannelCount = 0;
+        suggestedInputLatencyFrames = 0;
+    }
+
+
+    if( outputParameters )
+    {
+        outputChannelCount = outputParameters->channelCount;
+        outputSampleFormat = outputParameters->sampleFormat;
+        suggestedOutputLatencyFrames = (unsigned long)(outputParameters->suggestedLatency * sampleRate);
+
+        /* unless alternate device specification is supported, reject the use of
+            paUseHostApiSpecificDeviceSpecification */
+        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification )
+            return paInvalidDevice;
+
+        /* check that output device can support inputChannelCount */
+        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels )
+            return paInvalidChannelCount;
+
+        /* validate hostApiSpecificStreamInfo */
+        if( outputParameters->hostApiSpecificStreamInfo )
+            return paIncompatibleHostApiSpecificStreamInfo; /* this implementation doesn't use custom stream info */            
+    }
+    else
+    {
+        outputChannelCount = 0;
+        suggestedOutputLatencyFrames = 0;
+    }
+
+
+    /*
+        IMPLEMENT ME:
+
+        ( the following two checks are taken care of by PaUtil_InitializeBufferProcessor() )
+
+            - check that input device can support inputSampleFormat, or that
+                we have the capability to convert from outputSampleFormat to
+                a native format
+
+            - check that output device can support outputSampleFormat, or that
+                we have the capability to convert from outputSampleFormat to
+                a native format
+
+            - if a full duplex stream is requested, check that the combination
+                of input and output parameters is supported
+
+            - check that the device supports sampleRate
+
+            - alter sampleRate to a close allowable rate if possible / necessary
+
+            - validate suggestedInputLatency and suggestedOutputLatency parameters,
+                use default values where necessary
+    */
+
+
+    /* validate platform specific flags */
+    if( (streamFlags & paPlatformSpecificFlags) != 0 )
+        return paInvalidFlag; /* unexpected platform specific flag */
+
+
+    stream = (PaWinDsStream*)PaUtil_AllocateMemory( sizeof(PaWinDsStream) );
+    if( !stream )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    if( streamCallback )
+    {
+        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
+                                               &winDsHostApi->callbackStreamInterface, streamCallback, userData );
+    }
+    else
+    {
+        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
+                                               &winDsHostApi->blockingStreamInterface, streamCallback, userData );
+    }
+    
+    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );
+
+
+    if( inputParameters )
+    {
+        /* IMPLEMENT ME - establish which  host formats are available */
+        hostInputSampleFormat =
+            PaUtil_SelectClosestAvailableFormat( paInt16 /* native formats */, inputParameters->sampleFormat );
+    }
+
+    if( outputParameters )
+    {
+        /* IMPLEMENT ME - establish which  host formats are available */
+        hostOutputSampleFormat =
+            PaUtil_SelectClosestAvailableFormat( paInt16 /* native formats */, outputParameters->sampleFormat );
+    }
+    
+    result =  PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,
+                    inputChannelCount, inputSampleFormat, hostInputSampleFormat,
+                    outputChannelCount, outputSampleFormat, hostOutputSampleFormat,
+                    sampleRate, streamFlags, framesPerBuffer,
+                    framesPerBuffer, /* ignored in paUtilVariableHostBufferSizePartialUsageAllowed mode. */
+                /* This next mode is required because DS can split the host buffer when it wraps around. */
+                    paUtilVariableHostBufferSizePartialUsageAllowed,
+                    streamCallback, userData );
+    if( result != paNoError )
+        goto error;
+
+
+    stream->streamRepresentation.streamInfo.inputLatency =
+            PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor);   /* FIXME: not initialised anywhere else */
+    stream->streamRepresentation.streamInfo.outputLatency =
+            PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor);    /* FIXME: not initialised anywhere else */
+    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
+
+    
+/* DirectSound specific initialization */
+    {
+        HRESULT          hr;
+        int              bytesPerDirectSoundBuffer;
+        DSoundWrapper   *dsw;
+        int              userLatencyFrames;
+        int              minLatencyFrames;
+
+        stream->timerID = 0;
+        dsw = &stream->directSoundWrapper;
+        DSW_Init( dsw );
+
+    /* Get system minimum latency. */
+        minLatencyFrames = PaWinDs_GetMinLatencyFrames( sampleRate );
+
+    /* Let user override latency by passing latency parameter. */
+        userLatencyFrames = (suggestedInputLatencyFrames > suggestedOutputLatencyFrames)
+                    ? suggestedInputLatencyFrames
+                    : suggestedOutputLatencyFrames;
+        if( userLatencyFrames > 0 ) minLatencyFrames = userLatencyFrames;
+
+    /* Calculate stream->framesPerDSBuffer depending on framesPerBuffer */
+        if( framesPerBuffer == paFramesPerBufferUnspecified )
+        {
+        /* App support variable framesPerBuffer */
+            stream->framesPerDSBuffer = minLatencyFrames;
+
+            stream->streamRepresentation.streamInfo.outputLatency = (double)(minLatencyFrames - 1) / sampleRate;
+        }
+        else
+        {
+        /* Round up to number of buffers needed to guarantee that latency. */
+            int numUserBuffers = (minLatencyFrames + framesPerBuffer - 1) / framesPerBuffer;
+            if( numUserBuffers < 1 ) numUserBuffers = 1;
+            numUserBuffers += 1; /* So we have latency worth of buffers ahead of current buffer. */
+            stream->framesPerDSBuffer = framesPerBuffer * numUserBuffers;
+
+            stream->streamRepresentation.streamInfo.outputLatency = (double)(framesPerBuffer * (numUserBuffers-1)) / sampleRate;
+        }
+
+        {
+            /** @todo REVIEW: this calculation seems incorrect to me - rossb. */
+            int msecLatency = (int) ((stream->framesPerDSBuffer * MSEC_PER_SECOND) / sampleRate);
+            PRINT(("PortAudio on DirectSound - Latency = %d frames, %d msec\n", stream->framesPerDSBuffer, msecLatency ));
+        }
+
+
+        /* ------------------ OUTPUT */
+        if( outputParameters )
+        {
+            /*
+            PaDeviceInfo *deviceInfo = hostApi->deviceInfos[ outputParameters->device ];
+            DBUG(("PaHost_OpenStream: deviceID = 0x%x\n", outputParameters->device));
+            */
+            
+            bytesPerDirectSoundBuffer = stream->framesPerDSBuffer * outputParameters->channelCount * sizeof(short);
+            if( bytesPerDirectSoundBuffer < DSBSIZE_MIN )
+            {
+                result = paBufferTooSmall;
+                goto error;
+            }
+            else if( bytesPerDirectSoundBuffer > DSBSIZE_MAX )
+            {
+                result = paBufferTooBig;
+                goto error;
+            }
+
+
+            hr = dswDSoundEntryPoints.DirectSoundCreate( winDsHostApi->winDsDeviceInfos[outputParameters->device].lpGUID,
+                &dsw->dsw_pDirectSound,   NULL );
+            if( hr != DS_OK )
+            {
+                ERR_RPT(("PortAudio: DirectSoundCreate() failed!\n"));
+                result = paUnanticipatedHostError;
+                PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr );
+                goto error;
+            }
+            hr = DSW_InitOutputBuffer( dsw,
+                                       (unsigned long) (sampleRate + 0.5),
+                                       (WORD)outputParameters->channelCount, bytesPerDirectSoundBuffer );
+            DBUG(("DSW_InitOutputBuffer() returns %x\n", hr));
+            if( hr != DS_OK )
+            {
+                result = paUnanticipatedHostError;
+                PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr );
+                goto error;
+            }
+            /* Calculate value used in latency calculation to avoid real-time divides. */
+            stream->secondsPerHostByte = 1.0 /
+                (stream->bufferProcessor.bytesPerHostOutputSample *
+                outputChannelCount * sampleRate);
+        }
+
+        /* ------------------ INPUT */
+        if( inputParameters )
+        {
+            /*
+            PaDeviceInfo *deviceInfo = hostApi->deviceInfos[ inputParameters->device ];
+            DBUG(("PaHost_OpenStream: deviceID = 0x%x\n", inputParameters->device));
+            */
+            
+            bytesPerDirectSoundBuffer = stream->framesPerDSBuffer * inputParameters->channelCount * sizeof(short);
+            if( bytesPerDirectSoundBuffer < DSBSIZE_MIN )
+            {
+                result = paBufferTooSmall;
+                goto error;
+            }
+            else if( bytesPerDirectSoundBuffer > DSBSIZE_MAX )
+            {
+                result = paBufferTooBig;
+                goto error;
+            }
+
+            hr = dswDSoundEntryPoints.DirectSoundCaptureCreate( winDsHostApi->winDsDeviceInfos[inputParameters->device].lpGUID,
+                &dsw->dsw_pDirectSoundCapture,   NULL );
+            if( hr != DS_OK )
+            {
+                ERR_RPT(("PortAudio: DirectSoundCaptureCreate() failed!\n"));
+                result = paUnanticipatedHostError;
+                PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr );
+                goto error;
+            }
+            hr = DSW_InitInputBuffer( dsw,
+                                      (unsigned long) (sampleRate + 0.5),
+                                      (WORD)inputParameters->channelCount, bytesPerDirectSoundBuffer );
+            DBUG(("DSW_InitInputBuffer() returns %x\n", hr));
+            if( hr != DS_OK )
+            {
+                ERR_RPT(("PortAudio: DSW_InitInputBuffer() returns %x\n", hr));
+                result = paUnanticipatedHostError;
+                PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr );
+                goto error;
+            }
+        }
+
+    }
+
+    *s = (PaStream*)stream;
+
+    return result;
+
+error:
+    if( stream )
+        PaUtil_FreeMemory( stream );
+
+    return result;
+}
+
+
+/***********************************************************************************/
+static PaError Pa_TimeSlice( PaWinDsStream *stream )
+{
+    PaError           result = 0;   /* FIXME: this should be declared int and this function should also return that type (same as stream callback return type)*/
+    DSoundWrapper    *dsw;
+    long              numFrames = 0;
+    long              bytesEmpty = 0;
+    long              bytesFilled = 0;
+    long              bytesToXfer = 0;
+    long              framesToXfer = 0;
+    long              numInFramesReady = 0;
+    long              numOutFramesReady = 0;
+    long              bytesProcessed;
+    HRESULT           hresult;
+    double            outputLatency = 0;
+    PaStreamCallbackTimeInfo timeInfo = {0,0,0}; /** @todo implement inputBufferAdcTime */
+    
+/* Input */
+    LPBYTE            lpInBuf1 = NULL;
+    LPBYTE            lpInBuf2 = NULL;
+    DWORD             dwInSize1 = 0;
+    DWORD             dwInSize2 = 0;
+/* Output */
+    LPBYTE            lpOutBuf1 = NULL;
+    LPBYTE            lpOutBuf2 = NULL;
+    DWORD             dwOutSize1 = 0;
+    DWORD             dwOutSize2 = 0;
+
+    dsw = &stream->directSoundWrapper;
+
+    /* How much input data is available? */
+    if( stream->bufferProcessor.inputChannelCount > 0 )
+    {
+        DSW_QueryInputFilled( dsw, &bytesFilled );
+        framesToXfer = numInFramesReady = bytesFilled / dsw->dsw_BytesPerInputFrame;
+        outputLatency = ((double)bytesFilled) * stream->secondsPerHostByte;
+
+        /** @todo Check for overflow */
+    }
+
+    /* How much output room is available? */
+    if( stream->bufferProcessor.outputChannelCount > 0 )
+    {
+        UINT previousUnderflowCount = dsw->dsw_OutputUnderflows;
+        DSW_QueryOutputSpace( dsw, &bytesEmpty );
+        framesToXfer = numOutFramesReady = bytesEmpty / dsw->dsw_BytesPerOutputFrame;
+
+        /* Check for underflow */
+        if( dsw->dsw_OutputUnderflows != previousUnderflowCount )
+            stream->callbackFlags |= paOutputUnderflow;
+    }
+
+    if( (numInFramesReady > 0) && (numOutFramesReady > 0) )
+    {
+        framesToXfer = (numOutFramesReady < numInFramesReady) ? numOutFramesReady : numInFramesReady;
+    }
+
+    if( framesToXfer > 0 )
+    {
+
+        PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
+
+    /* The outputBufferDacTime parameter should indicates the time at which
+        the first sample of the output buffer is heard at the DACs. */
+        timeInfo.currentTime = PaUtil_GetTime();
+        timeInfo.outputBufferDacTime = timeInfo.currentTime + outputLatency;
+
+
+        PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, stream->callbackFlags );
+        stream->callbackFlags = 0;
+        
+    /* Input */
+        if( stream->bufferProcessor.inputChannelCount > 0 )
+        {
+            bytesToXfer = framesToXfer * dsw->dsw_BytesPerInputFrame;
+            hresult = IDirectSoundCaptureBuffer_Lock ( dsw->dsw_InputBuffer,
+                dsw->dsw_ReadOffset, bytesToXfer,
+                (void **) &lpInBuf1, &dwInSize1,
+                (void **) &lpInBuf2, &dwInSize2, 0);
+            if (hresult != DS_OK)
+            {
+                ERR_RPT(("DirectSound IDirectSoundCaptureBuffer_Lock failed, hresult = 0x%x\n",hresult));
+                result = paUnanticipatedHostError;
+                PA_DS_SET_LAST_DIRECTSOUND_ERROR( hresult );
+                goto error2;
+            }
+
+            numFrames = dwInSize1 / dsw->dsw_BytesPerInputFrame;
+            PaUtil_SetInputFrameCount( &stream->bufferProcessor, numFrames );
+            PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor, 0, lpInBuf1, 0 );
+        /* Is input split into two regions. */
+            if( dwInSize2 > 0 )
+            {
+                numFrames = dwInSize2 / dsw->dsw_BytesPerInputFrame;
+                PaUtil_Set2ndInputFrameCount( &stream->bufferProcessor, numFrames );
+                PaUtil_Set2ndInterleavedInputChannels( &stream->bufferProcessor, 0, lpInBuf2, 0 );
+            }
+        }
+
+    /* Output */
+        if( stream->bufferProcessor.outputChannelCount > 0 )
+        {
+            bytesToXfer = framesToXfer * dsw->dsw_BytesPerOutputFrame;
+            hresult = IDirectSoundBuffer_Lock ( dsw->dsw_OutputBuffer,
+                dsw->dsw_WriteOffset, bytesToXfer,
+                (void **) &lpOutBuf1, &dwOutSize1,
+                (void **) &lpOutBuf2, &dwOutSize2, 0);
+            if (hresult != DS_OK)
+            {
+                ERR_RPT(("DirectSound IDirectSoundBuffer_Lock failed, hresult = 0x%x\n",hresult));
+                result = paUnanticipatedHostError;
+                PA_DS_SET_LAST_DIRECTSOUND_ERROR( hresult );
+                goto error1;
+            }
+
+            numFrames = dwOutSize1 / dsw->dsw_BytesPerOutputFrame;
+            PaUtil_SetOutputFrameCount( &stream->bufferProcessor, numFrames );
+            PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor, 0, lpOutBuf1, 0 );
+
+        /* Is output split into two regions. */
+            if( dwOutSize2 > 0 )
+            {
+                numFrames = dwOutSize2 / dsw->dsw_BytesPerOutputFrame;
+                PaUtil_Set2ndOutputFrameCount( &stream->bufferProcessor, numFrames );
+                PaUtil_Set2ndInterleavedOutputChannels( &stream->bufferProcessor, 0, lpOutBuf2, 0 );
+            }
+        }
+
+        result = paContinue;
+        numFrames = PaUtil_EndBufferProcessing( &stream->bufferProcessor, &result );
+        stream->framesWritten += numFrames;
+        
+        if( stream->bufferProcessor.outputChannelCount > 0 )
+        {
+        /* FIXME: an underflow could happen here */
+
+        /* Update our buffer offset and unlock sound buffer */
+            bytesProcessed = numFrames * dsw->dsw_BytesPerOutputFrame;
+            dsw->dsw_WriteOffset = (dsw->dsw_WriteOffset + bytesProcessed) % dsw->dsw_OutputSize;
+            IDirectSoundBuffer_Unlock( dsw->dsw_OutputBuffer, lpOutBuf1, dwOutSize1, lpOutBuf2, dwOutSize2);
+            dsw->dsw_FramesWritten += numFrames;
+        }
+
+error1:
+        if( stream->bufferProcessor.inputChannelCount > 0 )
+        {
+        /* FIXME: an overflow could happen here */
+
+        /* Update our buffer offset and unlock sound buffer */
+            bytesProcessed = numFrames * dsw->dsw_BytesPerInputFrame;
+            dsw->dsw_ReadOffset = (dsw->dsw_ReadOffset + bytesProcessed) % dsw->dsw_InputSize;
+            IDirectSoundCaptureBuffer_Unlock( dsw->dsw_InputBuffer, lpInBuf1, dwInSize1, lpInBuf2, dwInSize2);
+        }
+error2:
+
+        PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, numFrames );
+
+    }
+    
+    return result;
+}
+/*******************************************************************/
+static void CALLBACK Pa_TimerCallback(UINT uID, UINT uMsg, DWORD dwUser, DWORD dw1, DWORD dw2)
+{
+    PaWinDsStream *stream;
+
+    /* suppress unused variable warnings */
+    (void) uID;
+    (void) uMsg;
+    (void) dw1;
+    (void) dw2;
+    
+    stream = (PaWinDsStream *) dwUser;
+    if( stream == NULL ) return;
+
+    if( stream->isActive )
+    {
+        if( stream->abortProcessing )
+        {
+            stream->isActive = 0;
+        }
+        else if( stream->stopProcessing )
+        {
+            DSoundWrapper   *dsw = &stream->directSoundWrapper;
+            if( stream->bufferProcessor.outputChannelCount > 0 )
+            {
+                DSW_ZeroEmptySpace( dsw );
+                /* clear isActive when all sound played */
+                if( dsw->dsw_FramesPlayed >= stream->framesWritten )
+                {
+                    stream->isActive = 0;
+                }
+            }
+            else
+            {
+                stream->isActive = 0;
+            }
+        }
+        else
+        {
+            if( Pa_TimeSlice( stream ) != 0)  /* Call time slice independant of timing method. */
+            {
+                /* FIXME implement handling of paComplete and paAbort if possible */
+                stream->stopProcessing = 1;
+            }
+        }
+
+        if( !stream->isActive ){
+            if( stream->streamRepresentation.streamFinishedCallback != 0 )
+                stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );
+        }
+    }
+}
+
+/***********************************************************************************
+    When CloseStream() is called, the multi-api layer ensures that
+    the stream has already been stopped or aborted.
+*/
+static PaError CloseStream( PaStream* s )
+{
+    PaError result = paNoError;
+    PaWinDsStream *stream = (PaWinDsStream*)s;
+
+    DSW_Term( &stream->directSoundWrapper );
+
+    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
+    PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );
+    PaUtil_FreeMemory( stream );
+
+    return result;
+}
+
+/***********************************************************************************/
+static PaError StartStream( PaStream *s )
+{
+    PaError          result = paNoError;
+    PaWinDsStream   *stream = (PaWinDsStream*)s;
+    HRESULT          hr;
+
+    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );
+    
+    if( stream->bufferProcessor.inputChannelCount > 0 )
+    {
+        hr = DSW_StartInput( &stream->directSoundWrapper );
+        DBUG(("StartStream: DSW_StartInput returned = 0x%X.\n", hr));
+        if( hr != DS_OK )
+        {
+            result = paUnanticipatedHostError;
+            PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr );
+            goto error;
+        }
+    }
+
+    stream->framesWritten = 0;
+    stream->callbackFlags = 0;
+
+    stream->abortProcessing = 0;
+    stream->stopProcessing = 0;
+    stream->isActive = 1;
+
+    if( stream->bufferProcessor.outputChannelCount > 0 )
+    {
+        /* Give user callback a chance to pre-fill buffer. REVIEW - i thought we weren't pre-filling, rb. */
+        result = Pa_TimeSlice( stream );
+        if( result != paNoError ) return result; // FIXME - what if finished?
+
+        hr = DSW_StartOutput( &stream->directSoundWrapper );
+        DBUG(("PaHost_StartOutput: DSW_StartOutput returned = 0x%X.\n", hr));
+        if( hr != DS_OK )
+        {
+            result = paUnanticipatedHostError;
+            PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr );
+            goto error;
+        }
+    }
+
+
+    /* Create timer that will wake us up so we can fill the DSound buffer. */
+    {
+        int resolution;
+        int framesPerWakeup = stream->framesPerDSBuffer / 4;
+        int msecPerWakeup = MSEC_PER_SECOND * framesPerWakeup / (int) stream->streamRepresentation.streamInfo.sampleRate;
+        if( msecPerWakeup < 10 ) msecPerWakeup = 10;
+        else if( msecPerWakeup > 100 ) msecPerWakeup = 100;
+        resolution = msecPerWakeup/4;
+        stream->timerID = timeSetEvent( msecPerWakeup, resolution, (LPTIMECALLBACK) Pa_TimerCallback,
+                                             (DWORD) stream, TIME_PERIODIC );
+    }
+    if( stream->timerID == 0 )
+    {
+        stream->isActive = 0;
+        result = paUnanticipatedHostError;
+        PA_DS_SET_LAST_DIRECTSOUND_ERROR( hr );
+        goto error;
+    }
+
+    stream->isStarted = TRUE;
+
+error:
+    return result;
+}
+
+
+/***********************************************************************************/
+static PaError StopStream( PaStream *s )
+{
+    PaError result = paNoError;
+    PaWinDsStream *stream = (PaWinDsStream*)s;
+    HRESULT          hr;
+    int timeoutMsec;
+
+    stream->stopProcessing = 1;
+    /* Set timeout at 20% beyond maximum time we might wait. */
+    timeoutMsec = (int) (1200.0 * stream->framesPerDSBuffer / stream->streamRepresentation.streamInfo.sampleRate);
+    while( stream->isActive && (timeoutMsec > 0)  )
+    {
+        Sleep(10);
+        timeoutMsec -= 10;
+    }
+    if( stream->timerID != 0 )
+    {
+	timeKillEvent(stream->timerID);  /* Stop callback timer. */
+        stream->timerID = 0;
+    }
+
+
+    if( stream->bufferProcessor.outputChannelCount > 0 )
+    {
+        hr = DSW_StopOutput( &stream->directSoundWrapper );
+    }
+
+    if( stream->bufferProcessor.inputChannelCount > 0 )
+    {
+        hr = DSW_StopInput( &stream->directSoundWrapper );
+    }
+
+    stream->isStarted = FALSE;
+
+    return result;
+}
+
+
+/***********************************************************************************/
+static PaError AbortStream( PaStream *s )
+{
+    PaWinDsStream *stream = (PaWinDsStream*)s;
+
+    stream->abortProcessing = 1;
+    return StopStream( s );
+}
+
+
+/***********************************************************************************/
+static PaError IsStreamStopped( PaStream *s )
+{
+    PaWinDsStream *stream = (PaWinDsStream*)s;
+
+    return !stream->isStarted;
+}
+
+
+/***********************************************************************************/
+static PaError IsStreamActive( PaStream *s )
+{
+    PaWinDsStream *stream = (PaWinDsStream*)s;
+
+    return stream->isActive;
+}
+
+/***********************************************************************************/
+static PaTime GetStreamTime( PaStream *s )
+{
+    /* suppress unused variable warnings */
+    (void) s;
+
+    
+/*
+    new behavior for GetStreamTime is to return a stream based seconds clock
+    used for the outTime parameter to the callback.
+    FIXME: delete this comment when the other unnecessary related code has
+    been cleaned from this file.
+
+    PaWinDsStream *stream = (PaWinDsStream*)s;
+    DSoundWrapper   *dsw;
+    dsw = &stream->directSoundWrapper;
+    return dsw->dsw_FramesPlayed;
+*/
+    return PaUtil_GetTime();
+}
+
+
+/***********************************************************************************/
+static double GetStreamCpuLoad( PaStream* s )
+{
+    PaWinDsStream *stream = (PaWinDsStream*)s;
+
+    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );
+}
+
+
+
+/***********************************************************************************
+    As separate stream interfaces are used for blocking and callback
+    streams, the following functions can be guaranteed to only be called
+    for blocking streams.
+*/
+
+static PaError ReadStream( PaStream* s,
+                           void *buffer,
+                           unsigned long frames )
+{
+    PaWinDsStream *stream = (PaWinDsStream*)s;
+
+    /* suppress unused variable warnings */
+    (void) buffer;
+    (void) frames;
+    (void) stream;
+
+    /* IMPLEMENT ME, see portaudio.h for required behavior*/
+
+    return paNoError;
+}
+
+
+/***********************************************************************************/
+static PaError WriteStream( PaStream* s,
+                            const void *buffer,
+                            unsigned long frames )
+{
+    PaWinDsStream *stream = (PaWinDsStream*)s;
+
+    /* suppress unused variable warnings */
+    (void) buffer;
+    (void) frames;
+    (void) stream;
+
+    /* IMPLEMENT ME, see portaudio.h for required behavior*/
+
+    return paNoError;
+}
+
+
+/***********************************************************************************/
+static signed long GetStreamReadAvailable( PaStream* s )
+{
+    PaWinDsStream *stream = (PaWinDsStream*)s;
+
+    /* suppress unused variable warnings */
+    (void) stream;
+
+    /* IMPLEMENT ME, see portaudio.h for required behavior*/
+
+    return 0;
+}
+
+
+/***********************************************************************************/
+static signed long GetStreamWriteAvailable( PaStream* s )
+{
+    PaWinDsStream *stream = (PaWinDsStream*)s;
+
+    /* suppress unused variable warnings */
+    (void) stream;
+    
+    /* IMPLEMENT ME, see portaudio.h for required behavior*/
+
+    return 0;
+}
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_hostapis.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_hostapis.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_hostapis.c	(revision 1163)
@@ -0,0 +1,86 @@
+/*
+ * $Id: pa_win_hostapis.c,v 1.1.2.10 2004/09/08 17:31:37 rossbencina Exp $
+ * Portable Audio I/O Library Windows initialization table
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2002 Ross Bencina, Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+    Win32 host API initialization function table.
+
+    @todo Consider using PA_USE_WMME etc instead of PA_NO_WMME. This is what
+    the Unix version does, we should consider being consistent.
+*/
+
+
+#include <pa_hostapi.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+PaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+PaError PaWinMme_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+PaError PaWinDs_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+PaError PaAsio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+PaError PaWinWdm_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+
+PaUtilHostApiInitializer *paHostApiInitializers[] =
+    {
+
+#ifndef PA_NO_DS
+        PaWinDs_Initialize,
+#endif
+
+#ifndef PA_NO_WMME
+        PaWinMme_Initialize,
+#endif
+
+#ifndef PA_NO_ASIO
+        PaAsio_Initialize,
+#endif
+
+/*
+#ifndef PA_NO_WDMKS
+        PaWinWdm_Initialize,
+#endif
+*/
+
+        PaSkeleton_Initialize, /* just for testing */
+
+        0   /* NULL terminated array */
+    };
+
+
+int paDefaultHostApiIndex = 0;
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_util.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_util.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_util.c	(revision 1163)
@@ -0,0 +1,137 @@
+/*
+ * $Id: pa_win_util.c,v 1.1.2.7 2003/09/15 18:30:26 rossbencina Exp $
+ * Portable Audio I/O Library
+ * Win32 platform-specific support functions
+ *
+ * Based on the Open Source API proposed by Ross Bencina
+ * Copyright (c) 1999-2000 Ross Bencina
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+/** @file
+ Win32 platform-specific support functions.
+
+    @todo Implement workaround for QueryPerformanceCounter() skipping forward
+    bug. (see msdn kb Q274323).
+*/
+ 
+#include <windows.h>
+#include <mmsystem.h> /* for timeGetTime() */
+
+#include "pa_util.h"
+
+
+/*
+   Track memory allocations to avoid leaks.
+ */
+
+#if PA_TRACK_MEMORY
+static int numAllocations_ = 0;
+#endif
+
+
+void *PaUtil_AllocateMemory( long size )
+{
+    void *result = GlobalAlloc( GPTR, size );
+
+#if PA_TRACK_MEMORY
+    if( result != NULL ) numAllocations_ += 1;
+#endif
+    return result;
+}
+
+
+void PaUtil_FreeMemory( void *block )
+{
+    if( block != NULL )
+    {
+        GlobalFree( block );
+#if PA_TRACK_MEMORY
+        numAllocations_ -= 1;
+#endif
+
+    }
+}
+
+
+int PaUtil_CountCurrentlyAllocatedBlocks( void )
+{
+#if PA_TRACK_MEMORY
+    return numAllocations_;
+#else
+    return 0;
+#endif
+}
+
+
+void Pa_Sleep( long msec )
+{
+    Sleep( msec );
+}
+
+static int usePerformanceCounter_;
+static double secondsPerTick_;
+
+void PaUtil_InitializeClock( void )
+{
+    LARGE_INTEGER ticksPerSecond;
+
+    if( QueryPerformanceFrequency( &ticksPerSecond ) != 0 )
+    {
+        usePerformanceCounter_ = 1;
+        secondsPerTick_ = 1.0 / (double)ticksPerSecond.QuadPart;
+    }
+    else
+    {
+        usePerformanceCounter_ = 0;
+    }
+}
+
+
+double PaUtil_GetTime( void )
+{
+    LARGE_INTEGER time;
+
+    if( usePerformanceCounter_ )
+    {
+        /* FIXME:
+            according to this knowledge-base article, QueryPerformanceCounter
+            can skip forward by seconds!
+            http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q274323&
+
+            it may be better to use the rtdsc instruction using inline asm,
+            however then a method is needed to calculate a ticks/seconds ratio.
+        */
+        QueryPerformanceCounter( &time );
+        return time.QuadPart * secondsPerTick_;
+    }
+    else
+    {
+#ifndef UNDER_CE
+        return timeGetTime() * .001;
+#else
+	return GetTickCount() * .001;
+#endif
+    }
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_wmme.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_wmme.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_wmme.c	(revision 1163)
@@ -0,0 +1,3633 @@
+/*
+ * $Id: pa_win_wmme.c,v 1.6.2.86 2004/02/21 11:38:28 rossbencina Exp $
+ * pa_win_wmme.c
+ * Implementation of PortAudio for Windows MultiMedia Extensions (WMME)       
+ *                                                                                         
+ * PortAudio Portable Real-Time Audio Library
+ * Latest Version at: http://www.portaudio.com
+ *
+ * Authors: Ross Bencina and Phil Burk
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/* Modification History:
+ PLB = Phil Burk
+ JM = Julien Maillard
+ RDB = Ross Bencina
+ PLB20010402 - sDevicePtrs now allocates based on sizeof(pointer)
+ PLB20010413 - check for excessive numbers of channels
+ PLB20010422 - apply Mike Berry's changes for CodeWarrior on PC
+               including conditional inclusion of memory.h,
+               and explicit typecasting on memory allocation
+ PLB20010802 - use GlobalAlloc for sDevicesPtr instead of PaHost_AllocFastMemory
+ PLB20010816 - pass process instead of thread to SetPriorityClass()
+ PLB20010927 - use number of frames instead of real-time for CPULoad calculation.
+ JM20020118 - prevent hung thread when buffers underflow.
+ PLB20020321 - detect Win XP versus NT, 9x; fix DBUG typo; removed init of CurrentCount
+ RDB20020411 - various renaming cleanups, factored streamData alloc and cpu usage init
+ RDB20020417 - stopped counting WAVE_MAPPER when there were no real devices
+               refactoring, renaming and fixed a few edge case bugs
+ RDB20020531 - converted to V19 framework
+ ** NOTE  maintanance history is now stored in CVS **
+*/
+
+/** @file
+	
+	@todo Fix buffer catch up code, can sometimes get stuck (perhaps fixed now,
+            needs to be reviewed and tested.)
+
+    @todo implement paInputUnderflow, paOutputOverflow streamCallback statusFlags, paNeverDropInput.
+
+    @todo BUG: PA_MME_SET_LAST_WAVEIN/OUT_ERROR is used in functions which may
+                be called asynchronously from the callback thread. this is bad.
+
+    @todo implement inputBufferAdcTime in callback thread
+
+    @todo review/fix error recovery and cleanup in marked functions
+
+    @todo implement timeInfo for stream priming
+
+    @todo handle the case where the callback returns paAbort or paComplete during stream priming.
+
+    @todo review input overflow and output underflow handling in ReadStream and WriteStream
+
+Non-critical stuff for the future:
+
+    @todo Investigate supporting host buffer formats > 16 bits
+    
+    @todo define UNICODE and _UNICODE in the project settings and see what breaks
+
+*/
+
+/*
+    How it works:
+
+    For both callback and blocking read/write streams we open the MME devices
+    in CALLBACK_EVENT mode. In this mode, MME signals an Event object whenever
+    it has finished with a buffer (either filled it for input, or played it
+    for output). Where necessary we block waiting for Event objects using
+    WaitMultipleObjects().
+
+    When implementing a PA callback stream, we set up a high priority thread
+    which waits on the MME buffer Events and drains/fills the buffers when
+    they are ready.
+
+    When implementing a PA blocking read/write stream, we simply wait on these
+    Events (when necessary) inside the ReadStream() and WriteStream() functions.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <windows.h>
+#include <mmsystem.h>
+#ifndef UNDER_CE
+#include <process.h>
+#endif
+#include <assert.h>
+/* PLB20010422 - "memory.h" doesn't work on CodeWarrior for PC. Thanks Mike Berry for the mod. */
+#ifndef __MWERKS__
+#include <malloc.h>
+#include <memory.h>
+#endif /* __MWERKS__ */
+
+#include "portaudio.h"
+#include "pa_trace.h"
+#include "pa_util.h"
+#include "pa_allocation.h"
+#include "pa_hostapi.h"
+#include "pa_stream.h"
+#include "pa_cpuload.h"
+#include "pa_process.h"
+
+#include "pa_win_wmme.h"
+
+#include <pj/string.h>
+#include <pj/unicode.h>
+
+#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && \
+    !defined(UNDER_CE)
+/* MSC version 6 and above */
+#pragma comment(lib, "winmm.lib")
+#endif
+
+/************************************************* Constants ********/
+
+#define PA_MME_USE_HIGH_DEFAULT_LATENCY_    (0)  /* For debugging glitches. */
+
+#if PA_MME_USE_HIGH_DEFAULT_LATENCY_
+ #define PA_MME_WIN_9X_DEFAULT_LATENCY_                     (0.4)
+ #define PA_MME_MIN_HOST_OUTPUT_BUFFER_COUNT_               (4)
+ #define PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_FULL_DUPLEX_	(4)
+ #define PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_HALF_DUPLEX_	(4)
+ #define PA_MME_MIN_HOST_BUFFER_FRAMES_WHEN_UNSPECIFIED_	(16)
+ #define PA_MME_MAX_HOST_BUFFER_SECS_				        (0.3)       /* Do not exceed unless user buffer exceeds */
+ #define PA_MME_MAX_HOST_BUFFER_BYTES_				        (32 * 1024) /* Has precedence over PA_MME_MAX_HOST_BUFFER_SECS_, some drivers are known to crash with buffer sizes > 32k */
+#else
+ #define PA_MME_WIN_9X_DEFAULT_LATENCY_                     (0.2)
+ #define PA_MME_MIN_HOST_OUTPUT_BUFFER_COUNT_               (2)
+ #define PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_FULL_DUPLEX_	(3)
+ #define PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_HALF_DUPLEX_	(2)
+ #define PA_MME_MIN_HOST_BUFFER_FRAMES_WHEN_UNSPECIFIED_	(16)
+ #define PA_MME_MAX_HOST_BUFFER_SECS_				        (0.1)       /* Do not exceed unless user buffer exceeds */
+ #define PA_MME_MAX_HOST_BUFFER_BYTES_				        (32 * 1024) /* Has precedence over PA_MME_MAX_HOST_BUFFER_SECS_, some drivers are known to crash with buffer sizes > 32k */
+#endif
+
+/* Use higher latency for NT because it is even worse at real-time
+   operation than Win9x.
+*/
+#define PA_MME_WIN_NT_DEFAULT_LATENCY_      (PA_MME_WIN_9X_DEFAULT_LATENCY_ * 2)
+#define PA_MME_WIN_WDM_DEFAULT_LATENCY_     (PA_MME_WIN_9X_DEFAULT_LATENCY_)
+
+
+#define PA_MME_MIN_TIMEOUT_MSEC_        (1000)
+
+static const pj_char_t constInputMapperSuffix_[] = PJ_T(" - Input");
+static const pj_char_t constOutputMapperSuffix_[] = PJ_T(" - Output");
+
+/********************************************************************/
+
+typedef struct PaWinMmeStream PaWinMmeStream;     /* forward declaration */
+
+/* prototypes for functions declared in this file */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+PaError PaWinMme_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi );
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** stream,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *streamCallback,
+                           void *userData );
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate );
+static PaError CloseStream( PaStream* stream );
+static PaError StartStream( PaStream *stream );
+static PaError StopStream( PaStream *stream );
+static PaError AbortStream( PaStream *stream );
+static PaError IsStreamStopped( PaStream *s );
+static PaError IsStreamActive( PaStream *stream );
+static PaTime GetStreamTime( PaStream *stream );
+static double GetStreamCpuLoad( PaStream* stream );
+static PaError ReadStream( PaStream* stream, void *buffer, unsigned long frames );
+static PaError WriteStream( PaStream* stream, const void *buffer, unsigned long frames );
+static signed long GetStreamReadAvailable( PaStream* stream );
+static signed long GetStreamWriteAvailable( PaStream* stream );
+
+
+/* macros for setting last host error information */
+
+#ifdef UNICODE
+
+#define PA_MME_SET_LAST_WAVEIN_ERROR( mmresult ) \
+    {                                                                   \
+        wchar_t mmeErrorTextWide[ MAXERRORLENGTH ];                     \
+        char mmeErrorText[ MAXERRORLENGTH ];                            \
+        waveInGetErrorText( mmresult, mmeErrorTextWide, MAXERRORLENGTH );   \
+        WideCharToMultiByte( CP_ACP, WC_COMPOSITECHECK | WC_DEFAULTCHAR,\
+            mmeErrorTextWide, -1, mmeErrorText, MAXERRORLENGTH, NULL, NULL );  \
+        PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText );   \
+    }
+
+#define PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult ) \
+    {                                                                   \
+        wchar_t mmeErrorTextWide[ MAXERRORLENGTH ];                     \
+        char mmeErrorText[ MAXERRORLENGTH ];                            \
+        waveOutGetErrorText( mmresult, mmeErrorTextWide, MAXERRORLENGTH );  \
+        WideCharToMultiByte( CP_ACP, WC_COMPOSITECHECK | WC_DEFAULTCHAR,\
+            mmeErrorTextWide, -1, mmeErrorText, MAXERRORLENGTH, NULL, NULL );  \
+        PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText );   \
+    }
+    
+#else /* !UNICODE */
+
+#define PA_MME_SET_LAST_WAVEIN_ERROR( mmresult ) \
+    {                                                                   \
+        char mmeErrorText[ MAXERRORLENGTH ];                            \
+        waveInGetErrorText( mmresult, mmeErrorText, MAXERRORLENGTH );   \
+        PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText );   \
+    }
+
+#define PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult ) \
+    {                                                                   \
+        char mmeErrorText[ MAXERRORLENGTH ];                            \
+        waveOutGetErrorText( mmresult, mmeErrorText, MAXERRORLENGTH );  \
+        PaUtil_SetLastHostErrorInfo( paMME, mmresult, mmeErrorText );   \
+    }
+
+#endif /* UNICODE */
+
+
+static void PaMme_SetLastSystemError( DWORD errorCode )
+{
+    char *lpMsgBuf;
+    FormatMessage(
+        FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+        NULL,
+        errorCode,
+        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+        (LPTSTR) &lpMsgBuf,
+        0,
+        NULL
+    );
+    PaUtil_SetLastHostErrorInfo( paMME, errorCode, lpMsgBuf );
+    LocalFree( lpMsgBuf );
+}
+
+#define PA_MME_SET_LAST_SYSTEM_ERROR( errorCode ) \
+    PaMme_SetLastSystemError( errorCode )
+
+
+/* PaError returning wrappers for some commonly used win32 functions
+    note that we allow passing a null ptr to have no effect.
+*/
+
+static PaError CreateEventWithPaError( HANDLE *handle,
+        LPSECURITY_ATTRIBUTES lpEventAttributes,
+        BOOL bManualReset,
+        BOOL bInitialState,
+        LPCTSTR lpName )
+{
+    PaError result = paNoError;
+
+    *handle = NULL;
+    
+    *handle = CreateEvent( lpEventAttributes, bManualReset, bInitialState, lpName );
+    if( *handle == NULL )
+    {
+        result = paUnanticipatedHostError;
+        PA_MME_SET_LAST_SYSTEM_ERROR( GetLastError() );
+    }
+
+    return result;
+}
+
+
+static PaError ResetEventWithPaError( HANDLE handle )
+{
+    PaError result = paNoError;
+
+    if( handle )
+    {
+        if( ResetEvent( handle ) == 0 )
+        {
+            result = paUnanticipatedHostError;
+            PA_MME_SET_LAST_SYSTEM_ERROR( GetLastError() );
+        }
+    }
+
+    return result;
+}
+
+
+static PaError CloseHandleWithPaError( HANDLE handle )
+{
+    PaError result = paNoError;
+    
+    if( handle )
+    {
+        if( CloseHandle( handle ) == 0 )
+        {
+            result = paUnanticipatedHostError;
+            PA_MME_SET_LAST_SYSTEM_ERROR( GetLastError() );
+        }
+    }
+    
+    return result;
+}
+
+
+/* PaWinMmeHostApiRepresentation - host api datastructure specific to this implementation */
+
+typedef struct
+{
+    PaUtilHostApiRepresentation inheritedHostApiRep;
+    PaUtilStreamInterface callbackStreamInterface;
+    PaUtilStreamInterface blockingStreamInterface;
+
+    PaUtilAllocationGroup *allocations;
+    
+    int inputDeviceCount, outputDeviceCount;
+
+    /** winMmeDeviceIds is an array of WinMme device ids.
+        fields in the range [0, inputDeviceCount) are input device ids,
+        and [inputDeviceCount, inputDeviceCount + outputDeviceCount) are output
+        device ids.
+     */ 
+    UINT *winMmeDeviceIds;
+}
+PaWinMmeHostApiRepresentation;
+
+
+typedef struct
+{
+    PaDeviceInfo inheritedDeviceInfo;
+    DWORD dwFormats; /**<< standard formats bitmask from the WAVEINCAPS and WAVEOUTCAPS structures */
+}
+PaWinMmeDeviceInfo;
+
+
+/*************************************************************************
+ * Returns recommended device ID.
+ * On the PC, the recommended device can be specified by the user by
+ * setting an environment variable. For example, to use device #1.
+ *
+ *    set PA_RECOMMENDED_OUTPUT_DEVICE=1
+ *
+ * The user should first determine the available device ID by using
+ * the supplied application "pa_devs".
+ */
+#define PA_ENV_BUF_SIZE_  (32)
+#define PA_REC_IN_DEV_ENV_NAME_  ("PA_RECOMMENDED_INPUT_DEVICE")
+#define PA_REC_OUT_DEV_ENV_NAME_  ("PA_RECOMMENDED_OUTPUT_DEVICE")
+static PaDeviceIndex GetEnvDefaultDeviceID( char *envName )
+{
+    PaDeviceIndex recommendedIndex = paNoDevice;
+    DWORD   hresult;
+    char    envbuf[PA_ENV_BUF_SIZE_];
+
+#ifndef WIN32_PLATFORM_PSPC /* no GetEnvironmentVariable on PocketPC */
+
+    /* Let user determine default device by setting environment variable. */
+    hresult = GetEnvironmentVariable( envName, envbuf, PA_ENV_BUF_SIZE_ );
+    if( (hresult > 0) && (hresult < PA_ENV_BUF_SIZE_) )
+    {
+        recommendedIndex = atoi( envbuf );
+    }
+#endif
+
+    return recommendedIndex;
+}
+
+
+static void InitializeDefaultDeviceIdsFromEnv( PaWinMmeHostApiRepresentation *hostApi )
+{
+    PaDeviceIndex device;
+
+    /* input */
+    device = GetEnvDefaultDeviceID( PA_REC_IN_DEV_ENV_NAME_ );
+    if( device != paNoDevice &&
+            ( device >= 0 && device < hostApi->inheritedHostApiRep.info.deviceCount ) &&
+            hostApi->inheritedHostApiRep.deviceInfos[ device ]->maxInputChannels > 0 )
+    {
+        hostApi->inheritedHostApiRep.info.defaultInputDevice = device;
+    }
+
+    /* output */
+    device = GetEnvDefaultDeviceID( PA_REC_OUT_DEV_ENV_NAME_ );
+    if( device != paNoDevice &&
+            ( device >= 0 && device < hostApi->inheritedHostApiRep.info.deviceCount ) &&
+            hostApi->inheritedHostApiRep.deviceInfos[ device ]->maxOutputChannels > 0 )
+    {
+        hostApi->inheritedHostApiRep.info.defaultOutputDevice = device;
+    }
+}
+
+
+/** Convert external PA ID to a windows multimedia device ID
+*/
+static UINT LocalDeviceIndexToWinMmeDeviceId( PaWinMmeHostApiRepresentation *hostApi, PaDeviceIndex device )
+{
+    assert( device >= 0 && device < hostApi->inputDeviceCount + hostApi->outputDeviceCount );
+
+	return hostApi->winMmeDeviceIds[ device ];
+}
+
+
+static PaError QueryInputWaveFormatEx( int deviceId, WAVEFORMATEX *waveFormatEx )
+{
+    MMRESULT mmresult;
+    
+    switch( mmresult = waveInOpen( NULL, deviceId, waveFormatEx, 0, 0, WAVE_FORMAT_QUERY ) )
+    {
+        case MMSYSERR_NOERROR:
+            return paNoError;
+        case MMSYSERR_ALLOCATED:    /* Specified resource is already allocated. */
+            return paDeviceUnavailable;
+        case MMSYSERR_NODRIVER:	    /* No device driver is present. */
+            return paDeviceUnavailable;
+        case MMSYSERR_NOMEM:	    /* Unable to allocate or lock memory. */
+            return paInsufficientMemory;
+        case WAVERR_BADFORMAT:      /* Attempted to open with an unsupported waveform-audio format. */
+            return paSampleFormatNotSupported;
+                    
+        case MMSYSERR_BADDEVICEID:	/* Specified device identifier is out of range. */
+            /* falls through */
+        default:
+            PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );
+            return paUnanticipatedHostError;
+    }
+}
+
+
+static PaError QueryOutputWaveFormatEx( int deviceId, WAVEFORMATEX *waveFormatEx )
+{
+    MMRESULT mmresult;
+    
+    switch( mmresult = waveOutOpen( NULL, deviceId, waveFormatEx, 0, 0, WAVE_FORMAT_QUERY ) )
+    {
+        case MMSYSERR_NOERROR:
+            return paNoError;
+        case MMSYSERR_ALLOCATED:    /* Specified resource is already allocated. */
+            return paDeviceUnavailable;
+        case MMSYSERR_NODRIVER:	    /* No device driver is present. */
+            return paDeviceUnavailable;
+        case MMSYSERR_NOMEM:	    /* Unable to allocate or lock memory. */
+            return paInsufficientMemory;
+        case WAVERR_BADFORMAT:      /* Attempted to open with an unsupported waveform-audio format. */
+            return paSampleFormatNotSupported;
+                    
+        case MMSYSERR_BADDEVICEID:	/* Specified device identifier is out of range. */
+            /* falls through */
+        default:
+            PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );
+            return paUnanticipatedHostError;
+    }
+}
+
+
+static PaError QueryFormatSupported( PaDeviceInfo *deviceInfo,
+        PaError (*waveFormatExQueryFunction)(int, WAVEFORMATEX*),
+        int winMmeDeviceId, int channels, double sampleRate )
+{
+    PaWinMmeDeviceInfo *winMmeDeviceInfo = (PaWinMmeDeviceInfo*)deviceInfo;
+    WAVEFORMATEX waveFormatEx;
+    
+    if( sampleRate == 11025.0
+        && ( (channels == 1 && (winMmeDeviceInfo->dwFormats & WAVE_FORMAT_1M16))
+            || (channels == 2 && (winMmeDeviceInfo->dwFormats & WAVE_FORMAT_1S16)) ) ){
+
+        return paNoError;
+    }
+
+    if( sampleRate == 22050.0
+        && ( (channels == 1 && (winMmeDeviceInfo->dwFormats & WAVE_FORMAT_2M16))
+            || (channels == 2 && (winMmeDeviceInfo->dwFormats & WAVE_FORMAT_2S16)) ) ){
+
+        return paNoError;
+    }
+
+    if( sampleRate == 44100.0
+        && ( (channels == 1 && (winMmeDeviceInfo->dwFormats & WAVE_FORMAT_4M16))
+            || (channels == 2 && (winMmeDeviceInfo->dwFormats & WAVE_FORMAT_4S16)) ) ){
+
+        return paNoError;
+    }
+
+    waveFormatEx.wFormatTag = WAVE_FORMAT_PCM;
+    waveFormatEx.nChannels = (WORD)channels;
+    waveFormatEx.nSamplesPerSec = (DWORD)sampleRate;
+    waveFormatEx.nAvgBytesPerSec = waveFormatEx.nSamplesPerSec * channels * sizeof(short);
+    waveFormatEx.nBlockAlign = (WORD)(channels * sizeof(short));
+    waveFormatEx.wBitsPerSample = 16;
+    waveFormatEx.cbSize = 0;
+
+    return waveFormatExQueryFunction( winMmeDeviceId, &waveFormatEx );
+}
+
+
+#define PA_DEFAULTSAMPLERATESEARCHORDER_COUNT_  (13) /* must match array length below */
+static double defaultSampleRateSearchOrder_[] =
+    { 44100.0, 48000.0, 32000.0, 24000.0, 22050.0, 88200.0, 96000.0, 192000.0,
+        16000.0, 12000.0, 11025.0, 9600.0, 8000.0 };
+
+static void DetectDefaultSampleRate( PaWinMmeDeviceInfo *winMmeDeviceInfo, int winMmeDeviceId,
+        PaError (*waveFormatExQueryFunction)(int, WAVEFORMATEX*), int maxChannels )
+{
+    PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;
+    int i;
+    
+    deviceInfo->defaultSampleRate = 0.;
+
+    for( i=0; i < PA_DEFAULTSAMPLERATESEARCHORDER_COUNT_; ++i )
+    {
+        double sampleRate = defaultSampleRateSearchOrder_[ i ]; 
+        PaError paerror = QueryFormatSupported( deviceInfo, waveFormatExQueryFunction, winMmeDeviceId, maxChannels, sampleRate );
+        if( paerror == paNoError )
+        {
+            deviceInfo->defaultSampleRate = sampleRate;
+            break;
+        }
+    }
+}
+
+
+static PaError InitializeInputDeviceInfo( PaWinMmeHostApiRepresentation *winMmeHostApi,
+        PaWinMmeDeviceInfo *winMmeDeviceInfo, UINT winMmeInputDeviceId, int *success )
+{
+    PaError result = paNoError;
+    char *deviceName; /* non-const ptr */
+    MMRESULT mmresult;
+    WAVEINCAPS wic;
+    PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;
+    PJ_DECL_ANSI_TEMP_BUF(abuf,128)
+    
+    *success = 0;
+
+    mmresult = waveInGetDevCaps( winMmeInputDeviceId, &wic, sizeof( WAVEINCAPS ) );
+    if( mmresult == MMSYSERR_NOMEM )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+    else if( mmresult != MMSYSERR_NOERROR )
+    {
+        /* instead of returning paUnanticipatedHostError we return
+            paNoError, but leave success set as 0. This allows
+            Pa_Initialize to just ignore this device, without failing
+            the entire initialisation process.
+        */
+        return paNoError;
+    }           
+
+    if( winMmeInputDeviceId == WAVE_MAPPER )
+    {
+        /* Append I/O suffix to WAVE_MAPPER device. */
+        deviceName = (char*)PaUtil_GroupAllocateMemory(
+                    winMmeHostApi->allocations, 
+		    pj_native_strlen( wic.szPname ) + sizeof(pj_char_t) + sizeof(constInputMapperSuffix_) );
+        if( !deviceName )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+        strcpy( deviceName, PJ_NATIVE_TO_STRING(wic.szPname,abuf,sizeof(abuf)) );
+        strcat( deviceName, PJ_NATIVE_TO_STRING(constInputMapperSuffix_,abuf,sizeof(abuf)) );
+    }
+    else
+    {
+        deviceName = (char*)PaUtil_GroupAllocateMemory(
+                    winMmeHostApi->allocations, pj_native_strlen( wic.szPname ) + sizeof(pj_char_t) );
+        if( !deviceName )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+        strcpy( deviceName, PJ_NATIVE_TO_STRING(wic.szPname,abuf,sizeof(abuf))  );
+    }
+    deviceInfo->name = deviceName;
+
+    deviceInfo->maxInputChannels = wic.wChannels;
+    /* Sometimes a device can return a rediculously large number of channels.
+     * This happened with an SBLive card on a Windows ME box.
+     * If that happens, then force it to 2 channels.  PLB20010413
+     */
+    if( (deviceInfo->maxInputChannels < 1) || (deviceInfo->maxInputChannels > 256) )
+    {
+        PA_DEBUG(("Pa_GetDeviceInfo: Num input channels reported as %d! Changed to 2.\n", deviceInfo->maxInputChannels ));
+        deviceInfo->maxInputChannels = 2;
+    }
+
+    winMmeDeviceInfo->dwFormats = wic.dwFormats;
+
+    DetectDefaultSampleRate( winMmeDeviceInfo, winMmeInputDeviceId,
+            QueryInputWaveFormatEx, deviceInfo->maxInputChannels );
+
+    *success = 1;
+    
+error:
+    return result;
+}
+
+
+static PaError InitializeOutputDeviceInfo( PaWinMmeHostApiRepresentation *winMmeHostApi,
+        PaWinMmeDeviceInfo *winMmeDeviceInfo, UINT winMmeOutputDeviceId, int *success )
+{
+    PaError result = paNoError;
+    char *deviceName; /* non-const ptr */
+    MMRESULT mmresult;
+    WAVEOUTCAPS woc;
+    PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;
+    PJ_DECL_ANSI_TEMP_BUF(abuf,128)
+    
+    *success = 0;
+
+    mmresult = waveOutGetDevCaps( winMmeOutputDeviceId, &woc, sizeof( WAVEOUTCAPS ) );
+    if( mmresult == MMSYSERR_NOMEM )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+    else if( mmresult != MMSYSERR_NOERROR )
+    {
+        /* instead of returning paUnanticipatedHostError we return
+            paNoError, but leave success set as 0. This allows
+            Pa_Initialize to just ignore this device, without failing
+            the entire initialisation process.
+        */
+        return paNoError;
+    }
+
+    if( winMmeOutputDeviceId == WAVE_MAPPER )
+    {
+        /* Append I/O suffix to WAVE_MAPPER device. */
+        deviceName = (char *)PaUtil_GroupAllocateMemory(
+                    winMmeHostApi->allocations, pj_native_strlen( woc.szPname ) + 1 + sizeof(constOutputMapperSuffix_) );
+        if( !deviceName )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+        strcpy( deviceName, PJ_NATIVE_TO_STRING(woc.szPname,abuf,sizeof(abuf)) );
+        strcat( deviceName, PJ_NATIVE_TO_STRING(constOutputMapperSuffix_,abuf,sizeof(abuf)) );
+    }
+    else
+    {
+        deviceName = (char*)PaUtil_GroupAllocateMemory(
+                    winMmeHostApi->allocations, pj_native_strlen( woc.szPname ) + 1 );
+        if( !deviceName )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+        strcpy( deviceName, PJ_NATIVE_TO_STRING(woc.szPname,abuf,sizeof(abuf))  );
+    }
+    deviceInfo->name = deviceName;
+
+    deviceInfo->maxOutputChannels = woc.wChannels;
+    /* Sometimes a device can return a rediculously large number of channels.
+     * This happened with an SBLive card on a Windows ME box.
+     * It also happens on Win XP!
+     */
+    if( (deviceInfo->maxOutputChannels < 1) || (deviceInfo->maxOutputChannels > 256) )
+    {
+        PA_DEBUG(("Pa_GetDeviceInfo: Num output channels reported as %d! Changed to 2.\n", deviceInfo->maxOutputChannels ));
+        deviceInfo->maxOutputChannels = 2;
+    }
+
+    winMmeDeviceInfo->dwFormats = woc.dwFormats;
+
+    DetectDefaultSampleRate( winMmeDeviceInfo, winMmeOutputDeviceId,
+            QueryOutputWaveFormatEx, deviceInfo->maxOutputChannels );
+
+    *success = 1;
+    
+error:
+    return result;
+}
+
+
+static void GetDefaultLatencies( PaTime *defaultLowLatency, PaTime *defaultHighLatency )
+{
+    OSVERSIONINFO osvi;
+    osvi.dwOSVersionInfoSize = sizeof( osvi );
+	GetVersionEx( &osvi );
+
+    /* Check for NT */
+    if( (osvi.dwMajorVersion == 4) && (osvi.dwPlatformId == 2) )
+    {
+        *defaultLowLatency = PA_MME_WIN_NT_DEFAULT_LATENCY_;
+    }
+    else if(osvi.dwMajorVersion >= 5)
+    {
+        *defaultLowLatency  = PA_MME_WIN_WDM_DEFAULT_LATENCY_;
+    }
+    else
+    {
+        *defaultLowLatency  = PA_MME_WIN_9X_DEFAULT_LATENCY_;
+    }     
+
+    *defaultHighLatency = *defaultLowLatency * 2;
+}
+
+
+PaError PaWinMme_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex )
+{
+    PaError result = paNoError;
+    int i;
+    PaWinMmeHostApiRepresentation *winMmeHostApi;
+    int inputDeviceCount, outputDeviceCount, maximumPossibleDeviceCount;
+    PaWinMmeDeviceInfo *deviceInfoArray;
+    int deviceInfoInitializationSucceeded;
+    PaTime defaultLowLatency, defaultHighLatency;
+
+    winMmeHostApi = (PaWinMmeHostApiRepresentation*)PaUtil_AllocateMemory( sizeof(PaWinMmeHostApiRepresentation) );
+    if( !winMmeHostApi )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    winMmeHostApi->allocations = PaUtil_CreateAllocationGroup();
+    if( !winMmeHostApi->allocations )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    *hostApi = &winMmeHostApi->inheritedHostApiRep;
+    (*hostApi)->info.structVersion = 1;
+    (*hostApi)->info.type = paMME;
+    (*hostApi)->info.name = "MME";
+
+    
+    /* initialise device counts and default devices under the assumption that
+        there are no devices. These values are incremented below if and when
+        devices are successfully initialized.
+    */
+    (*hostApi)->info.deviceCount = 0;
+    (*hostApi)->info.defaultInputDevice = paNoDevice;
+    (*hostApi)->info.defaultOutputDevice = paNoDevice;
+    winMmeHostApi->inputDeviceCount = 0;
+    winMmeHostApi->outputDeviceCount = 0;
+
+
+    maximumPossibleDeviceCount = 0;
+
+    inputDeviceCount = waveInGetNumDevs();
+    if( inputDeviceCount > 0 )
+    	maximumPossibleDeviceCount += inputDeviceCount + 1;	/* assume there is a WAVE_MAPPER */
+
+    outputDeviceCount = waveOutGetNumDevs();
+    if( outputDeviceCount > 0 )
+	    maximumPossibleDeviceCount += outputDeviceCount + 1;	/* assume there is a WAVE_MAPPER */
+
+
+    if( maximumPossibleDeviceCount > 0 ){
+
+        (*hostApi)->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory(
+                winMmeHostApi->allocations, sizeof(PaDeviceInfo*) * maximumPossibleDeviceCount );
+        if( !(*hostApi)->deviceInfos )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        /* allocate all device info structs in a contiguous block */
+        deviceInfoArray = (PaWinMmeDeviceInfo*)PaUtil_GroupAllocateMemory(
+                winMmeHostApi->allocations, sizeof(PaWinMmeDeviceInfo) * maximumPossibleDeviceCount );
+        if( !deviceInfoArray )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        winMmeHostApi->winMmeDeviceIds = (UINT*)PaUtil_GroupAllocateMemory(
+                winMmeHostApi->allocations, sizeof(int) * maximumPossibleDeviceCount );
+        if( !winMmeHostApi->winMmeDeviceIds )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        GetDefaultLatencies( &defaultLowLatency, &defaultHighLatency );
+
+        if( inputDeviceCount > 0 ){
+            /* -1 is the WAVE_MAPPER */
+            for( i = -1; i < inputDeviceCount; ++i ){
+                UINT winMmeDeviceId = (UINT)((i==-1) ? WAVE_MAPPER : i);
+                PaWinMmeDeviceInfo *wmmeDeviceInfo = &deviceInfoArray[ (*hostApi)->info.deviceCount ];
+                PaDeviceInfo *deviceInfo = &wmmeDeviceInfo->inheritedDeviceInfo;
+                deviceInfo->structVersion = 2;
+                deviceInfo->hostApi = hostApiIndex;
+
+                deviceInfo->maxInputChannels = 0;
+                deviceInfo->maxOutputChannels = 0;
+
+                deviceInfo->defaultLowInputLatency = defaultLowLatency;
+                deviceInfo->defaultLowOutputLatency = defaultLowLatency;
+                deviceInfo->defaultHighInputLatency = defaultHighLatency;
+                deviceInfo->defaultHighOutputLatency = defaultHighLatency;
+
+                result = InitializeInputDeviceInfo( winMmeHostApi, wmmeDeviceInfo,
+                        winMmeDeviceId, &deviceInfoInitializationSucceeded );
+                if( result != paNoError )
+                    goto error;
+
+                if( deviceInfoInitializationSucceeded ){
+                    if( (*hostApi)->info.defaultInputDevice == paNoDevice )
+                        (*hostApi)->info.defaultInputDevice = (*hostApi)->info.deviceCount;
+
+                    winMmeHostApi->winMmeDeviceIds[ (*hostApi)->info.deviceCount ] = winMmeDeviceId;
+                    (*hostApi)->deviceInfos[ (*hostApi)->info.deviceCount ] = deviceInfo;
+
+                    winMmeHostApi->inputDeviceCount++;
+                    (*hostApi)->info.deviceCount++;
+                }
+            }
+        }
+
+        if( outputDeviceCount > 0 ){
+            /* -1 is the WAVE_MAPPER */
+            for( i = -1; i < outputDeviceCount; ++i ){
+                UINT winMmeDeviceId = (UINT)((i==-1) ? WAVE_MAPPER : i);
+                PaWinMmeDeviceInfo *wmmeDeviceInfo = &deviceInfoArray[ (*hostApi)->info.deviceCount ];
+                PaDeviceInfo *deviceInfo = &wmmeDeviceInfo->inheritedDeviceInfo;
+                deviceInfo->structVersion = 2;
+                deviceInfo->hostApi = hostApiIndex;
+
+                deviceInfo->maxInputChannels = 0;
+                deviceInfo->maxOutputChannels = 0;
+
+                deviceInfo->defaultLowInputLatency = defaultLowLatency;
+                deviceInfo->defaultLowOutputLatency = defaultLowLatency;
+                deviceInfo->defaultHighInputLatency = defaultHighLatency;
+                deviceInfo->defaultHighOutputLatency = defaultHighLatency; 
+
+                result = InitializeOutputDeviceInfo( winMmeHostApi, wmmeDeviceInfo,
+                        winMmeDeviceId, &deviceInfoInitializationSucceeded );
+                if( result != paNoError )
+                    goto error;
+
+                if( deviceInfoInitializationSucceeded ){
+                    if( (*hostApi)->info.defaultOutputDevice == paNoDevice )
+                        (*hostApi)->info.defaultOutputDevice = (*hostApi)->info.deviceCount;
+
+                    winMmeHostApi->winMmeDeviceIds[ (*hostApi)->info.deviceCount ] = winMmeDeviceId;
+                    (*hostApi)->deviceInfos[ (*hostApi)->info.deviceCount ] = deviceInfo;
+
+                    winMmeHostApi->outputDeviceCount++;
+                    (*hostApi)->info.deviceCount++;
+                }
+            }
+        }
+    }
+    
+
+    InitializeDefaultDeviceIdsFromEnv( winMmeHostApi );
+
+    (*hostApi)->Terminate = Terminate;
+    (*hostApi)->OpenStream = OpenStream;
+    (*hostApi)->IsFormatSupported = IsFormatSupported;
+
+    PaUtil_InitializeStreamInterface( &winMmeHostApi->callbackStreamInterface, CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, GetStreamCpuLoad,
+                                      PaUtil_DummyRead, PaUtil_DummyWrite,
+                                      PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable );
+
+    PaUtil_InitializeStreamInterface( &winMmeHostApi->blockingStreamInterface, CloseStream, StartStream,
+                                      StopStream, AbortStream, IsStreamStopped, IsStreamActive,
+                                      GetStreamTime, PaUtil_DummyGetCpuLoad,
+                                      ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable );
+
+    return result;
+
+error:
+    if( winMmeHostApi )
+    {
+        if( winMmeHostApi->allocations )
+        {
+            PaUtil_FreeAllAllocations( winMmeHostApi->allocations );
+            PaUtil_DestroyAllocationGroup( winMmeHostApi->allocations );
+        }
+        
+        PaUtil_FreeMemory( winMmeHostApi );
+    }
+
+    return result;
+}
+
+
+static void Terminate( struct PaUtilHostApiRepresentation *hostApi )
+{
+    PaWinMmeHostApiRepresentation *winMmeHostApi = (PaWinMmeHostApiRepresentation*)hostApi;
+
+    if( winMmeHostApi->allocations )
+    {
+        PaUtil_FreeAllAllocations( winMmeHostApi->allocations );
+        PaUtil_DestroyAllocationGroup( winMmeHostApi->allocations );
+    }
+
+    PaUtil_FreeMemory( winMmeHostApi );
+}
+
+
+static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi,
+                                  const PaStreamParameters *inputParameters,
+                                  const PaStreamParameters *outputParameters,
+                                  double sampleRate )
+{
+    PaWinMmeHostApiRepresentation *winMmeHostApi = (PaWinMmeHostApiRepresentation*)hostApi;
+    PaDeviceInfo *inputDeviceInfo, *outputDeviceInfo;
+    int inputChannelCount, outputChannelCount;
+    int inputMultipleDeviceChannelCount, outputMultipleDeviceChannelCount;
+    PaSampleFormat inputSampleFormat, outputSampleFormat;
+    PaWinMmeStreamInfo *inputStreamInfo, *outputStreamInfo;
+    UINT winMmeInputDeviceId, winMmeOutputDeviceId;
+    unsigned int i;
+    PaError paerror;
+
+    /* The calls to QueryFormatSupported below are intended to detect invalid
+        sample rates. If we assume that the channel count and format are OK,
+        then the only thing that could fail is the sample rate. This isn't
+        strictly true, but I can't think of a better way to test that the
+        sample rate is valid.
+    */  
+    
+    if( inputParameters )
+    {
+        inputChannelCount = inputParameters->channelCount;
+        inputSampleFormat = inputParameters->sampleFormat;
+        inputStreamInfo = inputParameters->hostApiSpecificStreamInfo;
+        
+        /* all standard sample formats are supported by the buffer adapter,
+             this implementation doesn't support any custom sample formats */
+        if( inputSampleFormat & paCustomFormat )
+            return paSampleFormatNotSupported;
+
+        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification
+                && inputStreamInfo && (inputStreamInfo->flags & paWinMmeUseMultipleDevices) )
+        {
+            inputMultipleDeviceChannelCount = 0;
+            for( i=0; i< inputStreamInfo->deviceCount; ++i )
+            {
+                inputMultipleDeviceChannelCount += inputStreamInfo->devices[i].channelCount;
+                    
+                inputDeviceInfo = hostApi->deviceInfos[ inputStreamInfo->devices[i].device ];
+
+                /* check that input device can support inputChannelCount */
+                if( inputStreamInfo->devices[i].channelCount <= 0
+                        || inputStreamInfo->devices[i].channelCount > inputDeviceInfo->maxInputChannels )
+                    return paInvalidChannelCount;
+
+                /* test for valid sample rate, see comment above */
+                winMmeInputDeviceId = LocalDeviceIndexToWinMmeDeviceId( winMmeHostApi, inputStreamInfo->devices[i].device );
+                paerror = QueryFormatSupported( inputDeviceInfo, QueryInputWaveFormatEx, winMmeInputDeviceId, inputStreamInfo->devices[i].channelCount, sampleRate );
+                if( paerror != paNoError )
+                    return paInvalidSampleRate;
+            }
+                
+            if( inputMultipleDeviceChannelCount != inputChannelCount )
+                return paIncompatibleHostApiSpecificStreamInfo;                  
+        }
+        else
+        {
+            if( inputStreamInfo && (inputStreamInfo->flags & paWinMmeUseMultipleDevices) )
+                return paIncompatibleHostApiSpecificStreamInfo; /* paUseHostApiSpecificDeviceSpecification was not supplied as the input device */
+
+            inputDeviceInfo = hostApi->deviceInfos[ inputParameters->device ];
+
+            /* check that input device can support inputChannelCount */
+            if( inputChannelCount > inputDeviceInfo->maxInputChannels )
+                return paInvalidChannelCount;
+
+            /* test for valid sample rate, see comment above */
+            winMmeInputDeviceId = LocalDeviceIndexToWinMmeDeviceId( winMmeHostApi, inputParameters->device );
+            paerror = QueryFormatSupported( inputDeviceInfo, QueryInputWaveFormatEx, winMmeInputDeviceId, inputChannelCount, sampleRate );
+            if( paerror != paNoError )
+                return paInvalidSampleRate;
+        }
+    }
+
+    if( outputParameters )
+    {
+        outputChannelCount = outputParameters->channelCount;
+        outputSampleFormat = outputParameters->sampleFormat;
+        outputStreamInfo = outputParameters->hostApiSpecificStreamInfo;
+
+        /* all standard sample formats are supported by the buffer adapter,
+            this implementation doesn't support any custom sample formats */
+        if( outputSampleFormat & paCustomFormat )
+            return paSampleFormatNotSupported;
+
+        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification
+                && outputStreamInfo && (outputStreamInfo->flags & paWinMmeUseMultipleDevices) )
+        {
+            outputMultipleDeviceChannelCount = 0;
+            for( i=0; i< outputStreamInfo->deviceCount; ++i )
+            {
+                outputMultipleDeviceChannelCount += outputStreamInfo->devices[i].channelCount;
+                    
+                outputDeviceInfo = hostApi->deviceInfos[ outputStreamInfo->devices[i].device ];
+
+                /* check that output device can support outputChannelCount */
+                if( outputStreamInfo->devices[i].channelCount <= 0
+                        || outputStreamInfo->devices[i].channelCount > outputDeviceInfo->maxOutputChannels )
+                    return paInvalidChannelCount;
+
+                /* test for valid sample rate, see comment above */
+                winMmeOutputDeviceId = LocalDeviceIndexToWinMmeDeviceId( winMmeHostApi, outputStreamInfo->devices[i].device );
+                paerror = QueryFormatSupported( outputDeviceInfo, QueryOutputWaveFormatEx, winMmeOutputDeviceId, outputStreamInfo->devices[i].channelCount, sampleRate );
+                if( paerror != paNoError )
+                    return paInvalidSampleRate;
+            }
+                
+            if( outputMultipleDeviceChannelCount != outputChannelCount )
+                return paIncompatibleHostApiSpecificStreamInfo;            
+        }
+        else
+        {
+            if( outputStreamInfo && (outputStreamInfo->flags & paWinMmeUseMultipleDevices) )
+                return paIncompatibleHostApiSpecificStreamInfo; /* paUseHostApiSpecificDeviceSpecification was not supplied as the output device */
+
+            outputDeviceInfo = hostApi->deviceInfos[ outputParameters->device ];
+
+            /* check that output device can support outputChannelCount */
+            if( outputChannelCount > outputDeviceInfo->maxOutputChannels )
+                return paInvalidChannelCount;
+
+            /* test for valid sample rate, see comment above */
+            winMmeOutputDeviceId = LocalDeviceIndexToWinMmeDeviceId( winMmeHostApi, outputParameters->device );
+            paerror = QueryFormatSupported( outputDeviceInfo, QueryOutputWaveFormatEx, winMmeOutputDeviceId, outputChannelCount, sampleRate );
+            if( paerror != paNoError )
+                return paInvalidSampleRate;
+        }
+    }
+    
+    /*
+            - if a full duplex stream is requested, check that the combination
+                of input and output parameters is supported
+
+            - check that the device supports sampleRate
+
+            for mme all we can do is test that the input and output devices
+            support the requested sample rate and number of channels. we
+            cannot test for full duplex compatibility.
+    */                                             
+
+    return paFormatIsSupported;
+}
+
+
+
+static void SelectBufferSizeAndCount( unsigned long baseBufferSize,
+    unsigned long requestedLatency,
+    unsigned long baseBufferCount, unsigned long minimumBufferCount,
+    unsigned long maximumBufferSize, unsigned long *hostBufferSize,
+    unsigned long *hostBufferCount )
+{
+    unsigned long sizeMultiplier, bufferCount, latency;
+    unsigned long nextLatency, nextBufferSize;
+    int baseBufferSizeIsPowerOfTwo;
+    
+    sizeMultiplier = 1;
+    bufferCount = baseBufferCount;
+
+    /* count-1 below because latency is always determined by one less
+        than the total number of buffers.
+    */
+    latency = (baseBufferSize * sizeMultiplier) * (bufferCount-1);
+
+    if( latency > requestedLatency )
+    {
+
+        /* reduce number of buffers without falling below suggested latency */
+
+        nextLatency = (baseBufferSize * sizeMultiplier) * (bufferCount-2);
+        while( bufferCount > minimumBufferCount && nextLatency >= requestedLatency )
+        {
+            --bufferCount;
+            nextLatency = (baseBufferSize * sizeMultiplier) * (bufferCount-2);
+        }
+
+    }else if( latency < requestedLatency ){
+
+        baseBufferSizeIsPowerOfTwo = (! (baseBufferSize & (baseBufferSize - 1)));
+        if( baseBufferSizeIsPowerOfTwo ){
+
+            /* double size of buffers without exceeding requestedLatency */
+
+            nextBufferSize = (baseBufferSize * (sizeMultiplier*2));
+            nextLatency = nextBufferSize * (bufferCount-1);
+            while( nextBufferSize <= maximumBufferSize
+                    && nextLatency < requestedLatency )
+            {
+                sizeMultiplier *= 2;
+                nextBufferSize = (baseBufferSize * (sizeMultiplier*2));
+                nextLatency = nextBufferSize * (bufferCount-1);
+            }   
+
+        }else{
+
+            /* increase size of buffers upto first excess of requestedLatency */
+
+            nextBufferSize = (baseBufferSize * (sizeMultiplier+1));
+            nextLatency = nextBufferSize * (bufferCount-1);
+            while( nextBufferSize <= maximumBufferSize
+                    && nextLatency < requestedLatency )
+            {
+                ++sizeMultiplier;
+                nextBufferSize = (baseBufferSize * (sizeMultiplier+1));
+                nextLatency = nextBufferSize * (bufferCount-1);
+            }
+
+            if( nextLatency < requestedLatency )
+                ++sizeMultiplier;            
+        }
+
+        /* increase number of buffers until requestedLatency is reached */
+
+        latency = (baseBufferSize * sizeMultiplier) * (bufferCount-1);
+        while( latency < requestedLatency )
+        {
+            ++bufferCount;
+            latency = (baseBufferSize * sizeMultiplier) * (bufferCount-1);
+        }
+    }
+
+    *hostBufferSize = baseBufferSize * sizeMultiplier;
+    *hostBufferCount = bufferCount;
+}
+
+
+static void ReselectBufferCount( unsigned long bufferSize,
+    unsigned long requestedLatency,
+    unsigned long baseBufferCount, unsigned long minimumBufferCount,
+    unsigned long *hostBufferCount )
+{
+    unsigned long bufferCount, latency;
+    unsigned long nextLatency;
+
+    bufferCount = baseBufferCount;
+
+    /* count-1 below because latency is always determined by one less
+        than the total number of buffers.
+    */
+    latency = bufferSize * (bufferCount-1);
+
+    if( latency > requestedLatency )
+    {
+        /* reduce number of buffers without falling below suggested latency */
+
+        nextLatency = bufferSize * (bufferCount-2);
+        while( bufferCount > minimumBufferCount && nextLatency >= requestedLatency )
+        {
+            --bufferCount;
+            nextLatency = bufferSize * (bufferCount-2);
+        }
+
+    }else if( latency < requestedLatency ){
+
+        /* increase number of buffers until requestedLatency is reached */
+
+        latency = bufferSize * (bufferCount-1);
+        while( latency < requestedLatency )
+        {
+            ++bufferCount;
+            latency = bufferSize * (bufferCount-1);
+        }                                                         
+    }
+
+    *hostBufferCount = bufferCount;
+}
+
+
+/* CalculateBufferSettings() fills the framesPerHostInputBuffer, hostInputBufferCount,
+   framesPerHostOutputBuffer and hostOutputBufferCount parameters based on the values
+   of the other parameters.
+*/
+
+static PaError CalculateBufferSettings(
+        unsigned long *framesPerHostInputBuffer, unsigned long *hostInputBufferCount,
+        unsigned long *framesPerHostOutputBuffer, unsigned long *hostOutputBufferCount,
+        int inputChannelCount, PaSampleFormat hostInputSampleFormat,
+        PaTime suggestedInputLatency, PaWinMmeStreamInfo *inputStreamInfo,
+        int outputChannelCount, PaSampleFormat hostOutputSampleFormat,
+        PaTime suggestedOutputLatency, PaWinMmeStreamInfo *outputStreamInfo,
+        double sampleRate, unsigned long framesPerBuffer )
+{
+    PaError result = paNoError;
+    int effectiveInputChannelCount, effectiveOutputChannelCount;
+    int hostInputFrameSize = 0;
+    unsigned int i;
+    
+    if( inputChannelCount > 0 )
+    {
+        int hostInputSampleSize = Pa_GetSampleSize( hostInputSampleFormat );
+        if( hostInputSampleSize < 0 )
+        {
+            result = hostInputSampleSize;
+            goto error;
+        }
+
+        if( inputStreamInfo
+                && ( inputStreamInfo->flags & paWinMmeUseMultipleDevices ) )
+        {
+            /* set effectiveInputChannelCount to the largest number of
+                channels on any one device.
+            */
+            effectiveInputChannelCount = 0;
+            for( i=0; i< inputStreamInfo->deviceCount; ++i )
+            {
+                if( inputStreamInfo->devices[i].channelCount > effectiveInputChannelCount )
+                    effectiveInputChannelCount = inputStreamInfo->devices[i].channelCount;
+            }
+        }
+        else
+        {
+            effectiveInputChannelCount = inputChannelCount;
+        }
+
+        hostInputFrameSize = hostInputSampleSize * effectiveInputChannelCount;
+
+        if( inputStreamInfo
+                && ( inputStreamInfo->flags & paWinMmeUseLowLevelLatencyParameters ) )
+        {
+            if( inputStreamInfo->bufferCount <= 0
+                    || inputStreamInfo->framesPerBuffer <= 0 )
+            {
+                result = paIncompatibleHostApiSpecificStreamInfo;
+                goto error;
+            }
+
+            *framesPerHostInputBuffer = inputStreamInfo->framesPerBuffer;
+            *hostInputBufferCount = inputStreamInfo->bufferCount;
+        }
+        else
+        {
+            unsigned long hostBufferSizeBytes, hostBufferCount;
+            unsigned long minimumBufferCount = (outputChannelCount > 0)
+                    ? PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_FULL_DUPLEX_
+                    : PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_HALF_DUPLEX_;
+
+            unsigned long maximumBufferSize = (long) ((PA_MME_MAX_HOST_BUFFER_SECS_ * sampleRate) * hostInputFrameSize);
+            if( maximumBufferSize > PA_MME_MAX_HOST_BUFFER_BYTES_ )
+                maximumBufferSize = PA_MME_MAX_HOST_BUFFER_BYTES_;
+
+            /* compute the following in bytes, then convert back to frames */
+
+            SelectBufferSizeAndCount(
+                ((framesPerBuffer == paFramesPerBufferUnspecified)
+                    ? PA_MME_MIN_HOST_BUFFER_FRAMES_WHEN_UNSPECIFIED_
+                    : framesPerBuffer ) * hostInputFrameSize, /* baseBufferSize */
+                ((unsigned long)(suggestedInputLatency * sampleRate)) * hostInputFrameSize, /* suggestedLatency */
+                4, /* baseBufferCount */
+                minimumBufferCount, maximumBufferSize,
+                &hostBufferSizeBytes, &hostBufferCount );
+
+            *framesPerHostInputBuffer = hostBufferSizeBytes / hostInputFrameSize;
+            *hostInputBufferCount = hostBufferCount;
+        }
+    }
+    else
+    {
+        *framesPerHostInputBuffer = 0;
+        *hostInputBufferCount = 0;
+    }
+
+    if( outputChannelCount > 0 )
+    {
+        if( outputStreamInfo
+                && ( outputStreamInfo->flags & paWinMmeUseLowLevelLatencyParameters ) )
+        {
+            if( outputStreamInfo->bufferCount <= 0
+                    || outputStreamInfo->framesPerBuffer <= 0 )
+            {
+                result = paIncompatibleHostApiSpecificStreamInfo;
+                goto error;
+            }
+
+            *framesPerHostOutputBuffer = outputStreamInfo->framesPerBuffer;
+            *hostOutputBufferCount = outputStreamInfo->bufferCount;
+
+            
+            if( inputChannelCount > 0 ) /* full duplex */
+            {
+                if( *framesPerHostInputBuffer != *framesPerHostOutputBuffer )
+                {
+                    if( inputStreamInfo
+                            && ( inputStreamInfo->flags & paWinMmeUseLowLevelLatencyParameters ) )
+                    { 
+                        /* a custom StreamInfo was used for specifying both input
+                            and output buffer sizes, the larger buffer size
+                            must be a multiple of the smaller buffer size */
+
+                        if( *framesPerHostInputBuffer < *framesPerHostOutputBuffer )
+                        {
+                            if( *framesPerHostOutputBuffer % *framesPerHostInputBuffer != 0 )
+                            {
+                                result = paIncompatibleHostApiSpecificStreamInfo;
+                                goto error;
+                            }
+                        }
+                        else
+                        {
+                            assert( *framesPerHostInputBuffer > *framesPerHostOutputBuffer );
+                            if( *framesPerHostInputBuffer % *framesPerHostOutputBuffer != 0 )
+                            {
+                                result = paIncompatibleHostApiSpecificStreamInfo;
+                                goto error;
+                            }
+                        }                        
+                    }
+                    else
+                    {
+                        /* a custom StreamInfo was not used for specifying the input buffer size,
+                            so use the output buffer size, and approximately the same latency. */
+
+                        *framesPerHostInputBuffer = *framesPerHostOutputBuffer;
+                        *hostInputBufferCount = (((unsigned long)(suggestedInputLatency * sampleRate)) / *framesPerHostInputBuffer) + 1;
+
+                        if( *hostInputBufferCount < PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_FULL_DUPLEX_ )
+                            *hostInputBufferCount = PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_FULL_DUPLEX_;
+                    }
+                }
+            }
+        }
+        else
+        {
+            unsigned long hostBufferSizeBytes, hostBufferCount;
+            unsigned long minimumBufferCount = PA_MME_MIN_HOST_OUTPUT_BUFFER_COUNT_;
+            unsigned long maximumBufferSize;
+            int hostOutputFrameSize;
+            int hostOutputSampleSize;
+
+            hostOutputSampleSize = Pa_GetSampleSize( hostOutputSampleFormat );
+            if( hostOutputSampleSize < 0 )
+            {
+                result = hostOutputSampleSize;
+                goto error;
+            }
+
+            if( outputStreamInfo
+                && ( outputStreamInfo->flags & paWinMmeUseMultipleDevices ) )
+            {
+                /* set effectiveOutputChannelCount to the largest number of
+                    channels on any one device.
+                */
+                effectiveOutputChannelCount = 0;
+                for( i=0; i< outputStreamInfo->deviceCount; ++i )
+                {
+                    if( outputStreamInfo->devices[i].channelCount > effectiveOutputChannelCount )
+                        effectiveOutputChannelCount = outputStreamInfo->devices[i].channelCount;
+                }
+            }
+            else
+            {
+                effectiveOutputChannelCount = outputChannelCount;
+            }
+
+            hostOutputFrameSize = hostOutputSampleSize * effectiveOutputChannelCount;
+            
+            maximumBufferSize = (long) ((PA_MME_MAX_HOST_BUFFER_SECS_ * sampleRate) * hostOutputFrameSize);
+            if( maximumBufferSize > PA_MME_MAX_HOST_BUFFER_BYTES_ )
+                maximumBufferSize = PA_MME_MAX_HOST_BUFFER_BYTES_;
+
+
+            /* compute the following in bytes, then convert back to frames */
+
+            SelectBufferSizeAndCount(
+                ((framesPerBuffer == paFramesPerBufferUnspecified)
+                    ? PA_MME_MIN_HOST_BUFFER_FRAMES_WHEN_UNSPECIFIED_
+                    : framesPerBuffer ) * hostOutputFrameSize, /* baseBufferSize */
+                ((unsigned long)(suggestedOutputLatency * sampleRate)) * hostOutputFrameSize, /* suggestedLatency */
+                4, /* baseBufferCount */
+                minimumBufferCount,
+                maximumBufferSize,
+                &hostBufferSizeBytes, &hostBufferCount );
+
+            *framesPerHostOutputBuffer = hostBufferSizeBytes / hostOutputFrameSize;
+            *hostOutputBufferCount = hostBufferCount;
+
+
+            if( inputChannelCount > 0 )
+            {
+                /* ensure that both input and output buffer sizes are the same.
+                    if they don't match at this stage, choose the smallest one
+                    and use that for input and output
+                */
+
+                if( *framesPerHostOutputBuffer != *framesPerHostInputBuffer )
+                {
+                    if( framesPerHostInputBuffer < framesPerHostOutputBuffer )
+                    {
+                        unsigned long framesPerHostBuffer = *framesPerHostInputBuffer;
+                        
+                        minimumBufferCount = PA_MME_MIN_HOST_OUTPUT_BUFFER_COUNT_;
+                        ReselectBufferCount(
+                            framesPerHostBuffer * hostOutputFrameSize, /* bufferSize */
+                            ((unsigned long)(suggestedOutputLatency * sampleRate)) * hostOutputFrameSize, /* suggestedLatency */
+                            4, /* baseBufferCount */
+                            minimumBufferCount,
+                            &hostBufferCount );
+
+                        *framesPerHostOutputBuffer = framesPerHostBuffer;
+                        *hostOutputBufferCount = hostBufferCount;
+                    }
+                    else
+                    {
+                        unsigned long framesPerHostBuffer = *framesPerHostOutputBuffer;
+                        
+                        minimumBufferCount = PA_MME_MIN_HOST_INPUT_BUFFER_COUNT_FULL_DUPLEX_;
+                        ReselectBufferCount(
+                            framesPerHostBuffer * hostInputFrameSize, /* bufferSize */
+                            ((unsigned long)(suggestedInputLatency * sampleRate)) * hostInputFrameSize, /* suggestedLatency */
+                            4, /* baseBufferCount */
+                            minimumBufferCount,
+                            &hostBufferCount );
+
+                        *framesPerHostInputBuffer = framesPerHostBuffer;
+                        *hostInputBufferCount = hostBufferCount;
+                    }
+                }   
+            }
+        }
+    }
+    else
+    {
+        *framesPerHostOutputBuffer = 0;
+        *hostOutputBufferCount = 0;
+    }
+
+error:
+    return result;
+}
+
+
+typedef struct
+{
+    HANDLE bufferEvent;
+    void *waveHandles;
+    unsigned int deviceCount;
+    /* unsigned int channelCount; */
+    WAVEHDR **waveHeaders;                  /* waveHeaders[device][buffer] */
+    unsigned int bufferCount;
+    unsigned int currentBufferIndex;
+    unsigned int framesPerBuffer;
+    unsigned int framesUsedInCurrentBuffer;
+}PaWinMmeSingleDirectionHandlesAndBuffers;
+
+/* prototypes for functions operating on PaWinMmeSingleDirectionHandlesAndBuffers */
+
+static void InitializeSingleDirectionHandlesAndBuffers( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers );
+static PaError InitializeWaveHandles( PaWinMmeHostApiRepresentation *winMmeHostApi,
+        PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers,
+        unsigned long bytesPerHostSample,
+        double sampleRate, PaWinMmeDeviceAndChannelCount *devices,
+        unsigned int deviceCount, int isInput );
+static PaError TerminateWaveHandles( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers, int isInput, int currentlyProcessingAnError );
+static PaError InitializeWaveHeaders( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers,
+        unsigned long hostBufferCount,
+        PaSampleFormat hostSampleFormat,
+        unsigned long framesPerHostBuffer,
+        PaWinMmeDeviceAndChannelCount *devices,
+        int isInput );
+static void TerminateWaveHeaders( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers, int isInput );
+
+
+static void InitializeSingleDirectionHandlesAndBuffers( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers )
+{
+    handlesAndBuffers->bufferEvent = 0;
+    handlesAndBuffers->waveHandles = 0;
+    handlesAndBuffers->deviceCount = 0;
+    handlesAndBuffers->waveHeaders = 0;
+    handlesAndBuffers->bufferCount = 0;
+}    
+
+static PaError InitializeWaveHandles( PaWinMmeHostApiRepresentation *winMmeHostApi,
+        PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers,
+        unsigned long bytesPerHostSample,
+        double sampleRate, PaWinMmeDeviceAndChannelCount *devices,
+        unsigned int deviceCount, int isInput )
+{
+    PaError result;
+    MMRESULT mmresult;
+    unsigned long bytesPerFrame;
+    WAVEFORMATEX wfx;
+    signed int i;
+
+    /* for error cleanup we expect that InitializeSingleDirectionHandlesAndBuffers()
+        has already been called to zero some fields */       
+
+    result = CreateEventWithPaError( &handlesAndBuffers->bufferEvent, NULL, FALSE, FALSE, NULL );
+    if( result != paNoError ) goto error;
+
+    if( isInput )
+        handlesAndBuffers->waveHandles = (void*)PaUtil_AllocateMemory( sizeof(HWAVEIN) * deviceCount );
+    else
+        handlesAndBuffers->waveHandles = (void*)PaUtil_AllocateMemory( sizeof(HWAVEOUT) * deviceCount );
+    if( !handlesAndBuffers->waveHandles )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    handlesAndBuffers->deviceCount = deviceCount;
+
+    for( i = 0; i < (signed int)deviceCount; ++i )
+    {
+        if( isInput )
+            ((HWAVEIN*)handlesAndBuffers->waveHandles)[i] = 0;
+        else
+            ((HWAVEOUT*)handlesAndBuffers->waveHandles)[i] = 0;
+    }
+
+    wfx.wFormatTag = WAVE_FORMAT_PCM;
+    wfx.nSamplesPerSec = (DWORD) sampleRate;
+    wfx.cbSize = 0;
+    
+    for( i = 0; i < (signed int)deviceCount; ++i )
+    {
+        UINT winMmeDeviceId;
+
+        winMmeDeviceId = LocalDeviceIndexToWinMmeDeviceId( winMmeHostApi, devices[i].device );
+        wfx.nChannels = (WORD)devices[i].channelCount;
+
+        bytesPerFrame = wfx.nChannels * bytesPerHostSample;
+
+        wfx.nAvgBytesPerSec = (DWORD)(bytesPerFrame * sampleRate);
+        wfx.nBlockAlign = (WORD)bytesPerFrame;
+        wfx.wBitsPerSample = (WORD)((bytesPerFrame/wfx.nChannels) * 8);
+
+        /* REVIEW: consider not firing an event for input when a full duplex
+            stream is being used. this would probably depend on the
+            neverDropInput flag. */
+
+        if( isInput )
+            mmresult = waveInOpen( &((HWAVEIN*)handlesAndBuffers->waveHandles)[i], winMmeDeviceId, &wfx,
+                               (DWORD)handlesAndBuffers->bufferEvent, (DWORD)0, CALLBACK_EVENT );
+        else
+            mmresult = waveOutOpen( &((HWAVEOUT*)handlesAndBuffers->waveHandles)[i], winMmeDeviceId, &wfx,
+                                (DWORD)handlesAndBuffers->bufferEvent, (DWORD)0, CALLBACK_EVENT );
+
+        if( mmresult != MMSYSERR_NOERROR )
+        {
+            switch( mmresult )
+            {
+                case MMSYSERR_ALLOCATED:    /* Specified resource is already allocated. */
+                    result = paDeviceUnavailable;
+                    break;
+                case MMSYSERR_NODRIVER:	    /* No device driver is present. */
+                    result = paDeviceUnavailable;
+                    break;
+                case MMSYSERR_NOMEM:	    /* Unable to allocate or lock memory. */
+                    result = paInsufficientMemory;
+                    break;
+
+                case MMSYSERR_BADDEVICEID:	/* Specified device identifier is out of range. */
+                    /* falls through */
+                case WAVERR_BADFORMAT:      /* Attempted to open with an unsupported waveform-audio format. */
+                    /* falls through */
+                default:
+                    result = paUnanticipatedHostError;
+                    if( isInput )
+                    {
+                        PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );
+                    }
+                    else
+                    {
+                        PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );
+                    }
+            }
+            goto error;
+        }
+    }
+
+    return result;
+
+error:
+    TerminateWaveHandles( handlesAndBuffers, isInput, 1 /* currentlyProcessingAnError */ );
+
+    return result;
+}
+
+
+static PaError TerminateWaveHandles( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers, int isInput, int currentlyProcessingAnError )
+{
+    PaError result = paNoError;
+    MMRESULT mmresult = 0;
+    signed int i;
+    
+    if( handlesAndBuffers->waveHandles )
+    {
+        for( i = handlesAndBuffers->deviceCount-1; i >= 0; --i )
+        {
+            if( isInput )
+            {
+                if( ((HWAVEIN*)handlesAndBuffers->waveHandles)[i] )
+                    mmresult = waveInClose( ((HWAVEIN*)handlesAndBuffers->waveHandles)[i] );
+            }
+            else
+            {
+                if( ((HWAVEOUT*)handlesAndBuffers->waveHandles)[i] )
+                    mmresult = waveOutClose( ((HWAVEOUT*)handlesAndBuffers->waveHandles)[i] );
+            }
+
+            if( mmresult != MMSYSERR_NOERROR &&
+                !currentlyProcessingAnError ) /* don't update the error state if we're already processing an error */
+            {
+                result = paUnanticipatedHostError;
+                if( isInput )
+                {
+                    PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );
+                }
+                else
+                {
+                    PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );
+                }
+                /* note that we don't break here, we try to continue closing devices */
+            }
+        }
+
+        PaUtil_FreeMemory( handlesAndBuffers->waveHandles );
+        handlesAndBuffers->waveHandles = 0;
+    }
+
+    if( handlesAndBuffers->bufferEvent )
+    {
+        result = CloseHandleWithPaError( handlesAndBuffers->bufferEvent );
+        handlesAndBuffers->bufferEvent = 0;
+    }
+    
+    return result;
+}
+
+
+static PaError InitializeWaveHeaders( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers,
+        unsigned long hostBufferCount,
+        PaSampleFormat hostSampleFormat,
+        unsigned long framesPerHostBuffer,
+        PaWinMmeDeviceAndChannelCount *devices,
+        int isInput )
+{
+    PaError result = paNoError;
+    MMRESULT mmresult;
+    WAVEHDR *deviceWaveHeaders;
+    signed int i, j;
+
+    /* for error cleanup we expect that InitializeSingleDirectionHandlesAndBuffers()
+        has already been called to zero some fields */
+        
+
+    /* allocate an array of pointers to arrays of wave headers, one array of
+        wave headers per device */
+    handlesAndBuffers->waveHeaders = (WAVEHDR**)PaUtil_AllocateMemory( sizeof(WAVEHDR*) * handlesAndBuffers->deviceCount );
+    if( !handlesAndBuffers->waveHeaders )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+    
+    for( i = 0; i < (signed int)handlesAndBuffers->deviceCount; ++i )
+        handlesAndBuffers->waveHeaders[i] = 0;
+
+    handlesAndBuffers->bufferCount = hostBufferCount;
+
+    for( i = 0; i < (signed int)handlesAndBuffers->deviceCount; ++i )
+    {
+        int bufferBytes = Pa_GetSampleSize( hostSampleFormat ) *
+                framesPerHostBuffer * devices[i].channelCount;
+        if( bufferBytes < 0 )
+        {
+            result = paInternalError;
+            goto error;
+        }
+
+        /* Allocate an array of wave headers for device i */
+        deviceWaveHeaders = (WAVEHDR *) PaUtil_AllocateMemory( sizeof(WAVEHDR)*hostBufferCount );
+        if( !deviceWaveHeaders )
+        {
+            result = paInsufficientMemory;
+            goto error;
+        }
+
+        for( j=0; j < (signed int)hostBufferCount; ++j )
+            deviceWaveHeaders[j].lpData = 0;
+
+        handlesAndBuffers->waveHeaders[i] = deviceWaveHeaders;
+
+        /* Allocate a buffer for each wave header */
+        for( j=0; j < (signed int)hostBufferCount; ++j )
+        {
+            deviceWaveHeaders[j].lpData = (char *)PaUtil_AllocateMemory( bufferBytes );
+            if( !deviceWaveHeaders[j].lpData )
+            {
+                result = paInsufficientMemory;
+                goto error;
+            }
+            deviceWaveHeaders[j].dwBufferLength = bufferBytes;
+            deviceWaveHeaders[j].dwUser = 0xFFFFFFFF; /* indicates that *PrepareHeader() has not yet been called, for error clean up code */
+
+            if( isInput )
+            {
+                mmresult = waveInPrepareHeader( ((HWAVEIN*)handlesAndBuffers->waveHandles)[i], &deviceWaveHeaders[j], sizeof(WAVEHDR) );
+                if( mmresult != MMSYSERR_NOERROR )
+                {
+                    result = paUnanticipatedHostError;
+                    PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );
+                    goto error;
+                }
+            }
+            else /* output */
+            {
+                mmresult = waveOutPrepareHeader( ((HWAVEOUT*)handlesAndBuffers->waveHandles)[i], &deviceWaveHeaders[j], sizeof(WAVEHDR) );
+                if( mmresult != MMSYSERR_NOERROR )
+                {
+                    result = paUnanticipatedHostError;
+                    PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );
+                    goto error;
+                }
+            }
+            deviceWaveHeaders[j].dwUser = devices[i].channelCount;
+        }
+    }
+
+    return result;
+
+error:
+    TerminateWaveHeaders( handlesAndBuffers, isInput );
+    
+    return result;
+}
+
+
+static void TerminateWaveHeaders( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers, int isInput )
+{
+    signed int i, j;
+    WAVEHDR *deviceWaveHeaders;
+    
+    if( handlesAndBuffers->waveHeaders )
+    {
+        for( i = handlesAndBuffers->deviceCount-1; i >= 0 ; --i )
+        {
+            deviceWaveHeaders = handlesAndBuffers->waveHeaders[i];  /* wave headers for device i */
+            if( deviceWaveHeaders )
+            {
+                for( j = handlesAndBuffers->bufferCount-1; j >= 0; --j )
+                {
+                    if( deviceWaveHeaders[j].lpData )
+                    {
+                        if( deviceWaveHeaders[j].dwUser != 0xFFFFFFFF )
+                        {
+                            if( isInput )
+                                waveInUnprepareHeader( ((HWAVEIN*)handlesAndBuffers->waveHandles)[i], &deviceWaveHeaders[j], sizeof(WAVEHDR) );
+                            else
+                                waveOutUnprepareHeader( ((HWAVEOUT*)handlesAndBuffers->waveHandles)[i], &deviceWaveHeaders[j], sizeof(WAVEHDR) );
+                        }
+
+                        PaUtil_FreeMemory( deviceWaveHeaders[j].lpData );
+                    }
+                }
+
+                PaUtil_FreeMemory( deviceWaveHeaders );
+            }
+        }
+
+        PaUtil_FreeMemory( handlesAndBuffers->waveHeaders );
+        handlesAndBuffers->waveHeaders = 0;
+    }
+}
+
+
+
+/* PaWinMmeStream - a stream data structure specifically for this implementation */
+/* note that struct PaWinMmeStream is typedeffed to PaWinMmeStream above. */
+struct PaWinMmeStream
+{
+    PaUtilStreamRepresentation streamRepresentation;
+    PaUtilCpuLoadMeasurer cpuLoadMeasurer;
+    PaUtilBufferProcessor bufferProcessor;
+
+    int primeStreamUsingCallback;
+
+    PaWinMmeSingleDirectionHandlesAndBuffers input;
+    PaWinMmeSingleDirectionHandlesAndBuffers output;
+
+    /* Processing thread management -------------- */
+    HANDLE abortEvent;
+    HANDLE processingThread;
+    DWORD processingThreadId;
+
+    char throttleProcessingThreadOnOverload; /* 0 -> don't throtte, non-0 -> throttle */
+    int processingThreadPriority;
+    int highThreadPriority;
+    int throttledThreadPriority;
+    unsigned long throttledSleepMsecs;
+
+    int isStopped;
+    volatile int isActive;
+    volatile int stopProcessing; /* stop thread once existing buffers have been returned */
+    volatile int abortProcessing; /* stop thread immediately */
+
+    DWORD allBuffersDurationMs; /* used to calculate timeouts */
+};
+
+/* updates deviceCount if PaWinMmeUseMultipleDevices is used */
+
+static PaError ValidateWinMmeSpecificStreamInfo(
+        const PaStreamParameters *streamParameters,
+        const PaWinMmeStreamInfo *streamInfo,
+        char *throttleProcessingThreadOnOverload,
+        unsigned long *deviceCount )
+{
+	if( streamInfo )
+	{
+	    if( streamInfo->size != sizeof( PaWinMmeStreamInfo )
+	            || streamInfo->version != 1 )
+	    {
+	        return paIncompatibleHostApiSpecificStreamInfo;
+	    }
+
+	    if( streamInfo->flags & paWinMmeDontThrottleOverloadedProcessingThread )
+	        *throttleProcessingThreadOnOverload = 0;
+            
+	    if( streamInfo->flags & paWinMmeUseMultipleDevices )
+	    {
+	        if( streamParameters->device != paUseHostApiSpecificDeviceSpecification )
+	            return paInvalidDevice;
+	
+			*deviceCount = streamInfo->deviceCount;
+		}	
+	}
+
+	return paNoError;
+}
+
+static PaError RetrieveDevicesFromStreamParameters(
+        struct PaUtilHostApiRepresentation *hostApi,
+        const PaStreamParameters *streamParameters,
+        const PaWinMmeStreamInfo *streamInfo,
+        PaWinMmeDeviceAndChannelCount *devices,
+        unsigned long deviceCount )
+{
+    PaError result = paNoError;
+    unsigned int i;
+    int totalChannelCount;
+    PaDeviceIndex hostApiDevice;
+    
+	if( streamInfo && streamInfo->flags & paWinMmeUseMultipleDevices )
+	{
+		totalChannelCount = 0;
+	    for( i=0; i < deviceCount; ++i )
+	    {
+	        /* validate that the device number is within range */
+	        result = PaUtil_DeviceIndexToHostApiDeviceIndex( &hostApiDevice,
+	                        streamInfo->devices[i].device, hostApi );
+	        if( result != paNoError )
+	            return result;
+	        
+	        devices[i].device = hostApiDevice;
+	        devices[i].channelCount = streamInfo->devices[i].channelCount;
+	
+	        totalChannelCount += devices[i].channelCount;
+	    }
+	
+	    if( totalChannelCount != streamParameters->channelCount )
+	    {
+	        /* channelCount must match total channels specified by multiple devices */
+	        return paInvalidChannelCount; /* REVIEW use of this error code */
+	    }
+	}	
+	else
+	{		
+	    devices[0].device = streamParameters->device;
+	    devices[0].channelCount = streamParameters->channelCount;
+	}
+
+    return result;
+}
+
+static PaError ValidateInputChannelCounts(
+        struct PaUtilHostApiRepresentation *hostApi,
+        PaWinMmeDeviceAndChannelCount *devices,
+        unsigned long deviceCount )
+{
+    unsigned int i;
+
+	for( i=0; i < deviceCount; ++i )
+	{
+		if( devices[i].channelCount < 1 || devices[i].channelCount
+					> hostApi->deviceInfos[ devices[i].device ]->maxInputChannels )
+        	return paInvalidChannelCount;
+	}
+
+    return paNoError;
+}
+
+static PaError ValidateOutputChannelCounts(
+        struct PaUtilHostApiRepresentation *hostApi,
+        PaWinMmeDeviceAndChannelCount *devices,
+        unsigned long deviceCount )
+{
+    unsigned int i;
+
+	for( i=0; i < deviceCount; ++i )
+	{
+		if( devices[i].channelCount < 1 || devices[i].channelCount
+					> hostApi->deviceInfos[ devices[i].device ]->maxOutputChannels )
+        	return paInvalidChannelCount;
+	}
+
+    return paNoError;
+}
+
+
+/* the following macros are intended to improve the readability of the following code */
+#define PA_IS_INPUT_STREAM_( stream ) ( stream ->input.waveHandles )
+#define PA_IS_OUTPUT_STREAM_( stream ) ( stream ->output.waveHandles )
+#define PA_IS_FULL_DUPLEX_STREAM_( stream ) ( stream ->input.waveHandles && stream ->output.waveHandles )
+#define PA_IS_HALF_DUPLEX_STREAM_( stream ) ( !(stream ->input.waveHandles && stream ->output.waveHandles) )
+
+static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi,
+                           PaStream** s,
+                           const PaStreamParameters *inputParameters,
+                           const PaStreamParameters *outputParameters,
+                           double sampleRate,
+                           unsigned long framesPerBuffer,
+                           PaStreamFlags streamFlags,
+                           PaStreamCallback *streamCallback,
+                           void *userData )
+{
+    PaError result;
+    PaWinMmeHostApiRepresentation *winMmeHostApi = (PaWinMmeHostApiRepresentation*)hostApi;
+    PaWinMmeStream *stream = 0;
+    int bufferProcessorIsInitialized = 0;
+    int streamRepresentationIsInitialized = 0;
+    PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat;
+    int inputChannelCount, outputChannelCount;
+    PaSampleFormat inputSampleFormat, outputSampleFormat;
+    double suggestedInputLatency, suggestedOutputLatency;
+    PaWinMmeStreamInfo *inputStreamInfo, *outputStreamInfo;
+    unsigned long framesPerHostInputBuffer;
+    unsigned long hostInputBufferCount;
+    unsigned long framesPerHostOutputBuffer;
+    unsigned long hostOutputBufferCount;
+    unsigned long framesPerBufferProcessorCall=0;
+    PaWinMmeDeviceAndChannelCount *inputDevices = 0;  /* contains all devices and channel counts as local host api ids, even when PaWinMmeUseMultipleDevices is not used */
+    unsigned long inputDeviceCount = 0;            
+    PaWinMmeDeviceAndChannelCount *outputDevices = 0;
+    unsigned long outputDeviceCount = 0;                /* contains all devices and channel counts as local host api ids, even when PaWinMmeUseMultipleDevices is not used */
+    char throttleProcessingThreadOnOverload = 1;
+
+    
+    if( inputParameters )
+    {
+		inputChannelCount = inputParameters->channelCount;
+        inputSampleFormat = inputParameters->sampleFormat;
+        suggestedInputLatency = inputParameters->suggestedLatency;
+
+      	inputDeviceCount = 1;
+
+		/* validate input hostApiSpecificStreamInfo */
+        inputStreamInfo = (PaWinMmeStreamInfo*)inputParameters->hostApiSpecificStreamInfo;
+		result = ValidateWinMmeSpecificStreamInfo( inputParameters, inputStreamInfo,
+				&throttleProcessingThreadOnOverload,
+				&inputDeviceCount );
+		if( result != paNoError ) return result;
+
+		inputDevices = (PaWinMmeDeviceAndChannelCount*)alloca( sizeof(PaWinMmeDeviceAndChannelCount) * inputDeviceCount );
+        if( !inputDevices ) return paInsufficientMemory;
+
+		result = RetrieveDevicesFromStreamParameters( hostApi, inputParameters, inputStreamInfo, inputDevices, inputDeviceCount );
+		if( result != paNoError ) return result;
+
+		result = ValidateInputChannelCounts( hostApi, inputDevices, inputDeviceCount );
+		if( result != paNoError ) return result;
+
+        hostInputSampleFormat =
+            PaUtil_SelectClosestAvailableFormat( paInt16 /* native formats */, inputSampleFormat );
+	}
+    else
+    {
+        inputChannelCount = 0;
+        inputSampleFormat = 0;
+        suggestedInputLatency = 0.;
+        inputStreamInfo = 0;
+        hostInputSampleFormat = 0;
+    }
+
+
+    if( outputParameters )
+    {
+        outputChannelCount = outputParameters->channelCount;
+        outputSampleFormat = outputParameters->sampleFormat;
+        suggestedOutputLatency = outputParameters->suggestedLatency;
+
+        outputDeviceCount = 1;
+
+		/* validate output hostApiSpecificStreamInfo */
+        outputStreamInfo = (PaWinMmeStreamInfo*)outputParameters->hostApiSpecificStreamInfo;
+		result = ValidateWinMmeSpecificStreamInfo( outputParameters, outputStreamInfo,
+				&throttleProcessingThreadOnOverload,
+				&outputDeviceCount );
+		if( result != paNoError ) return result;
+
+		outputDevices = (PaWinMmeDeviceAndChannelCount*)alloca( sizeof(PaWinMmeDeviceAndChannelCount) * outputDeviceCount );
+        if( !outputDevices ) return paInsufficientMemory;
+
+		result = RetrieveDevicesFromStreamParameters( hostApi, outputParameters, outputStreamInfo, outputDevices, outputDeviceCount );
+		if( result != paNoError ) return result;
+
+		result = ValidateOutputChannelCounts( hostApi, outputDevices, outputDeviceCount );
+		if( result != paNoError ) return result;
+
+        hostOutputSampleFormat =
+            PaUtil_SelectClosestAvailableFormat( paInt16 /* native formats */, outputSampleFormat );
+    }
+    else
+    {
+        outputChannelCount = 0;
+        outputSampleFormat = 0;
+        outputStreamInfo = 0;
+        hostOutputSampleFormat = 0;
+        suggestedOutputLatency = 0.;
+    }
+
+
+    /*
+        IMPLEMENT ME:
+            - alter sampleRate to a close allowable rate if possible / necessary
+    */
+
+
+    /* validate platform specific flags */
+    if( (streamFlags & paPlatformSpecificFlags) != 0 )
+        return paInvalidFlag; /* unexpected platform specific flag */
+
+
+    result = CalculateBufferSettings( &framesPerHostInputBuffer, &hostInputBufferCount,
+                &framesPerHostOutputBuffer, &hostOutputBufferCount,
+                inputChannelCount, hostInputSampleFormat, suggestedInputLatency, inputStreamInfo,
+                outputChannelCount, hostOutputSampleFormat, suggestedOutputLatency, outputStreamInfo,
+                sampleRate, framesPerBuffer );
+    if( result != paNoError ) goto error;
+
+
+    stream = (PaWinMmeStream*)PaUtil_AllocateMemory( sizeof(PaWinMmeStream) );
+    if( !stream )
+    {
+        result = paInsufficientMemory;
+        goto error;
+    }
+
+    InitializeSingleDirectionHandlesAndBuffers( &stream->input );
+    InitializeSingleDirectionHandlesAndBuffers( &stream->output );
+
+    stream->abortEvent = 0;
+    stream->processingThread = 0;
+
+    stream->throttleProcessingThreadOnOverload = throttleProcessingThreadOnOverload;
+
+    PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation,
+                                           ( (streamCallback)
+                                            ? &winMmeHostApi->callbackStreamInterface
+                                            : &winMmeHostApi->blockingStreamInterface ),
+                                           streamCallback, userData );
+    streamRepresentationIsInitialized = 1;
+
+    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate );
+
+
+    if( inputParameters && outputParameters ) /* full duplex */
+    {
+        if( framesPerHostInputBuffer < framesPerHostOutputBuffer )
+        {
+            assert( (framesPerHostOutputBuffer % framesPerHostInputBuffer) == 0 ); /* CalculateBufferSettings() should guarantee this condition */
+
+            framesPerBufferProcessorCall = framesPerHostInputBuffer;
+        }
+        else
+        {
+            assert( (framesPerHostInputBuffer % framesPerHostOutputBuffer) == 0 ); /* CalculateBufferSettings() should guarantee this condition */
+            
+            framesPerBufferProcessorCall = framesPerHostOutputBuffer;
+        }
+    }
+    else if( inputParameters )
+    {
+        framesPerBufferProcessorCall = framesPerHostInputBuffer;
+    }
+    else if( outputParameters )
+    {
+        framesPerBufferProcessorCall = framesPerHostOutputBuffer;
+    }
+
+    stream->input.framesPerBuffer = framesPerHostInputBuffer;
+    stream->output.framesPerBuffer = framesPerHostOutputBuffer;
+
+    result =  PaUtil_InitializeBufferProcessor( &stream->bufferProcessor,
+                    inputChannelCount, inputSampleFormat, hostInputSampleFormat,
+                    outputChannelCount, outputSampleFormat, hostOutputSampleFormat,
+                    sampleRate, streamFlags, framesPerBuffer,
+                    framesPerBufferProcessorCall, paUtilFixedHostBufferSize,
+                    streamCallback, userData );
+    if( result != paNoError ) goto error;
+    
+    bufferProcessorIsInitialized = 1;
+
+    stream->streamRepresentation.streamInfo.inputLatency =
+            (double)(PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor)
+                +(framesPerHostInputBuffer * (hostInputBufferCount-1))) / sampleRate;
+    stream->streamRepresentation.streamInfo.outputLatency =
+            (double)(PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor)
+                +(framesPerHostOutputBuffer * (hostOutputBufferCount-1))) / sampleRate;
+    stream->streamRepresentation.streamInfo.sampleRate = sampleRate;
+
+    stream->primeStreamUsingCallback = ( (streamFlags&paPrimeOutputBuffersUsingStreamCallback) && streamCallback ) ? 1 : 0;
+
+    /* time to sleep when throttling due to >100% cpu usage.
+        -a quater of a buffer's duration */
+    stream->throttledSleepMsecs =
+            (unsigned long)(stream->bufferProcessor.framesPerHostBuffer *
+             stream->bufferProcessor.samplePeriod * .25 * 1000);
+
+    stream->isStopped = 1;
+    stream->isActive = 0;
+
+
+    /* for maximum compatibility with multi-device multichannel drivers,
+        we first open all devices, then we prepare all buffers, finally
+        we start all devices ( in StartStream() ). teardown in reverse order.
+    */
+
+    if( inputParameters )
+    {
+        result = InitializeWaveHandles( winMmeHostApi, &stream->input,
+                stream->bufferProcessor.bytesPerHostInputSample, sampleRate,
+                inputDevices, inputDeviceCount, 1 /* isInput */ );
+        if( result != paNoError ) goto error;
+    }
+    
+    if( outputParameters )
+    {
+        result = InitializeWaveHandles( winMmeHostApi, &stream->output,
+                stream->bufferProcessor.bytesPerHostOutputSample, sampleRate,
+                outputDevices, outputDeviceCount, 0 /* isInput */ );
+        if( result != paNoError ) goto error;
+    }
+
+    if( inputParameters )
+    {
+        result = InitializeWaveHeaders( &stream->input, hostInputBufferCount,
+                hostInputSampleFormat, framesPerHostInputBuffer, inputDevices, 1 /* isInput */ );
+        if( result != paNoError ) goto error;
+    }
+
+    if( outputParameters )
+    {
+        result = InitializeWaveHeaders( &stream->output, hostOutputBufferCount,
+                hostOutputSampleFormat, framesPerHostOutputBuffer, outputDevices, 0 /* not isInput */ );
+        if( result != paNoError ) goto error;
+
+        stream->allBuffersDurationMs = (DWORD) (1000.0 * (framesPerHostOutputBuffer * stream->output.bufferCount) / sampleRate);
+    }
+    else
+    {
+        stream->allBuffersDurationMs = (DWORD) (1000.0 * (framesPerHostInputBuffer * stream->input.bufferCount) / sampleRate);
+    }
+
+    
+    if( streamCallback )
+    {
+        /* abort event is only needed for callback streams */
+        result = CreateEventWithPaError( &stream->abortEvent, NULL, TRUE, FALSE, NULL );
+        if( result != paNoError ) goto error;
+    }
+
+    *s = (PaStream*)stream;
+
+    return result;
+
+error:
+
+    if( stream )
+    {
+        if( stream->abortEvent )
+            CloseHandle( stream->abortEvent );
+            
+        TerminateWaveHeaders( &stream->output, 0 /* not isInput */ );
+        TerminateWaveHeaders( &stream->input, 1 /* isInput */ );
+
+        TerminateWaveHandles( &stream->output, 0 /* not isInput */, 1 /* currentlyProcessingAnError */ );
+        TerminateWaveHandles( &stream->input, 1 /* isInput */, 1 /* currentlyProcessingAnError */ );
+
+        if( bufferProcessorIsInitialized )
+            PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
+
+        if( streamRepresentationIsInitialized )
+            PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );
+
+        PaUtil_FreeMemory( stream );
+    }
+
+    return result;
+}
+
+
+/* return non-zero if all current buffers are done */
+static int BuffersAreDone( WAVEHDR **waveHeaders, unsigned int deviceCount, int bufferIndex )
+{
+    unsigned int i;
+    
+    for( i=0; i < deviceCount; ++i )
+    {
+        if( !(waveHeaders[i][ bufferIndex ].dwFlags & WHDR_DONE) )
+        {
+            return 0;
+        }         
+    }
+
+    return 1;
+}
+
+static int CurrentInputBuffersAreDone( PaWinMmeStream *stream )
+{
+    return BuffersAreDone( stream->input.waveHeaders, stream->input.deviceCount, stream->input.currentBufferIndex );
+}
+
+static int CurrentOutputBuffersAreDone( PaWinMmeStream *stream )
+{
+    return BuffersAreDone( stream->output.waveHeaders, stream->output.deviceCount, stream->output.currentBufferIndex );
+}
+
+
+/* return non-zero if any buffers are queued */
+static int NoBuffersAreQueued( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers )
+{
+    unsigned int i, j;
+
+    if( handlesAndBuffers->waveHandles )
+    {
+        for( i=0; i < handlesAndBuffers->bufferCount; ++i )
+        {
+            for( j=0; j < handlesAndBuffers->deviceCount; ++j )
+            {
+                if( !( handlesAndBuffers->waveHeaders[ j ][ i ].dwFlags & WHDR_DONE) )
+                {
+                    return 0;
+                }
+            }
+        }
+    }
+
+    return 1;
+}
+
+
+#define PA_CIRCULAR_INCREMENT_( current, max )\
+    ( (((current) + 1) >= (max)) ? (0) : (current+1) )
+
+#define PA_CIRCULAR_DECREMENT_( current, max )\
+    ( ((current) == 0) ? ((max)-1) : (current-1) )
+    
+
+static signed long GetAvailableFrames( PaWinMmeSingleDirectionHandlesAndBuffers *handlesAndBuffers )
+{
+    signed long result = 0;
+    unsigned int i;
+    
+    if( BuffersAreDone( handlesAndBuffers->waveHeaders, handlesAndBuffers->deviceCount, handlesAndBuffers->currentBufferIndex ) )
+    {
+        /* we could calculate the following in O(1) if we kept track of the
+            last done buffer */
+        result = handlesAndBuffers->framesPerBuffer - handlesAndBuffers->framesUsedInCurrentBuffer;
+
+        i = PA_CIRCULAR_INCREMENT_( handlesAndBuffers->currentBufferIndex, handlesAndBuffers->bufferCount );
+        while( i != handlesAndBuffers->currentBufferIndex )
+        {
+            if( BuffersAreDone( handlesAndBuffers->waveHeaders, handlesAndBuffers->deviceCount, i ) )
+            {
+                result += handlesAndBuffers->framesPerBuffer;
+                i = PA_CIRCULAR_INCREMENT_( i, handlesAndBuffers->bufferCount );
+            }
+            else
+                break;
+        }
+    }
+
+    return result;
+}
+
+
+static PaError AdvanceToNextInputBuffer( PaWinMmeStream *stream )
+{
+    PaError result = paNoError;
+    MMRESULT mmresult;
+    unsigned int i;
+
+    for( i=0; i < stream->input.deviceCount; ++i )
+    {
+        mmresult = waveInAddBuffer( ((HWAVEIN*)stream->input.waveHandles)[i],
+                                    &stream->input.waveHeaders[i][ stream->input.currentBufferIndex ],
+                                    sizeof(WAVEHDR) );
+        if( mmresult != MMSYSERR_NOERROR )
+        {
+            result = paUnanticipatedHostError;
+            PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );
+        }
+    }
+
+    stream->input.currentBufferIndex =
+            PA_CIRCULAR_INCREMENT_( stream->input.currentBufferIndex, stream->input.bufferCount );
+
+    stream->input.framesUsedInCurrentBuffer = 0;
+
+    return result;
+}
+
+
+static PaError AdvanceToNextOutputBuffer( PaWinMmeStream *stream )
+{
+    PaError result = paNoError;
+    MMRESULT mmresult;
+    unsigned int i;
+
+    for( i=0; i < stream->output.deviceCount; ++i )
+    {
+        mmresult = waveOutWrite( ((HWAVEOUT*)stream->output.waveHandles)[i],
+                                 &stream->output.waveHeaders[i][ stream->output.currentBufferIndex ],
+                                 sizeof(WAVEHDR) );
+        if( mmresult != MMSYSERR_NOERROR )
+        {
+            result = paUnanticipatedHostError;
+            PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );
+        }
+    }
+
+    stream->output.currentBufferIndex =
+            PA_CIRCULAR_INCREMENT_( stream->output.currentBufferIndex, stream->output.bufferCount );
+
+    stream->output.framesUsedInCurrentBuffer = 0;
+    
+    return result;
+}
+
+
+/* requeue all but the most recent input with the driver. Used for catching
+    up after a total input buffer underrun */
+static PaError CatchUpInputBuffers( PaWinMmeStream *stream )
+{
+    PaError result = paNoError;
+    unsigned int i;
+    
+    for( i=0; i < stream->input.bufferCount - 1; ++i )
+    {
+        result = AdvanceToNextInputBuffer( stream );
+        if( result != paNoError )
+            break;
+    }
+
+    return result;
+}
+
+
+/* take the most recent output and duplicate it to all other output buffers
+    and requeue them. Used for catching up after a total output buffer underrun.
+*/
+static PaError CatchUpOutputBuffers( PaWinMmeStream *stream )
+{
+    PaError result = paNoError;
+    unsigned int i, j;
+    unsigned int previousBufferIndex =
+            PA_CIRCULAR_DECREMENT_( stream->output.currentBufferIndex, stream->output.bufferCount );
+
+    for( i=0; i < stream->output.bufferCount - 1; ++i )
+    {
+        for( j=0; j < stream->output.deviceCount; ++j )
+        {
+            if( stream->output.waveHeaders[j][ stream->output.currentBufferIndex ].lpData
+                    != stream->output.waveHeaders[j][ previousBufferIndex ].lpData )
+            {
+                CopyMemory( stream->output.waveHeaders[j][ stream->output.currentBufferIndex ].lpData,
+                            stream->output.waveHeaders[j][ previousBufferIndex ].lpData,
+                            stream->output.waveHeaders[j][ stream->output.currentBufferIndex ].dwBufferLength );
+            }
+        }
+
+        result = AdvanceToNextOutputBuffer( stream );
+        if( result != paNoError )
+            break;
+    }
+
+    return result;
+}
+
+
+static DWORD WINAPI ProcessingThreadProc( void *pArg )
+{
+    PaWinMmeStream *stream = (PaWinMmeStream *)pArg;
+    HANDLE events[3];
+    int eventCount = 0;
+    DWORD result = paNoError;
+    DWORD waitResult;
+    DWORD timeout = (unsigned long)(stream->allBuffersDurationMs * 0.5);
+    int hostBuffersAvailable;
+    signed int hostInputBufferIndex, hostOutputBufferIndex;
+    PaStreamCallbackFlags statusFlags;
+    int callbackResult;
+    int done = 0;
+    unsigned int channel, i;
+    unsigned long framesProcessed;
+    
+    /* prepare event array for call to WaitForMultipleObjects() */
+    if( stream->input.bufferEvent )
+        events[eventCount++] = stream->input.bufferEvent;
+    if( stream->output.bufferEvent )
+        events[eventCount++] = stream->output.bufferEvent;
+    events[eventCount++] = stream->abortEvent;
+
+    statusFlags = 0; /** @todo support paInputUnderflow, paOutputOverflow and paNeverDropInput */
+    
+    /* loop until something causes us to stop */
+    do{
+        /* wait for MME to signal that a buffer is available, or for
+            the PA abort event to be signaled.
+
+          When this indicates that one or more buffers are available
+          NoBuffersAreQueued() and Current*BuffersAreDone are used below to
+          poll for additional done buffers. NoBuffersAreQueued() will fail
+          to identify an underrun/overflow if the driver doesn't mark all done
+          buffers prior to signalling the event. Some drivers do this
+          (eg RME Digi96, and others don't eg VIA PC 97 input). This isn't a
+          huge problem, it just means that we won't always be able to detect
+          underflow/overflow.
+        */
+        waitResult = WaitForMultipleObjects( eventCount, events, FALSE /* wait all = FALSE */, timeout );
+        if( waitResult == WAIT_FAILED )
+        {
+            result = paUnanticipatedHostError;
+            /** @todo FIXME/REVIEW: can't return host error info from an asyncronous thread */
+            done = 1;
+        }
+        else if( waitResult == WAIT_TIMEOUT )
+        {
+            /* if a timeout is encountered, continue */
+        }
+
+        if( stream->abortProcessing )
+        {
+            /* Pa_AbortStream() has been called, stop processing immediately */
+            done = 1;
+        }
+        else if( stream->stopProcessing )
+        {
+            /* Pa_StopStream() has been called or the user callback returned
+                non-zero, processing will continue until all output buffers
+                are marked as done. The stream will stop immediately if it
+                is input-only.
+            */
+
+            if( PA_IS_OUTPUT_STREAM_(stream) )
+            {
+                if( NoBuffersAreQueued( &stream->output ) )
+                    done = 1; /* Will cause thread to return. */
+            }
+            else
+            {
+                /* input only stream */
+                done = 1; /* Will cause thread to return. */
+            }
+        }
+        else
+        {
+            hostBuffersAvailable = 1;
+
+            /* process all available host buffers */
+            do
+            {
+                hostInputBufferIndex = -1;
+                hostOutputBufferIndex = -1;
+                
+                if( PA_IS_INPUT_STREAM_(stream) )
+                {
+                    if( CurrentInputBuffersAreDone( stream ) )
+                    {
+                        if( NoBuffersAreQueued( &stream->input ) )
+                        {
+                            /** @todo
+                               if all of the other buffers are also ready then
+                               we discard all but the most recent. This is an
+                               input buffer overflow. FIXME: these buffers should
+                               be passed to the callback in a paNeverDropInput
+                               stream.
+
+                               note that it is also possible for an input overflow
+                               to happen while the callback is processing a buffer.
+                               that is handled further down.
+                            */
+                            result = CatchUpInputBuffers( stream );
+                            if( result != paNoError )
+                                done = 1;
+
+                            statusFlags |= paInputOverflow;
+                        }
+
+                        hostInputBufferIndex = stream->input.currentBufferIndex;
+                    }
+                }
+
+                if( PA_IS_OUTPUT_STREAM_(stream) )
+                {
+                    if( CurrentOutputBuffersAreDone( stream ) )
+                    {
+                        /* ok, we have an output buffer */
+                        
+                        if( NoBuffersAreQueued( &stream->output ) )
+                        {
+                            /*
+                            if all of the other buffers are also ready, catch up by copying
+                            the most recently generated buffer into all but one of the output
+                            buffers.
+
+                            note that this catch up code only handles the case where all
+                            buffers have been played out due to this thread not having
+                            woken up at all. a more common case occurs when this thread
+                            is woken up, processes one buffer, but takes too long, and as
+                            a result all the other buffers have become un-queued. that
+                            case is handled further down.
+                            */
+
+                            result = CatchUpOutputBuffers( stream );
+                            if( result != paNoError )
+                                done = 1;
+
+                            statusFlags |= paOutputUnderflow;
+                        }
+
+                        hostOutputBufferIndex = stream->output.currentBufferIndex;
+                    }
+                }
+
+               
+                if( (PA_IS_FULL_DUPLEX_STREAM_(stream) && hostInputBufferIndex != -1 && hostOutputBufferIndex != -1) ||
+                        (PA_IS_HALF_DUPLEX_STREAM_(stream) && ( hostInputBufferIndex != -1 || hostOutputBufferIndex != -1 ) ) )
+                {
+                    PaStreamCallbackTimeInfo timeInfo = {0,0,0}; /** @todo implement inputBufferAdcTime */
+
+
+                    if( PA_IS_OUTPUT_STREAM_(stream) )
+                    {
+                        /* set timeInfo.currentTime and calculate timeInfo.outputBufferDacTime
+                            from the current wave out position */
+                        MMTIME mmtime;
+                        double timeBeforeGetPosition, timeAfterGetPosition;
+                        double time;
+                        long framesInBufferRing; 		
+                        long writePosition;
+                        long playbackPosition;
+                        HWAVEOUT firstWaveOutDevice = ((HWAVEOUT*)stream->output.waveHandles)[0];
+                        
+                        mmtime.wType = TIME_SAMPLES;
+                        timeBeforeGetPosition = PaUtil_GetTime();
+                        waveOutGetPosition( firstWaveOutDevice, &mmtime, sizeof(MMTIME) );
+                        timeAfterGetPosition = PaUtil_GetTime();
+
+                        timeInfo.currentTime = timeAfterGetPosition;
+
+                        /* approximate time at which wave out position was measured
+                            as half way between timeBeforeGetPosition and timeAfterGetPosition */
+                        time = timeBeforeGetPosition + (timeAfterGetPosition - timeBeforeGetPosition) * .5;
+                        
+                        framesInBufferRing = stream->output.bufferCount * stream->bufferProcessor.framesPerHostBuffer;
+                        playbackPosition = mmtime.u.sample % framesInBufferRing;
+
+                        writePosition = stream->output.currentBufferIndex * stream->bufferProcessor.framesPerHostBuffer
+                                + stream->output.framesUsedInCurrentBuffer;
+                       
+                        if( playbackPosition >= writePosition ){
+                            timeInfo.outputBufferDacTime =
+                                    time + ((double)( writePosition + (framesInBufferRing - playbackPosition) ) * stream->bufferProcessor.samplePeriod );
+                        }else{
+                            timeInfo.outputBufferDacTime =
+                                    time + ((double)( writePosition - playbackPosition ) * stream->bufferProcessor.samplePeriod );
+                        }
+                    }
+
+
+                    PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer );
+
+                    PaUtil_BeginBufferProcessing( &stream->bufferProcessor, &timeInfo, statusFlags  );
+
+                    /* reset status flags once they have been passed to the buffer processor */
+                    statusFlags = 0;
+
+                    if( PA_IS_INPUT_STREAM_(stream) )
+                    {
+                        PaUtil_SetInputFrameCount( &stream->bufferProcessor, 0 /* default to host buffer size */ );
+
+                        channel = 0;
+                        for( i=0; i<stream->input.deviceCount; ++i )
+                        {
+                             /* we have stored the number of channels in the buffer in dwUser */
+                            int channelCount = stream->input.waveHeaders[i][ hostInputBufferIndex ].dwUser;
+                            
+                            PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor, channel,
+                                    stream->input.waveHeaders[i][ hostInputBufferIndex ].lpData +
+                                        stream->input.framesUsedInCurrentBuffer * channelCount *
+                                        stream->bufferProcessor.bytesPerHostInputSample,
+                                    channelCount );
+                                    
+
+                            channel += channelCount;
+                        }
+                    }
+
+                    if( PA_IS_OUTPUT_STREAM_(stream) )
+                    {
+                        PaUtil_SetOutputFrameCount( &stream->bufferProcessor, 0 /* default to host buffer size */ );
+                        
+                        channel = 0;
+                        for( i=0; i<stream->output.deviceCount; ++i )
+                        {
+                            /* we have stored the number of channels in the buffer in dwUser */
+                            int channelCount = stream->output.waveHeaders[i][ hostOutputBufferIndex ].dwUser;
+
+                            PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor, channel,
+                                    stream->output.waveHeaders[i][ hostOutputBufferIndex ].lpData +
+                                        stream->output.framesUsedInCurrentBuffer * channelCount *
+                                        stream->bufferProcessor.bytesPerHostOutputSample,
+                                    channelCount );
+
+                            channel += channelCount;
+                        }
+                    }
+
+                    callbackResult = paContinue;
+                    framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );
+
+                    stream->input.framesUsedInCurrentBuffer += framesProcessed;
+                    stream->output.framesUsedInCurrentBuffer += framesProcessed;
+
+                    PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed );
+
+                    if( callbackResult == paContinue )
+                    {
+                        /* nothing special to do */
+                    }
+                    else if( callbackResult == paAbort )
+                    {
+                        stream->abortProcessing = 1;
+                        done = 1;
+                        /** @todo FIXME: should probably reset the output device immediately once the callback returns paAbort */
+                        result = paNoError;
+                    }
+                    else
+                    {
+                        /* User callback has asked us to stop with paComplete or other non-zero value */
+                        stream->stopProcessing = 1; /* stop once currently queued audio has finished */
+                        result = paNoError;
+                    }
+
+
+                    if( PA_IS_INPUT_STREAM_(stream)
+                            && stream->stopProcessing == 0 && stream->abortProcessing == 0
+                            && stream->input.framesUsedInCurrentBuffer == stream->input.framesPerBuffer )
+                    {
+                        if( NoBuffersAreQueued( &stream->input ) )
+                        {
+                            /** @todo need to handle PaNeverDropInput here where necessary */
+                            result = CatchUpInputBuffers( stream );
+                            if( result != paNoError )
+                                done = 1;
+
+                            statusFlags |= paInputOverflow;
+                        }
+
+                        result = AdvanceToNextInputBuffer( stream );
+                        if( result != paNoError )
+                            done = 1;
+                    }
+
+                    
+                    if( PA_IS_OUTPUT_STREAM_(stream) && !stream->abortProcessing )
+                    {
+                        if( stream->stopProcessing &&
+                                stream->output.framesUsedInCurrentBuffer < stream->output.framesPerBuffer )
+                        {
+                            /* zero remaining samples in output output buffer and flush */
+
+                            stream->output.framesUsedInCurrentBuffer += PaUtil_ZeroOutput( &stream->bufferProcessor,
+                                    stream->output.framesPerBuffer - stream->output.framesUsedInCurrentBuffer );
+
+                            /* we send the entire buffer to the output devices, but we could
+                                just send a partial buffer, rather than zeroing the unused
+                                samples.
+                            */
+                        }
+
+                        if( stream->output.framesUsedInCurrentBuffer == stream->output.framesPerBuffer )
+                        {
+                            /* check for underflow before enquing the just-generated buffer,
+                                but recover from underflow after enquing it. This ensures
+                                that the most recent audio segment is repeated */
+                            int outputUnderflow = NoBuffersAreQueued( &stream->output );
+
+                            result = AdvanceToNextOutputBuffer( stream );
+                            if( result != paNoError )
+                                done = 1;
+
+                            if( outputUnderflow && !done && !stream->stopProcessing )
+                            {
+                                /* Recover from underflow in the case where the
+                                    underflow occured while processing the buffer
+                                    we just finished */
+
+                                result = CatchUpOutputBuffers( stream );
+                                if( result != paNoError )
+                                    done = 1;
+
+                                statusFlags |= paOutputUnderflow;
+                            }
+                        }
+                    }
+                    
+                    if( stream->throttleProcessingThreadOnOverload != 0 )
+                    {
+                        if( stream->stopProcessing || stream->abortProcessing )
+                        {
+                            if( stream->processingThreadPriority != stream->highThreadPriority )
+                            {
+                                SetThreadPriority( stream->processingThread, stream->highThreadPriority );
+                                stream->processingThreadPriority = stream->highThreadPriority;
+                            }
+                        }
+                        else if( PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer ) > 1. )
+                        {
+                            if( stream->processingThreadPriority != stream->throttledThreadPriority )
+                            {
+                                SetThreadPriority( stream->processingThread, stream->throttledThreadPriority );
+                                stream->processingThreadPriority = stream->throttledThreadPriority;
+                            }
+
+                            /* sleep to give other processes a go */
+                            Sleep( stream->throttledSleepMsecs );
+                        }
+                        else
+                        {
+                            if( stream->processingThreadPriority != stream->highThreadPriority )
+                            {
+                                SetThreadPriority( stream->processingThread, stream->highThreadPriority );
+                                stream->processingThreadPriority = stream->highThreadPriority;
+                            }
+                        }
+                    }
+                }
+                else
+                {
+                    hostBuffersAvailable = 0;
+                }
+            }
+            while( hostBuffersAvailable &&
+                    stream->stopProcessing == 0 &&
+                    stream->abortProcessing == 0 &&
+                    !done );
+        }
+    }
+    while( !done );
+
+    stream->isActive = 0;
+
+    if( stream->streamRepresentation.streamFinishedCallback != 0 )
+        stream->streamRepresentation.streamFinishedCallback( stream->streamRepresentation.userData );
+
+    PaUtil_ResetCpuLoadMeasurer( &stream->cpuLoadMeasurer );
+    
+    return result;
+}
+
+
+/*
+    When CloseStream() is called, the multi-api layer ensures that
+    the stream has already been stopped or aborted.
+*/
+static PaError CloseStream( PaStream* s )
+{
+    PaError result;
+    PaWinMmeStream *stream = (PaWinMmeStream*)s;
+
+    result = CloseHandleWithPaError( stream->abortEvent );
+    if( result != paNoError ) goto error;
+    
+    TerminateWaveHeaders( &stream->output, 0 /* not isInput */ );
+    TerminateWaveHeaders( &stream->input, 1 /* isInput */ );
+
+    TerminateWaveHandles( &stream->output, 0 /* not isInput */, 0 /* not currentlyProcessingAnError */ );
+    TerminateWaveHandles( &stream->input, 1 /* isInput */, 0 /* not currentlyProcessingAnError */ );
+    
+    PaUtil_TerminateBufferProcessor( &stream->bufferProcessor );
+    PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation );
+    PaUtil_FreeMemory( stream );
+
+error:
+    /** @todo REVIEW: what is the best way to clean up a stream if an error is detected? */
+    return result;
+}
+
+
+static PaError StartStream( PaStream *s )
+{
+    PaError result;
+    PaWinMmeStream *stream = (PaWinMmeStream*)s;
+    MMRESULT mmresult;
+    unsigned int i, j;
+    int callbackResult;
+	unsigned int channel;
+ 	unsigned long framesProcessed;
+	PaStreamCallbackTimeInfo timeInfo = {0,0,0}; /** @todo implement this for stream priming */
+    
+    PaUtil_ResetBufferProcessor( &stream->bufferProcessor );
+    
+    if( PA_IS_INPUT_STREAM_(stream) )
+    {
+        for( i=0; i<stream->input.bufferCount; ++i )
+        {
+            for( j=0; j<stream->input.deviceCount; ++j )
+            {
+                mmresult = waveInAddBuffer( ((HWAVEIN*)stream->input.waveHandles)[j], &stream->input.waveHeaders[j][i], sizeof(WAVEHDR) );
+                if( mmresult != MMSYSERR_NOERROR )
+                {
+                    result = paUnanticipatedHostError;
+                    PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );
+                    goto error;
+                }
+            }
+        }
+        stream->input.currentBufferIndex = 0;
+        stream->input.framesUsedInCurrentBuffer = 0;
+    }
+
+    if( PA_IS_OUTPUT_STREAM_(stream) )
+    {
+        for( i=0; i<stream->output.deviceCount; ++i )
+        {
+            if( (mmresult = waveOutPause( ((HWAVEOUT*)stream->output.waveHandles)[i] )) != MMSYSERR_NOERROR )
+            {
+                result = paUnanticipatedHostError;
+                PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );
+                goto error;
+            }
+        }
+
+        for( i=0; i<stream->output.bufferCount; ++i )
+        {
+            if( stream->primeStreamUsingCallback )
+            {
+
+                stream->output.framesUsedInCurrentBuffer = 0;
+                do{
+
+                    PaUtil_BeginBufferProcessing( &stream->bufferProcessor,
+                            &timeInfo,
+                            paPrimingOutput | ((stream->input.bufferCount > 0 ) ? paInputUnderflow : 0));
+
+                    if( stream->input.bufferCount > 0 )
+                        PaUtil_SetNoInput( &stream->bufferProcessor );
+
+                    PaUtil_SetOutputFrameCount( &stream->bufferProcessor, 0 /* default to host buffer size */ );
+
+                    channel = 0;
+                    for( j=0; j<stream->output.deviceCount; ++j )
+                    {
+                        /* we have stored the number of channels in the buffer in dwUser */
+                        int channelCount = stream->output.waveHeaders[j][i].dwUser;
+
+                        PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor, channel,
+                                stream->output.waveHeaders[j][i].lpData +
+                                stream->output.framesUsedInCurrentBuffer * channelCount *
+                                stream->bufferProcessor.bytesPerHostOutputSample,
+                                channelCount );
+
+                        /* we have stored the number of channels in the buffer in dwUser */
+                        channel += channelCount;
+                    }
+
+                    callbackResult = paContinue;
+                    framesProcessed = PaUtil_EndBufferProcessing( &stream->bufferProcessor, &callbackResult );
+                    stream->output.framesUsedInCurrentBuffer += framesProcessed;
+
+                    if( callbackResult != paContinue )
+                    {
+                        /** @todo fix this, what do we do if callback result is non-zero during stream
+                            priming?
+
+                            for complete: play out primed waveHeaders as usual
+                            for abort: clean up immediately.
+                       */
+                    }
+
+                }while( stream->output.framesUsedInCurrentBuffer != stream->output.framesPerBuffer );
+
+            }
+            else
+            {
+                for( j=0; j<stream->output.deviceCount; ++j )
+                {
+                    ZeroMemory( stream->output.waveHeaders[j][i].lpData, stream->output.waveHeaders[j][i].dwBufferLength );
+                }
+            }   
+
+            /* we queue all channels of a single buffer frame (accross all
+                devices, because some multidevice multichannel drivers work
+                better this way */
+            for( j=0; j<stream->output.deviceCount; ++j )
+            {
+                mmresult = waveOutWrite( ((HWAVEOUT*)stream->output.waveHandles)[j], &stream->output.waveHeaders[j][i], sizeof(WAVEHDR) );
+                if( mmresult != MMSYSERR_NOERROR )
+                {
+                    result = paUnanticipatedHostError;
+                    PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );
+                    goto error;
+                }
+            }
+        }
+        stream->output.currentBufferIndex = 0;
+        stream->output.framesUsedInCurrentBuffer = 0;
+    }
+
+
+    stream->isStopped = 0;
+    stream->isActive = 1;
+    stream->stopProcessing = 0;
+    stream->abortProcessing = 0;
+
+    result = ResetEventWithPaError( stream->input.bufferEvent );
+    if( result != paNoError ) goto error;
+
+    result = ResetEventWithPaError( stream->output.bufferEvent );
+    if( result != paNoError ) goto error;
+    
+    
+    if( stream->streamRepresentation.streamCallback )
+    {
+        /* callback stream */
+
+        result = ResetEventWithPaError( stream->abortEvent );
+        if( result != paNoError ) goto error;
+
+        /* Create thread that waits for audio buffers to be ready for processing. */
+        stream->processingThread = CreateThread( 0, 0, ProcessingThreadProc, stream, 0, &stream->processingThreadId );
+        if( !stream->processingThread )
+        {
+            result = paUnanticipatedHostError;
+            PA_MME_SET_LAST_SYSTEM_ERROR( GetLastError() );
+            goto error;
+        }
+
+        /** @todo could have mme specific stream parameters to allow the user
+            to set the callback thread priorities */
+        stream->highThreadPriority = THREAD_PRIORITY_TIME_CRITICAL;
+        stream->throttledThreadPriority = THREAD_PRIORITY_NORMAL;
+
+        if( !SetThreadPriority( stream->processingThread, stream->highThreadPriority ) )
+        {
+            result = paUnanticipatedHostError;
+            PA_MME_SET_LAST_SYSTEM_ERROR( GetLastError() );
+            goto error;
+        }
+        stream->processingThreadPriority = stream->highThreadPriority;
+    }
+    else
+    {
+        /* blocking read/write stream */
+
+    }
+
+    if( PA_IS_INPUT_STREAM_(stream) )
+    {
+        for( i=0; i < stream->input.deviceCount; ++i )
+        {
+            mmresult = waveInStart( ((HWAVEIN*)stream->input.waveHandles)[i] );
+            PA_DEBUG(("Pa_StartStream: waveInStart returned = 0x%X.\n", mmresult));
+            if( mmresult != MMSYSERR_NOERROR )
+            {
+                result = paUnanticipatedHostError;
+                PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );
+                goto error;
+            }
+        }
+    }
+
+    if( PA_IS_OUTPUT_STREAM_(stream) )
+    {
+        for( i=0; i < stream->output.deviceCount; ++i )
+        {
+            if( (mmresult = waveOutRestart( ((HWAVEOUT*)stream->output.waveHandles)[i] )) != MMSYSERR_NOERROR )
+            {
+                result = paUnanticipatedHostError;
+                PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );
+                goto error;
+            }
+        }
+    }
+
+    return result;
+
+error:
+    /** @todo FIXME: implement recovery as best we can
+    This should involve rolling back to a state as-if this function had never been called
+    */
+    return result;
+}
+
+
+static PaError StopStream( PaStream *s )
+{
+    PaError result = paNoError;
+    PaWinMmeStream *stream = (PaWinMmeStream*)s;
+    int timeout;
+    DWORD waitResult;
+    MMRESULT mmresult;
+    signed int hostOutputBufferIndex;
+    unsigned int channel, waitCount, i;                  
+    
+    /** @todo
+        REVIEW: the error checking in this function needs review. the basic
+        idea is to return from this function in a known state - for example
+        there is no point avoiding calling waveInReset just because
+        the thread times out.
+    */
+
+    if( stream->processingThread )
+    {
+        /* callback stream */
+
+        /* Tell processing thread to stop generating more data and to let current data play out. */
+        stream->stopProcessing = 1;
+
+        /* Calculate timeOut longer than longest time it could take to return all buffers. */
+        timeout = (int)(stream->allBuffersDurationMs * 1.5);
+        if( timeout < PA_MME_MIN_TIMEOUT_MSEC_ )
+            timeout = PA_MME_MIN_TIMEOUT_MSEC_;
+
+        PA_DEBUG(("WinMME StopStream: waiting for background thread.\n"));
+
+        waitResult = WaitForSingleObject( stream->processingThread, timeout );
+        if( waitResult == WAIT_TIMEOUT )
+        {
+            /* try to abort */
+            stream->abortProcessing = 1;
+            SetEvent( stream->abortEvent );
+            waitResult = WaitForSingleObject( stream->processingThread, timeout );
+            if( waitResult == WAIT_TIMEOUT )
+            {
+                PA_DEBUG(("WinMME StopStream: timed out while waiting for background thread to finish.\n"));
+                result = paTimedOut;
+            }
+        }
+
+        CloseHandle( stream->processingThread );
+        stream->processingThread = NULL;
+    }
+    else
+    {
+        /* blocking read / write stream */
+
+        if( PA_IS_OUTPUT_STREAM_(stream) )
+        {
+            if( stream->output.framesUsedInCurrentBuffer > 0 )
+            {
+                /* there are still unqueued frames in the current buffer, so flush them */
+
+                hostOutputBufferIndex = stream->output.currentBufferIndex;
+
+                PaUtil_SetOutputFrameCount( &stream->bufferProcessor,
+                        stream->output.framesPerBuffer - stream->output.framesUsedInCurrentBuffer );
+                
+                channel = 0;
+                for( i=0; i<stream->output.deviceCount; ++i )
+                {
+                    /* we have stored the number of channels in the buffer in dwUser */
+                    int channelCount = stream->output.waveHeaders[i][ hostOutputBufferIndex ].dwUser;
+
+                    PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor, channel,
+                            stream->output.waveHeaders[i][ hostOutputBufferIndex ].lpData +
+                                stream->output.framesUsedInCurrentBuffer * channelCount *
+                                stream->bufferProcessor.bytesPerHostOutputSample,
+                            channelCount );
+
+                    channel += channelCount;
+                }
+
+                PaUtil_ZeroOutput( &stream->bufferProcessor,
+                        stream->output.framesPerBuffer - stream->output.framesUsedInCurrentBuffer );
+
+                /* we send the entire buffer to the output devices, but we could
+                    just send a partial buffer, rather than zeroing the unused
+                    samples.
+                */
+                AdvanceToNextOutputBuffer( stream );
+            }
+            
+
+            timeout = (stream->allBuffersDurationMs / stream->output.bufferCount) + 1;
+            if( timeout < PA_MME_MIN_TIMEOUT_MSEC_ )
+                timeout = PA_MME_MIN_TIMEOUT_MSEC_;
+
+            waitCount = 0;
+            while( !NoBuffersAreQueued( &stream->output ) && waitCount <= stream->output.bufferCount )
+            {
+                /* wait for MME to signal that a buffer is available */
+                waitResult = WaitForSingleObject( stream->output.bufferEvent, timeout );
+                if( waitResult == WAIT_FAILED )
+                {
+                    break;
+                }
+                else if( waitResult == WAIT_TIMEOUT )
+                {
+                    /* keep waiting */
+                }
+
+                ++waitCount;
+            }
+        }
+    }
+
+    if( PA_IS_OUTPUT_STREAM_(stream) )
+    {
+        for( i =0; i < stream->output.deviceCount; ++i )
+        {
+            mmresult = waveOutReset( ((HWAVEOUT*)stream->output.waveHandles)[i] );
+            if( mmresult != MMSYSERR_NOERROR )
+            {
+                result = paUnanticipatedHostError;
+                PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );
+            }
+        }
+    }
+
+    if( PA_IS_INPUT_STREAM_(stream) )
+    {
+        for( i=0; i < stream->input.deviceCount; ++i )
+        {
+            mmresult = waveInReset( ((HWAVEIN*)stream->input.waveHandles)[i] );
+            if( mmresult != MMSYSERR_NOERROR )
+            {
+                result = paUnanticipatedHostError;
+                PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );
+            }
+        }
+    }
+
+    stream->isStopped = 1;
+    stream->isActive = 0;
+
+    return result;
+}
+
+
+static PaError AbortStream( PaStream *s )
+{
+    PaError result = paNoError;
+    PaWinMmeStream *stream = (PaWinMmeStream*)s;
+    int timeout;
+    DWORD waitResult;
+    MMRESULT mmresult;
+    unsigned int i;
+    
+    /** @todo
+        REVIEW: the error checking in this function needs review. the basic
+        idea is to return from this function in a known state - for example
+        there is no point avoiding calling waveInReset just because
+        the thread times out.
+    */
+
+    if( stream->processingThread )
+    {
+        /* callback stream */
+        
+        /* Tell processing thread to abort immediately */
+        stream->abortProcessing = 1;
+        SetEvent( stream->abortEvent );
+    }
+
+
+    if( PA_IS_OUTPUT_STREAM_(stream) )
+    {
+        for( i =0; i < stream->output.deviceCount; ++i )
+        {
+            mmresult = waveOutReset( ((HWAVEOUT*)stream->output.waveHandles)[i] );
+            if( mmresult != MMSYSERR_NOERROR )
+            {
+                PA_MME_SET_LAST_WAVEOUT_ERROR( mmresult );
+                return paUnanticipatedHostError;
+            }
+        }
+    }
+
+    if( PA_IS_INPUT_STREAM_(stream) )
+    {
+        for( i=0; i < stream->input.deviceCount; ++i )
+        {
+            mmresult = waveInReset( ((HWAVEIN*)stream->input.waveHandles)[i] );
+            if( mmresult != MMSYSERR_NOERROR )
+            {
+                PA_MME_SET_LAST_WAVEIN_ERROR( mmresult );
+                return paUnanticipatedHostError;
+            }
+        }
+    }
+
+
+    if( stream->processingThread )
+    {
+        /* callback stream */
+        
+        PA_DEBUG(("WinMME AbortStream: waiting for background thread.\n"));
+
+        /* Calculate timeOut longer than longest time it could take to return all buffers. */
+        timeout = (int)(stream->allBuffersDurationMs * 1.5);
+        if( timeout < PA_MME_MIN_TIMEOUT_MSEC_ )
+            timeout = PA_MME_MIN_TIMEOUT_MSEC_;
+            
+        waitResult = WaitForSingleObject( stream->processingThread, timeout );
+        if( waitResult == WAIT_TIMEOUT )
+        {
+            PA_DEBUG(("WinMME AbortStream: timed out while waiting for background thread to finish.\n"));
+            return paTimedOut;
+        }
+
+        CloseHandle( stream->processingThread );
+        stream->processingThread = NULL;
+    }
+
+    stream->isStopped = 1;
+    stream->isActive = 0;
+
+    return result;
+}
+
+
+static PaError IsStreamStopped( PaStream *s )
+{
+    PaWinMmeStream *stream = (PaWinMmeStream*)s;
+
+    return stream->isStopped;
+}
+
+
+static PaError IsStreamActive( PaStream *s )
+{
+    PaWinMmeStream *stream = (PaWinMmeStream*)s;
+
+    return stream->isActive;
+}
+
+
+static PaTime GetStreamTime( PaStream *s )
+{
+    (void) s; /* unused parameter */
+    
+    return PaUtil_GetTime();
+}
+
+
+static double GetStreamCpuLoad( PaStream* s )
+{
+    PaWinMmeStream *stream = (PaWinMmeStream*)s;
+
+    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer );
+}
+
+
+/*
+    As separate stream interfaces are used for blocking and callback
+    streams, the following functions can be guaranteed to only be called
+    for blocking streams.
+*/
+
+static PaError ReadStream( PaStream* s,
+                           void *buffer,
+                           unsigned long frames )
+{
+    PaError result = paNoError;
+    PaWinMmeStream *stream = (PaWinMmeStream*)s;
+    void *userBuffer;
+    unsigned long framesRead = 0;
+    unsigned long framesProcessed;
+    signed int hostInputBufferIndex;
+    DWORD waitResult;
+    DWORD timeout = (unsigned long)(stream->allBuffersDurationMs * 0.5);
+    unsigned int channel, i;
+    
+    if( PA_IS_INPUT_STREAM_(stream) )
+    {
+        /* make a local copy of the user buffer pointer(s). this is necessary
+            because PaUtil_CopyInput() advances these pointers every time
+            it is called.
+        */
+        if( stream->bufferProcessor.userInputIsInterleaved )
+        {
+            userBuffer = buffer;
+        }
+        else
+        {
+            userBuffer = alloca( sizeof(void*) * stream->bufferProcessor.inputChannelCount );
+            if( !userBuffer )
+                return paInsufficientMemory;
+            for( i = 0; i<stream->bufferProcessor.inputChannelCount; ++i )
+                ((void**)userBuffer)[i] = ((void**)buffer)[i];
+        }
+        
+        do{
+            if( CurrentInputBuffersAreDone( stream ) )
+            {
+                if( NoBuffersAreQueued( &stream->input ) )
+                {
+                    /** @todo REVIEW: consider what to do if the input overflows.
+                        do we requeue all of the buffers? should we be running
+                        a thread to make sure they are always queued? */
+
+                    result = paInputOverflowed;
+                }
+
+                hostInputBufferIndex = stream->input.currentBufferIndex;
+
+                PaUtil_SetInputFrameCount( &stream->bufferProcessor,
+                        stream->input.framesPerBuffer - stream->input.framesUsedInCurrentBuffer );
+                
+                channel = 0;
+                for( i=0; i<stream->input.deviceCount; ++i )
+                {
+                    /* we have stored the number of channels in the buffer in dwUser */
+                    int channelCount = stream->input.waveHeaders[i][ hostInputBufferIndex ].dwUser;
+
+                    PaUtil_SetInterleavedInputChannels( &stream->bufferProcessor, channel,
+                            stream->input.waveHeaders[i][ hostInputBufferIndex ].lpData +
+                                stream->input.framesUsedInCurrentBuffer * channelCount *
+                                stream->bufferProcessor.bytesPerHostInputSample,
+                            channelCount );
+
+                    channel += channelCount;
+                }
+                
+                framesProcessed = PaUtil_CopyInput( &stream->bufferProcessor, &userBuffer, frames - framesRead );
+
+                stream->input.framesUsedInCurrentBuffer += framesProcessed;
+                if( stream->input.framesUsedInCurrentBuffer == stream->input.framesPerBuffer )
+                {
+                    result = AdvanceToNextInputBuffer( stream );
+                    if( result != paNoError )
+                        break;
+                }
+
+                framesRead += framesProcessed;      
+
+            }else{
+                /* wait for MME to signal that a buffer is available */
+                waitResult = WaitForSingleObject( stream->input.bufferEvent, timeout );
+                if( waitResult == WAIT_FAILED )
+                {
+                    result = paUnanticipatedHostError;
+                    break;
+                }
+                else if( waitResult == WAIT_TIMEOUT )
+                {
+                    /* if a timeout is encountered, continue,
+                        perhaps we should give up eventually
+                    */
+                }         
+            }
+        }while( framesRead < frames );
+    }
+    else
+    {
+        result = paCanNotReadFromAnOutputOnlyStream;
+    }
+
+    return result;
+}
+
+
+static PaError WriteStream( PaStream* s,
+                            const void *buffer,
+                            unsigned long frames )
+{
+    PaError result = paNoError;
+    PaWinMmeStream *stream = (PaWinMmeStream*)s;
+    const void *userBuffer;
+    unsigned long framesWritten = 0;
+    unsigned long framesProcessed;
+    signed int hostOutputBufferIndex;
+    DWORD waitResult;
+    DWORD timeout = (unsigned long)(stream->allBuffersDurationMs * 0.5);
+    unsigned int channel, i;
+
+        
+    if( PA_IS_OUTPUT_STREAM_(stream) )
+    {
+        /* make a local copy of the user buffer pointer(s). this is necessary
+            because PaUtil_CopyOutput() advances these pointers every time
+            it is called.
+        */
+        if( stream->bufferProcessor.userOutputIsInterleaved )
+        {
+            userBuffer = buffer;
+        }
+        else
+        {
+            userBuffer = alloca( sizeof(void*) * stream->bufferProcessor.outputChannelCount );
+            if( !userBuffer )
+                return paInsufficientMemory;
+            for( i = 0; i<stream->bufferProcessor.outputChannelCount; ++i )
+                ((const void**)userBuffer)[i] = ((const void**)buffer)[i];
+        }
+
+        do{
+            if( CurrentOutputBuffersAreDone( stream ) )
+            {
+                if( NoBuffersAreQueued( &stream->output ) )
+                {
+                    /** @todo REVIEW: consider what to do if the output
+                    underflows. do we requeue all the existing buffers with
+                    zeros? should we run a separate thread to keep the buffers
+                    enqueued at all times? */
+
+                    result = paOutputUnderflowed;
+                }
+
+                hostOutputBufferIndex = stream->output.currentBufferIndex;
+
+                PaUtil_SetOutputFrameCount( &stream->bufferProcessor,
+                        stream->output.framesPerBuffer - stream->output.framesUsedInCurrentBuffer );
+                
+                channel = 0;
+                for( i=0; i<stream->output.deviceCount; ++i )
+                {
+                    /* we have stored the number of channels in the buffer in dwUser */
+                    int channelCount = stream->output.waveHeaders[i][ hostOutputBufferIndex ].dwUser;
+
+                    PaUtil_SetInterleavedOutputChannels( &stream->bufferProcessor, channel,
+                            stream->output.waveHeaders[i][ hostOutputBufferIndex ].lpData +
+                                stream->output.framesUsedInCurrentBuffer * channelCount *
+                                stream->bufferProcessor.bytesPerHostOutputSample,
+                            channelCount );
+
+                    channel += channelCount;
+                }
+                
+                framesProcessed = PaUtil_CopyOutput( &stream->bufferProcessor, &userBuffer, frames - framesWritten );
+
+                stream->output.framesUsedInCurrentBuffer += framesProcessed;
+                if( stream->output.framesUsedInCurrentBuffer == stream->output.framesPerBuffer )
+                {
+                    result = AdvanceToNextOutputBuffer( stream );
+                    if( result != paNoError )
+                        break;
+                }
+
+                framesWritten += framesProcessed;
+            }
+            else
+            {
+                /* wait for MME to signal that a buffer is available */
+                waitResult = WaitForSingleObject( stream->output.bufferEvent, timeout );
+                if( waitResult == WAIT_FAILED )
+                {
+                    result = paUnanticipatedHostError;
+                    break;
+                }
+                else if( waitResult == WAIT_TIMEOUT )
+                {
+                    /* if a timeout is encountered, continue,
+                        perhaps we should give up eventually
+                    */
+                }             
+            }        
+        }while( framesWritten < frames );
+    }
+    else
+    {
+        result = paCanNotWriteToAnInputOnlyStream;
+    }
+    
+    return result;
+}
+
+
+static signed long GetStreamReadAvailable( PaStream* s )
+{
+    PaWinMmeStream *stream = (PaWinMmeStream*)s;
+    
+    if( PA_IS_INPUT_STREAM_(stream) )
+        return GetAvailableFrames( &stream->input );
+    else
+        return paCanNotReadFromAnOutputOnlyStream;
+}
+
+
+static signed long GetStreamWriteAvailable( PaStream* s )
+{
+    PaWinMmeStream *stream = (PaWinMmeStream*)s;
+    
+    if( PA_IS_OUTPUT_STREAM_(stream) )
+        return GetAvailableFrames( &stream->output );
+    else
+        return paCanNotWriteToAnInputOnlyStream;
+}
+
+
+/* NOTE: the following functions are MME-stream specific, and are called directly
+    by client code. We need to check for many more error conditions here because
+    we don't have the benefit of pa_front.c's parameter checking.
+*/
+
+static PaError GetWinMMEStreamPointer( PaWinMmeStream **stream, PaStream *s )
+{
+    PaError result;
+    PaUtilHostApiRepresentation *hostApi;
+    PaWinMmeHostApiRepresentation *winMmeHostApi;
+    
+    result = PaUtil_ValidateStreamPointer( s );
+    if( result != paNoError )
+        return result;
+
+    result = PaUtil_GetHostApiRepresentation( &hostApi, paMME );
+    if( result != paNoError )
+        return result;
+
+    winMmeHostApi = (PaWinMmeHostApiRepresentation*)hostApi;
+    
+    /* note, the following would be easier if there was a generic way of testing
+        that a stream belongs to a specific host API */
+    
+    if( PA_STREAM_REP( s )->streamInterface == &winMmeHostApi->callbackStreamInterface
+            || PA_STREAM_REP( s )->streamInterface == &winMmeHostApi->blockingStreamInterface )
+    {
+        /* s is a WinMME stream */
+        *stream = (PaWinMmeStream *)s;
+        return paNoError;
+    }
+    else
+    {
+        return paIncompatibleStreamHostApi;
+    }
+}
+
+
+int PaWinMME_GetStreamInputHandleCount( PaStream* s )
+{
+    PaWinMmeStream *stream;
+    PaError result = GetWinMMEStreamPointer( &stream, s );
+
+    if( result == paNoError )
+        return (PA_IS_INPUT_STREAM_(stream)) ? stream->input.deviceCount : 0;
+    else
+        return result;
+}
+
+
+HWAVEIN PaWinMME_GetStreamInputHandle( PaStream* s, int handleIndex )
+{
+    PaWinMmeStream *stream;
+    PaError result = GetWinMMEStreamPointer( &stream, s );
+
+    if( result == paNoError
+            && PA_IS_INPUT_STREAM_(stream)
+            && handleIndex >= 0
+            && (unsigned int)handleIndex < stream->input.deviceCount )
+        return ((HWAVEIN*)stream->input.waveHandles)[handleIndex];
+    else
+        return 0;
+}
+
+
+int PaWinMME_GetStreamOutputHandleCount( PaStream* s)
+{
+    PaWinMmeStream *stream;
+    PaError result = GetWinMMEStreamPointer( &stream, s );
+
+    if( result == paNoError )
+        return (PA_IS_OUTPUT_STREAM_(stream)) ? stream->output.deviceCount : 0;
+    else
+        return result;
+}
+
+
+HWAVEOUT PaWinMME_GetStreamOutputHandle( PaStream* s, int handleIndex )
+{
+    PaWinMmeStream *stream;
+    PaError result = GetWinMMEStreamPointer( &stream, s );
+
+    if( result == paNoError
+            && PA_IS_OUTPUT_STREAM_(stream)
+            && handleIndex >= 0
+            && (unsigned int)handleIndex < stream->output.deviceCount )
+        return ((HWAVEOUT*)stream->output.waveHandles)[handleIndex];
+    else
+        return 0;
+}
+
+
+
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_wmme.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_wmme.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_win_wmme.h	(revision 1163)
@@ -0,0 +1,160 @@
+#ifndef PA_WIN_WMME_H
+#define PA_WIN_WMME_H
+/*
+ * $Id: pa_win_wmme.h,v 1.1.2.14 2004/02/20 14:16:53 rossbencina Exp $
+ * PortAudio Portable Real-Time Audio Library
+ * MME specific extensions
+ *
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+/** @file
+ @brief WMME-specific PortAudio API extension header file.
+*/
+
+
+#include "portaudio.h"
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+#define paWinMmeUseLowLevelLatencyParameters            (0x01)
+#define paWinMmeUseMultipleDevices                      (0x02)  /* use mme specific multiple device feature */
+
+
+/* By default, the mme implementation drops the processing thread's priority
+    to THREAD_PRIORITY_NORMAL and sleeps the thread if the CPU load exceeds 100%
+    This flag disables any priority throttling. The processing thread will always
+    run at THREAD_PRIORITY_TIME_CRITICAL.
+*/
+#define paWinMmeDontThrottleOverloadedProcessingThread  (0x08)
+
+
+typedef struct PaWinMmeDeviceAndChannelCount{
+    PaDeviceIndex device;
+    int channelCount;
+}PaWinMmeDeviceAndChannelCount;
+
+
+typedef struct PaWinMmeStreamInfo{
+    unsigned long size;             /**< sizeof(PaWinMmeStreamInfo) */
+    PaHostApiTypeId hostApiType;    /**< paMME */
+    unsigned long version;          /**< 1 */
+
+    unsigned long flags;
+
+    /* low-level latency setting support
+        These settings control the number and size of host buffers in order
+        to set latency. They will be used instead of the generic parameters
+        to Pa_OpenStream() if flags contains the PaWinMmeUseLowLevelLatencyParameters
+        flag.
+
+        If PaWinMmeStreamInfo structures with PaWinMmeUseLowLevelLatencyParameters
+        are supplied for both input and output in a full duplex stream, then the
+        input and output framesPerBuffer must be the same, or the larger of the
+        two must be a multiple of the smaller, otherwise a
+        paIncompatibleHostApiSpecificStreamInfo error will be returned from
+        Pa_OpenStream().
+    */
+    unsigned long framesPerBuffer;
+    unsigned long bufferCount;  /* formerly numBuffers */ 
+
+    /* multiple devices per direction support
+        If flags contains the PaWinMmeUseMultipleDevices flag,
+        this functionality will be used, otherwise the device parameter to
+        Pa_OpenStream() will be used instead.
+        If devices are specified here, the corresponding device parameter
+        to Pa_OpenStream() should be set to paUseHostApiSpecificDeviceSpecification,
+        otherwise an paInvalidDevice error will result.
+        The total number of channels accross all specified devices
+        must agree with the corresponding channelCount parameter to
+        Pa_OpenStream() otherwise a paInvalidChannelCount error will result.
+    */
+    PaWinMmeDeviceAndChannelCount *devices;
+    unsigned long deviceCount;
+
+}PaWinMmeStreamInfo;
+
+
+/** Retrieve the number of wave in handles used by a PortAudio WinMME stream.
+ Returns zero if the stream is output only.
+
+ @return A non-negative value indicating the number of wave in handles
+ or, a PaErrorCode (which are always negative) if PortAudio is not initialized
+ or an error is encountered.
+
+ @see PaWinMME_GetStreamInputHandle
+*/
+int PaWinMME_GetStreamInputHandleCount( PaStream* stream );
+
+
+/** Retrieve a wave in handle used by a PortAudio WinMME stream.
+
+ @param stream The stream to query.
+ @param handleIndex The zero based index of the wave in handle to retrieve. This
+    should be in the range [0, PaWinMME_GetStreamInputHandle(stream)-1].
+
+ @return A valid wave in handle, or NULL if an error occurred.
+
+ @see PaWinMME_GetStreamInputHandle
+*/
+HWAVEIN PaWinMME_GetStreamInputHandle( PaStream* stream, int handleIndex );
+
+
+/** Retrieve the number of wave out handles used by a PortAudio WinMME stream.
+ Returns zero if the stream is input only.
+ 
+ @return A non-negative value indicating the number of wave out handles
+ or, a PaErrorCode (which are always negative) if PortAudio is not initialized
+ or an error is encountered.
+
+ @see PaWinMME_GetStreamOutputHandle
+*/
+int PaWinMME_GetStreamOutputHandleCount( PaStream* stream );
+
+
+/** Retrieve a wave out handle used by a PortAudio WinMME stream.
+
+ @param stream The stream to query.
+ @param handleIndex The zero based index of the wave out handle to retrieve.
+    This should be in the range [0, PaWinMME_GetStreamOutputHandleCount(stream)-1].
+
+ @return A valid wave out handle, or NULL if an error occurred.
+
+ @see PaWinMME_GetStreamOutputHandleCount
+*/
+HWAVEOUT PaWinMME_GetStreamOutputHandle( PaStream* stream, int handleIndex );
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* PA_WIN_WMME_H */                                  
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_x86_plain_converters.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_x86_plain_converters.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_x86_plain_converters.c	(revision 1163)
@@ -0,0 +1,1167 @@
+#include "pa_x86_plain_converters.h"
+
+#include "pa_converters.h"
+#include "pa_dither.h"
+
+/*
+    plain intel assemby versions of standard pa converter functions.
+
+    the main reason these versions are faster than the equivalent C versions
+    is that float -> int casting is expensive in C on x86 because the rounding
+    mode needs to be changed for every cast. these versions only set
+    the rounding mode once outside the loop.
+
+    small additional speed gains are made by the way that clamping is
+    implemented.
+
+TODO:
+    o- inline dither code
+    o- implement Dither only (no-clip) versions
+    o- implement int8 and uint8 versions
+    o- test thouroughly
+
+    o- the packed 24 bit functions could benefit from unrolling and avoiding
+        byte and word sized register access.
+*/
+
+/* -------------------------------------------------------------------------- */
+
+/*
+#define PA_CLIP_( val, min, max )\
+    { val = ((val) < (min)) ? (min) : (((val) > (max)) ? (max) : (val)); }
+*/
+
+/*
+    the following notes were used to determine whether a floating point
+    value should be saturated (ie >1 or <-1) by loading it into an integer
+    register. these should be rewritten so that they make sense.
+
+    an ieee floating point value
+
+    1.xxxxxxxxxxxxxxxxxxxx?
+
+
+    is less than  or equal to 1 and greater than or equal to -1 either:
+
+        if the mantissa is 0 and the unbiased exponent is 0
+
+        OR
+
+        if the unbiased exponent < 0
+
+    this translates to:
+
+        if the mantissa is 0 and the biased exponent is 7F
+
+        or
+
+        if the biased exponent is less than 7F
+
+
+    therefore the value is greater than 1 or less than -1 if
+
+        the mantissa is not 0 and the biased exponent is 7F
+
+        or
+
+        if the biased exponent is greater than 7F
+
+
+    in other words, if we mask out the sign bit, the value is
+    greater than 1 or less than -1 if its integer representation is greater than:
+
+    0 01111111 0000 0000 0000 0000 0000 000
+
+    0011 1111 1000 0000 0000 0000 0000 0000 => 0x3F800000
+*/
+
+/* -------------------------------------------------------------------------- */
+
+static const short fpuControlWord_ = 0x033F; /*round to nearest, 64 bit precision, all exceptions masked*/
+static const double int32Scaler_ = 0x7FFFFFFF;
+static const double ditheredInt32Scaler_ = 0x7FFFFFFE;
+static const double int24Scaler_ = 0x7FFFFF;
+static const double ditheredInt24Scaler_ = 0x7FFFFE;
+static const double int16Scaler_ = 0x7FFF;
+static const double ditheredInt16Scaler_ = 0x7FFE;
+
+#define PA_DITHER_BITS_   (15)
+/* Multiply by PA_FLOAT_DITHER_SCALE_ to get a float between -2.0 and +1.99999 */
+#define PA_FLOAT_DITHER_SCALE_  (1.0 / ((1<<PA_DITHER_BITS_)-1))
+static const float const_float_dither_scale_ = (float) PA_FLOAT_DITHER_SCALE_;
+#define PA_DITHER_SHIFT_  ((32 - PA_DITHER_BITS_) + 1)
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int32(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+/*
+    float *src = (float*)sourceBuffer;
+    signed long *dest =  (signed long*)destinationBuffer;
+    (void)ditherGenerator; // unused parameter
+
+    while( count-- )
+    {
+        // REVIEW
+        double scaled = *src * 0x7FFFFFFF;
+        *dest = (signed long) scaled;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+*/
+
+    short savedFpuControlWord;
+
+    (void) ditherGenerator; /* unused parameter */
+
+
+    __asm{
+        // esi -> source ptr
+        // eax -> source byte stride
+        // edi -> destination ptr
+        // ebx -> destination byte stride
+        // ecx -> source end ptr
+        // edx -> temp
+
+        mov     esi, sourceBuffer
+
+        mov     edx, 4                  // sizeof float32 and int32
+        mov     eax, sourceStride
+        imul    eax, edx
+
+        mov     ecx, count
+        imul    ecx, eax
+        add     ecx, esi
+    
+        mov     edi, destinationBuffer
+        
+        mov     ebx, destinationStride
+        imul    ebx, edx
+
+        fwait
+        fstcw   savedFpuControlWord
+        fldcw   fpuControlWord_
+
+        fld     int32Scaler_             // stack:  (int)0x7FFFFFFF
+
+    Float32_To_Int32_loop:
+
+        // load unscaled value into st(0)
+        fld     dword ptr [esi]         // stack:  value, (int)0x7FFFFFFF
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*0x7FFFFFFF, (int)0x7FFFFFFF
+        /*
+            note: we could store to a temporary qword here which would cause
+            wraparound distortion instead of int indefinite 0x10. that would
+            be more work, and given that not enabling clipping is only advisable
+            when you know that your signal isn't going to clip it isn't worth it.
+        */
+        fistp   dword ptr [edi]         // pop st(0) into dest, stack:  (int)0x7FFFFFFF
+
+        add     edi, ebx                // increment destination ptr
+        //lea     edi, [edi+ebx]
+
+        cmp     esi, ecx                // has src ptr reached end?
+        jne     Float32_To_Int32_loop
+
+        ffree   st(0)
+        fincstp
+
+        fwait
+        fnclex
+        fldcw   savedFpuControlWord
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int32_Clip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+/*
+    float *src = (float*)sourceBuffer;
+    signed long *dest =  (signed long*)destinationBuffer;
+    (void) ditherGenerator; // unused parameter
+
+    while( count-- )
+    {
+        // REVIEW
+        double scaled = *src * 0x7FFFFFFF;
+        PA_CLIP_( scaled, -2147483648., 2147483647.  );
+        *dest = (signed long) scaled;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+*/
+
+    short savedFpuControlWord;
+
+    (void) ditherGenerator; /* unused parameter */
+
+    __asm{
+        // esi -> source ptr
+        // eax -> source byte stride
+        // edi -> destination ptr
+        // ebx -> destination byte stride
+        // ecx -> source end ptr
+        // edx -> temp
+
+        mov     esi, sourceBuffer
+
+        mov     edx, 4                  // sizeof float32 and int32
+        mov     eax, sourceStride
+        imul    eax, edx
+
+        mov     ecx, count
+        imul    ecx, eax
+        add     ecx, esi
+    
+        mov     edi, destinationBuffer
+        
+        mov     ebx, destinationStride
+        imul    ebx, edx
+
+        fwait
+        fstcw   savedFpuControlWord
+        fldcw   fpuControlWord_
+
+        fld     int32Scaler_             // stack:  (int)0x7FFFFFFF
+
+    Float32_To_Int32_Clip_loop:
+
+        mov     edx, dword ptr [esi]    // load floating point value into integer register
+
+        and     edx, 0x7FFFFFFF         // mask off sign
+        cmp     edx, 0x3F800000         // greater than 1.0 or less than -1.0
+
+        jg      Float32_To_Int32_Clip_clamp
+
+        // load unscaled value into st(0)
+        fld     dword ptr [esi]         // stack:  value, (int)0x7FFFFFFF
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*0x7FFFFFFF, (int)0x7FFFFFFF
+        fistp   dword ptr [edi]         // pop st(0) into dest, stack:  (int)0x7FFFFFFF
+        jmp     Float32_To_Int32_Clip_stored
+    
+    Float32_To_Int32_Clip_clamp:
+        mov     edx, dword ptr [esi]    // load floating point value into integer register
+        shr     edx, 31                 // move sign bit into bit 0
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        add     edx, 0x7FFFFFFF         // convert to maximum range integers
+        mov     dword ptr [edi], edx
+
+    Float32_To_Int32_Clip_stored:
+
+        //add     edi, ebx                // increment destination ptr
+        lea     edi, [edi+ebx]
+
+        cmp     esi, ecx                // has src ptr reached end?
+        jne     Float32_To_Int32_Clip_loop
+
+        ffree   st(0)
+        fincstp
+
+        fwait
+        fnclex
+        fldcw   savedFpuControlWord
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int32_DitherClip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+    /*
+    float *src = (float*)sourceBuffer;
+    signed long *dest =  (signed long*)destinationBuffer;
+
+    while( count-- )
+    {
+        // REVIEW
+        double dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );
+        // use smaller scaler to prevent overflow when we add the dither
+        double dithered = ((double)*src * (2147483646.0)) + dither;
+        PA_CLIP_( dithered, -2147483648., 2147483647.  );
+        *dest = (signed long) dithered;
+
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+    */
+
+    short savedFpuControlWord;
+
+    // spill storage:
+    signed long sourceByteStride;
+    signed long highpassedDither;
+
+    // dither state:
+    unsigned long ditherPrevious = ditherGenerator->previous;
+    unsigned long ditherRandSeed1 = ditherGenerator->randSeed1;
+    unsigned long ditherRandSeed2 = ditherGenerator->randSeed2;
+                    
+    __asm{
+        // esi -> source ptr
+        // eax -> source byte stride
+        // edi -> destination ptr
+        // ebx -> destination byte stride
+        // ecx -> source end ptr
+        // edx -> temp
+
+        mov     esi, sourceBuffer
+
+        mov     edx, 4                  // sizeof float32 and int32
+        mov     eax, sourceStride
+        imul    eax, edx
+
+        mov     ecx, count
+        imul    ecx, eax
+        add     ecx, esi
+    
+        mov     edi, destinationBuffer
+        
+        mov     ebx, destinationStride
+        imul    ebx, edx
+
+        fwait
+        fstcw   savedFpuControlWord
+        fldcw   fpuControlWord_
+
+        fld     ditheredInt32Scaler_    // stack:  int scaler
+
+    Float32_To_Int32_DitherClip_loop:
+
+        mov     edx, dword ptr [esi]    // load floating point value into integer register
+
+        and     edx, 0x7FFFFFFF         // mask off sign
+        cmp     edx, 0x3F800000         // greater than 1.0 or less than -1.0
+
+        jg      Float32_To_Int32_DitherClip_clamp
+
+        // load unscaled value into st(0)
+        fld     dword ptr [esi]         // stack:  value, int scaler
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*(int scaler), int scaler
+
+        /*
+        // call PaUtil_GenerateFloatTriangularDither with C calling convention
+        mov     sourceByteStride, eax   // save eax
+        mov     sourceEnd, ecx          // save ecx
+        push    ditherGenerator         // pass ditherGenerator parameter on stack
+	    call    PaUtil_GenerateFloatTriangularDither  // stack:  dither, value*(int scaler), int scaler
+	    pop     edx                     // clear parameter off stack
+        mov     ecx, sourceEnd          // restore ecx
+        mov     eax, sourceByteStride   // restore eax
+        */
+
+    // generate dither
+        mov     sourceByteStride, eax   // save eax
+        mov     edx, 196314165
+        mov     eax, ditherRandSeed1
+        mul     edx                     // eax:edx = eax * 196314165
+        //add     eax, 907633515
+        lea     eax, [eax+907633515]
+        mov     ditherRandSeed1, eax
+        mov     edx, 196314165
+        mov     eax, ditherRandSeed2
+        mul     edx                     // eax:edx = eax * 196314165
+        //add     eax, 907633515
+        lea     eax, [eax+907633515]
+        mov     edx, ditherRandSeed1
+        shr     edx, PA_DITHER_SHIFT_
+        mov     ditherRandSeed2, eax
+        shr     eax, PA_DITHER_SHIFT_
+        //add     eax, edx                // eax -> current
+        lea     eax, [eax+edx]
+        mov     edx, ditherPrevious
+        neg     edx
+        lea     edx, [eax+edx]          // highpass = current - previous
+        mov     highpassedDither, edx
+        mov     ditherPrevious, eax     // previous = current
+        mov     eax, sourceByteStride   // restore eax
+        fild    highpassedDither
+        fmul    const_float_dither_scale_
+    // end generate dither, dither signal in st(0)
+    
+        faddp   st(1), st(0)            // stack: dither + value*(int scaler), int scaler
+        fistp   dword ptr [edi]         // pop st(0) into dest, stack:  int scaler
+        jmp     Float32_To_Int32_DitherClip_stored
+    
+    Float32_To_Int32_DitherClip_clamp:
+        mov     edx, dword ptr [esi]    // load floating point value into integer register
+        shr     edx, 31                 // move sign bit into bit 0
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        add     edx, 0x7FFFFFFF         // convert to maximum range integers
+        mov     dword ptr [edi], edx
+
+    Float32_To_Int32_DitherClip_stored:
+
+        //add     edi, ebx              // increment destination ptr
+        lea     edi, [edi+ebx]
+
+        cmp     esi, ecx                // has src ptr reached end?
+        jne     Float32_To_Int32_DitherClip_loop
+
+        ffree   st(0)
+        fincstp
+
+        fwait
+        fnclex
+        fldcw   savedFpuControlWord
+    }
+
+    ditherGenerator->previous = ditherPrevious;
+    ditherGenerator->randSeed1 = ditherRandSeed1;
+    ditherGenerator->randSeed2 = ditherRandSeed2;
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int24(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+/*
+    float *src = (float*)sourceBuffer;
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+    signed long temp;
+
+    (void) ditherGenerator; // unused parameter
+    
+    while( count-- )
+    {
+        // convert to 32 bit and drop the low 8 bits
+        double scaled = *src * 0x7FFFFFFF;
+        temp = (signed long) scaled;
+
+        dest[0] = (unsigned char)(temp >> 8);
+        dest[1] = (unsigned char)(temp >> 16);
+        dest[2] = (unsigned char)(temp >> 24);
+
+        src += sourceStride;
+        dest += destinationStride * 3;
+    }
+*/
+
+    short savedFpuControlWord;
+    
+    signed long tempInt32;
+
+    (void) ditherGenerator; /* unused parameter */
+                 
+    __asm{
+        // esi -> source ptr
+        // eax -> source byte stride
+        // edi -> destination ptr
+        // ebx -> destination byte stride
+        // ecx -> source end ptr
+        // edx -> temp
+
+        mov     esi, sourceBuffer
+
+        mov     edx, 4                  // sizeof float32
+        mov     eax, sourceStride
+        imul    eax, edx
+
+        mov     ecx, count
+        imul    ecx, eax
+        add     ecx, esi
+
+        mov     edi, destinationBuffer
+
+        mov     edx, 3                  // sizeof int24
+        mov     ebx, destinationStride
+        imul    ebx, edx
+
+        fwait
+        fstcw   savedFpuControlWord
+        fldcw   fpuControlWord_
+
+        fld     int24Scaler_             // stack:  (int)0x7FFFFF
+
+    Float32_To_Int24_loop:
+
+        // load unscaled value into st(0)
+        fld     dword ptr [esi]         // stack:  value, (int)0x7FFFFF
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*0x7FFFFF, (int)0x7FFFFF
+        fistp   tempInt32               // pop st(0) into tempInt32, stack:  (int)0x7FFFFF
+        mov     edx, tempInt32
+
+        mov     byte ptr [edi], DL
+        shr     edx, 8
+        //mov     byte ptr [edi+1], DL
+        //mov     byte ptr [edi+2], DH
+        mov     word ptr [edi+1], DX
+
+        //add     edi, ebx                // increment destination ptr
+        lea     edi, [edi+ebx]
+
+        cmp     esi, ecx                // has src ptr reached end?
+        jne     Float32_To_Int24_loop
+
+        ffree   st(0)
+        fincstp
+
+        fwait
+        fnclex
+        fldcw   savedFpuControlWord
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int24_Clip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+/*
+    float *src = (float*)sourceBuffer;
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+    signed long temp;
+
+    (void) ditherGenerator; // unused parameter
+    
+    while( count-- )
+    {
+        // convert to 32 bit and drop the low 8 bits
+        double scaled = *src * 0x7FFFFFFF;
+        PA_CLIP_( scaled, -2147483648., 2147483647.  );
+        temp = (signed long) scaled;
+
+        dest[0] = (unsigned char)(temp >> 8);
+        dest[1] = (unsigned char)(temp >> 16);
+        dest[2] = (unsigned char)(temp >> 24);
+
+        src += sourceStride;
+        dest += destinationStride * 3;
+    }
+*/
+
+    short savedFpuControlWord;
+    
+    signed long tempInt32;
+
+    (void) ditherGenerator; /* unused parameter */
+                 
+    __asm{
+        // esi -> source ptr
+        // eax -> source byte stride
+        // edi -> destination ptr
+        // ebx -> destination byte stride
+        // ecx -> source end ptr
+        // edx -> temp
+
+        mov     esi, sourceBuffer
+
+        mov     edx, 4                  // sizeof float32
+        mov     eax, sourceStride
+        imul    eax, edx
+
+        mov     ecx, count
+        imul    ecx, eax
+        add     ecx, esi
+
+        mov     edi, destinationBuffer
+
+        mov     edx, 3                  // sizeof int24
+        mov     ebx, destinationStride
+        imul    ebx, edx
+
+        fwait
+        fstcw   savedFpuControlWord
+        fldcw   fpuControlWord_
+
+        fld     int24Scaler_             // stack:  (int)0x7FFFFF
+
+    Float32_To_Int24_Clip_loop:
+
+        mov     edx, dword ptr [esi]    // load floating point value into integer register
+
+        and     edx, 0x7FFFFFFF         // mask off sign
+        cmp     edx, 0x3F800000         // greater than 1.0 or less than -1.0
+
+        jg      Float32_To_Int24_Clip_clamp
+
+        // load unscaled value into st(0)
+        fld     dword ptr [esi]         // stack:  value, (int)0x7FFFFF
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*0x7FFFFF, (int)0x7FFFFF
+        fistp   tempInt32               // pop st(0) into tempInt32, stack:  (int)0x7FFFFF
+        mov     edx, tempInt32
+        jmp     Float32_To_Int24_Clip_store
+    
+    Float32_To_Int24_Clip_clamp:
+        mov     edx, dword ptr [esi]    // load floating point value into integer register
+        shr     edx, 31                 // move sign bit into bit 0
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        add     edx, 0x7FFFFF           // convert to maximum range integers
+
+    Float32_To_Int24_Clip_store:
+
+        mov     byte ptr [edi], DL
+        shr     edx, 8
+        //mov     byte ptr [edi+1], DL
+        //mov     byte ptr [edi+2], DH
+        mov     word ptr [edi+1], DX
+
+        //add     edi, ebx                // increment destination ptr
+        lea     edi, [edi+ebx]
+
+        cmp     esi, ecx                // has src ptr reached end?
+        jne     Float32_To_Int24_Clip_loop
+
+        ffree   st(0)
+        fincstp
+
+        fwait
+        fnclex
+        fldcw   savedFpuControlWord
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int24_DitherClip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+/*
+    float *src = (float*)sourceBuffer;
+    unsigned char *dest = (unsigned char*)destinationBuffer;
+    signed long temp;
+    
+    while( count-- )
+    {
+        // convert to 32 bit and drop the low 8 bits
+
+        // FIXME: the dither amplitude here appears to be too small by 8 bits
+        double dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );
+        // use smaller scaler to prevent overflow when we add the dither
+        double dithered = ((double)*src * (2147483646.0)) + dither;
+        PA_CLIP_( dithered, -2147483648., 2147483647.  );
+        
+        temp = (signed long) dithered;
+
+        dest[0] = (unsigned char)(temp >> 8);
+        dest[1] = (unsigned char)(temp >> 16);
+        dest[2] = (unsigned char)(temp >> 24);
+
+        src += sourceStride;
+        dest += destinationStride * 3;
+    }
+*/
+
+    short savedFpuControlWord;
+
+    // spill storage:
+    signed long sourceByteStride;
+    signed long highpassedDither;
+
+    // dither state:
+    unsigned long ditherPrevious = ditherGenerator->previous;
+    unsigned long ditherRandSeed1 = ditherGenerator->randSeed1;
+    unsigned long ditherRandSeed2 = ditherGenerator->randSeed2;
+    
+    signed long tempInt32;
+                 
+    __asm{
+        // esi -> source ptr
+        // eax -> source byte stride
+        // edi -> destination ptr
+        // ebx -> destination byte stride
+        // ecx -> source end ptr
+        // edx -> temp
+
+        mov     esi, sourceBuffer
+
+        mov     edx, 4                  // sizeof float32
+        mov     eax, sourceStride
+        imul    eax, edx
+
+        mov     ecx, count
+        imul    ecx, eax
+        add     ecx, esi
+
+        mov     edi, destinationBuffer
+
+        mov     edx, 3                  // sizeof int24
+        mov     ebx, destinationStride
+        imul    ebx, edx
+
+        fwait
+        fstcw   savedFpuControlWord
+        fldcw   fpuControlWord_
+
+        fld     ditheredInt24Scaler_    // stack:  int scaler
+
+    Float32_To_Int24_DitherClip_loop:
+
+        mov     edx, dword ptr [esi]    // load floating point value into integer register
+
+        and     edx, 0x7FFFFFFF         // mask off sign
+        cmp     edx, 0x3F800000         // greater than 1.0 or less than -1.0
+
+        jg      Float32_To_Int24_DitherClip_clamp
+
+        // load unscaled value into st(0)
+        fld     dword ptr [esi]         // stack:  value, int scaler
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*(int scaler), int scaler
+
+    /*
+        // call PaUtil_GenerateFloatTriangularDither with C calling convention
+        mov     sourceByteStride, eax   // save eax
+        mov     sourceEnd, ecx          // save ecx
+        push    ditherGenerator         // pass ditherGenerator parameter on stack
+	    call    PaUtil_GenerateFloatTriangularDither  // stack:  dither, value*(int scaler), int scaler
+	    pop     edx                     // clear parameter off stack
+        mov     ecx, sourceEnd          // restore ecx
+        mov     eax, sourceByteStride   // restore eax
+    */
+    
+    // generate dither
+        mov     sourceByteStride, eax   // save eax
+        mov     edx, 196314165
+        mov     eax, ditherRandSeed1
+        mul     edx                     // eax:edx = eax * 196314165
+        //add     eax, 907633515
+        lea     eax, [eax+907633515]
+        mov     ditherRandSeed1, eax
+        mov     edx, 196314165
+        mov     eax, ditherRandSeed2
+        mul     edx                     // eax:edx = eax * 196314165
+        //add     eax, 907633515
+        lea     eax, [eax+907633515]
+        mov     edx, ditherRandSeed1
+        shr     edx, PA_DITHER_SHIFT_
+        mov     ditherRandSeed2, eax
+        shr     eax, PA_DITHER_SHIFT_
+        //add     eax, edx                // eax -> current
+        lea     eax, [eax+edx]
+        mov     edx, ditherPrevious
+        neg     edx
+        lea     edx, [eax+edx]          // highpass = current - previous
+        mov     highpassedDither, edx
+        mov     ditherPrevious, eax     // previous = current
+        mov     eax, sourceByteStride   // restore eax
+        fild    highpassedDither
+        fmul    const_float_dither_scale_
+    // end generate dither, dither signal in st(0)
+
+        faddp   st(1), st(0)            // stack: dither * value*(int scaler), int scaler
+        fistp   tempInt32               // pop st(0) into tempInt32, stack:  int scaler
+        mov     edx, tempInt32
+        jmp     Float32_To_Int24_DitherClip_store
+    
+    Float32_To_Int24_DitherClip_clamp:
+        mov     edx, dword ptr [esi]    // load floating point value into integer register
+        shr     edx, 31                 // move sign bit into bit 0
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        add     edx, 0x7FFFFF           // convert to maximum range integers
+
+    Float32_To_Int24_DitherClip_store:
+
+        mov     byte ptr [edi], DL
+        shr     edx, 8
+        //mov     byte ptr [edi+1], DL
+        //mov     byte ptr [edi+2], DH
+        mov     word ptr [edi+1], DX
+
+        //add     edi, ebx                // increment destination ptr
+        lea     edi, [edi+ebx]
+
+        cmp     esi, ecx                // has src ptr reached end?
+        jne     Float32_To_Int24_DitherClip_loop
+
+        ffree   st(0)
+        fincstp
+
+        fwait
+        fnclex
+        fldcw   savedFpuControlWord
+    }
+
+    ditherGenerator->previous = ditherPrevious;
+    ditherGenerator->randSeed1 = ditherRandSeed1;
+    ditherGenerator->randSeed2 = ditherRandSeed2;
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int16(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+/*
+    float *src = (float*)sourceBuffer;
+    signed short *dest =  (signed short*)destinationBuffer;
+    (void)ditherGenerator; // unused parameter
+
+    while( count-- )
+    {
+
+        short samp = (short) (*src * (32767.0f));
+        *dest = samp;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+*/
+
+    short savedFpuControlWord;
+   
+    (void) ditherGenerator; /* unused parameter */
+
+    __asm{
+        // esi -> source ptr
+        // eax -> source byte stride
+        // edi -> destination ptr
+        // ebx -> destination byte stride
+        // ecx -> source end ptr
+        // edx -> temp
+
+        mov     esi, sourceBuffer
+
+        mov     edx, 4                  // sizeof float32
+        mov     eax, sourceStride
+        imul    eax, edx                // source byte stride
+
+        mov     ecx, count
+        imul    ecx, eax
+        add     ecx, esi                // source end ptr = count * source byte stride + source ptr
+
+        mov     edi, destinationBuffer
+
+        mov     edx, 2                  // sizeof int16
+        mov     ebx, destinationStride
+        imul    ebx, edx                // destination byte stride
+
+        fwait
+        fstcw   savedFpuControlWord
+        fldcw   fpuControlWord_
+
+        fld     int16Scaler_            // stack:  (int)0x7FFF
+
+    Float32_To_Int16_loop:
+
+        // load unscaled value into st(0)
+        fld     dword ptr [esi]         // stack:  value, (int)0x7FFF
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*0x7FFF, (int)0x7FFF
+        fistp   word ptr [edi]          // store scaled int into dest, stack:  (int)0x7FFF
+
+        add     edi, ebx                // increment destination ptr
+        //lea     edi, [edi+ebx]
+        
+        cmp     esi, ecx                // has src ptr reached end?
+        jne     Float32_To_Int16_loop
+
+        ffree   st(0)
+        fincstp
+
+        fwait
+        fnclex
+        fldcw   savedFpuControlWord
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int16_Clip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+/*
+    float *src = (float*)sourceBuffer;
+    signed short *dest =  (signed short*)destinationBuffer;
+    (void)ditherGenerator; // unused parameter
+
+    while( count-- )
+    {
+        long samp = (signed long) (*src * (32767.0f));
+        PA_CLIP_( samp, -0x8000, 0x7FFF );
+        *dest = (signed short) samp;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+*/
+
+    short savedFpuControlWord;
+   
+    (void) ditherGenerator; /* unused parameter */
+
+    __asm{
+        // esi -> source ptr
+        // eax -> source byte stride
+        // edi -> destination ptr
+        // ebx -> destination byte stride
+        // ecx -> source end ptr
+        // edx -> temp
+
+        mov     esi, sourceBuffer
+
+        mov     edx, 4                  // sizeof float32
+        mov     eax, sourceStride
+        imul    eax, edx                // source byte stride
+
+        mov     ecx, count
+        imul    ecx, eax
+        add     ecx, esi                // source end ptr = count * source byte stride + source ptr
+
+        mov     edi, destinationBuffer
+
+        mov     edx, 2                  // sizeof int16
+        mov     ebx, destinationStride
+        imul    ebx, edx                // destination byte stride
+
+        fwait
+        fstcw   savedFpuControlWord
+        fldcw   fpuControlWord_
+
+        fld     int16Scaler_            // stack:  (int)0x7FFF
+
+    Float32_To_Int16_Clip_loop:
+
+        mov     edx, dword ptr [esi]    // load floating point value into integer register
+
+        and     edx, 0x7FFFFFFF         // mask off sign
+        cmp     edx, 0x3F800000         // greater than 1.0 or less than -1.0
+
+        jg      Float32_To_Int16_Clip_clamp
+
+        // load unscaled value into st(0)
+        fld     dword ptr [esi]         // stack:  value, (int)0x7FFF
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*0x7FFF, (int)0x7FFF
+        fistp   word ptr [edi]          // store scaled int into dest, stack:  (int)0x7FFF
+        jmp     Float32_To_Int16_Clip_stored
+    
+    Float32_To_Int16_Clip_clamp:
+        mov     edx, dword ptr [esi]    // load floating point value into integer register
+        shr     edx, 31                 // move sign bit into bit 0
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        add     dx, 0x7FFF              // convert to maximum range integers
+        mov     word ptr [edi], dx      // store clamped into into dest
+
+    Float32_To_Int16_Clip_stored:
+
+        add     edi, ebx                // increment destination ptr
+        //lea     edi, [edi+ebx]
+        
+        cmp     esi, ecx                // has src ptr reached end?
+        jne     Float32_To_Int16_Clip_loop
+
+        ffree   st(0)
+        fincstp
+
+        fwait
+        fnclex
+        fldcw   savedFpuControlWord
+    }
+}
+
+/* -------------------------------------------------------------------------- */
+
+static void Float32_To_Int16_DitherClip(
+    void *destinationBuffer, signed int destinationStride,
+    void *sourceBuffer, signed int sourceStride,
+    unsigned int count, PaUtilTriangularDitherGenerator *ditherGenerator )
+{
+/*
+    float *src = (float*)sourceBuffer;
+    signed short *dest =  (signed short*)destinationBuffer;
+    (void)ditherGenerator; // unused parameter
+
+    while( count-- )
+    {
+
+        float dither  = PaUtil_GenerateFloatTriangularDither( ditherGenerator );
+        // use smaller scaler to prevent overflow when we add the dither 
+        float dithered = (*src * (32766.0f)) + dither;
+        signed long samp = (signed long) dithered;
+        PA_CLIP_( samp, -0x8000, 0x7FFF );
+        *dest = (signed short) samp;
+
+        src += sourceStride;
+        dest += destinationStride;
+    }
+*/
+
+    short savedFpuControlWord;
+
+    // spill storage:
+    signed long sourceByteStride;
+    signed long highpassedDither;
+
+    // dither state:
+    unsigned long ditherPrevious = ditherGenerator->previous;
+    unsigned long ditherRandSeed1 = ditherGenerator->randSeed1;
+    unsigned long ditherRandSeed2 = ditherGenerator->randSeed2;
+
+    __asm{
+        // esi -> source ptr
+        // eax -> source byte stride
+        // edi -> destination ptr
+        // ebx -> destination byte stride
+        // ecx -> source end ptr
+        // edx -> temp
+
+        mov     esi, sourceBuffer
+
+        mov     edx, 4                  // sizeof float32
+        mov     eax, sourceStride
+        imul    eax, edx                // source byte stride
+
+        mov     ecx, count
+        imul    ecx, eax
+        add     ecx, esi                // source end ptr = count * source byte stride + source ptr
+
+        mov     edi, destinationBuffer
+
+        mov     edx, 2                  // sizeof int16
+        mov     ebx, destinationStride
+        imul    ebx, edx                // destination byte stride
+
+        fwait
+        fstcw   savedFpuControlWord
+        fldcw   fpuControlWord_
+
+        fld     ditheredInt16Scaler_    // stack:  int scaler
+
+    Float32_To_Int16_DitherClip_loop:
+
+        mov     edx, dword ptr [esi]    // load floating point value into integer register
+
+        and     edx, 0x7FFFFFFF         // mask off sign
+        cmp     edx, 0x3F800000         // greater than 1.0 or less than -1.0
+
+        jg      Float32_To_Int16_DitherClip_clamp
+
+        // load unscaled value into st(0)
+        fld     dword ptr [esi]         // stack:  value, int scaler
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        fmul    st(0), st(1)            // st(0) *= st(1), stack:  value*(int scaler), int scaler
+
+        /*
+        // call PaUtil_GenerateFloatTriangularDither with C calling convention
+        mov     sourceByteStride, eax   // save eax
+        mov     sourceEnd, ecx          // save ecx
+        push    ditherGenerator         // pass ditherGenerator parameter on stack
+	    call    PaUtil_GenerateFloatTriangularDither  // stack:  dither, value*(int scaler), int scaler
+	    pop     edx                     // clear parameter off stack
+        mov     ecx, sourceEnd          // restore ecx
+        mov     eax, sourceByteStride   // restore eax
+        */
+
+    // generate dither
+        mov     sourceByteStride, eax   // save eax
+        mov     edx, 196314165
+        mov     eax, ditherRandSeed1
+        mul     edx                     // eax:edx = eax * 196314165
+        //add     eax, 907633515
+        lea     eax, [eax+907633515]
+        mov     ditherRandSeed1, eax
+        mov     edx, 196314165
+        mov     eax, ditherRandSeed2
+        mul     edx                     // eax:edx = eax * 196314165
+        //add     eax, 907633515
+        lea     eax, [eax+907633515]
+        mov     edx, ditherRandSeed1
+        shr     edx, PA_DITHER_SHIFT_
+        mov     ditherRandSeed2, eax
+        shr     eax, PA_DITHER_SHIFT_
+        //add     eax, edx                // eax -> current
+        lea     eax, [eax+edx]            // current = randSeed1>>x + randSeed2>>x
+        mov     edx, ditherPrevious
+        neg     edx
+        lea     edx, [eax+edx]          // highpass = current - previous
+        mov     highpassedDither, edx
+        mov     ditherPrevious, eax     // previous = current
+        mov     eax, sourceByteStride   // restore eax
+        fild    highpassedDither
+        fmul    const_float_dither_scale_
+    // end generate dither, dither signal in st(0)
+        
+        faddp   st(1), st(0)            // stack: dither * value*(int scaler), int scaler
+        fistp   word ptr [edi]          // store scaled int into dest, stack:  int scaler
+        jmp     Float32_To_Int16_DitherClip_stored
+    
+    Float32_To_Int16_DitherClip_clamp:
+        mov     edx, dword ptr [esi]    // load floating point value into integer register
+        shr     edx, 31                 // move sign bit into bit 0
+        add     esi, eax                // increment source ptr
+        //lea     esi, [esi+eax]
+        add     dx, 0x7FFF              // convert to maximum range integers
+        mov     word ptr [edi], dx      // store clamped into into dest
+
+    Float32_To_Int16_DitherClip_stored:
+
+        add     edi, ebx                // increment destination ptr
+        //lea     edi, [edi+ebx]
+        
+        cmp     esi, ecx                // has src ptr reached end?
+        jne     Float32_To_Int16_DitherClip_loop
+
+        ffree   st(0)
+        fincstp
+
+        fwait
+        fnclex
+        fldcw   savedFpuControlWord
+    }
+
+    ditherGenerator->previous = ditherPrevious;
+    ditherGenerator->randSeed1 = ditherRandSeed1;
+    ditherGenerator->randSeed2 = ditherRandSeed2;
+}
+
+/* -------------------------------------------------------------------------- */
+
+void PaUtil_InitializeX86PlainConverters( void )
+{
+    paConverters.Float32_To_Int32 = Float32_To_Int32;
+    paConverters.Float32_To_Int32_Clip = Float32_To_Int32_Clip;
+    paConverters.Float32_To_Int32_DitherClip = Float32_To_Int32_DitherClip;
+
+    paConverters.Float32_To_Int24 = Float32_To_Int24;
+    paConverters.Float32_To_Int24_Clip = Float32_To_Int24_Clip;
+    paConverters.Float32_To_Int24_DitherClip = Float32_To_Int24_DitherClip;
+    
+    paConverters.Float32_To_Int16 = Float32_To_Int16;
+    paConverters.Float32_To_Int16_Clip = Float32_To_Int16_Clip;
+    paConverters.Float32_To_Int16_DitherClip = Float32_To_Int16_DitherClip;
+}
+
+/* -------------------------------------------------------------------------- */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_x86_plain_converters.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_x86_plain_converters.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/pa_x86_plain_converters.h	(revision 1163)
@@ -0,0 +1,19 @@
+#ifndef PA_X86_PLAIN_CONVERTERS_H
+#define PA_X86_PLAIN_CONVERTERS_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+/**
+ @brief Install optimised converter functions suitable for all IA32 processors
+*/
+void PaUtil_InitializeX86PlainConverters( void );
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PA_X86_PLAIN_CONVERTERS_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/portaudio.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/portaudio.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/portaudio.h	(revision 1163)
@@ -0,0 +1,1122 @@
+#ifndef PORTAUDIO_H
+#define PORTAUDIO_H
+/*
+ * $Id: portaudio.h,v 1.5.2.50 2004/12/13 11:50:40 rossbencina Exp $
+ * PortAudio Portable Real-Time Audio Library
+ * PortAudio API Header File
+ * Latest version available at: http://www.portaudio.com/
+ *
+ * Copyright (c) 1999-2002 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/** @file
+ @brief The PortAudio API.
+*/
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+ 
+/** Retrieve the release number of the currently running PortAudio build,
+ eg 1900.
+*/
+int Pa_GetVersion( void );
+
+
+/** Retrieve a textual description of the current PortAudio build,
+ eg "PortAudio V19-devel 13 October 2002".
+*/
+const char* Pa_GetVersionText( void );
+
+
+/** Error codes returned by PortAudio functions.
+ Note that with the exception of paNoError, all PaErrorCodes are negative.
+*/
+
+typedef int PaError;
+typedef enum PaErrorCode
+{
+    paNoError = 0,
+
+    paNotInitialized = -1000,   /* blp: changed from -10000 */
+    paUnanticipatedHostError,
+    paInvalidChannelCount,
+    paInvalidSampleRate,
+    paInvalidDevice,
+    paInvalidFlag,
+    paSampleFormatNotSupported,
+    paBadIODeviceCombination,
+    paInsufficientMemory,
+    paBufferTooBig,
+    paBufferTooSmall,
+    paNullCallback,
+    paBadStreamPtr,
+    paTimedOut,
+    paInternalError,
+    paDeviceUnavailable,
+    paIncompatibleHostApiSpecificStreamInfo,
+    paStreamIsStopped,
+    paStreamIsNotStopped,
+    paInputOverflowed,
+    paOutputUnderflowed,
+    paHostApiNotFound,
+    paInvalidHostApi,
+    paCanNotReadFromACallbackStream,      /**< @todo review error code name */
+    paCanNotWriteToACallbackStream,       /**< @todo review error code name */
+    paCanNotReadFromAnOutputOnlyStream,   /**< @todo review error code name */
+    paCanNotWriteToAnInputOnlyStream,     /**< @todo review error code name */
+    paIncompatibleStreamHostApi
+} PaErrorCode;
+
+
+/** Translate the supplied PortAudio error code into a human readable
+ message.
+*/
+const char *Pa_GetErrorText( PaError errorCode );
+
+
+/** Library initialization function - call this before using PortAudio.
+ This function initialises internal data structures and prepares underlying
+ host APIs for use. This function MUST be called before using any other
+ PortAudio API functions.
+
+ If Pa_Initialize() is called multiple times, each successful 
+ call must be matched with a corresponding call to Pa_Terminate(). 
+ Pairs of calls to Pa_Initialize()/Pa_Terminate() may overlap, and are not 
+ required to be fully nested.
+
+ Note that if Pa_Initialize() returns an error code, Pa_Terminate() should
+ NOT be called.
+
+ @return paNoError if successful, otherwise an error code indicating the cause
+ of failure.
+
+ @see Pa_Terminate
+*/
+PaError Pa_Initialize( void );
+
+
+/** Library termination function - call this when finished using PortAudio.
+ This function deallocates all resources allocated by PortAudio since it was
+ initializied by a call to Pa_Initialize(). In cases where Pa_Initialise() has
+ been called multiple times, each call must be matched with a corresponding call
+ to Pa_Terminate(). The final matching call to Pa_Terminate() will automatically
+ close any PortAudio streams that are still open.
+
+ Pa_Terminate() MUST be called before exiting a program which uses PortAudio.
+ Failure to do so may result in serious resource leaks, such as audio devices
+ not being available until the next reboot.
+
+ @return paNoError if successful, otherwise an error code indicating the cause
+ of failure.
+ 
+ @see Pa_Initialize
+*/
+PaError Pa_Terminate( void );
+
+
+
+/** The type used to refer to audio devices. Values of this type usually
+ range from 0 to (Pa_DeviceCount-1), and may also take on the PaNoDevice
+ and paUseHostApiSpecificDeviceSpecification values.
+
+ @see Pa_DeviceCount, paNoDevice, paUseHostApiSpecificDeviceSpecification
+*/
+typedef int PaDeviceIndex;
+
+
+/** A special PaDeviceIndex value indicating that no device is available,
+ or should be used.
+
+ @see PaDeviceIndex
+*/
+#define paNoDevice ((PaDeviceIndex)-1)
+
+
+/** A special PaDeviceIndex value indicating that the device(s) to be used
+ are specified in the host api specific stream info structure.
+
+ @see PaDeviceIndex
+*/
+#define paUseHostApiSpecificDeviceSpecification ((PaDeviceIndex)-2)
+
+
+/* Host API enumeration mechanism */
+
+/** The type used to enumerate to host APIs at runtime. Values of this type
+ range from 0 to (Pa_GetHostApiCount()-1).
+
+ @see Pa_GetHostApiCount
+*/
+typedef int PaHostApiIndex;
+
+
+/** Retrieve the number of available host APIs. Even if a host API is
+ available it may have no devices available.
+
+ @return A non-negative value indicating the number of available host APIs
+ or, a PaErrorCode (which are always negative) if PortAudio is not initialized
+ or an error is encountered.
+
+ @see PaHostApiIndex
+*/
+PaHostApiIndex Pa_GetHostApiCount( void );
+
+
+/** Retrieve the index of the default host API. The default host API will be
+ the lowest common denominator host API on the current platform and is
+ unlikely to provide the best performance.
+
+ @return A non-negative value ranging from 0 to (Pa_GetHostApiCount()-1)
+ indicating the default host API index or, a PaErrorCode (which are always
+ negative) if PortAudio is not initialized or an error is encountered.
+*/
+PaHostApiIndex Pa_GetDefaultHostApi( void );
+
+
+/** Unchanging unique identifiers for each supported host API. This type
+ is used in the PaHostApiInfo structure. The values are guaranteed to be
+ unique and to never change, thus allowing code to be written that
+ conditionally uses host API specific extensions.
+
+ New type ids will be allocated when support for a host API reaches
+ "public alpha" status, prior to that developers should use the
+ paInDevelopment type id.
+
+ @see PaHostApiInfo
+*/
+typedef enum PaHostApiTypeId
+{
+    paInDevelopment=0, /* use while developing support for a new host API */
+    paDirectSound=1,
+    paMME=2,
+    paASIO=3,
+    paSoundManager=4,
+    paCoreAudio=5,
+    paOSS=7,
+    paALSA=8,
+    paAL=9,
+    paBeOS=10,
+    paWDMKS=11,
+    paJACK=12
+} PaHostApiTypeId;
+
+
+/** A structure containing information about a particular host API. */
+
+typedef struct PaHostApiInfo
+{
+    /** this is struct version 1 */
+    int structVersion;
+    /** The well known unique identifier of this host API @see PaHostApiTypeId */
+    PaHostApiTypeId type;
+    /** A textual description of the host API for display on user interfaces. */
+    const char *name;
+
+    /**  The number of devices belonging to this host API. This field may be
+     used in conjunction with Pa_HostApiDeviceIndexToDeviceIndex() to enumerate
+     all devices for this host API.
+     @see Pa_HostApiDeviceIndexToDeviceIndex
+    */
+    int deviceCount;
+
+    /** The the default input device for this host API. The value will be a
+     device index ranging from 0 to (Pa_GetDeviceCount()-1), or paNoDevice
+     if no default input device is available.
+    */
+    PaDeviceIndex defaultInputDevice;
+
+    /** The the default output device for this host API. The value will be a
+     device index ranging from 0 to (Pa_GetDeviceCount()-1), or paNoDevice
+     if no default output device is available.
+    */
+    PaDeviceIndex defaultOutputDevice;
+    
+} PaHostApiInfo;
+
+
+/** Retrieve a pointer to a structure containing information about a specific
+ host Api.
+
+ @param hostApi A valid host API index ranging from 0 to (Pa_GetHostApiCount()-1)
+
+ @return A pointer to an immutable PaHostApiInfo structure describing
+ a specific host API. If the hostApi parameter is out of range or an error
+ is encountered, the function returns NULL.
+
+ The returned structure is owned by the PortAudio implementation and must not
+ be manipulated or freed. The pointer is only guaranteed to be valid between
+ calls to Pa_Initialize() and Pa_Terminate().
+*/
+const PaHostApiInfo * Pa_GetHostApiInfo( PaHostApiIndex hostApi );
+
+
+/** Convert a static host API unique identifier, into a runtime
+ host API index.
+
+ @param type A unique host API identifier belonging to the PaHostApiTypeId
+ enumeration.
+
+ @return A valid PaHostApiIndex ranging from 0 to (Pa_GetHostApiCount()-1) or,
+ a PaErrorCode (which are always negative) if PortAudio is not initialized
+ or an error is encountered.
+ 
+ The paHostApiNotFound error code indicates that the host API specified by the
+ type parameter is not available.
+
+ @see PaHostApiTypeId
+*/
+PaHostApiIndex Pa_HostApiTypeIdToHostApiIndex( PaHostApiTypeId type );
+
+
+/** Convert a host-API-specific device index to standard PortAudio device index.
+ This function may be used in conjunction with the deviceCount field of
+ PaHostApiInfo to enumerate all devices for the specified host API.
+
+ @param hostApi A valid host API index ranging from 0 to (Pa_GetHostApiCount()-1)
+
+ @param hostApiDeviceIndex A valid per-host device index in the range
+ 0 to (Pa_GetHostApiInfo(hostApi)->deviceCount-1)
+
+ @return A non-negative PaDeviceIndex ranging from 0 to (Pa_GetDeviceCount()-1)
+ or, a PaErrorCode (which are always negative) if PortAudio is not initialized
+ or an error is encountered.
+
+ A paInvalidHostApi error code indicates that the host API index specified by
+ the hostApi parameter is out of range.
+
+ A paInvalidDevice error code indicates that the hostApiDeviceIndex parameter
+ is out of range.
+ 
+ @see PaHostApiInfo
+*/
+PaDeviceIndex Pa_HostApiDeviceIndexToDeviceIndex( PaHostApiIndex hostApi,
+        int hostApiDeviceIndex );
+
+
+
+/** Structure used to return information about a host error condition.
+*/
+typedef struct PaHostErrorInfo{
+    PaHostApiTypeId hostApiType;    /**< the host API which returned the error code */
+    long errorCode;                 /**< the error code returned */
+    const char *errorText;          /**< a textual description of the error if available, otherwise a zero-length string */
+}PaHostErrorInfo;
+
+
+/** Return information about the last host error encountered. The error
+ information returned by Pa_GetLastHostErrorInfo() will never be modified
+ asyncronously by errors occurring in other PortAudio owned threads
+ (such as the thread that manages the stream callback.)
+
+ This function is provided as a last resort, primarily to enhance debugging
+ by providing clients with access to all available error information.
+
+ @return A pointer to an immutable structure constaining information about
+ the host error. The values in this structure will only be valid if a
+ PortAudio function has previously returned the paUnanticipatedHostError
+ error code.
+*/
+const PaHostErrorInfo* Pa_GetLastHostErrorInfo( void );
+
+
+
+/* Device enumeration and capabilities */
+
+/** Retrieve the number of available devices. The number of available devices
+ may be zero.
+
+ @return A non-negative value indicating the number of available devices or,
+ a PaErrorCode (which are always negative) if PortAudio is not initialized
+ or an error is encountered.
+*/
+PaDeviceIndex Pa_GetDeviceCount( void );
+
+
+/** Retrieve the index of the default input device. The result can be
+ used in the inputDevice parameter to Pa_OpenStream().
+
+ @return The default input device index for the default host API, or paNoDevice
+ if no default input device is available or an error was encountered.
+*/
+PaDeviceIndex Pa_GetDefaultInputDevice( void );
+
+
+/** Retrieve the index of the default output device. The result can be
+ used in the outputDevice parameter to Pa_OpenStream().
+
+ @return The default output device index for the defualt host API, or paNoDevice
+ if no default output device is available or an error was encountered.
+
+ @note
+ On the PC, the user can specify a default device by
+ setting an environment variable. For example, to use device #1.
+<pre>
+ set PA_RECOMMENDED_OUTPUT_DEVICE=1
+</pre>
+ The user should first determine the available device ids by using
+ the supplied application "pa_devs".
+*/
+PaDeviceIndex Pa_GetDefaultOutputDevice( void );
+
+
+/** The type used to represent monotonic time in seconds that can be used
+ for syncronisation. The type is used for the outTime argument to the
+ PaStreamCallback and as the result of Pa_GetStreamTime().
+     
+ @see PaStreamCallback, Pa_GetStreamTime
+*/
+typedef double PaTime;
+
+
+/** A type used to specify one or more sample formats. Each value indicates
+ a possible format for sound data passed to and from the stream callback,
+ Pa_ReadStream and Pa_WriteStream.
+
+ The standard formats paFloat32, paInt16, paInt32, paInt24, paInt8
+ and aUInt8 are usually implemented by all implementations.
+
+ The floating point representation (paFloat32) uses +1.0 and -1.0 as the
+ maximum and minimum respectively.
+
+ paUInt8 is an unsigned 8 bit format where 128 is considered "ground"
+
+ The paNonInterleaved flag indicates that a multichannel buffer is passed
+ as a set of non-interleaved pointers.
+
+ @see Pa_OpenStream, Pa_OpenDefaultStream, PaDeviceInfo
+ @see paFloat32, paInt16, paInt32, paInt24, paInt8
+ @see paUInt8, paCustomFormat, paNonInterleaved
+*/
+typedef unsigned long PaSampleFormat;
+
+
+#define paFloat32        ((PaSampleFormat) 0x00000001) /**< @see PaSampleFormat */
+#define paInt32          ((PaSampleFormat) 0x00000002) /**< @see PaSampleFormat */
+#define paInt24          ((PaSampleFormat) 0x00000004) /**< Packed 24 bit format. @see PaSampleFormat */
+#define paInt16          ((PaSampleFormat) 0x00000008) /**< @see PaSampleFormat */
+#define paInt8           ((PaSampleFormat) 0x00000010) /**< @see PaSampleFormat */
+#define paUInt8          ((PaSampleFormat) 0x00000020) /**< @see PaSampleFormat */
+#define paCustomFormat   ((PaSampleFormat) 0x00010000)/**< @see PaSampleFormat */
+
+#define paNonInterleaved ((PaSampleFormat) 0x80000000)
+
+/** A structure providing information and capabilities of PortAudio devices.
+ Devices may support input, output or both input and output.
+*/
+typedef struct PaDeviceInfo
+{
+    int structVersion;  /* this is struct version 2 */
+    const char *name;
+    PaHostApiIndex hostApi; /* note this is a host API index, not a type id*/
+    
+    int maxInputChannels;
+    int maxOutputChannels;
+
+    /* Default latency values for interactive performance. */
+    PaTime defaultLowInputLatency;
+    PaTime defaultLowOutputLatency;
+    /* Default latency values for robust non-interactive applications (eg. playing sound files). */
+    PaTime defaultHighInputLatency;
+    PaTime defaultHighOutputLatency;
+
+    double defaultSampleRate;
+} PaDeviceInfo;
+
+
+/** Retrieve a pointer to a PaDeviceInfo structure containing information
+ about the specified device.
+ @return A pointer to an immutable PaDeviceInfo structure. If the device
+ parameter is out of range the function returns NULL.
+
+ @param device A valid device index in the range 0 to (Pa_GetDeviceCount()-1)
+
+ @note PortAudio manages the memory referenced by the returned pointer,
+ the client must not manipulate or free the memory. The pointer is only
+ guaranteed to be valid between calls to Pa_Initialize() and Pa_Terminate().
+
+ @see PaDeviceInfo, PaDeviceIndex
+*/
+const PaDeviceInfo* Pa_GetDeviceInfo( PaDeviceIndex device );
+
+
+/** Parameters for one direction (input or output) of a stream.
+*/
+typedef struct PaStreamParameters
+{
+    /** A valid device index in the range 0 to (Pa_GetDeviceCount()-1)
+     specifying the device to be used or the special constant
+     paUseHostApiSpecificDeviceSpecification which indicates that the actual
+     device(s) to use are specified in hostApiSpecificStreamInfo.
+     This field must not be set to paNoDevice.
+    */
+    PaDeviceIndex device;
+    
+    /** The number of channels of sound to be delivered to the
+     stream callback or accessed by Pa_ReadStream() or Pa_WriteStream().
+     It can range from 1 to the value of maxInputChannels in the
+     PaDeviceInfo record for the device specified by the device parameter.
+    */
+    int channelCount;
+
+    /** The sample format of the buffer provided to the stream callback,
+     a_ReadStream() or Pa_WriteStream(). It may be any of the formats described
+     by the PaSampleFormat enumeration.
+    */
+    PaSampleFormat sampleFormat;
+
+    /** The desired latency in seconds. Where practical, implementations should
+     configure their latency based on these parameters, otherwise they may
+     choose the closest viable latency instead. Unless the suggested latency
+     is greater than the absolute upper limit for the device implementations
+     shouldround the suggestedLatency up to the next practial value - ie to
+     provide an equal or higher latency than suggestedLatency whereever possibe.
+     Actual latency values for an open stream may be retrieved using the
+     inputLatency and outputLatency fields of the PaStreamInfo structure
+     returned by Pa_GetStreamInfo().
+     @see default*Latency in PaDeviceInfo, *Latency in PaStreamInfo
+    */
+    PaTime suggestedLatency;
+
+    /** An optional pointer to a host api specific data structure
+     containing additional information for device setup and/or stream processing.
+     hostApiSpecificStreamInfo is never required for correct operation,
+     if not used it should be set to NULL.
+    */
+    void *hostApiSpecificStreamInfo;
+
+} PaStreamParameters;
+
+
+/** Return code for Pa_IsFormatSupported indicating success. */
+#define paFormatIsSupported (0)
+
+/** Determine whether it would be possible to open a stream with the specified
+ parameters.
+
+ @param inputParameters A structure that describes the input parameters used to
+ open a stream. The suggestedLatency field is ignored. See PaStreamParameters
+ for a description of these parameters. inputParameters must be NULL for
+ output-only streams.
+
+ @param outputParameters A structure that describes the output parameters used
+ to open a stream. The suggestedLatency field is ignored. See PaStreamParameters
+ for a description of these parameters. outputParameters must be NULL for
+ input-only streams.
+
+ @param sampleRate The required sampleRate. For full-duplex streams it is the
+ sample rate for both input and output
+
+ @return Returns 0 if the format is supported, and an error code indicating why
+ the format is not supported otherwise. The constant paFormatIsSupported is
+ provided to compare with the return value for success.
+
+ @see paFormatIsSupported, PaStreamParameters
+*/
+PaError Pa_IsFormatSupported( const PaStreamParameters *inputParameters,
+                              const PaStreamParameters *outputParameters,
+                              double sampleRate );
+
+
+
+/* Streaming types and functions */
+
+
+/**
+ A single PaStream can provide multiple channels of real-time
+ streaming audio input and output to a client application. A stream
+ provides access to audio hardware represented by one or more
+ PaDevices. Depending on the underlying Host API, it may be possible 
+ to open multiple streams using the same device, however this behavior 
+ is implementation defined. Portable applications should assume that 
+ a PaDevice may be simultaneously used by at most one PaStream.
+
+ Pointers to PaStream objects are passed between PortAudio functions that
+ operate on streams.
+
+ @see Pa_OpenStream, Pa_OpenDefaultStream, Pa_OpenDefaultStream, Pa_CloseStream,
+ Pa_StartStream, Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive,
+ Pa_GetStreamTime, Pa_GetStreamCpuLoad
+
+*/
+typedef void PaStream;
+
+
+/** Can be passed as the framesPerBuffer parameter to Pa_OpenStream()
+ or Pa_OpenDefaultStream() to indicate that the stream callback will
+ accept buffers of any size.
+*/
+#define paFramesPerBufferUnspecified  (0)
+
+
+/** Flags used to control the behavior of a stream. They are passed as
+ parameters to Pa_OpenStream or Pa_OpenDefaultStream. Multiple flags may be
+ ORed together.
+
+ @see Pa_OpenStream, Pa_OpenDefaultStream
+ @see paNoFlag, paClipOff, paDitherOff, paNeverDropInput,
+  paPrimeOutputBuffersUsingStreamCallback, paPlatformSpecificFlags
+*/
+typedef unsigned long PaStreamFlags;
+
+/** @see PaStreamFlags */
+#define   paNoFlag          ((PaStreamFlags) 0)
+
+/** Disable default clipping of out of range samples.
+ @see PaStreamFlags
+*/
+#define   paClipOff         ((PaStreamFlags) 0x00000001)
+
+/** Disable default dithering.
+ @see PaStreamFlags
+*/
+#define   paDitherOff       ((PaStreamFlags) 0x00000002)
+
+/** Flag requests that where possible a full duplex stream will not discard
+ overflowed input samples without calling the stream callback. This flag is
+ only valid for full duplex callback streams and only when used in combination
+ with the paFramesPerBufferUnspecified (0) framesPerBuffer parameter. Using
+ this flag incorrectly results in a paInvalidFlag error being returned from
+ Pa_OpenStream and Pa_OpenDefaultStream.
+
+ @see PaStreamFlags, paFramesPerBufferUnspecified
+*/
+#define   paNeverDropInput  ((PaStreamFlags) 0x00000004)
+
+/** Call the stream callback to fill initial output buffers, rather than the
+ default behavior of priming the buffers with zeros (silence). This flag has
+ no effect for input-only and blocking read/write streams.
+ 
+ @see PaStreamFlags
+*/
+#define   paPrimeOutputBuffersUsingStreamCallback ((PaStreamFlags) 0x00000008)
+
+/** A mask specifying the platform specific bits.
+ @see PaStreamFlags
+*/
+#define   paPlatformSpecificFlags ((PaStreamFlags)0xFFFF0000)
+
+/**
+ Timing information for the buffers passed to the stream callback.
+*/
+typedef struct PaStreamCallbackTimeInfo{
+    PaTime inputBufferAdcTime;
+    PaTime currentTime;
+    PaTime outputBufferDacTime;
+} PaStreamCallbackTimeInfo;
+
+
+/**
+ Flag bit constants for the statusFlags to PaStreamCallback.
+
+ @see paInputUnderflow, paInputOverflow, paOutputUnderflow, paOutputOverflow,
+ paPrimingOutput
+*/
+typedef unsigned long PaStreamCallbackFlags;
+
+/** In a stream opened with paFramesPerBufferUnspecified, indicates that
+ input data is all silence (zeros) because no real data is available. In a
+ stream opened without paFramesPerBufferUnspecified, it indicates that one or
+ more zero samples have been inserted into the input buffer to compensate
+ for an input underflow.
+ @see PaStreamCallbackFlags
+*/
+#define paInputUnderflow   ((PaStreamCallbackFlags) 0x00000001)
+
+/** In a stream opened with paFramesPerBufferUnspecified, indicates that data
+ prior to the first sample of the input buffer was discarded due to an
+ overflow, possibly because the stream callback is using too much CPU time.
+ Otherwise indicates that data prior to one or more samples in the
+ input buffer was discarded.
+ @see PaStreamCallbackFlags
+*/
+#define paInputOverflow    ((PaStreamCallbackFlags) 0x00000002)
+
+/** Indicates that output data (or a gap) was inserted, possibly because the
+ stream callback is using too much CPU time.
+ @see PaStreamCallbackFlags
+*/
+#define paOutputUnderflow  ((PaStreamCallbackFlags) 0x00000004)
+
+/** Indicates that output data will be discarded because no room is available.
+ @see PaStreamCallbackFlags
+*/
+#define paOutputOverflow   ((PaStreamCallbackFlags) 0x00000008)
+
+/** Some of all of the output data will be used to prime the stream, input
+ data may be zero.
+ @see PaStreamCallbackFlags
+*/
+#define paPrimingOutput    ((PaStreamCallbackFlags) 0x00000010)
+
+/**
+ Allowable return values for the PaStreamCallback.
+ @see PaStreamCallback
+*/
+typedef enum PaStreamCallbackResult
+{
+    paContinue=0,
+    paComplete=1,
+    paAbort=2
+} PaStreamCallbackResult;
+
+
+/**
+ Functions of type PaStreamCallback are implemented by PortAudio clients.
+ They consume, process or generate audio in response to requests from an
+ active PortAudio stream.
+     
+ @param input and @param output are arrays of interleaved samples,
+ the format, packing and number of channels used by the buffers are
+ determined by parameters to Pa_OpenStream().
+     
+ @param frameCount The number of sample frames to be processed by
+ the stream callback.
+
+ @param timeInfo The time in seconds when the first sample of the input
+ buffer was received at the audio input, the time in seconds when the first
+ sample of the output buffer will begin being played at the audio output, and
+ the time in seconds when the stream callback was called.
+ See also Pa_GetStreamTime()
+
+ @param statusFlags Flags indicating whether input and/or output buffers
+ have been inserted or will be dropped to overcome underflow or overflow
+ conditions.
+
+ @param userData The value of a user supplied pointer passed to
+ Pa_OpenStream() intended for storing synthesis data etc.
+
+ @return
+ The stream callback should return one of the values in the
+ PaStreamCallbackResult enumeration. To ensure that the callback continues
+ to be called, it should return paContinue (0). Either paComplete or paAbort
+ can be returned to finish stream processing, after either of these values is
+ returned the callback will not be called again. If paAbort is returned the
+ stream will finish as soon as possible. If paComplete is returned, the stream
+ will continue until all buffers generated by the callback have been played.
+ This may be useful in applications such as soundfile players where a specific
+ duration of output is required. However, it is not necessary to utilise this
+ mechanism as Pa_StopStream(), Pa_AbortStream() or Pa_CloseStream() can also
+ be used to stop the stream. The callback must always fill the entire output
+ buffer irrespective of its return value.
+
+ @see Pa_OpenStream, Pa_OpenDefaultStream
+
+ @note With the exception of Pa_GetStreamCpuLoad() it is not permissable to call
+ PortAudio API functions from within the stream callback.
+*/
+typedef int PaStreamCallback(
+    const void *input, void *output,
+    unsigned long frameCount,
+    const PaStreamCallbackTimeInfo* timeInfo,
+    PaStreamCallbackFlags statusFlags,
+    void *userData );
+
+
+/** Opens a stream for either input, output or both.
+     
+ @param stream The address of a PaStream pointer which will receive
+ a pointer to the newly opened stream.
+     
+ @param inputParameters A structure that describes the input parameters used by
+ the opened stream. See PaStreamParameters for a description of these parameters.
+ inputParameters must be NULL for output-only streams.
+
+ @param outputParameters A structure that describes the output parameters used by
+ the opened stream. See PaStreamParameters for a description of these parameters.
+ outputParameters must be NULL for input-only streams.
+ 
+ @param sampleRate The desired sampleRate. For full-duplex streams it is the
+ sample rate for both input and output
+     
+ @param framesPerBuffer The number of frames passed to the stream callback
+ function, or the preferred block granularity for a blocking read/write stream.
+ The special value paFramesPerBufferUnspecified (0) may be used to request that
+ the stream callback will recieve an optimal (and possibly varying) number of
+ frames based on host requirements and the requested latency settings.
+ Note: With some host APIs, the use of non-zero framesPerBuffer for a callback
+ stream may introduce an additional layer of buffering which could introduce
+ additional latency. PortAudio guarantees that the additional latency
+ will be kept to the theoretical minimum however, it is strongly recommended
+ that a non-zero framesPerBuffer value only be used when your algorithm
+ requires a fixed number of frames per stream callback.
+ 
+ @param streamFlags Flags which modify the behaviour of the streaming process.
+ This parameter may contain a combination of flags ORed together. Some flags may
+ only be relevant to certain buffer formats.
+     
+ @param streamCallback A pointer to a client supplied function that is responsible
+ for processing and filling input and output buffers. If this parameter is NULL
+ the stream will be opened in 'blocking read/write' mode. In blocking mode,
+ the client can receive sample data using Pa_ReadStream and write sample data
+ using Pa_WriteStream, the number of samples that may be read or written
+ without blocking is returned by Pa_GetStreamReadAvailable and
+ Pa_GetStreamWriteAvailable respectively.
+
+ @param userData A client supplied pointer which is passed to the stream callback
+ function. It could for example, contain a pointer to instance data necessary
+ for processing the audio buffers. This parameter is ignored if streamCallback
+ is NULL.
+     
+ @return
+ Upon success Pa_OpenStream() returns paNoError and places a pointer to a
+ valid PaStream in the stream argument. The stream is inactive (stopped).
+ If a call to Pa_OpenStream() fails, a non-zero error code is returned (see
+ PaError for possible error codes) and the value of stream is invalid.
+
+ @see PaStreamParameters, PaStreamCallback, Pa_ReadStream, Pa_WriteStream,
+ Pa_GetStreamReadAvailable, Pa_GetStreamWriteAvailable
+*/
+PaError Pa_OpenStream( PaStream** stream,
+                       const PaStreamParameters *inputParameters,
+                       const PaStreamParameters *outputParameters,
+                       double sampleRate,
+                       unsigned long framesPerBuffer,
+                       PaStreamFlags streamFlags,
+                       PaStreamCallback *streamCallback,
+                       void *userData );
+
+
+/** A simplified version of Pa_OpenStream() that opens the default input
+ and/or output devices.
+
+ @param stream The address of a PaStream pointer which will receive
+ a pointer to the newly opened stream.
+ 
+ @param numInputChannels  The number of channels of sound that will be supplied
+ to the stream callback or returned by Pa_ReadStream. It can range from 1 to
+ the value of maxInputChannels in the PaDeviceInfo record for the default input
+ device. If 0 the stream is opened as an output-only stream.
+
+ @param numOutputChannels The number of channels of sound to be delivered to the
+ stream callback or passed to Pa_WriteStream. It can range from 1 to the value
+ of maxOutputChannels in the PaDeviceInfo record for the default output dvice.
+ If 0 the stream is opened as an output-only stream.
+
+ @param sampleFormat The sample format of both the input and output buffers
+ provided to the callback or passed to and from Pa_ReadStream and Pa_WriteStream.
+ sampleFormat may be any of the formats described by the PaSampleFormat
+ enumeration.
+ 
+ @param sampleRate Same as Pa_OpenStream parameter of the same name.
+ @param framesPerBuffer Same as Pa_OpenStream parameter of the same name.
+ @param streamCallback Same as Pa_OpenStream parameter of the same name.
+ @param userData Same as Pa_OpenStream parameter of the same name.
+
+ @return As for Pa_OpenStream
+
+ @see Pa_OpenStream, PaStreamCallback
+*/
+PaError Pa_OpenDefaultStream( PaStream** stream,
+                              int numInputChannels,
+                              int numOutputChannels,
+                              PaSampleFormat sampleFormat,
+                              double sampleRate,
+                              unsigned long framesPerBuffer,
+                              PaStreamCallback *streamCallback,
+                              void *userData );
+
+
+/** Closes an audio stream. If the audio stream is active it
+ discards any pending buffers as if Pa_AbortStream() had been called.
+*/
+PaError Pa_CloseStream( PaStream *stream );
+
+
+/** Functions of type PaStreamFinishedCallback are implemented by PortAudio 
+ clients. They can be registered with a stream using the Pa_SetStreamFinishedCallback
+ function. Once registered they are called when the stream becomes inactive
+ (ie once a call to Pa_StopStream() will not block).
+ A stream will become inactive after the stream callback returns non-zero,
+ or when Pa_StopStream or Pa_AbortStream is called. For a stream providing audio
+ output, if the stream callback returns paComplete, or Pa_StopStream is called,
+ the stream finished callback will not be called until all generated sample data
+ has been played.
+ 
+ @param userData The userData parameter supplied to Pa_OpenStream()
+
+ @see Pa_SetStreamFinishedCallback
+*/
+typedef void PaStreamFinishedCallback( void *userData );
+
+
+/** Register a stream finished callback function which will be called when the 
+ stream becomes inactive. See the description of PaStreamFinishedCallback for 
+ further details about when the callback will be called.
+
+ @param stream a pointer to a PaStream that is in the stopped state - if the
+ stream is not stopped, the stream's finished callback will remain unchanged 
+ and an error code will be returned.
+
+ @param streamFinishedCallback a pointer to a function with the same signature
+ as PaStreamFinishedCallback, that will be called when the stream becomes
+ inactive. Passing NULL for this parameter will un-register a previously
+ registered stream finished callback function.
+
+ @return on success returns paNoError, otherwise an error code indicating the cause
+ of the error.
+
+ @see PaStreamFinishedCallback
+*/
+PaError Pa_SetStreamFinishedCallback( PaStream *stream, PaStreamFinishedCallback* streamFinishedCallback ); 
+
+
+/** Commences audio processing.
+*/
+PaError Pa_StartStream( PaStream *stream );
+
+
+/** Terminates audio processing. It waits until all pending
+ audio buffers have been played before it returns.
+*/
+PaError Pa_StopStream( PaStream *stream );
+
+
+/** Terminates audio processing immediately without waiting for pending
+ buffers to complete.
+*/
+PaError Pa_AbortStream( PaStream *stream );
+
+
+/** Determine whether the stream is stopped.
+ A stream is considered to be stopped prior to a successful call to
+ Pa_StartStream and after a successful call to Pa_StopStream or Pa_AbortStream.
+ If a stream callback returns a value other than paContinue the stream is NOT
+ considered to be stopped.
+
+ @return Returns one (1) when the stream is stopped, zero (0) when
+ the stream is running or, a PaErrorCode (which are always negative) if
+ PortAudio is not initialized or an error is encountered.
+
+ @see Pa_StopStream, Pa_AbortStream, Pa_IsStreamActive
+*/
+PaError Pa_IsStreamStopped( PaStream *stream );
+
+
+/** Determine whether the stream is active.
+ A stream is active after a successful call to Pa_StartStream(), until it
+ becomes inactive either as a result of a call to Pa_StopStream() or
+ Pa_AbortStream(), or as a result of a return value other than paContinue from
+ the stream callback. In the latter case, the stream is considered inactive
+ after the last buffer has finished playing.
+
+ @return Returns one (1) when the stream is active (ie playing or recording
+ audio), zero (0) when not playing or, a PaErrorCode (which are always negative)
+ if PortAudio is not initialized or an error is encountered.
+
+ @see Pa_StopStream, Pa_AbortStream, Pa_IsStreamStopped
+*/
+PaError Pa_IsStreamActive( PaStream *stream );
+
+
+
+/** A structure containing unchanging information about an open stream.
+ @see Pa_GetStreamInfo
+*/
+
+typedef struct PaStreamInfo
+{
+    /** this is struct version 1 */
+    int structVersion;
+
+    /** The input latency of the stream in seconds. This value provides the most
+     accurate estimate of input latency available to the implementation. It may
+     differ significantly from the suggestedLatency value passed to Pa_OpenStream().
+     The value of this field will be zero (0.) for output-only streams.
+     @see PaTime
+    */
+    PaTime inputLatency;
+
+    /** The output latency of the stream in seconds. This value provides the most
+     accurate estimate of output latency available to the implementation. It may
+     differ significantly from the suggestedLatency value passed to Pa_OpenStream().
+     The value of this field will be zero (0.) for input-only streams.
+     @see PaTime
+    */
+    PaTime outputLatency;
+
+    /** The sample rate of the stream in Hertz (samples per second). In cases
+     where the hardware sample rate is inaccurate and PortAudio is aware of it,
+     the value of this field may be different from the sampleRate parameter
+     passed to Pa_OpenStream(). If information about the actual hardware sample
+     rate is not available, this field will have the same value as the sampleRate
+     parameter passed to Pa_OpenStream().
+    */
+    double sampleRate;
+    
+} PaStreamInfo;
+
+
+/** Retrieve a pointer to a PaStreamInfo structure containing information
+ about the specified stream.
+ @return A pointer to an immutable PaStreamInfo structure. If the stream
+ parameter invalid, or an error is encountered, the function returns NULL.
+
+ @param stream A pointer to an open stream previously created with Pa_OpenStream.
+
+ @note PortAudio manages the memory referenced by the returned pointer,
+ the client must not manipulate or free the memory. The pointer is only
+ guaranteed to be valid until the specified stream is closed.
+
+ @see PaStreamInfo
+*/
+const PaStreamInfo* Pa_GetStreamInfo( PaStream *stream );
+
+
+/** Determine the current time for the stream according to the same clock used
+ to generate buffer timestamps. This time may be used for syncronising other
+ events to the audio stream, for example synchronizing audio to MIDI.
+                                        
+ @return The stream's current time in seconds, or 0 if an error occurred.
+
+ @see PaTime, PaStreamCallback
+*/
+PaTime Pa_GetStreamTime( PaStream *stream );
+
+
+/** Retrieve CPU usage information for the specified stream.
+ The "CPU Load" is a fraction of total CPU time consumed by a callback stream's
+ audio processing routines including, but not limited to the client supplied
+ stream callback. This function does not work with blocking read/write streams.
+
+ This function may be called from the stream callback function or the
+ application.
+     
+ @return
+ A floating point value, typically between 0.0 and 1.0, where 1.0 indicates
+ that the stream callback is consuming the maximum number of CPU cycles possible
+ to maintain real-time operation. A value of 0.5 would imply that PortAudio and
+ the stream callback was consuming roughly 50% of the available CPU time. The
+ return value may exceed 1.0. A value of 0.0 will always be returned for a
+ blocking read/write stream, or if an error occurrs.
+*/
+double Pa_GetStreamCpuLoad( PaStream* stream );
+
+
+/** Read samples from an input stream. The function doesn't return until
+ the entire buffer has been filled - this may involve waiting for the operating
+ system to supply the data.
+
+ @param stream A pointer to an open stream previously created with Pa_OpenStream.
+ 
+ @param buffer A pointer to a buffer of sample frames. The buffer contains
+ samples in the format specified by the inputParameters->sampleFormat field
+ used to open the stream, and the number of channels specified by
+ inputParameters->numChannels. If non-interleaved samples were requested,
+ buffer is a pointer to the first element of an array of non-interleaved
+ buffer pointers, one for each channel.
+
+ @param frames The number of frames to be read into buffer. This parameter
+ is not constrained to a specific range, however high performance applications
+ will want to match this parameter to the framesPerBuffer parameter used
+ when opening the stream.
+
+ @return On success PaNoError will be returned, or PaInputOverflowed if input
+ data was discarded by PortAudio after the previous call and before this call.
+*/
+PaError Pa_ReadStream( PaStream* stream,
+                       void *buffer,
+                       unsigned long frames );
+
+
+/** Write samples to an output stream. This function doesn't return until the
+ entire buffer has been consumed - this may involve waiting for the operating
+ system to consume the data.
+
+ @param stream A pointer to an open stream previously created with Pa_OpenStream.
+
+ @param buffer A pointer to a buffer of sample frames. The buffer contains
+ samples in the format specified by the outputParameters->sampleFormat field
+ used to open the stream, and the number of channels specified by
+ outputParameters->numChannels. If non-interleaved samples were requested,
+ buffer is a pointer to the first element of an array of non-interleaved
+ buffer pointers, one for each channel.
+
+ @param frames The number of frames to be written from buffer. This parameter
+ is not constrained to a specific range, however high performance applications
+ will want to match this parameter to the framesPerBuffer parameter used
+ when opening the stream.
+
+ @return On success PaNoError will be returned, or paOutputUnderflowed if
+ additional output data was inserted after the previous call and before this
+ call.
+*/
+PaError Pa_WriteStream( PaStream* stream,
+                        const void *buffer,
+                        unsigned long frames );
+
+
+/** Retrieve the number of frames that can be read from the stream without
+ waiting.
+
+ @return Returns a non-negative value representing the maximum number of frames
+ that can be read from the stream without blocking or busy waiting or, a
+ PaErrorCode (which are always negative) if PortAudio is not initialized or an
+ error is encountered.
+*/
+signed long Pa_GetStreamReadAvailable( PaStream* stream );
+
+
+/** Retrieve the number of frames that can be written to the stream without
+ waiting.
+
+ @return Returns a non-negative value representing the maximum number of frames
+ that can be written to the stream without blocking or busy waiting or, a
+ PaErrorCode (which are always negative) if PortAudio is not initialized or an
+ error is encountered.
+*/
+signed long Pa_GetStreamWriteAvailable( PaStream* stream );
+
+
+/* Miscellaneous utilities */
+
+
+/** Retrieve the size of a given sample format in bytes.
+
+ @return The size in bytes of a single sample in the specified format,
+ or paSampleFormatNotSupported if the format is not supported.
+*/
+PaError Pa_GetSampleSize( PaSampleFormat format );
+
+
+/** Put the caller to sleep for at least 'msec' milliseconds. This function is
+ provided only as a convenience for authors of portable code (such as the tests
+ and examples in the PortAudio distribution.)
+
+ The function may sleep longer than requested so don't rely on this for accurate
+ musical timing.
+*/
+void Pa_Sleep( long msec );
+
+
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* PORTAUDIO_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/ringbuffer.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/ringbuffer.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/ringbuffer.c	(revision 1163)
@@ -0,0 +1,270 @@
+/*
+ * $Id$
+ * ringbuffer.c
+ * Ring Buffer utility..
+ *
+ * Author: Phil Burk, http://www.softsynth.com
+ * modified for SMP safety on Mac OS X by Bjorn Roche
+ * also, alowed for const where possible
+ * Note that this is safe only for a single-thread reader and a
+ * single-thread writer.
+ *
+ * This program uses the PortAudio Portable Audio Library.
+ * For more information see: http://www.portaudio.com
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/**
+ @file
+ @ingroup hostapi_src
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include "ringbuffer.h"
+#include <string.h>
+
+/*
+ * We can undefine this, to turn off memory barriers, but that
+ * is only useful if we know we don't need to be MP safe or
+ * we are interested in doing some kind of tests.
+ */
+#define MPSAFE
+
+/****************
+ * First, we'll define some memory barrier primitives based on the system.
+ * right now only OS X and FreeBSD are supported. In addition to providing
+ * memory barriers, these functions should ensure that data cached in registers
+ * is written out to cache where it can be snooped by other CPUs. (ie, the volatile
+ * keyword should not be required)
+ *
+ * the primitives that must be defined are:
+ *
+ * FullMemoryBarrier()
+ * ReadMemoryBarrier()
+ * WriteMemoryBarrier()
+ *
+ ****************/
+
+#if 1
+#   define FullMemoryBarrier()
+#   define ReadMemoryBarrier()
+#   define WriteMemoryBarrier()
+#elif defined(__APPLE__) || defined(__FreeBSD__)
+#   include <libkern/OSAtomic.h>
+    /* Here are the memory barrier functions. Mac OS X and FreeBSD only provide
+       full memory barriers, so the three types of barriers are the same.
+       The asm volatile may be redundant with the memory barrier, but
+       until I have proof of that, I'm leaving it. */
+#   define FullMemoryBarrier()  do{ asm volatile("":::"memory"); OSMemoryBarrier(); }while(false)
+#   define ReadMemoryBarrier()  do{ asm volatile("":::"memory"); OSMemoryBarrier(); }while(false)
+#   define WriteMemoryBarrier() do{ asm volatile("":::"memory"); OSMemoryBarrier(); }while(false)
+#else
+#   error Memory Barriers not defined on this system or system unknown
+#endif
+
+/***************************************************************************
+ * Initialize FIFO.
+ * numBytes must be power of 2, returns -1 if not.
+ */
+long RingBuffer_Init( RingBuffer *rbuf, long numBytes, void *dataPtr )
+{
+    if( ((numBytes-1) & numBytes) != 0) return -1; /* Not Power of two. */
+    rbuf->bufferSize = numBytes;
+    rbuf->buffer = (char *)dataPtr;
+    RingBuffer_Flush( rbuf );
+    rbuf->bigMask = (numBytes*2)-1;
+    rbuf->smallMask = (numBytes)-1;
+    return 0;
+}
+/***************************************************************************
+** Return number of bytes available for reading. */
+long RingBuffer_GetReadAvailable( RingBuffer *rbuf )
+{
+#ifdef MPSAFE
+    ReadMemoryBarrier();
+#endif
+    return ( (rbuf->writeIndex - rbuf->readIndex) & rbuf->bigMask );
+}
+/***************************************************************************
+** Return number of bytes available for writing. */
+long RingBuffer_GetWriteAvailable( RingBuffer *rbuf )
+{
+    /* Since we are calling RingBuffer_GetReadAvailable, we don't need an aditional MB */
+    return ( rbuf->bufferSize - RingBuffer_GetReadAvailable(rbuf));
+}
+
+/***************************************************************************
+** Clear buffer. Should only be called when buffer is NOT being read. */
+void RingBuffer_Flush( RingBuffer *rbuf )
+{
+    rbuf->writeIndex = rbuf->readIndex = 0;
+}
+
+/***************************************************************************
+** Get address of region(s) to which we can write data.
+** If the region is contiguous, size2 will be zero.
+** If non-contiguous, size2 will be the size of second region.
+** Returns room available to be written or numBytes, whichever is smaller.
+*/
+long RingBuffer_GetWriteRegions( RingBuffer *rbuf, long numBytes,
+                                 void **dataPtr1, long *sizePtr1,
+                                 void **dataPtr2, long *sizePtr2 )
+{
+    long   index;
+    long   available = RingBuffer_GetWriteAvailable( rbuf );
+    if( numBytes > available ) numBytes = available;
+    /* Check to see if write is not contiguous. */
+    index = rbuf->writeIndex & rbuf->smallMask;
+    if( (index + numBytes) > rbuf->bufferSize )
+    {
+        /* Write data in two blocks that wrap the buffer. */
+        long   firstHalf = rbuf->bufferSize - index;
+        *dataPtr1 = &rbuf->buffer[index];
+        *sizePtr1 = firstHalf;
+        *dataPtr2 = &rbuf->buffer[0];
+        *sizePtr2 = numBytes - firstHalf;
+    }
+    else
+    {
+        *dataPtr1 = &rbuf->buffer[index];
+        *sizePtr1 = numBytes;
+        *dataPtr2 = NULL;
+        *sizePtr2 = 0;
+    }
+    return numBytes;
+}
+
+
+/***************************************************************************
+*/
+long RingBuffer_AdvanceWriteIndex( RingBuffer *rbuf, long numBytes )
+{
+#ifdef MPSAFE
+    /* we need to ensure that previous writes are seen before we update the write index */
+    WriteMemoryBarrier();
+    return rbuf->writeIndex = (rbuf->writeIndex + numBytes) & rbuf->bigMask;
+#else
+    return rbuf->writeIndex = (rbuf->writeIndex + numBytes) & rbuf->bigMask;
+#endif
+}
+
+/***************************************************************************
+** Get address of region(s) from which we can read data.
+** If the region is contiguous, size2 will be zero.
+** If non-contiguous, size2 will be the size of second region.
+** Returns room available to be written or numBytes, whichever is smaller.
+*/
+long RingBuffer_GetReadRegions( RingBuffer *rbuf, long numBytes,
+                                void **dataPtr1, long *sizePtr1,
+                                void **dataPtr2, long *sizePtr2 )
+{
+    long   index;
+    long   available = RingBuffer_GetReadAvailable( rbuf );
+    if( numBytes > available ) numBytes = available;
+    /* Check to see if read is not contiguous. */
+    index = rbuf->readIndex & rbuf->smallMask;
+    if( (index + numBytes) > rbuf->bufferSize )
+    {
+        /* Write data in two blocks that wrap the buffer. */
+        long firstHalf = rbuf->bufferSize - index;
+        *dataPtr1 = &rbuf->buffer[index];
+        *sizePtr1 = firstHalf;
+        *dataPtr2 = &rbuf->buffer[0];
+        *sizePtr2 = numBytes - firstHalf;
+    }
+    else
+    {
+        *dataPtr1 = &rbuf->buffer[index];
+        *sizePtr1 = numBytes;
+        *dataPtr2 = NULL;
+        *sizePtr2 = 0;
+    }
+    return numBytes;
+}
+/***************************************************************************
+*/
+long RingBuffer_AdvanceReadIndex( RingBuffer *rbuf, long numBytes )
+{
+#ifdef MPSAFE
+    /* we need to ensure that previous writes are always seen before updating the index. */
+    WriteMemoryBarrier();
+    return rbuf->readIndex = (rbuf->readIndex + numBytes) & rbuf->bigMask;
+#else
+    return rbuf->readIndex = (rbuf->readIndex + numBytes) & rbuf->bigMask;
+#endif
+}
+
+/***************************************************************************
+** Return bytes written. */
+long RingBuffer_Write( RingBuffer *rbuf, const void *data, long numBytes )
+{
+    long size1, size2, numWritten;
+    void *data1, *data2;
+    numWritten = RingBuffer_GetWriteRegions( rbuf, numBytes, &data1, &size1, &data2, &size2 );
+    if( size2 > 0 )
+    {
+
+        memcpy( data1, data, size1 );
+        data = ((char *)data) + size1;
+        memcpy( data2, data, size2 );
+    }
+    else
+    {
+        memcpy( data1, data, size1 );
+    }
+    RingBuffer_AdvanceWriteIndex( rbuf, numWritten );
+    return numWritten;
+}
+
+/***************************************************************************
+** Return bytes read. */
+long RingBuffer_Read( RingBuffer *rbuf, void *data, long numBytes )
+{
+    long size1, size2, numRead;
+    void *data1, *data2;
+    numRead = RingBuffer_GetReadRegions( rbuf, numBytes, &data1, &size1, &data2, &size2 );
+    if( size2 > 0 )
+    {
+        memcpy( data, data1, size1 );
+        data = ((char *)data) + size1;
+        memcpy( data, data2, size2 );
+    }
+    else
+    {
+        memcpy( data, data1, size1 );
+    }
+    RingBuffer_AdvanceReadIndex( rbuf, numRead );
+    return numRead;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/ringbuffer.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/ringbuffer.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/portaudio/ringbuffer.h	(revision 1163)
@@ -0,0 +1,117 @@
+#ifndef _RINGBUFFER_H
+#define _RINGBUFFER_H
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+/*
+ * $Id$
+ * ringbuffer.h
+ * Ring Buffer utility..
+ *
+ * Author: Phil Burk, http://www.softsynth.com
+ * modified for SMP safety on OS X by Bjorn Roche.
+ * also allowed for const where possible.
+ * Note that this is safe only for a single-thread reader
+ * and a single-thread writer.
+ *
+ * This program is distributed with the PortAudio Portable Audio Library.
+ * For more information see: http://www.portaudio.com
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * The text above constitutes the entire PortAudio license; however, 
+ * the PortAudio community also makes the following non-binding requests:
+ *
+ * Any person wishing to distribute modifications to the Software is
+ * requested to send the modifications to the original developer so that
+ * they can be incorporated into the canonical version. It is also 
+ * requested that these non-binding requests be included along with the 
+ * license above.
+ */
+
+/**
+ @file
+ @ingroup hostapi_src
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include "ringbuffer.h"
+#include <string.h>
+
+typedef struct
+{
+    long   bufferSize; /* Number of bytes in FIFO. Power of 2. Set by RingBuffer_Init. */
+    long   writeIndex; /* Index of next writable byte. Set by RingBuffer_AdvanceWriteIndex. */
+    long   readIndex;  /* Index of next readable byte. Set by RingBuffer_AdvanceReadIndex. */
+    long   bigMask;    /* Used for wrapping indices with extra bit to distinguish full/empty. */
+    long   smallMask;  /* Used for fitting indices to buffer. */
+    char * buffer;
+}
+RingBuffer;
+/*
+ * Initialize Ring Buffer.
+ * numBytes must be power of 2, returns -1 if not.
+ */
+long RingBuffer_Init( RingBuffer *rbuf, long numBytes, void *dataPtr );
+
+/* Clear buffer. Should only be called when buffer is NOT being read. */
+void RingBuffer_Flush( RingBuffer *rbuf );
+
+/* Return number of bytes available for writing. */
+long RingBuffer_GetWriteAvailable( RingBuffer *rbuf );
+/* Return number of bytes available for read. */
+long RingBuffer_GetReadAvailable( RingBuffer *rbuf );
+/* Return bytes written. */
+long RingBuffer_Write( RingBuffer *rbuf, const void *data, long numBytes );
+/* Return bytes read. */
+long RingBuffer_Read( RingBuffer *rbuf, void *data, long numBytes );
+
+/* Get address of region(s) to which we can write data.
+** If the region is contiguous, size2 will be zero.
+** If non-contiguous, size2 will be the size of second region.
+** Returns room available to be written or numBytes, whichever is smaller.
+*/
+long RingBuffer_GetWriteRegions( RingBuffer *rbuf, long numBytes,
+                                 void **dataPtr1, long *sizePtr1,
+                                 void **dataPtr2, long *sizePtr2 );
+long RingBuffer_AdvanceWriteIndex( RingBuffer *rbuf, long numBytes );
+
+/* Get address of region(s) from which we can read data.
+** If the region is contiguous, size2 will be zero.
+** If non-contiguous, size2 will be the size of second region.
+** Returns room available to be written or numBytes, whichever is smaller.
+*/
+long RingBuffer_GetReadRegions( RingBuffer *rbuf, long numBytes,
+                                void **dataPtr1, long *sizePtr1,
+                                void **dataPtr2, long *sizePtr2 );
+
+long RingBuffer_AdvanceReadIndex( RingBuffer *rbuf, long numBytes );
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* _RINGBUFFER_H */
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/resample.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/resample.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/resample.c	(revision 1163)
@@ -0,0 +1,704 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/*
+ * Based on:
+ * resample-1.8.tar.gz from the 
+ * Digital Audio Resampling Home Page located at
+ * http://www-ccrma.stanford.edu/~jos/resample/.
+ *
+ * SOFTWARE FOR SAMPLING-RATE CONVERSION AND FIR DIGITAL FILTER DESIGN
+ *
+ * Snippet from the resample.1 man page:
+ * 
+ * HISTORY
+ *
+ * The first version of this software was written by Julius O. Smith III
+ * <jos@ccrma.stanford.edu> at CCRMA <http://www-ccrma.stanford.edu> in
+ * 1981.  It was called SRCONV and was written in SAIL for PDP-10
+ * compatible machines.  The algorithm was first published in
+ * 
+ * Smith, Julius O. and Phil Gossett. ``A Flexible Sampling-Rate
+ * Conversion Method,'' Proceedings (2): 19.4.1-19.4.4, IEEE Conference
+ * on Acoustics, Speech, and Signal Processing, San Diego, March 1984.
+ * 
+ * An expanded tutorial based on this paper is available at the Digital
+ * Audio Resampling Home Page given above.
+ * 
+ * Circa 1988, the SRCONV program was translated from SAIL to C by
+ * Christopher Lee Fraley working with Roger Dannenberg at CMU.
+ * 
+ * Since then, the C version has been maintained by jos.
+ * 
+ * Sndlib support was added 6/99 by John Gibson <jgg9c@virginia.edu>.
+ * 
+ * The resample program is free software distributed in accordance
+ * with the Lesser GNU Public License (LGPL).  There is NO warranty; not
+ * even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/* PJMEDIA modification:
+ *  - remove resample(), just use SrcUp, SrcUD, and SrcLinear directly.
+ *  - move FilterUp() and FilterUD() from filterkit.c
+ *  - move stddefs.h and resample.h to this file.
+ *  - const correctness.
+ */
+#include <pjmedia/resample.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+
+
+#define THIS_FILE   "resample.c"
+
+
+/*
+ * Taken from stddefs.h
+ */
+#ifndef PI
+#define PI (3.14159265358979232846)
+#endif
+
+#ifndef PI2
+#define PI2 (6.28318530717958465692)
+#endif
+
+#define D2R (0.01745329348)          /* (2*pi)/360 */
+#define R2D (57.29577951)            /* 360/(2*pi) */
+
+#ifndef MAX
+#define MAX(x,y) ((x)>(y) ?(x):(y))
+#endif
+#ifndef MIN
+#define MIN(x,y) ((x)<(y) ?(x):(y))
+#endif
+
+#ifndef ABS
+#define ABS(x)   ((x)<0   ?(-(x)):(x))
+#endif
+
+#ifndef SGN
+#define SGN(x)   ((x)<0   ?(-1):((x)==0?(0):(1)))
+#endif
+
+typedef char           RES_BOOL;
+typedef short          RES_HWORD;
+typedef int            RES_WORD;
+typedef unsigned short RES_UHWORD;
+typedef unsigned int   RES_UWORD;
+
+#define MAX_HWORD (32767)
+#define MIN_HWORD (-32768)
+
+#ifdef DEBUG
+#define INLINE
+#else
+#define INLINE inline
+#endif
+
+/*
+ * Taken from resample.h
+ *
+ * The configuration constants below govern
+ * the number of bits in the input sample and filter coefficients, the 
+ * number of bits to the right of the binary-point for fixed-point math, etc.
+ *
+ */
+
+/* Conversion constants */
+#define Nhc       8
+#define Na        7
+#define Np       (Nhc+Na)
+#define Npc      (1<<Nhc)
+#define Amask    ((1<<Na)-1)
+#define Pmask    ((1<<Np)-1)
+#define Nh       16
+#define Nb       16
+#define Nhxn     14
+#define Nhg      (Nh-Nhxn)
+#define NLpScl   13
+
+/* Description of constants:
+ *
+ * Npc - is the number of look-up values available for the lowpass filter
+ *    between the beginning of its impulse response and the "cutoff time"
+ *    of the filter.  The cutoff time is defined as the reciprocal of the
+ *    lowpass-filter cut off frequence in Hz.  For example, if the
+ *    lowpass filter were a sinc function, Npc would be the index of the
+ *    impulse-response lookup-table corresponding to the first zero-
+ *    crossing of the sinc function.  (The inverse first zero-crossing
+ *    time of a sinc function equals its nominal cutoff frequency in Hz.)
+ *    Npc must be a power of 2 due to the details of the current
+ *    implementation. The default value of 512 is sufficiently high that
+ *    using linear interpolation to fill in between the table entries
+ *    gives approximately 16-bit accuracy in filter coefficients.
+ *
+ * Nhc - is log base 2 of Npc.
+ *
+ * Na - is the number of bits devoted to linear interpolation of the
+ *    filter coefficients.
+ *
+ * Np - is Na + Nhc, the number of bits to the right of the binary point
+ *    in the integer "time" variable. To the left of the point, it indexes
+ *    the input array (X), and to the right, it is interpreted as a number
+ *    between 0 and 1 sample of the input X.  Np must be less than 16 in
+ *    this implementation.
+ *
+ * Nh - is the number of bits in the filter coefficients. The sum of Nh and
+ *    the number of bits in the input data (typically 16) cannot exceed 32.
+ *    Thus Nh should be 16.  The largest filter coefficient should nearly
+ *    fill 16 bits (32767).
+ *
+ * Nb - is the number of bits in the input data. The sum of Nb and Nh cannot
+ *    exceed 32.
+ *
+ * Nhxn - is the number of bits to right shift after multiplying each input
+ *    sample times a filter coefficient. It can be as great as Nh and as
+ *    small as 0. Nhxn = Nh-2 gives 2 guard bits in the multiply-add
+ *    accumulation.  If Nhxn=0, the accumulation will soon overflow 32 bits.
+ *
+ * Nhg - is the number of guard bits in mpy-add accumulation (equal to Nh-Nhxn)
+ *
+ * NLpScl - is the number of bits allocated to the unity-gain normalization
+ *    factor.  The output of the lowpass filter is multiplied by LpScl and
+ *    then right-shifted NLpScl bits. To avoid overflow, we must have 
+ *    Nb+Nhg+NLpScl < 32.
+ */
+
+
+#ifdef _MSC_VER
+#   pragma warning(push, 3)
+//#   pragma warning(disable: 4245)   // Conversion from uint to ushort
+#   pragma warning(disable: 4244)   // Conversion from double to uint
+#   pragma warning(disable: 4146)   // unary minus operator applied to unsigned type, result still unsigned
+#   pragma warning(disable: 4761)   // integral size mismatch in argument; conversion supplied
+#endif
+
+#if defined(PJMEDIA_HAS_SMALL_FILTER) && PJMEDIA_HAS_SMALL_FILTER!=0
+#   include "smallfilter.h"
+#else
+#   define SMALL_FILTER_NMULT	0
+#   define SMALL_FILTER_SCALE	0
+#   define SMALL_FILTER_NWING	0
+#   define SMALL_FILTER_IMP	NULL
+#   define SMALL_FILTER_IMPD	NULL
+#endif
+
+#if defined(PJMEDIA_HAS_LARGE_FILTER) && PJMEDIA_HAS_LARGE_FILTER!=0
+#   include "largefilter.h"
+#else
+#   define LARGE_FILTER_NMULT	0
+#   define LARGE_FILTER_SCALE	0
+#   define LARGE_FILTER_NWING	0
+#   define LARGE_FILTER_IMP	NULL
+#   define LARGE_FILTER_IMPD	NULL
+#endif
+
+
+#undef INLINE
+#define INLINE
+#define HAVE_FILTER 0    
+
+#ifndef NULL
+#   define NULL	0
+#endif
+
+
+static INLINE RES_HWORD WordToHword(RES_WORD v, int scl)
+{
+    RES_HWORD out;
+    RES_WORD llsb = (1<<(scl-1));
+    v += llsb;		/* round */
+    v >>= scl;
+    if (v>MAX_HWORD) {
+	v = MAX_HWORD;
+    } else if (v < MIN_HWORD) {
+	v = MIN_HWORD;
+    }	
+    out = (RES_HWORD) v;
+    return out;
+}
+
+/* Sampling rate conversion using linear interpolation for maximum speed.
+ */
+static int 
+  SrcLinear(const RES_HWORD X[], RES_HWORD Y[], double pFactor, RES_UHWORD nx)
+{
+    RES_HWORD iconst;
+    RES_UWORD time = 0;
+    const RES_HWORD *xp;
+    RES_HWORD *Ystart, *Yend;
+    RES_WORD v,x1,x2;
+    
+    double dt;                  /* Step through input signal */ 
+    RES_UWORD dtb;                  /* Fixed-point version of Dt */
+    RES_UWORD endTime;              /* When time reaches EndTime, return to user */
+    
+    dt = 1.0/pFactor;            /* Output sampling period */
+    dtb = dt*(1<<Np) + 0.5;     /* Fixed-point representation */
+    
+    Ystart = Y;
+    Yend = Ystart + (unsigned)(nx * pFactor);
+    endTime = time + (1<<Np)*(RES_WORD)nx;
+    while (time < endTime)
+    {
+	iconst = (time) & Pmask;
+	xp = &X[(time)>>Np];      /* Ptr to current input sample */
+	x1 = *xp++;
+	x2 = *xp;
+	x1 *= ((1<<Np)-iconst);
+	x2 *= iconst;
+	v = x1 + x2;
+	*Y++ = WordToHword(v,Np);   /* Deposit output */
+	time += dtb;		    /* Move to next sample by time increment */
+    }
+    return (Y - Ystart);            /* Return number of output samples */
+}
+
+static RES_WORD FilterUp(const RES_HWORD Imp[], const RES_HWORD ImpD[], 
+		     RES_UHWORD Nwing, RES_BOOL Interp,
+		     const RES_HWORD *Xp, RES_HWORD Ph, RES_HWORD Inc)
+{
+    const RES_HWORD *Hp;
+    const RES_HWORD *Hdp = NULL;
+    const RES_HWORD *End;
+    RES_HWORD a = 0;
+    RES_WORD v, t;
+    
+    v=0;
+    Hp = &Imp[Ph>>Na];
+    End = &Imp[Nwing];
+    if (Interp) {
+	Hdp = &ImpD[Ph>>Na];
+	a = Ph & Amask;
+    }
+    if (Inc == 1)		/* If doing right wing...              */
+    {				/* ...drop extra coeff, so when Ph is  */
+	End--;			/*    0.5, we don't do too many mult's */
+	if (Ph == 0)		/* If the phase is zero...           */
+	{			/* ...then we've already skipped the */
+	    Hp += Npc;		/*    first sample, so we must also  */
+	    Hdp += Npc;		/*    skip ahead in Imp[] and ImpD[] */
+	}
+    }
+    if (Interp)
+      while (Hp < End) {
+	  t = *Hp;		/* Get filter coeff */
+	  t += (((RES_WORD)*Hdp)*a)>>Na; /* t is now interp'd filter coeff */
+	  Hdp += Npc;		/* Filter coeff differences step */
+	  t *= *Xp;		/* Mult coeff by input sample */
+	  if (t & (1<<(Nhxn-1)))  /* Round, if needed */
+	    t += (1<<(Nhxn-1));
+	  t >>= Nhxn;		/* Leave some guard bits, but come back some */
+	  v += t;			/* The filter output */
+	  Hp += Npc;		/* Filter coeff step */
+
+	  Xp += Inc;		/* Input signal step. NO CHECK ON BOUNDS */
+      } 
+    else 
+      while (Hp < End) {
+	  t = *Hp;		/* Get filter coeff */
+	  t *= *Xp;		/* Mult coeff by input sample */
+	  if (t & (1<<(Nhxn-1)))  /* Round, if needed */
+	    t += (1<<(Nhxn-1));
+	  t >>= Nhxn;		/* Leave some guard bits, but come back some */
+	  v += t;			/* The filter output */
+	  Hp += Npc;		/* Filter coeff step */
+	  Xp += Inc;		/* Input signal step. NO CHECK ON BOUNDS */
+      }
+    return(v);
+}
+
+
+static RES_WORD FilterUD(const RES_HWORD Imp[], const RES_HWORD ImpD[],
+		     RES_UHWORD Nwing, RES_BOOL Interp,
+		     const RES_HWORD *Xp, RES_HWORD Ph, RES_HWORD Inc, RES_UHWORD dhb)
+{
+    RES_HWORD a;
+    const RES_HWORD *Hp, *Hdp, *End;
+    RES_WORD v, t;
+    RES_UWORD Ho;
+    
+    v=0;
+    Ho = (Ph*(RES_UWORD)dhb)>>Np;
+    End = &Imp[Nwing];
+    if (Inc == 1)		/* If doing right wing...              */
+    {				/* ...drop extra coeff, so when Ph is  */
+	End--;			/*    0.5, we don't do too many mult's */
+	if (Ph == 0)		/* If the phase is zero...           */
+	  Ho += dhb;		/* ...then we've already skipped the */
+    }				/*    first sample, so we must also  */
+				/*    skip ahead in Imp[] and ImpD[] */
+    if (Interp)
+      while ((Hp = &Imp[Ho>>Na]) < End) {
+	  t = *Hp;		/* Get IR sample */
+	  Hdp = &ImpD[Ho>>Na];  /* get interp (lower Na) bits from diff table*/
+	  a = Ho & Amask;	/* a is logically between 0 and 1 */
+	  t += (((RES_WORD)*Hdp)*a)>>Na; /* t is now interp'd filter coeff */
+	  t *= *Xp;		/* Mult coeff by input sample */
+	  if (t & 1<<(Nhxn-1))	/* Round, if needed */
+	    t += 1<<(Nhxn-1);
+	  t >>= Nhxn;		/* Leave some guard bits, but come back some */
+	  v += t;			/* The filter output */
+	  Ho += dhb;		/* IR step */
+	  Xp += Inc;		/* Input signal step. NO CHECK ON BOUNDS */
+      }
+    else 
+      while ((Hp = &Imp[Ho>>Na]) < End) {
+	  t = *Hp;		/* Get IR sample */
+	  t *= *Xp;		/* Mult coeff by input sample */
+	  if (t & 1<<(Nhxn-1))	/* Round, if needed */
+	    t += 1<<(Nhxn-1);
+	  t >>= Nhxn;		/* Leave some guard bits, but come back some */
+	  v += t;			/* The filter output */
+	  Ho += dhb;		/* IR step */
+	  Xp += Inc;		/* Input signal step. NO CHECK ON BOUNDS */
+      }
+    return(v);
+}
+
+/* Sampling rate up-conversion only subroutine;
+ * Slightly faster than down-conversion;
+ */
+static int SrcUp(const RES_HWORD X[], RES_HWORD Y[], double pFactor, 
+		 RES_UHWORD nx, RES_UHWORD pNwing, RES_UHWORD pLpScl,
+		 const RES_HWORD pImp[], const RES_HWORD pImpD[], RES_BOOL Interp)
+{
+    const RES_HWORD *xp;
+    RES_HWORD *Ystart, *Yend;
+    RES_WORD v;
+    
+    double dt;                  /* Step through input signal */ 
+    RES_UWORD dtb;                  /* Fixed-point version of Dt */
+    RES_UWORD time = 0;
+    RES_UWORD endTime;              /* When time reaches EndTime, return to user */
+    
+    dt = 1.0/pFactor;            /* Output sampling period */
+    dtb = dt*(1<<Np) + 0.5;     /* Fixed-point representation */
+    
+    Ystart = Y;
+    Yend = Ystart + (unsigned)(nx * pFactor);
+    endTime = time + (1<<Np)*(RES_WORD)nx;
+    while (time < endTime)
+    {
+	xp = &X[time>>Np];      /* Ptr to current input sample */
+	/* Perform left-wing inner product */
+	v = 0;
+	v = FilterUp(pImp, pImpD, pNwing, Interp, xp, (RES_HWORD)(time&Pmask),-1);
+
+	/* Perform right-wing inner product */
+	v += FilterUp(pImp, pImpD, pNwing, Interp, xp+1,  (RES_HWORD)((-time)&Pmask),1);
+
+	v >>= Nhg;		/* Make guard bits */
+	v *= pLpScl;		/* Normalize for unity filter gain */
+	*Y++ = WordToHword(v,NLpScl);   /* strip guard bits, deposit output */
+	time += dtb;		/* Move to next sample by time increment */
+    }
+    return (Y - Ystart);        /* Return the number of output samples */
+}
+
+
+/* Sampling rate conversion subroutine */
+
+static int SrcUD(const RES_HWORD X[], RES_HWORD Y[], double pFactor, 
+		 RES_UHWORD nx, RES_UHWORD pNwing, RES_UHWORD pLpScl,
+		 const RES_HWORD pImp[], const RES_HWORD pImpD[], RES_BOOL Interp)
+{
+    const RES_HWORD *xp;
+    RES_HWORD *Ystart, *Yend;
+    RES_WORD v;
+    
+    double dh;                  /* Step through filter impulse response */
+    double dt;                  /* Step through input signal */
+    RES_UWORD time = 0;
+    RES_UWORD endTime;          /* When time reaches EndTime, return to user */
+    RES_UWORD dhb, dtb;         /* Fixed-point versions of Dh,Dt */
+    
+    dt = 1.0/pFactor;            /* Output sampling period */
+    dtb = dt*(1<<Np) + 0.5;     /* Fixed-point representation */
+    
+    dh = MIN(Npc, pFactor*Npc);  /* Filter sampling period */
+    dhb = dh*(1<<Na) + 0.5;     /* Fixed-point representation */
+    
+    Ystart = Y;
+    Yend = Ystart + (unsigned)(nx * pFactor);
+    endTime = time + (1<<Np)*(RES_WORD)nx;
+    while (time < endTime)
+    {
+	xp = &X[time>>Np];	/* Ptr to current input sample */
+	v = FilterUD(pImp, pImpD, pNwing, Interp, xp, (RES_HWORD)(time&Pmask),
+		     -1, dhb);	/* Perform left-wing inner product */
+	v += FilterUD(pImp, pImpD, pNwing, Interp, xp+1, (RES_HWORD)((-time)&Pmask),
+		      1, dhb);	/* Perform right-wing inner product */
+	v >>= Nhg;		/* Make guard bits */
+	v *= pLpScl;		/* Normalize for unity filter gain */
+	*Y++ = WordToHword(v,NLpScl);   /* strip guard bits, deposit output */
+	time += dtb;		/* Move to next sample by time increment */
+    }
+    return (Y - Ystart);        /* Return the number of output samples */
+}
+
+
+/* ***************************************************************************
+ *
+ * PJMEDIA RESAMPLE 
+ *
+ * ***************************************************************************
+ */
+
+struct pjmedia_resample
+{
+    double	 factor;	/* Conversion factor = rate_out / rate_in.  */
+    pj_bool_t	 large_filter;	/* Large filter?			    */
+    pj_bool_t	 high_quality;	/* Not fast?				    */
+    unsigned	 xoff;		/* History and lookahead size, in samples   */
+    unsigned	 frame_size;	/* Samples per frame.			    */
+    pj_int16_t	*buffer;	/* Input buffer.			    */
+};
+
+
+PJ_DEF(pj_status_t) pjmedia_resample_create( pj_pool_t *pool,
+					     pj_bool_t high_quality,
+					     pj_bool_t large_filter,
+					     unsigned rate_in,
+					     unsigned rate_out,
+					     unsigned samples_per_frame,
+					     pjmedia_resample **p_resample)
+{
+    pjmedia_resample *resample;
+
+    PJ_ASSERT_RETURN(pool && p_resample && rate_in &&
+		     rate_out && samples_per_frame, PJ_EINVAL);
+
+    resample = pj_pool_alloc(pool, sizeof(pjmedia_resample));
+    PJ_ASSERT_RETURN(resample, PJ_ENOMEM);
+
+    /*
+     * If we're downsampling, always use the fast algorithm since it seems
+     * to yield the same quality.
+     */
+    if (rate_out < rate_in) {
+	//no this is not a good idea. It sounds pretty good with speech,
+	//but very poor with background noise etc.
+	//high_quality = 0;
+    }
+
+#if !defined(PJMEDIA_HAS_LARGE_FILTER) || PJMEDIA_HAS_LARGE_FILTER==0
+    /*
+     * If large filter is excluded in the build, then prevent application
+     * from using it.
+     */
+    if (high_quality && large_filter) {
+	large_filter = PJ_FALSE;
+	PJ_LOG(5,(THIS_FILE, 
+		  "Resample uses small filter because large filter is "
+		  "disabled"));
+    }
+#endif
+
+#if !defined(PJMEDIA_HAS_SMALL_FILTER) || PJMEDIA_HAS_SMALL_FILTER==0
+    /*
+     * If small filter is excluded in the build and application wants to
+     * use it, then drop to linear conversion.
+     */
+    if (high_quality && large_filter == 0) {
+	high_quality = PJ_FALSE;
+	PJ_LOG(4,(THIS_FILE, 
+		  "Resample uses linear because small filter is disabled"));
+    }
+#endif
+
+    resample->factor = rate_out * 1.0 / rate_in;
+    resample->large_filter = large_filter;
+    resample->high_quality = high_quality;
+    resample->frame_size = samples_per_frame;
+
+    if (high_quality) {
+	unsigned size;
+
+	/* This is a bug in xoff calculation, thanks Stephane Lussier
+	 * of Macadamian dot com.
+	 *   resample->xoff = large_filter ? 32 : 6;
+	 */
+	if (large_filter)
+	    resample->xoff = (LARGE_FILTER_NMULT + 1) / 2.0  *  
+			     MAX(1.0, 1.0/resample->factor);
+	else
+	    resample->xoff = (SMALL_FILTER_NMULT + 1) / 2.0  *  
+			     MAX(1.0, 1.0/resample->factor);
+
+
+	size = (samples_per_frame + 2*resample->xoff) * sizeof(pj_int16_t);
+	resample->buffer = pj_pool_alloc(pool, size);
+	PJ_ASSERT_RETURN(resample->buffer, PJ_ENOMEM);
+
+	pjmedia_zero_samples(resample->buffer, resample->xoff*2);
+
+
+    } else {
+	resample->xoff = 0;
+    }
+
+    *p_resample = resample;
+
+    PJ_LOG(5,(THIS_FILE, "resample created: %s qualiy, %s filter, in/out "
+			  "rate=%d/%d", 
+			  (high_quality?"high":"low"),
+			  (large_filter?"large":"small"),
+			  rate_in, rate_out));
+    return PJ_SUCCESS;
+}
+
+
+
+PJ_DEF(void) pjmedia_resample_run( pjmedia_resample *resample,
+				   const pj_int16_t *input,
+				   pj_int16_t *output )
+{
+    PJ_ASSERT_ON_FAIL(resample, return);
+
+    if (resample->high_quality) {
+	pj_int16_t *dst_buf;
+	const pj_int16_t *src_buf;
+
+	/* Okay chaps, here's how we do resampling.
+	 *
+	 * The original resample algorithm requires xoff samples *before* the
+	 * input buffer as history, and another xoff samples *after* the
+	 * end of the input buffer as lookahead. Since application can only
+	 * supply framesize buffer on each run, PJMEDIA needs to arrange the
+	 * buffer to meet these requirements.
+	 *
+	 * So here comes the trick.
+	 *
+	 * First of all, because of the history and lookahead requirement, 
+	 * resample->buffer need to accomodate framesize+2*xoff samples in its
+	 * buffer. This is done when the buffer is created.
+	 *
+	 * On the first run, the input frame (supplied by application) is
+	 * copied to resample->buffer at 2*xoff position. The first 2*xoff
+	 * samples are initially zeroed (in the initialization). The resample
+	 * algorithm then invoked at resample->buffer+xoff ONLY, thus giving
+	 * it one xoff at the beginning as zero, and one xoff at the end
+	 * as the end of the original input. The resample algorithm will see
+	 * that the first xoff samples in the input as zero.
+	 *
+	 * So here's the layout of resample->buffer on the first run.
+	 *
+	 * run 0 
+	 *     +------+------+--------------+
+	 *     | 0000 | 0000 |  frame0...   |
+	 *     +------+------+--------------+
+	 *     ^      ^      ^              ^
+         *     0    xoff  2*xoff       size+2*xoff 
+         *
+	 * (Note again: resample algorithm is called at resample->buffer+xoff)
+	 *
+	 * At the end of the run, 2*xoff samples from the end of 
+	 * resample->buffer are copied to the beginning of resample->buffer.
+	 * The first xoff part of this will be used as history for the next
+	 * run, and the second xoff part of this is actually the start of
+	 * resampling for the next run.
+	 *
+	 * And the first run completes, the function returns.
+	 *
+	 * 
+	 * On the next run, the input frame supplied by application is again
+	 * copied at 2*xoff position in the resample->buffer, and the 
+	 * resample algorithm is again invoked at resample->buffer+xoff 
+	 * position. So effectively, the resample algorithm will start its
+	 * operation on the last xoff from the previous frame, and gets the
+	 * history from the last 2*xoff of the previous frame, and the look-
+	 * ahead from the last xoff of current frame.
+	 *
+	 * So on this run, the buffer layout is:
+	 *
+	 * run 1
+	 *     +------+------+--------------+
+	 *     | frm0 | frm0 |  frame1...   |
+	 *     +------+------+--------------+
+	 *     ^      ^      ^              ^
+         *     0    xoff  2*xoff       size+2*xoff 
+	 *
+	 * As you can see from above diagram, the resampling algorithm is
+	 * actually called from the last xoff part of previous frame (frm0).
+	 *
+	 * And so on the process continues for the next frame, and the next,
+	 * and the next, ...
+	 *
+	 */
+	dst_buf = resample->buffer + resample->xoff*2;
+	pjmedia_copy_samples(dst_buf, input, resample->frame_size);
+	    
+	if (resample->factor >= 1) {
+
+	    if (resample->large_filter) {
+		SrcUp(resample->buffer + resample->xoff, output,
+		      resample->factor, resample->frame_size,
+		      LARGE_FILTER_NWING, LARGE_FILTER_SCALE,
+		      LARGE_FILTER_IMP, LARGE_FILTER_IMPD,
+		      PJ_TRUE);
+	    } else {
+		SrcUp(resample->buffer + resample->xoff, output,
+		      resample->factor, resample->frame_size,
+		      SMALL_FILTER_NWING, SMALL_FILTER_SCALE,
+		      SMALL_FILTER_IMP, SMALL_FILTER_IMPD,
+		      PJ_TRUE);
+	    }
+
+	} else {
+
+	    if (resample->large_filter) {
+
+		SrcUD( resample->buffer + resample->xoff, output,
+		       resample->factor, resample->frame_size,
+		       LARGE_FILTER_NWING, 
+		       LARGE_FILTER_SCALE * resample->factor + 0.5,
+		       LARGE_FILTER_IMP, LARGE_FILTER_IMPD,
+		       PJ_TRUE);
+
+	    } else {
+
+		SrcUD( resample->buffer + resample->xoff, output,
+		       resample->factor, resample->frame_size,
+		       SMALL_FILTER_NWING, 
+		       SMALL_FILTER_SCALE * resample->factor + 0.5,
+		       SMALL_FILTER_IMP, SMALL_FILTER_IMPD,
+		       PJ_TRUE);
+
+	    }
+
+	}
+
+	dst_buf = resample->buffer;
+	src_buf = input + resample->frame_size - resample->xoff*2;
+	pjmedia_copy_samples(dst_buf, src_buf, resample->xoff * 2);
+
+    } else {
+	SrcLinear( input, output, resample->factor, resample->frame_size);
+    }
+}
+
+PJ_DEF(unsigned) pjmedia_resample_get_input_size(pjmedia_resample *resample)
+{
+    PJ_ASSERT_RETURN(resample != NULL, 0);
+    return resample->frame_size;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/resample_port.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/resample_port.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/resample_port.c	(revision 1163)
@@ -0,0 +1,211 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/resample.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+
+#define BYTES_PER_SAMPLE	2
+#define SIGNATURE		PJMEDIA_PORT_SIGNATURE('R','S','M','P')
+
+
+struct resample_port
+{
+    pjmedia_port	 base;
+    pjmedia_port	*dn_port;
+    unsigned		 options;
+    pjmedia_resample	*resample_get;
+    pjmedia_resample	*resample_put;
+    pj_int16_t		*get_buf;
+    pj_int16_t		*put_buf;
+};
+
+
+
+static pj_status_t resample_put_frame(pjmedia_port *this_port,
+				      const pjmedia_frame *frame);
+static pj_status_t resample_get_frame(pjmedia_port *this_port, 
+				      pjmedia_frame *frame);
+static pj_status_t resample_destroy(pjmedia_port *this_port);
+
+
+
+PJ_DEF(pj_status_t) pjmedia_resample_port_create( pj_pool_t *pool,
+						  pjmedia_port *dn_port,
+						  unsigned clock_rate,
+						  unsigned opt,
+						  pjmedia_port **p_port  )
+{
+    const pj_str_t name = pj_str("resample");
+    struct resample_port *rport;
+    unsigned ptime;
+    pj_status_t status;
+
+    /* Validate arguments. */
+    PJ_ASSERT_RETURN(pool && dn_port && clock_rate && p_port, PJ_EINVAL);
+
+    /* Only supports 16bit samples per frame */
+    PJ_ASSERT_RETURN(dn_port->info.bits_per_sample == 16, PJMEDIA_ENCBITS);
+
+    ptime = dn_port->info.samples_per_frame * 1000 / 
+	    dn_port->info.clock_rate;
+    
+    /* Create and initialize port. */
+    rport = pj_pool_zalloc(pool, sizeof(struct resample_port));
+    PJ_ASSERT_RETURN(rport != NULL, PJ_ENOMEM);
+
+    pjmedia_port_info_init(&rport->base.info, &name, SIGNATURE, clock_rate,
+			   dn_port->info.channel_count, BYTES_PER_SAMPLE * 8, 
+			   clock_rate * ptime / 1000);
+
+    rport->dn_port = dn_port;
+    rport->options = opt;
+
+
+    /* Create buffers. 
+     * We need separate buffer for get_frame() and put_frame() since
+     * both functions may run simultaneously.
+     */
+    rport->get_buf = pj_pool_alloc(pool, dn_port->info.bytes_per_frame);
+    PJ_ASSERT_RETURN(rport->get_buf != NULL, PJ_ENOMEM);
+
+    rport->put_buf = pj_pool_alloc(pool, dn_port->info.bytes_per_frame);
+    PJ_ASSERT_RETURN(rport->put_buf != NULL, PJ_ENOMEM);
+
+
+    /* Create "get_frame" resample */
+    status = pjmedia_resample_create(pool, 
+				     (opt&PJMEDIA_RESAMPLE_USE_LINEAR)==0,
+				     (opt&PJMEDIA_RESAMPLE_USE_SMALL_FILTER)==0,
+				     dn_port->info.clock_rate, 
+				     rport->base.info.clock_rate,
+				     dn_port->info.samples_per_frame, 
+				     &rport->resample_get);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create "put_frame" resample */
+    status = pjmedia_resample_create(pool, 
+				     (opt&PJMEDIA_RESAMPLE_USE_LINEAR)==0, 
+				     (opt&PJMEDIA_RESAMPLE_USE_SMALL_FILTER)==0,
+				     rport->base.info.clock_rate, 
+				     dn_port->info.clock_rate,
+				     rport->base.info.samples_per_frame,
+				     &rport->resample_put);
+
+    /* Media port interface */
+    rport->base.get_frame = &resample_get_frame;
+    rport->base.put_frame = &resample_put_frame;
+    rport->base.on_destroy = &resample_destroy;
+
+
+    /* Done */
+    *p_port = &rport->base;
+
+    return PJ_SUCCESS;
+}
+
+
+
+static pj_status_t resample_put_frame(pjmedia_port *this_port,
+				      const pjmedia_frame *frame)
+{
+    struct resample_port *rport = (struct resample_port*) this_port;
+    pjmedia_frame downstream_frame;
+
+    /* Return if we don't have downstream port. */
+    if (rport->dn_port == NULL) {
+	return PJ_SUCCESS;
+    }
+
+    if (frame->type == PJMEDIA_FRAME_TYPE_AUDIO) {
+	pjmedia_resample_run( rport->resample_put, frame->buf, 
+			      rport->put_buf);
+
+	downstream_frame.buf = rport->put_buf;
+	downstream_frame.size = rport->dn_port->info.bytes_per_frame;
+    } else {
+	downstream_frame.buf = frame->buf;
+	downstream_frame.size = frame->size;
+    }
+
+    downstream_frame.type = frame->type;
+    downstream_frame.timestamp.u64 = frame->timestamp.u64;
+
+    return pjmedia_port_put_frame( rport->dn_port, &downstream_frame );
+}
+
+
+
+static pj_status_t resample_get_frame(pjmedia_port *this_port, 
+				      pjmedia_frame *frame)
+{
+    struct resample_port *rport = (struct resample_port*) this_port;
+    pjmedia_frame tmp_frame;
+    pj_status_t status;
+
+    /* Return silence if we don't have downstream port */
+    if (rport->dn_port == NULL) {
+	pj_bzero(frame->buf, frame->size);
+	return PJ_SUCCESS;
+    }
+
+    tmp_frame.buf = rport->get_buf;
+    tmp_frame.size = rport->dn_port->info.bytes_per_frame;
+    tmp_frame.timestamp.u64 = frame->timestamp.u64;
+    tmp_frame.type = PJMEDIA_FRAME_TYPE_AUDIO;
+
+    status = pjmedia_port_get_frame( rport->dn_port, &tmp_frame);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    if (tmp_frame.type != PJMEDIA_FRAME_TYPE_AUDIO) {
+	frame->type = tmp_frame.type;
+	frame->timestamp = tmp_frame.timestamp;
+	frame->size = tmp_frame.size;
+	if (tmp_frame.size)
+	    pj_memcpy(frame->buf, tmp_frame.buf, tmp_frame.size);
+	return PJ_SUCCESS;
+    }
+
+    pjmedia_resample_run( rport->resample_get, tmp_frame.buf, frame->buf);
+
+    frame->size = rport->base.info.bytes_per_frame;
+    frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t resample_destroy(pjmedia_port *this_port)
+{
+    struct resample_port *rport = (struct resample_port*) this_port;
+
+    if ((rport->options & PJMEDIA_RESAMPLE_DONT_DESTROY_DN)==0) {
+	pjmedia_port_destroy(rport->dn_port);
+	rport->dn_port = NULL;
+    }
+
+    /* Nothing else to do */
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/rtcp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/rtcp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/rtcp.c	(revision 1163)
@@ -0,0 +1,647 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/rtcp.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/sock.h>
+#include <pj/string.h>
+
+#define THIS_FILE "rtcp.c"
+
+#define RTCP_SR   200
+#define RTCP_RR   201
+
+
+#if PJ_HAS_HIGH_RES_TIMER==0
+#   error "High resolution timer needs to be enabled"
+#endif
+
+
+
+#if 0
+#   define TRACE_(x)	PJ_LOG(3,x)
+#else
+#   define TRACE_(x)	;
+#endif
+
+
+/*
+ * Get NTP time.
+ */
+PJ_DEF(pj_status_t) pjmedia_rtcp_get_ntp_time(const pjmedia_rtcp_session *sess,
+					      pjmedia_rtcp_ntp_rec *ntp)
+{
+/* Seconds between 1900-01-01 to 1970-01-01 */
+#define JAN_1970  (2208988800UL)
+    pj_timestamp ts;
+    pj_status_t status;
+
+    status = pj_get_timestamp(&ts);
+
+    /* Fill up the high 32bit part */
+    ntp->hi = (pj_uint32_t)((ts.u64 - sess->ts_base.u64) / sess->ts_freq.u64)
+	      + sess->tv_base.sec + JAN_1970;
+
+    /* Calculate seconds fractions */
+    ts.u64 %= sess->ts_freq.u64;
+    pj_assert(ts.u64 < sess->ts_freq.u64);
+    ts.u64 = (ts.u64 << 32) / sess->ts_freq.u64;
+
+    /* Fill up the low 32bit part */
+    ntp->lo = ts.u32.lo;
+
+
+#if (defined(PJ_WIN32) && PJ_WIN32!=0) || \
+    (defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0)
+
+    /* On Win32, since we use QueryPerformanceCounter() as the backend
+     * timestamp API, we need to protect against this bug:
+     *   Performance counter value may unexpectedly leap forward
+     *   http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q274323
+     */
+    {
+	/*
+	 * Compare elapsed time reported by timestamp with actual elapsed 
+	 * time. If the difference is too excessive, then we use system
+	 * time instead.
+	 */
+
+	/* MIN_DIFF needs to be large enough so that "normal" diff caused
+	 * by system activity or context switch doesn't trigger the time
+	 * correction.
+	 */
+	enum { MIN_DIFF = 400 };
+
+	pj_time_val ts_time, elapsed, diff;
+
+	pj_gettimeofday(&elapsed);
+
+	ts_time.sec = ntp->hi - sess->tv_base.sec - JAN_1970;
+	ts_time.msec = (long)(ntp->lo * 1000.0 / 0xFFFFFFFF);
+
+	PJ_TIME_VAL_SUB(elapsed, sess->tv_base);
+
+	if (PJ_TIME_VAL_LT(ts_time, elapsed)) {
+	    diff = elapsed;
+	    PJ_TIME_VAL_SUB(diff, ts_time);
+	} else {
+	    diff = ts_time;
+	    PJ_TIME_VAL_SUB(diff, elapsed);
+	}
+
+	if (PJ_TIME_VAL_MSEC(diff) >= MIN_DIFF) {
+
+	    TRACE_((sess->name, "RTCP NTP timestamp corrected by %d ms",
+		    PJ_TIME_VAL_MSEC(diff)));
+
+
+	    ntp->hi = elapsed.sec + sess->tv_base.sec + JAN_1970;
+	    ntp->lo = (elapsed.msec * 65536 / 1000) << 16;
+	}
+
+    }
+#endif
+
+    return status;
+}
+
+
+PJ_DEF(void) pjmedia_rtcp_init(pjmedia_rtcp_session *sess, 
+			       char *name,
+			       unsigned clock_rate,
+			       unsigned samples_per_frame,
+			       pj_uint32_t ssrc)
+{
+    pjmedia_rtcp_pkt *rtcp_pkt = &sess->rtcp_pkt;
+    pj_time_val now;
+    
+    /* Memset everything */
+    pj_bzero(sess, sizeof(pjmedia_rtcp_session));
+
+    /* Last RX timestamp in RTP packet */
+    sess->rtp_last_ts = (unsigned)-1;
+
+    /* Name */
+    sess->name = name ? name : THIS_FILE,
+
+    /* Set clock rate */
+    sess->clock_rate = clock_rate;
+    sess->pkt_size = samples_per_frame;
+
+    /* Init common RTCP header */
+    rtcp_pkt->common.version = 2;
+    rtcp_pkt->common.count = 1;
+    rtcp_pkt->common.pt = RTCP_SR;
+    rtcp_pkt->common.length = pj_htons(12);
+    
+    /* Init SR */
+    rtcp_pkt->sr.ssrc = pj_htonl(ssrc);
+    
+    /* Get time and timestamp base and frequency */
+    pj_gettimeofday(&now);
+    sess->tv_base = now;
+    sess->stat.start = now;
+    pj_get_timestamp(&sess->ts_base);
+    pj_get_timestamp_freq(&sess->ts_freq);
+
+    /* RR will be initialized on receipt of the first RTP packet. */
+}
+
+
+PJ_DEF(void) pjmedia_rtcp_fini(pjmedia_rtcp_session *sess)
+{
+    /* Nothing to do. */
+    PJ_UNUSED_ARG(sess);
+}
+
+static void rtcp_init_seq(pjmedia_rtcp_session *sess)
+{
+    sess->received = 0;
+    sess->exp_prior = 0;
+    sess->rx_prior = 0;
+    sess->transit = 0;
+    sess->jitter = 0;
+}
+
+PJ_DEF(void) pjmedia_rtcp_rx_rtp(pjmedia_rtcp_session *sess, 
+				 unsigned seq, 
+				 unsigned rtp_ts,
+				 unsigned payload)
+{   
+    pj_timestamp ts;
+    pj_uint32_t arrival;
+    pj_int32_t transit;
+    pjmedia_rtp_status seq_st;
+    unsigned last_seq;
+
+    if (sess->stat.rx.pkt == 0) {
+	/* Init sequence for the first time. */
+	pjmedia_rtp_seq_init(&sess->seq_ctrl, (pj_uint16_t)seq);
+    } 
+
+    sess->stat.rx.pkt++;
+    sess->stat.rx.bytes += payload;
+
+    /* Process the RTP packet. */
+    last_seq = sess->seq_ctrl.max_seq;
+    pjmedia_rtp_seq_update(&sess->seq_ctrl, (pj_uint16_t)seq, &seq_st);
+
+    if (seq_st.status.flag.restart) {
+	rtcp_init_seq(sess);
+    }
+    
+    if (seq_st.status.flag.dup) {
+	sess->stat.rx.dup++;
+	TRACE_((sess->name, "Duplicate packet detected"));
+    }
+
+    if (seq_st.status.flag.outorder && !seq_st.status.flag.probation) {
+	sess->stat.rx.reorder++;
+	TRACE_((sess->name, "Out-of-order packet detected"));
+    }
+
+    if (seq_st.status.flag.bad) {
+	sess->stat.rx.discard++;
+	TRACE_((sess->name, "Bad packet discarded"));
+	return;
+    }
+
+    /* Only mark "good" packets */
+    ++sess->received;
+
+    /* Calculate loss periods. */
+    if (seq_st.diff > 1) {
+	unsigned count = seq_st.diff - 1;
+	unsigned period;
+
+	period = count * sess->pkt_size * 1000 / sess->clock_rate;
+	period *= 1000;
+
+	/* Update packet lost. 
+	 * The packet lost number will also be updated when we're sending
+	 * outbound RTCP RR.
+	 */
+	sess->stat.rx.loss += (seq_st.diff - 1);
+	TRACE_((sess->name, "%d packet(s) lost", seq_st.diff - 1));
+
+	/* Update loss period stat */
+	if (sess->stat.rx.loss_period.count == 0 ||
+	    period < sess->stat.rx.loss_period.min)
+	{
+	    sess->stat.rx.loss_period.min = period;
+	}
+	if (period > sess->stat.rx.loss_period.max)
+	    sess->stat.rx.loss_period.max = period;
+	sess->stat.rx.loss_period.avg = 
+	    (sess->stat.rx.loss_period.avg * sess->stat.rx.loss_period.count +
+	     period) / (sess->stat.rx.loss_period.count + 1);
+	sess->stat.rx.loss_period.last = period;
+	++sess->stat.rx.loss_period.count;
+    }
+
+
+    /*
+     * Calculate jitter only when sequence is good (see RFC 3550 section A.8),
+     * AND only when the timestamp is different than the last packet
+     * (see RTP FAQ).
+     */
+    if (seq_st.diff == 1 && rtp_ts != sess->rtp_last_ts) {
+	/* Get arrival time and convert timestamp to samples */
+	pj_get_timestamp(&ts);
+	ts.u64 = ts.u64 * sess->clock_rate / sess->ts_freq.u64;
+	arrival = ts.u32.lo;
+
+	transit = arrival - rtp_ts;
+    
+	/* Ignore the first N packets as they normally have bad jitter
+	 * due to other threads working to establish the call
+	 */
+	if (sess->transit == 0 || 
+	    sess->received < PJMEDIA_RTCP_IGNORE_FIRST_PACKETS) 
+	{
+	    sess->transit = transit;
+	    sess->stat.rx.jitter.min = 2000;
+	} else {
+	    pj_int32_t d;
+	    pj_uint32_t jitter;
+	    
+	    d = transit - sess->transit;
+	    sess->transit = transit;
+	    if (d < 0) 
+		d = -d;
+	    
+	    sess->jitter += d - ((sess->jitter + 8) >> 4);
+
+	    /* Get jitter in usec */
+	    if (d < 4294)
+		jitter = d * 1000000 / sess->clock_rate;
+	    else {
+		jitter = d * 1000 / sess->clock_rate;
+		jitter *= 1000;
+	    }
+
+	    /* Add to average */
+	    sess->avg_jitter = 
+		(jitter + sess->avg_jitter * sess->stat.rx.jitter.count) /
+		(sess->stat.rx.jitter.count + 1);
+	    sess->stat.rx.jitter.avg = (unsigned)sess->avg_jitter;
+	    ++sess->stat.rx.jitter.count;
+
+	    /* Update jitter stat */
+	    if (jitter < sess->stat.rx.jitter.min)
+		sess->stat.rx.jitter.min = jitter;
+	    if (jitter > sess->stat.rx.jitter.max)
+		sess->stat.rx.jitter.max = jitter;
+
+	    sess->stat.rx.jitter.last = jitter;
+	}
+    }
+
+    /* Update timestamp of last RX RTP packet */
+    sess->rtp_last_ts = rtp_ts;
+}
+
+PJ_DEF(void) pjmedia_rtcp_tx_rtp(pjmedia_rtcp_session *sess, 
+				 unsigned bytes_payload_size)
+{
+    /* Update statistics */
+    sess->stat.tx.pkt++;
+    sess->stat.tx.bytes += bytes_payload_size;
+}
+
+
+PJ_DEF(void) pjmedia_rtcp_rx_rtcp( pjmedia_rtcp_session *sess,
+				   const void *pkt,
+				   pj_size_t size)
+{
+    const pjmedia_rtcp_common *common = pkt;
+    const pjmedia_rtcp_rr *rr = NULL;
+    const pjmedia_rtcp_sr *sr = NULL;
+    pj_uint32_t last_loss, jitter_samp, jitter;
+
+    /* Parse RTCP */
+    if (common->pt == RTCP_SR) {
+	sr = (pjmedia_rtcp_sr*) (((char*)pkt) + sizeof(pjmedia_rtcp_common));
+	if (common->count > 0 && size >= (sizeof(pjmedia_rtcp_pkt))) {
+	    rr = (pjmedia_rtcp_rr*)(((char*)pkt) + (sizeof(pjmedia_rtcp_common)
+				    + sizeof(pjmedia_rtcp_sr)));
+	}
+    } else if (common->pt == RTCP_RR && common->count > 0)
+	rr = (pjmedia_rtcp_rr*)(((char*)pkt) +sizeof(pjmedia_rtcp_common) +4);
+
+
+    if (sr) {
+	/* Save LSR from NTP timestamp of RTCP packet */
+	sess->rx_lsr = ((pj_ntohl(sr->ntp_sec) & 0x0000FFFF) << 16) | 
+		       ((pj_ntohl(sr->ntp_frac) >> 16) & 0xFFFF);
+
+	/* Calculate SR arrival time for DLSR */
+	pj_get_timestamp(&sess->rx_lsr_time);
+
+	TRACE_((sess->name, "Rx RTCP SR: ntp_ts=%p", 
+		sess->rx_lsr,
+		(pj_uint32_t)(sess->rx_lsr_time.u64*65536/sess->ts_freq.u64)));
+    }
+
+
+    /* Nothing more to do if there's no RR packet */
+    if (rr == NULL)
+	return;
+
+
+    last_loss = sess->stat.tx.loss;
+
+    /* Get packet loss */
+    sess->stat.tx.loss = (rr->total_lost_2 << 16) +
+			 (rr->total_lost_1 << 8) +
+			  rr->total_lost_0;
+
+    TRACE_((sess->name, "Rx RTCP RR: total_lost_2=%x, 1=%x, 0=%x, lost=%d", 
+	    (int)rr->total_lost_2,
+	    (int)rr->total_lost_1,
+	    (int)rr->total_lost_0,
+	    sess->stat.tx.loss));
+    
+    /* We can't calculate the exact loss period for TX, so just give the
+     * best estimation.
+     */
+    if (sess->stat.tx.loss > last_loss) {
+	unsigned period;
+
+	/* Loss period in msec */
+	period = (sess->stat.tx.loss - last_loss) * sess->pkt_size *
+		 1000 / sess->clock_rate;
+
+	/* Loss period in usec */
+	period *= 1000;
+
+	if (sess->stat.tx.update_cnt==0||sess->stat.tx.loss_period.min==0)
+	    sess->stat.tx.loss_period.min = period;
+	if (period < sess->stat.tx.loss_period.min)
+	    sess->stat.tx.loss_period.min = period;
+	if (period > sess->stat.tx.loss_period.max)
+	    sess->stat.tx.loss_period.max = period;
+
+	sess->stat.tx.loss_period.avg = 
+	    (sess->stat.tx.loss_period.avg*sess->stat.tx.update_cnt+period)
+	    / (sess->stat.tx.update_cnt + 1);
+	sess->stat.tx.loss_period.last = period;
+    }
+
+    /* Get jitter value in usec */
+    jitter_samp = pj_ntohl(rr->jitter);
+    /* Calculate jitter in usec, avoiding overflows */
+    if (jitter_samp <= 4294)
+	jitter = jitter_samp * 1000000 / sess->clock_rate;
+    else {
+	jitter = jitter_samp * 1000 / sess->clock_rate;
+	jitter *= 1000;
+    }
+
+    /* Update jitter statistics */
+    if (sess->stat.tx.jitter.count == 0)
+	sess->stat.tx.jitter.min = jitter;
+    if (jitter < sess->stat.tx.jitter.min && jitter)
+	sess->stat.tx.jitter.min = jitter;
+    if (jitter > sess->stat.tx.jitter.max)
+	sess->stat.tx.jitter.max = jitter;
+    sess->stat.tx.jitter.avg = 
+	(sess->stat.tx.jitter.avg * sess->stat.tx.jitter.count + jitter) /
+	(sess->stat.tx.jitter.count + 1);
+    ++sess->stat.tx.jitter.count;
+    sess->stat.tx.jitter.last = jitter;
+
+
+    /* Can only calculate if LSR and DLSR is present in RR */
+    if (rr->lsr && rr->dlsr) {
+	pj_uint32_t lsr, now, dlsr;
+	pj_uint64_t eedelay;
+	pjmedia_rtcp_ntp_rec ntp;
+
+	/* LSR is the middle 32bit of NTP. It has 1/65536 second 
+	 * resolution 
+	 */
+	lsr = pj_ntohl(rr->lsr);
+
+	/* DLSR is delay since LSR, also in 1/65536 resolution */
+	dlsr = pj_ntohl(rr->dlsr);
+
+	/* Get current time, and convert to 1/65536 resolution */
+	pjmedia_rtcp_get_ntp_time(sess, &ntp);
+	now = ((ntp.hi & 0xFFFF) << 16) + (ntp.lo >> 16);
+
+	/* End-to-end delay is (now-lsr-dlsr) */
+	eedelay = now - lsr - dlsr;
+
+	/* Convert end to end delay to usec (keeping the calculation in
+         * 64bit space)::
+	 *   sess->ee_delay = (eedelay * 1000) / 65536;
+	 */
+	if (eedelay < 4294) {
+	    eedelay = (eedelay * 1000000) >> 16;
+	} else {
+	    eedelay = (eedelay * 1000) >> 16;
+	    eedelay *= 1000;
+	}
+
+	TRACE_((sess->name, "Rx RTCP RR: lsr=%p, dlsr=%p (%d:%03dms), "
+			   "now=%p, rtt=%p",
+		lsr, dlsr, dlsr/65536, (dlsr%65536)*1000/65536,
+		now, (pj_uint32_t)eedelay));
+	
+	/* Only save calculation if "now" is greater than lsr, or
+	 * otherwise rtt will be invalid 
+	 */
+	if (now-dlsr >= lsr) {
+	    unsigned rtt = (pj_uint32_t)eedelay;
+	    
+	    /* Check that eedelay value really makes sense. 
+	     * We allow up to 30 seconds RTT!
+	     */
+	    if (eedelay > 30 * 1000 * 1000UL) {
+
+		TRACE_((sess->name, "RTT not making any sense, ignored.."));
+		goto end_rtt_calc;
+	    }
+
+	    if (sess->stat.rtt_update_cnt == 0)
+		sess->stat.rtt.min = rtt;
+
+	    /* "Normalize" rtt value that is exceptionally high.
+	     * For such values, "normalize" the rtt to be three times
+	     * the average value.
+	     */
+	    if (rtt > (sess->stat.rtt.avg*3) && sess->stat.rtt_update_cnt!=0) {
+		unsigned orig_rtt = rtt;
+		rtt = sess->stat.rtt.avg*3;
+		PJ_LOG(5,(sess->name, 
+			  "RTT value %d usec is normalized to %d usec",
+			  orig_rtt, rtt));
+	    }
+	
+	    TRACE_((sess->name, "RTCP RTT is set to %d usec", rtt));
+
+	    if (rtt < sess->stat.rtt.min && rtt)
+		sess->stat.rtt.min = rtt;
+	    if (rtt > sess->stat.rtt.max)
+		sess->stat.rtt.max = rtt;
+
+	    sess->stat.rtt.avg = 
+		(sess->stat.rtt.avg * sess->stat.rtt_update_cnt + rtt) / 
+		(sess->stat.rtt_update_cnt + 1);
+
+	    sess->stat.rtt.last = rtt;
+	    sess->stat.rtt_update_cnt++;
+
+	} else {
+	    PJ_LOG(5, (sess->name, "Internal RTCP NTP clock skew detected: "
+				   "lsr=%p, now=%p, dlsr=%p (%d:%03dms), "
+				   "diff=%d",
+				   lsr, now, dlsr, dlsr/65536,
+				   (dlsr%65536)*1000/65536,
+				   dlsr-(now-lsr)));
+	}
+    }
+
+end_rtt_calc:
+
+    pj_gettimeofday(&sess->stat.tx.update);
+    sess->stat.tx.update_cnt++;
+}
+
+
+PJ_DEF(void) pjmedia_rtcp_build_rtcp(pjmedia_rtcp_session *sess, 
+				     pjmedia_rtcp_pkt **ret_p_pkt, 
+				     int *len)
+{
+    pj_uint32_t expected, expected_interval, received_interval, lost_interval;
+    pjmedia_rtcp_pkt *rtcp_pkt = &sess->rtcp_pkt;
+    pj_timestamp ts_now;
+    pjmedia_rtcp_ntp_rec ntp;
+    
+    /* Packet count */
+    rtcp_pkt->sr.sender_pcount = pj_htonl(sess->stat.tx.pkt);
+
+    /* Octets count */
+    rtcp_pkt->sr.sender_bcount = pj_htonl(sess->stat.tx.bytes);
+    
+    /* SSRC and last_seq */
+    rtcp_pkt->rr.ssrc = pj_htonl(sess->peer_ssrc);
+    rtcp_pkt->rr.last_seq = (sess->seq_ctrl.cycles & 0xFFFF0000L);
+    rtcp_pkt->rr.last_seq += sess->seq_ctrl.max_seq;
+    rtcp_pkt->rr.last_seq = pj_htonl(rtcp_pkt->rr.last_seq);
+
+
+    /* Jitter */
+    rtcp_pkt->rr.jitter = pj_htonl(sess->jitter >> 4);
+    
+    
+    /* Total lost. */
+    expected = pj_ntohl(rtcp_pkt->rr.last_seq) - sess->seq_ctrl.base_seq;
+
+    /* This is bug: total lost already calculated on each incoming RTP!
+    if (expected >= sess->received)
+	sess->stat.rx.loss = expected - sess->received;
+    else
+	sess->stat.rx.loss = 0;
+    */
+
+    rtcp_pkt->rr.total_lost_2 = (sess->stat.rx.loss >> 16) & 0xFF;
+    rtcp_pkt->rr.total_lost_1 = (sess->stat.rx.loss >> 8) & 0xFF;
+    rtcp_pkt->rr.total_lost_0 = (sess->stat.rx.loss & 0xFF);
+
+    /* Fraction lost calculation */
+    expected_interval = expected - sess->exp_prior;
+    sess->exp_prior = expected;
+    
+    received_interval = sess->received - sess->rx_prior;
+    sess->rx_prior = sess->received;
+    
+    lost_interval = expected_interval - received_interval;
+    
+    if (expected_interval==0 || lost_interval == 0) {
+	rtcp_pkt->rr.fract_lost = 0;
+    } else {
+	rtcp_pkt->rr.fract_lost = (lost_interval << 8) / expected_interval;
+    }
+    
+    /* Get current NTP time. */
+    pj_get_timestamp(&ts_now);
+    pjmedia_rtcp_get_ntp_time(sess, &ntp);
+    
+    /* Fill in NTP timestamp in SR. */
+    rtcp_pkt->sr.ntp_sec = pj_htonl(ntp.hi);
+    rtcp_pkt->sr.ntp_frac = pj_htonl(ntp.lo);
+
+    TRACE_((sess->name, "TX RTCP SR: ntp_ts=%p", 
+		       ((ntp.hi & 0xFFFF) << 16) + ((ntp.lo & 0xFFFF0000) 
+			    >> 16)));
+
+    if (sess->rx_lsr_time.u64 == 0 || sess->rx_lsr == 0) {
+	rtcp_pkt->rr.lsr = 0;
+	rtcp_pkt->rr.dlsr = 0;
+    } else {
+	pj_timestamp ts;
+	pj_uint32_t lsr = sess->rx_lsr;
+	pj_uint64_t lsr_time = sess->rx_lsr_time.u64;
+	pj_uint32_t dlsr;
+	
+	/* Convert LSR time to 1/65536 seconds resolution */
+	lsr_time = (lsr_time << 16) / sess->ts_freq.u64;
+
+	/* Fill in LSR.
+	   LSR is the middle 32bit of the last SR NTP time received.
+	 */
+	rtcp_pkt->rr.lsr = pj_htonl(lsr);
+	
+	/* Fill in DLSR.
+	   DLSR is Delay since Last SR, in 1/65536 seconds.
+	 */
+	ts.u64 = ts_now.u64;
+
+	/* Convert interval to 1/65536 seconds value */
+	ts.u64 = (ts.u64 << 16) / sess->ts_freq.u64;
+
+	/* Get DLSR */
+	dlsr = (pj_uint32_t)(ts.u64 - lsr_time);
+	rtcp_pkt->rr.dlsr = pj_htonl(dlsr);
+
+	TRACE_((sess->name,"Tx RTCP RR: lsr=%p, lsr_time=%p, now=%p, dlsr=%p"
+			   "(%ds:%03dms)",
+			   lsr, 
+			   (pj_uint32_t)lsr_time,
+			   (pj_uint32_t)ts.u64, 
+			   dlsr,
+			   dlsr/65536,
+			   (dlsr%65536)*1000/65536 ));
+    }
+    
+    /* Update counter */
+    pj_gettimeofday(&sess->stat.rx.update);
+    sess->stat.rx.update_cnt++;
+
+
+    /* Return pointer. */
+    *ret_p_pkt = rtcp_pkt;
+    *len = sizeof(pjmedia_rtcp_pkt);
+}
+
+ 
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/rtp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/rtp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/rtp.c	(revision 1163)
@@ -0,0 +1,313 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/rtp.h>
+#include <pjmedia/errno.h>
+#include <pj/log.h>
+#include <pj/sock.h>	/* pj_htonx, pj_htonx */
+#include <pj/assert.h>
+#include <pj/rand.h>
+#include <pj/string.h>
+
+
+#define THIS_FILE   "rtp.c"
+
+#define RTP_VERSION	2
+
+#define RTP_SEQ_MOD	(1 << 16)
+#define MAX_DROPOUT 	((pj_int16_t)3000)
+#define MAX_MISORDER 	((pj_int16_t)100)
+#define MIN_SEQUENTIAL  ((pj_int16_t)2)
+
+static void pjmedia_rtp_seq_restart(pjmedia_rtp_seq_session *seq_ctrl, 
+				    pj_uint16_t seq);
+
+
+PJ_DEF(pj_status_t) pjmedia_rtp_session_init( pjmedia_rtp_session *ses,
+					      int default_pt, 
+					      pj_uint32_t sender_ssrc )
+{
+    PJ_LOG(5, (THIS_FILE, 
+	       "pjmedia_rtp_session_init: ses=%p, default_pt=%d, ssrc=0x%x",
+	       ses, default_pt, sender_ssrc));
+
+    /* Check RTP header packing. */
+    if (sizeof(struct pjmedia_rtp_hdr) != 12) {
+	pj_assert(!"Wrong RTP header packing!");
+	return PJMEDIA_RTP_EINPACK;
+    }
+
+    /* If sender_ssrc is not specified, create from random value. */
+    if (sender_ssrc == 0 || sender_ssrc == (pj_uint32_t)-1) {
+	sender_ssrc = pj_htonl(pj_rand());
+    } else {
+	sender_ssrc = pj_htonl(sender_ssrc);
+    }
+
+    /* Initialize session. */
+    pj_bzero(ses, sizeof(*ses));
+
+    /* Initial sequence number SHOULD be random, according to RFC 3550. */
+    ses->out_extseq = pj_rand();
+    ses->peer_ssrc = 0;
+    
+    /* Build default header for outgoing RTP packet. */
+    ses->out_hdr.v = RTP_VERSION;
+    ses->out_hdr.p = 0;
+    ses->out_hdr.x = 0;
+    ses->out_hdr.cc = 0;
+    ses->out_hdr.m = 0;
+    ses->out_hdr.pt = (pj_uint8_t) default_pt;
+    ses->out_hdr.seq = (pj_uint16_t) pj_htons( (pj_uint16_t)ses->out_extseq );
+    ses->out_hdr.ts = 0;
+    ses->out_hdr.ssrc = sender_ssrc;
+
+    /* Keep some arguments as session defaults. */
+    ses->out_pt = (pj_uint16_t) default_pt;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_rtp_encode_rtp( pjmedia_rtp_session *ses, 
+					    int pt, int m,
+					    int payload_len, int ts_len,
+					    const void **rtphdr, int *hdrlen )
+{
+    PJ_UNUSED_ARG(payload_len);
+
+    /* Update timestamp */
+    ses->out_hdr.ts = pj_htonl(pj_ntohl(ses->out_hdr.ts)+ts_len);
+
+    /* If payload_len is zero, bail out.
+     * This is a clock frame; we're not really transmitting anything.
+     */
+    if (payload_len == 0)
+	return PJ_SUCCESS;
+
+    /* Update session. */
+    ses->out_extseq++;
+
+    /* Create outgoing header. */
+    ses->out_hdr.pt = (pj_uint8_t) ((pt == -1) ? ses->out_pt : pt);
+    ses->out_hdr.m = (pj_uint16_t) m;
+    ses->out_hdr.seq = pj_htons( (pj_uint16_t) ses->out_extseq);
+
+    /* Return values */
+    *rtphdr = &ses->out_hdr;
+    *hdrlen = sizeof(pjmedia_rtp_hdr);
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_rtp_decode_rtp( pjmedia_rtp_session *ses, 
+					    const void *pkt, int pkt_len,
+					    const pjmedia_rtp_hdr **hdr,
+					    const void **payload,
+					    unsigned *payloadlen)
+{
+    int offset;
+
+    PJ_UNUSED_ARG(ses);
+
+    /* Assume RTP header at the start of packet. We'll verify this later. */
+    *hdr = (pjmedia_rtp_hdr*)pkt;
+
+    /* Check RTP header sanity. */
+    if ((*hdr)->v != RTP_VERSION) {
+	return PJMEDIA_RTP_EINVER;
+    }
+
+    /* Payload is located right after header plus CSRC */
+    offset = sizeof(pjmedia_rtp_hdr) + ((*hdr)->cc * sizeof(pj_uint32_t));
+
+    /* Adjust offset if RTP extension is used. */
+    if ((*hdr)->x) {
+	pjmedia_rtp_ext_hdr *ext = (pjmedia_rtp_ext_hdr*) 
+				    (((pj_uint8_t*)pkt) + offset);
+	offset += (pj_ntohs(ext->length) * sizeof(pj_uint32_t));
+    }
+
+    /* Check that offset is less than packet size */
+    if (offset >= pkt_len)
+	return PJMEDIA_RTP_EINLEN;
+
+    /* Find and set payload. */
+    *payload = ((pj_uint8_t*)pkt) + offset;
+    *payloadlen = pkt_len - offset;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(void) pjmedia_rtp_session_update( pjmedia_rtp_session *ses, 
+					 const pjmedia_rtp_hdr *hdr,
+					 pjmedia_rtp_status *p_seq_st)
+{
+    pjmedia_rtp_status seq_st;
+
+    /* Init status */
+    seq_st.status.value = 0;
+    seq_st.diff = 0;
+
+    /* Check SSRC. */
+    if (ses->peer_ssrc == 0) ses->peer_ssrc = pj_ntohl(hdr->ssrc);
+
+    if (pj_ntohl(hdr->ssrc) != ses->peer_ssrc) {
+	seq_st.status.flag.badssrc = 1;
+	ses->peer_ssrc = pj_ntohl(hdr->ssrc);
+    }
+
+    /* Check payload type. */
+    if (hdr->pt != ses->out_pt) {
+	if (p_seq_st) {
+	    p_seq_st->status.value = seq_st.status.value;
+	    p_seq_st->status.flag.bad = 1;
+	    p_seq_st->status.flag.badpt = 1;
+	}
+	return;
+    }
+
+    /* Initialize sequence number on first packet received. */
+    if (ses->received == 0)
+	pjmedia_rtp_seq_init( &ses->seq_ctrl, pj_ntohs(hdr->seq) );
+
+    /* Check sequence number to see if remote session has been restarted. */
+    pjmedia_rtp_seq_update( &ses->seq_ctrl, pj_ntohs(hdr->seq), &seq_st);
+    if (seq_st.status.flag.restart) {
+	++ses->received;
+
+    } else if (!seq_st.status.flag.bad) {
+	++ses->received;
+    }
+
+    if (p_seq_st) {
+	p_seq_st->status.value = seq_st.status.value;
+	p_seq_st->diff = seq_st.diff;
+    }
+}
+
+
+void pjmedia_rtp_seq_restart(pjmedia_rtp_seq_session *sess, pj_uint16_t seq)
+{
+    sess->base_seq = seq;
+    sess->max_seq = seq;
+    sess->bad_seq = RTP_SEQ_MOD + 1;
+    sess->cycles = 0;
+}
+
+
+void pjmedia_rtp_seq_init(pjmedia_rtp_seq_session *sess, pj_uint16_t seq)
+{
+    pjmedia_rtp_seq_restart(sess, seq);
+
+    sess->max_seq = (pj_uint16_t) (seq - 1);
+    sess->probation = MIN_SEQUENTIAL;
+}
+
+
+void pjmedia_rtp_seq_update( pjmedia_rtp_seq_session *sess, 
+			     pj_uint16_t seq,
+			     pjmedia_rtp_status *seq_status)
+{
+    pj_uint16_t udelta = (pj_uint16_t) (seq - sess->max_seq);
+    pjmedia_rtp_status st;
+    
+    /* Init status */
+    st.status.value = 0;
+    st.diff = 0;
+
+    /*
+     * Source is not valid until MIN_SEQUENTIAL packets with
+     * sequential sequence numbers have been received.
+     */
+    if (sess->probation) {
+
+	st.status.flag.probation = 1;
+	
+        if (seq == sess->max_seq+ 1) {
+	    /* packet is in sequence */
+	    st.diff = 1;
+	    sess->probation--;
+            sess->max_seq = seq;
+            if (sess->probation == 0) {
+		st.status.flag.probation = 0;
+            }
+	} else {
+
+	    st.diff = 0;
+
+	    st.status.flag.bad = 1;
+	    if (seq == sess->max_seq)
+		st.status.flag.dup = 1;
+	    else
+		st.status.flag.outorder = 1;
+
+	    sess->probation = MIN_SEQUENTIAL - 1;
+	    sess->max_seq = seq;
+        }
+
+
+    } else if (udelta == 0) {
+
+	st.status.flag.dup = 1;
+
+    } else if (udelta < MAX_DROPOUT) {
+	/* in order, with permissible gap */
+	if (seq < sess->max_seq) {
+	    /* Sequence number wrapped - count another 64K cycle. */
+	    sess->cycles += RTP_SEQ_MOD;
+        }
+        sess->max_seq = seq;
+
+	st.diff = udelta;
+
+    } else if (udelta <= (RTP_SEQ_MOD - MAX_MISORDER)) {
+	/* the sequence number made a very large jump */
+        if (seq == sess->bad_seq) {
+	    /*
+	     * Two sequential packets -- assume that the other side
+	     * restarted without telling us so just re-sync
+	     * (i.e., pretend this was the first packet).
+	     */
+	    pjmedia_rtp_seq_restart(sess, seq);
+	    st.status.flag.restart = 1;
+	    st.status.flag.probation = 1;
+	    st.diff = 1;
+	}
+        else {
+	    sess->bad_seq = (seq + 1) & (RTP_SEQ_MOD-1);
+            st.status.flag.bad = 1;
+	    st.status.flag.outorder = 1;
+        }
+    } else {
+	/* old duplicate or reordered packet.
+	 * Not necessarily bad packet (?)
+	 */
+	st.status.flag.outorder = 1;
+    }
+    
+
+    if (seq_status) {
+	seq_status->diff = st.diff;
+	seq_status->status.value = st.status.value;
+    }
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sdp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sdp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sdp.c	(revision 1163)
@@ -0,0 +1,1282 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/sdp.h>
+#include <pjmedia/errno.h>
+#include <pjlib-util/scanner.h>
+#include <pj/array.h>
+#include <pj/except.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/string.h>
+#include <pj/pool.h>
+#include <pj/assert.h>
+#include <pj/ctype.h>
+
+
+enum {
+    SKIP_WS = 0,
+    SYNTAX_ERROR = 1,
+};
+#define TOKEN		"-.!%*_=`'~"
+//#define TOKEN		"'`-./:?\"#$&*;=@[]^_`{|}+~!"
+#define NTP_OFFSET	((pj_uint32_t)2208988800)
+#define THIS_FILE	"sdp.c"
+
+typedef struct parse_context
+{ 
+    pj_status_t last_error;
+} parse_context;
+
+
+/*
+ * Prototypes for line parser.
+ */
+static void parse_version(pj_scanner *scanner, parse_context *ctx);
+static void parse_origin(pj_scanner *scanner, pjmedia_sdp_session *ses,
+			 parse_context *ctx);
+static void parse_time(pj_scanner *scanner, pjmedia_sdp_session *ses,
+		       parse_context *ctx);
+static void parse_generic_line(pj_scanner *scanner, pj_str_t *str,
+			       parse_context *ctx);
+static void parse_connection_info(pj_scanner *scanner, pjmedia_sdp_conn *conn,
+				  parse_context *ctx);
+static pjmedia_sdp_attr *parse_attr(pj_pool_t *pool, pj_scanner *scanner,
+				    parse_context *ctx);
+static void parse_media(pj_scanner *scanner, pjmedia_sdp_media *med,
+			parse_context *ctx);
+static void on_scanner_error(pj_scanner *scanner);
+
+/*
+ * Scanner character specification.
+ */
+static int is_initialized;
+static pj_cis_buf_t cis_buf;
+static pj_cis_t cs_digit, cs_token;
+
+static void init_sdp_parser(void)
+{
+    if (is_initialized != 0)
+	return;
+
+    pj_enter_critical_section();
+
+    if (is_initialized != 0) {
+	pj_leave_critical_section();
+	return;
+    }
+    
+    pj_cis_buf_init(&cis_buf);
+
+    pj_cis_init(&cis_buf, &cs_token);
+    pj_cis_add_alpha(&cs_token);
+    pj_cis_add_num(&cs_token);
+    pj_cis_add_str(&cs_token, TOKEN);
+
+    pj_cis_init(&cis_buf, &cs_digit);
+    pj_cis_add_num(&cs_digit);
+
+    is_initialized = 1;
+    pj_leave_critical_section();
+}
+
+PJ_DEF(pjmedia_sdp_attr*) pjmedia_sdp_attr_create( pj_pool_t *pool,
+						   const char *name,
+						   const pj_str_t *value)
+{
+    pjmedia_sdp_attr *attr;
+
+    PJ_ASSERT_RETURN(pool && name, NULL);
+
+    attr = pj_pool_alloc(pool, sizeof(pjmedia_sdp_attr));
+    pj_strdup2(pool, &attr->name, name);
+
+    if (value)
+	pj_strdup_with_null(pool, &attr->value, value);
+    else {
+	attr->value.ptr = NULL;
+	attr->value.slen = 0;
+    }
+
+    return attr;
+}
+
+PJ_DEF(pjmedia_sdp_attr*) pjmedia_sdp_attr_clone(pj_pool_t *pool, 
+						 const pjmedia_sdp_attr *rhs)
+{
+    pjmedia_sdp_attr *attr;
+    
+    PJ_ASSERT_RETURN(pool && rhs, NULL);
+
+    attr = pj_pool_alloc(pool, sizeof(pjmedia_sdp_attr));
+
+    pj_strdup(pool, &attr->name, &rhs->name);
+    pj_strdup_with_null(pool, &attr->value, &rhs->value);
+
+    return attr;
+}
+
+PJ_DEF(pjmedia_sdp_attr*) 
+pjmedia_sdp_attr_find (unsigned count, 
+		       pjmedia_sdp_attr *const attr_array[],
+		       const pj_str_t *name,
+		       const pj_str_t *c_fmt)
+{
+    unsigned i;
+
+    for (i=0; i<count; ++i) {
+	if (pj_strcmp(&attr_array[i]->name, name) == 0) {
+	    const pjmedia_sdp_attr *a = attr_array[i];
+	    if (c_fmt) {
+		if (a->value.slen > c_fmt->slen &&
+		    pj_strncmp(&a->value, c_fmt, c_fmt->slen)==0)
+		{
+		    return (pjmedia_sdp_attr*)a;
+		}
+	    } else 
+		return (pjmedia_sdp_attr*)a;
+	}
+    }
+    return NULL;
+}
+
+PJ_DEF(pjmedia_sdp_attr*) 
+pjmedia_sdp_attr_find2(unsigned count, 
+		       pjmedia_sdp_attr *const attr_array[],
+		       const char *c_name,
+		       const pj_str_t *c_fmt)
+{
+    pj_str_t name;
+
+    name.ptr = (char*)c_name;
+    name.slen = pj_ansi_strlen(c_name);
+
+    return pjmedia_sdp_attr_find(count, attr_array, &name, c_fmt);
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_sdp_attr_add(unsigned *count,
+					 pjmedia_sdp_attr *attr_array[],
+					 pjmedia_sdp_attr *attr)
+{
+    PJ_ASSERT_RETURN(count && attr_array && attr, PJ_EINVAL);
+    PJ_ASSERT_RETURN(*count < PJMEDIA_MAX_SDP_ATTR, PJ_ETOOMANY);
+
+    attr_array[*count] = attr;
+    (*count)++;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(unsigned) pjmedia_sdp_attr_remove_all(unsigned *count,
+					     pjmedia_sdp_attr *attr_array[],
+					     const char *name)
+{
+    unsigned i, removed = 0;
+    pj_str_t attr_name;
+
+    PJ_ASSERT_RETURN(count && attr_array && name, PJ_EINVAL);
+
+    attr_name.ptr = (char*)name;
+    attr_name.slen = pj_ansi_strlen(name);
+
+    for (i=0; i<*count; ) {
+	if (pj_strcmp(&attr_array[i]->name, &attr_name)==0) {
+	    pj_array_erase(attr_array, sizeof(pjmedia_sdp_attr*),
+			   *count, i);
+	    --(*count);
+	    ++removed;
+	} else {
+	    ++i;
+	}   
+    }
+
+    return removed;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_sdp_attr_remove( unsigned *count,
+					     pjmedia_sdp_attr *attr_array[],
+					     pjmedia_sdp_attr *attr )
+{
+    unsigned i, removed=0;
+
+    PJ_ASSERT_RETURN(count && attr_array && attr, PJ_EINVAL);
+
+    for (i=0; i<*count; ) {
+	if (attr_array[i] == attr) {
+	    pj_array_erase(attr_array, sizeof(pjmedia_sdp_attr*),
+			   *count, i);
+	    --(*count);
+	    ++removed;
+	} else {
+	    ++i;
+	}
+    }
+
+    return removed ? PJ_SUCCESS : PJ_ENOTFOUND;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_sdp_attr_get_rtpmap( const pjmedia_sdp_attr *attr,
+						 pjmedia_sdp_rtpmap *rtpmap)
+{
+    pj_scanner scanner;
+    pj_str_t token;
+    pj_status_t status = -1;
+    char term = 0;
+    PJ_USE_EXCEPTION;
+
+    PJ_ASSERT_RETURN(pj_strcmp2(&attr->name, "rtpmap")==0, PJ_EINVALIDOP);
+
+    PJ_ASSERT_RETURN(attr->value.slen != 0, PJMEDIA_SDP_EINATTR);
+
+    /* Check if input is null terminated, and null terminate if
+     * necessary. Unfortunately this may crash the application if
+     * attribute was allocated from a read-only memory location.
+     * But this shouldn't happen as attribute's value normally is
+     * null terminated.
+     */
+    if (attr->value.ptr[attr->value.slen] != 0 &&
+	attr->value.ptr[attr->value.slen] != '\r')
+    {
+	pj_assert(!"Shouldn't happen");
+	term = attr->value.ptr[attr->value.slen];
+	attr->value.ptr[attr->value.slen] = '\0';
+    }
+
+    pj_scan_init(&scanner, (char*)attr->value.ptr, attr->value.slen,
+		 PJ_SCAN_AUTOSKIP_WS, &on_scanner_error);
+
+    /* rtpmap sample:
+     *	a=rtpmap:98 L16/16000/2.
+     */
+
+    /* Init */
+    rtpmap->pt.slen = rtpmap->param.slen = rtpmap->enc_name.slen = 0;
+    rtpmap->clock_rate = 0;
+
+    /* Parse */
+    PJ_TRY {
+
+	/* Get payload type. */
+	pj_scan_get(&scanner, &cs_token, &rtpmap->pt);
+
+
+	/* Get encoding name. */
+	pj_scan_get(&scanner, &cs_token, &rtpmap->enc_name);
+
+	/* Expecting '/' after encoding name. */
+	if (pj_scan_get_char(&scanner) != '/') {
+	    status = PJMEDIA_SDP_EINRTPMAP;
+	    goto on_return;
+	}
+
+
+	/* Get the clock rate. */
+	pj_scan_get(&scanner, &cs_digit, &token);
+	rtpmap->clock_rate = pj_strtoul(&token);
+
+	/* Expecting either '/' or EOF */
+	if (*scanner.curptr == '/') {
+	    pj_scan_get_char(&scanner);
+	    rtpmap->param.ptr = scanner.curptr;
+	    rtpmap->param.slen = scanner.end - scanner.curptr;
+	} else {
+	    rtpmap->param.slen = 0;
+	}
+
+	status = PJ_SUCCESS;
+    }
+    PJ_CATCH(SYNTAX_ERROR) {
+	status = PJMEDIA_SDP_EINRTPMAP;
+    }
+    PJ_END;
+
+
+on_return:
+    pj_scan_fini(&scanner);
+    if (term) {
+	attr->value.ptr[attr->value.slen] = term;
+    }
+    return status;
+}
+
+PJ_DEF(pj_status_t) pjmedia_sdp_attr_get_fmtp( const pjmedia_sdp_attr *attr,
+					       pjmedia_sdp_fmtp *fmtp)
+{
+    const char *p = attr->value.ptr;
+    const char *end = attr->value.ptr + attr->value.slen;
+    pj_str_t token;
+
+    PJ_ASSERT_RETURN(pj_strcmp2(&attr->name, "fmtp")==0, PJ_EINVALIDOP);
+
+    /* fmtp BNF:
+     *	a=fmtp:<format> <format specific parameter>
+     */
+
+    /* Get format. */
+    token.ptr = (char*)p;
+    while (pj_isdigit(*p) && p!=end)
+	++p;
+    token.slen = p - token.ptr;
+    if (token.slen == 0)
+	return PJMEDIA_SDP_EINFMTP;
+
+    fmtp->fmt = token;
+
+    /* Expecting space after format. */
+    if (*p != ' ') return PJMEDIA_SDP_EINFMTP;
+
+    /* Get space. */
+    ++p;
+
+    /* Set the remaining string as fmtp format parameter. */
+    fmtp->fmt_param.ptr = (char*)p;
+    fmtp->fmt_param.slen = end - p;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_sdp_attr_get_rtcp(const pjmedia_sdp_attr *attr,
+					      pjmedia_sdp_rtcp_attr *rtcp)
+{
+    pj_scanner scanner;
+    pj_str_t token;
+    pj_status_t status = -1;
+    PJ_USE_EXCEPTION;
+
+    PJ_ASSERT_RETURN(pj_strcmp2(&attr->name, "rtcp")==0, PJ_EINVALIDOP);
+
+    /* fmtp BNF:
+     *	a=rtcp:<port> [nettype addrtype address]
+     */
+
+    pj_scan_init(&scanner, (char*)attr->value.ptr, attr->value.slen,
+		 PJ_SCAN_AUTOSKIP_WS, &on_scanner_error);
+
+    /* Init */
+    rtcp->net_type.slen = rtcp->addr_type.slen = rtcp->addr.slen = 0;
+
+    /* Parse */
+    PJ_TRY {
+
+	/* Get the port */
+	pj_scan_get(&scanner, &cs_token, &token);
+	rtcp->port = pj_strtoul(&token);
+
+	/* Have address? */
+	if (!pj_scan_is_eof(&scanner)) {
+
+	    /* Get network type */
+	    pj_scan_get(&scanner, &cs_token, &rtcp->net_type);
+
+	    /* Get address type */
+	    pj_scan_get(&scanner, &cs_token, &rtcp->addr_type);
+
+	    /* Get the address */
+	    pj_scan_get(&scanner, &cs_token, &rtcp->addr);
+
+	}
+
+	status = PJ_SUCCESS;
+
+    }
+    PJ_CATCH(SYNTAX_ERROR) {
+	status = PJMEDIA_SDP_EINRTCP;
+    }
+    PJ_END;
+
+    pj_scan_fini(&scanner);
+    return status;
+}
+
+
+
+PJ_DEF(pj_status_t) pjmedia_sdp_attr_to_rtpmap(pj_pool_t *pool,
+					       const pjmedia_sdp_attr *attr,
+					       pjmedia_sdp_rtpmap **p_rtpmap)
+{
+    PJ_ASSERT_RETURN(pool && attr && p_rtpmap, PJ_EINVAL);
+
+    *p_rtpmap = pj_pool_alloc(pool, sizeof(pjmedia_sdp_rtpmap));
+    PJ_ASSERT_RETURN(*p_rtpmap, PJ_ENOMEM);
+
+    return pjmedia_sdp_attr_get_rtpmap(attr, *p_rtpmap);
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_sdp_rtpmap_to_attr(pj_pool_t *pool,
+					       const pjmedia_sdp_rtpmap *rtpmap,
+					       pjmedia_sdp_attr **p_attr)
+{
+    pjmedia_sdp_attr *attr;
+    char tempbuf[128];
+    int len;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(pool && rtpmap && p_attr, PJ_EINVAL);
+
+    /* Check that mandatory attributes are specified. */
+    PJ_ASSERT_RETURN(rtpmap->enc_name.slen && rtpmap->clock_rate,
+		     PJMEDIA_SDP_EINRTPMAP);
+
+
+    attr = pj_pool_alloc(pool, sizeof(pjmedia_sdp_attr));
+    PJ_ASSERT_RETURN(attr != NULL, PJ_ENOMEM);
+
+    attr->name.ptr = "rtpmap";
+    attr->name.slen = 6;
+
+    /* Format: ":pt enc_name/clock_rate[/param]" */
+    len = pj_ansi_snprintf(tempbuf, sizeof(tempbuf), 
+			   "%.*s %.*s/%u%s%.*s",
+			   (int)rtpmap->pt.slen,
+			   rtpmap->pt.ptr,
+			   (int)rtpmap->enc_name.slen,
+			   rtpmap->enc_name.ptr,
+			   rtpmap->clock_rate,
+			   (rtpmap->param.slen ? "/" : ""),
+			   (int)rtpmap->param.slen,
+			   rtpmap->param.ptr);
+
+    if (len < 1 || len > sizeof(tempbuf))
+	return PJMEDIA_SDP_ERTPMAPTOOLONG;
+
+    attr->value.slen = len;
+    attr->value.ptr = pj_pool_alloc(pool, attr->value.slen);
+    pj_memcpy(attr->value.ptr, tempbuf, attr->value.slen);
+
+    *p_attr = attr;
+    return PJ_SUCCESS;
+}
+
+
+static int print_connection_info( pjmedia_sdp_conn *c, char *buf, int len)
+{
+    int printed;
+
+    printed = pj_ansi_snprintf(buf, len, "c=%.*s %.*s %.*s\r\n",
+			       (int)c->net_type.slen,
+			       c->net_type.ptr,
+			       (int)c->addr_type.slen,
+			       c->addr_type.ptr,
+			       (int)c->addr.slen,
+			       c->addr.ptr);
+    if (printed < 1 || printed > len)
+	return -1;
+
+    return printed;
+}
+
+
+PJ_DEF(pjmedia_sdp_conn*) pjmedia_sdp_conn_clone (pj_pool_t *pool, 
+						  const pjmedia_sdp_conn *rhs)
+{
+    pjmedia_sdp_conn *c = pj_pool_alloc (pool, sizeof(pjmedia_sdp_conn));
+    if (!c) return NULL;
+
+    if (!pj_strdup (pool, &c->net_type, &rhs->net_type)) return NULL;
+    if (!pj_strdup (pool, &c->addr_type, &rhs->addr_type)) return NULL;
+    if (!pj_strdup (pool, &c->addr, &rhs->addr)) return NULL;
+
+    return c;
+}
+
+static pj_ssize_t print_attr(const pjmedia_sdp_attr *attr, 
+			     char *buf, pj_size_t len)
+{
+    char *p = buf;
+
+    if ((int)len < attr->name.slen + attr->value.slen + 10)
+	return -1;
+
+    *p++ = 'a';
+    *p++ = '=';
+    pj_memcpy(p, attr->name.ptr, attr->name.slen);
+    p += attr->name.slen;
+    
+
+    if (attr->value.slen) {
+	*p++ = ':';
+	pj_memcpy(p, attr->value.ptr, attr->value.slen);
+	p += attr->value.slen;
+    }
+
+    *p++ = '\r';
+    *p++ = '\n';
+    return p-buf;
+}
+
+static int print_media_desc( pjmedia_sdp_media *m, char *buf, int len)
+{
+    char *p = buf;
+    char *end = buf+len;
+    unsigned i;
+    int printed;
+
+    /* check length for the "m=" line. */
+    if (len < m->desc.media.slen+m->desc.transport.slen+12+24) {
+	return -1;
+    }
+    *p++ = 'm';	    /* m= */
+    *p++ = '=';
+    pj_memcpy(p, m->desc.media.ptr, m->desc.media.slen);
+    p += m->desc.media.slen;
+    *p++ = ' ';
+    printed = pj_utoa(m->desc.port, p);
+    p += printed;
+    if (m->desc.port_count > 1) {
+	*p++ = '/';
+	printed = pj_utoa(m->desc.port_count, p);
+	p += printed;
+    }
+    *p++ = ' ';
+    pj_memcpy(p, m->desc.transport.ptr, m->desc.transport.slen);
+    p += m->desc.transport.slen;
+    for (i=0; i<m->desc.fmt_count; ++i) {
+	*p++ = ' ';
+	pj_memcpy(p, m->desc.fmt[i].ptr, m->desc.fmt[i].slen);
+	p += m->desc.fmt[i].slen;
+    }
+    *p++ = '\r';
+    *p++ = '\n';
+
+    /* print connection info, if present. */
+    if (m->conn) {
+	printed = print_connection_info(m->conn, p, end-p);
+	if (printed < 0) {
+	    return -1;
+	}
+	p += printed;
+    }
+
+    /* print attributes. */
+    for (i=0; i<m->attr_count; ++i) {
+	printed = print_attr(m->attr[i], p, end-p);
+	if (printed < 0) {
+	    return -1;
+	}
+	p += printed;
+    }
+
+    return p-buf;
+}
+
+PJ_DEF(pjmedia_sdp_media*) pjmedia_sdp_media_clone(
+						 pj_pool_t *pool, 
+						 const pjmedia_sdp_media *rhs)
+{
+    unsigned int i;
+    pjmedia_sdp_media *m = pj_pool_alloc (pool, sizeof(pjmedia_sdp_media));
+    PJ_ASSERT_RETURN(m != NULL, NULL);
+
+    pj_strdup (pool, &m->desc.media, &rhs->desc.media);
+    m->desc.port = rhs->desc.port;
+    m->desc.port_count = rhs->desc.port_count;
+    pj_strdup (pool, &m->desc.transport, &rhs->desc.transport);
+    m->desc.fmt_count = rhs->desc.fmt_count;
+    for (i=0; i<rhs->desc.fmt_count; ++i)
+	pj_strdup(pool, &m->desc.fmt[i], &rhs->desc.fmt[i]);
+
+    if (rhs->conn) {
+	m->conn = pjmedia_sdp_conn_clone (pool, rhs->conn);
+	PJ_ASSERT_RETURN(m->conn != NULL, NULL);
+    } else {
+	m->conn = NULL;
+    }
+
+    m->attr_count = rhs->attr_count;
+    for (i=0; i < rhs->attr_count; ++i) {
+	m->attr[i] = pjmedia_sdp_attr_clone (pool, rhs->attr[i]);
+	PJ_ASSERT_RETURN(m->attr[i] != NULL, NULL);
+    }
+
+    return m;
+}
+
+PJ_DEF(pjmedia_sdp_attr*) 
+pjmedia_sdp_media_find_attr(const pjmedia_sdp_media *m,
+			    const pj_str_t *name, const pj_str_t *fmt)
+{
+    PJ_ASSERT_RETURN(m && name, NULL);
+    return pjmedia_sdp_attr_find(m->attr_count, m->attr, name, fmt);
+}
+
+
+
+PJ_DEF(pjmedia_sdp_attr*) 
+pjmedia_sdp_media_find_attr2(const pjmedia_sdp_media *m,
+			     const char *name, const pj_str_t *fmt)
+{
+    PJ_ASSERT_RETURN(m && name, NULL);
+    return pjmedia_sdp_attr_find2(m->attr_count, m->attr, name, fmt);
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_sdp_media_add_attr( pjmedia_sdp_media *m,
+						pjmedia_sdp_attr *attr)
+{
+    return pjmedia_sdp_attr_add(&m->attr_count, m->attr, attr);
+}
+
+PJ_DEF(unsigned) 
+pjmedia_sdp_media_remove_all_attr(pjmedia_sdp_media *m,
+				  const char *name)
+{
+    return pjmedia_sdp_attr_remove_all(&m->attr_count, m->attr, name);
+}
+
+PJ_DEF(pj_status_t)
+pjmedia_sdp_media_remove_attr(pjmedia_sdp_media *m,
+			      pjmedia_sdp_attr *attr)
+{
+    return pjmedia_sdp_attr_remove(&m->attr_count, m->attr, attr);
+}
+
+static int print_session(const pjmedia_sdp_session *ses, 
+			 char *buf, pj_ssize_t len)
+{
+    char *p = buf;
+    char *end = buf+len;
+    unsigned i;
+    int printed;
+
+    /* Check length for v= and o= lines. */
+    if (len < 5+ 
+	      2+ses->origin.user.slen+18+
+	      ses->origin.net_type.slen+ses->origin.addr.slen + 2)
+    {
+	return -1;
+    }
+
+    /* SDP version (v= line) */
+    pj_memcpy(p, "v=0\r\n", 5);
+    p += 5;
+
+    /* Owner (o=) line. */
+    *p++ = 'o';
+    *p++ = '=';
+    pj_memcpy(p, ses->origin.user.ptr, ses->origin.user.slen);
+    p += ses->origin.user.slen;
+    *p++ = ' ';
+    printed = pj_utoa(ses->origin.id, p);
+    p += printed;
+    *p++ = ' ';
+    printed = pj_utoa(ses->origin.version, p);
+    p += printed;
+    *p++ = ' ';
+    pj_memcpy(p, ses->origin.net_type.ptr, ses->origin.net_type.slen);
+    p += ses->origin.net_type.slen;
+    *p++ = ' ';
+    pj_memcpy(p, ses->origin.addr_type.ptr, ses->origin.addr_type.slen);
+    p += ses->origin.addr_type.slen;
+    *p++ = ' ';
+    pj_memcpy(p, ses->origin.addr.ptr, ses->origin.addr.slen);
+    p += ses->origin.addr.slen;
+    *p++ = '\r';
+    *p++ = '\n';
+
+    /* Session name (s=) line. */
+    if ((end-p)  < 8+ses->name.slen) {
+	return -1;
+    }
+    *p++ = 's';
+    *p++ = '=';
+    pj_memcpy(p, ses->name.ptr, ses->name.slen);
+    p += ses->name.slen;
+    *p++ = '\r';
+    *p++ = '\n';
+
+    /* Connection line (c=) if exist. */
+    if (ses->conn) {
+	printed = print_connection_info(ses->conn, p, end-p);
+	if (printed < 1) {
+	    return -1;
+	}
+	p += printed;
+    }
+
+
+    /* Time */
+    if ((end-p) < 24) {
+	return -1;
+    }
+    *p++ = 't';
+    *p++ = '=';
+    printed = pj_utoa(ses->time.start, p);
+    p += printed;
+    *p++ = ' ';
+    printed = pj_utoa(ses->time.stop, p);
+    p += printed;
+    *p++ = '\r';
+    *p++ = '\n';
+
+    /* Print all attribute (a=) lines. */
+    for (i=0; i<ses->attr_count; ++i) {
+	printed = print_attr(ses->attr[i], p, end-p);
+	if (printed < 0) {
+	    return -1;
+	}
+	p += printed;
+    }
+
+    /* Print media (m=) lines. */
+    for (i=0; i<ses->media_count; ++i) {
+	printed = print_media_desc(ses->media[i], p, end-p);
+	if (printed < 0) {
+	    return -1;
+	}
+	p += printed;
+    }
+
+    return p-buf;
+}
+
+/******************************************************************************
+ * PARSERS
+ */
+
+static void parse_version(pj_scanner *scanner, parse_context *ctx)
+{
+    ctx->last_error = PJMEDIA_SDP_EINVER;
+
+    /* check equal sign */
+    if (*(scanner->curptr+1) != '=') {
+	on_scanner_error(scanner);
+	return;
+    }
+
+    /* check version is 0 */
+    if (*(scanner->curptr+2) != '0') {
+	on_scanner_error(scanner);
+	return;
+    }
+
+    /* We've got what we're looking for, skip anything until newline */
+    pj_scan_skip_line(scanner);
+}
+
+static void parse_origin(pj_scanner *scanner, pjmedia_sdp_session *ses,
+			 parse_context *ctx)
+{
+    pj_str_t str;
+
+    ctx->last_error = PJMEDIA_SDP_EINORIGIN;
+
+    /* check equal sign */
+    if (*(scanner->curptr+1) != '=') {
+	on_scanner_error(scanner);
+	return;
+    }
+
+    /* o= */
+    pj_scan_advance_n(scanner, 2, SKIP_WS);
+
+    /* username. */
+    pj_scan_get_until_ch(scanner, ' ', &ses->origin.user);
+    pj_scan_get_char(scanner);
+
+    /* id */
+    pj_scan_get_until_ch(scanner, ' ', &str);
+    ses->origin.id = pj_strtoul(&str);
+    pj_scan_get_char(scanner);
+
+    /* version */
+    pj_scan_get_until_ch(scanner, ' ', &str);
+    ses->origin.version = pj_strtoul(&str);
+    pj_scan_get_char(scanner);
+
+    /* network-type */
+    pj_scan_get_until_ch(scanner, ' ', &ses->origin.net_type);
+    pj_scan_get_char(scanner);
+
+    /* addr-type */
+    pj_scan_get_until_ch(scanner, ' ', &ses->origin.addr_type);
+    pj_scan_get_char(scanner);
+
+    /* address */
+    pj_scan_get_until_chr(scanner, " \t\r", &ses->origin.addr);
+
+    /* We've got what we're looking for, skip anything until newline */
+    pj_scan_skip_line(scanner);
+
+}
+
+static void parse_time(pj_scanner *scanner, pjmedia_sdp_session *ses,
+		       parse_context *ctx)
+{
+    pj_str_t str;
+
+    ctx->last_error = PJMEDIA_SDP_EINTIME;
+
+    /* check equal sign */
+    if (*(scanner->curptr+1) != '=') {
+	on_scanner_error(scanner);
+	return;
+    }
+
+    /* t= */
+    pj_scan_advance_n(scanner, 2, SKIP_WS);
+
+    /* start time */
+    pj_scan_get_until_ch(scanner, ' ', &str);
+    ses->time.start = pj_strtoul(&str);
+
+    pj_scan_get_char(scanner);
+
+    /* stop time */
+    pj_scan_get_until_chr(scanner, " \t\r", &str);
+    ses->time.stop = pj_strtoul(&str);
+
+    /* We've got what we're looking for, skip anything until newline */
+    pj_scan_skip_line(scanner);
+}
+
+static void parse_generic_line(pj_scanner *scanner, pj_str_t *str,
+			       parse_context *ctx)
+{
+    ctx->last_error = PJMEDIA_SDP_EINSDP;
+
+    /* check equal sign */
+    if (*(scanner->curptr+1) != '=') {
+	on_scanner_error(scanner);
+	return;
+    }
+
+    /* x= */
+    pj_scan_advance_n(scanner, 2, SKIP_WS);
+
+    /* get anything until newline (including whitespaces). */
+    pj_scan_get_until_ch(scanner, '\r', str);
+
+    /* newline. */
+    pj_scan_get_newline(scanner);
+}
+
+static void parse_connection_info(pj_scanner *scanner, pjmedia_sdp_conn *conn,
+				  parse_context *ctx)
+{
+    ctx->last_error = PJMEDIA_SDP_EINCONN;
+
+    /* c= */
+    pj_scan_advance_n(scanner, 2, SKIP_WS);
+
+    /* network-type */
+    pj_scan_get_until_ch(scanner, ' ', &conn->net_type);
+    pj_scan_get_char(scanner);
+
+    /* addr-type */
+    pj_scan_get_until_ch(scanner, ' ', &conn->addr_type);
+    pj_scan_get_char(scanner);
+
+    /* address. */
+    pj_scan_get_until_chr(scanner, " \t\r", &conn->addr);
+
+    /* We've got what we're looking for, skip anything until newline */
+    pj_scan_skip_line(scanner);
+}
+
+static void parse_media(pj_scanner *scanner, pjmedia_sdp_media *med,
+			parse_context *ctx)
+{
+    pj_str_t str;
+
+    ctx->last_error = PJMEDIA_SDP_EINMEDIA;
+
+    /* check the equal sign */
+    if (*(scanner->curptr+1) != '=') {
+	on_scanner_error(scanner);
+	return;
+    }
+
+    /* m= */
+    pj_scan_advance_n(scanner, 2, SKIP_WS);
+
+    /* type */
+    pj_scan_get_until_ch(scanner, ' ', &med->desc.media);
+    pj_scan_get_char(scanner);
+
+    /* port */
+    pj_scan_get(scanner, &cs_token, &str);
+    med->desc.port = (unsigned short)pj_strtoul(&str);
+    if (*scanner->curptr == '/') {
+	/* port count */
+	pj_scan_get_char(scanner);
+	pj_scan_get(scanner, &cs_token, &str);
+	med->desc.port_count = pj_strtoul(&str);
+
+    } else {
+	med->desc.port_count = 0;
+    }
+
+    if (pj_scan_get_char(scanner) != ' ') {
+	PJ_THROW(SYNTAX_ERROR);
+    }
+
+    /* transport */
+    pj_scan_get_until_ch(scanner, ' ', &med->desc.transport);
+
+    /* format list */
+    med->desc.fmt_count = 0;
+    while (*scanner->curptr == ' ') {
+	pj_scan_get_char(scanner);
+
+	/* Check again for the end of the line */
+	if ((*scanner->curptr == '\r') || (*scanner->curptr == '\n'))
+		break;
+
+	pj_scan_get(scanner, &cs_token, &med->desc.fmt[med->desc.fmt_count++]);
+    }
+
+    /* We've got what we're looking for, skip anything until newline */
+    pj_scan_skip_line(scanner);
+}
+
+static void on_scanner_error(pj_scanner *scanner)
+{
+    PJ_UNUSED_ARG(scanner);
+
+    PJ_THROW(SYNTAX_ERROR);
+}
+
+static pjmedia_sdp_attr *parse_attr( pj_pool_t *pool, pj_scanner *scanner,
+				    parse_context *ctx)
+{
+    pjmedia_sdp_attr *attr;
+
+    ctx->last_error = PJMEDIA_SDP_EINATTR;
+
+    attr = pj_pool_alloc(pool, sizeof(pjmedia_sdp_attr));
+
+    /* check equal sign */
+    if (*(scanner->curptr+1) != '=') {
+	on_scanner_error(scanner);
+	return NULL;
+    }
+
+    /* skip a= */
+    pj_scan_advance_n(scanner, 2, SKIP_WS);
+    
+    /* get attr name. */
+    pj_scan_get(scanner, &cs_token, &attr->name);
+
+    if (*scanner->curptr != '\r' && *scanner->curptr != '\n') {
+	/* skip ':' if present. */
+	if (*scanner->curptr == ':')
+	    pj_scan_get_char(scanner);
+
+	/* get value */
+	if (*scanner->curptr != '\r') {
+	    pj_scan_get_until_ch(scanner, '\r', &attr->value);
+	} else {
+	    attr->value.ptr = NULL;
+	    attr->value.slen = 0;
+	}
+
+    } else {
+	attr->value.ptr = NULL;
+	attr->value.slen = 0;
+    }
+
+    /* We've got what we're looking for, skip anything until newline */
+    pj_scan_skip_line(scanner);
+
+    return attr;
+}
+
+/*
+ * Parse SDP message.
+ */
+PJ_DEF(pj_status_t) pjmedia_sdp_parse( pj_pool_t *pool,
+				       char *buf, pj_size_t len, 
+				       pjmedia_sdp_session **p_sdp)
+{
+    pj_scanner scanner;
+    pjmedia_sdp_session *session;
+    pjmedia_sdp_media *media = NULL;
+    void *attr;
+    pjmedia_sdp_conn *conn;
+    pj_str_t dummy;
+    int cur_name = 254;
+    parse_context ctx;
+    PJ_USE_EXCEPTION;
+
+    ctx.last_error = PJ_SUCCESS;
+
+    init_sdp_parser();
+
+    pj_scan_init(&scanner, buf, len, 0, &on_scanner_error);
+    session = pj_pool_calloc(pool, 1, sizeof(pjmedia_sdp_session));
+    PJ_ASSERT_RETURN(session != NULL, PJ_ENOMEM);
+
+    PJ_TRY {
+	while (!pj_scan_is_eof(&scanner)) {
+		cur_name = *scanner.curptr;
+		switch (cur_name) {
+		case 'a':
+		    attr = parse_attr(pool, &scanner, &ctx);
+		    if (attr) {
+			if (media) {
+			    media->attr[media->attr_count++] = attr;
+			} else {
+			    session->attr[session->attr_count++] = attr;
+			}
+		    }
+		    break;
+		case 'o':
+		    parse_origin(&scanner, session, &ctx);
+		    break;
+		case 's':
+		    parse_generic_line(&scanner, &session->name, &ctx);
+		    break;
+		case 'c':
+		    conn = pj_pool_calloc(pool, 1, sizeof(*conn));
+		    parse_connection_info(&scanner, conn, &ctx);
+		    if (media) {
+			media->conn = conn;
+		    } else {
+			session->conn = conn;
+		    }
+		    break;
+		case 't':
+		    parse_time(&scanner, session, &ctx);
+		    break;
+		case 'm':
+		    media = pj_pool_calloc(pool, 1, sizeof(*media));
+		    parse_media(&scanner, media, &ctx);
+		    session->media[ session->media_count++ ] = media;
+		    break;
+		case 'v':
+		    parse_version(&scanner, &ctx);
+		    break;
+		case 13:
+		    /* Allow empty newline at the end of the message */
+		    pj_scan_get_char(&scanner);
+		    /* Continue below */
+		case 10:
+		    pj_scan_get_char(&scanner);
+		    if (!pj_scan_is_eof(&scanner)) {
+			on_scanner_error(&scanner);
+		    }
+		    break;
+		default:
+		    if (cur_name >= 'a' && cur_name <= 'z')
+			parse_generic_line(&scanner, &dummy, &ctx);
+		    else  {
+			ctx.last_error = PJMEDIA_SDP_EINSDP;
+			on_scanner_error(&scanner);
+		    }
+		    break;
+		}
+	}
+
+	ctx.last_error = PJ_SUCCESS;
+
+    }
+    PJ_CATCH(SYNTAX_ERROR) {
+	
+	char errmsg[PJ_ERR_MSG_SIZE];
+	pj_strerror(ctx.last_error, errmsg, sizeof(errmsg));
+
+	PJ_LOG(4, (THIS_FILE, "Error parsing SDP in line %d col %d: %s",
+		   scanner.line, pj_scan_get_col(&scanner),
+		   errmsg));
+
+	session = NULL;
+
+	pj_assert(ctx.last_error != PJ_SUCCESS);
+    }
+    PJ_END;
+
+    pj_scan_fini(&scanner);
+
+    *p_sdp = session;
+    return ctx.last_error;
+}
+
+/*
+ * Print SDP description.
+ */
+PJ_DEF(int) pjmedia_sdp_print( const pjmedia_sdp_session *desc, 
+			       char *buf, pj_size_t size)
+{
+    return print_session(desc, buf, size);
+}
+
+
+/*
+ * Clone session
+ */
+PJ_DEF(pjmedia_sdp_session*) 
+pjmedia_sdp_session_clone( pj_pool_t *pool,
+			   const pjmedia_sdp_session *rhs)
+{
+    pjmedia_sdp_session *sess;
+    unsigned i;
+
+    PJ_ASSERT_RETURN(pool && rhs, NULL);
+
+    sess = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_session));
+    PJ_ASSERT_RETURN(sess != NULL, NULL);
+
+    /* Clone origin line. */
+    pj_strdup(pool, &sess->origin.user, &rhs->origin.user);
+    sess->origin.id = rhs->origin.id;
+    sess->origin.version = rhs->origin.version;
+    pj_strdup(pool, &sess->origin.net_type, &rhs->origin.net_type);
+    pj_strdup(pool, &sess->origin.addr_type, &rhs->origin.addr_type);
+    pj_strdup(pool, &sess->origin.addr, &rhs->origin.addr);
+
+    /* Clone subject line. */
+    pj_strdup(pool, &sess->name, &rhs->name);
+
+    /* Clone connection line */
+    if (rhs->conn) {
+	sess->conn = pjmedia_sdp_conn_clone(pool, rhs->conn);
+	PJ_ASSERT_RETURN(sess->conn != NULL, NULL);
+    }
+
+    /* Clone time line. */
+    sess->time.start = rhs->time.start;
+    sess->time.stop = rhs->time.stop;
+
+    /* Duplicate session attributes. */
+    sess->attr_count = rhs->attr_count;
+    for (i=0; i<rhs->attr_count; ++i) {
+	sess->attr[i] = pjmedia_sdp_attr_clone(pool, rhs->attr[i]);
+    }
+
+    /* Duplicate media descriptors. */
+    sess->media_count = rhs->media_count;
+    for (i=0; i<rhs->media_count; ++i) {
+	sess->media[i] = pjmedia_sdp_media_clone(pool, rhs->media[i]);
+    }
+
+    return sess;
+}
+
+
+#define CHECK(exp,ret)	do {			\
+			    /*pj_assert(exp);*/	\
+			    if (!(exp))		\
+				return ret;	\
+			} while (0)
+
+/* Validate SDP connetion info. */
+static pj_status_t validate_sdp_conn(const pjmedia_sdp_conn *c)
+{
+    CHECK( c, PJ_EINVAL);
+    CHECK( pj_strcmp2(&c->net_type, "IN")==0, PJMEDIA_SDP_EINCONN);
+    CHECK( pj_strcmp2(&c->addr_type, "IP4")==0 ||
+	   pj_strcmp2(&c->addr_type, "IP6")==0, 
+	   PJMEDIA_SDP_EINCONN);
+    CHECK( c->addr.slen != 0, PJMEDIA_SDP_EINCONN);
+
+    return PJ_SUCCESS;
+}
+
+
+/* Validate SDP session descriptor. */
+PJ_DEF(pj_status_t) pjmedia_sdp_validate(const pjmedia_sdp_session *sdp)
+{
+    unsigned i;
+    const pj_str_t STR_RTPMAP = { "rtpmap", 6 };
+
+    CHECK( sdp != NULL, PJ_EINVAL);
+
+    /* Validate origin line. */
+    CHECK( sdp->origin.user.slen != 0, PJMEDIA_SDP_EINORIGIN);
+    CHECK( pj_strcmp2(&sdp->origin.net_type, "IN")==0, 
+	   PJMEDIA_SDP_EINORIGIN);
+    CHECK( pj_strcmp2(&sdp->origin.addr_type, "IP4")==0 ||
+	   pj_strcmp2(&sdp->origin.addr_type, "IP6")==0, 
+	   PJMEDIA_SDP_EINORIGIN);
+    CHECK( sdp->origin.addr.slen != 0, PJMEDIA_SDP_EINORIGIN);
+
+    /* Validate subject line. */
+    CHECK( sdp->name.slen != 0, PJMEDIA_SDP_EINNAME);
+
+    /* Ignore start and stop time. */
+
+    /* If session level connection info is present, validate it. */
+    if (sdp->conn) {
+	pj_status_t status = validate_sdp_conn(sdp->conn);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    /* Validate each media. */
+    for (i=0; i<sdp->media_count; ++i) {
+	const pjmedia_sdp_media *m = sdp->media[i];
+	unsigned j;
+
+	/* Validate the m= line. */
+	CHECK( m->desc.media.slen != 0, PJMEDIA_SDP_EINMEDIA);
+	CHECK( m->desc.transport.slen != 0, PJMEDIA_SDP_EINMEDIA);
+	CHECK( m->desc.fmt_count != 0 || m->desc.port==0, PJMEDIA_SDP_ENOFMT);
+
+	/* If media level connection info is present, validate it. */
+	if (m->conn) {
+	    pj_status_t status = validate_sdp_conn(m->conn);
+	    if (status != PJ_SUCCESS)
+		return status;
+	}
+
+	/* If media doesn't have connection info, then connection info
+	 * must be present in the session.
+	 */
+	if (m->conn == NULL) {
+	    if (sdp->conn == NULL)
+		return PJMEDIA_SDP_EMISSINGCONN;
+	}
+
+	/* Verify payload type. */
+	for (j=0; j<m->desc.fmt_count; ++j) {
+
+	    /* Arrgh noo!! Payload type can be non-numeric!!
+	     * RTC based programs sends "null" for instant messaging!
+	     */
+	    if (pj_isdigit(*m->desc.fmt[j].ptr)) {
+		unsigned pt = pj_strtoul(&m->desc.fmt[j]);
+
+		/* Payload type is between 0 and 127. 
+		 */
+		CHECK( pt <= 127, PJMEDIA_SDP_EINPT);
+
+		/* If port is not zero, then for each dynamic payload type, an
+		 * rtpmap attribute must be specified.
+		 */
+		if (m->desc.port != 0 && pt >= 96) {
+		    const pjmedia_sdp_attr *a;
+
+		    a = pjmedia_sdp_media_find_attr(m, &STR_RTPMAP, 
+						    &m->desc.fmt[j]);
+		    CHECK( a != NULL, PJMEDIA_SDP_EMISSINGRTPMAP);
+		}
+	    }
+	}
+    }
+
+    /* Looks good. */
+    return PJ_SUCCESS;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sdp_cmp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sdp_cmp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sdp_cmp.c	(revision 1163)
@@ -0,0 +1,292 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/sdp.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/string.h>
+
+
+/* Compare connection line. */
+static pj_status_t compare_conn(const pjmedia_sdp_conn *c1,
+				const pjmedia_sdp_conn *c2)
+{
+    /* Compare network type. */
+    if (pj_strcmp(&c1->net_type, &c2->net_type) != 0)
+	return PJMEDIA_SDP_ECONNNOTEQUAL;
+
+    /* Compare address type. */
+    if (pj_strcmp(&c1->addr_type, &c2->addr_type) != 0)
+	return PJMEDIA_SDP_ECONNNOTEQUAL;
+
+    /* Compare address. */
+    if (pj_strcmp(&c1->addr, &c2->addr) != 0)
+	return PJMEDIA_SDP_ECONNNOTEQUAL;
+
+    return PJ_SUCCESS;
+}
+
+/* Compare attributes array. */
+static pj_status_t compare_attr_imp(unsigned count1,
+				    pjmedia_sdp_attr *const attr1[],
+				    unsigned count2,
+				    pjmedia_sdp_attr *const attr2[])
+{
+    pj_status_t status;
+    unsigned i;
+    const pj_str_t inactive = { "inactive", 8 };
+    const pj_str_t sendrecv = { "sendrecv", 8 };
+    const pj_str_t sendonly = { "sendonly", 8 };
+    const pj_str_t recvonly = { "recvonly", 8 };
+    const pj_str_t fmtp = { "fmtp", 4 };
+    const pj_str_t rtpmap = { "rtpmap", 6 };
+
+    /* For simplicity, we only compare the following attributes, and ignore
+     * the others:
+     *	- direction, eg. inactive, sendonly, recvonly, sendrecv
+     *	- fmtp for each payload.
+     *	- rtpmap for each payload.
+     */
+    for (i=0; i<count1; ++i) {
+	const pjmedia_sdp_attr *a1 = attr1[i];
+
+	if (pj_strcmp(&a1->name, &inactive) == 0 || 
+	    pj_strcmp(&a1->name, &sendrecv) == 0 ||
+	    pj_strcmp(&a1->name, &sendonly) == 0 ||
+	    pj_strcmp(&a1->name, &recvonly) == 0)
+	{
+	    /* For inactive, sendrecv, sendonly, and recvonly attributes,
+	     * the same attribute must be present on the other SDP.
+	     */
+	    const pjmedia_sdp_attr *a2;
+	    a2 = pjmedia_sdp_attr_find(count2, attr2, &a1->name, NULL);
+	    if (!a2)
+		return PJMEDIA_SDP_EDIRNOTEQUAL;
+
+	} else if (pj_strcmp(&a1->name, &fmtp) == 0) {
+	    /* For fmtp attribute, find the fmtp attribute in the other SDP
+	     * for the same payload type, and compare the fmtp param/value.
+	     */
+	    pjmedia_sdp_fmtp fmtp1, fmtp2;
+	    const pjmedia_sdp_attr *a2;
+
+	    status = pjmedia_sdp_attr_get_fmtp(a1, &fmtp1);
+	    if (status != PJ_SUCCESS)
+		return PJMEDIA_SDP_EFMTPNOTEQUAL;
+
+	    a2 = pjmedia_sdp_attr_find(count2, attr2, &a1->name, &fmtp1.fmt);
+	    if (!a2)
+		return PJMEDIA_SDP_EFMTPNOTEQUAL;
+
+	    status = pjmedia_sdp_attr_get_fmtp(a2, &fmtp2);
+	    if (status != PJ_SUCCESS)
+		return PJMEDIA_SDP_EFMTPNOTEQUAL;
+
+	    if (pj_strcmp(&fmtp1.fmt_param, &fmtp2.fmt_param) != 0)
+		return PJMEDIA_SDP_EFMTPNOTEQUAL;
+
+	} else if (pj_strcmp(&a1->name, &rtpmap) == 0) {
+	    /* For rtpmap attribute, find rtpmap attribute on the other SDP
+	     * for the same payload type, and compare both rtpmap atribute
+	     * values.
+	     */
+	    pjmedia_sdp_rtpmap r1, r2;
+	    const pjmedia_sdp_attr *a2;
+
+	    status = pjmedia_sdp_attr_get_rtpmap(a1, &r1);
+	    if (status != PJ_SUCCESS)
+		return PJMEDIA_SDP_ERTPMAPNOTEQUAL;
+
+	    a2 = pjmedia_sdp_attr_find(count2, attr2, &a1->name, &r1.pt);
+	    if (!a2)
+		return PJMEDIA_SDP_ERTPMAPNOTEQUAL;
+
+	    status = pjmedia_sdp_attr_get_rtpmap(a2, &r2);
+	    if (status != PJ_SUCCESS)
+		return PJMEDIA_SDP_ERTPMAPNOTEQUAL;
+
+	    if (pj_strcmp(&r1.pt, &r2.pt) != 0)
+		return PJMEDIA_SDP_ERTPMAPNOTEQUAL;
+	    if (pj_strcmp(&r1.enc_name, &r2.enc_name) != 0)
+		return PJMEDIA_SDP_ERTPMAPNOTEQUAL;
+	    if (r1.clock_rate != r2.clock_rate)
+		return PJMEDIA_SDP_ERTPMAPNOTEQUAL;
+	    if (pj_strcmp(&r1.param, &r2.param) != 0)
+		return PJMEDIA_SDP_ERTPMAPNOTEQUAL;
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/* Compare attributes array. */
+static pj_status_t compare_attr(unsigned count1,
+				pjmedia_sdp_attr *const attr1[],
+				unsigned count2,
+				pjmedia_sdp_attr *const attr2[])
+{
+    pj_status_t status;
+
+    status = compare_attr_imp(count1, attr1, count2, attr2);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    status = compare_attr_imp(count2, attr2, count1, attr1);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return PJ_SUCCESS;
+}
+
+/* Compare media descriptor */
+PJ_DEF(pj_status_t) pjmedia_sdp_media_cmp( const pjmedia_sdp_media *sd1,
+					   const pjmedia_sdp_media *sd2,
+					   unsigned option)
+{
+    unsigned i;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(sd1 && sd2 && option==0, PJ_EINVAL);
+
+    PJ_UNUSED_ARG(option);
+
+    /* Compare media type. */
+    if (pj_strcmp(&sd1->desc.media, &sd2->desc.media) != 0)
+	return PJMEDIA_SDP_EMEDIANOTEQUAL;
+
+    /* Compare port number. */
+    if (sd1->desc.port != sd2->desc.port)
+	return PJMEDIA_SDP_EPORTNOTEQUAL;
+
+    /* Compare port count. */
+    if (sd1->desc.port_count != sd2->desc.port_count)
+	return PJMEDIA_SDP_EPORTNOTEQUAL;
+
+    /* Compare transports. */
+    if (pj_strcmp(&sd1->desc.transport, &sd2->desc.transport) != 0)
+	return PJMEDIA_SDP_ETPORTNOTEQUAL;
+
+    /* Compare number of formats. */
+    if (sd1->desc.fmt_count != sd2->desc.fmt_count)
+	return PJMEDIA_SDP_EFORMATNOTEQUAL;
+
+    /* Compare formats, in order. */
+    for (i=0; i<sd1->desc.fmt_count; ++i) {
+	if (pj_strcmp(&sd1->desc.fmt[i], &sd2->desc.fmt[i]) != 0)
+	    return PJMEDIA_SDP_EFORMATNOTEQUAL;
+    }
+
+    /* Compare connection line, if they exist. */
+    if (sd1->conn) {
+	if (!sd2->conn)
+	    return PJMEDIA_SDP_EMEDIANOTEQUAL;
+	status = compare_conn(sd1->conn, sd2->conn);
+    } else {
+	if (sd2->conn)
+	    return PJMEDIA_SDP_EMEDIANOTEQUAL;
+    }
+
+    /* Compare attributes. */
+    status = compare_attr(sd1->attr_count, sd1->attr, 
+			  sd2->attr_count, sd2->attr);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Looks equal */
+    return PJ_SUCCESS;
+}
+
+/*
+ * Compare two SDP session for equality.
+ */
+PJ_DEF(pj_status_t) pjmedia_sdp_session_cmp( const pjmedia_sdp_session *sd1,
+					     const pjmedia_sdp_session *sd2,
+					     unsigned option)
+{
+    unsigned i;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(sd1 && sd2 && option==0, PJ_EINVAL);
+
+    PJ_UNUSED_ARG(option);
+
+    /* Compare the origin line. */
+    if (pj_strcmp(&sd1->origin.user, &sd2->origin.user) != 0)
+	return PJMEDIA_SDP_EORIGINNOTEQUAL;
+
+    if (sd1->origin.id != sd2->origin.id)
+	return PJMEDIA_SDP_EORIGINNOTEQUAL;
+
+    if (sd1->origin.version != sd2->origin.version)
+	return PJMEDIA_SDP_EORIGINNOTEQUAL;
+
+    if (pj_strcmp(&sd1->origin.net_type, &sd2->origin.net_type) != 0)
+	return PJMEDIA_SDP_EORIGINNOTEQUAL;
+
+    if (pj_strcmp(&sd1->origin.addr_type, &sd2->origin.addr_type) != 0)
+	return PJMEDIA_SDP_EORIGINNOTEQUAL;
+
+    if (pj_strcmp(&sd1->origin.addr, &sd2->origin.addr) != 0)
+	return PJMEDIA_SDP_EORIGINNOTEQUAL;
+
+    
+    /* Compare the subject line. */
+    if (pj_strcmp(&sd1->name, &sd2->name) != 0)
+	return PJMEDIA_SDP_ENAMENOTEQUAL;
+
+    /* Compare connection line, when they exist */
+    if (sd1->conn) {
+	if (!sd2->conn)
+	    return PJMEDIA_SDP_ECONNNOTEQUAL;
+	status = compare_conn(sd1->conn, sd2->conn);
+	if (status != PJ_SUCCESS)
+	    return status;
+    } else {
+	if (sd2->conn)
+	    return PJMEDIA_SDP_ECONNNOTEQUAL;
+    }
+
+    /* Compare time line. */
+    if (sd1->time.start != sd2->time.start)
+	return PJMEDIA_SDP_ETIMENOTEQUAL;
+
+    if (sd1->time.stop != sd2->time.stop)
+	return PJMEDIA_SDP_ETIMENOTEQUAL;
+
+    /* Compare attributes. */
+    status = compare_attr(sd1->attr_count, sd1->attr, 
+			  sd2->attr_count, sd2->attr);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Compare media lines. */
+    if (sd1->media_count != sd2->media_count)
+	return PJMEDIA_SDP_EMEDIANOTEQUAL;
+
+    for (i=0; i<sd1->media_count; ++i) {
+	status = pjmedia_sdp_media_cmp(sd1->media[i], sd2->media[i], 0);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    /* Looks equal. */
+    return PJ_SUCCESS;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sdp_neg.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sdp_neg.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sdp_neg.c	(revision 1163)
@@ -0,0 +1,1050 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/sdp_neg.h>
+#include <pjmedia/sdp.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/ctype.h>
+#include <pj/array.h>
+
+/**
+ * This structure describes SDP media negotiator.
+ */
+struct pjmedia_sdp_neg
+{
+    pjmedia_sdp_neg_state state;	    /**< Negotiator state.	     */
+    pj_bool_t		  prefer_remote_codec_order;
+    pj_bool_t		  has_remote_answer;
+    pj_bool_t		  answer_was_remote;
+
+    pjmedia_sdp_session	*initial_sdp,	    /**< Initial local SDP	     */
+			*active_local_sdp,  /**< Currently active local SDP. */
+			*active_remote_sdp, /**< Currently active remote's.  */
+			*neg_local_sdp,	    /**< Temporary local SDP.	     */
+			*neg_remote_sdp;    /**< Temporary remote SDP.	     */
+};
+
+static const char *state_str[] = 
+{
+    "STATE_NULL",
+    "STATE_LOCAL_OFFER",
+    "STATE_REMOTE_OFFER",
+    "STATE_WAIT_NEGO",
+    "STATE_DONE",
+};
+
+/*
+ * Get string representation of negotiator state.
+ */
+PJ_DEF(const char*) pjmedia_sdp_neg_state_str(pjmedia_sdp_neg_state state)
+{
+    if (state >=0 && state < PJ_ARRAY_SIZE(state_str))
+	return state_str[state];
+
+    return "<?UNKNOWN?>";
+}
+
+
+/*
+ * Create with local offer.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_sdp_neg_create_w_local_offer( pj_pool_t *pool,
+				      const pjmedia_sdp_session *local,
+				      pjmedia_sdp_neg **p_neg)
+{
+    pjmedia_sdp_neg *neg;
+    pj_status_t status;
+
+    /* Check arguments are valid. */
+    PJ_ASSERT_RETURN(pool && local && p_neg, PJ_EINVAL);
+
+    *p_neg = NULL;
+
+    /* Validate local offer. */
+    PJ_ASSERT_RETURN((status=pjmedia_sdp_validate(local))==PJ_SUCCESS, status);
+
+    /* Create and initialize negotiator. */
+    neg = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_neg));
+    PJ_ASSERT_RETURN(neg != NULL, PJ_ENOMEM);
+
+    neg->state = PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER;
+    neg->prefer_remote_codec_order = PJMEDIA_SDP_NEG_PREFER_REMOTE_CODEC_ORDER;
+    neg->initial_sdp = pjmedia_sdp_session_clone(pool, local);
+    neg->neg_local_sdp = pjmedia_sdp_session_clone(pool, local);
+
+    *p_neg = neg;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Create with remote offer and initial local offer/answer.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_sdp_neg_create_w_remote_offer(pj_pool_t *pool,
+				      const pjmedia_sdp_session *initial,
+				      const pjmedia_sdp_session *remote,
+				      pjmedia_sdp_neg **p_neg)
+{
+    pjmedia_sdp_neg *neg;
+    pj_status_t status;
+
+    /* Check arguments are valid. */
+    PJ_ASSERT_RETURN(pool && remote && p_neg, PJ_EINVAL);
+
+    *p_neg = NULL;
+
+    /* Validate remote offer and initial answer */
+    status = pjmedia_sdp_validate(remote);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create and initialize negotiator. */
+    neg = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_neg));
+    PJ_ASSERT_RETURN(neg != NULL, PJ_ENOMEM);
+
+    neg->prefer_remote_codec_order = PJMEDIA_SDP_NEG_PREFER_REMOTE_CODEC_ORDER;
+    neg->neg_remote_sdp = pjmedia_sdp_session_clone(pool, remote);
+
+    if (initial) {
+	PJ_ASSERT_RETURN((status=pjmedia_sdp_validate(initial))==PJ_SUCCESS, 
+			 status);
+
+	neg->initial_sdp = pjmedia_sdp_session_clone(pool, initial);
+	neg->neg_local_sdp = pjmedia_sdp_session_clone(pool, initial);
+
+	neg->state = PJMEDIA_SDP_NEG_STATE_WAIT_NEGO;
+
+    } else {
+	
+	neg->state = PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER;
+
+    }
+
+    *p_neg = neg;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Set codec order preference.
+ */
+PJ_DEF(pj_status_t)
+pjmedia_sdp_neg_set_prefer_remote_codec_order(pjmedia_sdp_neg *neg,
+					      pj_bool_t prefer_remote)
+{
+    PJ_ASSERT_RETURN(neg, PJ_EINVAL);
+    neg->prefer_remote_codec_order = prefer_remote;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get SDP negotiator state.
+ */
+PJ_DEF(pjmedia_sdp_neg_state)
+pjmedia_sdp_neg_get_state( pjmedia_sdp_neg *neg )
+{
+    /* Check arguments are valid. */
+    PJ_ASSERT_RETURN(neg != NULL, PJMEDIA_SDP_NEG_STATE_NULL);
+    return neg->state;
+}
+
+
+PJ_DEF(pj_status_t) 
+pjmedia_sdp_neg_get_active_local( pjmedia_sdp_neg *neg,
+				  const pjmedia_sdp_session **local)
+{
+    PJ_ASSERT_RETURN(neg && local, PJ_EINVAL);
+    PJ_ASSERT_RETURN(neg->active_local_sdp, PJMEDIA_SDPNEG_ENOACTIVE);
+
+    *local = neg->active_local_sdp;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) 
+pjmedia_sdp_neg_get_active_remote( pjmedia_sdp_neg *neg,
+				   const pjmedia_sdp_session **remote)
+{
+    PJ_ASSERT_RETURN(neg && remote, PJ_EINVAL);
+    PJ_ASSERT_RETURN(neg->active_remote_sdp, PJMEDIA_SDPNEG_ENOACTIVE);
+
+    *remote = neg->active_remote_sdp;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_bool_t)
+pjmedia_sdp_neg_was_answer_remote(pjmedia_sdp_neg *neg)
+{
+    PJ_ASSERT_RETURN(neg, PJ_FALSE);
+
+    return neg->answer_was_remote;
+}
+
+
+PJ_DEF(pj_status_t)
+pjmedia_sdp_neg_get_neg_remote( pjmedia_sdp_neg *neg,
+				const pjmedia_sdp_session **remote)
+{
+    PJ_ASSERT_RETURN(neg && remote, PJ_EINVAL);
+    PJ_ASSERT_RETURN(neg->neg_remote_sdp, PJMEDIA_SDPNEG_ENONEG);
+
+    *remote = neg->neg_remote_sdp;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) 
+pjmedia_sdp_neg_get_neg_local( pjmedia_sdp_neg *neg,
+			       const pjmedia_sdp_session **local)
+{
+    PJ_ASSERT_RETURN(neg && local, PJ_EINVAL);
+    PJ_ASSERT_RETURN(neg->neg_local_sdp, PJMEDIA_SDPNEG_ENONEG);
+
+    *local = neg->neg_local_sdp;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Modify local SDP and wait for remote answer.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_sdp_neg_modify_local_offer( pj_pool_t *pool,
+				    pjmedia_sdp_neg *neg,
+				    const pjmedia_sdp_session *local)
+{
+    /* Check arguments are valid. */
+    PJ_ASSERT_RETURN(pool && neg && local, PJ_EINVAL);
+
+    /* Can only do this in STATE_DONE. */
+    PJ_ASSERT_RETURN(neg->state == PJMEDIA_SDP_NEG_STATE_DONE, 
+		     PJMEDIA_SDPNEG_EINSTATE);
+
+    /* Change state to STATE_LOCAL_OFFER */
+    neg->state = PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER;
+    neg->initial_sdp = pjmedia_sdp_session_clone(pool, local);
+    neg->neg_local_sdp = pjmedia_sdp_session_clone(pool, local);
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) 
+pjmedia_sdp_neg_send_local_offer( pj_pool_t *pool,
+				  pjmedia_sdp_neg *neg,
+				  const pjmedia_sdp_session **offer)
+{
+    /* Check arguments are valid. */
+    PJ_ASSERT_RETURN(neg && offer, PJ_EINVAL);
+
+    *offer = NULL;
+
+    /* Can only do this in STATE_DONE or STATE_LOCAL_OFFER. */
+    PJ_ASSERT_RETURN(neg->state == PJMEDIA_SDP_NEG_STATE_DONE ||
+		     neg->state == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER, 
+		     PJMEDIA_SDPNEG_EINSTATE);
+
+    if (neg->state == PJMEDIA_SDP_NEG_STATE_DONE) {
+	/* If in STATE_DONE, set the active SDP as the offer. */
+	PJ_ASSERT_RETURN(neg->active_local_sdp, PJMEDIA_SDPNEG_ENOACTIVE);
+
+	neg->state = PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER;
+	neg->neg_local_sdp = pjmedia_sdp_session_clone(pool, 
+						       neg->active_local_sdp);
+	*offer = neg->active_local_sdp;
+
+    } else {
+	/* We assume that we're in STATE_LOCAL_OFFER.
+	 * In this case set the neg_local_sdp as the offer.
+	 */
+	*offer = neg->neg_local_sdp;
+    }
+
+    
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) 
+pjmedia_sdp_neg_set_remote_answer( pj_pool_t *pool,
+				   pjmedia_sdp_neg *neg,
+				   const pjmedia_sdp_session *remote)
+{
+    /* Check arguments are valid. */
+    PJ_ASSERT_RETURN(pool && neg && remote, PJ_EINVAL);
+
+    /* Can only do this in STATE_LOCAL_OFFER.
+     * If we haven't provided local offer, then rx_remote_offer() should
+     * be called instead of this function.
+     */
+    PJ_ASSERT_RETURN(neg->state == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER, 
+		     PJMEDIA_SDPNEG_EINSTATE);
+
+    /* We're ready to negotiate. */
+    neg->state = PJMEDIA_SDP_NEG_STATE_WAIT_NEGO;
+    neg->has_remote_answer = PJ_TRUE;
+    neg->neg_remote_sdp = pjmedia_sdp_session_clone(pool, remote);
+ 
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) 
+pjmedia_sdp_neg_set_remote_offer( pj_pool_t *pool,
+				  pjmedia_sdp_neg *neg,
+				  const pjmedia_sdp_session *remote)
+{
+    /* Check arguments are valid. */
+    PJ_ASSERT_RETURN(pool && neg && remote, PJ_EINVAL);
+
+    /* Can only do this in STATE_DONE.
+     * If we already provide local offer, then rx_remote_answer() should
+     * be called instead of this function.
+     */
+    PJ_ASSERT_RETURN(neg->state == PJMEDIA_SDP_NEG_STATE_DONE, 
+		     PJMEDIA_SDPNEG_EINSTATE);
+
+    /* State now is STATE_REMOTE_OFFER. */
+    neg->state = PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER;
+    neg->neg_remote_sdp = pjmedia_sdp_session_clone(pool, remote);
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) 
+pjmedia_sdp_neg_set_local_answer( pj_pool_t *pool,
+				  pjmedia_sdp_neg *neg,
+				  const pjmedia_sdp_session *local)
+{
+    /* Check arguments are valid. */
+    PJ_ASSERT_RETURN(pool && neg && local, PJ_EINVAL);
+
+    /* Can only do this in STATE_REMOTE_OFFER.
+     * If we already provide local offer, then rx_remote_answer() should
+     * be called instead of this function.
+     */
+    PJ_ASSERT_RETURN(neg->state == PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER, 
+		     PJMEDIA_SDPNEG_EINSTATE);
+
+    /* State now is STATE_WAIT_NEGO. */
+    neg->state = PJMEDIA_SDP_NEG_STATE_WAIT_NEGO;
+    if (local)
+	neg->neg_local_sdp = pjmedia_sdp_session_clone(pool, local);
+    else {
+	PJ_ASSERT_RETURN(neg->initial_sdp, PJMEDIA_SDPNEG_ENOINITIAL);
+	neg->neg_local_sdp = pjmedia_sdp_session_clone(pool, neg->initial_sdp);
+    }
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_bool_t) pjmedia_sdp_neg_has_local_answer(pjmedia_sdp_neg *neg)
+{
+    pj_assert(neg && neg->state==PJMEDIA_SDP_NEG_STATE_WAIT_NEGO);
+    return !neg->has_remote_answer;
+}
+
+
+/* Swap string. */
+static void str_swap(pj_str_t *str1, pj_str_t *str2)
+{
+    pj_str_t tmp = *str1;
+    *str1 = *str2;
+    *str2 = tmp;
+}
+
+static void remove_all_media_directions(pjmedia_sdp_media *m)
+{
+    pjmedia_sdp_media_remove_all_attr(m, "inactive");
+    pjmedia_sdp_media_remove_all_attr(m, "sendrecv");
+    pjmedia_sdp_media_remove_all_attr(m, "sendonly");
+    pjmedia_sdp_media_remove_all_attr(m, "recvonly");
+}
+
+/* Update media direction based on peer's media direction */
+static void update_media_direction(pj_pool_t *pool,
+				   const pjmedia_sdp_media *remote,
+				   pjmedia_sdp_media *local)
+{
+    pjmedia_dir old_dir = PJMEDIA_DIR_ENCODING_DECODING,
+	        new_dir;
+
+    /* Get the media direction of local SDP */
+    if (pjmedia_sdp_media_find_attr2(local, "sendonly", NULL))
+	old_dir = PJMEDIA_DIR_ENCODING;
+    else if (pjmedia_sdp_media_find_attr2(local, "recvonly", NULL))
+	old_dir = PJMEDIA_DIR_DECODING;
+    else if (pjmedia_sdp_media_find_attr2(local, "inactive", NULL))
+	old_dir = PJMEDIA_DIR_NONE;
+
+    new_dir = old_dir;
+
+    /* Adjust local media direction based on remote media direction */
+    if (pjmedia_sdp_media_find_attr2(remote, "inactive", NULL) != NULL) {
+	/* If remote has "a=inactive", then local is inactive too */
+
+	new_dir = PJMEDIA_DIR_NONE;
+
+    } else if(pjmedia_sdp_media_find_attr2(remote, "sendonly", NULL) != NULL) {
+	/* If remote has "a=sendonly", then set local to "recvonly" if
+	 * it is currently "sendrecv". Otherwise if local is NOT "recvonly",
+	 * then set local direction to "inactive".
+	 */
+	switch (old_dir) {
+	case PJMEDIA_DIR_ENCODING_DECODING:
+	    new_dir = PJMEDIA_DIR_DECODING;
+	    break;
+	case PJMEDIA_DIR_DECODING:
+	    /* No change */
+	    break;
+	default:
+	    new_dir = PJMEDIA_DIR_NONE;
+	    break;
+	}
+
+    } else if(pjmedia_sdp_media_find_attr2(remote, "recvonly", NULL) != NULL) {
+	/* If remote has "a=recvonly", then set local to "sendonly" if
+	 * it is currently "sendrecv". Otherwise if local is NOT "sendonly",
+	 * then set local direction to "inactive"
+	 */
+    
+	switch (old_dir) {
+	case PJMEDIA_DIR_ENCODING_DECODING:
+	    new_dir = PJMEDIA_DIR_ENCODING;
+	    break;
+	case PJMEDIA_DIR_ENCODING:
+	    /* No change */
+	    break;
+	default:
+	    new_dir = PJMEDIA_DIR_NONE;
+	    break;
+	}
+
+    } else {
+	/* Remote indicates "sendrecv" capability. No change to local 
+	 * direction 
+	 */
+    }
+
+    if (new_dir != old_dir) {
+	pjmedia_sdp_attr *a = NULL;
+
+	remove_all_media_directions(local);
+
+	switch (new_dir) {
+	case PJMEDIA_DIR_NONE:
+	    a = pjmedia_sdp_attr_create(pool, "inactive", NULL);
+	    break;
+	case PJMEDIA_DIR_ENCODING:
+	    a = pjmedia_sdp_attr_create(pool, "sendonly", NULL);
+	    break;
+	case PJMEDIA_DIR_DECODING:
+	    a = pjmedia_sdp_attr_create(pool, "recvonly", NULL);
+	    break;
+	default:
+	    /* sendrecv */
+	    break;
+	}
+	
+	if (a) {
+	    pjmedia_sdp_media_add_attr(local, a);
+	}
+    }
+}
+
+/* Update single local media description to after receiving answer
+ * from remote.
+ */
+static pj_status_t process_m_answer( pj_pool_t *pool,
+				     pjmedia_sdp_media *offer,
+				     pjmedia_sdp_media *answer,
+				     pj_bool_t allow_asym)
+{
+    unsigned i;
+
+    /* Check that the media type match our offer. */
+
+    if (pj_strcmp(&answer->desc.media, &offer->desc.media)!=0) {
+	/* The media type in the answer is different than the offer! */
+	return PJMEDIA_SDPNEG_EINVANSMEDIA;
+    }
+
+
+    /* Chec that transport in the answer match our offer. */
+
+    if (pj_strcmp(&answer->desc.transport, 
+		  &offer->desc.transport)!=0) 
+    {
+	/* The transport in the answer is different than the offer! */
+	return PJMEDIA_SDPNEG_EINVANSTP;
+    }
+
+    /* Check if remote has rejected our offer */
+    
+    if (answer->desc.port == 0) {
+	
+	/* Remote has rejected our offer. 
+	 * Set our port to zero too in active SDP.
+	 */
+	offer->desc.port = 0;
+    }
+
+
+    /* Process direction attributes */
+    update_media_direction(pool, answer, offer);
+ 
+    /* If asymetric media is allowed, then just check that remote answer has 
+     * codecs that are within the offer. 
+     *
+     * Otherwise if asymetric media is not allowed, then we will choose only
+     * one codec in our initial offer to match the answer.
+     */
+    if (allow_asym) {
+	for (i=0; i<answer->desc.fmt_count; ++i) {
+	    unsigned j;
+	    pj_str_t *rem_fmt = &answer->desc.fmt[i];
+
+	    for (j=0; j<offer->desc.fmt_count; ++j) {
+		if (pj_strcmp(rem_fmt, &answer->desc.fmt[j])==0)
+		    break;
+	    }
+
+	    if (j != offer->desc.fmt_count) {
+		/* Found at least one common codec. */
+		break;
+	    }
+	}
+
+	if (i == answer->desc.fmt_count) {
+	    /* No common codec in the answer! */
+	    return PJMEDIA_SDPNEG_EANSNOMEDIA;
+	}
+
+	PJ_TODO(CHECK_SDP_NEGOTIATION_WHEN_ASYMETRIC_MEDIA_IS_ALLOWED);
+
+    } else {
+	/* Remove all format in the offer that has no matching answer */
+	for (i=0; i<offer->desc.fmt_count;) {
+	    unsigned pt;
+	    pj_uint32_t j;
+	    pj_str_t *fmt = &offer->desc.fmt[i];
+	    
+
+	    /* Find matching answer */
+	    pt = pj_strtoul(fmt);
+
+	    if (pt < 96) {
+		for (j=0; j<answer->desc.fmt_count; ++j) {
+		    if (pj_strcmp(fmt, &answer->desc.fmt[j])==0)
+			break;
+		}
+	    } else {
+		/* This is dynamic payload type.
+		 * For dynamic payload type, we must look the rtpmap and
+		 * compare the encoding name.
+		 */
+		const pjmedia_sdp_attr *a;
+		pjmedia_sdp_rtpmap or;
+
+		/* Get the rtpmap for the payload type in the offer. */
+		a = pjmedia_sdp_media_find_attr2(offer, "rtpmap", fmt);
+		if (!a) {
+		    pj_assert(!"Bug! Offer should have been validated");
+		    return PJ_EBUG;
+		}
+		pjmedia_sdp_attr_get_rtpmap(a, &or);
+
+		/* Find paylaod in answer SDP with matching 
+		 * encoding name and clock rate.
+		 */
+		for (j=0; j<answer->desc.fmt_count; ++j) {
+		    a = pjmedia_sdp_media_find_attr2(answer, "rtpmap", 
+						     &answer->desc.fmt[j]);
+		    if (a) {
+			pjmedia_sdp_rtpmap ar;
+			pjmedia_sdp_attr_get_rtpmap(a, &ar);
+
+			/* See if encoding name, clock rate, and channel
+			 * count match 
+			 */
+			if (!pj_stricmp(&or.enc_name, &ar.enc_name) &&
+			    or.clock_rate == ar.clock_rate &&
+			    (pj_stricmp(&or.param, &ar.param)==0 ||
+			     (ar.param.slen==1 && *ar.param.ptr=='1')))
+			{
+			    /* Match! */
+			    break;
+			}
+		    }
+		}
+	    }
+
+	    if (j == answer->desc.fmt_count) {
+		/* This format has no matching answer.
+		 * Remove it from our offer.
+		 */
+		pjmedia_sdp_attr *a;
+
+		/* Remove rtpmap associated with this format */
+		a = pjmedia_sdp_media_find_attr2(offer, "rtpmap", fmt);
+		if (a)
+		    pjmedia_sdp_media_remove_attr(offer, a);
+
+		/* Remove fmtp associated with this format */
+		a = pjmedia_sdp_media_find_attr2(offer, "fmtp", fmt);
+		if (a)
+		    pjmedia_sdp_media_remove_attr(offer, a);
+
+		/* Remove this format from offer's array */
+		pj_array_erase(offer->desc.fmt, sizeof(offer->desc.fmt[0]),
+			       offer->desc.fmt_count, i);
+		--offer->desc.fmt_count;
+
+	    } else {
+		++i;
+	    }
+	}
+
+	/* Arrange format in the offer so the order match the priority
+	 * in the answer
+	 */
+	for (i=0; i<answer->desc.fmt_count; ++i) {
+	    unsigned j;
+	    pj_str_t *fmt = &answer->desc.fmt[i];
+
+	    for (j=i; j<offer->desc.fmt_count; ++j) {
+		if (pj_strcmp(fmt, &offer->desc.fmt[j])==0) {
+		    str_swap(&offer->desc.fmt[i], &offer->desc.fmt[j]);
+		    break;
+		}
+	    }
+	}
+    }
+
+    /* Looks okay */
+    return PJ_SUCCESS;
+}
+
+
+/* Update local media session (offer) to create active local session
+ * after receiving remote answer.
+ */
+static pj_status_t process_answer(pj_pool_t *pool,
+				  pjmedia_sdp_session *offer,
+				  pjmedia_sdp_session *answer,
+				  pj_bool_t allow_asym,
+				  pjmedia_sdp_session **p_active)
+{
+    unsigned mi;
+    pj_bool_t has_active = PJ_FALSE;
+    pj_status_t status;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(pool && offer && answer && p_active, PJ_EINVAL);
+
+    /* Check that media count match between offer and answer */
+    if (offer->media_count != answer->media_count)
+	return PJMEDIA_SDPNEG_EMISMEDIA;
+
+    /* Now update each media line in the offer with the answer. */
+    for (mi=0; mi<offer->media_count; ++mi) {
+	status = process_m_answer(pool, offer->media[mi], answer->media[mi],
+				  allow_asym);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	if (offer->media[mi]->desc.port != 0)
+	    has_active = PJ_TRUE;
+    }
+
+    *p_active = offer;
+
+    return has_active ? PJ_SUCCESS : PJMEDIA_SDPNEG_ENOMEDIA;
+}
+
+/* Try to match offer with answer. */
+static pj_status_t match_offer(pj_pool_t *pool,
+			       const pjmedia_sdp_media *offer,
+			       const pjmedia_sdp_media *preanswer,
+			       const pjmedia_sdp_media *orig_local,
+			       pjmedia_sdp_media **p_answer)
+{
+    unsigned i;
+    pj_bool_t offer_has_codec = 0,
+	      offer_has_telephone_event = 0,
+	      offer_has_other = 0,
+	      found_matching_codec = 0,
+	      found_matching_telephone_event = 0,
+	      found_matching_other = 0;
+    unsigned pt_answer_count = 0;
+    pj_str_t pt_answer[PJMEDIA_MAX_SDP_FMT];
+    pjmedia_sdp_media *answer;
+
+    /* With the addition of telephone-event and dodgy MS RTC SDP, 
+     * the answer generation algorithm looks really shitty...
+     */
+    for (i=0; i<offer->desc.fmt_count; ++i) {
+	unsigned j;
+	
+	if (pj_isdigit(*offer->desc.fmt[i].ptr)) {
+	    /* This is normal/standard payload type, where it's identified
+	     * by payload number.
+	     */
+	    unsigned pt;
+
+	    pt = pj_strtoul(&offer->desc.fmt[i]);
+	    
+	    if (pt < 96) {
+		/* For static payload type, it's enough to compare just
+		 * the payload number.
+		 */
+
+		offer_has_codec = 1;
+
+		/* We just need to select one codec. 
+		 * Continue if we have selected matching codec for previous 
+		 * payload.
+		 */
+		if (found_matching_codec)
+		    continue;
+
+		/* Find matching codec in local descriptor. */
+		for (j=0; j<preanswer->desc.fmt_count; ++j) {
+		    unsigned p;
+		    p = pj_strtoul(&preanswer->desc.fmt[j]);
+		    if (p == pt && pj_isdigit(*preanswer->desc.fmt[j].ptr)) {
+			found_matching_codec = 1;
+			pt_answer[pt_answer_count++] = preanswer->desc.fmt[j];
+			break;
+		    }
+		}
+
+	    } else {
+		/* This is dynamic payload type.
+		 * For dynamic payload type, we must look the rtpmap and
+		 * compare the encoding name.
+		 */
+		const pjmedia_sdp_attr *a;
+		pjmedia_sdp_rtpmap or;
+		pj_bool_t is_codec;
+
+		/* Get the rtpmap for the payload type in the offer. */
+		a = pjmedia_sdp_media_find_attr2(offer, "rtpmap", 
+						 &offer->desc.fmt[i]);
+		if (!a) {
+		    pj_assert(!"Bug! Offer should have been validated");
+		    return PJMEDIA_SDP_EMISSINGRTPMAP;
+		}
+		pjmedia_sdp_attr_get_rtpmap(a, &or);
+
+		if (!pj_strcmp2(&or.enc_name, "telephone-event")) {
+		    offer_has_telephone_event = 1;
+		    if (found_matching_telephone_event)
+			continue;
+		    is_codec = 0;
+		} else {
+		    offer_has_codec = 1;
+		    if (found_matching_codec)
+			continue;
+		    is_codec = 1;
+		}
+		
+		/* Find paylaod in our initial SDP with matching 
+		 * encoding name and clock rate.
+		 */
+		for (j=0; j<preanswer->desc.fmt_count; ++j) {
+		    a = pjmedia_sdp_media_find_attr2(preanswer, "rtpmap", 
+						     &preanswer->desc.fmt[j]);
+		    if (a) {
+			pjmedia_sdp_rtpmap lr;
+			pjmedia_sdp_attr_get_rtpmap(a, &lr);
+
+			/* See if encoding name, clock rate, and
+			 * channel count  match 
+			 */
+			if (!pj_stricmp(&or.enc_name, &lr.enc_name) &&
+			    or.clock_rate == lr.clock_rate &&
+			    (pj_strcmp(&or.param, &lr.param)==0 ||
+			     (or.param.slen==1 && *or.param.ptr=='1'))) 
+			{
+			    /* Match! */
+			    if (is_codec)
+				found_matching_codec = 1;
+			    else
+				found_matching_telephone_event = 1;
+			    pt_answer[pt_answer_count++] = preanswer->desc.fmt[j];
+			    break;
+			}
+		    }
+		}
+	    }
+
+	} else {
+	    /* This is a non-standard, brain damaged SDP where the payload
+	     * type is non-numeric. It exists e.g. in Microsoft RTC based
+	     * UA, to indicate instant messaging capability.
+	     * Example:
+	     *	- m=x-ms-message 5060 sip null
+	     */
+	    offer_has_other = 1;
+	    if (found_matching_other)
+		continue;
+
+	    for (j=0; j<preanswer->desc.fmt_count; ++j) {
+		if (!pj_strcmp(&offer->desc.fmt[i], &preanswer->desc.fmt[j])) {
+		    /* Match */
+		    found_matching_other = 1;
+		    pt_answer[pt_answer_count++] = preanswer->desc.fmt[j];
+		    break;
+		}
+	    }
+	}
+    }
+
+    /* See if all types of offer can be matched. */
+    if (offer_has_codec && !found_matching_codec) {
+	return PJMEDIA_SDPNEG_NOANSCODEC;
+    }
+
+    /* If this comment is removed, negotiation will fail if remote has offered
+       telephone-event and local is not configured with telephone-event
+
+    if (offer_has_telephone_event && !found_matching_telephone_event) {
+	return PJMEDIA_SDPNEG_NOANSTELEVENT;
+    }
+    */
+
+    if (offer_has_other && !found_matching_other) {
+	return PJMEDIA_SDPNEG_NOANSUNKNOWN;
+    }
+
+    /* Seems like everything is in order.
+     * Build the answer by cloning from local media, but rearrange the payload
+     * to suit the offer.
+     */
+    answer = pjmedia_sdp_media_clone(pool, orig_local);
+    for (i=0; i<pt_answer_count; ++i) {
+	unsigned j;
+	for (j=i; j<answer->desc.fmt_count; ++j) {
+	    if (!pj_strcmp(&answer->desc.fmt[j], &pt_answer[i]))
+		break;
+	}
+	pj_assert(j != answer->desc.fmt_count);
+	str_swap(&answer->desc.fmt[i], &answer->desc.fmt[j]);
+    }
+    
+    /* Remove unwanted local formats. */
+    for (i=pt_answer_count; i<answer->desc.fmt_count; ++i) {
+	pjmedia_sdp_attr *a;
+
+	/* Remove rtpmap for this format */
+	a = pjmedia_sdp_media_find_attr2(answer, "rtpmap", 
+					 &answer->desc.fmt[i]);
+	if (a) {
+	    pjmedia_sdp_media_remove_attr(answer, a);
+	}
+
+	/* Remove fmtp for this format */
+	a = pjmedia_sdp_media_find_attr2(answer, "fmtp", 
+					 &answer->desc.fmt[i]);
+	if (a) {
+	    pjmedia_sdp_media_remove_attr(answer, a);
+	}
+    }
+    answer->desc.fmt_count = pt_answer_count;
+
+    /* If offer has zero port, set our answer with zero port too */
+    if (offer->desc.port==0)
+	answer->desc.port = 0;
+
+    /* Update media direction. */
+    update_media_direction(pool, offer, answer);
+
+    *p_answer = answer;
+    return PJ_SUCCESS;
+}
+
+/* Create complete answer for remote's offer. */
+static pj_status_t create_answer( pj_pool_t *pool,
+				  pj_bool_t prefer_remote_codec_order,
+				  const pjmedia_sdp_session *initial,
+				  const pjmedia_sdp_session *offer,
+				  pjmedia_sdp_session **p_answer)
+{
+    pj_status_t status = PJMEDIA_SDPNEG_ENOMEDIA;
+    pj_bool_t has_active = PJ_FALSE;
+    pjmedia_sdp_session *answer;
+    char media_used[PJMEDIA_MAX_SDP_MEDIA];
+    unsigned i;
+
+    /* Validate remote offer. 
+     * This should have been validated before.
+     */
+    PJ_ASSERT_RETURN((status=pjmedia_sdp_validate(offer))==PJ_SUCCESS, status);
+
+    /* Create initial answer by duplicating initial SDP,
+     * but clear all media lines. The media lines will be filled up later.
+     */
+    answer = pjmedia_sdp_session_clone(pool, initial);
+    PJ_ASSERT_RETURN(answer != NULL, PJ_ENOMEM);
+
+    answer->media_count = 0;
+
+    pj_bzero(media_used, sizeof(media_used));
+
+    /* For each media line, create our answer based on our initial
+     * capability.
+     */
+    for (i=0; i<offer->media_count; ++i) {
+	const pjmedia_sdp_media *om;	/* offer */
+	const pjmedia_sdp_media *im;	/* initial media */
+	pjmedia_sdp_media *am = NULL;	/* answer/result */
+	unsigned j;
+
+	om = offer->media[i];
+
+	/* Find media description in our initial capability that matches
+	 * the media type and transport type of offer's media, has
+	 * matching codec, and has not been used to answer other offer.
+	 */
+	for (im=NULL, j=0; j<initial->media_count; ++j) {
+	    im = initial->media[j];
+	    if (pj_strcmp(&om->desc.media, &im->desc.media)==0 &&
+		pj_strcmp(&om->desc.transport, &im->desc.transport)==0 &&
+		media_used[j] == 0)
+	    {
+		/* See if it has matching codec. */
+		if (prefer_remote_codec_order) {
+		    status = match_offer(pool, om, im, im, &am);
+		} else {
+		    status = match_offer(pool, im, om, im, &am);
+		}
+
+		if (status == PJ_SUCCESS) {
+		    /* Mark media as used. */
+		    media_used[j] = 1;
+		    break;
+		}
+	    }
+	}
+
+	if (j==initial->media_count) {
+	    /* No matching media.
+	     * Reject the offer by setting the port to zero in the answer.
+	     */
+	    pjmedia_sdp_attr *a;
+
+	    /* For simplicity in the construction of the answer, we'll
+	     * just clone the media from the offer. Anyway receiver will
+	     * ignore anything in the media once it sees that the port
+	     * number is zero.
+	     */
+	    am = pjmedia_sdp_media_clone(pool, om);
+	    am->desc.port = 0;
+
+	    /* Remove direction attribute, and replace with inactive */
+	    remove_all_media_directions(am);
+
+	    a = pjmedia_sdp_attr_create(pool, "inactive", NULL);
+	    pjmedia_sdp_media_add_attr(am, a);
+
+	} else {
+	    /* The answer is in am */
+	    pj_assert(am != NULL);
+	}
+
+	/* Add the media answer */
+	answer->media[answer->media_count++] = am;
+
+	/* Check if this media is active.*/
+	if (am->desc.port != 0)
+	    has_active = PJ_TRUE;
+    }
+
+    *p_answer = answer;
+
+    return has_active ? PJ_SUCCESS : status;
+}
+
+/* The best bit: SDP negotiation function! */
+PJ_DEF(pj_status_t) pjmedia_sdp_neg_negotiate( pj_pool_t *pool,
+					       pjmedia_sdp_neg *neg,
+					       pj_bool_t allow_asym)
+{
+    pj_status_t status;
+
+    /* Check arguments are valid. */
+    PJ_ASSERT_RETURN(pool && neg, PJ_EINVAL);
+
+    /* Must be in STATE_WAIT_NEGO state. */
+    PJ_ASSERT_RETURN(neg->state == PJMEDIA_SDP_NEG_STATE_WAIT_NEGO, 
+		     PJMEDIA_SDPNEG_EINSTATE);
+
+    /* Must have remote offer. */
+    PJ_ASSERT_RETURN(neg->neg_remote_sdp, PJ_EBUG);
+
+    if (neg->has_remote_answer) {
+	pjmedia_sdp_session *active;
+	status = process_answer(pool, neg->neg_local_sdp, neg->neg_remote_sdp,
+			        allow_asym, &active);
+	if (status == PJ_SUCCESS) {
+	    /* Only update active SDPs when negotiation is successfull */
+	    neg->active_local_sdp = active;
+	    neg->active_remote_sdp = neg->neg_remote_sdp;
+
+	}
+    } else {
+	pjmedia_sdp_session *answer = NULL;
+
+	status = create_answer(pool, neg->prefer_remote_codec_order, 
+			       neg->neg_local_sdp, neg->neg_remote_sdp,
+			       &answer);
+	if (status == PJ_SUCCESS) {
+	    pj_uint32_t active_ver;
+
+	    if (neg->active_local_sdp)
+		active_ver = neg->active_local_sdp->origin.version;
+	    else
+		active_ver = neg->initial_sdp->origin.version;
+
+	    /* Only update active SDPs when negotiation is successfull */
+	    neg->active_local_sdp = answer;
+	    neg->active_remote_sdp = neg->neg_remote_sdp;
+
+	    /* Increment SDP version */
+	    neg->active_local_sdp->origin.version = ++active_ver;
+	}
+    }
+
+    /* State is DONE regardless */
+    neg->state = PJMEDIA_SDP_NEG_STATE_DONE;
+
+    /* Save state */
+    neg->answer_was_remote = neg->has_remote_answer;
+
+    /* Clear temporary SDP */
+    neg->neg_local_sdp = neg->neg_remote_sdp = NULL;
+    neg->has_remote_answer = PJ_FALSE;
+
+    return status;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/session.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/session.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/session.c	(revision 1163)
@@ -0,0 +1,775 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/session.h>
+#include <pjmedia/errno.h>
+#include <pj/log.h>
+#include <pj/os.h> 
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+#include <pj/ctype.h>
+#include <pj/rand.h>
+
+
+struct pjmedia_session
+{
+    pj_pool_t		   *pool;
+    pjmedia_endpt	   *endpt;
+    unsigned		    stream_cnt;
+    pjmedia_stream_info	    stream_info[PJMEDIA_MAX_SDP_MEDIA];
+    pjmedia_stream	   *stream[PJMEDIA_MAX_SDP_MEDIA];
+    void		   *user_data;
+};
+
+#define THIS_FILE		"session.c"
+
+#define PJMEDIA_SESSION_SIZE	(48*1024)
+#define PJMEDIA_SESSION_INC	1024
+
+static const pj_str_t ID_AUDIO = { "audio", 5};
+static const pj_str_t ID_VIDEO = { "video", 5};
+static const pj_str_t ID_IN = { "IN", 2 };
+static const pj_str_t ID_IP4 = { "IP4", 3};
+static const pj_str_t ID_RTP_AVP = { "RTP/AVP", 7 };
+static const pj_str_t ID_SDP_NAME = { "pjmedia", 7 };
+static const pj_str_t ID_RTPMAP = { "rtpmap", 6 };
+static const pj_str_t ID_TELEPHONE_EVENT = { "telephone-event", 15 };
+
+static const pj_str_t STR_INACTIVE = { "inactive", 8 };
+static const pj_str_t STR_SENDRECV = { "sendrecv", 8 };
+static const pj_str_t STR_SENDONLY = { "sendonly", 8 };
+static const pj_str_t STR_RECVONLY = { "recvonly", 8 };
+
+
+/*
+ * Get fmtp mode parameter associated with the codec.
+ */
+static pj_status_t get_fmtp_mode(const pjmedia_sdp_media *m,
+				 const pj_str_t *fmt,
+				 int *p_mode)
+{
+    const pjmedia_sdp_attr *attr;
+    pjmedia_sdp_fmtp fmtp;
+    const pj_str_t str_mode = { "mode=", 5 };
+    char *pos;
+
+    /* Get "fmtp" attribute for the format */
+    attr = pjmedia_sdp_media_find_attr2(m, "fmtp", fmt);
+    if (attr == NULL)
+	return -1;
+
+    /* Parse "fmtp" attribute */
+    if (pjmedia_sdp_attr_get_fmtp(attr, &fmtp) != PJ_SUCCESS)
+	return -1;
+
+    /* Look for "mode=" string in the fmtp */
+    while (fmtp.fmt_param.slen >= str_mode.slen + 1) {
+	if (pj_strnicmp(&fmtp.fmt_param, &str_mode, str_mode.slen)==0) {
+	    /* Found "mode=" string */
+	    break;
+	}
+
+	fmtp.fmt_param.ptr++;
+	fmtp.fmt_param.slen--;
+    }
+
+    if (fmtp.fmt_param.slen < str_mode.slen + 1) {
+	/* "mode=" param not found */
+	return -1;
+    }
+
+    /* Get the mode */
+    pos = fmtp.fmt_param.ptr + str_mode.slen;
+    *p_mode = 0;
+    while (pj_isdigit(*pos)) {
+	*p_mode = *p_mode * 10 + (*pos - '0');
+	++pos;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create stream info from SDP media line.
+ */
+PJ_DEF(pj_status_t) pjmedia_stream_info_from_sdp(
+					   pjmedia_stream_info *si,
+					   pj_pool_t *pool,
+					   pjmedia_endpt *endpt,
+					   const pjmedia_sdp_session *local,
+					   const pjmedia_sdp_session *remote,
+					   unsigned stream_idx)
+{
+    pjmedia_codec_mgr *mgr;
+    const pjmedia_sdp_attr *attr;
+    const pjmedia_sdp_media *local_m;
+    const pjmedia_sdp_media *rem_m;
+    const pjmedia_sdp_conn *local_conn;
+    const pjmedia_sdp_conn *rem_conn;
+    pjmedia_sdp_rtpmap *rtpmap;
+    int local_fmtp_mode = 0, rem_fmtp_mode = 0;
+    unsigned i, pt, fmti;
+    pj_status_t status;
+
+    
+    /* Validate arguments: */
+    PJ_ASSERT_RETURN(pool && si && local && remote, PJ_EINVAL);
+    PJ_ASSERT_RETURN(stream_idx < local->media_count, PJ_EINVAL);
+    PJ_ASSERT_RETURN(stream_idx < remote->media_count, PJ_EINVAL);
+
+
+    /* Get codec manager. */
+    mgr = pjmedia_endpt_get_codec_mgr(endpt);
+
+    /* Keep SDP shortcuts */
+    local_m = local->media[stream_idx];
+    rem_m = remote->media[stream_idx];
+
+    local_conn = local_m->conn ? local_m->conn : local->conn;
+    if (local_conn == NULL)
+	return PJMEDIA_SDP_EMISSINGCONN;
+
+    rem_conn = rem_m->conn ? rem_m->conn : remote->conn;
+    if (rem_conn == NULL)
+	return PJMEDIA_SDP_EMISSINGCONN;
+
+
+    /* Reset: */
+
+    pj_bzero(si, sizeof(*si));
+
+    /* Media type: */
+
+    if (pj_stricmp(&local_m->desc.media, &ID_AUDIO) == 0) {
+
+	si->type = PJMEDIA_TYPE_AUDIO;
+
+    } else if (pj_stricmp(&local_m->desc.media, &ID_VIDEO) == 0) {
+
+	si->type = PJMEDIA_TYPE_VIDEO;
+
+    } else {
+
+	si->type = PJMEDIA_TYPE_UNKNOWN;
+	return PJMEDIA_EINVALIMEDIATYPE;
+    }
+
+    /* Transport type must be equal */
+    if (pj_stricmp(&rem_m->desc.transport, 
+		   &local_m->desc.transport) != 0) 
+    {
+	si->type = PJMEDIA_TYPE_UNKNOWN;
+	return PJMEDIA_SDPNEG_EINVANSTP;
+    }
+
+    /* Media direction: */
+
+    if (local_m->desc.port == 0 || 
+	pj_inet_addr(&local_conn->addr).s_addr==0 ||
+	pj_inet_addr(&rem_conn->addr).s_addr==0 ||
+	pjmedia_sdp_media_find_attr(local_m, &STR_INACTIVE, NULL)!=NULL)
+    {
+	/* Inactive stream. */
+
+	si->dir = PJMEDIA_DIR_NONE;
+
+    } else if (pjmedia_sdp_media_find_attr(local_m, &STR_SENDONLY, NULL)!=NULL) {
+
+	/* Send only stream. */
+
+	si->dir = PJMEDIA_DIR_ENCODING;
+
+    } else if (pjmedia_sdp_media_find_attr(local_m, &STR_RECVONLY, NULL)!=NULL) {
+
+	/* Recv only stream. */
+
+	si->dir = PJMEDIA_DIR_DECODING;
+
+    } else {
+
+	/* Send and receive stream. */
+
+	si->dir = PJMEDIA_DIR_ENCODING_DECODING;
+
+    }
+
+
+    /* Set remote address: */
+    status = pj_sockaddr_in_init(&si->rem_addr, &rem_conn->addr, 
+				 rem_m->desc.port);
+    if (status != PJ_SUCCESS) {
+	/* Invalid IP address. */
+	return PJMEDIA_EINVALIDIP;
+    }
+
+    /* If "rtcp" attribute is present in the SDP, set the RTCP address
+     * from that attribute. Otherwise, calculate from RTP address.
+     */
+    attr = pjmedia_sdp_attr_find2(rem_m->attr_count, rem_m->attr,
+				  "rtcp", NULL);
+    if (attr) {
+	pjmedia_sdp_rtcp_attr rtcp;
+	status = pjmedia_sdp_attr_get_rtcp(attr, &rtcp);
+	if (status == PJ_SUCCESS) {
+	    if (rtcp.addr.slen) {
+		status = pj_sockaddr_in_init(&si->rem_rtcp, &rtcp.addr,
+					     (pj_uint16_t)rtcp.port);
+	    } else {
+		pj_sockaddr_in_init(&si->rem_rtcp, NULL, 
+				    (pj_uint16_t)rtcp.port);
+		si->rem_rtcp.sin_addr.s_addr = si->rem_addr.sin_addr.s_addr;
+	    }
+	}
+    }
+    
+    if (si->rem_rtcp.sin_addr.s_addr == 0) {
+	int rtcp_port;
+
+	pj_memcpy(&si->rem_rtcp, &si->rem_addr, sizeof(pj_sockaddr_in));
+	rtcp_port = pj_ntohs(si->rem_addr.sin_port) + 1;
+	si->rem_rtcp.sin_port = pj_htons((pj_uint16_t)rtcp_port);
+    }
+
+
+    /* Get the payload number for receive channel. */
+    /*
+       Previously we used to rely on fmt[0] being the selected codec,
+       but some UA sends telephone-event as fmt[0] and this would
+       cause assert failure below.
+
+       Thanks Chris Hamilton <chamilton .at. cs.dal.ca> for this patch.
+
+    // And codec must be numeric!
+    if (!pj_isdigit(*local_m->desc.fmt[0].ptr) || 
+	!pj_isdigit(*rem_m->desc.fmt[0].ptr))
+    {
+	return PJMEDIA_EINVALIDPT;
+    }
+
+    pt = pj_strtoul(&local_m->desc.fmt[0]);
+    pj_assert(PJMEDIA_RTP_PT_TELEPHONE_EVENTS==0 ||
+	      pt != PJMEDIA_RTP_PT_TELEPHONE_EVENTS);
+    */
+
+    /* This is to suppress MSVC warning about uninitialized var */
+    pt = 0;
+
+    /* Find the first codec which is not telephone-event */
+    for ( fmti = 0; fmti < local_m->desc.fmt_count; ++fmti ) {
+	if ( !pj_isdigit(*local_m->desc.fmt[fmti].ptr) )
+	    return PJMEDIA_EINVALIDPT;
+	pt = pj_strtoul(&local_m->desc.fmt[fmti]);
+	if ( PJMEDIA_RTP_PT_TELEPHONE_EVENTS == 0 ||
+		pt != PJMEDIA_RTP_PT_TELEPHONE_EVENTS )
+		break;
+    }
+    if ( fmti >= local_m->desc.fmt_count )
+	return PJMEDIA_EINVALIDPT;
+
+    /* Get codec info.
+     * For static payload types, get the info from codec manager.
+     * For dynamic payload types, MUST get the rtpmap.
+     */
+    if (pt < 96) {
+	pj_bool_t has_rtpmap;
+
+	rtpmap = NULL;
+	has_rtpmap = PJ_TRUE;
+
+	attr = pjmedia_sdp_media_find_attr(local_m, &ID_RTPMAP, 
+					   &local_m->desc.fmt[fmti]);
+	if (attr == NULL) {
+	    has_rtpmap = PJ_FALSE;
+	}
+	if (attr != NULL) {
+	    status = pjmedia_sdp_attr_to_rtpmap(pool, attr, &rtpmap);
+	    if (status != PJ_SUCCESS)
+		has_rtpmap = PJ_FALSE;
+	}
+
+	/* Build codec format info: */
+	if (has_rtpmap) {
+	    si->fmt.type = si->type;
+	    si->fmt.pt = pj_strtoul(&local_m->desc.fmt[fmti]);
+	    pj_strdup(pool, &si->fmt.encoding_name, &rtpmap->enc_name);
+	    si->fmt.clock_rate = rtpmap->clock_rate;
+	    
+	    /* For audio codecs, rtpmap parameters denotes the number of
+	     * channels.
+	     */
+	    if (si->type == PJMEDIA_TYPE_AUDIO && rtpmap->param.slen) {
+		
+		if (rtpmap->param.slen == 2) {
+		    si->fmt.channel_cnt = rtpmap->param.ptr[1] - '0';
+		} else {
+		    pj_str_t cnt;
+		    cnt.ptr = rtpmap->param.ptr + 1;
+		    cnt.slen = rtpmap->param.slen - 1;
+		    si->fmt.channel_cnt = (unsigned) pj_strtoul(&cnt);
+		}
+
+	    } else {
+		si->fmt.channel_cnt = 1;
+	    }
+
+	} else {	    
+	    const pjmedia_codec_info *p_info;
+
+	    status = pjmedia_codec_mgr_get_codec_info( mgr, pt, &p_info);
+	    if (status != PJ_SUCCESS)
+		return status;
+
+	    pj_memcpy(&si->fmt, p_info, sizeof(pjmedia_codec_info));
+	}
+
+	/* For static payload type, pt's are symetric */
+	si->tx_pt = pt;
+
+    } else {
+
+	attr = pjmedia_sdp_media_find_attr(local_m, &ID_RTPMAP, 
+					   &local_m->desc.fmt[fmti]);
+	if (attr == NULL)
+	    return PJMEDIA_EMISSINGRTPMAP;
+
+	status = pjmedia_sdp_attr_to_rtpmap(pool, attr, &rtpmap);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	/* Build codec format info: */
+
+	si->fmt.type = si->type;
+	si->fmt.pt = pj_strtoul(&local_m->desc.fmt[fmti]);
+	pj_strdup(pool, &si->fmt.encoding_name, &rtpmap->enc_name);
+	si->fmt.clock_rate = rtpmap->clock_rate;
+
+	/* For audio codecs, rtpmap parameters denotes the number of
+	 * channels.
+	 */
+	if (si->type == PJMEDIA_TYPE_AUDIO && rtpmap->param.slen) {
+	    
+	    if (rtpmap->param.slen == 2) {
+		si->fmt.channel_cnt = rtpmap->param.ptr[1] - '0';
+	    } else {
+		pj_str_t cnt;
+		cnt.ptr = rtpmap->param.ptr + 1;
+		cnt.slen = rtpmap->param.slen - 1;
+		si->fmt.channel_cnt = (unsigned) pj_strtoul(&cnt);
+	    }
+
+	} else {
+	    si->fmt.channel_cnt = 1;
+	}
+
+	/* Get fmtp mode= param in local SDP, if any */
+	get_fmtp_mode(local_m, &local_m->desc.fmt[fmti], &local_fmtp_mode);
+
+	/* Determine payload type for outgoing channel, by finding
+	 * dynamic payload type in remote SDP that matches the answer.
+	 */
+	si->tx_pt = 0xFFFF;
+	for (i=0; i<rem_m->desc.fmt_count; ++i) {
+	    unsigned rpt;
+	    pjmedia_sdp_attr *r_attr;
+	    pjmedia_sdp_rtpmap r_rtpmap;
+
+	    rpt = pj_strtoul(&rem_m->desc.fmt[i]);
+	    if (rpt < 96)
+		continue;
+
+	    r_attr = pjmedia_sdp_media_find_attr(rem_m, &ID_RTPMAP,
+						 &rem_m->desc.fmt[i]);
+	    if (!r_attr)
+		continue;
+
+	    if (pjmedia_sdp_attr_get_rtpmap(r_attr, &r_rtpmap) != PJ_SUCCESS)
+		continue;
+
+	    if (!pj_stricmp(&rtpmap->enc_name, &r_rtpmap.enc_name) &&
+		rtpmap->clock_rate == r_rtpmap.clock_rate)
+	    {
+		/* Found matched codec. */
+		si->tx_pt = rpt;
+
+		/* Get fmtp mode param in remote SDP, if any */
+		get_fmtp_mode(rem_m, &rtpmap->pt, &rem_fmtp_mode);
+
+		break;
+	    }
+	}
+
+	if (si->tx_pt == 0xFFFF)
+	    return PJMEDIA_EMISSINGRTPMAP;
+    }
+
+  
+    /* Now that we have codec info, get the codec param. */
+    si->param = pj_pool_alloc(pool, sizeof(*si->param));
+    status = pjmedia_codec_mgr_get_default_param(mgr, &si->fmt, si->param);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Set fmtp mode for both local and remote */
+    if (local_fmtp_mode != 0)
+	si->param->setting.dec_fmtp_mode = (pj_int8_t)local_fmtp_mode;
+    if (rem_fmtp_mode != 0)
+	si->param->setting.enc_fmtp_mode = (pj_int8_t)rem_fmtp_mode;
+
+
+    /* Get incomming payload type for telephone-events */
+    si->rx_event_pt = -1;
+    for (i=0; i<local_m->attr_count; ++i) {
+	pjmedia_sdp_rtpmap r;
+
+	attr = local_m->attr[i];
+	if (pj_strcmp(&attr->name, &ID_RTPMAP) != 0)
+	    continue;
+	if (pjmedia_sdp_attr_get_rtpmap(attr, &r) != PJ_SUCCESS)
+	    continue;
+	if (pj_strcmp(&r.enc_name, &ID_TELEPHONE_EVENT) == 0) {
+	    si->rx_event_pt = pj_strtoul(&r.pt);
+	    break;
+	}
+    }
+
+    /* Get outgoing payload type for telephone-events */
+    si->tx_event_pt = -1;
+    for (i=0; i<rem_m->attr_count; ++i) {
+	pjmedia_sdp_rtpmap r;
+
+	attr = rem_m->attr[i];
+	if (pj_strcmp(&attr->name, &ID_RTPMAP) != 0)
+	    continue;
+	if (pjmedia_sdp_attr_get_rtpmap(attr, &r) != PJ_SUCCESS)
+	    continue;
+	if (pj_strcmp(&r.enc_name, &ID_TELEPHONE_EVENT) == 0) {
+	    si->tx_event_pt = pj_strtoul(&r.pt);
+	    break;
+	}
+    }
+
+    /* Leave SSRC to random. */
+    si->ssrc = pj_rand();
+
+    /* Set default jitter buffer parameter. */
+    si->jb_init = si->jb_max = si->jb_min_pre = si->jb_max_pre = -1;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Initialize session info from SDP session descriptors.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_session_info_from_sdp( pj_pool_t *pool,
+			       pjmedia_endpt *endpt,
+			       unsigned max_streams,
+			       pjmedia_session_info *si,
+			       const pjmedia_sdp_session *local,
+			       const pjmedia_sdp_session *remote)
+{
+    unsigned i;
+
+    PJ_ASSERT_RETURN(pool && endpt && si && local && remote, PJ_EINVAL);
+
+    si->stream_cnt = max_streams;
+    if (si->stream_cnt > local->media_count)
+	si->stream_cnt = local->media_count;
+
+    for (i=0; i<si->stream_cnt; ++i) {
+	pj_status_t status;
+
+	status = pjmedia_stream_info_from_sdp( &si->stream_info[i], pool,
+					       endpt, 
+					       local, remote, i);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/**
+ * Create new session.
+ */
+PJ_DEF(pj_status_t) pjmedia_session_create( pjmedia_endpt *endpt, 
+					    const pjmedia_session_info *si,
+					    pjmedia_transport *transports[],
+					    void *user_data,
+					    pjmedia_session **p_session )
+{
+    pj_pool_t *pool;
+    pjmedia_session *session;
+    int i; /* Must be signed */
+    pj_status_t status;
+
+    /* Verify arguments. */
+    PJ_ASSERT_RETURN(endpt && si && p_session, PJ_EINVAL);
+
+    /* Create pool for the session. */
+    pool = pjmedia_endpt_create_pool( endpt, "session", 
+				      PJMEDIA_SESSION_SIZE, 
+				      PJMEDIA_SESSION_INC);
+    PJ_ASSERT_RETURN(pool != NULL, PJ_ENOMEM);
+
+    session = pj_pool_zalloc(pool, sizeof(pjmedia_session));
+    session->pool = pool;
+    session->endpt = endpt;
+    session->stream_cnt = si->stream_cnt;
+    session->user_data = user_data;
+
+    /* Copy stream info (this simple memcpy may break sometime) */
+    pj_memcpy(session->stream_info, si->stream_info,
+	      si->stream_cnt * sizeof(pjmedia_stream_info));
+
+    /*
+     * Now create and start the stream!
+     */
+    for (i=0; i<(int)si->stream_cnt; ++i) {
+
+	/* Create the stream */
+	status = pjmedia_stream_create(endpt, session->pool,
+				       &session->stream_info[i],
+				       (transports?transports[i]:NULL),
+				       session,
+				       &session->stream[i]);
+	if (status == PJ_SUCCESS)
+	    status = pjmedia_stream_start(session->stream[i]);
+
+	if (status != PJ_SUCCESS) {
+
+	    for ( --i; i>=0; ++i) {
+		pjmedia_stream_destroy(session->stream[i]);
+	    }
+
+	    pj_pool_release(session->pool);
+	    return status;
+	}
+    }
+
+
+    /* Done. */
+
+    *p_session = session;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get session info.
+ */
+PJ_DEF(pj_status_t) pjmedia_session_get_info( pjmedia_session *session,
+					      pjmedia_session_info *info )
+{
+    PJ_ASSERT_RETURN(session && info, PJ_EINVAL);
+
+    info->stream_cnt = session->stream_cnt;
+    pj_memcpy(info->stream_info, session->stream_info,
+	      session->stream_cnt * sizeof(pjmedia_stream_info));
+
+    return PJ_SUCCESS;
+}
+
+
+/**
+ * Destroy media session.
+ */
+PJ_DEF(pj_status_t) pjmedia_session_destroy (pjmedia_session *session)
+{
+    unsigned i;
+
+    PJ_ASSERT_RETURN(session, PJ_EINVAL);
+
+    for (i=0; i<session->stream_cnt; ++i) {
+	
+	pjmedia_stream_destroy(session->stream[i]);
+
+    }
+
+    pj_pool_release (session->pool);
+
+    return PJ_SUCCESS;
+}
+
+
+/**
+ * Activate all stream in media session.
+ *
+ */
+PJ_DEF(pj_status_t) pjmedia_session_resume(pjmedia_session *session,
+					   pjmedia_dir dir)
+{
+    unsigned i;
+
+    PJ_ASSERT_RETURN(session, PJ_EINVAL);
+
+    for (i=0; i<session->stream_cnt; ++i) {
+	pjmedia_session_resume_stream(session, i, dir);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/**
+ * Suspend receipt and transmission of all stream in media session.
+ *
+ */
+PJ_DEF(pj_status_t) pjmedia_session_pause(pjmedia_session *session,
+					  pjmedia_dir dir)
+{
+    unsigned i;
+
+    PJ_ASSERT_RETURN(session, PJ_EINVAL);
+
+    for (i=0; i<session->stream_cnt; ++i) {
+	pjmedia_session_pause_stream(session, i, dir);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/**
+ * Suspend receipt and transmission of individual stream in media session.
+ */
+PJ_DEF(pj_status_t) pjmedia_session_pause_stream( pjmedia_session *session,
+						  unsigned index,
+						  pjmedia_dir dir)
+{
+    PJ_ASSERT_RETURN(session && index < session->stream_cnt, PJ_EINVAL);
+
+    return pjmedia_stream_pause(session->stream[index], dir);
+}
+
+
+/**
+ * Activate individual stream in media session.
+ *
+ */
+PJ_DEF(pj_status_t) pjmedia_session_resume_stream( pjmedia_session *session,
+						   unsigned index,
+						   pjmedia_dir dir)
+{
+    PJ_ASSERT_RETURN(session && index < session->stream_cnt, PJ_EINVAL);
+
+    return pjmedia_stream_resume(session->stream[index], dir);
+}
+
+/**
+ * Enumerate media stream in the session.
+ */
+PJ_DEF(pj_status_t) pjmedia_session_enum_streams(const pjmedia_session *session,
+						 unsigned *count, 
+						 pjmedia_stream_info info[])
+{
+    unsigned i;
+
+    PJ_ASSERT_RETURN(session && count && *count && info, PJ_EINVAL);
+
+    if (*count > session->stream_cnt)
+	*count = session->stream_cnt;
+
+    for (i=0; i<*count; ++i) {
+	pj_memcpy(&info[i], &session->stream[i], sizeof(pjmedia_stream_info));
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get the port interface.
+ */
+PJ_DEF(pj_status_t) pjmedia_session_get_port(  pjmedia_session *session,
+					       unsigned index,
+					       pjmedia_port **p_port)
+{
+    return pjmedia_stream_get_port( session->stream[index], p_port);
+}
+
+/*
+ * Get statistics
+ */
+PJ_DEF(pj_status_t) pjmedia_session_get_stream_stat( pjmedia_session *session,
+						     unsigned index,
+						     pjmedia_rtcp_stat *stat)
+{
+    PJ_ASSERT_RETURN(session && stat && index < session->stream_cnt, 
+		     PJ_EINVAL);
+
+    return pjmedia_stream_get_stat(session->stream[index], stat);
+}
+
+
+/*
+ * Dial DTMF digit to the stream, using RFC 2833 mechanism.
+ */
+PJ_DEF(pj_status_t) pjmedia_session_dial_dtmf( pjmedia_session *session,
+					       unsigned index,
+					       const pj_str_t *ascii_digits )
+{
+    PJ_ASSERT_RETURN(session && ascii_digits, PJ_EINVAL);
+    return pjmedia_stream_dial_dtmf(session->stream[index], ascii_digits);
+}
+
+/*
+ * Check if the specified stream has received DTMF digits.
+ */
+PJ_DEF(pj_status_t) pjmedia_session_check_dtmf( pjmedia_session *session,
+					        unsigned index )
+{
+    PJ_ASSERT_RETURN(session, PJ_EINVAL);
+    return pjmedia_stream_check_dtmf(session->stream[index]);
+}
+
+
+/*
+ * Retrieve DTMF digits from the specified stream.
+ */
+PJ_DEF(pj_status_t) pjmedia_session_get_dtmf( pjmedia_session *session,
+					      unsigned index,
+					      char *ascii_digits,
+					      unsigned *size )
+{
+    PJ_ASSERT_RETURN(session && ascii_digits && size, PJ_EINVAL);
+    return pjmedia_stream_get_dtmf(session->stream[index], ascii_digits,
+				   size);
+}
+
+/*
+ * Install DTMF callback.
+ */
+PJ_DEF(pj_status_t)
+pjmedia_session_set_dtmf_callback(pjmedia_session *session,
+				  unsigned index,
+				  void (*cb)(pjmedia_stream*, 
+				 	     void *user_data, 
+					     int digit), 
+				  void *user_data)
+{
+    PJ_ASSERT_RETURN(session && index < session->stream_cnt, PJ_EINVAL);
+    return pjmedia_stream_set_dtmf_callback(session->stream[index], cb,
+					    user_data);
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/silencedet.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/silencedet.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/silencedet.c	(revision 1163)
@@ -0,0 +1,308 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/silencedet.h>
+#include <pjmedia/alaw_ulaw.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+
+
+#define THIS_FILE   "silencedet.c"
+
+typedef enum pjmedia_silence_det_mode {
+    VAD_MODE_NONE,
+    VAD_MODE_FIXED,
+    VAD_MODE_ADAPTIVE
+} pjmedia_silence_det_mode;
+
+
+
+/**
+ * This structure holds the silence detector state.
+ */
+struct pjmedia_silence_det
+{
+    char      objname[PJ_MAX_OBJ_NAME]; /**< VAD name.			    */
+
+    int	      mode;		/**< VAD mode.				    */
+    unsigned  ptime;		/**< Frame time, in msec.		    */
+
+    unsigned  min_signal_cnt;	/**< # of signal frames.before talk burst   */
+    unsigned  min_silence_cnt;	/**< # of silence frames before silence.    */
+    unsigned  recalc_cnt;	/**< # of frames before adaptive recalc.    */
+
+    pj_bool_t in_talk;		/**< In talk burst?			    */
+    unsigned  cur_cnt;		/**< # of frames in current mode.	    */
+    unsigned  signal_cnt;	/**< # of signal frames received.	    */
+    unsigned  silence_cnt;	/**< # of silence frames received	    */
+    unsigned  cur_threshold;	/**< Current silence threshold.		    */
+    unsigned  weakest_signal;	/**< Weakest signal detected.		    */
+    unsigned  loudest_silence;	/**< Loudest silence detected.		    */
+};
+
+
+
+PJ_DEF(pj_status_t) pjmedia_silence_det_create( pj_pool_t *pool,
+						unsigned clock_rate,
+						unsigned samples_per_frame,
+						pjmedia_silence_det **p_sd)
+{
+    pjmedia_silence_det *sd;
+
+    PJ_ASSERT_RETURN(pool && p_sd, PJ_EINVAL);
+
+    sd = pj_pool_zalloc(pool, sizeof(struct pjmedia_silence_det));
+
+    pj_ansi_strncpy(sd->objname, THIS_FILE, PJ_MAX_OBJ_NAME);
+    sd->objname[PJ_MAX_OBJ_NAME-1] = '\0';
+
+    sd->ptime = samples_per_frame * 1000 / clock_rate;
+    sd->signal_cnt = 0;
+    sd->silence_cnt = 0;
+    sd->weakest_signal = 0xFFFFFFFFUL;
+    sd->loudest_silence = 0;
+     
+    /* Default settings */
+    pjmedia_silence_det_set_params(sd, -1, -1, -1);
+
+    /* Restart in fixed, silent mode */
+    sd->in_talk = PJ_FALSE;
+    pjmedia_silence_det_set_adaptive( sd, -1 );
+
+    *p_sd = sd;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_silence_det_set_name( pjmedia_silence_det *sd,
+						  const char *name)
+{
+    PJ_ASSERT_RETURN(sd && name, PJ_EINVAL);
+
+    pj_ansi_snprintf(sd->objname, PJ_MAX_OBJ_NAME, name, sd);
+    sd->objname[PJ_MAX_OBJ_NAME-1] = '\0';
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_silence_det_set_adaptive(pjmedia_silence_det *sd,
+						     int threshold)
+{
+    PJ_ASSERT_RETURN(sd, PJ_EINVAL);
+
+    if (threshold < 0)
+	threshold = PJMEDIA_SILENCE_DET_THRESHOLD;
+
+    sd->mode = VAD_MODE_ADAPTIVE;
+    sd->cur_threshold = threshold;
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjmedia_silence_det_set_fixed( pjmedia_silence_det *sd,
+						   int threshold )
+{
+    PJ_ASSERT_RETURN(sd, PJ_EINVAL);
+
+    if (threshold < 0)
+	threshold = PJMEDIA_SILENCE_DET_THRESHOLD;
+
+    sd->mode = VAD_MODE_FIXED;
+    sd->cur_threshold = threshold;
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjmedia_silence_det_set_params( pjmedia_silence_det *sd,
+						    int min_silence,
+						    int min_signal,
+						    int recalc_time)
+{
+    PJ_ASSERT_RETURN(sd, PJ_EINVAL);
+
+    if (min_silence == -1)
+	min_silence = 500;
+    if (min_signal < 0)
+	min_signal = sd->ptime;
+    if (recalc_time < 0)
+	recalc_time = 2000;
+
+    sd->min_signal_cnt = min_signal / sd->ptime;
+    sd->min_silence_cnt = min_silence / sd->ptime;
+    sd->recalc_cnt = recalc_time / sd->ptime;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_silence_det_disable( pjmedia_silence_det *sd )
+{
+    PJ_ASSERT_RETURN(sd, PJ_EINVAL);
+
+    sd->mode = VAD_MODE_NONE;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_int32_t) pjmedia_calc_avg_signal( const pj_int16_t samples[],
+					    pj_size_t count)
+{
+    pj_uint32_t sum = 0;
+    
+    const pj_int16_t * pcm = samples;
+    const pj_int16_t * end = samples + count;
+
+    if (count==0)
+	return 0;
+
+    while (pcm != end) {
+	if (*pcm < 0)
+	    sum -= *pcm++;
+	else
+	    sum += *pcm++;
+    }
+    
+    return (pj_int32_t)(sum / count);
+}
+
+PJ_DEF(pj_bool_t) pjmedia_silence_det_apply( pjmedia_silence_det *sd,
+					     pj_uint32_t level)
+{
+    pj_bool_t have_signal;
+
+    /* Always return false if VAD is disabled */
+    if (sd->mode == VAD_MODE_NONE)
+	return PJ_FALSE;
+
+    /* Convert PCM level to ulaw */
+    level = pjmedia_linear2ulaw(level) ^ 0xff;
+    
+    /* Do we have signal? */
+    have_signal = level > sd->cur_threshold;
+    
+    /* We we're in transition between silence and signel, increment the 
+     * current frame counter. We will only switch mode when we have enough
+     * frames.
+     */
+    if (sd->in_talk != have_signal) {
+	unsigned limit;
+
+	sd->cur_cnt++;
+
+	limit = (sd->in_talk ? sd->min_silence_cnt : 
+				sd->min_signal_cnt);
+
+	if (sd->cur_cnt > limit) {
+
+	    /* Swap mode */
+	    sd->in_talk = !sd->in_talk;
+	    
+	    /* Restart adaptive cur_threshold measurements */
+	    sd->weakest_signal = 0xFFFFFFFFUL;
+	    sd->loudest_silence = 0;
+	    sd->signal_cnt = 0;
+	    sd->silence_cnt = 0;
+	    sd->cur_cnt = 0;
+	}
+
+    } else {
+	/* Reset frame count */
+	sd->cur_cnt = 0;
+    }
+    
+
+    /* Count the number of silent and signal frames and calculate min/max */
+    if (have_signal) {
+	if (level < sd->weakest_signal)
+	    sd->weakest_signal = level;
+	sd->signal_cnt++;
+    }
+    else {
+	if (level > sd->loudest_silence)
+	    sd->loudest_silence = level;
+	sd->silence_cnt++;
+    }
+
+    /* See if we have had enough frames to look at proportions of 
+     * silence/signal frames.
+     */
+    if ((sd->signal_cnt + sd->silence_cnt) > sd->recalc_cnt) {
+	
+	if (sd->mode == VAD_MODE_ADAPTIVE) {
+	    pj_bool_t updated = PJ_TRUE;
+	    unsigned pct_signal, new_threshold = sd->cur_threshold;
+
+	    /* Get percentage of signal */
+	    pct_signal = sd->signal_cnt * 100 / 
+		        (sd->signal_cnt + sd->silence_cnt);
+
+	    /* Adjust according to signal/silence proportions. */
+	    if (pct_signal > 95) {
+		new_threshold += (sd->weakest_signal+1 - sd->cur_threshold)/2;
+	    } else if (pct_signal < 5) {
+		new_threshold = (sd->cur_threshold+sd->loudest_silence)/2+1;
+	    } else if (pct_signal > 80) {
+		new_threshold++;
+	    } else if (pct_signal < 10) {
+		new_threshold--;
+	    } else {
+		updated = PJ_FALSE;
+	    }
+
+	    if (updated && sd->cur_threshold != new_threshold) {
+		PJ_LOG(5,(sd->objname, 
+			  "Vad cur_threshold updated %d-->%d. "
+			  "Signal lo=%d",
+			  sd->cur_threshold, new_threshold,
+			  sd->weakest_signal));
+		sd->cur_threshold = new_threshold;
+	    }
+	}
+
+	/* Reset. */
+	sd->weakest_signal = 0xFFFFFFFFUL;
+	sd->loudest_silence = 0;
+	sd->signal_cnt = 0;
+	sd->silence_cnt = 0;
+    }
+    
+    return !sd->in_talk;
+
+}
+
+
+PJ_DEF(pj_bool_t) pjmedia_silence_det_detect( pjmedia_silence_det *sd,
+					      const pj_int16_t samples[],
+					      pj_size_t count,
+					      pj_int32_t *p_level)
+{
+    pj_uint32_t level;
+    
+    /* Calculate average signal level. */
+    level = pjmedia_calc_avg_signal(samples, count);
+    
+    /* Report to caller, if required. */
+    if (p_level)
+	*p_level = level;
+
+    return pjmedia_silence_det_apply(sd, level);
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/smallfilter.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/smallfilter.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/smallfilter.h	(revision 1163)
@@ -0,0 +1,4617 @@
+/* Included by resamplesubs.c */
+#define SMALL_FILTER_NMULT ((RES_HWORD)13)
+#define SMALL_FILTER_SCALE 13128 /* Unity-gain scale factor */
+#define SMALL_FILTER_NWING 1536 /* Filter table length */
+static const RES_HWORD SMALL_FILTER_IMP[] /* Impulse response */ = {
+32767,
+32766,
+32764,
+32760,
+32755,
+32749,
+32741,
+32731,
+32721,
+32708,
+32695,
+32679,
+32663,
+32645,
+32625,
+32604,
+32582,
+32558,
+32533,
+32506,
+32478,
+32448,
+32417,
+32385,
+32351,
+32316,
+32279,
+32241,
+32202,
+32161,
+32119,
+32075,
+32030,
+31984,
+31936,
+31887,
+31836,
+31784,
+31731,
+31676,
+31620,
+31563,
+31504,
+31444,
+31383,
+31320,
+31256,
+31191,
+31124,
+31056,
+30987,
+30916,
+30845,
+30771,
+30697,
+30621,
+30544,
+30466,
+30387,
+30306,
+30224,
+30141,
+30057,
+29971,
+29884,
+29796,
+29707,
+29617,
+29525,
+29433,
+29339,
+29244,
+29148,
+29050,
+28952,
+28852,
+28752,
+28650,
+28547,
+28443,
+28338,
+28232,
+28125,
+28017,
+27908,
+27797,
+27686,
+27574,
+27461,
+27346,
+27231,
+27115,
+26998,
+26879,
+26760,
+26640,
+26519,
+26398,
+26275,
+26151,
+26027,
+25901,
+25775,
+25648,
+25520,
+25391,
+25262,
+25131,
+25000,
+24868,
+24735,
+24602,
+24467,
+24332,
+24197,
+24060,
+23923,
+23785,
+23647,
+23507,
+23368,
+23227,
+23086,
+22944,
+22802,
+22659,
+22515,
+22371,
+22226,
+22081,
+21935,
+21789,
+21642,
+21494,
+21346,
+21198,
+21049,
+20900,
+20750,
+20600,
+20449,
+20298,
+20146,
+19995,
+19842,
+19690,
+19537,
+19383,
+19230,
+19076,
+18922,
+18767,
+18612,
+18457,
+18302,
+18146,
+17990,
+17834,
+17678,
+17521,
+17365,
+17208,
+17051,
+16894,
+16737,
+16579,
+16422,
+16264,
+16106,
+15949,
+15791,
+15633,
+15475,
+15317,
+15159,
+15001,
+14843,
+14685,
+14527,
+14369,
+14212,
+14054,
+13896,
+13739,
+13581,
+13424,
+13266,
+13109,
+12952,
+12795,
+12639,
+12482,
+12326,
+12170,
+12014,
+11858,
+11703,
+11548,
+11393,
+11238,
+11084,
+10929,
+10776,
+10622,
+10469,
+10316,
+10164,
+10011,
+9860,
+9708,
+9557,
+9407,
+9256,
+9106,
+8957,
+8808,
+8659,
+8511,
+8364,
+8216,
+8070,
+7924,
+7778,
+7633,
+7488,
+7344,
+7200,
+7057,
+6914,
+6773,
+6631,
+6490,
+6350,
+6210,
+6071,
+5933,
+5795,
+5658,
+5521,
+5385,
+5250,
+5115,
+4981,
+4848,
+4716,
+4584,
+4452,
+4322,
+4192,
+4063,
+3935,
+3807,
+3680,
+3554,
+3429,
+3304,
+3180,
+3057,
+2935,
+2813,
+2692,
+2572,
+2453,
+2335,
+2217,
+2101,
+1985,
+1870,
+1755,
+1642,
+1529,
+1418,
+1307,
+1197,
+1088,
+979,
+872,
+765,
+660,
+555,
+451,
+348,
+246,
+145,
+44,
+-54,
+-153,
+-250,
+-347,
+-443,
+-537,
+-631,
+-724,
+-816,
+-908,
+-998,
+-1087,
+-1175,
+-1263,
+-1349,
+-1435,
+-1519,
+-1603,
+-1685,
+-1767,
+-1848,
+-1928,
+-2006,
+-2084,
+-2161,
+-2237,
+-2312,
+-2386,
+-2459,
+-2531,
+-2603,
+-2673,
+-2742,
+-2810,
+-2878,
+-2944,
+-3009,
+-3074,
+-3137,
+-3200,
+-3261,
+-3322,
+-3381,
+-3440,
+-3498,
+-3554,
+-3610,
+-3665,
+-3719,
+-3772,
+-3824,
+-3875,
+-3925,
+-3974,
+-4022,
+-4069,
+-4116,
+-4161,
+-4205,
+-4249,
+-4291,
+-4333,
+-4374,
+-4413,
+-4452,
+-4490,
+-4527,
+-4563,
+-4599,
+-4633,
+-4666,
+-4699,
+-4730,
+-4761,
+-4791,
+-4820,
+-4848,
+-4875,
+-4901,
+-4926,
+-4951,
+-4974,
+-4997,
+-5019,
+-5040,
+-5060,
+-5080,
+-5098,
+-5116,
+-5133,
+-5149,
+-5164,
+-5178,
+-5192,
+-5205,
+-5217,
+-5228,
+-5238,
+-5248,
+-5257,
+-5265,
+-5272,
+-5278,
+-5284,
+-5289,
+-5293,
+-5297,
+-5299,
+-5301,
+-5303,
+-5303,
+-5303,
+-5302,
+-5300,
+-5298,
+-5295,
+-5291,
+-5287,
+-5282,
+-5276,
+-5270,
+-5263,
+-5255,
+-5246,
+-5237,
+-5228,
+-5217,
+-5206,
+-5195,
+-5183,
+-5170,
+-5157,
+-5143,
+-5128,
+-5113,
+-5097,
+-5081,
+-5064,
+-5047,
+-5029,
+-5010,
+-4991,
+-4972,
+-4952,
+-4931,
+-4910,
+-4889,
+-4867,
+-4844,
+-4821,
+-4797,
+-4774,
+-4749,
+-4724,
+-4699,
+-4673,
+-4647,
+-4620,
+-4593,
+-4566,
+-4538,
+-4510,
+-4481,
+-4452,
+-4422,
+-4393,
+-4363,
+-4332,
+-4301,
+-4270,
+-4238,
+-4206,
+-4174,
+-4142,
+-4109,
+-4076,
+-4042,
+-4009,
+-3975,
+-3940,
+-3906,
+-3871,
+-3836,
+-3801,
+-3765,
+-3729,
+-3693,
+-3657,
+-3620,
+-3584,
+-3547,
+-3510,
+-3472,
+-3435,
+-3397,
+-3360,
+-3322,
+-3283,
+-3245,
+-3207,
+-3168,
+-3129,
+-3091,
+-3052,
+-3013,
+-2973,
+-2934,
+-2895,
+-2855,
+-2816,
+-2776,
+-2736,
+-2697,
+-2657,
+-2617,
+-2577,
+-2537,
+-2497,
+-2457,
+-2417,
+-2377,
+-2337,
+-2297,
+-2256,
+-2216,
+-2176,
+-2136,
+-2096,
+-2056,
+-2016,
+-1976,
+-1936,
+-1896,
+-1856,
+-1817,
+-1777,
+-1737,
+-1698,
+-1658,
+-1619,
+-1579,
+-1540,
+-1501,
+-1462,
+-1423,
+-1384,
+-1345,
+-1306,
+-1268,
+-1230,
+-1191,
+-1153,
+-1115,
+-1077,
+-1040,
+-1002,
+-965,
+-927,
+-890,
+-854,
+-817,
+-780,
+-744,
+-708,
+-672,
+-636,
+-600,
+-565,
+-530,
+-494,
+-460,
+-425,
+-391,
+-356,
+-322,
+-289,
+-255,
+-222,
+-189,
+-156,
+-123,
+-91,
+-59,
+-27,
+4,
+35,
+66,
+97,
+127,
+158,
+188,
+218,
+247,
+277,
+306,
+334,
+363,
+391,
+419,
+447,
+474,
+501,
+528,
+554,
+581,
+606,
+632,
+657,
+683,
+707,
+732,
+756,
+780,
+803,
+827,
+850,
+872,
+895,
+917,
+939,
+960,
+981,
+1002,
+1023,
+1043,
+1063,
+1082,
+1102,
+1121,
+1139,
+1158,
+1176,
+1194,
+1211,
+1228,
+1245,
+1262,
+1278,
+1294,
+1309,
+1325,
+1340,
+1354,
+1369,
+1383,
+1397,
+1410,
+1423,
+1436,
+1448,
+1461,
+1473,
+1484,
+1496,
+1507,
+1517,
+1528,
+1538,
+1548,
+1557,
+1566,
+1575,
+1584,
+1592,
+1600,
+1608,
+1616,
+1623,
+1630,
+1636,
+1643,
+1649,
+1654,
+1660,
+1665,
+1670,
+1675,
+1679,
+1683,
+1687,
+1690,
+1694,
+1697,
+1700,
+1702,
+1704,
+1706,
+1708,
+1709,
+1711,
+1712,
+1712,
+1713,
+1713,
+1713,
+1713,
+1712,
+1711,
+1710,
+1709,
+1708,
+1706,
+1704,
+1702,
+1700,
+1697,
+1694,
+1691,
+1688,
+1685,
+1681,
+1677,
+1673,
+1669,
+1664,
+1660,
+1655,
+1650,
+1644,
+1639,
+1633,
+1627,
+1621,
+1615,
+1609,
+1602,
+1596,
+1589,
+1582,
+1575,
+1567,
+1560,
+1552,
+1544,
+1536,
+1528,
+1520,
+1511,
+1503,
+1494,
+1485,
+1476,
+1467,
+1458,
+1448,
+1439,
+1429,
+1419,
+1409,
+1399,
+1389,
+1379,
+1368,
+1358,
+1347,
+1337,
+1326,
+1315,
+1304,
+1293,
+1282,
+1271,
+1260,
+1248,
+1237,
+1225,
+1213,
+1202,
+1190,
+1178,
+1166,
+1154,
+1142,
+1130,
+1118,
+1106,
+1094,
+1081,
+1069,
+1057,
+1044,
+1032,
+1019,
+1007,
+994,
+981,
+969,
+956,
+943,
+931,
+918,
+905,
+892,
+879,
+867,
+854,
+841,
+828,
+815,
+802,
+790,
+777,
+764,
+751,
+738,
+725,
+713,
+700,
+687,
+674,
+662,
+649,
+636,
+623,
+611,
+598,
+585,
+573,
+560,
+548,
+535,
+523,
+510,
+498,
+486,
+473,
+461,
+449,
+437,
+425,
+413,
+401,
+389,
+377,
+365,
+353,
+341,
+330,
+318,
+307,
+295,
+284,
+272,
+261,
+250,
+239,
+228,
+217,
+206,
+195,
+184,
+173,
+163,
+152,
+141,
+131,
+121,
+110,
+100,
+90,
+80,
+70,
+60,
+51,
+41,
+31,
+22,
+12,
+3,
+-5,
+-14,
+-23,
+-32,
+-41,
+-50,
+-59,
+-67,
+-76,
+-84,
+-93,
+-101,
+-109,
+-117,
+-125,
+-133,
+-140,
+-148,
+-156,
+-163,
+-170,
+-178,
+-185,
+-192,
+-199,
+-206,
+-212,
+-219,
+-226,
+-232,
+-239,
+-245,
+-251,
+-257,
+-263,
+-269,
+-275,
+-280,
+-286,
+-291,
+-297,
+-302,
+-307,
+-312,
+-317,
+-322,
+-327,
+-332,
+-336,
+-341,
+-345,
+-349,
+-354,
+-358,
+-362,
+-366,
+-369,
+-373,
+-377,
+-380,
+-384,
+-387,
+-390,
+-394,
+-397,
+-400,
+-402,
+-405,
+-408,
+-411,
+-413,
+-416,
+-418,
+-420,
+-422,
+-424,
+-426,
+-428,
+-430,
+-432,
+-433,
+-435,
+-436,
+-438,
+-439,
+-440,
+-442,
+-443,
+-444,
+-445,
+-445,
+-446,
+-447,
+-447,
+-448,
+-448,
+-449,
+-449,
+-449,
+-449,
+-449,
+-449,
+-449,
+-449,
+-449,
+-449,
+-449,
+-448,
+-448,
+-447,
+-447,
+-446,
+-445,
+-444,
+-443,
+-443,
+-442,
+-441,
+-440,
+-438,
+-437,
+-436,
+-435,
+-433,
+-432,
+-430,
+-429,
+-427,
+-426,
+-424,
+-422,
+-420,
+-419,
+-417,
+-415,
+-413,
+-411,
+-409,
+-407,
+-405,
+-403,
+-400,
+-398,
+-396,
+-393,
+-391,
+-389,
+-386,
+-384,
+-381,
+-379,
+-376,
+-374,
+-371,
+-368,
+-366,
+-363,
+-360,
+-357,
+-355,
+-352,
+-349,
+-346,
+-343,
+-340,
+-337,
+-334,
+-331,
+-328,
+-325,
+-322,
+-319,
+-316,
+-313,
+-310,
+-307,
+-304,
+-301,
+-298,
+-294,
+-291,
+-288,
+-285,
+-282,
+-278,
+-275,
+-272,
+-269,
+-265,
+-262,
+-259,
+-256,
+-252,
+-249,
+-246,
+-243,
+-239,
+-236,
+-233,
+-230,
+-226,
+-223,
+-220,
+-217,
+-213,
+-210,
+-207,
+-204,
+-200,
+-197,
+-194,
+-191,
+-187,
+-184,
+-181,
+-178,
+-175,
+-172,
+-168,
+-165,
+-162,
+-159,
+-156,
+-153,
+-150,
+-147,
+-143,
+-140,
+-137,
+-134,
+-131,
+-128,
+-125,
+-122,
+-120,
+-117,
+-114,
+-111,
+-108,
+-105,
+-102,
+-99,
+-97,
+-94,
+-91,
+-88,
+-86,
+-83,
+-80,
+-78,
+-75,
+-72,
+-70,
+-67,
+-65,
+-62,
+-59,
+-57,
+-55,
+-52,
+-50,
+-47,
+-45,
+-43,
+-40,
+-38,
+-36,
+-33,
+-31,
+-29,
+-27,
+-25,
+-22,
+-20,
+-18,
+-16,
+-14,
+-12,
+-10,
+-8,
+-6,
+-4,
+-2,
+0,
+0,
+2,
+4,
+6,
+8,
+9,
+11,
+13,
+14,
+16,
+17,
+19,
+21,
+22,
+24,
+25,
+27,
+28,
+29,
+31,
+32,
+33,
+35,
+36,
+37,
+38,
+40,
+41,
+42,
+43,
+44,
+45,
+46,
+47,
+48,
+49,
+50,
+51,
+52,
+53,
+54,
+55,
+56,
+56,
+57,
+58,
+59,
+59,
+60,
+61,
+62,
+62,
+63,
+63,
+64,
+64,
+65,
+66,
+66,
+66,
+67,
+67,
+68,
+68,
+69,
+69,
+69,
+70,
+70,
+70,
+70,
+71,
+71,
+71,
+71,
+71,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+72,
+71,
+71,
+71,
+71,
+71,
+70,
+70,
+70,
+70,
+69,
+69,
+69,
+69,
+68,
+68,
+68,
+67,
+67,
+67,
+66,
+66,
+66,
+65,
+65,
+64,
+64,
+64,
+63,
+63,
+62,
+62,
+62,
+61,
+61,
+60,
+60,
+59,
+59,
+58,
+58,
+58,
+57,
+57,
+56,
+56,
+55,
+55,
+54,
+54,
+53,
+53,
+52,
+52,
+51,
+51,
+50,
+50,
+49,
+48,
+48,
+47,
+47,
+46,
+46,
+45,
+45,
+44,
+44,
+43,
+43,
+42,
+42,
+41,
+41,
+40,
+39,
+39,
+38,
+38,
+37,
+37,
+36,
+36,
+35,
+35,
+34,
+34,
+33,
+33,
+32,
+32,
+31,
+31,
+30,
+30,
+29,
+29,
+28,
+28,
+27,
+27,
+26,
+26,
+25,
+25,
+24,
+24,
+23,
+23,
+23,
+22,
+22,
+21,
+21,
+20,
+20,
+20,
+19,
+19,
+18,
+18,
+17,
+17,
+17,
+16,
+16,
+15,
+15,
+15,
+14,
+14,
+14,
+13,
+13,
+12,
+12,
+12,
+11,
+11,
+11,
+10,
+10,
+10,
+9,
+9,
+9,
+9,
+8,
+8,
+8,
+7,
+7,
+7,
+7,
+6,
+6,
+6,
+6,
+5,
+5,
+5,
+5,
+4,
+4,
+4,
+4,
+3,
+3,
+3,
+3,
+3,
+2,
+2,
+2,
+2,
+2,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1,
+-1
+};
+
+static const RES_HWORD SMALL_FILTER_IMPD[] = {
+-1,
+-2,
+-4,
+-5,
+-6,
+-8,
+-10,
+-10,
+-13,
+-13,
+-16,
+-16,
+-18,
+-20,
+-21,
+-22,
+-24,
+-25,
+-27,
+-28,
+-30,
+-31,
+-32,
+-34,
+-35,
+-37,
+-38,
+-39,
+-41,
+-42,
+-44,
+-45,
+-46,
+-48,
+-49,
+-51,
+-52,
+-53,
+-55,
+-56,
+-57,
+-59,
+-60,
+-61,
+-63,
+-64,
+-65,
+-67,
+-68,
+-69,
+-71,
+-71,
+-74,
+-74,
+-76,
+-77,
+-78,
+-79,
+-81,
+-82,
+-83,
+-84,
+-86,
+-87,
+-88,
+-89,
+-90,
+-92,
+-92,
+-94,
+-95,
+-96,
+-98,
+-98,
+-100,
+-100,
+-102,
+-103,
+-104,
+-105,
+-106,
+-107,
+-108,
+-109,
+-111,
+-111,
+-112,
+-113,
+-115,
+-115,
+-116,
+-117,
+-119,
+-119,
+-120,
+-121,
+-121,
+-123,
+-124,
+-124,
+-126,
+-126,
+-127,
+-128,
+-129,
+-129,
+-131,
+-131,
+-132,
+-133,
+-133,
+-135,
+-135,
+-135,
+-137,
+-137,
+-138,
+-138,
+-140,
+-139,
+-141,
+-141,
+-142,
+-142,
+-143,
+-144,
+-144,
+-145,
+-145,
+-146,
+-146,
+-147,
+-148,
+-148,
+-148,
+-149,
+-149,
+-150,
+-150,
+-151,
+-151,
+-152,
+-151,
+-153,
+-152,
+-153,
+-154,
+-153,
+-154,
+-154,
+-155,
+-155,
+-155,
+-155,
+-156,
+-156,
+-156,
+-156,
+-157,
+-156,
+-157,
+-157,
+-157,
+-157,
+-158,
+-157,
+-158,
+-158,
+-157,
+-158,
+-158,
+-158,
+-158,
+-158,
+-158,
+-158,
+-158,
+-158,
+-158,
+-157,
+-158,
+-158,
+-157,
+-158,
+-157,
+-158,
+-157,
+-157,
+-157,
+-156,
+-157,
+-156,
+-156,
+-156,
+-156,
+-155,
+-155,
+-155,
+-155,
+-154,
+-155,
+-153,
+-154,
+-153,
+-153,
+-152,
+-153,
+-151,
+-152,
+-151,
+-150,
+-151,
+-150,
+-149,
+-149,
+-149,
+-148,
+-147,
+-148,
+-146,
+-146,
+-146,
+-145,
+-145,
+-144,
+-144,
+-143,
+-143,
+-141,
+-142,
+-141,
+-140,
+-140,
+-139,
+-138,
+-138,
+-137,
+-137,
+-136,
+-135,
+-135,
+-134,
+-133,
+-132,
+-132,
+-132,
+-130,
+-130,
+-129,
+-128,
+-128,
+-127,
+-126,
+-125,
+-125,
+-124,
+-123,
+-122,
+-122,
+-121,
+-120,
+-119,
+-118,
+-118,
+-116,
+-116,
+-115,
+-115,
+-113,
+-113,
+-111,
+-111,
+-110,
+-109,
+-109,
+-107,
+-107,
+-105,
+-105,
+-104,
+-103,
+-102,
+-101,
+-101,
+-98,
+-99,
+-97,
+-97,
+-96,
+-94,
+-94,
+-93,
+-92,
+-92,
+-90,
+-89,
+-88,
+-88,
+-86,
+-86,
+-84,
+-84,
+-82,
+-82,
+-81,
+-80,
+-78,
+-78,
+-77,
+-76,
+-75,
+-74,
+-73,
+-72,
+-72,
+-70,
+-69,
+-68,
+-68,
+-66,
+-65,
+-65,
+-63,
+-63,
+-61,
+-61,
+-59,
+-59,
+-58,
+-56,
+-56,
+-55,
+-54,
+-53,
+-52,
+-51,
+-50,
+-49,
+-48,
+-47,
+-47,
+-45,
+-44,
+-44,
+-42,
+-42,
+-41,
+-39,
+-39,
+-38,
+-37,
+-36,
+-36,
+-34,
+-33,
+-33,
+-31,
+-31,
+-30,
+-29,
+-28,
+-27,
+-26,
+-25,
+-25,
+-23,
+-23,
+-22,
+-21,
+-20,
+-20,
+-18,
+-18,
+-17,
+-16,
+-15,
+-14,
+-14,
+-13,
+-12,
+-11,
+-10,
+-10,
+-9,
+-8,
+-7,
+-6,
+-6,
+-5,
+-4,
+-4,
+-2,
+-2,
+-2,
+0,
+0,
+1,
+2,
+2,
+3,
+4,
+4,
+5,
+6,
+6,
+7,
+8,
+9,
+9,
+9,
+11,
+11,
+11,
+12,
+13,
+13,
+14,
+15,
+15,
+16,
+16,
+17,
+17,
+18,
+19,
+19,
+19,
+20,
+21,
+21,
+21,
+22,
+23,
+23,
+24,
+23,
+25,
+25,
+25,
+26,
+26,
+27,
+27,
+27,
+28,
+28,
+29,
+29,
+30,
+29,
+30,
+31,
+31,
+31,
+32,
+32,
+32,
+32,
+33,
+33,
+34,
+33,
+34,
+35,
+34,
+35,
+35,
+35,
+36,
+36,
+36,
+36,
+37,
+36,
+37,
+37,
+38,
+37,
+38,
+37,
+38,
+39,
+38,
+38,
+39,
+39,
+38,
+39,
+39,
+40,
+39,
+39,
+40,
+39,
+40,
+40,
+39,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+41,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+39,
+40,
+40,
+39,
+40,
+39,
+40,
+39,
+39,
+39,
+39,
+39,
+39,
+39,
+38,
+38,
+39,
+38,
+38,
+38,
+37,
+38,
+37,
+38,
+37,
+36,
+37,
+37,
+36,
+36,
+36,
+36,
+36,
+35,
+35,
+36,
+34,
+35,
+34,
+35,
+34,
+33,
+34,
+33,
+33,
+33,
+33,
+32,
+32,
+32,
+31,
+31,
+31,
+31,
+30,
+31,
+30,
+30,
+29,
+30,
+29,
+28,
+29,
+28,
+28,
+28,
+27,
+27,
+27,
+26,
+27,
+25,
+26,
+25,
+26,
+24,
+25,
+24,
+24,
+23,
+24,
+23,
+22,
+23,
+22,
+22,
+21,
+21,
+21,
+21,
+20,
+20,
+19,
+20,
+19,
+18,
+19,
+18,
+18,
+17,
+17,
+17,
+17,
+16,
+16,
+15,
+16,
+15,
+14,
+15,
+14,
+14,
+13,
+13,
+13,
+12,
+13,
+12,
+11,
+12,
+11,
+10,
+11,
+10,
+10,
+9,
+9,
+9,
+9,
+8,
+8,
+8,
+8,
+7,
+7,
+6,
+7,
+6,
+5,
+6,
+5,
+5,
+5,
+4,
+4,
+4,
+3,
+4,
+3,
+3,
+2,
+2,
+2,
+2,
+1,
+2,
+1,
+0,
+1,
+0,
+0,
+0,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-2,
+-2,
+-2,
+-3,
+-3,
+-3,
+-3,
+-3,
+-4,
+-4,
+-4,
+-4,
+-5,
+-4,
+-5,
+-5,
+-6,
+-5,
+-6,
+-6,
+-6,
+-6,
+-6,
+-7,
+-6,
+-7,
+-7,
+-7,
+-8,
+-7,
+-8,
+-8,
+-8,
+-8,
+-8,
+-9,
+-8,
+-9,
+-9,
+-9,
+-9,
+-9,
+-10,
+-9,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-11,
+-10,
+-11,
+-10,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-12,
+-11,
+-12,
+-12,
+-11,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-13,
+-12,
+-12,
+-13,
+-12,
+-13,
+-12,
+-13,
+-13,
+-12,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-12,
+-13,
+-13,
+-12,
+-13,
+-12,
+-13,
+-12,
+-13,
+-12,
+-12,
+-13,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-11,
+-12,
+-11,
+-12,
+-11,
+-12,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-10,
+-11,
+-11,
+-10,
+-10,
+-11,
+-10,
+-10,
+-10,
+-10,
+-10,
+-9,
+-10,
+-10,
+-9,
+-10,
+-9,
+-8,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-8,
+-9,
+-8,
+-9,
+-8,
+-8,
+-8,
+-8,
+-8,
+-7,
+-8,
+-8,
+-7,
+-7,
+-8,
+-7,
+-7,
+-7,
+-7,
+-6,
+-7,
+-7,
+-6,
+-7,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-5,
+-6,
+-5,
+-6,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-4,
+-5,
+-4,
+-4,
+-5,
+-4,
+-4,
+-4,
+-3,
+-4,
+-4,
+-3,
+-4,
+-3,
+-3,
+-4,
+-3,
+-3,
+-2,
+-3,
+-3,
+-3,
+-2,
+-3,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-1,
+-2,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+2,
+1,
+1,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+2,
+2,
+1,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+3,
+2,
+2,
+3,
+2,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+3,
+2,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+2,
+3,
+3,
+2,
+3,
+3,
+2,
+3,
+2,
+3,
+3,
+2,
+2,
+3,
+2,
+3,
+2,
+2,
+3,
+2,
+2,
+3,
+2,
+2,
+2,
+2,
+3,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+0,
+2,
+2,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+1,
+2,
+2,
+1,
+2,
+1,
+2,
+1,
+1,
+2,
+1,
+1,
+2,
+1,
+1,
+1,
+2,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+-1,
+-2,
+-4,
+-5,
+-6,
+-8,
+-10,
+-10,
+-13,
+-13,
+-16,
+-16,
+-18,
+-20,
+-21,
+-22,
+-24,
+-25,
+-27,
+-28,
+-30,
+-31,
+-32,
+-34,
+-35,
+-37,
+-38,
+-39,
+-41,
+-42,
+-44,
+-45,
+-46,
+-48,
+-49,
+-51,
+-52,
+-53,
+-55,
+-56,
+-57,
+-59,
+-60,
+-61,
+-63,
+-64,
+-65,
+-67,
+-68,
+-69,
+-71,
+-71,
+-74,
+-74,
+-76,
+-77,
+-78,
+-79,
+-81,
+-82,
+-83,
+-84,
+-86,
+-87,
+-88,
+-89,
+-90,
+-92,
+-92,
+-94,
+-95,
+-96,
+-98,
+-98,
+-100,
+-100,
+-102,
+-103,
+-104,
+-105,
+-106,
+-107,
+-108,
+-109,
+-111,
+-111,
+-112,
+-113,
+-115,
+-115,
+-116,
+-117,
+-119,
+-119,
+-120,
+-121,
+-121,
+-123,
+-124,
+-124,
+-126,
+-126,
+-127,
+-128,
+-129,
+-129,
+-131,
+-131,
+-132,
+-133,
+-133,
+-135,
+-135,
+-135,
+-137,
+-137,
+-138,
+-138,
+-140,
+-139,
+-141,
+-141,
+-142,
+-142,
+-143,
+-144,
+-144,
+-145,
+-145,
+-146,
+-146,
+-147,
+-148,
+-148,
+-148,
+-149,
+-149,
+-150,
+-150,
+-151,
+-151,
+-152,
+-151,
+-153,
+-152,
+-153,
+-154,
+-153,
+-154,
+-154,
+-155,
+-155,
+-155,
+-155,
+-156,
+-156,
+-156,
+-156,
+-157,
+-156,
+-157,
+-157,
+-157,
+-157,
+-158,
+-157,
+-158,
+-158,
+-157,
+-158,
+-158,
+-158,
+-158,
+-158,
+-158,
+-158,
+-158,
+-158,
+-158,
+-157,
+-158,
+-158,
+-157,
+-158,
+-157,
+-158,
+-157,
+-157,
+-157,
+-156,
+-157,
+-156,
+-156,
+-156,
+-156,
+-155,
+-155,
+-155,
+-155,
+-154,
+-155,
+-153,
+-154,
+-153,
+-153,
+-152,
+-153,
+-151,
+-152,
+-151,
+-150,
+-151,
+-150,
+-149,
+-149,
+-149,
+-148,
+-147,
+-148,
+-146,
+-146,
+-146,
+-145,
+-145,
+-144,
+-144,
+-143,
+-143,
+-141,
+-142,
+-141,
+-140,
+-140,
+-139,
+-138,
+-138,
+-137,
+-137,
+-136,
+-135,
+-135,
+-134,
+-133,
+-132,
+-132,
+-132,
+-130,
+-130,
+-129,
+-128,
+-128,
+-127,
+-126,
+-125,
+-125,
+-124,
+-123,
+-122,
+-122,
+-121,
+-120,
+-119,
+-118,
+-118,
+-116,
+-116,
+-115,
+-115,
+-113,
+-113,
+-111,
+-111,
+-110,
+-109,
+-109,
+-107,
+-107,
+-105,
+-105,
+-104,
+-103,
+-102,
+-101,
+-101,
+-98,
+-99,
+-97,
+-97,
+-96,
+-94,
+-94,
+-93,
+-92,
+-92,
+-90,
+-89,
+-88,
+-88,
+-86,
+-86,
+-84,
+-84,
+-82,
+-82,
+-81,
+-80,
+-78,
+-78,
+-77,
+-76,
+-75,
+-74,
+-73,
+-72,
+-72,
+-70,
+-69,
+-68,
+-68,
+-66,
+-65,
+-65,
+-63,
+-63,
+-61,
+-61,
+-59,
+-59,
+-58,
+-56,
+-56,
+-55,
+-54,
+-53,
+-52,
+-51,
+-50,
+-49,
+-48,
+-47,
+-47,
+-45,
+-44,
+-44,
+-42,
+-42,
+-41,
+-39,
+-39,
+-38,
+-37,
+-36,
+-36,
+-34,
+-33,
+-33,
+-31,
+-31,
+-30,
+-29,
+-28,
+-27,
+-26,
+-25,
+-25,
+-23,
+-23,
+-22,
+-21,
+-20,
+-20,
+-18,
+-18,
+-17,
+-16,
+-15,
+-14,
+-14,
+-13,
+-12,
+-11,
+-10,
+-10,
+-9,
+-8,
+-7,
+-6,
+-6,
+-5,
+-4,
+-4,
+-2,
+-2,
+-2,
+0,
+0,
+1,
+2,
+2,
+3,
+4,
+4,
+5,
+6,
+6,
+7,
+8,
+9,
+9,
+9,
+11,
+11,
+11,
+12,
+13,
+13,
+14,
+15,
+15,
+16,
+16,
+17,
+17,
+18,
+19,
+19,
+19,
+20,
+21,
+21,
+21,
+22,
+23,
+23,
+24,
+23,
+25,
+25,
+25,
+26,
+26,
+27,
+27,
+27,
+28,
+28,
+29,
+29,
+30,
+29,
+30,
+31,
+31,
+31,
+32,
+32,
+32,
+32,
+33,
+33,
+34,
+33,
+34,
+35,
+34,
+35,
+35,
+35,
+36,
+36,
+36,
+36,
+37,
+36,
+37,
+37,
+38,
+37,
+38,
+37,
+38,
+39,
+38,
+38,
+39,
+39,
+38,
+39,
+39,
+40,
+39,
+39,
+40,
+39,
+40,
+40,
+39,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+41,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+40,
+39,
+40,
+40,
+39,
+40,
+39,
+40,
+39,
+39,
+39,
+39,
+39,
+39,
+39,
+38,
+38,
+39,
+38,
+38,
+38,
+37,
+38,
+37,
+38,
+37,
+36,
+37,
+37,
+36,
+36,
+36,
+36,
+36,
+35,
+35,
+36,
+34,
+35,
+34,
+35,
+34,
+33,
+34,
+33,
+33,
+33,
+33,
+32,
+32,
+32,
+31,
+31,
+31,
+31,
+30,
+31,
+30,
+30,
+29,
+30,
+29,
+28,
+29,
+28,
+28,
+28,
+27,
+27,
+27,
+26,
+27,
+25,
+26,
+25,
+26,
+24,
+25,
+24,
+24,
+23,
+24,
+23,
+22,
+23,
+22,
+22,
+21,
+21,
+21,
+21,
+20,
+20,
+19,
+20,
+19,
+18,
+19,
+18,
+18,
+17,
+17,
+17,
+17,
+16,
+16,
+15,
+16,
+15,
+14,
+15,
+14,
+14,
+13,
+13,
+13,
+12,
+13,
+12,
+11,
+12,
+11,
+10,
+11,
+10,
+10,
+9,
+9,
+9,
+9,
+8,
+8,
+8,
+8,
+7,
+7,
+6,
+7,
+6,
+5,
+6,
+5,
+5,
+5,
+4,
+4,
+4,
+3,
+4,
+3,
+3,
+2,
+2,
+2,
+2,
+1,
+2,
+1,
+0,
+1,
+0,
+0,
+0,
+-1,
+-1,
+-1,
+-1,
+-1,
+-2,
+-2,
+-2,
+-2,
+-3,
+-3,
+-3,
+-3,
+-3,
+-4,
+-4,
+-4,
+-4,
+-5,
+-4,
+-5,
+-5,
+-6,
+-5,
+-6,
+-6,
+-6,
+-6,
+-6,
+-7,
+-6,
+-7,
+-7,
+-7,
+-8,
+-7,
+-8,
+-8,
+-8,
+-8,
+-8,
+-9,
+-8,
+-9,
+-9,
+-9,
+-9,
+-9,
+-10,
+-9,
+-10,
+-10,
+-10,
+-10,
+-10,
+-10,
+-11,
+-10,
+-11,
+-10,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-12,
+-11,
+-12,
+-12,
+-11,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-13,
+-12,
+-12,
+-13,
+-12,
+-13,
+-12,
+-13,
+-13,
+-12,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-12,
+-13,
+-13,
+-13,
+-12,
+-13,
+-13,
+-12,
+-13,
+-12,
+-13,
+-12,
+-13,
+-12,
+-12,
+-13,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-12,
+-11,
+-12,
+-11,
+-12,
+-11,
+-12,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-11,
+-10,
+-11,
+-11,
+-10,
+-10,
+-11,
+-10,
+-10,
+-10,
+-10,
+-10,
+-9,
+-10,
+-10,
+-9,
+-10,
+-9,
+-8,
+-9,
+-9,
+-9,
+-9,
+-9,
+-9,
+-8,
+-9,
+-8,
+-9,
+-8,
+-8,
+-8,
+-8,
+-8,
+-7,
+-8,
+-8,
+-7,
+-7,
+-8,
+-7,
+-7,
+-7,
+-7,
+-6,
+-7,
+-7,
+-6,
+-7,
+-6,
+-6,
+-6,
+-6,
+-6,
+-6,
+-5,
+-6,
+-5,
+-6,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-5,
+-4,
+-5,
+-4,
+-4,
+-5,
+-4,
+-4,
+-4,
+-3,
+-4,
+-4,
+-3,
+-4,
+-3,
+-3,
+-4,
+-3,
+-3,
+-2,
+-3,
+-3,
+-3,
+-2,
+-3,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-2,
+-1,
+-2,
+-1,
+-2,
+-1,
+-1,
+-2,
+-1,
+-1,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+2,
+1,
+1,
+1,
+2,
+1,
+2,
+1,
+2,
+1,
+2,
+2,
+2,
+1,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+3,
+2,
+2,
+3,
+2,
+2,
+3,
+2,
+3,
+2,
+3,
+2,
+3,
+3,
+2,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+4,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+3,
+3,
+3,
+3,
+2,
+3,
+3,
+3,
+2,
+3,
+3,
+2,
+3,
+3,
+2,
+3,
+2,
+3,
+3,
+2,
+2,
+3,
+2,
+3,
+2,
+2,
+3,
+2,
+2,
+3,
+2,
+2,
+2,
+2,
+3,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+2,
+0,
+2,
+2,
+2,
+2,
+1,
+2,
+2,
+1,
+2,
+1,
+2,
+2,
+1,
+2,
+1,
+2,
+1,
+1,
+2,
+1,
+1,
+2,
+1,
+1,
+1,
+2,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+1,
+1,
+0,
+1,
+0,
+1,
+0,
+1,
+1,
+0,
+0,
+1,
+0,
+1,
+0,
+1,
+0,
+0,
+1,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+-1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+0,
+1
+};
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sound_port.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sound_port.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/sound_port.c	(revision 1163)
@@ -0,0 +1,576 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/sound_port.h>
+#include <pjmedia/echo.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/plc.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/rand.h>
+#include <pj/string.h>	    /* pj_memset() */
+
+#ifndef PJMEDIA_SOUND_HAS_AEC
+#   define PJMEDIA_SOUND_HAS_AEC	1
+#endif
+
+#if defined(PJMEDIA_SOUND_HAS_AEC) && PJMEDIA_SOUND_HAS_AEC!=0
+#   include <speex/speex_echo.h>
+#endif
+
+//#define SIMULATE_LOST_PCT   20
+#define AEC_TAIL	    128	    /* default AEC length in ms */
+#define AEC_SUSPEND_LIMIT   5	    /* seconds of no activity	*/
+
+#define THIS_FILE	    "sound_port.c"
+
+enum
+{
+    PJMEDIA_PLC_ENABLED	    = 1,
+};
+
+//#define DEFAULT_OPTIONS	PJMEDIA_PLC_ENABLED
+#define DEFAULT_OPTIONS	    0
+
+
+struct pjmedia_snd_port
+{
+    int			 rec_id;
+    int			 play_id;
+    pjmedia_snd_stream	*snd_stream;
+    pjmedia_dir		 dir;
+    pjmedia_port	*port;
+    unsigned		 options;
+
+    pjmedia_echo_state	*ec_state;
+    unsigned		 aec_tail_len;
+
+    pj_bool_t		 ec_suspended;
+    unsigned		 ec_suspend_count;
+    unsigned		 ec_suspend_limit;
+
+    pjmedia_plc		*plc;
+
+    unsigned		 clock_rate;
+    unsigned		 channel_count;
+    unsigned		 samples_per_frame;
+    unsigned		 bits_per_sample;
+};
+
+/*
+ * The callback called by sound player when it needs more samples to be
+ * played.
+ */
+static pj_status_t play_cb(/* in */   void *user_data,
+			   /* in */   pj_uint32_t timestamp,
+			   /* out */  void *output,
+			   /* out */  unsigned size)
+{
+    pjmedia_snd_port *snd_port = user_data;
+    pjmedia_port *port;
+    pjmedia_frame frame;
+    pj_status_t status;
+
+    /* We're risking accessing the port without holding any mutex.
+     * It's possible that port is disconnected then destroyed while
+     * we're trying to access it.
+     * But in the name of performance, we'll try this approach until
+     * someone complains when it crashes.
+     */
+    port = snd_port->port;
+    if (port == NULL)
+	goto no_frame;
+
+    frame.buf = output;
+    frame.size = size;
+    frame.timestamp.u32.lo = timestamp;
+
+    status = pjmedia_port_get_frame(port, &frame);
+    if (status != PJ_SUCCESS)
+	goto no_frame;
+
+    if (frame.type != PJMEDIA_FRAME_TYPE_AUDIO)
+	goto no_frame;
+
+    /* Must supply the required samples */
+    pj_assert(frame.size == size);
+
+#ifdef SIMULATE_LOST_PCT
+    /* Simulate packet lost */
+    if (pj_rand() % 100 < SIMULATE_LOST_PCT) {
+	PJ_LOG(4,(THIS_FILE, "Frame dropped"));
+	goto no_frame;
+    }
+#endif
+
+    if (snd_port->plc)
+	pjmedia_plc_save(snd_port->plc, output);
+
+    if (snd_port->ec_state) {
+	if (snd_port->ec_suspended) {
+	    snd_port->ec_suspended = PJ_FALSE;
+	    //pjmedia_echo_state_reset(snd_port->ec_state);
+	    PJ_LOG(4,(THIS_FILE, "EC activated"));
+	}
+	snd_port->ec_suspend_count = 0;
+	pjmedia_echo_playback(snd_port->ec_state, output);
+    }
+
+
+    return PJ_SUCCESS;
+
+no_frame:
+
+    if (snd_port->ec_state && !snd_port->ec_suspended) {
+	++snd_port->ec_suspend_count;
+	if (snd_port->ec_suspend_count > snd_port->ec_suspend_limit) {
+	    snd_port->ec_suspended = PJ_TRUE;
+	    PJ_LOG(4,(THIS_FILE, "EC suspended because of inactivity"));
+	}
+	if (snd_port->ec_state) {
+	    /* To maintain correct delay in EC */
+	    pjmedia_echo_playback(snd_port->ec_state, output);
+	}
+    }
+
+    /* Apply PLC */
+    if (snd_port->plc) {
+
+	pjmedia_plc_generate(snd_port->plc, output);
+#ifdef SIMULATE_LOST_PCT
+	PJ_LOG(4,(THIS_FILE, "Lost frame generated"));
+#endif
+    } else {
+	pj_bzero(output, size);
+    }
+
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * The callback called by sound recorder when it has finished capturing a
+ * frame.
+ */
+static pj_status_t rec_cb(/* in */   void *user_data,
+			  /* in */   pj_uint32_t timestamp,
+			  /* in */   void *input,
+			  /* in*/    unsigned size)
+{
+    pjmedia_snd_port *snd_port = user_data;
+    pjmedia_port *port;
+    pjmedia_frame frame;
+
+    /* We're risking accessing the port without holding any mutex.
+     * It's possible that port is disconnected then destroyed while
+     * we're trying to access it.
+     * But in the name of performance, we'll try this approach until
+     * someone complains when it crashes.
+     */
+    port = snd_port->port;
+    if (port == NULL)
+	return PJ_SUCCESS;
+
+    /* Cancel echo */
+    if (snd_port->ec_state && !snd_port->ec_suspended) {
+	pjmedia_echo_capture(snd_port->ec_state, input, 0);
+    }
+
+    frame.buf = (void*)input;
+    frame.size = size;
+    frame.type = PJMEDIA_FRAME_TYPE_AUDIO;
+    frame.timestamp.u32.lo = timestamp;
+
+    pjmedia_port_put_frame(port, &frame);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Start the sound stream.
+ * This may be called even when the sound stream has already been started.
+ */
+static pj_status_t start_sound_device( pj_pool_t *pool,
+				       pjmedia_snd_port *snd_port )
+{
+    pj_status_t status;
+
+    /* Check if sound has been started. */
+    if (snd_port->snd_stream != NULL)
+	return PJ_SUCCESS;
+
+    /* Open sound stream. */
+    if (snd_port->dir == PJMEDIA_DIR_CAPTURE) {
+	status = pjmedia_snd_open_rec( snd_port->rec_id, 
+				       snd_port->clock_rate,
+				       snd_port->channel_count,
+				       snd_port->samples_per_frame,
+				       snd_port->bits_per_sample,
+				       &rec_cb,
+				       snd_port,
+				       &snd_port->snd_stream);
+
+    } else if (snd_port->dir == PJMEDIA_DIR_PLAYBACK) {
+	status = pjmedia_snd_open_player( snd_port->play_id, 
+					  snd_port->clock_rate,
+					  snd_port->channel_count,
+					  snd_port->samples_per_frame,
+					  snd_port->bits_per_sample,
+					  &play_cb,
+					  snd_port,
+					  &snd_port->snd_stream);
+
+    } else if (snd_port->dir == PJMEDIA_DIR_CAPTURE_PLAYBACK) {
+	status = pjmedia_snd_open( snd_port->rec_id, 
+				   snd_port->play_id,
+				   snd_port->clock_rate,
+				   snd_port->channel_count,
+				   snd_port->samples_per_frame,
+				   snd_port->bits_per_sample,
+				   &rec_cb,
+				   &play_cb,
+				   snd_port,
+				   &snd_port->snd_stream);
+    } else {
+	pj_assert(!"Invalid dir");
+	status = PJ_EBUG;
+    }
+
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+#ifdef SIMULATE_LOST_PCT
+    snd_port->options |= PJMEDIA_PLC_ENABLED;
+#endif
+
+    /* If we have player components, allocate buffer to save the last
+     * frame played to the speaker. The last frame is used for packet
+     * lost concealment (PLC) algorithm.
+     */
+    if ((snd_port->dir & PJMEDIA_DIR_PLAYBACK) &&
+	(snd_port->options & PJMEDIA_PLC_ENABLED)) 
+    {
+	status = pjmedia_plc_create(pool, snd_port->clock_rate, 
+				    snd_port->samples_per_frame * 
+					snd_port->channel_count,
+				    0, &snd_port->plc);
+	if (status != PJ_SUCCESS) {
+	    PJ_LOG(4,(THIS_FILE, "Unable to create PLC"));
+	    snd_port->plc = NULL;
+	}
+    }
+
+    /* Inactivity limit before EC is suspended. */
+    snd_port->ec_suspend_limit = AEC_SUSPEND_LIMIT *
+				 (snd_port->clock_rate / 
+				  snd_port->samples_per_frame);
+
+    /* Start sound stream. */
+    status = pjmedia_snd_stream_start(snd_port->snd_stream);
+    if (status != PJ_SUCCESS) {
+	pjmedia_snd_stream_close(snd_port->snd_stream);
+	snd_port->snd_stream = NULL;
+	return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Stop the sound device.
+ * This may be called even when there's no sound device in the port.
+ */
+static pj_status_t stop_sound_device( pjmedia_snd_port *snd_port )
+{
+    /* Check if we have sound stream device. */
+    if (snd_port->snd_stream) {
+	pjmedia_snd_stream_stop(snd_port->snd_stream);
+	pjmedia_snd_stream_close(snd_port->snd_stream);
+	snd_port->snd_stream = NULL;
+    }
+
+    /* Destroy AEC */
+    if (snd_port->ec_state) {
+	pjmedia_echo_destroy(snd_port->ec_state);
+	snd_port->ec_state = NULL;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create bidirectional port.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_port_create( pj_pool_t *pool,
+					     int rec_id,
+					     int play_id,
+					     unsigned clock_rate,
+					     unsigned channel_count,
+					     unsigned samples_per_frame,
+					     unsigned bits_per_sample,
+					     unsigned options,
+					     pjmedia_snd_port **p_port)
+{
+    pjmedia_snd_port *snd_port;
+
+    PJ_ASSERT_RETURN(pool && p_port, PJ_EINVAL);
+
+    snd_port = pj_pool_zalloc(pool, sizeof(pjmedia_snd_port));
+    PJ_ASSERT_RETURN(snd_port, PJ_ENOMEM);
+
+    snd_port->rec_id = rec_id;
+    snd_port->play_id = play_id;
+    snd_port->dir = PJMEDIA_DIR_CAPTURE_PLAYBACK;
+    snd_port->options = options | DEFAULT_OPTIONS;
+    snd_port->clock_rate = clock_rate;
+    snd_port->channel_count = channel_count;
+    snd_port->samples_per_frame = samples_per_frame;
+    snd_port->bits_per_sample = bits_per_sample;
+
+    *p_port = snd_port;
+
+
+    /* Start sound device immediately.
+     * If there's no port connected, the sound callback will return
+     * empty signal.
+     */
+    return start_sound_device( pool, snd_port );
+
+}
+
+/*
+ * Create sound recorder AEC.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_port_create_rec( pj_pool_t *pool,
+						 int dev_id,
+						 unsigned clock_rate,
+						 unsigned channel_count,
+						 unsigned samples_per_frame,
+						 unsigned bits_per_sample,
+						 unsigned options,
+						 pjmedia_snd_port **p_port)
+{
+    pjmedia_snd_port *snd_port;
+
+    PJ_ASSERT_RETURN(pool && p_port, PJ_EINVAL);
+
+    snd_port = pj_pool_zalloc(pool, sizeof(pjmedia_snd_port));
+    PJ_ASSERT_RETURN(snd_port, PJ_ENOMEM);
+
+    snd_port->rec_id = dev_id;
+    snd_port->dir = PJMEDIA_DIR_CAPTURE;
+    snd_port->options = options | DEFAULT_OPTIONS;
+    snd_port->clock_rate = clock_rate;
+    snd_port->channel_count = channel_count;
+    snd_port->samples_per_frame = samples_per_frame;
+    snd_port->bits_per_sample = bits_per_sample;
+
+    *p_port = snd_port;
+
+    /* Start sound device immediately.
+     * If there's no port connected, the sound callback will return
+     * empty signal.
+     */
+    return start_sound_device( pool, snd_port );
+}
+
+
+/*
+ * Create sound player port.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_port_create_player( pj_pool_t *pool,
+						    int dev_id,
+						    unsigned clock_rate,
+						    unsigned channel_count,
+						    unsigned samples_per_frame,
+						    unsigned bits_per_sample,
+						    unsigned options,
+						    pjmedia_snd_port **p_port)
+{
+    pjmedia_snd_port *snd_port;
+
+    PJ_ASSERT_RETURN(pool && p_port, PJ_EINVAL);
+
+    snd_port = pj_pool_zalloc(pool, sizeof(pjmedia_snd_port));
+    PJ_ASSERT_RETURN(snd_port, PJ_ENOMEM);
+
+    snd_port->play_id = dev_id;
+    snd_port->dir = PJMEDIA_DIR_PLAYBACK;
+    snd_port->options = options | DEFAULT_OPTIONS;
+    snd_port->clock_rate = clock_rate;
+    snd_port->channel_count = channel_count;
+    snd_port->samples_per_frame = samples_per_frame;
+    snd_port->bits_per_sample = bits_per_sample;
+
+    *p_port = snd_port;
+
+    /* Start sound device immediately.
+     * If there's no port connected, the sound callback will return
+     * empty signal.
+     */
+    return start_sound_device( pool, snd_port );
+}
+
+
+/*
+ * Destroy port (also destroys the sound device).
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_port_destroy(pjmedia_snd_port *snd_port)
+{
+    PJ_ASSERT_RETURN(snd_port, PJ_EINVAL);
+
+    return stop_sound_device(snd_port);
+}
+
+
+/*
+ * Retrieve the sound stream associated by this sound device port.
+ */
+PJ_DEF(pjmedia_snd_stream*) pjmedia_snd_port_get_snd_stream(
+						pjmedia_snd_port *snd_port)
+{
+    PJ_ASSERT_RETURN(snd_port, NULL);
+    return snd_port->snd_stream;
+}
+
+
+/*
+ * Enable AEC
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_port_set_ec( pjmedia_snd_port *snd_port,
+					     pj_pool_t *pool,
+					     unsigned tail_ms,
+					     unsigned options)
+{
+    pjmedia_snd_stream_info si;
+    pj_status_t status;
+
+    /* Sound must be opened in full-duplex mode */
+    PJ_ASSERT_RETURN(snd_port && 
+		     snd_port->dir == PJMEDIA_DIR_CAPTURE_PLAYBACK,
+		     PJ_EINVALIDOP);
+
+    /* Sound port must have 16bits per sample */
+    PJ_ASSERT_RETURN(snd_port->bits_per_sample == 16,
+		     PJ_EINVALIDOP);
+
+    /* Destroy AEC */
+    if (snd_port->ec_state) {
+	pjmedia_echo_destroy(snd_port->ec_state);
+	snd_port->ec_state = NULL;
+    }
+
+    snd_port->aec_tail_len = tail_ms;
+
+    if (tail_ms != 0) {
+	unsigned delay_ms;
+
+	status = pjmedia_snd_stream_get_info(snd_port->snd_stream, &si);
+	if (status != PJ_SUCCESS)
+	    si.rec_latency = si.play_latency = 0;
+
+	delay_ms = (si.rec_latency + si.play_latency) * 1000 /
+		   snd_port->clock_rate;
+	status = pjmedia_echo_create(pool, snd_port->clock_rate, 
+				    snd_port->samples_per_frame, 
+				    tail_ms, delay_ms,
+				    options, &snd_port->ec_state);
+	if (status != PJ_SUCCESS)
+	    snd_port->ec_state = NULL;
+	else
+	    snd_port->ec_suspended = PJ_FALSE;
+    } else {
+	PJ_LOG(4,(THIS_FILE, "Echo canceller is now disabled in the "
+			     "sound port"));
+	status = PJ_SUCCESS;
+    }
+
+    return status;
+}
+
+
+/* Get AEC tail length */
+PJ_DEF(pj_status_t) pjmedia_snd_port_get_ec_tail( pjmedia_snd_port *snd_port,
+						  unsigned *p_length)
+{
+    PJ_ASSERT_RETURN(snd_port && p_length, PJ_EINVAL);
+    *p_length =  snd_port->ec_state ? snd_port->aec_tail_len : 0;
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * Connect a port.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_port_connect( pjmedia_snd_port *snd_port,
+					      pjmedia_port *port)
+{
+    pjmedia_port_info *pinfo;
+
+    PJ_ASSERT_RETURN(snd_port && port, PJ_EINVAL);
+
+    /* Check that port has the same configuration as the sound device
+     * port.
+     */
+    pinfo = &port->info;
+    if (pinfo->clock_rate != snd_port->clock_rate)
+	return PJMEDIA_ENCCLOCKRATE;
+
+    if (pinfo->samples_per_frame != snd_port->samples_per_frame)
+	return PJMEDIA_ENCSAMPLESPFRAME;
+
+    if (pinfo->channel_count != snd_port->channel_count)
+	return PJMEDIA_ENCCHANNEL;
+
+    if (pinfo->bits_per_sample != snd_port->bits_per_sample)
+	return PJMEDIA_ENCBITS;
+
+    /* Port is okay. */
+    snd_port->port = port;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get the connected port.
+ */
+PJ_DEF(pjmedia_port*) pjmedia_snd_port_get_port(pjmedia_snd_port *snd_port)
+{
+    PJ_ASSERT_RETURN(snd_port, NULL);
+    return snd_port->port;
+}
+
+
+/*
+ * Disconnect port.
+ */
+PJ_DEF(pj_status_t) pjmedia_snd_port_disconnect(pjmedia_snd_port *snd_port)
+{
+    PJ_ASSERT_RETURN(snd_port, PJ_EINVAL);
+
+    snd_port->port = NULL;
+
+    return PJ_SUCCESS;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/splitcomb.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/splitcomb.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/splitcomb.c	(revision 1163)
@@ -0,0 +1,640 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/splitcomb.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+
+
+#define SIGNATURE	    PJMEDIA_PORT_SIGNATURE('S', 'p', 'C', 'b')
+#define SIGNATURE_PORT	    PJMEDIA_PORT_SIGNATURE('S', 'p', 'C', 'P')
+#define THIS_FILE	    "splitcomb.c"
+#define TMP_SAMP_TYPE	    pj_int16_t
+#define MAX_BUF_CNT	    PJMEDIA_SOUND_BUFFER_COUNT
+
+#if 0
+#   define TRACE_UP_(x)	PJ_LOG(5,x)
+#   define TRACE_DN_(x)	PJ_LOG(5,x)
+#else
+#   define TRACE_UP_(x)
+#   define TRACE_DN_(x)
+#endif
+
+#if 1
+#   define LOG_UP_(x)	PJ_LOG(5,x)
+#   define LOG_DN_(x)	PJ_LOG(5,x)
+#else
+#   define LOG_UP_(x)
+#   define LOG_DN_(x)
+#endif
+
+/*
+ * This structure describes the splitter/combiner.
+ */
+struct splitcomb
+{
+    pjmedia_port      base;
+
+    unsigned	      options;
+
+    /* Array of ports, one for each channel */
+    struct {
+	pjmedia_port *port;
+	pj_bool_t     reversed;
+    } *port_desc;
+
+    /* Temporary buffers needed to extract mono frame from
+     * multichannel frame. We could use stack for this, but this
+     * way it should be safer for devices with small stack size.
+     */
+    TMP_SAMP_TYPE    *get_buf;
+    TMP_SAMP_TYPE    *put_buf;
+};
+
+
+/*
+ * This structure describes reverse port.
+ */
+struct reverse_port
+{
+    pjmedia_port     base;
+    struct splitcomb*parent;
+    unsigned	     ch_num;
+
+    /* A reverse port need a temporary buffer to store frame
+     * (because of the different phase, see splitcomb.h for details). 
+     * Since we can not expect get_frame() and put_frame() to be
+     * called evenly one after another, we use circular buffers to
+     * accomodate the "jitter".
+     */
+    unsigned	     buf_cnt;
+
+    /* Downstream is the direction when get_frame() is called to the
+     * splitter/combiner port.
+     */
+    unsigned	     dn_read_pos, dn_write_pos, 
+		     dn_overflow_pos, dn_underflow_pos;
+    pj_int16_t	    *dnstream_buf[MAX_BUF_CNT];
+
+    /* Upstream is the direction when put_frame() is called to the
+     * splitter/combiner port.
+     */
+    unsigned	     up_read_pos, up_write_pos, 
+		     up_overflow_pos, up_underflow_pos;
+    pj_int16_t	    *upstream_buf[MAX_BUF_CNT];
+};
+
+
+/*
+ * Prototypes.
+ */
+static pj_status_t put_frame(pjmedia_port *this_port, 
+			     const pjmedia_frame *frame);
+static pj_status_t get_frame(pjmedia_port *this_port, 
+			     pjmedia_frame *frame);
+static pj_status_t on_destroy(pjmedia_port *this_port);
+
+static pj_status_t rport_put_frame(pjmedia_port *this_port, 
+				   const pjmedia_frame *frame);
+static pj_status_t rport_get_frame(pjmedia_port *this_port, 
+				   pjmedia_frame *frame);
+static pj_status_t rport_on_destroy(pjmedia_port *this_port);
+
+
+/*
+ * Create the splitter/combiner.
+ */
+PJ_DEF(pj_status_t) pjmedia_splitcomb_create( pj_pool_t *pool,
+					      unsigned clock_rate,
+					      unsigned channel_count,
+					      unsigned samples_per_frame,
+					      unsigned bits_per_sample,
+					      unsigned options,
+					      pjmedia_port **p_splitcomb)
+{
+    const pj_str_t name = pj_str("splitcomb");
+    struct splitcomb *sc;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(pool && clock_rate && channel_count &&
+		     samples_per_frame && bits_per_sample &&
+		     p_splitcomb, PJ_EINVAL);
+
+    /* Only supports 16 bits per sample */
+    PJ_ASSERT_RETURN(bits_per_sample == 16, PJ_EINVAL);
+
+    *p_splitcomb = NULL;
+
+    /* Create the splitter/combiner structure */
+    sc = pj_pool_zalloc(pool, sizeof(struct splitcomb));
+    PJ_ASSERT_RETURN(sc != NULL, PJ_ENOMEM);
+
+    /* Create temporary buffers */
+    sc->get_buf = pj_pool_alloc(pool, samples_per_frame * 
+				      sizeof(TMP_SAMP_TYPE) /
+				      channel_count);
+    PJ_ASSERT_RETURN(sc->get_buf, PJ_ENOMEM);
+
+    sc->put_buf = pj_pool_alloc(pool, samples_per_frame * 
+				      sizeof(TMP_SAMP_TYPE) /
+				      channel_count);
+    PJ_ASSERT_RETURN(sc->put_buf, PJ_ENOMEM);
+
+
+    /* Save options */
+    sc->options = options;
+
+    /* Initialize port */
+    pjmedia_port_info_init(&sc->base.info, &name, SIGNATURE, clock_rate,
+			   channel_count, bits_per_sample, samples_per_frame);
+
+    sc->base.put_frame = &put_frame;
+    sc->base.get_frame = &get_frame;
+    sc->base.on_destroy = &on_destroy;
+
+    /* Init ports array */
+    sc->port_desc = pj_pool_zalloc(pool, channel_count*sizeof(*sc->port_desc));
+
+    /* Done for now */
+    *p_splitcomb = &sc->base;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Attach media port with the same phase as the splitter/combiner.
+ */
+PJ_DEF(pj_status_t) pjmedia_splitcomb_set_channel( pjmedia_port *splitcomb,
+						   unsigned ch_num,
+						   unsigned options,
+						   pjmedia_port *port)
+{
+    struct splitcomb *sc = (struct splitcomb*) splitcomb;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(splitcomb && port, PJ_EINVAL);
+
+    /* Make sure this is really a splitcomb port */
+    PJ_ASSERT_RETURN(sc->base.info.signature == SIGNATURE, PJ_EINVAL);
+
+    /* Check the channel number */
+    PJ_ASSERT_RETURN(ch_num < sc->base.info.channel_count, PJ_EINVAL);
+
+    /* options is unused for now */
+    PJ_UNUSED_ARG(options);
+
+    sc->port_desc[ch_num].port = port;
+    sc->port_desc[ch_num].reversed = PJ_FALSE;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create reverse phase port for the specified channel.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_splitcomb_create_rev_channel( pj_pool_t *pool,
+				      pjmedia_port *splitcomb,
+				      unsigned ch_num,
+				      unsigned options,
+				      pjmedia_port **p_chport)
+{
+    const pj_str_t name = pj_str("splitcomb-ch");
+    struct splitcomb *sc = (struct splitcomb*) splitcomb;
+    struct reverse_port *rport;
+    unsigned i;
+    pjmedia_port *port;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(pool && splitcomb, PJ_EINVAL);
+
+    /* Make sure this is really a splitcomb port */
+    PJ_ASSERT_RETURN(sc->base.info.signature == SIGNATURE, PJ_EINVAL);
+
+    /* Check the channel number */
+    PJ_ASSERT_RETURN(ch_num < sc->base.info.channel_count, PJ_EINVAL);
+
+    /* options is unused for now */
+    PJ_UNUSED_ARG(options);
+
+    /* Create the port */
+    rport = pj_pool_zalloc(pool, sizeof(struct reverse_port));
+    rport->parent = sc;
+    rport->ch_num = ch_num;
+
+    /* Initialize port info... */
+    port = &rport->base;
+    pjmedia_port_info_init(&port->info, &name, SIGNATURE_PORT, 
+			   splitcomb->info.clock_rate, 1, 
+			   splitcomb->info.bits_per_sample, 
+			   splitcomb->info.samples_per_frame / 
+				   splitcomb->info.channel_count);
+
+    /* ... and the callbacks */
+    port->put_frame = &rport_put_frame;
+    port->get_frame = &rport_get_frame;
+    port->on_destroy = &rport_on_destroy;
+
+
+    rport->buf_cnt = options & 0xFF;
+    if (rport->buf_cnt == 0)
+	rport->buf_cnt = MAX_BUF_CNT;
+
+    /* Create put buffers */
+    for (i=0; i<rport->buf_cnt; ++i) {
+	rport->dnstream_buf[i] = pj_pool_zalloc(pool, port->info.bytes_per_frame);
+	PJ_ASSERT_RETURN(rport->dnstream_buf[i], PJ_ENOMEM);
+    }
+    rport->dn_write_pos = rport->buf_cnt/2;
+
+    /* Create get buffers */
+    for (i=0; i<rport->buf_cnt; ++i) {
+	rport->upstream_buf[i] = pj_pool_zalloc(pool, 
+						port->info.bytes_per_frame);
+	PJ_ASSERT_RETURN(rport->upstream_buf[i], PJ_ENOMEM);
+    }
+    rport->up_write_pos = rport->buf_cnt/2;
+
+
+    /* Save port in the splitcomb */
+    sc->port_desc[ch_num].port = &rport->base;
+    sc->port_desc[ch_num].reversed = PJ_TRUE;
+
+
+    /* Done */
+    *p_chport = port;
+    return PJ_SUCCESS;
+}
+
+
+/* 
+ * Extract one mono frame from a multichannel frame. 
+ */
+static void extract_mono_frame( const pj_int16_t *in,
+			        pj_int16_t *out,
+				unsigned ch,
+				unsigned ch_cnt,
+				unsigned samples_count)
+{
+    unsigned i;
+
+    in += ch;
+    for (i=0; i<samples_count; ++i) {
+	*out++ = *in;
+	in += ch_cnt;
+    }
+}
+
+
+/* 
+ * Put one mono frame into a multichannel frame 
+ */
+static void store_mono_frame( const pj_int16_t *in,
+			      pj_int16_t *out,
+			      unsigned ch,
+			      unsigned ch_cnt,
+			      unsigned samples_count)
+{
+    unsigned i;
+
+    out += ch;
+    for (i=0; i<samples_count; ++i) {
+	*out = *in++;
+	out += ch_cnt;
+    }
+}
+
+
+/*
+ * "Write" a multichannel frame. This would split the multichannel frame
+ * into individual mono channel, and write it to the appropriate port.
+ */
+static pj_status_t put_frame(pjmedia_port *this_port, 
+			     const pjmedia_frame *frame)
+{
+    struct splitcomb *sc = (struct splitcomb*) this_port;
+    unsigned ch;
+
+    /* Handle null frame */
+    if (frame->type == PJMEDIA_FRAME_TYPE_NONE) {
+	for (ch=0; ch < this_port->info.channel_count; ++ch) {
+	    pjmedia_port *port = sc->port_desc[ch].port;
+
+	    if (!port) continue;
+
+	    pjmedia_port_put_frame(port, frame);
+	}
+	return PJ_SUCCESS;
+    }
+
+    /* Not sure how we would handle partial frame, so better reject
+     * it for now.
+     */
+    PJ_ASSERT_RETURN(frame->size == this_port->info.bytes_per_frame,
+		     PJ_EINVAL);
+
+    /* 
+     * Write mono frame into each channels 
+     */
+    for (ch=0; ch < this_port->info.channel_count; ++ch) {
+	pjmedia_port *port = sc->port_desc[ch].port;
+
+	if (!port)
+	    continue;
+
+	if (!sc->port_desc[ch].reversed) {
+	    /* Write to normal port */
+	    pjmedia_frame mono_frame;
+
+	    /* Extract the mono frame */
+	    extract_mono_frame(frame->buf, sc->put_buf, ch, 
+			       this_port->info.channel_count, 
+			       frame->size * 8 / 
+				 this_port->info.bits_per_sample /
+				 this_port->info.channel_count);
+
+	    mono_frame.buf = sc->put_buf;
+	    mono_frame.size = frame->size / this_port->info.channel_count;
+	    mono_frame.type = frame->type;
+	    mono_frame.timestamp.u64 = frame->timestamp.u64;
+
+	    /* Write */
+	    pjmedia_port_put_frame(port, &mono_frame);
+
+	} else {
+	    /* Write to reversed phase port */
+	    struct reverse_port *rport = (struct reverse_port*)port;
+	    
+	    if (rport->dn_write_pos == rport->dn_read_pos) {
+
+		/* Only report overflow if the frame is constantly read
+		 * by the 'consumer' of the reverse port.
+		 * It is possible that nobody reads the buffer, so causing
+		 * overflow to happen rapidly, and writing log message this
+		 * way does not seem to be wise.
+		 */
+		if (rport->dn_read_pos != rport->dn_overflow_pos) {
+		    rport->dn_overflow_pos = rport->dn_read_pos;
+		    LOG_DN_((THIS_FILE, "Overflow in downstream direction"));
+		}
+
+		/* Adjust write position */
+		rport->dn_write_pos = 
+		    (rport->dn_write_pos + rport->buf_cnt/2) % 
+		    rport->buf_cnt;
+	    }
+
+	    /* Extract mono-frame and put it in downstream buffer */
+	    extract_mono_frame(frame->buf, 
+			       rport->dnstream_buf[rport->dn_write_pos],
+			       ch, this_port->info.channel_count, 
+			       frame->size * 8 / 
+				 this_port->info.bits_per_sample /
+				 this_port->info.channel_count);
+
+	    rport->dn_write_pos = (rport->dn_write_pos + 1) %
+			           rport->buf_cnt;
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get a multichannel frame.
+ * This will get mono channel frame from each port and put the
+ * mono frame into the multichannel frame.
+ */
+static pj_status_t get_frame(pjmedia_port *this_port, 
+			     pjmedia_frame *frame)
+{
+    struct splitcomb *sc = (struct splitcomb*) this_port;
+    unsigned ch;
+    pj_bool_t has_frame = PJ_FALSE;
+
+    /* Clear output frame */
+    pjmedia_zero_samples(frame->buf, this_port->info.samples_per_frame);
+
+    /* Read frame from each port */
+    for (ch=0; ch < this_port->info.channel_count; ++ch) {
+	pjmedia_port *port = sc->port_desc[ch].port;
+	pjmedia_frame mono_frame;
+	pj_status_t status;
+
+	if (!port)
+	    continue;
+
+	/* Read from the port */
+	if (sc->port_desc[ch].reversed == PJ_FALSE) {
+	    /* Read from normal port */
+	    mono_frame.buf = sc->get_buf;
+	    mono_frame.size = port->info.bytes_per_frame;
+	    mono_frame.timestamp.u64 = frame->timestamp.u64;
+
+	    status = pjmedia_port_get_frame(port, &mono_frame);
+	    if (status != PJ_SUCCESS || 
+		mono_frame.type != PJMEDIA_FRAME_TYPE_AUDIO)
+	    {
+		continue;
+	    }
+
+	    /* Combine the mono frame into multichannel frame */
+	    store_mono_frame(mono_frame.buf, frame->buf, ch,
+			     this_port->info.channel_count,
+			     mono_frame.size * 8 /
+				this_port->info.bits_per_sample);
+
+	    frame->timestamp.u64 = mono_frame.timestamp.u64;
+
+	} else {
+	    /* Read from temporary buffer for reverse port */
+	    struct reverse_port *rport = (struct reverse_port*)port;
+
+	    /* Check for underflows */
+	    if (rport->up_read_pos == rport->up_write_pos) {
+
+		/* Only report underflow if the buffer is constantly filled
+		 * up at the other side.
+		 * It is possible that nobody writes the buffer, so causing
+		 * underflow to happen rapidly, and writing log message this
+		 * way does not seem to be wise.
+		 */
+		if (rport->up_write_pos != rport->up_underflow_pos) {
+		    rport->up_underflow_pos = rport->up_write_pos;
+		    LOG_UP_((THIS_FILE, "Underflow in upstream direction"));
+		}
+
+		/* Adjust read position */
+		rport->up_read_pos = 
+		    (rport->up_write_pos - rport->buf_cnt/2) %
+		    rport->buf_cnt;
+	    }
+
+	    TRACE_UP_((THIS_FILE, "Upstream read at buffer pos %d", 
+		       rport->up_read_pos));
+
+	    /* Combine the mono frame into multichannel frame */
+	    store_mono_frame(rport->upstream_buf[rport->up_read_pos], 
+			     frame->buf, ch,
+			     this_port->info.channel_count,
+			     port->info.samples_per_frame);
+
+	    rport->up_read_pos = (rport->up_read_pos + 1) %
+				   rport->buf_cnt;
+	}
+
+
+	has_frame = PJ_TRUE;
+    }
+
+    /* Return NO_FRAME is we don't get any frames from downstream ports */
+    if (has_frame) {
+	frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
+	frame->size = this_port->info.bytes_per_frame;
+    } else
+	frame->type = PJMEDIA_FRAME_TYPE_NONE;
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t on_destroy(pjmedia_port *this_port)
+{
+    /* Nothing to do */
+    PJ_UNUSED_ARG(this_port);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get a mono frame from a reversed phase channel.
+ */
+static pj_status_t rport_put_frame(pjmedia_port *this_port, 
+				   const pjmedia_frame *frame)
+{
+    struct reverse_port *rport = (struct reverse_port*) this_port;
+    unsigned count;
+
+    pj_assert(frame->size <= rport->base.info.bytes_per_frame);
+
+    /* Check for overflows */
+    if (rport->up_write_pos == rport->up_read_pos) {
+
+	/* Only report overflow if the frame is constantly read
+	 * at the other end of the buffer (the multichannel side).
+	 * It is possible that nobody reads the buffer, so causing
+	 * overflow to happen rapidly, and writing log message this
+	 * way does not seem to be wise.
+	 */
+	if (rport->up_read_pos != rport->up_overflow_pos) {
+	    rport->up_overflow_pos = rport->up_read_pos;
+	    LOG_UP_((THIS_FILE, "Overflow in upstream direction"));
+	}
+
+	/* Adjust the write position */
+	rport->up_write_pos = (rport->up_read_pos + rport->buf_cnt/2) %
+			       rport->buf_cnt;
+    }
+
+    /* Handle NULL frame */
+    if (frame->type != PJMEDIA_FRAME_TYPE_AUDIO) {
+	TRACE_UP_((THIS_FILE, "Upstream write %d null samples at buf pos %d",
+		   this_port->info.samples_per_frame, rport->up_write_pos));
+	pjmedia_zero_samples(rport->upstream_buf[rport->up_write_pos],
+			     this_port->info.samples_per_frame);
+	rport->up_write_pos = (rport->up_write_pos+1) % rport->buf_cnt;
+	return PJ_SUCCESS;
+    }
+
+    /* Not sure how to handle partial frame, so better reject for now */
+    PJ_ASSERT_RETURN(frame->size == this_port->info.bytes_per_frame,
+		     PJ_EINVAL);
+
+    /* Copy normal frame to curcular buffer */
+    count = frame->size * 8 / this_port->info.bits_per_sample;
+
+    TRACE_UP_((THIS_FILE, "Upstream write %d samples at buf pos %d",
+	       count, rport->up_write_pos));
+
+
+    pjmedia_copy_samples(rport->upstream_buf[rport->up_write_pos],
+			 frame->buf, count);
+    rport->up_write_pos = (rport->up_write_pos+1) % rport->buf_cnt;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get a mono frame from a reversed phase channel.
+ */
+static pj_status_t rport_get_frame(pjmedia_port *this_port, 
+				   pjmedia_frame *frame)
+{
+    struct reverse_port *rport = (struct reverse_port*) this_port;
+    unsigned count;
+
+    count = rport->base.info.samples_per_frame;
+
+    frame->size = this_port->info.bytes_per_frame;
+    frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
+
+    /* Check for underflows */
+    if (rport->dn_read_pos == rport->dn_write_pos) {
+
+	/* Only report underflow if the buffer is constantly filled
+	 * up at the other side.
+	 * It is possible that nobody writes the buffer, so causing
+	 * underflow to happen rapidly, and writing log message this
+	 * way does not seem to be wise.
+	 */
+	if (rport->dn_write_pos != rport->dn_underflow_pos) {
+	    rport->dn_underflow_pos = rport->dn_write_pos;
+	    LOG_DN_((THIS_FILE, "Underflow in downstream direction"));
+	}
+
+	/* Adjust read position */
+	rport->dn_read_pos = 
+	    (rport->dn_write_pos - rport->buf_cnt/2) % rport->buf_cnt;
+	
+    }
+
+    /* Get the samples from the circular buffer */
+    pjmedia_copy_samples(frame->buf, 
+			 rport->dnstream_buf[rport->dn_read_pos],
+			 count);
+    rport->dn_read_pos = (rport->dn_read_pos+1) % rport->buf_cnt;
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t rport_on_destroy(pjmedia_port *this_port)
+{
+    /* Nothing to do */
+    PJ_UNUSED_ARG(this_port);
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/stream.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/stream.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/stream.c	(revision 1163)
@@ -0,0 +1,1669 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/stream.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/rtp.h>
+#include <pjmedia/rtcp.h>
+#include <pjmedia/jbuf.h>
+#include <pj/array.h>
+#include <pj/assert.h>
+#include <pj/ctype.h>
+#include <pj/compat/socket.h>
+#include <pj/errno.h>
+#include <pj/ioqueue.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/rand.h>
+#include <pj/sock_select.h>
+#include <pj/string.h>	    /* memcpy() */
+
+
+#define THIS_FILE			"stream.c"
+#define ERRLEVEL			1
+#define LOGERR_(expr)			stream_perror expr
+#define TRC_(expr)			PJ_LOG(5,expr)
+
+#define BYTES_PER_SAMPLE		2
+
+/**
+ * Media channel.
+ */
+struct pjmedia_channel
+{
+    pjmedia_stream	   *stream;	    /**< Parent stream.		    */
+    pjmedia_dir		    dir;	    /**< Channel direction.	    */
+    unsigned		    pt;		    /**< Payload type.		    */
+    pj_bool_t		    paused;	    /**< Paused?.		    */
+    unsigned		    in_pkt_size;    /**< Size of input buffer.	    */
+    void		   *in_pkt;	    /**< Input buffer.		    */
+    unsigned		    out_pkt_size;   /**< Size of output buffer.	    */
+    void		   *out_pkt;	    /**< Output buffer.		    */
+    pjmedia_rtp_session	    rtp;	    /**< RTP session.		    */
+};
+
+
+struct dtmf
+{
+    int		    event;
+    pj_uint32_t	    start_ts;
+};
+
+/**
+ * This structure describes media stream.
+ * A media stream is bidirectional media transmission between two endpoints.
+ * It consists of two channels, i.e. encoding and decoding channels.
+ * A media stream corresponds to a single "m=" line in a SDP session
+ * description.
+ */
+struct pjmedia_stream
+{
+    pjmedia_endpt	    *endpt;	    /**< Media endpoint.	    */
+    pjmedia_codec_mgr	    *codec_mgr;	    /**< Codec manager instance.    */
+
+    pjmedia_port	     port;	    /**< Port interface.	    */
+    pjmedia_channel	    *enc;	    /**< Encoding channel.	    */
+    pjmedia_channel	    *dec;	    /**< Decoding channel.	    */
+
+    pjmedia_dir		     dir;	    /**< Stream direction.	    */
+    void		    *user_data;	    /**< User data.		    */
+
+    pjmedia_transport	    *transport;	    /**< Stream transport.	    */
+
+    pjmedia_codec	    *codec;	    /**< Codec instance being used. */
+    pjmedia_codec_param	     codec_param;   /**< Codec param.		    */
+    pj_int16_t		    *enc_buf;	    /**< Encoding buffer, when enc's
+						 ptime is different than dec.
+						 Otherwise it's NULL.	    */
+
+    unsigned		     enc_samples_per_frame;
+    unsigned		     enc_buf_size;  /**< Encoding buffer size, in
+						 samples.		    */
+    unsigned		     enc_buf_pos;   /**< First position in buf.	    */
+    unsigned		     enc_buf_count; /**< Number of samples in the
+						 encoding buffer.	    */
+
+    unsigned		     vad_enabled;   /**< VAD enabled in param.	    */
+    unsigned		     frame_size;    /**< Size of encoded base frame.*/
+    pj_bool_t		     is_streaming;  /**< Currently streaming?. This
+						 is used to put RTP marker
+						 bit.			    */
+    pj_uint32_t		     ts_vad_disabled;/**< TS when VAD was disabled. */
+    pj_uint32_t		     tx_duration;   /**< TX duration in timestamp.  */
+
+    pj_mutex_t		    *jb_mutex;
+    pjmedia_jbuf	    *jb;	    /**< Jitter buffer.		    */
+    char		     jb_last_frm;   /**< Last frame type from jb    */
+
+    pjmedia_rtcp_session     rtcp;	    /**< RTCP for incoming RTP.	    */
+
+    pj_uint32_t		     rtcp_last_tx;  /**< RTCP tx time in timestamp  */
+    pj_uint32_t		     rtcp_interval; /**< Interval, in timestamp.    */
+
+    /* RFC 2833 DTMF transmission queue: */
+    int			     tx_event_pt;   /**< Outgoing pt for dtmf.	    */
+    int			     tx_dtmf_count; /**< # of digits in tx dtmf buf.*/
+    struct dtmf		     tx_dtmf_buf[32];/**< Outgoing dtmf queue.	    */
+
+    /* Incoming DTMF: */
+    int			     rx_event_pt;   /**< Incoming pt for dtmf.	    */
+    int			     last_dtmf;	    /**< Current digit, or -1.	    */
+    pj_uint32_t		     last_dtmf_dur; /**< Start ts for cur digit.    */
+    unsigned		     rx_dtmf_count; /**< # of digits in dtmf rx buf.*/
+    char		     rx_dtmf_buf[32];/**< Incoming DTMF buffer.	    */
+
+    /* DTMF callback */
+    void		    (*dtmf_cb)(pjmedia_stream*, void*, int);
+    void		     *dtmf_cb_user_data;
+};
+
+
+/* RFC 2833 digit */
+static const char digitmap[16] = { '0', '1', '2', '3', 
+				   '4', '5', '6', '7', 
+				   '8', '9', '*', '#',
+				   'A', 'B', 'C', 'D'};
+
+/* Zero PCM frame */
+#define ZERO_PCM_MAX_SIZE   1920    /* 40ms worth of PCM @ 48KHz */
+static pj_int16_t zero_frame[ZERO_PCM_MAX_SIZE];
+
+
+/*
+ * Print error.
+ */
+static void stream_perror(const char *sender, const char *title,
+			  pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    pj_strerror(status, errmsg, sizeof(errmsg));
+    PJ_LOG(4,(sender, "%s: %s [err:%d]", title, errmsg, status));
+}
+
+
+/*
+ * play_callback()
+ *
+ * This callback is called by sound device's player thread when it
+ * needs to feed the player with some frames.
+ */
+static pj_status_t get_frame( pjmedia_port *port, pjmedia_frame *frame)
+{
+    pjmedia_stream *stream = port->port_data.pdata;
+    pjmedia_channel *channel = stream->dec;
+    unsigned samples_count, samples_per_frame, samples_required;
+    pj_int16_t *p_out_samp;
+    pj_status_t status;
+
+
+    /* Return no frame is channel is paused */
+    if (channel->paused) {
+	frame->type = PJMEDIA_FRAME_TYPE_NONE;
+	return PJ_SUCCESS;
+    }
+
+    /* Repeat get frame from the jitter buffer and decode the frame
+     * until we have enough frames according to codec's ptime.
+     */
+
+    /* Lock jitter buffer mutex first */
+    pj_mutex_lock( stream->jb_mutex );
+
+    samples_required = stream->port.info.samples_per_frame;
+    samples_per_frame = stream->codec_param.info.frm_ptime *
+			stream->codec_param.info.clock_rate *
+			stream->codec_param.info.channel_cnt / 
+			1000;
+    p_out_samp = frame->buf;
+
+    for (samples_count=0; samples_count < samples_required; 
+	 samples_count += samples_per_frame) 
+    {
+	char frame_type;
+
+	/* Get frame from jitter buffer. */
+	pjmedia_jbuf_get_frame(stream->jb, channel->out_pkt, &frame_type);
+	
+	if (frame_type == PJMEDIA_JB_MISSING_FRAME) {
+	    
+	    /* Activate PLC */
+	    if (stream->codec->op->recover && 
+		stream->codec_param.setting.plc) 
+	    {
+		pjmedia_frame frame_out;
+
+		frame_out.buf = p_out_samp + samples_count;
+		frame_out.size = frame->size - samples_count*2;
+		status = (*stream->codec->op->recover)(stream->codec,
+						       frame_out.size,
+						       &frame_out);
+
+	    } else {
+		status = -1;
+	    }
+
+	    if (status != PJ_SUCCESS) {
+		/* Either PLC failed or PLC not supported/enabled */
+		pjmedia_zero_samples(p_out_samp + samples_count,
+				     samples_required - samples_count);
+		PJ_LOG(5,(stream->port.info.name.ptr,  "Frame lost!"));
+
+	    } else {
+		PJ_LOG(5,(stream->port.info.name.ptr, 
+			  "Lost frame recovered"));
+	    }
+	    
+	} else if (frame_type == PJMEDIA_JB_ZERO_EMPTY_FRAME) {
+
+	    /* Jitter buffer is empty. If this is the first "empty" state,
+	     * activate PLC to smoothen the fade-out, otherwise zero
+	     * the frame. 
+	     */
+	    if (frame_type != stream->jb_last_frm) {
+		pjmedia_jb_state jb_state;
+
+		/* Activate PLC to smoothen the missing frame */
+		if (stream->codec->op->recover && 
+		    stream->codec_param.setting.plc) 
+		{
+		    pjmedia_frame frame_out;
+
+		    do {
+			frame_out.buf = p_out_samp + samples_count;
+			frame_out.size = frame->size - samples_count*2;
+			status = (*stream->codec->op->recover)(stream->codec,
+							       frame_out.size,
+							       &frame_out);
+			if (status != PJ_SUCCESS)
+			    break;
+			samples_count += samples_per_frame;
+
+		    } while (samples_count < samples_required);
+
+		} 
+
+		/* Report the state of jitter buffer */
+		pjmedia_jbuf_get_state(stream->jb, &jb_state);
+		PJ_LOG(5,(stream->port.info.name.ptr, 
+			  "Jitter buffer empty (prefetch=%d)", 
+			  jb_state.prefetch));
+
+	    }
+
+	    if (samples_count < samples_required) {
+		pjmedia_zero_samples(p_out_samp + samples_count,
+				     samples_required - samples_count);
+		samples_count = samples_required;
+	    }
+
+	    stream->jb_last_frm = frame_type;
+	    break;
+
+	} else if (frame_type != PJMEDIA_JB_NORMAL_FRAME) {
+
+	    pjmedia_jb_state jb_state;
+
+	    /* It can only be PJMEDIA_JB_ZERO_PREFETCH frame */
+	    pj_assert(frame_type == PJMEDIA_JB_ZERO_PREFETCH_FRAME);
+
+	    /* Get the state of jitter buffer */
+	    pjmedia_jbuf_get_state(stream->jb, &jb_state);
+
+	    /* Always activate PLC when it's available.. */
+	    if (stream->codec->op->recover && 
+		stream->codec_param.setting.plc) 
+	    {
+		pjmedia_frame frame_out;
+
+		do {
+		    frame_out.buf = p_out_samp + samples_count;
+		    frame_out.size = frame->size - samples_count*2;
+		    status = (*stream->codec->op->recover)(stream->codec,
+							   frame_out.size,
+							   &frame_out);
+		    if (status != PJ_SUCCESS)
+			break;
+		    samples_count += samples_per_frame;
+
+		} while (samples_count < samples_required);
+
+		if (stream->jb_last_frm != frame_type) {
+		    PJ_LOG(5,(stream->port.info.name.ptr, 
+			      "Jitter buffer is bufferring with plc (prefetch=%d)",
+			      jb_state.prefetch));
+		}
+
+	    } 
+
+	    if (samples_count < samples_required) {
+		pjmedia_zero_samples(p_out_samp + samples_count,
+				     samples_required - samples_count);
+		samples_count = samples_required;
+		PJ_LOG(5,(stream->port.info.name.ptr, 
+			  "Jitter buffer is bufferring (prefetch=%d)..", 
+			  jb_state.prefetch));
+	    }
+
+	    stream->jb_last_frm = frame_type;
+	    break;
+
+	} else {
+	    /* Got "NORMAL" frame from jitter buffer */
+	    pjmedia_frame frame_in, frame_out;
+
+	    /* Decode */
+	    frame_in.buf = channel->out_pkt;
+	    frame_in.size = stream->frame_size;
+	    frame_in.type = PJMEDIA_FRAME_TYPE_AUDIO;  /* ignored */
+
+	    frame_out.buf = p_out_samp + samples_count;
+	    frame_out.size = frame->size - samples_count*BYTES_PER_SAMPLE;
+	    status = stream->codec->op->decode( stream->codec, &frame_in,
+						frame_out.size, &frame_out);
+	    if (status != 0) {
+		LOGERR_((port->info.name.ptr, "codec decode() error", 
+			 status));
+
+		pjmedia_zero_samples(p_out_samp + samples_count, 
+				     samples_per_frame);
+	    }
+	}
+
+	stream->jb_last_frm = frame_type;
+    }
+
+
+    /* Unlock jitter buffer mutex. */
+    pj_mutex_unlock( stream->jb_mutex );
+
+    /* Return PJMEDIA_FRAME_TYPE_NONE if we have no frames at all
+     * (it can happen when jitter buffer returns PJMEDIA_JB_ZERO_EMPTY_FRAME).
+     */
+    if (samples_count == 0) {
+	frame->type = PJMEDIA_FRAME_TYPE_NONE;
+	frame->size = 0;
+    } else {
+	frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
+	frame->size = samples_count * BYTES_PER_SAMPLE;
+	frame->timestamp.u64 = 0;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Transmit DTMF
+ */
+static void create_dtmf_payload(pjmedia_stream *stream, 
+			  struct pjmedia_frame *frame_out)
+{
+    pjmedia_rtp_dtmf_event *event;
+    struct dtmf *digit = &stream->tx_dtmf_buf[0];
+    unsigned duration;
+    pj_uint32_t cur_ts;
+
+    pj_assert(sizeof(pjmedia_rtp_dtmf_event) == 4);
+
+    event = frame_out->buf;
+    cur_ts = pj_ntohl(stream->enc->rtp.out_hdr.ts);
+    duration = cur_ts - digit->start_ts;
+
+    event->event = (pj_uint8_t)digit->event;
+    event->e_vol = 10;
+    event->duration = pj_htons((pj_uint16_t)duration);
+
+    if (duration >= PJMEDIA_DTMF_DURATION) {
+	event->e_vol |= 0x80;
+
+	/* Prepare next digit. */
+	pj_mutex_lock(stream->jb_mutex);
+	pj_array_erase(stream->tx_dtmf_buf, sizeof(stream->tx_dtmf_buf[0]),
+		       stream->tx_dtmf_count, 0);
+	--stream->tx_dtmf_count;
+
+	stream->tx_dtmf_buf[0].start_ts = cur_ts;
+	pj_mutex_unlock(stream->jb_mutex);
+
+	if (stream->tx_dtmf_count) {
+	    PJ_LOG(5,(stream->port.info.name.ptr,
+		      "Sending DTMF digit id %c", 
+		      digitmap[stream->tx_dtmf_buf[0].event]));
+	}
+
+    } else if (duration == 0) {
+	PJ_LOG(5,(stream->port.info.name.ptr, "Sending DTMF digit id %c", 
+		  digitmap[digit->event]));
+    }
+
+
+    frame_out->size = 4;
+}
+
+
+/**
+ * check_tx_rtcp()
+ *
+ * This function is can be called by either put_frame() or get_frame(),
+ * to transmit periodic RTCP SR/RR report.
+ */
+static void check_tx_rtcp(pjmedia_stream *stream, pj_uint32_t timestamp)
+{
+    /* Note that timestamp may represent local or remote timestamp, 
+     * depending on whether this function is called from put_frame()
+     * or get_frame().
+     */
+
+
+    if (stream->rtcp_last_tx == 0) {
+	
+	stream->rtcp_last_tx = timestamp;
+
+    } else if (timestamp - stream->rtcp_last_tx >= stream->rtcp_interval) {
+	
+	pjmedia_rtcp_pkt *rtcp_pkt;
+	int len;
+
+	pjmedia_rtcp_build_rtcp(&stream->rtcp, &rtcp_pkt, &len);
+
+	(*stream->transport->op->send_rtcp)(stream->transport, 
+					    rtcp_pkt, len);
+
+	stream->rtcp_last_tx = timestamp;
+    }
+
+}
+
+
+/**
+ * Rebuffer the frame when encoder and decoder has different ptime
+ * (such as when different iLBC modes are used by local and remote)
+ */
+static void rebuffer(pjmedia_stream *stream,
+		     pjmedia_frame *frame)
+{
+    /* How many samples are needed */
+    unsigned count;
+
+    /* Normalize frame */
+    if (frame->type != PJMEDIA_FRAME_TYPE_AUDIO)
+	frame->size = 0;
+
+    /* Remove used frame from the buffer. */
+    if (stream->enc_buf_pos) {
+	if (stream->enc_buf_count) {
+	    pj_memmove(stream->enc_buf,
+		       stream->enc_buf + stream->enc_buf_pos,
+		       (stream->enc_buf_count << 1));
+	}
+	stream->enc_buf_pos = 0;
+    }
+
+    /* Make sure we have space to store the new frame */
+    pj_assert(stream->enc_buf_count + (frame->size >> 1) <
+		stream->enc_buf_size);
+
+    /* Append new frame to the buffer */
+    if (frame->size) {
+	pj_memcpy(stream->enc_buf + stream->enc_buf_count,
+		  frame->buf, frame->size);
+	stream->enc_buf_count += (frame->size >> 1);
+    }
+
+    /* How many samples are needed */
+    count = stream->codec_param.info.enc_ptime * 
+		stream->port.info.clock_rate / 1000;
+
+    /* See if we have enough samples */
+    if (stream->enc_buf_count >= count) {
+
+	frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
+	frame->buf = stream->enc_buf;
+	frame->size = (count << 1);
+
+	stream->enc_buf_pos = count;
+	stream->enc_buf_count -= count;
+
+    } else {
+	/* We don't have enough samples */
+	frame->type = PJMEDIA_FRAME_TYPE_NONE;
+    }
+}
+
+
+/**
+ * put_frame_imp()
+ */
+static pj_status_t put_frame_imp( pjmedia_port *port, 
+				  const pjmedia_frame *frame )
+{
+    pjmedia_stream *stream = port->port_data.pdata;
+    pjmedia_channel *channel = stream->enc;
+    pj_status_t status = 0;
+    pjmedia_frame frame_out;
+    unsigned ts_len, samples_per_frame;
+    void *rtphdr;
+    int rtphdrlen;
+
+
+    /* Don't do anything if stream is paused */
+    if (channel->paused) {
+	stream->enc_buf_pos = stream->enc_buf_count = 0;
+	return PJ_SUCCESS;
+    }
+
+    /* Number of samples in the frame */
+    if (frame->type == PJMEDIA_FRAME_TYPE_AUDIO)
+	ts_len = (frame->size >> 1);
+    else
+	ts_len = 0;
+
+    /* Increment transmit duration */
+    stream->tx_duration += ts_len;
+
+    /* Init frame_out buffer. */
+    frame_out.buf = ((char*)channel->out_pkt) + sizeof(pjmedia_rtp_hdr);
+    frame_out.size = 0;
+
+    /* Calculate number of samples per frame */
+    samples_per_frame = stream->enc_samples_per_frame;
+
+
+    /* If we have DTMF digits in the queue, transmit the digits. 
+     * Otherwise encode the PCM buffer.
+     */
+    if (stream->tx_dtmf_count) {
+
+	create_dtmf_payload(stream, &frame_out);
+
+	/* Encapsulate. */
+	status = pjmedia_rtp_encode_rtp( &channel->rtp, 
+					 stream->tx_event_pt, 0, 
+					 frame_out.size, ts_len, 
+					 (const void**)&rtphdr, 
+					 &rtphdrlen);
+
+    } else if (frame->type != PJMEDIA_FRAME_TYPE_NONE) {
+	unsigned ts, codec_samples_per_frame;
+
+	/* Repeatedly call encode if there are multiple frames to be
+	 * sent.
+	 */
+	codec_samples_per_frame = stream->codec_param.info.enc_ptime *
+				  stream->codec_param.info.clock_rate /
+				  1000;
+	if (codec_samples_per_frame == 0) {
+	    codec_samples_per_frame = stream->codec_param.info.frm_ptime *
+				      stream->codec_param.info.clock_rate /
+				      1000;
+	}
+
+	for (ts=0; ts<ts_len; ts += codec_samples_per_frame) {
+	    pjmedia_frame tmp_out_frame, tmp_in_frame;
+	    unsigned bytes_per_sample, max_size;
+
+	    /* Nb of bytes in PCM sample */
+	    bytes_per_sample = stream->codec_param.info.pcm_bits_per_sample/8;
+
+	    /* Split original PCM input frame into base frame size */
+	    tmp_in_frame.timestamp.u64 = frame->timestamp.u64 + ts;
+	    tmp_in_frame.buf = ((char*)frame->buf) + ts * bytes_per_sample;
+	    tmp_in_frame.size = codec_samples_per_frame * bytes_per_sample;
+	    tmp_in_frame.type = PJMEDIA_FRAME_TYPE_AUDIO;
+
+	    /* Set output frame position */
+	    tmp_out_frame.buf = ((char*)frame_out.buf) + frame_out.size;
+
+	    max_size = channel->out_pkt_size - sizeof(pjmedia_rtp_hdr) -
+		       frame_out.size;
+
+	    /* Encode! */
+	    status = stream->codec->op->encode( stream->codec, &tmp_in_frame, 
+						max_size, &tmp_out_frame);
+	    if (status != PJ_SUCCESS) {
+		LOGERR_((stream->port.info.name.ptr, 
+			"Codec encode() error", status));
+		return status;
+	    }
+
+	    /* tmp_out_frame.size may be zero for silence frame. */
+	    frame_out.size += tmp_out_frame.size;
+
+	    /* Stop processing next PCM frame when encode() returns either 
+	     * CNG frame or NULL frame.
+	     */
+	    if (tmp_out_frame.type!=PJMEDIA_FRAME_TYPE_AUDIO || 
+		tmp_out_frame.size==0) 
+	    {
+		break;
+	    }
+
+	}
+
+	/* Encapsulate. */
+	status = pjmedia_rtp_encode_rtp( &channel->rtp, 
+					 channel->pt, 0, 
+					 frame_out.size, ts_len, 
+					 (const void**)&rtphdr, 
+					 &rtphdrlen);
+    } else {
+
+	/* Just update RTP session's timestamp. */
+	status = pjmedia_rtp_encode_rtp( &channel->rtp, 
+					 0, 0, 
+					 0, ts_len, 
+					 (const void**)&rtphdr, 
+					 &rtphdrlen);
+
+    }
+
+    if (status != PJ_SUCCESS) {
+	LOGERR_((stream->port.info.name.ptr, 
+		"RTP encode_rtp() error", status));
+	return status;
+    }
+
+    /* Check if now is the time to transmit RTCP SR/RR report. 
+     * We only do this when stream direction is not "decoding only", because
+     * when it is, check_tx_rtcp() will be handled by get_frame().
+     */
+    if (stream->dir != PJMEDIA_DIR_DECODING) {
+	check_tx_rtcp(stream, pj_ntohl(channel->rtp.out_hdr.ts));
+    }
+
+    /* Do nothing if we have nothing to transmit */
+    if (frame_out.size == 0) {
+	if (stream->is_streaming) {
+	    PJ_LOG(5,(stream->port.info.name.ptr,"Starting silence"));
+	    stream->is_streaming = PJ_FALSE;
+	}
+
+	return PJ_SUCCESS;
+    }
+
+
+    /* Copy RTP header to the beginning of packet */
+    pj_memcpy(channel->out_pkt, rtphdr, sizeof(pjmedia_rtp_hdr));
+
+
+    /* Set RTP marker bit if currently not streaming */
+    if (stream->is_streaming == PJ_FALSE) {
+	pjmedia_rtp_hdr *rtp = channel->out_pkt;
+
+	rtp->m = 1;
+	PJ_LOG(5,(stream->port.info.name.ptr,"Start talksprut.."));
+    }
+
+    stream->is_streaming = PJ_TRUE;
+
+    /* Send the RTP packet to the transport. */
+    (*stream->transport->op->send_rtp)(stream->transport,
+				       channel->out_pkt, 
+				       frame_out.size + 
+					    sizeof(pjmedia_rtp_hdr));
+
+
+    /* Update stat */
+    pjmedia_rtcp_tx_rtp(&stream->rtcp, frame_out.size);
+
+    return PJ_SUCCESS;
+}
+
+
+/**
+ * put_frame()
+ *
+ * This callback is called by upstream component when it has PCM frame
+ * to transmit. This function encodes the PCM frame, pack it into
+ * RTP packet, and transmit to peer.
+ */
+static pj_status_t put_frame( pjmedia_port *port, 
+			      const pjmedia_frame *frame )
+{
+    pjmedia_stream *stream = port->port_data.pdata;
+    pjmedia_frame tmp_zero_frame;
+    unsigned samples_per_frame;
+
+    samples_per_frame = stream->enc_samples_per_frame;
+
+    /* http://www.pjsip.org/trac/ticket/56:
+     *  when input is PJMEDIA_FRAME_TYPE_NONE, feed zero PCM frame
+     *  instead so that encoder can decide whether or not to transmit
+     *  silence frame.
+     */
+    if (frame->type == PJMEDIA_FRAME_TYPE_NONE &&
+	samples_per_frame <= ZERO_PCM_MAX_SIZE) 
+    {
+	pj_memcpy(&tmp_zero_frame, frame, sizeof(pjmedia_frame));
+	frame = &tmp_zero_frame;
+
+	tmp_zero_frame.buf = zero_frame;
+	tmp_zero_frame.size = samples_per_frame * 2;
+	tmp_zero_frame.type = PJMEDIA_FRAME_TYPE_AUDIO;
+    }
+
+#if 0
+    // This is no longer needed because each TYPE_NONE frame will
+    // be converted into zero frame above
+
+    /* If VAD is temporarily disabled during creation, feed zero PCM frame
+     * to the codec.
+     */
+    if (stream->vad_enabled != stream->codec_param.setting.vad &&
+	stream->vad_enabled != 0 &&
+	frame->type == PJMEDIA_FRAME_TYPE_NONE &&
+	samples_per_frame <= ZERO_PCM_MAX_SIZE)
+    {
+	pj_memcpy(&tmp_in_frame, frame, sizeof(pjmedia_frame));
+	frame = &tmp_in_frame;
+
+	tmp_in_frame.buf = zero_frame;
+	tmp_in_frame.size = samples_per_frame * 2;
+	tmp_in_frame.type = PJMEDIA_FRAME_TYPE_AUDIO;
+    }
+#endif
+
+    /* If VAD is temporarily disabled during creation, enable it
+     * after transmitting for VAD_SUSPEND_SEC seconds.
+     */
+    if (stream->vad_enabled != stream->codec_param.setting.vad &&
+	(stream->tx_duration - stream->ts_vad_disabled) > 
+	stream->port.info.clock_rate * PJMEDIA_STREAM_VAD_SUSPEND_MSEC / 1000)
+    {
+	stream->codec_param.setting.vad = stream->vad_enabled;
+	stream->codec->op->modify(stream->codec, &stream->codec_param);
+	PJ_LOG(4,(stream->port.info.name.ptr,"VAD re-enabled"));
+    }
+
+
+    /* If encoder has different ptime than decoder, then the frame must
+     * be passed through the encoding buffer via rebuffer() function.
+     */
+    if (stream->enc_buf != NULL) {
+	pjmedia_frame tmp_rebuffer_frame;
+	pj_status_t status = PJ_SUCCESS;
+
+	/* Copy original frame to temporary frame since we need 
+	 * to modify it.
+	 */
+	pj_memcpy(&tmp_rebuffer_frame, frame, sizeof(pjmedia_frame));
+
+	/* Loop while we have full frame in enc_buffer */
+	for (;;) {
+	    pj_status_t st;
+
+	    /* Run rebuffer() */
+	    rebuffer(stream, &tmp_rebuffer_frame);
+
+	    /* Process this frame */
+	    st = put_frame_imp(port, &tmp_rebuffer_frame);
+	    if (st != PJ_SUCCESS)
+		status = st;
+
+	    /* If we still have full frame in the buffer, re-run
+	     * rebuffer() with NULL frame.
+	     */
+	    if (stream->enc_buf_count >= stream->enc_samples_per_frame) {
+
+		tmp_rebuffer_frame.type = PJMEDIA_FRAME_TYPE_NONE;
+
+	    } else {
+
+		/* Otherwise break */
+		break;
+	    }
+	}
+
+	return status;
+
+    } else {
+	return put_frame_imp(port, frame);
+    }
+}
+
+
+#if 0
+static void dump_bin(const char *buf, unsigned len)
+{
+    unsigned i;
+
+    PJ_LOG(3,(THIS_FILE, "begin dump"));
+    for (i=0; i<len; ++i) {
+	int j;
+	char bits[9];
+	unsigned val = buf[i] & 0xFF;
+
+	bits[8] = '\0';
+	for (j=0; j<8; ++j) {
+	    if (val & (1 << (7-j)))
+		bits[j] = '1';
+	    else
+		bits[j] = '0';
+	}
+
+	PJ_LOG(3,(THIS_FILE, "%2d %s [%d]", i, bits, val));
+    }
+    PJ_LOG(3,(THIS_FILE, "end dump"));
+}
+#endif
+
+/*
+ * Handle incoming DTMF digits.
+ */
+static void handle_incoming_dtmf( pjmedia_stream *stream, 
+				  const void *payload, unsigned payloadlen)
+{
+    const pjmedia_rtp_dtmf_event *event = payload;
+
+    /* Check compiler packing. */
+    pj_assert(sizeof(pjmedia_rtp_dtmf_event)==4);
+
+    /* Must have sufficient length before we proceed. */
+    if (payloadlen < sizeof(pjmedia_rtp_dtmf_event))
+	return;
+
+    //dump_bin(payload, payloadlen);
+
+    /* Check if this is the same/current digit of the last packet. */
+    if (stream->last_dtmf != -1 &&
+	event->event == stream->last_dtmf &&
+	pj_ntohs(event->duration) >= stream->last_dtmf_dur)
+    {
+	/* Yes, this is the same event. */
+	stream->last_dtmf_dur = pj_ntohs(event->duration);
+	return;
+    }
+
+    /* Ignore unknown event. */
+    if (event->event > 15) {
+	PJ_LOG(5,(stream->port.info.name.ptr, 
+		  "Ignored RTP pkt with bad DTMF event %d",
+    		  event->event));
+	return;
+    }
+
+    /* New event! */
+    PJ_LOG(5,(stream->port.info.name.ptr, "Received DTMF digit %c, vol=%d",
+    	      digitmap[event->event],
+    	      (event->e_vol & 0x3F)));
+
+    stream->last_dtmf = event->event;
+    stream->last_dtmf_dur = pj_ntohs(event->duration);
+
+    /* If DTMF callback is installed, call the callback, otherwise keep
+     * the DTMF digits in the buffer.
+     */
+    if (stream->dtmf_cb) {
+
+	stream->dtmf_cb(stream, stream->dtmf_cb_user_data, 
+			digitmap[event->event]);
+
+    } else {
+	/* By convention, we use jitter buffer's mutex to access shared
+	 * DTMF variables.
+	 */
+	pj_mutex_lock(stream->jb_mutex);
+	if (stream->rx_dtmf_count >= PJ_ARRAY_SIZE(stream->rx_dtmf_buf)) {
+	    /* DTMF digits overflow.  Discard the oldest digit. */
+	    pj_array_erase(stream->rx_dtmf_buf, 
+			   sizeof(stream->rx_dtmf_buf[0]),
+			   stream->rx_dtmf_count, 0);
+	    --stream->rx_dtmf_count;
+	}
+	stream->rx_dtmf_buf[stream->rx_dtmf_count++] = digitmap[event->event];
+	pj_mutex_unlock(stream->jb_mutex);
+    }
+}
+
+
+/*
+ * This callback is called by stream transport on receipt of packets
+ * in the RTP socket. 
+ */
+static void on_rx_rtp( void *data, 
+		       const void *pkt,
+                       pj_ssize_t bytes_read)
+
+{
+    pjmedia_stream *stream = data;
+    pjmedia_channel *channel = stream->dec;
+    const pjmedia_rtp_hdr *hdr;
+    const void *payload;
+    unsigned payloadlen;
+    pjmedia_rtp_status seq_st;
+    pj_status_t status;
+
+
+    /* Check for errors */
+    if (bytes_read < 0) {
+	LOGERR_((stream->port.info.name.ptr, "RTP recv() error", -bytes_read));
+	return;
+    }
+
+    /* Ignore keep-alive packets */
+    if (bytes_read < sizeof(pjmedia_rtp_hdr))
+	return;
+
+    /* Update RTP and RTCP session. */
+    status = pjmedia_rtp_decode_rtp(&channel->rtp, pkt, bytes_read,
+				    &hdr, &payload, &payloadlen);
+    if (status != PJ_SUCCESS) {
+	LOGERR_((stream->port.info.name.ptr, "RTP decode error", status));
+	stream->rtcp.stat.rx.discard++;
+	return;
+    }
+
+
+    /* Inform RTCP session */
+    pjmedia_rtcp_rx_rtp(&stream->rtcp, pj_ntohs(hdr->seq),
+			pj_ntohl(hdr->ts), payloadlen);
+
+    /* Ignore the packet if decoder is paused */
+    if (channel->paused)
+	return;
+
+    /* Handle incoming DTMF. */
+    if (hdr->pt == stream->rx_event_pt) {
+	handle_incoming_dtmf(stream, payload, payloadlen);
+	return;
+    }
+
+    /* Update RTP session (also checks if RTP session can accept
+     * the incoming packet.
+     */
+    pjmedia_rtp_session_update(&channel->rtp, hdr, &seq_st);
+    if (seq_st.status.value) {
+	TRC_  ((stream->port.info.name.ptr, 
+		"RTP status: badpt=%d, badssrc=%d, dup=%d, "
+		"outorder=%d, probation=%d, restart=%d", 
+		seq_st.status.flag.badpt,
+		seq_st.status.flag.badssrc,
+		seq_st.status.flag.dup,
+		seq_st.status.flag.outorder,
+		seq_st.status.flag.probation,
+		seq_st.status.flag.restart));
+
+	if (seq_st.status.flag.badpt) {
+	    PJ_LOG(4,(stream->port.info.name.ptr,
+		      "Bad RTP pt %d (expecting %d)",
+		      hdr->pt, channel->rtp.out_pt));
+	}
+    }
+
+    /* Skip bad RTP packet */
+    if (seq_st.status.flag.bad)
+	return;
+
+
+    /* Put "good" packet to jitter buffer, or reset the jitter buffer
+     * when RTP session is restarted.
+     */
+    pj_mutex_lock( stream->jb_mutex );
+    if (seq_st.status.flag.restart) {
+	status = pjmedia_jbuf_reset(stream->jb);
+	PJ_LOG(4,(stream->port.info.name.ptr, "Jitter buffer reset"));
+
+    } else {
+	/*
+	 * Packets may contain more than one frames, while the jitter
+	 * buffer can only take one frame per "put" operation. So we need
+	 * to ask the codec to "parse" the payload into multiple frames.
+	 */
+	enum { MAX = 16 };
+	pj_timestamp ts;
+	unsigned i, count = MAX;
+	unsigned samples_per_frame;
+	pjmedia_frame frames[MAX];
+
+	/* Get the timestamp of the first sample */
+	ts.u64 = pj_ntohl(hdr->ts);
+
+	/* Parse the payload. */
+	status = (*stream->codec->op->parse)(stream->codec,
+					     (void*)payload,
+					     payloadlen,
+					     &ts,
+					     &count,
+					     frames);
+	if (status != PJ_SUCCESS) {
+	    LOGERR_((stream->port.info.name.ptr, 
+		     "Codec parse() error", 
+		     status));
+	    count = 0;
+	}
+
+	/* Put each frame to jitter buffer. */
+	samples_per_frame = stream->codec_param.info.frm_ptime * 
+			    stream->codec_param.info.clock_rate *
+			    stream->codec_param.info.channel_cnt /
+			    1000;
+			    
+	for (i=0; i<count; ++i) {
+	    unsigned ext_seq;
+
+	    ext_seq = (unsigned)(frames[i].timestamp.u64 /
+				 samples_per_frame);
+	    pjmedia_jbuf_put_frame(stream->jb, frames[i].buf, 
+				   frames[i].size, ext_seq);
+
+	}
+    }
+    pj_mutex_unlock( stream->jb_mutex );
+
+
+    /* Check if now is the time to transmit RTCP SR/RR report.
+     * We only do this when stream direction is "decoding only", 
+     * because otherwise check_tx_rtcp() will be handled by put_frame()
+     */
+    if (stream->dir == PJMEDIA_DIR_DECODING) {
+	check_tx_rtcp(stream, pj_ntohl(hdr->ts));
+    }
+
+    if (status != 0) {
+	LOGERR_((stream->port.info.name.ptr, "Jitter buffer put() error", 
+		status));
+	return;
+    }
+}
+
+
+/*
+ * This callback is called by stream transport on receipt of packets
+ * in the RTCP socket. 
+ */
+static void on_rx_rtcp( void *data,
+                        const void *pkt, 
+                        pj_ssize_t bytes_read)
+{
+    pjmedia_stream *stream = data;
+
+    /* Check for errors */
+    if (bytes_read < 0) {
+	LOGERR_((stream->port.info.name.ptr, "RTCP recv() error", 
+		 -bytes_read));
+	return;
+    }
+
+    pjmedia_rtcp_rx_rtcp(&stream->rtcp, pkt, bytes_read);
+}
+
+
+/*
+ * Create media channel.
+ */
+static pj_status_t create_channel( pj_pool_t *pool,
+				   pjmedia_stream *stream,
+				   pjmedia_dir dir,
+				   unsigned pt,
+				   const pjmedia_stream_info *param,
+				   pjmedia_channel **p_channel)
+{
+    pjmedia_channel *channel;
+    pj_status_t status;
+    
+    /* Allocate memory for channel descriptor */
+
+    channel = pj_pool_zalloc(pool, sizeof(pjmedia_channel));
+    PJ_ASSERT_RETURN(channel != NULL, PJ_ENOMEM);
+
+    /* Init channel info. */
+
+    channel->stream = stream;
+    channel->dir = dir;
+    channel->paused = 1;
+    channel->pt = pt;
+
+    /* Allocate buffer for incoming packet. */
+
+    channel->in_pkt_size = PJMEDIA_MAX_MTU;
+    channel->in_pkt = pj_pool_alloc( pool, channel->in_pkt_size );
+    PJ_ASSERT_RETURN(channel->in_pkt != NULL, PJ_ENOMEM);
+
+    
+    /* Allocate buffer for outgoing packet. */
+
+    channel->out_pkt_size = sizeof(pjmedia_rtp_hdr) + 
+			    stream->codec_param.info.avg_bps/8 * 
+			    PJMEDIA_MAX_FRAME_DURATION_MS / 
+			    1000;
+
+    if (channel->out_pkt_size > PJMEDIA_MAX_MTU)
+	channel->out_pkt_size = PJMEDIA_MAX_MTU;
+
+    channel->out_pkt = pj_pool_alloc(pool, channel->out_pkt_size);
+    PJ_ASSERT_RETURN(channel->out_pkt != NULL, PJ_ENOMEM);
+
+
+
+    /* Create RTP and RTCP sessions: */
+
+    status = pjmedia_rtp_session_init(&channel->rtp, pt, param->ssrc);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Done. */
+    *p_channel = channel;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create media stream.
+ */
+PJ_DEF(pj_status_t) pjmedia_stream_create( pjmedia_endpt *endpt,
+					   pj_pool_t *pool,
+					   const pjmedia_stream_info *info,
+					   pjmedia_transport *tp,
+					   void *user_data,
+					   pjmedia_stream **p_stream)
+
+{
+    enum { M = 32 };
+    pjmedia_stream *stream;
+    pj_str_t name;
+    unsigned jb_init, jb_max, jb_min_pre, jb_max_pre;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(pool && info && p_stream, PJ_EINVAL);
+
+
+    /* Allocate the media stream: */
+
+    stream = pj_pool_zalloc(pool, sizeof(pjmedia_stream));
+    PJ_ASSERT_RETURN(stream != NULL, PJ_ENOMEM);
+
+    /* Init stream/port name */
+    name.ptr = pj_pool_alloc(pool, M);
+    name.slen = pj_ansi_snprintf(name.ptr, M, "strm%p", stream);
+
+
+    /* Init some port-info. Some parts of the info will be set later
+     * once we have more info about the codec.
+     */
+    pjmedia_port_info_init(&stream->port.info, &name,
+			   PJMEDIA_PORT_SIGNATURE('S', 'T', 'R', 'M'),
+			   info->fmt.clock_rate, info->fmt.channel_cnt,
+			   16, 80);
+
+    /* Init port. */
+
+    pj_strdup(pool, &stream->port.info.encoding_name, &info->fmt.encoding_name);
+    stream->port.info.clock_rate = info->fmt.clock_rate;
+    stream->port.info.channel_count = info->fmt.channel_cnt;
+    stream->port.port_data.pdata = stream;
+    stream->port.put_frame = &put_frame;
+    stream->port.get_frame = &get_frame;
+
+
+    /* Init stream: */
+    stream->endpt = endpt;
+    stream->codec_mgr = pjmedia_endpt_get_codec_mgr(endpt);
+    stream->dir = info->dir;
+    stream->user_data = user_data;
+    stream->rtcp_interval = (PJMEDIA_RTCP_INTERVAL + (pj_rand() % 8000)) * 
+			    info->fmt.clock_rate / 1000;
+
+    stream->tx_event_pt = info->tx_event_pt ? info->tx_event_pt : -1;
+    stream->rx_event_pt = info->rx_event_pt ? info->rx_event_pt : -1;
+    stream->last_dtmf = -1;
+
+
+    /* Create mutex to protect jitter buffer: */
+
+    status = pj_mutex_create_simple(pool, NULL, &stream->jb_mutex);
+    if (status != PJ_SUCCESS)
+	goto err_cleanup;
+
+
+    /* Create and initialize codec: */
+
+    status = pjmedia_codec_mgr_alloc_codec( stream->codec_mgr,
+					    &info->fmt, &stream->codec);
+    if (status != PJ_SUCCESS)
+	goto err_cleanup;
+
+
+    /* Get codec param: */
+    if (info->param)
+	stream->codec_param = *info->param;
+    else {
+	status = pjmedia_codec_mgr_get_default_param(stream->codec_mgr, 
+						     &info->fmt, 
+						     &stream->codec_param);
+	if (status != PJ_SUCCESS)
+	    goto err_cleanup;
+    }
+
+    /* Check for invalid frame per packet. */
+    if (stream->codec_param.setting.frm_per_pkt < 1)
+	stream->codec_param.setting.frm_per_pkt = 1;
+
+    /* Set additional info. */
+    stream->port.info.bits_per_sample = 16;
+    stream->port.info.samples_per_frame = info->fmt.clock_rate * 
+					  stream->codec_param.info.frm_ptime *
+					  stream->codec_param.setting.frm_per_pkt /
+					  1000;
+    stream->port.info.bytes_per_frame = stream->codec_param.info.avg_bps/8 * 
+					stream->codec_param.info.frm_ptime *
+					stream->codec_param.setting.frm_per_pkt /
+					1000;
+
+
+    /* Open the codec: */
+
+    status = stream->codec->op->open(stream->codec, &stream->codec_param);
+    if (status != PJ_SUCCESS)
+	goto err_cleanup;
+
+    /* If encoder and decoder's ptime are asymmetric, then we need to
+     * create buffer on the encoder side. This could happen for example
+     * with iLBC 
+     */
+    if (stream->codec_param.info.enc_ptime!=0 &&
+	stream->codec_param.info.enc_ptime!=stream->codec_param.info.frm_ptime)
+    {
+	unsigned ptime;
+
+	stream->enc_samples_per_frame = stream->codec_param.info.enc_ptime *
+					stream->port.info.clock_rate / 1000;
+
+	/* Set buffer size as twice the largest ptime value between
+	 * stream's ptime, encoder ptime, or decoder ptime.
+	 */
+
+	ptime = stream->port.info.samples_per_frame * 1000 /
+		stream->port.info.clock_rate;
+
+	if (stream->codec_param.info.enc_ptime > ptime)
+	    ptime = stream->codec_param.info.enc_ptime;
+
+	if (stream->codec_param.info.frm_ptime > ptime)
+	    ptime = stream->codec_param.info.frm_ptime;
+
+	ptime <<= 1;
+
+	/* Allocate buffer */
+	stream->enc_buf_size = stream->port.info.clock_rate * ptime / 1000;
+	stream->enc_buf = pj_pool_alloc(pool, stream->enc_buf_size * 2);
+
+    } else {
+	stream->enc_samples_per_frame = stream->port.info.samples_per_frame;
+    }
+
+    /* Initially disable the VAD in the stream, to help traverse NAT better */
+    stream->vad_enabled = stream->codec_param.setting.vad;
+    if (stream->vad_enabled) {
+	stream->codec_param.setting.vad = 0;
+	stream->ts_vad_disabled = 0;
+	stream->codec->op->modify(stream->codec, &stream->codec_param);
+	PJ_LOG(4,(stream->port.info.name.ptr,"VAD temporarily disabled"));
+    }
+
+    /* Get the frame size: */
+
+    stream->frame_size = ((stream->codec_param.info.avg_bps + 7) / 8) * 
+			  stream->codec_param.info.frm_ptime / 1000;
+
+
+    /* Init RTCP session: */
+
+    pjmedia_rtcp_init(&stream->rtcp, stream->port.info.name.ptr,
+		      info->fmt.clock_rate, 
+		      stream->port.info.samples_per_frame, 
+		      info->ssrc);
+
+
+    /* Init jitter buffer parameters: */
+    if (info->jb_max > 0)
+	jb_max = info->jb_max;
+    else
+	jb_max = 360 / stream->codec_param.info.frm_ptime;
+
+    if (info->jb_min_pre >= 0)
+	jb_min_pre = info->jb_min_pre;
+    else
+	jb_min_pre = 60 / stream->codec_param.info.frm_ptime;
+
+    if (info->jb_max_pre > 0)
+	jb_max_pre = info->jb_max_pre;
+    else
+	jb_max_pre = 240 / stream->codec_param.info.frm_ptime;
+
+    if (info->jb_init >= 0)
+	jb_init = info->jb_init;
+    else
+	jb_init = (jb_min_pre + jb_max_pre) / 2;
+
+
+    /* Create jitter buffer */
+    status = pjmedia_jbuf_create(pool, &stream->port.info.name,
+				 stream->frame_size, 
+				 stream->codec_param.info.frm_ptime,
+				 jb_max, &stream->jb);
+    if (status != PJ_SUCCESS)
+	goto err_cleanup;
+
+
+    /* Set up jitter buffer */
+    pjmedia_jbuf_set_adaptive( stream->jb, jb_init, jb_min_pre, jb_max_pre);
+
+    /* Create decoder channel: */
+
+    status = create_channel( pool, stream, PJMEDIA_DIR_DECODING, 
+			     info->fmt.pt, info, &stream->dec);
+    if (status != PJ_SUCCESS)
+	goto err_cleanup;
+
+
+    /* Create encoder channel: */
+
+    status = create_channel( pool, stream, PJMEDIA_DIR_ENCODING, 
+			     info->tx_pt, info, &stream->enc);
+    if (status != PJ_SUCCESS)
+	goto err_cleanup;
+
+
+    /* Only attach transport when stream is ready. */
+    status = pjmedia_transport_attach(tp, stream, &info->rem_addr, 
+				      &info->rem_rtcp, sizeof(info->rem_addr), 
+                                      &on_rx_rtp, &on_rx_rtcp);
+    if (status != PJ_SUCCESS)
+	goto err_cleanup;
+
+    stream->transport = tp;
+
+
+    /* Success! */
+    *p_stream = stream;
+
+    PJ_LOG(5,(THIS_FILE, "Stream %s created", stream->port.info.name.ptr));
+    return PJ_SUCCESS;
+
+
+err_cleanup:
+    pjmedia_stream_destroy(stream);
+    return status;
+}
+
+
+/*
+ * Destroy stream.
+ */
+PJ_DEF(pj_status_t) pjmedia_stream_destroy( pjmedia_stream *stream )
+{
+
+    PJ_ASSERT_RETURN(stream != NULL, PJ_EINVAL);
+
+
+    /* This function may be called when stream is partly initialized. */
+    if (stream->jb_mutex)
+	pj_mutex_lock(stream->jb_mutex);
+
+
+    /* Detach from transport */
+    if (stream->transport) {
+	(*stream->transport->op->detach)(stream->transport, stream);
+	stream->transport = NULL;
+    }
+
+    /* Free codec. */
+
+    if (stream->codec) {
+	stream->codec->op->close(stream->codec);
+	pjmedia_codec_mgr_dealloc_codec(stream->codec_mgr, stream->codec);
+	stream->codec = NULL;
+    }
+
+    /* Free mutex */
+    
+    if (stream->jb_mutex) {
+	pj_mutex_destroy(stream->jb_mutex);
+	stream->jb_mutex = NULL;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * Get the port interface.
+ */
+PJ_DEF(pj_status_t) pjmedia_stream_get_port( pjmedia_stream *stream,
+					     pjmedia_port **p_port )
+{
+    *p_port = &stream->port;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get the transport object
+ */
+PJ_DEF(pjmedia_transport*) pjmedia_stream_get_transport(pjmedia_stream *st)
+{
+    return st->transport;
+}
+
+
+/*
+ * Start stream.
+ */
+PJ_DEF(pj_status_t) pjmedia_stream_start(pjmedia_stream *stream)
+{
+
+    PJ_ASSERT_RETURN(stream && stream->enc && stream->dec, PJ_EINVALIDOP);
+
+    if (stream->enc && (stream->dir & PJMEDIA_DIR_ENCODING)) {
+	stream->enc->paused = 0;
+	//pjmedia_snd_stream_start(stream->enc->snd_stream);
+	PJ_LOG(4,(stream->port.info.name.ptr, "Encoder stream started"));
+    } else {
+	PJ_LOG(4,(stream->port.info.name.ptr, "Encoder stream paused"));
+    }
+
+    if (stream->dec && (stream->dir & PJMEDIA_DIR_DECODING)) {
+	stream->dec->paused = 0;
+	//pjmedia_snd_stream_start(stream->dec->snd_stream);
+	PJ_LOG(4,(stream->port.info.name.ptr, "Decoder stream started"));
+    } else {
+	PJ_LOG(4,(stream->port.info.name.ptr, "Decoder stream paused"));
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get stream statistics.
+ */
+PJ_DEF(pj_status_t) pjmedia_stream_get_stat( const pjmedia_stream *stream,
+					     pjmedia_rtcp_stat *stat)
+{
+    PJ_ASSERT_RETURN(stream && stat, PJ_EINVAL);
+
+    pj_memcpy(stat, &stream->rtcp.stat, sizeof(pjmedia_rtcp_stat));
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Pause stream.
+ */
+PJ_DEF(pj_status_t) pjmedia_stream_pause( pjmedia_stream *stream,
+					  pjmedia_dir dir)
+{
+    PJ_ASSERT_RETURN(stream, PJ_EINVAL);
+
+    if ((dir & PJMEDIA_DIR_ENCODING) && stream->enc) {
+	stream->enc->paused = 1;
+	PJ_LOG(4,(stream->port.info.name.ptr, "Encoder stream paused"));
+    }
+
+    if ((dir & PJMEDIA_DIR_DECODING) && stream->dec) {
+	stream->dec->paused = 1;
+
+	/* Also reset jitter buffer */
+	pj_mutex_lock( stream->jb_mutex );
+	pjmedia_jbuf_reset(stream->jb);
+	pj_mutex_unlock( stream->jb_mutex );
+
+	PJ_LOG(4,(stream->port.info.name.ptr, "Decoder stream paused"));
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Resume stream
+ */
+PJ_DEF(pj_status_t) pjmedia_stream_resume( pjmedia_stream *stream,
+					   pjmedia_dir dir)
+{
+    PJ_ASSERT_RETURN(stream, PJ_EINVAL);
+
+    if ((dir & PJMEDIA_DIR_ENCODING) && stream->enc) {
+	stream->enc->paused = 0;
+	PJ_LOG(4,(stream->port.info.name.ptr, "Encoder stream resumed"));
+    }
+
+    if ((dir & PJMEDIA_DIR_DECODING) && stream->dec) {
+	stream->dec->paused = 0;
+	PJ_LOG(4,(stream->port.info.name.ptr, "Decoder stream resumed"));
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Dial DTMF
+ */
+PJ_DEF(pj_status_t) pjmedia_stream_dial_dtmf( pjmedia_stream *stream,
+					      const pj_str_t *digit_char)
+{
+    pj_status_t status = PJ_SUCCESS;
+
+    /* By convention we use jitter buffer mutex to access DTMF
+     * queue.
+     */
+    PJ_ASSERT_RETURN(stream && digit_char, PJ_EINVAL);
+
+    /* Check that remote can receive DTMF events. */
+    if (stream->tx_event_pt < 0) {
+	return PJMEDIA_RTP_EREMNORFC2833;
+    }
+    
+    pj_mutex_lock(stream->jb_mutex);
+    
+    if (stream->tx_dtmf_count+digit_char->slen >=
+	PJ_ARRAY_SIZE(stream->tx_dtmf_buf))
+    {
+	status = PJ_ETOOMANY;
+    } else {
+	int i;
+
+	/* convert ASCII digits into payload type first, to make sure
+	 * that all digits are valid. 
+	 */
+	for (i=0; i<digit_char->slen; ++i) {
+	    unsigned pt;
+	    int dig = pj_tolower(digit_char->ptr[i]);
+
+	    if (dig >= '0' && dig <= '9')
+	    {
+		pt = dig - '0';
+	    } 
+	    else if (dig >= 'a' && dig <= 'd')
+	    {
+		pt = dig - 'a' + 12;
+	    }
+	    else if (dig == '*')
+	    {
+		pt = 10;
+	    }
+	    else if (dig == '#')
+	    {
+		pt = 11;
+	    }
+	    else
+	    {
+		status = PJMEDIA_RTP_EINDTMF;
+		break;
+	    }
+
+	    stream->tx_dtmf_buf[stream->tx_dtmf_count+i].event = pt;
+	}
+
+	if (status != PJ_SUCCESS)
+	    goto on_return;
+
+	/* Init start_ts and end_ts only for the first digit.
+	 * Subsequent digits are initialized on the fly.
+	 */
+	if (stream->tx_dtmf_count ==0) {
+	    pj_uint32_t start_ts;
+
+	    start_ts = pj_ntohl(stream->enc->rtp.out_hdr.ts);
+	    stream->tx_dtmf_buf[0].start_ts = start_ts;
+	}
+
+	/* Increment digit count only if all digits are valid. */
+	stream->tx_dtmf_count += digit_char->slen;
+
+    }
+
+on_return:
+    pj_mutex_unlock(stream->jb_mutex);
+
+    return status;
+}
+
+
+/*
+ * See if we have DTMF digits in the rx buffer.
+ */
+PJ_DEF(pj_bool_t) pjmedia_stream_check_dtmf(pjmedia_stream *stream)
+{
+    return stream->rx_dtmf_count != 0;
+}
+
+
+/*
+ * Retrieve incoming DTMF digits from the stream's DTMF buffer.
+ */
+PJ_DEF(pj_status_t) pjmedia_stream_get_dtmf( pjmedia_stream *stream,
+					     char *digits,
+					     unsigned *size)
+{
+    PJ_ASSERT_RETURN(stream && digits && size, PJ_EINVAL);
+
+    pj_assert(sizeof(stream->rx_dtmf_buf[0]) == 0);
+
+    /* By convention, we use jitter buffer's mutex to access DTMF
+     * digits resources.
+     */
+    pj_mutex_lock(stream->jb_mutex);
+
+    if (stream->rx_dtmf_count < *size)
+	*size = stream->rx_dtmf_count;
+
+    if (*size) {
+	pj_memcpy(digits, stream->rx_dtmf_buf, *size);
+	stream->rx_dtmf_count -= *size;
+	if (stream->rx_dtmf_count) {
+	    pj_memmove(stream->rx_dtmf_buf,
+		       &stream->rx_dtmf_buf[*size],
+		       stream->rx_dtmf_count);
+	}
+    }
+
+    pj_mutex_unlock(stream->jb_mutex);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Set callback to be called upon receiving DTMF digits.
+ */
+PJ_DEF(pj_status_t)
+pjmedia_stream_set_dtmf_callback(pjmedia_stream *stream,
+				 void (*cb)(pjmedia_stream*, 
+					    void *user_data, 
+					    int digit), 
+				 void *user_data)
+{
+    PJ_ASSERT_RETURN(stream, PJ_EINVAL);
+
+    /* By convention, we use jitter buffer's mutex to access DTMF
+     * digits resources.
+     */
+    pj_mutex_lock(stream->jb_mutex);
+
+    stream->dtmf_cb = cb;
+    stream->dtmf_cb_user_data = user_data;
+
+    pj_mutex_unlock(stream->jb_mutex);
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/tonegen.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/tonegen.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/tonegen.c	(revision 1163)
@@ -0,0 +1,617 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/tonegen.h>
+#include <pjmedia/errno.h>
+#include <pj/assert.h>
+#include <pj/ctype.h>
+#include <pj/pool.h>
+
+
+/* float can be twice slower on i686! */
+#define DATA	double
+
+/* amplitude */
+#define AMP	8192
+
+
+#ifndef M_PI
+#   define M_PI  ((DATA)3.141592653589793238462643383279)
+#endif
+
+
+#if defined(PJ_HAS_FLOATING_POINT) && PJ_HAS_FLOATING_POINT!=0
+    /*
+     * Default floating-point based tone generation using sine wave 
+     * generation from:
+     *   http://www.musicdsp.org/showone.php?id=10.
+     * This produces good quality tone in relatively faster time than
+     * the normal sin() generator.
+     * Speed = 40.6 cycles per sample.
+     */
+#   include <math.h>
+    struct gen
+    {
+	DATA a, s0, s1;
+    };
+
+#   define GEN_INIT(var,R,F,A)	 var.a = (DATA) (2.0 * sin(M_PI * F / R)); \
+				 var.s0 = A; \
+				 var.s1 = 0
+#   define GEN_SAMP(val,var)	 var.s0 = var.s0 - var.a * var.s1; \
+				 var.s1 = var.s1 + var.a * var.s0; \
+				 val = (short) var.s0
+
+
+#elif !defined(PJ_HAS_FLOATING_POINT) || PJ_HAS_FLOATING_POINT==0
+    /* 
+     * Fallback algorithm when floating point is disabled.
+     * This is a very fast fixed point tone generation using sine wave
+     * approximation from
+     *    http://www.audiomulch.com/~rossb/code/sinusoids/ 
+     * Quality wise not so good, but it's blazing fast!
+     * Speed: 
+     *	- with volume adjustment: 14 cycles per sample 
+     *  - without volume adjustment: 12.22 cycles per sample
+     */
+    PJ_INLINE(int) approximate_sin3(unsigned x)
+    {	
+	    unsigned s=-(int)(x>>31);
+	    x+=x;
+	    x=x>>16;
+	    x*=x^0xffff;            // x=x*(2-x)
+	    x+=x;                   // optional
+	    return x^s;
+    }
+    struct gen
+    {
+	unsigned add;
+	unsigned c;
+	unsigned vol;
+    };
+
+#   define MAXI			((unsigned)0xFFFFFFFF)
+#   define SIN			approximate_sin3
+#   if 1    /* set this to 0 to disable volume adjustment */
+#	define VOL(var,v)	(((v) * var.vol) >> 16)
+#   else
+#	define VOL(var,v)	(v)
+#   endif
+#   define GEN_INIT(var,R,F,A)	var.add = MAXI/R * F, var.c=0, var.vol=A
+#   define GEN_SAMP(val,var)	val = (short) VOL(var,SIN(var.c)>>16);\
+				var.c += var.add
+
+
+#else
+#   error "Should never get to this part"
+#   include <math.h>
+    /*
+     * Should never really reach here, but anyway it's provided for reference.
+     * This is the good old tone generator using sin().
+     * Speed = 222.5 cycles per sample.
+     */
+    struct gen
+    {
+	DATA add;
+	DATA c;
+	DATA vol;
+    };
+
+#   define GEN_INIT(var,R,F,A) var.add = ((DATA)F)/R, var.c=0, var.vol=A
+#   define GEN_SAMP(val,var)   val = (short)(sin(var.c * 2 * M_PI) * var.vol);\
+			       var.c += var.add
+
+#endif
+
+struct gen_state
+{
+    struct gen tone1;
+    struct gen tone2;
+    pj_bool_t  has_tone2;
+};
+
+
+static void init_generate_single_tone(struct gen_state *state,
+				      unsigned clock_rate, 
+				      unsigned freq,
+				      unsigned vol)
+{
+    GEN_INIT(state->tone1,clock_rate,freq,vol);
+    state->has_tone2 = PJ_FALSE;
+}
+
+static void generate_single_tone(struct gen_state *state,
+				 unsigned channel_count,
+				 unsigned samples,
+				 short buf[]) 
+{
+    short *end = buf + samples;
+
+    if (channel_count==1) {
+
+	while (buf < end) {
+	    GEN_SAMP(*buf++, state->tone1);
+	}
+
+    } else if (channel_count == 2) {
+
+	while (buf < end) {
+	    GEN_SAMP(*buf, state->tone1);
+	    *(buf+1) = *buf;
+	    buf += 2;
+	}
+    }
+}
+
+
+static void init_generate_dual_tone(struct gen_state *state,
+				    unsigned clock_rate, 
+				    unsigned freq1,
+				    unsigned freq2,
+				    unsigned vol)
+{
+    GEN_INIT(state->tone1,clock_rate,freq1,vol);
+    GEN_INIT(state->tone2,clock_rate,freq2,vol);
+    state->has_tone2 = PJ_TRUE;
+}
+
+
+static void generate_dual_tone(struct gen_state *state,
+			       unsigned channel_count,
+			       unsigned samples,
+			       short buf[]) 
+{
+    short *end = buf + samples;
+
+    if (channel_count==1) {
+	int val, val2;
+	while (buf < end) {
+	    GEN_SAMP(val, state->tone1);
+	    GEN_SAMP(val2, state->tone2);
+	    *buf++ = (short)((val+val2) >> 1);
+	}
+    } else if (channel_count == 2) {
+	int val, val2;
+	while (buf < end) {
+
+	    GEN_SAMP(val, state->tone1);
+	    GEN_SAMP(val2, state->tone2);
+	    val = (val + val2) >> 1;
+
+	    *buf++ = (short)val;
+	    *buf++ = (short)val;
+	}
+    }
+}
+
+
+static void init_generate_tone(struct gen_state *state,
+			       unsigned clock_rate, 
+			       unsigned freq1,
+			       unsigned freq2,
+			       unsigned vol)
+{
+    if (freq2)
+	init_generate_dual_tone(state, clock_rate, freq1, freq2 ,vol);
+    else
+	init_generate_single_tone(state, clock_rate, freq1,vol);
+}
+
+
+static void generate_tone(struct gen_state *state,
+			  unsigned channel_count,
+			  unsigned samples,
+			  short buf[])
+{
+    if (!state->has_tone2)
+	generate_single_tone(state, channel_count, samples, buf);
+    else
+	generate_dual_tone(state, channel_count, samples, buf);
+}
+
+
+/****************************************************************************/
+
+#define SIGNATURE   PJMEDIA_PORT_SIGNATURE('t', 'n', 'g', 'n')
+
+struct tonegen
+{
+    pjmedia_port	base;
+
+    /* options */
+    unsigned		options;
+    unsigned		playback_options;
+
+    /* Digit map */
+    pjmedia_tone_digit_map  *digit_map;
+
+    /* Tone generation state */
+    struct gen_state	state;
+
+    /* Currently played digits: */
+    unsigned		count;		    /* # of digits		*/
+    unsigned		cur_digit;	    /* currently played		*/
+    unsigned		dig_samples;	    /* sample pos in cur digit	*/
+    pjmedia_tone_desc	digits[PJMEDIA_TONEGEN_MAX_DIGITS];/* array of digits*/
+};
+
+
+/* Default digit map is DTMF */
+static pjmedia_tone_digit_map digit_map = 
+{
+    16,
+    {
+	{ '0', 941,  1336 },
+	{ '1', 697,  1209 },
+	{ '2', 697,  1336 },
+	{ '3', 697,  1447 },
+	{ '4', 770,  1209 },
+	{ '5', 770,  1336 },
+	{ '6', 770,  1447 },
+	{ '7', 852,  1209 },
+	{ '8', 852,  1336 },
+	{ '9', 852,  1447 },
+	{ 'a', 697,  1633 },
+	{ 'b', 770,  1633 },
+	{ 'c', 852,  1633 },
+	{ 'd', 941,  1633 },
+	{ '*', 941,  1209 },
+	{ '#', 941,  1477 },
+    }
+};
+
+
+static pj_status_t tonegen_get_frame(pjmedia_port *this_port, 
+				     pjmedia_frame *frame);
+
+/*
+ * Create an instance of tone generator with the specified parameters.
+ * When the tone generator is first created, it will be loaded with the
+ * default digit map.
+ */
+PJ_DEF(pj_status_t) pjmedia_tonegen_create2(pj_pool_t *pool,
+					    const pj_str_t *name,
+					    unsigned clock_rate,
+					    unsigned channel_count,
+					    unsigned samples_per_frame,
+					    unsigned bits_per_sample,
+					    unsigned options,
+					    pjmedia_port **p_port)
+{
+    const pj_str_t STR_TONE_GEN = pj_str("tone-gen");
+    struct tonegen  *tonegen;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(pool && clock_rate && channel_count && 
+		     samples_per_frame && bits_per_sample == 16 && 
+		     p_port != NULL, PJ_EINVAL);
+
+    /* Only support mono and stereo */
+    PJ_ASSERT_RETURN(channel_count==1 || channel_count==2, PJ_EINVAL);
+
+    /* Create and initialize port */
+    tonegen = pj_pool_zalloc(pool, sizeof(struct tonegen));
+    if (name == NULL || name->slen == 0) name = &STR_TONE_GEN;
+    status = pjmedia_port_info_init(&tonegen->base.info, name, 
+				    SIGNATURE, clock_rate, channel_count, 
+				    bits_per_sample, samples_per_frame);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    tonegen->options = options;
+    tonegen->base.get_frame = &tonegen_get_frame;
+    tonegen->digit_map = &digit_map;
+
+    /* Done */
+    *p_port = &tonegen->base;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_tonegen_create( pj_pool_t *pool,
+					    unsigned clock_rate,
+					    unsigned channel_count,
+					    unsigned samples_per_frame,
+					    unsigned bits_per_sample,
+					    unsigned options,
+					    pjmedia_port **p_port)
+{
+    return pjmedia_tonegen_create2(pool, NULL, clock_rate, channel_count,
+				   samples_per_frame, bits_per_sample, 
+				   options, p_port);
+}
+
+
+/*
+ * Check if the tone generator is still busy producing some tones.
+ */
+PJ_DEF(pj_bool_t) pjmedia_tonegen_is_busy(pjmedia_port *port)
+{
+    struct tonegen *tonegen = (struct tonegen*) port;
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, PJ_TRUE);
+    return tonegen->count != 0;
+}
+
+
+/*
+ * Instruct the tone generator to stop current processing.
+ */
+PJ_DEF(pj_status_t) pjmedia_tonegen_stop(pjmedia_port *port)
+{
+    struct tonegen *tonegen = (struct tonegen*) port;
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, PJ_EINVAL);
+    tonegen->count = 0;
+    tonegen->cur_digit = 0;
+    tonegen->dig_samples = 0;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Fill a frame with tones.
+ */
+static pj_status_t tonegen_get_frame(pjmedia_port *port, 
+				     pjmedia_frame *frame)
+{
+    struct tonegen *tonegen = (struct tonegen*) port;
+    short *dst, *end;
+    unsigned clock_rate = tonegen->base.info.clock_rate;
+
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, PJ_EINVAL);
+
+    if (tonegen->count == 0) {
+	/* We don't have digits to play */
+	frame->type = PJMEDIA_FRAME_TYPE_NONE;
+	return PJ_SUCCESS;
+    }
+
+    if (tonegen->cur_digit > tonegen->count) {
+	/* We have played all the digits */
+	if ((tonegen->options|tonegen->playback_options)&PJMEDIA_TONEGEN_LOOP)
+	{
+	    /* Reset back to the first tone */
+	    tonegen->cur_digit = 0;
+	    tonegen->dig_samples = 0;
+
+	} else {
+	    tonegen->count = 0;
+	    frame->type = PJMEDIA_FRAME_TYPE_NONE;
+	    return PJ_SUCCESS;
+	}
+    }
+
+    if (tonegen->dig_samples>=(tonegen->digits[tonegen->cur_digit].on_msec+
+			       tonegen->digits[tonegen->cur_digit].off_msec)*
+			       clock_rate / 1000)
+    {
+	/* We have finished with current digit */
+	tonegen->cur_digit++;
+	tonegen->dig_samples = 0;
+    }
+
+    if (tonegen->cur_digit > tonegen->count) {
+	/* After we're finished with the last digit, we have played all 
+	 * the digits 
+	 */
+	if ((tonegen->options|tonegen->playback_options)&PJMEDIA_TONEGEN_LOOP)
+	{
+	    /* Reset back to the first tone */
+	    tonegen->cur_digit = 0;
+	    tonegen->dig_samples = 0;
+
+	} else {
+	    tonegen->count = 0;
+	    frame->type = PJMEDIA_FRAME_TYPE_NONE;
+	    return PJ_SUCCESS;
+	}
+    }
+    
+    dst = frame->buf;
+    end = dst + port->info.samples_per_frame;
+
+    while (dst < end) {
+	const pjmedia_tone_desc *dig = &tonegen->digits[tonegen->cur_digit];
+	unsigned required, cnt, on_samp, off_samp;
+
+	required = end - dst;
+	on_samp = dig->on_msec * clock_rate / 1000;
+	off_samp = dig->off_msec * clock_rate / 1000;
+
+	/* Init tonegen */
+	if (tonegen->dig_samples == 0) {
+	    init_generate_tone(&tonegen->state, port->info.clock_rate,
+			       dig->freq1, dig->freq2, dig->volume);
+	}
+
+	/* Add tone signal */
+	if (tonegen->dig_samples < on_samp) {
+	    cnt = on_samp - tonegen->dig_samples;
+	    if (cnt > required)
+		cnt = required;
+	    generate_tone(&tonegen->state, port->info.channel_count,
+			  cnt, dst);
+	    dst += cnt;
+	    tonegen->dig_samples += cnt;
+	    required -= cnt;
+
+	    if (dst == end)
+		break;
+	}
+
+	/* Add silence signal */
+	cnt = off_samp + on_samp - tonegen->dig_samples;
+	if (cnt > required)
+	    cnt = required;
+	pjmedia_zero_samples(dst, cnt);
+	dst += cnt;
+	tonegen->dig_samples += cnt;
+
+	/* Move to next digit if we're finished with this tone */
+	if (tonegen->dig_samples == on_samp + off_samp) {
+	    tonegen->cur_digit++;
+	    tonegen->dig_samples = 0;
+
+	    if (tonegen->cur_digit >= tonegen->count) {
+		/* All digits have been played */
+		if ((tonegen->options & PJMEDIA_TONEGEN_LOOP) ||
+		    (tonegen->playback_options & PJMEDIA_TONEGEN_LOOP))
+		{
+		    tonegen->cur_digit = 0;
+		} else {
+		    break;
+		}
+	    }
+	}
+    }
+
+    if (dst < end)
+	pjmedia_zero_samples(dst, end-dst);
+
+    frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
+    frame->size = port->info.bytes_per_frame;
+
+    if (tonegen->cur_digit >= tonegen->count) {
+	if ((tonegen->options|tonegen->playback_options)&PJMEDIA_TONEGEN_LOOP)
+	{
+	    /* Reset back to the first tone */
+	    tonegen->cur_digit = 0;
+	    tonegen->dig_samples = 0;
+
+	} else {
+	    tonegen->count = 0;
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Play tones.
+ */
+PJ_DEF(pj_status_t) pjmedia_tonegen_play( pjmedia_port *port,
+					  unsigned count,
+					  const pjmedia_tone_desc tones[],
+					  unsigned options)
+{
+    struct tonegen *tonegen = (struct tonegen*) port;
+    unsigned i;
+
+    PJ_ASSERT_RETURN(port && port->info.signature == SIGNATURE &&
+		     count && tones, PJ_EINVAL);
+
+    /* Don't put more than available buffer */
+    PJ_ASSERT_RETURN(count+tonegen->count <= PJMEDIA_TONEGEN_MAX_DIGITS,
+		     PJ_ETOOMANY);
+
+    /* Set playback options */
+    tonegen->playback_options = options;
+    
+    /* Copy digits */
+    pj_memcpy(tonegen->digits + tonegen->count,
+	      tones, count * sizeof(pjmedia_tone_desc));
+    
+    /* Normalize volume */
+    for (i=0; i<count; ++i) {
+	pjmedia_tone_desc *t = &tonegen->digits[i+tonegen->count];
+	if (t->volume == 0)
+	    t->volume = AMP;
+	else if (t->volume < 0)
+	    t->volume = (short) -t->volume;
+    }
+
+    tonegen->count += count;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Play digits.
+ */
+PJ_DEF(pj_status_t) pjmedia_tonegen_play_digits( pjmedia_port *port,
+						 unsigned count,
+						 const pjmedia_tone_digit digits[],
+						 unsigned options)
+{
+    struct tonegen *tonegen = (struct tonegen*) port;
+    pjmedia_tone_desc tones[PJMEDIA_TONEGEN_MAX_DIGITS];
+    const pjmedia_tone_digit_map *map = tonegen->digit_map;
+    unsigned i;
+
+    PJ_ASSERT_RETURN(port && port->info.signature == SIGNATURE &&
+		     count && digits, PJ_EINVAL);
+    PJ_ASSERT_RETURN(count < PJMEDIA_TONEGEN_MAX_DIGITS, PJ_ETOOMANY);
+
+    for (i=0; i<count; ++i) {
+	int d = pj_tolower(digits[i].digit);
+	unsigned j;
+
+	/* Translate ASCII digits with digitmap */
+	for (j=0; j<map->count; ++j) {
+	    if (d == map->digits[j].digit)
+		break;
+	}
+	if (j == map->count)
+	    return PJMEDIA_RTP_EINDTMF;
+
+	tones[i].freq1 = map->digits[j].freq1;
+	tones[i].freq2 = map->digits[j].freq2;
+	tones[i].on_msec = digits[i].on_msec;
+	tones[i].off_msec = digits[i].off_msec;
+	tones[i].volume = digits[i].volume;
+    }
+
+    return pjmedia_tonegen_play(port, count, tones, options);
+}
+
+
+/*
+ * Get the digit-map currently used by this tone generator.
+ */
+PJ_DEF(pj_status_t) pjmedia_tonegen_get_digit_map(pjmedia_port *port,
+						  const pjmedia_tone_digit_map **m)
+{
+    struct tonegen *tonegen = (struct tonegen*) port;
+    
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, PJ_EINVAL);
+    PJ_ASSERT_RETURN(m != NULL, PJ_EINVAL);
+
+    *m = tonegen->digit_map;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Set digit map to be used by the tone generator.
+ */
+PJ_DEF(pj_status_t) pjmedia_tonegen_set_digit_map(pjmedia_port *port,
+						  pjmedia_tone_digit_map *m)
+{
+    struct tonegen *tonegen = (struct tonegen*) port;
+    
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, PJ_EINVAL);
+    PJ_ASSERT_RETURN(m != NULL, PJ_EINVAL);
+
+    tonegen->digit_map = m;
+
+    return PJ_SUCCESS;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/transport_ice.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/transport_ice.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/transport_ice.c	(revision 1163)
@@ -0,0 +1,727 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/transport_ice.h>
+#include <pjnath/errno.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+
+struct transport_ice
+{
+    pjmedia_transport	 base;
+    pj_ice_strans	*ice_st;
+
+    pj_time_val		 start_ice;
+    
+    void		*stream;
+    pj_sockaddr_in	 remote_rtp;
+    pj_sockaddr_in	 remote_rtcp;
+
+    void	       (*rtp_cb)(void*,
+			         const void*,
+				 pj_ssize_t);
+    void	       (*rtcp_cb)(void*,
+				  const void*,
+				  pj_ssize_t);
+};
+
+
+/*
+ * These are media transport operations.
+ */
+static pj_status_t tp_get_info(pjmedia_transport *tp,
+			       pjmedia_sock_info *info);
+static pj_status_t tp_attach( pjmedia_transport *tp,
+			      void *stream,
+			      const pj_sockaddr_t *rem_addr,
+			      const pj_sockaddr_t *rem_rtcp,
+			      unsigned addr_len,
+			      void (*rtp_cb)(void*,
+					     const void*,
+					     pj_ssize_t),
+			      void (*rtcp_cb)(void*,
+					      const void*,
+					      pj_ssize_t));
+static void	   tp_detach( pjmedia_transport *tp,
+			      void *strm);
+static pj_status_t tp_send_rtp( pjmedia_transport *tp,
+			        const void *pkt,
+			        pj_size_t size);
+static pj_status_t tp_send_rtcp( pjmedia_transport *tp,
+			         const void *pkt,
+			         pj_size_t size);
+
+/*
+ * And these are ICE callbacks.
+ */
+static void ice_on_rx_data(pj_ice_strans *ice_st, unsigned comp_id, 
+			   void *pkt, pj_size_t size,
+			   const pj_sockaddr_t *src_addr,
+			   unsigned src_addr_len);
+static void ice_on_ice_complete(pj_ice_strans *ice_st, 
+			        pj_status_t status);
+
+
+static pjmedia_transport_op tp_ice_op = 
+{
+    &tp_get_info,
+    &tp_attach,
+    &tp_detach,
+    &tp_send_rtp,
+    &tp_send_rtcp,
+    &pjmedia_ice_destroy
+};
+
+
+/*
+ * Create ICE media transport.
+ */
+PJ_DEF(pj_status_t) pjmedia_ice_create(pjmedia_endpt *endpt,
+				       const char *name,
+				       unsigned comp_cnt,
+				       pj_stun_config *stun_cfg,
+	    			       pjmedia_transport **p_tp)
+{
+    pj_ice_strans *ice_st;
+    pj_ice_strans_cb ice_st_cb;
+    struct transport_ice *tp_ice;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(endpt);
+
+    /* Configure ICE callbacks */
+    pj_bzero(&ice_st_cb, sizeof(ice_st_cb));
+    ice_st_cb.on_ice_complete = &ice_on_ice_complete;
+    ice_st_cb.on_rx_data = &ice_on_rx_data;
+
+    /* Create ICE */
+    status = pj_ice_strans_create(stun_cfg, name, comp_cnt, NULL, 
+			      &ice_st_cb, &ice_st);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    /* Create transport instance and attach to ICE */
+    tp_ice = PJ_POOL_ZALLOC_T(ice_st->pool, struct transport_ice);
+    tp_ice->ice_st = ice_st;
+    pj_ansi_strcpy(tp_ice->base.name, ice_st->obj_name);
+    tp_ice->base.op = &tp_ice_op;
+    tp_ice->base.type = PJMEDIA_TRANSPORT_TYPE_ICE;
+
+    ice_st->user_data = (void*)tp_ice;
+
+    /* Done */
+    if (p_tp)
+	*p_tp = &tp_ice->base;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Destroy ICE media transport.
+ */
+PJ_DEF(pj_status_t) pjmedia_ice_destroy(pjmedia_transport *tp)
+{
+    struct transport_ice *tp_ice = (struct transport_ice*)tp;
+
+    if (tp_ice->ice_st) {
+	pj_ice_strans_destroy(tp_ice->ice_st);
+	/*Must not touch tp_ice after ice_st is destroyed!
+	 (it has the pool)
+	 tp_ice->ice_st = NULL;
+	 */
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Start media transport initialization.
+ */
+PJ_DEF(pj_status_t) pjmedia_ice_start_init( pjmedia_transport *tp,
+					    unsigned options,
+					    const pj_sockaddr_in *start_addr,
+					    const pj_sockaddr_in *stun_srv,
+					    const pj_sockaddr_in *turn_srv)
+{
+    struct transport_ice *tp_ice = (struct transport_ice*)tp;
+    pj_status_t status;
+
+    status = pj_ice_strans_set_stun_srv(tp_ice->ice_st, stun_srv, turn_srv);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    status = pj_ice_strans_create_comp(tp_ice->ice_st, 1, options, start_addr);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    if (tp_ice->ice_st->comp_cnt > 1) {
+	pj_sockaddr_in addr;
+	pj_uint16_t port;
+
+	pj_memcpy(&addr, &tp_ice->ice_st->comp[0]->local_addr.ipv4,
+		  sizeof(pj_sockaddr_in));
+	if (start_addr)
+	    addr.sin_addr.s_addr = start_addr->sin_addr.s_addr;
+	else
+	    addr.sin_addr.s_addr = 0;
+
+	port = pj_ntohs(addr.sin_port);
+	++port;
+	addr.sin_port = pj_htons(port);
+	status = pj_ice_strans_create_comp(tp_ice->ice_st, 2, options, &addr);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+    return status;
+}
+
+
+/*
+ * Get the status of media transport initialization.
+ */
+PJ_DEF(pj_status_t) pjmedia_ice_get_init_status(pjmedia_transport *tp)
+{
+    struct transport_ice *tp_ice = (struct transport_ice*)tp;
+    return pj_ice_strans_get_comps_status(tp_ice->ice_st);
+}
+
+
+/*
+ * Get the component for the specified component ID.
+ */
+PJ_DEF(pj_status_t) pjmedia_ice_get_comp( pjmedia_transport *tp,
+					  unsigned comp_id,
+					  pj_ice_strans_comp *comp)
+{
+    struct transport_ice *tp_ice = (struct transport_ice*)tp;
+    PJ_ASSERT_RETURN(tp && comp_id && comp_id <= tp_ice->ice_st->comp_cnt &&
+		     comp, PJ_EINVAL);
+
+    pj_memcpy(comp, tp_ice->ice_st->comp[comp_id-1], sizeof(pj_ice_strans_comp));
+    return PJ_SUCCESS;		    
+}
+
+
+/*
+ * Create ICE! This happens when:
+ *  - UAC is ready to send offer
+ *  - UAS have just received an offer.
+ */
+PJ_DEF(pj_status_t) pjmedia_ice_init_ice(pjmedia_transport *tp,
+					 pj_ice_sess_role role,
+					 const pj_str_t *local_ufrag,
+					 const pj_str_t *local_passwd)
+{
+    struct transport_ice *tp_ice = (struct transport_ice*)tp;
+    return pj_ice_strans_init_ice(tp_ice->ice_st, role, local_ufrag, local_passwd);
+}
+
+
+/*
+ * For both UAC and UAS, pass in the SDP before sending it to remote.
+ * This will add ICE attributes to the SDP.
+ */
+PJ_DEF(pj_status_t) pjmedia_ice_modify_sdp(pjmedia_transport *tp,
+					   pj_pool_t *pool,
+					   pjmedia_sdp_session *sdp)
+{
+    struct transport_ice *tp_ice = (struct transport_ice*)tp;
+    enum { MAXLEN = 256 };
+    char *buffer;
+    pjmedia_sdp_attr *attr;
+    unsigned i, cand_cnt;
+
+    buffer = pj_pool_alloc(pool, MAXLEN);
+
+    /* Create ice-ufrag attribute */
+    attr = pjmedia_sdp_attr_create(pool, "ice-ufrag", 
+				   &tp_ice->ice_st->ice->rx_ufrag);
+    sdp->attr[sdp->attr_count++] = attr;
+
+    /* Create ice-pwd attribute */
+    attr = pjmedia_sdp_attr_create(pool, "ice-pwd", 
+				   &tp_ice->ice_st->ice->rx_pass);
+    sdp->attr[sdp->attr_count++] = attr;
+
+    /* Add all candidates (to media level) */
+    cand_cnt = tp_ice->ice_st->ice->lcand_cnt;
+    for (i=0; i<cand_cnt; ++i) {
+	pj_ice_sess_cand *cand;
+	pj_str_t value;
+	int len;
+
+	cand = &tp_ice->ice_st->ice->lcand[i];
+
+	len = pj_ansi_snprintf( buffer, MAXLEN,
+				"%.*s %d UDP %u %s %d typ ",
+				(int)cand->foundation.slen,
+				cand->foundation.ptr,
+				cand->comp_id,
+				cand->prio,
+				pj_inet_ntoa(cand->addr.ipv4.sin_addr),
+				(int)pj_ntohs(cand->addr.ipv4.sin_port));
+	if (len < 1 || len >= MAXLEN)
+	    return PJ_ENAMETOOLONG;
+
+	switch (cand->type) {
+	case PJ_ICE_CAND_TYPE_HOST:
+	    len = pj_ansi_snprintf(buffer+len, MAXLEN-len,
+			     "host");
+	    break;
+	case PJ_ICE_CAND_TYPE_SRFLX:
+	    len = pj_ansi_snprintf(buffer+len, MAXLEN-len,
+			     "srflx raddr %s rport %d",
+			     pj_inet_ntoa(cand->base_addr.ipv4.sin_addr),
+			     (int)pj_ntohs(cand->base_addr.ipv4.sin_port));
+	    break;
+	case PJ_ICE_CAND_TYPE_RELAYED:
+	    PJ_TODO(RELATED_ADDR_FOR_RELAYED_ADDR);
+	    len = pj_ansi_snprintf(buffer+len, MAXLEN-len,
+			     "srflx raddr %s rport %d",
+			     pj_inet_ntoa(cand->base_addr.ipv4.sin_addr),
+			     (int)pj_ntohs(cand->base_addr.ipv4.sin_port));
+	    break;
+	case PJ_ICE_CAND_TYPE_PRFLX:
+	    len = pj_ansi_snprintf(buffer+len, MAXLEN-len,
+			     "prflx raddr %s rport %d",
+			     pj_inet_ntoa(cand->base_addr.ipv4.sin_addr),
+			     (int)pj_ntohs(cand->base_addr.ipv4.sin_port));
+	    break;
+	default:
+	    pj_assert(!"Invalid candidate type");
+	    break;
+	}
+	if (len < 1 || len >= MAXLEN)
+	    return PJ_ENAMETOOLONG;
+
+	value = pj_str(buffer);
+	attr = pjmedia_sdp_attr_create(pool, "candidate", &value);
+	sdp->media[0]->attr[sdp->media[0]->attr_count++] = attr;
+    }
+
+    /* Done */
+    return PJ_SUCCESS;
+
+}
+
+
+/* Parse a=candidate line */
+static pj_status_t parse_cand(pj_pool_t *pool,
+			      const pj_str_t *orig_input,
+			      pj_ice_sess_cand *cand)
+{
+    pj_str_t input;
+    char *token, *host;
+    pj_str_t s;
+    pj_status_t status = PJNATH_EICEINCANDSDP;
+
+    pj_bzero(cand, sizeof(*cand));
+    pj_strdup_with_null(pool, &input, orig_input);
+
+    /* Foundation */
+    token = strtok(input.ptr, " ");
+    if (!token)
+	goto on_return;
+    pj_strdup2(pool, &cand->foundation, token);
+
+    /* Component ID */
+    token = strtok(NULL, " ");
+    if (!token)
+	goto on_return;
+    cand->comp_id = atoi(token);
+
+    /* Transport */
+    token = strtok(NULL, " ");
+    if (!token)
+	goto on_return;
+    if (strcmp(token, "UDP") != 0)
+	goto on_return;
+
+    /* Priority */
+    token = strtok(NULL, " ");
+    if (!token)
+	goto on_return;
+    cand->prio = atoi(token);
+
+    /* Host */
+    host = strtok(NULL, " ");
+    if (!host)
+	goto on_return;
+    if (pj_sockaddr_in_init(&cand->addr.ipv4, pj_cstr(&s, host), 0))
+	goto on_return;
+
+    /* Port */
+    token = strtok(NULL, " ");
+    if (!token)
+	goto on_return;
+    cand->addr.ipv4.sin_port = pj_htons((pj_uint16_t)atoi(token));
+
+    /* typ */
+    token = strtok(NULL, " ");
+    if (!token)
+	goto on_return;
+    if (strcmp(token, "typ") != 0)
+	goto on_return;
+
+    /* candidate type */
+    token = strtok(NULL, " ");
+    if (!token)
+	goto on_return;
+
+    if (strcmp(token, "host") == 0) {
+	cand->type = PJ_ICE_CAND_TYPE_HOST;
+
+    } else if (strcmp(token, "srflx") == 0) {
+	cand->type = PJ_ICE_CAND_TYPE_SRFLX;
+
+    } else if (strcmp(token, "relay") == 0) {
+	cand->type = PJ_ICE_CAND_TYPE_RELAYED;
+
+    } else if (strcmp(token, "prflx") == 0) {
+	cand->type = PJ_ICE_CAND_TYPE_PRFLX;
+
+    } else {
+	goto on_return;
+    }
+
+
+    status = PJ_SUCCESS;
+
+on_return:
+    return status;
+}
+
+
+/* Disable ICE when SDP from remote doesn't contain a=candidate line */
+static void set_no_ice(struct transport_ice *tp_ice, const char *reason)
+{
+    PJ_LOG(4,(tp_ice->ice_st->obj_name, 
+	      "Disabling local ICE, reason=%s", reason));
+    pjmedia_ice_stop_ice(&tp_ice->base);
+}
+
+
+/*
+ * Start ICE checks when both offer and answer are available.
+ */
+PJ_DEF(pj_status_t) pjmedia_ice_start_ice(pjmedia_transport *tp,
+					  pj_pool_t *pool,
+					  const pjmedia_sdp_session *rem_sdp,
+					  unsigned media_index)
+{
+    struct transport_ice *tp_ice = (struct transport_ice*)tp;
+    const pjmedia_sdp_attr *attr;
+    unsigned i, cand_cnt;
+    pj_ice_sess_cand cand[PJ_ICE_MAX_CAND];
+    const pjmedia_sdp_media *sdp_med;
+    pj_bool_t remote_is_lite = PJ_FALSE;
+    pj_bool_t ice_mismatch = PJ_FALSE;
+    pjmedia_sdp_conn *conn = NULL;
+    pj_sockaddr conn_addr;
+    pj_bool_t conn_found_in_candidate = PJ_FALSE;
+    const pj_str_t STR_CANDIDATE = {"candidate", 9};
+    const pj_str_t STR_ICE_LITE = {"ice-lite", 8};
+    const pj_str_t STR_ICE_MISMATCH = {"ice-mismatch", 12};
+    pj_str_t uname, pass;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(tp && pool && rem_sdp, PJ_EINVAL);
+    PJ_ASSERT_RETURN(media_index < rem_sdp->media_count, PJ_EINVAL);
+
+    sdp_med = rem_sdp->media[media_index];
+
+    /* Get the SDP connection for the media stream.
+     * We'll verify later if the SDP connection address is specified 
+     * as one of the candidate.
+     */
+    conn = sdp_med->conn;
+    if (conn == NULL)
+	conn = rem_sdp->conn;
+
+    if (conn == NULL) {
+	/* Unable to find SDP connection */
+	return PJMEDIA_SDP_EMISSINGCONN;
+    }
+
+    pj_sockaddr_in_init(&conn_addr.ipv4, &conn->addr, 
+			(pj_uint16_t)sdp_med->desc.port);
+
+    /* Find ice-ufrag attribute in media descriptor */
+    attr = pjmedia_sdp_attr_find2(sdp_med->attr_count, sdp_med->attr,
+				  "ice-ufrag", NULL);
+    if (attr == NULL) {
+	/* Find ice-ufrag attribute in session descriptor */
+	attr = pjmedia_sdp_attr_find2(rem_sdp->attr_count, rem_sdp->attr,
+				      "ice-ufrag", NULL);
+	if (attr == NULL) {
+	    set_no_ice(tp_ice, "ice-ufrag attribute not found");
+	    return PJ_SUCCESS;
+	}
+    }
+    uname = attr->value;
+
+    /* Find ice-pwd attribute in media descriptor */
+    attr = pjmedia_sdp_attr_find2(sdp_med->attr_count, sdp_med->attr,
+				  "ice-pwd", NULL);
+    if (attr == NULL) {
+	/* Find ice-pwd attribute in session descriptor */
+	attr = pjmedia_sdp_attr_find2(rem_sdp->attr_count, rem_sdp->attr,
+				      "ice-pwd", NULL);
+	if (attr == NULL) {
+	    set_no_ice(tp_ice, "ice-pwd attribute not found");
+	    return PJ_SUCCESS;
+	}
+    }
+    pass = attr->value;
+
+    /* Get all candidates in the media */
+    cand_cnt = 0;
+    for (i=0; i<sdp_med->attr_count; ++i) {
+	pjmedia_sdp_attr *attr;
+
+	attr = sdp_med->attr[i];
+
+	/* Detect if remote is ICE lite */
+	if (pj_strcmp(&attr->name, &STR_ICE_LITE)==0) {
+	    remote_is_lite = PJ_TRUE;
+	    continue;
+	}
+
+	/* Detect if remote has reported ICE mismatch */
+	if (pj_strcmp(&attr->name, &STR_ICE_MISMATCH)==0) {
+	    ice_mismatch = PJ_TRUE;
+	    continue;
+	}
+
+	if (pj_strcmp(&attr->name, &STR_CANDIDATE)!=0)
+	    continue;
+
+	/* Parse candidate */
+	status = parse_cand(pool, &attr->value, &cand[cand_cnt]);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	/* Check if this candidate is equal to the connection line */
+	if (!conn_found_in_candidate &&
+	    pj_memcmp(&conn_addr.ipv4, &cand[cand_cnt].addr.ipv4,
+		      sizeof(pj_sockaddr_in))==0)
+	{
+	    conn_found_in_candidate = PJ_TRUE;
+	}
+
+	cand_cnt++;
+    }
+
+    /* Handle ice-mismatch case */
+    if (ice_mismatch) {
+	set_no_ice(tp_ice, "remote reported ice-mismatch");
+	return PJ_SUCCESS;
+    }
+
+    /* Handle case where SDP connection address is not specified as
+     * one of the candidate.
+     */
+    if (!conn_found_in_candidate) {
+	set_no_ice(tp_ice, "local reported ice-mismatch");
+	return PJ_SUCCESS;
+    }
+
+    /* Mark start time */
+    pj_gettimeofday(&tp_ice->start_ice);
+
+    /* If our role was controlled but it turns out that remote is 
+     * a lite implementation, change our role to controlling.
+     */
+    if (remote_is_lite && 
+	tp_ice->ice_st->ice->role == PJ_ICE_SESS_ROLE_CONTROLLED)
+    {
+	pj_ice_sess_change_role(tp_ice->ice_st->ice, 
+				PJ_ICE_SESS_ROLE_CONTROLLING);
+    }
+
+    /* Start ICE */
+    return pj_ice_strans_start_ice(tp_ice->ice_st, &uname, &pass, cand_cnt, cand);
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_ice_stop_ice(pjmedia_transport *tp)
+{
+    struct transport_ice *tp_ice = (struct transport_ice*)tp;
+    return pj_ice_strans_stop_ice(tp_ice->ice_st);
+}
+
+
+static pj_status_t tp_get_info(pjmedia_transport *tp,
+			       pjmedia_sock_info *info)
+{
+    struct transport_ice *tp_ice = (struct transport_ice*)tp;
+    pj_ice_strans *ice_st = tp_ice->ice_st;
+    pj_ice_strans_comp *comp;
+
+    pj_bzero(info, sizeof(*info));
+    info->rtp_sock = info->rtcp_sock = PJ_INVALID_SOCKET;
+
+    /* Retrieve address of default candidate for component 1 (RTP) */
+    comp = ice_st->comp[0];
+    pj_assert(comp->default_cand >= 0);
+    info->rtp_sock = comp->sock;
+    pj_memcpy(&info->rtp_addr_name, 
+	      &comp->cand_list[comp->default_cand].addr,
+	      sizeof(pj_sockaddr_in));
+
+    /* Retrieve address of default candidate for component 12(RTCP) */
+    if (ice_st->comp_cnt > 1) {
+	comp = ice_st->comp[1];
+	pj_assert(comp->default_cand >= 0);
+	info->rtp_sock = comp->sock;
+	pj_memcpy(&info->rtcp_addr_name, 
+		  &comp->cand_list[comp->default_cand].addr,
+		  sizeof(pj_sockaddr_in));
+    }
+
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t tp_attach( pjmedia_transport *tp,
+			      void *stream,
+			      const pj_sockaddr_t *rem_addr,
+			      const pj_sockaddr_t *rem_rtcp,
+			      unsigned addr_len,
+			      void (*rtp_cb)(void*,
+					     const void*,
+					     pj_ssize_t),
+			      void (*rtcp_cb)(void*,
+					      const void*,
+					      pj_ssize_t))
+{
+    struct transport_ice *tp_ice = (struct transport_ice*)tp;
+
+    tp_ice->stream = stream;
+    tp_ice->rtp_cb = rtp_cb;
+    tp_ice->rtcp_cb = rtcp_cb;
+
+    pj_memcpy(&tp_ice->remote_rtp, rem_addr, addr_len);
+    pj_memcpy(&tp_ice->remote_rtcp, rem_rtcp, addr_len);
+
+    return PJ_SUCCESS;
+}
+
+
+static void tp_detach(pjmedia_transport *tp,
+		      void *strm)
+{
+    struct transport_ice *tp_ice = (struct transport_ice*)tp;
+
+    tp_ice->rtp_cb = NULL;
+    tp_ice->rtcp_cb = NULL;
+    tp_ice->stream = NULL;
+
+    PJ_UNUSED_ARG(strm);
+}
+
+
+static pj_status_t tp_send_rtp(pjmedia_transport *tp,
+			       const void *pkt,
+			       pj_size_t size)
+{
+    struct transport_ice *tp_ice = (struct transport_ice*)tp;
+    return pj_ice_strans_sendto(tp_ice->ice_st, 1, 
+			        pkt, size, &tp_ice->remote_rtp,
+				sizeof(pj_sockaddr_in));
+}
+
+
+static pj_status_t tp_send_rtcp(pjmedia_transport *tp,
+			        const void *pkt,
+			        pj_size_t size)
+{
+    struct transport_ice *tp_ice = (struct transport_ice*)tp;
+    if (tp_ice->ice_st->comp_cnt > 1) {
+	return pj_ice_strans_sendto(tp_ice->ice_st, 2, 
+				    pkt, size, &tp_ice->remote_rtcp,
+				    sizeof(pj_sockaddr_in));
+    } else {
+	return PJ_SUCCESS;
+    }
+}
+
+
+static void ice_on_rx_data(pj_ice_strans *ice_st, unsigned comp_id, 
+			   void *pkt, pj_size_t size,
+			   const pj_sockaddr_t *src_addr,
+			   unsigned src_addr_len)
+{
+    struct transport_ice *tp_ice = (struct transport_ice*) ice_st->user_data;
+
+    if (comp_id==1 && tp_ice->rtp_cb)
+	(*tp_ice->rtp_cb)(tp_ice->stream, pkt, size);
+    else if (comp_id==2 && tp_ice->rtcp_cb)
+	(*tp_ice->rtcp_cb)(tp_ice->stream, pkt, size);
+
+    PJ_UNUSED_ARG(src_addr);
+    PJ_UNUSED_ARG(src_addr_len);
+
+    PJ_TODO(SWITCH_SOURCE_ADDRESS);
+}
+
+
+static void ice_on_ice_complete(pj_ice_strans *ice_st, 
+			        pj_status_t status)
+{
+    struct transport_ice *tp_ice = (struct transport_ice*) ice_st->user_data;
+    pj_time_val end_ice;
+    pj_ice_sess_cand *lcand, *rcand;
+    pj_ice_sess_check *check;
+    char src_addr[32];
+    char dst_addr[32];
+
+    pj_gettimeofday(&end_ice);
+    PJ_TIME_VAL_SUB(end_ice, tp_ice->start_ice);
+
+    if (status != PJ_SUCCESS) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+	pj_strerror(status, errmsg, sizeof(errmsg));
+	PJ_LOG(1,(ice_st->obj_name, 
+		  "ICE negotiation failed after %d:%03ds: %s", 
+		  (int)end_ice.sec, (int)end_ice.msec,
+		  errmsg));
+	return;
+    }
+
+    check = &ice_st->ice->valid_list.checks[0];
+    
+    lcand = check->lcand;
+    rcand = check->rcand;
+
+    pj_ansi_strcpy(src_addr, pj_inet_ntoa(lcand->addr.ipv4.sin_addr));
+    pj_ansi_strcpy(dst_addr, pj_inet_ntoa(rcand->addr.ipv4.sin_addr));
+
+    PJ_LOG(3,(ice_st->obj_name, 
+	      "ICE negotiation completed in %d.%03ds. Sending from "
+	      "%s:%d to %s:%d",
+	      (int)end_ice.sec, (int)end_ice.msec,
+	      src_addr, pj_ntohs(lcand->addr.ipv4.sin_port),
+	      dst_addr, pj_ntohs(rcand->addr.ipv4.sin_port)));
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/transport_udp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/transport_udp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/transport_udp.c	(revision 1163)
@@ -0,0 +1,716 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/transport_udp.h>
+#include <pj/addr_resolv.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+#include <pj/ioqueue.h>
+#include <pj/log.h>
+#include <pj/rand.h>
+#include <pj/string.h>
+
+
+/* Maximum size of incoming RTP packet */
+#define RTP_LEN	    1500
+
+/* Maximum size of incoming RTCP packet */
+#define RTCP_LEN    600
+
+/* Maximum pending write operations */
+#define MAX_PENDING 4
+
+/* Pending write buffer */
+typedef struct pending_write
+{
+    char		buffer[RTP_LEN];
+    pj_ioqueue_op_key_t	op_key;
+} pending_write;
+
+
+struct transport_udp
+{
+    pjmedia_transport	base;		/**< Base transport.		    */
+
+    pj_pool_t	       *pool;		/**< Memory pool		    */
+    unsigned		options;	/**< Transport options.		    */
+    void	       *user_data;	/**< Only valid when attached	    */
+    pj_bool_t		attached;	/**< Has attachment?		    */
+    pj_sockaddr_in	rem_rtp_addr;	/**< Remote RTP address		    */
+    pj_sockaddr_in	rem_rtcp_addr;	/**< Remote RTCP address	    */
+    void  (*rtp_cb)(	void*,		/**< To report incoming RTP.	    */
+			const void*,
+			pj_ssize_t);
+    void  (*rtcp_cb)(	void*,		/**< To report incoming RTCP.	    */
+			const void*,
+			pj_ssize_t);
+
+    unsigned		tx_drop_pct;	/**< Percent of tx pkts to drop.    */
+    unsigned		rx_drop_pct;	/**< Percent of rx pkts to drop.    */
+
+    pj_sock_t	        rtp_sock;	/**< RTP socket			    */
+    pj_sockaddr_in	rtp_addr_name;	/**< Published RTP address.	    */
+    pj_ioqueue_key_t   *rtp_key;	/**< RTP socket key in ioqueue	    */
+    pj_ioqueue_op_key_t	rtp_read_op;	/**< Pending read operation	    */
+    unsigned		rtp_write_op_id;/**< Next write_op to use	    */
+    pending_write	rtp_pending_write[MAX_PENDING];  /**< Pending write */
+    pj_sockaddr_in	rtp_src_addr;	/**< Actual packet src addr.	    */
+    unsigned		rtp_src_cnt;	/**< How many pkt from this addr.   */
+    int			rtp_addrlen;	/**< Address length.		    */
+    char		rtp_pkt[RTP_LEN];/**< Incoming RTP packet buffer    */
+
+    pj_sock_t		rtcp_sock;	/**< RTCP socket		    */
+    pj_sockaddr_in	rtcp_addr_name;	/**< Published RTCP address.	    */
+    pj_sockaddr_in	rtcp_src_addr;	/**< Actual source RTCP address.    */
+    int			rtcp_addr_len;	/**< Length of RTCP src address.    */
+    pj_ioqueue_key_t   *rtcp_key;	/**< RTCP socket key in ioqueue	    */
+    pj_ioqueue_op_key_t rtcp_read_op;	/**< Pending read operation	    */
+    pj_ioqueue_op_key_t rtcp_write_op;	/**< Pending write operation	    */
+    char		rtcp_pkt[RTCP_LEN];/**< Incoming RTCP packet buffer */
+};
+
+
+
+static void on_rx_rtp( pj_ioqueue_key_t *key, 
+                       pj_ioqueue_op_key_t *op_key, 
+                       pj_ssize_t bytes_read);
+static void on_rx_rtcp(pj_ioqueue_key_t *key, 
+                       pj_ioqueue_op_key_t *op_key, 
+                       pj_ssize_t bytes_read);
+
+static pj_status_t transport_get_info(pjmedia_transport *tp,
+				      pjmedia_sock_info *info);
+static pj_status_t transport_attach(   pjmedia_transport *tp,
+				       void *user_data,
+				       const pj_sockaddr_t *rem_addr,
+				       const pj_sockaddr_t *rem_rtcp,
+				       unsigned addr_len,
+				       void (*rtp_cb)(void*,
+						      const void*,
+						      pj_ssize_t),
+				       void (*rtcp_cb)(void*,
+						       const void*,
+						       pj_ssize_t));
+static void	   transport_detach(   pjmedia_transport *tp,
+				       void *strm);
+static pj_status_t transport_send_rtp( pjmedia_transport *tp,
+				       const void *pkt,
+				       pj_size_t size);
+static pj_status_t transport_send_rtcp(pjmedia_transport *tp,
+				       const void *pkt,
+				       pj_size_t size);
+
+
+static pjmedia_transport_op transport_udp_op = 
+{
+    &transport_get_info,
+    &transport_attach,
+    &transport_detach,
+    &transport_send_rtp,
+    &transport_send_rtcp,
+    &pjmedia_transport_udp_close
+};
+
+
+/**
+ * Create UDP stream transport.
+ */
+PJ_DEF(pj_status_t) pjmedia_transport_udp_create( pjmedia_endpt *endpt,
+						  const char *name,
+						  int port,
+						  unsigned options,
+						  pjmedia_transport **p_tp)
+{
+    return pjmedia_transport_udp_create2(endpt, name, NULL, port, options, 
+					p_tp);
+}
+
+/**
+ * Create UDP stream transport.
+ */
+PJ_DEF(pj_status_t) pjmedia_transport_udp_create2(pjmedia_endpt *endpt,
+						  const char *name,
+						  const pj_str_t *addr,
+						  int port,
+						  unsigned options,
+						  pjmedia_transport **p_tp)
+{
+    pjmedia_sock_info si;
+    pj_status_t status;
+
+    
+    /* Sanity check */
+    PJ_ASSERT_RETURN(endpt && port && p_tp, PJ_EINVAL);
+
+
+    pj_bzero(&si, sizeof(pjmedia_sock_info));
+    si.rtp_sock = si.rtcp_sock = PJ_INVALID_SOCKET;
+
+    /* Create RTP socket */
+    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &si.rtp_sock);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Bind RTP socket */
+    pj_sockaddr_in_init(&si.rtp_addr_name, addr, (pj_uint16_t)port);
+    status = pj_sock_bind(si.rtp_sock, &si.rtp_addr_name, 
+			  sizeof(si.rtp_addr_name));
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+
+    /* Create RTCP socket */
+    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &si.rtcp_sock);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Bind RTCP socket */
+    pj_sockaddr_in_init(&si.rtcp_addr_name, addr, (pj_uint16_t)(port+1));
+    status = pj_sock_bind(si.rtcp_sock, &si.rtcp_addr_name,
+			  sizeof(si.rtcp_addr_name));
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    
+    /* Create UDP transport by attaching socket info */
+    return pjmedia_transport_udp_attach( endpt, name, &si, options, p_tp);
+
+
+on_error:
+    if (si.rtp_sock != PJ_INVALID_SOCKET)
+	pj_sock_close(si.rtp_sock);
+    if (si.rtcp_sock != PJ_INVALID_SOCKET)
+	pj_sock_close(si.rtcp_sock);
+    return status;
+}
+
+
+/**
+ * Create UDP stream transport from existing socket info.
+ */
+PJ_DEF(pj_status_t) pjmedia_transport_udp_attach( pjmedia_endpt *endpt,
+						  const char *name,
+						  const pjmedia_sock_info *si,
+						  unsigned options,
+						  pjmedia_transport **p_tp)
+{
+    struct transport_udp *tp;
+    pj_pool_t *pool;
+    pj_ioqueue_t *ioqueue;
+    pj_ioqueue_callback rtp_cb, rtcp_cb;
+    pj_ssize_t size;
+    unsigned i;
+    pj_status_t status;
+
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(endpt && si && p_tp, PJ_EINVAL);
+
+    /* Check name */
+    if (!name)
+	name = "udpmedia";
+
+    /* Get ioqueue instance */
+    ioqueue = pjmedia_endpt_get_ioqueue(endpt);
+
+
+    /* Create transport structure */
+    pool = pjmedia_endpt_create_pool(endpt, name, 4000, 4000);
+    if (!pool)
+	return PJ_ENOMEM;
+
+    tp = pj_pool_zalloc(pool, sizeof(struct transport_udp));
+    tp->pool = pool;
+    tp->options = options;
+    pj_ansi_strcpy(tp->base.name, name);
+    tp->base.op = &transport_udp_op;
+    tp->base.type = PJMEDIA_TRANSPORT_TYPE_UDP;
+
+    /* Copy socket infos */
+    tp->rtp_sock = si->rtp_sock;
+    tp->rtp_addr_name = si->rtp_addr_name;
+    tp->rtcp_sock = si->rtcp_sock;
+    tp->rtcp_addr_name = si->rtcp_addr_name;
+
+    /* If address is 0.0.0.0, use host's IP address */
+    if (tp->rtp_addr_name.sin_addr.s_addr == 0) {
+	pj_in_addr hostip;
+
+	status = pj_gethostip(&hostip);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+
+	tp->rtp_addr_name.sin_addr = hostip;
+    }
+
+    /* Same with RTCP */
+    if (tp->rtcp_addr_name.sin_addr.s_addr == 0) {
+	tp->rtcp_addr_name.sin_addr.s_addr = tp->rtp_addr_name.sin_addr.s_addr;
+    }
+
+    /* Setup RTP socket with the ioqueue */
+    pj_bzero(&rtp_cb, sizeof(rtp_cb));
+    rtp_cb.on_read_complete = &on_rx_rtp;
+
+    status = pj_ioqueue_register_sock(pool, ioqueue, tp->rtp_sock, tp,
+				      &rtp_cb, &tp->rtp_key);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+    
+    pj_ioqueue_op_key_init(&tp->rtp_read_op, sizeof(tp->rtp_read_op));
+    for (i=0; i<PJ_ARRAY_SIZE(tp->rtp_pending_write); ++i)
+	pj_ioqueue_op_key_init(&tp->rtp_pending_write[i].op_key, 
+			       sizeof(tp->rtp_pending_write[i].op_key));
+
+    /* Kick of pending RTP read from the ioqueue */
+    tp->rtp_addrlen = sizeof(tp->rtp_src_addr);
+    size = sizeof(tp->rtp_pkt);
+    status = pj_ioqueue_recvfrom(tp->rtp_key, &tp->rtp_read_op,
+			         tp->rtp_pkt, &size, PJ_IOQUEUE_ALWAYS_ASYNC,
+				 &tp->rtp_src_addr, &tp->rtp_addrlen);
+    if (status != PJ_EPENDING)
+	goto on_error;
+
+
+    /* Setup RTCP socket with ioqueue */
+    pj_bzero(&rtcp_cb, sizeof(rtcp_cb));
+    rtcp_cb.on_read_complete = &on_rx_rtcp;
+
+    status = pj_ioqueue_register_sock(pool, ioqueue, tp->rtcp_sock, tp,
+				      &rtcp_cb, &tp->rtcp_key);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    pj_ioqueue_op_key_init(&tp->rtcp_read_op, sizeof(tp->rtcp_read_op));
+    pj_ioqueue_op_key_init(&tp->rtcp_write_op, sizeof(tp->rtcp_write_op));
+
+
+    /* Kick of pending RTCP read from the ioqueue */
+    size = sizeof(tp->rtcp_pkt);
+    tp->rtcp_addr_len = sizeof(tp->rtcp_src_addr);
+    status = pj_ioqueue_recvfrom( tp->rtcp_key, &tp->rtcp_read_op,
+				  tp->rtcp_pkt, &size, PJ_IOQUEUE_ALWAYS_ASYNC,
+				  &tp->rtcp_src_addr, &tp->rtcp_addr_len);
+    if (status != PJ_EPENDING)
+	goto on_error;
+
+
+    /* Done */
+    *p_tp = &tp->base;
+    return PJ_SUCCESS;
+
+
+on_error:
+    pjmedia_transport_udp_close(&tp->base);
+    return status;
+}
+
+
+/*
+ * Get media socket info.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_transport_udp_get_info( pjmedia_transport *tp,
+				pjmedia_transport_udp_info *inf)
+{
+    return transport_get_info(tp, &inf->skinfo);
+}
+
+
+/**
+ * Close UDP transport.
+ */
+PJ_DEF(pj_status_t) pjmedia_transport_udp_close(pjmedia_transport *tp)
+{
+    struct transport_udp *udp = (struct transport_udp*) tp;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(tp, PJ_EINVAL);
+
+    /* Must not close while application is using this */
+    PJ_ASSERT_RETURN(!udp->attached, PJ_EINVALIDOP);
+    
+
+    if (udp->rtp_key) {
+	pj_ioqueue_unregister(udp->rtp_key);
+	udp->rtp_key = NULL;
+    } else if (udp->rtp_sock != PJ_INVALID_SOCKET) {
+	pj_sock_close(udp->rtp_sock);
+	udp->rtp_sock = PJ_INVALID_SOCKET;
+    }
+
+    if (udp->rtcp_key) {
+	pj_ioqueue_unregister(udp->rtcp_key);
+	udp->rtcp_key = NULL;
+    } else if (udp->rtcp_sock != PJ_INVALID_SOCKET) {
+	pj_sock_close(udp->rtcp_sock);
+	udp->rtcp_sock = PJ_INVALID_SOCKET;
+    }
+
+    pj_pool_release(udp->pool);
+
+    return PJ_SUCCESS;
+}
+
+
+/* Notification from ioqueue about incoming RTP packet */
+static void on_rx_rtp( pj_ioqueue_key_t *key, 
+                       pj_ioqueue_op_key_t *op_key, 
+                       pj_ssize_t bytes_read)
+{
+    struct transport_udp *udp;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(op_key);
+
+    udp = pj_ioqueue_get_user_data(key);
+
+    do {
+	void (*cb)(void*,const void*,pj_ssize_t);
+	void *user_data;
+
+	cb = udp->rtp_cb;
+	user_data = udp->user_data;
+
+	/* Simulate packet lost on RX direction */
+	if (udp->rx_drop_pct) {
+	    if ((pj_rand() % 100) <= (int)udp->rx_drop_pct) {
+		PJ_LOG(5,(udp->base.name, 
+			  "RX RTP packet dropped because of pkt lost "
+			  "simulation"));
+		goto read_next_packet;
+	    }
+	}
+
+
+	if (udp->attached && cb)
+	    (*cb)(user_data, udp->rtp_pkt, bytes_read);
+
+	/* See if source address of RTP packet is different than the 
+	 * configured address, and switch RTP remote address to 
+	 * source packet address after several consecutive packets
+	 * have been received.
+	 */
+	if (bytes_read>0 && 
+	    (udp->options & PJMEDIA_UDP_NO_SRC_ADDR_CHECKING)==0) 
+	{
+	    if ((udp->rem_rtp_addr.sin_addr.s_addr != 
+		 udp->rtp_src_addr.sin_addr.s_addr) ||
+		(udp->rem_rtp_addr.sin_port != 
+		 udp->rtp_src_addr.sin_port))
+	    {
+		udp->rtp_src_cnt++;
+
+		if (udp->rtp_src_cnt >= PJMEDIA_RTP_NAT_PROBATION_CNT) {
+		
+		    /* Set remote RTP address to source address */
+		    udp->rem_rtp_addr = udp->rtp_src_addr;
+
+		    /* Reset counter */
+		    udp->rtp_src_cnt = 0;
+
+		    PJ_LOG(4,(udp->base.name,
+			      "Remote RTP address switched to %s:%d",
+			      pj_inet_ntoa(udp->rtp_src_addr.sin_addr),
+			      pj_ntohs(udp->rtp_src_addr.sin_port)));
+
+		    /* Also update remote RTCP address if actual RTCP source
+		     * address is not heard yet.
+		     */
+		    if (udp->rtcp_src_addr.sin_addr.s_addr == 0) {
+			pj_uint16_t port;
+
+			pj_memcpy(&udp->rem_rtcp_addr, &udp->rem_rtp_addr, 
+				  sizeof(pj_sockaddr_in));
+			port = (pj_uint16_t)
+			       (pj_ntohs(udp->rem_rtp_addr.sin_port)+1);
+			udp->rem_rtcp_addr.sin_port = pj_htons(port);
+
+			pj_memcpy(&udp->rtcp_src_addr, &udp->rem_rtcp_addr, 
+				  sizeof(pj_sockaddr_in));
+
+			PJ_LOG(4,(udp->base.name,
+				  "Remote RTCP address switched to %s:%d",
+				  pj_inet_ntoa(udp->rtcp_src_addr.sin_addr),
+				  pj_ntohs(udp->rtcp_src_addr.sin_port)));
+
+		    }
+		}
+	    }
+	}
+
+read_next_packet:
+	bytes_read = sizeof(udp->rtp_pkt);
+	udp->rtp_addrlen = sizeof(pj_sockaddr_in);
+	status = pj_ioqueue_recvfrom(udp->rtp_key, &udp->rtp_read_op,
+				     udp->rtp_pkt, &bytes_read, 0,
+				     &udp->rtp_src_addr, 
+				     &udp->rtp_addrlen);
+
+	if (status != PJ_EPENDING && status != PJ_SUCCESS)
+	    bytes_read = -status;
+
+    } while (status != PJ_EPENDING);
+}
+
+
+/* Notification from ioqueue about incoming RTCP packet */
+static void on_rx_rtcp(pj_ioqueue_key_t *key, 
+                       pj_ioqueue_op_key_t *op_key, 
+                       pj_ssize_t bytes_read)
+{
+    struct transport_udp *udp;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(op_key);
+
+    udp = pj_ioqueue_get_user_data(key);
+
+    do {
+	void (*cb)(void*,const void*,pj_ssize_t);
+	void *user_data;
+
+	cb = udp->rtcp_cb;
+	user_data = udp->user_data;
+
+	if (udp->attached && cb)
+	    (*cb)(user_data, udp->rtcp_pkt, bytes_read);
+
+	/* Check if RTCP source address is the same as the configured
+	 * remote address, and switch the address when they are
+	 * different.
+	 */
+	if (bytes_read>0 &&
+	    (udp->options & PJMEDIA_UDP_NO_SRC_ADDR_CHECKING)==0 &&
+	    ((udp->rem_rtcp_addr.sin_addr.s_addr != 
+	       udp->rtcp_src_addr.sin_addr.s_addr) ||
+	     (udp->rem_rtcp_addr.sin_port != 
+	       udp->rtcp_src_addr.sin_port)))
+	{
+	    pj_memcpy(&udp->rem_rtcp_addr, &udp->rtcp_src_addr,
+		      sizeof(pj_sockaddr_in));
+	    PJ_LOG(4,(udp->base.name,
+		      "Remote RTCP address switched to %s:%d",
+		      pj_inet_ntoa(udp->rtcp_src_addr.sin_addr),
+		      pj_ntohs(udp->rtcp_src_addr.sin_port)));
+	}
+
+	bytes_read = sizeof(udp->rtcp_pkt);
+	udp->rtcp_addr_len = sizeof(udp->rtcp_src_addr);
+	status = pj_ioqueue_recvfrom(udp->rtcp_key, &udp->rtcp_read_op,
+				     udp->rtcp_pkt, &bytes_read, 0,
+				     &udp->rtcp_src_addr, 
+				     &udp->rtcp_addr_len);
+	if (status != PJ_EPENDING && status != PJ_SUCCESS)
+	    bytes_read = -status;
+
+    } while (status != PJ_EPENDING);
+}
+
+
+/* Called to get the transport info */
+static pj_status_t transport_get_info(pjmedia_transport *tp,
+				      pjmedia_sock_info *info)
+{
+    struct transport_udp *udp = (struct transport_udp*)tp;
+    PJ_ASSERT_RETURN(tp && info, PJ_EINVAL);
+
+    info->rtp_sock = udp->rtp_sock;
+    info->rtp_addr_name = udp->rtp_addr_name;
+    info->rtcp_sock = udp->rtcp_sock;
+    info->rtcp_addr_name = udp->rtcp_addr_name;
+
+    return PJ_SUCCESS;
+}
+
+
+/* Called by application to initialize the transport */
+static pj_status_t transport_attach(   pjmedia_transport *tp,
+				       void *user_data,
+				       const pj_sockaddr_t *rem_addr,
+				       const pj_sockaddr_t *rem_rtcp,
+				       unsigned addr_len,
+				       void (*rtp_cb)(void*,
+						      const void*,
+						      pj_ssize_t),
+				       void (*rtcp_cb)(void*,
+						       const void*,
+						       pj_ssize_t))
+{
+    struct transport_udp *udp = (struct transport_udp*) tp;
+    const pj_sockaddr_in *rtcp_addr;
+
+    /* Validate arguments */
+    PJ_ASSERT_RETURN(tp && rem_addr && addr_len, PJ_EINVAL);
+
+    /* Must not be "attached" to existing application */
+    PJ_ASSERT_RETURN(!udp->attached, PJ_EINVALIDOP);
+
+    /* "Attach" the application: */
+
+    /* Copy remote RTP address */
+    pj_memcpy(&udp->rem_rtp_addr, rem_addr, sizeof(pj_sockaddr_in));
+
+    /* Copy remote RTP address, if one is specified. */
+    rtcp_addr = rem_rtcp;
+    if (rtcp_addr && rtcp_addr->sin_addr.s_addr != 0) {
+	pj_memcpy(&udp->rem_rtcp_addr, rem_rtcp, sizeof(pj_sockaddr_in));
+
+    } else {
+	int rtcp_port;
+
+	/* Otherwise guess the RTCP address from the RTP address */
+	pj_memcpy(&udp->rem_rtcp_addr, rem_addr, sizeof(pj_sockaddr_in));
+	rtcp_port = pj_ntohs(udp->rem_rtp_addr.sin_port) + 1;
+	udp->rem_rtcp_addr.sin_port = pj_htons((pj_uint16_t)rtcp_port);
+    }
+
+    /* Save the callbacks */
+    udp->rtp_cb = rtp_cb;
+    udp->rtcp_cb = rtcp_cb;
+    udp->user_data = user_data;
+
+    /* Last, mark transport as attached */
+    udp->attached = PJ_TRUE;
+
+    return PJ_SUCCESS;
+}
+
+
+/* Called by application when it no longer needs the transport */
+static void transport_detach( pjmedia_transport *tp,
+			      void *user_data)
+{
+    struct transport_udp *udp = (struct transport_udp*) tp;
+
+    pj_assert(tp);
+
+    if (udp->attached) {
+	/* User data is unreferenced on Release build */
+	PJ_UNUSED_ARG(user_data);
+
+	/* As additional checking, check if the same user data is specified */
+	pj_assert(user_data == udp->user_data);
+
+	/* First, mark transport as unattached */
+	udp->attached = PJ_FALSE;
+
+	/* Clear up application infos from transport */
+	udp->rtp_cb = NULL;
+	udp->rtcp_cb = NULL;
+	udp->user_data = NULL;
+    }
+}
+
+
+/* Called by application to send RTP packet */
+static pj_status_t transport_send_rtp( pjmedia_transport *tp,
+				       const void *pkt,
+				       pj_size_t size)
+{
+    struct transport_udp *udp = (struct transport_udp*)tp;
+    pj_ssize_t sent;
+    unsigned id;
+    struct pending_write *pw;
+    pj_status_t status;
+
+    /* Must be attached */
+    PJ_ASSERT_RETURN(udp->attached, PJ_EINVALIDOP);
+
+    /* Check that the size is supported */
+    PJ_ASSERT_RETURN(size <= RTP_LEN, PJ_ETOOBIG);
+
+    /* Simulate packet lost on TX direction */
+    if (udp->tx_drop_pct) {
+	if ((pj_rand() % 100) <= (int)udp->tx_drop_pct) {
+	    PJ_LOG(5,(udp->base.name, 
+		      "TX RTP packet dropped because of pkt lost "
+		      "simulation"));
+	    return PJ_SUCCESS;
+	}
+    }
+
+
+    id = udp->rtp_write_op_id;
+    pw = &udp->rtp_pending_write[id];
+
+    /* We need to copy packet to our buffer because when the
+     * operation is pending, caller might write something else
+     * to the original buffer.
+     */
+    pj_memcpy(pw->buffer, pkt, size);
+
+    sent = size;
+    status = pj_ioqueue_sendto( udp->rtp_key, 
+				&udp->rtp_pending_write[id].op_key,
+				pw->buffer, &sent, 0,
+				&udp->rem_rtp_addr, 
+				sizeof(pj_sockaddr_in));
+
+    udp->rtp_write_op_id = (udp->rtp_write_op_id + 1) %
+			   PJ_ARRAY_SIZE(udp->rtp_pending_write);
+
+    if (status==PJ_SUCCESS || status==PJ_EPENDING)
+	return PJ_SUCCESS;
+
+    return status;
+}
+
+/* Called by application to send RTCP packet */
+static pj_status_t transport_send_rtcp(pjmedia_transport *tp,
+				       const void *pkt,
+				       pj_size_t size)
+{
+    struct transport_udp *udp = (struct transport_udp*)tp;
+    pj_ssize_t sent;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(udp->attached, PJ_EINVALIDOP);
+
+    sent = size;
+    status = pj_ioqueue_sendto( udp->rtcp_key, &udp->rtcp_write_op,
+				pkt, &sent, 0,
+				&udp->rem_rtcp_addr, sizeof(pj_sockaddr_in));
+
+    if (status==PJ_SUCCESS || status==PJ_EPENDING)
+	return PJ_SUCCESS;
+
+    return status;
+}
+
+
+PJ_DEF(pj_status_t) pjmedia_transport_udp_simulate_lost(pjmedia_transport *tp,
+							pjmedia_dir dir,
+							unsigned pct_lost)
+{
+    struct transport_udp *udp = (struct transport_udp*)tp;
+
+    PJ_ASSERT_RETURN(tp && 
+		     (dir==PJMEDIA_DIR_ENCODING||dir==PJMEDIA_DIR_DECODING) &&
+		     pct_lost <= 100, PJ_EINVAL);
+
+    if (dir == PJMEDIA_DIR_ENCODING)
+	udp->tx_drop_pct = pct_lost;
+    else if (dir == PJMEDIA_DIR_DECODING)
+	udp->rx_drop_pct = pct_lost;
+    else
+	return PJ_EINVAL;
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/wav_player.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/wav_player.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/wav_player.c	(revision 1163)
@@ -0,0 +1,540 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/wav_port.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/wave.h>
+#include <pj/assert.h>
+#include <pj/file_access.h>
+#include <pj/file_io.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+
+#define THIS_FILE   "wav_player.c"
+
+
+#define SIGNATURE	    PJMEDIA_PORT_SIGNATURE('F', 'P', 'l', 'y')
+#define BYTES_PER_SAMPLE    2
+
+
+#if 1
+#   define TRACE_(x)	PJ_LOG(4,x)
+#else
+#   define TRACE_(x)
+#endif
+
+#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0
+    static void samples_to_host(pj_int16_t *samples, unsigned count)
+    {
+	unsigned i;
+	for (i=0; i<count; ++i) {
+	    samples[i] = pj_swap16(samples[i]);
+	}
+    }
+#else
+#   define samples_to_host(samples,count)
+#endif
+
+struct file_port
+{
+    pjmedia_port     base;
+    unsigned	     options;
+    pj_bool_t	     eof;
+    pj_size_t	     bufsize;
+    char	    *buf;
+    char	    *readpos;
+
+    pj_off_t	     fsize;
+    unsigned	     start_data;
+    pj_off_t	     fpos;
+    pj_oshandle_t    fd;
+
+    pj_status_t	   (*cb)(pjmedia_port*, void*);
+};
+
+
+static pj_status_t file_get_frame(pjmedia_port *this_port, 
+				  pjmedia_frame *frame);
+static pj_status_t file_on_destroy(pjmedia_port *this_port);
+
+static struct file_port *create_file_port(pj_pool_t *pool)
+{
+    const pj_str_t name = pj_str("file");
+    struct file_port *port;
+
+    port = pj_pool_zalloc(pool, sizeof(struct file_port));
+    if (!port)
+	return NULL;
+
+    /* Put in default values.
+     * These will be overriden once the file is read.
+     */
+    pjmedia_port_info_init(&port->base.info, &name, SIGNATURE, 
+			   8000, 1, 16, 80);
+
+    port->base.get_frame = &file_get_frame;
+    port->base.on_destroy = &file_on_destroy;
+
+
+    return port;
+}
+
+/*
+ * Fill buffer.
+ */
+static pj_status_t fill_buffer(struct file_port *fport)
+{
+    pj_ssize_t size_left = fport->bufsize;
+    unsigned size_to_read;
+    pj_ssize_t size;
+    pj_status_t status;
+
+    /* Can't read file if EOF and loop flag is disabled */
+    if (fport->eof)
+	return PJ_EEOF;
+
+    while (size_left > 0) {
+
+	/* Calculate how many bytes to read in this run. */
+	size = size_to_read = size_left;
+	status = pj_file_read(fport->fd, 
+			      &fport->buf[fport->bufsize-size_left], 
+			      &size);
+	if (status != PJ_SUCCESS)
+	    return status;
+	if (size < 0) {
+	    /* Should return more appropriate error code here.. */
+	    return PJ_ECANCELLED;
+	}
+
+	size_left -= size;
+	fport->fpos += size;
+
+	/* If size is less than size_to_read, it indicates that we've
+	 * encountered EOF. Rewind the file.
+	 */
+	if (size < (pj_ssize_t)size_to_read) {
+	    /* Call callback, if any. */
+	    if (fport->cb) {
+		PJ_LOG(5,(THIS_FILE, 
+			  "File port %.*s EOF, calling callback",
+			  (int)fport->base.info.name.slen,
+			  fport->base.info.name.ptr));
+
+		fport->eof = PJ_TRUE;
+		status=(*fport->cb)(&fport->base,fport->base.port_data.pdata);
+		if (status != PJ_SUCCESS) {
+		    /* This will crash if file port is destroyed in the 
+		     * callback, that's why we set the eof flag before
+		     * calling the callback:
+		     fport->eof = PJ_TRUE;
+		    */
+		    return status;
+		}
+		
+		fport->eof = PJ_FALSE;
+	    }
+
+	    if (fport->options & PJMEDIA_FILE_NO_LOOP) {
+		PJ_LOG(5,(THIS_FILE, "File port %.*s EOF, stopping..",
+			  (int)fport->base.info.name.slen,
+			  fport->base.info.name.ptr));
+		fport->eof = PJ_TRUE;
+		return PJ_EEOF;
+	    } else {
+		PJ_LOG(5,(THIS_FILE, "File port %.*s EOF, rewinding..",
+			  (int)fport->base.info.name.slen,
+			  fport->base.info.name.ptr));
+		fport->fpos = fport->start_data;
+		pj_file_setpos( fport->fd, fport->fpos, PJ_SEEK_SET);
+	    }
+	}
+    }
+
+    /* Convert samples to host rep */
+    samples_to_host((pj_int16_t*)fport->buf, fport->bufsize/BYTES_PER_SAMPLE);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create WAVE player port.
+ */
+PJ_DEF(pj_status_t) pjmedia_wav_player_port_create( pj_pool_t *pool,
+						     const char *filename,
+						     unsigned ptime,
+						     unsigned options,
+						     pj_ssize_t buff_size,
+						     pjmedia_port **p_port )
+{
+    pjmedia_wave_hdr wave_hdr;
+    pj_ssize_t size_to_read, size_read;
+    struct file_port *fport;
+    pj_off_t pos;
+    pj_status_t status;
+
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(pool && filename && p_port, PJ_EINVAL);
+
+    /* Check the file really exists. */
+    if (!pj_file_exists(filename)) {
+	return PJ_ENOTFOUND;
+    }
+
+    /* Normalize ptime */
+    if (ptime == 0)
+	ptime = 20;
+
+    /* Create fport instance. */
+    fport = create_file_port(pool);
+    if (!fport) {
+	return PJ_ENOMEM;
+    }
+
+
+    /* Get the file size. */
+    fport->fsize = pj_file_size(filename);
+
+    /* Size must be more than WAVE header size */
+    if (fport->fsize <= sizeof(pjmedia_wave_hdr)) {
+	return PJMEDIA_ENOTVALIDWAVE;
+    }
+
+    /* Open file. */
+    status = pj_file_open( pool, filename, PJ_O_RDONLY, &fport->fd);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Read the file header plus fmt header only. */
+    size_read = size_to_read = sizeof(wave_hdr) - 8;
+    status = pj_file_read( fport->fd, &wave_hdr, &size_read);
+    if (status != PJ_SUCCESS) {
+	pj_file_close(fport->fd);
+	return status;
+    }
+    if (size_read != size_to_read) {
+	pj_file_close(fport->fd);
+	return PJMEDIA_ENOTVALIDWAVE;
+    }
+
+    /* Normalize WAVE header fields values from little-endian to host
+     * byte order.
+     */
+    pjmedia_wave_hdr_file_to_host(&wave_hdr);
+    
+    /* Validate WAVE file. */
+    if (wave_hdr.riff_hdr.riff != PJMEDIA_RIFF_TAG ||
+	wave_hdr.riff_hdr.wave != PJMEDIA_WAVE_TAG ||
+	wave_hdr.fmt_hdr.fmt != PJMEDIA_FMT_TAG)
+    {
+	pj_file_close(fport->fd);
+	TRACE_((THIS_FILE, 
+		"actual value|expected riff=%x|%x, wave=%x|%x fmt=%x|%x",
+		wave_hdr.riff_hdr.riff, PJMEDIA_RIFF_TAG,
+		wave_hdr.riff_hdr.wave, PJMEDIA_WAVE_TAG,
+		wave_hdr.fmt_hdr.fmt, PJMEDIA_FMT_TAG));
+	return PJMEDIA_ENOTVALIDWAVE;
+    }
+
+    /* Must be PCM with 16bits per sample */
+    if (wave_hdr.fmt_hdr.fmt_tag != 1 ||
+	wave_hdr.fmt_hdr.bits_per_sample != 16)
+    {
+	pj_file_close(fport->fd);
+	return PJMEDIA_EWAVEUNSUPP;
+    }
+
+    /* Block align must be 2*nchannels */
+    if (wave_hdr.fmt_hdr.block_align != wave_hdr.fmt_hdr.nchan*BYTES_PER_SAMPLE) {
+	pj_file_close(fport->fd);
+	return PJMEDIA_EWAVEUNSUPP;
+    }
+
+    /* If length of fmt_header is greater than 16, skip the remaining
+     * fmt header data.
+     */
+    if (wave_hdr.fmt_hdr.len > 16) {
+	size_to_read = wave_hdr.fmt_hdr.len - 16;
+	status = pj_file_setpos(fport->fd, size_to_read, PJ_SEEK_CUR);
+	if (status != PJ_SUCCESS) {
+	    pj_file_close(fport->fd);
+	    return status;
+	}
+    }
+
+    /* Repeat reading the WAVE file until we have 'data' chunk */
+    for (;;) {
+	pjmedia_wave_subchunk subchunk;
+	size_read = 8;
+	status = pj_file_read(fport->fd, &subchunk, &size_read);
+	if (status != PJ_SUCCESS || size_read != 8) {
+	    pj_file_close(fport->fd);
+	    return PJMEDIA_EWAVETOOSHORT;
+	}
+
+	/* Normalize endianness */
+	PJMEDIA_WAVE_NORMALIZE_SUBCHUNK(&subchunk);
+
+	/* Break if this is "data" chunk */
+	if (subchunk.id == PJMEDIA_DATA_TAG) {
+	    wave_hdr.data_hdr.data = PJMEDIA_DATA_TAG;
+	    wave_hdr.data_hdr.len = subchunk.len;
+	    break;
+	}
+
+	/* Otherwise skip the chunk contents */
+	size_to_read = subchunk.len;
+	status = pj_file_setpos(fport->fd, size_to_read, PJ_SEEK_CUR);
+	if (status != PJ_SUCCESS) {
+	    pj_file_close(fport->fd);
+	    return status;
+	}
+    }
+
+    /* Current file position now points to start of data */
+    status = pj_file_getpos(fport->fd, &pos);
+    fport->start_data = (unsigned)pos;
+
+    /* Validate length. */
+    if (wave_hdr.data_hdr.len != fport->fsize - fport->start_data) {
+	pj_file_close(fport->fd);
+	return PJMEDIA_EWAVEUNSUPP;
+    }
+    if (wave_hdr.data_hdr.len < 400) {
+	pj_file_close(fport->fd);
+	return PJMEDIA_EWAVETOOSHORT;
+    }
+
+    /* It seems like we have a valid WAVE file. */
+
+    /* Initialize */
+    fport->options = options;
+
+    /* Update port info. */
+    fport->base.info.channel_count = wave_hdr.fmt_hdr.nchan;
+    fport->base.info.clock_rate = wave_hdr.fmt_hdr.sample_rate;
+    fport->base.info.bits_per_sample = wave_hdr.fmt_hdr.bits_per_sample;
+    fport->base.info.samples_per_frame = fport->base.info.clock_rate *
+					 wave_hdr.fmt_hdr.nchan *
+					 ptime / 1000;
+    fport->base.info.bytes_per_frame = 
+	fport->base.info.samples_per_frame * 
+	fport->base.info.bits_per_sample / 8;
+
+    pj_strdup2(pool, &fport->base.info.name, filename);
+
+    /* Create file buffer.
+     */
+    if (buff_size < 1) buff_size = PJMEDIA_FILE_PORT_BUFSIZE;
+    fport->bufsize = buff_size;
+
+
+    /* Create buffer. */
+    fport->buf = pj_pool_alloc(pool, fport->bufsize);
+    if (!fport->buf) {
+	pj_file_close(fport->fd);
+	return PJ_ENOMEM;
+    }
+ 
+    fport->readpos = fport->buf;
+
+    /* Set initial position of the file. */
+    fport->fpos = fport->start_data;
+
+    /* Fill up the buffer. */
+    status = fill_buffer(fport);
+    if (status != PJ_SUCCESS) {
+	pj_file_close(fport->fd);
+	return status;
+    }
+
+    /* Done. */
+
+    *p_port = &fport->base;
+
+
+    PJ_LOG(4,(THIS_FILE, 
+	      "File player '%.*s' created: samp.rate=%d, ch=%d, bufsize=%uKB, "
+	      "filesize=%luKB",
+	      (int)fport->base.info.name.slen,
+	      fport->base.info.name.ptr,
+	      fport->base.info.clock_rate,
+	      fport->base.info.channel_count,
+	      fport->bufsize / 1000,
+	      (unsigned long)(fport->fsize / 1000)));
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Set position.
+ */
+PJ_DEF(pj_status_t) pjmedia_wav_player_port_set_pos(pjmedia_port *port,
+						    pj_uint32_t bytes )
+{
+    struct file_port *fport;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(port, -PJ_EINVAL);
+
+    /* Check that this is really a player port */
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, -PJ_EINVALIDOP);
+
+
+    fport = (struct file_port*) port;
+
+    PJ_ASSERT_RETURN(bytes < fport->fsize - fport->start_data, PJ_EINVAL);
+
+    fport->fpos = fport->start_data + bytes;
+    pj_file_setpos( fport->fd, fport->fpos, PJ_SEEK_SET);
+
+    fport->eof = PJ_FALSE;
+    return fill_buffer(fport);
+}
+
+
+/*
+ * Get the file play position of WAV player.
+ */
+PJ_DEF(pj_ssize_t) pjmedia_wav_player_port_get_pos( pjmedia_port *port )
+{
+    struct file_port *fport;
+    pj_size_t payload_pos;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(port, -PJ_EINVAL);
+
+    /* Check that this is really a player port */
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, -PJ_EINVALIDOP);
+
+    fport = (struct file_port*) port;
+
+    payload_pos = (pj_size_t)(fport->fpos - fport->start_data);
+    if (payload_pos >= fport->bufsize)
+	return payload_pos - fport->bufsize + (fport->readpos - fport->buf);
+    else
+	return (fport->readpos - fport->buf) % payload_pos;
+}
+
+
+
+/*
+ * Register a callback to be called when the file reading has reached the
+ * end of file.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_wav_player_set_eof_cb( pjmedia_port *port,
+			       void *user_data,
+			       pj_status_t (*cb)(pjmedia_port *port,
+						 void *usr_data))
+{
+    struct file_port *fport;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(port, -PJ_EINVAL);
+
+    /* Check that this is really a player port */
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, -PJ_EINVALIDOP);
+
+    fport = (struct file_port*) port;
+
+    fport->base.port_data.pdata = user_data;
+    fport->cb = cb;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get frame from file.
+ */
+static pj_status_t file_get_frame(pjmedia_port *this_port, 
+				  pjmedia_frame *frame)
+{
+    struct file_port *fport = (struct file_port*)this_port;
+    unsigned frame_size;
+    pj_status_t status;
+
+    pj_assert(fport->base.info.signature == SIGNATURE);
+
+    //frame_size = fport->base.info.bytes_per_frame;
+    //pj_assert(frame->size == frame_size);
+    frame_size = frame->size;
+
+    /* Copy frame from buffer. */
+    frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
+    frame->size = frame_size;
+    frame->timestamp.u64 = 0;
+
+    if (fport->readpos + frame_size <= fport->buf + fport->bufsize) {
+
+	/* Read contiguous buffer. */
+	pj_memcpy(frame->buf, fport->readpos, frame_size);
+
+	/* Fill up the buffer if all has been read. */
+	fport->readpos += frame_size;
+	if (fport->readpos == fport->buf + fport->bufsize) {
+	    fport->readpos = fport->buf;
+
+	    status = fill_buffer(fport);
+	    if (status != PJ_SUCCESS) {
+		frame->type = PJMEDIA_FRAME_TYPE_NONE;
+		frame->size = 0;
+		return status;
+	    }
+	}
+    } else {
+	unsigned endread;
+
+	/* Split read.
+	 * First stage: read until end of buffer. 
+	 */
+	endread = (fport->buf+fport->bufsize) - fport->readpos;
+	pj_memcpy(frame->buf, fport->readpos, endread);
+
+	/* Second stage: fill up buffer, and read from the start of buffer. */
+	status = fill_buffer(fport);
+	if (status != PJ_SUCCESS) {
+	    pj_bzero(((char*)frame->buf)+endread, frame_size-endread);
+	    return status;
+	}
+
+	pj_memcpy(((char*)frame->buf)+endread, fport->buf, frame_size-endread);
+	fport->readpos = fport->buf + (frame_size - endread);
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Destroy port.
+ */
+static pj_status_t file_on_destroy(pjmedia_port *this_port)
+{
+    struct file_port *fport = (struct file_port*) this_port;
+
+    pj_assert(this_port->info.signature == SIGNATURE);
+
+    pj_file_close(fport->fd);
+    return PJ_SUCCESS;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/wav_playlist.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/wav_playlist.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/wav_playlist.c	(revision 1163)
@@ -0,0 +1,628 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org>
+ *
+ * Original author:
+ *  David Clark <vdc1048 @ tx.rr.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 
+ */
+#include <pjmedia/wav_playlist.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/wave.h>
+#include <pj/assert.h>
+#include <pj/file_access.h>
+#include <pj/file_io.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+#define THIS_FILE	    "wav_playlist.c"
+
+#define SIGNATURE	    PJMEDIA_PORT_SIGNATURE('P', 'l', 's', 't')
+#define BYTES_PER_SAMPLE    2
+
+
+#if 1
+#   define TRACE_(x)	PJ_LOG(4,x)
+#else
+#   define TRACE_(x)
+#endif
+
+#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0
+    static void samples_to_host(pj_int16_t *samples, unsigned count)
+    {
+	unsigned i;
+	for (i=0; i<count; ++i) {
+	    samples[i] = pj_swap16(samples[i]);
+	}
+    }
+#else
+#   define samples_to_host(samples,count)
+#endif
+
+
+struct playlist_port
+{
+    pjmedia_port     base;
+    unsigned	     options;
+    pj_bool_t	     eof;
+    pj_size_t	     bufsize;
+    char	    *buf;
+    char	    *readpos;
+
+    pj_off_t        *fsize_list;
+    unsigned        *start_data_list;
+    pj_off_t        *fpos_list;
+    pj_oshandle_t   *fd_list;	    /* list of file descriptors	*/
+    int              current_file;  /* index of current file.	*/
+    int              max_file;	    /* how many files.		*/
+
+    pj_status_t	   (*cb)(pjmedia_port*, void*);
+};
+
+
+static pj_status_t file_list_get_frame(pjmedia_port *this_port,
+				       pjmedia_frame *frame);
+static pj_status_t file_list_on_destroy(pjmedia_port *this_port);
+
+
+static struct playlist_port *create_file_list_port(pj_pool_t *pool,
+						   const pj_str_t *name)
+{
+    struct playlist_port *port;
+
+    port = pj_pool_zalloc(pool, sizeof(struct playlist_port));
+    if (!port)
+	return NULL;
+
+    /* Put in default values.
+     * These will be overriden once the file is read.
+     */
+    pjmedia_port_info_init(&port->base.info, name, SIGNATURE,
+			   8000, 1, 16, 80);
+
+    port->base.get_frame = &file_list_get_frame;
+    port->base.on_destroy = &file_list_on_destroy;
+
+    return port;
+}
+
+
+/*
+ * Fill buffer for file_list operations.
+ */
+static pj_status_t file_fill_buffer(struct playlist_port *fport)
+{
+    pj_ssize_t size_left = fport->bufsize;
+    unsigned size_to_read;
+    pj_ssize_t size;
+    pj_status_t status;
+    int current_file = fport->current_file;
+
+    /* Can't read file if EOF and loop flag is disabled */
+    if (fport->eof)
+	return PJ_EEOF;
+
+    while (size_left > 0)
+    {
+	/* Calculate how many bytes to read in this run. */
+	size = size_to_read = size_left;
+	status = pj_file_read(fport->fd_list[current_file],
+			      &fport->buf[fport->bufsize-size_left],
+			      &size);
+	if (status != PJ_SUCCESS)
+	    return status;
+	
+	if (size < 0)
+	{
+	    /* Should return more appropriate error code here.. */
+	    return PJ_ECANCELLED;
+	}
+	
+	size_left -= size;
+	fport->fpos_list[current_file] += size;
+	
+	/* If size is less than size_to_read, it indicates that we've
+	 * encountered EOF. Rewind the file.
+	 */
+	if (size < (pj_ssize_t)size_to_read)
+	{
+	    /* Rewind the file for the next iteration */
+	    fport->fpos_list[current_file] = 
+		fport->start_data_list[current_file];
+	    pj_file_setpos(fport->fd_list[current_file], 
+			   fport->fpos_list[current_file], PJ_SEEK_SET);
+
+	    /* Move to next file */
+	    current_file++;
+	    fport->current_file = current_file;
+
+	    if (fport->current_file == fport->max_file)
+	    {
+		/* All files have been played. Call callback, if any. */
+		if (fport->cb)
+		{
+		    PJ_LOG(5,(THIS_FILE,
+			      "File port %.*s EOF, calling callback",
+			      (int)fport->base.info.name.slen,
+			      fport->base.info.name.ptr));
+		    
+		    fport->eof = PJ_TRUE;
+
+		    status = (*fport->cb)(&fport->base,
+					  fport->base.port_data.pdata);
+
+		    if (status != PJ_SUCCESS)
+		    {
+			/* This will crash if file port is destroyed in the
+			 * callback, that's why we set the eof flag before
+			 * calling the callback:
+			 fport->eof = PJ_TRUE;
+			 */
+			return status;
+		    }
+
+		    fport->eof = PJ_FALSE;
+		}
+
+
+		if (fport->options & PJMEDIA_FILE_NO_LOOP)
+		{
+		    PJ_LOG(5,(THIS_FILE, "File port %.*s EOF, stopping..",
+			      (int)fport->base.info.name.slen,
+			      fport->base.info.name.ptr));
+		    fport->eof = PJ_TRUE;
+		    return PJ_EEOF;
+		}
+		else
+		{
+		    PJ_LOG(5,(THIS_FILE, "File port %.*s EOF, rewinding..",
+			      (int)fport->base.info.name.slen,
+			      fport->base.info.name.ptr));
+		    
+		    /* start with first file again. */
+		    fport->current_file = current_file = 0;
+		    fport->fpos_list[0] = fport->start_data_list[0];
+		    pj_file_setpos(fport->fd_list[0], fport->fpos_list[0],
+				   PJ_SEEK_SET);
+		}		
+		
+	    } /* if current_file == max_file */
+
+	} /* size < size_to_read */
+
+    } /* while () */
+    
+    /* Convert samples to host rep */
+    samples_to_host((pj_int16_t*)fport->buf, fport->bufsize/BYTES_PER_SAMPLE);
+    
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create wave list player.
+ */
+PJ_DEF(pj_status_t) pjmedia_wav_playlist_create(pj_pool_t *pool,
+						const pj_str_t *port_label,
+						const pj_str_t file_list[],
+						int file_count,
+						unsigned ptime,
+						unsigned options,
+						pj_ssize_t buff_size,
+						pjmedia_port **p_port)
+{
+    struct playlist_port *fport;
+    pj_off_t pos;
+    pj_status_t status;
+    int index;
+    pj_bool_t has_wave_info = PJ_FALSE;
+    pj_str_t tmp_port_label;
+    char filename[PJ_MAXPATH];	/* filename for open operations.    */
+
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(pool && file_list && file_count && p_port, PJ_EINVAL);
+
+    /* Normalize port_label */
+    if (port_label == NULL || port_label->slen == 0) {
+	tmp_port_label = pj_str("WAV playlist");
+	port_label = &tmp_port_label;
+    }
+
+    /* Be sure all files exist	*/
+    for (index=0; index<file_count; index++) {
+
+	PJ_ASSERT_RETURN(file_list[index].slen < PJ_MAXPATH, PJ_ENAMETOOLONG);
+
+	pj_memcpy(filename, file_list[index].ptr, file_list[index].slen);
+	filename[file_list[index].slen] = '\0';
+
+    	/* Check the file really exists. */
+    	if (!pj_file_exists(filename)) {
+	    PJ_LOG(4,(THIS_FILE,
+		      "WAV playlist error: file '%s' not found",
+	      	      filename));
+	    return PJ_ENOTFOUND;
+    	}
+    }
+
+    /* Normalize ptime */
+    if (ptime == 0)
+	ptime = 20;
+
+    /* Create fport instance. */
+    fport = create_file_list_port(pool, port_label);
+    if (!fport) {
+	return PJ_ENOMEM;
+    }
+
+    /* start with the first file. */
+    fport->current_file = 0;
+    fport->max_file = file_count;
+
+    /* Create file descriptor list */
+    fport->fd_list = pj_pool_zalloc(pool, sizeof(pj_oshandle_t)*file_count);
+    if (!fport->fd_list) {
+	return PJ_ENOMEM;
+    }
+
+    /* Create file size list */
+    fport->fsize_list = pj_pool_alloc(pool, sizeof(pj_off_t)*file_count);
+    if (!fport->fsize_list) {
+	return PJ_ENOMEM;
+    }
+
+    /* Create start of WAVE data list */
+    fport->start_data_list = pj_pool_alloc(pool, sizeof(unsigned)*file_count);
+    if (!fport->start_data_list) {
+	return PJ_ENOMEM;
+    }
+
+    /* Create file position list */
+    fport->fpos_list = pj_pool_alloc(pool, sizeof(pj_off_t)*file_count);
+    if (!fport->fpos_list) {
+	return PJ_ENOMEM;
+    }
+
+    /* Create file buffer once for this operation.
+     */
+    if (buff_size < 1) buff_size = PJMEDIA_FILE_PORT_BUFSIZE;
+    fport->bufsize = buff_size;
+
+
+    /* Create buffer. */
+    fport->buf = pj_pool_alloc(pool, fport->bufsize);
+    if (!fport->buf) {
+	return PJ_ENOMEM;
+    }
+
+    /* Initialize port */
+    fport->options = options;
+    fport->readpos = fport->buf;
+
+
+    /* ok run this for all files to be sure all are good for playback. */
+    for (index=file_count-1; index>=0; index--) {
+
+	pjmedia_wave_hdr wavehdr;
+	pj_ssize_t size_to_read, size_read;
+
+	/* we end with the last one so we are good to go if still in function*/
+	pj_memcpy(filename, file_list[index].ptr, file_list[index].slen);
+	filename[file_list[index].slen] = '\0';
+
+	/* Get the file size. */
+	fport->current_file = index;
+	fport->fsize_list[index] = pj_file_size(filename);
+	
+	/* Size must be more than WAVE header size */
+	if (fport->fsize_list[index] <= sizeof(pjmedia_wave_hdr)) {
+	    status = PJMEDIA_ENOTVALIDWAVE;
+	    goto on_error;
+	}
+	
+	/* Open file. */
+	status = pj_file_open( pool, filename, PJ_O_RDONLY, 
+			       &fport->fd_list[index]);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+	
+	/* Read the file header plus fmt header only. */
+	size_read = size_to_read = sizeof(wavehdr) - 8;
+	status = pj_file_read( fport->fd_list[index], &wavehdr, &size_read);
+	if (status != PJ_SUCCESS) {
+	    goto on_error;
+	}
+
+	if (size_read != size_to_read) {
+	    status = PJMEDIA_ENOTVALIDWAVE;
+	    goto on_error;
+	}
+	
+	/* Normalize WAVE header fields values from little-endian to host
+	 * byte order.
+	 */
+	pjmedia_wave_hdr_file_to_host(&wavehdr);
+	
+	/* Validate WAVE file. */
+	if (wavehdr.riff_hdr.riff != PJMEDIA_RIFF_TAG ||
+	    wavehdr.riff_hdr.wave != PJMEDIA_WAVE_TAG ||
+	    wavehdr.fmt_hdr.fmt != PJMEDIA_FMT_TAG)
+	{
+	    TRACE_((THIS_FILE,
+		"actual value|expected riff=%x|%x, wave=%x|%x fmt=%x|%x",
+		wavehdr.riff_hdr.riff, PJMEDIA_RIFF_TAG,
+		wavehdr.riff_hdr.wave, PJMEDIA_WAVE_TAG,
+		wavehdr.fmt_hdr.fmt, PJMEDIA_FMT_TAG));
+	    status = PJMEDIA_ENOTVALIDWAVE;
+	    goto on_error;
+	}
+	
+	/* Must be PCM with 16bits per sample */
+	if (wavehdr.fmt_hdr.fmt_tag != 1 ||
+	    wavehdr.fmt_hdr.bits_per_sample != 16)
+	{
+	    status = PJMEDIA_EWAVEUNSUPP;
+	    goto on_error;
+	}
+	
+	/* Block align must be 2*nchannels */
+	if (wavehdr.fmt_hdr.block_align != 
+		wavehdr.fmt_hdr.nchan * BYTES_PER_SAMPLE)
+	{
+	    status = PJMEDIA_EWAVEUNSUPP;
+	    goto on_error;
+	}
+	
+	/* If length of fmt_header is greater than 16, skip the remaining
+	 * fmt header data.
+	 */
+	if (wavehdr.fmt_hdr.len > 16) {
+	    size_to_read = wavehdr.fmt_hdr.len - 16;
+	    status = pj_file_setpos(fport->fd_list[index], size_to_read, 
+				    PJ_SEEK_CUR);
+	    if (status != PJ_SUCCESS) {
+		goto on_error;
+	    }
+	}
+	
+	/* Repeat reading the WAVE file until we have 'data' chunk */
+	for (;;) {
+	    pjmedia_wave_subchunk subchunk;
+	    size_read = 8;
+	    status = pj_file_read(fport->fd_list[index], &subchunk, 
+				  &size_read);
+	    if (status != PJ_SUCCESS || size_read != 8) {
+		status = PJMEDIA_EWAVETOOSHORT;
+		goto on_error;
+	    }
+	    
+	    /* Normalize endianness */
+	    PJMEDIA_WAVE_NORMALIZE_SUBCHUNK(&subchunk);
+	    
+	    /* Break if this is "data" chunk */
+	    if (subchunk.id == PJMEDIA_DATA_TAG) {
+		wavehdr.data_hdr.data = PJMEDIA_DATA_TAG;
+		wavehdr.data_hdr.len = subchunk.len;
+		break;
+	    }
+	    
+	    /* Otherwise skip the chunk contents */
+	    size_to_read = subchunk.len;
+	    status = pj_file_setpos(fport->fd_list[index], size_to_read, 
+				    PJ_SEEK_CUR);
+	    if (status != PJ_SUCCESS) {
+		goto on_error;
+	    }
+	}
+	
+	/* Current file position now points to start of data */
+	status = pj_file_getpos(fport->fd_list[index], &pos);
+	fport->start_data_list[index] = (unsigned)pos;
+	
+	/* Validate length. */
+	if (wavehdr.data_hdr.len != fport->fsize_list[index] - 
+				       fport->start_data_list[index]) 
+	{
+	    status = PJMEDIA_EWAVEUNSUPP;
+	    goto on_error;
+	}
+	if (wavehdr.data_hdr.len < 400) {
+	    status = PJMEDIA_EWAVETOOSHORT;
+	    goto on_error;
+	}
+	
+	/* It seems like we have a valid WAVE file. */
+	
+	/* Update port info if we don't have one, otherwise check
+	 * that the WAV file has the same attributes as previous files. 
+	 */
+	if (!has_wave_info) {
+	    fport->base.info.channel_count = wavehdr.fmt_hdr.nchan;
+	    fport->base.info.clock_rate = wavehdr.fmt_hdr.sample_rate;
+	    fport->base.info.bits_per_sample = wavehdr.fmt_hdr.bits_per_sample;
+	    fport->base.info.samples_per_frame = fport->base.info.clock_rate *
+						 wavehdr.fmt_hdr.nchan *
+						 ptime / 1000;
+	    fport->base.info.bytes_per_frame =
+		fport->base.info.samples_per_frame *
+		fport->base.info.bits_per_sample / 8;
+
+	    has_wave_info = PJ_TRUE;
+
+	} else {
+
+	    /* Check that this file has the same characteristics as the other
+	     * files.
+	     */
+	    if (wavehdr.fmt_hdr.nchan != fport->base.info.channel_count ||
+		wavehdr.fmt_hdr.sample_rate != fport->base.info.clock_rate ||
+		wavehdr.fmt_hdr.bits_per_sample != fport->base.info.bits_per_sample)
+	    {
+		/* This file has different characteristics than the other 
+		 * files. 
+		 */
+		PJ_LOG(4,(THIS_FILE,
+		          "WAV playlist error: file '%s' has differrent number"
+			  " of channels, sample rate, or bits per sample",
+	      		  filename));
+		status = PJMEDIA_EWAVEUNSUPP;
+		goto on_error;
+	    }
+
+	}
+	
+	
+	/* Set initial position of the file. */
+	fport->fpos_list[index] = fport->start_data_list[index];
+    }
+
+    /* Fill up the buffer. */
+    status = file_fill_buffer(fport);
+    if (status != PJ_SUCCESS) {
+	goto on_error;
+    }
+    
+    /* Done. */
+    
+    *p_port = &fport->base;
+    
+    PJ_LOG(4,(THIS_FILE,
+	     "WAV playlist '%.*s' created: samp.rate=%d, ch=%d, bufsize=%uKB",
+	     (int)port_label->slen,
+	     port_label->ptr,
+	     fport->base.info.clock_rate,
+	     fport->base.info.channel_count,
+	     fport->bufsize / 1000));
+    
+    return PJ_SUCCESS;
+
+on_error:
+    for (index=0; index<file_count; ++index) {
+	if (fport->fd_list[index] != 0)
+	    pj_file_close(fport->fd_list[index]);
+    }
+
+    return status;
+}
+
+
+/*
+ * Register a callback to be called when the file reading has reached the
+ * end of the last file.
+ */
+PJ_DEF(pj_status_t)
+pjmedia_wav_playlist_set_eof_cb(pjmedia_port *port,
+			        void *user_data,
+			        pj_status_t (*cb)(pjmedia_port *port,
+						  void *usr_data))
+{
+    struct playlist_port *fport;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(port, PJ_EINVAL);
+
+    /* Check that this is really a playlist port */
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, PJ_EINVALIDOP);
+
+    fport = (struct playlist_port*) port;
+
+    fport->base.port_data.pdata = user_data;
+    fport->cb = cb;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get frame from file for file_list operation
+ */
+static pj_status_t file_list_get_frame(pjmedia_port *this_port,
+				       pjmedia_frame *frame)
+{
+    struct playlist_port *fport = (struct playlist_port*)this_port;
+    unsigned frame_size;
+    pj_status_t status;
+
+    pj_assert(fport->base.info.signature == SIGNATURE);
+
+    //frame_size = fport->base.info.bytes_per_frame;
+    //pj_assert(frame->size == frame_size);
+    frame_size = frame->size;
+
+    /* Copy frame from buffer. */
+    frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
+    frame->size = frame_size;
+    frame->timestamp.u64 = 0;
+
+    if (fport->readpos + frame_size <= fport->buf + fport->bufsize) {
+
+	/* Read contiguous buffer. */
+	pj_memcpy(frame->buf, fport->readpos, frame_size);
+
+	/* Fill up the buffer if all has been read. */
+	fport->readpos += frame_size;
+	if (fport->readpos == fport->buf + fport->bufsize) {
+	    fport->readpos = fport->buf;
+
+	    status = file_fill_buffer(fport);
+	    if (status != PJ_SUCCESS) {
+		frame->type = PJMEDIA_FRAME_TYPE_NONE;
+		frame->size = 0;
+		return status;
+	    }
+	}
+    } else {
+	unsigned endread;
+
+	/* Split read.
+	 * First stage: read until end of buffer.
+	 */
+	endread = (fport->buf+fport->bufsize) - fport->readpos;
+	pj_memcpy(frame->buf, fport->readpos, endread);
+
+	/* Second stage: fill up buffer, and read from the start of buffer. */
+	status = file_fill_buffer(fport);
+	if (status != PJ_SUCCESS) {
+	    pj_bzero(((char*)frame->buf)+endread, frame_size-endread);
+	    return status;
+	}
+
+	pj_memcpy(((char*)frame->buf)+endread, fport->buf, frame_size-endread);
+	fport->readpos = fport->buf + (frame_size - endread);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Destroy port.
+ */
+static pj_status_t file_list_on_destroy(pjmedia_port *this_port)
+{
+    struct playlist_port *fport = (struct playlist_port*) this_port;
+    int index;
+
+    pj_assert(this_port->info.signature == SIGNATURE);
+
+    for (index=0; index<fport->max_file; index++)
+	pj_file_close(fport->fd_list[index]);
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/wav_writer.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/wav_writer.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/wav_writer.c	(revision 1163)
@@ -0,0 +1,361 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/wav_port.h>
+#include <pjmedia/errno.h>
+#include <pjmedia/wave.h>
+#include <pj/assert.h>
+#include <pj/file_access.h>
+#include <pj/file_io.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+
+#define THIS_FILE	    "wav_writer.c"
+#define SIGNATURE	    PJMEDIA_PORT_SIGNATURE('F', 'W', 'R', 'T')
+#define BYTES_PER_SAMPLE    2
+
+
+struct file_port
+{
+    pjmedia_port     base;
+    pj_size_t	     bufsize;
+    char	    *buf;
+    char	    *writepos;
+    pj_size_t	     total;
+
+    pj_oshandle_t    fd;
+
+    pj_size_t	     cb_size;
+    pj_status_t	   (*cb)(pjmedia_port*, void*);
+};
+
+static pj_status_t file_put_frame(pjmedia_port *this_port, 
+				  const pjmedia_frame *frame);
+static pj_status_t file_get_frame(pjmedia_port *this_port, 
+				  pjmedia_frame *frame);
+static pj_status_t file_on_destroy(pjmedia_port *this_port);
+
+
+/*
+ * Create file writer port.
+ */
+PJ_DEF(pj_status_t) pjmedia_wav_writer_port_create( pj_pool_t *pool,
+						     const char *filename,
+						     unsigned sampling_rate,
+						     unsigned channel_count,
+						     unsigned samples_per_frame,
+						     unsigned bits_per_sample,
+						     unsigned flags,
+						     pj_ssize_t buff_size,
+						     pjmedia_port **p_port )
+{
+    struct file_port *fport;
+    pjmedia_wave_hdr wave_hdr;
+    pj_ssize_t size;
+    pj_str_t name;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(flags);
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(pool && filename && p_port, PJ_EINVAL);
+
+    /* Only supports 16bits per sample for now.
+     * See flush_buffer().
+     */
+    PJ_ASSERT_RETURN(bits_per_sample == 16, PJ_EINVAL);
+
+    /* Create file port instance. */
+    fport = pj_pool_zalloc(pool, sizeof(struct file_port));
+    PJ_ASSERT_RETURN(fport != NULL, PJ_ENOMEM);
+
+    /* Initialize port info. */
+    pj_strdup2(pool, &name, filename);
+    pjmedia_port_info_init(&fport->base.info, &name, SIGNATURE,
+			   sampling_rate, channel_count, bits_per_sample,
+			   samples_per_frame);
+
+    fport->base.get_frame = &file_get_frame;
+    fport->base.put_frame = &file_put_frame;
+    fport->base.on_destroy = &file_on_destroy;
+
+
+    /* Open file in write and read mode.
+     * We need the read mode because we'll modify the WAVE header once
+     * the recording has completed.
+     */
+    status = pj_file_open(pool, filename, PJ_O_WRONLY, &fport->fd);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Initialize WAVE header */
+    pj_bzero(&wave_hdr, sizeof(pjmedia_wave_hdr));
+    wave_hdr.riff_hdr.riff = PJMEDIA_RIFF_TAG;
+    wave_hdr.riff_hdr.file_len = 0; /* will be filled later */
+    wave_hdr.riff_hdr.wave = PJMEDIA_WAVE_TAG;
+
+    wave_hdr.fmt_hdr.fmt = PJMEDIA_FMT_TAG;
+    wave_hdr.fmt_hdr.len = 16;
+    wave_hdr.fmt_hdr.fmt_tag = 1;
+    wave_hdr.fmt_hdr.nchan = (pj_int16_t)channel_count;
+    wave_hdr.fmt_hdr.sample_rate = sampling_rate;
+    wave_hdr.fmt_hdr.bytes_per_sec = sampling_rate * channel_count * 
+				     bits_per_sample / 8;
+    wave_hdr.fmt_hdr.block_align = (pj_int16_t) (channel_count * 
+						 bits_per_sample / 8);
+    wave_hdr.fmt_hdr.bits_per_sample = (pj_int16_t)bits_per_sample;
+
+    wave_hdr.data_hdr.data = PJMEDIA_DATA_TAG;
+    wave_hdr.data_hdr.len = 0;	    /* will be filled later */
+
+
+    /* Convert WAVE header from host byte order to little endian
+     * before writing the header.
+     */
+    pjmedia_wave_hdr_host_to_file(&wave_hdr);
+
+
+    /* Write WAVE header */
+    size = sizeof(pjmedia_wave_hdr);
+    status = pj_file_write(fport->fd, &wave_hdr, &size);
+    if (status != PJ_SUCCESS) {
+	pj_file_close(fport->fd);
+	return status;
+    }
+
+    /* Set buffer size. */
+    if (buff_size < 1) buff_size = PJMEDIA_FILE_PORT_BUFSIZE;
+    fport->bufsize = buff_size;
+
+    /* Check that buffer size is greater than bytes per frame */
+    pj_assert(fport->bufsize >= fport->base.info.bytes_per_frame);
+
+
+    /* Allocate buffer and set initial write position */
+    fport->buf = pj_pool_alloc(pool, fport->bufsize);
+    if (fport->buf == NULL) {
+	pj_file_close(fport->fd);
+	return PJ_ENOMEM;
+    }
+    fport->writepos = fport->buf;
+
+    /* Done. */
+    *p_port = &fport->base;
+
+    PJ_LOG(4,(THIS_FILE, 
+	      "File writer '%.*s' created: samp.rate=%d, bufsize=%uKB",
+	      (int)fport->base.info.name.slen,
+	      fport->base.info.name.ptr,
+	      fport->base.info.clock_rate,
+	      fport->bufsize / 1000));
+
+
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * Get current writing position. 
+ */
+PJ_DEF(pj_ssize_t) pjmedia_wav_writer_port_get_pos( pjmedia_port *port )
+{
+    struct file_port *fport;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(port, -PJ_EINVAL);
+
+    /* Check that this is really a writer port */
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, -PJ_EINVALIDOP);
+
+    fport = (struct file_port*) port;
+
+    return fport->total;
+}
+
+
+/*
+ * Register callback.
+ */
+PJ_DEF(pj_status_t) 
+pjmedia_wav_writer_port_set_cb( pjmedia_port *port,
+				pj_size_t pos,
+				void *user_data,
+			        pj_status_t (*cb)(pjmedia_port *port,
+						  void *usr_data))
+{
+    struct file_port *fport;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(port && cb, PJ_EINVAL);
+
+    /* Check that this is really a writer port */
+    PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, PJ_EINVALIDOP);
+
+    fport = (struct file_port*) port;
+
+    fport->cb_size = pos;
+    fport->base.port_data.pdata = user_data;
+    fport->cb = cb;
+
+    return PJ_SUCCESS;
+}
+
+
+#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0
+    static void swap_samples(pj_int16_t *samples, unsigned count)
+    {
+	unsigned i;
+	for (i=0; i<count; ++i) {
+	    samples[i] = pj_swap16(samples[i]);
+	}
+    }
+#else
+#   define swap_samples(samples,count)
+#endif
+
+/*
+ * Flush the contents of the buffer to the file.
+ */
+static pj_status_t flush_buffer(struct file_port *fport)
+{
+    pj_ssize_t bytes = fport->writepos - fport->buf;
+    pj_status_t status;
+
+    /* Convert samples to little endian */
+    swap_samples((pj_int16_t*)fport->buf, bytes/BYTES_PER_SAMPLE);
+
+    /* Write to file. */
+    status = pj_file_write(fport->fd, fport->buf, &bytes);
+
+    /* Reset writepos */
+    fport->writepos = fport->buf;
+
+    return status;
+}
+
+/*
+ * Put a frame into the buffer. When the buffer is full, flush the buffer
+ * to the file.
+ */
+static pj_status_t file_put_frame(pjmedia_port *this_port, 
+				  const pjmedia_frame *frame)
+{
+    struct file_port *fport = (struct file_port *)this_port;
+
+    /* Flush buffer if we don't have enough room for the frame. */
+    if (fport->writepos + frame->size > fport->buf + fport->bufsize) {
+	pj_status_t status;
+	status = flush_buffer(fport);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    /* Check if frame is not too large. */
+    PJ_ASSERT_RETURN(fport->writepos+frame->size <= fport->buf+fport->bufsize,
+		     PJMEDIA_EFRMFILETOOBIG);
+
+    /* Copy frame to buffer. */
+    pj_memcpy(fport->writepos, frame->buf, frame->size);
+    fport->writepos += frame->size;
+
+    /* Increment total written, and check if we need to call callback */
+    fport->total += frame->size;
+    if (fport->cb && fport->total >= fport->cb_size) {
+	pj_status_t (*cb)(pjmedia_port*, void*);
+	pj_status_t status;
+
+	cb = fport->cb;
+	fport->cb = NULL;
+
+	status = (*cb)(this_port, this_port->port_data.pdata);
+	return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Get frame, basicy is a no-op operation.
+ */
+static pj_status_t file_get_frame(pjmedia_port *this_port, 
+				  pjmedia_frame *frame)
+{
+    PJ_UNUSED_ARG(this_port);
+    PJ_UNUSED_ARG(frame);
+    return PJ_EINVALIDOP;
+}
+
+/*
+ * Close the port, modify file header with updated file length.
+ */
+static pj_status_t file_on_destroy(pjmedia_port *this_port)
+{
+    enum { FILE_LEN_POS = 4, DATA_LEN_POS = 40 };
+    struct file_port *fport = (struct file_port *)this_port;
+    pj_off_t file_size;
+    pj_ssize_t bytes;
+    pj_uint32_t wave_file_len;
+    pj_uint32_t wave_data_len;
+    pj_status_t status;
+
+    /* Flush remaining buffers. */
+    if (fport->writepos != fport->buf) 
+	flush_buffer(fport);
+
+    /* Get file size. */
+    status = pj_file_getpos(fport->fd, &file_size);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Calculate wave fields */
+    wave_file_len = (pj_uint32_t)(file_size - 8);
+    wave_data_len = (pj_uint32_t)(file_size - sizeof(pjmedia_wave_hdr));
+
+#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0
+    wave_file_len = pj_swap32(wave_file_len);
+    wave_data_len = pj_swap32(wave_data_len);
+#endif
+
+    /* Seek to the file_len field. */
+    status = pj_file_setpos(fport->fd, FILE_LEN_POS, PJ_SEEK_SET);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Write file_len */
+    bytes = sizeof(wave_file_len);
+    status = pj_file_write(fport->fd, &wave_file_len, &bytes);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Seek to data_len field. */
+    status = pj_file_setpos(fport->fd, DATA_LEN_POS, PJ_SEEK_SET);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Write file_len */
+    bytes = sizeof(wave_data_len);
+    status = pj_file_write(fport->fd, &wave_data_len, &bytes);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Close file */
+    status = pj_file_close(fport->fd);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Done. */
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/wave.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/wave.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/pjmedia/wave.c	(revision 1163)
@@ -0,0 +1,57 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/wave.h>
+
+/*
+ * Change the endianness of WAVE header fields.
+ */
+static void wave_hdr_swap_bytes( pjmedia_wave_hdr *hdr )
+{
+#if defined(PJ_IS_BIG_ENDIAN) && PJ_IS_BIG_ENDIAN!=0
+    hdr->riff_hdr.riff		    = pj_swap32(hdr->riff_hdr.riff);
+    hdr->riff_hdr.file_len	    = pj_swap32(hdr->riff_hdr.file_len);
+    hdr->riff_hdr.wave		    = pj_swap32(hdr->riff_hdr.wave);
+    
+    hdr->fmt_hdr.fmt		    = pj_swap32(hdr->fmt_hdr.fmt);
+    hdr->fmt_hdr.len		    = pj_swap32(hdr->fmt_hdr.len);
+    hdr->fmt_hdr.fmt_tag	    = pj_swap16(hdr->fmt_hdr.fmt_tag);
+    hdr->fmt_hdr.nchan		    = pj_swap16(hdr->fmt_hdr.nchan);
+    hdr->fmt_hdr.sample_rate	    = pj_swap32(hdr->fmt_hdr.sample_rate);
+    hdr->fmt_hdr.bytes_per_sec	    = pj_swap32(hdr->fmt_hdr.bytes_per_sec);
+    hdr->fmt_hdr.block_align	    = pj_swap16(hdr->fmt_hdr.block_align);
+    hdr->fmt_hdr.bits_per_sample    = pj_swap16(hdr->fmt_hdr.bits_per_sample);
+    
+    hdr->data_hdr.data		    = pj_swap32(hdr->data_hdr.data);
+    hdr->data_hdr.len		    = pj_swap32(hdr->data_hdr.len);
+#else
+    PJ_UNUSED_ARG(hdr);
+#endif
+}
+
+
+PJ_DEF(void) pjmedia_wave_hdr_file_to_host( pjmedia_wave_hdr *hdr )
+{
+    wave_hdr_swap_bytes(hdr);
+}
+
+PJ_DEF(void) pjmedia_wave_hdr_host_to_file( pjmedia_wave_hdr *hdr )
+{
+    wave_hdr_swap_bytes(hdr);
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/test/audio_tool.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/test/audio_tool.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/test/audio_tool.c	(revision 1163)
@@ -0,0 +1,409 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia.h>
+#include <pjlib.h>
+#include <stdio.h>
+
+#define THIS_FILE	"audio_tool.c"
+
+static pj_caching_pool caching_pool;
+static pj_pool_factory *pf;
+static FILE *fhnd;
+static pj_med_mgr_t *mm;
+static pjmedia_codec *codec;
+static pjmedia_codec_param cattr;
+
+
+#define WRITE_ORIGINAL_PCM 0
+#if WRITE_ORIGINAL_PCM
+static FILE *fhnd_pcm;
+#endif
+
+static char talker_sdp[] = 
+    "v=0\r\n"
+    "o=- 0 0 IN IP4 127.0.0.1\r\n"
+    "s=-\r\n"
+    "c=IN IP4 127.0.0.1\r\n"
+    "t=0 0\r\n"
+    "m=audio 4002 RTP/AVP 0\r\n"
+    "a=rtpmap:0 PCMU/8000\r\n"
+    "a=sendonly\r\n";
+static char listener_sdp[] = 
+    "v=0\r\n"
+    "o=- 0 0 IN IP4 127.0.0.1\r\n"
+    "s=-\r\n"
+    "c=IN IP4 127.0.0.1\r\n"
+    "t=0 0\r\n"
+    "m=audio 4000 RTP/AVP 0\r\n"
+    "a=rtpmap:0 PCMU/8000\r\n"
+    "a=recvonly\r\n";
+
+static pj_status_t play_callback(/* in */   void *user_data,
+				 /* in */   pj_uint32_t timestamp,
+				 /* out */  void *frame,
+				 /* out */  unsigned size)
+{
+    char pkt[160];
+    struct pjmedia_frame in, out;
+    int frmsz = cattr.avg_bps / 8 * cattr.ptime / 1000;
+
+    if (fread(pkt, frmsz, 1, fhnd) != 1) {
+	puts("EOF");
+	return -1;
+    } else {
+	in.type = PJMEDIA_FRAME_TYPE_AUDIO;
+	in.buf = pkt;
+	in.size = frmsz;
+	out.buf = frame;
+	if (codec->op->decode (codec, &in, size, &out) != 0)
+	    return -1;
+
+	size = out.size;
+	return 0;
+    }
+}
+
+static pj_status_t rec_callback( /* in */   void *user_data,
+			         /* in */   pj_uint32_t timestamp,
+			         /* in */   const void *frame,
+			         /* in*/    unsigned size)
+{
+    char pkt[160];
+    struct pjmedia_frame in, out;
+    //int frmsz = cattr.avg_bps / 8 * cattr.ptime / 1000;
+
+#if WRITE_ORIGINAL_PCM
+    fwrite(frame, size, 1, fhnd_pcm);
+#endif
+
+    in.type = PJMEDIA_FRAME_TYPE_AUDIO;
+    in.buf = (void*)frame;
+    in.size = size;
+    out.buf = pkt;
+
+    if (codec->op->encode(codec, &in, sizeof(pkt), &out) != 0)
+	return -1;
+
+    if (fwrite(pkt, out.size, 1, fhnd) != 1)
+	return -1;
+    return 0;
+}
+
+static pj_status_t init()
+{
+    pjmedia_codec_mgr *cm;
+    pjmedia_codec_info id;
+    int i;
+
+    pj_caching_pool_init(&caching_pool, &pj_pool_factory_default_policy, 0);
+    pf = &caching_pool.factory;
+
+    if (pj_snd_init(&caching_pool.factory))
+	return -1;
+
+    PJ_LOG(3,(THIS_FILE, "Dumping audio devices:"));
+    for (i=0; i<pj_snd_get_dev_count(); ++i) {
+	const pj_snd_dev_info *info;
+	info = pj_snd_get_dev_info(i);
+	PJ_LOG(3,(THIS_FILE, "  %d: %s\t(%d in, %d out", 
+			     i, info->name, 
+			     info->input_count, info->output_count));
+    }
+
+    mm = pj_med_mgr_create (&caching_pool.factory);
+    cm = pj_med_mgr_get_codec_mgr (mm);
+
+    id.type = PJMEDIA_TYPE_AUDIO;
+    id.pt = 0;
+    id.encoding_name = pj_str("PCMU");
+    id.sample_rate = 8000;
+
+    codec = pjmedia_codec_mgr_alloc_codec (cm, &id);
+    codec->op->default_attr(codec, &cattr);
+    codec->op->open(codec, &cattr);
+    return 0;
+}
+
+static pj_status_t deinit()
+{
+    pjmedia_codec_mgr *cm;
+    cm = pj_med_mgr_get_codec_mgr (mm);
+    codec->op->close(codec);
+    pjmedia_codec_mgr_dealloc_codec (cm, codec);
+    pj_med_mgr_destroy (mm);
+    pj_caching_pool_destroy(&caching_pool);
+    return 0;
+}
+
+static pj_status_t record_file (const char *filename)
+{
+    pj_snd_stream *stream;
+    pj_snd_stream_info info;
+    int status;
+    char s[10];
+
+    printf("Recording to file %s...\n", filename);
+
+    fhnd = fopen(filename, "wb");
+    if (!fhnd)
+	return -1;
+
+#if WRITE_ORIGINAL_PCM
+    fhnd_pcm = fopen("ORIGINAL.PCM", "wb");
+    if (!fhnd_pcm)
+	return -1;
+#endif
+
+    pj_bzero(&info, sizeof(info));
+    info.bits_per_sample = 16;
+    info.bytes_per_frame = 2;
+    info.frames_per_packet = 160;
+    info.samples_per_frame = 1;
+    info.samples_per_sec = 8000;
+
+    stream = pj_snd_open_recorder(-1, &info, &rec_callback, NULL);
+    if (!stream)
+	return -1;
+
+    status = pj_snd_stream_start(stream);
+    if (status != 0)
+	goto on_error;
+
+    puts("Press <ENTER> to exit recording");
+    fgets(s, sizeof(s), stdin);
+
+    pj_snd_stream_stop(stream);
+    pj_snd_stream_close(stream);
+
+#if WRITE_ORIGINAL_PCM
+    fclose(fhnd_pcm);
+#endif
+    fclose(fhnd);
+    return 0;
+
+on_error:
+    pj_snd_stream_stop(stream);
+    pj_snd_stream_close(stream);
+    return -1;
+}
+
+
+static pj_status_t play_file (const char *filename)
+{
+    pj_snd_stream *stream;
+    pj_snd_stream_info info;
+    int status;
+    char s[10];
+
+    printf("Playing file %s...\n", filename);
+
+    fhnd = fopen(filename, "rb");
+    if (!fhnd)
+	return -1;
+
+    pj_bzero(&info, sizeof(info));
+    info.bits_per_sample = 16;
+    info.bytes_per_frame = 2;
+    info.frames_per_packet = 160;
+    info.samples_per_frame = 1;
+    info.samples_per_sec = 8000;
+
+    stream = pj_snd_open_player(-1, &info, &play_callback, NULL);
+    if (!stream)
+	return -1;
+
+    status = pj_snd_stream_start(stream);
+    if (status != 0)
+	goto on_error;
+
+    puts("Press <ENTER> to exit playing");
+    fgets(s, sizeof(s), stdin);
+
+    pj_snd_stream_stop(stream);
+    pj_snd_stream_close(stream);
+
+    fclose(fhnd);
+    return 0;
+
+on_error:
+    pj_snd_stream_stop(stream);
+    pj_snd_stream_close(stream);
+    return -1;
+}
+
+static int create_ses_by_remote_sdp(int local_port, char *sdp)
+{
+    pj_media_session_t *ses = NULL;
+    pjsdp_session_desc *sdp_ses;
+    pj_media_sock_info skinfo;
+    pj_pool_t *pool;
+    char s[4];
+    const pj_media_stream_info *info[2];
+    int i, count;
+
+    pool = pj_pool_create(pf, "sdp", 1024, 0, NULL);
+    if (!pool) {
+	PJ_LOG(1,(THIS_FILE, "Unable to create pool"));
+	return -1;
+    }
+
+    pj_bzero(&skinfo, sizeof(skinfo));
+    skinfo.rtp_sock = skinfo.rtcp_sock = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, 0);
+    if (skinfo.rtp_sock == PJ_INVALID_SOCKET) {
+	PJ_LOG(1,(THIS_FILE, "Unable to create socket"));
+	goto on_error;
+    }
+
+    pj_sockaddr_init2(&skinfo.rtp_addr_name, "0.0.0.0", local_port);
+    if (pj_sock_bind(skinfo.rtp_sock, (struct pj_sockaddr*)&skinfo.rtp_addr_name, sizeof(pj_sockaddr_in)) != 0) {
+	PJ_LOG(1,(THIS_FILE, "Unable to bind socket"));
+	goto on_error;
+    }
+
+    sdp_ses = pjsdp_parse(sdp, strlen(sdp), pool);
+    if (!sdp_ses) {
+	PJ_LOG(1,(THIS_FILE, "Error parsing SDP"));
+	goto on_error;
+    }
+
+    ses = pj_media_session_create_from_sdp(mm, sdp_ses, &skinfo);
+    if (!ses) {
+	PJ_LOG(1,(THIS_FILE, "Unable to create session from SDP"));
+	goto on_error;
+    }
+
+    if (pj_media_session_activate(ses) != 0) {
+	PJ_LOG(1,(THIS_FILE, "Error activating session"));
+	goto on_error;
+    }
+
+    count = pj_media_session_enum_streams(ses, 2, info);
+    printf("\nDumping streams: \n");
+    for (i=0; i<count; ++i) {
+	const char *dir;
+	char *local_ip;
+
+	switch (info[i]->dir) {
+	case PJMEDIA_DIR_NONE:
+	    dir = "- NONE -"; break;
+	case PJMEDIA_DIR_ENCODING:
+	    dir = "SENDONLY"; break;
+	case PJMEDIA_DIR_DECODING:
+	    dir = "RECVONLY"; break;
+	case PJMEDIA_DIR_ENCODING_DECODING:
+	    dir = "SENDRECV"; break;
+	default:
+	    dir = "?UNKNOWN"; break;
+	}
+
+	local_ip = pj_sockaddr_get_str_addr(&info[i]->sock_info.rtp_addr_name);
+
+	printf("  Stream %d: %.*s %s local=%s:%d remote=%.*s:%d\n",
+	       i, info[i]->type.slen, info[i]->type.ptr,
+	       dir, 
+	       local_ip, pj_sockaddr_get_port(&info[i]->sock_info.rtp_addr_name),
+	       info[i]->rem_addr.slen, info[i]->rem_addr.ptr, info[i]->rem_port);
+    }
+
+    puts("Press <ENTER> to quit");
+    fgets(s, sizeof(s), stdin);
+
+    pj_media_session_destroy(ses);
+    pj_sock_close(skinfo.rtp_sock);
+    pj_pool_release(pool);
+
+    return 0;
+
+on_error:
+    if (ses)
+	pj_media_session_destroy(ses);
+    if (skinfo.rtp_sock != PJ_INVALID_SOCKET)
+	pj_sock_close(skinfo.rtp_sock);
+    if (pool)
+	pj_pool_release(pool);
+    return -1;
+}
+
+#if WRITE_ORIGINAL_PCM
+static pj_status_t convert(const char *src, const char *dst)
+{
+    char pcm[320];
+    char frame[160];
+    struct pjmedia_frame in, out;
+
+    fhnd_pcm = fopen(src, "rb");
+    if (!fhnd_pcm)
+	return -1;
+    fhnd = fopen(dst, "wb");
+    if (!fhnd)
+	return -1;
+
+    while (fread(pcm, 320, 1, fhnd_pcm) == 1) {
+
+	in.type = PJMEDIA_FRAME_TYPE_AUDIO;
+	in.buf = pcm;
+	in.size = 320;
+	out.buf = frame;
+
+	if (codec->op->encode(codec, &in, 160, &out) != 0)
+	    break;
+
+	if (fwrite(frame, out.size, 1, fhnd) != 1)
+	    break;
+
+    }
+
+    fclose(fhnd);
+    fclose(fhnd_pcm);
+    return 0;
+}
+#endif
+
+static void usage(const char *exe)
+{
+    printf("Usage: %s <command> <file>\n", exe);
+    puts("where:");
+    puts("  <command>     play|record|send|recv");
+}
+
+int main(int argc, char *argv[])
+{
+    if (argc < 2) {
+	usage(argv[0]);
+	return 1;
+    }
+
+    pj_init();
+
+    init();
+
+    if (stricmp(argv[1], "record")==0) {
+	record_file("FILE.PCM");
+    } else if (stricmp(argv[1], "play")==0) {
+	play_file("FILE.PCM");
+    } else if (stricmp(argv[1], "send")==0) {
+	create_ses_by_remote_sdp(4002, listener_sdp);
+    } else if (stricmp(argv[1], "recv")==0) {
+	create_ses_by_remote_sdp(4000, talker_sdp);
+    } else {
+	usage(argv[0]);
+    }
+    deinit();
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/test/jbuf_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/test/jbuf_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/test/jbuf_test.c	(revision 1163)
@@ -0,0 +1,154 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <stdio.h>
+#include <ctype.h>
+#include <pjmedia/jbuf.h>
+#include <pj/pool.h>
+
+#define JB_MIN	    1
+#define JB_MAX	    8
+#define JB_BUF_SIZE 10
+
+#define REPORT
+//#define PRINT_COMMENT
+
+int jbuf_main(pj_pool_factory *pf)
+{
+    pj_jitter_buffer jb;
+    FILE *input = fopen("JBTEST.DAT", "rt");
+    unsigned lastseq;
+    void *data = "Hello world";
+    char line[1024], *p;
+    int lastget = 0, lastput = 0;
+    pj_pool_t *pool;
+
+    pj_init();
+    pool = pj_pool_create(pf, "JBPOOL", 256*16, 256*16, NULL);
+
+    pj_jb_init(&jb, pool, JB_MIN, JB_MAX, JB_BUF_SIZE);
+
+    lastseq = 1;
+
+    while ((p=fgets(line, sizeof(line), input)) != NULL) {
+
+	while (*p && isspace(*p))
+	    ++p;
+
+	if (!*p)
+	    continue;
+
+	if (*p == '#') {
+#ifdef PRINT_COMMENT
+	    printf("\n%s", p);
+#endif
+	    continue;
+	}
+
+	pj_jb_reset(&jb);
+#ifdef REPORT
+	printf( "Initial\t%c   size=%d  prefetch=%d level=%d\n", 
+	        ' ', jb.lst.count, jb.prefetch, jb.level);
+#endif
+
+	while (*p) {
+	    int c;
+	    unsigned seq = 0;
+	    void *thedata;
+	    int status = 1234;
+	    
+	    c = *p++;
+	    if (isspace(c))
+		continue;
+	    
+	    if (c == '/') {
+		char *end;
+
+		printf("/*");
+
+		do {
+		    putchar(*++p);
+		} while (*p != '/');
+
+		putchar('\n');
+
+		c = *++p;
+		end = p;
+
+	    }
+
+	    if (isspace(c))
+		continue;
+
+	    if (isdigit(c)) {
+		seq = c - '0';
+		while (*p) {
+		    c = *p++;
+		    
+		    if (isspace(c))
+			continue;
+		    
+		    if (!isdigit(c))
+			break;
+		    
+		    seq = seq * 10 + c - '0';
+		}
+	    }
+
+	    if (!*p)
+		break;
+
+	    switch (toupper(c)) {
+	    case 'G':
+		seq = -1;
+		status = pj_jb_get(&jb, &seq, &thedata);
+		lastget = seq;
+		break;
+	    case 'P':
+		if (seq == 0) 
+		    seq = lastseq++;
+		else
+		    lastseq = seq;
+		status = pj_jb_put(&jb, seq, data);
+		if (status == 0)
+		    lastput = seq;
+		break;
+	    default:
+		printf("Unknown character '%c'\n", c);
+		break;
+	    }
+
+#ifdef REPORT
+	    printf("seq=%d\t%c rc=%d\tsize=%d\tpfch=%d\tlvl=%d\tmxl=%d\tdelay=%d\n", 
+		    seq, toupper(c), status, jb.lst.count, jb.prefetch, jb.level, jb.max_level,
+		    (lastget>0 && lastput>0) ? lastput-lastget : -1);
+#endif
+	}
+    }
+
+#ifdef REPORT
+    printf("0\t%c   size=%d  prefetch=%d level=%d\n", 
+	    ' ', jb.lst.count, jb.prefetch, jb.level);
+#endif
+
+    if (input != stdin)
+	fclose(input);
+
+    pj_pool_release(pool);
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/test/main.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/test/main.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/test/main.c	(revision 1163)
@@ -0,0 +1,43 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+
+ 
+/* Any tests that want to build a linked executable for RTEMS must include
+   this header to get a default config for the network stack. */
+#if defined(PJ_RTEMS) 
+#   include <bsp.h>
+#   include <rtems.h>
+#   include <rtems/rtems_bsdnet.h>
+#   include "../../../pjlib/include/rtems-network-config.h"
+#endif
+
+
+int main()
+{
+    int rc;
+    char s[10];
+
+    rc = test_main();
+
+    puts("\nPress <ENTER> to quit");
+    fgets(s, sizeof(s), stdin);
+
+    return rc;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/test/rtp_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/test/rtp_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/test/rtp_test.c	(revision 1163)
@@ -0,0 +1,37 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/rtp.h>
+#include <stdio.h>
+
+int rtp_test()
+{
+    pjmedia_rtp_session rtp;
+    FILE *fhnd = fopen("RTP.DAT", "wb");
+    const void *rtphdr;
+    int hdrlen;
+
+    if (!fhnd)
+	return -1;
+
+    pjmedia_rtp_session_init (&rtp, 4, 0x12345678);
+    pjmedia_rtp_encode_rtp (&rtp, 4, 0, 0, 160, &rtphdr, &hdrlen);
+    fwrite (rtphdr, hdrlen, 1, fhnd);
+    fclose(fhnd);
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/test/sdp_neg_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/test/sdp_neg_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/test/sdp_neg_test.c	(revision 1163)
@@ -0,0 +1,1209 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms oa the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 oa 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 oa
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy oa 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 <pjmedia/sdp.h>
+#include <pjmedia/sdp_neg.h>
+#include "test.h"
+
+
+#define THIS_FILE   "sdp_neg_test.c"
+#define START_TEST  0
+
+enum session_type
+{
+    REMOTE_OFFER,
+    LOCAL_OFFER,
+};
+
+struct offer_answer
+{			
+    enum session_type type;	/*  LOCAL_OFFER:	REMOTE_OFFER:	*/
+    char *sdp1;			/* local offer		remote offer	*/
+    char *sdp2;			/* remote answer	initial local	*/
+    char *sdp3;			/* local active media	local answer	*/
+};
+
+struct test
+{
+    const char		*title;
+    unsigned		 offer_answer_count;
+    struct offer_answer	 offer_answer[4];
+} test[] = 
+{
+    /* test 0: */
+    {
+	/*********************************************************************
+	 * RFC 3264 examples, section 10.1 (Alice's view)
+	 *
+	 * Difference from the example:
+	 *  - Bob's port number of the third media stream in the first answer
+	 *    is changed (make it different than Alice's)
+	 *  - in the second offer/answer exchange, Alice can't accept the
+	 *    additional line since she didn't specify the capability
+	 *    in the initial negotiator creation.
+	 */
+
+	"RFC 3264 example 10.1 (Alice's view)",
+	2,
+	{
+	  {
+	    LOCAL_OFFER,
+	    /* Alice sends offer: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.anywhere.com\r\n"
+	    "s= \r\n"
+	    "c=IN IP4 host.anywhere.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 51372 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n"
+	    "m=video 53000 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n",
+	    /* Received Bob's answer: */
+	    "v=0\r\n"
+	    "o=bob 2890844730 2890844730 IN IP4 host.example.com\r\n"
+	    "s= \r\n"
+	    "c=IN IP4 host.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49920 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "m=video 53002 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n",
+	    /* Alice's SDP now: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.anywhere.com\r\n"
+	    "s= \r\n"
+	    "c=IN IP4 host.anywhere.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n"
+	    "m=video 53000 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n"
+	  },
+	  {
+	    REMOTE_OFFER,
+	    /* Bob wants to change his local SDP 
+	     * (change local port for the first stream and add new stream)
+	     * Received SDP from Bob:
+	     */
+	    "v=0\r\n"
+	    "o=bob 2890844730 2890844731 IN IP4 host.example.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 65422 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "m=video 53002 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n"
+	    "m=audio 51434 RTP/AVP 110\r\n"
+	    "a=rtpmap:110 telephone-events/8000\r\n"
+	    "a=recvonly\r\n",
+	    NULL,
+	    /* Alice's SDP now */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844527 IN IP4 host.anywhere.com\r\n"
+	    "s= \r\n"
+	    "c=IN IP4 host.anywhere.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n"	/* <-- this is not necessary */
+	    "m=video 53000 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n"
+	    "m=audio 0 RTP/AVP 110\r\n"
+	    "a=rtpmap:110 telephone-events/8000\r\n"
+	    "a=sendonly\r\n"
+	  }
+	}
+    },
+
+    /* test 1: */
+    {
+	/*********************************************************************
+	 * RFC 3264 examples, section 10.1. (Bob's view)
+	 *
+	 * Difference:
+	 *  - the SDP version in Bob's capability is changed to ver-1.
+	 */
+
+	"RFC 3264 example 10.1 (Bob's view)",
+	2,
+	{
+	  {
+	    REMOTE_OFFER,
+	    /* Remote offer from Alice: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.anywhere.com\r\n"
+	    "s= \r\n"
+	    "c=IN IP4 host.anywhere.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 51372 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n"
+	    "m=video 53000 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n",
+	    /* Bob's capability: */
+	    "v=0\r\n"
+	    "o=bob 2890844730 2890844729 IN IP4 host.example.com\r\n"
+	    "s= \r\n"
+	    "c=IN IP4 host.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49920 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "m=video 53000 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n",
+	    /* This's how Bob's answer should look like: */
+	    "v=0\r\n"
+	    "o=bob 2890844730 2890844730 IN IP4 host.example.com\r\n"
+	    "s= \r\n"
+	    "c=IN IP4 host.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49920 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "m=video 53000 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n"
+	  },
+	  {
+	    LOCAL_OFFER,
+	    /* Bob wants to change his local SDP 
+	     * (change local port for the first stream and add new stream)
+	     */
+	    "v=0\r\n"
+	    "o=bob 2890844730 2890844731 IN IP4 host.example.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 65422 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "m=video 53000 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n"
+	    "m=audio 51434 RTP/AVP 110\r\n"
+	    "a=rtpmap:110 telephone-events/8000\r\n"
+	    "a=recvonly\r\n",
+	    /* Got answer from Alice */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844527 IN IP4 host.anywhere.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.anywhere.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n"
+	    "m=video 53000 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n"
+	    "m=audio 53122 RTP/AVP 110\r\n"
+	    "a=rtpmap:110 telephone-events/8000\r\n"
+	    "a=sendonly\r\n",
+	    /* This is how Bob's SDP should look like after negotiation */
+	    "v=0\r\n"
+	    "o=bob 2890844730 2890844731 IN IP4 host.example.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 65422 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "m=video 53000 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n"
+	    "m=audio 51434 RTP/AVP 110\r\n"
+	    "a=rtpmap:110 telephone-events/8000\r\n"
+	    "a=recvonly\r\n"
+	  }
+	}
+    },
+
+    /* test 2: */
+    {
+	/*********************************************************************
+	 * RFC 3264 examples, section 10.2.
+	 * This is from Alice's point of view.
+	 */
+
+	"RFC 3264 example 10.2 (Alice's view)",
+	2,
+	{
+	  {
+	    LOCAL_OFFER,
+	    /* The initial offer from Alice to Bob indicates a single audio 
+	     * stream with the three audio codecs that are available in the 
+	     * DSP. The stream is marked as inactive, 
+	     */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.anywhere.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.anywhere.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 62986 RTP/AVP 0 4 18\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=rtpmap:4 G723/8000\r\n"
+	    "a=rtpmap:18 G729/8000\r\n"
+	    "a=inactive\r\n",
+	    /* Bob can support dynamic switching between PCMU and G.723. So, 
+	     * he sends the following answer:
+	     */
+	    "v=0\r\n"
+	    "o=bob 2890844730 2890844731 IN IP4 host.example.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 54344 RTP/AVP 0 4\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=rtpmap:4 G723/8000\r\n"
+	    "a=inactive\r\n",
+	    /* This is how Alice's media should look like after negotiation */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.anywhere.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.anywhere.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 62986 RTP/AVP 0 4\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=rtpmap:4 G723/8000\r\n"
+	    "a=inactive\r\n",
+	  },
+	  {
+	    LOCAL_OFFER,
+	    /* Alice sends an updated offer with a sendrecv stream: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844527 IN IP4 host.anywhere.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.anywhere.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 62986 RTP/AVP 4\r\n"
+	    "a=rtpmap:4 G723/8000\r\n"
+	    "a=sendrecv\r\n",
+	    /* Bob accepts the single codec: */
+	    "v=0\r\n"
+	    "o=bob 2890844730 2890844732 IN IP4 host.example.com\r\n"
+	    "s= \r\n"
+	    "c=IN IP4 host.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 54344 RTP/AVP 4\r\n"
+	    "a=rtpmap:4 G723/8000\r\n"
+	    "a=sendrecv\r\n",
+	    /* This is how Alice's media should look like after negotiation */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844527 IN IP4 host.anywhere.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.anywhere.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 62986 RTP/AVP 4\r\n"
+	    "a=rtpmap:4 G723/8000\r\n"
+	    "a=sendrecv\r\n"
+	  }
+	}
+    },
+
+    /* test 3: */
+    {
+	/*********************************************************************
+	 * RFC 3264 examples, section 10.2.
+	 * This is from Bob's point of view.
+	 *
+	 * Difference:
+	 *  - The SDP version number in Bob's initial capability is ver-1
+	 */
+
+	"RFC 3264 example 10.2 (Bob's view)",
+	2,
+	{
+	  {
+	    REMOTE_OFFER,
+	    /* Bob received offer from Alice:
+	     */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.anywhere.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.anywhere.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 62986 RTP/AVP 0 4 18\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=rtpmap:4 G723/8000\r\n"
+	    "a=rtpmap:18 G729/8000\r\n"
+	    "a=inactive\r\n",
+	    /* Bob's capability:
+	     */
+	    "v=0\r\n"
+	    "o=bob 2890844730 2890844730 IN IP4 host.example.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 54344 RTP/AVP 0 4\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=rtpmap:4 G723/8000\r\n"
+	    "a=inactive\r\n",
+	    /* This is how Bob's media should look like after negotiation */
+	    "v=0\r\n"
+	    "o=bob 2890844730 2890844731 IN IP4 host.example.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 54344 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=inactive\r\n"
+	  },
+	  {
+	    REMOTE_OFFER,
+	    /* Received updated Alice's SDP: offer with a sendrecv stream: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844527 IN IP4 host.anywhere.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.anywhere.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 62986 RTP/AVP 4\r\n"
+	    "a=rtpmap:4 G723/8000\r\n"
+	    "a=sendrecv\r\n",
+	    /* Bob accepts the single codec: */
+	    NULL,
+	    /* This is how Bob's media should look like after negotiation */
+	    "v=0\r\n"
+	    "o=bob 2890844730 2890844732 IN IP4 host.example.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 54344 RTP/AVP 4\r\n"
+	    "a=rtpmap:4 G723/8000\r\n"
+	    "a=sendrecv\r\n",
+	  }
+	}
+    },
+
+    /* test 4: */
+    {
+	/*********************************************************************
+	 * RFC 4317 Sample 2.1: Audio and Video 1 (Alice's view)
+	 *
+	 * This common scenario shows a video and audio session in which
+	 * multiple codecs are offered but only one is accepted.  As a result of
+	 * the exchange shown below, Alice and Bob may send only PCMU audio and
+	 * MPV video.  Note: Dynamic payload type 97 is used for iLBC codec
+	 */
+	"RFC 4317 section 2.1: Audio and Video 1 (Alice's view)",
+	1,
+	{
+	  {
+	    LOCAL_OFFER,
+	    /* Alice's local offer: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0 8 97\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=rtpmap:8 PCMA/8000\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "m=video 51372 RTP/AVP 31 32\r\n"
+	    "a=rtpmap:31 H261/90000\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n",
+	    /* Received answer from Bob: */
+	    "v=0\r\n"
+	    "o=bob 2808844564 2808844564 IN IP4 host.biloxi.example.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.biloxi.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49174 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 49170 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n",
+	    /* This is how Alice's media should look like now: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 51372 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n"
+	  }
+	}
+    },
+
+    /* test 5: */
+    {
+	/*********************************************************************
+	 * RFC 4317 Sample 2.1: Audio and Video 1 (Bob's view)
+	 *
+	 * This common scenario shows a video and audio session in which
+	 * multiple codecs are offered but only one is accepted.  As a result of
+	 * the exchange shown below, Alice and Bob may send only PCMU audio and
+	 * MPV video.  Note: Dynamic payload type 97 is used for iLBC codec
+	 *
+	 * Difference:
+	 *  - Bob's initial capability version number
+	 */
+	"RFC 4317 section 2.1: Audio and Video 1 (Bob's view)",
+	1,
+	{
+	  {
+	    REMOTE_OFFER,
+	    /* Received Alice's local offer: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0 8 97\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=rtpmap:8 PCMA/8000\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "m=video 51372 RTP/AVP 31 32\r\n"
+	    "a=rtpmap:31 H261/90000\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n",
+	    /* Bob's capability: */
+	    "v=0\r\n"
+	    "o=bob 2808844564 2808844563 IN IP4 host.biloxi.example.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.biloxi.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49174 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 49170 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n",
+	    /* This is how Bob's media should look like now: */
+	    "v=0\r\n"
+	    "o=bob 2808844564 2808844564 IN IP4 host.biloxi.example.com\r\n"
+	    "s=-\r\n"
+	    "c=IN IP4 host.biloxi.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49174 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 49170 RTP/AVP 32\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n"
+	  }
+	}
+    },
+
+    /* test 6: */
+    {
+	/*********************************************************************
+	 * RFC 4317 Sample 2.2: Audio and Video 2 (Alice's view)
+	 *
+	 * Difference:
+	 *  - Bob's initial capability version number
+	 */
+	"RFC 4317 section 2.2: Audio and Video 2 (Alice's view)",
+	2,
+	{
+	  {
+	    LOCAL_OFFER,
+	    /* Alice sends offer: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com\r\n"
+	    "s=alice\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0 8 97\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=rtpmap:8 PCMA/8000\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "m=video 51372 RTP/AVP 31 32\r\n"
+	    "a=rtpmap:31 H261/90000\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n",
+	    /* Bob's answer: */
+	    "v=0\r\n"
+	    "o=bob 2808844564 2808844564 IN IP4 host.biloxi.example.com\r\n"
+	    "s=bob\r\n"
+	    "c=IN IP4 host.biloxi.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49172 RTP/AVP 0 8\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=rtpmap:8 PCMA/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n",
+	    /* This is how Alice's media should look like now: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com\r\n"
+	    "s=alice\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0 8\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=rtpmap:8 PCMA/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n"
+	  },
+	  {
+	    LOCAL_OFFER,
+	    /* Alice sends updated offer: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844527 IN IP4 host.atlanta.example.com\r\n"
+	    "s=alice\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 51372 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n",
+	    /* Bob's answer: */
+	    "v=0\r\n"
+	    "o=bob 2808844564 2808844565 IN IP4 host.biloxi.example.com\r\n"
+	    "s=bob\r\n"
+	    "c=IN IP4 host.biloxi.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49172 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n",
+	    /* This is how Alice's SDP should look like: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844527 IN IP4 host.atlanta.example.com\r\n"
+	    "s=alice\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 51372 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n"
+	  }
+	}
+    },
+
+    /* test 7: */
+    {
+	/*********************************************************************
+	 * RFC 4317 Sample 2.2: Audio and Video 2 (Bob's view)
+	 *
+	 * Difference:
+	 *  - Bob's initial capability version number
+	 */
+	"RFC 4317 section 2.2: Audio and Video 2 (Bob's view)",
+	2,
+	{
+	  {
+	    REMOTE_OFFER,
+	    /* Received offer from alice: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com\r\n"
+	    "s=alice\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0 8 97\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=rtpmap:8 PCMA/8000\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "m=video 51372 RTP/AVP 31 32\r\n"
+	    "a=rtpmap:31 H261/90000\r\n"
+	    "a=rtpmap:32 MPV/90000\r\n",
+	    /* Bob's initial capability: */
+	    "v=0\r\n"
+	    "o=bob 2808844564 2808844563 IN IP4 host.biloxi.example.com\r\n"
+	    "s=bob\r\n"
+	    "c=IN IP4 host.biloxi.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49172 RTP/AVP 0 8\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=rtpmap:8 PCMA/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n",
+	    /* This is how Bob's answer should look like now: */
+	    "v=0\r\n"
+	    "o=bob 2808844564 2808844564 IN IP4 host.biloxi.example.com\r\n"
+	    "s=bob\r\n"
+	    "c=IN IP4 host.biloxi.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49172 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n"
+	  },
+	  {
+	    REMOTE_OFFER,
+	    /* Received updated offer from Alice: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844527 IN IP4 host.atlanta.example.com\r\n"
+	    "s=alice\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 51372 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n",
+	    /* Bob's answer: */
+	    NULL,
+	    /* This is how Bob's answer should look like: */
+	    "v=0\r\n"
+	    "o=bob 2808844564 2808844565 IN IP4 host.biloxi.example.com\r\n"
+	    "s=bob\r\n"
+	    "c=IN IP4 host.biloxi.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49172 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=video 0 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n"
+	  }
+	}
+    },
+
+    /* test 8: */
+    {
+	/*********************************************************************
+	 * RFC 4317 Sample 2.4: Audio and Telephone-Events (Alice's view)
+	 *
+	 */
+
+	"RFC 4317 section 2.4: Audio and Telephone-Events (Alice's view)",
+	1,
+	{
+	  {
+	    LOCAL_OFFER,
+	    /* Alice sends offer: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com\r\n"
+	    "s=alice\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0 97\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "m=audio 49172 RTP/AVP 98\r\n"
+	    "a=rtpmap:98 telephone-event/8000\r\n"
+	    "a=sendonly\r\n",
+	    /* Received Bob's answer: */
+	    "v=0\r\n"
+	    "o=bob 2808844564 2808844564 IN IP4 host.biloxi.example.com\r\n"
+	    "s=bob\r\n"
+	    "c=IN IP4 host.biloxi.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49172 RTP/AVP 97\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "m=audio 49174 RTP/AVP 98\r\n"
+	    "a=rtpmap:98 telephone-event/8000\r\n"
+	    "a=recvonly\r\n",
+	    /* Alice's SDP now: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com\r\n"
+	    "s=alice\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 97\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "m=audio 49172 RTP/AVP 98\r\n"
+	    "a=rtpmap:98 telephone-event/8000\r\n"
+	    "a=sendonly\r\n"
+	  }
+	}
+    },
+
+
+    /* test 9: */
+    {
+	/*********************************************************************
+	 * RFC 4317 Sample 2.4: Audio and Telephone-Events (Bob's view)
+	 *
+	 * Difference:
+	 *  - Bob's initial SDP version number
+	 *  - Bob's capability are added with more formats, and the
+	 *    stream order is interchanged to test the negotiator.
+	 */
+
+	"RFC 4317 section 2.4: Audio and Telephone-Events (Bob's view)",
+	1,
+	{
+	  {
+	    REMOTE_OFFER,
+	    /* Received Alice's offer: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com\r\n"
+	    "s=alice\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0 97\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "m=audio 49172 RTP/AVP 98\r\n"
+	    "a=rtpmap:98 telephone-event/8000\r\n"
+	    "a=sendonly\r\n",
+	    /* Bob's initial capability: */
+	    "v=0\r\n"
+	    "o=bob 2808844564 2808844563 IN IP4 host.biloxi.example.com\r\n"
+	    "s=bob\r\n"
+	    "c=IN IP4 host.biloxi.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49174 RTP/AVP 4 98\r\n"
+	    "a=rtpmap:98 telephone-event/8000\r\n"
+	    "m=audio 49172 RTP/AVP 97 8 99\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "a=rtpmap:99 telephone-event/8000\r\n"
+	    "a=recvonly\r\n",
+	    /* Bob's answer should be: */
+	    "v=0\r\n"
+	    "o=bob 2808844564 2808844564 IN IP4 host.biloxi.example.com\r\n"
+	    "s=bob\r\n"
+	    "c=IN IP4 host.biloxi.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49172 RTP/AVP 97\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "m=audio 49174 RTP/AVP 98\r\n"
+	    "a=rtpmap:98 telephone-event/8000\r\n"
+	    "a=recvonly\r\n"
+	  }
+	}
+    },
+
+    /* test 10: */
+    {
+	/*********************************************************************
+	 * RFC 4317 Sample 2.6: Audio with Telephone-Events (Alice's view)
+	 *
+	 */
+
+	"RFC 4317 section 2.6: Audio with Telephone-Events (Alice's view)",
+	1,
+	{
+	  {
+	    LOCAL_OFFER,
+	    /* Alice sends offer: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com\r\n"
+	    "s=alice\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=audio 51372 RTP/AVP 97 101\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "a=rtpmap:101 telephone-event/8000\r\n",
+	    /* Received bob's answer: */
+	    "v=0\r\n"
+	    "o=bob 2808844564 2808844564 IN IP4 host.biloxi.example.com\r\n"
+	    "s=bob\r\n"
+	    "c=IN IP4 host.biloxi.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 0 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=audio 49170 RTP/AVP 97 101\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "a=rtpmap:101 telephone-event/8000\r\n",
+	    /* Alice's local SDP should be: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com\r\n"
+	    "s=alice\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 0 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=audio 51372 RTP/AVP 97 101\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "a=rtpmap:101 telephone-event/8000\r\n"
+	  }
+	}
+    },
+
+    /* test 11: */
+    {
+	/*********************************************************************
+	 * RFC 4317 Sample 2.6: Audio with Telephone-Events (Bob's view)
+	 *
+	 * Difference:
+	 *  - Bob's SDP version number
+	 *  - Bob's initial capability are expanded with multiple m lines
+	 *    and more formats
+	 */
+
+	"RFC 4317 section 2.6: Audio with Telephone-Events (Bob's view)",
+	1,
+	{
+	  {
+	    REMOTE_OFFER,
+	    /* Received Alice's offer: */
+	    "v=0\r\n"
+	    "o=alice 2890844526 2890844526 IN IP4 host.atlanta.example.com\r\n"
+	    "s=alice\r\n"
+	    "c=IN IP4 host.atlanta.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=audio 51372 RTP/AVP 97 101\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "a=rtpmap:101 telephone-event/8000\r\n",
+	    /* Bob's initial capability also has video: */
+	    "v=0\r\n"
+	    "o=bob 2808844564 2808844563 IN IP4 host.biloxi.example.com\r\n"
+	    "s=bob\r\n"
+	    "c=IN IP4 host.biloxi.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 49170 RTP/AVP 4 97 101\r\n"
+	    "a=rtpmap:4 G723/8000\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "a=rtpmap:101 telephone-event/8000\r\n"
+	    "m=video 1000 RTP/AVP 31\r\n"
+	    "a=rtpmap:31 H261/90000\r\n",
+	    /* Bob's answer should be: */
+	    "v=0\r\n"
+	    "o=bob 2808844564 2808844564 IN IP4 host.biloxi.example.com\r\n"
+	    "s=bob\r\n"
+	    "c=IN IP4 host.biloxi.example.com\r\n"
+	    "t=0 0\r\n"
+	    "m=audio 0 RTP/AVP 0\r\n"
+	    "a=rtpmap:0 PCMU/8000\r\n"
+	    "m=audio 49170 RTP/AVP 97 101\r\n"
+	    "a=rtpmap:97 iLBC/8000\r\n"
+	    "a=rtpmap:101 telephone-event/8000\r\n",
+	  }
+	}
+    },
+
+};
+
+static const char *find_diff(const char *s1, const char *s2,
+			     int *line)
+{
+    *line = 1;
+    while (*s2 && *s1) {
+	if (*s2 != *s1)
+	    return s2;
+	if (*s2 == '\n')
+	    ++*line;
+	++s2, ++s1;
+    }
+
+    return s2;
+}
+
+static int compare_sdp_string(const char *cmp_title,
+			      const char *title1,
+			      const pjmedia_sdp_session *sdp1,
+			      const char *title2,
+			      const pjmedia_sdp_session *sdp2,
+			      pj_status_t logical_cmp)
+{
+    char sdpbuf1[1024], sdpbuf2[1024];
+    pj_ssize_t len1, len2;
+
+    len1 = pjmedia_sdp_print(sdp1, sdpbuf1, sizeof(sdpbuf1));
+    if (len1 < 1) {
+	PJ_LOG(3,(THIS_FILE,"   error: printing sdp1"));
+	return -1;
+    }
+    sdpbuf1[len1] = '\0';
+
+    len2 = pjmedia_sdp_print(sdp2, sdpbuf2, sizeof(sdpbuf2));
+    if (len2 < 1) {
+	PJ_LOG(3,(THIS_FILE,"   error: printing sdp2"));
+	return -1;
+    }
+    sdpbuf2[len2] = '\0';
+
+    if (logical_cmp != PJ_SUCCESS) {
+	char errbuf[80];
+
+	pjmedia_strerror(logical_cmp, errbuf, sizeof(errbuf));
+
+	PJ_LOG(3,(THIS_FILE,"%s mismatch: %s\n"
+			    "%s:\n"
+			    "%s\n"
+			    "%s:\n"
+			    "%s\n",
+			    cmp_title,
+			    errbuf,
+			    title1, sdpbuf1, 
+			    title2, sdpbuf2));
+
+	return -1;
+
+    } else if (strcmp(sdpbuf1, sdpbuf2) != 0) {
+	int line;
+	const char *diff;
+
+	PJ_LOG(3,(THIS_FILE,"%s mismatch:\n"
+			    "%s:\n"
+			    "%s\n"
+			    "%s:\n"
+			    "%s\n",
+			    cmp_title,
+			    title1, sdpbuf1, 
+			    title2, sdpbuf2));
+
+	diff = find_diff(sdpbuf1, sdpbuf2, &line);
+	PJ_LOG(3,(THIS_FILE,"Difference: line %d:\n"
+			    "%s",
+			    line, diff));
+	return -1;
+
+    } else {
+	return 0;
+    }
+
+}
+
+static int offer_answer_test(pj_pool_t *pool, pjmedia_sdp_neg **p_neg,
+			     struct offer_answer *oa)
+{
+    pjmedia_sdp_session *sdp1;
+    pjmedia_sdp_neg *neg;
+    pj_status_t status;
+
+    status = pjmedia_sdp_parse(pool, oa->sdp1, pj_native_strlen(oa->sdp1),
+				&sdp1);
+    if (status != PJ_SUCCESS) {
+	app_perror(status, "   error: unexpected parse status for sdp1");
+	return -10;
+    }
+
+    status = pjmedia_sdp_validate(sdp1);
+    if (status != PJ_SUCCESS) {
+	app_perror(status, "   error: sdp1 validation failed");
+	return -15;
+    }
+
+    neg = *p_neg;
+
+    if (oa->type == LOCAL_OFFER) {
+	
+	/* 
+	 * Local creates offer first. 
+	 */
+	pjmedia_sdp_session *sdp2, *sdp3;
+	const pjmedia_sdp_session *active;
+
+	if (neg == NULL) {
+	    /* Create negotiator with local offer. */
+	    status = pjmedia_sdp_neg_create_w_local_offer(pool, sdp1, &neg);
+	    if (status != PJ_SUCCESS) {
+		app_perror(status, "   error: pjmedia_sdp_neg_create_w_local_offer");
+		return -20;
+	    }
+	    *p_neg = neg;
+
+	} else {
+	    /* Modify local offer */
+	    status = pjmedia_sdp_neg_modify_local_offer(pool, neg, sdp1);
+	    if (status != PJ_SUCCESS) {
+		app_perror(status, "   error: pjmedia_sdp_neg_modify_local_offer");
+		return -30;
+	    }
+	}
+
+	/* Parse and validate remote answer */
+	status = pjmedia_sdp_parse(pool, oa->sdp2, pj_native_strlen(oa->sdp2),
+				   &sdp2);
+	if (status != PJ_SUCCESS) {
+	    app_perror(status, "   error: parsing sdp2");
+	    return -40;
+	}
+
+	status = pjmedia_sdp_validate(sdp2);
+	if (status != PJ_SUCCESS) {
+	    app_perror(status, "   error: sdp2 validation failed");
+	    return -50;
+	}
+
+	/* Give the answer to negotiator. */
+	status = pjmedia_sdp_neg_set_remote_answer(pool, neg, sdp2);
+	if (status != PJ_SUCCESS) {
+	    app_perror(status, "   error: pjmedia_sdp_neg_rx_remote_answer");
+	    return -60;
+	}
+
+	/* Negotiate remote answer with local answer */
+	status = pjmedia_sdp_neg_negotiate(pool, neg, 0);
+	if (status != PJ_SUCCESS) {
+	    app_perror(status, "   error: pjmedia_sdp_neg_negotiate");
+	    return -70;
+	}
+
+	/* Get the local active media. */
+	status = pjmedia_sdp_neg_get_active_local(neg, &active);
+	if (status != PJ_SUCCESS) {
+	    app_perror(status, "   error: pjmedia_sdp_neg_get_local");
+	    return -80;
+	}
+
+	/* Parse and validate the correct active media. */
+	status = pjmedia_sdp_parse(pool, oa->sdp3, pj_native_strlen(oa->sdp3),
+				   &sdp3);
+	if (status != PJ_SUCCESS) {
+	    app_perror(status, "   error: parsing sdp3");
+	    return -90;
+	}
+
+	status = pjmedia_sdp_validate(sdp3);
+	if (status != PJ_SUCCESS) {
+	    app_perror(status, "   error: sdp3 validation failed");
+	    return -100;
+	}
+
+	/* Compare active with sdp3 */
+	status = pjmedia_sdp_session_cmp(active, sdp3, 0);
+	if (status != PJ_SUCCESS) {
+	    app_perror(status, "   error: active local comparison mismatch");
+	    compare_sdp_string("Logical cmp after negotiatin remote answer",
+			       "Active local sdp from negotiator", active,
+			       "The correct active local sdp", sdp3,
+			       status);
+	    return -110;
+	}
+
+	/* Compare the string representation oa both sdps */
+	status = compare_sdp_string("String cmp after negotiatin remote answer",
+				    "Active local sdp from negotiator", active,
+				    "The correct active local sdp", sdp3,
+				    PJ_SUCCESS);
+	if (status != 0)
+	    return -120;
+
+    } else {
+	/* 
+	 * Remote creates offer first. 
+	 */
+
+	pjmedia_sdp_session *sdp2, *sdp3;
+	const pjmedia_sdp_session *answer;
+
+	if (neg == NULL) {
+	    /* Parse and validate initial local capability */
+	    status = pjmedia_sdp_parse(pool, oa->sdp2, pj_native_strlen(oa->sdp2),
+				       &sdp2);
+	    if (status != PJ_SUCCESS) {
+		app_perror(status, "   error: parsing sdp2");
+		return -200;
+	    }
+
+	    status = pjmedia_sdp_validate(sdp2);
+	    if (status != PJ_SUCCESS) {
+		app_perror(status, "   error: sdp2 validation failed");
+		return -210;
+	    }
+
+	    /* Create negotiator with remote offer. */
+	    status = pjmedia_sdp_neg_create_w_remote_offer(pool, sdp2, sdp1, &neg);
+	    if (status != PJ_SUCCESS) {
+		app_perror(status, "   error: pjmedia_sdp_neg_create_w_remote_offer");
+		return -220;
+	    }
+	    *p_neg = neg;
+
+	} else {
+	    /* Received subsequent offer from remote. */
+	    status = pjmedia_sdp_neg_set_remote_offer(pool, neg, sdp1);
+	    if (status != PJ_SUCCESS) {
+		app_perror(status, "   error: pjmedia_sdp_neg_rx_remote_offer");
+		return -230;
+	    }
+	}
+
+	/* Negotiate. */
+	status = pjmedia_sdp_neg_negotiate(pool, neg, 0);
+	if (status != PJ_SUCCESS) {
+	    app_perror(status, "   error: pjmedia_sdp_neg_negotiate");
+	    return -240;
+	}
+	
+	/* Get our answer. */
+	status = pjmedia_sdp_neg_get_active_local(neg, &answer);
+	if (status != PJ_SUCCESS) {
+	    app_perror(status, "   error: pjmedia_sdp_neg_get_local");
+	    return -250;
+	}
+
+	/* Parse the correct answer. */
+	status = pjmedia_sdp_parse(pool, oa->sdp3, pj_native_strlen(oa->sdp3),
+				   &sdp3);
+	if (status != PJ_SUCCESS) {
+	    app_perror(status, "   error: parsing sdp3");
+	    return -260;
+	}
+
+	/* Validate the correct answer. */
+	status = pjmedia_sdp_validate(sdp3);
+	if (status != PJ_SUCCESS) {
+	    app_perror(status, "   error: sdp3 validation failed");
+	    return -270;
+	}
+
+	/* Compare answer from negotiator and the correct answer */
+	status = pjmedia_sdp_session_cmp(sdp3, answer, 0);
+	if (status != PJ_SUCCESS) {
+	    compare_sdp_string("Logical cmp after negotiating remote offer",
+			       "Local answer from negotiator", answer,
+			       "The correct local answer", sdp3,
+			       status);
+
+	    return -280;
+	}
+
+	/* Compare the string representation oa both answers */
+	status = compare_sdp_string("String cmp after negotiating remote offer",
+				    "Local answer from negotiator", answer,
+				    "The correct local answer", sdp3,
+				    PJ_SUCCESS);
+	if (status != 0)
+	    return -290;
+
+    }
+
+    return 0;
+}
+
+static int perform_test(pj_pool_t *pool, int test_index)
+{
+    pjmedia_sdp_neg *neg = NULL;
+    unsigned i;
+    int rc;
+
+    for (i=0; i<test[test_index].offer_answer_count; ++i) {
+
+	rc = offer_answer_test(pool, &neg, &test[test_index].offer_answer[i]);
+	if (rc != 0) {
+	    PJ_LOG(3,(THIS_FILE, "  test %d offer answer %d failed with status %d",
+		      test_index, i, rc));
+	    return rc;
+	}
+    }
+
+    return 0;
+}
+
+int sdp_neg_test()
+{
+    unsigned i;
+    int status;
+
+    for (i=START_TEST; i<PJ_ARRAY_SIZE(test); ++i) {
+	pj_pool_t *pool;
+
+	pool = pj_pool_create(mem, "sdp_neg_test", 4000, 4000, NULL);
+	if (!pool)
+	    return PJ_ENOMEM;
+
+	PJ_LOG(3,(THIS_FILE,"  test %d: %s", i, test[i].title));
+	status = perform_test(pool, i);
+
+	pj_pool_release(pool);
+
+	if (status != 0) {
+	    return status;
+	}
+    }
+
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/test/sdptest.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/test/sdptest.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/test/sdptest.c	(revision 1163)
@@ -0,0 +1,121 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/sdp.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <stdio.h>
+#include <string.h>
+
+static char *sdp[] = {
+    /*
+    "v=0\r\n"
+    "o=mhandley 2890844526 2890842807 IN IP4 126.16.64.4\r\n"
+    "s=SDP Seminar\r\n"
+    "i=A Seminar on the session description protocol\r\n"
+    "u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps\r\n"
+    "e=mjh@isi.edu (Mark Handley)\r\n"
+    "c=IN IP4 224.2.17.12/127\r\n"
+    "t=2873397496 2873404696\r\n"
+    "a=recvonly\r\n"
+    "m=audio 49170 RTP/AVP 0\r\n"
+    "m=video 51372 RTP/AVP 31\r\n"
+    "m=application 32416 udp wb\r\n"
+    "a=orient:portrait\r\n"
+    "m=audio 49230 RTP/AVP 96 97 98\r\n"
+    "a=rtpmap:96 L8/8000\r\n"
+    "a=rtpmap:97 L16/8000\r\n"
+    "a=rtpmap:98 L16/11025/2\r\n",
+    */
+    "v=0\r\n"
+    "o=usera 2890844526 2890844527 IN IP4 alice.example.com\r\n"
+    "s=\r\n"
+    "c=IN IP4 alice.example.com\r\n"
+    "t=0 0\r\n"
+    "m=message 7394 msrp/tcp *\r\n"
+    "a=accept-types: message/cpim text/plain text/html\r\n"
+    "a=path:msrp://alice.example.com:7394/2s93i9;tcp\r\n"
+};
+
+static int sdp_perform_test(pj_pool_factory *pf)
+{
+    pj_pool_t *pool;
+    int inputlen, len;
+    pjsdp_session_desc *ses;
+    char buf[1500];
+    enum { LOOP=1000000 };
+    int i;
+    pj_time_val start, end;
+
+    printf("Parsing and printing %d SDP messages..\n", LOOP);
+
+    pool = pj_pool_create(pf, "", 4096, 0, NULL);
+    inputlen = strlen(sdp[0]);
+    pj_gettimeofday(&start);
+    for (i=0; i<LOOP; ++i) {
+	ses = pjsdp_parse(sdp[0], inputlen, pool);
+	len = pjsdp_print(ses, buf, sizeof(buf));
+	buf[len] = '\0';
+	pj_pool_reset(pool);
+    }
+    pj_gettimeofday(&end);
+
+    printf("Original:\n%s\n", sdp[0]);
+    printf("Parsed:\n%s\n", buf);
+
+    PJ_TIME_VAL_SUB(end, start);
+    printf("Time: %ld:%03lds\n", end.sec, end.msec);
+
+    if (end.msec==0 && end.sec==0) end.msec=1;
+    printf("Performance: %ld msg/sec\n", LOOP*1000/PJ_TIME_VAL_MSEC(end));
+    puts("");
+
+    pj_pool_release(pool);
+    return 0;
+}
+
+static int sdp_conform_test(pj_pool_factory *pf)
+{
+    pj_pool_t *pool;
+    pjsdp_session_desc *ses;
+    int i, len;
+    char buf[1500];
+
+    for (i=0; i<sizeof(sdp)/sizeof(sdp[0]); ++i) {
+	pool = pj_pool_create(pf, "sdp", 4096, 0, NULL);
+	ses = pjsdp_parse(sdp[i], strlen(sdp[i]), pool);
+	len = pjsdp_print(ses, buf, sizeof(buf)); 
+	buf[len] = '\0';
+	printf("%s\n", buf);
+	pj_pool_release(pool);
+    }
+
+    return 0;
+}
+
+pj_status_t sdp_test(pj_pool_factory *pf)
+{
+    if (sdp_conform_test(pf) != 0)
+	return -2;
+
+    if (sdp_perform_test(pf) != 0)
+	return -3;
+
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjmedia/src/test/session_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/test/session_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/test/session_test.c	(revision 1163)
@@ -0,0 +1,130 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia/mediamgr.h>
+#include <pjmedia/session.h>
+#include <pj/sock.h>
+#include <pj/pool.h>
+#include <stdio.h>
+#include <pj/string.h>
+
+pj_status_t session_test (pj_pool_factory *pf)
+{
+    pj_med_mgr_t *mm;
+    pj_media_session_t *s1, *s2;
+    pj_pool_t *pool;
+    pjsdp_session_desc *sdp;
+    pj_media_stream_info sd_info;
+    char buf[1024];
+    int len;
+    pj_media_stream_stat tx_stat, rx_stat;
+
+    pool = pj_pool_create(pf, "test", 4096, 1024, NULL);
+
+    // Init media manager.
+    mm = pj_med_mgr_create ( pf );
+
+    // Create caller session.
+    // THIS WILL DEFINITELY CRASH (NULL as argument)!
+    s1 = pj_media_session_create (mm, NULL);
+
+    // Set caller's media to send-only.
+    sd_info.dir = PJMEDIA_DIR_ENCODING;
+    pj_media_session_modify_stream (s1, 0, PJMEDIA_STREAM_MODIFY_DIR, &sd_info);
+
+    // Create caller SDP.
+    sdp = pj_media_session_create_sdp (s1, pool, 0);
+    len = pjsdp_print (sdp, buf, sizeof(buf));
+    buf[len] = '\0';
+    printf("Caller's initial SDP:\n<BEGIN>\n%s\n<END>\n", buf);
+
+    // Parse SDP from caller.
+    sdp = pjsdp_parse (buf, len, pool);
+
+    // Create callee session based on caller's SDP.
+    // THIS WILL DEFINITELY CRASH (NULL as argument)!
+    s2 = pj_media_session_create_from_sdp (mm, sdp, NULL);
+    
+    // Create callee SDP
+    sdp = pj_media_session_create_sdp (s2, pool, 0);
+    len = pjsdp_print (sdp, buf, sizeof(buf));
+    buf[len] = '\0';
+    printf("Callee's SDP:\n<BEGIN>\n%s\n<END>\n", buf);
+
+    // Parse SDP from callee.
+    sdp = pjsdp_parse (buf, len, pool);
+
+    // Update caller
+    pj_media_session_update (s1, sdp);
+    sdp = pj_media_session_create_sdp (s1, pool, 0);
+    pjsdp_print (sdp, buf, sizeof(buf));
+    printf("Caller's SDP after update:\n<BEGIN>\n%s\n<END>\n", buf);
+
+    // Now start media.
+    pj_media_session_activate (s2);
+    pj_media_session_activate (s1);
+
+    // Wait
+    for (;;) {
+	int has_stat;
+
+	printf("Enter q to exit, 1 or 2 to print statistics.\n");
+	fgets (buf, 10, stdin);
+	has_stat = 0;
+
+	switch (buf[0]) {
+	case 'q':
+	case 'Q':
+	    goto done;
+	    break;
+	case '1':
+	    pj_media_session_get_stat (s1, 0, &tx_stat, &rx_stat);
+	    has_stat = 1;
+	    break;
+	case '2':
+	    pj_media_session_get_stat (s2, 0, &tx_stat, &rx_stat);
+	    has_stat = 1;
+	    break;
+	}
+
+	if (has_stat) {
+	    pj_media_stream_stat *stat[2] = { &tx_stat, &rx_stat };
+	    const char *statname[2] = { "TX", "RX" };
+	    int i;
+
+	    for (i=0; i<2; ++i) {
+		printf("%s statistics:\n", statname[i]);
+		printf(" Pkt      TX=%d RX=%d\n", stat[i]->pkt_tx, stat[i]->pkt_rx);
+		printf(" Octets   TX=%d RX=%d\n", stat[i]->oct_tx, stat[i]->oct_rx);
+		printf(" Jitter   %d ms\n", stat[i]->jitter);
+		printf(" Pkt lost %d\n", stat[i]->pkt_lost);
+	    }
+	    printf("\n");
+	}
+    }
+
+done:
+
+    // Done.
+    pj_pool_release (pool);
+    pj_media_session_destroy (s2);
+    pj_media_session_destroy (s1);
+    pj_med_mgr_destroy (mm);
+
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/test/test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/test/test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/test/test.c	(revision 1163)
@@ -0,0 +1,75 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+
+#define THIS_FILE   "test.c"
+
+#define DO_TEST(test)	do { \
+			    PJ_LOG(3, (THIS_FILE, "Running %s...", #test));  \
+			    rc = test; \
+			    PJ_LOG(3, (THIS_FILE,  \
+				       "%s(%d)",  \
+				       (rc ? "..ERROR" : "..success"), rc)); \
+			    if (rc!=0) goto on_return; \
+			} while (0)
+
+
+pj_pool_factory *mem;
+
+
+void app_perror(pj_status_t status, const char *msg)
+{
+    char errbuf[PJMEDIA_ERR_MSG_SIZE];
+    
+    pjmedia_strerror(status, errbuf, sizeof(errbuf));
+
+    PJ_LOG(3,(THIS_FILE, "%s: %s", msg, errbuf));
+}
+
+int test_main(void)
+{
+    int rc;
+    pj_caching_pool caching_pool;
+
+    pj_init();
+    pj_caching_pool_init(&caching_pool, &pj_pool_factory_default_policy, 0);
+
+    pj_log_set_decor(PJ_LOG_HAS_NEWLINE);
+
+    mem = &caching_pool.factory;
+
+    DO_TEST(sdp_neg_test());
+    //sdp_test (&caching_pool.factory);
+    //rtp_test(&caching_pool.factory);
+    //session_test (&caching_pool.factory);
+    //jbuf_main(&caching_pool.factory);
+
+    PJ_LOG(3,(THIS_FILE," "));
+
+on_return:
+
+    if (rc != 0) {
+	PJ_LOG(3,(THIS_FILE,"Test completed with error(s)!"));
+    } else {
+	PJ_LOG(3,(THIS_FILE,"Looks like everything is okay!"));
+    }
+
+    pj_caching_pool_destroy(&caching_pool);
+    return rc;
+}
Index: /pjproject/branches/split-3rd-party/pjmedia/src/test/test.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjmedia/src/test/test.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjmedia/src/test/test.h	(revision 1163)
@@ -0,0 +1,37 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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_TEST_H__
+#define __PJMEDIA_TEST_H__
+
+#include <pjmedia.h>
+#include <pjlib.h>
+
+
+int session_test(void);
+int rtp_test(void);
+int sdp_test(void);
+int jbuf_main(void);
+int sdp_neg_test(void);
+
+extern pj_pool_factory *mem;
+void app_perror(pj_status_t status, const char *title);
+
+int test_main(void);
+
+#endif	/* __PJMEDIA_TEST_H__ */
Index: /pjproject/branches/split-3rd-party/pjnath/build/Makefile
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/build/Makefile	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/build/Makefile	(revision 1163)
@@ -0,0 +1,95 @@
+# By default, the test application includes main.o.
+# OS make file may override this with os-specific files
+export PJNATH_TEST_OBJS = main.o
+
+include ../../build/common.mak
+
+RULES_MAK := ../../build/rules.mak
+
+PJLIB_LIB:=../../pjlib/lib/libpj-$(TARGET_NAME)$(LIBEXT)
+PJLIB_UTIL_LIB:=../../pjlib-util/lib/libpjlib-util-$(TARGET_NAME)$(LIBEXT)
+PJNATH_LIB:=../../pjnath/lib/libpjnath-$(TARGET_NAME)$(LIBEXT)
+export PJNATH_LIB:=../lib/libpjnath-$(TARGET_NAME)$(LIBEXT)
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC)../include $(CC_INC)../../pjlib/include \
+		   $(CC_INC)../../pjlib-util/include
+export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
+		   $(HOST_CXXFLAGS) $(CXXFLAGS)
+export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJNATH_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \
+		   $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
+		   $(LDFLAGS) 
+
+###############################################################################
+# Defines for building PJLIB-UTIL library
+#
+export PJNATH_SRCDIR = ../src/pjnath
+export PJNATH_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+		errno.o ice_session.o ice_strans.o stun_auth.o \
+		stun_msg.o stun_msg_dump.o stun_session.o stun_transaction.o
+export PJNATH_CFLAGS += $(_CFLAGS)
+
+###############################################################################
+# Defines for building test application
+#
+export PJNATH_TEST_SRCDIR = ../src/pjnath-test
+export PJNATH_TEST_OBJS += ice_test.o stun.o test.o
+export PJNATH_TEST_CFLAGS += $(_CFLAGS)
+export PJNATH_TEST_LDFLAGS += $(_LDFLAGS)
+export PJNATH_TEST_EXE:=../bin/pjnath-test-$(TARGET_NAME)$(HOST_EXE)
+
+	
+export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
+###############################################################################
+# Main entry
+#
+# $(TARGET) is defined in os-$(OS_NAME).mak file in current directory.
+#
+TARGETS := pjnath pjnath-test
+
+all: $(TARGETS)
+
+doc:
+	cd .. && doxygen docs/doxygen.cfg
+
+dep: depend
+distclean: realclean
+
+.PHONY: dep depend pjlib pjlib-test clean realclean distclean
+
+pjnath:
+	$(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $(PJNATH_LIB)
+
+pjnath-test: $(PJLIB_LIB)
+	$(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $(PJNATH_TEST_EXE)
+
+.PHONY: ../lib/pjnath.ko
+../lib/pjnath.ko:
+	echo Making $@
+	$(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $@
+
+.PHONY: ../lib/pjnath-test.ko
+../lib/pjnath-test.ko:
+	$(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $@
+
+clean:
+	$(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $@
+	$(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $@
+
+realclean:
+	$(subst @@,$(subst /,$(HOST_PSEP),.pjnath-$(TARGET_NAME).depend),$(HOST_RMR))
+	$(subst @@,$(subst /,$(HOST_PSEP),.pjnath-test-$(TARGET_NAME).depend),$(HOST_RMR))
+	$(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $@
+	$(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $@
+
+depend:
+	$(MAKE) -f $(RULES_MAK) APP=PJNATH app=pjnath $@
+	$(MAKE) -f $(RULES_MAK) APP=PJNATH_TEST app=pjnath-test $@
+	echo '$(TEST_EXE): $(PJNATH_LIB)' >> .pjnath-test-$(TARGET_NAME).depend; \
+
+
Index: /pjproject/branches/split-3rd-party/pjnath/build/pjnath.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/build/pjnath.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/build/pjnath.dsp	(revision 1163)
@@ -0,0 +1,170 @@
+# Microsoft Developer Studio Project File - Name="pjnath" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=pjnath - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjnath.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjnath.mak" CFG="pjnath - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjnath - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "pjnath - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjnath - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjnath-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir "./output/pjnath-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjnath-i386-win32-vc6-release"
+# PROP Intermediate_Dir "./output/pjnath-i386-win32-vc6-release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /GX /O1 /Ob2 /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjnath-i386-win32-vc6-release.lib"
+
+!ELSEIF  "$(CFG)" == "pjnath - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjnath-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir "./output/pjnath-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjnath-i386-win32-vc6-debug"
+# PROP Intermediate_Dir "./output/pjnath-i386-win32-vc6-debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjnath-i386-win32-vc6-debug.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjnath - Win32 Release"
+# Name "pjnath - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\src\pjnath\errno.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjnath\ice_session.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjnath\ice_strans.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjnath\stun_auth.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjnath\stun_msg.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjnath\stun_msg_dump.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjnath\stun_session.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjnath\stun_transaction.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\include\pjnath\config.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjnath\errno.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjnath\ice_session.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjnath\ice_strans.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjnath.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjnath\stun_auth.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjnath\stun_config.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjnath\stun_msg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjnath\stun_session.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjnath\stun_transaction.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjnath\types.h
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjnath/build/pjnath.dsw
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/build/pjnath.dsw	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/build/pjnath.dsw	(revision 1163)
@@ -0,0 +1,116 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "pjlib"=..\..\pjlib\build\pjlib.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib_util"="..\..\pjlib-util\build\pjlib_util.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjnath"=.\pjnath.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjnath_test"=.\pjnath_test.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjnath
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "pjstun_client"=.\pjstun_client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjnath
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "pjstun_srv_test"=.\pjstun_srv_test.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjnath
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
Index: /pjproject/branches/split-3rd-party/pjnath/build/pjnath.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/build/pjnath.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/build/pjnath.vcproj	(revision 1163)
@@ -0,0 +1,379 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjnath"
+	ProjectGUID="{A5D9AA24-08ED-48B9-BD65-F0A25E96BFC4}"
+	RootNamespace="pjnath"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="./output/pjnath-i386-win32-vc8-release"
+			IntermediateDirectory="./output/pjnath-i386-win32-vc8-release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include"
+				PreprocessorDefinitions="NDEBUG;WIN32;_LIB;PJ_WIN32=1;PJ_M_I386=1"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="./output/pjnath-i386-win32-vc8-release/pjnath.pch"
+				AssemblerListingLocation="./output/pjnath-i386-win32-vc8-release/"
+				ObjectFile="./output/pjnath-i386-win32-vc8-release/"
+				ProgramDataBaseFileName="./output/pjnath-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib/pjnath-i386-win32-vc8-release.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/pjnath-i386-win32-vc8-release/pjnath.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="./output/pjnath-i386-win32-vc8-debug"
+			IntermediateDirectory="./output/pjnath-i386-win32-vc8-debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include"
+				PreprocessorDefinitions="_DEBUG;WIN32;_LIB;PJ_WIN32=1;PJ_M_I386=1"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile="./output/pjnath-i386-win32-vc8-debug/pjnath.pch"
+				AssemblerListingLocation="./output/pjnath-i386-win32-vc8-debug/"
+				ObjectFile="./output/pjnath-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName="./output/pjnath-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib/pjnath-i386-win32-vc8-debug.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/pjnath-i386-win32-vc8-debug/pjnath.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\pjnath\errno.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjnath\ice_session.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjnath\ice_strans.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\pjnath\stun_auth.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjnath\stun_msg.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjnath\stun_msg_dump.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjnath\stun_session.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjnath\stun_transaction.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\include\pjnath\config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjnath\errno.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjnath\ice_session.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjnath\ice_strans.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjnath.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjnath\stun_auth.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjnath\stun_config.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjnath\stun_doc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjnath\stun_msg.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjnath\stun_session.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjnath\stun_transaction.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjnath\turn_client.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjnath\types.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjnath/build/pjnath_test.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/build/pjnath_test.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/build/pjnath_test.dsp	(revision 1163)
@@ -0,0 +1,118 @@
+# Microsoft Developer Studio Project File - Name="pjnath_test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=pjnath_test - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjnath_test.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjnath_test.mak" CFG="pjnath_test - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjnath_test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "pjnath_test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjnath_test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjnath-test-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir "./output/pjnath-test-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjnath-test-i386-win32-vc6-release"
+# PROP Intermediate_Dir "./output/pjnath-test-i386-win32-vc6-release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /GX /O2 /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 mswsock.lib iphlpapi.lib netapi32.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../bin/pjnath-test-i386-win32-vc6-release.exe"
+
+!ELSEIF  "$(CFG)" == "pjnath_test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjnath-test-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir "./output/pjnath-test-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjnath-test-i386-win32-vc6-debug"
+# PROP Intermediate_Dir "./output/pjnath-test-i386-win32-vc6-debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 iphlpapi.lib netapi32.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../bin/pjnath-test-i386-win32-vc6-debug.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjnath_test - Win32 Release"
+# Name "pjnath_test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\src\pjnath-test\ice_test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjnath-test\main.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjnath-test\stun.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjnath-test\test.c"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\src\pjnath-test\test.h"
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjnath/build/pjnath_test.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/build/pjnath_test.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/build/pjnath_test.vcproj	(revision 1163)
@@ -0,0 +1,316 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjnath_test"
+	ProjectGUID="{553C094C-F581-4A80-9540-D5D7B398A2C6}"
+	RootNamespace="pjnath_test"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="./output/pjnath-test-i386-win32-vc8-debug"
+			IntermediateDirectory="./output/pjnath-test-i386-win32-vc8-debug"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="./output/pjnath-test-i386-win32-vc8-debug/pjnath_test.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include"
+				PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;PJ_WIN32=1;PJ_M_I386=1"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile="./output/pjnath-test-i386-win32-vc8-debug/pjnath_test.pch"
+				AssemblerListingLocation="./output/pjnath-test-i386-win32-vc8-debug/"
+				ObjectFile="./output/pjnath-test-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName="./output/pjnath-test-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="netapi32.lib ws2_32.lib odbc32.lib odbccp32.lib ole32.lib"
+				OutputFile="../bin/pjnath-test-i386-win32-vc8-debug.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="./output/pjnath-test-i386-win32-vc8-debug/pjnath-test-i386-win32-vc8-debug.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/pjnath-test-i386-win32-vc8-debug/pjnath_test.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="./output/pjnath-test-i386-win32-vc8-release"
+			IntermediateDirectory="./output/pjnath-test-i386-win32-vc8-release"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="./output/pjnath-test-i386-win32-vc8-release/pjnath_test.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include"
+				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;PJ_WIN32=1;PJ_M_I386=1"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="./output/pjnath-test-i386-win32-vc8-release/pjnath_test.pch"
+				AssemblerListingLocation="./output/pjnath-test-i386-win32-vc8-release/"
+				ObjectFile="./output/pjnath-test-i386-win32-vc8-release/"
+				ProgramDataBaseFileName="./output/pjnath-test-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="netapi32.lib mswsock.lib ws2_32.lib odbc32.lib odbccp32.lib ole32.lib "
+				OutputFile="../bin/pjnath-test-i386-win32-vc8-release.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				ProgramDatabaseFile="./output/pjnath-test-i386-win32-vc8-release/pjnath-test-i386-win32-vc8-release.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/pjnath-test-i386-win32-vc8-release/pjnath_test.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\pjnath-test\ice_test.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjnath-test\main.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjnath-test\stun.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjnath-test\test.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\src\pjnath-test\test.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjnath/build/pjstun_client.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/build/pjstun_client.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/build/pjstun_client.dsp	(revision 1163)
@@ -0,0 +1,102 @@
+# Microsoft Developer Studio Project File - Name="pjstun_client" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=pjstun_client - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjstun_client.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjstun_client.mak" CFG="pjstun_client - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjstun_client - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "pjstun_client - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjstun_client - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjstun-client-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir "./output/pjstun-client-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjstun-client-i386-win32-vc6-release"
+# PROP Intermediate_Dir "./output/pjstun-client-i386-win32-vc6-release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../bin/pjstun-client-i386-win32-vc6-release.exe"
+
+!ELSEIF  "$(CFG)" == "pjstun_client - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjstun-client-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir "./output/pjstun-client-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjstun-client-i386-win32-vc6-debug"
+# PROP Intermediate_Dir "./output/pjstun-client-i386-win32-vc6-debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 netapi32.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../bin/pjstun-client-i386-win32-vc6-debug.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjstun_client - Win32 Release"
+# Name "pjstun_client - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\src\pjstun-client\client_main.c"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjnath/build/pjstun_client.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/build/pjstun_client.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/build/pjstun_client.vcproj	(revision 1163)
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjstun_client"
+	ProjectGUID="{D13A6424-23A4-4990-998D-F80C63704580}"
+	RootNamespace="pjstun_client"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="./output/pjstun-client-i386-win32-vc8-release"
+			IntermediateDirectory="./output/pjstun-client-i386-win32-vc8-release"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="./output/pjstun-client-i386-win32-vc8-release/pjstun_client.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include"
+				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;PJ_WIN32=1;PJ_M_I386=1"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="./output/pjstun-client-i386-win32-vc8-release/pjstun_client.pch"
+				AssemblerListingLocation="./output/pjstun-client-i386-win32-vc8-release/"
+				ObjectFile="./output/pjstun-client-i386-win32-vc8-release/"
+				ProgramDataBaseFileName="./output/pjstun-client-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="netapi32.lib mswsock.lib ws2_32.lib odbc32.lib odbccp32.lib ole32.lib "
+				OutputFile="../bin/pjstun-client-i386-win32-vc8-release.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				ProgramDatabaseFile="./output/pjstun-client-i386-win32-vc8-release/pjstun-client-i386-win32-vc8-release.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/pjstun-client-i386-win32-vc8-release/pjstun_client.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="./output/pjstun-client-i386-win32-vc8-debug"
+			IntermediateDirectory="./output/pjstun-client-i386-win32-vc8-debug"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="./output/pjstun-client-i386-win32-vc8-debug/pjstun_client.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include"
+				PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;PJ_WIN32=1;PJ_M_I386=1"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile="./output/pjstun-client-i386-win32-vc8-debug/pjstun_client.pch"
+				AssemblerListingLocation="./output/pjstun-client-i386-win32-vc8-debug/"
+				ObjectFile="./output/pjstun-client-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName="./output/pjstun-client-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="netapi32.lib ws2_32.lib odbc32.lib odbccp32.lib ole32.lib "
+				OutputFile="../bin/pjstun-client-i386-win32-vc8-debug.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="./output/pjstun-client-i386-win32-vc8-debug/pjstun-client-i386-win32-vc8-debug.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/pjstun-client-i386-win32-vc8-debug/pjstun_client.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\pjstun-client\client_main.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjnath/build/pjstun_srv_test.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/build/pjstun_srv_test.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/build/pjstun_srv_test.dsp	(revision 1163)
@@ -0,0 +1,122 @@
+# Microsoft Developer Studio Project File - Name="pjstun_srv_test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=pjstun_srv_test - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjstun_srv_test.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjstun_srv_test.mak" CFG="pjstun_srv_test - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjstun_srv_test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "pjstun_srv_test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjstun_srv_test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjstun-srv-test-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir "./output/pjstun-srv-test-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjstun-srv-test-i386-win32-vc6-release"
+# PROP Intermediate_Dir "./output/pjstun-srv-test-i386-win32-vc6-release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /GX /O2 /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"../bin/pjstun-srv-test-i386-win32-vc6-release.exe"
+
+!ELSEIF  "$(CFG)" == "pjstun_srv_test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjstun-srv-test-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir "./output/pjstun-srv-test-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjstun-srv-test-i386-win32-vc6-debug"
+# PROP Intermediate_Dir "./output/pjstun-srv-test-i386-win32-vc6-debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 netapi32.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../bin/pjstun-srv-test-i386-win32-vc6-debug.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjstun_srv_test - Win32 Release"
+# Name "pjstun_srv_test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\src\pjstun-srv-test\bind_usage.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjstun-srv-test\main.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjstun-srv-test\server.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjstun-srv-test\turn_usage.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjstun-srv-test\usage.c"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\src\pjstun-srv-test\server.h"
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjnath/build/pjstun_srv_test.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/build/pjstun_srv_test.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/build/pjstun_srv_test.vcproj	(revision 1163)
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjstun_srv_test"
+	ProjectGUID="{CD3783DF-22FA-4BAC-A8A6-62DA0D2CC045}"
+	RootNamespace="pjstun_srv_test"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="./output/pjstun-srv-test-i386-win32-vc8-release"
+			IntermediateDirectory="./output/pjstun-srv-test-i386-win32-vc8-release"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="./output/pjstun-srv-test-i386-win32-vc8-release/pjstun_srv_test.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include"
+				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;PJ_WIN32=1;PJ_M_I386=1"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="./output/pjstun-srv-test-i386-win32-vc8-release/pjstun_srv_test.pch"
+				AssemblerListingLocation="./output/pjstun-srv-test-i386-win32-vc8-release/"
+				ObjectFile="./output/pjstun-srv-test-i386-win32-vc8-release/"
+				ProgramDataBaseFileName="./output/pjstun-srv-test-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="netapi32.lib mswsock.lib ws2_32.lib odbc32.lib odbccp32.lib ole32.lib "
+				OutputFile="../bin/pjstun-srv-test-i386-win32-vc8-release.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				ProgramDatabaseFile="./output/pjstun-srv-test-i386-win32-vc8-release/pjstun-srv-test-i386-win32-vc8-release.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/pjstun-srv-test-i386-win32-vc8-release/pjstun_srv_test.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="./output/pjstun-srv-test-i386-win32-vc8-debug"
+			IntermediateDirectory="./output/pjstun-srv-test-i386-win32-vc8-debug"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="./output/pjstun-srv-test-i386-win32-vc8-debug/pjstun_srv_test.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include"
+				PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;PJ_WIN32=1;PJ_M_I386=1"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile="./output/pjstun-srv-test-i386-win32-vc8-debug/pjstun_srv_test.pch"
+				AssemblerListingLocation="./output/pjstun-srv-test-i386-win32-vc8-debug/"
+				ObjectFile="./output/pjstun-srv-test-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName="./output/pjstun-srv-test-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="netapi32.lib ws2_32.lib odbc32.lib odbccp32.lib ole32.lib "
+				OutputFile="../bin/pjstun-srv-test-i386-win32-vc8-debug.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="./output/pjstun-srv-test-i386-win32-vc8-debug/pjstun-srv-test-i386-win32-vc8-debug.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/pjstun-srv-test-i386-win32-vc8-debug/pjstun_srv_test.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\pjstun-srv-test\bind_usage.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjstun-srv-test\main.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjstun-srv-test\server.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjstun-srv-test\turn_usage.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjstun-srv-test\usage.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\src\pjstun-srv-test\server.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjnath/build/wince-evc4/pjnath_wince.vcp
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/build/wince-evc4/pjnath_wince.vcp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/build/wince-evc4/pjnath_wince.vcp	(revision 1163)
@@ -0,0 +1,5745 @@
+# Microsoft eMbedded Visual Tools Project File - Name="pjnath_wince" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE x86) Static Library" 0x8304
+# TARGTYPE "Win32 (WCE ARMV4) Static Library" 0xa304
+# TARGTYPE "Win32 (WCE ARMV4I) Static Library" 0xa504
+# TARGTYPE "Win32 (WCE emulator) Static Library" 0xa604
+# TARGTYPE "Win32 (WCE ARMV4T) Static Library" 0xa404
+
+CFG=pjnath_wince - Win32 (WCE emulator) Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjnath_wince.vcn".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjnath_wince.vcn" CFG="pjnath_wince - Win32 (WCE emulator) Release"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjnath_wince - Win32 (WCE emulator) Release" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjnath_wince - Win32 (WCE emulator) Debug" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjnath_wince - Win32 (WCE ARMV4I) Release" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjnath_wince - Win32 (WCE ARMV4I) Debug" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjnath_wince - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjnath_wince - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjnath_wince - Win32 (WCE ARMV4T) Release" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjnath_wince - Win32 (WCE ARMV4T) Debug" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjnath_wince - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE "pjnath_wince - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project 2
+
+!IF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjnath-emulatorRel"
+# PROP BASE Intermediate_Dir "./output/pjnath-emulatorRel"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjnath-emulatorRel"
+# PROP Intermediate_Dir "./output/pjnath-emulatorRel"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "NDEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjnath-emulatorDbg"
+# PROP BASE Intermediate_Dir "./output/pjnath-emulatorDbg"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjnath-emulatorDbg"
+# PROP Intermediate_Dir "./output/pjnath-emulatorDbg"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjnath-ARMV4IRel"
+# PROP BASE Intermediate_Dir "./output/pjnath-ARMV4IRel"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjnath-ARMV4IRel"
+# PROP Intermediate_Dir "./output/pjnath-ARMV4IRel"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "ARMV4I" /D "NDEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjnath-ARMV4IDbg"
+# PROP BASE Intermediate_Dir "./output/pjnath-ARMV4IDbg"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjnath-ARMV4IDbg"
+# PROP Intermediate_Dir "./output/pjnath-ARMV4IDbg"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "DEBUG" /D "ARMV4I" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjnath-ARMV4Rel"
+# PROP BASE Intermediate_Dir "./output/pjnath-ARMV4Rel"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjnath-ARMV4Rel"
+# PROP Intermediate_Dir "./output/pjnath-ARMV4Rel"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "NDEBUG" /D "ARMV4" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjnath-ARMV4Dbg"
+# PROP BASE Intermediate_Dir "./output/pjnath-ARMV4Dbg"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjnath-ARMV4Dbg"
+# PROP Intermediate_Dir "./output/pjnath-ARMV4Dbg"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "DEBUG" /D "ARMV4" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjnath-ARMV4TRel"
+# PROP BASE Intermediate_Dir "./output/pjnath-ARMV4TRel"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjnath-ARMV4TRel"
+# PROP Intermediate_Dir "./output/pjnath-ARMV4TRel"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "NDEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjnath-ARMV4TDbg"
+# PROP BASE Intermediate_Dir "./output/pjnath-ARMV4TDbg"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjnath-ARMV4TDbg"
+# PROP Intermediate_Dir "./output/pjnath-ARMV4TDbg"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "DEBUG" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjnath-X86Rel"
+# PROP BASE Intermediate_Dir "./output/pjnath-X86Rel"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjnath-X86Rel"
+# PROP Intermediate_Dir "./output/pjnath-X86Rel"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "NDEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjnath-X86Dbg"
+# PROP BASE Intermediate_Dir "./output/pjnath-X86Dbg"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjnath-X86Dbg"
+# PROP Intermediate_Dir "./output/pjnath-X86Dbg"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib/include" /I "../../../pjlib-util/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjnath_wince - Win32 (WCE emulator) Release"
+# Name "pjnath_wince - Win32 (WCE emulator) Debug"
+# Name "pjnath_wince - Win32 (WCE ARMV4I) Release"
+# Name "pjnath_wince - Win32 (WCE ARMV4I) Debug"
+# Name "pjnath_wince - Win32 (WCE ARMV4) Release"
+# Name "pjnath_wince - Win32 (WCE ARMV4) Debug"
+# Name "pjnath_wince - Win32 (WCE ARMV4T) Release"
+# Name "pjnath_wince - Win32 (WCE ARMV4T) Debug"
+# Name "pjnath_wince - Win32 (WCE x86) Release"
+# Name "pjnath_wince - Win32 (WCE x86) Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\src\pjnath\errno.c
+
+!IF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjnath\ice_session.c
+
+!IF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ICE_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ICE_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ICE_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ICE_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ICE_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ICE_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ICE_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ICE_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ICE_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ICE_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjnath\ice_strans.c
+
+!IF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ICE_ST=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\ice_strans.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ICE_ST=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\ice_strans.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ICE_ST=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\ice_strans.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ICE_ST=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\ice_strans.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ICE_ST=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\ice_strans.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ICE_ST=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\ice_strans.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ICE_ST=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\ice_strans.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ICE_ST=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\ice_strans.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ICE_ST=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\ice_strans.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ICE_ST=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\ice_session.h"\
+	"..\..\include\pjnath\ice_strans.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjnath\stun_auth.c
+
+!IF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STUN_=\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjnath\stun_msg.c
+
+!IF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STUN_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STUN_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STUN_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STUN_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STUN_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STUN_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STUN_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STUN_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STUN_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STUN_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjnath\stun_msg_dump.c
+
+!IF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STUN_MS=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STUN_MS=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STUN_MS=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STUN_MS=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STUN_MS=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STUN_MS=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STUN_MS=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STUN_MS=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STUN_MS=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STUN_MS=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjnath\stun_session.c
+
+!IF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STUN_S=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\stun_auth.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_session.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjnath\stun_transaction.c
+
+!IF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STUN_T=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STUN_T=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STUN_T=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STUN_T=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STUN_T=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STUN_T=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STUN_T=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STUN_T=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STUN_T=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjnath_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STUN_T=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjnath\config.h"\
+	"..\..\include\pjnath\errno.h"\
+	"..\..\include\pjnath\stun_config.h"\
+	"..\..\include\pjnath\stun_msg.h"\
+	"..\..\include\pjnath\stun_transaction.h"\
+	"..\..\include\pjnath\types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\include\pjnath\config.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjnath\errno.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjnath\ice_session.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjnath\ice_strans.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjnath.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjnath\stun_auth.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjnath\stun_config.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjnath\stun_msg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjnath\stun_session.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjnath\stun_transaction.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjnath\types.h
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjnath/docs/doxygen.cfg
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/docs/doxygen.cfg	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/docs/doxygen.cfg	(revision 1163)
@@ -0,0 +1,1047 @@
+# Doxyfile 1.3-rc3
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           =  "PJNATH Reference"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = docs
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, 
+# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en 
+# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese, 
+# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these class will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = NO
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
+# members of a class in the documentation of that class as if those members were 
+# ordinary class members. Constructors, destructors and assignment operators of 
+# the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. It is allowed to use relative paths in the argument list.
+
+STRIP_FROM_PATH        = "c:\project\pjproject"
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower case letters. If set to YES upper case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# users are adviced to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments  will behave just like the Qt-style comments (thus requiring an 
+# explict @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = YES
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# reimplements.
+
+INHERIT_DOCS           = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consist of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
+# only. Doxygen will then generate output that is more tailored for C. 
+# For instance some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
+# only. Doxygen will then generate output that is more tailored for Java. 
+# For instance namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  =  include/pjnath
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
+# *.h++ *.idl *.odl
+
+FILE_PATTERNS          = *.h *.c
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories.
+
+EXCLUDE_PATTERNS       = "*_i.h" "*/compat/*"
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = .
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = YES
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             =  docs
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.
+
+INPUT_FILTER           = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .htm
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = docs/header.html
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = docs/footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet
+
+HTML_STYLESHEET        = docs/doxygen.css
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output dir.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non empty doxygen will try to run 
+# the html help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the Html help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 1
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimised for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assigments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_XML           = NO
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed.
+
+PREDEFINED             = PJ_DECL(x)=x PJ_DEF(x)=x PJ_IDECL(x)=x \
+			 PJ_IDEF(x)=x PJ_INLINE(x)=x \
+			 PJ_DECL_NO_RETURN(x)=x \
+			 PJ_HAS_HIGH_RES_TIMER=1 \
+			 PJ_LOG_MAX_LEVEL=4 \
+			 PJ_HAS_SEMAPHORE=1 \
+			 PJ_HAS_EVENT_OBJ=1
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse the 
+# parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tagfiles.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or 
+# super classes. Setting the tag to NO turns the diagrams off. Note that this 
+# option is superceded by the HAVE_DOT option below. This is only a fallback. It is 
+# recommended to install and use dot, since it yield more powerful graphs.
+
+CLASS_DIAGRAMS         = NO
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_WIDTH    = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT   = 1024
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermedate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
+
+# The CGI_NAME tag should be the name of the CGI script that 
+# starts the search engine (doxysearch) with the correct parameters. 
+# A script with this name will be generated by doxygen.
+
+#CGI_NAME               = search.cgi
+
+# The CGI_URL tag should be the absolute URL to the directory where the 
+# cgi binaries are located. See the documentation of your http daemon for 
+# details.
+
+#CGI_URL                = 
+
+# The DOC_URL tag should be the absolute URL to the directory where the 
+# documentation is located. If left blank the absolute path to the 
+# documentation, with file:// prepended to it, will be used.
+
+#DOC_URL                = 
+
+# The DOC_ABSPATH tag should be the absolute path to the directory where the 
+# documentation is located. If left blank the directory on the local machine 
+# will be used.
+
+#DOC_ABSPATH            = 
+
+# The BIN_ABSPATH tag must point to the directory where the doxysearch binary 
+# is installed.
+
+#BIN_ABSPATH            = /usr/local/bin/
+
+# The EXT_DOC_PATHS tag can be used to specify one or more paths to 
+# documentation generated for other projects. This allows doxysearch to search 
+# the documentation for these projects as well.
+
+#EXT_DOC_PATHS          = 
Index: /pjproject/branches/split-3rd-party/pjnath/docs/doxygen.css
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/docs/doxygen.css	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/docs/doxygen.css	(revision 1163)
@@ -0,0 +1,305 @@
+BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+BODY,TD {
+       font-size: 80%;
+}
+CODE {
+	font-size: 120%;
+       font-family: monospace;
+}
+.fragment, pre {
+	font-size: 110%;
+       font-family: monospace;
+}
+H1 {
+	text-align: center;
+       font-size: 240%;
+}
+H2 {
+       	font-size: 200%;
+	margin-top     : 60px;
+}
+H3 {
+       font-size: 160%;
+}
+H4 {
+       font-size: 120%;
+}
+CAPTION { font-weight: bold }
+DIV.qindex {
+	width: 100%;
+	background-color: #eeeeff;
+	border: 1px solid #b0b0b0;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 140%;
+}
+DIV.nav {
+	width: 100%;
+	background-color: #eeeeff;
+	border: 1px solid #b0b0b0;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 140%;
+}
+A.qindex {
+       text-decoration: none;
+       font-size: 120%;
+       color: #1A419D;
+}
+A.qindex:visited {
+       text-decoration: none;
+       color: #1A419D
+}
+A.qindex:hover {
+	text-decoration: none;
+	background-color: #ddddff;
+}
+A.qindexHL {
+	text-decoration: none;
+	font-weight: bold;
+	background-color: #6666cc;
+	color: #ffffff;
+	border: 1px double #9295C2;
+}
+A.qindexHL:hover {
+	text-decoration: none;
+	background-color: #6666cc;
+	color: #ffffff;
+}
+A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
+A.el { text-decoration: none; font-weight: bold }
+A.elRef { font-weight: bold }
+A.code:link { text-decoration: none; font-weight: normal; color: #0000FF; }
+A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
+A.codeRef:link { font-weight: normal; color: #0000FF}
+A.codeRef:visited { font-weight: normal; color: #0000FF}
+A:hover { text-decoration: none; background-color: #f2f2ff }
+DL.el { margin-left: -1cm }
+PRE.fragment {
+	border: 1px solid #CCCCCC;
+	background-color: #f5f5f5;
+	margin-top: 4px;
+	margin-bottom: 4px;
+	margin-left: 2px;
+	margin-right: 8px;
+	padding-left: 6px;
+	padding-right: 6px;
+	padding-top: 4px;
+	padding-bottom: 4px;
+}
+DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
+TD.md { background-color: #F4F4FB; font-weight: bold; }
+TD.mdPrefix {
+       background-color: #F4F4FB;
+       color: #606060;
+	font-size: 80%;
+}
+TD.mdname1 { background-color: #F4F4FB; font-weight: bold; color: #602020; }
+TD.mdname { background-color: #F4F4FB; font-weight: bold; color: #602020; width: 600px; }
+DIV.groupHeader {
+       margin-left: 16px;
+       margin-top: 12px;
+       margin-bottom: 6px;
+       font-weight: bold;
+}
+DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
+BODY {
+	background: white;
+	color: black;
+	margin-right: 20px;
+	margin-left: 20px;
+}
+TD.indexkey {
+	background-color: #eeeeff;
+	font-weight: bold;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TD.indexvalue {
+	background-color: #eeeeff;
+	font-style: italic;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TR.memlist {
+   background-color: #f0f0f0; 
+}
+P.formulaDsp { text-align: center; }
+IMG.formulaDsp { }
+IMG.formulaInl { vertical-align: middle; }
+SPAN.keyword       { color: #008000 }
+SPAN.keywordtype   { color: #604020 }
+SPAN.keywordflow   { color: #e08000 }
+SPAN.comment       { color: #800000 }
+SPAN.preprocessor  { color: #806020 }
+SPAN.stringliteral { color: #002080 }
+SPAN.charliteral   { color: #008080 }
+.mdTable {
+	border: 1px solid #868686;
+	background-color: #F4F4FB;
+}
+.mdRow {
+	padding: 8px 10px;
+}
+.mdescLeft {
+       padding: 0px 8px 4px 8px;
+	font-size: 80%;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.mdescRight {
+       padding: 0px 8px 4px 8px;
+	font-size: 80%;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.memItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: none;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: none;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplParams {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+       color: #606060;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.search     { color: #003399;
+              font-weight: bold;
+}
+FORM.search {
+              margin-bottom: 0px;
+              margin-top: 0px;
+}
+INPUT.search { font-size: 75%;
+               color: #000080;
+               font-weight: normal;
+               background-color: #eeeeff;
+}
+TD.tiny      { font-size: 75%;
+}
+a {
+	color: #252E78;
+}
+a:visited {
+	color: #3D2185;
+}
+.dirtab { padding: 4px;
+          border-collapse: collapse;
+          border: 1px solid #b0b0b0;
+}
+TH.dirtab { background: #eeeeff;
+            font-weight: bold;
+}
+HR { height: 1px;
+     border: none;
+     border-top: 1px solid black;
+}
Index: /pjproject/branches/split-3rd-party/pjnath/docs/footer.html
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/docs/footer.html	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/docs/footer.html	(revision 1163)
@@ -0,0 +1,11 @@
+<p>&nbsp;</p>
+<hr><center>
+PJNATH - Open Source NAT traversal helper library supporting STUN, TURN, and ICE<br>
+(C)2001-2007 Benny Prijono
+</center>
+
+
+<!--#include virtual="/footer.html" -->
+
+</BODY>
+</HTML>
Index: /pjproject/branches/split-3rd-party/pjnath/docs/header.html
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/docs/header.html	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/docs/header.html	(revision 1163)
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>$title</title>
+<link href="/style/style.css" rel="stylesheet" type="text/css">
+</head><body>
+	<!--#include virtual="/header.html" -->
+	<p><A HREF="/">Home</A> --&gt; <A HREF="/docs.htm">Documentations</A> --&gt; <A HREF="/pjnath/docs/html/index.htm">PJNATH Reference</A></p>
+
+
Index: /pjproject/branches/split-3rd-party/pjnath/include/pjnath.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/include/pjnath.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/include/pjnath.h	(revision 1163)
@@ -0,0 +1,30 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjnath/config.h>
+#include <pjnath/errno.h>
+#include <pjnath/ice_session.h>
+#include <pjnath/ice_strans.h>
+#include <pjnath/stun_auth.h>
+#include <pjnath/stun_config.h>
+#include <pjnath/stun_msg.h>
+#include <pjnath/stun_session.h>
+#include <pjnath/stun_transaction.h>
+#include <pjnath/types.h>
+
Index: /pjproject/branches/split-3rd-party/pjnath/include/pjnath/config.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/include/pjnath/config.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/include/pjnath/config.h	(revision 1163)
@@ -0,0 +1,224 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJNATH_CONFIG_H__
+#define __PJNATH_CONFIG_H__
+
+
+/**
+ * @file config.h
+ * @brief Compile time settings
+ */
+
+#include <pj/types.h>
+
+/**
+ * @defgroup PJNATH_CONFIG Configuration
+ * @brief Various compile time settings
+ * @{
+ */
+
+
+/* **************************************************************************
+ * GENERAL
+ */
+
+/**
+ * The log level for PJNATH error display.
+ *
+ * default 1
+ */
+#ifndef PJNATH_ERROR_LEVEL
+#   define PJNATH_ERROR_LEVEL			    1
+#endif
+
+
+/* **************************************************************************
+ * STUN CLIENT CONFIGURATION
+ */
+
+/**
+ * Maximum number of attributes in the STUN packet (for the new STUN
+ * library).
+ *
+ * Default: 16
+ */
+#ifndef PJ_STUN_MAX_ATTR
+#   define PJ_STUN_MAX_ATTR			    16
+#endif
+
+/**
+ * The default initial STUN round-trip time estimation (the RTO value
+ * in RFC 3489-bis), in miliseconds. 
+ * This value is used to control the STUN request 
+ * retransmit time. The initial value of retransmission interval 
+ * would be set to this value, and will be doubled after each
+ * retransmission.
+ */
+#ifndef PJ_STUN_RTO_VALUE
+#   define PJ_STUN_RTO_VALUE			    100
+#endif
+
+
+/**
+ * The STUN transaction timeout value, in miliseconds.
+ * After the last retransmission is sent and if no response is received 
+ * after this time, the STUN transaction will be considered to have failed.
+ *
+ * The default value is 1600 miliseconds (as per RFC 3489-bis).
+ */
+#ifndef PJ_STUN_TIMEOUT_VALUE
+#   define PJ_STUN_TIMEOUT_VALUE		    1600
+#endif
+
+
+/**
+ * Maximum number of STUN retransmission count.
+ *
+ * Default: 7 (as per RFC 3489-bis)
+ */
+#ifndef PJ_STUN_MAX_RETRANSMIT_COUNT
+#   define PJ_STUN_MAX_RETRANSMIT_COUNT		    7
+#endif
+
+
+/**
+ * Maximum size of STUN message.
+ */
+#ifndef PJ_STUN_MAX_PKT_LEN
+#   define PJ_STUN_MAX_PKT_LEN			    512
+#endif
+
+
+/**
+ * Default STUN port as defined by RFC 3489.
+ */
+#define PJ_STUN_PORT				    3478
+
+
+
+/* **************************************************************************
+ * ICE CONFIGURATION
+ */
+
+/**
+ * Maximum number of ICE candidates.
+ *
+ * Default: 16
+ */
+#ifndef PJ_ICE_MAX_CAND
+#   define PJ_ICE_MAX_CAND			    16
+#endif
+
+
+/**
+ * Maximum number of candidates for each ICE stream transport component.
+ *
+ * Default: 8
+ */
+#ifndef PJ_ICE_ST_MAX_CAND
+#   define PJ_ICE_ST_MAX_CAND			    8
+#endif
+
+
+/**
+ * Maximum number of ICE components.
+ *
+ * Default: 8
+ */
+#ifndef PJ_ICE_MAX_COMP
+#   define PJ_ICE_MAX_COMP			    8
+#endif
+
+
+/**
+ * Maximum number of ICE checks.
+ *
+ * Default: 32
+ */
+#ifndef PJ_ICE_MAX_CHECKS
+#   define PJ_ICE_MAX_CHECKS			    32
+#endif
+
+
+/**
+ * Default timer interval (in miliseconds) for starting ICE periodic checks.
+ *
+ * Default: 20
+ */
+#ifndef PJ_ICE_TA_VAL
+#   define PJ_ICE_TA_VAL			    20
+#endif
+
+
+/**
+ * According to ICE Section 8.2. Updating States, if an In-Progress pair in 
+ * the check list is for the same component as a nominated pair, the agent 
+ * SHOULD cease retransmissions for its check if its pair priority is lower
+ * than the lowest priority nominated pair for that component.
+ *
+ * If a higher priority check is In Progress, this rule would cause that
+ * check to be performed even when it most likely will fail.
+ *
+ * The macro here controls if ICE session should cancel all In Progress 
+ * checks for the same component regardless of its priority.
+ *
+ * Default: 1 (yes, cancel all)
+ */
+#ifndef PJ_ICE_CANCEL_ALL
+#   define PJ_ICE_CANCEL_ALL			    1
+#endif
+
+
+/**
+ * Minimum interval value to be used for sending STUN keep-alive on the ICE
+ * stream transport, in seconds. This minimum interval, plus a random value
+ * which maximum is PJ_ICE_ST_KEEP_ALIVE_MAX_RAND, specify the actual interval
+ * of the STUN keep-alive.
+ *
+ * Default: 20 seconds
+ *
+ * @see PJ_ICE_ST_KEEP_ALIVE_MAX_RAND
+ */
+#ifndef PJ_ICE_ST_KEEP_ALIVE_MIN
+#   define PJ_ICE_ST_KEEP_ALIVE_MIN		    20
+#endif
+
+
+/**
+ * To prevent STUN keep-alives to be sent simultaneously, application should
+ * add random interval to minimum interval (PJ_ICE_ST_KEEP_ALIVE_MIN). This
+ * setting specifies the maximum random value to be added to the minimum
+ * interval, in seconds.
+ *
+ * Default: 5 seconds
+ *
+ * @see PJ_ICE_ST_KEEP_ALIVE_MIN
+ */
+#ifndef PJ_ICE_ST_KEEP_ALIVE_MAX_RAND
+#   define PJ_ICE_ST_KEEP_ALIVE_MAX_RAND	    5
+#endif
+
+
+
+/**
+ * @}
+ */
+
+#endif	/* __PJNATH_CONFIG_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjnath/include/pjnath/errno.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/include/pjnath/errno.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/include/pjnath/errno.h	(revision 1163)
@@ -0,0 +1,175 @@
+/* $Id$ */
+/* 
+ * Copyright (C)2003-2007 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 __PJNATH_ERRNO_H__
+#define __PJNATH_ERRNO_H__
+
+/**
+ * @file errno.h
+ * @brief PJNATH specific error codes
+ */
+
+#include <pj/errno.h>
+
+/**
+ * @defgroup PJNATH_ERROR NAT Helper Library Error Codes
+ * @brief PJNATH specific error code constants
+ * @{
+ */
+
+/**
+ * Start of error code relative to PJ_ERRNO_START_USER.
+ * This value is 370000.
+ */
+#define PJNATH_ERRNO_START    (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*4)
+
+
+/************************************************************
+ * STUN MESSAGING ERRORS
+ ***********************************************************/
+
+/**
+ * Map STUN error code (300-699) into pj_status_t error space.
+ */
+#define PJ_STATUS_FROM_STUN_CODE(code)	(PJNATH_ERRNO_START+code)
+
+/**
+ * @hideinitializer
+ * Invalid STUN message length.
+ */
+#define PJNATH_EINSTUNMSGLEN	    (PJNATH_ERRNO_START+1)  /* 370001 */
+/**
+ * @hideinitializer
+ * Invalid or unexpected STUN message type
+ */
+#define	PJNATH_EINSTUNMSGTYPE	    (PJNATH_ERRNO_START+2)  /* 370002 */
+/**
+ * @hideinitializer
+ * STUN transaction has timed out
+ */
+#define PJNATH_ESTUNTIMEDOUT	    (PJNATH_ERRNO_START+3)  /* 370003 */
+
+
+
+/**
+ * @hideinitializer
+ * Too many STUN attributes.
+ */
+#define PJNATH_ESTUNTOOMANYATTR	    (PJNATH_ERRNO_START+21) /* 370021 */
+/**
+ * @hideinitializer
+ * Invalid STUN attribute length.
+ */
+#define PJNATH_ESTUNINATTRLEN	    (PJNATH_ERRNO_START+22) /* 370022 */
+/**
+ * @hideinitializer
+ * Found duplicate STUN attribute.
+ */
+#define PJNATH_ESTUNDUPATTR	    (PJNATH_ERRNO_START+23) /* 370023 */
+
+/**
+ * @hideinitializer
+ * STUN FINGERPRINT verification failed
+ */
+#define PJNATH_ESTUNFINGERPRINT	    (PJNATH_ERRNO_START+30) /* 370030 */
+/**
+ * @hideinitializer
+ * Invalid STUN attribute after MESSAGE-INTEGRITY.
+ */
+#define PJNATH_ESTUNMSGINTPOS	    (PJNATH_ERRNO_START+31) /* 370031 */
+/**
+ * @hideinitializer
+ * Invalid STUN attribute after FINGERPRINT.
+ */
+#define PJNATH_ESTUNFINGERPOS	    (PJNATH_ERRNO_START+33) /* 370033 */
+
+
+/**
+ * @hideinitializer
+ * STUN (XOR-)MAPPED-ADDRESS attribute not found
+ */
+#define PJNATH_ESTUNNOMAPPEDADDR    (PJNATH_ERRNO_START+40) /* 370040 */
+/**
+ * @hideinitializer
+ * STUN IPv6 attribute not supported
+ */
+#define PJNATH_ESTUNIPV6NOTSUPP	    (PJNATH_ERRNO_START+41) /* 370041 */
+
+
+
+
+/************************************************************
+ * ICE ERROR CODES
+ ***********************************************************/
+
+/**
+ * @hideinitializer
+ * ICE session not available
+ */
+#define PJNATH_ENOICE		    (PJNATH_ERRNO_START+80) /* 370080 */
+/**
+ * @hideinitializer
+ * ICE check is in progress
+ */
+#define PJNATH_EICEINPROGRESS	    (PJNATH_ERRNO_START+81) /* 370081 */
+/**
+ * @hideinitializer
+ * All ICE checklists failed
+ */
+#define PJNATH_EICEFAILED	    (PJNATH_ERRNO_START+82) /* 370082 */
+/**
+ * @hideinitializer
+ * Invalid ICE component ID
+ */
+#define PJNATH_EICEINCOMPID	    (PJNATH_ERRNO_START+86) /* 370086 */
+/**
+ * @hideinitializer
+ * Invalid ICE candidate ID
+ */
+#define PJNATH_EICEINCANDID	    (PJNATH_ERRNO_START+87) /* 370087 */
+/**
+ * @hideinitializer
+ * Source address mismatch. This error occurs if the source address
+ * of the response for ICE connectivity check is different than
+ * the destination address of the request.
+ */
+#define PJNATH_EICEINSRCADDR	    (PJNATH_ERRNO_START+88) /* 370088 */
+/**
+ * @hideinitializer
+ * Missing ICE SDP attribute
+ */
+#define PJNATH_EICEMISSINGSDP	    (PJNATH_ERRNO_START+90) /* 370090 */
+/**
+ * @hideinitializer
+ * Invalid SDP "candidate" attribute
+ */
+#define PJNATH_EICEINCANDSDP	    (PJNATH_ERRNO_START+91) /* 370091 */
+/**
+ * @hideinitializer
+ * No host candidate associated with srflx. This error occurs when
+ * a server reflexive candidate is added without the matching 
+ * host candidate.
+ */
+#define PJNATH_EICENOHOSTCAND	    (PJNATH_ERRNO_START+92) /* 370092 */
+
+
+/**
+ * @}
+ */
+
+#endif	/* __PJNATH_ERRNO_H__ */
Index: /pjproject/branches/split-3rd-party/pjnath/include/pjnath/ice_session.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/include/pjnath/ice_session.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/include/pjnath/ice_session.h	(revision 1163)
@@ -0,0 +1,754 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __PJNATH_ICE_SOCK_H__
+#define __PJNATH_ICE_SOCK_H__
+
+/**
+ * @file ice_session.h
+ * @brief ICE session management
+ */
+#include <pjnath/types.h>
+#include <pjnath/stun_session.h>
+#include <pj/sock.h>
+#include <pj/timer.h>
+
+/**
+ * @defgroup PJNATH_ICE Interactive Connectivity Establishment (ICE)
+ * @brief Interactive Connectivity Establishment (ICE)
+ */
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJNATH_ICE_SESSION ICE Session
+ * @brief Transport Independent ICE Session
+ * @ingroup PJNATH_ICE
+ * @{
+ *
+ * This module describes #pj_ice_sess, a transport independent ICE session,
+ * part of PJNATH - the Open Source NAT helper library.
+ *
+ * An ICE session, represented by #pj_ice_sess structure, is the lowest 
+ * abstraction of ICE in PJNATH, and it is used to perform and manage
+ * connectivity checks of transport address candidates <b>within a
+ * single media stream</b> (note: this differs from what is described
+ * in ICE draft, where an ICE session manages the whole media sessions
+ * rather than just a single stream).
+ *
+ * The ICE session described here is independent from any transports,
+ * meaning that the actual network I/O for this session would have to
+ * be performed by the application, or higher layer abstraction. 
+ * Using this framework, application would give any incoming packets to
+ * the ICE session, and it would provide the ICE session with a callback
+ * to send outgoing message.
+ *
+ * For higher abstraction of ICE where transport is included, please 
+ * see \ref PJNATH_ICE_STREAM_TRANSPORT.
+ */
+
+/**
+ * This enumeration describes the type of an ICE candidate.
+ */
+typedef enum pj_ice_cand_type
+{
+    /**
+     * ICE host candidate. A host candidate represents the actual local
+     * transport address in the host.
+     */
+    PJ_ICE_CAND_TYPE_HOST,
+
+    /**
+     * ICE server reflexive candidate, which represents the public mapped
+     * address of the local address, and is obtained by sending STUN
+     * Binding request from the host candidate to a STUN server.
+     */
+    PJ_ICE_CAND_TYPE_SRFLX,
+
+    /**
+     * ICE peer reflexive candidate, which is the address as seen by peer
+     * agent during connectivity check.
+     */
+    PJ_ICE_CAND_TYPE_PRFLX,
+
+    /**
+     * ICE relayed candidate, which represents the address allocated in
+     * TURN server.
+     */
+    PJ_ICE_CAND_TYPE_RELAYED
+
+} pj_ice_cand_type;
+
+
+/** Forward declaration for pj_ice_sess */
+typedef struct pj_ice_sess pj_ice_sess;
+
+/** Forward declaration for pj_ice_sess_check */
+typedef struct pj_ice_sess_check pj_ice_sess_check;
+
+
+/**
+ * This structure describes ICE component. 
+ * A media stream may require multiple components, each of which has 
+ * to work for the media stream as a whole to work.  For media streams
+ * based on RTP, there are two components per media stream - one for RTP,
+ * and one for RTCP.
+ */
+typedef struct pj_ice_sess_comp
+{
+    /**
+     * The pointer to ICE check which was nominated for this component.
+     * The value will be NULL if a nominated check has not been found
+     * for this component.
+     */
+    pj_ice_sess_check	*valid_check;
+
+    /**
+     * The STUN session to be used to send and receive STUN messages for this
+     * component.
+     */
+    pj_stun_session	*stun_sess;
+
+} pj_ice_sess_comp;
+
+
+/**
+ * This structure describes an ICE candidate.
+ * ICE candidate is a transport address that is to be tested by ICE
+ * procedures in order to determine its suitability for usage for
+ * receipt of media.  Candidates also have properties - their type
+ * (server reflexive, relayed or host), priority, foundation, and
+ * base.
+ */
+typedef struct pj_ice_sess_cand
+{
+    /**
+     * The component ID of this candidate. Note that component IDs starts
+     * with one for RTP and two for RTCP. In other words, it's not zero
+     * based.
+     */
+    pj_uint32_t		 comp_id;
+
+    /**
+     * The candidate type, as described in #pj_ice_cand_type enumeration.
+     */
+    pj_ice_cand_type	 type;
+
+    /**
+     * The foundation string, which is an identifier which value will be
+     * equivalent for two candidates that are of the same type, share the 
+     * same base, and come from the same STUN server. The foundation is 
+     * used to optimize ICE performance in the Frozen algorithm.
+     */
+    pj_str_t		 foundation;
+
+    /**
+     * The candidate's priority, a 32-bit unsigned value which value will be
+     * calculated by the ICE session when a candidate is registered to the
+     * ICE session.
+     */
+    pj_uint32_t		 prio;
+
+    /**
+     * IP address of this candidate. For host candidates, this represents
+     * the local address of the socket. For reflexive candidates, the value
+     * will be the public address allocated in NAT router for the host
+     * candidate and as reported in MAPPED-ADDRESS or XOR-MAPPED-ADDRESS
+     * attribute of STUN Binding request. For relayed candidate, the value 
+     * will be the address allocated in the TURN server by STUN Allocate
+     * request.
+     */
+    pj_sockaddr		 addr;
+
+    /**
+     * Base address of this candidate. "Base" refers to the address an agent 
+     * sends from for a particular candidate.  For host candidates, the base
+     * is the same as the host candidate itself. For reflexive candidates, 
+     * the base is the local IP address of the socket. For relayed candidates,
+     * the base address is the transport address allocated in the TURN server
+     * for this candidate.
+     */
+    pj_sockaddr		 base_addr;
+
+    /**
+     * Related address, which is used for informational only and is not used
+     * in any way by the ICE session.
+     */
+    pj_sockaddr		 rel_addr;
+
+} pj_ice_sess_cand;
+
+
+/**
+ * This enumeration describes the state of ICE check.
+ */
+typedef enum pj_ice_sess_check_state
+{
+    /**
+     * A check for this pair hasn't been performed, and it can't
+     * yet be performed until some other check succeeds, allowing this
+     * pair to unfreeze and move into the Waiting state.
+     */
+    PJ_ICE_SESS_CHECK_STATE_FROZEN,
+
+    /**
+     * A check has not been performed for this pair, and can be
+     * performed as soon as it is the highest priority Waiting pair on
+     * the check list.
+     */
+    PJ_ICE_SESS_CHECK_STATE_WAITING,
+
+    /**
+     * A check has not been performed for this pair, and can be
+     * performed as soon as it is the highest priority Waiting pair on
+     * the check list.
+     */
+    PJ_ICE_SESS_CHECK_STATE_IN_PROGRESS,
+
+    /**
+     * A check has not been performed for this pair, and can be
+     * performed as soon as it is the highest priority Waiting pair on
+     * the check list.
+     */
+    PJ_ICE_SESS_CHECK_STATE_SUCCEEDED,
+
+    /**
+     * A check for this pair was already done and failed, either
+     * never producing any response or producing an unrecoverable failure
+     * response.
+     */
+    PJ_ICE_SESS_CHECK_STATE_FAILED
+
+} pj_ice_sess_check_state;
+
+
+/**
+ * This structure describes an ICE connectivity check. An ICE check
+ * contains a candidate pair, and will involve sending STUN Binding 
+ * Request transaction for the purposes of verifying connectivity. 
+ * A check is sent from the local candidate to the remote candidate 
+ * of a candidate pair.
+ */
+struct pj_ice_sess_check
+{
+    /**
+     * Pointer to local candidate entry of this check.
+     */
+    pj_ice_sess_cand	*lcand;
+
+    /**
+     * Pointer to remote candidate entry of this check.
+     */
+    pj_ice_sess_cand	*rcand;
+
+    /**
+     * Check priority.
+     */
+    pj_timestamp	 prio;
+
+    /**
+     * Connectivity check state.
+     */
+    pj_ice_sess_check_state	 state;
+
+    /**
+     * STUN transmit data containing STUN Binding request that was sent 
+     * as part of this check. The value will only be set when this check 
+     * has a pending transaction, and is used to cancel the transaction
+     * when other check has succeeded.
+     */
+    pj_stun_tx_data	*tdata;
+
+    /**
+     * Flag to indicate whether this check is nominated. A nominated check
+     * contains USE-CANDIDATE attribute in its STUN Binding request.
+     */
+    pj_bool_t		 nominated;
+
+    /**
+     * When the check failed, this will contain the failure status of the
+     * STUN transaction.
+     */
+    pj_status_t		 err_code;
+};
+
+
+/**
+ * This enumeration describes ICE checklist state.
+ */
+typedef enum pj_ice_sess_checklist_state
+{
+    /**
+     * The checklist is not yet running.
+     */
+    PJ_ICE_SESS_CHECKLIST_ST_IDLE,
+
+    /**
+     * In this state, ICE checks are still in progress for this
+     * media stream.
+     */
+    PJ_ICE_SESS_CHECKLIST_ST_RUNNING,
+
+    /**
+     * In this state, ICE checks have completed for this media stream,
+     * either successfully or with failure.
+     */
+    PJ_ICE_SESS_CHECKLIST_ST_COMPLETED
+
+} pj_ice_sess_checklist_state;
+
+
+/**
+ * This structure represents ICE check list, that is an ordered set of 
+ * candidate pairs that an agent will use to generate checks.
+ */
+typedef struct pj_ice_sess_checklist
+{
+    /**
+     * The checklist state.
+     */
+    pj_ice_sess_checklist_state   state;
+
+    /**
+     * Number of candidate pairs (checks).
+     */
+    unsigned		     count;
+
+    /**
+     * Array of candidate pairs (checks).
+     */
+    pj_ice_sess_check	     checks[PJ_ICE_MAX_CHECKS];
+
+    /**
+     * A timer used to perform periodic check for this checklist.
+     */
+    pj_timer_entry	     timer;
+
+} pj_ice_sess_checklist;
+
+
+/**
+ * This structure contains callbacks that will be called by the ICE
+ * session.
+ */
+typedef struct pj_ice_sess_cb
+{
+    /**
+     * An optional callback that will be called by the ICE session when
+     * ICE negotiation has completed, successfully or with failure.
+     *
+     * @param ice	    The ICE session.
+     * @param status	    Will contain PJ_SUCCESS if ICE negotiation is
+     *			    successful, or some error code.
+     */
+    void	(*on_ice_complete)(pj_ice_sess *ice, pj_status_t status);
+
+    /**
+     * A mandatory callback which will be called by the ICE session when
+     * it needs to send outgoing STUN packet. 
+     *
+     * @param ice	    The ICE session.
+     * @param comp_id	    ICE component ID.
+     * @param pkt	    The STUN packet.
+     * @param size	    The size of the packet.
+     * @param dst_addr	    Packet destination address.
+     * @param dst_addr_len  Length of destination address.
+     */
+    pj_status_t (*on_tx_pkt)(pj_ice_sess *ice, unsigned comp_id, 
+			     const void *pkt, pj_size_t size,
+			     const pj_sockaddr_t *dst_addr,
+			     unsigned dst_addr_len);
+
+    /**
+     * A mandatory callback which will be called by the ICE session when
+     * it receives packet which is not part of ICE negotiation.
+     *
+     * @param ice	    The ICE session.
+     * @param comp_id	    ICE component ID.
+     * @param pkt	    The whole packet.
+     * @param size	    Size of the packet.
+     * @param src_addr	    Source address where this packet was received 
+     *			    from.
+     * @param src_addr_len  The length of source address.
+     */
+    void	(*on_rx_data)(pj_ice_sess *ice, unsigned comp_id,
+			      void *pkt, pj_size_t size,
+			      const pj_sockaddr_t *src_addr,
+			      unsigned src_addr_len);
+} pj_ice_sess_cb;
+
+
+/**
+ * This enumeration describes the role of the ICE agent.
+ */
+typedef enum pj_ice_sess_role
+{
+    /**
+     * The ICE agent is in controlled role.
+     */
+    PJ_ICE_SESS_ROLE_UNKNOWN,
+
+    /**
+     * The ICE agent is in controlled role.
+     */
+    PJ_ICE_SESS_ROLE_CONTROLLED,
+
+    /**
+     * The ICE agent is in controlling role.
+     */
+    PJ_ICE_SESS_ROLE_CONTROLLING
+
+} pj_ice_sess_role;
+
+
+/**
+ * This structure represents an incoming check (an incoming Binding
+ * request message), and is mainly used to keep early checks in the
+ * list in the ICE session. An early check is a request received
+ * from remote when we haven't received SDP answer yet, therefore we
+ * can't perform triggered check. For such cases, keep the incoming
+ * request in a list, and we'll do triggered checks (simultaneously)
+ * as soon as we receive answer.
+ */
+typedef struct pj_ice_rx_check
+{
+    PJ_DECL_LIST_MEMBER(struct pj_ice_rx_check);
+
+    unsigned		 comp_id;	/**< Component ID.		*/
+
+    pj_sockaddr		 src_addr;	/**< Source address of request	*/
+    unsigned		 src_addr_len;	/**< Length of src address.	*/
+
+    pj_bool_t		 use_candidate;	/**< USE-CANDIDATE is present?	*/
+    pj_uint32_t		 priority;	/**< PRIORITY value in the req.	*/
+    pj_stun_uint64_attr *role_attr;	/**< ICE-CONTROLLING/CONTROLLED	*/
+
+} pj_ice_rx_check;
+
+
+/**
+ * This structure describes the ICE session. For this version of PJNATH,
+ * an ICE session corresponds to a single media stream (unlike the ICE
+ * session described in the ICE standard where an ICE session covers the
+ * whole media and may consist of multiple media streams). The decision
+ * to support only a single media session was chosen for simplicity,
+ * while still allowing application to utilize multiple media streams by
+ * creating multiple ICE sessions, one for each media stream.
+ */
+struct pj_ice_sess
+{
+    char		obj_name[PJ_MAX_OBJ_NAME];  /**< Object name.	    */
+
+    pj_pool_t		*pool;			    /**< Pool instance.	    */
+    void		*user_data;		    /**< App. data.	    */
+    pj_mutex_t		*mutex;			    /**< Mutex.		    */
+    pj_ice_sess_role	 role;			    /**< ICE role.	    */
+    pj_timestamp	 tie_breaker;		    /**< Tie breaker value  */
+    pj_uint8_t		*prefs;			    /**< Type preference.   */
+    pj_bool_t		 is_complete;		    /**< Complete?	    */
+    pj_status_t		 ice_status;		    /**< Error status.	    */
+    pj_ice_sess_cb	 cb;			    /**< Callback.	    */
+
+    pj_stun_config	 stun_cfg;		    /**< STUN settings.	    */
+
+    /* STUN credentials */
+    pj_str_t		 tx_ufrag;		    /**< Remote ufrag.	    */
+    pj_str_t		 tx_uname;		    /**< Uname for TX.	    */
+    pj_str_t		 tx_pass;		    /**< Remote password.   */
+    pj_str_t		 rx_ufrag;		    /**< Local ufrag.	    */
+    pj_str_t		 rx_uname;		    /**< Uname for RX	    */
+    pj_str_t		 rx_pass;		    /**< Local password.    */
+
+    /* Components */
+    unsigned		 comp_cnt;		    /**< # of components.   */
+    pj_ice_sess_comp	 comp[PJ_ICE_MAX_COMP];	    /**< Component array    */
+
+    /* Local candidates */
+    unsigned		 lcand_cnt;		    /**< # of local cand.   */
+    pj_ice_sess_cand	 lcand[PJ_ICE_MAX_CAND];    /**< Array of cand.	    */
+
+    /* Remote candidates */
+    unsigned		 rcand_cnt;		    /**< # of remote cand.  */
+    pj_ice_sess_cand	 rcand[PJ_ICE_MAX_CAND];    /**< Array of cand.	    */
+
+    /* List of eearly checks */
+    pj_ice_rx_check	 early_check;		    /**< Early checks.	    */
+
+    /* Checklist */
+    pj_ice_sess_checklist clist;		    /**< Active checklist   */
+    
+    /* Valid list */
+    pj_ice_sess_checklist valid_list;		    /**< Valid list.	    */
+};
+
+
+/**
+ * This is a utility function to retrieve the string name for the
+ * particular candidate type.
+ *
+ * @param type		Candidate type.
+ *
+ * @return		The string representation of the candidate type.
+ */
+PJ_DECL(const char*) pj_ice_get_cand_type_name(pj_ice_cand_type type);
+
+
+/**
+ * This is a utility function to calculate the foundation identification
+ * for a candidate.
+ *
+ * @param pool		Pool to allocate the foundation string.
+ * @param foundation	Pointer to receive the foundation string.
+ * @param type		Candidate type.
+ * @param base_addr	Base address of the candidate.
+ */
+PJ_DECL(void) pj_ice_calc_foundation(pj_pool_t *pool,
+				     pj_str_t *foundation,
+				     pj_ice_cand_type type,
+				     const pj_sockaddr *base_addr);
+
+
+/**
+ * Create ICE session with the specified role and number of components.
+ * Application would typically need to create an ICE session before
+ * sending an offer or upon receiving one. After the session is created,
+ * application can register candidates to the ICE session by calling
+ * #pj_ice_sess_add_cand() function.
+ *
+ * @param stun_cfg	The STUN configuration settings, containing among
+ *			other things the timer heap instance to be used
+ *			by the ICE session.
+ * @param name		Optional name to identify this ICE instance in
+ *			the log file.
+ * @param role		ICE role.
+ * @param comp_cnt	Number of components.
+ * @param cb		ICE callback.
+ * @param local_ufrag	Optional string to be used as local username to
+ *			authenticate incoming STUN binding request. If
+ *			the value is NULL, a random string will be 
+ *			generated.
+ * @param local_passwd	Optional string to be used as local password.
+ * @param p_ice		Pointer to receive the ICE session instance.
+ *
+ * @return		PJ_SUCCESS if ICE session is created successfully.
+ */
+PJ_DECL(pj_status_t) pj_ice_sess_create(pj_stun_config *stun_cfg,
+				        const char *name,
+				        pj_ice_sess_role role,
+				        unsigned comp_cnt,
+				        const pj_ice_sess_cb *cb,
+				        const pj_str_t *local_ufrag,
+				        const pj_str_t *local_passwd,
+				        pj_ice_sess **p_ice);
+
+/**
+ * Destroy ICE session. This will cancel any connectivity checks currently
+ * running, if any, and any other events scheduled by this session, as well
+ * as all memory resources.
+ *
+ * @param ice		ICE session instance.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pj_ice_sess_destroy(pj_ice_sess *ice);
+
+
+/**
+ * Change session role. This happens for example when ICE session was
+ * created with controlled role when receiving an offer, but it turns out
+ * that the offer contains "a=ice-lite" attribute when the SDP gets
+ * inspected.
+ *
+ * @param ice		The ICE session.
+ * @param new_role	The new role to be set.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error.
+ */
+PJ_DECL(pj_status_t) pj_ice_sess_change_role(pj_ice_sess *ice,
+					     pj_ice_sess_role new_role);
+
+
+/**
+ * Assign a custom preference values for ICE candidate types. By assigning
+ * custom preference value, application can control the order of candidates
+ * to be checked first. The default preference settings is to use 126 for 
+ * host candidates, 100 for server reflexive candidates, 110 for peer 
+ * reflexive candidates, an 0 for relayed candidates.
+ *
+ * Note that this function must be called before any candidates are added
+ * to the ICE session.
+ *
+ * @param ice		The ICE session.
+ * @param prefs		Array of candidate preference value. The values are
+ *			put in the array indexed by the candidate type as
+ *			specified in pj_ice_cand_type.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_ice_sess_set_prefs(pj_ice_sess *ice,
+					   const pj_uint8_t prefs[4]);
+
+
+
+/**
+ * Add a candidate to this ICE session. Application must add candidates for
+ * each components ID before it can start pairing the candidates and 
+ * performing connectivity checks.
+ *
+ * @param ice		ICE session instance.
+ * @param comp_id	Component ID of this candidate.
+ * @param type		Candidate type.
+ * @param local_pref	Local preference for this candidate, which
+ *			normally should be set to 65535.
+ * @param foundation	Foundation identification.
+ * @param addr		The candidate address.
+ * @param base_addr	The candidate's base address.
+ * @param rel_addr	Optional related address.
+ * @param addr_len	Length of addresses.
+ * @param p_cand_id	Optional pointer to receive the candidate ID.
+ *
+ * @return		PJ_SUCCESS if candidate is successfully added.
+ */
+PJ_DECL(pj_status_t) pj_ice_sess_add_cand(pj_ice_sess *ice,
+					  unsigned comp_id,
+					  pj_ice_cand_type type,
+					  pj_uint16_t local_pref,
+					  const pj_str_t *foundation,
+					  const pj_sockaddr_t *addr,
+					  const pj_sockaddr_t *base_addr,
+					  const pj_sockaddr_t *rel_addr,
+					  int addr_len,
+					  unsigned *p_cand_id);
+
+/**
+ * Find default candidate for the specified component ID, using this
+ * rule:
+ *  - if the component has a successful candidate pair, then the
+ *    local candidate of this pair will be returned.
+ *  - otherwise a relay, reflexive, or host candidate will be selected 
+ *    on that specified order.
+ *
+ * @param ice		The ICE session instance.
+ * @param comp_id	The component ID.
+ * @param p_cand_id	Pointer to receive the candidate ID.
+ *
+ * @return		PJ_SUCCESS if a candidate has been selected.
+ */
+PJ_DECL(pj_status_t) pj_ice_sess_find_default_cand(pj_ice_sess *ice,
+						   unsigned comp_id,
+						   int *p_cand_id);
+
+/**
+ * Pair the local and remote candidates to create check list. Application
+ * typically would call this function after receiving SDP containing ICE
+ * candidates from the remote host (either upon receiving the initial
+ * offer, for UAS, or upon receiving the answer, for UAC).
+ *
+ * Note that ICE connectivity check will not start until application calls
+ * #pj_ice_sess_start_check().
+ *
+ * @param ice		ICE session instance.
+ * @param rem_ufrag	Remote ufrag, as seen in the SDP received from 
+ *			the remote agent.
+ * @param rem_passwd	Remote password, as seen in the SDP received from
+ *			the remote agent.
+ * @param rem_cand_cnt	Number of remote candidates.
+ * @param rem_cand	Remote candidate array. Remote candidates are
+ *			gathered from the SDP received from the remote 
+ *			agent.
+ *
+ * @return		PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) 
+pj_ice_sess_create_check_list(pj_ice_sess *ice,
+			      const pj_str_t *rem_ufrag,
+			      const pj_str_t *rem_passwd,
+			      unsigned rem_cand_cnt,
+			      const pj_ice_sess_cand rem_cand[]);
+
+/**
+ * Start ICE periodic check. This function will return immediately, and
+ * application will be notified about the connectivity check status in
+ * #pj_ice_sess_cb callback.
+ *
+ * @param ice		The ICE session instance.
+ *
+ * @return		PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_ice_sess_start_check(pj_ice_sess *ice);
+
+
+/**
+ * Send data using this ICE session. If ICE checks have not produced a
+ * valid check for the specified component ID, this function will return
+ * with failure. Otherwise ICE session will send the packet to remote
+ * destination using the nominated local candidate for the specified
+ * component.
+ *
+ * This function will in turn call \a on_tx_pkt function in
+ * #pj_ice_sess_cb callback to actually send the packet to the wire.
+ *
+ * @param ice		The ICE session.
+ * @param comp_id	Component ID.
+ * @param data		The data or packet to be sent.
+ * @param data_len	Size of data or packet, in bytes.
+ *
+ * @return		PJ_SUCCESS if data is sent successfully.
+ */
+PJ_DECL(pj_status_t) pj_ice_sess_send_data(pj_ice_sess *ice,
+					   unsigned comp_id,
+					   const void *data,
+					   pj_size_t data_len);
+
+/**
+ * Report the arrival of packet to the ICE session. Since ICE session
+ * itself doesn't have any transports, it relies on application or
+ * higher layer component to give incoming packets to the ICE session.
+ * If the packet is not a STUN packet, this packet will be given back
+ * to application via \a on_rx_data() callback in #pj_ice_sess_cb.
+ *
+ * @param ice		The ICE session.
+ * @param comp_id	Component ID.
+ * @param pkt		Incoming packet.
+ * @param pkt_size	Size of incoming packet.
+ * @param src_addr	Source address of the packet.
+ * @param src_addr_len	Length of the address.
+ *
+ * @return		PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_ice_sess_on_rx_pkt(pj_ice_sess *ice,
+					   unsigned comp_id,
+					   void *pkt,
+					   pj_size_t pkt_size,
+					   const pj_sockaddr_t *src_addr,
+					   int src_addr_len);
+
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJNATH_ICE_SOCK_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjnath/include/pjnath/ice_strans.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/include/pjnath/ice_strans.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/include/pjnath/ice_strans.h	(revision 1163)
@@ -0,0 +1,591 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJNATH_ICE_STREAM_TRANSPORT_H__
+#define __PJNATH_ICE_STREAM_TRANSPORT_H__
+
+
+/**
+ * @file ice_strans.h
+ * @brief ICE Stream Transport
+ */
+#include <pjnath/ice_session.h>
+#include <pjlib-util/resolver.h>
+#include <pj/ioqueue.h>
+#include <pj/timer.h>
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJNATH_ICE_STREAM_TRANSPORT ICE Stream Transport
+ * @brief Transport for media stream using ICE
+ * @ingroup PJNATH_ICE
+ * @{
+ *
+ * This module describes ICE stream transport, as represented by #pj_ice_strans
+ * structure, and is part of PJNATH - the Open Source NAT traversal helper
+ * library.
+ *
+ * ICE stream transport, as represented by #pj_ice_strans structure, is an ICE
+ * capable component for transporting media within a media stream. 
+ * It consists of one or more transport sockets (typically two for RTP
+ * based communication - one for RTP and one for RTCP), and an 
+ * \ref PJNATH_ICE_SESSION for performing connectivity checks among the.
+ * various candidates of the transport addresses.
+ *
+ * \section PJNATH_ICE_STREAM_TRANSPORT_USING Using the ICE Stream Transport
+ *
+ * Application may use the ICE stream transport in two ways:
+ *  - it can create the ICE stream transports once during application 
+ *    initialization and keep them alive throughout application lifetime, or
+ *  - it can create and destroy the ICE stream transport as needed everytime 
+ *     a call is made and destroyed. 
+ *
+ * Keeping the ICE stream transport alive throughout
+ * application's lifetime is normally preferable, as initializing the
+ * ICE stream transport may incur delay because the ICE stream transport
+ * would need to communicate with the STUN/TURN server to get the
+ * server reflexive and relayed candidates for the transports.
+ *
+ * Regardless of which usage scenario is being used, the ICE stream
+ * transport is capable for restarting the ICE session being used and to
+ * send STUN keep-alives for its STUN server reflexive and relayed
+ * candidates.
+ *
+ * \subsection PJNATH_ICE_ST_TRA_INIT Stream Transport Initialization
+ *
+ * Application creates the ICE stream transport by calling 
+ * #pj_ice_strans_create() function.
+ *
+ * After the ICE stream transport is created, application may set up the
+ * STUN servers to be used to obtain STUN server reflexive and relayed
+ * candidate, by calling #pj_ice_strans_set_stun_domain() or 
+ * #pj_ice_strans_set_stun_srv(). Then it has to create each component by
+ * calling #pj_ice_strans_create_comp(); this would create an actual socket
+ * which listens to the specified local address, and it would also
+ * perform lookup to find various transport address candidates for this
+ * socket.
+ * 
+ * \subsection PJNATH_ICE_ST_TRA_INIT_ICE ICE Session Initialization
+ *
+ * When application is about to send an offer containing ICE capability,
+ * or when it receives an offer containing ICE capability, it would
+ * create the ICE session by calling #pj_ice_strans_init_ice(). This would
+ * register all transport address aliases for each component to the ICE
+ * session as candidates. After this application can enumerate all local
+ * candidates by calling #pj_ice_strans_enum_cands(), and encode these
+ * candidates in the SDP to be sent to remote agent.
+ *
+ * \subsection PJNATH_ICE_ST_TRA_START Starting Connectivity Checks
+ *
+ * Once application receives the SDP from remote, it can start ICE
+ * connectivity checks by calling #pj_ice_strans_start_ice(), specifying
+ * the username, password, and candidates of the remote agent. The ICE
+ * session/transport will then notify the application via the callback
+ * when ICE connectivity checks completes, either successfully or with
+ * failure.
+ *
+ * \subsection PJNATH_ICE_ST_TRA_STOP Stopping ICE Session
+ *
+ * Once the call is terminated, application no longer needs to keep the
+ * ICE session, so it should call #pj_ice_strans_stop_ice() to destroy the
+ * ICE session within this ICE stream transport. Note that this WILL NOT
+ * destroy the sockets/transports, it only destroys the ICE session
+ * within this ICE stream transport.
+ *
+ * \subsection PJNATH_ICE_ST_TRA_RESTART Restarting ICE Session
+ *
+ * When a new call is made, application can repeat the above
+ * #pj_ice_strans_init_ice() to #pj_ice_strans_stop_ice() cycle for 
+ * the new call, using this same ICE stream transport.
+ *
+ * \subsection PJNATH_ICE_ST_TRA_DESTROY Destroying ICE Stream Transport
+ *
+ * Finally, when the ICE stream transport itself is no longer needed,
+ * for example when the application quits, application should call
+ * #pj_ice_strans_destroy() to release back all resources allocated by this
+ * ICE stream transport.
+ *
+ */
+
+/** Forward declaration for ICE stream transport. */
+typedef struct pj_ice_strans pj_ice_strans;
+
+/** 
+ * This structure contains callbacks that will be called by the 
+ * ICE stream transport.
+ */
+typedef struct pj_ice_strans_cb
+{
+    /**
+     * This callback will be called when the ICE transport receives
+     * incoming packet from the sockets which is not related to ICE
+     * (for example, normal RTP/RTCP packet destined for application).
+     *
+     * @param ice_st	    The ICE stream transport.
+     * @param comp_id	    The component ID.
+     * @param pkt	    The packet.
+     * @param size	    Size of the packet.
+     * @param src_addr	    Source address of the packet.
+     * @param src_addr_len  Length of the source address.
+     */
+    void    (*on_rx_data)(pj_ice_strans *ice_st,
+			  unsigned comp_id, 
+			  void *pkt, pj_size_t size,
+			  const pj_sockaddr_t *src_addr,
+			  unsigned src_addr_len);
+
+    /**
+     * This callback will be called when ICE checks have completed.
+     * This callback is optional.
+     * 
+     * @param ice_st	    The ICE stream transport.
+     * @param status	    The ICE connectivity check status.
+     */
+    void    (*on_ice_complete)(pj_ice_strans *ice_st, 
+			       pj_status_t status);
+
+} pj_ice_strans_cb;
+
+
+/**
+ * Various flags that can be specified when creating a component with
+ * #pj_ice_strans_create_comp(). These options may be combined together
+ * with bitmask operation.
+ */
+enum pj_ice_strans_option
+{
+    /**
+     * If this option is specified, only a listening socket will be
+     * created for the component, and no candidate will be added to
+     * the component. Application must add the component manually
+     * by inspecting the socket and transport address of the component.
+     */
+    PJ_ICE_ST_OPT_DONT_ADD_CAND = 1,
+
+    /**
+     * If this option is specified, then no STUN reflexive candidate
+     * will be added to the component.
+     */
+    PJ_ICE_ST_OPT_DISABLE_STUN	= 2,
+
+    /**
+     * If this option is specified, then no STUN relay candidate
+     * will be added to the component.
+     */
+    PJ_ICE_ST_OPT_DISABLE_RELAY	= 4,
+
+    /**
+     * If this option is specified, then when the function fails to
+     * bind the socket to the specified port, it WILL NOT try to
+     * bind the socket to the next available port.
+     *
+     * If this option is NOT specified, then the function will try to
+     * bind the socket to next port+2, repetitively until the socket
+     * is bound successfully.
+     */
+    PJ_ICE_ST_OPT_NO_PORT_RETRY	= 8,
+};
+
+
+/**
+ * This structure describes ICE stream transport candidate. A "candidate"
+ * in ICE stream transport can be viewed as alias transport address
+ * for the socket.
+ */
+typedef struct pj_ice_strans_cand
+{
+    /**
+     * Candidate type.
+     */
+    pj_ice_cand_type	type;
+
+    /** 
+     * Status of this candidate. This status is useful for ICE reflexive
+     * and relay candidate, where the address needs to be resolved 
+     * asynchronously by sending STUN request to STUN server.
+     *
+     * The value will be PJ_SUCCESS if candidate address has been resolved
+     * successfully, PJ_EPENDING when the address resolution process is
+     * in progress, or other value when the address resolution has
+     * completed with failure.
+     */
+    pj_status_t		status;
+
+    /**
+     * The candidate transport address.
+     */
+    pj_sockaddr		addr;
+
+    /**
+     * The ICE session candidate ID after this candidate has been registered
+     * to an ICE session. Before ICE session is created, or after ICE
+     * session has been destroyed, the value will be -1.
+     */
+    int			ice_cand_id;
+
+    /**
+     * Local preference value, which typically is 65535.
+     */
+    pj_uint16_t		local_pref;
+
+    /**
+     * Foundation associated with this candidate, which value normally will be
+     * calculated by the function.
+     */
+    pj_str_t		foundation;
+
+} pj_ice_strans_cand;
+
+
+/**
+ * This structure describes an ICE stream transport component. A component
+ * in ICE stream transport typically corresponds to a single socket created
+ * for this component, and bound to a specific transport address. This
+ * component may have multiple alias addresses, for example one alias 
+ * address for each interfaces in multi-homed host, another for server
+ * reflexive alias, and another for relayed alias. For each transport
+ * address alias, an ICE stream transport candidate (#pj_ice_strans_cand) will
+ * be created, and these candidates will eventually registered to the ICE
+ * session.
+ */
+typedef struct pj_ice_strans_comp
+{
+    pj_ice_strans	*ice_st;	/**< ICE stream transport.	*/
+    unsigned		 comp_id;	/**< Component ID.		*/
+    pj_uint32_t		 options;	/**< Option flags.		*/
+    pj_sock_t		 sock;		/**< Socket descriptor.		*/
+
+    pj_stun_session	*stun_sess;	/**< STUN session.		*/
+    pj_uint8_t		 ka_tsx_id[12];	/**< ID for keep STUN alives	*/
+
+    pj_sockaddr		 local_addr;	/**< Local/base address.	*/
+
+    unsigned		 pending_cnt;	/**< Pending resolution cnt.	*/
+    pj_status_t		 last_status;	/**< Last status.		*/
+
+    unsigned		 cand_cnt;	/**< # of candidates/aliaes.	*/
+    pj_ice_strans_cand	 cand_list[PJ_ICE_ST_MAX_CAND];	/**< Cand array	*/
+    int			 default_cand;	/**< Default candidate selected	*/
+
+    pj_ioqueue_key_t	*key;		/**< ioqueue key.		*/
+    pj_uint8_t		 pkt[1500];	/**< Incoming packet buffer.	*/
+    pj_ioqueue_op_key_t	 read_op;	/**< ioqueue read operation key	*/
+    pj_ioqueue_op_key_t	 write_op;	/**< ioqueue write op. key	*/
+    pj_sockaddr		 src_addr;	/**< source packet address buf.	*/
+    int			 src_addr_len;	/**< length of src addr. buf.	*/
+
+} pj_ice_strans_comp;
+
+
+/**
+ * This structure represents the ICE stream transport.
+ */
+struct pj_ice_strans
+{
+    char		     obj_name[PJ_MAX_OBJ_NAME];	/**< Log ID.	*/
+
+    pj_pool_t		    *pool;	/**< Pool used by this object.	*/
+    void		    *user_data;	/**< Application data.		*/
+    pj_stun_config	     stun_cfg;	/**< STUN settings.		*/
+    pj_ice_strans_cb	     cb;	/**< Application callback.	*/
+
+    pj_ice_sess		    *ice;	/**< ICE session.		*/
+
+    unsigned		     comp_cnt;	/**< Number of components.	*/
+    pj_ice_strans_comp	   **comp;	/**< Components array.		*/
+
+    pj_dns_resolver	    *resolver;	/**< The resolver instance.	*/
+    pj_bool_t		     has_rjob;	/**< Has pending resolve?	*/
+    pj_sockaddr_in	     stun_srv;	/**< STUN server address.	*/
+    pj_sockaddr_in	     turn_srv;	/**< TURN server address.	*/
+
+    pj_timer_entry	     ka_timer;	/**< STUN keep-alive timer.	*/
+};
+
+
+/**
+ * Create the ICE stream transport containing the specified number of
+ * components. After the ICE stream transport is created, application
+ * may initialize the STUN server settings, and after that it has to 
+ * initialize each components by calling #pj_ice_strans_create_comp()
+ * function.
+ *
+ * @param stun_cfg	The STUN settings.
+ * @param name		Optional name for logging identification.
+ * @param comp_cnt	Number of components.
+ * @param user_data	Arbitrary user data to be associated with this
+ *			ICE stream transport.
+ * @param cb		Callback.
+ * @param p_ice_st	Pointer to receive the ICE stream transport
+ *			instance.
+ *
+ * @return		PJ_SUCCESS if ICE stream transport is created
+ *			successfully.
+ */
+PJ_DECL(pj_status_t) pj_ice_strans_create(pj_stun_config *stun_cfg,
+					  const char *name,
+					  unsigned comp_cnt,
+					  void *user_data,
+					  const pj_ice_strans_cb *cb,
+					  pj_ice_strans **p_ice_st);
+
+/**
+ * Destroy the ICE stream transport. This will destroy the ICE session
+ * inside the ICE stream transport, close all sockets and release all
+ * other resources.
+ *
+ * @param ice_st	The ICE stream transport.
+ *
+ * @return		PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_ice_strans_destroy(pj_ice_strans *ice_st);
+
+
+/**
+ * Set the domain to be used when resolving the STUN servers. If application
+ * wants to utillize STUN, then STUN server must be specified, either by
+ * calling this function or by calling #pj_ice_strans_set_stun_srv().
+ *
+ * If application calls this function, then the STUN/TURN servers will
+ * be resolved by querying DNS SRV records for the specified domain.
+ *
+ * @param ice_st	The ICE stream transport.
+ * @param resolver	The resolver instance that will be used to
+ *			resolve the STUN/TURN servers.
+ * @param domain	The target domain.
+ *
+ * @return		PJ_SUCCESS if DNS SRV resolution job can be
+ *			started. The resolution process itself will
+ *			complete asynchronously.
+ */
+PJ_DECL(pj_status_t) pj_ice_strans_set_stun_domain(pj_ice_strans *ice_st,
+						   pj_dns_resolver *resolver,
+						   const pj_str_t *domain);
+
+/**
+ * Set the STUN and TURN server addresses. If application
+ * wants to utillize STUN, then STUN server must be specified, either by
+ * calling this function or by calling #pj_ice_strans_set_stun_domain().
+ *
+ * With this function, the STUN and TURN server addresses will be 
+ * assigned immediately, that is no DNS resolution will need to be 
+ * performed.
+ *
+ * @param ice_st	The ICE stream transport.
+ * @param stun_srv	The STUN server address, or NULL if STUN
+ *			reflexive candidate is not to be used.
+ * @param turn_srv	The TURN server address, or NULL if STUN
+ *			relay candidate is not to be used.
+ *
+ * @return		PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) 
+pj_ice_strans_set_stun_srv( pj_ice_strans *ice_st,
+			    const pj_sockaddr_in *stun_srv,
+			    const pj_sockaddr_in *turn_srv);
+
+/**
+ * Create and initialize the specified component. This function will
+ * instantiate the socket descriptor for this component, optionally
+ * bind the socket to the specified address (or bind to any address/port
+ * if the \a addr parameter is NULL), and start finding all alias
+ * addresses for this socket. For each alias addresses that if finds,
+ * it will add an ICE stream transport candidate for this component.
+ *
+ * After all components have been initialized, application should poll
+ * the #pj_ice_strans_get_comps_status() peridically to check if STUN
+ * server reflexive and relayed candidates have been obtained
+ * successfully.
+ *
+ * @param ice_st	The ICE stream transport.
+ * @param comp_id	The component ID, which value must be greater than
+ *			zero and less than or equal to the number of 
+ *			components in this ICE stream transport.
+ * @param options	Options, see #pj_ice_strans_option.
+ * @param addr		Local address where socket will be bound to. This
+ *			address will be used as follows:
+ *			- if the value is NULL, then socket will be bound
+ *			  to any available port.
+ *			- if the value is not NULL, then if the port number
+ *			  is not zero, it will used as the starting port 
+ *			  where the socket will be bound to. If bind() to
+ *			  this port fails, this function will try to bind
+ *			  to port+2, repeatedly until it succeeded.
+ *			  If application doesn't want this function to 
+ *			  retry binding the socket to other port, it can
+ *			  specify PJ_ICE_ST_OPT_NO_PORT_RETRY option.
+ *			- if the value is not NULL, then if the address
+ *			  is not INADDR_ANY, this function will bind the
+ *			  socket to this particular interface only, and
+ *			  no other host candidates will be added for this
+ *			  socket.
+ *			
+ *
+ * @return		PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_ice_strans_create_comp(pj_ice_strans *ice_st,
+					       unsigned comp_id,
+					       pj_uint32_t options,
+					       const pj_sockaddr_in *addr);
+
+/**
+ * Manually add a candidate (transport address alias) for the specified
+ * component. Normally application shouldn't need to use this function,
+ * as candidates will be added automatically when component is created
+ * with #pj_ice_strans_create_comp().
+ *
+ * @param ice_st	ICE stream transport.
+ * @param comp_id	The component ID.
+ * @param type		The candidate type.
+ * @param local_pref	The local preference for this candidate
+ *			(typically the value is 65535).
+ * @param addr		The candidate address.
+ * @param set_default	Set to non-zero to make this candidate the 
+ *			default candidate for this component.
+ *
+ * @return		PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_ice_strans_add_cand(pj_ice_strans *ice_st,
+					    unsigned comp_id,
+					    pj_ice_cand_type type,
+					    pj_uint16_t local_pref,
+					    const pj_sockaddr_in *addr,
+					    pj_bool_t set_default);
+
+/**
+ * Get the status of components in the ICE stream transports. Since
+ * some IP address candidates have to be obtained asynchronously (for
+ * example, the STUN reflexive or relay candidate), application can
+ * use this function to know whether the address resolution has 
+ * completed.
+ *
+ * @param ice_st	The ICE stream transport.
+ *
+ * @return		PJ_SUCCESS if all candidates have been resolved
+ *			successfully, PJ_EPENDING if transport resolution
+ *			is still in progress, or other status on failure.
+ */
+PJ_DECL(pj_status_t) pj_ice_strans_get_comps_status(pj_ice_strans *ice_st);
+
+/**
+ * Initialize the ICE session in the ICE stream transport.
+ *
+ * @param ice_st	The ICE stream transport.
+ * @param role		ICE role.
+ * @param local_ufrag	Optional local username fragment.
+ * @param local_passwd	Optional local password.
+ *
+ * @return		PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_ice_strans_init_ice(pj_ice_strans *ice_st,
+					    pj_ice_sess_role role,
+					    const pj_str_t *local_ufrag,
+					    const pj_str_t *local_passwd);
+
+/**
+ * Enumerate the local candidates. This function can only be called
+ * after the ICE session has been created in the ICE stream transport.
+ *
+ * @param ice_st	The ICE stream transport.
+ * @param count		On input, it specifies the maximum number of
+ *			elements. On output, it will be filled with
+ *			the number of candidates copied to the
+ *			array.
+ * @param cand		Array of candidates.
+ *
+ * @return		PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_ice_strans_enum_cands(pj_ice_strans *ice_st,
+					      unsigned *count,
+					      pj_ice_sess_cand cand[]);
+
+/**
+ * Start ICE connectivity checks. This function can only be called
+ * after the ICE session has been created in the ICE stream transport.
+ *
+ * This function will pair the local and remote candidates to create 
+ * check list. Once the check list is created and sorted based on the
+ * priority, ICE periodic checks will be started. This function will 
+ * return immediately, and application will be notified about the 
+ * connectivity check status in the callback.
+ *
+ * @param ice_st	The ICE stream transport.
+ * @param rem_ufrag	Remote ufrag, as seen in the SDP received from 
+ *			the remote agent.
+ * @param rem_passwd	Remote password, as seen in the SDP received from
+ *			the remote agent.
+ * @param rem_cand_cnt	Number of remote candidates.
+ * @param rem_cand	Remote candidate array.
+ *
+ * @return		PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) 
+pj_ice_strans_start_ice( pj_ice_strans *ice_st,
+			 const pj_str_t *rem_ufrag,
+			 const pj_str_t *rem_passwd,
+			 unsigned rem_cand_cnt,
+			 const pj_ice_sess_cand rem_cand[]);
+
+/**
+ * Stop and destroy the ICE session inside this media transport.
+ *
+ * @param ice_st	The ICE stream transport.
+ *
+ * @return		PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_ice_strans_stop_ice(pj_ice_strans *ice_st);
+
+
+/**
+ * Send outgoing packet using this transport. If ICE checks have not 
+ * produced a valid check for the specified component ID, this function 
+ * will return with failure. Otherwise it will send the packet to remote
+ * destination using the nominated local candidate as have been checked
+ * previously.
+ *
+ * @param ice_st	The ICE stream transport.
+ * @param comp_id	Component ID.
+ * @param data		The data or packet to be sent.
+ * @param data_len	Size of data or packet, in bytes.
+ * @param dst_addr	The destination address.
+ * @param dst_addr_len	Length of destination address.
+ *
+ * @return		PJ_SUCCESS if data is sent successfully.
+ */
+PJ_DECL(pj_status_t) pj_ice_strans_sendto(pj_ice_strans *ice_st,
+					  unsigned comp_id,
+					  const void *data,
+					  pj_size_t data_len,
+					  const pj_sockaddr_t *dst_addr,
+					  int dst_addr_len);
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+
+
+#endif	/* __PJNATH_ICE_STREAM_TRANSPORT_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_auth.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_auth.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_auth.h	(revision 1163)
@@ -0,0 +1,324 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __PJNATH_STUN_AUTH_H__
+#define __PJNATH_STUN_AUTH_H__
+
+/**
+ * @file stun_auth.h
+ * @brief STUN authentication.
+ */
+
+#include <pjnath/stun_msg.h>
+
+
+PJ_BEGIN_DECL
+
+
+/* **************************************************************************/
+/**
+ * @defgroup PJNATH_STUN_AUTH STUN Authentication
+ * @brief STUN authentication helper
+ * @ingroup PJNATH_STUN
+ * @{
+ */
+
+/**
+ * Type of authentication data in the credential.
+ */
+typedef enum pj_stun_auth_cred_type
+{
+    /**
+     * The credential data contains a static credential to be matched 
+     * against the credential in the message. A static credential can be 
+     * used as both client side or server side authentication.
+     */
+    PJ_STUN_AUTH_CRED_STATIC,
+
+    /**
+     * The credential data contains callbacks to be called to verify the 
+     * credential in the message. A dynamic credential is suitable when 
+     * performing server side authentication where server does not know
+     * in advance the identity of the user requesting authentication.
+     */
+    PJ_STUN_AUTH_CRED_DYNAMIC
+
+} pj_stun_auth_cred_type;
+
+
+/**
+ * This structure contains the descriptions needed to perform server side
+ * authentication. Depending on the \a type set in the structure, application
+ * may specify a static username/password combination, or to have callbacks
+ * called by the function to authenticate the credential dynamically.
+ */
+typedef struct pj_stun_auth_cred
+{
+    /**
+     * The type of authentication information in this structure.
+     */
+    pj_stun_auth_cred_type	type;
+
+    /**
+     * This union contains the authentication data.
+     */
+    union 
+    {
+	/**
+	 * This structure contains static data for performing authentication.
+	 * A non-empty realm indicates whether short term or long term
+	 * credential is used.
+	 */
+	struct
+	{
+	    /** 
+	     * If not-empty, it indicates that this is a long term credential.
+	     */
+	    pj_str_t	  realm;
+
+	    /** 
+	     * The username of the credential.
+	     */
+	    pj_str_t	  username;
+
+	    /**
+	     * Data type to indicate the type of password in the \a data field.
+	     * Value zero indicates that the data contains a plaintext
+	     * password.
+	     */
+	    int		  data_type;
+
+	    /** 
+	     * The data, which depends depends on the value of \a data_type
+	     * field. When \a data_type is zero, this field will contain the
+	     * plaintext password.
+	     */
+	    pj_str_t	  data;
+
+	    /** 
+	     * Optional NONCE.
+	     */
+	    pj_str_t	  nonce;
+
+	} static_cred;
+
+	/**
+	 * This structure contains callback to be called by the framework
+	 * to authenticate the incoming message.
+	 */
+	struct
+	{
+	    /**
+	     * User data which will be passed back to callback functions.
+	     */
+	    void *user_data;
+
+	    /**
+	     * This callback is called by pj_stun_verify_credential() when
+	     * server needs to challenge the request with 401 response.
+	     *
+	     * @param user_data	The user data as specified in the credential.
+	     * @param pool	Pool to allocate memory.
+	     * @param realm	On return, the function should fill in with
+	     *			realm if application wants to use long term
+	     *			credential. Otherwise application should set
+	     *			empty string for the realm.
+	     * @param nonce	On return, if application wants to use long
+	     *			term credential, it MUST fill in the nonce
+	     *			with some value. Otherwise  if short term 
+	     *			credential is wanted, it MAY set this value.
+	     *			If short term credential is wanted and the
+	     *			application doesn't want to include NONCE,
+	     *			then it must set this to empty string.
+	     *
+	     * @return		The callback should return PJ_SUCCESS, or
+	     *			otherwise response message will not be 
+	     *			created.
+	     */
+	    pj_status_t (*get_auth)(void *user_data,
+				    pj_pool_t *pool,
+				    pj_str_t *realm,
+				    pj_str_t *nonce);
+
+	    /**
+	     * Get the credential to be put in outgoing message.
+	     *
+	     * @param msg	The outgoing message where the credential is
+	     *			to be applied.
+	     * @param user_data	The user data as specified in the credential.
+	     * @param pool	Pool where the callback can allocate memory
+	     *			to fill in the credential.
+	     * @param realm	On return, the callback may specify the realm
+	     *			if long term credential is desired, otherwise
+	     *			this string must be set to empty.
+	     * @param username	On return, the callback must fill in with the
+	     *			username.
+	     * @param nonce	On return, the callback may optionally fill in
+	     *			this argument with NONCE value if desired,
+	     *			otherwise this argument must be set to empty.
+	     * @param data_type	On return, the callback must set this argument
+	     *			with the type of password in the data argument.
+	     * @param data	On return, the callback must set this with
+	     *			the password, encoded according to data_type
+	     *			argument.
+	     *
+	     * @return		The callback must return PJ_SUCCESS, otherwise
+	     *			the message transmission will be cancelled.
+	     */
+	    pj_status_t (*get_cred)(const pj_stun_msg *msg,
+				    void *user_data,
+				    pj_pool_t *pool,
+				    pj_str_t *realm,
+				    pj_str_t *username,
+				    pj_str_t *nonce,
+				    int *data_type,
+				    pj_str_t *data);
+
+	    /**
+	     * Get the password for the specified username. This function 
+	     * is also used to check whether the username is valid.
+	     *
+	     * @param msg	The STUN message where the password will be
+	     *			applied to.
+	     * @param user_data	The user data as specified in the credential.
+	     * @param realm	The realm as specified in the message.
+	     * @param username	The username as specified in the message.
+	     * @param pool	Pool to allocate memory when necessary.
+	     * @param data_type On return, application should fill up this
+	     *			argument with the type of data (which should
+	     *			be zero if data is a plaintext password).
+	     * @param data	On return, application should fill up this
+	     *			argument with the password according to
+	     *			data_type.
+	     *
+	     * @return		The callback should return PJ_SUCCESS if
+	     *			username has been successfully verified
+	     *			and password was obtained. If non-PJ_SUCCESS
+	     *			is returned, it is assumed that the
+	     *			username is not valid.
+	     */
+	    pj_status_t	(*get_password)(const pj_stun_msg *msg,
+					void *user_data, 
+				        const pj_str_t *realm,
+				        const pj_str_t *username,
+					pj_pool_t *pool,
+					int *data_type,
+					pj_str_t *data);
+
+	    /**
+	     * This callback will be called to verify that the NONCE given
+	     * in the message can be accepted. If this callback returns
+	     * PJ_FALSE, 438 (Stale Nonce) response will be created.
+	     *
+	     * This callback is optional.
+	     *
+	     * @param msg	The STUN message where the nonce was received.
+	     * @param user_data	The user data as specified in the credential.
+	     * @param realm	The realm as specified in the message.
+	     * @param username	The username as specified in the message.
+	     * @param nonce	The nonce to be verified.
+	     *
+	     * @return		The callback MUST return non-zero if the 
+	     *			NONCE can be accepted.
+	     */
+	    pj_bool_t	(*verify_nonce)(const pj_stun_msg *msg,
+					void *user_data,
+					const pj_str_t *realm,
+					const pj_str_t *username,
+					const pj_str_t *nonce);
+
+	} dyn_cred;
+
+    } data;
+
+} pj_stun_auth_cred;
+
+
+/**
+ * Duplicate authentication credential.
+ *
+ * @param pool		Pool to be used to allocate memory.
+ * @param dst		Destination credential.
+ * @param src		Source credential.
+ */
+PJ_DECL(void) pj_stun_auth_cred_dup(pj_pool_t *pool,
+				      pj_stun_auth_cred *dst,
+				      const pj_stun_auth_cred *src);
+
+
+/**
+ * Verify credential in the STUN message. Note that before calling this
+ * function, application must have checked that the message contains
+ * PJ_STUN_ATTR_MESSAGE_INTEGRITY attribute by calling pj_stun_msg_find_attr()
+ * function, because this function will reject the message with 401 error
+ * if it doesn't contain PJ_STUN_ATTR_MESSAGE_INTEGRITY attribute.
+ *
+ * @param pkt		The original packet which has been parsed into
+ *			the message. This packet MUST NOT have been modified
+ *			after the parsing.
+ * @param pkt_len	The length of the packet.
+ * @param msg		The parsed message to be verified.
+ * @param cred		Pointer to credential to be used to authenticate
+ *			the message.
+ * @param pool		If response is to be created, then memory will
+ *			be allocated from this pool.
+ * @param p_response	Optional pointer to receive the response message
+ *			then the credential in the request fails to
+ *			authenticate.
+ *
+ * @return		PJ_SUCCESS if credential is verified successfully.
+ *			If the verification fails and \a p_response is not
+ *			NULL, an appropriate response will be returned in
+ *			\a p_response.
+ */
+PJ_DECL(pj_status_t) pj_stun_verify_credential(const pj_uint8_t *pkt,
+					       unsigned pkt_len,
+					       const pj_stun_msg *msg,
+					       pj_stun_auth_cred *cred,
+					       pj_pool_t *pool,
+					       pj_stun_msg **p_response);
+
+
+
+
+/**
+ * @}
+ */
+
+
+/**
+ * Calculate HMAC-SHA1 key for long term credential, by getting
+ * MD5 digest of username, realm, and password. 
+ *
+ * @param digest    The buffer for the digest.
+ * @param realm	    The realm of the credential, if long term credential
+ *		    is to be used.
+ * @param username  The username.
+ * @param passwd    The clear text password.
+ */
+void pj_stun_calc_md5_key(pj_uint8_t digest[16],
+			  const pj_str_t *realm,
+			  const pj_str_t *username,
+			  const pj_str_t *passwd);
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJNATH_STUN_AUTH_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_config.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_config.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_config.h	(revision 1163)
@@ -0,0 +1,114 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __PJNATH_STUN_CONFIG_H__
+#define __PJNATH_STUN_CONFIG_H__
+
+/**
+ * @file stun_config.h
+ * @brief STUN endpoint.
+ */
+
+#include <pjnath/stun_msg.h>
+#include <pj/string.h>
+
+
+PJ_BEGIN_DECL
+
+
+/* **************************************************************************/
+/**
+ * @defgroup PJNATH_STUN_CONFIG STUN Config
+ * @brief STUN config
+ * @ingroup PJNATH_STUN
+ * @{
+ */
+
+/**
+ * STUN configuration.
+ */
+typedef struct pj_stun_config
+{
+    /**
+     * Pool factory to be used.
+     */
+    pj_pool_factory	*pf;
+
+    /**
+     * Ioqueue.
+     */
+    pj_ioqueue_t	*ioqueue;
+
+    /**
+     * Timer heap instance.
+     */
+    pj_timer_heap_t	*timer_heap;
+
+    /**
+     * Options.
+     */
+    unsigned		 options;
+
+    /**
+     * The default initial STUN round-trip time estimation in msecs.
+     * The value normally is PJ_STUN_RTO_VALUE.
+     */
+    unsigned		 rto_msec;
+
+    /**
+     * The interval to cache outgoing  STUN response in the STUN session,
+     * in miliseconds. 
+     *
+     * Default 10000 (10 seconds).
+     */
+    unsigned		 res_cache_msec;
+
+} pj_stun_config;
+
+
+
+/**
+ * Initialize STUN config.
+ */
+PJ_INLINE(void) pj_stun_config_init(pj_stun_config *cfg,
+				    pj_pool_factory *factory,
+				    unsigned options,
+				    pj_ioqueue_t *ioqueue,
+				    pj_timer_heap_t *timer_heap)
+{
+    pj_bzero(cfg, sizeof(*cfg));
+
+    cfg->pf = factory;
+    cfg->options = options;
+    cfg->ioqueue = ioqueue;
+    cfg->timer_heap = timer_heap;
+    cfg->rto_msec = PJ_STUN_RTO_VALUE;
+    cfg->res_cache_msec = 10000;
+}
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJNATH_STUN_CONFIG_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_msg.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_msg.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_msg.h	(revision 1163)
@@ -0,0 +1,1572 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __PJNATH_STUN_MSG_H__
+#define __PJNATH_STUN_MSG_H__
+
+/**
+ * @file stun_msg.h
+ * @brief STUN message components.
+ */
+
+#include <pjnath/types.h>
+#include <pj/sock.h>
+
+
+PJ_BEGIN_DECL
+
+
+/* **************************************************************************/
+/**
+ * @defgroup PJNATH_STUN_MSG STUN Message Representation and Parsing
+ * @brief Low-level representation and parsing of STUN messages.
+ * @ingroup PJNATH_STUN
+ * @{
+ */
+
+
+/**
+ * STUN magic cookie.
+ */
+#define PJ_STUN_MAGIC			    0x2112A442
+
+
+/**
+ * STUN method constants.
+ */
+enum pj_stun_method_e
+{
+    /**
+     * STUN Binding method as defined by RFC 3489-bis.
+     */
+    PJ_STUN_BINDING_METHOD		    = 1,
+
+    /**
+     * STUN Shared Secret method as defined by RFC 3489-bis.
+     */
+    PJ_STUN_SHARED_SECRET_METHOD	    = 2,
+
+    /**
+     * STUN/TURN Allocate method as defined by draft-ietf-behave-turn
+     */
+    PJ_STUN_ALLOCATE_METHOD		    = 3,
+
+    /**
+     * STUN/TURN Send Indication as defined by draft-ietf-behave-turn
+     */
+    PJ_STUN_SEND_INDICATION_METHOD	    = 4,
+
+    /**
+     * STUN/TURN Data Indication as defined by draft-ietf-behave-turn
+     */
+    PJ_STUN_DATA_INDICATION_METHOD	    = 5,
+
+    /**
+     * STUN/TURN Set Active Destination as defined by draft-ietf-behave-turn
+     */
+    PJ_STUN_SET_ACTIVE_DESTINATION_METHOD   = 6,
+
+    /**
+     * STUN/TURN Connect method as defined by draft-ietf-behave-turn
+     */
+    PJ_STUN_CONNECT_METHOD		    = 7,
+
+    /**
+     * STUN/TURN Connect Status indication method.
+     */
+    PJ_STUN_CONNECT_STATUS_METHOD	    = 8
+};
+
+
+/**
+ * Retrieve the STUN method from the message-type field of the STUN
+ * message.
+ */
+#define PJ_STUN_GET_METHOD(msg_type)	((msg_type) & 0xFEEF)
+
+
+/**
+ * STUN message classes constants.
+ */
+enum pj_stun_msg_class_e
+{
+    /**
+     * This specifies that the message type is a STUN request message.
+     */
+    PJ_STUN_REQUEST_CLASS	    = 0,
+
+    /**
+     * This specifies that the message type is a STUN indication message.
+     */
+    PJ_STUN_INDICATION_CLASS	    = 1,
+
+    /**
+     * This specifies that the message type is a STUN successful response.
+     */
+    PJ_STUN_SUCCESS_CLASS	    = 2,
+
+    /**
+     * This specifies that the message type is a STUN error response.
+     */
+    PJ_STUN_ERROR_CLASS		    = 3
+};
+
+
+/**
+ * Determine if the message type is a request.
+ */
+#define PJ_STUN_IS_REQUEST(msg_type)	(((msg_type) & 0x0110) == 0x0000)
+
+
+/**
+ * Determine if the message type is a response.
+ */
+#define PJ_STUN_IS_SUCCESS_RESPONSE(msg_type) (((msg_type) & 0x0110) == 0x0100)
+
+
+/**
+ * The response bit in the message type.
+ */
+#define PJ_STUN_RESPONSE_BIT		(0x0100)
+
+/**
+ * Determine if the message type is an error response.
+ */
+#define PJ_STUN_IS_ERROR_RESPONSE(msg_type) (((msg_type) & 0x0110) == 0x0110)
+
+
+/**
+ * The error response bit in the message type.
+ */
+#define PJ_STUN_ERROR_RESPONSE_BIT	(0x0110)
+
+
+/**
+ * Determine if the message type is an indication message.
+ */
+#define PJ_STUN_IS_INDICATION(msg_type)	(((msg_type) & 0x0110) == 0x0010)
+
+
+/**
+ * The error response bit in the message type.
+ */
+#define PJ_STUN_INDICATION_BIT		(0x0010)
+
+
+/**
+ * This enumeration describes STUN message types.
+ */
+typedef enum pj_stun_msg_type
+{
+    /**
+     * STUN BINDING request.
+     */
+    PJ_STUN_BINDING_REQUEST		    = 0x0001,
+
+    /**
+     * Successful response to STUN BINDING-REQUEST.
+     */
+    PJ_STUN_BINDING_RESPONSE		    = 0x0101,
+
+    /**
+     * Error response to STUN BINDING-REQUEST.
+     */
+    PJ_STUN_BINDING_ERROR_RESPONSE	    = 0x0111,
+
+    /**
+     * STUN SHARED-SECRET reqeust.
+     */
+    PJ_STUN_SHARED_SECRET_REQUEST	    = 0x0002,
+
+    /**
+     * Successful response to STUN SHARED-SECRET reqeust.
+     */
+    PJ_STUN_SHARED_SECRET_RESPONSE	    = 0x0102,
+
+    /**
+     * Error response to STUN SHARED-SECRET reqeust.
+     */
+    PJ_STUN_SHARED_SECRET_ERROR_RESPONSE    = 0x0112,
+
+    /**
+     * STUN/TURN Allocate Request
+     */
+    PJ_STUN_ALLOCATE_REQUEST		    = 0x0003,
+
+    /**
+     * Successful response to STUN/TURN Allocate Request
+     */
+    PJ_STUN_ALLOCATE_RESPONSE		    = 0x0103,
+
+    /**
+     * Failure response to STUN/TURN Allocate Request
+     */
+    PJ_STUN_ALLOCATE_ERROR_RESPONSE	    = 0x0113,
+
+    /**
+     * STUN/TURN Send Indication
+     */
+    PJ_STUN_SEND_INDICATION		    = 0x0014,
+
+    /**
+     * STUN/TURN Data Indication
+     */
+    PJ_STUN_DATA_INDICATION		    = 0x0015,
+
+    /**
+     * STUN/TURN Set Active Destination Request
+     */
+    PJ_STUN_SET_ACTIVE_DESTINATION_REQUEST  = 0x0006,
+
+    /** 
+     * STUN/TURN Set Active Destination Response
+     */
+    PJ_STUN_SET_ACTIVE_DESTINATION_RESPONSE = 0x0106,
+
+    /**
+     * STUN/TURN Set Active Destination Error Response
+     */
+    PJ_STUN_SET_ACTIVE_DESTINATION_ERROR_RESPONSE = 0x0116,
+
+    /**
+     * STUN/TURN Connect Request
+     */
+    PJ_STUN_CONNECT_REQUEST		    = 0x0007,
+
+    /**
+     * STUN/TURN Connect Response
+     */
+    PJ_STUN_CONNECT_RESPONSE		    = 0x0107,
+
+    /**
+     * STUN/TURN Connect Error Response
+     */
+    PJ_STUN_CONNECT_ERROR_RESPONSE	    = 0x0117,
+
+    /**
+     * STUN/TURN Connect Status Indication
+     */
+    PJ_STUN_CONNECT_STATUS_INDICATION	    = 0x0018
+
+
+} pj_stun_msg_type;
+
+
+
+/**
+ * This enumeration describes STUN attribute types.
+ */
+typedef enum pj_stun_attr_type
+{
+    PJ_STUN_ATTR_MAPPED_ADDR	    = 0x0001,/**< MAPPED-ADDRESS.	    */
+    PJ_STUN_ATTR_RESPONSE_ADDR	    = 0x0002,/**< RESPONSE-ADDRESS (deprcatd)*/
+    PJ_STUN_ATTR_CHANGE_REQUEST	    = 0x0003,/**< CHANGE-REQUEST (deprecated)*/
+    PJ_STUN_ATTR_SOURCE_ADDR	    = 0x0004,/**< SOURCE-ADDRESS (deprecated)*/
+    PJ_STUN_ATTR_CHANGED_ADDR	    = 0x0005,/**< CHANGED-ADDRESS (deprecatd)*/
+    PJ_STUN_ATTR_USERNAME	    = 0x0006,/**< USERNAME attribute.	    */
+    PJ_STUN_ATTR_PASSWORD	    = 0x0007,/**< PASSWORD attribute.	    */
+    PJ_STUN_ATTR_MESSAGE_INTEGRITY  = 0x0008,/**< MESSAGE-INTEGRITY.	    */
+    PJ_STUN_ATTR_ERROR_CODE	    = 0x0009,/**< ERROR-CODE.		    */
+    PJ_STUN_ATTR_UNKNOWN_ATTRIBUTES = 0x000A,/**< UNKNOWN-ATTRIBUTES.	    */
+    PJ_STUN_ATTR_REFLECTED_FROM	    = 0x000B,/**< REFLECTED-FROM (deprecatd)*/
+    PJ_STUN_ATTR_LIFETIME	    = 0x000D,/**< LIFETIME attribute.	    */
+    PJ_STUN_ATTR_MAGIC_COOKIE	    = 0x000F,/**< MAGIC-COOKIE attr (deprec)*/
+    PJ_STUN_ATTR_BANDWIDTH	    = 0x0010,/**< BANDWIDTH attribute	    */
+    PJ_STUN_ATTR_REMOTE_ADDR	    = 0x0012,/**< REMOTE-ADDRESS attribute  */
+    PJ_STUN_ATTR_DATA		    = 0x0013,/**< DATA attribute.	    */
+    PJ_STUN_ATTR_REALM		    = 0x0014,/**< REALM attribute.	    */
+    PJ_STUN_ATTR_NONCE		    = 0x0015,/**< NONCE attribute.	    */
+    PJ_STUN_ATTR_RELAY_ADDR	    = 0x0016,/**< RELAY-ADDRESS attribute.  */
+    PJ_STUN_ATTR_REQ_ADDR_TYPE	    = 0x0017,/**< REQUESTED-ADDRESS-TYPE    */
+    PJ_STUN_ATTR_REQ_PORT_PROPS	    = 0x0018,/**< REQUESTED-PORT-PROPS	    */
+    PJ_STUN_ATTR_REQ_TRANSPORT	    = 0x0019,/**< REQUESTED-TRANSPORT	    */
+    PJ_STUN_ATTR_XOR_MAPPED_ADDR    = 0x0020,/**< XOR-MAPPED-ADDRESS	    */
+    PJ_STUN_ATTR_TIMER_VAL	    = 0x0021,/**< TIMER-VAL attribute.	    */
+    PJ_STUN_ATTR_REQ_IP		    = 0x0022,/**< REQUESTED-IP attribute    */
+    PJ_STUN_ATTR_XOR_REFLECTED_FROM = 0x0023,/**< XOR-REFLECTED-FROM	    */
+    PJ_STUN_ATTR_PRIORITY	    = 0x0024,/**< PRIORITY		    */
+    PJ_STUN_ATTR_USE_CANDIDATE	    = 0x0025,/**< USE-CANDIDATE		    */
+    PJ_STUN_ATTR_XOR_INTERNAL_ADDR  = 0x0026,/**< XOR-INTERNAL-ADDRESS	    */
+
+    PJ_STUN_ATTR_END_MANDATORY_ATTR,
+
+    PJ_STUN_ATTR_START_EXTENDED_ATTR= 0x8021,
+
+    PJ_STUN_ATTR_SERVER		    = 0x8022,/**< SERVER attribute.	    */
+    PJ_STUN_ATTR_ALTERNATE_SERVER   = 0x8023,/**< ALTERNATE-SERVER.	    */
+    PJ_STUN_ATTR_REFRESH_INTERVAL   = 0x8024,/**< REFRESH-INTERVAL.	    */
+    PJ_STUN_ATTR_FINGERPRINT	    = 0x8028,/**< FINGERPRINT attribute.    */
+    PJ_STUN_ATTR_ICE_CONTROLLED	    = 0x8029,/**< ICE-CCONTROLLED attribute.*/
+    PJ_STUN_ATTR_ICE_CONTROLLING    = 0x802a,/**< ICE-CCONTROLLING attribute*/
+
+    PJ_STUN_ATTR_END_EXTENDED_ATTR
+
+} pj_stun_attr_type;
+
+
+/**
+ * STUN error codes, which goes into STUN ERROR-CODE attribute.
+ */
+typedef enum pj_stun_status
+{
+    PJ_STUN_SC_TRY_ALTERNATE		= 300,  /**< Try Alternate	    */
+    PJ_STUN_SC_BAD_REQUEST		= 400,  /**< Bad Request	    */
+    PJ_STUN_SC_UNAUTHORIZED	        = 401,  /**< Unauthorized	    */
+    PJ_STUN_SC_UNKNOWN_ATTRIBUTE        = 420,  /**< Unknown Attribute	    */
+    PJ_STUN_SC_STALE_CREDENTIALS        = 430,  /**< Stale Credentials	    */
+    PJ_STUN_SC_INTEGRITY_CHECK_FAILURE  = 431,  /**< Integrity Chk Fail	    */
+    PJ_STUN_SC_MISSING_USERNAME		= 432,  /**< Missing Username	    */
+    PJ_STUN_SC_USE_TLS			= 433,  /**< Use TLS		    */
+    PJ_STUN_SC_MISSING_REALM		= 434,  /**< Missing Realm	    */
+    PJ_STUN_SC_MISSING_NONCE		= 435,  /**< Missing Nonce	    */
+    PJ_STUN_SC_UNKNOWN_USERNAME		= 436,  /**< Unknown Username	    */
+    PJ_STUN_SC_NO_BINDING	        = 437,  /**< No Binding.	    */
+    PJ_STUN_SC_STALE_NONCE	        = 438,  /**< Stale Nonce	    */
+    PJ_STUN_SC_TRANSITIONING		= 439,  /**< Transitioning.	    */
+    PJ_STUN_SC_UNSUPP_TRANSPORT_PROTO   = 442,  /**< Unsupported Transport or
+						     Protocol */
+    PJ_STUN_SC_INVALID_IP_ADDR		= 443,  /**< Invalid IP Address	    */
+    PJ_STUN_SC_INVALID_PORT	        = 444,  /**< Invalid Port	    */
+    PJ_STUN_SC_OPER_TCP_ONLY		= 445,  /**< Operation for TCP Only */
+    PJ_STUN_SC_CONNECTION_FAILURE       = 446,  /**< Connection Failure	    */
+    PJ_STUN_SC_CONNECTION_TIMEOUT       = 447,  /**< Connection Timeout	    */
+    PJ_STUN_SC_ALLOCATION_QUOTA_REACHED = 486,  /**< Allocation Quota Reached
+						     (TURN) */
+    PJ_STUN_SC_ROLE_CONFLICT		= 487,  /**< Role Conflict	    */
+    PJ_STUN_SC_SERVER_ERROR	        = 500,  /**< Server Error	    */
+    PJ_STUN_SC_INSUFFICIENT_CAPACITY    = 507,  /**< Insufficient Capacity 
+						     (TURN) */
+    PJ_STUN_SC_GLOBAL_FAILURE	        = 600   /**< Global Failure	    */
+} pj_stun_status;
+
+
+/**
+ * This structure describes STUN message header. A STUN message has the 
+ * following format:
+ *
+ * \verbatim
+
+        0                   1                   2                   3
+        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+       |0 0|     STUN Message Type     |         Message Length        |
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+       |                         Magic Cookie                          |
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+       |
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+                                Transaction ID
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+                                                                       |
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+   \endverbatim
+ */
+typedef struct pj_stun_msg_hdr
+{
+    /**
+     * STUN message type, which the first two bits must be zeroes.
+     */
+    pj_uint16_t		type;
+
+    /**
+     * The message length is the size, in bytes, of the message not
+     * including the 20 byte STUN header.
+     */
+    pj_uint16_t		length;
+
+    /**
+     * The magic cookie is a fixed value, 0x2112A442 (PJ_STUN_MAGIC constant).
+     * In the previous version of this specification [15] this field was part 
+     * of the transaction ID.
+     */
+    pj_uint32_t		magic;
+
+    /**
+     * The transaction ID is a 96 bit identifier.  STUN transactions are
+     * identified by their unique 96-bit transaction ID.  For request/
+     * response transactions, the transaction ID is chosen by the STUN
+     * client and MUST be unique for each new STUN transaction generated by
+     * that STUN client.  The transaction ID MUST be uniformly and randomly
+     * distributed between 0 and 2**96 - 1. 
+     */
+    pj_uint8_t		tsx_id[12];
+
+} pj_stun_msg_hdr;
+
+
+/**
+ * This structre describes STUN attribute header. Each attribute is
+ * TLV encoded, with a 16 bit type, 16 bit length, and variable value.
+ * Each STUN attribute ends on a 32 bit boundary:
+ *
+ * \verbatim
+
+        0                   1                   2                   3
+        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+       |         Type                  |            Length             |
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+   \endverbatim
+ */
+typedef struct pj_stun_attr_hdr
+{
+    /**
+     * STUN attribute type.
+     */
+    pj_uint16_t		type;
+
+    /**
+     * The Length refers to the length of the actual useful content of the
+     * Value portion of the attribute, measured in bytes. The value
+     * in the Length field refers to the length of the Value part of the
+     * attribute prior to padding - i.e., the useful content.
+     */
+    pj_uint16_t		length;
+
+} pj_stun_attr_hdr;
+
+
+/**
+ * This structure describes STUN generic IP address attribute, used for
+ * example to represent STUN MAPPED-ADDRESS attribute.
+ *
+ * The generic IP address attribute indicates the transport address.
+ * It consists of an eight bit address family, and a sixteen bit port,
+ * followed by a fixed length value representing the IP address.  If the
+ * address family is IPv4, the address is 32 bits, in network byte
+ * order.  If the address family is IPv6, the address is 128 bits in
+ * network byte order.
+ *
+ * The format of the generic IP address attribute is:
+ *
+ * \verbatim
+
+        0                   1                   2                   3
+        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+       |x x x x x x x x|    Family     |           Port                |
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+       |                   Address  (variable)
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+   \endverbatim
+ */
+typedef struct pj_stun_sockaddr_attr
+{
+    /**
+     * Standard STUN attribute header.
+     */
+    pj_stun_attr_hdr	hdr;
+
+    /**
+     * Flag to indicate whether this attribute should be sent in XOR-ed
+     * format, or has been received in XOR-ed format.
+     */
+    pj_bool_t		xor_ed;
+
+    /**
+     * The socket address
+     */
+    pj_sockaddr		sockaddr;
+
+} pj_stun_sockaddr_attr;
+
+
+/**
+ * This structure represents a generic STUN attributes with no payload,
+ * and it is used for example by ICE USE-CANDIDATE attribute.
+ */
+typedef struct pj_stun_empty_attr
+{
+    /**
+     * Standard STUN attribute header.
+     */
+    pj_stun_attr_hdr	hdr;
+
+} pj_stun_empty_attr;
+
+
+/**
+ * This structure represents generic STUN string attributes, such as STUN
+ * USERNAME, PASSWORD, SERVER, REALM, and NONCE attributes. Note that for REALM and
+ * NONCE attributes, the text MUST be quoted with.
+ */
+typedef struct pj_stun_string_attr
+{
+    /**
+     * Standard STUN attribute header.
+     */
+    pj_stun_attr_hdr	hdr;
+
+    /**
+     * The string value.
+     */
+    pj_str_t		value;
+
+} pj_stun_string_attr;
+
+
+/**
+ * This structure represents a generic STUN attributes with 32bit (unsigned)
+ * integer value, such as STUN FINGERPRINT and REFRESH-INTERVAL attributes.
+ */
+typedef struct pj_stun_uint_attr
+{
+    /**
+     * Standard STUN attribute header.
+     */
+    pj_stun_attr_hdr	hdr;
+    
+    /**
+     * The 32bit value, in host byte order.
+     */
+    pj_uint32_t		value;
+
+} pj_stun_uint_attr;
+
+
+/**
+ * This structure represents a generic STUN attributes with 64bit (unsigned)
+ * integer value, such as ICE-CONTROLLED and ICE-CONTROLLING attributes.
+ */
+typedef struct pj_stun_uint64_attr
+{
+    /**
+     * Standard STUN attribute header.
+     */
+    pj_stun_attr_hdr	hdr;
+    
+    /**
+     * The 64bit value, in host byte order, represented with pj_timestamp.
+     */
+    pj_timestamp	value;
+
+} pj_stun_uint64_attr;
+
+
+/**
+ * This structure represents generic STUN attributes to hold a raw binary
+ * data.
+ */
+typedef struct pj_stun_binary_attr
+{
+    /**
+     * Standard STUN attribute header.
+     */
+    pj_stun_attr_hdr	hdr;
+    
+    /**
+     * Length of the data.
+     */
+    unsigned		length;
+
+    /**
+     * The raw data.
+     */
+    pj_uint8_t	       *data;
+
+} pj_stun_binary_attr;
+
+
+/**
+ * This structure describes STUN MESSAGE-INTEGRITY attribute.
+ * The MESSAGE-INTEGRITY attribute contains an HMAC-SHA1 [10] of the
+ * STUN message.  The MESSAGE-INTEGRITY attribute can be present in any
+ * STUN message type.  Since it uses the SHA1 hash, the HMAC will be 20
+ * bytes.
+ */
+typedef struct pj_stun_msgint_attr
+{
+    /**
+     * Standard STUN attribute header.
+     */
+    pj_stun_attr_hdr	hdr;
+
+    /**
+     * The 20 bytes hmac value.
+     */
+    pj_uint8_t		hmac[20];
+
+} pj_stun_msgint_attr;
+
+
+/**
+ * This structure describes STUN FINGERPRINT attribute. The FINGERPRINT 
+ * attribute can be present in all STUN messages.  It is computed as 
+ * the CRC-32 of the STUN message up to (but excluding) the FINGERPRINT 
+ * attribute itself, xor-d with the 32 bit value 0x5354554e
+ */
+typedef struct pj_stun_uint_attr pj_stun_fingerprint_attr;
+
+
+/**
+ * This structure represents STUN ERROR-CODE attribute. The ERROR-CODE 
+ * attribute is present in the Binding Error Response and Shared Secret 
+ * Error Response.  It is a numeric value in the range of 100 to 699 
+ * plus a textual reason phrase encoded in UTF-8
+ *
+ * \verbatim
+
+        0                   1                   2                   3
+        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+       |                   0                     |Class|     Number    |
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+       |      Reason Phrase (variable)                                ..
+       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ \endverbatim
+ */
+typedef struct pj_stun_errcode_attr
+{
+    /**
+     * Standard STUN attribute header.
+     */
+    pj_stun_attr_hdr	hdr;
+
+    /**
+     * STUN error code.
+     */
+    int			err_code;
+
+    /**
+     * The reason phrase.
+     */
+    pj_str_t		reason;
+
+} pj_stun_errcode_attr;
+
+
+/**
+ * This describes STUN REALM attribute.
+ * The REALM attribute is present in requests and responses.  It
+ * contains text which meets the grammar for "realm" as described in RFC
+ * 3261 [11], and will thus contain a quoted string (including the
+ * quotes).
+ */
+typedef struct pj_stun_string_attr pj_stun_realm_attr;
+
+
+/**
+ * This describes STUN NONCE attribute. 
+ * The NONCE attribute is present in requests and in error responses.
+ * It contains a sequence of qdtext or quoted-pair, which are defined in
+ * RFC 3261 [11].  See RFC 2617 [7] for guidance on selection of nonce
+ * values in a server.
+ */
+typedef struct pj_stun_string_attr pj_stun_nonce_attr;
+
+
+/**
+ * This describes STUN UNKNOWN-ATTRIBUTES attribute.
+ * The UNKNOWN-ATTRIBUTES attribute is present only in an error response
+ * when the response code in the ERROR-CODE attribute is 420.
+ * The attribute contains a list of 16 bit values, each of which
+ * represents an attribute type that was not understood by the server.
+ * If the number of unknown attributes is an odd number, one of the
+ * attributes MUST be repeated in the list, so that the total length of
+ * the list is a multiple of 4 bytes.
+ */
+typedef struct pj_stun_unknown_attr
+{
+    /**
+     * Standard STUN attribute header.
+     */
+    pj_stun_attr_hdr	hdr;
+
+    /**
+     * Number of unknown attributes in the array.
+     */
+    unsigned		attr_count;
+
+    /**
+     * Array of unknown attribute IDs.
+     */
+    pj_uint16_t	        attrs[PJ_STUN_MAX_ATTR];
+
+} pj_stun_unknown_attr;
+
+
+/**
+ * This structure describes STUN MAPPED-ADDRESS attribute.
+ * The MAPPED-ADDRESS attribute indicates the mapped transport address.
+ */
+typedef struct pj_stun_sockaddr_attr pj_stun_mapped_addr_attr;
+
+
+/**
+ * This describes STUN XOR-MAPPED-ADDRESS attribute (which has the same
+ * format as STUN MAPPED-ADDRESS attribute).
+ * The XOR-MAPPED-ADDRESS attribute is present in responses.  It
+ * provides the same information that would present in the MAPPED-
+ * ADDRESS attribute but because the NAT's public IP address is
+ * obfuscated through the XOR function, STUN messages are able to pass
+ * through NATs which would otherwise interfere with STUN.
+ */
+typedef struct pj_stun_sockaddr_attr pj_stun_xor_mapped_addr_attr;
+
+
+/**
+ * This describes STUN SERVER attribute.
+ * The server attribute contains a textual description of the software
+ * being used by the server, including manufacturer and version number.
+ * The attribute has no impact on operation of the protocol, and serves
+ * only as a tool for diagnostic and debugging purposes.  The value of
+ * SERVER is variable length.
+ */
+typedef struct pj_stun_string_attr pj_stun_server_attr;
+
+
+/**
+ * This describes STUN ALTERNATE-SERVER attribute.
+ * The alternate server represents an alternate transport address for a
+ * different STUN server to try.  It is encoded in the same way as
+ * MAPPED-ADDRESS.
+ */
+typedef struct pj_stun_sockaddr_attr pj_stun_alt_server_attr;
+
+
+/**
+ * This describes STUN REFRESH-INTERVAL attribute.
+ * The REFRESH-INTERVAL indicates the number of milliseconds that the
+ * server suggests the client should use between refreshes of the NAT
+ * bindings between the client and server.
+ */
+typedef struct pj_stun_uint_attr pj_stun_refresh_interval_attr;
+
+
+/**
+ * This structure describes STUN RESPONSE-ADDRESS attribute.
+ * The RESPONSE-ADDRESS attribute indicates where the response to a
+ * Binding Request should be sent.  Its syntax is identical to MAPPED-
+ * ADDRESS.
+ *
+ * Note that the usage of this attribute has been deprecated by the 
+ * RFC 3489-bis standard.
+ */
+typedef struct pj_stun_sockaddr_attr pj_stun_response_addr_attr;
+
+
+/**
+ * This structure describes STUN CHANGED-ADDRESS attribute.
+ * The CHANGED-ADDRESS attribute indicates the IP address and port where
+ * responses would have been sent from if the "change IP" and "change
+ * port" flags had been set in the CHANGE-REQUEST attribute of the
+ * Binding Request.  The attribute is always present in a Binding
+ * Response, independent of the value of the flags.  Its syntax is
+ * identical to MAPPED-ADDRESS.
+ *
+ * Note that the usage of this attribute has been deprecated by the 
+ * RFC 3489-bis standard.
+ */
+typedef struct pj_stun_sockaddr_attr pj_stun_changed_addr_attr;
+
+
+/**
+ * This structure describes STUN CHANGE-REQUEST attribute.
+ * The CHANGE-REQUEST attribute is used by the client to request that
+ * the server use a different address and/or port when sending the
+ * response. 
+ *
+ * Bit 29 of the value is the "change IP" flag.  If true, it requests 
+ * the server to send the Binding Response with a different IP address 
+ * than the one the Binding Request was received on.
+ *
+ * Bit 30 of the value is the "change port" flag.  If true, it requests 
+ * the server to send the Binding Response with a different port than 
+ * the one the Binding Request was received on.
+ *
+ * Note that the usage of this attribute has been deprecated by the 
+ * RFC 3489-bis standard.
+ */
+typedef struct pj_stun_uint_attr pj_stun_change_request_attr;
+
+/**
+ * This structure describes STUN SOURCE-ADDRESS attribute.
+ * The SOURCE-ADDRESS attribute is present in Binding Responses.  It
+ * indicates the source IP address and port that the server is sending
+ * the response from.  Its syntax is identical to that of MAPPED-
+ * ADDRESS.
+ *
+ * Note that the usage of this attribute has been deprecated by the 
+ * RFC 3489-bis standard.
+ */
+typedef struct pj_stun_sockaddr_attr pj_stun_src_addr_attr;
+
+
+/**
+ * This describes the STUN REFLECTED-FROM attribute.
+ * The REFLECTED-FROM attribute is present only in Binding Responses,
+ * when the Binding Request contained a RESPONSE-ADDRESS attribute.  The
+ * attribute contains the identity (in terms of IP address) of the
+ * source where the request came from.  Its purpose is to provide
+ * traceability, so that a STUN server cannot be used as a reflector for
+ * denial-of-service attacks.
+ */
+typedef struct pj_stun_sockaddr_attr pj_stun_reflected_from_attr;
+
+
+/**
+ * This describes STUN USERNAME attribute.
+ * The USERNAME attribute is used for message integrity.  It identifies
+ * the shared secret used in the message integrity check.  Consequently,
+ * the USERNAME MUST be included in any request that contains the
+ * MESSAGE-INTEGRITY attribute.
+ */
+typedef struct pj_stun_string_attr pj_stun_username_attr;
+
+
+/**
+ * This describes STUN PASSWORD attribute.
+ * If the message type is Shared Secret Response it MUST include the
+ * PASSWORD attribute.
+ */
+typedef struct pj_stun_string_attr pj_stun_password_attr;
+
+
+/**
+ * This describes STUN LIFETIME attribute.
+ * The lifetime attribute represents the duration for which the server
+ * will maintain an allocation in the absence of data traffic either
+ * from or to the client.  It is a 32 bit value representing the number
+ * of seconds remaining until expiration.
+ */
+typedef struct pj_stun_uint_attr pj_stun_lifetime_attr;
+
+
+/**
+ * This describes STUN BANDWIDTH attribute.
+ * The bandwidth attribute represents the peak bandwidth, measured in
+ * kbits per second, that the client expects to use on the binding.  The
+ * value represents the sum in the receive and send directions.
+ */
+typedef struct pj_stun_uint_attr pj_stun_bandwidth_attr;
+
+
+/**
+ * This describes the STUN REMOTE-ADDRESS attribute.
+ * The REMOTE-ADDRESS specifies the address and port of the peer as seen
+ * from the STUN relay server.
+ */
+typedef struct pj_stun_sockaddr_attr pj_stun_remote_addr_attr;
+
+
+/**
+ * This describes the STUN DATA attribute.
+ * The DATA attribute is present in Send Indications and Data
+ * Indications.  It contains raw payload data that is to be sent (in the
+ * case of a Send Request) or was received (in the case of a Data
+ * Indication)..
+ */
+typedef struct pj_stun_binary_attr pj_stun_data_attr;
+
+
+/**
+ * This describes the STUN RELAY-ADDRESS attribute.
+ * The RELAY-ADDRESS is present in Allocate responses.  It specifies the
+ * address and port that the server allocated to the client.
+ */
+typedef struct pj_stun_sockaddr_attr pj_stun_relay_addr_attr;
+
+
+/**
+ * This describes the REQUESTED-ADDRESS-TYPE attribute.
+ * The REQUESTED-ADDRESS-TYPE attribute is used by clients to request
+ * the allocation of a specific address type from a server.  The
+ * following is the format of the REQUESTED-ADDRESS-TYPE attribute.
+
+ \verbatim
+
+      0                   1                   2                   3
+      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+     |        Family                 |           Reserved            |
+     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ \endverbatim
+ */
+typedef struct pj_stun_uint_attr pj_stun_req_addr_type;
+
+/**
+ * This describes the STUN REQUESTED-PORT-PROPS attribute.
+ * This attribute allows the client to request certain properties for
+ * the port that is allocated by the server.  The attribute can be used
+ * with any transport protocol that has the notion of a 16 bit port
+ * space (including TCP and UDP).  The attribute is 32 bits long.  Its
+ * format is:
+
+ \verbatim
+
+    0                   1                   2                   3
+    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+   |                           Reserved = 0                  |B| A |
+   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ \endverbatim  
+ */
+typedef struct pj_stun_uint_attr pj_stun_req_port_props_attr;
+
+
+/**
+ * This describes the STUN REQUESTED-TRANSPORT attribute.
+ * This attribute is used by the client to request a specific transport
+ * protocol for the allocated transport address.  It is a 32 bit
+ * unsigned integer.  Its values are: 0x0000 for UDP and 0x0000 for TCP.
+ */
+typedef struct pj_stun_uint_attr pj_stun_req_transport_attr;
+
+
+/**
+ * This describes the STUN REQUESTED-IP attribute.
+ * The REQUESTED-IP attribute is used by the client to request that a
+ * specific IP address be allocated to it.
+ */
+typedef struct pj_stun_sockaddr_attr pj_stun_req_ip_attr;
+
+/**
+ * This describes the XOR-REFLECTED-FROM attribute, as described by
+ * draft-macdonald-behave-nat-behavior-discovery-00.
+ * The XOR-REFLECTED-FROM attribute is used in place of the REFLECTED-
+ * FROM attribute.  It provides the same information, but because the
+ * NAT's public address is obfuscated through the XOR function, It can
+ * pass through a NAT that would otherwise attempt to translate it to
+ * the private network address.  XOR-REFLECTED-FROM has identical syntax
+ * to XOR-MAPPED-ADDRESS.
+ */
+typedef struct pj_stun_sockaddr_attr pj_stun_xor_reflected_from_attr;
+
+/**
+ * This describes the PRIORITY attribute from draft-ietf-mmusic-ice-13.
+ * The PRIORITY attribute indicates the priority that is to be
+ * associated with a peer reflexive candidate, should one be discovered
+ * by this check.  It is a 32 bit unsigned integer, and has an attribute
+ * type of 0x0024.
+ */
+typedef struct pj_stun_uint_attr pj_stun_priority_attr;
+
+/**
+ * This describes the USE-CANDIDATE attribute from draft-ietf-mmusic-ice-13.
+ * The USE-CANDIDATE attribute indicates that the candidate pair
+ * resulting from this check should be used for transmission of media.
+ * The attribute has no content (the Length field of the attribute is
+ * zero); it serves as a flag.
+ */
+typedef struct pj_stun_empty_attr pj_stun_use_candidate_attr;
+
+/**
+ * This structure describes STUN XOR-INTERNAL-ADDRESS attribute from
+ * draft-wing-behave-nat-control-stun-usage-00.
+ * This attribute MUST be present in a Binding Response and may be used
+ * in other responses as well.  This attribute is necessary to allow a
+ * STUN client to 'walk backwards' and communicate directly with all of
+ * the STUN-aware NATs along the path.
+ */
+typedef pj_stun_sockaddr_attr pj_stun_xor_internal_addr_attr;
+
+/**
+ * This describes the STUN TIMER-VAL attribute.
+ * The TIMER-VAL attribute is used only in conjunction with the Set
+ * Active Destination response.  It conveys from the server, to the
+ * client, the value of the timer used in the server state machine.
+ */
+typedef struct pj_stun_uint_attr pj_stun_timer_val_attr;
+
+/**
+ * This describes ICE-CONTROLLING attribute.
+ */
+typedef struct pj_stun_uint64_attr pj_stun_ice_controlling_attr;
+
+/**
+ * This describes ICE-CONTROLLED attribute.
+ */
+typedef struct pj_stun_uint64_attr pj_stun_ice_controlled_attr;
+
+/**
+ * This structure describes a parsed STUN message. All integral fields
+ * in this structure (including IP addresses) will be in the host
+ * byte order.
+ */
+typedef struct pj_stun_msg
+{
+    /**
+     * STUN message header.
+     */
+    pj_stun_msg_hdr     hdr;
+
+    /**
+     * Number of attributes in the STUN message.
+     */
+    unsigned		attr_count;
+
+    /**
+     * Array of STUN attributes.
+     */
+    pj_stun_attr_hdr   *attr[PJ_STUN_MAX_ATTR];
+
+} pj_stun_msg;
+
+
+/** STUN decoding options */
+enum pj_stun_decode_options
+{
+    /** 
+     * Tell the decoder that the message was received from datagram
+     * oriented transport (such as UDP).
+     */
+    PJ_STUN_IS_DATAGRAM	    = 1,
+
+    /**
+     * Tell pj_stun_msg_decode() to check the validity of the STUN
+     * message by calling pj_stun_msg_check() before starting to
+     * decode the packet.
+     */
+    PJ_STUN_CHECK_PACKET    = 2,
+
+    /**
+     * This option current is only valid for #pj_stun_session_on_rx_pkt().
+     * When specified, it tells the session NOT to authenticate the
+     * message.
+     */
+    PJ_STUN_NO_AUTHENTICATE = 4
+};
+
+
+/**
+ * Get STUN message method name.
+ *
+ * @param msg_type	The STUN message type (in host byte order)
+ *
+ * @return		The STUN message method name string.
+ */
+PJ_DECL(const char*) pj_stun_get_method_name(unsigned msg_type);
+
+
+/**
+ * Get STUN message class name.
+ *
+ * @param msg_type	The STUN message type (in host byte order)
+ *
+ * @return		The STUN message class name string.
+ */
+PJ_DECL(const char*) pj_stun_get_class_name(unsigned msg_type);
+
+
+/**
+ * Get STUN attribute name.
+ *
+ * @return attr_type	The STUN attribute type (in host byte order).
+ *
+ * @return		The STUN attribute type name string.
+ */
+PJ_DECL(const char*) pj_stun_get_attr_name(unsigned attr_type);
+
+
+/**
+ * Get STUN standard reason phrase for the specified error code.
+ *
+ * @param err_code	The STUN error code.
+ *
+ * @return		The STUN error reason phrase.
+ */
+PJ_DECL(pj_str_t) pj_stun_get_err_reason(int err_code);
+
+
+/**
+ * Create a generic STUN message.
+ *
+ * @param pool		Pool to create the STUN message.
+ * @param msg_type	The 14bit message type.
+ * @param magic		Magic value to be put to the mesage; for requests,
+ *			the value should be PJ_STUN_MAGIC.
+ * @param tsx_id	Optional transaction ID, or NULL to let the
+ *			function generates a random transaction ID.
+ * @param p_msg		Pointer to receive the message.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pj_stun_msg_create(pj_pool_t *pool,
+					unsigned msg_type,
+					pj_uint32_t magic,
+					const pj_uint8_t tsx_id[12],
+					pj_stun_msg **p_msg);
+
+/**
+ * Create STUN response message. 
+ *
+ * @param pool		Pool to create the mesage.
+ * @param req_msg	The request message.
+ * @param err_code	STUN error code. If this value is not zero,
+ *			then error response will be created, otherwise
+ *			successful response will be created.
+ * @param err_msg	Optional error message to explain err_code.
+ *			If this value is NULL and err_code is not zero,
+ *			the error string will be taken from the default
+ *			STUN error message.
+ * @param p_response	Pointer to receive the response.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error.
+ */
+PJ_DECL(pj_status_t) pj_stun_msg_create_response(pj_pool_t *pool,
+						 const pj_stun_msg *req_msg,
+						 unsigned err_code,
+						 const pj_str_t *err_msg,
+						 pj_stun_msg **p_response);
+
+
+/**
+ * Add STUN attribute to STUN message.
+ *
+ * @param msg		The STUN message.
+ * @param attr		The STUN attribute to be added to the message.
+ *
+ * @return		PJ_SUCCESS on success, or PJ_ETOOMANY if there are
+ *			already too many attributes in the message.
+ */
+PJ_DECL(pj_status_t) pj_stun_msg_add_attr(pj_stun_msg *msg,
+					  pj_stun_attr_hdr *attr);
+
+
+/**
+ * Print the STUN message structure to a packet buffer, ready to be 
+ * sent to remote destination. This function will take care about 
+ * calculating the MESSAGE-INTEGRITY digest as well as FINGERPRINT
+ * value.
+ *
+ * If MESSAGE-INTEGRITY attribute is present, the function assumes
+ * that application wants to include credential (short or long term)
+ * in the message, and this function will calculate the HMAC digest
+ * from the message using the supplied password in the parameter. 
+ * If REALM attribute is present, the HMAC digest is calculated as
+ * long term credential, otherwise as short term credential.
+ *
+ * If FINGERPRINT attribute is present, this function will calculate
+ * the FINGERPRINT CRC attribute for the message.
+ *
+ * @param msg		The STUN message to be printed. Upon return,
+ *			some fields in the header (such as message
+ *			length) will be updated.
+ * @param pkt_buf	The buffer to be filled with the packet.
+ * @param buf_size	Size of the buffer.
+ * @param options	Options, which currently must be zero.
+ * @param password	Password to be used when credential is to be
+ *			included. This parameter MUST be specified when
+ *			the message contains MESSAGE-INTEGRITY attribute.
+ * @param p_msg_len	Upon return, it will be filed with the size of 
+ *			the packet in bytes, or negative value on error.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_msg_encode(pj_stun_msg *msg,
+				        pj_uint8_t *pkt_buf,
+				        unsigned buf_size,
+				        unsigned options,
+					const pj_str_t *password,
+				        unsigned *p_msg_len);
+
+/**
+ * Check that the PDU is potentially a valid STUN message. This function
+ * is useful when application needs to multiplex STUN packets with other
+ * application traffic. When this function returns PJ_SUCCESS, there is a
+ * big chance that the packet is a STUN packet.
+ *
+ * Note that we cannot be sure that the PDU is a really valid STUN message 
+ * until we actually parse the PDU.
+ *
+ * @param pdu		The packet buffer.
+ * @param pdu_len	The length of the packet buffer.
+ * @param options	Additional options to be applied in the checking,
+ *			which can be taken from pj_stun_decode_options. One 
+ *			of the useful option is PJ_STUN_IS_DATAGRAM which 
+ *			means that the pdu represents a whole STUN packet.
+ *
+ * @return		PJ_SUCCESS if the PDU is a potentially valid STUN
+ *			message.
+ */
+PJ_DECL(pj_status_t) pj_stun_msg_check(const pj_uint8_t *pdu, 
+				       unsigned pdu_len, unsigned options);
+
+
+/**
+ * Decode incoming packet into STUN message.
+ *
+ * @param pool		Pool to allocate the message.
+ * @param pdu		The incoming packet to be parsed.
+ * @param pdu_len	The length of the incoming packet.
+ * @param options	Parsing flags, according to pj_stun_decode_options.
+ * @param p_msg		Pointer to receive the parsed message.
+ * @param p_parsed_len	Optional pointer to receive how many bytes have
+ *			been parsed for the STUN message. This is useful
+ *			when the packet is received over stream oriented
+ *			transport.
+ * @param p_response	Optional pointer to receive an instance of response
+ *			message, if one can be created. If the packet being
+ *			decoded is a request message, and it contains error,
+ *			and a response can be created, then the STUN 
+ *			response message will be returned on this argument.
+ *
+ * @return		PJ_SUCCESS if a STUN message has been successfully
+ *			decoded.
+ */
+PJ_DECL(pj_status_t) pj_stun_msg_decode(pj_pool_t *pool,
+				        const pj_uint8_t *pdu,
+				        unsigned pdu_len,
+				        unsigned options,
+				        pj_stun_msg **p_msg,
+					unsigned *p_parsed_len,
+				        pj_stun_msg **p_response);
+
+/**
+ * Dump STUN message to a printable string output.
+ *
+ * @param msg		The STUN message
+ * @param buffer	Buffer where the printable string output will
+ *			be printed on.
+ * @param length	Specify the maximum length of the buffer.
+ * @param printed_len	Optional pointer, which on output will be filled
+ *			up with the actual length of the output string.
+ *
+ * @return		The message string output.
+ */
+#if PJ_LOG_MAX_LEVEL > 0
+PJ_DECL(char*) pj_stun_msg_dump(const pj_stun_msg *msg,
+			        char *buffer,
+			        unsigned length,
+				unsigned *printed_len);
+#else
+#   define pj_stun_msg_dump(msg, buf, length, printed_len)  ""
+#endif
+
+
+/**
+ * Find STUN attribute in the STUN message, starting from the specified
+ * index.
+ *
+ * @param msg		The STUN message.
+ * @param attr_type	The attribute type to be found, from pj_stun_attr_type.
+ * @param start_index	The start index of the attribute in the message.
+ *			Specify zero to start searching from the first
+ *			attribute.
+ *
+ * @return		The attribute instance, or NULL if it cannot be
+ *			found.
+ */
+PJ_DECL(pj_stun_attr_hdr*) pj_stun_msg_find_attr(const pj_stun_msg *msg,
+						 int attr_type,
+						 unsigned start_index);
+
+
+/**
+ * Create a generic STUN IP address attribute. The \a addr_len and
+ * \a addr parameters specify whether the address is IPv4 or IPv4
+ * address.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param attr_type	Attribute type, from #pj_stun_attr_type.
+ * @param xor_ed	If non-zero, the port and address will be XOR-ed
+ *			with magic, to make the XOR-MAPPED-ADDRESS attribute.
+ * @param addr		A pj_sockaddr_in or pj_sockaddr_in6 structure.
+ * @param addr_len	Length of \a addr parameter.
+ * @param p_attr	Pointer to receive the attribute.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_sockaddr_attr_create(pj_pool_t *pool,
+						int attr_type, 
+						pj_bool_t xor_ed,
+						const pj_sockaddr_t *addr,
+						unsigned addr_len,
+						pj_stun_sockaddr_attr **p_attr);
+
+
+/**
+ * Create and add generic STUN IP address attribute to a STUN message.
+ * The \a addr_len and \a addr parameters specify whether the address is 
+ * IPv4 or IPv4 address.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param msg		The STUN message.
+ * @param attr_type	Attribute type, from #pj_stun_attr_type.
+ * @param xor_ed	If non-zero, the port and address will be XOR-ed
+ *			with magic, to make the XOR-MAPPED-ADDRESS attribute.
+ * @param addr		A pj_sockaddr_in or pj_sockaddr_in6 structure.
+ * @param addr_len	Length of \a addr parameter.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_msg_add_sockaddr_attr(pj_pool_t *pool,
+						  pj_stun_msg *msg,
+						  int attr_type, 
+						  pj_bool_t xor_ed,
+						  const pj_sockaddr_t *addr,
+						  unsigned addr_len);
+
+/**
+ * Create a STUN generic string attribute.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param attr_type	Attribute type, from #pj_stun_attr_type.
+ * @param value		The string value to be assigned to the attribute.
+ * @param p_attr	Pointer to receive the attribute.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_string_attr_create(pj_pool_t *pool,
+					        int attr_type,
+					        const pj_str_t *value,
+					        pj_stun_string_attr **p_attr);
+
+/**
+ * Create and add STUN generic string attribute to the message.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param msg		The STUN message.
+ * @param attr_type	Attribute type, from #pj_stun_attr_type.
+ * @param value		The string value to be assigned to the attribute.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_msg_add_string_attr(pj_pool_t *pool,
+						 pj_stun_msg *msg,
+						 int attr_type,
+						 const pj_str_t *value);
+
+/**
+ * Create a STUN generic 32bit value attribute.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param attr_type	Attribute type, from #pj_stun_attr_type.
+ * @param value		The 32bit value to be assigned to the attribute.
+ * @param p_attr	Pointer to receive the attribute.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_uint_attr_create(pj_pool_t *pool,
+					      int attr_type,
+					      pj_uint32_t value,
+					      pj_stun_uint_attr **p_attr);
+
+/**
+ * Create and add STUN generic 32bit value attribute to the message.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param msg		The STUN message
+ * @param attr_type	Attribute type, from #pj_stun_attr_type.
+ * @param value		The 32bit value to be assigned to the attribute.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_msg_add_uint_attr(pj_pool_t *pool,
+					       pj_stun_msg *msg,
+					       int attr_type,
+					       pj_uint32_t value);
+
+
+/**
+ * Create a STUN generic 64bit value attribute.
+ *
+ * @param pool		Pool to allocate memory from.
+ * @param attr_type	Attribute type, from #pj_stun_attr_type.
+ * @param value		Optional value to be assigned.
+ * @param p_attr	Pointer to receive the attribute.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DEF(pj_status_t)  pj_stun_uint64_attr_create(pj_pool_t *pool,
+					        int attr_type,
+					        const pj_timestamp *value,
+					        pj_stun_uint64_attr **p_attr);
+
+
+/**
+ *  Create and add STUN generic 64bit value attribute to the message. 
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param msg		The STUN message
+ * @param attr_type	Attribute type, from #pj_stun_attr_type.
+ * @param value		The 64bit value to be assigned to the attribute.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t)  pj_stun_msg_add_uint64_attr(pj_pool_t *pool,
+					          pj_stun_msg *msg,
+					          int attr_type,
+					          const pj_timestamp *value);
+
+/**
+ * Create a STUN MESSAGE-INTEGRITY attribute.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param p_attr	Pointer to receive the attribute.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_msgint_attr_create(pj_pool_t *pool,
+						pj_stun_msgint_attr **p_attr);
+
+/** 
+ * Create and add STUN MESSAGE-INTEGRITY attribute.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param msg		The STUN message
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_msg_add_msgint_attr(pj_pool_t *pool,
+						 pj_stun_msg *msg);
+
+/**
+ * Create a STUN ERROR-CODE attribute.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param err_code	STUN error code.
+ * @param err_reason	Optional STUN error reason. If NULL is given, the
+ *			standard error reason will be given.
+ * @param p_attr	Pointer to receive the attribute.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_errcode_attr_create(pj_pool_t *pool,
+						int err_code,
+						const pj_str_t *err_reason,
+						pj_stun_errcode_attr **p_attr);
+
+
+/**
+ * Create and add STUN ERROR-CODE attribute to the message.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param msg		The STUN mesage.
+ * @param err_code	STUN error code.
+ * @param err_reason	Optional STUN error reason. If NULL is given, the
+ *			standard error reason will be given.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_msg_add_errcode_attr(pj_pool_t *pool,
+						  pj_stun_msg *msg,
+						  int err_code,
+						  const pj_str_t *err_reason);
+
+/**
+ * Create instance of STUN UNKNOWN-ATTRIBUTES attribute and copy the
+ * unknown attribute array to the attribute.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param attr_cnt	Number of attributes in the array (can be zero).
+ * @param attr		Optional array of attributes.
+ * @param p_attr	Pointer to receive the attribute.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_unknown_attr_create(pj_pool_t *pool,
+						unsigned attr_cnt,
+						const pj_uint16_t attr[],
+						pj_stun_unknown_attr **p_attr);
+
+/**
+ * Create and add STUN UNKNOWN-ATTRIBUTES attribute to the message.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param msg		The STUN message.
+ * @param attr_cnt	Number of attributes in the array (can be zero).
+ * @param attr		Optional array of attributes.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_msg_add_unknown_attr(pj_pool_t *pool,
+						  pj_stun_msg *msg,
+						  unsigned attr_cnt,
+						  const pj_uint16_t attr[]);
+
+/**
+ * Create STUN binary attribute.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param attr_type	The attribute type, from #pj_stun_attr_type.
+ * @param data		Data to be coped to the attribute, or NULL
+ *			if no data to be copied now.
+ * @param length	Length of data, or zero if no data is to be
+ *			copied now.
+ * @param p_attr	Pointer to receive the attribute.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_binary_attr_create(pj_pool_t *pool,
+					        int attr_type,
+					        const pj_uint8_t *data,
+					        unsigned length,
+					        pj_stun_binary_attr **p_attr);
+
+/**
+ * Create STUN binary attribute and add the attribute to the message.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param msg		The STUN message.
+ * @param attr_type	The attribute type, from #pj_stun_attr_type.
+ * @param data		Data to be coped to the attribute, or NULL
+ *			if no data to be copied now.
+ * @param length	Length of data, or zero if no data is to be
+ *			copied now.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_msg_add_binary_attr(pj_pool_t *pool,
+						 pj_stun_msg *msg,
+						 int attr_type,
+						 const pj_uint8_t *data,
+						 unsigned length);
+
+/**
+ * Create STUN empty attribute.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param attr_type	The attribute type, from #pj_stun_attr_type.
+ * @param p_attr	Pointer to receive the attribute.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_empty_attr_create(pj_pool_t *pool,
+					       int attr_type,
+					       pj_stun_empty_attr **p_attr);
+
+/**
+ * Create STUN empty attribute and add the attribute to the message.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param msg		The STUN message.
+ * @param attr_type	The attribute type, from #pj_stun_attr_type.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_msg_add_empty_attr(pj_pool_t *pool,
+						pj_stun_msg *msg,
+						int attr_type);
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJNATH_STUN_MSG_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_session.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_session.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_session.h	(revision 1163)
@@ -0,0 +1,430 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __PJNATH_STUN_SESSION_H__
+#define __PJNATH_STUN_SESSION_H__
+
+/**
+ * @file stun_session.h
+ * @brief STUN session management for client/server.
+ */
+
+#include <pjnath/stun_msg.h>
+#include <pjnath/stun_auth.h>
+#include <pjnath/stun_config.h>
+#include <pjnath/stun_transaction.h>
+#include <pj/list.h>
+#include <pj/timer.h>
+
+PJ_BEGIN_DECL
+
+
+/* **************************************************************************/
+/**
+ * @defgroup PJNATH_STUN_SESSION STUN Client/Server Session
+ * @brief STUN client and server session
+ * @ingroup PJNATH_STUN
+ * @{
+ */
+
+
+/** Forward declaration for pj_stun_tx_data */
+typedef struct pj_stun_tx_data pj_stun_tx_data;
+
+/** Forward declaration for pj_stun_session */
+typedef struct pj_stun_session pj_stun_session;
+
+
+/**
+ * This is the callback to be registered to pj_stun_session, to send
+ * outgoing message and to receive various notifications from the STUN
+ * session.
+ */
+typedef struct pj_stun_session_cb
+{
+    /**
+     * Callback to be called by the STUN session to send outgoing message.
+     *
+     * @param sess	    The STUN session.
+     * @param pkt	    Packet to be sent.
+     * @param pkt_size	    Size of the packet to be sent.
+     * @param dst_addr	    The destination address.
+     * @param addr_len	    Length of destination address.
+     *
+     * @return		    The callback should return the status of the
+     *			    packet sending.
+     */
+    pj_status_t (*on_send_msg)(pj_stun_session *sess,
+			       const void *pkt,
+			       pj_size_t pkt_size,
+			       const pj_sockaddr_t *dst_addr,
+			       unsigned addr_len);
+
+    /** 
+     * Callback to be called on incoming STUN request message. In the 
+     * callback processing, application MUST create a response by calling
+     * pj_stun_session_create_response() function and send the response
+     * with pj_stun_session_send_msg() function, before returning from
+     * the callback.
+     *
+     * @param sess	    The STUN session.
+     * @param pkt	    Pointer to the original STUN packet.
+     * @param pkt_len	    Length of the STUN packet.
+     * @param msg	    The parsed STUN request.
+     * @param src_addr	    Source address of the packet.
+     * @param src_addr_len  Length of the source address.
+     *
+     * @return		    The return value of this callback will be
+     *			    returned back to pj_stun_session_on_rx_pkt()
+     *			    function.
+     */
+    pj_status_t (*on_rx_request)(pj_stun_session *sess,
+				 const pj_uint8_t *pkt,
+				 unsigned pkt_len,
+				 const pj_stun_msg *msg,
+				 const pj_sockaddr_t *src_addr,
+				 unsigned src_addr_len);
+
+    /**
+     * Callback to be called when response is received or the transaction 
+     * has timed out.
+     *
+     * @param sess	    The STUN session.
+     * @param status	    Status of the request. If the value if not
+     *			    PJ_SUCCESS, the transaction has timed-out
+     *			    or other error has occurred, and the response
+     *			    argument may be NULL.
+     *			    Note that when the status is not success, the
+     *			    response may contain non-NULL value if the 
+     *			    response contains STUN ERROR-CODE attribute.
+     * @param request	    The original STUN request.
+     * @param response	    The response message, on successful transaction,
+     *			    or otherwise MAY BE NULL if status is not success.
+     *			    Note that when the status is not success, this
+     *			    argument may contain non-NULL value if the 
+     *			    response contains STUN ERROR-CODE attribute.
+     * @param src_addr	    The source address where the response was 
+     *			    received, or NULL if the response is NULL.
+     * @param src_addr_len  The length of the source  address.
+     */
+    void (*on_request_complete)(pj_stun_session *sess,
+			        pj_status_t status,
+			        pj_stun_tx_data *tdata,
+			        const pj_stun_msg *response,
+				const pj_sockaddr_t *src_addr,
+				unsigned src_addr_len);
+
+
+    /**
+     * Type of callback to be called on incoming STUN indication.
+     */
+    pj_status_t (*on_rx_indication)(pj_stun_session *sess,
+				    const pj_uint8_t *pkt,
+				    unsigned pkt_len,
+				    const pj_stun_msg *msg,
+				    const pj_sockaddr_t *src_addr,
+				    unsigned src_addr_len);
+
+} pj_stun_session_cb;
+
+
+/**
+ * This structure describe the outgoing STUN transmit data to carry the
+ * message to be sent.
+ */
+struct pj_stun_tx_data
+{
+    PJ_DECL_LIST_MEMBER(struct pj_stun_tx_data);
+
+    pj_pool_t		*pool;		/**< Pool.			    */
+    pj_stun_session	*sess;		/**< The STUN session.		    */
+    pj_stun_msg		*msg;		/**< The STUN message.		    */
+
+    void		*user_data;	/**< Arbitrary application data.    */
+
+    pj_stun_client_tsx	*client_tsx;	/**< Client STUN transaction.	    */
+    pj_uint32_t		 msg_magic;	/**< Message magic.		    */
+    pj_uint8_t		 msg_key[12];	/**< Message/transaction key.	    */
+
+    void		*pkt;		/**< The STUN packet.		    */
+    unsigned		 max_len;	/**< Length of packet buffer.	    */
+    unsigned		 pkt_size;	/**< The actual length of STUN pkt. */
+
+    unsigned		 addr_len;	/**< Length of destination address. */
+    const pj_sockaddr_t	*dst_addr;	/**< Destination address.	    */
+
+    pj_timer_entry	 res_timer;	/**< Response cache timer.	    */
+};
+
+
+/**
+ * Create a STUN session.
+ *
+ * @param cfg		The STUN endpoint, to be used to register timers etc.
+ * @param name		Optional name to be associated with this instance. The
+ *			name will be used for example for logging purpose.
+ * @param cb		Session callback.
+ * @param fingerprint	Enable message fingerprint for outgoing messages.
+ * @param p_sess	Pointer to receive STUN session instance.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_session_create(pj_stun_config *cfg,
+					    const char *name,
+					    const pj_stun_session_cb *cb,
+					    pj_bool_t fingerprint,
+					    pj_stun_session **p_sess);
+
+/**
+ * Destroy the STUN session.
+ *
+ * @param sess	    The STUN session instance.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_session_destroy(pj_stun_session *sess);
+
+/**
+ * Associated an arbitrary data with this STUN session. The user data may
+ * be retrieved later with pj_stun_session_get_user_data() function.
+ *
+ * @param sess	    The STUN session instance.
+ * @param user_data The user data.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_session_set_user_data(pj_stun_session *sess,
+						   void *user_data);
+
+/**
+ * Retrieve the user data previously associated to this STUN session with
+ * pj_stun_session_set_user_data().
+ *
+ * @param sess	    The STUN session instance.
+ *
+ * @return	    The user data associated with this STUN session.
+ */
+PJ_DECL(void*) pj_stun_session_get_user_data(pj_stun_session *sess);
+
+/**
+ * Set server name to be included in all response.
+ *
+ * @param sess	    The STUN session instance.
+ * @param srv_name  Server name string.
+ *
+ * @return	    The user data associated with this STUN session.
+ */
+PJ_DECL(pj_status_t) pj_stun_session_set_server_name(pj_stun_session *sess,
+						     const pj_str_t *srv_name);
+
+/**
+ * Set credential to be used by this session. Once credential is set, all
+ * outgoing messages will include MESSAGE-INTEGRITY, and all incoming
+ * message will be authenticated against this credential.
+ *
+ * To disable authentication after it has been set, call this function
+ * again with NULL as the argument.
+ *
+ * @param sess	    The STUN session instance.
+ * @param cred	    The credential to be used by this session. If NULL
+ *		    is specified, authentication will be disabled.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(void) pj_stun_session_set_credential(pj_stun_session *sess,
+					     const pj_stun_auth_cred *cred);
+
+/**
+ * Create a STUN request message. After the message has been successfully
+ * created, application can send the message by calling 
+ * pj_stun_session_send_msg().
+ *
+ * @param sess	    The STUN session instance.
+ * @param msg_type  The STUN request message type, from pj_stun_method_e or
+ *		    from pj_stun_msg_type.
+ * @param tsx_id    Optional transaction ID.
+ * @param p_tdata   Pointer to receive STUN transmit data instance containing
+ *		    the request.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_session_create_req(pj_stun_session *sess,
+						int msg_type,
+						const pj_uint8_t tsx_id[12],
+						pj_stun_tx_data **p_tdata);
+
+/**
+ * Create a STUN Indication message. After the message  has been successfully
+ * created, application can send the message by calling 
+ * pj_stun_session_send_msg().
+ *
+ * @param sess	    The STUN session instance.
+ * @param msg_type  The STUN request message type, from pj_stun_method_e or
+ *		    from pj_stun_msg_type. This function will add the
+ *		    indication bit as necessary.
+ * @param p_tdata   Pointer to receive STUN transmit data instance containing
+ *		    the message.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_session_create_ind(pj_stun_session *sess,
+						int msg_type,
+					        pj_stun_tx_data **p_tdata);
+
+/**
+ * Create a STUN response message. After the message has been 
+ * successfully created, application can send the message by calling 
+ * pj_stun_session_send_msg().
+ *
+ * @param sess	    The STUN session instance.
+ * @param req	    The STUN request where the response is to be created.
+ * @param err_code  Error code to be set in the response, if error response
+ *		    is to be created, according to pj_stun_status enumeration.
+ *		    This argument MUST be zero if successful response is
+ *		    to be created.
+ * @param err_msg   Optional pointer for the error message string, when
+ *		    creating error response. If the value is NULL and the
+ *		    \a err_code is non-zero, then default error message will
+ *		    be used.
+ * @param p_tdata   Pointer to receive the response message created.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_session_create_response(pj_stun_session *sess,
+						     const pj_stun_msg *req,
+						     unsigned err_code,
+						     const pj_str_t *err_msg,
+						     pj_stun_tx_data **p_tdata);
+
+
+/**
+ * Send STUN message to the specified destination. This function will encode
+ * the pj_stun_msg instance to a packet buffer, and add credential or
+ * fingerprint if necessary. If the message is a request, the session will
+ * also create and manage a STUN client transaction to be used to manage the
+ * retransmission of the request. After the message has been encoded and
+ * transaction is setup, the \a on_send_msg() callback of pj_stun_session_cb
+ * (which is registered when the STUN session is created) will be called
+ * to actually send the message to the wire.
+ *
+ * @param sess	    The STUN session instance.
+ * @param cache_res If PJ_TRUE then response will be cached.
+ * @param dst_addr  The destination socket address.
+ * @param addr_len  Length of destination address.
+ * @param tdata	    The STUN transmit data containing the STUN message to
+ *		    be sent.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_session_send_msg(pj_stun_session *sess,
+					      pj_bool_t cache_res,
+					      const pj_sockaddr_t *dst_addr,
+					      unsigned addr_len,
+					      pj_stun_tx_data *tdata);
+
+/**
+ * Cancel outgoing STUN transaction. This operation is only valid for outgoing
+ * STUN request, to cease retransmission of the request and destroy the
+ * STUN client transaction that is used to send the request.
+ *
+ * @param sess	    The STUN session instance.
+ * @param tdata	    The request message previously sent.
+ * @param notify    Specify whether \a on_request_complete() callback should
+ *		    be called.
+ * @param status    If \a on_request_complete() callback is to be called,
+ *		    specify the error status to be given when calling the
+ *		    callback. This error status MUST NOT be PJ_SUCCESS.
+ *
+ * @return	    PJ_SUCCESS if transaction is successfully cancelled.
+ */
+PJ_DECL(pj_status_t) pj_stun_session_cancel_req(pj_stun_session *sess,
+						pj_stun_tx_data *tdata,
+						pj_bool_t notify,
+						pj_status_t status);
+
+/**
+ * Explicitly request retransmission of the request. Normally application
+ * doesn't need to do this, but this functionality is needed by ICE to
+ * speed up connectivity check completion.
+ *
+ * @param sess	    The STUN session instance.
+ * @param tdata	    The request message previously sent.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error.
+ */
+PJ_DECL(pj_status_t) pj_stun_session_retransmit_req(pj_stun_session *sess,
+						    pj_stun_tx_data *tdata);
+
+
+/**
+ * Application must call this function to notify the STUN session about
+ * the arrival of STUN packet. The STUN packet MUST have been checked
+ * first with #pj_stun_msg_check() to verify that this is indeed a valid
+ * STUN packet.
+ *
+ * The STUN session will decode the packet into pj_stun_msg, and process
+ * the message accordingly. If the message is a response, it will search
+ * through the outstanding STUN client transactions for a matching
+ * transaction ID and hand over the response to the transaction.
+ *
+ * On successful message processing, application will be notified about
+ * the message via one of the pj_stun_session_cb callback.
+ *
+ * @param sess		The STUN session instance.
+ * @param packet	The packet containing STUN message.
+ * @param pkt_size	Size of the packet.
+ * @param options	Options, from #pj_stun_decode_options.
+ * @param parsed_len	Optional pointer to receive the size of the parsed
+ *			STUN message (useful if packet is received via a
+ *			stream oriented protocol).
+ * @param src_addr	The source address of the packet.
+ * @param src_addr_len	Length of the source address.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_session_on_rx_pkt(pj_stun_session *sess,
+					       const void *packet,
+					       pj_size_t pkt_size,
+					       unsigned options,
+					       unsigned *parsed_len,
+					       const pj_sockaddr_t *src_addr,
+					       unsigned src_addr_len);
+
+/**
+ * Destroy the transmit data. Call this function only when tdata has been
+ * created but application doesn't want to send the message (perhaps
+ * because of other error).
+ *
+ * @param sess	    The STUN session.
+ * @param tdata	    The transmit data.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(void) pj_stun_msg_destroy_tdata(pj_stun_session *sess,
+					pj_stun_tx_data *tdata);
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+#endif	/* __PJNATH_STUN_SESSION_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_transaction.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_transaction.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/include/pjnath/stun_transaction.h	(revision 1163)
@@ -0,0 +1,266 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __PJNATH_STUN_TRANSACTION_H__
+#define __PJNATH_STUN_TRANSACTION_H__
+
+/**
+ * @file stun_transaction.h
+ * @brief STUN transaction
+ */
+
+#include <pjnath/stun_msg.h>
+#include <pjnath/stun_config.h>
+
+
+PJ_BEGIN_DECL
+
+
+/* **************************************************************************/
+/**
+ * @defgroup PJNATH_STUN_TRANSACTION STUN Client Transaction
+ * @brief STUN client transaction
+ * @ingroup PJNATH_STUN
+ * @{
+ *
+ The @ref PJNATH_STUN_TRANSACTION is used to manage outgoing STUN request,
+ for example to retransmit the request and to notify application about the
+ completion of the request.
+
+ The @ref PJNATH_STUN_TRANSACTION does not use any networking operations,
+ but instead application must supply the transaction with a callback to
+ be used by the transaction to send outgoing requests. This way the STUN
+ transaction is made more generic and can work with different types of
+ networking codes in application.
+
+
+ */
+
+/**
+ * Opaque declaration of STUN client transaction.
+ */
+typedef struct pj_stun_client_tsx pj_stun_client_tsx;
+
+/**
+ * STUN client transaction callback.
+ */
+typedef struct pj_stun_tsx_cb
+{
+    /**
+     * This callback is called when the STUN transaction completed.
+     *
+     * @param tsx	    The STUN transaction.
+     * @param status	    Status of the transaction. Status PJ_SUCCESS
+     *			    means that the request has received a successful
+     *			    response.
+     * @param response	    The STUN response, which value may be NULL if
+     *			    \a status is not PJ_SUCCESS.
+     * @param src_addr	    The source address of the response, if response 
+     *			    is not NULL.
+     * @param src_addr_len  The length of the source address.
+     */
+    void	(*on_complete)(pj_stun_client_tsx *tsx,
+			       pj_status_t status, 
+			       const pj_stun_msg *response,
+			       const pj_sockaddr_t *src_addr,
+			       unsigned src_addr_len);
+
+    /**
+     * This callback is called by the STUN transaction when it wants to send
+     * outgoing message.
+     *
+     * @param tsx	    The STUN transaction instance.
+     * @param stun_pkt	    The STUN packet to be sent.
+     * @param pkt_size	    Size of the STUN packet.
+     *
+     * @return		    If return value of the callback is not PJ_SUCCESS,
+     *			    the transaction will fail.
+     */
+    pj_status_t (*on_send_msg)(pj_stun_client_tsx *tsx,
+			       const void *stun_pkt,
+			       pj_size_t pkt_size);
+
+    /**
+     * This callback is called after the timer that was scheduled by
+     * #pj_stun_client_tsx_schedule_destroy() has elapsed. Application
+     * should call #pj_stun_client_tsx_destroy() upon receiving this
+     * callback.
+     *
+     * This callback is optional if application will not call 
+     * #pj_stun_client_tsx_schedule_destroy().
+     *
+     * @param tsx	    The STUN transaction instance.
+     */
+    void (*on_destroy)(pj_stun_client_tsx *tsx);
+
+} pj_stun_tsx_cb;
+
+
+
+/**
+ * Create an instance of STUN client transaction. The STUN client 
+ * transaction is used to transmit outgoing STUN request and to 
+ * ensure the reliability of the request by periodically retransmitting
+ * the request, if necessary.
+ *
+ * @param cfg		The STUN endpoint, which will be used to retrieve
+ *			various settings for the transaction.
+ * @param pool		Pool to be used to allocate memory from.
+ * @param cb		Callback structure, to be used by the transaction
+ *			to send message and to notify the application about
+ *			the completion of the transaction.
+ * @param p_tsx		Pointer to receive the transaction instance.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_client_tsx_create(	pj_stun_config *cfg,
+					        pj_pool_t *pool,
+						const pj_stun_tsx_cb *cb,
+						pj_stun_client_tsx **p_tsx);
+
+/**
+ * Schedule timer to destroy the transaction after the transaction is 
+ * complete. Application normally calls this function in the on_complete()
+ * callback. When this timer elapsed, the on_destroy() callback will be 
+ * called.
+ *
+ * This is convenient to let the STUN transaction absorbs any response 
+ * for the previous request retransmissions. If application doesn't want
+ * this, it can destroy the transaction immediately by calling 
+ * #pj_stun_client_tsx_destroy().
+ *
+ * @param tsx		The STUN transaction.
+ * @param delay		The delay interval before on_destroy() callback
+ *			is called.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) 
+pj_stun_client_tsx_schedule_destroy(pj_stun_client_tsx *tsx,
+				    const pj_time_val *delay);
+
+
+/**
+ * Destroy a STUN client transaction immediately. This function can be 
+ * called at any time to stop the transaction and destroy it.
+ *
+ * @param tsx		The STUN transaction.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_client_tsx_destroy(pj_stun_client_tsx *tsx);
+
+
+/**
+ * Check if transaction has completed.
+ *
+ * @param tsx		The STUN transaction.
+ *
+ * @return		Non-zero if transaction has completed.
+ */
+PJ_DECL(pj_bool_t) pj_stun_client_tsx_is_complete(pj_stun_client_tsx *tsx);
+
+
+/**
+ * Associate an arbitrary data with the STUN transaction. This data
+ * can be then retrieved later from the transaction, by using
+ * pj_stun_client_tsx_get_data() function.
+ *
+ * @param tsx		The STUN client transaction.
+ * @param data		Application data to be associated with the
+ *			STUN transaction.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pj_stun_client_tsx_set_data(pj_stun_client_tsx *tsx,
+						 void *data);
+
+
+/**
+ * Get the user data that was previously associated with the STUN 
+ * transaction.
+ *
+ * @param tsx		The STUN client transaction.
+ *
+ * @return		The user data.
+ */
+PJ_DECL(void*) pj_stun_client_tsx_get_data(pj_stun_client_tsx *tsx);
+
+
+/**
+ * Start the STUN client transaction by sending STUN request using
+ * this transaction. If reliable transport such as TCP or TLS is used,
+ * the retransmit flag should be set to PJ_FALSE because reliablity
+ * will be assured by the transport layer.
+ *
+ * @param tsx		The STUN client transaction.
+ * @param retransmit	Should this message be retransmitted by the
+ *			STUN transaction.
+ * @param pkt		The STUN packet to send.
+ * @param pkt_len	Length of STUN packet.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_client_tsx_send_msg(pj_stun_client_tsx *tsx,
+						 pj_bool_t retransmit,
+						 void *pkt,
+						 unsigned pkt_len);
+
+/**
+ * Request to retransmit the request. Normally application should not need
+ * to call this function since retransmission would be handled internally,
+ * but this functionality is needed by ICE.
+ *
+ * @param tsx		The STUN client transaction instance.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_client_tsx_retransmit(pj_stun_client_tsx *tsx);
+
+
+/**
+ * Notify the STUN transaction about the arrival of STUN response.
+ * If the STUN response contains a final error (300 and greater), the
+ * transaction will be terminated and callback will be called. If the
+ * STUN response contains response code 100-299, retransmission
+ * will  cease, but application must still call this function again
+ * with a final response later to allow the transaction to complete.
+ *
+ * @param tsx		The STUN client transaction instance.
+ * @param msg		The incoming STUN message.
+ * @param src_addr	The source address of the packet.
+ * @param src_addr_len	The length of the source address.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pj_stun_client_tsx_on_rx_msg(pj_stun_client_tsx *tsx,
+						  const pj_stun_msg *msg,
+						  const pj_sockaddr_t*src_addr,
+						  unsigned src_addr_len);
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJNATH_STUN_TRANSACTION_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjnath/include/pjnath/types.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/include/pjnath/types.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/include/pjnath/types.h	(revision 1163)
@@ -0,0 +1,210 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJNATH_TYPES_H__
+#define __PJNATH_TYPES_H__
+
+/**
+ * @file types.h
+ * @brief PJNATH types.
+ */
+
+#include <pj/types.h>
+#include <pjnath/config.h>
+
+/**
+ * @defgroup PJNATH NAT Traversal Helper Library
+ * @{
+ */
+
+PJ_BEGIN_DECL
+
+/**
+ * Initialize pjnath library.
+ *
+ * @return	    Initialization status.
+ */
+PJ_DECL(pj_status_t) pjnath_init(void);
+
+
+/**
+ * Display error to the log.
+ *
+ * @param sender    The sender name.
+ * @param title	    Title message.
+ * @param status    The error status.
+ */
+#if PJNATH_ERROR_LEVEL <= PJ_LOG_MAX_LEVEL
+PJ_DECL(void) pjnath_perror(const char *sender, const char *title,
+			    pj_status_t status);
+#else
+# define pjnath_perror(sender, title, status)
+#endif
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+/* Doxygen documentation below: */
+
+/**
+ * @mainpage PJNATH - Open Source ICE, STUN, and TURN Library
+ *
+ * \n
+ * This is the documentation of PJNATH, an Open Source library providing
+ * NAT traversal helper functionalities by using standard based protocols.
+ *
+ * \n
+
+ * \section PJNATH_STUN STUN Protocol Library
+ *
+ * Session Traversal Utilities (STUN, or previously known as Simple 
+ * Traversal of User Datagram Protocol (UDP) Through Network Address 
+ * Translators (NAT)s), is a lightweight protocol that serves as a tool for
+ * application protocols in dealing with NAT traversal. It allows a client
+ * to determine the IP address and port allocated to them by a NAT and to 
+ * keep NAT bindings open.
+ * 
+ * The PJNATH library provides facilities to support both the core 
+ * <B>STUN-bis</B> specification and the <B>TURN</B> usage of STUN, 
+ * as well as other STUN usages. Please see #pj_stun_attr_type for 
+ * list of STUN attributes supported by this library.
+ *
+ * 
+ * The following are some design principles that have been utilized
+ * when implementing the STUN library in PJNATH:
+ *
+ *  - layered architecture, with \ref PJNATH_STUN_MSG as the lowest
+ *    layer and \ref PJNATH_STUN_SESSION as the highest abstraction
+ *    layer, to accommodate various usage scenario of the library.
+ *
+ *  - no transport -- the STUN library is pretty much transport
+ *    independent and all sending and receiving functionalities will
+ *    have to be implemented by application or higher level
+ *    abstraction (such as ICE). This helps facilitating an even
+ *    more usage scenarios of the library.
+ *
+ *  - common functionalities for both STUN client and server
+ *    development. All STUN components can be used to develop both
+ *    STUN client and STUN server application, and in fact, in ICE,
+ *    both STUN client and server functionality exist in a single
+ *    ICE session.
+ *
+ * \n
+ *
+ * \subsection PJNATH_STUN_ARCH STUN Library Organization
+ *
+ * \image html stun-arch.jpg "STUN Library Architecture"
+ *
+ * The STUN library is organized as follows:
+ *
+ *  - the lowest layer of the library is \ref PJNATH_STUN_MSG. This layer
+ *    provides STUN message representation, validation, parsing, and
+ *    debugging (dump to log) of STUN messages.
+ *
+ *  - for client, the next higher layer is \ref PJNATH_STUN_TRANSACTION,
+ *    which manages retransmissions of STUN request.
+ *
+ *  - \ref PJNATH_STUN_AUTH provides mechanism to verify STUN
+ *    credential in incoming STUN messages.
+ *
+ *  - for both client and server, the next higher abstraction is
+ *    \ref PJNATH_STUN_SESSION, which provides management of incoming
+ *    and outgoing messages and association of STUN credential to
+ *    a STUN session.
+ *
+ * As mentioned previously, all STUN library components are independent
+ * of any transports. Application gives incoming packet
+ * to the STUN components for processing. and it must supply the STUN 
+ * components with callback to send outgoing messages.
+ * 
+ *
+ * \subsection PJNATH_STUN_REF STUN Reference
+ *
+ * References for STUN:
+ *
+ *  - <A HREF="http://www.ietf.org/internet-drafts/draft-ietf-behave-rfc3489bis-06.txt">
+ *    <B>draft-ietf-behave-rfc3489bis-06</b></A>: Session Traversal 
+ *     Utilities for (NAT) (STUN),
+ *  - <A HREF="http://www.ietf.org/internet-drafts/draft-ietf-behave-turn-03.txt">
+ *    <B>draft-ietf-behave-turn-03</B></A>: Obtaining Relay Addresses 
+ *    from Simple Traversal Underneath NAT (STUN)
+ *  - Obsoleted: <A HREF="http://www.ietf.org/rfc/rfc3489.txt">RFC 3489</A>.
+ *
+ * \n
+ *
+ * \section PJNATH_ICE ICE Implementation
+ *
+ * Interactive Connectivity Establishment (ICE) is a standard based 
+ * methodology for traversing Network Address Translator (NAT), and
+ * is described in 
+ * <A HREF="http://www.ietf.org/internet-drafts/draft-ietf-mmusic-ice-14.txt">
+ * <B>draft-ietf-mmusic-ice-14.txt</B></A> draft. The PJNATH ICE
+ * implementation is aimed to provide a usable and generic ICE transports
+ * for different types of application, including but not limited to
+ * the usage of ICE in SIP/SDP offer/answer.
+ * 
+ *
+ * \subsection PJNATH_ICE_ARCH ICE Library Organization
+ * 
+ * \image html ice-arch.jpg "ICE Architecture"
+ *
+ * The ICE library is organized as follows:
+ *
+ *  - the lowest layer is \ref PJNATH_ICE_SESSION, which provides 
+ *    ICE management and negotiation in a transport-independent way.
+ *    This layer contains the state machines to perform ICE
+ *    negotiation, and provides the most flexibility to control all
+ *    aspects of ICE session. This layer normally is only usable for
+ *    ICE implementors.
+ *
+ *  - higher in the hierarchy is \ref PJNATH_ICE_STREAM_TRANSPORT,
+ *    which binds ICE with UDP sockets, and provides STUN binding
+ *    and relay/TURN allocation for the sockets. This component can
+ *    be directly used by application, although normally application
+ *    should use the next higher abstraction below since it provides
+ *    SDP translations and better integration with other PJ libraries
+ *    such as PJSIP and PJMEDIA.
+ *
+ *  - the highest abstraction is ICE media transport, which maintains
+ *    ICE stream transport and provides SDP translations to be used
+ *    for SIP offer/answer exchanges.
+ *
+ * \subsection PJNATH_ICE_REF Reference
+ *
+ * References for ICE:
+ *  - <A HREF="http://www.ietf.org/internet-drafts/draft-ietf-mmusic-ice-15.txt">
+ *    <B>draft-ietf-mmusic-ice-15.txt</B></A>: Interactive Connectivity 
+ *    Establishment (ICE): A Methodology for Network Address Translator 
+ *    (NAT) Traversal for Offer/Answer Protocols
+ */
+
+/**
+ * @defgroup PJNATH_STUN STUN Library
+ * @brief Open source STUN library
+ *
+ * This module contains implementation of STUN library in PJNATH -
+ * the open source NAT helper containing STUN and ICE.
+ */
+
+#endif	/* __PJNATH_TYPES_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/ice_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/ice_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/ice_test.c	(revision 1163)
@@ -0,0 +1,516 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+
+#define THIS_FILE   "ice_test.c"
+
+
+struct ice_data
+{
+    const char	   *obj_name;
+    pj_bool_t	    complete;
+    pj_status_t	    err_code;
+    unsigned	    rx_rtp_cnt;
+    unsigned	    rx_rtcp_cnt;
+
+    unsigned	    rx_rtp_count;
+    char	    last_rx_rtp_data[32];
+    unsigned	    rx_rtcp_count;
+    char	    last_rx_rtcp_data[32];
+};
+
+static pj_stun_config stun_cfg;
+
+static void on_ice_complete(pj_ice_strans *icest, 
+			    pj_status_t status)
+{
+    struct ice_data *id = (struct ice_data*) icest->user_data;
+    id->complete = PJ_TRUE;
+    id->err_code = status;
+    PJ_LOG(3,(THIS_FILE, "     ICE %s complete %s", id->obj_name,
+	      (status==PJ_SUCCESS ? "successfully" : "with failure")));
+}
+
+
+static void on_rx_data(pj_ice_strans *icest, unsigned comp_id, 
+		       void *pkt, pj_size_t size,
+		       const pj_sockaddr_t *src_addr,
+		       unsigned src_addr_len)
+{
+    struct ice_data *id = (struct ice_data*) icest->user_data;
+
+    if (comp_id == 1) {
+	id->rx_rtp_cnt++;
+	pj_memcpy(id->last_rx_rtp_data, pkt, size);
+	id->last_rx_rtp_data[size] = '\0';
+    } else if (comp_id == 2) {
+	id->rx_rtcp_cnt++;
+	pj_memcpy(id->last_rx_rtcp_data, pkt, size);
+	id->last_rx_rtcp_data[size] = '\0';
+    } else {
+	pj_assert(!"Invalid component ID");
+    }
+
+    PJ_UNUSED_ARG(src_addr);
+    PJ_UNUSED_ARG(src_addr_len);
+}
+
+
+static void handle_events(unsigned msec_timeout)
+{
+    pj_time_val delay;
+
+    pj_timer_heap_poll(stun_cfg.timer_heap, NULL);
+
+    delay.sec = 0;
+    delay.msec = msec_timeout;
+    pj_time_val_normalize(&delay);
+
+    pj_ioqueue_poll(stun_cfg.ioqueue, &delay);
+}
+
+
+/* Basic create and destroy test */
+static int ice_basic_create_destroy_test()
+{
+    pj_ice_strans *im;
+    pj_ice_strans_cb icest_cb;
+    pj_status_t status;
+
+    PJ_LOG(3,(THIS_FILE, "...basic create/destroy"));
+
+    pj_bzero(&icest_cb, sizeof(icest_cb));
+    icest_cb.on_ice_complete = &on_ice_complete;
+    icest_cb.on_rx_data = &on_rx_data;
+
+    status = pj_ice_strans_create(&stun_cfg, "icetest", 2, NULL, &icest_cb, &im);
+    if (status != PJ_SUCCESS)
+	return -10;
+
+    pj_ice_strans_destroy(im);
+
+    return 0;
+}
+
+
+static pj_status_t start_ice(pj_ice_strans *ist, pj_ice_strans *remote)
+{
+    unsigned count;
+    pj_ice_sess_cand cand[PJ_ICE_MAX_CAND];
+    pj_status_t status;
+
+    count = PJ_ARRAY_SIZE(cand);
+    status = pj_ice_strans_enum_cands(remote, &count, cand);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return pj_ice_strans_start_ice(ist, &remote->ice->rx_ufrag, &remote->ice->rx_pass,
+			       count, cand);
+}
+
+
+struct dummy_cand
+{
+    unsigned		 comp_id;
+    pj_ice_cand_type	 type;
+    const char		*addr;
+    unsigned		 port;
+};
+
+static int init_ice_st(pj_ice_strans *ice_st,
+		       pj_bool_t add_valid_comp,
+		       unsigned dummy_cnt,
+		       struct dummy_cand cand[])
+{
+    pj_str_t a;
+    pj_status_t status;
+    unsigned i;
+
+    /* Create components */
+    for (i=0; i<ice_st->comp_cnt; ++i) {
+	status = pj_ice_strans_create_comp(ice_st, i+1, PJ_ICE_ST_OPT_DONT_ADD_CAND, NULL);
+	if (status != PJ_SUCCESS)
+	    return -21;
+    }
+
+    /* Add dummy candidates */
+    for (i=0; i<dummy_cnt; ++i) {
+	pj_sockaddr_in addr;
+
+	pj_sockaddr_in_init(&addr, pj_cstr(&a, cand[i].addr), (pj_uint16_t)cand[i].port);
+	status = pj_ice_strans_add_cand(ice_st, cand[i].comp_id, cand[i].type,
+				    65535, &addr, PJ_FALSE);
+	if (status != PJ_SUCCESS)
+	    return -22;
+    }
+
+    /* Add the real candidate */
+    if (add_valid_comp) {
+	for (i=0; i<ice_st->comp_cnt; ++i) {
+	    status = pj_ice_strans_add_cand(ice_st, i+1, PJ_ICE_CAND_TYPE_HOST, 65535,
+					&ice_st->comp[i]->local_addr.ipv4, PJ_TRUE);
+	    if (status != PJ_SUCCESS)
+		return -23;
+	}
+    }
+
+    return 0;
+}
+
+
+/* When ICE completes, both agents should agree on the same candidate pair.
+ * Check that the remote address selected by agent1 is equal to the
+ * local address of selected by agent 2.
+ */
+static int verify_address(pj_ice_strans *agent1, pj_ice_strans *agent2,
+			  unsigned comp_id)
+{
+    pj_ice_sess_cand *rcand, *lcand;
+    int lcand_id;
+
+    if (agent1->ice->comp[comp_id-1].valid_check == NULL) {
+	PJ_LOG(3,(THIS_FILE, "....error: valid_check not set for comp_id %d", comp_id));
+	return -60;
+    }
+
+    /* Get default remote candidate of agent 1 */
+    rcand = agent1->ice->comp[comp_id-1].valid_check->rcand;
+
+    /* Get default local candidate of agent 2 */
+    pj_ice_sess_find_default_cand(agent2->ice, comp_id, &lcand_id);
+    if (lcand_id < 0)
+	return -62;
+
+    lcand = &agent2->ice->lcand[lcand_id];
+
+    if (pj_memcmp(&rcand->addr, &lcand->addr, sizeof(pj_sockaddr_in))!=0) {
+	PJ_LOG(3,(THIS_FILE, "....error: the selected addresses are incorrect for comp_id %d", comp_id));
+	return -64;
+    }
+
+    return 0;
+}
+
+
+/* Perform ICE test with the following parameters:
+ *
+ * - title:	The title of the test
+ * - ocand_cnt,
+ *   ocand	Additional candidates to be added to offerer
+ * - acand_cnt,
+ *   acand	Additional candidates to be added to answerer
+ *
+ * The additional candidates are normally invalid candidates, meaning 
+ * they won't be reachable by the agents. They are used to "confuse"
+ * ICE processing.
+ */
+static int perform_ice_test(const char *title,
+			    pj_bool_t expected_success,
+			    unsigned comp_cnt,
+			    pj_bool_t add_valid_comp,
+			    unsigned wait_before_send,
+			    unsigned max_total_time,
+			    unsigned ocand_cnt,
+			    struct dummy_cand ocand[],
+			    unsigned acand_cnt,
+			    struct dummy_cand acand[])
+{
+    pj_ice_strans *im1, *im2;
+    pj_ice_strans_cb icest_cb;
+    struct ice_data *id1, *id2;
+    pj_timestamp t_start, t_end;
+    unsigned i;
+    pj_str_t data_from_offerer, data_from_answerer;
+    pj_status_t status;
+
+#define CHECK_COMPLETE()    if (id1->complete && id2->complete) { \
+				if (t_end.u32.lo==0) pj_get_timestamp(&t_end); \
+			    } else {}
+
+    PJ_LOG(3,(THIS_FILE, "...%s", title));
+
+    pj_bzero(&t_end, sizeof(t_end));
+
+    pj_bzero(&icest_cb, sizeof(icest_cb));
+    icest_cb.on_ice_complete = &on_ice_complete;
+    icest_cb.on_rx_data = &on_rx_data;
+
+    /* Create first ICE */
+    status = pj_ice_strans_create(&stun_cfg, "offerer", comp_cnt, NULL, &icest_cb, &im1);
+    if (status != PJ_SUCCESS)
+	return -20;
+
+    id1 = PJ_POOL_ZALLOC_T(im1->pool, struct ice_data);
+    id1->obj_name = "offerer";
+    im1->user_data = id1;
+
+    /* Init components */
+    status = init_ice_st(im1, add_valid_comp, ocand_cnt, ocand);
+    if (status != 0)
+	return status;
+
+    /* Create second ICE */
+    status = pj_ice_strans_create(&stun_cfg, "answerer", comp_cnt, NULL, &icest_cb, &im2);
+    if (status != PJ_SUCCESS)
+	return -25;
+
+    id2 = PJ_POOL_ZALLOC_T(im2->pool, struct ice_data);
+    id2->obj_name = "answerer";
+    im2->user_data = id2;
+
+    /* Init components */
+    status = init_ice_st(im2, add_valid_comp, acand_cnt, acand);
+    if (status != 0)
+	return status;
+
+
+    /* Init ICE on im1 */
+    status = pj_ice_strans_init_ice(im1, PJ_ICE_SESS_ROLE_CONTROLLING, NULL, NULL);
+    if (status != PJ_SUCCESS)
+	return -29;
+
+    /* Init ICE on im2 */
+    status = pj_ice_strans_init_ice(im2, PJ_ICE_SESS_ROLE_CONTROLLED, NULL, NULL);
+    if (status != PJ_SUCCESS)
+	return -29;
+
+    /* Start ICE on im2 */
+    status = start_ice(im2, im1);
+    if (status != PJ_SUCCESS)
+	return -30;
+
+    /* Start ICE on im1 */
+    status = start_ice(im1, im2);
+    if (status != PJ_SUCCESS)
+	return -35;
+
+    /* Apply delay to let other checks commence */
+    pj_thread_sleep(40);
+
+    /* Mark start time */
+    pj_get_timestamp(&t_start);
+
+    /* Poll for wait_before_send msecs before we send the first data */
+    if (expected_success) {
+	for (;;) {
+	    pj_timestamp t_now;
+
+	    handle_events(1);
+
+	    CHECK_COMPLETE();
+
+	    pj_get_timestamp(&t_now);
+	    if (pj_elapsed_msec(&t_start, &t_now) >= wait_before_send)
+		break;
+	}
+
+	/* Send data. It must be successful! */
+	data_from_offerer = pj_str("from offerer");
+	status = pj_ice_sess_send_data(im1->ice, 1, data_from_offerer.ptr, data_from_offerer.slen);
+	if (status != PJ_SUCCESS)
+	    return -47;
+
+	data_from_answerer = pj_str("from answerer");
+	status = pj_ice_sess_send_data(im2->ice, 1, data_from_answerer.ptr, data_from_answerer.slen);
+	if (status != PJ_SUCCESS)
+	    return -48;
+
+	/* Poll to allow data to be received */
+	for (;;) {
+	    pj_timestamp t_now;
+	    handle_events(1);
+	    CHECK_COMPLETE();
+	    pj_get_timestamp(&t_now);
+	    if (pj_elapsed_msec(&t_start, &t_now) >= (wait_before_send + 200))
+		break;
+	}
+    }
+
+    /* Just wait until both completes, or timed out */
+    while (!id1->complete || !id2->complete) {
+	pj_timestamp t_now;
+
+	handle_events(1);
+
+	CHECK_COMPLETE();
+	pj_get_timestamp(&t_now);
+	if (pj_elapsed_msec(&t_start, &t_now) >= max_total_time) {
+	    PJ_LOG(3,(THIS_FILE, "....error: timed-out"));
+	    return -50;
+	}
+    }
+
+    /* Mark end-time */
+    CHECK_COMPLETE();
+
+    /* If expected to fail, then just check that both fail */
+    if (!expected_success) {
+	/* Check status */
+	if (id1->err_code == PJ_SUCCESS)
+	    return -51;
+	if (id2->err_code == PJ_SUCCESS)
+	    return -52;
+	goto on_return;
+    }
+
+    /* Check status */
+    if (id1->err_code != PJ_SUCCESS)
+	return -53;
+    if (id2->err_code != PJ_SUCCESS)
+	return -56;
+
+    /* Verify that offerer gets answerer's transport address */
+    for (i=0; i<comp_cnt; ++i) {
+	status = verify_address(im1, im2, i+1);
+	if (status != 0)
+	    return status;
+    }
+
+    /* And the other way around */
+    for (i=0; i<comp_cnt; ++i) {
+	status = verify_address(im2, im1, i+1);
+	if (status != 0)
+	    return status;
+    }
+
+    /* Check that data is received in offerer */
+    if (id1->rx_rtp_cnt != 1) {
+	PJ_LOG(3,(THIS_FILE, "....error: data not received in offerer"));
+	return -80;
+    }
+    if (pj_strcmp2(&data_from_answerer, id1->last_rx_rtp_data) != 0) {
+	PJ_LOG(3,(THIS_FILE, "....error: data mismatch in offerer"));
+	return -82;
+    }
+
+    /* And the same in answerer */
+    if (id2->rx_rtp_cnt != 1) {
+	PJ_LOG(3,(THIS_FILE, "....error: data not received in answerer"));
+	return -84;
+    }
+    if (pj_strcmp2(&data_from_offerer, id2->last_rx_rtp_data) != 0) {
+	PJ_LOG(3,(THIS_FILE, "....error: data mismatch in answerer"));
+	return -82;
+    }
+
+
+on_return:
+
+    /* Done */
+    PJ_LOG(3,(THIS_FILE, "....success: ICE completed in %d msec, waiting..", 
+	      pj_elapsed_msec(&t_start, &t_end)));
+
+    /* Wait for some more time */
+    for (;;) {
+	pj_timestamp t_now;
+
+	pj_get_timestamp(&t_now);
+	if (pj_elapsed_msec(&t_start, &t_now) > max_total_time)
+	    break;
+
+	handle_events(1);
+    }
+
+
+    pj_ice_strans_destroy(im1);
+    pj_ice_strans_destroy(im2);
+    handle_events(100);
+    return 0;
+}
+
+
+int ice_test(void)
+{
+    int rc = 0;
+    pj_pool_t *pool;
+    pj_ioqueue_t *ioqueue;
+    pj_timer_heap_t *timer_heap;
+    enum { D1=500, D2=5000, D3=15000 };
+    struct dummy_cand ocand[] = 
+    {
+	{1, PJ_ICE_CAND_TYPE_SRFLX, "127.1.1.1", 65534 },
+	{2, PJ_ICE_CAND_TYPE_SRFLX, "127.1.1.1", 65535 },
+    };
+    struct dummy_cand acand[] =
+    {
+	{1, PJ_ICE_CAND_TYPE_SRFLX, "127.2.2.2", 65534 },
+	{2, PJ_ICE_CAND_TYPE_SRFLX, "127.2.2.2", 65535 },
+    };
+
+    pool = pj_pool_create(mem, NULL, 4000, 4000, NULL);
+    pj_ioqueue_create(pool, 12, &ioqueue);
+    pj_timer_heap_create(pool, 100, &timer_heap);
+    
+    pj_stun_config_init(&stun_cfg, mem, 0, ioqueue, timer_heap);
+
+#if 0
+    pj_log_set_level(5);
+#endif
+
+    //goto test;
+
+    /* Basic create/destroy */
+    rc = ice_basic_create_destroy_test();
+    if (rc != 0)
+	goto on_return;
+
+    /* Direct communication */
+    rc = perform_ice_test("Simple test (1 component)", PJ_TRUE, 1, PJ_TRUE, D1, D2, 0, NULL, 0, NULL);
+    if (rc != 0)
+	goto on_return;
+
+    /* Failure case (all checks fail) */
+    rc = perform_ice_test("Failure case (all checks fail)", PJ_FALSE, 1, PJ_FALSE, D3, D3, 1, ocand, 1, acand);
+    if (rc != 0)
+	goto on_return;
+
+    /* Direct communication with invalid address */
+    rc = perform_ice_test("With 1 unreachable address", PJ_TRUE, 1, PJ_TRUE, D1, D2, 1, ocand, 0, NULL);
+    if (rc != 0)
+	goto on_return;
+
+    /* Direct communication with invalid address */
+    rc = perform_ice_test("With 2 unreachable addresses (one each)", PJ_TRUE, 1, PJ_TRUE, D1, D2, 1, ocand, 1, acand);
+    if (rc != 0)
+	goto on_return;
+
+    /* Direct communication with two components */
+//test:
+    rc = perform_ice_test("With two components (RTP and RTCP)", PJ_TRUE, 2, PJ_TRUE, D1, D2, 0, NULL, 0, NULL);
+    if (rc != 0)
+	goto on_return;
+
+    goto on_return;
+
+    /* Direct communication with mismatch number of components */
+
+    /* Direct communication with 2 components and 2 invalid address */
+    rc = perform_ice_test("With 2 two components and 2 unreachable address", PJ_TRUE, 2, PJ_TRUE, D1, D2, 1, ocand, 1, acand);
+    if (rc != 0)
+	goto on_return;
+
+
+
+on_return:
+    pj_log_set_level(3);
+    pj_ioqueue_destroy(stun_cfg.ioqueue);
+    pj_pool_release(pool);
+    return rc;
+}
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/main.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/main.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/main.c	(revision 1163)
@@ -0,0 +1,60 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+
+#if defined(PJ_SUNOS) && PJ_SUNOS!=0
+#include <signal.h>
+static void init_signals()
+{
+    struct sigaction act;
+
+    memset(&act, 0, sizeof(act));
+    act.sa_handler = SIG_IGN;
+
+    sigaction(SIGALRM, &act, NULL);
+}
+
+#else
+#define init_signals()
+#endif
+
+#define boost()
+
+int main(int argc, char *argv[])
+{
+    int rc;
+
+    PJ_UNUSED_ARG(argc);
+    PJ_UNUSED_ARG(argv);
+
+    boost();
+    init_signals();
+
+    rc = test_main();
+
+    if (argc == 2 && pj_ansi_strcmp(argv[1], "-i")==0) {
+	char buf[10];
+
+	puts("Press <ENTER> to exit");
+	fgets(buf, sizeof(buf), stdin);
+    }
+
+    return rc;
+}
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/stun.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/stun.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/stun.c	(revision 1163)
@@ -0,0 +1,118 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+static int decode_test(void)
+{
+    /* Invalid message type */
+
+    /* Short message */
+
+    /* Long, random message */
+
+    /* Message length in header is shorter */
+
+    /* Message length in header is longer */
+
+    /* Invalid magic */
+
+    /* Attribute length is not valid */
+
+    /* Unknown mandatory attribute type should generate error */
+
+    /* Unknown but non-mandatory should be okay */
+
+    /* String/binary attribute length is larger than the message */
+
+    /* Valid message with MESSAGE-INTEGRITY */
+
+    /* Valid message with FINGERPRINT */
+
+    /* Valid message with MESSAGE-INTEGRITY and FINGERPRINT */
+
+    /* Another attribute not FINGERPRINT exists after MESSAGE-INTEGRITY */
+
+    /* Another attribute exists after FINGERPRINT */
+
+    return 0;
+}
+
+static int decode_verify(void)
+{
+    /* Decode all attribute types */
+    return 0;
+}
+
+static int auth_test(void)
+{
+    /* REALM and USERNAME is present, but MESSAGE-INTEGRITY is not present.
+     * For short term, must with reply 401 without REALM.
+     * For long term, must reply with 401 with REALM.
+     */
+
+    /* USERNAME is not present, server must respond with 432 (Missing
+     * Username).
+     */
+
+    /* If long term credential is wanted and REALM is not present, server 
+     * must respond with 434 (Missing Realm) 
+     */
+
+    /* If REALM doesn't match, server must respond with 434 (Missing Realm)
+     * too, containing REALM and NONCE attribute.
+     */
+
+    /* When long term authentication is wanted and NONCE is NOT present,
+     * server must respond with 435 (Missing Nonce), containing REALM and
+     * NONCE attribute.
+     */
+
+    /* Simulate 438 (Stale Nonce) */
+    
+    /* Simulate 436 (Unknown Username) */
+
+    /* When server wants to use short term credential, but request has
+     * REALM, reject with .... ???
+     */
+
+    /* Invalid HMAC */
+
+    /* Valid static short term, without NONCE */
+
+    /* Valid static short term, WITH NONCE */
+
+    /* Valid static long term (with NONCE */
+
+    /* Valid dynamic short term (without NONCE) */
+
+    /* Valid dynamic short term (with NONCE) */
+
+    /* Valid dynamic long term (with NONCE) */
+
+    return 0;
+}
+
+
+int stun_test(void)
+{
+    decode_verify();
+    decode_test();
+    auth_test();
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/test.c	(revision 1163)
@@ -0,0 +1,91 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjlib.h>
+
+void app_perror(const char *msg, pj_status_t rc)
+{
+    char errbuf[256];
+
+    PJ_CHECK_STACK();
+
+    pj_strerror(rc, errbuf, sizeof(errbuf));
+    PJ_LOG(1,("test", "%s: [pj_status_t=%d] %s", msg, rc, errbuf));
+}
+
+#define DO_TEST(test)	do { \
+			    PJ_LOG(3, ("test", "Running %s...", #test));  \
+			    rc = test; \
+			    PJ_LOG(3, ("test",  \
+				       "%s(%d)",  \
+				       (char*)(rc ? "..ERROR" : "..success"), rc)); \
+			    if (rc!=0) goto on_return; \
+			} while (0)
+
+
+pj_pool_factory *mem;
+
+
+static int test_inner(void)
+{
+    pj_caching_pool caching_pool;
+    int rc = 0;
+
+    mem = &caching_pool.factory;
+
+#if 1
+    pj_log_set_level(3);
+    pj_log_set_decor(PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_TIME | 
+                     PJ_LOG_HAS_MICRO_SEC);
+#endif
+
+    rc = pj_init();
+    if (rc != 0) {
+	app_perror("pj_init() error!!", rc);
+	return rc;
+    }
+    
+    pj_dump_config();
+    pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy, 0 );
+
+#if INCLUDE_ICE_TEST
+    DO_TEST(ice_test());
+#endif
+
+on_return:
+    return rc;
+}
+
+int test_main(void)
+{
+    PJ_USE_EXCEPTION;
+
+    PJ_TRY {
+        return test_inner();
+    }
+    PJ_CATCH_ANY {
+        int id = PJ_GET_EXCEPTION();
+        PJ_LOG(3,("test", "FATAL: unhandled exception id %d (%s)", 
+                  id, pj_exception_id_name(id)));
+    }
+    PJ_END;
+
+    return -1;
+}
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/test.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/test.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjnath-test/test.h	(revision 1163)
@@ -0,0 +1,30 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjlib.h>
+#include <pjlib-util.h>
+#include <pjnath.h>
+
+#define INCLUDE_ICE_TEST	    1
+
+extern int ice_test(void);
+extern int test_main(void);
+
+extern void app_perror(const char *title, pj_status_t rc);
+extern pj_pool_factory *mem;
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjnath/errno.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjnath/errno.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjnath/errno.c	(revision 1163)
@@ -0,0 +1,203 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjnath/errno.h>
+#include <pjnath/stun_msg.h>
+#include <pj/log.h>
+#include <pj/string.h>
+
+
+
+/* PJNATH's own error codes/messages 
+ * MUST KEEP THIS ARRAY SORTED!!
+ * Message must be limited to 64 chars!
+ */
+#if defined(PJ_HAS_ERROR_STRING) && PJ_HAS_ERROR_STRING!=0
+static const struct 
+{
+    int code;
+    const char *msg;
+} err_str[] = 
+{
+    /* STUN related error codes */
+    PJ_BUILD_ERR( PJNATH_EINSTUNMSGLEN,	    "Invalid STUN message length"),
+    PJ_BUILD_ERR( PJNATH_EINSTUNMSGTYPE,    "Invalid or unexpected STUN message type"),
+    PJ_BUILD_ERR( PJNATH_ESTUNTIMEDOUT,	    "STUN transaction has timed out"),
+
+    PJ_BUILD_ERR( PJNATH_ESTUNTOOMANYATTR,  "Too many STUN attributes"),
+    PJ_BUILD_ERR( PJNATH_ESTUNINATTRLEN,    "Invalid STUN attribute length"),
+    PJ_BUILD_ERR( PJNATH_ESTUNDUPATTR,	    "Found duplicate STUN attribute"),
+
+    PJ_BUILD_ERR( PJNATH_ESTUNFINGERPRINT,  "STUN FINGERPRINT verification failed"),
+    PJ_BUILD_ERR( PJNATH_ESTUNMSGINTPOS,    "Invalid STUN attribute after MESSAGE-INTEGRITY"),
+    PJ_BUILD_ERR( PJNATH_ESTUNFINGERPOS,    "Invalid STUN attribute after FINGERPRINT"),
+
+    PJ_BUILD_ERR( PJNATH_ESTUNNOMAPPEDADDR, "STUN (XOR-)MAPPED-ADDRESS attribute not found"),
+    PJ_BUILD_ERR( PJNATH_ESTUNIPV6NOTSUPP,  "STUN IPv6 attribute not supported"),
+
+    /* ICE related errors */
+    PJ_BUILD_ERR( PJNATH_ENOICE,	    "ICE session not available"),
+    PJ_BUILD_ERR( PJNATH_EICEINPROGRESS,    "ICE check is in progress"),
+    PJ_BUILD_ERR( PJNATH_EICEFAILED,	    "All ICE checklists failed"),
+    PJ_BUILD_ERR( PJNATH_EICEINCOMPID,	    "Invalid ICE component ID"),
+    PJ_BUILD_ERR( PJNATH_EICEINCANDID,	    "Invalid ICE candidate ID"),
+    PJ_BUILD_ERR( PJNATH_EICEINSRCADDR,	    "Source address mismatch"),
+    PJ_BUILD_ERR( PJNATH_EICEMISSINGSDP,    "Missing ICE SDP attribute"),
+    PJ_BUILD_ERR( PJNATH_EICEINCANDSDP,	    "Invalid SDP \"candidate\" attribute"),
+    PJ_BUILD_ERR( PJNATH_EICENOHOSTCAND,    "No host candidate associated with srflx"),
+
+};
+#endif	/* PJ_HAS_ERROR_STRING */
+
+
+/*
+ * pjnath_strerror()
+ */
+static pj_str_t pjnath_strerror(pj_status_t statcode, 
+				char *buf, pj_size_t bufsize )
+{
+    pj_str_t errstr;
+
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0)
+
+    if (statcode >= PJNATH_ERRNO_START && 
+	statcode < PJNATH_ERRNO_START + PJ_ERRNO_SPACE_SIZE)
+    {
+	/* Find the error in the table.
+	 * Use binary search!
+	 */
+	int first = 0;
+	int n = PJ_ARRAY_SIZE(err_str);
+
+	while (n > 0) {
+	    int half = n/2;
+	    int mid = first + half;
+
+	    if (err_str[mid].code < statcode) {
+		first = mid+1;
+		n -= (half+1);
+	    } else if (err_str[mid].code > statcode) {
+		n = half;
+	    } else {
+		first = mid;
+		break;
+	    }
+	}
+
+
+	if (PJ_ARRAY_SIZE(err_str) && err_str[first].code == statcode) {
+	    pj_str_t msg;
+	    
+	    msg.ptr = (char*)err_str[first].msg;
+	    msg.slen = pj_ansi_strlen(err_str[first].msg);
+
+	    errstr.ptr = buf;
+	    pj_strncpy_with_null(&errstr, &msg, bufsize);
+	    return errstr;
+
+	} 
+    }
+
+#endif	/* PJ_HAS_ERROR_STRING */
+
+
+    /* Error not found. */
+    errstr.ptr = buf;
+    errstr.slen = pj_ansi_snprintf(buf, bufsize, 
+				   "Unknown pjnath error %d",
+				   statcode);
+    if (errstr.slen < 0) errstr.slen = 0;
+    else if (errstr.slen > (int)bufsize) errstr.slen = bufsize;
+
+    return errstr;
+}
+
+
+static pj_str_t pjnath_strerror2(pj_status_t statcode, 
+				 char *buf, pj_size_t bufsize )
+{
+    int stun_code = statcode - PJ_STATUS_FROM_STUN_CODE(0);
+    const pj_str_t cmsg = pj_stun_get_err_reason(stun_code);
+    pj_str_t errstr;
+
+    buf[bufsize-1] = '\0';
+
+    if (cmsg.slen == 0) {
+	/* Not found */
+	errstr.ptr = buf;
+	errstr.slen = pj_ansi_snprintf(buf, bufsize, 
+				       "Unknown STUN err-code %d",
+				       stun_code);
+    } else {
+	errstr.ptr = buf;
+	pj_strncpy(&errstr, &cmsg, bufsize);
+	if (errstr.slen < (int)bufsize)
+	    buf[errstr.slen] = '\0';
+	else
+	    buf[bufsize-1] = '\0';
+    }
+
+    if (errstr.slen < 0) errstr.slen = 0;
+    else if (errstr.slen > (int)bufsize) errstr.slen = bufsize;
+
+    return errstr;
+}
+
+
+PJ_DEF(pj_status_t) pjnath_init(void)
+{
+    pj_status_t status;
+
+    status = pj_register_strerror(PJNATH_ERRNO_START, 299, 
+				  &pjnath_strerror);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    status = pj_register_strerror(PJ_STATUS_FROM_STUN_CODE(300), 
+				  699 - 300, 
+				  &pjnath_strerror2);
+    return status;
+}
+
+
+#if PJNATH_ERROR_LEVEL <= PJ_LOG_MAX_LEVEL
+
+PJ_DEF(void) pjnath_perror(const char *sender, const char *title,
+			   pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    pj_strerror(status, errmsg, sizeof(errmsg));
+
+#if PJNATH_ERROR_LEVEL==1
+    PJ_LOG(1,(sender, "%s: %s", title, errmsg));
+#elif PJNATH_ERROR_LEVEL==2
+    PJ_LOG(2,(sender, "%s: %s", title, errmsg));
+#elif PJNATH_ERROR_LEVEL==3
+    PJ_LOG(3,(sender, "%s: %s", title, errmsg));
+#elif PJNATH_ERROR_LEVEL==4
+    PJ_LOG(4,(sender, "%s: %s", title, errmsg));
+#elif PJNATH_ERROR_LEVEL==5
+    PJ_LOG(5,(sender, "%s: %s", title, errmsg));
+#else
+# error Invalid PJNATH_ERROR_LEVEL value
+#endif
+}
+
+#endif	/* PJNATH_ERROR_LEVEL <= PJ_LOG_MAX_LEVEL */
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjnath/ice_session.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjnath/ice_session.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjnath/ice_session.c	(revision 1163)
@@ -0,0 +1,2316 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 <pjnath/ice_session.h>
+#include <pjnath/errno.h>
+#include <pj/addr_resolv.h>
+#include <pj/array.h>
+#include <pj/assert.h>
+#include <pj/guid.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/rand.h>
+#include <pj/string.h>
+
+
+/* String names for candidate types */
+static const char *cand_type_names[] =
+{
+    "Host",
+    "Server Reflexive",
+    "Peer Reflexive",
+    "Relayed"
+
+};
+
+/* String names for pj_ice_sess_check_state */
+#if PJ_LOG_MAX_LEVEL >= 4
+static const char *check_state_name[] = 
+{
+    "Frozen",
+    "Waiting",
+    "In Progress",
+    "Succeeded",
+    "Failed"
+};
+
+static const char *clist_state_name[] =
+{
+    "Idle",
+    "Running",
+    "Completed"
+};
+#endif	/* PJ_LOG_MAX_LEVEL >= 4 */
+
+static const char *role_names[] = 
+{
+    "Unknown",
+    "Controlled",
+    "Controlling"
+};
+
+/* Default ICE session preferences, according to draft-ice */
+static pj_uint8_t cand_type_prefs[4] =
+{
+    126,    /**< PJ_ICE_HOST_PREF	*/
+    100,    /**< PJ_ICE_SRFLX_PREF.	*/
+    110,    /**< PJ_ICE_PRFLX_PREF	*/
+    0	    /**< PJ_ICE_RELAYED_PREF	*/
+};
+
+#define CHECK_NAME_LEN		128
+#define LOG4(expr)		PJ_LOG(4,expr)
+#define LOG5(expr)		PJ_LOG(4,expr)
+#define GET_LCAND_ID(cand)	(cand - ice->lcand)
+#define GET_CHECK_ID(cl, chk)	(chk - (cl)->checks)
+
+
+/* The data that will be attached to the STUN session on each
+ * component.
+ */
+typedef struct stun_data
+{
+    pj_ice_sess		*ice;
+    unsigned		 comp_id;
+    pj_ice_sess_comp	*comp;
+} stun_data;
+
+
+/* The data that will be attached to the timer to perform
+ * periodic check.
+ */
+typedef struct timer_data
+{
+    pj_ice_sess		    *ice;
+    pj_ice_sess_checklist   *clist;
+} timer_data;
+
+
+/* Forward declarations */
+static void destroy_ice(pj_ice_sess *ice,
+			pj_status_t reason);
+static pj_status_t start_periodic_check(pj_timer_heap_t *th, 
+					pj_timer_entry *te);
+static void periodic_timer(pj_timer_heap_t *th, 
+			  pj_timer_entry *te);
+static void handle_incoming_check(pj_ice_sess *ice,
+				  const pj_ice_rx_check *rcheck);
+
+/* These are the callbacks registered to the STUN sessions */
+static pj_status_t on_stun_send_msg(pj_stun_session *sess,
+				    const void *pkt,
+				    pj_size_t pkt_size,
+				    const pj_sockaddr_t *dst_addr,
+				    unsigned addr_len);
+static pj_status_t on_stun_rx_request(pj_stun_session *sess,
+				      const pj_uint8_t *pkt,
+				      unsigned pkt_len,
+				      const pj_stun_msg *msg,
+				      const pj_sockaddr_t *src_addr,
+				      unsigned src_addr_len);
+static void on_stun_request_complete(pj_stun_session *stun_sess,
+				     pj_status_t status,
+				     pj_stun_tx_data *tdata,
+				     const pj_stun_msg *response,
+				     const pj_sockaddr_t *src_addr,
+				     unsigned src_addr_len);
+static pj_status_t on_stun_rx_indication(pj_stun_session *sess,
+					 const pj_uint8_t *pkt,
+					 unsigned pkt_len,
+					 const pj_stun_msg *msg,
+					 const pj_sockaddr_t *src_addr,
+					 unsigned src_addr_len);
+
+/* These are the callbacks for performing STUN authentication */
+static pj_status_t stun_auth_get_auth(void *user_data,
+				      pj_pool_t *pool,
+				      pj_str_t *realm,
+				      pj_str_t *nonce);
+static pj_status_t stun_auth_get_cred(const pj_stun_msg *msg,
+				      void *user_data,
+				      pj_pool_t *pool,
+				      pj_str_t *realm,
+				      pj_str_t *username,
+				      pj_str_t *nonce,
+				      int *data_type,
+				      pj_str_t *data);
+static pj_status_t stun_auth_get_password(const pj_stun_msg *msg,
+					  void *user_data, 
+					  const pj_str_t *realm,
+					  const pj_str_t *username,
+					  pj_pool_t *pool,
+					  int *data_type,
+					  pj_str_t *data);
+
+
+PJ_DEF(const char*) pj_ice_get_cand_type_name(pj_ice_cand_type type)
+{
+    PJ_ASSERT_RETURN(type <= PJ_ICE_CAND_TYPE_RELAYED, "???");
+    return cand_type_names[type];
+}
+
+
+/* Get the prefix for the foundation */
+static int get_type_prefix(pj_ice_cand_type type)
+{
+    switch (type) {
+    case PJ_ICE_CAND_TYPE_HOST:	    return 'H';
+    case PJ_ICE_CAND_TYPE_SRFLX:    return 'S';
+    case PJ_ICE_CAND_TYPE_PRFLX:    return 'P';
+    case PJ_ICE_CAND_TYPE_RELAYED:  return 'R';
+    default:
+	pj_assert(!"Invalid type");
+	return 'U';
+    }
+}
+
+/* Calculate foundation */
+PJ_DEF(void) pj_ice_calc_foundation(pj_pool_t *pool,
+				    pj_str_t *foundation,
+				    pj_ice_cand_type type,
+				    const pj_sockaddr *base_addr)
+{
+    char buf[64];
+
+    pj_ansi_snprintf(buf, sizeof(buf), "%c%x",
+		     get_type_prefix(type),
+		     (int)pj_ntohl(base_addr->ipv4.sin_addr.s_addr));
+    pj_strdup2(pool, foundation, buf);
+}
+
+
+/* Init component */
+static pj_status_t init_comp(pj_ice_sess *ice,
+			     unsigned comp_id,
+			     pj_ice_sess_comp *comp)
+{
+    pj_stun_session_cb sess_cb;
+    pj_stun_auth_cred auth_cred;
+    stun_data *sd;
+    pj_status_t status;
+
+    /* Init STUN callbacks */
+    pj_bzero(&sess_cb, sizeof(sess_cb));
+    sess_cb.on_request_complete = &on_stun_request_complete;
+    sess_cb.on_rx_indication = &on_stun_rx_indication;
+    sess_cb.on_rx_request = &on_stun_rx_request;
+    sess_cb.on_send_msg = &on_stun_send_msg;
+
+    /* Create STUN session for this candidate */
+    status = pj_stun_session_create(&ice->stun_cfg, NULL, 
+			            &sess_cb, PJ_FALSE,
+				    &comp->stun_sess);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Associate data with this STUN session */
+    sd = PJ_POOL_ZALLOC_T(ice->pool, struct stun_data);
+    sd->ice = ice;
+    sd->comp_id = comp_id;
+    sd->comp = comp;
+    pj_stun_session_set_user_data(comp->stun_sess, sd);
+
+    /* Init STUN authentication credential */
+    pj_bzero(&auth_cred, sizeof(auth_cred));
+    auth_cred.type = PJ_STUN_AUTH_CRED_DYNAMIC;
+    auth_cred.data.dyn_cred.get_auth = &stun_auth_get_auth;
+    auth_cred.data.dyn_cred.get_cred = &stun_auth_get_cred;
+    auth_cred.data.dyn_cred.get_password = &stun_auth_get_password;
+    auth_cred.data.dyn_cred.user_data = comp->stun_sess;
+    pj_stun_session_set_credential(comp->stun_sess, &auth_cred);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create ICE session.
+ */
+PJ_DEF(pj_status_t) pj_ice_sess_create(pj_stun_config *stun_cfg,
+				       const char *name,
+				       pj_ice_sess_role role,
+				       unsigned comp_cnt,
+				       const pj_ice_sess_cb *cb,
+				       const pj_str_t *local_ufrag,
+				       const pj_str_t *local_passwd,
+				       pj_ice_sess **p_ice)
+{
+    pj_pool_t *pool;
+    pj_ice_sess *ice;
+    unsigned i;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(stun_cfg && cb && p_ice, PJ_EINVAL);
+
+    if (name == NULL)
+	name = "ice%p";
+
+    pool = pj_pool_create(stun_cfg->pf, name, 4000, 4000, NULL);
+    ice = PJ_POOL_ZALLOC_T(pool, pj_ice_sess);
+    ice->pool = pool;
+    ice->role = role;
+    ice->tie_breaker.u32.hi = pj_rand();
+    ice->tie_breaker.u32.lo = pj_rand();
+    ice->prefs = cand_type_prefs;
+
+    pj_ansi_snprintf(ice->obj_name, sizeof(ice->obj_name),
+		     name, ice);
+
+    status = pj_mutex_create_recursive(pool, ice->obj_name, 
+				       &ice->mutex);
+    if (status != PJ_SUCCESS) {
+	destroy_ice(ice, status);
+	return status;
+    }
+
+    pj_memcpy(&ice->cb, cb, sizeof(*cb));
+    pj_memcpy(&ice->stun_cfg, stun_cfg, sizeof(*stun_cfg));
+
+    ice->comp_cnt = comp_cnt;
+    for (i=0; i<comp_cnt; ++i) {
+	pj_ice_sess_comp *comp;
+	comp = &ice->comp[i];
+	comp->valid_check = NULL;
+
+	status = init_comp(ice, i+1, comp);
+	if (status != PJ_SUCCESS) {
+	    destroy_ice(ice, status);
+	    return status;
+	}
+    }
+
+    if (local_ufrag == NULL) {
+	ice->rx_ufrag.ptr = pj_pool_alloc(ice->pool, 16);
+	pj_create_random_string(ice->rx_ufrag.ptr, 16);
+	ice->rx_ufrag.slen = 16;
+    } else {
+	pj_strdup(ice->pool, &ice->rx_ufrag, local_ufrag);
+    }
+
+    if (local_passwd == NULL) {
+	ice->rx_pass.ptr = pj_pool_alloc(ice->pool, 16);
+	pj_create_random_string(ice->rx_pass.ptr, 16);
+	ice->rx_pass.slen = 16;
+    } else {
+	pj_strdup(ice->pool, &ice->rx_pass, local_passwd);
+    }
+
+    pj_list_init(&ice->early_check);
+
+    /* Done */
+    *p_ice = ice;
+
+    LOG4((ice->obj_name, 
+	 "ICE session created, comp_cnt=%d, role is %s agent",
+	 comp_cnt, role_names[ice->role]));
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Destroy
+ */
+static void destroy_ice(pj_ice_sess *ice,
+			pj_status_t reason)
+{
+    unsigned i;
+
+    if (reason == PJ_SUCCESS) {
+	LOG4((ice->obj_name, "Destroying ICE session"));
+    }
+
+    for (i=0; i<ice->comp_cnt; ++i) {
+	if (ice->comp[i].stun_sess) {
+	    pj_stun_session_destroy(ice->comp[i].stun_sess);
+	    ice->comp[i].stun_sess = NULL;
+	}
+    }
+
+    if (ice->clist.timer.id) {
+	pj_timer_heap_cancel(ice->stun_cfg.timer_heap, &ice->clist.timer);
+	ice->clist.timer.id = PJ_FALSE;
+    }
+
+    if (ice->mutex) {
+	pj_mutex_destroy(ice->mutex);
+	ice->mutex = NULL;
+    }
+
+    if (ice->pool) {
+	pj_pool_t *pool = ice->pool;
+	ice->pool = NULL;
+	pj_pool_release(pool);
+    }
+}
+
+
+/*
+ * Destroy
+ */
+PJ_DEF(pj_status_t) pj_ice_sess_destroy(pj_ice_sess *ice)
+{
+    PJ_ASSERT_RETURN(ice, PJ_EINVAL);
+    destroy_ice(ice, PJ_SUCCESS);
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Change session role. 
+ */
+PJ_DEF(pj_status_t) pj_ice_sess_change_role(pj_ice_sess *ice,
+					    pj_ice_sess_role new_role)
+{
+    PJ_ASSERT_RETURN(ice, PJ_EINVAL);
+
+    if (new_role != ice->role) {
+	ice->role = new_role;
+	LOG4((ice->obj_name, "Role changed to %s", role_names[new_role]));
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Change type preference
+ */
+PJ_DEF(pj_status_t) pj_ice_sess_set_prefs(pj_ice_sess *ice,
+					  const pj_uint8_t prefs[4])
+{
+    PJ_ASSERT_RETURN(ice && prefs, PJ_EINVAL);
+    ice->prefs = pj_pool_calloc(ice->pool, PJ_ARRAY_SIZE(prefs), 
+				sizeof(pj_uint8_t));
+    pj_memcpy(ice->prefs, prefs, sizeof(prefs));
+    return PJ_SUCCESS;
+}
+
+
+/* Find component by ID */
+static pj_ice_sess_comp *find_comp(const pj_ice_sess *ice, unsigned comp_id)
+{
+    pj_assert(comp_id > 0 && comp_id <= ice->comp_cnt);
+    return (pj_ice_sess_comp*) &ice->comp[comp_id-1];
+}
+
+
+/* Callback by STUN authentication when it needs to send 401 */
+static pj_status_t stun_auth_get_auth(void *user_data,
+				      pj_pool_t *pool,
+				      pj_str_t *realm,
+				      pj_str_t *nonce)
+{
+    PJ_UNUSED_ARG(user_data);
+    PJ_UNUSED_ARG(pool);
+
+    realm->slen = 0;
+    nonce->slen = 0;
+
+    return PJ_SUCCESS;
+}
+
+
+/* Get credential to be sent with outgoing message */
+static pj_status_t stun_auth_get_cred(const pj_stun_msg *msg,
+				      void *user_data,
+				      pj_pool_t *pool,
+				      pj_str_t *realm,
+				      pj_str_t *username,
+				      pj_str_t *nonce,
+				      int *data_type,
+				      pj_str_t *data)
+{
+    pj_stun_session *sess = (pj_stun_session *)user_data;
+    stun_data *sd = (stun_data*) pj_stun_session_get_user_data(sess);
+    pj_ice_sess *ice = sd->ice;
+
+    PJ_UNUSED_ARG(pool);
+    realm->slen = nonce->slen = 0;
+
+    if (PJ_STUN_IS_SUCCESS_RESPONSE(msg->hdr.type) ||
+	PJ_STUN_IS_ERROR_RESPONSE(msg->hdr.type))
+    {
+	/* Outgoing responses need to have the same credential as
+	 * incoming requests.
+	 */
+	*username = ice->rx_uname;
+	*data_type = 0;
+	*data = ice->rx_pass;
+    }
+    else {
+	*username = ice->tx_uname;
+	*data_type = 0;
+	*data = ice->tx_pass;
+    }
+
+    return PJ_SUCCESS;
+}
+
+/* Get password to be used to authenticate incoming message */
+static pj_status_t stun_auth_get_password(const pj_stun_msg *msg,
+					  void *user_data, 
+					  const pj_str_t *realm,
+					  const pj_str_t *username,
+					  pj_pool_t *pool,
+					  int *data_type,
+					  pj_str_t *data)
+{
+    pj_stun_session *sess = (pj_stun_session *)user_data;
+    stun_data *sd = (stun_data*) pj_stun_session_get_user_data(sess);
+    pj_ice_sess *ice = sd->ice;
+
+    PJ_UNUSED_ARG(realm);
+    PJ_UNUSED_ARG(pool);
+
+    if (PJ_STUN_IS_SUCCESS_RESPONSE(msg->hdr.type) ||
+	PJ_STUN_IS_ERROR_RESPONSE(msg->hdr.type))
+    {
+	/* Incoming response is authenticated with TX credential */
+	/* Verify username */
+	if (pj_strcmp(username, &ice->tx_uname) != 0)
+	    return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_UNKNOWN_USERNAME);
+	*data_type = 0;
+	*data = ice->tx_pass;
+
+    } else {
+	/* Incoming request is authenticated with RX credential */
+	/* The agent MUST accept a credential if the username consists
+	 * of two values separated by a colon, where the first value is
+	 * equal to the username fragment generated by the agent in an offer
+	 * or answer for a session in-progress, and the MESSAGE-INTEGRITY 
+	 * is the output of a hash of the password and the STUN packet's 
+	 * contents.
+	 */
+	const char *pos;
+	pj_str_t ufrag;
+
+	pos = (const char*)pj_memchr(username->ptr, ':', username->slen);
+	if (pos == NULL)
+	    return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_UNKNOWN_USERNAME);
+
+	ufrag.ptr = (char*)username->ptr;
+	ufrag.slen = (pos - username->ptr);
+
+	if (pj_strcmp(&ufrag, &ice->rx_ufrag) != 0)
+	    return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_UNKNOWN_USERNAME);
+
+	*data_type = 0;
+	*data = ice->rx_pass;
+
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_uint32_t CALC_CAND_PRIO(pj_ice_sess *ice,
+				  pj_ice_cand_type type,
+				  pj_uint32_t local_pref,
+				  pj_uint32_t comp_id)
+{
+    return ((ice->prefs[type] & 0xFF) << 24) + 
+	   ((local_pref & 0xFFFF)    << 8) +
+	   (((256 - comp_id) & 0xFF) << 0);
+}
+
+
+/*
+ * Add ICE candidate
+ */
+PJ_DEF(pj_status_t) pj_ice_sess_add_cand(pj_ice_sess *ice,
+					 unsigned comp_id,
+					 pj_ice_cand_type type,
+					 pj_uint16_t local_pref,
+					 const pj_str_t *foundation,
+					 const pj_sockaddr_t *addr,
+					 const pj_sockaddr_t *base_addr,
+					 const pj_sockaddr_t *rel_addr,
+					 int addr_len,
+					 unsigned *p_cand_id)
+{
+    pj_ice_sess_cand *lcand;
+    pj_status_t status = PJ_SUCCESS;
+    char tmp[128];
+
+    PJ_ASSERT_RETURN(ice && comp_id && local_pref &&
+		     foundation && addr && base_addr && addr_len,
+		     PJ_EINVAL);
+    PJ_ASSERT_RETURN(comp_id <= ice->comp_cnt, PJ_EINVAL);
+
+    pj_mutex_lock(ice->mutex);
+
+    if (ice->lcand_cnt >= PJ_ARRAY_SIZE(ice->lcand)) {
+	status = PJ_ETOOMANY;
+	goto on_error;
+    }
+
+    lcand = &ice->lcand[ice->lcand_cnt];
+    lcand->comp_id = comp_id;
+    lcand->type = type;
+    pj_strdup(ice->pool, &lcand->foundation, foundation);
+    lcand->prio = CALC_CAND_PRIO(ice, type, local_pref, lcand->comp_id);
+    pj_memcpy(&lcand->addr, addr, addr_len);
+    pj_memcpy(&lcand->base_addr, base_addr, addr_len);
+    if (rel_addr)
+	pj_memcpy(&lcand->rel_addr, rel_addr, addr_len);
+    else
+	pj_bzero(&lcand->rel_addr, sizeof(lcand->rel_addr));
+
+
+    pj_ansi_strcpy(tmp, pj_inet_ntoa(lcand->addr.ipv4.sin_addr));
+    LOG4((ice->obj_name, 
+	 "Candidate %d added: comp_id=%d, type=%s, foundation=%.*s, "
+	 "addr=%s:%d, base=%s:%d, prio=0x%x (%u)",
+	 ice->lcand_cnt, 
+	 lcand->comp_id, 
+	 cand_type_names[lcand->type],
+	 (int)lcand->foundation.slen,
+	 lcand->foundation.ptr,
+	 tmp, 
+	 (int)pj_ntohs(lcand->addr.ipv4.sin_port),
+	 pj_inet_ntoa(lcand->base_addr.ipv4.sin_addr),
+	 (int)pj_htons(lcand->base_addr.ipv4.sin_port),
+	 lcand->prio, lcand->prio));
+
+    if (p_cand_id)
+	*p_cand_id = ice->lcand_cnt;
+
+    ++ice->lcand_cnt;
+
+on_error:
+    pj_mutex_unlock(ice->mutex);
+    return status;
+}
+
+
+/* Find default candidate ID for the component */
+PJ_DEF(pj_status_t) pj_ice_sess_find_default_cand(pj_ice_sess *ice,
+						  unsigned comp_id,
+						  int *cand_id)
+{
+    unsigned i;
+
+    PJ_ASSERT_RETURN(ice && comp_id && cand_id, PJ_EINVAL);
+    PJ_ASSERT_RETURN(comp_id <= ice->comp_cnt, PJ_EINVAL);
+
+    *cand_id = -1;
+
+    pj_mutex_lock(ice->mutex);
+
+    /* First find in valid list if we have nominated pair */
+    for (i=0; i<ice->valid_list.count; ++i) {
+	pj_ice_sess_check *check = &ice->valid_list.checks[i];
+	
+	if (check->lcand->comp_id == comp_id) {
+	    *cand_id = GET_LCAND_ID(check->lcand);
+	    pj_mutex_unlock(ice->mutex);
+	    return PJ_SUCCESS;
+	}
+    }
+
+    /* If there's no nominated pair, find relayed candidate */
+    for (i=0; i<ice->lcand_cnt; ++i) {
+	pj_ice_sess_cand *lcand = &ice->lcand[i];
+	if (lcand->comp_id==comp_id &&
+	    lcand->type == PJ_ICE_CAND_TYPE_RELAYED) 
+	{
+	    *cand_id = GET_LCAND_ID(lcand);
+	    pj_mutex_unlock(ice->mutex);
+	    return PJ_SUCCESS;
+	}
+    }
+
+    /* If there's no relayed candidate, find reflexive candidate */
+    for (i=0; i<ice->lcand_cnt; ++i) {
+	pj_ice_sess_cand *lcand = &ice->lcand[i];
+	if (lcand->comp_id==comp_id &&
+	    (lcand->type == PJ_ICE_CAND_TYPE_SRFLX ||
+	     lcand->type == PJ_ICE_CAND_TYPE_PRFLX)) 
+	{
+	    *cand_id = GET_LCAND_ID(lcand);
+	    pj_mutex_unlock(ice->mutex);
+	    return PJ_SUCCESS;
+	}
+    }
+
+    /* Otherwise return host candidate */
+    for (i=0; i<ice->lcand_cnt; ++i) {
+	pj_ice_sess_cand *lcand = &ice->lcand[i];
+	if (lcand->comp_id==comp_id &&
+	    lcand->type == PJ_ICE_CAND_TYPE_HOST) 
+	{
+	    *cand_id = GET_LCAND_ID(lcand);
+	    pj_mutex_unlock(ice->mutex);
+	    return PJ_SUCCESS;
+	}
+    }
+
+    /* Still no candidate is found! :( */
+    pj_mutex_unlock(ice->mutex);
+
+    pj_assert(!"Should have a candidate by now");
+    return PJ_EBUG;
+}
+
+
+#ifndef MIN
+#   define MIN(a,b) (a < b ? a : b)
+#endif
+
+#ifndef MAX
+#   define MAX(a,b) (a > b ? a : b)
+#endif
+
+static pj_timestamp CALC_CHECK_PRIO(const pj_ice_sess *ice, 
+				    const pj_ice_sess_cand *lcand,
+				    const pj_ice_sess_cand *rcand)
+{
+    pj_uint32_t O, A;
+    pj_timestamp prio;
+
+    /* Original formula:
+     *   pair priority = 2^32*MIN(O,A) + 2*MAX(O,A) + (O>A?1:0)
+     */
+
+    if (ice->role == PJ_ICE_SESS_ROLE_CONTROLLING) {
+	O = lcand->prio; 
+	A = rcand->prio;
+    } else {
+	O = rcand->prio;
+	A = lcand->prio;
+    }
+
+    /*
+    return ((pj_uint64_t)1 << 32) * MIN(O, A) +
+	   (pj_uint64_t)2 * MAX(O, A) + (O>A ? 1 : 0);
+    */
+
+    prio.u32.hi = MIN(O,A);
+    prio.u32.lo = (MAX(O, A) << 1) + (O>A ? 1 : 0);
+
+    return prio;
+}
+
+
+PJ_INLINE(int) CMP_CHECK_PRIO(const pj_ice_sess_check *c1,
+			      const pj_ice_sess_check *c2)
+{
+    return pj_cmp_timestamp(&c1->prio, &c2->prio);
+}
+
+
+#if PJ_LOG_MAX_LEVEL >= 4
+static const char *dump_check(char *buffer, unsigned bufsize,
+			      const pj_ice_sess_checklist *clist,
+			      const pj_ice_sess_check *check)
+{
+    const pj_ice_sess_cand *lcand = check->lcand;
+    const pj_ice_sess_cand *rcand = check->rcand;
+    char laddr[CHECK_NAME_LEN];
+    int len;
+
+    pj_ansi_strcpy(laddr, pj_inet_ntoa(lcand->addr.ipv4.sin_addr));
+
+    if (lcand->addr.addr.sa_family == PJ_AF_INET) {
+	len = pj_ansi_snprintf(buffer, bufsize,
+			       "%d: [%d] %s:%d-->%s:%d",
+			       GET_CHECK_ID(clist, check),
+			       check->lcand->comp_id,
+			       laddr, (int)pj_ntohs(lcand->addr.ipv4.sin_port),
+			       pj_inet_ntoa(rcand->addr.ipv4.sin_addr),
+			       (int)pj_ntohs(rcand->addr.ipv4.sin_port));
+    } else {
+	len = pj_ansi_snprintf(buffer, bufsize, "IPv6->IPv6");
+    }
+
+
+    if (len < 0)
+	len = 0;
+    else if (len >= (int)bufsize)
+	len = bufsize - 1;
+
+    buffer[len] = '\0';
+    return buffer;
+}
+
+static void dump_checklist(const char *title, const pj_ice_sess *ice, 
+			   const pj_ice_sess_checklist *clist)
+{
+    unsigned i;
+    char buffer[CHECK_NAME_LEN];
+
+    LOG4((ice->obj_name, "%s", title));
+    for (i=0; i<clist->count; ++i) {
+	const pj_ice_sess_check *c = &clist->checks[i];
+	LOG4((ice->obj_name, " %s (%s, state=%s)",
+	     dump_check(buffer, sizeof(buffer), clist, c),
+	     (c->nominated ? "nominated" : "not nominated"), 
+	     check_state_name[c->state]));
+    }
+}
+
+#else
+#define dump_checklist(title, ice, clist)
+#endif
+
+static void check_set_state(pj_ice_sess *ice, pj_ice_sess_check *check,
+			    pj_ice_sess_check_state st, 
+			    pj_status_t err_code)
+{
+    char buf[CHECK_NAME_LEN];
+
+    pj_assert(check->state < PJ_ICE_SESS_CHECK_STATE_SUCCEEDED);
+
+    LOG5((ice->obj_name, "Check %s: state changed from %s to %s",
+	 dump_check(buf, sizeof(buf), &ice->clist, check),
+	 check_state_name[check->state],
+	 check_state_name[st]));
+    check->state = st;
+    check->err_code = err_code;
+}
+
+static void clist_set_state(pj_ice_sess *ice, pj_ice_sess_checklist *clist,
+			    pj_ice_sess_checklist_state st)
+{
+    if (clist->state != st) {
+	LOG5((ice->obj_name, "Checklist: state changed from %s to %s",
+	     clist_state_name[clist->state],
+	     clist_state_name[st]));
+	clist->state = st;
+    }
+}
+
+/* Sort checklist based on priority */
+static void sort_checklist(pj_ice_sess_checklist *clist)
+{
+    unsigned i;
+
+    for (i=0; i<clist->count-1; ++i) {
+	unsigned j, highest = i;
+	for (j=i+1; j<clist->count; ++j) {
+	    if (CMP_CHECK_PRIO(&clist->checks[j], &clist->checks[highest]) > 0) {
+		highest = j;
+	    }
+	}
+
+	if (highest != i) {
+	    pj_ice_sess_check tmp;
+
+	    pj_memcpy(&tmp, &clist->checks[i], sizeof(pj_ice_sess_check));
+	    pj_memcpy(&clist->checks[i], &clist->checks[highest], 
+		      sizeof(pj_ice_sess_check));
+	    pj_memcpy(&clist->checks[highest], &tmp, 
+		      sizeof(pj_ice_sess_check));
+	}
+    }
+}
+
+enum 
+{ 
+    SOCKADDR_EQUAL = 0, 
+    SOCKADDR_NOT_EQUAL = 1 
+};
+
+/* Utility: compare sockaddr.
+ * Returns 0 if equal.
+ */
+static int sockaddr_cmp(const pj_sockaddr *a1, const pj_sockaddr *a2)
+{
+    if (a1->addr.sa_family != a2->addr.sa_family)
+	return SOCKADDR_NOT_EQUAL;
+
+    if (a1->addr.sa_family == PJ_AF_INET) {
+	return !(a1->ipv4.sin_addr.s_addr == a2->ipv4.sin_addr.s_addr &&
+		 a1->ipv4.sin_port == a2->ipv4.sin_port);
+    } else if (a1->addr.sa_family == PJ_AF_INET6) {
+	return pj_memcmp(&a1->ipv6, &a2->ipv6, sizeof(a1->ipv6));
+    } else {
+	pj_assert(!"Invalid address family!");
+	return SOCKADDR_NOT_EQUAL;
+    }
+}
+
+
+/* Prune checklist, this must have been done after the checklist
+ * is sorted.
+ */
+static pj_status_t prune_checklist(pj_ice_sess *ice, 
+				   pj_ice_sess_checklist *clist)
+{
+    unsigned i;
+
+    /* Since an agent cannot send requests directly from a reflexive
+     * candidate, but only from its base, the agent next goes through the
+     * sorted list of candidate pairs.  For each pair where the local
+     * candidate is server reflexive, the server reflexive candidate MUST be
+     * replaced by its base.  Once this has been done, the agent MUST prune
+     * the list.  This is done by removing a pair if its local and remote
+     * candidates are identical to the local and remote candidates of a pair
+     * higher up on the priority list.  The result is a sequence of ordered
+     * candidate pairs, called the check list for that media stream.    
+     */
+    /* First replace SRFLX candidates with their base */
+    for (i=0; i<clist->count; ++i) {
+	pj_ice_sess_cand *srflx = clist->checks[i].lcand;
+
+	if (clist->checks[i].lcand->type == PJ_ICE_CAND_TYPE_SRFLX) {
+	    /* Find the base for this candidate */
+	    unsigned j;
+	    for (j=0; j<ice->lcand_cnt; ++j) {
+		pj_ice_sess_cand *host = &ice->lcand[j];
+
+		if (host->type != PJ_ICE_CAND_TYPE_HOST)
+		    continue;
+
+		if (sockaddr_cmp(&srflx->base_addr, &host->addr) == 0) {
+		    /* Replace this SRFLX with its BASE */
+		    clist->checks[i].lcand = host;
+		    break;
+		}
+	    }
+
+	    if (j==ice->lcand_cnt) {
+		/* Host candidate not found this this srflx! */
+		LOG4((ice->obj_name, 
+		      "Base candidate %s:%d not found for srflx candidate %d",
+		      pj_inet_ntoa(srflx->base_addr.ipv4.sin_addr),
+		      pj_ntohs(srflx->base_addr.ipv4.sin_port),
+		      GET_LCAND_ID(clist->checks[i].lcand)));
+		return PJNATH_EICENOHOSTCAND;
+	    }
+	}
+    }
+
+    /* Next remove a pair if its local and remote candidates are identical
+     * to the local and remote candidates of a pair higher up on the priority
+     * list
+     */
+    for (i=0; i<clist->count; ++i) {
+	pj_ice_sess_cand *licand = clist->checks[i].lcand;
+	pj_ice_sess_cand *ricand = clist->checks[i].rcand;
+	unsigned j;
+
+	for (j=i+1; j<clist->count;) {
+	    pj_ice_sess_cand *ljcand = clist->checks[j].lcand;
+	    pj_ice_sess_cand *rjcand = clist->checks[j].rcand;
+
+	    if ((licand == ljcand) && (ricand == rjcand)) {
+		/* Found duplicate, remove it */
+		char buf[CHECK_NAME_LEN];
+
+		LOG5((ice->obj_name, "Check %s pruned",
+		     dump_check(buf, sizeof(buf), &ice->clist, 
+			        &clist->checks[j])));
+
+		pj_array_erase(clist->checks, sizeof(clist->checks[0]),
+			       clist->count, j);
+		--clist->count;
+
+	    } else {
+		++j;
+	    }
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+/* This function is called when ICE processing completes */
+static void on_ice_complete(pj_ice_sess *ice, pj_status_t status)
+{
+    if (!ice->is_complete) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+
+	ice->is_complete = PJ_TRUE;
+	ice->ice_status = status;
+    
+	/* Log message */
+	LOG4((ice->obj_name, "ICE process complete, status=%s", 
+	     pj_strerror(status, errmsg, sizeof(errmsg)).ptr));
+
+	dump_checklist("Valid list", ice, &ice->valid_list);
+
+	/* Call callback */
+	if (ice->cb.on_ice_complete) {
+	    (*ice->cb.on_ice_complete)(ice, status);
+	}
+    }
+}
+
+
+/* This function is called when one check completes */
+static pj_bool_t on_check_complete(pj_ice_sess *ice,
+				   pj_ice_sess_check *check)
+{
+    unsigned i;
+
+    pj_assert(check->state >= PJ_ICE_SESS_CHECK_STATE_SUCCEEDED);
+
+    /* 7.1.2.2.2.  Updating Pair States
+     * 
+     * The agent sets the state of the pair that generated the check to
+     * Succeeded.  The success of this check might also cause the state of
+     * other checks to change as well.  The agent MUST perform the following
+     * two steps:
+     * 
+     * 1.  The agent changes the states for all other Frozen pairs for the
+     *     same media stream and same foundation to Waiting.  Typically
+     *     these other pairs will have different component IDs but not
+     *     always.
+     */
+    if (check->err_code==PJ_SUCCESS) {
+	for (i=0; i<ice->clist.count; ++i) {
+	    pj_ice_sess_check *c = &ice->clist.checks[i];
+	    if (pj_strcmp(&c->lcand->foundation, &check->lcand->foundation)==0
+		 && c->state == PJ_ICE_SESS_CHECK_STATE_FROZEN)
+	    {
+		check_set_state(ice, c, PJ_ICE_SESS_CHECK_STATE_WAITING, 0);
+	    }
+	}
+    }
+
+    /* 8.2.  Updating States
+     * 
+     * For both controlling and controlled agents, the state of ICE
+     * processing depends on the presence of nominated candidate pairs in
+     * the valid list and on the state of the check list:
+     *
+     * o  If there are no nominated pairs in the valid list for a media
+     *    stream and the state of the check list is Running, ICE processing
+     *    continues.
+     *
+     * o  If there is at least one nominated pair in the valid list:
+     *
+     *    - The agent MUST remove all Waiting and Frozen pairs in the check
+     *      list for the same component as the nominated pairs for that
+     *      media stream
+     *
+     *    - If an In-Progress pair in the check list is for the same
+     *      component as a nominated pair, the agent SHOULD cease
+     *      retransmissions for its check if its pair priority is lower
+     *      than the lowest priority nominated pair for that component
+     */
+    if (check->err_code==PJ_SUCCESS && check->nominated) {
+	pj_ice_sess_comp *comp;
+	char buf[CHECK_NAME_LEN];
+
+	LOG5((ice->obj_name, "Check %d is successful and nominated",
+	     GET_CHECK_ID(&ice->clist, check)));
+
+	comp = find_comp(ice, check->lcand->comp_id);
+
+	for (i=0; i<ice->clist.count; ++i) {
+
+	    pj_ice_sess_check *c = &ice->clist.checks[i];
+
+	    if (c->lcand->comp_id == check->lcand->comp_id) {
+
+		if (c->state < PJ_ICE_SESS_CHECK_STATE_IN_PROGRESS) {
+
+		    /* Just fail Frozen/Waiting check */
+		    LOG5((ice->obj_name, 
+			 "Check %s to be failed because state is %s",
+			 dump_check(buf, sizeof(buf), &ice->clist, c), 
+			 check_state_name[c->state]));
+		    check_set_state(ice, c, PJ_ICE_SESS_CHECK_STATE_FAILED,
+				    PJ_ECANCELLED);
+
+		} else if (c->state == PJ_ICE_SESS_CHECK_STATE_IN_PROGRESS
+			   && (PJ_ICE_CANCEL_ALL ||
+			        CMP_CHECK_PRIO(c, check) < 0)) {
+
+		    /* State is IN_PROGRESS, cancel transaction */
+		    if (c->tdata) {
+			LOG5((ice->obj_name, 
+			     "Cancelling check %s (In Progress)",
+			     dump_check(buf, sizeof(buf), &ice->clist, c)));
+			pj_stun_session_cancel_req(comp->stun_sess, 
+						   c->tdata, PJ_FALSE, 0);
+			c->tdata = NULL;
+			check_set_state(ice, c, PJ_ICE_SESS_CHECK_STATE_FAILED,
+					PJ_ECANCELLED);
+		    }
+		}
+	    }
+	}
+
+	/* Update the nominated check for the component */
+	if (comp->valid_check == NULL) {
+	    comp->valid_check = check;
+	} else {
+	    if (CMP_CHECK_PRIO(comp->valid_check, check) < 0)
+		comp->valid_check = check;
+	}
+    }
+
+
+    /* Still in 8.2.  Updating States
+     * 
+     * o  Once there is at least one nominated pair in the valid list for
+     *    every component of at least one media stream and the state of the
+     *    check list is Running:
+     *    
+     *    *  The agent MUST change the state of processing for its check
+     *       list for that media stream to Completed.
+     *    
+     *    *  The agent MUST continue to respond to any checks it may still
+     *       receive for that media stream, and MUST perform triggered
+     *       checks if required by the processing of Section 7.2.
+     *    
+     *    *  The agent MAY begin transmitting media for this media stream as
+     *       described in Section 11.1
+     */
+
+    /* See if all components have nominated pair. If they do, then mark
+     * ICE processing as success, otherwise wait.
+     */
+    for (i=0; i<ice->comp_cnt; ++i) {
+	if (ice->comp[i].valid_check == NULL)
+	    break;
+    }
+    if (i == ice->comp_cnt) {
+	/* All components have nominated pair */
+	on_ice_complete(ice, PJ_SUCCESS);
+	return PJ_TRUE;
+    }
+
+    /* Note: this is the stuffs that we don't do in 7.1.2.2.2, since our
+     *       ICE session only supports one media stream for now:
+     * 
+     * 7.1.2.2.2.  Updating Pair States
+     *
+     * 2.  If there is a pair in the valid list for every component of this
+     *     media stream (where this is the actual number of components being
+     *     used, in cases where the number of components signaled in the SDP
+     *     differs from offerer to answerer), the success of this check may
+     *     unfreeze checks for other media streams. 
+     */
+
+    /* 7.1.2.3.  Check List and Timer State Updates
+     * Regardless of whether the check was successful or failed, the
+     * completion of the transaction may require updating of check list and
+     * timer states.
+     * 
+     * If all of the pairs in the check list are now either in the Failed or
+     * Succeeded state, and there is not a pair in the valid list for each
+     * component of the media stream, the state of the check list is set to
+     * Failed.  
+     */
+
+    /* 
+     * See if all checks in the checklist have completed. If we do,
+     * then mark ICE processing as failed.
+     */
+    for (i=0; i<ice->clist.count; ++i) {
+	pj_ice_sess_check *c = &ice->clist.checks[i];
+	if (c->state < PJ_ICE_SESS_CHECK_STATE_SUCCEEDED) {
+	    break;
+	}
+    }
+
+    if (i == ice->clist.count) {
+	/* All checks have completed, but we don't have nominated pair.
+	 * If agent's role is controlled, check if all components have
+	 * valid pair. If it does, this means the controlled agent has
+	 * finished the check list early and it's waiting for controlling
+	 * agent to send a check with USE-CANDIDATE flag set.
+	 */
+	if (ice->role == PJ_ICE_SESS_ROLE_CONTROLLED) {
+	    unsigned comp_id;
+	    for (comp_id=1; comp_id <= ice->comp_cnt; ++comp_id) {
+		unsigned j;
+		for (j=0; j<ice->valid_list.count; ++j) {
+		    pj_ice_sess_check *vc = &ice->valid_list.checks[j];
+		    if (vc->lcand->comp_id == comp_id)
+			break;
+		}
+		if (j == ice->valid_list.count)
+		    break;
+	    }
+
+	    if (comp_id <= ice->comp_cnt) {
+		/* This component ID doesn't have valid pair.
+		 * Mark ICE as failed. 
+		 */
+		on_ice_complete(ice, PJNATH_EICEFAILED);
+		return PJ_TRUE;
+	    } else {
+		/* All components have a valid pair.
+		 * We should wait until we receive nominated checks.
+		 */
+		return PJ_FALSE;
+	    }
+	}
+
+	on_ice_complete(ice, PJNATH_EICEFAILED);
+	return PJ_TRUE;
+    }
+
+    /* We still have checks to perform */
+    return PJ_FALSE;
+}
+
+
+
+/* Create checklist by pairing local candidates with remote candidates */
+PJ_DEF(pj_status_t) 
+pj_ice_sess_create_check_list(pj_ice_sess *ice,
+			      const pj_str_t *rem_ufrag,
+			      const pj_str_t *rem_passwd,
+			      unsigned rcand_cnt,
+			      const pj_ice_sess_cand rcand[])
+{
+    pj_ice_sess_checklist *clist;
+    char buf[128];
+    pj_str_t username;
+    timer_data *td;
+    unsigned i, j;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(ice && rem_ufrag && rem_passwd && rcand_cnt && rcand,
+		     PJ_EINVAL);
+    PJ_ASSERT_RETURN(rcand_cnt + ice->rcand_cnt <= PJ_ICE_MAX_CAND, 
+		     PJ_ETOOMANY);
+
+    pj_mutex_lock(ice->mutex);
+
+    /* Save credentials */
+    username.ptr = buf;
+
+    pj_strcpy(&username, rem_ufrag);
+    pj_strcat2(&username, ":");
+    pj_strcat(&username, &ice->rx_ufrag);
+
+    pj_strdup(ice->pool, &ice->tx_uname, &username);
+    pj_strdup(ice->pool, &ice->tx_ufrag, rem_ufrag);
+    pj_strdup(ice->pool, &ice->tx_pass, rem_passwd);
+
+    pj_strcpy(&username, &ice->rx_ufrag);
+    pj_strcat2(&username, ":");
+    pj_strcat(&username, rem_ufrag);
+
+    pj_strdup(ice->pool, &ice->rx_uname, &username);
+
+
+    /* Save remote candidates */
+    ice->rcand_cnt = 0;
+    for (i=0; i<rcand_cnt; ++i) {
+	pj_ice_sess_cand *cn = &ice->rcand[ice->rcand_cnt];
+
+	/* Ignore candidate which has no matching component ID */
+	if (rcand[i].comp_id==0 || rcand[i].comp_id > ice->comp_cnt) {
+	    continue;
+	}
+
+	pj_memcpy(cn, &rcand[i], sizeof(pj_ice_sess_cand));
+	pj_strdup(ice->pool, &cn->foundation, &rcand[i].foundation);
+	ice->rcand_cnt++;
+    }
+
+    /* Generate checklist */
+    clist = &ice->clist;
+    for (i=0; i<ice->lcand_cnt; ++i) {
+	for (j=0; j<ice->rcand_cnt; ++j) {
+
+	    pj_ice_sess_cand *lcand = &ice->lcand[i];
+	    pj_ice_sess_cand *rcand = &ice->rcand[j];
+	    pj_ice_sess_check *chk = &clist->checks[clist->count];
+
+	    if (clist->count >= PJ_ICE_MAX_CHECKS) {
+		pj_mutex_unlock(ice->mutex);
+		return PJ_ETOOMANY;
+	    } 
+
+	    /* A local candidate is paired with a remote candidate if
+	     * and only if the two candidates have the same component ID 
+	     * and have the same IP address version. 
+	     */
+	    if ((lcand->comp_id != rcand->comp_id) ||
+		(lcand->addr.addr.sa_family != rcand->addr.addr.sa_family))
+	    {
+		continue;
+	    }
+
+
+	    chk->lcand = lcand;
+	    chk->rcand = rcand;
+	    chk->state = PJ_ICE_SESS_CHECK_STATE_FROZEN;
+
+	    chk->prio = CALC_CHECK_PRIO(ice, lcand, rcand);
+
+	    clist->count++;
+	}
+    }
+
+    /* Sort checklist based on priority */
+    sort_checklist(clist);
+
+    /* Prune the checklist */
+    status = prune_checklist(ice, clist);
+    if (status != PJ_SUCCESS) {
+	pj_mutex_unlock(ice->mutex);
+	return status;
+    }
+
+    /* Init timer entry in the checklist. Initially the timer ID is FALSE
+     * because timer is not running.
+     */
+    clist->timer.id = PJ_FALSE;
+    td = PJ_POOL_ZALLOC_T(ice->pool, timer_data);
+    td->ice = ice;
+    td->clist = clist;
+    clist->timer.user_data = (void*)td;
+    clist->timer.cb = &periodic_timer;
+
+
+    /* Log checklist */
+    dump_checklist("Checklist created:", ice, clist);
+
+    pj_mutex_unlock(ice->mutex);
+
+    return PJ_SUCCESS;
+}
+
+
+/* This is the data that will be attached as user data to outgoing
+ * STUN requests, and it will be given back when we receive completion
+ * status of the request.
+ */
+struct req_data
+{
+    pj_ice_sess		    *ice;
+    pj_ice_sess_checklist   *clist;
+    unsigned		     ckid;
+};
+
+
+/* Perform check on the specified candidate pair */
+static pj_status_t perform_check(pj_ice_sess *ice, 
+				 pj_ice_sess_checklist *clist,
+				 unsigned check_id)
+{
+    pj_ice_sess_comp *comp;
+    struct req_data *rd;
+    pj_ice_sess_check *check;
+    const pj_ice_sess_cand *lcand;
+    const pj_ice_sess_cand *rcand;
+    pj_uint32_t prio;
+    char buffer[128];
+    pj_status_t status;
+
+    check = &clist->checks[check_id];
+    lcand = check->lcand;
+    rcand = check->rcand;
+    comp = find_comp(ice, lcand->comp_id);
+
+    LOG5((ice->obj_name, 
+	 "Sending connectivity check for check %s", 
+	 dump_check(buffer, sizeof(buffer), clist, check)));
+
+    /* Create request */
+    status = pj_stun_session_create_req(comp->stun_sess, 
+					PJ_STUN_BINDING_REQUEST, 
+					NULL, &check->tdata);
+    if (status != PJ_SUCCESS) {
+	pjnath_perror(ice->obj_name, "Error creating STUN request", status);
+	return status;
+    }
+
+    /* Attach data to be retrieved later when STUN request transaction
+     * completes and on_stun_request_complete() callback is called.
+     */
+    rd = PJ_POOL_ZALLOC_T(check->tdata->pool, struct req_data);
+    rd->ice = ice;
+    rd->clist = clist;
+    rd->ckid = check_id;
+    check->tdata->user_data = (void*) rd;
+
+    /* Add PRIORITY */
+    prio = CALC_CAND_PRIO(ice, PJ_ICE_CAND_TYPE_PRFLX, 65535, 
+			  lcand->comp_id);
+    pj_stun_msg_add_uint_attr(check->tdata->pool, check->tdata->msg, 
+			      PJ_STUN_ATTR_PRIORITY, prio);
+
+    /* Add USE-CANDIDATE and set this check to nominated.
+     * Also add ICE-CONTROLLING or ICE-CONTROLLED
+     */
+    if (ice->role == PJ_ICE_SESS_ROLE_CONTROLLING) {
+	pj_stun_msg_add_empty_attr(check->tdata->pool, check->tdata->msg, 
+				   PJ_STUN_ATTR_USE_CANDIDATE);
+	check->nominated = PJ_TRUE;
+
+	pj_stun_msg_add_uint64_attr(check->tdata->pool, check->tdata->msg, 
+				    PJ_STUN_ATTR_ICE_CONTROLLING,
+				    &ice->tie_breaker);
+
+    } else {
+	pj_stun_msg_add_uint64_attr(check->tdata->pool, check->tdata->msg, 
+				    PJ_STUN_ATTR_ICE_CONTROLLED,
+				    &ice->tie_breaker);
+    }
+
+
+    /* Note that USERNAME and MESSAGE-INTEGRITY will be added by the 
+     * STUN session.
+     */
+
+    /* Initiate STUN transaction to send the request */
+    status = pj_stun_session_send_msg(comp->stun_sess, PJ_FALSE, 
+				      &rcand->addr, 
+				      sizeof(pj_sockaddr_in), check->tdata);
+    if (status != PJ_SUCCESS) {
+	check->tdata = NULL;
+	pjnath_perror(ice->obj_name, "Error sending STUN request", status);
+	return status;
+    }
+
+    check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_IN_PROGRESS, 
+	            PJ_SUCCESS);
+    return PJ_SUCCESS;
+}
+
+
+/* Start periodic check for the specified checklist.
+ * This callback is called by timer on every Ta (20msec by default)
+ */
+static pj_status_t start_periodic_check(pj_timer_heap_t *th, 
+					pj_timer_entry *te)
+{
+    timer_data *td;
+    pj_ice_sess *ice;
+    pj_ice_sess_checklist *clist;
+    unsigned i, start_count=0;
+    pj_status_t status;
+
+    td = (struct timer_data*) te->user_data;
+    ice = td->ice;
+    clist = td->clist;
+
+    pj_mutex_lock(ice->mutex);
+
+    /* Set timer ID to FALSE first */
+    te->id = PJ_FALSE;
+
+    /* Set checklist state to Running */
+    clist_set_state(ice, clist, PJ_ICE_SESS_CHECKLIST_ST_RUNNING);
+
+    LOG5((ice->obj_name, "Starting checklist periodic check"));
+
+    /* Send STUN Binding request for check with highest priority on
+     * Waiting state.
+     */
+    for (i=0; i<clist->count; ++i) {
+	pj_ice_sess_check *check = &clist->checks[i];
+
+	if (check->state == PJ_ICE_SESS_CHECK_STATE_WAITING) {
+	    status = perform_check(ice, clist, i);
+	    if (status != PJ_SUCCESS) {
+		pj_mutex_unlock(ice->mutex);
+		return status;
+	    }
+
+	    ++start_count;
+	    break;
+	}
+    }
+
+    /* If we don't have anything in Waiting state, perform check to
+     * highest priority pair that is in Frozen state.
+     */
+    if (start_count==0) {
+	for (i=0; i<clist->count; ++i) {
+	    pj_ice_sess_check *check = &clist->checks[i];
+
+	    if (check->state == PJ_ICE_SESS_CHECK_STATE_FROZEN) {
+		status = perform_check(ice, clist, i);
+		if (status != PJ_SUCCESS) {
+		    pj_mutex_unlock(ice->mutex);
+		    return status;
+		}
+
+		++start_count;
+		break;
+	    }
+	}
+    }
+
+    /* Cannot start check because there's no suitable candidate pair.
+     * Set checklist state to Completed.
+     */
+    if (start_count==0) {
+	clist_set_state(ice, clist, PJ_ICE_SESS_CHECKLIST_ST_COMPLETED);
+
+    } else {
+	/* Schedule for next timer */
+	pj_time_val timeout = {0, PJ_ICE_TA_VAL};
+
+	te->id = PJ_TRUE;
+	pj_time_val_normalize(&timeout);
+	pj_timer_heap_schedule(th, te, &timeout);
+    }
+
+    pj_mutex_unlock(ice->mutex);
+    return PJ_SUCCESS;
+}
+
+
+/* Timer callback to perform periodic check */
+static void periodic_timer(pj_timer_heap_t *th, 
+			   pj_timer_entry *te)
+{
+    start_periodic_check(th, te);
+}
+
+
+/* Utility: find string in string array */
+const pj_str_t *find_str(const pj_str_t *strlist[], unsigned count,
+			 const pj_str_t *str)
+{
+    unsigned i;
+    for (i=0; i<count; ++i) {
+	if (pj_strcmp(strlist[i], str)==0)
+	    return strlist[i];
+    }
+    return NULL;
+}
+
+
+/*
+ * Start ICE periodic check. This function will return immediately, and
+ * application will be notified about the connectivity check status in
+ * #pj_ice_sess_cb callback.
+ */
+PJ_DEF(pj_status_t) pj_ice_sess_start_check(pj_ice_sess *ice)
+{
+    pj_ice_sess_checklist *clist;
+    const pj_ice_sess_cand *cand0;
+    const pj_str_t *flist[PJ_ICE_MAX_CAND];
+    pj_ice_rx_check *rcheck;
+    unsigned i, flist_cnt = 0;
+
+    PJ_ASSERT_RETURN(ice, PJ_EINVAL);
+
+    /* Checklist must have been created */
+    PJ_ASSERT_RETURN(ice->clist.count > 0, PJ_EINVALIDOP);
+
+    LOG4((ice->obj_name, "Starting ICE check.."));
+
+    /* The agent examines the check list for the first media stream (a
+     * media stream is the first media stream when it is described by
+     * the first m-line in the SDP offer and answer).  For that media
+     * stream, it:
+     * 
+     * -  Groups together all of the pairs with the same foundation,
+     * 
+     * -  For each group, sets the state of the pair with the lowest
+     *    component ID to Waiting.  If there is more than one such pair,
+     *    the one with the highest priority is used.
+     */
+
+    clist = &ice->clist;
+
+    /* Pickup the first pair for component 1. */
+    for (i=0; i<clist->count; ++i) {
+	if (clist->checks[i].lcand->comp_id == 1)
+	    break;
+    }
+    if (i == clist->count) {
+	pj_assert(!"Unable to find checklist for component 1");
+	return PJNATH_EICEINCOMPID;
+    }
+
+    /* Set this check to WAITING */
+    check_set_state(ice, &clist->checks[i], 
+		    PJ_ICE_SESS_CHECK_STATE_WAITING, PJ_SUCCESS);
+    cand0 = clist->checks[i].lcand;
+    flist[flist_cnt++] = &clist->checks[i].lcand->foundation;
+
+    /* Find all of the other pairs in that check list with the same
+     * component ID, but different foundations, and sets all of their
+     * states to Waiting as well.
+     */
+    for (++i; i<clist->count; ++i) {
+	const pj_ice_sess_cand *cand1;
+
+	cand1 = clist->checks[i].lcand;
+
+	if (cand1->comp_id==cand0->comp_id &&
+	    find_str(flist, flist_cnt, &cand1->foundation)==NULL)
+	{
+	    check_set_state(ice, &clist->checks[i], 
+			    PJ_ICE_SESS_CHECK_STATE_WAITING, PJ_SUCCESS);
+	    flist[flist_cnt++] = &cand1->foundation;
+	}
+    }
+
+    /* First, perform all pending triggered checks, simultaneously. */
+    rcheck = ice->early_check.next;
+    while (rcheck != &ice->early_check) {
+	LOG4((ice->obj_name, 
+	      "Performing delayed triggerred check for component %d",
+	      rcheck->comp_id));
+	handle_incoming_check(ice, rcheck);
+	rcheck = rcheck->next;
+    }
+    pj_list_init(&ice->early_check);
+
+    /* Start periodic check */
+    return start_periodic_check(ice->stun_cfg.timer_heap, &clist->timer);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/* Callback called by STUN session to send the STUN message.
+ * STUN session also doesn't have a transport, remember?!
+ */
+static pj_status_t on_stun_send_msg(pj_stun_session *sess,
+				    const void *pkt,
+				    pj_size_t pkt_size,
+				    const pj_sockaddr_t *dst_addr,
+				    unsigned addr_len)
+{
+    stun_data *sd = (stun_data*) pj_stun_session_get_user_data(sess);
+    pj_ice_sess *ice = sd->ice;
+    return (*ice->cb.on_tx_pkt)(ice, sd->comp_id, 
+				pkt, pkt_size, 
+				dst_addr, addr_len);
+}
+
+
+/* This callback is called when outgoing STUN request completed */
+static void on_stun_request_complete(pj_stun_session *stun_sess,
+				     pj_status_t status,
+				     pj_stun_tx_data *tdata,
+				     const pj_stun_msg *response,
+				     const pj_sockaddr_t *src_addr,
+				     unsigned src_addr_len)
+{
+    struct req_data *rd = (struct req_data*) tdata->user_data;
+    pj_ice_sess *ice;
+    pj_ice_sess_check *check, *new_check;
+    pj_ice_sess_cand *lcand;
+    pj_ice_sess_checklist *clist;
+    pj_stun_xor_mapped_addr_attr *xaddr;
+    char buffer[CHECK_NAME_LEN];
+    unsigned i;
+
+    PJ_UNUSED_ARG(stun_sess);
+    PJ_UNUSED_ARG(src_addr_len);
+
+    ice = rd->ice;
+    check = &rd->clist->checks[rd->ckid];
+    clist = rd->clist;
+
+    /* Mark STUN transaction as complete */
+    pj_assert(tdata == check->tdata);
+    check->tdata = NULL;
+
+    pj_mutex_lock(ice->mutex);
+
+    /* Init lcand to NULL. lcand will be found from the mapped address
+     * found in the response.
+     */
+    lcand = NULL;
+
+    if (status != PJ_SUCCESS) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+
+	if (status==PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_ROLE_CONFLICT)) {
+
+	    /* Role conclict response.
+	     *
+	     * 7.1.2.1.  Failure Cases:
+	     *
+	     * If the request had contained the ICE-CONTROLLED attribute, 
+	     * the agent MUST switch to the controlling role if it has not
+	     * already done so.  If the request had contained the 
+	     * ICE-CONTROLLING attribute, the agent MUST switch to the 
+	     * controlled role if it has not already done so.  Once it has
+	     * switched, the agent MUST immediately retry the request with
+	     * the ICE-CONTROLLING or ICE-CONTROLLED attribute reflecting 
+	     * its new role.
+	     */
+	    pj_ice_sess_role new_role = PJ_ICE_SESS_ROLE_UNKNOWN;
+	    pj_stun_msg *req = tdata->msg;
+
+	    if (pj_stun_msg_find_attr(req, PJ_STUN_ATTR_ICE_CONTROLLING, 0)) {
+		new_role = PJ_ICE_SESS_ROLE_CONTROLLED;
+	    } else if (pj_stun_msg_find_attr(req, PJ_STUN_ATTR_ICE_CONTROLLED, 
+					     0)) {
+		new_role = PJ_ICE_SESS_ROLE_CONTROLLING;
+	    } else {
+		pj_assert(!"We should have put CONTROLLING/CONTROLLED attr!");
+		new_role = PJ_ICE_SESS_ROLE_CONTROLLED;
+	    }
+
+	    if (new_role != ice->role) {
+		LOG4((ice->obj_name, 
+		      "Changing role because of role conflict response"));
+		pj_ice_sess_change_role(ice, new_role);
+	    }
+
+	    /* Resend request */
+	    LOG4((ice->obj_name, "Resending check because of role conflict"));
+	    check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_WAITING, 0);
+	    perform_check(ice, clist, rd->ckid);
+	    pj_mutex_unlock(ice->mutex);
+	    return;
+	}
+
+	pj_strerror(status, errmsg, sizeof(errmsg));
+	LOG4((ice->obj_name, 
+	     "Check %s%s: connectivity check FAILED: %s",
+	     dump_check(buffer, sizeof(buffer), &ice->clist, check),
+	     (check->nominated ? " (nominated)" : " (not nominated)"),
+	     errmsg));
+
+	check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_FAILED, status);
+	on_check_complete(ice, check);
+	pj_mutex_unlock(ice->mutex);
+	return;
+    }
+
+
+    /* 7.1.2.1.  Failure Cases
+     *
+     * The agent MUST check that the source IP address and port of the
+     * response equals the destination IP address and port that the Binding
+     * Request was sent to, and that the destination IP address and port of
+     * the response match the source IP address and port that the Binding
+     * Request was sent from.
+     */
+    if (sockaddr_cmp(&check->rcand->addr, src_addr) != 0) {
+	status = PJNATH_EICEINSRCADDR;
+	LOG4((ice->obj_name, 
+	     "Check %s%s: connectivity check FAILED: source address mismatch",
+	     dump_check(buffer, sizeof(buffer), &ice->clist, check),
+	     (check->nominated ? " (nominated)" : " (not nominated)")));
+	check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_FAILED, status);
+	on_check_complete(ice, check);
+	pj_mutex_unlock(ice->mutex);
+	return;
+    }
+
+    /* 7.1.2.2.  Success Cases
+     * 
+     * A check is considered to be a success if all of the following are
+     * true:
+     * 
+     * o  the STUN transaction generated a success response
+     * 
+     * o  the source IP address and port of the response equals the
+     *    destination IP address and port that the Binding Request was sent
+     *    to
+     * 
+     * o  the destination IP address and port of the response match the
+     *    source IP address and port that the Binding Request was sent from
+     */
+
+
+    LOG4((ice->obj_name, 
+	 "Check %s%s: connectivity check SUCCESS",
+	 dump_check(buffer, sizeof(buffer), &ice->clist, check),
+	 (check->nominated ? " (nominated)" : " (not nominated)")));
+
+    /* Get the STUN XOR-MAPPED-ADDRESS attribute. */
+    xaddr = (pj_stun_xor_mapped_addr_attr*)
+	    pj_stun_msg_find_attr(response, PJ_STUN_ATTR_XOR_MAPPED_ADDR,0);
+    if (!xaddr) {
+	check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_FAILED, 
+			PJNATH_ESTUNNOMAPPEDADDR);
+	on_check_complete(ice, check);
+	pj_mutex_unlock(ice->mutex);
+	return;
+    }
+
+    /* Find local candidate that matches the XOR-MAPPED-ADDRESS */
+    pj_assert(lcand == NULL);
+    for (i=0; i<ice->lcand_cnt; ++i) {
+	if (sockaddr_cmp(&xaddr->sockaddr, &ice->lcand[i].addr) == 0) {
+	    /* Match */
+	    lcand = &ice->lcand[i];
+	    break;
+	}
+    }
+
+    /* 7.1.2.2.1.  Discovering Peer Reflexive Candidates
+     * If the transport address returned in XOR-MAPPED-ADDRESS does not match
+     * any of the local candidates that the agent knows about, the mapped 
+     * address represents a new candidate - a peer reflexive candidate.
+     */
+    if (lcand == NULL) {
+	unsigned cand_id;
+	pj_str_t foundation;
+
+	pj_ice_calc_foundation(ice->pool, &foundation, PJ_ICE_CAND_TYPE_PRFLX,
+			       &check->lcand->base_addr);
+
+	/* Still in 7.1.2.2.1.  Discovering Peer Reflexive Candidates
+	 * Its priority is set equal to the value of the PRIORITY attribute
+         * in the Binding Request.
+	 *
+	 * I think the priority calculated by add_cand() should be the same
+	 * as the one calculated in perform_check(), so there's no need to
+	 * get the priority from the PRIORITY attribute.
+	 */
+
+	/* Add new peer reflexive candidate */
+	status = pj_ice_sess_add_cand(ice, lcand->comp_id, 
+				      PJ_ICE_CAND_TYPE_PRFLX,
+				      65535, &foundation,
+				      &xaddr->sockaddr, 
+				      &check->lcand->base_addr, NULL,
+				      sizeof(pj_sockaddr_in), &cand_id);
+	if (status != PJ_SUCCESS) {
+	    check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_FAILED, 
+			    status);
+	    on_check_complete(ice, check);
+	    pj_mutex_unlock(ice->mutex);
+	    return;
+	}
+
+	/* Update local candidate */
+	lcand = &ice->lcand[cand_id];
+
+    }
+
+    /* 7.1.2.2.3.  Constructing a Valid Pair
+     * Next, the agent constructs a candidate pair whose local candidate
+     * equals the mapped address of the response, and whose remote candidate
+     * equals the destination address to which the request was sent.    
+     */
+
+    /* Add pair to valid list */
+    pj_assert(ice->valid_list.count < PJ_ICE_MAX_CHECKS);
+    new_check = &ice->valid_list.checks[ice->valid_list.count++];
+    new_check->lcand = lcand;
+    new_check->rcand = check->rcand;
+    new_check->prio = CALC_CHECK_PRIO(ice, lcand, check->rcand);
+    new_check->state = PJ_ICE_SESS_CHECK_STATE_SUCCEEDED;
+    new_check->nominated = check->nominated;
+    new_check->err_code = PJ_SUCCESS;
+
+    /* Sort valid_list */
+    sort_checklist(&ice->valid_list);
+
+
+    /* 7.1.2.2.2.  Updating Pair States
+     * 
+     * The agent sets the state of the pair that generated the check to
+     * Succeeded.  The success of this check might also cause the state of
+     * other checks to change as well.
+     */
+    check_set_state(ice, check, PJ_ICE_SESS_CHECK_STATE_SUCCEEDED, 
+		    PJ_SUCCESS);
+
+    /* Perform 7.1.2.2.2.  Updating Pair States.
+     * This may terminate ICE processing.
+     */
+    if (on_check_complete(ice, check)) {
+	/* ICE complete! */
+	pj_mutex_unlock(ice->mutex);
+	return;
+    }
+
+    pj_mutex_unlock(ice->mutex);
+}
+
+
+/* This callback is called by the STUN session associated with a candidate
+ * when it receives incoming request.
+ */
+static pj_status_t on_stun_rx_request(pj_stun_session *sess,
+				      const pj_uint8_t *pkt,
+				      unsigned pkt_len,
+				      const pj_stun_msg *msg,
+				      const pj_sockaddr_t *src_addr,
+				      unsigned src_addr_len)
+{
+    stun_data *sd;
+    pj_ice_sess *ice;
+    pj_stun_priority_attr *prio_attr;
+    pj_stun_use_candidate_attr *uc_attr;
+    pj_stun_uint64_attr *role_attr;
+    pj_stun_tx_data *tdata;
+    pj_ice_rx_check *rcheck, tmp_rcheck;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(pkt);
+    PJ_UNUSED_ARG(pkt_len);
+
+    /* Reject any requests except Binding request */
+    if (msg->hdr.type != PJ_STUN_BINDING_REQUEST) {
+	status = pj_stun_session_create_response(sess, msg, 
+						 PJ_STUN_SC_BAD_REQUEST,
+						 NULL, &tdata);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	return pj_stun_session_send_msg(sess, PJ_TRUE, 
+					src_addr, src_addr_len, tdata);
+    }
+
+
+    sd = (stun_data*) pj_stun_session_get_user_data(sess);
+    ice = sd->ice;
+
+    pj_mutex_lock(ice->mutex);
+
+    /*
+     * Note:
+     *  Be aware that when STUN request is received, we might not get
+     *  SDP answer yet, so we might not have remote candidates and
+     *  checklist yet. This case will be handled after we send
+     *  a response.
+     */
+
+    /* Get PRIORITY attribute */
+    prio_attr = (pj_stun_priority_attr*)
+	        pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_PRIORITY, 0);
+    if (prio_attr == NULL) {
+	LOG5((ice->obj_name, "Received Binding request with no PRIORITY"));
+	pj_mutex_unlock(ice->mutex);
+	return PJ_SUCCESS;
+    }
+
+    /* Get USE-CANDIDATE attribute */
+    uc_attr = (pj_stun_use_candidate_attr*)
+	      pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_USE_CANDIDATE, 0);
+
+
+    /* Get ICE-CONTROLLING or ICE-CONTROLLED */
+    role_attr = (pj_stun_uint64_attr*)
+	        pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_ICE_CONTROLLING, 0);
+    if (role_attr == NULL) {
+	role_attr = (pj_stun_uint64_attr*)
+	            pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_ICE_CONTROLLED, 0);
+    }
+
+    /* 7.2.1.1.  Detecting and Repairing Role Conflicts
+     */
+    if (ice->role == PJ_ICE_SESS_ROLE_CONTROLLING &&
+	role_attr && role_attr->hdr.type == PJ_STUN_ATTR_ICE_CONTROLLING)
+    {
+	if (pj_cmp_timestamp(&ice->tie_breaker, &role_attr->value) < 0) {
+	    /* Switch role to controlled */
+	    LOG4((ice->obj_name, 
+		  "Changing role because of ICE-CONTROLLING attribute"));
+	    pj_ice_sess_change_role(ice, PJ_ICE_SESS_ROLE_CONTROLLED);
+	} else {
+	    /* Generate 487 response */
+	    status = pj_stun_session_create_response(sess, msg, 
+					             PJ_STUN_SC_ROLE_CONFLICT,
+						     NULL, &tdata);
+	    if (status == PJ_SUCCESS) {
+		pj_stun_session_send_msg(sess, PJ_TRUE, 
+				         src_addr, src_addr_len, tdata);
+	    }
+	    pj_mutex_unlock(ice->mutex);
+	    return PJ_SUCCESS;
+	}
+
+    } else if (ice->role == PJ_ICE_SESS_ROLE_CONTROLLED &&
+	       role_attr && role_attr->hdr.type == PJ_STUN_ATTR_ICE_CONTROLLED)
+    {
+	if (pj_cmp_timestamp(&ice->tie_breaker, &role_attr->value) < 0) {
+	    /* Generate 487 response */
+	    status = pj_stun_session_create_response(sess, msg, 
+					             PJ_STUN_SC_ROLE_CONFLICT,
+						     NULL, &tdata);
+	    if (status == PJ_SUCCESS) {
+		pj_stun_session_send_msg(sess, PJ_TRUE, 
+				         src_addr, src_addr_len, tdata);
+	    }
+	    pj_mutex_unlock(ice->mutex);
+	    return PJ_SUCCESS;
+	} else {
+	    /* Switch role to controlled */
+	    LOG4((ice->obj_name, 
+		  "Changing role because of ICE-CONTROLLED attribute"));
+	    pj_ice_sess_change_role(ice, PJ_ICE_SESS_ROLE_CONTROLLING);
+	}
+    }
+
+    /* Handle the case when request comes before answer is received.
+     * We need to put credential in the response, and since we haven't
+     * got the response, copy the username from the request.
+     */
+    if (ice->rcand_cnt == 0) {
+	pj_stun_string_attr *uname_attr;
+
+	uname_attr = (pj_stun_string_attr*)
+		     pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_USERNAME, 0);
+	pj_assert(uname_attr != NULL);
+	pj_strdup(ice->pool, &ice->rx_uname, &uname_attr->value);
+    }
+
+    /* 
+     * First send response to this request 
+     */
+    status = pj_stun_session_create_response(sess, msg, 0, NULL, &tdata);
+    if (status != PJ_SUCCESS) {
+	pj_mutex_unlock(ice->mutex);
+	return status;
+    }
+
+    status = pj_stun_msg_add_sockaddr_attr(tdata->pool, tdata->msg, 
+					   PJ_STUN_ATTR_XOR_MAPPED_ADDR,
+					   PJ_TRUE, src_addr, src_addr_len);
+
+    status = pj_stun_session_send_msg(sess, PJ_TRUE, 
+				      src_addr, src_addr_len, tdata);
+
+
+    /* 
+     * Handling early check.
+     *
+     * It's possible that we receive this request before we receive SDP
+     * answer. In this case, we can't perform trigger check since we
+     * don't have checklist yet, so just save this check in a pending
+     * triggered check array to be acted upon later.
+     */
+    if (ice->rcand_cnt == 0) {
+	rcheck = PJ_POOL_ZALLOC_T(ice->pool, pj_ice_rx_check);
+    } else {
+	rcheck = &tmp_rcheck;
+    }
+
+    /* Init rcheck */
+    rcheck->comp_id = sd->comp_id;
+    rcheck->src_addr_len = src_addr_len;
+    pj_memcpy(&rcheck->src_addr, src_addr, src_addr_len);
+    rcheck->use_candidate = (uc_attr != NULL);
+    rcheck->priority = prio_attr->value;
+    rcheck->role_attr = role_attr;
+
+    if (ice->rcand_cnt == 0) {
+	/* We don't have answer yet, so keep this request for later */
+	LOG4((ice->obj_name, "Received an early check for comp %d",
+	      rcheck->comp_id));
+	pj_list_push_back(&ice->early_check, rcheck);
+    } else {
+	/* Handle this check */
+	handle_incoming_check(ice, rcheck);
+    }
+
+    pj_mutex_unlock(ice->mutex);
+    return PJ_SUCCESS;
+}
+
+
+/* Handle incoming Binding request and perform triggered check.
+ * This function may be called by on_stun_rx_request(), or when
+ * SDP answer is received and we have received early checks.
+ */
+static void handle_incoming_check(pj_ice_sess *ice,
+				  const pj_ice_rx_check *rcheck)
+{
+    pj_ice_sess_comp *comp;
+    pj_ice_sess_cand *lcand = NULL;
+    pj_ice_sess_cand *rcand;
+    unsigned i;
+    pj_bool_t is_relayed;
+
+    comp = find_comp(ice, rcheck->comp_id);
+
+    /* Find remote candidate based on the source transport address of 
+     * the request.
+     */
+    for (i=0; i<ice->rcand_cnt; ++i) {
+	if (sockaddr_cmp(&rcheck->src_addr, &ice->rcand[i].addr)==0)
+	    break;
+    }
+
+    /* 7.2.1.3.  Learning Peer Reflexive Candidates
+     * If the source transport address of the request does not match any
+     * existing remote candidates, it represents a new peer reflexive remote
+     * candidate.
+     */
+    if (i == ice->rcand_cnt) {
+	rcand = &ice->rcand[ice->rcand_cnt++];
+	rcand->comp_id = rcheck->comp_id;
+	rcand->type = PJ_ICE_CAND_TYPE_PRFLX;
+	rcand->prio = rcheck->priority;
+	pj_memcpy(&rcand->addr, &rcheck->src_addr, rcheck->src_addr_len);
+
+	/* Foundation is random, unique from other foundation */
+	rcand->foundation.ptr = pj_pool_alloc(ice->pool, 36);
+	rcand->foundation.slen = pj_ansi_snprintf(rcand->foundation.ptr, 36,
+						  "f%p", 
+						  rcand->foundation.ptr);
+
+	LOG4((ice->obj_name, 
+	     "Added new remote candidate from the request: %s:%d",
+	     pj_inet_ntoa(rcand->addr.ipv4.sin_addr),
+	     (int)pj_ntohs(rcand->addr.ipv4.sin_port)));
+
+    } else {
+	/* Remote candidate found */
+	rcand = &ice->rcand[i];
+    }
+
+#if 0
+    /* Find again the local candidate by matching the base address
+     * with the local candidates in the checklist. Checks may have
+     * been pruned before, so it's possible that if we use the lcand
+     * as it is, we wouldn't be able to find the check in the checklist
+     * and we will end up creating a new check unnecessarily.
+     */
+    for (i=0; i<ice->clist.count; ++i) {
+	pj_ice_sess_check *c = &ice->clist.checks[i];
+	if (/*c->lcand == lcand ||*/
+	    sockaddr_cmp(&c->lcand->base_addr, &lcand->base_addr)==0)
+	{
+	    lcand = c->lcand;
+	    break;
+	}
+    }
+#else
+    /* Just get candidate with the highest priority for the specified 
+     * component ID in the checklist.
+     */
+    for (i=0; i<ice->clist.count; ++i) {
+	pj_ice_sess_check *c = &ice->clist.checks[i];
+	if (c->lcand->comp_id == rcheck->comp_id) {
+	    lcand = c->lcand;
+	    break;
+	}
+    }
+    if (lcand == NULL) {
+	/* Should not happen, but just in case remote is sending a
+	 * Binding request for a component which it doesn't have.
+	 */
+	LOG4((ice->obj_name, 
+	     "Received Binding request but no local candidate is found!"));
+	return;
+    }
+#endif
+
+    /* 
+     * Create candidate pair for this request. 
+     */
+    /* First check if the source address is the source address of the 
+     * STUN relay, to determine if local candidate is relayed candidate.
+     */
+    PJ_TODO(DETERMINE_IF_REQUEST_COMES_FROM_RELAYED_CANDIDATE);
+    is_relayed = PJ_FALSE;
+
+    /* 
+     * 7.2.1.4.  Triggered Checks
+     *
+     * Now that we have local and remote candidate, check if we already
+     * have this pair in our checklist.
+     */
+    for (i=0; i<ice->clist.count; ++i) {
+	pj_ice_sess_check *c = &ice->clist.checks[i];
+	if (c->lcand == lcand && c->rcand == rcand)
+	    break;
+    }
+
+    /* If the pair is already on the check list:
+     * - If the state of that pair is Waiting or Frozen, its state is
+     *   changed to In-Progress and a check for that pair is performed
+     *   immediately.  This is called a triggered check.
+     *
+     * - If the state of that pair is In-Progress, the agent SHOULD
+     *   generate an immediate retransmit of the Binding Request for the
+     *   check in progress.  This is to facilitate rapid completion of
+     *   ICE when both agents are behind NAT.
+     * 
+     * - If the state of that pair is Failed or Succeeded, no triggered
+     *   check is sent.
+     */
+    if (i != ice->clist.count) {
+	pj_ice_sess_check *c = &ice->clist.checks[i];
+
+	/* If USE-CANDIDATE is present, set nominated flag 
+	 * Note: DO NOT overwrite nominated flag if one is already set.
+	 */
+	c->nominated = ((rcheck->use_candidate) || c->nominated);
+
+	if (c->state == PJ_ICE_SESS_CHECK_STATE_FROZEN ||
+	    c->state == PJ_ICE_SESS_CHECK_STATE_WAITING)
+	{
+	    LOG5((ice->obj_name, "Performing triggered check for check %d",i));
+	    perform_check(ice, &ice->clist, i);
+
+	} else if (c->state == PJ_ICE_SESS_CHECK_STATE_IN_PROGRESS) {
+	    /* Should retransmit immediately
+	     */
+	    LOG5((ice->obj_name, "Triggered check for check %d not performed "
+		  "because it's in progress. Retransmitting", i));
+	    pj_stun_session_retransmit_req(comp->stun_sess, c->tdata);
+
+	} else if (c->state == PJ_ICE_SESS_CHECK_STATE_SUCCEEDED) {
+	    /* Check complete for this component.
+	     * Note this may end ICE process.
+	     */
+	    pj_bool_t complete;
+	    unsigned j;
+
+	    /* If this check is nominated, scan the valid_list for the
+	     * same check and update the nominated flag. A controlled 
+	     * agent might have finished the check earlier.
+	     */
+	    if (rcheck->use_candidate) {
+		for (j=0; j<ice->valid_list.count; ++j) {
+		    pj_ice_sess_check *vc = &ice->valid_list.checks[j];
+		    if (vc->lcand == c->lcand && vc->rcand == c->rcand) {
+			vc->nominated = PJ_TRUE;
+		    }
+		}
+	    }
+
+	    LOG5((ice->obj_name, "Triggered check for check %d not performed "
+				"because it's completed", i));
+
+	    complete = on_check_complete(ice, c);
+	    if (complete) {
+		return;
+	    }
+	}
+
+    }
+    /* If the pair is not already on the check list:
+     * - The pair is inserted into the check list based on its priority.
+     * - Its state is set to In-Progress
+     * - A triggered check for that pair is performed immediately.
+     */
+    /* Note: only do this if we don't have too many checks in checklist */
+    else if (ice->clist.count < PJ_ICE_MAX_CHECKS) {
+
+	pj_ice_sess_check *c = &ice->clist.checks[ice->clist.count];
+
+	c->lcand = lcand;
+	c->rcand = rcand;
+	c->prio = CALC_CHECK_PRIO(ice, lcand, rcand);
+	c->state = PJ_ICE_SESS_CHECK_STATE_WAITING;
+	c->nominated = rcheck->use_candidate;
+	c->err_code = PJ_SUCCESS;
+
+	LOG4((ice->obj_name, "New triggered check added: %d", 
+	     ice->clist.count));
+	perform_check(ice, &ice->clist, ice->clist.count++);
+
+    } else {
+	LOG4((ice->obj_name, "Error: unable to perform triggered check: "
+	     "TOO MANY CHECKS IN CHECKLIST!"));
+    }
+}
+
+
+static pj_status_t on_stun_rx_indication(pj_stun_session *sess,
+					 const pj_uint8_t *pkt,
+					 unsigned pkt_len,
+					 const pj_stun_msg *msg,
+					 const pj_sockaddr_t *src_addr,
+					 unsigned src_addr_len)
+{
+    PJ_UNUSED_ARG(sess);
+    PJ_UNUSED_ARG(pkt);
+    PJ_UNUSED_ARG(pkt_len);
+    PJ_UNUSED_ARG(msg);
+    PJ_UNUSED_ARG(src_addr);
+    PJ_UNUSED_ARG(src_addr_len);
+
+    PJ_TODO(SUPPORT_RX_BIND_REQUEST_AS_INDICATION);
+
+    return PJ_ENOTSUP;
+}
+
+
+PJ_DEF(pj_status_t) pj_ice_sess_send_data(pj_ice_sess *ice,
+					  unsigned comp_id,
+					  const void *data,
+					  pj_size_t data_len)
+{
+    pj_status_t status = PJ_SUCCESS;
+    pj_ice_sess_comp *comp;
+
+    PJ_ASSERT_RETURN(ice && comp_id && comp_id <= ice->comp_cnt, PJ_EINVAL);
+    
+    pj_mutex_lock(ice->mutex);
+
+    comp = find_comp(ice, comp_id);
+    if (comp == NULL) {
+	status = PJNATH_EICEINCOMPID;
+	goto on_return;
+    }
+
+    if (comp->valid_check == NULL) {
+	status = PJNATH_EICEINPROGRESS;
+	goto on_return;
+    }
+
+    status = (*ice->cb.on_tx_pkt)(ice, comp_id, data, data_len, 
+				  &comp->valid_check->rcand->addr, 
+				  sizeof(pj_sockaddr_in));
+
+on_return:
+    pj_mutex_unlock(ice->mutex);
+    return status;
+}
+
+
+PJ_DEF(pj_status_t) pj_ice_sess_on_rx_pkt(pj_ice_sess *ice,
+					  unsigned comp_id,
+					  void *pkt,
+					  pj_size_t pkt_size,
+					  const pj_sockaddr_t *src_addr,
+					  int src_addr_len)
+{
+    pj_status_t status = PJ_SUCCESS;
+    pj_ice_sess_comp *comp;
+    pj_status_t stun_status;
+
+    PJ_ASSERT_RETURN(ice, PJ_EINVAL);
+
+    pj_mutex_lock(ice->mutex);
+
+    comp = find_comp(ice, comp_id);
+    if (comp == NULL) {
+	status = PJNATH_EICEINCOMPID;
+	goto on_return;
+    }
+
+    stun_status = pj_stun_msg_check(pkt, pkt_size, PJ_STUN_IS_DATAGRAM);
+    if (stun_status == PJ_SUCCESS) {
+	status = pj_stun_session_on_rx_pkt(comp->stun_sess, pkt, pkt_size,
+					   PJ_STUN_IS_DATAGRAM,
+					   NULL, src_addr, src_addr_len);
+	if (status != PJ_SUCCESS) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+	    pj_strerror(status, errmsg, sizeof(errmsg));
+	    LOG4((ice->obj_name, "Error processing incoming message: %s",
+		  errmsg));
+	}
+    } else {
+	(*ice->cb.on_rx_data)(ice, comp_id, pkt, pkt_size, 
+			      src_addr, src_addr_len);
+    }
+    
+
+on_return:
+    pj_mutex_unlock(ice->mutex);
+    return status;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjnath/ice_strans.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjnath/ice_strans.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjnath/ice_strans.c	(revision 1163)
@@ -0,0 +1,1119 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjnath/ice_strans.h>
+#include <pjnath/errno.h>
+#include <pj/addr_resolv.h>
+#include <pj/assert.h>
+#include <pj/ip_helper.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include <pj/rand.h>
+#include <pj/string.h>
+
+
+#if 0
+#  define TRACE_PKT(expr)	    PJ_LOG(5,expr)
+#else
+#  define TRACE_PKT(expr)
+#endif
+
+
+
+/* ICE callbacks */
+static void	   on_ice_complete(pj_ice_sess *ice, pj_status_t status);
+static pj_status_t ice_tx_pkt(pj_ice_sess *ice, 
+			      unsigned comp_id,
+			      const void *pkt, pj_size_t size,
+			      const pj_sockaddr_t *dst_addr,
+			      unsigned dst_addr_len);
+static void	   ice_rx_data(pj_ice_sess *ice, 
+			      unsigned comp_id, 
+			      void *pkt, pj_size_t size,
+			      const pj_sockaddr_t *src_addr,
+			      unsigned src_addr_len);
+
+/* Ioqueue callback */
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read);
+
+static void destroy_component(pj_ice_strans_comp *comp);
+static void destroy_ice_st(pj_ice_strans *ice_st, pj_status_t reason);
+
+
+/* STUN session callback */
+static pj_status_t stun_on_send_msg(pj_stun_session *sess,
+				    const void *pkt,
+				    pj_size_t pkt_size,
+				    const pj_sockaddr_t *dst_addr,
+				    unsigned addr_len);
+static void stun_on_request_complete(pj_stun_session *sess,
+				     pj_status_t status,
+				     pj_stun_tx_data *tdata,
+				     const pj_stun_msg *response,
+				     const pj_sockaddr_t *src_addr,
+				     unsigned src_addr_len);
+
+/* Keep-alive timer */
+static void start_ka_timer(pj_ice_strans *ice_st);
+static void stop_ka_timer(pj_ice_strans *ice_st);
+
+/* Utility: print error */
+#define ice_st_perror(ice_st,msg,rc) pjnath_perror(ice_st->obj_name,msg,rc)
+
+/* 
+ * Create ICE stream transport 
+ */
+PJ_DECL(pj_status_t) pj_ice_strans_create(pj_stun_config *stun_cfg,
+					  const char *name,
+					  unsigned comp_cnt,
+					  void *user_data,
+					  const pj_ice_strans_cb *cb,
+					  pj_ice_strans **p_ice_st)
+{
+    pj_pool_t *pool;
+    pj_ice_strans *ice_st;
+
+    PJ_ASSERT_RETURN(stun_cfg && comp_cnt && cb && p_ice_st, PJ_EINVAL);
+    PJ_ASSERT_RETURN(stun_cfg->ioqueue && stun_cfg->timer_heap, PJ_EINVAL);
+
+    if (name == NULL)
+	name = "icstr%p";
+
+    pool = pj_pool_create(stun_cfg->pf, name, 4000, 4000, NULL);
+    ice_st = PJ_POOL_ZALLOC_T(pool, pj_ice_strans);
+    ice_st->pool = pool;
+    pj_memcpy(ice_st->obj_name, pool->obj_name, PJ_MAX_OBJ_NAME);
+    ice_st->user_data = user_data;
+    
+    ice_st->comp_cnt = comp_cnt;
+    ice_st->comp = (pj_ice_strans_comp**) pj_pool_calloc(pool, comp_cnt, 
+						     sizeof(void*));
+
+    pj_memcpy(&ice_st->cb, cb, sizeof(*cb));
+    pj_memcpy(&ice_st->stun_cfg, stun_cfg, sizeof(*stun_cfg));
+
+
+    PJ_LOG(4,(ice_st->obj_name, "ICE stream transport created"));
+
+    *p_ice_st = ice_st;
+    return PJ_SUCCESS;
+}
+
+/* Destroy ICE */
+static void destroy_ice_st(pj_ice_strans *ice_st, pj_status_t reason)
+{
+    unsigned i;
+    char obj_name[PJ_MAX_OBJ_NAME];
+
+    if (reason == PJ_SUCCESS) {
+	pj_memcpy(obj_name, ice_st->obj_name, PJ_MAX_OBJ_NAME);
+	PJ_LOG(4,(obj_name, "ICE stream transport shutting down"));
+    }
+
+    /* Kill keep-alive timer, if any */
+    stop_ka_timer(ice_st);
+
+    /* Destroy ICE if we have ICE */
+    if (ice_st->ice) {
+	pj_ice_sess_destroy(ice_st->ice);
+	ice_st->ice = NULL;
+    }
+
+    /* Destroy all components */
+    for (i=0; i<ice_st->comp_cnt; ++i) {
+	if (ice_st->comp[i]) {
+	    destroy_component(ice_st->comp[i]);
+	    ice_st->comp[i] = NULL;
+	}
+    }
+    ice_st->comp_cnt = 0;
+
+    /* Done */
+    pj_pool_release(ice_st->pool);
+
+    if (reason == PJ_SUCCESS) {
+	PJ_LOG(4,(obj_name, "ICE stream transport destroyed"));
+    }
+}
+
+/*
+ * Destroy ICE stream transport.
+ */
+PJ_DEF(pj_status_t) pj_ice_strans_destroy(pj_ice_strans *ice_st)
+{
+    destroy_ice_st(ice_st, PJ_SUCCESS);
+    return PJ_SUCCESS;
+}
+
+/*
+ * Resolve STUN server
+ */
+PJ_DEF(pj_status_t) pj_ice_strans_set_stun_domain(pj_ice_strans *ice_st,
+						  pj_dns_resolver *resolver,
+						  const pj_str_t *domain)
+{
+    /* Yeah, TODO */
+    PJ_UNUSED_ARG(ice_st);
+    PJ_UNUSED_ARG(resolver);
+    PJ_UNUSED_ARG(domain);
+    return -1;
+}
+
+/*
+ * Set STUN server address.
+ */
+PJ_DEF(pj_status_t) pj_ice_strans_set_stun_srv( pj_ice_strans *ice_st,
+						const pj_sockaddr_in *stun_srv,
+						const pj_sockaddr_in *turn_srv)
+{
+    PJ_ASSERT_RETURN(ice_st, PJ_EINVAL);
+    /* Must not have pending resolver job */
+    PJ_ASSERT_RETURN(ice_st->has_rjob==PJ_FALSE, PJ_EINVALIDOP);
+
+    if (stun_srv) {
+	pj_memcpy(&ice_st->stun_srv, stun_srv, sizeof(pj_sockaddr_in));
+    } else {
+	pj_bzero(&ice_st->stun_srv, sizeof(pj_sockaddr_in));
+    }
+
+    if (turn_srv) {
+	pj_memcpy(&ice_st->turn_srv, turn_srv, sizeof(pj_sockaddr_in));
+    } else {
+	pj_bzero(&ice_st->turn_srv, sizeof(pj_sockaddr_in));
+    }
+
+    return PJ_SUCCESS;
+}
+
+/* Add new candidate */
+static pj_status_t add_cand( pj_ice_strans *ice_st,
+			     pj_ice_strans_comp *comp,
+			     unsigned comp_id,
+			     pj_ice_cand_type type,
+			     pj_uint16_t local_pref,
+			     const pj_sockaddr_in *addr,
+			     pj_bool_t set_default)
+{
+    pj_ice_strans_cand *cand;
+
+    PJ_ASSERT_RETURN(ice_st && comp && addr, PJ_EINVAL);
+    PJ_ASSERT_RETURN(comp->cand_cnt < PJ_ICE_ST_MAX_CAND, PJ_ETOOMANY);
+
+    cand = &comp->cand_list[comp->cand_cnt];
+
+    pj_bzero(cand, sizeof(*cand));
+    cand->type = type;
+    cand->status = PJ_SUCCESS;
+    pj_memcpy(&cand->addr, addr, sizeof(pj_sockaddr_in));
+    cand->ice_cand_id = -1;
+    cand->local_pref = local_pref;
+    pj_ice_calc_foundation(ice_st->pool, &cand->foundation, type, 
+			   (const pj_sockaddr*)addr);
+
+    if (set_default) 
+	comp->default_cand = comp->cand_cnt;
+
+    PJ_LOG(5,(ice_st->obj_name, 
+	      "Candidate %s:%d (type=%s) added to component %d",
+	      pj_inet_ntoa(addr->sin_addr),
+	      (int)pj_ntohs(addr->sin_port), 
+	      pj_ice_get_cand_type_name(type),
+	      comp_id));
+    
+    comp->cand_cnt++;
+    return PJ_SUCCESS;
+}
+
+/*  Create new component (i.e. socket)  */
+static pj_status_t create_component(pj_ice_strans *ice_st,
+				    unsigned comp_id,
+				    pj_uint32_t options,
+				    const pj_sockaddr_in *addr,
+				    pj_ice_strans_comp **p_comp)
+{
+    enum { MAX_RETRY=100, PORT_INC=2 };
+    pj_ioqueue_callback ioqueue_cb;
+    pj_ice_strans_comp *comp;
+    int retry, addr_len;
+    struct {
+	pj_uint32_t a1, a2, a3;
+    } tsx_id;
+    pj_status_t status;
+
+    comp = PJ_POOL_ZALLOC_T(ice_st->pool, pj_ice_strans_comp);
+    comp->ice_st = ice_st;
+    comp->comp_id = comp_id;
+    comp->options = options;
+    comp->sock = PJ_INVALID_SOCKET;
+    comp->last_status = PJ_SUCCESS;
+
+    /* Create transaction ID for STUN keep alives */
+    tsx_id.a1 = 0;
+    tsx_id.a2 = comp_id;
+    tsx_id.a3 = (pj_uint32_t) ice_st;
+    pj_memcpy(comp->ka_tsx_id, &tsx_id, sizeof(comp->ka_tsx_id));
+
+    /* Create socket */
+    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &comp->sock);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Init address */
+    if (addr) 
+	pj_memcpy(&comp->local_addr, addr, sizeof(pj_sockaddr_in));
+    else 
+	pj_sockaddr_in_init(&comp->local_addr.ipv4, NULL, 0);
+
+    /* Retry binding socket */
+    for (retry=0; retry<MAX_RETRY; ++retry) {
+	pj_uint16_t port;
+
+	status = pj_sock_bind(comp->sock, &comp->local_addr, 
+			      sizeof(pj_sockaddr_in));
+	if (status == PJ_SUCCESS)
+	    break;
+
+	if (options & PJ_ICE_ST_OPT_NO_PORT_RETRY)
+	    goto on_error;
+
+	port = pj_ntohs(comp->local_addr.ipv4.sin_port);
+	port += PORT_INC;
+	comp->local_addr.ipv4.sin_port = pj_htons(port);
+    }
+
+    /* Get the actual port where the socket is bound to.
+     * (don't care about the address, it will be retrieved later)
+     */
+    addr_len = sizeof(comp->local_addr);
+    status = pj_sock_getsockname(comp->sock, &comp->local_addr, &addr_len);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Register to ioqueue */
+    pj_bzero(&ioqueue_cb, sizeof(ioqueue_cb));
+    ioqueue_cb.on_read_complete = &on_read_complete;
+    status = pj_ioqueue_register_sock(ice_st->pool, ice_st->stun_cfg.ioqueue, 
+				      comp->sock, comp, &ioqueue_cb, 
+				      &comp->key);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    pj_ioqueue_op_key_init(&comp->read_op, sizeof(comp->read_op));
+    pj_ioqueue_op_key_init(&comp->write_op, sizeof(comp->write_op));
+
+    /* Kick start reading the socket */
+    on_read_complete(comp->key, &comp->read_op, 0);
+
+    /* If the socket is bound to INADDR_ANY, then lookup all interfaces in
+     * the host and add them into cand_list. Otherwise if the socket is bound
+     * to a specific interface, then only add that specific interface to
+     * cand_list.
+     */
+    if (((options & PJ_ICE_ST_OPT_DONT_ADD_CAND)==0) &&
+	comp->local_addr.ipv4.sin_addr.s_addr == 0) 
+    {
+	/* Socket is bound to INADDR_ANY */
+	unsigned i, ifs_cnt;
+	pj_in_addr ifs[PJ_ICE_ST_MAX_CAND-2];
+
+	/* Reset default candidate */
+	comp->default_cand = -1;
+
+	/* Enum all IP interfaces in the host */
+	ifs_cnt = PJ_ARRAY_SIZE(ifs);
+	status = pj_enum_ip_interface(&ifs_cnt, ifs);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+
+	/* Set default IP interface as the base address */
+	status = pj_gethostip(&comp->local_addr.ipv4.sin_addr);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+
+	/* Add candidate entry for each interface */
+	for (i=0; i<ifs_cnt; ++i) {
+	    pj_sockaddr_in cand_addr;
+	    pj_bool_t set_default;
+	    pj_uint16_t local_pref;
+
+	    /* Ignore 127.0.0.0/24 address */
+	    if ((pj_ntohl(ifs[i].s_addr) >> 24)==127)
+		continue;
+
+	    pj_memcpy(&cand_addr, &comp->local_addr, sizeof(pj_sockaddr_in));
+	    cand_addr.sin_addr.s_addr = ifs[i].s_addr;
+
+
+	    /* If the IP address is equal to local address, assign it
+	     * as default candidate.
+	     */
+	    if (ifs[i].s_addr == comp->local_addr.ipv4.sin_addr.s_addr) {
+		set_default = PJ_TRUE;
+		local_pref = 65535;
+	    } else {
+		set_default = PJ_FALSE;
+		local_pref = 0;
+	    }
+
+	    status = add_cand(ice_st, comp, comp_id, 
+			      PJ_ICE_CAND_TYPE_HOST, 
+			      local_pref, &cand_addr, set_default);
+	    if (status != PJ_SUCCESS)
+		goto on_error;
+	}
+
+
+    } else if ((options & PJ_ICE_ST_OPT_DONT_ADD_CAND)==0) {
+	/* Socket is bound to specific address. 
+	 * In this case only add that address as a single entry in the
+	 * cand_list table.
+	 */
+	status = add_cand(ice_st, comp, comp_id, 
+			  PJ_ICE_CAND_TYPE_HOST, 
+			  65535, &comp->local_addr.ipv4,
+			  PJ_TRUE);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+
+    } else if (options & PJ_ICE_ST_OPT_DONT_ADD_CAND) {
+	/* If application doesn't want to add candidate, just fix local_addr
+	 * in case its value is zero.
+	 */
+	if (comp->local_addr.ipv4.sin_addr.s_addr == 0) {
+	    status = pj_gethostip(&comp->local_addr.ipv4.sin_addr);
+	    if (status != PJ_SUCCESS)
+		return status;
+	}
+    }
+
+
+    /* Done */
+    if (p_comp)
+	*p_comp = comp;
+
+    return PJ_SUCCESS;
+
+on_error:
+    destroy_component(comp);
+    return status;
+}
+
+/* 
+ * This is callback called by ioqueue on incoming packet 
+ */
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read)
+{
+    pj_ice_strans_comp *comp = (pj_ice_strans_comp*) 
+			    pj_ioqueue_get_user_data(key);
+    pj_ice_strans *ice_st = comp->ice_st;
+    pj_ssize_t pkt_size;
+    pj_status_t status;
+
+    if (bytes_read > 0) {
+	/*
+	 * Okay, we got a packet from the socket for the component. There is
+	 * a bit of situation here, since this packet could be one of these:
+	 *
+	 * 1) this could be the response of STUN binding request sent by
+	 *    this component to a) an initial request to get the STUN mapped
+	 *    address of this component, or b) subsequent request to keep
+	 *    the binding alive.
+	 * 
+	 * 2) this could be a packet (STUN or not STUN) sent from the STUN
+	 *    relay server. In this case, still there are few options to do
+	 *    for this packet: a) process this locally if this packet is
+	 *    related to TURN session management (e.g. Allocate response),
+	 *    b) forward this packet to ICE if this is related to ICE
+	 *    discovery process.
+	 *
+	 * 3) this could be a STUN request or response sent as part of ICE
+	 *    discovery process.
+	 *
+	 * 4) this could be application's packet, e.g. when ICE processing
+	 *    is done and agents start sending RTP/RTCP packets to each
+	 *    other, or when ICE processing is not done and this ICE stream
+	 *    transport decides to allow sending data.
+	 *
+	 * So far we don't have good solution for this.
+	 * The process below is just a workaround.
+	 */
+	status = pj_stun_msg_check(comp->pkt, bytes_read, 
+				   PJ_STUN_IS_DATAGRAM);
+
+	if (status == PJ_SUCCESS) {
+	    if (ice_st->ice==NULL ||
+		(comp->stun_sess &&
+		 pj_memcmp(comp->pkt+8, comp->ka_tsx_id, 12) == 0)) 
+	    {
+		status = pj_stun_session_on_rx_pkt(comp->stun_sess, comp->pkt,
+						   bytes_read, 
+						   PJ_STUN_IS_DATAGRAM, NULL,
+						   &comp->src_addr, 
+						   comp->src_addr_len);
+	    } else if (ice_st->ice) {
+		PJ_TODO(DISTINGUISH_BETWEEN_LOCAL_AND_RELAY);
+
+		TRACE_PKT((comp->ice_st->obj_name, 
+			  "Component %d RX packet from %s:%d",
+			  comp->comp_id,
+			  pj_inet_ntoa(comp->src_addr.ipv4.sin_addr),
+			  (int)pj_ntohs(comp->src_addr.ipv4.sin_port)));
+
+		status = pj_ice_sess_on_rx_pkt(ice_st->ice, comp->comp_id, 
+					       comp->pkt, bytes_read,
+					       &comp->src_addr, 
+					       comp->src_addr_len);
+	    } else {
+		/* This must have been a very late STUN reponse */
+	    }
+	} else {
+	    (*ice_st->cb.on_rx_data)(ice_st, comp->comp_id, 
+				     comp->pkt, bytes_read, 
+				     &comp->src_addr, comp->src_addr_len);
+	}
+
+    } else if (bytes_read < 0) {
+	ice_st_perror(comp->ice_st, "ioqueue read callback error", 
+		      -bytes_read);
+    }
+
+    /* Read next packet */
+    pkt_size = sizeof(comp->pkt);
+    comp->src_addr_len = sizeof(comp->src_addr);
+    status = pj_ioqueue_recvfrom(key, op_key, comp->pkt, &pkt_size, 
+				 PJ_IOQUEUE_ALWAYS_ASYNC,
+				 &comp->src_addr, &comp->src_addr_len);
+    if (status != PJ_SUCCESS && status != PJ_EPENDING) {
+	ice_st_perror(comp->ice_st, "ioqueue recvfrom() error", status);
+    }
+}
+
+/* 
+ * Destroy a component 
+ */
+static void destroy_component(pj_ice_strans_comp *comp)
+{
+    if (comp->stun_sess) {
+	pj_stun_session_destroy(comp->stun_sess);
+	comp->stun_sess = NULL;
+    }
+
+    if (comp->key) {
+	pj_ioqueue_unregister(comp->key);
+	comp->key = NULL;
+	comp->sock = PJ_INVALID_SOCKET;
+    } else if (comp->sock != PJ_INVALID_SOCKET && comp->sock != 0) {
+	pj_sock_close(comp->sock);
+	comp->sock = PJ_INVALID_SOCKET;
+    }
+}
+
+
+/* STUN keep-alive timer callback */
+static void ka_timer_cb(pj_timer_heap_t *th, pj_timer_entry *te)
+{
+    pj_ice_strans *ice_st = (pj_ice_strans*)te->user_data;
+    unsigned i;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(th);
+
+    ice_st->ka_timer.id = PJ_FALSE;
+
+    for (i=0; i<ice_st->comp_cnt; ++i) {
+	pj_ice_strans_comp *comp = ice_st->comp[i];
+	pj_stun_tx_data *tdata;
+	unsigned j;
+
+	/* Does this component have STUN server reflexive candidate? */
+	for (j=0; j<comp->cand_cnt; ++j) {
+	    if (comp->cand_list[j].type == PJ_ICE_CAND_TYPE_SRFLX)
+		break;
+	}
+	if (j == comp->cand_cnt)
+	    continue;
+
+	/* Create STUN binding request */
+	status = pj_stun_session_create_req(comp->stun_sess,
+					    PJ_STUN_BINDING_REQUEST, 
+					    comp->ka_tsx_id, &tdata);
+	if (status != PJ_SUCCESS)
+	    continue;
+
+	/* tdata->user_data is NULL for keep-alive */
+	tdata->user_data = NULL;
+
+	/* Send STUN binding request */
+	PJ_LOG(5,(ice_st->obj_name, "Sending STUN keep-alive"));
+	status = pj_stun_session_send_msg(comp->stun_sess, PJ_FALSE, 
+					  &ice_st->stun_srv, 
+					  sizeof(pj_sockaddr_in), tdata);
+    }
+
+    /* Start next timer */
+    start_ka_timer(ice_st);
+}
+
+/* Start STUN keep-alive timer */
+static void start_ka_timer(pj_ice_strans *ice_st)
+{
+    pj_time_val delay;
+
+    /* Skip if timer is already running */
+    if (ice_st->ka_timer.id != PJ_FALSE)
+	return;
+
+    delay.sec = PJ_ICE_ST_KEEP_ALIVE_MIN;
+    delay.msec = pj_rand() % (PJ_ICE_ST_KEEP_ALIVE_MAX_RAND * 1000);
+    pj_time_val_normalize(&delay);
+
+    ice_st->ka_timer.cb = &ka_timer_cb;
+    ice_st->ka_timer.user_data = ice_st;
+    
+    if (pj_timer_heap_schedule(ice_st->stun_cfg.timer_heap, 
+			       &ice_st->ka_timer, &delay)==PJ_SUCCESS)
+    {
+	ice_st->ka_timer.id = PJ_TRUE;
+    }
+}
+
+
+/* Stop STUN keep-alive timer */
+static void stop_ka_timer(pj_ice_strans *ice_st)
+{
+    /* Skip if timer is already stop */
+    if (ice_st->ka_timer.id == PJ_FALSE)
+	return;
+
+    pj_timer_heap_cancel(ice_st->stun_cfg.timer_heap, &ice_st->ka_timer);
+    ice_st->ka_timer.id = PJ_FALSE;
+}
+
+
+/*
+ * Add STUN mapping to a component.
+ */
+static pj_status_t get_stun_mapped_addr(pj_ice_strans *ice_st,
+					pj_ice_strans_comp *comp)
+{
+    pj_ice_strans_cand *cand;
+    pj_stun_session_cb sess_cb;
+    pj_stun_tx_data *tdata;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(ice_st && comp, PJ_EINVAL);
+    
+    /* Bail out if STUN server is still being resolved */
+    if (ice_st->has_rjob)
+	return PJ_EBUSY;
+
+    /* Just return (successfully) if STUN server is not configured */
+    if (ice_st->stun_srv.sin_family == 0)
+	return PJ_SUCCESS;
+
+
+    /* Create STUN session for this component */
+    pj_bzero(&sess_cb, sizeof(sess_cb));
+    sess_cb.on_request_complete = &stun_on_request_complete;
+    sess_cb.on_send_msg = &stun_on_send_msg;
+    status = pj_stun_session_create(&ice_st->stun_cfg, ice_st->obj_name,
+				    &sess_cb, PJ_FALSE, &comp->stun_sess);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Associate component with STUN session */
+    pj_stun_session_set_user_data(comp->stun_sess, (void*)comp);
+
+    /* Create STUN binding request */
+    status = pj_stun_session_create_req(comp->stun_sess, 
+					PJ_STUN_BINDING_REQUEST, 
+					comp->ka_tsx_id, 
+					&tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Attach alias instance to tdata */
+    cand = &comp->cand_list[comp->cand_cnt];
+    tdata->user_data = (void*)cand;
+
+    /* Send STUN binding request */
+    status = pj_stun_session_send_msg(comp->stun_sess, PJ_FALSE, 
+				      &ice_st->stun_srv, 
+				      sizeof(pj_sockaddr_in), tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    /* Add new alias to this component */
+    cand->type = PJ_ICE_CAND_TYPE_SRFLX;
+    cand->status = PJ_EPENDING;
+    cand->ice_cand_id = -1;
+    cand->local_pref = 65535;
+    pj_ice_calc_foundation(ice_st->pool, &cand->foundation, 
+			   PJ_ICE_CAND_TYPE_SRFLX, &comp->local_addr);
+
+    ++comp->cand_cnt;
+
+    /* Add pending count for this component */
+    comp->pending_cnt++;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create the component.
+ */
+PJ_DEF(pj_status_t) pj_ice_strans_create_comp(pj_ice_strans *ice_st,
+					      unsigned comp_id,
+					      pj_uint32_t options,
+					      const pj_sockaddr_in *addr)
+{
+    pj_ice_strans_comp *comp;
+    pj_status_t status;
+
+    /* Verify arguments */
+    PJ_ASSERT_RETURN(ice_st && comp_id, PJ_EINVAL);
+
+    /* Check that component ID present */
+    PJ_ASSERT_RETURN(comp_id <= ice_st->comp_cnt, PJNATH_EICEINCOMPID);
+
+    /* Can't add new component while ICE is running */
+    PJ_ASSERT_RETURN(ice_st->ice == NULL, PJ_EBUSY);
+    
+    /* Can't add new component while resolver is running */
+    PJ_ASSERT_RETURN(ice_st->has_rjob == PJ_FALSE, PJ_EBUSY);
+
+
+    /* Create component */
+    status = create_component(ice_st, comp_id, options, addr, &comp);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    if ((options & PJ_ICE_ST_OPT_DISABLE_STUN) == 0) {
+	status = get_stun_mapped_addr(ice_st, comp);
+	if (status != PJ_SUCCESS) {
+	    destroy_component(comp);
+	    return status;
+	}
+    }
+
+    /* Store this component */
+    ice_st->comp[comp_id-1] = comp;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pj_ice_strans_add_cand( pj_ice_strans *ice_st,
+					    unsigned comp_id,
+					    pj_ice_cand_type type,
+					    pj_uint16_t local_pref,
+					    const pj_sockaddr_in *addr,
+					    pj_bool_t set_default)
+{
+    pj_ice_strans_comp *comp;
+
+
+    PJ_ASSERT_RETURN(ice_st && comp_id && addr, PJ_EINVAL);
+    PJ_ASSERT_RETURN(comp_id <= ice_st->comp_cnt, PJ_EINVAL);
+    PJ_ASSERT_RETURN(ice_st->comp[comp_id-1] != NULL, PJ_EINVALIDOP);
+
+    comp = ice_st->comp[comp_id-1];
+    return add_cand(ice_st, comp, comp_id, type, local_pref, addr, 
+		    set_default);
+}
+
+
+PJ_DEF(pj_status_t) pj_ice_strans_get_comps_status(pj_ice_strans *ice_st)
+{
+    unsigned i;
+    pj_status_t worst = PJ_SUCCESS;
+
+    for (i=0; i<ice_st->comp_cnt; ++i) {
+	pj_ice_strans_comp *comp = ice_st->comp[i];
+
+	if (comp->last_status == PJ_SUCCESS) {
+	    /* okay */
+	} else if (comp->pending_cnt && worst==PJ_SUCCESS) {
+	    worst = PJ_EPENDING;
+	    break;
+	} else if (comp->last_status != PJ_SUCCESS) {
+	    worst = comp->last_status;
+	    break;
+	}
+
+	if (worst != PJ_SUCCESS)
+	    break;
+    }
+
+    return worst;
+}
+
+/*
+ * Create ICE!
+ */
+PJ_DEF(pj_status_t) pj_ice_strans_init_ice(pj_ice_strans *ice_st,
+					   pj_ice_sess_role role,
+					   const pj_str_t *local_ufrag,
+					   const pj_str_t *local_passwd)
+{
+    pj_status_t status;
+    unsigned i;
+    pj_ice_sess_cb ice_cb;
+    const pj_uint8_t srflx_prio[4] = { 100, 126, 110, 0 };
+
+    /* Check arguments */
+    PJ_ASSERT_RETURN(ice_st, PJ_EINVAL);
+    /* Must not have ICE */
+    PJ_ASSERT_RETURN(ice_st->ice == NULL, PJ_EINVALIDOP);
+    /* Components must have been created */
+    PJ_ASSERT_RETURN(ice_st->comp[0] != NULL, PJ_EINVALIDOP);
+
+    /* Init callback */
+    pj_bzero(&ice_cb, sizeof(ice_cb));
+    ice_cb.on_ice_complete = &on_ice_complete;
+    ice_cb.on_rx_data = &ice_rx_data;
+    ice_cb.on_tx_pkt = &ice_tx_pkt;
+
+    /* Create! */
+    status = pj_ice_sess_create(&ice_st->stun_cfg, ice_st->obj_name, role,
+			        ice_st->comp_cnt, &ice_cb, 
+			        local_ufrag, local_passwd, &ice_st->ice);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Associate user data */
+    ice_st->ice->user_data = (void*)ice_st;
+
+    /* If default candidate for components are SRFLX one, upload a custom
+     * type priority to ICE session so that SRFLX candidates will get
+     * checked first.
+     */
+    if (ice_st->comp[0]->default_cand >= 0 &&
+	ice_st->comp[0]->cand_list[ice_st->comp[0]->default_cand].type 
+	    == PJ_ICE_CAND_TYPE_SRFLX)
+    {
+	pj_ice_sess_set_prefs(ice_st->ice, srflx_prio);
+    }
+
+
+    /* Add candidates */
+    for (i=0; i<ice_st->comp_cnt; ++i) {
+	unsigned j;
+	pj_ice_strans_comp *comp= ice_st->comp[i];
+
+	for (j=0; j<comp->cand_cnt; ++j) {
+	    pj_ice_strans_cand *cand = &comp->cand_list[j];
+
+	    /* Skip if candidate is not ready */
+	    if (cand->status != PJ_SUCCESS) {
+		PJ_LOG(5,(ice_st->obj_name, 
+			  "Candidate %d in component %d is not added",
+			  j, i));
+		continue;
+	    }
+
+	    status = pj_ice_sess_add_cand(ice_st->ice, comp->comp_id, 
+					  cand->type, cand->local_pref, 
+					  &cand->foundation, &cand->addr, 
+					  &comp->local_addr, NULL, 
+					  sizeof(pj_sockaddr_in), 
+					  (unsigned*)&cand->ice_cand_id);
+	    if (status != PJ_SUCCESS)
+		goto on_error;
+	}
+    }
+
+    return PJ_SUCCESS;
+
+on_error:
+    pj_ice_strans_stop_ice(ice_st);
+    return status;
+}
+
+/*
+ * Enum candidates
+ */
+PJ_DEF(pj_status_t) pj_ice_strans_enum_cands(pj_ice_strans *ice_st,
+					 unsigned *count,
+					 pj_ice_sess_cand cand[])
+{
+    unsigned i, cnt;
+    pj_ice_sess_cand *pcand;
+
+    PJ_ASSERT_RETURN(ice_st && count && cand, PJ_EINVAL);
+    PJ_ASSERT_RETURN(ice_st->ice, PJ_EINVALIDOP);
+
+    cnt = ice_st->ice->lcand_cnt;
+    cnt = (cnt > *count) ? *count : cnt;
+    *count = 0;
+
+    for (i=0; i<cnt; ++i) {
+	pcand = &ice_st->ice->lcand[i];
+	pj_memcpy(&cand[i], pcand, sizeof(pj_ice_sess_cand));
+    }
+
+    *count = cnt;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Start ICE processing !
+ */
+PJ_DEF(pj_status_t) pj_ice_strans_start_ice( pj_ice_strans *ice_st,
+					     const pj_str_t *rem_ufrag,
+					     const pj_str_t *rem_passwd,
+					     unsigned rem_cand_cnt,
+					     const pj_ice_sess_cand rem_cand[])
+{
+    pj_status_t status;
+
+    status = pj_ice_sess_create_check_list(ice_st->ice, rem_ufrag, rem_passwd,
+					   rem_cand_cnt, rem_cand);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    status = pj_ice_sess_start_check(ice_st->ice);
+    if (status != PJ_SUCCESS) {
+	pj_ice_strans_stop_ice(ice_st);
+    }
+
+    return status;
+}
+
+/*
+ * Stop ICE!
+ */
+PJ_DECL(pj_status_t) pj_ice_strans_stop_ice(pj_ice_strans *ice_st)
+{
+    unsigned i;
+
+    if (ice_st->ice) {
+	pj_ice_sess_destroy(ice_st->ice);
+	ice_st->ice = NULL;
+    }
+
+    /* Invalidate all candidate Ids */
+    for (i=0; i<ice_st->comp_cnt; ++i) {
+	unsigned j;
+	for (j=0; j<ice_st->comp[i]->cand_cnt; ++j) {
+	    ice_st->comp[i]->cand_list[j].ice_cand_id = -1;
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Send packet using non-ICE means (e.g. when ICE was not negotiated).
+ */
+PJ_DEF(pj_status_t) pj_ice_strans_sendto( pj_ice_strans *ice_st,
+					  unsigned comp_id,
+					  const void *data,
+					  pj_size_t data_len,
+					  const pj_sockaddr_t *dst_addr,
+					  int dst_addr_len)
+{
+    pj_ssize_t pkt_size;
+    pj_ice_strans_comp *comp;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(ice_st && comp_id && comp_id <= ice_st->comp_cnt &&
+		     dst_addr && dst_addr_len, PJ_EINVAL);
+
+    comp = ice_st->comp[comp_id-1];
+
+    /* If ICE is available, send data with ICE */
+    if (ice_st->ice) {
+	return pj_ice_sess_send_data(ice_st->ice, comp_id, data, data_len);
+    }
+
+    /* Otherwise send direcly with the socket. This is for compatibility
+     * with remote that doesn't support ICE.
+     */
+    pkt_size = data_len;
+    status = pj_ioqueue_sendto(comp->key, &comp->write_op, 
+			       data, &pkt_size, 0,
+			       dst_addr, dst_addr_len);
+    
+    return (status==PJ_SUCCESS||status==PJ_EPENDING) ? PJ_SUCCESS : status;
+}
+
+/*
+ * Callback called by ICE session when ICE processing is complete, either
+ * successfully or with failure.
+ */
+static void on_ice_complete(pj_ice_sess *ice, pj_status_t status)
+{
+    pj_ice_strans *ice_st = (pj_ice_strans*)ice->user_data;
+    if (ice_st->cb.on_ice_complete) {
+	(*ice_st->cb.on_ice_complete)(ice_st, status);
+    }
+}
+
+/*
+ * Callback called by ICE session when it wants to send outgoing packet.
+ */
+static pj_status_t ice_tx_pkt(pj_ice_sess *ice, 
+			      unsigned comp_id, 
+			      const void *pkt, pj_size_t size,
+			      const pj_sockaddr_t *dst_addr,
+			      unsigned dst_addr_len)
+{
+    pj_ice_strans *ice_st = (pj_ice_strans*)ice->user_data;
+    pj_ice_strans_comp *comp = NULL;
+    pj_ssize_t pkt_size;
+    pj_status_t status;
+
+    PJ_TODO(TX_TO_RELAY);
+
+    PJ_ASSERT_RETURN(comp_id && comp_id <= ice_st->comp_cnt, PJ_EINVAL);
+    comp = ice_st->comp[comp_id-1];
+
+    TRACE_PKT((comp->ice_st->obj_name, 
+	      "Component %d TX packet to %s:%d",
+	      comp_id,
+	      pj_inet_ntoa(((pj_sockaddr_in*)dst_addr)->sin_addr),
+	      (int)pj_ntohs(((pj_sockaddr_in*)dst_addr)->sin_port)));
+
+    pkt_size = size;
+    status = pj_ioqueue_sendto(comp->key, &comp->write_op, 
+			       pkt, &pkt_size, 0,
+			       dst_addr, dst_addr_len);
+    
+    return (status==PJ_SUCCESS||status==PJ_EPENDING) ? PJ_SUCCESS : status;
+}
+
+/*
+ * Callback called by ICE session when it receives application data.
+ */
+static void ice_rx_data(pj_ice_sess *ice, 
+		        unsigned comp_id, 
+		        void *pkt, pj_size_t size,
+		        const pj_sockaddr_t *src_addr,
+		        unsigned src_addr_len)
+{
+    pj_ice_strans *ice_st = (pj_ice_strans*)ice->user_data;
+
+    if (ice_st->cb.on_rx_data) {
+	(*ice_st->cb.on_rx_data)(ice_st, comp_id, pkt, size, 
+				 src_addr, src_addr_len);
+    }
+}
+
+/*
+ * Callback called by STUN session to send outgoing packet.
+ */
+static pj_status_t stun_on_send_msg(pj_stun_session *sess,
+				    const void *pkt,
+				    pj_size_t size,
+				    const pj_sockaddr_t *dst_addr,
+				    unsigned dst_addr_len)
+{
+    pj_ice_strans_comp *comp;
+    pj_ssize_t pkt_size;
+    pj_status_t status;
+
+    comp = (pj_ice_strans_comp*) pj_stun_session_get_user_data(sess);
+    pkt_size = size;
+    status = pj_ioqueue_sendto(comp->key, &comp->write_op, 
+			       pkt, &pkt_size, 0,
+			       dst_addr, dst_addr_len);
+    
+    return (status==PJ_SUCCESS||status==PJ_EPENDING) ? PJ_SUCCESS : status;
+}
+
+/*
+ * Callback sent by STUN session when outgoing STUN request has
+ * completed.
+ */
+static void stun_on_request_complete(pj_stun_session *sess,
+				     pj_status_t status,
+				     pj_stun_tx_data *tdata,
+				     const pj_stun_msg *response,
+				     const pj_sockaddr_t *src_addr,
+				     unsigned src_addr_len)
+{
+    pj_ice_strans_comp *comp;
+    pj_ice_strans_cand *cand = NULL;
+    pj_stun_xor_mapped_addr_attr *xa;
+    pj_stun_mapped_addr_attr *ma;
+    pj_sockaddr *mapped_addr;
+
+    comp = (pj_ice_strans_comp*) pj_stun_session_get_user_data(sess);
+    cand = (pj_ice_strans_cand*) tdata->user_data;
+
+    PJ_UNUSED_ARG(src_addr);
+    PJ_UNUSED_ARG(src_addr_len);
+
+    if (cand == NULL) {
+	/* This is keep-alive */
+	if (status != PJ_SUCCESS) {
+	    ice_st_perror(comp->ice_st, "STUN keep-alive request failed",
+			  status);
+	}
+	return;
+    }
+
+    /* Decrement pending count for this component */
+    pj_assert(comp->pending_cnt > 0);
+    comp->pending_cnt--;
+
+    if (status != PJ_SUCCESS) {
+	comp->last_status = cand->status = status;
+	ice_st_perror(comp->ice_st, "STUN Binding request failed", 
+		      cand->status);
+	return;
+    }
+
+    xa = (pj_stun_xor_mapped_addr_attr*)
+	 pj_stun_msg_find_attr(response, PJ_STUN_ATTR_XOR_MAPPED_ADDR, 0);
+    ma = (pj_stun_mapped_addr_attr*)
+	 pj_stun_msg_find_attr(response, PJ_STUN_ATTR_MAPPED_ADDR, 0);
+
+    if (xa)
+	mapped_addr = &xa->sockaddr;
+    else if (ma)
+	mapped_addr = &ma->sockaddr;
+    else {
+	cand->status = PJNATH_ESTUNNOMAPPEDADDR;
+	ice_st_perror(comp->ice_st, "STUN Binding request failed", 
+		      cand->status);
+	return;
+    }
+
+    PJ_LOG(4,(comp->ice_st->obj_name, 
+	      "STUN mapped address: %s:%d",
+	      pj_inet_ntoa(mapped_addr->ipv4.sin_addr),
+	      (int)pj_ntohs(mapped_addr->ipv4.sin_port)));
+    pj_memcpy(&cand->addr, mapped_addr, sizeof(pj_sockaddr_in));
+    cand->status = PJ_SUCCESS;
+
+    /* Set this candidate as the default candidate */
+    comp->default_cand = (cand - comp->cand_list);
+    comp->last_status = PJ_SUCCESS;
+
+    /* We have STUN, so we must start the keep-alive timer */
+    start_ka_timer(comp->ice_st);
+}
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_auth.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_auth.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_auth.c	(revision 1163)
@@ -0,0 +1,347 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 <pjnath/stun_auth.h>
+#include <pjnath/errno.h>
+#include <pjlib-util/hmac_sha1.h>
+#include <pjlib-util/sha1.h>
+#include <pj/assert.h>
+#include <pj/string.h>
+
+
+/* Duplicate credential */
+PJ_DEF(void) pj_stun_auth_cred_dup( pj_pool_t *pool,
+				      pj_stun_auth_cred *dst,
+				      const pj_stun_auth_cred *src)
+{
+    dst->type = src->type;
+
+    switch (src->type) {
+    case PJ_STUN_AUTH_CRED_STATIC:
+	pj_strdup(pool, &dst->data.static_cred.realm,
+			&src->data.static_cred.realm);
+	pj_strdup(pool, &dst->data.static_cred.username,
+			&src->data.static_cred.username);
+	dst->data.static_cred.data_type = src->data.static_cred.data_type;
+	pj_strdup(pool, &dst->data.static_cred.data,
+			&src->data.static_cred.data);
+	pj_strdup(pool, &dst->data.static_cred.nonce,
+			&src->data.static_cred.nonce);
+	break;
+    case PJ_STUN_AUTH_CRED_DYNAMIC:
+	pj_memcpy(&dst->data.dyn_cred, &src->data.dyn_cred, 
+		  sizeof(src->data.dyn_cred));
+	break;
+    }
+}
+
+
+PJ_INLINE(pj_uint16_t) GET_VAL16(const pj_uint8_t *pdu, unsigned pos)
+{
+    return (pj_uint16_t) ((pdu[pos] << 8) + pdu[pos+1]);
+}
+
+
+/* Send 401 response */
+static pj_status_t create_challenge(pj_pool_t *pool,
+				    const pj_stun_msg *msg,
+				    int err_code,
+				    const pj_str_t *err_msg,
+				    const pj_str_t *realm,
+				    const pj_str_t *nonce,
+				    pj_stun_msg **p_response)
+{
+    pj_stun_msg *response;
+    pj_str_t tmp_nonce;
+    pj_status_t rc;
+
+    rc = pj_stun_msg_create_response(pool, msg, 
+				     err_code,  err_msg, &response);
+    if (rc != PJ_SUCCESS)
+	return rc;
+
+
+    if (realm && realm->slen) {
+	rc = pj_stun_msg_add_string_attr(pool, response,
+					 PJ_STUN_ATTR_REALM, 
+					 realm);
+	if (rc != PJ_SUCCESS)
+	    return rc;
+
+	/* long term must include nonce */
+	if (!nonce || nonce->slen == 0) {
+	    tmp_nonce = pj_str("pjstun");
+	    nonce = &tmp_nonce;
+	}
+    }
+
+    if (nonce && nonce->slen) {
+	rc = pj_stun_msg_add_string_attr(pool, response,
+					 PJ_STUN_ATTR_NONCE, 
+					 nonce);
+	if (rc != PJ_SUCCESS)
+	    return rc;
+    }
+
+    *p_response = response;
+
+    return PJ_SUCCESS;
+}
+
+
+/* Verify credential */
+PJ_DEF(pj_status_t) pj_stun_verify_credential( const pj_uint8_t *pkt,
+					       unsigned pkt_len,
+					       const pj_stun_msg *msg,
+					       pj_stun_auth_cred *cred,
+					       pj_pool_t *pool,
+					       pj_stun_msg **p_response)
+{
+    pj_str_t realm, nonce, password;
+    const pj_stun_msgint_attr *amsgi;
+    unsigned amsgi_pos;
+    const pj_stun_username_attr *auser;
+    pj_bool_t username_ok;
+    const pj_stun_realm_attr *arealm;
+    const pj_stun_realm_attr *anonce;
+    pj_uint8_t digest[PJ_SHA1_DIGEST_SIZE];
+    pj_uint8_t md5_digest[16];
+    pj_str_t key;
+    pj_status_t status;
+
+    /* msg and credential MUST be specified */
+    PJ_ASSERT_RETURN(pkt && pkt_len && msg && cred, PJ_EINVAL);
+
+    /* If p_response is specified, pool MUST be specified. */
+    PJ_ASSERT_RETURN(!p_response || pool, PJ_EINVAL);
+
+    if (p_response)
+	*p_response = NULL;
+
+    if (!PJ_STUN_IS_REQUEST(msg->hdr.type))
+	p_response = NULL;
+
+    /* Get realm and nonce */
+    realm.slen = nonce.slen = 0;
+    if (cred->type == PJ_STUN_AUTH_CRED_STATIC) {
+	realm = cred->data.static_cred.realm;
+	nonce = cred->data.static_cred.nonce;
+    } else if (cred->type == PJ_STUN_AUTH_CRED_DYNAMIC) {
+	status = cred->data.dyn_cred.get_auth(cred->data.dyn_cred.user_data,
+					      pool, &realm, &nonce);
+	if (status != PJ_SUCCESS)
+	    return status;
+    } else {
+	pj_assert(!"Unexpected");
+	return PJ_EBUG;
+    }
+
+    /* First check that MESSAGE-INTEGRITY is present */
+    amsgi = (const pj_stun_msgint_attr*)
+	    pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_MESSAGE_INTEGRITY, 0);
+    if (amsgi == NULL) {
+	if (p_response) {
+	    create_challenge(pool, msg, PJ_STUN_SC_UNAUTHORIZED, NULL,
+			     &realm, &nonce, p_response);
+	}
+	return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_INTEGRITY_CHECK_FAILURE);
+    }
+
+    /* Next check that USERNAME is present */
+    auser = (const pj_stun_username_attr*)
+	    pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_USERNAME, 0);
+    if (auser == NULL) {
+	if (p_response) {
+	    create_challenge(pool, msg, PJ_STUN_SC_MISSING_USERNAME, NULL,
+			     &realm, &nonce, p_response);
+	}
+	return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_MISSING_USERNAME);
+    }
+
+    /* Get REALM, if any */
+    arealm = (const pj_stun_realm_attr*)
+	     pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_REALM, 0);
+
+    /* Check if username match */
+    if (cred->type == PJ_STUN_AUTH_CRED_STATIC) {
+	username_ok = !pj_strcmp(&auser->value, 
+				 &cred->data.static_cred.username);
+	password = cred->data.static_cred.data;
+    } else if (cred->type == PJ_STUN_AUTH_CRED_DYNAMIC) {
+	int data_type = 0;
+	pj_status_t rc;
+	rc = cred->data.dyn_cred.get_password(msg, 
+					      cred->data.dyn_cred.user_data,
+					      (arealm?&arealm->value:NULL),
+					      &auser->value, pool,
+					      &data_type, &password);
+	username_ok = (rc == PJ_SUCCESS);
+    } else {
+	username_ok = PJ_TRUE;
+	password.slen = 0;
+    }
+
+    if (!username_ok) {
+	/* Username mismatch */
+	if (p_response) {
+	    create_challenge(pool, msg, PJ_STUN_SC_UNKNOWN_USERNAME, NULL,
+			     &realm, &nonce, p_response);
+	}
+	return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_UNKNOWN_USERNAME);
+    }
+
+
+    /* Get NONCE attribute */
+    anonce = (pj_stun_nonce_attr*)
+	     pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_NONCE, 0);
+
+    /* Check for long term/short term requirements. */
+    if (realm.slen != 0 && arealm == NULL) {
+	/* Long term credential is required and REALM is not present */
+	if (p_response) {
+	    create_challenge(pool, msg, PJ_STUN_SC_MISSING_REALM, NULL,
+			     &realm, &nonce, p_response);
+	}
+	return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_MISSING_REALM);
+
+    } else if (realm.slen != 0 && arealm != NULL) {
+	/* We want long term, and REALM is present */
+
+	/* NONCE must be present. */
+	if (anonce == NULL) {
+	    if (p_response) {
+		create_challenge(pool, msg, PJ_STUN_SC_MISSING_NONCE, 
+				 NULL, &realm, &nonce, p_response);
+	    }
+	    return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_MISSING_NONCE);
+	}
+
+	/* Verify REALM matches */
+	if (pj_stricmp(&arealm->value, &realm)) {
+	    /* REALM doesn't match */
+	    if (p_response) {
+		create_challenge(pool, msg, PJ_STUN_SC_MISSING_REALM, 
+				 NULL, &realm, &nonce, p_response);
+	    }
+	    return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_MISSING_REALM);
+	}
+
+	/* Valid case, will validate the message integrity later */
+
+    } else if (realm.slen == 0 && arealm != NULL) {
+	/* We want to use short term credential, but client uses long
+	 * term credential. The draft doesn't mention anything about
+	 * switching between long term and short term.
+	 */
+	
+	/* For now just accept the credential, anyway it will probably
+	 * cause wrong message integrity value later.
+	 */
+    } else if (realm.slen==0 && arealm == NULL) {
+	/* Short term authentication is wanted, and one is supplied */
+
+	/* Application MAY request NONCE to be supplied */
+	if (nonce.slen != 0) {
+	    if (p_response) {
+		create_challenge(pool, msg, PJ_STUN_SC_MISSING_NONCE, 
+				 NULL, &realm, &nonce, p_response);
+	    }
+	    return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_MISSING_NONCE);
+	}
+    }
+
+    /* If NONCE is present, validate it */
+    if (anonce) {
+	pj_bool_t ok;
+
+	if (cred->type == PJ_STUN_AUTH_CRED_DYNAMIC &&
+	    cred->data.dyn_cred.verify_nonce != NULL) 
+	{
+	    ok=cred->data.dyn_cred.verify_nonce(msg, 
+						cred->data.dyn_cred.user_data,
+						(arealm?&arealm->value:NULL),
+						&auser->value,
+						&anonce->value);
+	} else if (cred->type == PJ_STUN_AUTH_CRED_DYNAMIC) {
+	    ok = PJ_TRUE;
+	} else {
+	    if (nonce.slen) {
+		ok = !pj_strcmp(&anonce->value, &nonce);
+	    } else {
+		ok = PJ_TRUE;
+	    }
+	}
+
+	if (!ok) {
+	    if (p_response) {
+		create_challenge(pool, msg, PJ_STUN_SC_STALE_NONCE, 
+				 NULL, &realm, &nonce, p_response);
+	    }
+	    return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_MISSING_NONCE);
+	}
+    }
+
+    /* Get the position of MESSAGE-INTEGRITY in the packet */
+    amsgi_pos = 20+msg->hdr.length-24;
+    if (GET_VAL16(pkt, amsgi_pos) == PJ_STUN_ATTR_MESSAGE_INTEGRITY) {
+	/* Found MESSAGE-INTEGRITY as the last attribute */
+    } else {
+	amsgi_pos = 0;
+    }
+    
+    if (amsgi_pos==0) {
+	amsgi_pos = 20+msg->hdr.length-8-24;
+	if (GET_VAL16(pkt, amsgi_pos) == PJ_STUN_ATTR_MESSAGE_INTEGRITY) {
+	    /* Found MESSAGE-INTEGRITY before FINGERPRINT */
+	} else {
+	    amsgi_pos = 0;
+	}
+    }
+
+    if (amsgi_pos==0) {
+	pj_assert(!"Unable to find MESSAGE-INTEGRITY in the message!");
+	return PJ_EBUG;
+    }
+
+    /* Determine which key to use */
+    if (realm.slen) {
+	pj_stun_calc_md5_key(md5_digest, &realm, &auser->value, &password);
+	key.ptr = (char*)md5_digest;
+	key.slen = 16;
+    } else {
+	key = password;
+    }
+
+    /* Now calculate HMAC of the message */
+    pj_hmac_sha1(pkt, amsgi_pos, (pj_uint8_t*)key.ptr, key.slen, digest);
+
+    /* Compare HMACs */
+    if (pj_memcmp(amsgi->hmac, digest, 20)) {
+	/* HMAC value mismatch */
+	if (p_response) {
+	    create_challenge(pool, msg, PJ_STUN_SC_INTEGRITY_CHECK_FAILURE,
+			     NULL, &realm, &nonce, p_response);
+	}
+	return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_INTEGRITY_CHECK_FAILURE);
+    }
+
+    /* Everything looks okay! */
+    return PJ_SUCCESS;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_msg.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_msg.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_msg.c	(revision 1163)
@@ -0,0 +1,2239 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 <pjnath/stun_msg.h>
+#include <pjnath/errno.h>
+#include <pjlib-util/crc32.h>
+#include <pjlib-util/hmac_sha1.h>
+#include <pjlib-util/md5.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/rand.h>
+#include <pj/string.h>
+
+#define THIS_FILE		"stun_msg.c"
+#define STUN_XOR_FINGERPRINT	0x5354554eL
+
+static const char *stun_method_names[] = 
+{
+    "Unknown",			/* 0 */
+    "Binding",			/* 1 */
+    "Shared Secret",		/* 2 */
+    "Allocate",			/* 3 */
+    "Send",			/* 4 */
+    "Data",			/* 5 */
+    "Set Active Destination",   /* 6 */
+    "Connect",			/* 7 */
+    "Connect Status"		/* 8 */
+};
+
+static struct
+{
+    int err_code;
+    const char *err_msg;
+} stun_err_msg_map[] = 
+{
+    { PJ_STUN_SC_TRY_ALTERNATE,		    "Try Alternate"}, 
+    { PJ_STUN_SC_BAD_REQUEST,		    "Bad Request"},
+    { PJ_STUN_SC_UNAUTHORIZED,		    "Unauthorized"},
+    { PJ_STUN_SC_UNKNOWN_ATTRIBUTE,	    "Unknown Attribute"},
+    { PJ_STUN_SC_STALE_CREDENTIALS,	    "Stale Credentials"},
+    { PJ_STUN_SC_INTEGRITY_CHECK_FAILURE,   "Integrity Check Failure"},
+    { PJ_STUN_SC_MISSING_USERNAME,	    "Missing Username"},
+    { PJ_STUN_SC_USE_TLS,		    "Use TLS"},
+    { PJ_STUN_SC_MISSING_REALM,		    "Missing Realm"},
+    { PJ_STUN_SC_MISSING_NONCE,		    "Missing Nonce"},
+    { PJ_STUN_SC_UNKNOWN_USERNAME,	    "Unknown Username"},
+    { PJ_STUN_SC_NO_BINDING,		    "No Binding"},
+    { PJ_STUN_SC_STALE_NONCE,		    "Stale Nonce"},
+    { PJ_STUN_SC_TRANSITIONING,		    "Active Destination Already Set"},
+    { PJ_STUN_SC_UNSUPP_TRANSPORT_PROTO,    "Unsupported Transport Protocol"},
+    { PJ_STUN_SC_INVALID_IP_ADDR,	    "Invalid IP Address"},
+    { PJ_STUN_SC_INVALID_PORT,		    "Invalid Port"},
+    { PJ_STUN_SC_OPER_TCP_ONLY,		    "Operation for TCP Only"},
+    { PJ_STUN_SC_CONNECTION_FAILURE,	    "Connection Failure"},
+    { PJ_STUN_SC_CONNECTION_TIMEOUT,	    "Connection Timeout"},
+    { PJ_STUN_SC_ALLOCATION_QUOTA_REACHED,  "Allocation Quota Reached"},
+    { PJ_STUN_SC_ROLE_CONFLICT,		    "Role Conflict"},
+    { PJ_STUN_SC_SERVER_ERROR,		    "Server Error"},
+    { PJ_STUN_SC_INSUFFICIENT_CAPACITY,	    "Insufficient Capacity"},
+    { PJ_STUN_SC_GLOBAL_FAILURE,	    "Global Failure"}
+};
+
+
+
+struct attr_desc
+{
+    const char   *name;
+    pj_status_t	(*decode_attr)(pj_pool_t *pool, const pj_uint8_t *buf, 
+			       void **p_attr);
+    pj_status_t (*encode_attr)(const void *a, pj_uint8_t *buf, 
+			       unsigned len, unsigned *printed);
+};
+
+static pj_status_t decode_sockaddr_attr(pj_pool_t *pool, 
+				       const pj_uint8_t *buf, 
+				       void **p_attr);
+static pj_status_t decode_xored_sockaddr_attr(pj_pool_t *pool, 
+					      const pj_uint8_t *buf, 
+					      void **p_attr);
+static pj_status_t encode_sockaddr_attr(const void *a, pj_uint8_t *buf, 
+				       unsigned len, 
+				       unsigned *printed);
+static pj_status_t decode_string_attr(pj_pool_t *pool, 
+				      const pj_uint8_t *buf, 
+				      void **p_attr);
+static pj_status_t encode_string_attr(const void *a, pj_uint8_t *buf, 
+				      unsigned len, unsigned *printed);
+static pj_status_t decode_msgint_attr(pj_pool_t *pool, 
+				      const pj_uint8_t *buf,
+				      void **p_attr);
+static pj_status_t encode_msgint_attr(const void *a, pj_uint8_t *buf, 
+				      unsigned len, unsigned *printed);
+static pj_status_t decode_errcode_attr(pj_pool_t *pool, 
+				       const pj_uint8_t *buf,
+				       void **p_attr);
+static pj_status_t encode_errcode_attr(const void *a, pj_uint8_t *buf, 
+				       unsigned len, unsigned *printed);
+static pj_status_t decode_unknown_attr(pj_pool_t *pool, 
+				       const pj_uint8_t *buf, 
+				       void **p_attr);
+static pj_status_t encode_unknown_attr(const void *a, pj_uint8_t *buf, 
+				       unsigned len, unsigned *printed);
+static pj_status_t decode_uint_attr(pj_pool_t *pool, 
+				    const pj_uint8_t *buf, 
+				    void **p_attr);
+static pj_status_t encode_uint_attr(const void *a, pj_uint8_t *buf, 
+				    unsigned len, unsigned *printed);
+static pj_status_t decode_uint64_attr(pj_pool_t *pool, 
+				      const pj_uint8_t *buf, 
+				      void **p_attr);
+static pj_status_t encode_uint64_attr(const void *a, pj_uint8_t *buf, 
+				      unsigned len, unsigned *printed);
+static pj_status_t decode_binary_attr(pj_pool_t *pool, 
+				      const pj_uint8_t *buf,
+				      void **p_attr);
+static pj_status_t encode_binary_attr(const void *a, pj_uint8_t *buf, 
+				      unsigned len, unsigned *printed);
+static pj_status_t decode_empty_attr(pj_pool_t *pool, 
+				     const pj_uint8_t *buf, 
+				     void **p_attr);
+static pj_status_t encode_empty_attr(const void *a, pj_uint8_t *buf, 
+				     unsigned len, unsigned *printed);
+
+
+static struct attr_desc mandatory_attr_desc[] = 
+{
+    {
+	/* type zero */
+	NULL,
+	NULL,
+	NULL
+    },
+    {
+	/* PJ_STUN_ATTR_MAPPED_ADDR, */
+	"MAPPED-ADDRESS",
+	&decode_sockaddr_attr,
+	&encode_sockaddr_attr
+    },
+    {
+	/* PJ_STUN_ATTR_RESPONSE_ADDR, */
+	"RESPONSE-ADDRESS",
+	&decode_sockaddr_attr,
+	&encode_sockaddr_attr
+    },
+    {
+	/* PJ_STUN_ATTR_CHANGE_REQUEST, */
+	"CHANGE-REQUEST",
+	&decode_uint_attr,
+	&encode_uint_attr
+    },
+    {
+	/* PJ_STUN_ATTR_SOURCE_ADDR, */
+	"SOURCE-ADDRESS",
+	&decode_sockaddr_attr,
+	&encode_sockaddr_attr
+    },
+    {
+	/* PJ_STUN_ATTR_CHANGED_ADDR, */
+	"CHANGED-ADDRESS",
+	&decode_sockaddr_attr,
+	&encode_sockaddr_attr
+    },
+    {
+	/* PJ_STUN_ATTR_USERNAME, */
+	"USERNAME",
+	&decode_string_attr,
+	&encode_string_attr
+    },
+    {
+	/* PJ_STUN_ATTR_PASSWORD, */
+	"PASSWORD",
+	&decode_string_attr,
+	&encode_string_attr
+    },
+    {
+	/* PJ_STUN_ATTR_MESSAGE_INTEGRITY, */
+	"MESSAGE-INTEGRITY",
+	&decode_msgint_attr,
+	&encode_msgint_attr
+    },
+    {
+	/* PJ_STUN_ATTR_ERROR_CODE, */
+	"ERROR-CODE",
+	&decode_errcode_attr,
+	&encode_errcode_attr
+    },
+    {
+	/* PJ_STUN_ATTR_UNKNOWN_ATTRIBUTES, */
+	"UNKNOWN-ATTRIBUTES",
+	&decode_unknown_attr,
+	&encode_unknown_attr
+    },
+    {
+	/* PJ_STUN_ATTR_REFLECTED_FROM, */
+	"REFLECTED-FROM",
+	&decode_sockaddr_attr,
+	&encode_sockaddr_attr
+    },
+    {
+	/* ID 0x000C is not assigned */
+	NULL,
+	NULL,
+	NULL
+    },
+    {
+	/* PJ_STUN_ATTR_LIFETIME, */
+	"LIFETIME",
+	&decode_uint_attr,
+	&encode_uint_attr
+    },
+    {
+	/* ID 0x000E is not assigned */
+	NULL,
+	NULL,
+	NULL
+    },
+    {
+	/* PJ_STUN_ATTR_MAGIC_COOKIE */
+	"MAGIC-COOKIE",
+	&decode_uint_attr,
+	&encode_uint_attr
+    },
+    {
+	/* PJ_STUN_ATTR_BANDWIDTH, */
+	"BANDWIDTH",
+	&decode_uint_attr,
+	&encode_uint_attr
+    },
+    {
+	/* ID 0x0011 is not assigned */
+	NULL,
+	NULL,
+	NULL
+    },
+    {
+	/* PJ_STUN_ATTR_REMOTE_ADDRESS, */
+	"REMOTE-ADDRESS",
+	&decode_sockaddr_attr,
+	&encode_sockaddr_attr
+    },
+    {
+	/* PJ_STUN_ATTR_DATA, */
+	"DATA",
+	&decode_binary_attr,
+	&encode_binary_attr
+    },
+    {
+	/* PJ_STUN_ATTR_REALM, */
+	"REALM",
+	&decode_string_attr,
+	&encode_string_attr
+    },
+    {
+	/* PJ_STUN_ATTR_NONCE, */
+	"NONCE",
+	&decode_string_attr,
+	&encode_string_attr
+    },
+    {
+	/* PJ_STUN_ATTR_RELAY_ADDRESS, */
+	"RELAY-ADDRESS",
+	&decode_sockaddr_attr,
+	&encode_sockaddr_attr
+    },
+    {
+	/* PJ_STUN_ATTR_REQUESTED_ADDR_TYPE, */
+	"REQUESTED-ADDRESS-TYPE",
+	&decode_uint_attr,
+	&encode_uint_attr
+    },
+    {
+	/* PJ_STUN_ATTR_REQUESTED_PORT_PROPS, */
+	"REQUESTED-PORT-PROPS",
+	&decode_uint_attr,
+	&encode_uint_attr
+    },
+    {
+	/* PJ_STUN_ATTR_REQUESTED_TRANSPORT, */
+	"REQUESTED-TRANSPORT",
+	&decode_uint_attr,
+	&encode_uint_attr
+    },
+    {
+	/* ID 0x001A is not assigned */
+	NULL,
+	NULL,
+	NULL
+    },
+    {
+	/* ID 0x001B is not assigned */
+	NULL,
+	NULL,
+	NULL
+    },
+    {
+	/* ID 0x001C is not assigned */
+	NULL,
+	NULL,
+	NULL
+    },
+    {
+	/* ID 0x001D is not assigned */
+	NULL,
+	NULL,
+	NULL
+    },
+    {
+	/* ID 0x001E is not assigned */
+	NULL,
+	NULL,
+	NULL
+    },
+    {
+	/* ID 0x001F is not assigned */
+	NULL,
+	NULL,
+	NULL
+    },
+    {
+	/* PJ_STUN_ATTR_XOR_MAPPED_ADDRESS, */
+	"XOR-MAPPED-ADDRESS",
+	&decode_xored_sockaddr_attr,
+	&encode_sockaddr_attr
+    },
+    {
+	/* PJ_STUN_ATTR_TIMER_VAL, */
+	"TIMER-VAL",
+	&decode_uint_attr,
+	&encode_uint_attr
+    },
+    {
+	/* PJ_STUN_ATTR_REQUESTED_IP, */
+	"REQUESTED-IP",
+	&decode_sockaddr_attr,
+	&encode_sockaddr_attr
+    },
+    {
+	/* PJ_STUN_ATTR_XOR_REFLECTED_FROM, */
+	"XOR-REFLECTED-FROM",
+	&decode_xored_sockaddr_attr,
+	&encode_sockaddr_attr
+    },
+    {
+	/* PJ_STUN_ATTR_PRIORITY, */
+	"PRIORITY",
+	&decode_uint_attr,
+	&encode_uint_attr
+    },
+    {
+	/* PJ_STUN_ATTR_USE_CANDIDATE, */
+	"USE-CANDIDATE",
+	&decode_empty_attr,
+	&encode_empty_attr
+    },
+    {
+	/* PJ_STUN_ATTR_XOR_INTERNAL_ADDR, */
+	"XOR-INTERNAL-ADDRESS",
+	&decode_xored_sockaddr_attr,
+	&encode_sockaddr_attr
+    },
+
+    /* Sentinel */
+    {
+	/* PJ_STUN_ATTR_END_MANDATORY_ATTR */
+	NULL,
+	NULL,
+	NULL
+    }
+};
+
+static struct attr_desc extended_attr_desc[] =
+{
+    {
+	/* ID 0x8021 is not assigned */
+	NULL,
+	NULL,
+	NULL
+    },
+    {
+	/* PJ_STUN_ATTR_SERVER, */
+	"SERVER",
+	&decode_string_attr,
+	&encode_string_attr
+    },
+    {
+	/* PJ_STUN_ATTR_ALTERNATE_SERVER, */
+	"ALTERNATE-SERVER",
+	&decode_sockaddr_attr,
+	&encode_sockaddr_attr
+    },
+    {
+	/* PJ_STUN_ATTR_REFRESH_INTERVAL, */
+	"REFRESH-INTERVAL",
+	&decode_uint_attr,
+	&encode_uint_attr
+    },
+    {
+	/* ID 0x8025 is not assigned*/
+	NULL,
+	NULL,
+	NULL
+    },
+    {
+	/* PADDING, 0x8026 */
+	NULL,
+	NULL,
+	NULL
+    },
+    {
+	/* CACHE-TIMEOUT, 0x8027 */
+	NULL,
+	NULL,
+	NULL
+    },
+    {
+	/* PJ_STUN_ATTR_FINGERPRINT, */
+	"FINGERPRINT",
+	&decode_uint_attr,
+	&encode_uint_attr
+    },
+    {
+	/* PJ_STUN_ATTR_ICE_CONTROLLED, */
+	"ICE-CONTROLLED",
+	&decode_uint64_attr,
+	&encode_uint64_attr
+    },
+    {
+	/* PJ_STUN_ATTR_ICE_CONTROLLING, */
+	"ICE-CONTROLLING",
+	&decode_uint64_attr,
+	&encode_uint64_attr
+    }
+};
+
+
+
+/*
+ * Get STUN message type name.
+ */
+PJ_DEF(const char*) pj_stun_get_method_name(unsigned msg_type)
+{
+    unsigned method = PJ_STUN_GET_METHOD(msg_type);
+
+    if (method >= PJ_ARRAY_SIZE(stun_method_names))
+	return "???";
+
+    return stun_method_names[method];
+}
+
+
+/*
+ * Get STUN message class name.
+ */
+PJ_DEF(const char*) pj_stun_get_class_name(unsigned msg_type)
+{
+    if (PJ_STUN_IS_REQUEST(msg_type))
+	return "request";
+    else if (PJ_STUN_IS_SUCCESS_RESPONSE(msg_type))
+	return "success response";
+    else if (PJ_STUN_IS_ERROR_RESPONSE(msg_type))
+	return "error response";
+    else if (PJ_STUN_IS_INDICATION(msg_type))
+	return "indication";
+    else
+	return "???";
+}
+
+
+static const struct attr_desc *find_attr_desc(unsigned attr_type)
+{
+    struct attr_desc *desc;
+
+    /* Check that attr_desc array is valid */
+    pj_assert(PJ_ARRAY_SIZE(mandatory_attr_desc)==
+	      PJ_STUN_ATTR_END_MANDATORY_ATTR+1);
+    pj_assert(mandatory_attr_desc[PJ_STUN_ATTR_END_MANDATORY_ATTR].decode_attr
+	      == NULL);
+    pj_assert(mandatory_attr_desc[PJ_STUN_ATTR_USE_CANDIDATE].decode_attr 
+	      == &decode_empty_attr);
+    pj_assert(PJ_ARRAY_SIZE(extended_attr_desc) ==
+	      PJ_STUN_ATTR_END_EXTENDED_ATTR-PJ_STUN_ATTR_START_EXTENDED_ATTR);
+
+    if (attr_type < PJ_STUN_ATTR_END_MANDATORY_ATTR)
+	desc = &mandatory_attr_desc[attr_type];
+    else if (attr_type >= PJ_STUN_ATTR_START_EXTENDED_ATTR &&
+	     attr_type < PJ_STUN_ATTR_END_EXTENDED_ATTR)
+	desc = &extended_attr_desc[attr_type-PJ_STUN_ATTR_START_EXTENDED_ATTR];
+    else
+	return NULL;
+
+    return desc->decode_attr == NULL ? NULL : desc;
+}
+
+
+/*
+ * Get STUN attribute name.
+ */
+PJ_DEF(const char*) pj_stun_get_attr_name(unsigned attr_type)
+{
+    const struct attr_desc *attr_desc;
+
+    attr_desc = find_attr_desc(attr_type);
+    if (!attr_desc || attr_desc->name==NULL)
+	return "???";
+
+    return attr_desc->name;
+}
+
+
+/**
+ * Get STUN standard reason phrase for the specified error code.
+ */
+PJ_DEF(pj_str_t) pj_stun_get_err_reason(int err_code)
+{
+#if 0
+    /* Find error using linear search */
+    unsigned i;
+
+    for (i=0; i<PJ_ARRAY_SIZE(stun_err_msg_map); ++i) {
+	if (stun_err_msg_map[i].err_code == err_code)
+	    return pj_str((char*)stun_err_msg_map[i].err_msg);
+    }
+    return pj_str(NULL);
+#else
+    /* Find error message using binary search */
+    int first = 0;
+    int n = PJ_ARRAY_SIZE(stun_err_msg_map);
+
+    while (n > 0) {
+	int half = n/2;
+	int mid = first + half;
+
+	if (stun_err_msg_map[mid].err_code < err_code) {
+	    first = mid+1;
+	    n -= (half+1);
+	} else if (stun_err_msg_map[mid].err_code > err_code) {
+	    n = half;
+	} else {
+	    first = mid;
+	    break;
+	}
+    }
+
+
+    if (stun_err_msg_map[first].err_code == err_code) {
+	return pj_str((char*)stun_err_msg_map[first].err_msg);
+    } else {
+	return pj_str(NULL);
+    }
+#endif
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+
+#define INIT_ATTR(a,t,l)    (a)->hdr.type=(pj_uint16_t)(t), \
+			    (a)->hdr.length=(pj_uint16_t)(l)
+#define ATTR_HDR_LEN	    4
+
+static pj_uint16_t GETVAL16H(const pj_uint8_t *buf, unsigned pos)
+{
+    return (pj_uint16_t) ((buf[pos + 0] << 8) | \
+			  (buf[pos + 1] << 0));
+}
+
+static pj_uint16_t GETVAL16N(const pj_uint8_t *buf, unsigned pos)
+{
+    return pj_htons(GETVAL16H(buf,pos));
+}
+
+static void PUTVAL16H(pj_uint8_t *buf, unsigned pos, pj_uint16_t hval)
+{
+    buf[pos+0] = (pj_uint8_t) ((hval & 0xFF00) >> 8);
+    buf[pos+1] = (pj_uint8_t) ((hval & 0x00FF) >> 0);
+}
+
+static pj_uint32_t GETVAL32H(const pj_uint8_t *buf, unsigned pos)
+{
+    return (pj_uint32_t) ((buf[pos + 0] << 24UL) | \
+	                  (buf[pos + 1] << 16UL) | \
+	                  (buf[pos + 2] <<  8UL) | \
+			  (buf[pos + 3] <<  0UL));
+}
+
+static pj_uint32_t GETVAL32N(const pj_uint8_t *buf, unsigned pos)
+{
+    return pj_htonl(GETVAL32H(buf,pos));
+}
+
+static void PUTVAL32H(pj_uint8_t *buf, unsigned pos, pj_uint32_t hval)
+{
+    buf[pos+0] = (pj_uint8_t) ((hval & 0xFF000000UL) >> 24);
+    buf[pos+1] = (pj_uint8_t) ((hval & 0x00FF0000UL) >> 16);
+    buf[pos+2] = (pj_uint8_t) ((hval & 0x0000FF00UL) >>  8);
+    buf[pos+3] = (pj_uint8_t) ((hval & 0x000000FFUL) >>  0);
+}
+
+static void GETVAL64H(const pj_uint8_t *buf, unsigned pos, pj_timestamp *ts)
+{
+    ts->u32.hi = GETVAL32H(buf, pos);
+    ts->u32.lo = GETVAL32H(buf, pos+4);
+}
+
+static void PUTVAL64H(pj_uint8_t *buf, unsigned pos, const pj_timestamp *ts)
+{
+    PUTVAL32H(buf, pos, ts->u32.hi);
+    PUTVAL32H(buf, pos+4, ts->u32.lo);
+}
+
+
+static void GETATTRHDR(const pj_uint8_t *buf, pj_stun_attr_hdr *hdr)
+{
+    hdr->type = GETVAL16H(buf, 0);
+    hdr->length = GETVAL16H(buf, 2);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+ * STUN generic IP address container
+ */
+#define STUN_GENERIC_IP_ADDR_LEN	8
+
+/*
+ * Create a generic STUN IP address attribute for IPv4 address.
+ */
+PJ_DEF(pj_status_t) 
+pj_stun_sockaddr_attr_create(pj_pool_t *pool,
+			     int attr_type,
+			     pj_bool_t xor_ed,
+			     const pj_sockaddr_t *addr,
+			     unsigned addr_len,
+			     pj_stun_sockaddr_attr **p_attr)
+{
+    pj_stun_sockaddr_attr *attr;
+
+    PJ_ASSERT_RETURN(pool && addr_len && addr && p_attr, PJ_EINVAL);
+    PJ_ASSERT_RETURN(addr_len == sizeof(pj_sockaddr_in) ||
+		     addr_len == sizeof(pj_sockaddr_in6), PJ_EINVAL);
+
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_sockaddr_attr);
+    INIT_ATTR(attr, attr_type, STUN_GENERIC_IP_ADDR_LEN);
+
+    pj_memcpy(&attr->sockaddr, addr, addr_len);
+    attr->xor_ed = xor_ed;
+
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create and add generic STUN IP address attribute to a STUN message.
+ */
+PJ_DEF(pj_status_t) 
+pj_stun_msg_add_sockaddr_attr(pj_pool_t *pool,
+			      pj_stun_msg *msg,
+			      int attr_type, 
+			      pj_bool_t xor_ed,
+			      const pj_sockaddr_t *addr,
+			      unsigned addr_len)
+{
+    pj_stun_sockaddr_attr *attr;
+    pj_status_t status;
+
+    status = pj_stun_sockaddr_attr_create(pool, attr_type, xor_ed,
+					         addr, addr_len, &attr);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return pj_stun_msg_add_attr(msg, &attr->hdr);
+}
+
+static pj_status_t decode_sockaddr_attr(pj_pool_t *pool, 
+				        const pj_uint8_t *buf, 
+				        void **p_attr)
+{
+    pj_stun_sockaddr_attr *attr;
+    pj_uint32_t val;
+
+    /* Create the attribute */
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_sockaddr_attr);
+    GETATTRHDR(buf, &attr->hdr);
+
+    /* Check that the attribute length is valid */
+    if (attr->hdr.length != STUN_GENERIC_IP_ADDR_LEN)
+	return PJNATH_ESTUNINATTRLEN;
+
+    /* Check address family */
+    val = *(pj_uint8_t*)(buf + ATTR_HDR_LEN + 1);
+
+    /* Check address family is valid (only supports ipv4 for now) */
+    if (val != 1)
+	return PJNATH_ESTUNIPV6NOTSUPP;
+
+    /* Get port and address */
+    pj_sockaddr_in_init(&attr->sockaddr.ipv4, NULL, 0);
+    attr->sockaddr.ipv4.sin_port = GETVAL16N(buf, ATTR_HDR_LEN+2);
+    attr->sockaddr.ipv4.sin_addr.s_addr = GETVAL32N(buf, ATTR_HDR_LEN+4);
+
+    /* Done */
+    *p_attr = (void*)attr;
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t decode_xored_sockaddr_attr(pj_pool_t *pool, 
+					      const pj_uint8_t *buf, 
+					      void **p_attr)
+{
+    pj_stun_sockaddr_attr *attr;
+    pj_status_t status;
+
+    status = decode_sockaddr_attr(pool, buf, p_attr);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    attr = *(pj_stun_sockaddr_attr**)p_attr;
+
+    attr->xor_ed = PJ_TRUE;
+    attr->sockaddr.ipv4.sin_port ^= pj_htons(0x2112);
+    attr->sockaddr.ipv4.sin_addr.s_addr ^= pj_htonl(0x2112A442);
+
+    /* Done */
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t encode_sockaddr_attr(const void *a, pj_uint8_t *buf, 
+				        unsigned len, unsigned *printed)
+{
+    enum {
+	ATTR_LEN = ATTR_HDR_LEN + STUN_GENERIC_IP_ADDR_LEN
+    };
+    pj_uint8_t *start_buf = buf;
+    const pj_stun_sockaddr_attr *ca = 
+	(const pj_stun_sockaddr_attr *)a;
+
+    if (len < ATTR_LEN) 
+	return PJ_ETOOSMALL;
+
+    /* Copy and convert headers to network byte order */
+    PUTVAL16H(buf, 0, ca->hdr.type);
+    PUTVAL16H(buf, 2, STUN_GENERIC_IP_ADDR_LEN);
+    buf += ATTR_HDR_LEN;
+    
+    /* Ignored */
+    *buf++ = '\0';
+
+    /* Family (IPv4 only for now) */
+    PJ_ASSERT_RETURN(ca->sockaddr.addr.sa_family == PJ_AF_INET, PJ_EINVAL);
+    *buf++ = 1;
+
+    if (ca->xor_ed) {
+	pj_uint32_t addr;
+	pj_uint16_t port;
+
+	addr = ca->sockaddr.ipv4.sin_addr.s_addr;
+	port = ca->sockaddr.ipv4.sin_port;
+
+	port ^= pj_htons(0x2112);
+	addr ^= pj_htonl(0x2112A442);
+
+	/* Port */
+	pj_memcpy(buf, &port, 2);
+	buf += 2;
+
+	/* Address */
+	pj_memcpy(buf, &addr, 4);
+	buf += 4;
+
+    } else {
+	/* Port */
+	pj_memcpy(buf, &ca->sockaddr.ipv4.sin_port, 2);
+	buf += 2;
+
+	/* Address */
+	pj_memcpy(buf, &ca->sockaddr.ipv4.sin_addr, 4);
+	buf += 4;
+    }
+
+    pj_assert(buf - start_buf == ATTR_LEN);
+
+    /* Done */
+    *printed = buf - start_buf;
+
+    return PJ_SUCCESS;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+ * STUN generic string attribute
+ */
+
+/*
+ * Create a STUN generic string attribute.
+ */
+PJ_DEF(pj_status_t) 
+pj_stun_string_attr_create(pj_pool_t *pool,
+			   int attr_type,
+			   const pj_str_t *value,
+			   pj_stun_string_attr **p_attr)
+{
+    pj_stun_string_attr *attr;
+
+    PJ_ASSERT_RETURN(pool && value && p_attr, PJ_EINVAL);
+
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_string_attr);
+    INIT_ATTR(attr, attr_type, value->slen);
+    pj_strdup(pool, &attr->value, value);
+
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create and add STUN generic string attribute to the message.
+ */
+PJ_DEF(pj_status_t) 
+pj_stun_msg_add_string_attr(pj_pool_t *pool,
+			    pj_stun_msg *msg,
+			    int attr_type,
+			    const pj_str_t *value)
+{
+    pj_stun_string_attr *attr = NULL;
+    pj_status_t status;
+
+    status = pj_stun_string_attr_create(pool, attr_type, value, 
+						&attr);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return pj_stun_msg_add_attr(msg, &attr->hdr);
+}
+
+
+static pj_status_t decode_string_attr(pj_pool_t *pool, 
+				      const pj_uint8_t *buf, 
+				      void **p_attr)
+{
+    pj_stun_string_attr *attr;
+    pj_str_t value;
+
+    /* Create the attribute */
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_string_attr);
+    GETATTRHDR(buf, &attr->hdr);
+
+    /* Get pointer to the string in the message */
+    value.ptr = ((char*)buf + ATTR_HDR_LEN);
+    value.slen = attr->hdr.length;
+
+    /* Copy the string to the attribute */
+    pj_strdup(pool, &attr->value, &value);
+
+    /* Done */
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+
+}
+
+
+static pj_status_t encode_string_attr(const void *a, pj_uint8_t *buf, 
+				      unsigned len, unsigned *printed)
+{
+    const pj_stun_string_attr *ca = 
+	(const pj_stun_string_attr*)a;
+
+    /* Calculated total attr_len (add padding if necessary) */
+    *printed = (ca->value.slen + ATTR_HDR_LEN + 3) & (~3);
+    if (len < *printed) {
+	*printed = 0;
+	return PJ_ETOOSMALL;
+    }
+
+    PUTVAL16H(buf, 0, ca->hdr.type);
+    PUTVAL16H(buf, 2, (pj_uint16_t)ca->value.slen);
+    
+
+    /* Copy the string */
+    pj_memcpy(buf+ATTR_HDR_LEN, ca->value.ptr, ca->value.slen);
+
+    /* Done */
+    return PJ_SUCCESS;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+ * STUN empty attribute (used by USE-CANDIDATE).
+ */
+
+/*
+ * Create a STUN empty attribute.
+ */
+PJ_DEF(pj_status_t) 
+pj_stun_empty_attr_create(pj_pool_t *pool,
+			  int attr_type,
+			  pj_stun_empty_attr **p_attr)
+{
+    pj_stun_empty_attr *attr;
+
+    PJ_ASSERT_RETURN(pool && p_attr, PJ_EINVAL);
+
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_empty_attr);
+    INIT_ATTR(attr, attr_type, 0);
+
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create STUN empty attribute and add the attribute to the message.
+ */
+PJ_DEF(pj_status_t) pj_stun_msg_add_empty_attr( pj_pool_t *pool,
+						pj_stun_msg *msg,
+						int attr_type)
+{
+    pj_stun_empty_attr *attr = NULL;
+    pj_status_t status;
+
+    status = pj_stun_empty_attr_create(pool, attr_type, &attr);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return pj_stun_msg_add_attr(msg, &attr->hdr);
+}
+
+static pj_status_t decode_empty_attr(pj_pool_t *pool, 
+				     const pj_uint8_t *buf, 
+				     void **p_attr)
+{
+    pj_stun_empty_attr *attr;
+
+    /* Check that the struct address is valid */
+    pj_assert(sizeof(pj_stun_empty_attr) == ATTR_HDR_LEN);
+
+    /* Create the attribute */
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_empty_attr);
+    GETATTRHDR(buf, &attr->hdr);
+
+    /* Check that the attribute length is valid */
+    if (attr->hdr.length != 0)
+	return PJNATH_ESTUNINATTRLEN;
+
+    /* Done */
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t encode_empty_attr(const void *a, pj_uint8_t *buf, 
+				     unsigned len, unsigned *printed)
+{
+    const pj_stun_empty_attr *ca = (pj_stun_empty_attr*)a;
+
+    if (len < ATTR_HDR_LEN) 
+	return PJ_ETOOSMALL;
+
+    PUTVAL16H(buf, 0, ca->hdr.type);
+    PUTVAL16H(buf, 2, 0);
+
+    /* Done */
+    *printed = ATTR_HDR_LEN;
+
+    return PJ_SUCCESS;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+ * STUN generic 32bit integer attribute.
+ */
+
+/*
+ * Create a STUN generic 32bit value attribute.
+ */
+PJ_DEF(pj_status_t) 
+pj_stun_uint_attr_create(pj_pool_t *pool,
+			 int attr_type,
+			 pj_uint32_t value,
+			 pj_stun_uint_attr **p_attr)
+{
+    pj_stun_uint_attr *attr;
+
+    PJ_ASSERT_RETURN(pool && p_attr, PJ_EINVAL);
+
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_uint_attr);
+    INIT_ATTR(attr, attr_type, 4);
+    attr->value = value;
+
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+}
+
+/* Create and add STUN generic 32bit value attribute to the message. */
+PJ_DEF(pj_status_t) 
+pj_stun_msg_add_uint_attr(pj_pool_t *pool,
+			  pj_stun_msg *msg,
+			  int attr_type,
+			  pj_uint32_t value)
+{
+    pj_stun_uint_attr *attr = NULL;
+    pj_status_t status;
+
+    status = pj_stun_uint_attr_create(pool, attr_type, value, &attr);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return pj_stun_msg_add_attr(msg, &attr->hdr);
+}
+
+static pj_status_t decode_uint_attr(pj_pool_t *pool, 
+				    const pj_uint8_t *buf, 
+				    void **p_attr)
+{
+    pj_stun_uint_attr *attr;
+
+    /* Create the attribute */
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_uint_attr);
+    GETATTRHDR(buf, &attr->hdr);
+
+    attr->value = GETVAL32H(buf, 4);
+
+    /* Check that the attribute length is valid */
+    if (attr->hdr.length != 4)
+	return PJNATH_ESTUNINATTRLEN;
+
+    /* Done */
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t encode_uint_attr(const void *a, pj_uint8_t *buf, 
+				    unsigned len, unsigned *printed)
+{
+    const pj_stun_uint_attr *ca = (const pj_stun_uint_attr*)a;
+
+    if (len < 8) 
+	return PJ_ETOOSMALL;
+
+    PUTVAL16H(buf, 0, ca->hdr.type);
+    PUTVAL16H(buf, 2, (pj_uint16_t)4);
+    PUTVAL32H(buf, 4, ca->value);
+    
+    /* Done */
+    *printed = 8;
+
+    return PJ_SUCCESS;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+ * Create a STUN generic 64bit value attribute.
+ */
+PJ_DEF(pj_status_t) 
+pj_stun_uint64_attr_create(pj_pool_t *pool,
+			   int attr_type,
+			   const pj_timestamp *value,
+			   pj_stun_uint64_attr **p_attr)
+{
+    pj_stun_uint64_attr *attr;
+
+    PJ_ASSERT_RETURN(pool && p_attr, PJ_EINVAL);
+
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_uint64_attr);
+    INIT_ATTR(attr, attr_type, 8);
+
+    if (value) {
+	attr->value.u32.hi = value->u32.hi;
+	attr->value.u32.lo = value->u32.lo;
+    }
+
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+}
+
+/* Create and add STUN generic 64bit value attribute to the message. */
+PJ_DEF(pj_status_t)  pj_stun_msg_add_uint64_attr(pj_pool_t *pool,
+					         pj_stun_msg *msg,
+					         int attr_type,
+					         const pj_timestamp *value)
+{
+    pj_stun_uint64_attr *attr = NULL;
+    pj_status_t status;
+
+    status = pj_stun_uint64_attr_create(pool, attr_type, value, &attr);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return pj_stun_msg_add_attr(msg, &attr->hdr);
+}
+
+static pj_status_t decode_uint64_attr(pj_pool_t *pool, 
+				      const pj_uint8_t *buf, 
+				      void **p_attr)
+{
+    pj_stun_uint64_attr *attr;
+
+    /* Create the attribute */
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_uint64_attr);
+    GETATTRHDR(buf, &attr->hdr);
+
+    if (attr->hdr.length != 8)
+	return PJNATH_ESTUNINATTRLEN;
+
+    GETVAL64H(buf, 4, &attr->value);	
+
+    /* Done */
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t encode_uint64_attr(const void *a, pj_uint8_t *buf, 
+				      unsigned len, unsigned *printed)
+{
+    const pj_stun_uint64_attr *ca = (const pj_stun_uint64_attr*)a;
+
+    if (len < 12) 
+	return PJ_ETOOSMALL;
+
+    PUTVAL16H(buf, 0, ca->hdr.type);
+    PUTVAL16H(buf, 2, (pj_uint16_t)8);
+    PUTVAL64H(buf, 4, &ca->value);
+
+    /* Done */
+    *printed = 12;
+
+    return PJ_SUCCESS;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+ * STUN MESSAGE-INTEGRITY attribute.
+ */
+
+/*
+ * Create a STUN MESSAGE-INTEGRITY attribute.
+ */
+PJ_DEF(pj_status_t) 
+pj_stun_msgint_attr_create(pj_pool_t *pool,
+			   pj_stun_msgint_attr **p_attr)
+{
+    pj_stun_msgint_attr *attr;
+
+    PJ_ASSERT_RETURN(pool && p_attr, PJ_EINVAL);
+
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_msgint_attr);
+    INIT_ATTR(attr, PJ_STUN_ATTR_MESSAGE_INTEGRITY, 20);
+
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pj_stun_msg_add_msgint_attr(pj_pool_t *pool,
+						pj_stun_msg *msg)
+{
+    pj_stun_msgint_attr *attr = NULL;
+    pj_status_t status;
+
+    status = pj_stun_msgint_attr_create(pool, &attr);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return pj_stun_msg_add_attr(msg, &attr->hdr);
+}
+
+static pj_status_t decode_msgint_attr(pj_pool_t *pool, 
+				      const pj_uint8_t *buf,
+				      void **p_attr)
+{
+    pj_stun_msgint_attr *attr;
+
+    /* Create attribute */
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_msgint_attr);
+    GETATTRHDR(buf, &attr->hdr);
+
+    /* Check that the attribute length is valid */
+    if (attr->hdr.length != 20)
+	return PJNATH_ESTUNINATTRLEN;
+
+    /* Copy hmac */
+    pj_memcpy(attr->hmac, buf+4, 20);
+
+    /* Done */
+    *p_attr = attr;
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t encode_msgint_attr(const void *a, pj_uint8_t *buf, 
+				      unsigned len, unsigned *printed)
+{
+    const pj_stun_msgint_attr *ca = (const pj_stun_msgint_attr*)a;
+
+    if (len < 24) 
+	return PJ_ETOOSMALL;
+
+    /* Copy and convert attribute to network byte order */
+    PUTVAL16H(buf, 0, ca->hdr.type);
+    PUTVAL16H(buf, 2, ca->hdr.length);
+
+    pj_memcpy(buf+4, ca->hmac, 20);
+
+    /* Done */
+    *printed = 24;
+
+    return PJ_SUCCESS;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+ * STUN ERROR-CODE
+ */
+
+/*
+ * Create a STUN ERROR-CODE attribute.
+ */
+PJ_DEF(pj_status_t) 
+pj_stun_errcode_attr_create(pj_pool_t *pool,
+			    int err_code,
+			    const pj_str_t *err_reason,
+			    pj_stun_errcode_attr **p_attr)
+{
+    pj_stun_errcode_attr *attr;
+    char err_buf[80];
+    pj_str_t str;
+
+    PJ_ASSERT_RETURN(pool && err_code && p_attr, PJ_EINVAL);
+
+    if (err_reason == NULL) {
+	str = pj_stun_get_err_reason(err_code);
+	if (str.slen == 0) {
+	    str.slen = pj_ansi_snprintf(err_buf, sizeof(err_buf),
+				        "Unknown error %d", err_code);
+	    str.ptr = err_buf;
+	}
+	err_reason = &str;
+    }
+
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_errcode_attr);
+    INIT_ATTR(attr, PJ_STUN_ATTR_ERROR_CODE, 4+err_reason->slen);
+    attr->err_code = err_code;
+    pj_strdup(pool, &attr->reason, err_reason);
+
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pj_stun_msg_add_errcode_attr(pj_pool_t *pool,
+						 pj_stun_msg *msg,
+						 int err_code,
+						 const pj_str_t *err_reason)
+{
+    pj_stun_errcode_attr *err_attr = NULL;
+    pj_status_t status;
+
+    status = pj_stun_errcode_attr_create(pool, err_code, err_reason,
+					 &err_attr);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return pj_stun_msg_add_attr(msg, &err_attr->hdr);
+}
+
+static pj_status_t decode_errcode_attr(pj_pool_t *pool, 
+				       const pj_uint8_t *buf,
+				       void **p_attr)
+{
+    pj_stun_errcode_attr *attr;
+    pj_str_t value;
+
+    /* Create the attribute */
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_errcode_attr);
+    GETATTRHDR(buf, &attr->hdr);
+
+    attr->err_code = buf[6] * 100 + buf[7];
+
+    /* Get pointer to the string in the message */
+    value.ptr = ((char*)buf + ATTR_HDR_LEN + 4);
+    value.slen = attr->hdr.length - 4;
+
+    /* Copy the string to the attribute */
+    pj_strdup(pool, &attr->reason, &value);
+
+    /* Done */
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t encode_errcode_attr(const void *a, pj_uint8_t *buf, 
+				       unsigned len, unsigned *printed)
+{
+    const pj_stun_errcode_attr *ca = 
+	(const pj_stun_errcode_attr*)a;
+
+    if (len < ATTR_HDR_LEN + 4 + (unsigned)ca->reason.slen) 
+	return PJ_ETOOSMALL;
+
+    /* Copy and convert attribute to network byte order */
+    PUTVAL16H(buf, 0, ca->hdr.type);
+    PUTVAL16H(buf, 2, (pj_uint16_t)(4 + ca->reason.slen));
+    PUTVAL16H(buf, 4, 0);
+    buf[6] = (pj_uint8_t)(ca->err_code / 100);
+    buf[7] = (pj_uint8_t)(ca->err_code % 100);
+
+    /* Copy error string */
+    pj_memcpy(buf + ATTR_HDR_LEN + 4, ca->reason.ptr, ca->reason.slen);
+
+    /* Done */
+    *printed = (ATTR_HDR_LEN + 4 + ca->reason.slen + 3) & (~3);
+
+    return PJ_SUCCESS;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+ * STUN UNKNOWN-ATTRIBUTES attribute
+ */
+
+/*
+ * Create an empty instance of STUN UNKNOWN-ATTRIBUTES attribute.
+ *
+ * @param pool		The pool to allocate memory from.
+ * @param p_attr	Pointer to receive the attribute.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DEF(pj_status_t) 
+pj_stun_unknown_attr_create(pj_pool_t *pool,
+			    unsigned attr_cnt,
+			    const pj_uint16_t attr_array[],
+			    pj_stun_unknown_attr **p_attr)
+{
+    pj_stun_unknown_attr *attr;
+    unsigned i;
+
+    PJ_ASSERT_RETURN(pool && attr_cnt < PJ_STUN_MAX_ATTR && p_attr, PJ_EINVAL);
+
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_unknown_attr);
+    INIT_ATTR(attr, PJ_STUN_ATTR_UNKNOWN_ATTRIBUTES, attr_cnt * 2);
+
+    attr->attr_count = attr_cnt;
+    for (i=0; i<attr_cnt; ++i) {
+	attr->attrs[i] = attr_array[i];
+    }
+
+    /* If the number of unknown attributes is an odd number, one of the
+     * attributes MUST be repeated in the list.
+     */
+    if ((attr_cnt & 0x01)) {
+	attr->attrs[attr_cnt] = attr_array[attr_cnt-1];
+    }
+
+    *p_attr = NULL;
+
+    return PJ_SUCCESS;
+}
+
+
+/* Create and add STUN UNKNOWN-ATTRIBUTES attribute to the message. */
+PJ_DEF(pj_status_t) 
+pj_stun_msg_add_unknown_attr(pj_pool_t *pool,
+			     pj_stun_msg *msg,
+			     unsigned attr_cnt,
+			     const pj_uint16_t attr_types[])
+{
+    pj_stun_unknown_attr *attr = NULL;
+    pj_status_t status;
+
+    status = pj_stun_unknown_attr_create(pool, attr_cnt, attr_types, &attr);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return pj_stun_msg_add_attr(msg, &attr->hdr);
+}
+
+static pj_status_t decode_unknown_attr(pj_pool_t *pool, 
+				       const pj_uint8_t *buf, 
+				       void **p_attr)
+{
+    pj_stun_unknown_attr *attr;
+    const pj_uint16_t *punk_attr;
+    unsigned i;
+
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_unknown_attr);
+    GETATTRHDR(buf, &attr->hdr);
+ 
+    attr->attr_count = (attr->hdr.length >> 1);
+    if (attr->attr_count > PJ_STUN_MAX_ATTR)
+	return PJ_ETOOMANY;
+
+    punk_attr = (const pj_uint16_t*)(buf + ATTR_HDR_LEN);
+    for (i=0; i<attr->attr_count; ++i) {
+	attr->attrs[i] = pj_ntohs(punk_attr[i]);
+    }
+
+    /* Done */
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t encode_unknown_attr(const void *a, pj_uint8_t *buf, 
+				       unsigned len, unsigned *printed)
+{
+    const pj_stun_unknown_attr *ca = (const pj_stun_unknown_attr*) a;
+    pj_uint16_t *dst_unk_attr;
+    unsigned i;
+
+    /* Check that buffer is enough */
+    if (len < ATTR_HDR_LEN + (ca->attr_count << 1))
+	return PJ_ETOOSMALL;
+
+    PUTVAL16H(buf, 0, ca->hdr.type);
+    PUTVAL16H(buf, 2, (pj_uint16_t)(ca->attr_count << 1));
+
+    /* Copy individual attribute */
+    dst_unk_attr = (pj_uint16_t*)(buf + ATTR_HDR_LEN);
+    for (i=0; i < ca->attr_count; ++i, ++dst_unk_attr) {
+	*dst_unk_attr = pj_htons(ca->attrs[i]);
+    }
+
+    /* Done */
+    *printed = (ATTR_HDR_LEN + (ca->attr_count << 1) + 3) & (~3);
+
+    return PJ_SUCCESS;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+/*
+ * STUN generic binary attribute
+ */
+
+/*
+ * Create a blank binary attribute.
+ */
+PJ_DEF(pj_status_t)
+pj_stun_binary_attr_create(pj_pool_t *pool,
+			   int attr_type,
+			   const pj_uint8_t *data,
+			   unsigned length,
+			   pj_stun_binary_attr **p_attr)
+{
+    pj_stun_binary_attr *attr;
+
+    PJ_ASSERT_RETURN(pool && attr_type && p_attr, PJ_EINVAL);
+
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_binary_attr);
+    INIT_ATTR(attr, attr_type, length);
+
+    if (data && length) {
+	attr->length = length;
+	attr->data = pj_pool_alloc(pool, length);
+	pj_memcpy(attr->data, data, length);
+    }
+
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+}
+
+
+/* Create and add binary attr. */
+PJ_DEF(pj_status_t)
+pj_stun_msg_add_binary_attr(pj_pool_t *pool,
+			    pj_stun_msg *msg,
+			    int attr_type,
+			    const pj_uint8_t *data,
+			    unsigned length)
+{
+    pj_stun_binary_attr *attr = NULL;
+    pj_status_t status;
+
+    status = pj_stun_binary_attr_create(pool, attr_type,
+					data, length, &attr);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return pj_stun_msg_add_attr(msg, &attr->hdr);
+}
+
+
+static pj_status_t decode_binary_attr(pj_pool_t *pool, 
+				      const pj_uint8_t *buf,
+				      void **p_attr)
+{
+    pj_stun_binary_attr *attr;
+
+    /* Create the attribute */
+    attr = PJ_POOL_ZALLOC_T(pool, pj_stun_binary_attr);
+    GETATTRHDR(buf, &attr->hdr);
+
+    /* Copy the data to the attribute */
+    attr->length = attr->hdr.length;
+    attr->data = pj_pool_alloc(pool, attr->length);
+    pj_memcpy(attr->data, buf+ATTR_HDR_LEN, attr->length);
+
+    /* Done */
+    *p_attr = attr;
+
+    return PJ_SUCCESS;
+
+}
+
+
+static pj_status_t encode_binary_attr(const void *a, pj_uint8_t *buf, 
+				      unsigned len, unsigned *printed)
+{
+    const pj_stun_binary_attr *ca = (const pj_stun_binary_attr*)a;
+
+    /* Calculated total attr_len (add padding if necessary) */
+    *printed = (ca->length + ATTR_HDR_LEN + 3) & (~3);
+    if (len < *printed)
+	return PJ_ETOOSMALL;
+
+    PUTVAL16H(buf, 0, ca->hdr.type);
+    PUTVAL16H(buf, 2, (pj_uint16_t) ca->length);
+
+    /* Copy the data */
+    pj_memcpy(buf+ATTR_HDR_LEN, ca->data, ca->length);
+
+    /* Done */
+    return PJ_SUCCESS;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+/*
+ * Create a blank STUN message.
+ */
+PJ_DEF(pj_status_t) pj_stun_msg_create( pj_pool_t *pool,
+					unsigned msg_type,
+					pj_uint32_t magic,
+					const pj_uint8_t tsx_id[12],
+					pj_stun_msg **p_msg)
+{
+    pj_stun_msg *msg;
+
+    PJ_ASSERT_RETURN(pool && msg_type && p_msg, PJ_EINVAL);
+
+    msg = PJ_POOL_ZALLOC_T(pool, pj_stun_msg);
+    msg->hdr.type = (pj_uint16_t) msg_type;
+    msg->hdr.magic = magic;
+
+    if (tsx_id) {
+	pj_memcpy(&msg->hdr.tsx_id, tsx_id, sizeof(msg->hdr.tsx_id));
+    } else {
+	struct transaction_id
+	{
+	    pj_uint32_t	    proc_id;
+	    pj_uint32_t	    random;
+	    pj_uint32_t	    counter;
+	} id;
+	static pj_uint32_t pj_stun_tsx_id_counter;
+
+	id.proc_id = pj_getpid();
+	id.random = pj_rand();
+	id.counter = pj_stun_tsx_id_counter++;
+
+	pj_memcpy(&msg->hdr.tsx_id, &id, sizeof(msg->hdr.tsx_id));
+    }
+
+    *p_msg = msg;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Add STUN attribute to STUN message.
+ */
+PJ_DEF(pj_status_t) pj_stun_msg_add_attr(pj_stun_msg *msg,
+					 pj_stun_attr_hdr *attr)
+{
+    PJ_ASSERT_RETURN(msg && attr, PJ_EINVAL);
+    PJ_ASSERT_RETURN(msg->attr_count < PJ_STUN_MAX_ATTR, PJ_ETOOMANY);
+
+    msg->attr[msg->attr_count++] = attr;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Check that the PDU is potentially a valid STUN message.
+ */
+PJ_DEF(pj_status_t) pj_stun_msg_check(const pj_uint8_t *pdu, unsigned pdu_len,
+				      unsigned options)
+{
+    unsigned msg_len;
+
+    PJ_ASSERT_RETURN(pdu, PJ_EINVAL);
+
+    if (pdu_len < sizeof(pj_stun_msg_hdr))
+	return PJNATH_EINSTUNMSGLEN;
+
+    /* First byte of STUN message is always 0x00 or 0x01. */
+    if (*pdu != 0x00 && *pdu != 0x01)
+	return PJNATH_EINSTUNMSGTYPE;
+
+    /* Check the PDU length */
+    msg_len = GETVAL16H(pdu, 2);
+    if ((msg_len + 20 > pdu_len) || 
+	((options & PJ_STUN_IS_DATAGRAM) && msg_len + 20 != pdu_len))
+    {
+	return PJNATH_EINSTUNMSGLEN;
+    }
+
+    /* If magic is set, then there is great possibility that this is
+     * a STUN message.
+     */
+    if (GETVAL32H(pdu, 4) == PJ_STUN_MAGIC) {
+
+	/* Check if FINGERPRINT attribute is present */
+	if (GETVAL16H(pdu, msg_len + 20) == PJ_STUN_ATTR_FINGERPRINT) {
+	    pj_uint16_t attr_len = GETVAL16H(pdu, msg_len + 22);
+	    pj_uint32_t fingerprint = GETVAL32H(pdu, msg_len + 24);
+	    pj_uint32_t crc;
+
+	    if (attr_len != 4)
+		return PJNATH_ESTUNINATTRLEN;
+
+	    crc = pj_crc32_calc(pdu, msg_len + 20);
+	    crc ^= STUN_XOR_FINGERPRINT;
+
+	    if (crc != fingerprint)
+		return PJNATH_ESTUNFINGERPRINT;
+	}
+    }
+
+    /* Could be a STUN message */
+    return PJ_SUCCESS;
+}
+
+
+/* Create error response */
+PJ_DEF(pj_status_t) pj_stun_msg_create_response(pj_pool_t *pool,
+						const pj_stun_msg *req_msg,
+						unsigned err_code,
+						const pj_str_t *err_msg,
+						pj_stun_msg **p_response)
+{
+    unsigned msg_type = req_msg->hdr.type;
+    pj_stun_msg *response = NULL;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(pool && p_response, PJ_EINVAL);
+
+    PJ_ASSERT_RETURN(PJ_STUN_IS_REQUEST(msg_type), 
+		     PJNATH_EINSTUNMSGTYPE);
+
+    /* Create response or error response */
+    if (err_code)
+	msg_type |= PJ_STUN_ERROR_RESPONSE_BIT;
+    else
+	msg_type |= PJ_STUN_RESPONSE_BIT;
+
+    status = pj_stun_msg_create(pool, msg_type, req_msg->hdr.magic, 
+				req_msg->hdr.tsx_id, &response);
+    if (status != PJ_SUCCESS) {
+	return status;
+    }
+
+    /* Add error code attribute */
+    if (err_code) {
+	status = pj_stun_msg_add_errcode_attr(pool, response, 
+					      err_code, err_msg);
+	if (status != PJ_SUCCESS) {
+	    return status;
+	}
+    }
+
+    *p_response = response;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Parse incoming packet into STUN message.
+ */
+PJ_DEF(pj_status_t) pj_stun_msg_decode(pj_pool_t *pool,
+				       const pj_uint8_t *pdu,
+				       unsigned pdu_len,
+				       unsigned options,
+				       pj_stun_msg **p_msg,
+				       unsigned *p_parsed_len,
+				       pj_stun_msg **p_response)
+{
+    
+    pj_stun_msg *msg;
+    unsigned uattr_cnt;
+    const pj_uint8_t *start_pdu = pdu;
+    pj_bool_t has_msg_int = PJ_FALSE;
+    pj_bool_t has_fingerprint = PJ_FALSE;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(options);
+
+    PJ_ASSERT_RETURN(pool && pdu && pdu_len && p_msg, PJ_EINVAL);
+    PJ_ASSERT_RETURN(sizeof(pj_stun_msg_hdr) == 20, PJ_EBUG);
+
+    if (p_parsed_len)
+	*p_parsed_len = 0;
+    if (p_response)
+	*p_response = NULL;
+
+    /* Check if this is a STUN message, if necessary */
+    if (options & PJ_STUN_CHECK_PACKET) {
+	status = pj_stun_msg_check(pdu, pdu_len, options);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    /* Create the message, copy the header, and convert to host byte order */
+    msg = PJ_POOL_ZALLOC_T(pool, pj_stun_msg);
+    pj_memcpy(&msg->hdr, pdu, sizeof(pj_stun_msg_hdr));
+    msg->hdr.type = pj_ntohs(msg->hdr.type);
+    msg->hdr.length = pj_ntohs(msg->hdr.length);
+    msg->hdr.magic = pj_ntohl(msg->hdr.magic);
+
+    pdu += sizeof(pj_stun_msg_hdr);
+    /* pdu_len -= sizeof(pj_stun_msg_hdr); */
+    pdu_len = msg->hdr.length;
+
+    /* No need to create response if this is not a request */
+    if (!PJ_STUN_IS_REQUEST(msg->hdr.type))
+	p_response = NULL;
+
+    /* Parse attributes */
+    uattr_cnt = 0;
+    while (pdu_len >= 4) {
+	unsigned attr_type, attr_val_len;
+	const struct attr_desc *adesc;
+
+	/* Get attribute type and length. If length is not aligned
+	 * to 4 bytes boundary, add padding.
+	 */
+	attr_type = GETVAL16H(pdu, 0);
+	attr_val_len = GETVAL16H(pdu, 2);
+	attr_val_len = (attr_val_len + 3) & (~3);
+
+	/* Check length */
+	if (pdu_len < attr_val_len) {
+	    pj_str_t err_msg;
+	    char err_msg_buf[80];
+
+	    err_msg.ptr = err_msg_buf;
+	    err_msg.slen = pj_ansi_snprintf(err_msg_buf, sizeof(err_msg_buf),
+					    "Attribute %s has invalid length",
+					    pj_stun_get_attr_name(attr_type));
+
+	    PJ_LOG(4,(THIS_FILE, "Error decoding message: %.*s",
+		      (int)err_msg.slen, err_msg.ptr));
+
+	    if (p_response) {
+		pj_stun_msg_create_response(pool, msg, 
+					    PJ_STUN_SC_BAD_REQUEST, 
+					    &err_msg, p_response);
+	    }
+	    return PJNATH_ESTUNINATTRLEN;
+	}
+
+	/* Get the attribute descriptor */
+	adesc = find_attr_desc(attr_type);
+
+	if (adesc == NULL) {
+	    /* Unrecognized attribute */
+
+	    PJ_LOG(4,(THIS_FILE, "Unrecognized attribute type %d", 
+		      attr_type));
+
+	    /* Is this a fatal condition? */
+	    if (attr_type <= 0x7FFF) {
+		/* This is a mandatory attribute, we must return error
+		 * if we don't understand the attribute.
+		 */
+		if (p_response) {
+		    unsigned err_code = PJ_STUN_SC_UNKNOWN_ATTRIBUTE;
+
+		    status = pj_stun_msg_create_response(pool, msg,
+							 err_code, NULL, 
+							 p_response);
+		    if (status==PJ_SUCCESS) {
+			pj_uint16_t d = (pj_uint16_t)attr_type;
+			pj_stun_msg_add_unknown_attr(pool, *p_response, 1, &d);
+		    }
+		}
+
+		return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_UNKNOWN_ATTRIBUTE);
+	    }
+
+	} else {
+	    void *attr;
+	    char err_msg1[PJ_ERR_MSG_SIZE],
+		 err_msg2[PJ_ERR_MSG_SIZE];
+
+	    /* Parse the attribute */
+	    status = (adesc->decode_attr)(pool, pdu, &attr);
+
+	    if (status != PJ_SUCCESS) {
+		pj_strerror(status, err_msg1, sizeof(err_msg1));
+
+		if (p_response) {
+		    pj_str_t e;
+
+		    e.ptr = err_msg2;
+		    e.slen= pj_ansi_snprintf(err_msg2, sizeof(err_msg2),
+					     "%s in %s",
+					     err_msg1,
+					     pj_stun_get_attr_name(attr_type));
+
+		    pj_stun_msg_create_response(pool, msg,
+						PJ_STUN_SC_BAD_REQUEST,
+						&e, p_response);
+		}
+
+		PJ_LOG(4,(THIS_FILE, 
+			  "Error parsing STUN attribute %s: %s",
+			  pj_stun_get_attr_name(attr_type), 
+			  err_msg1));
+
+		return status;
+	    }
+
+	    if (attr_type == PJ_STUN_ATTR_MESSAGE_INTEGRITY && 
+		!has_fingerprint) 
+	    {
+		if (has_msg_int) {
+		    /* Already has MESSAGE-INTEGRITY */
+		    if (p_response) {
+			pj_stun_msg_create_response(pool, msg,
+						    PJ_STUN_SC_BAD_REQUEST,
+						    NULL, p_response);
+		    }
+		    return PJNATH_ESTUNDUPATTR;
+		}
+		has_msg_int = PJ_TRUE;
+
+	    } else if (attr_type == PJ_STUN_ATTR_FINGERPRINT) {
+		if (has_fingerprint) {
+		    /* Already has FINGERPRINT */
+		    if (p_response) {
+			pj_stun_msg_create_response(pool, msg,
+						    PJ_STUN_SC_BAD_REQUEST,
+						    NULL, p_response);
+		    }
+		    return PJNATH_ESTUNDUPATTR;
+		}
+		has_fingerprint = PJ_TRUE;
+	    } else {
+		if (has_msg_int || has_fingerprint) {
+		    /* Another attribute is found which is not FINGERPRINT
+		     * after FINGERPRINT or MESSAGE-INTEGRITY */
+		    if (p_response) {
+			pj_stun_msg_create_response(pool, msg,
+						    PJ_STUN_SC_BAD_REQUEST,
+						    NULL, p_response);
+		    }
+		    return has_fingerprint ? PJNATH_ESTUNFINGERPOS :
+					     PJNATH_ESTUNMSGINTPOS;
+		}
+	    }
+
+	    /* Make sure we have rooms for the new attribute */
+	    if (msg->attr_count >= PJ_STUN_MAX_ATTR) {
+		if (p_response) {
+		    pj_stun_msg_create_response(pool, msg,
+						PJ_STUN_SC_BAD_REQUEST,
+						NULL, p_response);
+		}
+		return PJNATH_ESTUNTOOMANYATTR;
+	    }
+
+	    /* Add the attribute */
+	    msg->attr[msg->attr_count++] = (pj_stun_attr_hdr*)attr;
+	}
+
+	if (attr_val_len + 4 >= pdu_len) {
+	    pdu += pdu_len;
+	    pdu_len = 0;
+	} else {
+	    pdu += (attr_val_len + 4);
+	    pdu_len -= (attr_val_len + 4);
+	}
+    }
+
+    if (pdu_len > 0) {
+	/* Stray trailing bytes */
+	PJ_LOG(4,(THIS_FILE, 
+		  "Error decoding STUN message: unparsed trailing %d bytes",
+		  pdu_len));
+	return PJNATH_EINSTUNMSGLEN;
+    }
+
+    *p_msg = msg;
+
+    if (p_parsed_len)
+	*p_parsed_len = (pdu - start_pdu);
+
+    return PJ_SUCCESS;
+}
+
+/* Calculate HMAC-SHA1 key for long term credential, by getting
+ * MD5 digest of username, realm, and password. 
+ */
+void pj_stun_calc_md5_key(pj_uint8_t digest[16],
+			  const pj_str_t *realm,
+			  const pj_str_t *username,
+			  const pj_str_t *passwd)
+{
+    /* The 16-byte key for MESSAGE-INTEGRITY HMAC is formed by taking
+     * the MD5 hash of the result of concatenating the following five
+     * fields: (1) The username, with any quotes and trailing nulls
+     * removed, (2) A single colon, (3) The realm, with any quotes and
+     * trailing nulls removed, (4) A single colon, and (5) The 
+     * password, with any trailing nulls removed.
+     */
+    pj_md5_context ctx;
+    pj_str_t s;
+
+    pj_md5_init(&ctx);
+
+#define REMOVE_QUOTE(s)	if (s.slen && *s.ptr=='"') \
+		    s.ptr++, s.slen--; \
+		if (s.slen && s.ptr[s.slen-1]=='"') \
+		    s.slen--;
+
+    /* Add username */
+    s = *username;
+    REMOVE_QUOTE(s);
+    pj_md5_update(&ctx, (pj_uint8_t*)s.ptr, s.slen);
+
+    /* Add single colon */
+    pj_md5_update(&ctx, (pj_uint8_t*)":", 1);
+
+    /* Add realm */
+    s = *realm;
+    REMOVE_QUOTE(s);
+    pj_md5_update(&ctx, (pj_uint8_t*)s.ptr, s.slen);
+
+#undef REMOVE_QUOTE
+
+    /* Another colon */
+    pj_md5_update(&ctx, (pj_uint8_t*)":", 1);
+
+    /* Add password */
+    pj_md5_update(&ctx, (pj_uint8_t*)passwd->ptr, passwd->slen);
+
+    /* Done */
+    pj_md5_final(&ctx, digest);
+}
+
+
+/*
+static char *print_binary(const pj_uint8_t *data, unsigned data_len)
+{
+    static char static_buffer[1024];
+    char *buffer = static_buffer;
+    unsigned length=sizeof(static_buffer), i;
+
+    if (length < data_len * 2 + 8)
+	return "";
+
+    pj_ansi_sprintf(buffer, ", data=");
+    buffer += 7;
+
+    for (i=0; i<data_len; ++i) {
+	pj_ansi_sprintf(buffer, "%02x", (*data) & 0xFF);
+	buffer += 2;
+	data++;
+    }
+
+    pj_ansi_sprintf(buffer, "\n");
+    buffer++;
+
+    return static_buffer;
+}
+*/
+
+/*
+ * Print the message structure to a buffer.
+ */
+PJ_DEF(pj_status_t) pj_stun_msg_encode(pj_stun_msg *msg,
+				       pj_uint8_t *buf, unsigned buf_size,
+				       unsigned options,
+				       const pj_str_t *password,
+				       unsigned *p_msg_len)
+{
+    pj_stun_msg_hdr *hdr;
+    pj_uint8_t *start = buf;
+    pj_stun_realm_attr *arealm = NULL;
+    pj_stun_username_attr *auname = NULL;
+    pj_stun_msgint_attr *amsgint = NULL;
+    pj_stun_fingerprint_attr *afingerprint = NULL;
+    unsigned printed = 0;
+    pj_status_t status;
+    unsigned i;
+
+
+    PJ_ASSERT_RETURN(msg && buf && buf_size, PJ_EINVAL);
+
+    PJ_UNUSED_ARG(options);
+    PJ_ASSERT_RETURN(options == 0, PJ_EINVAL);
+
+    /* Copy the message header part and convert the header fields to
+     * network byte order
+     */
+    if (buf_size < sizeof(pj_stun_msg_hdr))
+	return PJ_ETOOSMALL;
+    pj_memcpy(buf, &msg->hdr, sizeof(pj_stun_msg_hdr));
+    hdr = (pj_stun_msg_hdr*) buf;
+    hdr->magic = pj_htonl(hdr->magic);
+    hdr->type = pj_htons(hdr->type);
+    /* We'll fill in the length later */
+
+    buf += sizeof(pj_stun_msg_hdr);
+    buf_size -= sizeof(pj_stun_msg_hdr);
+
+    /* Print each attribute */
+    for (i=0; i<msg->attr_count; ++i) {
+	const struct attr_desc *adesc;
+	const pj_stun_attr_hdr *attr_hdr = msg->attr[i];
+
+	if (attr_hdr->type == PJ_STUN_ATTR_MESSAGE_INTEGRITY) {
+	    pj_assert(amsgint == NULL);
+	    amsgint = (pj_stun_msgint_attr*) attr_hdr;
+
+	    /* Stop when encountering MESSAGE-INTEGRITY */
+	    break;
+
+	} else if (attr_hdr->type == PJ_STUN_ATTR_USERNAME) {
+	    pj_assert(auname == NULL);
+	    auname = (pj_stun_username_attr*) attr_hdr;
+
+	} else if (attr_hdr->type == PJ_STUN_ATTR_REALM) {
+	    pj_assert(arealm == NULL);
+	    arealm = (pj_stun_realm_attr*) attr_hdr;
+
+	} else if (attr_hdr->type == PJ_STUN_ATTR_FINGERPRINT) {
+	    afingerprint = (pj_stun_fingerprint_attr*) attr_hdr;
+	    break;
+	}
+
+	adesc = find_attr_desc(attr_hdr->type);
+	PJ_ASSERT_RETURN(adesc != NULL, PJ_EBUG);
+
+	status = adesc->encode_attr(attr_hdr, buf, buf_size, &printed);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	buf += printed;
+	buf_size -= printed;
+    }
+
+    /* We may have stopped printing attribute because we found
+     * MESSAGE-INTEGRITY or FINGERPRINT. Scan the rest of the
+     * attributes.
+     */
+    for ( ++i; i<msg->attr_count; ++i) {
+	const pj_stun_attr_hdr *attr_hdr = msg->attr[i];
+
+	/* There mustn't any attribute after FINGERPRINT */
+	PJ_ASSERT_RETURN(afingerprint == NULL, PJNATH_ESTUNFINGERPOS);
+
+	if (attr_hdr->type == PJ_STUN_ATTR_MESSAGE_INTEGRITY) {
+	    /* There mustn't be MESSAGE-INTEGRITY before */
+	    PJ_ASSERT_RETURN(amsgint == NULL, 
+			     PJNATH_ESTUNMSGINTPOS);
+	    amsgint = (pj_stun_msgint_attr*) attr_hdr;
+
+	} else if (attr_hdr->type == PJ_STUN_ATTR_FINGERPRINT) {
+	    afingerprint = (pj_stun_fingerprint_attr*) attr_hdr;
+	}
+    }
+
+    /* We MUST update the message length in the header NOW before
+     * calculating MESSAGE-INTEGRITY and FINGERPRINT. 
+     * Note that length is not including the 20 bytes header.
+     */
+    if (amsgint && afingerprint) {
+	msg->hdr.length = (pj_uint16_t)((buf - start) - 20 + 24 + 8);
+    } else if (amsgint) {
+	msg->hdr.length = (pj_uint16_t)((buf - start) - 20 + 24);
+    } else if (afingerprint) {
+	msg->hdr.length = (pj_uint16_t)((buf - start) - 20 + 8);
+    } else {
+	msg->hdr.length = (pj_uint16_t)((buf - start) - 20);
+    }
+
+    /* hdr->length = pj_htons(length); */
+    start[2] = (pj_uint8_t)((msg->hdr.length >> 8) & 0x00FF);
+    start[3] = (pj_uint8_t)(msg->hdr.length & 0x00FF);
+
+    /* Calculate message integrity, if present */
+    if (amsgint != NULL) {
+
+	pj_uint8_t md5_key_buf[16];
+	pj_str_t key;
+
+	/* MESSAGE-INTEGRITY must be the last attribute in the message, or
+	 * the last attribute before FINGERPRINT.
+	 */
+	if (i < msg->attr_count-2) {
+	    /* Should not happen for message generated by us */
+	    pj_assert(PJ_FALSE);
+	    return PJNATH_ESTUNMSGINTPOS;
+
+	} else if (i == msg->attr_count-2)  {
+	    if (msg->attr[i+1]->type != PJ_STUN_ATTR_FINGERPRINT) {
+		/* Should not happen for message generated by us */
+		pj_assert(PJ_FALSE);
+		return PJNATH_ESTUNMSGINTPOS;
+	    } else {
+		afingerprint = (pj_stun_fingerprint_attr*) msg->attr[i+1];
+	    }
+	}
+
+	/* Must have USERNAME attribute */
+	if (auname == NULL) {
+	    /* Should not happen for message generated by us */
+	    pj_assert(PJ_FALSE);
+	    return PJ_STATUS_FROM_STUN_CODE(PJ_STUN_SC_MISSING_USERNAME);
+	}
+
+	/* Password must be specified */
+	PJ_ASSERT_RETURN(password, PJ_EINVAL);
+
+	/* Get the key to sign the message */
+	if (arealm == NULL ) {
+	    /* For short term credential, the key is the password */
+	    key = *password;
+
+	} else {
+	    pj_stun_calc_md5_key(md5_key_buf, &arealm->value, 
+				 &auname->value, password);
+	    key.ptr = (char*) md5_key_buf;
+	    key.slen = 16;
+	}
+
+	/* Calculate HMAC-SHA1 digest */
+	pj_hmac_sha1((pj_uint8_t*)start, buf-start, 
+		     (pj_uint8_t*)key.ptr, key.slen,
+		     amsgint->hmac);
+
+	/* Put this attribute in the message */
+	status = encode_msgint_attr(amsgint, buf, buf_size, 
+			            &printed);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	buf += printed;
+	buf_size -= printed;
+    }
+
+    /* Calculate FINGERPRINT if present */
+    if (afingerprint != NULL) {
+	afingerprint->value = pj_crc32_calc(start, buf-start);
+	afingerprint->value ^= STUN_XOR_FINGERPRINT;
+
+	/* Put this attribute in the message */
+	status = encode_uint_attr(afingerprint, buf, buf_size, 
+				          &printed);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	buf += printed;
+	buf_size -= printed;
+    }
+
+    /* Done */
+    if (p_msg_len)
+	*p_msg_len = (buf - start);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Find STUN attribute in the STUN message, starting from the specified
+ * index.
+ */
+PJ_DEF(pj_stun_attr_hdr*) pj_stun_msg_find_attr( const pj_stun_msg *msg,
+						 int attr_type,
+						 unsigned index)
+{
+    PJ_ASSERT_RETURN(msg, NULL);
+
+    for (; index < msg->attr_count; ++index) {
+	if (msg->attr[index]->type == attr_type)
+	    return (pj_stun_attr_hdr*) msg->attr[index];
+    }
+
+    return NULL;
+}
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_msg_dump.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_msg_dump.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_msg_dump.c	(revision 1163)
@@ -0,0 +1,255 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 <pjnath/stun_msg.h>
+#include <pjnath/errno.h>
+#include <pj/assert.h>
+#include <pj/string.h>
+
+
+#if PJ_LOG_MAX_LEVEL > 0
+
+
+#define APPLY()		if (len < 1 || len >= (end-p)) \
+			    goto on_return; \
+			p += len
+
+static int print_binary(char *buffer, unsigned length,
+			const pj_uint8_t *data, unsigned data_len)
+{
+    unsigned i;
+
+    if (length < data_len * 2 + 8)
+	return -1;
+
+    pj_ansi_sprintf(buffer, ", data=");
+    buffer += 7;
+
+    for (i=0; i<data_len; ++i) {
+	pj_ansi_sprintf(buffer, "%02x", (*data) & 0xFF);
+	buffer += 2;
+	data++;
+    }
+
+    pj_ansi_sprintf(buffer, "\n");
+    buffer++;
+
+    return data_len * 2 + 8;
+}
+
+static int print_attr(char *buffer, unsigned length,
+		      const pj_stun_attr_hdr *ahdr)
+{
+    char *p = buffer, *end = buffer + length;
+    int len;
+
+    len = pj_ansi_snprintf(p, end-p,
+			   "  %s: length=%d",
+			   pj_stun_get_attr_name(ahdr->type),
+			   (int)ahdr->length);
+    APPLY();
+
+
+    switch (ahdr->type) {
+    case PJ_STUN_ATTR_MAPPED_ADDR:
+    case PJ_STUN_ATTR_RESPONSE_ADDR:
+    case PJ_STUN_ATTR_SOURCE_ADDR:
+    case PJ_STUN_ATTR_CHANGED_ADDR:
+    case PJ_STUN_ATTR_REFLECTED_FROM:
+    case PJ_STUN_ATTR_REMOTE_ADDR:
+    case PJ_STUN_ATTR_RELAY_ADDR:
+    case PJ_STUN_ATTR_XOR_MAPPED_ADDR:
+    case PJ_STUN_ATTR_REQ_IP:
+    case PJ_STUN_ATTR_XOR_REFLECTED_FROM:
+    case PJ_STUN_ATTR_XOR_INTERNAL_ADDR:
+    case PJ_STUN_ATTR_ALTERNATE_SERVER:
+	{
+	    const pj_stun_sockaddr_attr *attr;
+
+	    attr = (const pj_stun_sockaddr_attr*)ahdr;
+
+	    if (attr->sockaddr.addr.sa_family == PJ_AF_INET) {
+		len = pj_ansi_snprintf(p, end-p,
+				       ", IPv4 addr=%s:%d\n",
+				       pj_inet_ntoa(attr->sockaddr.ipv4.sin_addr),
+				       pj_ntohs(attr->sockaddr.ipv4.sin_port));
+
+	    } else if (attr->sockaddr.addr.sa_family == PJ_AF_INET6) {
+		len = pj_ansi_snprintf(p, end-p,
+				       ", IPv6 addr present\n");
+	    } else {
+		len = pj_ansi_snprintf(p, end-p,
+				       ", INVALID ADDRESS FAMILY!\n");
+	    }
+	}
+	break;
+
+    case PJ_STUN_ATTR_CHANGE_REQUEST:
+    case PJ_STUN_ATTR_LIFETIME:
+    case PJ_STUN_ATTR_BANDWIDTH:
+    case PJ_STUN_ATTR_REQ_ADDR_TYPE:
+    case PJ_STUN_ATTR_REQ_PORT_PROPS:
+    case PJ_STUN_ATTR_REQ_TRANSPORT:
+    case PJ_STUN_ATTR_TIMER_VAL:
+    case PJ_STUN_ATTR_PRIORITY:
+    case PJ_STUN_ATTR_FINGERPRINT:
+    case PJ_STUN_ATTR_REFRESH_INTERVAL:
+	{
+	    const pj_stun_uint_attr *attr;
+
+	    attr = (const pj_stun_uint_attr*)ahdr;
+	    len = pj_ansi_snprintf(p, end-p,
+				   ", value=%d (0x%x)\n",
+				   (pj_uint32_t)attr->value,
+				   (pj_uint32_t)attr->value);
+	}
+	break;
+
+    case PJ_STUN_ATTR_USERNAME:
+    case PJ_STUN_ATTR_PASSWORD:
+    case PJ_STUN_ATTR_REALM:
+    case PJ_STUN_ATTR_NONCE:
+    case PJ_STUN_ATTR_SERVER:
+	{
+	    const pj_stun_string_attr *attr;
+
+	    attr = (pj_stun_string_attr*)ahdr;
+	    len = pj_ansi_snprintf(p, end-p,
+				   ", value=\"%.*s\"\n",
+				   (int)attr->value.slen,
+				   attr->value.ptr);
+	}
+	break;
+
+    case PJ_STUN_ATTR_ERROR_CODE:
+	{
+	    const pj_stun_errcode_attr *attr;
+
+	    attr = (const pj_stun_errcode_attr*) ahdr;
+	    len = pj_ansi_snprintf(p, end-p,
+				   ", err_code=%d, reason=\"%.*s\"\n",
+				   attr->err_code,
+				   (int)attr->reason.slen,
+				   attr->reason.ptr);
+	}
+	break;
+
+    case PJ_STUN_ATTR_UNKNOWN_ATTRIBUTES:
+	{
+	    const pj_stun_unknown_attr *attr;
+	    unsigned j;
+
+	    attr = (const pj_stun_unknown_attr*) ahdr;
+
+	    len = pj_ansi_snprintf(p, end-p,
+				   ", unknown list:");
+	    APPLY();
+
+	    for (j=0; j<attr->attr_count; ++j) {
+		len = pj_ansi_snprintf(p, end-p,
+				       " %d",
+				       (int)attr->attrs[j]);
+		APPLY();
+	    }
+	}
+	break;
+
+    case PJ_STUN_ATTR_MESSAGE_INTEGRITY:
+	{
+	    const pj_stun_msgint_attr *attr;
+
+	    attr = (const pj_stun_msgint_attr*) ahdr;
+	    len = print_binary(p, end-p, attr->hmac, 20);
+	    APPLY();
+	}
+	break;
+
+    case PJ_STUN_ATTR_DATA:
+	{
+	    const pj_stun_binary_attr *attr;
+
+	    attr = (const pj_stun_binary_attr*) ahdr;
+	    len = print_binary(p, end-p, attr->data, attr->length);
+	    APPLY();
+	}
+	break;
+    case PJ_STUN_ATTR_USE_CANDIDATE:
+    default:
+	len = pj_ansi_snprintf(p, end-p, "\n");
+
+	break;
+    }
+
+    APPLY();
+
+    return (p-buffer);
+
+on_return:
+    return len;
+}
+
+
+/*
+ * Dump STUN message to a printable string output.
+ */
+PJ_DEF(char*) pj_stun_msg_dump(const pj_stun_msg *msg,
+			       char *buffer,
+			       unsigned length,
+			       unsigned *printed_len)
+{
+    char *p, *end;
+    int len;
+    unsigned i;
+
+    PJ_ASSERT_RETURN(msg && buffer && length, NULL);
+
+    p = buffer;
+    end = buffer + length;
+
+    len = pj_ansi_snprintf(p, end-p, "STUN %s %s\n",
+			   pj_stun_get_method_name(msg->hdr.type),
+			   pj_stun_get_class_name(msg->hdr.type));
+    APPLY();
+
+    len = pj_ansi_snprintf(p, end-p, 
+			   " Hdr: length=%d, magic=%08x, tsx_id=%08x%08x%08x\n"
+			   " Attributes:\n",
+			   msg->hdr.length,
+			   msg->hdr.magic,
+			   *(pj_uint32_t*)&msg->hdr.tsx_id[0],
+			   *(pj_uint32_t*)&msg->hdr.tsx_id[4],
+			   *(pj_uint32_t*)&msg->hdr.tsx_id[8]);
+    APPLY();
+
+    for (i=0; i<msg->attr_count; ++i) {
+	len = print_attr(p, end-p, msg->attr[i]);
+	APPLY();
+    }
+
+on_return:
+    *p = '\0';
+    if (printed_len)
+	*printed_len = (p-buffer);
+    return buffer;
+
+#undef APPLY
+}
+
+
+#endif	/* PJ_LOG_MAX_LEVEL > 0 */
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_session.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_session.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_session.c	(revision 1163)
@@ -0,0 +1,1019 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 <pjnath/stun_session.h>
+#include <pjlib.h>
+
+struct pj_stun_session
+{
+    pj_stun_config	*cfg;
+    pj_pool_t		*pool;
+    pj_mutex_t		*mutex;
+    pj_stun_session_cb	 cb;
+    void		*user_data;
+
+    pj_bool_t		 use_fingerprint;
+    pj_stun_auth_cred	*cred;
+    pj_str_t		 srv_name;
+
+    pj_stun_tx_data	 pending_request_list;
+    pj_stun_tx_data	 cached_response_list;
+};
+
+#define SNAME(s_)		    ((s_)->pool->obj_name)
+
+#if PJ_LOG_MAX_LEVEL >= 5
+#   define TRACE_(expr)		    PJ_LOG(5,expr)
+#else
+#   define TRACE_(expr)
+#endif
+
+#define LOG_ERR_(sess,title,rc) pjnath_perror(sess->pool->obj_name,title,rc)
+
+#define TDATA_POOL_SIZE		    1024
+#define TDATA_POOL_INC		    1024
+
+
+static void stun_tsx_on_complete(pj_stun_client_tsx *tsx,
+				 pj_status_t status, 
+				 const pj_stun_msg *response,
+				 const pj_sockaddr_t *src_addr,
+				 unsigned src_addr_len);
+static pj_status_t stun_tsx_on_send_msg(pj_stun_client_tsx *tsx,
+					const void *stun_pkt,
+					pj_size_t pkt_size);
+static void stun_tsx_on_destroy(pj_stun_client_tsx *tsx);
+
+static pj_stun_tsx_cb tsx_cb = 
+{
+    &stun_tsx_on_complete,
+    &stun_tsx_on_send_msg,
+    &stun_tsx_on_destroy
+};
+
+
+static pj_status_t tsx_add(pj_stun_session *sess,
+			   pj_stun_tx_data *tdata)
+{
+    pj_list_push_back(&sess->pending_request_list, tdata);
+    return PJ_SUCCESS;
+}
+
+static pj_status_t tsx_erase(pj_stun_session *sess,
+			     pj_stun_tx_data *tdata)
+{
+    PJ_UNUSED_ARG(sess);
+    pj_list_erase(tdata);
+    return PJ_SUCCESS;
+}
+
+static pj_stun_tx_data* tsx_lookup(pj_stun_session *sess,
+				   const pj_stun_msg *msg)
+{
+    pj_stun_tx_data *tdata;
+
+    tdata = sess->pending_request_list.next;
+    while (tdata != &sess->pending_request_list) {
+	pj_assert(sizeof(tdata->msg_key)==sizeof(msg->hdr.tsx_id));
+	if (tdata->msg_magic == msg->hdr.magic &&
+	    pj_memcmp(tdata->msg_key, msg->hdr.tsx_id, 
+		      sizeof(msg->hdr.tsx_id))==0)
+	{
+	    return tdata;
+	}
+	tdata = tdata->next;
+    }
+
+    return NULL;
+}
+
+static pj_status_t create_tdata(pj_stun_session *sess,
+			        pj_stun_tx_data **p_tdata)
+{
+    pj_pool_t *pool;
+    pj_stun_tx_data *tdata;
+
+    /* Create pool and initialize basic tdata attributes */
+    pool = pj_pool_create(sess->cfg->pf, "tdata%p", 
+			  TDATA_POOL_SIZE, TDATA_POOL_INC, NULL);
+    PJ_ASSERT_RETURN(pool, PJ_ENOMEM);
+
+    tdata = PJ_POOL_ZALLOC_T(pool, pj_stun_tx_data);
+    tdata->pool = pool;
+    tdata->sess = sess;
+
+    *p_tdata = tdata;
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t create_request_tdata(pj_stun_session *sess,
+					unsigned msg_type,
+					const pj_uint8_t tsx_id[12],
+					pj_stun_tx_data **p_tdata)
+{
+    pj_status_t status;
+    pj_stun_tx_data *tdata;
+
+    status = create_tdata(sess, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create STUN message */
+    status = pj_stun_msg_create(tdata->pool, msg_type,  PJ_STUN_MAGIC, 
+				tsx_id, &tdata->msg);
+    if (status != PJ_SUCCESS) {
+	pj_pool_release(tdata->pool);
+	return status;
+    }
+
+    /* copy the request's transaction ID as the transaction key. */
+    pj_assert(sizeof(tdata->msg_key)==sizeof(tdata->msg->hdr.tsx_id));
+    tdata->msg_magic = tdata->msg->hdr.magic;
+    pj_memcpy(tdata->msg_key, tdata->msg->hdr.tsx_id,
+	      sizeof(tdata->msg->hdr.tsx_id));
+
+    *p_tdata = tdata;
+
+    return PJ_SUCCESS;
+}
+
+
+static void stun_tsx_on_destroy(pj_stun_client_tsx *tsx)
+{
+    pj_stun_tx_data *tdata;
+
+    tdata = (pj_stun_tx_data*) pj_stun_client_tsx_get_data(tsx);
+    pj_stun_client_tsx_destroy(tsx);
+    pj_pool_release(tdata->pool);
+}
+
+static void destroy_tdata(pj_stun_tx_data *tdata)
+{
+    if (tdata->res_timer.id != PJ_FALSE) {
+	pj_timer_heap_cancel(tdata->sess->cfg->timer_heap, 
+			     &tdata->res_timer);
+	tdata->res_timer.id = PJ_FALSE;
+	pj_list_erase(tdata);
+    }
+
+    if (tdata->client_tsx) {
+	pj_time_val delay = {2, 0};
+	tsx_erase(tdata->sess, tdata);
+	pj_stun_client_tsx_schedule_destroy(tdata->client_tsx, &delay);
+	tdata->client_tsx = NULL;
+
+    } else {
+	pj_pool_release(tdata->pool);
+    }
+}
+
+/*
+ * Destroy the transmit data.
+ */
+PJ_DEF(void) pj_stun_msg_destroy_tdata( pj_stun_session *sess,
+					pj_stun_tx_data *tdata)
+{
+    PJ_UNUSED_ARG(sess);
+    destroy_tdata(tdata);
+}
+
+
+/* Timer callback to be called when it's time to destroy response cache */
+static void on_cache_timeout(pj_timer_heap_t *timer_heap,
+			     struct pj_timer_entry *entry)
+{
+    pj_stun_tx_data *tdata;
+
+    PJ_UNUSED_ARG(timer_heap);
+
+    entry->id = PJ_FALSE;
+    tdata = (pj_stun_tx_data*) entry->user_data;
+
+    PJ_LOG(5,(SNAME(tdata->sess), "Response cache deleted"));
+
+    pj_list_erase(tdata);
+    pj_stun_msg_destroy_tdata(tdata->sess, tdata);
+}
+
+static pj_str_t *get_passwd(pj_stun_session *sess, pj_pool_t *pool,
+			    const pj_stun_msg *msg)
+{
+    if (sess->cred == NULL) {
+	return NULL;
+    } else if (sess->cred->type == PJ_STUN_AUTH_CRED_STATIC) {
+	return &sess->cred->data.static_cred.data;
+    } else if (sess->cred->type == PJ_STUN_AUTH_CRED_DYNAMIC) {
+	pj_str_t realm, username, nonce;
+	pj_str_t *password;
+	void *user_data = sess->cred->data.dyn_cred.user_data;
+	int data_type = 0;
+	pj_status_t status;
+
+	realm.slen = username.slen = nonce.slen = 0;
+	password = PJ_POOL_ZALLOC_T(pool, pj_str_t);
+	status = (*sess->cred->data.dyn_cred.get_cred)(msg, user_data, pool,
+						       &realm, &username,
+						       &nonce, &data_type,
+						       password);
+	return password;
+
+    } else {
+	return NULL;
+    }
+}
+
+static pj_status_t apply_msg_options(pj_stun_session *sess,
+				     pj_pool_t *pool,
+				     pj_stun_msg *msg)
+{
+    pj_status_t status = 0;
+    pj_str_t realm, username, nonce, password;
+    int data_type = 0;
+
+    realm.slen = username.slen = nonce.slen = password.slen = 0;
+
+    /* The server SHOULD include a SERVER attribute in all responses */
+    if (sess->srv_name.slen && (PJ_STUN_IS_SUCCESS_RESPONSE(msg->hdr.type) ||
+			        PJ_STUN_IS_ERROR_RESPONSE(msg->hdr.type))) 
+    {
+	pj_stun_msg_add_string_attr(pool, msg, PJ_STUN_ATTR_SERVER,
+				    &sess->srv_name);
+    }
+
+    /* From draft-ietf-behave-rfc3489bis-05.txt
+     * Section 8.3.1.  Formulating the Request Message
+     *
+     * Note: only put MESSAGE-INTEGRITY in non error response.
+     */
+    if (sess->cred && sess->cred->type == PJ_STUN_AUTH_CRED_STATIC &&
+	!PJ_STUN_IS_ERROR_RESPONSE(msg->hdr.type)) 
+    {
+	realm = sess->cred->data.static_cred.realm;
+	username = sess->cred->data.static_cred.username;
+	data_type = sess->cred->data.static_cred.data_type;
+	password = sess->cred->data.static_cred.data;
+	nonce = sess->cred->data.static_cred.nonce;
+
+    } else if (sess->cred && sess->cred->type == PJ_STUN_AUTH_CRED_DYNAMIC &&
+	       !PJ_STUN_IS_ERROR_RESPONSE(msg->hdr.type)) 
+    {
+	void *user_data = sess->cred->data.dyn_cred.user_data;
+
+	status = (*sess->cred->data.dyn_cred.get_cred)(msg, user_data, pool,
+						       &realm, &username,
+						       &nonce, &data_type,
+						       &password);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+
+    /* Create and add USERNAME attribute */
+    if (username.slen) {
+	status = pj_stun_msg_add_string_attr(pool, msg,
+					     PJ_STUN_ATTR_USERNAME,
+					     &username);
+	PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    }
+
+    /* Add REALM only when long term credential is used */
+    if (realm.slen) {
+	status = pj_stun_msg_add_string_attr(pool, msg,
+					    PJ_STUN_ATTR_REALM,
+					    &realm);
+	PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    }
+
+    /* Add NONCE when desired */
+    if (nonce.slen) {
+	status = pj_stun_msg_add_string_attr(pool, msg,
+					    PJ_STUN_ATTR_NONCE,
+					    &nonce);
+    }
+
+    /* Add MESSAGE-INTEGRITY attribute */
+    if (username.slen) {
+	status = pj_stun_msg_add_msgint_attr(pool, msg);
+	PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    }
+
+
+    /* Add FINGERPRINT attribute if necessary */
+    if (sess->use_fingerprint) {
+	status = pj_stun_msg_add_uint_attr(pool, msg, 
+					  PJ_STUN_ATTR_FINGERPRINT, 0);
+	PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+static void stun_tsx_on_complete(pj_stun_client_tsx *tsx,
+				 pj_status_t status, 
+				 const pj_stun_msg *response,
+				 const pj_sockaddr_t *src_addr,
+				 unsigned src_addr_len)
+{
+    pj_stun_tx_data *tdata;
+
+    tdata = (pj_stun_tx_data*) pj_stun_client_tsx_get_data(tsx);
+
+    if (tdata->sess->cb.on_request_complete) {
+	(*tdata->sess->cb.on_request_complete)(tdata->sess, status, tdata, 
+					       response, 
+					       src_addr, src_addr_len);
+    }
+}
+
+static pj_status_t stun_tsx_on_send_msg(pj_stun_client_tsx *tsx,
+					const void *stun_pkt,
+					pj_size_t pkt_size)
+{
+    pj_stun_tx_data *tdata;
+
+    tdata = (pj_stun_tx_data*) pj_stun_client_tsx_get_data(tsx);
+
+    return tdata->sess->cb.on_send_msg(tdata->sess, stun_pkt, pkt_size,
+				       tdata->dst_addr, tdata->addr_len);
+}
+
+/* **************************************************************************/
+
+PJ_DEF(pj_status_t) pj_stun_session_create( pj_stun_config *cfg,
+					    const char *name,
+					    const pj_stun_session_cb *cb,
+					    pj_bool_t fingerprint,
+					    pj_stun_session **p_sess)
+{
+    pj_pool_t	*pool;
+    pj_stun_session *sess;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(cfg && cb && p_sess, PJ_EINVAL);
+
+    if (name==NULL)
+	name = "sess%p";
+
+    pool = pj_pool_create(cfg->pf, name, 4000, 4000, NULL);
+    PJ_ASSERT_RETURN(pool, PJ_ENOMEM);
+
+    sess = PJ_POOL_ZALLOC_T(pool, pj_stun_session);
+    sess->cfg = cfg;
+    sess->pool = pool;
+    pj_memcpy(&sess->cb, cb, sizeof(*cb));
+    sess->use_fingerprint = fingerprint;
+    
+    sess->srv_name.ptr = pj_pool_alloc(pool, 32);
+    sess->srv_name.slen = pj_ansi_snprintf(sess->srv_name.ptr, 32,
+					   "pj_stun-%s", PJ_VERSION);
+
+    pj_list_init(&sess->pending_request_list);
+    pj_list_init(&sess->cached_response_list);
+
+    status = pj_mutex_create_recursive(pool, name, &sess->mutex);
+    if (status != PJ_SUCCESS) {
+	pj_pool_release(pool);
+	return status;
+    }
+
+    *p_sess = sess;
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_stun_session_destroy(pj_stun_session *sess)
+{
+    PJ_ASSERT_RETURN(sess, PJ_EINVAL);
+
+    pj_mutex_lock(sess->mutex);
+    while (!pj_list_empty(&sess->pending_request_list)) {
+	pj_stun_tx_data *tdata = sess->pending_request_list.next;
+	destroy_tdata(tdata);
+    }
+    while (!pj_list_empty(&sess->cached_response_list)) {
+	pj_stun_tx_data *tdata = sess->cached_response_list.next;
+	destroy_tdata(tdata);
+    }
+    pj_mutex_unlock(sess->mutex);
+
+    pj_mutex_destroy(sess->mutex);
+    pj_pool_release(sess->pool);
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pj_stun_session_set_user_data( pj_stun_session *sess,
+						   void *user_data)
+{
+    PJ_ASSERT_RETURN(sess, PJ_EINVAL);
+    pj_mutex_lock(sess->mutex);
+    sess->user_data = user_data;
+    pj_mutex_unlock(sess->mutex);
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(void*) pj_stun_session_get_user_data(pj_stun_session *sess)
+{
+    PJ_ASSERT_RETURN(sess, NULL);
+    return sess->user_data;
+}
+
+PJ_DEF(pj_status_t) pj_stun_session_set_server_name(pj_stun_session *sess,
+						    const pj_str_t *srv_name)
+{
+    PJ_ASSERT_RETURN(sess, PJ_EINVAL);
+    if (srv_name)
+	pj_strdup(sess->pool, &sess->srv_name, srv_name);
+    else
+	sess->srv_name.slen = 0;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(void) pj_stun_session_set_credential(pj_stun_session *sess,
+					    const pj_stun_auth_cred *cred)
+{
+    PJ_ASSERT_ON_FAIL(sess, return);
+    if (cred) {
+	if (!sess->cred)
+	    sess->cred = pj_pool_alloc(sess->pool, sizeof(pj_stun_auth_cred));
+	pj_stun_auth_cred_dup(sess->pool, sess->cred, cred);
+    } else {
+	sess->cred = NULL;
+    }
+}
+
+
+PJ_DEF(pj_status_t) pj_stun_session_create_req(pj_stun_session *sess,
+					       int method,
+					       const pj_uint8_t tsx_id[12],
+					       pj_stun_tx_data **p_tdata)
+{
+    pj_stun_tx_data *tdata = NULL;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(sess && p_tdata, PJ_EINVAL);
+
+    status = create_request_tdata(sess, method, tsx_id, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pj_stun_session_create_ind(pj_stun_session *sess,
+					       int msg_type,
+					       pj_stun_tx_data **p_tdata)
+{
+    pj_stun_tx_data *tdata = NULL;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(sess && p_tdata, PJ_EINVAL);
+
+    status = create_tdata(sess, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create STUN message */
+    msg_type |= PJ_STUN_INDICATION_BIT;
+    status = pj_stun_msg_create(tdata->pool, msg_type,  PJ_STUN_MAGIC, 
+				NULL, &tdata->msg);
+    if (status != PJ_SUCCESS) {
+	pj_pool_release(tdata->pool);
+	return status;
+    }
+
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Create a STUN response message.
+ */
+PJ_DEF(pj_status_t) pj_stun_session_create_response( pj_stun_session *sess,
+						     const pj_stun_msg *req,
+						     unsigned err_code,
+						     const pj_str_t *err_msg,
+						     pj_stun_tx_data **p_tdata)
+{
+    pj_status_t status;
+    pj_stun_tx_data *tdata = NULL;
+
+    status = create_tdata(sess, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create STUN response message */
+    status = pj_stun_msg_create_response(tdata->pool, req, err_code, err_msg,
+					 &tdata->msg);
+    if (status != PJ_SUCCESS) {
+	pj_pool_release(tdata->pool);
+	return status;
+    }
+
+    /* copy the request's transaction ID as the transaction key. */
+    pj_assert(sizeof(tdata->msg_key)==sizeof(req->hdr.tsx_id));
+    tdata->msg_magic = req->hdr.magic;
+    pj_memcpy(tdata->msg_key, req->hdr.tsx_id, sizeof(req->hdr.tsx_id));
+
+    *p_tdata = tdata;
+
+    return PJ_SUCCESS;
+}
+
+
+/* Print outgoing message to log */
+static void dump_tx_msg(pj_stun_session *sess, const pj_stun_msg *msg,
+			unsigned pkt_size, const pj_sockaddr_t *addr)
+{
+    const char *dst_name;
+    int dst_port;
+    const pj_sockaddr *dst = (const pj_sockaddr*)addr;
+    char buf[512];
+    
+    if (dst->addr.sa_family == PJ_AF_INET) {
+	dst_name = pj_inet_ntoa(dst->ipv4.sin_addr);
+	dst_port = pj_ntohs(dst->ipv4.sin_port);
+    } else if (dst->addr.sa_family == PJ_AF_INET6) {
+	dst_name = "IPv6";
+	dst_port = pj_ntohs(dst->ipv6.sin6_port);
+    } else {
+	LOG_ERR_(sess, "Invalid address family", PJ_EINVAL);
+	return;
+    }
+
+    PJ_LOG(5,(SNAME(sess), 
+	      "TX %d bytes STUN message to %s:%d:\n"
+	      "--- begin STUN message ---\n"
+	      "%s"
+	      "--- end of STUN message ---\n",
+	      pkt_size, dst_name, dst_port,
+	      pj_stun_msg_dump(msg, buf, sizeof(buf), NULL)));
+
+}
+
+
+PJ_DEF(pj_status_t) pj_stun_session_send_msg( pj_stun_session *sess,
+					      pj_bool_t cache_res,
+					      const pj_sockaddr_t *server,
+					      unsigned addr_len,
+					      pj_stun_tx_data *tdata)
+{
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(sess && addr_len && server && tdata, PJ_EINVAL);
+
+    /* Allocate packet */
+    tdata->max_len = PJ_STUN_MAX_PKT_LEN;
+    tdata->pkt = pj_pool_alloc(tdata->pool, tdata->max_len);
+
+    /* Start locking the session now */
+    pj_mutex_lock(sess->mutex);
+
+    /* Apply options */
+    status = apply_msg_options(sess, tdata->pool, tdata->msg);
+    if (status != PJ_SUCCESS) {
+	pj_stun_msg_destroy_tdata(sess, tdata);
+	pj_mutex_unlock(sess->mutex);
+	LOG_ERR_(sess, "Error applying options", status);
+	return status;
+    }
+
+    /* Encode message */
+    status = pj_stun_msg_encode(tdata->msg, tdata->pkt, tdata->max_len,
+			        0, get_passwd(sess, tdata->pool, tdata->msg),
+				&tdata->pkt_size);
+    if (status != PJ_SUCCESS) {
+	pj_stun_msg_destroy_tdata(sess, tdata);
+	pj_mutex_unlock(sess->mutex);
+	LOG_ERR_(sess, "STUN encode() error", status);
+	return status;
+    }
+
+    /* Dump packet */
+    dump_tx_msg(sess, tdata->msg, tdata->pkt_size, server);
+
+    /* If this is a STUN request message, then send the request with
+     * a new STUN client transaction.
+     */
+    if (PJ_STUN_IS_REQUEST(tdata->msg->hdr.type)) {
+
+	/* Create STUN client transaction */
+	status = pj_stun_client_tsx_create(sess->cfg, tdata->pool, 
+					   &tsx_cb, &tdata->client_tsx);
+	PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+	pj_stun_client_tsx_set_data(tdata->client_tsx, (void*)tdata);
+
+	/* Save the remote address */
+	tdata->addr_len = addr_len;
+	tdata->dst_addr = server;
+
+	/* Send the request! */
+	status = pj_stun_client_tsx_send_msg(tdata->client_tsx, PJ_TRUE,
+					     tdata->pkt, tdata->pkt_size);
+	if (status != PJ_SUCCESS && status != PJ_EPENDING) {
+	    pj_stun_msg_destroy_tdata(sess, tdata);
+	    pj_mutex_unlock(sess->mutex);
+	    LOG_ERR_(sess, "Error sending STUN request", status);
+	    return status;
+	}
+
+	/* Add to pending request list */
+	tsx_add(sess, tdata);
+
+    } else {
+	if (cache_res && 
+	    (PJ_STUN_IS_SUCCESS_RESPONSE(tdata->msg->hdr.type) ||
+	     PJ_STUN_IS_ERROR_RESPONSE(tdata->msg->hdr.type))) 
+	{
+	    /* Requested to keep the response in the cache */
+	    pj_time_val timeout;
+	    
+	    pj_memset(&tdata->res_timer, 0, sizeof(tdata->res_timer));
+	    pj_timer_entry_init(&tdata->res_timer, PJ_TRUE, tdata, 
+				&on_cache_timeout);
+
+	    timeout.sec = sess->cfg->res_cache_msec / 1000;
+	    timeout.msec = sess->cfg->res_cache_msec % 1000;
+
+	    status = pj_timer_heap_schedule(sess->cfg->timer_heap, 
+					    &tdata->res_timer,
+					    &timeout);
+	    if (status != PJ_SUCCESS) {
+		pj_stun_msg_destroy_tdata(sess, tdata);
+		pj_mutex_unlock(sess->mutex);
+		LOG_ERR_(sess, "Error scheduling response timer", status);
+		return status;
+	    }
+
+	    pj_list_push_back(&sess->cached_response_list, tdata);
+	}
+    
+	/* Otherwise for non-request message, send directly to transport. */
+	status = sess->cb.on_send_msg(sess, tdata->pkt, tdata->pkt_size,
+				      server, addr_len);
+
+	if (status != PJ_SUCCESS && status != PJ_EPENDING) {
+	    LOG_ERR_(sess, "Error sending STUN request", status);
+	}
+
+	/* Destroy only when response is not cached*/
+	if (tdata->res_timer.id == 0) {
+	    pj_stun_msg_destroy_tdata(sess, tdata);
+	}
+    }
+
+
+    pj_mutex_unlock(sess->mutex);
+    return status;
+}
+
+/*
+ * Cancel outgoing STUN transaction. 
+ */
+PJ_DEF(pj_status_t) pj_stun_session_cancel_req( pj_stun_session *sess,
+						pj_stun_tx_data *tdata,
+						pj_bool_t notify,
+						pj_status_t notify_status)
+{
+    PJ_ASSERT_RETURN(sess && tdata, PJ_EINVAL);
+    PJ_ASSERT_RETURN(!notify || notify_status!=PJ_SUCCESS, PJ_EINVAL);
+    PJ_ASSERT_RETURN(PJ_STUN_IS_REQUEST(tdata->msg->hdr.type), PJ_EINVAL);
+
+    pj_mutex_lock(sess->mutex);
+
+    if (notify) {
+	(sess->cb.on_request_complete)(sess, notify_status, tdata, NULL,
+				       NULL, 0);
+    }
+
+    /* Just destroy tdata. This will destroy the transaction as well */
+    pj_stun_msg_destroy_tdata(sess, tdata);
+
+    pj_mutex_unlock(sess->mutex);
+    return PJ_SUCCESS;
+}
+
+/*
+ * Explicitly request retransmission of the request.
+ */
+PJ_DEF(pj_status_t) pj_stun_session_retransmit_req(pj_stun_session *sess,
+						   pj_stun_tx_data *tdata)
+{
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(sess && tdata, PJ_EINVAL);
+    PJ_ASSERT_RETURN(PJ_STUN_IS_REQUEST(tdata->msg->hdr.type), PJ_EINVAL);
+
+    pj_mutex_lock(sess->mutex);
+
+    status = pj_stun_client_tsx_retransmit(tdata->client_tsx);
+
+    pj_mutex_unlock(sess->mutex);
+
+    return status;
+}
+
+
+/* Send response */
+static pj_status_t send_response(pj_stun_session *sess, 
+				 pj_pool_t *pool, pj_stun_msg *response,
+				 pj_bool_t retransmission,
+				 const pj_sockaddr_t *addr, unsigned addr_len)
+{
+    pj_uint8_t *out_pkt;
+    unsigned out_max_len, out_len;
+    pj_status_t status;
+
+    /* Apply options */
+    if (!retransmission) {
+	status = apply_msg_options(sess, pool, response);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    /* Alloc packet buffer */
+    out_max_len = PJ_STUN_MAX_PKT_LEN;
+    out_pkt = pj_pool_alloc(pool, out_max_len);
+
+    /* Encode */
+    status = pj_stun_msg_encode(response, out_pkt, out_max_len, 0, 
+				get_passwd(sess, pool, response),
+				&out_len);
+    if (status != PJ_SUCCESS) {
+	LOG_ERR_(sess, "Error encoding message", status);
+	return status;
+    }
+
+    /* Print log */
+    dump_tx_msg(sess, response, out_len, addr);
+
+    /* Send packet */
+    status = sess->cb.on_send_msg(sess, out_pkt, out_len, addr, addr_len);
+
+    return status;
+}
+
+/* Authenticate incoming message */
+static pj_status_t authenticate_msg(pj_stun_session *sess,
+				    const pj_uint8_t *pkt,
+				    unsigned pkt_len,
+				    const pj_stun_msg *msg,
+				    pj_pool_t *tmp_pool,
+				    const pj_sockaddr_t *src_addr,
+				    unsigned src_addr_len)
+{
+    pj_stun_msg *response;
+    pj_status_t status;
+
+    if (PJ_STUN_IS_ERROR_RESPONSE(msg->hdr.type) || sess->cred == NULL)
+	return PJ_SUCCESS;
+
+    status = pj_stun_verify_credential(pkt, pkt_len, msg, sess->cred,
+				       tmp_pool, &response);
+    if (status != PJ_SUCCESS && response != NULL) {
+	PJ_LOG(5,(SNAME(sess), "Message authentication failed"));
+	send_response(sess, tmp_pool, response, PJ_FALSE, 
+		      src_addr, src_addr_len);
+    }
+
+    return status;
+}
+
+
+/* Handle incoming response */
+static pj_status_t on_incoming_response(pj_stun_session *sess,
+					pj_stun_msg *msg,
+					const pj_sockaddr_t *src_addr,
+					unsigned src_addr_len)
+{
+    pj_stun_tx_data *tdata;
+    pj_status_t status;
+
+    /* Lookup pending client transaction */
+    tdata = tsx_lookup(sess, msg);
+    if (tdata == NULL) {
+	PJ_LOG(5,(SNAME(sess), 
+		  "Transaction not found, response silently discarded"));
+	return PJ_SUCCESS;
+    }
+
+    /* Pass the response to the transaction. 
+     * If the message is accepted, transaction callback will be called,
+     * and this will call the session callback too.
+     */
+    status = pj_stun_client_tsx_on_rx_msg(tdata->client_tsx, msg, 
+					  src_addr, src_addr_len);
+    if (status != PJ_SUCCESS) {
+	return status;
+    }
+
+    /* If transaction has completed, destroy the transmit data.
+     * This will remove the transaction from the pending list too.
+     */
+    if (pj_stun_client_tsx_is_complete(tdata->client_tsx)) {
+	pj_stun_msg_destroy_tdata(sess, tdata);
+	tdata = NULL;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/* For requests, check if we cache the response */
+static pj_status_t check_cached_response(pj_stun_session *sess,
+					 pj_pool_t *tmp_pool,
+					 const pj_stun_msg *msg,
+					 const pj_sockaddr_t *src_addr,
+					 unsigned src_addr_len)
+{
+    pj_stun_tx_data *t;
+
+    /* First lookup response in response cache */
+    t = sess->cached_response_list.next;
+    while (t != &sess->cached_response_list) {
+	if (t->msg_magic == msg->hdr.magic &&
+	    pj_memcmp(t->msg_key, msg->hdr.tsx_id, 
+		      sizeof(msg->hdr.tsx_id))==0)
+	{
+	    break;
+	}
+	t = t->next;
+    }
+
+    if (t != &sess->cached_response_list) {
+	/* Found response in the cache */
+
+	PJ_LOG(5,(SNAME(sess), 
+		 "Request retransmission, sending cached response"));
+
+	send_response(sess, tmp_pool, t->msg, PJ_TRUE, 
+		      src_addr, src_addr_len);
+	return PJ_SUCCESS;
+    }
+
+    return PJ_ENOTFOUND;
+}
+
+/* Handle incoming request */
+static pj_status_t on_incoming_request(pj_stun_session *sess,
+				       pj_pool_t *tmp_pool,
+				       const pj_uint8_t *in_pkt,
+				       unsigned in_pkt_len,
+				       const pj_stun_msg *msg,
+				       const pj_sockaddr_t *src_addr,
+				       unsigned src_addr_len)
+{
+    pj_status_t status;
+
+    /* Distribute to handler, or respond with Bad Request */
+    if (sess->cb.on_rx_request) {
+	status = (*sess->cb.on_rx_request)(sess, in_pkt, in_pkt_len, msg,
+					   src_addr, src_addr_len);
+    } else {
+	pj_stun_msg *response;
+
+	status = pj_stun_msg_create_response(tmp_pool, msg, 
+					     PJ_STUN_SC_BAD_REQUEST, NULL,
+					     &response);
+	if (status == PJ_SUCCESS && response) {
+	    status = send_response(sess, tmp_pool, response, 
+				   PJ_FALSE, src_addr, src_addr_len);
+	}
+    }
+
+    return status;
+}
+
+
+/* Handle incoming indication */
+static pj_status_t on_incoming_indication(pj_stun_session *sess,
+					  pj_pool_t *tmp_pool,
+					  const pj_uint8_t *in_pkt,
+					  unsigned in_pkt_len,
+					  const pj_stun_msg *msg,
+					  const pj_sockaddr_t *src_addr,
+					  unsigned src_addr_len)
+{
+    PJ_UNUSED_ARG(tmp_pool);
+
+    /* Distribute to handler */
+    if (sess->cb.on_rx_indication) {
+	return (*sess->cb.on_rx_indication)(sess, in_pkt, in_pkt_len, msg,
+					    src_addr, src_addr_len);
+    } else {
+	return PJ_SUCCESS;
+    }
+}
+
+
+PJ_DEF(pj_status_t) pj_stun_session_on_rx_pkt(pj_stun_session *sess,
+					      const void *packet,
+					      pj_size_t pkt_size,
+					      unsigned options,
+					      unsigned *parsed_len,
+					      const pj_sockaddr_t *src_addr,
+					      unsigned src_addr_len)
+{
+    pj_stun_msg *msg, *response;
+    pj_pool_t *tmp_pool;
+    char *dump;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(sess && packet && pkt_size, PJ_EINVAL);
+
+    tmp_pool = pj_pool_create(sess->cfg->pf, "tmpstun", 1024, 1024, NULL);
+    if (!tmp_pool)
+	return PJ_ENOMEM;
+
+    /* Try to parse the message */
+    status = pj_stun_msg_decode(tmp_pool, (const pj_uint8_t*)packet,
+			        pkt_size, options, 
+				&msg, parsed_len, &response);
+    if (status != PJ_SUCCESS) {
+	LOG_ERR_(sess, "STUN msg_decode() error", status);
+	if (response) {
+	    send_response(sess, tmp_pool, response, 
+			  PJ_FALSE, src_addr, src_addr_len);
+	}
+	pj_pool_release(tmp_pool);
+	return status;
+    }
+
+    dump = pj_pool_alloc(tmp_pool, PJ_STUN_MAX_PKT_LEN);
+
+    PJ_LOG(5,(SNAME(sess),
+	      "RX STUN message:\n"
+	      "--- begin STUN message ---\n"
+	      "%s"
+	      "--- end of STUN message ---\n",
+	      pj_stun_msg_dump(msg, dump, PJ_STUN_MAX_PKT_LEN, NULL)));
+
+    pj_mutex_lock(sess->mutex);
+
+    /* For requests, check if we have cached response */
+    status = check_cached_response(sess, tmp_pool, msg, 
+				   src_addr, src_addr_len);
+    if (status == PJ_SUCCESS) {
+	goto on_return;
+    }
+
+    /* Authenticate the message, unless PJ_STUN_NO_AUTHENTICATE
+     * is specified in the option.
+     */
+    if ((options & PJ_STUN_NO_AUTHENTICATE) == 0) {
+	status = authenticate_msg(sess, packet, pkt_size, msg, tmp_pool,
+				  src_addr, src_addr_len);
+	if (status != PJ_SUCCESS) {
+	    goto on_return;
+	}
+    }
+
+    /* Handle message */
+    if (PJ_STUN_IS_SUCCESS_RESPONSE(msg->hdr.type) ||
+	PJ_STUN_IS_ERROR_RESPONSE(msg->hdr.type))
+    {
+	status = on_incoming_response(sess, msg, src_addr, src_addr_len);
+
+    } else if (PJ_STUN_IS_REQUEST(msg->hdr.type)) {
+
+	status = on_incoming_request(sess, tmp_pool, packet, pkt_size, msg,
+				     src_addr, src_addr_len);
+
+    } else if (PJ_STUN_IS_INDICATION(msg->hdr.type)) {
+
+	status = on_incoming_indication(sess, tmp_pool, packet, pkt_size,
+					msg, src_addr, src_addr_len);
+
+    } else {
+	pj_assert(!"Unexpected!");
+	status = PJ_EBUG;
+    }
+
+on_return:
+    pj_mutex_unlock(sess->mutex);
+
+    pj_pool_release(tmp_pool);
+    return status;
+}
+
+
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_transaction.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_transaction.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjnath/stun_transaction.c	(revision 1163)
@@ -0,0 +1,391 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 <pjnath/stun_transaction.h>
+#include <pjnath/errno.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/timer.h>
+
+
+#define TIMER_ACTIVE		1
+
+
+struct pj_stun_client_tsx
+{
+    char		 obj_name[PJ_MAX_OBJ_NAME];
+    pj_stun_config	*cfg;
+    pj_stun_tsx_cb	 cb;
+    void		*user_data;
+
+    pj_bool_t		 complete;
+
+    pj_bool_t		 require_retransmit;
+    pj_timer_entry	 retransmit_timer;
+    unsigned		 transmit_count;
+    pj_time_val		 retransmit_time;
+
+    pj_timer_entry	 destroy_timer;
+
+    void		*last_pkt;
+    unsigned		 last_pkt_size;
+};
+
+
+static void retransmit_timer_callback(pj_timer_heap_t *timer_heap, 
+				      pj_timer_entry *timer);
+static void destroy_timer_callback(pj_timer_heap_t *timer_heap, 
+				   pj_timer_entry *timer);
+
+#define stun_perror(tsx,msg,rc) pjnath_perror(tsx->obj_name, msg, rc)
+
+/*
+ * Create a STUN client transaction.
+ */
+PJ_DEF(pj_status_t) pj_stun_client_tsx_create(pj_stun_config *cfg,
+					      pj_pool_t *pool,
+					      const pj_stun_tsx_cb *cb,
+					      pj_stun_client_tsx **p_tsx)
+{
+    pj_stun_client_tsx *tsx;
+
+    PJ_ASSERT_RETURN(cfg && cb && p_tsx, PJ_EINVAL);
+    PJ_ASSERT_RETURN(cb->on_send_msg, PJ_EINVAL);
+
+    tsx = PJ_POOL_ZALLOC_T(pool, pj_stun_client_tsx);
+    tsx->cfg = cfg;
+    pj_memcpy(&tsx->cb, cb, sizeof(*cb));
+
+    tsx->retransmit_timer.cb = &retransmit_timer_callback;
+    tsx->retransmit_timer.user_data = tsx;
+
+    tsx->destroy_timer.cb = &destroy_timer_callback;
+    tsx->destroy_timer.user_data = tsx;
+
+    pj_ansi_snprintf(tsx->obj_name, sizeof(tsx->obj_name), "stuntsx%p", tsx);
+
+    *p_tsx = tsx;
+
+    PJ_LOG(5,(tsx->obj_name, "STUN client transaction created"));
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) 
+pj_stun_client_tsx_schedule_destroy(pj_stun_client_tsx *tsx,
+				    const pj_time_val *delay)
+{
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(tsx && delay, PJ_EINVAL);
+    PJ_ASSERT_RETURN(tsx->cb.on_destroy, PJ_EINVAL);
+
+    /* Cancel previously registered timer */
+    if (tsx->destroy_timer.id != 0) {
+	pj_timer_heap_cancel(tsx->cfg->timer_heap, &tsx->destroy_timer);
+	tsx->destroy_timer.id = 0;
+    }
+
+    /* Stop retransmission, just in case */
+    if (tsx->retransmit_timer.id != 0) {
+	pj_timer_heap_cancel(tsx->cfg->timer_heap, &tsx->retransmit_timer);
+	tsx->retransmit_timer.id = 0;
+    }
+
+    status = pj_timer_heap_schedule(tsx->cfg->timer_heap,
+				    &tsx->destroy_timer, delay);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    tsx->destroy_timer.id = TIMER_ACTIVE;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Destroy transaction immediately.
+ */
+PJ_DEF(pj_status_t) pj_stun_client_tsx_destroy(pj_stun_client_tsx *tsx)
+{
+    PJ_ASSERT_RETURN(tsx, PJ_EINVAL);
+
+    if (tsx->retransmit_timer.id != 0) {
+	pj_timer_heap_cancel(tsx->cfg->timer_heap, &tsx->retransmit_timer);
+	tsx->retransmit_timer.id = 0;
+    }
+    if (tsx->destroy_timer.id != 0) {
+	pj_timer_heap_cancel(tsx->cfg->timer_heap, &tsx->destroy_timer);
+	tsx->destroy_timer.id = 0;
+    }
+
+    PJ_LOG(5,(tsx->obj_name, "STUN client transaction destroyed"));
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Check if transaction has completed.
+ */
+PJ_DEF(pj_bool_t) pj_stun_client_tsx_is_complete(pj_stun_client_tsx *tsx)
+{
+    PJ_ASSERT_RETURN(tsx, PJ_FALSE);
+    return tsx->complete;
+}
+
+
+/*
+ * Set user data.
+ */
+PJ_DEF(pj_status_t) pj_stun_client_tsx_set_data(pj_stun_client_tsx *tsx,
+						void *data)
+{
+    PJ_ASSERT_RETURN(tsx, PJ_EINVAL);
+    tsx->user_data = data;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get the user data
+ */
+PJ_DEF(void*) pj_stun_client_tsx_get_data(pj_stun_client_tsx *tsx)
+{
+    PJ_ASSERT_RETURN(tsx, NULL);
+    return tsx->user_data;
+}
+
+
+/*
+ * Transmit message.
+ */
+static pj_status_t tsx_transmit_msg(pj_stun_client_tsx *tsx)
+{
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(tsx->retransmit_timer.id == 0, PJ_EBUSY);
+
+    if (tsx->require_retransmit) {
+	/* Calculate retransmit/timeout delay */
+	if (tsx->transmit_count == 0) {
+	    tsx->retransmit_time.sec = 0;
+	    tsx->retransmit_time.msec = tsx->cfg->rto_msec;
+
+	} else if (tsx->transmit_count < PJ_STUN_MAX_RETRANSMIT_COUNT-1) {
+	    unsigned msec;
+
+	    msec = PJ_TIME_VAL_MSEC(tsx->retransmit_time);
+	    msec = (msec << 1) + 100;
+	    tsx->retransmit_time.sec = msec / 1000;
+	    tsx->retransmit_time.msec = msec % 1000;
+
+	} else {
+	    tsx->retransmit_time.sec = PJ_STUN_TIMEOUT_VALUE / 1000;
+	    tsx->retransmit_time.msec = PJ_STUN_TIMEOUT_VALUE % 1000;
+	}
+
+	/* Schedule timer first because when send_msg() failed we can
+	 * cancel it (as opposed to when schedule_timer() failed we cannot
+	 * cancel transmission).
+	 */;
+	status = pj_timer_heap_schedule(tsx->cfg->timer_heap, 
+					&tsx->retransmit_timer,
+					&tsx->retransmit_time);
+	if (status != PJ_SUCCESS) {
+	    tsx->retransmit_timer.id = 0;
+	    return status;
+	}
+	tsx->retransmit_timer.id = TIMER_ACTIVE;
+    }
+
+
+    /* Send message */
+    status = tsx->cb.on_send_msg(tsx, tsx->last_pkt, tsx->last_pkt_size);
+    if (status != PJ_SUCCESS) {
+	if (tsx->retransmit_timer.id != 0) {
+	    pj_timer_heap_cancel(tsx->cfg->timer_heap, 
+				 &tsx->retransmit_timer);
+	    tsx->retransmit_timer.id = 0;
+	}
+	stun_perror(tsx, "STUN error sending message", status);
+	return status;
+    }
+
+    tsx->transmit_count++;
+
+    PJ_LOG(5,(tsx->obj_name, "STUN sending message (transmit count=%d)",
+	      tsx->transmit_count));
+    return status;
+}
+
+
+/*
+ * Send outgoing message and start STUN transaction.
+ */
+PJ_DEF(pj_status_t) pj_stun_client_tsx_send_msg(pj_stun_client_tsx *tsx,
+						pj_bool_t retransmit,
+						void *pkt,
+						unsigned pkt_len)
+{
+    PJ_ASSERT_RETURN(tsx && pkt && pkt_len, PJ_EINVAL);
+    PJ_ASSERT_RETURN(tsx->retransmit_timer.id == 0, PJ_EBUSY);
+
+    /* Encode message */
+    tsx->last_pkt = pkt;
+    tsx->last_pkt_size = pkt_len;
+
+    /* Update STUN retransmit flag */
+    tsx->require_retransmit = retransmit;
+
+    /* Send the message */
+    return tsx_transmit_msg(tsx);
+}
+
+
+/* Retransmit timer callback */
+static void retransmit_timer_callback(pj_timer_heap_t *timer_heap, 
+				      pj_timer_entry *timer)
+{
+    pj_stun_client_tsx *tsx = (pj_stun_client_tsx *) timer->user_data;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(timer_heap);
+
+    if (tsx->transmit_count >= PJ_STUN_MAX_RETRANSMIT_COUNT) {
+	/* Retransmission count exceeded. Transaction has failed */
+	tsx->retransmit_timer.id = 0;
+	PJ_LOG(4,(tsx->obj_name, "STUN timeout waiting for response"));
+	if (!tsx->complete) {
+	    tsx->complete = PJ_TRUE;
+	    if (tsx->cb.on_complete) {
+		tsx->cb.on_complete(tsx, PJNATH_ESTUNTIMEDOUT, NULL, NULL, 0);
+	    }
+	}
+	return;
+    }
+
+    tsx->retransmit_timer.id = 0;
+    status = tsx_transmit_msg(tsx);
+    if (status != PJ_SUCCESS) {
+	tsx->retransmit_timer.id = 0;
+	if (!tsx->complete) {
+	    tsx->complete = PJ_TRUE;
+	    if (tsx->cb.on_complete) {
+		tsx->cb.on_complete(tsx, status, NULL, NULL, 0);
+	    }
+	}
+    }
+}
+
+/*
+ * Request to retransmit the request.
+ */
+PJ_DEF(pj_status_t) pj_stun_client_tsx_retransmit(pj_stun_client_tsx *tsx)
+{
+    if (tsx->destroy_timer.id != 0) {
+	return PJ_SUCCESS;
+    }
+
+    if (tsx->retransmit_timer.id != 0) {
+	pj_timer_heap_cancel(tsx->cfg->timer_heap, &tsx->retransmit_timer);
+	tsx->retransmit_timer.id = 0;
+    }
+
+    return tsx_transmit_msg(tsx);
+}
+
+/* Timer callback to destroy transaction */
+static void destroy_timer_callback(pj_timer_heap_t *timer_heap, 
+				   pj_timer_entry *timer)
+{
+    pj_stun_client_tsx *tsx = (pj_stun_client_tsx *) timer->user_data;
+
+    PJ_UNUSED_ARG(timer_heap);
+
+    tsx->destroy_timer.id = PJ_FALSE;
+    tsx->cb.on_destroy(tsx);
+    /* Don't access transaction after this */
+}
+
+
+/*
+ * Notify the STUN transaction about the arrival of STUN response.
+ */
+PJ_DEF(pj_status_t) pj_stun_client_tsx_on_rx_msg(pj_stun_client_tsx *tsx,
+						 const pj_stun_msg *msg,
+						 const pj_sockaddr_t *src_addr,
+						 unsigned src_addr_len)
+{
+    pj_stun_errcode_attr *err_attr;
+    pj_status_t status;
+
+    /* Must be STUN response message */
+    if (!PJ_STUN_IS_SUCCESS_RESPONSE(msg->hdr.type) && 
+	!PJ_STUN_IS_ERROR_RESPONSE(msg->hdr.type))
+    {
+	PJ_LOG(4,(tsx->obj_name, 
+		  "STUN rx_msg() error: not response message"));
+	return PJNATH_EINSTUNMSGTYPE;
+    }
+
+
+    /* We have a response with matching transaction ID. 
+     * We can cancel retransmit timer now.
+     */
+    if (tsx->retransmit_timer.id) {
+	pj_timer_heap_cancel(tsx->cfg->timer_heap, &tsx->retransmit_timer);
+	tsx->retransmit_timer.id = 0;
+    }
+
+    /* Find STUN error code attribute */
+    err_attr = (pj_stun_errcode_attr*) 
+		pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_ERROR_CODE, 0);
+
+    if (err_attr && err_attr->err_code <= 200) {
+	/* draft-ietf-behave-rfc3489bis-05.txt Section 8.3.2:
+	 * Any response between 100 and 299 MUST result in the cessation
+	 * of request retransmissions, but otherwise is discarded.
+	 */
+	PJ_LOG(4,(tsx->obj_name, 
+		  "STUN rx_msg() error: received provisional %d code (%.*s)",
+		  err_attr->err_code,
+		  (int)err_attr->reason.slen,
+		  err_attr->reason.ptr));
+	return PJ_SUCCESS;
+    }
+
+    if (err_attr == NULL) {
+	status = PJ_SUCCESS;
+    } else {
+	status = PJ_STATUS_FROM_STUN_CODE(err_attr->err_code);
+    }
+
+    /* Call callback */
+    if (!tsx->complete) {
+	tsx->complete = PJ_TRUE;
+	if (tsx->cb.on_complete) {
+	    tsx->cb.on_complete(tsx, status, msg, src_addr, src_addr_len);
+	}
+    }
+
+    return PJ_SUCCESS;
+
+}
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjstun-client/client_main.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjstun-client/client_main.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjstun-client/client_main.c	(revision 1163)
@@ -0,0 +1,692 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 <pjnath.h>
+#include <pjlib-util.h>
+#include <pjlib.h>
+
+
+#define THIS_FILE	"client_main.c"
+#define LOCAL_PORT	1998
+#define BANDWIDTH	64		    /* -1 to disable */
+#define LIFETIME	600		    /* -1 to disable */
+#define REQ_TRANSPORT	-1		    /* 0: udp, 1: tcp, -1: disable */
+#define REQ_PORT_PROPS	-1		    /* -1 to disable */
+#define REQ_IP		NULL		    /* IP address string */
+
+//#define OPTIONS		PJ_STUN_NO_AUTHENTICATE
+#define OPTIONS		0
+
+
+static struct global
+{
+    pj_stun_config	 stun_config;
+    pj_pool_t		*pool;
+    pj_caching_pool	 cp;
+    pj_timer_heap_t	*th;
+    pj_stun_session	*sess;
+    pj_sock_t		 sock;
+    pj_thread_t		*thread;
+    pj_bool_t		 quit;
+    pj_sockaddr_in	 peer_addr;
+    pj_sockaddr_in	 srv_addr;
+    pj_sockaddr_in	 relay_addr;
+    char		 data_buf[256];
+    char		*data;
+} g;
+
+static struct options
+{
+    char    *srv_addr;
+    char    *srv_port;
+    char    *realm;
+    char    *user_name;
+    char    *password;
+    char    *nonce;
+    char    *peer_addr;
+    pj_bool_t use_fingerprint;
+} o;
+
+
+static pj_status_t parse_addr(const char *input, pj_sockaddr_in *addr);
+
+
+static my_perror(const char *title, pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+    pj_strerror(status, errmsg, sizeof(errmsg));
+
+    PJ_LOG(3,(THIS_FILE, "%s: %s", title, errmsg));
+}
+
+static pj_status_t on_send_msg(pj_stun_session *sess,
+			       const void *pkt,
+			       pj_size_t pkt_size,
+			       const pj_sockaddr_t *srv_addr,
+			       unsigned addr_len)
+{
+    pj_ssize_t len;
+    pj_status_t status;
+
+    len = pkt_size;
+    status = pj_sock_sendto(g.sock, pkt, &len, 0, srv_addr, addr_len);
+
+    if (status != PJ_SUCCESS)
+	my_perror("Error sending packet", status);
+
+    return status;
+}
+
+static void on_request_complete(pj_stun_session *sess,
+			        pj_status_t status,
+			        pj_stun_tx_data *tdata,
+			        const pj_stun_msg *response,
+				const pj_sockaddr_t *src_addr,
+				unsigned src_addr_len)
+{
+    PJ_UNUSED_ARG(src_addr);
+    PJ_UNUSED_ARG(src_addr_len);
+
+    if (status == PJ_SUCCESS) {
+	switch (response->hdr.type) {
+	case PJ_STUN_ALLOCATE_RESPONSE:
+	    {
+		pj_stun_relay_addr_attr *ar;
+
+		ar = (pj_stun_relay_addr_attr*)
+		     pj_stun_msg_find_attr(response, 
+					   PJ_STUN_ATTR_RELAY_ADDR, 0);
+		if (ar) {
+		    pj_memcpy(&g.relay_addr, &ar->sockaddr.ipv4,
+			      sizeof(pj_sockaddr_in));
+		    PJ_LOG(3,(THIS_FILE, "Relay address is %s:%d",
+			      pj_inet_ntoa(g.relay_addr.sin_addr),
+			      (int)pj_ntohs(g.relay_addr.sin_port)));
+		} else {
+		    pj_memset(&g.relay_addr, 0, sizeof(g.relay_addr));
+		}
+	    }
+	    break;
+	}
+    } else {
+	my_perror("Client transaction error", status);
+    }
+}
+
+static int worker_thread(void *unused)
+{
+    PJ_UNUSED_ARG(unused);
+
+    while (!g.quit) {
+	pj_time_val timeout =  {0, 50};
+	pj_fd_set_t readset;
+	int n;
+
+	pj_timer_heap_poll(g.th, NULL);
+
+	PJ_FD_ZERO(&readset);
+	PJ_FD_SET(g.sock, &readset);
+
+	n = pj_sock_select(g.sock+1, &readset, NULL, NULL, &timeout);
+	if (n > 0) {
+	    if (PJ_FD_ISSET(g.sock, &readset)) {
+		char buffer[512];
+		pj_ssize_t len;
+		pj_sockaddr_in addr;
+		int addrlen;
+		pj_status_t rc;
+
+		len = sizeof(buffer);
+		addrlen = sizeof(addr);
+		rc = pj_sock_recvfrom(g.sock, buffer, &len, 0, &addr, &addrlen);
+		if (rc != PJ_SUCCESS || len <= 0)
+		    continue;
+
+		if (pj_stun_msg_check(buffer, len, PJ_STUN_IS_DATAGRAM)==PJ_SUCCESS) {
+		    rc = pj_stun_session_on_rx_pkt(g.sess, buffer, len, 
+						   OPTIONS, 
+						   NULL, &addr, addrlen);
+		    if (rc != PJ_SUCCESS)
+			my_perror("Error processing packet", rc);
+
+		} else {
+		    buffer[len] = '\0';
+		    PJ_LOG(3,(THIS_FILE, "Received data: %s", (char*)buffer));
+		}
+	    }
+	} else if (n < 0)
+	    pj_thread_sleep(50);
+    }
+
+    return 0;
+}
+
+static int init()
+{
+    pj_sockaddr_in addr;
+    pj_stun_session_cb stun_cb;
+    int len;
+    pj_status_t status;
+
+    g.sock = PJ_INVALID_SOCKET;
+
+    status = pj_init();
+    status = pjlib_util_init();
+    status = pjnath_init();
+
+    pj_caching_pool_init(&g.cp, &pj_pool_factory_default_policy, 0);
+
+    if (o.srv_addr) {
+	pj_str_t s;
+	pj_uint16_t port;
+
+	if (o.srv_port)
+	    port = (pj_uint16_t) atoi(o.srv_port);
+	else
+	    port = PJ_STUN_PORT;
+
+	status = pj_sockaddr_in_init(&g.srv_addr, pj_cstr(&s, o.srv_addr), port);
+	if (status != PJ_SUCCESS) {
+	    my_perror("Invalid address", status);
+	    return status;
+	}
+
+	printf("Destination address set to %s:%d\n", o.srv_addr, (int)port);
+    } else {
+	printf("Error: address must be specified\n");
+	return PJ_EINVAL;
+    }
+
+    g.pool = pj_pool_create(&g.cp.factory, NULL, 1000, 1000, NULL);
+
+    status = pj_timer_heap_create(g.pool, 1000, &g.th);
+    pj_assert(status == PJ_SUCCESS);
+
+    pj_stun_config_init(&g.stun_config, &g.cp.factory, 0, NULL, g.th);
+    pj_assert(status == PJ_SUCCESS);
+
+    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &g.sock);
+    pj_assert(status == PJ_SUCCESS);
+
+    status = pj_sockaddr_in_init(&addr, NULL, 0);
+    pj_assert(status == PJ_SUCCESS);
+
+    addr.sin_port = pj_htons((pj_uint16_t)LOCAL_PORT);
+    status = pj_sock_bind(g.sock, &addr, sizeof(addr));
+    pj_assert(status == PJ_SUCCESS);
+
+    len = sizeof(addr);
+    status = pj_sock_getsockname(g.sock, &addr, &len);
+    pj_assert(status == PJ_SUCCESS);
+
+    PJ_LOG(3,(THIS_FILE, "Listening on port %d", (int)pj_ntohs(addr.sin_port)));
+
+    pj_memcpy(&g.peer_addr, &addr, sizeof(pj_sockaddr_in));
+    if (g.peer_addr.sin_addr.s_addr == 0)
+	pj_gethostip(&g.peer_addr.sin_addr);
+
+    pj_memset(&stun_cb, 0, sizeof(stun_cb));
+    stun_cb.on_send_msg = &on_send_msg;
+    stun_cb.on_request_complete = &on_request_complete;
+
+    status = pj_stun_session_create(&g.stun_config, NULL, &stun_cb, 
+				    o.use_fingerprint!=0, &g.sess);
+    pj_assert(status == PJ_SUCCESS);
+
+    if (o.user_name) {
+	pj_stun_auth_cred cred;
+
+	pj_bzero(&cred, sizeof(cred));
+
+	cred.type = PJ_STUN_AUTH_CRED_STATIC;
+	cred.data.static_cred.realm = pj_str(o.realm);
+	cred.data.static_cred.username = pj_str(o.user_name);
+	cred.data.static_cred.data_type = 0;
+	cred.data.static_cred.data = pj_str(o.password);
+	cred.data.static_cred.nonce = pj_str(o.nonce);
+
+	pj_stun_session_set_credential(g.sess, &cred);
+	puts("Session credential set");
+    } else {
+	puts("Credential not set");
+    }
+
+    if (o.peer_addr) {
+	if (parse_addr(o.peer_addr, &g.peer_addr)!=PJ_SUCCESS)
+	    return -1;
+    }
+
+    status = pj_thread_create(g.pool, "stun", &worker_thread, NULL, 
+			      0, 0, &g.thread);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return PJ_SUCCESS;
+}
+
+
+static int shutdown()
+{
+    if (g.thread) {
+	g.quit = 1;
+	pj_thread_join(g.thread);
+	pj_thread_destroy(g.thread);
+	g.thread = NULL;
+    }
+    if (g.sess)
+	pj_stun_session_destroy(g.sess);
+    if (g.sock != PJ_INVALID_SOCKET)
+	pj_sock_close(g.sock);
+    if (g.th)
+	pj_timer_heap_destroy(g.th);
+    if (g.pool)
+	pj_pool_release(g.pool);
+
+    pj_pool_factory_dump(&g.cp.factory, PJ_TRUE);
+    pj_caching_pool_destroy(&g.cp);
+
+    return PJ_SUCCESS;
+}
+
+static void send_bind_request(void)
+{
+    pj_stun_tx_data *tdata;
+    pj_status_t rc;
+
+    rc = pj_stun_session_create_req(g.sess, PJ_STUN_BINDING_REQUEST, 
+				    NULL, &tdata);
+    pj_assert(rc == PJ_SUCCESS);
+
+    rc = pj_stun_session_send_msg(g.sess, PJ_FALSE, 
+				  &g.srv_addr, sizeof(g.srv_addr),
+				  tdata);
+    if (rc != PJ_SUCCESS)
+	my_perror("Error sending STUN request", rc);
+}
+
+static void send_allocate_request(pj_bool_t allocate)
+{
+    pj_stun_tx_data *tdata;
+    pj_status_t rc;
+
+    rc = pj_stun_session_create_req(g.sess, PJ_STUN_ALLOCATE_REQUEST, 
+				    NULL, &tdata);
+    pj_assert(rc == PJ_SUCCESS);
+
+
+    if (BANDWIDTH != -1) {
+	pj_stun_msg_add_uint_attr(tdata->pool, tdata->msg, 
+				  PJ_STUN_ATTR_BANDWIDTH, BANDWIDTH);
+    }
+
+    if (!allocate) {
+	pj_stun_msg_add_uint_attr(tdata->pool, tdata->msg, 
+				  PJ_STUN_ATTR_LIFETIME, 0);
+
+    } else {
+	if (LIFETIME != -1) {
+	    pj_stun_msg_add_uint_attr(tdata->pool, tdata->msg, 
+				      PJ_STUN_ATTR_LIFETIME, LIFETIME);
+	}
+
+	if (REQ_TRANSPORT != -1) {
+	    pj_stun_msg_add_uint_attr(tdata->pool, tdata->msg, 
+				      PJ_STUN_ATTR_REQ_TRANSPORT, REQ_TRANSPORT);
+	}
+
+	if (REQ_PORT_PROPS != -1) {
+	    pj_stun_msg_add_uint_attr(tdata->pool, tdata->msg, 
+				      PJ_STUN_ATTR_REQ_PORT_PROPS, REQ_PORT_PROPS);
+	}
+
+	if (REQ_IP != NULL) {
+	    pj_sockaddr_in addr;
+	    pj_str_t tmp;
+
+	    pj_sockaddr_in_init(&addr, pj_cstr(&tmp, REQ_IP), 0);
+	    pj_stun_msg_add_sockaddr_attr(tdata->pool, tdata->msg,
+					 PJ_STUN_ATTR_REQ_IP, PJ_FALSE,
+					 &addr, sizeof(addr));
+	}
+    }
+
+    rc = pj_stun_session_send_msg(g.sess, PJ_FALSE, 
+				  &g.srv_addr, sizeof(g.srv_addr),
+				  tdata);
+    pj_assert(rc == PJ_SUCCESS);
+}
+
+static void send_sad_request(pj_bool_t set)
+{
+    pj_stun_tx_data *tdata;
+    pj_status_t rc;
+
+    if (g.peer_addr.sin_addr.s_addr == 0 ||
+	g.peer_addr.sin_port == 0)
+    {
+	puts("Error: peer address is not set");
+	return;
+    }
+
+    rc = pj_stun_session_create_req(g.sess, 
+				    PJ_STUN_SET_ACTIVE_DESTINATION_REQUEST, 
+				    NULL, &tdata);
+    pj_assert(rc == PJ_SUCCESS);
+
+    if (set) {
+	pj_stun_msg_add_sockaddr_attr(tdata->pool, tdata->msg,
+				     PJ_STUN_ATTR_REMOTE_ADDR, PJ_FALSE,
+				     &g.peer_addr, sizeof(g.peer_addr));
+    }
+
+    rc = pj_stun_session_send_msg(g.sess, PJ_FALSE, 
+				  &g.srv_addr, sizeof(g.srv_addr),
+				  tdata);
+    pj_assert(rc == PJ_SUCCESS);
+}
+
+static void send_send_ind(void)
+{
+    pj_stun_tx_data *tdata;
+    int len;
+    pj_status_t rc;
+
+    if (g.peer_addr.sin_addr.s_addr == 0 ||
+	g.peer_addr.sin_port == 0)
+    {
+	puts("Error: peer address is not set");
+	return;
+    }
+
+    len = strlen(g.data);
+    if (len==0) {
+	puts("Error: data is not set");
+	return;
+    }
+
+    rc = pj_stun_session_create_ind(g.sess, PJ_STUN_SEND_INDICATION, &tdata);
+    pj_assert(rc == PJ_SUCCESS);
+
+    pj_stun_msg_add_sockaddr_attr(tdata->pool, tdata->msg,
+				  PJ_STUN_ATTR_REMOTE_ADDR, PJ_FALSE,
+				  &g.peer_addr, sizeof(g.peer_addr));
+    pj_stun_msg_add_binary_attr(tdata->pool, tdata->msg,
+				PJ_STUN_ATTR_DATA, g.data, len);
+
+    rc = pj_stun_session_send_msg(g.sess, PJ_FALSE, 
+				  &g.srv_addr, sizeof(g.srv_addr),
+				  tdata);
+    pj_assert(rc == PJ_SUCCESS);
+
+}
+
+static void send_raw_data_to_srv(void)
+{
+    pj_ssize_t len;
+
+    if (g.srv_addr.sin_addr.s_addr == 0 ||
+	g.srv_addr.sin_port == 0)
+    {
+	puts("Error: server address is not set");
+	return;
+    }
+
+    len = strlen(g.data);
+    if (len==0) {
+	puts("Error: data is not set");
+	return;
+    }
+
+    len = strlen(g.data);
+    pj_sock_sendto(g.sock, g.data, &len, 0, &g.srv_addr, sizeof(g.srv_addr));
+}
+
+static void send_raw_data_to_relay(void)
+{
+    pj_ssize_t len;
+
+    if (g.relay_addr.sin_addr.s_addr == 0 ||
+	g.relay_addr.sin_port == 0)
+    {
+	puts("Error: relay address is not set");
+	return;
+    }
+
+    len = strlen(g.data);
+    if (len==0) {
+	puts("Error: data is not set");
+	return;
+    }
+
+    len = strlen(g.data);
+    pj_sock_sendto(g.sock, g.data, &len, 0, &g.relay_addr, sizeof(g.relay_addr));
+}
+
+static pj_status_t parse_addr(const char *input,
+			      pj_sockaddr_in *addr)
+{
+    const char *pos;
+    pj_str_t ip;
+    pj_uint16_t port;
+    pj_sockaddr_in tmp_addr;
+
+    pos = pj_ansi_strchr(input, ':');
+    if (pos==NULL) {
+	puts("Invalid format");
+	return -1;
+    }
+
+    ip.ptr = (char*)input;
+    ip.slen = pos - input;
+    port = (pj_uint16_t)atoi(pos+1);
+
+    if (port==0) {
+	puts("Invalid port");
+	return -1;
+    }
+
+    if (pj_sockaddr_in_init(&tmp_addr, &ip, port)!=PJ_SUCCESS) {
+	puts("Invalid address");
+	return -1;
+    }
+
+    pj_memcpy(addr, &tmp_addr, sizeof(tmp_addr));
+
+    return PJ_SUCCESS;
+}
+
+static void set_peer_addr(void)
+{
+    char addr[64];
+
+    printf("Current peer address: %s:%d\n", 
+	   pj_inet_ntoa(g.peer_addr.sin_addr), 
+	   pj_ntohs(g.peer_addr.sin_port));
+
+    printf("Input peer address in IP:PORT format: ");
+    fflush(stdout);
+    gets(addr);
+
+    if (parse_addr(addr, &g.peer_addr) != PJ_SUCCESS) {
+	return;
+    }
+
+}
+
+static void menu(void)
+{
+    puts("Menu:");
+    printf("  pr      Set peer address (currently %s:%d)\n",
+	   pj_inet_ntoa(g.peer_addr.sin_addr), pj_ntohs(g.peer_addr.sin_port));
+    printf("  dt      Set data (currently \"%s\")\n", g.data);
+    puts("  br      Send Bind request");
+    puts("  ar      Send Allocate request");
+    puts("  dr      Send de-Allocate request");
+    puts("  sr      Send Set Active Destination request");
+    puts("  cr      Send clear Active Destination request");
+    puts("  si      Send data with Send Indication");
+    puts("  rw      Send raw data to TURN server");
+    puts("  rW      Send raw data to relay address");
+    puts("  q       Quit");
+    puts("");
+    printf("Choice: ");
+}
+
+
+static void console_main(void)
+{
+    while (!g.quit) {
+	char input[10];
+
+	menu();
+
+	fgets(input, sizeof(input), stdin);
+	
+	if (0) {
+
+	} else if (input[0]=='d' && input[1]=='t') {
+	    printf("Input data: ");
+	    gets(g.data);
+	    
+	} else if (input[0]=='p' && input[1]=='r') {
+	    set_peer_addr();
+	    
+	} else if (input[0]=='b' && input[1]=='r') {
+	    send_bind_request();
+	    
+	} else if (input[0]=='a' && input[1]=='r') {
+	    send_allocate_request(PJ_TRUE);
+	    
+	} else if (input[0]=='d' && input[1]=='r') {
+	    send_allocate_request(PJ_FALSE);
+	    
+	} else if (input[0]=='s' && input[1]=='r') {
+	    send_sad_request(PJ_TRUE);
+	    
+	} else if (input[0]=='c' && input[1]=='r') {
+	    send_sad_request(PJ_FALSE);
+	    
+	} else if (input[0]=='s' && input[1]=='i') {
+	    send_send_ind();
+	    
+	} else if (input[0]=='r' && input[1]=='w') {
+	    send_raw_data_to_srv();
+	    
+	} else if (input[0]=='r' && input[1]=='W') {
+	    send_raw_data_to_relay();
+	    
+	} else if (input[0]=='q') {
+	    g.quit = 1;
+	}
+    }
+}
+
+
+static void usage(void)
+{
+    puts("Usage: pjstun_client TARGET [OPTIONS]");
+    puts("");
+    puts("where TARGET is \"host[:port]\"");
+    puts("");
+    puts("and OPTIONS:");
+    puts(" --realm, -r       Set realm of the credential");
+    puts(" --username, -u    Set username of the credential");
+    puts(" --password, -p    Set password of the credential");
+    puts(" --nonce, -N       Set NONCE");   
+    puts(" --fingerprint, -F Use fingerprint for outgoing requests");
+    puts(" --peer, -P        Set peer address (address is in HOST:PORT format)");
+    puts(" --data, -D        Set data");
+    puts(" --help, -h");
+}
+
+int main(int argc, char *argv[])
+{
+    struct pj_getopt_option long_options[] = {
+	{ "realm",	1, 0, 'r'},
+	{ "username",	1, 0, 'u'},
+	{ "password",	1, 0, 'p'},
+	{ "nonce",	1, 0, 'N'},
+	{ "fingerprint",0, 0, 'F'},
+	{ "peer",	1, 0, 'P'},
+	{ "data",	1, 0, 'D'},
+	{ "help",	0, 0, 'h'}
+    };
+    int c, opt_id;
+    char *pos;
+    pj_status_t status;
+
+    g.data = g.data_buf;
+
+    while((c=pj_getopt_long(argc,argv, "r:u:p:hF", long_options, &opt_id))!=-1) {
+	switch (c) {
+	case 'r':
+	    o.realm = pj_optarg;
+	    break;
+	case 'u':
+	    o.user_name = pj_optarg;
+	    break;
+	case 'p':
+	    o.password = pj_optarg;
+	    break;
+	case 'N':
+	    o.nonce = pj_optarg;
+	    break;
+	case 'h':
+	    usage();
+	    return 0;
+	case 'F':
+	    o.use_fingerprint = PJ_TRUE;
+	    break;
+	case 'P':
+	    o.peer_addr = pj_optarg;
+	    break;
+	case 'D':
+	    g.data = pj_optarg;
+	    break;
+
+	default:
+	    printf("Argument \"%s\" is not valid. Use -h to see help",
+		   argv[pj_optind]);
+	    return 1;
+	}
+    }
+
+    if (pj_optind == argc) {
+	puts("Error: TARGET is needed");
+	return 1;
+    }
+
+    if ((pos=pj_ansi_strchr(argv[pj_optind], ':')) != NULL) {
+	o.srv_addr = argv[pj_optind];
+	*pos = '\0';
+	o.srv_port = pos+1;
+    } else {
+	o.srv_addr = argv[pj_optind];
+    }
+
+    status = init();
+    if (status != PJ_SUCCESS)
+	goto on_return;
+    
+    console_main();
+
+on_return:
+    shutdown();
+    return status ? 1 : 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/bind_usage.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/bind_usage.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/bind_usage.c	(revision 1163)
@@ -0,0 +1,206 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 "server.h"
+
+#define THIS_FILE   "bind_usage.c"
+
+static void usage_on_rx_data(pj_stun_usage *usage,
+			     void *pkt,
+			     pj_size_t pkt_size,
+			     const pj_sockaddr_t *src_addr,
+			     unsigned src_addr_len);
+static void usage_on_destroy(pj_stun_usage *usage);
+static pj_status_t sess_on_send_msg(pj_stun_session *sess,
+				    const void *pkt,
+				    pj_size_t pkt_size,
+				    const pj_sockaddr_t *dst_addr,
+				    unsigned addr_len);
+static pj_status_t sess_on_rx_request(pj_stun_session *sess,
+				      const pj_uint8_t *pkt,
+				      unsigned pkt_len,
+				      const pj_stun_msg *msg,
+				      const pj_sockaddr_t *src_addr,
+				      unsigned src_addr_len);
+
+struct bind_usage
+{
+    pj_pool_t	    *pool;
+    pj_stun_usage   *usage;
+    pj_stun_session *session;
+};
+
+
+PJ_DEF(pj_status_t) pj_stun_bind_usage_create(pj_stun_server *srv,
+					      const pj_str_t *ip_addr,
+					      unsigned port,
+					      pj_stun_usage **p_bu)
+{
+    pj_pool_t *pool;
+    struct bind_usage *bu;
+    pj_stun_server_info *si;
+    pj_stun_usage_cb usage_cb;
+    pj_stun_session_cb sess_cb;
+    pj_sockaddr_in local_addr;
+    pj_status_t status;
+
+    si = pj_stun_server_get_info(srv);
+
+    pool = pj_pool_create(si->pf, "bind%p", 128, 128, NULL);
+    bu = PJ_POOL_ZALLOC_T(pool, struct bind_usage);
+    bu->pool = pool;
+
+    status = pj_sockaddr_in_init(&local_addr, ip_addr, (pj_uint16_t)port);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    pj_bzero(&usage_cb, sizeof(usage_cb));
+    usage_cb.on_rx_data = &usage_on_rx_data;
+    usage_cb.on_destroy = &usage_on_destroy;
+
+    status = pj_stun_usage_create(srv, "bind%p", &usage_cb,
+				  PJ_AF_INET, PJ_SOCK_DGRAM, 0,
+				  &local_addr, sizeof(local_addr),
+				  &bu->usage);
+    if (status != PJ_SUCCESS) {
+	pj_pool_release(pool);
+	return status;
+    }
+
+    pj_bzero(&sess_cb, sizeof(sess_cb));
+    sess_cb.on_send_msg = &sess_on_send_msg;
+    sess_cb.on_rx_request = &sess_on_rx_request;
+    status = pj_stun_session_create(&si->stun_cfg, "bind%p", &sess_cb, 
+				    PJ_FALSE, &bu->session);
+    if (status != PJ_SUCCESS) {
+	pj_stun_usage_destroy(bu->usage);
+	return status;
+    }
+
+    pj_stun_usage_set_user_data(bu->usage, bu);
+    pj_stun_session_set_user_data(bu->session, bu);
+
+    if (p_bu)
+	*p_bu = bu->usage;
+
+    return PJ_SUCCESS;
+}
+
+
+static void usage_on_rx_data(pj_stun_usage *usage,
+			     void *pkt,
+			     pj_size_t pkt_size,
+			     const pj_sockaddr_t *src_addr,
+			     unsigned src_addr_len)
+{
+    struct bind_usage *bu;
+    pj_stun_session *session;
+    pj_status_t status;
+
+    bu = (struct bind_usage*) pj_stun_usage_get_user_data(usage);
+    session = bu->session;
+
+    /* Handle packet to session */
+    status = pj_stun_session_on_rx_pkt(session, (pj_uint8_t*)pkt, pkt_size,
+				       PJ_STUN_IS_DATAGRAM | PJ_STUN_CHECK_PACKET,
+				       NULL, src_addr, src_addr_len);
+    if (status != PJ_SUCCESS) {
+	pj_stun_perror(THIS_FILE, "Error handling incoming packet", status);
+	return;
+    }
+}
+
+
+static pj_status_t sess_on_send_msg(pj_stun_session *sess,
+				    const void *pkt,
+				    pj_size_t pkt_size,
+				    const pj_sockaddr_t *dst_addr,
+				    unsigned addr_len)
+{
+    struct bind_usage *bu;
+    pj_stun_usage *usage;
+
+    bu = (struct bind_usage*) pj_stun_session_get_user_data(sess);
+    usage = bu->usage;
+
+    return pj_stun_usage_sendto(usage, pkt, pkt_size, 0,
+				dst_addr, addr_len);
+}
+
+
+static pj_status_t sess_on_rx_request(pj_stun_session *sess,
+				      const pj_uint8_t *pkt,
+				      unsigned pkt_len,
+				      const pj_stun_msg *msg,
+				      const pj_sockaddr_t *src_addr,
+				      unsigned src_addr_len)
+{
+    pj_stun_tx_data *tdata;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(pkt);
+    PJ_UNUSED_ARG(pkt_len);
+
+    /* Create response */
+    status = pj_stun_session_create_response(sess, msg, 0, NULL, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create MAPPED-ADDRESS attribute */
+    status = pj_stun_msg_add_sockaddr_attr(tdata->pool, tdata->msg,
+				   	   PJ_STUN_ATTR_MAPPED_ADDR,
+					   PJ_FALSE,
+				           src_addr, src_addr_len);
+    if (status != PJ_SUCCESS) {
+	pj_stun_perror(THIS_FILE, "Error creating response", status);
+	pj_stun_msg_destroy_tdata(sess, tdata);
+	return status;
+    }
+
+    /* On the presence of magic, create XOR-MAPPED-ADDRESS attribute */
+    if (msg->hdr.magic == PJ_STUN_MAGIC) {
+	status = 
+	    pj_stun_msg_add_sockaddr_attr(tdata->pool, tdata->msg,
+					  PJ_STUN_ATTR_XOR_MAPPED_ADDR,
+					  PJ_TRUE,
+					  src_addr, src_addr_len);
+	if (status != PJ_SUCCESS) {
+	    pj_stun_perror(THIS_FILE, "Error creating response", status);
+	    pj_stun_msg_destroy_tdata(sess, tdata);
+	    return status;
+	}
+    }
+
+    /* Send */
+    status = pj_stun_session_send_msg(sess, PJ_TRUE, 
+				      src_addr, src_addr_len, tdata);
+    return status;
+
+}
+
+static void usage_on_destroy(pj_stun_usage *usage)
+{
+    struct bind_usage *bu;
+
+    bu = (struct bind_usage*) pj_stun_usage_get_user_data(usage);
+    if (bu==NULL)
+	return;
+
+    pj_stun_session_destroy(bu->session);
+    pj_pool_release(bu->pool);
+}
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/main.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/main.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/main.c	(revision 1163)
@@ -0,0 +1,146 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 "server.h"
+
+#define THIS_FILE	"main.c"
+
+struct options
+{
+    char	*realm;
+    char	*user_name;
+    char	*password;
+    char	*nonce;
+    pj_bool_t	 use_fingerprint;
+} o;
+
+static void usage(void)
+{
+    puts("Usage: pjstun_srv_test [OPTIONS]");
+    puts("");
+    puts("where OPTIONS:");
+    puts(" --realm, -r       Set realm of the credential");
+    puts(" --username, -u    Set username of the credential");
+    puts(" --password, -p    Set password of the credential");
+    puts(" --nonce, -N       Set NONCE");      
+    puts(" --fingerprint, -F Use fingerprint for outgoing requests");
+    puts(" --help, -h");
+}
+
+
+static void server_main(pj_stun_server *srv)
+{
+    int quit = 0;
+
+    while (!quit) {
+	char line[10];
+
+	printf("Menu:\n"
+	       "  d     Dump status\n"
+	       "  q     Quit\n"
+	       "Choice:");
+
+	fgets(line, sizeof(line), stdin);
+	if (line[0] == 'q') {
+	    quit = 1;
+	} else if (line[0] == 'd') {
+	    pj_stun_server_info *si = pj_stun_server_get_info(srv);
+	    pj_pool_factory_dump(si->pf, PJ_TRUE);
+	}
+    }
+}
+
+int main(int argc, char *argv[])
+{
+    struct pj_getopt_option long_options[] = {
+	{ "realm",	1, 0, 'r'},
+	{ "username",	1, 0, 'u'},
+	{ "password",	1, 0, 'p'},
+	{ "nonce",	1, 0, 'N'},
+	{ "fingerprint",0, 0, 'F'},
+	{ "help",	0, 0, 'h'}
+    };
+    int c, opt_id;
+    pj_caching_pool cp;
+    pj_stun_server *srv;
+    pj_status_t status;
+
+    while((c=pj_getopt_long(argc,argv, "r:u:p:hF", long_options, &opt_id))!=-1) {
+	switch (c) {
+	case 'r':
+	    o.realm = pj_optarg;
+	    break;
+	case 'u':
+	    o.user_name = pj_optarg;
+	    break;
+	case 'p':
+	    o.password = pj_optarg;
+	    break;
+	case 'N':
+	    o.nonce = pj_optarg;
+	    break;
+	case 'h':
+	    usage();
+	    return 0;
+	case 'F':
+	    o.use_fingerprint = PJ_TRUE;
+	    break;
+	default:
+	    printf("Argument \"%s\" is not valid. Use -h to see help",
+		   argv[pj_optind]);
+	    return 1;
+	}
+    }
+
+    if (pj_optind != argc) {
+	puts("Error: invalid arguments");
+	return 1;
+    }
+
+    pj_init();
+    pjlib_util_init();
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+
+    status = pj_stun_server_create(&cp.factory, 1, &srv);
+    if (status != PJ_SUCCESS) {
+	pj_stun_perror(THIS_FILE, "Unable to create server", status);
+	return 1;
+    }
+
+    /*
+    status = pj_stun_bind_usage_create(srv, NULL, 3478, NULL);
+    if (status != PJ_SUCCESS) {
+	pj_stun_perror(THIS_FILE, "Unable to create bind usage", status);
+	return 1;
+    }
+    */
+
+    status = pj_stun_turn_usage_create(srv, PJ_SOCK_DGRAM, NULL,
+				       3478, NULL);
+    if (status != PJ_SUCCESS) {
+	pj_stun_perror(THIS_FILE, "Unable to create bind usage", status);
+	return 1;
+    }
+
+    server_main(srv);
+
+    pj_stun_server_destroy(srv);
+    pj_pool_factory_dump(&cp.factory, PJ_TRUE);
+    pj_shutdown();
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/server.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/server.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/server.c	(revision 1163)
@@ -0,0 +1,182 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 "server.h"
+
+#define THIS_FILE	"server.c"
+
+struct pj_stun_server
+{
+    pj_stun_server_info	si;
+
+    pj_pool_t		*pool;
+
+    pj_bool_t		 thread_quit_flag;
+    pj_thread_t	       **threads;
+
+    unsigned		 usage_cnt;
+    pj_stun_usage	*usage[32];
+};
+
+PJ_DEF(pj_status_t) pj_stun_perror( const char *sender, 
+				    const char *title, 
+				    pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+    pj_strerror(status, errmsg, sizeof(errmsg));
+
+    PJ_LOG(3,(sender, "%s: %s", title, errmsg));
+    return status;
+}
+
+static int worker_thread(void *p)
+{
+    pj_stun_server *srv = (pj_stun_server*)p;
+
+    while (!srv->thread_quit_flag) {
+	pj_time_val timeout = { 0, 50 };
+	pj_timer_heap_poll(srv->si.timer_heap, NULL);
+	pj_ioqueue_poll(srv->si.ioqueue, &timeout);
+    }
+
+    return 0;
+}
+
+
+PJ_DEF(pj_status_t) pj_stun_server_create(pj_pool_factory *pf,
+					  unsigned thread_cnt,
+					  pj_stun_server **p_srv)
+{
+    pj_pool_t *pool;
+    pj_stun_server *srv;
+    unsigned i;
+    pj_status_t status;
+
+    pool = pj_pool_create(pf, "server%p", 4000, 4000, NULL);
+
+    srv = PJ_POOL_ZALLOC_T(pool, pj_stun_server);
+    srv->pool = pool;
+    srv->si.pf = pf;
+
+    status = pj_ioqueue_create(srv->pool, PJ_IOQUEUE_MAX_HANDLES, 
+			       &srv->si.ioqueue);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    status = pj_timer_heap_create(srv->pool, 1024, &srv->si.timer_heap);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    pj_stun_config_init(&srv->si.stun_cfg, srv->si.pf, 0, srv->si.ioqueue,
+			srv->si.timer_heap);
+
+    srv->si.thread_cnt = thread_cnt;
+    srv->threads = pj_pool_calloc(pool, thread_cnt, sizeof(pj_thread_t*));
+    for (i=0; i<thread_cnt; ++i) {
+	status = pj_thread_create(pool, "worker%p", &worker_thread,
+				  srv, 0, 0, &srv->threads[i]);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+    }
+
+    *p_srv = srv;
+    return PJ_SUCCESS;
+
+on_error:
+    pj_stun_server_destroy(srv);
+    return status;
+}
+
+
+PJ_DEF(pj_stun_server_info*) pj_stun_server_get_info(pj_stun_server *srv)
+{
+    return &srv->si;
+}
+
+
+pj_status_t pj_stun_server_register_usage(pj_stun_server *srv,
+					  pj_stun_usage *usage)
+{
+    unsigned i;
+
+    for (i=0; i<PJ_ARRAY_SIZE(srv->usage); ++i) {
+	if (srv->usage[i] == usage)
+	    return PJ_SUCCESS;
+    }
+
+    for (i=0; i<PJ_ARRAY_SIZE(srv->usage); ++i) {
+	if (srv->usage[i] == NULL)
+	    break;
+    }
+
+    if (i == PJ_ARRAY_SIZE(srv->usage))
+	return PJ_ETOOMANY;
+
+    srv->usage[i] = usage;
+    ++srv->usage_cnt;
+
+    return PJ_SUCCESS;
+}
+
+pj_status_t pj_stun_server_unregister_usage(pj_stun_server *srv,
+					    pj_stun_usage *usage)
+{
+    unsigned i;
+
+    for (i=0; i<PJ_ARRAY_SIZE(srv->usage); ++i) {
+	if (srv->usage[i] == usage)
+	    break;
+    }
+
+    if (i != PJ_ARRAY_SIZE(srv->usage)) {
+	srv->usage[i] = NULL;
+	--srv->usage_cnt;
+	return PJ_SUCCESS;
+    }
+
+    return PJ_ENOTFOUND;
+}
+
+
+PJ_DEF(pj_status_t) pj_stun_server_destroy(pj_stun_server *srv)
+{
+    unsigned i;
+
+    for (i=0; i<PJ_ARRAY_SIZE(srv->usage); ++i) {
+	if (!srv->usage[i])
+	    continue;
+
+	pj_stun_usage_destroy(srv->usage[i]);
+	pj_stun_server_unregister_usage(srv, srv->usage[i]);
+    }
+
+    srv->thread_quit_flag = PJ_TRUE;
+    for (i=0; i<srv->si.thread_cnt; ++i) {
+	pj_thread_join(srv->threads[i]);
+	srv->threads[i] = NULL;
+    }
+
+    pj_timer_heap_destroy(srv->si.timer_heap);
+    pj_ioqueue_destroy(srv->si.ioqueue);
+    pj_pool_release(srv->pool);
+
+    return PJ_SUCCESS;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/server.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/server.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/server.h	(revision 1163)
@@ -0,0 +1,136 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 __STUN_SERVER_H__
+#define __STUN_SERVER_H__
+
+#include <pjnath.h>
+#include <pjlib-util.h>
+#include <pjlib.h>
+
+
+/** Opaque declaration for STUN server instance */
+typedef struct pj_stun_server pj_stun_server;
+
+/** STUN server info */
+typedef struct pj_stun_server_info
+{
+    pj_pool_factory	*pf;
+    pj_stun_config	 stun_cfg;
+    pj_ioqueue_t	*ioqueue;
+    pj_timer_heap_t	*timer_heap;
+    unsigned		 thread_cnt;
+} pj_stun_server_info;
+
+/** STUN usage */
+typedef struct pj_stun_usage pj_stun_usage;
+
+/** STUN usage callback */
+typedef struct pj_stun_usage_cb
+{
+    void (*on_rx_data)(pj_stun_usage *usage,
+		       void *pkt,
+		       pj_size_t pkt_size,
+		       const pj_sockaddr_t *src_addr,
+		       unsigned src_addr_len);
+    void (*on_destroy)(pj_stun_usage *usage);
+} pj_stun_usage_cb;
+
+
+PJ_DECL(pj_status_t) pj_stun_perror(const char *sender, 
+				    const char *title, 
+				    pj_status_t status);
+
+/**
+ * Create instance of STUN server.
+ */
+PJ_DECL(pj_status_t) pj_stun_server_create(pj_pool_factory *pf,
+					   unsigned thread_cnt,
+					   pj_stun_server **p_srv);
+
+/**
+ * Get STUN server info.
+ */
+PJ_DECL(pj_stun_server_info*) pj_stun_server_get_info(pj_stun_server *srv);
+
+
+/**
+ * Destroy STUN server.
+ */
+PJ_DECL(pj_status_t) pj_stun_server_destroy(pj_stun_server *srv);
+
+
+/**
+ * Create STUN usage.
+ */
+PJ_DECL(pj_status_t) pj_stun_usage_create(pj_stun_server *srv,
+					  const char *name,
+					  const pj_stun_usage_cb *cb,
+					  int family,
+					  int type,
+					  int protocol,
+					  const pj_sockaddr_t *local_addr,
+					  int addr_len,
+					  pj_stun_usage **p_usage);
+
+/**
+ * Destroy usage.
+ */
+PJ_DECL(pj_status_t) pj_stun_usage_destroy(pj_stun_usage *usage);
+
+/**
+ * Set user data.
+ */
+PJ_DECL(pj_status_t) pj_stun_usage_set_user_data(pj_stun_usage *usage,
+						 void *user_data);
+/**
+ * Get user data.
+ */
+PJ_DECL(void*) pj_stun_usage_get_user_data(pj_stun_usage *usage);
+
+/**
+ * Send with the usage.
+ */
+PJ_DECL(pj_status_t) pj_stun_usage_sendto(pj_stun_usage *usage,
+					  const void *pkt,
+					  pj_size_t pkt_size,
+					  unsigned flags,
+					  const pj_sockaddr_t *dst_addr,
+					  unsigned addr_len);
+
+PJ_DECL(pj_status_t) pj_stun_bind_usage_create(pj_stun_server *srv,
+					       const pj_str_t *ip_addr,
+					       unsigned port,
+					       pj_stun_usage **p_bu);
+
+PJ_DECL(pj_status_t) pj_stun_turn_usage_create(pj_stun_server *srv,
+					       int type,
+					       const pj_str_t *ip_addr,
+					       unsigned port,
+					       pj_stun_usage **p_bu);
+
+
+pj_status_t pj_stun_server_register_usage(pj_stun_server *srv,
+					  pj_stun_usage *usage);
+pj_status_t pj_stun_server_unregister_usage(pj_stun_server *srv,
+					    pj_stun_usage *usage);
+
+
+#endif	/* __STUN_SERVER_H__ */
+
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/turn_usage.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/turn_usage.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/turn_usage.c	(revision 1163)
@@ -0,0 +1,1410 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 "server.h"
+
+#define THIS_FILE   "turn_usage.c"
+
+#define MAX_CLIENTS		8000
+#define MAX_PEER_PER_CLIENT	16
+#define START_PORT		2000
+#define END_PORT		65530
+
+/*
+ * Forward declarations.
+ */
+struct turn_usage;
+struct turn_client;
+
+static void	   tu_on_rx_data(pj_stun_usage *usage,
+				 void *pkt,
+				 pj_size_t pkt_size,
+				 const pj_sockaddr_t *src_addr,
+				 unsigned src_addr_len);
+static void	   tu_on_destroy(pj_stun_usage *usage);
+static pj_status_t tu_sess_on_send_msg(pj_stun_session *sess,
+				       const void *pkt,
+				       pj_size_t pkt_size,
+				       const pj_sockaddr_t *dst_addr,
+				       unsigned addr_len);
+static pj_status_t tu_sess_on_rx_request(pj_stun_session *sess,
+					 const pj_uint8_t *pkt,
+					 unsigned pkt_len,
+					 const pj_stun_msg *msg,
+					 const pj_sockaddr_t *src_addr,
+					 unsigned src_addr_len);
+
+static pj_status_t handle_binding_req(pj_stun_session *session,
+				      const pj_stun_msg *msg,
+				      const pj_sockaddr_t *src_addr,
+				      unsigned src_addr_len);
+
+static pj_status_t client_create(struct turn_usage *tu,
+				 const pj_sockaddr_t *src_addr,
+				 unsigned src_addr_len,
+				 struct turn_client **p_client);
+static pj_status_t client_destroy(struct turn_client *client,
+				  pj_status_t reason);
+static pj_status_t client_handle_stun_msg(struct turn_client *client,
+					  const pj_stun_msg *msg,
+					  const pj_sockaddr_t *src_addr,
+					  unsigned src_addr_len);
+
+
+struct turn_usage
+{
+    pj_pool_factory	*pf;
+    pj_stun_config	*cfg;
+    pj_ioqueue_t	*ioqueue;
+    pj_timer_heap_t	*timer_heap;
+    pj_pool_t		*pool;
+    pj_mutex_t		*mutex;
+    pj_stun_usage	*usage;
+    int			 type;
+    pj_stun_session	*default_session;
+    pj_hash_table_t	*client_htable;
+
+    unsigned		 max_bw_kbps;
+    unsigned		 max_lifetime;
+
+    unsigned		 next_port;
+};
+
+struct peer;
+
+struct turn_client
+{
+    char		 obj_name[PJ_MAX_OBJ_NAME];
+    struct turn_usage	*tu;
+    pj_pool_t		*pool;
+    pj_stun_session	*session;
+    pj_mutex_t		*mutex;
+
+    pj_sockaddr_in	 client_src_addr;
+
+    /* Socket and socket address of the allocated port */
+    int			 sock_type;
+    pj_sock_t		 sock;
+    pj_ioqueue_key_t	*key;
+    pj_sockaddr_in	 alloc_addr;
+
+    /* Allocation properties */
+    unsigned		 bw_kbps;
+    unsigned		 lifetime;
+    pj_timer_entry	 expiry_timer;
+
+
+    /* Hash table to keep all peers, key-ed by their address */
+    pj_hash_table_t	*peer_htable;
+
+    /* Active destination, or sin_addr.s_addr will be zero if
+     * no active destination is set.
+     */
+    struct peer		*active_peer;
+
+    /* Current packet received/sent from/to the allocated port */
+    pj_uint8_t		 pkt[4000];
+    pj_sockaddr_in	 pkt_src_addr;
+    int			 pkt_src_addr_len;
+    pj_ioqueue_op_key_t	 pkt_read_key;
+    pj_ioqueue_op_key_t  pkt_write_key;
+};
+
+struct peer
+{
+    struct turn_client   *client;
+    pj_sockaddr_in	  addr;
+};
+
+struct session_data
+{
+    struct turn_usage	*tu;
+    struct turn_client	*client;
+};
+
+
+/*
+ * This is the only public API, to create and start the TURN usage.
+ */
+PJ_DEF(pj_status_t) pj_stun_turn_usage_create(pj_stun_server *srv,
+					      int type,
+					      const pj_str_t *ip_addr,
+					      unsigned port,
+					      pj_stun_usage **p_bu)
+{
+    pj_pool_t *pool;
+    struct turn_usage *tu;
+    pj_stun_server_info *si;
+    pj_stun_usage_cb usage_cb;
+    pj_stun_session_cb sess_cb;
+    struct session_data *sd;
+    pj_sockaddr_in local_addr;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(srv && (type==PJ_SOCK_DGRAM||type==PJ_SOCK_STREAM),
+		     PJ_EINVAL);
+    si = pj_stun_server_get_info(srv);
+
+    pool = pj_pool_create(si->pf, "turn%p", 4000, 4000, NULL);
+    tu = PJ_POOL_ZALLOC_T(pool, struct turn_usage);
+    tu->pool = pool;
+    tu->type = type;
+    tu->pf = si->pf;
+    tu->cfg = &si->stun_cfg;
+    tu->ioqueue = si->ioqueue;
+    tu->timer_heap = si->timer_heap;
+    tu->next_port = START_PORT;
+    tu->max_bw_kbps = 64;
+    tu->max_lifetime = 10 * 60;
+
+    status = pj_sockaddr_in_init(&local_addr, ip_addr, (pj_uint16_t)port);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create usage */
+    pj_bzero(&usage_cb, sizeof(usage_cb));
+    usage_cb.on_rx_data = &tu_on_rx_data;
+    usage_cb.on_destroy = &tu_on_destroy;
+    status = pj_stun_usage_create(srv, "turn%p", &usage_cb,
+				  PJ_AF_INET, tu->type, 0,
+				  &local_addr, sizeof(local_addr),
+				  &tu->usage);
+    if (status != PJ_SUCCESS) {
+	pj_pool_release(pool);
+	return status;
+    }
+    pj_stun_usage_set_user_data(tu->usage, tu);
+
+    /* Init hash tables */
+    tu->client_htable = pj_hash_create(tu->pool, MAX_CLIENTS);
+
+    /* Create default session */
+    pj_bzero(&sess_cb, sizeof(sess_cb));
+    sess_cb.on_send_msg = &tu_sess_on_send_msg;
+    sess_cb.on_rx_request = &tu_sess_on_rx_request;
+    status = pj_stun_session_create(&si->stun_cfg, "turns%p", &sess_cb, 
+				    PJ_FALSE, &tu->default_session);
+    if (status != PJ_SUCCESS) {
+	pj_stun_usage_destroy(tu->usage);
+	return status;
+    }
+
+    sd = PJ_POOL_ZALLOC_T(pool, struct session_data);
+    sd->tu = tu;
+    pj_stun_session_set_user_data(tu->default_session, sd);
+
+    pj_stun_session_set_server_name(tu->default_session, NULL);
+
+    /* Create mutex */
+    status = pj_mutex_create_recursive(pool, "turn%p", &tu->mutex);
+    if (status != PJ_SUCCESS) {
+	pj_stun_usage_destroy(tu->usage);
+	return status;
+    }
+
+    if (p_bu) {
+	*p_bu = tu->usage;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/* 
+ * This is a callback called by usage.c when the particular STUN usage
+ * is to be destroyed.
+ */
+static void tu_on_destroy(pj_stun_usage *usage)
+{
+    struct turn_usage *tu;
+    pj_hash_iterator_t hit, *it;
+
+    tu = (struct turn_usage*) pj_stun_usage_get_user_data(usage);
+
+    /* Destroy all clients */
+    if (tu->client_htable) {
+	it = pj_hash_first(tu->client_htable, &hit);
+	while (it) {
+	    struct turn_client *client;
+
+	    client = (struct turn_client *)pj_hash_this(tu->client_htable, it);
+	    client_destroy(client, PJ_SUCCESS);
+
+	    it = pj_hash_first(tu->client_htable, &hit);
+	}
+    }
+
+    pj_stun_session_destroy(tu->default_session);
+    pj_mutex_destroy(tu->mutex);
+    pj_pool_release(tu->pool);
+}
+
+
+/*
+ * This is a callback called by the usage.c to notify the TURN usage, 
+ * that incoming packet (may or may not be a STUN packet) is received
+ * on the port where the TURN usage is listening.
+ */
+static void tu_on_rx_data(pj_stun_usage *usage,
+			  void *pkt,
+			  pj_size_t pkt_size,
+			  const pj_sockaddr_t *src_addr,
+			  unsigned src_addr_len)
+{
+    struct turn_usage *tu;
+    struct turn_client *client;
+    unsigned flags;
+    pj_status_t status;
+
+    /* Which usage instance is this */
+    tu = (struct turn_usage*) pj_stun_usage_get_user_data(usage);
+
+    /* Lookup client structure based on source address */
+    client = (struct turn_client*) pj_hash_get(tu->client_htable, src_addr,
+					       src_addr_len, NULL);
+
+    /* STUN message decoding flag */
+    flags = 0;
+    if (tu->type == PJ_SOCK_DGRAM)
+	flags |= PJ_STUN_IS_DATAGRAM;
+    
+
+    if (client) {
+	status = pj_stun_msg_check(pkt, pkt_size, flags);
+
+	if (status == PJ_SUCCESS) {
+	    /* Received STUN message */
+	    status = pj_stun_session_on_rx_pkt(client->session, 
+					       (pj_uint8_t*)pkt, pkt_size, 
+					       flags, NULL, 
+					       src_addr, src_addr_len);
+	} else if (client->active_peer) {
+	    /* Received non-STUN message and client has active destination */
+	    pj_ssize_t sz = pkt_size;
+	    pj_ioqueue_sendto(client->key, &client->pkt_write_key,
+			      pkt, &sz, 0,
+			      &client->active_peer->addr,
+			      sizeof(client->active_peer->addr));
+	} else {
+	    /* Received non-STUN message and client doesn't have active 
+	     * destination.
+	     */
+	    /* Ignore */
+	}
+
+    } else {
+	/* Received packet (could be STUN or no) from new source */
+	flags |= PJ_STUN_CHECK_PACKET;
+	pj_stun_session_on_rx_pkt(tu->default_session, (pj_uint8_t*)pkt, 
+				  pkt_size, flags, NULL, 
+				  src_addr, src_addr_len);
+    }
+}
+
+
+/*
+ * This is a utility function provided by TU (Turn Usage) to reserve
+ * or allocate internal port/socket. The allocation needs to be 
+ * coordinated to minimize bind() collissions.
+ */
+static pj_status_t tu_alloc_port(struct turn_usage *tu, 
+				 int type, 
+				 unsigned rpp_bits, 
+				 const pj_sockaddr_in *req_addr,
+				 pj_sock_t *p_sock,
+				 int *err_code)
+{
+    enum { RETRY = 100 };
+    pj_sockaddr_in addr;
+    pj_sock_t sock = PJ_INVALID_SOCKET;
+    unsigned retry;
+    pj_status_t status;
+
+    if (req_addr && req_addr->sin_port != 0) {
+
+	*err_code = PJ_STUN_SC_INVALID_PORT;
+
+	/* Allocate specific port */
+	status = pj_sock_socket(PJ_AF_INET, type, 0, &sock);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	/* Bind */
+	status = pj_sock_bind(sock, req_addr, sizeof(pj_sockaddr_in));
+	if (status != PJ_SUCCESS) {
+	    pj_sock_close(sock);
+	    return status;
+	}
+
+	/* Success */
+	*p_sock = sock;
+	return PJ_SUCCESS;
+
+    } else {
+	status = -1;
+	*err_code = PJ_STUN_SC_INSUFFICIENT_CAPACITY;
+
+	if (req_addr && req_addr->sin_addr.s_addr) {
+	    *err_code = PJ_STUN_SC_INVALID_IP_ADDR;
+	    pj_memcpy(&addr, req_addr, sizeof(pj_sockaddr_in));
+	} else {
+	    pj_sockaddr_in_init(&addr, NULL, 0);
+	}
+
+	for (retry=0; retry<RETRY && sock == PJ_INVALID_SOCKET; ++retry) {
+	    switch (rpp_bits) {
+	    case 1:
+		if ((tu->next_port & 0x01)==0)
+		    tu->next_port++;
+		break;
+	    case 2:
+	    case 3:
+		if ((tu->next_port & 0x01)==1)
+		    tu->next_port++;
+		break;
+	    }
+
+	    status = pj_sock_socket(PJ_AF_INET, type, 0, &sock);
+	    if (status != PJ_SUCCESS)
+		return status;
+
+	    addr.sin_port = pj_htons((pj_uint16_t)tu->next_port);
+
+	    if (++tu->next_port > END_PORT)
+		tu->next_port = START_PORT;
+
+	    status = pj_sock_bind(sock, &addr, sizeof(addr));
+	    if (status != PJ_SUCCESS) {
+		pj_sock_close(sock);
+		sock = PJ_INVALID_SOCKET;
+
+		/* If client requested specific IP address, assume that
+		 * bind failed because the IP address is not valid. We
+		 * don't want to retry that since it will exhaust our
+		 * port space.
+		 */
+		if (req_addr && req_addr->sin_addr.s_addr)
+		    break;
+	    }
+	}
+
+	if (sock == PJ_INVALID_SOCKET) {
+	    return status;
+	}
+
+	*p_sock = sock;
+	return PJ_SUCCESS;
+    }
+}
+
+
+/* 
+ * This callback is called by the TU's STUN session when it receives
+ * a valid STUN message. This is called from tu_on_rx_data above.
+ */
+static pj_status_t tu_sess_on_rx_request(pj_stun_session *sess,
+					 const pj_uint8_t *pkt,
+					 unsigned pkt_len,
+					 const pj_stun_msg *msg,
+					 const pj_sockaddr_t *src_addr,
+					 unsigned src_addr_len)
+{
+    struct session_data *sd;
+    struct turn_client *client;
+    pj_stun_tx_data *tdata;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(pkt);
+    PJ_UNUSED_ARG(pkt_len);
+
+    sd = (struct session_data*) pj_stun_session_get_user_data(sess);
+
+    pj_assert(sd->client == NULL);
+
+    if (msg->hdr.type == PJ_STUN_BINDING_REQUEST) {
+	return handle_binding_req(sess, msg, src_addr, src_addr_len);
+
+    } else if (msg->hdr.type != PJ_STUN_ALLOCATE_REQUEST) {
+	if (PJ_STUN_IS_REQUEST(msg->hdr.type)) {
+	    status = pj_stun_session_create_response(sess, msg, 
+						     PJ_STUN_SC_NO_BINDING,
+						     NULL, &tdata);
+	    if (status==PJ_SUCCESS) {
+		status = pj_stun_session_send_msg(sess, PJ_FALSE, 
+						  src_addr, src_addr_len,
+						  tdata);
+	    }
+	} else {
+	    PJ_LOG(4,(THIS_FILE, 
+		      "Received %s %s without matching Allocation, "
+		      "ignored", pj_stun_get_method_name(msg->hdr.type),
+		      pj_stun_get_class_name(msg->hdr.type)));
+	}
+	return PJ_SUCCESS;
+    }
+
+    status = client_create(sd->tu, src_addr, src_addr_len, &client);
+    if (status != PJ_SUCCESS) {
+	pj_stun_perror(THIS_FILE, "Error creating new TURN client", 
+		       status);
+	return status;
+    }
+
+
+    /* Hand over message to client */
+    pj_mutex_lock(client->mutex);
+    status = client_handle_stun_msg(client, msg, src_addr, src_addr_len);
+    pj_mutex_unlock(client->mutex);
+
+    return status;
+}
+
+
+/*
+ * This callback is called by STUN session when it needs to send packet
+ * to the network.
+ */
+static pj_status_t tu_sess_on_send_msg(pj_stun_session *sess,
+				       const void *pkt,
+				       pj_size_t pkt_size,
+				       const pj_sockaddr_t *dst_addr,
+				       unsigned addr_len)
+{
+    struct session_data *sd;
+
+    sd = (struct session_data*) pj_stun_session_get_user_data(sess);
+
+    if (sd->tu->type == PJ_SOCK_DGRAM) {
+	return pj_stun_usage_sendto(sd->tu->usage, pkt, pkt_size, 0,
+				    dst_addr, addr_len);
+    } else {
+	return PJ_ENOTSUP;
+    }
+}
+
+
+/****************************************************************************/
+/*
+ * TURN client operations.
+ */
+
+/* Function prototypes */
+static pj_status_t client_create_relay(struct turn_client *client);
+static pj_status_t client_destroy_relay(struct turn_client *client);
+static void	   client_on_expired(pj_timer_heap_t *th, pj_timer_entry *e);
+static void	   client_on_read_complete(pj_ioqueue_key_t *key, 
+					   pj_ioqueue_op_key_t *op_key, 
+					   pj_ssize_t bytes_read);
+static pj_status_t client_respond(struct turn_client *client, 
+				  const pj_stun_msg *msg,
+				  int err_code,
+				  const char *err_msg,
+				  const pj_sockaddr_t *dst_addr,
+				  int dst_addr_len);
+static struct peer* client_get_peer(struct turn_client *client,
+				    const pj_sockaddr_in *peer_addr,
+				    pj_uint32_t *hval);
+static struct peer* client_add_peer(struct turn_client *client,
+				    const pj_sockaddr_in *peer_addr,
+				    pj_uint32_t hval);
+
+static const char *get_tp_type(int type)
+{
+    if (type==PJ_SOCK_DGRAM)
+	return "udp";
+    else if (type==PJ_SOCK_STREAM)
+	return "tcp";
+    else
+	return "???";
+}
+
+
+/*
+ * This callback is called when incoming STUN message is received
+ * in the TURN usage. This is called from by tu_on_rx_data() when
+ * the packet is handed over to the client.
+ */
+static pj_status_t client_sess_on_rx_msg(pj_stun_session *sess,
+					 const pj_uint8_t *pkt,
+					 unsigned pkt_len,
+					 const pj_stun_msg *msg,
+					 const pj_sockaddr_t *src_addr,
+					 unsigned src_addr_len)
+{
+    struct session_data *sd;
+
+    PJ_UNUSED_ARG(pkt);
+    PJ_UNUSED_ARG(pkt_len);
+
+    sd = (struct session_data*) pj_stun_session_get_user_data(sess);
+    pj_assert(sd->client != PJ_SUCCESS);
+
+    return client_handle_stun_msg(sd->client, msg, src_addr, src_addr_len);
+}
+
+
+/*
+ * This callback is called by client's STUN session to send outgoing
+ * STUN packet. It's called when client calls pj_stun_session_send_msg()
+ * function.
+ */
+static pj_status_t client_sess_on_send_msg(pj_stun_session *sess,
+					   const void *pkt,
+					   pj_size_t pkt_size,
+					   const pj_sockaddr_t *dst_addr,
+					   unsigned addr_len)
+{
+    struct session_data *sd;
+
+    sd = (struct session_data*) pj_stun_session_get_user_data(sess);
+
+    if (sd->tu->type == PJ_SOCK_DGRAM) {
+	return pj_stun_usage_sendto(sd->tu->usage, pkt, pkt_size, 0,
+				    dst_addr, addr_len);
+    } else {
+	return PJ_ENOTSUP;
+    }
+}
+
+
+/*
+ * Create a new TURN client for the specified source address.
+ */
+static pj_status_t client_create(struct turn_usage *tu,
+				 const pj_sockaddr_t *src_addr,
+				 unsigned src_addr_len,
+				 struct turn_client **p_client)
+{
+    pj_pool_t *pool;
+    struct turn_client *client;
+    pj_stun_session_cb sess_cb;
+    struct session_data *sd;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(src_addr_len==sizeof(pj_sockaddr_in), PJ_EINVAL);
+
+    pool = pj_pool_create(tu->pf, "turnc%p", 4000, 4000, NULL);
+    client = PJ_POOL_ZALLOC_T(pool, struct turn_client);
+    client->pool = pool;
+    client->tu = tu;
+    client->sock = PJ_INVALID_SOCKET;
+
+    pj_memcpy(&client->client_src_addr, src_addr,
+	      sizeof(client->client_src_addr));
+
+    if (src_addr) {
+	const pj_sockaddr_in *a4 = (const pj_sockaddr_in *)src_addr;
+	pj_ansi_snprintf(client->obj_name, sizeof(client->obj_name),
+			 "%s:%s:%d",
+			 get_tp_type(tu->type),
+			 pj_inet_ntoa(a4->sin_addr),
+			 (int)pj_ntohs(a4->sin_port));
+	client->obj_name[sizeof(client->obj_name)-1] = '\0';
+    }
+
+    /* Create session */
+    pj_bzero(&sess_cb, sizeof(sess_cb));
+    sess_cb.on_send_msg = &client_sess_on_send_msg;
+    sess_cb.on_rx_request = &client_sess_on_rx_msg;
+    sess_cb.on_rx_indication = &client_sess_on_rx_msg;
+    status = pj_stun_session_create(tu->cfg, client->obj_name, 
+				    &sess_cb, PJ_FALSE,
+				    &client->session);
+    if (status != PJ_SUCCESS) {
+	pj_pool_release(pool);
+	return status;
+    }
+
+    sd = PJ_POOL_ZALLOC_T(pool, struct session_data);
+    sd->tu = tu;
+    sd->client = client;
+    pj_stun_session_set_user_data(client->session, sd);
+
+    /* Mutex */
+    status = pj_mutex_create_recursive(client->pool, pool->obj_name,
+				       &client->mutex);
+    if (status != PJ_SUCCESS) {
+	client_destroy(client, status);
+	return status;
+    }
+
+    /* Create hash table */
+    client->peer_htable = pj_hash_create(client->pool, MAX_PEER_PER_CLIENT);
+    if (client->peer_htable == NULL) {
+	client_destroy(client, status);
+	return PJ_ENOMEM;
+    }
+
+    /* Init timer entry */
+    client->expiry_timer.user_data = client;
+    client->expiry_timer.cb = &client_on_expired;
+    client->expiry_timer.id = 0;
+
+    /* Register to hash table */
+    pj_mutex_lock(tu->mutex);
+    pj_hash_set(pool, tu->client_htable, src_addr, src_addr_len, 0, client);
+    pj_mutex_unlock(tu->mutex);
+
+    /* Done */
+    *p_client = client;
+
+    PJ_LOG(4,(THIS_FILE, "TURN client %s created", client->obj_name));
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Destroy TURN client.
+ */
+static pj_status_t client_destroy(struct turn_client *client,
+				  pj_status_t reason)
+{
+    struct turn_usage *tu = client->tu;
+    char name[PJ_MAX_OBJ_NAME];
+
+    pj_assert(sizeof(name)==sizeof(client->obj_name));
+    pj_memcpy(name, client->obj_name, sizeof(name));
+
+    /* Kill timer if it's active */
+    if (client->expiry_timer.id != 0) {
+	pj_timer_heap_cancel(tu->timer_heap, &client->expiry_timer);
+	client->expiry_timer.id = PJ_FALSE;
+    }
+
+    /* Destroy relay */
+    client_destroy_relay(client);
+
+    /* Unregister client from hash table */
+    pj_mutex_lock(tu->mutex);
+    pj_hash_set(NULL, tu->client_htable, 
+		&client->client_src_addr, sizeof(client->client_src_addr), 
+		0, NULL);
+    pj_mutex_unlock(tu->mutex);
+
+    /* Destroy STUN session */
+    if (client->session) {
+	pj_stun_session_destroy(client->session);
+	client->session = NULL;
+    }
+
+    /* Mutex */
+    if (client->mutex) {
+	pj_mutex_destroy(client->mutex);
+	client->mutex = NULL;
+    }
+
+    /* Finally destroy pool */
+    if (client->pool) {
+	pj_pool_t *pool = client->pool;
+	client->pool = NULL;
+	pj_pool_release(pool);
+    }
+
+    if (reason == PJ_SUCCESS) {
+	PJ_LOG(4,(THIS_FILE, "TURN client %s destroyed", name));
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * This utility function is used to setup relay (with ioqueue) after
+ * socket has been allocated for the TURN client.
+ */
+static pj_status_t client_create_relay(struct turn_client *client)
+{
+    pj_ioqueue_callback client_ioq_cb;
+    int addrlen;
+    pj_status_t status;
+
+    /* Update address */
+    addrlen = sizeof(pj_sockaddr_in);
+    status = pj_sock_getsockname(client->sock, &client->alloc_addr, 
+			         &addrlen);
+    if (status != PJ_SUCCESS) {
+	pj_sock_close(client->sock);
+	client->sock = PJ_INVALID_SOCKET;
+	return status;
+    }
+
+    if (client->alloc_addr.sin_addr.s_addr == 0) {
+	status = pj_gethostip(&client->alloc_addr.sin_addr);
+	if (status != PJ_SUCCESS) {
+	    pj_sock_close(client->sock);
+	    client->sock = PJ_INVALID_SOCKET;
+	    return status;
+	}
+    }
+
+    /* Register to ioqueue */
+    pj_bzero(&client_ioq_cb, sizeof(client_ioq_cb));
+    client_ioq_cb.on_read_complete = &client_on_read_complete;
+    status = pj_ioqueue_register_sock(client->pool, client->tu->ioqueue, 
+				      client->sock, client,
+				      &client_ioq_cb, &client->key);
+    if (status != PJ_SUCCESS) {
+	pj_sock_close(client->sock);
+	client->sock = PJ_INVALID_SOCKET;
+	return status;
+    }
+
+    pj_ioqueue_op_key_init(&client->pkt_read_key, 
+			   sizeof(client->pkt_read_key));
+    pj_ioqueue_op_key_init(&client->pkt_write_key, 
+			   sizeof(client->pkt_write_key));
+
+    /* Trigger the first read */
+    client_on_read_complete(client->key, &client->pkt_read_key, 0);
+
+    PJ_LOG(4,(THIS_FILE, "TURN client %s: relay allocated on %s:%s:%d",
+	      client->obj_name,
+	      get_tp_type(client->sock_type),
+	      pj_inet_ntoa(client->alloc_addr.sin_addr),
+	      (int)pj_ntohs(client->alloc_addr.sin_port)));
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * This utility function is used to destroy the port allocated for
+ * the TURN client.
+ */
+static pj_status_t client_destroy_relay(struct turn_client *client)
+{
+    /* Close socket */
+    if (client->key) {
+	pj_ioqueue_unregister(client->key);
+	client->key = NULL;
+	client->sock = PJ_INVALID_SOCKET;
+    } else if (client->sock && client->sock != PJ_INVALID_SOCKET) {
+	pj_sock_close(client->sock);
+	client->sock = PJ_INVALID_SOCKET;
+    }
+
+    PJ_LOG(4,(THIS_FILE, "TURN client %s: relay allocation %s:%s:%d destroyed",
+	      client->obj_name,
+	      get_tp_type(client->sock_type),
+	      pj_inet_ntoa(client->alloc_addr.sin_addr),
+	      (int)pj_ntohs(client->alloc_addr.sin_port)));
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * From the source packet address, get the peer instance from hash table.
+ */
+static struct peer* client_get_peer(struct turn_client *client,
+				    const pj_sockaddr_in *peer_addr,
+				    pj_uint32_t *hval)
+{
+    return (struct peer*)
+	pj_hash_get(client->peer_htable, peer_addr, sizeof(*peer_addr), hval);
+}
+
+
+/*
+ * Add a peer instance to the peer hash table.
+ */
+static struct peer* client_add_peer(struct turn_client *client,
+				    const pj_sockaddr_in *peer_addr,
+				    unsigned hval)
+{
+    struct peer *peer;
+
+    peer = PJ_POOL_ZALLOC_T(client->pool, struct peer);
+    peer->client = client;
+    pj_memcpy(&peer->addr, peer_addr, sizeof(peer->addr));
+
+    pj_hash_set(client->pool, client->peer_htable,
+		&peer->addr, sizeof(peer->addr), hval, peer);
+
+    PJ_LOG(4,(THIS_FILE, "TURN client %s: peer %s:%s:%d added",
+	      client->obj_name, get_tp_type(client->sock_type), 
+	      pj_inet_ntoa(peer->addr.sin_addr),
+	      (int)pj_ntohs(peer->addr.sin_port)));
+
+    return peer;
+}
+
+
+/*
+ * Utility to send STUN response message (normally to send error response).
+ */
+static pj_status_t client_respond(struct turn_client *client, 
+				  const pj_stun_msg *msg,
+				  int err_code,
+				  const char *custom_msg,
+				  const pj_sockaddr_t *dst_addr,
+				  int dst_addr_len)
+{
+    pj_str_t err_msg;
+    pj_str_t *p_err_msg = NULL;
+    pj_stun_tx_data *response;
+    pj_status_t status;
+
+    if (custom_msg)
+	pj_cstr(&err_msg, custom_msg), p_err_msg = &err_msg;
+    
+    status = pj_stun_session_create_response(client->session, msg, 
+					     err_code, p_err_msg, 
+					     &response);
+    if (status == PJ_SUCCESS)
+	status = pj_stun_session_send_msg(client->session, PJ_TRUE,
+					  dst_addr, dst_addr_len, response);
+
+    return status;
+}
+
+
+/*
+ * Handle incoming initial or subsequent Allocate Request.
+ * This function is called by client_handle_stun_msg() below.
+ */
+static pj_status_t client_handle_allocate_req(struct turn_client *client,
+					      const pj_stun_msg *msg,
+					      const pj_sockaddr_t *src_addr,
+					      unsigned src_addr_len)
+{
+    const pj_stun_bandwidth_attr *a_bw;
+    const pj_stun_lifetime_attr *a_lf;
+    const pj_stun_req_port_props_attr *a_rpp;
+    const pj_stun_req_transport_attr *a_rt;
+    const pj_stun_req_ip_attr *a_rip;
+    pj_stun_tx_data *response;
+    pj_sockaddr_in req_addr;
+    int addr_len;
+    unsigned req_bw, rpp_bits;
+    pj_time_val timeout;
+    pj_status_t status;
+
+    a_bw = (const pj_stun_bandwidth_attr *)
+	   pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_BANDWIDTH, 0);
+    a_lf = (const pj_stun_lifetime_attr*)
+	    pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_LIFETIME, 0);
+    a_rpp = (const pj_stun_req_port_props_attr*)
+	    pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_REQ_PORT_PROPS, 0);
+    a_rt = (const pj_stun_req_transport_attr*)
+	   pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_REQ_TRANSPORT, 0);
+    a_rip = (const pj_stun_req_ip_attr*)
+	    pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_REQ_IP, 0);
+
+    /* Init requested local address */
+    pj_sockaddr_in_init(&req_addr, NULL, 0);
+
+    /* Process BANDWIDTH attribute */
+    if (a_bw && a_bw->value > client->tu->max_bw_kbps) {
+	client_respond(client, msg, PJ_STUN_SC_INSUFFICIENT_CAPACITY, NULL,
+		       src_addr, src_addr_len);
+	return PJ_SUCCESS;
+    } else if (a_bw) {
+	client->bw_kbps = req_bw = a_bw->value;
+    } else {
+	req_bw = 0;
+	client->bw_kbps = client->tu->max_bw_kbps;
+    }
+
+    /* Process REQUESTED-TRANSPORT attribute */
+    if (a_rt && a_rt->value != 0) {
+	client_respond(client, msg, PJ_STUN_SC_UNSUPP_TRANSPORT_PROTO, NULL,
+		       src_addr, src_addr_len);
+	return PJ_SUCCESS;
+    } else if (a_rt) {
+	client->sock_type = a_rt->value ? PJ_SOCK_STREAM : PJ_SOCK_DGRAM;
+    } else {
+	client->sock_type = client->tu->type;;
+    }
+
+    /* Process REQUESTED-IP attribute */
+    if (a_rip && a_rip->sockaddr.addr.sa_family != PJ_AF_INET) {
+	client_respond(client, msg, PJ_STUN_SC_INVALID_IP_ADDR, NULL,
+		       src_addr, src_addr_len);
+	return PJ_SUCCESS;
+	
+    } else if (a_rip) {
+	req_addr.sin_addr.s_addr = a_rip->sockaddr.ipv4.sin_addr.s_addr;
+    }
+
+    /* Process REQUESTED-PORT-PROPS attribute */
+    if (a_rpp) {
+	unsigned port;
+
+	rpp_bits = (a_rpp->value & 0x00030000) >> 16;
+	port = (a_rpp->value & 0xFFFF);
+	req_addr.sin_port = pj_htons((pj_uint8_t)port);
+    } else {
+	rpp_bits = 0;
+    }
+
+    /* Process LIFETIME attribute */
+    if (a_lf && a_lf->value > client->tu->max_lifetime) {
+	client->lifetime = client->tu->max_lifetime;
+    } else if (a_lf) {
+	client->lifetime = a_lf->value;
+    } else {
+	client->lifetime = client->tu->max_lifetime;
+    }
+
+    /* Allocate socket if we don't have one */
+    if (client->key == NULL) {
+	int err_code;
+
+	PJ_LOG(4,(THIS_FILE, "TURN client %s: received initial Allocate "
+			     "request, requested type:addr:port=%s:%s:%d, rpp "
+			     "bits=%d, bw=%dkbps, lifetime=%d",
+		  client->obj_name, get_tp_type(client->sock_type),
+		  pj_inet_ntoa(req_addr.sin_addr), pj_ntohs(req_addr.sin_port),
+		  rpp_bits, client->bw_kbps, client->lifetime));
+
+	status = tu_alloc_port(client->tu, client->sock_type, rpp_bits, 
+			       &req_addr, &client->sock, &err_code);
+	if (status != PJ_SUCCESS) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+
+	    pj_strerror(status, errmsg, sizeof(errmsg));
+	    PJ_LOG(4,(THIS_FILE, "TURN client %s: error allocating relay port"
+				 ": %s",
+		      client->obj_name, errmsg));
+
+	    client_respond(client, msg, err_code, NULL,
+			   src_addr, src_addr_len);
+
+	    return status;
+	}
+
+	status = client_create_relay(client);
+	if (status != PJ_SUCCESS) {
+	    client_respond(client, msg, PJ_STUN_SC_SERVER_ERROR, NULL,
+			   src_addr, src_addr_len);
+	    return status;
+	}
+    } else {
+	/* Otherwise check if the port parameter stays the same */
+	/* TODO */
+	PJ_LOG(4,(THIS_FILE, "TURN client %s: received Allocate refresh, "
+			     "lifetime=%d",
+		  client->obj_name, client->lifetime));
+    }
+
+    /* Refresh timer */
+    if (client->expiry_timer.id != PJ_FALSE) {
+	pj_timer_heap_cancel(client->tu->timer_heap, &client->expiry_timer);
+	client->expiry_timer.id = PJ_FALSE;
+    }
+    timeout.sec = client->lifetime;
+    timeout.msec = 0;
+    pj_timer_heap_schedule(client->tu->timer_heap, &client->expiry_timer, &timeout);
+    client->expiry_timer.id = PJ_TRUE;
+
+    /* Done successfully, create and send success response */
+    status = pj_stun_session_create_response(client->session, msg, 
+					     0, NULL, &response);
+    if (status != PJ_SUCCESS) {
+	return status;
+    }
+
+    pj_stun_msg_add_uint_attr(response->pool, response->msg, 
+			      PJ_STUN_ATTR_BANDWIDTH, client->bw_kbps);
+    pj_stun_msg_add_uint_attr(response->pool, response->msg,
+			      PJ_STUN_ATTR_LIFETIME, client->lifetime);
+    pj_stun_msg_add_sockaddr_attr(response->pool, response->msg,
+				 PJ_STUN_ATTR_MAPPED_ADDR, PJ_FALSE,
+				 src_addr, src_addr_len);
+    pj_stun_msg_add_sockaddr_attr(response->pool, response->msg,
+				 PJ_STUN_ATTR_XOR_MAPPED_ADDR, PJ_TRUE,
+				 src_addr, src_addr_len);
+
+    addr_len = sizeof(req_addr);
+    pj_sock_getsockname(client->sock, &req_addr, &addr_len);
+    pj_stun_msg_add_sockaddr_attr(response->pool, response->msg,
+				 PJ_STUN_ATTR_RELAY_ADDR, PJ_FALSE,
+				 &client->alloc_addr, addr_len);
+
+    PJ_LOG(4,(THIS_FILE, "TURN client %s: relay allocated or refreshed, "
+			 "internal address is %s:%s:%d",
+			 client->obj_name,
+			 get_tp_type(client->sock_type),
+			 pj_inet_ntoa(req_addr.sin_addr),
+			 (int)pj_ntohs(req_addr.sin_port)));
+
+    return pj_stun_session_send_msg(client->session, PJ_TRUE, 
+				    src_addr, src_addr_len, response);
+}
+
+
+/*
+ * Handle incoming Binding request.
+ * This function is called by client_handle_stun_msg() below.
+ */
+static pj_status_t handle_binding_req(pj_stun_session *session,
+				      const pj_stun_msg *msg,
+				      const pj_sockaddr_t *src_addr,
+				      unsigned src_addr_len)
+{
+    pj_stun_tx_data *tdata;
+    pj_status_t status;
+
+    /* Create response */
+    status = pj_stun_session_create_response(session, msg, 0, NULL, 
+					     &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create MAPPED-ADDRESS attribute */
+    pj_stun_msg_add_sockaddr_attr(tdata->pool, tdata->msg,
+				 PJ_STUN_ATTR_MAPPED_ADDR,
+				PJ_FALSE,
+				src_addr, src_addr_len);
+
+    /* On the presence of magic, create XOR-MAPPED-ADDRESS attribute */
+    if (msg->hdr.magic == PJ_STUN_MAGIC) {
+	status = 
+	    pj_stun_msg_add_sockaddr_attr(tdata->pool, tdata->msg,
+					 PJ_STUN_ATTR_XOR_MAPPED_ADDR,
+					 PJ_TRUE,
+					 src_addr, src_addr_len);
+    }
+
+    /* Send */
+    status = pj_stun_session_send_msg(session, PJ_TRUE, 
+				      src_addr, src_addr_len, tdata);
+    return status;
+}
+
+
+/* 
+ * client handling incoming STUN Set Active Destination request 
+ * This function is called by client_handle_stun_msg() below.
+ */
+static pj_status_t client_handle_sad(struct turn_client *client,
+				     const pj_stun_msg *msg,
+				     const pj_sockaddr_t *src_addr,
+				     unsigned src_addr_len)
+{
+    pj_stun_remote_addr_attr *a_raddr;
+
+    a_raddr = (pj_stun_remote_addr_attr*)
+	      pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_REMOTE_ADDR, 0);
+    if (!a_raddr) {
+	/* Remote active destination needs to be cleared */
+	client->active_peer = NULL;
+
+    } else if (a_raddr->sockaddr.addr.sa_family != PJ_AF_INET) {
+	/* Bad request (not IPv4) */
+	client_respond(client, msg, PJ_STUN_SC_BAD_REQUEST, NULL,
+		       src_addr, src_addr_len);
+	return PJ_SUCCESS;
+
+    } else if (client->active_peer) {
+	/* Client tries to set new active destination without clearing
+	 * it first. Reject with 439.
+	 */
+	client_respond(client, msg, PJ_STUN_SC_TRANSITIONING, NULL,
+		       src_addr, src_addr_len);
+	return PJ_SUCCESS;
+
+    } else {
+	struct peer *peer;
+	pj_uint32_t hval = 0;
+
+	/* Add a new peer/permission if we don't have one for this address */
+	peer = client_get_peer(client, &a_raddr->sockaddr.ipv4, &hval);
+	if (peer==NULL) {
+	    peer = client_add_peer(client, &a_raddr->sockaddr.ipv4, hval);
+	}
+
+	/* Set active destination */
+	client->active_peer = peer;
+    }
+
+    if (client->active_peer) {
+	PJ_LOG(4,(THIS_FILE, 
+		  "TURN client %s: active destination set to %s:%d",
+		  client->obj_name,
+		  pj_inet_ntoa(client->active_peer->addr.sin_addr),
+		  (int)pj_ntohs(client->active_peer->addr.sin_port)));
+    } else {
+	PJ_LOG(4,(THIS_FILE, "TURN client %s: active destination cleared",
+		  client->obj_name));
+    }
+
+    /* Respond with successful response */
+    client_respond(client, msg, 0, NULL, src_addr, src_addr_len);
+
+    return PJ_SUCCESS;
+}
+
+
+/* 
+ * client handling incoming STUN Send Indication 
+ * This function is called by client_handle_stun_msg() below.
+ */
+static pj_status_t client_handle_send_ind(struct turn_client *client,
+					  const pj_stun_msg *msg)
+{
+    pj_stun_remote_addr_attr *a_raddr;
+    pj_stun_data_attr *a_data;
+    pj_uint32_t hval = 0;
+    const pj_uint8_t *data;
+    pj_ssize_t datalen;
+
+    /* Get REMOTE-ADDRESS attribute */
+    a_raddr = (pj_stun_remote_addr_attr*)
+	      pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_REMOTE_ADDR, 0);
+    if (!a_raddr) {
+	/* REMOTE-ADDRESS not present, discard packet */
+	return PJ_SUCCESS;
+
+    } else if (a_raddr->sockaddr.addr.sa_family != PJ_AF_INET) {
+	/* REMOTE-ADDRESS present but not IPv4, discard packet */
+	return PJ_SUCCESS;
+
+    }
+
+    /* Get the DATA attribute */
+    a_data = (pj_stun_data_attr*)
+	     pj_stun_msg_find_attr(msg, PJ_STUN_ATTR_DATA, 0);
+    if (a_data) {
+	data = (const pj_uint8_t *)a_data->data;
+	datalen = a_data->length;
+
+    } else if (client->sock_type == PJ_SOCK_STREAM) {
+	/* Discard if no Data and Allocation type is TCP */
+	return PJ_SUCCESS;
+
+    } else {
+	data = (const pj_uint8_t *)"";
+	datalen = 0;
+    }
+
+    /* Add to peer table if necessary */
+    if (client_get_peer(client, &a_raddr->sockaddr.ipv4, &hval)==NULL)
+	client_add_peer(client, &a_raddr->sockaddr.ipv4, hval);
+
+    /* Send the packet */
+    pj_ioqueue_sendto(client->key, &client->pkt_write_key, 
+		      data, &datalen, 0,
+		      &a_raddr->sockaddr.ipv4, sizeof(pj_sockaddr_in));
+
+    return PJ_SUCCESS;
+}
+
+
+/* 
+ * client handling unknown incoming STUN message.
+ * This function is called by client_handle_stun_msg() below.
+ */
+static pj_status_t client_handle_unknown_msg(struct turn_client *client,
+					     const pj_stun_msg *msg,
+					     const pj_sockaddr_t *src_addr,
+					     unsigned src_addr_len)
+{
+    PJ_LOG(4,(THIS_FILE, "TURN client %s: unhandled %s %s",
+	      client->obj_name, pj_stun_get_method_name(msg->hdr.type),
+	      pj_stun_get_class_name(msg->hdr.type)));
+
+    if (PJ_STUN_IS_REQUEST(msg->hdr.type)) {
+	return client_respond(client, msg, PJ_STUN_SC_BAD_REQUEST, NULL,
+			      src_addr, src_addr_len);
+    } else {
+	/* Ignore */
+	return PJ_SUCCESS;
+    }
+}
+
+
+/* 
+ * Main entry for handling STUN messages arriving on the main TURN port, 
+ * for this client 
+ */
+static pj_status_t client_handle_stun_msg(struct turn_client *client,
+					  const pj_stun_msg *msg,
+					  const pj_sockaddr_t *src_addr,
+					  unsigned src_addr_len)
+{
+    pj_status_t status;
+
+    switch (msg->hdr.type) {
+    case PJ_STUN_SEND_INDICATION:
+	status = client_handle_send_ind(client, msg);
+	break;
+
+    case PJ_STUN_SET_ACTIVE_DESTINATION_REQUEST:
+	status = client_handle_sad(client, msg,
+				   src_addr, src_addr_len);
+	break;
+
+    case PJ_STUN_ALLOCATE_REQUEST:
+	status = client_handle_allocate_req(client, msg,
+					    src_addr, src_addr_len);
+	break;
+
+    case PJ_STUN_BINDING_REQUEST:
+	status = handle_binding_req(client->session, msg,
+				    src_addr, src_addr_len);
+	break;
+
+    default:
+	status = client_handle_unknown_msg(client, msg,
+					   src_addr, src_addr_len);
+	break;
+    }
+
+    return status;
+}
+
+
+PJ_INLINE(pj_uint32_t) GET_VAL32(const pj_uint8_t *pdu, unsigned pos)
+{
+    return (pdu[pos+0] << 24) +
+	   (pdu[pos+1] << 16) +
+	   (pdu[pos+2] <<  8) +
+	   (pdu[pos+3]);
+}
+
+
+/* 
+ * Handle incoming data from peer 
+ * This function is called by client_on_read_complete() below.
+ */
+static void client_handle_peer_data(struct turn_client *client,
+				    unsigned bytes_read)
+{
+    struct peer *peer;
+    pj_bool_t has_magic_cookie;
+    pj_status_t status;
+
+    /* Has the sender been registered as peer? */
+    peer = client_get_peer(client, &client->pkt_src_addr, NULL);
+    if (peer == NULL) {
+	/* Nope. Discard packet */
+	PJ_LOG(5,(THIS_FILE, 
+		 "TURN client %s: discarded data from %s:%d",
+		 client->obj_name,
+		 pj_inet_ntoa(client->pkt_src_addr.sin_addr),
+		 (int)pj_ntohs(client->pkt_src_addr.sin_port)));
+	return;
+    }
+
+    /* Check if packet has STUN magic cookie */
+    has_magic_cookie = (GET_VAL32(client->pkt, 4) == PJ_STUN_MAGIC);
+
+    /* If this is the Active Destination and the packet doesn't have
+     * STUN magic cookie, send the packet to client as is.
+     */
+    if (peer == client->active_peer && !has_magic_cookie) {
+	pj_stun_usage_sendto(client->tu->usage, client->pkt, bytes_read, 0,
+			     &client->pkt_src_addr, client->pkt_src_addr_len);
+    } else {
+	/* Otherwise wrap in Data Indication */
+	pj_stun_tx_data *data_ind;
+
+	status = pj_stun_session_create_ind(client->session, 
+					    PJ_STUN_DATA_INDICATION,
+					    &data_ind);
+	if (status != PJ_SUCCESS)
+	    return;
+
+	pj_stun_msg_add_sockaddr_attr(data_ind->pool, data_ind->msg, 
+				      PJ_STUN_ATTR_REMOTE_ADDR, PJ_FALSE,
+				      &client->pkt_src_addr,
+				      client->pkt_src_addr_len);
+	pj_stun_msg_add_binary_attr(data_ind->pool, data_ind->msg,
+				    PJ_STUN_ATTR_DATA, 
+				    client->pkt, bytes_read);
+
+
+	pj_stun_session_send_msg(client->session, PJ_FALSE,
+				 &client->pkt_src_addr, 
+				 client->pkt_src_addr_len,
+				 data_ind);
+    }
+}
+
+
+/* 
+ * This callback is called by the ioqueue when read operation has
+ * completed on the allocated relay port.
+ */
+static void client_on_read_complete(pj_ioqueue_key_t *key, 
+				    pj_ioqueue_op_key_t *op_key, 
+				    pj_ssize_t bytes_read)
+{
+    enum { MAX_LOOP = 10 };
+    struct turn_client *client;
+    unsigned count;
+    pj_status_t status;
+
+    PJ_UNUSED_ARG(op_key);
+
+    client = pj_ioqueue_get_user_data(key);
+    
+    /* Lock client */
+    pj_mutex_lock(client->mutex);
+
+    for (count=0; ; ++count) {
+	unsigned flags;
+
+	if (bytes_read > 0) {
+	    /* Received data from peer! */
+	    client_handle_peer_data(client, bytes_read);
+
+	} else if (bytes_read < 0) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+	    pj_strerror(-bytes_read, errmsg, sizeof(errmsg));
+	    PJ_LOG(4,(THIS_FILE, "TURN client %s: error reading data "
+				 "from allocated relay port: %s",
+				 client->obj_name, errmsg));
+	}
+
+	bytes_read = sizeof(client->pkt);
+	flags = (count >= MAX_LOOP) ? PJ_IOQUEUE_ALWAYS_ASYNC : 0;
+	client->pkt_src_addr_len = sizeof(client->pkt_src_addr);
+	status = pj_ioqueue_recvfrom(client->key, 
+				     &client->pkt_read_key,
+				     client->pkt, &bytes_read, flags,
+				     &client->pkt_src_addr, 
+				     &client->pkt_src_addr_len);
+	if (status == PJ_EPENDING)
+	    break;
+    }
+
+    /* Unlock client */
+    pj_mutex_unlock(client->mutex);
+}
+
+
+/* On Allocation timer timeout (i.e. we don't receive new Allocate request
+ * to refresh the allocation in time)
+ */
+static void client_on_expired(pj_timer_heap_t *th, pj_timer_entry *e)
+{
+    struct turn_client *client;
+
+    PJ_UNUSED_ARG(th);
+
+    client = (struct turn_client*) e->user_data;
+
+    PJ_LOG(4,(THIS_FILE, "TURN client %s: allocation timer timeout, "
+			 "destroying client",
+			 client->obj_name));
+    client_destroy(client, PJ_SUCCESS);
+}
+
Index: /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/usage.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/usage.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjnath/src/pjstun-srv-test/usage.c	(revision 1163)
@@ -0,0 +1,271 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2005 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 "server.h"
+
+struct worker
+{
+    pj_ioqueue_op_key_t	read_key;
+    unsigned		index;
+    pj_uint8_t		readbuf[4000];
+    pj_sockaddr		src_addr;
+    int			src_addr_len;
+};
+
+struct pj_stun_usage
+{
+    pj_pool_t		*pool;
+    pj_stun_server	*srv;
+    pj_mutex_t		*mutex;
+    pj_stun_usage_cb	 cb;
+    int			 type;
+    pj_sock_t		 sock;
+    pj_ioqueue_key_t	*key;
+    unsigned		 worker_cnt;
+    struct worker	*worker;
+
+    pj_ioqueue_op_key_t	*send_key;
+    unsigned		 send_count, send_index;
+
+    pj_bool_t		 quitting;
+    void		*user_data;
+};
+
+
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read);
+
+/*
+ * Create STUN usage.
+ */
+PJ_DEF(pj_status_t) pj_stun_usage_create( pj_stun_server *srv,
+					  const char *name,
+					  const pj_stun_usage_cb *cb,
+					  int family,
+					  int type,
+					  int protocol,
+					  const pj_sockaddr_t *local_addr,
+					  int addr_len,
+					  pj_stun_usage **p_usage)
+{
+    pj_stun_server_info *si;
+    pj_pool_t *pool;
+    pj_stun_usage *usage;
+    pj_ioqueue_callback ioqueue_cb;
+    unsigned i;
+    pj_status_t status;
+
+    si = pj_stun_server_get_info(srv);
+
+    pool = pj_pool_create(si->pf, name, 4000, 4000, NULL);
+    usage = PJ_POOL_ZALLOC_T(pool, pj_stun_usage);
+    usage->pool = pool;
+    usage->srv = srv;
+
+    status = pj_mutex_create_simple(pool, name, &usage->mutex);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    usage->type = type;
+    status = pj_sock_socket(family, type, protocol, &usage->sock);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    status = pj_sock_bind(usage->sock, local_addr, addr_len);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    pj_bzero(&ioqueue_cb, sizeof(ioqueue_cb));
+    ioqueue_cb.on_read_complete = &on_read_complete;
+    status = pj_ioqueue_register_sock(usage->pool, si->ioqueue, usage->sock,
+				      usage, &ioqueue_cb, &usage->key);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    usage->worker_cnt = si->thread_cnt;
+    usage->worker = pj_pool_calloc(pool, si->thread_cnt, 
+				   sizeof(struct worker));
+    for (i=0; i<si->thread_cnt; ++i) {
+	pj_ioqueue_op_key_init(&usage->worker[i].read_key, 
+			       sizeof(usage->worker[i].read_key));
+	usage->worker[i].index = i;
+    }
+
+    usage->send_count = usage->worker_cnt * 2;
+    usage->send_key = pj_pool_calloc(pool, usage->send_count, 
+				     sizeof(pj_ioqueue_op_key_t));
+    for (i=0; i<usage->send_count; ++i) {
+	pj_ioqueue_op_key_init(&usage->send_key[i], 
+			       sizeof(usage->send_key[i]));
+    }
+
+    for (i=0; i<si->thread_cnt; ++i) {
+	pj_ssize_t size;
+
+	size = sizeof(usage->worker[i].readbuf);
+	usage->worker[i].src_addr_len = sizeof(usage->worker[i].src_addr);
+	status = pj_ioqueue_recvfrom(usage->key, &usage->worker[i].read_key,
+				     usage->worker[i].readbuf, &size, 
+				     PJ_IOQUEUE_ALWAYS_ASYNC,
+				     &usage->worker[i].src_addr,
+				     &usage->worker[i].src_addr_len);
+	if (status != PJ_EPENDING)
+	    goto on_error;
+    }
+
+    pj_stun_server_register_usage(srv, usage);
+
+    /* Only after everything has been initialized we copy the callback,
+     * to prevent callback from being called when we encounter error
+     * during initialiation (decendant would not expect this).
+     */
+    pj_memcpy(&usage->cb, cb, sizeof(*cb));
+
+    *p_usage = usage;
+    return PJ_SUCCESS;
+
+on_error:
+    pj_stun_usage_destroy(usage);
+    return status;
+}
+
+
+/**
+ * Destroy usage.
+ */
+PJ_DEF(pj_status_t) pj_stun_usage_destroy(pj_stun_usage *usage)
+{
+    pj_stun_server_unregister_usage(usage->srv, usage);
+    if (usage->cb.on_destroy)
+	(*usage->cb.on_destroy)(usage);
+
+    if (usage->key) {
+	pj_ioqueue_unregister(usage->key);
+	usage->key = NULL;
+	usage->sock = PJ_INVALID_SOCKET;
+    } else if (usage->sock != 0 && usage->sock != PJ_INVALID_SOCKET) {
+	pj_sock_close(usage->sock);
+	usage->sock = PJ_INVALID_SOCKET;
+    }
+
+    if (usage->mutex) {
+	pj_mutex_destroy(usage->mutex);
+	usage->mutex = NULL;
+    }
+
+    if (usage->pool) {
+	pj_pool_t *pool = usage->pool;
+	usage->pool = NULL;
+	pj_pool_release(pool);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/**
+ * Set user data.
+ */
+PJ_DEF(pj_status_t) pj_stun_usage_set_user_data( pj_stun_usage *usage,
+						 void *user_data)
+{
+    usage->user_data = user_data;
+    return PJ_SUCCESS;
+}
+
+/**
+ * Get user data.
+ */
+PJ_DEF(void*) pj_stun_usage_get_user_data(pj_stun_usage *usage)
+{
+    return usage->user_data;
+}
+
+
+/**
+ * Send with the usage.
+ */
+PJ_DEF(pj_status_t) pj_stun_usage_sendto( pj_stun_usage *usage,
+					  const void *pkt,
+					  pj_size_t pkt_size,
+					  unsigned flags,
+					  const pj_sockaddr_t *dst_addr,
+					  unsigned addr_len)
+{
+    pj_ssize_t size = pkt_size;
+    unsigned i, count = usage->send_count, index;
+
+    pj_mutex_lock(usage->mutex);
+    for (i=0, ++usage->send_index; i<count; ++i, ++usage->send_index) {
+	if (usage->send_index >= usage->send_count)
+	    usage->send_index = 0;
+
+	if (pj_ioqueue_is_pending(usage->key, &usage->send_key[usage->send_index])==0) {
+	    break;
+	}
+    }
+
+    if (i==count) {
+	pj_mutex_unlock(usage->mutex);
+	return PJ_EBUSY;
+    }
+
+    index = usage->send_index;
+    pj_mutex_unlock(usage->mutex);
+
+    return pj_ioqueue_sendto(usage->key, &usage->send_key[index], 
+			     pkt, &size, flags,
+			     dst_addr, addr_len);
+}
+
+
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read)
+{
+    enum { MAX_LOOP = 10 };
+    pj_stun_usage *usage = pj_ioqueue_get_user_data(key);
+    struct worker *worker = (struct worker*) op_key;
+    unsigned count;
+    pj_status_t status;
+    
+    for (count=0; !usage->quitting; ++count) {
+	unsigned flags;
+
+	if (bytes_read > 0) {
+	    (*usage->cb.on_rx_data)(usage, worker->readbuf, bytes_read,
+				    &worker->src_addr, worker->src_addr_len);
+	} else if (bytes_read < 0) {
+	    pj_stun_perror(usage->pool->obj_name, "recv() error", -bytes_read);
+	}
+
+	if (usage->quitting)
+	    break;
+
+	bytes_read = sizeof(worker->readbuf);
+	flags = (count >= MAX_LOOP) ? PJ_IOQUEUE_ALWAYS_ASYNC : 0;
+	worker->src_addr_len = sizeof(worker->src_addr);
+	status = pj_ioqueue_recvfrom(usage->key, &worker->read_key,
+				     worker->readbuf, &bytes_read, flags,
+				     &worker->src_addr, &worker->src_addr_len);
+	if (status == PJ_EPENDING)
+	    break;
+    }
+}
+
Index: /pjproject/branches/split-3rd-party/pjproject-vs8.sln
===================================================================
--- /pjproject/branches/split-3rd-party/pjproject-vs8.sln	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjproject-vs8.sln	(revision 1163)
@@ -0,0 +1,152 @@
+﻿
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pjlib", "pjlib\build\pjlib.vcproj", "{DA0E03ED-53A7-4050-8A85-90541C5509F8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pjlib_test", "pjlib\build\pjlib_test.vcproj", "{6AC3EF61-5A9E-4F43-A809-5B2FD1A43B16}"
+	ProjectSection(ProjectDependencies) = postProject
+		{DA0E03ED-53A7-4050-8A85-90541C5509F8} = {DA0E03ED-53A7-4050-8A85-90541C5509F8}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pjlib_util", "pjlib-util\build\pjlib_util.vcproj", "{FE07F272-AE7F-4549-9E9F-EF9B80CB1693}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pjlib_util_test", "pjlib-util\build\pjlib_util_test.vcproj", "{ED02BE13-8297-4770-8097-27DC2CCABF9A}"
+	ProjectSection(ProjectDependencies) = postProject
+		{DA0E03ED-53A7-4050-8A85-90541C5509F8} = {DA0E03ED-53A7-4050-8A85-90541C5509F8}
+		{FE07F272-AE7F-4549-9E9F-EF9B80CB1693} = {FE07F272-AE7F-4549-9E9F-EF9B80CB1693}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pjmedia", "pjmedia\build\pjmedia.vcproj", "{7FDE3880-A4AB-49E3-B439-EBEF0A0C7A65}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pjmedia_codec", "pjmedia\build\pjmedia_codec.vcproj", "{855DC8C0-D3E9-4A2E-AE47-116605A7BC9B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pjsip_core", "pjsip\build\pjsip_core.vcproj", "{2BB84911-C1B4-4747-B93D-36AA82CC5031}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pjsip_simple", "pjsip\build\pjsip_simple.vcproj", "{4B5945CD-0CB3-49AA-A7FF-7612D93F82C0}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pjsip_ua", "pjsip\build\pjsip_ua.vcproj", "{B8719FD5-E8A6-4A36-943C-891D07F5DD21}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pjsua", "pjsip-apps\build\pjsua.vcproj", "{8310649E-A25E-4AF0-91E8-9E3CC659BB89}"
+	ProjectSection(ProjectDependencies) = postProject
+		{2BB84911-C1B4-4747-B93D-36AA82CC5031} = {2BB84911-C1B4-4747-B93D-36AA82CC5031}
+		{A5D9AA24-08ED-48B9-BD65-F0A25E96BFC4} = {A5D9AA24-08ED-48B9-BD65-F0A25E96BFC4}
+		{9CA0FDFB-2172-41FC-B7F1-5CE915EDCB37} = {9CA0FDFB-2172-41FC-B7F1-5CE915EDCB37}
+		{DA0E03ED-53A7-4050-8A85-90541C5509F8} = {DA0E03ED-53A7-4050-8A85-90541C5509F8}
+		{B8719FD5-E8A6-4A36-943C-891D07F5DD21} = {B8719FD5-E8A6-4A36-943C-891D07F5DD21}
+		{4B5945CD-0CB3-49AA-A7FF-7612D93F82C0} = {4B5945CD-0CB3-49AA-A7FF-7612D93F82C0}
+		{855DC8C0-D3E9-4A2E-AE47-116605A7BC9B} = {855DC8C0-D3E9-4A2E-AE47-116605A7BC9B}
+		{7FDE3880-A4AB-49E3-B439-EBEF0A0C7A65} = {7FDE3880-A4AB-49E3-B439-EBEF0A0C7A65}
+		{FE07F272-AE7F-4549-9E9F-EF9B80CB1693} = {FE07F272-AE7F-4549-9E9F-EF9B80CB1693}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pjsua_lib", "pjsip\build\pjsua_lib.vcproj", "{9CA0FDFB-2172-41FC-B7F1-5CE915EDCB37}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sample_debug", "pjsip-apps\build\sample_debug.vcproj", "{A0F1AA62-0F6F-420D-B09A-AC04B6862821}"
+	ProjectSection(ProjectDependencies) = postProject
+		{9CA0FDFB-2172-41FC-B7F1-5CE915EDCB37} = {9CA0FDFB-2172-41FC-B7F1-5CE915EDCB37}
+		{DA0E03ED-53A7-4050-8A85-90541C5509F8} = {DA0E03ED-53A7-4050-8A85-90541C5509F8}
+		{B8719FD5-E8A6-4A36-943C-891D07F5DD21} = {B8719FD5-E8A6-4A36-943C-891D07F5DD21}
+		{4B5945CD-0CB3-49AA-A7FF-7612D93F82C0} = {4B5945CD-0CB3-49AA-A7FF-7612D93F82C0}
+		{855DC8C0-D3E9-4A2E-AE47-116605A7BC9B} = {855DC8C0-D3E9-4A2E-AE47-116605A7BC9B}
+		{7FDE3880-A4AB-49E3-B439-EBEF0A0C7A65} = {7FDE3880-A4AB-49E3-B439-EBEF0A0C7A65}
+		{FE07F272-AE7F-4549-9E9F-EF9B80CB1693} = {FE07F272-AE7F-4549-9E9F-EF9B80CB1693}
+		{2BB84911-C1B4-4747-B93D-36AA82CC5031} = {2BB84911-C1B4-4747-B93D-36AA82CC5031}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "samples", "pjsip-apps\build\samples.vcproj", "{E378A1FC-0C9C-4462-860F-7E60BC1BF84E}"
+	ProjectSection(ProjectDependencies) = postProject
+		{9CA0FDFB-2172-41FC-B7F1-5CE915EDCB37} = {9CA0FDFB-2172-41FC-B7F1-5CE915EDCB37}
+		{DA0E03ED-53A7-4050-8A85-90541C5509F8} = {DA0E03ED-53A7-4050-8A85-90541C5509F8}
+		{B8719FD5-E8A6-4A36-943C-891D07F5DD21} = {B8719FD5-E8A6-4A36-943C-891D07F5DD21}
+		{4B5945CD-0CB3-49AA-A7FF-7612D93F82C0} = {4B5945CD-0CB3-49AA-A7FF-7612D93F82C0}
+		{855DC8C0-D3E9-4A2E-AE47-116605A7BC9B} = {855DC8C0-D3E9-4A2E-AE47-116605A7BC9B}
+		{7FDE3880-A4AB-49E3-B439-EBEF0A0C7A65} = {7FDE3880-A4AB-49E3-B439-EBEF0A0C7A65}
+		{FE07F272-AE7F-4549-9E9F-EF9B80CB1693} = {FE07F272-AE7F-4549-9E9F-EF9B80CB1693}
+		{2BB84911-C1B4-4747-B93D-36AA82CC5031} = {2BB84911-C1B4-4747-B93D-36AA82CC5031}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_pjsip", "pjsip\build\test_pjsip.vcproj", "{B3F7D4E9-702F-4EB4-ADA8-098D0A83D770}"
+	ProjectSection(ProjectDependencies) = postProject
+		{9CA0FDFB-2172-41FC-B7F1-5CE915EDCB37} = {9CA0FDFB-2172-41FC-B7F1-5CE915EDCB37}
+		{DA0E03ED-53A7-4050-8A85-90541C5509F8} = {DA0E03ED-53A7-4050-8A85-90541C5509F8}
+		{B8719FD5-E8A6-4A36-943C-891D07F5DD21} = {B8719FD5-E8A6-4A36-943C-891D07F5DD21}
+		{4B5945CD-0CB3-49AA-A7FF-7612D93F82C0} = {4B5945CD-0CB3-49AA-A7FF-7612D93F82C0}
+		{855DC8C0-D3E9-4A2E-AE47-116605A7BC9B} = {855DC8C0-D3E9-4A2E-AE47-116605A7BC9B}
+		{7FDE3880-A4AB-49E3-B439-EBEF0A0C7A65} = {7FDE3880-A4AB-49E3-B439-EBEF0A0C7A65}
+		{FE07F272-AE7F-4549-9E9F-EF9B80CB1693} = {FE07F272-AE7F-4549-9E9F-EF9B80CB1693}
+		{2BB84911-C1B4-4747-B93D-36AA82CC5031} = {2BB84911-C1B4-4747-B93D-36AA82CC5031}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pjnath", "pjnath\build\pjnath.vcproj", "{A5D9AA24-08ED-48B9-BD65-F0A25E96BFC4}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{DA0E03ED-53A7-4050-8A85-90541C5509F8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{DA0E03ED-53A7-4050-8A85-90541C5509F8}.Debug|Win32.Build.0 = Debug|Win32
+		{DA0E03ED-53A7-4050-8A85-90541C5509F8}.Release|Win32.ActiveCfg = Release|Win32
+		{DA0E03ED-53A7-4050-8A85-90541C5509F8}.Release|Win32.Build.0 = Release|Win32
+		{6AC3EF61-5A9E-4F43-A809-5B2FD1A43B16}.Debug|Win32.ActiveCfg = Debug|Win32
+		{6AC3EF61-5A9E-4F43-A809-5B2FD1A43B16}.Debug|Win32.Build.0 = Debug|Win32
+		{6AC3EF61-5A9E-4F43-A809-5B2FD1A43B16}.Release|Win32.ActiveCfg = Release|Win32
+		{6AC3EF61-5A9E-4F43-A809-5B2FD1A43B16}.Release|Win32.Build.0 = Release|Win32
+		{FE07F272-AE7F-4549-9E9F-EF9B80CB1693}.Debug|Win32.ActiveCfg = Debug|Win32
+		{FE07F272-AE7F-4549-9E9F-EF9B80CB1693}.Debug|Win32.Build.0 = Debug|Win32
+		{FE07F272-AE7F-4549-9E9F-EF9B80CB1693}.Release|Win32.ActiveCfg = Release|Win32
+		{FE07F272-AE7F-4549-9E9F-EF9B80CB1693}.Release|Win32.Build.0 = Release|Win32
+		{ED02BE13-8297-4770-8097-27DC2CCABF9A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{ED02BE13-8297-4770-8097-27DC2CCABF9A}.Debug|Win32.Build.0 = Debug|Win32
+		{ED02BE13-8297-4770-8097-27DC2CCABF9A}.Release|Win32.ActiveCfg = Release|Win32
+		{ED02BE13-8297-4770-8097-27DC2CCABF9A}.Release|Win32.Build.0 = Release|Win32
+		{7FDE3880-A4AB-49E3-B439-EBEF0A0C7A65}.Debug|Win32.ActiveCfg = Debug|Win32
+		{7FDE3880-A4AB-49E3-B439-EBEF0A0C7A65}.Debug|Win32.Build.0 = Debug|Win32
+		{7FDE3880-A4AB-49E3-B439-EBEF0A0C7A65}.Release|Win32.ActiveCfg = Release|Win32
+		{7FDE3880-A4AB-49E3-B439-EBEF0A0C7A65}.Release|Win32.Build.0 = Release|Win32
+		{855DC8C0-D3E9-4A2E-AE47-116605A7BC9B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{855DC8C0-D3E9-4A2E-AE47-116605A7BC9B}.Debug|Win32.Build.0 = Debug|Win32
+		{855DC8C0-D3E9-4A2E-AE47-116605A7BC9B}.Release|Win32.ActiveCfg = Release|Win32
+		{855DC8C0-D3E9-4A2E-AE47-116605A7BC9B}.Release|Win32.Build.0 = Release|Win32
+		{2BB84911-C1B4-4747-B93D-36AA82CC5031}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2BB84911-C1B4-4747-B93D-36AA82CC5031}.Debug|Win32.Build.0 = Debug|Win32
+		{2BB84911-C1B4-4747-B93D-36AA82CC5031}.Release|Win32.ActiveCfg = Release|Win32
+		{2BB84911-C1B4-4747-B93D-36AA82CC5031}.Release|Win32.Build.0 = Release|Win32
+		{4B5945CD-0CB3-49AA-A7FF-7612D93F82C0}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4B5945CD-0CB3-49AA-A7FF-7612D93F82C0}.Debug|Win32.Build.0 = Debug|Win32
+		{4B5945CD-0CB3-49AA-A7FF-7612D93F82C0}.Release|Win32.ActiveCfg = Release|Win32
+		{4B5945CD-0CB3-49AA-A7FF-7612D93F82C0}.Release|Win32.Build.0 = Release|Win32
+		{B8719FD5-E8A6-4A36-943C-891D07F5DD21}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B8719FD5-E8A6-4A36-943C-891D07F5DD21}.Debug|Win32.Build.0 = Debug|Win32
+		{B8719FD5-E8A6-4A36-943C-891D07F5DD21}.Release|Win32.ActiveCfg = Release|Win32
+		{B8719FD5-E8A6-4A36-943C-891D07F5DD21}.Release|Win32.Build.0 = Release|Win32
+		{8310649E-A25E-4AF0-91E8-9E3CC659BB89}.Debug|Win32.ActiveCfg = Debug|Win32
+		{8310649E-A25E-4AF0-91E8-9E3CC659BB89}.Debug|Win32.Build.0 = Debug|Win32
+		{8310649E-A25E-4AF0-91E8-9E3CC659BB89}.Release|Win32.ActiveCfg = Release|Win32
+		{8310649E-A25E-4AF0-91E8-9E3CC659BB89}.Release|Win32.Build.0 = Release|Win32
+		{9CA0FDFB-2172-41FC-B7F1-5CE915EDCB37}.Debug|Win32.ActiveCfg = Debug|Win32
+		{9CA0FDFB-2172-41FC-B7F1-5CE915EDCB37}.Debug|Win32.Build.0 = Debug|Win32
+		{9CA0FDFB-2172-41FC-B7F1-5CE915EDCB37}.Release|Win32.ActiveCfg = Release|Win32
+		{9CA0FDFB-2172-41FC-B7F1-5CE915EDCB37}.Release|Win32.Build.0 = Release|Win32
+		{A0F1AA62-0F6F-420D-B09A-AC04B6862821}.Debug|Win32.ActiveCfg = Debug|Win32
+		{A0F1AA62-0F6F-420D-B09A-AC04B6862821}.Debug|Win32.Build.0 = Debug|Win32
+		{A0F1AA62-0F6F-420D-B09A-AC04B6862821}.Release|Win32.ActiveCfg = Release|Win32
+		{A0F1AA62-0F6F-420D-B09A-AC04B6862821}.Release|Win32.Build.0 = Release|Win32
+		{E378A1FC-0C9C-4462-860F-7E60BC1BF84E}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E378A1FC-0C9C-4462-860F-7E60BC1BF84E}.Debug|Win32.Build.0 = Debug|Win32
+		{E378A1FC-0C9C-4462-860F-7E60BC1BF84E}.Release|Win32.ActiveCfg = Release|Win32
+		{E378A1FC-0C9C-4462-860F-7E60BC1BF84E}.Release|Win32.Build.0 = Release|Win32
+		{B3F7D4E9-702F-4EB4-ADA8-098D0A83D770}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B3F7D4E9-702F-4EB4-ADA8-098D0A83D770}.Debug|Win32.Build.0 = Debug|Win32
+		{B3F7D4E9-702F-4EB4-ADA8-098D0A83D770}.Release|Win32.ActiveCfg = Release|Win32
+		{B3F7D4E9-702F-4EB4-ADA8-098D0A83D770}.Release|Win32.Build.0 = Release|Win32
+		{A5D9AA24-08ED-48B9-BD65-F0A25E96BFC4}.Debug|Win32.ActiveCfg = Debug|Win32
+		{A5D9AA24-08ED-48B9-BD65-F0A25E96BFC4}.Debug|Win32.Build.0 = Debug|Win32
+		{A5D9AA24-08ED-48B9-BD65-F0A25E96BFC4}.Release|Win32.ActiveCfg = Release|Win32
+		{A5D9AA24-08ED-48B9-BD65-F0A25E96BFC4}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: /pjproject/branches/split-3rd-party/pjproject.dsw
===================================================================
--- /pjproject/branches/split-3rd-party/pjproject.dsw	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjproject.dsw	(revision 1163)
@@ -0,0 +1,305 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "pjlib"=.\pjlib\build\pjlib.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib_test"=.\pjlib\build\pjlib_test.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "pjlib_util"=".\pjlib-util\build\pjlib_util.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib_util_test"=".\pjlib-util\build\pjlib_util_test.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "pjmedia"=.\pjmedia\build\pjmedia.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjmedia_codec"=.\pjmedia\build\pjmedia_codec.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjnath"=.\pjnath\build\pjnath.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsip_core"=.\pjsip\build\pjsip_core.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsip_simple"=.\pjsip\build\pjsip_simple.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsip_ua"=.\pjsip\build\pjsip_ua.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsua"=".\pjsip-apps\build\pjsua.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia_codec
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_core
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_simple
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_ua
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsua_lib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjnath
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "pjsua_lib"=.\pjsip\build\pjsua_lib.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "sample_debug"=".\pjsip-apps\build\sample_debug.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia_codec
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_core
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_simple
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_ua
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsua_lib
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "samples"=".\pjsip-apps\build\samples.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia_codec
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_core
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_simple
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_ua
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsua_lib
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "test_pjsip"=.\pjsip\build\test_pjsip.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia_codec
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_core
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_simple
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_ua
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsua_lib
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/Footprint.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/Footprint.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/Footprint.mak	(revision 1163)
@@ -0,0 +1,55 @@
+#
+# This file is used by get-footprint.py script to build samples/footprint.c
+# to get the footprint report for PJSIP/PJMEDIA.
+#
+include ../../build/common.mak
+
+PJLIB_LIB:=../../pjlib/lib/libpj-$(TARGET_NAME)$(LIBEXT)
+PJLIB_UTIL_LIB:=../../pjlib-util/lib/libpjlib-util-$(TARGET_NAME)$(LIBEXT)
+PJMEDIA_LIB:=../../pjmedia/lib/libpjmedia-$(TARGET_NAME)$(LIBEXT)
+PJMEDIA_CODEC_LIB:=../../pjmedia/lib/libpjmedia-codec-$(TARGET_NAME)$(LIBEXT)
+PJSIP_LIB:=../../pjsip/lib/libpjsip-$(TARGET_NAME)$(LIBEXT)
+PJSIP_UA_LIB:=../../pjsip/lib/libpjsip-ua-$(TARGET_NAME)$(LIBEXT)
+PJSIP_SIMPLE_LIB:=../../pjsip/lib/libpjsip-simple-$(TARGET_NAME)$(LIBEXT)
+PJSUA_LIB_LIB=../../pjsip/lib/libpjsua-$(TARGET_NAME)$(LIBEXT)
+
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC)../../pjsip/include \
+		   $(CC_INC)../../pjlib/include \
+		   $(CC_INC)../../pjlib-util/include \
+		   $(CC_INC)../../pjmedia/include
+export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
+		   $(HOST_CXXFLAGS) $(CXXFLAGS)
+
+export LIBS :=	$(subst /,$(HOST_PSEP),$(PJSUA_LIB_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJSIP_UA_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJSIP_SIMPLE_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJSIP_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJMEDIA_CODEC_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJLIB_LIB))
+
+
+export _LDFLAGS := $(LIBS) \
+		   $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
+		   $(LDFLAGS) -lm
+
+
+
+EXE := footprint.exe
+
+all: 
+	$(CROSS_COMPILE)$(CC_NAME) -o $(EXE) ../src/samples/footprint.c $(FCFLAGS) $(_CFLAGS) $(_LDFLAGS)
+	$(CROSS_COMPILE)strip --strip-all $(EXE)
+
+clean:
+	rm -f $(EXE)
+
+print_name:
+	@echo $(MACHINE_NAME) $(OS_NAME) $(CROSS_COMPILE)$(CC_NAME) `$(CROSS_COMPILE)$(CC_NAME) -dumpversion`
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/Makefile
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/Makefile	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/Makefile	(revision 1163)
@@ -0,0 +1,89 @@
+include ../../build/common.mak
+
+RULES_MAK := ../../build/rules.mak
+
+PJLIB_LIB:=../../pjlib/lib/libpj-$(TARGET_NAME)$(LIBEXT)
+PJLIB_UTIL_LIB:=../../pjlib-util/lib/libpjlib-util-$(TARGET_NAME)$(LIBEXT)
+PJNATH_LIB:=../../pjnath/lib/libpjnath-$(TARGET_NAME)$(LIBEXT)
+PJMEDIA_LIB:=../../pjmedia/lib/libpjmedia-$(TARGET_NAME)$(LIBEXT)
+PJMEDIA_CODEC_LIB:=../../pjmedia/lib/libpjmedia-codec-$(TARGET_NAME)$(LIBEXT)
+PJSIP_LIB:=../../pjsip/lib/libpjsip-$(TARGET_NAME)$(LIBEXT)
+PJSIP_UA_LIB:=../../pjsip/lib/libpjsip-ua-$(TARGET_NAME)$(LIBEXT)
+PJSIP_SIMPLE_LIB:=../../pjsip/lib/libpjsip-simple-$(TARGET_NAME)$(LIBEXT)
+PJSUA_LIB_LIB=../../pjsip/lib/libpjsua-$(TARGET_NAME)$(LIBEXT)
+
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC)../../pjsip/include \
+		   $(CC_INC)../../pjlib/include \
+		   $(CC_INC)../../pjlib-util/include \
+		   $(CC_INC)../../pjnath/include \
+		   $(CC_INC)../../pjmedia/include
+export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
+		   $(HOST_CXXFLAGS) $(CXXFLAGS)
+export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJSUA_LIB_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJSIP_UA_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJSIP_SIMPLE_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJSIP_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJMEDIA_CODEC_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJMEDIA_CODEC_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJNATH_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \
+		   $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
+		   $(LDFLAGS) -lm
+
+
+###############################################################################
+# Defines for building PJSUA
+#
+export PJSUA_SRCDIR = ../src/pjsua
+export PJSUA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+			main.o pjsua_app.o
+export PJSUA_CFLAGS += $(_CFLAGS)
+export PJSUA_LDFLAGS += $(_LDFLAGS)
+export PJSUA_EXE:=../bin/pjsua-$(TARGET_NAME)$(HOST_EXE)
+
+
+export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
+###############################################################################
+# Main entry
+#
+#
+TARGETS := pjsua samples
+
+.PHONY: $(TARGETS)
+
+all: $(TARGETS)
+
+doc:
+	cd .. && doxygen docs/doxygen.cfg
+
+dep: depend
+distclean: realclean
+
+.PHONY: dep depend pjsua clean realclean distclean
+
+pjsua:
+	$(MAKE) -f $(RULES_MAK) APP=PJSUA app=pjsua $(PJSUA_EXE)
+
+samples:
+	$(MAKE) -f Samples.mak
+
+.PHONY: ../lib/pjsua.ko
+../lib/pjsua.ko:
+	$(MAKE) -f $(RULES_MAK) APP=PJSUA app=pjsua $@
+
+clean depend realclean:
+	$(MAKE) -f $(RULES_MAK) APP=PJSUA app=pjsua $@
+	$(MAKE) -f Samples.mak $@
+	@if test "$@" = "depend"; then \
+	  echo '$(PJSUA_EXE): $(PJSIP_LIB) $(PJSIP_UA_LIB) $(PJSIP_SIMPLE) $(PJSUA_LIB_LIB) $(PJLIB_LIB) $(PJLIB_UTIL_LIB) $(PJNATH_LIB) $(PJMEDIA_LIB) $(PJMEDIA_CODEC_LIB) Makefile' >> .pjsua-$(TARGET_NAME).depend; \
+	fi
+
+
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/Samples-vc.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/Samples-vc.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/Samples-vc.mak	(revision 1163)
@@ -0,0 +1,74 @@
+
+TARGET = i386-win32-vc$(VC_VER)-$(BUILD_MODE)
+LIBEXT = .lib
+
+!if "$(BUILD_MODE)" == "debug"
+BUILD_FLAGS = /MTd /Od /Zi /W4
+!else
+BUILD_FLAGS = /Ox /MD /DNDEBUG /W4
+!endif
+
+PJLIB_LIB = ..\..\pjlib\lib\pjlib-$(TARGET)$(LIBEXT)
+PJLIB_UTIL_LIB = ..\..\pjlib-util\lib\pjlib-util-$(TARGET)$(LIBEXT)
+PJNATH_LIB = ..\..\pjnath\lib\pjnath-$(TARGET)$(LIBEXT)
+PJMEDIA_LIB = ..\..\pjmedia\lib\pjmedia-$(TARGET)$(LIBEXT)
+PJMEDIA_CODEC_LIB = ..\..\pjmedia\lib\pjmedia-codec-$(TARGET)$(LIBEXT)
+PJSIP_LIB = ..\..\pjsip\lib\pjsip-core-$(TARGET)$(LIBEXT)
+PJSIP_UA_LIB = ..\..\pjsip\lib\pjsip-ua-$(TARGET)$(LIBEXT)
+PJSIP_SIMPLE_LIB = ..\..\pjsip\lib\pjsip-simple-$(TARGET)$(LIBEXT)
+PJSUA_LIB_LIB = ..\..\pjsip\lib\pjsua-lib-$(TARGET)$(LIBEXT)
+
+LIBS = $(PJSUA_LIB_LIB) $(PJSIP_UA_LIB) $(PJSIP_SIMPLE_LIB) \
+	  $(PJSIP_LIB) $(PJMEDIA_CODEC_LIB) $(PJMEDIA_LIB) $(PJNATH_LIB) \
+	  $(PJLIB_UTIL_LIB) $(PJLIB_LIB)
+
+CFLAGS 	= /DPJ_WIN32=1 /DPJ_M_I386=1 \
+	  $(BUILD_FLAGS) \
+	  -I..\..\pjsip\include \
+	  -I..\..\pjlib\include \
+	  -I..\..\pjlib-util\include \
+	  -I..\..\pjmedia\include \
+	  -I..\..\pjnath/include
+LDFLAGS = $(BUILD_FLAGS) $(LIBS) \
+	  Iphlpapi.lib ole32.lib user32.lib dsound.lib dxguid.lib netapi32.lib \
+	  mswsock.lib ws2_32.lib 
+
+SRCDIR = ..\src\samples
+OBJDIR = .\output\samples-$(TARGET)
+BINDIR = ..\bin\samples
+
+
+SAMPLES = $(BINDIR)\confsample.exe \
+	  $(BINDIR)\confbench.exe \
+	  $(BINDIR)\level.exe \
+	  $(BINDIR)\pjsip-perf.exe \
+	  $(BINDIR)\playfile.exe \
+	  $(BINDIR)\playsine.exe\
+	  $(BINDIR)\recfile.exe  \
+	  $(BINDIR)\resampleplay.exe \
+	  $(BINDIR)\simpleua.exe \
+	  $(BINDIR)\simple_pjsua.exe \
+	  $(BINDIR)\siprtp.exe \
+	  $(BINDIR)\sipstateless.exe \
+	  $(BINDIR)\sndinfo.exe \
+	  $(BINDIR)\sndtest.exe \
+	  $(BINDIR)\stateful_proxy.exe \
+	  $(BINDIR)\stateless_proxy.exe \
+	  $(BINDIR)\streamutil.exe \
+	  $(BINDIR)\tonegen.exe
+
+
+all: $(OBJDIR) $(SAMPLES)
+
+$(SAMPLES): $(SRCDIR)\$(@B).c $(LIBS) $(SRCDIR)\util.h Samples-vc.mak
+	cl -nologo -c $(SRCDIR)\$(@B).c /Fo$(OBJDIR)\$(@B).obj $(CFLAGS) 
+	cl /nologo $(OBJDIR)\$(@B).obj /Fe$@ /Fm$(OBJDIR)\$(@B).map $(LDFLAGS)
+
+$(OBJDIR):
+	if not exist $(OBJDIR) mkdir $(OBJDIR)
+
+clean:
+	echo Cleaning up samples...
+	if exist $(BINDIR) del /Q $(BINDIR)\*.*
+	if exist $(OBJDIR) del /Q $(OBJDIR)\*.*
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/Samples.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/Samples.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/Samples.mak	(revision 1163)
@@ -0,0 +1,92 @@
+
+include ../../build/common.mak
+
+PJLIB_LIB:=../../pjlib/lib/libpj-$(TARGET_NAME)$(LIBEXT)
+PJLIB_UTIL_LIB:=../../pjlib-util/lib/libpjlib-util-$(TARGET_NAME)$(LIBEXT)
+PJNATH_LIB:=../../pjnath/lib/libpjnath-$(TARGET_NAME)$(LIBEXT)
+PJMEDIA_LIB:=../../pjmedia/lib/libpjmedia-$(TARGET_NAME)$(LIBEXT)
+PJMEDIA_CODEC_LIB:=../../pjmedia/lib/libpjmedia-codec-$(TARGET_NAME)$(LIBEXT)
+PJSIP_LIB:=../../pjsip/lib/libpjsip-$(TARGET_NAME)$(LIBEXT)
+PJSIP_UA_LIB:=../../pjsip/lib/libpjsip-ua-$(TARGET_NAME)$(LIBEXT)
+PJSIP_SIMPLE_LIB:=../../pjsip/lib/libpjsip-simple-$(TARGET_NAME)$(LIBEXT)
+PJSUA_LIB_LIB=../../pjsip/lib/libpjsua-$(TARGET_NAME)$(LIBEXT)
+
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC)../../pjsip/include \
+		   $(CC_INC)../../pjlib/include \
+		   $(CC_INC)../../pjlib-util/include \
+		   $(CC_INC)../../pjnath/include \
+		   $(CC_INC)../../pjmedia/include
+export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
+		   $(HOST_CXXFLAGS) $(CXXFLAGS)
+
+export LIBS :=	$(subst /,$(HOST_PSEP),$(PJSUA_LIB_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJSIP_UA_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJSIP_SIMPLE_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJSIP_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJMEDIA_CODEC_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJMEDIA_CODEC_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJNATH_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \
+		$(subst /,$(HOST_PSEP),$(PJLIB_LIB))
+
+
+export _LDFLAGS := $(LIBS) \
+		   $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
+		   $(LDFLAGS) -lm
+
+SRCDIR := ../src/samples
+OBJDIR := ./output/samples-$(TARGET_NAME)
+BINDIR := ../bin/samples
+
+SAMPLES := confsample \
+	   level \
+	   pjsip-perf \
+	   playfile \
+	   playsine \
+	   recfile \
+	   resampleplay \
+	   simpleua \
+	   simple_pjsua \
+	   siprtp \
+	   sipstateless \
+	   sndinfo \
+	   sndtest \
+	   stateful_proxy \
+	   stateless_proxy \
+	   streamutil \
+	   tonegen
+
+EXES := $(foreach file, $(SAMPLES), $(BINDIR)/$(file)-$(TARGET_NAME)$(HOST_EXE))
+
+all: $(OBJDIR) $(EXES)
+
+$(BINDIR)/%-$(TARGET_NAME)$(HOST_EXE): $(OBJDIR)/%$(OBJEXT) $(LIBS)
+	$(LD) $(LDOUT)$(subst /,$(HOST_PSEP),$@) \
+	    $(subst /,$(HOST_PSEP),$<) \
+	    $(_LDFLAGS)
+
+$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.c
+	$(CC) $(_CFLAGS) \
+	  $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
+	  $(subst /,$(HOST_PSEP),$<) 
+
+$(OBJDIR):
+	$(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR)) 
+
+depend:
+
+clean:
+	$(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)/*),$(HOST_RMR))
+	$(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)),$(HOST_RMDIR))
+	$(subst @@,$(EXES),$(HOST_RM))
+
+distclean realclean: clean
+#	$(subst @@,$(subst /,$(HOST_PSEP),$(EXES)) $(subst /,$(HOST_PSEP),$(EXES)),$(HOST_RM))
+#	$(subst @@,$(DEP_FILE),$(HOST_RM))
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/get-footprint.py
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/get-footprint.py	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/get-footprint.py	(revision 1163)
@@ -0,0 +1,329 @@
+# $Id$
+# 
+# This file is used to generate PJSIP/PJMEDIA footprint report.
+# To use this file, just run it in pjsip-apps/build directory, to
+# produce footprint.txt and footprint.htm report files.
+#
+import os
+import sys
+import string
+import time
+
+compile_flags1 = [
+    # Base
+    ['BASE',			'Empty application size'],
+    ['',			'Subtotal: Empty application size'],
+
+    ['HAS_PJLIB', 		'Minimum PJLIB only'],
+
+    # Subtotal
+    ['',			'Subtotal'],
+
+    # PJLIB-UTIL
+    ['HAS_PJLIB_STUN',		'STUN client'],
+    ['HAS_PJLIB_GETOPT',	'getopt() functionality'],
+    
+    # Subtotal
+    ['',			'TOTAL']
+]
+
+compile_flags = [
+    # Base
+    ['BASE',			'Empty application size'],
+    ['', 			'Subtotal: empty application size on this platform'],
+
+    ['HAS_PJLIB', 		'PJLIB (pool, data structures, hash tables, ioqueue, socket, timer heap, etc.). ' +
+			        'For targets that statically link application with LIBC, the size includes ' +
+			        'various LIBC functions that are used by PJLIB.'],
+    ['', 			'Subtotal: Application linked with PJLIB'],
+
+    # PJLIB-UTIL
+    ['HAS_PJLIB_STUN',		'PJLIB-UTIL STUN client'],
+    ['HAS_PJLIB_GETOPT',	'PJLIB-UTIL getopt() functionality'],
+    ['HAS_PJLIB_SCANNER',	'PJLIB-UTIL text scanner (needed by SIP parser)'],
+    ['HAS_PJLIB_XML',		'PJLIB-UTIL tiny XML (parsing and API) (needs text scanner)'],
+    ['HAS_PJLIB_DNS',		'PJLIB-UTIL DNS packet and parsing'],
+    ['HAS_PJLIB_RESOLVER',	'PJLIB-UTIL Asynchronous DNS resolver/caching engine'],
+
+    # PJSIP
+    ['HAS_PJSIP_CORE_MSG_ELEM',	'PJSIP Core - Messaging Elements and Parsing (message, headers, SIP URI, TEL URI/RFC 3966, etc.)'],
+    ['HAS_PJSIP_CORE',		'PJSIP Core - Endpoint (transport management, module management, event distribution, etc.)'],
+    ['HAS_PJSIP_CORE_MSG_UTIL',	'PJSIP Core - Stateless operations, SIP SRV, server resolution and fail-over'],
+    ['HAS_PJSIP_UDP_TRANSPORT',	'PJSIP UDP transport'],
+    ['',			'Subtotal: A minimalistic SIP application (parsing, UDP transport+STUN, no transaction)'],
+   
+    ['HAS_PJSIP_TCP_TRANSPORT',	'PJSIP TCP transport'],
+    ['HAS_PJSIP_INFO',		'PJSIP INFO support (RFC 2976) (no special treatment, thus the zero size)'],
+    ['HAS_PJSIP_TRANSACTION',	'PJSIP transaction and stateful API'],
+    ['HAS_PJSIP_AUTH_CLIENT',	'PJSIP digest authentication client'],
+    ['HAS_PJSIP_UA_LAYER',	'PJSIP User agent layer and base dialog and usage management (draft-ietf-sipping-dialogusage-01)'],
+    ['HAS_PJMEDIA_SDP',		'PJMEDIA SDP Parsing and API (RFC 2327), needed by SDP negotiator'],
+    ['HAS_PJMEDIA_SDP_NEGOTIATOR','PJMEDIA SDP negotiator (RFC 3264), needed by INVITE session'],
+    ['HAS_PJSIP_INV_SESSION',	'PJSIP INVITE session API'],
+    ['HAS_PJSIP_REGC',		'PJSIP client registration API'],
+    ['',			'Subtotal: Minimal SIP application with registration (including digest authentication)'],
+    
+    ['HAS_PJSIP_EVENT_FRAMEWORK','PJSIP Event/SUBSCRIBE framework, RFC 3265 (needed by call transfer, and presence)'],
+    ['HAS_PJSIP_CALL_TRANSFER',	'PJSIP Call Transfer/REFER support (RFC 3515)'],
+    ['',			'Subtotal: Minimal SIP application with call transfer'],
+
+
+    ['HAS_PJSIP_PRESENCE',	'PJSIP Presence subscription, including PIDF/X-PIDF support (RFC 3856, RFC 3863, etc) (needs XML)'],
+    ['HAS_PJSIP_MESSAGE',	'PJSIP Instant Messaging/MESSAGE support (RFC 3428) (no special treatment, thus the zero size)'],
+    ['HAS_PJSIP_IS_COMPOSING',	'PJSIP Message Composition indication (RFC 3994)'],
+
+    # Subtotal
+    ['',			'Subtotal: Complete PJSIP package (call, registration, presence, IM) +STUN +GETOPT (+PJLIB), no media'],
+    
+    # PJMEDIA
+    ['HAS_PJMEDIA_EC',		'PJMEDIA accoustic echo cancellation'],
+    ['HAS_PJMEDIA_SND_DEV',	'PJMEDIA sound device backend (platform specific)'],
+    ['HAS_PJMEDIA_SILENCE_DET',	'PJMEDIA Adaptive silence detector'],
+    ['HAS_PJMEDIA',		'PJMEDIA endpoint'],
+    ['HAS_PJMEDIA_PLC',		'PJMEDIA Packet Lost Concealment implementation (needed by G.711, GSM, and sound device port)'],
+    ['HAS_PJMEDIA_SND_PORT',	'PJMEDIA sound device media port'],
+    ['HAS_PJMEDIA_RESAMPLE',	'PJMEDIA resampling algorithm (large filter disabled)'],
+    ['HAS_PJMEDIA_G711_CODEC',	'PJMEDIA G.711 codec (PCMA/PCMU, including PLC) (may have already been linked by other module)'],
+    ['HAS_PJMEDIA_CONFERENCE',	'PJMEDIA conference bridge (needs resampling and silence detector)'],
+    ['HAS_PJMEDIA_MASTER_PORT',	'PJMEDIA master port'],
+    ['HAS_PJMEDIA_RTP',		'PJMEDIA stand-alone RTP'],
+    ['HAS_PJMEDIA_RTCP',	'PJMEDIA stand-alone RTCP and media quality calculation'],
+    ['HAS_PJMEDIA_JBUF',	'PJMEDIA stand-alone adaptive jitter buffer'],
+    ['HAS_PJMEDIA_STREAM',	'PJMEDIA stream for remote media communication (needs RTP, RTCP, and jitter buffer)'],
+    ['HAS_PJMEDIA_TONEGEN',	'PJMEDIA tone generator'],
+    ['HAS_PJMEDIA_UDP_TRANSPORT','PJMEDIA UDP media transport'],
+    ['HAS_PJMEDIA_FILE_PLAYER',	'PJMEDIA WAV file player'],
+    ['HAS_PJMEDIA_FILE_CAPTURE',	'PJMEDIA WAV file writer'],
+    ['HAS_PJMEDIA_MEM_PLAYER',	'PJMEDIA fixed buffer player'],
+    ['HAS_PJMEDIA_MEM_CAPTURE',	'PJMEDIA fixed buffer writer'],
+
+    # Subtotal
+    ['',			'Subtotal: Complete SIP and all PJMEDIA features (G.711 codec only)'],
+    
+    # Codecs
+    ['HAS_PJMEDIA_GSM_CODEC',	'PJMEDIA GSM codec (including PLC)'],
+    ['HAS_PJMEDIA_SPEEX_CODEC',	'PJMEDIA Speex codec (narrowband, wideband, ultra-wideband)'],
+    ['HAS_PJMEDIA_ILBC_CODEC',	'PJMEDIA iLBC codec'],
+
+    # Total
+    ['',			'TOTAL: complete libraries (+all codecs)'],
+]
+
+# Executable size report, tuple of:
+#   <all flags>, <flags added>, <text size>, <data>, <bss>, <description>
+exe_size = []
+
+#
+# Write the report to text file
+#
+def print_text_report(filename):
+    output = open(filename, 'w')
+
+    output.write('PJSIP and PJMEDIA footprint report\n')
+    output.write('Auto-generated by pjsip-apps/build/get-footprint.py\n')
+    output.write('\n')
+
+    # Write Revision info.
+    f = os.popen('svn info | grep Revision')
+    output.write(f.readline())
+
+    output.write('Date: ')
+    output.write(time.asctime())
+    output.write('\n')
+    output.write('\n')
+
+    # Write individual module size
+    output.write('Footprint (in bytes):\n')
+    output.write('   .text   .data    .bss    Module Description\n')
+    output.write('==========================================================\n')
+	
+    for i in range(1, len(exe_size)):
+	e = exe_size[i]
+	prev = exe_size[i-1]
+	
+	if e[1]<>'':
+	    output.write(' ')
+	    output.write(  string.rjust(`string.atoi(e[2]) - string.atoi(prev[2])`, 8) )
+	    output.write(  string.rjust(`string.atoi(e[3]) - string.atoi(prev[3])`, 8) )
+	    output.write(  string.rjust(`string.atoi(e[4]) - string.atoi(prev[4])`, 8) )
+	    output.write('   ' + e[5] + '\n')
+	else:
+	    output.write(' ------------------------\n')	
+	    output.write(' ')
+	    output.write( string.rjust(e[2], 8) )
+	    output.write( string.rjust(e[3], 8) )
+	    output.write( string.rjust(e[4], 8) )
+	    output.write('   ' + e[5] + '\n')
+	    output.write('\n')	
+
+	
+    # Done    
+    output.close()
+
+
+#
+# Write the report to HTML file
+#
+def print_html_report():
+
+    # Get Revision info.
+    f = os.popen('svn info | grep Revision')
+    revision = f.readline().split()[1]
+
+    # Get Machine, OS, and CC name
+    f = os.popen('make -f Footprint.mak print_name')
+    names = f.readline().split()
+    m = names[0]
+    o = names[1]
+    cc = names[2]
+    cc_ver = names[3]
+
+    # Open HTML file
+    filename = 'footprint-' + m + '-' + o + '.htm'
+    output = open(filename, 'w')
+
+    title = 'PJSIP and PJMEDIA footprint report for ' + m + '-' + o + ' target'
+    output.write('<HTML><HEAD>\n');
+    output.write(' <TITLE>' + title + '</TITLE>\n')
+    output.write(' <LINK href="/style/style.css" type="text/css" rel="stylesheet">\n')
+    output.write('</HEAD>\n');
+    output.write('<BODY bgcolor="white">\n');
+    output.write('<!--#include virtual="/header.html" -->')
+
+    output.write(' <H1>' + title + '</H1>\n')
+    output.write('Auto-generated by pjsip-apps/build/get-footprint.py script\n')
+    output.write('<p>Date: ' + time.asctime() + '<BR>\n')
+    output.write('Revision: r' + revision + '</p>\n\n')
+    output.write('<HR>\n')
+    output.write('\n')
+
+    # Info
+    output.write('<H2>Build Configuration</H2>\n')
+
+    # build.mak
+    output.write('\n<H3>build.mak</H3>\n')
+    output.write('<tt>\n')
+    f = open('../../build.mak', 'r')
+    s = f.readlines()
+    for l in s:
+	output.write(l + '<BR>\n')
+    output.write('</tt>\n')
+    output.write('<p>Using ' + cc + ' version ' + cc_ver +'</p>\n')
+
+    # user.mak
+    output.write('\n<H3>user.mak</H3>\n')
+    output.write('<tt>\n')
+    f = open('../../user.mak', 'r')
+    s = f.readlines()
+    for l in s:
+	output.write(l + '<BR>\n')
+    output.write('</tt>\n')
+
+    # config_site.h
+    output.write('\n<H3>&lt;pj/config.site.h&gt;</H3>\n')
+    output.write('<tt>\n')
+    f = os.popen('cpp -dM -I../../pjlib/include ../../pjlib/include/pj/config_site.h | grep PJ')
+    s = f.readlines()
+    for l in s:
+	output.write(l + '<BR>\n')
+    output.write('</tt>\n')
+
+
+
+    # Write individual module size
+    output.write('<H2>Footprint Report</H2>\n')
+    output.write('<p>The table below shows the footprint of individual feature, in bytes.</p>')
+    output.write('<TABLE border="1" cellpadding="2" cellspacing="0">\n' + 
+		  '<TR bgcolor="#e8e8ff">\n' + 
+		  '  <TD align="center"><strong>.text</strong></TD>\n' +
+		  '  <TD align="center"><strong>.data</strong></TD>\n' +
+		  '  <TD align="center"><strong>.bss</strong></TD>\n' +
+		  '  <TD align="center"><strong>Features/Module Description</strong></TD>\n' +
+		  '</TR>\n')
+	
+	
+    for i in range(1, len(exe_size)):
+	e = exe_size[i]
+	prev = exe_size[i-1]
+	
+	output.write('<TR>\n')
+	if e[1]<>'':
+	    output.write( '  <TD align="right">' + `string.atoi(e[2]) - string.atoi(prev[2])` + '</TD>\n')
+	    output.write( '  <TD align="right">' + `string.atoi(e[3]) - string.atoi(prev[3])` + '</TD>\n')
+	    output.write( '  <TD align="right">' + `string.atoi(e[4]) - string.atoi(prev[4])` + '</TD>\n' )
+	    output.write( '  <TD>' + e[5] + '</TD>\n')
+	else:
+	    empty_size = exe_size[1]
+	    output.write('<TR bgcolor="#e8e8ff">\n')
+	    output.write( '  <TD align="right">&nbsp;</TD>\n')
+	    output.write( '  <TD align="right">&nbsp;</TD>\n')
+	    output.write( '  <TD align="right">&nbsp;</TD>\n')
+	    output.write( '  <TD><strong>' + e[5] + ': .text=' + e[2]+ ', .data=' + e[3] + ', .bss=' + e[4] )
+	    output.write( '\n </strong> <BR>(Size minus empty application size: ' + \
+			    '.text=' + `string.atoi(e[2]) - string.atoi(empty_size[2])` + \
+			    ', .data=' + `string.atoi(e[3]) - string.atoi(empty_size[3])` + \
+			    ', .data=' + `string.atoi(e[4]) - string.atoi(empty_size[4])` + \
+			    ')\n' )
+	    output.write( ' </TD>\n')
+
+	output.write('</TR>\n')
+
+    output.write('</TABLE>\n')
+    output.write('<!--#include virtual="/footer.html" -->')
+    output.write('</BODY>\n')
+    output.write('</HTML>\n')
+	
+    # Done    
+    output.close()
+
+
+
+
+#
+# Get the size of individual feature
+#
+def get_size(all_flags, flags, desc):
+	file = 'footprint.exe'
+	# Remove file
+	rc = os.system("make -f Footprint.mak FCFLAGS='" + all_flags + "' clean")
+	# Make the executable
+	cmd = "make -f Footprint.mak FCFLAGS='" + all_flags + "' all"
+	#print cmd
+	rc = os.system(cmd)
+	if rc <> 0:
+		sys.exit(1)
+
+	# Run 'size' against the executable
+	f = os.popen('size ' + file)
+	# Skip header of the 'size' output
+	f.readline()
+	# Get the sizes
+	size = f.readline()
+	f.close()
+	# Split into tokens
+	tokens = size.split()
+	# Build the size tuple and add to exe_size
+	elem = all_flags, flags, tokens[0], tokens[1], tokens[2], desc
+	exe_size.append(elem)
+	# Remove file
+	rc = os.system("make -f Footprint.mak FCFLAGS='" + all_flags + "' clean")
+	
+# Main
+elem = '', '',  '0', '0', '0', ''
+exe_size.append(elem)
+
+all_flags = ''
+for elem in compile_flags:
+    if elem[0] <> '':
+	flags = '-D' + elem[0]
+	all_flags += flags + ' '
+	get_size(all_flags, elem[0], elem[1])
+    else:
+	e = exe_size[len(exe_size)-1]
+	n = all_flags, '', e[2], e[3], e[4], elem[1]
+	exe_size.append(n)
+	
+
+#print_text_report('footprint.txt')	
+print_html_report()
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/os-win32.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/os-win32.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/os-win32.mak	(revision 1163)
@@ -0,0 +1,2 @@
+
+export LDFLAGS += -lwinmm
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/pjsip_apps.dsw
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/pjsip_apps.dsw	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/pjsip_apps.dsw	(revision 1163)
@@ -0,0 +1,305 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "pjlib"="..\..\pjlib\build\pjlib.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib_util"="..\..\pjlib-util\build\pjlib_util.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjmedia"="..\..\pjmedia\build\pjmedia.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjmedia_codec"="..\..\pjmedia\build\pjmedia_codec.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjnath"="..\..\pjnath\build\pjnath.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsip_core"="..\..\pjsip\build\pjsip_core.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsip_simple"="..\..\pjsip\build\pjsip_simple.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsip_ua"="..\..\pjsip\build\pjsip_ua.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsua"=".\pjsua.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia_codec
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_core
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_simple
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_ua
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsua_lib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjnath
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "pjsua_lib"="..\..\pjsip\build\pjsua_lib.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "py_pjsua"=".\py_pjsua.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia_codec
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_core
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_simple
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_ua
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsua_lib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjnath
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "sample_debug"=".\sample_debug.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia_codec
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_core
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_simple
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_ua
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsua_lib
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "samples"=".\samples.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia_codec
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_core
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_simple
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_ua
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsua_lib
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "test_pjsip"="..\..\pjsip\build\test_pjsip.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_core
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_simple
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_ua
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/pjsua.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/pjsua.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/pjsua.dsp	(revision 1163)
@@ -0,0 +1,109 @@
+# Microsoft Developer Studio Project File - Name="pjsua" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=pjsua - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsua.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsua.mak" CFG="pjsua - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjsua - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "pjsua - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjsua - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\output\pjsua-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir ".\output\pjsua-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\output\pjsua-i386-win32-vc6-release"
+# PROP Intermediate_Dir ".\output\pjsua-i386-win32-vc6-release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /GX /Zi /O2 /I "../../pjsip/include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../../pjmedia/include" /I "../../pjnath/include" /D "NDEBUG" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 Iphlpapi.lib ole32.lib user32.lib dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /map:"..\bin\pjsua_vc6.map" /debug /machine:I386 /out:"../bin/pjsua_vc6.exe" /fixed:no
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF  "$(CFG)" == "pjsua - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\output\pjsua-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir ".\output\pjsua-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\output\pjsua-i386-win32-vc6-debug"
+# PROP Intermediate_Dir ".\output\pjsua-i386-win32-vc6-debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../../pjsip/include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../../pjmedia/include" /I "../../pjnath/include" /D "_DEBUG" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 Iphlpapi.lib ole32.lib user32.lib dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../bin/pjsua_vc6d.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjsua - Win32 Release"
+# Name "pjsua - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\src\pjsua\main.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsua\pjsua_app.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/pjsua.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/pjsua.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/pjsua.vcproj	(revision 1163)
@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjsua"
+	ProjectGUID="{19EBB464-60E7-47C5-96D8-E012B8CF3A41}"
+	RootNamespace="pjsua"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\output\pjsua-i386-win32-vc8-release"
+			IntermediateDirectory=".\output\pjsua-i386-win32-vc8-release"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\output\pjsua-i386-win32-vc8-release/pjsua.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../../pjsip/include,../../pjlib/include,../../pjlib-util/include,../../pjmedia/include,../../pjnath/include"
+				PreprocessorDefinitions="NDEBUG;PJ_WIN32=1;PJ_M_I386=1;WIN32;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile=".\output\pjsua-i386-win32-vc8-release/pjsua.pch"
+				AssemblerListingLocation=".\output\pjsua-i386-win32-vc8-release/"
+				ObjectFile=".\output\pjsua-i386-win32-vc8-release/"
+				ProgramDataBaseFileName=".\output\pjsua-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/FIXED:NO"
+				AdditionalDependencies="Iphlpapi.lib dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib odbc32.lib odbccp32.lib ole32.lib user32.lib"
+				OutputFile="../bin/pjsua_vc8.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\output\pjsua-i386-win32-vc8-release/pjsua_vc8.pdb"
+				GenerateMapFile="true"
+				MapFileName="..\bin\pjsua_vc8.map"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjsua-i386-win32-vc8-release/pjsua.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\output\pjsua-i386-win32-vc8-debug"
+			IntermediateDirectory=".\output\pjsua-i386-win32-vc8-debug"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\output\pjsua-i386-win32-vc8-debug/pjsua.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../../pjsip/include,../../pjlib/include,../../pjlib-util/include,../../pjmedia/include,../../pjnath/include"
+				PreprocessorDefinitions="_DEBUG;PJ_WIN32=1;PJ_M_I386=1;WIN32;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\output\pjsua-i386-win32-vc8-debug/pjsua.pch"
+				AssemblerListingLocation=".\output\pjsua-i386-win32-vc8-debug/"
+				ObjectFile=".\output\pjsua-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName=".\output\pjsua-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="Iphlpapi.lib  dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib odbc32.lib odbccp32.lib ole32.lib user32.lib"
+				OutputFile="../bin/pjsua_vc8d.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\output\pjsua-i386-win32-vc8-debug/pjsua_vc8d.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjsua-i386-win32-vc8-debug/pjsua.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\pjsua\main.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsua\pjsua_app.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/py_pjsua.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/py_pjsua.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/py_pjsua.dsp	(revision 1163)
@@ -0,0 +1,122 @@
+# Microsoft Developer Studio Project File - Name="py_pjsua" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=py_pjsua - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "py_pjsua.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "py_pjsua.mak" CFG="py_pjsua - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "py_pjsua - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "py_pjsua - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "py_pjsua - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\output\py_pjsua-i386-win32-vc6-release"
+# PROP Intermediate_Dir ".\output\py_pjsua-i386-win32-vc6-release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PY_PJSUA_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\pjlib\include" /I "..\..\pjlib-util\include" /I "..\..\pjmedia\include" /I "..\..\pjsip\include" /I "../../pjnath/include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PY_PJSUA_EXPORTS" /FR /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x421 /d "NDEBUG"
+# ADD RSC /l 0x421 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 python24.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib iphlpapi.lib /nologo /dll /map /machine:I386 /nodefaultlib:"libcmt.lib" /out:"..\lib\py_pjsua.pyd" /libpath:"../../pjlib/lib" /libpath:"../../pjlib-util/lib" /libpath:"../../pjmedia/lib" /libpath:"../../pjsip/lib"
+# SUBTRACT LINK32 /nodefaultlib
+
+!ELSEIF  "$(CFG)" == "py_pjsua - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\output\py_pjsua-i386-win32-vc6-debug"
+# PROP Intermediate_Dir ".\output\py_pjsua-i386-win32-vc6-debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PY_PJSUA_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\pjlib\include" /I "..\..\pjlib-util\include" /I "..\..\pjmedia\include" /I "..\..\pjsip\include" /I "../../pjnath/include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PY_PJSUA_EXPORTS" /FR /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x421 /d "_DEBUG"
+# ADD RSC /l 0x421 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 python24_d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib iphlpapi.lib /nologo /dll /debug /machine:I386 /out:"..\lib\py_pjsua_d.pyd" /pdbtype:sept /libpath:"../../pjlib/lib" /libpath:"../../pjlib-util/lib" /libpath:"../../pjmedia/lib" /libpath:"../../pjsip/lib" /libpath:"F:\incoming\projects\divusi\Python-2.4\Python-2.4\PCbuild" /libpath:"F:\incoming\projects\divusi\Python-2.4\Python-2.4\PC\VC6"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "py_pjsua - Win32 Release"
+# Name "py_pjsua - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\src\py_pjsua\pjsua.py
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\py_pjsua\pjsua_app.py
+# PROP Exclude_From_Build 1
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\py_pjsua\py_pjsua.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\py_pjsua\py_pjsua.def
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/sample_debug.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/sample_debug.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/sample_debug.dsp	(revision 1163)
@@ -0,0 +1,104 @@
+# Microsoft Developer Studio Project File - Name="sample_debug" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=sample_debug - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "sample_debug.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "sample_debug.mak" CFG="sample_debug - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "sample_debug - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "sample_debug - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "sample_debug - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/samples-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir "./output/samples-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/samples-i386-win32-vc6-release"
+# PROP Intermediate_Dir "./output/samples-i386-win32-vc6-release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /I "../../pjsip/include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../../pjmedia/include" /I "../../pjnath/include" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ole32.lib user32.lib dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"../bin/samples/sampledebug_vc6.exe" /fixed:no
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF  "$(CFG)" == "sample_debug - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/samples-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir "./output/samples-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/samples-i386-win32-vc6-debug"
+# PROP Intermediate_Dir "./output/samples-i386-win32-vc6-debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../../pjsip/include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../../pjmedia/include" /I "../../pjnath/include" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ole32.lib user32.lib dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /map /debug /machine:I386 /out:"../bin/samples/sampledebug_vc6d.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "sample_debug - Win32 Release"
+# Name "sample_debug - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\src\samples\debug.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/sample_debug.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/sample_debug.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/sample_debug.vcproj	(revision 1163)
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="sample_debug"
+	ProjectGUID="{E13CECAA-8A8E-48CC-841F-5C4B845F0ECB}"
+	RootNamespace="sample_debug"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="./output/samples-i386-win32-vc8-debug"
+			IntermediateDirectory="./output/samples-i386-win32-vc8-debug"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="./output/samples-i386-win32-vc8-debug/sample_debug.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../../pjsip/include,../../pjlib/include,../../pjlib-util/include,../../pjmedia/include,../../pjnath/include"
+				PreprocessorDefinitions="PJ_WIN32=1;PJ_M_I386=1;WIN32;_DEBUG;_CONSOLE"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile="./output/samples-i386-win32-vc8-debug/sample_debug.pch"
+				AssemblerListingLocation="./output/samples-i386-win32-vc8-debug/"
+				ObjectFile="./output/samples-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName="./output/samples-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib odbc32.lib odbccp32.lib oleaut32.lib uuid.lib ole32.lib user32.lib"
+				OutputFile="../bin/samples/sampledebug_vc8d.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="./output/samples-i386-win32-vc8-debug/sampledebug_vc8d.pdb"
+				GenerateMapFile="true"
+				MapFileName="./output/samples-i386-win32-vc8-debug/sampledebug_vc8d.map"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/samples-i386-win32-vc8-debug/sample_debug.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="./output/samples-i386-win32-vc8-release"
+			IntermediateDirectory="./output/samples-i386-win32-vc8-release"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName="./output/samples-i386-win32-vc8-release/sample_debug.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../../pjsip/include,../../pjlib/include,../../pjlib-util/include,../../pjmedia/include,../../pjnath/include"
+				PreprocessorDefinitions="PJ_WIN32=1;PJ_M_I386=1;WIN32;NDEBUG;_CONSOLE"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="./output/samples-i386-win32-vc8-release/sample_debug.pch"
+				AssemblerListingLocation="./output/samples-i386-win32-vc8-release/"
+				ObjectFile="./output/samples-i386-win32-vc8-release/"
+				ProgramDataBaseFileName="./output/samples-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/FIXED:NO"
+				AdditionalDependencies="dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib odbc32.lib odbccp32.lib oleaut32.lib uuid.lib ole32.lib user32.lib"
+				OutputFile="../bin/samples/sampledebug_vc8.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile="./output/samples-i386-win32-vc8-release/sampledebug_vc8.pdb"
+				GenerateMapFile="true"
+				MapFileName="./output/samples-i386-win32-vc8-release/sampledebug_vc8.map"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/samples-i386-win32-vc8-release/sample_debug.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\samples\debug.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/samples.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/samples.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/samples.dsp	(revision 1163)
@@ -0,0 +1,197 @@
+# Microsoft Developer Studio Project File - Name="samples" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) External Target" 0x0106
+
+CFG=samples - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "samples.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "samples.mak" CFG="samples - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "samples - Win32 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "samples - Win32 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+
+!IF  "$(CFG)" == "samples - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/samples-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir "./output/samples-i386-win32-vc6-release"
+# PROP BASE Cmd_Line "NMAKE /f samples.mak"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "samples.exe"
+# PROP BASE Bsc_Name "samples.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/samples-i386-win32-vc6-release"
+# PROP Intermediate_Dir "./output/samples-i386-win32-vc6-release"
+# PROP Cmd_Line "nmake /NOLOGO /S /f Samples-vc.mak BUILD_MODE=release VC_VER=6"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "All samples"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF  "$(CFG)" == "samples - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/samples-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir "./output/samples-i386-win32-vc6-debug"
+# PROP BASE Cmd_Line "NMAKE /f samples.mak"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "samples.exe"
+# PROP BASE Bsc_Name "samples.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/samples-i386-win32-vc6-debug"
+# PROP Intermediate_Dir "./output/samples-i386-win32-vc6-debug"
+# PROP Cmd_Line "nmake /NOLOGO /S /f Samples-vc.mak BUILD_MODE=debug VC_VER=6"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "All samples"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ENDIF 
+
+# Begin Target
+
+# Name "samples - Win32 Release"
+# Name "samples - Win32 Debug"
+
+!IF  "$(CFG)" == "samples - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "samples - Win32 Debug"
+
+!ENDIF 
+
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\src\samples\aectest.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\confbench.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\confsample.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\footprint.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\level.c
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\samples\pjsip-perf.c"
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\playfile.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\playsine.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\recfile.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\resampleplay.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\simple_pjsua.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\simpleua.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\siprtp.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\siprtp_report.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\sipstateless.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\sndinfo.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\sndtest.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\stateful_proxy.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\stateless_proxy.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\streamutil.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\tonegen.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\src\samples\proxy.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\samples\util.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=".\Samples-vc.mak"
+# End Source File
+# Begin Source File
+
+SOURCE=.\Samples.mak
+# End Source File
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/samples.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/samples.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/samples.vcproj	(revision 1163)
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="samples"
+	ProjectGUID="{3CE5B675-EF25-434E-8AC2-23F0D76D1719}"
+	RootNamespace="samples"
+	Keyword="MakeFileProj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="./output/samples-i386-win32-vc8-release"
+			IntermediateDirectory="./output/samples-i386-win32-vc8-release"
+			ConfigurationType="0"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCNMakeTool"
+				BuildCommandLine="nmake /NOLOGO /S /f Samples-vc.mak BUILD_MODE=release VC_VER=8"
+				ReBuildCommandLine="nmake /NOLOGO /S /f Samples-vc.mak BUILD_MODE=release VC_VER=8 /a"
+				CleanCommandLine="nmake /NOLOGO /S /f Samples-vc.mak BUILD_MODE=release VC_VER=8 clean"
+				Output="All samples"
+				PreprocessorDefinitions=""
+				IncludeSearchPath=""
+				ForcedIncludes=""
+				AssemblySearchPath=""
+				ForcedUsingAssemblies=""
+				CompileAsManaged=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="./output/samples-i386-win32-vc8-debug"
+			IntermediateDirectory="./output/samples-i386-win32-vc8-debug"
+			ConfigurationType="0"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			>
+			<Tool
+				Name="VCNMakeTool"
+				BuildCommandLine="nmake /NOLOGO /S /f Samples-vc.mak BUILD_MODE=debug VC_VER=8"
+				ReBuildCommandLine="nmake /NOLOGO /S /f Samples-vc.mak BUILD_MODE=debug VC_VER=8 /a"
+				CleanCommandLine="nmake /NOLOGO /S /f Samples-vc.mak BUILD_MODE=debug VC_VER=8 clean"
+				Output="All samples"
+				PreprocessorDefinitions=""
+				IncludeSearchPath=""
+				ForcedIncludes=""
+				AssemblySearchPath=""
+				ForcedUsingAssemblies=""
+				CompileAsManaged=""
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\samples\aectest.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\confbench.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\confsample.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\footprint.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\level.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\pjsip-perf.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\playfile.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\playsine.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\recfile.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\resampleplay.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\simple_pjsua.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\simpleua.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\siprtp.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\siprtp_report.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\sipstateless.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\sndinfo.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\sndtest.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\stateful_proxy.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\stateless_proxy.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\streamutil.c"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\tonegen.c"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\src\samples\proxy.h"
+				>
+			</File>
+			<File
+				RelativePath="..\src\samples\util.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+		<File
+			RelativePath="Samples-vc.mak"
+			>
+		</File>
+		<File
+			RelativePath="Samples.mak"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjsip-apps/build/wince-evc4/wince_demos.vcw
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/build/wince-evc4/wince_demos.vcw	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/build/wince-evc4/wince_demos.vcw	(revision 1163)
@@ -0,0 +1,185 @@
+Microsoft eMbedded Visual Tools Workspace File, Format Version 4.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "pjlib_util_wince"="..\..\..\pjlib-util\build\wince-evc4\pjlib_util_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib_wince"="..\..\..\pjlib\build\wince-evc4\pjlib_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjmedia_codec_wince"="..\..\..\pjmedia\build\wince-evc4\pjmedia_codec_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjmedia_wince"="..\..\..\pjmedia\build\wince-evc4\pjmedia_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjnath_wince"="..\..\..\pjnath\build\wince-evc4\pjnath_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsip_core_wince"="..\..\..\pjsip\build\wince-evc4\pjsip_core_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsip_simple_wince"="..\..\..\pjsip\build\wince-evc4\pjsip_simple_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsip_ua_wince"="..\..\..\pjsip\build\wince-evc4\pjsip_ua_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsua_lib_wince"="..\..\..\pjsip\build\wince-evc4\pjsua_lib_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util_wince
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_wince
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia_codec_wince
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia_wince
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_core_wince
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_simple_wince
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_ua_wince
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "pjsua_wince"="..\..\src\pjsua_wince\pjsua_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util_wince
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_wince
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia_codec_wince
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia_wince
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_core_wince
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_simple_wince
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_ua_wince
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsua_lib_wince
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjnath_wince
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua/main.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua/main.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua/main.c	(revision 1163)
@@ -0,0 +1,87 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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-lib/pjsua.h>
+
+#define THIS_FILE	"main.c"
+
+
+/*
+ * These are defined in pjsua.c.
+ */
+pj_status_t app_init(int argc, char *argv[]);
+pj_status_t app_main(void);
+pj_status_t app_destroy(void);
+
+
+#if defined(PJ_WIN32) && PJ_WIN32!=0
+#include <windows.h>
+
+static pj_thread_desc handler_desc;
+
+static BOOL WINAPI CtrlHandler(DWORD fdwCtrlType)
+{
+    pj_thread_t *thread;
+
+    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, &thread);
+	    PJ_LOG(3,(THIS_FILE, "Ctrl-C detected, quitting.."));
+            app_destroy();
+	    ExitProcess(1);
+            return TRUE; 
+ 
+        default: 
+ 
+            return FALSE; 
+    } 
+}
+
+static void setup_signal_handler(void)
+{
+    SetConsoleCtrlHandler(&CtrlHandler, TRUE);
+}
+
+#else
+
+static void setup_signal_handler(void)
+{
+}
+
+#endif
+
+int main(int argc, char *argv[])
+{
+    if (app_init(argc, argv) != PJ_SUCCESS)
+	return 1;
+
+    setup_signal_handler();
+
+    app_main();
+    app_destroy();
+
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua/main_rtems.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua/main_rtems.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua/main_rtems.c	(revision 1163)
@@ -0,0 +1,12 @@
+
+/* 
+ *  !! OIY OIY !!
+ *
+ *  The purpose of this file is only to get the executable linked. I haven't
+ *  actually tried to run this on RTEMS!!
+ *
+ */
+
+#include "../../pjlib/src/pjlib-test/main_rtems.c"
+
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua/pjsua_app.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua/pjsua_app.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua/pjsua_app.c	(revision 1163)
@@ -0,0 +1,3198 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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-lib/pjsua.h>
+
+
+#define THIS_FILE	"pjsua.c"
+#define NO_LIMIT	(int)0x7FFFFFFF
+
+//#define STEREO_DEMO
+
+/* Call specific data */
+struct call_data
+{
+    pj_timer_entry	    timer;
+};
+
+
+/* Pjsua application data */
+static struct app_config
+{
+    pjsua_config	    cfg;
+    pjsua_logging_config    log_cfg;
+    pjsua_media_config	    media_cfg;
+    pj_bool_t		    no_refersub;
+    pj_bool_t		    no_tcp;
+    pj_bool_t		    no_udp;
+    pj_bool_t		    use_tls;
+    pjsua_transport_config  udp_cfg;
+    pjsua_transport_config  rtp_cfg;
+
+    unsigned		    acc_cnt;
+    pjsua_acc_config	    acc_cfg[PJSUA_MAX_ACC];
+
+    unsigned		    buddy_cnt;
+    pjsua_buddy_config	    buddy_cfg[PJSUA_MAX_BUDDIES];
+
+    struct call_data	    call_data[PJSUA_MAX_CALLS];
+
+    pj_pool_t		   *pool;
+    /* Compatibility with older pjsua */
+
+    unsigned		    codec_cnt;
+    pj_str_t		    codec_arg[32];
+    pj_bool_t		    null_audio;
+    unsigned		    wav_count;
+    pj_str_t		    wav_files[32];
+    unsigned		    tone_count;
+    pjmedia_tone_desc	    tones[32];
+    pjsua_conf_port_id	    tone_slots[32];
+    pjsua_player_id	    wav_id;
+    pjsua_conf_port_id	    wav_port;
+    pj_bool_t		    auto_play;
+    pj_bool_t		    auto_loop;
+    pj_bool_t		    auto_conf;
+    pj_str_t		    rec_file;
+    pj_bool_t		    auto_rec;
+    pjsua_recorder_id	    rec_id;
+    pjsua_conf_port_id	    rec_port;
+    unsigned		    ptime;
+    unsigned		    auto_answer;
+    unsigned		    duration;
+
+#ifdef STEREO_DEMO
+    pjmedia_snd_port	   *snd;
+#endif
+
+    float		    mic_level,
+			    speaker_level;
+
+    int			    capture_dev, playback_dev;
+} app_config;
+
+
+//static pjsua_acc_id	current_acc;
+#define current_acc	pjsua_acc_get_default()
+static pjsua_call_id	current_call = PJSUA_INVALID_ID;
+static pj_str_t		uri_arg;
+
+#ifdef STEREO_DEMO
+static void stereo_demo();
+#endif
+
+/*****************************************************************************
+ * Configuration manipulation
+ */
+
+/* Show usage */
+static void usage(void)
+{
+    puts  ("Usage:");
+    puts  ("  pjsua [options] [SIP URL to call]");
+    puts  ("");
+    puts  ("General options:");
+    puts  ("  --config-file=file  Read the config/arguments from file.");
+    puts  ("  --help              Display this help screen");
+    puts  ("  --version           Display version info");
+    puts  ("");
+    puts  ("Logging options:");
+    puts  ("  --log-file=fname    Log to filename (default stderr)");
+    puts  ("  --log-level=N       Set log max level to N (0(none) to 6(trace)) (default=5)");
+    puts  ("  --app-log-level=N   Set log max level for stdout display (default=4)");
+    puts  ("");
+    puts  ("SIP Account options:");
+    puts  ("  --registrar=url     Set the URL of registrar server");
+    puts  ("  --id=url            Set the URL of local ID (used in From header)");
+    puts  ("  --contact=url       Optionally override the Contact information");
+    puts  ("  --proxy=url         Optional URL of proxy server to visit");
+    puts  ("                      May be specified multiple times");
+    puts  ("  --reg-timeout=SEC   Optional registration interval (default 55)");
+    puts  ("  --realm=string      Set realm");
+    puts  ("  --username=string   Set authentication username");
+    puts  ("  --password=string   Set authentication password");
+    puts  ("  --publish           Send presence PUBLISH for this account");
+    puts  ("  --next-cred         Add another credentials");
+    puts  ("");
+    puts  ("SIP Account Control:");
+    puts  ("  --next-account      Add more account");
+    puts  ("");
+    puts  ("Transport Options:");
+    puts  ("  --local-port=port   Set TCP/UDP port. This implicitly enables both ");
+    puts  ("                      TCP and UDP transports on the specified port, unless");
+    puts  ("                      if TCP or UDP is disabled.");
+    puts  ("  --ip-addr=IP        Use the specifed address as SIP and RTP addresses.");
+    puts  ("                      (Hint: the IP may be the public IP of the NAT/router)");
+    puts  ("  --no-tcp            Disable TCP transport.");
+    puts  ("  --no-udp            Disable UDP transport.");
+    puts  ("  --nameserver=NS     Add the specified nameserver to enable SRV resolution");
+    puts  ("                      This option can be specified multiple times.");
+    puts  ("  --outbound=url      Set the URL of global outbound proxy server");
+    puts  ("                      May be specified multiple times");
+    puts  ("  --stun-srv=name     Set STUN server host or domain");
+    puts  ("");
+    puts  ("TLS Options:");
+    puts  ("  --use-tls           Enable TLS transport (default=no)");
+    puts  ("  --tls-ca-file       Specify TLS CA file (default=none)");
+    puts  ("  --tls-cert-file     Specify TLS certificate file (default=none)");
+    puts  ("  --tls-privkey-file  Specify TLS private key file (default=none)");
+    puts  ("  --tls-password      Specify TLS password to private key file (default=none)");
+    puts  ("  --tls-verify-server Verify server's certificate (default=no)");
+    puts  ("  --tls-verify-client Verify client's certificate (default=no)");
+    puts  ("  --tls-neg-timeout   Specify TLS negotiation timeout (default=no)");
+
+    puts  ("");
+    puts  ("Media Options:");
+    puts  ("  --use-ice           Enable ICE (default:no)");
+    puts  ("  --add-codec=name    Manually add codec (default is to enable all)");
+    puts  ("  --clock-rate=N      Override sound device clock rate");
+    puts  ("  --null-audio        Use NULL audio device");
+    puts  ("  --play-file=file    Register WAV file in conference bridge.");
+    puts  ("                      This can be specified multiple times.");
+    puts  ("  --play-tone=FORMAT  Register tone to the conference bridge.");
+    puts  ("                      FORMAT is 'F1,F2,ON,OFF', where F1,F2 are");
+    puts  ("                      frequencies, and ON,OFF=on/off duration in msec.");
+    puts  ("                      This can be specified multiple times.");
+    puts  ("  --auto-play         Automatically play the file (to incoming calls only)");
+    puts  ("  --auto-loop         Automatically loop incoming RTP to outgoing RTP");
+    puts  ("  --auto-conf         Automatically put calls in conference with others");
+    puts  ("  --rec-file=file     Open file recorder (extension can be .wav or .mp3");
+    puts  ("  --auto-rec          Automatically record conversation");
+    puts  ("  --rtp-port=N        Base port to try for RTP (default=4000)");
+    puts  ("  --quality=N         Specify media quality (0-10, default=6)");
+    puts  ("  --ptime=MSEC        Override codec ptime to MSEC (default=specific)");
+    puts  ("  --no-vad            Disable VAD/silence detector (default=vad enabled)");
+    puts  ("  --ec-tail=MSEC      Set echo canceller tail length (default=256)");
+    puts  ("  --ilbc-mode=MODE    Set iLBC codec mode (20 or 30, default is 20)");
+    puts  ("  --rx-drop-pct=PCT   Drop PCT percent of RX RTP (for pkt lost sim, default: 0)");
+    puts  ("  --tx-drop-pct=PCT   Drop PCT percent of TX RTP (for pkt lost sim, default: 0)");
+    puts  ("  --capture-dev=id    Audio capture device ID (default=-1)");
+    puts  ("  --playback-dev=id   Audio playback device ID (default=-1)");
+
+
+    puts  ("");
+    puts  ("Buddy List (can be more than one):");
+    puts  ("  --add-buddy url     Add the specified URL to the buddy list.");
+    puts  ("");
+    puts  ("User Agent options:");
+    puts  ("  --auto-answer=code  Automatically answer incoming calls with code (e.g. 200)");
+    puts  ("  --max-calls=N       Maximum number of concurrent calls (default:4, max:255)");
+    puts  ("  --thread-cnt=N      Number of worker threads (default:1)");
+    puts  ("  --duration=SEC      Set maximum call duration (default:no limit)");
+    puts  ("  --norefersub        Suppress event subscription when transfering calls");
+
+    puts  ("");
+    puts  ("When URL is specified, pjsua will immediately initiate call to that URL");
+    puts  ("");
+
+    fflush(stdout);
+}
+
+
+/* Set default config. */
+static void default_config(struct app_config *cfg)
+{
+    char tmp[80];
+    unsigned i;
+
+    pjsua_config_default(&cfg->cfg);
+    pj_ansi_sprintf(tmp, "PJSUA v%s/%s", PJ_VERSION, PJ_OS_NAME);
+    pj_strdup2_with_null(app_config.pool, &cfg->cfg.user_agent, tmp);
+
+    pjsua_logging_config_default(&cfg->log_cfg);
+    pjsua_media_config_default(&cfg->media_cfg);
+    pjsua_transport_config_default(&cfg->udp_cfg);
+    cfg->udp_cfg.port = 5060;
+    pjsua_transport_config_default(&cfg->rtp_cfg);
+    cfg->rtp_cfg.port = 4000;
+    cfg->duration = NO_LIMIT;
+    cfg->wav_id = PJSUA_INVALID_ID;
+    cfg->rec_id = PJSUA_INVALID_ID;
+    cfg->wav_port = PJSUA_INVALID_ID;
+    cfg->rec_port = PJSUA_INVALID_ID;
+    cfg->mic_level = cfg->speaker_level = 1.0;
+    cfg->capture_dev = PJSUA_INVALID_ID;
+    cfg->playback_dev = PJSUA_INVALID_ID;
+
+    for (i=0; i<PJ_ARRAY_SIZE(cfg->acc_cfg); ++i)
+	pjsua_acc_config_default(&cfg->acc_cfg[i]);
+
+    for (i=0; i<PJ_ARRAY_SIZE(cfg->buddy_cfg); ++i)
+	pjsua_buddy_config_default(&cfg->buddy_cfg[i]);
+}
+
+
+/*
+ * Read command arguments from config file.
+ */
+static int read_config_file(pj_pool_t *pool, const char *filename, 
+			    int *app_argc, char ***app_argv)
+{
+    int i;
+    FILE *fhnd;
+    char line[200];
+    int argc = 0;
+    char **argv;
+    enum { MAX_ARGS = 64 };
+
+    /* Allocate MAX_ARGS+1 (argv needs to be terminated with NULL argument) */
+    argv = pj_pool_calloc(pool, MAX_ARGS+1, sizeof(char*));
+    argv[argc++] = *app_argv[0];
+
+    /* Open config file. */
+    fhnd = fopen(filename, "rt");
+    if (!fhnd) {
+	PJ_LOG(1,(THIS_FILE, "Unable to open config file %s", filename));
+	fflush(stdout);
+	return -1;
+    }
+
+    /* Scan tokens in the file. */
+    while (argc < MAX_ARGS && !feof(fhnd)) {
+	char *token, *p = line;
+
+	if (fgets(line, sizeof(line), fhnd) == NULL) break;
+
+	for (token = strtok(p, " \t\r\n"); argc < MAX_ARGS; 
+	     token = strtok(NULL, " \t\r\n"))
+	{
+	    int token_len;
+	    
+	    if (!token) break;
+	    if (*token == '#') break;
+
+	    token_len = strlen(token);
+	    if (!token_len)
+		continue;
+	    argv[argc] = pj_pool_alloc(pool, token_len+1);
+	    pj_memcpy(argv[argc], token, token_len+1);
+	    ++argc;
+	}
+    }
+
+    /* Copy arguments from command line */
+    for (i=1; i<*app_argc && argc < MAX_ARGS; ++i)
+	argv[argc++] = (*app_argv)[i];
+
+    if (argc == MAX_ARGS && (i!=*app_argc || !feof(fhnd))) {
+	PJ_LOG(1,(THIS_FILE, 
+		  "Too many arguments specified in cmd line/config file"));
+	fflush(stdout);
+	fclose(fhnd);
+	return -1;
+    }
+
+    fclose(fhnd);
+
+    /* Assign the new command line back to the original command line. */
+    *app_argc = argc;
+    *app_argv = argv;
+    return 0;
+
+}
+
+static int my_atoi(const char *cs)
+{
+    pj_str_t s;
+    return pj_strtoul(pj_cstr(&s, cs));
+}
+
+
+/* Parse arguments. */
+static pj_status_t parse_args(int argc, char *argv[],
+			      struct app_config *cfg,
+			      pj_str_t *uri_to_call)
+{
+    int c;
+    int option_index;
+    enum { OPT_CONFIG_FILE, OPT_LOG_FILE, OPT_LOG_LEVEL, OPT_APP_LOG_LEVEL, 
+	   OPT_HELP, OPT_VERSION, OPT_NULL_AUDIO, 
+	   OPT_LOCAL_PORT, OPT_IP_ADDR, OPT_PROXY, OPT_OUTBOUND_PROXY, 
+	   OPT_REGISTRAR, OPT_REG_TIMEOUT, OPT_PUBLISH, OPT_ID, OPT_CONTACT,
+	   OPT_REALM, OPT_USERNAME, OPT_PASSWORD,
+	   OPT_NAMESERVER, OPT_STUN_DOMAIN, OPT_STUN_SRV,
+	   OPT_ADD_BUDDY, OPT_OFFER_X_MS_MSG, OPT_NO_PRESENCE,
+	   OPT_AUTO_ANSWER, OPT_AUTO_HANGUP, OPT_AUTO_PLAY, OPT_AUTO_LOOP,
+	   OPT_AUTO_CONF, OPT_CLOCK_RATE, OPT_USE_ICE,
+	   OPT_PLAY_FILE, OPT_PLAY_TONE, OPT_RTP_PORT, OPT_ADD_CODEC, 
+	   OPT_ILBC_MODE, OPT_REC_FILE, OPT_AUTO_REC,
+	   OPT_COMPLEXITY, OPT_QUALITY, OPT_PTIME, OPT_NO_VAD,
+	   OPT_RX_DROP_PCT, OPT_TX_DROP_PCT, OPT_EC_TAIL,
+	   OPT_NEXT_ACCOUNT, OPT_NEXT_CRED, OPT_MAX_CALLS, 
+	   OPT_DURATION, OPT_NO_TCP, OPT_NO_UDP, OPT_THREAD_CNT,
+	   OPT_NOREFERSUB,
+	   OPT_USE_TLS, OPT_TLS_CA_FILE, OPT_TLS_CERT_FILE, OPT_TLS_PRIV_FILE,
+	   OPT_TLS_PASSWORD, OPT_TLS_VERIFY_SERVER, OPT_TLS_VERIFY_CLIENT,
+	   OPT_TLS_NEG_TIMEOUT,
+	   OPT_CAPTURE_DEV, OPT_PLAYBACK_DEV,
+    };
+    struct pj_getopt_option long_options[] = {
+	{ "config-file",1, 0, OPT_CONFIG_FILE},
+	{ "log-file",	1, 0, OPT_LOG_FILE},
+	{ "log-level",	1, 0, OPT_LOG_LEVEL},
+	{ "app-log-level",1,0,OPT_APP_LOG_LEVEL},
+	{ "help",	0, 0, OPT_HELP},
+	{ "version",	0, 0, OPT_VERSION},
+	{ "clock-rate",	1, 0, OPT_CLOCK_RATE},
+	{ "null-audio", 0, 0, OPT_NULL_AUDIO},
+	{ "local-port", 1, 0, OPT_LOCAL_PORT},
+	{ "ip-addr",	1, 0, OPT_IP_ADDR},
+	{ "no-tcp",     0, 0, OPT_NO_TCP},
+	{ "no-udp",     0, 0, OPT_NO_UDP},
+	{ "norefersub", 0, 0, OPT_NOREFERSUB},
+	{ "proxy",	1, 0, OPT_PROXY},
+	{ "outbound",	1, 0, OPT_OUTBOUND_PROXY},
+	{ "registrar",	1, 0, OPT_REGISTRAR},
+	{ "reg-timeout",1, 0, OPT_REG_TIMEOUT},
+	{ "publish",    0, 0, OPT_PUBLISH},
+	{ "id",		1, 0, OPT_ID},
+	{ "contact",	1, 0, OPT_CONTACT},
+	{ "realm",	1, 0, OPT_REALM},
+	{ "username",	1, 0, OPT_USERNAME},
+	{ "password",	1, 0, OPT_PASSWORD},
+	{ "nameserver", 1, 0, OPT_NAMESERVER},
+	{ "stun-domain",1, 0, OPT_STUN_DOMAIN},
+	{ "stun-srv",   1, 0, OPT_STUN_SRV},
+	{ "add-buddy",  1, 0, OPT_ADD_BUDDY},
+	{ "offer-x-ms-msg",0,0,OPT_OFFER_X_MS_MSG},
+	{ "no-presence", 0, 0, OPT_NO_PRESENCE},
+	{ "auto-answer",1, 0, OPT_AUTO_ANSWER},
+	{ "auto-hangup",1, 0, OPT_AUTO_HANGUP},
+	{ "auto-play",  0, 0, OPT_AUTO_PLAY},
+	{ "auto-rec",   0, 0, OPT_AUTO_REC},
+	{ "auto-loop",  0, 0, OPT_AUTO_LOOP},
+	{ "auto-conf",  0, 0, OPT_AUTO_CONF},
+	{ "play-file",  1, 0, OPT_PLAY_FILE},
+	{ "play-tone",  1, 0, OPT_PLAY_TONE},
+	{ "rec-file",   1, 0, OPT_REC_FILE},
+	{ "rtp-port",	1, 0, OPT_RTP_PORT},
+	{ "use-ice",    0, 0, OPT_USE_ICE},
+	{ "add-codec",  1, 0, OPT_ADD_CODEC},
+	{ "complexity",	1, 0, OPT_COMPLEXITY},
+	{ "quality",	1, 0, OPT_QUALITY},
+	{ "ptime",      1, 0, OPT_PTIME},
+	{ "no-vad",     0, 0, OPT_NO_VAD},
+	{ "ec-tail",    1, 0, OPT_EC_TAIL},
+	{ "ilbc-mode",	1, 0, OPT_ILBC_MODE},
+	{ "rx-drop-pct",1, 0, OPT_RX_DROP_PCT},
+	{ "tx-drop-pct",1, 0, OPT_TX_DROP_PCT},
+	{ "next-account",0,0, OPT_NEXT_ACCOUNT},
+	{ "next-cred",	0, 0, OPT_NEXT_CRED},
+	{ "max-calls",	1, 0, OPT_MAX_CALLS},
+	{ "duration",	1, 0, OPT_DURATION},
+	{ "thread-cnt",	1, 0, OPT_THREAD_CNT},
+	{ "use-tls",	0, 0, OPT_USE_TLS}, 
+	{ "tls-ca-file",1, 0, OPT_TLS_CA_FILE},
+	{ "tls-cert-file",1,0, OPT_TLS_CERT_FILE}, 
+	{ "tls-privkey-file",1,0, OPT_TLS_PRIV_FILE},
+	{ "tls-password",1,0, OPT_TLS_PASSWORD},
+	{ "tls-verify-server", 0, 0, OPT_TLS_VERIFY_SERVER},
+	{ "tls-verify-client", 0, 0, OPT_TLS_VERIFY_CLIENT},
+	{ "tls-neg-timeout", 1, 0, OPT_TLS_NEG_TIMEOUT},
+	{ "capture-dev",    1, 0, OPT_CAPTURE_DEV},
+	{ "playback-dev",   1, 0, OPT_PLAYBACK_DEV},
+	{ NULL, 0, 0, 0}
+    };
+    pj_status_t status;
+    pjsua_acc_config *cur_acc;
+    char *config_file = NULL;
+    unsigned i;
+
+    /* Run pj_getopt once to see if user specifies config file to read. */ 
+    pj_optind = 0;
+    while ((c=pj_getopt_long(argc, argv, "", long_options, 
+			     &option_index)) != -1) 
+    {
+	switch (c) {
+	case OPT_CONFIG_FILE:
+	    config_file = pj_optarg;
+	    break;
+	}
+	if (config_file)
+	    break;
+    }
+
+    if (config_file) {
+	status = read_config_file(app_config.pool, config_file, &argc, &argv);
+	if (status != 0)
+	    return status;
+    }
+
+    cfg->acc_cnt = 0;
+    cur_acc = &cfg->acc_cfg[0];
+
+
+    /* Reinitialize and re-run pj_getopt again, possibly with new arguments
+     * read from config file.
+     */
+    pj_optind = 0;
+    while((c=pj_getopt_long(argc,argv, "", long_options,&option_index))!=-1) {
+	pj_str_t tmp;
+	long lval;
+
+	switch (c) {
+
+	case OPT_CONFIG_FILE:
+	    /* Ignore as this has been processed before */
+	    break;
+	
+	case OPT_LOG_FILE:
+	    cfg->log_cfg.log_filename = pj_str(pj_optarg);
+	    break;
+
+	case OPT_LOG_LEVEL:
+	    c = pj_strtoul(pj_cstr(&tmp, pj_optarg));
+	    if (c < 0 || c > 6) {
+		PJ_LOG(1,(THIS_FILE, 
+			  "Error: expecting integer value 0-6 "
+			  "for --log-level"));
+		return PJ_EINVAL;
+	    }
+	    cfg->log_cfg.level = c;
+	    pj_log_set_level( c );
+	    break;
+
+	case OPT_APP_LOG_LEVEL:
+	    cfg->log_cfg.console_level = pj_strtoul(pj_cstr(&tmp, pj_optarg));
+	    if (cfg->log_cfg.console_level < 0 || cfg->log_cfg.console_level > 6) {
+		PJ_LOG(1,(THIS_FILE, 
+			  "Error: expecting integer value 0-6 "
+			  "for --app-log-level"));
+		return PJ_EINVAL;
+	    }
+	    break;
+
+	case OPT_HELP:
+	    usage();
+	    return PJ_EINVAL;
+
+	case OPT_VERSION:   /* version */
+	    pj_dump_config();
+	    return PJ_EINVAL;
+
+	case OPT_NULL_AUDIO:
+	    cfg->null_audio = PJ_TRUE;
+	    break;
+
+	case OPT_CLOCK_RATE:
+	    lval = pj_strtoul(pj_cstr(&tmp, pj_optarg));
+	    if (lval < 8000 || lval > 48000) {
+		PJ_LOG(1,(THIS_FILE, "Error: expecting value between "
+				     "8000-48000 for clock rate"));
+		return PJ_EINVAL;
+	    }
+	    cfg->media_cfg.clock_rate = lval; 
+	    break;
+
+	case OPT_LOCAL_PORT:   /* local-port */
+	    lval = pj_strtoul(pj_cstr(&tmp, pj_optarg));
+	    if (lval < 0 || lval > 65535) {
+		PJ_LOG(1,(THIS_FILE, 
+			  "Error: expecting integer value for "
+			  "--local-port"));
+		return PJ_EINVAL;
+	    }
+	    cfg->udp_cfg.port = (pj_uint16_t)lval;
+	    break;
+
+	case OPT_IP_ADDR: /* ip-addr */
+	    cfg->udp_cfg.public_addr = pj_str(pj_optarg);
+	    cfg->rtp_cfg.public_addr = pj_str(pj_optarg);
+	    break;
+
+	case OPT_NO_UDP: /* no-udp */
+	    if (cfg->no_tcp) {
+	      PJ_LOG(1,(THIS_FILE,"Error: can not disable both TCP and UDP"));
+	      return PJ_EINVAL;
+	    }
+
+	    cfg->no_udp = PJ_TRUE;
+	    break;
+
+	case OPT_NOREFERSUB: /* norefersub */
+	    cfg->no_refersub = PJ_TRUE;
+	    break;
+
+	case OPT_NO_TCP: /* no-tcp */
+	    if (cfg->no_udp) {
+	      PJ_LOG(1,(THIS_FILE,"Error: can not disable both TCP and UDP"));
+	      return PJ_EINVAL;
+	    }
+
+	    cfg->no_tcp = PJ_TRUE;
+	    break;
+
+	case OPT_PROXY:   /* proxy */
+	    if (pjsua_verify_sip_url(pj_optarg) != 0) {
+		PJ_LOG(1,(THIS_FILE, 
+			  "Error: invalid SIP URL '%s' "
+			  "in proxy argument", pj_optarg));
+		return PJ_EINVAL;
+	    }
+	    cur_acc->proxy[cur_acc->proxy_cnt++] = pj_str(pj_optarg);
+	    break;
+
+	case OPT_OUTBOUND_PROXY:   /* outbound proxy */
+	    if (pjsua_verify_sip_url(pj_optarg) != 0) {
+		PJ_LOG(1,(THIS_FILE, 
+			  "Error: invalid SIP URL '%s' "
+			  "in outbound proxy argument", pj_optarg));
+		return PJ_EINVAL;
+	    }
+	    cfg->cfg.outbound_proxy[cfg->cfg.outbound_proxy_cnt++] = pj_str(pj_optarg);
+	    break;
+
+	case OPT_REGISTRAR:   /* registrar */
+	    if (pjsua_verify_sip_url(pj_optarg) != 0) {
+		PJ_LOG(1,(THIS_FILE, 
+			  "Error: invalid SIP URL '%s' in "
+			  "registrar argument", pj_optarg));
+		return PJ_EINVAL;
+	    }
+	    cur_acc->reg_uri = pj_str(pj_optarg);
+	    break;
+
+	case OPT_REG_TIMEOUT:   /* reg-timeout */
+	    cur_acc->reg_timeout = pj_strtoul(pj_cstr(&tmp,pj_optarg));
+	    if (cur_acc->reg_timeout < 1 || cur_acc->reg_timeout > 3600) {
+		PJ_LOG(1,(THIS_FILE, 
+			  "Error: invalid value for --reg-timeout "
+			  "(expecting 1-3600)"));
+		return PJ_EINVAL;
+	    }
+	    break;
+
+	case OPT_PUBLISH:   /* publish */
+	    cur_acc->publish_enabled = PJ_TRUE;
+	    break;
+
+	case OPT_ID:   /* id */
+	    if (pjsua_verify_sip_url(pj_optarg) != 0) {
+		PJ_LOG(1,(THIS_FILE, 
+			  "Error: invalid SIP URL '%s' "
+			  "in local id argument", pj_optarg));
+		return PJ_EINVAL;
+	    }
+	    cur_acc->id = pj_str(pj_optarg);
+	    break;
+
+	case OPT_CONTACT:   /* contact */
+	    if (pjsua_verify_sip_url(pj_optarg) != 0) {
+		PJ_LOG(1,(THIS_FILE, 
+			  "Error: invalid SIP URL '%s' "
+			  "in contact argument", pj_optarg));
+		return PJ_EINVAL;
+	    }
+	    cur_acc->force_contact = pj_str(pj_optarg);
+	    break;
+
+	case OPT_NEXT_ACCOUNT: /* Add more account. */
+	    cfg->acc_cnt++;
+	    cur_acc = &cfg->acc_cfg[cfg->acc_cnt];
+	    break;
+
+	case OPT_USERNAME:   /* Default authentication user */
+	    cur_acc->cred_info[cur_acc->cred_count].username = pj_str(pj_optarg);
+	    cur_acc->cred_info[cur_acc->cred_count].scheme = pj_str("digest");
+	    break;
+
+	case OPT_REALM:	    /* Default authentication realm. */
+	    cur_acc->cred_info[cur_acc->cred_count].realm = pj_str(pj_optarg);
+	    break;
+
+	case OPT_PASSWORD:   /* authentication password */
+	    cur_acc->cred_info[cur_acc->cred_count].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
+	    cur_acc->cred_info[cur_acc->cred_count].data = pj_str(pj_optarg);
+	    break;
+
+	case OPT_NEXT_CRED: /* next credential */
+	    cur_acc->cred_count++;
+	    break;
+
+	case OPT_NAMESERVER: /* nameserver */
+	    cfg->cfg.nameserver[cfg->cfg.nameserver_count++] = pj_str(pj_optarg);
+	    if (cfg->cfg.nameserver_count > PJ_ARRAY_SIZE(cfg->cfg.nameserver)) {
+		PJ_LOG(1,(THIS_FILE, "Error: too many nameservers"));
+		return PJ_ETOOMANY;
+	    }
+	    break;
+
+	case OPT_STUN_DOMAIN:   /* STUN domain */
+	    cfg->cfg.stun_domain = pj_str(pj_optarg);
+	    break;
+
+	case OPT_STUN_SRV:   /* STUN server */
+	    cfg->cfg.stun_host = pj_str(pj_optarg);
+	    break;
+
+	case OPT_ADD_BUDDY: /* Add to buddy list. */
+	    if (pjsua_verify_sip_url(pj_optarg) != 0) {
+		PJ_LOG(1,(THIS_FILE, 
+			  "Error: invalid URL '%s' in "
+			  "--add-buddy option", pj_optarg));
+		return -1;
+	    }
+	    if (cfg->buddy_cnt == PJ_ARRAY_SIZE(cfg->buddy_cfg)) {
+		PJ_LOG(1,(THIS_FILE, 
+			  "Error: too many buddies in buddy list."));
+		return -1;
+	    }
+	    cfg->buddy_cfg[cfg->buddy_cnt].uri = pj_str(pj_optarg);
+	    cfg->buddy_cnt++;
+	    break;
+
+	case OPT_AUTO_PLAY:
+	    cfg->auto_play = 1;
+	    break;
+
+	case OPT_AUTO_REC:
+	    cfg->auto_rec = 1;
+	    break;
+
+	case OPT_AUTO_LOOP:
+	    cfg->auto_loop = 1;
+	    break;
+
+	case OPT_AUTO_CONF:
+	    cfg->auto_conf = 1;
+	    break;
+
+	case OPT_PLAY_FILE:
+	    cfg->wav_files[cfg->wav_count++] = pj_str(pj_optarg);
+	    break;
+
+	case OPT_PLAY_TONE:
+	    {
+		int f1, f2, on, off;
+		int n;
+
+		n = sscanf(pj_optarg, "%d,%d,%d,%d", &f1, &f2, &on, &off);
+		if (n != 4) {
+		    puts("Expecting f1,f2,on,off in --play-tone");
+		    return -1;
+		}
+
+		cfg->tones[cfg->tone_count].freq1 = (short)f1;
+		cfg->tones[cfg->tone_count].freq2 = (short)f2;
+		cfg->tones[cfg->tone_count].on_msec = (short)on;
+		cfg->tones[cfg->tone_count].off_msec = (short)off;
+		++cfg->tone_count;
+	    }
+	    break;
+
+	case OPT_REC_FILE:
+	    cfg->rec_file = pj_str(pj_optarg);
+	    break;
+
+	case OPT_USE_ICE:
+	    cfg->media_cfg.enable_ice = PJ_TRUE;
+	    break;
+
+	case OPT_RTP_PORT:
+	    cfg->rtp_cfg.port = my_atoi(pj_optarg);
+	    if (cfg->rtp_cfg.port < 1 || cfg->rtp_cfg.port > 65535) {
+		PJ_LOG(1,(THIS_FILE,
+			  "Error: rtp-port argument value "
+			  "(expecting 1-65535"));
+		return -1;
+	    }
+	    break;
+
+	case OPT_ADD_CODEC:
+	    cfg->codec_arg[cfg->codec_cnt++] = pj_str(pj_optarg);
+	    break;
+
+	/* These options were no longer valid after new pjsua */
+	/*
+	case OPT_COMPLEXITY:
+	    cfg->complexity = my_atoi(pj_optarg);
+	    if (cfg->complexity < 0 || cfg->complexity > 10) {
+		PJ_LOG(1,(THIS_FILE,
+			  "Error: invalid --complexity (expecting 0-10"));
+		return -1;
+	    }
+	    break;
+	*/
+
+	case OPT_DURATION:
+	    cfg->duration = my_atoi(pj_optarg);
+	    break;
+
+	case OPT_THREAD_CNT:
+	    cfg->cfg.thread_cnt = my_atoi(pj_optarg);
+	    if (cfg->cfg.thread_cnt > 128) {
+		PJ_LOG(1,(THIS_FILE,
+			  "Error: invalid --thread-cnt option"));
+		return -1;
+	    }
+	    break;
+
+	case OPT_PTIME:
+	    cfg->media_cfg.ptime = my_atoi(pj_optarg);
+	    if (cfg->media_cfg.ptime < 10 || cfg->media_cfg.ptime > 1000) {
+		PJ_LOG(1,(THIS_FILE,
+			  "Error: invalid --ptime option"));
+		return -1;
+	    }
+	    break;
+
+	case OPT_NO_VAD:
+	    cfg->media_cfg.no_vad = PJ_TRUE;
+	    break;
+
+	case OPT_EC_TAIL:
+	    cfg->media_cfg.ec_tail_len = my_atoi(pj_optarg);
+	    if (cfg->media_cfg.ec_tail_len > 1000) {
+		PJ_LOG(1,(THIS_FILE, "I think the ec-tail length setting "
+			  "is too big"));
+		return -1;
+	    }
+	    break;
+
+	case OPT_QUALITY:
+	    cfg->media_cfg.quality = my_atoi(pj_optarg);
+	    if (cfg->media_cfg.quality < 0 || cfg->media_cfg.quality > 10) {
+		PJ_LOG(1,(THIS_FILE,
+			  "Error: invalid --quality (expecting 0-10"));
+		return -1;
+	    }
+	    break;
+
+	case OPT_ILBC_MODE:
+	    cfg->media_cfg.ilbc_mode = my_atoi(pj_optarg);
+	    if (cfg->media_cfg.ilbc_mode!=20 && cfg->media_cfg.ilbc_mode!=30) {
+		PJ_LOG(1,(THIS_FILE,
+			  "Error: invalid --ilbc-mode (expecting 20 or 30"));
+		return -1;
+	    }
+	    break;
+
+	case OPT_RX_DROP_PCT:
+	    cfg->media_cfg.rx_drop_pct = my_atoi(pj_optarg);
+	    if (cfg->media_cfg.rx_drop_pct > 100) {
+		PJ_LOG(1,(THIS_FILE,
+			  "Error: invalid --rx-drop-pct (expecting <= 100"));
+		return -1;
+	    }
+	    break;
+	    
+	case OPT_TX_DROP_PCT:
+	    cfg->media_cfg.tx_drop_pct = my_atoi(pj_optarg);
+	    if (cfg->media_cfg.tx_drop_pct > 100) {
+		PJ_LOG(1,(THIS_FILE,
+			  "Error: invalid --tx-drop-pct (expecting <= 100"));
+		return -1;
+	    }
+	    break;
+
+	case OPT_AUTO_ANSWER:
+	    cfg->auto_answer = my_atoi(pj_optarg);
+	    if (cfg->auto_answer < 100 || cfg->auto_answer > 699) {
+		PJ_LOG(1,(THIS_FILE,
+			  "Error: invalid code in --auto-answer "
+			  "(expecting 100-699"));
+		return -1;
+	    }
+	    break;
+
+	case OPT_MAX_CALLS:
+	    cfg->cfg.max_calls = my_atoi(pj_optarg);
+	    if (cfg->cfg.max_calls < 1 || cfg->cfg.max_calls > PJSUA_MAX_CALLS) {
+		PJ_LOG(1,(THIS_FILE,"Error: maximum call setting exceeds "
+				    "compile time limit (PJSUA_MAX_CALLS=%d)",
+			  PJSUA_MAX_CALLS));
+		return -1;
+	    }
+	    break;
+
+	case OPT_USE_TLS:
+	    cfg->use_tls = PJ_TRUE;
+#if !defined(PJSIP_HAS_TLS_TRANSPORT) || PJSIP_HAS_TLS_TRANSPORT==0
+	    PJ_LOG(1,(THIS_FILE, "Error: TLS support is not configured"));
+	    return -1;
+#endif
+	    break;
+	    
+	case OPT_TLS_CA_FILE:
+	    cfg->udp_cfg.tls_setting.ca_list_file = pj_str(pj_optarg);
+#if !defined(PJSIP_HAS_TLS_TRANSPORT) || PJSIP_HAS_TLS_TRANSPORT==0
+	    PJ_LOG(1,(THIS_FILE, "Error: TLS support is not configured"));
+	    return -1;
+#endif
+	    break;
+	    
+	case OPT_TLS_CERT_FILE:
+	    cfg->udp_cfg.tls_setting.cert_file = pj_str(pj_optarg);
+#if !defined(PJSIP_HAS_TLS_TRANSPORT) || PJSIP_HAS_TLS_TRANSPORT==0
+	    PJ_LOG(1,(THIS_FILE, "Error: TLS support is not configured"));
+	    return -1;
+#endif
+	    break;
+	    
+	case OPT_TLS_PRIV_FILE:
+	    cfg->udp_cfg.tls_setting.privkey_file = pj_str(pj_optarg);
+	    break;
+
+	case OPT_TLS_PASSWORD:
+	    cfg->udp_cfg.tls_setting.password = pj_str(pj_optarg);
+#if !defined(PJSIP_HAS_TLS_TRANSPORT) || PJSIP_HAS_TLS_TRANSPORT==0
+	    PJ_LOG(1,(THIS_FILE, "Error: TLS support is not configured"));
+	    return -1;
+#endif
+	    break;
+
+	case OPT_TLS_VERIFY_SERVER:
+	    cfg->udp_cfg.tls_setting.verify_server = PJ_TRUE;
+	    break;
+
+	case OPT_TLS_VERIFY_CLIENT:
+	    cfg->udp_cfg.tls_setting.verify_client = PJ_TRUE;
+	    break;
+
+	case OPT_TLS_NEG_TIMEOUT:
+	    cfg->udp_cfg.tls_setting.timeout.sec = atoi(pj_optarg);
+	    break;
+
+	case OPT_CAPTURE_DEV:
+	    cfg->capture_dev = atoi(pj_optarg);
+	    break;
+
+	case OPT_PLAYBACK_DEV:
+	    cfg->playback_dev = atoi(pj_optarg);
+	    break;
+
+	default:
+	    PJ_LOG(1,(THIS_FILE, 
+		      "Argument \"%s\" is not valid. Use --help to see help",
+		      argv[pj_optind]));
+	    return -1;
+	}
+    }
+
+    if (pj_optind != argc) {
+	pj_str_t uri_arg;
+
+	if (pjsua_verify_sip_url(argv[pj_optind]) != PJ_SUCCESS) {
+	    PJ_LOG(1,(THIS_FILE, "Invalid SIP URI %s", argv[pj_optind]));
+	    return -1;
+	}
+	uri_arg = pj_str(argv[pj_optind]);
+	if (uri_to_call)
+	    *uri_to_call = uri_arg;
+	pj_optind++;
+
+	/* Add URI to call to buddy list if it's not already there */
+	for (i=0; i<cfg->buddy_cnt; ++i) {
+	    if (pj_stricmp(&cfg->buddy_cfg[i].uri, &uri_arg)==0)
+		break;
+	}
+	if (i == cfg->buddy_cnt && cfg->buddy_cnt < PJSUA_MAX_BUDDIES) {
+	    cfg->buddy_cfg[cfg->buddy_cnt++].uri = uri_arg;
+	}
+
+    } else {
+	if (uri_to_call)
+	    uri_to_call->slen = 0;
+    }
+
+    if (pj_optind != argc) {
+	PJ_LOG(1,(THIS_FILE, "Error: unknown options %s", argv[pj_optind]));
+	return PJ_EINVAL;
+    }
+
+    if (cfg->acc_cfg[cfg->acc_cnt].id.slen)
+	cfg->acc_cnt++;
+
+    for (i=0; i<cfg->acc_cnt; ++i) {
+	if (cfg->acc_cfg[i].cred_info[cfg->acc_cfg[i].cred_count].username.slen)
+	{
+	    cfg->acc_cfg[i].cred_count++;
+	}
+    }
+
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Save account settings
+ */
+static void write_account_settings(int acc_index, pj_str_t *result)
+{
+    unsigned i;
+    char line[128];
+    pjsua_acc_config *acc_cfg = &app_config.acc_cfg[acc_index];
+
+    
+    pj_ansi_sprintf(line, "\n#\n# Account %d:\n#\n", acc_index);
+    pj_strcat2(result, line);
+
+
+    /* Identity */
+    if (acc_cfg->id.slen) {
+	pj_ansi_sprintf(line, "--id %.*s\n", 
+			(int)acc_cfg->id.slen, 
+			acc_cfg->id.ptr);
+	pj_strcat2(result, line);
+    }
+
+    /* Registrar server */
+    if (acc_cfg->reg_uri.slen) {
+	pj_ansi_sprintf(line, "--registrar %.*s\n",
+			      (int)acc_cfg->reg_uri.slen,
+			      acc_cfg->reg_uri.ptr);
+	pj_strcat2(result, line);
+
+	pj_ansi_sprintf(line, "--reg-timeout %u\n",
+			      acc_cfg->reg_timeout);
+	pj_strcat2(result, line);
+    }
+
+    /* Contact */
+    if (acc_cfg->force_contact.slen) {
+	pj_ansi_sprintf(line, "--contact %.*s\n", 
+			(int)acc_cfg->force_contact.slen, 
+			acc_cfg->force_contact.ptr);
+	pj_strcat2(result, line);
+    }
+
+    /* Proxy */
+    for (i=0; i<acc_cfg->proxy_cnt; ++i) {
+	pj_ansi_sprintf(line, "--proxy %.*s\n",
+			      (int)acc_cfg->proxy[i].slen,
+			      acc_cfg->proxy[i].ptr);
+	pj_strcat2(result, line);
+    }
+
+    /* Credentials */
+    for (i=0; i<acc_cfg->cred_count; ++i) {
+	if (acc_cfg->cred_info[i].realm.slen) {
+	    pj_ansi_sprintf(line, "--realm %.*s\n",
+				  (int)acc_cfg->cred_info[i].realm.slen,
+				  acc_cfg->cred_info[i].realm.ptr);
+	    pj_strcat2(result, line);
+	}
+
+	if (acc_cfg->cred_info[i].username.slen) {
+	    pj_ansi_sprintf(line, "--username %.*s\n",
+				  (int)acc_cfg->cred_info[i].username.slen,
+				  acc_cfg->cred_info[i].username.ptr);
+	    pj_strcat2(result, line);
+	}
+
+	if (acc_cfg->cred_info[i].data.slen) {
+	    pj_ansi_sprintf(line, "--password %.*s\n",
+				  (int)acc_cfg->cred_info[i].data.slen,
+				  acc_cfg->cred_info[i].data.ptr);
+	    pj_strcat2(result, line);
+	}
+
+	if (i != acc_cfg->cred_count - 1)
+	    pj_strcat2(result, "--next-cred\n");
+    }
+
+}
+
+
+/*
+ * Write settings.
+ */
+static int write_settings(const struct app_config *config,
+			  char *buf, pj_size_t max)
+{
+    unsigned acc_index;
+    unsigned i;
+    pj_str_t cfg;
+    char line[128];
+
+    PJ_UNUSED_ARG(max);
+
+    cfg.ptr = buf;
+    cfg.slen = 0;
+
+    /* Logging. */
+    pj_strcat2(&cfg, "#\n# Logging options:\n#\n");
+    pj_ansi_sprintf(line, "--log-level %d\n",
+		    config->log_cfg.level);
+    pj_strcat2(&cfg, line);
+
+    pj_ansi_sprintf(line, "--app-log-level %d\n",
+		    config->log_cfg.console_level);
+    pj_strcat2(&cfg, line);
+
+    if (config->log_cfg.log_filename.slen) {
+	pj_ansi_sprintf(line, "--log-file %.*s\n",
+			(int)config->log_cfg.log_filename.slen,
+			config->log_cfg.log_filename.ptr);
+	pj_strcat2(&cfg, line);
+    }
+
+
+    /* Save account settings. */
+    for (acc_index=0; acc_index < config->acc_cnt; ++acc_index) {
+	
+	write_account_settings(acc_index, &cfg);
+
+	if (acc_index < config->acc_cnt-1)
+	    pj_strcat2(&cfg, "--next-account\n");
+    }
+
+
+    pj_strcat2(&cfg, "\n#\n# Network settings:\n#\n");
+
+    /* Outbound proxy */
+    for (i=0; i<config->cfg.outbound_proxy_cnt; ++i) {
+	pj_ansi_sprintf(line, "--outbound %.*s\n",
+			      (int)config->cfg.outbound_proxy[i].slen,
+			      config->cfg.outbound_proxy[i].ptr);
+	pj_strcat2(&cfg, line);
+    }
+
+
+    /* UDP Transport. */
+    pj_ansi_sprintf(line, "--local-port %d\n", config->udp_cfg.port);
+    pj_strcat2(&cfg, line);
+
+    /* IP address, if any. */
+    if (config->udp_cfg.public_addr.slen) {
+	pj_ansi_sprintf(line, "--ip-addr %.*s\n", 
+			(int)config->udp_cfg.public_addr.slen,
+			config->udp_cfg.public_addr.ptr);
+	pj_strcat2(&cfg, line);
+    }
+
+    /* No TCP ? */
+    if (config->no_tcp) {
+	pj_strcat2(&cfg, "--no-tcp\n");
+    }
+
+    /* No UDP ? */
+    if (config->no_udp) {
+	pj_strcat2(&cfg, "--no-udp\n");
+    }
+
+    /* STUN */
+    if (config->cfg.stun_domain.slen) {
+	pj_ansi_sprintf(line, "--stun-domain %.*s\n",
+			(int)config->cfg.stun_domain.slen, 
+			config->cfg.stun_domain.ptr);
+	pj_strcat2(&cfg, line);
+    }
+    if (config->cfg.stun_host.slen) {
+	pj_ansi_sprintf(line, "--stun-srv %.*s\n",
+			(int)config->cfg.stun_host.slen, 
+			config->cfg.stun_host.ptr);
+	pj_strcat2(&cfg, line);
+    }
+
+
+    /* TLS */
+    if (config->use_tls)
+	pj_strcat2(&cfg, "--use-tls\n");
+    if (config->udp_cfg.tls_setting.ca_list_file.slen) {
+	pj_ansi_sprintf(line, "--tls-ca-file %.*s\n",
+			(int)config->udp_cfg.tls_setting.ca_list_file.slen, 
+			config->udp_cfg.tls_setting.ca_list_file.ptr);
+	pj_strcat2(&cfg, line);
+    }
+    if (config->udp_cfg.tls_setting.cert_file.slen) {
+	pj_ansi_sprintf(line, "--tls-cert-file %.*s\n",
+			(int)config->udp_cfg.tls_setting.cert_file.slen, 
+			config->udp_cfg.tls_setting.cert_file.ptr);
+	pj_strcat2(&cfg, line);
+    }
+    if (config->udp_cfg.tls_setting.privkey_file.slen) {
+	pj_ansi_sprintf(line, "--tls-privkey-file %.*s\n",
+			(int)config->udp_cfg.tls_setting.privkey_file.slen, 
+			config->udp_cfg.tls_setting.privkey_file.ptr);
+	pj_strcat2(&cfg, line);
+    }
+
+    if (config->udp_cfg.tls_setting.password.slen) {
+	pj_ansi_sprintf(line, "--tls-password %.*s\n",
+			(int)config->udp_cfg.tls_setting.password.slen, 
+			config->udp_cfg.tls_setting.password.ptr);
+	pj_strcat2(&cfg, line);
+    }
+
+    if (config->udp_cfg.tls_setting.verify_server)
+	pj_strcat2(&cfg, "--tls-verify-server\n");
+
+    if (config->udp_cfg.tls_setting.verify_client)
+	pj_strcat2(&cfg, "--tls-verify-client\n");
+
+    if (config->udp_cfg.tls_setting.timeout.sec) {
+	pj_ansi_sprintf(line, "--tls-neg-timeout %d\n",
+			(int)config->udp_cfg.tls_setting.timeout.sec);
+	pj_strcat2(&cfg, line);
+    }
+
+    pj_strcat2(&cfg, "\n#\n# Media settings:\n#\n");
+
+
+    /* Media */
+    if (config->media_cfg.enable_ice)
+	pj_strcat2(&cfg, "--use-ice\n");
+    if (config->null_audio)
+	pj_strcat2(&cfg, "--null-audio\n");
+    if (config->auto_play)
+	pj_strcat2(&cfg, "--auto-play\n");
+    if (config->auto_loop)
+	pj_strcat2(&cfg, "--auto-loop\n");
+    if (config->auto_conf)
+	pj_strcat2(&cfg, "--auto-conf\n");
+    for (i=0; i<config->wav_count; ++i) {
+	pj_ansi_sprintf(line, "--play-file %s\n",
+			config->wav_files[i].ptr);
+	pj_strcat2(&cfg, line);
+    }
+    for (i=0; i<config->tone_count; ++i) {
+	pj_ansi_sprintf(line, "--play-tone %d,%d,%d,%d\n",
+			config->tones[i].freq1, config->tones[i].freq2, 
+			config->tones[i].on_msec, config->tones[i].off_msec);
+	pj_strcat2(&cfg, line);
+    }
+    if (config->rec_file.slen) {
+	pj_ansi_sprintf(line, "--rec-file %s\n",
+			config->rec_file.ptr);
+	pj_strcat2(&cfg, line);
+    }
+    if (config->auto_rec)
+	pj_strcat2(&cfg, "--auto-rec\n");
+    if (config->capture_dev != PJSUA_INVALID_ID) {
+	pj_ansi_sprintf(line, "--capture-dev %d\n", config->capture_dev);
+	pj_strcat2(&cfg, line);
+    }
+    if (config->playback_dev != PJSUA_INVALID_ID) {
+	pj_ansi_sprintf(line, "--playback-dev %d\n", config->playback_dev);
+	pj_strcat2(&cfg, line);
+    }
+
+    /* Media clock rate. */
+    if (config->media_cfg.clock_rate != PJSUA_DEFAULT_CLOCK_RATE) {
+	pj_ansi_sprintf(line, "--clock-rate %d\n",
+			config->media_cfg.clock_rate);
+	pj_strcat2(&cfg, line);
+    } else {
+	pj_ansi_sprintf(line, "#using default --clock-rate %d\n",
+			config->media_cfg.clock_rate);
+	pj_strcat2(&cfg, line);
+    }
+
+    /* quality */
+    if (config->media_cfg.quality != PJSUA_DEFAULT_CODEC_QUALITY) {
+	pj_ansi_sprintf(line, "--quality %d\n",
+			config->media_cfg.quality);
+	pj_strcat2(&cfg, line);
+    } else {
+	pj_ansi_sprintf(line, "#using default --quality %d\n",
+			config->media_cfg.quality);
+	pj_strcat2(&cfg, line);
+    }
+
+
+    /* ptime */
+    if (config->ptime) {
+	pj_ansi_sprintf(line, "--ptime %d\n",
+			config->ptime);
+	pj_strcat2(&cfg, line);
+    }
+
+    /* no-vad */
+    if (config->media_cfg.no_vad) {
+	pj_strcat2(&cfg, "--no-vad\n");
+    }
+
+    /* ec-tail */
+    if (config->media_cfg.ec_tail_len != PJSUA_DEFAULT_EC_TAIL_LEN) {
+	pj_ansi_sprintf(line, "--ec-tail %d\n",
+			config->media_cfg.ec_tail_len);
+	pj_strcat2(&cfg, line);
+    } else {
+	pj_ansi_sprintf(line, "#using default --ec-tail %d\n",
+			config->media_cfg.ec_tail_len);
+	pj_strcat2(&cfg, line);
+    }
+
+
+    /* ilbc-mode */
+    if (config->media_cfg.ilbc_mode != PJSUA_DEFAULT_ILBC_MODE) {
+	pj_ansi_sprintf(line, "--ilbc-mode %d\n",
+			config->media_cfg.ilbc_mode);
+	pj_strcat2(&cfg, line);
+    } else {
+	pj_ansi_sprintf(line, "#using default --ilbc-mode %d\n",
+			config->media_cfg.ilbc_mode);
+	pj_strcat2(&cfg, line);
+    }
+
+    /* RTP drop */
+    if (config->media_cfg.tx_drop_pct) {
+	pj_ansi_sprintf(line, "--tx-drop-pct %d\n",
+			config->media_cfg.tx_drop_pct);
+	pj_strcat2(&cfg, line);
+
+    }
+    if (config->media_cfg.rx_drop_pct) {
+	pj_ansi_sprintf(line, "--rx-drop-pct %d\n",
+			config->media_cfg.rx_drop_pct);
+	pj_strcat2(&cfg, line);
+
+    }
+
+
+    /* Start RTP port. */
+    pj_ansi_sprintf(line, "--rtp-port %d\n",
+		    config->rtp_cfg.port);
+    pj_strcat2(&cfg, line);
+
+    /* Add codec. */
+    for (i=0; i<config->codec_cnt; ++i) {
+	pj_ansi_sprintf(line, "--add-codec %s\n",
+		    config->codec_arg[i].ptr);
+	pj_strcat2(&cfg, line);
+    }
+
+    pj_strcat2(&cfg, "\n#\n# User agent:\n#\n");
+
+    /* Auto-answer. */
+    if (config->auto_answer != 0) {
+	pj_ansi_sprintf(line, "--auto-answer %d\n",
+			config->auto_answer);
+	pj_strcat2(&cfg, line);
+    }
+
+    /* Max calls. */
+    pj_ansi_sprintf(line, "--max-calls %d\n",
+		    config->cfg.max_calls);
+    pj_strcat2(&cfg, line);
+
+    /* Uas-duration. */
+    if (config->duration != NO_LIMIT) {
+	pj_ansi_sprintf(line, "--duration %d\n",
+			config->duration);
+	pj_strcat2(&cfg, line);
+    }
+
+    /* norefersub ? */
+    if (config->no_refersub) {
+	pj_strcat2(&cfg, "--norefersub\n");
+    }
+
+
+    pj_strcat2(&cfg, "\n#\n# Buddies:\n#\n");
+
+    /* Add buddies. */
+    for (i=0; i<config->buddy_cnt; ++i) {
+	pj_ansi_sprintf(line, "--add-buddy %.*s\n",
+			      (int)config->buddy_cfg[i].uri.slen,
+			      config->buddy_cfg[i].uri.ptr);
+	pj_strcat2(&cfg, line);
+    }
+
+
+    *(cfg.ptr + cfg.slen) = '\0';
+    return cfg.slen;
+}
+
+
+/*
+ * Dump application states.
+ */
+static void app_dump(pj_bool_t detail)
+{
+    pjsua_dump(detail);
+}
+
+
+/*****************************************************************************
+ * Console application
+ */
+
+/*
+ * Find next call when current call is disconnected or when user
+ * press ']'
+ */
+static pj_bool_t find_next_call(void)
+{
+    int i, max;
+
+    max = pjsua_call_get_max_count();
+    for (i=current_call+1; i<max; ++i) {
+	if (pjsua_call_is_active(i)) {
+	    current_call = i;
+	    return PJ_TRUE;
+	}
+    }
+
+    for (i=0; i<current_call; ++i) {
+	if (pjsua_call_is_active(i)) {
+	    current_call = i;
+	    return PJ_TRUE;
+	}
+    }
+
+    current_call = PJSUA_INVALID_ID;
+    return PJ_FALSE;
+}
+
+
+/*
+ * Find previous call when user press '['
+ */
+static pj_bool_t find_prev_call(void)
+{
+    int i, max;
+
+    max = pjsua_call_get_max_count();
+    for (i=current_call-1; i>=0; --i) {
+	if (pjsua_call_is_active(i)) {
+	    current_call = i;
+	    return PJ_TRUE;
+	}
+    }
+
+    for (i=max-1; i>current_call; --i) {
+	if (pjsua_call_is_active(i)) {
+	    current_call = i;
+	    return PJ_TRUE;
+	}
+    }
+
+    current_call = PJSUA_INVALID_ID;
+    return PJ_FALSE;
+}
+
+
+/* Callback from timer when the maximum call duration has been
+ * exceeded.
+ */
+static void call_timeout_callback(pj_timer_heap_t *timer_heap,
+				  struct pj_timer_entry *entry)
+{
+    pjsua_call_id call_id = entry->id;
+    pjsua_msg_data msg_data;
+    pjsip_generic_string_hdr warn;
+    pj_str_t hname = pj_str("Warning");
+    pj_str_t hvalue = pj_str("399 pjsua \"Call duration exceeded\"");
+
+    PJ_UNUSED_ARG(timer_heap);
+
+    if (call_id == PJSUA_INVALID_ID) {
+	PJ_LOG(1,(THIS_FILE, "Invalid call ID in timer callback"));
+	return;
+    }
+    
+    /* Add warning header */
+    pjsua_msg_data_init(&msg_data);
+    pjsip_generic_string_hdr_init2(&warn, &hname, &hvalue);
+    pj_list_push_back(&msg_data.hdr_list, &warn);
+
+    /* Call duration has been exceeded; disconnect the call */
+    PJ_LOG(3,(THIS_FILE, "Duration (%d seconds) has been exceeded "
+			 "for call %d, disconnecting the call",
+			 app_config.duration, call_id));
+    entry->id = PJSUA_INVALID_ID;
+    pjsua_call_hangup(call_id, 200, NULL, &msg_data);
+}
+
+
+/*
+ * Handler when invite state has changed.
+ */
+static void on_call_state(pjsua_call_id call_id, pjsip_event *e)
+{
+    pjsua_call_info call_info;
+
+    PJ_UNUSED_ARG(e);
+
+    pjsua_call_get_info(call_id, &call_info);
+
+    if (call_info.state == PJSIP_INV_STATE_DISCONNECTED) {
+
+	/* Cancel duration timer, if any */
+	if (app_config.call_data[call_id].timer.id != PJSUA_INVALID_ID) {
+	    struct call_data *cd = &app_config.call_data[call_id];
+	    pjsip_endpoint *endpt = pjsua_get_pjsip_endpt();
+
+	    cd->timer.id = PJSUA_INVALID_ID;
+	    pjsip_endpt_cancel_timer(endpt, &cd->timer);
+	}
+
+	PJ_LOG(3,(THIS_FILE, "Call %d is DISCONNECTED [reason=%d (%s)]", 
+		  call_id,
+		  call_info.last_status,
+		  call_info.last_status_text.ptr));
+
+	if (call_id == current_call) {
+	    find_next_call();
+	}
+
+	/* Dump media state upon disconnected */
+	if (1) {
+	    char buf[1024];
+	    pjsua_call_dump(call_id, PJ_TRUE, buf, 
+			    sizeof(buf), "  ");
+	    PJ_LOG(5,(THIS_FILE, 
+		      "Call %d disconnected, dumping media stats\n%s", 
+		      call_id, buf));
+	}
+
+    } else {
+
+	if (app_config.duration!=NO_LIMIT && 
+	    call_info.state == PJSIP_INV_STATE_CONFIRMED) 
+	{
+	    /* Schedule timer to hangup call after the specified duration */
+	    struct call_data *cd = &app_config.call_data[call_id];
+	    pjsip_endpoint *endpt = pjsua_get_pjsip_endpt();
+	    pj_time_val delay;
+
+	    cd->timer.id = call_id;
+	    delay.sec = app_config.duration;
+	    delay.msec = 0;
+	    pjsip_endpt_schedule_timer(endpt, &cd->timer, &delay);
+	}
+
+	if (call_info.state == PJSIP_INV_STATE_EARLY) {
+	    int code;
+	    pj_str_t reason;
+	    pjsip_msg *msg;
+
+	    /* This can only occur because of TX or RX message */
+	    pj_assert(e->type == PJSIP_EVENT_TSX_STATE);
+
+	    if (e->body.tsx_state.type == PJSIP_EVENT_RX_MSG) {
+		msg = e->body.tsx_state.src.rdata->msg_info.msg;
+	    } else {
+		msg = e->body.tsx_state.src.tdata->msg;
+	    }
+
+	    code = msg->line.status.code;
+	    reason = msg->line.status.reason;
+
+	    PJ_LOG(3,(THIS_FILE, "Call %d state changed to %s (%d %.*s)", 
+		      call_id, call_info.state_text.ptr,
+		      code, (int)reason.slen, reason.ptr));
+	} else {
+	    PJ_LOG(3,(THIS_FILE, "Call %d state changed to %s", 
+		      call_id,
+		      call_info.state_text.ptr));
+	}
+
+	if (current_call==PJSUA_INVALID_ID)
+	    current_call = call_id;
+
+    }
+}
+
+
+/**
+ * Handler when there is incoming call.
+ */
+static void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id,
+			     pjsip_rx_data *rdata)
+{
+    pjsua_call_info call_info;
+
+    PJ_UNUSED_ARG(acc_id);
+    PJ_UNUSED_ARG(rdata);
+
+    pjsua_call_get_info(call_id, &call_info);
+
+    if (app_config.auto_answer > 0) {
+	pjsua_call_answer(call_id, app_config.auto_answer, NULL, NULL);
+    }
+
+    if (app_config.auto_answer < 200) {
+	PJ_LOG(3,(THIS_FILE,
+		  "Incoming call for account %d!\n"
+		  "From: %s\n"
+		  "To: %s\n"
+		  "Press a to answer or h to reject call",
+		  acc_id,
+		  call_info.remote_info.ptr,
+		  call_info.local_info.ptr));
+    }
+}
+
+
+/*
+ * Callback on media state changed event.
+ * The action may connect the call to sound device, to file, or
+ * to loop the call.
+ */
+static void on_call_media_state(pjsua_call_id call_id)
+{
+    pjsua_call_info call_info;
+
+    pjsua_call_get_info(call_id, &call_info);
+
+    if (call_info.media_status == PJSUA_CALL_MEDIA_ACTIVE) {
+	pj_bool_t connect_sound = PJ_TRUE;
+
+	/* Loopback sound, if desired */
+	if (app_config.auto_loop) {
+	    pjsua_conf_connect(call_info.conf_slot, call_info.conf_slot);
+	    connect_sound = PJ_FALSE;
+
+	    /* Automatically record conversation, if desired */
+	    if (app_config.auto_rec && app_config.rec_port != PJSUA_INVALID_ID) {
+		pjsua_conf_connect(call_info.conf_slot, app_config.rec_port);
+	    }
+	}
+
+	/* Stream a file, if desired */
+	if (app_config.auto_play && app_config.wav_port != PJSUA_INVALID_ID) {
+	    pjsua_conf_connect(app_config.wav_port, call_info.conf_slot);
+	    connect_sound = PJ_FALSE;
+	}
+
+	/* Put call in conference with other calls, if desired */
+	if (app_config.auto_conf) {
+	    pjsua_call_id call_ids[PJSUA_MAX_CALLS];
+	    unsigned call_cnt=PJ_ARRAY_SIZE(call_ids);
+	    unsigned i;
+
+	    /* Get all calls, and establish media connection between
+	     * this call and other calls.
+	     */
+	    pjsua_enum_calls(call_ids, &call_cnt);
+
+	    for (i=0; i<call_cnt; ++i) {
+		if (call_ids[i] == call_id)
+		    continue;
+		
+		if (!pjsua_call_has_media(call_ids[i]))
+		    continue;
+
+		pjsua_conf_connect(call_info.conf_slot,
+				   pjsua_call_get_conf_port(call_ids[i]));
+		pjsua_conf_connect(pjsua_call_get_conf_port(call_ids[i]),
+				   call_info.conf_slot);
+
+		/* Automatically record conversation, if desired */
+		if (app_config.auto_rec && app_config.rec_port != PJSUA_INVALID_ID) {
+		    pjsua_conf_connect(pjsua_call_get_conf_port(call_ids[i]), 
+				       app_config.rec_port);
+		}
+
+	    }
+
+	    /* Also connect call to local sound device */
+	    connect_sound = PJ_TRUE;
+	}
+
+	/* Otherwise connect to sound device */
+	if (connect_sound) {
+	    pjsua_conf_connect(call_info.conf_slot, 0);
+	    pjsua_conf_connect(0, call_info.conf_slot);
+
+	    /* Automatically record conversation, if desired */
+	    if (app_config.auto_rec && app_config.rec_port != PJSUA_INVALID_ID) {
+		pjsua_conf_connect(call_info.conf_slot, app_config.rec_port);
+		pjsua_conf_connect(0, app_config.rec_port);
+	    }
+	}
+
+	PJ_LOG(3,(THIS_FILE, "Media for call %d is active", call_id));
+
+    } else if (call_info.media_status == PJSUA_CALL_MEDIA_LOCAL_HOLD) {
+	PJ_LOG(3,(THIS_FILE, "Media for call %d is suspended (hold) by local",
+		  call_id));
+    } else if (call_info.media_status == PJSUA_CALL_MEDIA_REMOTE_HOLD) {
+	PJ_LOG(3,(THIS_FILE, 
+		  "Media for call %d is suspended (hold) by remote",
+		  call_id));
+    } else {
+	PJ_LOG(3,(THIS_FILE, 
+		  "Media for call %d is inactive",
+		  call_id));
+    }
+}
+
+/*
+ * DTMF callback.
+ */
+static void call_on_dtmf_callback(pjsua_call_id call_id, int dtmf)
+{
+    PJ_LOG(3,(THIS_FILE, "Incoming DTMF on call %d: %c", call_id, dtmf));
+}
+
+/*
+ * Handler registration status has changed.
+ */
+static void on_reg_state(pjsua_acc_id acc_id)
+{
+    PJ_UNUSED_ARG(acc_id);
+
+    // Log already written.
+}
+
+
+/*
+ * Handler on buddy state changed.
+ */
+static void on_buddy_state(pjsua_buddy_id buddy_id)
+{
+    pjsua_buddy_info info;
+    pjsua_buddy_get_info(buddy_id, &info);
+
+    PJ_LOG(3,(THIS_FILE, "%.*s status is %.*s",
+	      (int)info.uri.slen,
+	      info.uri.ptr,
+	      (int)info.status_text.slen,
+	      info.status_text.ptr));
+}
+
+
+/**
+ * Incoming IM message (i.e. MESSAGE request)!
+ */
+static void on_pager(pjsua_call_id call_id, const pj_str_t *from, 
+		     const pj_str_t *to, const pj_str_t *contact,
+		     const pj_str_t *mime_type, const pj_str_t *text)
+{
+    /* Note: call index may be -1 */
+    PJ_UNUSED_ARG(call_id);
+    PJ_UNUSED_ARG(to);
+    PJ_UNUSED_ARG(contact);
+    PJ_UNUSED_ARG(mime_type);
+
+    PJ_LOG(3,(THIS_FILE,"MESSAGE from %.*s: %.*s",
+	      (int)from->slen, from->ptr,
+	      (int)text->slen, text->ptr));
+}
+
+
+/**
+ * Received typing indication
+ */
+static void on_typing(pjsua_call_id call_id, const pj_str_t *from,
+		      const pj_str_t *to, const pj_str_t *contact,
+		      pj_bool_t is_typing)
+{
+    PJ_UNUSED_ARG(call_id);
+    PJ_UNUSED_ARG(to);
+    PJ_UNUSED_ARG(contact);
+
+    PJ_LOG(3,(THIS_FILE, "IM indication: %.*s %s",
+	      (int)from->slen, from->ptr,
+	      (is_typing?"is typing..":"has stopped typing")));
+}
+
+
+/**
+ * Call transfer request status.
+ */
+static void on_call_transfer_status(pjsua_call_id call_id,
+				    int status_code,
+				    const pj_str_t *status_text,
+				    pj_bool_t final,
+				    pj_bool_t *p_cont)
+{
+    PJ_LOG(3,(THIS_FILE, "Call %d: transfer status=%d (%.*s) %s",
+	      call_id, status_code,
+	      (int)status_text->slen, status_text->ptr,
+	      (final ? "[final]" : "")));
+
+    if (status_code/100 == 2) {
+	PJ_LOG(3,(THIS_FILE, 
+	          "Call %d: call transfered successfully, disconnecting call",
+		  call_id));
+	pjsua_call_hangup(call_id, PJSIP_SC_GONE, NULL, NULL);
+	*p_cont = PJ_FALSE;
+    }
+}
+
+
+/*
+ * Notification that call is being replaced.
+ */
+static void on_call_replaced(pjsua_call_id old_call_id,
+			     pjsua_call_id new_call_id)
+{
+    pjsua_call_info old_ci, new_ci;
+
+    pjsua_call_get_info(old_call_id, &old_ci);
+    pjsua_call_get_info(new_call_id, &new_ci);
+
+    PJ_LOG(3,(THIS_FILE, "Call %d with %.*s is being replaced by "
+			 "call %d with %.*s",
+			 old_call_id, 
+			 (int)old_ci.remote_info.slen, old_ci.remote_info.ptr,
+			 new_call_id,
+			 (int)new_ci.remote_info.slen, new_ci.remote_info.ptr));
+}
+
+
+/*
+ * Print buddy list.
+ */
+static void print_buddy_list(void)
+{
+    pjsua_buddy_id ids[64];
+    int i;
+    unsigned count = PJ_ARRAY_SIZE(ids);
+
+    puts("Buddy list:");
+
+    pjsua_enum_buddies(ids, &count);
+
+    if (count == 0)
+	puts(" -none-");
+    else {
+	for (i=0; i<(int)count; ++i) {
+	    pjsua_buddy_info info;
+
+	    if (pjsua_buddy_get_info(ids[i], &info) != PJ_SUCCESS)
+		continue;
+
+	    printf(" [%2d] <%7s>  %.*s\n", 
+		    ids[i]+1, info.status_text.ptr, 
+		    (int)info.uri.slen,
+		    info.uri.ptr);
+	}
+    }
+    puts("");
+}
+
+
+/*
+ * Print account status.
+ */
+static void print_acc_status(int acc_id)
+{
+    char buf[80];
+    pjsua_acc_info info;
+
+    pjsua_acc_get_info(acc_id, &info);
+
+    if (!info.has_registration) {
+	pj_ansi_snprintf(buf, sizeof(buf), "%.*s", 
+			 (int)info.status_text.slen,
+			 info.status_text.ptr);
+
+    } else {
+	pj_ansi_snprintf(buf, sizeof(buf),
+			 "%d/%.*s (expires=%d)",
+			 info.status,
+			 (int)info.status_text.slen,
+			 info.status_text.ptr,
+			 info.expires);
+
+    }
+
+    printf(" %c[%2d] %.*s: %s\n", (acc_id==current_acc?'*':' '),
+	   acc_id,  (int)info.acc_uri.slen, info.acc_uri.ptr, buf);
+    printf("       Online status: %s\n", 
+	   (info.online_status ? "Online" : "Invisible"));
+}
+
+
+/*
+ * Show a bit of help.
+ */
+static void keystroke_help(void)
+{
+    pjsua_acc_id acc_ids[16];
+    unsigned count = PJ_ARRAY_SIZE(acc_ids);
+    int i;
+
+    printf(">>>>\n");
+
+    pjsua_enum_accs(acc_ids, &count);
+
+    printf("Account list:\n");
+    for (i=0; i<(int)count; ++i)
+	print_acc_status(acc_ids[i]);
+
+    print_buddy_list();
+    
+    //puts("Commands:");
+    puts("+=============================================================================+");
+    puts("|       Call Commands:         |   Buddy, IM & Presence:  |     Account:      |");
+    puts("|                              |                          |                   |");
+    puts("|  m  Make new call            | +b  Add new buddy       .| +a  Add new accnt |");
+    puts("|  M  Make multiple calls      | -b  Delete buddy         | -a  Delete accnt. |");
+    puts("|  a  Answer call              | !b  Modify buddy         | !a  Modify accnt. |");
+    puts("|  h  Hangup call  (ha=all)    |  i  Send IM              | rr  (Re-)register |");
+    puts("|  H  Hold call                |  s  Subscribe presence   | ru  Unregister    |");
+    puts("|  v  re-inVite (release hold) |  u  Unsubscribe presence |  >  Cycle next ac.|");
+    puts("|  ]  Select next dialog       |  t  ToGgle Online status |  <  Cycle prev ac.|");
+    puts("|  [  Select previous dialog   +--------------------------+-------------------+");
+    puts("|  x  Xfer call                |      Media Commands:     |  Status & Config: |");
+    puts("|  X  Xfer with Replaces       |                          |                   |");
+    puts("|  #  Send DTMF string         | cl  List ports           |  d  Dump status   |");
+    puts("| dq  Dump curr. call quality  | cc  Connect port         | dd  Dump detailed |");
+    puts("|                              | cd  Disconnect port      | dc  Dump config   |");
+    puts("|  S  Send arbitrary REQUEST   |  V  Adjust audio Volume  |  f  Save config   |");
+    puts("+------------------------------+--------------------------+-------------------+");
+    puts("|  q  QUIT                  sleep N: console sleep for N ms                   |");
+    puts("+=============================================================================+");
+
+    i = pjsua_call_get_count();
+    printf("You have %d active call%s\n", i, (i>1?"s":""));
+
+    if (current_call != PJSUA_INVALID_ID) {
+	pjsua_call_info ci;
+	if (pjsua_call_get_info(current_call, &ci)==PJ_SUCCESS)
+	    printf("Current call id=%d to %.*s [%.*s]\n", current_call,
+		   (int)ci.remote_info.slen, ci.remote_info.ptr,
+		   (int)ci.state_text.slen, ci.state_text.ptr);
+    }
+}
+
+
+/*
+ * Input simple string
+ */
+static pj_bool_t simple_input(const char *title, char *buf, pj_size_t len)
+{
+    char *p;
+
+    printf("%s (empty to cancel): ", title); fflush(stdout);
+    fgets(buf, len, stdin);
+
+    /* Remove trailing newlines. */
+    for (p=buf; ; ++p) {
+	if (*p=='\r' || *p=='\n') *p='\0';
+	else if (!*p) break;
+    }
+
+    if (!*buf)
+	return PJ_FALSE;
+    
+    return PJ_TRUE;
+}
+
+
+#define NO_NB	-2
+struct input_result
+{
+    int	  nb_result;
+    char *uri_result;
+};
+
+
+/*
+ * Input URL.
+ */
+static void ui_input_url(const char *title, char *buf, int len, 
+			 struct input_result *result)
+{
+    result->nb_result = NO_NB;
+    result->uri_result = NULL;
+
+    print_buddy_list();
+
+    printf("Choices:\n"
+	   "   0         For current dialog.\n"
+	   "  -1         All %d buddies in buddy list\n"
+	   "  [1 -%2d]    Select from buddy list\n"
+	   "  URL        An URL\n"
+	   "  <Enter>    Empty input (or 'q') to cancel\n"
+	   , pjsua_get_buddy_count(), pjsua_get_buddy_count());
+    printf("%s: ", title);
+
+    fflush(stdout);
+    fgets(buf, len, stdin);
+    len = strlen(buf);
+
+    /* Left trim */
+    while (pj_isspace(*buf)) {
+	++buf;
+	--len;
+    }
+
+    /* Remove trailing newlines */
+    while (len && (buf[len-1] == '\r' || buf[len-1] == '\n'))
+	buf[--len] = '\0';
+
+    if (len == 0 || buf[0]=='q')
+	return;
+
+    if (pj_isdigit(*buf) || *buf=='-') {
+	
+	int i;
+	
+	if (*buf=='-')
+	    i = 1;
+	else
+	    i = 0;
+
+	for (; i<len; ++i) {
+	    if (!pj_isdigit(buf[i])) {
+		puts("Invalid input");
+		return;
+	    }
+	}
+
+	result->nb_result = my_atoi(buf);
+
+	if (result->nb_result >= 0 && 
+	    result->nb_result <= (int)pjsua_get_buddy_count()) 
+	{
+	    return;
+	}
+	if (result->nb_result == -1)
+	    return;
+
+	puts("Invalid input");
+	result->nb_result = NO_NB;
+	return;
+
+    } else {
+	pj_status_t status;
+
+	if ((status=pjsua_verify_sip_url(buf)) != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Invalid URL", status);
+	    return;
+	}
+
+	result->uri_result = buf;
+    }
+}
+
+/*
+ * List the ports in conference bridge
+ */
+static void conf_list(void)
+{
+    unsigned i, count;
+    pjsua_conf_port_id id[PJSUA_MAX_CALLS];
+
+    printf("Conference ports:\n");
+
+    count = PJ_ARRAY_SIZE(id);
+    pjsua_enum_conf_ports(id, &count);
+
+    for (i=0; i<count; ++i) {
+	char txlist[PJSUA_MAX_CALLS*4+10];
+	unsigned j;
+	pjsua_conf_port_info info;
+
+	pjsua_conf_get_port_info(id[i], &info);
+
+	txlist[0] = '\0';
+	for (j=0; j<info.listener_cnt; ++j) {
+	    char s[10];
+	    pj_ansi_sprintf(s, "#%d ", info.listeners[j]);
+	    pj_ansi_strcat(txlist, s);
+	}
+	printf("Port #%02d[%2dKHz/%dms] %20.*s  transmitting to: %s\n", 
+	       info.slot_id, 
+	       info.clock_rate/1000,
+	       info.samples_per_frame * 1000 / info.clock_rate,
+	       (int)info.name.slen, 
+	       info.name.ptr,
+	       txlist);
+
+    }
+    puts("");
+}
+
+
+/*
+ * Send arbitrary request to remote host
+ */
+static void send_request(char *cstr_method, const pj_str_t *dst_uri)
+{
+    pj_str_t str_method;
+    pjsip_method method;
+    pjsip_tx_data *tdata;
+    pjsip_endpoint *endpt;
+    pj_status_t status;
+
+    endpt = pjsua_get_pjsip_endpt();
+
+    str_method = pj_str(cstr_method);
+    pjsip_method_init_np(&method, &str_method);
+
+    status = pjsua_acc_create_request(current_acc, &method, dst_uri, &tdata);
+
+    status = pjsip_endpt_send_request(endpt, tdata, -1, NULL, NULL);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to send request", status);
+	return;
+    }
+}
+
+
+/*
+ * Main "user interface" loop.
+ */
+void console_app_main(const pj_str_t *uri_to_call)
+{
+    char menuin[32];
+    char buf[128];
+    char text[128];
+    int i, count;
+    char *uri;
+    pj_str_t tmp;
+    struct input_result result;
+    pjsua_call_info call_info;
+    pjsua_acc_info acc_info;
+
+
+    /* If user specifies URI to call, then call the URI */
+    if (uri_to_call->slen) {
+	pjsua_call_make_call( current_acc, uri_to_call, 0, NULL, NULL, NULL);
+    }
+
+    keystroke_help();
+
+    for (;;) {
+
+	printf(">>> ");
+	fflush(stdout);
+
+	if (fgets(menuin, sizeof(menuin), stdin) == NULL) {
+	    /* 
+	     * Be friendly to users who redirect commands into
+	     * program, when file ends, resume with kbd.
+	     * If exit is desired end script with q for quit
+	     */
+ 	    /* Reopen stdin/stdout/stderr to /dev/console */
+#if defined(PJ_WIN32) && PJ_WIN32!=0
+	    if (freopen ("CONIN$", "r", stdin) == NULL) {
+#else
+	    if (1) {
+#endif
+		puts("Cannot switch back to console from file redirection");
+		menuin[0] = 'q';
+		menuin[1] = '\0';
+	    } else {
+		puts("Switched back to console from file redirection");
+		continue;
+	    }
+	}
+
+	switch (menuin[0]) {
+
+	case 'm':
+	    /* Make call! : */
+	    printf("(You currently have %d calls)\n", 
+		     pjsua_call_get_count());
+	    
+	    uri = NULL;
+	    ui_input_url("Make call", buf, sizeof(buf), &result);
+	    if (result.nb_result != NO_NB) {
+
+		if (result.nb_result == -1 || result.nb_result == 0) {
+		    puts("You can't do that with make call!");
+		    continue;
+		} else {
+		    pjsua_buddy_info binfo;
+		    pjsua_buddy_get_info(result.nb_result-1, &binfo);
+		    uri = binfo.uri.ptr;
+		}
+
+	    } else if (result.uri_result) {
+		uri = result.uri_result;
+	    }
+	    
+	    tmp = pj_str(uri);
+	    pjsua_call_make_call( current_acc, &tmp, 0, NULL, NULL, NULL);
+	    break;
+
+	case 'M':
+	    /* Make multiple calls! : */
+	    printf("(You currently have %d calls)\n", 
+		   pjsua_call_get_count());
+	    
+	    if (!simple_input("Number of calls", menuin, sizeof(menuin)))
+		continue;
+
+	    count = my_atoi(menuin);
+	    if (count < 1)
+		continue;
+
+	    ui_input_url("Make call", buf, sizeof(buf), &result);
+	    if (result.nb_result != NO_NB) {
+		pjsua_buddy_info binfo;
+		if (result.nb_result == -1 || result.nb_result == 0) {
+		    puts("You can't do that with make call!");
+		    continue;
+		}
+		pjsua_buddy_get_info(result.nb_result-1, &binfo);
+		uri = binfo.uri.ptr;
+	    } else {
+		uri =  result.uri_result;
+	    }
+
+	    for (i=0; i<my_atoi(menuin); ++i) {
+		pj_status_t status;
+	    
+		tmp = pj_str(uri);
+		status = pjsua_call_make_call(current_acc, &tmp, 0, NULL,
+					      NULL, NULL);
+		if (status != PJ_SUCCESS)
+		    break;
+	    }
+	    break;
+
+	case 'i':
+	    /* Send instant messaeg */
+
+	    /* i is for call index to send message, if any */
+	    i = -1;
+    
+	    /* Make compiler happy. */
+	    uri = NULL;
+
+	    /* Input destination. */
+	    ui_input_url("Send IM to", buf, sizeof(buf), &result);
+	    if (result.nb_result != NO_NB) {
+
+		if (result.nb_result == -1) {
+		    puts("You can't send broadcast IM like that!");
+		    continue;
+
+		} else if (result.nb_result == 0) {
+    
+		    i = current_call;
+
+		} else {
+		    pjsua_buddy_info binfo;
+		    pjsua_buddy_get_info(result.nb_result-1, &binfo);
+		    uri = binfo.uri.ptr;
+		}
+
+	    } else if (result.uri_result) {
+		uri = result.uri_result;
+	    }
+	    
+
+	    /* Send typing indication. */
+	    if (i != -1)
+		pjsua_call_send_typing_ind(i, PJ_TRUE, NULL);
+	    else {
+		pj_str_t tmp_uri = pj_str(uri);
+		pjsua_im_typing(current_acc, &tmp_uri, PJ_TRUE, NULL);
+	    }
+
+	    /* Input the IM . */
+	    if (!simple_input("Message", text, sizeof(text))) {
+		/*
+		 * Cancelled.
+		 * Send typing notification too, saying we're not typing.
+		 */
+		if (i != -1)
+		    pjsua_call_send_typing_ind(i, PJ_FALSE, NULL);
+		else {
+		    pj_str_t tmp_uri = pj_str(uri);
+		    pjsua_im_typing(current_acc, &tmp_uri, PJ_FALSE, NULL);
+		}
+		continue;
+	    }
+
+	    tmp = pj_str(text);
+
+	    /* Send the IM */
+	    if (i != -1)
+		pjsua_call_send_im(i, NULL, &tmp, NULL, NULL);
+	    else {
+		pj_str_t tmp_uri = pj_str(uri);
+		pjsua_im_send(current_acc, &tmp_uri, NULL, &tmp, NULL, NULL);
+	    }
+
+	    break;
+
+	case 'a':
+
+	    if (current_call != -1) {
+		pjsua_call_get_info(current_call, &call_info);
+	    } else {
+		/* Make compiler happy */
+		call_info.role = PJSIP_ROLE_UAC;
+		call_info.state = PJSIP_INV_STATE_DISCONNECTED;
+	    }
+
+	    if (current_call == -1 || 
+		call_info.role != PJSIP_ROLE_UAS ||
+		call_info.state >= PJSIP_INV_STATE_CONNECTING)
+	    {
+		puts("No pending incoming call");
+		fflush(stdout);
+		continue;
+
+	    } else {
+		int st_code;
+		char contact[120];
+		pj_str_t hname = { "Contact", 7 };
+		pj_str_t hvalue;
+		pjsip_generic_string_hdr hcontact;
+		pjsua_msg_data msg_data;
+
+		if (!simple_input("Answer with code (100-699)", buf, sizeof(buf)))
+		    continue;
+		
+		st_code = my_atoi(buf);
+		if (st_code < 100)
+		    continue;
+
+		pjsua_msg_data_init(&msg_data);
+
+		if (st_code/100 == 3) {
+		    if (!simple_input("Enter URL to be put in Contact", 
+				      contact, sizeof(contact)))
+			continue;
+		    hvalue = pj_str(contact);
+		    pjsip_generic_string_hdr_init2(&hcontact, &hname, &hvalue);
+
+		    pj_list_push_back(&msg_data.hdr_list, &hcontact);
+		}
+
+		/*
+		 * Must check again!
+		 * Call may have been disconnected while we're waiting for 
+		 * keyboard input.
+		 */
+		if (current_call == -1) {
+		    puts("Call has been disconnected");
+		    fflush(stdout);
+		    continue;
+		}
+
+		pjsua_call_answer(current_call, st_code, NULL, &msg_data);
+	    }
+
+	    break;
+
+
+	case 'h':
+
+	    if (current_call == -1) {
+		puts("No current call");
+		fflush(stdout);
+		continue;
+
+	    } else if (menuin[1] == 'a') {
+		
+		/* Hangup all calls */
+		pjsua_call_hangup_all();
+
+	    } else {
+
+		/* Hangup current calls */
+		pjsua_call_hangup(current_call, 0, NULL, NULL);
+	    }
+	    break;
+
+	case ']':
+	case '[':
+	    /*
+	     * Cycle next/prev dialog.
+	     */
+	    if (menuin[0] == ']') {
+		find_next_call();
+
+	    } else {
+		find_prev_call();
+	    }
+
+	    if (current_call != -1) {
+		
+		pjsua_call_get_info(current_call, &call_info);
+		PJ_LOG(3,(THIS_FILE,"Current dialog: %.*s", 
+			  (int)call_info.remote_info.slen, 
+			  call_info.remote_info.ptr));
+
+	    } else {
+		PJ_LOG(3,(THIS_FILE,"No current dialog"));
+	    }
+	    break;
+
+
+	case '>':
+	case '<':
+	    if (!simple_input("Enter account ID to select", buf, sizeof(buf)))
+		break;
+
+	    i = my_atoi(buf);
+	    if (pjsua_acc_is_valid(i)) {
+		pjsua_acc_set_default(i);
+		PJ_LOG(3,(THIS_FILE, "Current account changed to %d", i));
+	    } else {
+		PJ_LOG(3,(THIS_FILE, "Invalid account id %d", i));
+	    }
+	    break;
+
+
+	case '+':
+	    if (menuin[1] == 'b') {
+	    
+		pjsua_buddy_config buddy_cfg;
+		pjsua_buddy_id buddy_id;
+		pj_status_t status;
+
+		if (!simple_input("Enter buddy's URI:", buf, sizeof(buf)))
+		    break;
+
+		if (pjsua_verify_sip_url(buf) != PJ_SUCCESS) {
+		    printf("Invalid SIP URI '%s'\n", buf);
+		    break;
+		}
+
+		pj_bzero(&buddy_cfg, sizeof(pjsua_buddy_config));
+
+		buddy_cfg.uri = pj_str(buf);
+		buddy_cfg.subscribe = PJ_TRUE;
+
+		status = pjsua_buddy_add(&buddy_cfg, &buddy_id);
+		if (status == PJ_SUCCESS) {
+		    printf("New buddy '%s' added at index %d\n",
+			   buf, buddy_id+1);
+		}
+
+	    } else if (menuin[1] == 'a') {
+
+		printf("Sorry, this command is not supported yet\n");
+
+	    } else {
+		printf("Invalid input %s\n", menuin);
+	    }
+	    break;
+
+	case '-':
+	    if (menuin[1] == 'b') {
+		if (!simple_input("Enter buddy ID to delete",buf,sizeof(buf)))
+		    break;
+
+		i = my_atoi(buf) - 1;
+
+		if (!pjsua_buddy_is_valid(i)) {
+		    printf("Invalid buddy id %d\n", i);
+		} else {
+		    pjsua_buddy_del(i);
+		    printf("Buddy %d deleted\n", i);
+		}
+
+	    } else if (menuin[1] == 'a') {
+
+		if (!simple_input("Enter account ID to delete",buf,sizeof(buf)))
+		    break;
+
+		i = my_atoi(buf);
+
+		if (!pjsua_acc_is_valid(i)) {
+		    printf("Invalid account id %d\n", i);
+		} else {
+		    pjsua_acc_del(i);
+		    printf("Account %d deleted\n", i);
+		}
+
+	    } else {
+		printf("Invalid input %s\n", menuin);
+	    }
+	    break;
+
+	case 'H':
+	    /*
+	     * Hold call.
+	     */
+	    if (current_call != -1) {
+		
+		pjsua_call_set_hold(current_call, NULL);
+
+	    } else {
+		PJ_LOG(3,(THIS_FILE, "No current call"));
+	    }
+	    break;
+
+	case 'v':
+	    /*
+	     * Send re-INVITE (to release hold, etc).
+	     */
+	    if (current_call != -1) {
+		
+		pjsua_call_reinvite(current_call, PJ_TRUE, NULL);
+
+	    } else {
+		PJ_LOG(3,(THIS_FILE, "No current call"));
+	    }
+	    break;
+
+	case 'x':
+	    /*
+	     * Transfer call.
+	     */
+	    if (current_call == -1) {
+		
+		PJ_LOG(3,(THIS_FILE, "No current call"));
+
+	    } else {
+		int call = current_call;
+		pjsua_msg_data msg_data;
+		pjsip_generic_string_hdr refer_sub;
+		pj_str_t STR_REFER_SUB = { "Refer-Sub", 9 };
+		pj_str_t STR_FALSE = { "false", 5 };
+		pjsua_call_info ci;
+
+		pjsua_call_get_info(current_call, &ci);
+		printf("Transfering current call [%d] %.*s\n",
+		       current_call,
+		       (int)ci.remote_info.slen, ci.remote_info.ptr);
+
+		ui_input_url("Transfer to URL", buf, sizeof(buf), &result);
+
+		/* Check if call is still there. */
+
+		if (call != current_call) {
+		    puts("Call has been disconnected");
+		    continue;
+		}
+
+		pjsua_msg_data_init(&msg_data);
+		if (app_config.no_refersub) {
+		    /* Add Refer-Sub: false in outgoing REFER request */
+		    pjsip_generic_string_hdr_init2(&refer_sub, &STR_REFER_SUB,
+						   &STR_FALSE);
+		    pj_list_push_back(&msg_data.hdr_list, &refer_sub);
+		}
+		if (result.nb_result != NO_NB) {
+		    if (result.nb_result == -1 || result.nb_result == 0)
+			puts("You can't do that with transfer call!");
+		    else {
+			pjsua_buddy_info binfo;
+			pjsua_buddy_get_info(result.nb_result-1, &binfo);
+			pjsua_call_xfer( current_call, &binfo.uri, &msg_data);
+		    }
+
+		} else if (result.uri_result) {
+		    pj_str_t tmp;
+		    tmp = pj_str(result.uri_result);
+		    pjsua_call_xfer( current_call, &tmp, &msg_data);
+		}
+	    }
+	    break;
+
+	case 'X':
+	    /*
+	     * Transfer call with replaces.
+	     */
+	    if (current_call == -1) {
+		
+		PJ_LOG(3,(THIS_FILE, "No current call"));
+
+	    } else {
+		int call = current_call;
+		int dst_call;
+		pjsua_msg_data msg_data;
+		pjsip_generic_string_hdr refer_sub;
+		pj_str_t STR_REFER_SUB = { "Refer-Sub", 9 };
+		pj_str_t STR_FALSE = { "false", 5 };
+		pjsua_call_id ids[PJSUA_MAX_CALLS];
+		pjsua_call_info ci;
+		unsigned i, count;
+
+		count = PJ_ARRAY_SIZE(ids);
+		pjsua_enum_calls(ids, &count);
+
+		if (count <= 1) {
+		    puts("There are no other calls");
+		    continue;
+		}
+
+		pjsua_call_get_info(current_call, &ci);
+		printf("Transfer call [%d] %.*s to one of the following:\n",
+		       current_call,
+		       (int)ci.remote_info.slen, ci.remote_info.ptr);
+
+		for (i=0; i<count; ++i) {
+		    pjsua_call_info call_info;
+
+		    if (ids[i] == call)
+			continue;
+
+		    pjsua_call_get_info(ids[i], &call_info);
+		    printf("%d  %.*s [%.*s]\n",
+			   ids[i],
+			   (int)call_info.remote_info.slen,
+			   call_info.remote_info.ptr,
+			   (int)call_info.state_text.slen,
+			   call_info.state_text.ptr);
+		}
+
+		if (!simple_input("Enter call number to be replaced", 
+			          buf, sizeof(buf)))
+		    continue;
+
+		dst_call = my_atoi(buf);
+
+		/* Check if call is still there. */
+
+		if (call != current_call) {
+		    puts("Call has been disconnected");
+		    continue;
+		}
+
+		/* Check that destination call is valid. */
+		if (dst_call == call) {
+		    puts("Destination call number must not be the same "
+			 "as the call being transfered");
+		    continue;
+		}
+		if (dst_call >= PJSUA_MAX_CALLS) {
+		    puts("Invalid destination call number");
+		    continue;
+		}
+		if (!pjsua_call_is_active(dst_call)) {
+		    puts("Invalid destination call number");
+		    continue;
+		}
+
+		pjsua_msg_data_init(&msg_data);
+		if (app_config.no_refersub) {
+		    /* Add Refer-Sub: false in outgoing REFER request */
+		    pjsip_generic_string_hdr_init2(&refer_sub, &STR_REFER_SUB,
+						   &STR_FALSE);
+		    pj_list_push_back(&msg_data.hdr_list, &refer_sub);
+		}
+
+		pjsua_call_xfer_replaces(call, dst_call, 0, &msg_data);
+	    }
+	    break;
+
+	case '#':
+	    /*
+	     * Send DTMF strings.
+	     */
+	    if (current_call == -1) {
+		
+		PJ_LOG(3,(THIS_FILE, "No current call"));
+
+	    } else if (!pjsua_call_has_media(current_call)) {
+
+		PJ_LOG(3,(THIS_FILE, "Media is not established yet!"));
+
+	    } else {
+		pj_str_t digits;
+		int call = current_call;
+		pj_status_t status;
+
+		if (!simple_input("DTMF strings to send (0-9*#A-B)", buf, 
+				  sizeof(buf)))
+		{
+			break;
+		}
+
+		if (call != current_call) {
+		    puts("Call has been disconnected");
+		    continue;
+		}
+
+		digits = pj_str(buf);
+		status = pjsua_call_dial_dtmf(current_call, &digits);
+		if (status != PJ_SUCCESS) {
+		    pjsua_perror(THIS_FILE, "Unable to send DTMF", status);
+		} else {
+		    puts("DTMF digits enqueued for transmission");
+		}
+	    }
+	    break;
+
+	case 'S':
+	    /*
+	     * Send arbitrary request
+	     */
+	    if (pjsua_acc_get_count() == 0) {
+		puts("Sorry, need at least one account configured");
+		break;
+	    }
+
+	    puts("Send arbitrary request to remote host");
+
+	    /* Input METHOD */
+	    if (!simple_input("Request method:",text,sizeof(text)))
+		break;
+
+	    /* Input destination URI */
+	    uri = NULL;
+	    ui_input_url("Destination URI", buf, sizeof(buf), &result);
+	    if (result.nb_result != NO_NB) {
+
+		if (result.nb_result == -1 || result.nb_result == 0) {
+		    puts("Sorry you can't do that!");
+		    continue;
+		} else {
+		    pjsua_buddy_info binfo;
+		    pjsua_buddy_get_info(result.nb_result-1, &binfo);
+		    uri = binfo.uri.ptr;
+		}
+
+	    } else if (result.uri_result) {
+		uri = result.uri_result;
+	    }
+	    
+	    tmp = pj_str(uri);
+
+	    send_request(text, &tmp);
+	    break;
+
+	case 's':
+	    if (pj_ansi_strnicmp(menuin, "sleep", 5)==0) {
+		pj_str_t tmp;
+		int delay;
+
+		tmp.ptr = menuin+6;
+		tmp.slen = pj_ansi_strlen(menuin)-7;
+
+		if (tmp.slen < 1) {
+		    puts("Usage: sleep MSEC");
+		    break;
+		}
+
+		delay = pj_strtoul(&tmp);
+		if (delay < 0) delay = 0;
+		pj_thread_sleep(delay);
+		break;
+	    }
+	    /* Continue below */
+
+	case 'u':
+	    /*
+	     * Subscribe/unsubscribe presence.
+	     */
+	    ui_input_url("(un)Subscribe presence of", buf, sizeof(buf), &result);
+	    if (result.nb_result != NO_NB) {
+		if (result.nb_result == -1) {
+		    int i, count;
+		    count = pjsua_get_buddy_count();
+		    for (i=0; i<count; ++i)
+			pjsua_buddy_subscribe_pres(i, menuin[0]=='s');
+		} else if (result.nb_result == 0) {
+		    puts("Sorry, can only subscribe to buddy's presence, "
+			 "not from existing call");
+		} else {
+		    pjsua_buddy_subscribe_pres(result.nb_result-1, (menuin[0]=='s'));
+		}
+
+	    } else if (result.uri_result) {
+		puts("Sorry, can only subscribe to buddy's presence, "
+		     "not arbitrary URL (for now)");
+	    }
+
+	    break;
+
+	case 'r':
+	    switch (menuin[1]) {
+	    case 'r':
+		/*
+		 * Re-Register.
+		 */
+		pjsua_acc_set_registration(current_acc, PJ_TRUE);
+		break;
+	    case 'u':
+		/*
+		 * Unregister
+		 */
+		pjsua_acc_set_registration(current_acc, PJ_FALSE);
+		break;
+	    }
+	    break;
+	    
+	case 't':
+	    pjsua_acc_get_info(current_acc, &acc_info);
+	    acc_info.online_status = !acc_info.online_status;
+	    pjsua_acc_set_online_status(current_acc, acc_info.online_status);
+	    printf("Setting %s online status to %s\n",
+		   acc_info.acc_uri.ptr,
+		   (acc_info.online_status?"online":"offline"));
+	    break;
+
+	case 'c':
+	    switch (menuin[1]) {
+	    case 'l':
+		conf_list();
+		break;
+	    case 'c':
+	    case 'd':
+		{
+		    char tmp[10], src_port[10], dst_port[10];
+		    pj_status_t status;
+		    int cnt;
+		    const char *src_title, *dst_title;
+
+		    cnt = sscanf(menuin, "%s %s %s", tmp, src_port, dst_port);
+
+		    if (cnt != 3) {
+			conf_list();
+
+			src_title = (menuin[1]=='c'?
+				     "Connect src port #":
+				     "Disconnect src port #");
+			dst_title = (menuin[1]=='c'?
+				     "To dst port #":
+				     "From dst port #");
+
+			if (!simple_input(src_title, src_port, sizeof(src_port)))
+			    break;
+
+			if (!simple_input(dst_title, dst_port, sizeof(dst_port)))
+			    break;
+		    }
+
+		    if (menuin[1]=='c') {
+			status = pjsua_conf_connect(my_atoi(src_port), 
+						    my_atoi(dst_port));
+		    } else {
+			status = pjsua_conf_disconnect(my_atoi(src_port), 
+						       my_atoi(dst_port));
+		    }
+		    if (status == PJ_SUCCESS) {
+			puts("Success");
+		    } else {
+			puts("ERROR!!");
+		    }
+		}
+		break;
+	    }
+	    break;
+
+	case 'V':
+	    /* Adjust audio volume */
+	    sprintf(buf, "Adjust mic level: [%4.1fx] ", app_config.mic_level);
+	    if (simple_input(buf,text,sizeof(text))) {
+		char *err;
+		app_config.mic_level = (float)strtod(text, &err);
+		pjsua_conf_adjust_rx_level(0, app_config.mic_level);
+	    }
+	    sprintf(buf, "Adjust speaker level: [%4.1fx] ", 
+		    app_config.speaker_level);
+	    if (simple_input(buf,text,sizeof(text))) {
+		char *err;
+		app_config.speaker_level = (float)strtod(text, &err);
+		pjsua_conf_adjust_tx_level(0, app_config.speaker_level);
+	    }
+
+	    break;
+
+	case 'd':
+	    if (menuin[1] == 'c') {
+		char settings[2000];
+		int len;
+
+		len = write_settings(&app_config, settings, sizeof(settings));
+		if (len < 1)
+		    PJ_LOG(3,(THIS_FILE, "Error: not enough buffer"));
+		else
+		    PJ_LOG(3,(THIS_FILE, 
+			      "Dumping configuration (%d bytes):\n%s\n",
+			      len, settings));
+
+	    } else if (menuin[1] == 'q') {
+
+		if (current_call != PJSUA_INVALID_ID) {
+		    char buf[1024];
+		    pjsua_call_dump(current_call, PJ_TRUE, buf, 
+				    sizeof(buf), "  ");
+		    PJ_LOG(3,(THIS_FILE, "\n%s", buf));
+		} else {
+		    PJ_LOG(3,(THIS_FILE, "No current call"));
+		}
+
+	    } else {
+		app_dump(menuin[1]=='d');
+	    }
+	    break;
+
+
+	case 'f':
+	    if (simple_input("Enter output filename", buf, sizeof(buf))) {
+		char settings[2000];
+		int len;
+
+		len = write_settings(&app_config, settings, sizeof(settings));
+		if (len < 1)
+		    PJ_LOG(3,(THIS_FILE, "Error: not enough buffer"));
+		else {
+		    pj_oshandle_t fd;
+		    pj_status_t status;
+
+		    status = pj_file_open(app_config.pool, buf, 
+					  PJ_O_WRONLY, &fd);
+		    if (status != PJ_SUCCESS) {
+			pjsua_perror(THIS_FILE, "Unable to open file", status);
+		    } else {
+			pj_ssize_t size = len;
+			pj_file_write(fd, settings, &size);
+			pj_file_close(fd);
+
+			printf("Settings successfully written to '%s'\n", buf);
+		    }
+		}
+		
+	    }
+	    break;
+
+
+	case 'q':
+	    goto on_exit;
+
+
+	default:
+	    if (menuin[0] != '\n' && menuin[0] != '\r') {
+		printf("Invalid input %s", menuin);
+	    }
+	    keystroke_help();
+	    break;
+	}
+    }
+
+on_exit:
+    ;
+}
+
+
+/*****************************************************************************
+ * Public API
+ */
+
+pj_status_t app_init(int argc, char *argv[])
+{
+    pjsua_transport_id transport_id = -1;
+    pjsua_transport_config tcp_cfg;
+    unsigned i;
+    pj_status_t status;
+
+    /* Create pjsua */
+    status = pjsua_create();
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create pool for application */
+    app_config.pool = pjsua_pool_create("pjsua", 4000, 4000);
+
+    /* Initialize default config */
+    default_config(&app_config);
+    
+    /* Parse the arguments */
+    status = parse_args(argc, argv, &app_config, &uri_arg);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Initialize application callbacks */
+    app_config.cfg.cb.on_call_state = &on_call_state;
+    app_config.cfg.cb.on_call_media_state = &on_call_media_state;
+    app_config.cfg.cb.on_incoming_call = &on_incoming_call;
+    app_config.cfg.cb.on_dtmf_digit = &call_on_dtmf_callback;
+    app_config.cfg.cb.on_reg_state = &on_reg_state;
+    app_config.cfg.cb.on_buddy_state = &on_buddy_state;
+    app_config.cfg.cb.on_pager = &on_pager;
+    app_config.cfg.cb.on_typing = &on_typing;
+    app_config.cfg.cb.on_call_transfer_status = &on_call_transfer_status;
+    app_config.cfg.cb.on_call_replaced = &on_call_replaced;
+
+    /* Initialize pjsua */
+    status = pjsua_init(&app_config.cfg, &app_config.log_cfg,
+			&app_config.media_cfg);
+    if (status != PJ_SUCCESS)
+	return status;
+
+#ifdef STEREO_DEMO
+    stereo_demo();
+#endif
+
+    /* Initialize calls data */
+    for (i=0; i<PJ_ARRAY_SIZE(app_config.call_data); ++i) {
+	app_config.call_data[i].timer.id = PJSUA_INVALID_ID;
+	app_config.call_data[i].timer.cb = &call_timeout_callback;
+    }
+
+    /* Optionally registers WAV file */
+    for (i=0; i<app_config.wav_count; ++i) {
+	pjsua_player_id wav_id;
+
+	status = pjsua_player_create(&app_config.wav_files[i], 0, 
+				     &wav_id);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+
+	if (app_config.wav_id == PJSUA_INVALID_ID) {
+	    app_config.wav_id = wav_id;
+	    app_config.wav_port = pjsua_player_get_conf_port(app_config.wav_id);
+	}
+    }
+
+    /* Optionally registers tone players */
+    for (i=0; i<app_config.tone_count; ++i) {
+	pjmedia_port *tport;
+	char name[80];
+	pj_str_t label;
+	pj_status_t status;
+
+	pj_ansi_snprintf(name, sizeof(name), "tone-%d,%d",
+			 app_config.tones[i].freq1, 
+			 app_config.tones[i].freq2);
+	label = pj_str(name);
+	status = pjmedia_tonegen_create2(app_config.pool, &label,
+					 8000, 1, 160, 16, 
+					 PJMEDIA_TONEGEN_LOOP,  &tport);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Unable to create tone generator", status);
+	    goto on_error;
+	}
+
+	status = pjsua_conf_add_port(app_config.pool, tport, 
+				     &app_config.tone_slots[i]);
+	pj_assert(status == PJ_SUCCESS);
+
+	status = pjmedia_tonegen_play(tport, 1, &app_config.tones[i], 0);
+	pj_assert(status == PJ_SUCCESS);
+    }
+
+    /* Optionally create recorder file, if any. */
+    if (app_config.rec_file.slen) {
+	status = pjsua_recorder_create(&app_config.rec_file, 0, NULL, 0, 0,
+				       &app_config.rec_id);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+
+	app_config.rec_port = pjsua_recorder_get_conf_port(app_config.rec_id);
+    }
+
+    pj_memcpy(&tcp_cfg, &app_config.udp_cfg, sizeof(tcp_cfg));
+
+    /* Add UDP transport unless it's disabled. */
+    if (!app_config.no_udp) {
+	pjsua_acc_id aid;
+
+	status = pjsua_transport_create(PJSIP_TRANSPORT_UDP,
+					&app_config.udp_cfg, 
+					&transport_id);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+
+	/* Add local account */
+	pjsua_acc_add_local(transport_id, PJ_TRUE, &aid);
+	//pjsua_acc_set_transport(aid, transport_id);
+	pjsua_acc_set_online_status(current_acc, PJ_TRUE);
+
+	if (app_config.udp_cfg.port == 0) {
+	    pjsua_transport_info ti;
+	    pj_sockaddr_in *a;
+
+	    pjsua_transport_get_info(transport_id, &ti);
+	    a = (pj_sockaddr_in*)&ti.local_addr;
+
+	    tcp_cfg.port = pj_ntohs(a->sin_port);
+	}
+    }
+
+    /* Add TCP transport unless it's disabled */
+    if (!app_config.no_tcp) {
+	status = pjsua_transport_create(PJSIP_TRANSPORT_TCP,
+					&tcp_cfg, 
+					&transport_id);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+
+	/* Add local account */
+	pjsua_acc_add_local(transport_id, PJ_TRUE, NULL);
+	pjsua_acc_set_online_status(current_acc, PJ_TRUE);
+
+    }
+
+
+#if defined(PJSIP_HAS_TLS_TRANSPORT) && PJSIP_HAS_TLS_TRANSPORT!=0
+    /* Add TLS transport when application wants one */
+    if (app_config.use_tls) {
+
+	pjsua_acc_id acc_id;
+
+	/* Set TLS port as TCP port+1 */
+	tcp_cfg.port++;
+	status = pjsua_transport_create(PJSIP_TRANSPORT_TLS,
+					&tcp_cfg, 
+					&transport_id);
+	tcp_cfg.port--;
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+	
+	/* Add local account */
+	pjsua_acc_add_local(transport_id, PJ_FALSE, &acc_id);
+	pjsua_acc_set_online_status(acc_id, PJ_TRUE);
+    }
+#endif
+
+    if (transport_id == -1) {
+	PJ_LOG(3,(THIS_FILE, "Error: no transport is configured"));
+	status = -1;
+	goto on_error;
+    }
+
+
+    /* Add accounts */
+    for (i=0; i<app_config.acc_cnt; ++i) {
+	status = pjsua_acc_add(&app_config.acc_cfg[i], PJ_TRUE, NULL);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+	pjsua_acc_set_online_status(current_acc, PJ_TRUE);
+    }
+
+    /* Add buddies */
+    for (i=0; i<app_config.buddy_cnt; ++i) {
+	status = pjsua_buddy_add(&app_config.buddy_cfg[i], NULL);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+    }
+
+    /* Optionally set codec orders */
+    for (i=0; i<app_config.codec_cnt; ++i) {
+	pjsua_codec_set_priority(&app_config.codec_arg[i],
+				 (pj_uint8_t)(PJMEDIA_CODEC_PRIO_NORMAL+i+9));
+    }
+
+    /* Add RTP transports */
+    status = pjsua_media_transports_create(&app_config.rtp_cfg);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Use null sound device? */
+#ifndef STEREO_DEMO
+    if (app_config.null_audio) {
+	status = pjsua_set_null_snd_dev();
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+#endif
+
+    if (app_config.capture_dev != PJSUA_INVALID_ID
+        || app_config.playback_dev != PJSUA_INVALID_ID) {
+	status
+	  = pjsua_set_snd_dev(app_config.capture_dev, app_config.playback_dev);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+    }
+
+    return PJ_SUCCESS;
+
+on_error:
+    pjsua_destroy();
+    return status;
+}
+
+
+pj_status_t app_main(void)
+{
+    pj_status_t status;
+
+    /* Start pjsua */
+    status = pjsua_start();
+    if (status != PJ_SUCCESS) {
+	pjsua_destroy();
+	return status;
+    }
+
+    console_app_main(&uri_arg);
+
+    return PJ_SUCCESS;
+}
+
+pj_status_t app_destroy(void)
+{
+    pj_status_t status;
+    unsigned i;
+
+#ifdef STEREO_DEMO
+    if (app_config.snd) {
+	pjmedia_snd_port_destroy(app_config.snd);
+	app_config.snd = NULL;
+    }
+#endif
+
+    /* Close tone generators */
+    for (i=0; i<app_config.tone_count; ++i) {
+	pjsua_conf_remove_port(app_config.tone_slots[i]);
+    }
+
+    if (app_config.pool) {
+	pj_pool_release(app_config.pool);
+	app_config.pool = NULL;
+    }
+
+    status = pjsua_destroy();
+
+    pj_bzero(&app_config, sizeof(app_config));
+
+    return status;
+}
+
+
+#ifdef STEREO_DEMO
+static void stereo_demo()
+{
+    pjmedia_port *conf, *splitter, *ch1;
+    unsigned clock;
+    pj_status_t status;
+
+    /* Disable existing sound device */
+    conf = pjsua_set_no_snd_dev();
+
+    clock = app_config.media_cfg.clock_rate;
+
+    /* Create stereo-mono splitter/combiner */
+    status = pjmedia_splitcomb_create(app_config.pool, 
+				      clock /* clock rate */,
+				      2	    /* stereo */,
+				      clock*2*10/1000/* 10ms samples * 2ch */,
+				      16    /* bits */,
+				      0	    /* options */,
+				      &splitter);
+    pj_assert(status == PJ_SUCCESS);
+
+    /* Connect channel0 (left channel?) to conference port slot0 */
+    status = pjmedia_splitcomb_set_channel(splitter, 0 /* ch0 */, 
+					   0 /*options*/,
+					   conf);
+    pj_assert(status == PJ_SUCCESS);
+
+    /* Create reverse channel for channel1 (right channel?)... */
+    status = pjmedia_splitcomb_create_rev_channel(app_config.pool,
+						  splitter,
+						  1  /* ch1 */,
+						  0  /* options */,
+						  &ch1);
+    pj_assert(status == PJ_SUCCESS);
+
+    /* .. and register it to conference bridge (it would be slot1
+     * if there's no other devices connected to the bridge)
+     */
+    status = pjsua_conf_add_port(app_config.pool, ch1, NULL);
+    pj_assert(status == PJ_SUCCESS);
+    
+    /* Create sound device */
+    status = pjmedia_snd_port_create(app_config.pool, -1, -1, 
+				     clock  /* clock rate */,
+				     2	    /* stereo */,
+				     clock*2*10/1000 /* 10 ms samples * 2ch */,
+				     16	    /* bits */,
+				     0, &app_config.snd);
+    pj_assert(status == PJ_SUCCESS);
+
+
+    /* Connect the splitter to the sound device */
+    status = pjmedia_snd_port_connect(app_config.snd, splitter);
+    pj_assert(status == PJ_SUCCESS);
+
+}
+#endif
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/StdAfx.cpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/StdAfx.cpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/StdAfx.cpp	(revision 1163)
@@ -0,0 +1,8 @@
+// stdafx.cpp : source file that includes just the standard includes
+//	pjsua_wince.pch will be the pre-compiled header
+//	stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
+
+// TODO: reference any additional headers you need in STDAFX.H
+// and not in this file
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/StdAfx.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/StdAfx.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/StdAfx.h	(revision 1163)
@@ -0,0 +1,25 @@
+// stdafx.h : include file for standard system include files,
+//  or project specific include files that are used frequently, but
+//      are changed infrequently
+//
+
+#if !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
+#define AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
+
+// Windows Header Files:
+#include <windows.h>
+
+// Local Header Files
+
+// TODO: reference additional headers your program requires here
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/newres.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/newres.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/newres.h	(revision 1163)
@@ -0,0 +1,39 @@
+#ifndef __NEWRES_H__
+#define __NEWRES_H__
+
+#if !defined(UNDER_CE)
+	#define UNDER_CE _WIN32_WCE
+#endif
+
+#if defined(_WIN32_WCE)
+	#if !defined(WCEOLE_ENABLE_DIALOGEX)
+		#define DIALOGEX DIALOG DISCARDABLE
+	#endif
+	#include <commctrl.h>
+	#define  SHMENUBAR RCDATA
+	#if defined(WIN32_PLATFORM_PSPC) && (_WIN32_WCE >= 300)
+		#include <aygshell.h> 
+	#else
+		#define I_IMAGENONE		(-2)
+		#define NOMENU			0xFFFF
+		#define IDS_SHNEW		1
+
+		#define IDM_SHAREDNEW        10
+		#define IDM_SHAREDNEWDEFAULT 11
+	#endif
+#endif // _WIN32_WCE
+
+
+#ifdef RC_INVOKED
+#ifndef _INC_WINDOWS
+#define _INC_WINDOWS
+	#include "winuser.h"           // extract from windows header
+#endif
+#endif
+
+#ifdef IDC_STATIC
+#undef IDC_STATIC
+#endif
+#define IDC_STATIC      (-1)
+
+#endif //__NEWRES_H__
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/pjsua_wince.cpp	(revision 1163)
@@ -0,0 +1,633 @@
+// pjsua_wince.cpp : Defines the entry point for the application.
+//
+
+#include "stdafx.h"
+#include "pjsua_wince.h"
+#include <commctrl.h>
+#include <pjsua-lib/pjsua.h>
+
+#define MAX_LOADSTRING 100
+
+// Global Variables:
+static HINSTANCE    hInst;
+static HWND	    hMainWnd;
+static HWND	    hwndCB;
+static HWND	    hwndGlobalStatus, hwndURI, hwndCallStatus;
+static HWND	    hwndActionButton, hwndExitButton;
+
+static pj_pool_t   *g_pool;
+static pj_str_t	    g_local_uri;
+static int	    g_current_acc;
+static int	    g_current_call = PJSUA_INVALID_ID;
+static int	    g_current_action;
+
+enum
+{
+    ID_GLOBAL_STATUS	= 21,
+    ID_URI,
+    ID_CALL_STATUS,
+    ID_POLL_TIMER,
+};
+
+enum
+{
+    ID_MENU_NONE	= 64,
+    ID_MENU_CALL,
+    ID_MENU_ANSWER,
+    ID_MENU_DISCONNECT,
+    ID_BTN_ACTION,
+};
+
+#define DEFAULT_URI	"sip:192.168.0.7"
+
+
+// Forward declarations of functions included in this code module:
+static ATOM		MyRegisterClass	(HINSTANCE, LPTSTR);
+BOOL			InitInstance	(HINSTANCE, int);
+static void		OnCreate	(HWND hWnd);
+static LRESULT CALLBACK	WndProc		(HWND, UINT, WPARAM, LPARAM);
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+static void OnError(const wchar_t *title, pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+    PJ_DECL_UNICODE_TEMP_BUF(werrmsg, PJ_ERR_MSG_SIZE);
+
+    pj_strerror(status, errmsg, sizeof(errmsg));
+    
+    MessageBox(NULL, PJ_STRING_TO_NATIVE(errmsg, werrmsg, PJ_ERR_MSG_SIZE),
+	       title, MB_OK);
+}
+
+
+static void SetLocalURI(const char *uri, int len, bool enabled=true)
+{
+    wchar_t tmp[128];
+    if (len==-1) len=pj_ansi_strlen(uri);
+    pj_ansi_to_unicode(uri, len, tmp, PJ_ARRAY_SIZE(tmp));
+    SetDlgItemText(hMainWnd, ID_GLOBAL_STATUS, tmp);
+    EnableWindow(hwndGlobalStatus, enabled?TRUE:FALSE);
+}
+
+
+
+static void SetURI(const char *uri, int len, bool enabled=true)
+{
+    wchar_t tmp[128];
+    if (len==-1) len=pj_ansi_strlen(uri);
+    pj_ansi_to_unicode(uri, len, tmp, PJ_ARRAY_SIZE(tmp));
+    SetDlgItemText(hMainWnd, ID_URI, tmp);
+    EnableWindow(hwndURI, enabled?TRUE:FALSE);
+}
+
+
+static void SetCallStatus(const char *state, int len)
+{
+    wchar_t tmp[128];
+    if (len==-1) len=pj_ansi_strlen(state);
+    pj_ansi_to_unicode(state, len, tmp, PJ_ARRAY_SIZE(tmp));
+    SetDlgItemText(hMainWnd, ID_CALL_STATUS, tmp);
+}
+
+static void SetAction(int action, bool enable=true)
+{
+    HMENU hMenu;
+
+    hMenu = CommandBar_GetMenu(hwndCB, 0);
+
+    RemoveMenu(hMenu, ID_MENU_NONE, MF_BYCOMMAND);
+    RemoveMenu(hMenu, ID_MENU_CALL, MF_BYCOMMAND);
+    RemoveMenu(hMenu, ID_MENU_ANSWER, MF_BYCOMMAND);
+    RemoveMenu(hMenu, ID_MENU_DISCONNECT, MF_BYCOMMAND);
+
+    switch (action) {
+    case ID_MENU_NONE:
+	InsertMenu(hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT("None"));
+	SetWindowText(hwndActionButton, TEXT("-"));
+	break;
+    case ID_MENU_CALL:
+	InsertMenu(hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT("Call"));
+	SetWindowText(hwndActionButton, TEXT("&Call"));
+	break;
+    case ID_MENU_ANSWER:
+	InsertMenu(hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT("Answer"));
+	SetWindowText(hwndActionButton, TEXT("&Answer"));
+	break;
+    case ID_MENU_DISCONNECT:
+	InsertMenu(hMenu, ID_EXIT, MF_BYCOMMAND, action, TEXT("Hangup"));
+	SetWindowText(hwndActionButton, TEXT("&Hangup"));
+	break;
+    }
+
+    EnableMenuItem(hMenu, action, MF_BYCOMMAND | (enable?MF_ENABLED:MF_GRAYED));
+    DrawMenuBar(hMainWnd);
+
+    g_current_action = action;
+}
+
+
+/*
+ * Handler when invite state has changed.
+ */
+static void on_call_state(pjsua_call_id call_id, pjsip_event *e)
+{
+    pjsua_call_info call_info;
+
+    PJ_UNUSED_ARG(e);
+
+    pjsua_call_get_info(call_id, &call_info);
+
+    if (call_info.state == PJSIP_INV_STATE_DISCONNECTED) {
+
+	g_current_call = PJSUA_INVALID_ID;
+	SetURI(DEFAULT_URI, -1);
+	SetAction(ID_MENU_CALL);
+	//SetCallStatus(call_info.state_text.ptr, call_info.state_text.slen);
+	SetCallStatus(call_info.last_status_text.ptr, call_info.last_status_text.slen);
+
+    } else {
+	//if (g_current_call == PJSUA_INVALID_ID)
+	//    g_current_call = call_id;
+
+	if (call_info.remote_contact.slen)
+	    SetURI(call_info.remote_contact.ptr, call_info.remote_contact.slen, false);
+	else
+	    SetURI(call_info.remote_info.ptr, call_info.remote_info.slen, false);
+
+	if (call_info.state == PJSIP_INV_STATE_CONFIRMED)
+	    SetAction(ID_MENU_DISCONNECT);
+
+	SetCallStatus(call_info.state_text.ptr, call_info.state_text.slen);
+    }
+}
+
+
+/*
+ * Callback on media state changed event.
+ * The action may connect the call to sound device, to file, or
+ * to loop the call.
+ */
+static void on_call_media_state(pjsua_call_id call_id)
+{
+    pjsua_call_info call_info;
+
+    pjsua_call_get_info(call_id, &call_info);
+
+    if (call_info.media_status == PJSUA_CALL_MEDIA_ACTIVE) {
+	pjsua_conf_connect(call_info.conf_slot, 0);
+	pjsua_conf_connect(0, call_info.conf_slot);
+    }
+}
+
+
+/**
+ * Handler when there is incoming call.
+ */
+static void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id,
+			     pjsip_rx_data *rdata)
+{
+    pjsua_call_info call_info;
+
+    PJ_UNUSED_ARG(acc_id);
+    PJ_UNUSED_ARG(rdata);
+
+    if (g_current_call != PJSUA_INVALID_ID) {
+	pj_str_t reason;
+	reason = pj_str("Another call is in progress");
+	pjsua_call_answer(call_id, PJSIP_SC_BUSY_HERE, &reason, NULL);
+	return;
+    }
+
+    g_current_call = call_id;
+
+    pjsua_call_get_info(call_id, &call_info);
+
+    SetAction(ID_MENU_ANSWER);
+    SetURI(call_info.remote_info.ptr, call_info.remote_info.slen, false);
+    pjsua_call_answer(call_id, 200, NULL, NULL);
+}
+
+
+/*
+ * Handler registration status has changed.
+ */
+static void on_reg_state(pjsua_acc_id acc_id)
+{
+    PJ_UNUSED_ARG(acc_id);
+
+    // Log already written.
+}
+
+
+/*
+ * Handler on buddy state changed.
+ */
+static void on_buddy_state(pjsua_buddy_id buddy_id)
+{
+}
+
+
+/**
+ * Incoming IM message (i.e. MESSAGE request)!
+ */
+static void on_pager(pjsua_call_id call_id, const pj_str_t *from, 
+		     const pj_str_t *to, const pj_str_t *contact,
+		     const pj_str_t *mime_type, const pj_str_t *text)
+{
+}
+
+
+/**
+ * Received typing indication
+ */
+static void on_typing(pjsua_call_id call_id, const pj_str_t *from,
+		      const pj_str_t *to, const pj_str_t *contact,
+		      pj_bool_t is_typing)
+{
+}
+
+
+static BOOL OnInitStack(void)
+{
+    pjsua_config	    cfg;
+    pjsua_logging_config    log_cfg;
+    pjsua_media_config	    media_cfg;
+    pjsua_transport_config  udp_cfg;
+    pjsua_transport_config  rtp_cfg;
+    pjsua_transport_id	    transport_id;
+    pjsua_transport_info    transport_info;
+    pj_str_t		    tmp;
+    pj_status_t status;
+
+    /* Create pjsua */
+    status = pjsua_create();
+    if (status != PJ_SUCCESS) {
+	OnError(TEXT("Error creating pjsua"), status);
+	return FALSE;
+    }
+
+    /* Create global pool for application */
+    g_pool = pjsua_pool_create("pjsua", 4000, 4000);
+
+    /* Init configs */
+    pjsua_config_default(&cfg);
+    pjsua_media_config_default(&media_cfg);
+    pjsua_transport_config_default(&udp_cfg);
+    udp_cfg.port = 50060;
+    pjsua_transport_config_default(&rtp_cfg);
+    rtp_cfg.port = 40000;
+
+    pjsua_logging_config_default(&log_cfg);
+    log_cfg.level = 5;
+    log_cfg.log_filename = pj_str("\\pjsua.txt");
+    log_cfg.msg_logging = 1;
+    log_cfg.decor = pj_log_get_decor() | PJ_LOG_HAS_CR;
+
+    /* Setup media */
+    media_cfg.clock_rate = 8000;
+    media_cfg.ec_options = PJMEDIA_ECHO_SIMPLE;
+    media_cfg.ec_tail_len = 256;
+    media_cfg.quality = 1;
+    media_cfg.ptime = 20;
+
+    /* Initialize application callbacks */
+    cfg.cb.on_call_state = &on_call_state;
+    cfg.cb.on_call_media_state = &on_call_media_state;
+    cfg.cb.on_incoming_call = &on_incoming_call;
+    cfg.cb.on_reg_state = &on_reg_state;
+    cfg.cb.on_buddy_state = &on_buddy_state;
+    cfg.cb.on_pager = &on_pager;
+    cfg.cb.on_typing = &on_typing;
+
+    /* Initialize pjsua */
+    status = pjsua_init(&cfg, &log_cfg, &media_cfg);
+    if (status != PJ_SUCCESS) {
+	OnError(TEXT("Initialization error"), status);
+	return FALSE;
+    }
+
+    /* Set codec priority */
+    pjsua_codec_set_priority(pj_cstr(&tmp, "pcmu"), 240);
+    pjsua_codec_set_priority(pj_cstr(&tmp, "pcma"), 230);
+    pjsua_codec_set_priority(pj_cstr(&tmp, "speex/8000"), 190);
+    pjsua_codec_set_priority(pj_cstr(&tmp, "ilbc"), 189);
+    pjsua_codec_set_priority(pj_cstr(&tmp, "speex/16000"), 180);
+    pjsua_codec_set_priority(pj_cstr(&tmp, "speex/32000"), 0);
+    pjsua_codec_set_priority(pj_cstr(&tmp, "gsm"), 100);
+
+
+    /* Add UDP transport and the corresponding PJSUA account */
+    status = pjsua_transport_create(PJSIP_TRANSPORT_UDP,
+				    &udp_cfg, &transport_id);
+    if (status != PJ_SUCCESS) {
+	OnError(TEXT("Error starting SIP transport"), status);
+	return FALSE;
+    }
+
+    pjsua_transport_get_info(transport_id, &transport_info);
+
+    g_local_uri.ptr = (char*)pj_pool_alloc(g_pool, 128);
+    g_local_uri.slen = pj_ansi_sprintf(g_local_uri.ptr,
+				       "<sip:%.*s:%d>",
+				       (int)transport_info.local_name.host.slen,
+				       transport_info.local_name.host.ptr,
+				       transport_info.local_name.port);
+
+
+    /* Add local account */
+    pjsua_acc_add_local(transport_id, PJ_TRUE, &g_current_acc);
+    pjsua_acc_set_online_status(g_current_acc, PJ_TRUE);
+
+    /* Start pjsua */
+    status = pjsua_start();
+    if (status != PJ_SUCCESS) {
+	OnError(TEXT("Error starting pjsua"), status);
+	return FALSE;
+    }
+
+    return TRUE;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+
+int WINAPI WinMain(HINSTANCE hInstance,
+		   HINSTANCE hPrevInstance,
+		   LPTSTR    lpCmdLine,
+		   int       nCmdShow)
+{
+    MSG msg;
+    HACCEL hAccelTable;
+    
+
+
+    // Perform application initialization:
+    if (!InitInstance (hInstance, nCmdShow)) 
+    {
+	return FALSE;
+    }
+    
+    hAccelTable = LoadAccelerators(hInstance, (LPCTSTR)IDC_PJSUA_WINCE);
+    
+    
+    // Main message loop:
+    while (GetMessage(&msg, NULL, 0, 0)) 
+    {
+	if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) 
+	{
+	    TranslateMessage(&msg);
+	    DispatchMessage(&msg);
+	}
+    }
+    
+    return msg.wParam;
+}
+
+static ATOM MyRegisterClass(HINSTANCE hInstance, LPTSTR szWindowClass)
+{
+    WNDCLASS wc;
+
+    wc.style		= CS_HREDRAW | CS_VREDRAW;
+    wc.lpfnWndProc	= (WNDPROC) WndProc;
+    wc.cbClsExtra	= 0;
+    wc.cbWndExtra	= 0;
+    wc.hInstance	= hInstance;
+    wc.hIcon		= LoadIcon(hInstance, MAKEINTRESOURCE(IDI_PJSUA_WINCE));
+    wc.hCursor		= 0;
+    wc.hbrBackground	= (HBRUSH) GetStockObject(WHITE_BRUSH);
+    wc.lpszMenuName	= 0;
+    wc.lpszClassName	= szWindowClass;
+
+    return RegisterClass(&wc);
+}
+
+
+
+BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
+{
+    HWND	hWnd;
+    TCHAR	szTitle[MAX_LOADSTRING];
+    TCHAR	szWindowClass[MAX_LOADSTRING];
+
+    hInst = hInstance;
+
+    /* Init stack */
+    if (OnInitStack() == FALSE)
+	return FALSE;
+
+    LoadString(hInstance, IDC_PJSUA_WINCE, szWindowClass, MAX_LOADSTRING);
+    MyRegisterClass(hInstance, szWindowClass);
+
+    LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
+    hWnd = CreateWindow(szWindowClass, szTitle, WS_VISIBLE,
+	    CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 200, 
+	    NULL, NULL, hInstance, NULL);
+
+    if (!hWnd)
+    {	
+	    return FALSE;
+    }
+
+    hMainWnd = hWnd;
+    ShowWindow(hWnd, nCmdShow);
+    UpdateWindow(hWnd);
+    if (hwndCB)
+	CommandBar_Show(hwndCB, TRUE);
+
+    SetTimer(hMainWnd, ID_POLL_TIMER, 50, NULL);
+    return TRUE;
+}
+
+
+static void OnCreate(HWND hWnd)
+{
+    enum 
+    {
+	X = 10,
+	Y = 40,
+	W = 220,
+	H = 30,
+    };
+
+    DWORD dwStyle;
+
+    hMainWnd = hWnd;
+
+    hwndCB = CommandBar_Create(hInst, hWnd, 1);			
+    CommandBar_InsertMenubar(hwndCB, hInst, IDM_MENU, 0);   
+    CommandBar_AddAdornments(hwndCB, 0, 0);
+
+    // Create global status text
+    dwStyle = WS_CHILD | WS_VISIBLE | WS_DISABLED | ES_LEFT;  
+    hwndGlobalStatus = CreateWindow(
+                TEXT("EDIT"),   // Class name
+                NULL,           // Window text
+                dwStyle,        // Window style
+                X,		// x-coordinate of the upper-left corner
+                Y+0,            // y-coordinate of the upper-left corner
+                W,		// Width of the window for the edit
+                                // control
+                H-5,		// Height of the window for the edit
+                                // control
+                hWnd,           // Window handle to the parent window
+                (HMENU) ID_GLOBAL_STATUS, // Control identifier
+                hInst,           // Instance handle
+                NULL);          // Specify NULL for this parameter when 
+                                // you create a control
+    SetLocalURI(g_local_uri.ptr, g_local_uri.slen, false);
+
+
+    // Create URI edit
+    dwStyle = WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER;  
+    hwndURI = CreateWindow (
+                TEXT("EDIT"),   // Class name
+                NULL,		// Window text
+                dwStyle,        // Window style
+                X,  // x-coordinate of the upper-left corner
+                Y+H,  // y-coordinate of the upper-left corner
+                W,  // Width of the window for the edit
+                                // control
+                H-5,  // Height of the window for the edit
+                                // control
+                hWnd,           // Window handle to the parent window
+                (HMENU) ID_URI, // Control identifier
+                hInst,           // Instance handle
+                NULL);          // Specify NULL for this parameter when 
+                                // you create a control
+
+    // Create action Button
+    hwndActionButton = CreateWindow( L"button", L"Action", 
+                         WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
+                         X, Y+2*H, 
+			 60, H-5, hWnd, 
+                         (HMENU) ID_BTN_ACTION,
+                         hInst, NULL );
+
+    // Create exit button
+    hwndExitButton = CreateWindow( L"button", L"E&xit", 
+                         WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 
+                         X+70, Y+2*H, 
+			 60, H-5, hWnd, 
+                         (HMENU) ID_EXIT,
+                         hInst, NULL );
+
+
+    // Create call status edit
+    dwStyle = WS_CHILD | WS_VISIBLE | WS_DISABLED;  
+    hwndCallStatus = CreateWindow (
+                TEXT("EDIT"),   // Class name
+                NULL,		// Window text
+                dwStyle,        // Window style
+                X,  // x-coordinate of the upper-left corner
+                Y+3*H,  // y-coordinate of the upper-left corner
+                W,  // Width of the window for the edit
+                                // control
+                H-5,  // Height of the window for the edit
+                                // control
+                hWnd,           // Window handle to the parent window
+                (HMENU) ID_CALL_STATUS, // Control identifier
+                hInst,           // Instance handle
+                NULL);          // Specify NULL for this parameter when 
+                                // you create a control
+    SetCallStatus("Ready", 5);
+    SetAction(ID_MENU_CALL);
+    SetURI(DEFAULT_URI, -1);
+    SetFocus(hWnd);
+
+}
+
+
+static void OnDestroy(void)
+{
+    pjsua_destroy();
+}
+
+static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+{
+    int wmId, wmEvent;
+    
+    switch (message) {
+    case WM_KEYUP:
+	if (wParam==114) {
+	    wParam = ID_MENU_CALL;
+	} else if (wParam==115) {
+	    if (g_current_call == PJSUA_INVALID_ID)
+		wParam = ID_EXIT;
+	    else
+		wParam = ID_MENU_DISCONNECT;
+	} else
+	    break;
+
+    case WM_COMMAND:
+	wmId    = LOWORD(wParam); 
+	wmEvent = HIWORD(wParam); 
+	if (wmId == ID_BTN_ACTION)
+	    wmId = g_current_action;
+	switch (wmId)
+	{
+	case ID_MENU_CALL:
+	    if (g_current_call != PJSUA_INVALID_ID) {
+		MessageBox(NULL, TEXT("Can not make call"), 
+			   TEXT("You already have one call active"), MB_OK);
+	    }
+	    pj_str_t dst_uri;
+	    wchar_t text[256];
+	    char tmp[256];
+	    pj_status_t status;
+
+	    GetWindowText(hwndURI, text, PJ_ARRAY_SIZE(text));
+	    pj_unicode_to_ansi(text, pj_unicode_strlen(text),
+			       tmp, sizeof(tmp));
+	    dst_uri.ptr = tmp;
+	    dst_uri.slen = pj_ansi_strlen(tmp);
+	    status = pjsua_call_make_call(g_current_acc,
+						      &dst_uri, 0, NULL,
+						      NULL, &g_current_call);
+	    if (status != PJ_SUCCESS)
+		OnError(TEXT("Unable to make call"), status);
+	    break;
+	case ID_MENU_ANSWER:
+	    if (g_current_call == PJSUA_INVALID_ID)
+		MessageBox(NULL, TEXT("Can not answer"), 
+			   TEXT("There is no call!"), MB_OK);
+	    else
+		pjsua_call_answer(g_current_call, 200, NULL, NULL);
+	    break;
+	case ID_MENU_DISCONNECT:
+	    if (g_current_call == PJSUA_INVALID_ID)
+		MessageBox(NULL, TEXT("Can not disconnect"), 
+			   TEXT("There is no call!"), MB_OK);
+	    else
+		pjsua_call_hangup(g_current_call, PJSIP_SC_DECLINE, NULL, NULL);
+	    break;
+	case ID_EXIT:
+	    DestroyWindow(hWnd);
+	    break;
+	default:
+	    return DefWindowProc(hWnd, message, wParam, lParam);
+	}
+	break;
+
+    case WM_CREATE:
+	OnCreate(hWnd);
+	break;
+
+    case WM_DESTROY:
+	OnDestroy();
+	CommandBar_Destroy(hwndCB);
+	PostQuitMessage(0);
+	break;
+
+    case WM_TIMER:
+	pjsua_handle_events(1);
+	break;
+
+    default:
+	return DefWindowProc(hWnd, message, wParam, lParam);
+    }
+   return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/pjsua_wince.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/pjsua_wince.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/pjsua_wince.h	(revision 1163)
@@ -0,0 +1,12 @@
+
+#if !defined(AFX_PJSUA_WINCE_H__F6793AE3_47AC_45D8_B00D_AB766E72C6BF__INCLUDED_)
+#define AFX_PJSUA_WINCE_H__F6793AE3_47AC_45D8_B00D_AB766E72C6BF__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+#include "resource.h"
+
+
+#endif // !defined(AFX_PJSUA_WINCE_H__F6793AE3_47AC_45D8_B00D_AB766E72C6BF__INCLUDED_)
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/pjsua_wince.rc
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/pjsua_wince.rc	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/pjsua_wince.rc	(revision 1163)
@@ -0,0 +1,108 @@
+//Microsoft eMbedded Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "newres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_PJSUA_WINCE         ICON    DISCARDABLE     "pjsua_wince.ICO"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "#include ""newres.h""\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE 
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menubar
+//
+
+IDM_MENU MENU DISCARDABLE 
+BEGIN
+    MENUITEM "E&xit",                       ID_EXIT
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accelerator
+//
+
+IDC_PJSUA_WINCE ACCELERATORS DISCARDABLE 
+BEGIN
+    "/",            IDM_HELP_ABOUT,         ASCII,  ALT, NOINVERT
+    VK_F4,          IDM_FILE_EXIT,          VIRTKEY, ALT, NOINVERT
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE 
+BEGIN
+    IDS_APP_TITLE           "pjsua_wince"
+    IDS_HELLO               "Hello World!"
+    IDC_PJSUA_WINCE         "PJSUA_WINCE"
+END
+
+#endif    // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/pjsua_wince.vcp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/pjsua_wince.vcp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/pjsua_wince.vcp	(revision 1163)
@@ -0,0 +1,1058 @@
+# Microsoft eMbedded Visual Tools Project File - Name="pjsua_wince" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE x86) Application" 0x8301
+# TARGTYPE "Win32 (WCE ARMV4) Application" 0xa301
+# TARGTYPE "Win32 (WCE ARMV4I) Application" 0xa501
+# TARGTYPE "Win32 (WCE emulator) Application" 0xa601
+# TARGTYPE "Win32 (WCE ARMV4T) Application" 0xa401
+
+CFG=pjsua_wince - Win32 (WCE emulator) Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsua_wince.vcn".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsua_wince.vcn" CFG="pjsua_wince - Win32 (WCE emulator) Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjsua_wince - Win32 (WCE emulator) Release" (based on "Win32 (WCE emulator) Application")
+!MESSAGE "pjsua_wince - Win32 (WCE emulator) Debug" (based on "Win32 (WCE emulator) Application")
+!MESSAGE "pjsua_wince - Win32 (WCE ARMV4I) Release" (based on "Win32 (WCE ARMV4I) Application")
+!MESSAGE "pjsua_wince - Win32 (WCE ARMV4I) Debug" (based on "Win32 (WCE ARMV4I) Application")
+!MESSAGE "pjsua_wince - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Application")
+!MESSAGE "pjsua_wince - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Application")
+!MESSAGE "pjsua_wince - Win32 (WCE ARMV4T) Release" (based on "Win32 (WCE ARMV4T) Application")
+!MESSAGE "pjsua_wince - Win32 (WCE ARMV4T) Debug" (based on "Win32 (WCE ARMV4T) Application")
+!MESSAGE "pjsua_wince - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Application")
+!MESSAGE "pjsua_wince - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project 2
+
+!IF  "$(CFG)" == "pjsua_wince - Win32 (WCE emulator) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "../../build/wince-evc4/output/pjsua-wince-emulatorRel"
+# PROP BASE Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-emulatorRel"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "../../build/wince-evc4/output/pjsua-wince-emulatorRel"
+# PROP Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-emulatorRel"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /Yu"stdafx.h" /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjsip/include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /Yu"stdafx.h" /Gs8192 /GF /O2 /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib winsock.lib ws2.lib iphlpapi.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE emulator) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "../../build/wince-evc4/output/pjsua-wince-emulatorDbg"
+# PROP BASE Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-emulatorDbg"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "../../build/wince-evc4/output/pjsua-wince-emulatorDbg"
+# PROP Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-emulatorDbg"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "$(CePlatform)" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "_X86_" /d "x86" /d "_i386_" /r
+# ADD RSC /l 0x409 /d "$(CePlatform)" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "_X86_" /d "x86" /d "_i386_" /r
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /Yu"stdafx.h" /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../../pjsip/include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /FR /Yu"stdafx.h" /Gs8192 /GF /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib winsock.lib ws2.lib iphlpapi.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4I) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4IRel"
+# PROP BASE Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4IRel"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4IRel"
+# PROP Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4IRel"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4I" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4I" /r
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjsip/include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib iphlpapi.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4I) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4IDbg"
+# PROP BASE Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4IDbg"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4IDbg"
+# PROP Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4IDbg"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4I" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4I" /r
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjsip/include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib iphlpapi.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4Rel"
+# PROP BASE Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4Rel"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4Rel"
+# PROP Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4Rel"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjsip/include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /O2 /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib iphlpapi.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4Dbg"
+# PROP BASE Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4Dbg"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4Dbg"
+# PROP Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4Dbg"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjsip/include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /M$(CECrtMTDebug) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib iphlpapi.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4T) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4TRel"
+# PROP BASE Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4TRel"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4TRel"
+# PROP Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4TRel"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4T" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4T" /r
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjsip/include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /Yu"stdafx.h" /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib iphlpapi.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4T) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4TDbg"
+# PROP BASE Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4TDbg"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4TDbg"
+# PROP Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-ARMV4TDbg"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4T" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "$(CePlatform)" /d "THUMB" /d "_THUMB_" /d "ARM" /d "_ARM_" /d "ARMV4T" /r
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjsip/include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "UNICODE" /D "_UNICODE" /Yu"stdafx.h" /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib ws2.lib iphlpapi.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /MACHINE:THUMB
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE x86) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "../../build/wince-evc4/output/pjsua-wince-X86Rel"
+# PROP BASE Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-X86Rel"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "../../build/wince-evc4/output/pjsua-wince-X86Rel"
+# PROP Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-X86Rel"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r
+# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "NDEBUG" /d "$(CePlatform)" /d "_X86_" /d "x86" /d "_i386_" /r
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /Yu"stdafx.h" /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjsip/include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /Yu"stdafx.h" /Gs8192 /GF /O2 /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib winsock.lib ws2.lib iphlpapi.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE x86) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "../../build/wince-evc4/output/pjsua-wince-X86Dbg"
+# PROP BASE Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-X86Dbg"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "../../build/wince-evc4/output/pjsua-wince-X86Dbg"
+# PROP Intermediate_Dir "../../build/wince-evc4/output/pjsua-wince-X86Dbg"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+RSC=rc.exe
+# ADD BASE RSC /l 0x409 /d "$(CePlatform)" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "_X86_" /d "x86" /d "_i386_" /r
+# ADD RSC /l 0x409 /d "$(CePlatform)" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "UNICODE" /d "_UNICODE" /d "DEBUG" /d "_X86_" /d "x86" /d "_i386_" /r
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /Yu"stdafx.h" /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjsip/include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "_i386_" /D UNDER_CE=$(CEVersion) /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "i_386_" /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /Yu"stdafx.h" /Gs8192 /GF /c
+MTL=midl.exe
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 commctrl.lib coredll.lib $(CEx86Corelibc) /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+# ADD LINK32 $(CEx86Corelibc) commctrl.lib coredll.lib winsock.lib ws2.lib iphlpapi.lib /nologo /base:"0x00010000" /stack:0x10000,0x1000 /entry:"WinMainCRTStartup" /debug /nodefaultlib:"OLDNAMES.lib" /nodefaultlib:$(CENoDefaultLib) /subsystem:$(CESubsystem) /MACHINE:IX86
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjsua_wince - Win32 (WCE emulator) Release"
+# Name "pjsua_wince - Win32 (WCE emulator) Debug"
+# Name "pjsua_wince - Win32 (WCE ARMV4I) Release"
+# Name "pjsua_wince - Win32 (WCE ARMV4I) Debug"
+# Name "pjsua_wince - Win32 (WCE ARMV4) Release"
+# Name "pjsua_wince - Win32 (WCE ARMV4) Debug"
+# Name "pjsua_wince - Win32 (WCE ARMV4T) Release"
+# Name "pjsua_wince - Win32 (WCE ARMV4T) Debug"
+# Name "pjsua_wince - Win32 (WCE x86) Release"
+# Name "pjsua_wince - Win32 (WCE x86) Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\pjsua_wince.cpp
+
+!IF  "$(CFG)" == "pjsua_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PJSUA=\
+	".\pjsua_wince.h"\
+	".\StdAfx.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\srv_resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\stun_simple.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\alaw_ulaw.h"\
+	"..\..\..\pjmedia\include\pjmedia\bidirectional.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mp3_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\tonegen.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_ice.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_playlist.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\..\pjsip\include\pjsip-simple\evsub.h"\
+	"..\..\..\pjsip\include\pjsip-simple\iscomposing.h"\
+	"..\..\..\pjsip\include\pjsip-simple\pidf.h"\
+	"..\..\..\pjsip\include\pjsip-simple\presence.h"\
+	"..\..\..\pjsip\include\pjsip-simple\publish.h"\
+	"..\..\..\pjsip\include\pjsip-simple\types.h"\
+	"..\..\..\pjsip\include\pjsip-simple\xpidf.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_inv.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_regc.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_replaces.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_xfer.h"\
+	"..\..\..\pjsip\include\pjsip.h"\
+	"..\..\..\pjsip\include\pjsip\sip_auth.h"\
+	"..\..\..\pjsip\include\pjsip\sip_auth_msg.h"\
+	"..\..\..\pjsip\include\pjsip\sip_autoconf.h"\
+	"..\..\..\pjsip\include\pjsip\sip_config.h"\
+	"..\..\..\pjsip\include\pjsip\sip_dialog.h"\
+	"..\..\..\pjsip\include\pjsip\sip_endpoint.h"\
+	"..\..\..\pjsip\include\pjsip\sip_errno.h"\
+	"..\..\..\pjsip\include\pjsip\sip_event.h"\
+	"..\..\..\pjsip\include\pjsip\sip_module.h"\
+	"..\..\..\pjsip\include\pjsip\sip_msg.h"\
+	"..\..\..\pjsip\include\pjsip\sip_parser.h"\
+	"..\..\..\pjsip\include\pjsip\sip_resolve.h"\
+	"..\..\..\pjsip\include\pjsip\sip_tel_uri.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transaction.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_loop.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_tcp.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_tls.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_udp.h"\
+	"..\..\..\pjsip\include\pjsip\sip_types.h"\
+	"..\..\..\pjsip\include\pjsip\sip_ua_layer.h"\
+	"..\..\..\pjsip\include\pjsip\sip_uri.h"\
+	"..\..\..\pjsip\include\pjsip\sip_util.h"\
+	"..\..\..\pjsip\include\pjsip_simple.h"\
+	"..\..\..\pjsip\include\pjsip_ua.h"\
+	"..\..\..\pjsip\include\pjsua-lib\pjsua.h"\
+	".\pjsua_wince.h"\
+	".\StdAfx.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PJSUA=\
+	".\pjsua_wince.h"\
+	".\StdAfx.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PJSUA=\
+	".\pjsua_wince.h"\
+	".\StdAfx.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\..\pjsip\include\pjsip-simple\evsub.h"\
+	"..\..\..\pjsip\include\pjsip-simple\iscomposing.h"\
+	"..\..\..\pjsip\include\pjsip-simple\pidf.h"\
+	"..\..\..\pjsip\include\pjsip-simple\presence.h"\
+	"..\..\..\pjsip\include\pjsip-simple\types.h"\
+	"..\..\..\pjsip\include\pjsip-simple\xpidf.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_inv.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_regc.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_xfer.h"\
+	"..\..\..\pjsip\include\pjsip.h"\
+	"..\..\..\pjsip\include\pjsip\sip_auth.h"\
+	"..\..\..\pjsip\include\pjsip\sip_auth_msg.h"\
+	"..\..\..\pjsip\include\pjsip\sip_config.h"\
+	"..\..\..\pjsip\include\pjsip\sip_dialog.h"\
+	"..\..\..\pjsip\include\pjsip\sip_endpoint.h"\
+	"..\..\..\pjsip\include\pjsip\sip_errno.h"\
+	"..\..\..\pjsip\include\pjsip\sip_event.h"\
+	"..\..\..\pjsip\include\pjsip\sip_module.h"\
+	"..\..\..\pjsip\include\pjsip\sip_msg.h"\
+	"..\..\..\pjsip\include\pjsip\sip_parser.h"\
+	"..\..\..\pjsip\include\pjsip\sip_resolve.h"\
+	"..\..\..\pjsip\include\pjsip\sip_tel_uri.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transaction.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_loop.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_tcp.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_udp.h"\
+	"..\..\..\pjsip\include\pjsip\sip_types.h"\
+	"..\..\..\pjsip\include\pjsip\sip_ua_layer.h"\
+	"..\..\..\pjsip\include\pjsip\sip_uri.h"\
+	"..\..\..\pjsip\include\pjsip\sip_util.h"\
+	"..\..\..\pjsip\include\pjsip_simple.h"\
+	"..\..\..\pjsip\include\pjsip_ua.h"\
+	"..\..\..\pjsip\include\pjsua-lib\pjsua.h"\
+	".\pjsua_wince.h"\
+	".\StdAfx.h"\
+	
+NODEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\srv_resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\stun_simple.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\alaw_ulaw.h"\
+	"..\..\..\pjmedia\include\pjmedia\bidirectional.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mp3_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\tonegen.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_ice.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_playlist.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\..\pjsip\include\pjsip-simple\evsub.h"\
+	"..\..\..\pjsip\include\pjsip-simple\iscomposing.h"\
+	"..\..\..\pjsip\include\pjsip-simple\pidf.h"\
+	"..\..\..\pjsip\include\pjsip-simple\presence.h"\
+	"..\..\..\pjsip\include\pjsip-simple\publish.h"\
+	"..\..\..\pjsip\include\pjsip-simple\types.h"\
+	"..\..\..\pjsip\include\pjsip-simple\xpidf.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_inv.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_regc.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_replaces.h"\
+	"..\..\..\pjsip\include\pjsip-ua\sip_xfer.h"\
+	"..\..\..\pjsip\include\pjsip.h"\
+	"..\..\..\pjsip\include\pjsip\sip_auth.h"\
+	"..\..\..\pjsip\include\pjsip\sip_auth_msg.h"\
+	"..\..\..\pjsip\include\pjsip\sip_autoconf.h"\
+	"..\..\..\pjsip\include\pjsip\sip_config.h"\
+	"..\..\..\pjsip\include\pjsip\sip_dialog.h"\
+	"..\..\..\pjsip\include\pjsip\sip_endpoint.h"\
+	"..\..\..\pjsip\include\pjsip\sip_errno.h"\
+	"..\..\..\pjsip\include\pjsip\sip_event.h"\
+	"..\..\..\pjsip\include\pjsip\sip_module.h"\
+	"..\..\..\pjsip\include\pjsip\sip_msg.h"\
+	"..\..\..\pjsip\include\pjsip\sip_parser.h"\
+	"..\..\..\pjsip\include\pjsip\sip_resolve.h"\
+	"..\..\..\pjsip\include\pjsip\sip_tel_uri.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transaction.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_loop.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_tcp.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_tls.h"\
+	"..\..\..\pjsip\include\pjsip\sip_transport_udp.h"\
+	"..\..\..\pjsip\include\pjsip\sip_types.h"\
+	"..\..\..\pjsip\include\pjsip\sip_ua_layer.h"\
+	"..\..\..\pjsip\include\pjsip\sip_uri.h"\
+	"..\..\..\pjsip\include\pjsip\sip_util.h"\
+	"..\..\..\pjsip\include\pjsip_simple.h"\
+	"..\..\..\pjsip\include\pjsip_ua.h"\
+	"..\..\..\pjsip\include\pjsua-lib\pjsua.h"\
+	".\pjsua_wince.h"\
+	".\StdAfx.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PJSUA=\
+	".\pjsua_wince.h"\
+	".\StdAfx.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PJSUA=\
+	".\pjsua_wince.h"\
+	".\StdAfx.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PJSUA=\
+	".\pjsua_wince.h"\
+	".\StdAfx.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PJSUA=\
+	".\pjsua_wince.h"\
+	".\StdAfx.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\pjsua_wince.rc
+
+!IF  "$(CFG)" == "pjsua_wince - Win32 (WCE emulator) Release"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE emulator) Debug"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4I) Release"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4I) Debug"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4) Release"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4) Debug"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4T) Release"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4T) Debug"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE x86) Release"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE x86) Debug"
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.cpp
+
+!IF  "$(CFG)" == "pjsua_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_STDAF=\
+	".\StdAfx.h"\
+	
+# ADD CPP /Yc"stdafx.h"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_STDAF=\
+	".\StdAfx.h"\
+	
+# ADD CPP /Yc"stdafx.h"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_STDAF=\
+	".\StdAfx.h"\
+	
+# ADD CPP /Yc"stdafx.h"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_STDAF=\
+	".\StdAfx.h"\
+	
+# ADD CPP /Yc"stdafx.h"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_STDAF=\
+	".\StdAfx.h"\
+	
+# ADD CPP /Yc"stdafx.h"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_STDAF=\
+	".\StdAfx.h"\
+	
+# ADD CPP /Yc"stdafx.h"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_STDAF=\
+	".\StdAfx.h"\
+	
+# ADD CPP /Yc"stdafx.h"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_STDAF=\
+	".\StdAfx.h"\
+	
+# ADD CPP /Yc"stdafx.h"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_STDAF=\
+	".\StdAfx.h"\
+	
+# ADD CPP /Yc"stdafx.h"
+
+!ELSEIF  "$(CFG)" == "pjsua_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_STDAF=\
+	".\StdAfx.h"\
+	
+# ADD CPP /Yc"stdafx.h"
+
+!ENDIF 
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\newres.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\pjsua_wince.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\StdAfx.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\pjsua_wince.ico
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\ReadMe.txt
+# End Source File
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/resource.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/resource.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/pjsua_wince/resource.h	(revision 1163)
@@ -0,0 +1,28 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft eMbedded Visual C++ generated include file.
+// Used by pjsua_wince.rc
+//
+#define IDS_APP_TITLE                   1
+#define IDS_HELLO                       2
+#define IDC_PJSUA_WINCE                 3
+#define IDI_PJSUA_WINCE                 101
+#define IDM_MENU                        102
+#define IDD_ABOUTBOX                    103
+#define IDM_FILE_EXIT                   40002
+#define IDM_HELP_ABOUT                  40003
+#define ID_MAKECALL                     40004
+#define ID_ANSWER                       40005
+#define ID_DISCONNECT                   40006
+#define ID_ACTION                       40007
+#define ID_EXIT                         65535
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE        104
+#define _APS_NEXT_COMMAND_VALUE         40008
+#define _APS_NEXT_CONTROL_VALUE         1001
+#define _APS_NEXT_SYMED_VALUE           101
+#endif
+#endif
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/Makefile
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/Makefile	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/Makefile	(revision 1163)
@@ -0,0 +1,6 @@
+all:
+	python setup.py install
+
+clean:
+	python setup.py clean
+	rm -rf ./build
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/pjsua.py
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/pjsua.py	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/pjsua.py	(revision 1163)
@@ -0,0 +1,264 @@
+import py_pjsua
+
+status = py_pjsua.create()
+print "py status " + `status`
+
+
+#
+# Create configuration objects
+#
+ua_cfg = py_pjsua.config_default()
+log_cfg = py_pjsua.logging_config_default()
+media_cfg = py_pjsua.media_config_default()
+
+#
+# Logging callback.
+#
+def logging_cb1(level, str, len):
+    print str,
+
+
+#
+# Configure logging
+#
+log_cfg.cb = logging_cb1
+log_cfg.console_level = 4
+
+#
+# Initialize pjsua!
+#
+status = py_pjsua.init(ua_cfg, log_cfg, media_cfg);
+print "py status after initialization :" + `status`
+
+
+#
+# Start pjsua!
+#
+status = py_pjsua.start()
+if status != 0:
+    exit(1)
+
+
+message = py_pjsua.msg_data_init()
+
+print "identitas object message data :" + `message`
+
+sipaddr = 'sip:167.205.34.99'
+print "checking sip address [%s] : %d" % (sipaddr, py_pjsua.verify_sip_url(sipaddr))
+
+sipaddr = '167.205.34.99'
+print "checking invalid sip address [%s] : %d" % (sipaddr, py_pjsua.verify_sip_url(sipaddr))
+
+object = py_pjsua.get_pjsip_endpt()
+print "identitas Endpoint :" + `object` + ""
+
+mediaend = py_pjsua.get_pjmedia_endpt()
+print "identitas Media Endpoint :" + `mediaend` + ""
+
+pool = py_pjsua.get_pool_factory()
+print "identitas pool factory :" + `pool` + ""
+
+status = py_pjsua.handle_events(3000)
+print "py status after 3 second of blocking wait :" + `status`
+
+
+
+# end of new testrun
+
+#
+
+# lib transport
+stunc = py_pjsua.stun_config_default();
+
+
+tc = py_pjsua.transport_config_default();
+
+
+py_pjsua.normalize_stun_config(stunc);
+
+
+status, id = py_pjsua.transport_create(1, tc);
+print "py transport create status " + `status`
+
+ti = py_pjsua.Transport_Info();
+ti = py_pjsua.transport_get_info(id)
+print "py transport get info status " + `status`
+
+status = py_pjsua.transport_set_enable(id,1)
+print "py transport set enable status " + `status`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","set enable",status)
+
+
+status = py_pjsua.transport_close(id,1)
+print "py transport close status " + `status`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","close",status)
+
+# end of lib transport
+
+# lib account 
+
+accfg = py_pjsua.acc_config_default()
+status, accid = py_pjsua.acc_add(accfg, 1)
+print "py acc add status " + `status`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","add acc",status)
+count = py_pjsua.acc_get_count()
+print "acc count " + `count`
+
+accid = py_pjsua.acc_get_default()
+
+print "acc id default " + `accid`
+
+# end of lib account
+
+#lib buddy
+
+bcfg = py_pjsua.Buddy_Config()
+status, id = py_pjsua.buddy_add(bcfg)
+acc_id = id
+print "py buddy add status " + `status` + " id " + `id`
+bool = py_pjsua.buddy_is_valid(id)
+print "py buddy is valid " + `bool`
+count = py_pjsua.get_buddy_count()
+print "buddy count " + `count`
+binfo = py_pjsua.buddy_get_info(id)
+ids = py_pjsua.enum_buddies()
+status = py_pjsua.buddy_del(id)
+print "py buddy del status " + `status`
+status = py_pjsua.buddy_subscribe_pres(id, 1)
+print "py buddy subscribe pres status " + `status`
+py_pjsua.pres_dump(1)
+status = py_pjsua.im_send(accid, "fahris@divusi.com", "", "hallo", message, 0)
+print "py im send status " + `status`
+status = py_pjsua.im_typing(accid, "fahris@divusi.com", 1, message)
+print "py im typing status " + `status`
+#print "binfo " + `binfo`
+
+#end of lib buddy
+
+#lib media
+count = py_pjsua.conf_get_max_ports()
+print "py media conf get max ports " + `count`
+count = py_pjsua.conf_get_active_ports()
+print "py media conf get active ports " + `count`
+ids = py_pjsua.enum_conf_ports()
+for id in ids:
+	print "py media conf ports " + `id`
+	cp_info = py_pjsua.conf_get_port_info(id)
+	print "port info name " + cp_info.name
+pool = py_pjsua.PJ_Pool()
+port = py_pjsua.PJMedia_Port()
+status, id = py_pjsua.conf_add_port(pool,port)
+print "py media conf add port status " + `status` + " id " + `id`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","add port",status)
+status = py_pjsua.conf_remove_port(id)
+print "py media conf remove port status " + `status`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","remove port",status)
+status = py_pjsua.conf_connect(id, id)
+print "py media conf connect status " + `status`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","connect",status)
+status = py_pjsua.conf_disconnect(id, id)
+print "py media conf disconnect status " + `status`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","disconnect",status)
+status, id = py_pjsua.player_create("test.wav", 0)
+print "py media player create status " + `status` + " id " + `id`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","player create",status)
+c_id = py_pjsua.player_get_conf_port(id)
+print "py media player get conf port id " + `c_id`
+status = py_pjsua.player_set_pos(id, 10)
+if status != 0 :
+	py_pjsua.perror("py_pjsua","player set pos",status)
+status = py_pjsua.player_destroy(id)
+if status != 0 :
+	py_pjsua.perror("py_pjsua","player destroy",status)
+status, id = py_pjsua.recorder_create("rec.wav", 0, "None", 1000, 0)
+print "py media recorder create status " + `status` + " id " + `id`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","recorder create",status)
+status = py_pjsua.recorder_get_conf_port(id)
+print "py media recorder get conf port status " + `status`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","recorder get conf port",status)
+status = py_pjsua.recorder_destroy(id)
+print "py media recorder destroy status " + `status`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","recorder destroy",status)
+#cdev, pdev = py_pjsua.get_snd_dev()
+#print "py media get snd dev capture dev " + `cdev` + " playback dev " + `pdev`
+status = py_pjsua.set_snd_dev(0,1)
+print "py media set snd dev status " + `status`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","set snd dev",status)
+status = py_pjsua.set_null_snd_dev()
+print "py media set null snd dev status " + `status`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","set null snd dev",status)
+port = py_pjsua.set_no_snd_dev()
+status = py_pjsua.set_ec(0,0)
+print "py media set ec status " + `status`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","set ec",status)
+tail = py_pjsua.get_ec_tail()
+print "py media get ec tail " + `tail`
+infos = py_pjsua.enum_codecs()
+for info in infos:
+	print "py media enum codecs " + `info`
+status = py_pjsua.codec_set_priority("coba", 0)
+print "py media codec set priority " + `status`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","codec set priority",status)
+c_param = py_pjsua.codec_get_param("coba")
+status = py_pjsua.codec_set_param("coba", c_param)
+print "py media codec set param " + `status`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","codec set param",status)
+	
+#end of lib media
+
+#lib call
+
+count = py_pjsua.call_get_max_count()
+print "py call get max count " + `count`
+count = py_pjsua.call_get_count()
+print "py call get count " + `count`
+ids = py_pjsua.enum_calls()
+for id in ids:
+	print "py enum calls id " + `id`
+msg_data = py_pjsua.Msg_Data()
+status, id = py_pjsua.call_make_call(-1, "sip:bulukucing1@iptel.org", 0, 0, msg_data)
+print "py call make call " + `status` + " id " + `id`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","call make call",status)
+bool = py_pjsua.call_is_active(id)
+print "py call is active " + `bool`
+bool = py_pjsua.call_has_media(id)
+print "py call has media " + `bool`
+cp_id = py_pjsua.call_get_conf_port(id)
+print "py call get conf port " + `cp_id`
+info = py_pjsua.call_get_info(id)
+if info != None :
+	print "py info id " + `info.id`
+status = py_pjsua.call_set_user_data(id, 0)
+print "py call set user data status " + `status`
+if status != 0 :
+	py_pjsua.perror("py_pjsua","set user data",status)
+user_data = py_pjsua.call_get_user_data(id)
+print "py call get user data " + `user_data`
+
+
+
+#end of lib call
+
+py_pjsua.perror("saya","hallo",70006)
+
+status = py_pjsua.destroy()
+print "py status " + `status`
+
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/pjsua_app.py
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/pjsua_app.py	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/pjsua_app.py	(revision 1163)
@@ -0,0 +1,780 @@
+# $Id$
+#
+# Sample and simple Python script to make and receive calls, and do
+# presence and instant messaging/IM using PJSUA-API binding for Python.
+#
+# Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org>
+#
+import py_pjsua
+import sys
+import thread
+
+#
+# Configurations
+#
+THIS_FILE = "pjsua_app.py"
+C_QUIT = 0
+C_LOG_LEVEL = 4
+
+# STUN config.
+# Set C_STUN_SRV to the address of the STUN server to enable STUN
+#
+C_STUN_SRV = ""
+C_SIP_PORT = 5060
+C_STUN_PORT = 3478
+
+
+# Globals
+#
+g_ua_cfg = None
+g_acc_id = py_pjsua.PJSUA_INVALID_ID
+g_current_call = py_pjsua.PJSUA_INVALID_ID
+g_wav_files = []
+g_wav_id = 0
+g_wav_port = 0
+g_rec_file = ""
+g_rec_id = 0
+g_rec_port = 0
+
+# Utility: display PJ error and exit
+#
+def err_exit(title, rc):
+    py_pjsua.perror(THIS_FILE, title, rc)
+    exit(1)
+
+
+# Logging function (also callback, called by pjsua-lib)
+#
+def log_cb(level, str, len):
+    if level <= C_LOG_LEVEL:
+        print str,
+
+def write_log(level, str):
+    log_cb(level, str + "\n", 0)
+
+
+# Utility to get call info
+#
+def call_name(call_id):
+	ci = py_pjsua.call_get_info(call_id)
+	return "[Call " + `call_id` + " " + ci.remote_info + "]"
+
+# Callback when call state has changed.
+#
+def on_call_state(call_id, e):	
+	global g_current_call
+	ci = py_pjsua.call_get_info(call_id)
+	write_log(3, call_name(call_id) + " state = " + `ci.state_text`)
+	if ci.state == py_pjsua.PJSIP_INV_STATE_DISCONNECTED:
+		g_current_call = py_pjsua.PJSUA_INVALID_ID
+
+# Callback for incoming call
+#
+def on_incoming_call(acc_id, call_id, rdata):
+	global g_current_call
+	
+	if g_current_call != py_pjsua.PJSUA_INVALID_ID:
+		# There's call in progress - answer Busy
+		py_pjsua.call_answer(call_id, 486, None, None)
+		return
+	
+	g_current_call = call_id
+	ci = py_pjsua.call_get_info(call_id)
+	write_log(3, "*** Incoming call: " + call_name(call_id) + "***")
+	write_log(3, "*** Press a to answer or h to hangup  ***")
+	
+	
+	
+# Callback when media state has changed (e.g. established or terminated)
+#
+def on_call_media_state(call_id):
+	ci = py_pjsua.call_get_info(call_id)
+	if ci.media_status == py_pjsua.PJSUA_CALL_MEDIA_ACTIVE:
+		py_pjsua.conf_connect(ci.conf_slot, 0)
+		py_pjsua.conf_connect(0, ci.conf_slot)
+		write_log(3, call_name(call_id) + ": media is active")
+	else:
+		write_log(3, call_name(call_id) + ": media is inactive")
+
+
+# Callback when account registration state has changed
+#
+def on_reg_state(acc_id):
+	acc_info = py_pjsua.acc_get_info(acc_id)
+	if acc_info.has_registration != 0:
+		cmd = "registration"
+	else:
+		cmd = "unregistration"
+	if acc_info.status != 0 and acc_info.status != 200:
+		write_log(3, "Account " + cmd + " failed: rc=" + `acc_info.status` + " " + acc_info.status_text)
+	else:
+		write_log(3, "Account " + cmd + " success")
+
+
+# Callback when buddy's presence state has changed
+#
+def on_buddy_state(buddy_id):
+	write_log(3, "On Buddy state called")
+	buddy_info = py_pjsua.buddy_get_info(buddy_id)
+	if buddy_info.status != 0 and buddy_info.status != 200:
+		write_log(3, "Status of " + `buddy_info.uri` + " is " + `buddy_info.status_text`)
+	else:
+		write_log(3, "Status : " + `buddy_info.status`)
+
+# Callback on incoming pager (MESSAGE)
+#		
+def on_pager(call_id, strfrom, strto, contact, mime_type, text):
+	write_log(3, "MESSAGE from " + `strfrom` + " : " + `text`)
+
+
+# Callback on the delivery status of outgoing pager (MESSAGE)
+#	
+def on_pager_status(call_id, strto, body, user_data, status, reason):
+	write_log(3, "MESSAGE to " + `strto` + " status " + `status` + " reason " + `reason`)
+
+
+# Received typing indication
+#
+def on_typing(call_id, strfrom, to, contact, is_typing):
+	str_t = ""
+	if is_typing:
+		str_t = "is typing.."
+	else:
+		str_t = "has stopped typing"
+	write_log(3, "IM indication: " + strfrom + " " + str_t)
+
+# Received the status of previous call transfer request
+#
+def on_call_transfer_status(call_id,status_code,status_text,final,p_cont):
+	strfinal = ""
+	if final == 1:
+		strfinal = "[final]"
+	
+	write_log(3, "Call " + `call_id` + ": transfer status= " + `status_code` + " " + status_text+ " " + strfinal)
+	      
+	if status_code/100 == 2:
+		write_log(3, "Call " + `call_id` + " : call transfered successfully, disconnecting call")
+		status = py_pjsua.call_hangup(call_id, 410, None, None)
+		p_cont = 0
+
+# Callback on incoming call transfer request
+#		
+def on_call_transfer_request(call_id, dst, code):
+	write_log(3, "Call transfer request from " + `call_id` + " to " + dst + " with code " + `code`)
+
+#
+# Initialize pjsua.
+#
+def app_init():
+	global g_acc_id, g_ua_cfg
+
+	# Create pjsua before anything else
+	status = py_pjsua.create()
+	if status != 0:
+		err_exit("pjsua create() error", status)
+
+	# Create and initialize logging config
+	log_cfg = py_pjsua.logging_config_default()
+	log_cfg.level = C_LOG_LEVEL
+	log_cfg.cb = log_cb
+
+	# Create and initialize pjsua config
+	# Note: for this Python module, thread_cnt must be 0 since Python
+	#       doesn't like to be called from alien thread (pjsua's thread
+	#       in this case)	    
+	ua_cfg = py_pjsua.config_default()
+	ua_cfg.thread_cnt = 0
+	ua_cfg.user_agent = "PJSUA/Python 0.1"
+	ua_cfg.cb.on_incoming_call = on_incoming_call
+	ua_cfg.cb.on_call_media_state = on_call_media_state
+	ua_cfg.cb.on_reg_state = on_reg_state
+	ua_cfg.cb.on_call_state = on_call_state
+	ua_cfg.cb.on_buddy_state = on_buddy_state
+	ua_cfg.cb.on_pager = on_pager
+	ua_cfg.cb.on_pager_status = on_pager_status
+	ua_cfg.cb.on_typing = on_typing
+	ua_cfg.cb.on_call_transfer_status = on_call_transfer_status
+	ua_cfg.cb.on_call_transfer_request = on_call_transfer_request
+
+	# Create and initialize media config
+	med_cfg = py_pjsua.media_config_default()
+	med_cfg.ec_tail_len = 0
+
+	#
+	# Initialize pjsua!!
+	#
+	status = py_pjsua.init(ua_cfg, log_cfg, med_cfg)
+	if status != 0:
+		err_exit("pjsua init() error", status)
+
+	# Configure STUN config
+	#stun_cfg = py_pjsua.stun_config_default()
+	#stun_cfg.stun_srv1 = C_STUN_SRV
+	#stun_cfg.stun_srv2 = C_STUN_SRV
+	#stun_cfg.stun_port1 = C_STUN_PORT
+	#stun_cfg.stun_port2 = C_STUN_PORT
+
+	# Configure UDP transport config
+	transport_cfg = py_pjsua.transport_config_default()
+	transport_cfg.port = C_SIP_PORT
+	#transport_cfg.stun_config = stun_cfg
+	if C_STUN_SRV != "":
+		transport_cfg.use_stun = 1
+
+	# Create UDP transport
+	status, transport_id = \
+	    py_pjsua.transport_create(py_pjsua.PJSIP_TRANSPORT_UDP, transport_cfg)
+	if status != 0:
+		py_pjsua.destroy()
+		err_exit("Error creating UDP transport", status)
+
+	# Create initial default account
+	status, acc_id = py_pjsua.acc_add_local(transport_id, 1)
+	if status != 0:
+		py_pjsua.destroy()
+		err_exit("Error creating account", status)
+
+	g_acc_id = acc_id
+	g_ua_cfg = ua_cfg
+
+# Add SIP account interractively
+#
+def add_account():
+	global g_acc_id
+
+	acc_domain = ""
+	acc_username = ""
+	acc_passwd =""
+	confirm = ""
+	
+	# Input account configs
+	print "Your SIP domain (e.g. myprovider.com): ",
+	acc_domain = sys.stdin.readline()
+	if acc_domain == "\n": 
+		return
+	acc_domain = acc_domain.replace("\n", "")
+
+	print "Your username (e.g. alice): ",
+	acc_username = sys.stdin.readline()
+	if acc_username == "\n":
+		return
+	acc_username = acc_username.replace("\n", "")
+
+	print "Your password (e.g. secret): ",
+	acc_passwd = sys.stdin.readline()
+	if acc_passwd == "\n":
+		return
+	acc_passwd = acc_passwd.replace("\n", "")
+
+	# Configure account configuration
+	acc_cfg = py_pjsua.acc_config_default()
+	acc_cfg.id = "sip:" + acc_username + "@" + acc_domain
+	acc_cfg.reg_uri = "sip:" + acc_domain
+	acc_cfg.cred_count = 1
+	acc_cfg.cred_info[0].realm = acc_domain
+	acc_cfg.cred_info[0].scheme = "digest"
+	acc_cfg.cred_info[0].username = acc_username
+	acc_cfg.cred_info[0].data_type = 0
+	acc_cfg.cred_info[0].data = acc_passwd
+
+	# Add new SIP account
+	status, acc_id = py_pjsua.acc_add(acc_cfg, 1)
+	if status != 0:
+		py_pjsua.perror(THIS_FILE, "Error adding SIP account", status)
+	else:
+		g_acc_id = acc_id
+		write_log(3, "Account " + acc_cfg.id + " added")
+
+def add_player():
+	global g_wav_files
+	global g_wav_id
+	global g_wav_port
+	
+	file_name = ""
+	status = -1
+	wav_id = 0
+	
+	print "Enter the path of the file player(e.g. /tmp/audio.wav): ",
+	file_name = sys.stdin.readline()
+	if file_name == "\n": 
+		return
+	file_name = file_name.replace("\n", "")
+	status, wav_id = py_pjsua.player_create(file_name, 0)
+	if status != 0:
+		py_pjsua.perror(THIS_FILE, "Error adding file player ", status)
+	else:
+		g_wav_files.append(file_name)
+		if g_wav_id == 0:
+			g_wav_id = wav_id
+			g_wav_port = py_pjsua.player_get_conf_port(wav_id)
+		write_log(3, "File player " + file_name + " added")
+		
+def add_recorder():
+	global g_rec_file
+	global g_rec_id
+	global g_rec_port
+	
+	file_name = ""
+	status = -1
+	rec_id = 0
+	
+	print "Enter the path of the file recorder(e.g. /tmp/audio.wav): ",
+	file_name = sys.stdin.readline()
+	if file_name == "\n": 
+		return
+	file_name = file_name.replace("\n", "")
+	status, rec_id = py_pjsua.recorder_create(file_name, 0, None, 0, 0)
+	if status != 0:
+		py_pjsua.perror(THIS_FILE, "Error adding file recorder ", status)
+	else:
+		g_rec_file = file_name
+		g_rec_id = rec_id
+		g_rec_port = py_pjsua.recorder_get_conf_port(rec_id)
+		write_log(3, "File recorder " + file_name + " added")
+
+def conf_list():
+	ports = None
+	print "Conference ports : "
+	ports = py_pjsua.enum_conf_ports()
+
+	for port in ports:
+		info = None
+		info = py_pjsua.conf_get_port_info(port)
+		txlist = ""
+		for i in range(info.listener_cnt):
+			txlist = txlist + "#" + `info.listeners[i]` + " "
+		
+		print "Port #" + `info.slot_id` + "[" + `(info.clock_rate/1000)` + "KHz/" + `(info.samples_per_frame * 1000 / info.clock_rate)` + "ms] " + info.name + " transmitting to: " + txlist
+		
+def connect_port():
+	src_port = 0
+	dst_port = 0
+	
+	print "Connect src port # (empty to cancel): "
+	src_port = sys.stdin.readline()
+	if src_port == "\n": 
+		return
+	src_port = src_port.replace("\n", "")
+	src_port = int(src_port)
+	print "To dst port # (empty to cancel): "
+	dst_port = sys.stdin.readline()
+	if dst_port == "\n": 
+		return
+	dst_port = dst_port.replace("\n", "")
+	dst_port = int(dst_port)
+	status = py_pjsua.conf_connect(src_port, dst_port)
+	if status != 0:
+		py_pjsua.perror(THIS_FILE, "Error connecting port ", status)
+	else:		
+		write_log(3, "Port connected from " + `src_port` + " to " + `dst_port`)
+		
+def disconnect_port():
+	src_port = 0
+	dst_port = 0
+	
+	print "Disconnect src port # (empty to cancel): "
+	src_port = sys.stdin.readline()
+	if src_port == "\n": 
+		return
+	src_port = src_port.replace("\n", "")
+	src_port = int(src_port)
+	print "From dst port # (empty to cancel): "
+	dst_port = sys.stdin.readline()
+	if dst_port == "\n": 
+		return
+	dst_port = dst_port.replace("\n", "")
+	dst_port = int(dst_port)
+	status = py_pjsua.conf_disconnect(src_port, dst_port)
+	if status != 0:
+		py_pjsua.perror(THIS_FILE, "Error disconnecting port ", status)
+	else:		
+		write_log(3, "Port disconnected " + `src_port` + " from " + `dst_port`)
+
+def dump_call_quality():
+	global g_current_call
+	
+	buf = ""
+	if g_current_call != -1:
+		buf = py_pjsua.call_dump(g_current_call, 1, 1024, "  ")
+		write_log(3, "\n" + buf)
+	else:
+		write_log(3, "No current call")
+
+def xfer_call():
+	global g_current_call
+	
+	if g_current_call == -1:
+		
+		write_log(3, "No current call")
+
+	else:
+		call = g_current_call		
+		ci = py_pjsua.call_get_info(g_current_call)
+		print "Transfering current call ["+ `g_current_call` + "] " + ci.remote_info
+		print "Enter sip url : "
+		url = sys.stdin.readline()
+		if url == "\n": 
+			return
+		url = url.replace("\n", "")
+		if call != g_current_call:
+			print "Call has been disconnected"
+			return
+		msg_data = py_pjsua.msg_data_init()
+		status = py_pjsua.call_xfer(g_current_call, url, msg_data);
+		if status != 0:
+			py_pjsua.perror(THIS_FILE, "Error transfering call ", status)
+		else:		
+			write_log(3, "Call transfered to " + url)
+		
+def xfer_call_replaces():
+	if g_current_call == -1:
+		write_log(3, "No current call")
+	else:
+		call = g_current_call
+		
+		ids = py_pjsua.enum_calls()
+		if len(ids) <= 1:
+			print "There are no other calls"
+			return		
+
+		ci = py_pjsua.call_get_info(g_current_call)
+		print "Transfer call [" + `g_current_call` + "] " + ci.remote_info + " to one of the following:"
+		for i in range(0, len(ids)):		    
+			if ids[i] == call:
+				continue
+			call_info = py_pjsua.call_get_info(ids[i])
+			print `ids[i]` + "  " +  call_info.remote_info + "  [" + call_info.state_text + "]"		
+
+		print "Enter call number to be replaced : "
+		buf = sys.stdin.readline()
+		buf = buf.replace("\n","")
+		if buf == "":
+			return
+		dst_call = int(buf)
+		
+		if call != g_current_call:
+			print "Call has been disconnected"
+			return		
+		
+		if dst_call == call:
+			print "Destination call number must not be the same as the call being transfered"
+			return
+		
+		if dst_call >= py_pjsua.PJSUA_MAX_CALLS:
+			print "Invalid destination call number"
+			return
+	
+		if py_pjsua.call_is_active(dst_call) == 0:
+			print "Invalid destination call number"
+			return		
+
+		py_pjsua.call_xfer_replaces(call, dst_call, 0, None)
+		
+#
+# Worker thread function.
+# Python doesn't like it when it's called from an alien thread
+# (pjsua's worker thread, in this case), so for Python we must
+# disable worker thread in pjsua and poll pjsua from Python instead.
+#
+def worker_thread_main(arg):
+	global C_QUIT
+	thread_desc = 0;
+	status = py_pjsua.thread_register("python worker", thread_desc)
+	if status != 0:
+		py_pjsua.perror(THIS_FILE, "Error registering thread", status)
+	else:
+		while C_QUIT == 0:
+			py_pjsua.handle_events(50)
+		print "Worker thread quitting.."
+		C_QUIT = 2
+
+
+# Start pjsua
+#
+def app_start():
+	# Done with initialization, start pjsua!!
+	#
+	status = py_pjsua.start()
+	if status != 0:
+		py_pjsua.destroy()
+		err_exit("Error starting pjsua!", status)
+
+	# Start worker thread
+	thr = thread.start_new(worker_thread_main, (0,))
+    
+	print "PJSUA Started!!"
+
+
+# Print account and buddy list
+def print_acc_buddy_list():
+	global g_acc_id
+	
+	acc_ids = py_pjsua.enum_accs()
+	print "Account list:"
+	for acc_id in acc_ids:
+		acc_info = py_pjsua.acc_get_info(acc_id)
+		if acc_info.has_registration == 0:
+			acc_status = acc_info.status_text
+		else:
+			acc_status = `acc_info.status` + "/" + acc_info.status_text + " (expires=" + `acc_info.expires` + ")"
+
+		if acc_id == g_acc_id:
+			print " *",
+		else:
+			print "  ",
+
+		print "[" + `acc_id` + "] " + acc_info.acc_uri + ": " + acc_status
+		print "       Presence status: ",
+		if acc_info.online_status != 0:
+			print "Online"
+		else:
+			print "Invisible"
+
+	if py_pjsua.get_buddy_count() > 0:
+		print ""
+		print "Buddy list:"
+		buddy_ids = py_pjsua.enum_buddies()
+		for buddy_id in buddy_ids:
+			bi = py_pjsua.buddy_get_info(buddy_id)
+			print "   [" + `buddy_id` + "] " + bi.status_text + " " + bi.uri
+	
+		
+# Print application menu
+#
+def print_menu():
+	print ""
+	print ">>>"
+	print_acc_buddy_list()
+	print """
++============================================================================+
+|         Call Commands :      |  Buddy, IM & Presence:   |    Account:      |
+|                              |                          |                  |
+|  m  Make call                | +b  Add buddy            | +a  Add account  |
+|  a  Answer current call      | -b  Delete buddy         | -a  Delete accnt |
+|  h  Hangup current call      |                          |                  |
+|  H  Hold call                |  i  Send instant message | rr  register     |
+|  v  re-inVite (release Hold) |  s  Subscribe presence   | ru  Unregister   |
+|  #  Send DTMF string         |  u  Unsubscribe presence |                  |
+| dq  Dump curr. call quality  |  t  ToGgle Online status |                  |
+|                              +--------------------------+------------------+
+|  x  Xfer call                |     Media Commands:      |    Status:       |
+|  X  Xfer with Replaces       |                          |                  |
+|                              | cl  List ports           |  d  Dump status  |
+|                              | cc  Connect port         | dd  Dump detail  |
+|                              | cd  Disconnect port      |                  |
+|                              | +p  Add file player      |                  |
+|------------------------------+ +r  Add file recorder    |                  |
+|  q  Quit application         |                          |                  |
++============================================================================+"""
+	print "You have " + `py_pjsua.call_get_count()` + " active call(s)"
+	print ">>>", 
+
+# Menu
+#
+def app_menu():
+	global g_acc_id
+	global g_current_call
+
+	quit = 0
+	while quit == 0:
+		print_menu()
+		choice = sys.stdin.readline()
+
+		if choice[0] == "q":
+			quit = 1
+
+		elif choice[0] == "i":
+			# Sending IM	
+			print "Send IM to SIP URL: ",
+			url = sys.stdin.readline()
+			if url == "\n":
+				continue
+
+			# Send typing indication
+			py_pjsua.im_typing(g_acc_id, url, 1, None) 
+
+			print "The content: ",
+			message = sys.stdin.readline()
+			if message == "\n":
+				py_pjsua.im_typing(g_acc_id, url, 0, None) 		
+				continue
+
+			# Send the IM!
+			py_pjsua.im_send(g_acc_id, url, None, message, None, 0)
+
+		elif choice[0] == "m":
+			# Make call 
+			print "Using account ", g_acc_id
+			print "Make call to SIP URL: ",
+			url = sys.stdin.readline()
+			url = url.replace("\n", "")
+			if url == "":
+				continue
+
+			# Initiate the call!
+			status, call_id = py_pjsua.call_make_call(g_acc_id, url, 0, 0, None)
+            
+			if status != 0:
+				py_pjsua.perror(THIS_FILE, "Error making call", status)
+			else:
+				g_current_call = call_id
+
+		elif choice[0] == "+" and choice[1] == "b":
+			# Add new buddy
+			bc = py_pjsua.Buddy_Config()
+			print "Buddy URL: ",
+			bc.uri = sys.stdin.readline()
+			if bc.uri == "\n":
+				continue
+            
+			bc.uri = bc.uri.replace("\n", "")
+			bc.subscribe = 1
+			status, buddy_id = py_pjsua.buddy_add(bc)
+			if status != 0:
+				py_pjsua.perror(THIS_FILE, "Error adding buddy", status)
+		elif choice[0] == "-" and choice[1] == "b":
+			print "Enter buddy ID to delete : "
+			buf = sys.stdin.readline()
+			buf = buf.replace("\n","")
+			if buf == "":
+				continue
+			i = int(buf)
+			if py_pjsua.buddy_is_valid(i) == 0:
+				print "Invalid buddy id " + `i`
+			else:
+				py_pjsua.buddy_del(i)
+				print "Buddy " + `i` + " deleted"		
+		elif choice[0] == "+" and choice[1] == "a":
+			# Add account
+			add_account()
+		elif choice[0] == "-" and choice[1] == "a":
+			print "Enter account ID to delete : "
+			buf = sys.stdin.readline()
+			buf = buf.replace("\n","")
+			if buf == "":
+				continue
+			i = int(buf)
+
+			if py_pjsua.acc_is_valid(i) == 0:
+				print "Invalid account id " + `i`
+			else:
+				py_pjsua.acc_del(i)
+				print "Account " + `i` + " deleted"
+	    
+		elif choice[0] == "+" and choice[1] == "p":
+			add_player()
+		elif choice[0] == "+" and choice[1] == "r":
+			add_recorder()
+		elif choice[0] == "c" and choice[1] == "l":
+			conf_list()
+		elif choice[0] == "c" and choice[1] == "c":
+			connect_port()
+		elif choice[0] == "c" and choice[1] == "d":
+			disconnect_port()
+		elif choice[0] == "d" and choice[1] == "q":
+			dump_call_quality()
+		elif choice[0] == "x":
+			xfer_call()
+		elif choice[0] == "X":
+			xfer_call_replaces()
+		elif choice[0] == "h":
+			if g_current_call != py_pjsua.PJSUA_INVALID_ID:
+				py_pjsua.call_hangup(g_current_call, 603, None, None)
+			else:
+				print "No current call"
+		elif choice[0] == "H":
+			if g_current_call != py_pjsua.PJSUA_INVALID_ID:
+				py_pjsua.call_set_hold(g_current_call, None)
+		
+			else:
+				print "No current call"
+		elif choice[0] == "v":
+			if g_current_call != py_pjsua.PJSUA_INVALID_ID:
+		
+				py_pjsua.call_reinvite(g_current_call, 1, None);
+
+			else:
+				print "No current call"
+		elif choice[0] == "#":
+			if g_current_call == py_pjsua.PJSUA_INVALID_ID:		
+				print "No current call"
+			elif py_pjsua.call_has_media(g_current_call) == 0:
+				print "Media is not established yet!"
+			else:
+				call = g_current_call
+				print "DTMF strings to send (0-9*#A-B)"
+				buf = sys.stdin.readline()
+				buf = buf.replace("\n", "")
+				if buf == "":
+					continue
+				if call != g_current_call:
+					print "Call has been disconnected"
+					continue
+				status = py_pjsua.call_dial_dtmf(g_current_call, buf)
+				if status != 0:
+					py_pjsua.perror(THIS_FILE, "Unable to send DTMF", status);
+				else:
+					print "DTMF digits enqueued for transmission"
+		elif choice[0] == "s":
+			print "Subscribe presence of (buddy id) : "
+			buf = sys.stdin.readline()
+			buf = buf.replace("\n","")
+			if buf == "":
+				continue
+			i = int(buf)
+			py_pjsua.buddy_subscribe_pres(i, 1)
+		elif choice[0] == "u":
+			print "Unsubscribe presence of (buddy id) : "
+			buf = sys.stdin.readline()
+			buf = buf.replace("\n","")
+			if buf == "":
+				continue
+			i = int(buf)
+			py_pjsua.buddy_subscribe_pres(i, 0)
+		elif choice[0] == "t":
+			acc_info = py_pjsua.acc_get_info(g_acc_id)
+			if acc_info.online_status == 0:
+				acc_info.online_status = 1
+			else:
+				acc_info.online_status = 0
+			py_pjsua.acc_set_online_status(g_acc_id, acc_info.online_status)
+			st = ""
+			if acc_info.online_status == 0:
+				st = "offline"
+			else:
+				st = "online"
+			print "Setting " + acc_info.acc_uri + " online status to " + st
+		elif choice[0] == "r":
+			if choice[1] == "r":	    
+				py_pjsua.acc_set_registration(g_acc_id, 1)
+			elif choice[1] == "u":
+				py_pjsua.acc_set_registration(g_acc_id, 0)
+		elif choice[0] == "d":
+			py_pjsua.dump(choice[1] == "d")
+		elif choice[0] == "a":
+			if g_current_call != py_pjsua.PJSUA_INVALID_ID:				
+				
+				py_pjsua.call_answer(g_current_call, 200, None, None)
+			else:
+				print "No current call"
+
+
+#
+# main
+#
+app_init()
+app_start()
+app_menu()
+
+#
+# Done, quitting..
+#
+print "PJSUA shutting down.."
+C_QUIT = 1
+# Give the worker thread chance to quit itself
+while C_QUIT != 2:
+    py_pjsua.handle_events(50)
+
+print "PJSUA destroying.."
+py_pjsua.destroy()
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/py_pjsua.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/py_pjsua.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/py_pjsua.c	(revision 1163)
@@ -0,0 +1,8343 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <Python.h>
+#include "structmember.h"
+#include <pjsua-lib/pjsua.h>
+
+#define THIS_FILE    "main.c"
+#define POOL_SIZE    4000
+#define SND_DEV_NUM  64
+#define SND_NAME_LEN  64
+
+/* LIB BASE */
+
+static PyObject* obj_log_cb;
+static long thread_id;
+
+#define ENTER_PYTHON()	    PyGILState_STATE state = PyGILState_Ensure()
+#define LEAVE_PYTHON()	    PyGILState_Release(state)
+
+/*
+ * cb_log_cb
+ * declares method for reconfiguring logging process for callback struct
+ */
+static void cb_log_cb(int level, const char *data, pj_size_t len)
+{
+	
+    /* Ignore if this callback is called from alien thread context,
+     * or otherwise it will crash Python.
+     */
+    if (pj_thread_local_get(thread_id) == 0)
+	return;
+
+    if (PyCallable_Check(obj_log_cb))
+    {
+	ENTER_PYTHON();
+
+        PyObject_CallFunctionObjArgs(
+            obj_log_cb, Py_BuildValue("i",level),
+            PyString_FromString(data), Py_BuildValue("i",len), NULL
+        );
+
+	LEAVE_PYTHON();
+    }
+}
+
+
+/*
+ * pjsip_event_Object
+ * C/python typewrapper for event struct
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    pjsip_event * event;
+} pjsip_event_Object;
+
+
+/*
+ * pjsip_event_Type
+ * event struct signatures
+ */
+static PyTypeObject pjsip_event_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                          /*ob_size*/
+    "py_pjsua.PJSIP_Event",     /*tp_name*/
+    sizeof(pjsip_event_Object), /*tp_basicsize*/
+    0,                          /*tp_itemsize*/
+    0,                          /*tp_dealloc*/
+    0,                          /*tp_print*/
+    0,                          /*tp_getattr*/
+    0,                          /*tp_setattr*/
+    0,                          /*tp_compare*/
+    0,                          /*tp_repr*/
+    0,                          /*tp_as_number*/
+    0,                          /*tp_as_sequence*/
+    0,                          /*tp_as_mapping*/
+    0,                          /*tp_hash */
+    0,                          /*tp_call*/
+    0,                          /*tp_str*/
+    0,                          /*tp_getattro*/
+    0,                          /*tp_setattro*/
+    0,                          /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,         /*tp_flags*/
+    "pjsip_event objects",      /*tp_doc */
+};
+
+
+/*
+ * pjsip_rx_data_Object
+ * C/python typewrapper for RX data struct
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    pjsip_rx_data * rdata;
+} pjsip_rx_data_Object;
+
+
+/*
+ * pjsip_rx_data_Type
+ */
+static PyTypeObject pjsip_rx_data_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.PJSIP_RX_Data",       /*tp_name*/
+    sizeof(pjsip_rx_data_Object),   /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    0,                              /*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "pjsip_rx_data objects",        /*tp_doc*/
+};
+
+
+/*
+ * callback_Object
+ * C/python typewrapper for callback struct
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    PyObject * on_call_state;
+    PyObject * on_incoming_call;
+    PyObject * on_call_media_state;
+    PyObject * on_call_transfer_request;
+    PyObject * on_call_transfer_status;
+    PyObject * on_call_replace_request;
+    PyObject * on_call_replaced;
+    PyObject * on_reg_state;
+    PyObject * on_buddy_state;
+    PyObject * on_pager;
+    PyObject * on_pager_status;
+    PyObject * on_typing;
+
+} callback_Object;
+
+
+/*
+ * The global callback object.
+ */
+static callback_Object * g_obj_callback;
+
+
+/*
+ * cb_on_call_state
+ * declares method on_call_state for callback struct
+ */
+static void cb_on_call_state(pjsua_call_id call_id, pjsip_event *e)
+{
+    if (PyCallable_Check(g_obj_callback->on_call_state))
+    {	
+        pjsip_event_Object * obj;
+
+	ENTER_PYTHON();
+
+	obj = (pjsip_event_Object *)PyType_GenericNew(&pjsip_event_Type,
+						      NULL, NULL);
+		
+	obj->event = e;
+		
+        PyObject_CallFunctionObjArgs(
+            g_obj_callback->on_call_state,Py_BuildValue("i",call_id),obj,NULL
+        );
+
+	LEAVE_PYTHON();
+    }
+}
+
+
+/*
+ * cb_on_incoming_call
+ * declares method on_incoming_call for callback struct
+ */
+static void cb_on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id,
+                                pjsip_rx_data *rdata)
+{
+    if (PyCallable_Check(g_obj_callback->on_incoming_call))
+    {
+	pjsip_rx_data_Object * obj;
+
+	ENTER_PYTHON();
+
+	obj = (pjsip_rx_data_Object *)PyType_GenericNew(&pjsip_rx_data_Type, 
+							NULL, NULL);
+	obj->rdata = rdata;
+
+        PyObject_CallFunctionObjArgs(
+                g_obj_callback->on_incoming_call,
+		Py_BuildValue("i",acc_id),
+                Py_BuildValue("i",call_id),
+		obj,
+		NULL
+        );
+
+	LEAVE_PYTHON();
+    }
+}
+
+
+/*
+ * cb_on_call_media_state
+ * declares method on_call_media_state for callback struct
+ */
+static void cb_on_call_media_state(pjsua_call_id call_id)
+{
+    if (PyCallable_Check(g_obj_callback->on_call_media_state))
+    {
+	ENTER_PYTHON();
+
+        PyObject_CallFunction(g_obj_callback->on_call_media_state,"i",call_id);
+
+	LEAVE_PYTHON();
+    }
+}
+
+
+/*
+ * Notify application on call being transfered.
+ * !modified @061206
+ */
+static void cb_on_call_transfer_request(pjsua_call_id call_id,
+				        const pj_str_t *dst,
+				        pjsip_status_code *code)
+{
+    if (PyCallable_Check(g_obj_callback->on_call_transfer_request))
+    {
+	PyObject * ret;
+	int cd;
+
+	ENTER_PYTHON();
+
+        ret = PyObject_CallFunctionObjArgs(
+            g_obj_callback->on_call_transfer_request,
+	    Py_BuildValue("i",call_id),
+            PyString_FromStringAndSize(dst->ptr, dst->slen),
+            Py_BuildValue("i",*code),
+	    NULL
+        );
+	if (ret != NULL) {
+	    if (ret != Py_None) {
+		if (PyArg_Parse(ret,"i",&cd)) {
+		    *code = cd;
+		}
+	    }
+	}
+
+	LEAVE_PYTHON();
+    }
+}
+
+
+/*
+ * Notify application of the status of previously sent call
+ * transfer request. Application can monitor the status of the
+ * call transfer request, for example to decide whether to 
+ * terminate existing call.
+ * !modified @061206
+ */
+static void cb_on_call_transfer_status( pjsua_call_id call_id,
+					int status_code,
+					const pj_str_t *status_text,
+					pj_bool_t final,
+					pj_bool_t *p_cont)
+{
+    if (PyCallable_Check(g_obj_callback->on_call_transfer_status))
+    {
+	PyObject * ret;
+	int cnt;
+
+	ENTER_PYTHON();
+
+        ret = PyObject_CallFunctionObjArgs(
+            g_obj_callback->on_call_transfer_status,
+	    Py_BuildValue("i",call_id),
+	    Py_BuildValue("i",status_code),
+            PyString_FromStringAndSize(status_text->ptr, status_text->slen),
+	    Py_BuildValue("i",final),
+            Py_BuildValue("i",*p_cont),
+	    NULL
+        );
+	if (ret != NULL) {
+	    if (ret != Py_None) {
+		if (PyArg_Parse(ret,"i",&cnt)) {
+		    *p_cont = cnt;
+		}
+	    }
+	}
+
+	LEAVE_PYTHON();
+    }
+}
+
+
+/*
+ * Notify application about incoming INVITE with Replaces header.
+ * Application may reject the request by setting non-2xx code.
+ * !modified @061206
+ */
+static void cb_on_call_replace_request( pjsua_call_id call_id,
+					pjsip_rx_data *rdata,
+					int *st_code,
+					pj_str_t *st_text)
+{
+    if (PyCallable_Check(g_obj_callback->on_call_replace_request))
+    {
+	PyObject * ret;
+	PyObject * txt;
+	int cd;
+        pjsip_rx_data_Object * obj;
+
+	ENTER_PYTHON();
+
+	obj = (pjsip_rx_data_Object *)PyType_GenericNew(&pjsip_rx_data_Type,
+							NULL, NULL);
+        obj->rdata = rdata;
+
+        ret = PyObject_CallFunctionObjArgs(
+            g_obj_callback->on_call_replace_request,
+	    Py_BuildValue("i",call_id),
+	    obj,
+	    Py_BuildValue("i",*st_code),
+            PyString_FromStringAndSize(st_text->ptr, st_text->slen),
+	    NULL
+        );
+	if (ret != NULL) {
+	    if (ret != Py_None) {
+		if (PyArg_ParseTuple(ret,"iO",&cd, &txt)) {
+		    *st_code = cd;
+		    st_text->ptr = PyString_AsString(txt);
+		    st_text->slen = strlen(PyString_AsString(txt));
+		}
+	    }
+	}
+
+	LEAVE_PYTHON();
+    }
+}
+
+
+/*
+ * Notify application that an existing call has been replaced with
+ * a new call. This happens when PJSUA-API receives incoming INVITE
+ * request with Replaces header.
+ */
+static void cb_on_call_replaced(pjsua_call_id old_call_id,
+				pjsua_call_id new_call_id)
+{
+    if (PyCallable_Check(g_obj_callback->on_call_replaced))
+    {
+	ENTER_PYTHON();
+
+        PyObject_CallFunctionObjArgs(
+            g_obj_callback->on_call_replaced,
+	    Py_BuildValue("i",old_call_id),
+	    Py_BuildValue("i",old_call_id),
+	    NULL
+        );
+
+	LEAVE_PYTHON();
+    }
+}
+
+
+/*
+ * cb_on_reg_state
+ * declares method on_reg_state for callback struct
+ */
+static void cb_on_reg_state(pjsua_acc_id acc_id)
+{
+    if (PyCallable_Check(g_obj_callback->on_reg_state))
+    {
+	ENTER_PYTHON();
+
+        PyObject_CallFunction(g_obj_callback->on_reg_state,"i",acc_id);
+
+	LEAVE_PYTHON();
+    }
+}
+
+
+/*
+ * cb_on_buddy_state
+ * declares method on_buddy state for callback struct
+ */
+static void cb_on_buddy_state(pjsua_buddy_id buddy_id)
+{
+    if (PyCallable_Check(g_obj_callback->on_buddy_state))
+    {
+	ENTER_PYTHON();
+
+        PyObject_CallFunction(g_obj_callback->on_buddy_state,"i",buddy_id);
+
+	LEAVE_PYTHON();
+    }
+}
+
+/*
+ * cb_on_pager
+ * declares method on_pager for callback struct
+ */
+static void cb_on_pager(pjsua_call_id call_id, const pj_str_t *from,
+                        const pj_str_t *to, const pj_str_t *contact,
+                        const pj_str_t *mime_type, const pj_str_t *body)
+{
+    if (PyCallable_Check(g_obj_callback->on_pager))
+    {
+	ENTER_PYTHON();
+
+        PyObject_CallFunctionObjArgs(
+            g_obj_callback->on_pager,Py_BuildValue("i",call_id),
+            PyString_FromStringAndSize(from->ptr, from->slen),
+            PyString_FromStringAndSize(to->ptr, to->slen),
+            PyString_FromStringAndSize(contact->ptr, contact->slen),
+            PyString_FromStringAndSize(mime_type->ptr, mime_type->slen),
+            PyString_FromStringAndSize(body->ptr, body->slen), NULL
+        );
+
+	LEAVE_PYTHON();
+    }
+}
+
+
+/*
+ * cb_on_pager_status
+ * declares method on_pager_status for callback struct
+ */
+static void cb_on_pager_status(pjsua_call_id call_id, const pj_str_t *to,
+                                const pj_str_t *body, void *user_data,
+                                pjsip_status_code status,
+                                const pj_str_t *reason)
+{
+    if (PyCallable_Check(g_obj_callback->on_pager))
+    {
+	PyObject * obj_user_data;
+
+	ENTER_PYTHON();
+
+	obj_user_data = Py_BuildValue("i", user_data);
+
+        PyObject_CallFunctionObjArgs(
+            g_obj_callback->on_pager_status,
+	    Py_BuildValue("i",call_id),
+            PyString_FromStringAndSize(to->ptr, to->slen),
+            PyString_FromStringAndSize(body->ptr, body->slen), 
+	    obj_user_data,
+            Py_BuildValue("i",status),
+	    PyString_FromStringAndSize(reason->ptr,reason->slen),
+	    NULL
+        );
+
+	LEAVE_PYTHON();
+    }
+}
+
+
+/*
+ * cb_on_typing
+ * declares method on_typing for callback struct
+ */
+static void cb_on_typing(pjsua_call_id call_id, const pj_str_t *from,
+                            const pj_str_t *to, const pj_str_t *contact,
+                            pj_bool_t is_typing)
+{
+    if (PyCallable_Check(g_obj_callback->on_typing))
+    {
+	ENTER_PYTHON();
+
+        PyObject_CallFunctionObjArgs(
+            g_obj_callback->on_typing,Py_BuildValue("i",call_id),
+            PyString_FromStringAndSize(from->ptr, from->slen),
+            PyString_FromStringAndSize(to->ptr, to->slen),
+            PyString_FromStringAndSize(contact->ptr, contact->slen),
+            Py_BuildValue("i",is_typing),NULL
+        );
+
+	LEAVE_PYTHON();
+    }
+}
+
+
+/*
+ * callback_dealloc
+ * destructor function for callback struct
+ */
+static void callback_dealloc(callback_Object* self)
+{
+    Py_XDECREF(self->on_call_state);
+    Py_XDECREF(self->on_incoming_call);
+    Py_XDECREF(self->on_call_media_state);
+    Py_XDECREF(self->on_call_transfer_request);
+    Py_XDECREF(self->on_call_transfer_status);
+    Py_XDECREF(self->on_call_replace_request);
+    Py_XDECREF(self->on_call_replaced);
+    Py_XDECREF(self->on_reg_state);
+    Py_XDECREF(self->on_buddy_state);
+    Py_XDECREF(self->on_pager);
+    Py_XDECREF(self->on_pager_status);
+    Py_XDECREF(self->on_typing);
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * callback_new
+ * * declares constructor for callback struct
+ */
+static PyObject * callback_new(PyTypeObject *type, PyObject *args,
+                               PyObject *kwds)
+{
+    callback_Object *self;
+
+    self = (callback_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        Py_INCREF(Py_None);
+        self->on_call_state = Py_None;
+        if (self->on_call_state == NULL)
+    	{
+            Py_DECREF(Py_None);
+            return NULL;
+        }
+        Py_INCREF(Py_None);
+        self->on_incoming_call = Py_None;
+        if (self->on_incoming_call == NULL)
+    	{
+            Py_DECREF(Py_None);
+            return NULL;
+        }
+        Py_INCREF(Py_None);
+        self->on_call_media_state = Py_None;
+        if (self->on_call_media_state == NULL)
+    	{
+            Py_DECREF(Py_None);
+            return NULL;
+        }
+        Py_INCREF(Py_None);
+        self->on_call_transfer_request = Py_None;
+        if (self->on_call_transfer_request == NULL)
+    	{
+            Py_DECREF(Py_None);
+            return NULL;
+        }
+        Py_INCREF(Py_None);
+        self->on_call_transfer_status = Py_None;
+        if (self->on_call_transfer_status == NULL)
+    	{
+            Py_DECREF(Py_None);
+            return NULL;
+        }
+        Py_INCREF(Py_None);
+        self->on_call_replace_request = Py_None;
+        if (self->on_call_replace_request == NULL)
+    	{
+            Py_DECREF(Py_None);
+            return NULL;
+        }
+        Py_INCREF(Py_None);
+        self->on_call_replaced = Py_None;
+        if (self->on_call_replaced == NULL)
+    	{
+            Py_DECREF(Py_None);
+            return NULL;
+        }
+        Py_INCREF(Py_None);
+        self->on_reg_state = Py_None;
+        if (self->on_reg_state == NULL)
+    	{
+            Py_DECREF(Py_None);
+            return NULL;
+        }
+        Py_INCREF(Py_None);
+        self->on_buddy_state = Py_None;
+        if (self->on_buddy_state == NULL)
+    	{
+            Py_DECREF(Py_None);
+            return NULL;
+        }
+        Py_INCREF(Py_None);
+        self->on_pager = Py_None;
+        if (self->on_pager == NULL)
+    	{
+            Py_DECREF(Py_None);
+            return NULL;
+        }
+        Py_INCREF(Py_None);
+        self->on_pager_status = Py_None;
+        if (self->on_pager_status == NULL)
+    	{
+            Py_DECREF(Py_None);
+            return NULL;
+        }
+        Py_INCREF(Py_None);
+        self->on_typing = Py_None;
+        if (self->on_typing == NULL)
+    	{
+            Py_DECREF(Py_None);
+            return NULL;
+        }
+    }
+
+    return (PyObject *)self;
+}
+
+
+/*
+ * callback_members
+ * declares available functions for callback object
+ */
+static PyMemberDef callback_members[] =
+{
+    {
+        "on_call_state", T_OBJECT_EX, offsetof(callback_Object, on_call_state),
+        0, "Notify application when invite state has changed. Application may "
+        "then query the call info to get the detail call states."
+    },
+    {
+        "on_incoming_call", T_OBJECT_EX,
+        offsetof(callback_Object, on_incoming_call), 0,
+        "Notify application on incoming call."
+    },
+    {
+        "on_call_media_state", T_OBJECT_EX,
+        offsetof(callback_Object, on_call_media_state), 0,
+        "Notify application when media state in the call has changed. Normal "
+        "application would need to implement this callback, e.g. to connect "
+        "the call's media to sound device."
+    },
+    {
+        "on_call_transfer_request", T_OBJECT_EX,
+        offsetof(callback_Object, on_call_transfer_request), 0,
+        "Notify application on call being transfered. "
+	"Application can decide to accept/reject transfer request "
+	"by setting the code (default is 200). When this callback "
+	"is not defined, the default behavior is to accept the "
+	"transfer."
+    },
+    {
+        "on_call_transfer_status", T_OBJECT_EX,
+        offsetof(callback_Object, on_call_transfer_status), 0,
+        "Notify application of the status of previously sent call "
+        "transfer request. Application can monitor the status of the "
+        "call transfer request, for example to decide whether to "
+        "terminate existing call."
+    },
+    {
+        "on_call_replace_request", T_OBJECT_EX,
+        offsetof(callback_Object, on_call_replace_request), 0,
+        "Notify application about incoming INVITE with Replaces header. "
+        "Application may reject the request by setting non-2xx code."
+    },
+    {
+        "on_call_replaced", T_OBJECT_EX,
+        offsetof(callback_Object, on_call_replaced), 0,
+	"Notify application that an existing call has been replaced with "
+	"a new call. This happens when PJSUA-API receives incoming INVITE "
+	"request with Replaces header."
+	" "
+	"After this callback is called, normally PJSUA-API will disconnect "
+	"old_call_id and establish new_call_id."
+    },
+    {
+        "on_reg_state", T_OBJECT_EX,
+        offsetof(callback_Object, on_reg_state), 0,
+        "Notify application when registration status has changed. Application "
+        "may then query the account info to get the registration details."
+    },
+    {
+        "on_buddy_state", T_OBJECT_EX,
+        offsetof(callback_Object, on_buddy_state), 0,
+        "Notify application when the buddy state has changed. Application may "
+        "then query the buddy into to get the details."
+    },
+    {
+        "on_pager", T_OBJECT_EX, offsetof(callback_Object, on_pager), 0,
+        "Notify application on incoming pager (i.e. MESSAGE request). "
+        "Argument call_id will be -1 if MESSAGE request is not related to an "
+        "existing call."
+    },
+    {
+        "on_pager_status", T_OBJECT_EX,
+        offsetof(callback_Object, on_pager_status), 0,
+        "Notify application about the delivery status of outgoing pager "
+        "request."
+    },
+    {
+        "on_typing", T_OBJECT_EX, offsetof(callback_Object, on_typing), 0,
+        "Notify application about typing indication."
+    },
+    {NULL}  /* Sentinel */
+};
+
+
+/*
+ * callback_Type
+ * callback class definition
+ */
+static PyTypeObject callback_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.Callback",            /*tp_name*/
+    sizeof(callback_Object),        /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)callback_dealloc,   /*tp_dealloc*/
+    0,                             	/*tp_print*/
+    0,                             	/*tp_getattr*/
+    0,                             	/*tp_setattr*/
+    0,                             	/*tp_compare*/
+    0,                             	/*tp_repr*/
+    0,                             	/*tp_as_number*/
+    0,                             	/*tp_as_sequence*/
+    0,                             	/*tp_as_mapping*/
+    0,                             	/*tp_hash */
+    0,                             	/*tp_call*/
+    0,                             	/*tp_str*/
+    0,                             	/*tp_getattro*/
+    0,                             	/*tp_setattro*/
+    0,                             	/*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,            	/*tp_flags*/
+    "Callback objects",             /* tp_doc */
+    0,                           	/* tp_traverse */
+    0,                           	/* tp_clear */
+    0,                           	/* tp_richcompare */
+    0,                           	/* tp_weaklistoffset */
+    0,                           	/* tp_iter */
+    0,                           	/* tp_iternext */
+    0,                 				/* tp_methods */
+    callback_members,               /* tp_members */
+    0,                             	/* tp_getset */
+    0,                             	/* tp_base */
+    0,                             	/* tp_dict */
+    0,                             	/* tp_descr_get */
+    0,                             	/* tp_descr_set */
+    0,                             	/* tp_dictoffset */
+    0,          					/* tp_init */
+    0,                             	/* tp_alloc */
+    callback_new,                   /* tp_new */
+
+};
+
+
+/*
+ * media_config_Object
+ * C/Python wrapper for media_config object
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    unsigned clock_rate;
+    unsigned max_media_ports;
+    int has_ioqueue;
+    unsigned thread_cnt;
+    unsigned quality;
+    unsigned ptime;
+    int no_vad;
+    unsigned ilbc_mode;
+    unsigned tx_drop_pct;
+    unsigned rx_drop_pct;
+    unsigned ec_options;
+    unsigned ec_tail_len;
+} media_config_Object;
+
+
+/*
+ * media_config_members
+ * declares attributes accessible from both C and Python for media_config file
+ */
+static PyMemberDef media_config_members[] =
+{
+    {
+        "clock_rate", T_INT, offsetof(media_config_Object, clock_rate), 0,
+        "Clock rate to be applied to the conference bridge. If value is zero, "
+        "default clock rate will be used (16KHz)."
+    },
+    {
+        "max_media_ports", T_INT,
+        offsetof(media_config_Object, max_media_ports), 0,
+        "Specify maximum number of media ports to be created in the "
+        "conference bridge. Since all media terminate in the bridge (calls, "
+        "file player, file recorder, etc), the value must be large enough to "
+        "support all of them. However, the larger the value, the more "
+        "computations are performed."
+    },
+    {
+        "has_ioqueue", T_INT, offsetof(media_config_Object, has_ioqueue), 0,
+        "Specify whether the media manager should manage its own ioqueue for "
+        "the RTP/RTCP sockets. If yes, ioqueue will be created and at least "
+        "one worker thread will be created too. If no, the RTP/RTCP sockets "
+        "will share the same ioqueue as SIP sockets, and no worker thread is "
+        "needed."
+    },
+    {
+        "thread_cnt", T_INT, offsetof(media_config_Object, thread_cnt), 0,
+        "Specify the number of worker threads to handle incoming RTP packets. "
+        "A value of one is recommended for most applications."
+    },
+    {
+        "quality", T_INT, offsetof(media_config_Object, quality), 0,
+        "The media quality also sets speex codec quality/complexity to the "
+        "number."
+    },
+    {
+        "ptime", T_INT, offsetof(media_config_Object, ptime), 0,
+        "Specify default ptime."
+    },
+    {
+        "no_vad", T_INT, offsetof(media_config_Object, no_vad), 0,
+        "Disable VAD?"
+    },
+    {
+        "ilbc_mode", T_INT, offsetof(media_config_Object, ilbc_mode), 0,
+        "iLBC mode (20 or 30)."
+    },
+    {
+        "tx_drop_pct", T_INT, offsetof(media_config_Object, tx_drop_pct), 0,
+        "Percentage of RTP packet to drop in TX direction (to simulate packet "
+        "lost)."
+    },
+    {
+        "rx_drop_pct", T_INT, offsetof(media_config_Object, rx_drop_pct), 0,
+        "Percentage of RTP packet to drop in RX direction (to simulate packet "
+        "lost)."},
+    {
+        "ec_options", T_INT, offsetof(media_config_Object, ec_options), 0,
+        "Echo canceller options (see #pjmedia_echo_create())"
+    },
+    {
+        "ec_tail_len", T_INT, offsetof(media_config_Object, ec_tail_len), 0,
+        "Echo canceller tail length, in miliseconds."
+    },
+    {NULL}  /* Sentinel */
+};
+
+
+/*
+ * media_config_Type
+ */
+static PyTypeObject media_config_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.Media_Config",        /*tp_name*/
+    sizeof(media_config_Object),    /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    0,                              /*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "Media Config objects",         /*tp_doc*/
+    0,                              /*tp_traverse*/
+    0,                              /*tp_clear*/
+    0,                              /*tp_richcompare*/
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    media_config_members,           /* tp_members */
+
+};
+
+
+/*
+ * config_Object
+ * attribute list for config object
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    unsigned max_calls;
+    unsigned thread_cnt;
+    unsigned outbound_proxy_cnt;
+    pj_str_t outbound_proxy[4];
+    PyObject *stun_domain;
+    PyObject *stun_host;
+    PyObject *stun_relay_host;
+    unsigned cred_count;
+    pjsip_cred_info cred_info[PJSUA_ACC_MAX_PROXIES];
+    callback_Object * cb;
+    PyObject * user_agent;
+} config_Object;
+
+
+/*
+ * config_dealloc
+ * deallocates a config object
+ */
+static void config_dealloc(config_Object* self)
+{
+    Py_XDECREF(self->cb);
+    Py_XDECREF(self->user_agent);
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+/*
+ * config_new 
+ * config object constructor
+ */
+static PyObject *config_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+    config_Object *self;
+
+    self = (config_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->user_agent = PyString_FromString("");
+        if (self->user_agent == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+        self->cb = (callback_Object *)PyType_GenericNew(
+            &callback_Type, NULL, NULL
+        );
+        if (self->cb == NULL)
+    	{
+            Py_DECREF(Py_None);
+            return NULL;
+        }
+    }
+    return (PyObject *)self;
+}
+
+
+/*
+ * config_members
+ * attribute list accessible from Python/C
+ */
+static PyMemberDef config_members[] =
+{
+    {
+    	"max_calls", T_INT, offsetof(config_Object, max_calls), 0,
+    	"Maximum calls to support (default: 4) "
+    },
+    {
+    	"thread_cnt", T_INT, offsetof(config_Object, thread_cnt), 0,
+    	"Number of worker threads. Normally application will want to have at "
+    	"least one worker thread, unless when it wants to poll the library "
+    	"periodically, which in this case the worker thread can be set to "
+    	"zero."
+    },
+    {
+    	"outbound_proxy_cnt", T_INT,
+    	offsetof(config_Object, outbound_proxy_cnt), 0,
+    	"Number of outbound proxies in the array."
+    },
+    {
+    	"cred_count", T_INT, offsetof(config_Object, cred_count), 0,
+    	"Number of credentials in the credential array."
+    },
+    {
+    	"user_agent", T_OBJECT_EX, offsetof(config_Object, user_agent), 0,
+    	"User agent string (default empty)"
+    },
+    {
+    	"cb", T_OBJECT_EX, offsetof(config_Object, cb), 0,
+    	"Application callback."
+    },
+    {NULL}  /* Sentinel */
+};
+
+
+/*
+ * config_Type
+ * type wrapper for config class
+ */
+static PyTypeObject config_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                         /*ob_size*/
+    "py_pjsua.Config",         /*tp_name*/
+    sizeof(config_Object),     /*tp_basicsize*/
+    0,                         /*tp_itemsize*/
+    (destructor)config_dealloc,/*tp_dealloc*/
+    0,                         /*tp_print*/
+    0,                         /*tp_getattr*/
+    0,                         /*tp_setattr*/
+    0,                         /*tp_compare*/
+    0,                         /*tp_repr*/
+    0,                         /*tp_as_number*/
+    0,                         /*tp_as_sequence*/
+    0,                         /*tp_as_mapping*/
+    0,                         /*tp_hash */
+    0,                         /*tp_call*/
+    0,                         /*tp_str*/
+    0,                         /*tp_getattro*/
+    0,                         /*tp_setattro*/
+    0,                         /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,        /*tp_flags*/
+    "Config objects",          /* tp_doc */
+    0,                         /* tp_traverse */
+    0,                         /* tp_clear */
+    0,                         /* tp_richcompare */
+    0,                         /* tp_weaklistoffset */
+    0,                         /* tp_iter */
+    0,                         /* tp_iternext */
+    0,                         /* tp_methods */
+    config_members,            /* tp_members */
+    0,                         /* tp_getset */
+    0,                         /* tp_base */
+    0,                         /* tp_dict */
+    0,                         /* tp_descr_get */
+    0,                         /* tp_descr_set */
+    0,                         /* tp_dictoffset */
+    0,                         /* tp_init */
+    0,                         /* tp_alloc */
+    config_new,                 /* tp_new */
+
+};
+
+
+/*
+ * logging_config_Object
+ * configuration class for logging_config object
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    int msg_logging;
+    unsigned level;
+    unsigned console_level;
+    unsigned decor;
+    PyObject * log_filename;
+    PyObject * cb;
+} logging_config_Object;
+
+
+/*
+ * logging_config_dealloc
+ * deletes a logging config from memory
+ */
+static void logging_config_dealloc(logging_config_Object* self)
+{
+    Py_XDECREF(self->log_filename);
+    Py_XDECREF(self->cb);
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * logging_config_new
+ * constructor for logging_config object
+ */
+static PyObject * logging_config_new(PyTypeObject *type, PyObject *args,
+                                    PyObject *kwds)
+{
+    logging_config_Object *self;
+
+    self = (logging_config_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->log_filename = PyString_FromString("");
+        if (self->log_filename == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+        Py_INCREF(Py_None);
+        self->cb = Py_None;
+        if (self->cb == NULL)
+    	{
+            Py_DECREF(Py_None);
+            return NULL;
+        }
+    }
+
+    return (PyObject *)self;
+}
+
+
+/*
+ * logging_config_members
+ */
+static PyMemberDef logging_config_members[] =
+{
+    {
+    	"msg_logging", T_INT, offsetof(logging_config_Object, msg_logging), 0,
+    	"Log incoming and outgoing SIP message? Yes!"
+    },
+    {
+    	"level", T_INT, offsetof(logging_config_Object, level), 0,
+    	"Input verbosity level. Value 5 is reasonable."
+    },
+    {
+    	"console_level", T_INT, offsetof(logging_config_Object, console_level),
+    	0, "Verbosity level for console. Value 4 is reasonable."
+    },
+    {
+    	"decor", T_INT, offsetof(logging_config_Object, decor), 0,
+    	"Log decoration"
+    },
+    {
+    	"log_filename", T_OBJECT_EX,
+    	offsetof(logging_config_Object, log_filename), 0,
+    	"Optional log filename"
+    },
+    {
+    	"cb", T_OBJECT_EX, offsetof(logging_config_Object, cb), 0,
+    	"Optional callback function to be called to write log to application "
+    	"specific device. This function will be called forlog messages on "
+    	"input verbosity level."
+    },
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * logging_config_Type
+ */
+static PyTypeObject logging_config_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.Logging_Config",      /*tp_name*/
+    sizeof(logging_config_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)logging_config_dealloc,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "Logging Config objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    logging_config_members,         /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    logging_config_new,             /* tp_new */
+
+};
+
+
+/*
+ * msg_data_Object
+ * typewrapper for MessageData class
+ * !modified @ 061206
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    /*pjsip_hdr hdr_list;*/
+    PyObject * hdr_list;
+    PyObject * content_type;
+    PyObject * msg_body;
+} msg_data_Object;
+
+
+/*
+ * msg_data_dealloc
+ * deletes a msg_data
+ * !modified @ 061206
+ */
+static void msg_data_dealloc(msg_data_Object* self)
+{
+    Py_XDECREF(self->hdr_list);
+    Py_XDECREF(self->content_type);
+    Py_XDECREF(self->msg_body);
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * msg_data_new
+ * constructor for msg_data object
+ * !modified @ 061206
+ */
+static PyObject * msg_data_new(PyTypeObject *type, PyObject *args,
+                                PyObject *kwds)
+{
+    msg_data_Object *self;
+
+    self = (msg_data_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        Py_INCREF(Py_None);
+        self->hdr_list = Py_None;
+        if (self->hdr_list == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+        self->content_type = PyString_FromString("");
+        if (self->content_type == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+        self->msg_body = PyString_FromString("");
+        if (self->msg_body == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+    }
+
+    return (PyObject *)self;
+}
+
+
+/*
+ * msg_data_members
+ * !modified @ 061206
+ */
+static PyMemberDef msg_data_members[] =
+{
+    {
+        "hdr_list", T_OBJECT_EX, offsetof(msg_data_Object, hdr_list),
+	0, "Additional message headers as linked list."
+    }, 
+    {
+	"content_type", T_OBJECT_EX, offsetof(msg_data_Object, content_type),
+    	0, "MIME type of optional message body."
+    },
+    {
+    	"msg_body", T_OBJECT_EX, offsetof(msg_data_Object, msg_body), 0,
+    	"Optional message body."
+    },
+    {NULL}  /* Sentinel */
+};
+
+
+/*
+ * msg_data_Type
+ */
+static PyTypeObject msg_data_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                         /*ob_size*/
+    "py_pjsua.Msg_Data",       /*tp_name*/
+    sizeof(msg_data_Object),   /*tp_basicsize*/
+    0,                         /*tp_itemsize*/
+    (destructor)msg_data_dealloc,/*tp_dealloc*/
+    0,                         /*tp_print*/
+    0,                         /*tp_getattr*/
+    0,                         /*tp_setattr*/
+    0,                         /*tp_compare*/
+    0,                         /*tp_repr*/
+    0,                         /*tp_as_number*/
+    0,                         /*tp_as_sequence*/
+    0,                         /*tp_as_mapping*/
+    0,                         /*tp_hash */
+    0,                         /*tp_call*/
+    0,                         /*tp_str*/
+    0,                         /*tp_getattro*/
+    0,                         /*tp_setattro*/
+    0,                         /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,        /*tp_flags*/
+    "msg_data objects",        /* tp_doc */
+    0,                         /* tp_traverse */
+    0,                         /* tp_clear */
+    0,                         /* tp_richcompare */
+    0,                         /* tp_weaklistoffset */
+    0,                         /* tp_iter */
+    0,                         /* tp_iternext */
+    0,                         /* tp_methods */
+    msg_data_members,          /* tp_members */
+    0,                         /* tp_getset */
+    0,                         /* tp_base */
+    0,                         /* tp_dict */
+    0,                         /* tp_descr_get */
+    0,                         /* tp_descr_set */
+    0,                         /* tp_dictoffset */
+    0,                         /* tp_init */
+    0,                         /* tp_alloc */
+    msg_data_new,                 /* tp_new */
+
+};
+
+/* 
+ * translate_hdr
+ * internal function 
+ * translate from hdr_list to pjsip_generic_string_hdr
+ */
+void translate_hdr(pj_pool_t *pool, pjsip_hdr *hdr, PyObject *py_hdr_list)
+{
+    pj_list_init(hdr);
+
+    if (PyList_Check(py_hdr_list)) {
+	int i;
+
+        for (i = 0; i < PyList_Size(py_hdr_list); i++) 
+	{ 
+            pj_str_t hname, hvalue;
+	    pjsip_generic_string_hdr * new_hdr;
+            PyObject * tuple = PyList_GetItem(py_hdr_list, i);
+
+            if (PyTuple_Check(tuple)) 
+	    {
+                hname.ptr = PyString_AsString(PyTuple_GetItem(tuple,0));
+                hname.slen = strlen(PyString_AsString
+					(PyTuple_GetItem(tuple,0)));
+                hvalue.ptr = PyString_AsString(PyTuple_GetItem(tuple,1));
+                hvalue.slen = strlen(PyString_AsString
+					(PyTuple_GetItem(tuple,1)));
+            } else {
+		hname.ptr = "";
+		hname.slen = 0;
+		hvalue.ptr = "";
+		hvalue.slen = 0;
+            }  
+            new_hdr = pjsip_generic_string_hdr_create(pool, &hname, &hvalue);
+            pj_list_push_back((pj_list_type *)hdr, (pj_list_type *)new_hdr);
+	}     
+    }
+}
+
+/* 
+ * translate_hdr_rev
+ * internal function
+ * translate from pjsip_generic_string_hdr to hdr_list
+ */
+
+void translate_hdr_rev(pjsip_generic_string_hdr *hdr, PyObject *py_hdr_list)
+{
+    int i;
+    int len;
+    pjsip_generic_string_hdr * p_hdr;
+
+    len = pj_list_size(hdr);
+    
+    if (len > 0) 
+    {
+        p_hdr = hdr;
+        Py_XDECREF(py_hdr_list);
+        py_hdr_list = PyList_New(len);
+
+        for (i = 0; i < len && p_hdr != NULL; i++) 
+	{
+            PyObject * tuple;
+            PyObject * str;
+
+            tuple = PyTuple_New(2);
+	    
+            str = PyString_FromStringAndSize(p_hdr->name.ptr, p_hdr->name.slen);
+            PyTuple_SetItem(tuple, 0, str);
+            str = PyString_FromStringAndSize
+		(hdr->hvalue.ptr, p_hdr->hvalue.slen);
+            PyTuple_SetItem(tuple, 1, str);
+            PyList_SetItem(py_hdr_list, i, tuple);
+            p_hdr = p_hdr->next;
+	}
+    }
+    
+    
+}
+
+/*
+ * pj_pool_Object
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    pj_pool_t * pool;
+} pj_pool_Object;
+
+
+/*
+ * pj_pool_Type
+ */
+static PyTypeObject pj_pool_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                         /*ob_size*/
+    "py_pjsua.PJ_Pool",        /*tp_name*/
+    sizeof(pj_pool_Object),    /*tp_basicsize*/
+    0,                         /*tp_itemsize*/
+    0,                         /*tp_dealloc*/
+    0,                         /*tp_print*/
+    0,                         /*tp_getattr*/
+    0,                         /*tp_setattr*/
+    0,                         /*tp_compare*/
+    0,                         /*tp_repr*/
+    0,                         /*tp_as_number*/
+    0,                         /*tp_as_sequence*/
+    0,                         /*tp_as_mapping*/
+    0,                         /*tp_hash */
+    0,                         /*tp_call*/
+    0,                         /*tp_str*/
+    0,                         /*tp_getattro*/
+    0,                         /*tp_setattro*/
+    0,                         /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,        /*tp_flags*/
+    "pj_pool_t objects",       /* tp_doc */
+
+};
+
+
+/*
+ * pjsip_endpoint_Object
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    pjsip_endpoint * endpt;
+} pjsip_endpoint_Object;
+
+
+/*
+ * pjsip_endpoint_Type
+ */
+static PyTypeObject pjsip_endpoint_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                         /*ob_size*/
+    "py_pjsua.PJSIP_Endpoint", /*tp_name*/
+    sizeof(pjsip_endpoint_Object),/*tp_basicsize*/
+    0,                         /*tp_itemsize*/
+    0,                         /*tp_dealloc*/
+    0,                         /*tp_print*/
+    0,                         /*tp_getattr*/
+    0,                         /*tp_setattr*/
+    0,                         /*tp_compare*/
+    0,                         /*tp_repr*/
+    0,                         /*tp_as_number*/
+    0,                         /*tp_as_sequence*/
+    0,                         /*tp_as_mapping*/
+    0,                         /*tp_hash */
+    0,                         /*tp_call*/
+    0,                         /*tp_str*/
+    0,                         /*tp_getattro*/
+    0,                         /*tp_setattro*/
+    0,                         /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,        /*tp_flags*/
+    "pjsip_endpoint objects",  /* tp_doc */
+};
+
+
+/*
+ * pjmedia_endpt_Object
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    pjmedia_endpt * endpt;
+} pjmedia_endpt_Object;
+
+
+/*
+ * pjmedia_endpt_Type
+ */
+static PyTypeObject pjmedia_endpt_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                         /*ob_size*/
+    "py_pjsua.PJMedia_Endpt",  /*tp_name*/
+    sizeof(pjmedia_endpt_Object), /*tp_basicsize*/
+    0,                         /*tp_itemsize*/
+    0,                         /*tp_dealloc*/
+    0,                         /*tp_print*/
+    0,                         /*tp_getattr*/
+    0,                         /*tp_setattr*/
+    0,                         /*tp_compare*/
+    0,                         /*tp_repr*/
+    0,                         /*tp_as_number*/
+    0,                         /*tp_as_sequence*/
+    0,                         /*tp_as_mapping*/
+    0,                         /*tp_hash */
+    0,                         /*tp_call*/
+    0,                         /*tp_str*/
+    0,                         /*tp_getattro*/
+    0,                         /*tp_setattro*/
+    0,                         /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,        /*tp_flags*/
+    "pjmedia_endpt objects",   /* tp_doc */
+
+};
+
+
+/*
+ * pj_pool_factory_Object
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    pj_pool_factory * pool_fact;
+} pj_pool_factory_Object;
+
+
+
+/*
+ * pj_pool_factory_Type
+ */
+static PyTypeObject pj_pool_factory_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                         /*ob_size*/
+    "py_pjsua.PJ_Pool_Factory",/*tp_name*/
+    sizeof(pj_pool_factory_Object), /*tp_basicsize*/
+    0,                         /*tp_itemsize*/
+    0,                         /*tp_dealloc*/
+    0,                         /*tp_print*/
+    0,                         /*tp_getattr*/
+    0,                         /*tp_setattr*/
+    0,                         /*tp_compare*/
+    0,                         /*tp_repr*/
+    0,                         /*tp_as_number*/
+    0,                         /*tp_as_sequence*/
+    0,                         /*tp_as_mapping*/
+    0,                         /*tp_hash */
+    0,                         /*tp_call*/
+    0,                         /*tp_str*/
+    0,                         /*tp_getattro*/
+    0,                         /*tp_setattro*/
+    0,                         /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,        /*tp_flags*/
+    "pj_pool_factory objects", /* tp_doc */
+
+};
+
+
+/*
+ * pjsip_cred_info_Object
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+	PyObject * realm;		
+    PyObject * scheme;		
+    PyObject * username;	
+    int	data_type;	
+    PyObject * data;	
+    
+} pjsip_cred_info_Object;
+
+/*
+ * cred_info_dealloc
+ * deletes a cred info from memory
+ */
+static void pjsip_cred_info_dealloc(pjsip_cred_info_Object* self)
+{
+    Py_XDECREF(self->realm);
+    Py_XDECREF(self->scheme);
+    Py_XDECREF(self->username);
+    Py_XDECREF(self->data);
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * cred_info_new
+ * constructor for cred_info object
+ */
+static PyObject * pjsip_cred_info_new(PyTypeObject *type, PyObject *args,
+                                    PyObject *kwds)
+{
+    pjsip_cred_info_Object *self;
+
+    self = (pjsip_cred_info_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->realm = PyString_FromString("");
+        if (self->realm == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+        self->scheme = PyString_FromString("");
+        if (self->scheme == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+        self->username = PyString_FromString("");
+        if (self->username == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+        self->data = PyString_FromString("");
+        if (self->data == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+    }
+
+    return (PyObject *)self;
+}
+
+
+/*
+ * pjsip_cred_info_members
+ */
+static PyMemberDef pjsip_cred_info_members[] =
+{
+    {
+        "realm", T_OBJECT_EX,
+        offsetof(pjsip_cred_info_Object, realm), 0,
+        "Realm"
+    },
+    {
+        "scheme", T_OBJECT_EX,
+        offsetof(pjsip_cred_info_Object, scheme), 0,
+        "Scheme"
+    },
+    {
+        "username", T_OBJECT_EX,
+        offsetof(pjsip_cred_info_Object, username), 0,
+        "User name"
+    },
+    {
+        "data", T_OBJECT_EX,
+        offsetof(pjsip_cred_info_Object, data), 0,
+        "The data, which can be a plaintext password or a hashed digest. "
+    },
+    {
+        "data_type", T_INT, offsetof(pjsip_cred_info_Object, data_type), 0,
+        "Type of data"
+    },
+    
+    {NULL}  /* Sentinel */
+};
+
+/*
+ * pjsip_cred_info_Type
+ */
+static PyTypeObject pjsip_cred_info_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.PJSIP_Cred_Info",      /*tp_name*/
+    sizeof(pjsip_cred_info_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)pjsip_cred_info_dealloc,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "PJSIP Cred Info objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    pjsip_cred_info_members,         /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    pjsip_cred_info_new,             /* tp_new */
+
+};
+
+/*
+ * py_pjsua_thread_register
+ * !added @ 061206
+ */
+static PyObject *py_pjsua_thread_register(PyObject *pSelf, PyObject 
+*pArgs)
+{
+	
+    pj_status_t status;	
+    const char *name;
+    PyObject *py_desc;
+    pj_thread_t *thread;
+    void *thread_desc;
+#if 0
+    int size;
+    int i;
+    int *td;
+#endif
+
+    if (!PyArg_ParseTuple(pArgs, "sO", &name, &py_desc))
+    {
+         return NULL;
+    }
+#if 0
+    size = PyList_Size(py_desc);
+    td = (int *)malloc(size * sizeof(int));
+    for (i = 0; i < size; i++) 
+    {
+	if (!PyArg_Parse(PyList_GetItem(py_desc,i),"i", td[i])) 
+	{
+	    return NULL;
+	}
+    }
+    thread_desc = td;
+#else
+    thread_desc = malloc(sizeof(pj_thread_desc));
+#endif
+    status = pj_thread_register(name, thread_desc, &thread);
+
+    if (status == PJ_SUCCESS)
+	status = pj_thread_local_set(thread_id, (void*)1);
+    return Py_BuildValue("i",status);
+}
+
+/*
+ * py_pjsua_logging_config_default
+ * !modified @ 051206
+ */
+static PyObject *py_pjsua_logging_config_default(PyObject *pSelf,
+                                                    PyObject *pArgs)
+{
+    logging_config_Object *obj;	
+    pjsua_logging_config cfg;
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    
+    pjsua_logging_config_default(&cfg);
+    obj = (logging_config_Object *) logging_config_new
+		(&logging_config_Type,NULL,NULL);
+    obj->msg_logging = cfg.msg_logging;
+    obj->level = cfg.level;
+    obj->console_level = cfg.console_level;
+    obj->decor = cfg.decor;
+    
+    return (PyObject *)obj;
+}
+
+
+/*
+ * py_pjsua_config_default
+ * !modified @ 051206
+ */
+static PyObject *py_pjsua_config_default(PyObject *pSelf, PyObject *pArgs)
+{
+    config_Object *obj;
+    pjsua_config cfg;
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    pjsua_config_default(&cfg);
+    obj = (config_Object *) config_new(&config_Type, NULL, NULL);
+    obj->max_calls = cfg.max_calls;
+    obj->thread_cnt = cfg.thread_cnt;
+    return (PyObject *)obj;
+}
+
+
+/*
+ * py_pjsua_media_config_default
+ * !modified @ 051206
+ */
+static PyObject * py_pjsua_media_config_default(PyObject *pSelf,
+                                                PyObject *pArgs)
+{
+    media_config_Object *obj;
+    pjsua_media_config cfg;
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    pjsua_media_config_default(&cfg);
+    obj = (media_config_Object *)PyType_GenericNew
+		(&media_config_Type, NULL, NULL);
+    obj->clock_rate = cfg.clock_rate;
+    obj->ec_options = cfg.ec_options;
+    obj->ec_tail_len = cfg.ec_tail_len;
+    obj->has_ioqueue = cfg.has_ioqueue;
+    obj->ilbc_mode = cfg.ilbc_mode;
+    obj->max_media_ports = cfg.max_media_ports;
+    obj->no_vad = cfg.no_vad;
+    obj->ptime = cfg.ptime;
+    obj->quality = cfg.quality;
+    obj->rx_drop_pct = cfg.rx_drop_pct;
+    obj->thread_cnt = cfg.thread_cnt;
+    obj->tx_drop_pct = cfg.tx_drop_pct;
+    return (PyObject *)obj;
+}
+
+
+/*
+ * py_pjsua_msg_data_init
+ * !modified @ 051206
+ */
+static PyObject *py_pjsua_msg_data_init(PyObject *pSelf, PyObject *pArgs)
+{
+    msg_data_Object *obj;
+    pjsua_msg_data msg;
+    
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    pjsua_msg_data_init(&msg);
+    obj = (msg_data_Object *)msg_data_new(&msg_data_Type, NULL, NULL);
+    Py_XDECREF(obj->content_type);
+    obj->content_type = PyString_FromStringAndSize(
+        msg.content_type.ptr, msg.content_type.slen
+    );
+    Py_XDECREF(obj->msg_body);
+    obj->msg_body = PyString_FromStringAndSize(
+        msg.msg_body.ptr, msg.msg_body.slen
+    );
+
+    translate_hdr_rev((pjsip_generic_string_hdr *)&msg.hdr_list,obj->hdr_list);
+    
+    return (PyObject *)obj;
+}
+
+
+/*
+ * py_pjsua_reconfigure_logging
+ */
+static PyObject *py_pjsua_reconfigure_logging(PyObject *pSelf, PyObject *pArgs)
+{
+    PyObject * logObj;
+    logging_config_Object *log;
+    pjsua_logging_config cfg;
+    pj_status_t status;
+
+    if (!PyArg_ParseTuple(pArgs, "O", &logObj))
+    {
+        return NULL;
+    }
+    if (logObj != Py_None) 
+    {
+        log = (logging_config_Object *)logObj;
+        cfg.msg_logging = log->msg_logging;
+        cfg.level = log->level;
+        cfg.console_level = log->console_level;
+        cfg.decor = log->decor;
+        cfg.log_filename.ptr = PyString_AsString(log->log_filename);
+        cfg.log_filename.slen = strlen(cfg.log_filename.ptr);
+        Py_XDECREF(obj_log_cb);
+        obj_log_cb = log->cb;
+        Py_INCREF(obj_log_cb);
+        cfg.cb = &cb_log_cb;
+        status = pjsua_reconfigure_logging(&cfg);
+    } else {
+        status = pjsua_reconfigure_logging(NULL);
+    }
+    return Py_BuildValue("i",status);
+}
+
+
+/*
+ * py_pjsua_pool_create
+ */
+static PyObject *py_pjsua_pool_create(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_size_t init_size;
+    pj_size_t increment;
+    const char * name;
+    pj_pool_t *p;
+    pj_pool_Object *pool;
+
+    if (!PyArg_ParseTuple(pArgs, "sII", &name, &init_size, &increment))
+    {
+        return NULL;
+    }
+    
+    p = pjsua_pool_create(name, init_size, increment);
+    pool = (pj_pool_Object *)PyType_GenericNew(&pj_pool_Type, NULL, NULL);
+    pool->pool = p;
+    return (PyObject *)pool;
+
+}
+
+
+/*
+ * py_pjsua_get_pjsip_endpt
+ */
+static PyObject *py_pjsua_get_pjsip_endpt(PyObject *pSelf, PyObject *pArgs)
+{
+    pjsip_endpoint_Object *endpt;
+    pjsip_endpoint *e;
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    e = pjsua_get_pjsip_endpt();
+    endpt = (pjsip_endpoint_Object *)PyType_GenericNew(
+        &pjsip_endpoint_Type, NULL, NULL
+    );
+    endpt->endpt = e;
+    return (PyObject *)endpt;
+}
+
+
+/*
+ * py_pjsua_get_pjmedia_endpt
+ */
+static PyObject *py_pjsua_get_pjmedia_endpt(PyObject *pSelf, PyObject *pArgs)
+{
+    pjmedia_endpt_Object *endpt;
+    pjmedia_endpt *e;
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    e = pjsua_get_pjmedia_endpt();
+    endpt = (pjmedia_endpt_Object *)PyType_GenericNew(
+        &pjmedia_endpt_Type, NULL, NULL
+    );
+    endpt->endpt = e;
+    return (PyObject *)endpt;
+}
+
+
+/*
+ * py_pjsua_get_pool_factory
+ */
+static PyObject *py_pjsua_get_pool_factory(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_pool_factory_Object *pool;
+    pj_pool_factory *p;
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    p = pjsua_get_pool_factory();
+    pool = (pj_pool_factory_Object *)PyType_GenericNew(
+        &pj_pool_factory_Type, NULL, NULL
+    );
+    pool->pool_fact = p;
+    return (PyObject *)pool;
+}
+
+
+/*
+ * py_pjsua_perror
+ */
+static PyObject *py_pjsua_perror(PyObject *pSelf, PyObject *pArgs)
+{
+    const char *sender;
+    const char *title;
+    pj_status_t status;
+    if (!PyArg_ParseTuple(pArgs, "ssi", &sender, &title, &status))
+    {
+        return NULL;
+    }
+	
+    pjsua_perror(sender, title, status);
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+
+/*
+ * py_pjsua_create
+ */
+static PyObject *py_pjsua_create(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    status = pjsua_create();
+    
+    if (status == PJ_SUCCESS) 
+    {
+	status = pj_thread_local_alloc(&thread_id);
+	if (status == PJ_SUCCESS)
+	    status = pj_thread_local_set(thread_id, (void*)1);
+    }
+
+    return Py_BuildValue("i",status);
+}
+
+
+/*
+ * py_pjsua_init
+ */
+static PyObject *py_pjsua_init(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    PyObject * ua_cfgObj;
+    config_Object * ua_cfg;
+    PyObject * log_cfgObj;
+    logging_config_Object * log_cfg;
+    PyObject * media_cfgObj;
+    media_config_Object * media_cfg;
+    pjsua_config cfg_ua;
+    pjsua_config * p_cfg_ua;
+    pjsua_logging_config cfg_log;
+    pjsua_logging_config * p_cfg_log;
+    pjsua_media_config cfg_media;
+    pjsua_media_config * p_cfg_media;
+    unsigned i;
+
+    if (!PyArg_ParseTuple(pArgs, "OOO", &ua_cfgObj, &log_cfgObj,&media_cfgObj))
+    {
+        return NULL;
+    }
+
+    
+    pjsua_config_default(&cfg_ua);
+    pjsua_logging_config_default(&cfg_log);
+    pjsua_media_config_default(&cfg_media);
+
+    if (ua_cfgObj != Py_None) 
+    {
+	ua_cfg = (config_Object *)ua_cfgObj;
+        cfg_ua.cred_count = ua_cfg->cred_count;
+        for (i = 0; i < 4; i++)
+	{
+            cfg_ua.cred_info[i] = ua_cfg->cred_info[i];
+	}
+        cfg_ua.max_calls = ua_cfg->max_calls;
+        for (i = 0; i < PJSUA_ACC_MAX_PROXIES; i++)
+	{
+            cfg_ua.outbound_proxy[i] = ua_cfg->outbound_proxy[i];
+	}
+
+    	g_obj_callback = ua_cfg->cb;
+    	Py_INCREF(g_obj_callback);
+
+    	cfg_ua.cb.on_call_state = &cb_on_call_state;
+    	cfg_ua.cb.on_incoming_call = &cb_on_incoming_call;
+    	cfg_ua.cb.on_call_media_state = &cb_on_call_media_state;
+    	cfg_ua.cb.on_call_transfer_request = &cb_on_call_transfer_request;
+    	cfg_ua.cb.on_call_transfer_status = &cb_on_call_transfer_status;
+    	cfg_ua.cb.on_call_replace_request = &cb_on_call_replace_request;
+    	cfg_ua.cb.on_call_replaced = &cb_on_call_replaced;
+    	cfg_ua.cb.on_reg_state = &cb_on_reg_state;
+    	cfg_ua.cb.on_buddy_state = &cb_on_buddy_state;
+    	cfg_ua.cb.on_pager = &cb_on_pager;
+    	cfg_ua.cb.on_pager_status = &cb_on_pager_status;
+    	cfg_ua.cb.on_typing = &cb_on_typing;
+
+        cfg_ua.outbound_proxy_cnt = ua_cfg->outbound_proxy_cnt;
+        cfg_ua.thread_cnt = ua_cfg->thread_cnt;
+        cfg_ua.user_agent.ptr = PyString_AsString(ua_cfg->user_agent);
+        cfg_ua.user_agent.slen = strlen(cfg_ua.user_agent.ptr);
+
+        p_cfg_ua = &cfg_ua;
+    } else {
+        p_cfg_ua = NULL;
+    }
+
+    if (log_cfgObj != Py_None) 
+    {
+        log_cfg = (logging_config_Object *)log_cfgObj;
+        cfg_log.msg_logging = log_cfg->msg_logging;
+        cfg_log.level = log_cfg->level;
+        cfg_log.console_level = log_cfg->console_level;
+        cfg_log.decor = log_cfg->decor;
+        cfg_log.log_filename.ptr = PyString_AsString(log_cfg->log_filename);
+        cfg_log.log_filename.slen = strlen(cfg_log.log_filename.ptr);
+        Py_XDECREF(obj_log_cb);
+        obj_log_cb = log_cfg->cb;
+        Py_INCREF(obj_log_cb);
+        cfg_log.cb = &cb_log_cb;
+        p_cfg_log = &cfg_log;
+    } else {
+        p_cfg_log = NULL;
+    }
+
+    if (media_cfgObj != Py_None) 
+    {
+        media_cfg = (media_config_Object *)media_cfgObj;
+        cfg_media.clock_rate = media_cfg->clock_rate;
+        cfg_media.ec_options = media_cfg->ec_options;
+        cfg_media.ec_tail_len = media_cfg->ec_tail_len;
+        cfg_media.has_ioqueue = media_cfg->has_ioqueue;
+        cfg_media.ilbc_mode = media_cfg->ilbc_mode;
+        cfg_media.max_media_ports = media_cfg->max_media_ports;
+        cfg_media.no_vad = media_cfg->no_vad;
+        cfg_media.ptime = media_cfg->ptime;
+        cfg_media.quality = media_cfg->quality;
+        cfg_media.rx_drop_pct = media_cfg->rx_drop_pct;
+        cfg_media.thread_cnt = media_cfg->thread_cnt;
+        cfg_media.tx_drop_pct = media_cfg->tx_drop_pct;
+	    p_cfg_media = &cfg_media;
+    } else {
+        p_cfg_media = NULL;
+    }
+
+    status = pjsua_init(p_cfg_ua, p_cfg_log, p_cfg_media);
+    return Py_BuildValue("i",status);
+}
+
+
+/*
+ * py_pjsua_start
+ */
+static PyObject *py_pjsua_start(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    status = pjsua_start();
+    
+    return Py_BuildValue("i",status);
+}
+
+
+/*
+ * py_pjsua_destroy
+ */
+static PyObject *py_pjsua_destroy(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    status = pjsua_destroy();
+    
+    return Py_BuildValue("i",status);
+}
+
+
+/*
+ * py_pjsua_handle_events
+ */
+static PyObject *py_pjsua_handle_events(PyObject *pSelf, PyObject *pArgs)
+{
+    int ret;
+    unsigned msec;
+    if (!PyArg_ParseTuple(pArgs, "i", &msec))
+    {
+        return NULL;
+    }
+
+    /* Since handle_events() will block, we must wrap it with ALLOW_THREADS
+     * construct, or otherwise many Python blocking functions (such as
+     * time.sleep(), readline(), etc.) may hang/block indefinitely.
+     * See http://www.python.org/doc/current/api/threads.html for more info.
+     */
+    Py_BEGIN_ALLOW_THREADS
+    ret = pjsua_handle_events(msec);
+    Py_END_ALLOW_THREADS
+    
+    return Py_BuildValue("i",ret);
+}
+
+
+/*
+ * py_pjsua_verify_sip_url
+ */
+static PyObject *py_pjsua_verify_sip_url(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    const char *url;
+    if (!PyArg_ParseTuple(pArgs, "s", &url))
+    {
+        return NULL;
+    }
+    status = pjsua_verify_sip_url(url);
+    
+    return Py_BuildValue("i",status);
+}
+
+
+/*
+ * function doc
+ */
+
+static char pjsua_thread_register_doc[] =
+    "int py_pjsua.thread_register(string name, int[] desc)";
+static char pjsua_perror_doc[] =
+    "void py_pjsua.perror (string sender, string title, int status) "
+    "Display error message for the specified error code. Parameters: "
+    "sender: The log sender field;  "
+    "title: Message title for the error; "
+    "status: Status code.";
+
+static char pjsua_create_doc[] =
+    "int py_pjsua.create (void) "
+    "Instantiate pjsua application. Application "
+    "must call this function before calling any other functions, to make sure "
+    "that the underlying libraries are properly initialized. Once this "
+    "function has returned success, application must call pjsua_destroy() "
+    "before quitting.";
+
+static char pjsua_init_doc[] =
+    "int py_pjsua.init (py_pjsua.Config ua_cfg, "
+        "py_pjsua.Logging_Config log_cfg, py_pjsua.Media_Config media_cfg) "
+    "Initialize pjsua with the specified settings. All the settings are "
+    "optional, and the default values will be used when the config is not "
+    "specified. Parameters: "
+    "ua_cfg : User agent configuration;  "
+    "log_cfg : Optional logging configuration; "
+    "media_cfg : Optional media configuration.";
+
+static char pjsua_start_doc[] =
+    "int py_pjsua.start (void) "
+    "Application is recommended to call this function after all "
+    "initialization is done, so that the library can do additional checking "
+    "set up additional";
+
+static char pjsua_destroy_doc[] =
+    "int py_pjsua.destroy (void) "
+    "Destroy pjsua This function must be called once PJSUA is created. To "
+    "make it easier for application, application may call this function "
+    "several times with no danger.";
+
+static char pjsua_handle_events_doc[] =
+    "int py_pjsua.handle_events (int msec_timeout) "
+    "Poll pjsua for events, and if necessary block the caller thread for the "
+    "specified maximum interval (in miliseconds) Parameters: "
+    "msec_timeout: Maximum time to wait, in miliseconds. "
+    "Returns: The number of events that have been handled during the poll. "
+    "Negative value indicates error, and application can retrieve the error "
+    "as (err = -return_value).";
+
+static char pjsua_verify_sip_url_doc[] =
+    "int py_pjsua.verify_sip_url (string c_url) "
+    "Verify that valid SIP url is given Parameters: "
+    "c_url: The URL, as NULL terminated string.";
+
+static char pjsua_pool_create_doc[] =
+    "py_pjsua.PJ_Pool py_pjsua.pool_create (string name, int init_size, "
+                                            "int increment) "
+    "Create memory pool Parameters: "
+    "name: Optional pool name; "
+    "init_size: Initial size of the pool;  "
+    "increment: Increment size.";
+
+static char pjsua_get_pjsip_endpt_doc[] =
+    "py_pjsua.PJSIP_Endpoint py_pjsua.get_pjsip_endpt (void) "
+    "Internal function to get SIP endpoint instance of pjsua, which is needed "
+    "for example to register module, create transports, etc. Probably is only "
+    "valid after pjsua_init() is called.";
+
+static char pjsua_get_pjmedia_endpt_doc[] =
+    "py_pjsua.PJMedia_Endpt py_pjsua.get_pjmedia_endpt (void) "
+    "Internal function to get media endpoint instance. Only valid after "
+    "pjsua_init() is called.";
+
+static char pjsua_get_pool_factory_doc[] =
+    "py_pjsua.PJ_Pool_Factory py_pjsua.get_pool_factory (void) "
+    "Internal function to get PJSUA pool factory. Only valid after "
+    "pjsua_init() is called.";
+
+static char pjsua_reconfigure_logging_doc[] =
+    "int py_pjsua.reconfigure_logging (py_pjsua.Logging_Config c) "
+    "Application can call this function at any time (after pjsua_create(), of "
+    "course) to change logging settings. Parameters: "
+    "c: Logging configuration.";
+
+static char pjsua_logging_config_default_doc[] =
+    "py_pjsua.Logging_Config py_pjsua.logging_config_default  ()  "
+    "Use this function to initialize logging config.";
+
+static char pjsua_config_default_doc[] =
+    "py_pjsua.Config py_pjsua.config_default (). Use this function to "
+    "initialize pjsua config. ";
+
+static char pjsua_media_config_default_doc[] =
+    "py_pjsua.Media_Config py_pjsua.media_config_default (). "
+    "Use this function to initialize media config.";
+
+static char pjsua_msg_data_init_doc[] =
+    "py_pjsua.Msg_Data void py_pjsua.msg_data_init () "
+    "Initialize message data ";
+        
+
+/* END OF LIB BASE */
+
+/* LIB TRANSPORT */
+
+/*
+ * transport_config_Object
+ * Transport configuration for creating UDP transports for both SIP
+ * and media.
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    unsigned port;
+    PyObject * public_addr;
+    PyObject * bound_addr;
+} transport_config_Object;
+
+
+/*
+ * transport_config_dealloc
+ * deletes a transport config from memory
+ */
+static void transport_config_dealloc(transport_config_Object* self)
+{
+    Py_XDECREF(self->public_addr);    
+    Py_XDECREF(self->bound_addr);    
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * transport_config_new
+ * constructor for transport_config object
+ */
+static PyObject * transport_config_new(PyTypeObject *type, PyObject *args,
+                                    PyObject *kwds)
+{
+    transport_config_Object *self;
+
+    self = (transport_config_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->public_addr = PyString_FromString("");
+        if (self->public_addr == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+		self->bound_addr = PyString_FromString("");
+        if (self->bound_addr == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+    }
+
+    return (PyObject *)self;
+}
+
+
+/*
+ * transport_config_members
+ */
+static PyMemberDef transport_config_members[] =
+{
+    {
+        "port", T_INT, offsetof(transport_config_Object, port), 0,
+        "UDP port number to bind locally. This setting MUST be specified "
+        "even when default port is desired. If the value is zero, the "
+        "transport will be bound to any available port, and application "
+        "can query the port by querying the transport info."
+    },
+    {
+        "public_addr", T_OBJECT_EX, 
+	offsetof(transport_config_Object, public_addr), 0,
+        "Optional address to advertise as the address of this transport. "
+        "Application can specify any address or hostname for this field, "
+        "for example it can point to one of the interface address in the "
+        "system, or it can point to the public address of a NAT router "
+        "where port mappings have been configured for the application."		
+    },    
+    {
+        "bound_addr", T_OBJECT_EX, 
+        offsetof(transport_config_Object, bound_addr), 0,
+        "Optional address where the socket should be bound to. This option "
+        "SHOULD only be used to selectively bind the socket to particular "
+        "interface (instead of 0.0.0.0), and SHOULD NOT be used to set the "
+        "published address of a transport (the public_addr field should be "
+        "used for that purpose)."		
+    },    
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * transport_config_Type
+ */
+static PyTypeObject transport_config_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.Transport_Config",      /*tp_name*/
+    sizeof(transport_config_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)transport_config_dealloc,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "Transport Config objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    transport_config_members,         /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    transport_config_new,             /* tp_new */
+
+};
+
+/*
+ * host_port_Object
+ * C/Python wrapper for host_port object
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    PyObject * host;
+    int port;
+} host_port_Object;
+
+/*
+ * host_port_dealloc
+ * deletes a host_port from memory
+ */
+static void host_port_dealloc(host_port_Object* self)
+{
+    Py_XDECREF(self->host);    
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * host_port_new
+ * constructor for host_port object
+ */
+static PyObject * host_port_new(PyTypeObject *type, PyObject *args,
+                                    PyObject *kwds)
+{
+    host_port_Object *self;
+
+    self = (host_port_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->host = PyString_FromString("");
+        if (self->host == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+        
+    }
+
+    return (PyObject *)self;
+}
+
+
+/*
+ * host_port_members
+ * declares attributes accessible from both C and Python for host_port object
+ */
+static PyMemberDef host_port_members[] =
+{    
+    {
+        "port", T_INT,
+        offsetof(host_port_Object, port), 0,
+        "Port number."
+    },
+    {
+        "host", T_OBJECT_EX,
+        offsetof(host_port_Object, host), 0,
+        "Host part or IP address."
+    },
+    {NULL}  /* Sentinel */
+};
+
+
+/*
+ * host_port_Type
+ */
+static PyTypeObject host_port_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.Host_Port",        /*tp_name*/
+    sizeof(host_port_Object),    /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)host_port_dealloc,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "Host_port objects",         /*tp_doc*/
+    0,                              /*tp_traverse*/
+    0,                              /*tp_clear*/
+    0,                              /*tp_richcompare*/
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    host_port_members,           /* tp_members */
+	0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    host_port_new,             /* tp_new */
+};
+
+
+
+
+/*
+ * transport_info_Object
+ * Transport info
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    int id;
+    int type;
+    PyObject * type_name;
+    PyObject * info;
+    unsigned flag;
+    unsigned addr_len;
+    host_port_Object * local_name;
+    unsigned usage_count;
+} transport_info_Object;
+
+
+/*
+ * transport_info_dealloc
+ * deletes a transport info from memory
+ */
+static void transport_info_dealloc(transport_info_Object* self)
+{
+    Py_XDECREF(self->type_name); 
+    Py_XDECREF(self->info);
+    Py_XDECREF(self->local_name);
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * transport_info_new
+ * constructor for transport_info object
+ */
+static PyObject * transport_info_new(PyTypeObject *type, PyObject *args,
+                                    PyObject *kwds)
+{
+    transport_info_Object *self;
+
+    self = (transport_info_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->type_name = PyString_FromString("");
+        if (self->type_name == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+        self->info = PyString_FromString("");
+        if (self->info == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+        self->local_name = 
+            (host_port_Object *)host_port_new(&host_port_Type,NULL,NULL);
+        if (self->local_name == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+    }
+
+    return (PyObject *)self;
+}
+
+
+/*
+ * transport_info_members
+ */
+static PyMemberDef transport_info_members[] =
+{
+    {
+        "id", T_INT, offsetof(transport_info_Object, id), 0,
+        "PJSUA transport identification."
+    },
+    {
+        "type", T_INT, offsetof(transport_info_Object, id), 0,
+        "Transport type."
+    },
+    {
+        "type_name", T_OBJECT_EX,
+        offsetof(transport_info_Object, type_name), 0,
+        "Transport type name."
+    },
+    {
+        "info", T_OBJECT_EX,
+        offsetof(transport_info_Object, info), 0,
+        "Transport string info/description."
+    },
+    {
+        "flag", T_INT, offsetof(transport_info_Object, flag), 0,
+        "Transport flag (see ##pjsip_transport_flags_e)."
+    },
+    {
+        "addr_len", T_INT, offsetof(transport_info_Object, addr_len), 0,
+        "Local address length."
+    },
+    {
+        "local_name", T_OBJECT_EX,
+        offsetof(transport_info_Object, local_name), 0,
+        "Published address (or transport address name)."
+    },
+    {
+        "usage_count", T_INT, offsetof(transport_info_Object, usage_count), 0,
+        "Current number of objects currently referencing this transport."
+    },    
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * transport_info_Type
+ */
+static PyTypeObject transport_info_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.Transport_Info",      /*tp_name*/
+    sizeof(transport_info_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)transport_info_dealloc,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "Transport Info objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    transport_info_members,         /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    transport_info_new,             /* tp_new */
+
+};
+
+/*
+ * pjsip_transport_Object
+ * C/python typewrapper for pjsip_transport
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    pjsip_transport *tp;
+} pjsip_transport_Object;
+
+
+/*
+ * pjsip_transport_Type
+ */
+static PyTypeObject pjsip_transport_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.PJSIP_Transport",       /*tp_name*/
+    sizeof(pjsip_transport_Object),   /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    0,                              /*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "pjsip_transport objects",        /*tp_doc*/
+};
+
+
+/*
+ * py_pjsua_transport_config_default
+ * !modified @ 051206
+ */
+static PyObject *py_pjsua_transport_config_default
+(PyObject *pSelf, PyObject *pArgs)
+{
+    transport_config_Object *obj;
+    pjsua_transport_config cfg;
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    pjsua_transport_config_default(&cfg);
+    obj = (transport_config_Object *)transport_config_new
+		(&transport_config_Type,NULL,NULL);
+    obj->public_addr = 
+        PyString_FromStringAndSize(cfg.public_addr.ptr, cfg.public_addr.slen);
+    obj->bound_addr = 
+        PyString_FromStringAndSize(cfg.bound_addr.ptr, cfg.bound_addr.slen);
+    obj->port = cfg.port;
+    return (PyObject *)obj;
+}
+
+/*
+ * py_pjsua_transport_create
+ * !modified @ 051206
+ */
+static PyObject *py_pjsua_transport_create(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    int type;
+    
+    PyObject * tmpObj;
+    transport_config_Object *obj;
+    pjsua_transport_config cfg;
+    pjsua_transport_id id;
+    if (!PyArg_ParseTuple(pArgs, "iO", &type, &tmpObj))
+    {
+        return NULL;
+    }
+    if (tmpObj != Py_None)
+    {
+        obj = (transport_config_Object *)tmpObj;
+        cfg.public_addr.ptr = PyString_AsString(obj->public_addr);
+        cfg.public_addr.slen = strlen(PyString_AsString(obj->public_addr));
+        cfg.bound_addr.ptr = PyString_AsString(obj->bound_addr);
+        cfg.bound_addr.slen = strlen(PyString_AsString(obj->bound_addr));
+        cfg.port = obj->port;
+        status = pjsua_transport_create(type, &cfg, &id);
+    } else {
+        status = pjsua_transport_create(type, NULL, &id);
+    }
+    
+    
+    return Py_BuildValue("ii",status,id);
+}
+
+/*
+ * py_pjsua_transport_register
+ * !modified @ 051206
+ */
+static PyObject *py_pjsua_transport_register(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;	    
+    PyObject * tmpObj;
+    pjsip_transport_Object *obj;	
+    pjsua_transport_id id;
+    if (!PyArg_ParseTuple(pArgs, "O", &tmpObj))
+    {
+        return NULL;
+    }
+    if (tmpObj != Py_None)
+    {
+        obj = (pjsip_transport_Object *)tmpObj;
+        status = pjsua_transport_register(obj->tp, &id);
+    } else {
+        status = pjsua_transport_register(NULL, &id);
+    }
+    
+    return Py_BuildValue("ii",status, id);
+}
+
+/*
+ * py_pjsua_enum_transports
+ * !modified @ 261206
+ */
+static PyObject *py_pjsua_enum_transports(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    PyObject *list;
+    
+    pjsua_transport_id id[PJSIP_MAX_TRANSPORTS];
+    unsigned c, i;
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+    
+    c = PJ_ARRAY_SIZE(id);
+    status = pjsua_enum_transports(id, &c);
+    
+    list = PyList_New(c);
+    for (i = 0; i < c; i++) 
+    {     
+        int ret = PyList_SetItem(list, i, Py_BuildValue("i", id[i]));
+        if (ret == -1) 
+        {
+            return NULL;
+        }
+    }
+    
+    return Py_BuildValue("O",list);
+}
+
+/*
+ * py_pjsua_transport_get_info
+ * !modified @ 051206
+ */
+static PyObject *py_pjsua_transport_get_info(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    int id;
+    transport_info_Object *obj;
+    pjsua_transport_info info;
+    
+
+    if (!PyArg_ParseTuple(pArgs, "i", &id))
+    {
+        return NULL;
+    }	
+    
+    status = pjsua_transport_get_info(id, &info);	
+    if (status == PJ_SUCCESS) {
+        obj = (transport_info_Object *) transport_info_new
+			(&transport_info_Type,NULL,NULL);
+        obj->addr_len = info.addr_len;
+        obj->flag = info.flag;
+        obj->id = info.id;
+        obj->info = PyString_FromStringAndSize(info.info.ptr, info.info.slen);
+        return Py_BuildValue("O", obj);
+    } else {
+        Py_INCREF(Py_None);
+        return Py_None;
+    }
+}
+
+/*
+ * py_pjsua_transport_set_enable
+ */
+static PyObject *py_pjsua_transport_set_enable
+(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    int id;
+    int enabled;
+    if (!PyArg_ParseTuple(pArgs, "ii", &id, &enabled))
+    {
+        return NULL;
+    }	
+    status = pjsua_transport_set_enable(id, enabled);	
+    
+    return Py_BuildValue("i",status);
+}
+
+/*
+ * py_pjsua_transport_close
+ */
+static PyObject *py_pjsua_transport_close(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    int id;
+    int force;
+    if (!PyArg_ParseTuple(pArgs, "ii", &id, &force))
+    {
+        return NULL;
+    }	
+    status = pjsua_transport_close(id, force);	
+    
+    return Py_BuildValue("i",status);
+}
+
+static char pjsua_transport_config_default_doc[] =
+    "py_pjsua.Transport_Config py_pjsua.transport_config_default () "
+    "Call this function to initialize UDP config with default values.";
+static char pjsua_transport_create_doc[] =
+    "int, int py_pjsua.transport_create (int type, "
+    "py_pjsua.Transport_Config cfg) "
+    "Create SIP transport.";
+static char pjsua_transport_register_doc[] =
+    "int, int py_pjsua.transport_register "
+    "(py_pjsua.PJSIP_Transport tp) "
+    "Register transport that has been created by application.";
+static char pjsua_enum_transports_doc[] =
+    "int[] py_pjsua.enum_transports () "
+    "Enumerate all transports currently created in the system.";
+static char pjsua_transport_get_info_doc[] =
+    "void py_pjsua.transport_get_info "
+    "(py_pjsua.Transport_ID id, py_pjsua.Transport_Info info) "
+    "Get information about transports.";
+static char pjsua_transport_set_enable_doc[] =
+    "void py_pjsua.transport_set_enable "
+    "(py_pjsua.Transport_ID id, int enabled) "
+    "Disable a transport or re-enable it. "
+    "By default transport is always enabled after it is created. "
+    "Disabling a transport does not necessarily close the socket, "
+    "it will only discard incoming messages and prevent the transport "
+    "from being used to send outgoing messages.";
+static char pjsua_transport_close_doc[] =
+    "void py_pjsua.transport_close (py_pjsua.Transport_ID id, int force) "
+    "Close the transport. If transport is forcefully closed, "
+    "it will be immediately closed, and any pending transactions "
+    "that are using the transport may not terminate properly. "
+    "Otherwise, the system will wait until all transactions are closed "
+    "while preventing new users from using the transport, and will close "
+    "the transport when it is safe to do so.";
+
+/* END OF LIB TRANSPORT */
+
+/* LIB ACCOUNT */
+
+/*
+ * acc_config_Object
+ * Acc Config
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    int priority;	
+    PyObject * id;
+    PyObject * reg_uri;
+    int publish_enabled;
+    PyObject * force_contact;
+    unsigned proxy_cnt;
+    /*pj_str_t proxy[8];*/
+    PyListObject * proxy;
+    unsigned reg_timeout;
+    unsigned cred_count;
+    /*pjsip_cred_info cred_info[8];*/
+    PyListObject * cred_info;
+} acc_config_Object;
+
+
+/*
+ * acc_config_dealloc
+ * deletes a acc_config from memory
+ */
+static void acc_config_dealloc(acc_config_Object* self)
+{
+    Py_XDECREF(self->id); 
+    Py_XDECREF(self->reg_uri);
+    Py_XDECREF(self->force_contact);	
+    Py_XDECREF(self->proxy);
+    Py_XDECREF(self->cred_info);
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * acc_config_new
+ * constructor for acc_config object
+ */
+static PyObject * acc_config_new(PyTypeObject *type, PyObject *args,
+                                    PyObject *kwds)
+{
+    acc_config_Object *self;
+
+    self = (acc_config_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->id = PyString_FromString("");
+        if (self->id == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+        self->reg_uri = PyString_FromString("");
+        if (self->reg_uri == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+        self->force_contact = PyString_FromString("");
+        if (self->force_contact == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+	self->proxy = (PyListObject *)PyList_New(8);
+	if (self->proxy == NULL)
+	{
+	    Py_DECREF(self);
+	    return NULL;
+	}
+	self->cred_info = (PyListObject *)PyList_New(8);
+	if (self->cred_info == NULL)
+	{
+	    Py_DECREF(self);
+	    return NULL;
+	}
+    }
+
+    return (PyObject *)self;
+}
+
+
+
+/*
+ * acc_config_members
+ */
+static PyMemberDef acc_config_members[] =
+{
+    {
+        "priority", T_INT, offsetof(acc_config_Object, priority), 0,
+        "Account priority, which is used to control the order of matching "
+        "incoming/outgoing requests. The higher the number means the higher "
+        "the priority is, and the account will be matched first. "
+    },
+    {
+        "id", T_OBJECT_EX,
+        offsetof(acc_config_Object, id), 0,
+        "The full SIP URL for the account. "
+        "The value can take name address or URL format, "
+        "and will look something like 'sip:account@serviceprovider'. "
+        "This field is mandatory."
+    },
+    {
+        "reg_uri", T_OBJECT_EX,
+        offsetof(acc_config_Object, reg_uri), 0,
+        "This is the URL to be put in the request URI for the registration, "
+        "and will look something like 'sip:serviceprovider'. "
+        "This field should be specified if registration is desired. "
+        "If the value is empty, no account registration will be performed. "
+    },
+    {
+        "publish_enabled", T_INT, 
+        offsetof(acc_config_Object, publish_enabled), 0,
+        "Publish presence? "
+    },
+    {
+        "force_contact", T_OBJECT_EX,
+        offsetof(acc_config_Object, force_contact), 0,
+        "Optional URI to be put as Contact for this account. "
+        "It is recommended that this field is left empty, "
+        "so that the value will be calculated automatically "
+        "based on the transport address. "
+    },
+    {
+        "proxy_cnt", T_INT, offsetof(acc_config_Object, proxy_cnt), 0,
+        "Number of proxies in the proxy array below. "
+    },
+    {
+        "proxy", T_OBJECT_EX,
+        offsetof(acc_config_Object, proxy), 0,
+        "Optional URI of the proxies to be visited for all outgoing requests "
+	"that are using this account (REGISTER, INVITE, etc). Application need "
+	"to specify these proxies if the service provider requires "
+	"that requests destined towards its network should go through certain "
+	"proxies first (for example, border controllers)."
+    },
+    {
+        "reg_timeout", T_INT, offsetof(acc_config_Object, reg_timeout), 0,
+        "Optional interval for registration, in seconds. "
+        "If the value is zero, default interval will be used "
+        "(PJSUA_REG_INTERVAL, 55 seconds). "
+    },
+    {
+        "cred_count", T_INT, offsetof(acc_config_Object, cred_count), 0,
+        "Number of credentials in the credential array. "
+    },
+    {
+        "cred_info", T_OBJECT_EX,
+        offsetof(acc_config_Object, cred_info), 0,
+        "Array of credentials. If registration is desired, normally there "
+	"should be at least one credential specified, to successfully "
+	"authenticate against the service provider. More credentials can "
+	"be specified, for example when the requests are expected to be "
+	"challenged by the proxies in the route set."
+    },
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * acc_config_Type
+ */
+static PyTypeObject acc_config_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.Acc_Config",      /*tp_name*/
+    sizeof(acc_config_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)acc_config_dealloc,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "Acc Config objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0/*acc_config_methods*/,                              /* tp_methods */
+    acc_config_members,         /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    acc_config_new,             /* tp_new */
+
+};
+
+/*
+ * acc_info_Object
+ * Acc Info
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    int id;	
+    int is_default;
+    PyObject * acc_uri;
+    int has_registration;
+    int expires;
+    int status;
+    PyObject * status_text;
+    int online_status;	
+    char buf_[PJ_ERR_MSG_SIZE];
+} acc_info_Object;
+
+
+/*
+ * acc_info_dealloc
+ * deletes a acc_info from memory
+ */
+static void acc_info_dealloc(acc_info_Object* self)
+{
+    Py_XDECREF(self->acc_uri); 
+    Py_XDECREF(self->status_text);	
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * acc_info_new
+ * constructor for acc_info object
+ */
+static PyObject * acc_info_new(PyTypeObject *type, PyObject *args,
+                                    PyObject *kwds)
+{
+    acc_info_Object *self;
+
+    self = (acc_info_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->acc_uri = PyString_FromString("");
+        if (self->acc_uri == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+		self->status_text = PyString_FromString("");
+        if (self->status_text == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+        
+    }
+
+    return (PyObject *)self;
+}
+
+static PyObject * acc_info_get_buf
+(acc_info_Object *self, PyObject * args)
+{
+    int idx;
+    char elmt;
+    if (!PyArg_ParseTuple(args,"i",&idx)) 
+    {
+        return NULL;
+    }
+    if ((idx >= 0) && (idx < PJ_ERR_MSG_SIZE)) 
+    {
+        elmt = self->buf_[idx];
+    } 
+    else
+    {
+        return NULL;
+    }
+    return PyString_FromStringAndSize(&elmt, 1);
+}
+
+static PyObject * acc_info_set_buf
+(acc_info_Object *self, PyObject * args)
+{
+    int idx;
+    PyObject * str;	
+    char * s;
+    if (!PyArg_ParseTuple(args,"iO",&idx, &str)) 
+    {
+        return NULL;
+    }
+    if ((idx >= 0) && (idx < PJ_ERR_MSG_SIZE)) 
+    {
+        s = PyString_AsString(str);
+        if (s[0]) 
+        {
+            self->buf_[idx] = s[0];
+        }	 
+	else 
+        {
+            return NULL;
+        }
+    } 
+    else
+    {
+        return NULL;
+    }
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyMethodDef acc_info_methods[] = {
+    {
+        "get_buf", (PyCFunction)acc_info_get_buf, METH_VARARGS,
+        "Return buf char at specified index"
+    },
+    {
+        "set_buf", (PyCFunction)acc_info_set_buf, METH_VARARGS,
+        "Set buf at specified index"
+    },
+	
+    {NULL}  /* Sentinel */
+};
+
+
+
+/*
+ * acc_info_members
+ */
+static PyMemberDef acc_info_members[] =
+{
+    {
+        "id", T_INT, offsetof(acc_info_Object, id), 0,
+        "The account ID."
+    },
+    {
+        "is_default", T_INT, offsetof(acc_info_Object, is_default), 0,
+        "Flag to indicate whether this is the default account. "
+    },
+    {
+        "acc_uri", T_OBJECT_EX,
+        offsetof(acc_info_Object, acc_uri), 0,
+        "Account URI"
+    },
+    {
+        "has_registration", T_INT, offsetof(acc_info_Object, has_registration),
+        0,
+        "Flag to tell whether this account has registration setting "
+        "(reg_uri is not empty)."
+    },
+    {
+        "expires", T_INT, offsetof(acc_info_Object, expires), 0,
+        "An up to date expiration interval for account registration session."
+    },
+    {
+        "status", T_INT, offsetof(acc_info_Object, status), 0,
+        "Last registration status code. If status code is zero, "
+        "the account is currently not registered. Any other value indicates "
+        "the SIP status code of the registration. "
+    },
+    {
+        "status_text", T_OBJECT_EX,
+        offsetof(acc_info_Object, status_text), 0,
+        "String describing the registration status."
+    },
+    {
+        "online_status", T_INT, offsetof(acc_info_Object, online_status), 0,
+        "Presence online status for this account. "
+    },
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * acc_info_Type
+ */
+static PyTypeObject acc_info_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.Acc_Info",      /*tp_name*/
+    sizeof(acc_info_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)acc_info_dealloc,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "Acc Info objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    acc_info_methods,                              /* tp_methods */
+    acc_info_members,         /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    acc_info_new,             /* tp_new */
+
+};
+
+
+
+/*
+ * py_pjsua_acc_config_default
+ * !modified @ 051206
+ */
+static PyObject *py_pjsua_acc_config_default
+(PyObject *pSelf, PyObject *pArgs)
+{
+    acc_config_Object *obj;
+    pjsua_acc_config cfg;
+    int i;
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    pjsua_acc_config_default(&cfg);
+    obj = (acc_config_Object *)acc_config_new(&acc_config_Type, NULL, NULL);
+    obj->cred_count = cfg.cred_count;
+    for (i = 0; i < PJSUA_MAX_ACC; i++) 
+    {
+        /*obj->cred_info[i] = cfg.cred_info[i];*/
+	int ret;
+	pjsip_cred_info_Object * ci = 
+	    (pjsip_cred_info_Object *)pjsip_cred_info_new
+	    (&pjsip_cred_info_Type,NULL,NULL);
+	ci->data = PyString_FromStringAndSize(cfg.cred_info[i].data.ptr, 
+	    cfg.cred_info[i].data.slen);
+	ci->realm = PyString_FromStringAndSize(cfg.cred_info[i].realm.ptr, 
+	    cfg.cred_info[i].realm.slen);
+	ci->scheme = PyString_FromStringAndSize(cfg.cred_info[i].scheme.ptr, 
+	    cfg.cred_info[i].scheme.slen);
+	ci->username = PyString_FromStringAndSize(cfg.cred_info[i].username.ptr, 
+	    cfg.cred_info[i].username.slen);
+	ci->data_type = cfg.cred_info[i].data_type;
+	ret = PyList_SetItem((PyObject *)obj->cred_info,i,(PyObject *)ci);
+	if (ret == -1) {
+	    return NULL;
+	}
+    }
+    
+    Py_XDECREF(obj->force_contact);
+    obj->force_contact = 
+        PyString_FromStringAndSize(cfg.force_contact.ptr, 
+        cfg.force_contact.slen);
+    obj->priority = cfg.priority;
+    Py_XDECREF(obj->id);
+    obj->id = 
+        PyString_FromStringAndSize(cfg.id.ptr, cfg.id.slen);
+    Py_XDECREF(obj->reg_uri);
+    obj->reg_uri = 
+        PyString_FromStringAndSize(cfg.reg_uri.ptr, cfg.reg_uri.slen);
+    obj->proxy_cnt = cfg.proxy_cnt;
+    for (i = 0; i < PJSUA_MAX_ACC; i++) 
+    {
+	PyObject * str;
+	int ret;
+        /*obj->proxy[i] = cfg.proxy[i];*/
+	str = PyString_FromStringAndSize(cfg.proxy[i].ptr, cfg.proxy[i].slen);
+	ret = PyList_SetItem((PyObject *)obj->proxy,i,str);
+	if (ret == -1) {
+	    return NULL;
+	}
+    }
+    obj->publish_enabled = cfg.publish_enabled;
+    obj->reg_timeout = cfg.reg_timeout;
+	
+    return (PyObject *)obj;
+}
+
+/*
+ * py_pjsua_acc_get_count
+ */
+static PyObject *py_pjsua_acc_get_count
+(PyObject *pSelf, PyObject *pArgs)
+{
+    int count;
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    count = pjsua_acc_get_count();
+    return Py_BuildValue("i",count);
+}
+
+/*
+ * py_pjsua_acc_is_valid
+ */
+static PyObject *py_pjsua_acc_is_valid
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int id;
+    int is_valid;
+
+    if (!PyArg_ParseTuple(pArgs, "i", &id))
+    {
+        return NULL;
+    }
+    is_valid = pjsua_acc_is_valid(id);
+	
+    return Py_BuildValue("i", is_valid);
+}
+
+/*
+ * py_pjsua_acc_set_default
+ */
+static PyObject *py_pjsua_acc_set_default
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int id;
+    int status;
+
+    if (!PyArg_ParseTuple(pArgs, "i", &id))
+    {
+        return NULL;
+    }
+    status = pjsua_acc_set_default(id);
+	
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_acc_get_default
+ */
+static PyObject *py_pjsua_acc_get_default
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int id;
+	
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    id = pjsua_acc_get_default();
+	
+    return Py_BuildValue("i", id);
+}
+
+/*
+ * py_pjsua_acc_add
+ * !modified @ 051206
+ */
+static PyObject *py_pjsua_acc_add
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int is_default;
+    PyObject * acObj;
+    acc_config_Object * ac;
+    pjsua_acc_config cfg;
+    
+    int p_acc_id;
+    int status;
+    int i;
+
+    if (!PyArg_ParseTuple(pArgs, "Oi", &acObj, &is_default))
+    {
+        return NULL;
+    }
+
+    pjsua_acc_config_default(&cfg);
+    if (acObj != Py_None)
+    {
+        ac = (acc_config_Object *)acObj;
+        cfg.cred_count = ac->cred_count;
+        for (i = 0; i < PJSUA_MAX_ACC; i++) 
+	{
+            /*cfg.cred_info[i] = ac->cred_info[i];*/
+            pjsip_cred_info_Object * ci = (pjsip_cred_info_Object *)
+				PyList_GetItem((PyObject *)ac->cred_info,i);
+            cfg.cred_info[i].data.ptr = PyString_AsString(ci->data);
+            cfg.cred_info[i].data.slen = strlen(PyString_AsString(ci->data));
+            cfg.cred_info[i].realm.ptr = PyString_AsString(ci->realm);
+            cfg.cred_info[i].realm.slen = strlen(PyString_AsString(ci->realm));
+            cfg.cred_info[i].scheme.ptr = PyString_AsString(ci->scheme);
+            cfg.cred_info[i].scheme.slen = strlen
+				(PyString_AsString(ci->scheme));
+            cfg.cred_info[i].username.ptr = PyString_AsString(ci->username);
+            cfg.cred_info[i].username.slen = strlen
+				(PyString_AsString(ci->username));
+            cfg.cred_info[i].data_type = ci->data_type;
+	}
+        cfg.force_contact.ptr = PyString_AsString(ac->force_contact);
+        cfg.force_contact.slen = strlen(PyString_AsString(ac->force_contact));
+        cfg.id.ptr = PyString_AsString(ac->id);
+        cfg.id.slen = strlen(PyString_AsString(ac->id));
+        cfg.priority = ac->priority;
+        for (i = 0; i < PJSUA_MAX_ACC; i++) 
+	{
+            /*cfg.proxy[i] = ac->proxy[i];*/
+            cfg.proxy[i].ptr = PyString_AsString
+				(PyList_GetItem((PyObject *)ac->proxy,i));
+	}
+        cfg.proxy_cnt = ac->proxy_cnt;
+        cfg.publish_enabled = ac->publish_enabled;
+        cfg.reg_timeout = ac->reg_timeout;
+        cfg.reg_uri.ptr = PyString_AsString(ac->reg_uri);
+        cfg.reg_uri.slen = strlen(PyString_AsString(ac->reg_uri));
+    
+        status = pjsua_acc_add(&cfg, is_default, &p_acc_id);
+    } else {
+        status = pjsua_acc_add(NULL, is_default, &p_acc_id);
+    }
+    
+    return Py_BuildValue("ii", status, p_acc_id);
+}
+
+/*
+ * py_pjsua_acc_add_local
+ * !modified @ 051206
+ */
+static PyObject *py_pjsua_acc_add_local
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int is_default;
+    int tid;
+    
+    int p_acc_id;
+    int status;
+	
+
+    if (!PyArg_ParseTuple(pArgs, "ii", &tid, &is_default))
+    {
+        return NULL;
+    }
+	
+    
+    status = pjsua_acc_add_local(tid, is_default, &p_acc_id);
+    
+    return Py_BuildValue("ii", status, p_acc_id);
+}
+
+/*
+ * py_pjsua_acc_del
+ */
+static PyObject *py_pjsua_acc_del
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int acc_id;
+    int status;
+
+    if (!PyArg_ParseTuple(pArgs, "i", &acc_id))
+    {
+        return NULL;
+    }
+	
+	
+    status = pjsua_acc_del(acc_id);	
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_acc_modify
+ */
+static PyObject *py_pjsua_acc_modify
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    PyObject * acObj;
+    acc_config_Object * ac;
+    pjsua_acc_config cfg;	
+    int acc_id;
+    int status;
+    int i;
+
+    if (!PyArg_ParseTuple(pArgs, "iO", &acc_id, &acObj))
+    {
+        return NULL;
+    }
+    if (acObj != Py_None)
+    {
+        ac = (acc_config_Object *)acObj;
+        cfg.cred_count = ac->cred_count;
+        for (i = 0; i < PJSUA_MAX_ACC; i++) 
+	{
+            /*cfg.cred_info[i] = ac->cred_info[i];*/
+            pjsip_cred_info_Object * ci = (pjsip_cred_info_Object *)
+				PyList_GetItem((PyObject *)ac->cred_info,i);
+            cfg.cred_info[i].data.ptr = PyString_AsString(ci->data);
+            cfg.cred_info[i].data.slen = strlen(PyString_AsString(ci->data));
+            cfg.cred_info[i].realm.ptr = PyString_AsString(ci->realm);
+            cfg.cred_info[i].realm.slen = strlen(PyString_AsString(ci->realm));
+            cfg.cred_info[i].scheme.ptr = PyString_AsString(ci->scheme);
+            cfg.cred_info[i].scheme.slen = strlen
+				(PyString_AsString(ci->scheme));
+            cfg.cred_info[i].username.ptr = PyString_AsString(ci->username);
+            cfg.cred_info[i].username.slen = strlen
+				(PyString_AsString(ci->username));
+	}
+        cfg.force_contact.ptr = PyString_AsString(ac->force_contact);
+        cfg.force_contact.slen = strlen(PyString_AsString(ac->force_contact));
+        cfg.id.ptr = PyString_AsString(ac->id);
+        cfg.id.slen = strlen(PyString_AsString(ac->id));
+        cfg.priority = ac->priority;
+        for (i = 0; i < PJSUA_MAX_ACC; i++) 
+	{
+            /*cfg.proxy[i] = ac->proxy[i];*/
+             cfg.proxy[i].ptr = PyString_AsString
+				(PyList_GetItem((PyObject *)ac->proxy,i));
+	}
+        cfg.proxy_cnt = ac->proxy_cnt;
+        cfg.publish_enabled = ac->publish_enabled;
+        cfg.reg_timeout = ac->reg_timeout;
+        cfg.reg_uri.ptr = PyString_AsString(ac->reg_uri);
+        cfg.reg_uri.slen = strlen(PyString_AsString(ac->reg_uri));	
+        status = pjsua_acc_modify(acc_id, &cfg);
+    } else {
+        status = pjsua_acc_modify(acc_id, NULL);
+    }
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_acc_set_online_status
+ */
+static PyObject *py_pjsua_acc_set_online_status
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int is_online;	
+    int acc_id;
+    int status;	
+
+    if (!PyArg_ParseTuple(pArgs, "ii", &acc_id, &is_online))
+    {
+        return NULL;
+    }
+	
+    status = pjsua_acc_set_online_status(acc_id, is_online);
+	
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_acc_set_registration
+ */
+static PyObject *py_pjsua_acc_set_registration
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int renew;	
+    int acc_id;
+    int status;	
+
+    if (!PyArg_ParseTuple(pArgs, "ii", &acc_id, &renew))
+    {
+        return NULL;
+    }
+	
+    status = pjsua_acc_set_registration(acc_id, renew);
+	
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_acc_get_info
+ * !modified @ 051206
+ */
+static PyObject *py_pjsua_acc_get_info
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int acc_id;
+    acc_info_Object * obj;
+    pjsua_acc_info info;
+    int status;	
+    int i;
+
+    if (!PyArg_ParseTuple(pArgs, "i", &acc_id))
+    {
+        return NULL;
+    }
+	
+    
+    status = pjsua_acc_get_info(acc_id, &info);
+    if (status == PJ_SUCCESS) 
+    {
+	obj = (acc_info_Object *)acc_info_new(&acc_info_Type,NULL, NULL);
+        obj->acc_uri =
+            PyString_FromStringAndSize(info.acc_uri.ptr, 
+            info.acc_uri.slen);
+        for (i = 0; i < PJ_ERR_MSG_SIZE; i++) 
+	{
+            obj->buf_[i] = info.buf_[i];
+	}
+        obj->expires = info.expires;
+        obj->has_registration = info.has_registration;
+        obj->id = info.id;
+        obj->is_default = info.is_default;
+        obj->online_status = info.online_status;
+        obj->status = info.status;
+        obj->status_text =
+	    PyString_FromStringAndSize(info.status_text.ptr, 
+	    info.status_text.slen);
+        return Py_BuildValue("O", obj);
+    } else {
+	Py_INCREF(Py_None);
+	return Py_None;
+    }
+}
+
+/*
+ * py_pjsua_enum_accs
+ * !modified @ 241206
+ */
+static PyObject *py_pjsua_enum_accs(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    PyObject *list;
+    
+    pjsua_acc_id id[PJSUA_MAX_ACC];
+    unsigned c, i;
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+    c = PJ_ARRAY_SIZE(id);
+    
+    status = pjsua_enum_accs(id, &c);
+    
+    list = PyList_New(c);
+    for (i = 0; i < c; i++) 
+    {
+        int ret = PyList_SetItem(list, i, Py_BuildValue("i", id[i]));
+        if (ret == -1) 
+	{
+            return NULL;
+        }
+    }
+    
+    return Py_BuildValue("O",list);
+}
+
+/*
+ * py_pjsua_acc_enum_info
+ * !modified @ 241206
+ */
+static PyObject *py_pjsua_acc_enum_info(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    PyObject *list;
+    
+    pjsua_acc_info info[PJSUA_MAX_ACC];
+    unsigned c, i;
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+    
+    c = PJ_ARRAY_SIZE(info);
+    status = pjsua_acc_enum_info(info, &c);
+    
+    list = PyList_New(c);
+    for (i = 0; i < c; i++) 
+    {
+        int ret;
+        int j;
+        acc_info_Object *obj;
+        obj = (acc_info_Object *)acc_info_new(&acc_info_Type,NULL,NULL);
+        obj->acc_uri = PyString_FromStringAndSize
+	    (info[i].acc_uri.ptr, info[i].acc_uri.slen);
+        for(j = 0; j < PJ_ERR_MSG_SIZE; j++) 
+	{
+            obj->buf_[j] = info[i].buf_[j];
+	}
+        obj->expires = info[i].expires;
+        obj->has_registration = info[i].has_registration;
+        obj->id = info[i].id;
+        obj->is_default = info[i].is_default;
+        obj->online_status = info[i].online_status;
+        obj->status = info[i].status;
+        obj->status_text = PyString_FromStringAndSize(info[i].status_text.ptr,
+	    info[i].status_text.slen);
+        ret = PyList_SetItem(list, i, (PyObject *)obj);
+        if (ret == -1) {
+            return NULL;
+        }
+    }
+    
+    return Py_BuildValue("O",list);
+}
+
+/*
+ * py_pjsua_acc_find_for_outgoing
+ */
+static PyObject *py_pjsua_acc_find_for_outgoing
+(PyObject *pSelf, PyObject *pArgs)
+{    
+	
+    int acc_id;	
+    PyObject * url;
+    pj_str_t str;
+
+    if (!PyArg_ParseTuple(pArgs, "O", &url))
+    {
+        return NULL;
+    }
+    str.ptr = PyString_AsString(url);
+    str.slen = strlen(PyString_AsString(url));
+	
+    acc_id = pjsua_acc_find_for_outgoing(&str);
+	
+    return Py_BuildValue("i", acc_id);
+}
+
+/*
+ * py_pjsua_acc_find_for_incoming
+ */
+static PyObject *py_pjsua_acc_find_for_incoming
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int acc_id;	
+    PyObject * tmpObj;
+    pjsip_rx_data_Object * obj;
+    pjsip_rx_data * rdata;
+
+    if (!PyArg_ParseTuple(pArgs, "O", &tmpObj))
+    {
+        return NULL;
+    }
+    if (tmpObj != Py_None)
+    {
+        obj = (pjsip_rx_data_Object *)tmpObj;
+        rdata = obj->rdata;
+        acc_id = pjsua_acc_find_for_incoming(rdata);
+    } else {
+        acc_id = pjsua_acc_find_for_incoming(NULL);
+    }
+    return Py_BuildValue("i", acc_id);
+}
+
+/*
+ * py_pjsua_acc_create_uac_contact
+ * !modified @ 061206
+ */
+static PyObject *py_pjsua_acc_create_uac_contact
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int status;
+    int acc_id;
+    PyObject * pObj;
+    pj_pool_Object * p;
+    pj_pool_t * pool;
+    PyObject * strc;
+    pj_str_t contact;
+    PyObject * stru;
+    pj_str_t uri;
+
+    if (!PyArg_ParseTuple(pArgs, "OiO", &pObj, &acc_id, &stru))
+    {
+        return NULL;
+    }
+    if (pObj != Py_None)
+    {
+        p = (pj_pool_Object *)pObj;
+        pool = p->pool;    
+        uri.ptr = PyString_AsString(stru);
+        uri.slen = strlen(PyString_AsString(stru));
+        status = pjsua_acc_create_uac_contact(pool, &contact, acc_id, &uri);
+    } else {
+        status = pjsua_acc_create_uac_contact(NULL, &contact, acc_id, &uri);
+    }
+    strc = PyString_FromStringAndSize(contact.ptr, contact.slen);
+	
+    return Py_BuildValue("O", strc);
+}
+
+/*
+ * py_pjsua_acc_create_uas_contact
+ * !modified @ 061206
+ */
+static PyObject *py_pjsua_acc_create_uas_contact
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int status;
+    int acc_id;	
+    PyObject * pObj;
+    pj_pool_Object * p;
+    pj_pool_t * pool;
+    PyObject * strc;
+    pj_str_t contact;
+    PyObject * rObj;
+    pjsip_rx_data_Object * objr;
+    pjsip_rx_data * rdata;
+
+    if (!PyArg_ParseTuple(pArgs, "OiO", &pObj, &acc_id, &rObj))
+    {
+        return NULL;
+    }
+    if (pObj != Py_None)
+    {
+        p = (pj_pool_Object *)pObj;
+        pool = p->pool;
+    } else {
+		pool = NULL;
+    }
+    if (rObj != Py_None)
+    {
+        objr = (pjsip_rx_data_Object *)rObj;
+        rdata = objr->rdata;
+    } else {
+        rdata = NULL;
+    }
+    status = pjsua_acc_create_uas_contact(pool, &contact, acc_id, rdata);
+    strc = PyString_FromStringAndSize(contact.ptr, contact.slen);
+	
+    return Py_BuildValue("O", strc);
+}
+
+static char pjsua_acc_config_default_doc[] =
+    "py_pjsua.Acc_Config py_pjsua.acc_config_default () "
+    "Call this function to initialize account config with default values.";
+static char pjsua_acc_get_count_doc[] =
+    "int py_pjsua.acc_get_count () "
+    "Get number of current accounts.";
+static char pjsua_acc_is_valid_doc[] =
+    "int py_pjsua.acc_is_valid (int acc_id)  "
+    "Check if the specified account ID is valid.";
+static char pjsua_acc_set_default_doc[] =
+    "int py_pjsua.acc_set_default (int acc_id) "
+    "Set default account to be used when incoming "
+    "and outgoing requests doesn't match any accounts.";
+static char pjsua_acc_get_default_doc[] =
+    "int py_pjsua.acc_get_default () "
+    "Get default account.";
+static char pjsua_acc_add_doc[] =
+    "int, int py_pjsua.acc_add (py_pjsua.Acc_Config cfg, "
+    "int is_default) "
+    "Add a new account to pjsua. PJSUA must have been initialized "
+    "(with pjsua_init()) before calling this function.";
+static char pjsua_acc_add_local_doc[] =
+    "int,int py_pjsua.acc_add_local (int tid, "
+    "int is_default) "
+    "Add a local account. A local account is used to identify "
+    "local endpoint instead of a specific user, and for this reason, "
+    "a transport ID is needed to obtain the local address information.";
+static char pjsua_acc_del_doc[] =
+    "int py_pjsua.acc_del (int acc_id) "
+    "Delete account.";
+static char pjsua_acc_modify_doc[] =
+    "int py_pjsua.acc_modify (int acc_id, py_pjsua.Acc_Config cfg) "
+    "Modify account information.";
+static char pjsua_acc_set_online_status_doc[] =
+    "int py_pjsua.acc_set_online_status (int acc_id, int is_online) "
+    "Modify account's presence status to be advertised "
+    "to remote/presence subscribers.";
+static char pjsua_acc_set_registration_doc[] =
+    "int py_pjsua.acc_set_registration (int acc_id, int renew) "
+    "Update registration or perform unregistration.";
+static char pjsua_acc_get_info_doc[] =
+    "py_pjsua.Acc_Info py_pjsua.acc_get_info (int acc_id) "
+    "Get account information.";
+static char pjsua_enum_accs_doc[] =
+    "int[] py_pjsua.enum_accs () "
+    "Enum accounts all account ids.";
+static char pjsua_acc_enum_info_doc[] =
+    "py_pjsua.Acc_Info[] py_pjsua.acc_enum_info () "
+    "Enum accounts info.";
+static char pjsua_acc_find_for_outgoing_doc[] =
+    "int py_pjsua.acc_find_for_outgoing (string url) "
+    "This is an internal function to find the most appropriate account "
+    "to used to reach to the specified URL.";
+static char pjsua_acc_find_for_incoming_doc[] =
+    "int py_pjsua.acc_find_for_incoming (pjsip_rx_data_Object rdata) "
+    "This is an internal function to find the most appropriate account "
+    "to be used to handle incoming calls.";
+static char pjsua_acc_create_uac_contact_doc[] =
+    "string py_pjsua.acc_create_uac_contact (pj_pool_Object pool, "
+    "int acc_id, string uri) "
+    "Create a suitable URI to be put as Contact based on the specified "
+    "target URI for the specified account.";
+static char pjsua_acc_create_uas_contact_doc[] =
+    "string py_pjsua.acc_create_uas_contact (pj_pool_Object pool, "
+    "int acc_id, pjsip_rx_data_Object rdata) "
+    "Create a suitable URI to be put as Contact based on the information "
+    "in the incoming request.";
+
+/* END OF LIB ACCOUNT */
+
+/* LIB BUDDY */
+
+
+
+/*
+ * buddy_config_Object
+ * Buddy Config
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    
+    PyObject * uri;
+    int subscribe;
+} buddy_config_Object;
+
+
+/*
+ * buddy_config_dealloc
+ * deletes a buddy_config from memory
+ */
+static void buddy_config_dealloc(buddy_config_Object* self)
+{
+    Py_XDECREF(self->uri);     
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * buddy_config_new
+ * constructor for buddy_config object
+ */
+static PyObject * buddy_config_new(PyTypeObject *type, PyObject *args,
+                                    PyObject *kwds)
+{
+    buddy_config_Object *self;
+
+    self = (buddy_config_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->uri = PyString_FromString("");
+        if (self->uri == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }        
+    }
+    return (PyObject *)self;
+}
+
+/*
+ * buddy_config_members
+ */
+static PyMemberDef buddy_config_members[] =
+{
+    
+    {
+        "uri", T_OBJECT_EX,
+        offsetof(buddy_config_Object, uri), 0,
+        "TBuddy URL or name address."        
+    },
+    
+    {
+        "subscribe", T_INT, 
+        offsetof(buddy_config_Object, subscribe), 0,
+        "Specify whether presence subscription should start immediately. "
+    },
+    
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * buddy_config_Type
+ */
+static PyTypeObject buddy_config_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.Buddy_Config",      /*tp_name*/
+    sizeof(buddy_config_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)buddy_config_dealloc,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "Buddy Config objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    buddy_config_members,         /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    buddy_config_new,             /* tp_new */
+
+};
+
+/*
+ * buddy_info_Object
+ * Buddy Info
+ * !modified @ 071206
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */ 
+    int id;
+    PyObject * uri;
+    PyObject * contact;
+    int status;
+    PyObject * status_text;
+    int monitor_pres;
+    char buf_[256];
+} buddy_info_Object;
+
+
+/*
+ * buddy_info_dealloc
+ * deletes a buddy_info from memory
+ * !modified @ 071206
+ */
+static void buddy_info_dealloc(buddy_info_Object* self)
+{
+    Py_XDECREF(self->uri);
+    Py_XDECREF(self->contact);
+    Py_XDECREF(self->status_text);
+    
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * buddy_info_new
+ * constructor for buddy_info object
+ * !modified @ 071206
+ */
+static PyObject * buddy_info_new(PyTypeObject *type, PyObject *args,
+                                    PyObject *kwds)
+{
+    buddy_info_Object *self;
+
+    self = (buddy_info_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->uri = PyString_FromString("");
+        if (self->uri == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }        
+	self->contact = PyString_FromString("");
+        if (self->contact == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+	self->status_text = PyString_FromString("");
+        if (self->status_text == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+	
+    }
+    return (PyObject *)self;
+}
+
+/*
+ * buddy_info_members
+ * !modified @ 071206
+ */
+static PyMemberDef buddy_info_members[] =
+{
+    {
+        "id", T_INT, 
+        offsetof(buddy_info_Object, id), 0,
+        "The buddy ID."
+    },
+    {
+        "uri", T_OBJECT_EX,
+        offsetof(buddy_info_Object, uri), 0,
+        "The full URI of the buddy, as specified in the configuration. "        
+    },
+    {
+        "contact", T_OBJECT_EX,
+        offsetof(buddy_info_Object, contact), 0,
+        "Buddy's Contact, only available when presence subscription "
+        "has been established to the buddy."        
+    },
+    {
+        "status", T_INT, 
+        offsetof(buddy_info_Object, status), 0,
+        "Buddy's online status. "
+    },
+    {
+        "status_text", T_OBJECT_EX,
+        offsetof(buddy_info_Object, status_text), 0,
+        "Text to describe buddy's online status."        
+    },
+    {
+        "monitor_pres", T_INT, 
+        offsetof(buddy_info_Object, monitor_pres), 0,
+        "Flag to indicate that we should monitor the presence information "
+        "for this buddy (normally yes, unless explicitly disabled). "
+    },
+    
+    
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * buddy_info_Type
+ */
+static PyTypeObject buddy_info_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.Buddy_Info",      /*tp_name*/
+    sizeof(buddy_info_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)buddy_info_dealloc,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "Buddy Info objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    buddy_info_members,         /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    buddy_info_new,             /* tp_new */
+
+};
+
+/*
+ * py_pjsua_buddy_config_default
+ */
+static PyObject *py_pjsua_buddy_config_default
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    buddy_config_Object *obj;	
+    pjsua_buddy_config cfg;
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    
+    pjsua_buddy_config_default(&cfg);
+    obj = (buddy_config_Object *) buddy_config_new
+		(&buddy_config_Type,NULL,NULL);
+    obj->uri = PyString_FromStringAndSize(
+        cfg.uri.ptr, cfg.uri.slen
+    );
+    obj->subscribe = cfg.subscribe;
+    
+    return (PyObject *)obj;
+}
+
+/*
+ * py_pjsua_get_buddy_count
+ */
+static PyObject *py_pjsua_get_buddy_count
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int ret;
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    ret = pjsua_get_buddy_count();
+	
+    return Py_BuildValue("i", ret);
+}
+
+/*
+ * py_pjsua_buddy_is_valid
+ */
+static PyObject *py_pjsua_buddy_is_valid
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int id;
+    int is_valid;
+
+    if (!PyArg_ParseTuple(pArgs, "i", &id))
+    {
+        return NULL;
+    }
+    is_valid = pjsua_buddy_is_valid(id);
+	
+    return Py_BuildValue("i", is_valid);
+}
+
+/*
+ * py_pjsua_enum_buddies
+ * !modified @ 241206
+ */
+static PyObject *py_pjsua_enum_buddies(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    PyObject *list;
+    
+    pjsua_buddy_id id[PJSUA_MAX_BUDDIES];
+    unsigned c, i;
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+    c = PJ_ARRAY_SIZE(id);
+    status = pjsua_enum_buddies(id, &c);
+    list = PyList_New(c);
+    for (i = 0; i < c; i++) 
+    {
+        int ret = PyList_SetItem(list, i, Py_BuildValue("i", id[i]));
+        if (ret == -1) 
+	{
+            return NULL;
+	}
+    }
+    
+    return Py_BuildValue("O",list);
+}
+
+/*
+ * py_pjsua_buddy_get_info
+ * !modified @ 071206
+ */
+static PyObject *py_pjsua_buddy_get_info
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int buddy_id;
+    buddy_info_Object * obj;
+    pjsua_buddy_info info;
+    int status;	
+    int i;
+
+    if (!PyArg_ParseTuple(pArgs, "i", &buddy_id))
+    {
+        return NULL;
+    }
+	
+    
+    status = pjsua_buddy_get_info(buddy_id, &info);
+    if (status == PJ_SUCCESS) 
+    {
+	obj = (buddy_info_Object *)buddy_info_new(&buddy_info_Type,NULL,NULL);
+        obj->id = info.id;
+        Py_XDECREF(obj->uri);
+        obj->uri =
+            PyString_FromStringAndSize(info.uri.ptr, 
+            info.uri.slen);
+        Py_XDECREF(obj->contact);
+        obj->contact =
+            PyString_FromStringAndSize(info.contact.ptr, 
+            info.contact.slen);
+        obj->status = info.status;
+        Py_XDECREF(obj->status_text);
+        obj->status_text =
+            PyString_FromStringAndSize(info.status_text.ptr, 
+            info.status_text.slen);
+        obj->monitor_pres = info.monitor_pres;
+        for (i = 0; i < 256; i++) 
+	{
+	    
+            obj->buf_[i] = info.buf_[i];
+	}
+	
+        return Py_BuildValue("O", obj);
+    } else {
+	Py_INCREF(Py_None);
+	return Py_None;
+    }
+}
+
+/*
+ * py_pjsua_buddy_add
+ * !modified @ 061206
+ */
+static PyObject *py_pjsua_buddy_add
+(PyObject *pSelf, PyObject *pArgs)
+{   
+    PyObject * bcObj;
+    buddy_config_Object * bc;
+	
+    pjsua_buddy_config cfg;
+    
+    int p_buddy_id;
+    int status;
+
+    if (!PyArg_ParseTuple(pArgs, "O", &bcObj))
+    {
+        return NULL;
+    }
+    if (bcObj != Py_None)
+    {
+        bc = (buddy_config_Object *)bcObj;
+
+        cfg.subscribe = bc->subscribe;
+        cfg.uri.ptr = PyString_AsString(bc->uri);
+        cfg.uri.slen = strlen(PyString_AsString(bc->uri));    
+    
+        status = pjsua_buddy_add(&cfg, &p_buddy_id);
+    } else {
+        status = pjsua_buddy_add(NULL, &p_buddy_id);
+    }
+    return Py_BuildValue("ii", status, p_buddy_id);
+}
+
+/*
+ * py_pjsua_buddy_del
+ */
+static PyObject *py_pjsua_buddy_del
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int buddy_id;
+    int status;
+
+    if (!PyArg_ParseTuple(pArgs, "i", &buddy_id))
+    {
+        return NULL;
+    }
+	
+	
+    status = pjsua_buddy_del(buddy_id);	
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_buddy_subscribe_pres
+ */
+static PyObject *py_pjsua_buddy_subscribe_pres
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int buddy_id;
+    int status;
+    int subscribe;
+
+    if (!PyArg_ParseTuple(pArgs, "ii", &buddy_id, &subscribe))
+    {
+        return NULL;
+    }
+	
+	
+    status = pjsua_buddy_subscribe_pres(buddy_id, subscribe);	
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_pres_dump
+ */
+static PyObject *py_pjsua_pres_dump
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int verbose;
+
+    if (!PyArg_ParseTuple(pArgs, "i", &verbose))
+    {
+        return NULL;
+    }
+	
+	
+    pjsua_pres_dump(verbose);	
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+/*
+ * py_pjsua_im_send
+ * !modified @ 071206
+ */
+static PyObject *py_pjsua_im_send
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int status;
+    int acc_id;
+    pj_str_t * mime_type, tmp_mime_type;
+    pj_str_t to, content;
+    PyObject * st;
+    PyObject * smt;
+    PyObject * sc;
+    pjsua_msg_data msg_data;
+    PyObject * omdObj;
+    msg_data_Object * omd;
+    
+    int user_data;
+    pj_pool_t *pool;
+
+   
+    if (!PyArg_ParseTuple(pArgs, "iOOOOi", &acc_id, 
+		&st, &smt, &sc, &omdObj, &user_data))
+    {
+        return NULL;
+    }
+    if (smt != Py_None)
+    {
+        mime_type = &tmp_mime_type;
+        tmp_mime_type.ptr = PyString_AsString(smt);
+        tmp_mime_type.slen = strlen(PyString_AsString(smt));
+    } else {
+        mime_type = NULL;
+    }
+    to.ptr = PyString_AsString(st);
+    to.slen = strlen(PyString_AsString(st));
+    
+    content.ptr = PyString_AsString(sc);
+    content.slen = strlen(PyString_AsString(sc));
+    if (omdObj != Py_None)
+    {
+		
+        omd = (msg_data_Object *)omdObj;
+        msg_data.content_type.ptr = PyString_AsString(omd->content_type);
+        msg_data.content_type.slen = strlen
+			(PyString_AsString(omd->content_type));
+        msg_data.msg_body.ptr = PyString_AsString(omd->msg_body);
+        msg_data.msg_body.slen = strlen(PyString_AsString(omd->msg_body));
+        pool = pjsua_pool_create("pjsua", POOL_SIZE, POOL_SIZE);
+
+        translate_hdr(pool, &msg_data.hdr_list, omd->hdr_list);
+        status = pjsua_im_send(acc_id, &to, mime_type, 
+			&content, &msg_data, (void *)user_data);	
+        pj_pool_release(pool);
+    } else {
+		
+        status = pjsua_im_send(acc_id, &to, mime_type, 
+			&content, NULL, NULL);	
+    }
+    
+    return Py_BuildValue("i",status);
+}
+
+/*
+ * py_pjsua_im_typing
+ */
+static PyObject *py_pjsua_im_typing
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int status;
+    int acc_id;
+    pj_str_t to;
+    PyObject * st;
+    int is_typing;
+    pjsua_msg_data msg_data;
+    PyObject * omdObj;
+    msg_data_Object * omd;
+    pj_pool_t * pool;
+
+    if (!PyArg_ParseTuple(pArgs, "iOiO", &acc_id, &st, &is_typing, &omdObj))
+    {
+        return NULL;
+    }
+	
+    to.ptr = PyString_AsString(st);
+    to.slen = strlen(PyString_AsString(st));    
+    if (omdObj != Py_None)
+    {
+        omd = (msg_data_Object *)omdObj;
+        msg_data.content_type.ptr = PyString_AsString(omd->content_type);
+        msg_data.content_type.slen = strlen
+			(PyString_AsString(omd->content_type));
+        msg_data.msg_body.ptr = PyString_AsString(omd->msg_body);
+        msg_data.msg_body.slen = strlen(PyString_AsString(omd->msg_body));
+        pool = pjsua_pool_create("pjsua", POOL_SIZE, POOL_SIZE);
+
+        translate_hdr(pool, &msg_data.hdr_list, omd->hdr_list);
+        status = pjsua_im_typing(acc_id, &to, is_typing, &msg_data);	
+        pj_pool_release(pool);
+    } else {
+        status = pjsua_im_typing(acc_id, &to, is_typing, NULL);
+    }
+    return Py_BuildValue("i",status);
+}
+
+static char pjsua_buddy_config_default_doc[] =
+    "py_pjsua.Buddy_Config py_pjsua.buddy_config_default () "
+    "Set default values to the buddy config.";
+static char pjsua_get_buddy_count_doc[] =
+    "int py_pjsua.get_buddy_count () "
+    "Get total number of buddies.";
+static char pjsua_buddy_is_valid_doc[] =
+    "int py_pjsua.buddy_is_valid (int buddy_id) "
+    "Check if buddy ID is valid.";
+static char pjsua_enum_buddies_doc[] =
+    "int[] py_pjsua.enum_buddies () "
+    "Enum buddy IDs.";
+static char pjsua_buddy_get_info_doc[] =
+    "py_pjsua.Buddy_Info py_pjsua.buddy_get_info (int buddy_id) "
+    "Get detailed buddy info.";
+static char pjsua_buddy_add_doc[] =
+    "int,int py_pjsua.buddy_add (py_pjsua.Buddy_Config cfg) "
+    "Add new buddy.";
+static char pjsua_buddy_del_doc[] =
+    "int py_pjsua.buddy_del (int buddy_id) "
+    "Delete buddy.";
+static char pjsua_buddy_subscribe_pres_doc[] =
+    "int py_pjsua.buddy_subscribe_pres (int buddy_id, int subscribe) "
+    "Enable/disable buddy's presence monitoring.";
+static char pjsua_pres_dump_doc[] =
+    "void py_pjsua.pres_dump (int verbose) "
+    "Dump presence subscriptions to log file.";
+static char pjsua_im_send_doc[] =
+    "int py_pjsua.im_send (int acc_id, string to, string mime_type, "
+    "string content, py_pjsua.Msg_Data msg_data, int user_data) "
+    "Send instant messaging outside dialog, using the specified account "
+    "for route set and authentication.";
+static char pjsua_im_typing_doc[] =
+    "int py_pjsua.im_typing (int acc_id, string to, int is_typing, "
+    "py_pjsua.Msg_Data msg_data) "
+    "Send typing indication outside dialog.";
+
+/* END OF LIB BUDDY */
+
+/* LIB MEDIA */
+
+
+
+/*
+ * codec_info_Object
+ * Codec Info
+ * !modified @ 071206
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */ 
+    
+    PyObject * codec_id;
+    pj_uint8_t priority;    
+    char buf_[32];
+} codec_info_Object;
+
+
+/*
+ * codec_info_dealloc
+ * deletes a codec_info from memory
+ * !modified @ 071206
+ */
+static void codec_info_dealloc(codec_info_Object* self)
+{
+    Py_XDECREF(self->codec_id);    
+    
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * codec_info_new
+ * constructor for codec_info object
+ * !modified @ 071206
+ */
+static PyObject * codec_info_new(PyTypeObject *type, PyObject *args,
+                                    PyObject *kwds)
+{
+    codec_info_Object *self;
+
+    self = (codec_info_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->codec_id = PyString_FromString("");
+        if (self->codec_id == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }        
+	
+
+    }
+    return (PyObject *)self;
+}
+
+/*
+ * codec_info_members
+ * !modified @ 071206
+ */
+static PyMemberDef codec_info_members[] =
+{    
+    {
+        "codec_id", T_OBJECT_EX,
+        offsetof(codec_info_Object, codec_id), 0,
+        "Codec unique identification."        
+    },
+    
+    {
+        "priority", T_INT, 
+        offsetof(codec_info_Object, priority), 0,
+        "Codec priority (integer 0-255)."
+    },
+    
+    
+    
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * codec_info_Type
+ */
+static PyTypeObject codec_info_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.Codec_Info",      /*tp_name*/
+    sizeof(codec_info_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)codec_info_dealloc,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "Codec Info objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    codec_info_members,         /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    codec_info_new,             /* tp_new */
+
+};
+
+/*
+ * conf_port_info_Object
+ * Conf Port Info
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */ 
+    
+    int  slot_id;
+    PyObject *  name;
+    unsigned  clock_rate;
+    unsigned  channel_count;
+    unsigned  samples_per_frame;
+    unsigned  bits_per_sample;
+    unsigned  listener_cnt;
+    PyListObject * listeners;
+
+} conf_port_info_Object;
+
+
+/*
+ * conf_port_info_dealloc
+ * deletes a conf_port_info from memory
+ */
+static void conf_port_info_dealloc(conf_port_info_Object* self)
+{
+    Py_XDECREF(self->name);    
+    Py_XDECREF(self->listeners);
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * conf_port_info_new
+ * constructor for conf_port_info object
+ */
+static PyObject * conf_port_info_new(PyTypeObject *type, PyObject *args,
+                                    PyObject *kwds)
+{
+    conf_port_info_Object *self;
+
+    self = (conf_port_info_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->name = PyString_FromString("");
+        if (self->name == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }        
+	
+	self->listeners = (PyListObject *)PyList_New(PJSUA_MAX_CONF_PORTS);
+        if (self->listeners == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+    }
+    return (PyObject *)self;
+}
+
+/*
+ * conf_port_info_members
+ */
+static PyMemberDef conf_port_info_members[] =
+{   
+    {
+        "slot_id", T_INT, 
+        offsetof(conf_port_info_Object, slot_id), 0,
+        "Conference port number."
+    },
+    {
+        "name", T_OBJECT_EX,
+        offsetof(conf_port_info_Object, name), 0,
+        "Port name"        
+    },
+    {
+        "clock_rate", T_INT, 
+        offsetof(conf_port_info_Object, clock_rate), 0,
+        "Clock rate"
+    },
+    {
+        "channel_count", T_INT, 
+        offsetof(conf_port_info_Object, channel_count), 0,
+        "Number of channels."
+    },
+    {
+        "samples_per_frame", T_INT, 
+        offsetof(conf_port_info_Object, samples_per_frame), 0,
+        "Samples per frame "
+    },
+    {
+        "bits_per_sample", T_INT, 
+        offsetof(conf_port_info_Object, bits_per_sample), 0,
+        "Bits per sample"
+    },
+    {
+        "listener_cnt", T_INT, 
+        offsetof(conf_port_info_Object, listener_cnt), 0,
+        "Number of listeners in the array."
+    },
+    {
+        "listeners", T_OBJECT_EX,
+        offsetof(conf_port_info_Object, listeners), 0,
+        "Array of listeners (in other words, ports where this port "
+	"is transmitting to"
+    },
+    
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * conf_port_info_Type
+ */
+static PyTypeObject conf_port_info_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.Conf_Port_Info",      /*tp_name*/
+    sizeof(conf_port_info_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)conf_port_info_dealloc,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "Conf Port Info objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    conf_port_info_members,         /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    conf_port_info_new,             /* tp_new */
+
+};
+
+/*
+ * pjmedia_port_Object
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */
+    pjmedia_port * port;
+} pjmedia_port_Object;
+
+
+/*
+ * pjmedia_port_Type
+ */
+static PyTypeObject pjmedia_port_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                         /*ob_size*/
+    "py_pjsua.PJMedia_Port",        /*tp_name*/
+    sizeof(pjmedia_port_Object),    /*tp_basicsize*/
+    0,                         /*tp_itemsize*/
+    0,                         /*tp_dealloc*/
+    0,                         /*tp_print*/
+    0,                         /*tp_getattr*/
+    0,                         /*tp_setattr*/
+    0,                         /*tp_compare*/
+    0,                         /*tp_repr*/
+    0,                         /*tp_as_number*/
+    0,                         /*tp_as_sequence*/
+    0,                         /*tp_as_mapping*/
+    0,                         /*tp_hash */
+    0,                         /*tp_call*/
+    0,                         /*tp_str*/
+    0,                         /*tp_getattro*/
+    0,                         /*tp_setattro*/
+    0,                         /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,        /*tp_flags*/
+    "pjmedia_port objects",       /* tp_doc */
+
+};
+
+/*
+ * pjmedia_snd_dev_info_Object
+ * PJMedia Snd Dev Info
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */ 
+    
+    
+    unsigned  input_count;
+    unsigned  output_count;
+    unsigned  default_samples_per_sec;    
+    PyObject * name;
+
+} pjmedia_snd_dev_info_Object;
+
+
+/*
+ * pjmedia_snd_dev_info_dealloc
+ * deletes a pjmedia_snd_dev_info from memory
+ */
+static void pjmedia_snd_dev_info_dealloc(pjmedia_snd_dev_info_Object* self)
+{
+    Py_XDECREF(self->name);        
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * pjmedia_snd_dev_info_new
+ * constructor for pjmedia_snd_dev_info object
+ */
+static PyObject * pjmedia_snd_dev_info_new(PyTypeObject *type, PyObject *args,
+                                    PyObject *kwds)
+{
+    pjmedia_snd_dev_info_Object *self;
+
+    self = (pjmedia_snd_dev_info_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->name = PyString_FromString("");
+        if (self->name == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }        
+	
+    }
+    return (PyObject *)self;
+}
+
+/*
+ * pjmedia_snd_dev_info_members
+ */
+static PyMemberDef pjmedia_snd_dev_info_members[] =
+{   
+    
+    {
+        "name", T_OBJECT_EX,
+        offsetof(pjmedia_snd_dev_info_Object, name), 0,
+        "Device name"        
+    },
+    {
+        "input_count", T_INT, 
+        offsetof(pjmedia_snd_dev_info_Object, input_count), 0,
+        "Max number of input channels"
+    },
+    {
+        "output_count", T_INT, 
+        offsetof(pjmedia_snd_dev_info_Object, output_count), 0,
+        "Max number of output channels"
+    },
+    {
+        "default_samples_per_sec", T_INT, 
+        offsetof(pjmedia_snd_dev_info_Object, default_samples_per_sec), 0,
+        "Default sampling rate."
+    },
+    
+    
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * pjmedia_snd_dev_info_Type
+ */
+static PyTypeObject pjmedia_snd_dev_info_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.PJMedia_Snd_Dev_Info",      /*tp_name*/
+    sizeof(pjmedia_snd_dev_info_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)pjmedia_snd_dev_info_dealloc,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "PJMedia Snd Dev Info objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    pjmedia_snd_dev_info_members,         /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    pjmedia_snd_dev_info_new,             /* tp_new */
+
+};
+
+/*
+ * pjmedia_codec_param_info_Object
+ * PJMedia Codec Param Info
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */ 
+    
+    unsigned  clock_rate;
+    unsigned  channel_cnt;
+    pj_uint32_t avg_bps;
+    pj_uint16_t frm_ptime;
+    pj_uint8_t  pcm_bits_per_sample;
+    pj_uint8_t  pt;	
+
+} pjmedia_codec_param_info_Object;
+
+
+
+/*
+ * pjmedia_codec_param_info_members
+ */
+static PyMemberDef pjmedia_codec_param_info_members[] =
+{   
+    
+    {
+        "clock_rate", T_INT, 
+        offsetof(pjmedia_codec_param_info_Object, clock_rate), 0,
+        "Sampling rate in Hz"
+    },
+    {
+        "channel_cnt", T_INT, 
+        offsetof(pjmedia_codec_param_info_Object, channel_cnt), 0,
+        "Channel count"
+    },
+    {
+        "avg_bps", T_INT, 
+        offsetof(pjmedia_codec_param_info_Object, avg_bps), 0,
+        "Average bandwidth in bits/sec"
+    },
+    {
+        "frm_ptime", T_INT, 
+        offsetof(pjmedia_codec_param_info_Object, frm_ptime), 0,
+        "Base frame ptime in msec."
+    },
+    {
+        "pcm_bits_per_sample", T_INT, 
+        offsetof(pjmedia_codec_param_info_Object, pcm_bits_per_sample), 0,
+        "Bits/sample in the PCM side"
+    },
+    {
+        "pt", T_INT, 
+        offsetof(pjmedia_codec_param_info_Object, pt), 0,
+        "Payload type"
+    },
+    
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * pjmedia_codec_param_info_Type
+ */
+static PyTypeObject pjmedia_codec_param_info_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.PJMedia_Codec_Param_Info",      /*tp_name*/
+    sizeof(pjmedia_codec_param_info_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    0,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "PJMedia Codec Param Info objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    pjmedia_codec_param_info_members,         /* tp_members */
+    
+
+};
+
+/*
+ * pjmedia_codec_param_setting_Object
+ * PJMedia Codec Param Setting
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */ 
+    pj_uint8_t  frm_per_pkt; 
+    unsigned    vad;
+    unsigned    cng;
+    unsigned    penh;
+    unsigned    plc;
+    unsigned    reserved;
+    pj_uint8_t  enc_fmtp_mode;
+    pj_uint8_t  dec_fmtp_mode; 
+
+} pjmedia_codec_param_setting_Object;
+
+
+
+/*
+ * pjmedia_codec_param_setting_members
+ */
+static PyMemberDef pjmedia_codec_param_setting_members[] =
+{   
+    
+    {
+        "frm_per_pkt", T_INT, 
+        offsetof(pjmedia_codec_param_setting_Object, frm_per_pkt), 0,
+        "Number of frames per packet"
+    },
+    {
+        "vad", T_INT, 
+        offsetof(pjmedia_codec_param_setting_Object, vad), 0,
+        "Voice Activity Detector"
+    },
+    {
+        "penh", T_INT, 
+        offsetof(pjmedia_codec_param_setting_Object, penh), 0,
+        "Perceptual Enhancement"
+    },
+    {
+        "plc", T_INT, 
+        offsetof(pjmedia_codec_param_setting_Object, plc), 0,
+        "Packet loss concealment"
+    },
+    {
+        "reserved", T_INT, 
+        offsetof(pjmedia_codec_param_setting_Object, reserved), 0,
+        "Reserved, must be zero"
+    },
+    {
+        "cng", T_INT, 
+        offsetof(pjmedia_codec_param_setting_Object, cng), 0,
+        "Comfort Noise Generator"
+    },
+    {
+        "enc_fmtp_mode", T_INT, 
+        offsetof(pjmedia_codec_param_setting_Object, enc_fmtp_mode), 0,
+        "Mode param in fmtp (def:0)"
+    },
+    {
+        "dec_fmtp_mode", T_INT, 
+        offsetof(pjmedia_codec_param_setting_Object, dec_fmtp_mode), 0,
+        "Mode param in fmtp (def:0)"
+    },
+    
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * pjmedia_codec_param_setting_Type
+ */
+static PyTypeObject pjmedia_codec_param_setting_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.PJMedia_Codec_Param_Setting",      /*tp_name*/
+    sizeof(pjmedia_codec_param_setting_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    0,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "PJMedia Codec Param Setting objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    pjmedia_codec_param_setting_members,         /* tp_members */
+    
+
+};
+
+/*
+ * pjmedia_codec_param_Object
+ * PJMedia Codec Param
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */ 
+    
+    pjmedia_codec_param_info_Object * info;
+    pjmedia_codec_param_setting_Object * setting;
+
+} pjmedia_codec_param_Object;
+
+
+/*
+ * pjmedia_codec_param_dealloc
+ * deletes a pjmedia_codec_param from memory
+ */
+static void pjmedia_codec_param_dealloc(pjmedia_codec_param_Object* self)
+{
+    Py_XDECREF(self->info);        
+    Py_XDECREF(self->setting);        
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * pjmedia_codec_param_new
+ * constructor for pjmedia_codec_param object
+ */
+static PyObject * pjmedia_codec_param_new(PyTypeObject *type, PyObject *args,
+                                    PyObject *kwds)
+{
+    pjmedia_codec_param_Object *self;
+
+    self = (pjmedia_codec_param_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->info = (pjmedia_codec_param_info_Object *)
+	    PyType_GenericNew(&pjmedia_codec_param_info_Type, NULL, NULL);
+        if (self->info == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }        
+	self->setting = (pjmedia_codec_param_setting_Object *)
+	    PyType_GenericNew(&pjmedia_codec_param_setting_Type, NULL, NULL);
+        if (self->setting == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }        
+    }
+    return (PyObject *)self;
+}
+
+/*
+ * pjmedia_codec_param_members
+ */
+static PyMemberDef pjmedia_codec_param_members[] =
+{   
+    
+    {
+        "info", T_OBJECT_EX,
+        offsetof(pjmedia_codec_param_Object, info), 0,
+        "The 'info' part of codec param describes the capability of the codec,"
+        " and the value should NOT be changed by application."        
+    },
+    {
+        "setting", T_OBJECT_EX,
+        offsetof(pjmedia_codec_param_Object, setting), 0, 
+        "The 'setting' part of codec param describes various settings to be "
+        "applied to the codec. When the codec param is retrieved from the "
+        "codec or codec factory, the values of these will be filled by "
+        "the capability of the codec. Any features that are supported by "
+        "the codec (e.g. vad or plc) will be turned on, so that application "
+        "can query which capabilities are supported by the codec. "
+        "Application may change the settings here before instantiating "
+        "the codec/stream."        
+    },
+    
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * pjmedia_codec_param_Type
+ */
+static PyTypeObject pjmedia_codec_param_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.PJMedia_Codec_Param",      /*tp_name*/
+    sizeof(pjmedia_codec_param_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)pjmedia_codec_param_dealloc,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "PJMedia Codec Param objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    pjmedia_codec_param_members,         /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    pjmedia_codec_param_new,             /* tp_new */
+
+};
+
+/*
+ * py_pjsua_conf_get_max_ports
+ */
+static PyObject *py_pjsua_conf_get_max_ports
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int ret;
+    
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    ret = pjsua_conf_get_max_ports();
+	
+    return Py_BuildValue("i", ret);
+}
+
+/*
+ * py_pjsua_conf_get_active_ports
+ */
+static PyObject *py_pjsua_conf_get_active_ports
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int ret;
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }
+    ret = pjsua_conf_get_active_ports();
+	
+    return Py_BuildValue("i", ret);
+}
+
+/*
+ * py_pjsua_enum_conf_ports
+ * !modified @ 241206
+ */
+static PyObject *py_pjsua_enum_conf_ports(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    PyObject *list;
+    
+    pjsua_conf_port_id id[PJSUA_MAX_CONF_PORTS];
+    unsigned c, i;
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+    
+    c = PJ_ARRAY_SIZE(id);
+    status = pjsua_enum_conf_ports(id, &c);
+    
+    list = PyList_New(c);
+    for (i = 0; i < c; i++) 
+    {
+        int ret = PyList_SetItem(list, i, Py_BuildValue("i", id[i]));
+        if (ret == -1) 
+	{
+            return NULL;
+	}
+    }
+    
+    return Py_BuildValue("O",list);
+}
+
+/*
+ * py_pjsua_conf_get_port_info
+ */
+static PyObject *py_pjsua_conf_get_port_info
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int id;
+    conf_port_info_Object * obj;
+    pjsua_conf_port_info info;
+    int status;	
+    int i;
+
+    if (!PyArg_ParseTuple(pArgs, "i", &id))
+    {
+        return NULL;
+    }
+	
+    
+    status = pjsua_conf_get_port_info(id, &info);
+    obj = (conf_port_info_Object *)conf_port_info_new
+	    (&conf_port_info_Type,NULL,NULL);
+    obj->bits_per_sample = info.bits_per_sample;
+    obj->channel_count = info.bits_per_sample;
+    obj->clock_rate = info.clock_rate;
+    obj->listener_cnt = info.listener_cnt;
+    obj->name = PyString_FromStringAndSize(info.name.ptr, info.name.slen);
+    obj->samples_per_frame = info.samples_per_frame;
+    obj->slot_id = info.slot_id;
+    
+    for (i = 0; i < PJSUA_MAX_CONF_PORTS; i++) {
+	PyObject * item = Py_BuildValue("i",info.listeners[i]);
+	PyList_SetItem((PyObject *)obj->listeners, i, item);
+    }
+    return Py_BuildValue("O", obj);
+}
+
+/*
+ * py_pjsua_conf_add_port
+ */
+static PyObject *py_pjsua_conf_add_port
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int p_id;
+    PyObject * oportObj;
+    pjmedia_port_Object * oport;
+    pjmedia_port * port;
+    PyObject * opoolObj;
+    pj_pool_Object * opool;
+    pj_pool_t * pool;
+    
+    int status;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "OO", &opoolObj, &oportObj))
+    {
+        return NULL;
+    }
+    if (opoolObj != Py_None)
+    {
+        opool = (pj_pool_Object *)opoolObj;
+		pool = opool->pool;
+    } else {
+       opool = NULL;
+       pool = NULL;
+    }
+    if (oportObj != Py_None)
+    {
+        oport = (pjmedia_port_Object *)oportObj;
+		port = oport->port;
+    } else {
+        oport = NULL;
+        port = NULL;
+    }
+
+    status = pjsua_conf_add_port(pool, port, &p_id);
+    
+    
+    return Py_BuildValue("ii", status, p_id);
+}
+
+/*
+ * py_pjsua_conf_remove_port
+ */
+static PyObject *py_pjsua_conf_remove_port
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int id;
+    int status;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "i", &id))
+    {
+        return NULL;
+    }	
+    
+    status = pjsua_conf_remove_port(id);
+    
+    
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_conf_connect
+ */
+static PyObject *py_pjsua_conf_connect
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int source, sink;
+    int status;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "ii", &source, &sink))
+    {
+        return NULL;
+    }	
+    
+    status = pjsua_conf_connect(source, sink);
+    
+    
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_conf_disconnect
+ */
+static PyObject *py_pjsua_conf_disconnect
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int source, sink;
+    int status;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "ii", &source, &sink))
+    {
+        return NULL;
+    }	
+    
+    status = pjsua_conf_disconnect(source, sink);
+    
+    
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_player_create
+ */
+static PyObject *py_pjsua_player_create
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int id;
+    int options;
+    PyObject * filename;
+    pj_str_t str;
+    int status;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "Oi", &filename, &options))
+    {
+        return NULL;
+    }	
+    str.ptr = PyString_AsString(filename);
+    str.slen = strlen(PyString_AsString(filename));
+    status = pjsua_player_create(&str, options, &id);
+    
+    return Py_BuildValue("ii", status, id);
+}
+
+/*
+ * py_pjsua_player_get_conf_port
+ */
+static PyObject *py_pjsua_player_get_conf_port
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    
+    int id, port_id;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "i", &id))
+    {
+        return NULL;
+    }	
+    
+    port_id = pjsua_player_get_conf_port(id);
+    
+    
+    return Py_BuildValue("i", port_id);
+}
+
+/*
+ * py_pjsua_player_set_pos
+ */
+static PyObject *py_pjsua_player_set_pos
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int id;
+    pj_uint32_t samples;
+    int status;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "iI", &id, &samples))
+    {
+        return NULL;
+    }	
+    
+    status = pjsua_player_set_pos(id, samples);
+    
+    
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_player_destroy
+ */
+static PyObject *py_pjsua_player_destroy
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int id;
+    int status;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "i", &id))
+    {
+        return NULL;
+    }	
+    
+    status = pjsua_player_destroy(id);
+    
+    
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_recorder_create
+ * !modified @ 261206
+ */
+static PyObject *py_pjsua_recorder_create
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int p_id;
+    int options;
+    int max_size;
+    PyObject * filename;
+    pj_str_t str;
+    PyObject * enc_param;
+    pj_str_t strparam;
+    int enc_type;
+    
+    int status;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "OiOii", &filename, 
+		&enc_type, &enc_param, &max_size, &options))
+    {
+        return NULL;
+    }	
+    str.ptr = PyString_AsString(filename);
+    str.slen = strlen(PyString_AsString(filename));
+    if (enc_param != Py_None)
+    {
+        strparam.ptr = PyString_AsString(enc_param);
+        strparam.slen = strlen(PyString_AsString(enc_param));
+        status = pjsua_recorder_create
+		(&str, enc_type, NULL, max_size, options, &p_id);
+    } else {
+        status = pjsua_recorder_create
+		(&str, enc_type, NULL, max_size, options, &p_id);
+    }
+    return Py_BuildValue("ii", status, p_id);
+}
+
+/*
+ * py_pjsua_recorder_get_conf_port
+ */
+static PyObject *py_pjsua_recorder_get_conf_port
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    
+    int id, port_id;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "i", &id))
+    {
+        return NULL;
+    }	
+    
+    port_id = pjsua_recorder_get_conf_port(id);
+    
+    
+    return Py_BuildValue("i", port_id);
+}
+
+/*
+ * py_pjsua_recorder_destroy
+ */
+static PyObject *py_pjsua_recorder_destroy
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int id;
+    int status;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "i", &id))
+    {
+        return NULL;
+    }	
+    
+    status = pjsua_recorder_destroy(id);
+    
+    
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_enum_snd_devs
+ */
+static PyObject *py_pjsua_enum_snd_devs(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    PyObject *list;
+    
+    pjmedia_snd_dev_info info[SND_DEV_NUM];
+    unsigned c, i;
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+    
+    c = PJ_ARRAY_SIZE(info);
+    status = pjsua_enum_snd_devs(info, &c);
+    
+    list = PyList_New(c);
+    for (i = 0; i < c; i++) 
+    {
+        int ret;
+        int j;
+        char * str;
+	
+        pjmedia_snd_dev_info_Object * obj;
+        obj = (pjmedia_snd_dev_info_Object *)pjmedia_snd_dev_info_new
+	    (&pjmedia_snd_dev_info_Type, NULL, NULL);
+        obj->default_samples_per_sec = info[i].default_samples_per_sec;
+        obj->input_count = info[i].input_count;
+        obj->output_count = info[i].output_count;
+        str = (char *)malloc(SND_NAME_LEN * sizeof(char));
+        memset(str, 0, SND_NAME_LEN);
+        for (j = 0; j < SND_NAME_LEN; j++)
+	{
+            str[j] = info[i].name[j];
+	}
+        obj->name = PyString_FromStringAndSize(str, SND_NAME_LEN);
+        free(str);
+        ret = PyList_SetItem(list, i, (PyObject *)obj);
+        if (ret == -1) 
+	{
+            return NULL;
+	}
+    }
+    
+    return Py_BuildValue("O",list);
+}
+
+/*
+ * py_pjsua_get_snd_dev
+ */
+static PyObject *py_pjsua_get_snd_dev
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int capture_dev, playback_dev;
+    int status;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+    
+    status = pjsua_get_snd_dev(&capture_dev, &playback_dev);
+    
+    
+    return Py_BuildValue("ii", capture_dev, playback_dev);
+}
+
+/*
+ * py_pjsua_set_snd_dev
+ */
+static PyObject *py_pjsua_set_snd_dev
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int capture_dev, playback_dev;
+    int status;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "ii", &capture_dev, &playback_dev))
+    {
+        return NULL;
+    }	
+    
+    status = pjsua_set_snd_dev(capture_dev, playback_dev);
+    
+    
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_set_null_snd_dev
+ */
+static PyObject *py_pjsua_set_null_snd_dev
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    
+    int status;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+    
+    status = pjsua_set_null_snd_dev();
+    
+    
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_set_no_snd_dev
+ */
+static PyObject *py_pjsua_set_no_snd_dev
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    
+    pjmedia_port_Object * obj;	
+    
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+     
+    obj = (pjmedia_port_Object *)PyType_GenericNew
+	(&pjmedia_port_Type, NULL, NULL);
+    obj->port = pjsua_set_no_snd_dev();
+    return Py_BuildValue("O", obj);
+}
+
+/*
+ * py_pjsua_set_ec
+ */
+static PyObject *py_pjsua_set_ec
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int options;
+    int tail_ms;
+    int status;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "ii", &tail_ms, &options))
+    {
+        return NULL;
+    }	
+    
+    status = pjsua_set_ec(tail_ms, options);
+    
+    
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_get_ec_tail
+ */
+static PyObject *py_pjsua_get_ec_tail
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    
+    int status;	
+    unsigned p_tail_ms;
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+    
+    status = pjsua_get_ec_tail(&p_tail_ms);
+    
+    
+    return Py_BuildValue("i", p_tail_ms);
+}
+
+/*
+ * py_pjsua_enum_codecs
+ * !modified @ 261206
+ */
+static PyObject *py_pjsua_enum_codecs(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    PyObject *list;
+    
+    pjsua_codec_info info[PJMEDIA_CODEC_MGR_MAX_CODECS];
+    unsigned c, i;
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+    
+    c = PJ_ARRAY_SIZE(info);
+    status = pjsua_enum_codecs(info, &c);
+    
+    list = PyList_New(c);
+    for (i = 0; i < c; i++) 
+    {
+        int ret;
+        int j;
+        codec_info_Object * obj;
+        obj = (codec_info_Object *)codec_info_new
+	    (&codec_info_Type, NULL, NULL);
+        obj->codec_id = PyString_FromStringAndSize
+	    (info[i].codec_id.ptr, info[i].codec_id.slen);
+        obj->priority = info[i].priority;
+        for (j = 0; j < 32; j++)
+        {	    
+             obj->buf_[j] = info[i].buf_[j];
+        }	
+        ret = PyList_SetItem(list, i, (PyObject *)obj);
+        if (ret == -1) {
+            return NULL;
+        }	
+    }
+    
+
+    return Py_BuildValue("O",list);
+}
+
+/*
+ * py_pjsua_codec_set_priority
+ */
+static PyObject *py_pjsua_codec_set_priority
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    
+    int status;	
+    PyObject * id;
+    pj_str_t str;
+    pj_uint8_t priority;
+    
+    if (!PyArg_ParseTuple(pArgs, "OB", &id, &priority))
+    {
+        return NULL;
+    }	
+    str.ptr = PyString_AsString(id);
+    str.slen = strlen(PyString_AsString(id));
+    status = pjsua_codec_set_priority(&str, priority);
+    
+    
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_codec_get_param
+ */
+static PyObject *py_pjsua_codec_get_param
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    
+    int status;	
+    PyObject * id;
+    pj_str_t str;
+    pjmedia_codec_param param;
+    pjmedia_codec_param_Object *obj;
+    
+    
+    if (!PyArg_ParseTuple(pArgs, "O", &id))
+    {
+        return NULL;
+    }	
+    str.ptr = PyString_AsString(id);
+    str.slen = strlen(PyString_AsString(id));
+    status = pjsua_codec_get_param(&str, &param);
+    obj = (pjmedia_codec_param_Object *)pjmedia_codec_param_new
+	(&pjmedia_codec_param_Type, NULL, NULL);
+    obj->info->avg_bps = param.info.avg_bps;
+    obj->info->channel_cnt = param.info.channel_cnt;
+    obj->info->clock_rate = param.info.clock_rate;
+    obj->info->frm_ptime = param.info.frm_ptime;
+    obj->info->pcm_bits_per_sample = param.info.pcm_bits_per_sample;
+    obj->info->pt = param.info.pt;
+    obj->setting->cng = param.setting.cng;
+    obj->setting->dec_fmtp_mode = param.setting.dec_fmtp_mode;
+    obj->setting->enc_fmtp_mode = param.setting.enc_fmtp_mode;
+    obj->setting->frm_per_pkt = param.setting.frm_per_pkt;
+    obj->setting->penh = param.setting.penh;
+    obj->setting->plc = param.setting.plc;
+    obj->setting->reserved = param.setting.reserved;
+    obj->setting->vad = param.setting.vad;
+
+    return Py_BuildValue("O", obj);
+}
+/*
+ * py_pjsua_codec_set_param
+ */
+static PyObject *py_pjsua_codec_set_param
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    
+    int status;	
+    PyObject * id;
+    pj_str_t str;
+    pjmedia_codec_param param;
+    PyObject * tmpObj;
+    pjmedia_codec_param_Object *obj;
+    
+    
+    if (!PyArg_ParseTuple(pArgs, "OO", &id, &tmpObj))
+    {
+        return NULL;
+    }	
+
+    str.ptr = PyString_AsString(id);
+    str.slen = strlen(PyString_AsString(id));
+    if (tmpObj != Py_None)
+    {
+        obj = (pjmedia_codec_param_Object *)tmpObj;
+        param.info.avg_bps = obj->info->avg_bps;
+        param.info.channel_cnt = obj->info->channel_cnt;
+        param.info.clock_rate = obj->info->clock_rate;
+        param.info.frm_ptime = obj->info->frm_ptime;
+        param.info.pcm_bits_per_sample = obj->info->pcm_bits_per_sample;
+        param.info.pt = obj->info->pt;
+        param.setting.cng = obj->setting->cng;
+        param.setting.dec_fmtp_mode = obj->setting->dec_fmtp_mode;
+        param.setting.enc_fmtp_mode = obj->setting->enc_fmtp_mode;
+        param.setting.frm_per_pkt = obj->setting->frm_per_pkt;
+        param.setting.penh = obj->setting->penh;
+        param.setting.plc = obj->setting->plc;
+        param.setting.reserved = obj->setting->reserved;
+        param.setting.vad = obj->setting->vad;
+        status = pjsua_codec_set_param(&str, &param);
+    } else {
+        status = pjsua_codec_set_param(&str, NULL);
+    }
+    return Py_BuildValue("i", status);
+}
+
+static char pjsua_conf_get_max_ports_doc[] =
+    "int py_pjsua.conf_get_max_ports () "
+    "Get maxinum number of conference ports.";
+static char pjsua_conf_get_active_ports_doc[] =
+    "int py_pjsua.conf_get_active_ports () "
+    "Get current number of active ports in the bridge.";
+static char pjsua_enum_conf_ports_doc[] =
+    "int[] py_pjsua.enum_conf_ports () "
+    "Enumerate all conference ports.";
+static char pjsua_conf_get_port_info_doc[] =
+    "py_pjsua.Conf_Port_Info py_pjsua.conf_get_port_info (int id) "
+    "Get information about the specified conference port";
+static char pjsua_conf_add_port_doc[] =
+    "int, int py_pjsua.conf_add_port "
+    "(py_pjsua.PJ_Pool pool, py_pjsua.PJMedia_Port port) "
+    "Add arbitrary media port to PJSUA's conference bridge. "
+    "Application can use this function to add the media port "
+    "that it creates. For media ports that are created by PJSUA-LIB "
+    "(such as calls, file player, or file recorder), PJSUA-LIB will "
+    "automatically add the port to the bridge.";
+static char pjsua_conf_remove_port_doc[] =
+    "int py_pjsua.conf_remove_port (int id) "
+    "Remove arbitrary slot from the conference bridge. "
+    "Application should only call this function "
+    "if it registered the port manually.";
+static char pjsua_conf_connect_doc[] =
+    "int py_pjsua.conf_connect (int source, int sink) "
+    "Establish unidirectional media flow from souce to sink. "
+    "One source may transmit to multiple destinations/sink. "
+    "And if multiple sources are transmitting to the same sink, "
+    "the media will be mixed together. Source and sink may refer "
+    "to the same ID, effectively looping the media. "
+    "If bidirectional media flow is desired, application "
+    "needs to call this function twice, with the second "
+    "one having the arguments reversed.";
+static char pjsua_conf_disconnect_doc[] =
+    "int py_pjsua.conf_disconnect (int source, int sink) "
+    "Disconnect media flow from the source to destination port.";
+static char pjsua_player_create_doc[] =
+    "int, int py_pjsua.player_create (string filename, int options) "
+    "Create a file player, and automatically connect "
+    "this player to the conference bridge.";
+static char pjsua_player_get_conf_port_doc[] =
+    "int py_pjsua.player_get_conf_port (int) "
+    "Get conference port ID associated with player.";
+static char pjsua_player_set_pos_doc[] =
+    "int py_pjsua.player_set_pos (int id, int samples) "
+    "Set playback position.";
+static char pjsua_player_destroy_doc[] =
+    "int py_pjsua.player_destroy (int id) "
+    "Close the file, remove the player from the bridge, "
+    "and free resources associated with the file player.";
+static char pjsua_recorder_create_doc[] =
+    "int, int py_pjsua.recorder_create (string filename, "
+    "int enc_type, int enc_param, int max_size, int options) "
+    "Create a file recorder, and automatically connect this recorder "
+    "to the conference bridge. The recorder currently supports recording "
+    "WAV file, and on Windows, MP3 file. The type of the recorder to use "
+    "is determined by the extension of the file (e.g. '.wav' or '.mp3').";
+static char pjsua_recorder_get_conf_port_doc[] =
+    "int py_pjsua.recorder_get_conf_port (int id) "
+    "Get conference port associated with recorder.";
+static char pjsua_recorder_destroy_doc[] =
+    "int py_pjsua.recorder_destroy (int id) "
+    "Destroy recorder (this will complete recording).";
+static char pjsua_enum_snd_devs_doc[] =
+    "py_pjsua.PJMedia_Snd_Dev_Info[] py_pjsua.enum_snd_devs (int count) "
+    "Enum sound devices.";
+static char pjsua_get_snd_dev_doc[] =
+    "int, int py_pjsua.get_snd_dev () "
+    "Get currently active sound devices. "
+    "If sound devices has not been created "
+    "(for example when pjsua_start() is not called), "
+    "it is possible that the function returns "
+    "PJ_SUCCESS with -1 as device IDs.";
+static char pjsua_set_snd_dev_doc[] =
+    "int py_pjsua.set_snd_dev (int capture_dev, int playback_dev) "
+    "Select or change sound device. Application may call this function "
+    "at any time to replace current sound device.";
+static char pjsua_set_null_snd_dev_doc[] =
+    "int py_pjsua.set_null_snd_dev () "
+    "Set pjsua to use null sound device. The null sound device only "
+    "provides the timing needed by the conference bridge, and will not "
+    "interract with any hardware.";
+static char pjsua_set_no_snd_dev_doc[] =
+    "py_pjsua.PJMedia_Port py_pjsua.set_no_snd_dev () "
+    "Disconnect the main conference bridge from any sound devices, "
+    "and let application connect the bridge to it's "
+    "own sound device/master port.";
+static char pjsua_set_ec_doc[] =
+    "int py_pjsua.set_ec (int tail_ms, int options) "
+    "Configure the echo canceller tail length of the sound port.";
+static char pjsua_get_ec_tail_doc[] =
+    "int py_pjsua.get_ec_tail () "
+    "Get current echo canceller tail length.";
+static char pjsua_enum_codecs_doc[] =
+    "py_pjsua.Codec_Info[] py_pjsua.enum_codecs () "
+    "Enum all supported codecs in the system.";
+static char pjsua_codec_set_priority_doc[] =
+    "int py_pjsua.codec_set_priority (string id, int priority) "
+    "Change codec priority.";
+static char pjsua_codec_get_param_doc[] =
+    "py_pjsua.PJMedia_Codec_Param py_pjsua.codec_get_param (string id) "
+    "Get codec parameters";
+static char pjsua_codec_set_param_doc[] =
+    "int py_pjsua.codec_set_param (string id, "
+    "py_pjsua.PJMedia_Codec_Param param) "
+    "Set codec parameters.";
+
+/* END OF LIB MEDIA */
+
+/* LIB CALL */
+
+/*
+ * pj_time_val_Object
+ * PJ Time Val
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */ 
+    long sec;
+    long msec;
+
+} pj_time_val_Object;
+
+
+
+/*
+ * pj_time_val_members
+ */
+static PyMemberDef pj_time_val_members[] =
+{   
+    
+    {
+        "sec", T_INT, 
+        offsetof(pj_time_val_Object, sec), 0,
+        "The seconds part of the time"
+    },
+    {
+        "msec", T_INT, 
+        offsetof(pj_time_val_Object, sec), 0,
+        "The milliseconds fraction of the time"
+    },
+    
+    
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * pj_time_val_Type
+ */
+static PyTypeObject pj_time_val_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.PJ_Time_Val",      /*tp_name*/
+    sizeof(pj_time_val_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    0,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "PJ Time Val objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    pj_time_val_members,         /* tp_members */
+    
+
+};
+
+/*
+ * call_info_Object
+ * Call Info
+ */
+typedef struct
+{
+    PyObject_HEAD
+    /* Type-specific fields go here. */ 
+    
+    int id;
+    int role;
+    int acc_id;
+    PyObject * local_info;
+    PyObject * local_contact;
+    PyObject * remote_info;
+    PyObject * remote_contact;
+    PyObject * call_id;
+    int state;
+    PyObject * state_text;
+    int last_status;
+    PyObject * last_status_text;
+    int media_status;
+    int media_dir;
+    int conf_slot;
+    pj_time_val_Object * connect_duration;
+    pj_time_val_Object * total_duration;
+    struct {
+	char local_info[128];
+	char local_contact[128];
+	char remote_info[128];
+	char remote_contact[128];
+	char call_id[128];
+	char last_status_text[128];
+    } buf_;
+
+} call_info_Object;
+
+
+/*
+ * call_info_dealloc
+ * deletes a call_info from memory
+ */
+static void call_info_dealloc(call_info_Object* self)
+{
+    Py_XDECREF(self->local_info);
+    Py_XDECREF(self->local_contact);
+    Py_XDECREF(self->remote_info);
+    Py_XDECREF(self->remote_contact);
+    Py_XDECREF(self->call_id);
+    Py_XDECREF(self->state_text);
+    Py_XDECREF(self->last_status_text);
+    Py_XDECREF(self->connect_duration);
+    Py_XDECREF(self->total_duration);
+    self->ob_type->tp_free((PyObject*)self);
+}
+
+
+/*
+ * call_info_new
+ * constructor for call_info object
+ */
+static PyObject * call_info_new(PyTypeObject *type, PyObject *args,
+                                    PyObject *kwds)
+{
+    call_info_Object *self;
+
+    self = (call_info_Object *)type->tp_alloc(type, 0);
+    if (self != NULL)
+    {
+        self->local_info = PyString_FromString("");
+        if (self->local_info == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }       
+	self->local_contact = PyString_FromString("");
+        if (self->local_contact == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+	self->remote_info = PyString_FromString("");
+        if (self->remote_info == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+	self->remote_contact = PyString_FromString("");
+        if (self->remote_contact == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+	self->call_id = PyString_FromString("");
+        if (self->call_id == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+	self->state_text = PyString_FromString("");
+        if (self->state_text == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+	self->last_status_text = PyString_FromString("");
+        if (self->last_status_text == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+	self->connect_duration = (pj_time_val_Object *)PyType_GenericNew
+	    (&pj_time_val_Type,NULL,NULL);
+        if (self->connect_duration == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+	self->total_duration = (pj_time_val_Object *)PyType_GenericNew
+	    (&pj_time_val_Type,NULL,NULL);
+        if (self->total_duration == NULL)
+    	{
+            Py_DECREF(self);
+            return NULL;
+        }
+    }
+    return (PyObject *)self;
+}
+
+/*
+ * call_info_members
+ */
+static PyMemberDef call_info_members[] =
+{   
+    {
+        "id", T_INT, 
+        offsetof(call_info_Object, id), 0,
+        "Call identification"
+    },
+    {
+        "role", T_INT, 
+        offsetof(call_info_Object, role), 0,
+        "Initial call role (UAC == caller)"
+    },
+    {
+        "acc_id", T_INT, 
+        offsetof(call_info_Object, acc_id), 0,
+        "The account ID where this call belongs."
+    },
+    {
+        "local_info", T_OBJECT_EX,
+        offsetof(call_info_Object, local_info), 0,
+        "Local URI"        
+    },
+    {
+        "local_contact", T_OBJECT_EX,
+        offsetof(call_info_Object, local_contact), 0,
+        "Local Contact"        
+    },
+    {
+        "remote_info", T_OBJECT_EX,
+        offsetof(call_info_Object, remote_info), 0,
+        "Remote URI"        
+    },
+    {
+        "remote_contact", T_OBJECT_EX,
+        offsetof(call_info_Object, remote_contact), 0,
+        "Remote Contact"        
+    },
+    {
+        "call_id", T_OBJECT_EX,
+        offsetof(call_info_Object, call_id), 0,
+        "Dialog Call-ID string"        
+    },
+    {
+        "state", T_INT, 
+        offsetof(call_info_Object, state), 0,
+        "Call state"
+    },
+    {
+        "state_text", T_OBJECT_EX,
+        offsetof(call_info_Object, state_text), 0,
+        "Text describing the state "        
+    },
+    {
+        "last_status", T_INT, 
+        offsetof(call_info_Object, last_status), 0,
+        "Last status code heard, which can be used as cause code"
+    },
+    {
+        "last_status_text", T_OBJECT_EX,
+        offsetof(call_info_Object, last_status_text), 0,
+        "The reason phrase describing the status."        
+    },
+    {
+        "media_status", T_INT, 
+        offsetof(call_info_Object, media_status), 0,
+        "Call media status."
+    },
+    {
+        "media_dir", T_INT, 
+        offsetof(call_info_Object, media_dir), 0,
+        "Media direction"
+    },
+    {
+        "conf_slot", T_INT, 
+        offsetof(call_info_Object, conf_slot), 0,
+        "The conference port number for the call"
+    },
+    {
+        "connect_duration", T_OBJECT_EX,
+        offsetof(call_info_Object, connect_duration), 0,
+        "Up-to-date call connected duration(zero when call is not established)"
+    },
+    {
+        "total_duration", T_OBJECT_EX,
+        offsetof(call_info_Object, total_duration), 0,
+        "Total call duration, including set-up time"        
+    },
+    
+    {NULL}  /* Sentinel */
+};
+
+
+
+
+/*
+ * call_info_Type
+ */
+static PyTypeObject call_info_Type =
+{
+    PyObject_HEAD_INIT(NULL)
+    0,                              /*ob_size*/
+    "py_pjsua.Call_Info",      /*tp_name*/
+    sizeof(call_info_Object),  /*tp_basicsize*/
+    0,                              /*tp_itemsize*/
+    (destructor)call_info_dealloc,/*tp_dealloc*/
+    0,                              /*tp_print*/
+    0,                              /*tp_getattr*/
+    0,                              /*tp_setattr*/
+    0,                              /*tp_compare*/
+    0,                              /*tp_repr*/
+    0,                              /*tp_as_number*/
+    0,                              /*tp_as_sequence*/
+    0,                              /*tp_as_mapping*/
+    0,                              /*tp_hash */
+    0,                              /*tp_call*/
+    0,                              /*tp_str*/
+    0,                              /*tp_getattro*/
+    0,                              /*tp_setattro*/
+    0,                              /*tp_as_buffer*/
+    Py_TPFLAGS_DEFAULT,             /*tp_flags*/
+    "Call Info objects",       /* tp_doc */
+    0,                              /* tp_traverse */
+    0,                              /* tp_clear */
+    0,                              /* tp_richcompare */
+    0,                              /* tp_weaklistoffset */
+    0,                              /* tp_iter */
+    0,                              /* tp_iternext */
+    0,                              /* tp_methods */
+    call_info_members,         /* tp_members */
+    0,                              /* tp_getset */
+    0,                              /* tp_base */
+    0,                              /* tp_dict */
+    0,                              /* tp_descr_get */
+    0,                              /* tp_descr_set */
+    0,                              /* tp_dictoffset */
+    0,                              /* tp_init */
+    0,                              /* tp_alloc */
+    call_info_new,             /* tp_new */
+
+};
+
+/*
+ * py_pjsua_call_get_max_count
+ */
+static PyObject *py_pjsua_call_get_max_count
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int count;
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+    
+    count = pjsua_call_get_max_count();
+    
+    
+    return Py_BuildValue("i", count);
+}
+
+/*
+ * py_pjsua_call_get_count
+ */
+static PyObject *py_pjsua_call_get_count
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    
+    int count;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+    
+    count = pjsua_call_get_count();
+    
+    
+    return Py_BuildValue("i", count);
+}
+
+/*
+ * py_pjsua_enum_calls
+ */
+static PyObject *py_pjsua_enum_calls(PyObject *pSelf, PyObject *pArgs)
+{
+    pj_status_t status;
+    PyObject *list;
+    
+    pjsua_transport_id id[PJSUA_MAX_CALLS];
+    unsigned c, i;
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+    
+    c = PJ_ARRAY_SIZE(id);
+    status = pjsua_enum_calls(id, &c);
+    
+    list = PyList_New(c);
+    for (i = 0; i < c; i++) 
+    {     
+        int ret = PyList_SetItem(list, i, Py_BuildValue("i", id[i]));
+        if (ret == -1) 
+        {
+            return NULL;
+        }
+    }
+    
+    return Py_BuildValue("O",list);
+}
+
+/*
+ * py_pjsua_call_make_call
+ */
+static PyObject *py_pjsua_call_make_call
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int status;
+    int acc_id;
+    pj_str_t dst_uri;
+    PyObject * sd;
+    unsigned options;
+    pjsua_msg_data msg_data;
+    PyObject * omdObj;
+    msg_data_Object * omd;
+    int user_data;
+    int call_id;
+    pj_pool_t * pool;
+
+    if (!PyArg_ParseTuple
+		(pArgs, "iOIiO", &acc_id, &sd, &options, &user_data, &omdObj))
+    {
+        return NULL;
+    }
+	
+    dst_uri.ptr = PyString_AsString(sd);
+    dst_uri.slen = strlen(PyString_AsString(sd));
+    if (omdObj != Py_None) 
+    {
+        omd = (msg_data_Object *)omdObj;
+        msg_data.content_type.ptr = PyString_AsString(omd->content_type);
+        msg_data.content_type.slen = strlen
+			(PyString_AsString(omd->content_type));
+        msg_data.msg_body.ptr = PyString_AsString(omd->msg_body);
+        msg_data.msg_body.slen = strlen(PyString_AsString(omd->msg_body));
+        pool = pjsua_pool_create("pjsua", POOL_SIZE, POOL_SIZE);
+        translate_hdr(pool, &msg_data.hdr_list, omd->hdr_list);
+        status = pjsua_call_make_call(acc_id, &dst_uri, 
+			options, (void*)user_data, &msg_data, &call_id);	
+        pj_pool_release(pool);
+    } else {
+		
+        status = pjsua_call_make_call(acc_id, &dst_uri, 
+			options, (void*)user_data, NULL, &call_id);	
+    }
+	
+    return Py_BuildValue("ii",status, call_id);
+	
+}
+
+/*
+ * py_pjsua_call_is_active
+ */
+static PyObject *py_pjsua_call_is_active
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int call_id;
+    int isActive;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "i", &call_id))
+    {
+        return NULL;
+    }	
+    
+    isActive = pjsua_call_is_active(call_id);
+    
+    
+    return Py_BuildValue("i", isActive);
+}
+
+/*
+ * py_pjsua_call_has_media
+ */
+static PyObject *py_pjsua_call_has_media
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int call_id;
+    int hasMedia;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "i", &call_id))
+    {
+        return NULL;
+    }	
+    
+    hasMedia = pjsua_call_has_media(call_id);
+    
+    
+    return Py_BuildValue("i", hasMedia);
+}
+
+/*
+ * py_pjsua_call_get_conf_port
+ */
+static PyObject *py_pjsua_call_get_conf_port
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int call_id;
+    int port_id;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "i", &call_id))
+    {
+        return NULL;
+    }	
+    
+    port_id = pjsua_call_get_conf_port(call_id);
+    
+    
+    return Py_BuildValue("i", port_id);
+}
+
+/*
+ * py_pjsua_call_get_info
+ */
+static PyObject *py_pjsua_call_get_info
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int call_id;
+    int status;
+    call_info_Object * oi;
+    pjsua_call_info info;
+    
+
+    if (!PyArg_ParseTuple(pArgs, "i", &call_id))
+    {
+        return NULL;
+    }	
+    
+    
+    status = pjsua_call_get_info(call_id, &info);
+    if (status == PJ_SUCCESS) 
+    {
+        oi = (call_info_Object *)call_info_new(&call_info_Type, NULL, NULL);
+        oi->acc_id = info.acc_id;
+        pj_ansi_snprintf(oi->buf_.call_id, sizeof(oi->buf_.call_id),
+	    "%.*s", (int)info.call_id.slen, info.call_id.ptr);
+        pj_ansi_snprintf(oi->buf_.last_status_text, 
+	    sizeof(oi->buf_.last_status_text),
+	    "%.*s", (int)info.last_status_text.slen, info.last_status_text.ptr);
+        pj_ansi_snprintf(oi->buf_.local_contact, sizeof(oi->buf_.local_contact),
+	    "%.*s", (int)info.local_contact.slen, info.local_contact.ptr);
+        pj_ansi_snprintf(oi->buf_.local_info, sizeof(oi->buf_.local_info),
+	    "%.*s", (int)info.local_info.slen, info.local_info.ptr);
+        pj_ansi_snprintf(oi->buf_.remote_contact,
+	    sizeof(oi->buf_.remote_contact),
+	    "%.*s", (int)info.remote_contact.slen, info.remote_contact.ptr);
+        pj_ansi_snprintf(oi->buf_.remote_info, sizeof(oi->buf_.remote_info),
+	    "%.*s", (int)info.remote_info.slen, info.remote_info.ptr);
+
+        oi->call_id = PyString_FromStringAndSize(info.call_id.ptr, 
+	    info.call_id.slen);
+        oi->conf_slot = info.conf_slot;
+        oi->connect_duration->sec = info.connect_duration.sec;
+        oi->connect_duration->msec = info.connect_duration.msec;
+        oi->total_duration->sec = info.total_duration.sec;
+        oi->total_duration->msec = info.total_duration.msec;
+        oi->id = info.id;
+        oi->last_status = info.last_status;
+        oi->last_status_text = PyString_FromStringAndSize(
+	    info.last_status_text.ptr, info.last_status_text.slen);
+        oi->local_contact = PyString_FromStringAndSize(
+	    info.local_contact.ptr, info.local_contact.slen);
+        oi->local_info = PyString_FromStringAndSize(
+   	    info.local_info.ptr, info.local_info.slen);
+        oi->remote_contact = PyString_FromStringAndSize(
+	    info.remote_contact.ptr, info.remote_contact.slen);
+        oi->remote_info = PyString_FromStringAndSize(
+	    info.remote_info.ptr, info.remote_info.slen);
+        oi->media_dir = info.media_dir;
+        oi->media_status = info.media_status;
+        oi->role = info.role;
+        oi->state = info.state;
+        oi->state_text = PyString_FromStringAndSize(
+   	    info.state_text.ptr, info.state_text.slen);
+
+	return Py_BuildValue("O", oi);
+    } else {
+	Py_INCREF(Py_None);
+	return Py_None;
+    }
+}
+
+/*
+ * py_pjsua_call_set_user_data
+ */
+static PyObject *py_pjsua_call_set_user_data
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int call_id;
+    int user_data;	
+    int status;
+
+    if (!PyArg_ParseTuple(pArgs, "ii", &call_id, &user_data))
+    {
+        return NULL;
+    }	
+    
+    status = pjsua_call_set_user_data(call_id, (void*)user_data);
+    
+    
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_call_get_user_data
+ */
+static PyObject *py_pjsua_call_get_user_data
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int call_id;
+    void * user_data;	
+    
+
+    if (!PyArg_ParseTuple(pArgs, "i", &call_id))
+    {
+        return NULL;
+    }	
+    
+    user_data = pjsua_call_get_user_data(call_id);
+    
+    
+    return Py_BuildValue("i", (int)user_data);
+}
+
+/*
+ * py_pjsua_call_answer
+ */
+static PyObject *py_pjsua_call_answer
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int status;
+    int call_id;
+    pj_str_t * reason, tmp_reason;
+    PyObject * sr;
+    unsigned code;
+    pjsua_msg_data msg_data;
+    PyObject * omdObj;
+    msg_data_Object * omd;    
+    pj_pool_t * pool;
+
+    if (!PyArg_ParseTuple(pArgs, "iIOO", &call_id, &code, &sr, &omdObj))
+    {
+        return NULL;
+    }
+    if (sr == Py_None) 
+    {
+        reason = NULL;
+    } else {
+	reason = &tmp_reason;
+        tmp_reason.ptr = PyString_AsString(sr);
+        tmp_reason.slen = strlen(PyString_AsString(sr));
+    }
+    if (omdObj != Py_None) 
+    {
+        omd = (msg_data_Object *)omdObj;
+        msg_data.content_type.ptr = PyString_AsString(omd->content_type);
+        msg_data.content_type.slen = strlen
+			(PyString_AsString(omd->content_type));
+        msg_data.msg_body.ptr = PyString_AsString(omd->msg_body);
+        msg_data.msg_body.slen = strlen(PyString_AsString(omd->msg_body));
+        pool = pjsua_pool_create("pjsua", POOL_SIZE, POOL_SIZE);
+        translate_hdr(pool, &msg_data.hdr_list, omd->hdr_list);
+	
+        status = pjsua_call_answer(call_id, code, reason, &msg_data);	
+    
+        pj_pool_release(pool);
+    } else {
+	
+        status = pjsua_call_answer(call_id, code, reason, NULL);
+	
+    }
+    
+    return Py_BuildValue("i",status);
+}
+
+/*
+ * py_pjsua_call_hangup
+ */
+static PyObject *py_pjsua_call_hangup
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int status;
+    int call_id;
+    pj_str_t * reason, tmp_reason;
+    PyObject * sr;
+    unsigned code;
+    pjsua_msg_data msg_data;
+    PyObject * omdObj;
+    msg_data_Object * omd;    
+    pj_pool_t * pool = NULL;
+
+    if (!PyArg_ParseTuple(pArgs, "iIOO", &call_id, &code, &sr, &omdObj))
+    {
+        return NULL;
+    }
+    if (sr == Py_None)
+    {
+        reason = NULL;
+    } else {
+        reason = &tmp_reason;
+        tmp_reason.ptr = PyString_AsString(sr);
+        tmp_reason.slen = strlen(PyString_AsString(sr));
+    }
+    if (omdObj != Py_None) 
+    {
+        omd = (msg_data_Object *)omdObj;
+        msg_data.content_type.ptr = PyString_AsString(omd->content_type);
+        msg_data.content_type.slen = strlen
+			(PyString_AsString(omd->content_type));
+        msg_data.msg_body.ptr = PyString_AsString(omd->msg_body);
+        msg_data.msg_body.slen = strlen(PyString_AsString(omd->msg_body));
+        pool = pjsua_pool_create("pjsua", POOL_SIZE, POOL_SIZE);
+        translate_hdr(pool, &msg_data.hdr_list, omd->hdr_list);
+        status = pjsua_call_hangup(call_id, code, reason, &msg_data);	
+        pj_pool_release(pool);
+    } else {
+        status = pjsua_call_hangup(call_id, code, reason, NULL);	
+    }
+    
+    return Py_BuildValue("i",status);
+}
+
+/*
+ * py_pjsua_call_set_hold
+ */
+static PyObject *py_pjsua_call_set_hold
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int status;
+    int call_id;    
+    pjsua_msg_data msg_data;
+	PyObject * omdObj;
+    msg_data_Object * omd;    
+    pj_pool_t * pool;
+
+    if (!PyArg_ParseTuple(pArgs, "iO", &call_id, &omdObj))
+    {
+        return NULL;
+    }
+
+    if (omdObj != Py_None) 
+    {
+        omd = (msg_data_Object *)omdObj;
+        msg_data.content_type.ptr = PyString_AsString(omd->content_type);
+        msg_data.content_type.slen = strlen
+			(PyString_AsString(omd->content_type));
+        msg_data.msg_body.ptr = PyString_AsString(omd->msg_body);
+        msg_data.msg_body.slen = strlen(PyString_AsString(omd->msg_body));
+        pool = pjsua_pool_create("pjsua", POOL_SIZE, POOL_SIZE);
+        translate_hdr(pool, &msg_data.hdr_list, omd->hdr_list);
+        status = pjsua_call_set_hold(call_id, &msg_data);	
+        pj_pool_release(pool);
+    } else {
+        status = pjsua_call_set_hold(call_id, NULL);	
+    }
+    return Py_BuildValue("i",status);
+}
+
+/*
+ * py_pjsua_call_reinvite
+ */
+static PyObject *py_pjsua_call_reinvite
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int status;
+    int call_id;    
+    int unhold;
+    pjsua_msg_data msg_data;
+    PyObject * omdObj;
+    msg_data_Object * omd;    
+    pj_pool_t * pool;
+
+    if (!PyArg_ParseTuple(pArgs, "iiO", &call_id, &unhold, &omdObj))
+    {
+        return NULL;
+    }
+
+    if (omdObj != Py_None)
+    {
+        omd = (msg_data_Object *)omdObj;
+        msg_data.content_type.ptr = PyString_AsString(omd->content_type);
+        msg_data.content_type.slen = strlen
+			(PyString_AsString(omd->content_type));
+        msg_data.msg_body.ptr = PyString_AsString(omd->msg_body);
+        msg_data.msg_body.slen = strlen(PyString_AsString(omd->msg_body));
+        pool = pjsua_pool_create("pjsua", POOL_SIZE, POOL_SIZE);
+        translate_hdr(pool, &msg_data.hdr_list, omd->hdr_list);
+        status = pjsua_call_reinvite(call_id, unhold, &msg_data);	
+        pj_pool_release(pool);
+    } else {
+        status = pjsua_call_reinvite(call_id, unhold, NULL);
+    }
+    return Py_BuildValue("i",status);
+}
+
+/*
+ * py_pjsua_call_xfer
+ */
+static PyObject *py_pjsua_call_xfer
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int status;
+    int call_id;
+    pj_str_t dest;
+    PyObject * sd;
+    pjsua_msg_data msg_data;
+    PyObject * omdObj;
+    msg_data_Object * omd;    
+    pj_pool_t * pool;
+
+    if (!PyArg_ParseTuple(pArgs, "iOO", &call_id, &sd, &omdObj))
+    {
+        return NULL;
+    }
+	
+    dest.ptr = PyString_AsString(sd);
+    dest.slen = strlen(PyString_AsString(sd));
+    
+    if (omdObj != Py_None)
+    {
+        omd = (msg_data_Object *)omdObj;
+        msg_data.content_type.ptr = PyString_AsString(omd->content_type);
+        msg_data.content_type.slen = strlen
+			(PyString_AsString(omd->content_type));
+        msg_data.msg_body.ptr = PyString_AsString(omd->msg_body);
+        msg_data.msg_body.slen = strlen(PyString_AsString(omd->msg_body));
+        pool = pjsua_pool_create("pjsua", POOL_SIZE, POOL_SIZE);
+        translate_hdr(pool, &msg_data.hdr_list, omd->hdr_list);
+        status = pjsua_call_xfer(call_id, &dest, &msg_data);	
+        pj_pool_release(pool);
+    } else {
+        status = pjsua_call_xfer(call_id, &dest, NULL);	
+    }
+    return Py_BuildValue("i",status);
+}
+
+/*
+ * py_pjsua_call_xfer_replaces
+ */
+static PyObject *py_pjsua_call_xfer_replaces
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int status;
+    int call_id;
+    int dest_call_id;
+    unsigned options;    
+    pjsua_msg_data msg_data;
+    PyObject * omdObj;
+    msg_data_Object * omd;    
+    pj_pool_t * pool;
+
+    if (!PyArg_ParseTuple
+		(pArgs, "iiIO", &call_id, &dest_call_id, &options, &omdObj))
+    {
+        return NULL;
+    }
+	
+    if (omdObj != Py_None)
+    {
+        omd = (msg_data_Object *)omdObj;    
+        msg_data.content_type.ptr = PyString_AsString(omd->content_type);
+        msg_data.content_type.slen = strlen
+			(PyString_AsString(omd->content_type));
+        msg_data.msg_body.ptr = PyString_AsString(omd->msg_body);
+        msg_data.msg_body.slen = strlen(PyString_AsString(omd->msg_body));
+        pool = pjsua_pool_create("pjsua", POOL_SIZE, POOL_SIZE);
+        translate_hdr(pool, &msg_data.hdr_list, omd->hdr_list);
+        status = pjsua_call_xfer_replaces
+			(call_id, dest_call_id, options, &msg_data);	
+        pj_pool_release(pool);
+    } else {
+        status = pjsua_call_xfer_replaces(call_id, dest_call_id,options, NULL);	
+    }
+    return Py_BuildValue("i",status);
+}
+
+/*
+ * py_pjsua_call_dial_dtmf
+ */
+static PyObject *py_pjsua_call_dial_dtmf
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int call_id;
+    PyObject * sd;
+    pj_str_t digits;
+    int status;
+
+    if (!PyArg_ParseTuple(pArgs, "iO", &call_id, &sd))
+    {
+        return NULL;
+    }	
+    digits.ptr = PyString_AsString(sd);
+    digits.slen = strlen(PyString_AsString(sd));
+    status = pjsua_call_dial_dtmf(call_id, &digits);
+    
+    return Py_BuildValue("i", status);
+}
+
+/*
+ * py_pjsua_call_send_im
+ */
+static PyObject *py_pjsua_call_send_im
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int status;
+    int call_id;
+    pj_str_t content;
+    pj_str_t * mime_type, tmp_mime_type;
+    PyObject * sm;
+    PyObject * sc;
+    pjsua_msg_data msg_data;
+    PyObject * omdObj;
+    msg_data_Object * omd;    
+    int user_data;
+    pj_pool_t * pool;
+
+    if (!PyArg_ParseTuple
+		(pArgs, "iOOOi", &call_id, &sm, &sc, &omdObj, &user_data))
+    {
+        return NULL;
+    }
+    if (sm == Py_None)
+    {
+        mime_type = NULL;
+    } else {
+        mime_type = &tmp_mime_type;
+        tmp_mime_type.ptr = PyString_AsString(sm);
+        tmp_mime_type.slen = strlen(PyString_AsString(sm));
+    }
+    content.ptr = PyString_AsString(sc);
+    content.slen = strlen(PyString_AsString(sc));
+    
+    if (omdObj != Py_None)
+    {
+        omd = (msg_data_Object *)omdObj;
+        msg_data.content_type.ptr = PyString_AsString(omd->content_type);
+        msg_data.content_type.slen = strlen
+			(PyString_AsString(omd->content_type));
+        msg_data.msg_body.ptr = PyString_AsString(omd->msg_body);
+        msg_data.msg_body.slen = strlen(PyString_AsString(omd->msg_body));
+        pool = pjsua_pool_create("pjsua", POOL_SIZE, POOL_SIZE);
+        translate_hdr(pool, &msg_data.hdr_list, omd->hdr_list);
+        status = pjsua_call_send_im
+		(call_id, mime_type, &content, &msg_data, (void *)user_data);	
+        pj_pool_release(pool);
+    } else {
+        status = pjsua_call_send_im
+			(call_id, mime_type, &content, NULL, (void *)user_data);	
+    }
+    
+    return Py_BuildValue("i",status);
+}
+
+/*
+ * py_pjsua_call_send_typing_ind
+ */
+static PyObject *py_pjsua_call_send_typing_ind
+(PyObject *pSelf, PyObject *pArgs)
+{    
+    int status;
+    int call_id;    
+    int is_typing;
+    pjsua_msg_data msg_data;
+    PyObject * omdObj;
+    msg_data_Object * omd;    
+    pj_pool_t * pool;
+
+    if (!PyArg_ParseTuple(pArgs, "iiO", &call_id, &is_typing, &omdObj))
+    {
+        return NULL;
+    }
+	
+    if (omdObj != Py_None)
+    {
+        omd = (msg_data_Object *)omdObj;
+        msg_data.content_type.ptr = PyString_AsString(omd->content_type);
+        msg_data.content_type.slen = strlen
+			(PyString_AsString(omd->content_type));
+        msg_data.msg_body.ptr = PyString_AsString(omd->msg_body);
+        msg_data.msg_body.slen = strlen(PyString_AsString(omd->msg_body));
+        pool = pjsua_pool_create("pjsua", POOL_SIZE, POOL_SIZE);
+        translate_hdr(pool, &msg_data.hdr_list, omd->hdr_list);
+        status = pjsua_call_send_typing_ind(call_id, is_typing, &msg_data);	
+        pj_pool_release(pool);
+    } else {
+        status = pjsua_call_send_typing_ind(call_id, is_typing, NULL);	
+    }
+    return Py_BuildValue("i",status);
+}
+
+/*
+ * py_pjsua_call_hangup_all
+ */
+static PyObject *py_pjsua_call_hangup_all
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+
+    if (!PyArg_ParseTuple(pArgs, ""))
+    {
+        return NULL;
+    }	
+    
+    pjsua_call_hangup_all();
+    
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+/*
+ * py_pjsua_call_dump
+ */
+static PyObject *py_pjsua_call_dump
+(PyObject *pSelf, PyObject *pArgs)
+{    	
+    int call_id;
+    int with_media;
+    PyObject * sb;
+    PyObject * si;
+    char * buffer;
+    char * indent;
+    unsigned maxlen;    
+    int status;
+
+    if (!PyArg_ParseTuple(pArgs, "iiIO", &call_id, &with_media, &maxlen, &si))
+    {
+        return NULL;
+    }	
+    buffer = (char *) malloc (maxlen * sizeof(char));
+    indent = PyString_AsString(si);
+    
+    status = pjsua_call_dump(call_id, with_media, buffer, maxlen, indent);
+    sb = PyString_FromStringAndSize(buffer, maxlen);
+    free(buffer);
+    return Py_BuildValue("O", sb);
+}
+
+
+/*
+ * py_pjsua_dump
+ * Dump application states.
+ */
+static PyObject *py_pjsua_dump(PyObject *pSelf, PyObject *pArgs)
+{
+    unsigned old_decor;
+    char buf[1024];
+    int detail;
+
+    if (!PyArg_ParseTuple(pArgs, "i", &detail))
+    {
+        return NULL;
+    }	
+
+    PJ_LOG(3,(THIS_FILE, "Start dumping application states:"));
+
+    old_decor = pj_log_get_decor();
+    pj_log_set_decor(old_decor & (PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_CR));
+
+    if (detail)
+	pj_dump_config();
+
+    pjsip_endpt_dump(pjsua_get_pjsip_endpt(), detail);
+    pjmedia_endpt_dump(pjsua_get_pjmedia_endpt());
+    pjsip_tsx_layer_dump(detail);
+    pjsip_ua_dump(detail);
+
+
+    /* Dump all invite sessions: */
+    PJ_LOG(3,(THIS_FILE, "Dumping invite sessions:"));
+
+    if (pjsua_call_get_count() == 0) {
+
+	PJ_LOG(3,(THIS_FILE, "  - no sessions -"));
+
+    } else {
+	unsigned i, max;
+
+	max = pjsua_call_get_max_count();
+	for (i=0; i<max; ++i) {
+	    if (pjsua_call_is_active(i)) {
+		pjsua_call_dump(i, detail, buf, sizeof(buf), "  ");
+		PJ_LOG(3,(THIS_FILE, "%s", buf));
+	    }
+	}
+    }
+
+    /* Dump presence status */
+    pjsua_pres_dump(detail);
+
+    pj_log_set_decor(old_decor);
+    PJ_LOG(3,(THIS_FILE, "Dump complete"));
+
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+
+static char pjsua_call_get_max_count_doc[] =
+    "int py_pjsua.call_get_max_count () "
+    "Get maximum number of calls configured in pjsua.";
+static char pjsua_call_get_count_doc[] =
+    "int py_pjsua.call_get_count () "
+    "Get number of currently active calls.";
+static char pjsua_enum_calls_doc[] =
+    "int[] py_pjsua.enum_calls () "
+    "Get maximum number of calls configured in pjsua.";
+static char pjsua_call_make_call_doc[] =
+    "int,int py_pjsua.call_make_call (int acc_id, string dst_uri, int options,"
+    "int user_data, py_pjsua.Msg_Data msg_data) "
+    "Make outgoing call to the specified URI using the specified account.";
+static char pjsua_call_is_active_doc[] =
+    "int py_pjsua.call_is_active (int call_id) "
+    "Check if the specified call has active INVITE session and the INVITE "
+    "session has not been disconnected.";
+static char pjsua_call_has_media_doc[] =
+    "int py_pjsua.call_has_media (int call_id) "
+    "Check if call has an active media session.";
+static char pjsua_call_get_conf_port_doc[] =
+    "int py_pjsua.call_get_conf_port (int call_id) "
+    "Get the conference port identification associated with the call.";
+static char pjsua_call_get_info_doc[] =
+    "py_pjsua.Call_Info py_pjsua.call_get_info (int call_id) "
+    "Obtain detail information about the specified call.";
+static char pjsua_call_set_user_data_doc[] =
+    "int py_pjsua.call_set_user_data (int call_id, int user_data) "
+    "Attach application specific data to the call.";
+static char pjsua_call_get_user_data_doc[] =
+    "int py_pjsua.call_get_user_data (int call_id) "
+    "Get user data attached to the call.";
+static char pjsua_call_answer_doc[] =
+    "int py_pjsua.call_answer (int call_id, int code, string reason, "
+    "py_pjsua.Msg_Data msg_data) "
+    "Send response to incoming INVITE request.";
+static char pjsua_call_hangup_doc[] =
+    "int py_pjsua.call_hangup (int call_id, int code, string reason, "
+    "py_pjsua.Msg_Data msg_data) "
+    "Hangup call by using method that is appropriate according "
+    "to the call state.";
+static char pjsua_call_set_hold_doc[] =
+    "int py_pjsua.call_set_hold (int call_id, py_pjsua.Msg_Data msg_data) "
+    "Put the specified call on hold.";
+static char pjsua_call_reinvite_doc[] =
+    "int py_pjsua.call_reinvite (int call_id, int unhold, "
+    "py_pjsua.Msg_Data msg_data) "
+    "Send re-INVITE (to release hold).";
+static char pjsua_call_xfer_doc[] =
+    "int py_pjsua.call_xfer (int call_id, string dest, "
+    "py_pjsua.Msg_Data msg_data) "
+    "Initiate call transfer to the specified address. "
+    "This function will send REFER request to instruct remote call party "
+    "to initiate a new INVITE session to the specified destination/target.";
+static char pjsua_call_xfer_replaces_doc[] =
+    "int py_pjsua.call_xfer_replaces (int call_id, int dest_call_id, "
+    "int options, py_pjsua.Msg_Data msg_data) "
+    "Initiate attended call transfer. This function will send REFER request "
+    "to instruct remote call party to initiate new INVITE session to the URL "
+    "of dest_call_id. The party at dest_call_id then should 'replace' the call"
+    "with us with the new call from the REFER recipient.";
+static char pjsua_call_dial_dtmf_doc[] =
+    "int py_pjsua.call_dial_dtmf (int call_id, string digits) "
+    "Send DTMF digits to remote using RFC 2833 payload formats.";
+static char pjsua_call_send_im_doc[] =
+    "int py_pjsua.call_send_im (int call_id, string mime_type, string content,"
+    "py_pjsua.Msg_Data msg_data, int user_data) "
+    "Send instant messaging inside INVITE session.";
+static char pjsua_call_send_typing_ind_doc[] =
+    "int py_pjsua.call_send_typing_ind (int call_id, int is_typing, "
+    "py_pjsua.Msg_Data msg_data) "
+    "Send IM typing indication inside INVITE session.";
+static char pjsua_call_hangup_all_doc[] =
+    "void py_pjsua.call_hangup_all () "
+    "Terminate all calls.";
+static char pjsua_call_dump_doc[] =
+    "int py_pjsua.call_dump (int call_id, int with_media, int maxlen, "
+    "string indent) "
+    "Dump call and media statistics to string.";
+
+/* END OF LIB CALL */
+
+/*
+ * Map of function names to functions
+ */
+static PyMethodDef py_pjsua_methods[] =
+{
+    {
+        "thread_register", py_pjsua_thread_register, METH_VARARGS, 
+         pjsua_thread_register_doc
+    },
+    {
+    	"perror", py_pjsua_perror, METH_VARARGS, pjsua_perror_doc
+    },
+    {
+    	"create", py_pjsua_create, METH_VARARGS, pjsua_create_doc
+    },
+    {
+    	"init", py_pjsua_init, METH_VARARGS, pjsua_init_doc
+    },
+    {
+    	"start", py_pjsua_start, METH_VARARGS, pjsua_start_doc
+    },
+    {
+    	"destroy", py_pjsua_destroy, METH_VARARGS, pjsua_destroy_doc
+    },
+    {
+    	"handle_events", py_pjsua_handle_events, METH_VARARGS,
+    	pjsua_handle_events_doc
+    },
+    {
+    	"verify_sip_url", py_pjsua_verify_sip_url, METH_VARARGS,
+    	pjsua_verify_sip_url_doc
+    },
+    {
+    	"pool_create", py_pjsua_pool_create, METH_VARARGS,
+    	pjsua_pool_create_doc
+    },
+    {
+    	"get_pjsip_endpt", py_pjsua_get_pjsip_endpt, METH_VARARGS,
+    	pjsua_get_pjsip_endpt_doc
+    },
+    {
+    	"get_pjmedia_endpt", py_pjsua_get_pjmedia_endpt, METH_VARARGS,
+    	pjsua_get_pjmedia_endpt_doc
+    },
+    {
+    	"get_pool_factory", py_pjsua_get_pool_factory, METH_VARARGS,
+    	pjsua_get_pool_factory_doc
+    },
+    {
+    	"reconfigure_logging", py_pjsua_reconfigure_logging, METH_VARARGS,
+    	pjsua_reconfigure_logging_doc
+    },
+    {
+    	"logging_config_default", py_pjsua_logging_config_default,
+    	METH_VARARGS, pjsua_logging_config_default_doc
+    },
+    {
+    	"config_default", py_pjsua_config_default, METH_VARARGS,
+    	pjsua_config_default_doc
+    },
+    {
+    	"media_config_default", py_pjsua_media_config_default, METH_VARARGS,
+    	pjsua_media_config_default_doc
+    },
+    
+    
+    {
+    	"msg_data_init", py_pjsua_msg_data_init, METH_VARARGS,
+    	pjsua_msg_data_init_doc
+    },
+    {
+        "transport_config_default", py_pjsua_transport_config_default, 
+        METH_VARARGS,pjsua_transport_config_default_doc
+    },
+    {
+        "transport_create", py_pjsua_transport_create, METH_VARARGS,
+        pjsua_transport_create_doc
+    },
+    {
+        "transport_register", py_pjsua_transport_register, METH_VARARGS,
+        pjsua_transport_register_doc
+    },
+    {
+        "transport_enum_transports", py_pjsua_enum_transports, METH_VARARGS,
+        pjsua_enum_transports_doc
+    },
+    {
+        "transport_get_info", py_pjsua_transport_get_info, METH_VARARGS,
+        pjsua_transport_get_info_doc
+    },
+    {
+        "transport_set_enable", py_pjsua_transport_set_enable, METH_VARARGS,
+        pjsua_transport_set_enable_doc
+    },
+    {
+       "transport_close", py_pjsua_transport_close, METH_VARARGS,
+        pjsua_transport_close_doc
+    },
+    {
+        "acc_config_default", py_pjsua_acc_config_default, METH_VARARGS,
+        pjsua_acc_config_default_doc
+    },
+    {
+        "acc_get_count", py_pjsua_acc_get_count, METH_VARARGS,
+        pjsua_acc_get_count_doc
+    },
+    {
+        "acc_is_valid", py_pjsua_acc_is_valid, METH_VARARGS,
+        pjsua_acc_is_valid_doc
+    },
+    {
+        "acc_set_default", py_pjsua_acc_set_default, METH_VARARGS,
+        pjsua_acc_set_default_doc
+    },
+    {
+        "acc_get_default", py_pjsua_acc_get_default, METH_VARARGS,
+        pjsua_acc_get_default_doc
+    },
+    {
+        "acc_add", py_pjsua_acc_add, METH_VARARGS,
+        pjsua_acc_add_doc
+    },
+    {
+        "acc_add_local", py_pjsua_acc_add_local, METH_VARARGS,
+        pjsua_acc_add_local_doc
+    },
+    {
+        "acc_del", py_pjsua_acc_del, METH_VARARGS,
+        pjsua_acc_del_doc
+    },
+    {
+        "acc_modify", py_pjsua_acc_modify, METH_VARARGS,
+        pjsua_acc_modify_doc
+    },
+    {
+        "acc_set_online_status", py_pjsua_acc_set_online_status, METH_VARARGS,
+        pjsua_acc_set_online_status_doc
+    },
+    {
+        "acc_set_registration", py_pjsua_acc_set_registration, METH_VARARGS,
+        pjsua_acc_set_registration_doc
+    },
+    {
+        "acc_get_info", py_pjsua_acc_get_info, METH_VARARGS,
+        pjsua_acc_get_info_doc
+    },
+    {
+        "enum_accs", py_pjsua_enum_accs, METH_VARARGS,
+        pjsua_enum_accs_doc
+    },
+    {
+        "acc_enum_info", py_pjsua_acc_enum_info, METH_VARARGS,
+        pjsua_acc_enum_info_doc
+    },
+    {
+        "acc_find_for_outgoing", py_pjsua_acc_find_for_outgoing, METH_VARARGS,
+        pjsua_acc_find_for_outgoing_doc
+    },
+    {
+        "acc_find_for_incoming", py_pjsua_acc_find_for_incoming, METH_VARARGS,
+        pjsua_acc_find_for_incoming_doc
+    },
+    {
+        "acc_create_uac_contact", py_pjsua_acc_create_uac_contact, METH_VARARGS,
+        pjsua_acc_create_uac_contact_doc
+    },
+    {
+        "acc_create_uas_contact", py_pjsua_acc_create_uas_contact, METH_VARARGS,
+        pjsua_acc_create_uas_contact_doc
+    },
+    {
+        "buddy_config_default", py_pjsua_buddy_config_default, METH_VARARGS,
+        pjsua_buddy_config_default_doc
+    },
+    {
+        "get_buddy_count", py_pjsua_get_buddy_count, METH_VARARGS,
+        pjsua_get_buddy_count_doc
+    },
+    {
+        "buddy_is_valid", py_pjsua_buddy_is_valid, METH_VARARGS,
+        pjsua_buddy_is_valid_doc
+    },
+    {
+        "enum_buddies", py_pjsua_enum_buddies, METH_VARARGS,
+        pjsua_enum_buddies_doc
+    },    
+    {
+        "buddy_get_info", py_pjsua_buddy_get_info, METH_VARARGS,
+        pjsua_buddy_get_info_doc
+    },
+    {
+        "buddy_add", py_pjsua_buddy_add, METH_VARARGS,
+        pjsua_buddy_add_doc
+    },
+    {
+        "buddy_del", py_pjsua_buddy_del, METH_VARARGS,
+        pjsua_buddy_del_doc
+    },
+    {
+        "buddy_subscribe_pres", py_pjsua_buddy_subscribe_pres, METH_VARARGS,
+        pjsua_buddy_subscribe_pres_doc
+    },
+    {
+        "pres_dump", py_pjsua_pres_dump, METH_VARARGS,
+        pjsua_pres_dump_doc
+    },
+    {
+        "im_send", py_pjsua_im_send, METH_VARARGS,
+        pjsua_im_send_doc
+    },
+    {
+        "im_typing", py_pjsua_im_typing, METH_VARARGS,
+        pjsua_im_typing_doc
+    },
+        {
+        "conf_get_max_ports", py_pjsua_conf_get_max_ports, METH_VARARGS,
+        pjsua_conf_get_max_ports_doc
+    },
+    {
+        "conf_get_active_ports", py_pjsua_conf_get_active_ports, METH_VARARGS,
+        pjsua_conf_get_active_ports_doc
+    },
+    {
+        "enum_conf_ports", py_pjsua_enum_conf_ports, METH_VARARGS,
+        pjsua_enum_conf_ports_doc
+    },
+    {
+        "conf_get_port_info", py_pjsua_conf_get_port_info, METH_VARARGS,
+        pjsua_conf_get_port_info_doc
+    },
+    {
+        "conf_add_port", py_pjsua_conf_add_port, METH_VARARGS,
+        pjsua_conf_add_port_doc
+    },
+    {
+        "conf_remove_port", py_pjsua_conf_remove_port, METH_VARARGS,
+        pjsua_conf_remove_port_doc
+    },
+    {
+        "conf_connect", py_pjsua_conf_connect, METH_VARARGS,
+        pjsua_conf_connect_doc
+    },
+    {
+        "conf_disconnect", py_pjsua_conf_disconnect, METH_VARARGS,
+        pjsua_conf_disconnect_doc
+    },
+    {
+        "player_create", py_pjsua_player_create, METH_VARARGS,
+        pjsua_player_create_doc
+    },
+    {
+        "player_get_conf_port", py_pjsua_player_get_conf_port, METH_VARARGS,
+        pjsua_player_get_conf_port_doc
+    },
+    {
+        "player_set_pos", py_pjsua_player_set_pos, METH_VARARGS,
+        pjsua_player_set_pos_doc
+    },
+    {
+        "player_destroy", py_pjsua_player_destroy, METH_VARARGS,
+        pjsua_player_destroy_doc
+    },
+    {
+        "recorder_create", py_pjsua_recorder_create, METH_VARARGS,
+        pjsua_recorder_create_doc
+    },
+    {
+        "recorder_get_conf_port", py_pjsua_recorder_get_conf_port, METH_VARARGS,
+        pjsua_recorder_get_conf_port_doc
+    },
+    {
+        "recorder_destroy", py_pjsua_recorder_destroy, METH_VARARGS,
+        pjsua_recorder_destroy_doc
+    },
+    {
+        "enum_snd_devs", py_pjsua_enum_snd_devs, METH_VARARGS,
+        pjsua_enum_snd_devs_doc
+    },
+    {
+        "get_snd_dev", py_pjsua_get_snd_dev, METH_VARARGS,
+        pjsua_get_snd_dev_doc
+    },
+    {
+        "set_snd_dev", py_pjsua_set_snd_dev, METH_VARARGS,
+        pjsua_set_snd_dev_doc
+    },
+    {
+        "set_null_snd_dev", py_pjsua_set_null_snd_dev, METH_VARARGS,
+        pjsua_set_null_snd_dev_doc
+    },
+    {
+        "set_no_snd_dev", py_pjsua_set_no_snd_dev, METH_VARARGS,
+        pjsua_set_no_snd_dev_doc
+    },
+    {
+        "set_ec", py_pjsua_set_ec, METH_VARARGS,
+        pjsua_set_ec_doc
+    },
+    {
+        "get_ec_tail", py_pjsua_get_ec_tail, METH_VARARGS,
+        pjsua_get_ec_tail_doc
+    },
+    {
+        "enum_codecs", py_pjsua_enum_codecs, METH_VARARGS,
+        pjsua_enum_codecs_doc
+    },
+    {
+        "codec_set_priority", py_pjsua_codec_set_priority, METH_VARARGS,
+        pjsua_codec_set_priority_doc
+    },
+    {
+        "codec_get_param", py_pjsua_codec_get_param, METH_VARARGS,
+        pjsua_codec_get_param_doc
+    },
+    {
+        "codec_set_param", py_pjsua_codec_set_param, METH_VARARGS,
+        pjsua_codec_set_param_doc
+    },
+    {
+        "call_get_max_count", py_pjsua_call_get_max_count, METH_VARARGS,
+        pjsua_call_get_max_count_doc
+    },
+    {
+        "call_get_count", py_pjsua_call_get_count, METH_VARARGS,
+        pjsua_call_get_count_doc
+    },
+    {
+        "enum_calls", py_pjsua_enum_calls, METH_VARARGS,
+        pjsua_enum_calls_doc
+    },
+    {
+        "call_make_call", py_pjsua_call_make_call, METH_VARARGS,
+        pjsua_call_make_call_doc
+    },
+    {
+        "call_is_active", py_pjsua_call_is_active, METH_VARARGS,
+        pjsua_call_is_active_doc
+    },
+    {
+        "call_has_media", py_pjsua_call_has_media, METH_VARARGS,
+        pjsua_call_has_media_doc
+    },
+    {
+        "call_get_conf_port", py_pjsua_call_get_conf_port, METH_VARARGS,
+        pjsua_call_get_conf_port_doc
+    },
+    {
+        "call_get_info", py_pjsua_call_get_info, METH_VARARGS,
+        pjsua_call_get_info_doc
+    },
+    {
+        "call_set_user_data", py_pjsua_call_set_user_data, METH_VARARGS,
+        pjsua_call_set_user_data_doc
+    },
+    {
+        "call_get_user_data", py_pjsua_call_get_user_data, METH_VARARGS,
+        pjsua_call_get_user_data_doc
+    },
+    {
+        "call_answer", py_pjsua_call_answer, METH_VARARGS,
+        pjsua_call_answer_doc
+    },
+    {
+        "call_hangup", py_pjsua_call_hangup, METH_VARARGS,
+        pjsua_call_hangup_doc
+    },
+    {
+        "call_set_hold", py_pjsua_call_set_hold, METH_VARARGS,
+        pjsua_call_set_hold_doc
+    },
+    {
+        "call_reinvite", py_pjsua_call_reinvite, METH_VARARGS,
+        pjsua_call_reinvite_doc
+    },
+    {
+        "call_xfer", py_pjsua_call_xfer, METH_VARARGS,
+        pjsua_call_xfer_doc
+    },
+    {
+        "call_xfer_replaces", py_pjsua_call_xfer_replaces, METH_VARARGS,
+        pjsua_call_xfer_replaces_doc
+    },
+    {
+        "call_dial_dtmf", py_pjsua_call_dial_dtmf, METH_VARARGS,
+        pjsua_call_dial_dtmf_doc
+    },
+    {
+        "call_send_im", py_pjsua_call_send_im, METH_VARARGS,
+        pjsua_call_send_im_doc
+    },
+    {
+        "call_send_typing_ind", py_pjsua_call_send_typing_ind, METH_VARARGS,
+        pjsua_call_send_typing_ind_doc
+    },
+    {
+        "call_hangup_all", py_pjsua_call_hangup_all, METH_VARARGS,
+        pjsua_call_hangup_all_doc
+    },
+    {
+        "call_dump", py_pjsua_call_dump, METH_VARARGS,
+        pjsua_call_dump_doc
+    },
+    {
+	"dump", py_pjsua_dump, METH_VARARGS, "Dump application state"
+    },
+
+    
+    {NULL, NULL} /* end of function list */
+};
+
+
+
+/*
+ * Mapping C structs from and to Python objects & initializing object
+ */
+DL_EXPORT(void)
+initpy_pjsua(void)
+{
+    PyObject* m = NULL;
+#define ADD_CONSTANT(mod,name)	PyModule_AddIntConstant(mod,#name,name)
+
+    
+    PyEval_InitThreads();
+
+    if (PyType_Ready(&callback_Type) < 0)
+        return;
+    if (PyType_Ready(&config_Type) < 0)
+        return;
+    if (PyType_Ready(&logging_config_Type) < 0)
+        return;
+    if (PyType_Ready(&msg_data_Type) < 0)
+        return;
+    media_config_Type.tp_new = PyType_GenericNew;
+    if (PyType_Ready(&media_config_Type) < 0)
+        return;
+    pjsip_event_Type.tp_new = PyType_GenericNew;
+    if (PyType_Ready(&pjsip_event_Type) < 0)
+        return;
+    pjsip_rx_data_Type.tp_new = PyType_GenericNew;
+    if (PyType_Ready(&pjsip_rx_data_Type) < 0)
+        return;
+    pj_pool_Type.tp_new = PyType_GenericNew;
+    if (PyType_Ready(&pj_pool_Type) < 0)
+        return;
+    pjsip_endpoint_Type.tp_new = PyType_GenericNew;
+    if (PyType_Ready(&pjsip_endpoint_Type) < 0)
+        return;
+    pjmedia_endpt_Type.tp_new = PyType_GenericNew;
+    if (PyType_Ready(&pjmedia_endpt_Type) < 0)
+        return;
+    pj_pool_factory_Type.tp_new = PyType_GenericNew;
+    if (PyType_Ready(&pj_pool_factory_Type) < 0)
+        return;
+    pjsip_cred_info_Type.tp_new = PyType_GenericNew;
+    if (PyType_Ready(&pjsip_cred_info_Type) < 0)
+        return;
+
+    /* LIB TRANSPORT */
+
+    if (PyType_Ready(&transport_config_Type) < 0)
+        return;
+    if (PyType_Ready(&host_port_Type) < 0)
+        return;
+    
+    if (PyType_Ready(&transport_info_Type) < 0)
+        return;
+    
+    pjsip_transport_Type.tp_new = PyType_GenericNew;
+    if (PyType_Ready(&pjsip_transport_Type) < 0)
+        return;
+
+    /* END OF LIB TRANSPORT */
+
+    /* LIB ACCOUNT */
+
+    
+    if (PyType_Ready(&acc_config_Type) < 0)
+        return;
+    if (PyType_Ready(&acc_info_Type) < 0)
+        return;
+
+    /* END OF LIB ACCOUNT */
+
+    /* LIB BUDDY */
+
+    if (PyType_Ready(&buddy_config_Type) < 0)
+        return;
+    if (PyType_Ready(&buddy_info_Type) < 0)
+        return;
+
+    /* END OF LIB BUDDY */
+
+    /* LIB MEDIA */
+  
+    if (PyType_Ready(&codec_info_Type) < 0)
+        return;
+
+    if (PyType_Ready(&conf_port_info_Type) < 0)
+        return;
+
+    pjmedia_port_Type.tp_new = PyType_GenericNew;
+    if (PyType_Ready(&pjmedia_port_Type) < 0)
+        return;
+
+    if (PyType_Ready(&pjmedia_snd_dev_info_Type) < 0)
+        return;
+
+    pjmedia_codec_param_info_Type.tp_new = PyType_GenericNew;
+    if (PyType_Ready(&pjmedia_codec_param_info_Type) < 0)
+        return;
+    pjmedia_codec_param_setting_Type.tp_new = PyType_GenericNew;
+    if (PyType_Ready(&pjmedia_codec_param_setting_Type) < 0)
+        return;
+
+    if (PyType_Ready(&pjmedia_codec_param_Type) < 0)
+        return;
+
+    /* END OF LIB MEDIA */
+
+    /* LIB CALL */
+
+    pj_time_val_Type.tp_new = PyType_GenericNew;
+    if (PyType_Ready(&pj_time_val_Type) < 0)
+        return;
+
+    if (PyType_Ready(&call_info_Type) < 0)
+        return;
+
+    /* END OF LIB CALL */
+
+    m = Py_InitModule3(
+        "py_pjsua", py_pjsua_methods,"PJSUA-lib module for python"
+    );
+
+    Py_INCREF(&callback_Type);
+    PyModule_AddObject(m, "Callback", (PyObject *)&callback_Type);
+
+    Py_INCREF(&config_Type);
+    PyModule_AddObject(m, "Config", (PyObject *)&config_Type);
+
+    Py_INCREF(&media_config_Type);
+    PyModule_AddObject(m, "Media_Config", (PyObject *)&media_config_Type);
+
+    Py_INCREF(&logging_config_Type);
+    PyModule_AddObject(m, "Logging_Config", (PyObject *)&logging_config_Type);
+
+    Py_INCREF(&msg_data_Type);
+    PyModule_AddObject(m, "Msg_Data", (PyObject *)&msg_data_Type);
+
+    Py_INCREF(&pjsip_event_Type);
+    PyModule_AddObject(m, "PJSIP_Event", (PyObject *)&pjsip_event_Type);
+
+    Py_INCREF(&pjsip_rx_data_Type);
+    PyModule_AddObject(m, "PJSIP_RX_Data", (PyObject *)&pjsip_rx_data_Type);
+
+    Py_INCREF(&pj_pool_Type);
+    PyModule_AddObject(m, "PJ_Pool", (PyObject *)&pj_pool_Type);
+
+    Py_INCREF(&pjsip_endpoint_Type);
+    PyModule_AddObject(m, "PJSIP_Endpoint", (PyObject *)&pjsip_endpoint_Type);
+
+    Py_INCREF(&pjmedia_endpt_Type);
+    PyModule_AddObject(m, "PJMedia_Endpt", (PyObject *)&pjmedia_endpt_Type);
+
+    Py_INCREF(&pj_pool_factory_Type);
+    PyModule_AddObject(
+        m, "PJ_Pool_Factory", (PyObject *)&pj_pool_factory_Type
+    );
+
+    Py_INCREF(&pjsip_cred_info_Type);
+    PyModule_AddObject(m, "PJSIP_Cred_Info",
+        (PyObject *)&pjsip_cred_info_Type
+    );
+
+    /* LIB TRANSPORT */
+
+    Py_INCREF(&transport_config_Type);
+    PyModule_AddObject
+        (m, "Transport_Config", (PyObject *)&transport_config_Type);
+    Py_INCREF(&host_port_Type);
+    PyModule_AddObject(m, "Host_Port", (PyObject *)&host_port_Type);
+    
+    Py_INCREF(&transport_info_Type);
+    PyModule_AddObject(m, "Transport_Info", (PyObject *)&transport_info_Type);
+    
+    Py_INCREF(&pjsip_transport_Type);
+    PyModule_AddObject(m, "PJSIP_Transport", (PyObject *)&pjsip_transport_Type);
+
+    /* END OF LIB TRANSPORT */
+
+    /* LIB ACCOUNT */
+
+    
+    Py_INCREF(&acc_config_Type);
+    PyModule_AddObject(m, "Acc_Config", (PyObject *)&acc_config_Type);
+    Py_INCREF(&acc_info_Type);
+    PyModule_AddObject(m, "Acc_Info", (PyObject *)&acc_info_Type);
+
+    /* END OF LIB ACCOUNT */
+
+    /* LIB BUDDY */
+    
+    Py_INCREF(&buddy_config_Type);
+    PyModule_AddObject(m, "Buddy_Config", (PyObject *)&buddy_config_Type);
+    Py_INCREF(&buddy_info_Type);
+    PyModule_AddObject(m, "Buddy_Info", (PyObject *)&buddy_info_Type);
+
+    /* END OF LIB BUDDY */
+
+    /* LIB MEDIA */
+
+    Py_INCREF(&codec_info_Type);
+    PyModule_AddObject(m, "Codec_Info", (PyObject *)&codec_info_Type);
+    Py_INCREF(&conf_port_info_Type);
+    PyModule_AddObject(m, "Conf_Port_Info", (PyObject *)&conf_port_info_Type);
+    Py_INCREF(&pjmedia_port_Type);
+    PyModule_AddObject(m, "PJMedia_Port", (PyObject *)&pjmedia_port_Type);
+    Py_INCREF(&pjmedia_snd_dev_info_Type);
+    PyModule_AddObject(m, "PJMedia_Snd_Dev_Info", 
+	(PyObject *)&pjmedia_snd_dev_info_Type);
+    Py_INCREF(&pjmedia_codec_param_info_Type);
+    PyModule_AddObject(m, "PJMedia_Codec_Param_Info", 
+	(PyObject *)&pjmedia_codec_param_info_Type);
+    Py_INCREF(&pjmedia_codec_param_setting_Type);
+    PyModule_AddObject(m, "PJMedia_Codec_Param_Setting", 
+	(PyObject *)&pjmedia_codec_param_setting_Type);
+    Py_INCREF(&pjmedia_codec_param_Type);
+    PyModule_AddObject(m, "PJMedia_Codec_Param", 
+	(PyObject *)&pjmedia_codec_param_Type);
+
+    /* END OF LIB MEDIA */
+
+    /* LIB CALL */
+
+    Py_INCREF(&pj_time_val_Type);
+    PyModule_AddObject(m, "PJ_Time_Val", (PyObject *)&pj_time_val_Type);
+
+    Py_INCREF(&call_info_Type);
+    PyModule_AddObject(m, "Call_Info", (PyObject *)&call_info_Type);
+
+    /* END OF LIB CALL */
+
+
+    /*
+     * Add various constants.
+     */
+
+    /* Call states */
+    ADD_CONSTANT(m, PJSIP_INV_STATE_NULL);
+    ADD_CONSTANT(m, PJSIP_INV_STATE_CALLING);
+    ADD_CONSTANT(m, PJSIP_INV_STATE_INCOMING);
+    ADD_CONSTANT(m, PJSIP_INV_STATE_EARLY);
+    ADD_CONSTANT(m, PJSIP_INV_STATE_CONNECTING);
+    ADD_CONSTANT(m, PJSIP_INV_STATE_CONFIRMED);
+    ADD_CONSTANT(m, PJSIP_INV_STATE_DISCONNECTED);
+
+    /* Call media status (enum pjsua_call_media_status) */
+    ADD_CONSTANT(m, PJSUA_CALL_MEDIA_NONE);
+    ADD_CONSTANT(m, PJSUA_CALL_MEDIA_ACTIVE);
+    ADD_CONSTANT(m, PJSUA_CALL_MEDIA_LOCAL_HOLD);
+    ADD_CONSTANT(m, PJSUA_CALL_MEDIA_REMOTE_HOLD);
+
+    /* Buddy status */
+    ADD_CONSTANT(m, PJSUA_BUDDY_STATUS_UNKNOWN);
+    ADD_CONSTANT(m, PJSUA_BUDDY_STATUS_ONLINE);
+    ADD_CONSTANT(m, PJSUA_BUDDY_STATUS_OFFLINE);
+
+    /* PJSIP transport types (enum pjsip_transport_type_e) */
+    ADD_CONSTANT(m, PJSIP_TRANSPORT_UNSPECIFIED);
+    ADD_CONSTANT(m, PJSIP_TRANSPORT_UDP);
+    ADD_CONSTANT(m, PJSIP_TRANSPORT_TCP);
+    ADD_CONSTANT(m, PJSIP_TRANSPORT_TLS);
+    ADD_CONSTANT(m, PJSIP_TRANSPORT_SCTP);
+    ADD_CONSTANT(m, PJSIP_TRANSPORT_LOOP);
+    ADD_CONSTANT(m, PJSIP_TRANSPORT_LOOP_DGRAM);
+
+
+    /* Invalid IDs */
+    ADD_CONSTANT(m, PJSUA_INVALID_ID);
+
+
+    /* Various compile time constants */
+    ADD_CONSTANT(m, PJSUA_ACC_MAX_PROXIES);
+    ADD_CONSTANT(m, PJSUA_MAX_ACC);
+    ADD_CONSTANT(m, PJSUA_REG_INTERVAL);
+    ADD_CONSTANT(m, PJSUA_PUBLISH_EXPIRATION);
+    ADD_CONSTANT(m, PJSUA_DEFAULT_ACC_PRIORITY);
+    ADD_CONSTANT(m, PJSUA_MAX_BUDDIES);
+    ADD_CONSTANT(m, PJSUA_MAX_CONF_PORTS);
+    ADD_CONSTANT(m, PJSUA_DEFAULT_CLOCK_RATE);
+    ADD_CONSTANT(m, PJSUA_DEFAULT_CODEC_QUALITY);
+    ADD_CONSTANT(m, PJSUA_DEFAULT_ILBC_MODE);
+    ADD_CONSTANT(m, PJSUA_DEFAULT_EC_TAIL_LEN);
+    ADD_CONSTANT(m, PJSUA_MAX_CALLS);
+    ADD_CONSTANT(m, PJSUA_XFER_NO_REQUIRE_REPLACES);
+
+
+#undef ADD_CONSTANT
+}
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/py_pjsua.def
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/py_pjsua.def	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/py_pjsua.def	(revision 1163)
@@ -0,0 +1,2 @@
+EXPORTS
+	initpy_pjsua
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/setup.py
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/setup.py	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/py_pjsua/setup.py	(revision 1163)
@@ -0,0 +1,45 @@
+from distutils.core import setup, Extension
+import os
+
+pjproject = "../../../"
+
+# Determine target
+#target = "i686-pc-linux-gnu"
+f = os.popen("grep TARGET_NAME ../../../build.mak")
+line = f.readline()
+tokens = line.split()
+found = 0
+for token in tokens:
+	if token == ":=" or token == "=":
+		found = 1
+	elif found != 0:
+		target = token
+		break
+
+print "Building py_pjsua module for " + target
+
+setup(name="py_pjsua", version="0.1",
+	ext_modules = [
+		Extension("py_pjsua", 
+			  ["py_pjsua.c"], 
+			   include_dirs=[pjproject + "pjsip/include", 
+					 pjproject + "pjlib/include", 
+					 pjproject + "pjlib-util/include", 						 pjproject + "pjmedia/include"], 
+			   library_dirs=[pjproject + "pjsip/lib", 
+					 pjproject + "pjlib/lib", 
+					 pjproject + "pjmedia/lib", 
+					 pjproject + "pjlib-util/lib"], 
+			   libraries=[	"pjsua-" + target, 
+					"pjsip-ua-" + target, 
+					"pjsip-simple-" + target, 
+					"pjsip-" + target, 
+					"pjmedia-codec-" + target, 
+					"pjmedia-" + target, 
+					"pjmedia-codec-" + target, 
+					"pjlib-util-" + target, 
+					"pj-" + target,
+					"ssl",
+					"crypto",
+					"asound"]),
+	])
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/aectest.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/aectest.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/aectest.c	(revision 1163)
@@ -0,0 +1,220 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+
+/**
+ * \page page_pjmedia_samples_aectest_c Samples: AEC Test (aectest.c)
+ *
+ * Play a file to speaker, run AEC, and record the microphone input
+ * to see if echo is coming.
+ *
+ * This file is pjsip-apps/src/samples/aectest.c
+ *
+ * \includelineno aectest.c
+ */
+#include <pjmedia.h>
+#include <pjlib-util.h>	/* pj_getopt */
+#include <pjlib.h>
+
+/* For logging purpose. */
+#define THIS_FILE   "playfile.c"
+#define PTIME	    20
+#define TAIL_LENGTH 800
+
+static const char *desc = 
+" FILE		    						    \n"
+"		    						    \n"
+"  aectest.c	    						    \n"
+"		    						    \n"
+" PURPOSE	    						    \n"
+"		    						    \n"
+"  Test the AEC effectiveness.					    \n"
+"		    						    \n"
+" USAGE		    						    \n"
+"		    						    \n"
+"  aectest INPUT.WAV OUTPUT.WAV					    \n"
+"		    						    \n"
+"  INPUT.WAV is the file to be played to the speaker.		    \n"
+"  OUTPUT.WAV is the output file containing recorded signal from the\n"
+"  microphone.";
+
+
+static void app_perror(const char *sender, const char *title, pj_status_t st)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    pj_strerror(st, errmsg, sizeof(errmsg));
+    PJ_LOG(3,(sender, "%s: %s", title, errmsg));
+}
+
+
+/*
+ * main()
+ */
+int main(int argc, char *argv[])
+{
+    pj_caching_pool cp;
+    pjmedia_endpt *med_endpt;
+    pj_pool_t	  *pool;
+    pjmedia_port  *play_port;
+    pjmedia_port  *rec_port;
+    pjmedia_port  *bidir_port;
+    pjmedia_snd_port *snd;
+    char tmp[10];
+    pj_status_t status;
+
+
+    if (argc != 3) {
+    	puts("Error: arguments required");
+	puts(desc);
+	return 1;
+    }
+
+
+    /* Must init PJLIB first: */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+
+    /* 
+     * Initialize media endpoint.
+     * This will implicitly initialize PJMEDIA too.
+     */
+    status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Create memory pool for our file player */
+    pool = pj_pool_create( &cp.factory,	    /* pool factory	    */
+			   "wav",	    /* pool name.	    */
+			   4000,	    /* init size	    */
+			   4000,	    /* increment size	    */
+			   NULL		    /* callback on error    */
+			   );
+
+    /* Create file media port from the WAV file */
+    status = pjmedia_wav_player_port_create(  pool,	/* memory pool	    */
+					      argv[1],	/* file to play	    */
+					      PTIME,	/* ptime.	    */
+					      0,	/* flags	    */
+					      0,	/* default buffer   */
+					      &play_port);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to open input WAV file", status);
+	return 1;
+    }
+
+    if (play_port->info.channel_count != 1) {
+	puts("Error: input WAV must have 1 channel audio");
+	return 1;
+    }
+    if (play_port->info.bits_per_sample != 16) {
+	puts("Error: input WAV must be encoded as 16bit PCM");
+	return 1;
+    }
+
+#ifdef PJ_DARWINOS
+    /* Need to force clock rate on MacOS */
+    if (play_port->info.clock_rate != 44100) {
+	pjmedia_port *resample_port;
+
+	status = pjmedia_resample_port_create(pool, play_port, 44100, 0,
+					      &resample_port);
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Unable to create resampling port", status);
+	    return 1;
+	}
+
+	data.play_port = resample_port;
+    }
+#endif
+
+    /* Create WAV output file port */
+    status = pjmedia_wav_writer_port_create(pool, argv[2], 
+					    play_port->info.clock_rate,
+					    play_port->info.channel_count,
+					    play_port->info.samples_per_frame,
+					    play_port->info.bits_per_sample,
+					    0, 0, &rec_port);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to open output file", status);
+	return 1;
+    }
+
+    /* Create bidirectional port from the WAV ports */
+    pjmedia_bidirectional_port_create(pool, play_port, rec_port, &bidir_port);
+
+    /* Create sound device. */
+    status = pjmedia_snd_port_create(pool, -1, -1, 
+				     play_port->info.clock_rate,
+				     play_port->info.channel_count,
+				     play_port->info.samples_per_frame,
+				     play_port->info.bits_per_sample,
+				     0, &snd);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to open sound device", status);
+	return 1;
+    }
+
+
+    /* Customize AEC */
+    pjmedia_snd_port_set_ec(snd, pool, TAIL_LENGTH, 0);
+
+    /* Connect sound to the port */
+    pjmedia_snd_port_connect(snd, bidir_port);
+
+
+    puts("");
+    printf("Playing %s and recording to %s\n", argv[1], argv[2]);
+    puts("Press <ENTER> to quit");
+
+    fgets(tmp, sizeof(tmp), stdin);
+
+    
+    /* Start deinitialization: */
+
+    /* Destroy sound device */
+    status = pjmedia_snd_port_destroy( snd );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Destroy file port(s) */
+    status = pjmedia_port_destroy( play_port );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+    status = pjmedia_port_destroy( rec_port );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Release application pool */
+    pj_pool_release( pool );
+
+    /* Destroy media endpoint. */
+    pjmedia_endpt_destroy( med_endpt );
+
+    /* Destroy pool factory */
+    pj_caching_pool_destroy( &cp );
+
+    /* Shutdown PJLIB */
+    pj_shutdown();
+
+    /* Done. */
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/confbench.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/confbench.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/confbench.c	(revision 1163)
@@ -0,0 +1,352 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+
+/**
+ * \page page_pjmedia_samples_confbench_c Samples: Benchmarking Conference Bridge
+ *
+ * Benchmarking pjmedia (conference bridge+resample). For my use only,
+ * and it only works in Win32.
+ *
+ * This file is pjsip-apps/src/samples/confbench.c
+ *
+ * \includelineno confbench.c
+ */
+
+
+#include <pjmedia.h>
+#include <pjlib-util.h>	/* pj_getopt */
+#include <pjlib.h>
+#include <stdlib.h>	/* atoi() */
+#include <stdio.h>
+#include <windows.h>
+
+/* For logging purpose. */
+#define THIS_FILE   "confsample.c"
+
+
+/* Configurable:
+ *   LARGE_SET will create in total of about 232 ports.
+ *   HAS_RESAMPLE will activate resampling on about half
+ *     the port.
+ */
+#define TEST_SET	    LARGE_SET
+#define HAS_RESAMPLE	    0
+
+
+#define SMALL_SET	    16
+#define LARGE_SET	    100
+
+
+#define PORT_COUNT	    254
+#define CLOCK_RATE	    16000
+#define SAMPLES_PER_FRAME   (CLOCK_RATE/100)
+#if HAS_RESAMPLE
+#  define SINE_CLOCK	    32000
+#else
+#  define SINE_CLOCK	    CLOCK_RATE
+#endif
+#define SINE_PTIME	    20
+#define DURATION	    10
+
+#define SINE_COUNT	    TEST_SET
+#define NULL_COUNT	    TEST_SET
+#define IDLE_COUNT	    32
+
+
+static void app_perror(const char *sender, const char *title, pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    pj_strerror(status, errmsg, sizeof(errmsg));
+    PJ_LOG(1,(sender, "%s: %s", title, errmsg));
+}
+
+
+struct Times
+{
+    FILETIME	    kernel_time;
+    ULARGE_INTEGER  u_kernel_time;
+    FILETIME	    user_time;
+    ULARGE_INTEGER  u_user_time;
+    ULARGE_INTEGER  u_total;
+};
+
+static void process(struct Times *t)
+{
+    pj_memcpy(&t->u_kernel_time, &t->kernel_time, sizeof(FILETIME));
+    pj_memcpy(&t->u_user_time, &t->user_time, sizeof(FILETIME));
+    t->u_total.QuadPart = t->u_kernel_time.QuadPart + t->u_user_time.QuadPart;
+}
+
+static void benchmark(void)
+{
+    FILETIME creation_time, exit_time;
+    struct Times start, end;
+    DWORD ts, te;
+    LARGE_INTEGER elapsed;
+    BOOL rc;
+    int i;
+    double pct;
+
+    puts("Test started!"); fflush(stdout);
+
+    ts = GetTickCount();
+    rc = GetProcessTimes(GetCurrentProcess(), &creation_time, &exit_time,
+			 &start.kernel_time, &start.user_time);
+    for (i=DURATION; i>0; --i) {
+	printf("\r%d ", i); fflush(stdout);
+	pj_thread_sleep(1000);
+    }
+    rc = GetProcessTimes(GetCurrentProcess(), &creation_time, &exit_time,
+			 &end.kernel_time, &end.user_time);
+    te = GetTickCount();
+
+    process(&start);
+    process(&end);
+
+    elapsed.QuadPart = end.u_total.QuadPart - start.u_total.QuadPart;
+
+    pct = elapsed.QuadPart * 100.0 / ((te-ts)*10000.0);
+
+    printf("CPU usage=%6.4f%%\n", pct); fflush(stdout);
+}
+
+
+
+/* Struct attached to sine generator */
+typedef struct
+{
+    pj_int16_t	*samples;	/* Sine samples.    */
+} port_data;
+
+
+/* This callback is called to feed more samples */
+static pj_status_t sine_get_frame( pjmedia_port *port, 
+				   pjmedia_frame *frame)
+{
+    port_data *sine = port->port_data.pdata;
+    pj_int16_t *samples = frame->buf;
+    unsigned i, count, left, right;
+
+    /* Get number of samples */
+    count = frame->size / 2 / port->info.channel_count;
+
+    left = 0;
+    right = 0;
+
+    for (i=0; i<count; ++i) {
+	*samples++ = sine->samples[left];
+	++left;
+
+	if (port->info.channel_count == 2) {
+	    *samples++ = sine->samples[right];
+	    right += 2; /* higher pitch so we can distinguish left and right. */
+	    if (right >= count)
+		right = 0;
+	}
+    }
+
+    /* Must set frame->type correctly, otherwise the sound device
+     * will refuse to play.
+     */
+    frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
+
+    return PJ_SUCCESS;
+}
+
+#ifndef M_PI
+#define M_PI  (3.14159265)
+#endif
+
+/*
+ * Create a media port to generate sine wave samples.
+ */
+static pj_status_t create_sine_port(pj_pool_t *pool,
+				    unsigned sampling_rate,
+				    unsigned channel_count,
+				    pjmedia_port **p_port)
+{
+    pjmedia_port *port;
+    unsigned i;
+    unsigned count;
+    port_data *sine;
+
+    PJ_ASSERT_RETURN(pool && channel_count > 0 && channel_count <= 2, 
+		     PJ_EINVAL);
+
+    port = pj_pool_zalloc(pool, sizeof(pjmedia_port));
+    PJ_ASSERT_RETURN(port != NULL, PJ_ENOMEM);
+
+    /* Fill in port info. */
+    port->info.bits_per_sample = 16;
+    port->info.channel_count = channel_count;
+    port->info.encoding_name = pj_str("pcm");
+    port->info.has_info = 1;
+    port->info.name = pj_str("sine generator");
+    port->info.need_info = 0;
+    port->info.pt = 0xFF;
+    port->info.clock_rate = sampling_rate;
+    port->info.samples_per_frame = sampling_rate * SINE_PTIME / 1000 * channel_count;
+    port->info.bytes_per_frame = port->info.samples_per_frame * 2;
+    port->info.type = PJMEDIA_TYPE_AUDIO;
+    
+    /* Set the function to feed frame */
+    port->get_frame = &sine_get_frame;
+
+    /* Create sine port data */
+    port->port_data.pdata = sine = pj_pool_zalloc(pool, sizeof(port_data));
+
+    /* Create samples */
+    count = port->info.samples_per_frame / channel_count;
+    sine->samples = pj_pool_alloc(pool, count * sizeof(pj_int16_t));
+    PJ_ASSERT_RETURN(sine->samples != NULL, PJ_ENOMEM);
+
+    /* initialise sinusoidal wavetable */
+    for( i=0; i<count; i++ )
+    {
+        sine->samples[i] = (pj_int16_t) (10000.0 * 
+		sin(((double)i/(double)count) * M_PI * 8.) );
+    }
+
+    *p_port = port;
+
+    return PJ_SUCCESS;
+}
+
+int main()
+{
+    pj_caching_pool cp;
+    pjmedia_endpt *med_endpt;
+    pj_pool_t *pool;
+    pjmedia_conf *conf;
+    int i;
+    pjmedia_port *sine_port[SINE_COUNT], *null_port, *conf_port;
+    pjmedia_port *nulls[NULL_COUNT];
+    unsigned null_slots[NULL_COUNT];
+    pjmedia_master_port *master_port;
+    pj_status_t status;
+
+
+    pj_log_set_level(3);
+
+    status = pj_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+    pool = pj_pool_create( &cp.factory,	    /* pool factory	    */
+			   "wav",	    /* pool name.	    */
+			   4000,	    /* init size	    */
+			   4000,	    /* increment size	    */
+			   NULL		    /* callback on error    */
+			   );
+
+    status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+
+    status = pjmedia_conf_create( pool,
+				  PORT_COUNT,
+				  CLOCK_RATE,
+				  1, SAMPLES_PER_FRAME, 16,
+				  PJMEDIA_CONF_NO_DEVICE,
+				  &conf);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to create conference bridge", status);
+	return 1;
+    }
+
+    printf("Resampling is %s\n", (HAS_RESAMPLE?"active":"disabled"));
+
+    /* Create Null ports */
+    printf("Creating %d null ports..\n", NULL_COUNT);
+    for (i=0; i<NULL_COUNT; ++i) {
+	status = pjmedia_null_port_create(pool, CLOCK_RATE, 1, SAMPLES_PER_FRAME*2, 16, &nulls[i]);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+	status = pjmedia_conf_add_port(conf, pool, nulls[i], NULL, &null_slots[i]);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+    }
+
+    /* Create sine ports. */
+    printf("Creating %d sine generator ports..\n", SINE_COUNT);
+    for (i=0; i<SINE_COUNT; ++i) {
+	unsigned j, slot;
+
+	/* Load the WAV file to file port. */
+	status = create_sine_port(pool, SINE_CLOCK, 1, &sine_port[i]);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+	/* Add the file port to conference bridge */
+	status = pjmedia_conf_add_port( conf,		/* The bridge	    */
+					pool,		/* pool		    */
+					sine_port[i],	/* port to connect  */
+					NULL,		/* Use port's name  */
+					&slot		/* ptr for slot #   */
+					);
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Unable to add conference port", status);
+	    return 1;
+	}
+
+	status = pjmedia_conf_connect_port(conf, slot, 0, 0);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+	for (j=0; j<NULL_COUNT; ++j) {
+	    status = pjmedia_conf_connect_port(conf, slot, null_slots[j], 0);
+	    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+	}
+    }
+
+    /* Create idle ports */
+    printf("Creating %d idle ports..\n", IDLE_COUNT);
+    for (i=0; i<IDLE_COUNT; ++i) {
+	pjmedia_port *dummy;
+	status = pjmedia_null_port_create(pool, CLOCK_RATE, 1, SAMPLES_PER_FRAME, 16, &dummy);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+	status = pjmedia_conf_add_port(conf, pool, dummy, NULL, NULL);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+    }
+
+    /* Create null port */
+    status = pjmedia_null_port_create(pool, CLOCK_RATE, 1, SAMPLES_PER_FRAME, 16,
+				      &null_port);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    conf_port = pjmedia_conf_get_master_port(conf);
+
+    /* Create master port */
+    status = pjmedia_master_port_create(pool, null_port, conf_port, 0, &master_port);
+
+
+    pjmedia_master_port_start(master_port);
+
+    puts("Waiting to settle.."); fflush(stdout);
+    pj_thread_sleep(5000);
+
+
+    benchmark();
+
+
+    /* Done. */
+    return 0;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/confsample.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/confsample.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/confsample.c	(revision 1163)
@@ -0,0 +1,606 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia.h>
+#include <pjlib-util.h>	/* pj_getopt */
+#include <pjlib.h>
+
+#include <stdlib.h>	/* atoi() */
+#include <stdio.h>
+
+#include "util.h"
+
+/**
+ * \page page_pjmedia_samples_confsample_c Samples: Using Conference Bridge
+ *
+ * Sample to mix multiple files in the conference bridge and play the
+ * result to sound device.
+ *
+ * This file is pjsip-apps/src/samples/confsample.c
+ *
+ * \includelineno confsample.c
+ */
+
+
+/* For logging purpose. */
+#define THIS_FILE   "confsample.c"
+
+
+/* Shall we put recorder in the conference */
+#define RECORDER    1
+
+
+static const char *desc = 
+ " FILE:								    \n"
+ "									    \n"
+ "  confsample.c							    \n"
+ "									    \n"
+ " PURPOSE:								    \n"
+ "									    \n"
+ "  Demonstrate how to use conference bridge.				    \n"
+ "									    \n"
+ " USAGE:								    \n"
+ "									    \n"
+ "  confsample [options] [file1.wav] [file2.wav] ...			    \n"
+ "									    \n"
+ " options:								    \n"
+ SND_USAGE
+ "									    \n"
+ "  fileN.wav are optional WAV files to be connected to the conference      \n"
+ "  bridge. The WAV files MUST have single channel (mono) and 16 bit PCM    \n"
+ "  samples. It can have arbitrary sampling rate.			    \n"
+ "									    \n"
+ " DESCRIPTION:								    \n"
+ "									    \n"
+ "  Here we create a conference bridge, with at least one port (port zero   \n"
+ "  is always created for the sound device).				    \n"
+ "									    \n"
+ "  If WAV files are specified, the WAV file player ports will be connected \n"
+ "  to slot starting from number one in the bridge. The WAV files can have  \n"
+ "  arbitrary sampling rate; the bridge will convert it to its clock rate.  \n"
+ "  However, the files MUST have a single audio channel only (i.e. mono).  \n";
+
+
+ 
+/* 
+ * Prototypes: 
+ */
+
+/* List the ports in the conference bridge */
+static void conf_list(pjmedia_conf *conf, pj_bool_t detail);
+
+/* Display VU meter */
+static void monitor_level(pjmedia_conf *conf, int slot, int dir, int dur);
+
+
+/* Show usage */
+static void usage(void)
+{
+    puts("");
+    puts(desc);
+}
+
+
+
+/* Input simple string */
+static pj_bool_t input(const char *title, char *buf, pj_size_t len)
+{
+    char *p;
+
+    printf("%s (empty to cancel): ", title); fflush(stdout);
+    fgets(buf, len, stdin);
+
+    /* Remove trailing newlines. */
+    for (p=buf; ; ++p) {
+	if (*p=='\r' || *p=='\n') *p='\0';
+	else if (!*p) break;
+    }
+
+    if (!*buf)
+	return PJ_FALSE;
+    
+    return PJ_TRUE;
+}
+
+
+/*****************************************************************************
+ * main()
+ */
+int main(int argc, char *argv[])
+{
+    int dev_id = -1;
+    int clock_rate = CLOCK_RATE;
+    int channel_count = NCHANNELS;
+    int samples_per_frame = NSAMPLES;
+    int bits_per_sample = NBITS;
+
+    pj_caching_pool cp;
+    pjmedia_endpt *med_endpt;
+    pj_pool_t *pool;
+    pjmedia_conf *conf;
+
+    int i, port_count, file_count;
+    pjmedia_port **file_port;	/* Array of file ports */
+    pjmedia_port *rec_port = NULL;  /* Wav writer port */
+
+    char tmp[10];
+    pj_status_t status;
+
+
+    /* Must init PJLIB first: */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Get command line options. */
+    if (get_snd_options(THIS_FILE, argc, argv, &dev_id, &clock_rate,
+			&channel_count, &samples_per_frame, &bits_per_sample))
+    {
+	usage();
+	return 1;
+    }
+
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+
+    /* 
+     * Initialize media endpoint.
+     * This will implicitly initialize PJMEDIA too.
+     */
+    status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Create memory pool to allocate memory */
+    pool = pj_pool_create( &cp.factory,	    /* pool factory	    */
+			   "wav",	    /* pool name.	    */
+			   4000,	    /* init size	    */
+			   4000,	    /* increment size	    */
+			   NULL		    /* callback on error    */
+			   );
+
+
+    file_count = argc - pj_optind;
+    port_count = file_count + 1 + RECORDER;
+
+    /* Create the conference bridge. 
+     * With default options (zero), the bridge will create an instance of
+     * sound capture and playback device and connect them to slot zero.
+     */
+    status = pjmedia_conf_create( pool,	    /* pool to use	    */
+				  port_count,/* number of ports	    */
+				  clock_rate,
+				  channel_count,
+				  samples_per_frame,
+				  bits_per_sample,
+				  0,	    /* options		    */
+				  &conf	    /* result		    */
+				  );
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to create conference bridge", status);
+	return 1;
+    }
+
+#if RECORDER
+    status = pjmedia_wav_writer_port_create(  pool, "confrecord.wav",
+					      clock_rate, channel_count,
+					      samples_per_frame, 
+					      bits_per_sample, 0, 0, 
+					      &rec_port);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to create WAV writer", status);
+	return 1;
+    }
+
+    pjmedia_conf_add_port(conf, pool, rec_port, NULL, NULL);
+#endif
+
+
+    /* Create file ports. */
+    file_port = pj_pool_alloc(pool, file_count * sizeof(pjmedia_port*));
+
+    for (i=0; i<file_count; ++i) {
+
+	/* Load the WAV file to file port. */
+	status = pjmedia_wav_player_port_create( 
+			pool,		    /* pool.	    */
+			argv[i+pj_optind],  /* filename	    */
+			0,		    /* use default ptime */
+			0,		    /* flags	    */
+			0,		    /* buf size	    */
+			&file_port[i]	    /* result	    */
+			);
+	if (status != PJ_SUCCESS) {
+	    char title[80];
+	    pj_ansi_sprintf(title, "Unable to use %s", argv[i+pj_optind]);
+	    app_perror(THIS_FILE, title, status);
+	    usage();
+	    return 1;
+	}
+
+	/* Add the file port to conference bridge */
+	status = pjmedia_conf_add_port( conf,		/* The bridge	    */
+					pool,		/* pool		    */
+					file_port[i],	/* port to connect  */
+					NULL,		/* Use port's name  */
+					NULL		/* ptr for slot #   */
+					);
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Unable to add conference port", status);
+	    return 1;
+	}
+    }
+
+
+    /* 
+     * All ports are set up in the conference bridge.
+     * But at this point, no media will be flowing since no ports are
+     * "connected". User must connect the port manually.
+     */
+
+
+    /* Dump memory usage */
+    dump_pool_usage(THIS_FILE, &cp);
+
+    /* Sleep to allow log messages to flush */
+    pj_thread_sleep(100);
+
+
+    /*
+     * UI Menu: 
+     */
+    for (;;) {
+	char tmp1[10];
+	char tmp2[10];
+	char *err;
+	int src, dst, level;
+
+	puts("");
+	conf_list(conf, 0);
+	puts("");
+	puts("Menu:");
+	puts("  s    Show ports details");
+	puts("  c    Connect one port to another");
+	puts("  d    Disconnect port connection");
+	puts("  t    Adjust signal level transmitted (tx) to a port");
+	puts("  r    Adjust signal level received (rx) from a port");
+	puts("  v    Display VU meter for a particular port");
+	puts("  q    Quit");
+	puts("");
+	
+	printf("Enter selection: "); fflush(stdout);
+
+	fgets(tmp, sizeof(tmp), stdin);
+
+	switch (tmp[0]) {
+	case 's':
+	    puts("");
+	    conf_list(conf, 1);
+	    break;
+
+	case 'c':
+	    puts("");
+	    puts("Connect source port to destination port");
+	    if (!input("Enter source port number", tmp1, sizeof(tmp1)) )
+		continue;
+	    src = strtol(tmp1, &err, 10);
+	    if (*err || src < 0 || src >= port_count) {
+		puts("Invalid slot number");
+		continue;
+	    }
+
+	    if (!input("Enter destination port number", tmp2, sizeof(tmp2)) )
+		continue;
+	    dst = strtol(tmp2, &err, 10);
+	    if (*err || dst < 0 || dst >= port_count) {
+		puts("Invalid slot number");
+		continue;
+	    }
+
+	    status = pjmedia_conf_connect_port(conf, src, dst, 0);
+	    if (status != PJ_SUCCESS)
+		app_perror(THIS_FILE, "Error connecting port", status);
+	    
+	    break;
+
+	case 'd':
+	    puts("");
+	    puts("Disconnect port connection");
+	    if (!input("Enter source port number", tmp1, sizeof(tmp1)) )
+		continue;
+	    src = strtol(tmp1, &err, 10);
+	    if (*err || src < 0 || src >= port_count) {
+		puts("Invalid slot number");
+		continue;
+	    }
+
+	    if (!input("Enter destination port number", tmp2, sizeof(tmp2)) )
+		continue;
+	    dst = strtol(tmp2, &err, 10);
+	    if (*err || dst < 0 || dst >= port_count) {
+		puts("Invalid slot number");
+		continue;
+	    }
+
+	    status = pjmedia_conf_disconnect_port(conf, src, dst);
+	    if (status != PJ_SUCCESS)
+		app_perror(THIS_FILE, "Error connecting port", status);
+	    
+
+	    break;
+
+	case 't':
+	    puts("");
+	    puts("Adjust transmit level of a port");
+	    if (!input("Enter port number", tmp1, sizeof(tmp1)) )
+		continue;
+	    src = strtol(tmp1, &err, 10);
+	    if (*err || src < 0 || src >= port_count) {
+		puts("Invalid slot number");
+		continue;
+	    }
+
+	    if (!input("Enter level (-128 to >127, 0 for normal)", 
+			      tmp2, sizeof(tmp2)) )
+		continue;
+	    level = strtol(tmp2, &err, 10);
+	    if (*err || level < -128) {
+		puts("Invalid level");
+		continue;
+	    }
+
+	    status = pjmedia_conf_adjust_tx_level( conf, src, level);
+	    if (status != PJ_SUCCESS)
+		app_perror(THIS_FILE, "Error adjusting level", status);
+	    break;
+
+
+	case 'r':
+	    puts("");
+	    puts("Adjust receive level of a port");
+	    if (!input("Enter port number", tmp1, sizeof(tmp1)) )
+		continue;
+	    src = strtol(tmp1, &err, 10);
+	    if (*err || src < 0 || src >= port_count) {
+		puts("Invalid slot number");
+		continue;
+	    }
+
+	    if (!input("Enter level (-128 to >127, 0 for normal)", 
+			      tmp2, sizeof(tmp2)) )
+		continue;
+	    level = strtol(tmp2, &err, 10);
+	    if (*err || level < -128) {
+		puts("Invalid level");
+		continue;
+	    }
+
+	    status = pjmedia_conf_adjust_rx_level( conf, src, level);
+	    if (status != PJ_SUCCESS)
+		app_perror(THIS_FILE, "Error adjusting level", status);
+	    break;
+
+	case 'v':
+	    puts("");
+	    puts("Display VU meter");
+	    if (!input("Enter port number to monitor", tmp1, sizeof(tmp1)) )
+		continue;
+	    src = strtol(tmp1, &err, 10);
+	    if (*err || src < 0 || src >= port_count) {
+		puts("Invalid slot number");
+		continue;
+	    }
+
+	    if (!input("Enter r for rx level or t for tx level", tmp2, sizeof(tmp2)))
+		continue;
+	    if (tmp2[0] != 'r' && tmp2[0] != 't') {
+		puts("Invalid option");
+		continue;
+	    }
+
+	    if (!input("Duration to monitor (in seconds)", tmp1, sizeof(tmp1)) )
+		continue;
+	    strtol(tmp1, &err, 10);
+	    if (*err) {
+		puts("Invalid duration number");
+		continue;
+	    }
+
+	    monitor_level(conf, src, tmp2[0], strtol(tmp1, &err, 10));
+	    break;
+
+	case 'q':
+	    goto on_quit;
+
+	default:
+	    printf("Invalid input character '%c'\n", tmp[0]);
+	    break;
+	}
+    }
+
+on_quit:
+    
+    /* Start deinitialization: */
+
+    /* Destroy conference bridge */
+    status = pjmedia_conf_destroy( conf );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Destroy file ports */
+    for (i=0; i<file_count; ++i) {
+	status = pjmedia_port_destroy( file_port[i]);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+    }
+
+    /* Destroy recorder port */
+    if (rec_port)
+	pjmedia_port_destroy(rec_port);
+
+    /* Release application pool */
+    pj_pool_release( pool );
+
+    /* Destroy media endpoint. */
+    pjmedia_endpt_destroy( med_endpt );
+
+    /* Destroy pool factory */
+    pj_caching_pool_destroy( &cp );
+
+    /* Shutdown PJLIB */
+    pj_shutdown();
+
+    /* Done. */
+    return 0;
+}
+
+
+/*
+ * List the ports in conference bridge
+ */
+static void conf_list(pjmedia_conf *conf, int detail)
+{
+    enum { MAX_PORTS = 32 };
+    unsigned i, count;
+    pjmedia_conf_port_info info[MAX_PORTS];
+
+    printf("Conference ports:\n");
+
+    count = PJ_ARRAY_SIZE(info);
+    pjmedia_conf_get_ports_info(conf, &count, info);
+
+    for (i=0; i<count; ++i) {
+	char txlist[4*MAX_PORTS];
+	unsigned j;
+	pjmedia_conf_port_info *port_info = &info[i];	
+	
+	txlist[0] = '\0';
+	for (j=0; j<port_info->listener_cnt; ++j) {
+	    char s[10];
+	    pj_ansi_sprintf(s, "#%d ", port_info->listener_slots[j]);
+	    pj_ansi_strcat(txlist, s);
+
+	}
+
+	if (txlist[0] == '\0') {
+	    txlist[0] = '-';
+	    txlist[1] = '\0';
+	}
+
+	if (!detail) {
+	    printf("Port #%02d %-25.*s  transmitting to: %s\n", 
+		   port_info->slot, 
+		   (int)port_info->name.slen, 
+		   port_info->name.ptr,
+		   txlist);
+	} else {
+	    unsigned tx_level, rx_level;
+
+	    pjmedia_conf_get_signal_level(conf, port_info->slot,
+					  &tx_level, &rx_level);
+
+	    printf("Port #%02d:\n"
+		   "  Name                    : %.*s\n"
+		   "  Sampling rate           : %d Hz\n"
+		   "  Samples per frame       : %d\n"
+		   "  Frame time              : %d ms\n"
+		   "  Signal level adjustment : tx=%d, rx=%d\n"
+		   "  Current signal level    : tx=%u, rx=%u\n"
+		   "  Transmitting to ports   : %s\n\n",
+		   port_info->slot,
+		   (int)port_info->name.slen,
+		   port_info->name.ptr,
+		   port_info->clock_rate,
+		   port_info->samples_per_frame,
+		   port_info->samples_per_frame*1000/port_info->clock_rate,
+		   port_info->tx_adj_level,
+		   port_info->rx_adj_level,
+		   tx_level,
+		   rx_level,
+		   txlist);
+	}
+
+    }
+    puts("");
+}
+
+
+/*
+ * Display VU meter
+ */
+static void monitor_level(pjmedia_conf *conf, int slot, int dir, int dur)
+{
+    enum { SLEEP = 20, SAMP_CNT = 2};
+    pj_status_t status;
+    int i, total_count;
+    unsigned level, samp_cnt;
+
+
+    puts("");
+    printf("Displaying VU meter for port %d for about %d seconds\n",
+	   slot, dur);
+
+    total_count = dur * 1000 / SLEEP;
+
+    level = 0;
+    samp_cnt = 0;
+
+    for (i=0; i<total_count; ++i) {
+	unsigned tx_level, rx_level;
+	int j, length;
+	char meter[21];
+
+	/* Poll the volume every 20 msec */
+	status = pjmedia_conf_get_signal_level(conf, slot, 
+					       &tx_level, &rx_level);
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Unable to read level", status);
+	    return;
+	}
+
+	level += (dir=='r' ? rx_level : tx_level);
+	++samp_cnt;
+
+	/* Accumulate until we have enough samples */
+	if (samp_cnt < SAMP_CNT) {
+	    pj_thread_sleep(SLEEP);
+	    continue;
+	}
+
+	/* Get average */
+	level = level / samp_cnt;
+
+	/* Draw bar */
+	length = 20 * level / 255;
+	for (j=0; j<length; ++j)
+	    meter[j] = '#';
+	for (; j<20; ++j)
+	    meter[j] = ' ';
+	meter[20] = '\0';
+
+	printf("Port #%02d %cx level: [%s] %d  \r",
+	       slot, dir, meter, level);
+
+	/* Next.. */
+	samp_cnt = 0;
+	level = 0;
+
+	pj_thread_sleep(SLEEP);
+    }
+
+    puts("");
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/debug.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/debug.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/debug.c	(revision 1163)
@@ -0,0 +1,30 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/*
+ * PURPOSE:
+ *   The purpose of this file is to allow debugging of a sample application
+ *   using MSVC IDE.
+ */
+
+/* To debug a sample application, include the source file here.
+ * E.g.:
+ *  #include "playfile.c"
+ */
+#include "aectest.c"
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/footprint.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/footprint.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/footprint.c	(revision 1163)
@@ -0,0 +1,589 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/**
+ * The purpose of this file is to show the typical footprint of
+ * the application when various PJSIP/PJMEDIA components are used.
+ *
+ * This file will not be build as samples, but instead it is build
+ * by get-footprint.py Python script in pjsip-apps/build directory.
+ */
+
+#include <pjsip_ua.h>
+#include <pjsip_simple.h>
+#include <pjsip.h>
+#include <pjmedia.h>
+#include <pjmedia-codec.h>
+#include <pjlib-util.h>
+#include <pjlib.h>
+#include <stdlib.h>
+
+/* All flags: */
+#if 0
+#define HAS_PJLIB
+
+#define HAS_PJLIB_STUN
+#define HAS_PJLIB_GETOPT
+#define HAS_PJLIB_XML
+#define HAS_PJLIB_SCANNER
+#define HAS_PJLIB_DNS
+#define HAS_PJLIB_RESOLVER
+
+#define HAS_PJSIP_CORE_MSG_ELEM
+#define HAS_PJSIP_CORE
+#define HAS_PJSIP_CORE_MSG_UTIL
+
+#define HAS_PJSIP_UDP_TRANSPORT
+#define HAS_PJSIP_TCP_TRANSPORT
+#define HAS_PJSIP_TRANSACTION
+#define HAS_PJSIP_UA_LAYER
+#define HAS_PJMEDIA_SDP
+#define HAS_PJMEDIA_SDP_NEGOTIATOR
+#define HAS_PJSIP_AUTH_CLIENT
+#define HAS_PJSIP_INV_SESSION
+#define HAS_PJSIP_REGC
+#define HAS_PJSIP_EVENT_FRAMEWORK
+#define HAS_PJSIP_CALL_TRANSFER
+#define HAS_PJSIP_PRESENCE
+#define HAS_PJSIP_IS_COMPOSING
+
+#define HAS_PJMEDIA
+#define HAS_PJMEDIA_SND_DEV
+#define HAS_PJMEDIA_EC
+#define HAS_PJMEDIA_SND_PORT
+#define HAS_PJMEDIA_RESAMPLE
+#define HAS_PJMEDIA_SILENCE_DET
+#define HAS_PJMEDIA_PLC
+#define HAS_PJMEDIA_CONFERENCE
+#define HAS_PJMEDIA_MASTER_PORT
+#define HAS_PJMEDIA_RTP
+#define HAS_PJMEDIA_RTCP
+#define HAS_PJMEDIA_JBUF
+#define HAS_PJMEDIA_STREAM
+#define HAS_PJMEDIA_TONEGEN
+#define HAS_PJMEDIA_UDP_TRANSPORT
+#define HAS_PJMEDIA_FILE_PLAYER
+#define HAS_PJMEDIA_FILE_CAPTURE
+#define HAS_PJMEDIA_MEM_PLAYER
+#define HAS_PJMEDIA_MEM_CAPTURE
+
+#define HAS_PJMEDIA_G711_CODEC
+#define HAS_PJMEDIA_GSM_CODEC
+#define HAS_PJMEDIA_SPEEX_CODEC
+#define HAS_PJMEDIA_ILBC_CODEC
+#endif
+
+
+int dummy_function()
+{
+    pj_caching_pool cp;
+ 
+    sprintf(NULL, "%d", 0);
+    rand();
+    
+#ifdef HAS_PJLIB
+    pj_init();
+    pj_caching_pool_init(&cp, NULL, 0);
+    pj_array_erase(NULL, 0, 0, 0);
+    pj_create_unique_string(NULL, NULL);
+    pj_hash_create(NULL, 0);
+    pj_hash_get(NULL, NULL, 0, NULL);
+    pj_hash_set(NULL, NULL, NULL, 0, 0, NULL);
+    pj_ioqueue_create(NULL, 0, NULL);
+    pj_ioqueue_register_sock(NULL, NULL, 0, NULL, NULL, NULL);
+    pj_pool_alloc(NULL, 0);
+    pj_timer_heap_create(NULL, 0, NULL);
+#endif
+
+#ifdef HAS_PJLIB_STUN
+    pj_stun_get_mapped_addr(&cp.factory, 0, NULL, NULL, 80, NULL, 80, NULL);
+#endif
+
+#ifdef HAS_PJLIB_GETOPT
+    pj_getopt_long(0, NULL, NULL, NULL, NULL);
+#endif
+    
+#ifdef HAS_PJLIB_XML
+    pj_xml_parse(NULL, NULL, 100);
+    pj_xml_print(NULL, NULL, 10, PJ_FALSE);
+    pj_xml_clone(NULL, NULL);
+    pj_xml_node_new(NULL, NULL);
+    pj_xml_attr_new(NULL, NULL, NULL);
+    pj_xml_add_node(NULL, NULL);
+    pj_xml_add_attr(NULL, NULL);
+    pj_xml_find_node(NULL, NULL);
+    pj_xml_find_next_node(NULL, NULL, NULL);
+    pj_xml_find_attr(NULL, NULL, NULL);
+    pj_xml_find(NULL, NULL, NULL, NULL);
+#endif
+
+#ifdef HAS_PJLIB_SCANNER
+    pj_cis_buf_init(NULL);
+    pj_cis_init(NULL, NULL);
+    pj_cis_dup(NULL, NULL);
+    pj_cis_add_alpha(NULL);
+    pj_cis_add_str(NULL, NULL);
+
+    pj_scan_init(NULL, NULL, 0, 0, NULL);
+    pj_scan_fini(NULL);
+    pj_scan_peek(NULL, NULL, NULL);
+    pj_scan_peek_n(NULL, 0, NULL);
+    pj_scan_peek_until(NULL, NULL, NULL);
+    pj_scan_get(NULL, NULL, NULL);
+    pj_scan_get_unescape(NULL, NULL, NULL);
+    pj_scan_get_quote(NULL, 0, 0, NULL);
+    pj_scan_get_n(NULL, 0, NULL);
+    pj_scan_get_char(NULL);
+    pj_scan_get_until(NULL, NULL, NULL);
+    pj_scan_strcmp(NULL, NULL, 0);
+    pj_scan_stricmp(NULL, NULL, 0);
+    pj_scan_stricmp_alnum(NULL, NULL, 0);
+    pj_scan_get_newline(NULL);
+    pj_scan_restore_state(NULL, NULL);
+#endif
+
+#ifdef HAS_PJLIB_DNS
+    pj_dns_make_query(NULL, NULL, 0, 0, NULL);
+    pj_dns_parse_packet(NULL, NULL, 0, NULL);
+    pj_dns_packet_dup(NULL, NULL, NULL);
+#endif
+
+#ifdef HAS_PJLIB_RESOLVER
+    pj_dns_resolver_create(NULL, NULL, 0, NULL, NULL, NULL);
+    pj_dns_resolver_set_ns(NULL, 0, NULL, NULL);
+    pj_dns_resolver_handle_events(NULL, NULL);
+    pj_dns_resolver_destroy(NULL, 0);
+    pj_dns_resolver_start_query(NULL, NULL, 0, 0, NULL, NULL, NULL);
+    pj_dns_resolver_cancel_query(NULL, 0);
+    pj_dns_resolver_add_entry(NULL, NULL, 0);
+#endif
+
+#ifdef HAS_PJSIP_CORE_MSG_ELEM
+    /* Parameter container */
+    pjsip_param_find(NULL, NULL);
+    pjsip_param_print_on(NULL, NULL, 0, NULL, NULL, 0);
+
+    /* SIP URI */
+    pjsip_sip_uri_create(NULL, 0);
+    pjsip_name_addr_create(NULL);
+
+    /* TEL URI */
+    pjsip_tel_uri_create(NULL);
+
+    /* Message and headers */
+    pjsip_msg_create(NULL, PJSIP_REQUEST_MSG);
+    pjsip_msg_print(NULL, NULL, 0);
+    pjsip_accept_hdr_create(NULL);
+    pjsip_allow_hdr_create(NULL);
+    pjsip_cid_hdr_create(NULL);
+    pjsip_clen_hdr_create(NULL);
+    pjsip_cseq_hdr_create(NULL);
+    pjsip_contact_hdr_create(NULL);
+    pjsip_ctype_hdr_create(NULL);
+    pjsip_expires_hdr_create(NULL, 0);
+    pjsip_from_hdr_create(NULL);
+    pjsip_max_fwd_hdr_create(NULL, 0);
+    pjsip_min_expires_hdr_create(NULL, 0);
+    pjsip_rr_hdr_create(NULL);
+    pjsip_require_hdr_create(NULL);
+    pjsip_retry_after_hdr_create(NULL, 0);
+    pjsip_supported_hdr_create(NULL);
+    pjsip_unsupported_hdr_create(NULL);
+    pjsip_via_hdr_create(NULL);
+    pjsip_warning_hdr_create(NULL, 0, NULL, NULL);
+
+    pjsip_parse_uri(NULL, NULL, 0, 0);
+    pjsip_parse_msg(NULL, NULL, 0, NULL);
+    pjsip_parse_rdata(NULL, 0, NULL);
+    pjsip_find_msg(NULL, 0, 0, NULL);
+#endif
+
+#ifdef HAS_PJSIP_CORE
+    pjsip_endpt_create(NULL, NULL, NULL);
+
+    pjsip_tpmgr_create(NULL, NULL, NULL, NULL, NULL);
+    pjsip_tpmgr_destroy(NULL);
+    pjsip_transport_send(NULL, NULL, NULL, 0, NULL, NULL);
+
+
+#endif
+
+#ifdef HAS_PJSIP_CORE_MSG_UTIL
+    pjsip_endpt_create_request(NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+			       -1, NULL, NULL);
+    pjsip_endpt_create_request_from_hdr(NULL, NULL, NULL, NULL, NULL, NULL,
+					NULL, -1, NULL, NULL);
+    pjsip_endpt_create_response(NULL, NULL, -1, NULL, NULL);
+    pjsip_endpt_create_ack(NULL, NULL, NULL, NULL);
+    pjsip_endpt_create_cancel(NULL, NULL, NULL);
+    pjsip_get_request_addr(NULL, NULL);
+    pjsip_endpt_send_request_stateless(NULL, NULL, NULL, NULL);
+    pjsip_get_response_addr(NULL, NULL, NULL);
+    pjsip_endpt_send_response(NULL, NULL, NULL, NULL, NULL);
+    pjsip_endpt_respond_stateless(NULL, NULL, -1, NULL, NULL, NULL);
+#endif
+
+#ifdef HAS_PJSIP_UDP_TRANSPORT
+    pjsip_udp_transport_start(NULL, NULL, NULL, 1, NULL);
+#endif
+
+#ifdef HAS_PJSIP_TCP_TRANSPORT
+    pjsip_tcp_transport_start(NULL, NULL, 1, NULL);
+#endif
+
+#ifdef HAS_PJSIP_TRANSACTION
+    pjsip_tsx_layer_init_module(NULL);
+
+    pjsip_tsx_layer_destroy();
+    pjsip_tsx_create_uac(NULL, NULL, NULL);
+    pjsip_tsx_create_uas(NULL, NULL, NULL);
+    pjsip_tsx_recv_msg(NULL, NULL);
+    pjsip_tsx_send_msg(NULL, NULL);
+    pjsip_tsx_terminate(NULL, 200);
+
+    pjsip_endpt_send_request(NULL, NULL, -1, NULL, NULL);
+    pjsip_endpt_respond(NULL, NULL, NULL, -1, NULL, NULL, NULL, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_SDP
+    pjmedia_sdp_parse(NULL, NULL, 1024, NULL);
+    pjmedia_sdp_print(NULL, NULL, 1024);
+    pjmedia_sdp_validate(NULL);
+    pjmedia_sdp_session_clone(NULL, NULL);
+    pjmedia_sdp_session_cmp(NULL, NULL, 0);
+    pjmedia_sdp_attr_to_rtpmap(NULL, NULL, NULL);
+    pjmedia_sdp_attr_get_fmtp(NULL, NULL);
+    pjmedia_sdp_attr_get_rtcp(NULL, NULL);
+    pjmedia_sdp_conn_clone(NULL, NULL);
+    pjmedia_sdp_media_clone(NULL, NULL);
+    pjmedia_sdp_media_find_attr(NULL, NULL, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_SDP_NEGOTIATOR
+    pjmedia_sdp_neg_create_w_local_offer(NULL, NULL, NULL);
+    pjmedia_sdp_neg_create_w_remote_offer(NULL, NULL, NULL, NULL);
+    pjmedia_sdp_neg_get_state(NULL);
+    pjmedia_sdp_neg_negotiate(NULL, NULL, PJ_FALSE);
+#endif
+
+#ifdef HAS_PJSIP_UA_LAYER
+    pjsip_ua_init_module(NULL, NULL);
+    pjsip_ua_destroy();
+    pjsip_dlg_create_uac(NULL, NULL, NULL, NULL, NULL, NULL);
+    pjsip_dlg_create_uas(NULL, NULL, NULL, NULL);
+    pjsip_dlg_terminate(NULL);
+    pjsip_dlg_set_route_set(NULL, NULL);
+    pjsip_dlg_create_request(NULL, NULL, -1, NULL);
+    pjsip_dlg_send_request(NULL, NULL, -1, NULL);
+    pjsip_dlg_create_response(NULL, NULL, -1, NULL, NULL);
+    pjsip_dlg_modify_response(NULL, NULL, -1, NULL);
+    pjsip_dlg_send_response(NULL, NULL, NULL);
+    pjsip_dlg_respond(NULL, NULL, -1, NULL, NULL, NULL);
+#endif
+
+#ifdef HAS_PJSIP_AUTH_CLIENT
+    pjsip_auth_clt_init(NULL, NULL, NULL, 0);
+    pjsip_auth_clt_clone(NULL, NULL, NULL);
+    pjsip_auth_clt_set_credentials(NULL, 0, NULL);
+    pjsip_auth_clt_init_req(NULL, NULL);
+    pjsip_auth_clt_reinit_req(NULL, NULL, NULL, NULL);
+#endif
+
+#ifdef HAS_PJSIP_INV_SESSION
+    pjsip_inv_usage_init(NULL, NULL);
+    pjsip_inv_create_uac(NULL, NULL, 0, NULL);
+    pjsip_inv_verify_request(NULL, NULL, NULL, NULL, NULL, NULL);
+    pjsip_inv_create_uas(NULL, NULL, NULL, 0, NULL);
+    pjsip_inv_terminate(NULL, 200, PJ_FALSE);
+    pjsip_inv_invite(NULL, NULL);
+    pjsip_inv_initial_answer(NULL, NULL, 200, NULL, NULL, NULL);
+    pjsip_inv_answer(NULL, 200, NULL, NULL, NULL);
+    pjsip_inv_end_session(NULL, 200, NULL, NULL);
+    pjsip_inv_reinvite(NULL, NULL, NULL, NULL);
+    pjsip_inv_update(NULL, NULL, NULL, NULL);
+    pjsip_inv_send_msg(NULL, NULL);
+    pjsip_dlg_get_inv_session(NULL);
+    //pjsip_tsx_get_inv_session(NULL);
+    pjsip_inv_state_name(PJSIP_INV_STATE_NULL);
+#endif
+
+#ifdef HAS_PJSIP_REGC
+    //pjsip_regc_get_module();
+    pjsip_regc_create(NULL, NULL, NULL, NULL);
+    pjsip_regc_destroy(NULL);
+    pjsip_regc_get_info(NULL, NULL);
+    pjsip_regc_get_pool(NULL);
+    pjsip_regc_init(NULL, NULL, NULL, NULL, 0, NULL, 600);
+    pjsip_regc_set_credentials(NULL, 1, NULL);
+    pjsip_regc_set_route_set(NULL, NULL);
+    pjsip_regc_register(NULL, PJ_TRUE, NULL);
+    pjsip_regc_unregister(NULL, NULL);
+    pjsip_regc_update_contact(NULL, 10, NULL);
+    pjsip_regc_update_expires(NULL, 600);
+    pjsip_regc_send(NULL, NULL);
+#endif
+
+#ifdef HAS_PJSIP_EVENT_FRAMEWORK
+    pjsip_evsub_init_module(NULL);
+    pjsip_evsub_instance();
+    pjsip_evsub_register_pkg(NULL, NULL, 30, 10, NULL);
+    pjsip_evsub_create_uac(NULL, NULL, NULL, 10, NULL);
+    pjsip_evsub_create_uas(NULL, NULL, NULL, 10, NULL);
+    pjsip_evsub_terminate(NULL, PJ_FALSE);
+    pjsip_evsub_get_state(NULL);
+    pjsip_evsub_get_state_name(NULL);
+    pjsip_evsub_initiate(NULL, NULL, -1, NULL);
+    pjsip_evsub_accept(NULL, NULL, 200, NULL);
+    pjsip_evsub_notify(NULL, PJSIP_EVSUB_STATE_ACTIVE, NULL, NULL, NULL);
+    pjsip_evsub_current_notify(NULL, NULL);
+    pjsip_evsub_send_request(NULL, NULL);
+    pjsip_tsx_get_evsub(NULL);
+    pjsip_evsub_set_mod_data(NULL, 1, NULL);
+    pjsip_evsub_get_mod_data(NULL, 1);
+#endif
+
+#ifdef HAS_PJSIP_CALL_TRANSFER
+    pjsip_xfer_init_module(NULL);
+    pjsip_xfer_create_uac(NULL, NULL, NULL);
+    pjsip_xfer_create_uas(NULL, NULL, NULL, NULL);
+    pjsip_xfer_initiate(NULL, NULL, NULL);
+    pjsip_xfer_accept(NULL, NULL, 200, NULL);
+    pjsip_xfer_notify(NULL, PJSIP_EVSUB_STATE_ACTIVE, 200, NULL, NULL);
+    pjsip_xfer_current_notify(NULL, NULL);
+    pjsip_xfer_send_request(NULL, NULL);
+#endif
+
+#ifdef HAS_PJSIP_PRESENCE
+    pjsip_pres_init_module(NULL, NULL);
+    pjsip_pres_instance();
+    pjsip_pres_create_uac(NULL, NULL, 0, NULL);
+    pjsip_pres_create_uas(NULL, NULL, NULL, NULL);
+    pjsip_pres_terminate(NULL, PJ_FALSE);
+    pjsip_pres_initiate(NULL, 100, NULL);
+    pjsip_pres_accept(NULL, NULL, 200, NULL);
+    pjsip_pres_notify(NULL, PJSIP_EVSUB_STATE_ACTIVE, NULL, NULL, NULL);
+    pjsip_pres_current_notify(NULL, NULL);
+    pjsip_pres_send_request(NULL, NULL);
+    pjsip_pres_get_status(NULL, NULL);
+    pjsip_pres_set_status(NULL, NULL);
+#endif
+
+#ifdef HAS_PJSIP_IS_COMPOSING
+    pjsip_iscomposing_create_xml(NULL, PJ_TRUE, NULL, NULL, 0);
+    pjsip_iscomposing_create_body(NULL, PJ_TRUE, NULL, NULL, 0);
+    pjsip_iscomposing_parse(NULL, NULL, 0, NULL, NULL, NULL, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA
+    pjmedia_endpt_create(NULL, NULL, 1, NULL);
+    pjmedia_endpt_destroy(NULL);
+    pjmedia_endpt_create_sdp(NULL, NULL, 1, NULL, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_EC
+    pjmedia_echo_create(NULL, 0, 0, 0, 0, 0, NULL);
+    pjmedia_echo_destroy(NULL);
+    pjmedia_echo_playback(NULL, NULL);
+    pjmedia_echo_capture(NULL, NULL, 0);
+    pjmedia_echo_cancel(NULL, NULL, NULL, 0, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_SND_DEV
+    pjmedia_snd_init(NULL);
+    pjmedia_snd_get_dev_count();
+    pjmedia_snd_get_dev_info(0);
+    pjmedia_snd_open(-1, -1, 8000, 1, 80, 16, NULL, NULL, NULL, NULL);
+    pjmedia_snd_open_rec(-1, 8000, 1, 160, 16, NULL, NULL, NULL);
+    pjmedia_snd_open_player(-1, 8000, 1, 160, 16, NULL, NULL, NULL);
+    pjmedia_snd_stream_start(NULL);
+    pjmedia_snd_stream_stop(NULL);
+    pjmedia_snd_stream_close(NULL);
+    pjmedia_snd_deinit();
+#endif
+
+#ifdef HAS_PJMEDIA_SND_PORT
+    pjmedia_snd_port_create(NULL, -1, -1, 8000, 1, 180, 16, 0, NULL);
+    pjmedia_snd_port_create_rec(NULL, -1, 8000, 1, 160, 16, 0, NULL);
+    pjmedia_snd_port_create_player(NULL, -1, 8000, 1, 160, 16, 0, NULL);
+    pjmedia_snd_port_destroy(NULL);
+    pjmedia_snd_port_get_snd_stream(NULL);
+    pjmedia_snd_port_connect(NULL, NULL);
+    pjmedia_snd_port_get_port(NULL);
+    pjmedia_snd_port_disconnect(NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_RESAMPLE
+    pjmedia_resample_create(NULL, PJ_TRUE, PJ_TRUE, 0, 0, 0, NULL);
+    pjmedia_resample_run(NULL, NULL, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_SILENCE_DET
+    pjmedia_silence_det_create(NULL, 8000, 80, NULL);
+    pjmedia_silence_det_detect(NULL, NULL, 0, NULL);
+    pjmedia_silence_det_apply(NULL, 0);
+#endif
+
+#ifdef HAS_PJMEDIA_PLC
+    pjmedia_plc_create(NULL, 8000, 80, 0, NULL);
+    pjmedia_plc_save(NULL, NULL);
+    pjmedia_plc_generate(NULL, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_CONFERENCE
+    pjmedia_conf_create(NULL, 10, 8000, 1, 160, 16, 0, NULL);
+    pjmedia_conf_destroy(NULL);
+    pjmedia_conf_get_master_port(NULL);
+    pjmedia_conf_add_port(NULL, NULL, NULL, NULL, NULL);
+    pjmedia_conf_configure_port(NULL, 1, 0, 0);
+    pjmedia_conf_connect_port(NULL, 0, 0, 0);
+    pjmedia_conf_disconnect_port(NULL, 0, 0);
+    pjmedia_conf_remove_port(NULL, 0);
+    pjmedia_conf_enum_ports(NULL, NULL, NULL);
+    pjmedia_conf_get_port_info(NULL, 0, NULL);
+    pjmedia_conf_get_ports_info(NULL, NULL, NULL);
+    pjmedia_conf_get_signal_level(NULL, 0, NULL, NULL);
+    pjmedia_conf_adjust_rx_level(NULL, 0, 0);
+    pjmedia_conf_adjust_tx_level(NULL, 0, 0);
+#endif
+
+#ifdef HAS_PJMEDIA_MASTER_PORT
+    pjmedia_master_port_create(NULL, NULL, NULL, 0, NULL);
+    pjmedia_master_port_start(NULL);
+    pjmedia_master_port_stop(NULL);
+    pjmedia_master_port_set_uport(NULL, NULL);
+    pjmedia_master_port_get_uport(NULL);
+    pjmedia_master_port_set_dport(NULL, NULL);
+    pjmedia_master_port_get_dport(NULL);
+    pjmedia_master_port_destroy(NULL, PJ_FALSE);
+#endif
+
+#ifdef HAS_PJMEDIA_RTP
+    pjmedia_rtp_session_init(NULL, 0, 0);
+    pjmedia_rtp_encode_rtp(NULL, 0, 0, 0, 0, NULL, NULL);
+    pjmedia_rtp_decode_rtp(NULL, NULL, 0, NULL, NULL, NULL);
+    pjmedia_rtp_session_update(NULL, NULL, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_RTCP
+    pjmedia_rtcp_init(NULL, NULL, 0, 0, 0);
+    pjmedia_rtcp_get_ntp_time(NULL, NULL);
+    pjmedia_rtcp_fini(NULL);
+    pjmedia_rtcp_rx_rtp(NULL, 0, 0, 0);
+    pjmedia_rtcp_tx_rtp(NULL, 0);
+    pjmedia_rtcp_rx_rtcp(NULL, NULL, 0);
+    pjmedia_rtcp_build_rtcp(NULL, NULL, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_JBUF
+    pjmedia_jbuf_create(NULL, NULL, 0, 0, 0, NULL);
+    pjmedia_jbuf_set_fixed(NULL, 0);
+    pjmedia_jbuf_set_adaptive(NULL, 0, 0, 0);
+    pjmedia_jbuf_destroy(NULL);
+    pjmedia_jbuf_put_frame(NULL, NULL, 0, 0);
+    pjmedia_jbuf_get_frame(NULL, NULL, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_STREAM
+    pjmedia_stream_create(NULL, NULL, NULL, NULL, NULL, NULL);
+    pjmedia_stream_destroy(NULL);
+    pjmedia_stream_get_port(NULL, NULL);
+    pjmedia_stream_get_transport(NULL);
+    pjmedia_stream_start(NULL);
+    pjmedia_stream_get_stat(NULL, NULL);
+    pjmedia_stream_pause(NULL, PJMEDIA_DIR_ENCODING);
+    pjmedia_stream_resume(NULL, PJMEDIA_DIR_ENCODING);
+    pjmedia_stream_dial_dtmf(NULL, NULL);
+    pjmedia_stream_check_dtmf(NULL);
+    pjmedia_stream_get_dtmf(NULL, NULL, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_TONEGEN
+    pjmedia_tonegen_create(NULL, 0, 0, 0, 0, 0, NULL);
+    pjmedia_tonegen_is_busy(NULL);
+    pjmedia_tonegen_stop(NULL);
+    pjmedia_tonegen_play(NULL, 0, NULL, 0);
+    pjmedia_tonegen_play_digits(NULL, 0, NULL, 0);
+    pjmedia_tonegen_get_digit_map(NULL, NULL);
+    pjmedia_tonegen_set_digit_map(NULL, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_UDP_TRANSPORT
+    pjmedia_transport_udp_create(NULL, NULL, 0, 0, NULL);
+    pjmedia_transport_udp_close(NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_FILE_PLAYER
+    pjmedia_wav_player_port_create(NULL, NULL, 0, 0, 0, NULL);
+    pjmedia_wav_player_port_set_pos(NULL, 0);
+    pjmedia_wav_player_port_get_pos(NULL);
+    pjmedia_wav_player_set_eof_cb(NULL, NULL, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_FILE_CAPTURE
+    pjmedia_wav_writer_port_create(NULL, NULL, 8000, 1, 80, 16, 0, 0, NULL);
+    pjmedia_wav_writer_port_get_pos(NULL);
+    pjmedia_wav_writer_port_set_cb(NULL, 0, NULL, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_MEM_PLAYER
+    pjmedia_mem_player_create(NULL, NULL, 1000, 8000, 1, 80, 16, 0, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_MEM_CAPTURE
+    pjmedia_mem_capture_create(NULL, NULL, 1000, 8000, 1, 80, 16, 0, NULL);
+#endif
+
+#ifdef HAS_PJMEDIA_G711_CODEC
+    pjmedia_codec_g711_init(NULL);
+    pjmedia_codec_g711_deinit();
+#endif
+
+#ifdef HAS_PJMEDIA_GSM_CODEC
+    pjmedia_codec_gsm_init(NULL);
+    pjmedia_codec_gsm_deinit();
+#endif
+
+#ifdef HAS_PJMEDIA_SPEEX_CODEC
+    pjmedia_codec_speex_init(NULL, 0, 0, 0);
+    pjmedia_codec_speex_deinit();
+#endif
+
+#ifdef HAS_PJMEDIA_ILBC_CODEC
+    pjmedia_codec_ilbc_init(NULL, 0);
+    pjmedia_codec_ilbc_deinit();
+#endif
+
+    return 0;
+}
+
+
+int test_main()
+{
+    return dummy_function();
+}
+
+#if defined(PJ_RTEMS) && PJ_RTEMS!=0
+#  include "../../pjlib/src/pjlib-test/main_rtems.c"
+#else
+int main()
+{
+  return test_main();
+}
+#endif
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/level.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/level.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/level.c	(revision 1163)
@@ -0,0 +1,165 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+
+/**
+ * \page page_pjmedia_samples_level_c Samples: Reading from WAV File
+ *
+ * This is a very simple example to use the @ref PJMEDIA_FILE_PLAY, to
+ * directly read the samples from the file.
+ *
+ * This file is pjsip-apps/src/samples/level.c
+ *
+ * \includelineno level.c
+ */
+
+
+static const char *desc = 
+ " FILE:								    \n"
+ "  level.c								    \n"
+ "									    \n"
+ " PURPOSE:								    \n"
+ "  Read PCM WAV file and display the audio level the first 100 frames.     \n"
+ "  Each frame is assumed to have 160 samples.				    \n"
+ "									    \n"
+ " USAGE:								    \n"
+ "  level file.wav							    \n"
+ "									    \n"
+ "  The WAV file SHOULD have a 16bit mono samples.			    ";
+
+#include <pjmedia.h>
+#include <pjlib.h>
+
+#include <stdio.h>
+
+/* For logging purpose. */
+#define THIS_FILE   "level.c"
+
+
+/* Util to display the error message for the specified error code  */
+static int app_perror( const char *sender, const char *title, 
+		       pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    PJ_UNUSED_ARG(sender);
+
+    pj_strerror(status, errmsg, sizeof(errmsg));
+
+    printf("%s: %s [code=%d]\n", title, errmsg, status);
+    return 1;
+}
+
+
+/*
+ * main()
+ */
+int main(int argc, char *argv[])
+{
+    enum { NSAMPLES = 160, COUNT=100 };
+    pj_caching_pool cp;
+    pjmedia_endpt *med_endpt;
+    pj_pool_t *pool;
+    pjmedia_port *file_port;
+    int i;
+    pj_status_t status;
+
+
+    /* Verify cmd line arguments. */
+    if (argc != 2) {
+	puts("");
+	puts(desc);
+	return 1;
+    }
+
+    /* Must init PJLIB first: */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+
+    /* 
+     * Initialize media endpoint.
+     * This will implicitly initialize PJMEDIA too.
+     */
+    status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Create memory pool for our file player */
+    pool = pj_pool_create( &cp.factory,	    /* pool factory	    */
+			   "wav",	    /* pool name.	    */
+			   4000,	    /* init size	    */
+			   4000,	    /* increment size	    */
+			   NULL		    /* callback on error    */
+			   );
+
+    /* Create file media port from the WAV file */
+    status = pjmedia_wav_player_port_create(  pool,	/* memory pool	    */
+					      argv[1],	/* file to play	    */
+					      0,	/* use default ptime*/
+					      0,	/* flags	    */
+					      0,	/* default buffer   */
+					      &file_port/* returned port    */
+					      );
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to use WAV file", status);
+	return 1;
+    }
+
+    for (i=0; i<COUNT; ++i) {
+	pj_int16_t framebuf[NSAMPLES];
+	pjmedia_frame frm;
+	pj_int32_t level32;
+	int level;
+
+	frm.buf = framebuf;
+	frm.size = sizeof(framebuf);
+	
+	pjmedia_port_get_frame(file_port, &frm);
+
+	level32 = pjmedia_calc_avg_signal( framebuf, NSAMPLES );
+	level = pjmedia_linear2ulaw(level32) ^ 0xFF;
+
+	printf("%d ", level);
+    }
+    puts("");
+    
+
+    /* Destroy file port */
+    status = pjmedia_port_destroy( file_port );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Release application pool */
+    pj_pool_release( pool );
+
+    /* Destroy media endpoint. */
+    pjmedia_endpt_destroy( med_endpt );
+
+    /* Destroy pool factory */
+    pj_caching_pool_destroy( &cp );
+
+    /* Shutdown PJLIB */
+    pj_shutdown();
+
+
+    /* Done. */
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/main_rtems.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/main_rtems.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/main_rtems.c	(revision 1163)
@@ -0,0 +1,12 @@
+
+/* 
+ *  !! OIY OIY !!
+ *
+ *  The purpose of this file is only to get the executable linked. I haven't
+ *  actually tried to run this on RTEMS!!
+ *
+ */
+
+#include "../../pjlib/src/pjlib-test/main_rtems.c"
+
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/pjsip-perf.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/pjsip-perf.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/pjsip-perf.c	(revision 1163)
@@ -0,0 +1,1855 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+
+/**
+ * \page page_pjsip_perf_c Samples: SIP Performance Benchmark
+ *
+ * <b>pjsip-perf</b> is a complete program to measure the
+ * performance of PJSIP or other SIP endpoints. It consists of two
+ * parts:
+ *  - the server, to respond incoming requests, and
+ *  - the client, who actively submits requests and measure the
+ *     performance of the server.
+ *
+ * Both server and client part can run simultaneously, to measure the
+ * performance when both endpoints are co-located in a single program.
+ * 
+ * The server accepts both INVITE and non-INVITE requests.
+ * The server exports several different types of URL, which would
+ * control how the request would be handled by the server:
+ *  - URL with "0" as the user part will be handled statelessly.
+ *    It should not be used with INVITE method.
+ *  - URL with "1" as the user part will be handled statefully.
+ *    If the request is an INVITE request, INVITE transaction will
+ *    be created and 200/OK response will be sent, along with a valid
+ *    SDP body. However, the SDP is just a static text body, and
+ *    is not a proper SDP generated by PJMEDIA.
+ *  - URL with "2" as the user part is only meaningful for INVITE
+ *    requests, as it would be handled <b>call-statefully</b> by the
+ *    server. For this URL, the server also would generate SDP dynamically
+ *    and perform a proper SDP negotiation for the incoming call.
+ *    Also for every call, server will limit the call duration to
+ *    10 seconds, on which the call will be terminated if the client
+ *    doesn't hangup the call.
+ *    
+ *
+ *
+ * This file is pjsip-apps/src/samples/pjsip-perf.c
+ *
+ * \includelineno pjsip-perf.c
+ */
+
+/* Include all headers. */
+#include <pjsip.h>
+#include <pjmedia.h>
+#include <pjmedia-codec.h>
+#include <pjsip_ua.h>
+#include <pjsip_simple.h>
+#include <pjlib-util.h>
+#include <pjlib.h>
+#include <stdio.h>
+
+#if defined(PJ_WIN32) && PJ_WIN32!=0
+#  include <windows.h>
+#endif
+
+#define THIS_FILE	    "pjsip-perf.c"
+#define DEFAULT_COUNT	    (PJSIP_MAX_TSX_COUNT/2>10000?10000:PJSIP_MAX_TSX_COUNT/2)
+#define JOB_WINDOW	    1000
+#define TERMINATE_TSX(x,c)
+
+
+#ifndef CACHING_POOL_SIZE
+#   define CACHING_POOL_SIZE   (256*1024*1024)
+#endif
+
+
+/* Static message body for INVITE, when stateful processing is
+ * invoked (instead of call-stateful, where SDP is generated
+ * dynamically.
+ */
+static pj_str_t dummy_sdp_str = 
+{
+    "v=0\r\n"
+    "o=- 3360842071 3360842071 IN IP4 192.168.0.68\r\n"
+    "s=pjmedia\r\n"
+    "c=IN IP4 192.168.0.68\r\n"
+    "t=0 0\r\n"
+    "m=audio 4000 RTP/AVP 0 8 3 103 102 101\r\n"
+    "a=rtcp:4001 IN IP4 192.168.0.68\r\n"
+    "a=rtpmap:103 speex/16000\r\n"
+    "a=rtpmap:102 speex/8000\r\n"
+    "a=rtpmap:3 GSM/8000\r\n"
+    "a=rtpmap:0 PCMU/8000\r\n"
+    "a=rtpmap:8 PCMA/8000\r\n"
+    "a=sendrecv\r\n"
+    "a=rtpmap:101 telephone-event/8000\r\n"
+    "a=fmtp:101 0-15\r\n",
+    0
+};
+
+static pj_str_t mime_application = { "application", 11};
+static pj_str_t mime_sdp = {"sdp", 3};
+
+
+struct srv_state
+{
+    unsigned	    stateless_cnt;
+    unsigned	    stateful_cnt;
+    unsigned	    call_cnt;
+};
+
+
+struct app
+{
+    pj_caching_pool	 cp;
+    pj_pool_t		*pool;
+    pj_bool_t		 use_tcp;
+    pj_str_t		 local_addr;
+    int			 local_port;
+    pjsip_endpoint	*sip_endpt;
+    pjmedia_endpt	*med_endpt;
+    pj_str_t		 local_uri;
+    pj_str_t		 local_contact;
+    unsigned		 skinfo_cnt;
+    pjmedia_sock_info	 skinfo[8];
+
+    pj_bool_t		 thread_quit;
+    unsigned		 thread_count;
+    pj_thread_t		*thread[16];
+
+    pj_bool_t		 real_sdp;
+    pjmedia_sdp_session *dummy_sdp;
+
+    int			 log_level;
+
+    struct {
+	pjsip_method	     method;
+	pj_str_t	     dst_uri;
+	pj_bool_t	     stateless;
+	unsigned	     timeout;
+	unsigned	     job_count,
+			     job_submitted, 
+			     job_finished,
+			     job_window;
+	unsigned	     stat_max_window;
+	pj_time_val	     first_request;
+	pj_time_val	     requests_sent;
+	pj_time_val	     last_completion;
+	unsigned	     total_responses;
+	unsigned	     response_codes[800];
+    } client;
+
+    struct {
+	pj_bool_t send_trying;
+	pj_bool_t send_ringing;
+	unsigned delay;
+	struct srv_state prev_state;
+	struct srv_state cur_state;
+    } server;
+
+
+} app;
+
+struct call
+{
+    pjsip_inv_session	*inv;
+    pj_timer_entry	 ans_timer;
+};
+
+
+static void app_perror(const char *sender, const char *title, 
+		       pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    pj_strerror(status, errmsg, sizeof(errmsg));
+    PJ_LOG(1,(sender, "%s: %s [code=%d]", title, errmsg, status));
+}
+
+
+/**************************************************************************
+ * STATELESS SERVER
+ */
+static pj_bool_t mod_stateless_on_rx_request(pjsip_rx_data *rdata);
+
+/* Module to handle incoming requests statelessly.
+ */
+static pjsip_module mod_stateless_server =
+{
+    NULL, NULL,			    /* prev, next.		*/
+    { "mod-stateless-server", 20 }, /* Name.			*/
+    -1,				    /* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION, /* Priority			*/
+    NULL,			    /* load()			*/
+    NULL,			    /* start()			*/
+    NULL,			    /* stop()			*/
+    NULL,			    /* unload()			*/
+    &mod_stateless_on_rx_request,   /* on_rx_request()		*/
+    NULL,			    /* on_rx_response()		*/
+    NULL,			    /* on_tx_request.		*/
+    NULL,			    /* on_tx_response()		*/
+    NULL,			    /* on_tsx_state()		*/
+};
+
+
+static pj_bool_t mod_stateless_on_rx_request(pjsip_rx_data *rdata)
+{
+    const pj_str_t stateless_user = { "0", 1 };
+    pjsip_uri *uri;
+    pjsip_sip_uri *sip_uri;
+
+    uri = pjsip_uri_get_uri(rdata->msg_info.msg->line.req.uri);
+
+    /* Only want to receive SIP scheme */
+    if (!PJSIP_URI_SCHEME_IS_SIP(uri))
+	return PJ_FALSE;
+
+    sip_uri = (pjsip_sip_uri*) uri;
+
+    /* Check for matching user part */
+    if (pj_strcmp(&sip_uri->user, &stateless_user)!=0)
+	return PJ_FALSE;
+
+    /*
+     * Yes, this is for us.
+     */
+
+    /* Ignore ACK request */
+    if (rdata->msg_info.msg->line.req.method.id == PJSIP_ACK_METHOD)
+	return PJ_TRUE;
+
+    /*
+     * Respond statelessly with 200/OK.
+     */
+    pjsip_endpt_respond_stateless(app.sip_endpt, rdata, 200, NULL,
+				  NULL, NULL);
+    app.server.cur_state.stateless_cnt++;
+    return PJ_TRUE;
+}
+
+
+/**************************************************************************
+ * STATEFUL SERVER
+ */
+static pj_bool_t mod_stateful_on_rx_request(pjsip_rx_data *rdata);
+
+/* Module to handle incoming requests statefully.
+ */
+static pjsip_module mod_stateful_server =
+{
+    NULL, NULL,			    /* prev, next.		*/
+    { "mod-stateful-server", 19 },  /* Name.			*/
+    -1,				    /* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION, /* Priority			*/
+    NULL,			    /* load()			*/
+    NULL,			    /* start()			*/
+    NULL,			    /* stop()			*/
+    NULL,			    /* unload()			*/
+    &mod_stateful_on_rx_request,   /* on_rx_request()		*/
+    NULL,			    /* on_rx_response()		*/
+    NULL,			    /* on_tx_request.		*/
+    NULL,			    /* on_tx_response()		*/
+    NULL,			    /* on_tsx_state()		*/
+};
+
+
+static pj_bool_t mod_stateful_on_rx_request(pjsip_rx_data *rdata)
+{
+    const pj_str_t stateful_user = { "1", 1 };
+    pjsip_uri *uri;
+    pjsip_sip_uri *sip_uri;
+
+    uri = pjsip_uri_get_uri(rdata->msg_info.msg->line.req.uri);
+
+    /* Only want to receive SIP scheme */
+    if (!PJSIP_URI_SCHEME_IS_SIP(uri))
+	return PJ_FALSE;
+
+    sip_uri = (pjsip_sip_uri*) uri;
+
+    /* Check for matching user part */
+    if (pj_strcmp(&sip_uri->user, &stateful_user)!=0)
+	return PJ_FALSE;
+
+    /*
+     * Yes, this is for us.
+     * Respond statefully with 200/OK.
+     */
+    switch (rdata->msg_info.msg->line.req.method.id) {
+    case PJSIP_INVITE_METHOD:
+	{
+	    pjsip_msg_body *body;
+
+	    if (dummy_sdp_str.slen == 0)
+		dummy_sdp_str.slen = pj_ansi_strlen(dummy_sdp_str.ptr);
+
+	    body = pjsip_msg_body_create(rdata->tp_info.pool, 
+					 &mime_application, &mime_sdp, 
+					 &dummy_sdp_str);
+	    pjsip_endpt_respond(app.sip_endpt, &mod_stateful_server, rdata,
+				200, NULL, NULL, body, NULL);
+	}
+	break;
+    case PJSIP_ACK_METHOD:
+	return PJ_TRUE;
+    default:
+	pjsip_endpt_respond(app.sip_endpt, &mod_stateful_server, rdata,
+			    200, NULL, NULL, NULL, NULL);
+	break;
+    }
+
+    app.server.cur_state.stateful_cnt++;
+    return PJ_TRUE;
+}
+
+
+/**************************************************************************
+ * CALL SERVER
+ */
+static pj_bool_t mod_call_on_rx_request(pjsip_rx_data *rdata);
+
+/* Module to handle incoming requests callly.
+ */
+static pjsip_module mod_call_server =
+{
+    NULL, NULL,			    /* prev, next.		*/
+    { "mod-call-server", 15 },	    /* Name.			*/
+    -1,				    /* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION, /* Priority			*/
+    NULL,			    /* load()			*/
+    NULL,			    /* start()			*/
+    NULL,			    /* stop()			*/
+    NULL,			    /* unload()			*/
+    &mod_call_on_rx_request,	    /* on_rx_request()		*/
+    NULL,			    /* on_rx_response()		*/
+    NULL,			    /* on_tx_request.		*/
+    NULL,			    /* on_tx_response()		*/
+    NULL,			    /* on_tsx_state()		*/
+};
+
+
+static pj_status_t send_response(pjsip_inv_session *inv, 
+				 pjsip_rx_data *rdata,
+				 int code,
+				 pj_bool_t *has_initial)
+{
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    if (*has_initial) {
+	status = pjsip_inv_answer(inv, code, NULL, NULL, &tdata);
+    } else {
+	status = pjsip_inv_initial_answer(inv, rdata, code, 
+					  NULL, NULL, &tdata);
+    }
+
+    if (status != PJ_SUCCESS) {
+	if (*has_initial) {
+	    status = pjsip_inv_answer(inv, PJSIP_SC_NOT_ACCEPTABLE, 
+				      NULL, NULL, &tdata);
+	} else {
+	    status = pjsip_inv_initial_answer(inv, rdata, 
+					      PJSIP_SC_NOT_ACCEPTABLE,
+					      NULL, NULL, &tdata);
+	}
+
+	if (status == PJ_SUCCESS) {
+	    *has_initial = PJ_TRUE;
+	    pjsip_inv_send_msg(inv, tdata); 
+	} else {
+	    pjsip_inv_terminate(inv, 500, PJ_FALSE);
+	    return -1;
+	}
+    } else {
+	*has_initial = PJ_TRUE;
+
+	status = pjsip_inv_send_msg(inv, tdata); 
+	if (status != PJ_SUCCESS) {
+	    pjsip_tx_data_dec_ref(tdata);
+	    return status;
+	}
+    }
+
+    return status;
+}
+
+static void answer_timer_cb(pj_timer_heap_t *h, pj_timer_entry *entry)
+{
+    struct call *call = entry->user_data;
+    pj_bool_t has_initial = PJ_TRUE;
+
+    PJ_UNUSED_ARG(h);
+
+    entry->id = 0;
+    send_response(call->inv, NULL, 200, &has_initial);
+}
+
+static pj_bool_t mod_call_on_rx_request(pjsip_rx_data *rdata)
+{
+    const pj_str_t call_user = { "2", 1 };
+    pjsip_uri *uri;
+    pjsip_sip_uri *sip_uri;
+    struct call *call;
+    pjsip_dialog *dlg;
+    pjmedia_sdp_session *sdp;
+    pjsip_tx_data *tdata;
+    pj_bool_t has_initial = PJ_FALSE;
+    pj_status_t status;
+
+    uri = pjsip_uri_get_uri(rdata->msg_info.msg->line.req.uri);
+
+    /* Only want to receive SIP scheme */
+    if (!PJSIP_URI_SCHEME_IS_SIP(uri))
+	return PJ_FALSE;
+
+    sip_uri = (pjsip_sip_uri*) uri;
+
+    /* Only want to handle INVITE requests. */
+    if (rdata->msg_info.msg->line.req.method.id != PJSIP_INVITE_METHOD) {
+	return PJ_FALSE;
+    }
+
+
+    /* Check for matching user part. Incoming requests will be handled 
+     * call-statefully if:
+     *	- user part is "2", or
+     *  - user part is not "0" nor "1" and method is INVITE.
+     */
+    if (pj_strcmp(&sip_uri->user, &call_user) == 0 ||
+	sip_uri->user.slen != 1 ||
+	(*sip_uri->user.ptr != '0' && *sip_uri->user.ptr != '1'))
+    {
+	/* Match */
+
+    } else {
+	return PJ_FALSE;
+    }
+
+
+    /* Verify that we can handle the request. */
+    if (app.real_sdp) {
+	unsigned options = 0;
+	status = pjsip_inv_verify_request(rdata, &options, NULL, NULL,
+					  app.sip_endpt, &tdata);
+	if (status != PJ_SUCCESS) {
+
+	    /*
+	     * No we can't handle the incoming INVITE request.
+	     */
+
+	    if (tdata) {
+		pjsip_response_addr res_addr;
+
+		pjsip_get_response_addr(tdata->pool, rdata, &res_addr);
+		pjsip_endpt_send_response(app.sip_endpt, &res_addr, tdata, 
+					  NULL, NULL);
+
+	    } else {
+
+		/* Respond with 500 (Internal Server Error) */
+		pjsip_endpt_respond_stateless(app.sip_endpt, rdata, 500, NULL,
+					      NULL, NULL);
+	    }
+
+	    return PJ_TRUE;
+	} 
+    }
+
+    /* Create UAS dialog */
+    status = pjsip_dlg_create_uas( pjsip_ua_instance(), rdata,
+				   &app.local_contact, &dlg);
+    if (status != PJ_SUCCESS) {
+	const pj_str_t reason = pj_str("Unable to create dialog");
+	pjsip_endpt_respond_stateless( app.sip_endpt, rdata, 
+				       500, &reason,
+				       NULL, NULL);
+	return PJ_TRUE;
+    }
+
+    /* Alloc call structure. */
+    call = pj_pool_zalloc(dlg->pool, sizeof(struct call));
+
+    /* Create SDP from PJMEDIA */
+    if (app.real_sdp) {
+	status = pjmedia_endpt_create_sdp(app.med_endpt, rdata->tp_info.pool, 
+					  app.skinfo_cnt, app.skinfo, 
+					  &sdp);
+    } else {
+	sdp = app.dummy_sdp;
+    }
+
+    /* Create UAS invite session */
+    status = pjsip_inv_create_uas( dlg, rdata, sdp, 0, &call->inv);
+    if (status != PJ_SUCCESS) {
+	pjsip_dlg_create_response(dlg, rdata, 500, NULL, &tdata);
+	pjsip_dlg_send_response(dlg, pjsip_rdata_get_tsx(rdata), tdata);
+	return PJ_TRUE;
+    }
+    
+    /* Send 100/Trying if needed */
+    if (app.server.send_trying) {
+	status = send_response(call->inv, rdata, 100, &has_initial);
+	if (status != PJ_SUCCESS)
+	    return PJ_TRUE;
+    }
+
+    /* Send 180/Ringing if needed */
+    if (app.server.send_ringing) {
+	status = send_response(call->inv, rdata, 180, &has_initial);
+	if (status != PJ_SUCCESS)
+	    return PJ_TRUE;
+    }
+
+    /* Simulate call processing delay */
+    if (app.server.delay) {
+	pj_time_val delay;
+
+	call->ans_timer.id = 1;
+	call->ans_timer.user_data = call;
+	call->ans_timer.cb = &answer_timer_cb;
+	
+	delay.sec = 0;
+	delay.msec = app.server.delay;
+	pj_time_val_normalize(&delay);
+
+	pjsip_endpt_schedule_timer(app.sip_endpt, &call->ans_timer, &delay);
+
+    } else {
+	/* Send the 200 response immediately . */  
+	status = send_response(call->inv, rdata, 200, &has_initial);
+	PJ_ASSERT_ON_FAIL(status == PJ_SUCCESS, return PJ_TRUE);
+    }
+
+    /* Done */
+    app.server.cur_state.call_cnt++;
+
+    return PJ_TRUE;
+}
+
+
+
+/**************************************************************************
+ * Default handler when incoming request is not handled by any other
+ * modules.
+ */
+static pj_bool_t mod_responder_on_rx_request(pjsip_rx_data *rdata);
+
+/* Module to handle incoming requests statelessly.
+ */
+static pjsip_module mod_responder =
+{
+    NULL, NULL,			    /* prev, next.		*/
+    { "mod-responder", 13 },	    /* Name.			*/
+    -1,				    /* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION+1, /* Priority		*/
+    NULL,			    /* load()			*/
+    NULL,			    /* start()			*/
+    NULL,			    /* stop()			*/
+    NULL,			    /* unload()			*/
+    &mod_responder_on_rx_request,   /* on_rx_request()		*/
+    NULL,			    /* on_rx_response()		*/
+    NULL,			    /* on_tx_request.		*/
+    NULL,			    /* on_tx_response()		*/
+    NULL,			    /* on_tsx_state()		*/
+};
+
+
+static pj_bool_t mod_responder_on_rx_request(pjsip_rx_data *rdata)
+{
+    const pj_str_t reason = pj_str("Not expecting request at this URI");
+
+    /*
+     * Respond any requests (except ACK!) with 500.
+     */
+    if (rdata->msg_info.msg->line.req.method.id != PJSIP_ACK_METHOD) {
+	pjsip_endpt_respond_stateless(app.sip_endpt, rdata, 500, &reason,
+				      NULL, NULL);
+    }
+
+    return PJ_TRUE;
+}
+
+
+
+/*****************************************************************************
+ * Below is a simple module to log all incoming and outgoing SIP messages
+ */
+
+
+/* Notification on incoming messages */
+static pj_bool_t logger_on_rx_msg(pjsip_rx_data *rdata)
+{
+    PJ_LOG(3,(THIS_FILE, "RX %d bytes %s from %s %s:%d:\n"
+			 "%.*s\n"
+			 "--end msg--",
+			 rdata->msg_info.len,
+			 pjsip_rx_data_get_info(rdata),
+			 rdata->tp_info.transport->type_name,
+			 rdata->pkt_info.src_name,
+			 rdata->pkt_info.src_port,
+			 (int)rdata->msg_info.len,
+			 rdata->msg_info.msg_buf));
+    
+    /* Always return false, otherwise messages will not get processed! */
+    return PJ_FALSE;
+}
+
+/* Notification on outgoing messages */
+static pj_status_t logger_on_tx_msg(pjsip_tx_data *tdata)
+{
+    
+    /* Important note:
+     *	tp_info field is only valid after outgoing messages has passed
+     *	transport layer. So don't try to access tp_info when the module
+     *	has lower priority than transport layer.
+     */
+
+    PJ_LOG(3,(THIS_FILE, "TX %d bytes %s to %s %s:%d:\n"
+			 "%.*s\n"
+			 "--end msg--",
+			 (tdata->buf.cur - tdata->buf.start),
+			 pjsip_tx_data_get_info(tdata),
+			 tdata->tp_info.transport->type_name,
+			 tdata->tp_info.dst_name,
+			 tdata->tp_info.dst_port,
+			 (int)(tdata->buf.cur - tdata->buf.start),
+			 tdata->buf.start));
+
+    /* Always return success, otherwise message will not get sent! */
+    return PJ_SUCCESS;
+}
+
+/* The module instance. */
+static pjsip_module msg_logger = 
+{
+    NULL, NULL,				/* prev, next.		*/
+    { "mod-siprtp-log", 14 },		/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_TRANSPORT_LAYER-1,/* Priority	        */
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    &logger_on_rx_msg,			/* on_rx_request()	*/
+    &logger_on_rx_msg,			/* on_rx_response()	*/
+    &logger_on_tx_msg,			/* on_tx_request.	*/
+    &logger_on_tx_msg,			/* on_tx_response()	*/
+    NULL,				/* on_tsx_state()	*/
+
+};
+
+
+
+/**************************************************************************
+ * Test Client.
+ */
+
+static pj_bool_t mod_test_on_rx_response(pjsip_rx_data *rdata);
+
+static void call_on_media_update( pjsip_inv_session *inv,
+				  pj_status_t status);
+static void call_on_state_changed( pjsip_inv_session *inv, 
+				   pjsip_event *e);
+static void call_on_forked(pjsip_inv_session *inv, pjsip_event *e);
+
+
+/* Module to handle incoming requests callly.
+ */
+static pjsip_module mod_test =
+{
+    NULL, NULL,			    /* prev, next.		*/
+    { "mod-test", 8 },		    /* Name.			*/
+    -1,				    /* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION, /* Priority			*/
+    NULL,			    /* load()			*/
+    NULL,			    /* start()			*/
+    NULL,			    /* stop()			*/
+    NULL,			    /* unload()			*/
+    NULL,			    /* on_rx_request()		*/
+    &mod_test_on_rx_response,	    /* on_rx_response()		*/
+    NULL,			    /* on_tx_request.		*/
+    NULL,			    /* on_tx_response()		*/
+    NULL,			    /* on_tsx_state()		*/
+};
+
+
+static void report_completion(int status_code)
+{
+    app.client.job_finished++;
+    if (status_code >= 200 && status_code < 800)
+	app.client.response_codes[status_code]++;
+    app.client.total_responses++;
+    pj_gettimeofday(&app.client.last_completion);
+}
+
+
+/* Handler when response is received. */
+static pj_bool_t mod_test_on_rx_response(pjsip_rx_data *rdata)
+{
+    if (pjsip_rdata_get_tsx(rdata) == NULL) {
+	report_completion(rdata->msg_info.msg->line.status.code);
+    }
+
+    return PJ_TRUE;
+}
+
+
+/*
+ * Create app
+ */
+static pj_status_t create_app(void)
+{
+    pj_status_t status;
+
+    status = pj_init();
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Error initializing pjlib", status);
+	return status;
+    }
+
+    /* init PJLIB-UTIL: */
+    status = pjlib_util_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&app.cp, &pj_pool_factory_default_policy, 
+			 CACHING_POOL_SIZE);
+
+    /* Create application pool for misc. */
+    app.pool = pj_pool_create(&app.cp.factory, "app", 1000, 1000, NULL);
+
+    /* Create the endpoint: */
+    status = pjsip_endpt_create(&app.cp.factory, pj_gethostname()->ptr, 
+				&app.sip_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    return status;
+}
+
+
+/*
+ * Init SIP stack
+ */
+static pj_status_t init_sip()
+{
+    pj_status_t status;
+
+    /* Add UDP/TCP transport. */
+    {
+	pj_sockaddr_in addr;
+	pjsip_host_port addrname;
+	const char *transport_type;
+
+	pj_bzero(&addr, sizeof(addr));
+	addr.sin_family = PJ_AF_INET;
+	addr.sin_addr.s_addr = 0;
+	addr.sin_port = pj_htons((pj_uint16_t)app.local_port);
+
+	if (app.local_addr.slen) {
+	    addrname.host = app.local_addr;
+	    addrname.port = 5060;
+	} 
+	if (app.local_port != 0)
+	    addrname.port = app.local_port;
+
+	if (0) {
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP!=0
+	} else if (app.use_tcp) {
+	    pj_sockaddr_in local_addr;
+	    pjsip_tpfactory *tpfactory;
+	    
+	    transport_type = "tcp";
+	    pj_sockaddr_in_init(&local_addr, 0, (pj_uint16_t)app.local_port);
+	    status = pjsip_tcp_transport_start(app.sip_endpt, &local_addr,
+					       app.thread_count, &tpfactory);
+	    if (status == PJ_SUCCESS) {
+		app.local_addr = tpfactory->addr_name.host;
+		app.local_port = tpfactory->addr_name.port;
+	    }
+#endif
+	} else {
+	    pjsip_transport *tp;
+
+	    transport_type = "udp";
+	    status = pjsip_udp_transport_start(app.sip_endpt, &addr, 
+					       (app.local_addr.slen ? &addrname:NULL),
+					       app.thread_count, &tp);
+	    if (status == PJ_SUCCESS) {
+		app.local_addr = tp->local_name.host;
+		app.local_port = tp->local_name.port;
+	    }
+
+	}
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Unable to start transport", status);
+	    return status;
+	}
+
+	app.local_uri.ptr = pj_pool_alloc(app.pool, 128);
+	app.local_uri.slen = pj_ansi_sprintf(app.local_uri.ptr, 
+				    	     "<sip:pjsip-perf@%.*s:%d;transport=%s>",
+					     (int)app.local_addr.slen,
+					     app.local_addr.ptr,
+					     app.local_port,
+					     transport_type);
+
+	app.local_contact = app.local_uri;
+    }
+
+    /* 
+     * Init transaction layer.
+     * This will create/initialize transaction hash tables etc.
+     */
+    status = pjsip_tsx_layer_init_module(app.sip_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /*  Initialize UA layer. */
+    status = pjsip_ua_init_module( app.sip_endpt, NULL );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /*  Init invite session module. */
+    {
+	pjsip_inv_callback inv_cb;
+
+	/* Init the callback for INVITE session: */
+	pj_bzero(&inv_cb, sizeof(inv_cb));
+	inv_cb.on_state_changed = &call_on_state_changed;
+	inv_cb.on_new_session = &call_on_forked;
+	inv_cb.on_media_update = &call_on_media_update;
+
+	/* Initialize invite session module:  */
+	status = pjsip_inv_usage_init(app.sip_endpt, &inv_cb);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+    }
+
+    /* Register our module to receive incoming requests. */
+    status = pjsip_endpt_register_module( app.sip_endpt, &mod_test);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Register stateless server module */
+    status = pjsip_endpt_register_module( app.sip_endpt, &mod_stateless_server);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Register default responder module */
+    status = pjsip_endpt_register_module( app.sip_endpt, &mod_responder);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Register stateless server module */
+    status = pjsip_endpt_register_module( app.sip_endpt, &mod_stateful_server);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Register call server module */
+    status = pjsip_endpt_register_module( app.sip_endpt, &mod_call_server);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Done */
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Destroy SIP
+ */
+static void destroy_app()
+{
+    unsigned i;
+
+    app.thread_quit = 1;
+    for (i=0; i<app.thread_count; ++i) {
+	if (app.thread[i]) {
+	    pj_thread_join(app.thread[i]);
+	    pj_thread_destroy(app.thread[i]);
+	    app.thread[i] = NULL;
+	}
+    }
+
+    if (app.sip_endpt) {
+	pjsip_endpt_destroy(app.sip_endpt);
+	app.sip_endpt = NULL;
+    }
+
+    if (app.pool) {
+	pj_pool_release(app.pool);
+	app.pool = NULL;
+	PJ_LOG(3,(THIS_FILE, "Peak memory size: %uMB",
+			     app.cp.peak_used_size / 1000000));
+	pj_caching_pool_destroy(&app.cp);
+    }
+
+    /* Shutdown PJLIB */
+    pj_shutdown();
+}
+
+
+/*
+ * Init media stack.
+ */
+static pj_status_t init_media()
+{
+    unsigned	i;
+    pj_uint16_t	rtp_port;
+    pj_status_t	status;
+
+
+    /* Initialize media endpoint so that at least error subsystem is properly
+     * initialized.
+     */
+    status = pjmedia_endpt_create(&app.cp.factory, 
+				  pjsip_endpt_get_ioqueue(app.sip_endpt), 0, 
+				  &app.med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Must register all codecs to be supported */
+#if defined(PJMEDIA_HAS_G711_CODEC) && PJMEDIA_HAS_G711_CODEC!=0
+    pjmedia_codec_g711_init(app.med_endpt);
+#endif
+#if defined(PJMEDIA_HAS_GSM_CODEC) && PJMEDIA_HAS_GSM_CODEC!=0
+    pjmedia_codec_gsm_init(app.med_endpt);
+#endif
+#if defined(PJMEDIA_HAS_SPEEX_CODEC) && PJMEDIA_HAS_SPEEX_CODEC!=0
+    pjmedia_codec_speex_init(app.med_endpt, PJMEDIA_SPEEX_NO_UWB, 3, 3);
+#endif
+
+    /* Init dummy socket addresses */
+    app.skinfo_cnt = 0;
+    for (i=0, rtp_port=4000; i<PJ_ARRAY_SIZE(app.skinfo); ++i, rtp_port+=2) {
+	pjmedia_sock_info *skinfo;
+
+	skinfo = &app.skinfo[i];
+	
+	pj_sockaddr_in_init(&skinfo->rtp_addr_name, &app.local_addr,
+			    (pj_uint16_t)rtp_port);
+	pj_sockaddr_in_init(&skinfo->rtp_addr_name, &app.local_addr,
+			    (pj_uint16_t)(rtp_port+1));
+	app.skinfo_cnt++;
+    }
+
+    /* Generate dummy SDP */
+    dummy_sdp_str.slen = pj_ansi_strlen(dummy_sdp_str.ptr);
+    status = pjmedia_sdp_parse(app.pool, dummy_sdp_str.ptr, dummy_sdp_str.slen, 
+			       &app.dummy_sdp);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Error parsing dummy SDP", status);
+	return status;
+    }
+
+
+    /* Done */
+    return PJ_SUCCESS;
+}
+
+
+/* This is notification from the call about media negotiation
+ * status. This is called for client calls only.
+ */
+static void call_on_media_update( pjsip_inv_session *inv,
+				  pj_status_t status)
+{
+    if (status != PJ_SUCCESS) {
+	pjsip_tx_data *tdata;
+	pj_status_t status;
+
+	status = pjsip_inv_end_session(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE, 
+				       NULL, &tdata);
+	if (status == PJ_SUCCESS && tdata)
+	    status = pjsip_inv_send_msg(inv, tdata);
+    }
+}
+
+
+/* This is notification from the call when the call state has changed.
+ * This is called for client calls only.
+ */
+static void call_on_state_changed( pjsip_inv_session *inv, 
+				   pjsip_event *e)
+{
+    PJ_UNUSED_ARG(e);
+
+    /* Bail out if the session has been counted before */
+    if (inv->mod_data[mod_test.id] != NULL)
+	return;
+
+    /* Bail out if this is not an outgoing call */
+    if (inv->role != PJSIP_UAC_ROLE)
+	return;
+
+    if (inv->state == PJSIP_INV_STATE_CONFIRMED) {
+	pjsip_tx_data *tdata;
+	pj_status_t status;
+
+	//report_completion(200);
+	//inv->mod_data[mod_test.id] = (void*)1;
+
+	status = pjsip_inv_end_session(inv, PJSIP_SC_OK, NULL, &tdata);
+	if (status == PJ_SUCCESS && tdata)
+	    status = pjsip_inv_send_msg(inv, tdata);
+
+    } else if (inv->state == PJSIP_INV_STATE_DISCONNECTED) {
+	report_completion(inv->cause);
+	inv->mod_data[mod_test.id] = (void*)1;
+    }
+}
+
+
+/* Not implemented for now */
+static void call_on_forked(pjsip_inv_session *inv, pjsip_event *e)
+{
+    /* Do nothing */
+    PJ_UNUSED_ARG(inv);
+    PJ_UNUSED_ARG(e);
+}
+
+
+/*
+ * Make outgoing call.
+ */
+static pj_status_t make_call(const pj_str_t *dst_uri)
+{
+    struct call *call;
+    pjsip_dialog *dlg;
+    pjmedia_sdp_session *sdp;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+
+    /* Create UAC dialog */
+    status = pjsip_dlg_create_uac( pjsip_ua_instance(), 
+				   &app.local_uri,	/* local URI	    */
+				   &app.local_contact,	/* local Contact    */
+				   dst_uri,		/* remote URI	    */
+				   dst_uri,		/* remote target    */
+				   &dlg);		/* dialog	    */
+    if (status != PJ_SUCCESS) {
+	return status;
+    }
+
+    /* Create call */
+    call = pj_pool_zalloc(dlg->pool, sizeof(struct call));
+
+    /* Create SDP */
+    if (app.real_sdp) {
+	status = pjmedia_endpt_create_sdp(app.med_endpt, dlg->pool, 1, 
+					  app.skinfo, &sdp);
+	if (status != PJ_SUCCESS) {
+	    pjsip_dlg_terminate(dlg);
+	    return status;
+	}
+    } else
+	sdp = app.dummy_sdp;
+
+    /* Create the INVITE session. */
+    status = pjsip_inv_create_uac( dlg, sdp, 0, &call->inv);
+    if (status != PJ_SUCCESS) {
+	pjsip_dlg_terminate(dlg);
+	return status;
+    }
+
+
+    /* Create initial INVITE request.
+     * This INVITE request will contain a perfectly good request and 
+     * an SDP body as well.
+     */
+    status = pjsip_inv_invite(call->inv, &tdata);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Send initial INVITE request. 
+     * From now on, the invite session's state will be reported to us
+     * via the invite session callbacks.
+     */
+    status = pjsip_inv_send_msg(call->inv, tdata);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Verify that valid SIP url is given.
+ */
+static pj_status_t verify_sip_url(const char *c_url)
+{
+    pjsip_uri *p;
+    pj_pool_t *pool;
+    char *url;
+    int len = (c_url ? pj_ansi_strlen(c_url) : 0);
+
+    if (!len) return -1;
+
+    pool = pj_pool_create(&app.cp.factory, "check%p", 1024, 0, NULL);
+    if (!pool) return PJ_ENOMEM;
+
+    url = pj_pool_alloc(pool, len+1);
+    pj_ansi_strcpy(url, c_url);
+    url[len] = '\0';
+
+    p = pjsip_parse_uri(pool, url, len, 0);
+    if (!p || pj_stricmp2(pjsip_uri_get_scheme(p), "sip") != 0)
+	p = NULL;
+
+    pj_pool_release(pool);
+    return p ? 0 : -1;
+}
+
+
+static void usage(void)
+{
+    printf(
+	"Usage:\n"
+	"   pjsip-perf [OPTIONS]        -- to start as server\n"
+	"   pjsip-perf [OPTIONS] URL    -- to call server (possibly itself)\n"
+	"\n"
+	"where:\n"
+	"   URL                     The SIP URL to be contacted.\n"
+	"\n"
+	"Client options:\n"
+	"   --method=METHOD, -m     Set test method (set to INVITE for call benchmark)\n"
+        "                           [default: OPTIONS]\n"
+	"   --count=N, -n           Set total number of requests to initiate\n"
+	"                           [default=%d]\n"
+	"   --stateless, -s         Set to operate in stateless mode\n"
+	"                           [default: stateful]\n"
+	"   --timeout=SEC, -t       Set client timeout [default=60 sec]\n"
+	"   --window=COUNT, -w      Set maximum outstanding job [default: %d]\n"
+	"\n"
+	"SDP options (client and server):\n"
+	"   --real-sdp              Generate real SDP from pjmedia, and also perform\n"
+	"                           proper SDP negotiation [default: dummy]\n"
+	"\n"
+	"Client and Server options:\n"
+	"   --local-port=PORT, -p   Set local port [default: 5060]\n"
+	"   --use-tcp, -T           Use TCP instead of UDP. Note that when started as\n"
+	"                           client, you must add ;transport=tcp parameter to URL\n"
+	"                           [default: no]\n"
+	"   --thread-count=N        Set number of worker threads [default=1]\n"
+	"   --trying                Send 100/Trying response (server, default no)\n"
+	"   --ringing               Send 180/Ringing response (server, default no)\n"
+	"   --delay=MS, -d          Delay answering call by MS (server, default no)\n"
+	"\n"
+	"Misc options:\n"
+	"   --help, -h              Display this screen\n"
+	"   --verbose, -v           Verbose logging (put more than once for even more)\n"
+	"\n"
+	"When started as server, pjsip-perf can be contacted on the following URIs:\n"
+	"   - sip:0@server-addr     To handle requests statelessly.\n"
+	"   - sip:1@server-addr     To handle requests statefully.\n"
+	"   - sip:2@server-addr     To handle INVITE call.\n",
+	DEFAULT_COUNT, JOB_WINDOW);
+}
+
+
+static int my_atoi(const char *s)
+{
+    pj_str_t ss = pj_str((char*)s);
+    return pj_strtoul(&ss);
+}
+
+
+static pj_status_t init_options(int argc, char *argv[])
+{
+    enum { OPT_THREAD_COUNT = 1, OPT_REAL_SDP, OPT_TRYING, OPT_RINGING };
+    struct pj_getopt_option long_options[] = {
+	{ "local-port",	    1, 0, 'p' },
+	{ "count",	    1, 0, 'c' },
+	{ "thread-count",   1, 0, OPT_THREAD_COUNT },
+	{ "method",	    1, 0, 'm' },
+	{ "help",	    0, 0, 'h' },
+	{ "stateless",	    0, 0, 's' },
+	{ "timeout",	    1, 0, 't' },
+	{ "real-sdp",	    0, 0, OPT_REAL_SDP },
+	{ "verbose",        0, 0, 'v' },
+	{ "use-tcp",	    0, 0, 'T' },
+	{ "window",	    1, 0, 'w' },
+	{ "delay",	    1, 0, 'd' },
+	{ "trying",	    0, 0, OPT_TRYING},
+	{ "ringing",	    0, 0, OPT_RINGING},
+	{ NULL, 0, 0, 0 },
+    };
+    int c;
+    int option_index;
+
+    /* Init default application configs */
+    app.local_port = 5060;
+    app.thread_count = 1;
+    app.client.job_count = DEFAULT_COUNT;
+    app.client.method = pjsip_options_method;
+    app.client.job_window = c = JOB_WINDOW;
+    app.client.timeout = 60;
+    app.log_level = 3;
+
+
+    /* Parse options */
+    pj_optind = 0;
+    while((c=pj_getopt_long(argc,argv, "p:c:m:t:w:d:hsv", 
+			    long_options, &option_index))!=-1) 
+    {
+	switch (c) {
+	case 'p':
+	    app.local_port = my_atoi(pj_optarg);
+	    if (app.local_port < 0 || app.local_port > 65535) {
+		PJ_LOG(3,(THIS_FILE, "Invalid --local-port %s", pj_optarg));
+		return -1;
+	    }
+	    break;
+
+	case 'c':
+	    app.client.job_count = my_atoi(pj_optarg);
+	    if (app.client.job_count < 0) {
+		PJ_LOG(3,(THIS_FILE, "Invalid --local-port %s", pj_optarg));
+		return -1;
+	    }
+	    if (app.client.job_count > PJSIP_MAX_TSX_COUNT)
+		PJ_LOG(3,(THIS_FILE, 
+			  "Warning: --count value (%d) exceeds maximum "
+			  "transaction count (%d)", app.client.job_count,
+			  PJSIP_MAX_TSX_COUNT));
+	    break;
+
+	case OPT_THREAD_COUNT:
+	    app.thread_count = my_atoi(pj_optarg);
+	    if (app.thread_count < 1 || app.thread_count > 16) {
+		PJ_LOG(3,(THIS_FILE, "Invalid --thread-count %s", pj_optarg));
+		return -1;
+	    }
+	    break;
+
+	case 'm':
+	    {
+		pj_str_t temp = pj_str((char*)pj_optarg);
+		pjsip_method_init_np(&app.client.method, &temp);
+	    }
+	    break;
+
+	case 'h':
+	    usage();
+	    return -1;
+
+	case 's':
+	    app.client.stateless = PJ_TRUE;
+	    break;
+
+	case OPT_REAL_SDP:
+	    app.real_sdp = 1;
+	    break;
+
+	case 'v':
+	    app.log_level++;
+	    break;
+
+	case 't':
+	    app.client.timeout = my_atoi(pj_optarg);
+	    if (app.client.timeout < 0 || app.client.timeout > 600) {
+		PJ_LOG(3,(THIS_FILE, "Invalid --timeout %s", pj_optarg));
+		return -1;
+	    }
+	    break;
+
+	case 'w':
+	    app.client.job_window = my_atoi(pj_optarg);
+	    if (app.client.job_window <= 0) {
+		PJ_LOG(3,(THIS_FILE, "Invalid --window %s", pj_optarg));
+		return -1;
+	    }
+	    break;
+
+	case 'T':
+	    app.use_tcp = PJ_TRUE;
+	    break;
+
+	case 'd':
+	    app.server.delay = my_atoi(pj_optarg);
+	    if (app.server.delay > 3600) {
+		PJ_LOG(3,(THIS_FILE, "I think --delay %s is too long", 
+			  pj_optarg));
+		return -1;
+	    }
+	    break;
+
+	case OPT_TRYING:
+	    app.server.send_trying = 1;
+	    break;
+
+	case OPT_RINGING:
+	    app.server.send_ringing = 1;
+	    break;
+
+	default:
+	    PJ_LOG(1,(THIS_FILE, 
+		      "Invalid argument. Use --help to see help"));
+	    return -1;
+	}
+    }
+
+    if (pj_optind != argc) {
+
+	if (verify_sip_url(argv[pj_optind]) != PJ_SUCCESS) {
+	    PJ_LOG(1,(THIS_FILE, "Invalid SIP URI %s", argv[pj_optind]));
+	    return -1;
+	}
+	app.client.dst_uri = pj_str(argv[pj_optind]);
+	
+	pj_optind++;
+
+    }
+
+    if (pj_optind != argc) {
+	PJ_LOG(1,(THIS_FILE, "Error: unknown options %s", argv[pj_optind]));
+	return -1;
+    }
+
+    return 0;
+}
+
+
+/* Send one stateless request */
+static pj_status_t submit_stateless_job(void)
+{
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    status = pjsip_endpt_create_request(app.sip_endpt, &app.client.method, 
+					&app.client.dst_uri, &app.local_uri,
+					&app.client.dst_uri, &app.local_contact,
+					NULL, -1, NULL, &tdata);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Error creating request", status);
+	report_completion(701);
+	return status;
+    }
+
+    status = pjsip_endpt_send_request_stateless(app.sip_endpt, tdata, NULL,
+						NULL);
+    if (status != PJ_SUCCESS) {
+	pjsip_tx_data_dec_ref(tdata);
+	app_perror(THIS_FILE, "Error sending stateless request", status);
+	report_completion(701);
+	return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/* This callback is called when client transaction state has changed */
+static void tsx_completion_cb(void *token, pjsip_event *event)
+{
+    pjsip_transaction *tsx;
+
+    PJ_UNUSED_ARG(token);
+
+    if (event->type != PJSIP_EVENT_TSX_STATE)
+	return;
+
+    tsx = event->body.tsx_state.tsx;
+
+    if (tsx->mod_data[mod_test.id] != NULL) {
+	/* This transaction has been calculated before */
+	return;
+    }
+
+    if (tsx->state==PJSIP_TSX_STATE_TERMINATED) {
+	report_completion(tsx->status_code);
+	tsx->mod_data[mod_test.id] = (void*)1;
+    }
+    else if (tsx->method.id == PJSIP_INVITE_METHOD &&
+	     tsx->state == PJSIP_TSX_STATE_CONFIRMED) {
+
+	report_completion(tsx->status_code);
+	tsx->mod_data[mod_test.id] = (void*)1;
+	
+    } else if (tsx->state == PJSIP_TSX_STATE_COMPLETED) {
+
+	report_completion(tsx->status_code);
+	tsx->mod_data[mod_test.id] = (void*)1;
+
+	TERMINATE_TSX(tsx, tsx->status_code);
+    }
+}
+
+
+/* Send one stateful request */
+static pj_status_t submit_job(void)
+{
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    status = pjsip_endpt_create_request(app.sip_endpt, &app.client.method, 
+					&app.client.dst_uri, &app.local_uri,
+					&app.client.dst_uri, &app.local_contact,
+					NULL, -1, NULL, &tdata);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Error creating request", status);
+	report_completion(701);
+	return status;
+    }
+
+    status = pjsip_endpt_send_request(app.sip_endpt, tdata, -1, NULL, 
+				      &tsx_completion_cb);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Error sending stateful request", status);
+	//should have been reported by tsx_completion_cb().
+	//report_completion(701);
+	//No longer necessary (r777)
+	//pjsip_tx_data_dec_ref(tdata);
+    }
+    return status;
+}
+
+
+/* Client worker thread */
+static int client_thread(void *arg)
+{
+    pj_time_val end_time, last_report, now;
+    unsigned thread_index = (unsigned)(long)arg;
+    unsigned cycle = 0, last_cycle = 0;
+
+    pj_thread_sleep(100);
+
+    pj_gettimeofday(&end_time);
+    end_time.sec += app.client.timeout;
+
+    pj_gettimeofday(&last_report);
+
+    if (app.client.first_request.sec == 0) {
+	pj_gettimeofday(&app.client.first_request);
+    }
+
+    /* Submit all jobs */
+    while (app.client.job_submitted < app.client.job_count && !app.thread_quit){
+	pj_time_val timeout = { 0, 1 };
+	unsigned i;
+	int outstanding;
+	pj_status_t status;
+
+	/* Calculate current outstanding job */
+	outstanding = app.client.job_submitted - app.client.job_finished;
+
+	/* Update stats on max outstanding jobs */
+	if (outstanding > (int)app.client.stat_max_window)
+	    app.client.stat_max_window = outstanding;
+
+	/* Wait if there are more pending jobs than allowed in the
+	 * window. But spawn a new job anyway if no events are happening
+	 * after we wait for some time.
+	 */
+	for (i=0; outstanding > (int)app.client.job_window && i<1000; ++i) {
+	    pj_time_val wait = { 0, 500 };
+	    unsigned count = 0;
+
+	    pjsip_endpt_handle_events2(app.sip_endpt, &wait, &count);
+	    outstanding = app.client.job_submitted - app.client.job_finished;
+
+	    if (count == 0)
+		break;
+
+	    ++cycle;
+	}
+
+
+	/* Submit one job */
+	if (app.client.method.id == PJSIP_INVITE_METHOD) {
+	    status = make_call(&app.client.dst_uri);
+	} else if (app.client.stateless) {
+	    status = submit_stateless_job();
+	} else {
+	    status = submit_job();
+	}
+
+	++app.client.job_submitted;
+	++cycle;
+
+	/* Handle event */
+	pjsip_endpt_handle_events2(app.sip_endpt, &timeout, NULL);
+
+	/* Check for time out, also print report */
+	if (cycle - last_cycle >= 500) {
+	    pj_gettimeofday(&now);
+	    if (PJ_TIME_VAL_GTE(now, end_time)) {
+		break;
+	    }
+	    last_cycle = cycle;
+
+	    
+	    if (thread_index == 0 && now.sec-last_report.sec >= 2) {
+		printf("\r%d jobs started, %d completed...   ",
+		       app.client.job_submitted, app.client.job_finished);
+		fflush(stdout);
+		last_report = now;
+	    }
+	}
+    }
+
+    if (app.client.requests_sent.sec == 0) {
+	pj_gettimeofday(&app.client.requests_sent);
+    }
+
+
+    if (thread_index == 0) {
+	printf("\r%d jobs started, %d completed%s\n",
+	       app.client.job_submitted, app.client.job_finished,
+	       (app.client.job_submitted!=app.client.job_finished ? 
+		", waiting..." : ".") );
+	fflush(stdout);
+    }
+
+    /* Wait until all jobs completes, or timed out */
+    pj_gettimeofday(&now);
+    while (PJ_TIME_VAL_LT(now, end_time) && 
+	   app.client.job_finished < app.client.job_count && 
+	   !app.thread_quit) 
+    {
+	pj_time_val timeout = { 0, 1 };
+	unsigned i;
+
+	for (i=0; i<1000; ++i) {
+	    unsigned count;
+	    count = 0;
+	    pjsip_endpt_handle_events2(app.sip_endpt, &timeout, &count);
+	    if (count == 0)
+		break;
+	}
+
+	pj_gettimeofday(&now);
+    }
+
+    /* Wait couple of seconds to let jobs completes (e.g. ACKs to be sent)  */
+    pj_gettimeofday(&now);
+    end_time = now;
+    end_time.sec += 2;
+    while (PJ_TIME_VAL_LT(now, end_time)) 
+    {
+	pj_time_val timeout = { 0, 1 };
+	unsigned i;
+
+	for (i=0; i<1000; ++i) {
+	    unsigned count;
+	    count = 0;
+	    pjsip_endpt_handle_events2(app.sip_endpt, &timeout, &count);
+	    if (count == 0)
+		break;
+	}
+
+	pj_gettimeofday(&now);
+    }
+
+    return 0;
+}
+
+
+static const char *good_number(char *buf, pj_int32_t val)
+{
+    if (val < 1000) {
+	pj_ansi_sprintf(buf, "%d", val);
+    } else if (val < 1000000) {
+	pj_ansi_sprintf(buf, "%d.%dK", 
+			val / 1000,
+			(val % 1000) / 100);
+    } else {
+	pj_ansi_sprintf(buf, "%d.%02dM", 
+			val / 1000000,
+			(val % 1000000) / 10000);
+    }
+
+    return buf;
+}
+
+
+static int server_thread(void *arg)
+{
+    pj_time_val timeout = { 0, 1 };
+    unsigned thread_index = (unsigned)(long)arg;
+    pj_time_val last_report, next_report;
+
+    pj_gettimeofday(&last_report);
+    next_report = last_report;
+    next_report.sec++;
+
+    while (!app.thread_quit) {
+	pj_time_val now;
+	unsigned i;
+
+	for (i=0; i<100; ++i) {
+	    unsigned count = 0;
+	    pjsip_endpt_handle_events2(app.sip_endpt, &timeout, &count);
+	    if (count == 0)
+		break;
+	}
+
+	if (thread_index == 0) {
+	    pj_gettimeofday(&now);
+
+	    if (PJ_TIME_VAL_GTE(now, next_report)) {
+		pj_time_val tmp;
+		unsigned msec;
+		unsigned stateless, stateful, call;
+		char str_stateless[32], str_stateful[32], str_call[32];
+
+		tmp = now;
+		PJ_TIME_VAL_SUB(tmp, last_report);
+		msec = PJ_TIME_VAL_MSEC(tmp);
+
+		last_report = now;
+		next_report = last_report;
+		next_report.sec++;
+
+		stateless = app.server.cur_state.stateless_cnt - app.server.prev_state.stateless_cnt;
+		stateful = app.server.cur_state.stateful_cnt - app.server.prev_state.stateful_cnt;
+		call = app.server.cur_state.call_cnt - app.server.prev_state.call_cnt;
+
+		good_number(str_stateless, app.server.cur_state.stateless_cnt);
+		good_number(str_stateful, app.server.cur_state.stateful_cnt);
+		good_number(str_call, app.server.cur_state.call_cnt);
+
+		printf("Total(rate): stateless:%s (%d/s), statefull:%s (%d/s), call:%s (%d/s)       \r",
+		       str_stateless, stateless*1000/msec,
+		       str_stateful, stateful*1000/msec,
+		       str_call, call*1000/msec);
+		fflush(stdout);
+
+		app.server.prev_state = app.server.cur_state;
+	    }
+	}
+    }
+
+    return 0;
+}
+
+static void write_report(const char *msg)
+{
+    puts(msg);
+
+#if defined(PJ_WIN32) && PJ_WIN32!=0
+    OutputDebugString(msg);
+    OutputDebugString("\n");
+#endif
+}
+
+
+int main(int argc, char *argv[])
+{
+    static char report[1024];
+
+    printf("PJSIP Performance Measurement Tool v%s\n"
+           "(c)2006 pjsip.org\n\n",
+	   PJ_VERSION);
+
+    if (create_app() != 0)
+	return 1;
+
+    if (init_options(argc, argv) != 0)
+	return 1;
+
+    if (init_sip() != 0)
+	return 1;
+
+    if (init_media() != 0)
+	return 1;
+
+    pj_log_set_level(app.log_level);
+
+    if (app.log_level > 4) {
+	pjsip_endpt_register_module(app.sip_endpt, &msg_logger);
+    }
+
+
+    /* Misc infos */
+    if (app.client.dst_uri.slen != 0) {
+	if (app.client.method.id == PJSIP_INVITE_METHOD) {
+	    if (app.client.stateless) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "Info: --stateless option makes no sense for INVITE,"
+			  " ignored."));
+	    }
+	}
+
+    }
+
+
+
+    if (app.client.dst_uri.slen) {
+	/* Client mode */
+	pj_status_t status;
+	char test_type[64];
+	unsigned msec_req, msec_res;
+	unsigned i;
+
+	/* Get the job name */
+	if (app.client.method.id == PJSIP_INVITE_METHOD) {
+	    pj_ansi_strcpy(test_type, "INVITE calls");
+	} else if (app.client.stateless) {
+	    pj_ansi_sprintf(test_type, "stateless %.*s requests",
+			    (int)app.client.method.name.slen,
+			    app.client.method.name.ptr);
+	} else {
+	    pj_ansi_sprintf(test_type, "stateful %.*s requests",
+			    (int)app.client.method.name.slen,
+			    app.client.method.name.ptr);
+	}
+	
+
+	printf("Sending %d %s to '%.*s' with %d maximum outstanding jobs, please wait..\n", 
+		  app.client.job_count, test_type,
+		  (int)app.client.dst_uri.slen, app.client.dst_uri.ptr,
+		  app.client.job_window);
+
+	for (i=0; i<app.thread_count; ++i) {
+	    status = pj_thread_create(app.pool, NULL, &client_thread, 
+				      (void*)(long)i, 0, 0, &app.thread[i]);
+	    if (status != PJ_SUCCESS) {
+		app_perror(THIS_FILE, "Unable to create thread", status);
+		return 1;
+	    }
+	}
+
+	for (i=0; i<app.thread_count; ++i) {
+	    pj_thread_join(app.thread[i]);
+	    app.thread[i] = NULL;
+	}
+
+	if (app.client.last_completion.sec) {
+	    pj_time_val duration;
+	    duration = app.client.last_completion;
+	    PJ_TIME_VAL_SUB(duration, app.client.first_request);
+	    msec_res = PJ_TIME_VAL_MSEC(duration);
+	} else {
+	    msec_res = app.client.timeout * 1000;
+	}
+
+	if (msec_res == 0) msec_res = 1;
+
+	if (app.client.requests_sent.sec) {
+	    pj_time_val duration;
+	    duration = app.client.requests_sent;
+	    PJ_TIME_VAL_SUB(duration, app.client.first_request);
+	    msec_req = PJ_TIME_VAL_MSEC(duration);
+	} else {
+	    msec_req = app.client.timeout * 1000;
+	}
+
+	if (msec_req == 0) msec_req = 1;
+
+	if (app.client.job_submitted < app.client.job_count)
+	    puts("\ntimed-out!\n");
+	else
+	    puts("\ndone.\n");
+
+	pj_ansi_snprintf(
+	    report, sizeof(report),
+	    "Total %d %s sent in %d ms at rate of %d/sec\n"
+	    "Total %d responses receieved in %d ms at rate of %d/sec:",
+	    app.client.job_submitted, test_type, msec_req, 
+	    app.client.job_submitted * 1000 / msec_req,
+	    app.client.total_responses, msec_res,
+	    app.client.total_responses*1000/msec_res);
+	write_report(report);
+
+	/* Print detailed response code received */
+	pj_ansi_sprintf(report, "\nDetailed responses received:");
+	write_report(report);
+
+	for (i=0; i<PJ_ARRAY_SIZE(app.client.response_codes); ++i) {
+	    const pj_str_t *reason;
+
+	    if (app.client.response_codes[i] == 0)
+		continue;
+
+	    reason = pjsip_get_status_text(i);
+	    pj_ansi_snprintf( report, sizeof(report),
+			      " - %d responses:  %7d     (%.*s)",
+			      i, app.client.response_codes[i],
+			      (int)reason->slen, reason->ptr);
+	    write_report(report);
+	}
+
+	/* Total responses and rate */
+	pj_ansi_snprintf( report, sizeof(report),
+	    "                    ------\n"
+	    " TOTAL responses:  %7d (rate=%d/sec)\n",
+	    app.client.total_responses, 
+	    app.client.total_responses*1000/msec_res);
+
+	write_report(report);
+
+	pj_ansi_sprintf(report, "Maximum outstanding job: %d", 
+			app.client.stat_max_window);
+	write_report(report);
+
+
+    } else {
+	/* Server mode */
+	char s[10];
+	pj_status_t status;
+	unsigned i;
+
+	puts("pjsip-perf started in server-mode");
+
+	printf("Receiving requests on the following URIs:\n"
+	       "  sip:0@%.*s:%d%s    for stateless handling\n"
+	       "  sip:1@%.*s:%d%s    for stateful handling\n"
+	       "  sip:2@%.*s:%d%s    for call handling\n",
+	       (int)app.local_addr.slen,
+	       app.local_addr.ptr,
+	       app.local_port,
+	       (app.use_tcp ? ";transport=tcp" : ""),
+	       (int)app.local_addr.slen,
+	       app.local_addr.ptr,
+	       app.local_port,
+	       (app.use_tcp ? ";transport=tcp" : ""),
+	       (int)app.local_addr.slen,
+	       app.local_addr.ptr,
+	       app.local_port,
+	       (app.use_tcp ? ";transport=tcp" : ""));
+	printf("INVITE with non-matching user part will be handled call-statefully\n");
+
+	for (i=0; i<app.thread_count; ++i) {
+	    status = pj_thread_create(app.pool, NULL, &server_thread, 
+				      (void*)(long)i, 0, 0, &app.thread[i]);
+	    if (status != PJ_SUCCESS) {
+		app_perror(THIS_FILE, "Unable to create thread", status);
+		return 1;
+	    }
+	}
+
+	puts("\nPress <ENTER> to quit\n");
+	fflush(stdout);
+	fgets(s, sizeof(s), stdin);
+
+	app.thread_quit = PJ_TRUE;
+	for (i=0; i<app.thread_count; ++i) {
+	    pj_thread_join(app.thread[i]);
+	    app.thread[i] = NULL;
+	}
+
+	puts("");
+    }
+
+
+    destroy_app();
+
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/playfile.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/playfile.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/playfile.c	(revision 1163)
@@ -0,0 +1,214 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjmedia.h>
+#include <pjlib-util.h>
+#include <pjlib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "util.h"
+
+
+/**
+ * \page page_pjmedia_samples_playfile_c Samples: Playing WAV File to Sound Device
+ *
+ * This is a very simple example to use the @ref PJMEDIA_FILE_PLAY and
+ * @ref PJMED_SND_PORT. In this example, we open both the file and sound
+ * device, and connect the two of them, and voila! Sound will be playing
+ * the contents of the file.
+ *
+ * @see page_pjmedia_samples_recfile_c
+ *
+ * This file is pjsip-apps/src/samples/playfile.c
+ *
+ * \includelineno playfile.c
+ */
+
+
+/*
+ * playfile.c
+ *
+ * PURPOSE:
+ *  Play a WAV file to sound player device.
+ *
+ * USAGE:
+ *  playfile FILE.WAV
+ *
+ *  The WAV file could have mono or stereo channels with arbitrary
+ *  sampling rate, but MUST contain uncompressed (i.e. 16bit) PCM.
+ *
+ */
+
+
+/* For logging purpose. */
+#define THIS_FILE   "playfile.c"
+
+
+static const char *desc = 
+" FILE		    						    \n"
+"		    						    \n"
+"  playfile.c	    						    \n"
+"		    						    \n"
+" PURPOSE	    						    \n"
+"		    						    \n"
+"  Demonstrate how to play a WAV file.				    \n"
+"		    						    \n"
+" USAGE		    						    \n"
+"		    						    \n"
+"  playfile FILE.WAV						    \n"
+"		    						    \n"
+"  The WAV file could have mono or stereo channels with arbitrary   \n"
+"  sampling rate, but MUST contain uncompressed (i.e. 16bit) PCM.   \n";
+
+
+/*
+ * main()
+ */
+int main(int argc, char *argv[])
+{
+    pj_caching_pool cp;
+    pjmedia_endpt *med_endpt;
+    pj_pool_t *pool;
+    pjmedia_port *file_port;
+    pjmedia_snd_port *snd_port;
+    char tmp[10];
+    pj_status_t status;
+
+
+    if (argc != 2) {
+    	puts("Error: filename required");
+	puts(desc);
+	return 1;
+    }
+
+
+    /* Must init PJLIB first: */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+
+    /* 
+     * Initialize media endpoint.
+     * This will implicitly initialize PJMEDIA too.
+     */
+    status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Create memory pool for our file player */
+    pool = pj_pool_create( &cp.factory,	    /* pool factory	    */
+			   "wav",	    /* pool name.	    */
+			   4000,	    /* init size	    */
+			   4000,	    /* increment size	    */
+			   NULL		    /* callback on error    */
+			   );
+
+    /* Create file media port from the WAV file */
+    status = pjmedia_wav_player_port_create(  pool,	/* memory pool	    */
+					      argv[1],	/* file to play	    */
+					      20,	/* ptime.	    */
+					      0,	/* flags	    */
+					      0,	/* default buffer   */
+					      &file_port/* returned port    */
+					      );
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to use WAV file", status);
+	return 1;
+    }
+
+    /* Create sound player port. */
+    status = pjmedia_snd_port_create_player( 
+		 pool,				    /* pool		    */
+		 -1,				    /* use default dev.	    */
+		 file_port->info.clock_rate,	    /* clock rate.	    */
+		 file_port->info.channel_count,	    /* # of channels.	    */
+		 file_port->info.samples_per_frame, /* samples per frame.   */
+		 file_port->info.bits_per_sample,   /* bits per sample.	    */
+		 0,				    /* options		    */
+		 &snd_port			    /* returned port	    */
+		 );
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to open sound device", status);
+	return 1;
+    }
+
+    /* Connect file port to the sound player.
+     * Stream playing will commence immediately.
+     */
+    status = pjmedia_snd_port_connect( snd_port, file_port);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+
+    /* 
+     * File should be playing and looping now, using sound device's thread. 
+     */
+
+
+    /* Sleep to allow log messages to flush */
+    pj_thread_sleep(100);
+
+
+    printf("Playing %s..\n", argv[1]);
+    puts("");
+    puts("Press <ENTER> to stop playing and quit");
+
+    fgets(tmp, sizeof(tmp), stdin);
+
+    
+    /* Start deinitialization: */
+
+    /* Disconnect sound port from file port */
+    status = pjmedia_snd_port_disconnect(snd_port);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Without this sleep, Windows/DirectSound will repeteadly
+     * play the last frame during destroy.
+     */
+    pj_thread_sleep(100);
+
+    /* Destroy sound device */
+    status = pjmedia_snd_port_destroy( snd_port );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Destroy file port */
+    status = pjmedia_port_destroy( file_port );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Release application pool */
+    pj_pool_release( pool );
+
+    /* Destroy media endpoint. */
+    pjmedia_endpt_destroy( med_endpt );
+
+    /* Destroy pool factory */
+    pj_caching_pool_destroy( &cp );
+
+    /* Shutdown PJLIB */
+    pj_shutdown();
+
+
+    /* Done. */
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/playsine.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/playsine.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/playsine.c	(revision 1163)
@@ -0,0 +1,318 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+
+/**
+ * \page page_pjmedia_samples_playsine_c Samples: Using Custom Ports (Sine Wave Generator)
+ *
+ * This example demonstrate how to create a custom media port (in this case, a
+ * sine wave generator) and connect it to the sound device.
+ *
+ * This file is pjsip-apps/src/samples/playsine.c
+ *
+ * \includelineno playsine.c
+ */
+
+/*
+ * playsine.c
+ *
+ * PURPOSE:
+ *  Demonstrate how to create and use custom media port which
+ *  simply feed a sine wav to the sound player.
+ *
+ * USAGE:
+ *  playsine [nchannel]
+ *
+ * where:
+ *  nchannel is 1 for mono (this is the default) or 2 for stereo.
+ */
+
+#include <pjmedia.h>
+#include <pjlib.h>
+
+#include <stdlib.h>	/* atoi() */
+#include <stdio.h>
+
+
+/* For logging purpose. */
+#define THIS_FILE   "playsine.c"
+
+
+/* Util to display the error message for the specified error code  */
+static int app_perror( const char *sender, const char *title, 
+		       pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    PJ_UNUSED_ARG(sender);
+
+    pj_strerror(status, errmsg, sizeof(errmsg));
+
+    printf("%s: %s [code=%d]\n", title, errmsg, status);
+    return 1;
+}
+
+
+/* Struct attached to sine generator */
+typedef struct
+{
+    pj_int16_t	*samples;	/* Sine samples.    */
+} port_data;
+
+
+/* This callback is called to feed more samples */
+static pj_status_t sine_get_frame( pjmedia_port *port, 
+				   pjmedia_frame *frame)
+{
+    port_data *sine = port->port_data.pdata;
+    pj_int16_t *samples = frame->buf;
+    unsigned i, count, left, right;
+
+    /* Get number of samples */
+    count = frame->size / 2 / port->info.channel_count;
+
+    left = 0;
+    right = 0;
+
+    for (i=0; i<count; ++i) {
+	*samples++ = sine->samples[left];
+	++left;
+
+	if (port->info.channel_count == 2) {
+	    *samples++ = sine->samples[right];
+	    right += 2; /* higher pitch so we can distinguish left and right. */
+	    if (right >= count)
+		right = 0;
+	}
+    }
+
+    /* Must set frame->type correctly, otherwise the sound device
+     * will refuse to play.
+     */
+    frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
+
+    return PJ_SUCCESS;
+}
+
+#ifndef M_PI
+#define M_PI  (3.14159265)
+#endif
+
+/*
+ * Create a media port to generate sine wave samples.
+ */
+static pj_status_t create_sine_port(pj_pool_t *pool,
+				    unsigned sampling_rate,
+				    unsigned channel_count,
+				    pjmedia_port **p_port)
+{
+    pjmedia_port *port;
+    unsigned i;
+    unsigned count;
+    port_data *sine;
+
+    PJ_ASSERT_RETURN(pool && channel_count > 0 && channel_count <= 2, 
+		     PJ_EINVAL);
+
+    port = pj_pool_zalloc(pool, sizeof(pjmedia_port));
+    PJ_ASSERT_RETURN(port != NULL, PJ_ENOMEM);
+
+    /* Fill in port info. */
+    port->info.bits_per_sample = 16;
+    port->info.channel_count = channel_count;
+    port->info.encoding_name = pj_str("pcm");
+    port->info.has_info = 1;
+    port->info.name = pj_str("sine generator");
+    port->info.need_info = 0;
+    port->info.pt = 0xFF;
+    port->info.clock_rate = sampling_rate;
+    port->info.samples_per_frame = sampling_rate * 20 / 1000 * channel_count;
+    port->info.bytes_per_frame = port->info.samples_per_frame * 2;
+    port->info.type = PJMEDIA_TYPE_AUDIO;
+    
+    /* Set the function to feed frame */
+    port->get_frame = &sine_get_frame;
+
+    /* Create sine port data */
+    port->port_data.pdata = sine = pj_pool_zalloc(pool, sizeof(port_data));
+
+    /* Create samples */
+    count = port->info.samples_per_frame / channel_count;
+    sine->samples = pj_pool_alloc(pool, count * sizeof(pj_int16_t));
+    PJ_ASSERT_RETURN(sine->samples != NULL, PJ_ENOMEM);
+
+    /* initialise sinusoidal wavetable */
+    for( i=0; i<count; i++ )
+    {
+        sine->samples[i] = (pj_int16_t) (10000.0 * 
+		sin(((double)i/(double)count) * M_PI * 8.) );
+    }
+
+    *p_port = port;
+
+    return PJ_SUCCESS;
+}
+
+
+/* Show usage */
+static void usage(void)
+{
+    puts("");
+    puts("Usage: playsine [nchannel]");
+    puts("");
+    puts("where");
+    puts(" nchannel is number of audio channels (1 for mono, or 2 for stereo).");
+    puts(" Default is 1 (mono).");
+    puts("");
+}
+
+
+/*
+ * main()
+ */
+int main(int argc, char *argv[])
+{
+    pj_caching_pool cp;
+    pjmedia_endpt *med_endpt;
+    pj_pool_t *pool;
+    pjmedia_port *sine_port;
+    pjmedia_snd_port *snd_port;
+    char tmp[10];
+    int channel_count = 1;
+    pj_status_t status;
+
+    if (argc == 2) {
+	channel_count = atoi(argv[1]);
+	if (channel_count < 1 || channel_count > 2) {
+	    puts("Error: invalid arguments");
+	    usage();
+	    return 1;
+	}
+    }
+
+    /* Must init PJLIB first: */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+
+    /* 
+     * Initialize media endpoint.
+     * This will implicitly initialize PJMEDIA too.
+     */
+    status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Create memory pool for our sine generator */
+    pool = pj_pool_create( &cp.factory,	    /* pool factory	    */
+			   "wav",	    /* pool name.	    */
+			   4000,	    /* init size	    */
+			   4000,	    /* increment size	    */
+			   NULL		    /* callback on error    */
+			   );
+
+    /* Create a media port to generate sine wave samples. */
+    status = create_sine_port( pool,	    /* memory pool	    */
+			       11025,	    /* sampling rate	    */
+			       channel_count,/* # of channels	    */
+			       &sine_port   /* returned port	    */
+		             );
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to create sine port", status);
+	return 1;
+    }
+
+    /* Create sound player port. */
+    status = pjmedia_snd_port_create_player( 
+		 pool,				    /* pool		    */
+		 -1,				    /* use default dev.	    */
+		 sine_port->info.clock_rate,	    /* clock rate.	    */
+		 sine_port->info.channel_count,	    /* # of channels.	    */
+		 sine_port->info.samples_per_frame, /* samples per frame.   */
+		 sine_port->info.bits_per_sample,   /* bits per sample.	    */
+		 0,				    /* options		    */
+		 &snd_port			    /* returned port	    */
+		 );
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to open sound device", status);
+	return 1;
+    }
+
+    /* Connect sine generator port to the sound player 
+     * Stream playing will commence immediately.
+     */
+    status = pjmedia_snd_port_connect( snd_port, sine_port);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+
+    /* 
+     * Audio should be playing in a loop now, using sound device's thread. 
+     */
+
+
+    /* Sleep to allow log messages to flush */
+    pj_thread_sleep(100);
+
+
+    puts("Playing sine wave..");
+    puts("");
+    puts("Press <ENTER> to stop playing and quit");
+
+    fgets(tmp, sizeof(tmp), stdin);
+
+    
+    /* Start deinitialization: */
+
+    /* Disconnect sound port from file port */
+    status = pjmedia_snd_port_disconnect(snd_port);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Without this sleep, Windows/DirectSound will repeteadly
+     * play the last frame during destroy.
+     */
+    pj_thread_sleep(100);
+
+    /* Destroy sound device */
+    status = pjmedia_snd_port_destroy( snd_port );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Destroy sine generator */
+    status = pjmedia_port_destroy( sine_port );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Release application pool */
+    pj_pool_release( pool );
+
+    /* Destroy media endpoint. */
+    pjmedia_endpt_destroy( med_endpt );
+
+    /* Destroy pool factory */
+    pj_caching_pool_destroy( &cp );
+
+    /* Shutdown PJLIB */
+    pj_shutdown();
+
+
+    /* Done. */
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/proxy.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/proxy.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/proxy.h	(revision 1163)
@@ -0,0 +1,526 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip.h>
+#include <pjlib-util.h>
+#include <pjlib.h>
+
+
+/* Options */
+static struct global_struct
+{
+    pj_caching_pool	 cp;
+    pjsip_endpoint	*endpt;
+    int			 port;
+    pj_pool_t		*pool;
+
+    pj_thread_t		*thread;
+    pj_bool_t		 quit_flag;
+
+    pj_bool_t		 record_route;
+
+    unsigned		 name_cnt;
+    pjsip_host_port	 name[16];
+} global;
+
+
+
+static void app_perror(const char *msg, pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    pj_strerror(status, errmsg, sizeof(errmsg));
+    PJ_LOG(1,(THIS_FILE, "%s: %s", msg, errmsg));
+}
+
+
+static void usage(void)
+{
+    puts("Options:\n"
+	 "\n"
+	 " -p, --port N       Set local listener port to N\n"
+	 " -R, --rr           Perform record routing\n"
+	 " -L, --log-level N  Set log level to N (default: 4)\n"
+	 " -h, --help         Show this help screen\n"
+	 );
+}
+
+
+static pj_status_t init_options(int argc, char *argv[])
+{
+    struct pj_getopt_option long_opt[] = {
+	{ "port",	1, 0, 'p'},
+	{ "rr",		0, 0, 'R'},
+	{ "log-level",	1, 0, 'L'},
+	{ "help",	0, 0, 'h'},
+	{ NULL,		0, 0, 0}
+    };
+    int c;
+    int opt_ind;
+
+    pj_optind = 0;
+    while((c=pj_getopt_long(argc, argv, "p:L:Rh", long_opt, &opt_ind))!=-1) {
+	switch (c) {
+	case 'p':
+	    global.port = atoi(pj_optarg);
+	    printf("Port is set to %d\n", global.port);
+	    break;
+	
+	case 'R':
+	    global.record_route = PJ_TRUE;
+	    printf("Using record route mode\n");
+	    break;
+
+	case 'L':
+	    pj_log_set_level(atoi(pj_optarg));
+	    break;
+
+	case 'h':
+	    usage();
+	    return -1;
+
+	default:
+	    puts("Unknown option. Run with --help for help.");
+	    return -1;
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*****************************************************************************
+ * This is a very simple PJSIP module, whose sole purpose is to display
+ * incoming and outgoing messages to log. This module will have priority
+ * higher than transport layer, which means:
+ *
+ *  - incoming messages will come to this module first before reaching
+ *    transaction layer.
+ *
+ *  - outgoing messages will come to this module last, after the message
+ *    has been 'printed' to contiguous buffer by transport layer and
+ *    appropriate transport instance has been decided for this message.
+ *
+ */
+
+/* Notification on incoming messages */
+static pj_bool_t logging_on_rx_msg(pjsip_rx_data *rdata)
+{
+    PJ_LOG(5,(THIS_FILE, "RX %d bytes %s from %s %s:%d:\n"
+			 "%.*s\n"
+			 "--end msg--",
+			 rdata->msg_info.len,
+			 pjsip_rx_data_get_info(rdata),
+			 rdata->tp_info.transport->type_name,
+			 rdata->pkt_info.src_name,
+			 rdata->pkt_info.src_port,
+			 (int)rdata->msg_info.len,
+			 rdata->msg_info.msg_buf));
+    
+    /* Always return false, otherwise messages will not get processed! */
+    return PJ_FALSE;
+}
+
+/* Notification on outgoing messages */
+static pj_status_t logging_on_tx_msg(pjsip_tx_data *tdata)
+{
+    
+    /* Important note:
+     *	tp_info field is only valid after outgoing messages has passed
+     *	transport layer. So don't try to access tp_info when the module
+     *	has lower priority than transport layer.
+     */
+
+    PJ_LOG(5,(THIS_FILE, "TX %d bytes %s to %s %s:%d:\n"
+			 "%.*s\n"
+			 "--end msg--",
+			 (tdata->buf.cur - tdata->buf.start),
+			 pjsip_tx_data_get_info(tdata),
+			 tdata->tp_info.transport->type_name,
+			 tdata->tp_info.dst_name,
+			 tdata->tp_info.dst_port,
+			 (int)(tdata->buf.cur - tdata->buf.start),
+			 tdata->buf.start));
+
+    /* Always return success, otherwise message will not get sent! */
+    return PJ_SUCCESS;
+}
+
+/* The module instance. */
+static pjsip_module mod_msg_logger = 
+{
+    NULL, NULL,				/* prev, next.		*/
+    { "mod-msg-logger", 14 },		/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_TRANSPORT_LAYER-1,/* Priority	        */
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    &logging_on_rx_msg,			/* on_rx_request()	*/
+    &logging_on_rx_msg,			/* on_rx_response()	*/
+    &logging_on_tx_msg,			/* on_tx_request.	*/
+    &logging_on_tx_msg,			/* on_tx_response()	*/
+    NULL,				/* on_tsx_state()	*/
+
+};
+
+
+static pj_status_t init_stack(void)
+{
+    pj_status_t status;
+
+    /* Must init PJLIB first: */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Then init PJLIB-UTIL: */
+    status = pjlib_util_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&global.cp, &pj_pool_factory_default_policy, 0);
+
+    /* Create the endpoint: */
+    status = pjsip_endpt_create(&global.cp.factory, NULL, &global.endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Init transaction layer for stateful proxy only */
+#if STATEFUL
+    status = pjsip_tsx_layer_init_module(global.endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+#endif
+
+    /* Create listening transport */
+    {
+	pj_sockaddr_in addr;
+
+	addr.sin_family = PJ_AF_INET;
+	addr.sin_addr.s_addr = 0;
+	addr.sin_port = pj_htons((pj_uint16_t)global.port);
+
+	status = pjsip_udp_transport_start( global.endpt, &addr, 
+					    NULL, 1, NULL);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    /* Create pool for the application */
+    global.pool = pj_pool_create(&global.cp.factory, "proxyapp", 
+				 4000, 4000, NULL);
+
+    /* Register the logger module */
+    pjsip_endpt_register_module(global.endpt, &mod_msg_logger);
+
+    return PJ_SUCCESS;
+}
+
+
+static pj_status_t init_proxy(void)
+{
+    pj_in_addr addr;
+    unsigned i;
+
+    /* List all names matching local endpoint.
+     * Note that PJLIB version 0.6 and newer has a function to
+     * enumerate local IP interface (pj_enum_ip_interface()), so
+     * by using it would be possible to list all IP interfaces in
+     * this host.
+     */
+
+    /* The first address is important since this would be the one
+     * to be added in Record-Route.
+     */
+    if (pj_gethostip(&addr) == PJ_SUCCESS) {
+	pj_strdup2(global.pool, &global.name[global.name_cnt].host,
+		   pj_inet_ntoa(addr));
+	global.name[global.name_cnt].port = global.port;
+	global.name_cnt++;
+    }
+
+    global.name[global.name_cnt].host = pj_str("127.0.0.1");
+    global.name[global.name_cnt].port = global.port;
+    global.name_cnt++;
+
+    global.name[global.name_cnt].host = *pj_gethostname();
+    global.name[global.name_cnt].port = global.port;
+    global.name_cnt++;
+
+    global.name[global.name_cnt].host = pj_str("localhost");
+    global.name[global.name_cnt].port = global.port;
+    global.name_cnt++;
+
+    PJ_LOG(3,(THIS_FILE, "Proxy started, listening on port %d", global.port));
+    PJ_LOG(3,(THIS_FILE, "Local host aliases:"));
+    for (i=0; i<global.name_cnt; ++i) {
+	PJ_LOG(3,(THIS_FILE, " %.*s:%d", 
+		  (int)global.name[i].host.slen,
+		  global.name[i].host.ptr,
+		  global.name[i].port));
+    }
+
+    if (global.record_route) {
+	PJ_LOG(3,(THIS_FILE, "Using Record-Route mode"));
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+#if PJ_HAS_THREADS
+static int worker_thread(void *p)
+{
+    pj_time_val delay = {0, 10};
+
+    PJ_UNUSED_ARG(p);
+
+    while (!global.quit_flag) {
+	pjsip_endpt_handle_events(global.endpt, &delay);
+    }
+
+    return 0;
+}
+#endif
+
+
+/* Utility to determine if URI is local to this host. */
+static pj_bool_t is_uri_local(const pjsip_sip_uri *uri)
+{
+    unsigned i;
+    for (i=0; i<global.name_cnt; ++i) {
+	if ((uri->port == global.name[i].port ||
+	     (uri->port==0 && global.name[i].port==5060)) &&
+	    pj_stricmp(&uri->host, &global.name[i].host)==0)
+	{
+	    /* Match */
+	    return PJ_TRUE;
+	}
+    }
+
+    /* Doesn't match */
+    return PJ_FALSE;
+}
+
+
+/* Proxy utility to verify incoming requests.
+ * Return non-zero if verification failed.
+ */
+static pj_status_t proxy_verify_request(pjsip_rx_data *rdata)
+{
+    const pj_str_t STR_PROXY_REQUIRE = {"Proxy-Require", 13};
+
+    /* RFC 3261 Section 16.3 Request Validation */
+
+    /* Before an element can proxy a request, it MUST verify the message's
+     * validity.  A valid message must pass the following checks:
+     * 
+     * 1. Reasonable Syntax
+     * 2. URI scheme
+     * 3. Max-Forwards
+     * 4. (Optional) Loop Detection
+     * 5. Proxy-Require
+     * 6. Proxy-Authorization
+     */
+
+    /* 1. Reasonable Syntax.
+     * This would have been checked by transport layer.
+     */
+
+    /* 2. URI scheme.
+     * We only want to support "sip:" URI scheme for this simple proxy.
+     */
+    if (!PJSIP_URI_SCHEME_IS_SIP(rdata->msg_info.msg->line.req.uri)) {
+	pjsip_endpt_respond_stateless(global.endpt, rdata, 
+				      PJSIP_SC_UNSUPPORTED_URI_SCHEME, NULL,
+				      NULL, NULL);
+	return PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_UNSUPPORTED_URI_SCHEME);
+    }
+
+    /* 3. Max-Forwards.
+     * Send error if Max-Forwards is 1 or lower.
+     */
+    if (rdata->msg_info.max_fwd && rdata->msg_info.max_fwd->ivalue <= 1) {
+	pjsip_endpt_respond_stateless(global.endpt, rdata, 
+				      PJSIP_SC_TOO_MANY_HOPS, NULL,
+				      NULL, NULL);
+	return PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_TOO_MANY_HOPS);
+    }
+
+    /* 4. (Optional) Loop Detection.
+     * Nah, we don't do that with this simple proxy.
+     */
+
+    /* 5. Proxy-Require */
+    if (pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &STR_PROXY_REQUIRE, 
+				   NULL) != NULL) 
+    {
+	pjsip_endpt_respond_stateless(global.endpt, rdata, 
+				      PJSIP_SC_BAD_EXTENSION, NULL,
+				      NULL, NULL);
+	return PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_BAD_EXTENSION);
+    }
+
+    /* 6. Proxy-Authorization.
+     * Nah, we don't require any authorization with this sample.
+     */
+
+    return PJ_SUCCESS;
+}
+
+
+/* Process route information in the reqeust */
+static pj_status_t proxy_process_routing(pjsip_tx_data *tdata)
+{
+    pjsip_sip_uri *target;
+    pjsip_route_hdr *hroute;
+
+    /* RFC 3261 Section 16.4 Route Information Preprocessing */
+
+    target = (pjsip_sip_uri*) tdata->msg->line.req.uri;
+
+    /* The proxy MUST inspect the Request-URI of the request.  If the
+     * Request-URI of the request contains a value this proxy previously
+     * placed into a Record-Route header field (see Section 16.6 item 4),
+     * the proxy MUST replace the Request-URI in the request with the last
+     * value from the Route header field, and remove that value from the
+     * Route header field.  The proxy MUST then proceed as if it received
+     * this modified request.
+     */
+    /* Nah, we don't want to support this */
+
+    /* If the Request-URI contains a maddr parameter, the proxy MUST check
+     * to see if its value is in the set of addresses or domains the proxy
+     * is configured to be responsible for.  If the Request-URI has a maddr
+     * parameter with a value the proxy is responsible for, and the request
+     * was received using the port and transport indicated (explicitly or by
+     * default) in the Request-URI, the proxy MUST strip the maddr and any
+     * non-default port or transport parameter and continue processing as if
+     * those values had not been present in the request.
+     */
+    if (target->maddr_param.slen != 0) {
+	pjsip_sip_uri maddr_uri;
+
+	maddr_uri.host = target->maddr_param;
+	maddr_uri.port = global.port;
+
+	if (is_uri_local(&maddr_uri)) {
+	    target->maddr_param.slen = 0;
+	    target->port = 0;
+	    target->transport_param.slen = 0;
+	}
+    }
+
+    /* If the first value in the Route header field indicates this proxy,
+     * the proxy MUST remove that value from the request.
+     */
+    hroute = (pjsip_route_hdr*) 
+	      pjsip_msg_find_hdr(tdata->msg, PJSIP_H_ROUTE, NULL);
+    if (hroute && is_uri_local((pjsip_sip_uri*)hroute->name_addr.uri)) {
+	pj_list_erase(hroute);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/* Postprocess the request before forwarding it */
+static void proxy_postprocess(pjsip_tx_data *tdata)
+{
+    /* Optionally record-route */
+    if (global.record_route) {
+	char uribuf[128];
+	pj_str_t uri;
+	const pj_str_t H_RR = { "Record-Route", 12 };
+	pjsip_generic_string_hdr *rr;
+
+	pj_ansi_snprintf(uribuf, sizeof(uribuf), "<sip:%.*s:%d;lr>",
+			 (int)global.name[0].host.slen,
+			 global.name[0].host.ptr,
+			 global.name[0].port);
+	uri = pj_str(uribuf);
+	rr = pjsip_generic_string_hdr_create(tdata->pool,
+					     &H_RR, &uri);
+	pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)rr);
+    }
+}
+
+
+/* Calculate new target for the request */
+static pj_status_t proxy_calculate_target(pjsip_rx_data *rdata,
+					  pjsip_tx_data *tdata)
+{
+    pjsip_sip_uri *target;
+
+    /* RFC 3261 Section 16.5 Determining Request Targets */
+
+    target = (pjsip_sip_uri*) tdata->msg->line.req.uri;
+
+    /* If the Request-URI of the request contains an maddr parameter, the
+     * Request-URI MUST be placed into the target set as the only target
+     * URI, and the proxy MUST proceed to Section 16.6.
+     */
+    if (target->maddr_param.slen) {
+	proxy_postprocess(tdata);
+	return PJ_SUCCESS;
+    }
+
+
+    /* If the domain of the Request-URI indicates a domain this element is
+     * not responsible for, the Request-URI MUST be placed into the target
+     * set as the only target, and the element MUST proceed to the task of
+     * Request Forwarding (Section 16.6).
+     */
+    if (!is_uri_local(target)) {
+	proxy_postprocess(tdata);
+	return PJ_SUCCESS;
+    }
+
+    /* If the target set for the request has not been predetermined as
+     * described above, this implies that the element is responsible for the
+     * domain in the Request-URI, and the element MAY use whatever mechanism
+     * it desires to determine where to send the request. 
+     */
+
+    /* We're not interested to receive request destined to us, so
+     * respond with 404/Not Found (only if request is not ACK!).
+     */
+    if (rdata->msg_info.msg->line.req.method.id != PJSIP_ACK_METHOD) {
+	pjsip_endpt_respond_stateless(global.endpt, rdata,
+				      PJSIP_SC_NOT_FOUND, NULL,
+				      NULL, NULL);
+    }
+
+    /* Delete the request since we're not forwarding it */
+    pjsip_tx_data_dec_ref(tdata);
+
+    return PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_NOT_FOUND);
+}
+
+
+/* Destroy stack */
+static void destroy_stack(void)
+{
+    pjsip_endpt_destroy(global.endpt);
+    pj_pool_release(global.pool);
+    pj_caching_pool_destroy(&global.cp);
+
+    pj_shutdown();
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/recfile.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/recfile.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/recfile.c	(revision 1163)
@@ -0,0 +1,199 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/**
+ * \page page_pjmedia_samples_recfile_c Samples: Capturing Audio to WAV File
+ *
+ * In this example, we capture audio from the sound device and save it to
+ * WAVE file.
+ *
+ * @see page_pjmedia_samples_playfile_c
+ *
+ * This file is pjsip-apps/src/samples/recfile.c
+ *
+ * \includelineno recfile.c
+ */
+
+#include <pjmedia.h>
+#include <pjlib.h>
+
+#include <stdio.h>
+
+/* For logging purpose. */
+#define THIS_FILE   "recfile.c"
+
+
+/* Configs */
+#define CLOCK_RATE	    44100
+#define SAMPLES_PER_FRAME   (CLOCK_RATE * 20 / 1000)
+#define NCHANNELS	    2
+#define BITS_PER_SAMPLE	    16
+
+
+static const char *desc = 
+ " FILE					    \n"
+ "  recfile.c				    \n"
+ "					    \n"
+ " PURPOSE:				    \n"
+ "  Record microphone to WAVE file.	    \n"
+ "					    \n"
+ " USAGE:				    \n"
+ "  recfile FILE.WAV			    \n"
+ "";
+
+
+/* Util to display the error message for the specified error code  */
+static int app_perror( const char *sender, const char *title, 
+		       pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    PJ_UNUSED_ARG(sender);
+
+    pj_strerror(status, errmsg, sizeof(errmsg));
+
+    printf("%s: %s [code=%d]\n", title, errmsg, status);
+    return 1;
+}
+
+
+/*
+ * main()
+ */
+int main(int argc, char *argv[])
+{
+    pj_caching_pool cp;
+    pjmedia_endpt *med_endpt;
+    pj_pool_t *pool;
+    pjmedia_port *file_port;
+    pjmedia_snd_port *snd_port;
+    char tmp[10];
+    pj_status_t status;
+
+
+    /* Verify cmd line arguments. */
+    if (argc != 2) {
+	puts("");
+	puts(desc);
+	return 0;
+    }
+
+    /* Must init PJLIB first: */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+
+    /* 
+     * Initialize media endpoint.
+     * This will implicitly initialize PJMEDIA too.
+     */
+    status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Create memory pool for our file player */
+    pool = pj_pool_create( &cp.factory,	    /* pool factory	    */
+			   "app",	    /* pool name.	    */
+			   4000,	    /* init size	    */
+			   4000,	    /* increment size	    */
+			   NULL		    /* callback on error    */
+			   );
+
+    /* Create WAVE file writer port. */
+    status = pjmedia_wav_writer_port_create(  pool, argv[1],
+					      CLOCK_RATE,
+					      NCHANNELS,
+					      SAMPLES_PER_FRAME,
+					      BITS_PER_SAMPLE,
+					      0, 0, 
+					      &file_port);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to open WAV file for writing", status);
+	return 1;
+    }
+
+    /* Create sound player port. */
+    status = pjmedia_snd_port_create_rec( 
+		 pool,				    /* pool		    */
+		 -1,				    /* use default dev.	    */
+		 file_port->info.clock_rate,	    /* clock rate.	    */
+		 file_port->info.channel_count,	    /* # of channels.	    */
+		 file_port->info.samples_per_frame, /* samples per frame.   */
+		 file_port->info.bits_per_sample,   /* bits per sample.	    */
+		 0,				    /* options		    */
+		 &snd_port			    /* returned port	    */
+		 );
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to open sound device", status);
+	return 1;
+    }
+
+    /* Connect file port to the sound player.
+     * Stream playing will commence immediately.
+     */
+    status = pjmedia_snd_port_connect( snd_port, file_port);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+
+    /* 
+     * Recording should be started now. 
+     */
+
+
+    /* Sleep to allow log messages to flush */
+    pj_thread_sleep(10);
+
+
+    printf("Recodring %s..\n", argv[1]);
+    puts("");
+    puts("Press <ENTER> to stop recording and quit");
+
+    fgets(tmp, sizeof(tmp), stdin);
+
+    
+    /* Start deinitialization: */
+
+    /* Destroy sound device */
+    status = pjmedia_snd_port_destroy( snd_port );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Destroy file port */
+    status = pjmedia_port_destroy( file_port );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Release application pool */
+    pj_pool_release( pool );
+
+    /* Destroy media endpoint. */
+    pjmedia_endpt_destroy( med_endpt );
+
+    /* Destroy pool factory */
+    pj_caching_pool_destroy( &cp );
+
+    /* Shutdown PJLIB */
+    pj_shutdown();
+
+
+    /* Done. */
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/resampleplay.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/resampleplay.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/resampleplay.c	(revision 1163)
@@ -0,0 +1,229 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/**
+ * \page page_pjmedia_samples_resampleplay_c Samples: Using Resample Port
+ *
+ * This example demonstrates how to use @ref PJMEDIA_RESAMPLE_PORT to
+ * change the sampling rate of the media streams.
+ *
+ * This file is pjsip-apps/src/samples/resampleplay.c
+ *
+ * \includelineno resampleplay.c
+ */
+
+#include <pjmedia.h>
+#include <pjlib-util.h>
+#include <pjlib.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "util.h"
+
+/* For logging purpose. */
+#define THIS_FILE   "resampleplay.c"
+
+
+static const char *desc = 
+" FILE		    						    \n"
+"		    						    \n"
+"  resampleplay.c	    					    \n"
+"		    						    \n"
+" PURPOSE	    						    \n"
+"		    						    \n"
+"  Demonstrate how use resample port to play a WAV file to sound    \n"
+"  device using different sampling rate.			    \n"
+"		    						    \n"
+" USAGE		    						    \n"
+"		    						    \n"
+"  resampleplay [options] FILE.WAV				    \n"
+"		    						    \n"
+" where options:						    \n"
+SND_USAGE
+"		    						    \n"
+"  The WAV file could have mono or stereo channels with arbitrary   \n"
+"  sampling rate, but MUST contain uncompressed (i.e. 16bit) PCM.   \n";
+
+
+int main(int argc, char *argv[])
+{
+    pj_caching_pool cp;
+    pjmedia_endpt *med_endpt;
+    pj_pool_t *pool;
+    pjmedia_port *file_port;
+    pjmedia_port *resample_port;
+    pjmedia_snd_port *snd_port;
+    char tmp[10];
+    pj_status_t status;
+
+    int dev_id = -1;
+    int sampling_rate = CLOCK_RATE;
+    int channel_count = NCHANNELS;
+    int samples_per_frame = NSAMPLES;
+    int bits_per_sample = NBITS;
+    //int ptime;
+    //int down_samples;
+
+    /* Must init PJLIB first: */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Get options */
+    if (get_snd_options(THIS_FILE, argc, argv, &dev_id, &sampling_rate,
+			&channel_count, &samples_per_frame, &bits_per_sample))
+    {
+	puts("");
+	puts(desc);
+	return 1;
+    }
+
+    if (!argv[pj_optind]) {
+	puts("Error: no file is specified");
+	puts(desc);
+	return 1;
+    }
+
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+
+    /* 
+     * Initialize media endpoint.
+     * This will implicitly initialize PJMEDIA too.
+     */
+    status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Create memory pool for our file player */
+    pool = pj_pool_create( &cp.factory,	    /* pool factory	    */
+			   "app",	    /* pool name.	    */
+			   4000,	    /* init size	    */
+			   4000,	    /* increment size	    */
+			   NULL		    /* callback on error    */
+			   );
+
+    /* Create the file port. */
+    status = pjmedia_wav_player_port_create( pool, argv[pj_optind], 0, 0,
+					     0, &file_port);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to open file", status);
+	return 1;
+    }
+
+    /* File must have same number of channels. */
+    if (file_port->info.channel_count != (unsigned)channel_count) {
+	PJ_LOG(3,(THIS_FILE, "Error: file has different number of channels. "
+			     "Perhaps you'd need -c option?"));
+	pjmedia_port_destroy(file_port);
+	return 1;
+    }
+
+    /* Calculate number of samples per frame to be taken from file port */
+    //ptime = samples_per_frame * 1000 / sampling_rate;
+
+    /* Create the resample port. */
+    status = pjmedia_resample_port_create( pool, file_port,
+					   sampling_rate, 0,
+					   &resample_port);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to create resample port", status);
+	return 1;
+    }
+
+    /* Create sound player port. */
+    status = pjmedia_snd_port_create( 
+		 pool,			/* pool			    */
+		 dev_id,		/* device		    */
+		 dev_id,		/* device		    */
+		 sampling_rate,		/* clock rate.		    */
+		 channel_count,		/* # of channels.	    */
+		 samples_per_frame,	/* samples per frame.	    */
+		 bits_per_sample,	/* bits per sample.	    */
+		 0,			/* options		    */
+		 &snd_port		/* returned port	    */
+		 );
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to open sound device", status);
+	return 1;
+    }
+
+    /* Connect resample port to sound device */
+    status = pjmedia_snd_port_connect( snd_port, resample_port);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Error connecting sound ports", status);
+	return 1;
+    }
+
+
+    /* Dump memory usage */
+    dump_pool_usage(THIS_FILE, &cp);
+
+    /* 
+     * File should be playing and looping now, using sound device's thread. 
+     */
+
+
+    /* Sleep to allow log messages to flush */
+    pj_thread_sleep(100);
+
+
+    printf("Playing %s at sampling rate %d (original file sampling rate=%d)\n",
+	   argv[pj_optind], sampling_rate, file_port->info.clock_rate);
+    puts("");
+    puts("Press <ENTER> to stop playing and quit");
+
+    fgets(tmp, sizeof(tmp), stdin);
+
+    
+    /* Start deinitialization: */
+
+
+    /* Destroy sound device */
+    status = pjmedia_snd_port_destroy( snd_port );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Destroy resample port. 
+     * This will destroy all downstream ports (e.g. the file port)
+     */
+    status = pjmedia_port_destroy( resample_port );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Release application pool */
+    pj_pool_release( pool );
+
+    /* Destroy media endpoint. */
+    pjmedia_endpt_destroy( med_endpt );
+
+    /* Destroy pool factory */
+    pj_caching_pool_destroy( &cp );
+
+    /* Shutdown PJLIB */
+    pj_shutdown();
+
+
+    /* Done. */
+    return 0;
+
+}
+
+
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/simple_pjsua.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/simple_pjsua.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/simple_pjsua.c	(revision 1163)
@@ -0,0 +1,197 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/**
+ * simple_pjsua.c
+ *
+ * This is a very simple but fully featured SIP user agent, with the 
+ * following capabilities:
+ *  - SIP registration
+ *  - Making and receiving call
+ *  - Audio/media to sound device.
+ *
+ * Usage:
+ *  - To make outgoing call, start simple_pjsua with the URL of remote
+ *    destination to contact.
+ *    E.g.:
+ *	 simpleua sip:user@remote
+ *
+ *  - Incoming calls will automatically be answered with 200.
+ *
+ * This program will quit once it has completed a single call.
+ */
+
+#include <pjsua-lib/pjsua.h>
+
+#define THIS_FILE	"APP"
+
+#define SIP_DOMAIN	"example.com"
+#define SIP_USER	"alice"
+#define SIP_PASSWD	"secret"
+
+
+/* Callback called by the library upon receiving incoming call */
+static void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id,
+			     pjsip_rx_data *rdata)
+{
+    pjsua_call_info ci;
+
+    PJ_UNUSED_ARG(acc_id);
+    PJ_UNUSED_ARG(rdata);
+
+    pjsua_call_get_info(call_id, &ci);
+
+    PJ_LOG(3,(THIS_FILE, "Incoming call from %.*s!!",
+			 (int)ci.remote_info.slen,
+			 ci.remote_info.ptr));
+
+    /* Automatically answer incoming calls with 200/OK */
+    pjsua_call_answer(call_id, 200, NULL, NULL);
+}
+
+/* Callback called by the library when call's state has changed */
+static void on_call_state(pjsua_call_id call_id, pjsip_event *e)
+{
+    pjsua_call_info ci;
+
+    PJ_UNUSED_ARG(e);
+
+    pjsua_call_get_info(call_id, &ci);
+    PJ_LOG(3,(THIS_FILE, "Call %d state=%.*s", call_id,
+			 (int)ci.state_text.slen,
+			 ci.state_text.ptr));
+}
+
+/* Callback called by the library when call's media state has changed */
+static void on_call_media_state(pjsua_call_id call_id)
+{
+    pjsua_call_info ci;
+
+    pjsua_call_get_info(call_id, &ci);
+
+    if (ci.media_status == PJSUA_CALL_MEDIA_ACTIVE) {
+	// When media is active, connect call to sound device.
+	pjsua_conf_connect(ci.conf_slot, 0);
+	pjsua_conf_connect(0, ci.conf_slot);
+    }
+}
+
+/* Display error and exit application */
+static void error_exit(const char *title, pj_status_t status)
+{
+    pjsua_perror(THIS_FILE, title, status);
+    pjsua_destroy();
+    exit(1);
+}
+
+/*
+ * main()
+ *
+ * argv[1] may contain URL to call.
+ */
+int main(int argc, char *argv[])
+{
+    pjsua_acc_id acc_id;
+    pj_status_t status;
+
+    /* Create pjsua first! */
+    status = pjsua_create();
+    if (status != PJ_SUCCESS) error_exit("Error in pjsua_create()", status);
+
+    /* If argument is specified, it's got to be a valid SIP URL */
+    if (argc > 1) {
+	status = pjsua_verify_sip_url(argv[1]);
+	if (status != PJ_SUCCESS) error_exit("Invalid URL in argv", status);
+    }
+
+    /* Init pjsua */
+    {
+	pjsua_config cfg;
+	pjsua_logging_config log_cfg;
+
+	pjsua_config_default(&cfg);
+	cfg.cb.on_incoming_call = &on_incoming_call;
+	cfg.cb.on_call_media_state = &on_call_media_state;
+	cfg.cb.on_call_state = &on_call_state;
+
+	pjsua_logging_config_default(&log_cfg);
+	log_cfg.console_level = 4;
+
+	status = pjsua_init(&cfg, &log_cfg, NULL);
+	if (status != PJ_SUCCESS) error_exit("Error in pjsua_init()", status);
+    }
+
+    /* Add UDP transport. */
+    {
+	pjsua_transport_config cfg;
+
+	pjsua_transport_config_default(&cfg);
+	cfg.port = 5060;
+	status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &cfg, NULL);
+	if (status != PJ_SUCCESS) error_exit("Error creating transport", status);
+    }
+
+    /* Initialization is done, now start pjsua */
+    status = pjsua_start();
+    if (status != PJ_SUCCESS) error_exit("Error starting pjsua", status);
+
+    /* Register to SIP server by creating SIP account. */
+    {
+	pjsua_acc_config cfg;
+
+	pjsua_acc_config_default(&cfg);
+	cfg.id = pj_str("sip:" SIP_USER "@" SIP_DOMAIN);
+	cfg.reg_uri = pj_str("sip:" SIP_DOMAIN);
+	cfg.cred_count = 1;
+	cfg.cred_info[0].realm = pj_str(SIP_DOMAIN);
+	cfg.cred_info[0].scheme = pj_str("digest");
+	cfg.cred_info[0].username = pj_str(SIP_USER);
+	cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
+	cfg.cred_info[0].data = pj_str(SIP_PASSWD);
+
+	status = pjsua_acc_add(&cfg, PJ_TRUE, &acc_id);
+	if (status != PJ_SUCCESS) error_exit("Error adding account", status);
+    }
+
+    /* If URL is specified, make call to the URL. */
+    if (argc > 1) {
+	pj_str_t uri = pj_str(argv[1]);
+	status = pjsua_call_make_call(acc_id, &uri, 0, NULL, NULL, NULL);
+	if (status != PJ_SUCCESS) error_exit("Error making call", status);
+    }
+
+    /* Wait until user press "q" to quit. */
+    for (;;) {
+	char option[10];
+
+	puts("Press 'h' to hangup all calls, 'q' to quit");
+	fgets(option, sizeof(option), stdin);
+
+	if (option[0] == 'q')
+	    break;
+
+	if (option[0] == 'h')
+	    pjsua_call_hangup_all();
+    }
+
+    /* Destroy pjsua */
+    pjsua_destroy();
+
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/simpleua.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/simpleua.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/simpleua.c	(revision 1163)
@@ -0,0 +1,711 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+
+/**
+ * simpleua.c
+ *
+ * This is a very simple SIP user agent complete with media. The user
+ * agent should do a proper SDP negotiation and start RTP media once
+ * SDP negotiation has completed.
+ *
+ * This program does not register to SIP server.
+ *
+ * Capabilities to be demonstrated here:
+ *  - Basic call
+ *  - UDP transport at port 5060 (hard coded)
+ *  - RTP socket at port 4000 (hard coded)
+ *  - proper SDP negotiation
+ *  - PCMA/PCMU codec only.
+ *  - Audio/media to sound device.
+ *
+ *
+ * Usage:
+ *  - To make outgoing call, start simpleua with the URL of remote
+ *    destination to contact.
+ *    E.g.:
+ *	 simpleua sip:user@remote
+ *
+ *  - Incoming calls will automatically be answered with 180, then 200.
+ *
+ * This program does not disconnect call.
+ *
+ * This program will quit once it has completed a single call.
+ */
+
+/* Include all headers. */
+#include <pjsip.h>
+#include <pjmedia.h>
+#include <pjmedia-codec.h>
+#include <pjsip_ua.h>
+#include <pjsip_simple.h>
+#include <pjlib-util.h>
+#include <pjlib.h>
+
+/* For logging purpose. */
+#define THIS_FILE   "simpleua.c"
+
+#include "util.h"
+
+/*
+ * Static variables.
+ */
+
+static pj_bool_t	     g_complete;    /* Quit flag.		*/
+static pjsip_endpoint	    *g_endpt;	    /* SIP endpoint.		*/
+static pj_caching_pool	     cp;	    /* Global pool factory.	*/
+
+static pjmedia_endpt	    *g_med_endpt;   /* Media endpoint.		*/
+static pjmedia_sock_info     g_med_skinfo;  /* Socket info for media	*/
+static pjmedia_transport    *g_med_transport;/* Media stream transport	*/
+
+/* Call variables: */
+static pjsip_inv_session    *g_inv;	    /* Current invite session.	*/
+static pjmedia_session	    *g_med_session; /* Call's media session.	*/
+static pjmedia_snd_port	    *g_snd_player;  /* Call's sound player	*/
+static pjmedia_snd_port	    *g_snd_rec;	    /* Call's sound recorder.	*/
+
+
+/*
+ * Prototypes:
+ */
+
+/* Callback to be called when SDP negotiation is done in the call: */
+static void call_on_media_update( pjsip_inv_session *inv,
+				  pj_status_t status);
+
+/* Callback to be called when invite session's state has changed: */
+static void call_on_state_changed( pjsip_inv_session *inv, 
+				   pjsip_event *e);
+
+/* Callback to be called when dialog has forked: */
+static void call_on_forked(pjsip_inv_session *inv, pjsip_event *e);
+
+/* Callback to be called to handle incoming requests outside dialogs: */
+static pj_bool_t on_rx_request( pjsip_rx_data *rdata );
+
+
+
+
+/* This is a PJSIP module to be registered by application to handle
+ * incoming requests outside any dialogs/transactions. The main purpose
+ * here is to handle incoming INVITE request message, where we will
+ * create a dialog and INVITE session for it.
+ */
+static pjsip_module mod_simpleua =
+{
+    NULL, NULL,			    /* prev, next.		*/
+    { "mod-simpleua", 12 },	    /* Name.			*/
+    -1,				    /* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION, /* Priority			*/
+    NULL,			    /* load()			*/
+    NULL,			    /* start()			*/
+    NULL,			    /* stop()			*/
+    NULL,			    /* unload()			*/
+    &on_rx_request,		    /* on_rx_request()		*/
+    NULL,			    /* on_rx_response()		*/
+    NULL,			    /* on_tx_request.		*/
+    NULL,			    /* on_tx_response()		*/
+    NULL,			    /* on_tsx_state()		*/
+};
+
+
+
+/*
+ * main()
+ *
+ * If called with argument, treat argument as SIP URL to be called.
+ * Otherwise wait for incoming calls.
+ */
+int main(int argc, char *argv[])
+{
+    pj_status_t status;
+
+    /* Must init PJLIB first: */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Then init PJLIB-UTIL: */
+    status = pjlib_util_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+
+
+    /* Create global endpoint: */
+    {
+	const pj_str_t *hostname;
+	const char *endpt_name;
+
+	/* Endpoint MUST be assigned a globally unique name.
+	 * The name will be used as the hostname in Warning header.
+	 */
+
+	/* For this implementation, we'll use hostname for simplicity */
+	hostname = pj_gethostname();
+	endpt_name = hostname->ptr;
+
+	/* Create the endpoint: */
+
+	status = pjsip_endpt_create(&cp.factory, endpt_name, 
+				    &g_endpt);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+    }
+
+
+    /* 
+     * Add UDP transport, with hard-coded port 
+     * Alternatively, application can use pjsip_udp_transport_attach() to
+     * start UDP transport, if it already has an UDP socket (e.g. after it
+     * resolves the address with STUN).
+     */
+    {
+	pj_sockaddr_in addr;
+
+	addr.sin_family = PJ_AF_INET;
+	addr.sin_addr.s_addr = 0;
+	addr.sin_port = pj_htons(5060);
+
+	status = pjsip_udp_transport_start( g_endpt, &addr, NULL, 1, NULL);
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Unable to start UDP transport", status);
+	    return 1;
+	}
+    }
+
+
+    /* 
+     * Init transaction layer.
+     * This will create/initialize transaction hash tables etc.
+     */
+    status = pjsip_tsx_layer_init_module(g_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* 
+     * Initialize UA layer module.
+     * This will create/initialize dialog hash tables etc.
+     */
+    status = pjsip_ua_init_module( g_endpt, NULL );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* 
+     * Init invite session module.
+     * The invite session module initialization takes additional argument,
+     * i.e. a structure containing callbacks to be called on specific
+     * occurence of events.
+     *
+     * The on_state_changed and on_new_session callbacks are mandatory.
+     * Application must supply the callback function.
+     *
+     * We use on_media_update() callback in this application to start
+     * media transmission.
+     */
+    {
+	pjsip_inv_callback inv_cb;
+
+	/* Init the callback for INVITE session: */
+	pj_bzero(&inv_cb, sizeof(inv_cb));
+	inv_cb.on_state_changed = &call_on_state_changed;
+	inv_cb.on_new_session = &call_on_forked;
+	inv_cb.on_media_update = &call_on_media_update;
+
+	/* Initialize invite session module:  */
+	status = pjsip_inv_usage_init(g_endpt, &inv_cb);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+    }
+
+
+    /*
+     * Register our module to receive incoming requests.
+     */
+    status = pjsip_endpt_register_module( g_endpt, &mod_simpleua);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* 
+     * Initialize media endpoint.
+     * This will implicitly initialize PJMEDIA too.
+     */
+#if PJ_HAS_THREADS
+    status = pjmedia_endpt_create(&cp.factory, NULL, 1, &g_med_endpt);
+#else
+    status = pjmedia_endpt_create(&cp.factory, 
+				  pjsip_endpt_get_ioqueue(g_endpt), 
+				  0, &g_med_endpt);
+#endif
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* 
+     * Add PCMA/PCMU codec to the media endpoint. 
+     */
+#if defined(PJMEDIA_HAS_G711_CODEC) && PJMEDIA_HAS_G711_CODEC!=0
+    status = pjmedia_codec_g711_init(g_med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+#endif
+
+    
+    /* 
+     * Create media transport used to send/receive RTP/RTCP socket.
+     * One media transport is needed for each call. Application may
+     * opt to re-use the same media transport for subsequent calls.
+     */
+    status = pjmedia_transport_udp_create(g_med_endpt, NULL, 4000, 0, 
+					  &g_med_transport);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Unable to create media transport", status);
+	return 1;
+    }
+
+    /* 
+     * Get socket info (address, port) of the media transport. We will
+     * need this info to create SDP (i.e. the address and port info in
+     * the SDP).
+     */
+    {
+	pjmedia_transport_udp_info udp_info;
+
+	pjmedia_transport_udp_get_info(g_med_transport, &udp_info);
+	pj_memcpy(&g_med_skinfo, &udp_info.skinfo, 
+		  sizeof(pjmedia_sock_info));
+    }
+
+
+    /*
+     * If URL is specified, then make call immediately.
+     */
+    if (argc > 1) {
+	char temp[80];
+	pj_str_t dst_uri = pj_str(argv[1]);
+	pj_str_t local_uri;
+	pjsip_dialog *dlg;
+	pjmedia_sdp_session *local_sdp;
+	pjsip_tx_data *tdata;
+
+	pj_ansi_sprintf(temp, "sip:simpleuac@%s", pjsip_endpt_name(g_endpt)->ptr);
+	local_uri = pj_str(temp);
+
+	/* Create UAC dialog */
+	status = pjsip_dlg_create_uac( pjsip_ua_instance(), 
+				       &local_uri,  /* local URI */
+				       NULL,	    /* local Contact */
+				       &dst_uri,    /* remote URI */
+				       &dst_uri,    /* remote target */
+				       &dlg);	    /* dialog */
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Unable to create UAC dialog", status);
+	    return 1;
+	}
+
+	/* If we expect the outgoing INVITE to be challenged, then we should
+	 * put the credentials in the dialog here, with something like this:
+	 *
+	    {
+		pjsip_cred_info	cred[1];
+
+		cred[0].realm	  = pj_str("sip.server.realm");
+		cred[0].username  = pj_str("theuser");
+		cred[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
+		cred[0].data      = pj_str("thepassword");
+
+		pjsip_auth_clt_set_credentials( &dlg->auth_sess, 1, cred);
+	    }
+	 *
+	 */
+
+
+	/* If we want the initial INVITE to travel to specific SIP proxies,
+	 * then we should put the initial dialog's route set here. The final
+	 * route set will be updated once a dialog has been established.
+	 * To set the dialog's initial route set, we do it with something
+	 * like this:
+	 *
+	    {
+		pjsip_route_hdr route_set;
+		pjsip_route_hdr *route;
+		const pj_str_t hname = { "Route", 5 };
+		char *uri = "sip:proxy.server;lr";
+
+		pj_list_init(&route_set);
+
+		route = pjsip_parse_hdr( dlg->pool, &hname, 
+					 uri, strlen(uri),
+					 NULL);
+		PJ_ASSERT_RETURN(route != NULL, 1);
+		pj_list_push_back(&route_set, route);
+
+		pjsip_dlg_set_route_set(dlg, &route_set);
+	    }
+	 *
+	 * Note that Route URI SHOULD have an ";lr" parameter!
+	 */
+
+
+	/* Get the SDP body to be put in the outgoing INVITE, by asking
+	 * media endpoint to create one for us. The SDP will contain all
+	 * codecs that have been registered to it (in this case, only
+	 * PCMA and PCMU), plus telephony event.
+	 */
+	status = pjmedia_endpt_create_sdp( g_med_endpt,	    /* the media endpt	*/
+					   dlg->pool,	    /* pool.		*/
+					   1,		    /* # of streams	*/
+					   &g_med_skinfo,   /* RTP sock info	*/
+					   &local_sdp);	    /* the SDP result	*/
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+
+	/* Create the INVITE session, and pass the SDP returned earlier
+	 * as the session's initial capability.
+	 */
+	status = pjsip_inv_create_uac( dlg, local_sdp, 0, &g_inv);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+	/* Create initial INVITE request.
+	 * This INVITE request will contain a perfectly good request and 
+	 * an SDP body as well.
+	 */
+	status = pjsip_inv_invite(g_inv, &tdata);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+
+	/* Send initial INVITE request. 
+	 * From now on, the invite session's state will be reported to us
+	 * via the invite session callbacks.
+	 */
+	status = pjsip_inv_send_msg(g_inv, tdata);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    } else {
+
+	/* No URL to make call to */
+
+	PJ_LOG(3,(THIS_FILE, "Ready to accept incoming calls..."));
+    }
+
+
+    /* Loop until one call is completed */
+    for (;!g_complete;) {
+	pj_time_val timeout = {0, 10};
+	pjsip_endpt_handle_events(g_endpt, &timeout);
+    }
+
+    /* On exit, dump current memory usage: */
+    dump_pool_usage(THIS_FILE, &cp);
+
+    return 0;
+}
+
+
+
+/*
+ * Callback when INVITE session state has changed.
+ * This callback is registered when the invite session module is initialized.
+ * We mostly want to know when the invite session has been disconnected,
+ * so that we can quit the application.
+ */
+static void call_on_state_changed( pjsip_inv_session *inv, 
+				   pjsip_event *e)
+{
+    PJ_UNUSED_ARG(e);
+
+    if (inv->state == PJSIP_INV_STATE_DISCONNECTED) {
+
+	PJ_LOG(3,(THIS_FILE, "Call DISCONNECTED [reason=%d (%s)]", 
+		  inv->cause,
+		  pjsip_get_status_text(inv->cause)->ptr));
+
+	PJ_LOG(3,(THIS_FILE, "One call completed, application quitting..."));
+	g_complete = 1;
+
+    } else {
+
+	PJ_LOG(3,(THIS_FILE, "Call state changed to %s", 
+		  pjsip_inv_state_name(inv->state)));
+
+    }
+}
+
+
+/* This callback is called when dialog has forked. */
+static void call_on_forked(pjsip_inv_session *inv, pjsip_event *e)
+{
+    /* To be done... */
+    PJ_UNUSED_ARG(inv);
+    PJ_UNUSED_ARG(e);
+}
+
+
+/*
+ * Callback when incoming requests outside any transactions and any
+ * dialogs are received. We're only interested to hande incoming INVITE
+ * request, and we'll reject any other requests with 500 response.
+ */
+static pj_bool_t on_rx_request( pjsip_rx_data *rdata )
+{
+    pjsip_dialog *dlg;
+    pjmedia_sdp_session *local_sdp;
+    pjsip_tx_data *tdata;
+    unsigned options = 0;
+    pj_status_t status;
+
+
+    /* 
+     * Respond (statelessly) any non-INVITE requests with 500 
+     */
+    if (rdata->msg_info.msg->line.req.method.id != PJSIP_INVITE_METHOD) {
+
+	if (rdata->msg_info.msg->line.req.method.id != PJSIP_ACK_METHOD) {
+	    pj_str_t reason = pj_str("Simple UA unable to handle "
+				     "this request");
+
+	    pjsip_endpt_respond_stateless( g_endpt, rdata, 
+					   500, &reason,
+					   NULL, NULL);
+	}
+	return PJ_TRUE;
+    }
+
+
+    /*
+     * Reject INVITE if we already have an INVITE session in progress.
+     */
+    if (g_inv) {
+
+	pj_str_t reason = pj_str("Another call is in progress");
+
+	pjsip_endpt_respond_stateless( g_endpt, rdata, 
+				       500, &reason,
+				       NULL, NULL);
+	return PJ_TRUE;
+
+    }
+
+    /* Verify that we can handle the request. */
+    status = pjsip_inv_verify_request(rdata, &options, NULL, NULL,
+				      g_endpt, NULL);
+    if (status != PJ_SUCCESS) {
+
+	pj_str_t reason = pj_str("Sorry Simple UA can not handle this INVITE");
+
+	pjsip_endpt_respond_stateless( g_endpt, rdata, 
+				       500, &reason,
+				       NULL, NULL);
+	return PJ_TRUE;
+    } 
+
+    /*
+     * Create UAS dialog.
+     */
+    status = pjsip_dlg_create_uas( pjsip_ua_instance(), 
+				   rdata,
+				   NULL, /* contact */
+				   &dlg);
+    if (status != PJ_SUCCESS) {
+	pjsip_endpt_respond_stateless(g_endpt, rdata, 500, NULL,
+				      NULL, NULL);
+	return PJ_TRUE;
+    }
+
+    /* 
+     * Get media capability from media endpoint: 
+     */
+
+    status = pjmedia_endpt_create_sdp( g_med_endpt, rdata->tp_info.pool, 1,
+				       &g_med_skinfo, 
+				       &local_sdp);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, PJ_TRUE);
+
+
+    /* 
+     * Create invite session, and pass both the UAS dialog and the SDP
+     * capability to the session.
+     */
+    status = pjsip_inv_create_uas( dlg, rdata, local_sdp, 0, &g_inv);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, PJ_TRUE);
+
+
+    /*
+     * Initially send 180 response.
+     *
+     * The very first response to an INVITE must be created with
+     * pjsip_inv_initial_answer(). Subsequent responses to the same
+     * transaction MUST use pjsip_inv_answer().
+     */
+    status = pjsip_inv_initial_answer(g_inv, rdata, 
+				      180, 
+				      NULL, NULL, &tdata);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, PJ_TRUE);
+
+
+    /* Send the 180 response. */  
+    status = pjsip_inv_send_msg(g_inv, tdata); 
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, PJ_TRUE);
+
+
+    /*
+     * Now create 200 response.
+     */
+    status = pjsip_inv_answer( g_inv, 
+			       200, NULL,	/* st_code and st_text */
+			       NULL,		/* SDP already specified */
+			       &tdata);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, PJ_TRUE);
+
+    /*
+     * Send the 200 response.
+     */
+    status = pjsip_inv_send_msg(g_inv, tdata);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, PJ_TRUE);
+
+
+    /* Done. 
+     * When the call is disconnected, it will be reported via the callback.
+     */
+
+    return PJ_TRUE;
+}
+
+ 
+
+/*
+ * Callback when SDP negotiation has completed.
+ * We are interested with this callback because we want to start media
+ * as soon as SDP negotiation is completed.
+ */
+static void call_on_media_update( pjsip_inv_session *inv,
+				  pj_status_t status)
+{
+    pjmedia_session_info sess_info;
+    const pjmedia_sdp_session *local_sdp;
+    const pjmedia_sdp_session *remote_sdp;
+    pjmedia_port *media_port;
+
+    if (status != PJ_SUCCESS) {
+
+	app_perror(THIS_FILE, "SDP negotiation has failed", status);
+
+	/* Here we should disconnect call if we're not in the middle 
+	 * of initializing an UAS dialog and if this is not a re-INVITE.
+	 */
+	return;
+    }
+
+    /* Get local and remote SDP.
+     * We need both SDPs to create a media session.
+     */
+    status = pjmedia_sdp_neg_get_active_local(inv->neg, &local_sdp);
+
+    status = pjmedia_sdp_neg_get_active_remote(inv->neg, &remote_sdp);
+
+
+    /* Create session info based on the two SDPs. 
+     * We only support one stream per session for now.
+     */
+    status = pjmedia_session_info_from_sdp(inv->dlg->pool, g_med_endpt, 
+					   1, &sess_info, 
+					   local_sdp, remote_sdp);
+    if (status != PJ_SUCCESS) {
+	app_perror( THIS_FILE, "Unable to create media session", status);
+	return;
+    }
+
+    /* If required, we can also change some settings in the session info,
+     * (such as jitter buffer settings, codec settings, etc) before we
+     * create the session.
+     */
+
+    /* Create new media session, passing the two SDPs, and also the
+     * media socket that we created earlier.
+     * The media session is active immediately.
+     */
+    status = pjmedia_session_create( g_med_endpt, &sess_info,
+				     &g_med_transport, NULL, &g_med_session );
+    if (status != PJ_SUCCESS) {
+	app_perror( THIS_FILE, "Unable to create media session", status);
+	return;
+    }
+
+
+    /* Get the media port interface of the first stream in the session. 
+     * Media port interface is basicly a struct containing get_frame() and
+     * put_frame() function. With this media port interface, we can attach
+     * the port interface to conference bridge, or directly to a sound
+     * player/recorder device.
+     */
+    pjmedia_session_get_port(g_med_session, 0, &media_port);
+
+
+
+    /* Create a sound Player device and connect the media port to the
+     * sound device.
+     */
+    status = pjmedia_snd_port_create_player( 
+		    inv->pool,				/* pool		    */
+		    -1,					/* sound dev id	    */
+		    media_port->info.clock_rate,	/* clock rate	    */
+		    media_port->info.channel_count,	/* channel count    */
+		    media_port->info.samples_per_frame, /* samples per frame*/
+		    media_port->info.bits_per_sample,   /* bits per sample  */
+		    0,					/* options	    */
+		    &g_snd_player);
+    if (status != PJ_SUCCESS) {
+	app_perror( THIS_FILE, "Unable to create sound player", status);
+	PJ_LOG(3,(THIS_FILE, "%d %d %d %d",
+	    	    media_port->info.clock_rate,	/* clock rate	    */
+		    media_port->info.channel_count,	/* channel count    */
+		    media_port->info.samples_per_frame, /* samples per frame*/
+		    media_port->info.bits_per_sample    /* bits per sample  */
+	    ));
+	return;
+    }
+
+    status = pjmedia_snd_port_connect(g_snd_player, media_port);
+
+
+    /* Create a sound recorder device and connect the media port to the
+     * sound device.
+     */
+    status = pjmedia_snd_port_create_rec( 
+		    inv->pool,				/* pool		    */
+		    -1,					/* sound dev id	    */
+		    media_port->info.clock_rate,	/* clock rate	    */
+		    media_port->info.channel_count,	/* channel count    */
+		    media_port->info.samples_per_frame, /* samples per frame*/
+		    media_port->info.bits_per_sample,   /* bits per sample  */
+		    0,					/* options	    */
+		    &g_snd_rec);
+    if (status != PJ_SUCCESS) {
+	app_perror( THIS_FILE, "Unable to create sound recorder", status);
+	return;
+    }
+
+    status = pjmedia_snd_port_connect(g_snd_rec, media_port);
+
+    /* Done with media. */
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/siprtp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/siprtp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/siprtp.c	(revision 1163)
@@ -0,0 +1,2131 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+
+
+
+
+/* Usage */
+static const char *USAGE = 
+" PURPOSE:								    \n"
+"   This program establishes SIP INVITE session and media, and calculate    \n"
+"   the media quality (packet lost, jitter, rtt, etc.). Unlike normal	    \n"
+"   pjmedia applications, this program bypasses all pjmedia stream	    \n"
+"   framework and transmit encoded RTP packets manually using own thread.   \n"
+"\n"
+" USAGE:\n"
+"   siprtp [options]        => to start in server mode\n"
+"   siprtp [options] URL    => to start in client mode\n"
+"\n"
+" Program options:\n"
+"   --count=N,        -c    Set number of calls to create (default:1) \n"
+"   --duration=SEC,   -d    Set maximum call duration (default:unlimited) \n"
+"   --auto-quit,      -q    Quit when calls have been completed (default:no)\n"
+"\n"
+" Address and ports options:\n"
+"   --local-port=PORT,-p    Set local SIP port (default: 5060)\n"
+"   --rtp-port=PORT,  -r    Set start of RTP port (default: 4000)\n"
+"   --ip-addr=IP,     -i    Set local IP address to use (otherwise it will\n"
+"                           try to determine local IP address from hostname)\n"
+"\n"
+" Logging Options:\n"
+"   --log-level=N,    -l    Set log verbosity level (default=5)\n"
+"   --app-log-level=N       Set app screen log verbosity (default=3)\n"
+"   --log-file=FILE         Write log to file FILE\n"
+"   --report-file=FILE      Write report to file FILE\n"
+"\n"
+/* Don't support this anymore, because codec is properly examined in
+   pjmedia_session_info_from_sdp() function.
+
+" Codec Options:\n"
+"   --a-pt=PT               Set audio payload type to PT (default=0)\n"
+"   --a-name=NAME           Set audio codec name to NAME (default=pcmu)\n"
+"   --a-clock=RATE          Set audio codec rate to RATE Hz (default=8000Hz)\n"
+"   --a-bitrate=BPS         Set audio codec bitrate to BPS (default=64000bps)\n"
+"   --a-ptime=MS            Set audio frame time to MS msec (default=20ms)\n"
+*/
+;
+
+
+/* Include all headers. */
+#include <pjsip.h>
+#include <pjmedia.h>
+#include <pjmedia-codec.h>
+#include <pjsip_ua.h>
+#include <pjsip_simple.h>
+#include <pjlib-util.h>
+#include <pjlib.h>
+
+#include <stdlib.h>
+
+
+#if PJ_HAS_HIGH_RES_TIMER==0
+#   error "High resolution timer is needed for this sample"
+#endif
+
+#define THIS_FILE	"siprtp.c"
+#define MAX_CALLS	1024
+#define RTP_START_PORT	4000
+
+
+/* Codec descriptor: */
+struct codec
+{
+    unsigned	pt;
+    char*	name;
+    unsigned	clock_rate;
+    unsigned	bit_rate;
+    unsigned	ptime;
+    char*	description;
+};
+
+
+/* A bidirectional media stream created when the call is active. */
+struct media_stream
+{
+    /* Static: */
+    unsigned		 call_index;	    /* Call owner.		*/
+    unsigned		 media_index;	    /* Media index in call.	*/
+    pjmedia_transport   *transport;	    /* To send/recv RTP/RTCP	*/
+
+    /* Active? */
+    pj_bool_t		 active;	    /* Non-zero if is in call.	*/
+
+    /* Current stream info: */
+    pjmedia_stream_info	 si;		    /* Current stream info.	*/
+
+    /* More info: */
+    unsigned		 clock_rate;	    /* clock rate		*/
+    unsigned		 samples_per_frame; /* samples per frame	*/
+    unsigned		 bytes_per_frame;   /* frame size.		*/
+
+    /* RTP session: */
+    pjmedia_rtp_session	 out_sess;	    /* outgoing RTP session	*/
+    pjmedia_rtp_session	 in_sess;	    /* incoming RTP session	*/
+
+    /* RTCP stats: */
+    pjmedia_rtcp_session rtcp;		    /* incoming RTCP session.	*/
+
+    /* Thread: */
+    pj_bool_t		 thread_quit_flag;  /* Stop media thread.	*/
+    pj_thread_t		*thread;	    /* Media thread.		*/
+};
+
+
+/* This is a call structure that is created when the application starts
+ * and only destroyed when the application quits.
+ */
+struct call
+{
+    unsigned		 index;
+    pjsip_inv_session	*inv;
+    unsigned		 media_count;
+    struct media_stream	 media[1];
+    pj_time_val		 start_time;
+    pj_time_val		 response_time;
+    pj_time_val		 connect_time;
+
+    pj_timer_entry	 d_timer;	    /**< Disconnect timer.	*/
+};
+
+
+/* Application's global variables */
+static struct app
+{
+    unsigned		 max_calls;
+    unsigned		 uac_calls;
+    unsigned		 duration;
+    pj_bool_t		 auto_quit;
+    unsigned		 thread_count;
+    int			 sip_port;
+    int			 rtp_start_port;
+    pj_str_t		 local_addr;
+    pj_str_t		 local_uri;
+    pj_str_t		 local_contact;
+    
+    int			 app_log_level;
+    int			 log_level;
+    char		*log_filename;
+    char		*report_filename;
+
+    struct codec	 audio_codec;
+
+    pj_str_t		 uri_to_call;
+
+    pj_caching_pool	 cp;
+    pj_pool_t		*pool;
+
+    pjsip_endpoint	*sip_endpt;
+    pj_bool_t		 thread_quit;
+    pj_thread_t		*sip_thread[1];
+
+    pjmedia_endpt	*med_endpt;
+    struct call		 call[MAX_CALLS];
+} app;
+
+
+
+/*
+ * Prototypes:
+ */
+
+/* Callback to be called when SDP negotiation is done in the call: */
+static void call_on_media_update( pjsip_inv_session *inv,
+				  pj_status_t status);
+
+/* Callback to be called when invite session's state has changed: */
+static void call_on_state_changed( pjsip_inv_session *inv, 
+				   pjsip_event *e);
+
+/* Callback to be called when dialog has forked: */
+static void call_on_forked(pjsip_inv_session *inv, pjsip_event *e);
+
+/* Callback to be called to handle incoming requests outside dialogs: */
+static pj_bool_t on_rx_request( pjsip_rx_data *rdata );
+
+/* Worker thread prototype */
+static int sip_worker_thread(void *arg);
+
+/* Create SDP for call */
+static pj_status_t create_sdp( pj_pool_t *pool,
+			       struct call *call,
+			       pjmedia_sdp_session **p_sdp);
+
+/* Hangup call */
+static void hangup_call(unsigned index);
+
+/* Destroy the call's media */
+static void destroy_call_media(unsigned call_index);
+
+/* Destroy media. */
+static void destroy_media();
+
+/* This callback is called by media transport on receipt of RTP packet. */
+static void on_rx_rtp(void *user_data, const void *pkt, pj_ssize_t size);
+
+/* This callback is called by media transport on receipt of RTCP packet. */
+static void on_rx_rtcp(void *user_data, const void *pkt, pj_ssize_t size);
+
+/* Display error */
+static void app_perror(const char *sender, const char *title, 
+		       pj_status_t status);
+
+/* Print call */
+static void print_call(int call_index);
+
+
+/* This is a PJSIP module to be registered by application to handle
+ * incoming requests outside any dialogs/transactions. The main purpose
+ * here is to handle incoming INVITE request message, where we will
+ * create a dialog and INVITE session for it.
+ */
+static pjsip_module mod_siprtp =
+{
+    NULL, NULL,			    /* prev, next.		*/
+    { "mod-siprtpapp", 13 },	    /* Name.			*/
+    -1,				    /* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION, /* Priority			*/
+    NULL,			    /* load()			*/
+    NULL,			    /* start()			*/
+    NULL,			    /* stop()			*/
+    NULL,			    /* unload()			*/
+    &on_rx_request,		    /* on_rx_request()		*/
+    NULL,			    /* on_rx_response()		*/
+    NULL,			    /* on_tx_request.		*/
+    NULL,			    /* on_tx_response()		*/
+    NULL,			    /* on_tsx_state()		*/
+};
+
+
+/* Codec constants */
+struct codec audio_codecs[] = 
+{
+    { 0,  "PCMU", 8000, 64000, 20, "G.711 ULaw" },
+    { 3,  "GSM",  8000, 13200, 20, "GSM" },
+    { 4,  "G723", 8000, 6400,  30, "G.723.1" },
+    { 8,  "PCMA", 8000, 64000, 20, "G.711 ALaw" },
+    { 18, "G729", 8000, 8000,  20, "G.729" },
+};
+
+
+/*
+ * Init SIP stack
+ */
+static pj_status_t init_sip()
+{
+    unsigned i;
+    pj_status_t status;
+
+    /* init PJLIB-UTIL: */
+    status = pjlib_util_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&app.cp, &pj_pool_factory_default_policy, 0);
+
+    /* Create application pool for misc. */
+    app.pool = pj_pool_create(&app.cp.factory, "app", 1000, 1000, NULL);
+
+    /* Create the endpoint: */
+    status = pjsip_endpt_create(&app.cp.factory, pj_gethostname()->ptr, 
+				&app.sip_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Add UDP transport. */
+    {
+	pj_sockaddr_in addr;
+	pjsip_host_port addrname;
+	pjsip_transport *tp;
+
+	pj_bzero(&addr, sizeof(addr));
+	addr.sin_family = PJ_AF_INET;
+	addr.sin_addr.s_addr = 0;
+	addr.sin_port = pj_htons((pj_uint16_t)app.sip_port);
+
+	if (app.local_addr.slen) {
+
+	    addrname.host = app.local_addr;
+	    addrname.port = app.sip_port;
+
+	    status = pj_sockaddr_in_init(&addr, &app.local_addr, 
+					 (pj_uint16_t)app.sip_port);
+	    if (status != PJ_SUCCESS) {
+		app_perror(THIS_FILE, "Unable to resolve IP interface", status);
+		return status;
+	    }
+	}
+
+	status = pjsip_udp_transport_start( app.sip_endpt, &addr, 
+					    (app.local_addr.slen ? &addrname:NULL),
+					    1, &tp);
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Unable to start UDP transport", status);
+	    return status;
+	}
+
+	PJ_LOG(3,(THIS_FILE, "SIP UDP listening on %.*s:%d",
+		  (int)tp->local_name.host.slen, tp->local_name.host.ptr,
+		  tp->local_name.port));
+    }
+
+    /* 
+     * Init transaction layer.
+     * This will create/initialize transaction hash tables etc.
+     */
+    status = pjsip_tsx_layer_init_module(app.sip_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /*  Initialize UA layer. */
+    status = pjsip_ua_init_module( app.sip_endpt, NULL );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /*  Init invite session module. */
+    {
+	pjsip_inv_callback inv_cb;
+
+	/* Init the callback for INVITE session: */
+	pj_bzero(&inv_cb, sizeof(inv_cb));
+	inv_cb.on_state_changed = &call_on_state_changed;
+	inv_cb.on_new_session = &call_on_forked;
+	inv_cb.on_media_update = &call_on_media_update;
+
+	/* Initialize invite session module:  */
+	status = pjsip_inv_usage_init(app.sip_endpt, &inv_cb);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+    }
+
+    /* Register our module to receive incoming requests. */
+    status = pjsip_endpt_register_module( app.sip_endpt, &mod_siprtp);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Init calls */
+    for (i=0; i<app.max_calls; ++i)
+	app.call[i].index = i;
+
+    /* Done */
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Destroy SIP
+ */
+static void destroy_sip()
+{
+    unsigned i;
+
+    app.thread_quit = 1;
+    for (i=0; i<app.thread_count; ++i) {
+	if (app.sip_thread[i]) {
+	    pj_thread_join(app.sip_thread[i]);
+	    pj_thread_destroy(app.sip_thread[i]);
+	    app.sip_thread[i] = NULL;
+	}
+    }
+
+    if (app.sip_endpt) {
+	pjsip_endpt_destroy(app.sip_endpt);
+	app.sip_endpt = NULL;
+    }
+
+}
+
+
+/*
+ * Init media stack.
+ */
+static pj_status_t init_media()
+{
+    unsigned	i, count;
+    pj_uint16_t	rtp_port;
+    pj_status_t	status;
+
+
+    /* Initialize media endpoint so that at least error subsystem is properly
+     * initialized.
+     */
+    status = pjmedia_endpt_create(&app.cp.factory, NULL, 1, &app.med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Must register codecs to be supported */
+#if defined(PJMEDIA_HAS_G711_CODEC) && PJMEDIA_HAS_G711_CODEC!=0
+    pjmedia_codec_g711_init(app.med_endpt);
+#endif
+
+    /* RTP port counter */
+    rtp_port = (pj_uint16_t)(app.rtp_start_port & 0xFFFE);
+
+    /* Init media transport for all calls. */
+    for (i=0, count=0; i<app.max_calls; ++i, ++count) {
+
+	unsigned j;
+
+	/* Create transport for each media in the call */
+	for (j=0; j<PJ_ARRAY_SIZE(app.call[0].media); ++j) {
+	    /* Repeat binding media socket to next port when fails to bind
+	     * to current port number.
+	     */
+	    int retry;
+
+	    app.call[i].media[j].call_index = i;
+	    app.call[i].media[j].media_index = j;
+
+	    status = -1;
+	    for (retry=0; retry<100; ++retry,rtp_port+=2)  {
+		struct media_stream *m = &app.call[i].media[j];
+		
+		status = pjmedia_transport_udp_create2(app.med_endpt, 
+						       "siprtp",
+						       &app.local_addr,
+						       rtp_port, 0, 
+						       &m->transport);
+		if (status == PJ_SUCCESS) {
+		    rtp_port += 2;
+		    break;
+		}
+	    }
+	}
+
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+    }
+
+    /* Done */
+    return PJ_SUCCESS;
+
+on_error:
+    destroy_media();
+    return status;
+}
+
+
+/*
+ * Destroy media.
+ */
+static void destroy_media()
+{
+    unsigned i;
+
+    for (i=0; i<app.max_calls; ++i) {
+	unsigned j;
+	for (j=0; j<PJ_ARRAY_SIZE(app.call[0].media); ++j) {
+	    struct media_stream *m = &app.call[i].media[j];
+
+	    if (m->transport) {
+		pjmedia_transport_close(m->transport);
+		m->transport = NULL;
+	    }
+	}
+    }
+
+    if (app.med_endpt) {
+	pjmedia_endpt_destroy(app.med_endpt);
+	app.med_endpt = NULL;
+    }
+}
+
+
+/*
+ * Make outgoing call.
+ */
+static pj_status_t make_call(const pj_str_t *dst_uri)
+{
+    unsigned i;
+    struct call *call;
+    pjsip_dialog *dlg;
+    pjmedia_sdp_session *sdp;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+
+    /* Find unused call slot */
+    for (i=0; i<app.max_calls; ++i) {
+	if (app.call[i].inv == NULL)
+	    break;
+    }
+
+    if (i == app.max_calls)
+	return PJ_ETOOMANY;
+
+    call = &app.call[i];
+
+    /* Create UAC dialog */
+    status = pjsip_dlg_create_uac( pjsip_ua_instance(), 
+				   &app.local_uri,	/* local URI	    */
+				   &app.local_contact,	/* local Contact    */
+				   dst_uri,		/* remote URI	    */
+				   dst_uri,		/* remote target    */
+				   &dlg);		/* dialog	    */
+    if (status != PJ_SUCCESS) {
+	++app.uac_calls;
+	return status;
+    }
+
+    /* Create SDP */
+    create_sdp( dlg->pool, call, &sdp);
+
+    /* Create the INVITE session. */
+    status = pjsip_inv_create_uac( dlg, sdp, 0, &call->inv);
+    if (status != PJ_SUCCESS) {
+	pjsip_dlg_terminate(dlg);
+	++app.uac_calls;
+	return status;
+    }
+
+
+    /* Attach call data to invite session */
+    call->inv->mod_data[mod_siprtp.id] = call;
+
+    /* Mark start of call */
+    pj_gettimeofday(&call->start_time);
+
+
+    /* Create initial INVITE request.
+     * This INVITE request will contain a perfectly good request and 
+     * an SDP body as well.
+     */
+    status = pjsip_inv_invite(call->inv, &tdata);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Send initial INVITE request. 
+     * From now on, the invite session's state will be reported to us
+     * via the invite session callbacks.
+     */
+    status = pjsip_inv_send_msg(call->inv, tdata);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Receive incoming call
+ */
+static void process_incoming_call(pjsip_rx_data *rdata)
+{
+    unsigned i, options;
+    struct call *call;
+    pjsip_dialog *dlg;
+    pjmedia_sdp_session *sdp;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    /* Find free call slot */
+    for (i=0; i<app.max_calls; ++i) {
+	if (app.call[i].inv == NULL)
+	    break;
+    }
+
+    if (i == app.max_calls) {
+	const pj_str_t reason = pj_str("Too many calls");
+	pjsip_endpt_respond_stateless( app.sip_endpt, rdata, 
+				       500, &reason,
+				       NULL, NULL);
+	return;
+    }
+
+    call = &app.call[i];
+
+    /* Verify that we can handle the request. */
+    options = 0;
+    status = pjsip_inv_verify_request(rdata, &options, NULL, NULL,
+  				   app.sip_endpt, &tdata);
+    if (status != PJ_SUCCESS) {
+	/*
+	 * No we can't handle the incoming INVITE request.
+	 */
+	if (tdata) {
+	    pjsip_response_addr res_addr;
+	    
+	    pjsip_get_response_addr(tdata->pool, rdata, &res_addr);
+	    pjsip_endpt_send_response(app.sip_endpt, &res_addr, tdata,
+		NULL, NULL);
+	    
+	} else {
+	    
+	    /* Respond with 500 (Internal Server Error) */
+	    pjsip_endpt_respond_stateless(app.sip_endpt, rdata, 500, NULL,
+		NULL, NULL);
+	}
+	
+	return;
+    }
+
+    /* Create UAS dialog */
+    status = pjsip_dlg_create_uas( pjsip_ua_instance(), rdata,
+				   &app.local_contact, &dlg);
+    if (status != PJ_SUCCESS) {
+	const pj_str_t reason = pj_str("Unable to create dialog");
+	pjsip_endpt_respond_stateless( app.sip_endpt, rdata, 
+				       500, &reason,
+				       NULL, NULL);
+	return;
+    }
+
+    /* Create SDP */
+    create_sdp( dlg->pool, call, &sdp);
+
+    /* Create UAS invite session */
+    status = pjsip_inv_create_uas( dlg, rdata, sdp, 0, &call->inv);
+    if (status != PJ_SUCCESS) {
+	pjsip_dlg_create_response(dlg, rdata, 500, NULL, &tdata);
+	pjsip_dlg_send_response(dlg, pjsip_rdata_get_tsx(rdata), tdata);
+	return;
+    }
+    
+
+    /* Attach call data to invite session */
+    call->inv->mod_data[mod_siprtp.id] = call;
+
+    /* Mark start of call */
+    pj_gettimeofday(&call->start_time);
+
+
+
+    /* Create 200 response .*/
+    status = pjsip_inv_initial_answer(call->inv, rdata, 200, 
+				      NULL, NULL, &tdata);
+    if (status != PJ_SUCCESS) {
+	status = pjsip_inv_initial_answer(call->inv, rdata, 
+					  PJSIP_SC_NOT_ACCEPTABLE,
+					  NULL, NULL, &tdata);
+	if (status == PJ_SUCCESS)
+	    pjsip_inv_send_msg(call->inv, tdata); 
+	else
+	    pjsip_inv_terminate(call->inv, 500, PJ_FALSE);
+	return;
+    }
+
+
+    /* Send the 200 response. */  
+    status = pjsip_inv_send_msg(call->inv, tdata); 
+    PJ_ASSERT_ON_FAIL(status == PJ_SUCCESS, return);
+
+
+    /* Done */
+}
+
+
+/* Callback to be called when dialog has forked: */
+static void call_on_forked(pjsip_inv_session *inv, pjsip_event *e)
+{
+    PJ_UNUSED_ARG(inv);
+    PJ_UNUSED_ARG(e);
+
+    PJ_TODO( HANDLE_FORKING );
+}
+
+
+/* Callback to be called to handle incoming requests outside dialogs: */
+static pj_bool_t on_rx_request( pjsip_rx_data *rdata )
+{
+    /* Ignore strandled ACKs (must not send respone */
+    if (rdata->msg_info.msg->line.req.method.id == PJSIP_ACK_METHOD)
+	return PJ_FALSE;
+
+    /* Respond (statelessly) any non-INVITE requests with 500  */
+    if (rdata->msg_info.msg->line.req.method.id != PJSIP_INVITE_METHOD) {
+	pj_str_t reason = pj_str("Unsupported Operation");
+	pjsip_endpt_respond_stateless( app.sip_endpt, rdata, 
+				       500, &reason,
+				       NULL, NULL);
+	return PJ_TRUE;
+    }
+
+    /* Handle incoming INVITE */
+    process_incoming_call(rdata);
+
+    /* Done */
+    return PJ_TRUE;
+}
+
+
+/* Callback timer to disconnect call (limiting call duration) */
+static void timer_disconnect_call( pj_timer_heap_t *timer_heap,
+				   struct pj_timer_entry *entry)
+{
+    struct call *call = entry->user_data;
+
+    PJ_UNUSED_ARG(timer_heap);
+
+    entry->id = 0;
+    hangup_call(call->index);
+}
+
+
+/* Callback to be called when invite session's state has changed: */
+static void call_on_state_changed( pjsip_inv_session *inv, 
+				   pjsip_event *e)
+{
+    struct call *call = inv->mod_data[mod_siprtp.id];
+
+    PJ_UNUSED_ARG(e);
+
+    if (!call)
+	return;
+
+    if (inv->state == PJSIP_INV_STATE_DISCONNECTED) {
+	
+	pj_time_val null_time = {0, 0};
+
+	if (call->d_timer.id != 0) {
+	    pjsip_endpt_cancel_timer(app.sip_endpt, &call->d_timer);
+	    call->d_timer.id = 0;
+	}
+
+	PJ_LOG(3,(THIS_FILE, "Call #%d disconnected. Reason=%d (%.*s)",
+		  call->index,
+		  inv->cause,
+		  (int)inv->cause_text.slen,
+		  inv->cause_text.ptr));
+	PJ_LOG(3,(THIS_FILE, "Call #%d statistics:", call->index));
+	print_call(call->index);
+
+
+	call->inv = NULL;
+	inv->mod_data[mod_siprtp.id] = NULL;
+
+	destroy_call_media(call->index);
+
+	call->start_time = null_time;
+	call->response_time = null_time;
+	call->connect_time = null_time;
+
+	++app.uac_calls;
+
+    } else if (inv->state == PJSIP_INV_STATE_CONFIRMED) {
+
+	pj_time_val t;
+
+	pj_gettimeofday(&call->connect_time);
+	if (call->response_time.sec == 0)
+	    call->response_time = call->connect_time;
+
+	t = call->connect_time;
+	PJ_TIME_VAL_SUB(t, call->start_time);
+
+	PJ_LOG(3,(THIS_FILE, "Call #%d connected in %d ms", call->index,
+		  PJ_TIME_VAL_MSEC(t)));
+
+	if (app.duration != 0) {
+	    call->d_timer.id = 1;
+	    call->d_timer.user_data = call;
+	    call->d_timer.cb = &timer_disconnect_call;
+
+	    t.sec = app.duration;
+	    t.msec = 0;
+
+	    pjsip_endpt_schedule_timer(app.sip_endpt, &call->d_timer, &t);
+	}
+
+    } else if (	inv->state == PJSIP_INV_STATE_EARLY ||
+		inv->state == PJSIP_INV_STATE_CONNECTING) {
+
+	if (call->response_time.sec == 0)
+	    pj_gettimeofday(&call->response_time);
+
+    }
+}
+
+
+/* Utility */
+static void app_perror(const char *sender, const char *title, 
+		       pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    pj_strerror(status, errmsg, sizeof(errmsg));
+    PJ_LOG(3,(sender, "%s: %s [status=%d]", title, errmsg, status));
+}
+
+
+/* Worker thread for SIP */
+static int sip_worker_thread(void *arg)
+{
+    PJ_UNUSED_ARG(arg);
+
+    while (!app.thread_quit) {
+	pj_time_val timeout = {0, 10};
+	pjsip_endpt_handle_events(app.sip_endpt, &timeout);
+    }
+
+    return 0;
+}
+
+
+/* Init application options */
+static pj_status_t init_options(int argc, char *argv[])
+{
+    static char ip_addr[32];
+    static char local_uri[64];
+
+    enum { OPT_START,
+	   OPT_APP_LOG_LEVEL, OPT_LOG_FILE, 
+	   OPT_A_PT, OPT_A_NAME, OPT_A_CLOCK, OPT_A_BITRATE, OPT_A_PTIME,
+	   OPT_REPORT_FILE };
+
+    struct pj_getopt_option long_options[] = {
+	{ "count",	    1, 0, 'c' },
+	{ "duration",	    1, 0, 'd' },
+	{ "auto-quit",	    0, 0, 'q' },
+	{ "local-port",	    1, 0, 'p' },
+	{ "rtp-port",	    1, 0, 'r' },
+	{ "ip-addr",	    1, 0, 'i' },
+
+	{ "log-level",	    1, 0, 'l' },
+	{ "app-log-level",  1, 0, OPT_APP_LOG_LEVEL },
+	{ "log-file",	    1, 0, OPT_LOG_FILE },
+
+	{ "report-file",    1, 0, OPT_REPORT_FILE },
+
+	/* Don't support this anymore, see comments in USAGE above.
+	{ "a-pt",	    1, 0, OPT_A_PT },
+	{ "a-name",	    1, 0, OPT_A_NAME },
+	{ "a-clock",	    1, 0, OPT_A_CLOCK },
+	{ "a-bitrate",	    1, 0, OPT_A_BITRATE },
+	{ "a-ptime",	    1, 0, OPT_A_PTIME },
+	*/
+
+	{ NULL, 0, 0, 0 },
+    };
+    int c;
+    int option_index;
+
+    /* Get local IP address for the default IP address */
+    {
+	const pj_str_t *hostname;
+	pj_sockaddr_in tmp_addr;
+	char *addr;
+
+	hostname = pj_gethostname();
+	pj_sockaddr_in_init(&tmp_addr, hostname, 0);
+	addr = pj_inet_ntoa(tmp_addr.sin_addr);
+	pj_ansi_strcpy(ip_addr, addr);
+    }
+
+    /* Init defaults */
+    app.max_calls = 1;
+    app.thread_count = 1;
+    app.sip_port = 5060;
+    app.rtp_start_port = RTP_START_PORT;
+    app.local_addr = pj_str(ip_addr);
+    app.log_level = 5;
+    app.app_log_level = 3;
+    app.log_filename = NULL;
+
+    /* Default codecs: */
+    app.audio_codec = audio_codecs[0];
+
+    /* Parse options */
+    pj_optind = 0;
+    while((c=pj_getopt_long(argc,argv, "c:d:p:r:i:l:q", 
+			    long_options, &option_index))!=-1) 
+    {
+	switch (c) {
+	case 'c':
+	    app.max_calls = atoi(pj_optarg);
+	    if (app.max_calls < 0 || app.max_calls > MAX_CALLS) {
+		PJ_LOG(3,(THIS_FILE, "Invalid max calls value %s", pj_optarg));
+		return 1;
+	    }
+	    break;
+	case 'd':
+	    app.duration = atoi(pj_optarg);
+	    break;
+	case 'q':
+	    app.auto_quit = 1;
+	    break;
+
+	case 'p':
+	    app.sip_port = atoi(pj_optarg);
+	    break;
+	case 'r':
+	    app.rtp_start_port = atoi(pj_optarg);
+	    break;
+	case 'i':
+	    app.local_addr = pj_str(pj_optarg);
+	    break;
+
+	case 'l':
+	    app.log_level = atoi(pj_optarg);
+	    break;
+	case OPT_APP_LOG_LEVEL:
+	    app.app_log_level = atoi(pj_optarg);
+	    break;
+	case OPT_LOG_FILE:
+	    app.log_filename = pj_optarg;
+	    break;
+
+	case OPT_A_PT:
+	    app.audio_codec.pt = atoi(pj_optarg);
+	    break;
+	case OPT_A_NAME:
+	    app.audio_codec.name = pj_optarg;
+	    break;
+	case OPT_A_CLOCK:
+	    app.audio_codec.clock_rate = atoi(pj_optarg);
+	    break;
+	case OPT_A_BITRATE:
+	    app.audio_codec.bit_rate = atoi(pj_optarg);
+	    break;
+	case OPT_A_PTIME:
+	    app.audio_codec.ptime = atoi(pj_optarg);
+	    break;
+	case OPT_REPORT_FILE:
+	    app.report_filename = pj_optarg;
+	    break;
+
+	default:
+	    puts(USAGE);
+	    return 1;
+	}
+    }
+
+    /* Check if URL is specified */
+    if (pj_optind < argc)
+	app.uri_to_call = pj_str(argv[pj_optind]);
+
+    /* Build local URI and contact */
+    pj_ansi_sprintf( local_uri, "sip:%s:%d", app.local_addr.ptr, app.sip_port);
+    app.local_uri = pj_str(local_uri);
+    app.local_contact = app.local_uri;
+
+
+    return PJ_SUCCESS;
+}
+
+
+/*****************************************************************************
+ * MEDIA STUFFS
+ */
+
+/*
+ * Create SDP session for a call.
+ */
+static pj_status_t create_sdp( pj_pool_t *pool,
+			       struct call *call,
+			       pjmedia_sdp_session **p_sdp)
+{
+    pj_time_val tv;
+    pjmedia_sdp_session *sdp;
+    pjmedia_sdp_media *m;
+    pjmedia_sdp_attr *attr;
+    pjmedia_transport_udp_info tpinfo;
+    struct media_stream *audio = &call->media[0];
+
+    PJ_ASSERT_RETURN(pool && p_sdp, PJ_EINVAL);
+
+
+    /* Get transport info */
+    pjmedia_transport_udp_get_info(audio->transport, &tpinfo);
+
+    /* Create and initialize basic SDP session */
+    sdp = pj_pool_zalloc (pool, sizeof(pjmedia_sdp_session));
+
+    pj_gettimeofday(&tv);
+    sdp->origin.user = pj_str("pjsip-siprtp");
+    sdp->origin.version = sdp->origin.id = tv.sec + 2208988800UL;
+    sdp->origin.net_type = pj_str("IN");
+    sdp->origin.addr_type = pj_str("IP4");
+    sdp->origin.addr = *pj_gethostname();
+    sdp->name = pj_str("pjsip");
+
+    /* Since we only support one media stream at present, put the
+     * SDP connection line in the session level.
+     */
+    sdp->conn = pj_pool_zalloc (pool, sizeof(pjmedia_sdp_conn));
+    sdp->conn->net_type = pj_str("IN");
+    sdp->conn->addr_type = pj_str("IP4");
+    sdp->conn->addr = app.local_addr;
+
+
+    /* SDP time and attributes. */
+    sdp->time.start = sdp->time.stop = 0;
+    sdp->attr_count = 0;
+
+    /* Create media stream 0: */
+
+    sdp->media_count = 1;
+    m = pj_pool_zalloc (pool, sizeof(pjmedia_sdp_media));
+    sdp->media[0] = m;
+
+    /* Standard media info: */
+    m->desc.media = pj_str("audio");
+    m->desc.port = pj_ntohs(tpinfo.skinfo.rtp_addr_name.sin_port);
+    m->desc.port_count = 1;
+    m->desc.transport = pj_str("RTP/AVP");
+
+    /* Add format and rtpmap for each codec. */
+    m->desc.fmt_count = 1;
+    m->attr_count = 0;
+
+    {
+	pjmedia_sdp_rtpmap rtpmap;
+	pjmedia_sdp_attr *attr;
+	char ptstr[10];
+
+	sprintf(ptstr, "%d", app.audio_codec.pt);
+	pj_strdup2(pool, &m->desc.fmt[0], ptstr);
+	rtpmap.pt = m->desc.fmt[0];
+	rtpmap.clock_rate = app.audio_codec.clock_rate;
+	rtpmap.enc_name = pj_str(app.audio_codec.name);
+	rtpmap.param.slen = 0;
+
+	pjmedia_sdp_rtpmap_to_attr(pool, &rtpmap, &attr);
+	m->attr[m->attr_count++] = attr;
+    }
+
+    /* Add sendrecv attribute. */
+    attr = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_attr));
+    attr->name = pj_str("sendrecv");
+    m->attr[m->attr_count++] = attr;
+
+#if 1
+    /*
+     * Add support telephony event
+     */
+    m->desc.fmt[m->desc.fmt_count++] = pj_str("121");
+    /* Add rtpmap. */
+    attr = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_attr));
+    attr->name = pj_str("rtpmap");
+    attr->value = pj_str("121 telephone-event/8000");
+    m->attr[m->attr_count++] = attr;
+    /* Add fmtp */
+    attr = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_attr));
+    attr->name = pj_str("fmtp");
+    attr->value = pj_str("121 0-15");
+    m->attr[m->attr_count++] = attr;
+#endif
+
+    /* Done */
+    *p_sdp = sdp;
+
+    return PJ_SUCCESS;
+}
+
+
+#if defined(PJ_WIN32) && PJ_WIN32 != 0
+#include <windows.h>
+static void boost_priority(void)
+{
+    SetPriorityClass( GetCurrentProcess(), REALTIME_PRIORITY_CLASS);
+    SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_HIGHEST);
+}
+
+#elif defined(PJ_LINUX) && PJ_LINUX != 0
+#include <pthread.h>
+static void boost_priority(void)
+{
+#define POLICY	SCHED_FIFO
+    struct sched_param tp;
+    int max_prio;
+    int policy;
+    int rc;
+
+    if (sched_get_priority_min(POLICY) < sched_get_priority_max(POLICY))
+	max_prio = sched_get_priority_max(POLICY)-1;
+    else
+	max_prio = sched_get_priority_max(POLICY)+1;
+
+    /*
+     * Adjust process scheduling algorithm and priority
+     */
+    rc = sched_getparam(0, &tp);
+    if (rc != 0) {
+	app_perror( THIS_FILE, "sched_getparam error",
+		    PJ_RETURN_OS_ERROR(rc));
+	return;
+    }
+    tp.__sched_priority = max_prio;
+
+    rc = sched_setscheduler(0, POLICY, &tp);
+    if (rc != 0) {
+	app_perror( THIS_FILE, "sched_setscheduler error",
+		    PJ_RETURN_OS_ERROR(rc));
+    }
+
+    PJ_LOG(4, (THIS_FILE, "New process policy=%d, priority=%d",
+	      policy, tp.__sched_priority));
+
+    /*
+     * Adjust thread scheduling algorithm and priority
+     */
+    rc = pthread_getschedparam(pthread_self(), &policy, &tp);
+    if (rc != 0) {
+	app_perror( THIS_FILE, "pthread_getschedparam error",
+		    PJ_RETURN_OS_ERROR(rc));
+	return;
+    }
+
+    PJ_LOG(4, (THIS_FILE, "Old thread policy=%d, priority=%d",
+	      policy, tp.__sched_priority));
+
+    policy = POLICY;
+    tp.__sched_priority = max_prio;
+
+    rc = pthread_setschedparam(pthread_self(), policy, &tp);
+    if (rc != 0) {
+	app_perror( THIS_FILE, "pthread_setschedparam error",
+		    PJ_RETURN_OS_ERROR(rc));
+	return;
+    }
+
+    PJ_LOG(4, (THIS_FILE, "New thread policy=%d, priority=%d",
+	      policy, tp.__sched_priority));
+}
+
+#else
+#  define boost_priority()
+#endif
+
+
+/*
+ * This callback is called by media transport on receipt of RTP packet.
+ */
+static void on_rx_rtp(void *user_data, const void *pkt, pj_ssize_t size)
+{
+    struct media_stream *strm;
+    pj_status_t status;
+    const pjmedia_rtp_hdr *hdr;
+    const void *payload;
+    unsigned payload_len;
+
+    strm = user_data;
+
+    /* Discard packet if media is inactive */
+    if (!strm->active)
+	return;
+
+    /* Check for errors */
+    if (size < 0) {
+	app_perror(THIS_FILE, "RTP recv() error", -size);
+	return;
+    }
+
+    /* Decode RTP packet. */
+    status = pjmedia_rtp_decode_rtp(&strm->in_sess, 
+				    pkt, size, 
+				    &hdr, &payload, &payload_len);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "RTP decode error", status);
+	return;
+    }
+
+    //PJ_LOG(4,(THIS_FILE, "Rx seq=%d", pj_ntohs(hdr->seq)));
+
+    /* Update the RTCP session. */
+    pjmedia_rtcp_rx_rtp(&strm->rtcp, pj_ntohs(hdr->seq),
+			pj_ntohl(hdr->ts), payload_len);
+
+    /* Update RTP session */
+    pjmedia_rtp_session_update(&strm->in_sess, hdr, NULL);
+
+}
+
+/*
+ * This callback is called by media transport on receipt of RTCP packet.
+ */
+static void on_rx_rtcp(void *user_data, const void *pkt, pj_ssize_t size)
+{
+    struct media_stream *strm;
+
+    strm = user_data;
+
+    /* Discard packet if media is inactive */
+    if (!strm->active)
+	return;
+
+    /* Check for errors */
+    if (size < 0) {
+	app_perror(THIS_FILE, "Error receiving RTCP packet", -size);
+	return;
+    }
+
+    /* Update RTCP session */
+    pjmedia_rtcp_rx_rtcp(&strm->rtcp, pkt, size);
+}
+
+
+/* 
+ * Media thread 
+ *
+ * This is the thread to send and receive both RTP and RTCP packets.
+ */
+static int media_thread(void *arg)
+{
+    enum { RTCP_INTERVAL = 5000, RTCP_RAND = 2000 };
+    struct media_stream *strm = arg;
+    char packet[1500];
+    unsigned msec_interval;
+    pj_timestamp freq, next_rtp, next_rtcp;
+
+
+    /* Boost thread priority if necessary */
+    boost_priority();
+
+    /* Let things settle */
+    pj_thread_sleep(100);
+
+    msec_interval = strm->samples_per_frame * 1000 / strm->clock_rate;
+    pj_get_timestamp_freq(&freq);
+
+    pj_get_timestamp(&next_rtp);
+    next_rtp.u64 += (freq.u64 * msec_interval / 1000);
+
+    next_rtcp = next_rtp;
+    next_rtcp.u64 += (freq.u64 * (RTCP_INTERVAL+(pj_rand()%RTCP_RAND)) / 1000);
+
+
+    while (!strm->thread_quit_flag) {
+	pj_timestamp now, lesser;
+	pj_time_val timeout;
+	pj_bool_t send_rtp, send_rtcp;
+
+	send_rtp = send_rtcp = PJ_FALSE;
+
+	/* Determine how long to sleep */
+	if (next_rtp.u64 < next_rtcp.u64) {
+	    lesser = next_rtp;
+	    send_rtp = PJ_TRUE;
+	} else {
+	    lesser = next_rtcp;
+	    send_rtcp = PJ_TRUE;
+	}
+
+	pj_get_timestamp(&now);
+	if (lesser.u64 <= now.u64) {
+	    timeout.sec = timeout.msec = 0;
+	    //printf("immediate "); fflush(stdout);
+	} else {
+	    pj_uint64_t tick_delay;
+	    tick_delay = lesser.u64 - now.u64;
+	    timeout.sec = 0;
+	    timeout.msec = (pj_uint32_t)(tick_delay * 1000 / freq.u64);
+	    pj_time_val_normalize(&timeout);
+
+	    //printf("%d:%03d ", timeout.sec, timeout.msec); fflush(stdout);
+	}
+
+	/* Wait for next interval */
+	//if (timeout.sec!=0 && timeout.msec!=0) {
+	    pj_thread_sleep(PJ_TIME_VAL_MSEC(timeout));
+	    if (strm->thread_quit_flag)
+		break;
+	//}
+
+	pj_get_timestamp(&now);
+
+	if (send_rtp || next_rtp.u64 <= now.u64) {
+	    /*
+	     * Time to send RTP packet.
+	     */
+	    pj_status_t status;
+	    const void *p_hdr;
+	    const pjmedia_rtp_hdr *hdr;
+	    pj_ssize_t size;
+	    int hdrlen;
+
+	    /* Format RTP header */
+	    status = pjmedia_rtp_encode_rtp( &strm->out_sess, strm->si.tx_pt,
+					     0, /* marker bit */
+					     strm->bytes_per_frame, 
+					     strm->samples_per_frame,
+					     &p_hdr, &hdrlen);
+	    if (status == PJ_SUCCESS) {
+
+		//PJ_LOG(4,(THIS_FILE, "\t\tTx seq=%d", pj_ntohs(hdr->seq)));
+		
+		hdr = (const pjmedia_rtp_hdr*) p_hdr;
+
+		/* Copy RTP header to packet */
+		pj_memcpy(packet, hdr, hdrlen);
+
+		/* Zero the payload */
+		pj_bzero(packet+hdrlen, strm->bytes_per_frame);
+
+		/* Send RTP packet */
+		size = hdrlen + strm->bytes_per_frame;
+		status = pjmedia_transport_send_rtp(strm->transport, 
+						    packet, size);
+		if (status != PJ_SUCCESS)
+		    app_perror(THIS_FILE, "Error sending RTP packet", status);
+
+	    } else {
+		pj_assert(!"RTP encode() error");
+	    }
+
+	    /* Update RTCP SR */
+	    pjmedia_rtcp_tx_rtp( &strm->rtcp, (pj_uint16_t)strm->bytes_per_frame);
+
+	    /* Schedule next send */
+	    next_rtp.u64 += (msec_interval * freq.u64 / 1000);
+	}
+
+
+	if (send_rtcp || next_rtcp.u64 <= now.u64) {
+	    /*
+	     * Time to send RTCP packet.
+	     */
+	    pjmedia_rtcp_pkt *rtcp_pkt;
+	    int rtcp_len;
+	    pj_ssize_t size;
+	    pj_status_t status;
+
+	    /* Build RTCP packet */
+	    pjmedia_rtcp_build_rtcp(&strm->rtcp, &rtcp_pkt, &rtcp_len);
+
+    
+	    /* Send packet */
+	    size = rtcp_len;
+	    status = pjmedia_transport_send_rtcp(strm->transport,
+						 rtcp_pkt, size);
+	    if (status != PJ_SUCCESS) {
+		app_perror(THIS_FILE, "Error sending RTCP packet", status);
+	    }
+	    
+	    /* Schedule next send */
+    	    next_rtcp.u64 += (freq.u64 * (RTCP_INTERVAL+(pj_rand()%RTCP_RAND)) /
+			      1000);
+	}
+    }
+
+    return 0;
+}
+
+
+/* Callback to be called when SDP negotiation is done in the call: */
+static void call_on_media_update( pjsip_inv_session *inv,
+				  pj_status_t status)
+{
+    struct call *call;
+    pj_pool_t *pool;
+    struct media_stream *audio;
+    const pjmedia_sdp_session *local_sdp, *remote_sdp;
+    struct codec *codec_desc = NULL;
+    unsigned i;
+
+    call = inv->mod_data[mod_siprtp.id];
+    pool = inv->dlg->pool;
+    audio = &call->media[0];
+
+    /* If this is a mid-call media update, then destroy existing media */
+    if (audio->thread != NULL)
+	destroy_call_media(call->index);
+
+
+    /* Do nothing if media negotiation has failed */
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "SDP negotiation failed", status);
+	return;
+    }
+
+    
+    /* Capture stream definition from the SDP */
+    pjmedia_sdp_neg_get_active_local(inv->neg, &local_sdp);
+    pjmedia_sdp_neg_get_active_remote(inv->neg, &remote_sdp);
+
+    status = pjmedia_stream_info_from_sdp(&audio->si, inv->pool, app.med_endpt,
+					  local_sdp, remote_sdp, 0);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Error creating stream info from SDP", status);
+	return;
+    }
+
+    /* Get the remainder of codec information from codec descriptor */
+    if (audio->si.fmt.pt == app.audio_codec.pt)
+	codec_desc = &app.audio_codec;
+    else {
+	/* Find the codec description in codec array */
+	for (i=0; i<PJ_ARRAY_SIZE(audio_codecs); ++i) {
+	    if (audio_codecs[i].pt == audio->si.fmt.pt) {
+		codec_desc = &audio_codecs[i];
+		break;
+	    }
+	}
+
+	if (codec_desc == NULL) {
+	    PJ_LOG(3, (THIS_FILE, "Error: Invalid codec payload type"));
+	    return;
+	}
+    }
+
+    audio->clock_rate = audio->si.fmt.clock_rate;
+    audio->samples_per_frame = audio->clock_rate * codec_desc->ptime / 1000;
+    audio->bytes_per_frame = codec_desc->bit_rate * codec_desc->ptime / 1000 / 8;
+
+
+    pjmedia_rtp_session_init(&audio->out_sess, audio->si.tx_pt, 
+			     pj_rand());
+    pjmedia_rtp_session_init(&audio->in_sess, audio->si.fmt.pt, 0);
+    pjmedia_rtcp_init(&audio->rtcp, "rtcp", audio->clock_rate, 
+		      audio->samples_per_frame, 0);
+
+
+    /* Attach media to transport */
+    status = pjmedia_transport_attach(audio->transport, audio, 
+				      &audio->si.rem_addr, 
+				      &audio->si.rem_rtcp, 
+				      sizeof(pj_sockaddr_in),
+				      &on_rx_rtp,
+				      &on_rx_rtcp);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Error on pjmedia_transport_attach()", status);
+	return;
+    }
+
+    /* Start media thread. */
+    audio->thread_quit_flag = 0;
+    status = pj_thread_create( inv->pool, "media", &media_thread, audio,
+			       0, 0, &audio->thread);
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Error creating media thread", status);
+	return;
+    }
+
+    /* Set the media as active */
+    audio->active = PJ_TRUE;
+}
+
+
+
+/* Destroy call's media */
+static void destroy_call_media(unsigned call_index)
+{
+    struct media_stream *audio = &app.call[call_index].media[0];
+
+    if (audio) {
+	audio->active = PJ_FALSE;
+
+	if (audio->thread) {
+	    audio->thread_quit_flag = 1;
+	    pj_thread_join(audio->thread);
+	    pj_thread_destroy(audio->thread);
+	    audio->thread = NULL;
+	    audio->thread_quit_flag = 0;
+	}
+
+	pjmedia_transport_detach(audio->transport, audio);
+    }
+}
+
+ 
+/*****************************************************************************
+ * USER INTERFACE STUFFS
+ */
+
+static void call_get_duration(int call_index, pj_time_val *dur)
+{
+    struct call *call = &app.call[call_index];
+    pjsip_inv_session *inv;
+
+    dur->sec = dur->msec = 0;
+
+    if (!call)
+	return;
+
+    inv = call->inv;
+    if (!inv)
+	return;
+
+    if (inv->state >= PJSIP_INV_STATE_CONFIRMED && call->connect_time.sec) {
+
+	pj_gettimeofday(dur);
+	PJ_TIME_VAL_SUB((*dur), call->connect_time);
+    }
+}
+
+
+static const char *good_number(char *buf, pj_int32_t val)
+{
+    if (val < 1000) {
+	pj_ansi_sprintf(buf, "%d", val);
+    } else if (val < 1000000) {
+	pj_ansi_sprintf(buf, "%d.%02dK", 
+			val / 1000,
+			(val % 1000) / 100);
+    } else {
+	pj_ansi_sprintf(buf, "%d.%02dM", 
+			val / 1000000,
+			(val % 1000000) / 10000);
+    }
+
+    return buf;
+}
+
+
+
+static void print_avg_stat(void)
+{
+#define MIN_(var,val)	   if ((int)val < (int)var) var = val
+#define MAX_(var,val)	   if ((int)val > (int)var) var = val
+#define AVG_(var,val)	   var = ( ((var * count) + val) / (count+1) )
+#define BIGVAL		    0x7FFFFFFFL
+    struct stat_entry
+    {
+	int min, avg, max;
+    };
+
+    struct stat_entry call_dur, call_pdd;
+    pjmedia_rtcp_stat min_stat, avg_stat, max_stat;
+
+    char srx_min[16], srx_avg[16], srx_max[16];
+    char brx_min[16], brx_avg[16], brx_max[16];
+    char stx_min[16], stx_avg[16], stx_max[16];
+    char btx_min[16], btx_avg[16], btx_max[16];
+
+
+    unsigned i, count;
+
+    pj_bzero(&call_dur, sizeof(call_dur)); 
+    call_dur.min = BIGVAL;
+
+    pj_bzero(&call_pdd, sizeof(call_pdd)); 
+    call_pdd.min = BIGVAL;
+
+    pj_bzero(&min_stat, sizeof(min_stat));
+    min_stat.rx.pkt = min_stat.tx.pkt = BIGVAL;
+    min_stat.rx.bytes = min_stat.tx.bytes = BIGVAL;
+    min_stat.rx.loss = min_stat.tx.loss = BIGVAL;
+    min_stat.rx.dup = min_stat.tx.dup = BIGVAL;
+    min_stat.rx.reorder = min_stat.tx.reorder = BIGVAL;
+    min_stat.rx.jitter.min = min_stat.tx.jitter.min = BIGVAL;
+    min_stat.rtt.min = BIGVAL;
+
+    pj_bzero(&avg_stat, sizeof(avg_stat));
+    pj_bzero(&max_stat, sizeof(max_stat));
+
+
+    for (i=0, count=0; i<app.max_calls; ++i) {
+
+	struct call *call = &app.call[i];
+	struct media_stream *audio = &call->media[0];
+	pj_time_val dur;
+	unsigned msec_dur;
+
+	if (call->inv == NULL || 
+	    call->inv->state < PJSIP_INV_STATE_CONFIRMED ||
+	    call->connect_time.sec == 0) 
+	{
+	    continue;
+	}
+
+	/* Duration */
+	call_get_duration(i, &dur);
+	msec_dur = PJ_TIME_VAL_MSEC(dur);
+
+	MIN_(call_dur.min, msec_dur);
+	MAX_(call_dur.max, msec_dur);
+	AVG_(call_dur.avg, msec_dur);
+
+	/* Connect delay */
+	if (call->connect_time.sec) {
+	    pj_time_val t = call->connect_time;
+	    PJ_TIME_VAL_SUB(t, call->start_time);
+	    msec_dur = PJ_TIME_VAL_MSEC(t);
+	} else {
+	    msec_dur = 10;
+	}
+
+	MIN_(call_pdd.min, msec_dur);
+	MAX_(call_pdd.max, msec_dur);
+	AVG_(call_pdd.avg, msec_dur);
+
+	/* RX Statistisc: */
+
+	/* Packets */
+	MIN_(min_stat.rx.pkt, audio->rtcp.stat.rx.pkt);
+	MAX_(max_stat.rx.pkt, audio->rtcp.stat.rx.pkt);
+	AVG_(avg_stat.rx.pkt, audio->rtcp.stat.rx.pkt);
+
+	/* Bytes */
+	MIN_(min_stat.rx.bytes, audio->rtcp.stat.rx.bytes);
+	MAX_(max_stat.rx.bytes, audio->rtcp.stat.rx.bytes);
+	AVG_(avg_stat.rx.bytes, audio->rtcp.stat.rx.bytes);
+
+
+	/* Packet loss */
+	MIN_(min_stat.rx.loss, audio->rtcp.stat.rx.loss);
+	MAX_(max_stat.rx.loss, audio->rtcp.stat.rx.loss);
+	AVG_(avg_stat.rx.loss, audio->rtcp.stat.rx.loss);
+
+	/* Packet dup */
+	MIN_(min_stat.rx.dup, audio->rtcp.stat.rx.dup);
+	MAX_(max_stat.rx.dup, audio->rtcp.stat.rx.dup);
+	AVG_(avg_stat.rx.dup, audio->rtcp.stat.rx.dup);
+
+	/* Packet reorder */
+	MIN_(min_stat.rx.reorder, audio->rtcp.stat.rx.reorder);
+	MAX_(max_stat.rx.reorder, audio->rtcp.stat.rx.reorder);
+	AVG_(avg_stat.rx.reorder, audio->rtcp.stat.rx.reorder);
+
+	/* Jitter  */
+	MIN_(min_stat.rx.jitter.min, audio->rtcp.stat.rx.jitter.min);
+	MAX_(max_stat.rx.jitter.max, audio->rtcp.stat.rx.jitter.max);
+	AVG_(avg_stat.rx.jitter.avg, audio->rtcp.stat.rx.jitter.avg);
+
+
+	/* TX Statistisc: */
+
+	/* Packets */
+	MIN_(min_stat.tx.pkt, audio->rtcp.stat.tx.pkt);
+	MAX_(max_stat.tx.pkt, audio->rtcp.stat.tx.pkt);
+	AVG_(avg_stat.tx.pkt, audio->rtcp.stat.tx.pkt);
+
+	/* Bytes */
+	MIN_(min_stat.tx.bytes, audio->rtcp.stat.tx.bytes);
+	MAX_(max_stat.tx.bytes, audio->rtcp.stat.tx.bytes);
+	AVG_(avg_stat.tx.bytes, audio->rtcp.stat.tx.bytes);
+
+	/* Packet loss */
+	MIN_(min_stat.tx.loss, audio->rtcp.stat.tx.loss);
+	MAX_(max_stat.tx.loss, audio->rtcp.stat.tx.loss);
+	AVG_(avg_stat.tx.loss, audio->rtcp.stat.tx.loss);
+
+	/* Packet dup */
+	MIN_(min_stat.tx.dup, audio->rtcp.stat.tx.dup);
+	MAX_(max_stat.tx.dup, audio->rtcp.stat.tx.dup);
+	AVG_(avg_stat.tx.dup, audio->rtcp.stat.tx.dup);
+
+	/* Packet reorder */
+	MIN_(min_stat.tx.reorder, audio->rtcp.stat.tx.reorder);
+	MAX_(max_stat.tx.reorder, audio->rtcp.stat.tx.reorder);
+	AVG_(avg_stat.tx.reorder, audio->rtcp.stat.tx.reorder);
+
+	/* Jitter  */
+	MIN_(min_stat.tx.jitter.min, audio->rtcp.stat.tx.jitter.min);
+	MAX_(max_stat.tx.jitter.max, audio->rtcp.stat.tx.jitter.max);
+	AVG_(avg_stat.tx.jitter.avg, audio->rtcp.stat.tx.jitter.avg);
+
+
+	/* RTT */
+	MIN_(min_stat.rtt.min, audio->rtcp.stat.rtt.min);
+	MAX_(max_stat.rtt.max, audio->rtcp.stat.rtt.max);
+	AVG_(avg_stat.rtt.avg, audio->rtcp.stat.rtt.avg);
+
+	++count;
+    }
+
+    if (count == 0) {
+	puts("No active calls");
+	return;
+    }
+
+    printf("Total %d call(s) active.\n"
+	   "                    Average Statistics\n"
+	   "                    min     avg     max \n"
+	   "                -----------------------\n"
+	   " call duration: %7d %7d %7d %s\n"
+	   " connect delay: %7d %7d %7d %s\n"
+	   " RX stat:\n"
+	   "       packets: %7s %7s %7s %s\n"
+	   "       payload: %7s %7s %7s %s\n"
+	   "          loss: %7d %7d %7d %s\n"
+	   "  percent loss: %7.3f %7.3f %7.3f %s\n"
+	   "           dup: %7d %7d %7d %s\n"
+	   "       reorder: %7d %7d %7d %s\n"
+	   "        jitter: %7.3f %7.3f %7.3f %s\n"
+	   " TX stat:\n"
+	   "       packets: %7s %7s %7s %s\n"
+	   "       payload: %7s %7s %7s %s\n"
+	   "          loss: %7d %7d %7d %s\n"
+	   "  percent loss: %7.3f %7.3f %7.3f %s\n"
+	   "           dup: %7d %7d %7d %s\n"
+	   "       reorder: %7d %7d %7d %s\n"
+	   "        jitter: %7.3f %7.3f %7.3f %s\n"
+	   " RTT          : %7.3f %7.3f %7.3f %s\n"
+	   ,
+	   count,
+	   call_dur.min/1000, call_dur.avg/1000, call_dur.max/1000, 
+	   "seconds",
+
+	   call_pdd.min, call_pdd.avg, call_pdd.max, 
+	   "ms",
+
+	   /* rx */
+
+	   good_number(srx_min, min_stat.rx.pkt),
+	   good_number(srx_avg, avg_stat.rx.pkt),
+	   good_number(srx_max, max_stat.rx.pkt),
+	   "packets",
+
+	   good_number(brx_min, min_stat.rx.bytes),
+	   good_number(brx_avg, avg_stat.rx.bytes),
+	   good_number(brx_max, max_stat.rx.bytes),
+	   "bytes",
+
+	   min_stat.rx.loss, avg_stat.rx.loss, max_stat.rx.loss,
+	   "packets",
+	   
+	   min_stat.rx.loss*100.0/(min_stat.rx.pkt+min_stat.rx.loss),
+	   avg_stat.rx.loss*100.0/(avg_stat.rx.pkt+avg_stat.rx.loss),
+	   max_stat.rx.loss*100.0/(max_stat.rx.pkt+max_stat.rx.loss),
+	   "%",
+
+
+	   min_stat.rx.dup, avg_stat.rx.dup, max_stat.rx.dup,
+	   "packets",
+
+	   min_stat.rx.reorder, avg_stat.rx.reorder, max_stat.rx.reorder,
+	   "packets",
+
+	   min_stat.rx.jitter.min/1000.0, 
+	   avg_stat.rx.jitter.avg/1000.0, 
+	   max_stat.rx.jitter.max/1000.0,
+	   "ms",
+	
+	   /* tx */
+
+	   good_number(stx_min, min_stat.tx.pkt),
+	   good_number(stx_avg, avg_stat.tx.pkt),
+	   good_number(stx_max, max_stat.tx.pkt),
+	   "packets",
+
+	   good_number(btx_min, min_stat.tx.bytes),
+	   good_number(btx_avg, avg_stat.tx.bytes),
+	   good_number(btx_max, max_stat.tx.bytes),
+	   "bytes",
+
+	   min_stat.tx.loss, avg_stat.tx.loss, max_stat.tx.loss,
+	   "packets",
+	   
+	   min_stat.tx.loss*100.0/(min_stat.tx.pkt+min_stat.tx.loss),
+	   avg_stat.tx.loss*100.0/(avg_stat.tx.pkt+avg_stat.tx.loss),
+	   max_stat.tx.loss*100.0/(max_stat.tx.pkt+max_stat.tx.loss),
+	   "%",
+
+	   min_stat.tx.dup, avg_stat.tx.dup, max_stat.tx.dup,
+	   "packets",
+
+	   min_stat.tx.reorder, avg_stat.tx.reorder, max_stat.tx.reorder,
+	   "packets",
+
+	   min_stat.tx.jitter.min/1000.0, 
+	   avg_stat.tx.jitter.avg/1000.0, 
+	   max_stat.tx.jitter.max/1000.0,
+	   "ms",
+
+	   /* rtt */
+	   min_stat.rtt.min/1000.0, 
+	   avg_stat.rtt.avg/1000.0, 
+	   max_stat.rtt.max/1000.0,
+	   "ms"
+	   );
+
+}
+
+
+#include "siprtp_report.c"
+
+
+static void list_calls()
+{
+    unsigned i;
+    puts("List all calls:");
+    for (i=0; i<app.max_calls; ++i) {
+	if (!app.call[i].inv)
+	    continue;
+	print_call(i);
+    }
+}
+
+static void hangup_call(unsigned index)
+{
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    if (app.call[index].inv == NULL)
+	return;
+
+    status = pjsip_inv_end_session(app.call[index].inv, 603, NULL, &tdata);
+    if (status==PJ_SUCCESS && tdata!=NULL)
+	pjsip_inv_send_msg(app.call[index].inv, tdata);
+}
+
+static void hangup_all_calls()
+{
+    unsigned i;
+    for (i=0; i<app.max_calls; ++i) {
+	if (!app.call[i].inv)
+	    continue;
+	hangup_call(i);
+    }
+    
+    /* Wait until all calls are terminated */
+    for (i=0; i<app.max_calls; ++i) {
+	while (app.call[i].inv)
+	    pj_thread_sleep(10);
+    }
+}
+
+static pj_bool_t simple_input(const char *title, char *buf, pj_size_t len)
+{
+    char *p;
+
+    printf("%s (empty to cancel): ", title); fflush(stdout);
+    fgets(buf, len, stdin);
+
+    /* Remove trailing newlines. */
+    for (p=buf; ; ++p) {
+	if (*p=='\r' || *p=='\n') *p='\0';
+	else if (!*p) break;
+    }
+
+    if (!*buf)
+	return PJ_FALSE;
+    
+    return PJ_TRUE;
+}
+
+
+static const char *MENU =
+"\n"
+"Enter menu character:\n"
+"  s    Summary\n"
+"  l    List all calls\n"
+"  h    Hangup a call\n"
+"  H    Hangup all calls\n"
+"  q    Quit\n"
+"\n";
+
+
+/* Main screen menu */
+static void console_main()
+{
+    char input1[10];
+    unsigned i;
+
+    printf("%s", MENU);
+
+    for (;;) {
+	printf(">>> "); fflush(stdout);
+	fgets(input1, sizeof(input1), stdin);
+
+	switch (input1[0]) {
+
+	case 's':
+	    print_avg_stat();
+	    break;
+
+	case 'l':
+	    list_calls();
+	    break;
+
+	case 'h':
+	    if (!simple_input("Call number to hangup", input1, sizeof(input1)))
+		break;
+
+	    i = atoi(input1);
+	    hangup_call(i);
+	    break;
+
+	case 'H':
+	    hangup_all_calls();
+	    break;
+
+	case 'q':
+	    goto on_exit;
+
+	default:
+	    puts("Invalid command");
+	    printf("%s", MENU);
+	    break;
+	}
+
+	fflush(stdout);
+    }
+
+on_exit:
+    hangup_all_calls();
+}
+
+
+/*****************************************************************************
+ * Below is a simple module to log all incoming and outgoing SIP messages
+ */
+
+
+/* Notification on incoming messages */
+static pj_bool_t logger_on_rx_msg(pjsip_rx_data *rdata)
+{
+    PJ_LOG(4,(THIS_FILE, "RX %d bytes %s from %s:%d:\n"
+			 "%s\n"
+			 "--end msg--",
+			 rdata->msg_info.len,
+			 pjsip_rx_data_get_info(rdata),
+			 rdata->pkt_info.src_name,
+			 rdata->pkt_info.src_port,
+			 rdata->msg_info.msg_buf));
+    
+    /* Always return false, otherwise messages will not get processed! */
+    return PJ_FALSE;
+}
+
+/* Notification on outgoing messages */
+static pj_status_t logger_on_tx_msg(pjsip_tx_data *tdata)
+{
+    
+    /* Important note:
+     *	tp_info field is only valid after outgoing messages has passed
+     *	transport layer. So don't try to access tp_info when the module
+     *	has lower priority than transport layer.
+     */
+
+    PJ_LOG(4,(THIS_FILE, "TX %d bytes %s to %s:%d:\n"
+			 "%s\n"
+			 "--end msg--",
+			 (tdata->buf.cur - tdata->buf.start),
+			 pjsip_tx_data_get_info(tdata),
+			 tdata->tp_info.dst_name,
+			 tdata->tp_info.dst_port,
+			 tdata->buf.start));
+
+    /* Always return success, otherwise message will not get sent! */
+    return PJ_SUCCESS;
+}
+
+/* The module instance. */
+static pjsip_module msg_logger = 
+{
+    NULL, NULL,				/* prev, next.		*/
+    { "mod-siprtp-log", 14 },		/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_TRANSPORT_LAYER-1,/* Priority	        */
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    &logger_on_rx_msg,			/* on_rx_request()	*/
+    &logger_on_rx_msg,			/* on_rx_response()	*/
+    &logger_on_tx_msg,			/* on_tx_request.	*/
+    &logger_on_tx_msg,			/* on_tx_response()	*/
+    NULL,				/* on_tsx_state()	*/
+
+};
+
+
+
+/*****************************************************************************
+ * Console application custom logging:
+ */
+
+
+static FILE *log_file;
+
+
+static void app_log_writer(int level, const char *buffer, int len)
+{
+    /* Write to both stdout and file. */
+
+    if (level <= app.app_log_level)
+	pj_log_write(level, buffer, len);
+
+    if (log_file) {
+	fwrite(buffer, len, 1, log_file);
+	fflush(log_file);
+    }
+}
+
+
+pj_status_t app_logging_init(void)
+{
+    /* Redirect log function to ours */
+
+    pj_log_set_log_func( &app_log_writer );
+
+    /* If output log file is desired, create the file: */
+
+    if (app.log_filename) {
+	log_file = fopen(app.log_filename, "wt");
+	if (log_file == NULL) {
+	    PJ_LOG(1,(THIS_FILE, "Unable to open log file %s", 
+		      app.log_filename));   
+	    return -1;
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+void app_logging_shutdown(void)
+{
+    /* Close logging file, if any: */
+
+    if (log_file) {
+	fclose(log_file);
+	log_file = NULL;
+    }
+}
+
+
+/*
+ * main()
+ */
+int main(int argc, char *argv[])
+{
+    unsigned i;
+    pj_status_t status;
+
+    /* Must init PJLIB first */
+    status = pj_init();
+    if (status != PJ_SUCCESS)
+	return 1;
+
+    /* Get command line options */
+    status = init_options(argc, argv);
+    if (status != PJ_SUCCESS)
+	return 1;
+
+    /* Verify options: */
+
+    /* Auto-quit can not be specified for UAS */
+    if (app.auto_quit && app.uri_to_call.slen == 0) {
+	printf("Error: --auto-quit option only valid for outgoing "
+	       "mode (UAC) only\n");
+	return 1;
+    }
+
+    /* Init logging */
+    status = app_logging_init();
+    if (status != PJ_SUCCESS)
+	return 1;
+
+    /* Init SIP etc */
+    status = init_sip();
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Initialization has failed", status);
+	destroy_sip();
+	return 1;
+    }
+
+    /* Register module to log incoming/outgoing messages */
+    pjsip_endpt_register_module(app.sip_endpt, &msg_logger);
+
+    /* Init media */
+    status = init_media();
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Media initialization failed", status);
+	destroy_sip();
+	return 1;
+    }
+
+    /* Start worker threads */
+    for (i=0; i<app.thread_count; ++i) {
+	pj_thread_create( app.pool, "app", &sip_worker_thread, NULL,
+			  0, 0, &app.sip_thread[i]);
+    }
+
+    /* If URL is specified, then make call immediately */
+    if (app.uri_to_call.slen) {
+	unsigned i;
+
+	PJ_LOG(3,(THIS_FILE, "Making %d calls to %s..", app.max_calls,
+		  app.uri_to_call.ptr));
+
+	for (i=0; i<app.max_calls; ++i) {
+	    status = make_call(&app.uri_to_call);
+	    if (status != PJ_SUCCESS) {
+		app_perror(THIS_FILE, "Error making call", status);
+		break;
+	    }
+	}
+
+	if (app.auto_quit) {
+	    /* Wait for calls to complete */
+	    while (app.uac_calls < app.max_calls)
+		pj_thread_sleep(100);
+	    pj_thread_sleep(200);
+	} else {
+	    /* Start user interface loop */
+	    console_main();
+	}
+
+    } else {
+
+	PJ_LOG(3,(THIS_FILE, "Ready for incoming calls (max=%d)", 
+		  app.max_calls));
+
+	/* Start user interface loop */
+	console_main();
+
+    }
+
+    
+    /* Shutting down... */
+    destroy_sip();
+    destroy_media();
+
+    if (app.pool) {
+	pj_pool_release(app.pool);
+	app.pool = NULL;
+	pj_caching_pool_destroy(&app.cp);
+    }
+
+    app_logging_shutdown();
+
+    /* Shutdown PJLIB */
+    pj_shutdown();
+
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/siprtp_report.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/siprtp_report.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/siprtp_report.c	(revision 1163)
@@ -0,0 +1,230 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 < 1)
+	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.avg / 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.avg / 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.avg / 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.avg / 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.avg / 1000.0,
+	   audio->rtcp.stat.rtt.max / 1000.0,
+	   audio->rtcp.stat.rtt.last / 1000.0,
+	   ""
+	   ));
+
+    pj_log_set_decor(decor);
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/sipstateless.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/sipstateless.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/sipstateless.c	(revision 1163)
@@ -0,0 +1,177 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/**
+ * sipcore.c
+ *
+ * A simple program to respond any incoming requests (except ACK, of course!)
+ * with any status code (taken from command line argument, with the default
+ * is 501/Not Implemented).
+ */
+
+
+/* Include all headers. */
+#include <pjsip.h>
+#include <pjlib-util.h>
+#include <pjlib.h>
+
+
+/* If this macro is set, UDP transport will be initialized at port 5060 */
+#define HAS_UDP_TRANSPORT
+
+/* If this macro is set, TCP transport will be initialized at port 5060 */
+#define HAS_TCP_TRANSPORT   (1 && PJ_HAS_TCP)
+
+/* Log identification */
+#define THIS_FILE	"sipstateless.c"
+
+
+/* Global SIP endpoint */
+static pjsip_endpoint *sip_endpt;
+
+/* What response code to be sent (default is 501/Not Implemented) */
+static int code = PJSIP_SC_NOT_IMPLEMENTED;
+
+
+/* Callback to handle incoming requests. */
+static pj_bool_t on_rx_request( pjsip_rx_data *rdata )
+{
+    /* Respond (statelessly) all incoming requests (except ACK!) 
+     * with 501 (Not Implemented)
+     */
+    if (rdata->msg_info.msg->line.req.method.id != PJSIP_ACK_METHOD) {
+	pjsip_endpt_respond_stateless( sip_endpt, rdata, 
+				       code, NULL,
+				       NULL, NULL);
+    }
+    return PJ_TRUE;
+}
+
+
+
+/*
+ * main()
+ *
+ */
+int main(int argc, char *argv[])
+{
+    pj_caching_pool cp;
+    pjsip_module mod_app =
+    {
+	NULL, NULL,		    /* prev, next.		*/
+	{ "mod-app", 7 },	    /* Name.			*/
+	-1,				    /* Id		*/
+	PJSIP_MOD_PRIORITY_APPLICATION, /* Priority		*/
+	NULL,			    /* load()			*/
+	NULL,			    /* start()			*/
+	NULL,			    /* stop()			*/
+	NULL,			    /* unload()			*/
+	&on_rx_request,		    /* on_rx_request()		*/
+	NULL,			    /* on_rx_response()		*/
+	NULL,			    /* on_tx_request.		*/
+	NULL,			    /* on_tx_response()		*/
+	NULL,			    /* on_tsx_state()		*/
+    };
+
+
+    pj_status_t status;
+    
+    if (argc == 2)
+	code = atoi(argv[1]);
+
+    /* Must init PJLIB first: */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Then init PJLIB-UTIL: */
+    status = pjlib_util_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+
+
+    /* Create global endpoint: */
+    {
+	/* Endpoint MUST be assigned a globally unique name.
+	 * Ideally we should put hostname or public IP address, but
+	 * we'll just use an arbitrary name here.
+	 */
+
+	/* Create the endpoint: */
+	status = pjsip_endpt_create(&cp.factory, "sipstateless", 
+				    &sip_endpt);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+    }
+
+    /* 
+     * Add UDP transport, with hard-coded port 
+     */
+#ifdef HAS_UDP_TRANSPORT
+    {
+	pj_sockaddr_in addr;
+
+	addr.sin_family = PJ_AF_INET;
+	addr.sin_addr.s_addr = 0;
+	addr.sin_port = pj_htons(5060);
+
+	status = pjsip_udp_transport_start( sip_endpt, &addr, NULL, 1, NULL);
+	if (status != PJ_SUCCESS) {
+	    PJ_LOG(3,(THIS_FILE, 
+		      "Error starting UDP transport (port in use?)"));
+	    return 1;
+	}
+    }
+#endif
+
+#if HAS_TCP_TRANSPORT
+    /* 
+     * Add UDP transport, with hard-coded port 
+     */
+    {
+	pj_sockaddr_in addr;
+
+	addr.sin_family = PJ_AF_INET;
+	addr.sin_addr.s_addr = 0;
+	addr.sin_port = pj_htons(5060);
+
+	status = pjsip_tcp_transport_start(sip_endpt, &addr, 1, NULL);
+	if (status != PJ_SUCCESS) {
+	    PJ_LOG(3,(THIS_FILE, 
+		      "Error starting TCP transport (port in use?)"));
+	    return 1;
+	}
+    }
+#endif
+
+    /*
+     * Register our module to receive incoming requests.
+     */
+    status = pjsip_endpt_register_module( sip_endpt, &mod_app);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Done. Loop forever to handle incoming events. */
+    PJ_LOG(3,(THIS_FILE, "Press Ctrl-C to quit.."));
+
+    for (;;) {
+	pjsip_endpt_handle_events(sip_endpt, NULL);
+    }
+}
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/sndinfo.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/sndinfo.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/sndinfo.c	(revision 1163)
@@ -0,0 +1,294 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+static const char *desc = 
+ " sndinfo.c								    \n"
+ "									    \n"
+ " PURPOSE:								    \n"
+ "  Print sound device info and test open device.			    \n"
+ "									    \n"
+ " USAGE:								    \n"
+ "  sndinfo [id rec/play/both clockrate nchan bits]			    \n"
+ "									    \n"
+ " DESCRIPTION:								    \n"
+ "  When invoked without any arguments, it displays information about all   \n"
+ "  sound devices in the system.					    \n"
+ "									    \n"
+ "  When invoked with arguments, the program tests if device can be opened  \n"
+ "  with the specified arguments. All these arguments must be specified:    \n"
+ "  - id             The device ID (-1 for the first capable device)	    \n"
+ "  - rec/play/both  Specify which streams to open.			    \n"
+ "  - clockrate      Specify clock rate (e.g. 8000, 11025, etc.)	    \n"
+ "  - nchan	     Number of channels (1=mono, 2=stereo).		    \n"
+ "  - bits	     Number of bits per sample (normally 16).		    \n";
+
+#include <pjmedia.h>
+#include <pjlib.h>
+
+#include <stdlib.h>	/* atoi() */
+#include <stdio.h>
+
+
+static void enum_devices(void)
+{
+    int i, count;
+    
+    count = pjmedia_snd_get_dev_count();
+    if (count == 0) {
+	puts("No devices found");
+	return;
+    }
+
+    for (i=0; i<count; ++i) {
+	const pjmedia_snd_dev_info *info;
+
+	info = pjmedia_snd_get_dev_info(i);
+	pj_assert(info != NULL);
+
+	printf( "Device #%02d: \n"
+		"  Name                : %s\n"
+		"  # of input channels : %d\n"
+		"  # of output channels: %d\n"
+		"  Default clock rate  : %d Hz\n\n",
+		i, info->name, info->input_count, info->output_count,
+		info->default_samples_per_sec);
+    }
+    puts("");
+    puts("Run with -h to get more options");
+}
+
+static unsigned clock_rate;
+static unsigned play_counter;
+static unsigned rec_counter;
+static unsigned min_delay = 0xFFFF, max_delay;
+static char play_delays[1000];
+static pj_uint32_t last_play_timestamp, last_rec_timestamp;
+
+static pj_status_t play_cb(void *user_data, pj_uint32_t timestamp,
+			   void *output, unsigned size)
+{
+    static pj_timestamp last_cb;
+
+
+    PJ_UNUSED_ARG(user_data);
+    PJ_UNUSED_ARG(output);
+    PJ_UNUSED_ARG(size);
+
+
+    ++play_counter;
+    last_play_timestamp = timestamp;
+
+    if (last_cb.u64 == 0) {
+	pj_get_timestamp(&last_cb);
+    } else if (play_counter <= PJ_ARRAY_SIZE(play_delays)) {
+	pj_timestamp now;
+	unsigned delay;
+
+	pj_get_timestamp(&now);
+	
+	delay = pj_elapsed_msec(&last_cb, &now);
+	if (delay < min_delay)
+	    min_delay = delay;
+	if (delay > max_delay)
+	    max_delay = delay;
+
+	last_cb = now;
+
+	play_delays[play_counter-1] = (char)delay;
+    }
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t rec_cb(void *user_data, pj_uint32_t timestamp,
+			  void *input, unsigned size)
+{
+
+    PJ_UNUSED_ARG(size);
+    PJ_UNUSED_ARG(input);
+    PJ_UNUSED_ARG(user_data);
+
+
+    ++rec_counter;
+
+    if (timestamp - last_rec_timestamp >= clock_rate && last_play_timestamp) {
+	int diff;
+	diff = last_play_timestamp - timestamp;
+	printf("Play timestamp=%u, capture timestamp=%u, diff=%d\n",
+	       last_play_timestamp, timestamp, diff);
+	last_rec_timestamp = timestamp;
+    }
+    return PJ_SUCCESS;
+}
+
+static void app_perror(const char *title, pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    pj_strerror(status, errmsg, sizeof(errmsg));	
+    printf( "%s: %s (err=%d)\n",
+	    title, errmsg, status);
+}
+
+static int open_device(int dev_id, pjmedia_dir dir,
+		       int nchannel, int bits)
+{
+    pj_status_t status = PJ_SUCCESS;
+    unsigned nsamples;
+    pjmedia_snd_stream *strm;
+    const char *dirtype;
+    char tmp[10];
+    unsigned i;
+
+    switch (dir) {
+    case PJMEDIA_DIR_CAPTURE:
+	dirtype = "capture"; break;    
+    case PJMEDIA_DIR_PLAYBACK:
+	dirtype = "playback"; break;    
+    case PJMEDIA_DIR_CAPTURE_PLAYBACK:
+	dirtype = "capture/playback"; break;    
+    default:
+	return 1;
+    }
+    
+    nsamples = clock_rate * 20 / 1000;
+
+    printf( "Opening device %d for %s: clockrate=%d, nchannel=%d, "
+	    "bits=%d, nsamples=%d..\n",
+	    dev_id, dirtype, clock_rate, nchannel, bits, nsamples);
+
+    if (dir == PJMEDIA_DIR_CAPTURE) {
+	status = pjmedia_snd_open_rec( dev_id, clock_rate, nchannel,
+				       nsamples, bits, &rec_cb, NULL,
+				       &strm);
+    } else if (dir == PJMEDIA_DIR_PLAYBACK) {
+	status = pjmedia_snd_open_player( dev_id, clock_rate, nchannel,
+					  nsamples, bits, &play_cb, NULL,
+					  &strm);
+    } else {
+	status = pjmedia_snd_open( dev_id, dev_id, clock_rate, nchannel,
+				   nsamples, bits, &rec_cb, &play_cb, NULL,
+				   &strm);
+    }
+    
+    if (status != PJ_SUCCESS) {
+        app_perror("Unable to open device for capture", status);
+        return 1;
+    }
+
+    status = pjmedia_snd_stream_start(strm);
+    if (status != PJ_SUCCESS) {
+        app_perror("Unable to start capture stream", status);
+        return 1;
+    }
+    
+    /* Let playback/capture runs for a while */
+    //pj_thread_sleep(1000);
+    puts("Press <ENTER> to stop");
+    fgets(tmp, sizeof(tmp), stdin);
+
+
+    pjmedia_snd_stream_close(strm);
+
+    if ((dir & PJMEDIA_DIR_CAPTURE) && rec_counter==0) {
+	printf("Error: capture stream was not running\n");
+	return 1;
+    }
+
+    if ((dir & PJMEDIA_DIR_PLAYBACK) && play_counter==0) {
+	printf("Error: playback stream was not running\n");
+	return 1;
+    }
+
+    puts("Success.");
+
+    printf("Delay: ");
+    for (i=0; i<play_counter; ++i)
+	printf("%d ", play_delays[i]);
+
+    puts("");
+    if (dir & PJMEDIA_DIR_PLAYBACK) {
+	printf("Callback interval: min interval=%d ms, max interval=%d ms\n",
+	       min_delay, max_delay);
+    }
+    
+
+    return 0;
+}
+
+
+int main(int argc, char *argv[])
+{
+    pj_caching_pool cp;
+    pjmedia_endpt *med_endpt;
+    pj_status_t status;
+
+    /* Init pjlib */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, 1);
+    
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+
+    /* 
+     * Initialize media endpoint.
+     * This will implicitly initialize PJMEDIA too.
+     */
+    status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    
+    if (argc == 1) {
+	enum_devices();
+	return 0;
+    } else if (argc == 6) {
+	
+	int dev_id;
+	pjmedia_dir dir = PJMEDIA_DIR_NONE;
+	int nchannel;
+	int bits;
+
+	dev_id = atoi(argv[1]);
+
+	if (strcmp(argv[2], "rec")==0)
+	    dir = PJMEDIA_DIR_CAPTURE;
+	else if (strcmp(argv[2], "play")==0)
+	    dir = PJMEDIA_DIR_PLAYBACK;
+	else if (strcmp(argv[2], "both")==0)
+	    dir = PJMEDIA_DIR_CAPTURE_PLAYBACK;
+
+	clock_rate = atoi(argv[3]);
+	nchannel = atoi(argv[4]);
+	bits = atoi(argv[5]);
+
+	return open_device(dev_id, dir, nchannel, bits);
+
+    } else {
+	puts("Error: invalid arguments");
+	puts(desc);
+	return 1;
+    }
+
+    /* Shutdown PJLIB */
+    pj_shutdown();
+
+    return 0;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/sndtest.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/sndtest.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/sndtest.c	(revision 1163)
@@ -0,0 +1,600 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/**
+ * \page page_pjmedia_samples_sndtest_c Samples: Sound Card Benchmark
+ *
+ * This example can be used to benchmark the quality of the sound card
+ * installed in the system. At the end of the test, it will report
+ * the jitter and clock drifts of the device.
+ *
+ * This file is pjsip-apps/src/samples/sndtest.c
+ *
+ * Screenshots on WinXP: \image html sndtest.jpg
+ *
+ * \includelineno sndtest.c
+ */
+
+
+#include <pjmedia.h>
+#include <pjlib.h>
+#include <pjlib-util.h>
+
+#include <stdlib.h>	/* atoi() */
+#include <stdio.h>
+
+
+
+#define THIS_FILE	    "sndtest.c"
+
+/* Warn (print log with yellow color) if frame jitter is larger than
+ * this value (in usec).
+ */
+#define WARN_JITTER_USEC    1000
+
+/* Test duration in msec */
+#define DURATION	    10000
+
+/* Skip the first msec from the calculation */
+#define SKIP_DURATION	    1000
+
+/* Max frames per sec (to calculate number of delays to keep). */
+#define MAX_FRAMES_PER_SEC  100
+
+/* Number of frame durations to keep */
+#define MAX_DELAY_COUNTER   (((DURATION/1000)+1)*MAX_FRAMES_PER_SEC)
+
+
+struct stream_data
+{
+    pj_uint32_t	    first_timestamp;
+    pj_uint32_t	    last_timestamp;
+    pj_timestamp    last_called;
+    unsigned	    counter;
+    unsigned	    min_delay;
+    unsigned	    max_delay;
+    unsigned	    delay[MAX_DELAY_COUNTER];
+};
+
+struct test_data {
+    pjmedia_dir dir;
+    unsigned clock_rate;
+    unsigned samples_per_frame;
+    unsigned channel_count;
+    pj_bool_t running;
+    pj_bool_t has_error;
+
+    struct stream_data capture_data;
+    struct stream_data playback_data;
+};
+
+
+
+static const char *desc = 
+ " sndtest.c						\n"
+ "							\n"
+ " PURPOSE:						\n"
+ "  Test the performance of sound device.		\n"
+ "							\n"
+ " USAGE:						\n"
+ "  sndtest --help					\n"
+ "  sndtest [options]					\n"
+ "							\n"
+ " where options:					\n"
+ "  --id=ID          -i  Use device ID (default is -1)	\n"
+ "  --rate=HZ        -r  Set test clock rate (default=8000)\n"
+ "  --frame=SAMPLES  -f  Set number of samples per frame\n"
+ "  --channel=CH     -n  Set number of channels (default=1)\n"
+ "  --verbose        -v  Show verbose result		\n"
+ "  --help           -h  Show this screen		\n"
+;
+
+
+
+static void enum_devices(void)
+{
+    int i, count;
+    
+    count = pjmedia_snd_get_dev_count();
+    if (count == 0) {
+	PJ_LOG(3,(THIS_FILE, "No devices found"));
+	return;
+    }
+
+    PJ_LOG(3,(THIS_FILE, "Found %d devices:", count));
+    for (i=0; i<count; ++i) {
+	const pjmedia_snd_dev_info *info;
+
+	info = pjmedia_snd_get_dev_info(i);
+	pj_assert(info != NULL);
+
+	PJ_LOG(3,(THIS_FILE," %d: %s (capture=%d, playback=%d)",
+	          i, info->name, info->input_count, info->output_count));
+    }
+}
+
+
+static pj_status_t play_cb(void *user_data, pj_uint32_t timestamp,
+			   void *output, unsigned size)
+{
+    struct test_data *test_data = user_data;
+    struct stream_data *strm_data = &test_data->playback_data;
+
+    /* Skip frames when test is not started or test has finished */
+    if (!test_data->running) {
+	pj_bzero(output, size);
+	return PJ_SUCCESS;
+    }
+
+    /* Save last timestamp seen (to calculate drift) */
+    strm_data->last_timestamp = timestamp;
+
+    if (strm_data->last_called.u64 == 0) {
+	pj_get_timestamp(&strm_data->last_called);
+	/* Init min_delay to one frame */
+	strm_data->min_delay = test_data->samples_per_frame * 1000000 /
+			       test_data->clock_rate;
+	strm_data->first_timestamp = timestamp;
+
+    } else if (strm_data->counter <= MAX_DELAY_COUNTER) {
+	pj_timestamp now;
+	unsigned delay;
+
+	pj_get_timestamp(&now);
+	
+	/* Calculate frame interval */
+	delay = pj_elapsed_usec(&strm_data->last_called, &now);
+	if (delay < strm_data->min_delay)
+	    strm_data->min_delay = delay;
+	if (delay > strm_data->max_delay)
+	    strm_data->max_delay = delay;
+
+	strm_data->last_called = now;
+
+	/* Save the frame interval for later calculation */
+	strm_data->delay[strm_data->counter] = delay;
+	++strm_data->counter;
+
+    } else {
+
+	/* No space, can't take anymore frames */
+	test_data->running = 0;
+
+    }
+
+    pj_bzero(output, size);
+    return PJ_SUCCESS;
+}
+
+static pj_status_t rec_cb(void *user_data, pj_uint32_t timestamp,
+			  void *input, unsigned size)
+{
+
+    struct test_data *test_data = user_data;
+    struct stream_data *strm_data = &test_data->capture_data;
+
+    PJ_UNUSED_ARG(input);
+    PJ_UNUSED_ARG(size);
+
+    /* Skip frames when test is not started or test has finished */
+    if (!test_data->running) {
+	return PJ_SUCCESS;
+    }
+
+    /* Save last timestamp seen (to calculate drift) */
+    strm_data->last_timestamp = timestamp;
+
+    if (strm_data->last_called.u64 == 0) {
+	pj_get_timestamp(&strm_data->last_called);
+	/* Init min_delay to one frame */
+	strm_data->min_delay = test_data->samples_per_frame * 1000000 /
+			       test_data->clock_rate;
+	strm_data->first_timestamp = timestamp;
+
+    } else if (strm_data->counter <= MAX_DELAY_COUNTER) {
+	pj_timestamp now;
+	unsigned delay;
+
+	pj_get_timestamp(&now);
+
+	/* Calculate frame interval */
+	delay = pj_elapsed_usec(&strm_data->last_called, &now);
+	if (delay < strm_data->min_delay)
+	    strm_data->min_delay = delay;
+	if (delay > strm_data->max_delay)
+	    strm_data->max_delay = delay;
+
+	strm_data->last_called = now;
+
+	/* Save the frame interval for later calculation */
+	strm_data->delay[strm_data->counter] = delay;
+	++strm_data->counter;
+
+    } else {
+
+	/* No space, can't take anymore frames */
+	test_data->running = 0;
+
+    }
+
+    return PJ_SUCCESS;
+}
+
+static void app_perror(const char *title, pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    pj_strerror(status, errmsg, sizeof(errmsg));	
+    printf( "%s: %s (err=%d)\n",
+	    title, errmsg, status);
+}
+
+
+static void print_stream_data(const char *title, 
+			      struct test_data *test_data,
+			      struct stream_data *strm_data,
+			      int verbose)
+{
+    unsigned i, dur;
+    int ptime;
+    unsigned min_jitter, max_jitter, sum_jitter, avg_jitter=0;
+
+    PJ_LOG(3,(THIS_FILE, "  %s stream report:", title));
+
+    /* Check that frames are captured/played */
+    if (strm_data->counter == 0) {
+	PJ_LOG(1,(THIS_FILE, "   Error: no frames are captured/played!"));
+	test_data->has_error = 1;
+	return;
+    }
+
+    /* Duration */
+    dur = (strm_data->counter+1) * test_data->samples_per_frame * 1000 /
+		test_data->clock_rate;
+    PJ_LOG(3,(THIS_FILE, "   Duration: %ds.%03d",
+	      dur/1000, dur%1000));
+
+    /* Frame interval */
+    if (strm_data->max_delay - strm_data->min_delay < WARN_JITTER_USEC) {
+	PJ_LOG(3,(THIS_FILE, 
+		  "   Frame interval: min=%d.%03dms, max=%d.%03dms",
+		  strm_data->min_delay/1000, strm_data->min_delay%1000,
+		  strm_data->max_delay/1000, strm_data->max_delay%1000));
+    } else {
+	test_data->has_error = 1;
+	PJ_LOG(2,(THIS_FILE, 
+		  "   Frame interval: min=%d.%03dms, max=%d.%03dms",
+		  strm_data->min_delay/1000, strm_data->min_delay%1000,
+		  strm_data->max_delay/1000, strm_data->max_delay%1000));
+    }
+
+    if (verbose) {
+	unsigned i;
+	unsigned decor = pj_log_get_decor();
+
+	PJ_LOG(3,(THIS_FILE, "    Dumping frame delays:"));
+
+	pj_log_set_decor(0);
+	for (i=0; i<strm_data->counter; ++i)
+	    PJ_LOG(3,(THIS_FILE, " %d.%03d", strm_data->delay[i]/1000, 
+		      strm_data->delay[i]%1000));
+	PJ_LOG(3,(THIS_FILE, "\r\n"));
+	pj_log_set_decor(decor);
+    }
+
+    /* Calculate frame ptime in usec */
+    ptime = test_data->samples_per_frame * 1000000 /
+	    test_data->clock_rate;
+
+    /* Calculate jitter */
+    min_jitter = 0xFFFFF;
+    max_jitter = 0;
+    sum_jitter = 0;
+
+    for (i=1; i<strm_data->counter; ++i) {
+	int jitter1, jitter2, jitter;
+
+	/* jitter1 is interarrival difference */
+	jitter1 = strm_data->delay[i] - strm_data->delay[i-1];
+	if (jitter1 < 0) jitter1 = -jitter1;
+	
+	/* jitter2 is difference between actual and scheduled arrival.
+	 * This is intended to capture situation when frames are coming
+	 * instantaneously, which will calculate as zero jitter with
+	 * jitter1 calculation.
+	 */
+	jitter2 = ptime - strm_data->delay[i];
+	if (jitter2 < 0) jitter2 = -jitter2;
+
+	/* Set jitter as the maximum of the two jitter calculations. 
+	 * This is intended to show the worst result.
+	 */
+	jitter = (jitter1>jitter2) ? jitter1 : jitter2;
+
+	/* Calculate min, max, avg jitter */
+	if (jitter < (int)min_jitter) min_jitter = jitter;
+	if (jitter > (int)max_jitter) max_jitter = jitter;
+
+	sum_jitter += jitter;
+    }
+
+    avg_jitter = (sum_jitter) / (strm_data->counter - 1);
+
+    if (max_jitter < WARN_JITTER_USEC) {
+	PJ_LOG(3,(THIS_FILE, 
+		  "   Jitter: min=%d.%03dms, avg=%d.%03dms, max=%d.%03dms",
+		  min_jitter/1000, min_jitter%1000, 
+		  avg_jitter/1000, avg_jitter%1000,
+		  max_jitter/1000, max_jitter%1000));
+    } else {
+	test_data->has_error = 1;
+	PJ_LOG(2,(THIS_FILE, 
+		  "   Jitter: min=%d.%03dms, avg=%d.%03dms, max=%d.%03dms",
+		  min_jitter/1000, min_jitter%1000, 
+		  avg_jitter/1000, avg_jitter%1000,
+		  max_jitter/1000, max_jitter%1000));
+    }
+}
+
+
+static int perform_test(int dev_id, pjmedia_dir dir,
+		        unsigned clock_rate, unsigned samples_per_frame, 
+			unsigned nchannel, int verbose)
+{
+    pj_status_t status = PJ_SUCCESS;
+    pjmedia_snd_stream *strm;
+    struct test_data test_data;
+    pjmedia_snd_stream_info si;
+
+
+    /*
+     * Init test parameters
+     */
+    pj_bzero(&test_data, sizeof(test_data));
+    test_data.dir = dir;
+    test_data.clock_rate = clock_rate;
+    test_data.samples_per_frame = samples_per_frame;
+    test_data.channel_count = nchannel;
+
+    /*
+     * Open device.
+     */
+    if (dir == PJMEDIA_DIR_CAPTURE) {
+	status = pjmedia_snd_open_rec( dev_id, clock_rate, nchannel,
+				       samples_per_frame, 16, &rec_cb, 
+				       &test_data, &strm);
+    } else if (dir == PJMEDIA_DIR_PLAYBACK) {
+	status = pjmedia_snd_open_player( dev_id, clock_rate, nchannel,
+					  samples_per_frame, 16, &play_cb, 
+					  &test_data, &strm);
+    } else {
+	status = pjmedia_snd_open( dev_id, dev_id, clock_rate, nchannel,
+				   samples_per_frame, 16, &rec_cb, &play_cb, 
+				   &test_data, &strm);
+    }
+    
+    if (status != PJ_SUCCESS) {
+        app_perror("Unable to open device for capture", status);
+        return status;
+    }
+
+    pjmedia_snd_stream_get_info(strm, &si);
+    if (si.play_id >= 0) {
+	PJ_LOG(3,(THIS_FILE, "Testing playback device %s", 
+		  pjmedia_snd_get_dev_info(si.play_id)->name));
+    }
+    if (si.rec_id >= 0) {
+	PJ_LOG(3,(THIS_FILE, "Testing capture device %s", 
+		  pjmedia_snd_get_dev_info(si.rec_id)->name));
+    }
+
+    /* Sleep for a while to let sound device "settles" */
+    pj_thread_sleep(200);
+
+
+    /*
+     * Start the stream.
+     */
+    status = pjmedia_snd_stream_start(strm);
+    if (status != PJ_SUCCESS) {
+        app_perror("Unable to start capture stream", status);
+        return status;
+    }
+
+    PJ_LOG(3,(THIS_FILE,
+	      " Please wait while test is in progress (~%d secs)..",
+	      (DURATION+SKIP_DURATION)/1000));
+
+    /* Let the stream runs for few msec/sec to get stable result.
+     * (capture normally begins with frames available simultaneously).
+     */
+    pj_thread_sleep(SKIP_DURATION);
+
+
+    /* Begin gather data */
+    test_data.running = 1;
+
+    /* 
+     * Let the test runs for a while.
+     */
+    pj_thread_sleep(DURATION);
+
+
+    /*
+     * Close stream.
+     */
+    test_data.running = 0;
+    pjmedia_snd_stream_close(strm);
+
+
+    /* 
+     * Print results.
+     */
+    PJ_LOG(3,(THIS_FILE, " Dumping results:"));
+
+    PJ_LOG(3,(THIS_FILE, "  Parameters: clock rate=%dHz, %d samples/frame",
+	      clock_rate, samples_per_frame));
+
+    if (dir & PJMEDIA_DIR_PLAYBACK)
+	print_stream_data("Playback", &test_data, &test_data.playback_data, 
+			  verbose);
+    if (dir & PJMEDIA_DIR_CAPTURE)
+	print_stream_data("Capture", &test_data, &test_data.capture_data, 
+			   verbose);
+
+    /* Check drifting */
+    if (dir == PJMEDIA_DIR_CAPTURE_PLAYBACK) {
+	int end_diff, start_diff, drift;
+
+	end_diff = test_data.capture_data.last_timestamp -
+		   test_data.playback_data.last_timestamp;
+	start_diff = test_data.capture_data.first_timestamp-
+		      test_data.playback_data.first_timestamp;
+	drift = end_diff - start_diff;
+
+	PJ_LOG(3,(THIS_FILE, "  Checking for clock drifts:"));
+
+	/* Allow one frame tolerance for clock drift detection */
+	if (drift < (int)samples_per_frame) {
+	    PJ_LOG(3,(THIS_FILE, "   No clock drifts is detected"));
+	} else {
+	    const char *which = (drift<0 ? "slower" : "faster");
+	    unsigned msec_dur;
+
+	    if (drift < 0) drift = -drift;
+
+
+	    msec_dur = (test_data.capture_data.last_timestamp - 
+		       test_data.capture_data.first_timestamp) * 1000 /
+		       test_data.clock_rate;
+
+	    PJ_LOG(2,(THIS_FILE, 
+		      "   Sound capture is %d samples %s than playback "
+		      "at the end of the test (average is %d samples"
+		      " per second)",
+		      drift, which, 
+		      drift * 1000 / msec_dur));
+
+	}
+    }
+
+    if (test_data.has_error == 0) {
+	PJ_LOG(3,(THIS_FILE, " Test completed, sound device looks okay."));
+	return 0;
+    } else {
+	PJ_LOG(2,(THIS_FILE, " Test completed with some warnings"));
+	return 1;
+    }
+}
+
+
+int main(int argc, char *argv[])
+{
+    pj_caching_pool cp;
+    pjmedia_endpt *med_endpt;
+    int id = -1, verbose = 0;
+    int clock_rate = 8000;
+    int frame = -1;
+    int channel = 1;
+    struct pj_getopt_option long_options[] = {
+	{ "id",	     1, 0, 'i' },
+	{ "rate",    1, 0, 'r' },
+	{ "frame",   1, 0, 'f' },
+	{ "channel", 1, 0, 'n' },
+	{ "verbose", 0, 0, 'v' },
+	{ "help",    0, 0, 'h' },
+	{ NULL, 0, 0, 0 }
+    };
+    int c, option_index;
+    
+
+    pj_status_t status;
+
+    /* Init pjlib */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, 1);
+    
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+
+    /* 
+     * Initialize media endpoint.
+     * This will implicitly initialize PJMEDIA too.
+     */
+    status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Print devices */
+    enum_devices();
+
+    /* Parse options */
+    pj_optind = 0;
+    while((c=pj_getopt_long(argc,argv, "i:r:f:n:vh", 
+			    long_options, &option_index))!=-1) 
+    {
+	switch (c) {
+	case 'i':
+	    id = atoi(pj_optarg);
+	    break;
+	case 'r':
+	    clock_rate = atoi(pj_optarg);
+	    break;
+	case 'f':
+	    frame = atoi(pj_optarg);
+	    break;
+	case 'n':
+	    channel = atoi(pj_optarg);
+	    break;
+	case 'v':
+	    verbose = 1;
+	    break;
+	case 'h':
+	    puts(desc);
+	    return 0;
+	    break;
+	default:
+	    printf("Error: invalid options %s\n", argv[pj_optind-1]);
+	    puts(desc);
+	    return 1;
+	}
+    }
+
+    if (pj_optind != argc) {
+	printf("Error: invalid options\n");
+	puts(desc);
+	return 1;
+    }
+
+    if (!verbose)
+	pj_log_set_level(3);
+
+    if (frame == -1)
+	frame = 10 * clock_rate / 1000;
+
+
+    status = perform_test(id, PJMEDIA_DIR_CAPTURE_PLAYBACK, 
+			  clock_rate, frame, channel, verbose);
+    if (status != 0)
+	return 1;
+
+    
+    return 0;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/stateful_proxy.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/stateful_proxy.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/stateful_proxy.c	(revision 1163)
@@ -0,0 +1,580 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+#define THIS_FILE   "stateful_proxy.c"
+
+/* Common proxy functions */
+#define STATEFUL    1
+#include "proxy.h"
+
+
+/*
+ * mod_stateful_proxy is the module to receive SIP request and
+ * response message that is outside any transaction context.
+ */
+static pj_bool_t proxy_on_rx_request(pjsip_rx_data *rdata );
+static pj_bool_t proxy_on_rx_response(pjsip_rx_data *rdata );
+
+static pjsip_module mod_stateful_proxy =
+{
+    NULL, NULL,				/* prev, next.		*/
+    { "mod-stateful-proxy", 18 },	/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_UA_PROXY_LAYER,	/* Priority		*/
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    &proxy_on_rx_request,		/* on_rx_request()	*/
+    &proxy_on_rx_response,		/* on_rx_response()	*/
+    NULL,				/* on_tx_request.	*/
+    NULL,				/* on_tx_response()	*/
+    NULL,				/* on_tsx_state()	*/
+};
+
+
+/*
+ * mod_tu (tu=Transaction User) is the module to receive notification
+ * from transaction when the transaction state has changed.
+ */
+static void tu_on_tsx_state(pjsip_transaction *tsx, pjsip_event *event);
+
+static pjsip_module mod_tu =
+{
+    NULL, NULL,				/* prev, next.		*/
+    { "mod-transaction-user", 20 },	/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION,	/* Priority		*/
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    NULL,				/* on_rx_request()	*/
+    NULL,				/* on_rx_response()	*/
+    NULL,				/* on_tx_request.	*/
+    NULL,				/* on_tx_response()	*/
+    &tu_on_tsx_state,			/* on_tsx_state()	*/
+};
+
+
+/* This is the data that is attached to the UAC transaction */
+struct uac_data
+{
+    pjsip_transaction	*uas_tsx;
+    pj_timer_entry	 timer;
+};
+
+
+/* This is the data that is attached to the UAS transaction */
+struct uas_data
+{
+    pjsip_transaction	*uac_tsx;
+};
+
+
+
+static pj_status_t init_stateful_proxy(void)
+{
+    pj_status_t status;
+
+    status = pjsip_endpt_register_module( global.endpt, &mod_stateful_proxy);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    status = pjsip_endpt_register_module( global.endpt, &mod_tu);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    return PJ_SUCCESS;
+}
+
+
+/* Callback to be called to handle new incoming requests. */
+static pj_bool_t proxy_on_rx_request( pjsip_rx_data *rdata )
+{
+    pjsip_transaction *uas_tsx, *uac_tsx;
+    struct uac_data *uac_data;
+    struct uas_data *uas_data;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    if (rdata->msg_info.msg->line.req.method.id != PJSIP_CANCEL_METHOD) {
+
+	/* Verify incoming request */
+	status = proxy_verify_request(rdata);
+	if (status != PJ_SUCCESS) {
+	    app_perror("RX invalid request", status);
+	    return PJ_TRUE;
+	}
+
+	/*
+	 * Request looks sane, next clone the request to create transmit data.
+	 */
+	status = pjsip_endpt_create_request_fwd(global.endpt, rdata, NULL,
+						NULL, 0, &tdata);
+	if (status != PJ_SUCCESS) {
+	    pjsip_endpt_respond_stateless(global.endpt, rdata,
+					  PJSIP_SC_INTERNAL_SERVER_ERROR, 
+					  NULL, NULL, NULL);
+	    return PJ_TRUE;
+	}
+
+
+	/* Process routing */
+	status = proxy_process_routing(tdata);
+	if (status != PJ_SUCCESS) {
+	    app_perror("Error processing route", status);
+	    return PJ_TRUE;
+	}
+
+	/* Calculate target */
+	status = proxy_calculate_target(rdata, tdata);
+	if (status != PJ_SUCCESS) {
+	    app_perror("Error calculating target", status);
+	    return PJ_TRUE;
+	}
+
+	/* Everything is set to forward the request. */
+
+	/* If this is an ACK request, forward statelessly.
+	 * This happens if the proxy records route and this ACK
+	 * is sent for 2xx response. An ACK that is sent for non-2xx
+	 * final response will be absorbed by transaction layer, and
+	 * it will not be received by on_rx_request() callback.
+	 */
+	if (tdata->msg->line.req.method.id == PJSIP_ACK_METHOD) {
+	    status = pjsip_endpt_send_request_stateless(global.endpt, tdata, 
+							NULL, NULL);
+	    if (status != PJ_SUCCESS) {
+		app_perror("Error forwarding request", status);
+		return PJ_TRUE;
+	    }
+
+	    return PJ_TRUE;
+	}
+
+	/* Create UAC transaction for forwarding the request. 
+	 * Set our module as the transaction user to receive further
+	 * events from this transaction.
+	 */
+	status = pjsip_tsx_create_uac(&mod_tu, tdata, &uac_tsx);
+	if (status != PJ_SUCCESS) {
+	    pjsip_tx_data_dec_ref(tdata);
+	    pjsip_endpt_respond_stateless(global.endpt, rdata, 
+					  PJSIP_SC_INTERNAL_SERVER_ERROR, 
+					  NULL, NULL, NULL);
+	    return PJ_TRUE;
+	}
+
+	/* Create UAS transaction to handle incoming request */
+	status = pjsip_tsx_create_uas(&mod_tu, rdata, &uas_tsx);
+	if (status != PJ_SUCCESS) {
+	    pjsip_tx_data_dec_ref(tdata);
+	    pjsip_endpt_respond_stateless(global.endpt, rdata, 
+					  PJSIP_SC_INTERNAL_SERVER_ERROR, 
+					  NULL, NULL, NULL);
+	    pjsip_tsx_terminate(uac_tsx, PJSIP_SC_INTERNAL_SERVER_ERROR);
+	    return PJ_TRUE;
+	}
+
+	/* Feed the request to the UAS transaction to drive it's state 
+	 * out of NULL state. 
+	 */
+	pjsip_tsx_recv_msg(uas_tsx, rdata);
+
+	/* Attach a data to the UAC transaction, to be used to find the
+	 * UAS transaction when we receive response in the UAC side.
+	 */
+	uac_data = (struct uac_data*)
+		   pj_pool_alloc(uac_tsx->pool, sizeof(struct uac_data));
+	uac_data->uas_tsx = uas_tsx;
+	uac_tsx->mod_data[mod_tu.id] = (void*)uac_data;
+
+	/* Attach data to the UAS transaction, to find the UAC transaction
+	 * when cancelling INVITE request.
+	 */
+	uas_data = (struct uas_data*)
+		    pj_pool_alloc(uas_tsx->pool, sizeof(struct uas_data));
+	uas_data->uac_tsx = uac_tsx;
+	uas_tsx->mod_data[mod_tu.id] = (void*)uas_data;
+
+	/* Everything is setup, forward the request */
+	status = pjsip_tsx_send_msg(uac_tsx, tdata);
+	if (status != PJ_SUCCESS) {
+	    pjsip_tx_data *err_res;
+
+	    /* Fail to send request, for some reason */
+
+	    /* Destroy transmit data */
+	    pjsip_tx_data_dec_ref(tdata);
+
+	    /* I think UAC transaction should have been destroyed when
+	     * it fails to send request, so no need to destroy it.
+	    pjsip_tsx_terminate(uac_tsx, PJSIP_SC_INTERNAL_SERVER_ERROR);
+	     */
+
+	    /* Send 500/Internal Server Error to UAS transaction */
+	    pjsip_endpt_create_response(global.endpt, rdata,
+					500, NULL, &err_res);
+	    pjsip_tsx_send_msg(uas_tsx, err_res);
+
+	    return PJ_TRUE;
+	}
+
+	/* Send 100/Trying if this is an INVITE */
+	if (rdata->msg_info.msg->line.req.method.id == PJSIP_INVITE_METHOD) {
+	    pjsip_tx_data *res100;
+
+	    pjsip_endpt_create_response(global.endpt, rdata, 100, NULL, 
+					&res100);
+	    pjsip_tsx_send_msg(uas_tsx, res100);
+	}
+
+    } else {
+	/* This is CANCEL request */
+	pjsip_transaction *invite_uas;
+	struct uas_data *uas_data;
+	pj_str_t key;
+	
+	/* Find the UAS INVITE transaction */
+	pjsip_tsx_create_key(rdata->tp_info.pool, &key, PJSIP_UAS_ROLE,
+			     &pjsip_invite_method, rdata);
+	invite_uas = pjsip_tsx_layer_find_tsx(&key, PJ_TRUE);
+	if (!invite_uas) {
+	    /* Invite transaction not found, respond CANCEL with 481 */
+	    pjsip_endpt_respond_stateless(global.endpt, rdata, 481, NULL,
+					  NULL, NULL);
+	    return PJ_TRUE;
+	}
+
+	/* Respond 200 OK to CANCEL */
+	pjsip_endpt_respond(global.endpt, NULL, rdata, 200, NULL, NULL,
+			    NULL, NULL);
+
+	/* Send CANCEL to cancel the UAC transaction.
+	 * The UAS INVITE transaction will get final response when
+	 * we receive final response from the UAC INVITE transaction.
+	 */
+	uas_data = (struct uas_data*) invite_uas->mod_data[mod_tu.id];
+	if (uas_data->uac_tsx) {
+	    pjsip_tx_data *cancel;
+
+	    pj_mutex_lock(uas_data->uac_tsx->mutex);
+
+	    pjsip_endpt_create_cancel(global.endpt, uas_data->uac_tsx->last_tx,
+				      &cancel);
+	    pjsip_endpt_send_request(global.endpt, cancel, -1, NULL, NULL);
+
+	    pj_mutex_unlock(uas_data->uac_tsx->mutex);
+	}
+
+	/* Unlock UAS tsx because it is locked in find_tsx() */
+	pj_mutex_unlock(invite_uas->mutex);
+    }
+
+    return PJ_TRUE;
+}
+
+
+/* Callback to be called to handle incoming response outside
+ * any transactions. This happens for example when 2xx/OK
+ * for INVITE is received and transaction will be destroyed
+ * immediately, so we need to forward the subsequent 2xx/OK
+ * retransmission statelessly.
+ */
+static pj_bool_t proxy_on_rx_response( pjsip_rx_data *rdata )
+{
+    pjsip_tx_data *tdata;
+    pjsip_response_addr res_addr;
+    pjsip_via_hdr *hvia;
+    pj_status_t status;
+
+    /* Create response to be forwarded upstream (Via will be stripped here) */
+    status = pjsip_endpt_create_response_fwd(global.endpt, rdata, 0, &tdata);
+    if (status != PJ_SUCCESS) {
+	app_perror("Error creating response", status);
+	return PJ_TRUE;
+    }
+
+    /* Get topmost Via header */
+    hvia = (pjsip_via_hdr*) pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL);
+    if (hvia == NULL) {
+	/* Invalid response! Just drop it */
+	pjsip_tx_data_dec_ref(tdata);
+	return PJ_TRUE;
+    }
+
+    /* Calculate the address to forward the response */
+    pj_bzero(&res_addr, sizeof(res_addr));
+    res_addr.dst_host.type = PJSIP_TRANSPORT_UDP;
+    res_addr.dst_host.flag = 
+	pjsip_transport_get_flag_from_type(PJSIP_TRANSPORT_UDP);
+
+    /* Destination address is Via's received param */
+    res_addr.dst_host.addr.host = hvia->recvd_param;
+    if (res_addr.dst_host.addr.host.slen == 0) {
+	/* Someone has messed up our Via header! */
+	res_addr.dst_host.addr.host = hvia->sent_by.host;
+    }
+
+    /* Destination port is the rport */
+    if (hvia->rport_param != 0 && hvia->rport_param != -1)
+	res_addr.dst_host.addr.port = hvia->rport_param;
+
+    if (res_addr.dst_host.addr.port == 0) {
+	/* Ugh, original sender didn't put rport!
+	 * At best, can only send the response to the port in Via.
+	 */
+	res_addr.dst_host.addr.port = hvia->sent_by.port;
+    }
+
+    /* Forward response */
+    status = pjsip_endpt_send_response(global.endpt, &res_addr, tdata,
+				       NULL, NULL);
+    if (status != PJ_SUCCESS) {
+	app_perror("Error forwarding response", status);
+	return PJ_TRUE;
+    }
+
+    return PJ_TRUE;
+}
+
+
+/* Callback to be called to handle transaction state changed. */
+static void tu_on_tsx_state(pjsip_transaction *tsx, pjsip_event *event)
+{
+    struct uac_data *uac_data;
+    pj_status_t status;
+
+    if (tsx->role == PJSIP_ROLE_UAS) {
+	if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+	    struct uas_data *uas_data;
+
+	    uas_data = (struct uas_data*) tsx->mod_data[mod_tu.id];
+	    if (uas_data->uac_tsx) {
+		uac_data = (struct uac_data*)
+			   uas_data->uac_tsx->mod_data[mod_tu.id];
+		uac_data->uas_tsx = NULL;
+	    }
+		       
+	}
+	return;
+    }
+
+    /* Get the data that we attached to the UAC transaction previously */
+    uac_data = (struct uac_data*) tsx->mod_data[mod_tu.id];
+
+
+    /* Handle incoming response */
+    if (event->body.tsx_state.type == PJSIP_EVENT_RX_MSG) {
+
+	pjsip_rx_data *rdata;
+	pjsip_response_addr res_addr;
+        pjsip_via_hdr *hvia;
+	pjsip_tx_data *tdata;
+
+	rdata = event->body.tsx_state.src.rdata;
+
+	/* Do not forward 100 response for INVITE (we already responded
+	 * INVITE with 100)
+	 */
+	if (tsx->method.id == PJSIP_INVITE_METHOD && 
+	    rdata->msg_info.msg->line.status.code == 100)
+	{
+	    return;
+	}
+
+	/* Create response to be forwarded upstream 
+	 * (Via will be stripped here) 
+	 */
+	status = pjsip_endpt_create_response_fwd(global.endpt, rdata, 0, 
+						 &tdata);
+	if (status != PJ_SUCCESS) {
+	    app_perror("Error creating response", status);
+	    return;
+	}
+
+	/* Get topmost Via header of the new response */
+	hvia = (pjsip_via_hdr*) pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, 
+						   NULL);
+	if (hvia == NULL) {
+	    /* Invalid response! Just drop it */
+	    pjsip_tx_data_dec_ref(tdata);
+	    return;
+	}
+
+	/* Calculate the address to forward the response */
+	pj_bzero(&res_addr, sizeof(res_addr));
+	res_addr.dst_host.type = PJSIP_TRANSPORT_UDP;
+	res_addr.dst_host.flag = 
+	    pjsip_transport_get_flag_from_type(PJSIP_TRANSPORT_UDP);
+
+	/* Destination address is Via's received param */
+	res_addr.dst_host.addr.host = hvia->recvd_param;
+	if (res_addr.dst_host.addr.host.slen == 0) {
+	    /* Someone has messed up our Via header! */
+	    res_addr.dst_host.addr.host = hvia->sent_by.host;
+	}
+
+	/* Destination port is the rport */
+	if (hvia->rport_param != 0 && hvia->rport_param != -1)
+	    res_addr.dst_host.addr.port = hvia->rport_param;
+
+	if (res_addr.dst_host.addr.port == 0) {
+	    /* Ugh, original sender didn't put rport!
+	     * At best, can only send the response to the port in Via.
+	     */
+	    res_addr.dst_host.addr.port = hvia->sent_by.port;
+	}
+
+	/* Forward response with the UAS transaction */
+	pjsip_tsx_send_msg(uac_data->uas_tsx, tdata);
+
+    }
+
+    /* If UAC transaction is terminated, terminate the UAS as well.
+     * This could happen because of:
+     *	- timeout on the UAC side
+     *  - receipt of 2xx response to INVITE
+     */
+    if (tsx->state == PJSIP_TSX_STATE_TERMINATED && uac_data->uas_tsx) {
+
+	pjsip_transaction *uas_tsx;
+	struct uas_data *uas_data;
+
+	uas_tsx = uac_data->uas_tsx;
+	uas_data = (struct uas_data*) uas_tsx->mod_data[mod_tu.id];
+	uas_data->uac_tsx = NULL;
+
+	if (event->body.tsx_state.type == PJSIP_EVENT_TIMER) {
+
+	    /* Send 408/Timeout if this is an INVITE transaction, since
+	     * we must have sent provisional response before. For non
+	     * INVITE transaction, just destroy it.
+	     */
+	    if (tsx->method.id == PJSIP_INVITE_METHOD) {
+
+		pjsip_tx_data *tdata = uas_tsx->last_tx;
+
+		tdata->msg->line.status.code = PJSIP_SC_REQUEST_TIMEOUT;
+		tdata->msg->line.status.reason = pj_str("Request timed out");
+		tdata->msg->body = NULL;
+
+		pjsip_tx_data_add_ref(tdata);
+		pjsip_tx_data_invalidate_msg(tdata);
+
+		pjsip_tsx_send_msg(uas_tsx, tdata);
+
+	    } else {
+		/* For non-INVITE, just destroy the UAS transaction */
+		pjsip_tsx_terminate(uas_tsx, PJSIP_SC_REQUEST_TIMEOUT);
+	    }
+
+	} else if (event->body.tsx_state.type == PJSIP_EVENT_RX_MSG) {
+
+	    if (uas_tsx->state < PJSIP_TSX_STATE_TERMINATED) {
+		pjsip_msg *msg;
+		int code;
+
+		msg = event->body.tsx_state.src.rdata->msg_info.msg;
+		code = msg->line.status.code;
+
+		uac_data->uas_tsx = NULL;
+		pjsip_tsx_terminate(uas_tsx, code);
+	    }
+	}
+    }
+}
+
+
+/*
+ * main()
+ */
+int main(int argc, char *argv[])
+{
+    pj_status_t status;
+
+    global.port = 5060;
+    global.record_route = 0;
+
+    pj_log_set_level(4);
+
+    status = init_options(argc, argv);
+    if (status != PJ_SUCCESS)
+	return 1;
+
+    status = init_stack();
+    if (status != PJ_SUCCESS) {
+	app_perror("Error initializing stack", status);
+	return 1;
+    }
+
+    status = init_proxy();
+    if (status != PJ_SUCCESS) {
+	app_perror("Error initializing proxy", status);
+	return 1;
+    }
+
+    status = init_stateful_proxy();
+    if (status != PJ_SUCCESS) {
+	app_perror("Error initializing stateful proxy", status);
+	return 1;
+    }
+
+#if PJ_HAS_THREADS
+    status = pj_thread_create(global.pool, "sproxy", &worker_thread, 
+			      NULL, 0, 0, &global.thread);
+    if (status != PJ_SUCCESS) {
+	app_perror("Error creating thread", status);
+	return 1;
+    }
+
+    while (!global.quit_flag) {
+	char line[10];
+
+	puts("\n"
+	     "Menu:\n"
+	     "  q    quit\n"
+	     "  d    dump status\n"
+	     "  dd   dump detailed status\n"
+	     "");
+
+	fgets(line, sizeof(line), stdin);
+
+	if (line[0] == 'q') {
+	    global.quit_flag = PJ_TRUE;
+	} else if (line[0] == 'd') {
+	    pj_bool_t detail = (line[1] == 'd');
+	    pjsip_endpt_dump(global.endpt, detail);
+	    pjsip_tsx_layer_dump(detail);
+	}
+    }
+
+    pj_thread_join(global.thread);
+
+#else
+    puts("\nPress Ctrl-C to quit\n");
+    for (;;) {
+	pj_time_val delay = {0, 0};
+	pjsip_endpt_handle_events(global.endpt, &delay);
+    }
+#endif
+
+    destroy_stack();
+
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/stateless_proxy.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/stateless_proxy.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/stateless_proxy.c	(revision 1163)
@@ -0,0 +1,250 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+#define THIS_FILE   "stateless_proxy.c"
+
+/* Common proxy functions */
+#define STATEFUL    0
+#include "proxy.h"
+
+
+/* Callback to be called to handle incoming requests. */
+static pj_bool_t on_rx_request( pjsip_rx_data *rdata );
+
+/* Callback to be called to handle incoming response. */
+static pj_bool_t on_rx_response( pjsip_rx_data *rdata );
+
+
+static pj_status_t init_stateless_proxy(void)
+{
+    static pjsip_module mod_stateless_proxy =
+    {
+	NULL, NULL,			    /* prev, next.	*/
+	{ "mod-stateless-proxy", 19 },	    /* Name.		*/
+	-1,				    /* Id		*/
+	PJSIP_MOD_PRIORITY_UA_PROXY_LAYER,  /* Priority		*/
+	NULL,				    /* load()		*/
+	NULL,				    /* start()		*/
+	NULL,				    /* stop()		*/
+	NULL,				    /* unload()		*/
+	&on_rx_request,			    /* on_rx_request()	*/
+	&on_rx_response,		    /* on_rx_response()	*/
+	NULL,				    /* on_tx_request.	*/
+	NULL,				    /* on_tx_response()	*/
+	NULL,				    /* on_tsx_state()	*/
+    };
+
+    pj_status_t status;
+
+    /* Register our module to receive incoming requests. */
+    status = pjsip_endpt_register_module( global.endpt, &mod_stateless_proxy);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    return PJ_SUCCESS;
+}
+
+
+/* Callback to be called to handle incoming requests. */
+static pj_bool_t on_rx_request( pjsip_rx_data *rdata )
+{
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+
+    /* Verify incoming request */
+    status = proxy_verify_request(rdata);
+    if (status != PJ_SUCCESS) {
+	app_perror("RX invalid request", status);
+	return PJ_TRUE;
+    }
+
+    /*
+     * Request looks sane, next clone the request to create transmit data.
+     */
+    status = pjsip_endpt_create_request_fwd(global.endpt, rdata, NULL,
+					    NULL, 0, &tdata);
+    if (status != PJ_SUCCESS) {
+	pjsip_endpt_respond_stateless(global.endpt, rdata,
+				      PJSIP_SC_INTERNAL_SERVER_ERROR, NULL, 
+				      NULL, NULL);
+	return PJ_TRUE;
+    }
+
+
+    /* Process routing */
+    status = proxy_process_routing(tdata);
+    if (status != PJ_SUCCESS) {
+	app_perror("Error processing route", status);
+	return PJ_TRUE;
+    }
+
+    /* Calculate target */
+    status = proxy_calculate_target(rdata, tdata);
+    if (status != PJ_SUCCESS) {
+	app_perror("Error calculating target", status);
+	return PJ_TRUE;
+    }
+
+    /* Target is set, forward the request */
+    status = pjsip_endpt_send_request_stateless(global.endpt, tdata, 
+						NULL, NULL);
+    if (status != PJ_SUCCESS) {
+	app_perror("Error forwarding request", status);
+	return PJ_TRUE;
+    }
+
+    return PJ_TRUE;
+}
+
+
+/* Callback to be called to handle incoming response. */
+static pj_bool_t on_rx_response( pjsip_rx_data *rdata )
+{
+    pjsip_tx_data *tdata;
+    pjsip_response_addr res_addr;
+    pjsip_via_hdr *hvia;
+    pj_status_t status;
+
+    /* Create response to be forwarded upstream (Via will be stripped here) */
+    status = pjsip_endpt_create_response_fwd(global.endpt, rdata, 0, &tdata);
+    if (status != PJ_SUCCESS) {
+	app_perror("Error creating response", status);
+	return PJ_TRUE;
+    }
+
+    /* Get topmost Via header */
+    hvia = (pjsip_via_hdr*) pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL);
+    if (hvia == NULL) {
+	/* Invalid response! Just drop it */
+	pjsip_tx_data_dec_ref(tdata);
+	return PJ_TRUE;
+    }
+
+    /* Calculate the address to forward the response */
+    pj_bzero(&res_addr, sizeof(res_addr));
+    res_addr.dst_host.type = PJSIP_TRANSPORT_UDP;
+    res_addr.dst_host.flag = pjsip_transport_get_flag_from_type(PJSIP_TRANSPORT_UDP);
+
+    /* Destination address is Via's received param */
+    res_addr.dst_host.addr.host = hvia->recvd_param;
+    if (res_addr.dst_host.addr.host.slen == 0) {
+	/* Someone has messed up our Via header! */
+	res_addr.dst_host.addr.host = hvia->sent_by.host;
+    }
+
+    /* Destination port is the rpot */
+    if (hvia->rport_param != 0 && hvia->rport_param != -1)
+	res_addr.dst_host.addr.port = hvia->rport_param;
+
+    if (res_addr.dst_host.addr.port == 0) {
+	/* Ugh, original sender didn't put rport!
+	 * At best, can only send the response to the port in Via.
+	 */
+	res_addr.dst_host.addr.port = hvia->sent_by.port;
+    }
+
+    /* Forward response */
+    status = pjsip_endpt_send_response(global.endpt, &res_addr, tdata, 
+				       NULL, NULL);
+    if (status != PJ_SUCCESS) {
+	app_perror("Error forwarding response", status);
+	return PJ_TRUE;
+    }
+
+    return PJ_TRUE;
+}
+
+
+/*
+ * main()
+ */
+int main(int argc, char *argv[])
+{
+    pj_status_t status;
+
+    global.port = 5060;
+    pj_log_set_level(4);
+
+    status = init_options(argc, argv);
+    if (status != PJ_SUCCESS)
+	return 1;
+
+    status = init_stack();
+    if (status != PJ_SUCCESS) {
+	app_perror("Error initializing stack", status);
+	return 1;
+    }
+
+    status = init_proxy();
+    if (status != PJ_SUCCESS) {
+	app_perror("Error initializing proxy", status);
+	return 1;
+    }
+
+    status = init_stateless_proxy();
+    if (status != PJ_SUCCESS) {
+	app_perror("Error initializing stateless proxy", status);
+	return 1;
+    }
+
+#if PJ_HAS_THREADS
+    status = pj_thread_create(global.pool, "sproxy", &worker_thread, 
+			      NULL, 0, 0, &global.thread);
+    if (status != PJ_SUCCESS) {
+	app_perror("Error creating thread", status);
+	return 1;
+    }
+
+    while (!global.quit_flag) {
+	char line[10];
+
+	puts("\n"
+	     "Menu:\n"
+	     "  q    quit\n"
+	     "  d    dump status\n"
+	     "  dd   dump detailed status\n"
+	     "");
+
+	fgets(line, sizeof(line), stdin);
+
+	if (line[0] == 'q') {
+	    global.quit_flag = PJ_TRUE;
+	} else if (line[0] == 'd') {
+	    pj_bool_t detail = (line[1] == 'd');
+	    pjsip_endpt_dump(global.endpt, detail);
+#if STATEFUL
+	    pjsip_tsx_layer_dump(detail);
+#endif
+	}
+    }
+
+    pj_thread_join(global.thread);
+
+#else
+    puts("\nPress Ctrl-C to quit\n");
+    for (;;) {
+	pj_time_val delay = {0, 0};
+	pjsip_endpt_handle_events(global.endpt, &delay);
+    }
+#endif
+
+    destroy_stack();
+
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/streamutil.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/streamutil.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/streamutil.c	(revision 1163)
@@ -0,0 +1,713 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+
+/**
+ * \page page_pjmedia_samples_streamutil_c Samples: Remote Streaming
+ *
+ * This example mainly demonstrates how to stream media file to remote
+ * peer using RTP.
+ *
+ * This file is pjsip-apps/src/samples/streamutil.c
+ *
+ * \includelineno streamutil.c
+ */
+
+
+static const char *desc = 
+ " streamutil								\n"
+ "									\n"
+ " PURPOSE:								\n"
+ "  Demonstrate how to use pjmedia stream component to transmit/receive \n"
+ "  RTP packets to/from sound device.		    			\n"
+ "\n"
+ "\n"
+ " USAGE:								\n"
+ "  streamutil [options]                                                \n"
+ "\n"
+ "\n"
+ " Options:\n"
+ "  --codec=CODEC         Set the codec name.                           \n"
+ "  --local-port=PORT     Set local RTP port (default=4000)		\n"
+ "  --remote=IP:PORT      Set the remote peer. If this option is set,	\n"
+ "                        the program will transmit RTP audio to the	\n"
+ "                        specified address. (default: recv only)	\n"
+ "  --play-file=WAV       Send audio from the WAV file instead of from	\n"
+ "                        the sound device.				\n"
+ "  --record-file=WAV     Record incoming audio to WAV file instead of	\n"
+ "                        playing it to sound device.			\n"
+ "  --send-recv           Set stream direction to bidirectional.        \n"
+ "  --send-only           Set stream direction to send only		\n"
+ "  --recv-only           Set stream direction to recv only (default)   \n"
+ "\n"
+;
+
+
+
+#include <pjlib.h>
+#include <pjlib-util.h>
+#include <pjmedia.h>
+#include <pjmedia-codec.h>
+
+#include <stdlib.h>	/* atoi() */
+#include <stdio.h>
+
+#include "util.h"
+
+
+#define THIS_FILE	"stream.c"
+
+
+
+/* Prototype */
+static void print_stream_stat(pjmedia_stream *stream);
+
+
+/* 
+ * Register all codecs. 
+ */
+static pj_status_t init_codecs(pjmedia_endpt *med_endpt)
+{
+    pj_status_t status;
+
+    /* To suppress warning about unused var when all codecs are disabled */
+    PJ_UNUSED_ARG(status);
+
+#if defined(PJMEDIA_HAS_G711_CODEC) && PJMEDIA_HAS_G711_CODEC!=0
+    status = pjmedia_codec_g711_init(med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+#endif
+
+#if defined(PJMEDIA_HAS_GSM_CODEC) && PJMEDIA_HAS_GSM_CODEC!=0
+    status = pjmedia_codec_gsm_init(med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+#endif
+
+#if defined(PJMEDIA_HAS_SPEEX_CODEC) && PJMEDIA_HAS_SPEEX_CODEC!=0
+    status = pjmedia_codec_speex_init(med_endpt, 0, -1, -1);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+#endif
+
+#if defined(PJMEDIA_HAS_L16_CODEC) && PJMEDIA_HAS_L16_CODEC!=0
+    status = pjmedia_codec_l16_init(med_endpt, 0);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+#endif
+
+    return PJ_SUCCESS;
+}
+
+
+/* 
+ * Create stream based on the codec, dir, remote address, etc. 
+ */
+static pj_status_t create_stream( pj_pool_t *pool,
+				  pjmedia_endpt *med_endpt,
+				  const pjmedia_codec_info *codec_info,
+				  pjmedia_dir dir,
+				  pj_uint16_t local_port,
+				  const pj_sockaddr_in *rem_addr,
+				  pjmedia_stream **p_stream )
+{
+    pjmedia_stream_info info;
+    pjmedia_transport *transport;
+    pj_status_t status;
+
+
+    /* Reset stream info. */
+    pj_bzero(&info, sizeof(info));
+
+
+    /* Initialize stream info formats */
+    info.type = PJMEDIA_TYPE_AUDIO;
+    info.dir = dir;
+    pj_memcpy(&info.fmt, codec_info, sizeof(pjmedia_codec_info));
+    info.tx_pt = codec_info->pt;
+    info.ssrc = pj_rand();
+    
+
+    /* Copy remote address */
+    pj_memcpy(&info.rem_addr, rem_addr, sizeof(pj_sockaddr_in));
+
+
+    /* Create media transport */
+    status = pjmedia_transport_udp_create(med_endpt, NULL, local_port,
+					  0, &transport);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    /* Now that the stream info is initialized, we can create the 
+     * stream.
+     */
+
+    status = pjmedia_stream_create( med_endpt, pool, &info, 
+				    transport, NULL, p_stream);
+
+    if (status != PJ_SUCCESS) {
+	app_perror(THIS_FILE, "Error creating stream", status);
+	pjmedia_transport_udp_close(transport);
+	return status;
+    }
+
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * usage()
+ */
+static void usage()
+{
+    puts(desc);
+}
+
+/*
+ * main()
+ */
+int main(int argc, char *argv[])
+{
+    pj_caching_pool cp;
+    pjmedia_endpt *med_endpt;
+    pj_pool_t *pool;
+    pjmedia_port *rec_file_port = NULL, *play_file_port = NULL;
+    pjmedia_master_port *master_port = NULL;
+    pjmedia_snd_port *snd_port = NULL;
+    pjmedia_stream *stream = NULL;
+    pjmedia_port *stream_port;
+    char tmp[10];
+    pj_status_t status; 
+
+
+    /* Default values */
+    const pjmedia_codec_info *codec_info;
+    pjmedia_dir dir = PJMEDIA_DIR_DECODING;
+    pj_sockaddr_in remote_addr;
+    pj_uint16_t local_port = 4000;
+    char *codec_id = NULL;
+    char *rec_file = NULL;
+    char *play_file = NULL;
+
+    enum {
+	OPT_CODEC	= 'c',
+	OPT_LOCAL_PORT	= 'p',
+	OPT_REMOTE	= 'r',
+	OPT_PLAY_FILE	= 'w',
+	OPT_RECORD_FILE	= 'R',
+	OPT_SEND_RECV	= 'b',
+	OPT_SEND_ONLY	= 's',
+	OPT_RECV_ONLY	= 'i',
+	OPT_HELP	= 'h',
+    };
+
+    struct pj_getopt_option long_options[] = {
+	{ "codec",	    1, 0, OPT_CODEC },
+	{ "local-port",	    1, 0, OPT_LOCAL_PORT },
+	{ "remote",	    1, 0, OPT_REMOTE },
+	{ "play-file",	    1, 0, OPT_PLAY_FILE },
+	{ "record-file",    1, 0, OPT_RECORD_FILE },
+	{ "send-recv",      0, 0, OPT_SEND_RECV },
+	{ "send-only",      0, 0, OPT_SEND_ONLY },
+	{ "recv-only",      0, 0, OPT_RECV_ONLY },
+	{ "help",	    0, 0, OPT_HELP },
+	{ NULL, 0, 0, 0 },
+    };
+
+    int c;
+    int option_index;
+
+
+    pj_bzero(&remote_addr, sizeof(remote_addr));
+
+
+    /* init PJLIB : */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Parse arguments */
+    pj_optind = 0;
+    while((c=pj_getopt_long(argc,argv, "h", long_options, &option_index))!=-1) {
+
+	switch (c) {
+	case OPT_CODEC:
+	    codec_id = pj_optarg;
+	    break;
+
+	case OPT_LOCAL_PORT:
+	    local_port = (pj_uint16_t) atoi(pj_optarg);
+	    if (local_port < 1) {
+		printf("Error: invalid local port %s\n", pj_optarg);
+		return 1;
+	    }
+	    break;
+
+	case OPT_REMOTE:
+	    {
+		pj_str_t ip = pj_str(strtok(pj_optarg, ":"));
+		pj_uint16_t port = (pj_uint16_t) atoi(strtok(NULL, ":"));
+
+		status = pj_sockaddr_in_init(&remote_addr, &ip, port);
+		if (status != PJ_SUCCESS) {
+		    app_perror(THIS_FILE, "Invalid remote address", status);
+		    return 1;
+		}
+	    }
+	    break;
+
+	case OPT_PLAY_FILE:
+	    play_file = pj_optarg;
+	    break;
+
+	case OPT_RECORD_FILE:
+	    rec_file = pj_optarg;
+	    break;
+
+	case OPT_SEND_RECV:
+	    dir = PJMEDIA_DIR_ENCODING_DECODING;
+	    break;
+
+	case OPT_SEND_ONLY:
+	    dir = PJMEDIA_DIR_ENCODING;
+	    break;
+
+	case OPT_RECV_ONLY:
+	    dir = PJMEDIA_DIR_DECODING;
+	    break;
+
+	case OPT_HELP:
+	    usage();
+	    return 1;
+
+	default:
+	    printf("Invalid options %s\n", argv[pj_optind]);
+	    return 1;
+	}
+
+    }
+
+
+    /* Verify arguments. */
+    if (dir & PJMEDIA_DIR_ENCODING) {
+	if (remote_addr.sin_addr.s_addr == 0) {
+	    printf("Error: remote address must be set\n");
+	    return 1;
+	}
+    }
+
+    if (play_file != NULL && dir != PJMEDIA_DIR_ENCODING) {
+	printf("Direction is set to --send-only because of --play-file\n");
+	dir = PJMEDIA_DIR_ENCODING;
+    }
+
+
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+
+    /* 
+     * Initialize media endpoint.
+     * This will implicitly initialize PJMEDIA too.
+     */
+    status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Create memory pool for application purpose */
+    pool = pj_pool_create( &cp.factory,	    /* pool factory	    */
+			   "app",	    /* pool name.	    */
+			   4000,	    /* init size	    */
+			   4000,	    /* increment size	    */
+			   NULL		    /* callback on error    */
+			   );
+
+
+    /* Register all supported codecs */
+    status = init_codecs(med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    /* Find which codec to use. */
+    if (codec_id) {
+	unsigned count = 1;
+	pj_str_t str_codec_id = pj_str(codec_id);
+	pjmedia_codec_mgr *codec_mgr = pjmedia_endpt_get_codec_mgr(med_endpt);
+	status = pjmedia_codec_mgr_find_codecs_by_id( codec_mgr,
+						      &str_codec_id, &count,
+						      &codec_info, NULL);
+	if (status != PJ_SUCCESS) {
+	    printf("Error: unable to find codec %s\n", codec_id);
+	    return 1;
+	}
+    } else {
+	/* Default to pcmu */
+	pjmedia_codec_mgr_get_codec_info( pjmedia_endpt_get_codec_mgr(med_endpt),
+					  0, &codec_info);
+    }
+
+    /* Create stream based on program arguments */
+    status = create_stream(pool, med_endpt, codec_info, dir, local_port, 
+			   &remote_addr, &stream);
+    if (status != PJ_SUCCESS)
+	goto on_exit;
+
+
+    /* Get the port interface of the stream */
+    status = pjmedia_stream_get_port( stream, &stream_port);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+
+    if (play_file) {
+	unsigned wav_ptime;
+
+	wav_ptime = stream_port->info.samples_per_frame * 1000 /
+		    stream_port->info.clock_rate;
+	status = pjmedia_wav_player_port_create(pool, play_file, wav_ptime,
+						0, -1, &play_file_port);
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Unable to use file", status);
+	    goto on_exit;
+	}
+
+	status = pjmedia_master_port_create(pool, play_file_port, stream_port,
+					    0, &master_port);
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Unable to create master port", status);
+	    goto on_exit;
+	}
+
+	status = pjmedia_master_port_start(master_port);
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Error starting master port", status);
+	    goto on_exit;
+	}
+
+	printf("Playing from WAV file %s..\n", play_file);
+
+    } else if (rec_file) {
+
+	status = pjmedia_wav_writer_port_create(pool, rec_file,
+					        stream_port->info.clock_rate,
+						stream_port->info.channel_count,
+						stream_port->info.samples_per_frame,
+						stream_port->info.bits_per_sample,
+						0, 0, &rec_file_port);
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Unable to use file", status);
+	    goto on_exit;
+	}
+
+	status = pjmedia_master_port_create(pool, stream_port, rec_file_port, 
+					    0, &master_port);
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Unable to create master port", status);
+	    goto on_exit;
+	}
+
+	status = pjmedia_master_port_start(master_port);
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Error starting master port", status);
+	    goto on_exit;
+	}
+
+	printf("Recording to WAV file %s..\n", rec_file);
+	
+    } else {
+
+	/* Create sound device port. */
+	if (dir == PJMEDIA_DIR_ENCODING_DECODING)
+	    status = pjmedia_snd_port_create(pool, -1, -1, 
+					stream_port->info.clock_rate,
+					stream_port->info.channel_count,
+					stream_port->info.samples_per_frame,
+					stream_port->info.bits_per_sample,
+					0, &snd_port);
+	else if (dir == PJMEDIA_DIR_ENCODING)
+	    status = pjmedia_snd_port_create_rec(pool, -1, 
+					stream_port->info.clock_rate,
+					stream_port->info.channel_count,
+					stream_port->info.samples_per_frame,
+					stream_port->info.bits_per_sample,
+					0, &snd_port);
+	else
+	    status = pjmedia_snd_port_create_player(pool, -1, 
+					stream_port->info.clock_rate,
+					stream_port->info.channel_count,
+					stream_port->info.samples_per_frame,
+					stream_port->info.bits_per_sample,
+					0, &snd_port);
+
+
+	if (status != PJ_SUCCESS) {
+	    app_perror(THIS_FILE, "Unable to create sound port", status);
+	    goto on_exit;
+	}
+
+	/* Connect sound port to stream */
+	status = pjmedia_snd_port_connect( snd_port, stream_port );
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    }
+
+    /* Start streaming */
+    pjmedia_stream_start(stream);
+
+
+    /* Done */
+
+    if (dir == PJMEDIA_DIR_DECODING)
+	printf("Stream is active, dir is recv-only, local port is %d\n",
+	       local_port);
+    else if (dir == PJMEDIA_DIR_ENCODING)
+	printf("Stream is active, dir is send-only, sending to %s:%d\n",
+	       pj_inet_ntoa(remote_addr.sin_addr),
+	       pj_ntohs(remote_addr.sin_port));
+    else
+	printf("Stream is active, send/recv, local port is %d, "
+	       "sending to %s:%d\n",
+	       local_port,
+	       pj_inet_ntoa(remote_addr.sin_addr),
+	       pj_ntohs(remote_addr.sin_port));
+
+
+    for (;;) {
+
+	puts("");
+	puts("Commands:");
+	puts("  s     Display media statistics");
+	puts("  q     Quit");
+	puts("");
+
+	printf("Command: "); fflush(stdout);
+
+	fgets(tmp, sizeof(tmp), stdin);
+
+	if (tmp[0] == 's')
+	    print_stream_stat(stream);
+	else if (tmp[0] == 'q')
+	    break;
+
+    }
+
+
+
+    /* Start deinitialization: */
+on_exit:
+
+    /* Destroy sound device */
+    if (snd_port) {
+	pjmedia_snd_port_destroy( snd_port );
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+    }
+
+    /* If there is master port, then we just need to destroy master port
+     * (it will recursively destroy upstream and downstream ports, which
+     * in this case are file_port and stream_port).
+     */
+    if (master_port) {
+	pjmedia_master_port_destroy(master_port, PJ_TRUE);
+	play_file_port = NULL;
+	stream = NULL;
+    }
+
+    /* Destroy stream */
+    if (stream) {
+	pjmedia_transport *tp;
+
+	tp = pjmedia_stream_get_transport(stream);
+	pjmedia_stream_destroy(stream);
+	pjmedia_transport_udp_close(tp);
+    }
+
+    /* Destroy file ports */
+    if (play_file_port)
+	pjmedia_port_destroy( play_file_port );
+    if (rec_file_port)
+	pjmedia_port_destroy( rec_file_port );
+
+
+    /* Release application pool */
+    pj_pool_release( pool );
+
+    /* Destroy media endpoint. */
+    pjmedia_endpt_destroy( med_endpt );
+
+    /* Destroy pool factory */
+    pj_caching_pool_destroy( &cp );
+
+    /* Shutdown PJLIB */
+    pj_shutdown();
+
+
+    return (status == PJ_SUCCESS) ? 0 : 1;
+}
+
+
+
+
+static const char *good_number(char *buf, pj_int32_t val)
+{
+    if (val < 1000) {
+	pj_ansi_sprintf(buf, "%d", val);
+    } else if (val < 1000000) {
+	pj_ansi_sprintf(buf, "%d.%dK", 
+			val / 1000,
+			(val % 1000) / 100);
+    } else {
+	pj_ansi_sprintf(buf, "%d.%02dM", 
+			val / 1000000,
+			(val % 1000000) / 10000);
+    }
+
+    return buf;
+}
+
+
+
+/*
+ * Print stream statistics
+ */
+static void print_stream_stat(pjmedia_stream *stream)
+{
+    char duration[80], last_update[80];
+    char bps[16], ipbps[16], packets[16], bytes[16], ipbytes[16];
+    pjmedia_port *port;
+    pjmedia_rtcp_stat stat;
+    pj_time_val now;
+
+
+    pj_gettimeofday(&now);
+    pjmedia_stream_get_stat(stream, &stat);
+    pjmedia_stream_get_port(stream, &port);
+
+    puts("Stream statistics:");
+
+    /* Print duration */
+    PJ_TIME_VAL_SUB(now, stat.start);
+    sprintf(duration, " Duration: %02ld:%02ld:%02ld.%03ld",
+	    now.sec / 3600,
+	    (now.sec % 3600) / 60,
+	    (now.sec % 60),
+	    now.msec);
+
+
+    printf(" Info: audio %.*s@%dHz, %dms/frame, %sB/s (%sB/s +IP hdr)\n",
+   	(int)port->info.encoding_name.slen,
+	port->info.encoding_name.ptr,
+	port->info.clock_rate,
+	port->info.samples_per_frame * 1000 / port->info.clock_rate,
+	good_number(bps, port->info.bytes_per_frame * port->info.clock_rate /
+		    port->info.samples_per_frame),
+	good_number(ipbps, (port->info.bytes_per_frame+32) * 
+			    port->info.clock_rate / port->info.clock_rate));
+
+    if (stat.rx.update_cnt == 0)
+	strcpy(last_update, "never");
+    else {
+	pj_gettimeofday(&now);
+	PJ_TIME_VAL_SUB(now, stat.rx.update);
+	sprintf(last_update, "%02ldh:%02ldm:%02ld.%03lds ago",
+		now.sec / 3600,
+		(now.sec % 3600) / 60,
+		now.sec % 60,
+		now.msec);
+    }
+
+    printf(" 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\n",
+	   last_update,
+	   good_number(packets, stat.rx.pkt),
+	   good_number(bytes, stat.rx.bytes),
+	   good_number(ipbytes, stat.rx.bytes + stat.rx.pkt * 32),
+	   "",
+	   stat.rx.loss,
+	   stat.rx.loss * 100.0 / (stat.rx.pkt + stat.rx.loss),
+	   stat.rx.dup, 
+	   stat.rx.dup * 100.0 / (stat.rx.pkt + stat.rx.loss),
+	   stat.rx.reorder, 
+	   stat.rx.reorder * 100.0 / (stat.rx.pkt + stat.rx.loss),
+	   "",
+	   stat.rx.loss_period.min / 1000.0, 
+	   stat.rx.loss_period.avg / 1000.0, 
+	   stat.rx.loss_period.max / 1000.0,
+	   stat.rx.loss_period.last / 1000.0,
+	   "",
+	   stat.rx.jitter.min / 1000.0,
+	   stat.rx.jitter.avg / 1000.0,
+	   stat.rx.jitter.max / 1000.0,
+	   stat.rx.jitter.last / 1000.0,
+	   ""
+	   );
+
+
+    if (stat.tx.update_cnt == 0)
+	strcpy(last_update, "never");
+    else {
+	pj_gettimeofday(&now);
+	PJ_TIME_VAL_SUB(now, stat.tx.update);
+	sprintf(last_update, "%02ldh:%02ldm:%02ld.%03lds ago",
+		now.sec / 3600,
+		(now.sec % 3600) / 60,
+		now.sec % 60,
+		now.msec);
+    }
+
+    printf(" 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\n",
+	   last_update,
+	   good_number(packets, stat.tx.pkt),
+	   good_number(bytes, stat.tx.bytes),
+	   good_number(ipbytes, stat.tx.bytes + stat.tx.pkt * 32),
+	   "",
+	   stat.tx.loss,
+	   stat.tx.loss * 100.0 / (stat.tx.pkt + stat.tx.loss),
+	   stat.tx.dup, 
+	   stat.tx.dup * 100.0 / (stat.tx.pkt + stat.tx.loss),
+	   stat.tx.reorder, 
+	   stat.tx.reorder * 100.0 / (stat.tx.pkt + stat.tx.loss),
+	   "",
+	   stat.tx.loss_period.min / 1000.0, 
+	   stat.tx.loss_period.avg / 1000.0, 
+	   stat.tx.loss_period.max / 1000.0,
+	   stat.tx.loss_period.last / 1000.0,
+	   "",
+	   stat.tx.jitter.min / 1000.0,
+	   stat.tx.jitter.avg / 1000.0,
+	   stat.tx.jitter.max / 1000.0,
+	   stat.tx.jitter.last / 1000.0,
+	   ""
+	   );
+
+
+    printf(" RTT delay     : %7.3f %7.3f %7.3f %7.3f%s\n", 
+	   stat.rtt.min / 1000.0,
+	   stat.rtt.avg / 1000.0,
+	   stat.rtt.max / 1000.0,
+	   stat.rtt.last / 1000.0,
+	   ""
+	   );
+
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/tonegen.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/tonegen.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/tonegen.c	(revision 1163)
@@ -0,0 +1,155 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/**
+ * \page page_pjmedia_samples_tonegen_c Samples: Sine Wave/Dual-Tone Generation
+ *
+ * This is a simple program to generate a tone and write the samples to
+ * a raw PCM file. The main purpose of this file is to analyze the
+ * quality of the tones/sine wave generated by PJMEDIA tone/sine wave
+ * generator.
+ *
+ * This file is pjsip-apps/src/samples/tonegen.c
+ *
+ * \includelineno tonegen.c
+ */
+
+
+#include <pjmedia.h>
+#include <pjlib.h>
+
+#define SAMPLES_PER_FRAME   64
+#define ON_DURATION	    100
+#define OFF_DURATION	    100
+
+
+/*
+ * main()
+ */
+int main()
+{
+    pj_caching_pool cp;
+    pjmedia_endpt *med_endpt;
+    pj_pool_t *pool;
+    pjmedia_port *port;
+    unsigned i;
+    pj_status_t status;
+
+
+    /* Must init PJLIB first: */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Must create a pool factory before we can allocate any memory. */
+    pj_caching_pool_init(&cp, &pj_pool_factory_default_policy, 0);
+
+    /* 
+     * Initialize media endpoint.
+     * This will implicitly initialize PJMEDIA too.
+     */
+    status = pjmedia_endpt_create(&cp.factory, NULL, 1, &med_endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, 1);
+
+    /* Create memory pool for our file player */
+    pool = pj_pool_create( &cp.factory,	    /* pool factory	    */
+			   "app",	    /* pool name.	    */
+			   4000,	    /* init size	    */
+			   4000,	    /* increment size	    */
+			   NULL		    /* callback on error    */
+			   );
+
+    status = pjmedia_tonegen_create(pool, 8000, 1, SAMPLES_PER_FRAME, 16, 0, &port);
+    if (status != PJ_SUCCESS)
+	return 1;
+
+    {
+	pjmedia_tone_desc tones[3];
+
+	tones[0].freq1 = 200;
+	tones[0].freq2 = 0;
+	tones[0].on_msec = ON_DURATION;
+	tones[0].off_msec = OFF_DURATION;
+
+	tones[1].freq1 = 400;
+	tones[1].freq2 = 0;
+	tones[1].on_msec = ON_DURATION;
+	tones[1].off_msec = OFF_DURATION;
+
+	tones[2].freq1 = 800;
+	tones[2].freq2 = 0;
+	tones[2].on_msec = ON_DURATION;
+	tones[2].off_msec = OFF_DURATION;
+
+	status = pjmedia_tonegen_play(port, 3, tones, 0);
+	PJ_ASSERT_RETURN(status==PJ_SUCCESS, 1);
+    }
+
+    {
+	pjmedia_tone_digit digits[2];
+
+	digits[0].digit = '0';
+	digits[0].on_msec = ON_DURATION;
+	digits[0].off_msec = OFF_DURATION;
+
+	digits[1].digit = '0';
+	digits[1].on_msec = ON_DURATION;
+	digits[1].off_msec = OFF_DURATION;
+
+	status = pjmedia_tonegen_play_digits(port, 2, digits, 0);
+	PJ_ASSERT_RETURN(status==PJ_SUCCESS, 1);
+    }
+
+    {
+	pjmedia_frame frm;
+	FILE *f;
+	void *buf;
+
+	buf = pj_pool_alloc(pool, 2*8000);
+	frm.buf = buf;
+
+	f = fopen("tonegen.pcm", "wb");
+
+	for (i=0; i<8000/SAMPLES_PER_FRAME; ++i) {
+	    pjmedia_port_get_frame(port, &frm);
+	    fwrite(buf, SAMPLES_PER_FRAME, 2, f);
+	}
+
+	pj_assert(pjmedia_tonegen_is_busy(port) == 0);
+	fclose(f);
+    }
+
+    /* Delete port */
+    pjmedia_port_destroy(port);
+
+    /* Release application pool */
+    pj_pool_release( pool );
+
+    /* Destroy media endpoint. */
+    pjmedia_endpt_destroy( med_endpt );
+
+    /* Destroy pool factory */
+    pj_caching_pool_destroy( &cp );
+
+    /* Shutdown PJLIB */
+    pj_shutdown();
+
+
+    /* Done. */
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/util.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/util.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip-apps/src/samples/util.h	(revision 1163)
@@ -0,0 +1,155 @@
+
+#include <stdlib.h>	/* strtol() */
+
+/* Util to display the error message for the specified error code  */
+static int app_perror( const char *sender, const char *title, 
+		       pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    pj_strerror(status, errmsg, sizeof(errmsg));
+
+    PJ_LOG(3,(sender, "%s: %s [code=%d]", title, errmsg, status));
+    return 1;
+}
+
+
+
+/* Constants */
+#define CLOCK_RATE	44100
+#define NSAMPLES	(CLOCK_RATE * 20 / 1000)
+#define NCHANNELS	1
+#define NBITS		16
+
+/*
+ * Common sound options.
+ */
+#define SND_USAGE   \
+"  -d, --dev=NUM        Sound device use device id NUM (default=-1)	 \n"\
+"  -r, --rate=HZ        Set clock rate in samples per sec (default=44100)\n"\
+"  -c, --channel=NUM    Set # of channels (default=1 for mono).		 \n"\
+"  -f, --frame=NUM      Set # of samples per frame (default equival 20ms)\n"\
+"  -b, --bit=NUM        Set # of bits per sample (default=16)		 \n"
+
+
+/*
+ * This utility function parses the command line and look for
+ * common sound options.
+ */
+pj_status_t get_snd_options(const char *app_name,
+			    int argc, 
+			    char *argv[],
+			    int *dev_id,
+			    int *clock_rate,
+			    int *channel_count,
+			    int *samples_per_frame,
+			    int *bits_per_sample)
+{
+    struct pj_getopt_option long_options[] = {
+	{ "dev",	1, 0, 'd' },
+	{ "rate",	1, 0, 'r' },
+	{ "channel",	1, 0, 'c' },
+	{ "frame",	1, 0, 'f' },
+	{ "bit",	1, 0, 'b' },
+	{ NULL, 0, 0, 0 },
+    };
+    int c;
+    int option_index;
+    long val;
+    char *err;
+
+    *samples_per_frame = 0;
+
+    pj_optind = 0;
+    while((c=pj_getopt_long(argc,argv, "d:r:c:f:b:", 
+			    long_options, &option_index))!=-1) 
+    {
+
+	switch (c) {
+	case 'd':
+	    /* device */
+	    val = strtol(pj_optarg, &err, 10);
+	    if (*err) {
+		PJ_LOG(3,(app_name, "Error: invalid value for device id"));
+		return PJ_EINVAL;
+	    }
+	    *dev_id = val;
+	    break;
+
+	case 'r':
+	    /* rate */
+	    val = strtol(pj_optarg, &err, 10);
+	    if (*err) {
+		PJ_LOG(3,(app_name, "Error: invalid value for clock rate"));
+		return PJ_EINVAL;
+	    }
+	    *clock_rate = val;
+	    break;
+
+	case 'c':
+	    /* channel count */
+	    val = strtol(pj_optarg, &err, 10);
+	    if (*err) {
+		PJ_LOG(3,(app_name, "Error: invalid channel count"));
+		return PJ_EINVAL;
+	    }
+	    *channel_count = val;
+	    break;
+
+	case 'f':
+	    /* frame count/samples per frame */
+	    val = strtol(pj_optarg, &err, 10);
+	    if (*err) {
+		PJ_LOG(3,(app_name, "Error: invalid samples per frame"));
+		return PJ_EINVAL;
+	    }
+	    *samples_per_frame = val;
+	    break;
+
+	case 'b':
+	    /* bit per sample */
+	    val = strtol(pj_optarg, &err, 10);
+	    if (*err) {
+		PJ_LOG(3,(app_name, "Error: invalid samples bits per sample"));
+		return PJ_EINVAL;
+	    }
+	    *bits_per_sample = val;
+	    break;
+
+	default:
+	    /* Unknown options */
+	    PJ_LOG(3,(app_name, "Error: unknown options '%c'", pj_optopt));
+	    return PJ_EINVAL;
+	}
+
+    }
+
+    if (*samples_per_frame == 0) {
+	*samples_per_frame = *clock_rate * *channel_count * 20 / 1000;
+    }
+
+    return 0;
+}
+
+
+/* Dump memory pool usage. */
+void dump_pool_usage( const char *app_name, pj_caching_pool *cp )
+{
+#if !defined(PJ_HAS_POOL_ALT_API) || PJ_HAS_POOL_ALT_API==0
+    pj_pool_t   *p;
+    unsigned     total_alloc = 0;
+    unsigned     total_used = 0;
+
+    /* Accumulate memory usage in active list. */
+    p = cp->used_list.next;
+    while (p != (pj_pool_t*) &cp->used_list) {
+	total_alloc += pj_pool_get_capacity(p);
+	total_used += pj_pool_get_used_size(p);
+	p = p->next;
+    }
+
+    PJ_LOG(3, (app_name, "Total pool memory allocated=%d KB, used=%d KB",
+	       total_alloc / 1000,
+	       total_used / 1000));
+#endif
+}
Index: /pjproject/branches/split-3rd-party/pjsip/build/Makefile
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/Makefile	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/Makefile	(revision 1163)
@@ -0,0 +1,179 @@
+# For common OSes, test's main() is defined in main.c.
+# OS specific configuration may want to put it in different file.
+# For example, see os-rtems.mak in current directory.
+export TEST_OBJS = main.o
+
+include ../../build/common.mak
+
+RULES_MAK := ../../build/rules.mak
+
+PJLIB_LIB:=../../pjlib/lib/libpj-$(TARGET_NAME)$(LIBEXT)
+PJLIB_UTIL_LIB:=../../pjlib-util/lib/libpjlib-util-$(TARGET_NAME)$(LIBEXT)
+PJMEDIA_LIB:=../../pjmedia/lib/libpjmedia-$(TARGET_NAME)$(LIBEXT)
+PJMEDIA_CODEC_LIB:=../../pjmedia/lib/libpjmedia-codec-$(TARGET_NAME)$(LIBEXT)
+
+export PJSIP_LIB:=../lib/libpjsip-$(TARGET_NAME)$(LIBEXT)
+export PJSIP_UA_LIB:=../lib/libpjsip-ua-$(TARGET_NAME)$(LIBEXT)
+export PJSIP_SIMPLE_LIB:=../lib/libpjsip-simple-$(TARGET_NAME)$(LIBEXT)
+export PJSUA_LIB_LIB=../lib/libpjsua-$(TARGET_NAME)$(LIBEXT)
+
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC)../include \
+		   $(CC_INC)../../pjlib/include \
+		   $(CC_INC)../../pjlib-util/include \
+		   $(CC_INC)../../pjnath/include \
+		   $(CC_INC)../../pjmedia/include
+export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
+		   $(HOST_CXXFLAGS) $(CXXFLAGS)
+export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJSUA_LIB_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJSIP_UA_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJSIP_SIMPLE_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJSIP_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJNATH_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \
+		   $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
+		   $(LDFLAGS)
+
+
+###############################################################################
+# Defines for building PJSIP core library
+#
+export PJSIP_SRCDIR = ../src/pjsip
+export PJSIP_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+		sip_errno.o sip_msg.o sip_parser.o sip_tel_uri.o sip_uri.o \
+		sip_endpoint.o sip_util.o sip_util_proxy.o \
+		sip_resolve.o sip_transport.o sip_transport_loop.o \
+		sip_transport_udp.o sip_transport_tcp.o sip_transport_tls_ossl.o \
+		sip_auth_client.o sip_auth_msg.o sip_auth_parser.o \
+		sip_auth_server.o \
+		sip_transaction.o sip_util_statefull.o \
+		sip_dialog.o sip_ua_layer.o
+export PJSIP_CFLAGS += $(_CFLAGS)
+
+###############################################################################
+# Defines for building PJSIP UA library
+#
+export PJSIP_UA_SRCDIR = ../src/pjsip-ua
+export PJSIP_UA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+			sip_inv.o sip_reg.o sip_replaces.o sip_xfer.o
+export PJSIP_UA_CFLAGS += $(_CFLAGS)
+
+
+###############################################################################
+# Defines for building PJSIP SIMPLE library
+#
+export PJSIP_SIMPLE_SRCDIR = ../src/pjsip-simple
+export PJSIP_SIMPLE_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+			errno.o evsub.o evsub_msg.o iscomposing.o \
+			pidf.o presence.o presence_body.o publishc.o \
+			xpidf.o
+export PJSIP_SIMPLE_CFLAGS += $(_CFLAGS)
+
+
+###############################################################################
+# Defines for building PJSUA-LIB library
+#
+export PJSUA_LIB_SRCDIR = ../src/pjsua-lib
+export PJSUA_LIB_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \
+			pjsua_acc.o pjsua_call.o pjsua_core.o \
+			pjsua_im.o pjsua_media.o pjsua_pres.o
+export PJSUA_LIB_CFLAGS += $(_CFLAGS)
+
+
+export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
+
+###############################################################################
+# Defines for building test application
+#
+export TEST_SRCDIR = ../src/test-pjsip
+export TEST_OBJS += dlg_core_test.o dns_test.o msg_err_test.o \
+		    msg_logger.o msg_test.o \
+		    test.o transport_loop_test.o transport_tcp_test.o \
+		    transport_test.o transport_udp_test.o \
+		    tsx_basic_test.o tsx_bench.o tsx_uac_test.o \
+		    tsx_uas_test.o txdata_test.o uri_test.o
+export TEST_CFLAGS += $(_CFLAGS)
+export TEST_LDFLAGS += $(_LDFLAGS)
+export TEST_EXE := ../bin/pjsip-test-$(TARGET_NAME)$(HOST_EXE)
+
+	
+export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
+###############################################################################
+# Main entry
+#
+#
+TARGETS := pjsip pjsip-ua pjsip-simple pjsua-lib pjsip-test
+
+.PHONY: $(TARGETS)
+
+all: $(TARGETS)
+
+doc:
+	cd .. && doxygen docs/doxygen.cfg
+
+dep: depend
+distclean: realclean
+
+.PHONY: dep depend pjsip pjsip-ua pjsua-lib clean realclean distclean
+
+pjsip:
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP app=pjsip $(PJSIP_LIB)
+
+pjsip-ua:
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $(PJSIP_UA_LIB)
+
+pjsip-simple:
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $(PJSIP_SIMPLE_LIB)
+
+pjsua-lib: 
+	$(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $(PJSUA_LIB_LIB)
+
+pjsip-test:
+	$(MAKE) -f $(RULES_MAK) APP=TEST app=pjsip-test $(TEST_EXE)
+
+.PHONY: ../lib/pjsip.ko
+../lib/pjsip.ko:
+	echo Making $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP app=pjsip $@
+
+.PHONY: ../lib/pjsip-ua.ko
+../lib/pjsip-ua.ko:
+	echo Making $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $@
+
+.PHONY: ../lib/pjsip-simple.ko
+../lib/pjsip-simple.ko:
+	echo Making $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $@
+
+.PHONY: ../lib/pjsua-lib.ko
+../lib/pjsua-lib.ko:
+	echo Making $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $@
+
+clean depend:
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP app=pjsip $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $@
+	$(MAKE) -f $(RULES_MAK) APP=TEST app=pjsip-test $@
+
+realclean:
+	$(subst @@,$(subst /,$(HOST_PSEP),.pjsip-$(TARGET_NAME).depend),$(HOST_RMR))
+	$(subst @@,$(subst /,$(HOST_PSEP),.pjsip-ua-$(TARGET_NAME).depend),$(HOST_RMR))
+	$(subst @@,$(subst /,$(HOST_PSEP),.pjsip-simple-$(TARGET_NAME).depend),$(HOST_RMR))
+	$(subst @@,$(subst /,$(HOST_PSEP),.pjsua-lib-$(TARGET_NAME).depend),$(HOST_RMR))
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP app=pjsip $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSIP_SIMPLE app=pjsip-simple $@
+	$(MAKE) -f $(RULES_MAK) APP=TEST app=pjsip-test $@
+	$(MAKE) -f $(RULES_MAK) APP=PJSUA_LIB app=pjsua-lib $@
+
+
+
Index: /pjproject/branches/split-3rd-party/pjsip/build/os-rtems.mak
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/os-rtems.mak	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/os-rtems.mak	(revision 1163)
@@ -0,0 +1,2 @@
+export TEST_OBJS = main_rtems.o
+
Index: /pjproject/branches/split-3rd-party/pjsip/build/pjsip.dsw
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/pjsip.dsw	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/pjsip.dsw	(revision 1163)
@@ -0,0 +1,152 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "pjlib"=..\..\pjlib\build\pjlib.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib++"="..\..\pjlib\build\pjlib++.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib_util"="..\..\pjlib-util\build\pjlib_util.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjmedia"=..\..\pjmedia\build\pjmedia.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjmedia_codec"=..\..\pjmedia\build\pjmedia_codec.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsip_core"=.\pjsip_core.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "pjsip_simple"=.\pjsip_simple.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsip_ua"=.\pjsip_ua.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsua_lib"=.\pjsua_lib.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "test_pjsip"=.\test_pjsip.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_core
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
Index: /pjproject/branches/split-3rd-party/pjsip/build/pjsip_core.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/pjsip_core.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/pjsip_core.dsp	(revision 1163)
@@ -0,0 +1,358 @@
+# Microsoft Developer Studio Project File - Name="pjsip_core" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=pjsip_core - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsip_core.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsip_core.mak" CFG="pjsip_core - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjsip_core - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "pjsip_core - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjsip_core - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\output\pjsip-core-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir ".\output\pjsip-core-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\output\pjsip-core-i386-win32-vc6-release"
+# PROP Intermediate_Dir ".\output\pjsip-core-i386-win32-vc6-release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /Zi /O2 /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjsip-core-i386-win32-vc6-release.lib"
+
+!ELSEIF  "$(CFG)" == "pjsip_core - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\output\pjsip-core-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir ".\output\pjsip-core-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\output\pjsip-core-i386-win32-vc6-debug"
+# PROP Intermediate_Dir ".\output\pjsip-core-i386-win32-vc6-debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjsip-core-i386-win32-vc6-debug.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjsip_core - Win32 Release"
+# Name "pjsip_core - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Group "Base (.c)"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_errno.c
+# End Source File
+# End Group
+# Begin Group "Messaging and Parsing (.c)"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_msg.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_parser.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_tel_uri.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_uri.c
+# End Source File
+# End Group
+# Begin Group "Core (.c)"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_endpoint.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_util.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_util_proxy.c
+# End Source File
+# End Group
+# Begin Group "Transport Layer (.c)"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_resolve.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_transport.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_transport_loop.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_transport_tcp.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_transport_tls_ossl.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_transport_udp.c
+# End Source File
+# End Group
+# Begin Group "Authentication (.c)"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_auth_client.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_auth_msg.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_auth_parser.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_auth_server.c
+# End Source File
+# End Group
+# Begin Group "Transaction Layer (.c)"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_transaction.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_util_statefull.c
+# End Source File
+# End Group
+# Begin Group "UA Layer (.c)"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_dialog.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\src\pjsip\sip_ua_layer.c
+# End Source File
+# End Group
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Group "Base Types (.h)"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_config.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_errno.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_private.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_types.h
+# End Source File
+# End Group
+# Begin Group "Messaging and Parsing (.h)"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\include\pjsip\print_util.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_msg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_parser.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_tel_uri.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_uri.h
+# End Source File
+# End Group
+# Begin Group "Core (.h)"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_endpoint.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_event.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_module.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_util.h
+# End Source File
+# End Group
+# Begin Group "Transport Layer (.h)"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_resolve.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_transport.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_transport_loop.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_transport_tcp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_transport_tls.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_transport_udp.h
+# End Source File
+# End Group
+# Begin Group "Authentication (.h)"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_auth.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_auth_msg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_auth_parser.h
+# End Source File
+# End Group
+# Begin Group "Transaction Layer (.h)"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_transaction.h
+# End Source File
+# End Group
+# Begin Group "UA Layer (.h)"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_dialog.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip\sip_ua_layer.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\docs\doxygen.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter ""
+# End Group
+# Begin Source File
+
+SOURCE=..\..\INSTALL.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\RELNOTES.txt
+# End Source File
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjsip/build/pjsip_core.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/pjsip_core.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/pjsip_core.vcproj	(revision 1163)
@@ -0,0 +1,846 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjsip_core"
+	ProjectGUID="{98E41390-0F17-4501-BB27-B7A933D06806}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\output\pjsip-core-i386-win32-vc8-release"
+			IntermediateDirectory=".\output\pjsip-core-i386-win32-vc8-release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include"
+				PreprocessorDefinitions="NDEBUG;WIN32;_LIB;PJ_WIN32=1;PJ_M_I386=1"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile=".\output\pjsip-core-i386-win32-vc8-release/pjsip_core.pch"
+				AssemblerListingLocation=".\output\pjsip-core-i386-win32-vc8-release/"
+				ObjectFile=".\output\pjsip-core-i386-win32-vc8-release/"
+				ProgramDataBaseFileName=".\output\pjsip-core-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib/pjsip-core-i386-win32-vc8-release.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjsip-core-i386-win32-vc8-release/pjsip_core.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\output\pjsip-core-i386-win32-vc8-debug"
+			IntermediateDirectory=".\output\pjsip-core-i386-win32-vc8-debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include"
+				PreprocessorDefinitions="_DEBUG;WIN32;_LIB;PJ_WIN32=1;PJ_M_I386=1"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\output\pjsip-core-i386-win32-vc8-debug/pjsip_core.pch"
+				AssemblerListingLocation=".\output\pjsip-core-i386-win32-vc8-debug/"
+				ObjectFile=".\output\pjsip-core-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName=".\output\pjsip-core-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib/pjsip-core-i386-win32-vc8-debug.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjsip-core-i386-win32-vc8-debug/pjsip_core.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<Filter
+				Name="Base (.c)"
+				>
+				<File
+					RelativePath="..\src\pjsip\sip_errno.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+			</Filter>
+			<Filter
+				Name="Messaging and Parsing (.c)"
+				>
+				<File
+					RelativePath="..\src\pjsip\sip_msg.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_parser.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_tel_uri.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_uri.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+			</Filter>
+			<Filter
+				Name="Core (.c)"
+				>
+				<File
+					RelativePath="..\src\pjsip\sip_endpoint.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_util.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_util_proxy.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+			</Filter>
+			<Filter
+				Name="Transport Layer (.c)"
+				>
+				<File
+					RelativePath="..\src\pjsip\sip_resolve.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_transport.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_transport_loop.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_transport_tcp.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_transport_tls_ossl.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_transport_udp.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+			</Filter>
+			<Filter
+				Name="Authentication (.c)"
+				>
+				<File
+					RelativePath="..\src\pjsip\sip_auth_client.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_auth_msg.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_auth_parser.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_auth_server.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+			</Filter>
+			<Filter
+				Name="Transaction Layer (.c)"
+				>
+				<File
+					RelativePath="..\src\pjsip\sip_transaction.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_util_statefull.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+			</Filter>
+			<Filter
+				Name="UA Layer (.c)"
+				>
+				<File
+					RelativePath="..\src\pjsip\sip_dialog.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\src\pjsip\sip_ua_layer.c"
+					>
+					<FileConfiguration
+						Name="Release|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Debug|Win32"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							AdditionalIncludeDirectories=""
+							PreprocessorDefinitions=""
+						/>
+					</FileConfiguration>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\docs\doxygen.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsip.h"
+				>
+			</File>
+			<Filter
+				Name="Base Types (.h)"
+				>
+				<File
+					RelativePath="..\include\pjsip\sip_config.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_errno.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_private.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_types.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Messaging and Parsing (.h)"
+				>
+				<File
+					RelativePath="..\include\pjsip\print_util.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_msg.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_parser.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_tel_uri.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_uri.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Core (.h)"
+				>
+				<File
+					RelativePath="..\include\pjsip\sip_endpoint.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_event.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_module.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_util.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Transport Layer (.h)"
+				>
+				<File
+					RelativePath="..\include\pjsip\sip_resolve.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_transport.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_transport_loop.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_transport_tcp.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_transport_tls.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_transport_udp.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Authentication (.h)"
+				>
+				<File
+					RelativePath="..\include\pjsip\sip_auth.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_auth_msg.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_auth_parser.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="Transaction Layer (.h)"
+				>
+				<File
+					RelativePath="..\include\pjsip\sip_transaction.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="UA Layer (.h)"
+				>
+				<File
+					RelativePath="..\include\pjsip\sip_dialog.h"
+					>
+				</File>
+				<File
+					RelativePath="..\include\pjsip\sip_ua_layer.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Inline Files"
+			>
+		</Filter>
+		<File
+			RelativePath="..\..\INSTALL.txt"
+			>
+		</File>
+		<File
+			RelativePath="..\..\RELNOTES.txt"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjsip/build/pjsip_simple.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/pjsip_simple.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/pjsip_simple.dsp	(revision 1163)
@@ -0,0 +1,168 @@
+# Microsoft Developer Studio Project File - Name="pjsip_simple" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=pjsip_simple - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsip_simple.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsip_simple.mak" CFG="pjsip_simple - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjsip_simple - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "pjsip_simple - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjsip_simple - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjsip-simple-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir "./output/pjsip-simple-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjsip-simple-i386-win32-vc6-release"
+# PROP Intermediate_Dir "./output/pjsip-simple-i386-win32-vc6-release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /GX /Zi /O2 /I "../include" /I "../../pjlib-util/include" /I "../../pjlib/include" /D "NDEBUG" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjsip-simple-i386-win32-vc6-release.lib"
+
+!ELSEIF  "$(CFG)" == "pjsip_simple - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjsip-simple-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir "./output/pjsip-simple-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjsip-simple-i386-win32-vc6-debug"
+# PROP Intermediate_Dir "./output/pjsip-simple-i386-win32-vc6-debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib-util/include" /I "../../pjlib/include" /D "_DEBUG" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_MBCS" /D "_LIB" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjsip-simple-i386-win32-vc6-debug.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjsip_simple - Win32 Release"
+# Name "pjsip_simple - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\src\pjsip-simple\errno.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsip-simple\evsub.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsip-simple\evsub_msg.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsip-simple\iscomposing.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsip-simple\pidf.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsip-simple\presence.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsip-simple\presence_body.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsip-simple\publishc.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsip-simple\xpidf.c"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\include\pjsip-simple\errno.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjsip-simple\evsub.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjsip-simple\evsub_msg.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjsip-simple\iscomposing.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjsip-simple\pidf.h"
+# End Source File
+# Begin Source File
+
+SOURCE=..\include\pjsip_simple.h
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjsip-simple\presence.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjsip-simple\publish.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjsip-simple\types.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjsip-simple\xpidf.h"
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjsip/build/pjsip_simple.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/pjsip_simple.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/pjsip_simple.vcproj	(revision 1163)
@@ -0,0 +1,423 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjsip_simple"
+	ProjectGUID="{F40BFAB7-A013-4B6F-9AC4-676199004F0F}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="./output/pjsip-simple-i386-win32-vc8-debug"
+			IntermediateDirectory="./output/pjsip-simple-i386-win32-vc8-debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../../pjlib-util/include,../../pjlib/include"
+				PreprocessorDefinitions="_DEBUG;PJ_WIN32=1;PJ_M_I386=1;WIN32;_LIB"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile="./output/pjsip-simple-i386-win32-vc8-debug/pjsip_simple.pch"
+				AssemblerListingLocation="./output/pjsip-simple-i386-win32-vc8-debug/"
+				ObjectFile="./output/pjsip-simple-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName="./output/pjsip-simple-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib/pjsip-simple-i386-win32-vc8-debug.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/pjsip-simple-i386-win32-vc8-debug/pjsip_simple.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="./output/pjsip-simple-i386-win32-vc8-release"
+			IntermediateDirectory="./output/pjsip-simple-i386-win32-vc8-release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include,../../pjlib-util/include,../../pjlib/include"
+				PreprocessorDefinitions="NDEBUG;PJ_WIN32=1;PJ_M_I386=1;WIN32;_LIB"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile="./output/pjsip-simple-i386-win32-vc8-release/pjsip_simple.pch"
+				AssemblerListingLocation="./output/pjsip-simple-i386-win32-vc8-release/"
+				ObjectFile="./output/pjsip-simple-i386-win32-vc8-release/"
+				ProgramDataBaseFileName="./output/pjsip-simple-i386-win32-vc8-release/"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib/pjsip-simple-i386-win32-vc8-release.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile="./output/pjsip-simple-i386-win32-vc8-release/pjsip_simple.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\pjsip-simple\errno.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsip-simple\evsub.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsip-simple\evsub_msg.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsip-simple\iscomposing.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsip-simple\pidf.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsip-simple\presence.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsip-simple\presence_body.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsip-simple\publishc.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsip-simple\xpidf.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\include\pjsip-simple\errno.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsip-simple\evsub.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsip-simple\evsub_msg.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsip-simple\iscomposing.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsip-simple\pidf.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsip_simple.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsip-simple\presence.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsip-simple\publish.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsip-simple\types.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsip-simple\xpidf.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjsip/build/pjsip_ua.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/pjsip_ua.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/pjsip_ua.dsp	(revision 1163)
@@ -0,0 +1,130 @@
+# Microsoft Developer Studio Project File - Name="pjsip_ua" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=pjsip_ua - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsip_ua.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsip_ua.mak" CFG="pjsip_ua - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjsip_ua - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "pjsip_ua - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjsip_ua - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\output\pjsip-ua-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir ".\output\pjsip-ua-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\output\pjsip-ua-i386-win32-vc6-release"
+# PROP Intermediate_Dir ".\output\pjsip-ua-i386-win32-vc6-release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /Zi /O2 /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../../pjmedia/include" /D "NDEBUG" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_MBCS" /D "_LIB" /FR /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjsip-ua-i386-win32-vc6-release.lib"
+
+!ELSEIF  "$(CFG)" == "pjsip_ua - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\output\pjsip-ua-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir ".\output\pjsip-ua-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\output\pjsip-ua-i386-win32-vc6-debug"
+# PROP Intermediate_Dir ".\output\pjsip-ua-i386-win32-vc6-debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../../pjmedia/include" /D "_DEBUG" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"../lib/pjsip-ua-i386-win32-vc6-debug.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjsip_ua - Win32 Release"
+# Name "pjsip_ua - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\src\pjsip-ua\sip_inv.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsip-ua\sip_reg.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsip-ua\sip_replaces.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsip-ua\sip_xfer.c"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\include\pjsip_ua.h
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjsip-ua\sip_inv.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjsip-ua\sip_regc.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjsip-ua\sip_replaces.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjsip-ua\sip_xfer.h"
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjsip/build/pjsip_ua.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/pjsip_ua.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/pjsip_ua.vcproj	(revision 1163)
@@ -0,0 +1,294 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjsip_ua"
+	ProjectGUID="{5672ED37-5A78-4393-94D0-7CFED60DCC44}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\output\pjsip-ua-i386-win32-vc8-release"
+			IntermediateDirectory=".\output\pjsip-ua-i386-win32-vc8-release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include,../../pjmedia/include"
+				PreprocessorDefinitions="NDEBUG;PJ_WIN32=1;PJ_M_I386=1;WIN32;_LIB"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile=".\output\pjsip-ua-i386-win32-vc8-release/pjsip_ua.pch"
+				AssemblerListingLocation=".\output\pjsip-ua-i386-win32-vc8-release/"
+				ObjectFile=".\output\pjsip-ua-i386-win32-vc8-release/"
+				ProgramDataBaseFileName=".\output\pjsip-ua-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib/pjsip-ua-i386-win32-vc8-release.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjsip-ua-i386-win32-vc8-release/pjsip_ua.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\output\pjsip-ua-i386-win32-vc8-debug"
+			IntermediateDirectory=".\output\pjsip-ua-i386-win32-vc8-debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include,../../pjmedia/include"
+				PreprocessorDefinitions="_DEBUG;PJ_WIN32=1;PJ_M_I386=1;WIN32;_LIB"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\output\pjsip-ua-i386-win32-vc8-debug/pjsip_ua.pch"
+				AssemblerListingLocation=".\output\pjsip-ua-i386-win32-vc8-debug/"
+				ObjectFile=".\output\pjsip-ua-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName=".\output\pjsip-ua-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="../lib/pjsip-ua-i386-win32-vc8-debug.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjsip-ua-i386-win32-vc8-debug/pjsip_ua.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\pjsip-ua\sip_inv.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsip-ua\sip_reg.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsip-ua\sip_replaces.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsip-ua\sip_xfer.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\include\pjsip_ua.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsip-ua\sip_inv.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsip-ua\sip_regc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsip-ua\sip_replaces.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsip-ua\sip_xfer.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjsip/build/pjsua_lib.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/pjsua_lib.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/pjsua_lib.dsp	(revision 1163)
@@ -0,0 +1,126 @@
+# Microsoft Developer Studio Project File - Name="pjsua_lib" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=pjsua_lib - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsua_lib.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsua_lib.mak" CFG="pjsua_lib - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjsua_lib - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "pjsua_lib - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pjsua_lib - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\output\pjsua-lib-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir ".\output\pjsua-lib-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\output\pjsua-lib-i386-win32-vc6-release"
+# PROP Intermediate_Dir ".\output\pjsua-lib-i386-win32-vc6-release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /GX /Zi /O2 /I "../include" /I "../../pjmedia/include" /I "../../pjlib-util/include" /I "../../pjlib/include" /I "../../pjnath/include" /D "NDEBUG" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_MBCS" /D "_LIB" /FR /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\lib\pjsua-lib-i386-win32-vc6-release.lib"
+
+!ELSEIF  "$(CFG)" == "pjsua_lib - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\output\pjsua-lib-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir ".\output\pjsua-lib-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\output\pjsua-lib-i386-win32-vc6-debug"
+# PROP Intermediate_Dir ".\output\pjsua-lib-i386-win32-vc6-debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W4 /Gm /GX /ZI /Od /I "../include" /I "../../pjmedia/include" /I "../../pjlib-util/include" /I "../../pjlib/include" /I "../../pjnath/include" /D "_DEBUG" /D PJ_WIN32=1 /D PJ_M_I386=1 /D "WIN32" /D "_MBCS" /D "_LIB" /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"..\lib\pjsua-lib-i386-win32-vc6-debug.lib"
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjsua_lib - Win32 Release"
+# Name "pjsua_lib - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\src\pjsua-lib\pjsua_acc.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsua-lib\pjsua_call.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsua-lib\pjsua_core.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsua-lib\pjsua_im.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsua-lib\pjsua_media.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\pjsua-lib\pjsua_pres.c"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\include\pjsua-lib\pjsua.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\include\pjsua-lib\pjsua_internal.h"
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjsip/build/pjsua_lib.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/pjsua_lib.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/pjsua_lib.vcproj	(revision 1163)
@@ -0,0 +1,327 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="pjsua_lib"
+	ProjectGUID="{8D13F110-93F9-4AE7-A717-DF25111B05DA}"
+	RootNamespace="pjsua_lib"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\output\pjsua-lib-i386-win32-vc8-debug"
+			IntermediateDirectory=".\output\pjsua-lib-i386-win32-vc8-debug"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../../pjmedia/include,../../pjlib-util/include,../../pjlib/include,../../pjnath/include"
+				PreprocessorDefinitions="_DEBUG;PJ_WIN32=1;PJ_M_I386=1;WIN32;_LIB"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\output\pjsua-lib-i386-win32-vc8-debug/pjsua_lib.pch"
+				AssemblerListingLocation=".\output\pjsua-lib-i386-win32-vc8-debug/"
+				ObjectFile=".\output\pjsua-lib-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName=".\output\pjsua-lib-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib\pjsua-lib-i386-win32-vc8-debug.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjsua-lib-i386-win32-vc8-debug/pjsua_lib.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\output\pjsua-lib-i386-win32-vc8-release"
+			IntermediateDirectory=".\output\pjsua-lib-i386-win32-vc8-release"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../include,../../pjmedia/include,../../pjlib-util/include,../../pjlib/include,../../pjnath/include"
+				PreprocessorDefinitions="NDEBUG;PJ_WIN32=1;PJ_M_I386=1;WIN32;_LIB"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile=".\output\pjsua-lib-i386-win32-vc8-release/pjsua_lib.pch"
+				AssemblerListingLocation=".\output\pjsua-lib-i386-win32-vc8-release/"
+				ObjectFile=".\output\pjsua-lib-i386-win32-vc8-release/"
+				ProgramDataBaseFileName=".\output\pjsua-lib-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="4"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				OutputFile="..\lib\pjsua-lib-i386-win32-vc8-release.lib"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\pjsua-lib-i386-win32-vc8-release/pjsua_lib.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\pjsua-lib\pjsua_acc.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsua-lib\pjsua_call.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsua-lib\pjsua_core.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsua-lib\pjsua_im.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsua-lib\pjsua_media.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\pjsua-lib\pjsua_pres.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\include\pjsua-lib\pjsua.h"
+				>
+			</File>
+			<File
+				RelativePath="..\include\pjsua-lib\pjsua_internal.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjsip/build/test_pjsip.dsp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/test_pjsip.dsp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/test_pjsip.dsp	(revision 1163)
@@ -0,0 +1,172 @@
+# Microsoft Developer Studio Project File - Name="test_pjsip" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=test_pjsip - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "test_pjsip.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "test_pjsip.mak" CFG="test_pjsip - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "test_pjsip - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "test_pjsip - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "test_pjsip - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir ".\output\test-pjsip-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir ".\output\test-pjsip-i386-win32-vc6-release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir ".\output\test-pjsip-i386-win32-vc6-release"
+# PROP Intermediate_Dir ".\output\test-pjsip-i386-win32-vc6-release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O2 /Ob2 /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../../pjnath/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "PJ_WIN32" /D "PJ_M_I386" /FR /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib kernel32.lib netapi32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /profile /map /debug /machine:I386 /out:"..\bin\test-pjsip-i386-win32-vc6-release.exe" /fixed:no
+
+!ELSEIF  "$(CFG)" == "test_pjsip - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir ".\output\test-pjsip-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir ".\output\test-pjsip-i386-win32-vc6-debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ".\output\test-pjsip-i386-win32-vc6-debug"
+# PROP Intermediate_Dir ".\output\test-pjsip-i386-win32-vc6-debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../include" /I "../../pjlib/include" /I "../../pjlib-util/include" /I "../../pjnath/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "PJ_WIN32" /D "PJ_M_I386" /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib kernel32.lib netapi32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\bin\test-pjsip-i386-win32-vc6-debug.exe" /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "test_pjsip - Win32 Release"
+# Name "test_pjsip - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\dlg_core_test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\dns_test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\main.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\msg_err_test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\msg_logger.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\msg_test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\transport_loop_test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\transport_tcp_test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\transport_test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\transport_udp_test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\tsx_basic_test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\tsx_bench.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\tsx_uac_test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\tsx_uas_test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\txdata_test.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\uri_test.c"
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\src\test-pjsip\test.h"
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjsip/build/test_pjsip.vcproj
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/test_pjsip.vcproj	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/test_pjsip.vcproj	(revision 1163)
@@ -0,0 +1,605 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="test_pjsip"
+	ProjectGUID="{AF5815F7-AACB-4798-8FBD-37BF18CAC15C}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\output\test-pjsip-i386-win32-vc8-release"
+			IntermediateDirectory=".\output\test-pjsip-i386-win32-vc8-release"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\output\test-pjsip-i386-win32-vc8-release/test_pjsip.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="2"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;PJ_WIN32;PJ_M_I386"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile=".\output\test-pjsip-i386-win32-vc8-release/test_pjsip.pch"
+				AssemblerListingLocation=".\output\test-pjsip-i386-win32-vc8-release/"
+				ObjectFile=".\output\test-pjsip-i386-win32-vc8-release/"
+				ProgramDataBaseFileName=".\output\test-pjsip-i386-win32-vc8-release/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalOptions="/FIXED:NO"
+				AdditionalDependencies="dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib odbc32.lib odbccp32.lib ole32.lib"
+				OutputFile="..\bin\test-pjsip-i386-win32-vc8-release.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				GenerateMapFile="true"
+				MapFileName=".\output\test-pjsip-i386-win32-vc8-release/test-pjsip-i386-win32-vc8-release.map"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\test-pjsip-i386-win32-vc8-release/test_pjsip.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\output\test-pjsip-i386-win32-vc8-debug"
+			IntermediateDirectory=".\output\test-pjsip-i386-win32-vc8-debug"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\output\test-pjsip-i386-win32-vc8-debug/test_pjsip.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../include,../../pjlib/include,../../pjlib-util/include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PJ_WIN32;PJ_M_I386"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\output\test-pjsip-i386-win32-vc8-debug/test_pjsip.pch"
+				AssemblerListingLocation=".\output\test-pjsip-i386-win32-vc8-debug/"
+				ObjectFile=".\output\test-pjsip-i386-win32-vc8-debug/"
+				ProgramDataBaseFileName=".\output\test-pjsip-i386-win32-vc8-debug/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="dsound.lib dxguid.lib netapi32.lib mswsock.lib ws2_32.lib odbc32.lib odbccp32.lib ole32.lib"
+				OutputFile="..\bin\test-pjsip-i386-win32-vc8-debug.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\output\test-pjsip-i386-win32-vc8-debug/test-pjsip-i386-win32-vc8-debug.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\output\test-pjsip-i386-win32-vc8-debug/test_pjsip.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+			>
+			<File
+				RelativePath="..\src\test-pjsip\dlg_core_test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\dns_test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\main.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\msg_err_test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\msg_logger.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\msg_test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\transport_loop_test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\transport_tcp_test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\transport_test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\transport_udp_test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\tsx_basic_test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\tsx_bench.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\tsx_uac_test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\tsx_uas_test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\txdata_test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\src\test-pjsip\uri_test.c"
+				>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+					/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl"
+			>
+			<File
+				RelativePath="..\src\test-pjsip\test.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsip_core_wince.vcp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsip_core_wince.vcp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsip_core_wince.vcp	(revision 1163)
@@ -0,0 +1,14392 @@
+# Microsoft eMbedded Visual Tools Project File - Name="pjsip_core_wince" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE x86) Static Library" 0x8304
+# TARGTYPE "Win32 (WCE MIPSIV_FP) Static Library" 0x9204
+# TARGTYPE "Win32 (WCE ARMV4) Static Library" 0xa304
+# TARGTYPE "Win32 (WCE ARMV4I) Static Library" 0xa504
+# TARGTYPE "Win32 (WCE emulator) Static Library" 0xa604
+# TARGTYPE "Win32 (WCE ARMV4T) Static Library" 0xa404
+
+CFG=pjsip_core_wince - Win32 (WCE x86) Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsip_core_wince.vcn".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsip_core_wince.vcn" CFG="pjsip_core_wince - Win32 (WCE x86) Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjsip_core_wince - Win32 (WCE emulator) Release" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjsip_core_wince - Win32 (WCE emulator) Debug" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjsip_core_wince - Win32 (WCE ARMV4I) Release" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjsip_core_wince - Win32 (WCE ARMV4I) Debug" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release" (based on "Win32 (WCE MIPSIV_FP) Static Library")
+!MESSAGE "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug" (based on "Win32 (WCE MIPSIV_FP) Static Library")
+!MESSAGE "pjsip_core_wince - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjsip_core_wince - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjsip_core_wince - Win32 (WCE ARMV4T) Release" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjsip_core_wince - Win32 (WCE ARMV4T) Debug" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjsip_core_wince - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE "pjsip_core_wince - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project 2
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjsip_core_emulatorRel"
+# PROP BASE Intermediate_Dir "./output/pjsip_core_emulatorRel"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjsip_core_emulatorRel"
+# PROP Intermediate_Dir "./output/pjsip_core_emulatorRel"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "NDEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjsip_core_emulatorDbg"
+# PROP BASE Intermediate_Dir "./output/pjsip_core_emulatorDbg"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjsip_core_emulatorDbg"
+# PROP Intermediate_Dir "./output/pjsip_core_emulatorDbg"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjsip_core_ARMV4IRel"
+# PROP BASE Intermediate_Dir "./output/pjsip_core_ARMV4IRel"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjsip_core_ARMV4IRel"
+# PROP Intermediate_Dir "./output/pjsip_core_ARMV4IRel"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "ARMV4I" /D "NDEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjsip_core_ARMV4IDbg"
+# PROP BASE Intermediate_Dir "./output/pjsip_core_ARMV4IDbg"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjsip_core_ARMV4IDbg"
+# PROP Intermediate_Dir "./output/pjsip_core_ARMV4IDbg"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "DEBUG" /D "ARMV4I" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjsip_core_MIPSIV_FPRel"
+# PROP BASE Intermediate_Dir "./output/pjsip_core_MIPSIV_FPRel"
+# PROP BASE CPU_ID "{046A430D-7770-48AB-89B5-24C2D300B03F}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjsip_core_MIPSIV_FPRel"
+# PROP Intermediate_Dir "./output/pjsip_core_MIPSIV_FPRel"
+# PROP CPU_ID "{046A430D-7770-48AB-89B5-24C2D300B03F}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clmips.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D "_MIPS64" /D "R4000" /D "MIPSIV" /D "MIPSIV_FP" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QMmips4 /QMn32 /QMFPE- /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "MIPS" /D "_MIPS_" /D "_MIPS64" /D "R4000" /D "MIPSIV" /D "MIPSIV_FP" /D "NDEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QMmips4 /QMn32 /QMFPE- /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjsip_core_MIPSIV_FPDbg"
+# PROP BASE Intermediate_Dir "./output/pjsip_core_MIPSIV_FPDbg"
+# PROP BASE CPU_ID "{046A430D-7770-48AB-89B5-24C2D300B03F}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjsip_core_MIPSIV_FPDbg"
+# PROP Intermediate_Dir "./output/pjsip_core_MIPSIV_FPDbg"
+# PROP CPU_ID "{046A430D-7770-48AB-89B5-24C2D300B03F}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clmips.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "MIPS" /D "_MIPS_" /D "_MIPS64" /D "R4000" /D "MIPSIV" /D "MIPSIV_FP" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QMmips4 /QMn32 /QMFPE- /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D "_MIPS64" /D "R4000" /D "MIPSIV" /D "MIPSIV_FP" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QMmips4 /QMn32 /QMFPE- /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjsip_core_ARMV4Rel"
+# PROP BASE Intermediate_Dir "./output/pjsip_core_ARMV4Rel"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjsip_core_ARMV4Rel"
+# PROP Intermediate_Dir "./output/pjsip_core_ARMV4Rel"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "NDEBUG" /D "ARMV4" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjsip_core_ARMV4Dbg"
+# PROP BASE Intermediate_Dir "./output/pjsip_core_ARMV4Dbg"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjsip_core_ARMV4Dbg"
+# PROP Intermediate_Dir "./output/pjsip_core_ARMV4Dbg"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "DEBUG" /D "ARMV4" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjsip_core_ARMV4TRel"
+# PROP BASE Intermediate_Dir "./output/pjsip_core_ARMV4TRel"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjsip_core_ARMV4TRel"
+# PROP Intermediate_Dir "./output/pjsip_core_ARMV4TRel"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "NDEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjsip_core_ARMV4TDbg"
+# PROP BASE Intermediate_Dir "./output/pjsip_core_ARMV4TDbg"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjsip_core_ARMV4TDbg"
+# PROP Intermediate_Dir "./output/pjsip_core_ARMV4TDbg"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "DEBUG" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjsip_core_X86Rel"
+# PROP BASE Intermediate_Dir "./output/pjsip_core_X86Rel"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjsip_core_X86Rel"
+# PROP Intermediate_Dir "./output/pjsip_core_X86Rel"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "NDEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjsip_core_X86Dbg"
+# PROP BASE Intermediate_Dir "./output/pjsip_core_X86Dbg"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjsip_core_X86Dbg"
+# PROP Intermediate_Dir "./output/pjsip_core_X86Dbg"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjsip_core_wince - Win32 (WCE emulator) Release"
+# Name "pjsip_core_wince - Win32 (WCE emulator) Debug"
+# Name "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+# Name "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+# Name "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+# Name "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+# Name "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+# Name "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+# Name "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+# Name "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+# Name "pjsip_core_wince - Win32 (WCE x86) Release"
+# Name "pjsip_core_wince - Win32 (WCE x86) Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_auth_client.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_A=\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_A=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_A=\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_A=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_A=\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_A=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_A=\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_A=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_A=\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_A=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_A=\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_A=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_A=\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_A=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_A=\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_A=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_A=\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_A=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_A=\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_A=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_A=\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_A=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_A=\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_auth_msg.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_AU=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_AU=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_AU=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_AU=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_AU=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_AU=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_AU=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AU=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_AU=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_AU=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_AU=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_AU=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AU=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_AU=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_auth_parser.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_AUT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_auth_server.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_AUTH=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_dialog.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_D=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_D=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_D=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_D=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_D=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_D=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_D=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_D=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_D=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_D=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_D=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_D=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_D=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_D=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_D=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_D=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_D=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_D=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_D=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_D=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_D=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_D=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_D=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_endpoint.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_E=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_E=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_E=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_E=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_E=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_E=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_E=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_E=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_E=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_E=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_E=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_E=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_E=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_E=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_E=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_E=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_E=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_E=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_E=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_E=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_E=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_E=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_E=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_errno.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_ER=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_ER=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_ER=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_ER=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_ER=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_ER=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_ER=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_ER=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_ER=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_ER=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_ER=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_ER=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_ER=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_ER=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_ER=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_ER=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_ER=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_ER=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_ER=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_ER=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_ER=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_ER=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_ER=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_msg.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_M=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_M=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_M=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_M=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_M=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_M=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_M=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_M=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_M=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_M=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_M=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_parser.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_P=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_P=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_P=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_P=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_P=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_P=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_P=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_P=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_P=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_P=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_P=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth_parser.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_resolve.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_tel_uri.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_T=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_T=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_T=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_T=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_T=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_T=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_T=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_T=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_T=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_T=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_T=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_T=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_T=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_T=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_T=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_T=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_T=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_T=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_T=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_T=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_T=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_T=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_T=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_transaction.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_TR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_TR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_TR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_TR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_TR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_TR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_TR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_TR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_TR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_TR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_TR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_TR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_TR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_TR=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_TR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_TR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_TR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_TR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_TR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_TR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_TR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_TR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_TR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_transport.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_TRA=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_private.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_transport_loop.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_TRAN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_transport_tcp.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_TRANS=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_transport_udp.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_TRANSP=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\socket.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_ua_layer.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_U=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_U=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_U=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_U=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_U=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_U=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_U=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_U=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_U=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_U=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_U=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_U=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_U=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_U=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_U=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_U=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_U=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_U=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_U=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_U=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_U=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_U=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_U=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_uri.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_UR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_UR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_UR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_UR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_UR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_UR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_UR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_UR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_UR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_UR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_UR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_UR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_UR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_UR=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_UR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_UR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_UR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_UR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_UR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_UR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_UR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+NODEP_CPP_SIP_UR=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_UR=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\string.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_util.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_UT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_UT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_UT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_UT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_UT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_UT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_UT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UT=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_UT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_UT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_UT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_UT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UT=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_UT=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_util_proxy.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_UTI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\pjsip\sip_util_statefull.c
+
+!IF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Release"
+
+DEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE MIPSIV_FP) Debug"
+
+DEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_core_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_UTIL=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\include\pjsip.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\print_util.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_auth.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_auth_msg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_auth_parser.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_config.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_dialog.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_endpoint.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_errno.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_event.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_module.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_msg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_parser.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_private.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_resolve.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_tel_uri.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_transaction.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_transport.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_transport_loop.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_transport_tcp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_transport_udp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_types.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_ua_layer.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_uri.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\include\pjsip\sip_util.h
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsip_simple_wince.vcp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsip_simple_wince.vcp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsip_simple_wince.vcp	(revision 1163)
@@ -0,0 +1,5684 @@
+# Microsoft eMbedded Visual Tools Project File - Name="pjsip_simple_wince" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE x86) Static Library" 0x8304
+# TARGTYPE "Win32 (WCE ARMV4) Static Library" 0xa304
+# TARGTYPE "Win32 (WCE ARMV4I) Static Library" 0xa504
+# TARGTYPE "Win32 (WCE emulator) Static Library" 0xa604
+# TARGTYPE "Win32 (WCE ARMV4T) Static Library" 0xa404
+
+CFG=pjsip_simple_wince - Win32 (WCE x86) Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsip_simple_wince.vcn".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsip_simple_wince.vcn" CFG="pjsip_simple_wince - Win32 (WCE x86) Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjsip_simple_wince - Win32 (WCE emulator) Release" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjsip_simple_wince - Win32 (WCE emulator) Debug" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjsip_simple_wince - Win32 (WCE ARMV4I) Release" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjsip_simple_wince - Win32 (WCE ARMV4I) Debug" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjsip_simple_wince - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjsip_simple_wince - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjsip_simple_wince - Win32 (WCE ARMV4T) Release" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjsip_simple_wince - Win32 (WCE ARMV4T) Debug" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjsip_simple_wince - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE "pjsip_simple_wince - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project 2
+
+!IF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjsip_simple_emulatorRel"
+# PROP BASE Intermediate_Dir "output/pjsip_simple_emulatorRel"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjsip_simple_emulatorRel"
+# PROP Intermediate_Dir "output/pjsip_simple_emulatorRel"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "_i386_" /D "_X86_" /D "x86" /D "NDEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/pjsip_simple_emulatorDbg"
+# PROP BASE Intermediate_Dir "output/pjsip_simple_emulatorDbg"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/pjsip_simple_emulatorDbg"
+# PROP Intermediate_Dir "output/pjsip_simple_emulatorDbg"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjsip_simple_ARMV4IRel"
+# PROP BASE Intermediate_Dir "output/pjsip_simple_ARMV4IRel"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjsip_simple_ARMV4IRel"
+# PROP Intermediate_Dir "output/pjsip_simple_ARMV4IRel"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "ARM" /D "_ARM_" /D "ARMV4I" /D "NDEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/pjsip_simple_ARMV4IDbg"
+# PROP BASE Intermediate_Dir "output/pjsip_simple_ARMV4IDbg"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/pjsip_simple_ARMV4IDbg"
+# PROP Intermediate_Dir "output/pjsip_simple_ARMV4IDbg"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4I" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjsip_simple_ARMV4Rel"
+# PROP BASE Intermediate_Dir "output/pjsip_simple_ARMV4Rel"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjsip_simple_ARMV4Rel"
+# PROP Intermediate_Dir "output/pjsip_simple_ARMV4Rel"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/pjsip_simple_ARMV4Dbg"
+# PROP BASE Intermediate_Dir "output/pjsip_simple_ARMV4Dbg"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/pjsip_simple_ARMV4Dbg"
+# PROP Intermediate_Dir "output/pjsip_simple_ARMV4Dbg"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjsip_simple_ARMV4TRel"
+# PROP BASE Intermediate_Dir "output/pjsip_simple_ARMV4TRel"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjsip_simple_ARMV4TRel"
+# PROP Intermediate_Dir "output/pjsip_simple_ARMV4TRel"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "ARM" /D "_ARM_" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "NDEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/pjsip_simple_ARMV4TDbg"
+# PROP BASE Intermediate_Dir "output/pjsip_simple_ARMV4TDbg"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/pjsip_simple_ARMV4TDbg"
+# PROP Intermediate_Dir "output/pjsip_simple_ARMV4TDbg"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "DEBUG" /D "ARM" /D "_ARM_" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjsip_simple_X86Rel"
+# PROP BASE Intermediate_Dir "output/pjsip_simple_X86Rel"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjsip_simple_X86Rel"
+# PROP Intermediate_Dir "output/pjsip_simple_X86Rel"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "_i386_" /D "_X86_" /D "x86" /D "NDEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/pjsip_simple_X86Dbg"
+# PROP BASE Intermediate_Dir "output/pjsip_simple_X86Dbg"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/pjsip_simple_X86Dbg"
+# PROP Intermediate_Dir "output/pjsip_simple_X86Dbg"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjsip_simple_wince - Win32 (WCE emulator) Release"
+# Name "pjsip_simple_wince - Win32 (WCE emulator) Debug"
+# Name "pjsip_simple_wince - Win32 (WCE ARMV4I) Release"
+# Name "pjsip_simple_wince - Win32 (WCE ARMV4I) Debug"
+# Name "pjsip_simple_wince - Win32 (WCE ARMV4) Release"
+# Name "pjsip_simple_wince - Win32 (WCE ARMV4) Debug"
+# Name "pjsip_simple_wince - Win32 (WCE ARMV4T) Release"
+# Name "pjsip_simple_wince - Win32 (WCE ARMV4T) Debug"
+# Name "pjsip_simple_wince - Win32 (WCE x86) Release"
+# Name "pjsip_simple_wince - Win32 (WCE x86) Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\..\src\pjsip-simple\errno.c"
+
+!IF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ERRNO=\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsip-simple\evsub.c"
+
+!IF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_EVSUB=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_EVSUB=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_EVSUB=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_EVSUB=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_EVSUB=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_EVSUB=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_EVSUB=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_EVSUB=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_EVSUB=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_EVSUB=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsip-simple\evsub_msg.c"
+
+!IF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_EVSUB_=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_EVSUB_=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_EVSUB_=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_EVSUB_=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_EVSUB_=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_EVSUB_=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_EVSUB_=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_EVSUB_=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_EVSUB_=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_EVSUB_=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsip-simple\iscomposing.c"
+
+!IF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_ISCOM=\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_ISCOM=\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_ISCOM=\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_ISCOM=\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_ISCOM=\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_ISCOM=\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_ISCOM=\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_ISCOM=\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_ISCOM=\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_ISCOM=\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsip-simple\pidf.c"
+
+!IF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PIDF_=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PIDF_=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PIDF_=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PIDF_=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PIDF_=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PIDF_=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PIDF_=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PIDF_=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PIDF_=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PIDF_=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsip-simple\presence.c"
+
+!IF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PRESE=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PRESE=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PRESE=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PRESE=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PRESE=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PRESE=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PRESE=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PRESE=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PRESE=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PRESE=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsip-simple\presence_body.c"
+
+!IF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PRESEN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PRESEN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PRESEN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PRESEN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PRESEN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PRESEN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PRESEN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PRESEN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PRESEN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PRESEN=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\errno.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsip-simple\publishc.c"
+
+!IF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PUBLI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PUBLI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PUBLI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PUBLI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PUBLI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PUBLI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PUBLI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PUBLI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PUBLI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PUBLI=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsip-simple\xpidf.c"
+
+!IF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_XPIDF=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_XPIDF=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_XPIDF=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_XPIDF=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_XPIDF=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_XPIDF=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_XPIDF=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_XPIDF=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_XPIDF=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_simple_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_XPIDF=\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\..\include\pjsip-simple\errno.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjsip-simple\evsub.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjsip-simple\evsub_msg.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjsip-simple\iscomposing.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjsip-simple\pidf.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjsip-simple\presence.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjsip-simple\publish.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjsip-simple\types.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjsip-simple\xpidf.h"
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsip_ua_wince.vcp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsip_ua_wince.vcp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsip_ua_wince.vcp	(revision 1163)
@@ -0,0 +1,3172 @@
+# Microsoft eMbedded Visual Tools Project File - Name="pjsip_ua_wince" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE x86) Static Library" 0x8304
+# TARGTYPE "Win32 (WCE ARMV4) Static Library" 0xa304
+# TARGTYPE "Win32 (WCE ARMV4I) Static Library" 0xa504
+# TARGTYPE "Win32 (WCE emulator) Static Library" 0xa604
+# TARGTYPE "Win32 (WCE ARMV4T) Static Library" 0xa404
+
+CFG=PJSIP_UA_WINCE - WIN32 (WCE EMULATOR) DEBUG
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsip_ua_wince.vcn".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsip_ua_wince.vcn" CFG="PJSIP_UA_WINCE - WIN32 (WCE EMULATOR) DEBUG"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjsip_ua_wince - Win32 (WCE emulator) Release" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjsip_ua_wince - Win32 (WCE emulator) Debug" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjsip_ua_wince - Win32 (WCE ARMV4I) Release" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjsip_ua_wince - Win32 (WCE ARMV4I) Debug" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjsip_ua_wince - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjsip_ua_wince - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjsip_ua_wince - Win32 (WCE ARMV4T) Release" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjsip_ua_wince - Win32 (WCE ARMV4T) Debug" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjsip_ua_wince - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE "pjsip_ua_wince - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project 2
+
+!IF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE emulator) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjsip_ua_emulatorRel"
+# PROP BASE Intermediate_Dir "./output/pjsip_ua_emulatorRel"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjsip_ua_emulatorRel"
+# PROP Intermediate_Dir "./output/pjsip_ua_emulatorRel"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "NDEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE emulator) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjsip_ua_emulatorDbg"
+# PROP BASE Intermediate_Dir "./output/pjsip_ua_emulatorDbg"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjsip_ua_emulatorDbg"
+# PROP Intermediate_Dir "./output/pjsip_ua_emulatorDbg"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4I) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjsip_ua_ARMV4IRel"
+# PROP BASE Intermediate_Dir "./output/pjsip_ua_ARMV4IRel"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjsip_ua_ARMV4IRel"
+# PROP Intermediate_Dir "./output/pjsip_ua_ARMV4IRel"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "ARMV4I" /D "NDEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4I) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjsip_ua_ARMV4IDbg"
+# PROP BASE Intermediate_Dir "./output/pjsip_ua_ARMV4IDbg"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjsip_ua_ARMV4IDbg"
+# PROP Intermediate_Dir "./output/pjsip_ua_ARMV4IDbg"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "ARMV4I" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjsip_ua_ARMV4Rel"
+# PROP BASE Intermediate_Dir "./output/pjsip_ua_ARMV4Rel"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjsip_ua_ARMV4Rel"
+# PROP Intermediate_Dir "./output/pjsip_ua_ARMV4Rel"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "NDEBUG" /D "ARMV4" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjsip_ua_ARMV4Dbg"
+# PROP BASE Intermediate_Dir "./output/pjsip_ua_ARMV4Dbg"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjsip_ua_ARMV4Dbg"
+# PROP Intermediate_Dir "./output/pjsip_ua_ARMV4Dbg"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "ARMV4" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4T) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjsip_ua_ARMV4TRel"
+# PROP BASE Intermediate_Dir "./output/pjsip_ua_ARMV4TRel"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjsip_ua_ARMV4TRel"
+# PROP Intermediate_Dir "./output/pjsip_ua_ARMV4TRel"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "NDEBUG" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4T) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjsip_ua_ARMV4TDbg"
+# PROP BASE Intermediate_Dir "./output/pjsip_ua_ARMV4TDbg"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjsip_ua_ARMV4TDbg"
+# PROP Intermediate_Dir "./output/pjsip_ua_ARMV4TDbg"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "ARM" /D "_ARM_" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE x86) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/pjsip_ua_X86Rel"
+# PROP BASE Intermediate_Dir "./output/pjsip_ua_X86Rel"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/pjsip_ua_X86Rel"
+# PROP Intermediate_Dir "./output/pjsip_ua_X86Rel"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "NDEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE x86) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/pjsip_ua_X86Dbg"
+# PROP BASE Intermediate_Dir "./output/pjsip_ua_X86Dbg"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/pjsip_ua_X86Dbg"
+# PROP Intermediate_Dir "./output/pjsip_ua_X86Dbg"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjsip_ua_wince - Win32 (WCE emulator) Release"
+# Name "pjsip_ua_wince - Win32 (WCE emulator) Debug"
+# Name "pjsip_ua_wince - Win32 (WCE ARMV4I) Release"
+# Name "pjsip_ua_wince - Win32 (WCE ARMV4I) Debug"
+# Name "pjsip_ua_wince - Win32 (WCE ARMV4) Release"
+# Name "pjsip_ua_wince - Win32 (WCE ARMV4) Debug"
+# Name "pjsip_ua_wince - Win32 (WCE ARMV4T) Release"
+# Name "pjsip_ua_wince - Win32 (WCE ARMV4T) Debug"
+# Name "pjsip_ua_wince - Win32 (WCE x86) Release"
+# Name "pjsip_ua_wince - Win32 (WCE x86) Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\..\src\pjsip-ua\sip_inv.c"
+
+!IF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_I=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_autoconf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_I=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_I=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_I=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_I=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_I=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_I=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_I=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsip-ua\sip_reg.c"
+
+!IF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_autoconf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+NODEP_CPP_SIP_R=\
+	"..\..\..\pjlib\include\pj\compat\m_arm.h"\
+	"..\..\..\pjlib\include\pj\compat\sprintf.h"\
+	"..\..\..\pjlib\include\pj\compat\vsprintf.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_R=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsip-ua\sip_replaces.c"
+
+!IF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_RE=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_RE=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_autoconf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_RE=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_RE=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_RE=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_RE=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_RE=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_RE=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_RE=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_RE=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip\print_util.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsip-ua\sip_xfer.c"
+
+!IF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_SIP_X=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_SIP_X=\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_autoconf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_SIP_X=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_SIP_X=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_SIP_X=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_SIP_X=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_SIP_X=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_SIP_X=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_SIP_X=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsip_ua_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_SIP_X=\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\evsub_msg.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\include\pjsip_ua.h
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjsip-ua\sip_inv.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjsip-ua\sip_regc.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjsip-ua\sip_replaces.h"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\include\pjsip-ua\sip_xfer.h"
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsip_wince.vcw
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsip_wince.vcw	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsip_wince.vcw	(revision 1163)
@@ -0,0 +1,113 @@
+Microsoft eMbedded Visual Tools Workspace File, Format Version 4.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "pjlib_util_wince"="..\..\..\pjlib-util\build\wince-evc4\pjlib_util_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjlib_wince"="..\..\..\pjlib\build\wince-evc4\pjlib_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjmedia_codec_wince"="..\..\..\pjmedia\build\wince-evc4\pjmedia_codec_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjmedia_wince"="..\..\..\pjmedia\build\wince-evc4\pjmedia_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsip_core_wince"=".\pjsip_core_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsip_simple_wince"=".\pjsip_simple_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsip_ua_wince"=".\pjsip_ua_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "pjsua_lib_wince"=".\pjsua_lib_wince.vcp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
Index: /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsua_lib_wince.vcp
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsua_lib_wince.vcp	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/build/wince-evc4/pjsua_lib_wince.vcp	(revision 1163)
@@ -0,0 +1,9179 @@
+# Microsoft eMbedded Visual Tools Project File - Name="pjsua_lib_wince" - Package Owner=<4>
+# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE x86) Static Library" 0x8304
+# TARGTYPE "Win32 (WCE ARMV4) Static Library" 0xa304
+# TARGTYPE "Win32 (WCE ARMV4I) Static Library" 0xa504
+# TARGTYPE "Win32 (WCE emulator) Static Library" 0xa604
+# TARGTYPE "Win32 (WCE ARMV4T) Static Library" 0xa404
+
+CFG=pjsua_lib_wince - Win32 (WCE x86) Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsua_lib_wince.vcn".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pjsua_lib_wince.vcn" CFG="pjsua_lib_wince - Win32 (WCE x86) Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pjsua_lib_wince - Win32 (WCE emulator) Release" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjsua_lib_wince - Win32 (WCE emulator) Debug" (based on "Win32 (WCE emulator) Static Library")
+!MESSAGE "pjsua_lib_wince - Win32 (WCE ARMV4I) Release" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjsua_lib_wince - Win32 (WCE ARMV4I) Debug" (based on "Win32 (WCE ARMV4I) Static Library")
+!MESSAGE "pjsua_lib_wince - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjsua_lib_wince - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Static Library")
+!MESSAGE "pjsua_lib_wince - Win32 (WCE ARMV4T) Release" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjsua_lib_wince - Win32 (WCE ARMV4T) Debug" (based on "Win32 (WCE ARMV4T) Static Library")
+!MESSAGE "pjsua_lib_wince - Win32 (WCE x86) Release" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE "pjsua_lib_wince - Win32 (WCE x86) Debug" (based on "Win32 (WCE x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP ATL_Project 2
+
+!IF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE emulator) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjsua_lib_emulatorRel"
+# PROP BASE Intermediate_Dir "output/pjsua_lib_emulatorRel"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjsua_lib_emulatorRel"
+# PROP Intermediate_Dir "output/pjsua_lib_emulatorRel"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "_i386_" /D "_X86_" /D "x86" /D "NDEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE emulator) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/pjsua_lib_emulatorDbg"
+# PROP BASE Intermediate_Dir "output/pjsua_lib_emulatorDbg"
+# PROP BASE CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/pjsua_lib_emulatorDbg"
+# PROP Intermediate_Dir "output/pjsua_lib_emulatorDbg"
+# PROP CPU_ID "{32E52003-403E-442D-BE48-DE10F8C6131D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4I) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjsua_lib_ARMV4IRel"
+# PROP BASE Intermediate_Dir "output/pjsua_lib_ARMV4IRel"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjsua_lib_ARMV4IRel"
+# PROP Intermediate_Dir "output/pjsua_lib_ARMV4IRel"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "ARM" /D "_ARM_" /D "ARMV4I" /D "NDEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4I) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/pjsua_lib_ARMV4IDbg"
+# PROP BASE Intermediate_Dir "output/pjsua_lib_ARMV4IDbg"
+# PROP BASE CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/pjsua_lib_ARMV4IDbg"
+# PROP Intermediate_Dir "output/pjsua_lib_ARMV4IDbg"
+# PROP CPU_ID "{DC70F430-E78B-494F-A9D5-62ADC56443B8}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "ARMV4I" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4I" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjsua_lib_ARMV4Rel"
+# PROP BASE Intermediate_Dir "output/pjsua_lib_ARMV4Rel"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjsua_lib_ARMV4Rel"
+# PROP Intermediate_Dir "output/pjsua_lib_ARMV4Rel"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/pjsua_lib_ARMV4Dbg"
+# PROP BASE Intermediate_Dir "output/pjsua_lib_ARMV4Dbg"
+# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/pjsua_lib_ARMV4Dbg"
+# PROP Intermediate_Dir "output/pjsua_lib_ARMV4Dbg"
+# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clarm.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4T) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjsua_lib_ARMV4TRel"
+# PROP BASE Intermediate_Dir "output/pjsua_lib_ARMV4TRel"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjsua_lib_ARMV4TRel"
+# PROP Intermediate_Dir "output/pjsua_lib_ARMV4TRel"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "ARM" /D "_ARM_" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D "NDEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /O2 /M$(CECrtMT) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4T) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/pjsua_lib_ARMV4TDbg"
+# PROP BASE Intermediate_Dir "output/pjsua_lib_ARMV4TDbg"
+# PROP BASE CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/pjsua_lib_ARMV4TDbg"
+# PROP Intermediate_Dir "output/pjsua_lib_ARMV4TDbg"
+# PROP CPU_ID "{F52316A9-3B7C-4FE7-A67F-68350B41240D}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=clthumb.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "ARM" /D "_ARM_" /D "$(CePlatform)" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "ARM" /D "_ARM_" /D "THUMB" /D "_THUMB_" /D "ARMV4T" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /QRarch4T /QRinterwork-return /M$(CECrtMTDebug) /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE x86) Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "output/pjsua_lib_X86Rel"
+# PROP BASE Intermediate_Dir "output/pjsua_lib_X86Rel"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "output/pjsua_lib_X86Rel"
+# PROP Intermediate_Dir "output/pjsua_lib_X86Rel"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "NDEBUG" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+# ADD CPP /nologo /W3 /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "_i386_" /D "_X86_" /D "x86" /D "NDEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /O2 /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE x86) Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "output/pjsua_lib_X86Dbg"
+# PROP BASE Intermediate_Dir "output/pjsua_lib_X86Dbg"
+# PROP BASE CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "output/pjsua_lib_X86Dbg"
+# PROP Intermediate_Dir "output/pjsua_lib_X86Dbg"
+# PROP CPU_ID "{D6518FF3-710F-11D3-99F2-00105A0DF099}"
+# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
+# PROP Target_Dir ""
+CPP=cl.exe
+# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "_i386_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_X86_" /D "x86" /D "_LIB" /YX /Gs8192 /GF /c
+# ADD CPP /nologo /W3 /Zi /Od /I "../../include" /I "../../../pjlib-util/include" /I "../../../pjlib/include" /I "../../../pjmedia/include" /I "../../../pjnath/include" /D "DEBUG" /D "_i386_" /D "_X86_" /D "x86" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /Gs8192 /GF /c
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+
+!ENDIF 
+
+# Begin Target
+
+# Name "pjsua_lib_wince - Win32 (WCE emulator) Release"
+# Name "pjsua_lib_wince - Win32 (WCE emulator) Debug"
+# Name "pjsua_lib_wince - Win32 (WCE ARMV4I) Release"
+# Name "pjsua_lib_wince - Win32 (WCE ARMV4I) Debug"
+# Name "pjsua_lib_wince - Win32 (WCE ARMV4) Release"
+# Name "pjsua_lib_wince - Win32 (WCE ARMV4) Debug"
+# Name "pjsua_lib_wince - Win32 (WCE ARMV4T) Release"
+# Name "pjsua_lib_wince - Win32 (WCE ARMV4T) Debug"
+# Name "pjsua_lib_wince - Win32 (WCE x86) Release"
+# Name "pjsua_lib_wince - Win32 (WCE x86) Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE="..\..\src\pjsua-lib\pjsua_acc.c"
+
+!IF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\srv_resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\stun_simple.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\alaw_ulaw.h"\
+	"..\..\..\pjmedia\include\pjmedia\bidirectional.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mp3_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\tonegen.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_ice.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_playlist.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_autoconf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_tls.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsua-lib\pjsua_call.c"
+
+!IF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\srv_resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\stun_simple.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\alaw_ulaw.h"\
+	"..\..\..\pjmedia\include\pjmedia\bidirectional.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mp3_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\tonegen.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_ice.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_playlist.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_autoconf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_tls.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsua-lib\pjsua_core.c"
+
+!IF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\srv_resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\stun_simple.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\alaw_ulaw.h"\
+	"..\..\..\pjmedia\include\pjmedia\bidirectional.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mp3_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\tonegen.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_ice.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_playlist.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_autoconf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_tls.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_C=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsua-lib\pjsua_im.c"
+
+!IF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\srv_resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\stun_simple.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\alaw_ulaw.h"\
+	"..\..\..\pjmedia\include\pjmedia\bidirectional.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mp3_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\tonegen.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_ice.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_playlist.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_autoconf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_tls.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_I=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsua-lib\pjsua_media.c"
+
+!IF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\srv_resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\stun_simple.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\alaw_ulaw.h"\
+	"..\..\..\pjmedia\include\pjmedia\bidirectional.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mp3_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\tonegen.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_ice.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_playlist.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_autoconf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_tls.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_M=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\pjsua-lib\pjsua_pres.c"
+
+!IF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE emulator) Release"
+
+DEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE emulator) Debug"
+
+DEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\config.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\crc32.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\dns.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\hmac_sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\sha1.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\srv_resolver.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\stun_simple.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\types.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_auto.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\config_site_sample.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\ip_helper.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_buf.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\alaw_ulaw.h"\
+	"..\..\..\pjmedia\include\pjmedia\bidirectional.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\config_auto.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo.h"\
+	"..\..\..\pjmedia\include\pjmedia\echo_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mp3_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\tonegen.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_ice.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_playlist.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\..\pjnath\include\pjnath\config.h"\
+	"..\..\..\pjnath\include\pjnath\ice_session.h"\
+	"..\..\..\pjnath\include\pjnath\ice_strans.h"\
+	"..\..\..\pjnath\include\pjnath\stun_auth.h"\
+	"..\..\..\pjnath\include\pjnath\stun_config.h"\
+	"..\..\..\pjnath\include\pjnath\stun_msg.h"\
+	"..\..\..\pjnath\include\pjnath\stun_session.h"\
+	"..\..\..\pjnath\include\pjnath\stun_transaction.h"\
+	"..\..\..\pjnath\include\pjnath\types.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\publish.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_replaces.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_autoconf.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_tls.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4I) Release"
+
+DEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4I) Debug"
+
+DEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4) Release"
+
+DEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4) Debug"
+
+DEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4T) Release"
+
+DEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE ARMV4T) Debug"
+
+DEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE x86) Release"
+
+DEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ELSEIF  "$(CFG)" == "pjsua_lib_wince - Win32 (WCE x86) Debug"
+
+DEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\errno.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\getopt.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\md5.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_bitwise.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\scanner_cis_uint.h"\
+	"..\..\..\pjlib-util\include\pjlib-util\xml.h"\
+	"..\..\..\pjlib\include\pj\addr_resolv.h"\
+	"..\..\..\pjlib\include\pj\array.h"\
+	"..\..\..\pjlib\include\pj\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\assert.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_gcc.h"\
+	"..\..\..\pjlib\include\pj\compat\cc_msvc.h"\
+	"..\..\..\pjlib\include\pj\compat\ctype.h"\
+	"..\..\..\pjlib\include\pj\compat\errno.h"\
+	"..\..\..\pjlib\include\pj\compat\high_precision.h"\
+	"..\..\..\pjlib\include\pj\compat\m_alpha.h"\
+	"..\..\..\pjlib\include\pj\compat\m_armv4.h"\
+	"..\..\..\pjlib\include\pj\compat\m_i386.h"\
+	"..\..\..\pjlib\include\pj\compat\m_m68k.h"\
+	"..\..\..\pjlib\include\pj\compat\m_powerpc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_sparc.h"\
+	"..\..\..\pjlib\include\pj\compat\m_x86_64.h"\
+	"..\..\..\pjlib\include\pj\compat\os_darwinos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux.h"\
+	"..\..\..\pjlib\include\pj\compat\os_linux_kernel.h"\
+	"..\..\..\pjlib\include\pj\compat\os_palmos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_rtems.h"\
+	"..\..\..\pjlib\include\pj\compat\os_sunos.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32.h"\
+	"..\..\..\pjlib\include\pj\compat\os_win32_wince.h"\
+	"..\..\..\pjlib\include\pj\compat\setjmp.h"\
+	"..\..\..\pjlib\include\pj\compat\size_t.h"\
+	"..\..\..\pjlib\include\pj\compat\string.h"\
+	"..\..\..\pjlib\include\pj\config.h"\
+	"..\..\..\pjlib\include\pj\config_site.h"\
+	"..\..\..\pjlib\include\pj\ctype.h"\
+	"..\..\..\pjlib\include\pj\errno.h"\
+	"..\..\..\pjlib\include\pj\except.h"\
+	"..\..\..\pjlib\include\pj\fifobuf.h"\
+	"..\..\..\pjlib\include\pj\file_access.h"\
+	"..\..\..\pjlib\include\pj\file_io.h"\
+	"..\..\..\pjlib\include\pj\guid.h"\
+	"..\..\..\pjlib\include\pj\hash.h"\
+	"..\..\..\pjlib\include\pj\ioqueue.h"\
+	"..\..\..\pjlib\include\pj\list.h"\
+	"..\..\..\pjlib\include\pj\list_i.h"\
+	"..\..\..\pjlib\include\pj\lock.h"\
+	"..\..\..\pjlib\include\pj\log.h"\
+	"..\..\..\pjlib\include\pj\os.h"\
+	"..\..\..\pjlib\include\pj\pool.h"\
+	"..\..\..\pjlib\include\pj\pool_alt.h"\
+	"..\..\..\pjlib\include\pj\pool_i.h"\
+	"..\..\..\pjlib\include\pj\rand.h"\
+	"..\..\..\pjlib\include\pj\rbtree.h"\
+	"..\..\..\pjlib\include\pj\sock.h"\
+	"..\..\..\pjlib\include\pj\sock_select.h"\
+	"..\..\..\pjlib\include\pj\string.h"\
+	"..\..\..\pjlib\include\pj\string_i.h"\
+	"..\..\..\pjlib\include\pj\timer.h"\
+	"..\..\..\pjlib\include\pj\types.h"\
+	"..\..\..\pjlib\include\pj\unicode.h"\
+	"..\..\..\pjlib\include\pjlib.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\config.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\gsm.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\ilbc.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\l16.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\speex.h"\
+	"..\..\..\pjmedia\include\pjmedia-codec\types.h"\
+	"..\..\..\pjmedia\include\pjmedia.h"\
+	"..\..\..\pjmedia\include\pjmedia\clock.h"\
+	"..\..\..\pjmedia\include\pjmedia\codec.h"\
+	"..\..\..\pjmedia\include\pjmedia\conference.h"\
+	"..\..\..\pjmedia\include\pjmedia\config.h"\
+	"..\..\..\pjmedia\include\pjmedia\endpoint.h"\
+	"..\..\..\pjmedia\include\pjmedia\errno.h"\
+	"..\..\..\pjmedia\include\pjmedia\g711.h"\
+	"..\..\..\pjmedia\include\pjmedia\jbuf.h"\
+	"..\..\..\pjmedia\include\pjmedia\master_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\mem_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\null_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\plc.h"\
+	"..\..\..\pjmedia\include\pjmedia\port.h"\
+	"..\..\..\pjmedia\include\pjmedia\resample.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtcp.h"\
+	"..\..\..\pjmedia\include\pjmedia\rtp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp.h"\
+	"..\..\..\pjmedia\include\pjmedia\sdp_neg.h"\
+	"..\..\..\pjmedia\include\pjmedia\session.h"\
+	"..\..\..\pjmedia\include\pjmedia\silencedet.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound.h"\
+	"..\..\..\pjmedia\include\pjmedia\sound_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\splitcomb.h"\
+	"..\..\..\pjmedia\include\pjmedia\stream.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport.h"\
+	"..\..\..\pjmedia\include\pjmedia\transport_udp.h"\
+	"..\..\..\pjmedia\include\pjmedia\types.h"\
+	"..\..\..\pjmedia\include\pjmedia\wav_port.h"\
+	"..\..\..\pjmedia\include\pjmedia\wave.h"\
+	"..\..\include\pjsip-simple\evsub.h"\
+	"..\..\include\pjsip-simple\iscomposing.h"\
+	"..\..\include\pjsip-simple\pidf.h"\
+	"..\..\include\pjsip-simple\presence.h"\
+	"..\..\include\pjsip-simple\types.h"\
+	"..\..\include\pjsip-simple\xpidf.h"\
+	"..\..\include\pjsip-ua\sip_inv.h"\
+	"..\..\include\pjsip-ua\sip_regc.h"\
+	"..\..\include\pjsip-ua\sip_xfer.h"\
+	"..\..\include\pjsip.h"\
+	"..\..\include\pjsip\sip_auth.h"\
+	"..\..\include\pjsip\sip_auth_msg.h"\
+	"..\..\include\pjsip\sip_config.h"\
+	"..\..\include\pjsip\sip_dialog.h"\
+	"..\..\include\pjsip\sip_endpoint.h"\
+	"..\..\include\pjsip\sip_errno.h"\
+	"..\..\include\pjsip\sip_event.h"\
+	"..\..\include\pjsip\sip_module.h"\
+	"..\..\include\pjsip\sip_msg.h"\
+	"..\..\include\pjsip\sip_parser.h"\
+	"..\..\include\pjsip\sip_resolve.h"\
+	"..\..\include\pjsip\sip_tel_uri.h"\
+	"..\..\include\pjsip\sip_transaction.h"\
+	"..\..\include\pjsip\sip_transport.h"\
+	"..\..\include\pjsip\sip_transport_loop.h"\
+	"..\..\include\pjsip\sip_transport_tcp.h"\
+	"..\..\include\pjsip\sip_transport_udp.h"\
+	"..\..\include\pjsip\sip_types.h"\
+	"..\..\include\pjsip\sip_ua_layer.h"\
+	"..\..\include\pjsip\sip_uri.h"\
+	"..\..\include\pjsip\sip_util.h"\
+	"..\..\include\pjsip_simple.h"\
+	"..\..\include\pjsip_ua.h"\
+	"..\..\include\pjsua-lib\pjsua.h"\
+	"..\..\include\pjsua-lib\pjsua_internal.h"\
+	
+NODEP_CPP_PJSUA_P=\
+	"..\..\..\pjlib-util\include\pjlib-util\stun.h"\
+	
+
+!ENDIF 
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE="..\..\include\pjsua-lib\pjsua.h"
+# End Source File
+# End Group
+# End Target
+# End Project
Index: /pjproject/branches/split-3rd-party/pjsip/docs/PJSUA-TESTING.txt
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/docs/PJSUA-TESTING.txt	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/docs/PJSUA-TESTING.txt	(revision 1163)
@@ -0,0 +1,47 @@
+TESTING
+
+SANITY CHECKS:
+- Do pjlib-test
+- Do pjsip-test
+
+BASIC FLOW TEST (compaq1.cfg, compaq2.cfg);
+- with other pjsua
+- with EyeBeam
+- Register 
+	- with Route
+	- without Route
+	- with TCP
+- Presence (client and server)
+- Call (UAC and UAS)
+	- hold and being held
+	- DTMF send/receive
+- IM and typing
+- Call transfer (with and without norefersub)
+- Call Hold
+- Re-Invite
+- DTMF
+- RTCP
+- TCP (if there's UDP route, then Contact will be UDP)
+
+- Repeat basic flow test without Route set (to wheter TCP is correctly specified in the contact etc)
+
+
+- STUN test	(fwd1.cfg)
+
+COMPATIBILITY WITH FWD
+- presence (xpidf)
+
+
+MULTIPLE ACCOUNTS (combo.cfg)
+
+DIGEST with qop=auth (sipcenter?)
+
+AUDIO QUALITY
+- call to another pjsua that loops incoming call
+
+TEST THE SAMPLES
+
+LINUX TEST
+
+UPDATE DOCUMENTATION
+
Index: /pjproject/branches/split-3rd-party/pjsip/docs/TRANSPORT-PROBLEMS.TXT
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/docs/TRANSPORT-PROBLEMS.TXT	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/docs/TRANSPORT-PROBLEMS.TXT	(revision 1163)
@@ -0,0 +1,46 @@
+Dialog's Contact Address Problems
+
+
+Background
+
+When creating a dialog (UAC or UAS dialog), application needs to specify local address to be put in the Contact header generated by the dialog. This address normally is derived from the transport address created by the application.
+
+This can be a complicated thing to do, because application needs to select the appropriate address based on the transport being used to contact remote peer, and it's not so easy especially when multiple transports are created, or when multiple interfaces are present in the host (multihoming).
+
+(Note: also similarly for client registration).
+
+So a change is being/to be made to allow the dialog to automate this process. If application specify NULL as the value of the local contact when creating a dialog, then the dialog should choose the best transport address according to the following rules.
+
+
+1a. UAC
+
+UAC SHOULD select the Contact address based on the transport to be used to send initial request to target (this can be deduced by the ";transport" param in the target URI).  For example, if initial transport is UDP, then the Contact SHOULD specify the appropriate UDP transport address.
+
+When there are multiple transports available to reach the destination (such as multiple UDP transports, although this is not really tested/supported), then which transport to use follows the policy used by the transport manager.
+
+Note that target can be the URI in the request URI, or the first route in the route set. Because initial route set is specified AFTER dialog is created, the Contact header generation is done when the initial request is created/sent.
+
+Unsolved problem(s):
+ - what if the remote Contact header in the 2xx response indicates different transport? Ideally the local Contact needs to be updated too, but this is quite a complicated problem, because if we change the local Contact, then remote may change its Contact too, and this can result in an endles loop.
+
+
+1b. UAS
+
+UAS MUST select the Contact address based on the value of Contact header and the Record-Route set in the incoming request.
+
+
+
+
+2. Multihoming
+
+Problem:
+If application does not specify the address to be used when creating SIP transport, then transport address is calculated based on the primary IP address of the local host. Sometimes this is not the correct IP to be used by the dialog, especially when there are multiple interfaces in the host. If this "incorrect" address is specified in the Contact, then remote would not be able to send request to local host.
+
+
+Workaround:
+Change the behavior of determining local IP. Instead of calling gethostbyname() for local host, the local interface IP is determined by creating an UDP socket, do UDP connect() to some public host, and get the local IP address of the socket.
+
+Although this does not fully solve the problem, hopefully it solves many problems in typical desktop systems, where an "unwanted" adapter takes precendence over the "wanted" adapter on the host/address resolution.
+
+A fully working solution would probably involve having a table to track which interface to use based on the destination, or to query the host's routing table.
+
Index: /pjproject/branches/split-3rd-party/pjsip/docs/doxygen.cfg
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/docs/doxygen.cfg	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/docs/doxygen.cfg	(revision 1163)
@@ -0,0 +1,1011 @@
+# Doxyfile 1.3-rc3
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# by quotes) that should identify the project.
+
+PROJECT_NAME           =  "PJSIP Reference"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = docs
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch, 
+# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en 
+# (Japanese with english messages), Korean, Norwegian, Polish, Portuguese, 
+# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish and Ukrainian.
+
+OUTPUT_LANGUAGE        = English
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these class will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = YES
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = NO
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = YES
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited 
+# members of a class in the documentation of that class as if those members were 
+# ordinary class members. Constructors, destructors and assignment operators of 
+# the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. It is allowed to use relative paths in the argument list.
+
+#STRIP_FROM_PATH        = "/cygdrive/e/project/bulukucing.org/pjsip/src"
+STRIP_FROM_PATH        = "/c/project/pjproject/pjsip"
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower case letters. If set to YES upper case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# users are adviced to set this option to NO.
+
+CASE_SENSE_NAMES       = YES
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful is your file systems 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments  will behave just like the Qt-style comments (thus requiring an 
+# explict @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member 
+# documentation.
+
+DETAILS_AT_TOP         = YES
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# reimplements.
+
+INHERIT_DOCS           = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 8
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or define consist of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and defines in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources 
+# only. Doxygen will then generate output that is more tailored for C. 
+# For instance some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources 
+# only. Doxygen will then generate output that is more tailored for Java. 
+# For instance namespaces will be presented as packages, qualified scopes 
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  =  docs include 
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
+# *.h++ *.idl *.odl
+
+FILE_PATTERNS          = *.h
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE                = *_i.h
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories.
+
+EXCLUDE_PATTERNS       = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = ../pjsip-apps/src/samples ../pjsip-apps/src/pjsua
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = 
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = docs ../pjmedia/docs
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.
+
+INPUT_FILTER           = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          =  /c/project/pjproject/pjsip
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .htm
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            =  docs/header.html
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            =  docs/footer.html
+
+# The HTML_STYLESHEET tag can be used to specify a user defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet
+
+HTML_STYLESHEET        = 
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output dir.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non empty doxygen will try to run 
+# the html help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the Html help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimised for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assigments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_XML           = NO
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed.
+
+
+PREDEFINED             = PJ_DECL(x)=x PJ_DEF(x)=x PJ_IDECL(x)=x \
+			 PJ_IDEF(x)=x PJ_INLINE(x)=x
+
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse the 
+# parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tagfiles.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in Html, RTF and LaTeX) for classes with base or 
+# super classes. Setting the tag to NO turns the diagrams off. Note that this 
+# option is superceded by the HAVE_DOT option below. This is only a fallback. It is 
+# recommended to install and use dot, since it yield more powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_WIDTH    = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height 
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than 
+# this value, doxygen will try to truncate the graph, so that it fits within 
+# the specified constraint. Beware that most browsers cannot cope with very 
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT   = 1024
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermedate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = NO
+
Index: /pjproject/branches/split-3rd-party/pjsip/docs/doxygen.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/docs/doxygen.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/docs/doxygen.h	(revision 1163)
@@ -0,0 +1,311 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/**
+ * @file doxygen.h
+ * @brief PJSIP Doxygen's mainpage.
+ */
+
+/*////////////////////////////////////////////////////////////////////////// */
+/*
+	INTRODUCTION PAGE
+ */
+
+/**
+  \n
+
+  @mainpage PJSIP - Open Source SIP Stack
+
+  \n
+  \n
+  @section intro_sec Introduction
+
+  PJSIP is an Open Source SIP prototol stack, designed to be very small in 
+  footprint, have high performance, and very flexible.
+
+  @subsection hist_sec History
+
+  PJSIP has been actively developed since 2003, but its history goes well
+  beyond that. The author has been developing SIP stack since 1999 during
+  RFC 2543 era, and after several experimentation with different approaches 
+  in the programming (the first stack actually was in C++!), and also with
+  the evolution of the SIP protocol itself, the current/third generation
+  of PJSIP (the 0.2.9 version is the second generation) can be considered 
+  as pretty stable in term of design, and should
+  incorporate all design considerations (and implementation tricks!) that 
+  have been learned over the years. Of course only time will tell if this 
+  statement can still be held true in the future.
+
+
+
+
+  \n
+  \n
+  @section pjsipgetting_started Getting Started
+
+  PJSIP consists of multiple levels of APIs, which each of them layered on
+  top of another. Because of this, new readers may find it a bit difficult
+  to find the place to start.
+
+  In general, I think perhaps I can recommend two approaches on using PJSIP.
+
+
+  \n
+  @subsection getting_started_high Using PJSUA API
+
+  @ref PJSUA_LIB wraps together all SIP components and media into a high level
+  API, suitable for creating typical SIP user agent applications. It 
+  features easy to use API for:
+  - multiple client registration (accounts),
+  - high level SIP and media session (calls),
+  - buddy list, presence and instant messaging,
+  - powerful and very easy to use media manipulation,
+
+  while maintaining some space for customization (custom SIP
+  transport, custom SIP media, etc.) needed by some types of applications.
+  @ref PJSUA_LIB is also aimed to be able to run on devices such as PDA
+  or mobile phones, by carefully allowing application to set the appropriate
+  threading strategy and memory limits (number of calls, media ports, etc.).
+
+  However, @ref PJSUA_LIB may not be the most suitable API for some types
+  of applications, since it is directed towards an easy to use API. For
+  more more advanced use, you may better implement the application by using
+  PJSIP + PJMEDIA directly, as described below.
+
+
+  \n
+  @subsection getting_started_pjsip_pjmedia Using PJSIP and PJMEDIA Directly
+
+  For the ultimate flexibility and power, using PJSIP and PJMEDIA directly
+  is the way to go. The drawback will be, of course, steeper learning curve. 
+
+  However, the following links may provide some useful information:
+  - <A HREF="/docs.htm">PJSIP Developer's Guide</A> PDF
+    document is the ultimate guide to understand PJSIP design concept.
+  - there are some samples in <A HREF="/cgi-bin/viewcvs.cgi/pjproject/trunk/pjsip-apps/src/samples/">
+   <b>pjsip-apps/src/samples</b></A> directory.
+  - @ref PJSUA_LIB source code may also be useful to see how high level
+    API are implemented with PJSIP/PJMEDIA.
+  - and finally, you can always <b>Use the Source</b>!
+
+
+
+  \n
+  \n
+  @section this_doc About This Document
+
+  This document contains the reference information about PJSIP. For
+  more in-depth guide (and information in general), readers are 
+  encouraged to read the <A HREF="/docs.htm">
+  <b>PJSIP Developer's Guide</b></A> PDF document
+  which can be downloaded from http://www.pjsip.org/docs.htm.
+
+  \n
+  @subsection doc_ver Version
+
+  This document corresponds to PJSIP version 0.5.10.
+
+  \n
+  @subsection doc_how_to_read How to Read This Document
+
+  For main navigation, please go to <A HREF="modules.htm"><b>Modules</b></A>
+  link on top of this page.
+
+  This document was generated with <A HREF="http://www.doxygen.org">Doxygen</A>
+  from PJSIP header files.
+
+
+  \n
+  \n
+  @section pjsip_toc Documentation Contents
+
+  Click on <A HREF="modules.htm"><b>Modules</b></A> link on top of this page 
+  to get the detailed table of contents.
+
+  The following are top level sections in the <A HREF="modules.htm">
+  <b>Modules</b></A>, as laid out in the following diagram:
+
+  \image html pjsip-arch.jpg "Static Library Layout"
+
+  Enumerating the static libraries from the bottom:
+
+  - <A HREF="/pjlib/docs/main.htm">PJLIB</A>, is the platform abstraction
+    and framework library, on which all other libraries depend,
+
+  - PJLIB-UTIL, provides auxiliary functions such as text scanning,
+    XML, and STUN,
+
+  - PJMEDIA is the multimedia framework,
+
+  - PJMEDIA-CODEC is the placeholder for media codecs,
+
+  - @ref PJSIP_CORE (<b>PJSIP-CORE</b>) is the very core of the PJSIP library, 
+    and contains the SIP @ref PJSIP_ENDPT, which is the owner/manager for all
+    SIP objects in the application, messaging elements, parsing, transport 
+    management, module management, and stateless operations, and also
+    contains:
+
+  - The @ref PJSIP_TRANSACT module inside <b>PJSIP-CORE</b> provides 
+    stateful operation, and is the base for higher layer features such as 
+    dialogs,
+
+  - The @ref PJSIP_UA module inside <b>PJSIP-CORE</b> manages dialogs, and supports dialog
+    usages,
+
+  - @ref PJSIP_SIMPLE (<b>PJSIP-SIMPLE</b>) provides the base SIP event framework 
+    (which uses the common/base dialog framework) and implements presence 
+    on top of it, and is also used by call transfer functions,
+
+  - @ref PJSIP_HIGH_UA (<b>PJSIP-UA</b>) is the high level abstraction of INVITE sessions
+    (using the common/base dialog framework). This library also provides
+    SIP client registration and call transfer functionality,
+
+  - and finally, @ref PJSUA_LIB (<b>PJSUA-LIB</b>) is the highest level of abstraction, 
+    which wraps together all above functionalities into high level, easy to
+    use API.
+*/
+
+
+/**
+ @page page_pjsip_samples PJSIP Samples
+
+ I wish I could write more samples, but for now here are some samples or
+ working applications that are available from the source tree:
+
+  - @ref page_pjsip_sample_sipstateless_c\n
+    This is about the simplest SIP application with PJSIP, all it does is
+    respond all incoming requests with 501 (Not Implemented) response
+    statelessly.
+
+  - @ref page_pjsip_sample_simple_ua_c\n
+    This is a very simple SIP User Agent application that only use PJSIP
+    (without PJSIP-UA). It's able to make and receive call, and play
+    media to the sound device.
+    
+  - @ref page_pjsip_sample_simple_pjsuaua_c\n
+    Very simple SIP User Agent with registration, call, and media, using
+    PJSUA-API, all in under 200 lines of code.
+
+  - @ref page_pjsip_samples_pjsua\n
+    This is the reference implementation for PJSIP and PJMEDIA.
+    PJSUA is a console based application, designed to be simple enough
+    to be readble, but powerful enough to demonstrate all features
+    available in PJSIP and PJMEDIA.\n
+    Screenshot on WinXP: \image html pjsua.jpg "pjsua on WinXP"
+
+  - @ref page_pjmedia_samples_siprtp_c\n
+    This is a useful program (integrated with PJSIP) to actively measure 
+    the network quality/impairment parameters by making one or more SIP 
+    calls (or receiving one or more SIP calls) and display the network
+    impairment of each stream direction at the end of the call.
+    The program is able to measure network quality parameters such as
+    jitter, packet lost/reorder/duplicate, round trip time, etc.\n
+    Note that the remote peer MUST support RTCP so that network quality
+    of each direction can be calculated. Using siprtp for both endpoints
+    is recommended.\n
+    Screenshots on WinXP: \image html siprtp.jpg "siprtp screenshot on WinXP"
+
+  - @ref page_pjsip_perf_c\n
+    This sample contains a complete implementation of a SIP performance
+    measurement tool. Unlike other tool such SIPp, pjsip-perf is geared
+    more towards finding the performance of an endpoint by flooding the
+    endpoint with some requests and time the completion of the requests.\n
+    Screenshots on Linux console: \image html pjsip-perf.jpg "pjsip-perf screenshot on Linux"
+ */
+
+/**
+ * \page page_pjsip_samples_pjsua PJSUA
+ *
+ * This is the reference implementation for PJSIP and PJMEDIA.
+ * PJSUA is a console based application, designed to be simple enough
+ * to be readble, but powerful enough to demonstrate all features
+ * available in PJSIP and PJMEDIA.
+ *
+ * This file is pjsip-apps/src/pjsua/pjsua_app.c
+ *
+ * Screenshot on WinXP: \image html pjsua.jpg "pjsua on WinXP"
+ *
+ * \includelineno pjsua_app.c
+ */
+
+/**
+ * \page page_pjsip_sample_simple_ua_c Samples: Simple UA
+ *
+ * This is a very simple SIP User Agent application that only use PJSIP
+ * (without PJSIP-UA). It's able to make and receive call, and play
+ * media to the sound device.
+ *
+ * \includelineno simpleua.c
+ */
+
+/**
+ * \page page_pjsip_sample_simple_pjsuaua_c Samples: Simple PJSUA
+ *
+ * Very simple SIP User Agent with registration, call, and media, all
+ * in under 200 lines of code.
+ *
+ * \includelineno simple_pjsua.c
+ */
+
+/**
+ * \page page_pjsip_sample_sipstateless_c Samples: Stateless SIP Endpoint
+ *
+ * This is about the simplest SIP application with PJSIP, all it does is
+ * respond all incoming requests with 501 (Not Implemented) response
+ * statelessly.
+ *
+ * \includelineno sipstateless.c
+ */
+
+/**
+ * \page page_pjmedia_samples_siprtp_c Samples: siprtp - SIP with RTCP Quality Monitoring
+ *
+ * This source is an example to demonstrate using SIP and RTP/RTCP framework
+ * to measure the network quality/impairment from the SIP call. This
+ * program can be used to make calls or to receive calls from other
+ * SIP endpoint (or other siprtp program), and to display the media
+ * quality statistics at the end of the call.
+ *
+ * Note that the remote peer must support RTCP.
+ *
+ * The layout of the program has been designed so that custom reporting
+ * can be generated instead of plain human readable text.
+ *
+ * The source code of the file is pjsip-apps/src/samples/siprtp.c
+ *
+ * Screenshots on WinXP: \image html siprtp.jpg
+ *
+ * \includelineno siprtp.c
+ */
+
+/**
+ * \page page_pjsip_perf_c Samples: pjsip-perf - SIP Performance Benchmarking Tool
+ *
+ * This sample contains a complete implementation of a SIP performance
+ * measurement tool. Unlike other tool such SIPp, pjsip-perf is geared
+ * more towards finding the performance of an endpoint by flooding the
+ * endpoint with some requests and time the completion of the requests.
+ *
+ * The source code of the file is pjsip-apps/src/samples/pjsip-perf.c
+ *
+ * Screenshots on Linux console: \image html pjsip-perf.jpg
+ *
+ * \includelineno pjsip-perf.c
+ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/docs/footer.html
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/docs/footer.html	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/docs/footer.html	(revision 1163)
@@ -0,0 +1,9 @@
+<p>&nbsp;</p>
+<hr><center>
+PJSIP Open Source, high performance, small footprint, and very very portable SIP stack<br>
+(C)2003-2007 Benny Prijono
+</center>
+<!--#include virtual="/footer.html" -->
+
+</BODY>
+</HTML>
Index: /pjproject/branches/split-3rd-party/pjsip/docs/header.html
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/docs/header.html	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/docs/header.html	(revision 1163)
@@ -0,0 +1,8 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>$title</title>
+<link href="/style/style.css" rel="stylesheet" type="text/css">
+</head><body>
+	<!--#include virtual="/header.html" -->
+	<p><A HREF="/">Home</A> --&gt; <A HREF="/docs.htm">Documentations</A> --&gt; PJSIP Reference</p>
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/errno.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/errno.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/errno.h	(revision 1163)
@@ -0,0 +1,92 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIMPLE_ERRNO_H__
+#define __PJSIP_SIMPLE_ERRNO_H__
+
+
+#include <pjsip/sip_errno.h>
+
+/**
+ * Start of error code relative to PJ_ERRNO_START_USER.
+ */
+#define PJSIP_SIMPLE_ERRNO_START  (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*2)
+
+
+/************************************************************
+ * EVENT PACKAGE ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * No event package with the specified name.
+ */
+#define PJSIP_SIMPLE_ENOPKG	    (PJSIP_SIMPLE_ERRNO_START+1)    /*270001*/
+/**
+ * @hideinitializer
+ * Event package already exists.
+ */
+#define PJSIP_SIMPLE_EPKGEXISTS	    (PJSIP_SIMPLE_ERRNO_START+2)    /*270002*/
+
+
+/************************************************************
+ * PRESENCE ERROR
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Expecting SUBSCRIBE request
+ */
+#define PJSIP_SIMPLE_ENOTSUBSCRIBE  (PJSIP_SIMPLE_ERRNO_START+20)   /*270020*/
+/**
+ * @hideinitializer
+ * No presence associated with subscription
+ */
+#define PJSIP_SIMPLE_ENOPRESENCE    (PJSIP_SIMPLE_ERRNO_START+21)   /*270021*/
+/**
+ * @hideinitializer
+ * No presence info in server subscription
+ */
+#define PJSIP_SIMPLE_ENOPRESENCEINFO (PJSIP_SIMPLE_ERRNO_START+22)  /*270022*/
+/**
+ * @hideinitializer
+ * Bad Content-Type
+ */
+#define PJSIP_SIMPLE_EBADCONTENT    (PJSIP_SIMPLE_ERRNO_START+23)   /*270023*/
+/**
+ * @hideinitializer
+ * Bad PIDF Message
+ */
+#define PJSIP_SIMPLE_EBADPIDF	    (PJSIP_SIMPLE_ERRNO_START+24)   /*270024*/
+/**
+ * @hideinitializer
+ * Bad XPIDF Message
+ */
+#define PJSIP_SIMPLE_EBADXPIDF	    (PJSIP_SIMPLE_ERRNO_START+25)   /*270025*/
+
+
+/************************************************************
+ * ISCOMPOSING ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Bad isComposing XML message.
+ */
+#define PJSIP_SIMPLE_EBADISCOMPOSE  (PJSIP_SIMPLE_ERRNO_START+40)   /*270040*/
+
+
+#endif	/* __PJSIP_SIMPLE_ERRNO_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/evsub.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/evsub.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/evsub.h	(revision 1163)
@@ -0,0 +1,471 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIMPLE_EVSUB_H__
+#define __PJSIP_SIMPLE_EVSUB_H__
+
+/**
+ * @file event_notify.h
+ * @brief SIP Specific Event Notification Extension (RFC 3265)
+ */
+
+#include <pjsip-simple/types.h>
+
+
+/**
+ * @defgroup PJSIP_EVENT_NOT SIP Event Notification (RFC 3265) Module
+ * @ingroup PJSIP_SIMPLE
+ * @brief Core Event Subscription framework, used by presence, call transfer, etc.
+ * @{
+ *
+ * This module provides the implementation of SIP Extension for SIP Specific
+ * Event Notification (RFC 3265). It extends PJSIP by supporting SUBSCRIBE and
+ * NOTIFY methods.
+ *
+ * This module itself is extensible; new event packages can be registered to
+ * this module to handle specific extensions (such as presence).
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Opaque type for event subscription session.
+ */
+typedef struct pjsip_evsub pjsip_evsub;
+
+
+/**
+ * This enumeration describes basic subscription state as described in the 
+ * RFC 3265. The standard specifies that extensions may define additional 
+ * states. In the case where the state is not known, the subscription state
+ * will be set to PJSIP_EVSUB_STATE_UNKNOWN, and the token will be kept
+ * in state_str member of the susbcription structure.
+ */
+enum pjsip_evsub_state
+{
+    PJSIP_EVSUB_STATE_NULL,	 /**< State is NULL.			    */
+    PJSIP_EVSUB_STATE_SENT,	 /**< Client has sent SUBSCRIBE request.    */
+    PJSIP_EVSUB_STATE_ACCEPTED,	 /**< 2xx response to SUBSCRIBE has been 
+				      sent/received.			    */
+    PJSIP_EVSUB_STATE_PENDING,	 /**< Subscription is pending.		    */
+    PJSIP_EVSUB_STATE_ACTIVE,	 /**< Subscription is active.		    */
+    PJSIP_EVSUB_STATE_TERMINATED,/**< Subscription is terminated.	    */
+    PJSIP_EVSUB_STATE_UNKNOWN,	 /**< Subscription state can not be determined.
+				      Application can query the state by 
+				      calling #pjsip_evsub_get_state_name().*/
+};
+
+/**
+ * @see pjsip_evsub_state
+ */
+typedef enum pjsip_evsub_state pjsip_evsub_state;
+
+
+/**
+ * Some options for the event subscription.
+ */
+enum
+{
+    /** 
+     * If this flag is set, then outgoing request to create subscription
+     * will not have id in the Event header (e.g. in REFER request). But if 
+     * there is an id in the incoming NOTIFY, that id will be used.
+     */
+    PJSIP_EVSUB_NO_EVENT_ID  = 1,
+};
+
+
+/**
+ * This structure describes callback that is registered by application or
+ * package to receive notifications about subscription events.
+ */
+struct pjsip_evsub_user
+{
+    /**
+     * This callback is called when subscription state has changed.
+     * Application MUST be prepared to receive NULL event and events with
+     * type other than PJSIP_EVENT_TSX_STATE
+     *
+     * This callback is OPTIONAL.
+     *
+     * @param sub	The subscription instance.
+     * @param event	The event that has caused the state to change,
+     *			which may be NULL or may have type other than
+     *			PJSIP_EVENT_TSX_STATE.
+     */
+    void (*on_evsub_state)( pjsip_evsub *sub, pjsip_event *event);
+
+    /**
+     * This callback is called when transaction state has changed.
+     *
+     * @param sub	The subscription instance.
+     * @param tsx	Transaction.
+     * @param event	The event.
+     */
+    void (*on_tsx_state)(pjsip_evsub *sub, pjsip_transaction *tsx,
+			 pjsip_event *event);
+
+    /**
+     * This callback is called when incoming SUBSCRIBE (or any method that
+     * establishes the subscription in the first place) is received. It 
+     * allows application to specify what response should be sent to 
+     * remote, along with additional headers and message body to be put 
+     * in the response.
+     *
+     * This callback is OPTIONAL.
+     *
+     * However, implementation MUST send NOTIFY request upon receiving this
+     * callback. The suggested behavior is to call 
+     * #pjsip_evsub_last_notify(), since this function takes care
+     * about unsubscription request and calculates the appropriate expiration
+     * interval.
+     */
+    void (*on_rx_refresh)( pjsip_evsub *sub, 
+			   pjsip_rx_data *rdata,
+			   int *p_st_code,
+			   pj_str_t **p_st_text,
+			   pjsip_hdr *res_hdr,
+			   pjsip_msg_body **p_body);
+
+    /**
+     * This callback is called when client/subscriber received incoming
+     * NOTIFY request. It allows the application to specify what response
+     * should be sent to remote, along with additional headers and message
+     * body to be put in the response.
+     *
+     * This callback is OPTIONAL. When it is not implemented, the default
+     * behavior is to respond incoming NOTIFY request with 200 (OK).
+     *
+     * @param sub	The subscription instance.
+     * @param rdata	The received NOTIFY request.
+     * @param p_st_code	Application MUST set the value of this argument with
+     *			final status code (200-699) upon returning from the
+     *			callback.
+     * @param p_st_text	Custom status text, if any.
+     * @param res_hdr	Upon return, application can put additional headers 
+     *			to be sent in the response in this list.
+     * @param p_body	Application MAY specify message body to be sent in
+     *			the response.
+     */
+    void (*on_rx_notify)(pjsip_evsub *sub, 
+			 pjsip_rx_data *rdata,
+			 int *p_st_code,
+			 pj_str_t **p_st_text,
+			 pjsip_hdr *res_hdr,
+			 pjsip_msg_body **p_body);
+
+    /**
+     * This callback is called when it is time for the client to refresh
+     * the subscription.
+     *
+     * This callback is OPTIONAL when PJSIP package such as presence or 
+     * refer is used; the event package will refresh subscription by sending
+     * SUBSCRIBE with the interval set to current/last interval.
+     *
+     * @param sub	The subscription instance.
+     */
+    void (*on_client_refresh)(pjsip_evsub *sub);
+
+    /**
+     * This callback is called when server doesn't receive subscription 
+     * refresh after the specified subscription interval.
+     *
+     * This callback is OPTIONAL when PJSIP package such as presence or 
+     * refer is used; the event package send NOTIFY to terminate the 
+     * subscription.
+     */
+    void (*on_server_timeout)(pjsip_evsub *sub);
+
+};
+
+
+/**
+ * @see pjsip_evsub_user
+ */
+typedef struct pjsip_evsub_user pjsip_evsub_user;
+
+
+/**
+ * SUBSCRIBE method constant.
+ */
+extern const pjsip_method pjsip_subscribe_method;
+
+/**
+ * NOTIFY method constant.
+ */
+extern const pjsip_method pjsip_notify_method;
+
+
+
+/**
+ * Initialize the event subscription module and register the module to the 
+ * specified endpoint.
+ *
+ * @param endpt		The endpoint instance.
+ *
+ * @return		PJ_SUCCESS if module can be created and registered
+ *			successfully.
+ */
+PJ_DECL(pj_status_t) pjsip_evsub_init_module(pjsip_endpoint *endpt);
+
+
+/**
+ * Get the event subscription module instance that was previously created 
+ * and registered to endpoint.
+ *
+ * @return		The event subscription module instance.
+ */
+PJ_DECL(pjsip_module*) pjsip_evsub_instance(void);
+
+
+/**
+ * Register event package to the event subscription framework.
+ *
+ * @param pkg_mod	The module that implements the event package being
+ *			registered.
+ * @param event_name	Event package identification.
+ * @param expires	Default subscription expiration time, in seconds.
+ * @param accept_cnt	Number of strings in Accept array.
+ * @param accept	Array of Accept value.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_evsub_register_pkg( pjsip_module *pkg_mod,
+					       const pj_str_t *event_name,
+					       unsigned expires,
+					       unsigned accept_cnt,
+					       const pj_str_t accept[]);
+
+/**
+ * Get the Allow-Events header. This header is built based on the packages
+ * that are registered to the evsub module.
+ *
+ * @param m		Pointer to event subscription module instance, or
+ *			NULL to use default instance (equal to 
+ *			#pjsip_evsub_instance()).
+ *
+ * @return		The Allow-Events header.
+ */
+PJ_DECL(const pjsip_hdr*) pjsip_evsub_get_allow_events_hdr(pjsip_module *m);
+
+
+/**
+ * Create client subscription session.
+ *
+ * @param dlg		The underlying dialog to use.
+ * @param user_cb	Callback to receive event subscription notifications.
+ * @param event		Event name.
+ * @param option	Bitmask of options.
+ * @param p_evsub	Pointer to receive event subscription instance.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_evsub_create_uac( pjsip_dialog *dlg,
+					     const pjsip_evsub_user *user_cb,
+					     const pj_str_t *event,
+					     unsigned option,
+					     pjsip_evsub **p_evsub);
+
+/**
+ * Create server subscription session.
+ *
+ * @param dlg		The underlying dialog to use.
+ * @param user_cb	Callback to receive event subscription notifications.
+ * @param rdata		The incoming request that creates the event 
+ *			subscription, such as SUBSCRIBE or REFER.
+ * @param option	Bitmask of options.
+ * @param p_evsub	Pointer to receive event subscription instance.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_evsub_create_uas( pjsip_dialog *dlg,
+					     const pjsip_evsub_user *user_cb,
+					     pjsip_rx_data *rdata,
+					     unsigned option,
+					     pjsip_evsub **p_evsub);
+
+/**
+ * Forcefully destroy the subscription session. This function should only
+ * be called on special condition, such as when the subscription 
+ * initialization has failed. For other conditions, application MUST terminate
+ * the subscription by sending the appropriate un(SUBSCRIBE) or NOTIFY.
+ *
+ * @param sub		The event subscription.
+ * @param notify	Specify whether the state notification callback
+ *			should be called.
+ *
+ * @return		PJ_SUCCESS if subscription session has been destroyed.
+ */
+PJ_DECL(pj_status_t) pjsip_evsub_terminate( pjsip_evsub *sub,
+					    pj_bool_t notify );
+
+
+/**
+ * Get subscription state.
+ *
+ * @param sub		Event subscription instance.
+ *
+ * @return		Subscription state.
+ */
+PJ_DECL(pjsip_evsub_state) pjsip_evsub_get_state(pjsip_evsub *sub);
+
+
+/**
+ * Get the string representation of the subscription state.
+ *
+ * @param sub		Event subscription instance.
+ *
+ * @return		NULL terminated string.
+ */
+PJ_DECL(const char*) pjsip_evsub_get_state_name(pjsip_evsub *sub);
+
+
+/**
+ * Call this function to create request to initiate subscription, to 
+ * refresh subcription, or to request subscription termination.
+ *
+ * @param sub		Client subscription instance.
+ * @param method	The method that establishes the subscription, such as
+ *			SUBSCRIBE or REFER. If this argument is NULL, then
+ *			SUBSCRIBE will be used.
+ * @param expires	Subscription expiration. If the value is set to zero,
+ *			this will request unsubscription. If the value is
+ *			negative, default expiration as defined by the package
+ *			will be used.
+ * @param p_tdata	Pointer to receive the request.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_evsub_initiate( pjsip_evsub *sub,
+					   const pjsip_method *method,
+					   pj_int32_t expires,
+					   pjsip_tx_data **p_tdata);
+
+
+/**
+ * Accept the incoming subscription request by sending 2xx response to
+ * incoming SUBSCRIBE request.
+ *
+ * @param sub		Server subscription instance.
+ * @param rdata		The incoming subscription request message.
+ * @param st_code	Status code, which MUST be final response.
+ * @param hdr_list	Optional list of headers to be added in the response.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_evsub_accept( pjsip_evsub *sub,
+					 pjsip_rx_data *rdata,
+				         int st_code,
+					 const pjsip_hdr *hdr_list );
+
+
+/**
+ * For notifier, create NOTIFY request to subscriber, and set the state 
+ * of the subscription.
+ *
+ * @param sub		The server subscription (notifier) instance.
+ * @param state		New state to set.
+ * @param state_str	The state string name, if state contains value other
+ *			than active, pending, or terminated. Otherwise this
+ *			argument is ignored.
+ * @param reason	Specify reason if new state is terminated, otherwise
+ *			put NULL.
+ * @param p_tdata	Pointer to receive request message.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_evsub_notify( pjsip_evsub *sub,
+					 pjsip_evsub_state state,
+					 const pj_str_t *state_str,
+					 const pj_str_t *reason,
+					 pjsip_tx_data **p_tdata);
+
+
+/**
+ * For notifier, create a NOTIFY request that reflects current subscription
+ * status.
+ *
+ * @param sub		The server subscription instance.
+ * @param p_tdata	Pointer to receive the request messge.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_evsub_current_notify( pjsip_evsub *sub,
+						 pjsip_tx_data **p_tdata );
+
+
+
+/**
+ * Send request message that was previously created with initiate(), notify(),
+ * or current_notify(). Application may also send request created with other
+ * functions, e.g. authentication. But the request MUST be either request
+ * that creates/refresh subscription or NOTIFY request.
+ *
+ * @param sub		The event subscription object.
+ * @param tdata		Request message to be send.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_evsub_send_request( pjsip_evsub *sub,
+					       pjsip_tx_data *tdata);
+
+
+
+/**
+ * Get the event subscription instance associated with the specified 
+ * transaction.
+ *
+ * @param tsx		The transaction.
+ *
+ * @return		The event subscription instance registered in the
+ *			transaction, if any.
+ */
+PJ_DECL(pjsip_evsub*) pjsip_tsx_get_evsub(pjsip_transaction *tsx);
+
+
+/**
+ * Set event subscription's module data.
+ *
+ * @param sub		The event subscription.
+ * @param mod_id	The module id.
+ * @param data		Arbitrary data.
+ */
+PJ_DECL(void) pjsip_evsub_set_mod_data( pjsip_evsub *sub, unsigned mod_id,
+				        void *data );
+
+
+/**
+ * Get event subscription's module data.
+ *
+ * @param sub		The event subscription.
+ * @param mod_id	The module id.
+ *
+ * @return		Data previously set at the specified id.
+ */
+PJ_DECL(void*) pjsip_evsub_get_mod_data( pjsip_evsub *sub, unsigned mod_id );
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* __PJSIP_SIMPLE_EVSUB_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/evsub_msg.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/evsub_msg.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/evsub_msg.h	(revision 1163)
@@ -0,0 +1,118 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIMPLE_EVENT_NOTIFY_MSG_H__
+#define __PJSIP_SIMPLE_EVENT_NOTIFY_MSG_H__
+
+/**
+ * @file event_notify_msg.h
+ * @brief SIP Event Notification Headers (RFC 3265)
+ */
+#include <pjsip/sip_msg.h>
+
+/**
+ * @defgroup PJSIP_EVENT_HDRS Additional Header Fields
+ * @ingroup PJSIP_EVENT_NOT
+ * @{
+ */
+
+PJ_BEGIN_DECL
+
+
+/** Max events in Allow-Events header. */
+#define PJSIP_MAX_ALLOW_EVENTS	16
+
+/**
+ * This structure describes Event header.
+ */
+typedef struct pjsip_event_hdr
+{
+    /** Standard header fields. */
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_event_hdr);
+
+    pj_str_t	    event_type;	    /**< Event name. */
+    pj_str_t	    id_param;	    /**< Optional event ID parameter. */
+    pjsip_param	    other_param;    /**< Other parameter. */
+} pjsip_event_hdr;
+
+/**
+ * Create an Event header.
+ *
+ * @param pool	    The pool.
+ *
+ * @return	    New Event header instance.
+ */
+PJ_DECL(pjsip_event_hdr*) pjsip_event_hdr_create(pj_pool_t *pool);
+
+
+/**
+ * This structure describes Allow-Events header.
+ */
+typedef pjsip_generic_array_hdr pjsip_allow_events_hdr;
+
+
+/**
+ * Create a new Allow-Events header.
+ *
+ * @param pool	    The pool.
+ *
+ * @return	    Allow-Events header.
+ */
+PJ_DECL(pjsip_allow_events_hdr*) 
+pjsip_allow_events_hdr_create(pj_pool_t *pool);
+
+
+/**
+ * This structure describes Subscription-State header.
+ */
+typedef struct pjsip_sub_state_hdr
+{
+    /** Standard header fields. */
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_sub_state_hdr);
+
+    pj_str_t	    sub_state;		/**< Subscription state. */
+    pj_str_t	    reason_param;	/**< Optional termination reason. */
+    int		    expires_param;	/**< Expires param, or -1. */
+    int		    retry_after;	/**< Retry after param, or -1. */
+    pjsip_param	    other_param;	/**< Other parameters. */
+} pjsip_sub_state_hdr;
+
+/**
+ * Create new Subscription-State header.
+ *
+ * @param pool	    The pool.
+ *
+ * @return	    Subscription-State header.
+ */
+PJ_DECL(pjsip_sub_state_hdr*) pjsip_sub_state_hdr_create(pj_pool_t *pool);
+
+/**
+ * Initialize parser for event notify module.
+ */
+PJ_DEF(void) pjsip_evsub_init_parser(void);
+
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+#endif	/* __PJSIP_SIMPLE_EVENT_NOTIFY_MSG_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/iscomposing.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/iscomposing.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/iscomposing.h	(revision 1163)
@@ -0,0 +1,134 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIMPLE_ISCOMPOSING_H__
+#define __PJSIP_SIMPLE_ISCOMPOSING_H__
+
+/**
+ * @file iscomposing.h
+ * @brief Support for Indication of Message Composition (RFC 3994)
+ */
+#include <pjsip-simple/types.h>
+#include <pjlib-util/xml.h>
+
+/**
+ * @defgroup PJSIP_ISCOMPOSING Message Composition Indication (RFC 3994)
+ * @ingroup PJSIP_SIMPLE
+ * @brief Support for Indication of Message Composition (RFC 3994)
+ * @{
+ *
+ * This implements message composition indication, as described in
+ * RFC 3994.
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Create XML message with MIME type "application/im-iscomposing+xml"
+ * to indicate the message composition status.
+ *
+ * @param pool		    Pool to allocate memory.
+ * @param is_composing	    Message composition indication status. Set to
+ *			    PJ_TRUE (or non-zero) to indicate that application
+ *			    is currently composing an instant message.
+ * @param lst_actv	    Optional attribute to indicate time of last
+ *			    activity. If none is to be specified, the value
+ *			    MUST be set to NULL.
+ * @param content_tp	    Optional attribute to indicate the content type of
+ *			    message being composed. If none is to be specified, 
+ *			    the value MUST be set to NULL.
+ * @param refresh	    Optional attribute to indicate the interval when
+ *			    next indication will be sent, only when 
+ *			    is_composing is non-zero. If none is to be 
+ *			    specified, the value MUST be set to -1.
+ *
+ * @return		    An XML message containing the message indication.
+ *			    NULL will be returned when there's not enough
+ *			    memory to allocate the message.
+ */
+PJ_DECL(pj_xml_node*) pjsip_iscomposing_create_xml(pj_pool_t *pool,
+						   pj_bool_t is_composing,
+						   const pj_time_val *lst_actv,
+						   const pj_str_t *content_tp,
+						   int refresh);
+
+
+/**
+ * Create message body with Content-Type "application/im-iscomposing+xml"
+ * to indicate the message composition status.
+ *
+ * @param pool		    Pool to allocate memory.
+ * @param is_composing	    Message composition indication status. Set to
+ *			    PJ_TRUE (or non-zero) to indicate that application
+ *			    is currently composing an instant message.
+ * @param lst_actv	    Optional attribute to indicate time of last
+ *			    activity. If none is to be specified, the value
+ *			    MUST be set to NULL.
+ * @param content_tp	    Optional attribute to indicate the content type of
+ *			    message being composed. If none is to be specified, 
+ *			    the value MUST be set to NULL.
+ * @param refresh	    Optional attribute to indicate the interval when
+ *			    next indication will be sent, only when 
+ *			    is_composing is non-zero. If none is to be 
+ *			    specified, the value MUST be set to -1.
+ *
+ * @return		    The SIP message body containing XML message 
+ *			    indication. NULL will be returned when there's not
+ *			    enough memory to allocate the message.
+ */
+PJ_DECL(pjsip_msg_body*) pjsip_iscomposing_create_body( pj_pool_t *pool,
+						   pj_bool_t is_composing,
+						   const pj_time_val *lst_actv,
+						   const pj_str_t *content_tp,
+						   int refresh);
+
+
+/**
+ * Parse the buffer and return message composition indication in the 
+ * message.
+ *
+ * @param pool		    Pool to allocate memory for the parsing process.
+ * @param msg		    The message to be parsed.
+ * @param len		    Length of the message.
+ * @param p_is_composing    Optional pointer to receive iscomposing status.
+ * @param p_last_active	    Optional pointer to receive last active attribute.
+ * @param p_content_type    Optional pointer to receive content type attribute.
+ * @param p_refresh	    Optional pointer to receive refresh time.
+ *
+ * @return		    PJ_SUCCESS if message can be successfully parsed.
+ */
+PJ_DECL(pj_status_t) pjsip_iscomposing_parse( pj_pool_t *pool,
+					      char *msg,
+					      pj_size_t len,
+					      pj_bool_t *p_is_composing,
+					      pj_str_t **p_last_active,
+					      pj_str_t **p_content_type,
+					      int *p_refresh );
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJSIP_SIMPLE_ISCOMPOSING_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/pidf.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/pidf.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/pidf.h	(revision 1163)
@@ -0,0 +1,177 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIMPLE_PIDF_H__
+#define __PJSIP_SIMPLE_PIDF_H__
+
+/**
+ * @file pidf.h
+ * @brief PIDF/Presence Information Data Format (RFC 3863)
+ */
+#include <pjsip-simple/types.h>
+#include <pjlib-util/xml.h>
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJSIP_SIMPLE_PIDF PIDF/Presence Information Data Format (RFC 3863)
+ * @ingroup PJSIP_SIMPLE
+ * @brief Support for PIDF/Presence Information Data Format (RFC 3863)
+ * @{
+ *
+ * This file provides tools for manipulating Presence Information Data 
+ * Format (PIDF) as described in RFC 3863.
+ */
+typedef struct pj_xml_node pjpidf_pres;
+typedef struct pj_xml_node pjpidf_tuple;
+typedef struct pj_xml_node pjpidf_status;
+typedef struct pj_xml_node pjpidf_note;
+
+typedef struct pjpidf_status_op
+{
+    void	    (*construct)(pj_pool_t*, pjpidf_status*);
+    pj_bool_t	    (*is_basic_open)(const pjpidf_status*);
+    void	    (*set_basic_open)(pjpidf_status*, pj_bool_t);
+} pjpidf_status_op;
+
+typedef struct pjpidf_tuple_op
+{
+    void	    (*construct)(pj_pool_t*, pjpidf_tuple*, const pj_str_t*);
+
+    const pj_str_t* (*get_id)(const pjpidf_tuple* );
+    void	    (*set_id)(pj_pool_t*, pjpidf_tuple *, const pj_str_t*);
+
+    pjpidf_status*  (*get_status)(pjpidf_tuple* );
+
+    const pj_str_t* (*get_contact)(const pjpidf_tuple*);
+    void	    (*set_contact)(pj_pool_t*, pjpidf_tuple*, const pj_str_t*);
+    void	    (*set_contact_prio)(pj_pool_t*, pjpidf_tuple*, const pj_str_t*);
+    const pj_str_t* (*get_contact_prio)(const pjpidf_tuple*);
+
+    pjpidf_note*    (*add_note)(pj_pool_t*, pjpidf_tuple*, const pj_str_t*);
+    pjpidf_note*    (*get_first_note)(pjpidf_tuple*);
+    pjpidf_note*    (*get_next_note)(pjpidf_tuple*, pjpidf_note*);
+
+    const pj_str_t* (*get_timestamp)(const pjpidf_tuple*);
+    void	    (*set_timestamp)(pj_pool_t*, pjpidf_tuple*, const pj_str_t*);
+    void	    (*set_timestamp_np)(pj_pool_t*,pjpidf_tuple*, pj_str_t*);
+
+} pjpidf_tuple_op;
+
+typedef struct pjpidf_pres_op
+{
+    void	    (*construct)(pj_pool_t*, pjpidf_pres*, const pj_str_t*);
+
+    pjpidf_tuple*   (*add_tuple)(pj_pool_t*, pjpidf_pres*, const pj_str_t*);
+    pjpidf_tuple*   (*get_first_tuple)(pjpidf_pres*);
+    pjpidf_tuple*   (*get_next_tuple)(pjpidf_pres*, pjpidf_tuple*);
+    pjpidf_tuple*   (*find_tuple)(pjpidf_pres*, const pj_str_t*);
+    void	    (*remove_tuple)(pjpidf_pres*, pjpidf_tuple*);
+
+    pjpidf_note*    (*add_note)(pj_pool_t*, pjpidf_pres*, const pj_str_t*);
+    pjpidf_note*    (*get_first_note)(pjpidf_pres*);
+    pjpidf_note*    (*get_next_note)(pjpidf_pres*, pjpidf_note*);
+
+} pjpidf_pres_op;
+
+
+extern struct pjpidf_op_desc
+{
+    pjpidf_pres_op	pres;
+    pjpidf_tuple_op	tuple;
+    pjpidf_status_op	status;
+} pjpidf_op;
+
+
+/******************************************************************************
+ * Top level API for managing presence document. 
+ *****************************************************************************/
+PJ_DECL(pjpidf_pres*)    pjpidf_create(pj_pool_t *pool, const pj_str_t *entity);
+PJ_DECL(pjpidf_pres*)	 pjpidf_parse(pj_pool_t *pool, char *text, int len);
+PJ_DECL(int)		 pjpidf_print(const pjpidf_pres* pres, char *buf, int len);
+
+
+/******************************************************************************
+ * API for managing Presence node.
+ *****************************************************************************/
+PJ_DECL(void)		 pjpidf_pres_construct(pj_pool_t *pool, pjpidf_pres *pres,
+					       const pj_str_t *entity);
+PJ_DECL(pjpidf_tuple*)	 pjpidf_pres_add_tuple(pj_pool_t *pool, pjpidf_pres *pres, 
+					       const pj_str_t *id);
+PJ_DECL(pjpidf_tuple*)	 pjpidf_pres_get_first_tuple(pjpidf_pres *pres);
+PJ_DECL(pjpidf_tuple*)	 pjpidf_pres_get_next_tuple(pjpidf_pres *pres, 
+						    pjpidf_tuple *t);
+PJ_DECL(pjpidf_tuple*)	 pjpidf_pres_find_tuple(pjpidf_pres *pres, 
+						const pj_str_t *id);
+PJ_DECL(void)		 pjpidf_pres_remove_tuple(pjpidf_pres *pres, 
+						  pjpidf_tuple*);
+
+PJ_DECL(pjpidf_note*)	 pjpidf_pres_add_note(pj_pool_t *pool, pjpidf_pres *pres, 
+					      const pj_str_t *text);
+PJ_DECL(pjpidf_note*)	 pjpidf_pres_get_first_note(pjpidf_pres *pres);
+PJ_DECL(pjpidf_note*)	 pjpidf_pres_get_next_note(pjpidf_pres*, pjpidf_note*);
+
+
+/******************************************************************************
+ * API for managing Tuple node.
+ *****************************************************************************/
+PJ_DECL(void)		 pjpidf_tuple_construct(pj_pool_t *pool, pjpidf_tuple *t,
+						const pj_str_t *id);
+PJ_DECL(const pj_str_t*) pjpidf_tuple_get_id(const pjpidf_tuple *t );
+PJ_DECL(void)		 pjpidf_tuple_set_id(pj_pool_t *pool, pjpidf_tuple *t, 
+					     const pj_str_t *id);
+
+PJ_DECL(pjpidf_status*)  pjpidf_tuple_get_status(pjpidf_tuple *t);
+
+PJ_DECL(const pj_str_t*) pjpidf_tuple_get_contact(const pjpidf_tuple *t);
+PJ_DECL(void)		 pjpidf_tuple_set_contact(pj_pool_t *pool, pjpidf_tuple *t, 
+						  const pj_str_t *contact);
+PJ_DECL(void)		 pjpidf_tuple_set_contact_prio(pj_pool_t *pool, pjpidf_tuple *t, 
+						       const pj_str_t *prio);
+PJ_DECL(const pj_str_t*) pjpidf_tuple_get_contact_prio(const pjpidf_tuple *t);
+
+PJ_DECL(pjpidf_note*)	 pjpidf_tuple_add_note(pj_pool_t *pool, pjpidf_tuple *t,
+					       const pj_str_t *text);
+PJ_DECL(pjpidf_note*)	 pjpidf_tuple_get_first_note(pjpidf_tuple *t);
+PJ_DECL(pjpidf_note*)	 pjpidf_tuple_get_next_note(pjpidf_tuple *t, pjpidf_note *n);
+
+PJ_DECL(const pj_str_t*) pjpidf_tuple_get_timestamp(const pjpidf_tuple *t);
+PJ_DECL(void)		 pjpidf_tuple_set_timestamp(pj_pool_t *pool, pjpidf_tuple *t,
+						    const pj_str_t *ts);
+PJ_DECL(void)		 pjpidf_tuple_set_timestamp_np(	pj_pool_t*, pjpidf_tuple *t,
+							pj_str_t *ts);
+
+
+/******************************************************************************
+ * API for managing Status node.
+ *****************************************************************************/
+PJ_DECL(void)		 pjpidf_status_construct(pj_pool_t*, pjpidf_status*);
+PJ_DECL(pj_bool_t)	 pjpidf_status_is_basic_open(const pjpidf_status*);
+PJ_DECL(void)		 pjpidf_status_set_basic_open(pjpidf_status*, pj_bool_t);
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJSIP_SIMPLE_PIDF_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/presence.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/presence.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/presence.h	(revision 1163)
@@ -0,0 +1,348 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIMPLE_PRESENCE_H__
+#define __PJSIP_SIMPLE_PRESENCE_H__
+
+/**
+ * @file presence.h
+ * @brief SIP Extension for Presence (RFC 3856)
+ */
+#include <pjsip-simple/evsub.h>
+#include <pjsip-simple/pidf.h>
+#include <pjsip-simple/xpidf.h>
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJSIP_SIMPLE_PRES SIP Extension for Presence (RFC 3856)
+ * @ingroup PJSIP_SIMPLE
+ * @brief Support for SIP Extension for Presence (RFC 3856)
+ * @{
+ *
+ * This module contains the implementation of SIP Presence Extension as 
+ * described in RFC 3856. It uses the SIP Event Notification framework
+ * (evsub.h) and extends the framework by implementing "presence"
+ * event package.
+ */
+
+
+
+/**
+ * Initialize the presence module and register it as endpoint module and
+ * package to the event subscription module.
+ *
+ * @param endpt		The endpoint instance.
+ * @param mod_evsub	The event subscription module instance.
+ *
+ * @return		PJ_SUCCESS if the module is successfully 
+ *			initialized and registered to both endpoint
+ *			and the event subscription module.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_init_module(pjsip_endpoint *endpt,
+					    pjsip_module *mod_evsub);
+
+
+/**
+ * Get the presence module instance.
+ *
+ * @return		The presence module instance.
+ */
+PJ_DECL(pjsip_module*) pjsip_pres_instance(void);
+
+
+/**
+ * Maximum presence status info.
+ */
+#define PJSIP_PRES_STATUS_MAX_INFO  8
+
+/**
+ * This structure describes presence status of a presentity.
+ */
+struct pjsip_pres_status
+{
+    unsigned		info_cnt;	/**< Number of info in the status.  */
+    struct {
+
+	pj_bool_t	basic_open;	/**< Basic status/availability.	    */
+	pj_str_t	id;		/**< Tuple id.			    */
+	pj_str_t	contact;	/**< Optional contact address.	    */
+
+    } info[PJSIP_PRES_STATUS_MAX_INFO];	/**< Array of info.		    */
+
+    pj_bool_t		_is_valid;	/**< Internal flag.		    */
+};
+
+
+/**
+ * @see pjsip_pres_status
+ */
+typedef struct pjsip_pres_status pjsip_pres_status;
+
+
+/**
+ * Create presence client subscription session.
+ *
+ * @param dlg		The underlying dialog to use.
+ * @param user_cb	Pointer to callbacks to receive presence subscription
+ *			events.
+ * @param options	Option flags. Currently only PJSIP_EVSUB_NO_EVENT_ID
+ *			is recognized.
+ * @param p_evsub	Pointer to receive the presence subscription
+ *			session.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_create_uac( pjsip_dialog *dlg,
+					    const pjsip_evsub_user *user_cb,
+					    unsigned options,
+					    pjsip_evsub **p_evsub );
+
+
+/**
+ * Create presence server subscription session.
+ *
+ * @param dlg		The underlying dialog to use.
+ * @param user_cb	Pointer to callbacks to receive presence subscription
+ *			events.
+ * @param rdata		The incoming SUBSCRIBE request that creates the event 
+ *			subscription.
+ * @param p_evsub	Pointer to receive the presence subscription
+ *			session.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_create_uas( pjsip_dialog *dlg,
+					    const pjsip_evsub_user *user_cb,
+					    pjsip_rx_data *rdata,
+					    pjsip_evsub **p_evsub );
+
+
+/**
+ * Forcefully destroy the presence subscription. This function should only
+ * be called on special condition, such as when the subscription 
+ * initialization has failed. For other conditions, application MUST terminate
+ * the subscription by sending the appropriate un(SUBSCRIBE) or NOTIFY.
+ *
+ * @param sub		The presence subscription.
+ * @param notify	Specify whether the state notification callback
+ *			should be called.
+ *
+ * @return		PJ_SUCCESS if subscription session has been destroyed.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_terminate( pjsip_evsub *sub,
+					   pj_bool_t notify );
+
+
+
+/**
+ * Call this function to create request to initiate presence subscription, to 
+ * refresh subcription, or to request subscription termination.
+ *
+ * @param sub		Client subscription instance.
+ * @param expires	Subscription expiration. If the value is set to zero,
+ *			this will request unsubscription.
+ * @param p_tdata	Pointer to receive the request.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_initiate( pjsip_evsub *sub,
+					  pj_int32_t expires,
+					  pjsip_tx_data **p_tdata);
+
+
+
+/**
+ * Accept the incoming subscription request by sending 2xx response to
+ * incoming SUBSCRIBE request.
+ *
+ * @param sub		Server subscription instance.
+ * @param rdata		The incoming subscription request message.
+ * @param st_code	Status code, which MUST be final response.
+ * @param hdr_list	Optional list of headers to be added in the response.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_accept( pjsip_evsub *sub,
+					pjsip_rx_data *rdata,
+				        int st_code,
+					const pjsip_hdr *hdr_list );
+
+
+
+
+/**
+ * For notifier, create NOTIFY request to subscriber, and set the state 
+ * of the subscription. Application MUST set the presence status to the
+ * appropriate state (by calling #pjsip_pres_set_status()) before calling
+ * this function.
+ *
+ * @param sub		The server subscription (notifier) instance.
+ * @param state		New state to set.
+ * @param state_str	The state string name, if state contains value other
+ *			than active, pending, or terminated. Otherwise this
+ *			argument is ignored.
+ * @param reason	Specify reason if new state is terminated, otherwise
+ *			put NULL.
+ * @param p_tdata	Pointer to receive the request.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_notify( pjsip_evsub *sub,
+					pjsip_evsub_state state,
+					const pj_str_t *state_str,
+					const pj_str_t *reason,
+					pjsip_tx_data **p_tdata);
+
+
+/**
+ * Create NOTIFY request to reflect current subscription status.
+ *
+ * @param sub		Server subscription object.
+ * @param p_tdata	Pointer to receive request.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_current_notify( pjsip_evsub *sub,
+					        pjsip_tx_data **p_tdata );
+
+
+
+/**
+ * Send request message that was previously created with initiate(), notify(),
+ * or current_notify(). Application may also send request created with other
+ * functions, e.g. authentication. But the request MUST be either request
+ * that creates/refresh subscription or NOTIFY request.
+ *
+ * @param sub		The subscription object.
+ * @param tdata		Request message to be sent.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_send_request( pjsip_evsub *sub,
+					      pjsip_tx_data *tdata );
+
+
+/**
+ * Get the presence status. Client normally would call this function
+ * after receiving NOTIFY request from server.
+ *
+ * @param sub		The client or server subscription.
+ * @param status	The structure to receive presence status.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_get_status( pjsip_evsub *sub,
+					    pjsip_pres_status *status );
+
+
+/**
+ * Set the presence status. This operation is only valid for server
+ * subscription. After calling this function, application would need to
+ * send NOTIFY request to client.
+ *
+ * @param sub		The server subscription.
+ * @param status	Status to be set.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_set_status( pjsip_evsub *sub,
+					    const pjsip_pres_status *status );
+
+
+/**
+ * This is a utility function to create PIDF message body from PJSIP
+ * presence status (pjsip_pres_status).
+ *
+ * @param pool		The pool to allocate memory for the message body.
+ * @param status	Presence status to be converted into PIDF message
+ *			body.
+ * @param entity	The entity ID, which normally is equal to the 
+ *			presentity ID publishing this presence info.
+ * @param p_body	Pointer to receive the SIP message body.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_create_pidf( pj_pool_t *pool,
+					     const pjsip_pres_status *status,
+					     const pj_str_t *entity,
+					     pjsip_msg_body **p_body );
+
+
+/**
+ * This is a utility function to create X-PIDF message body from PJSIP
+ * presence status (pjsip_pres_status).
+ *
+ * @param pool		The pool to allocate memory for the message body.
+ * @param status	Presence status to be converted into X-PIDF message
+ *			body.
+ * @param entity	The entity ID, which normally is equal to the 
+ *			presentity ID publishing this presence info.
+ * @param p_body	Pointer to receive the SIP message body.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_create_xpidf(pj_pool_t *pool,
+					     const pjsip_pres_status *status,
+					     const pj_str_t *entity,
+					     pjsip_msg_body **p_body );
+
+
+
+/**
+ * This is a utility function to parse PIDF body into PJSIP presence status.
+ *
+ * @param rdata		The incoming SIP message containing the PIDF body.
+ * @param pool		Pool to allocate memory to copy the strings into
+ *			the presence status structure.
+ * @param status	The presence status to be initialized.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_parse_pidf(pjsip_rx_data *rdata,
+					   pj_pool_t *pool,
+					   pjsip_pres_status *status);
+
+
+
+/**
+ * This is a utility function to parse X-PIDF body into PJSIP presence status.
+ *
+ * @param rdata		The incoming SIP message containing the X-PIDF body.
+ * @param pool		Pool to allocate memory to copy the strings into
+ *			the presence status structure.
+ * @param status	The presence status to be initialized.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_parse_xpidf(pjsip_rx_data *rdata,
+					   pj_pool_t *pool,
+					   pjsip_pres_status *status);
+
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJSIP_SIMPLE_PRESENCE_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/publish.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/publish.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/publish.h	(revision 1163)
@@ -0,0 +1,272 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIMPLE_PUBLISH_H__
+#define __PJSIP_SIMPLE_PUBLISH_H__
+
+/**
+ * @file publish.h
+ * @brief SIP Extension for Event State Publication (PUBLISH, RFC 3903)
+ */
+
+#include <pjsip/sip_util.h>
+#include <pjsip/sip_auth.h>
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ @defgroup PJSIP_SIMPLE_PUBLISH SIP Event State Publication (PUBLISH, RFC 3856)
+ @ingroup PJSIP_SIMPLE
+ @brief Support for SIP Event State Publication (PUBLISH, RFC 3856)
+ @{
+
+ This module contains the implementation of Session Initiation Protocol (SIP)
+ Extension for Event State Publication (PUBLISH) as defined by RFC 3856.
+ */
+
+/**
+ * The SIP PUBLISH method constant.
+ */
+extern const pjsip_method pjsip_publish_method;
+
+
+/*****************************************************************************
+ * @defgroup PJSIP_SIMPLE_PUBLISH_CLIENT SIP Event State Publication Client
+ * @ingroup PJSIP_SIMPLE
+ * @brief Event State Publication Clien
+ * @{
+ */
+
+
+/** Expiration not specified. */
+#define PJSIP_PUBC_EXPIRATION_NOT_SPECIFIED	((pj_uint32_t)0xFFFFFFFFUL)
+
+/**
+ * Opaque declaration for client side event publication session.
+ */
+typedef struct pjsip_publishc pjsip_publishc;
+
+
+
+/** Structure to hold parameters when calling application's callback.
+ *  The application's callback is called when the client publication process
+ *  has finished.
+ */
+struct pjsip_publishc_cbparam
+{
+    pjsip_publishc	*pubc;	    /**< Client publication structure.	    */
+    void		*token;	    /**< Arbitrary token.		    */
+    pj_status_t		 status;    /**< Error status.			    */
+    int			 code;	    /**< SIP status code received.	    */
+    pj_str_t		 reason;    /**< SIP reason phrase received.	    */
+    pjsip_rx_data	*rdata;	    /**< The complete received response.    */
+    int			 expiration;/**< Next expiration interval.	    */
+};
+
+
+/** Type declaration for callback to receive publication result. */
+typedef void pjsip_publishc_cb(struct pjsip_publishc_cbparam *param);
+
+
+/**
+ * Initialize client publication module.
+ *
+ * @param endpt	    SIP endpoint.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_publishc_init_module(pjsip_endpoint *endpt);
+
+
+
+/**
+ * Create client publication structure.
+ *
+ * @param endpt	    Endpoint, used to allocate pool from.
+ * @param options   Option flags.
+ * @param token	    Opaque data to be associated with the client publication.
+ * @param cb	    Pointer to callback function to receive publication status.
+ * @param p_pubc    Pointer to receive client publication structure.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_publishc_create( pjsip_endpoint *endpt, 
+					    unsigned options,
+					    void *token,
+				            pjsip_publishc_cb *cb, 
+					    pjsip_publishc **p_pubc);
+
+
+/**
+ * Destroy client publication structure. If a publication transaction is
+ * in progress, then the structure will be deleted only after a final response
+ * has been received, and in this case, the callback won't be called.
+ *
+ * @param pubc	    The client publication structure.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_publishc_destroy(pjsip_publishc *pubc);
+
+
+
+/**
+ * Get the memory pool associated with a publication client session.
+ *
+ * @param pubc	    The client publication structure.
+ * @return pool	    handle.
+ */
+PJ_DECL(pj_pool_t*) pjsip_publishc_get_pool(pjsip_publishc *pubc);
+
+
+/**
+ * Initialize client publication structure with various information needed to
+ * perform the publication.
+ *
+ * @param pubc		The client publication structure.
+ * @param event		The Event identification (e.g. "presence").
+ * @param target_uri	The URI of the presentity which the which the status
+ *			is being published.
+ * @param from_uri	The URI of the endpoint who sends the event 
+ *			publication. Normally the value would be the same as
+ *			target_uri.
+ * @param to_uri	The URI to be put in To header. Normally the value 
+ *			would be the same as target_uri.
+ * @param expires	The default expiration of the event publication. 
+ *			If the value PJSIP_PUBC_EXPIRATION_NOT_SPECIFIED is 
+ *			given, then no default expiration will be applied.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_publishc_init(pjsip_publishc *pubc,
+					 const pj_str_t *event,
+					 const pj_str_t *target_uri,
+					 const pj_str_t *from_uri,
+					 const pj_str_t *to_uri,
+					 pj_uint32_t expires);
+
+
+/**
+ * Set authentication credentials to use by this publication.
+ *
+ * @param pubc	    The publication structure.
+ * @param count	    Number of credentials in the array.
+ * @param c	    Array of credentials.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_publishc_set_credentials(pjsip_publishc *pubc,
+						    int count,
+						    const pjsip_cred_info c[]);
+
+/**
+ * Set route set to be used for outgoing requests.
+ *
+ * @param pubc	    The client publication structure.
+ * @param rs	    List containing Route headers.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_publishc_set_route_set(pjsip_publishc *pubc,
+						  const pjsip_route_hdr *rs);
+
+
+/**
+ * Create PUBLISH request for the specified client publication structure.
+ * Application can use this function to both create initial publication
+ * or to modify existing publication. 
+ *
+ * After the PUBLISH request is created, application MUST fill in the
+ * body part of the request with the appropriate content for the Event
+ * being published.
+ *
+ * Note that publication refresh are handled automatically by the session
+ * (as long as auto_refresh argument below is non-zero), and application
+ * should not use this function to perform publication refresh.
+ *
+ * @param pubc		The client publication session.
+ * @param auto_refresh	If non zero, the library will automatically 
+ *			refresh the next publication until application 
+ *			unpublish.
+ * @param p_tdata	Pointer to receive the PUBLISH request. Note that
+ *			the request DOES NOT have a message body.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_publishc_publish(pjsip_publishc *pubc, 
+					     pj_bool_t auto_refresh,
+					     pjsip_tx_data **p_tdata);
+
+
+/**
+ * Create PUBLISH request to unpublish the current client publication.
+ *
+ * @param pubc	    The client publication structure.
+ * @param p_tdata   Pointer to receive the PUBLISH request.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_publishc_unpublish(pjsip_publishc *pubc,
+					      pjsip_tx_data **p_tdata);
+
+
+/**
+ * Update the client publication expiration value. Note that this DOES NOT
+ * automatically send outgoing PUBLISH request to update the publication
+ * session. If application wants to do this, then it must construct a
+ * PUBLISH request and send it to the server.
+ *
+ * @param pubc	    The client publication structure.
+ * @param expires   The new expires value.
+ *
+ * @return	    PU_SUCCESS on successfull.
+ */
+PJ_DECL(pj_status_t) pjsip_publishc_update_expires(pjsip_publishc *pubc,
+					           pj_uint32_t expires );
+
+
+/**
+ * Sends outgoing PUBLISH request. The process will complete asynchronously,
+ * and application will be notified via the callback when the process 
+ * completes.
+ *
+ * @param pubc	    The client publication structure.
+ * @param tdata	    Transmit data.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_publishc_send(pjsip_publishc *pubc, 
+					 pjsip_tx_data *tdata);
+
+
+
+/**
+ * @}
+ */
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJSIP_SIMPLE_PUBLISH_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/types.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/types.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/types.h	(revision 1163)
@@ -0,0 +1,30 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIMPLE_TYPES_H__
+#define __PJSIP_SIMPLE_TYPES_H__
+
+#include <pjsip/sip_types.h>
+
+
+#define PJSIP_EVSUB_POOL_LEN	4000
+#define PJSIP_EVSUB_POOL_INC	4000
+
+
+#endif	/* __PJSIP_SIMPLE_TYPES_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/xpidf.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/xpidf.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip-simple/xpidf.h	(revision 1163)
@@ -0,0 +1,134 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIMPLE_XPIDF_H__
+#define __PJSIP_SIMPLE_XPIDF_H__
+
+/**
+ * @file xpidf.h
+ * @brief XPIDF/Presence Information Data Format
+ */
+#include <pjsip-simple/types.h>
+#include <pjlib-util/xml.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_SIMPLE_XPIDF XPIDF/Presence Information Data Format
+ * @ingroup PJSIP_SIMPLE
+ * @brief Support for XPIDF/Presence Information Data Format
+ * @{
+ *
+ * This is an old presence data format as described in:
+ * draft-rosenberg-impp-pidf-00.txt.
+ *
+ * We won't support this format extensively here, as it seems there's not
+ * too many implementations support this anymore, as it shouldn't.
+ */
+
+/** Type definitions for XPIDF root document. */
+typedef pj_xml_node pjxpidf_pres;
+
+
+/**
+ * Create a new XPIDF document.
+ *
+ * @param pool	    Pool.
+ * @param uri	    URI to set in the XPIDF document.
+ *
+ * @return	    XPIDF document.
+ */
+PJ_DECL(pjxpidf_pres*) pjxpidf_create(pj_pool_t *pool, const pj_str_t *uri);
+
+
+/**
+ * Parse XPIDF document.
+ *
+ * @param pool	    Pool.
+ * @param text	    Input text.
+ * @param len	    Length of input text.
+ *
+ * @return	    XPIDF document.
+ */
+PJ_DECL(pjxpidf_pres*) pjxpidf_parse(pj_pool_t *pool, char *text, pj_size_t len);
+
+
+/**
+ * Print XPIDF document.
+ *
+ * @param pres	    The XPIDF document to print.
+ * @param text	    Buffer to place the output.
+ * @param len	    Length of the buffer.
+ *
+ * @return	    The length printed.
+ */
+PJ_DECL(int) pjxpidf_print( pjxpidf_pres *pres, char *text, pj_size_t len);
+
+
+/**
+ * Get URI in the XPIDF document
+ *
+ * @param pres	    XPIDF document
+ *
+ * @return	    The URI, or an empty string.
+ */
+PJ_DECL(pj_str_t*) pjxpidf_get_uri(pjxpidf_pres *pres);
+
+
+/**
+ * Set the URI of the XPIDF document.
+ *
+ * @param pool	    Pool.
+ * @param pres	    The XPIDF document.
+ * @param uri	    URI to set in the XPIDF document.
+ *
+ * @return	    Zero on success.
+ */
+PJ_DECL(pj_status_t) pjxpidf_set_uri(pj_pool_t *pool, pjxpidf_pres *pres, 
+				     const pj_str_t *uri);
+
+
+/**
+ * Get presence status in the XPIDF document.
+ *
+ * @param pres	    XPIDF document.
+ *
+ * @return	    True to indicate the contact is online.
+ */
+PJ_DECL(pj_bool_t) pjxpidf_get_status(pjxpidf_pres *pres);
+
+
+/**
+ * Set presence status in the XPIDF document.
+ *
+ * @param pres	    XPIDF document.
+ * @param status    Status to set, True for online, False for offline.
+ *
+ * @return	    Zero on success.
+ */
+PJ_DECL(pj_status_t) pjxpidf_set_status(pjxpidf_pres *pres, pj_bool_t status);
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJSIP_SIMPLE_XPIDF_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip-ua/sip_inv.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip-ua/sip_inv.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip-ua/sip_inv.h	(revision 1163)
@@ -0,0 +1,640 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __SIP_INVITE_SESSION_H__
+#define __SIP_INVITE_SESSION_H__
+
+/**
+ * @file sip_inv.h
+ * @brief INVITE sessions
+ */
+
+
+#include <pjsip/sip_dialog.h>
+#include <pjmedia/sdp_neg.h>
+
+
+/**
+ * @defgroup PJSIP_HIGH_UA User Agent Library
+ * @ingroup PJSIP
+ * @brief Mid-level User Agent Library.
+ *
+ * This is the high level user agent library, which consists of:
+ *  - @ref PJSIP_INV, to encapsulate INVITE sessions and SDP
+ *    negotiation in the session,
+ *  - @ref PJSUA_REGC, high level client registration API, and
+ *  - @ref PJSUA_XFER.
+ *
+ * More detailed information is explained in
+ * <A HREF="/docs.htm">PJSIP Developer's Guide</A>
+ * PDF document, and readers are encouraged to read the document to
+ * get the concept behind dialog, dialog usages, and INVITE sessions.
+ *
+ * The User Agent Library is implemented in <b>pjsip-ua</b> static
+ * library.
+ */
+
+/**
+ * @defgroup PJSIP_INV INVITE Session
+ * @ingroup PJSIP_HIGH_UA
+ * @brief Provides INVITE session management.
+ * @{
+ *
+ * The INVITE session uses the @ref PJSIP_DIALOG framework to manage
+ * the underlying dialog, and is one type of usages that can use
+ * a particular dialog instance (other usages are event subscription,
+ * discussed in @ref PJSIP_EVENT_NOT). The INVITE session manages
+ * the life-time of the session, and also manages the SDP negotiation.
+ *
+ * Application must link with  <b>pjsip-ua</b> static library to use this API.
+ *
+ * More detailed information is explained in
+ * <A HREF="/docs.htm">PJSIP Developer's Guide</A>
+ * PDF document, and readers are encouraged to read the document to
+ * get the concept behind dialog, dialog usages, and INVITE sessions.
+ *
+ * The INVITE session does NOT manage media. If application wants to
+ * use API that encapsulates both signaling and media in a very easy
+ * to use API, it can use @ref PJSUA_LIB for this purpose.
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @see pjsip_inv_session
+ */
+typedef struct pjsip_inv_session pjsip_inv_session;
+
+
+/**
+ * This enumeration describes invite session state.
+ */
+typedef enum pjsip_inv_state
+{
+    PJSIP_INV_STATE_NULL,	    /**< Before INVITE is sent or received  */
+    PJSIP_INV_STATE_CALLING,	    /**< After INVITE is sent		    */
+    PJSIP_INV_STATE_INCOMING,	    /**< After INVITE is received.	    */
+    PJSIP_INV_STATE_EARLY,	    /**< After response with To tag.	    */
+    PJSIP_INV_STATE_CONNECTING,	    /**< After 2xx is sent/received.	    */
+    PJSIP_INV_STATE_CONFIRMED,	    /**< After ACK is sent/received.	    */
+    PJSIP_INV_STATE_DISCONNECTED,   /**< Session is terminated.		    */
+} pjsip_inv_state;
+
+/**
+ * This structure contains callbacks to be registered by application to 
+ * receieve notifications from the framework about various events in
+ * the invite session.
+ */
+typedef struct pjsip_inv_callback
+{
+    /**
+     * This callback is called when the invite sesion state has changed. 
+     * Application should inspect the session state (inv_sess->state) to get 
+     * the current state of the session.
+     *
+     * This callback is mandatory.
+     *
+     * @param inv	The invite session.
+     * @param e		The event which has caused the invite session's 
+     *			state to change.
+     */
+    void (*on_state_changed)(pjsip_inv_session *inv, pjsip_event *e);
+
+
+    /**
+     * This callback is called when the invite usage module has created 
+     * a new dialog and invite because of forked outgoing request.
+     *
+     * This callback is mandatory.
+     *
+     * @param inv	The new invite session.
+     * @param e		The event which has caused the dialog to fork.
+     *			The type of this event can be either
+     *			PJSIP_EVENT_RX_MSG or PJSIP_EVENT_RX_200_MSG.
+     */
+    void (*on_new_session)(pjsip_inv_session *inv, pjsip_event *e);
+
+    /**
+     * This callback is called whenever any transactions within the session
+     * has changed their state. Application MAY implement this callback, 
+     * e.g. to monitor the progress of an outgoing request.
+     *
+     * This callback is optional.
+     *
+     * @param inv	The invite session.
+     * @param tsx	The transaction, which state has changed.
+     * @param e		The event which has caused the transation state's
+     *			to change.
+     */
+    void (*on_tsx_state_changed)(pjsip_inv_session *inv,
+				 pjsip_transaction *tsx,
+				 pjsip_event *e);
+
+    /**
+     * This callback is called when the invite session has received 
+     * new offer from peer. Application can inspect the remote offer 
+     * in "offer". 
+     *
+     * @param inv	The invite session.
+     * @param offer	Remote offer.
+     */
+    void (*on_rx_offer)(pjsip_inv_session *inv,
+			const pjmedia_sdp_session *offer);
+
+    /**
+     * This callback is called after SDP offer/answer session has completed.
+     * The status argument specifies the status of the offer/answer, 
+     * as returned by pjmedia_sdp_neg_negotiate().
+     * 
+     * This callback is optional (from the point of view of the framework), 
+     * but all useful applications normally need to implement this callback.
+     *
+     * @param inv	The invite session.
+     * @param status	The negotiation status.
+     */
+    void (*on_media_update)(pjsip_inv_session *inv_ses, 
+			    pj_status_t status);
+
+} pjsip_inv_callback;
+
+
+
+/**
+ * This enumeration shows various options that can be applied to a session. 
+ * The bitmask combination of these options need to be specified when 
+ * creating a session. After the dialog is established (including early), 
+ * the options member of #pjsip_inv_session shows which capabilities are 
+ * common in both endpoints.
+ */
+enum pjsip_inv_option
+{	
+    /** 
+     * Indicate support for reliable provisional response extension 
+     */
+    PJSIP_INV_SUPPORT_100REL	= 1,
+
+    /** 
+     * Indicate support for session timer extension. 
+     */
+    PJSIP_INV_SUPPORT_TIMER	= 2,
+
+    /** 
+     * Indicate support for UPDATE method. This is automatically implied
+     * when creating outgoing dialog. After the dialog is established,
+     * the options member of #pjsip_inv_session shows whether peer supports
+     * this method as well.
+     */
+    PJSIP_INV_SUPPORT_UPDATE	= 4,
+
+    /** 
+     * Require reliable provisional response extension. 
+     */
+    PJSIP_INV_REQUIRE_100REL	= 32,
+
+    /**  
+     * Require session timer extension. 
+     */
+    PJSIP_INV_REQUIRE_TIMER	= 64,
+
+};
+
+
+/**
+ * This structure describes the invite session.
+ */
+struct pjsip_inv_session
+{
+    char		 obj_name[PJ_MAX_OBJ_NAME]; /**< Log identification */
+    pj_pool_t		*pool;			    /**< Dialog's pool.	    */
+    pjsip_inv_state	 state;			    /**< Invite sess state. */
+    pjsip_status_code	 cause;			    /**< Disconnect cause.  */
+    pj_str_t		 cause_text;		    /**< Cause text.	    */
+    pj_bool_t		 notify;		    /**< Internal.	    */
+    pjsip_dialog	*dlg;			    /**< Underlying dialog. */
+    pjsip_role_e	 role;			    /**< Invite role.	    */
+    unsigned		 options;		    /**< Options in use.    */
+    pjmedia_sdp_neg	*neg;			    /**< Negotiator.	    */
+    pjsip_transaction	*invite_tsx;		    /**< 1st invite tsx.    */
+    void		*mod_data[PJSIP_MAX_MODULE];/**< Modules data.	    */
+};
+
+
+/**
+ * Initialize the invite usage module and register it to the endpoint. 
+ * The callback argument contains pointer to functions to be called on 
+ * occurences of events in invite sessions.
+ *
+ * @param endpt		The endpoint instance.
+ * @param cb		Callback structure.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_inv_usage_init(pjsip_endpoint *endpt,
+					  const pjsip_inv_callback *cb);
+
+/**
+ * Get the INVITE usage module instance.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pjsip_module*) pjsip_inv_usage_instance(void);
+
+
+/**
+ * Dump user agent contents (e.g. all dialogs).
+ */
+PJ_DECL(void) pjsip_inv_usage_dump(void);
+
+
+/**
+ * Create UAC invite session for the specified dialog in dlg. 
+ *
+ * @param dlg		The dialog which will be used by this invite session.
+ * @param local_sdp	If application has determined its media capability, 
+ *			it can specify the SDP here. Otherwise it can leave 
+ *			this to NULL, to let remote UAS specifies an offer.
+ * @param options	The options argument is bitmask combination of SIP 
+ *			features in pjsip_inv_options enumeration.
+ * @param p_inv		On successful return, the invite session will be put 
+ *			in this argument.
+ *
+ * @return		The function will return PJ_SUCCESS if it can create
+ *			the session. Otherwise the appropriate error status 
+ *			will be returned on failure.
+ */
+PJ_DECL(pj_status_t) pjsip_inv_create_uac(pjsip_dialog *dlg,
+					  const pjmedia_sdp_session *local_sdp,
+					  unsigned options,
+					  pjsip_inv_session **p_inv);
+
+
+/**
+ * Application SHOULD call this function upon receiving the initial INVITE 
+ * request in rdata before creating the invite session (or even dialog), 
+ * to verify that the invite session can handle the INVITE request. 
+ * This function verifies that local endpoint is capable to handle required 
+ * SIP extensions in the request (i.e. Require header) and also the media, 
+ * if media description is present in the request.
+ *
+ * @param rdata		The incoming INVITE request.
+ *
+ * @param options	Upon calling this function, the options argument 
+ *			MUST contain the desired SIP extensions to be 
+ *			applied to the session. Upon return, this argument 
+ *			will contain the SIP extension that will be applied 
+ *			to the session, after considering the Supported, 
+ *			Require, and Allow headers in the request.
+ *
+ * @param sdp		If local media capability has been determined, 
+ *			and if application wishes to verify that it can 
+ *			handle the media offer in the incoming INVITE 
+ *			request, it SHOULD specify its local media capability
+ *			in this argument. 
+ *			If it is not specified, media verification will not
+ *			be performed by this function.
+ *
+ * @param dlg		If tdata is not NULL, application needs to specify
+ *			how to create the response. Either dlg or endpt
+ *			argument MUST be specified, with dlg argument takes
+ *			precedence when both are specified.
+ *
+ *			If a dialog has been created prior to calling this 
+ *			function, then it MUST be specified in dlg argument. 
+ *			Otherwise application MUST specify the endpt argument
+ *			(this is useful e.g. when application wants to send 
+ *			the response statelessly).
+ *
+ * @param endpt		If tdata is not NULL, application needs to specify
+ *			how to create the response. Either dlg or endpt
+ *			argument MUST be specified, with dlg argument takes
+ *			precedence when both are specified.
+ *
+ * @param tdata		If this argument is not NULL, this function will 
+ *			create the appropriate non-2xx final response message
+ *			when the verification fails.
+ *
+ * @return		If everything has been negotiated successfully, 
+ *			the function will return PJ_SUCCESS. Otherwise it 
+ *			will return the reason of the failure as the return
+ *			code.
+ *
+ *			This function is capable to create the appropriate 
+ *			response message when the verification has failed. 
+ *			If tdata is specified, then a non-2xx final response
+ *			will be created and put in this argument upon return,
+ *			when the verification has failed. 
+ *
+ *			If a dialog has been created prior to calling this 
+ *			function, then it MUST be specified in dlg argument. 
+ *			Otherwise application MUST specify the endpt argument
+ *			(this is useful e.g. when application wants to send 
+ *			the response statelessly).
+ */
+PJ_DECL(pj_status_t) pjsip_inv_verify_request(	pjsip_rx_data *rdata,
+						unsigned *options,
+						const pjmedia_sdp_session *sdp,
+						pjsip_dialog *dlg,
+						pjsip_endpoint *endpt,
+						pjsip_tx_data **tdata);
+
+
+/**
+ * Create UAS invite session for the specified dialog in dlg. Application 
+ * SHOULD call the verification function before calling this function, 
+ * to ensure that it can create the session successfully.
+ *
+ * @param dlg		The dialog to be used.
+ * @param rdata		Application MUST specify the received INVITE request 
+ *			in rdata. The invite session needs to inspect the 
+ *			received request to see if the request contains 
+ *			features that it supports.
+ * @param local_sdp	If application has determined its media capability, 
+ *			it can specify this capability in this argument. 
+ *			If SDP is received in the initial INVITE, the UAS 
+ *			capability specified in this argument doesn't have to
+ *			match the received offer; the SDP negotiator is able 
+ *			to rearrange the media lines in the answer so that it
+ *			matches the offer. 
+ * @param options	The options argument is bitmask combination of SIP 
+ *			features in pjsip_inv_options enumeration.
+ * @param p_inv		Pointer to receive the newly created invite session.
+ *
+ * @return		On successful, the invite session will be put in 
+ *			p_inv argument and the function will return PJ_SUCCESS.
+ *			Otherwise the appropriate error status will be returned 
+ *			on failure.
+ */
+PJ_DECL(pj_status_t) pjsip_inv_create_uas(pjsip_dialog *dlg,
+					  pjsip_rx_data *rdata,
+					  const pjmedia_sdp_session *local_sdp,
+					  unsigned options,
+					  pjsip_inv_session **p_inv);
+
+
+/**
+ * Forcefully terminate and destroy INVITE session, regardless of
+ * the state of the session. Note that this function should only be used
+ * when there is failure in the INVITE session creation. After the
+ * invite session has been created and initialized, normally application
+ * SHOULD use #pjsip_inv_end_session() to end the INVITE session instead.
+ *
+ * Note also that this function may terminate the underlying dialog, if
+ * there are no other sessions in the dialog.
+ *
+ * @param inv		The invite session.
+ * @param st_code	Status code for the reason of the termination.
+ * @param notify	If set to non-zero, then on_state_changed() 
+ *			callback will be called.
+ *
+ * @return		PJ_SUCCESS if the INVITE session has been
+ *			terminated.
+ */
+PJ_DECL(pj_status_t) pjsip_inv_terminate( pjsip_inv_session *inv,
+				          int st_code,
+					  pj_bool_t notify );
+
+
+/**
+ * Create the initial INVITE request for this session. This function can only 
+ * be called for UAC session. If local media capability is specified when 
+ * the invite session was created, then this function will put an SDP offer 
+ * in the outgoing INVITE request. Otherwise the outgoing request will not 
+ * contain SDP body.
+ *
+ * @param inv		The UAC invite session.
+ * @param p_tdata	The initial INVITE request will be put in this 
+ *			argument if it can be created successfully.
+ *
+ * @return		PJ_SUCCESS if the INVITE request can be created.
+ */
+PJ_DECL(pj_status_t) pjsip_inv_invite( pjsip_inv_session *inv,
+				       pjsip_tx_data **p_tdata );
+
+
+/**
+ * Create the initial response message for the incoming INVITE request in
+ * rdata with  status code st_code and optional status text st_text. Use
+ * #pjsip_answer() to create subsequent response message.
+ */
+PJ_DECL(pj_status_t) pjsip_inv_initial_answer(	pjsip_inv_session *inv,
+						pjsip_rx_data *rdata,
+						int st_code,
+						const pj_str_t *st_text,
+						const pjmedia_sdp_session *sdp,
+						pjsip_tx_data **p_tdata);
+
+/**
+ * Create a response message to the initial INVITE request. This function
+ * can only be called for the initial INVITE request, as subsequent
+ * re-INVITE request will be answered automatically.
+ *
+ * @param inv		The UAS invite session.
+ * @param st_code	The st_code contains the status code to be sent, 
+ *			which may be a provisional or final response. 
+ * @param st_text	If custom status text is desired, application can 
+ *			specify the text in st_text; otherwise if this 
+ *			argument is NULL, default status text will be used.
+ * @param local_sdp	If application has specified its media capability
+ *			during creation of UAS invite session, the local_sdp
+ *			argument MUST be NULL. This is because application 
+ *			can not perform more than one SDP offer/answer session
+ *			in a single INVITE transaction.
+ *			If application has not specified its media capability 
+ *			during creation of UAS invite session, it MAY or MUST
+ *			specify its capability in local_sdp argument, 
+ *			depending whether st_code indicates a 2xx final 
+ *			response.
+ * @param p_tdata	Pointer to receive the response message created by
+ *			this function.
+ *
+ * @return		PJ_SUCCESS if response message was created
+ *			successfully.
+ */
+PJ_DECL(pj_status_t) pjsip_inv_answer(	pjsip_inv_session *inv,
+					int st_code,
+					const pj_str_t *st_text,
+					const pjmedia_sdp_session *local_sdp,
+					pjsip_tx_data **p_tdata );
+
+
+/**
+ * Set local answer to respond to remote SDP offer, to be carried by 
+ * subsequent response (or request).
+ *
+ * @param inv		The invite session.
+ * @param sdp		The SDP description which will be set as answer
+ *			to remote.
+ *
+ * @return		PJ_SUCCESS if local answer can be accepted by
+ *			SDP negotiator.
+ */
+PJ_DECL(pj_status_t) pjsip_inv_set_sdp_answer(pjsip_inv_session *inv,
+					      const pjmedia_sdp_session *sdp );
+
+
+/**
+ * Create a SIP message to initiate invite session termination. Depending on 
+ * the state of the session, this function may return CANCEL request, 
+ * a non-2xx final response, or a BYE request. If the session has not answered
+ * the incoming INVITE, this function creates the non-2xx final response with 
+ * the specified status code in st_code and optional status text in st_text.
+ *
+ * @param inv		The invite session.
+ * @param st_code	Status code to be used for terminating the session.
+ * @param st_text	Optional status text.
+ * @param p_tdata	Pointer to receive the message to be created.
+ *
+ * @return		PJ_SUCCESS if termination message can be created.
+ */
+PJ_DECL(pj_status_t) pjsip_inv_end_session( pjsip_inv_session *inv,
+					    int st_code,
+					    const pj_str_t *st_text,
+					    pjsip_tx_data **p_tdata );
+
+
+
+/**
+ * Create a re-INVITE request. 
+ *
+ * @param inv		The invite session.
+ * @param new_contact	If application wants to update its local contact and
+ *			inform peer to perform target refresh with a new 
+ *			contact, it can specify the new contact in this 
+ *			argument; otherwise this argument must be NULL.
+ * @param new_offer	Application MAY initiate a new SDP offer/answer 
+ *			session in the request when there is no pending 
+ *			answer to be sent or received. It can detect this 
+ *			condition by observing the state of the SDP 
+ *			negotiator of the invite session. If new offer 
+ *			should be sent to remote, the offer must be specified
+ *			in this argument, otherwise it must be NULL.
+ * @param p_tdata	Pointer to receive the re-INVITE request message to
+ *			be created.
+ *
+ * @return		PJ_SUCCESS if a re-INVITE request with the specified
+ *			characteristics (e.g. to contain new offer) can be 
+ *			created.
+ */
+PJ_DECL(pj_status_t) pjsip_inv_reinvite(pjsip_inv_session *inv,
+					const pj_str_t *new_contact,
+					const pjmedia_sdp_session *new_offer,
+					pjsip_tx_data **p_tdata );
+
+
+
+/**
+ * Create an UPDATE request. 
+ *
+ * @param inv		The invite session.
+ * @param new_contact	If application wants to update its local contact
+ *			and inform peer to perform target refresh with a new
+ *			contact, it can specify the new contact in this 
+ *			argument; otherwise this argument must be NULL.
+ * @param new_offer	Application MAY initiate a new SDP offer/answer 
+ *			session in the request when there is no pending answer
+ *			to be sent or received. It can detect this condition
+ *			by observing the state of the SDP negotiator of the 
+ *			invite session. If new offer should be sent to remote,
+ *			the offer must be specified in this argument; otherwise
+ *			this argument must be NULL.
+ * @param p_tdata	Pointer to receive the UPDATE request message to
+ *			be created.
+ *
+ * @return		PJ_SUCCESS if a UPDATE request with the specified
+ *			characteristics (e.g. to contain new offer) can be 
+ *			created.
+ */
+PJ_DECL(pj_status_t) pjsip_inv_update (	pjsip_inv_session *inv,
+					const pj_str_t *new_contact,
+					const pjmedia_sdp_session *new_offer,
+					pjsip_tx_data **p_tdata );
+
+
+/**
+ * Send request or response message in tdata. 
+ *
+ * @param inv		The invite session.
+ * @param tdata		The message to be sent.
+ *
+ * @return		PJ_SUCCESS if transaction can be initiated 
+ *			successfully to send this message. Note that the
+ *			actual final state of the transaction itself will
+ *			be reported later, in on_tsx_state_changed()
+ *			callback.
+ */
+PJ_DECL(pj_status_t) pjsip_inv_send_msg(pjsip_inv_session *inv,
+					pjsip_tx_data *tdata);
+
+
+
+/**
+ * Get the invite session for the dialog, if any.
+ *
+ * @param dlg		The dialog which invite session is being queried.
+ *
+ * @return		The invite session instance which has been 
+ *			associated with this dialog, or NULL.
+ */
+PJ_DECL(pjsip_inv_session*) pjsip_dlg_get_inv_session(pjsip_dialog *dlg);
+
+/**
+ * Get the invite session instance associated with transaction tsx, if any.
+ *
+ * @param tsx		The transaction, which invite session is being 
+ *			queried.
+ *
+ * @return		The invite session instance which has been 
+ *			associated with this transaction, or NULL.
+ */
+PJ_DECL(pjsip_inv_session*) pjsip_tsx_get_inv_session(pjsip_transaction *tsx);
+
+
+/**
+ * Get state names for INVITE session state.
+ *
+ * @param state		The invite state.
+ *
+ * @return		String describing the state.
+ */
+PJ_DECL(const char *) pjsip_inv_state_name(pjsip_inv_state state);
+
+
+/**
+ * This is a utility function to create SIP body for SDP content.
+ *
+ * @param pool		Pool to allocate memory.
+ * @param sdp		SDP session to be put in the SIP message body.
+ * @param p_body	Pointer to receive SIP message body containing
+ *			the SDP session.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_create_sdp_body(pj_pool_t *pool,
+					   pjmedia_sdp_session *sdp,
+					   pjsip_msg_body **p_body);
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+
+#endif	/* __SIP_INVITE_SESSION_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip-ua/sip_regc.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip-ua/sip_regc.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip-ua/sip_regc.h	(revision 1163)
@@ -0,0 +1,327 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_REG_H__
+#define __PJSIP_SIP_REG_H__
+
+/**
+ * @file sip_reg.h
+ * @brief SIP Registration Client
+ */
+
+#include <pjsip/sip_types.h>
+#include <pjsip/sip_auth.h>
+#include <pjsip/sip_transport.h>
+
+
+/**
+ * @defgroup PJSUA_REGC Client Registration
+ * @ingroup PJSIP_HIGH_UA
+ * @brief High Layer API for performing client registration.
+ * @{
+ *
+ * This provides API for performing client registration. Application must
+ * link with  <b>pjsip-ua</b> static library to use this API.
+
+ */
+
+
+PJ_BEGIN_DECL
+
+/** Typedef for client registration data. */
+typedef struct pjsip_regc pjsip_regc;
+
+/** Maximum contacts in registration. */
+#define PJSIP_REGC_MAX_CONTACT	10
+
+/** Expiration not specified. */
+#define PJSIP_REGC_EXPIRATION_NOT_SPECIFIED	((pj_uint32_t)0xFFFFFFFFUL)
+
+/** Buffer to hold all contacts. */
+#define PJSIP_REGC_CONTACT_BUF_SIZE	512
+
+/** Structure to hold parameters when calling application's callback.
+ *  The application's callback is called when the client registration process
+ *  has finished.
+ */
+struct pjsip_regc_cbparam
+{
+    pjsip_regc		*regc;	    /**< Client registration structure.	    */
+    void		*token;	    /**< Arbitrary token.		    */
+    pj_status_t		 status;    /**< Error status.			    */
+    int			 code;	    /**< SIP status code received.	    */
+    pj_str_t		 reason;    /**< SIP reason phrase received.	    */
+    pjsip_rx_data	*rdata;	    /**< The complete received response.    */
+    int			 expiration;/**< Next expiration interval.	    */
+    int			 contact_cnt;/**<Number of contacts in response.    */
+    pjsip_contact_hdr	*contact[PJSIP_REGC_MAX_CONTACT]; /**< Contacts.    */
+};
+
+
+/** Type declaration for callback to receive registration result. */
+typedef void pjsip_regc_cb(struct pjsip_regc_cbparam *param);
+
+/**
+ * Client registration information.
+ */
+struct pjsip_regc_info
+{
+    pj_str_t	server_uri; /**< Server URI,				    */
+    pj_str_t	client_uri; /**< Client URI (From header).		    */
+    pj_bool_t	is_busy;    /**< Have pending transaction?		    */
+    pj_bool_t	auto_reg;   /**< Will register automatically?		    */
+    int		interval;   /**< Registration interval (seconds).	    */
+    int		next_reg;   /**< Time until next registration (seconds).    */
+};
+
+/**
+ * @see pjsip_regc_info
+ */
+typedef struct pjsip_regc_info pjsip_regc_info;
+
+
+/**
+ * Get the module instance for client registration module.
+ *
+ * @return	    client registration module.
+ */
+PJ_DECL(pjsip_module*) pjsip_regc_get_module(void);
+
+
+/**
+ * Create client registration structure.
+ *
+ * @param endpt	    Endpoint, used to allocate pool from.
+ * @param token	    A data to be associated with the client registration struct.
+ * @param cb	    Pointer to callback function to receive registration status.
+ * @param p_regc    Pointer to receive client registration structure.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_create( pjsip_endpoint *endpt, void *token,
+				        pjsip_regc_cb *cb, 
+					pjsip_regc **p_regc);
+
+
+/**
+ * Destroy client registration structure. If a registration transaction is
+ * in progress, then the structure will be deleted only after a final response
+ * has been received, and in this case, the callback won't be called.
+ *
+ * @param regc	    The client registration structure.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_destroy(pjsip_regc *regc);
+
+/**
+ * Get registration info.
+ *
+ * @param regc	    The client registration structure.
+ * @param info	    Client registration info.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_get_info( pjsip_regc *regc,
+					  pjsip_regc_info *info );
+
+
+/**
+ * Get the memory pool associated with a registration client handle.
+ *
+ * @param regc	    The client registration structure.
+ * @return pool	    handle.
+ */
+PJ_DECL(pj_pool_t*) pjsip_regc_get_pool(pjsip_regc *regc);
+
+/**
+ * Initialize client registration structure with various information needed to
+ * perform the registration.
+ *
+ * @param regc	    The client registration structure.
+ * @param srv_url   Server URL.
+ * @param from_url  The person performing the registration, must be a SIP URL type.
+ * @param to_url    The address of record for which the registration is targetd, must
+ *		    be a SIP/SIPS URL.
+ * @param ccnt	    Number of contacts in the array.
+ * @param contact   Array of contacts.
+ * @param expires   Default expiration interval (in seconds) to be applied for
+ *		    contact URL that doesn't have expiration settings. If the
+ *		    value PJSIP_REGC_EXPIRATION_NOT_SPECIFIED is given, then 
+ *		    no default expiration will be applied.
+ * @return	    zero on success.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_init(pjsip_regc *regc,
+				     const pj_str_t *srv_url,
+				     const pj_str_t *from_url,
+				     const pj_str_t *to_url,
+				     int ccnt,
+				     const pj_str_t contact[],
+				     pj_uint32_t expires);
+
+
+/**
+ * Set authentication credentials to use by this registration.
+ *
+ * @param regc	    The registration structure.
+ * @param count	    Number of credentials in the array.
+ * @param cred	    Array of credentials.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_set_credentials( pjsip_regc *regc,
+						 int count,
+						 const pjsip_cred_info cred[] );
+
+/**
+ * Set route set to be used for outgoing requests.
+ *
+ * @param regc	    The client registration structure.
+ * @param route_set List containing Route headers.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_set_route_set(pjsip_regc *regc,
+					      const pjsip_route_hdr*route_set);
+
+
+/**
+ * Lock/bind client registration to a specific transport/listener. 
+ * This is optional, as normally transport will be selected automatically
+ * based on the destination of requests upon resolver completion. 
+ * When the client registration is explicitly bound to the specific 
+ * transport/listener, all UAC transactions originated by the client
+ * registration will use the specified transport/listener when sending 
+ * outgoing requests.
+ *
+ * Note that this doesn't affect the Contact header set for this client
+ * registration. Application must manually update the Contact header if
+ * necessary, to adjust the address according to the transport being
+ * selected.
+ *
+ * @param regc	    The client registration instance.
+ * @param sel	    Transport selector containing the specification of
+ *		    transport or listener to be used by this session
+ *		    to send requests.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_set_transport(pjsip_regc *regc,
+					      const pjsip_tpselector *sel);
+
+
+/**
+ * Add headers to be added to outgoing REGISTER requests.
+ *
+ * @param regc	    The client registration structure.
+ * @param hdr_list  List containing SIP headers to be added for all outgoing
+ *		    REGISTER requests.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_add_headers(pjsip_regc *regc,
+					    const pjsip_hdr *hdr_list);
+
+
+/**
+ * Create REGISTER request for the specified client registration structure.
+ *
+ * After successfull registration, application can inspect the contacts in
+ * the client registration structure to list what contacts are associaciated
+ * with the address of record being targeted in the registration.
+ *
+ * @param regc	    The client registration structure.
+ * @param autoreg   If non zero, the library will automatically refresh the
+ *		    next registration until application unregister.
+ * @param p_tdata   Pointer to receive the REGISTER request.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_register(pjsip_regc *regc, pj_bool_t autoreg,
+					 pjsip_tx_data **p_tdata);
+
+
+/**
+ * Create REGISTER request to unregister the contacts that were previously
+ * registered by this client registration.
+ *
+ * @param regc	    The client registration structure.
+ * @param p_tdata   Pointer to receive the REGISTER request.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_unregister(pjsip_regc *regc,
+					   pjsip_tx_data **p_tdata);
+
+/**
+ * Create REGISTER request to unregister all contacts from server records.
+ * Note that this will unregister all registered contact for the AOR
+ * including contacts registered by other user agents. To only unregister
+ * contact registered by this client registration instance, use
+ * #pjsip_regc_unregister() instead.
+ *
+ * @param regc	    The client registration structure.
+ * @param p_tdata   Pointer to receive the REGISTER request.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_unregister_all(pjsip_regc *regc,
+					       pjsip_tx_data **p_tdata);
+
+/**
+ * Update Contact details in the client registration structure.
+ *
+ * @param regc	    The client registration structure.
+ * @param ccnt	    Number of contacts.
+ * @param contact   Array of contacts.
+ * @return	    zero if sucessfull.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_update_contact( pjsip_regc *regc,
+					        int ccnt,
+						const pj_str_t contact[] );
+
+/**
+ * Update the expires value.
+ *
+ * @param regc	    The client registration structure.
+ * @param expires   The new expires value.
+ * @return	    zero on successfull.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_update_expires( pjsip_regc *regc,
+					        pj_uint32_t expires );
+
+/**
+ * Sends outgoing REGISTER request.
+ * The process will complete asynchronously, and application
+ * will be notified via the callback when the process completes.
+ *
+ * @param regc	    The client registration structure.
+ * @param tdata	    Transmit data.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_send(pjsip_regc *regc, pjsip_tx_data *tdata);
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* __PJSIP_REG_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip-ua/sip_replaces.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip-ua/sip_replaces.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip-ua/sip_replaces.h	(revision 1163)
@@ -0,0 +1,300 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_REPLACES_H__
+#define __PJSIP_REPLACES_H__
+
+
+/**
+ * @file sip_replaces.h
+ * @brief SIP Replaces support (RFC 3891 - SIP "Replaces" Header)
+ */
+#include <pjsip/sip_msg.h>
+
+/**
+ * @defgroup PJSIP_REPLACES SIP Replaces support (RFC 3891 - "Replaces" Header)
+ * @ingroup PJSIP_HIGH_UA
+ * @brief SIP Replaces support (RFC 3891 - "Replaces" Header)
+ * @{
+ *
+ * This module implements support for Replaces header in PJSIP. The Replaces
+ * specification is written in RFC 3891 - The Session Initiation Protocol (SIP) 
+ * "Replaces" Header, and can be used to enable a variety of features, 
+ * for example: "Attended Transfer" and "Call Pickup".
+ *
+ * 
+ *
+ * \section PJSIP_REPLACES_USING_SEC Using PJSIP Replaces Support
+ *
+ * \subsection PJSIP_REPLACES_INIT_SUBSEC Initialization
+ *
+ * Application needs to call #pjsip_replaces_init_module() during application
+ * initialization stage to register "replaces" support in PJSIP. 
+ *
+ *
+ * 
+ * \subsection PJSIP_REPLACES_UAC_SUBSEC UAC Behavior: Sending a Replaces Header
+ *
+ * A User Agent that wishes to replace a single existing early or
+ * confirmed dialog with a new dialog of its own, MAY send the target
+ * User Agent an INVITE request containing a Replaces header field.  The
+ * User Agent Client (UAC) places the Call-ID, to-tag, and from-tag
+ * information for the target dialog in a single Replaces header field
+ * and sends the new INVITE to the target.
+ *
+ * To initiate outgoing INVITE request with Replaces header, application
+ * would create the INVITE request with #pjsip_inv_invite(), then adds
+ * #pjsip_replaces_hdr instance into the request, filling up the Call-ID,
+ * To-tag, and From-tag properties of the header with the identification
+ * of the dialog to be replaced. Application may also optionally
+ * set the \a early_only property of the header to indicate that it only
+ * wants to replace early dialog.
+ *
+ * Note that when the outgoing INVITE request (with Replaces) is initiated
+ * from an incoming REFER request (as in Attended Call Transfer case),
+ * this process should be done rather more automatically by PJSIP. Upon 
+ * receiving incoming incoming REFER request, normally these processes
+ * will be performed:
+ *  - Application finds \a Refer-To header,
+ *  - Application creates outgoing dialog/invite session, specifying
+ *    the URI in the \a Refer-To header as the initial remote target,
+ *  - The URI in the \a Refer-To header may contain header parameters such
+ *    as \a Replaces and \a Require headers.
+ *  - The dialog keeps the header fields in the header parameters
+ *    of the URI, and the invite session would add these headers into
+ *    the outgoing INVITE request. Because of this, the outgoing 
+ *    INVITE request will contain the \a Replaces and \a Require headers.
+ *
+ *
+ * For more information, please see the implementation of 
+ * #pjsua_call_xfer_replaces() in \ref PJSUA_LIB source code.
+ *
+ *
+ * \subsection PJSIP_REPLACES_UAS_SUBSEC UAS Behavior: Receiving a Replaces Header
+ *
+ * The Replaces header contains information used to match an existing
+ * SIP dialog (call-id, to-tag, and from-tag).  Upon receiving an INVITE
+ * with a Replaces header, the User Agent (UA) attempts to match this
+ * information with a confirmed or early dialog.  
+ *
+ * In PJSIP, if application wants to process the Replaces header in the
+ * incoming INVITE request, it should call #pjsip_replaces_verify_request()
+ * before creating the INVITE session. The #pjsip_replaces_verify_request()
+ * function checks and verifies the request to see if Replaces request
+ * can be processed. To be more specific, it performs the following
+ * verification:
+ *  - checks that Replaces header is present. If not, the function will
+ *    return PJ_SUCCESS without doing anything.
+ *  - checks that no duplicate Replaces headers are present, or otherwise
+ *    it will return 400 "Bad Request" response.
+ *  - checks for matching dialog and verifies that the invite session has
+ *    the correct state, and may return 481 "Call/Transaction Does Not Exist",
+ *    603 "Declined", or 486 "Busy Here" according to the processing rules
+ *    specified in RFC 3891.
+ *  - if matching dialog with correct state is found, it will give PJ_SUCCESS
+ *    status and return the matching dialog back to the application.
+ *
+ * The following pseudocode illustrates how application can process the
+ * incoming INVITE if it wants to support Replaces extension:
+ *
+ \code
+  // Incoming INVITE request handler
+  pj_bool_t on_rx_invite(pjsip_rx_data *rdata)
+  {
+    pjsip_dialog *dlg, *replaced_dlg;
+    pjsip_inv_session *inv;
+    pjsip_tx_data *response;
+    pj_status_t status;
+
+    // Check whether Replaces header is present in the request and process accordingly.
+    //
+    status = pjsip_replaces_verify_request(rdata, &replaced_dlg, PJ_FALSE, &response);
+    if (status != PJ_SUCCESS) {
+	// Something wrong with Replaces request.
+	//
+	if (response) {
+	    pjsip_endpt_send_response(endpt, rdata, response, NULL, NULL);
+	} else {
+	    // Respond with 500 (Internal Server Error)
+	    pjsip_endpt_respond_stateless(endpt, rdata, 500, NULL, NULL, NULL);
+	}
+    }
+
+    // Create UAS Invite session as usual.
+    //
+    status = pjsip_dlg_create_uas(.., rdata, .., &dlg);
+    ..
+    status = pjsip_inv_create_uas(dlg, .., &inv);
+
+    // Send initial 100 "Trying" to the INVITE request
+    //
+    status = pjsip_inv_initial_answer(inv, rdata, 100, ..., &response);
+    if (status == PJ_SUCCESS)
+	pjsip_inv_send_msg(inv, response);
+
+
+    // This is where processing is different between normal call
+    // (without Replaces) and call with Replaces.
+    //
+    if (replaced_dlg) {
+	pjsip_inv_session *replaced_inv;
+
+	// Always answer the new INVITE with 200, regardless whether
+	// the replaced call is in early or confirmed state.
+	//
+	status = pjsip_inv_answer(inv, 200, NULL, NULL, &response);
+	if (status == PJ_SUCCESS)
+	    pjsip_inv_send_msg(inv, response);
+
+
+	// Get the INVITE session associated with the replaced dialog.
+	//
+	replaced_inv = pjsip_dlg_get_inv_session(replaced_dlg);
+
+
+	// Disconnect the "replaced" INVITE session.
+	//
+	status = pjsip_inv_end_session(replaced_inv, PJSIP_SC_GONE, NULL, &tdata);
+	if (status == PJ_SUCCESS && tdata)
+	    status = pjsip_inv_send_msg(replaced_inv, tdata);
+
+
+	// It's up to application to associate the new INVITE session
+	// with the old (now terminated) session. For example, application
+	// may assign the same User Interface object for the new INVITE
+	// session.
+
+    } else {
+	// Process normal INVITE without Replaces.
+	...
+    }
+  }
+
+ \endcode
+ *
+ *
+ * For a complete sample implementation, please see \a pjsua_call_on_incoming()
+ * function of \ref PJSUA_LIB in \a pjsua_call.c file.
+ *
+ *
+ * \section PJSIP_REPLACES_REFERENCE References
+ *
+ * References:
+ *  - <A HREF="http://www.ietf.org/rfc/rfc3891.txt">RFC 3891: The Session 
+ *    Initiation Protocol (SIP) "Replaces" Header</A>
+ *  - \ref PJSUA_XFER
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Declaration of SIP Replaces header (RFC 3891).
+ */
+typedef struct pjsip_replaces_hdr
+{
+    /** Standard header field. */
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_replaces_hdr);
+
+    /** Call-Id */
+    pj_str_t	call_id;
+
+    /** to-tag */
+    pj_str_t	to_tag;
+
+    /** from-tag */
+    pj_str_t	from_tag;
+
+    /** early-only? */
+    pj_bool_t	early_only;
+
+    /** Other parameters */
+    pjsip_param	other_param;
+
+} pjsip_replaces_hdr;
+
+
+
+/**
+ * Initialize Replaces support in PJSIP. This would, among other things, 
+ * register the header parser for Replaces header.
+ *
+ * @param endpt	    The endpoint instance.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_replaces_init_module(pjsip_endpoint *endpt);
+
+
+/**
+ * Create Replaces header.
+ *
+ * @param pool	    Pool to allocate the header instance from.
+ *
+ * @return	    An empty Replaces header instance.
+ */
+PJ_DECL(pjsip_replaces_hdr*) pjsip_replaces_hdr_create(pj_pool_t *pool);
+
+
+/**
+ * Verify that incoming request with Replaces header can be processed.
+ * This function will perform all necessary checks according to RFC 3891
+ * Section 3 "User Agent Server Behavior: Receiving a Replaces Header".
+ *
+ * @param rdata	    The incoming request to be verified.
+ * @param p_dlg	    On return, it will be filled with the matching 
+ *		    dialog.
+ * @param lock_dlg  Specifies whether this function should acquire lock
+ *		    to the matching dialog. If yes (and should be yes!),
+ *		    then application will need to release the dialog's
+ *		    lock with #pjsip_dlg_dec_lock() when the function
+ *		    returns PJ_SUCCESS and the \a p_dlg parameter is filled
+ *		    with the dialog instance.
+ * @param p_tdata   Upon error, it will be filled with the final response
+ *		    to be sent to the request sender.
+ *
+ * @return	    The function returns the following:
+ *		    - If the request doesn't contain Replaces header, the
+ *		      function returns PJ_SUCCESS and \a p_dlg parameter
+ *		      will be set to NULL.
+ *		    - If the request contains Replaces header and a valid,
+ *		      matching dialog is found, the function returns 
+ *		      PJ_SUCCESS and \a p_dlg parameter will be set to the
+ *		      matching dialog instance.
+ *		    - Upon error condition (as described by RFC 3891), the
+ *		      function returns non-PJ_SUCCESS, and \a p_tdata 
+ *		      parameter SHOULD be set with a final response message
+ *		      to be sent to the sender of the request.
+ */
+PJ_DECL(pj_status_t) pjsip_replaces_verify_request(pjsip_rx_data *rdata,
+						   pjsip_dialog **p_dlg,
+						   pj_bool_t lock_dlg,
+						   pjsip_tx_data **p_tdata);
+
+
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJSIP_REPLACES_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip-ua/sip_xfer.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip-ua/sip_xfer.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip-ua/sip_xfer.h	(revision 1163)
@@ -0,0 +1,206 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_XFER_H__
+#define __PJSIP_XFER_H__
+
+
+
+/**
+ * @file sip_xfer.h
+ * @brief SIP Transfer (REFER, RFC 3515)
+ */
+#include <pjsip-simple/evsub.h>
+#include <pjsip/sip_msg.h>
+
+/**
+ * @defgroup PJSUA_XFER SIP REFER (RFC 3515) for Call Transfer etc.
+ * @ingroup PJSIP_HIGH_UA
+ * @brief SIP REFER dialog usage (call transfer, etc.)
+ * @{
+ *
+ * This describes a generic handling of SIP REFER request. The SIP REFER
+ * request is described in RFC 3515, and commonly used to perform call
+ * transfer functionality. Other types of SIP REFER usages are described
+ * in draft-worley-sip-many-refers-00 draft, for example:
+ *  - Remote Dial: where UAC sends REFER to instruct REFER recipient to
+ *    initiate an INVITE session to some target.
+ * 
+ * A REFER request can be sent inside or outside existing dialog context,
+ * although for call transfer case, it is more common to send REFER inside
+ * existing INVITE session context. PJSIP supports both sending REFER request
+ * inside or outside dialog context.
+ *
+ * The REFER framework uses @ref PJSIP_EVENT_NOT to manage the event
+ * subscription created by the REFER request. Because of this, application 
+ * must link with <b>pjsip-ua</b> AND <b>pjsip-simple</b> static libraries 
+ * to use REFER functionality.
+ *
+ * Reference:
+ *  - <A HREF="http://www.ietf.org/rfc/rfc3515.txt">RFC 3515: The Session 
+ *    Initiation Protocol (SIP) Refer Method</A>
+ *  - @ref PJSIP_EVENT_NOT
+ */
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * Declaration for REFER method constant.
+ */
+extern const pjsip_method pjsip_refer_method;
+
+
+/**
+ * Initialize the REFER subsystem.
+ * This currently does very little (only register REFER as supported method).
+ */
+PJ_DECL(pj_status_t) pjsip_xfer_init_module(pjsip_endpoint *endpt);
+
+
+
+/**
+ * Create transferer (sender of REFER request).
+ *
+ * @param dlg		The underlying dialog to use.
+ * @param user_cb	Pointer to callbacks to receive presence subscription
+ *			events.
+ * @param p_evsub	Pointer to receive the presence subscription
+ *			session.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_xfer_create_uac( pjsip_dialog *dlg,
+					    const pjsip_evsub_user *user_cb,
+					    pjsip_evsub **p_evsub );
+
+
+/**
+ * Create transferee (receiver of REFER request).
+ *
+ * @param dlg		The underlying dialog to use.
+ * @param user_cb	Pointer to callbacks to receive presence subscription
+ *			events.
+ * @param rdata		The incoming SUBSCRIBE request that creates the event 
+ *			subscription.
+ * @param p_evsub	Pointer to receive the presence subscription
+ *			session.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_xfer_create_uas( pjsip_dialog *dlg,
+					    const pjsip_evsub_user *user_cb,
+					    pjsip_rx_data *rdata,
+					    pjsip_evsub **p_evsub );
+
+/**
+ * Call this function to create request to initiate REFER subscription,
+ * to refresh subscription, or to unsubscribe. For request other than
+ * the initial REFER request, "refer_to_uri" argument may be NULL.
+ *
+ * @param sub		Client subscription instance.
+ * @param refer_to_uri	URI to be put to the Refer-To header. This argument
+ *			may be NULL for subsequent REFER requests.
+ * @param p_tdata	Pointer to receive the request.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_xfer_initiate( pjsip_evsub *sub,
+					  const pj_str_t *refer_to_uri,
+					  pjsip_tx_data **p_tdata);
+
+
+/**
+ * Accept the incoming REFER request by sending 2xx response.
+ *
+ * @param sub		Server subscription instance.
+ * @param rdata		The incoming subscription request message.
+ * @param st_code	Status code, which MUST be 2xx.
+ * @param hdr_list	Optional list of headers to be added in the response.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_xfer_accept( pjsip_evsub *sub,
+					pjsip_rx_data *rdata,
+				        int st_code,
+					const pjsip_hdr *hdr_list );
+
+
+/**
+ * For notifier, create NOTIFY request to subscriber, and set the state 
+ * of the subscription. 
+ *
+ * @param sub		The server subscription (notifier) instance.
+ * @param state		New state to set.
+ * @param xfer_st_code	The call status code to be reported with the NOTIFY
+ *			request.
+ * @param xfer_st_text	Optional call status text to be reported with the 
+ *			NOTIFY request. If the value is NULL, default 
+ *			status text will be used.
+ * @param p_tdata	Pointer to receive the request.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_xfer_notify( pjsip_evsub *sub,
+					pjsip_evsub_state state,
+					int xfer_st_code,
+					const pj_str_t *xfer_st_text,
+					pjsip_tx_data **p_tdata);
+
+
+/**
+ * Create NOTIFY request to reflect current subscription status. Application
+ * can only call this function after it has sent NOTIFY before.
+ * This will also re-send the last "message/sipfrag" body that was sent
+ * in the previous NOTIFY.
+ *
+ * @param sub		Server subscription object.
+ * @param p_tdata	Pointer to receive request.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_xfer_current_notify( pjsip_evsub *sub,
+					        pjsip_tx_data **p_tdata );
+
+
+
+/**
+ * Send request message that was previously created with initiate(), notify(),
+ * or current_notify(). Application may also send request created with other
+ * functions, e.g. authentication. But the request MUST be either request
+ * that creates/refresh subscription or NOTIFY request.
+ *
+ *
+ * @param sub		The event subscription object.
+ * @param tdata		Request message to be send.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_xfer_send_request( pjsip_evsub *sub,
+					      pjsip_tx_data *tdata);
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* __PJSIP_XFER_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip.h	(revision 1163)
@@ -0,0 +1,58 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_H__
+#define __PJSIP_H__
+
+/* Base types. */
+#include <pjsip/sip_types.h>
+#include <pjsip/sip_errno.h>
+
+/* Messaging and parsing. */
+#include <pjsip/sip_uri.h>
+#include <pjsip/sip_tel_uri.h>
+#include <pjsip/sip_msg.h>
+#include <pjsip/sip_parser.h>
+
+/* Core */
+#include <pjsip/sip_event.h>
+#include <pjsip/sip_module.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_util.h>
+
+/* Transport layer */
+#include <pjsip/sip_transport.h>
+#include <pjsip/sip_transport_udp.h>
+#include <pjsip/sip_transport_loop.h>
+#include <pjsip/sip_transport_tcp.h>
+#include <pjsip/sip_transport_tls.h>
+#include <pjsip/sip_resolve.h>
+
+/* Authentication. */
+#include <pjsip/sip_auth.h>
+
+/* Transaction layer. */
+#include <pjsip/sip_transaction.h>
+
+/* UA Layer. */
+#include <pjsip/sip_ua_layer.h>
+#include <pjsip/sip_dialog.h>
+
+
+#endif	/* __PJSIP_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/print_util.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/print_util.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/print_util.h	(revision 1163)
@@ -0,0 +1,116 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_PRINT_H__
+#define __PJSIP_PRINT_H__
+
+#define copy_advance_check(buf,str)   \
+	do { \
+	    if ((str).slen >= (endbuf-buf)) return -1;	\
+	    pj_memcpy(buf, (str).ptr, (str).slen); \
+	    buf += (str).slen; \
+	} while (0)
+
+#define copy_advance_pair_check(buf,str1,len1,str2)   \
+	do { \
+	    if (str2.slen) { \
+		printed = len1+str2.slen; \
+		if (printed >= (endbuf-buf)) return -1;	\
+		pj_memcpy(buf,str1,len1); \
+		pj_memcpy(buf+len1, str2.ptr, str2.slen); \
+		buf += printed; \
+	    } \
+	} while (0)
+
+#define copy_advance_pair_quote_check(buf,str1,len1,str2,quotebegin,quoteend) \
+	do { \
+	    if (str2.slen) { \
+		printed = len1+str2.slen+2; \
+		if (printed >= (endbuf-buf)) return -1;	\
+		pj_memcpy(buf,str1,len1); \
+		*(buf+len1)=quotebegin; \
+		pj_memcpy(buf+len1+1, str2.ptr, str2.slen); \
+		*(buf+printed-1) = quoteend; \
+		buf += printed; \
+	    } \
+	} while (0)
+
+#define copy_advance_pair_escape(buf,str1,len1,str2,unres)	\
+	do { \
+	  if (str2.slen) { \
+	    if (len1+str2.slen >= (endbuf-buf)) return -1; \
+	    pj_memcpy(buf,str1,len1); \
+	    printed=pj_strncpy2_escape(buf+len1,&str2,(endbuf-buf-len1),&unres);\
+	    if (printed < 0) return -1; \
+	    buf += (printed+len1); \
+	  } \
+	} while (0)
+
+
+#define copy_advance_no_check(buf,str)   \
+	do { \
+	    pj_memcpy(buf, (str).ptr, (str).slen); \
+	    buf += (str).slen; \
+	} while (0)
+
+#define copy_advance_escape(buf,str,unres)    \
+	do { \
+	    printed = \
+		pj_strncpy2_escape(buf, &(str), (endbuf-buf), &(unres)); \
+	    if (printed < 0) return -1; \
+	    buf += printed; \
+	} while (0)
+
+#define copy_advance_pair_no_check(buf,str1,len1,str2)   \
+	if (str2.slen) { \
+	    pj_memcpy(buf,str1,len1); \
+	    pj_memcpy(buf+len1, str2.ptr, str2.slen); \
+	    buf += len1+str2.slen; \
+	}
+
+#define copy_advance 		copy_advance_check
+#define copy_advance_pair 	copy_advance_pair_check
+#define copy_advance_pair_quote	copy_advance_pair_quote_check
+
+#define copy_advance_pair_quote_cond(buf,str1,len1,str2,quotebegin,quoteend) \
+	do {	\
+	  if (str2.slen && *str2.ptr!=quotebegin) \
+	    copy_advance_pair_quote(buf,str1,len1,str2,quotebegin,quoteend); \
+	  else \
+	    copy_advance_pair(buf,str1,len1,str2); \
+	} while (0)
+
+/*
+ * Internal type declarations.
+ */
+typedef void* (*pjsip_hdr_clone_fptr)(pj_pool_t *, const void*);
+typedef int   (*pjsip_hdr_print_fptr)(void *hdr, char *buf, pj_size_t len);
+
+extern const pj_str_t pjsip_hdr_names[];
+
+PJ_INLINE(void) init_hdr(void *hptr, pjsip_hdr_e htype, void *vptr)
+{
+    pjsip_hdr *hdr = hptr;
+    hdr->type = htype;
+    hdr->name = hdr->sname = pjsip_hdr_names[htype];
+    hdr->vptr = vptr;
+    pj_list_init(hdr);
+}
+
+#endif	/* __PJSIP_PRINT_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_auth.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_auth.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_auth.h	(revision 1163)
@@ -0,0 +1,356 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_AUTH_SIP_AUTH_H__
+#define __PJSIP_AUTH_SIP_AUTH_H__
+
+/**
+ * @file pjsip_auth.h
+ * @brief SIP Authorization Module.
+ */
+
+#include <pjsip/sip_config.h>
+#include <pjsip/sip_auth_msg.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @addtogroup PJSIP_AUTH Authentication Framework
+ * @ingroup PJSIP_CORE
+ * @brief Client and server side authentication framework.
+ */
+
+/**
+ * @defgroup PJSIP_AUTH_API Authentication API's
+ * @ingroup PJSIP_AUTH
+ * @brief Structures and functions to perform authentication.
+ * @{
+ */
+
+/** Length of digest string. */
+#define PJSIP_MD5STRLEN 32
+
+
+/** Type of data in the credential information. */
+typedef enum pjsip_cred_data_type
+{
+    PJSIP_CRED_DATA_PLAIN_PASSWD,   /**< Plain text password.	*/
+    PJSIP_CRED_DATA_DIGEST	    /**< Hashed digest.		*/
+} pjsip_cred_data_type;
+
+/** Authentication's quality of protection (qop) type. */
+typedef enum pjsip_auth_qop_type
+{
+    PJSIP_AUTH_QOP_NONE,	    /**< No quality of protection. */
+    PJSIP_AUTH_QOP_AUTH,	    /**< Authentication. */
+    PJSIP_AUTH_QOP_AUTH_INT,	    /**< Authentication with integrity protection. */
+    PJSIP_AUTH_QOP_UNKNOWN	    /**< Unknown protection. */
+} pjsip_auth_qop_type;
+
+
+/** 
+ * This structure describes credential information. 
+ * A credential information is a static, persistent information that identifies
+ * username and password required to authorize to a specific realm.
+ */
+struct pjsip_cred_info
+{
+    pj_str_t    realm;		/**< Realm.	    */
+    pj_str_t	scheme;		/**< Scheme.	    */
+    pj_str_t	username;	/**< User name.	    */
+    int		data_type;	/**< Type of data.  */
+    pj_str_t	data;		/**< The data, which can be a plaintext 
+				     password or a hashed digest. */
+};
+
+/**
+ * This structure describes cached value of previously sent Authorization
+ * or Proxy-Authorization header. The authentication framework keeps a list
+ * of this structure and will resend the same header to the same server
+ * as long as the method, uri, and nonce stays the same.
+ */
+typedef struct pjsip_cached_auth_hdr
+{
+    /** Standard list member */
+    PJ_DECL_LIST_MEMBER(struct pjsip_cached_auth_hdr);
+
+    pjsip_method	     method;	/**< To quickly see the method. */
+    pjsip_authorization_hdr *hdr;	/**< The cached header.		*/
+
+} pjsip_cached_auth_hdr;
+
+
+/**
+ * This structure describes authentication information for the specified
+ * realm. Each instance of this structure describes authentication "session"
+ * between this endpoint and remote server. This "session" information is
+ * usefull to keep information that persists for more than one challenge,
+ * such as nonce-count and cnonce value.
+ *
+ * Other than that, this structure also keeps the last authorization headers
+ * that have been sent in the cache list.
+ */
+typedef struct pjsip_cached_auth
+{
+    /** Standard list member */
+    PJ_DECL_LIST_MEMBER(struct pjsip_cached_auth);
+
+    pj_str_t			 realm;	    /**< Realm.			    */
+    pj_bool_t			 is_proxy;  /**< Server type (401/407)	    */
+    pjsip_auth_qop_type		 qop_value; /**< qop required by server.    */
+    unsigned			 stale_cnt; /**< Number of stale retry.	    */
+#if PJSIP_AUTH_QOP_SUPPORT
+    pj_uint32_t			 nc;	    /**< Nonce count.		    */
+    pj_str_t			 cnonce;    /**< Cnonce value.		    */
+#endif
+    pjsip_www_authenticate_hdr	*last_chal; /**< Last challenge seen.	    */
+#if PJSIP_AUTH_HEADER_CACHING
+    pjsip_cached_auth_hdr	 cached_hdr;/**< List of cached header for
+						 each method.		    */
+#endif
+
+} pjsip_cached_auth;
+
+
+/**
+ * This structure describes client authentication sessions. It keeps
+ * all the information needed to authorize the client against all downstream 
+ * servers.
+ */
+typedef struct pjsip_auth_clt_sess
+{
+    pj_pool_t		*pool;		/**< Pool to use.		    */
+    pjsip_endpoint	*endpt;		/**< Endpoint where this belongs.   */
+    unsigned		 cred_cnt;	/**< Number of credentials.	    */
+    pjsip_cred_info	*cred_info;	/**< Array of credential information*/
+    pjsip_cached_auth	 cached_auth;	/**< Cached authorization info.	    */
+
+} pjsip_auth_clt_sess;
+
+
+/**
+ * Type of function to lookup credential for the specified name.
+ *
+ * @param pool		Pool to initialize the credential info.
+ * @param realm		Realm to find the account.
+ * @param acc_name	Account name to look for.
+ * @param cred_info	The structure to put the credential when it's found.
+ *
+ * @return		The function MUST return PJ_SUCCESS when it found
+ *			a correct credential for the specified account and
+ *			realm. Otherwise it may return PJSIP_EAUTHACCNOTFOUND
+ *			or PJSIP_EAUTHACCDISABLED.
+ */
+typedef pj_status_t pjsip_auth_lookup_cred( pj_pool_t *pool,
+					    const pj_str_t *realm,
+					    const pj_str_t *acc_name,
+					    pjsip_cred_info *cred_info );
+
+/** Flag to specify that server is a proxy. */
+#define PJSIP_AUTH_SRV_IS_PROXY	    1
+
+/**
+ * This structure describes server authentication information.
+ */
+typedef struct pjsip_auth_srv
+{
+    pj_str_t		     realm;	/**< Realm to serve.		    */
+    pj_bool_t		     is_proxy;	/**< Will issue 407 instead of 401  */
+    pjsip_auth_lookup_cred  *lookup;	/**< Lookup function.		    */
+
+} pjsip_auth_srv;
+
+
+/**
+ * Initialize client authentication session data structure, and set the 
+ * session to use pool for its subsequent memory allocation. The argument 
+ * options should be set to zero for this PJSIP version.
+ *
+ * @param sess		The client authentication session.
+ * @param endpt		Endpoint where this session belongs.
+ * @param pool		Pool to use.
+ * @param options	Must be zero.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_auth_clt_init( pjsip_auth_clt_sess *sess,
+					  pjsip_endpoint *endpt,
+					  pj_pool_t *pool, 
+					  unsigned options);
+
+
+/**
+ * Clone client initialization session. 
+ *
+ * @param pool		Pool to use.
+ * @param sess		Structure to put the duplicated session.
+ * @param rhs		The client session to be cloned.
+ *
+ * @return		PJ_SUCCESS on success;
+ */
+PJ_DECL(pj_status_t) pjsip_auth_clt_clone( pj_pool_t *pool,
+					   pjsip_auth_clt_sess *sess,
+					   const pjsip_auth_clt_sess *rhs);
+
+/**
+ * Set the credentials to be used during the session. This will duplicate 
+ * the specified credentials using client authentication's pool.
+ *
+ * @param sess		The client authentication session.
+ * @param cred_cnt	Number of credentials.
+ * @param c		Array of credentials.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_auth_clt_set_credentials( pjsip_auth_clt_sess *sess,
+						     int cred_cnt,
+						     const pjsip_cred_info *c);
+
+
+/**
+ * Initialize new request message with authorization headers.
+ * This function will put Authorization/Proxy-Authorization headers to the
+ * outgoing request message. If caching is enabled (PJSIP_AUTH_HEADER_CACHING)
+ * and the session has previously sent Authorization/Proxy-Authorization header
+ * with the same method, then the same Authorization/Proxy-Authorization header
+ * will be resent from the cache only if qop is not present. If the stack is 
+ * configured to automatically generate next Authorization/Proxy-Authorization
+ * headers (PJSIP_AUTH_AUTO_SEND_NEXT flag), then new Authorization/Proxy-
+ * Authorization headers are calculated and generated when they are not present
+ * in the case or if authorization session has qop.
+ *
+ * If both PJSIP_AUTH_HEADER_CACHING flag and PJSIP_AUTH_AUTO_SEND_NEXT flag
+ * are not set, this function will do nothing. The stack then will only send
+ * Authorization/Proxy-Authorization to respond 401/407 response.
+ *
+ * @param sess		The client authentication session.
+ * @param tdata		The request message to be initialized.
+ *
+ * @return		PJ_SUCCESS if successfull.
+ */
+PJ_DECL(pj_status_t) pjsip_auth_clt_init_req( pjsip_auth_clt_sess *sess,
+					      pjsip_tx_data *tdata );
+
+
+/**
+ * Call this function when a transaction failed with 401 or 407 response.
+ * This function will reinitialize the original request message with the
+ * authentication challenge found in the response message, and add the
+ * new authorization header in the authorization cache.
+ *
+ * Note that upon return the reference counter of the new transmit data
+ * will be set to 1.
+ *
+ * @param sess		The client authentication session.
+ * @param rdata		The response message containing 401/407 status.
+ * @param old_request	The original request message, which will be re-
+ *			created with authorization info.
+ * @param new_request	Pointer to receive new request message which
+ *			will contain all required authorization headers.
+ *
+ * @return		PJ_SUCCESS if new request can be successfully
+ *			created to respond all the authentication
+ *			challenges.
+ */
+PJ_DECL(pj_status_t) pjsip_auth_clt_reinit_req(	pjsip_auth_clt_sess *sess,
+						const pjsip_rx_data *rdata,
+						pjsip_tx_data *old_request,
+						pjsip_tx_data **new_request );
+
+/**
+ * Initialize server authorization session data structure to serve the 
+ * specified realm and to use lookup_func function to look for the credential 
+ * info. 
+ *
+ * @param pool		Pool used to initialize the authentication server.
+ * @param auth_srv	The authentication server structure.
+ * @param realm		Realm to be served by the server.
+ * @param lookup	Account lookup function.
+ * @param options	Options, bitmask of:
+ *			- PJSIP_AUTH_SRV_IS_PROXY: to specify that the server
+ *			  will authorize clients as a proxy server (instead of
+ *			  as UAS), which means that Proxy-Authenticate will 
+ *			  be used instead of WWW-Authenticate.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_auth_srv_init( pj_pool_t *pool,
+					  pjsip_auth_srv *auth_srv,
+					  const pj_str_t *realm,
+					  pjsip_auth_lookup_cred *lookup,
+					  unsigned options );
+
+
+/**
+ * Request the authorization server framework to verify the authorization 
+ * information in the specified request in rdata.
+ *
+ * @param auth_srv	The server authentication structure.
+ * @param rdata		Incoming request to be authenticated.
+ * @param status_code	When not null, it will be filled with suitable 
+ *			status code to be sent to the client.
+ *
+ * @return		PJ_SUCCESS if request is successfully authenticated.
+ *			Otherwise the function may return one of the
+ *			following error codes:
+ *			- PJSIP_EAUTHNOAUTH
+ *			- PJSIP_EINVALIDAUTHSCHEME
+ *			- PJSIP_EAUTHACCNOTFOUND
+ *			- PJSIP_EAUTHACCDISABLED
+ *			- PJSIP_EAUTHINVALIDREALM
+ *			- PJSIP_EAUTHINVALIDDIGEST
+ */
+PJ_DECL(pj_status_t) pjsip_auth_srv_verify( pjsip_auth_srv *auth_srv,
+					    pjsip_rx_data *rdata,
+					    int *status_code );
+
+
+/**
+ * Add authentication challenge headers to the outgoing response in tdata. 
+ * Application may specify its customized nonce and opaque for the challenge, 
+ * or can leave the value to NULL to make the function fills them in with 
+ * random characters.
+ *
+ * @param auth_srv	The server authentication structure.
+ * @param qop		Optional qop value.
+ * @param nonce		Optional nonce value.
+ * @param opaque	Optional opaque value.
+ * @param stale		Stale indication.
+ * @param tdata		The outgoing response message. The response must have
+ *			401 or 407 response code.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_auth_srv_challenge( pjsip_auth_srv *auth_srv,
+					       const pj_str_t *qop,
+					       const pj_str_t *nonce,
+					       const pj_str_t *opaque,
+					       pj_bool_t stale,
+					       pjsip_tx_data *tdata);
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJSIP_AUTH_SIP_AUTH_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_auth_msg.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_auth_msg.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_auth_msg.h	(revision 1163)
@@ -0,0 +1,251 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_AUTH_SIP_AUTH_MSG_H__
+#define __PJSIP_AUTH_SIP_AUTH_MSG_H__
+
+#include <pjsip/sip_msg.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @addtogroup PJSIP_MSG_HDR
+ * @{
+ */
+
+/**
+ * Common credential structure represents common credential fields
+ * present in Authorization/Proxy-Authorization header.
+ */
+struct pjsip_common_credential
+{
+    pj_str_t	realm;		/**< Credential's realm.    */
+    pjsip_param	other_param;	/**< Other parameters.	    */
+};
+
+/**
+ * @see pjsip_common_credential
+ */
+typedef struct pjsip_common_credential pjsip_common_credential;
+
+
+/**
+ * This structure describe credential used in Authorization and
+ * Proxy-Authorization header for digest authentication scheme.
+ */
+struct pjsip_digest_credential
+{
+    pj_str_t	realm;		/**< Realm of the credential	*/
+    pjsip_param	other_param;	/**< Other parameters.		*/
+    pj_str_t	username;	/**< Username parameter.	*/
+    pj_str_t	nonce;		/**< Nonce parameter.		*/
+    pj_str_t	uri;		/**< URI parameter.		*/ 
+    pj_str_t	response;	/**< Response digest.		*/
+    pj_str_t	algorithm;	/**< Algorithm.			*/
+    pj_str_t	cnonce;		/**< Cnonce.			*/
+    pj_str_t	opaque;		/**< Opaque value.		*/
+    pj_str_t	qop;		/**< Quality of protection.	*/
+    pj_str_t	nc;		/**< Nonce count.		*/
+};
+
+/**
+ * @see pjsip_digest_credential
+ */
+typedef struct pjsip_digest_credential pjsip_digest_credential;
+
+/**
+ * This structure describe credential used in Authorization and
+ * Proxy-Authorization header for PGP authentication scheme.
+ */
+struct pjsip_pgp_credential
+{
+    pj_str_t	realm;		/**< Realm.			*/
+    pjsip_param	other_param;	/**< Other parameters.		*/
+    pj_str_t	version;	/**< Version parameter.		*/
+    pj_str_t	signature;	/**< Signature parameter.	*/
+    pj_str_t	signed_by;	/**< Signed by parameter.	*/
+    pj_str_t	nonce;		/**< Nonce parameter.		*/
+};
+
+/**
+ * @see pjsip_pgp_credential
+ */
+typedef struct pjsip_pgp_credential pjsip_pgp_credential;
+
+/**
+ * This structure describes SIP Authorization header (and also SIP
+ * Proxy-Authorization header).
+ */
+struct pjsip_authorization_hdr
+{
+    /** Standard header fiends. */
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_authorization_hdr);
+
+    /** Authorization scheme.  */
+    pj_str_t scheme;
+
+    /** Type of credentials, depending on the scheme. */
+    union
+    {
+	pjsip_common_credential common;	/**< Common fields.	    */
+	pjsip_digest_credential digest;	/**< Digest credentials.    */
+	pjsip_pgp_credential	pgp;	/**< PGP credentials.	    */
+    } credential;
+};
+
+/**
+ * @see pjsip_authorization_hdr.
+ */
+typedef struct pjsip_authorization_hdr pjsip_authorization_hdr;
+
+/** SIP Proxy-Authorization header shares the same structure as SIP
+    Authorization header.
+ */
+typedef struct pjsip_authorization_hdr pjsip_proxy_authorization_hdr;
+
+/**
+ * Create SIP Authorization header.
+ * @param pool	    Pool where memory will be allocated from.
+ * @return	    SIP Authorization header.
+ */
+PJ_DECL(pjsip_authorization_hdr*) 
+pjsip_authorization_hdr_create(pj_pool_t *pool);
+
+/**
+ * Create SIP Proxy-Authorization header.
+ * @param pool	    Pool where memory will be allocated from.
+ * @return SIP	    Proxy-Authorization header.
+ */
+PJ_DECL(pjsip_proxy_authorization_hdr*) 
+pjsip_proxy_authorization_hdr_create(pj_pool_t *pool);
+
+
+/**
+ * This structure describes common fields in authentication challenge
+ * headers (WWW-Authenticate and Proxy-Authenticate).
+ */
+struct pjsip_common_challenge
+{
+    pj_str_t	realm;		/**< Realm for the challenge.	*/
+    pjsip_param	other_param;	/**< Other parameters.		*/
+};
+
+/**
+ * @see pjsip_common_challenge
+ */
+typedef struct pjsip_common_challenge pjsip_common_challenge;
+
+/**
+ * This structure describes authentication challenge used in Proxy-Authenticate
+ * or WWW-Authenticate for digest authentication scheme.
+ */
+struct pjsip_digest_challenge
+{
+    pj_str_t	realm;		/**< Realm for the challenge.	*/
+    pjsip_param	other_param;	/**< Other parameters.		*/
+    pj_str_t	domain;		/**< Domain.			*/
+    pj_str_t	nonce;		/**< Nonce challenge.		*/
+    pj_str_t	opaque;		/**< Opaque value.		*/
+    int		stale;		/**< Stale parameter.		*/
+    pj_str_t	algorithm;	/**< Algorithm parameter.	*/
+    pj_str_t	qop;		/**< Quality of protection.	*/
+};
+
+/**
+ * @see pjsip_digest_challenge
+ */
+typedef struct pjsip_digest_challenge pjsip_digest_challenge;
+
+/**
+ * This structure describes authentication challenge used in Proxy-Authenticate
+ * or WWW-Authenticate for PGP authentication scheme.
+ */
+struct pjsip_pgp_challenge
+{
+    pj_str_t	realm;		/**< Realm for the challenge.	*/
+    pjsip_param	other_param;	/**< Other parameters.		*/
+    pj_str_t	version;	/**< PGP version.		*/
+    pj_str_t	micalgorithm;	/**< micalgorithm parameter.	*/
+    pj_str_t	pubalgorithm;	/**< pubalgorithm parameter.	*/ 
+    pj_str_t	nonce;		/**< Nonce challenge.		*/
+};
+
+/**
+ * @see pjsip_pgp_challenge
+ */
+typedef struct pjsip_pgp_challenge pjsip_pgp_challenge;
+
+/**
+ * This structure describe SIP WWW-Authenticate header (Proxy-Authenticate
+ * header also uses the same structure).
+ */
+struct pjsip_www_authenticate_hdr
+{
+    /** Standard header fields. */
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_www_authenticate_hdr);
+
+    /** Authentication scheme  */
+    pj_str_t	scheme;
+
+    /** This union contains structures that are only relevant
+        depending on the value of the scheme being used.
+     */
+    union
+    {
+	pjsip_common_challenge	common;	/**< Common fields.	*/
+	pjsip_digest_challenge	digest;	/**< Digest challenge.	*/
+	pjsip_pgp_challenge	pgp;	/**< PGP challenge.	*/
+    } challenge;
+};
+
+/**
+ * WWW-Authenticate header.
+ */
+typedef struct pjsip_www_authenticate_hdr pjsip_www_authenticate_hdr;
+
+/**
+ * Proxy-Authenticate header.
+ */
+typedef struct pjsip_www_authenticate_hdr pjsip_proxy_authenticate_hdr;
+
+
+/**
+ * Create SIP WWW-Authenticate header.
+ *
+ * @param pool	    Pool where memory will be allocated from.
+ * @return	    SIP WWW-Authenticate header.
+ */
+PJ_DECL(pjsip_www_authenticate_hdr*) 
+pjsip_www_authenticate_hdr_create(pj_pool_t *pool);
+
+/**
+ * Create SIP Proxy-Authenticate header.
+ *
+ * @param pool	    Pool where memory will be allocated from.
+ * @return	    SIP Proxy-Authenticate header.
+ */
+PJ_DECL(pjsip_proxy_authenticate_hdr*) 
+pjsip_proxy_authenticate_hdr_create(pj_pool_t *pool);
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+#endif	/* __PJSIP_AUTH_SIP_AUTH_MSG_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_auth_parser.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_auth_parser.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_auth_parser.h	(revision 1163)
@@ -0,0 +1,72 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_AUTH_SIP_AUTH_PARSER_H__
+#define __PJSIP_AUTH_SIP_AUTH_PARSER_H__
+
+/**
+ * @file pjsip_auth_parser.h
+ * @brief SIP Authorization Parser Module.
+ */
+
+#include <pj/types.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * Initialize and register authorization parser module.
+ * This will register parser handler for various Authorization related headers
+ * such as Authorization, WWW-Authenticate, Proxy-Authorizization, and 
+ * Proxy-Authenticate headers.
+ *
+ * This function is called automatically by the main SIP parser.
+ *
+ * @return      PJ_SUCCESS or the appropriate status code.
+ */
+PJ_DECL(pj_status_t) pjsip_auth_init_parser(void);
+
+/**
+ * DeInitialize authorization parser module.
+ */
+PJ_DECL(void) pjsip_auth_deinit_parser();
+
+
+
+extern const pj_str_t	pjsip_USERNAME_STR, /**< "username" string const.   */
+			pjsip_REALM_STR,    /**< "realm" string const.	    */
+			pjsip_NONCE_STR,    /**< "nonce" string const.	    */
+			pjsip_URI_STR,	    /**< "uri" string const.	    */
+			pjsip_RESPONSE_STR, /**< "response" string const.   */
+			pjsip_ALGORITHM_STR,/**< "algorithm" string const.  */
+			pjsip_DOMAIN_STR,   /**< "domain" string const.	    */
+			pjsip_STALE_STR,    /**< "stale" string const.	    */
+			pjsip_QOP_STR,	    /**< "qop" string const.	    */
+			pjsip_CNONCE_STR,   /**< "cnonce" string const.	    */
+			pjsip_OPAQUE_STR,   /**< "opaque" string const.	    */
+			pjsip_NC_STR,	    /**< "nc" string const.	    */
+			pjsip_TRUE_STR,	    /**< "true" string const.	    */
+			pjsip_FALSE_STR,    /**< "false" string const.	    */
+			pjsip_DIGEST_STR,   /**< "digest" string const.	    */
+			pjsip_PGP_STR,	    /**< "pgp" string const.	    */
+			pjsip_MD5_STR,	    /**< "md5" string const.	    */
+			pjsip_AUTH_STR;	    /**< "auth" string const.	    */
+
+PJ_END_DECL
+
+#endif	/* __PJSIP_AUTH_SIP_AUTH_PARSER_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_autoconf.h.in
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_autoconf.h.in	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_autoconf.h.in	(revision 1163)
@@ -0,0 +1,38 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2006 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 __PJSIP_SIP_AUTOCONF_H__
+#define __PJSIP_SIP_AUTOCONF_H__
+
+/**
+ * @file sip_autoconf.h
+ * @brief Describes operating system specifics (automatically detected by
+ *        autoconf)
+ */
+
+/**
+ * Enable/disable TLS transport, as configured by autoconf.
+ * But only do this if user doesn't explicitly configure in pj/config_site.h.
+ */
+#ifndef PJSIP_HAS_TLS_TRANSPORT
+#undef PJSIP_HAS_TLS_TRANSPORT
+#endif
+
+
+#endif	/* __PJSIP_SIP_AUTOCONF_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_config.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_config.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_config.h	(revision 1163)
@@ -0,0 +1,428 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_CONFIG_H__
+#define __PJSIP_SIP_CONFIG_H__
+
+/**
+ * @file sip_config.h
+ * @brief Compile time configuration.
+ */
+#include <pj/config.h>
+
+/**
+ * @defgroup PJSIP PJSIP Library Collection
+ */
+
+/**
+ * @defgroup PJSIP_CORE Core SIP Library
+ * @ingroup PJSIP
+ * @brief The core framework from which all other SIP components depends on.
+ * 
+ * The PJSIP Core library only provides transport framework, event
+ * dispatching/module framework, and SIP message representation and
+ * parsing. It doesn't do anything usefull in itself!
+ *
+ * If application wants the stack to do anything usefull at all,
+ * it must registers @ref PJSIP_MOD to the core library. Examples
+ * of modules are @ref PJSIP_TRANSACT and @ref PJSUA_UA.
+ */
+
+/**
+ * @defgroup PJSIP_BASE Base Types
+ * @ingroup PJSIP_CORE
+ * @brief Basic PJSIP types and configurations.
+ */
+
+/**
+ * @defgroup PJSIP_CONFIG Compile Time Configuration
+ * @ingroup PJSIP_BASE
+ * @brief PJSIP compile time configurations.
+ * @{
+ */
+
+/*
+ * Include sip_autoconf.h if autoconf is used (PJ_AUTOCONF is set)
+ */
+#if defined(PJ_AUTOCONF)
+#   include <pjsip/sip_autoconf.h>
+#endif
+
+
+/**
+ * Specify maximum transaction count in transaction hash table.
+ * Default value is 16*1024
+ */
+#ifndef PJSIP_MAX_TSX_COUNT
+#   define PJSIP_MAX_TSX_COUNT		(16*1024)
+#endif
+
+/**
+ * Specify maximum number of dialogs in the dialog hash table.
+ * Default value is 16*1024.
+ */
+#ifndef PJSIP_MAX_DIALOG_COUNT
+#   define PJSIP_MAX_DIALOG_COUNT	(16*1024)
+#endif
+
+
+/**
+ * Specify maximum number of transports.
+ * Default value is equal to maximum number of handles in ioqueue.
+ * See also PJSIP_TPMGR_HTABLE_SIZE.
+ */
+#ifndef PJSIP_MAX_TRANSPORTS
+#   define PJSIP_MAX_TRANSPORTS		(PJ_IOQUEUE_MAX_HANDLES)
+#endif
+
+
+/**
+ * Transport manager hash table size (must be 2^n-1). 
+ * See also PJSIP_MAX_TRANSPORTS
+ */
+#ifndef PJSIP_TPMGR_HTABLE_SIZE
+#   define PJSIP_TPMGR_HTABLE_SIZE	31
+#endif
+
+
+/**
+ * Specify maximum URL size.
+ * This constant is used mainly when printing the URL for logging purpose 
+ * only.
+ */
+#ifndef PJSIP_MAX_URL_SIZE
+#   define PJSIP_MAX_URL_SIZE		256
+#endif
+
+
+/**
+ * Specify maximum number of modules.
+ * This mainly affects the size of mod_data array in various components.
+ */
+#ifndef PJSIP_MAX_MODULE
+#   define PJSIP_MAX_MODULE		16
+#endif
+
+
+/**
+ * Maximum packet length. We set it more than MTU since a SIP PDU
+ * containing presence information can be quite large (>1500).
+ */
+#ifndef PJSIP_MAX_PKT_LEN
+#   define PJSIP_MAX_PKT_LEN		2000
+#endif
+
+
+/**
+ * Allow SIP modules removal or insertions during operation?
+ * If yes, then locking will be employed when endpoint need to
+ * access module.
+ */
+#ifndef PJSIP_SAFE_MODULE
+#   define PJSIP_SAFE_MODULE		1
+#endif
+
+
+/**
+ * If non-zero, SIP parser will unescape the escape characters ('%')
+ * in the original message, which means that it will modify the
+ * original message. Otherwise the parser will create a copy of
+ * the string and store the unescaped string to the new location.
+ *
+ * Unescaping in-place is faster, but less elegant (and it may
+ * break certain applications). So normally it's disabled, unless
+ * when benchmarking (to show off big performance).
+ *
+ * Default: 0
+ */
+#ifndef PJSIP_UNESCAPE_IN_PLACE
+#   define PJSIP_UNESCAPE_IN_PLACE	0
+#endif
+
+
+/**
+ * This macro controls maximum numbers of ioqueue events to be processed
+ * in a single pjsip_endpt_handle_events() poll. When PJSIP detects that
+ * there are probably more events available from the network and total
+ * events so far is less than this value, PJSIP will call pj_ioqueue_poll()
+ * again to get more events.
+ *
+ * Value 1 works best for ioqueue with select() back-end, while for IOCP it is
+ * probably best to set this value equal to PJSIP_MAX_TIMED_OUT_ENTRIES
+ * since IOCP only processes one event at a time.
+ *
+ * Default: 1
+ */
+#ifndef PJSIP_MAX_NET_EVENTS
+#   define PJSIP_MAX_NET_EVENTS		1
+#endif
+
+
+/**
+ * Max entries to process in timer heap per poll. 
+ * 
+ * Default: 10
+ */
+#ifndef PJSIP_MAX_TIMED_OUT_ENTRIES
+#   define PJSIP_MAX_TIMED_OUT_ENTRIES	10
+#endif
+
+
+/**
+ * Idle timeout interval to be applied to transports with no usage
+ * before the transport is destroyed. Value is in seconds.
+ *
+ * Default: 60
+ */
+#ifndef PJSIP_TRANSPORT_IDLE_TIME
+#   define PJSIP_TRANSPORT_IDLE_TIME	60
+#endif
+
+
+/**
+ * Maximum number of usages for a transport before a new transport is
+ * created. This only applies for ephemeral transports such as TCP.
+ *
+ * Currently this is not used.
+ * 
+ * Default: -1
+ */
+#ifndef PJSIP_MAX_TRANSPORT_USAGE
+#   define PJSIP_MAX_TRANSPORT_USAGE	((unsigned)-1)
+#endif
+
+
+/**
+ * The TCP incoming connection backlog number to be set in accept().
+ *
+ * Default: 5
+ *
+ * @see PJSIP_TLS_TRANSPORT_BACKLOG
+ */
+#ifndef PJSIP_TCP_TRANSPORT_BACKLOG
+#   define PJSIP_TCP_TRANSPORT_BACKLOG	5
+#endif
+
+
+/**
+ * This macro specifies whether full DNS resolution should be used.
+ * When enabled, #pjsip_resolve() will perform asynchronous DNS SRV and
+ * A (or AAAA, when IPv6 is supported) resolution to resolve the SIP
+ * domain.
+ *
+ * Note that even when this setting is enabled, asynchronous DNS resolution
+ * will only be done when application calls #pjsip_endpt_create_resolver(),
+ * configure the nameservers with #pj_dns_resolver_set_ns(), and configure
+ * the SIP endpoint's DNS resolver with #pjsip_endpt_set_resolver(). If
+ * these steps are not followed, the domain will be resolved with normal
+ * pj_gethostbyname() function.
+ *
+ * Turning off this setting will save the footprint by about 16KB, since
+ * it should also exclude dns.o and resolve.o from PJLIB-UTIL.
+ *
+ * Default: 1 (enabled)
+ *
+ * @see PJSIP_MAX_RESOLVED_ADDRESSES
+ */
+#ifndef PJSIP_HAS_RESOLVER
+#   define PJSIP_HAS_RESOLVER		1
+#endif
+
+
+/** 
+ * Maximum number of addresses returned by the resolver. The number here 
+ * will slightly affect stack usage, since each entry will occupy about
+ * 32 bytes of stack memory.
+ *
+ * Default: 8
+ *
+ * @see PJSIP_HAS_RESOLVER
+ */
+#ifndef PJSIP_MAX_RESOLVED_ADDRESSES
+#   define PJSIP_MAX_RESOLVED_ADDRESSES	    8
+#endif
+
+
+/**
+ * Enable TLS SIP transport support. For most systems this means that
+ * OpenSSL must be installed.
+ *
+ * Default: 0 (for now)
+ */
+#ifndef PJSIP_HAS_TLS_TRANSPORT
+#   define PJSIP_HAS_TLS_TRANSPORT	    0
+#endif
+
+
+/**
+ * The TLS pending incoming connection backlog number to be set in accept().
+ *
+ * Default: 5
+ *
+ * @see PJSIP_TCP_TRANSPORT_BACKLOG
+ */
+#ifndef PJSIP_TLS_TRANSPORT_BACKLOG
+#   define PJSIP_TLS_TRANSPORT_BACKLOG	    5
+#endif
+
+
+
+/* Endpoint. */
+#define PJSIP_MAX_TIMER_COUNT		(2*PJSIP_MAX_TSX_COUNT + 2*PJSIP_MAX_DIALOG_COUNT)
+#define PJSIP_POOL_LEN_ENDPT		(4000)
+#define PJSIP_POOL_INC_ENDPT		(4000)
+
+/* Transport related constants. */
+
+#define PJSIP_POOL_RDATA_LEN		4000
+#define PJSIP_POOL_RDATA_INC		4000
+#define PJSIP_POOL_LEN_TRANSPORT	512
+#define PJSIP_POOL_INC_TRANSPORT	512
+#define PJSIP_POOL_LEN_TDATA		4000
+#define PJSIP_POOL_INC_TDATA		4000
+#define PJSIP_POOL_LEN_UA		4000
+#define PJSIP_POOL_INC_UA		4000
+
+#define PJSIP_MAX_FORWARDS_VALUE	70
+
+#define PJSIP_RFC3261_BRANCH_ID		"z9hG4bK"
+#define PJSIP_RFC3261_BRANCH_LEN	7
+
+/* Transaction related constants. */
+#define PJSIP_POOL_TSX_LAYER_LEN	4000
+#define PJSIP_POOL_TSX_LAYER_INC	4000
+#define PJSIP_POOL_TSX_LEN		1536 /* 768 */
+#define PJSIP_POOL_TSX_INC		256
+#define PJSIP_MAX_TSX_KEY_LEN		(PJSIP_MAX_URL_SIZE*2)
+
+/* User agent. */
+#define PJSIP_POOL_LEN_USER_AGENT	1024
+#define PJSIP_POOL_INC_USER_AGENT	1024
+
+/* Message/URL related constants. */
+#define PJSIP_MAX_CALL_ID_LEN		PJ_GUID_STRING_LENGTH
+#define PJSIP_MAX_TAG_LEN		PJ_GUID_STRING_LENGTH
+#define PJSIP_MAX_BRANCH_LEN		(PJSIP_RFC3261_BRANCH_LEN + PJ_GUID_STRING_LENGTH + 2)
+#define PJSIP_MAX_HNAME_LEN		64
+
+/* Dialog related constants. */
+#define PJSIP_POOL_LEN_DIALOG		1200
+#define PJSIP_POOL_INC_DIALOG		512
+
+/* Maximum header types. */
+#define PJSIP_MAX_HEADER_TYPES		64
+
+/* Maximum URI types. */
+#define PJSIP_MAX_URI_TYPES		4
+
+/*****************************************************************************
+ *  Default timeout settings, in miliseconds. 
+ */
+
+/** Transaction T1 timeout value. */
+#if !defined(PJSIP_T1_TIMEOUT)
+#  define PJSIP_T1_TIMEOUT	500
+#endif
+
+/** Transaction T2 timeout value. */
+#if !defined(PJSIP_T2_TIMEOUT)
+#  define PJSIP_T2_TIMEOUT	4000
+#endif
+
+/** Transaction completed timer for non-INVITE */
+#if !defined(PJSIP_T4_TIMEOUT)
+#  define PJSIP_T4_TIMEOUT	5000
+#endif
+
+/** Transaction completed timer for INVITE */
+#if !defined(PJSIP_TD_TIMEOUT)
+#  define PJSIP_TD_TIMEOUT	32000
+#endif
+
+
+/*****************************************************************************
+ *  Authorization
+ */
+
+/**
+ * If this flag is set, the stack will keep the Authorization/Proxy-Authorization
+ * headers that are sent in a cache. Future requests with the same realm and
+ * the same method will use the headers in the cache (as long as no qop is
+ * required by server).
+ *
+ * Turning on this flag will make authorization process goes faster, but
+ * will grow the memory usage undefinitely until the dialog/registration
+ * session is terminated.
+ *
+ * Default: 1
+ */
+#if !defined(PJSIP_AUTH_HEADER_CACHING)
+#   define PJSIP_AUTH_HEADER_CACHING	    0
+#endif
+
+/**
+ * If this flag is set, the stack will proactively send Authorization/Proxy-
+ * Authorization header for next requests. If next request has the same method
+ * with any of previous requests, then the last header which is saved in
+ * the cache will be used (if PJSIP_AUTH_CACHING is set). Otherwise a fresh
+ * header will be recalculated. If a particular server has requested qop, then
+ * a fresh header will always be calculated.
+ *
+ * If this flag is NOT set, then the stack will only send Authorization/Proxy-
+ * Authorization headers when it receives 401/407 response from server.
+ *
+ * Turning ON this flag will grow memory usage of a dialog/registration pool
+ * indefinitely until it is terminated, because the stack needs to keep the
+ * last WWW-Authenticate/Proxy-Authenticate challenge.
+ *
+ * Default: 1
+ */
+#if !defined(PJSIP_AUTH_AUTO_SEND_NEXT)
+#   define PJSIP_AUTH_AUTO_SEND_NEXT	    0
+#endif
+
+/**
+ * Support qop="auth" directive.
+ * This option also requires client to cache the last challenge offered by
+ * server.
+ *
+ * Default: 1
+ */
+#if !defined(PJSIP_AUTH_QOP_SUPPORT)
+#   define PJSIP_AUTH_QOP_SUPPORT	    1
+#endif
+
+
+/**
+ * Maximum number of stale retries when server keeps rejecting our request
+ * with stale=true.
+ */
+#ifndef PJSIP_MAX_STALE_COUNT
+#   define PJSIP_MAX_STALE_COUNT	    3
+#endif
+
+
+/**
+ * @}
+ */
+
+#include <pj/config.h>
+
+
+#endif	/* __PJSIP_SIP_CONFIG_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_dialog.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_dialog.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_dialog.h	(revision 1163)
@@ -0,0 +1,603 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_DIALOG_H__
+#define __PJSIP_SIP_DIALOG_H__
+
+
+/**
+ * @file dialog.h
+ * @brief SIP Dialog abstraction
+ */
+
+#include <pjsip/sip_msg.h>
+#include <pjsip/sip_auth.h>
+#include <pjsip/sip_errno.h>
+#include <pjsip/sip_transport.h>
+#include <pj/sock.h>
+#include <pj/assert.h>
+
+
+/**
+ * @defgroup PJSIP_DIALOG Base Dialog
+ * @ingroup PJSIP_UA
+ * @brief The base dialog framework to support dialog usages.
+ * @{
+ *
+ * The base dialog framework provides management for base dialog
+ * properties such as <b>From</b> header, <b>To</b> header, <b>CSeq</b>
+ * sequencing, <b>Call-ID</b> header, <b>Contact</b> header management, 
+ * dialog <b>route-set</b> management, and common <b>authentication</b>. 
+ * This basic dialog functionality will be shared by all <b>dialog
+ * usages</b> of a particular dialog.
+ *
+ * More detailed information is explained in
+ * <A HREF="/docs.htm">PJSIP Developer's Guide</A>
+ * PDF document, and readers are encouraged to read the document to
+ * get the concept behind dialog, dialog usages, and INVITE sessions.
+ *
+ * Application MUST initialize the user agent layer module by calling
+ * #pjsip_ua_init_module() before using any of the dialog API, and link
+ * the application with with <b>pjsip-core</b> library.
+ */
+
+PJ_BEGIN_DECL
+
+
+/**
+ * This structure is used to describe dialog's participants, which in this
+ * case is local party (i.e. us) and remote party.
+ */
+typedef struct pjsip_dlg_party
+{
+    pjsip_fromto_hdr	*info;	    /**< From/To header, inc tag.	*/
+    pj_str_t		 info_str;  /**< String rep of info header.	*/
+    pj_uint32_t		 tag_hval;  /**< Hashed value of the tag.	*/
+    pjsip_contact_hdr	*contact;   /**< Contact header.		*/
+    pj_int32_t		 first_cseq;/**< First CSeq seen.		*/
+    pj_int32_t		 cseq;	    /**< Next sequence number.		*/
+} pjsip_dlg_party;
+
+
+/**
+ * Dialog state.
+ */
+typedef enum pjsip_dialog_state
+{
+    /** Dialog is not established. */
+    PJSIP_DIALOG_STATE_NULL,
+
+    /** Dialog has been established (probably early) */
+    PJSIP_DIALOG_STATE_ESTABLISHED
+} pjsip_dialog_state;
+
+/**
+ * This structure describes the dialog structure. Application MUST NOT
+ * try to SET the values here directly, but instead it MUST use the
+ * appropriate dialog API. The dialog declaration only needs to be made 
+ * visible because other PJSIP modules need to see it (e.g. INVITE session,
+ * the event framework, etc.).
+ *
+ * Application MAY READ the dialog contents directly after it acquires
+ * dialog lock.
+ *
+ * To acquire dialog lock, use #pjsip_dlg_inc_lock(), and to release it,
+ * use #pjsip_dlg_dec_lock(). DO NOT USE pj_mutex_lock()/pj_mutex_unlock()
+ * on the dialog's mutex directly, because this will not protect against
+ * dialog being destroyed.
+ */
+struct pjsip_dialog
+{
+    /** The dialog set list. */
+    PJ_DECL_LIST_MEMBER(pjsip_dialog);
+
+    /* Dialog's system properties. */
+    char		obj_name[PJ_MAX_OBJ_NAME];  /**< Standard id.	    */
+    pj_pool_t	       *pool;	    /**< Dialog's pool.			    */
+    pj_mutex_t	       *mutex_;	    /**< Dialog's mutex. Do not call!!
+					 Use pjsip_dlg_inc_lock() instead!  */
+    pjsip_user_agent   *ua;	    /**< User agent instance.		    */
+    pjsip_endpoint     *endpt;	    /**< Endpoint instance.		    */
+
+    /** The dialog set which this dialog belongs (opaque type). */
+    void	       *dlg_set;
+
+    /* Dialog's session properties. */
+    pjsip_dialog_state	state;	    /**< Dialog state.			    */
+    pjsip_uri	       *target;	    /**< Current target.		    */
+    pjsip_hdr	        inv_hdr;    /**< Headers from hparam in dest URL    */
+    pjsip_dlg_party     local;	    /**< Local party info.		    */
+    pjsip_dlg_party     remote;	    /**< Remote party info.		    */
+    pjsip_role_e	role;	    /**< Initial role.			    */
+    pj_bool_t		uac_has_2xx;/**< UAC has received 2xx response?	    */
+    pj_bool_t		secure;	    /**< Use secure transport?		    */
+    pjsip_cid_hdr      *call_id;    /**< Call-ID header.		    */
+    pjsip_route_hdr	route_set;  /**< Route set.			    */
+    pjsip_auth_clt_sess	auth_sess;  /**< Client authentication session.	    */
+
+    /** Session counter. */
+    int			sess_count; /**< Number of sessions.		    */
+
+    /** Transaction counter. */
+    int			tsx_count;  /**< Number of pending transactions.    */
+
+    /** Transport selector. */
+    pjsip_tpselector	tp_sel;
+
+    /* Dialog usages. */
+    unsigned		usage_cnt;  /**< Number of registered usages.	    */
+    pjsip_module       *usage[PJSIP_MAX_MODULE]; /**< Array of usages, 
+					 priority sorted		    */
+
+    /** Module specific data. */
+    void	       *mod_data[PJSIP_MAX_MODULE]; /**< Module data.	    */
+};
+
+
+/**
+ * This utility function returns PJ_TRUE if the specified method is a
+ * dialog creating request. This method property is used to determine
+ * whether Contact header should be included in outgoing request.
+ *
+ * @param m		The SIP method.
+ *
+ * @return		PJ_TRUE if the method creates a dialog.
+ */
+PJ_DECL(pj_bool_t) pjsip_method_creates_dialog(const pjsip_method *m);
+
+/**
+ * Create a new dialog and return the instance in p_dlg parameter. 
+ * After creating  the dialog, application can add modules as dialog usages
+ * by calling  #pjsip_dlg_add_usage(). 
+ *
+ * If the request has To tag parameter, dialog's local tag will be initialized 
+ * from this value. Otherwise a globally unique id generator will be invoked to
+ * create dialog's local tag.
+ *
+ * This function also initializes the dialog's route set based on the 
+ * Record-Route headers in the request, if present.
+ *
+ * Note that initially, the session count in the dialog will be initialized 
+ * to zero.
+ *
+ * @param ua		    The user agent module instance.
+ * @param local_uri	    Dialog local URI (i.e. From header).
+ * @param local_contact_uri Optional dialog local Contact URI. 
+ *			    If this argument is NULL, the Contact will be
+ *			    taken from the local URI.
+ * @param remote_uri	    Dialog remote URI (i.e. To header).
+ * @param target	    Optional initial remote target. If this argument
+ *			    is NULL, the initial target will be set to
+ *			    remote URI.
+ * @param p_dlg		    Pointer to receive the dialog.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_create_uac( pjsip_user_agent *ua,
+					   const pj_str_t *local_uri,
+					   const pj_str_t *local_contact_uri,
+					   const pj_str_t *remote_uri,
+					   const pj_str_t *target,
+					   pjsip_dialog **p_dlg);
+
+
+/**
+ * Initialize UAS dialog from the information found in the incoming request 
+ * that creates a dialog (such as INVITE, REFER, or SUBSCRIBE), and set the 
+ * local Contact to contact. If contact is not specified, the local contact 
+ * is initialized from the URI in the To header in the request. 
+ *
+ * This function will also create UAS transaction for the incoming request,
+ * and associate the transaction to the rdata. Application can query the
+ * transaction used to handle this request by calling #pjsip_rdata_get_tsx()
+ * after this function returns.
+ *
+ * Note that initially, the session count in the dialog will be initialized 
+ * to zero.
+ *
+ *
+ * @param ua		    The user agent module instance.
+ * @param rdata		    The incoming request that creates the dialog,
+ *			    such as INVITE, SUBSCRIBE, or REFER.
+ * @param contact	    Optional URI to be used as local Contact. If
+ *			    this argument is NULL, the local contact will be
+ *			    initialized from the value of To header in the
+ *			    request.
+ * @param p_dlg		    Pointer to receive the dialog.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_create_uas(  pjsip_user_agent *ua,
+					    pjsip_rx_data *rdata,
+					    const pj_str_t *contact,
+					    pjsip_dialog **p_dlg);
+
+
+/**
+ * Lock/bind dialog to a specific transport/listener. This is optional,
+ * as normally transport will be selected automatically based on the 
+ * destination of messages upon resolver completion. When the dialog is 
+ * explicitly bound to the specific transport/listener, all transactions
+ * originated by this dialog will use the specified transport/listener
+ * when sending outgoing requests.
+ *
+ * Note that this doesn't affect the Contact header generated by this
+ * dialog. Application must manually update the Contact header if
+ * necessary, to adjust the address according to the transport being
+ * selected.
+ *
+ * @param dlg	    The dialog instance.
+ * @param sel	    Transport selector containing the specification of
+ *		    transport or listener to be used by this dialog
+ *		    to send requests.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_set_transport(pjsip_dialog *dlg,
+					     const pjsip_tpselector *sel);
+
+
+/**
+ * Create a new (forked) dialog on receipt on forked response in rdata. 
+ * The new dialog will be created from original_dlg, except that it will have
+ * new remote tag as copied from the To header in the response. Upon return, 
+ * the new_dlg will have been registered to the user agent. Applications just 
+ * need to add modules as dialog's usages.
+ *
+ * Note that initially, the session count in the dialog will be initialized 
+ * to zero.
+ *
+ * @param original_dlg	    The original UAC dialog.
+ * @param rdata		    The incoming forked response message.
+ * @param new_dlg	    Pointer to receive the new dialog.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_fork(const pjsip_dialog *original_dlg,
+				    const pjsip_rx_data *rdata,
+				    pjsip_dialog **new_dlg );
+
+/**
+ * Forcefully terminate the dialog. Application can only call this function
+ * when there is no session associated to the dialog. If there are sessions
+ * that use this dialog, this function will refuse to terminate the dialog.
+ * For this case, application MUST call the appropriate termination function 
+ * for each dialog session (e.g. #pjsip_inv_terminate() to terminate INVITE
+ * session).
+ *
+ * @param dlg		    The dialog.
+ *
+ * @return		    PJ_SUCCESS if dialog has been terminated.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_terminate( pjsip_dialog *dlg );
+
+
+/**
+ * Set dialog's initial route set to route_set list. This can only be called
+ * for UAC dialog, before any request is sent. After dialog has been 
+ * established, the route set can not be changed.
+ *
+ * For UAS dialog,the route set will be initialized in pjsip_dlg_create_uas()
+ * from the Record-Route headers in the incoming request.
+ *
+ * The route_set argument is standard list of Route headers (i.e. with 
+ * sentinel).
+ *
+ * @param dlg		    The UAC dialog.
+ * @param route_set	    List of Route header.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_set_route_set( pjsip_dialog *dlg,
+					      const pjsip_route_hdr *route_set );
+
+/**
+ * Increment the number of sessions in the dialog. Note that initially 
+ * (after created) the dialog has the session counter set to zero.
+ *
+ * @param dlg		    The dialog.
+ * @param mod		    The module that increments the session counter.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_inc_session( pjsip_dialog *dlg,
+					    pjsip_module *mod);
+
+
+/**
+ * Decrement the number of sessions in the dialog. Once the session counter 
+ * reach zero and there is no pending transaction, the dialog will be 
+ * destroyed. Note that this function may destroy the dialog immediately 
+ * if there is no pending transaction when this function is called.
+ *
+ * @param dlg		    The dialog.
+ * @param mod		    The module that decrements the session counter.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_dec_session( pjsip_dialog *dlg,
+					    pjsip_module *mod);
+
+/**
+ * Add a module as dialog usage, and optionally set the module specific data.
+ *
+ * @param dlg		    The dialog.
+ * @param module	    The module to be registered as dialog usage.
+ * @param mod_data	    Optional arbitrary data to be attached to dialog's
+ *			    mod_data array at the module's index.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_add_usage( pjsip_dialog *dlg,
+					  pjsip_module *module,
+					  void *mod_data );
+
+/**
+ * Attach module specific data to the dialog. Application can also set 
+ * the value directly by accessing dlg->mod_data[module_id].
+ *
+ * @param dlg		    The dialog
+ * @param mod_id	    The ID of the module from which the data is to be
+ *			    set to the dialog.
+ * @param data		    Arbitrary data.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_set_mod_data( pjsip_dialog *dlg,
+					     int mod_id,
+					     void *data );
+
+/**
+ * Get module specific data previously attached to the dialog. Application
+ * can also get value directly by accessing dlg->mod_data[module_id].
+ *
+ * @param dlg		    The dialog
+ * @param mod_id	    The ID of the module from which the data is to be
+ *			    retrieved from the dialog.
+ *
+ * @return		    The data that was previously set, or NULL.
+ */
+PJ_DECL(void*) pjsip_dlg_get_mod_data( pjsip_dialog *dlg,
+				       int mod_id);
+
+
+/**
+ * Lock dialog and increment session counter termporarily, to prevent it 
+ * from being destroyed.
+ *
+ * @param dlg		    The dialog.
+ */
+PJ_DECL(void) pjsip_dlg_inc_lock( pjsip_dialog *dlg );
+
+/**
+ * Try to acquire dialog's lock, but return immediately if lock can not
+ * be acquired.
+ *
+ * @param dlg		    The dialog.
+ *
+ * @return		    PJ_SUCCESS if lock has been acquired.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_try_inc_lock( pjsip_dialog *dlg );
+
+/**
+ * Unlock dialog and decrement temporary session counter. After this function
+ * is called, dialog may be destroyed.
+ *
+ * @param dlg		    The dialog.
+ */
+PJ_DECL(void) pjsip_dlg_dec_lock( pjsip_dialog *dlg );
+
+
+/**
+ * Get the dialog instance in the incoming rdata. If an incoming message 
+ * matches an existing dialog, the user agent must have put the matching 
+ * dialog instance in the rdata, or otherwise this function will return 
+ * NULL if the message didn't match any existing dialog.
+ *
+ * This function can only be called after endpoint distributes the message
+ * to the transaction layer or UA layer. In other words, application can
+ * only call this function in the context of module that runs in priority
+ * number higher than PJSIP_MOD_PRIORITY_UA_PROXY_LAYER.
+ *
+ * @param rdata		    Incoming message buffer.
+ *
+ * @return		    The dialog instance that "owns" the message.
+ */
+PJ_DECL(pjsip_dialog*) pjsip_rdata_get_dlg( pjsip_rx_data *rdata );
+
+/**
+ * Get the associated dialog for the specified transaction, if any.
+ *
+ * @param tsx		    The transaction.
+ *
+ * @return		    The dialog instance which has been registered
+ *			    to the transaction as transaction user, or
+ *			    NULL if the transaction is outside any dialogs.
+ */
+PJ_DECL(pjsip_dialog*) pjsip_tsx_get_dlg( pjsip_transaction *tsx );
+
+
+/**
+ * Create a basic/generic request with the specified method and optionally
+ * specify the cseq. Use value -1 for cseq to have the dialog automatically
+ * put next cseq number for the request. Otherwise for some requests, 
+ * e.q. CANCEL and ACK, application must put the CSeq in the original 
+ * INVITE request as the parameter. 
+ *
+ * This function will also put Contact header where appropriate.
+ *
+ * @param dlg		    The dialog instance.
+ * @param method	    The method of the request.
+ * @param cseq		    Optional CSeq, which only needs to be specified
+ *			    when creating ACK and CANCEL. For other requests,
+ *			    specify -1 to use dialog's internal counter.
+ * @param tdata		    Pointer to receive the request's transmit
+ *			    data buffer.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_create_request(	pjsip_dialog *dlg,
+						const pjsip_method *method,
+						int cseq,
+						pjsip_tx_data **tdata);
+
+
+/**
+ * Send request message to remote peer. If the request is not an ACK request, 
+ * the dialog will send the request statefully, by creating an UAC transaction
+ * and send the request with the transaction. 
+ *
+ * Also when the request is not ACK or CANCEL, the dialog will increment its
+ * local cseq number and update the cseq in the request according to dialog's 
+ * cseq.
+ *
+ * If p_tsx is not null, this argument will be set with the transaction 
+ * instance that was used to send the request.
+ *
+ * This function will decrement the transmit data's reference counter
+ * regardless the status of the operation.
+ *
+ * @param dlg		    The dialog.
+ * @param tdata		    The request message to be sent.
+ * @param mod_data_id	    Optional module data index to put an optional data
+ *			    into the transaction. If no module data is to be
+ *			    attached, this value should be -1.
+ * @param mod_data	    Optional module data to be attached to the 
+ *			    transaction at mod_data_id index.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_send_request (	pjsip_dialog *dlg,
+						pjsip_tx_data *tdata,
+						int mod_data_id,
+						void *mod_data);
+
+
+/**
+ * Create a response message for the incoming request in rdata with status
+ * code st_code and optional status text st_text. This function is different
+ * than endpoint's API #pjsip_endpt_create_response() in that the dialog 
+ * function adds Contact header and Record-Routes headers in the response 
+ * where appropriate.
+ *
+ * @param dlg		    The dialog.
+ * @param rdata		    The incoming request message for which the
+ *			    response will be created.
+ * @param st_code	    Status code.
+ * @param st_text	    Optional string for custom status reason text.
+ * @param tdata		    Pointer to receive the response message transmit
+ *			    data buffer.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_create_response(	pjsip_dialog *dlg,
+						pjsip_rx_data *rdata,
+						int st_code,
+						const pj_str_t *st_text,
+						pjsip_tx_data **tdata);
+
+
+/**
+ * Modify previously sent response with other status code. Contact header 
+ * will be added when appropriate.
+ *
+ * @param dlg		    The dialog.
+ * @param tdata		    The transmit data buffer containing response
+ *			    message to be modified.
+ * @param st_code	    New status code to be set.
+ * @param st_text	    Optional string for custom status reason text.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_modify_response(	pjsip_dialog *dlg,
+						pjsip_tx_data *tdata,
+						int st_code,
+						const pj_str_t *st_text);
+
+
+/**
+ * Send response message statefully. The transaction instance MUST be the 
+ * transaction that was reported on on_rx_request() callback.
+ *
+ * This function decrements the transmit data's reference counter regardless
+ * the status of the operation.
+ *
+ * @param dlg		    The dialog.
+ * @param tsx		    The UAS transaction associated with the incoming
+ *			    request. If the request is within a dialog, or
+ *			    a dialog has been created for the request that
+ *			    creates the dialog, application can get the
+ *			    transaction instance for the request by calling
+ *			    #pjsip_rdata_get_tsx().
+ * @param tdata		    Response message to be sent.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_send_response(	pjsip_dialog *dlg,
+						pjsip_transaction *tsx,
+						pjsip_tx_data *tdata);
+
+
+/**
+ * This composite function sends response message statefully to an incoming
+ * request message inside dialog.
+ *
+ * @param dlg	    The endpoint instance.
+ * @param rdata	    The incoming request message.
+ * @param st_code   Status code of the response.
+ * @param st_text   Optional status text of the response.
+ * @param hdr_list  Optional header list to be added to the response.
+ * @param body	    Optional message body to be added to the response.
+ *
+ * @return	    PJ_SUCCESS if response message has successfully been
+ *		    sent.
+ */
+PJ_DECL(pj_status_t) pjsip_dlg_respond( pjsip_dialog *dlg,
+					pjsip_rx_data *rdata,
+					int st_code,
+					const pj_str_t *st_text,
+					const pjsip_hdr *hdr_list,
+					const pjsip_msg_body *body );
+
+
+/**
+ * @}
+ */
+
+/* 
+ * Internal (called by sip_ua_layer.c)
+ */
+
+/* Receives transaction event (called by user_agent module) */
+void pjsip_dlg_on_tsx_state( pjsip_dialog *dlg,
+			     pjsip_transaction *tsx,
+			     pjsip_event *e );
+
+void pjsip_dlg_on_rx_request( pjsip_dialog *dlg,
+			      pjsip_rx_data *rdata );
+
+void pjsip_dlg_on_rx_response( pjsip_dialog *dlg,
+			       pjsip_rx_data *rdata );
+
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJSIP_SIP_DIALOG_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_endpoint.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_endpoint.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_endpoint.h	(revision 1163)
@@ -0,0 +1,535 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_ENDPOINT_H__
+#define __PJSIP_SIP_ENDPOINT_H__
+
+/**
+ * @file sip_endpoint.h
+ * @brief SIP Endpoint.
+ */
+
+#include <pjsip/sip_transport.h>
+#include <pjsip/sip_resolve.h>
+
+/**
+ * @defgroup PJSIP_CORE_CORE At the Very Core
+ * @ingroup PJSIP_CORE
+ * @brief The very core of PJSIP.
+ */
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_ENDPT Endpoint
+ * @ingroup PJSIP_CORE_CORE
+ * @brief The master, owner of all objects
+ *
+ * SIP Endpoint instance (pjsip_endpoint) can be viewed as the master/owner of
+ * all SIP objects in an application. It performs the following roles:
+ *  - it manages the allocation/deallocation of memory pools for all objects.
+ *  - it manages listeners and transports, and how they are used by 
+ *    transactions.
+ *  - it receives incoming messages from transport layer and automatically
+ *    dispatches them to the correct transaction (or create a new one).
+ *  - it has a single instance of timer management (timer heap).
+ *  - it manages modules, which is the primary means of extending the library.
+ *  - it provides single polling function for all objects and distributes 
+ *    events.
+ *  - it automatically handles incoming requests which can not be handled by
+ *    existing modules (such as when incoming request has unsupported method).
+ *  - and so on..
+ *
+ * Theoritically application can have multiple instances of SIP endpoint, 
+ * although it's not clear why application may want to do it.
+ *
+ * @{
+ */
+
+/**
+ * Create an instance of SIP endpoint from the specified pool factory.
+ * The pool factory reference then will be kept by the endpoint, so that 
+ * future memory allocations by SIP components will be taken from the same
+ * pool factory.
+ *
+ * @param pf	        Pool factory that will be used for the lifetime of 
+ *                      endpoint.
+ * @param name          Optional name to be specified for the endpoint.
+ *                      If this parameter is NULL, then the name will use
+ *                      local host name.
+ * @param endpt         Pointer to receive endpoint instance.
+ *
+ * @return              PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_create(pj_pool_factory *pf,
+					const char *name,
+                                        pjsip_endpoint **endpt);
+
+/**
+ * Destroy endpoint instance. Application must make sure that all pending
+ * transactions have been terminated properly, because this function does not
+ * check for the presence of pending transactions.
+ *
+ * @param endpt		The SIP endpoint to be destroyed.
+ */
+PJ_DECL(void) pjsip_endpt_destroy(pjsip_endpoint *endpt);
+
+/**
+ * Get endpoint name.
+ *
+ * @param endpt         The SIP endpoint instance.
+ *
+ * @return              Endpoint name, as was registered during endpoint
+ *                      creation. The string is NULL terminated.
+ */
+PJ_DECL(const pj_str_t*) pjsip_endpt_name(const pjsip_endpoint *endpt);
+
+/**
+ * Poll for events. Application must call this function periodically to ensure
+ * that all events from both transports and timer heap are handled in timely
+ * manner.  This function, like all other endpoint functions, is thread safe, 
+ * and application may have more than one thread concurrently calling this function.
+ *
+ * @param endpt		The endpoint.
+ * @param max_timeout	Maximum time to wait for events, or NULL to wait forever
+ *			until event is received.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_handle_events( pjsip_endpoint *endpt, 
+					        const pj_time_val *max_timeout);
+
+
+/**
+ * Handle events with additional info about number of events that
+ * have been handled.
+ *
+ * @param endpt		The endpoint.
+ * @param max_timeout	Maximum time to wait for events, or NULL to wait forever
+ *			until event is received.
+ * @param count		Optional argument to receive the number of events that
+ *			have been handled by the function.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_handle_events2(pjsip_endpoint *endpt,
+					        const pj_time_val *max_timeout,
+					        unsigned *count);
+/**
+ * Schedule timer to endpoint's timer heap. Application must poll the endpoint
+ * periodically (by calling #pjsip_endpt_handle_events) to ensure that the
+ * timer events are handled in timely manner. When the timeout for the timer
+ * has elapsed, the callback specified in the entry argument will be called.
+ * This function, like all other endpoint functions, is thread safe.
+ *
+ * @param endpt	    The endpoint.
+ * @param entry	    The timer entry.
+ * @param delay	    The relative delay of the timer.
+ * @return	    PJ_OK (zero) if successfull.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_schedule_timer( pjsip_endpoint *endpt,
+						 pj_timer_entry *entry,
+						 const pj_time_val *delay );
+
+/**
+ * Cancel the previously registered timer.
+ * This function, like all other endpoint functions, is thread safe.
+ *
+ * @param endpt	    The endpoint.
+ * @param entry	    The timer entry previously registered.
+ */
+PJ_DECL(void) pjsip_endpt_cancel_timer( pjsip_endpoint *endpt, 
+					pj_timer_entry *entry );
+
+/**
+ * Get the timer heap instance of the SIP endpoint.
+ *
+ * @param endpt	    The endpoint.
+ *
+ * @return	    The timer heap instance.
+ */
+PJ_DECL(pj_timer_heap_t*) pjsip_endpt_get_timer_heap(pjsip_endpoint *endpt);
+
+
+/**
+ * Register new module to the endpoint.
+ * The endpoint will then call the load and start function in the module to 
+ * properly initialize the module, and assign a unique module ID for the 
+ * module.
+ *
+ * @param endpt		The endpoint.
+ * @param module	The module to be registered.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_register_module( pjsip_endpoint *endpt,
+						  pjsip_module *module );
+
+/**
+ * Unregister a module from the endpoint.
+ * The endpoint will then call the stop and unload function in the module to 
+ * properly shutdown the module.
+ *
+ * @param endpt		The endpoint.
+ * @param module	The module to be registered.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_unregister_module( pjsip_endpoint *endpt,
+						    pjsip_module *module );
+
+
+/**
+ * Create pool from the endpoint. All SIP components should allocate their
+ * memory pool by calling this function, to make sure that the pools are
+ * allocated from the same pool factory. This function, like all other endpoint
+ * functions, is thread safe.
+ *
+ * @param endpt		The SIP endpoint.
+ * @param pool_name	Name to be assigned to the pool.
+ * @param initial	The initial size of the pool.
+ * @param increment	The resize size.
+ * @return		Memory pool, or NULL on failure.
+ *
+ * @see pj_pool_create
+ */
+PJ_DECL(pj_pool_t*) pjsip_endpt_create_pool( pjsip_endpoint *endpt,
+					     const char *pool_name,
+					     pj_size_t initial,
+					     pj_size_t increment );
+
+/**
+ * Return back pool to endpoint to be released back to the pool factory.
+ * This function, like all other endpoint functions, is thread safe.
+ *
+ * @param endpt	    The endpoint.
+ * @param pool	    The pool to be destroyed.
+ */
+PJ_DECL(void) pjsip_endpt_release_pool( pjsip_endpoint *endpt,
+					pj_pool_t *pool );
+
+/**
+ * Create a new transaction. After creating the transaction, application MUST
+ * initialize the transaction as either UAC or UAS (by calling
+ * #pjsip_tsx_init_uac or #pjsip_tsx_init_uas), then must register the 
+ * transaction to endpoint with #pjsip_endpt_register_tsx.
+ * This function, like all other endpoint functions, is thread safe.
+ *
+ * @param endpt	    The SIP endpoint.
+ * @param p_tsx	    Pointer to receive the transaction.
+ *
+ * @return	    PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_create_tsx(pjsip_endpoint *endpt,
+					    pjsip_transaction **p_tsx);
+
+/**
+ * Find transaction in endpoint's transaction table by the transaction's key.
+ * This function normally is only used by modules. The key for a transaction
+ * can be created by calling #pjsip_tsx_create_key.
+ *
+ * @param endpt	    The endpoint instance.
+ * @param key	    Transaction key, as created with #pjsip_tsx_create_key.
+ *
+ * @return	    The transaction, or NULL if it's not found.
+ */
+PJ_DECL(pjsip_transaction*) pjsip_endpt_find_tsx( pjsip_endpoint *endpt,
+					          const pj_str_t *key );
+
+/**
+ * Register the transaction to the endpoint's transaction table.
+ * This function should only be used internally by the stack.
+ *
+ * @param endpt	    The SIP endpoint.
+ * @param tsx	    The transaction.
+ */
+PJ_DECL(void) pjsip_endpt_register_tsx( pjsip_endpoint *endpt,
+					pjsip_transaction *tsx);
+
+/**
+ * Forcefull destroy the transaction. This function should only be used
+ * internally by the stack.
+ *
+ * @param endpt	    The endpoint.
+ * @param tsx	    The transaction to destroy.
+ */
+PJ_DECL(void) pjsip_endpt_destroy_tsx( pjsip_endpoint *endpt,
+				      pjsip_transaction *tsx);
+
+/**
+ * Create a new transmit data buffer.
+ * This function, like all other endpoint functions, is thread safe.
+ *
+ * @param endpt	    The endpoint.
+ * @param p_tdata    Pointer to receive transmit data buffer.
+ *
+ * @return	    PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_create_tdata( pjsip_endpoint *endpt,
+					       pjsip_tx_data **p_tdata);
+
+/**
+ * Create the DNS resolver instance. Application creates the DNS
+ * resolver instance, set the nameserver to be used by the DNS
+ * resolver, then set the DNS resolver to be used by the endpoint
+ * by calling #pjsip_endpt_set_resolver().
+ *
+ * @param endpt		The SIP endpoint instance.
+ * @param p_resv	Pointer to receive the DNS resolver instance.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error
+ *			code.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_create_resolver(pjsip_endpoint *endpt,
+						 pj_dns_resolver **p_resv);
+
+/**
+ * Set DNS resolver to be used by the SIP resolver. Application can set
+ * the resolver instance to NULL to disable DNS resolution (perhaps
+ * temporarily). When DNS resolver is disabled, the endpoint will resolve
+ * hostnames with the normal pj_gethostbyname() function.
+ *
+ * @param endpt		The SIP endpoint instance.
+ * @param resv		The resolver instance to be used by the SIP
+ *			endpoint.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error
+ *			code.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_set_resolver(pjsip_endpoint *endpt,
+					      pj_dns_resolver *resv);
+
+/**
+ * Get the DNS resolver being used by the SIP resolver.
+ *
+ * @param endpt		The SIP endpoint instance.
+ *
+ * @return		The DNS resolver instance currently being used
+ *			by the SIP endpoint.
+ */
+PJ_DECL(pj_dns_resolver*) pjsip_endpt_get_resolver(pjsip_endpoint *endpt);
+
+/**
+ * Asynchronously resolve a SIP target host or domain according to rule 
+ * specified in RFC 3263 (Locating SIP Servers). When the resolving operation
+ * has completed, the callback will be called.
+ *
+ * @param endpt	    The endpoint instance.
+ * @param pool	    The pool to allocate resolver job.
+ * @param target    The target specification to be resolved.
+ * @param token	    A user defined token to be passed back to callback function.
+ * @param cb	    The callback function.
+ */
+PJ_DECL(void) pjsip_endpt_resolve( pjsip_endpoint *endpt,
+				   pj_pool_t *pool,
+				   pjsip_host_info *target,
+				   void *token,
+				   pjsip_resolver_callback *cb);
+
+/**
+ * Get transport manager instance.
+ *
+ * @param endpt	    The endpoint.
+ *
+ * @return	    Transport manager instance.
+ */
+PJ_DECL(pjsip_tpmgr*) pjsip_endpt_get_tpmgr(pjsip_endpoint *endpt);
+
+/**
+ * Get ioqueue instance.
+ *
+ * @param endpt	    The endpoint.
+ *
+ * @return	    The ioqueue.
+ */
+PJ_DECL(pj_ioqueue_t*) pjsip_endpt_get_ioqueue(pjsip_endpoint *endpt);
+
+/**
+ * Find a SIP transport suitable for sending SIP message to the specified
+ * address. If transport selector ("sel") is set, then the function will
+ * check if the transport selected is suitable to send requests to the
+ * specified address.
+ *
+ * @see pjsip_tpmgr_acquire_transport
+ *
+ * @param endpt	    The SIP endpoint instance.
+ * @param type	    The type of transport to be acquired.
+ * @param remote    The remote address to send message to.
+ * @param addr_len  Length of the remote address.
+ * @param sel	    Optional pointer to transport selector instance which is
+ *		    used to find explicit transport, if required.
+ * @param p_tp	    Pointer to receive the transport instance, if one is found.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) 
+pjsip_endpt_acquire_transport( pjsip_endpoint *endpt,
+			       pjsip_transport_type_e type,
+			       const pj_sockaddr_t *remote,
+			       int addr_len,
+			       const pjsip_tpselector *sel,
+			       pjsip_transport **p_tp);
+
+
+/*****************************************************************************
+ *
+ * Capabilities Management
+ *
+ * Modules may implement new capabilities to the stack. These capabilities
+ * are indicated by the appropriate SIP header fields, such as Accept,
+ * Accept-Encoding, Accept-Language, Allow, Supported, etc.
+ *
+ * When a module provides new capabilities to the stack, it registers these
+ * capabilities to the endpoint by supplying new tags (strings) to the
+ * appropriate header fields. Application (or other modules) can then query
+ * these header fields to get the list of supported capabilities, and may
+ * include these headers in the outgoing message.
+ *****************************************************************************
+ */
+
+/**
+ * Get the value of the specified capability header field.
+ *
+ * @param endpt	    The endpoint.
+ * @param htype	    The header type to be retrieved, which value may be:
+ *		    - PJSIP_H_ACCEPT
+ *		    - PJSIP_H_ALLOW
+ *		    - PJSIP_H_SUPPORTED
+ * @param hname	    If htype specifies PJSIP_H_OTHER, then the header name
+ *		    must be supplied in this argument. Otherwise the value
+ *		    must be set to NULL.
+ *
+ * @return	    The appropriate header, or NULL if the header is not
+ *		    available.
+ */
+PJ_DECL(const pjsip_hdr*) pjsip_endpt_get_capability( pjsip_endpoint *endpt,
+						      int htype,
+						      const pj_str_t *hname);
+
+
+/**
+ * Check if we have the specified capability.
+ *
+ * @param endpt	    The endpoint.
+ * @param htype	    The header type to be retrieved, which value may be:
+ *		    - PJSIP_H_ACCEPT
+ *		    - PJSIP_H_ALLOW
+ *		    - PJSIP_H_SUPPORTED
+ * @param hname	    If htype specifies PJSIP_H_OTHER, then the header name
+ *		    must be supplied in this argument. Otherwise the value
+ *		    must be set to NULL.
+ * @param token	    The capability token to check. For example, if \a htype
+ *		    is PJSIP_H_ALLOW, then \a token specifies the method
+ *		    names; if \a htype is PJSIP_H_SUPPORTED, then \a token
+ *		    specifies the extension names such as "100rel".
+ *
+ * @return	    PJ_TRUE if the specified capability is supported,
+ *		    otherwise PJ_FALSE..
+ */
+PJ_DECL(pj_bool_t) pjsip_endpt_has_capability( pjsip_endpoint *endpt,
+					       int htype,
+					       const pj_str_t *hname,
+					       const pj_str_t *token);
+
+
+/**
+ * Add or register new capabilities as indicated by the tags to the
+ * appropriate header fields in the endpoint.
+ *
+ * @param endpt	    The endpoint.
+ * @param mod	    The module which registers the capability.
+ * @param htype	    The header type to be set, which value may be:
+ *		    - PJSIP_H_ACCEPT
+ *		    - PJSIP_H_ALLOW
+ *		    - PJSIP_H_SUPPORTED
+ * @param hname	    If htype specifies PJSIP_H_OTHER, then the header name
+ *		    must be supplied in this argument. Otherwise the value
+ *		    must be set to NULL.
+ * @param count	    The number of tags in the array.
+ * @param tags	    Array of tags describing the capabilities or extensions
+ *		    to be added to the appropriate header.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_add_capability( pjsip_endpoint *endpt,
+						 pjsip_module *mod,
+						 int htype,
+						 const pj_str_t *hname,
+						 unsigned count,
+						 const pj_str_t tags[]);
+
+/**
+ * Get list of additional headers to be put in outgoing request message.
+ * Currently only Max-Forwards are defined.
+ *
+ * @param e	    The endpoint.
+ *
+ * @return	    List of headers.
+ */
+PJ_DECL(const pjsip_hdr*) pjsip_endpt_get_request_headers(pjsip_endpoint *e);
+
+
+/**
+ * Dump endpoint status to the log. This will print the status to the log
+ * with log level 3.
+ *
+ * @param endpt		The endpoint.
+ * @param detail	If non zero, then it will dump a detailed output.
+ *			BEWARE that this option may crash the system because
+ *			it tries to access all memory pools.
+ */
+PJ_DECL(void) pjsip_endpt_dump( pjsip_endpoint *endpt, pj_bool_t detail );
+
+
+
+/**
+ * @}
+ */
+
+
+/**
+ * Log an error.
+ */
+PJ_DECL(void) pjsip_endpt_log_error( pjsip_endpoint *endpt,
+				     const char *sender,
+                                     pj_status_t error_code,
+                                     const char *format,
+                                     ... );
+
+#define PJSIP_ENDPT_LOG_ERROR(expr)   \
+            pjsip_endpt_log_error expr
+
+#define PJSIP_ENDPT_TRACE(tracing,expr) \
+            do {                        \
+                if ((tracing))          \
+                    PJ_LOG(4,expr);     \
+            } while (0)
+
+/*
+ * Internal functions.
+ */
+/*
+ * Receive transaction events from transactions and put in the event queue
+ * to be processed later.
+ */
+void pjsip_endpt_send_tsx_event( pjsip_endpoint *endpt, pjsip_event *evt );
+
+PJ_END_DECL
+
+#endif	/* __PJSIP_SIP_ENDPOINT_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_errno.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_errno.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_errno.h	(revision 1163)
@@ -0,0 +1,493 @@
+/* $Id$  */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_ERRNO_H__
+#define __PJSIP_SIP_ERRNO_H__
+
+/**
+ * @file sip_errno.h
+ * @brief PJSIP Specific Error Code
+ */
+
+#include <pj/errno.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_CORE_ERRNO PJSIP Specific Error Code
+ * @ingroup PJSIP_BASE
+ * @brief PJSIP specific error constants.
+ * @{
+ */
+
+/*
+ * PJSIP error codes occupies 170000 - 219000, and mapped as follows:
+ *  - 170100 - 170799: mapped to SIP status code in response msg.
+ *  - 171000 - 171999: mapped to errors generated from PJSIP core.
+ */
+
+/**
+ * Start of error code relative to PJ_ERRNO_START_USER.
+ */
+#define PJSIP_ERRNO_START       (PJ_ERRNO_START_USER)
+
+/**
+ * Create error value from SIP status code.
+ * @param code      SIP status code.
+ * @return          Error code in pj_status_t namespace.
+ */
+#define PJSIP_ERRNO_FROM_SIP_STATUS(code)   (PJSIP_ERRNO_START+code)
+
+/**
+ * Get SIP status code from error value.
+ * If conversion to SIP status code is not available, a SIP status code
+ * 599 will be returned.
+ *
+ * @param status    Error code in pj_status_t namespace.
+ * @return          SIP status code.
+ */
+#define PJSIP_ERRNO_TO_SIP_STATUS(status)               \
+         ((status>=PJSIP_ERRNO_FROM_SIP_STATUS(100) &&  \
+           status<PJSIP_ERRNO_FROM_SIP_STATUS(800)) ?   \
+          status-PJSIP_ERRNO_FROM_SIP_STATUS(0) : 599)
+
+
+/**
+ * Start of PJSIP generated error code values.
+ */
+#define PJSIP_ERRNO_START_PJSIP (PJSIP_ERRNO_START + 1000)
+
+/************************************************************
+ * GENERIC/GENERAL SIP ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * SIP object is busy.
+ */
+#define PJSIP_EBUSY		(PJSIP_ERRNO_START_PJSIP + 1)	/* 171001 */
+/**
+ * @hideinitializer
+ * SIP object with the same type already exists.
+ */
+#define PJSIP_ETYPEEXISTS	(PJSIP_ERRNO_START_PJSIP + 2)	/* 171002 */
+/**
+ * @hideinitializer
+ * SIP stack is shutting down.
+ */
+#define PJSIP_ESHUTDOWN		(PJSIP_ERRNO_START_PJSIP + 3)	/* 171003 */
+/**
+ * @hideinitializer
+ * SIP object is not initialized.
+ */
+#define PJSIP_ENOTINITIALIZED	(PJSIP_ERRNO_START_PJSIP + 4)	/* 171004 */
+
+
+/************************************************************
+ * MESSAGING ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * General invalid message error (e.g. syntax error)
+ */
+#define PJSIP_EINVALIDMSG       (PJSIP_ERRNO_START_PJSIP + 20)	/* 171020 */
+/**
+ * @hideinitializer
+ * Expecting request message.
+ */
+#define PJSIP_ENOTREQUESTMSG	(PJSIP_ERRNO_START_PJSIP + 21)	/* 171021 */
+/**
+ * @hideinitializer
+ * Expecting response message.
+ */
+#define PJSIP_ENOTRESPONSEMSG	(PJSIP_ERRNO_START_PJSIP + 22)	/* 171022 */
+/**
+ * @hideinitializer
+ * Message too long. See also PJSIP_ERXOVERFLOW.
+ */
+#define PJSIP_EMSGTOOLONG	(PJSIP_ERRNO_START_PJSIP + 23)	/* 171023 */
+/**
+ * @hideinitializer
+ * Message not completely received.
+ */
+#define PJSIP_EPARTIALMSG       (PJSIP_ERRNO_START_PJSIP + 24)	/* 171024 */
+
+/**
+ * @hideinitializer
+ * Status code is invalid.
+ */
+#define PJSIP_EINVALIDSTATUS	(PJSIP_ERRNO_START_PJSIP + 30)	/* 171030 */
+
+/**
+ * @hideinitializer
+ * General Invalid URI error.
+ */
+#define PJSIP_EINVALIDURI	(PJSIP_ERRNO_START_PJSIP + 39)	/* 171039 */
+/**
+ * @hideinitializer
+ * Unsupported URL scheme.
+ */
+#define PJSIP_EINVALIDSCHEME    (PJSIP_ERRNO_START_PJSIP + 40)	/* 171040 */
+/**
+ * @hideinitializer
+ * Missing Request-URI.
+ */
+#define PJSIP_EMISSINGREQURI    (PJSIP_ERRNO_START_PJSIP + 41)	/* 171041 */
+/**
+ * @hideinitializer
+ * Invalid request URI.
+ */
+#define PJSIP_EINVALIDREQURI	(PJSIP_ERRNO_START_PJSIP + 42)	/* 171042 */
+/**
+ * @hideinitializer
+ * URI is too long.
+ */
+#define PJSIP_EURITOOLONG	(PJSIP_ERRNO_START_PJSIP + 43)	/* 171043 */
+
+/**
+ * @hideinitializer
+ * Missing required header(s).
+ */
+#define PJSIP_EMISSINGHDR       (PJSIP_ERRNO_START_PJSIP + 50)	/* 171050 */
+/**
+ * @hideinitializer
+ * Invalid header field.
+ */
+#define PJSIP_EINVALIDHDR	(PJSIP_ERRNO_START_PJSIP + 51)	/* 171051 */
+/**
+ * @hideinitializer
+ * Invalid Via header in response (sent-by, etc).
+ */
+#define PJSIP_EINVALIDVIA	(PJSIP_ERRNO_START_PJSIP + 52)	/* 171052 */
+/**
+ * @hideinitializer
+ * Multiple Via headers in response.
+ */
+#define PJSIP_EMULTIPLEVIA	(PJSIP_ERRNO_START_PJSIP + 53)	/* 171053 */
+/**
+ * @hideinitializer
+ * Missing message body.
+ */
+#define PJSIP_EMISSINGBODY	(PJSIP_ERRNO_START_PJSIP + 54)	/* 171054 */
+/**
+ * @hideinitializer
+ * Invalid/unexpected method.
+ */
+#define PJSIP_EINVALIDMETHOD	(PJSIP_ERRNO_START_PJSIP + 55)	/* 171055 */
+
+
+/************************************************************
+ * TRANSPORT ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Unsupported transport type.
+ */
+#define PJSIP_EUNSUPTRANSPORT	(PJSIP_ERRNO_START_PJSIP + 60)	/* 171060 */
+/**
+ * @hideinitializer
+ * Buffer is being sent, operation still pending.
+ */
+#define PJSIP_EPENDINGTX	(PJSIP_ERRNO_START_PJSIP + 61)	/* 171061 */
+/**
+ * @hideinitializer
+ * Rx buffer overflow. See also PJSIP_EMSGTOOLONG.
+ */
+#define PJSIP_ERXOVERFLOW       (PJSIP_ERRNO_START_PJSIP + 62)	/* 171062 */
+/**
+ * @hideinitializer
+ * This is not really an error, it just informs application that
+ * transmit data has been deleted on return of pjsip_tx_data_dec_ref().
+ */
+#define PJSIP_EBUFDESTROYED     (PJSIP_ERRNO_START_PJSIP + 63)	/* 171063 */
+/**
+ * @hideinitializer
+ * Unsuitable transport selected. This error occurs when application
+ * has explicitly requested to use a particular transport/listener,
+ * but the selected transport is not suitable to send request to
+ * the specified destination.
+ */
+#define PJSIP_ETPNOTSUITABLE	(PJSIP_ERRNO_START_PJSIP + 64)	/* 171064 */
+
+
+/************************************************************
+ * TRANSACTION ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Transaction has just been destroyed.
+ */
+#define PJSIP_ETSXDESTROYED     (PJSIP_ERRNO_START_PJSIP + 70)	/* 171070 */
+/**
+ * @hideinitializer
+ * No transaction.
+ */
+#define PJSIP_ENOTSX		(PJSIP_ERRNO_START_PJSIP + 71)	/* 171071 */
+
+
+/************************************************************
+ * URI COMPARISON RESULTS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Scheme mismatch.
+ */
+#define PJSIP_ECMPSCHEME	(PJSIP_ERRNO_START_PJSIP + 80)	/* 171080 */
+/**
+ * @hideinitializer
+ * User part mismatch.
+ */
+#define PJSIP_ECMPUSER		(PJSIP_ERRNO_START_PJSIP + 81)	/* 171081 */
+/**
+ * @hideinitializer
+ * Password part mismatch.
+ */
+#define PJSIP_ECMPPASSWD	(PJSIP_ERRNO_START_PJSIP + 82)	/* 171082 */
+/**
+ * @hideinitializer
+ * Host part mismatch.
+ */
+#define PJSIP_ECMPHOST		(PJSIP_ERRNO_START_PJSIP + 83)	/* 171083 */
+/**
+ * @hideinitializer
+ * Port part mismatch.
+ */
+#define PJSIP_ECMPPORT		(PJSIP_ERRNO_START_PJSIP + 84)	/* 171084 */
+/**
+ * @hideinitializer
+ * Transport parameter part mismatch.
+ */
+#define PJSIP_ECMPTRANSPORTPRM	(PJSIP_ERRNO_START_PJSIP + 85)	/* 171085 */
+/**
+ * @hideinitializer
+ * TTL parameter part mismatch.
+ */
+#define PJSIP_ECMPTTLPARAM	(PJSIP_ERRNO_START_PJSIP + 86)	/* 171086 */
+/**
+ * @hideinitializer
+ * User parameter part mismatch.
+ */
+#define PJSIP_ECMPUSERPARAM	(PJSIP_ERRNO_START_PJSIP + 87)	/* 171087 */
+/**
+ * @hideinitializer
+ * Method parameter part mismatch.
+ */
+#define PJSIP_ECMPMETHODPARAM	(PJSIP_ERRNO_START_PJSIP + 88)	/* 171088 */
+/**
+ * @hideinitializer
+ * Maddr parameter part mismatch.
+ */
+#define PJSIP_ECMPMADDRPARAM	(PJSIP_ERRNO_START_PJSIP + 89)	/* 171089 */
+/**
+ * @hideinitializer
+ * Parameter part in other_param mismatch.
+ */
+#define PJSIP_ECMPOTHERPARAM	(PJSIP_ERRNO_START_PJSIP + 90)	/* 171090 */
+/**
+ * @hideinitializer
+ * Parameter part in header_param mismatch.
+ */
+#define PJSIP_ECMPHEADERPARAM	(PJSIP_ERRNO_START_PJSIP + 91)	/* 171091 */
+
+
+/************************************************************
+ * AUTHENTICATION FRAMEWORK
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Credential failed to authenticate. For this failure, right credential
+ * for the realm has been found and used to authenticate against the challenge,
+ * but the server has rejected the authorization request with 401/407 response
+ * (either with no stale parameter or with "stale=false" parameter). In most
+ * cases, this indicates that the username/password combination is incorrect.
+ */
+#define PJSIP_EFAILEDCREDENTIAL	(PJSIP_ERRNO_START_PJSIP + 100)	/* 171100 */
+/**
+ * @hideinitializer
+ * No suitable credential is found to authenticate the request against 
+ * the received authentication challenge in 401/407 response. This often
+ * is caused by different realm supplied in the credential than the realm
+ * found in the challenge.
+ */
+#define PJSIP_ENOCREDENTIAL	(PJSIP_ERRNO_START_PJSIP + 101)	/* 171101 */
+/**
+ * @hideinitializer
+ * Invalid/unsupported algorithm.
+ */
+#define PJSIP_EINVALIDALGORITHM	(PJSIP_ERRNO_START_PJSIP + 102)	/* 171102 */
+/**
+ * @hideinitializer
+ * Invalid/unsupported qop.
+ */
+#define PJSIP_EINVALIDQOP	(PJSIP_ERRNO_START_PJSIP + 103)	/* 171103 */
+/**
+ * @hideinitializer
+ * Invalid/unsupported authentication scheme.
+ */
+#define PJSIP_EINVALIDAUTHSCHEME (PJSIP_ERRNO_START_PJSIP + 104)/* 171104 */
+/**
+ * @hideinitializer
+ * No previous challenge.
+ */
+#define PJSIP_EAUTHNOPREVCHAL	(PJSIP_ERRNO_START_PJSIP + 105)	/* 171105 */
+/**
+ * @hideinitializer
+ * No authorization is found.
+ */
+#define PJSIP_EAUTHNOAUTH	(PJSIP_ERRNO_START_PJSIP + 106)	/* 171106 */
+/**
+ * @hideinitializer
+ * Account not found.
+ */
+#define PJSIP_EAUTHACCNOTFOUND	(PJSIP_ERRNO_START_PJSIP + 107)	/* 171107 */
+/**
+ * @hideinitializer
+ * Account is disabled.
+ */
+#define PJSIP_EAUTHACCDISABLED	(PJSIP_ERRNO_START_PJSIP + 108)	/* 171108 */
+/**
+ * @hideinitializer
+ * Invalid realm.
+ */
+#define PJSIP_EAUTHINVALIDREALM	(PJSIP_ERRNO_START_PJSIP + 109)	/* 171109 */
+/**
+ * @hideinitializer
+ * Invalid digest.
+ */
+#define PJSIP_EAUTHINVALIDDIGEST (PJSIP_ERRNO_START_PJSIP+110)	/* 171110 */
+/**
+ * @hideinitializer
+ * Maximum number of stale retries exceeded. This happens when server 
+ * keeps rejecting our authorization request with stale=true.
+ */
+#define PJSIP_EAUTHSTALECOUNT	(PJSIP_ERRNO_START_PJSIP + 111)	/* 171111 */
+
+
+/************************************************************
+ * UA AND DIALOG ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Missing From/To tag.
+ */
+#define PJSIP_EMISSINGTAG	 (PJSIP_ERRNO_START_PJSIP+120)	/* 171120 */
+/**
+ * @hideinitializer
+ * Expecting REFER method
+ */
+#define PJSIP_ENOTREFER		 (PJSIP_ERRNO_START_PJSIP+121)	/* 171121 */
+/**
+ * @hideinitializer
+ * Not associated with REFER subscription
+ */
+#define PJSIP_ENOREFERSESSION	 (PJSIP_ERRNO_START_PJSIP+122)	/* 171122 */
+
+/************************************************************
+ * INVITE SESSIONS ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Session already terminated.
+ */
+#define PJSIP_ESESSIONTERMINATED (PJSIP_ERRNO_START_PJSIP+140)	/* 171140 */
+/**
+ * @hideinitializer
+ * Invalid session state for the specified operation.
+ */
+#define PJSIP_ESESSIONSTATE	 (PJSIP_ERRNO_START_PJSIP+141)	/* 171141 */
+
+
+/************************************************************
+ * TLS TRANSPORT ERRORS
+ ***********************************************************/
+/**
+ * @hideinitializer
+ * Unknown TLS error
+ */
+#define PJSIP_TLS_EUNKNOWN	(PJSIP_ERRNO_START_PJSIP+160)	/* 171160 */
+/**
+ * @hideinitializer
+ * Invalid SSL protocol method.
+ */
+#define PJSIP_TLS_EINVMETHOD	(PJSIP_ERRNO_START_PJSIP+161)	/* 171161 */
+/**
+ * @hideinitializer
+ * Error loading/verifying SSL CA list file.
+ */
+#define PJSIP_TLS_ECACERT	(PJSIP_ERRNO_START_PJSIP+162)	/* 171162 */
+/**
+ * @hideinitializer
+ * Error loading SSL certificate chain file.
+ */
+#define PJSIP_TLS_ECERTFILE	(PJSIP_ERRNO_START_PJSIP+163)	/* 171163 */
+/**
+ * @hideinitializer
+ * Error adding private key from SSL certificate file.
+ */
+#define PJSIP_TLS_EKEYFILE	(PJSIP_ERRNO_START_PJSIP+164)	/* 171164 */
+/**
+ * @hideinitializer
+ * Error setting SSL cipher list.
+ */
+#define PJSIP_TLS_ECIPHER	(PJSIP_ERRNO_START_PJSIP+165)	/* 171165 */
+/**
+ * @hideinitializer
+ * Error creating SSL context.
+ */
+#define PJSIP_TLS_ECTX		(PJSIP_ERRNO_START_PJSIP+166)	/* 171166 */
+/**
+ * @hideinitializer
+ * Error creating SSL connection object.
+ */
+#define PJSIP_TLS_ESSLCONN	(PJSIP_ERRNO_START_PJSIP+167)	/* 171167 */
+/**
+ * @hideinitializer
+ * Unknown error when performing SSL connect().
+ */
+#define PJSIP_TLS_ECONNECT	(PJSIP_ERRNO_START_PJSIP+168)	/* 171168 */
+/**
+ * @hideinitializer
+ * Unknown error when performing SSL accept().
+ */
+#define PJSIP_TLS_EACCEPT	(PJSIP_ERRNO_START_PJSIP+169)	/* 171169 */
+/**
+ * @hideinitializer
+ * Unknown error when sending SSL data
+ */
+#define PJSIP_TLS_ESEND		(PJSIP_ERRNO_START_PJSIP+170)	/* 171170 */
+/**
+ * @hideinitializer
+ * Unknown error when reading SSL data
+ */
+#define PJSIP_TLS_EREAD		(PJSIP_ERRNO_START_PJSIP+171)	/* 171171 */
+/**
+ * @hideinitializer
+ * SSL negotiation has exceeded the maximum configured timeout.
+ */
+#define PJSIP_TLS_ETIMEDOUT	(PJSIP_ERRNO_START_PJSIP+172)	/* 171172 */
+
+
+
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+#endif	/* __PJSIP_SIP_ERRNO_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_event.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_event.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_event.h	(revision 1163)
@@ -0,0 +1,229 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_EVENT_H__
+#define __PJSIP_SIP_EVENT_H__
+
+/**
+ * @file sip_event.h
+ * @brief SIP Event
+ */
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_EVENT Event
+ * @ingroup PJSIP_CORE_CORE
+ * @brief Representation of events as they are distributed among modules.
+ * @{
+ */
+#include <pj/types.h>
+
+
+/** 
+ * Event IDs.
+ */
+typedef enum pjsip_event_id_e
+{
+    /** Unidentified event. */
+    PJSIP_EVENT_UNKNOWN,
+
+    /** Timer event, normally only used internally in transaction. */
+    PJSIP_EVENT_TIMER,
+
+    /** Message transmission event. */
+    PJSIP_EVENT_TX_MSG,
+
+    /** Message received event. */
+    PJSIP_EVENT_RX_MSG,
+
+    /** Transport error event. */
+    PJSIP_EVENT_TRANSPORT_ERROR,
+
+    /** Transaction state changed event. */
+    PJSIP_EVENT_TSX_STATE,
+
+    /** Indicates that the event was triggered by user action. */
+    PJSIP_EVENT_USER
+
+} pjsip_event_id_e;
+
+
+/**
+ * This structure describe event descriptor to fully identify a SIP event.
+ *
+ * Events are the only way for a lower layer object to inform something
+ * to higher layer objects. Normally this is achieved by means of callback,
+ * i.e. the higher layer objects register a callback to handle the event on
+ * the lower layer objects.
+ *
+ * This event descriptor is used for example by transactions, to inform
+ * endpoint about events, and by transports, to inform endpoint about
+ * unexpected transport error.
+ */
+struct pjsip_event
+{
+    /** This is necessary so that we can put events as a list. */
+    PJ_DECL_LIST_MEMBER(struct pjsip_event);
+
+    /** The event type, can be any value of \b pjsip_event_id_e.
+     */
+    pjsip_event_id_e type;
+
+    /**
+     * The event body as union, which fields depends on the event type.
+     * By convention, the first member of each struct in the union must be
+     * the pointer which is relevant to the event.
+     */
+    union
+    {
+        /** Timer event. */
+        struct
+        {
+            pj_timer_entry *entry;      /**< The timer entry.           */
+        } timer;
+
+        /** Transaction state has changed event. */
+        struct
+        {
+            union
+            {
+                pjsip_rx_data   *rdata; /**< The incoming message.      */
+                pjsip_tx_data   *tdata; /**< The outgoing message.      */
+                pj_timer_entry  *timer; /**< The timer.                 */
+                pj_status_t      status;/**< Transport error status.    */
+                void            *data;  /**< Generic data.              */
+            } src;
+            pjsip_transaction   *tsx;   /**< The transaction.           */
+	    int			 prev_state; /**< Previous state.	*/
+            pjsip_event_id_e     type;  /**< Type of event source:      
+                                         *      - PJSIP_EVENT_TX_MSG
+                                         *      - PJSIP_EVENT_RX_MSG,
+                                         *      - PJSIP_EVENT_TRANSPORT_ERROR
+                                         *      - PJSIP_EVENT_TIMER
+                                         *      - PJSIP_EVENT_USER
+                                         */
+        } tsx_state;
+
+        /** Message transmission event. */
+        struct
+        {
+            pjsip_tx_data       *tdata; /**< The transmit data buffer.  */
+
+        } tx_msg;
+
+        /** Transmission error event. */
+        struct
+        {
+            pjsip_tx_data       *tdata; /**< The transmit data.         */
+            pjsip_transaction   *tsx;   /**< The transaction.           */
+        } tx_error;
+
+        /** Message arrival event. */
+        struct
+        {
+            pjsip_rx_data       *rdata; /**< The receive data buffer.   */
+        } rx_msg;
+
+        /** User event. */
+        struct
+        {
+            void                *user1; /**< User data 1.               */
+            void                *user2; /**< User data 2.               */
+            void                *user3; /**< User data 3.               */
+            void                *user4; /**< User data 4.               */
+        } user;
+
+    } body;
+};
+
+/**
+ * Init timer event.
+ */
+#define PJSIP_EVENT_INIT_TIMER(event,pentry)            \
+        do { \
+            (event).type = PJSIP_EVENT_TIMER;           \
+            (event).body.timer.entry = pentry;          \
+        } while (0)
+
+/**
+ * Init tsx state event.
+ */
+#define PJSIP_EVENT_INIT_TSX_STATE(event,ptsx,ptype,pdata,prev)   \
+        do { \
+            (event).type = PJSIP_EVENT_TSX_STATE;           \
+            (event).body.tsx_state.tsx = ptsx;		    \
+            (event).body.tsx_state.type = ptype;            \
+            (event).body.tsx_state.src.data = pdata;        \
+	    (event).body.tsx_state.prev_state = prev;	    \
+        } while (0)
+
+/**
+ * Init tx msg event.
+ */
+#define PJSIP_EVENT_INIT_TX_MSG(event,ptdata)	\
+        do { \
+            (event).type = PJSIP_EVENT_TX_MSG;          \
+            (event).body.tx_msg.tdata = ptdata;		\
+        } while (0)
+
+/**
+ * Init rx msg event.
+ */
+#define PJSIP_EVENT_INIT_RX_MSG(event,prdata)	\
+        do { \
+            (event).type = PJSIP_EVENT_RX_MSG;		\
+            (event).body.rx_msg.rdata = prdata;		\
+        } while (0)
+
+/**
+ * Init transport error event.
+ */
+#define PJSIP_EVENT_INIT_TRANSPORT_ERROR(event,ptsx,ptdata)   \
+        do { \
+            (event).type = PJSIP_EVENT_TRANSPORT_ERROR; \
+            (event).body.tx_error.tsx = ptsx;		\
+            (event).body.tx_error.tdata = ptdata;	\
+        } while (0)
+
+/**
+ * Init user event.
+ */
+#define PJSIP_EVENT_INIT_USER(event,u1,u2,u3,u4)    \
+        do { \
+            (event).type = PJSIP_EVENT_USER;        \
+            (event).body.user.user1 = (void*)u1;     \
+            (event).body.user.user2 = (void*)u2;     \
+            (event).body.user.user3 = (void*)u3;     \
+            (event).body.user.user4 = (void*)u4;     \
+        } while (0)
+
+/**
+ * Get the event string from the event ID.
+ * @param e the event ID.
+ * @note defined in sip_util.c
+ */
+PJ_DEF(const char *) pjsip_event_str(pjsip_event_id_e e);
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+#endif	/* __PJSIP_SIP_EVENT_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_module.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_module.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_module.h	(revision 1163)
@@ -0,0 +1,221 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_MODULE_H__
+#define __PJSIP_SIP_MODULE_H__
+
+/**
+ * @file sip_module.h
+ * @brief Module helpers
+ */
+#include <pjsip/sip_types.h>
+#include <pj/list.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_MOD Modules
+ * @ingroup PJSIP_CORE_CORE
+ * @brief Modules are the primary means to extend PJSIP!
+ * @{
+ * Modules are the primary means to extend PJSIP. Without modules, PJSIP
+ * would not know how to handle messages, and will simply discard all
+ * incoming messages.
+ *
+ * Modules are registered by creating and initializing #pjsip_module 
+ * structure, and register the structure to PJSIP with 
+ * #pjsip_endpt_register_module().
+ *
+ * The <A HREF="/docs.htm">PJSIP Developer's Guide</A>
+ * has a thorough discussion on this subject, and readers are encouraged
+ * to read the document for more information.
+ */
+
+/**
+ * The declaration for SIP module. This structure would be passed to
+ * #pjsip_endpt_register_module() to register the module to PJSIP.
+ */
+struct pjsip_module
+{
+    /** To allow chaining of modules in the endpoint. */
+    PJ_DECL_LIST_MEMBER(struct pjsip_module);
+
+    /**
+     * Module name to identify the module.
+     *
+     * This field MUST be initialized before registering the module.
+     */
+    pj_str_t name;
+
+    /**
+     * Module ID. Application must initialize this field with -1 before
+     * registering the module to PJSIP. After the module is registered,
+     * this field will contain a unique ID to identify the module.
+     */
+    int id;
+
+    /**
+     * Integer number to identify module initialization and start order with
+     * regard to other modules. Higher number will make the module gets
+     * initialized later.
+     *
+     * This field MUST be initialized before registering the module.
+     */
+    int priority;
+
+    /**
+     * Optional function to be called to initialize the module. This function
+     * will be called by endpoint during module registration. If the value
+     * is NULL, then it's equal to returning PJ_SUCCESS.
+     *
+     * @param endpt	The endpoint instance.
+     * @return		Module should return PJ_SUCCESS to indicate success.
+     */
+    pj_status_t (*load)(pjsip_endpoint *endpt);
+
+    /**
+     * Optional function to be called to start the module. This function
+     * will be called by endpoint during module registration. If the value
+     * is NULL, then it's equal to returning PJ_SUCCESS.
+     *
+     * @return		Module should return zero to indicate success.
+     */
+    pj_status_t (*start)(void);
+
+    /**
+     * Optional function to be called to deinitialize the module before
+     * it is unloaded. This function will be called by endpoint during 
+     * module unregistration. If the value is NULL, then it's equal to 
+     * returning PJ_SUCCESS.
+     *
+     * @return		Module should return PJ_SUCCESS to indicate success.
+     */
+    pj_status_t (*stop)(void);
+
+    /**
+     * Optional function to be called to deinitialize the module before
+     * it is unloaded. This function will be called by endpoint during 
+     * module unregistration. If the value is NULL, then it's equal to 
+     * returning PJ_SUCCESS.
+     *
+     * @param mod	The module.
+     *
+     * @return		Module should return PJ_SUCCESS to indicate success.
+     */
+    pj_status_t (*unload)(void);
+
+    /**
+     * Optional function to be called to process incoming request message.
+     *
+     * @param rdata	The incoming message.
+     *
+     * @return		Module should return PJ_TRUE if it handles the request,
+     *			or otherwise it should return PJ_FALSE to allow other
+     *			modules to handle the request.
+     */
+    pj_bool_t (*on_rx_request)(pjsip_rx_data *rdata);
+
+    /**
+     * Optional function to be called to process incoming response message.
+     *
+     * @param rdata	The incoming message.
+     *
+     * @return		Module should return PJ_TRUE if it handles the 
+     *			response, or otherwise it should return PJ_FALSE to 
+     *			allow other modules to handle the response.
+     */
+    pj_bool_t (*on_rx_response)(pjsip_rx_data *rdata);
+
+    /**
+     * Optional function to be called when transport layer is about to
+     * transmit outgoing request message.
+     *
+     * @param tdata	The outgoing request message.
+     *
+     * @return		Module should return PJ_SUCCESS in all cases. 
+     *			If non-zero (or PJ_FALSE) is returned, the message 
+     *			will not be sent.
+     */
+    pj_status_t (*on_tx_request)(pjsip_tx_data *tdata);
+
+    /**
+     * Optional function to be called when transport layer is about to
+     * transmit outgoing response message.
+     *
+     * @param tdata	The outgoing response message.
+     *
+     * @return		Module should return PJ_SUCCESS in all cases. 
+     *			If non-zero (or PJ_FALSE) is returned, the message 
+     *			will not be sent.
+     */
+    pj_status_t (*on_tx_response)(pjsip_tx_data *tdata);
+
+    /**
+     * Optional function to be called when this module is acting as 
+     * transaction user for the specified transaction, when the 
+     * transaction's state has changed.
+     *
+     * @param tsx	The transaction.
+     * @param event	The event which has caused the transaction state
+     *			to change.
+     */
+    void (*on_tsx_state)(pjsip_transaction *tsx, pjsip_event *event);
+
+};
+
+
+/**
+ * Module priority guidelines.
+ */
+enum pjsip_module_priority
+{
+    /** 
+     * This is the priority used by transport layer.
+     */
+    PJSIP_MOD_PRIORITY_TRANSPORT_LAYER	= 8,
+
+    /**
+     * This is the priority used by transaction layer.
+     */
+    PJSIP_MOD_PRIORITY_TSX_LAYER	= 16,
+
+    /**
+     * This is the priority used by the user agent and proxy layer.
+     */
+    PJSIP_MOD_PRIORITY_UA_PROXY_LAYER	= 32,
+
+    /**
+     * This is the priority used by the dialog usages.
+     */
+    PJSIP_MOD_PRIORITY_DIALOG_USAGE	= 48,
+
+    /**
+     * This is the recommended priority to be used by applications.
+     */
+    PJSIP_MOD_PRIORITY_APPLICATION	= 64
+};
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+#endif	/* __PJSIP_SIP_MODULE_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_msg.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_msg.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_msg.h	(revision 1163)
@@ -0,0 +1,1917 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_MSG_H__
+#define __PJSIP_SIP_MSG_H__
+
+/**
+ * @file pjsip/sip_msg.h
+ * @brief SIP Message Structure.
+ */
+
+#include <pjsip/sip_types.h>
+#include <pjsip/sip_uri.h>
+#include <pj/list.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_MSG Messaging Elements
+ * @ingroup PJSIP_CORE
+ * @brief Various SIP message elements such as methods, headers, URIs, etc.
+ * @{
+ */
+
+/* **************************************************************************/
+/**
+ * @defgroup PJSIP_MSG_METHOD Methods
+ * @brief Method names and manipulation.
+ * @ingroup PJSIP_MSG
+ * @{
+ */
+
+/**
+ * This enumeration declares SIP methods as described by RFC3261. Additional
+ * methods do exist, and they are described by corresponding RFCs for the SIP
+ * extentensions. Since they won't alter the characteristic of the processing
+ * of the message, they don't need to be explicitly mentioned here.
+ */
+typedef enum pjsip_method_e
+{
+    PJSIP_INVITE_METHOD,    /**< INVITE method, for establishing dialogs.   */
+    PJSIP_CANCEL_METHOD,    /**< CANCEL method, for cancelling request.	    */
+    PJSIP_ACK_METHOD,	    /**< ACK method.				    */
+    PJSIP_BYE_METHOD,	    /**< BYE method, for terminating dialog.	    */
+    PJSIP_REGISTER_METHOD,  /**< REGISTER method.			    */
+    PJSIP_OPTIONS_METHOD,   /**< OPTIONS method.			    */
+
+    PJSIP_OTHER_METHOD	    /**< Other method.				    */
+
+} pjsip_method_e;
+
+
+
+/**
+ * This structure represents a SIP method.
+ * Application must always use either #pjsip_method_init or #pjsip_method_set
+ * to make sure that method name is initialized correctly. This way, the name
+ * member will always contain a valid method string regardless whether the ID
+ * is recognized or not.
+ */
+struct pjsip_method
+{
+    pjsip_method_e id;	    /**< Method ID, from \a pjsip_method_e. */
+    pj_str_t	   name;    /**< Method name, which will always contain the 
+			         method string. */
+};
+
+
+/*
+ * For convenience, standard method structures are defined in the library.
+ */
+extern const pjsip_method pjsip_invite_method;	    /**< INVITE structure.  */
+extern const pjsip_method pjsip_cancel_method;	    /**< CANCEL structure.  */
+extern const pjsip_method pjsip_ack_method;	    /**< ACK structure.     */
+extern const pjsip_method pjsip_bye_method;	    /**< BYE structure.     */
+extern const pjsip_method pjsip_register_method;    /**< REGISTER structure.*/
+extern const pjsip_method pjsip_options_method;	    /**< OPTIONS structure. */
+
+
+/** 
+ * Initialize the method structure from a string. 
+ * This function will check whether the method is a known method then set
+ * both the id and name accordingly.
+ *
+ * @param m	The method to initialize.
+ * @param pool	Pool where memory allocation will be allocated from, if required.
+ * @param str	The method string.
+ */
+PJ_DECL(void) pjsip_method_init( pjsip_method *m, 
+				 pj_pool_t *pool, 
+				 const pj_str_t *str);
+
+/** 
+ * Initialize the method structure from a string, without cloning the string.
+ * See #pjsip_method_init.
+ *
+ * @param m	The method structure to be initialized.
+ * @param str	The method string.
+ */
+PJ_DECL(void) pjsip_method_init_np( pjsip_method *m,
+				    pj_str_t *str);
+
+/** 
+ * Set the method with the predefined method ID. 
+ * This function will also set the name member of the structure to the correct
+ * string according to the method.
+ *
+ * @param m	The method structure.
+ * @param id	The method ID.
+ */
+PJ_DECL(void) pjsip_method_set( pjsip_method *m, pjsip_method_e id );
+
+
+/** 
+ * Copy one method structure to another. If the method is of the known methods,
+ * then memory allocation is not required.
+ *
+ * @param pool	    Pool to allocate memory from, if required.
+ * @param method    The destination method to copy to.
+ * @param rhs	    The source method to copy from.
+ */
+PJ_DECL(void) pjsip_method_copy( pj_pool_t *pool,
+				 pjsip_method *method,
+				 const pjsip_method *rhs );
+
+/** 
+ * Compare one method with another, and conveniently determine whether the 
+ * first method is equal, less than, or greater than the second method.
+ *
+ * @param m1	The first method.
+ * @param m2	The second method.
+ *
+ * @return	Zero if equal, otherwise will return -1 if less or +1 if greater.
+ */
+PJ_DECL(int) pjsip_method_cmp( const pjsip_method *m1, const pjsip_method *m2);
+
+/**
+ * @}
+ */
+
+/* **************************************************************************/
+/** 
+ * @defgroup PJSIP_MSG_HDR Header Fields
+ * @brief Declarations for various SIP header fields.
+ * @ingroup PJSIP_MSG
+ * @{
+ */
+
+/**
+ * Header types, as defined by RFC3261.
+ */
+typedef enum pjsip_hdr_e
+{
+    /*
+     * These are the headers documented in RFC3261. Headers not documented
+     * there must have type PJSIP_H_OTHER, and the header type itself is 
+     * recorded in the header name string.
+     *
+     * DO NOT CHANGE THE VALUE/ORDER OF THE HEADER IDs!!!.
+     */
+    PJSIP_H_ACCEPT,
+    PJSIP_H_ACCEPT_ENCODING_UNIMP,	/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_ACCEPT_LANGUAGE_UNIMP,	/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_ALERT_INFO_UNIMP,		/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_ALLOW,
+    PJSIP_H_AUTHENTICATION_INFO_UNIMP,	/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_AUTHORIZATION,
+    PJSIP_H_CALL_ID,
+    PJSIP_H_CALL_INFO_UNIMP,		/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_CONTACT,
+    PJSIP_H_CONTENT_DISPOSITION_UNIMP,	/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_CONTENT_ENCODING_UNIMP,	/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_CONTENT_LANGUAGE_UNIMP,	/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_CONTENT_LENGTH,
+    PJSIP_H_CONTENT_TYPE,
+    PJSIP_H_CSEQ,
+    PJSIP_H_DATE_UNIMP,			/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_ERROR_INFO_UNIMP,		/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_EXPIRES,
+    PJSIP_H_FROM,
+    PJSIP_H_IN_REPLY_TO_UNIMP,		/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_MAX_FORWARDS,
+    PJSIP_H_MIME_VERSION_UNIMP,		/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_MIN_EXPIRES,
+    PJSIP_H_ORGANIZATION_UNIMP,		/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_PRIORITY_UNIMP,		/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_PROXY_AUTHENTICATE,
+    PJSIP_H_PROXY_AUTHORIZATION,
+    PJSIP_H_PROXY_REQUIRE_UNIMP,	/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_RECORD_ROUTE,
+    PJSIP_H_REPLY_TO_UNIMP,		/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_REQUIRE,
+    PJSIP_H_RETRY_AFTER,
+    PJSIP_H_ROUTE,
+    PJSIP_H_SERVER_UNIMP,		/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_SUBJECT_UNIMP,		/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_SUPPORTED,
+    PJSIP_H_TIMESTAMP_UNIMP,		/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_TO,
+    PJSIP_H_UNSUPPORTED,
+    PJSIP_H_USER_AGENT_UNIMP,		/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_VIA,
+    PJSIP_H_WARNING_UNIMP,		/* N/A, use pjsip_generic_string_hdr */
+    PJSIP_H_WWW_AUTHENTICATE,
+
+    PJSIP_H_OTHER
+
+} pjsip_hdr_e;
+
+/**
+ * This structure provides the pointer to basic functions that are needed
+ * for generic header operations. All header fields will have pointer to
+ * this structure, so that they can be manipulated uniformly.
+ */
+typedef struct pjsip_hdr_vptr
+{
+    /** 
+     * Function to clone the header. 
+     *
+     * @param pool  Memory pool to allocate the new header.
+     * @param hdr   Header to clone.
+     *
+     * @return A new instance of the header.
+     */
+    void *(*clone)(pj_pool_t *pool, const void *hdr);
+
+    /** 
+     * Pointer to function to shallow clone the header. 
+     * Shallow cloning will just make a memory copy of the original header,
+     * thus all pointers in original header will be kept intact. Because the
+     * function does not need to perform deep copy, the operation should be
+     * faster, but the application must make sure that the original header
+     * is still valid throughout the lifetime of new header.
+     *
+     * @param pool  Memory pool to allocate the new header.
+     * @param hdr   The header to clone.
+     */
+    void *(*shallow_clone)(pj_pool_t *pool, const void *hdr);
+
+    /** Pointer to function to print the header to the specified buffer.
+     *	Returns the length of string written, or -1 if the remaining buffer
+     *	is not enough to hold the header.
+     *
+     *  @param hdr  The header to print.
+     *  @param buf  The buffer.
+     *  @param len  The size of the buffer.
+     *
+     *  @return	    The size copied to buffer, or -1 if there's not enough space.
+     */
+    int (*print_on)(void *hdr, char *buf, pj_size_t len);
+
+} pjsip_hdr_vptr;
+
+
+/**
+ * Generic fields for all SIP headers are declared using this macro, to make
+ * sure that all headers will have exactly the same layout in their start of
+ * the storage. This behaves like C++ inheritance actually.
+ */
+#define PJSIP_DECL_HDR_MEMBER(hdr)   \
+    /** List members. */	\
+    PJ_DECL_LIST_MEMBER(hdr);	\
+    /** Header type */		\
+    pjsip_hdr_e	    type;	\
+    /** Header name. */		\
+    pj_str_t	    name;	\
+    /** Header short name version. */	\
+    pj_str_t	    sname;		\
+    /** Virtual function table. */	\
+    pjsip_hdr_vptr *vptr
+
+
+/**
+ * Generic SIP header structure, for generic manipulation for headers in the
+ * message. All header fields can be typecasted to this type.
+ */
+struct pjsip_hdr
+{
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_hdr);
+};
+
+
+/**
+ * This generic function will clone any header, by calling "clone" function
+ * in header's virtual function table.
+ *
+ * @param pool	    The pool to allocate memory from.
+ * @param hdr	    The header to clone.
+ *
+ * @return	    A new instance copied from the original header.
+ */
+PJ_DECL(void*) pjsip_hdr_clone( pj_pool_t *pool, const void *hdr );
+
+
+/**
+ * This generic function will clone any header, by calling "shallow_clone" 
+ * function in header's virtual function table.
+ *
+ * @param pool	    The pool to allocate memory from.
+ * @param hdr	    The header to clone.
+ *
+ * @return	    A new instance copied from the original header.
+ */
+PJ_DECL(void*) pjsip_hdr_shallow_clone( pj_pool_t *pool, const void *hdr );
+
+/**
+ * This generic function will print any header, by calling "print" 
+ * function in header's virtual function table.
+ *
+ * @param hdr  The header to print.
+ * @param buf  The buffer.
+ * @param len  The size of the buffer.
+ *
+ * @return	The size copied to buffer, or -1 if there's not enough space.
+ */
+PJ_DECL(int) pjsip_hdr_print_on( void *hdr, char *buf, pj_size_t len);
+
+/**
+ * @}
+ */
+
+/* **************************************************************************/
+/**
+ * @defgroup PJSIP_MSG_LINE Request and Status Line.
+ * @brief Request and status line structures and manipulation.
+ * @ingroup PJSIP_MSG
+ * @{
+ */
+
+/**
+ * This structure describes SIP request line.
+ */
+typedef struct pjsip_request_line 
+{
+    pjsip_method    method; /**< Method for this request line. */
+    pjsip_uri *uri;    /**< URI for this request line. */
+} pjsip_request_line;
+
+
+/**
+ * This structure describes SIP status line.
+ */
+typedef struct pjsip_status_line 
+{
+    int		code;	    /**< Status code. */
+    pj_str_t	reason;	    /**< Reason string. */
+} pjsip_status_line;
+
+
+/**
+ * This enumeration lists standard SIP status codes according to RFC 3261.
+ * In addition, it also declares new status class 7xx for errors generated
+ * by the stack. This status class however should not get transmitted on the 
+ * wire.
+ */
+typedef enum pjsip_status_code
+{
+    PJSIP_SC_TRYING = 100,
+    PJSIP_SC_RINGING = 180,
+    PJSIP_SC_CALL_BEING_FORWARDED = 181,
+    PJSIP_SC_QUEUED = 182,
+    PJSIP_SC_PROGRESS = 183,
+
+    PJSIP_SC_OK = 200,
+    PJSIP_SC_ACCEPTED = 202,
+
+    PJSIP_SC_MULTIPLE_CHOICES = 300,
+    PJSIP_SC_MOVED_PERMANENTLY = 301,
+    PJSIP_SC_MOVED_TEMPORARILY = 302,
+    PJSIP_SC_USE_PROXY = 305,
+    PJSIP_SC_ALTERNATIVE_SERVICE = 380,
+
+    PJSIP_SC_BAD_REQUEST = 400,
+    PJSIP_SC_UNAUTHORIZED = 401,
+    PJSIP_SC_PAYMENT_REQUIRED = 402,
+    PJSIP_SC_FORBIDDEN = 403,
+    PJSIP_SC_NOT_FOUND = 404,
+    PJSIP_SC_METHOD_NOT_ALLOWED = 405,
+    PJSIP_SC_NOT_ACCEPTABLE = 406,
+    PJSIP_SC_PROXY_AUTHENTICATION_REQUIRED = 407,
+    PJSIP_SC_REQUEST_TIMEOUT = 408,
+    PJSIP_SC_GONE = 410,
+    PJSIP_SC_REQUEST_ENTITY_TOO_LARGE = 413,
+    PJSIP_SC_REQUEST_URI_TOO_LONG = 414,
+    PJSIP_SC_UNSUPPORTED_MEDIA_TYPE = 415,
+    PJSIP_SC_UNSUPPORTED_URI_SCHEME = 416,
+    PJSIP_SC_BAD_EXTENSION = 420,
+    PJSIP_SC_EXTENSION_REQUIRED = 421,
+    PJSIP_SC_SESSION_TIMER_TOO_SMALL = 422,
+    PJSIP_SC_INTERVAL_TOO_BRIEF = 423,
+    PJSIP_SC_TEMPORARILY_UNAVAILABLE = 480,
+    PJSIP_SC_CALL_TSX_DOES_NOT_EXIST = 481,
+    PJSIP_SC_LOOP_DETECTED = 482,
+    PJSIP_SC_TOO_MANY_HOPS = 483,
+    PJSIP_SC_ADDRESS_INCOMPLETE = 484,
+    PJSIP_AC_AMBIGUOUS = 485,
+    PJSIP_SC_BUSY_HERE = 486,
+    PJSIP_SC_REQUEST_TERMINATED = 487,
+    PJSIP_SC_NOT_ACCEPTABLE_HERE = 488,
+    PJSIP_SC_BAD_EVENT = 489,
+    PJSIP_SC_REQUEST_UPDATED = 490,
+    PJSIP_SC_REQUEST_PENDING = 491,
+    PJSIP_SC_UNDECIPHERABLE = 493,
+
+    PJSIP_SC_INTERNAL_SERVER_ERROR = 500,
+    PJSIP_SC_NOT_IMPLEMENTED = 501,
+    PJSIP_SC_BAD_GATEWAY = 502,
+    PJSIP_SC_SERVICE_UNAVAILABLE = 503,
+    PJSIP_SC_SERVER_TIMEOUT = 504,
+    PJSIP_SC_VERSION_NOT_SUPPORTED = 505,
+    PJSIP_SC_MESSAGE_TOO_LARGE = 513,
+    PJSIP_SC_PRECONDITION_FAILURE = 580,
+
+    PJSIP_SC_BUSY_EVERYWHERE = 600,
+    PJSIP_SC_DECLINE = 603,
+    PJSIP_SC_DOES_NOT_EXIST_ANYWHERE = 604,
+    PJSIP_SC_NOT_ACCEPTABLE_ANYWHERE = 606,
+
+    PJSIP_SC_TSX_TIMEOUT = PJSIP_SC_REQUEST_TIMEOUT,
+    /*PJSIP_SC_TSX_RESOLVE_ERROR = 702,*/
+    PJSIP_SC_TSX_TRANSPORT_ERROR = PJSIP_SC_SERVICE_UNAVAILABLE
+
+} pjsip_status_code;
+
+/**
+ * Get the default status text for the status code.
+ *
+ * @param status_code	    SIP Status Code
+ *
+ * @return		    textual message for the status code.
+ */ 
+PJ_DECL(const pj_str_t*) pjsip_get_status_text(int status_code);
+
+/**
+ * This macro returns non-zero (TRUE) if the specified status_code is
+ * in the same class as the code_class.
+ *
+ * @param status_code	The status code.
+ * @param code_class	The status code in the class (for example 100, 200).
+ */
+#define PJSIP_IS_STATUS_IN_CLASS(status_code, code_class)    \
+	    (status_code/100 == code_class/100)
+
+/**
+ * @}
+ */
+
+/* **************************************************************************/
+/**
+ * @addtogroup PJSIP_MSG_MEDIA Media/MIME Type
+ * @brief Media/MIME type declaration and manipulations.
+ * @ingroup PJSIP_MSG
+ * @{
+ */
+
+/**
+ * This structure describes SIP media type, as used for example in 
+ * Accept and Content-Type header..
+ */
+typedef struct pjsip_media_type
+{
+    pj_str_t type;	    /**< Media type. */
+    pj_str_t subtype;	    /**< Media subtype. */
+    pj_str_t param;	    /**< Media type parameters (concatenated). */
+} pjsip_media_type;
+
+/**
+ * @}
+ */
+
+/* **************************************************************************/
+/**
+ * @addtogroup PJSIP_MSG_BODY Message Body
+ * @brief SIP message body structures and manipulation.
+ * @ingroup PJSIP_MSG
+ * @{
+ */
+
+/**
+ * Generic abstraction to message body.
+ * When an incoming message is parsed (pjsip_parse_msg()), the parser fills in
+ * all members with the appropriate value. The 'data' and 'len' member will
+ * describe portion of incoming packet which denotes the message body.
+ * When application needs to attach message body to outgoing SIP message, it
+ * must fill in all members of this structure. 
+ */
+struct pjsip_msg_body
+{
+    /** MIME content type. 
+     *  For incoming messages, the parser will fill in this member with the
+     *  content type found in Content-Type header.
+     *
+     *  For outgoing messages, application may fill in this member with
+     *  appropriate value, because the stack will generate Content-Type header
+     *  based on the value specified here.
+     *
+     *  If the content_type is empty, no Content-Type AND Content-Length header
+     *  will be added to the message. The stack assumes that application adds
+     *  these headers themselves.
+     */
+    pjsip_media_type content_type;
+
+    /** Pointer to buffer which holds the message body data. 
+     *  For incoming messages, the parser will fill in this member with the
+     *  pointer to the body string.
+     *
+     *  When sending outgoing message, this member doesn't need to point to the
+     *  actual message body string. It can be assigned with arbitrary pointer,
+     *  because the value will only need to be understood by the print_body()
+     *  function. The stack itself will not try to interpret this value, but
+     *  instead will always call the print_body() whenever it needs to get the
+     *  actual body string.
+     */
+    void *data;
+
+    /** The length of the data. 
+     *  For incoming messages, the parser will fill in this member with the
+     *  actual length of message body.
+     *
+     *  When sending outgoing message, again just like the "data" member, the
+     *  "len" member doesn't need to point to the actual length of the body 
+     *  string.
+     */
+    unsigned len;
+
+    /** Pointer to function to print this message body. 
+     *  Application must set a proper function here when sending outgoing 
+     *  message.
+     *
+     *  @param msg_body	    This structure itself.
+     *  @param buf	    The buffer.
+     *  @param size	    The buffer size.
+     *
+     *  @return		    The length of the string printed, or -1 if there is
+     *			    not enough space in the buffer to print the whole
+     *			    message body.
+     */
+    int (*print_body)(struct pjsip_msg_body *msg_body, 
+		      char *buf, pj_size_t size);
+
+    /** Clone the data part only of this message body. Note that this only
+     *  duplicates the data part of the body instead of the whole message
+     *  body. If application wants to duplicate the entire message body
+     *  structure, it must call #pjsip_msg_body_clone().
+     *
+     *  @param pool	    Pool used to clone the data.
+     *  @param data	    The data inside message body, to be cloned.
+     *  @param len	    The length of the data.
+     *
+     *  @return		    New data duplicated from the original data.
+     */
+    void* (*clone_data)(pj_pool_t *pool, const void *data, unsigned len);
+
+};
+
+/**
+ * General purpose function to textual data in a SIP body. Attach this function
+ * in a SIP message body only if the data in pjsip_msg_body is a textual 
+ * message ready to be embedded in a SIP message. If the data in the message
+ * body is not a textual body, then application must supply a custom function
+ * to print that body.
+ *
+ * @param msg_body	The message body.
+ * @param buf		Buffer to copy the message body to.
+ * @param size		The size of the buffer.
+ *
+ * @return		The length copied to the buffer, or -1.
+ */
+PJ_DECL(int) pjsip_print_text_body( pjsip_msg_body *msg_body, 
+				    char *buf, pj_size_t size);
+
+/**
+ * General purpose function to clone textual data in a SIP body. Attach this
+ * function as "clone_data" member of the SIP body only if the data type
+ * is a text (i.e. C string, not pj_str_t), and the length indicates the
+ * length of the text.
+ *
+ *  @param pool		Pool used to clone the data.
+ *  @param data		Textual data.
+ *  @param len		The length of the string.
+ *
+ *  @return		New text duplicated from the original text.
+ */
+PJ_DECL(void*) pjsip_clone_text_data( pj_pool_t *pool, const void *data,
+				      unsigned len);
+
+
+/**
+ * Clone the message body in src_body to the dst_body. This will duplicate
+ * the contents of the message body using the \a clone_data member of the
+ * source message body.
+ *
+ * @param pool		Pool to use to duplicate the message body.
+ * @param dst_body	Destination message body.
+ * @param src_body	Source message body to duplicate.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_msg_body_copy( pj_pool_t *pool,
+					  pjsip_msg_body *dst_body,
+					  const pjsip_msg_body *src_body );
+					   
+
+/**
+ * Create cloned message body. This will duplicate the contents of the message
+ * body using the \a clone_data member of the source message body.
+ *
+ * @param pool		Pool to use to duplicate the message body.
+ * @param body		Source message body to duplicate.
+ *
+ * @return		The cloned message body on successfull.
+ */
+PJ_DECL(pjsip_msg_body*) pjsip_msg_body_clone( pj_pool_t *pool,
+					       const pjsip_msg_body *body );
+					   
+
+/**
+ * Create a text message body. Use this function to create message body when
+ * the content is a simple text. For non-text message body (e.g. 
+ * pjmedia_sdp_session or pj_xml_node), application must construct the message
+ * manually.
+ *
+ * @param pool		Pool to allocate message body and its contents.
+ * @param type		MIME type (e.g. "text").
+ * @param subtype	MIME subtype (e.g. "plain").
+ * @param text		The text content to be put in the message body.
+ *
+ * @return		A new message body with the specified Content-Type and
+ *			text.
+ */
+PJ_DECL(pjsip_msg_body*) pjsip_msg_body_create( pj_pool_t *pool,
+					        const pj_str_t *type,
+						const pj_str_t *subtype,
+						const pj_str_t *text );
+
+/**
+ * @}
+ */
+
+/* **************************************************************************/
+/**
+ * @defgroup PJSIP_MSG_MSG Message Structure
+ * @brief SIP message (request and response) structure and operations.
+ * @ingroup PJSIP_MSG
+ * @{
+ */
+
+/**
+ * Message type (request or response).
+ */
+typedef enum pjsip_msg_type_e
+{
+    PJSIP_REQUEST_MSG,	    /**< Indicates request message. */
+    PJSIP_RESPONSE_MSG	    /**< Indicates response message. */
+} pjsip_msg_type_e;
+
+
+/**
+ * This structure describes a SIP message.
+ */
+struct pjsip_msg
+{
+    /** Message type (ie request or response). */
+    pjsip_msg_type_e  type;
+
+    /** The first line of the message can be either request line for request
+     *	messages, or status line for response messages. It is represented here
+     *  as a union.
+     */
+    union
+    {
+	/** Request Line. */
+	struct pjsip_request_line   req;
+
+	/** Status Line. */
+	struct pjsip_status_line    status;
+    } line;
+
+    /** List of message headers. */
+    pjsip_hdr hdr;
+
+    /** Pointer to message body, or NULL if no message body is attached to
+     *	this mesage. 
+     */
+    pjsip_msg_body *body;
+};
+
+
+/** 
+ * Create new request or response message.
+ *
+ * @param pool	    The pool.
+ * @param type	    Message type.
+ * @return	    New message, or THROW exception if failed.
+ */
+PJ_DECL(pjsip_msg*)  pjsip_msg_create( pj_pool_t *pool, pjsip_msg_type_e type);
+
+
+/**
+ * Perform a deep clone of a SIP message.
+ *
+ * @param pool	    The pool for creating the new message.
+ * @param msg	    The message to be duplicated.
+ *
+ * @return	    New message, which is duplicated from the original 
+ *		    message.
+ */
+PJ_DECL(pjsip_msg*) pjsip_msg_clone( pj_pool_t *pool, const pjsip_msg *msg);
+
+
+/** 
+ * Find a header in the message by the header type.
+ *
+ * @param msg	    The message.
+ * @param type	    The header type to find.
+ * @param start	    The first header field where the search should begin.
+ *		    If NULL is specified, then the search will begin from the
+ *		    first header, otherwise the search will begin at the
+ *		    specified header.
+ *
+ * @return	    The header field, or NULL if no header with the specified 
+ *		    type is found.
+ */
+PJ_DECL(void*)  pjsip_msg_find_hdr( const pjsip_msg *msg, 
+				    pjsip_hdr_e type, const void *start);
+
+/** 
+ * Find a header in the message by its name.
+ *
+ * @param msg	    The message.
+ * @param name	    The header name to find.
+ * @param start	    The first header field where the search should begin.
+ *		    If NULL is specified, then the search will begin from the
+ *		    first header, otherwise the search will begin at the
+ *		    specified header.
+ *
+ * @return	    The header field, or NULL if no header with the specified 
+ *		    type is found.
+ */
+PJ_DECL(void*)  pjsip_msg_find_hdr_by_name( const pjsip_msg *msg, 
+					    const pj_str_t *name, 
+					    const void *start);
+
+/** 
+ * Find and remove a header in the message. 
+ *
+ * @param msg	    The message.
+ * @param hdr	    The header type to find.
+ * @param start	    The first header field where the search should begin,
+ *		    or NULL to search from the first header in the message.
+ *
+ * @return	    The header field, or NULL if not found.
+ */
+PJ_DECL(void*)  pjsip_msg_find_remove_hdr( pjsip_msg *msg, 
+					   pjsip_hdr_e hdr, void *start);
+
+/** 
+ * Add a header to the message, putting it last in the header list.
+ *
+ * @param msg	    The message.
+ * @param hdr	    The header to add.
+ *
+ * @bug Once the header is put in a list (or message), it can not be put in 
+ *      other list (or message). Otherwise Real Bad Thing will happen.
+ */
+PJ_INLINE(void) pjsip_msg_add_hdr( pjsip_msg *msg, pjsip_hdr *hdr )
+{
+    pj_list_insert_before(&msg->hdr, hdr);
+}
+
+/** 
+ * Add header field to the message, putting it in the front of the header list.
+ *
+ * @param msg	The message.
+ * @param hdr	The header to add.
+ *
+ * @bug Once the header is put in a list (or message), it can not be put in 
+ *      other list (or message). Otherwise Real Bad Thing will happen.
+ */
+PJ_INLINE(void) pjsip_msg_insert_first_hdr( pjsip_msg *msg, pjsip_hdr *hdr )
+{
+    pj_list_insert_after(&msg->hdr, hdr);
+}
+
+/** 
+ * Print the message to the specified buffer. 
+ *
+ * @param msg	The message to print.
+ * @param buf	The buffer
+ * @param size	The size of the buffer.
+ *
+ * @return	The length of the printed characters (in bytes), or NEGATIVE
+ *		value if the message is too large for the specified buffer.
+ */
+PJ_DECL(pj_ssize_t) pjsip_msg_print(const pjsip_msg *msg, 
+				    char *buf, pj_size_t size);
+
+
+/*
+ * Some usefull macros to find common headers.
+ */
+
+
+/**
+ * Find Call-ID header.
+ *
+ * @param msg	The message.
+ * @return	Call-ID header instance.
+ */
+#define PJSIP_MSG_CID_HDR(msg) \
+	    ((pjsip_cid_hdr*)pjsip_msg_find_hdr(msg, PJSIP_H_CALL_ID, NULL))
+
+/**
+ * Find CSeq header.
+ *
+ * @param msg	The message.
+ * @return	CSeq header instance.
+ */
+#define PJSIP_MSG_CSEQ_HDR(msg) \
+	    ((pjsip_cseq_hdr*)pjsip_msg_find_hdr(msg, PJSIP_H_CSEQ, NULL))
+
+/**
+ * Find From header.
+ *
+ * @param msg	The message.
+ * @return	From header instance.
+ */
+#define PJSIP_MSG_FROM_HDR(msg) \
+	    ((pjsip_from_hdr*)pjsip_msg_find_hdr(msg, PJSIP_H_FROM, NULL))
+
+/**
+ * Find To header.
+ *
+ * @param msg	The message.
+ * @return	To header instance.
+ */
+#define PJSIP_MSG_TO_HDR(msg) \
+	    ((pjsip_to_hdr*)pjsip_msg_find_hdr(msg, PJSIP_H_TO, NULL))
+
+
+/**
+ * @}
+ */
+
+/* **************************************************************************/
+/**
+ * @addtogroup PJSIP_MSG_HDR
+ * @{
+ */
+
+/**
+ * Generic SIP header, which contains hname and a string hvalue.
+ * Note that this header is not supposed to be used as 'base' class for headers.
+ */
+typedef struct pjsip_generic_string_hdr
+{
+    /** Standard header field. */
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_generic_string_hdr);
+    /** hvalue */
+    pj_str_t hvalue;
+} pjsip_generic_string_hdr;
+
+
+/**
+ * Create a new instance of generic header. A generic header can have an
+ * arbitrary header name.
+ *
+ * @param pool	    The pool.
+ * @param hname	    The header name to be assigned to the header, or NULL to
+ *		    assign the header name with some string.
+ * @param hvalue    Optional string to be assigned as the value.
+ *
+ * @return	    The header, or THROW exception.
+ */
+PJ_DECL(pjsip_generic_string_hdr*) 
+pjsip_generic_string_hdr_create( pj_pool_t *pool, 
+				 const pj_str_t *hname,
+				 const pj_str_t *hvalue);
+
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ * @param hname	    The header name to be assigned to the header, or NULL to
+ *		    assign the header name with some string later.
+ * @param hvalue    Optional string to be assigned as the value.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_generic_string_hdr*) 
+pjsip_generic_string_hdr_init( pj_pool_t *pool,
+			       void *mem,
+			       const pj_str_t *hname,
+			       const pj_str_t *hvalue);
+
+
+/**
+ * Construct a generic string header without allocating memory from the pool.
+ * This function is useful to create a temporary header which life-time is
+ * very short (for example, creating the header in the stack to be passed
+ * as argument to a function which will copy the header).
+ *
+ * @param h	    The header to be initialized.
+ * @param hname	    The header name to be assigned to the header, or NULL to
+ *		    assign the header name with some string.
+ * @param hvalue    Optional string to be assigned as the value.
+ *
+ * @return	    The header, or THROW exception.
+ */
+PJ_DECL(void) pjsip_generic_string_hdr_init2(pjsip_generic_string_hdr *h,
+					     pj_str_t *hname,
+					     pj_str_t *hvalue);
+
+
+/* **************************************************************************/
+
+/**
+ * Generic SIP header, which contains hname and a string hvalue.
+ */
+typedef struct pjsip_generic_int_hdr
+{
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_generic_int_hdr); /**< Standard header field. */
+    pj_int32_t ivalue;				    /**< ivalue */
+} pjsip_generic_int_hdr;
+
+
+/**
+ * Create a new instance of generic header. A generic header can have an
+ * arbitrary header name.
+ *
+ * @param pool	    The pool.
+ * @param hname	    The header name to be assigned to the header, or NULL to
+ *		    assign the header name with some string.
+ * @param hvalue    The value to be assigned to the header.
+ *
+ * @return	    The header, or THROW exception.
+ */
+PJ_DECL(pjsip_generic_int_hdr*) pjsip_generic_int_hdr_create( pj_pool_t *pool,
+						      const pj_str_t *hname,
+						      int hvalue );
+
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ * @param hname	    The header name to be assigned to the header, or NULL to
+ *		    assign the header name with some string later.
+ * @param value	    Value to be assigned to the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_generic_int_hdr*) pjsip_generic_int_hdr_init( pj_pool_t *pool,
+							    void *mem,
+							    const pj_str_t *hname,
+							    int value );
+
+/* **************************************************************************/
+
+/** Maximum elements in the header array. */
+#define PJSIP_GENERIC_ARRAY_MAX_COUNT	32
+
+/**
+ * Generic array of string header.
+ */
+typedef struct pjsip_generic_array_hdr
+{
+    /** Standard header fields. */
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_generic_array_hdr);
+
+    /** Number of tags/elements. */
+    unsigned	count;
+
+    /**< Tags/elements. */
+    pj_str_t	values[PJSIP_GENERIC_ARRAY_MAX_COUNT];
+
+} pjsip_generic_array_hdr;
+
+/**
+ * Create generic array header.
+ *
+ * @param pool	    Pool to allocate memory from.
+ * @param hname	    Header name.
+ *
+ * @return	    New generic array header.
+ */
+PJ_DECL(pjsip_generic_array_hdr*) pjsip_generic_array_hdr_create(pj_pool_t *pool,
+							     const pj_str_t *hname);
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ * @param hname	    The header name to be assigned to the header, or NULL to
+ *		    assign the header name with some string later.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_generic_array_hdr*) pjsip_generic_array_hdr_init(pj_pool_t *pool,
+							       void *mem,
+							       const pj_str_t *hname);
+
+
+/* **************************************************************************/
+
+/** Accept header. */
+typedef pjsip_generic_array_hdr pjsip_accept_hdr;
+
+/** Maximum fields in Accept header. */
+#define PJSIP_MAX_ACCEPT_COUNT	PJSIP_GENERIC_ARRAY_MAX_COUNT
+
+/**
+ * Create new Accept header instance.
+ *
+ * @param pool	    The pool.
+ *
+ * @return	    New Accept header instance.
+ */
+PJ_DECL(pjsip_accept_hdr*) pjsip_accept_hdr_create(pj_pool_t *pool);
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_accept_hdr*) pjsip_accept_hdr_init( pj_pool_t *pool,
+						  void *mem );
+
+
+/* **************************************************************************/
+
+/**
+ * Allow header.
+ */
+typedef pjsip_generic_array_hdr pjsip_allow_hdr;
+
+/**
+ * Create new Allow header instance.
+ *
+ * @param pool	    The pool.
+ *
+ * @return	    New Allow header instance.
+ */
+PJ_DECL(pjsip_allow_hdr*) pjsip_allow_hdr_create(pj_pool_t *pool);
+
+
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_allow_hdr*) pjsip_allow_hdr_init( pj_pool_t *pool,
+						void *mem );
+
+/* **************************************************************************/
+
+/**
+ * Call-ID header.
+ */
+typedef struct pjsip_cid_hdr
+{
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_cid_hdr);
+    pj_str_t id;	    /**< Call-ID string. */
+} pjsip_cid_hdr;
+
+
+/**
+ * Create new Call-ID header.
+ *
+ * @param pool	The pool.
+ *
+ * @return	new Call-ID header.
+ */
+PJ_DECL(pjsip_cid_hdr*) pjsip_cid_hdr_create( pj_pool_t *pool );
+
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_cid_hdr*) pjsip_cid_hdr_init( pj_pool_t *pool,
+					    void *mem );
+
+
+
+/* **************************************************************************/
+/**
+ * Content-Length header.
+ */
+typedef struct pjsip_clen_hdr
+{
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_clen_hdr);
+    int len;	/**< Content length. */
+} pjsip_clen_hdr;
+
+/**
+ * Create new Content-Length header.
+ *
+ * @param pool	the pool.
+ * @return	A new Content-Length header instance.
+ */
+PJ_DECL(pjsip_clen_hdr*) pjsip_clen_hdr_create( pj_pool_t *pool );
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_clen_hdr*) pjsip_clen_hdr_init( pj_pool_t *pool,
+					      void *mem );
+
+
+/* **************************************************************************/
+/**
+ * CSeq header.
+ */
+typedef struct pjsip_cseq_hdr
+{
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_cseq_hdr);
+    int		    cseq;	/**< CSeq number. */
+    pjsip_method    method;	/**< CSeq method. */
+} pjsip_cseq_hdr;
+
+
+/** Create new  CSeq header. 
+ *
+ *  @param pool	The pool.
+ *  @return A new CSeq header instance.
+ */
+PJ_DECL(pjsip_cseq_hdr*) pjsip_cseq_hdr_create( pj_pool_t *pool );
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_cseq_hdr*) pjsip_cseq_hdr_init( pj_pool_t *pool,
+					      void *mem );
+
+/* **************************************************************************/
+/**
+ * Contact header.
+ * In this library, contact header only contains single URI. If a message has
+ * multiple URI in the Contact header, the URI will be put in separate Contact
+ * headers.
+ */
+typedef struct pjsip_contact_hdr
+{
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_contact_hdr);
+    int		    star;	    /**< The contact contains only a '*' character */
+    pjsip_uri	   *uri;	    /**< URI in the contact. */
+    int		    q1000;	    /**< The "q" value times 1000 (to avoid float) */
+    pj_int32_t	    expires;	    /**< Expires parameter, otherwise -1 if not present. */
+    pjsip_param	    other_param;    /**< Other parameters, concatenated in a single string. */
+} pjsip_contact_hdr;
+
+
+/**
+ * Create a new Contact header.
+ *
+ * @param pool	The pool.
+ * @return	A new instance of Contact header.
+ */
+PJ_DECL(pjsip_contact_hdr*) pjsip_contact_hdr_create( pj_pool_t *pool );
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_contact_hdr*) pjsip_contact_hdr_init( pj_pool_t *pool,
+						    void *mem );
+
+
+/* **************************************************************************/
+/**
+ * Content-Type.
+ */
+typedef struct pjsip_ctype_hdr
+{
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_ctype_hdr);
+    pjsip_media_type media; /**< Media type. */
+} pjsip_ctype_hdr;
+
+
+/**
+ * Create a nwe Content Type header.
+ *
+ * @param pool	The pool.
+ * @return	A new Content-Type header.
+ */
+PJ_DECL(pjsip_ctype_hdr*) pjsip_ctype_hdr_create( pj_pool_t *pool );
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_ctype_hdr*) pjsip_ctype_hdr_init( pj_pool_t *pool,
+						void *mem );
+
+/* **************************************************************************/
+/** Expires header. */
+typedef pjsip_generic_int_hdr pjsip_expires_hdr;
+
+/**
+ * Create a new Expires header.
+ *
+ * @param pool	    The pool.
+ * @param value	    The expiration value.
+ *
+ * @return	    A new Expires header.
+ */
+PJ_DECL(pjsip_expires_hdr*) pjsip_expires_hdr_create( pj_pool_t *pool,
+						      int value);
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ * @param value	    The expiration value.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_expires_hdr*) pjsip_expires_hdr_init( pj_pool_t *pool,
+						    void *mem,
+						    int value );
+
+
+
+/* **************************************************************************/
+/**
+ * To or From header.
+ */
+typedef struct pjsip_fromto_hdr
+{
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_fromto_hdr);
+    pjsip_uri	    *uri;	    /**< URI in From/To header. */
+    pj_str_t	     tag;	    /**< Header "tag" parameter. */
+    pjsip_param	     other_param;   /**< Other params, concatenated as a single string. */
+} pjsip_fromto_hdr;
+
+/** Alias for From header. */
+typedef pjsip_fromto_hdr pjsip_from_hdr;
+
+/** Alias for To header. */
+typedef pjsip_fromto_hdr pjsip_to_hdr;
+
+/**
+ * Create a From header.
+ *
+ * @param pool	The pool.
+ * @return	New instance of From header.
+ */
+PJ_DECL(pjsip_from_hdr*) pjsip_from_hdr_create( pj_pool_t *pool );
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_from_hdr*) pjsip_from_hdr_init( pj_pool_t *pool,
+					      void *mem );
+
+/**
+ * Create a To header.
+ *
+ * @param pool	The pool.
+ * @return	New instance of To header.
+ */
+PJ_DECL(pjsip_to_hdr*)   pjsip_to_hdr_create( pj_pool_t *pool );
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_to_hdr*) pjsip_to_hdr_init( pj_pool_t *pool,
+					  void *mem );
+
+/**
+ * Convert the header to a From header.
+ *
+ * @param hdr	    The generic from/to header.
+ * @return	    "From" header.
+ */
+PJ_DECL(pjsip_from_hdr*) pjsip_fromto_hdr_set_from( pjsip_fromto_hdr *hdr );
+
+/**
+ * Convert the header to a To header.
+ *
+ * @param hdr	    The generic from/to header.
+ * @return	    "To" header.
+ */
+PJ_DECL(pjsip_to_hdr*)   pjsip_fromto_hdr_set_to( pjsip_fromto_hdr *hdr );
+
+
+/* **************************************************************************/
+/**
+ * Max-Forwards header.
+ */
+typedef pjsip_generic_int_hdr pjsip_max_fwd_hdr;
+
+/**
+ * Create new Max-Forwards header instance.
+ *
+ * @param pool	    The pool.
+ * @param value	    The Max-Forwards value.
+ *
+ * @return	    New Max-Forwards header instance.
+ */
+PJ_DECL(pjsip_max_fwd_hdr*) 
+pjsip_max_fwd_hdr_create(pj_pool_t *pool, int value);
+
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ * @param value	    The Max-Forwards value.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_max_fwd_hdr*) 
+pjsip_max_fwd_hdr_init( pj_pool_t *pool, void *mem, int value );
+
+
+/* **************************************************************************/
+/**
+ * Min-Expires header.
+ */
+typedef pjsip_generic_int_hdr pjsip_min_expires_hdr;
+
+/**
+ * Create new Min-Expires header instance.
+ *
+ * @param pool	    The pool.
+ * @param value	    The Min-Expires value.
+ *
+ * @return	    New Min-Expires header instance.
+ */
+PJ_DECL(pjsip_min_expires_hdr*) pjsip_min_expires_hdr_create(pj_pool_t *pool,
+							     int value);
+
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ * @param value	    The Min-Expires value.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_min_expires_hdr*) pjsip_min_expires_hdr_init( pj_pool_t *pool,
+							    void *mem,
+							    int value );
+
+
+/* **************************************************************************/
+/**
+ * Record-Route and Route headers.
+ */
+typedef struct pjsip_routing_hdr
+{
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_routing_hdr);  /**< Generic header fields. */
+    pjsip_name_addr  name_addr;	  /**< The URL in the Route/Record-Route header. */
+    pjsip_param	     other_param; /**< Other parameter. */
+} pjsip_routing_hdr;
+
+/** Alias for Record-Route header. */
+typedef pjsip_routing_hdr pjsip_rr_hdr;
+
+/** Alias for Route header. */
+typedef pjsip_routing_hdr pjsip_route_hdr;
+
+
+/** 
+ * Create new Record-Route header from the pool. 
+ *
+ * @param pool	The pool.
+ * @return	A new instance of Record-Route header.
+ */
+PJ_DECL(pjsip_rr_hdr*)	    pjsip_rr_hdr_create( pj_pool_t *pool );
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_rr_hdr*) pjsip_rr_hdr_init( pj_pool_t *pool,
+					  void *mem );
+
+/** 
+ * Create new Route header from the pool. 
+ *
+ * @param pool	The pool.
+ * @return	A new instance of "Route" header.
+ */
+PJ_DECL(pjsip_route_hdr*)   pjsip_route_hdr_create( pj_pool_t *pool );
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_route_hdr*) pjsip_route_hdr_init( pj_pool_t *pool,
+					        void *mem );
+
+/** 
+ * Convert generic routing header to Record-Route header. 
+ *
+ * @param r	The generic routing header, or a "Routing" header.
+ * @return	Record-Route header.
+ */
+PJ_DECL(pjsip_rr_hdr*)	    pjsip_routing_hdr_set_rr( pjsip_routing_hdr *r );
+
+/** 
+ * Convert generic routing header to "Route" header. 
+ *
+ * @param r	The generic routing header, or a "Record-Route" header.
+ * @return	"Route" header.
+ */
+PJ_DECL(pjsip_route_hdr*)   pjsip_routing_hdr_set_route( pjsip_routing_hdr *r );
+
+/* **************************************************************************/
+/**
+ * Require header.
+ */
+typedef pjsip_generic_array_hdr pjsip_require_hdr;
+
+/**
+ * Create new Require header instance.
+ *
+ * @param pool	    The pool.
+ *
+ * @return	    New Require header instance.
+ */
+PJ_DECL(pjsip_require_hdr*) pjsip_require_hdr_create(pj_pool_t *pool);
+
+/**
+ * Initialize a preallocated memory with the header structure. This function
+ * should only be called when application uses its own memory allocation to
+ * allocate memory block for the specified header (e.g. in C++, when the 
+ * header is allocated with "new" operator).
+ * For normal applications, they should use pjsip_xxx_hdr_create() instead,
+ * which allocates memory and initialize it in one go.
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_require_hdr*) pjsip_require_hdr_init( pj_pool_t *pool,
+						    void *mem );
+
+
+/* **************************************************************************/
+/**
+ * Retry-After header.
+ */
+typedef pjsip_generic_int_hdr pjsip_retry_after_hdr;
+
+/**
+ * Create new Retry-After header instance.
+ *
+ * @param pool	    The pool.
+ * @param value	    The Retry-After value.
+ *
+ * @return	    New Retry-After header instance.
+ */
+PJ_DECL(pjsip_retry_after_hdr*) pjsip_retry_after_hdr_create(pj_pool_t *pool,
+							     int value);
+
+/**
+ * Initialize a preallocated memory with the header structure. 
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ * @param value	    The Retry-After value.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_retry_after_hdr*) pjsip_retry_after_hdr_init( pj_pool_t *pool,
+							    void *mem,
+							    int value );
+
+
+/* **************************************************************************/
+/**
+ * Supported header.
+ */
+typedef pjsip_generic_array_hdr pjsip_supported_hdr;
+
+/**
+ * Create new Supported header instance.
+ *
+ * @param pool	    The pool.
+ *
+ * @return	    New Supported header instance.
+ */
+PJ_DECL(pjsip_supported_hdr*) pjsip_supported_hdr_create(pj_pool_t *pool);
+
+/**
+ * Initialize a preallocated memory with the header structure. 
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_supported_hdr*) pjsip_supported_hdr_init( pj_pool_t *pool,
+							void *mem );
+
+/* **************************************************************************/
+/**
+ * Unsupported header.
+ */
+typedef pjsip_generic_array_hdr pjsip_unsupported_hdr;
+
+/**
+ * Create new Unsupported header instance.
+ *
+ * @param pool	    The pool.
+ *
+ * @return	    New Unsupported header instance.
+ */
+PJ_DECL(pjsip_unsupported_hdr*) pjsip_unsupported_hdr_create(pj_pool_t *pool);
+
+/**
+ * Initialize a preallocated memory with the header structure. 
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_unsupported_hdr*) pjsip_unsupported_hdr_init( pj_pool_t *pool,
+							    void *mem );
+
+/* **************************************************************************/
+/**
+ * SIP Via header.
+ * In this implementation, Via header can only have one element in each header.
+ * If a message arrives with multiple elements in a single Via, then they will
+ * be split up into multiple Via headers.
+ */
+typedef struct pjsip_via_hdr
+{
+    PJSIP_DECL_HDR_MEMBER(struct pjsip_via_hdr);
+    pj_str_t	     transport;	    /**< Transport type. */
+    pjsip_host_port  sent_by;	    /**< Host and optional port */
+    int		     ttl_param;	    /**< TTL parameter, or -1 if it's not specified. */
+    int		     rport_param;   /**< "rport" parameter, 0 to specify without
+					 port number, -1 means doesn't exist. */
+    pj_str_t	     maddr_param;   /**< "maddr" parameter. */
+    pj_str_t	     recvd_param;   /**< "received" parameter. */
+    pj_str_t	     branch_param;  /**< "branch" parameter. */
+    pjsip_param	     other_param;   /**< Other parameters, concatenated as single string. */
+    pj_str_t	     comment;	    /**< Comment. */
+} pjsip_via_hdr;
+
+/**
+ * Create a new Via header.
+ *
+ * @param pool	    The pool.
+ * @return	    A new "Via" header instance.
+ */
+PJ_DECL(pjsip_via_hdr*) pjsip_via_hdr_create( pj_pool_t *pool );
+
+/**
+ * Initialize a preallocated memory with the header structure. 
+ *
+ * @param pool	    Pool for additional memory allocation if required.
+ * @param mem	    Pre-allocated memory to be initialized as the header.
+ *
+ * @return	    The header instance, which points to the same memory 
+ *		    location as the mem argument.
+ */
+PJ_DECL(pjsip_via_hdr*) pjsip_via_hdr_init( pj_pool_t *pool,
+					    void *mem );
+
+/* **************************************************************************/
+/**
+ * SIP Warning header.
+ * In this version, Warning header is just a typedef for generic string 
+ * header.
+ */
+typedef pjsip_generic_string_hdr pjsip_warning_hdr;
+
+/**
+ * Create a warning header with the specified contents.
+ *
+ * @param pool	    Pool to allocate memory from.
+ * @param code	    Warning code, 300-399.
+ * @param host	    The host portion of the Warning header.
+ * @param text	    The warning text, which MUST not be quoted with
+ *		    double quote.
+ *
+ * @return	    The Warning header field.
+ */
+PJ_DECL(pjsip_warning_hdr*) pjsip_warning_hdr_create( pj_pool_t *pool,
+						      int code,
+						      const pj_str_t *host,
+						      const pj_str_t *text);
+
+/**
+ * Create a warning header and initialize the contents from the error
+ * message for the specified status code. The warning code will be
+ * set to 399.
+ *
+ * @param pool	    Pool to allocate memory from.
+ * @param host	    The host portion of the Warning header.
+ * @param status    The error status code, which error text will be
+ *		    put in as the Warning text.
+ *
+ * @return	    The Warning header field.
+ */
+PJ_DECL(pjsip_warning_hdr*) 
+pjsip_warning_hdr_create_from_status( pj_pool_t *pool,
+				      const pj_str_t *host,
+				      pj_status_t status);
+
+/* **************************************************************************/
+/** Accept-Encoding header. */
+typedef pjsip_generic_string_hdr pjsip_accept_encoding_hdr;
+
+/** Create Accept-Encoding header. */
+#define pjsip_accept_encoding_hdr_create pjsip_generic_string_hdr_create
+
+/** Accept-Language header. */
+typedef pjsip_generic_string_hdr pjsip_accept_lang_hdr;
+
+/** Create Accept-Language header. */
+#define pjsip_accept_lang_hdr_create pjsip_generic_string_hdr_create
+
+/** Alert-Info header. */
+typedef pjsip_generic_string_hdr pjsip_alert_info_hdr;
+
+/** Create Alert-Info header. */
+#define pjsip_alert_info_hdr_create pjsip_generic_string_hdr_create
+
+/** Authentication-Info header. */
+typedef pjsip_generic_string_hdr pjsip_auth_info_hdr;
+
+/** Create Authentication-Info header. */
+#define pjsip_auth_info_hdr_create pjsip_generic_string_hdr_create
+
+/** Call-Info header. */
+typedef pjsip_generic_string_hdr pjsip_call_info_hdr;
+
+/** Create Call-Info header. */
+#define pjsip_call_info_hdr_create pjsip_generic_string_hdr_create
+
+/** Content-Disposition header. */
+typedef pjsip_generic_string_hdr pjsip_content_disposition_hdr;
+
+/** Create Content-Disposition header. */
+#define pjsip_content_disposition_hdr_create pjsip_generic_string_hdr_create
+
+/** Content-Encoding header. */
+typedef pjsip_generic_string_hdr pjsip_content_encoding_hdr;
+
+/** Create Content-Encoding header. */
+#define pjsip_content_encoding_hdr_create pjsip_generic_string_hdr_create
+
+/** Content-Language header. */
+typedef pjsip_generic_string_hdr pjsip_content_lang_hdr;
+
+/** Create Content-Language header. */
+#define pjsip_content_lang_hdr_create pjsip_generic_string_hdr_create
+
+/** Date header. */
+typedef pjsip_generic_string_hdr pjsip_date_hdr;
+
+/** Create Date header. */
+#define pjsip_date_hdr_create pjsip_generic_string_hdr_create
+
+/** Error-Info header. */
+typedef pjsip_generic_string_hdr pjsip_err_info_hdr;
+
+/** Create Error-Info header. */
+#define pjsip_err_info_hdr_create pjsip_generic_string_hdr_create
+
+/** In-Reply-To header. */
+typedef pjsip_generic_string_hdr pjsip_in_reply_to_hdr;
+
+/** Create In-Reply-To header. */
+#define pjsip_in_reply_to_hdr_create pjsip_generic_string_hdr_create
+
+/** MIME-Version header. */
+typedef pjsip_generic_string_hdr pjsip_mime_version_hdr;
+
+/** Create MIME-Version header. */
+#define pjsip_mime_version_hdr_create pjsip_generic_string_hdr_create
+
+/** Organization header. */
+typedef pjsip_generic_string_hdr pjsip_organization_hdr;
+
+/** Create Organization header. */
+#define pjsip_organization_hdr_create pjsip_genric_string_hdr_create
+
+/** Priority header. */
+typedef pjsip_generic_string_hdr pjsip_priority_hdr;
+
+/** Create Priority header. */
+#define pjsip_priority_hdr_create pjsip_generic_string_hdr_create
+
+/** Proxy-Require header. */
+typedef pjsip_generic_string_hdr pjsip_proxy_require_hdr;
+
+/** Reply-To header. */
+typedef pjsip_generic_string_hdr pjsip_reply_to_hdr;
+
+/** Create Reply-To header. */
+#define pjsip_reply_to_hdr_create pjsip_generic_string_hdr_create
+
+/** Server header. */
+typedef pjsip_generic_string_hdr pjsip_server_hdr;
+
+/** Create Server header. */
+#define pjsip_server_hdr_create pjsip_generic_string_hdr_create
+
+/** Subject header. */
+typedef pjsip_generic_string_hdr pjsip_subject_hdr;
+
+/** Create Subject header. */
+#define pjsip_subject_hdr_create pjsip_generic_string_hdr_create
+
+/** Timestamp header. */
+typedef pjsip_generic_string_hdr pjsip_timestamp_hdr;
+
+/** Create Timestamp header. */
+#define pjsip_timestamp_hdr_create pjsip_generic_string_hdr_create
+
+/** User-Agent header. */
+typedef pjsip_generic_string_hdr pjsip_user_agent_hdr;
+
+/** Create User-Agent header. */
+#define pjsip_user_agent_hdr_create pjsip_generic_string_hdr_create
+
+
+/**
+ * @}
+ */
+
+/**
+ * @}  PJSIP_MSG
+ */
+
+
+PJ_END_DECL
+
+#endif	/* __PJSIP_SIP_MSG_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_parser.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_parser.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_parser.h	(revision 1163)
@@ -0,0 +1,389 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_PARSER_H__
+#define __PJSIP_SIP_PARSER_H__
+
+/**
+ * @file sip_parser.h
+ * @brief SIP Message Parser
+ */
+
+#include <pjsip/sip_msg.h>
+#include <pjlib-util/scanner.h>
+#include <pj/list.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_PARSER Parser
+ * @ingroup PJSIP_MSG
+ * @brief Message and message elements parsing.
+ * @{
+ */
+
+/**
+ * URI Parsing options.
+ */
+enum
+{
+    /** If this option is specified, function #pjsip_parse_uri will return
+     *  the URI object as pjsip_name_addr instead of the corresponding
+     *  URI object.
+     */
+    PJSIP_PARSE_URI_AS_NAMEADDR = 1,
+
+    /** If this option is specified, function #pjsip_parse_uri and other
+     *  internal functions that this function calls will parse URI according
+     *  to convention for parsing From/To/Contact header. For example, when 
+     *  the URI is not enclosed in brackets ("<" and ">"), all parameters 
+     *  are treated as header parameters (not URI parameters).
+     */
+    PJSIP_PARSE_URI_IN_FROM_TO_HDR = 2
+};
+
+/**
+ * Parser syntax error exception value.
+ */
+extern int PJSIP_SYN_ERR_EXCEPTION;
+
+/**
+ * This structure is used to get error reporting from parser.
+ */
+typedef struct pjsip_parser_err_report
+{
+    /** Standard header fields. */
+    PJ_DECL_LIST_MEMBER(struct pjsip_parser_err_report);
+    int		except_code;	/**< Error exception (e.g. PJSIP_SYN_ERR_EXCEPTION) */
+    int		line;		/**< Line number. */
+    int		col;		/**< Column number. */
+    pj_str_t	hname;		/**< Header name, if any. */
+} pjsip_parser_err_report;
+
+
+/**
+ * Parsing context, the default argument for parsing functions.
+ */
+typedef struct pjsip_parse_ctx
+{
+    pj_scanner      *scanner;   /**< The scanner.       */
+    pj_pool_t       *pool;      /**< The pool.          */
+    pjsip_rx_data   *rdata;     /**< Optional rdata.    */
+} pjsip_parse_ctx;
+
+
+/**
+ * Type of function to parse header. The parsing function must follow these
+ * specification:
+ *   - It must not modify the input text.
+ *   - The hname and HCOLON has been parsed prior to invoking the handler.
+ *   - It returns the header instance on success.
+ *   - For error reporting, it must throw PJSIP_SYN_ERR_EXCEPTION exception 
+ *     instead of just returning NULL. 
+ *     When exception is thrown, the return value is ignored.
+ *   - It must read the header separator after finished reading the header
+ *     body. The separator types are described below, and if they don't exist,
+ *     exception must be thrown. Header separator can be a:
+ *	- newline, such as when the header is part of a SIP message.
+ *	- ampersand, such as when the header is part of an URI.
+ *	- for the last header, these separator is optional since parsing
+ *        can be terminated when seeing EOF.
+ */
+typedef pjsip_hdr* (pjsip_parse_hdr_func)(pjsip_parse_ctx *context);
+
+/**
+ * Type of function to parse URI scheme.
+ * Most of the specification of header parser handler (pjsip_parse_hdr_func)
+ * also applies here (except the separator part).
+ */
+typedef void* (pjsip_parse_uri_func)(pj_scanner *scanner, pj_pool_t *pool,
+				     pj_bool_t parse_params);
+
+/**
+ * Register header parser handler. The parser handler MUST follow the 
+ * specification of header parser handler function. New registration 
+ * overwrites previous registration with the same name.
+ *
+ * @param hname		The header name.
+ * @param hshortname	The short header name or NULL.
+ * @param fptr		The pointer to function to parser the header.
+ *
+ * @return		PJ_SUCCESS if success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_register_hdr_parser( const char *hname,
+						const char *hshortname,
+						pjsip_parse_hdr_func *fptr);
+
+/**
+ * Unregister previously registered header parser handler.
+ * All the arguments MUST exactly equal to the value specified upon 
+ * registration of the handler.
+ *
+ * @param hname		The header name registered.
+ * @param hshortname	The short header name registered, or NULL.
+ * @param fptr		Previously registered function to parse the header.
+ *
+ * @return		zero if unregistration was successfull.
+ */
+PJ_DECL(pj_status_t) pjsip_unregister_hdr_parser( const char *hname,
+						  const char *hshortname,
+						  pjsip_parse_hdr_func *fptr);
+
+/**
+ * Register URI scheme parser handler.
+ *
+ * @param scheme	The URI scheme registered.
+ * @param func		The URI parser function.
+ *
+ * @return		zero on success.
+ */
+PJ_DECL(pj_status_t) pjsip_register_uri_parser( char *scheme,
+					        pjsip_parse_uri_func *func);
+
+/**
+ * Unregister URI scheme parser handler.
+ * All the arguments MUST exactly equal to the value specified upon 
+ * registration of the handler.
+ *
+ * @param scheme	The URI scheme as registered previously.
+ * @param func		The function handler as registered previously.
+ *
+ * @return		zero if the registration was successfull.
+ */
+PJ_DECL(pj_status_t) pjsip_unregister_uri_parser( const char *scheme,
+						  pjsip_parse_uri_func *func);
+
+/**
+ * Parse an URI in the input and return the correct instance of URI.
+ *
+ * @param pool		The pool to get memory allocations.
+ * @param buf		The input buffer, which size must be at least (size+1)
+ *			because the function will temporarily put NULL 
+ *			termination at the end of the buffer during parsing.
+ * @param size		The length of the string (not counting NULL terminator).
+ * @param options	If no options are given (value is zero), the object 
+ *			returned is dependent on the syntax of the URI, 
+ *			eg. basic SIP URL, TEL URL, or name address. 
+ *			If option PJSIP_PARSE_URI_AS_NAMEADDR is given,
+ *			then the returned object is always name address object,
+ *			with the relevant URI object contained in the name 
+ *			address object.
+ * @return		The URI or NULL when failed. No exception is thrown by 
+ *			this function (or any public parser functions).
+ */
+PJ_DECL(pjsip_uri*) pjsip_parse_uri( pj_pool_t *pool, 
+				     char *buf, pj_size_t size,
+				     unsigned options);
+
+/**
+ * Parse SIP status line.
+ *
+ * @param buf		Text buffer to parse.
+ * @param size		The size of the buffer.
+ * @param status_line	Structure to receive the parsed elements.
+ *
+ * @return		PJ_SUCCESS if a status line is parsed successfully.
+ */
+PJ_DECL(pj_status_t) pjsip_parse_status_line(char *buf, pj_size_t size,
+					     pjsip_status_line *status_line);
+
+
+/**
+ * Parse a packet buffer and build a full SIP message from the packet. This
+ * function parses all parts of the message, including request/status line,
+ * all headers, and the message body. The message body however is only 
+ * treated as a text block, ie. the function will not try to parse the content
+ * of the body.
+ *
+ * @param pool		The pool to allocate memory.
+ * @param buf		The input buffer, which size must be at least (size+1)
+ *			because the function will temporarily put NULL 
+ *			termination at the end of the buffer during parsing.
+ * @param size		The length of the string (not counting NULL terminator).
+ * @param err_list	If this parameter is not NULL, then the parser will
+ *			put error messages during parsing in this list.
+ *
+ * @return		The message or NULL when failed. No exception is thrown
+ *			by this function (or any public parser functions).
+ */
+PJ_DECL(pjsip_msg *) pjsip_parse_msg( pj_pool_t *pool, 
+				      char *buf, pj_size_t size,
+				      pjsip_parser_err_report *err_list);
+
+
+/**
+ * Parse a packet buffer and build a rdata. The resulting message will be
+ * stored in \c msg field in the \c rdata. This behaves pretty much like
+ * #pjsip_parse_msg(), except that it will also initialize the header fields
+ * in the \c rdata.
+ *
+ * This function is normally called by the transport layer.
+ *
+ * @param buf           The input buffer
+ * @param buf		The input buffer, which size must be at least (size+1)
+ *			because the function will temporarily put NULL 
+ *			termination at the end of the buffer during parsing.
+ * @param size		The length of the string (not counting NULL terminator).
+ * @param rdata         The receive data buffer to store the message and
+ *                      its elements.
+ *
+ * @return              The message inside the rdata if successfull, or NULL.
+ */
+PJ_DECL(pjsip_msg *) pjsip_parse_rdata( char *buf, pj_size_t size,
+                                        pjsip_rx_data *rdata );
+
+/**
+ * Check incoming packet to see if a (probably) valid SIP message has been 
+ * received.
+ *
+ * @param buf		The input buffer, which must be NULL terminated.
+ * @param size		The buffer size.
+ * @param is_datagram	Put non-zero if transport is datagram oriented.
+ * @param msg_size	[out] If message is valid, this parameter will contain
+ *			the size of the SIP message (including body, if any).
+ *
+ * @return		PJ_SUCCESS if a message is found, or an error code.
+ */
+PJ_DECL(pj_status_t) pjsip_find_msg(const char *buf, 
+                                    pj_size_t size, 
+				    pj_bool_t is_datagram, 
+                                    pj_size_t *msg_size);
+
+/**
+ * Parse the content of a header and return the header instance.
+ * This function parses the content of a header (ie. part after colon) according
+ * to the expected name, and will return the correct instance of header.
+ *
+ * @param pool		Pool to allocate memory for the header.
+ * @param hname		Header name which is used to find the correct function
+ *			to parse the header.
+ * @param line		Header content, which size must be at least size+1.
+ * @param size		The length of the string (not counting NULL terminator,
+ *			if any).
+ * @param parsed_len	If the value is not NULL, then upon return the function
+ *			will fill the pointer with the length of the string
+ *			that has been parsed. This is usefull for two purposes,
+ *			one is when the string may contain more than one header
+ *			lines, and two when an error happen the value can
+ *			pinpoint the location of the error in the buffer.
+ *
+ * @return		The instance of the header if parsing was successfull,
+ *			or otherwise a NULL pointer will be returned.
+ */
+PJ_DECL(void*) pjsip_parse_hdr( pj_pool_t *pool, const pj_str_t *hname,
+				char *line, pj_size_t size,
+				int *parsed_len);
+
+/**
+ * Parse header line(s). Multiple headers can be parsed by this function.
+ * When there are multiple headers, the headers MUST be separated by either
+ * a newline (as in SIP message) or ampersand mark (as in URI). This separator
+ * however is optional for the last header.
+ *
+ * @param pool		the pool.
+ * @param input		the input text to parse.
+ * @param size		the text length.
+ * @param hlist		the header list to store the parsed headers. 
+ *			This list must have been initialized before calling 
+ *			this function.
+ * @return		zero if successfull, or -1 if error is encountered. 
+ *			Upon error, the \a hlist argument MAY contain 
+ *			successfully parsed headers.
+ */
+PJ_DECL(pj_status_t) pjsip_parse_headers( pj_pool_t *pool,
+					  char *input, pj_size_t size,
+					  pj_list *hlist );
+
+
+/**
+ * @}
+ */
+
+
+/*
+ * Various specification used in parsing, exported here as extern for other
+ * parsers.
+ */
+extern pj_cis_t    
+    pjsip_HOST_SPEC,		/**< For scanning host part. */
+    pjsip_DIGIT_SPEC,		/**< Decimal digits */
+    pjsip_ALPHA_SPEC,		/**< Alpha (A-Z, a-z) */
+    pjsip_ALNUM_SPEC,		/**< Decimal + Alpha. */
+    pjsip_TOKEN_SPEC,		/**< Token. */
+    pjsip_TOKEN_SPEC_ESC,	/**< Token without '%' character */
+    pjsip_HEX_SPEC,	        /**< Hexadecimal digits. */
+    pjsip_PARAM_CHAR_SPEC,      /**< For scanning pname (or pvalue when it's 
+				     not quoted.) in URI */
+    pjsip_PARAM_CHAR_SPEC_ESC,	/**< Variant without the escape ('%') char */
+    pjsip_HDR_CHAR_SPEC,	/**< Chars in hname/havalue in URL. */
+    pjsip_HDR_CHAR_SPEC_ESC,	/**< Variant without the escape ('%') char */
+    pjsip_PROBE_USER_HOST_SPEC, /**< Hostname characters. */
+    pjsip_PASSWD_SPEC,		/**< Password. */
+    pjsip_PASSWD_SPEC_ESC,	/**< Variant without the escape ('%') char */
+    pjsip_USER_SPEC,		/**< User */
+    pjsip_USER_SPEC_ESC,	/**< Variant without the escape ('%') char */
+    pjsip_NOT_NEWLINE,		/**< For eating up header, basicly any chars
+				     except newlines or zero. */
+    pjsip_NOT_COMMA_OR_NEWLINE, /**< Array elements. */
+    pjsip_DISPLAY_SPEC;		/**< Used when searching for display name. */
+
+/*
+ * Various string constants.
+ */
+extern const pj_str_t pjsip_USER_STR,	    /**< "user" string constant.    */
+		      pjsip_METHOD_STR,	    /**< "method" string constant   */
+		      pjsip_TRANSPORT_STR,  /**< "transport" string const.  */
+		      pjsip_MADDR_STR,	    /**< "maddr" string const.	    */
+		      pjsip_LR_STR,	    /**< "lr" string const.	    */
+		      pjsip_SIP_STR,	    /**< "sip" string constant.	    */
+		      pjsip_SIPS_STR,	    /**< "sips" string constant.    */
+		      pjsip_TEL_STR,	    /**< "tel" string constant.	    */
+		      pjsip_BRANCH_STR,	    /**< "branch" string constant.  */
+		      pjsip_TTL_STR,	    /**< "ttl" string constant.	    */
+		      pjsip_RECEIVED_STR,   /**< "received" string const.   */
+		      pjsip_Q_STR,	    /**< "q" string constant.	    */
+		      pjsip_EXPIRES_STR,    /**< "expires" string constant. */
+		      pjsip_TAG_STR,	    /**< "tag" string constant.	    */
+		      pjsip_RPORT_STR;	    /**< "rport" string const.	    */
+
+
+/*
+ * Parser utilities.
+ */
+enum
+{
+    PJSIP_PARSE_REMOVE_QUOTE = 1
+};
+
+/* Parse parameter in header (matching the character as token) */
+void pjsip_parse_param_imp(  pj_scanner *scanner, pj_pool_t *pool,
+			     pj_str_t *pname, pj_str_t *pvalue,
+			     unsigned opt);
+/* Parse parameter in URL (matching the character as paramchar) */
+void pjsip_parse_uri_param_imp(  pj_scanner *scanner, pj_pool_t *pool,
+				 pj_str_t *pname, pj_str_t *pvalue,
+				 unsigned opt);
+void pjsip_concat_param_imp( pj_str_t *param, pj_pool_t *pool, 
+			     const pj_str_t *pname, const pj_str_t *pvalue, 
+			     int sepchar);
+void pjsip_parse_end_hdr_imp ( pj_scanner *scanner );
+
+PJ_END_DECL
+
+#endif	/* __PJSIP_SIP_PARSER_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_private.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_private.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_private.h	(revision 1163)
@@ -0,0 +1,31 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_PRIVATE_H__
+#define __PJSIP_SIP_PRIVATE_H__
+
+/**
+ * @file sip_private.h
+ * @brief Private structures and functions for PJSIP Library.
+ */ 
+
+#include <pjsip/sip_types.h>
+
+
+#endif /* __PJSIP_PRIVATE_I_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_resolve.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_resolve.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_resolve.h	(revision 1163)
@@ -0,0 +1,290 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_RESOLVE_H__
+#define __PJSIP_SIP_RESOLVE_H__
+
+/**
+ * @file sip_resolve.h
+ * @brief 
+ * This module contains the mechanism to resolve server address as specified by
+ * RFC 3263 - Locating SIP Servers
+ */
+
+#include <pjsip/sip_types.h>
+#include <pjlib-util/resolver.h>
+#include <pj/sock.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_RESOLVE SIP SRV Server Resolution (RFC 3263 - Locating SIP Servers)
+ * @ingroup PJSIP_TRANSPORT
+ * @brief Framework to resolve SIP servers based on RFC 3263.
+ * @{
+ * \section PJSIP_RESOLVE_FEATURES Features
+ *
+ * This is the SIP server resolution framework, which is modelled after 
+ * RFC 3263 - Locating SIP Servers document. The SIP server resolution
+ * framework is asynchronous; callback will be called once the server 
+ * address has been resolved (successfully or with errors).
+ *
+ * \subsection PJSIP_RESOLVE_CONFORMANT Conformance to RFC 3263
+ *
+ * The SIP server resolution framework is modelled after RFC 3263 (Locating 
+ * SIP Servers) document, and it provides a single function (#pjsip_resolve())
+ * to resolve a domain into actual IP addresses of the servers, by querying 
+ * DNS SRV record and DNS A record where necessary.
+ *
+ * The #pjsip_resolve() function performs the server resolution according
+ * to RFC 3263 with some additional fallback mechanisms, as follows:
+ *  - if the target name is an IP address, the callback will be called
+ *    immediately with the IP address. If port number was specified, this
+ *    port number will be used, otherwise the default port number for the
+ *    transport will be used (5060 for TCP/UDP, 5061 for TLS) if the transport
+ *    is specified. If the transport is not specified, UDP with port number
+ *    5060 will be used.
+ *  - if target name is not an IP address but it contains port number,
+ *    then the target name is resolved with DNS A (or AAAA, when IPv6 is
+ *    supported in the future) query, and the port is taken from the
+ *    port number argument. The callback will be called once the DNS A
+ *    resolution completes. If the DNS A resolution returns multiple IP
+ *    addresses, these IP addresses will be returned to the caller.
+ *  - if target name is not an IP address and port number is not specified,
+ *    DNS SRV resolution will be performed for the specified name and
+ *    transport type (or UDP when transport is not specified), 
+ *    then followed by DNS A (or AAAA, when IPv6 is supported)
+ *    resolution for each target in the SRV record. If DNS SRV
+ *    resolution returns error, DNS A (or AAAA) resolution will be
+ *    performed for the original target (it is assumed that the target domain
+ *    does not support SRV records). Upon successful completion, 
+ *    application callback will be called with each IP address of the
+ *    target selected based on the load-balancing and fail-over criteria
+ *    below.
+ *
+ * The above server resolution procedure differs from RFC 3263 in these
+ * regards:
+ *  - currently #pjsip_resolve() doesn't support DNS NAPTR record.
+ *  - if transport is not specified, it is assumed to be UDP (the proper
+ *    behavior is to query the NAPTR record, but we don't support this
+ *    yet).
+ *
+ *
+ * \subsection PJSIP_SIP_RESOLVE_FAILOVER_LOADBALANCE Load-Balancing and Fail-Over
+ *
+ * When multiple targets are returned in the DNS SRV response, server entries
+ * are selected based on the following rule (which is described in RFC 2782):
+ *  - targets will be sorted based on the priority first.
+ *  - for targets with the same priority, #pjsip_resolve() will select
+ *    only one target according to its weight. To select this one target,
+ *    the function associates running-sum for all targets, and generates 
+ *    a random number between zero and the total running-sum (inclusive).
+ *    The target selected is the first target with running-sum greater than
+ *    or equal to this random number.
+ *
+ * The above procedure will select one target for each priority, allowing
+ * application to fail-over to the next target when the previous target fails.
+ * These targets are returned in the #pjsip_server_addresses structure 
+ * argument of the callback. 
+ *
+ * \subsection PJSIP_SIP_RESOLVE_SIP_FEATURES SIP SRV Resolver Features
+ *
+ * Some features of the SIP resolver:
+ *  - DNS SRV entries are returned on sorted order based on priority 
+ *    to allow failover to the next appropriate server.
+ *  - The procedure in RFC 2782 is used to select server with the same
+ *    priority to load-balance the servers load.
+ *  - A single function (#pjsip_resolve()) performs all server resolution
+ *    works, from resolving the SRV records to getting the actual IP addresses
+ *    of the servers with DNS A (or AAAA) resolution.
+ *  - When multiple DNS SRV records are returned, parallel DNS A (or AAAA)
+ *    queries will be issued simultaneously.
+ *  - The PJLIB-UTIL DNS resolver provides additional functionality such as
+ *    response caching, query aggregation, parallel nameservers, fallback
+ *    nameserver, etc., which will be described below.
+ * 
+ *
+ * \subsection PJSIP_RESOLVE_DNS_FEATURES DNS Resolver Features
+ *
+ * The PJSIP server resolution framework uses PJLIB-UTIL DNS resolver engine
+ * for performing the asynchronous DNS request. The PJLIB-UTIL DNS resolver
+ * has some useful features, such as:
+ *  - queries are asynchronous with configurable timeout,
+ *  - query aggregation to combine multiple pending queries to the same
+ *    DNS target into a single DNS request (to save message round-trip and
+ *    processing),
+ *  - response caching with TTL negotiated between the minimum TTL found in
+ *    the response and the maximum TTL allowed in the configuration,
+ *  - multiple nameservers, with active nameserver is selected from nameserver
+ *    which provides the best response time,
+ *  - fallback nameserver, with periodic detection of which name servers are
+ *    active or down.
+ *  - etc.
+ *
+ * Please consult PJLIB-UTIL DNS resolver documentation for more details.
+ *
+ *
+ * \section PJSIP_RESOLVE_USING Using the Resolver
+ *
+ * To maintain backward compatibility, the resolver MUST be enabled manually.
+ * With the default settings, the resolver WILL NOT perform DNS SRV resolution,
+ * as it will just resolve the name with standard pj_gethostbyname() function.
+ *
+ * Application can enable the SRV resolver by creating the PJLIB-UTIL DNS 
+ * resolver with #pjsip_endpt_create_resolver(), configure the
+ * nameservers of the PJLIB-UTIL DNS resolver object by calling
+ * pj_dns_resolver_set_ns() function, and pass the DNS resolver object to 
+ * #pjsip_resolver_set_resolver() function.
+ *
+ * Once the resolver is set, it will be used automatically by PJSIP everytime
+ * PJSIP needs to send SIP request/response messages.
+ *
+ *
+ * \section PJSIP_RESOLVE_REFERENCE Reference
+ *
+ * Reference:
+ *  - RFC 2782: A DNS RR for specifying the location of services (DNS SRV)
+ *  - RFC 3263: Locating SIP Servers
+ */
+
+/**
+ * The server addresses returned by the resolver.
+ */
+typedef struct pjsip_server_addresses
+{
+    /** Number of address records. */
+    unsigned	count;
+
+    /** Address records. */
+    struct
+    {
+	/** Preferable transport to be used to contact this address. */
+	pjsip_transport_type_e	type;
+
+	/** Server priority (the lower the higher the priority). */
+	unsigned		priority;
+
+	/** Server weight (the higher the more load it can handle). */
+	unsigned		weight;
+
+	/** The server's address. */
+	pj_sockaddr		addr;
+
+	/** Address length. */
+	int			addr_len;
+
+    } entry[PJSIP_MAX_RESOLVED_ADDRESSES];
+
+} pjsip_server_addresses;
+
+
+/**
+ * The type of callback function to be called when resolver finishes the job.
+ *
+ * @param status    The status of the operation, which is zero on success.
+ * @param token	    The token that was associated with the job when application
+ *		    call the resolve function.
+ * @param addr	    The addresses resolved by the operation.
+ */
+typedef void pjsip_resolver_callback(pj_status_t status,
+				     void *token,
+				     const struct pjsip_server_addresses *addr);
+
+/**
+ * Create SIP resolver engine. Note that this function is normally called
+ * internally by pjsip_endpoint instance.
+ *
+ * @param pf	    The Pool Factory.
+ * @param p_res	    Pointer to receive SIP resolver instance.
+ *
+ * @return	    PJ_SUCCESS when resolver can be successfully created.
+ */
+PJ_DECL(pj_status_t) pjsip_resolver_create(pj_pool_t *pool,
+					   pjsip_resolver_t **p_res);
+
+/**
+ * Set the DNS resolver instance of the SIP resolver engine. Before the
+ * DNS resolver is set, the SIP resolver will use standard pj_gethostbyname()
+ * to resolve addresses.
+ *
+ * Note that application normally will use #pjsip_endpt_set_resolver() instead
+ * since it does not normally have access to the SIP resolver instance.
+ *
+ * @param res	    The SIP resolver engine.
+ * @param dns_res   The DNS resolver instance to be used by the SIP resolver.
+ *		    This argument can be NULL to reset the internal DNS
+ *		    instance.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_resolver_set_resolver(pjsip_resolver_t *res,
+						 pj_dns_resolver *dns_res);
+
+
+/**
+ * Get the DNS resolver instance of the SIP resolver engine. 
+ *
+ * Note that application normally will use #pjsip_endpt_get_resolver() instead
+ * since it does not normally have access to the SIP resolver instance.
+ *
+ * @param res	    The SIP resolver engine.
+ *
+ * @return	    The DNS resolver instance (may be NULL)
+ */
+PJ_DECL(pj_dns_resolver*) pjsip_resolver_get_resolver(pjsip_resolver_t *res);
+
+/**
+ * Destroy resolver engine. Note that this will also destroy the internal
+ * DNS resolver inside the engine. If application doesn't want the internal
+ * DNS resolver to be destroyed, it should set the internal DNS resolver
+ * to NULL before calling this function.
+ *
+ * Note that this function will normally called by the SIP endpoint instance
+ * when the SIP endpoint instance is destroyed.
+ *
+ * @param resolver The resolver.
+ */
+PJ_DECL(void) pjsip_resolver_destroy(pjsip_resolver_t *resolver);
+
+/**
+ * Asynchronously resolve a SIP target host or domain according to rule 
+ * specified in RFC 3263 (Locating SIP Servers). When the resolving operation
+ * has completed, the callback will be called.
+ *
+ * Note that application normally will use #pjsip_endpt_resolve() instead
+ * since it does not normally have access to the SIP resolver instance.
+ *
+ * @param resolver	The resolver engine.
+ * @param pool		The pool to allocate resolver job.
+ * @param target	The target specification to be resolved.
+ * @param token		A user defined token to be passed back to callback function.
+ * @param cb		The callback function.
+ */
+PJ_DECL(void) pjsip_resolve( pjsip_resolver_t *resolver,
+			     pj_pool_t *pool,
+			     const pjsip_host_info *target,
+			     void *token,
+			     pjsip_resolver_callback *cb);
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+#endif	/* __PJSIP_SIP_RESOLVE_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_tel_uri.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_tel_uri.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_tel_uri.h	(revision 1163)
@@ -0,0 +1,83 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_TEL_URI_H__
+#define __PJSIP_TEL_URI_H__
+
+/**
+ * @file sip_tel_uri.h
+ * @brief Tel: URI
+ */
+
+#include <pjsip/sip_uri.h>
+
+/**
+ * @addtogroup PJSIP_TEL_URI tel URI Scheme
+ * @ingroup PJSIP_URI
+ * @brief Support for "tel:" URI scheme.
+ * @{
+ */
+
+
+PJ_BEGIN_DECL
+
+/**
+ * tel: URI.
+ */
+typedef struct pjsip_tel_uri
+{
+    pjsip_uri_vptr *vptr;	/**< Pointer to virtual function table.	*/
+    pj_str_t	    number;	/**< Global or local phone number	*/
+    pj_str_t	    context;	/**< Phone context (for local number).	*/
+    pj_str_t	    ext_param;	/**< Extension param.			*/
+    pj_str_t	    isub_param;	/**< ISDN sub-address param.		*/
+    pjsip_param	    other_param;/**< Other parameter.			*/
+} pjsip_tel_uri;
+
+
+/**
+ * Create a new tel: URI.
+ *
+ * @param pool	    The pool.
+ *
+ * @return	    New instance of tel: URI.
+ */
+PJ_DECL(pjsip_tel_uri*) pjsip_tel_uri_create(pj_pool_t *pool);
+
+/**
+ * This function compares two numbers for equality, according to rules as
+ * specified in RFC 3966.
+ *
+ * @param nb1	    The first number.
+ * @param nb2	    The second number.
+ *
+ * @return	    Zero if equal, -1 if nb1 is less than nb2, or +1 if
+ *		    nb1 is greater than nb2.
+ */
+PJ_DECL(int) pjsip_tel_nb_cmp(const pj_str_t *nb1, const pj_str_t *nb2);
+
+
+PJ_END_DECL
+
+
+/**
+ * @}
+ */
+
+
+#endif	/* __PJSIP_TEL_URI_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transaction.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transaction.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transaction.h	(revision 1163)
@@ -0,0 +1,398 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_TRANSACTION_H__
+#define __PJSIP_SIP_TRANSACTION_H__
+
+/**
+ * @file sip_transaction.h
+ * @brief SIP Transaction
+ */
+
+#include <pjsip/sip_msg.h>
+#include <pjsip/sip_util.h>
+#include <pjsip/sip_transport.h>
+#include <pj/timer.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_TRANSACT Transaction Layer
+ * @ingroup PJSIP
+ * @brief Provides statefull message processing.
+ *
+ * This module provides stateful processing to incoming or outgoing SIP
+ * messages. 
+ * Before performing any stateful operations, application must register the
+ * transaction layer module by calling #pjsip_tsx_layer_init_module().
+ *
+ * Application should link with <b>pjsip-core</b> library to
+ * use the transaction layer.
+ */
+
+/**
+ * @defgroup PJSIP_TRANSACT_TRANSACTION Transaction
+ * @ingroup PJSIP_TRANSACT
+ * @brief Transaction instance for all types of SIP transactions.
+ * @{
+ * The pjsip_transaction describes SIP transaction, and is used for
+ * both INVITE and non-INVITE, UAC or UAS. Application must register the
+ * transaction layer module with #pjsip_tsx_layer_init_module() before
+ * performing any stateful operations.
+ */
+
+/**
+ * This enumeration represents transaction state.
+ */
+typedef enum pjsip_tsx_state_e
+{
+    PJSIP_TSX_STATE_NULL,	/**< For UAC, before any message is sent.   */
+    PJSIP_TSX_STATE_CALLING,	/**< For UAC, just after request is sent.   */
+    PJSIP_TSX_STATE_TRYING,	/**< For UAS, just after request is received.*/
+    PJSIP_TSX_STATE_PROCEEDING,	/**< For UAS/UAC, after provisional response.*/
+    PJSIP_TSX_STATE_COMPLETED,	/**< For UAS/UAC, after final response.	    */
+    PJSIP_TSX_STATE_CONFIRMED,	/**< For UAS, after ACK is received.	    */
+    PJSIP_TSX_STATE_TERMINATED,	/**< For UAS/UAC, before it's destroyed.    */
+    PJSIP_TSX_STATE_DESTROYED,	/**< For UAS/UAC, will be destroyed now.    */
+    PJSIP_TSX_STATE_MAX		/**< Number of states.			    */
+} pjsip_tsx_state_e;
+
+
+/**
+ * Transaction timeout timer policy, to control the UAC transaction timeout
+ * scheduling (see #pjsip_tsx_set_uac_timeout()).
+ */
+typedef enum pjsip_tsx_timeout_policy
+{
+    PJSIP_TSX_IGNORE_100 = 1,	/**< To make the UAC transaction NOT to cancel
+				     the timeout timer when 100 response is 
+				     received.*/
+    PJSIP_TSX_IGNORE_1xx = 3	/**< To make the UAC transaction NOT to cancel
+				     the timeout timer when any 1xx responses 
+				     are received. */
+} pjsip_tsx_timeout_policy;
+
+
+/**
+ * This structure describes SIP transaction object. The transaction object
+ * is used to handle both UAS and UAC transaction.
+ */
+struct pjsip_transaction
+{
+    /*
+     * Administrivia
+     */
+    pj_pool_t		       *pool;           /**< Pool owned by the tsx. */
+    pjsip_module	       *tsx_user;	/**< Transaction user.	    */
+    pjsip_endpoint	       *endpt;          /**< Endpoint instance.     */
+    pj_mutex_t		       *mutex;          /**< Mutex for this tsx.    */
+
+    /*
+     * Transaction identification.
+     */
+    char			obj_name[PJ_MAX_OBJ_NAME];  /**< Log info.  */
+    pjsip_role_e		role;           /**< Role (UAS or UAC)      */
+    pjsip_method		method;         /**< The method.            */
+    int				cseq;           /**< The CSeq               */
+    pj_str_t			transaction_key;/**< Hash table key.        */
+    pj_uint32_t			hashed_key;	/**< Key's hashed value.    */
+    pj_str_t			branch;         /**< The branch Id.         */
+    pjsip_tpselector		tp_sel;		/**< Transport selector.    */
+
+    /*
+     * State and status.
+     */
+    int				status_code;    /**< Last status code seen. */
+    pj_str_t			status_text;	/**< Last reason phrase.    */
+    pjsip_tsx_state_e		state;          /**< State.                 */
+    int				handle_200resp; /**< UAS 200/INVITE  retrsm.*/
+    int                         tracing;        /**< Tracing enabled?       */
+
+    /** Handler according to current state. */
+    pj_status_t (*state_handler)(struct pjsip_transaction *, pjsip_event *);
+
+    /*
+     * Transport.
+     */
+    pjsip_transport	       *transport;      /**< Transport to use.      */
+    pj_bool_t			is_reliable;	/**< Transport is reliable. */
+    pj_sockaddr			addr;		/**< Destination address.   */
+    int				addr_len;	/**< Address length.	    */
+    pjsip_response_addr		res_addr;	/**< Response address.	    */
+    unsigned			transport_flag;	/**< Miscelaneous flag.	    */
+    pj_status_t			transport_err;	/**< Internal error code.   */
+
+    /*
+     * Messages and timer.
+     */
+    pjsip_tx_data	       *last_tx;        /**< Msg kept for retrans.  */
+    int				retransmit_count;/**< Retransmission count. */
+    pj_timer_entry		retransmit_timer;/**< Retransmit timer.     */
+    pj_timer_entry		timeout_timer;  /**< Timeout timer.         */
+
+    unsigned			msec_timeout;	/**< User set timeout.	    */
+    pjsip_tsx_timeout_policy	timeout_policy;	/**< Timeout policy.	    */
+
+    /** Module specific data. */
+    void		       *mod_data[PJSIP_MAX_MODULE];
+};
+
+
+/**
+ * Create and register transaction layer module to the specified endpoint.
+ *
+ * @param endpt	    The endpoint instance.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_tsx_layer_init_module(pjsip_endpoint *endpt);
+
+/**
+ * Get the instance of the transaction layer module.
+ *
+ * @return	    The transaction layer module.
+ */
+PJ_DECL(pjsip_module*) pjsip_tsx_layer_instance(void);
+
+/**
+ * Unregister and destroy transaction layer module.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_tsx_layer_destroy(void);
+
+/**
+ * Find a transaction with the specified key. The transaction key normally
+ * is created by calling #pjsip_tsx_create_key() from an incoming message.
+ *
+ * @param key	    The key string to find the transaction.
+ * @param lock	    If non-zero, transaction will be locked before the
+ *		    function returns, to make sure that it's not deleted
+ *		    by other threads.
+ *
+ * @return	    The matching transaction instance, or NULL if transaction
+ *		    can not be found.
+ */
+PJ_DECL(pjsip_transaction*) pjsip_tsx_layer_find_tsx( const pj_str_t *key,
+						      pj_bool_t lock );
+
+/**
+ * Create, initialize, and register a new transaction as UAC from the 
+ * specified transmit data (\c tdata). The transmit data must have a valid
+ * \c Request-Line and \c CSeq header. 
+ *
+ * If \c Via header does not exist, it will be created along with a unique
+ * \c branch parameter. If it exists and contains branch parameter, then
+ * the \c branch parameter will be used as is as the transaction key. If
+ * it exists but branch parameter doesn't exist, a unique branch parameter
+ * will be created.
+ *
+ * @param tsx_user  Module to be registered as transaction user of the new
+ *		    transaction, which will receive notification from the
+ *		    transaction via on_tsx_state() callback.
+ * @param tdata     The outgoing request message.
+ * @param p_tsx	    On return will contain the new transaction instance.
+ *
+ * @return          PJ_SUCCESS if successfull.
+ */
+PJ_DECL(pj_status_t) pjsip_tsx_create_uac( pjsip_module *tsx_user,
+					   pjsip_tx_data *tdata,
+					   pjsip_transaction **p_tsx);
+
+/**
+ * Create, initialize, and register a new transaction as UAS from the
+ * specified incoming request in \c rdata. After calling this function,
+ * application MUST call #pjsip_tsx_recv_msg() so that transaction
+ * moves from state NULL.
+ *
+ * @param tsx_user  Module to be registered as transaction user of the new
+ *		    transaction, which will receive notification from the
+ *		    transaction via on_tsx_state() callback.
+ * @param rdata     The received incoming request.
+ * @param p_tsx	    On return will contain the new transaction instance.
+ *
+ * @return	    PJ_SUCCESS if successfull.
+ */
+PJ_DECL(pj_status_t) pjsip_tsx_create_uas( pjsip_module *tsx_user,
+					   pjsip_rx_data *rdata,
+					   pjsip_transaction **p_tsx );
+
+
+/**
+ * Lock/bind transaction to a specific transport/listener. This is optional,
+ * as normally transport will be selected automatically based on the 
+ * destination of the message upon resolver completion.
+ *
+ * @param tsx	    The transaction.
+ * @param sel	    Transport selector containing the specification of
+ *		    transport or listener to be used by this transaction
+ *		    to send requests.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_tsx_set_transport(pjsip_transaction *tsx,
+					     const pjsip_tpselector *sel);
+
+
+/**
+ * Set the UAC absolute transaction timeout. Normally UAC transaction will
+ * stop its timeout timer (timer B for INVITE and timer F for non-INVITE
+ * transactions) after a provisional response is received.
+ *
+ * When this timer is set, the transaction's timer B and F will use this
+ * value, and if the \a flag flag is set, the transaction will continue
+ * the scheduling of the timeout timer even when provisional response has
+ * been received.
+ *
+ * Note that this function MUST be called AFTER the transaction has been
+ * created AND BEFORE any request is transmitted.
+ *
+ * @param tsx	    The client/UAC transaction.
+ * @param msec_time The timeout value, in miliseconds. Currently this
+ *		    value must be non-zero (value zero is reserved for
+ *		    future use).
+ * @param flag	    Option flags to control whether the transaction should
+ *		    cancel the timeout timer on arrival of provisional
+ *		    responses (which is yes according to RFC 3261).
+ *		    The valid values are:
+ *		    - PJSIP_TSX_IGNORE_100, to make the UAC transaction
+ *		      NOT to cancel the timeout timer when 100 response
+ *		      is received.
+ *		    - PJSIP_TSX_IGNORE_1xx, to make the UAC transaction
+ *		      NOT to cancel the timeout timer when any 1xx 
+ *		      responses are received.
+ *
+ *		    Note that regardless of the values in the \a flag 
+ *		    argument, the provisional response would still be
+ *		    delivered to transaction user and it will still
+ *		    affect the transaction state. The \a flag flag only
+ *		    changes the behavior of the timeout timer of the
+ *		    transaction.
+ */
+PJ_DECL(pj_status_t) pjsip_tsx_set_uac_timeout(pjsip_transaction *tsx,
+					       unsigned msec_time,
+					       pjsip_tsx_timeout_policy flag);
+
+
+/**
+ * Call this function to manually feed a message to the transaction.
+ * For UAS transaction, application MUST call this function after
+ * UAS transaction has been created.
+ *
+ * This function SHOULD only be called to pass initial request message
+ * to UAS transaction. Before this function returns, on_tsx_state()
+ * callback of the transaction user will be called. If response message
+ * is passed to this function, then on_rx_response() will also be called
+ * before on_tsx_state().
+ *
+ * @param tsx	    The transaction.
+ * @param rdata	    The message.
+ */
+PJ_DECL(void) pjsip_tsx_recv_msg( pjsip_transaction *tsx, 
+				  pjsip_rx_data *rdata);
+
+/**
+ * Transmit message in tdata with this transaction. It is possible to
+ * pass NULL in tdata for UAC transaction, which in this case the last 
+ * message transmitted, or the request message which was specified when
+ * calling #pjsip_tsx_create_uac(), will be sent.
+ *
+ * This function decrements the reference counter of the transmit buffer
+ * only when it returns PJ_SUCCESS;
+ *
+ * @param tsx       The transaction.
+ * @param tdata     The outgoing message. If NULL is specified, then the
+ *		    last message transmitted (or the message specified 
+ *		    in UAC initialization) will be sent.
+ *
+ * @return	    PJ_SUCCESS if successfull.
+ */
+PJ_DECL(pj_status_t) pjsip_tsx_send_msg( pjsip_transaction *tsx,
+					 pjsip_tx_data *tdata);
+
+
+/**
+ * Create transaction key, which is used to match incoming requests 
+ * or response (retransmissions) against transactions.
+ *
+ * @param pool      The pool
+ * @param key       Output key.
+ * @param role      The role of the transaction.
+ * @param method    The method to be put as a key. 
+ * @param rdata     The received data to calculate.
+ *
+ * @return          PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_tsx_create_key( pj_pool_t *pool,
+				           pj_str_t *key,
+				           pjsip_role_e role,
+				           const pjsip_method *method,
+				           const pjsip_rx_data *rdata );
+
+
+/**
+ * Force terminate transaction.
+ *
+ * @param tsx       The transaction.
+ * @param code      The status code to report.
+ */
+PJ_DECL(pj_status_t) pjsip_tsx_terminate( pjsip_transaction *tsx,
+					  int code );
+
+
+/**
+ * Get the transaction instance in the incoming message. If the message
+ * has a corresponding transaction, this function will return non NULL
+ * value.
+ *
+ * @param rdata	    The incoming message buffer.
+ *
+ * @return	    The transaction instance associated with this message,
+ *		    or NULL if the message doesn't match any transactions.
+ */
+PJ_DECL(pjsip_transaction*) pjsip_rdata_get_tsx( pjsip_rx_data *rdata );
+
+
+/**
+ * @}
+ */
+
+/*
+ * Internal.
+ */
+
+/*
+ * Dump transaction layer.
+ */
+PJ_DECL(void) pjsip_tsx_layer_dump(pj_bool_t detail);
+
+/*
+ * Get the string name for the state.
+ */
+PJ_DECL(const char *) pjsip_tsx_state_str(pjsip_tsx_state_e state);
+
+/*
+ * Get the role name.
+ */
+PJ_DECL(const char *) pjsip_role_name(pjsip_role_e role);
+
+
+PJ_END_DECL
+
+#endif	/* __PJSIP_TRANSACT_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport.h	(revision 1163)
@@ -0,0 +1,1002 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_TRANSPORT_H__
+#define __PJSIP_SIP_TRANSPORT_H__
+
+/**
+ * @file sip_transport.h
+ * @brief SIP Transport
+ */
+
+#include <pjsip/sip_msg.h>
+#include <pjsip/sip_parser.h>
+#include <pj/sock.h>
+#include <pj/list.h>
+#include <pj/ioqueue.h>
+#include <pj/timer.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_TRANSPORT Transport
+ * @ingroup PJSIP_CORE
+ * @brief This is the transport framework.
+ *
+ * The transport framework is fully extensible. Please see
+ * <A HREF="/docs.htm">PJSIP Developer's Guide</A> PDF
+ * document for more information.
+ *
+ * Application MUST register at least one transport to PJSIP before any
+ * messages can be sent or received. Please see @ref PJSIP_TRANSPORT_UDP
+ * on how to create/register UDP transport to the transport framework.
+ *
+ * @{
+ */
+
+/*****************************************************************************
+ *
+ * GENERAL TRANSPORT (NAMES, TYPES, ETC.)
+ *
+ *****************************************************************************/
+
+/*
+ * Forward declaration for transport factory (since it is referenced by
+ * the transport factory itself).
+ */
+typedef struct pjsip_tpfactory pjsip_tpfactory;
+
+
+/**
+ * Flags for SIP transports.
+ */
+enum pjsip_transport_flags_e
+{
+    PJSIP_TRANSPORT_RELIABLE	    = 1,    /**< Transport is reliable.	    */
+    PJSIP_TRANSPORT_SECURE	    = 2,    /**< Transport is secure.	    */
+    PJSIP_TRANSPORT_DATAGRAM	    = 4     /**< Datagram based transport.  
+					         (it's also assumed to be 
+						 connectionless)	    */
+};
+
+/**
+ * Check if transport tp is reliable.
+ */
+#define PJSIP_TRANSPORT_IS_RELIABLE(tp)	    \
+	    ((tp)->flag & PJSIP_TRANSPORT_RELIABLE)
+
+/**
+ * Check if transport tp is secure.
+ */
+#define PJSIP_TRANSPORT_IS_SECURE(tp)	    \
+	    ((tp)->flag & PJSIP_TRANSPORT_SECURE)
+
+/**
+ * Register new transport type to PJSIP. The PJSIP transport framework
+ * contains the info for some standard transports, as declared by
+ * #pjsip_transport_type_e. Application may use non-standard transport
+ * with PJSIP, but before it does so, it must register the information
+ * about the new transport type to PJSIP by calling this function.
+ *
+ * @param tp_flag   The flags describing characteristics of this
+ *		    transport type.
+ * @param tp_name   Transport type name.
+ * @param def_port  Default port to be used for the transport.
+ * @param p_tp_type On successful registration, it will be filled with
+ *		    the registered type. This argument is optional.
+ *
+ * @return	    PJ_SUCCESS if registration is successful, or
+ *		    PJSIP_ETYPEEXISTS if the same transport type has
+ *		    already been registered.
+ */
+PJ_DECL(pj_status_t) pjsip_transport_register_type(unsigned tp_flag,
+						   const char *tp_name,
+						   int def_port,
+						   int *p_tp_type);
+
+
+/**
+ * Get the transport type from the transport name.
+ *
+ * @param name	    Transport name, such as "TCP", or "UDP".
+ *
+ * @return	    The transport type, or PJSIP_TRANSPORT_UNSPECIFIED if 
+ *		    the name is not recognized as the name of supported 
+ *		    transport.
+ */
+PJ_DECL(pjsip_transport_type_e) 
+pjsip_transport_get_type_from_name(const pj_str_t *name);
+
+/**
+ * Get the transport type for the specified flags.
+ *
+ * @param flag	    The transport flag.
+ *
+ * @return	    Transport type.
+ */
+PJ_DECL(pjsip_transport_type_e) 
+pjsip_transport_get_type_from_flag(unsigned flag);
+
+/**
+ * Get transport flag from type.
+ *
+ * @param type	    Transport type.
+ *
+ * @return	    Transport flags.
+ */
+PJ_DECL(unsigned)
+pjsip_transport_get_flag_from_type( pjsip_transport_type_e type );
+
+/**
+ * Get the default SIP port number for the specified type.
+ *
+ * @param type	    Transport type.
+ *
+ * @return	    The port number, which is the default SIP port number for
+ *		    the specified type.
+ */
+PJ_DECL(int) 
+pjsip_transport_get_default_port_for_type(pjsip_transport_type_e type);
+
+/**
+ * Get transport type name.
+ *
+ * @param t	    Transport type.
+ *
+ * @return	    Transport name.
+ */
+PJ_DECL(const char*) pjsip_transport_get_type_name(pjsip_transport_type_e t);
+
+
+
+/*****************************************************************************
+ *
+ * TRANSPORT SELECTOR.
+ *
+ *****************************************************************************/
+
+/**
+ * This structure describes the type of data in pjsip_tpselector.
+ */
+typedef enum pjsip_tpselector_type
+{
+    /** Transport is not specified. */
+    PJSIP_TPSELECTOR_NONE,
+
+    /** Use the specific transport to send request. */
+    PJSIP_TPSELECTOR_TRANSPORT,
+
+    /** Use the specific listener to send request. */
+    PJSIP_TPSELECTOR_LISTENER,
+
+} pjsip_tpselector_type;
+
+
+/**
+ * This structure describes the transport/listener preference to be used
+ * when sending outgoing requests.
+ *
+ * Normally transport will be selected automatically according to rules about
+ * sending requests. But some applications (such as proxies or B2BUAs) may 
+ * want to explicitly use specific transport to send requests, for example
+ * when they want to make sure that outgoing request should go from a specific
+ * network interface.
+ *
+ * The pjsip_tpselector structure is used for that purpose, i.e. to allow
+ * application specificly request that a particular transport/listener
+ * should be used to send request. This structure is used when calling
+ * pjsip_tsx_set_transport() and pjsip_dlg_set_transport().
+ */
+typedef struct pjsip_tpselector
+{
+    /** The type of data in the union */
+    pjsip_tpselector_type   type;
+
+    /** Union representing the transport/listener criteria to be used. */
+    union {
+	pjsip_transport	*transport;
+	pjsip_tpfactory	*listener;
+	void		*ptr;
+    } u;
+
+} pjsip_tpselector;
+
+
+/**
+ * Add transport/listener reference in the selector to prevent the specified
+ * transport/listener from being destroyed while application still has
+ * reference to it.
+ *
+ * @param sel	The transport selector.
+ */
+PJ_DECL(void) pjsip_tpselector_add_ref(pjsip_tpselector *sel);
+
+
+/**
+ * Decrement transport/listener reference in the selector.
+ * @param sel	The transport selector
+ */
+PJ_DECL(void) pjsip_tpselector_dec_ref(pjsip_tpselector *sel);
+
+
+/*****************************************************************************
+ *
+ * RECEIVE DATA BUFFER.
+ *
+ *****************************************************************************/
+
+/** 
+ * A customized ioqueue async operation key which is used by transport
+ * to locate rdata when a pending read operation completes.
+ */
+typedef struct pjsip_rx_data_op_key
+{
+    pj_ioqueue_op_key_t		op_key;	/**< ioqueue op_key.		*/
+    pjsip_rx_data	       *rdata;	/**< rdata associated with this */
+} pjsip_rx_data_op_key;
+
+
+/**
+ * Incoming message buffer.
+ * This structure keep all the information regarding the received message. This
+ * buffer lifetime is only very short, normally after the transaction has been
+ * called, this buffer will be deleted/recycled. So care must be taken when
+ * allocating storage from the pool of this buffer.
+ */
+struct pjsip_rx_data
+{
+
+    /**
+     * tp_info is part of rdata that remains static for the duration of the
+     * buffer. It is initialized when the buffer was created by transport.
+     */
+    struct 
+    {
+	/** Memory pool for this buffer. */
+	pj_pool_t		*pool;
+
+	/** The transport object which received this packet. */
+	pjsip_transport		*transport;
+
+	/** Other transport specific data to be attached to this buffer. */
+	void			*tp_data;
+
+	/** Ioqueue key. */
+	pjsip_rx_data_op_key	 op_key;
+
+    } tp_info;
+
+
+    /**
+     * pkt_info is initialized by transport when it receives an incoming
+     * packet.
+     */
+    struct
+    {
+	/** Time when the message was received. */
+	pj_time_val		 timestamp;
+
+	/** Pointer to the original packet. */
+	char			 packet[PJSIP_MAX_PKT_LEN];
+
+	/** Zero termination for the packet. */
+	pj_uint32_t		 zero;
+
+	/** The length of the packet received. */
+	pj_ssize_t		 len;
+
+	/** The source address from which the packet was received. */
+	pj_sockaddr		 src_addr;
+
+	/** The length of the source address. */
+	int			 src_addr_len;
+
+	/** The IP source address string (NULL terminated). */
+	char			 src_name[16];
+
+	/** The IP source port number. */
+	int			 src_port;
+
+    } pkt_info;
+
+
+    /**
+     * msg_info is initialized by transport mgr (tpmgr) before this buffer
+     * is passed to endpoint.
+     */
+    struct
+    {
+	/** Start of msg buffer. */
+	char			*msg_buf;
+
+	/** Length fo message. */
+	int			 len;
+
+	/** The parsed message, if any. */
+	pjsip_msg		*msg;
+
+	/** Short description about the message. 
+	 *  Application should use #pjsip_rx_data_get_info() instead.
+	 */
+	char			*info;
+
+	/** The Call-ID header as found in the message. */
+	pjsip_cid_hdr		*cid;
+
+	/** The From header as found in the message. */
+	pjsip_from_hdr		*from;
+
+	/** The To header as found in the message. */
+	pjsip_to_hdr		*to;
+
+	/** The topmost Via header as found in the message. */
+	pjsip_via_hdr		*via;
+
+	/** The CSeq header as found in the message. */
+	pjsip_cseq_hdr		*cseq;
+
+	/** Max forwards header. */
+	pjsip_max_fwd_hdr	*max_fwd;
+
+	/** The first route header. */
+	pjsip_route_hdr		*route;
+
+	/** The first record-route header. */
+	pjsip_rr_hdr		*record_route;
+
+	/** Content-type header. */
+	pjsip_ctype_hdr		*ctype;
+
+	/** Content-length header. */
+	pjsip_clen_hdr		*clen;
+
+	/** The first Require header. */
+	pjsip_require_hdr	*require;
+
+	/** The list of error generated by the parser when parsing 
+	    this message. 
+	 */
+	pjsip_parser_err_report parse_err;
+
+    } msg_info;
+
+
+    /**
+     * endpt_info is initialized by endpoint after this buffer reaches
+     * endpoint.
+     */
+    struct
+    {
+	/** 
+	 * Data attached by modules to this message. 
+	 */
+	void	*mod_data[PJSIP_MAX_MODULE];
+
+    } endpt_info;
+
+};
+
+/**
+ * Get printable information about the message in the rdata.
+ *
+ * @param rdata	    The receive data buffer.
+ *
+ * @return	    Printable information.
+ */
+PJ_DECL(char*) pjsip_rx_data_get_info(pjsip_rx_data *rdata);
+
+
+/*****************************************************************************
+ *
+ * TRANSMIT DATA BUFFER MANIPULATION.
+ *
+ *****************************************************************************/
+
+/** Customized ioqueue async operation key, used by transport to keep
+ *  callback parameters.
+ */
+typedef struct pjsip_tx_data_op_key
+{
+    /** ioqueue pending operation key. */
+    pj_ioqueue_op_key_t	    key;
+
+    /** Transmit data associated with this key. */
+    pjsip_tx_data	   *tdata;
+
+    /** Arbitrary token (attached by transport) */
+    void		   *token;
+
+    /** Callback to be called when pending transmit operation has
+        completed.
+     */
+    void		  (*callback)(pjsip_transport*,void*,pj_ssize_t);
+} pjsip_tx_data_op_key;
+
+
+/**
+ * Data structure for sending outgoing message. Application normally creates
+ * this buffer by calling #pjsip_endpt_create_tdata.
+ *
+ * The lifetime of this buffer is controlled by the reference counter in this
+ * structure, which is manipulated by calling #pjsip_tx_data_add_ref and
+ * #pjsip_tx_data_dec_ref. When the reference counter has reached zero, then
+ * this buffer will be destroyed.
+ *
+ * A transaction object normally will add reference counter to this buffer
+ * when application calls #pjsip_tsx_send_msg, because it needs to keep the
+ * message for retransmission. The transaction will release the reference
+ * counter once its state has reached final state.
+ */
+struct pjsip_tx_data
+{
+    /** This is for transmission queue; it's managed by transports. */
+    PJ_DECL_LIST_MEMBER(struct pjsip_tx_data);
+
+    /** Memory pool for this buffer. */
+    pj_pool_t		*pool;
+
+    /** A name to identify this buffer. */
+    char		 obj_name[PJ_MAX_OBJ_NAME];
+
+    /** Short information describing this buffer and the message in it. 
+     *  Application should use #pjsip_tx_data_get_info() instead of
+     *  directly accessing this member.
+     */
+    char		*info;
+
+    /** For response message, this contains the reference to timestamp when 
+     *  the original request message was received. The value of this field
+     *  is set when application creates response message to a request by
+     *  calling #pjsip_endpt_create_response.
+     */
+    pj_time_val		 rx_timestamp;
+
+    /** The transport manager for this buffer. */
+    pjsip_tpmgr		*mgr;
+
+    /** Ioqueue asynchronous operation key. */
+    pjsip_tx_data_op_key op_key;
+
+    /** Lock object. */
+    pj_lock_t		*lock;
+
+    /** The message in this buffer. */
+    pjsip_msg 		*msg;
+
+    /** Buffer to the printed text representation of the message. When the
+     *  content of this buffer is set, then the transport will send the content
+     *  of this buffer instead of re-printing the message structure. If the
+     *  message structure has changed, then application must invalidate this
+     *  buffer by calling #pjsip_tx_data_invalidate_msg.
+     */
+    pjsip_buffer	 buf;
+
+    /** Reference counter. */
+    pj_atomic_t		*ref_cnt;
+
+    /** Being processed by transport? */
+    int			 is_pending;
+
+    /** Transport manager internal. */
+    void		*token;
+
+    /** Callback to be called when this tx_data has been transmitted.	*/
+    void	       (*cb)(void*, pjsip_tx_data*, pj_ssize_t);
+
+    /** Transport information, only valid during on_tx_request() and 
+     *  on_tx_response() callback.
+     */
+    struct
+    {
+	pjsip_transport	    *transport;	    /**< Transport being used.	*/
+	pj_sockaddr	     dst_addr;	    /**< Destination address.	*/
+	int		     dst_addr_len;  /**< Length of address.	*/
+	char		     dst_name[16];  /**< Destination address.	*/
+	int		     dst_port;	    /**< Destination port.	*/
+    } tp_info;
+
+    /** 
+     * Transport selector, to specify which transport to be used. 
+     * The value here must be set with pjsip_tx_data_set_transport(),
+     * to allow reference counter to be set properly.
+     */
+    pjsip_tpselector	    tp_sel;
+
+};
+
+
+/**
+ * Create a new, blank transmit buffer. The reference count is initialized
+ * to zero.
+ *
+ * @param mgr		The transport manager.
+ * @param tdata		Pointer to receive transmit data.
+ *
+ * @return		PJ_SUCCESS, or the appropriate error code.
+ *
+ * @see pjsip_endpt_create_tdata
+ */
+pj_status_t pjsip_tx_data_create( pjsip_tpmgr *mgr,
+                                  pjsip_tx_data **tdata );
+
+/**
+ * Add reference counter to the transmit buffer. The reference counter controls
+ * the life time of the buffer, ie. when the counter reaches zero, then it 
+ * will be destroyed.
+ *
+ * @param tdata	    The transmit buffer.
+ */
+PJ_DECL(void) pjsip_tx_data_add_ref( pjsip_tx_data *tdata );
+
+/**
+ * Decrement reference counter of the transmit buffer.
+ * When the transmit buffer is no longer used, it will be destroyed and
+ * caller is informed with PJSIP_EBUFDESTROYED return status.
+ *
+ * @param tdata	    The transmit buffer data.
+ * @return	    This function will always succeeded eventhough the return
+ *		    status is non-zero. A status PJSIP_EBUFDESTROYED will be
+ *		    returned to inform that buffer is destroyed.
+ */
+PJ_DECL(pj_status_t) pjsip_tx_data_dec_ref( pjsip_tx_data *tdata );
+
+/**
+ * Check if transmit data buffer contains a valid message.
+ *
+ * @param tdata	    The transmit buffer.
+ * @return	    Non-zero (PJ_TRUE) if buffer contains a valid message.
+ */
+PJ_DECL(pj_bool_t) pjsip_tx_data_is_valid( pjsip_tx_data *tdata );
+
+/**
+ * Invalidate the print buffer to force message to be re-printed. Call
+ * when the message has changed after it has been printed to buffer. The
+ * message is printed to buffer normally by transport when it is about to be 
+ * sent to the wire. Subsequent sending of the message will not cause
+ * the message to be re-printed, unless application invalidates the buffer
+ * by calling this function.
+ *
+ * @param tdata	    The transmit buffer.
+ */
+PJ_DECL(void) pjsip_tx_data_invalidate_msg( pjsip_tx_data *tdata );
+
+/**
+ * Get short printable info about the transmit data. This will normally return
+ * short information about the message.
+ *
+ * @param tdata	    The transmit buffer.
+ *
+ * @return	    Null terminated info string.
+ */
+PJ_DECL(char*) pjsip_tx_data_get_info( pjsip_tx_data *tdata );
+
+/**
+ * Set the explicit transport to be used when sending this transmit data.
+ * Application should not need to call this function, but rather use
+ * pjsip_tsx_set_transport() and pjsip_dlg_set_transport() instead (which
+ * will call this function).
+ *
+ * @param tdata	    The transmit buffer.
+ * @param sel	    Transport selector.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_tx_data_set_transport(pjsip_tx_data *tdata,
+						 const pjsip_tpselector *sel);
+
+
+/*****************************************************************************
+ *
+ * TRANSPORT
+ *
+ *****************************************************************************/
+
+/**
+ * This structure represent the "public" interface of a SIP transport.
+ * Applications normally extend this structure to include transport
+ * specific members.
+ */
+struct pjsip_transport
+{
+    char		    obj_name[PJ_MAX_OBJ_NAME];	/**< Name. */
+
+    pj_pool_t		   *pool;	    /**< Pool used by transport.    */
+    pj_atomic_t		   *ref_cnt;	    /**< Reference counter.	    */
+    pj_lock_t		   *lock;	    /**< Lock object.		    */
+    pj_bool_t		    tracing;	    /**< Tracing enabled?	    */
+    pj_bool_t		    is_shutdown;    /**< Being shutdown?	    */
+
+    /** Key for indexing this transport in hash table. */
+    struct {
+	pjsip_transport_type_e  type;	    /**< Transport type.	    */
+	pj_sockaddr		rem_addr;   /**< Remote addr (zero for UDP) */
+    } key;
+
+    char		   *type_name;	    /**< Type name.		    */
+    unsigned		    flag;	    /**< #pjsip_transport_flags_e   */
+    char		   *info;	    /**< Transport info/description.*/
+
+    int			    addr_len;	    /**< Length of addresses.	    */
+    pj_sockaddr		    local_addr;	    /**< Bound address.		    */
+    pjsip_host_port	    local_name;	    /**< Published name (eg. STUN). */
+    pjsip_host_port	    remote_name;    /**< Remote address name.	    */
+    
+    pjsip_endpoint	   *endpt;	    /**< Endpoint instance.	    */
+    pjsip_tpmgr		   *tpmgr;	    /**< Transport manager.	    */
+    pj_timer_entry	    idle_timer;	    /**< Timer when ref cnt is zero.*/
+
+    /**
+     * Function to be called by transport manager to send SIP message.
+     *
+     * @param transport	    The transport to send the message.
+     * @param packet	    The buffer to send.
+     * @param length	    The length of the buffer to send.
+     * @param op_key	    Completion token, which will be supplied to
+     *			    caller when pending send operation completes.
+     * @param rem_addr	    The remote destination address.
+     * @param addr_len	    Size of remote address.
+     * @param callback	    If supplied, the callback will be called
+     *			    once a pending transmission has completed. If
+     *			    the function completes immediately (i.e. return
+     *			    code is not PJ_EPENDING), the callback will not
+     *			    be called.
+     *
+     * @return		    Should return PJ_SUCCESS only if data has been
+     *			    succesfully queued to operating system for 
+     *			    transmission. Otherwise it may return PJ_EPENDING
+     *			    if the underlying transport can not send the
+     *			    data immediately and will send it later, which in
+     *			    this case caller doesn't have to do anything 
+     *			    except wait the calback to be called, if it 
+     *			    supplies one.
+     *			    Other return values indicate the error code.
+     */
+    pj_status_t (*send_msg)(pjsip_transport *transport, 
+			    pjsip_tx_data *tdata,
+			    const pj_sockaddr_t *rem_addr,
+			    int addr_len,
+			    void *token,
+			    void (*callback)(pjsip_transport *transport,
+					     void *token, 
+					     pj_ssize_t sent_bytes));
+
+    /**
+     * Instruct the transport to initiate graceful shutdown procedure.
+     * After all objects release their reference to this transport,
+     * the transport will be deleted.
+     *
+     * Note that application MUST use #pjsip_transport_shutdown() instead.
+     *
+     * @param transport	    The transport.
+     *
+     * @return		    PJ_SUCCESS on success.
+     */
+    pj_status_t (*do_shutdown)(pjsip_transport *transport);
+
+    /**
+     * Forcefully destroy this transport regardless whether there are
+     * objects that currently use this transport. This function should only
+     * be called by transport manager or other internal objects (such as the
+     * transport itself) who know what they're doing. Application should use
+     * #pjsip_transport_shutdown() instead.
+     *
+     * @param transport	    The transport.
+     *
+     * @return		    PJ_SUCCESS on success.
+     */
+    pj_status_t (*destroy)(pjsip_transport *transport);
+
+    /*
+     * Application may extend this structure..
+     */
+};
+
+
+/**
+ * Register a transport instance to the transport manager. This function
+ * is normally called by the transport instance when it is created
+ * by application.
+ *
+ * @param mgr		The transport manager.
+ * @param tp		The new transport to be registered.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_transport_register( pjsip_tpmgr *mgr,
+					       pjsip_transport *tp );
+
+
+/**
+ * Start graceful shutdown procedure for this transport. After graceful
+ * shutdown has been initiated, no new reference can be obtained for
+ * the transport. However, existing objects that currently uses the
+ * transport may still use this transport to send and receive packets.
+ *
+ * After all objects release their reference to this transport,
+ * the transport will be destroyed immediately.
+ *
+ * @param tp		    The transport.
+ *
+ * @return		    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_transport_shutdown(pjsip_transport *tp);
+
+/**
+ * Destroy a transport when there is no object currently uses the transport.
+ * This function is normally called internally by transport manager or the
+ * transport itself. Application should use #pjsip_transport_shutdown()
+ * instead.
+ *
+ * @param tp		The transport instance.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ *			Some of possible errors are PJSIP_EBUSY if the 
+ *			transport's reference counter is not zero.
+ */
+PJ_DECL(pj_status_t) pjsip_transport_destroy( pjsip_transport *tp);
+
+/**
+ * Add reference counter to the specified transport. Any objects that wishes
+ * to keep the reference of the transport MUST increment the transport's
+ * reference counter to prevent it from being destroyed.
+ *
+ * @param tp		The transport instance.
+ *
+ * @return		PJ_SUCCESS on success or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_transport_add_ref( pjsip_transport *tp );
+
+/**
+ * Decrement reference counter of the specified transport. When an object no
+ * longer want to keep the reference to the transport, it must decrement the
+ * reference counter. When the reference counter of the transport reaches 
+ * zero, the transport manager will start the idle timer to destroy the
+ * transport if no objects acquire the reference counter during the idle
+ * interval.
+ *
+ * @param tp		The transport instance.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_transport_dec_ref( pjsip_transport *tp );
+
+
+/**
+ * This function is called by transport instances to report an incoming 
+ * packet to the transport manager. The transport manager then would try to
+ * parse all SIP messages in the packet, and for each parsed SIP message, it
+ * would report the message to the SIP endpoint (#pjsip_endpoint).
+ *
+ * @param mgr		The transport manager instance.
+ * @param rdata		The receive data buffer containing the packet. The
+ *			transport MUST fully initialize tp_info and pkt_info
+ *			member of the rdata.
+ *
+ * @return		The number of bytes successfully processed from the
+ *			packet. If the transport is datagram oriented, the
+ *			value will be equal to the size of the packet. For
+ *			stream oriented transport (e.g. TCP, TLS), the value
+ *			returned may be less than the packet size, if 
+ *			partial message is received. The transport then MUST
+ *			keep the remainder part and report it again to
+ *			this function once more data/packet is received.
+ */
+PJ_DECL(pj_ssize_t) pjsip_tpmgr_receive_packet(pjsip_tpmgr *mgr,
+					       pjsip_rx_data *rdata);
+
+
+/*****************************************************************************
+ *
+ * TRANSPORT FACTORY
+ *
+ *****************************************************************************/
+
+
+/**
+ * A transport factory is normally used for connection oriented transports
+ * (such as TCP or TLS) to create instances of transports. It registers
+ * a new transport type to the transport manager, and the transport manager
+ * would ask the factory to create a transport instance when it received
+ * command from application to send a SIP message using the specified
+ * transport type.
+ */
+struct pjsip_tpfactory
+{
+    /** This list is managed by transport manager. */
+    PJ_DECL_LIST_MEMBER(struct pjsip_tpfactory);
+
+    char		    obj_name[PJ_MAX_OBJ_NAME];	/**< Name.	*/
+
+    pj_pool_t		   *pool;	    /**< Owned memory pool.	*/
+    pj_lock_t		   *lock;	    /**< Lock object.		*/
+
+    pjsip_transport_type_e  type;	    /**< Transport type.	*/
+    char		   *type_name;      /**< Type string name.	*/
+    unsigned		    flag;	    /**< Transport flag.	*/
+
+    pj_sockaddr		    local_addr;	    /**< Bound address.		*/
+    pjsip_host_port	    addr_name;	    /**< Published name.	*/
+
+    /**
+     * Create new outbound connection.
+     * Note that the factory is responsible for both creating the
+     * transport and registering it to the transport manager.
+     */
+    pj_status_t (*create_transport)(pjsip_tpfactory *factory,
+				    pjsip_tpmgr *mgr,
+				    pjsip_endpoint *endpt,
+				    const pj_sockaddr *rem_addr,
+				    int addr_len,
+				    pjsip_transport **transport);
+
+    /**
+     * Destroy the listener.
+     */
+    pj_status_t (*destroy)(pjsip_tpfactory *factory);
+
+    /*
+     * Application may extend this structure..
+     */
+};
+
+
+
+/**
+ * Register a transport factory.
+ *
+ * @param mgr		The transport manager.
+ * @param tpf		Transport factory.
+ *
+ * @return		PJ_SUCCESS if listener was successfully created.
+ */
+PJ_DECL(pj_status_t) pjsip_tpmgr_register_tpfactory(pjsip_tpmgr *mgr,
+						    pjsip_tpfactory *tpf);
+
+/**
+ * Unregister factory.
+ *
+ * @param mgr		The transport manager.
+ * @param tpf		Transport factory.
+ *
+ * @return		PJ_SUCCESS is sucessfully unregistered.
+ */
+PJ_DECL(pj_status_t) pjsip_tpmgr_unregister_tpfactory(pjsip_tpmgr *mgr,
+						      pjsip_tpfactory *tpf);
+
+
+/*****************************************************************************
+ *
+ * TRANSPORT MANAGER
+ *
+ *****************************************************************************/
+
+/**
+ * Create a new transport manager.
+ *
+ * @param pool	    Pool.
+ * @param endpt	    Endpoint instance.
+ * @param rx_cb	    Callback to receive incoming message.
+ * @param tx_cb	    Callback to be called before transport manager is sending
+ *		    outgoing message.
+ * @param p_mgr	    Pointer to receive the new transport manager.
+ *
+ * @return	    PJ_SUCCESS or the appropriate error code on error.
+ */
+PJ_DECL(pj_status_t) pjsip_tpmgr_create( pj_pool_t *pool,
+					 pjsip_endpoint * endpt,
+					 void (*rx_cb)(pjsip_endpoint*,
+						       pj_status_t,
+						       pjsip_rx_data *),
+					 pj_status_t (*tx_cb)(pjsip_endpoint*,
+							      pjsip_tx_data*),
+					 pjsip_tpmgr **p_mgr);
+
+
+/**
+ * Find out the appropriate local address info (IP address and port) to
+ * advertise in Contact header based on the remote address to be 
+ * contacted. The local address info would be the address name of the
+ * transport or listener which will be used to send the request.
+ *
+ * In this implementation, it will only select the transport based on
+ * the transport type in the request.
+ *
+ * @param tpmgr	    The transport manager.
+ * @param pool	    Pool to allocate memory for the IP address.
+ * @param type	    Destination address to contact.
+ * @param sel	    Optional pointer to prefered transport, if any.
+ * @param ip_addr   Pointer to receive the IP address.
+ * @param port	    Pointer to receive the port number.
+ *
+ * @return	    PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_tpmgr_find_local_addr( pjsip_tpmgr *tpmgr,
+						  pj_pool_t *pool,
+						  pjsip_transport_type_e type,
+						  const pjsip_tpselector *sel,
+						  pj_str_t *ip_addr,
+						  int *port);
+
+
+/**
+ * Destroy transport manager.
+ */
+PJ_DECL(pj_status_t) pjsip_tpmgr_destroy(pjsip_tpmgr *mgr);
+
+
+/**
+ * Dump transport info.
+ */
+PJ_DECL(void) pjsip_tpmgr_dump_transports(pjsip_tpmgr *mgr);
+
+
+/*****************************************************************************
+ *
+ * PUBLIC API
+ *
+ *****************************************************************************/
+
+
+/**
+ * Find transport to be used to send message to remote destination. If no
+ * suitable transport is found, a new one will be created.
+ *
+ * This is an internal function since normally application doesn't have access
+ * to transport manager. Application should use pjsip_endpt_acquire_transport()
+ * instead.
+ *
+ * @param mgr	    The transport manager instance.
+ * @param type	    The type of transport to be acquired.
+ * @param remote    The remote address to send message to.
+ * @param addr_len  Length of the remote address.
+ * @param sel	    Optional pointer to transport selector instance which is
+ *		    used to find explicit transport, if required.
+ * @param tp	    Pointer to receive the transport instance, if one is found.
+ *
+ * @return	    PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_tpmgr_acquire_transport(pjsip_tpmgr *mgr,
+						   pjsip_transport_type_e type,
+						   const pj_sockaddr_t *remote,
+						   int addr_len,
+						   const pjsip_tpselector *sel,
+						   pjsip_transport **tp);
+
+
+/**
+ * Send a SIP message using the specified transport.
+ */
+PJ_DECL(pj_status_t) pjsip_transport_send( pjsip_transport *tr, 
+					   pjsip_tx_data *tdata,
+					   const pj_sockaddr_t *addr,
+					   int addr_len,
+					   void *token,
+					   void (*cb)(void *token, 
+						      pjsip_tx_data *tdata,
+						      pj_ssize_t bytes_sent));
+
+
+/**
+ * @}
+ */
+
+
+PJ_END_DECL
+
+#endif	/* __PJSIP_SIP_TRANSPORT_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport_loop.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport_loop.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport_loop.h	(revision 1163)
@@ -0,0 +1,146 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_TRANSPORT_LOOP_H__
+#define __PJSIP_TRANSPORT_LOOP_H__
+
+
+/**
+ * @file sip_transport_loop.h
+ * @brief 
+ * Loopback transport (for debugging)
+ */
+
+
+#include <pjsip/sip_transport.h>
+
+/**
+ * @defgroup PJSIP_TRANSPORT_LOOP Loop Transport
+ * @ingroup PJSIP_TRANSPORT
+ * @brief Loopback transport (for testing purposes).
+ * @{
+ * The loopback transport simply bounce back outgoing messages as
+ * incoming messages. This feature is used mostly during automated
+ * testing, to provide controlled behavior.
+ */
+
+PJ_BEGIN_DECL
+
+/**
+ * Create and start datagram loop transport.
+ *
+ * @param endpt		The endpoint instance.
+ * @param transport	Pointer to receive the transport instance.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_loop_start( pjsip_endpoint *endpt,
+				       pjsip_transport **transport);
+
+
+/**
+ * Enable/disable flag to discard any packets sent using the specified
+ * loop transport.
+ *
+ * @param tp		The loop transport.
+ * @param discard	If non-zero, any outgoing packets will be discarded.
+ * @param prev_value	Optional argument to receive previous value of
+ *			the discard flag.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_loop_set_discard( pjsip_transport *tp,
+					     pj_bool_t discard,
+					     pj_bool_t *prev_value );
+
+
+/**
+ * Enable/disable flag to simulate network error. When this flag is set,
+ * outgoing transmission will return either immediate error or error via
+ * callback. If error is to be notified via callback, then the notification
+ * will occur after some delay, which is controlled by #pjsip_loop_set_delay().
+ *
+ * @param tp		The loop transport.
+ * @param fail_flag	If set to 1, the transport will return fail to deliver
+ *			the message. If delay is zero, failure will occur
+ *			immediately; otherwise it will be reported in callback.
+ *			If set to zero, the transport will successfully deliver
+ *			the packet.
+ * @param prev_value	Optional argument to receive previous value of
+ *			the failure flag.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_loop_set_failure( pjsip_transport *tp,
+					     int fail_flag,
+					     int *prev_value );
+
+
+/**
+ * Set delay (in miliseconds) before packet is received by the other end
+ * of the loop transport. This will also 
+ * control the delay for error notification callback.
+ *
+ * @param tp		The loop transport.
+ * @param delay		Delay, in miliseconds.
+ * @param prev_value	Optional argument to receive previous value of the
+ *			delay.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_loop_set_recv_delay( pjsip_transport *tp,
+						unsigned delay,
+						unsigned *prev_value);
+
+
+/**
+ * Set delay (in miliseconds) before send notification is delivered to sender.
+ * This will also control the delay for error notification callback.
+ *
+ * @param tp		The loop transport.
+ * @param delay		Delay, in miliseconds.
+ * @param prev_value	Optional argument to receive previous value of the
+ *			delay.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_loop_set_send_callback_delay( pjsip_transport *tp,
+							 unsigned delay,
+							 unsigned *prev_value);
+
+
+/**
+ * Set both receive and send notification delay.
+ *
+ * @param tp		The loop transport.
+ * @param delay		Delay, in miliseconds.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_loop_set_delay( pjsip_transport *tp,
+					   unsigned delay );
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* __PJSIP_TRANSPORT_LOOP_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport_tcp.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport_tcp.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport_tcp.h	(revision 1163)
@@ -0,0 +1,122 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_TRANSPORT_TCP_H__
+#define __PJSIP_TRANSPORT_TCP_H__
+
+/**
+ * @file sip_transport_tcp.h
+ * @brief SIP TCP Transport.
+ */
+
+#include <pjsip/sip_transport.h>
+
+
+/* Only declare the API if PJ_HAS_TCP is true */
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP!=0
+
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_TRANSPORT_TCP TCP Transport
+ * @ingroup PJSIP_TRANSPORT
+ * @brief API to create and register TCP transport.
+ * @{
+ * The functions below are used to create TCP transport and register 
+ * the transport to the framework.
+ */
+
+/**
+ * Register support for SIP TCP transport by creating TCP listener on
+ * the specified address and port. This function will create an
+ * instance of SIP TCP transport factory and register it to the
+ * transport manager.
+ *
+ * @param endpt		The SIP endpoint.
+ * @param local		Optional local address to bind, or specify the
+ *			address to bind the server socket to. Both IP 
+ *			interface address and port fields are optional.
+ *			If IP interface address is not specified, socket
+ *			will be bound to PJ_INADDR_ANY. If port is not
+ *			specified, socket will be bound to any port
+ *			selected by the operating system.
+ * @param async_cnt	Number of simultaneous asynchronous accept()
+ *			operations to be supported. It is recommended that
+ *			the number here corresponds to the number of
+ *			processors in the system (or the number of SIP
+ *			worker threads).
+ * @param p_factory	Optional pointer to receive the instance of the
+ *			SIP TCP transport factory just created.
+ *
+ * @return		PJ_SUCCESS when the transport has been successfully
+ *			started and registered to transport manager, or
+ *			the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_tcp_transport_start(pjsip_endpoint *endpt,
+					       const pj_sockaddr_in *local,
+					       unsigned async_cnt,
+					       pjsip_tpfactory **p_factory);
+
+
+
+/**
+ * A newer variant of #pjsip_tcp_transport_start(), which allows specifying
+ * the published/public address of the TCP transport.
+ *
+ * @param endpt		The SIP endpoint.
+ * @param local		Optional local address to bind, or specify the
+ *			address to bind the server socket to. Both IP 
+ *			interface address and port fields are optional.
+ *			If IP interface address is not specified, socket
+ *			will be bound to PJ_INADDR_ANY. If port is not
+ *			specified, socket will be bound to any port
+ *			selected by the operating system.
+ * @param a_name	Optional published address, which is the address to be
+ *			advertised as the address of this SIP transport. 
+ *			If this argument is NULL, then the bound address
+ *			will be used as the published address.
+ * @param async_cnt	Number of simultaneous asynchronous accept()
+ *			operations to be supported. It is recommended that
+ *			the number here corresponds to the number of
+ *			processors in the system (or the number of SIP
+ *			worker threads).
+ * @param p_factory	Optional pointer to receive the instance of the
+ *			SIP TCP transport factory just created.
+ *
+ * @return		PJ_SUCCESS when the transport has been successfully
+ *			started and registered to transport manager, or
+ *			the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_tcp_transport_start2(pjsip_endpoint *endpt,
+					        const pj_sockaddr_in *local,
+					        const pjsip_host_port *a_name,
+					        unsigned async_cnt,
+					        pjsip_tpfactory **p_factory);
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* PJ_HAS_TCP */
+
+#endif	/* __PJSIP_TRANSPORT_TCP_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport_tls.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport_tls.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport_tls.h	(revision 1163)
@@ -0,0 +1,220 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_TRANSPORT_TLS_H__
+#define __PJSIP_TRANSPORT_TLS_H__
+
+/**
+ * @file sip_transport_tls.h
+ * @brief SIP TLS Transport.
+ */
+
+#include <pjsip/sip_transport.h>
+#include <pj/string.h>
+
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_TRANSPORT_TLS TLS Transport
+ * @ingroup PJSIP_TRANSPORT
+ * @brief API to create and register TLS transport.
+ * @{
+ * The functions below are used to create TLS transport and register 
+ * the transport to the framework.
+ */
+
+/** SSL protocol method constants. */
+typedef enum pjsip_ssl_method
+{
+    PJSIP_SSL_DEFAULT_METHOD	= 0,	/**< Default protocol method.	*/
+    PJSIP_TLSV1_METHOD		= 1,	/**< Use SSLv1 method.		*/
+    PJSIP_SSLV2_METHOD		= 2,	/**< Use SSLv2 method.		*/
+    PJSIP_SSLV3_METHOD		= 3,	/**< Use SSLv3 method.		*/
+    PJSIP_SSLV23_METHOD		= 23	/**< Use SSLv23 method.		*/
+} pjsip_ssl_method;
+
+
+/**
+ * TLS transport settings.
+ */
+typedef struct pjsip_tls_setting
+{
+    /**
+     * Certificate of Authority (CA) list file.
+     */
+    pj_str_t	ca_list_file;
+
+    /**
+     * Public endpoint certificate file, which will be used as client-
+     * side  certificate for outgoing TLS connection, and server-side
+     * certificate for incoming TLS connection.
+     */
+    pj_str_t	cert_file;
+
+    /**
+     * Optional private key of the endpoint certificate to be used.
+     */
+    pj_str_t	privkey_file;
+
+    /**
+     * Password to open private key.
+     */
+    pj_str_t	password;
+
+    /**
+     * TLS protocol method from #pjsip_ssl_method, which can be:
+     *	- PJSIP_SSL_DEFAULT_METHOD(0):	default (which will use SSLv23)
+     *	- PJSIP_TLSV1_METHOD(1):	TLSv1
+     *	- PJSIP_SSLV2_METHOD(2):	TLSv2
+     *	- PJSIP_SSLV3_METHOD(3):	TLSv3
+     *	- PJSIP_SSLV23_METHOD(23):	TLSv23
+     *
+     * Default is PJSIP_SSL_DEFAULT_METHOD (0), which will use SSLv23
+     * protocol method.
+     */
+    int		method;
+
+    /**
+     * TLS cipher list string in OpenSSL format. If empty, then default
+     * cipher list of the backend will be used.
+     */
+    pj_str_t	ciphers;
+
+    /**
+     * When PJSIP is acting as a client (outgoing TLS connections), 
+     * it will always receive a certificate from the peer. 
+     * If \a verify_server is disabled (set to zero), PJSIP will not 
+     * verifiy the certificate and allows TLS connections to servers 
+     * which do not present a valid certificate. 
+     * If \a tls_verify_server is non-zero, PJSIP verifies the server 
+     * certificate and will close the TLS connection if the server 
+     * certificate is not valid.
+     *
+     * This setting corresponds to OpenSSL SSL_VERIFY_PEER flag.
+     * Default value is zero.
+     */
+    pj_bool_t	verify_server;
+
+    /**
+     * When acting as server (incoming TLS connections), setting
+     * \a verify_client to non-zero will cause the transport to activate
+     * peer verification upon receiving incoming TLS connection.
+     *
+     * This setting corresponds to OpenSSL SSL_VERIFY_PEER flag.
+     * Default value is zero.
+     */
+    pj_bool_t	verify_client;
+
+    /**
+     * When acting as server (incoming TLS connections), reject inocming
+     * connection if client doesn't have a valid certificate.
+     *
+     * This setting corresponds to SSL_VERIFY_FAIL_IF_NO_PEER_CERT flag.
+     * Default value is zero.
+     */
+    pj_bool_t	require_client_cert;
+
+    /**
+     * TLS negotiation timeout to be applied for both outgoing and
+     * incoming connection. If both sec and msec member is set to zero,
+     * the SSL negotiation doesn't have a timeout.
+     */
+    pj_time_val	timeout;
+
+} pjsip_tls_setting;
+
+
+/**
+ * Initialize TLS setting with default values.
+ *
+ * @param tls_opt   The TLS setting to be initialized.
+ */
+PJ_INLINE(void) pjsip_tls_setting_default(pjsip_tls_setting *tls_opt)
+{
+    pj_memset(tls_opt, 0, sizeof(*tls_opt));
+}
+
+
+/**
+ * Copy TLS setting.
+ *
+ * @param pool	    The pool to duplicate strings etc.
+ * @param dst	    Destination structure.
+ * @param src	    Source structure.
+ */
+PJ_INLINE(void) pjsip_tls_setting_copy(pj_pool_t *pool,
+				       pjsip_tls_setting *dst,
+				       const pjsip_tls_setting *src)
+{
+    pj_memcpy(dst, src, sizeof(*dst));
+    pj_strdup_with_null(pool, &dst->ca_list_file, &src->ca_list_file);
+    pj_strdup_with_null(pool, &dst->cert_file, &src->cert_file);
+    pj_strdup_with_null(pool, &dst->privkey_file, &src->privkey_file);
+    pj_strdup_with_null(pool, &dst->password, &src->password);
+    pj_strdup_with_null(pool, &dst->ciphers, &src->ciphers);
+}
+
+
+/**
+ * Register support for SIP TLS transport by creating TLS listener on
+ * the specified address and port. This function will create an
+ * instance of SIP TLS transport factory and register it to the
+ * transport manager.
+ *
+ * @param endpt		The SIP endpoint.
+ * @param opt		Optional TLS settings.
+ * @param local		Optional local address to bind, or specify the
+ *			address to bind the server socket to. Both IP 
+ *			interface address and port fields are optional.
+ *			If IP interface address is not specified, socket
+ *			will be bound to PJ_INADDR_ANY. If port is not
+ *			specified, socket will be bound to any port
+ *			selected by the operating system.
+ * @param a_name	Optional published address, which is the address to be
+ *			advertised as the address of this SIP transport. 
+ *			If this argument is NULL, then the bound address
+ *			will be used as the published address.
+ * @param async_cnt	Number of simultaneous asynchronous accept()
+ *			operations to be supported. It is recommended that
+ *			the number here corresponds to the number of
+ *			processors in the system (or the number of SIP
+ *			worker threads).
+ * @param p_factory	Optional pointer to receive the instance of the
+ *			SIP TLS transport factory just created.
+ *
+ * @return		PJ_SUCCESS when the transport has been successfully
+ *			started and registered to transport manager, or
+ *			the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_tls_transport_start(pjsip_endpoint *endpt,
+					       const pjsip_tls_setting *opt,
+					       const pj_sockaddr_in *local,
+					       const pjsip_host_port *a_name,
+					       unsigned async_cnt,
+					       pjsip_tpfactory **p_factory);
+
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* __PJSIP_TRANSPORT_TLS_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport_udp.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport_udp.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_transport_udp.h	(revision 1163)
@@ -0,0 +1,90 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_TRANSPORT_UDP_H__
+#define __PJSIP_TRANSPORT_UDP_H__
+
+/**
+ * @file sip_transport_udp.h
+ * @brief SIP UDP Transport.
+ */
+
+#include <pjsip/sip_transport.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_TRANSPORT_UDP UDP Transport
+ * @ingroup PJSIP_TRANSPORT
+ * @brief API to create and register UDP transport.
+ * @{
+ * The functions below are used to create UDP transport and register 
+ * the transport to the framework.
+ */
+
+/**
+ * Start UDP transport.
+ *
+ * @param endpt		The SIP endpoint.
+ * @param local		Optional local address to bind. If this argument
+ *			is NULL, the UDP transport will be bound to arbitrary
+ *			UDP port.
+ * @param a_name	Published address (only the host and port portion is 
+ *			used). If this argument is NULL, then the bound address
+ *			will be used as the published address.
+ * @param async_cnt	Number of simultaneous async operations.
+ * @param p_transport	Pointer to receive the transport.
+ *
+ * @return		PJ_SUCCESS when the transport has been successfully
+ *			started and registered to transport manager, or
+ *			the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_udp_transport_start(pjsip_endpoint *endpt,
+					       const pj_sockaddr_in *local,
+					       const pjsip_host_port *a_name,
+					       unsigned async_cnt,
+					       pjsip_transport **p_transport);
+
+/**
+ * Attach UDP socket as a new transport and start the transport.
+ *
+ * @param endpt		The SIP endpoint.
+ * @param sock		UDP socket to use.
+ * @param a_name	Published address (only the host and port portion is 
+ *			used).
+ * @param async_cnt	Number of simultaneous async operations.
+ * @param p_transport	Pointer to receive the transport.
+ *
+ * @return		PJ_SUCCESS when the transport has been successfully
+ *			started and registered to transport manager, or
+ *			the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_udp_transport_attach(pjsip_endpoint *endpt,
+						pj_sock_t sock,
+						const pjsip_host_port *a_name,
+						unsigned async_cnt,
+						pjsip_transport **p_transport);
+
+
+PJ_END_DECL
+
+/**
+ * @}
+ */
+
+#endif	/* __PJSIP_TRANSPORT_UDP_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_types.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_types.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_types.h	(revision 1163)
@@ -0,0 +1,247 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_TYPES_H__
+#define __PJSIP_SIP_TYPES_H__
+
+
+/*
+ * My note: Doxygen PJSIP and PJSIP_CORE group is declared in
+ *          sip_config.h
+ */
+
+/**
+ * @file sip_types.h
+ * @brief Basic PJSIP types.
+ */
+
+#include <pjsip/sip_config.h>
+#include <pj/types.h>
+
+/**
+ * @addtogroup PJSIP_BASE
+ */
+
+/* @defgroup PJSIP_TYPES Basic Data Types
+ * @ingroup PJSIP_BASE
+ * @brief Basic data types.
+ * @{
+ */
+
+
+
+/**
+ * Forward declaration for SIP transport.
+ */
+typedef struct pjsip_transport pjsip_transport;
+
+/**
+ * Forward declaration for transport manager.
+ */
+typedef struct pjsip_tpmgr pjsip_tpmgr;
+
+/**
+ * Transport types.
+ */
+typedef enum pjsip_transport_type_e
+{
+    /** Unspecified. */
+    PJSIP_TRANSPORT_UNSPECIFIED,
+
+    /** UDP. */
+    PJSIP_TRANSPORT_UDP,
+
+    /** TCP. */
+    PJSIP_TRANSPORT_TCP,
+
+    /** TLS. */
+    PJSIP_TRANSPORT_TLS,
+
+    /** SCTP. */
+    PJSIP_TRANSPORT_SCTP,
+
+    /** Loopback (stream, reliable) */
+    PJSIP_TRANSPORT_LOOP,
+
+    /** Loopback (datagram, unreliable) */
+    PJSIP_TRANSPORT_LOOP_DGRAM,
+
+    /** Start of user defined transport */
+    PJSIP_TRANSPORT_START_OTHER
+
+} pjsip_transport_type_e;
+
+
+/**
+ * Forward declaration for endpoint (sip_endpoint.h).
+ */
+typedef struct pjsip_endpoint pjsip_endpoint;
+
+/**
+ * Forward declaration for transactions (sip_transaction.h).
+ */
+typedef struct pjsip_transaction pjsip_transaction;
+
+/**
+ * Forward declaration for events (sip_event.h).
+ */
+typedef struct pjsip_event pjsip_event;
+
+/**
+ * Forward declaration for transmit data/buffer (sip_transport.h).
+ */
+typedef struct pjsip_tx_data pjsip_tx_data;
+
+/**
+ * Forward declaration for receive data/buffer (sip_transport.h).
+ */
+typedef struct pjsip_rx_data pjsip_rx_data;
+
+/**
+ * Forward declaration for message (sip_msg.h).
+ */
+typedef struct pjsip_msg pjsip_msg;
+
+/**
+ * Forward declaration for message body (sip_msg.h).
+ */
+typedef struct pjsip_msg_body pjsip_msg_body;
+
+/**
+ * Forward declaration for header field (sip_msg.h).
+ */
+typedef struct pjsip_hdr pjsip_hdr;
+
+/**
+ * Forward declaration for URI (sip_uri.h).
+ */
+typedef struct pjsip_uri pjsip_uri;
+
+/**
+ * Forward declaration for SIP method (sip_msg.h)
+ */
+typedef struct pjsip_method pjsip_method;
+
+/**
+ * Opaque data type for the resolver engine (sip_resolve.h).
+ */
+typedef struct pjsip_resolver_t pjsip_resolver_t;
+
+/**
+ * Forward declaration for credential.
+ */
+typedef struct pjsip_cred_info pjsip_cred_info;
+
+
+/**
+ * Forward declaration for module (sip_module.h).
+ */
+typedef struct pjsip_module pjsip_module;
+
+
+/** 
+ * Forward declaration for user agent type (sip_ua_layer.h). 
+ */
+typedef pjsip_module pjsip_user_agent;
+
+/**
+ * Forward declaration for dialog (sip_dialog.h).
+ */
+typedef struct pjsip_dialog pjsip_dialog;
+
+/**
+ * Transaction role.
+ */
+typedef enum pjsip_role_e
+{
+    PJSIP_ROLE_UAC,	/**< Role is UAC. */
+    PJSIP_ROLE_UAS,	/**< Role is UAS. */
+
+    /* Alias: */
+
+    PJSIP_UAC_ROLE = PJSIP_ROLE_UAC,	/**< Role is UAC. */
+    PJSIP_UAS_ROLE = PJSIP_ROLE_UAS	/**< Role is UAS. */
+
+} pjsip_role_e;
+
+
+/**
+ * General purpose buffer.
+ */
+typedef struct pjsip_buffer
+{
+    /** The start of the buffer. */
+    char *start;
+
+    /** Pointer to current end of the buffer, which also indicates the position
+        of subsequent buffer write.
+     */
+    char *cur;
+
+    /** The absolute end of the buffer. */
+    char *end;
+
+} pjsip_buffer;
+
+
+/**
+ * General host:port pair, used for example as Via sent-by.
+ */
+typedef struct pjsip_host_port
+{
+    pj_str_t host;	/**< Host part or IP address. */
+    int	     port;	/**< Port number. */
+} pjsip_host_port;
+
+/**
+ * Host information.
+ */
+typedef struct pjsip_host_info
+{
+    unsigned		    flag;   /**< Flags of pjsip_transport_flags_e. */
+    pjsip_transport_type_e  type;   /**< Transport type. */
+    pjsip_host_port	    addr;   /**< Address information. */
+} pjsip_host_info;
+
+
+/**
+ * Convert exception ID into pj_status_t status.
+ *
+ * @param exception_id  Exception Id.
+ *
+ * @return              Error code for the specified exception Id.
+ */
+PJ_DECL(pj_status_t) pjsip_exception_to_status(int exception_id);
+
+/**
+ * Return standard pj_status_t status from current exception.
+ */
+#define PJSIP_RETURN_EXCEPTION() pjsip_exception_to_status(PJ_GET_EXCEPTION())
+
+/**
+ * Attributes to inform that the function may throw exceptions.
+ */
+#define PJSIP_THROW_SPEC(list)
+
+
+/**
+ * @}
+ */
+
+#endif	/* __PJSIP_SIP_TYPES_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_ua_layer.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_ua_layer.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_ua_layer.h	(revision 1163)
@@ -0,0 +1,149 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_UA_LAYER_H__
+#define __PJSIP_SIP_UA_LAYER_H__
+
+/**
+ * @file sip_ua_layer.h
+ * @brief SIP User Agent Layer Module
+ */
+#include <pjsip/sip_types.h>
+
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_UA Base User Agent Layer/Common Dialog Layer
+ * @ingroup PJSIP
+ * @brief Dialog management.
+ *
+ * This module provides basic dialog management, which is used by higher
+ * layer dialog usages such as INVITE sessions and SIP Event Subscription
+ * framework (RFC 3265). Application should link  with <b>pjsip-core</b> 
+ * library to use this base UA layer. The base UA layer module is initialized
+ * with #pjsip_ua_init_module().
+ */
+
+/**
+ * @defgroup PJSUA_UA SIP User Agent Module
+ * @ingroup PJSIP_UA
+ * @brief Provides dialog management.
+ * @{
+ *
+ * Application MUST initialize the user agent layer module by calling
+ * #pjsip_ua_init_module() before using any of the dialog API, and link
+ * the application with with <b>pjsip-core</b> library.
+ */
+
+/** User agent initialization parameter. */
+typedef struct pjsip_ua_init_param
+{
+    /** Callback to be called when the UA layer detects that outgoing
+     *  dialog has forked.
+     */
+    pjsip_dialog* (*on_dlg_forked)(pjsip_dialog *first_set, pjsip_rx_data *res);
+} pjsip_ua_init_param;
+
+/**
+ * Initialize user agent layer and register it to the specified endpoint.
+ *
+ * @param endpt		The endpoint where the user agent will be
+ *			registered.
+ * @param prm		UA initialization parameter.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_ua_init_module(pjsip_endpoint *endpt,
+					  const pjsip_ua_init_param *prm);
+
+/**
+ * Get the instance of the user agent.
+ *
+ * @return		The user agent module instance.
+ */
+PJ_DECL(pjsip_user_agent*) pjsip_ua_instance(void);
+
+
+/**
+ * Find a dialog with the specified Call-ID and tags properties. This
+ * function may optionally lock the matching dialog instance before
+ * returning it back to the caller.
+ *
+ * @param call_id	The call ID to be matched.
+ * @param local_tag	The local tag to be matched.
+ * @param remote_tag	The remote tag to be matched.
+ * @param lock_dialog	If non-zero, instruct the function to lock the 
+ *			matching dialog with #pjsip_dlg_inc_lock(). 
+ *			Application is responsible to release the dialog's
+ *			lock after it has finished manipulating the dialog,
+ *			by calling #pjsip_dlg_dec_lock().
+ *
+ * @return		The matching dialog instance, or NULL if no matching
+ *			dialog is found.
+ */
+PJ_DECL(pjsip_dialog*) pjsip_ua_find_dialog(const pj_str_t *call_id,
+					    const pj_str_t *local_tag,
+					    const pj_str_t *remote_tag,
+					    pj_bool_t lock_dialog);
+
+/**
+ * Destroy the user agent layer.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_ua_destroy(void);
+
+/**
+ * Dump user agent contents (e.g. all dialogs).
+ *
+ * @param detail	If non-zero, list of dialogs will be printed.
+ */
+PJ_DEF(void) pjsip_ua_dump(pj_bool_t detail);
+
+/**
+ * Get the endpoint instance of a user agent module.
+ *
+ * @param ua		The user agent instance.
+ *
+ * @return		The endpoint instance where the user agent is
+ *			registered.
+ */
+PJ_DECL(pjsip_endpoint*) pjsip_ua_get_endpt(pjsip_user_agent *ua);
+
+
+/**
+ * @}
+ */
+
+
+/*
+ * Internal (called by sip_dialog.c).
+ */
+
+PJ_DECL(pj_status_t) pjsip_ua_register_dlg( pjsip_user_agent *ua,
+					    pjsip_dialog *dlg );
+PJ_DECL(pj_status_t) pjsip_ua_unregister_dlg(pjsip_user_agent *ua,
+					     pjsip_dialog *dlg );
+
+
+PJ_END_DECL
+
+
+#endif	/* __PJSIP_SIP_UA_LAYER_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_uri.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_uri.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_uri.h	(revision 1163)
@@ -0,0 +1,427 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_URI_H__
+#define __PJSIP_SIP_URI_H__
+
+/**
+ * @file sip_uri.h
+ * @brief SIP URL Structures and Manipulations
+ */
+
+#include <pjsip/sip_types.h>
+#include <pjsip/sip_config.h>
+#include <pj/list.h>
+#include <pjlib-util/scanner.h>
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJSIP_URI URI
+ * @brief URI types and manipulations.
+ * @ingroup PJSIP_MSG
+ */
+
+/**
+ * @addtogroup PJSIP_URI_PARAM URI Parameter Container
+ * @ingroup PJSIP_URI
+ * @brief Generic parameter elements container.
+ * @{
+ */
+
+/**
+ * Generic parameter, normally used in other_param or header_param.
+ */
+typedef struct pjsip_param
+{
+    PJ_DECL_LIST_MEMBER(struct pjsip_param);	/**< Generic list member.   */
+    pj_str_t	    name;			/**< Param/header name.	    */
+    pj_str_t	    value;			/**< Param/header value.    */
+} pjsip_param;
+
+
+/**
+ * Find the specified parameter name in the list. The name will be compared
+ * in case-insensitive comparison.
+ *
+ * @param param_list	List of parameters to find.
+ * @param name		Parameter/header name to find.
+ *
+ * @return		The parameter if found, or NULL.
+ */
+PJ_DECL(pjsip_param*) pjsip_param_find( pjsip_param *param_list,
+					const pj_str_t *name );
+
+
+/**
+ * Find the specified parameter name in the list. The name will be compared
+ * in case-insensitive comparison.
+ *
+ * @param param_list	List of parameters to find.
+ * @param name		Parameter/header name to find.
+ *
+ * @return		The parameter if found, or NULL.
+ */
+PJ_DECL(const pjsip_param*) pjsip_param_cfind(const pjsip_param *param_list,
+					      const pj_str_t *name );
+
+
+/**
+ * Duplicate the parameters.
+ *
+ * @param pool		Pool to allocate memory from.
+ * @param dst_list	Destination list.
+ * @param src_list	Source list.
+ */
+PJ_DECL(void) pjsip_param_clone(pj_pool_t *pool, pjsip_param *dst_list,
+				const pjsip_param *src_list);
+
+/**
+ * Duplicate the parameters.
+ *
+ * @param pool		Pool to allocate memory from.
+ * @param dst_list	Destination list.
+ * @param src_list	Source list.
+ */
+PJ_DECL(void) pjsip_param_shallow_clone(pj_pool_t *pool, 
+					pjsip_param *dst_list,
+					const pjsip_param *src_list);
+
+/**
+ * Print parameters.
+ *
+ * @param param_list	The parameter list.
+ * @param buf		Buffer.
+ * @param size		Size of buffer.
+ * @param pname_unres	Specification of allowed characters in pname.
+ * @param pvalue_unres	Specification of allowed characters in pvalue.
+ * @param sep		Separator character (either ';', ',', or '?').
+ *			When separator is set to '?', this function will
+ *			automatically adjust the separator character to
+ *			'&' after the first parameter is printed.
+ *
+ * @return		The number of bytes printed, or -1 on errr.
+ */
+PJ_DECL(pj_ssize_t) pjsip_param_print_on(const pjsip_param *param_list,
+					 char *buf, pj_size_t size,
+					 const pj_cis_t *pname_unres,
+					 const pj_cis_t *pvalue_unres,
+					 int sep);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup PJSIP_URI_GENERIC Generic URI
+ * @ingroup PJSIP_URI
+ * @brief Generic representation for all types of URI.
+ * @{
+ */
+
+/**
+ * URI context.
+ */
+typedef enum pjsip_uri_context_e
+{
+    PJSIP_URI_IN_REQ_URI,	/**< The URI is in Request URI. */
+    PJSIP_URI_IN_FROMTO_HDR,	/**< The URI is in From/To header. */
+    PJSIP_URI_IN_CONTACT_HDR,	/**< The URI is in Contact header. */
+    PJSIP_URI_IN_ROUTING_HDR,	/**< The URI is in Route/Record-Route header. */
+    PJSIP_URI_IN_OTHER		/**< Other context (web page, business card, etc.) */
+} pjsip_uri_context_e;
+
+/**
+ * URI 'virtual' function table.
+ * All types of URI in this library (such as sip:, sips:, tel:, and name-addr) 
+ * will have pointer to this table as their first struct member. This table
+ * provides polimorphic behaviour to the URI.
+ */
+typedef struct pjsip_uri_vptr
+{
+    /** 
+     * Get URI scheme. 
+     * @param uri the URI (self).
+     * @return the URI scheme.
+     */
+    const pj_str_t* (*p_get_scheme)(const void *uri);
+
+    /**
+     * Get the URI object contained by this URI, or the URI itself if
+     * it doesn't contain another URI.
+     * @param uri the URI (self).
+     */
+    void* (*p_get_uri)(void *uri);
+
+    /**
+     * Print URI components to the buffer, following the rule of which 
+     * components are allowed for the context.
+     * @param context the context where the URI will be placed.
+     * @param uri the URI (self).
+     * @param buf the buffer.
+     * @param size the size of the buffer.
+     * @return the length printed.
+     */
+    pj_ssize_t (*p_print)(pjsip_uri_context_e context,
+			  const void *uri, 
+		          char *buf, pj_size_t size);
+
+    /** 
+     * Compare two URIs according to the context.
+     * @param context the context.
+     * @param uri1 the first URI (self).
+     * @param uri2 the second URI.
+     * @return PJ_SUCCESS if equal, or otherwise the error status which
+     *		    should point to the mismatch part.
+     */
+    pj_status_t	(*p_compare)(pjsip_uri_context_e context, 
+			     const void *uri1, const void *uri2);
+
+    /** 
+     * Clone URI. 
+     * @param pool the pool.
+     * @param the URI to clone (self).
+     * @return new URI.
+     */
+    void *(*p_clone)(pj_pool_t *pool, const void *uri);
+
+} pjsip_uri_vptr;
+
+
+/**
+ * The declaration of 'base class' for all URI scheme.
+ */
+struct pjsip_uri
+{
+    /** All URIs must have URI virtual function table as their first member. */
+    pjsip_uri_vptr *vptr;
+};
+
+/**
+ * This macro checks that the URL is a "sip:" or "sips:" URL.
+ * @param url The URL (pointer to)
+ * @return non-zero if TRUE.
+ */
+#define PJSIP_URI_SCHEME_IS_SIP(url)	\
+    (pj_strnicmp2(pjsip_uri_get_scheme(url), "sip", 3)==0)
+
+/**
+ * This macro checks that the URL is a "sips:" URL (not SIP).
+ * @param url The URL (pointer to)
+ * @return non-zero if TRUE.
+ */
+#define PJSIP_URI_SCHEME_IS_SIPS(url)	\
+    (pj_strnicmp2(pjsip_uri_get_scheme(url), "sips", 4)==0)
+
+/**
+ * This macro checks that the URL is a "tel:" URL.
+ * @param url The URL (pointer to)
+ * @return non-zero if TRUE.
+ */
+#define PJSIP_URI_SCHEME_IS_TEL(url)	\
+    (pj_strnicmp2(pjsip_uri_get_scheme(url), "tel", 3)==0)
+
+
+/**
+ * Generic function to get the URI scheme.
+ * @param uri	    the URI object.
+ * @return	    the URI scheme.
+ */
+PJ_INLINE(const pj_str_t*) pjsip_uri_get_scheme(const void *uri)
+{
+    return (*((pjsip_uri*)uri)->vptr->p_get_scheme)(uri);
+}
+
+/**
+ * Generic function to get the URI object contained by this URI, or the URI 
+ * itself if it doesn't contain another URI.
+ *
+ * @param uri	    the URI.
+ * @return	    the URI.
+ */
+PJ_INLINE(void*) pjsip_uri_get_uri(void *uri)
+{
+    return (*((pjsip_uri*)uri)->vptr->p_get_uri)(uri);
+}
+
+/**
+ * Generic function to compare two URIs.
+ *
+ * @param context   Comparison context.
+ * @param uri1	    The first URI.
+ * @param uri2	    The second URI.
+ * @return	    PJ_SUCCESS if equal, or otherwise the error status which
+ *		    should point to the mismatch part.
+ */
+PJ_INLINE(pj_status_t) pjsip_uri_cmp(pjsip_uri_context_e context, 
+				     const void *uri1, const void *uri2)
+{
+    return (*((const pjsip_uri*)uri1)->vptr->p_compare)(context, uri1, uri2);
+}
+
+/**
+ * Generic function to print an URI object.
+ *
+ * @param context   Print context.
+ * @param uri	    The URI to print.
+ * @param buf	    The buffer.
+ * @param size	    Size of the buffer.
+ * @return	    Length printed.
+ */
+PJ_INLINE(int) pjsip_uri_print(pjsip_uri_context_e context,
+			       const void *uri,
+			       char *buf, pj_size_t size)
+{
+    return (*((const pjsip_uri*)uri)->vptr->p_print)(context, uri, buf, size);
+}
+
+/**
+ * Generic function to clone an URI object.
+ *
+ * @param pool	    Pool.
+ * @param uri	    URI to clone.
+ * @return	    New URI.
+ */
+PJ_INLINE(void*) pjsip_uri_clone( pj_pool_t *pool, const void *uri )
+{
+    return (*((const pjsip_uri*)uri)->vptr->p_clone)(pool, uri);
+}
+
+
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup PJSIP_SIP_URI SIP URI Scheme and Name address
+ * @ingroup PJSIP_URI
+ * @brief SIP URL structure ("sip:" and "sips:")
+ * @{
+ */
+
+
+/**
+ * SIP and SIPS URL scheme.
+ */
+typedef struct pjsip_sip_uri
+{
+    pjsip_uri_vptr *vptr;		/**< Pointer to virtual function table.*/
+    pj_str_t	    user;		/**< Optional user part. */
+    pj_str_t	    passwd;		/**< Optional password part. */
+    pj_str_t	    host;		/**< Host part, always exists. */
+    int		    port;		/**< Optional port number, or zero. */
+    pj_str_t	    user_param;		/**< Optional user parameter */
+    pj_str_t	    method_param;	/**< Optional method parameter. */
+    pj_str_t	    transport_param;	/**< Optional transport parameter. */
+    int		    ttl_param;		/**< Optional TTL param, or -1. */
+    int		    lr_param;		/**< Optional loose routing param, or zero */
+    pj_str_t	    maddr_param;	/**< Optional maddr param */
+    pjsip_param	    other_param;	/**< Other parameters grouped together. */
+    pjsip_param	    header_param;	/**< Optional header parameter. */
+} pjsip_sip_uri;
+
+
+/**
+ * SIP name-addr, which typically appear in From, To, and Contact header.
+ * The SIP name-addr contains a generic URI and a display name.
+ */
+typedef struct pjsip_name_addr
+{
+    /** Pointer to virtual function table. */
+    pjsip_uri_vptr  *vptr;
+
+    /** Optional display name. */
+    pj_str_t	     display;
+
+    /** URI part. */
+    pjsip_uri	    *uri;
+
+} pjsip_name_addr;
+
+
+/**
+ * Create new SIP URL and initialize all fields with zero or NULL.
+ * @param pool	    The pool.
+ * @param secure    Flag to indicate whether secure transport should be used.
+ * @return SIP URL.
+ */
+PJ_DECL(pjsip_sip_uri*) pjsip_sip_uri_create( pj_pool_t *pool, 
+					      pj_bool_t secure );
+
+/**
+ * Change the SIP URI scheme to sip or sips based on the secure flag.
+ * This would not change anything except the scheme.
+ * @param uri	    The URI
+ * @param secure    Non-zero if sips is wanted.
+ */
+PJ_DECL(void) pjsip_sip_uri_set_secure( pjsip_sip_uri *uri, 
+				        pj_bool_t secure );
+
+/**
+ * Initialize SIP URL (all fields are set to NULL or zero).
+ * @param url	    The URL.
+ * @param secure    Create sips URI?
+ */
+PJ_DECL(void)  pjsip_sip_uri_init(pjsip_sip_uri *url, pj_bool_t secure);
+
+/**
+ * Perform full assignment to the SIP URL.
+ * @param pool	    The pool.
+ * @param url	    Destination URL.
+ * @param rhs	    The source URL.
+ */
+PJ_DECL(void)  pjsip_sip_uri_assign(pj_pool_t *pool, pjsip_sip_uri *url, 
+				    const pjsip_sip_uri *rhs);
+
+/**
+ * Create new instance of name address and initialize all fields with zero or
+ * NULL.
+ * @param pool	    The pool.
+ * @return	    New SIP name address.
+ */
+PJ_DECL(pjsip_name_addr*) pjsip_name_addr_create(pj_pool_t *pool);
+
+/**
+ * Initialize with default value.
+ * @param name_addr The name address.
+ */
+PJ_DECL(void) pjsip_name_addr_init(pjsip_name_addr *name_addr);
+
+/**
+ * Perform full assignment to the name address.
+ * @param pool	    The pool.
+ * @param addr	    The destination name address.
+ * @param rhs	    The source name address.
+ */
+PJ_DECL(void)  pjsip_name_addr_assign(pj_pool_t *pool, 
+				      pjsip_name_addr *addr, 
+				      const pjsip_name_addr *rhs);
+
+
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+#endif	/* __PJSIP_URL_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_util.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_util.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip/sip_util.h	(revision 1163)
@@ -0,0 +1,567 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_SIP_MISC_H__
+#define __PJSIP_SIP_MISC_H__
+
+#include <pjsip/sip_msg.h>
+#include <pjsip/sip_resolve.h>
+
+PJ_BEGIN_DECL
+
+/**
+ * @defgroup PJSIP_ENDPT_STATELESS Message Creation and Stateless Operations
+ * @ingroup PJSIP_CORE_CORE
+ * @brief Utilities to create various messages and base function to send messages.
+ * @{
+ */
+
+/**
+ * Create an independent request message. This can be used to build any
+ * request outside a dialog, such as OPTIONS, MESSAGE, etc. To create a request
+ * inside a dialog, application should use #pjsip_dlg_create_request.
+ *
+ * This function adds the following headers in the request:
+ *  - From, To, Call-ID, and CSeq,
+ *  - Contact header, if contact is specified.
+ *  - A blank Via header.
+ *  - Additional request headers (such as Max-Forwards) which are copied
+ *    from endpoint configuration.
+ *
+ * In addition, the function adds a unique tag in the From header.
+ *
+ * Once a transmit data is created, the reference counter is initialized to 1.
+ *
+ * @param endpt	    Endpoint instance.
+ * @param method    SIP Method.
+ * @param target    Target URI.
+ * @param from	    URL to put in From header.
+ * @param to	    URL to put in To header.
+ * @param contact   URL to put in Contact header.
+ * @param call_id   Optional Call-ID (put NULL to generate unique Call-ID).
+ * @param cseq	    Optional CSeq (put -1 to generate random CSeq).
+ * @param text	    Optional text body (put NULL to omit body).
+ * @param p_tdata   Pointer to receive the transmit data.
+ *
+ * @return	    PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_create_request( pjsip_endpoint *endpt, 
+						 const pjsip_method *method,
+						 const pj_str_t *target,
+						 const pj_str_t *from,
+						 const pj_str_t *to, 
+						 const pj_str_t *contact,
+						 const pj_str_t *call_id,
+						 int cseq, 
+						 const pj_str_t *text,
+						 pjsip_tx_data **p_tdata);
+
+/**
+ * Create an independent request message from the specified headers. This
+ * function will clone the headers and put them in the request.
+ *
+ * This function adds the following headers in the request:
+ *  - From, To, Call-ID, and CSeq,
+ *  - Contact header, if contact is specified.
+ *  - A blank Via header.
+ *  - Additional request headers (such as Max-Forwards) which are copied
+ *    from endpoint configuration.
+ *
+ * In addition, the function adds a unique tag in the From header.
+ *
+ * Once a transmit data is created, the reference counter is initialized to 1.
+ *
+ * @param endpt	    Endpoint instance.
+ * @param method    SIP Method.
+ * @param target    Target URI.
+ * @param from	    URL to put in From header.
+ * @param to	    URL to put in To header.
+ * @param contact   URL to put in Contact header.
+ * @param call_id   Optional Call-ID (put NULL to generate unique Call-ID).
+ * @param cseq	    Optional CSeq (put -1 to generate random CSeq).
+ * @param text	    Optional text body (put NULL to omit body).
+ * @param p_tdata   Pointer to receive the transmit data.
+ *
+ * @return	    PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t)
+pjsip_endpt_create_request_from_hdr( pjsip_endpoint *endpt,
+				     const pjsip_method *method,
+				     const pjsip_uri *target,
+				     const pjsip_from_hdr *from,
+				     const pjsip_to_hdr *to,
+				     const pjsip_contact_hdr *contact,
+				     const pjsip_cid_hdr *call_id,
+				     int cseq,
+				     const pj_str_t *text,
+				     pjsip_tx_data **p_tdata);
+
+/**
+ * Construct a minimal response message for the received request. This function
+ * will construct all the Via, Record-Route, Call-ID, From, To, CSeq, and 
+ * Call-ID headers from the request.
+ *
+ * Note: the txdata reference counter is set to ZERO!.
+ *
+ * @param endpt	    The endpoint.
+ * @param rdata	    The request receive data.
+ * @param st_code   Status code to be put in the response.
+ * @param st_text   Optional status text, or NULL to get the default text.
+ * @param p_tdata   Pointer to receive the transmit data.
+ *
+ * @return	    PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_create_response( pjsip_endpoint *endpt,
+						  const pjsip_rx_data *rdata,
+						  int st_code,
+						  const pj_str_t *st_text,
+						  pjsip_tx_data **p_tdata);
+
+/**
+ * Construct a full ACK request for the received non-2xx final response.
+ * This utility function is normally called by the transaction to construct
+ * an ACK request to 3xx-6xx final response.
+ * The generation of ACK message for 2xx final response is different than
+ * this one.
+ * 
+ * @param endpt	    The endpoint.
+ * @param tdata	    This contains the original INVITE request
+ * @param rdata	    The final response.
+ * @param ack	    The ACK request created.
+ *
+ * @return	    PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_create_ack( pjsip_endpoint *endpt,
+					     const pjsip_tx_data *tdata,
+					     const pjsip_rx_data *rdata,
+					     pjsip_tx_data **ack);
+
+
+/**
+ * Construct CANCEL request for the previously sent request.
+ *
+ * @param endpt	    The endpoint.
+ * @param tdata	    The transmit buffer for the request being cancelled.
+ * @param p_tdata   Pointer to receive the transmit data.
+ *
+ * @return	    PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_create_cancel( pjsip_endpoint *endpt,
+						const pjsip_tx_data *tdata,
+						pjsip_tx_data **p_tdata);
+
+
+/**
+ * Find which destination to be used to send the request message, based
+ * on the request URI and Route headers in the message. The procedure
+ * used here follows the guidelines on sending the request in RFC 3261
+ * chapter 8.1.2.
+ *
+ * Note there was a change in the behavior of this function since version
+ * 0.5.10.2. Previously this function may modify the request when strict
+ * route is present (to update request URI and route-set). This is no
+ * longer the case now, and this process is done in separate function
+ * (see #pjsip_process_route_set()).
+ *
+ * @param tdata	    The transmit data containing the request message.
+ * @param dest_info On return, it contains information about destination
+ *		    host to contact, along with the preferable transport
+ *		    type, if any. Caller will then normally proceed with
+ *		    resolving this host with server resolution procedure
+ *		    described in RFC 3263.
+ *
+ * @return	    PJ_SUCCESS, or the appropriate error code.
+ *
+ * @see pjsip_process_route_set
+ */
+PJ_DECL(pj_status_t) pjsip_get_request_dest(const pjsip_tx_data *tdata,
+					    pjsip_host_info *dest_info );
+
+
+/**
+ * Process route-set found in the request and calculate destination to be
+ * used to send the request message, based on the request URI and Route 
+ * headers in the message. The procedure used here follows the guidelines
+ * on sending the request in RFC 3261 chapter 8.1.2.
+ *
+ * This function may modify the message (request line and Route headers),
+ * if the Route information specifies strict routing and the request
+ * URI in the message is different than the calculated target URI. In that
+ * case, the target URI will be put as the request URI of the request and
+ * current request URI will be put as the last entry of the Route headers.
+ *
+ * @param tdata	    The transmit data containing the request message.
+ * @param dest_info On return, it contains information about destination
+ *		    host to contact, along with the preferable transport
+ *		    type, if any. Caller will then normally proceed with
+ *		    resolving this host with server resolution procedure
+ *		    described in RFC 3263.
+ *
+ * @return	    PJ_SUCCESS, or the appropriate error code.
+ *
+ * @see pjsip_get_request_addr
+ */
+PJ_DECL(pj_status_t) pjsip_process_route_set(pjsip_tx_data *tdata,
+					     pjsip_host_info *dest_info );
+
+
+/**
+ * This structure holds the state of outgoing stateless request.
+ */
+typedef struct pjsip_send_state
+{
+    /** Application token, which was specified when the function
+     *  #pjsip_endpt_send_request_stateless() is called.
+     */
+    void *token;
+
+    /** Endpoint instance. 
+     */
+    pjsip_endpoint *endpt;
+
+    /** Transmit data buffer being sent. 
+     */
+    pjsip_tx_data *tdata;
+
+    /** Server addresses resolved. 
+     */
+    pjsip_server_addresses   addr;
+
+    /** Current server address being tried. 
+     */
+    unsigned cur_addr;
+
+    /** Current transport being used. 
+     */
+    pjsip_transport *cur_transport;
+
+    /** The application callback which was specified when the function
+     *  #pjsip_endpt_send_request_stateless() was called.
+     */
+    void (*app_cb)(struct pjsip_send_state*,
+		   pj_ssize_t sent,
+		   pj_bool_t *cont);
+} pjsip_send_state;
+
+/**
+ * Send outgoing request statelessly The function will take care of which 
+ * destination and transport to use based on the information in the message,
+ * taking care of URI in the request line and Route header.
+ *
+ * This function is different than #pjsip_transport_send() in that this 
+ * function adds/modify the Via header as necessary.
+ *
+ * @param endpt	    The endpoint instance.
+ * @param tdata	    The transmit data to be sent.
+ * @param token	    Arbitrary token to be given back on the callback.
+ * @param cb	    Optional callback to notify transmission status (also
+ *		    gives chance for application to discontinue retrying
+ *		    sending to alternate address).
+ *
+ * @return	    PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) 
+pjsip_endpt_send_request_stateless( pjsip_endpoint *endpt,
+				    pjsip_tx_data *tdata,
+				    void *token,
+				    void (*cb)(pjsip_send_state*,
+					       pj_ssize_t sent,
+					       pj_bool_t *cont));
+
+/**
+ * This structure describes destination information to send response.
+ * It is initialized by calling #pjsip_get_response_addr().
+ *
+ * If the response message should be sent using transport from which
+ * the request was received, then transport, addr, and addr_len fields
+ * are initialized.
+ *
+ * The dst_host field is also initialized. It should be used when server
+ * fails to send the response using the transport from which the request
+ * was received, or when the transport is NULL, which means server
+ * must send the response to this address (this situation occurs when
+ * maddr parameter is set, or when rport param is not set in the request).
+ */
+typedef struct pjsip_response_addr
+{
+    pjsip_transport *transport;	/**< Immediate transport to be used. */
+    pj_sockaddr	     addr;	/**< Immediate address to send to.   */
+    int		     addr_len;	/**< Address length.		     */
+    pjsip_host_info  dst_host;	/**< Destination host to contact.    */
+} pjsip_response_addr;
+
+/**
+ * Determine which address (and transport) to use to send response message
+ * based on the received request. This function follows the specification
+ * in section 18.2.2 of RFC 3261 and RFC 3581 for calculating the destination
+ * address and transport.
+ *
+ * The information about destination to send the response will be returned
+ * in res_addr argument. Please see #pjsip_response_addr for more info.
+ *
+ * @param pool	    The pool.
+ * @param rdata	    The incoming request received by the server.
+ * @param res_addr  On return, it will be initialized with information about
+ *		    destination address and transport to send the response.
+ *
+ * @return	    zero (PJ_OK) if successfull.
+ */
+PJ_DECL(pj_status_t) pjsip_get_response_addr(pj_pool_t *pool,
+					     pjsip_rx_data *rdata,
+					     pjsip_response_addr *res_addr);
+
+/**
+ * Send response in tdata statelessly. The function will take care of which 
+ * response destination and transport to use based on the information in the 
+ * Via header (such as the presence of rport, symmetric transport, etc.).
+ *
+ * This function will create a new ephemeral transport if no existing 
+ * transports can be used to send the message to the destination. The ephemeral
+ * transport will be destroyed after some period if it is not used to send any 
+ * more messages.
+ *
+ * The behavior of this function complies with section 18.2.2 of RFC 3261
+ * and RFC 3581.
+ *
+ * @param endpt	    The endpoint instance.
+ * @param res_addr  The information about the address and transport to send
+ *		    the response to. Application can get this information
+ *		    by calling #pjsip_get_response_addr().
+ * @param tdata	    The response message to be sent.
+ * @param token	    Token to be passed back when the callback is called.
+ * @param cb	    Optional callback to notify the transmission status
+ *		    to application, and to inform whether next address or
+ *		    transport will be tried.
+ * 
+ * @return	    PJ_SUCCESS if response has been successfully created and
+ *		    sent to transport layer, or a non-zero error code. 
+ *		    However, even when it returns PJ_SUCCESS, there is no 
+ *		    guarantee that the response has been successfully sent.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_send_response( pjsip_endpoint *endpt,
+					        pjsip_response_addr *res_addr,
+					        pjsip_tx_data *tdata,
+						void *token,
+						void (*cb)(pjsip_send_state*,
+							   pj_ssize_t sent,
+							   pj_bool_t *cont));
+
+/**
+ * This is a convenient function which wraps #pjsip_get_response_addr() and
+ * #pjsip_endpt_send_response() in a single function.
+ *
+ * @param endpt	    The endpoint instance.
+ * @param rdata	    The original request to be responded.
+ * @param tdata	    The response message to be sent.
+ * @param token	    Token to be passed back when the callback is called.
+ * @param cb	    Optional callback to notify the transmission status
+ *		    to application, and to inform whether next address or
+ *		    transport will be tried.
+ * 
+ * @return	    PJ_SUCCESS if response has been successfully created and
+ *		    sent to transport layer, or a non-zero error code. 
+ *		    However, even when it returns PJ_SUCCESS, there is no 
+ *		    guarantee that the response has been successfully sent.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_send_response2(pjsip_endpoint *endpt,
+					        pjsip_rx_data *rdata,
+					        pjsip_tx_data *tdata,
+						void *token,
+						void (*cb)(pjsip_send_state*,
+							   pj_ssize_t sent,
+							   pj_bool_t *cont));
+
+/**
+ * This composite function sends response message statelessly to an incoming
+ * request message. Internally it calls #pjsip_endpt_create_response() and
+ * #pjsip_endpt_send_response().
+ *
+ * @param endpt	    The endpoint instance.
+ * @param rdata	    The incoming request message.
+ * @param st_code   Status code of the response.
+ * @param st_text   Optional status text of the response.
+ * @param hdr_list  Optional header list to be added to the response.
+ * @param body	    Optional message body to be added to the response.
+ *
+ * @return	    PJ_SUCCESS if response message has successfully been
+ *		    sent.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_respond_stateless(pjsip_endpoint *endpt,
+						   pjsip_rx_data *rdata,
+						   int st_code,
+						   const pj_str_t *st_text,
+						   const pjsip_hdr *hdr_list,
+						   const pjsip_msg_body *body);
+						    
+/**
+ * @}
+ */
+
+/**
+ * @defgroup PJSIP_TRANSACT_UTIL Stateful Operations
+ * @ingroup PJSIP_TRANSACT
+ * @brief Utility function to send requests/responses statefully.
+ * @{
+ */
+
+/**
+ * This composite function creates and sends response statefully for the
+ * incoming request.
+ *
+ * @param endpt	    The endpoint instance.
+ * @param tsx_user  The module to be registered as transaction user.
+ * @param rdata	    The incoming request message.
+ * @param st_code   Status code of the response.
+ * @param st_text   Optional status text of the response.
+ * @param hdr_list  Optional header list to be added to the response.
+ * @param body	    Optional message body to be added to the response.
+ * @param p_tsx	    Optional pointer to receive the transaction which was
+ *		    created to send the response.
+ *
+ * @return	    PJ_SUCCESS if response message has successfully been
+ *		    created.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_respond( pjsip_endpoint *endpt,
+					  pjsip_module *tsx_user,
+					  pjsip_rx_data *rdata,
+					  int st_code,
+					  const pj_str_t *st_text,
+					  const pjsip_hdr *hdr_list,
+					  const pjsip_msg_body *body,
+					  pjsip_transaction **p_tsx );
+
+/**
+ * Send outgoing request and initiate UAC transaction for the request.
+ * This is an auxiliary function to be used by application to send arbitrary
+ * requests outside a dialog. To send a request within a dialog, application
+ * should use #pjsip_dlg_send_request instead.
+ *
+ * @param endpt	    The endpoint instance.
+ * @param tdata	    The transmit data to be sent.
+ * @param timeout   Optional timeout for final response to be received, or -1 
+ *		    if the transaction should not have a timeout restriction.
+ *		    The value is in miliseconds.
+ * @param token	    Optional token to be associated with the transaction, and 
+ *		    to be passed to the callback.
+ * @param cb	    Optional callback to be called when the transaction has
+ *		    received a final response. The callback will be called with
+ *		    the previously registered token and the event that triggers
+ *		    the completion of the transaction.
+ *
+ * @return	    PJ_SUCCESS, or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_send_request( pjsip_endpoint *endpt,
+					       pjsip_tx_data *tdata,
+					       pj_int32_t timeout,
+					       void *token,
+					       void (*cb)(void*,pjsip_event*));
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup PJSIP_PROXY_CORE Core Proxy Layer
+ * @ingroup PJSIP
+ * @brief Core proxy operations
+ * @{
+ */
+
+/**
+ * Create new request message to be forwarded upstream to new destination URI 
+ * in uri. The new request is a full/deep clone of the request received in 
+ * rdata, unless if other copy mechanism is specified in the options. 
+ * The branch parameter, if not NULL, will be used as the branch-param in 
+ * the Via header. If it is NULL, then a unique branch parameter will be used.
+ *
+ * Note: this function DOES NOT perform Route information preprocessing as
+ *	  described in RFC 3261 Section 16.4. Application must take care of
+ *	  removing/updating the Route headers according of the rules as
+ *	  described in that section.
+ *
+ * @param endpt	    The endpoint instance.
+ * @param rdata	    The incoming request message.
+ * @param uri	    The URI where the request will be forwarded to.
+ * @param branch    Optional branch parameter. Application may specify its
+ *		    own branch, for example if it wishes to perform loop
+ *		    detection. If the branch parameter is not specified,
+ *		    this function will generate its own by calling 
+ *		    #pjsip_calculate_branch_id() function.
+ * @param options   Optional option flags when duplicating the message.
+ * @param tdata	    The result.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_create_request_fwd(pjsip_endpoint *endpt,
+						    pjsip_rx_data *rdata, 
+						    const pjsip_uri *uri,
+						    const pj_str_t *branch,
+						    unsigned options,
+						    pjsip_tx_data **tdata);
+
+
+
+/**
+ * Create new response message to be forwarded downstream by the proxy from 
+ * the response message found in rdata. Note that this function practically 
+ * will clone the response as is, i.e. without checking the validity of the 
+ * response or removing top most Via header. This function will perform 
+ * full/deep clone of the response, unless other copy mechanism is used in 
+ * the options.
+ *
+ * @param endpt	    The endpoint instance.
+ * @param rdata	    The incoming response message.
+ * @param options   Optional option flags when duplicate the message.
+ * @param tdata	    The result
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_endpt_create_response_fwd( pjsip_endpoint *endpt,
+						      pjsip_rx_data *rdata, 
+						      unsigned options,
+						      pjsip_tx_data **tdata);
+
+
+
+/**
+ * Create a globally unique branch parameter based on the information in 
+ * the incoming request message, for the purpose of creating a new request
+ * for forwarding. This is the default implementation used by 
+ * #pjsip_endpt_create_request_fwd() function if the branch parameter is
+ * not specified.
+ *
+ * The default implementation here will just create an MD5 hash of the
+ * top-most Via.
+ *
+ * Note that the returned string was allocated from rdata's pool.
+ *
+ * @param rdata	    The incoming request message.
+ *
+ * @return	    Unique branch-ID string.
+ */
+PJ_DECL(pj_str_t) pjsip_calculate_branch_id( pjsip_rx_data *rdata );
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+#endif	/* __PJSIP_SIP_MISC_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip_auth.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip_auth.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip_auth.h	(revision 1163)
@@ -0,0 +1,37 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_AUTH_H__
+#define __PJSIP_AUTH_H__
+
+/**
+ * @defgroup PJSIP_AUTH SIP Authorization module
+ */
+
+/**
+ * @file pjsip_auth.h
+ * @brief SIP Authorization Module.
+ */
+
+
+#include <pjsip_auth/sip_auth.h>
+#include <pjsip_auth/sip_auth_msg.h>
+#include <pjsip_auth/sip_auth_parser.h>
+
+#endif	/* __PJSIP_AUTH_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip_simple.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip_simple.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip_simple.h	(revision 1163)
@@ -0,0 +1,44 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 
+ */
+
+/**
+ * @defgroup PJSIP_SIMPLE Event and Presence Framework
+ * @ingroup PJSIP
+ */
+
+/**
+ * @file pjsip_simple.h
+ * @brief SIP SIMPLE Extension
+ */
+
+/*
+ * Include this header file to get all functionalities for SIMPLE extension
+ * (SIP for Instant Messaging and Presence Leveraging Extension).
+ */
+#ifndef __PJSIP_SIMPLE_H__
+#define __PJSIP_SIMPLE_H__
+
+#include <pjsip-simple/evsub.h>
+#include <pjsip-simple/iscomposing.h>
+#include <pjsip-simple/presence.h>
+#include <pjsip-simple/pidf.h>
+#include <pjsip-simple/publish.h>
+#include <pjsip-simple/xpidf.h>
+
+#endif	/* __PJSIP_SIMPLE_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsip_ua.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsip_ua.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsip_ua.h	(revision 1163)
@@ -0,0 +1,29 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSIP_UA_H__
+#define __PJSIP_UA_H__
+
+#include <pjsip-ua/sip_inv.h>
+#include <pjsip-ua/sip_regc.h>
+#include <pjsip-ua/sip_replaces.h>
+#include <pjsip-ua/sip_xfer.h>
+
+
+#endif	/* __PJSIP_UA_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsua-lib/pjsua.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsua-lib/pjsua.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsua-lib/pjsua.h	(revision 1163)
@@ -0,0 +1,4267 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSUA_H__
+#define __PJSUA_H__
+
+/**
+ * @file pjsua.h
+ * @brief PJSUA API.
+ */
+
+
+/* Include all PJSIP core headers. */
+#include <pjsip.h>
+
+/* Include all PJMEDIA headers. */
+#include <pjmedia.h>
+
+/* Include all PJMEDIA-CODEC headers. */
+#include <pjmedia-codec.h>
+
+/* Include all PJSIP-UA headers */
+#include <pjsip_ua.h>
+
+/* Include all PJSIP-SIMPLE headers */
+#include <pjsip_simple.h>
+
+/* Include all PJLIB-UTIL headers. */
+#include <pjlib-util.h>
+
+/* Include all PJLIB headers. */
+#include <pjlib.h>
+
+
+PJ_BEGIN_DECL
+
+
+/**
+ * @defgroup PJSUA_LIB PJSUA API - High Level Softphone API for C/C++ and Python
+ * @ingroup PJSIP
+ * @brief Very high level API for constructing SIP UA applications.
+ * @{
+ *
+ * @section pjsua_api_intro A SIP User Agent API for C/C++ and Python
+ *
+ * PJSUA API is very high level API, available for C/C++ and Python language,
+ * for constructing SIP multimedia user agent
+ * applications. It wraps together the signaling and media functionalities
+ * into an easy to use call API, provides account management, buddy
+ * management, presence, instant messaging, along with multimedia
+ * features such as conferencing, file streaming, local playback,
+ * voice recording, and so on.
+ *
+ * @subsection pjsua_for_c_cpp C/C++ Binding
+ * Application must link with <b>pjsua-lib</b> to use this API. In addition,
+ * this library depends on the following libraries:
+ *  - <b>pjsip-ua</b>, 
+ *  - <b>pjsip-simple</b>, 
+ *  - <b>pjsip-core</b>, 
+ *  - <b>pjmedia</b>,
+ *  - <b>pjmedia-codec</b>, 
+ *  - <b>pjlib-util</b>, and
+ *  - <b>pjlib</b>, 
+ *
+ * so application must also link with these libraries as well. For more 
+ * information, please refer to 
+ * <A HREF="http://www.pjsip.org/using.htm">Getting Started with PJSIP</A>
+ * page.
+ *
+ * @subsection pjsua_for_python Python Binding
+ *
+ * The Python binding for PJSUA-API is implemented by <b>py_pjsua</b>
+ * module, in <tt>pjsip-apps/py_pjsua</tt> directory. This module is
+ * built by building <tt>py_pjsua</tt> project in <tt>pjsip_apps</tt>
+ * Visual Studio workspace, or by invoking the usual <tt>setup.py</tt>
+ * Python installer script.
+ *
+ * The Python script then can import the PJSUA-API Python module by
+ * using <b>import py_pjsua</b> construct as usual.
+ *
+ *
+ * @section pjsua_samples
+ *
+ * Few samples are provided both in C and Python.
+ *
+  - @ref page_pjsip_sample_simple_pjsuaua_c\n
+    Very simple SIP User Agent with registration, call, and media, using
+    PJSUA-API, all in under 200 lines of code.
+
+  - @ref page_pjsip_samples_pjsua\n
+    This is the reference implementation for PJSIP and PJMEDIA.
+    PJSUA is a console based application, designed to be simple enough
+    to be readble, but powerful enough to demonstrate all features
+    available in PJSIP and PJMEDIA.\n
+
+  - Python sample\n
+    For a real simple Python sample application, have a look at
+    <A HREF="http://www.pjsip.org/trac/browser/pjproject/trunk/pjsip-apps/src/py_pjsua/pjsua_app.py">
+    <tt>pjsip-apps/src/py_pjsua/pjsua_app.py</tt></A> file.
+
+ * @section root_using_pjsua_lib Using PJSUA API
+ *
+ * Please refer to @ref PJSUA_LIB_BASE on how to create and initialize the API.
+ * And then see the Modules on the bottom of this page for more information
+ * about specific subject.
+ */ 
+
+
+
+/*****************************************************************************
+ * BASE API
+ */
+
+/**
+ * @defgroup PJSUA_LIB_BASE PJSUA-API Basic API
+ * @ingroup PJSUA_LIB
+ * @brief Basic application creation/initialization, logging configuration, etc.
+ * @{
+ *
+ * The base PJSUA API controls PJSUA creation, initialization, and startup, and
+ * also provides various auxiliary functions.
+ *
+ * @section using_pjsua_lib Using PJSUA Library
+ *
+ * @subsection creating_pjsua_lib Creating PJSUA
+ *
+ * Before anything else, application must create PJSUA by calling #pjsua_create()
+ * (or <tt>py_pjsua.create()</tt> from Python).
+ * This, among other things, will initialize PJLIB, which is crucial before 
+ * any PJLIB functions can be called, PJLIB-UTIL, and create a SIP endpoint.
+ *
+ * After this function is called, application can create a memory pool (with
+ * #pjsua_pool_create()) and read configurations from command line or file to
+ * build the settings to initialize PJSUA below.
+ *
+ * @subsection init_pjsua_lib Initializing PJSUA
+ *
+ * After PJSUA is created, application can initialize PJSUA by calling
+ * #pjsua_init(). This function takes several optional configuration settings 
+ * in the argument, if application wants to set them.
+ *
+ * @subsubsection init_pjsua_lib_c_cpp PJSUA-LIB Initialization (in C)
+ * Sample code to initialize PJSUA in C code:
+ \code
+
+ #include <pjsua-lib/pjsua.h>
+
+ #define THIS_FILE  __FILE__
+
+ static pj_status_t app_init(void)
+ {
+    pjsua_config	 ua_cfg;
+    pjsua_logging_config log_cfg;
+    pjsua_media_config   media_cfg;
+    pj_status_t status;
+
+    // Must create pjsua before anything else!
+    status = pjsua_create();
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error initializing pjsua", status);
+	return status;
+    }
+
+    // Initialize configs with default settings.
+    pjsua_config_default(&ua_cfg);
+    pjsua_logging_config_default(&log_cfg);
+    pjsua_media_config_default(&media_cfg);
+
+    // At the very least, application would want to override
+    // the call callbacks in pjsua_config:
+    ua_cfg.cb.on_incoming_call = ...
+    ua_cfg.cb.on_call_state = ..
+    ...
+
+    // Customize other settings (or initialize them from application specific
+    // configuration file):
+    ...
+
+    // Initialize pjsua
+    status = pjsua_init(&ua_cfg, &log_cfg, &media_cfg);
+    if (status != PJ_SUCCESS) {
+          pjsua_perror(THIS_FILE, "Error initializing pjsua", status);
+	  return status;
+    }
+    .
+    ...
+ }
+ \endcode
+ *
+ *
+ * @subsubsection init_pjsua_lib_python PJSUA-LIB Initialization (in Python)
+ * Sample code to initialize PJSUA in Python code:
+
+ \code
+
+import py_pjsua
+
+#
+# Initialize pjsua.
+#
+def app_init():
+	# Create pjsua before anything else
+	status = py_pjsua.create()
+	if status != 0:
+		err_exit("pjsua create() error", status)
+
+	# We use default logging config for this sample
+	log_cfg = py_pjsua.logging_config_default()
+
+	# Create and initialize pjsua config
+	# Note: for this Python module, thread_cnt must be 0 since Python
+	#       doesn't like to be called from alien thread (pjsua's thread
+	#       in this case)	    
+	ua_cfg = py_pjsua.config_default()
+	ua_cfg.thread_cnt = 0
+	ua_cfg.user_agent = "PJSUA/Python 0.1"
+
+	# Override callbacks. At the very least application would want to
+	# override the call callbacks in pjsua_config
+	ua_cfg.cb.on_incoming_call = ...
+	ua_cfg.cb.on_call_state = ...
+
+	# Use default media config for this cample
+	med_cfg = py_pjsua.media_config_default()
+
+	#
+	# Initialize pjsua!!
+	#
+	status = py_pjsua.init(ua_cfg, log_cfg, med_cfg)
+	if status != 0:
+		err_exit("pjsua init() error", status)
+
+
+
+# Utility: display PJ error and exit
+#
+def err_exit(title, rc):
+	py_pjsua.perror(THIS_FILE, title, rc)
+	exit(1)
+
+ \endcode
+
+
+ * @subsection other_init_pjsua_lib Other Initialization
+ *
+ * After PJSUA is initialized with #pjsua_init(), application will normally
+ * need/want to perform the following tasks:
+ *
+ *  - create SIP transport with #pjsua_transport_create(). Application would
+ *    to call #pjsua_transport_create() for each transport types that it
+ *    wants to support (for example, UDP, TCP, and TLS). Please see
+ *    @ref PJSUA_LIB_TRANSPORT section for more info.
+ *  - create one or more SIP accounts with #pjsua_acc_add() or
+ *    #pjsua_acc_add_local(). The SIP account is used for registering with
+ *    the SIP server, if any. Please see @ref PJSUA_LIB_ACC for more info.
+ *  - add one or more buddies with #pjsua_buddy_add(). Please see
+ *    @ref PJSUA_LIB_BUDDY section for more info.
+ *  - optionally configure the sound device, codec settings, and other
+ *    media settings. Please see @ref PJSUA_LIB_MEDIA for more info.
+ *
+ *
+ * @subsection starting_pjsua_lib Starting PJSUA
+ *
+ * After all initializations have been done, application must call
+ * #pjsua_start() to start PJSUA. This function will check that all settings
+ * have been properly configured, and apply default settings when they haven't,
+ * or report error status when it is unable to recover from missing settings.
+ *
+ * Most settings can be changed during run-time. For example, application
+ * may add, modify, or delete accounts, buddies, or change media settings
+ * during run-time.
+ *
+ * @subsubsection starting_pjsua_lib_c C Example for Starting PJSUA
+ * Sample code:
+ \code
+ static pj_status_t app_run(void)
+ {
+    pj_status_t status;
+
+    // Start pjsua
+    status = pjsua_start();
+    if (status != PJ_SUCCESS) {
+	pjsua_destroy();
+	pjsua_perror(THIS_FILE, "Error starting pjsua", status);
+	return status;
+    }
+
+    // Run application loop
+    while (1) {
+	char choice[10];
+	
+	printf("Select menu: ");
+	fgets(choice, sizeof(choice), stdin);
+	...
+    }
+ }
+ \endcode
+
+ * @subsubsection starting_pjsua_lib_python Python Example for starting PJSUA
+ * For Python, starting PJSUA-LIB takes one more step, that is to initialize
+ * Python worker thread to poll PJSUA-LIB. This step is necessary because
+ * Python doesn't like it when it is called by an "alien" thread (that is,
+ * thread that is not created using Python API).
+ *
+ * Because of this, we cannot use a worker thread in PJSUA-LIB, because then
+ * the Python callback will be called by an "alien" thread and this would
+ * crash Python (or raise assert() probably).
+ *
+ * So because worker thread is disabled, we need to create a worker thread
+ * in Python. Note that this may not be necessary if we're creating a
+ * GUI application, because then we can attach, for example, a GUI timer
+ * object to poll the PJSUA-LIB. But because we're creating a console 
+ * application which will block at <tt>sys.stdin.readline()</tt>, we need
+ * to have a worker thread to poll PJSUA-LIB.
+
+ \code
+
+import thread
+
+C_QUIT = 0
+
+
+def app_start():
+	# Done with initialization, start pjsua!!
+	#
+	status = py_pjsua.start()
+	if status != 0:
+		py_pjsua.destroy()
+		err_exit("Error starting pjsua!", status)
+
+	# Start worker thread
+	thr = thread.start_new(worker_thread_main, (0,))
+    
+	print "PJSUA Started!!"
+
+#
+# Worker thread function.
+# Python doesn't like it when it's called from an alien thread
+# (pjsua's worker thread, in this case), so for Python we must
+# disable worker thread in pjsua and poll pjsua from Python instead.
+#
+def worker_thread_main(arg):
+	global C_QUIT
+	thread_desc = 0
+	status = py_pjsua.thread_register("python worker", thread_desc)
+	if status != 0:
+		py_pjsua.perror(THIS_FILE, "Error registering thread", status)
+	else:
+		while C_QUIT == 0:
+			py_pjsua.handle_events(50)
+		print "Worker thread quitting.."
+		C_QUIT = 2
+
+
+ \endcode
+ */
+
+/** Constant to identify invalid ID for all sorts of IDs. */
+#define PJSUA_INVALID_ID	    (-1)
+
+/** Call identification */
+typedef int pjsua_call_id;
+
+/** Account identification */
+typedef int pjsua_acc_id;
+
+/** Buddy identification */
+typedef int pjsua_buddy_id;
+
+/** File player identification */
+typedef int pjsua_player_id;
+
+/** File recorder identification */
+typedef int pjsua_recorder_id;
+
+/** Conference port identification */
+typedef int pjsua_conf_port_id;
+
+
+
+/**
+ * Maximum proxies in account.
+ */
+#ifndef PJSUA_ACC_MAX_PROXIES
+#   define PJSUA_ACC_MAX_PROXIES    8
+#endif
+
+
+
+/**
+ * Logging configuration, which can be (optionally) specified when calling
+ * #pjsua_init(). Application must call #pjsua_logging_config_default() to
+ * initialize this structure with the default values.
+ *
+ * \par Sample Python Syntax:
+ * \code
+    # Python type: py_pjsua.Logging_Config
+ 
+    log_cfg = py_pjsua.logging_config_default()
+    log_cfg.level = 4
+ * \endcode
+ */
+typedef struct pjsua_logging_config
+{
+    /**
+     * Log incoming and outgoing SIP message? Yes!
+     */
+    pj_bool_t	msg_logging;
+
+    /**
+     * Input verbosity level. Value 5 is reasonable.
+     */
+    unsigned	level;
+
+    /**
+     * Verbosity level for console. Value 4 is reasonable.
+     */
+    unsigned	console_level;
+
+    /**
+     * Log decoration.
+     */
+    unsigned	decor;
+
+    /**
+     * Optional log filename.
+     */
+    pj_str_t	log_filename;
+
+    /**
+     * Optional callback function to be called to write log to 
+     * application specific device. This function will be called for
+     * log messages on input verbosity level.
+     *
+     * \par Sample Python Syntax:
+     * \code
+     # level:	integer
+     # data:	string
+     # len:	integer
+
+     def cb(level, data, len):
+	    print data,
+     * \endcode
+     */
+    void       (*cb)(int level, const char *data, pj_size_t len);
+
+
+} pjsua_logging_config;
+
+
+/**
+ * Use this function to initialize logging config.
+ *
+ * @param cfg	The logging config to be initialized.
+ *
+ * \par Python Syntax:
+ * The Python function instantiates and initialize the logging config:
+ * \code
+ logging_cfg = py_pjsua.logging_config_default()
+ * \endcode
+ */
+PJ_INLINE(void) pjsua_logging_config_default(pjsua_logging_config *cfg)
+{
+    pj_bzero(cfg, sizeof(*cfg));
+
+    cfg->msg_logging = PJ_TRUE;
+    cfg->level = 5;
+    cfg->console_level = 4;
+    cfg->decor = PJ_LOG_HAS_SENDER | PJ_LOG_HAS_TIME | 
+		 PJ_LOG_HAS_MICRO_SEC | PJ_LOG_HAS_NEWLINE;
+}
+
+/**
+ * Use this function to duplicate logging config.
+ *
+ * @param pool	    Pool to use.
+ * @param dst	    Destination config.
+ * @param src	    Source config.
+ *
+ * \par Python Syntax:
+ * Not available (for now). Ideally we should be able to just assign
+ * one config to another, but this has not been tested.
+ */
+PJ_INLINE(void) pjsua_logging_config_dup(pj_pool_t *pool,
+					 pjsua_logging_config *dst,
+					 const pjsua_logging_config *src)
+{
+    pj_memcpy(dst, src, sizeof(*src));
+    pj_strdup_with_null(pool, &dst->log_filename, &src->log_filename);
+}
+
+
+
+/**
+ * This structure describes application callback to receive various event
+ * notification from PJSUA-API. All of these callbacks are OPTIONAL, 
+ * although definitely application would want to implement some of
+ * the important callbacks (such as \a on_incoming_call).
+ *
+ * \par Python Syntax:
+ * This callback structure is embedded on pjsua_config structure.
+ */
+typedef struct pjsua_callback
+{
+    /**
+     * Notify application when invite state has changed.
+     * Application may then query the call info to get the
+     * detail call states by calling  pjsua_call_get_info() function.
+     *
+     * @param call_id	The call index.
+     * @param e		Event which causes the call state to change.
+     *
+     * \par Python Syntax:
+     * \code
+     # call_id: integer
+     # e:	an opaque object
+
+     def on_call_state(call_id, e):
+	    return
+     * \endcode
+     */
+    void (*on_call_state)(pjsua_call_id call_id, pjsip_event *e);
+
+    /**
+     * Notify application on incoming call.
+     *
+     * @param acc_id	The account which match the incoming call.
+     * @param call_id	The call id that has just been created for
+     *			the call.
+     * @param rdata	The incoming INVITE request.
+     *
+     * \par Python Syntax:
+     * \code
+     # acc_id:	integer
+     # call_id: integer
+     # rdata:	an opaque object
+
+     def on_incoming_call(acc_id, call_id, rdata):
+	    return
+     * \endcode
+     */
+    void (*on_incoming_call)(pjsua_acc_id acc_id, pjsua_call_id call_id,
+			     pjsip_rx_data *rdata);
+
+    /**
+     * Notify application when media state in the call has changed.
+     * Normal application would need to implement this callback, e.g.
+     * to connect the call's media to sound device.
+     *
+     * @param call_id	The call index.
+     *
+     * \par Python Syntax:
+     * \code
+     # call_id: integer
+
+     def on_call_media_state(call_id):
+	    return
+     * \endcode
+     */
+    void (*on_call_media_state)(pjsua_call_id call_id);
+
+    /**
+     * Notify application upon incoming DTMF digits.
+     *
+     * @param call_id	The call index.
+     * @param digit	DTMF ASCII digit.
+     *
+     * \par Python Syntax:
+     * \code
+     # call_id: integer
+     # digit:	integer
+
+     def on_dtmf_digit(call_id, digit):
+	    return
+     * \endcode
+     */
+    void (*on_dtmf_digit)(pjsua_call_id call_id, int digit);
+
+    /**
+     * Notify application on call being transfered (i.e. REFER is received).
+     * Application can decide to accept/reject transfer request
+     * by setting the code (default is 200). When this callback
+     * is not defined, the default behavior is to accept the
+     * transfer.
+     *
+     * @param call_id	The call index.
+     * @param dst	The destination where the call will be 
+     *			transfered to.
+     * @param code	Status code to be returned for the call transfer
+     *			request. On input, it contains status code 200.
+     *
+     * \par Python Syntax:
+     * \code
+     # call_id: integer
+     # dst:	string
+     # code:	integer
+
+     def on_call_transfer_request(call_id, dst, code):
+	    return code
+
+     * \endcode 
+     */
+    void (*on_call_transfer_request)(pjsua_call_id call_id,
+				     const pj_str_t *dst,
+				     pjsip_status_code *code);
+
+    /**
+     * Notify application of the status of previously sent call
+     * transfer request. Application can monitor the status of the
+     * call transfer request, for example to decide whether to 
+     * terminate existing call.
+     *
+     * @param call_id	    Call ID.
+     * @param st_code	    Status progress of the transfer request.
+     * @param st_text	    Status progress text.
+     * @param final	    If non-zero, no further notification will
+     *			    be reported. The st_code specified in
+     *			    this callback is the final status.
+     * @param p_cont	    Initially will be set to non-zero, application
+     *			    can set this to FALSE if it no longer wants
+     *			    to receie further notification (for example,
+     *			    after it hangs up the call).
+     *
+     * \par Python Syntax:
+     * \code
+     # call_id: integer
+     # st_code: integer
+     # st_text: string
+     # final:	integer
+     # cont:	integer
+
+     # return:	cont
+
+     def on_call_transfer_status(call_id, st_code, st_text, final, cont):
+	    return cont
+     * \endcode
+     */
+    void (*on_call_transfer_status)(pjsua_call_id call_id,
+				    int st_code,
+				    const pj_str_t *st_text,
+				    pj_bool_t final,
+				    pj_bool_t *p_cont);
+
+    /**
+     * Notify application about incoming INVITE with Replaces header.
+     * Application may reject the request by setting non-2xx code.
+     *
+     * @param call_id	    The call ID to be replaced.
+     * @param rdata	    The incoming INVITE request to replace the call.
+     * @param st_code	    Status code to be set by application. Application
+     *			    should only return a final status (200-699).
+     * @param st_text	    Optional status text to be set by application.
+     *
+     * \par Python Syntax:
+     * \code
+     # call_id: integer
+     # rdata:	an opaque object
+     # st_code: integer
+     # st_text: string
+
+     # return:	(st_code, st_text) tuple
+
+     def on_call_replace_request(call_id, rdata, st_code, st_text):
+	    return st_code, st_text
+     * \endcode
+     */
+    void (*on_call_replace_request)(pjsua_call_id call_id,
+				    pjsip_rx_data *rdata,
+				    int *st_code,
+				    pj_str_t *st_text);
+
+    /**
+     * Notify application that an existing call has been replaced with
+     * a new call. This happens when PJSUA-API receives incoming INVITE
+     * request with Replaces header.
+     *
+     * After this callback is called, normally PJSUA-API will disconnect
+     * \a old_call_id and establish \a new_call_id.
+     *
+     * @param old_call_id   Existing call which to be replaced with the
+     *			    new call.
+     * @param new_call_id   The new call.
+     * @param rdata	    The incoming INVITE with Replaces request.
+     *
+     * \par Python Syntax:
+     * \code
+     # old_call_id: integer
+     # new_call_id: integer
+
+     def on_call_replaced(old_call_id, new_call_id):
+	    return
+     * \endcode
+     */
+    void (*on_call_replaced)(pjsua_call_id old_call_id,
+			     pjsua_call_id new_call_id);
+
+
+    /**
+     * Notify application when registration status has changed.
+     * Application may then query the account info to get the
+     * registration details.
+     *
+     * @param acc_id	    Account ID.
+     *
+     * \par Python Syntax:
+     * \code
+     # acc_id:	account ID (integer)
+
+     def on_reg_state(acc_id):
+	    return
+     * \endcode
+     */
+    void (*on_reg_state)(pjsua_acc_id acc_id);
+
+    /**
+     * Notify application when the buddy state has changed.
+     * Application may then query the buddy into to get the details.
+     *
+     * @param buddy_id	    The buddy id.
+     *
+     * \par Python Syntax:
+     * \code
+     # buddy_id:    integer
+
+     def on_buddy_state(buddy_id):
+	    return
+     * \endcode
+     */
+    void (*on_buddy_state)(pjsua_buddy_id buddy_id);
+
+    /**
+     * Notify application on incoming pager (i.e. MESSAGE request).
+     * Argument call_id will be -1 if MESSAGE request is not related to an
+     * existing call.
+     *
+     * @param call_id	    Containts the ID of the call where the IM was
+     *			    sent, or PJSUA_INVALID_ID if the IM was sent
+     *			    outside call context.
+     * @param from	    URI of the sender.
+     * @param to	    URI of the destination message.
+     * @param contact	    The Contact URI of the sender, if present.
+     * @param mime_type	    MIME type of the message.
+     * @param body	    The message content.
+     *
+     * \par Python Syntax:
+     * \code
+     # call_id:	    integer
+     # from:	    string
+     # to:	    string
+     # contact:	    string
+     # mime_type:   string
+     # body:	    string
+
+     def on_pager(call_id, from, to, contact, mime_type, body):
+	    return
+     * \endcode
+     */
+    void (*on_pager)(pjsua_call_id call_id, const pj_str_t *from,
+		     const pj_str_t *to, const pj_str_t *contact,
+		     const pj_str_t *mime_type, const pj_str_t *body);
+
+    /**
+     * Notify application about the delivery status of outgoing pager
+     * request.
+     *
+     * @param call_id	    Containts the ID of the call where the IM was
+     *			    sent, or PJSUA_INVALID_ID if the IM was sent
+     *			    outside call context.
+     * @param to	    Destination URI.
+     * @param body	    Message body.
+     * @param user_data	    Arbitrary data that was specified when sending
+     *			    IM message.
+     * @param status	    Delivery status.
+     * @param reason	    Delivery status reason.
+     *
+     * \par Python Syntax
+     * \code
+     # call_id:	    integer
+     # to:	    string
+     # body:	    string
+     # user_data:   string
+     # status:	    integer
+     # reason:	    string
+
+     def on_pager_status(call_id, to, body, user_data, status, reason):
+	    return
+     * \endcode
+     */
+    void (*on_pager_status)(pjsua_call_id call_id,
+			    const pj_str_t *to,
+			    const pj_str_t *body,
+			    void *user_data,
+			    pjsip_status_code status,
+			    const pj_str_t *reason);
+
+    /**
+     * Notify application about typing indication.
+     *
+     * @param call_id	    Containts the ID of the call where the IM was
+     *			    sent, or PJSUA_INVALID_ID if the IM was sent
+     *			    outside call context.
+     * @param from	    URI of the sender.
+     * @param to	    URI of the destination message.
+     * @param contact	    The Contact URI of the sender, if present.
+     * @param is_typing	    Non-zero if peer is typing, or zero if peer
+     *			    has stopped typing a message.
+     *
+     * \par Python Syntax
+     * \code
+     # call_id:	    string
+     # from:	    string
+     # to:	    string
+     # contact:	    string
+     # is_typing:   integer
+
+     def on_typing(call_id, from, to, contact, is_typing):
+	    return
+     * \endcode
+     */
+    void (*on_typing)(pjsua_call_id call_id, const pj_str_t *from,
+		      const pj_str_t *to, const pj_str_t *contact,
+		      pj_bool_t is_typing);
+
+} pjsua_callback;
+
+
+
+
+/**
+ * This structure describes the settings to control the API and
+ * user agent behavior, and can be specified when calling #pjsua_init().
+ * Before setting the values, application must call #pjsua_config_default()
+ * to initialize this structure with the default values.
+ *
+ * \par Python Sample Syntax:
+ * The pjsua_config type in Python is <tt>py_pjsua.Config</tt>. Application
+ * creates the instance by calling <tt>py_pjsua.config_default()</tt>:
+ * \code
+    cfg = py_pjsua.config_default()
+ * \endcode
+ */
+typedef struct pjsua_config
+{
+
+    /** 
+     * Maximum calls to support (default: 4). The value specified here
+     * must be smaller than the compile time maximum settings 
+     * PJSUA_MAX_CALLS, which by default is 32. To increase this 
+     * limit, the library must be recompiled with new PJSUA_MAX_CALLS
+     * value.
+     */
+    unsigned	    max_calls;
+
+    /** 
+     * Number of worker threads. Normally application will want to have at
+     * least one worker thread, unless when it wants to poll the library
+     * periodically, which in this case the worker thread can be set to
+     * zero.
+     */
+    unsigned	    thread_cnt;
+
+    /**
+     * Number of nameservers. If no name server is configured, the SIP SRV
+     * resolution would be disabled, and domain will be resolved with
+     * standard pj_gethostbyname() function.
+     */
+    unsigned	    nameserver_count;
+
+    /**
+     * Array of nameservers to be used by the SIP resolver subsystem.
+     * The order of the name server specifies the priority (first name
+     * server will be used first, unless it is not reachable).
+     */
+    pj_str_t	    nameserver[4];
+
+    /**
+     * Number of outbound proxies in the \a outbound_proxy array.
+     */
+    unsigned	    outbound_proxy_cnt;
+
+    /** 
+     * Specify the URL of outbound proxies to visit for all outgoing requests.
+     * The outbound proxies will be used for all accounts, and it will
+     * be used to build the route set for outgoing requests. The final
+     * route set for outgoing requests will consists of the outbound proxies
+     * and the proxy configured in the account.
+     */
+    pj_str_t	    outbound_proxy[4];
+
+    /**
+     * Specify domain name to be resolved with DNS SRV resolution to get the
+     * address of the STUN servers. Alternatively application may specify
+     * \a stun_host and \a stun_relay_host instead.
+     *
+     * If DNS SRV resolution failed for this domain, then DNS A resolution
+     * will be performed only if \a stun_host is specified.
+     */
+    pj_str_t	    stun_domain;
+
+    /**
+     * Specify STUN server to be used.
+     */
+    pj_str_t	    stun_host;
+
+    /**
+     * Specify STUN relay server to be used.
+     */
+    pj_str_t	    stun_relay_host;
+
+    /** 
+     * Number of credentials in the credential array.
+     */
+    unsigned	    cred_count;
+
+    /** 
+     * Array of credentials. These credentials will be used by all accounts,
+     * and can be used to authenticate against outbound proxies. If the
+     * credential is specific to the account, then application should set
+     * the credential in the pjsua_acc_config rather than the credential
+     * here.
+     */
+    pjsip_cred_info cred_info[PJSUA_ACC_MAX_PROXIES];
+
+    /**
+     * Application callback to receive various event notifications from
+     * the library.
+     */
+    pjsua_callback  cb;
+
+    /**
+     * Optional user agent string (default empty). If it's empty, no
+     * User-Agent header will be sent with outgoing requests.
+     */
+    pj_str_t	    user_agent;
+
+} pjsua_config;
+
+
+/**
+ * Use this function to initialize pjsua config.
+ *
+ * @param cfg	pjsua config to be initialized.
+ *
+ * \par Python Sample Syntax:
+ * The corresponding Python function creates an instance of the config and
+ * initializes it to the default settings:
+ * \code
+    cfg = py_pjsua.config_default()
+ * \endcode
+
+ */
+PJ_INLINE(void) pjsua_config_default(pjsua_config *cfg)
+{
+    pj_bzero(cfg, sizeof(*cfg));
+
+    cfg->max_calls = 4;
+    cfg->thread_cnt = 1;
+}
+
+
+/**
+ * Duplicate credential.
+ *
+ * @param pool	    The memory pool.
+ * @param dst	    Destination credential.
+ * @param src	    Source credential.
+ *
+ * \par Python:
+ * Not applicable (for now). Probably we could just assign one credential
+ * variable to another, but this has not been tested.
+ */
+PJ_INLINE(void) pjsip_cred_dup( pj_pool_t *pool,
+				pjsip_cred_info *dst,
+				const pjsip_cred_info *src)
+{
+    pj_strdup_with_null(pool, &dst->realm, &src->realm);
+    pj_strdup_with_null(pool, &dst->scheme, &src->scheme);
+    pj_strdup_with_null(pool, &dst->username, &src->username);
+    pj_strdup_with_null(pool, &dst->data, &src->data);
+
+}
+
+
+/**
+ * Duplicate pjsua_config.
+ *
+ * @param pool	    The pool to get memory from.
+ * @param dst	    Destination config.
+ * @param src	    Source config.
+ */
+PJ_INLINE(void) pjsua_config_dup(pj_pool_t *pool,
+				 pjsua_config *dst,
+				 const pjsua_config *src)
+{
+    unsigned i;
+
+    pj_memcpy(dst, src, sizeof(*src));
+
+    for (i=0; i<src->outbound_proxy_cnt; ++i) {
+	pj_strdup_with_null(pool, &dst->outbound_proxy[i],
+			    &src->outbound_proxy[i]);
+    }
+
+    for (i=0; i<src->cred_count; ++i) {
+	pjsip_cred_dup(pool, &dst->cred_info[i], &src->cred_info[i]);
+    }
+
+    pj_strdup_with_null(pool, &dst->user_agent, &src->user_agent);
+    pj_strdup_with_null(pool, &dst->stun_domain, &src->stun_domain);
+    pj_strdup_with_null(pool, &dst->stun_host, &src->stun_host);
+    pj_strdup_with_null(pool, &dst->stun_relay_host, &src->stun_relay_host);
+}
+
+
+
+/**
+ * This structure describes additional information to be sent with
+ * outgoing SIP message. It can (optionally) be specified for example
+ * with #pjsua_call_make_call(), #pjsua_call_answer(), #pjsua_call_hangup(),
+ * #pjsua_call_set_hold(), #pjsua_call_send_im(), and many more.
+ *
+ * Application MUST call #pjsua_msg_data_init() to initialize this
+ * structure before setting its values.
+ *
+ * \par Python Syntax
+ * The data type in Python is <tt>py_pjsua.Msg_Data</tt>. Application is
+ * recommended to instantiate the structure by using this construct:
+ * \code
+    msg_data = py_pjsua.msg_data_init()
+ * \endcode
+ */
+typedef struct pjsua_msg_data
+{
+    /**
+     * Additional message headers as linked list.
+     *
+     * \par Python:
+     * This field is implemented as string linked-list in Python, where each
+     * string describes the header. For example:
+     \code
+	msg_data = py_pjsua.Msg_Data()
+	msg_data.hdr_list = ["Subject: Hello py_pjsua!", "Priority: very low"]
+     \endcode
+     */
+    pjsip_hdr	hdr_list;
+
+    /**
+     * MIME type of optional message body. 
+     */
+    pj_str_t	content_type;
+
+    /**
+     * Optional message body.
+     */
+    pj_str_t	msg_body;
+
+} pjsua_msg_data;
+
+
+/**
+ * Initialize message data.
+ *
+ * @param msg_data  Message data to be initialized.
+ *
+ * \par Python
+ * The corresponding Python function creates and initializes the structure:
+ * \code
+    msg_data = py_pjsua.msg_data_init()
+ * \endcode
+ */
+PJ_INLINE(void) pjsua_msg_data_init(pjsua_msg_data *msg_data)
+{
+    pj_bzero(msg_data, sizeof(*msg_data));
+    pj_list_init(&msg_data->hdr_list);
+}
+
+
+
+/**
+ * Instantiate pjsua application. Application must call this function before
+ * calling any other functions, to make sure that the underlying libraries
+ * are properly initialized. Once this function has returned success,
+ * application must call pjsua_destroy() before quitting.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.create()
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_create(void);
+
+
+/* Forward declaration */
+typedef struct pjsua_media_config pjsua_media_config;
+
+
+/**
+ * Initialize pjsua with the specified settings. All the settings are 
+ * optional, and the default values will be used when the config is not
+ * specified.
+ *
+ * Note that #pjsua_create() MUST be called before calling this function.
+ *
+ * @param ua_cfg	User agent configuration.
+ * @param log_cfg	Optional logging configuration.
+ * @param media_cfg	Optional media configuration.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The function is similar in Python:
+ * \code
+    status = py_pjsua.init(ua_cfg, log_cfg, media_cfg)
+ * \endcode
+ * Note that \a ua_cfg, \a log_cfg, and \a media_cfg are optional, and
+ * the Python script may pass None if it doesn't want to configure the 
+ * setting.
+ */
+PJ_DECL(pj_status_t) pjsua_init(const pjsua_config *ua_cfg,
+				const pjsua_logging_config *log_cfg,
+				const pjsua_media_config *media_cfg);
+
+
+/**
+ * Application is recommended to call this function after all initialization
+ * is done, so that the library can do additional checking set up
+ * additional 
+ *
+ * Application may call this function anytime after #pjsua_init().
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The function is similar in Python:
+ * \code
+    status = py_pjsua.start()
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_start(void);
+
+
+/**
+ * Destroy pjsua. Application is recommended to perform graceful shutdown
+ * before calling this function (such as unregister the account from the SIP 
+ * server, terminate presense subscription, and hangup active calls), however,
+ * this function will do all of these if it finds there are active sessions
+ * that need to be terminated. This function will approximately block for
+ * one second to wait for replies from remote.
+ *
+ * Application.may safely call this function more than once if it doesn't
+ * keep track of it's state.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The function is similar in Python:
+ * \code
+    status = py_pjsua.destroy()
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_destroy(void);
+
+
+/**
+ * Poll pjsua for events, and if necessary block the caller thread for
+ * the specified maximum interval (in miliseconds).
+ *
+ * Application doesn't normally need to call this function if it has
+ * configured worker thread (\a thread_cnt field) in pjsua_config structure,
+ * because polling then will be done by these worker threads instead.
+ *
+ * @param msec_timeout	Maximum time to wait, in miliseconds.
+ *
+ * @return  The number of events that have been handled during the
+ *	    poll. Negative value indicates error, and application
+ *	    can retrieve the error as (status = -return_value).
+ *
+ * \par Python:
+ * The function is similar in Python:
+ * \code
+    n = py_pjsua.handle_events(msec_timeout)
+ * \endcode
+ */
+PJ_DECL(int) pjsua_handle_events(unsigned msec_timeout);
+
+
+/**
+ * Create memory pool to be used by the application. Once application
+ * finished using the pool, it must be released with pj_pool_release().
+ *
+ * @param name		Optional pool name.
+ * @param init_size	Initial size of the pool.
+ * @param increment	Increment size.
+ *
+ * @return		The pool, or NULL when there's no memory.
+ *
+ * \par Python:
+ * Python script may also create a pool object from the script:
+ * \code
+    pool = py_pjsua.pool_create(name, init_size, increment)
+ * \endcode
+ */
+PJ_DECL(pj_pool_t*) pjsua_pool_create(const char *name, pj_size_t init_size,
+				      pj_size_t increment);
+
+
+/**
+ * Application can call this function at any time (after pjsua_create(), of
+ * course) to change logging settings.
+ *
+ * @param c		Logging configuration.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The function is similar in Python:
+ * \code
+    status = py_pjsua.reconfigure_logging(log_cfg)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_reconfigure_logging(const pjsua_logging_config *c);
+
+
+/**
+ * Internal function to get SIP endpoint instance of pjsua, which is
+ * needed for example to register module, create transports, etc.
+ * Only valid after #pjsua_init() is called.
+ * 
+ * @return		SIP endpoint instance.
+ *
+ * \par Python:
+ * Application may retrieve the SIP endpoint instance:
+ * \code
+    endpt = py_pjsua.get_pjsip_endpt()
+ * \endcode
+ * However currently the object is just an opaque object and does not have
+ * any use for Python scripts.
+ */
+PJ_DECL(pjsip_endpoint*) pjsua_get_pjsip_endpt(void);
+
+/**
+ * Internal function to get media endpoint instance.
+ * Only valid after #pjsua_init() is called.
+ *
+ * @return		Media endpoint instance.
+ *
+ * \par Python:
+ * Application may retrieve the media endpoint instance:
+ * \code
+    endpt = py_pjsua.get_pjmedia_endpt()
+ * \endcode
+ * However currently the object is just an opaque object and does not have
+ * any use for Python scripts.
+ */
+PJ_DECL(pjmedia_endpt*) pjsua_get_pjmedia_endpt(void);
+
+/**
+ * Internal function to get PJSUA pool factory.
+ * Only valid after #pjsua_create() is called.
+ *
+ * @return		Pool factory currently used by PJSUA.
+ *
+ * \par Python:
+ * Application may retrieve the pool factory instance:
+ * \code
+    endpt = py_pjsua.get_pool_factory()
+ * \endcode
+ * However currently the object is just an opaque object and does not have
+ * any use for Python scripts.
+ */
+PJ_DECL(pj_pool_factory*) pjsua_get_pool_factory(void);
+
+
+
+/*****************************************************************************
+ * Utilities.
+ *
+ */
+
+/**
+ * This is a utility function to verify that valid SIP url is given. If the
+ * URL is valid, PJ_SUCCESS will be returned.
+ *
+ * @param url		The URL, as NULL terminated string.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.verify_sip_url(url)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_verify_sip_url(const char *url);
+
+
+/**
+ * This is a utility function to display error message for the specified 
+ * error code. The error message will be sent to the log.
+ *
+ * @param sender	The log sender field.
+ * @param title		Message title for the error.
+ * @param status	Status code.
+ *
+ * \par Python:
+ * \code
+    py_pjsua.perror(sender, title, status)
+ * \endcode
+ */
+PJ_DECL(void) pjsua_perror(const char *sender, const char *title, 
+			   pj_status_t status);
+
+
+/**
+ * This is a utility function to dump the stack states to log, using
+ * verbosity level 3.
+ *
+ * @param detail	Will print detailed output (such as list of
+ *			SIP transactions) when non-zero.
+ */
+PJ_DECL(void) pjsua_dump(pj_bool_t detail);
+
+/**
+ * @}
+ */
+
+
+
+/*****************************************************************************
+ * TRANSPORT API
+ */
+
+/**
+ * @defgroup PJSUA_LIB_TRANSPORT PJSUA-API Signaling Transport
+ * @ingroup PJSUA_LIB
+ * @brief API for managing SIP transports
+ * @{
+ *
+ * PJSUA-API supports creating multiple transport instances, for example UDP,
+ * TCP, and TLS transport. SIP transport must be created before adding an 
+ * account.
+ */
+
+
+/** SIP transport identification.
+ */
+typedef int pjsua_transport_id;
+
+
+/**
+ * Transport configuration for creating transports for both SIP
+ * and media. Before setting some values to this structure, application
+ * MUST call #pjsua_transport_config_default() to initialize its
+ * values with default settings.
+ *
+ * \par Python:
+ * The data type in Python is <tt>py_pjsua.Transport_Config</tt>,
+ * although application can just do this to create the instance:
+ * \code
+    transport_cfg = py_pjsua.transport_config_default()
+ * \endcode
+ */
+typedef struct pjsua_transport_config
+{
+    /**
+     * UDP port number to bind locally. This setting MUST be specified
+     * even when default port is desired. If the value is zero, the
+     * transport will be bound to any available port, and application
+     * can query the port by querying the transport info.
+     */
+    unsigned		port;
+
+    /**
+     * Optional address to advertise as the address of this transport.
+     * Application can specify any address or hostname for this field,
+     * for example it can point to one of the interface address in the
+     * system, or it can point to the public address of a NAT router
+     * where port mappings have been configured for the application.
+     *
+     * Note: this option can be used for both UDP and TCP as well!
+     */
+    pj_str_t		public_addr;
+
+    /**
+     * Optional address where the socket should be bound to. This option
+     * SHOULD only be used to selectively bind the socket to particular
+     * interface (instead of 0.0.0.0), and SHOULD NOT be used to set the
+     * published address of a transport (the public_addr field should be
+     * used for that purpose).
+     *
+     * Note that unlike public_addr field, the address (or hostname) here 
+     * MUST correspond to the actual interface address in the host, since
+     * this address will be specified as bind() argument.
+     */
+    pj_str_t		bound_addr;
+
+    /**
+     * This specifies TLS settings for TLS transport. It is only be used
+     * when this transport config is being used to create a SIP TLS
+     * transport.
+     */
+    pjsip_tls_setting	tls_setting;
+
+} pjsua_transport_config;
+
+
+/**
+ * Call this function to initialize UDP config with default values.
+ *
+ * @param cfg	    The UDP config to be initialized.
+ *
+ * \par Python:
+ * The corresponding Python function is rather different:
+ * \code
+    transport_cfg = py_pjsua.transport_config_default()
+ * \endcode
+ */
+PJ_INLINE(void) pjsua_transport_config_default(pjsua_transport_config *cfg)
+{
+    pj_bzero(cfg, sizeof(*cfg));
+    pjsip_tls_setting_default(&cfg->tls_setting);
+}
+
+
+/**
+ * Duplicate transport config.
+ *
+ * @param pool		The pool.
+ * @param dst		The destination config.
+ * @param src		The source config.
+ *
+ * \par Python:
+ * Not applicable. One should be able to just copy one variable instance
+ * to another in Python.
+ */
+PJ_INLINE(void) pjsua_transport_config_dup(pj_pool_t *pool,
+					   pjsua_transport_config *dst,
+					   const pjsua_transport_config *src)
+{
+    PJ_UNUSED_ARG(pool);
+    pj_memcpy(dst, src, sizeof(*src));
+}
+
+
+
+/**
+ * This structure describes transport information returned by
+ * #pjsua_transport_get_info() function.
+ *
+ * \par Python:
+ * The corresponding data type in Python is <tt>py_pjsua.Transport_Info</tt>.
+ */
+typedef struct pjsua_transport_info
+{
+    /**
+     * PJSUA transport identification.
+     */
+    pjsua_transport_id	    id;
+
+    /**
+     * Transport type.
+     */
+    pjsip_transport_type_e  type;
+
+    /**
+     * Transport type name.
+     */
+    pj_str_t		    type_name;
+
+    /**
+     * Transport string info/description.
+     */
+    pj_str_t		    info;
+
+    /**
+     * Transport flag (see ##pjsip_transport_flags_e).
+     */
+    unsigned		    flag;
+
+    /**
+     * Local address length.
+     */
+    unsigned		    addr_len;
+
+    /**
+     * Local/bound address.
+     */
+    pj_sockaddr		    local_addr;
+
+    /**
+     * Published address (or transport address name).
+     */
+    pjsip_host_port	    local_name;
+
+    /**
+     * Current number of objects currently referencing this transport.
+     */
+    unsigned		    usage_count;
+
+
+} pjsua_transport_info;
+
+
+/**
+ * Create and start a new SIP transport according to the specified
+ * settings.
+ *
+ * @param type		Transport type.
+ * @param cfg		Transport configuration.
+ * @param p_id		Optional pointer to receive transport ID.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The corresponding Python function returns (status,id) tuple:
+ * \code
+    status, transport_id = py_pjsua.transport_create(type, cfg)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_transport_create(pjsip_transport_type_e type,
+					    const pjsua_transport_config *cfg,
+					    pjsua_transport_id *p_id);
+
+/**
+ * Register transport that has been created by application. This function
+ * is useful if application wants to implement custom SIP transport and use
+ * it with pjsua.
+ *
+ * @param tp		Transport instance.
+ * @param p_id		Optional pointer to receive transport ID.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * Not applicable (for now), because one cannot create a custom transport
+ * from Python script.
+ */
+PJ_DECL(pj_status_t) pjsua_transport_register(pjsip_transport *tp,
+					      pjsua_transport_id *p_id);
+
+
+/**
+ * Enumerate all transports currently created in the system. This function
+ * will return all transport IDs, and application may then call 
+ * #pjsua_transport_get_info() function to retrieve detailed information
+ * about the transport.
+ *
+ * @param id		Array to receive transport ids.
+ * @param count		In input, specifies the maximum number of elements.
+ *			On return, it contains the actual number of elements.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The function returns list of integers representing transport ids:
+ * \code
+    [int] = py_pjsua.enum_transports()
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_enum_transports( pjsua_transport_id id[],
+					    unsigned *count );
+
+
+/**
+ * Get information about transports.
+ *
+ * @param id		Transport ID.
+ * @param info		Pointer to receive transport info.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    transport_info = py_pjsua.transport_get_info(id)
+ * \endcode
+ * The Python function returns None on error.
+ */
+PJ_DECL(pj_status_t) pjsua_transport_get_info(pjsua_transport_id id,
+					      pjsua_transport_info *info);
+
+
+/**
+ * Disable a transport or re-enable it. By default transport is always 
+ * enabled after it is created. Disabling a transport does not necessarily
+ * close the socket, it will only discard incoming messages and prevent
+ * the transport from being used to send outgoing messages.
+ *
+ * @param id		Transport ID.
+ * @param enabled	Non-zero to enable, zero to disable.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.transport_set_enable(id, enabled)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_transport_set_enable(pjsua_transport_id id,
+						pj_bool_t enabled);
+
+
+/**
+ * Close the transport. If transport is forcefully closed, it will be
+ * immediately closed, and any pending transactions that are using the
+ * transport may not terminate properly (it may even crash). Otherwise, 
+ * the system will wait until all transactions are closed while preventing 
+ * new users from using the transport, and will close the transport when 
+ * it is safe to do so.
+ *
+ * @param id		Transport ID.
+ * @param force		Non-zero to immediately close the transport. This
+ *			is not recommended!
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.transport_close(id, force)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_transport_close( pjsua_transport_id id,
+					    pj_bool_t force );
+
+/**
+ * @}
+ */
+
+
+
+
+/*****************************************************************************
+ * ACCOUNT API
+ */
+
+
+/**
+ * @defgroup PJSUA_LIB_ACC PJSUA-API Accounts Management
+ * @ingroup PJSUA_LIB
+ * @brief PJSUA Accounts management
+ * @{
+ *
+ * PJSUA accounts provide identity (or identities) of the user who is currently
+ * using the application. In SIP terms, the identity is used as the <b>From</b>
+ * header in outgoing requests.
+ *
+ * PJSUA-API supports creating and managing multiple accounts. The maximum
+ * number of accounts is limited by a compile time constant
+ * <tt>PJSUA_MAX_ACC</tt>.
+ *
+ * Account may or may not have client registration associated with it.
+ * An account is also associated with <b>route set</b> and some <b>authentication
+ * credentials</b>, which are used when sending SIP request messages using the
+ * account. An account also has presence's <b>online status</b>, which
+ * will be reported to remote peer when they subscribe to the account's
+ * presence, or which is published to a presence server if presence 
+ * publication is enabled for the account.
+ *
+ * At least one account MUST be created in the application. If no user
+ * association is required, application can create a userless account by
+ * calling #pjsua_acc_add_local(). A userless account identifies local endpoint
+ * instead of a particular user, and it correspond with a particular
+ * transport instance.
+ *
+ * Also one account must be set as the <b>default account</b>, which is used as
+ * the account to use when PJSUA fails to match a request with any other
+ * accounts.
+ *
+ * When sending outgoing SIP requests (such as making calls or sending
+ * instant messages), normally PJSUA requires the application to specify
+ * which account to use for the request. If no account is specified,
+ * PJSUA may be able to select the account by matching the destination
+ * domain name, and fall back to default account when no match is found.
+ */
+
+/**
+ * Maximum accounts.
+ */
+#ifndef PJSUA_MAX_ACC
+#   define PJSUA_MAX_ACC	    8
+#endif
+
+
+/**
+ * Default registration interval.
+ */
+#ifndef PJSUA_REG_INTERVAL
+#   define PJSUA_REG_INTERVAL	    55
+#endif
+
+
+/**
+ * Default PUBLISH expiration
+ */
+#ifndef PJSUA_PUBLISH_EXPIRATION
+#   define PJSUA_PUBLISH_EXPIRATION 600
+#endif
+
+
+/**
+ * Default account priority.
+ */
+#ifndef PJSUA_DEFAULT_ACC_PRIORITY
+#   define PJSUA_DEFAULT_ACC_PRIORITY	0
+#endif
+
+
+/**
+ * This structure describes account configuration to be specified when
+ * adding a new account with #pjsua_acc_add(). Application MUST initialize
+ * this structure first by calling #pjsua_acc_config_default().
+ *
+ * \par Python:
+ * The data type in Python is <tt>py_pjsua.Acc_Config</tt>, but normally
+ * application can just use the snippet below to create and initialize
+ * the account config:
+ * \code
+    acc_cfg = py_pjsua.acc_config_default()
+ * \endcode
+ */
+typedef struct pjsua_acc_config
+{
+    /**
+     * Account priority, which is used to control the order of matching
+     * incoming/outgoing requests. The higher the number means the higher
+     * the priority is, and the account will be matched first.
+     */
+    int		    priority;
+
+    /** 
+     * The full SIP URL for the account. The value can take name address or 
+     * URL format, and will look something like "sip:account@serviceprovider".
+     *
+     * This field is mandatory.
+     */
+    pj_str_t	    id;
+
+    /** 
+     * This is the URL to be put in the request URI for the registration,
+     * and will look something like "sip:serviceprovider".
+     *
+     * This field should be specified if registration is desired. If the
+     * value is empty, no account registration will be performed.
+     */
+    pj_str_t	    reg_uri;
+
+    /**
+     * If this flag is set, the presence information of this account will
+     * be PUBLISH-ed to the server where the account belongs.
+     */
+    pj_bool_t	    publish_enabled;
+
+    /** 
+     * Optional URI to be put as Contact for this account. It is recommended
+     * that this field is left empty, so that the value will be calculated
+     * automatically based on the transport address.
+     */
+    pj_str_t	    force_contact;
+
+    /**
+     * Number of proxies in the proxy array below.
+     *
+     * \par Python:
+     * Not applicable, as \a proxy is implemented as list of strings.
+     */
+    unsigned	    proxy_cnt;
+
+    /** 
+     * Optional URI of the proxies to be visited for all outgoing requests 
+     * that are using this account (REGISTER, INVITE, etc). Application need 
+     * to specify these proxies if the service provider requires that requests
+     * destined towards its network should go through certain proxies first
+     * (for example, border controllers).
+     *
+     * These proxies will be put in the route set for this account, with 
+     * maintaining the orders (the first proxy in the array will be visited
+     * first). If global outbound proxies are configured in pjsua_config,
+     * then these account proxies will be placed after the global outbound
+     * proxies in the routeset.
+     *
+     * \par Python:
+     * This will be list of strings.
+     */
+    pj_str_t	    proxy[PJSUA_ACC_MAX_PROXIES];
+
+    /** 
+     * Optional interval for registration, in seconds. If the value is zero, 
+     * default interval will be used (PJSUA_REG_INTERVAL, 55 seconds).
+     */
+    unsigned	    reg_timeout;
+
+    /** 
+     * Number of credentials in the credential array.
+     *
+     * \par Python:
+     * Not applicable, since \a cred_info is a list of credentials.
+     */
+    unsigned	    cred_count;
+
+    /** 
+     * Array of credentials. If registration is desired, normally there should
+     * be at least one credential specified, to successfully authenticate
+     * against the service provider. More credentials can be specified, for
+     * example when the requests are expected to be challenged by the
+     * proxies in the route set.
+     *
+     * \par Python:
+     * This field is a list of credentials.
+     */
+    pjsip_cred_info cred_info[PJSUA_ACC_MAX_PROXIES];
+
+    /**
+     * Optionally bind this account to specific transport. This normally is
+     * not a good idea, as account should be able to send requests using
+     * any available transports according to the destination. But some
+     * application may want to have explicit control over the transport to
+     * use, so in that case it can set this field.
+     *
+     * Default: -1 (PJSUA_INVALID_ID)
+     *
+     * @see pjsua_acc_set_transport()
+     */
+    pjsua_transport_id  transport_id;
+
+} pjsua_acc_config;
+
+
+/**
+ * Call this function to initialize account config with default values.
+ *
+ * @param cfg	    The account config to be initialized.
+ *
+ * \par Python:
+ * In Python, this function both creates and initializes the account
+ * config:
+ * \code
+    acc_cfg = py_pjsua.acc_config_default()
+ * \endcode
+ */
+PJ_INLINE(void) pjsua_acc_config_default(pjsua_acc_config *cfg)
+{
+    pj_bzero(cfg, sizeof(*cfg));
+
+    cfg->reg_timeout = PJSUA_REG_INTERVAL;
+    cfg->transport_id = PJSUA_INVALID_ID;
+}
+
+
+
+/**
+ * Account info. Application can query account info by calling 
+ * #pjsua_acc_get_info().
+ *
+ * \par Python:
+ * The data type in Python is <tt>py_pjsua.Acc_Info</tt>.
+ */
+typedef struct pjsua_acc_info
+{
+    /** 
+     * The account ID. 
+     */
+    pjsua_acc_id	id;
+
+    /**
+     * Flag to indicate whether this is the default account.
+     */
+    pj_bool_t		is_default;
+
+    /** 
+     * Account URI 
+     */
+    pj_str_t		acc_uri;
+
+    /** 
+     * Flag to tell whether this account has registration setting
+     * (reg_uri is not empty).
+     */
+    pj_bool_t		has_registration;
+
+    /**
+     * An up to date expiration interval for account registration session.
+     */
+    int			expires;
+
+    /**
+     * Last registration status code. If status code is zero, the account
+     * is currently not registered. Any other value indicates the SIP
+     * status code of the registration.
+     */
+    pjsip_status_code	status;
+
+    /**
+     * String describing the registration status.
+     */
+    pj_str_t		status_text;
+
+    /**
+     * Presence online status for this account.
+     */
+    pj_bool_t		online_status;
+
+    /**
+     * Buffer that is used internally to store the status text.
+     */
+    char		buf_[PJ_ERR_MSG_SIZE];
+
+} pjsua_acc_info;
+
+
+
+/**
+ * Get number of current accounts.
+ *
+ * @return		Current number of accounts.
+ *
+ * \par Python:
+ * \code
+    count = py_pjsua.acc_get_count()
+ * \endcode
+ */
+PJ_DECL(unsigned) pjsua_acc_get_count(void);
+
+
+/**
+ * Check if the specified account ID is valid.
+ *
+ * @param acc_id	Account ID to check.
+ *
+ * @return		Non-zero if account ID is valid.
+ *
+ * \par Python:
+ * \code
+    is_valid = py_pjsua.acc_is_valid(acc_id)
+ * \endcode
+ */
+PJ_DECL(pj_bool_t) pjsua_acc_is_valid(pjsua_acc_id acc_id);
+
+
+/**
+ * Set default account to be used when incoming and outgoing
+ * requests doesn't match any accounts.
+ *
+ * @param acc_id	The account ID to be used as default.
+ *
+ * @return		PJ_SUCCESS on success.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.acc_set_default(acc_id)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_acc_set_default(pjsua_acc_id acc_id);
+
+
+/**
+ * Get default account to be used when receiving incoming requests (calls),
+ * when the destination of the incoming call doesn't match any other
+ * accounts.
+ *
+ * @return		The default account ID, or PJSUA_INVALID_ID if no
+ *			default account is configured.
+ *
+ * \par Python:
+ * \code
+    acc_id = py_pjsua.acc_get_default()
+ * \endcode
+ */
+PJ_DECL(pjsua_acc_id) pjsua_acc_get_default(void);
+
+
+/**
+ * Add a new account to pjsua. PJSUA must have been initialized (with
+ * #pjsua_init()) before calling this function. If registration is configured
+ * for this account, this function would also start the SIP registration
+ * session with the SIP registrar server. This SIP registration session
+ * will be maintained internally by the library, and application doesn't
+ * need to do anything to maintain the registration session.
+ *
+ *
+ * @param acc_cfg	Account configuration.
+ * @param is_default	If non-zero, this account will be set as the default
+ *			account. The default account will be used when sending
+ *			outgoing requests (e.g. making call) when no account is
+ *			specified, and when receiving incoming requests when the
+ *			request does not match any accounts. It is recommended
+ *			that default account is set to local/LAN account.
+ * @param p_acc_id	Pointer to receive account ID of the new account.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The function returns (status, account_id) tuple:
+ * \code
+    status, account_id = py_pjsua.acc_add(acc_cfg, is_default)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_acc_add(const pjsua_acc_config *acc_cfg,
+				   pj_bool_t is_default,
+				   pjsua_acc_id *p_acc_id);
+
+
+/**
+ * Add a local account. A local account is used to identify local endpoint
+ * instead of a specific user, and for this reason, a transport ID is needed
+ * to obtain the local address information.
+ *
+ * @param tid		Transport ID to generate account address.
+ * @param is_default	If non-zero, this account will be set as the default
+ *			account. The default account will be used when sending
+ *			outgoing requests (e.g. making call) when no account is
+ *			specified, and when receiving incoming requests when the
+ *			request does not match any accounts. It is recommended
+ *			that default account is set to local/LAN account.
+ * @param p_acc_id	Pointer to receive account ID of the new account.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The function returns (status, account_id) tuple:
+ * \code
+    status, account_id = py_pjsua.acc_add_local(tid, is_default)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_acc_add_local(pjsua_transport_id tid,
+					 pj_bool_t is_default,
+					 pjsua_acc_id *p_acc_id);
+
+/**
+ * Delete an account. This will unregister the account from the SIP server,
+ * if necessary, and terminate server side presence subscriptions associated
+ * with this account.
+ *
+ * @param acc_id	Id of the account to be deleted.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.acc_del(acc_id)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_acc_del(pjsua_acc_id acc_id);
+
+
+/**
+ * Modify account information.
+ *
+ * @param acc_id	Id of the account to be modified.
+ * @param acc_cfg	New account configuration.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.acc_modify(acc_id, acc_cfg)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_acc_modify(pjsua_acc_id acc_id,
+				      const pjsua_acc_config *acc_cfg);
+
+
+/**
+ * Modify account's presence status to be advertised to remote/presence
+ * subscribers. This would trigger the sending of outgoing NOTIFY request
+ * if there are server side presence subscription for this account.
+ *
+ * @param acc_id	The account ID.
+ * @param is_online	True of false.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.acc_set_online_status(acc_id, is_online)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_acc_set_online_status(pjsua_acc_id acc_id,
+						 pj_bool_t is_online);
+
+
+/**
+ * Update registration or perform unregistration. If registration is
+ * configured for this account, then initial SIP REGISTER will be sent
+ * when the account is added with #pjsua_acc_add(). Application normally
+ * only need to call this function if it wants to manually update the
+ * registration or to unregister from the server.
+ *
+ * @param acc_id	The account ID.
+ * @param renew		If renew argument is zero, this will start 
+ *			unregistration process.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.acc_set_registration(acc_id, renew)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_acc_set_registration(pjsua_acc_id acc_id, 
+						pj_bool_t renew);
+
+
+/**
+ * Get information about the specified account.
+ *
+ * @param acc_id	Account identification.
+ * @param info		Pointer to receive account information.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    acc_info = py_pjsua.acc_get_info(acc_id)
+ * \endcode
+ * The function returns None if account ID is not valid.
+ */
+PJ_DECL(pj_status_t) pjsua_acc_get_info(pjsua_acc_id acc_id,
+					pjsua_acc_info *info);
+
+
+/**
+ * Enumerate all account currently active in the library. This will fill
+ * the array with the account Ids, and application can then query the
+ * account information for each id with #pjsua_acc_get_info().
+ *
+ * @see pjsua_acc_enum_info().
+ *
+ * @param ids		Array of account IDs to be initialized.
+ * @param count		In input, specifies the maximum number of elements.
+ *			On return, it contains the actual number of elements.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The function takes no argument and returns list of account Ids:
+ * \code
+  [acc_ids] = py_pjsua.enum_accs()
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_enum_accs(pjsua_acc_id ids[],
+				     unsigned *count );
+
+
+/**
+ * Enumerate account informations.
+ *
+ * @param info		Array of account infos to be initialized.
+ * @param count		In input, specifies the maximum number of elements.
+ *			On return, it contains the actual number of elements.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The function takes no argument and returns list of account infos:
+ * \code
+    [acc_info] = py_pjsua.acc_enum_info()
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_acc_enum_info( pjsua_acc_info info[],
+					  unsigned *count );
+
+
+/**
+ * This is an internal function to find the most appropriate account to
+ * used to reach to the specified URL.
+ *
+ * @param url		The remote URL to reach.
+ *
+ * @return		Account id.
+ *
+ * \par Python:
+ * \code
+    acc_id = py_pjsua.acc_find_for_outgoing(url)
+ * \endcode
+ */
+PJ_DECL(pjsua_acc_id) pjsua_acc_find_for_outgoing(const pj_str_t *url);
+
+
+/**
+ * This is an internal function to find the most appropriate account to be
+ * used to handle incoming calls.
+ *
+ * @param rdata		The incoming request message.
+ *
+ * @return		Account id.
+ *
+ * \par Python:
+ * \code
+    acc_id = py_pjsua.acc_find_for_outgoing(url)
+ * \endcode
+ */
+PJ_DECL(pjsua_acc_id) pjsua_acc_find_for_incoming(pjsip_rx_data *rdata);
+
+
+/**
+ * Create arbitrary requests using the account. Application should only use
+ * this function to create auxiliary requests outside dialog, such as
+ * OPTIONS, and use the call or presence API to create dialog related
+ * requests.
+ *
+ * @param acc_id	The account ID.
+ * @param method	The SIP method of the request.
+ * @param target	Target URI.
+ * @param p_tdata	Pointer to receive the request.
+ *
+ * @return		PJ_SUCCESS or the error code.
+ */
+PJ_DECL(pj_status_t) pjsua_acc_create_request(pjsua_acc_id acc_id,
+					      const pjsip_method *method,
+					      const pj_str_t *target,
+					      pjsip_tx_data **p_tdata);
+
+
+/**
+ * Create a suitable URI to be put as Contact based on the specified
+ * target URI for the specified account.
+ *
+ * @param pool		Pool to allocate memory for the string.
+ * @param contact	The string where the Contact URI will be stored.
+ * @param acc_id	Account ID.
+ * @param uri		Destination URI of the request.
+ *
+ * @return		PJ_SUCCESS on success, other on error.
+ *
+ * \par Python:
+ * This function is still experimental in Python:
+ * \code
+    uri = py_pjsua.acc_create_uac_contact(pool, acc_id, uri)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_acc_create_uac_contact( pj_pool_t *pool,
+						   pj_str_t *contact,
+						   pjsua_acc_id acc_id,
+						   const pj_str_t *uri);
+							   
+
+
+/**
+ * Create a suitable URI to be put as Contact based on the information
+ * in the incoming request.
+ *
+ * @param pool		Pool to allocate memory for the string.
+ * @param contact	The string where the Contact URI will be stored.
+ * @param acc_id	Account ID.
+ * @param rdata		Incoming request.
+ *
+ * @return		PJ_SUCCESS on success, other on error.
+ *
+ * \par Python:
+ * This function is still experimental in Python:
+ * \code
+    uri = py_pjsua.acc_create_uas_contact(pool, acc_id, rdata)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_acc_create_uas_contact( pj_pool_t *pool,
+						   pj_str_t *contact,
+						   pjsua_acc_id acc_id,
+						   pjsip_rx_data *rdata );
+							   
+
+/**
+ * Lock/bind this account to a specific transport/listener. Normally
+ * application shouldn't need to do this, as transports will be selected
+ * automatically by the stack according to the destination.
+ *
+ * When account is locked/bound to a specific transport, all outgoing
+ * requests from this account will use the specified transport (this
+ * includes SIP registration, dialog (call and event subscription), and
+ * out-of-dialog requests such as MESSAGE).
+ *
+ * Note that transport_id may be specified in pjsua_acc_config too.
+ *
+ * @param acc_id	The account ID.
+ * @param tp_id		The transport ID.
+ *
+ * @return		PJ_SUCCESS on success.
+ *
+ * \par Python:
+ * Not yet implemented.
+ */
+PJ_DECL(pj_status_t) pjsua_acc_set_transport(pjsua_acc_id acc_id,
+					     pjsua_transport_id tp_id);
+
+
+/**
+ * @}
+ */
+
+
+/*****************************************************************************
+ * CALLS API
+ */
+
+
+/**
+ * @defgroup PJSUA_LIB_CALL PJSUA-API Calls Management
+ * @ingroup PJSUA_LIB
+ * @brief Call manipulation.
+ * @{
+ */
+
+/**
+ * Maximum simultaneous calls.
+ */
+#ifndef PJSUA_MAX_CALLS
+#   define PJSUA_MAX_CALLS	    32
+#endif
+
+
+
+/**
+ * This enumeration specifies the media status of a call, and it's part
+ * of pjsua_call_info structure.
+ */
+typedef enum pjsua_call_media_status
+{
+    /** Call currently has no media */
+    PJSUA_CALL_MEDIA_NONE,
+
+    /** The media is active */
+    PJSUA_CALL_MEDIA_ACTIVE,
+
+    /** The media is currently put on hold by local endpoint */
+    PJSUA_CALL_MEDIA_LOCAL_HOLD,
+
+    /** The media is currently put on hold by remote endpoint */
+    PJSUA_CALL_MEDIA_REMOTE_HOLD,
+
+} pjsua_call_media_status;
+
+
+/**
+ * This structure describes the information and current status of a call.
+ *
+ * \par Python:
+ * The type name is <tt>py_pjsua.Call_Info</tt>.
+ */
+typedef struct pjsua_call_info
+{
+    /** Call identification. */
+    pjsua_call_id	id;
+
+    /** Initial call role (UAC == caller) */
+    pjsip_role_e	role;
+
+    /** The account ID where this call belongs. */
+    pjsua_acc_id	acc_id;
+
+    /** Local URI */
+    pj_str_t		local_info;
+
+    /** Local Contact */
+    pj_str_t		local_contact;
+
+    /** Remote URI */
+    pj_str_t		remote_info;
+
+    /** Remote contact */
+    pj_str_t		remote_contact;
+
+    /** Dialog Call-ID string. */
+    pj_str_t		call_id;
+
+    /** Call state */
+    pjsip_inv_state	state;
+
+    /** Text describing the state */
+    pj_str_t		state_text;
+
+    /** Last status code heard, which can be used as cause code */
+    pjsip_status_code	last_status;
+
+    /** The reason phrase describing the status. */
+    pj_str_t		last_status_text;
+
+    /** Call media status. */
+    pjsua_call_media_status media_status;
+
+    /** Media direction */
+    pjmedia_dir		media_dir;
+
+    /** The conference port number for the call */
+    pjsua_conf_port_id	conf_slot;
+
+    /** Up-to-date call connected duration (zero when call is not 
+     *  established)
+     */
+    pj_time_val		connect_duration;
+
+    /** Total call duration, including set-up time */
+    pj_time_val		total_duration;
+
+    /** Internal */
+    struct {
+	char	local_info[128];
+	char	local_contact[128];
+	char	remote_info[128];
+	char	remote_contact[128];
+	char	call_id[128];
+	char	last_status_text[128];
+    } buf_;
+
+} pjsua_call_info;
+
+
+
+/**
+ * Get maximum number of calls configured in pjsua.
+ *
+ * @return		Maximum number of calls configured.
+ *
+ * \par Python:
+ * \code
+    count = py_pjsua.call_get_max_count()
+ * \endcode
+ */
+PJ_DECL(unsigned) pjsua_call_get_max_count(void);
+
+/**
+ * Get number of currently active calls.
+ *
+ * @return		Number of currently active calls.
+ *
+ * \par Python:
+ * \code
+    count = py_pjsua.call_get_count()
+ * \endcode
+ */
+PJ_DECL(unsigned) pjsua_call_get_count(void);
+
+/**
+ * Enumerate all active calls. Application may then query the information and
+ * state of each call by calling #pjsua_call_get_info().
+ *
+ * @param ids		Array of account IDs to be initialized.
+ * @param count		In input, specifies the maximum number of elements.
+ *			On return, it contains the actual number of elements.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * This function takes no argument and return list of call Ids.
+ * \code
+    [call_ids] = py_pjsua.enum_calls()
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_enum_calls(pjsua_call_id ids[],
+				      unsigned *count);
+
+
+/**
+ * Make outgoing call to the specified URI using the specified account.
+ *
+ * @param acc_id	The account to be used.
+ * @param dst_uri	URI to be put in the To header (normally is the same
+ *			as the target URI).
+ * @param options	Options (must be zero at the moment).
+ * @param user_data	Arbitrary user data to be attached to the call, and
+ *			can be retrieved later.
+ * @param msg_data	Optional headers etc to be added to outgoing INVITE
+ *			request, or NULL if no custom header is desired.
+ * @param p_call_id	Pointer to receive call identification.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The Python function returns (status, call_id) tuple:
+ * \code
+    status, call_id = py_pjsua.call_make_call(acc_id, dst_uri, options, 
+					      user_data, msg_data)
+ * \endcode
+ * Note: the \a user_data in Python function is an integer, and the 
+ * \a msg_data can be set to None if not required.
+ */
+PJ_DECL(pj_status_t) pjsua_call_make_call(pjsua_acc_id acc_id,
+					  const pj_str_t *dst_uri,
+					  unsigned options,
+					  void *user_data,
+					  const pjsua_msg_data *msg_data,
+					  pjsua_call_id *p_call_id);
+
+
+/**
+ * Check if the specified call has active INVITE session and the INVITE
+ * session has not been disconnected.
+ *
+ * @param call_id	Call identification.
+ *
+ * @return		Non-zero if call is active.
+ *
+ * \par Python:
+ * \code
+    bool = py_pjsua.call_is_active(call_id)
+ * \endcode
+ */
+PJ_DECL(pj_bool_t) pjsua_call_is_active(pjsua_call_id call_id);
+
+
+/**
+ * Check if call has an active media session.
+ *
+ * @param call_id	Call identification.
+ *
+ * @return		Non-zero if yes.
+ *
+ * \par Python:
+ * \code
+    bool = py_pjsua.call_has_media(call_id)
+ * \endcode
+ */
+PJ_DECL(pj_bool_t) pjsua_call_has_media(pjsua_call_id call_id);
+
+
+/**
+ * Get the conference port identification associated with the call.
+ *
+ * @param call_id	Call identification.
+ *
+ * @return		Conference port ID, or PJSUA_INVALID_ID when the 
+ *			media has not been established or is not active.
+ *
+ * \par Python:
+ * \code
+    slot = py_pjsua.call_get_conf_port(call_id)
+ * \endcode
+ */
+PJ_DECL(pjsua_conf_port_id) pjsua_call_get_conf_port(pjsua_call_id call_id);
+
+/**
+ * Obtain detail information about the specified call.
+ *
+ * @param call_id	Call identification.
+ * @param info		Call info to be initialized.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    call_info = py_pjsua.call_get_info(call_id)
+ * \endcode
+ * \a call_info return value will be set to None if call_id is not valid.
+ */
+PJ_DECL(pj_status_t) pjsua_call_get_info(pjsua_call_id call_id,
+					 pjsua_call_info *info);
+
+
+/**
+ * Attach application specific data to the call. Application can then
+ * inspect this data by calling #pjsua_call_get_user_data().
+ *
+ * @param call_id	Call identification.
+ * @param user_data	Arbitrary data to be attached to the call.
+ *
+ * @return		The user data.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.call_set_user_data(call_id, user_data)
+ * \endcode
+ * The \a user_data is an integer in the Python function.
+ */
+PJ_DECL(pj_status_t) pjsua_call_set_user_data(pjsua_call_id call_id,
+					      void *user_data);
+
+
+/**
+ * Get user data attached to the call, which has been previously set with
+ * #pjsua_call_set_user_data().
+ *
+ * @param call_id	Call identification.
+ *
+ * @return		The user data.
+ *
+ * \par Python:
+ * \code
+    user_data = py_pjsua.call_get_user_data(call_id)
+ * \endcode
+ * The \a user_data is an integer.
+ */
+PJ_DECL(void*) pjsua_call_get_user_data(pjsua_call_id call_id);
+
+
+/**
+ * Send response to incoming INVITE request. Depending on the status
+ * code specified as parameter, this function may send provisional
+ * response, establish the call, or terminate the call.
+ *
+ * @param call_id	Incoming call identification.
+ * @param code		Status code, (100-699).
+ * @param reason	Optional reason phrase. If NULL, default text
+ *			will be used.
+ * @param msg_data	Optional list of headers etc to be added to outgoing
+ *			response message.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.call_answer(call_id, code, reason, msg_data)
+ * \endcode
+ * Arguments \a reason and \a msg_data may be set to None if not required.
+ */
+PJ_DECL(pj_status_t) pjsua_call_answer(pjsua_call_id call_id, 
+				       unsigned code,
+				       const pj_str_t *reason,
+				       const pjsua_msg_data *msg_data);
+
+/**
+ * Hangup call by using method that is appropriate according to the
+ * call state. This function is different than answering the call with
+ * 3xx-6xx response (with #pjsua_call_answer()), in that this function
+ * will hangup the call regardless of the state and role of the call,
+ * while #pjsua_call_answer() only works with incoming calls on EARLY
+ * state.
+ *
+ * @param call_id	Call identification.
+ * @param code		Optional status code to be sent when we're rejecting
+ *			incoming call. If the value is zero, "603/Decline"
+ *			will be sent.
+ * @param reason	Optional reason phrase to be sent when we're rejecting
+ *			incoming call.  If NULL, default text will be used.
+ * @param msg_data	Optional list of headers etc to be added to outgoing
+ *			request/response message.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.call_hangup(call_id, code, reason, msg_data)
+ * \endcode
+ * Arguments \a reason and \a msg_data may be set to None if not required.
+ */
+PJ_DECL(pj_status_t) pjsua_call_hangup(pjsua_call_id call_id,
+				       unsigned code,
+				       const pj_str_t *reason,
+				       const pjsua_msg_data *msg_data);
+
+
+/**
+ * Put the specified call on hold. This will send re-INVITE with the
+ * appropriate SDP to inform remote that the call is being put on hold.
+ * The final status of the request itself will be reported on the
+ * \a on_call_media_state() callback, which inform the application that
+ * the media state of the call has changed.
+ *
+ * @param call_id	Call identification.
+ * @param msg_data	Optional message components to be sent with
+ *			the request.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.call_set_hold(call_id, msg_data)
+ * \endcode
+ * Argument \a msg_data may be set to None if not required.
+ */
+PJ_DECL(pj_status_t) pjsua_call_set_hold(pjsua_call_id call_id,
+					 const pjsua_msg_data *msg_data);
+
+
+/**
+ * Send re-INVITE to release hold.
+ * The final status of the request itself will be reported on the
+ * \a on_call_media_state() callback, which inform the application that
+ * the media state of the call has changed.
+ *
+ * @param call_id	Call identification.
+ * @param unhold	If this argument is non-zero and the call is locally
+ *			held, this will release the local hold.
+ * @param msg_data	Optional message components to be sent with
+ *			the request.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.call_reinvite(call_id, unhold, msg_data)
+ * \endcode
+ * Argument \a msg_data may be set to None if not required.
+ */
+PJ_DECL(pj_status_t) pjsua_call_reinvite(pjsua_call_id call_id,
+					 pj_bool_t unhold,
+					 const pjsua_msg_data *msg_data);
+
+
+/**
+ * Initiate call transfer to the specified address. This function will send
+ * REFER request to instruct remote call party to initiate a new INVITE
+ * session to the specified destination/target.
+ *
+ * If application is interested to monitor the successfulness and 
+ * the progress of the transfer request, it can implement 
+ * \a on_call_transfer_status() callback which will report the progress
+ * of the call transfer request.
+ *
+ * @param call_id	The call id to be transfered.
+ * @param dest		Address of new target to be contacted.
+ * @param msg_data	Optional message components to be sent with
+ *			the request.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.call_xfer(call_id, dest, msg_data)
+ * \endcode
+ * Argument \a msg_data may be set to None if not required.
+ */
+PJ_DECL(pj_status_t) pjsua_call_xfer(pjsua_call_id call_id, 
+				     const pj_str_t *dest,
+				     const pjsua_msg_data *msg_data);
+
+/**
+ * Flag to indicate that "Require: replaces" should not be put in the
+ * outgoing INVITE request caused by REFER request created by 
+ * #pjsua_call_xfer_replaces().
+ */
+#define PJSUA_XFER_NO_REQUIRE_REPLACES	1
+
+/**
+ * Initiate attended call transfer. This function will send REFER request
+ * to instruct remote call party to initiate new INVITE session to the URL
+ * of \a dest_call_id. The party at \a dest_call_id then should "replace"
+ * the call with us with the new call from the REFER recipient.
+ *
+ * @param call_id	The call id to be transfered.
+ * @param dest_call_id	The call id to be replaced.
+ * @param options	Application may specify PJSUA_XFER_NO_REQUIRE_REPLACES
+ *			to suppress the inclusion of "Require: replaces" in
+ *			the outgoing INVITE request created by the REFER
+ *			request.
+ * @param msg_data	Optional message components to be sent with
+ *			the request.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.call_xfer_replaces(call_id, dest_call_id, options, msg_data)
+ * \endcode
+ * Argument \a msg_data may be set to None if not required.
+ */
+PJ_DECL(pj_status_t) pjsua_call_xfer_replaces(pjsua_call_id call_id, 
+					      pjsua_call_id dest_call_id,
+					      unsigned options,
+					      const pjsua_msg_data *msg_data);
+
+/**
+ * Send DTMF digits to remote using RFC 2833 payload formats.
+ *
+ * @param call_id	Call identification.
+ * @param digits	DTMF string digits to be sent.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.call_dial_dtmf(call_id, digits)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_call_dial_dtmf(pjsua_call_id call_id, 
+					  const pj_str_t *digits);
+
+/**
+ * Send instant messaging inside INVITE session.
+ *
+ * @param call_id	Call identification.
+ * @param mime_type	Optional MIME type. If NULL, then "text/plain" is 
+ *			assumed.
+ * @param content	The message content.
+ * @param msg_data	Optional list of headers etc to be included in outgoing
+ *			request. The body descriptor in the msg_data is 
+ *			ignored.
+ * @param user_data	Optional user data, which will be given back when
+ *			the IM callback is called.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.call_send_im(call_id, mime_type, content, msg_data, user_data)
+ * \endcode
+ * Note that the \a user_data argument is an integer in Python.
+ */
+PJ_DECL(pj_status_t) pjsua_call_send_im( pjsua_call_id call_id, 
+					 const pj_str_t *mime_type,
+					 const pj_str_t *content,
+					 const pjsua_msg_data *msg_data,
+					 void *user_data);
+
+
+/**
+ * Send IM typing indication inside INVITE session.
+ *
+ * @param call_id	Call identification.
+ * @param is_typing	Non-zero to indicate to remote that local person is
+ *			currently typing an IM.
+ * @param msg_data	Optional list of headers etc to be included in outgoing
+ *			request.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.call_send_typing_ind(call_id, is_typing, msg_data)
+ * \endcode
+ * Argument \a msg_data may be set to None if not required.
+ */
+PJ_DECL(pj_status_t) pjsua_call_send_typing_ind(pjsua_call_id call_id, 
+						pj_bool_t is_typing,
+						const pjsua_msg_data*msg_data);
+
+/**
+ * Terminate all calls. This will initiate #pjsua_call_hangup() for all
+ * currently active calls. 
+ *
+ * \par Python:
+ * \code
+    py_pjsua.call_hangup_all()
+ * \endcode
+ */
+PJ_DECL(void) pjsua_call_hangup_all(void);
+
+
+/**
+ * Dump call and media statistics to string.
+ *
+ * @param call_id	Call identification.
+ * @param with_media	Non-zero to include media information too.
+ * @param buffer	Buffer where the statistics are to be written to.
+ * @param maxlen	Maximum length of buffer.
+ * @param indent	Spaces for left indentation.
+ *
+ * @return		PJ_SUCCESS on success.
+ *
+ * \par Python:
+ * \code
+    string = py_pjsua.call_dump(call_id, with_media, max_len, indent)
+ * \endcode
+ * The \a max_len argument is the desired maximum length to be allocated.
+ */
+PJ_DECL(pj_status_t) pjsua_call_dump(pjsua_call_id call_id, 
+				     pj_bool_t with_media, 
+				     char *buffer, 
+				     unsigned maxlen,
+				     const char *indent);
+
+/**
+ * @}
+ */
+
+
+/*****************************************************************************
+ * BUDDY API
+ */
+
+
+/**
+ * @defgroup PJSUA_LIB_BUDDY PJSUA-API Buddy, Presence, and Instant Messaging
+ * @ingroup PJSUA_LIB
+ * @brief Buddy management, buddy's presence, and instant messaging.
+ * @{
+ *
+ * This section describes PJSUA-APIs related to buddies management,
+ * presence management, and instant messaging.
+ */
+
+/**
+ * Max buddies in buddy list.
+ */
+#ifndef PJSUA_MAX_BUDDIES
+#   define PJSUA_MAX_BUDDIES	    256
+#endif
+
+
+/**
+ * This structure describes buddy configuration when adding a buddy to
+ * the buddy list with #pjsua_buddy_add(). Application MUST initialize
+ * the structure with #pjsua_buddy_config_default() to initialize this
+ * structure with default configuration.
+ *
+ * \par Python:
+ * In Python this structure is <tt>py_pjsua.Buddy_Config</tt>. However
+ * it is recommended that application instantiates the buddy config
+ * by calling:
+ * \code
+    buddy_cfg = py_pjsua.buddy_config_default()
+ * \endcode
+ */
+typedef struct pjsua_buddy_config
+{
+    /**
+     * Buddy URL or name address.
+     */
+    pj_str_t	uri;
+
+    /**
+     * Specify whether presence subscription should start immediately.
+     */
+    pj_bool_t	subscribe;
+
+} pjsua_buddy_config;
+
+
+/**
+ * This enumeration describes basic buddy's online status.
+ */
+typedef enum pjsua_buddy_status
+{
+    /**
+     * Online status is unknown (possibly because no presence subscription
+     * has been established).
+     */
+    PJSUA_BUDDY_STATUS_UNKNOWN,
+
+    /**
+     * Buddy is known to be online.
+     */
+    PJSUA_BUDDY_STATUS_ONLINE,
+
+    /**
+     * Buddy is offline.
+     */
+    PJSUA_BUDDY_STATUS_OFFLINE,
+
+} pjsua_buddy_status;
+
+
+
+/**
+ * This structure describes buddy info, which can be retrieved by calling
+ * #pjsua_buddy_get_info().
+ *
+ * \par Python:
+ * This structure in Python is <tt>py_pjsua.Buddy_Info</tt>.
+ */
+typedef struct pjsua_buddy_info
+{
+    /**
+     * The buddy ID.
+     */
+    pjsua_buddy_id	id;
+
+    /**
+     * The full URI of the buddy, as specified in the configuration.
+     */
+    pj_str_t		uri;
+
+    /**
+     * Buddy's Contact, only available when presence subscription has
+     * been established to the buddy.
+     */
+    pj_str_t		contact;
+
+    /**
+     * Buddy's online status.
+     */
+    pjsua_buddy_status	status;
+
+    /**
+     * Text to describe buddy's online status.
+     */
+    pj_str_t		status_text;
+
+    /**
+     * Flag to indicate that we should monitor the presence information for
+     * this buddy (normally yes, unless explicitly disabled).
+     */
+    pj_bool_t		monitor_pres;
+
+    /**
+     * Internal buffer.
+     */
+    char		buf_[256];
+
+} pjsua_buddy_info;
+
+
+/**
+ * Set default values to the buddy config.
+ *
+ * \par Python:
+ * \code
+    buddy_cfg = py_pjsua.buddy_config_default()
+ * \endcode
+ */
+PJ_INLINE(void) pjsua_buddy_config_default(pjsua_buddy_config *cfg)
+{
+    pj_bzero(cfg, sizeof(*cfg));
+}
+
+
+/**
+ * Get total number of buddies.
+ *
+ * @return		Number of buddies.
+ *
+ * \par Python:
+ * \code
+    buddy_count = py_pjsua.get_buddy_count()
+ * \endcode
+ */
+PJ_DECL(unsigned) pjsua_get_buddy_count(void);
+
+
+/**
+ * Check if buddy ID is valid.
+ *
+ * @param buddy_id	Buddy ID to check.
+ *
+ * @return		Non-zero if buddy ID is valid.
+ *
+ * \par Python:
+ * \code
+    is_valid = py_pjsua.buddy_is_valid(buddy_id)
+ * \endcode
+ */
+PJ_DECL(pj_bool_t) pjsua_buddy_is_valid(pjsua_buddy_id buddy_id);
+
+
+/**
+ * Enumerate all buddy IDs in the buddy list. Application then can use
+ * #pjsua_buddy_get_info() to get the detail information for each buddy
+ * id.
+ *
+ * @param ids		Array of ids to be initialized.
+ * @param count		On input, specifies max elements in the array.
+ *			On return, it contains actual number of elements
+ *			that have been initialized.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The Python function takes no argument and returns list of buddy IDs:
+ * \code
+    [buddy_ids] = py_pjsua.enum_buddies()
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_enum_buddies(pjsua_buddy_id ids[],
+					unsigned *count);
+
+/**
+ * Get detailed buddy info.
+ *
+ * @param buddy_id	The buddy identification.
+ * @param info		Pointer to receive information about buddy.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    buddy_info = py_pjsua.buddy_get_info(buddy_id)
+ * \endcode
+ * The function returns None if buddy_id is not valid.
+ */
+PJ_DECL(pj_status_t) pjsua_buddy_get_info(pjsua_buddy_id buddy_id,
+					  pjsua_buddy_info *info);
+
+/**
+ * Add new buddy to the buddy list. If presence subscription is enabled
+ * for this buddy, this function will also start the presence subscription
+ * session immediately.
+ *
+ * @param buddy)cfg	Buddy configuration.
+ * @param p_buddy_id	Pointer to receive buddy ID.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The function returns (status, buddy_id) tuple:
+ * \code
+    status, buddy_id = py_pjsua.buddy_add(buddy_cfg)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_buddy_add(const pjsua_buddy_config *buddy_cfg,
+				     pjsua_buddy_id *p_buddy_id);
+
+
+/**
+ * Delete the specified buddy from the buddy list. Any presence subscription
+ * to this buddy will be terminated.
+ *
+ * @param buddy_id	Buddy identification.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.buddy_del(buddy_id)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_buddy_del(pjsua_buddy_id buddy_id);
+
+
+/**
+ * Enable/disable buddy's presence monitoring. Once buddy's presence is
+ * subscribed, application will be informed about buddy's presence status
+ * changed via \a on_buddy_state() callback.
+ *
+ * @param buddy_id	Buddy identification.
+ * @param subscribe	Specify non-zero to activate presence subscription to
+ *			the specified buddy.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.buddy_subscribe_pres(buddy_id, subscribe)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_buddy_subscribe_pres(pjsua_buddy_id buddy_id,
+						pj_bool_t subscribe);
+
+
+/**
+ * Dump presence subscriptions to log.
+ *
+ * @param verbose	Yes or no.
+ *
+ * \par Python:
+ * \code
+    py_pjsua.pres_dump()
+ * \endcode
+ */
+PJ_DECL(void) pjsua_pres_dump(pj_bool_t verbose);
+
+
+/**
+ * The MESSAGE method (defined in pjsua_im.c)
+ */
+extern const pjsip_method pjsip_message_method;
+
+
+
+/**
+ * Send instant messaging outside dialog, using the specified account for
+ * route set and authentication.
+ *
+ * @param acc_id	Account ID to be used to send the request.
+ * @param to		Remote URI.
+ * @param mime_type	Optional MIME type. If NULL, then "text/plain" is 
+ *			assumed.
+ * @param content	The message content.
+ * @param msg_data	Optional list of headers etc to be included in outgoing
+ *			request. The body descriptor in the msg_data is 
+ *			ignored.
+ * @param user_data	Optional user data, which will be given back when
+ *			the IM callback is called.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.im_send(acc_id, to, mime_type, content, msg_data, user_data)
+ * \endcode
+ * Arguments \a mime_type and \a msg_data may be set to None if not required.
+ */
+PJ_DECL(pj_status_t) pjsua_im_send(pjsua_acc_id acc_id, 
+				   const pj_str_t *to,
+				   const pj_str_t *mime_type,
+				   const pj_str_t *content,
+				   const pjsua_msg_data *msg_data,
+				   void *user_data);
+
+
+/**
+ * Send typing indication outside dialog.
+ *
+ * @param acc_id	Account ID to be used to send the request.
+ * @param to		Remote URI.
+ * @param is_typing	If non-zero, it tells remote person that local person
+ *			is currently composing an IM.
+ * @param msg_data	Optional list of headers etc to be added to outgoing
+ *			request.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.im_typing(acc_id, to, is_typing, msg_data)
+ * \endcode
+ * Argument \a msg_data may be set to None if not requried.
+ */
+PJ_DECL(pj_status_t) pjsua_im_typing(pjsua_acc_id acc_id, 
+				     const pj_str_t *to, 
+				     pj_bool_t is_typing,
+				     const pjsua_msg_data *msg_data);
+
+
+
+/**
+ * @}
+ */
+
+
+/*****************************************************************************
+ * MEDIA API
+ */
+
+
+/**
+ * @defgroup PJSUA_LIB_MEDIA PJSUA-API Media Manipulation
+ * @ingroup PJSUA_LIB
+ * @brief Media manipulation.
+ * @{
+ *
+ * PJSUA has rather powerful media features, which are built around the
+ * PJMEDIA conference bridge. Basically, all media "ports" (such as calls, WAV 
+ * players, WAV playlist, file recorders, sound device, tone generators, etc)
+ * are terminated in the conference bridge, and application can manipulate
+ * the interconnection between these terminations freely. 
+ *
+ * The conference bridge provides powerful switching and mixing functionality
+ * for application. With the conference bridge, each conference slot (e.g. 
+ * a call) can transmit to multiple destinations, and one destination can
+ * receive from multiple sources. If more than one media terminations are 
+ * terminated in the same slot, the conference bridge will mix the signal 
+ * automatically.
+ *
+ * Application connects one media termination/slot to another by calling
+ * #pjsua_conf_connect() function. This will establish <b>unidirectional</b>
+ * media flow from the source termination to the sink termination. To
+ * establish bidirectional media flow, application wound need to make another
+ * call to #pjsua_conf_connect(), this time inverting the source and 
+ * destination slots in the parameter.
+ *
+ * For example, to stream a WAV file to remote call, application may use
+ * the following steps:
+ *
+ \code
+  
+  pj_status_t stream_to_call( pjsua_call_id call_id )
+  {
+     pjsua_player_id player_id;
+     
+     status = pjsua_player_create("mysong.wav", 0, NULL, &player_id);
+     if (status != PJ_SUCCESS)
+        return status;
+
+     status = pjsua_conf_connect( pjsua_player_get_conf_port(),
+				  pjsua_call_get_conf_port() );
+  }
+ \endcode
+ *
+ *
+ * Other features of PJSUA media:
+ *  - efficient N to M interconnections between media terminations.
+ *  - media termination can be connected to itself to create loopback
+ *    media.
+ *  - the media termination may have different clock rates, and resampling
+ *    will be done automatically by conference bridge.
+ *  - media terminations may also have different frame time; the
+ *    conference bridge will perform the necessary bufferring to adjust
+ *    the difference between terminations.
+ *  - interconnections are removed automatically when media termination
+ *    is removed from the bridge.
+ *  - sound device may be changed even when there are active media 
+ *    interconnections.
+ *  - correctly report call's media quality (in #pjsua_call_dump()) from
+ *    RTCP packet exchange.
+ */
+
+/**
+ * Max ports in the conference bridge.
+ */
+#ifndef PJSUA_MAX_CONF_PORTS
+#   define PJSUA_MAX_CONF_PORTS		254
+#endif
+
+/**
+ * The default clock rate to be used by the conference bridge.
+ */
+#ifndef PJSUA_DEFAULT_CLOCK_RATE
+#   define PJSUA_DEFAULT_CLOCK_RATE	16000
+#endif
+
+/**
+ * Default codec quality settings.
+ */
+#ifndef PJSUA_DEFAULT_CODEC_QUALITY
+#   define PJSUA_DEFAULT_CODEC_QUALITY	5
+#endif
+
+/**
+ * Default iLBC mode.
+ */
+#ifndef PJSUA_DEFAULT_ILBC_MODE
+#   define PJSUA_DEFAULT_ILBC_MODE	20
+#endif
+
+/**
+ * The default echo canceller tail length.
+ */
+#ifndef PJSUA_DEFAULT_EC_TAIL_LEN
+#   define PJSUA_DEFAULT_EC_TAIL_LEN	800
+#endif
+
+
+/**
+ * The maximum file player.
+ */
+#ifndef PJSUA_MAX_PLAYERS
+#   define PJSUA_MAX_PLAYERS		32
+#endif
+
+
+/**
+ * The maximum file player.
+ */
+#ifndef PJSUA_MAX_RECORDERS
+#   define PJSUA_MAX_RECORDERS		32
+#endif
+
+
+/**
+ * This structure describes media configuration, which will be specified
+ * when calling #pjsua_init(). Application MUST initialize this structure
+ * by calling #pjsua_media_config_default().
+ *
+ * \par Python:
+ * This data type in Python is <tt>py_pjsua.Media_Config</tt>. To create
+ * an object of this type, it is recommended to call 
+ * <tt>py_pjsua.media_config_default()</tt> function instead:
+ * \code
+    media_cfg = py_pjsua.media_config_default()
+ * \endcode
+ */
+struct pjsua_media_config
+{
+    /**
+     * Clock rate to be applied to the conference bridge.
+     * If value is zero, default clock rate will be used 
+     * (PJSUA_DEFAULT_CLOCK_RATE, which by default is 16KHz).
+     */
+    unsigned		clock_rate;
+
+    /**
+     * Specify maximum number of media ports to be created in the
+     * conference bridge. Since all media terminate in the bridge
+     * (calls, file player, file recorder, etc), the value must be
+     * large enough to support all of them. However, the larger
+     * the value, the more computations are performed.
+     */
+    unsigned		max_media_ports;
+
+    /**
+     * Specify whether the media manager should manage its own
+     * ioqueue for the RTP/RTCP sockets. If yes, ioqueue will be created
+     * and at least one worker thread will be created too. If no,
+     * the RTP/RTCP sockets will share the same ioqueue as SIP sockets,
+     * and no worker thread is needed.
+     *
+     * Normally application would say yes here, unless it wants to
+     * run everything from a single thread.
+     */
+    pj_bool_t		has_ioqueue;
+
+    /**
+     * Specify the number of worker threads to handle incoming RTP
+     * packets. A value of one is recommended for most applications.
+     */
+    unsigned		thread_cnt;
+
+    /**
+     * Media quality, 0-10, according to this table:
+     *   5-10: resampling use large filter,
+     *   3-4:  resampling use small filter,
+     *   1-2:  resampling use linear.
+     * The media quality also sets speex codec quality/complexity to the
+     * number.
+     *
+     * Default: 5 (PJSUA_DEFAULT_CODEC_QUALITY).
+     */
+    unsigned		quality;
+
+    /**
+     * Specify default ptime.
+     *
+     * Default: 0 (codec specific)
+     */
+    unsigned		ptime;
+
+    /**
+     * Disable VAD?
+     *
+     * Default: 0 (no (meaning VAD is enabled))
+     */
+    pj_bool_t		no_vad;
+
+    /**
+     * iLBC mode (20 or 30).
+     *
+     * Default: 20 (PJSUA_DEFAULT_ILBC_MODE)
+     */
+    unsigned		ilbc_mode;
+
+    /**
+     * Percentage of RTP packet to drop in TX direction
+     * (to simulate packet lost).
+     *
+     * Default: 0
+     */
+    unsigned		tx_drop_pct;
+
+    /**
+     * Percentage of RTP packet to drop in RX direction
+     * (to simulate packet lost).
+     *
+     * Default: 0
+     */
+    unsigned		rx_drop_pct;
+
+    /**
+     * Echo canceller options (see #pjmedia_echo_create())
+     *
+     * Default: 0.
+     */
+    unsigned		ec_options;
+
+    /**
+     * Echo canceller tail length, in miliseconds.
+     *
+     * Default: PJSUA_DEFAULT_EC_TAIL_LEN
+     */
+    unsigned		ec_tail_len;
+
+    /** 
+     * Jitter buffer initial prefetch delay in msec. The value must be
+     * between jb_min_pre and jb_max_pre below.
+     *
+     * Default: -1 (to use default stream settings, currently 150 msec)
+     */
+    int			jb_init;
+
+    /**
+     * Jitter buffer minimum prefetch delay in msec.
+     *
+     * Default: -1 (to use default stream settings, currently 60 msec)
+     */
+    int			jb_min_pre;
+    
+    /**
+     * Jitter buffer maximum prefetch delay in msec.
+     *
+     * Default: -1 (to use default stream settings, currently 240 msec)
+     */
+    int			jb_max_pre;
+
+    /**
+     * Set maximum delay that can be accomodated by the jitter buffer msec.
+     *
+     * Default: -1 (to use default stream settings, currently 360 msec)
+     */
+    int			jb_max;
+
+    /**
+     * Enable ICE
+     */
+    pj_bool_t		enable_ice;
+
+    /**
+     * Enable ICE media relay.
+     */
+    pj_bool_t		enable_relay;
+};
+
+
+/**
+ * Use this function to initialize media config.
+ *
+ * @param cfg	The media config to be initialized.
+ *
+ * \par Python:
+ * \code
+    media_cfg = py_pjsua.media_config_default()
+ * \endcode
+ */
+PJ_INLINE(void) pjsua_media_config_default(pjsua_media_config *cfg)
+{
+    pj_bzero(cfg, sizeof(*cfg));
+
+    cfg->clock_rate = PJSUA_DEFAULT_CLOCK_RATE;
+    cfg->max_media_ports = 32;
+    cfg->has_ioqueue = PJ_TRUE;
+    cfg->thread_cnt = 1;
+    cfg->quality = PJSUA_DEFAULT_CODEC_QUALITY;
+    cfg->ilbc_mode = PJSUA_DEFAULT_ILBC_MODE;
+    cfg->ec_tail_len = PJSUA_DEFAULT_EC_TAIL_LEN;
+    cfg->jb_init = cfg->jb_min_pre = cfg->jb_max_pre = cfg->jb_max = -1;
+}
+
+
+
+/**
+ * This structure describes codec information, which can be retrieved by
+ * calling #pjsua_enum_codecs().
+ */
+typedef struct pjsua_codec_info
+{
+    /**
+     * Codec unique identification.
+     */
+    pj_str_t		codec_id;
+
+    /**
+     * Codec priority (integer 0-255).
+     */
+    pj_uint8_t		priority;
+
+    /**
+     * Internal buffer.
+     */
+    char		buf_[32];
+
+} pjsua_codec_info;
+
+
+/**
+ * This structure descibes information about a particular media port that
+ * has been registered into the conference bridge. Application can query
+ * this info by calling #pjsua_conf_get_port_info().
+ *
+ * \par Python:
+ * In Python, this type is <tt>py_pjsua.Conf_Port_Info</tt>.
+ */
+typedef struct pjsua_conf_port_info
+{
+    /** Conference port number. */
+    pjsua_conf_port_id	slot_id;
+
+    /** Port name. */
+    pj_str_t		name;
+
+    /** Clock rate. */
+    unsigned		clock_rate;
+
+    /** Number of channels. */
+    unsigned		channel_count;
+
+    /** Samples per frame */
+    unsigned		samples_per_frame;
+
+    /** Bits per sample */
+    unsigned		bits_per_sample;
+
+    /** Number of listeners in the array. */
+    unsigned		listener_cnt;
+
+    /** Array of listeners (in other words, ports where this port is 
+     *  transmitting to.
+     */
+    pjsua_conf_port_id	listeners[PJSUA_MAX_CONF_PORTS];
+
+} pjsua_conf_port_info;
+
+
+/**
+ * This structure holds information about custom media transport to
+ * be registered to pjsua.
+ *
+ * \par Python:
+ * Not applicable.
+ */
+typedef struct pjsua_media_transport
+{
+    /**
+     * Media socket information containing the address information
+     * of the RTP and RTCP socket.
+     */
+    pjmedia_sock_info	 skinfo;
+
+    /**
+     * The media transport instance.
+     */
+    pjmedia_transport	*transport;
+
+} pjsua_media_transport;
+
+
+
+
+/**
+ * Get maxinum number of conference ports.
+ *
+ * @return		Maximum number of ports in the conference bridge.
+ *
+ * \par Python:
+ * \code
+    port_count = py_pjsua.conf_get_max_ports()
+ * \endcode
+ */
+PJ_DECL(unsigned) pjsua_conf_get_max_ports(void);
+
+
+/**
+ * Get current number of active ports in the bridge.
+ *
+ * @return		The number.
+ *
+ * \par Python:
+ * \code
+    count = py_pjsua.conf_get_active_ports()
+ * \endcode
+ */
+PJ_DECL(unsigned) pjsua_conf_get_active_ports(void);
+
+
+/**
+ * Enumerate all conference ports.
+ *
+ * @param id		Array of conference port ID to be initialized.
+ * @param count		On input, specifies max elements in the array.
+ *			On return, it contains actual number of elements
+ *			that have been initialized.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The Python functions returns list of conference port Ids:
+ * \code
+    [port_ids] = py_pjsua.enum_conf_ports()
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_enum_conf_ports(pjsua_conf_port_id id[],
+					   unsigned *count);
+
+
+/**
+ * Get information about the specified conference port
+ *
+ * @param port_id	Port identification.
+ * @param info		Pointer to store the port info.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    port_info = py_pjsua.conf_get_port_info(port_id)
+ * \endcode
+ * The function will return None if \a port_id is not valid.
+ */
+PJ_DECL(pj_status_t) pjsua_conf_get_port_info( pjsua_conf_port_id port_id,
+					       pjsua_conf_port_info *info);
+
+
+/**
+ * Add arbitrary media port to PJSUA's conference bridge. Application
+ * can use this function to add the media port that it creates. For
+ * media ports that are created by PJSUA-LIB (such as calls, file player,
+ * or file recorder), PJSUA-LIB will automatically add the port to
+ * the bridge.
+ *
+ * @param pool		Pool to use.
+ * @param port		Media port to be added to the bridge.
+ * @param p_id		Optional pointer to receive the conference 
+ *			slot id.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * Not applicable (for now)
+ */
+PJ_DECL(pj_status_t) pjsua_conf_add_port(pj_pool_t *pool,
+					 pjmedia_port *port,
+					 pjsua_conf_port_id *p_id);
+
+
+/**
+ * Remove arbitrary slot from the conference bridge. Application should only
+ * call this function if it registered the port manually with previous call
+ * to #pjsua_conf_add_port().
+ *
+ * @param port_id	The slot id of the port to be removed.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.conf_remove_port(port_id)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_conf_remove_port(pjsua_conf_port_id port_id);
+
+
+/**
+ * Establish unidirectional media flow from souce to sink. One source
+ * may transmit to multiple destinations/sink. And if multiple
+ * sources are transmitting to the same sink, the media will be mixed
+ * together. Source and sink may refer to the same ID, effectively
+ * looping the media.
+ *
+ * If bidirectional media flow is desired, application needs to call
+ * this function twice, with the second one having the arguments
+ * reversed.
+ *
+ * @param source	Port ID of the source media/transmitter.
+ * @param sink		Port ID of the destination media/received.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.conf_connect(source, sink)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_conf_connect(pjsua_conf_port_id source,
+					pjsua_conf_port_id sink);
+
+
+/**
+ * Disconnect media flow from the source to destination port.
+ *
+ * @param source	Port ID of the source media/transmitter.
+ * @param sink		Port ID of the destination media/received.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.conf_disconnect(source, sink)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_conf_disconnect(pjsua_conf_port_id source,
+					   pjsua_conf_port_id sink);
+
+
+/**
+ * Adjust the signal level to be transmitted from the bridge to the 
+ * specified port by making it louder or quieter.
+ *
+ * @param slot		The conference bridge slot number.
+ * @param level		Signal level adjustment. Value 1.0 means no level
+ *			adjustment, while value 0 means to mute the port.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * Not implemented (yet)
+ */
+PJ_DECL(pj_status_t) pjsua_conf_adjust_tx_level(pjsua_conf_port_id slot,
+						float level);
+
+/**
+ * Adjust the signal level to be received from the specified port (to
+ * the bridge) by making it louder or quieter.
+ *
+ * @param slot		The conference bridge slot number.
+ * @param level		Signal level adjustment. Value 1.0 means no level
+ *			adjustment, while value 0 means to mute the port.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * Not implemented (yet)
+ */
+PJ_DECL(pj_status_t) pjsua_conf_adjust_rx_level(pjsua_conf_port_id slot,
+						float level);
+
+/**
+ * Get last signal level transmitted to or received from the specified port.
+ * The signal level is an integer value in zero to 255, with zero indicates
+ * no signal, and 255 indicates the loudest signal level.
+ *
+ * @param slot		The conference bridge slot number.
+ * @param tx_level	Optional argument to receive the level of signal
+ *			transmitted to the specified port (i.e. the direction
+ *			is from the bridge to the port).
+ * @param rx_level	Optional argument to receive the level of signal
+ *			received from the port (i.e. the direction is from the
+ *			port to the bridge).
+ *
+ * @return		PJ_SUCCESS on success.
+ *
+ * \par Python:
+ * Not implemented (yet)
+ */
+PJ_DECL(pj_status_t) pjsua_conf_get_signal_level(pjsua_conf_port_id slot,
+						 unsigned *tx_level,
+						 unsigned *rx_level);
+
+
+/*****************************************************************************
+ * File player and playlist.
+ */
+
+/**
+ * Create a file player, and automatically add this player to
+ * the conference bridge.
+ *
+ * @param filename	The filename to be played. Currently only
+ *			WAV files are supported, and the WAV file MUST be
+ *			formatted as 16bit PCM mono/single channel (any
+ *			clock rate is supported).
+ * @param options	Options (currently zero).
+ * @param p_id		Pointer to receive player ID.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The function returns (status, id) tuple:
+ * \code
+    status, id = py_pjsua.player_create(filename, options)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_player_create(const pj_str_t *filename,
+					 unsigned options,
+					 pjsua_player_id *p_id);
+
+
+/**
+ * Create a file playlist media port, and automatically add the port
+ * to the conference bridge.
+ *
+ * @param file_names	Array of file names to be added to the play list.
+ *			Note that the files must have the same clock rate,
+ *			number of channels, and number of bits per sample.
+ * @param file_count	Number of files in the array.
+ * @param label		Optional label to be set for the media port.
+ * @param options	Optional option flag. Application may specify
+ *			PJMEDIA_FILE_NO_LOOP to prevent looping.
+ * @param p_id		Optional pointer to receive player ID.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * Not implemented yet.
+ */
+PJ_DECL(pj_status_t) pjsua_playlist_create(const pj_str_t file_names[],
+					   unsigned file_count,
+					   const pj_str_t *label,
+					   unsigned options,
+					   pjsua_player_id *p_id);
+
+/**
+ * Get conference port ID associated with player or playlist.
+ *
+ * @param id		The file player ID.
+ *
+ * @return		Conference port ID associated with this player.
+ *
+ * \par Python:
+ * \code
+    port_id = py_pjsua.player_get_conf_port(id)
+ * \endcode
+ */
+PJ_DECL(pjsua_conf_port_id) pjsua_player_get_conf_port(pjsua_player_id id);
+
+
+/**
+ * Get the media port for the player or playlist.
+ *
+ * @param id		The player ID.
+ * @param p_port	The media port associated with the player.
+ *
+ * @return		PJ_SUCCESS on success.
+ *
+ * \par Python:
+ * Not applicable.
+ */
+PJ_DECL(pj_status_t) pjsua_player_get_port(pjsua_recorder_id id,
+					   pjmedia_port **p_port);
+
+/**
+ * Set playback position. This operation is not valid for playlist.
+ *
+ * @param id		The file player ID.
+ * @param samples	The playback position, in samples. Application can
+ *			specify zero to re-start the playback.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.player_set_pos(id, samples)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_player_set_pos(pjsua_player_id id,
+					  pj_uint32_t samples);
+
+
+/**
+ * Close the file of playlist, remove the player from the bridge, and free
+ * resources associated with the file player or playlist.
+ *
+ * @param id		The file player ID.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.player_destroy(id)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_player_destroy(pjsua_player_id id);
+
+
+/*****************************************************************************
+ * File recorder.
+ */
+
+/**
+ * Create a file recorder, and automatically connect this recorder to
+ * the conference bridge. The recorder currently supports recording WAV file,
+ * and on Windows, MP3 file. The type of the recorder to use is determined
+ * by the extension of the file (e.g. ".wav" or ".mp3").
+ *
+ * @param filename	Output file name. The function will determine the
+ *			default format to be used based on the file extension.
+ *			Currently ".wav" is supported on all platforms, and
+ *			also ".mp3" is support on Windows.
+ * @param enc_type	Optionally specify the type of encoder to be used to
+ *			compress the media, if the file can support different
+ *			encodings. This value must be zero for now.
+ * @param enc_param	Optionally specify codec specific parameter to be 
+ *			passed to the file writer. For .MP3 recorder, this
+ *			can point to pjmedia_mp3_encoder_option structure to
+ *			specify additional settings for the .mp3 recorder.
+ *			For .WAV recorder, this value must be NULL.
+ * @param max_size	Maximum file size. Specify zero or -1 to remove size
+ *			limitation. This value must be zero or -1 for now.
+ * @param options	Optional options.
+ * @param p_id		Pointer to receive the recorder instance.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status, id = py_pjsua.recorder_create(filename, enc_type, enc_param, max_size, options)
+ * \endcode
+ * The \a enc_param is a string in Python.
+ */
+PJ_DECL(pj_status_t) pjsua_recorder_create(const pj_str_t *filename,
+					   unsigned enc_type,
+					   void *enc_param,
+					   pj_ssize_t max_size,
+					   unsigned options,
+					   pjsua_recorder_id *p_id);
+
+
+/**
+ * Get conference port associated with recorder.
+ *
+ * @param id		The recorder ID.
+ *
+ * @return		Conference port ID associated with this recorder.
+ *
+ * \par Python:
+ * \code
+    port_id = py_pjsua.recorder_get_conf_port(id)
+ * \endcode
+ */
+PJ_DECL(pjsua_conf_port_id) pjsua_recorder_get_conf_port(pjsua_recorder_id id);
+
+
+/**
+ * Get the media port for the recorder.
+ *
+ * @param id		The recorder ID.
+ * @param p_port	The media port associated with the recorder.
+ *
+ * @return		PJ_SUCCESS on success.
+ *
+ * \par Python:
+ * Not applicable.
+ */
+PJ_DECL(pj_status_t) pjsua_recorder_get_port(pjsua_recorder_id id,
+					     pjmedia_port **p_port);
+
+
+/**
+ * Destroy recorder (this will complete recording).
+ *
+ * @param id		The recorder ID.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.recorder_destroy(id)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_recorder_destroy(pjsua_recorder_id id);
+
+
+/*****************************************************************************
+ * Sound devices.
+ */
+
+/**
+ * Enum all sound devices installed in the system.
+ *
+ * @param info		Array of info to be initialized.
+ * @param count		On input, specifies max elements in the array.
+ *			On return, it contains actual number of elements
+ *			that have been initialized.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ *
+ * \par Python:
+ * The function returns list of sound device info:
+ * \code
+    [dev_infos] = py_pjsua.enum_snd_devs()
+ * \endcode
+ *
+ */
+PJ_DECL(pj_status_t) pjsua_enum_snd_devs(pjmedia_snd_dev_info info[],
+					 unsigned *count);
+
+
+
+/**
+ * Get currently active sound devices. If sound devices has not been created
+ * (for example when pjsua_start() is not called), it is possible that
+ * the function returns PJ_SUCCESS with -1 as device IDs.
+ *
+ * @param capture_dev   On return it will be filled with device ID of the 
+ *			capture device.
+ * @param playback_dev	On return it will be filled with device ID of the 
+ *			device ID of the playback device.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The function takes no argument and return an (integer,integer) tuple:
+ * \code
+    capture_dev, playback_dev = py_pjsua.get_snd_dev()
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_get_snd_dev(int *capture_dev,
+				       int *playback_dev);
+
+
+/**
+ * Select or change sound device. Application may call this function at
+ * any time to replace current sound device.
+ *
+ * @param capture_dev   Device ID of the capture device.
+ * @param playback_dev	Device ID of the playback device.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.set_snd_dev(capture_dev, playback_dev)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_set_snd_dev(int capture_dev,
+				       int playback_dev);
+
+
+/**
+ * Set pjsua to use null sound device. The null sound device only provides
+ * the timing needed by the conference bridge, and will not interract with
+ * any hardware.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.set_null_snd_dev()
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_set_null_snd_dev(void);
+
+
+/**
+ * Disconnect the main conference bridge from any sound devices, and let
+ * application connect the bridge to it's own sound device/master port.
+ *
+ * @return		The port interface of the conference bridge, 
+ *			so that application can connect this to it's own
+ *			sound device or master port.
+ *
+ * \par Python:
+ * Not applicable (for now).
+ */
+PJ_DECL(pjmedia_port*) pjsua_set_no_snd_dev(void);
+
+
+/**
+ * Configure the echo canceller tail length of the sound port.
+ *
+ * @param tail_ms	The tail length, in miliseconds. Set to zero to
+ *			disable AEC.
+ * @param options	Options to be passed to #pjmedia_echo_create().
+ *			Normally the value should be zero.
+ *
+ * @return		PJ_SUCCESS on success.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.set_ec(tail_ms, options)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_set_ec(unsigned tail_ms, unsigned options);
+
+
+/**
+ * Get current echo canceller tail length.
+ *
+ * @param p_tail_ms	Pointer to receive the tail length, in miliseconds. 
+ *			If AEC is disabled, the value will be zero.
+ *
+ * @return		PJ_SUCCESS on success.
+ *
+ * \par Python:
+ * \code
+    tail_ms = py_pjsua.get_ec_tail()
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_get_ec_tail(unsigned *p_tail_ms);
+
+
+
+/*****************************************************************************
+ * Codecs.
+ */
+
+/**
+ * Enum all supported codecs in the system.
+ *
+ * @param id		Array of ID to be initialized.
+ * @param count		On input, specifies max elements in the array.
+ *			On return, it contains actual number of elements
+ *			that have been initialized.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * This function takes no argument and returns list of codec infos:
+ * \code
+    [codec_info] = py_pjsua.enum_codecs()
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_enum_codecs( pjsua_codec_info id[],
+				        unsigned *count );
+
+
+/**
+ * Change codec priority.
+ *
+ * @param codec_id	Codec ID, which is a string that uniquely identify
+ *			the codec (such as "speex/8000"). Please see pjsua
+ *			manual or pjmedia codec reference for details.
+ * @param priority	Codec priority, 0-255, where zero means to disable
+ *			the codec.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * \code
+    status = py_pjsua.codec_set_priority(codec_id, priority)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_codec_set_priority( const pj_str_t *codec_id,
+					       pj_uint8_t priority );
+
+
+/**
+ * Get codec parameters.
+ *
+ * @param codec_id	Codec ID.
+ * @param param		Structure to receive codec parameters.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The Python function is experimental:
+ * \code
+    codec_param = py_pjsua.codec_get_param(codec_id)
+ * \endcode
+ */
+PJ_DECL(pj_status_t) pjsua_codec_get_param( const pj_str_t *codec_id,
+					    pjmedia_codec_param *param );
+
+
+/**
+ * Set codec parameters.
+ *
+ * @param codec_id	Codec ID.
+ * @param param		Codec parameter to set.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * The Python function is experimental:
+ * \code
+    status = py_pjsua.codec_set_param(codec_id, param)
+ * \endcode
+
+ */
+PJ_DECL(pj_status_t) pjsua_codec_set_param( const pj_str_t *codec_id,
+					    const pjmedia_codec_param *param);
+
+
+
+
+/**
+ * Create UDP media transports for all the calls. This function creates
+ * one UDP media transport for each call.
+ *
+ * @param cfg		Media transport configuration. The "port" field in the
+ *			configuration is used as the start port to bind the
+ *			sockets.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * Not implemented yet.
+ */
+PJ_DECL(pj_status_t) 
+pjsua_media_transports_create(const pjsua_transport_config *cfg);
+
+
+/**
+ * Register custom media transports to be used by calls. There must
+ * enough media transports for all calls.
+ *
+ * @param tp		The media transport array.
+ * @param count		Number of elements in the array. This number MUST
+ *			match the number of maximum calls configured when
+ *			pjsua is created.
+ * @param auto_delete	Flag to indicate whether the transports should be
+ *			destroyed when pjsua is shutdown.
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ *
+ * \par Python:
+ * Note applicable.
+ */
+PJ_DECL(pj_status_t) 
+pjsua_media_transports_attach( pjsua_media_transport tp[],
+			       unsigned count,
+			       pj_bool_t auto_delete);
+
+
+/**
+ * @}
+ */
+
+
+
+/**
+ * @}
+ */
+
+PJ_END_DECL
+
+
+#endif	/* __PJSUA_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/include/pjsua-lib/pjsua_internal.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/include/pjsua-lib/pjsua_internal.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/include/pjsua-lib/pjsua_internal.h	(revision 1163)
@@ -0,0 +1,422 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __PJSUA_INTERNAL_H__
+#define __PJSUA_INTERNAL_H__
+
+/** 
+ * This is the private header used by pjsua library implementation. 
+ * Applications should not include this file.
+ */
+
+PJ_BEGIN_DECL
+
+/** 
+ * Structure to be attached to invite dialog. 
+ * Given a dialog "dlg", application can retrieve this structure
+ * by accessing dlg->mod_data[pjsua.mod.id].
+ */
+typedef struct pjsua_call
+{
+    unsigned		 index;	    /**< Index in pjsua array.		    */
+    pjsip_inv_session	*inv;	    /**< The invite session.		    */
+    void		*user_data; /**< User/application data.		    */
+    pjsip_status_code	 last_code; /**< Last status code seen.		    */
+    pj_str_t		 last_text; /**< Last status text seen.		    */
+    pj_time_val		 start_time;/**< First INVITE sent/received.	    */
+    pj_time_val		 res_time;  /**< First response sent/received.	    */
+    pj_time_val		 conn_time; /**< Connected/confirmed time.	    */
+    pj_time_val		 dis_time;  /**< Disconnect time.		    */
+    pjsua_acc_id	 acc_id;    /**< Account index being used.	    */
+    pjsua_call_media_status media_st;/**< Media state.			    */
+    pjmedia_dir		 media_dir; /**< Media direction.		    */
+    pjmedia_session	*session;   /**< The media session.		    */
+    int			 conf_slot; /**< Slot # in conference bridge.	    */
+    pjsip_evsub		*xfer_sub;  /**< Xfer server subscription, if this
+					 call was triggered by xfer.	    */
+    pjmedia_transport	*med_tp;    /**< Media transport.		    */
+    pj_timer_entry	 refresh_tm;/**< Timer to send re-INVITE.	    */
+    pj_timer_entry	 hangup_tm; /**< Timer to hangup call.		    */
+
+    char    last_text_buf_[128];    /**< Buffer for last_text.		    */
+
+} pjsua_call;
+
+
+/**
+ * Server presence subscription list head.
+ */
+typedef struct pjsua_srv_pres
+{
+    PJ_DECL_LIST_MEMBER(struct pjsua_srv_pres);
+    pjsip_evsub	    *sub;
+    char	    *remote;
+} pjsua_srv_pres;
+
+
+/**
+ * Account
+ */
+typedef struct pjsua_acc
+{
+    pjsua_acc_config cfg;	    /**< Account configuration.		*/
+    pj_bool_t	     valid;	    /**< Is this account valid?		*/
+
+    int		     index;	    /**< Index in accounts array.	*/
+    pj_str_t	     display;	    /**< Display name, if any.		*/
+    pj_str_t	     user_part;	    /**< User part of local URI.	*/
+
+    pj_str_t	     srv_domain;    /**< Host part of reg server.	*/
+    int		     srv_port;	    /**< Port number of reg server.	*/
+
+    pjsip_regc	    *regc;	    /**< Client registration session.   */
+    pj_timer_entry   reg_timer;	    /**< Registration timer.		*/
+    pj_status_t	     reg_last_err;  /**< Last registration error.	*/
+    int		     reg_last_code; /**< Last status last register.	*/
+
+    pjsip_route_hdr  route_set;	    /**< Complete route set inc. outbnd.*/
+
+    unsigned	     cred_cnt;	    /**< Number of credentials.		*/
+    pjsip_cred_info  cred[PJSUA_ACC_MAX_PROXIES]; /**< Complete creds.	*/
+
+    pj_bool_t	     online_status; /**< Our online status.		*/
+    pjsua_srv_pres   pres_srv_list; /**< Server subscription list.	*/
+    pjsip_publishc  *publish_sess;  /**< Client publication session.	*/
+    pj_bool_t	     publish_state; /**< Last published online status	*/
+
+} pjsua_acc;
+
+
+/**
+ *Transport.
+ */
+typedef struct pjsua_transport_data
+{
+    int			     index;
+    pjsip_transport_type_e   type;
+    pjsip_host_port	     local_name;
+
+    union {
+	pjsip_transport	    *tp;
+	pjsip_tpfactory	    *factory;
+	void		    *ptr;
+    } data;
+
+} pjsua_transport_data;
+
+
+/**
+ * Buddy data.
+ */
+typedef struct pjsua_buddy
+{
+    unsigned		 index;	    /**< Buddy index.			*/
+    pj_str_t		 uri;	    /**< Buddy URI.			*/
+    pj_str_t		 contact;   /**< Contact learned from subscrp.	*/
+    pj_str_t		 name;	    /**< Buddy name.			*/
+    pj_str_t		 display;   /**< Buddy display name.		*/
+    pj_str_t		 host;	    /**< Buddy host.			*/
+    unsigned		 port;	    /**< Buddy port.			*/
+    pj_bool_t		 monitor;   /**< Should we monitor?		*/
+    pjsip_evsub		*sub;	    /**< Buddy presence subscription	*/
+    pjsip_pres_status	 status;    /**< Buddy presence status.		*/
+
+} pjsua_buddy;
+
+
+/**
+ * File player/recorder data.
+ */
+typedef struct pjsua_file_data
+{
+    pj_bool_t	     type;  /* 0=player, 1=playlist */
+    pjmedia_port    *port;
+    unsigned	     slot;
+} pjsua_file_data;
+
+
+/**
+ * Additional parameters for conference bridge.
+ */
+typedef struct pjsua_conf_setting
+{
+    unsigned	channel_count;
+    unsigned	samples_per_frame;
+    unsigned	bits_per_sample;
+} pjsua_conf_setting;
+
+
+/**
+ * Global pjsua application data.
+ */
+struct pjsua_data
+{
+
+    /* Control: */
+    pj_caching_pool	 cp;	    /**< Global pool factory.		*/
+    pj_pool_t		*pool;	    /**< pjsua's private pool.		*/
+    pj_mutex_t		*mutex;	    /**< Mutex protection for this data	*/
+
+    /* Logging: */
+    pjsua_logging_config log_cfg;   /**< Current logging config.	*/
+    pj_oshandle_t	 log_file;  /**<Output log file handle		*/
+
+    /* SIP: */
+    pjsip_endpoint	*endpt;	    /**< Global endpoint.		*/
+    pjsip_module	 mod;	    /**< pjsua's PJSIP module.		*/
+    pjsua_transport_data tpdata[8]; /**< Array of transports.		*/
+
+    /* Threading: */
+    pj_bool_t		 thread_quit_flag;  /**< Thread quit flag.	*/
+    pj_thread_t		*thread[4];	    /**< Array of threads.	*/
+
+    /* STUN and resolver */
+    pj_stun_config	 stun_cfg;  /**< Global STUN settings.		*/
+    pj_sockaddr		 stun_srv;  /**< Resolved STUN server address	*/
+    pj_status_t		 stun_status; /**< STUN server status.		*/
+    pj_dns_resolver	*resolver;  /**< DNS resolver.			*/
+
+    /* Account: */
+    unsigned		 acc_cnt;	     /**< Number of accounts.	*/
+    pjsua_acc_id	 default_acc;	     /**< Default account ID	*/
+    pjsua_acc		 acc[PJSUA_MAX_ACC]; /**< Account array.	*/
+    pjsua_acc_id	 acc_ids[PJSUA_MAX_ACC]; /**< Acc sorted by prio*/
+
+    /* Calls: */
+    pjsua_config	 ua_cfg;		/**< UA config.		*/
+    unsigned		 call_cnt;		/**< Call counter.	*/
+    pjsua_call		 calls[PJSUA_MAX_CALLS];/**< Calls array.	*/
+
+    /* Buddy; */
+    unsigned		 buddy_cnt;		    /**< Buddy count.	*/
+    pjsua_buddy		 buddy[PJSUA_MAX_BUDDIES];  /**< Buddy array.	*/
+
+    /* Media: */
+    pjsua_media_config   media_cfg; /**< Media config.			*/
+    pjmedia_endpt	*med_endpt; /**< Media endpoint.		*/
+    pjsua_conf_setting	 mconf_cfg; /**< Additionan conf. bridge. param */
+    pjmedia_conf	*mconf;	    /**< Conference bridge.		*/
+    int			 cap_dev;   /**< Capture device ID.		*/
+    int			 play_dev;  /**< Playback device ID.		*/
+    pj_bool_t		 no_snd;    /**< No sound (app will manage it)	*/
+    pjmedia_snd_port	*snd_port;  /**< Sound port.			*/
+    pjmedia_master_port	*null_snd;  /**< Master port for null sound.	*/
+    pjmedia_port	*null_port; /**< Null port.			*/
+
+
+    /* File players: */
+    unsigned		 player_cnt;/**< Number of file players.	*/
+    pjsua_file_data	 player[PJSUA_MAX_PLAYERS];/**< Array of players.*/
+
+    /* File recorders: */
+    unsigned		 rec_cnt;   /**< Number of file recorders.	*/
+    pjsua_file_data	 recorder[PJSUA_MAX_RECORDERS];/**< Array of recs.*/
+};
+
+
+extern struct pjsua_data pjsua_var;
+
+
+/**
+ * IM callback data.
+ */
+typedef struct pjsua_im_data
+{
+    pjsua_acc_id     acc_id;
+    pjsua_call_id    call_id;
+    pj_str_t	     to;
+    pj_str_t	     body;
+    void	    *user_data;
+} pjsua_im_data;
+
+
+/**
+ * Duplicate IM data.
+ */
+PJ_INLINE(pjsua_im_data*) pjsua_im_data_dup(pj_pool_t *pool, 
+					    const pjsua_im_data *src)
+{
+    pjsua_im_data *dst;
+
+    dst = (pjsua_im_data*) pj_pool_alloc(pool, sizeof(*dst));
+    dst->acc_id = src->acc_id;
+    dst->call_id = src->call_id;
+    pj_strdup_with_null(pool, &dst->to, &src->to);
+    dst->user_data = src->user_data;
+    pj_strdup_with_null(pool, &dst->body, &src->body);
+
+    return dst;
+}
+
+
+#if 1
+#define PJSUA_LOCK()	    pj_mutex_lock(pjsua_var.mutex)
+#define PJSUA_TRY_LOCK()    pj_mutex_trylock(pjsua_var.mutex)
+#define PJSUA_UNLOCK()	    pj_mutex_unlock(pjsua_var.mutex)
+#else
+#define PJSUA_LOCK()
+#define PJSUA_TRY_LOCK()    PJ_SUCCESS
+#define PJSUA_UNLOCK()
+#endif
+
+
+/**
+ * Resolve STUN server.
+ */
+pj_status_t pjsua_resolve_stun_server(pj_bool_t wait);
+
+/**
+ * Handle incoming invite request.
+ */
+pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata);
+
+/*
+ * Media channel.
+ */
+pj_status_t pjsua_media_channel_init(pjsua_call_id call_id,
+				    pjsip_role_e role);
+pj_status_t pjsua_media_channel_create_sdp(pjsua_call_id call_id, 
+					   pj_pool_t *pool,
+					   pjmedia_sdp_session **p_sdp);
+pj_status_t pjsua_media_channel_update(pjsua_call_id call_id,
+				       const pjmedia_sdp_session *local_sdp,
+				       const pjmedia_sdp_session *remote_sdp);
+pj_status_t pjsua_media_channel_deinit(pjsua_call_id call_id);
+
+
+/**
+ * Init presence.
+ */
+pj_status_t pjsua_pres_init();
+
+/*
+ * Start presence subsystem.
+ */
+pj_status_t pjsua_pres_start(void);
+
+/**
+ * Refresh presence subscriptions
+ */
+void pjsua_pres_refresh(void);
+
+/*
+ * Shutdown presence.
+ */
+void pjsua_pres_shutdown(void);
+
+/**
+ * Init presence for aoocunt.
+ */
+pj_status_t pjsua_pres_init_acc(int acc_id);
+
+/**
+ * Send PUBLISH
+ */
+pj_status_t pjsua_pres_init_publish_acc(int acc_id);
+
+/**
+ * Terminate server subscription for the account 
+ */
+void pjsua_pres_delete_acc(int acc_id);
+
+/**
+ * Init IM module handler to handle incoming MESSAGE outside dialog.
+ */
+pj_status_t pjsua_im_init(void);
+
+/**
+ * Init call subsystem.
+ */
+pj_status_t pjsua_call_subsys_init(const pjsua_config *cfg);
+
+/**
+ * Start call subsystem.
+ */
+pj_status_t pjsua_call_subsys_start(void);
+
+/**
+ * Init media subsystems.
+ */
+pj_status_t pjsua_media_subsys_init(const pjsua_media_config *cfg);
+
+/**
+ * Start pjsua media subsystem.
+ */
+pj_status_t pjsua_media_subsys_start(void);
+
+/**
+ * Destroy pjsua media subsystem.
+ */
+pj_status_t pjsua_media_subsys_destroy(void);
+
+/**
+ * Private: check if we can accept the message.
+ *	    If not, then p_accept header will be filled with a valid
+ *	    Accept header.
+ */
+pj_bool_t pjsua_im_accept_pager(pjsip_rx_data *rdata,
+				pjsip_accept_hdr **p_accept_hdr);
+
+/**
+ * Private: process pager message.
+ *	    This may trigger pjsua_ui_on_pager() or pjsua_ui_on_typing().
+ */
+void pjsua_im_process_pager(int call_id, const pj_str_t *from,
+			    const pj_str_t *to, pjsip_rx_data *rdata);
+
+
+/**
+ * Create Accept header for MESSAGE.
+ */
+pjsip_accept_hdr* pjsua_im_create_accept(pj_pool_t *pool);
+
+/*
+ * Add additional headers etc in msg_data specified by application
+ * when sending requests.
+ */
+void pjsua_process_msg_data(pjsip_tx_data *tdata,
+			    const pjsua_msg_data *msg_data);
+
+
+/*
+ * Add route_set to outgoing requests
+ */
+void pjsua_set_msg_route_set( pjsip_tx_data *tdata,
+			      const pjsip_route_hdr *route_set );
+
+
+/*
+ * Simple version of MIME type parsing (it doesn't support parameters)
+ */
+void pjsua_parse_media_type( pj_pool_t *pool,
+			     const pj_str_t *mime,
+			     pjsip_media_type *media_type);
+
+
+/*
+ * Internal function to init transport selector from transport id.
+ */
+void pjsua_init_tpselector(pjsua_transport_id tp_id,
+			   pjsip_tpselector *sel);
+
+
+
+PJ_END_DECL
+
+#endif	/* __PJSUA_INTERNAL_H__ */
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/errno.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/errno.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/errno.c	(revision 1163)
@@ -0,0 +1,114 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip-simple/errno.h>
+#include <pj/string.h>
+
+/* PJSIP-SIMPLE's own error codes/messages 
+ * MUST KEEP THIS ARRAY SORTED!!
+ * Message must be limited to 64 chars!
+ */
+
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0)
+
+static const struct 
+{
+    int code;
+    const char *msg;
+} err_str[] = 
+{
+    /* Event errors */
+    { PJSIP_SIMPLE_ENOPKG,	    "No SIP event package with the specified name" },
+    { PJSIP_SIMPLE_EPKGEXISTS,	    "SIP event package already exist" },
+
+    /* Presence errors */
+    { PJSIP_SIMPLE_ENOTSUBSCRIBE,   "Expecting SUBSCRIBE request" },
+    { PJSIP_SIMPLE_ENOPRESENCE,	    "No presence associated with the subscription" },
+    { PJSIP_SIMPLE_ENOPRESENCEINFO, "No presence info in the server subscription" },
+    { PJSIP_SIMPLE_EBADCONTENT,	    "Bad Content-Type for presence" },
+    { PJSIP_SIMPLE_EBADPIDF,	    "Bad PIDF content for presence" },
+    { PJSIP_SIMPLE_EBADXPIDF,	    "Bad XPIDF content for presence" },
+
+    /* isComposing errors. */
+    { PJSIP_SIMPLE_EBADISCOMPOSE,   "Bad isComposing indication/XML message" },
+};
+
+
+#endif	/* PJ_HAS_ERROR_STRING */
+
+
+/*
+ * pjsipsimple_strerror()
+ */
+PJ_DEF(pj_str_t) pjsipsimple_strerror( pj_status_t statcode, 
+				       char *buf, pj_size_t bufsize )
+{
+    pj_str_t errstr;
+
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0)
+
+    if (statcode >= PJSIP_SIMPLE_ERRNO_START && 
+	statcode < PJSIP_SIMPLE_ERRNO_START + PJ_ERRNO_SPACE_SIZE)
+    {
+	/* Find the error in the table.
+	 * Use binary search!
+	 */
+	int first = 0;
+	int n = PJ_ARRAY_SIZE(err_str);
+
+	while (n > 0) {
+	    int half = n/2;
+	    int mid = first + half;
+
+	    if (err_str[mid].code < statcode) {
+		first = mid+1;
+		n -= (half+1);
+	    } else if (err_str[mid].code > statcode) {
+		n = half;
+	    } else {
+		first = mid;
+		break;
+	    }
+	}
+
+
+	if (PJ_ARRAY_SIZE(err_str) && err_str[first].code == statcode) {
+	    pj_str_t msg;
+	    
+	    msg.ptr = (char*)err_str[first].msg;
+	    msg.slen = pj_ansi_strlen(err_str[first].msg);
+
+	    errstr.ptr = buf;
+	    pj_strncpy_with_null(&errstr, &msg, bufsize);
+	    return errstr;
+
+	} 
+    }
+
+#endif	/* PJ_HAS_ERROR_STRING */
+
+
+    /* Error not found. */
+    errstr.ptr = buf;
+    errstr.slen = pj_ansi_snprintf(buf, bufsize, 
+				   "Unknown pjsip-simple error %d",
+ 				   statcode);
+
+    return errstr;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/evsub.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/evsub.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/evsub.c	(revision 1163)
@@ -0,0 +1,1981 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip-simple/evsub.h>
+#include <pjsip-simple/evsub_msg.h>
+#include <pjsip-simple/errno.h>
+#include <pjsip/sip_errno.h>
+#include <pjsip/sip_module.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_dialog.h>
+#include <pjsip/sip_auth.h>
+#include <pjsip/sip_transaction.h>
+#include <pjsip/sip_event.h>
+#include <pj/assert.h>
+#include <pj/guid.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+
+#define THIS_FILE	"evsub.c"
+
+/*
+ * Global constant
+ */
+
+/* Let's define this enum, so that it'll trigger compilation error
+ * when somebody define the same enum in sip_msg.h
+ */
+enum
+{
+    PJSIP_SUBSCRIBE_METHOD = PJSIP_OTHER_METHOD,
+    PJSIP_NOTIFY_METHOD = PJSIP_OTHER_METHOD
+};
+
+const pjsip_method pjsip_subscribe_method = 
+{
+    PJSIP_SUBSCRIBE_METHOD,
+    { "SUBSCRIBE", 9 }
+};
+
+const pjsip_method pjsip_notify_method = 
+{
+    PJSIP_NOTIFY_METHOD,
+    { "NOTIFY", 6 }
+};
+
+/*
+ * Static prototypes.
+ */
+static void	   mod_evsub_on_tsx_state(pjsip_transaction*, pjsip_event*);
+static pj_status_t mod_evsub_unload(void);
+
+
+/*
+ * State names.
+ */
+static pj_str_t evsub_state_names[] = 
+{
+    { "NULL",	    4},
+    { "SENT",	    4},
+    { "ACCEPTED",   8},
+    { "PENDING",    7},
+    { "ACTIVE",	    6},
+    { "TERMINATED", 10},
+    { "UNKNOWN",    7}
+};
+
+/*
+ * Timer constants.
+ */
+
+/* Number of seconds to send SUBSCRIBE before the actual expiration */
+#define TIME_UAC_REFRESH	5
+
+/* Time to wait for the final NOTIFY after sending unsubscription */
+#define TIME_UAC_TERMINATE	5
+
+/* If client responds NOTIFY with non-2xx final response (such as 401),
+ * wait for this seconds for further NOTIFY, otherwise client will
+ * unsubscribe
+ */
+#define TIME_UAC_WAIT_NOTIFY	5
+
+
+/*
+ * Timer id
+ */
+enum timer_id
+{
+    /* No timer. */
+    TIMER_TYPE_NONE,
+
+    /* Time to refresh client subscription. 
+     * The action is to call on_client_refresh() callback.
+     */
+    TIMER_TYPE_UAC_REFRESH,
+
+    /* UAS timeout after to subscription refresh. 
+     * The action is to call on_server_timeout() callback.
+     */
+    TIMER_TYPE_UAS_TIMEOUT,
+
+    /* UAC waiting for final NOTIFY after unsubscribing 
+     * The action is to terminate.
+     */
+    TIMER_TYPE_UAC_TERMINATE,
+
+    /* UAC waiting for further NOTIFY after sending non-2xx response to 
+     * NOTIFY. The action is to unsubscribe.
+     */
+    TIMER_TYPE_UAC_WAIT_NOTIFY,
+
+    /* Max nb of timer types. */
+    TIMER_TYPE_MAX
+};
+
+static const char *timer_names[] = 
+{
+    "None",
+    "UAC_REFRESH",
+    "UAS_TIMEOUT"
+    "UAC_TERMINATE",
+    "UAC_WAIT_NOTIFY",
+    "INVALID_TIMER"
+};
+
+/*
+ * Definition of event package.
+ */
+struct evpkg
+{
+    PJ_DECL_LIST_MEMBER(struct evpkg);
+
+    pj_str_t		 pkg_name;
+    pjsip_module	*pkg_mod;
+    unsigned		 pkg_expires;
+    pjsip_accept_hdr	*pkg_accept;
+};
+
+
+/*
+ * Event subscription module (mod-evsub).
+ */
+static struct mod_evsub
+{
+    pjsip_module	     mod;
+    pj_pool_t		    *pool;
+    pjsip_endpoint	    *endpt;
+    struct evpkg	     pkg_list;
+    pjsip_allow_events_hdr  *allow_events_hdr;
+
+} mod_evsub = 
+{
+    {
+	NULL, NULL,			    /* prev, next.		*/
+	{ "mod-evsub", 9 },		    /* Name.			*/
+	-1,				    /* Id			*/
+	PJSIP_MOD_PRIORITY_DIALOG_USAGE,    /* Priority			*/
+	NULL,				    /* load()			*/
+	NULL,				    /* start()			*/
+	NULL,				    /* stop()			*/
+	&mod_evsub_unload,		    /* unload()			*/
+	NULL,				    /* on_rx_request()		*/
+	NULL,				    /* on_rx_response()		*/
+	NULL,				    /* on_tx_request.		*/
+	NULL,				    /* on_tx_response()		*/
+	&mod_evsub_on_tsx_state,	    /* on_tsx_state()		*/
+    }
+};
+
+
+/*
+ * Event subscription session.
+ */
+struct pjsip_evsub
+{
+    char		  obj_name[PJ_MAX_OBJ_NAME]; /**< Name.		    */
+    pj_pool_t		 *pool;		/**< Pool.			    */
+    pjsip_endpoint	 *endpt;	/**< Endpoint instance.		    */
+    pjsip_dialog	 *dlg;		/**< Underlying dialog.		    */
+    struct evpkg	 *pkg;		/**< The event package.		    */
+    unsigned		  option;	/**< Options.			    */
+    pjsip_evsub_user	  user;		/**< Callback.			    */
+    pj_bool_t		  call_cb;	/**< Notify callback?		    */
+    pjsip_role_e	  role;		/**< UAC=subscriber, UAS=notifier   */
+    pjsip_evsub_state	  state;	/**< Subscription state.	    */
+    pj_str_t		  state_str;	/**< String describing the state.   */
+    pjsip_evsub_state	  dst_state;	/**< Pending state to be set.	    */
+    pj_str_t		  dst_state_str;/**< Pending state to be set.	    */
+    pjsip_method	  method;	/**< Method that established subscr.*/
+    pjsip_event_hdr	 *event;	/**< Event description.		    */
+    pjsip_expires_hdr	 *expires;	/**< Expires header		    */
+    pjsip_accept_hdr	 *accept;	/**< Local Accept header.	    */
+
+    pj_time_val		  refresh_time;	/**< Time to refresh.		    */
+    pj_timer_entry	  timer;	/**< Internal timer.		    */
+    int			  pending_tsx;	/**< Number of pending transactions.*/
+    pjsip_transaction	 *pending_sub;	/**< Pending UAC SUBSCRIBE tsx.	    */
+
+    void		 *mod_data[PJSIP_MAX_MODULE];	/**< Module data.   */
+};
+
+
+/*
+ * This is the structure that will be "attached" to dialog.
+ * The purpose is to allow multiple subscriptions inside a dialog.
+ */
+struct dlgsub
+{
+    PJ_DECL_LIST_MEMBER(struct dlgsub);
+    pjsip_evsub *sub;
+};
+
+
+/* Static vars. */
+static const pj_str_t STR_EVENT	     = { "Event", 5 };
+static const pj_str_t STR_SUB_STATE  = { "Subscription-State", 18 };
+static const pj_str_t STR_TERMINATED = { "terminated", 10 };
+static const pj_str_t STR_ACTIVE     = { "active", 6 };
+static const pj_str_t STR_PENDING    = { "pending", 7 };
+static const pj_str_t STR_TIMEOUT    = { "timeout", 7};
+
+
+/*
+ * On unload module.
+ */
+static pj_status_t mod_evsub_unload(void)
+{
+    pjsip_endpt_release_pool(mod_evsub.endpt, mod_evsub.pool);
+    mod_evsub.pool = NULL;
+
+    return PJ_SUCCESS;
+}
+
+/* Proto for pjsipsimple_strerror().
+ * Defined in errno.c
+ */
+PJ_DECL(pj_str_t) pjsipsimple_strerror( pj_status_t statcode, 
+				        char *buf, pj_size_t bufsize );
+
+/*
+ * Init and register module.
+ */
+PJ_DEF(pj_status_t) pjsip_evsub_init_module(pjsip_endpoint *endpt)
+{
+    pj_status_t status;
+    pj_str_t method_tags[] = {
+	{ "SUBSCRIBE", 9},
+	{ "NOTIFY", 6}
+    };
+
+    pj_register_strerror(PJSIP_SIMPLE_ERRNO_START, PJ_ERRNO_SPACE_SIZE,
+			 &pjsipsimple_strerror);
+
+    PJ_ASSERT_RETURN(endpt != NULL, PJ_EINVAL);
+    PJ_ASSERT_RETURN(mod_evsub.mod.id == -1, PJ_EINVALIDOP);
+
+    /* Keep endpoint for future reference: */
+    mod_evsub.endpt = endpt;
+
+    /* Init event package list: */
+    pj_list_init(&mod_evsub.pkg_list);
+
+    /* Create pool: */
+    mod_evsub.pool = pjsip_endpt_create_pool(endpt, "evsub", 4000, 4000);
+    if (!mod_evsub.pool)
+	return PJ_ENOMEM;
+
+    /* Register module: */
+    status = pjsip_endpt_register_module(endpt, &mod_evsub.mod);
+    if (status  != PJ_SUCCESS)
+	goto on_error;
+ 
+    /* Create Allow-Events header: */
+    mod_evsub.allow_events_hdr = pjsip_allow_events_hdr_create(mod_evsub.pool);
+
+    /* Register SIP-event specific headers parser: */
+    pjsip_evsub_init_parser();
+
+    /* Register new methods SUBSCRIBE and NOTIFY in Allow-ed header */
+    pjsip_endpt_add_capability(endpt, &mod_evsub.mod, PJSIP_H_ALLOW, NULL,
+			       2, method_tags);
+
+    /* Done. */
+    return PJ_SUCCESS;
+
+on_error:
+    if (mod_evsub.pool) {
+	pjsip_endpt_release_pool(endpt, mod_evsub.pool);
+	mod_evsub.pool = NULL;
+    }
+    mod_evsub.endpt = NULL;
+    return status;
+}
+
+
+/*
+ * Get the instance of the module.
+ */
+PJ_DEF(pjsip_module*) pjsip_evsub_instance(void)
+{
+    PJ_ASSERT_RETURN(mod_evsub.mod.id != -1, NULL);
+
+    return &mod_evsub.mod;
+}
+
+
+/*
+ * Get the event subscription instance in the transaction.
+ */
+PJ_DEF(pjsip_evsub*) pjsip_tsx_get_evsub(pjsip_transaction *tsx)
+{
+    return tsx->mod_data[mod_evsub.mod.id];
+}
+
+
+/*
+ * Set event subscription's module data.
+ */
+PJ_DEF(void) pjsip_evsub_set_mod_data( pjsip_evsub *sub, unsigned mod_id,
+				       void *data )
+{
+    PJ_ASSERT_ON_FAIL(mod_id < PJSIP_MAX_MODULE, return);
+    sub->mod_data[mod_id] = data;
+}
+
+
+/*
+ * Get event subscription's module data.
+ */
+PJ_DEF(void*) pjsip_evsub_get_mod_data( pjsip_evsub *sub, unsigned mod_id )
+{
+    PJ_ASSERT_RETURN(mod_id < PJSIP_MAX_MODULE, NULL);
+    return sub->mod_data[mod_id];
+}
+
+
+/*
+ * Find registered event package with matching name.
+ */
+static struct evpkg* find_pkg(const pj_str_t *event_name)
+{
+    struct evpkg *pkg;
+
+    pkg = mod_evsub.pkg_list.next;
+    while (pkg != &mod_evsub.pkg_list) {
+
+	if (pj_stricmp(&pkg->pkg_name, event_name) == 0) {
+	    return pkg;
+	}
+
+	pkg = pkg->next;
+    }
+
+    return NULL;
+}
+
+/*
+ * Register an event package
+ */
+PJ_DEF(pj_status_t) pjsip_evsub_register_pkg( pjsip_module *pkg_mod,
+					      const pj_str_t *event_name,
+					      unsigned expires,
+					      unsigned accept_cnt,
+					      const pj_str_t accept[])
+{
+    struct evpkg *pkg;
+    unsigned i;
+
+    PJ_ASSERT_RETURN(pkg_mod && event_name, PJ_EINVAL);
+    PJ_ASSERT_RETURN(accept_cnt < PJ_ARRAY_SIZE(pkg->pkg_accept->values), 
+		     PJ_ETOOMANY);
+
+    /* Make sure no module with the specified name already registered: */
+
+    PJ_ASSERT_RETURN(find_pkg(event_name) == NULL, PJSIP_SIMPLE_EPKGEXISTS);
+
+
+    /* Create new event package: */
+
+    pkg = pj_pool_alloc(mod_evsub.pool, sizeof(struct evpkg));
+    pkg->pkg_mod = pkg_mod;
+    pkg->pkg_expires = expires;
+    pj_strdup(mod_evsub.pool, &pkg->pkg_name, event_name);
+
+    pkg->pkg_accept = pjsip_accept_hdr_create(mod_evsub.pool);
+    pkg->pkg_accept->count = accept_cnt;
+    for (i=0; i<accept_cnt; ++i) {
+	pj_strdup(mod_evsub.pool, &pkg->pkg_accept->values[i], &accept[i]);
+    }
+
+    /* Add to package list: */
+
+    pj_list_push_back(&mod_evsub.pkg_list, pkg);
+
+    /* Add to Allow-Events header: */
+
+    if (mod_evsub.allow_events_hdr->count !=
+	PJ_ARRAY_SIZE(mod_evsub.allow_events_hdr->values))
+    {
+	mod_evsub.allow_events_hdr->values[mod_evsub.allow_events_hdr->count] =
+	    pkg->pkg_name;
+	++mod_evsub.allow_events_hdr->count;
+    }
+    
+    /* Add to endpoint's Accept header */
+    pjsip_endpt_add_capability(mod_evsub.endpt, &mod_evsub.mod,
+			       PJSIP_H_ACCEPT, NULL,
+			       pkg->pkg_accept->count,
+			       pkg->pkg_accept->values);
+
+
+    /* Done */
+
+    PJ_LOG(5,(THIS_FILE, "Event pkg \"%.*s\" registered by %.*s",
+	      (int)event_name->slen, event_name->ptr,
+	      (int)pkg_mod->name.slen, pkg_mod->name.ptr));
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Retrieve Allow-Events header
+ */
+PJ_DEF(const pjsip_hdr*) pjsip_evsub_get_allow_events_hdr(pjsip_module *m)
+{
+    struct mod_evsub *mod;
+
+    if (m == NULL)
+	m = pjsip_evsub_instance();
+
+    mod = (struct mod_evsub*)m;
+
+    return (pjsip_hdr*) mod->allow_events_hdr;
+}
+
+
+/*
+ * Update expiration time.
+ */
+static void update_expires( pjsip_evsub *sub, pj_uint32_t interval )
+{
+    pj_gettimeofday(&sub->refresh_time);
+    sub->refresh_time.sec += interval;
+}
+
+
+/* 
+ * Schedule timer.
+ */
+static void set_timer( pjsip_evsub *sub, int timer_id,
+		       pj_int32_t seconds)
+{
+    if (sub->timer.id != TIMER_TYPE_NONE) {
+	PJ_LOG(5,(sub->obj_name, "%s %s timer", 
+		  (timer_id==sub->timer.id ? "Updating" : "Cancelling"),
+		  timer_names[sub->timer.id]));
+	pjsip_endpt_cancel_timer(sub->endpt, &sub->timer);
+	sub->timer.id = TIMER_TYPE_NONE;
+    }
+
+    if (timer_id != TIMER_TYPE_NONE) {
+	pj_time_val timeout;
+
+	PJ_ASSERT_ON_FAIL(seconds > 0, return);
+	PJ_ASSERT_ON_FAIL(timer_id>TIMER_TYPE_NONE && timer_id<TIMER_TYPE_MAX,
+			  return);
+
+	timeout.sec = seconds;
+	timeout.msec = 0;
+	sub->timer.id = timer_id;
+
+	pjsip_endpt_schedule_timer(sub->endpt, &sub->timer, &timeout);
+
+	PJ_LOG(5,(sub->obj_name, "Timer %s scheduled in %d seconds", 
+		  timer_names[sub->timer.id], timeout.sec));
+    }
+}
+
+
+/*
+ * Destroy session.
+ */
+static void evsub_destroy( pjsip_evsub *sub )
+{
+    struct dlgsub *dlgsub_head, *dlgsub;
+
+    PJ_LOG(4,(sub->obj_name, "Subscription destroyed"));
+
+    /* Kill timer */
+    set_timer(sub, TIMER_TYPE_NONE, 0);
+
+    /* Remote this session from dialog's list of subscription */
+    dlgsub_head = sub->dlg->mod_data[mod_evsub.mod.id];
+    dlgsub = dlgsub_head->next;
+    while (dlgsub != dlgsub_head) {
+	
+	if (dlgsub->sub == sub) {
+	    pj_list_erase(dlgsub);
+	    break;
+	}
+
+	dlgsub = dlgsub->next;
+    }
+
+    /* Decrement dialog's session */
+    pjsip_dlg_dec_session(sub->dlg, &mod_evsub.mod);
+}
+
+/*
+ * Set subscription session state.
+ */
+static void set_state( pjsip_evsub *sub, pjsip_evsub_state state,
+		       const pj_str_t *state_str, pjsip_event *event)
+{
+    pjsip_evsub_state prev_state = sub->state;
+    pj_str_t old_state_str = sub->state_str;
+
+    sub->state = state;
+
+    if (state_str && state_str->slen)
+	pj_strdup_with_null(sub->pool, &sub->state_str, state_str);
+    else
+	sub->state_str = evsub_state_names[state];
+
+    PJ_LOG(4,(sub->obj_name, 
+	      "Subscription state changed %.*s --> %.*s",
+	      (int)old_state_str.slen,
+	      old_state_str.ptr,
+	      (int)sub->state_str.slen,
+	      sub->state_str.ptr));
+
+    if (sub->user.on_evsub_state && sub->call_cb)
+	(*sub->user.on_evsub_state)(sub, event);
+
+    if (state == PJSIP_EVSUB_STATE_TERMINATED &&
+	prev_state != PJSIP_EVSUB_STATE_TERMINATED) 
+    {
+	if (sub->pending_tsx == 0) {
+	    evsub_destroy(sub);
+	}
+    }
+}
+
+
+/*
+ * Timer callback.
+ */
+static void on_timer( pj_timer_heap_t *timer_heap,
+		      struct pj_timer_entry *entry)
+{
+    pjsip_evsub *sub;
+    int timer_id;
+
+    PJ_UNUSED_ARG(timer_heap);
+
+    sub = entry->user_data;
+
+    pjsip_dlg_inc_lock(sub->dlg);
+
+    timer_id = entry->id;
+    entry->id = TIMER_TYPE_NONE;
+
+    switch (timer_id) {
+
+    case TIMER_TYPE_UAC_REFRESH:
+	/* Time for UAC to refresh subscription */
+	if (sub->user.on_client_refresh && sub->call_cb) {
+	    (*sub->user.on_client_refresh)(sub);
+	} else {
+	    pjsip_tx_data *tdata;
+	    pj_status_t status;
+
+	    PJ_LOG(5,(sub->obj_name, "Refreshing subscription."));
+	    status = pjsip_evsub_initiate(sub, NULL, 
+					  sub->expires->ivalue,
+					  &tdata);
+	    if (status == PJ_SUCCESS)
+		pjsip_evsub_send_request(sub, tdata);
+	}
+	break;
+
+    case TIMER_TYPE_UAS_TIMEOUT:
+	/* Refresh from UAC has not been received */
+	if (sub->user.on_server_timeout && sub->call_cb) {
+	    (*sub->user.on_server_timeout)(sub);
+	} else {
+	    pjsip_tx_data *tdata;
+	    pj_status_t status;
+
+	    PJ_LOG(5,(sub->obj_name, "Timeout waiting for refresh. "
+				     "Sending NOTIFY to terminate."));
+	    status = pjsip_evsub_notify( sub, PJSIP_EVSUB_STATE_TERMINATED, 
+					 NULL, &STR_TIMEOUT, &tdata);
+	    if (status == PJ_SUCCESS)
+		pjsip_evsub_send_request(sub, tdata);
+	}
+	break;
+
+    case TIMER_TYPE_UAC_TERMINATE:
+	{
+	    PJ_LOG(5,(sub->obj_name, "Timeout waiting for final NOTIFY. "
+				     "Terminating.."));
+	    set_state(sub, PJSIP_EVSUB_STATE_TERMINATED, NULL, NULL);
+	}
+	break;
+
+    case TIMER_TYPE_UAC_WAIT_NOTIFY:
+	{
+	    pjsip_tx_data *tdata;
+	    pj_status_t status;
+
+	    PJ_LOG(5,(sub->obj_name, 
+		     "Timeout waiting for subsequent NOTIFY (we did "
+		     "send non-2xx response for previous NOTIFY). "
+		     "Unsubscribing.."));
+	    status = pjsip_evsub_initiate( sub, NULL, 0, &tdata);
+	    if (status == PJ_SUCCESS)
+		pjsip_evsub_send_request(sub, tdata);
+	}
+	break;
+
+    default:
+	pj_assert(!"Invalid timer id");
+    }
+
+    pjsip_dlg_dec_lock(sub->dlg);
+}
+
+
+/*
+ * Create subscription session, used for both client and notifier.
+ */
+static pj_status_t evsub_create( pjsip_dialog *dlg,
+				 pjsip_role_e role,
+				 const pjsip_evsub_user *user_cb,
+				 const pj_str_t *event,
+				 unsigned option,
+				 pjsip_evsub **p_evsub )
+{
+    pjsip_evsub *sub;
+    struct evpkg *pkg;
+    struct dlgsub *dlgsub_head, *dlgsub;
+    pj_status_t status;
+
+    /* Make sure there's package register for the event name: */
+
+    pkg = find_pkg(event);
+    if (pkg == NULL)
+	return PJSIP_SIMPLE_ENOPKG;
+
+
+    /* Must lock dialog before using pool etc. */
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Init attributes: */
+
+    sub = pj_pool_zalloc(dlg->pool, sizeof(struct pjsip_evsub));
+    sub->pool = dlg->pool;
+    sub->endpt = dlg->endpt;
+    sub->dlg = dlg;
+    sub->pkg = pkg;
+    sub->role = role;
+    sub->call_cb = PJ_TRUE;
+    sub->option = option;
+    sub->state = PJSIP_EVSUB_STATE_NULL;
+    sub->state_str = evsub_state_names[sub->state];
+    sub->expires = pjsip_expires_hdr_create(sub->pool, pkg->pkg_expires);
+    sub->accept = pjsip_hdr_clone(sub->pool, pkg->pkg_accept);
+
+    sub->timer.user_data = sub;
+    sub->timer.cb = &on_timer;
+
+    /* Set name. */
+    pj_ansi_snprintf(sub->obj_name, PJ_ARRAY_SIZE(sub->obj_name),
+		     "evsub%p", sub);
+
+
+    /* Copy callback, if any: */
+    if (user_cb)
+	pj_memcpy(&sub->user, user_cb, sizeof(pjsip_evsub_user));
+
+
+    /* Create Event header: */
+    sub->event = pjsip_event_hdr_create(sub->pool);
+    pj_strdup(sub->pool, &sub->event->event_type, event);
+
+
+    /* Create subcription list: */
+
+    dlgsub_head = pj_pool_alloc(sub->pool, sizeof(struct dlgsub));
+    dlgsub = pj_pool_alloc(sub->pool, sizeof(struct dlgsub));
+    dlgsub->sub = sub;
+
+    pj_list_init(dlgsub_head);
+    pj_list_push_back(dlgsub_head, dlgsub);
+
+
+    /* Register as dialog usage: */
+
+    status = pjsip_dlg_add_usage(dlg, &mod_evsub.mod, dlgsub_head);
+    if (status != PJ_SUCCESS) {
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+
+    PJ_LOG(5,(sub->obj_name, "%s subscription created, using dialog %s",
+	      (role==PJSIP_ROLE_UAC ? "UAC" : "UAS"),
+	      dlg->obj_name));
+
+    *p_evsub = sub;
+    pjsip_dlg_dec_lock(dlg);
+
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * Create client subscription session.
+ */
+PJ_DEF(pj_status_t) pjsip_evsub_create_uac( pjsip_dialog *dlg,
+					    const pjsip_evsub_user *user_cb,
+					    const pj_str_t *event,
+					    unsigned option,
+					    pjsip_evsub **p_evsub)
+{
+    pjsip_evsub *sub;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(dlg && event && p_evsub, PJ_EINVAL);
+
+    pjsip_dlg_inc_lock(dlg);
+    status = evsub_create(dlg, PJSIP_UAC_ROLE, user_cb, event, option, &sub);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+    /* Add unique Id to Event header, only when PJSIP_EVSUB_NO_EVENT_ID
+     * is not specified.
+     */
+    if ((option & PJSIP_EVSUB_NO_EVENT_ID) == 0) {
+	pj_create_unique_string(sub->pool, &sub->event->id_param);
+    }
+
+    /* Increment dlg session. */
+    pjsip_dlg_inc_session(sub->dlg, &mod_evsub.mod);
+
+    /* Done */
+    *p_evsub = sub;
+
+on_return:
+    pjsip_dlg_dec_lock(dlg);
+    return status;
+}
+
+
+/*
+ * Create server subscription session from incoming request.
+ */
+PJ_DEF(pj_status_t) pjsip_evsub_create_uas( pjsip_dialog *dlg,
+					    const pjsip_evsub_user *user_cb,
+					    pjsip_rx_data *rdata,
+					    unsigned option,
+					    pjsip_evsub **p_evsub)
+{
+    pjsip_evsub *sub;
+    pjsip_transaction *tsx;
+    pjsip_accept_hdr *accept_hdr;
+    pjsip_event_hdr *event_hdr;
+    pjsip_expires_hdr *expires_hdr;
+    pj_status_t status;
+
+    /* Check arguments: */
+    PJ_ASSERT_RETURN(dlg && rdata && p_evsub, PJ_EINVAL);
+
+    /* MUST be request message: */
+    PJ_ASSERT_RETURN(rdata->msg_info.msg->type == PJSIP_REQUEST_MSG,
+		     PJSIP_ENOTREQUESTMSG);
+
+    /* Transaction MUST have been created (in the dialog) */
+    tsx = pjsip_rdata_get_tsx(rdata);
+    PJ_ASSERT_RETURN(tsx != NULL, PJSIP_ENOTSX);
+
+    /* No subscription must have been attached to transaction */
+    PJ_ASSERT_RETURN(tsx->mod_data[mod_evsub.mod.id] == NULL, 
+		     PJSIP_ETYPEEXISTS);
+
+    /* Package MUST implement on_rx_refresh */
+    PJ_ASSERT_RETURN(user_cb->on_rx_refresh, PJ_EINVALIDOP);
+
+    /* Request MUST have "Event" header. We need the Event header to get 
+     * the package name (don't want to add more arguments in the function).
+     */
+    event_hdr = (pjsip_event_hdr*) 
+	pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &STR_EVENT, NULL);
+    if (event_hdr == NULL) {
+	return PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_BAD_REQUEST);
+    }
+
+    /* Start locking the mutex: */
+
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Create the session: */
+
+    status = evsub_create(dlg, PJSIP_UAS_ROLE, user_cb, 
+			  &event_hdr->event_type, option, &sub);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+    /* Just duplicate Event header from the request */
+    sub->event = pjsip_hdr_clone(sub->pool, event_hdr);
+
+    /* Set the method: */
+    pjsip_method_copy(sub->pool, &sub->method, 
+		      &rdata->msg_info.msg->line.req.method);
+
+    /* Update expiration time according to client request: */
+
+    expires_hdr = (pjsip_expires_hdr*)
+	pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_EXPIRES, NULL);
+    if (expires_hdr) {
+	sub->expires->ivalue = expires_hdr->ivalue;
+    }
+
+    /* Update time. */
+    update_expires(sub, sub->expires->ivalue);
+
+    /* Update Accept header: */
+
+    accept_hdr = (pjsip_accept_hdr*)
+	pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_ACCEPT, NULL);
+    if (accept_hdr)
+	sub->accept = pjsip_hdr_clone(sub->pool, accept_hdr);
+
+    /* We can start the session: */
+
+    pjsip_dlg_inc_session(dlg, &mod_evsub.mod);
+    sub->pending_tsx++;
+    tsx->mod_data[mod_evsub.mod.id] = sub;
+
+
+    /* Done. */
+    *p_evsub = sub;
+
+
+on_return:
+    pjsip_dlg_dec_lock(dlg);
+    return status;
+}
+
+
+/*
+ * Forcefully destroy subscription.
+ */
+PJ_DEF(pj_status_t) pjsip_evsub_terminate( pjsip_evsub *sub,
+					   pj_bool_t notify )
+{
+    PJ_ASSERT_RETURN(sub, PJ_EINVAL);
+
+    pjsip_dlg_inc_lock(sub->dlg);
+
+    /* I think it's pretty safe to disable this check.
+     
+    if (sub->pending_tsx) {
+	pj_assert(!"Unable to terminate when there's pending tsx");
+	pjsip_dlg_dec_lock(sub->dlg);
+	return PJ_EINVALIDOP;
+    }
+    */
+
+    sub->call_cb = notify;
+    set_state(sub, PJSIP_EVSUB_STATE_TERMINATED, NULL, NULL);
+
+    pjsip_dlg_dec_lock(sub->dlg);
+    return PJ_SUCCESS;
+}
+
+/*
+ * Get subscription state.
+ */
+PJ_DEF(pjsip_evsub_state) pjsip_evsub_get_state(pjsip_evsub *sub)
+{
+    return sub->state;
+}
+
+/*
+ * Get state name.
+ */
+PJ_DEF(const char*) pjsip_evsub_get_state_name(pjsip_evsub *sub)
+{
+    return sub->state_str.ptr;
+}
+
+
+/*
+ * Initiate client subscription
+ */
+PJ_DEF(pj_status_t) pjsip_evsub_initiate( pjsip_evsub *sub,
+					  const pjsip_method *method,
+					  pj_int32_t expires,
+					  pjsip_tx_data **p_tdata)
+{
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(sub!=NULL && p_tdata!=NULL, PJ_EINVAL);
+
+    /* Use SUBSCRIBE if method is not specified */
+    if (method == NULL)
+	method = &pjsip_subscribe_method;
+
+    pjsip_dlg_inc_lock(sub->dlg);
+
+    /* Update method: */
+    if (sub->state == PJSIP_EVSUB_STATE_NULL)
+	pjsip_method_copy(sub->pool, &sub->method, method);
+
+    status = pjsip_dlg_create_request( sub->dlg, method, -1, &tdata);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+
+    /* Add Event header: */
+    pjsip_msg_add_hdr( tdata->msg,
+		       pjsip_hdr_shallow_clone(tdata->pool, sub->event));
+
+    /* Update and add expires header: */
+    if (expires >= 0)
+	sub->expires->ivalue = expires;
+    pjsip_msg_add_hdr( tdata->msg,
+		       pjsip_hdr_shallow_clone(tdata->pool, sub->expires));
+
+    /* Add Accept header: */
+    pjsip_msg_add_hdr( tdata->msg,
+		       pjsip_hdr_shallow_clone(tdata->pool, sub->accept));
+    
+
+    /* Add Allow-Events header: */
+    pjsip_msg_add_hdr( tdata->msg,
+		       pjsip_hdr_shallow_clone(tdata->pool, 
+					       mod_evsub.allow_events_hdr));
+
+   
+    *p_tdata = tdata;
+
+
+on_return:
+
+    pjsip_dlg_dec_lock(sub->dlg);
+    return status;
+}
+
+
+/*
+ * Accept incoming subscription request.
+ */
+PJ_DEF(pj_status_t) pjsip_evsub_accept( pjsip_evsub *sub,
+					pjsip_rx_data *rdata,
+				        int st_code,
+					const pjsip_hdr *hdr_list )
+{
+    pjsip_tx_data *tdata;
+    pjsip_transaction *tsx;
+    pj_status_t status;
+
+    /* Check arguments */
+    PJ_ASSERT_RETURN(sub && rdata, PJ_EINVAL);
+
+    /* Can only be for server subscription: */
+    PJ_ASSERT_RETURN(sub->role == PJSIP_ROLE_UAS, PJ_EINVALIDOP);
+
+    /* Only expect 2xx status code (for now) */
+    PJ_ASSERT_RETURN(st_code/100 == 2, PJ_EINVALIDOP);
+
+    /* Subscription MUST have been attached to the transaction.
+     * Initial subscription request will be attached on evsub_create_uas(),
+     * while subsequent requests will be attached in tsx_state()
+     */
+    tsx = pjsip_rdata_get_tsx(rdata);
+    PJ_ASSERT_RETURN(tsx->mod_data[mod_evsub.mod.id] != NULL,
+		     PJ_EINVALIDOP);
+
+    /* Lock dialog */
+    pjsip_dlg_inc_lock(sub->dlg);
+
+    /* Create response: */
+    status = pjsip_dlg_create_response( sub->dlg, rdata, st_code, NULL, 
+					&tdata);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+
+    /* Add expires header: */
+    pjsip_msg_add_hdr( tdata->msg,
+		       pjsip_hdr_shallow_clone(tdata->pool, sub->expires));
+
+    /* Add additional header, if any. */
+    if (hdr_list) {
+	const pjsip_hdr *hdr = hdr_list->next;
+	while (hdr != hdr_list) {
+	    pjsip_msg_add_hdr( tdata->msg,
+			       pjsip_hdr_clone(tdata->pool, hdr));
+	    hdr = hdr->next;
+	}
+    }
+
+    /* Send the response: */
+    status = pjsip_dlg_send_response( sub->dlg, tsx, tdata );
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+
+on_return:
+
+    pjsip_dlg_dec_lock(sub->dlg);
+    return status;
+}
+
+
+/*
+ * Create Subscription-State header based on current server subscription
+ * state.
+ */
+static pjsip_sub_state_hdr* sub_state_create( pj_pool_t *pool,
+					      pjsip_evsub *sub,
+					      pjsip_evsub_state state,
+					      const pj_str_t *state_str,
+					      const pj_str_t *reason )
+{
+    pjsip_sub_state_hdr *sub_state;
+    pj_time_val now, delay;
+
+    /* Get the remaining time before refresh is required */
+    pj_gettimeofday(&now);
+    delay = sub->refresh_time;
+    PJ_TIME_VAL_SUB(delay, now);
+
+    /* Create the Subscription-State header */
+    sub_state = pjsip_sub_state_hdr_create(pool);
+
+    /* Fill up the header */
+    switch (state) {
+    case PJSIP_EVSUB_STATE_NULL:
+    case PJSIP_EVSUB_STATE_SENT:
+    case PJSIP_EVSUB_STATE_ACCEPTED:
+	pj_assert(!"Invalid state!");
+	/* Treat as pending */
+
+    case PJSIP_EVSUB_STATE_PENDING:
+	sub_state->sub_state = STR_PENDING;
+	sub_state->expires_param = delay.sec;
+	break;
+
+    case PJSIP_EVSUB_STATE_ACTIVE:
+	sub_state->sub_state = STR_ACTIVE;
+	sub_state->expires_param = delay.sec;
+	break;
+
+    case PJSIP_EVSUB_STATE_TERMINATED:
+	sub_state->sub_state = STR_TERMINATED;
+	if (reason != NULL)
+	    pj_strdup(pool, &sub_state->reason_param, reason);
+	break;
+
+    case PJSIP_EVSUB_STATE_UNKNOWN:
+	pj_assert(state_str != NULL);
+	pj_strdup(pool, &sub_state->sub_state, state_str);
+	break;
+    }
+    
+    return sub_state;
+}
+
+/*
+ * Create and send NOTIFY request.
+ */
+PJ_DEF(pj_status_t) pjsip_evsub_notify( pjsip_evsub *sub,
+					pjsip_evsub_state state,
+					const pj_str_t *state_str,
+					const pj_str_t *reason,
+					pjsip_tx_data **p_tdata)
+{
+    pjsip_tx_data *tdata;
+    pjsip_sub_state_hdr *sub_state;
+    pj_status_t status;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(sub!=NULL && p_tdata!=NULL, PJ_EINVAL);
+
+    /* Lock dialog. */
+    pjsip_dlg_inc_lock(sub->dlg);
+
+    /* Create NOTIFY request */
+    status = pjsip_dlg_create_request( sub->dlg, &pjsip_notify_method, -1, 
+				       &tdata);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+    /* Add Event header */
+    pjsip_msg_add_hdr(tdata->msg,
+		      pjsip_hdr_shallow_clone(tdata->pool, sub->event));
+
+    /* Add Subscription-State header */
+    sub_state = sub_state_create(tdata->pool, sub, state, state_str,
+				 reason);
+    pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)sub_state);
+
+    /* Add Allow-Events header */
+    pjsip_msg_add_hdr(tdata->msg,
+		      pjsip_hdr_shallow_clone(tdata->pool, mod_evsub.allow_events_hdr));
+
+    /* Add Authentication headers. */
+    pjsip_auth_clt_init_req( &sub->dlg->auth_sess, tdata );
+
+    
+
+    /* Save destination state. */
+    sub->dst_state = state;
+    if (state_str)
+	pj_strdup(sub->pool, &sub->dst_state_str, state_str);
+    else
+	sub->dst_state_str.slen = 0;
+
+
+    *p_tdata = tdata;
+
+on_return:
+    /* Unlock dialog */
+    pjsip_dlg_dec_lock(sub->dlg);
+    return status;
+}
+
+
+/*
+ * Create NOTIFY to reflect current status.
+ */
+PJ_DEF(pj_status_t) pjsip_evsub_current_notify( pjsip_evsub *sub,
+						pjsip_tx_data **p_tdata )
+{
+    return pjsip_evsub_notify( sub, sub->state, &sub->state_str, 
+			       NULL, p_tdata );
+}
+
+
+/*
+ * Send request.
+ */
+PJ_DEF(pj_status_t) pjsip_evsub_send_request( pjsip_evsub *sub,
+					      pjsip_tx_data *tdata)
+{
+    pj_status_t status;
+
+    /* Must be request message. */
+    PJ_ASSERT_RETURN(tdata->msg->type == PJSIP_REQUEST_MSG,
+		     PJSIP_ENOTREQUESTMSG);
+
+    /* Lock */
+    pjsip_dlg_inc_lock(sub->dlg);
+
+    /* Send the request. */
+    status = pjsip_dlg_send_request(sub->dlg, tdata, -1, NULL);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+
+    /* Special case for NOTIFY:
+     * The new state was set in pjsip_evsub_notify(), but we apply the
+     * new state now, when the request was actually sent.
+     */
+    if (pjsip_method_cmp(&tdata->msg->line.req.method, 
+			 &pjsip_notify_method)==0) 
+    {
+	PJ_ASSERT_ON_FAIL(  sub->dst_state!=PJSIP_EVSUB_STATE_NULL,
+			    {goto on_return;});
+
+	set_state(sub, sub->dst_state, 
+		  (sub->dst_state_str.slen ? &sub->dst_state_str : NULL), 
+		  NULL);
+
+	sub->dst_state = PJSIP_EVSUB_STATE_NULL;
+	sub->dst_state_str.slen = 0;
+
+    }
+
+
+on_return:
+    pjsip_dlg_dec_lock(sub->dlg);
+    return status;
+}
+
+
+
+/*
+ * Attach subscription session to newly created transaction, if appropriate.
+ */
+static pjsip_evsub *on_new_transaction( pjsip_transaction *tsx,
+				        pjsip_event *event)
+{
+    /*
+     * Newly created transaction will not have subscription session
+     * attached to it. Find the subscription session from the dialog,
+     * by matching the Event header.
+     */
+    pjsip_dialog *dlg;
+    pjsip_event_hdr *event_hdr;
+    pjsip_msg *msg;
+    struct dlgsub *dlgsub_head, *dlgsub;
+    pjsip_evsub *sub;
+    
+    dlg = pjsip_tsx_get_dlg(tsx);
+    if (!dlg) {
+	pj_assert(!"Transaction should have a dialog instance!");
+	return NULL;
+    }
+
+
+    switch (event->body.tsx_state.type) {
+    case PJSIP_EVENT_RX_MSG:
+	msg = event->body.tsx_state.src.rdata->msg_info.msg;
+	break;
+    case PJSIP_EVENT_TX_MSG:
+	msg = event->body.tsx_state.src.tdata->msg;
+	break;
+    default:
+	if (tsx->role == PJSIP_ROLE_UAC)
+	    msg = tsx->last_tx->msg;
+	else
+	    msg = NULL;
+	break;
+    }
+    
+    if (!msg) {
+	//Note:
+	// this transaction can be other transaction in the dialog.
+	// The assertion below probably only valid for dialog that
+	// only has one event subscription usage.
+	//pj_assert(!"First transaction event is not TX or RX!");
+	return NULL;
+    }
+
+    event_hdr = pjsip_msg_find_hdr_by_name(msg, &STR_EVENT, NULL);
+    if (!event_hdr) {
+	/* Not subscription related message */
+	return NULL;
+    }
+
+    /* Find the subscription in the dialog, based on the content
+     * of Event header: 
+     */
+
+    dlgsub_head = dlg->mod_data[mod_evsub.mod.id];
+    if (dlgsub_head == NULL) {
+	dlgsub_head = pj_pool_alloc(dlg->pool, sizeof(struct dlgsub));
+	pj_list_init(dlgsub_head);
+	dlg->mod_data[mod_evsub.mod.id] = dlgsub_head;
+    }
+    dlgsub = dlgsub_head->next;
+
+    while (dlgsub != dlgsub_head) {
+
+	if (pj_stricmp(&dlgsub->sub->event->event_type, 
+		       &event_hdr->event_type)==0)
+	{
+	    /* Event type matched. 
+	     * Check if event ID matched too.
+	     */
+	    if (pj_strcmp(&dlgsub->sub->event->id_param, 
+			  &event_hdr->id_param)==0)
+	    {
+		
+		break;
+
+	    }
+	    /*
+	     * Otherwise if it is an UAC subscription, AND
+	     * PJSIP_EVSUB_NO_EVENT_ID flag is set, AND
+	     * the session's event id is NULL, AND
+	     * the incoming request is NOTIFY with event ID, then
+	     * we consider it as a match, and update the
+	     * session's event id.
+	     */
+	    else if (dlgsub->sub->role == PJSIP_ROLE_UAC &&
+		     (dlgsub->sub->option & PJSIP_EVSUB_NO_EVENT_ID)!=0 &&
+		     dlgsub->sub->event->id_param.slen==0 &&
+		     !pjsip_method_cmp(&tsx->method, &pjsip_notify_method))
+	    {
+		/* Update session's event id. */
+		pj_strdup(dlgsub->sub->pool, 
+			  &dlgsub->sub->event->id_param,
+			  &event_hdr->id_param);
+
+		break;
+	    }
+	}
+	
+
+
+	dlgsub = dlgsub->next;
+    }
+
+    if (dlgsub == dlgsub_head) {
+	/* This could be incoming request to create new subscription */
+	PJ_LOG(4,(THIS_FILE, 
+		  "Subscription not found for %.*s, event=%.*s;id=%.*s",
+		  (int)tsx->method.name.slen,
+		  tsx->method.name.ptr,
+		  (int)event_hdr->event_type.slen,
+		  event_hdr->event_type.ptr,
+		  (int)event_hdr->id_param.slen,
+		  event_hdr->id_param.ptr));
+
+	/* If this is an incoming NOTIFY, reject with 481 */
+	if (tsx->state == PJSIP_TSX_STATE_TRYING &&
+	    pjsip_method_cmp(&tsx->method, &pjsip_notify_method)==0)
+	{
+	    pj_str_t reason = pj_str("Subscription Does Not Exist");
+	    pjsip_tx_data *tdata;
+	    pj_status_t status;
+
+	    status = pjsip_dlg_create_response(dlg, 
+					       event->body.tsx_state.src.rdata, 
+					       481, &reason, 
+					       &tdata);
+	    if (status == PJ_SUCCESS) {
+		status = pjsip_dlg_send_response(dlg, tsx, tdata);
+	    }
+	}
+	return NULL;
+    }
+
+    /* Found! */
+    sub = dlgsub->sub;
+
+    /* Attach session to the transaction */
+    tsx->mod_data[mod_evsub.mod.id] = sub;
+    sub->pending_tsx++;
+
+    /* Special case for outgoing/UAC SUBSCRIBE/REFER transaction. 
+     * We can only have one pending UAC SUBSCRIBE/REFER, so if another 
+     * transaction is started while previous one still alive, terminate
+     * the older one.
+     *
+     * Sample scenario:
+     *	- subscribe sent to destination that doesn't exist, transaction
+     *	  is still retransmitting request, then unsubscribe is sent.
+     */
+    if (tsx->role == PJSIP_ROLE_UAC &&
+	tsx->state == PJSIP_TSX_STATE_CALLING &&
+	(pjsip_method_cmp(&tsx->method, &sub->method) == 0  ||
+	 pjsip_method_cmp(&tsx->method, &pjsip_subscribe_method) == 0))
+    {
+
+	if (sub->pending_sub && 
+	    sub->pending_sub->state < PJSIP_TSX_STATE_COMPLETED) 
+	{
+	    PJ_LOG(4,(sub->obj_name, 
+		      "Cancelling pending subscription request"));
+
+	    /* By convention, we use 490 (Request Updated) status code.
+	     * When transaction handler (below) see this status code, it
+	     * will ignore the transaction.
+	     */
+	    pjsip_tsx_terminate(sub->pending_sub, PJSIP_SC_REQUEST_UPDATED);
+	}
+
+	sub->pending_sub = tsx;
+
+    }
+
+    return sub;
+}
+
+
+/*
+ * Create response, adding custome headers and msg body.
+ */
+static pj_status_t create_response( pjsip_evsub *sub,
+				    pjsip_rx_data *rdata,
+				    int st_code,
+				    const pj_str_t *st_text,
+				    const pjsip_hdr *res_hdr,
+				    const pjsip_msg_body *body,
+				    pjsip_tx_data **p_tdata)
+{
+    pjsip_tx_data *tdata;
+    pjsip_hdr *hdr;
+    pj_status_t status;
+
+    status = pjsip_dlg_create_response(sub->dlg, rdata,
+				       st_code, st_text, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    *p_tdata = tdata;
+
+    /* Add response headers. */
+    hdr = res_hdr->next;
+    while (hdr != res_hdr) {
+	pjsip_msg_add_hdr( tdata->msg, 
+			   pjsip_hdr_clone(tdata->pool, hdr));
+	hdr = hdr->next;
+    }
+
+    /* Add msg body, if any */
+    if (body) {
+	tdata->msg->body = pjsip_msg_body_clone(tdata->pool, body);
+	if (tdata->msg->body == NULL) {
+
+	    PJ_LOG(4,(THIS_FILE, "Error: unable to clone msg body"));
+
+	    /* Ignore */
+	    return PJ_SUCCESS;
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Get subscription state from the value of Subscription-State header.
+ */
+static void get_hdr_state( pjsip_sub_state_hdr *sub_state,
+			   pjsip_evsub_state *state,
+			   pj_str_t **state_str )
+{
+    if (pj_stricmp(&sub_state->sub_state, &STR_TERMINATED)==0) {
+
+	*state = PJSIP_EVSUB_STATE_TERMINATED;
+	*state_str = NULL;
+
+    } else if (pj_stricmp(&sub_state->sub_state, &STR_ACTIVE)==0) {
+
+	*state = PJSIP_EVSUB_STATE_ACTIVE;
+	*state_str = NULL;
+
+    } else if (pj_stricmp(&sub_state->sub_state, &STR_PENDING)==0) {
+
+	*state = PJSIP_EVSUB_STATE_PENDING;
+	*state_str = NULL;
+
+    } else {
+
+	*state = PJSIP_EVSUB_STATE_UNKNOWN;
+	*state_str = &sub_state->sub_state;
+
+    }
+}
+
+/*
+ * Transaction event processing by UAC, after subscription is sent.
+ */
+static void on_tsx_state_uac( pjsip_evsub *sub, pjsip_transaction *tsx,
+			      pjsip_event *event )
+{
+
+    if (pjsip_method_cmp(&tsx->method, &sub->method)==0 || 
+	pjsip_method_cmp(&tsx->method, &pjsip_subscribe_method)==0) 
+    {
+
+	/* Received response to outgoing request that establishes/refresh
+	 * subscription. 
+	 */
+
+	/* First time initial request is sent. */
+	if (sub->state == PJSIP_EVSUB_STATE_NULL &&
+	    tsx->state == PJSIP_TSX_STATE_CALLING)
+	{
+	    set_state(sub, PJSIP_EVSUB_STATE_SENT, NULL, event);
+	    return;
+	}
+
+	/* Only interested in final response */
+	if (tsx->state != PJSIP_TSX_STATE_COMPLETED &&
+	    tsx->state != PJSIP_TSX_STATE_TERMINATED)
+	{
+	    return;
+	}
+
+	/* Clear pending subscription */
+	if (tsx == sub->pending_sub)
+	    sub->pending_sub = NULL;
+
+	/* Handle authentication. */
+	if (tsx->status_code==401 || tsx->status_code==407) {
+	    pjsip_tx_data *tdata;
+	    pj_status_t status;
+
+	    if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+		/* Previously failed transaction has terminated */
+		return;
+	    }
+
+	    status = pjsip_auth_clt_reinit_req(&sub->dlg->auth_sess,
+					       event->body.tsx_state.src.rdata,
+					       tsx->last_tx, &tdata);
+	    if (status == PJ_SUCCESS) 
+		status = pjsip_dlg_send_request(sub->dlg, tdata, -1, NULL);
+	    
+	    if (status != PJ_SUCCESS) {
+		/* Authentication failed! */
+		set_state(sub, PJSIP_EVSUB_STATE_TERMINATED,
+			       NULL,
+			       event);
+		return;
+	    }
+
+	    return;
+	}
+
+	if (tsx->status_code/100 == 2) {
+
+	    /* Successfull SUBSCRIBE request! 
+	     * This could be:
+	     *	- response to initial SUBSCRIBE request
+	     *	- response to subsequent refresh
+	     *	- response to unsubscription
+	     */
+
+	    if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+		/* Ignore; this transaction has been processed before */
+		return;
+	    }
+
+	    /* Update UAC refresh time, if response contains Expires header,
+	     * only when we're not unsubscribing. 
+	     */
+	    if (sub->expires->ivalue != 0) {
+		pjsip_msg *msg;
+		pjsip_expires_hdr *expires;
+
+		msg = event->body.tsx_state.src.rdata->msg_info.msg;
+		expires = pjsip_msg_find_hdr(msg, PJSIP_H_EXPIRES, NULL);
+		if (expires) {
+		    sub->expires->ivalue = expires->ivalue;
+		}
+	    }
+
+	    /* Update time */
+	    update_expires(sub, sub->expires->ivalue);
+
+	    /* Start UAC refresh timer, only when we're not unsubscribing */
+	    if (sub->expires->ivalue != 0) {
+		unsigned timeout = (sub->expires->ivalue > TIME_UAC_REFRESH) ?
+		    sub->expires->ivalue - TIME_UAC_REFRESH : sub->expires->ivalue;
+
+		PJ_LOG(5,(sub->obj_name, "Will refresh in %d seconds", 
+			  timeout));
+		set_timer(sub, TIMER_TYPE_UAC_REFRESH, timeout);
+
+	    } else {
+		/* Otherwise set timer to terminate client subscription when
+		 * NOTIFY to end subscription is not received.
+		 */
+		set_timer(sub, TIMER_TYPE_UAC_TERMINATE, TIME_UAC_TERMINATE);
+	    }
+	    
+	    /* Set state, if necessary */
+	    pj_assert(sub->state != PJSIP_EVSUB_STATE_NULL);
+	    if (sub->state == PJSIP_EVSUB_STATE_SENT) {
+		set_state(sub, PJSIP_EVSUB_STATE_ACCEPTED, NULL, event);
+	    }
+
+	} else {
+
+	    /* Failed SUBSCRIBE request! 
+	     *
+	     * The RFC 3265 says that if outgoing SUBSCRIBE fails with status
+	     * other than 481, the subscription is still considered valid for
+	     * the duration of the last Expires.
+	     *
+	     * Since we send refresh about 5 seconds (TIME_UAC_REFRESH) before 
+	     * expiration, theoritically the expiration is still valid for the 
+	     * next 5 seconds even when we receive non-481 failed response.
+	     *
+	     * Ah, what the heck!
+	     *
+	     * Just terminate now!
+	     *
+	     */
+
+	    if (sub->state == PJSIP_EVSUB_STATE_TERMINATED) {
+		/* Ignore, has been handled before */
+		return;
+	    }
+
+	    /* Ignore 490 (Request Updated) status. 
+	     * This happens when application sends SUBSCRIBE/REFER while 
+	     * another one is still in progress.
+	     */
+	    if (tsx->status_code == PJSIP_SC_REQUEST_UPDATED) {
+		return;
+	    }
+
+	    /* Kill any timer. */
+	    set_timer(sub, TIMER_TYPE_NONE, 0);
+
+	    /* Set state to TERMINATED */
+	    set_state(sub, PJSIP_EVSUB_STATE_TERMINATED, 
+		      NULL, event);
+
+	}
+
+    } else if (pjsip_method_cmp(&tsx->method, &pjsip_notify_method) == 0) {
+
+	/* Incoming NOTIFY. 
+	 * This can be the result of:
+	 *  - Initial subscription response
+	 *  - UAS updating the resource info.
+	 *  - Unsubscription response.
+	 */
+	int st_code = 200;
+	pj_str_t *st_text = NULL;
+	pjsip_hdr res_hdr;
+	pjsip_msg_body *body = NULL;
+
+	pjsip_rx_data *rdata;
+	pjsip_msg *msg;
+	pjsip_sub_state_hdr *sub_state;
+
+	pjsip_evsub_state new_state;
+	pj_str_t *new_state_str;
+
+	pjsip_tx_data *tdata;
+	pj_status_t status;
+	int next_refresh;
+
+	/* Only want to handle initial NOTIFY receive event. */
+	if (tsx->state != PJSIP_TSX_STATE_TRYING)
+	    return;
+
+
+	rdata = event->body.tsx_state.src.rdata;
+	msg = rdata->msg_info.msg;
+
+	pj_list_init(&res_hdr);
+
+	/* Get subscription state header. */
+	sub_state = pjsip_msg_find_hdr_by_name(msg, &STR_SUB_STATE, NULL);
+	if (sub_state == NULL) {
+
+	    pjsip_warning_hdr *warn_hdr;
+	    pj_str_t warn_text = { "Missing Subscription-State header", 33};
+
+	    /* Bad request! Add warning header. */
+	    st_code = PJSIP_SC_BAD_REQUEST;
+	    warn_hdr = pjsip_warning_hdr_create(rdata->tp_info.pool, 399,
+					        pjsip_endpt_name(sub->endpt),
+						&warn_text);
+	    pj_list_push_back(&res_hdr, warn_hdr);
+	}
+
+	/* Call application registered callback to handle incoming NOTIFY,
+	 * if any.
+	 */
+	if (st_code==200 && sub->user.on_rx_notify && sub->call_cb) {
+	    (*sub->user.on_rx_notify)(sub, rdata, &st_code, &st_text, 
+				      &res_hdr, &body);
+
+	    /* Application MUST specify final response! */
+	    PJ_ASSERT_ON_FAIL(st_code >= 200, {st_code=200; });
+
+	    /* Must be a valid status code */
+	    PJ_ASSERT_ON_FAIL(st_code <= 699, {st_code=500; });
+	}
+
+
+	/* If non-2xx should be returned, then send the response.
+	 * No need to update server subscription state.
+	 */
+	if (st_code >= 300) {
+	    status = create_response(sub, rdata, st_code, st_text, &res_hdr,
+				     body, &tdata);
+	    if (status == PJ_SUCCESS) {
+		status = pjsip_dlg_send_response(sub->dlg, tsx, tdata);
+	    }
+
+	    /* Start timer to terminate subscription, just in case server
+	     * is not able to generate NOTIFY to our response.
+	     */
+	    if (status == PJ_SUCCESS) {
+		unsigned timeout = TIME_UAC_WAIT_NOTIFY;
+		set_timer(sub, TIMER_TYPE_UAC_WAIT_NOTIFY, timeout);
+	    } else {
+		set_state(sub, PJSIP_EVSUB_STATE_TERMINATED, NULL, NULL);
+	    }
+
+	    return;
+	}
+
+	/* Update expiration from the value of expires param in
+	 * Subscription-State header, but ONLY when subscription state 
+	 * is "active" or "pending", AND the header contains expires param.
+	 */
+	if (sub->expires->ivalue != 0 &&
+	    sub_state->expires_param >= 0 &&
+	    (pj_stricmp(&sub_state->sub_state, &STR_ACTIVE)==0 ||
+	     pj_stricmp(&sub_state->sub_state, &STR_PENDING)==0))
+	{
+	    next_refresh = sub_state->expires_param;
+
+	} else {
+	    next_refresh = sub->expires->ivalue;
+	}
+
+	/* Update time */
+	update_expires(sub, next_refresh);
+
+	/* Start UAC refresh timer, only when we're not unsubscribing */
+	if (sub->expires->ivalue != 0) {
+	    unsigned timeout = (next_refresh > TIME_UAC_REFRESH) ?
+		next_refresh - TIME_UAC_REFRESH : next_refresh;
+
+	    PJ_LOG(5,(sub->obj_name, "Will refresh in %d seconds", timeout));
+	    set_timer(sub, TIMER_TYPE_UAC_REFRESH, timeout);
+	}
+	
+	/* Find out the state */
+	get_hdr_state(sub_state, &new_state, &new_state_str);
+
+	/* Send response. */
+	status = create_response(sub, rdata, st_code, st_text, &res_hdr,
+				 body, &tdata);
+	if (status == PJ_SUCCESS)
+	    status = pjsip_dlg_send_response(sub->dlg, tsx, tdata);
+
+	/* Set the state */
+	if (status == PJ_SUCCESS) {
+	    set_state(sub, new_state, new_state_str, event);
+	} else {
+	    set_state(sub, PJSIP_EVSUB_STATE_TERMINATED, NULL, event);
+	}
+
+
+    } else {
+
+	/*
+	 * Unexpected method!
+	 */
+	PJ_LOG(4,(sub->obj_name, "Unexpected transaction method %.*s",
+		 (int)tsx->method.name.slen, tsx->method.name.ptr));
+    }
+}
+
+
+/*
+ * Transaction event processing by UAS, after subscription is accepted.
+ */
+static void on_tsx_state_uas( pjsip_evsub *sub, pjsip_transaction *tsx,
+			      pjsip_event *event)
+{
+
+    if (pjsip_method_cmp(&tsx->method, &sub->method) == 0 ||
+	pjsip_method_cmp(&tsx->method, &pjsip_subscribe_method) == 0) 
+    {
+	
+	/*
+	 * Incoming request (e.g. SUBSCRIBE or REFER) to refresh subsciption.
+	 *
+	 */
+	pjsip_rx_data *rdata;
+	pjsip_event_hdr *event_hdr;
+	pjsip_expires_hdr *expires;
+	pjsip_msg *msg;
+	pjsip_tx_data *tdata;
+	int st_code = 200;
+	pj_str_t *st_text = NULL;
+	pjsip_hdr res_hdr;
+	pjsip_msg_body *body = NULL;
+	pjsip_evsub_state old_state;
+	pj_str_t old_state_str;
+	pj_status_t status;
+
+
+	/* Only wants to handle the first event when the request is 
+	 * received.
+	 */
+	if (tsx->state != PJSIP_TSX_STATE_TRYING)
+	    return;
+
+	rdata = event->body.tsx_state.src.rdata;
+	msg = rdata->msg_info.msg;
+
+	/* Set expiration time based on client request (in Expires header),
+	 * or package default expiration time.
+	 */
+	event_hdr = pjsip_msg_find_hdr_by_name(msg, &STR_EVENT, NULL);
+	expires = pjsip_msg_find_hdr(msg, PJSIP_H_EXPIRES, NULL);
+	if (event_hdr && expires) {
+	    struct evpkg *evpkg;
+
+	    evpkg = find_pkg(&event_hdr->event_type);
+	    if (evpkg) {
+		if (expires->ivalue < (pj_int32_t)evpkg->pkg_expires)
+		    sub->expires->ivalue = expires->ivalue;
+		else
+		    sub->expires->ivalue = evpkg->pkg_expires;
+	    }
+	}
+	
+	/* Update time (before calling on_rx_refresh, since application
+	 * will send NOTIFY.
+	 */
+	update_expires(sub, sub->expires->ivalue);
+
+
+	/* Save old state.
+	 * If application respond with non-2xx, revert to old state.
+	 */
+	old_state = sub->state;
+	old_state_str = sub->state_str;
+
+	if (sub->expires->ivalue == 0) {
+	    sub->state = PJSIP_EVSUB_STATE_TERMINATED;
+	    sub->state_str = evsub_state_names[sub->state];
+	} else  if (sub->state == PJSIP_EVSUB_STATE_NULL) {
+	    sub->state = PJSIP_EVSUB_STATE_ACCEPTED;
+	    sub->state_str = evsub_state_names[sub->state];
+	}
+
+	/* Call application's on_rx_refresh, just in case it wants to send
+	 * response other than 200 (OK)
+	 */
+	pj_list_init(&res_hdr);
+
+	if (sub->user.on_rx_refresh && sub->call_cb) {
+	    (*sub->user.on_rx_refresh)(sub, rdata, &st_code, &st_text, 
+				       &res_hdr, &body);
+	}
+
+	/* Application MUST specify final response! */
+	PJ_ASSERT_ON_FAIL(st_code >= 200, {st_code=200; });
+
+	/* Must be a valid status code */
+	PJ_ASSERT_ON_FAIL(st_code <= 699, {st_code=500; });
+
+
+	/* Create and send response */
+	status = create_response(sub, rdata, st_code, st_text, &res_hdr,
+				 body, &tdata);
+	if (status == PJ_SUCCESS) {
+	    /* Add expires header: */
+	    pjsip_msg_add_hdr( tdata->msg,
+			       pjsip_hdr_shallow_clone(tdata->pool, 
+						       sub->expires));
+
+	    /* Send */
+	    status = pjsip_dlg_send_response(sub->dlg, tsx, tdata);
+	}
+
+	/* Update state or revert state */
+	if (st_code/100==2) {
+	    
+	    if (sub->expires->ivalue == 0) {
+		set_state(sub, sub->state, NULL, event);
+	    } else  if (sub->state == PJSIP_EVSUB_STATE_NULL) {
+		set_state(sub, sub->state, NULL, event);
+	    }
+
+	    /* Set UAS timeout timer, when state is not terminated. */
+	    if (sub->state != PJSIP_EVSUB_STATE_TERMINATED) {
+		PJ_LOG(5,(sub->obj_name, "UAS timeout in %d seconds",
+			  sub->expires->ivalue));
+		set_timer(sub, TIMER_TYPE_UAS_TIMEOUT, 
+			  sub->expires->ivalue);
+	    }
+
+	}  else {
+	    sub->state = old_state;
+	    sub->state_str = old_state_str;
+	}
+
+
+    } else if (pjsip_method_cmp(&tsx->method, &pjsip_notify_method)==0) {
+
+	/* Handle authentication */ 
+	if (tsx->state == PJSIP_TSX_STATE_COMPLETED &&
+	    (tsx->status_code==401 || tsx->status_code==407))
+	{
+	    pjsip_rx_data *rdata = event->body.tsx_state.src.rdata;
+	    pjsip_tx_data *tdata;
+	    pj_status_t status;
+
+	    status = pjsip_auth_clt_reinit_req( &sub->dlg->auth_sess, rdata, 
+						tsx->last_tx, &tdata);
+	    if (status == PJ_SUCCESS)
+		status = pjsip_dlg_send_request( sub->dlg, tdata, -1, NULL );
+
+	    if (status != PJ_SUCCESS) {
+		/* Can't authenticate. Terminate session (?) */
+		set_state(sub, PJSIP_EVSUB_STATE_TERMINATED, NULL, NULL);
+		return;
+	    }
+
+	}
+	/*
+	 * Terminate event usage if we receive 481, 408, and 7 class
+	 * responses.
+	 */
+	if (sub->state != PJSIP_EVSUB_STATE_TERMINATED &&
+	    (tsx->status_code==481 || tsx->status_code==408 ||
+	     tsx->status_code/100 == 7))
+	{
+	    set_state(sub, PJSIP_EVSUB_STATE_TERMINATED, NULL, event);
+	    return;
+	}
+
+    } else {
+
+	/*
+	 * Unexpected method!
+	 */
+	PJ_LOG(4,(sub->obj_name, "Unexpected transaction method %.*s",
+		 (int)tsx->method.name.slen, tsx->method.name.ptr));
+    
+    }
+}
+
+
+/*
+ * Notification when transaction state has changed!
+ */
+static void mod_evsub_on_tsx_state(pjsip_transaction *tsx, pjsip_event *event)
+{
+    pjsip_evsub *sub = pjsip_tsx_get_evsub(tsx);
+
+    if (sub == NULL) {
+	sub = on_new_transaction(tsx, event);
+	if (sub == NULL)
+	    return;
+    }
+
+
+    /* Call on_tsx_state callback, if any. */
+    if (sub->user.on_tsx_state && sub->call_cb)
+	(*sub->user.on_tsx_state)(sub, tsx, event);
+
+
+    /* Process the event: */
+
+    if (sub->role == PJSIP_ROLE_UAC) {
+	on_tsx_state_uac(sub, tsx, event);
+    } else {
+	on_tsx_state_uas(sub, tsx, event);
+    }
+
+
+    /* Check transaction TERMINATE event */
+    if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	--sub->pending_tsx;
+
+	if (sub->state == PJSIP_EVSUB_STATE_TERMINATED &&
+	    sub->pending_tsx == 0)
+	{
+	    evsub_destroy(sub);
+	}
+
+    }
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/evsub_msg.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/evsub_msg.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/evsub_msg.c	(revision 1163)
@@ -0,0 +1,296 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip-simple/evsub_msg.h>
+#include <pjsip/print_util.h>
+#include <pjsip/sip_parser.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/except.h>
+
+/*
+ * Event header.
+ */
+static int pjsip_event_hdr_print( pjsip_event_hdr *hdr, 
+				  char *buf, pj_size_t size);
+static pjsip_event_hdr* pjsip_event_hdr_clone( pj_pool_t *pool, 
+					       const pjsip_event_hdr *hdr);
+static pjsip_event_hdr* pjsip_event_hdr_shallow_clone( pj_pool_t *pool,
+						       const pjsip_event_hdr*);
+
+static pjsip_hdr_vptr event_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &pjsip_event_hdr_clone,
+    (pjsip_hdr_clone_fptr) &pjsip_event_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &pjsip_event_hdr_print,
+};
+
+
+PJ_DEF(pjsip_event_hdr*) pjsip_event_hdr_create(pj_pool_t *pool)
+{
+    pjsip_event_hdr *hdr = pj_pool_zalloc(pool, sizeof(*hdr));
+    hdr->type = PJSIP_H_OTHER;
+    hdr->name.ptr = "Event";
+    hdr->name.slen = 5;
+    hdr->sname.ptr = "o";
+    hdr->sname.slen = 1;
+    hdr->vptr = &event_hdr_vptr;
+    pj_list_init(hdr);
+    pj_list_init(&hdr->other_param);
+    return hdr;
+}
+
+static int pjsip_event_hdr_print( pjsip_event_hdr *hdr, 
+				  char *buf, pj_size_t size)
+{
+    char *p = buf;
+    char *endbuf = buf+size;
+    int printed;
+
+    copy_advance(p, hdr->name);
+    *p++ = ':';
+    *p++ = ' ';
+
+    copy_advance(p, hdr->event_type);
+    copy_advance_pair(p, ";id=", 4, hdr->id_param);
+    
+    printed = pjsip_param_print_on(&hdr->other_param, p, endbuf-p,
+				   &pjsip_TOKEN_SPEC, 
+				   &pjsip_TOKEN_SPEC, ';');
+    if (printed < 0)
+	return printed;
+
+    p += printed;
+    return p - buf;
+}
+
+static pjsip_event_hdr* pjsip_event_hdr_clone( pj_pool_t *pool, 
+					       const pjsip_event_hdr *rhs)
+{
+    pjsip_event_hdr *hdr = pjsip_event_hdr_create(pool);
+    pj_strdup(pool, &hdr->event_type, &rhs->event_type);
+    pj_strdup(pool, &hdr->id_param, &rhs->id_param);
+    pjsip_param_clone(pool, &hdr->other_param, &rhs->other_param);
+    return hdr;
+}
+
+static pjsip_event_hdr* 
+pjsip_event_hdr_shallow_clone( pj_pool_t *pool,
+			       const pjsip_event_hdr *rhs )
+{
+    pjsip_event_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    pjsip_param_shallow_clone(pool, &hdr->other_param, &rhs->other_param);
+    return hdr;
+}
+
+
+/*
+ * Allow-Events header.
+ */
+PJ_DEF(pjsip_allow_events_hdr*) pjsip_allow_events_hdr_create(pj_pool_t *pool)
+{
+    const pj_str_t STR_ALLOW_EVENTS = { "Allow-Events", 12};
+    pjsip_allow_events_hdr *hdr;
+
+    hdr = pjsip_generic_array_hdr_create(pool, &STR_ALLOW_EVENTS);
+
+    if (hdr) {
+	hdr->sname.ptr = "u";
+	hdr->sname.slen = 1;
+    }
+
+    return hdr;
+}
+
+
+/*
+ * Subscription-State header.
+ */
+static int pjsip_sub_state_hdr_print(pjsip_sub_state_hdr *hdr, 
+				     char *buf, pj_size_t size);
+static pjsip_sub_state_hdr* 
+pjsip_sub_state_hdr_clone(pj_pool_t *pool, 
+			  const pjsip_sub_state_hdr *hdr);
+static pjsip_sub_state_hdr* 
+pjsip_sub_state_hdr_shallow_clone(pj_pool_t *pool,
+				  const pjsip_sub_state_hdr*);
+
+static pjsip_hdr_vptr sub_state_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &pjsip_sub_state_hdr_clone,
+    (pjsip_hdr_clone_fptr) &pjsip_sub_state_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &pjsip_sub_state_hdr_print,
+};
+
+
+PJ_DEF(pjsip_sub_state_hdr*) pjsip_sub_state_hdr_create(pj_pool_t *pool)
+{
+    pj_str_t sub_state = { "Subscription-State", 18 };
+    pjsip_sub_state_hdr *hdr = pj_pool_zalloc(pool, sizeof(*hdr));
+    hdr->type = PJSIP_H_OTHER;
+    hdr->name = hdr->sname = sub_state;
+    hdr->vptr = &sub_state_hdr_vptr;
+    hdr->expires_param = -1;
+    hdr->retry_after = -1;
+    pj_list_init(hdr);
+    pj_list_init(&hdr->other_param);
+    return hdr;
+}
+
+static int pjsip_sub_state_hdr_print(pjsip_sub_state_hdr *hdr, 
+				     char *buf, pj_size_t size)
+{
+    char *p = buf;
+    char *endbuf = buf+size;
+    int printed;
+
+    copy_advance(p, hdr->name);
+    *p++ = ':';
+    *p++ = ' ';
+
+    copy_advance(p, hdr->sub_state);
+    copy_advance_pair(p, ";reason=", 8, hdr->reason_param);
+    if (hdr->expires_param >= 0) {
+	pj_memcpy(p, ";expires=", 9);
+	p += 9;
+	printed = pj_utoa(hdr->expires_param, p);
+	p += printed;
+    }
+    if (hdr->retry_after >= 0) {
+	pj_memcpy(p, ";retry-after=", 13);
+	p += 9;
+	printed = pj_utoa(hdr->retry_after, p);
+	p += printed;
+    }
+    
+    printed = pjsip_param_print_on( &hdr->other_param, p, endbuf-p, 
+				    &pjsip_TOKEN_SPEC,
+				    &pjsip_TOKEN_SPEC,
+				    ';');
+    if (printed < 0)
+	return printed;
+
+    p += printed;
+
+    return p - buf;
+}
+
+static pjsip_sub_state_hdr* 
+pjsip_sub_state_hdr_clone(pj_pool_t *pool, 
+			  const pjsip_sub_state_hdr *rhs)
+{
+    pjsip_sub_state_hdr *hdr = pjsip_sub_state_hdr_create(pool);
+    pj_strdup(pool, &hdr->sub_state, &rhs->sub_state);
+    pj_strdup(pool, &hdr->reason_param, &rhs->reason_param);
+    hdr->retry_after = rhs->retry_after;
+    hdr->expires_param = rhs->expires_param;
+    pjsip_param_clone(pool, &hdr->other_param, &rhs->other_param);
+    return hdr;
+}
+
+static pjsip_sub_state_hdr* 
+pjsip_sub_state_hdr_shallow_clone(pj_pool_t *pool,
+				  const pjsip_sub_state_hdr *rhs)
+{
+    pjsip_sub_state_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    pjsip_param_shallow_clone(pool, &hdr->other_param, &rhs->other_param);
+    return hdr;
+}
+
+
+/*
+ * Parse Event header.
+ */
+static pjsip_hdr *parse_hdr_event(pjsip_parse_ctx *ctx)
+{
+    pjsip_event_hdr *hdr = pjsip_event_hdr_create(ctx->pool);
+    const pj_str_t id_param = { "id", 2 };
+
+    pj_scan_get(ctx->scanner, &pjsip_TOKEN_SPEC, &hdr->event_type);
+
+    while (*ctx->scanner->curptr == ';') {
+	pj_str_t pname, pvalue;
+
+	pj_scan_get_char(ctx->scanner);
+	pjsip_parse_param_imp(ctx->scanner, ctx->pool, &pname, &pvalue, 0);
+
+	if (pj_stricmp(&pname, &id_param)==0) {
+	    hdr->id_param = pvalue;
+	} else {
+	    pjsip_param *param = pj_pool_alloc(ctx->pool, sizeof(pjsip_param));
+	    param->name = pname;
+	    param->value = pvalue;
+	    pj_list_push_back(&hdr->other_param, param);
+	}
+    }
+    pjsip_parse_end_hdr_imp( ctx->scanner );
+    return (pjsip_hdr*)hdr;
+}
+
+/*
+ * Parse Subscription-State header.
+ */
+static pjsip_hdr* parse_hdr_sub_state( pjsip_parse_ctx *ctx )
+{
+    pjsip_sub_state_hdr *hdr = pjsip_sub_state_hdr_create(ctx->pool);
+    const pj_str_t reason = { "reason", 6 },
+		   expires = { "expires", 7 },
+		   retry_after = { "retry-after", 11 };
+    pj_scan_get(ctx->scanner, &pjsip_TOKEN_SPEC, &hdr->sub_state);
+
+    while (*ctx->scanner->curptr == ';') {
+	pj_str_t pname, pvalue;
+
+	pj_scan_get_char(ctx->scanner);
+	pjsip_parse_param_imp(ctx->scanner, ctx->pool, &pname, &pvalue, 0);
+
+	if (pj_stricmp(&pname, &reason) == 0) {
+	    hdr->reason_param = pvalue;
+
+	} else if (pj_stricmp(&pname, &expires) == 0) {
+	    hdr->expires_param = pj_strtoul(&pvalue);
+
+	} else if (pj_stricmp(&pname, &retry_after) == 0) {
+	    hdr->retry_after = pj_strtoul(&pvalue);
+
+	} else {
+	    pjsip_param *param = pj_pool_alloc(ctx->pool, sizeof(pjsip_param));
+	    param->name = pname;
+	    param->value = pvalue;
+	    pj_list_push_back(&hdr->other_param, param);
+	}
+    }
+
+    pjsip_parse_end_hdr_imp( ctx->scanner );
+    return (pjsip_hdr*)hdr;
+}
+
+/*
+ * Register header parsers.
+ */
+PJ_DEF(void) pjsip_evsub_init_parser(void)
+{
+    pjsip_register_hdr_parser( "Event", NULL, 
+			       &parse_hdr_event);
+
+    pjsip_register_hdr_parser( "Subscription-State", NULL, 
+			       &parse_hdr_sub_state);
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/iscomposing.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/iscomposing.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/iscomposing.c	(revision 1163)
@@ -0,0 +1,216 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip-simple/iscomposing.h>
+#include <pjsip-simple/errno.h>
+#include <pjsip/sip_msg.h>
+#include <pjlib-util/errno.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+
+/* MIME */
+static const pj_str_t STR_MIME_TYPE = { "application", 11 };
+static const pj_str_t STR_MIME_SUBTYPE = { "im-iscomposing+xml", 18 };
+
+
+/* XML node constants. */
+static const pj_str_t STR_ISCOMPOSING	= { "isComposing", 11 };
+static const pj_str_t STR_STATE		= { "state", 5 };
+static const pj_str_t STR_ACTIVE	= { "active", 6 };
+static const pj_str_t STR_IDLE		= { "idle", 4 };
+static const pj_str_t STR_LASTACTIVE	= { "lastactive", 10 };
+static const pj_str_t STR_CONTENTTYPE	= { "contenttype", 11 };
+static const pj_str_t STR_REFRESH	= { "refresh", 7 };
+
+
+/* XML attributes constants */
+static const pj_str_t STR_XMLNS_NAME =     { "xmlns", 5 };
+static const pj_str_t STR_XMLNS_VAL =      { "urn:ietf:params:xml:ns:im-iscomposing", 37 };
+static const pj_str_t STR_XMLNS_XSI_NAME = { "xmlns:xsi", 9 };
+static const pj_str_t STR_XMLNS_XSI_VAL  = { "http://www.w3.org/2001/XMLSchema-instance", 41 };
+static const pj_str_t STR_XSI_SLOC_NAME =  { "xsi:schemaLocation", 18 };
+static const pj_str_t STR_XSI_SLOC_VAL =   { "urn:ietf:params:xml:ns:im-composing iscomposing.xsd", 51 };
+
+
+PJ_DEF(pj_xml_node*) pjsip_iscomposing_create_xml( pj_pool_t *pool,
+						   pj_bool_t is_composing,
+						   const pj_time_val *lst_actv,
+						   const pj_str_t *content_tp,
+						   int refresh)
+{
+    pj_xml_node *doc, *node;
+    pj_xml_attr *attr;
+
+    /* Root document. */
+    doc = pj_xml_node_new(pool, &STR_ISCOMPOSING);
+
+    /* Add attributes */
+    attr = pj_xml_attr_new(pool, &STR_XMLNS_NAME, &STR_XMLNS_VAL);
+    pj_xml_add_attr(doc, attr);
+
+    attr = pj_xml_attr_new(pool, &STR_XMLNS_XSI_NAME, &STR_XMLNS_XSI_VAL);
+    pj_xml_add_attr(doc, attr);
+
+    attr = pj_xml_attr_new(pool, &STR_XSI_SLOC_NAME, &STR_XSI_SLOC_VAL);
+    pj_xml_add_attr(doc, attr);
+
+
+    /* Add state. */
+    node = pj_xml_node_new(pool, &STR_STATE);
+    if (is_composing)
+	node->content = STR_ACTIVE;
+    else
+	node->content = STR_IDLE;
+    pj_xml_add_node(doc, node);
+
+    /* Add lastactive, if any. */
+    PJ_UNUSED_ARG(lst_actv);
+    //if (!is_composing && lst_actv) {
+    //	PJ_TODO(IMPLEMENT_LAST_ACTIVE_ATTRIBUTE);
+    //}
+
+    /* Add contenttype, if any. */
+    if (content_tp) {
+	node = pj_xml_node_new(pool, &STR_CONTENTTYPE);
+	pj_strdup(pool, &node->content, content_tp);
+	pj_xml_add_node(doc, node);
+    }
+
+    /* Add refresh, if any. */
+    if (is_composing && refresh > 1 && refresh < 3601) {
+	node = pj_xml_node_new(pool, &STR_REFRESH);
+	node->content.ptr = pj_pool_alloc(pool, 10);
+	node->content.slen = pj_utoa(refresh, node->content.ptr);
+	pj_xml_add_node(doc, node);
+    }
+
+    /* Done! */
+
+    return doc;
+}
+
+
+
+/*
+ * Function to print XML message body.
+ */
+static int xml_print_body( struct pjsip_msg_body *msg_body, 
+			   char *buf, pj_size_t size)
+{
+    return pj_xml_print(msg_body->data, buf, size, PJ_TRUE);
+}
+
+
+/*
+ * Function to clone XML document.
+ */
+static void* xml_clone_data(pj_pool_t *pool, const void *data, unsigned len)
+{
+    PJ_UNUSED_ARG(len);
+    return pj_xml_clone( pool, data);
+}
+
+
+
+PJ_DEF(pjsip_msg_body*) pjsip_iscomposing_create_body( pj_pool_t *pool,
+						   pj_bool_t is_composing,
+						   const pj_time_val *lst_actv,
+						   const pj_str_t *content_tp,
+						   int refresh)
+{
+    pj_xml_node *doc;
+    pjsip_msg_body *body;
+
+    doc = pjsip_iscomposing_create_xml( pool, is_composing, lst_actv,
+					content_tp, refresh);
+    if (doc == NULL)
+	return NULL;
+
+
+    body = pj_pool_zalloc(pool, sizeof(pjsip_msg_body));
+    body->content_type.type = STR_MIME_TYPE;
+    body->content_type.subtype = STR_MIME_SUBTYPE;
+
+    body->data = doc;
+    body->len = 0;
+
+    body->print_body = &xml_print_body;
+    body->clone_data = &xml_clone_data;
+
+    return body;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_iscomposing_parse( pj_pool_t *pool,
+					     char *msg,
+					     pj_size_t len,
+					     pj_bool_t *p_is_composing,
+					     pj_str_t **p_last_active,
+					     pj_str_t **p_content_type,
+					     int *p_refresh )
+{
+    pj_xml_node *doc, *node;
+
+    /* Set defaults: */
+    if (p_is_composing) *p_is_composing = PJ_FALSE;
+    if (p_last_active) *p_last_active = NULL; 
+    if (p_content_type) *p_content_type = NULL;
+
+    /* Parse XML */
+    doc = pj_xml_parse( pool, msg, len);
+    if (!doc)
+	return PJLIB_UTIL_EINXML;
+
+    /* Root document must be "isComposing" */
+    if (pj_stricmp(&doc->name, &STR_ISCOMPOSING) != 0)
+	return PJSIP_SIMPLE_EBADISCOMPOSE;
+
+    /* Get the status. */
+    if (p_is_composing) {
+	node = pj_xml_find_node(doc, &STR_STATE);
+	if (node == NULL)
+	    return PJSIP_SIMPLE_EBADISCOMPOSE;
+	*p_is_composing = (pj_stricmp(&node->content, &STR_ACTIVE)==0);
+    }
+
+    /* Get last active. */
+    if (p_last_active) {
+	node = pj_xml_find_node(doc, &STR_LASTACTIVE);
+	if (node)
+	    *p_last_active = &node->content;
+    }
+
+    /* Get content type */
+    if (p_content_type) {
+	node = pj_xml_find_node(doc, &STR_CONTENTTYPE);
+	if (node)
+	    *p_content_type = &node->content;
+    }
+
+    /* Get refresh */
+    if (p_refresh) {
+	node = pj_xml_find_node(doc, &STR_REFRESH);
+	if (node)
+	    *p_refresh = pj_strtoul(&node->content);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/pidf.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/pidf.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/pidf.c	(revision 1163)
@@ -0,0 +1,357 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip-simple/pidf.h>
+#include <pj/string.h>
+#include <pj/pool.h>
+#include <pj/assert.h>
+
+
+struct pjpidf_op_desc pjpidf_op = 
+{
+    {
+	&pjpidf_pres_construct,
+	&pjpidf_pres_add_tuple,
+	&pjpidf_pres_get_first_tuple,
+	&pjpidf_pres_get_next_tuple,
+	&pjpidf_pres_find_tuple,
+	&pjpidf_pres_remove_tuple,
+	&pjpidf_pres_add_note,
+	&pjpidf_pres_get_first_note,
+	&pjpidf_pres_get_next_note
+    },
+    {
+	&pjpidf_tuple_construct,
+	&pjpidf_tuple_get_id,
+	&pjpidf_tuple_set_id,
+	&pjpidf_tuple_get_status,
+	&pjpidf_tuple_get_contact,
+	&pjpidf_tuple_set_contact,
+	&pjpidf_tuple_set_contact_prio,
+	&pjpidf_tuple_get_contact_prio,
+	&pjpidf_tuple_add_note,
+	&pjpidf_tuple_get_first_note,
+	&pjpidf_tuple_get_next_note,
+	&pjpidf_tuple_get_timestamp,
+	&pjpidf_tuple_set_timestamp,
+	&pjpidf_tuple_set_timestamp_np
+    },
+    {
+	&pjpidf_status_construct,
+	&pjpidf_status_is_basic_open,
+	&pjpidf_status_set_basic_open
+    }
+};
+
+static pj_str_t PRESENCE = { "presence", 8 };
+static pj_str_t ENTITY = { "entity", 6};
+static pj_str_t	TUPLE = { "tuple", 5 };
+static pj_str_t ID = { "id", 2 };
+static pj_str_t NOTE = { "note", 4 };
+static pj_str_t STATUS = { "status", 6 };
+static pj_str_t CONTACT = { "contact", 7 };
+static pj_str_t PRIORITY = { "priority", 8 };
+static pj_str_t TIMESTAMP = { "timestamp", 9 };
+static pj_str_t BASIC = { "basic", 5 };
+static pj_str_t OPEN = { "open", 4 };
+static pj_str_t CLOSED = { "closed", 6 };
+static pj_str_t EMPTY_STRING = { NULL, 0 };
+
+static pj_str_t XMLNS = { "xmlns", 5 };
+static pj_str_t PIDF_XMLNS = { "urn:ietf:params:xml:ns:pidf", 27 };
+
+static void xml_init_node(pj_pool_t *pool, pj_xml_node *node,
+			  pj_str_t *name, const pj_str_t *value)
+{
+    pj_list_init(&node->attr_head);
+    pj_list_init(&node->node_head);
+    node->name = *name;
+    if (value) pj_strdup(pool, &node->content, value);
+    else node->content.ptr=NULL, node->content.slen=0;
+}
+
+static pj_xml_attr* xml_create_attr(pj_pool_t *pool, pj_str_t *name,
+				    const pj_str_t *value)
+{
+    pj_xml_attr *attr = pj_pool_alloc(pool, sizeof(*attr));
+    attr->name = *name;
+    pj_strdup(pool, &attr->value, value);
+    return attr;
+}
+
+/* Presence */
+PJ_DEF(void) pjpidf_pres_construct(pj_pool_t *pool, pjpidf_pres *pres,
+				   const pj_str_t *entity)
+{
+    pj_xml_attr *attr;
+
+    xml_init_node(pool, pres, &PRESENCE, NULL);
+    attr = xml_create_attr(pool, &ENTITY, entity);
+    pj_xml_add_attr(pres, attr);
+    attr = xml_create_attr(pool, &XMLNS, &PIDF_XMLNS);
+    pj_xml_add_attr(pres, attr);
+}
+
+PJ_DEF(pjpidf_tuple*) pjpidf_pres_add_tuple(pj_pool_t *pool, pjpidf_pres *pres,
+					    const pj_str_t *id)
+{
+    pjpidf_tuple *t = pj_pool_alloc(pool, sizeof(*t));
+    pjpidf_tuple_construct(pool, t, id);
+    pj_xml_add_node(pres, t);
+    return t;
+}
+
+PJ_DEF(pjpidf_tuple*) pjpidf_pres_get_first_tuple(pjpidf_pres *pres)
+{
+    return pj_xml_find_node(pres, &TUPLE);
+}
+
+PJ_DEF(pjpidf_tuple*) pjpidf_pres_get_next_tuple(pjpidf_pres *pres, 
+						 pjpidf_tuple *tuple)
+{
+    return pj_xml_find_next_node(pres, tuple, &TUPLE);
+}
+
+static pj_bool_t find_tuple_by_id(pj_xml_node *node, const void *id)
+{
+    return pj_xml_find_attr(node, &ID, id) != NULL;
+}
+
+PJ_DEF(pjpidf_tuple*) pjpidf_pres_find_tuple(pjpidf_pres *pres, const pj_str_t *id)
+{
+    return pj_xml_find(pres, &TUPLE, id, &find_tuple_by_id);
+}
+
+PJ_DEF(void) pjpidf_pres_remove_tuple(pjpidf_pres *pres, pjpidf_tuple *t)
+{
+    PJ_UNUSED_ARG(pres);
+    pj_list_erase(t);
+}
+
+PJ_DEF(pjpidf_note*) pjpidf_pres_add_note(pj_pool_t *pool, pjpidf_pres *pres, 
+					  const pj_str_t *text)
+{
+    pjpidf_note *note = pj_pool_alloc(pool, sizeof(*note));
+    xml_init_node(pool, note, &NOTE, text);
+    pj_xml_add_node(pres, note);
+    return note;
+}
+
+PJ_DEF(pjpidf_note*) pjpidf_pres_get_first_note(pjpidf_pres *pres)
+{
+    return pj_xml_find_node( pres, &NOTE);
+}
+
+PJ_DEF(pjpidf_note*) pjpidf_pres_get_next_note(pjpidf_pres *t, pjpidf_note *note)
+{
+    return pj_xml_find_next_node(t, note, &NOTE);
+}
+
+
+/* Tuple */
+PJ_DEF(void) pjpidf_tuple_construct(pj_pool_t *pool, pjpidf_tuple *t,
+				    const pj_str_t *id)
+{
+    pj_xml_attr *attr;
+    pjpidf_status *st;
+
+    xml_init_node(pool, t, &TUPLE, NULL);
+    attr = xml_create_attr(pool, &ID, id);
+    pj_xml_add_attr(t, attr);
+    st = pj_pool_alloc(pool, sizeof(*st));
+    pjpidf_status_construct(pool, st);
+    pj_xml_add_node(t, st);
+}
+
+PJ_DEF(const pj_str_t*) pjpidf_tuple_get_id(const pjpidf_tuple *t)
+{
+    const pj_xml_attr *attr = pj_xml_find_attr((pj_xml_node*)t, &ID, NULL);
+    pj_assert(attr);
+    return &attr->value;
+}
+
+PJ_DEF(void) pjpidf_tuple_set_id(pj_pool_t *pool, pjpidf_tuple *t, const pj_str_t *id)
+{
+    pj_xml_attr *attr = pj_xml_find_attr(t, &ID, NULL);
+    pj_assert(attr);
+    pj_strdup(pool, &attr->value, id);
+}
+
+
+PJ_DEF(pjpidf_status*) pjpidf_tuple_get_status(pjpidf_tuple *t)
+{
+    pjpidf_status *st = (pjpidf_status*)pj_xml_find_node(t, &STATUS);
+    pj_assert(st);
+    return st;
+}
+
+
+PJ_DEF(const pj_str_t*) pjpidf_tuple_get_contact(const pjpidf_tuple *t)
+{
+    pj_xml_node *node = pj_xml_find_node((pj_xml_node*)t, &CONTACT);
+    if (!node)
+	return &EMPTY_STRING;
+    return &node->content;
+}
+
+PJ_DEF(void) pjpidf_tuple_set_contact(pj_pool_t *pool, pjpidf_tuple *t, 
+				      const pj_str_t *contact)
+{
+    pj_xml_node *node = pj_xml_find_node(t, &CONTACT);
+    if (!node) {
+	node = pj_pool_alloc(pool, sizeof(*node));
+	xml_init_node(pool, node, &CONTACT, contact);
+	pj_xml_add_node(t, node);
+    } else {
+	pj_strdup(pool, &node->content, contact);
+    }
+}
+
+PJ_DEF(void) pjpidf_tuple_set_contact_prio(pj_pool_t *pool, pjpidf_tuple *t, 
+					   const pj_str_t *prio)
+{
+    pj_xml_node *node = pj_xml_find_node(t, &CONTACT);
+    pj_xml_attr *attr;
+
+    if (!node) {
+	node = pj_pool_alloc(pool, sizeof(*node));
+	xml_init_node(pool, node, &CONTACT, NULL);
+	pj_xml_add_node(t, node);
+    }
+    attr = pj_xml_find_attr(node, &PRIORITY, NULL);
+    if (!attr) {
+	attr = xml_create_attr(pool, &PRIORITY, prio);
+	pj_xml_add_attr(node, attr);
+    } else {
+	pj_strdup(pool, &attr->value, prio);
+    }
+}
+
+PJ_DEF(const pj_str_t*) pjpidf_tuple_get_contact_prio(const pjpidf_tuple *t)
+{
+    pj_xml_node *node = pj_xml_find_node((pj_xml_node*)t, &CONTACT);
+    pj_xml_attr *attr;
+
+    if (!node)
+	return &EMPTY_STRING;
+    attr = pj_xml_find_attr(node, &PRIORITY, NULL);
+    if (!attr)
+	return &EMPTY_STRING;
+    return &attr->value;
+}
+
+
+PJ_DEF(pjpidf_note*) pjpidf_tuple_add_note(pj_pool_t *pool, pjpidf_tuple *t,
+					   const pj_str_t *text)
+{
+    pjpidf_note *note = pj_pool_alloc(pool, sizeof(*note));
+    xml_init_node(pool, note, &NOTE, text);
+    pj_xml_add_node(t, note);
+    return note;
+}
+
+PJ_DEF(pjpidf_note*) pjpidf_tuple_get_first_note(pjpidf_tuple *t)
+{
+    return pj_xml_find_node(t, &NOTE);
+}
+
+PJ_DEF(pjpidf_note*) pjpidf_tuple_get_next_note(pjpidf_tuple *t, pjpidf_note *n)
+{
+    return pj_xml_find_next_node(t, n, &NOTE);
+}
+
+
+PJ_DEF(const pj_str_t*) pjpidf_tuple_get_timestamp(const pjpidf_tuple *t)
+{
+    pj_xml_node *node = pj_xml_find_node((pj_xml_node*)t, &TIMESTAMP);
+    return node ? &node->content : &EMPTY_STRING;
+}
+
+PJ_DEF(void) pjpidf_tuple_set_timestamp(pj_pool_t *pool, pjpidf_tuple *t,
+					const pj_str_t *ts)
+{
+    pj_xml_node *node = pj_xml_find_node(t, &TIMESTAMP);
+    if (!node) {
+	node = pj_pool_alloc(pool, sizeof(*node));
+	xml_init_node(pool, node, &TIMESTAMP, ts);
+    } else {
+	pj_strdup(pool, &node->content, ts);
+    }
+}
+
+
+PJ_DEF(void) pjpidf_tuple_set_timestamp_np(pj_pool_t *pool, pjpidf_tuple *t, 
+					   pj_str_t *ts)
+{
+    pj_xml_node *node = pj_xml_find_node(t, &TIMESTAMP);
+    if (!node) {
+	node = pj_pool_alloc(pool, sizeof(*node));
+	xml_init_node(pool, node, &TIMESTAMP, ts);
+    } else {
+	node->content = *ts;
+    }
+}
+
+
+/* Status */
+PJ_DEF(void) pjpidf_status_construct(pj_pool_t *pool, pjpidf_status *st)
+{
+    pj_xml_node *node;
+
+    xml_init_node(pool, st, &STATUS, NULL);
+    node = pj_pool_alloc(pool, sizeof(*node));
+    xml_init_node(pool, node, &BASIC, &CLOSED);
+    pj_xml_add_node(st, node);
+}
+
+PJ_DEF(pj_bool_t) pjpidf_status_is_basic_open(const pjpidf_status *st)
+{
+    pj_xml_node *node = pj_xml_find_node((pj_xml_node*)st, &BASIC);
+    pj_assert(node != NULL);
+    return pj_stricmp(&node->content, &OPEN)==0;
+}
+
+PJ_DEF(void) pjpidf_status_set_basic_open(pjpidf_status *st, pj_bool_t open)
+{
+    pj_xml_node *node = pj_xml_find_node(st, &BASIC);
+    pj_assert(node != NULL);
+    node->content = open ? OPEN : CLOSED;
+}
+
+PJ_DEF(pjpidf_pres*) pjpidf_create(pj_pool_t *pool, const pj_str_t *entity)
+{
+    pjpidf_pres *pres = pj_pool_alloc(pool, sizeof(*pres));
+    pjpidf_pres_construct(pool, pres, entity);
+    return pres;
+}
+
+PJ_DEF(pjpidf_pres*) pjpidf_parse(pj_pool_t *pool, char *text, int len)
+{
+    pjpidf_pres *pres = pj_xml_parse(pool, text, len);
+    if (pres) {
+	if (pj_stricmp(&pres->name, &PRESENCE) != 0)
+	    return NULL;
+    }
+    return pres;
+}
+
+PJ_DEF(int) pjpidf_print(const pjpidf_pres* pres, char *buf, int len)
+{
+    return pj_xml_print(pres, buf, len, PJ_TRUE);
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/presence.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/presence.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/presence.c	(revision 1163)
@@ -0,0 +1,814 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip-simple/presence.h>
+#include <pjsip-simple/errno.h>
+#include <pjsip-simple/evsub_msg.h>
+#include <pjsip/sip_module.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_dialog.h>
+#include <pj/assert.h>
+#include <pj/guid.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+
+#define THIS_FILE		    "presence.c"
+#define PRES_DEFAULT_EXPIRES	    600
+
+/*
+ * Presence module (mod-presence)
+ */
+static struct pjsip_module mod_presence = 
+{
+    NULL, NULL,			    /* prev, next.			*/
+    { "mod-presence", 12 },	    /* Name.				*/
+    -1,				    /* Id				*/
+    PJSIP_MOD_PRIORITY_DIALOG_USAGE,/* Priority				*/
+    NULL,			    /* load()				*/
+    NULL,			    /* start()				*/
+    NULL,			    /* stop()				*/
+    NULL,			    /* unload()				*/
+    NULL,			    /* on_rx_request()			*/
+    NULL,			    /* on_rx_response()			*/
+    NULL,			    /* on_tx_request.			*/
+    NULL,			    /* on_tx_response()			*/
+    NULL,			    /* on_tsx_state()			*/
+};
+
+
+/*
+ * Presence message body type.
+ */
+typedef enum content_type
+{
+    CONTENT_TYPE_NONE,
+    CONTENT_TYPE_PIDF,
+    CONTENT_TYPE_XPIDF,
+} content_type;
+
+/*
+ * This structure describe a presentity, for both subscriber and notifier.
+ */
+struct pjsip_pres
+{
+    pjsip_evsub		*sub;		/**< Event subscribtion record.	    */
+    pjsip_dialog	*dlg;		/**< The dialog.		    */
+    content_type	 content_type;	/**< Content-Type.		    */
+    pjsip_pres_status	 status;	/**< Presence status.		    */
+    pjsip_pres_status	 tmp_status;	/**< Temp, before NOTIFY is answred.*/
+    pjsip_evsub_user	 user_cb;	/**< The user callback.		    */
+};
+
+
+typedef struct pjsip_pres pjsip_pres;
+
+
+/*
+ * Forward decl for evsub callback.
+ */
+static void pres_on_evsub_state( pjsip_evsub *sub, pjsip_event *event);
+static void pres_on_evsub_tsx_state( pjsip_evsub *sub, pjsip_transaction *tsx,
+				     pjsip_event *event);
+static void pres_on_evsub_rx_refresh( pjsip_evsub *sub, 
+				      pjsip_rx_data *rdata,
+				      int *p_st_code,
+				      pj_str_t **p_st_text,
+				      pjsip_hdr *res_hdr,
+				      pjsip_msg_body **p_body);
+static void pres_on_evsub_rx_notify( pjsip_evsub *sub, 
+				     pjsip_rx_data *rdata,
+				     int *p_st_code,
+				     pj_str_t **p_st_text,
+				     pjsip_hdr *res_hdr,
+				     pjsip_msg_body **p_body);
+static void pres_on_evsub_client_refresh(pjsip_evsub *sub);
+static void pres_on_evsub_server_timeout(pjsip_evsub *sub);
+
+
+/*
+ * Event subscription callback for presence.
+ */
+static pjsip_evsub_user pres_user = 
+{
+    &pres_on_evsub_state,
+    &pres_on_evsub_tsx_state,
+    &pres_on_evsub_rx_refresh,
+    &pres_on_evsub_rx_notify,
+    &pres_on_evsub_client_refresh,
+    &pres_on_evsub_server_timeout,
+};
+
+
+/*
+ * Some static constants.
+ */
+const pj_str_t STR_EVENT	    = { "Event", 5 };
+const pj_str_t STR_PRESENCE	    = { "presence", 8 };
+const pj_str_t STR_APPLICATION	    = { "application", 11 };
+const pj_str_t STR_PIDF_XML	    = { "pidf+xml", 8};
+const pj_str_t STR_XPIDF_XML	    = { "xpidf+xml", 9};
+const pj_str_t STR_APP_PIDF_XML	    = { "application/pidf+xml", 20 };
+const pj_str_t STR_APP_XPIDF_XML    = { "application/xpidf+xml", 21 };
+
+
+/*
+ * Init presence module.
+ */
+PJ_DEF(pj_status_t) pjsip_pres_init_module( pjsip_endpoint *endpt,
+					    pjsip_module *mod_evsub)
+{
+    pj_status_t status;
+    pj_str_t accept[2];
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(endpt && mod_evsub, PJ_EINVAL);
+
+    /* Must have not been registered */
+    PJ_ASSERT_RETURN(mod_presence.id == -1, PJ_EINVALIDOP);
+
+    /* Register to endpoint */
+    status = pjsip_endpt_register_module(endpt, &mod_presence);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    accept[0] = STR_APP_PIDF_XML;
+    accept[1] = STR_APP_XPIDF_XML;
+
+    /* Register event package to event module. */
+    status = pjsip_evsub_register_pkg( &mod_presence, &STR_PRESENCE, 
+				       PRES_DEFAULT_EXPIRES, 
+				       PJ_ARRAY_SIZE(accept), accept);
+    if (status != PJ_SUCCESS) {
+	pjsip_endpt_unregister_module(endpt, &mod_presence);
+	return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get presence module instance.
+ */
+PJ_DEF(pjsip_module*) pjsip_pres_instance(void)
+{
+    return &mod_presence;
+}
+
+
+/*
+ * Create client subscription.
+ */
+PJ_DEF(pj_status_t) pjsip_pres_create_uac( pjsip_dialog *dlg,
+					   const pjsip_evsub_user *user_cb,
+					   unsigned options,
+					   pjsip_evsub **p_evsub )
+{
+    pj_status_t status;
+    pjsip_pres *pres;
+    pjsip_evsub *sub;
+
+    PJ_ASSERT_RETURN(dlg && p_evsub, PJ_EINVAL);
+
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Create event subscription */
+    status = pjsip_evsub_create_uac( dlg,  &pres_user, &STR_PRESENCE, 
+				     options, &sub);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+    /* Create presence */
+    pres = pj_pool_zalloc(dlg->pool, sizeof(pjsip_pres));
+    pres->dlg = dlg;
+    pres->sub = sub;
+    if (user_cb)
+	pj_memcpy(&pres->user_cb, user_cb, sizeof(pjsip_evsub_user));
+
+    /* Attach to evsub */
+    pjsip_evsub_set_mod_data(sub, mod_presence.id, pres);
+
+    *p_evsub = sub;
+
+on_return:
+    pjsip_dlg_dec_lock(dlg);
+    return status;
+}
+
+
+/*
+ * Create server subscription.
+ */
+PJ_DEF(pj_status_t) pjsip_pres_create_uas( pjsip_dialog *dlg,
+					   const pjsip_evsub_user *user_cb,
+					   pjsip_rx_data *rdata,
+					   pjsip_evsub **p_evsub )
+{
+    pjsip_accept_hdr *accept;
+    pjsip_event_hdr *event;
+    pjsip_expires_hdr *expires_hdr;
+    unsigned expires;
+    content_type content_type = CONTENT_TYPE_NONE;
+    pjsip_evsub *sub;
+    pjsip_pres *pres;
+    pj_status_t status;
+
+    /* Check arguments */
+    PJ_ASSERT_RETURN(dlg && rdata && p_evsub, PJ_EINVAL);
+
+    /* Must be request message */
+    PJ_ASSERT_RETURN(rdata->msg_info.msg->type == PJSIP_REQUEST_MSG,
+		     PJSIP_ENOTREQUESTMSG);
+
+    /* Check that request is SUBSCRIBE */
+    PJ_ASSERT_RETURN(pjsip_method_cmp(&rdata->msg_info.msg->line.req.method,
+				      &pjsip_subscribe_method)==0,
+		     PJSIP_SIMPLE_ENOTSUBSCRIBE);
+
+    /* Check that Event header contains "presence" */
+    event = pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &STR_EVENT, NULL);
+    if (!event) {
+	return PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_BAD_REQUEST);
+    }
+    if (pj_stricmp(&event->event_type, &STR_PRESENCE) != 0) {
+	return PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_BAD_EVENT);
+    }
+
+    /* Check that request contains compatible Accept header. */
+    accept = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_ACCEPT, NULL);
+    if (accept) {
+	unsigned i;
+	for (i=0; i<accept->count; ++i) {
+	    if (pj_stricmp(&accept->values[i], &STR_APP_PIDF_XML)==0) {
+		content_type = CONTENT_TYPE_PIDF;
+		break;
+	    } else
+	    if (pj_stricmp(&accept->values[i], &STR_APP_XPIDF_XML)==0) {
+		content_type = CONTENT_TYPE_XPIDF;
+		break;
+	    }
+	}
+
+	if (i==accept->count) {
+	    /* Nothing is acceptable */
+	    return PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_NOT_ACCEPTABLE);
+	}
+
+    } else {
+	/* No Accept header.
+	 * Treat as "application/pidf+xml"
+	 */
+	content_type = CONTENT_TYPE_PIDF;
+    }
+
+    /* Check that expires is not too short. */
+    expires_hdr=pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_EXPIRES, NULL);
+    if (expires_hdr) {
+	if (expires_hdr->ivalue < 5) {
+	    return PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_INTERVAL_TOO_BRIEF);
+	}
+
+	expires = expires_hdr->ivalue;
+	if (expires > PRES_DEFAULT_EXPIRES)
+	    expires = PRES_DEFAULT_EXPIRES;
+
+    } else {
+	expires = PRES_DEFAULT_EXPIRES;
+    }
+    
+    /* Lock dialog */
+    pjsip_dlg_inc_lock(dlg);
+
+
+    /* Create server subscription */
+    status = pjsip_evsub_create_uas( dlg, &pres_user, rdata, 0, &sub);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+    /* Create server presence subscription */
+    pres = pj_pool_zalloc(dlg->pool, sizeof(pjsip_pres));
+    pres->dlg = dlg;
+    pres->sub = sub;
+    pres->content_type = content_type;
+    if (user_cb)
+	pj_memcpy(&pres->user_cb, user_cb, sizeof(pjsip_evsub_user));
+
+    /* Attach to evsub */
+    pjsip_evsub_set_mod_data(sub, mod_presence.id, pres);
+
+    /* Done: */
+    *p_evsub = sub;
+
+on_return:
+    pjsip_dlg_dec_lock(dlg);
+    return status;
+}
+
+
+/*
+ * Forcefully terminate presence.
+ */
+PJ_DEF(pj_status_t) pjsip_pres_terminate( pjsip_evsub *sub,
+					  pj_bool_t notify )
+{
+    return pjsip_evsub_terminate(sub, notify);
+}
+
+/*
+ * Create SUBSCRIBE
+ */
+PJ_DEF(pj_status_t) pjsip_pres_initiate( pjsip_evsub *sub,
+					 pj_int32_t expires,
+					 pjsip_tx_data **p_tdata)
+{
+    return pjsip_evsub_initiate(sub, &pjsip_subscribe_method, expires, 
+				p_tdata);
+}
+
+
+/*
+ * Accept incoming subscription.
+ */
+PJ_DEF(pj_status_t) pjsip_pres_accept( pjsip_evsub *sub,
+				       pjsip_rx_data *rdata,
+				       int st_code,
+				       const pjsip_hdr *hdr_list )
+{
+    return pjsip_evsub_accept( sub, rdata, st_code, hdr_list );
+}
+
+
+/*
+ * Get presence status.
+ */
+PJ_DEF(pj_status_t) pjsip_pres_get_status( pjsip_evsub *sub,
+					   pjsip_pres_status *status )
+{
+    pjsip_pres *pres;
+
+    PJ_ASSERT_RETURN(sub && status, PJ_EINVAL);
+
+    pres = pjsip_evsub_get_mod_data(sub, mod_presence.id);
+    PJ_ASSERT_RETURN(pres!=NULL, PJSIP_SIMPLE_ENOPRESENCE);
+
+    if (pres->tmp_status._is_valid)
+	pj_memcpy(status, &pres->tmp_status, sizeof(pjsip_pres_status));
+    else
+	pj_memcpy(status, &pres->status, sizeof(pjsip_pres_status));
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Set presence status.
+ */
+PJ_DEF(pj_status_t) pjsip_pres_set_status( pjsip_evsub *sub,
+					   const pjsip_pres_status *status )
+{
+    unsigned i;
+    pjsip_pres *pres;
+
+    PJ_ASSERT_RETURN(sub && status, PJ_EINVAL);
+
+    pres = pjsip_evsub_get_mod_data(sub, mod_presence.id);
+    PJ_ASSERT_RETURN(pres!=NULL, PJSIP_SIMPLE_ENOPRESENCE);
+
+    for (i=0; i<status->info_cnt; ++i) {
+	pres->status.info[i].basic_open = status->info[i].basic_open;
+	if (status->info[i].id.slen == 0) {
+	    pj_create_unique_string(pres->dlg->pool, 
+	    			    &pres->status.info[i].id);
+	} else {
+	    pj_strdup(pres->dlg->pool, 
+		      &pres->status.info[i].id,
+		      &status->info[i].id);
+	}
+	pj_strdup(pres->dlg->pool, 
+		  &pres->status.info[i].contact,
+		  &status->info[i].contact);
+    }
+
+    pres->status.info_cnt = status->info_cnt;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create message body.
+ */
+static pj_status_t pres_create_msg_body( pjsip_pres *pres, 
+					 pjsip_tx_data *tdata)
+{
+    pj_str_t entity;
+
+    /* Get publisher URI */
+    entity.ptr = pj_pool_alloc(tdata->pool, PJSIP_MAX_URL_SIZE);
+    entity.slen = pjsip_uri_print(PJSIP_URI_IN_REQ_URI,
+				  pres->dlg->local.info->uri,
+				  entity.ptr, PJSIP_MAX_URL_SIZE);
+    if (entity.slen < 1)
+	return PJ_ENOMEM;
+
+    if (pres->content_type == CONTENT_TYPE_PIDF) {
+
+	return pjsip_pres_create_pidf(tdata->pool, &pres->status,
+				      &entity, &tdata->msg->body);
+
+    } else if (pres->content_type == CONTENT_TYPE_XPIDF) {
+
+	return pjsip_pres_create_xpidf(tdata->pool, &pres->status,
+				       &entity, &tdata->msg->body);
+
+    } else {
+	return PJSIP_SIMPLE_EBADCONTENT;
+    }
+}
+
+
+/*
+ * Create NOTIFY
+ */
+PJ_DEF(pj_status_t) pjsip_pres_notify( pjsip_evsub *sub,
+				       pjsip_evsub_state state,
+				       const pj_str_t *state_str,
+				       const pj_str_t *reason,
+				       pjsip_tx_data **p_tdata)
+{
+    pjsip_pres *pres;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+    
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(sub, PJ_EINVAL);
+
+    /* Get the presence object. */
+    pres = pjsip_evsub_get_mod_data(sub, mod_presence.id);
+    PJ_ASSERT_RETURN(pres != NULL, PJSIP_SIMPLE_ENOPRESENCE);
+
+    /* Must have at least one presence info. */
+    PJ_ASSERT_RETURN(pres->status.info_cnt > 0, PJSIP_SIMPLE_ENOPRESENCEINFO);
+
+
+    /* Lock object. */
+    pjsip_dlg_inc_lock(pres->dlg);
+
+    /* Create the NOTIFY request. */
+    status = pjsip_evsub_notify( sub, state, state_str, reason, &tdata);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+
+    /* Create message body to reflect the presence status. */
+    status = pres_create_msg_body( pres, tdata );
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+
+    /* Done. */
+    *p_tdata = tdata;
+
+
+on_return:
+    pjsip_dlg_dec_lock(pres->dlg);
+    return status;
+}
+
+
+/*
+ * Create NOTIFY that reflect current state.
+ */
+PJ_DEF(pj_status_t) pjsip_pres_current_notify( pjsip_evsub *sub,
+					       pjsip_tx_data **p_tdata )
+{
+    pjsip_pres *pres;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+    
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(sub, PJ_EINVAL);
+
+    /* Get the presence object. */
+    pres = pjsip_evsub_get_mod_data(sub, mod_presence.id);
+    PJ_ASSERT_RETURN(pres != NULL, PJSIP_SIMPLE_ENOPRESENCE);
+
+    /* Must have at least one presence info. */
+    PJ_ASSERT_RETURN(pres->status.info_cnt > 0, PJSIP_SIMPLE_ENOPRESENCEINFO);
+
+
+    /* Lock object. */
+    pjsip_dlg_inc_lock(pres->dlg);
+
+    /* Create the NOTIFY request. */
+    status = pjsip_evsub_current_notify( sub, &tdata);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+
+    /* Create message body to reflect the presence status. */
+    status = pres_create_msg_body( pres, tdata );
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+
+    /* Done. */
+    *p_tdata = tdata;
+
+
+on_return:
+    pjsip_dlg_dec_lock(pres->dlg);
+    return status;
+}
+
+
+/*
+ * Send request.
+ */
+PJ_DEF(pj_status_t) pjsip_pres_send_request( pjsip_evsub *sub,
+					     pjsip_tx_data *tdata )
+{
+    return pjsip_evsub_send_request(sub, tdata);
+}
+
+
+/*
+ * This callback is called by event subscription when subscription
+ * state has changed.
+ */
+static void pres_on_evsub_state( pjsip_evsub *sub, pjsip_event *event)
+{
+    pjsip_pres *pres;
+
+    pres = pjsip_evsub_get_mod_data(sub, mod_presence.id);
+    PJ_ASSERT_ON_FAIL(pres!=NULL, {return;});
+
+    if (pres->user_cb.on_evsub_state)
+	(*pres->user_cb.on_evsub_state)(sub, event);
+}
+
+/*
+ * Called when transaction state has changed.
+ */
+static void pres_on_evsub_tsx_state( pjsip_evsub *sub, pjsip_transaction *tsx,
+				     pjsip_event *event)
+{
+    pjsip_pres *pres;
+
+    pres = pjsip_evsub_get_mod_data(sub, mod_presence.id);
+    PJ_ASSERT_ON_FAIL(pres!=NULL, {return;});
+
+    if (pres->user_cb.on_tsx_state)
+	(*pres->user_cb.on_tsx_state)(sub, tsx, event);
+}
+
+
+/*
+ * Called when SUBSCRIBE is received.
+ */
+static void pres_on_evsub_rx_refresh( pjsip_evsub *sub, 
+				      pjsip_rx_data *rdata,
+				      int *p_st_code,
+				      pj_str_t **p_st_text,
+				      pjsip_hdr *res_hdr,
+				      pjsip_msg_body **p_body)
+{
+    pjsip_pres *pres;
+
+    pres = pjsip_evsub_get_mod_data(sub, mod_presence.id);
+    PJ_ASSERT_ON_FAIL(pres!=NULL, {return;});
+
+    if (pres->user_cb.on_rx_refresh) {
+	(*pres->user_cb.on_rx_refresh)(sub, rdata, p_st_code, p_st_text,
+				       res_hdr, p_body);
+
+    } else {
+	/* Implementors MUST send NOTIFY if it implements on_rx_refresh */
+	pjsip_tx_data *tdata;
+	pj_str_t timeout = { "timeout", 7};
+	pj_status_t status;
+
+	if (pjsip_evsub_get_state(sub)==PJSIP_EVSUB_STATE_TERMINATED) {
+	    status = pjsip_pres_notify( sub, PJSIP_EVSUB_STATE_TERMINATED,
+					NULL, &timeout, &tdata);
+	} else {
+	    status = pjsip_pres_current_notify(sub, &tdata);
+	}
+
+	if (status == PJ_SUCCESS)
+	    pjsip_pres_send_request(sub, tdata);
+    }
+}
+
+
+/*
+ * Process the content of incoming NOTIFY request and update temporary
+ * status.
+ *
+ * return PJ_SUCCESS if incoming request is acceptable. If return value
+ *	  is not PJ_SUCCESS, res_hdr may be added with Warning header.
+ */
+static pj_status_t pres_process_rx_notify( pjsip_pres *pres,
+					   pjsip_rx_data *rdata, 
+					   int *p_st_code,
+					   pj_str_t **p_st_text,
+					   pjsip_hdr *res_hdr)
+{
+    pjsip_ctype_hdr *ctype_hdr;
+    pj_status_t status;
+
+    *p_st_text = NULL;
+
+    /* Check Content-Type and msg body are present. */
+    ctype_hdr = rdata->msg_info.ctype;
+
+    if (ctype_hdr==NULL || rdata->msg_info.msg->body==NULL) {
+	
+	pjsip_warning_hdr *warn_hdr;
+	pj_str_t warn_text;
+
+	*p_st_code = PJSIP_SC_BAD_REQUEST;
+
+	warn_text = pj_str("Message body is not present");
+	warn_hdr = pjsip_warning_hdr_create(rdata->tp_info.pool, 399,
+					    pjsip_endpt_name(pres->dlg->endpt),
+					    &warn_text);
+	pj_list_push_back(res_hdr, warn_hdr);
+
+	return PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_BAD_REQUEST);
+    }
+
+    /* Parse content. */
+
+    if (pj_stricmp(&ctype_hdr->media.type, &STR_APPLICATION)==0 &&
+	pj_stricmp(&ctype_hdr->media.subtype, &STR_PIDF_XML)==0)
+    {
+	status = pjsip_pres_parse_pidf( rdata, pres->dlg->pool,
+					&pres->tmp_status);
+    }
+    else 
+    if (pj_stricmp(&ctype_hdr->media.type, &STR_APPLICATION)==0 &&
+	pj_stricmp(&ctype_hdr->media.subtype, &STR_XPIDF_XML)==0)
+    {
+	status = pjsip_pres_parse_xpidf( rdata, pres->dlg->pool,
+					 &pres->tmp_status);
+    }
+    else
+    {
+	status = PJSIP_SIMPLE_EBADCONTENT;
+    }
+
+    if (status != PJ_SUCCESS) {
+	/* Unsupported or bad Content-Type */
+	pjsip_accept_hdr *accept_hdr;
+	pjsip_warning_hdr *warn_hdr;
+
+	*p_st_code = PJSIP_SC_NOT_ACCEPTABLE_HERE;
+
+	/* Add Accept header */
+	accept_hdr = pjsip_accept_hdr_create(rdata->tp_info.pool);
+	accept_hdr->values[accept_hdr->count++] = STR_APP_PIDF_XML;
+	accept_hdr->values[accept_hdr->count++] = STR_APP_XPIDF_XML;
+	pj_list_push_back(res_hdr, accept_hdr);
+
+	/* Add Warning header */
+	warn_hdr = pjsip_warning_hdr_create_from_status(
+				    rdata->tp_info.pool,
+				    pjsip_endpt_name(pres->dlg->endpt),
+				    status);
+	pj_list_push_back(res_hdr, warn_hdr);
+
+	return status;
+    }
+
+    /* If application calls pres_get_status(), redirect the call to
+     * retrieve the temporary status.
+     */
+    pres->tmp_status._is_valid = PJ_TRUE;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Called when NOTIFY is received.
+ */
+static void pres_on_evsub_rx_notify( pjsip_evsub *sub, 
+				     pjsip_rx_data *rdata,
+				     int *p_st_code,
+				     pj_str_t **p_st_text,
+				     pjsip_hdr *res_hdr,
+				     pjsip_msg_body **p_body)
+{
+    pjsip_pres *pres;
+    pj_status_t status;
+
+    pres = pjsip_evsub_get_mod_data(sub, mod_presence.id);
+    PJ_ASSERT_ON_FAIL(pres!=NULL, {return;});
+
+    if (rdata->msg_info.msg->body) {
+	status = pres_process_rx_notify( pres, rdata, p_st_code, p_st_text,
+					 res_hdr );
+	if (status != PJ_SUCCESS)
+	    return;
+
+    } else {
+	/* This has just been changed. Previously, we treat incoming NOTIFY
+	 * with no message body as having the presence subscription closed.
+	 * Now we treat it as no change in presence status (ref: EyeBeam).
+	 */
+#if 1
+	*p_st_code = 200;
+	return;
+#else
+	unsigned i;
+	/* Subscription is terminated. Consider contact is offline */
+	pres->tmp_status._is_valid = PJ_TRUE;
+	for (i=0; i<pres->tmp_status.info_cnt; ++i)
+	    pres->tmp_status.info[i].basic_open = PJ_FALSE;
+#endif
+    }
+
+    /* Notify application. */
+    if (pres->user_cb.on_rx_notify) {
+	(*pres->user_cb.on_rx_notify)(sub, rdata, p_st_code, p_st_text, 
+				      res_hdr, p_body);
+    }
+
+    
+    /* If application responded NOTIFY with 2xx, copy temporary status
+     * to main status, and mark the temporary status as invalid.
+     */
+    if ((*p_st_code)/100 == 2) {
+	pj_memcpy(&pres->status, &pres->tmp_status, sizeof(pjsip_pres_status));
+    }
+
+    pres->tmp_status._is_valid = PJ_FALSE;
+
+    /* Done */
+}
+
+/*
+ * Called when it's time to send SUBSCRIBE.
+ */
+static void pres_on_evsub_client_refresh(pjsip_evsub *sub)
+{
+    pjsip_pres *pres;
+
+    pres = pjsip_evsub_get_mod_data(sub, mod_presence.id);
+    PJ_ASSERT_ON_FAIL(pres!=NULL, {return;});
+
+    if (pres->user_cb.on_client_refresh) {
+	(*pres->user_cb.on_client_refresh)(sub);
+    } else {
+	pj_status_t status;
+	pjsip_tx_data *tdata;
+
+	status = pjsip_pres_initiate(sub, -1, &tdata);
+	if (status == PJ_SUCCESS)
+	    pjsip_pres_send_request(sub, tdata);
+    }
+}
+
+/*
+ * Called when no refresh is received after the interval.
+ */
+static void pres_on_evsub_server_timeout(pjsip_evsub *sub)
+{
+    pjsip_pres *pres;
+
+    pres = pjsip_evsub_get_mod_data(sub, mod_presence.id);
+    PJ_ASSERT_ON_FAIL(pres!=NULL, {return;});
+
+    if (pres->user_cb.on_server_timeout) {
+	(*pres->user_cb.on_server_timeout)(sub);
+    } else {
+	pj_status_t status;
+	pjsip_tx_data *tdata;
+	pj_str_t reason = { "timeout", 7 };
+
+	status = pjsip_pres_notify(sub, PJSIP_EVSUB_STATE_TERMINATED,
+				   NULL, &reason, &tdata);
+	if (status == PJ_SUCCESS)
+	    pjsip_pres_send_request(sub, tdata);
+    }
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/presence_body.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/presence_body.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/presence_body.c	(revision 1163)
@@ -0,0 +1,228 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip-simple/presence.h>
+#include <pjsip-simple/errno.h>
+#include <pjsip/sip_msg.h>
+#include <pjsip/sip_transport.h>
+#include <pj/guid.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+
+#define THIS_FILE   "presence_body.c"
+
+
+static const pj_str_t STR_APPLICATION = { "application", 11 };
+static const pj_str_t STR_PIDF_XML =	{ "pidf+xml", 8 };
+static const pj_str_t STR_XPIDF_XML =	{ "xpidf+xml", 9 };
+
+
+
+
+/*
+ * Function to print XML message body.
+ */
+static int pres_print_body(struct pjsip_msg_body *msg_body, 
+			   char *buf, pj_size_t size)
+{
+    return pj_xml_print(msg_body->data, buf, size, PJ_TRUE);
+}
+
+
+/*
+ * Function to clone XML document.
+ */
+static void* xml_clone_data(pj_pool_t *pool, const void *data, unsigned len)
+{
+    PJ_UNUSED_ARG(len);
+    return pj_xml_clone( pool, data);
+}
+
+
+/*
+ * This is a utility function to create PIDF message body from PJSIP
+ * presence status (pjsip_pres_status).
+ */
+PJ_DEF(pj_status_t) pjsip_pres_create_pidf( pj_pool_t *pool,
+					    const pjsip_pres_status *status,
+					    const pj_str_t *entity,
+					    pjsip_msg_body **p_body )
+{
+    pjpidf_pres *pidf;
+    pjsip_msg_body *body;
+    unsigned i;
+
+    /* Create <presence>. */
+    pidf = pjpidf_create(pool, entity);
+
+    /* Create <tuple> */
+    for (i=0; i<status->info_cnt; ++i) {
+
+	pjpidf_tuple *pidf_tuple;
+	pjpidf_status *pidf_status;
+	pj_str_t id;
+
+	/* Add tuple id. */
+	if (status->info[i].id.slen == 0) {
+	    pj_create_unique_string(pool, &id);
+	} else {
+	    id = status->info[i].id;
+	}
+
+	pidf_tuple = pjpidf_pres_add_tuple(pool, pidf, &id);
+
+	/* Set <contact> */
+	if (status->info[i].contact.slen)
+	    pjpidf_tuple_set_contact(pool, pidf_tuple, 
+				     &status->info[i].contact);
+
+
+	/* Set basic status */
+	pidf_status = pjpidf_tuple_get_status(pidf_tuple);
+	pjpidf_status_set_basic_open(pidf_status, 
+				     status->info[i].basic_open);
+    }
+
+    body = pj_pool_zalloc(pool, sizeof(pjsip_msg_body));
+    body->data = pidf;
+    body->content_type.type = STR_APPLICATION;
+    body->content_type.subtype = STR_PIDF_XML;
+    body->print_body = &pres_print_body;
+    body->clone_data = &xml_clone_data;
+
+    *p_body = body;
+
+    return PJ_SUCCESS;    
+}
+
+
+/*
+ * This is a utility function to create X-PIDF message body from PJSIP
+ * presence status (pjsip_pres_status).
+ */
+PJ_DEF(pj_status_t) pjsip_pres_create_xpidf( pj_pool_t *pool,
+					     const pjsip_pres_status *status,
+					     const pj_str_t *entity,
+					     pjsip_msg_body **p_body )
+{
+    /* Note: PJSIP implementation of XPIDF is not complete!
+     */
+    pjxpidf_pres *xpidf;
+    pjsip_msg_body *body;
+
+    PJ_LOG(4,(THIS_FILE, "Warning: XPIDF format is not fully supported "
+			 "by PJSIP"));
+
+    /* Create XPIDF document. */
+    xpidf = pjxpidf_create(pool, entity);
+
+    /* Set basic status. */
+    if (status->info_cnt > 0)
+	pjxpidf_set_status( xpidf, status->info[0].basic_open);
+    else
+	pjxpidf_set_status( xpidf, PJ_FALSE);
+
+    body = pj_pool_zalloc(pool, sizeof(pjsip_msg_body));
+    body->data = xpidf;
+    body->content_type.type = STR_APPLICATION;
+    body->content_type.subtype = STR_XPIDF_XML;
+    body->print_body = &pres_print_body;
+    body->clone_data = &xml_clone_data;
+
+    *p_body = body;
+
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * This is a utility function to parse PIDF body into PJSIP presence status.
+ */
+PJ_DEF(pj_status_t) pjsip_pres_parse_pidf( pjsip_rx_data *rdata,
+					   pj_pool_t *pool,
+					   pjsip_pres_status *pres_status)
+{
+    pjpidf_pres *pidf;
+    pjpidf_tuple *pidf_tuple;
+
+    pidf = pjpidf_parse(rdata->tp_info.pool, 
+			rdata->msg_info.msg->body->data,
+			rdata->msg_info.msg->body->len);
+    if (pidf == NULL)
+	return PJSIP_SIMPLE_EBADPIDF;
+
+    pres_status->info_cnt = 0;
+
+    pidf_tuple = pjpidf_pres_get_first_tuple(pidf);
+    while (pidf_tuple) {
+	pjpidf_status *pidf_status;
+
+	pj_strdup(pool, 
+		  &pres_status->info[pres_status->info_cnt].id,
+		  pjpidf_tuple_get_id(pidf_tuple));
+
+	pj_strdup(pool, 
+		  &pres_status->info[pres_status->info_cnt].contact,
+		  pjpidf_tuple_get_contact(pidf_tuple));
+
+	pidf_status = pjpidf_tuple_get_status(pidf_tuple);
+	if (pidf_status) {
+	    pres_status->info[pres_status->info_cnt].basic_open = 
+		pjpidf_status_is_basic_open(pidf_status);
+	} else {
+	    pres_status->info[pres_status->info_cnt].basic_open = PJ_FALSE;
+	}
+
+	pidf_tuple = pjpidf_pres_get_next_tuple( pidf, pidf_tuple );
+	pres_status->info_cnt++;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * This is a utility function to parse X-PIDF body into PJSIP presence status.
+ */
+PJ_DEF(pj_status_t) pjsip_pres_parse_xpidf(pjsip_rx_data *rdata,
+					   pj_pool_t *pool,
+					   pjsip_pres_status *pres_status)
+{
+    pjxpidf_pres *xpidf;
+
+    xpidf = pjxpidf_parse(rdata->tp_info.pool, 
+			  rdata->msg_info.msg->body->data,
+			  rdata->msg_info.msg->body->len);
+    if (xpidf == NULL)
+	return PJSIP_SIMPLE_EBADXPIDF;
+
+    pres_status->info_cnt = 1;
+    
+    pj_strdup(pool,
+	      &pres_status->info[0].contact,
+	      pjxpidf_get_uri(xpidf));
+    pres_status->info[0].basic_open = pjxpidf_get_status(xpidf);
+    pres_status->info[0].id.slen = 0;
+
+    return PJ_SUCCESS;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/publishc.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/publishc.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/publishc.c	(revision 1163)
@@ -0,0 +1,594 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip-simple/publish.h>
+#include <pjsip/sip_auth.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_errno.h>
+#include <pjsip/sip_event.h>
+#include <pjsip/sip_msg.h>
+#include <pjsip/sip_transaction.h>
+#include <pjsip/sip_uri.h>
+#include <pjsip/sip_util.h>
+#include <pj/assert.h>
+#include <pj/guid.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/rand.h>
+#include <pj/string.h>
+#include <pj/timer.h>
+
+
+#define REFRESH_TIMER		1
+#define DELAY_BEFORE_REFRESH	5
+#define THIS_FILE		"publishc.c"
+
+
+/* Let's define this enum, so that it'll trigger compilation error
+ * when somebody define the same enum in sip_msg.h
+ */
+enum
+{
+    PJSIP_PUBLISH_METHOD = PJSIP_OTHER_METHOD,
+};
+
+const pjsip_method pjsip_publish_method = 
+{
+    PJSIP_PUBLISH_METHOD,
+    { "PUBLISH", 7 }
+};
+
+
+/**
+ * SIP client publication structure.
+ */
+struct pjsip_publishc
+{
+    pj_pool_t			*pool;
+    pjsip_endpoint		*endpt;
+    pj_bool_t			 _delete_flag;
+    int				 pending_tsx;
+
+    void			*token;
+    pjsip_publishc_cb		*cb;
+
+    pj_str_t			 event;
+    pj_str_t			 str_target_uri;
+    pjsip_uri			*target_uri;
+    pjsip_cid_hdr		*cid_hdr;
+    pjsip_cseq_hdr		*cseq_hdr;
+    pj_str_t			 from_uri;
+    pjsip_from_hdr		*from_hdr;
+    pjsip_to_hdr		*to_hdr;
+    pj_str_t			 etag;
+    pjsip_expires_hdr		*expires_hdr;
+    pj_uint32_t			 expires;
+    pjsip_route_hdr		 route_set;
+
+    /* Authorization sessions. */
+    pjsip_auth_clt_sess		 auth_sess;
+
+    /* Auto refresh publication. */
+    pj_bool_t			 auto_refresh;
+    pj_time_val			 last_refresh;
+    pj_time_val			 next_refresh;
+    pj_timer_entry		 timer;
+};
+
+
+
+/*
+ * Initialize client publication module.
+ */
+PJ_DEF(pj_status_t) pjsip_publishc_init_module(pjsip_endpoint *endpt)
+{
+    return pjsip_endpt_add_capability( endpt, NULL, PJSIP_H_ALLOW, NULL,
+				       1, &pjsip_publish_method.name);
+}
+
+
+PJ_DEF(pj_status_t) pjsip_publishc_create( pjsip_endpoint *endpt, 
+					   unsigned options,
+					   void *token,
+					   pjsip_publishc_cb *cb,	
+					   pjsip_publishc **p_pubc)
+{
+    pj_pool_t *pool;
+    pjsip_publishc *pubc;
+    pj_status_t status;
+
+    /* Verify arguments. */
+    PJ_ASSERT_RETURN(endpt && cb && p_pubc, PJ_EINVAL);
+    PJ_ASSERT_RETURN(options == 0, PJ_EINVAL);
+
+    PJ_UNUSED_ARG(options);
+
+    pool = pjsip_endpt_create_pool(endpt, "pubc%p", 1024, 1024);
+    PJ_ASSERT_RETURN(pool != NULL, PJ_ENOMEM);
+
+    pubc = pj_pool_zalloc(pool, sizeof(struct pjsip_publishc));
+
+    pubc->pool = pool;
+    pubc->endpt = endpt;
+    pubc->token = token;
+    pubc->cb = cb;
+    pubc->expires = PJSIP_PUBC_EXPIRATION_NOT_SPECIFIED;
+
+    status = pjsip_auth_clt_init(&pubc->auth_sess, endpt, pubc->pool, 0);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    pj_list_init(&pubc->route_set);
+
+    /* Done */
+    *p_pubc = pubc;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_publishc_destroy(pjsip_publishc *pubc)
+{
+    PJ_ASSERT_RETURN(pubc, PJ_EINVAL);
+
+    if (pubc->pending_tsx) {
+	pubc->_delete_flag = 1;
+	pubc->cb = NULL;
+    } else {
+	pjsip_endpt_release_pool(pubc->endpt, pubc->pool);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_pool_t*) pjsip_publishc_get_pool(pjsip_publishc *pubc)
+{
+    return pubc->pool;
+}
+
+static void set_expires( pjsip_publishc *pubc, pj_uint32_t expires)
+{
+    if (expires != pubc->expires) {
+	pubc->expires_hdr = pjsip_expires_hdr_create(pubc->pool, expires);
+    } else {
+	pubc->expires_hdr = NULL;
+    }
+}
+
+
+PJ_DEF(pj_status_t) pjsip_publishc_init(pjsip_publishc *pubc,
+					const pj_str_t *event,
+					const pj_str_t *target_uri,
+					const pj_str_t *from_uri,
+					const pj_str_t *to_uri,
+					pj_uint32_t expires)
+{
+    pj_str_t tmp;
+
+    PJ_ASSERT_RETURN(pubc && event && target_uri && from_uri && to_uri && 
+		     expires, PJ_EINVAL);
+
+    /* Copy event type */
+    pj_strdup_with_null(pubc->pool, &pubc->event, event);
+
+    /* Copy server URL. */
+    pj_strdup_with_null(pubc->pool, &pubc->str_target_uri, target_uri);
+
+    /* Set server URL. */
+    tmp = pubc->str_target_uri;
+    pubc->target_uri = pjsip_parse_uri( pubc->pool, tmp.ptr, tmp.slen, 0);
+    if (pubc->target_uri == NULL) {
+	return PJSIP_EINVALIDURI;
+    }
+
+    /* Set "From" header. */
+    pj_strdup_with_null(pubc->pool, &pubc->from_uri, from_uri);
+    tmp = pubc->from_uri;
+    pubc->from_hdr = pjsip_from_hdr_create(pubc->pool);
+    pubc->from_hdr->uri = pjsip_parse_uri(pubc->pool, tmp.ptr, tmp.slen, 
+					  PJSIP_PARSE_URI_AS_NAMEADDR);
+    if (!pubc->from_hdr->uri) {
+	return PJSIP_EINVALIDURI;
+    }
+
+    /* Set "To" header. */
+    pj_strdup_with_null(pubc->pool, &tmp, to_uri);
+    pubc->to_hdr = pjsip_to_hdr_create(pubc->pool);
+    pubc->to_hdr->uri = pjsip_parse_uri(pubc->pool, tmp.ptr, tmp.slen, 
+					PJSIP_PARSE_URI_AS_NAMEADDR);
+    if (!pubc->to_hdr->uri) {
+	return PJSIP_EINVALIDURI;
+    }
+
+
+    /* Set "Expires" header, if required. */
+    set_expires( pubc, expires);
+
+    /* Set "Call-ID" header. */
+    pubc->cid_hdr = pjsip_cid_hdr_create(pubc->pool);
+    pj_create_unique_string(pubc->pool, &pubc->cid_hdr->id);
+
+    /* Set "CSeq" header. */
+    pubc->cseq_hdr = pjsip_cseq_hdr_create(pubc->pool);
+    pubc->cseq_hdr->cseq = pj_rand() % 0xFFFF;
+    pjsip_method_set( &pubc->cseq_hdr->method, PJSIP_REGISTER_METHOD);
+
+    /* Done. */
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjsip_publishc_set_credentials( pjsip_publishc *pubc,
+						int count,
+						const pjsip_cred_info cred[] )
+{
+    PJ_ASSERT_RETURN(pubc && count && cred, PJ_EINVAL);
+    return pjsip_auth_clt_set_credentials(&pubc->auth_sess, count, cred);
+}
+
+PJ_DEF(pj_status_t) pjsip_publishc_set_route_set( pjsip_publishc *pubc,
+					      const pjsip_route_hdr *route_set)
+{
+    const pjsip_route_hdr *chdr;
+
+    PJ_ASSERT_RETURN(pubc && route_set, PJ_EINVAL);
+
+    pj_list_init(&pubc->route_set);
+
+    chdr = route_set->next;
+    while (chdr != route_set) {
+	pj_list_push_back(&pubc->route_set, pjsip_hdr_clone(pubc->pool, chdr));
+	chdr = chdr->next;
+    }
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t create_request(pjsip_publishc *pubc, 
+				  pjsip_tx_data **p_tdata)
+{
+    const pj_str_t STR_EVENT = { "Event", 5 };
+    pj_status_t status;
+    pjsip_generic_string_hdr *hdr;
+    pjsip_tx_data *tdata;
+
+    PJ_ASSERT_RETURN(pubc && p_tdata, PJ_EINVAL);
+
+    /* Create the request. */
+    status = pjsip_endpt_create_request_from_hdr( pubc->endpt, 
+						  &pjsip_publish_method,
+						  pubc->target_uri,
+						  pubc->from_hdr,
+						  pubc->to_hdr,
+						  NULL,
+						  pubc->cid_hdr,
+						  pubc->cseq_hdr->cseq,
+						  NULL,
+						  &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Add cached authorization headers. */
+    pjsip_auth_clt_init_req( &pubc->auth_sess, tdata );
+
+    /* Add Route headers from route set, ideally after Via header */
+    if (!pj_list_empty(&pubc->route_set)) {
+	pjsip_hdr *route_pos;
+	const pjsip_route_hdr *route;
+
+	route_pos = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL);
+	if (!route_pos)
+	    route_pos = &tdata->msg->hdr;
+
+	route = pubc->route_set.next;
+	while (route != &pubc->route_set) {
+	    pjsip_hdr *new_hdr = pjsip_hdr_shallow_clone(tdata->pool, route);
+	    pj_list_insert_after(route_pos, new_hdr);
+	    route_pos = new_hdr;
+	    route = route->next;
+	}
+    }
+
+    /* Add Event header */
+    hdr = pjsip_generic_string_hdr_create(tdata->pool, &STR_EVENT,
+					  &pubc->event);
+    if (hdr)
+	pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)hdr);
+
+
+    /* Add SIP-If-Match if we have etag */
+    if (pubc->etag.slen) {
+	const pj_str_t STR_HNAME = { "SIP-If-Match", 12 };
+
+	hdr = pjsip_generic_string_hdr_create(tdata->pool, &STR_HNAME,
+					      &pubc->etag);
+	if (hdr)
+	    pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)hdr);
+    }
+
+
+    /* Done. */
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_publishc_publish(pjsip_publishc *pubc, 
+					   pj_bool_t auto_refresh,
+					   pjsip_tx_data **p_tdata)
+{
+    pj_status_t status;
+    pjsip_tx_data *tdata;
+
+    PJ_ASSERT_RETURN(pubc && p_tdata, PJ_EINVAL);
+
+    status = create_request(pubc, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Add Expires header */
+    if (pubc->expires_hdr) {
+	pjsip_hdr *dup;
+
+	dup = pjsip_hdr_shallow_clone(tdata->pool, pubc->expires_hdr);
+	if (dup)
+	    pjsip_msg_add_hdr(tdata->msg, dup);
+    }
+
+    /* Cancel existing timer */
+    if (pubc->timer.id != 0) {
+	pjsip_endpt_cancel_timer(pubc->endpt, &pubc->timer);
+	pubc->timer.id = 0;
+    }
+
+    pubc->auto_refresh = auto_refresh;
+
+    /* Done */
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_publishc_unpublish(pjsip_publishc *pubc,
+					     pjsip_tx_data **p_tdata)
+{
+    pjsip_tx_data *tdata;
+    pjsip_msg *msg;
+    pjsip_expires_hdr *expires;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(pubc && p_tdata, PJ_EINVAL);
+
+    if (pubc->timer.id != 0) {
+	pjsip_endpt_cancel_timer(pubc->endpt, &pubc->timer);
+	pubc->timer.id = 0;
+    }
+
+    status = create_request(pubc, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    msg = tdata->msg;
+
+    /* Add Expires:0 header */
+    expires = pjsip_expires_hdr_create(tdata->pool, 0);
+    pjsip_msg_add_hdr( msg, (pjsip_hdr*)expires);
+
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_publishc_update_expires( pjsip_publishc *pubc,
+					           pj_uint32_t expires )
+{
+    PJ_ASSERT_RETURN(pubc, PJ_EINVAL);
+    set_expires( pubc, expires );
+    return PJ_SUCCESS;
+}
+
+
+static void call_callback(pjsip_publishc *pubc, pj_status_t status, 
+			  int st_code, const pj_str_t *reason,
+			  pjsip_rx_data *rdata, pj_int32_t expiration)
+{
+    struct pjsip_publishc_cbparam cbparam;
+
+
+    cbparam.pubc = pubc;
+    cbparam.token = pubc->token;
+    cbparam.status = status;
+    cbparam.code = st_code;
+    cbparam.reason = *reason;
+    cbparam.rdata = rdata;
+    cbparam.expiration = expiration;
+
+    (*pubc->cb)(&cbparam);
+}
+
+static void pubc_refresh_timer_cb( pj_timer_heap_t *timer_heap,
+				   struct pj_timer_entry *entry)
+{
+    pjsip_publishc *pubc = entry->user_data;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+    
+    PJ_UNUSED_ARG(timer_heap);
+
+    entry->id = 0;
+    status = pjsip_publishc_publish(pubc, 1, &tdata);
+    if (status == PJ_SUCCESS) {
+	status = pjsip_publishc_send(pubc, tdata);
+    } 
+    
+    if (status != PJ_SUCCESS) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+	pj_str_t reason = pj_strerror(status, errmsg, sizeof(errmsg));
+	call_callback(pubc, status, 400, &reason, NULL, -1);
+    }
+}
+
+static void tsx_callback(void *token, pjsip_event *event)
+{
+    pj_status_t status;
+    pjsip_publishc *pubc = token;
+    pjsip_transaction *tsx = event->body.tsx_state.tsx;
+    
+    /* Decrement pending transaction counter. */
+    pj_assert(pubc->pending_tsx > 0);
+    --pubc->pending_tsx;
+
+    /* If publication data has been deleted by user then remove publication 
+     * data from transaction's callback, and don't call callback.
+     */
+    if (pubc->_delete_flag) {
+
+	/* Nothing to do */
+	;
+
+    } else if (tsx->status_code == PJSIP_SC_PROXY_AUTHENTICATION_REQUIRED ||
+	       tsx->status_code == PJSIP_SC_UNAUTHORIZED)
+    {
+	pjsip_rx_data *rdata = event->body.tsx_state.src.rdata;
+	pjsip_tx_data *tdata;
+
+	status = pjsip_auth_clt_reinit_req( &pubc->auth_sess,
+					    rdata, 
+					    tsx->last_tx,  
+					    &tdata);
+
+	if (status == PJ_SUCCESS) {
+	    status = pjsip_publishc_send(pubc, tdata);
+	} 
+	
+	if (status != PJ_SUCCESS) {
+	    call_callback(pubc, status, tsx->status_code, 
+			  &rdata->msg_info.msg->line.status.reason,
+			  rdata, -1);
+	}
+
+	return;
+
+    } else {
+	pjsip_rx_data *rdata;
+	pj_int32_t expiration = 0xFFFF;
+
+	if (tsx->status_code/100 == 2) {
+	    pjsip_msg *msg;
+	    pjsip_expires_hdr *expires;
+	    pjsip_generic_string_hdr *etag_hdr;
+	    const pj_str_t STR_ETAG = { "SIP-ETag", 8 };
+
+	    rdata = event->body.tsx_state.src.rdata;
+	    msg = rdata->msg_info.msg;
+
+	    /* Save ETag value */
+	    etag_hdr = (pjsip_generic_string_hdr*)
+		       pjsip_msg_find_hdr_by_name(msg, &STR_ETAG, NULL);
+	    if (etag_hdr) {
+		pj_strdup(pubc->pool, &pubc->etag, &etag_hdr->hvalue);
+	    } else {
+		pubc->etag.slen = 0;
+	    }
+
+	    /* Update expires value */
+	    expires = pjsip_msg_find_hdr(msg, PJSIP_H_EXPIRES, NULL);
+
+	    if (expires)
+		expiration = expires->ivalue;
+	    
+	    if (pubc->auto_refresh && expiration!=0 && expiration!=0xFFFF) {
+		pj_time_val delay = { 0, 0};
+
+		delay.sec = expiration - DELAY_BEFORE_REFRESH;
+		if (pubc->expires != PJSIP_PUBC_EXPIRATION_NOT_SPECIFIED && 
+		    delay.sec > (pj_int32_t)pubc->expires) 
+		{
+		    delay.sec = pubc->expires;
+		}
+		if (delay.sec < DELAY_BEFORE_REFRESH) 
+		    delay.sec = DELAY_BEFORE_REFRESH;
+		pubc->timer.cb = &pubc_refresh_timer_cb;
+		pubc->timer.id = REFRESH_TIMER;
+		pubc->timer.user_data = pubc;
+		pjsip_endpt_schedule_timer( pubc->endpt, &pubc->timer, &delay);
+		pj_gettimeofday(&pubc->last_refresh);
+		pubc->next_refresh = pubc->last_refresh;
+		pubc->next_refresh.sec += delay.sec;
+	    }
+
+	} else {
+	    rdata = (event->body.tsx_state.type==PJSIP_EVENT_RX_MSG) ? 
+			event->body.tsx_state.src.rdata : NULL;
+	}
+
+
+	/* Call callback. */
+	if (expiration == 0xFFFF) expiration = -1;
+	call_callback(pubc, PJ_SUCCESS, tsx->status_code, 
+		      (rdata ? &rdata->msg_info.msg->line.status.reason 
+			: pjsip_get_status_text(tsx->status_code)),
+		      rdata, expiration);
+
+    }
+
+    /* Delete the record if user destroy pubc during the callback. */
+    if (pubc->_delete_flag && pubc->pending_tsx==0) {
+	pjsip_publishc_destroy(pubc);
+    }
+}
+
+
+PJ_DEF(pj_status_t) pjsip_publishc_send(pjsip_publishc *pubc, 
+					pjsip_tx_data *tdata)
+{
+    pj_status_t status;
+    pjsip_cseq_hdr *cseq_hdr;
+    pj_uint32_t cseq;
+
+    /* Make sure we don't have pending transaction. */
+    if (pubc->pending_tsx) {
+	PJ_LOG(4,(THIS_FILE, "Unable to send request, pubc has another "
+			     "transaction pending"));
+	pjsip_tx_data_dec_ref( tdata );
+	return PJSIP_EBUSY;
+    }
+
+    /* Invalidate message buffer. */
+    pjsip_tx_data_invalidate_msg(tdata);
+
+    /* Increment CSeq */
+    cseq = ++pubc->cseq_hdr->cseq;
+    cseq_hdr = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CSEQ, NULL);
+    cseq_hdr->cseq = cseq;
+
+    /* Increment pending transaction first, since transaction callback
+     * may be called even before send_request() returns!
+     */
+    ++pubc->pending_tsx;
+    status = pjsip_endpt_send_request(pubc->endpt, tdata, -1, pubc, 
+				      &tsx_callback);
+    if (status!=PJ_SUCCESS) {
+	--pubc->pending_tsx;
+	PJ_LOG(4,(THIS_FILE, "Error sending request, status=%d", status));
+    }
+
+    return status;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/xpidf.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/xpidf.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip-simple/xpidf.c	(revision 1163)
@@ -0,0 +1,299 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip-simple/xpidf.h>
+#include <pj/assert.h>
+#include <pj/guid.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+static pj_str_t STR_PRESENCE = { "presence", 8 };
+static pj_str_t STR_STATUS = { "status", 6 };
+static pj_str_t STR_OPEN = { "open", 4 };
+static pj_str_t STR_CLOSED = { "closed", 6 };
+static pj_str_t STR_URI = { "uri", 3 };
+static pj_str_t STR_ATOM = { "atom", 4 };
+static pj_str_t STR_ATOMID = { "atomid", 6 };
+static pj_str_t STR_ID = { "id", 2 };
+static pj_str_t STR_ADDRESS = { "address", 7 };
+static pj_str_t STR_SUBSCRIBE_PARAM = { ";method=SUBSCRIBE", 17 };
+static pj_str_t STR_PRESENTITY = { "presentity", 10 };
+static pj_str_t STR_EMPTY_STRING = { NULL, 0 };
+
+static pj_xml_node* xml_create_node(pj_pool_t *pool, 
+				    pj_str_t *name, const pj_str_t *value)
+{
+    pj_xml_node *node;
+
+    node = pj_pool_alloc(pool, sizeof(pj_xml_node));
+    pj_list_init(&node->attr_head);
+    pj_list_init(&node->node_head);
+    node->name = *name;
+    if (value) pj_strdup(pool, &node->content, value);
+    else node->content.ptr=NULL, node->content.slen=0;
+
+    return node;
+}
+
+static pj_xml_attr* xml_create_attr(pj_pool_t *pool, pj_str_t *name,
+				    const pj_str_t *value)
+{
+    pj_xml_attr *attr = pj_pool_alloc(pool, sizeof(*attr));
+    attr->name = *name;
+    pj_strdup(pool, &attr->value, value);
+    return attr;
+}
+
+
+PJ_DEF(pjxpidf_pres*) pjxpidf_create(pj_pool_t *pool, const pj_str_t *uri_cstr)
+{
+    pjxpidf_pres *pres;
+    pj_xml_node *presentity;
+    pj_xml_node *atom;
+    pj_xml_node *addr;
+    pj_xml_node *status;
+    pj_xml_attr *attr;
+    pj_str_t uri;
+    pj_str_t tmp;
+
+    /* <presence> */
+    pres = xml_create_node(pool, &STR_PRESENCE, NULL);
+
+    /* <presentity> */
+    presentity = xml_create_node(pool, &STR_PRESENTITY, NULL);
+    pj_xml_add_node(pres, presentity);
+
+    /* uri attribute */
+    uri.ptr = pj_pool_alloc(pool, uri_cstr->slen + STR_SUBSCRIBE_PARAM.slen);
+    pj_strcpy( &uri, uri_cstr);
+    pj_strcat( &uri, &STR_SUBSCRIBE_PARAM);
+    attr = xml_create_attr(pool, &STR_URI, &uri);
+    pj_xml_add_attr(presentity, attr);
+
+    /* <atom> */
+    atom = xml_create_node(pool, &STR_ATOM, NULL);
+    pj_xml_add_node(pres, atom);
+
+    /* atom id */
+    pj_create_unique_string(pool, &tmp);
+    attr = xml_create_attr(pool, &STR_ATOMID, &tmp);
+    pj_xml_add_attr(atom, attr);
+
+    /* address */
+    addr = xml_create_node(pool, &STR_ADDRESS, NULL);
+    pj_xml_add_node(atom, addr);
+
+    /* address'es uri */
+    attr = xml_create_attr(pool, &STR_URI, uri_cstr);
+    pj_xml_add_attr(addr, attr);
+
+    /* status */
+    status = xml_create_node(pool, &STR_STATUS, NULL);
+    pj_xml_add_node(addr, status);
+
+    /* status attr */
+    attr = xml_create_attr(pool, &STR_STATUS, &STR_OPEN);
+    pj_xml_add_attr(status, attr);
+
+    return pres;
+}   
+
+
+
+PJ_DEF(pjxpidf_pres*) pjxpidf_parse(pj_pool_t *pool, char *text, pj_size_t len)
+{
+    pjxpidf_pres *pres;
+    pj_xml_node *node;
+
+    pres = pj_xml_parse(pool, text, len);
+    if (!pres)
+	return NULL;
+
+    /* Validate <presence> */
+    if (pj_stricmp(&pres->name, &STR_PRESENCE) != 0)
+	return NULL;
+
+    /* Validate <presentity> */
+    node = pj_xml_find_node(pres, &STR_PRESENTITY);
+    if (node == NULL)
+	return NULL;
+    if (pj_xml_find_attr(node, &STR_URI, NULL) == NULL)
+	return NULL;
+
+    /* Validate <atom> */
+    node = pj_xml_find_node(pres, &STR_ATOM);
+    if (node == NULL)
+	return NULL;
+    if (pj_xml_find_attr(node, &STR_ATOMID, NULL) == NULL && 
+	pj_xml_find_attr(node, &STR_ID, NULL) == NULL)
+    {
+	return NULL;
+    }
+
+    /* Address */
+    node = pj_xml_find_node(node, &STR_ADDRESS);
+    if (node == NULL)
+	return NULL;
+    if (pj_xml_find_attr(node, &STR_URI, NULL) == NULL)
+	return NULL;
+
+
+    /* Status */
+    node = pj_xml_find_node(node, &STR_STATUS);
+    if (node == NULL)
+	return NULL;
+    if (pj_xml_find_attr(node, &STR_STATUS, NULL) == NULL)
+	return NULL;
+
+    return pres;
+}
+
+
+PJ_DEF(int) pjxpidf_print( pjxpidf_pres *pres, char *text, pj_size_t len)
+{
+    return pj_xml_print(pres, text, len, PJ_TRUE);
+}
+
+
+PJ_DEF(pj_str_t*) pjxpidf_get_uri(pjxpidf_pres *pres)
+{
+    pj_xml_node *presentity;
+    pj_xml_attr *attr;
+
+    presentity = pj_xml_find_node(pres, &STR_PRESENTITY);
+    if (!presentity)
+	return &STR_EMPTY_STRING;
+
+    attr = pj_xml_find_attr(presentity, &STR_URI, NULL);
+    if (!attr)
+	return &STR_EMPTY_STRING;
+
+    return &attr->value;
+}
+
+
+PJ_DEF(pj_status_t) pjxpidf_set_uri(pj_pool_t *pool, pjxpidf_pres *pres, 
+				    const pj_str_t *uri)
+{
+    pj_xml_node *presentity;
+    pj_xml_node *atom;
+    pj_xml_node *addr;
+    pj_xml_attr *attr;
+    pj_str_t dup_uri;
+
+    presentity = pj_xml_find_node(pres, &STR_PRESENTITY);
+    if (!presentity) {
+	pj_assert(0);
+	return -1;
+    }
+    atom = pj_xml_find_node(pres, &STR_ATOM);
+    if (!atom) {
+	pj_assert(0);
+	return -1;
+    }
+    addr = pj_xml_find_node(atom, &STR_ADDRESS);
+    if (!addr) {
+	pj_assert(0);
+	return -1;
+    }
+
+    /* Set uri in presentity */
+    attr = pj_xml_find_attr(presentity, &STR_URI, NULL);
+    if (!attr) {
+	pj_assert(0);
+	return -1;
+    }
+    pj_strdup(pool, &dup_uri, uri);
+    attr->value = dup_uri;
+
+    /* Set uri in address. */
+    attr = pj_xml_find_attr(addr, &STR_URI, NULL);
+    if (!attr) {
+	pj_assert(0);
+	return -1;
+    }
+    attr->value = dup_uri;
+
+    return 0;
+}
+
+
+PJ_DEF(pj_bool_t) pjxpidf_get_status(pjxpidf_pres *pres)
+{
+    pj_xml_node *atom;
+    pj_xml_node *addr;
+    pj_xml_node *status;
+    pj_xml_attr *attr;
+
+    atom = pj_xml_find_node(pres, &STR_ATOM);
+    if (!atom) {
+	pj_assert(0);
+	return PJ_FALSE;
+    }
+    addr = pj_xml_find_node(atom, &STR_ADDRESS);
+    if (!addr) {
+	pj_assert(0);
+	return PJ_FALSE;
+    }
+    status = pj_xml_find_node(addr, &STR_STATUS);
+    if (!status) {
+	pj_assert(0);
+	return PJ_FALSE;
+    }
+    attr = pj_xml_find_attr(status, &STR_STATUS, NULL);
+    if (!attr) {
+	pj_assert(0);
+	return PJ_FALSE;
+    }
+
+    return pj_stricmp(&attr->value, &STR_OPEN)==0 ? PJ_TRUE : PJ_FALSE;
+}
+
+
+PJ_DEF(pj_status_t) pjxpidf_set_status(pjxpidf_pres *pres, pj_bool_t online_status)
+{
+    pj_xml_node *atom;
+    pj_xml_node *addr;
+    pj_xml_node *status;
+    pj_xml_attr *attr;
+
+    atom = pj_xml_find_node(pres, &STR_ATOM);
+    if (!atom) {
+	pj_assert(0);
+	return -1;
+    }
+    addr = pj_xml_find_node(atom, &STR_ADDRESS);
+    if (!addr) {
+	pj_assert(0);
+	return -1;
+    }
+    status = pj_xml_find_node(addr, &STR_STATUS);
+    if (!status) {
+	pj_assert(0);
+	return -1;
+    }
+    attr = pj_xml_find_attr(status, &STR_STATUS, NULL);
+    if (!attr) {
+	pj_assert(0);
+	return -1;
+    }
+
+    attr->value = ( online_status ? STR_OPEN : STR_CLOSED );
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip-ua/sip_inv.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip-ua/sip_inv.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip-ua/sip_inv.c	(revision 1163)
@@ -0,0 +1,2559 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip-ua/sip_inv.h>
+#include <pjsip/sip_module.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_event.h>
+#include <pjsip/sip_transaction.h>
+#include <pjmedia/sdp.h>
+#include <pjmedia/sdp_neg.h>
+#include <pjmedia/errno.h>
+#include <pj/string.h>
+#include <pj/pool.h>
+#include <pj/assert.h>
+#include <pj/os.h>
+#include <pj/log.h>
+
+
+#define THIS_FILE	"sip_invite_session.c"
+
+static const char *inv_state_names[] =
+{
+    "NULL",
+    "CALLING",
+    "INCOMING",
+    "EARLY",
+    "CONNECTING",
+    "CONFIRMED",
+    "DISCONNCTD",
+    "TERMINATED",
+};
+
+/*
+ * Static prototypes.
+ */
+static pj_status_t mod_inv_load(pjsip_endpoint *endpt);
+static pj_status_t mod_inv_unload(void);
+static pj_bool_t   mod_inv_on_rx_request(pjsip_rx_data *rdata);
+static pj_bool_t   mod_inv_on_rx_response(pjsip_rx_data *rdata);
+static void	   mod_inv_on_tsx_state(pjsip_transaction*, pjsip_event*);
+
+static void inv_on_state_null( pjsip_inv_session *inv, pjsip_event *e);
+static void inv_on_state_calling( pjsip_inv_session *inv, pjsip_event *e);
+static void inv_on_state_incoming( pjsip_inv_session *inv, pjsip_event *e);
+static void inv_on_state_early( pjsip_inv_session *inv, pjsip_event *e);
+static void inv_on_state_connecting( pjsip_inv_session *inv, pjsip_event *e);
+static void inv_on_state_confirmed( pjsip_inv_session *inv, pjsip_event *e);
+static void inv_on_state_disconnected( pjsip_inv_session *inv, pjsip_event *e);
+
+static void (*inv_state_handler[])( pjsip_inv_session *inv, pjsip_event *e) = 
+{
+    &inv_on_state_null,
+    &inv_on_state_calling,
+    &inv_on_state_incoming,
+    &inv_on_state_early,
+    &inv_on_state_connecting,
+    &inv_on_state_confirmed,
+    &inv_on_state_disconnected,
+};
+
+static struct mod_inv
+{
+    pjsip_module	 mod;
+    pjsip_endpoint	*endpt;
+    pjsip_inv_callback	 cb;
+} mod_inv = 
+{
+    {
+	NULL, NULL,			    /* prev, next.		*/
+	{ "mod-invite", 10 },		    /* Name.			*/
+	-1,				    /* Id			*/
+	PJSIP_MOD_PRIORITY_DIALOG_USAGE,    /* Priority			*/
+	&mod_inv_load,			    /* load()			*/
+	NULL,				    /* start()			*/
+	NULL,				    /* stop()			*/
+	&mod_inv_unload,		    /* unload()			*/
+	&mod_inv_on_rx_request,		    /* on_rx_request()		*/
+	&mod_inv_on_rx_response,	    /* on_rx_response()		*/
+	NULL,				    /* on_tx_request.		*/
+	NULL,				    /* on_tx_response()		*/
+	&mod_inv_on_tsx_state,		    /* on_tsx_state()		*/
+    }
+};
+
+
+/* Invite session data to be attached to transaction. */
+struct tsx_inv_data
+{
+    pjsip_inv_session	*inv;
+    pj_bool_t		 sdp_done;
+};
+
+
+/*
+ * Module load()
+ */
+static pj_status_t mod_inv_load(pjsip_endpoint *endpt)
+{
+    pj_str_t allowed[] = {{"INVITE", 6}, {"ACK",3}, {"BYE",3}, {"CANCEL",6}};
+    pj_str_t accepted = { "application/sdp", 15 };
+
+    /* Register supported methods: INVITE, ACK, BYE, CANCEL */
+    pjsip_endpt_add_capability(endpt, &mod_inv.mod, PJSIP_H_ALLOW, NULL,
+			       PJ_ARRAY_SIZE(allowed), allowed);
+
+    /* Register "application/sdp" in Accept header */
+    pjsip_endpt_add_capability(endpt, &mod_inv.mod, PJSIP_H_ACCEPT, NULL,
+			       1, &accepted);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Module unload()
+ */
+static pj_status_t mod_inv_unload(void)
+{
+    /* Should remove capability here */
+    return PJ_SUCCESS;
+}
+
+/*
+ * Set session state.
+ */
+void inv_set_state(pjsip_inv_session *inv, pjsip_inv_state state,
+		   pjsip_event *e)
+{
+    pjsip_inv_state prev_state = inv->state;
+
+    /* Set state. */
+    inv->state = state;
+
+    /* If state is DISCONNECTED, cause code MUST have been set. */
+    pj_assert(inv->state != PJSIP_INV_STATE_DISCONNECTED ||
+	      inv->cause != 0);
+
+    /* Call on_state_changed() callback. */
+    if (mod_inv.cb.on_state_changed && inv->notify)
+	(*mod_inv.cb.on_state_changed)(inv, e);
+
+    /* Only decrement when previous state is not already DISCONNECTED */
+    if (inv->state == PJSIP_INV_STATE_DISCONNECTED &&
+	prev_state != PJSIP_INV_STATE_DISCONNECTED) 
+    {
+	pjsip_dlg_dec_session(inv->dlg, &mod_inv.mod);
+    }
+}
+
+
+/*
+ * Set cause code.
+ */
+void inv_set_cause(pjsip_inv_session *inv, int cause_code,
+		   const pj_str_t *cause_text)
+{
+    if (cause_code > inv->cause) {
+	inv->cause = cause_code;
+	if (cause_text)
+	    pj_strdup(inv->pool, &inv->cause_text, cause_text);
+	else if (cause_code/100 == 2)
+	    inv->cause_text = pj_str("Normal call clearing");
+	else
+	    inv->cause_text = *pjsip_get_status_text(cause_code);
+    }
+}
+
+
+
+/*
+ * Send ACK for 2xx response.
+ */
+static pj_status_t inv_send_ack(pjsip_inv_session *inv, pjsip_rx_data *rdata)
+{
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    PJ_LOG(5,(inv->obj_name, "Received %s, sending ACK",
+	      pjsip_rx_data_get_info(rdata)));
+
+    status = pjsip_dlg_create_request(inv->dlg, &pjsip_ack_method, 
+				      rdata->msg_info.cseq->cseq, &tdata);
+    if (status != PJ_SUCCESS) {
+	/* Better luck next time */
+	pj_assert(!"Unable to create ACK!");
+	return status;
+    }
+
+    status = pjsip_dlg_send_request(inv->dlg, tdata, -1, NULL);
+    if (status != PJ_SUCCESS) {
+	/* Better luck next time */
+	pj_assert(!"Unable to send ACK!");
+	return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Module on_rx_request()
+ *
+ * This callback is called for these events:
+ *  - endpoint receives request which was unhandled by higher priority
+ *    modules (e.g. transaction layer, dialog layer).
+ *  - dialog distributes incoming request to its usages.
+ */
+static pj_bool_t mod_inv_on_rx_request(pjsip_rx_data *rdata)
+{
+    pjsip_method *method;
+    pjsip_dialog *dlg;
+    pjsip_inv_session *inv;
+
+    /* Only wants to receive request from a dialog. */
+    dlg = pjsip_rdata_get_dlg(rdata);
+    if (dlg == NULL)
+	return PJ_FALSE;
+
+    inv = dlg->mod_data[mod_inv.mod.id];
+
+    /* Report to dialog that we handle INVITE, CANCEL, BYE, ACK. 
+     * If we need to send response, it will be sent in the state
+     * handlers.
+     */
+    method = &rdata->msg_info.msg->line.req.method;
+
+    if (method->id == PJSIP_INVITE_METHOD) {
+	return PJ_TRUE;
+    }
+
+    /* BYE and CANCEL must have existing invite session */
+    if (method->id == PJSIP_BYE_METHOD ||
+	method->id == PJSIP_CANCEL_METHOD)
+    {
+	if (inv == NULL)
+	    return PJ_FALSE;
+
+	return PJ_TRUE;
+    }
+
+    /* On receipt ACK request, when state is CONNECTING,
+     * move state to CONFIRMED.
+     */
+    if (method->id == PJSIP_ACK_METHOD && inv) {
+
+	/* Ignore ACK if pending INVITE transaction has not finished. */
+	if (inv->invite_tsx && 
+	    inv->invite_tsx->state < PJSIP_TSX_STATE_COMPLETED)
+	{
+	    return PJ_TRUE;
+	}
+
+	/* Terminate INVITE transaction, if it's still present. */
+	if (inv->invite_tsx && 
+	    inv->invite_tsx->state <= PJSIP_TSX_STATE_COMPLETED)
+	{
+	    pj_assert(inv->invite_tsx->status_code >= 200);
+	    pjsip_tsx_terminate(inv->invite_tsx, 
+				inv->invite_tsx->status_code);
+	    inv->invite_tsx = NULL;
+	}
+
+	/* On receipt of ACK, only set state to confirmed when state
+	 * is CONNECTING (e.g. we don't want to set the state to confirmed
+	 * when we receive ACK retransmission after sending non-2xx!)
+	 */
+	if (inv->state == PJSIP_INV_STATE_CONNECTING) {
+	    pjsip_event event;
+
+	    PJSIP_EVENT_INIT_RX_MSG(event, rdata);
+	    inv_set_state(inv, PJSIP_INV_STATE_CONFIRMED, &event);
+	}
+    }
+
+    return PJ_FALSE;
+}
+
+/*
+ * Module on_rx_response().
+ *
+ * This callback is called for these events:
+ *  - dialog distributes incoming 2xx response to INVITE (outside
+ *    transaction) to its usages.
+ *  - endpoint distributes strayed responses.
+ */
+static pj_bool_t mod_inv_on_rx_response(pjsip_rx_data *rdata)
+{
+    pjsip_dialog *dlg;
+    pjsip_inv_session *inv;
+    pjsip_msg *msg = rdata->msg_info.msg;
+
+    dlg = pjsip_rdata_get_dlg(rdata);
+
+    /* Ignore responses outside dialog */
+    if (dlg == NULL)
+	return PJ_FALSE;
+
+    /* Ignore responses not belonging to invite session */
+    inv = pjsip_dlg_get_inv_session(dlg);
+    if (inv == NULL)
+	return PJ_FALSE;
+
+    /* This MAY be retransmission of 2xx response to INVITE. 
+     * If it is, we need to send ACK.
+     */
+    if (msg->type == PJSIP_RESPONSE_MSG && msg->line.status.code/100==2 &&
+	rdata->msg_info.cseq->method.id == PJSIP_INVITE_METHOD &&
+	inv->invite_tsx == NULL) 
+    {
+
+	inv_send_ack(inv, rdata);
+	return PJ_TRUE;
+
+    }
+
+    /* No other processing needs to be done here. */
+    return PJ_FALSE;
+}
+
+/*
+ * Module on_tsx_state()
+ *
+ * This callback is called by dialog framework for all transactions
+ * inside the dialog for all its dialog usages.
+ */
+static void mod_inv_on_tsx_state(pjsip_transaction *tsx, pjsip_event *e)
+{
+    pjsip_dialog *dlg;
+    pjsip_inv_session *inv;
+
+    dlg = pjsip_tsx_get_dlg(tsx);
+    if (dlg == NULL)
+	return;
+
+    inv = pjsip_dlg_get_inv_session(dlg);
+    if (inv == NULL)
+	return;
+
+    /* Call state handler for the invite session. */
+    (*inv_state_handler[inv->state])(inv, e);
+
+    /* Call on_tsx_state */
+    if (mod_inv.cb.on_tsx_state_changed && inv->notify)
+	(*mod_inv.cb.on_tsx_state_changed)(inv, tsx, e);
+
+    /* Clear invite transaction when tsx is confirmed.
+     * Previously we set invite_tsx to NULL only when transaction has
+     * terminated, but this didn't work when ACK has the same Via branch
+     * value as the INVITE (see http://www.pjsip.org/trac/ticket/113)
+     */
+    if (tsx->state>=PJSIP_TSX_STATE_CONFIRMED && tsx == inv->invite_tsx)
+        inv->invite_tsx = NULL;
+}
+
+
+/*
+ * Initialize the invite module.
+ */
+PJ_DEF(pj_status_t) pjsip_inv_usage_init( pjsip_endpoint *endpt,
+					  const pjsip_inv_callback *cb)
+{
+    pj_status_t status;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(endpt && cb, PJ_EINVAL);
+
+    /* Some callbacks are mandatory */
+    PJ_ASSERT_RETURN(cb->on_state_changed && cb->on_new_session, PJ_EINVAL);
+
+    /* Check if module already registered. */
+    PJ_ASSERT_RETURN(mod_inv.mod.id == -1, PJ_EINVALIDOP);
+
+    /* Copy param. */
+    pj_memcpy(&mod_inv.cb, cb, sizeof(pjsip_inv_callback));
+
+    mod_inv.endpt = endpt;
+
+    /* Register the module. */
+    status = pjsip_endpt_register_module(endpt, &mod_inv.mod);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Get the instance of invite module.
+ */
+PJ_DEF(pjsip_module*) pjsip_inv_usage_instance(void)
+{
+    return &mod_inv.mod;
+}
+
+
+
+/*
+ * Return the invite session for the specified dialog.
+ */
+PJ_DEF(pjsip_inv_session*) pjsip_dlg_get_inv_session(pjsip_dialog *dlg)
+{
+    return dlg->mod_data[mod_inv.mod.id];
+}
+
+
+/*
+ * Get INVITE state name.
+ */
+PJ_DEF(const char *) pjsip_inv_state_name(pjsip_inv_state state)
+{
+    PJ_ASSERT_RETURN(state >= PJSIP_INV_STATE_NULL && 
+		     state <= PJSIP_INV_STATE_DISCONNECTED,
+		     "??");
+
+    return inv_state_names[state];
+}
+
+/*
+ * Create UAC invite session.
+ */
+PJ_DEF(pj_status_t) pjsip_inv_create_uac( pjsip_dialog *dlg,
+					  const pjmedia_sdp_session *local_sdp,
+					  unsigned options,
+					  pjsip_inv_session **p_inv)
+{
+    pjsip_inv_session *inv;
+    pj_status_t status;
+
+    /* Verify arguments. */
+    PJ_ASSERT_RETURN(dlg && p_inv, PJ_EINVAL);
+
+    /* Must lock dialog first */
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Normalize options */
+    if (options & PJSIP_INV_REQUIRE_100REL)
+	options |= PJSIP_INV_SUPPORT_100REL;
+
+    if (options & PJSIP_INV_REQUIRE_TIMER)
+	options |= PJSIP_INV_SUPPORT_TIMER;
+
+    /* Create the session */
+    inv = pj_pool_zalloc(dlg->pool, sizeof(pjsip_inv_session));
+    pj_assert(inv != NULL);
+
+    inv->pool = dlg->pool;
+    inv->role = PJSIP_ROLE_UAC;
+    inv->state = PJSIP_INV_STATE_NULL;
+    inv->dlg = dlg;
+    inv->options = options;
+    inv->notify = PJ_TRUE;
+    inv->cause = 0;
+
+    /* Object name will use the same dialog pointer. */
+    pj_ansi_snprintf(inv->obj_name, PJ_MAX_OBJ_NAME, "inv%p", dlg);
+
+    /* Create negotiator if local_sdp is specified. */
+    if (local_sdp) {
+	status = pjmedia_sdp_neg_create_w_local_offer(dlg->pool, local_sdp,
+						      &inv->neg);
+	if (status != PJ_SUCCESS) {
+	    pjsip_dlg_dec_lock(dlg);
+	    return status;
+	}
+    }
+
+    /* Register invite as dialog usage. */
+    status = pjsip_dlg_add_usage(dlg, &mod_inv.mod, inv);
+    if (status != PJ_SUCCESS) {
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    /* Increment dialog session */
+    pjsip_dlg_inc_session(dlg, &mod_inv.mod);
+
+    /* Done */
+    *p_inv = inv;
+
+    pjsip_dlg_dec_lock(dlg);
+
+    PJ_LOG(5,(inv->obj_name, "UAC invite session created for dialog %s",
+	      dlg->obj_name));
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Verify incoming INVITE request.
+ */
+PJ_DEF(pj_status_t) pjsip_inv_verify_request(pjsip_rx_data *rdata,
+					     unsigned *options,
+					     const pjmedia_sdp_session *l_sdp,
+					     pjsip_dialog *dlg,
+					     pjsip_endpoint *endpt,
+					     pjsip_tx_data **p_tdata)
+{
+    pjsip_msg *msg;
+    pjsip_allow_hdr *allow;
+    pjsip_supported_hdr *sup_hdr;
+    pjsip_require_hdr *req_hdr;
+    int code = 200;
+    unsigned rem_option = 0;
+    pj_status_t status = PJ_SUCCESS;
+    pjsip_hdr res_hdr_list;
+
+    /* Init return arguments. */
+    if (p_tdata) *p_tdata = NULL;
+
+    /* Verify arguments. */
+    PJ_ASSERT_RETURN(rdata != NULL && options != NULL, PJ_EINVAL);
+
+    /* Normalize options */
+    if (*options & PJSIP_INV_REQUIRE_100REL)
+	*options |= PJSIP_INV_SUPPORT_100REL;
+
+    if (*options & PJSIP_INV_REQUIRE_TIMER)
+	*options |= PJSIP_INV_SUPPORT_TIMER;
+
+    /* Get the message in rdata */
+    msg = rdata->msg_info.msg;
+
+    /* Must be INVITE request. */
+    PJ_ASSERT_RETURN(msg->type == PJSIP_REQUEST_MSG &&
+		     msg->line.req.method.id == PJSIP_INVITE_METHOD,
+		     PJ_EINVAL);
+
+    /* If tdata is specified, then either dlg or endpt must be specified */
+    PJ_ASSERT_RETURN((!p_tdata) || (endpt || dlg), PJ_EINVAL);
+
+    /* Get the endpoint */
+    endpt = endpt ? endpt : dlg->endpt;
+
+    /* Init response header list */
+    pj_list_init(&res_hdr_list);
+
+    /* Check the request body, see if it'inv something that we support
+     * (i.e. SDP). 
+     */
+    if (msg->body) {
+	pjsip_msg_body *body = msg->body;
+	pj_str_t str_application = {"application", 11};
+	pj_str_t str_sdp = { "sdp", 3 };
+	pjmedia_sdp_session *sdp;
+
+	/* Check content type. */
+	if (pj_stricmp(&body->content_type.type, &str_application) != 0 ||
+	    pj_stricmp(&body->content_type.subtype, &str_sdp) != 0)
+	{
+	    /* Not "application/sdp" */
+	    code = PJSIP_SC_UNSUPPORTED_MEDIA_TYPE;
+	    status = PJSIP_ERRNO_FROM_SIP_STATUS(code);
+
+	    if (p_tdata) {
+		/* Add Accept header to response */
+		pjsip_accept_hdr *acc;
+
+		acc = pjsip_accept_hdr_create(rdata->tp_info.pool);
+		PJ_ASSERT_RETURN(acc, PJ_ENOMEM);
+		acc->values[acc->count++] = pj_str("application/sdp");
+		pj_list_push_back(&res_hdr_list, acc);
+	    }
+
+	    goto on_return;
+	}
+
+	/* Parse and validate SDP */
+	status = pjmedia_sdp_parse(rdata->tp_info.pool, body->data, body->len,
+				   &sdp);
+	if (status == PJ_SUCCESS)
+	    status = pjmedia_sdp_validate(sdp);
+
+	if (status != PJ_SUCCESS) {
+	    /* Unparseable or invalid SDP */
+	    code = PJSIP_SC_BAD_REQUEST;
+
+	    if (p_tdata) {
+		/* Add Warning header. */
+		pjsip_warning_hdr *w;
+
+		w = pjsip_warning_hdr_create_from_status(rdata->tp_info.pool,
+							 pjsip_endpt_name(endpt),
+							 status);
+		PJ_ASSERT_RETURN(w, PJ_ENOMEM);
+
+		pj_list_push_back(&res_hdr_list, w);
+	    }
+
+	    goto on_return;
+	}
+
+	/* Negotiate with local SDP */
+	if (l_sdp) {
+	    pjmedia_sdp_neg *neg;
+
+	    /* Local SDP must be valid! */
+	    PJ_ASSERT_RETURN((status=pjmedia_sdp_validate(l_sdp))==PJ_SUCCESS,
+			     status);
+
+	    /* Create SDP negotiator */
+	    status = pjmedia_sdp_neg_create_w_remote_offer(
+			    rdata->tp_info.pool, l_sdp, sdp, &neg);
+	    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+	    /* Negotiate SDP */
+	    status = pjmedia_sdp_neg_negotiate(rdata->tp_info.pool, neg, 0);
+	    if (status != PJ_SUCCESS) {
+
+		/* Incompatible media */
+		code = PJSIP_SC_NOT_ACCEPTABLE_HERE;
+
+		if (p_tdata) {
+		    pjsip_accept_hdr *acc;
+		    pjsip_warning_hdr *w;
+
+		    /* Add Warning header. */
+		    w = pjsip_warning_hdr_create_from_status(
+					    rdata->tp_info.pool, 
+					    pjsip_endpt_name(endpt), status);
+		    PJ_ASSERT_RETURN(w, PJ_ENOMEM);
+
+		    pj_list_push_back(&res_hdr_list, w);
+
+		    /* Add Accept header to response */
+		    acc = pjsip_accept_hdr_create(rdata->tp_info.pool);
+		    PJ_ASSERT_RETURN(acc, PJ_ENOMEM);
+		    acc->values[acc->count++] = pj_str("application/sdp");
+		    pj_list_push_back(&res_hdr_list, acc);
+
+		}
+
+		goto on_return;
+	    }
+	}
+    }
+
+    /* Check supported methods, see if peer supports UPDATE.
+     * We just assume that peer supports standard INVITE, ACK, CANCEL, and BYE
+     * implicitly by sending this INVITE.
+     */
+    allow = pjsip_msg_find_hdr(msg, PJSIP_H_ALLOW, NULL);
+    if (allow) {
+	unsigned i;
+	const pj_str_t STR_UPDATE = { "UPDATE", 6 };
+
+	for (i=0; i<allow->count; ++i) {
+	    if (pj_stricmp(&allow->values[i], &STR_UPDATE)==0)
+		break;
+	}
+
+	if (i != allow->count) {
+	    /* UPDATE is present in Allow */
+	    rem_option |= PJSIP_INV_SUPPORT_UPDATE;
+	}
+
+    }
+
+    /* Check Supported header */
+    sup_hdr = pjsip_msg_find_hdr(msg, PJSIP_H_SUPPORTED, NULL);
+    if (sup_hdr) {
+	unsigned i;
+	pj_str_t STR_100REL = { "100rel", 6};
+	pj_str_t STR_TIMER = { "timer", 5 };
+
+	for (i=0; i<sup_hdr->count; ++i) {
+	    if (pj_stricmp(&sup_hdr->values[i], &STR_100REL)==0)
+		rem_option |= PJSIP_INV_SUPPORT_100REL;
+	    else if (pj_stricmp(&sup_hdr->values[i], &STR_TIMER)==0)
+		rem_option |= PJSIP_INV_SUPPORT_TIMER;
+	}
+    }
+
+    /* Check Require header */
+    req_hdr = pjsip_msg_find_hdr(msg, PJSIP_H_REQUIRE, NULL);
+    if (req_hdr) {
+	unsigned i;
+	const pj_str_t STR_100REL = { "100rel", 6};
+	const pj_str_t STR_TIMER = { "timer", 5 };
+	const pj_str_t STR_REPLACES = { "replaces", 8 };
+	unsigned unsupp_cnt = 0;
+	pj_str_t unsupp_tags[PJSIP_GENERIC_ARRAY_MAX_COUNT];
+	
+	for (i=0; i<req_hdr->count; ++i) {
+	    if ((*options & PJSIP_INV_SUPPORT_100REL) && 
+		pj_stricmp(&req_hdr->values[i], &STR_100REL)==0)
+	    {
+		rem_option |= PJSIP_INV_REQUIRE_100REL;
+
+	    } else if ((*options && PJSIP_INV_SUPPORT_TIMER) &&
+		       pj_stricmp(&req_hdr->values[i], &STR_TIMER)==0)
+	    {
+		rem_option |= PJSIP_INV_REQUIRE_TIMER;
+
+	    } else if (pj_stricmp(&req_hdr->values[i], &STR_REPLACES)==0) {
+		pj_bool_t supp;
+		
+		supp = pjsip_endpt_has_capability(endpt, PJSIP_H_SUPPORTED, 
+						  NULL, &STR_REPLACES);
+		if (!supp)
+		    unsupp_tags[unsupp_cnt++] = req_hdr->values[i];
+
+	    } else {
+		/* Unknown/unsupported extension tag!  */
+		unsupp_tags[unsupp_cnt++] = req_hdr->values[i];
+	    }
+	}
+
+	/* Check if there are required tags that we don't support */
+	if (unsupp_cnt) {
+
+	    code = PJSIP_SC_BAD_EXTENSION;
+	    status = PJSIP_ERRNO_FROM_SIP_STATUS(code);
+
+	    if (p_tdata) {
+		pjsip_unsupported_hdr *unsupp_hdr;
+		const pjsip_hdr *h;
+
+		/* Add Unsupported header. */
+		unsupp_hdr = pjsip_unsupported_hdr_create(rdata->tp_info.pool);
+		PJ_ASSERT_RETURN(unsupp_hdr != NULL, PJ_ENOMEM);
+
+		unsupp_hdr->count = unsupp_cnt;
+		for (i=0; i<unsupp_cnt; ++i)
+		    unsupp_hdr->values[i] = unsupp_tags[i];
+
+		pj_list_push_back(&res_hdr_list, unsupp_hdr);
+
+		/* Add Supported header. */
+		h = pjsip_endpt_get_capability(endpt, PJSIP_H_SUPPORTED, 
+					       NULL);
+		pj_assert(h);
+		if (h) {
+		    sup_hdr = pjsip_hdr_clone(rdata->tp_info.pool, h);
+		    pj_list_push_back(&res_hdr_list, sup_hdr);
+		}
+	    }
+
+	    goto on_return;
+	}
+    }
+
+    /* Check if there are local requirements that are not supported
+     * by peer.
+     */
+    if ( ((*options & PJSIP_INV_REQUIRE_100REL)!=0 && 
+	  (rem_option & PJSIP_INV_SUPPORT_100REL)==0) ||
+	 ((*options & PJSIP_INV_REQUIRE_TIMER)!=0 &&
+	  (rem_option & PJSIP_INV_SUPPORT_TIMER)==0))
+    {
+	code = PJSIP_SC_EXTENSION_REQUIRED;
+	status = PJSIP_ERRNO_FROM_SIP_STATUS(code);
+
+	if (p_tdata) {
+	    const pjsip_hdr *h;
+
+	    /* Add Require header. */
+	    req_hdr = pjsip_require_hdr_create(rdata->tp_info.pool);
+	    PJ_ASSERT_RETURN(req_hdr != NULL, PJ_ENOMEM);
+
+	    if (*options & PJSIP_INV_REQUIRE_100REL)
+		req_hdr->values[req_hdr->count++] = pj_str("100rel");
+
+	    if (*options & PJSIP_INV_REQUIRE_TIMER)
+		req_hdr->values[req_hdr->count++] = pj_str("timer");
+
+	    pj_list_push_back(&res_hdr_list, req_hdr);
+
+	    /* Add Supported header. */
+	    h = pjsip_endpt_get_capability(endpt, PJSIP_H_SUPPORTED, 
+					   NULL);
+	    pj_assert(h);
+	    if (h) {
+		sup_hdr = pjsip_hdr_clone(rdata->tp_info.pool, h);
+		pj_list_push_back(&res_hdr_list, sup_hdr);
+	    }
+
+	}
+
+	goto on_return;
+    }
+
+on_return:
+
+    /* Create response if necessary */
+    if (code != 200 && p_tdata) {
+	pjsip_tx_data *tdata;
+	const pjsip_hdr *h;
+
+	if (dlg) {
+	    status = pjsip_dlg_create_response(dlg, rdata, code, NULL, 
+					       &tdata);
+	} else {
+	    status = pjsip_endpt_create_response(endpt, rdata, code, NULL, 
+						 &tdata);
+	}
+
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	/* Add response headers. */
+	h = res_hdr_list.next;
+	while (h != &res_hdr_list) {
+	    pjsip_hdr *cloned;
+
+	    cloned = pjsip_hdr_clone(tdata->pool, h);
+	    PJ_ASSERT_RETURN(cloned, PJ_ENOMEM);
+
+	    pjsip_msg_add_hdr(tdata->msg, cloned);
+
+	    h = h->next;
+	}
+
+	*p_tdata = tdata;
+
+	/* Can not return PJ_SUCCESS when response message is produced.
+	 * Ref: PROTOS test ~#2490
+	 */
+	if (status == PJ_SUCCESS)
+	    status = PJSIP_ERRNO_FROM_SIP_STATUS(code);
+
+    }
+
+    return status;
+}
+
+/*
+ * Create UAS invite session.
+ */
+PJ_DEF(pj_status_t) pjsip_inv_create_uas( pjsip_dialog *dlg,
+					  pjsip_rx_data *rdata,
+					  const pjmedia_sdp_session *local_sdp,
+					  unsigned options,
+					  pjsip_inv_session **p_inv)
+{
+    pjsip_inv_session *inv;
+    struct tsx_inv_data *tsx_inv_data;
+    pjsip_msg *msg;
+    pjmedia_sdp_session *rem_sdp = NULL;
+    pj_status_t status;
+
+    /* Verify arguments. */
+    PJ_ASSERT_RETURN(dlg && rdata && p_inv, PJ_EINVAL);
+
+    /* Dialog MUST have been initialised. */
+    PJ_ASSERT_RETURN(pjsip_rdata_get_tsx(rdata) != NULL, PJ_EINVALIDOP);
+
+    msg = rdata->msg_info.msg;
+
+    /* rdata MUST contain INVITE request */
+    PJ_ASSERT_RETURN(msg->type == PJSIP_REQUEST_MSG &&
+		     msg->line.req.method.id == PJSIP_INVITE_METHOD,
+		     PJ_EINVALIDOP);
+
+    /* Lock dialog */
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Normalize options */
+    if (options & PJSIP_INV_REQUIRE_100REL)
+	options |= PJSIP_INV_SUPPORT_100REL;
+
+    if (options & PJSIP_INV_REQUIRE_TIMER)
+	options |= PJSIP_INV_SUPPORT_TIMER;
+
+    /* Create the session */
+    inv = pj_pool_zalloc(dlg->pool, sizeof(pjsip_inv_session));
+    pj_assert(inv != NULL);
+
+    inv->pool = dlg->pool;
+    inv->role = PJSIP_ROLE_UAS;
+    inv->state = PJSIP_INV_STATE_NULL;
+    inv->dlg = dlg;
+    inv->options = options;
+    inv->notify = PJ_TRUE;
+    inv->cause = 0;
+
+    /* Object name will use the same dialog pointer. */
+    pj_ansi_snprintf(inv->obj_name, PJ_MAX_OBJ_NAME, "inv%p", dlg);
+
+    /* Parse SDP in message body, if present. */
+    if (msg->body) {
+	pjsip_msg_body *body = msg->body;
+
+	/* Parse and validate SDP */
+	status = pjmedia_sdp_parse(inv->pool, body->data, body->len,
+				   &rem_sdp);
+	if (status == PJ_SUCCESS)
+	    status = pjmedia_sdp_validate(rem_sdp);
+
+	if (status != PJ_SUCCESS) {
+	    pjsip_dlg_dec_lock(dlg);
+	    return status;
+	}
+    }
+
+    /* Create negotiator. */
+    if (rem_sdp) {
+	status = pjmedia_sdp_neg_create_w_remote_offer(inv->pool, local_sdp,
+						       rem_sdp, &inv->neg);
+						
+    } else if (local_sdp) {
+	status = pjmedia_sdp_neg_create_w_local_offer(inv->pool, local_sdp,
+						      &inv->neg);
+    } else {
+	status = PJ_SUCCESS;
+    }
+
+    if (status != PJ_SUCCESS) {
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    /* Register invite as dialog usage. */
+    status = pjsip_dlg_add_usage(dlg, &mod_inv.mod, inv);
+    if (status != PJ_SUCCESS) {
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    /* Increment session in the dialog. */
+    pjsip_dlg_inc_session(dlg, &mod_inv.mod);
+
+    /* Save the invite transaction. */
+    inv->invite_tsx = pjsip_rdata_get_tsx(rdata);
+
+    /* Attach our data to the transaction. */
+    tsx_inv_data = pj_pool_zalloc(inv->invite_tsx->pool, 
+				  sizeof(struct tsx_inv_data));
+    tsx_inv_data->inv = inv;
+    inv->invite_tsx->mod_data[mod_inv.mod.id] = tsx_inv_data;
+
+    /* Done */
+    pjsip_dlg_dec_lock(dlg);
+    *p_inv = inv;
+
+    PJ_LOG(5,(inv->obj_name, "UAS invite session created for dialog %s",
+	      dlg->obj_name));
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Forcefully terminate the session.
+ */
+PJ_DEF(pj_status_t) pjsip_inv_terminate( pjsip_inv_session *inv,
+				         int st_code,
+					 pj_bool_t notify)
+{
+    PJ_ASSERT_RETURN(inv, PJ_EINVAL);
+
+    /* Lock dialog. */
+    pjsip_dlg_inc_lock(inv->dlg);
+
+    /* Set callback notify flag. */
+    inv->notify = notify;
+
+    /* If there's pending transaction, terminate the transaction. 
+     * This may subsequently set the INVITE session state to
+     * disconnected.
+     */
+    if (inv->invite_tsx && 
+	inv->invite_tsx->state <= PJSIP_TSX_STATE_COMPLETED)
+    {
+	pjsip_tsx_terminate(inv->invite_tsx, st_code);
+
+    }
+
+    /* Set cause. */
+    inv_set_cause(inv, st_code, NULL);
+
+    /* Forcefully terminate the session if state is not DISCONNECTED */
+    if (inv->state != PJSIP_INV_STATE_DISCONNECTED) {
+	inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, NULL);
+    }
+
+    /* Done.
+     * The dec_lock() below will actually destroys the dialog if it
+     * has no other session.
+     */
+    pjsip_dlg_dec_lock(inv->dlg);
+
+    return PJ_SUCCESS;
+}
+
+
+static void *clone_sdp(pj_pool_t *pool, const void *data, unsigned len)
+{
+    PJ_UNUSED_ARG(len);
+    return pjmedia_sdp_session_clone(pool, data);
+}
+
+static int print_sdp(pjsip_msg_body *body, char *buf, pj_size_t len)
+{
+    return pjmedia_sdp_print(body->data, buf, len);
+}
+
+
+PJ_DEF(pj_status_t) pjsip_create_sdp_body( pj_pool_t *pool,
+					   pjmedia_sdp_session *sdp,
+					   pjsip_msg_body **p_body)
+{
+    const pj_str_t STR_APPLICATION = { "application", 11};
+    const pj_str_t STR_SDP = { "sdp", 3 };
+    pjsip_msg_body *body;
+
+    body = pj_pool_zalloc(pool, sizeof(pjsip_msg_body));
+    PJ_ASSERT_RETURN(body != NULL, PJ_ENOMEM);
+
+    body->content_type.type = STR_APPLICATION;
+    body->content_type.subtype = STR_SDP;
+    body->data = sdp;
+    body->len = 0;
+    body->clone_data = &clone_sdp;
+    body->print_body = &print_sdp;
+
+    *p_body = body;
+
+    return PJ_SUCCESS;
+}
+
+static pjsip_msg_body *create_sdp_body(pj_pool_t *pool,
+				       const pjmedia_sdp_session *c_sdp)
+{
+    pjsip_msg_body *body;
+    pj_status_t status;
+
+    status = pjsip_create_sdp_body(pool, 
+				   pjmedia_sdp_session_clone(pool, c_sdp),
+				   &body);
+
+    if (status != PJ_SUCCESS)
+	return NULL;
+
+    return body;
+}
+
+/*
+ * Create initial INVITE request.
+ */
+PJ_DEF(pj_status_t) pjsip_inv_invite( pjsip_inv_session *inv,
+				      pjsip_tx_data **p_tdata )
+{
+    pjsip_tx_data *tdata;
+    const pjsip_hdr *hdr;
+    pj_bool_t has_sdp;
+    pj_status_t status;
+
+    /* Verify arguments. */
+    PJ_ASSERT_RETURN(inv && p_tdata, PJ_EINVAL);
+
+    /* State MUST be NULL or CONFIRMED. */
+    PJ_ASSERT_RETURN(inv->state == PJSIP_INV_STATE_NULL ||
+		     inv->state == PJSIP_INV_STATE_CONFIRMED, 
+		     PJ_EINVALIDOP);
+
+    /* Lock dialog. */
+    pjsip_dlg_inc_lock(inv->dlg);
+
+    /* Create the INVITE request. */
+    status = pjsip_dlg_create_request(inv->dlg, &pjsip_invite_method, -1,
+				      &tdata);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+
+    /* If this is the first INVITE, then copy the headers from inv_hdr.
+     * These are the headers parsed from the request URI when the
+     * dialog was created.
+     */
+    if (inv->state == PJSIP_INV_STATE_NULL) {
+	hdr = inv->dlg->inv_hdr.next;
+
+	while (hdr != &inv->dlg->inv_hdr) {
+	    pjsip_msg_add_hdr(tdata->msg,
+			      pjsip_hdr_shallow_clone(tdata->pool, hdr));
+	    hdr = hdr->next;
+	}
+    }
+
+    /* See if we have SDP to send. */
+    if (inv->neg) {
+	pjmedia_sdp_neg_state neg_state;
+
+	neg_state = pjmedia_sdp_neg_get_state(inv->neg);
+
+	has_sdp = (neg_state == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER ||
+		   (neg_state == PJMEDIA_SDP_NEG_STATE_WAIT_NEGO &&
+		    pjmedia_sdp_neg_has_local_answer(inv->neg)));
+
+
+    } else {
+	has_sdp = PJ_FALSE;
+    }
+
+    /* Add SDP, if any. */
+    if (has_sdp) {
+	const pjmedia_sdp_session *offer;
+
+	status = pjmedia_sdp_neg_get_neg_local(inv->neg, &offer);
+	if (status != PJ_SUCCESS)
+	    goto on_return;
+
+	tdata->msg->body = create_sdp_body(tdata->pool, offer);
+    }
+
+    /* Add Allow header. */
+    hdr = pjsip_endpt_get_capability(inv->dlg->endpt, PJSIP_H_ALLOW, NULL);
+    if (hdr) {
+	pjsip_msg_add_hdr(tdata->msg,
+			  pjsip_hdr_shallow_clone(tdata->pool, hdr));
+    }
+
+    /* Add Supported header */
+    hdr = pjsip_endpt_get_capability(inv->dlg->endpt, PJSIP_H_SUPPORTED, NULL);
+    if (hdr) {
+	pjsip_msg_add_hdr(tdata->msg,
+			  pjsip_hdr_shallow_clone(tdata->pool, hdr));
+    }
+
+    /* Add Require header. */
+    PJ_TODO(INVITE_ADD_REQUIRE_HEADER);
+
+    /* Done. */
+    *p_tdata = tdata;
+
+
+on_return:
+    pjsip_dlg_dec_lock(inv->dlg);
+    return status;
+}
+
+
+/*
+ * Negotiate SDP.
+ */
+static pj_status_t inv_negotiate_sdp( pjsip_inv_session *inv )
+{
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(pjmedia_sdp_neg_get_state(inv->neg) ==
+		     PJMEDIA_SDP_NEG_STATE_WAIT_NEGO, 
+		     PJMEDIA_SDPNEG_EINSTATE);
+
+    status = pjmedia_sdp_neg_negotiate(inv->pool, inv->neg, 0);
+
+    PJ_LOG(5,(inv->obj_name, "SDP negotiation done, status=%d", status));
+
+    if (mod_inv.cb.on_media_update && inv->notify)
+	(*mod_inv.cb.on_media_update)(inv, status);
+
+    return status;
+}
+
+/*
+ * Check in incoming message for SDP offer/answer.
+ */
+static pj_status_t inv_check_sdp_in_incoming_msg( pjsip_inv_session *inv,
+						  pjsip_transaction *tsx,
+						  pjsip_rx_data *rdata)
+{
+    struct tsx_inv_data *tsx_inv_data;
+    static const pj_str_t str_application = { "application", 11 };
+    static const pj_str_t str_sdp = { "sdp", 3 };
+    pj_status_t status;
+    pjsip_msg *msg;
+    pjmedia_sdp_session *sdp;
+
+    /* Get/attach invite session's transaction data */
+    tsx_inv_data = tsx->mod_data[mod_inv.mod.id];
+    if (tsx_inv_data == NULL) {
+	tsx_inv_data = pj_pool_zalloc(tsx->pool, sizeof(struct tsx_inv_data));
+	tsx_inv_data->inv = inv;
+	tsx->mod_data[mod_inv.mod.id] = tsx_inv_data;
+    }
+
+    /* MUST NOT do multiple SDP offer/answer in a single transaction. 
+     */
+
+    if (tsx_inv_data->sdp_done)
+	return PJ_SUCCESS;
+
+    /* Check if SDP is present in the message. */
+
+    msg = rdata->msg_info.msg;
+    if (msg->body == NULL) {
+	/* Message doesn't have body. */
+	return PJ_SUCCESS;
+    }
+
+    if (pj_stricmp(&msg->body->content_type.type, &str_application) ||
+	pj_stricmp(&msg->body->content_type.subtype, &str_sdp))
+    {
+	/* Message body is not "application/sdp" */
+	return PJMEDIA_SDP_EINSDP;
+    }
+
+    /* Parse the SDP body. */
+
+    status = pjmedia_sdp_parse(rdata->tp_info.pool, msg->body->data,
+			       msg->body->len, &sdp);
+    if (status != PJ_SUCCESS) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+	pj_strerror(status, errmsg, sizeof(errmsg));
+	PJ_LOG(4,(THIS_FILE, "Error parsing SDP in %s: %s",
+		  pjsip_rx_data_get_info(rdata), errmsg));
+	return PJMEDIA_SDP_EINSDP;
+    }
+
+    /* The SDP can be an offer or answer, depending on negotiator's state */
+
+    if (inv->neg == NULL ||
+	pjmedia_sdp_neg_get_state(inv->neg) == PJMEDIA_SDP_NEG_STATE_DONE) 
+    {
+
+	/* This is an offer. */
+
+	PJ_LOG(5,(inv->obj_name, "Got SDP offer in %s", 
+		  pjsip_rx_data_get_info(rdata)));
+
+	if (inv->neg == NULL) {
+	    status=pjmedia_sdp_neg_create_w_remote_offer(inv->pool, NULL, 
+							 sdp, &inv->neg);
+	} else {
+	    status=pjmedia_sdp_neg_set_remote_offer(inv->pool, inv->neg, sdp);
+	}
+
+	if (status != PJ_SUCCESS) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+	    pj_strerror(status, errmsg, sizeof(errmsg));
+	    PJ_LOG(4,(THIS_FILE, "Error processing SDP offer in %s: %s",
+		      pjsip_rx_data_get_info(rdata), errmsg));
+	    return PJMEDIA_SDP_EINSDP;
+	}
+
+	/* Inform application about remote offer. */
+
+	if (mod_inv.cb.on_rx_offer && inv->notify) {
+
+	    (*mod_inv.cb.on_rx_offer)(inv, sdp);
+
+	}
+
+    } else if (pjmedia_sdp_neg_get_state(inv->neg) == 
+		PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER) 
+    {
+
+	/* This is an answer. 
+	 * Process and negotiate remote answer.
+	 */
+
+	PJ_LOG(5,(inv->obj_name, "Got SDP answer in %s", 
+		  pjsip_rx_data_get_info(rdata)));
+
+	status = pjmedia_sdp_neg_set_remote_answer(inv->pool, inv->neg, sdp);
+
+	if (status != PJ_SUCCESS) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+	    pj_strerror(status, errmsg, sizeof(errmsg));
+	    PJ_LOG(4,(THIS_FILE, "Error processing SDP answer in %s: %s",
+		      pjsip_rx_data_get_info(rdata), errmsg));
+	    return PJMEDIA_SDP_EINSDP;
+	}
+
+	/* Negotiate SDP */
+
+	inv_negotiate_sdp(inv);
+
+	/* Mark this transaction has having SDP offer/answer done. */
+
+	tsx_inv_data->sdp_done = 1;
+
+    } else {
+	
+	PJ_LOG(5,(THIS_FILE, "Ignored SDP in %s: negotiator state is %s",
+	      pjsip_rx_data_get_info(rdata), 
+	      pjmedia_sdp_neg_state_str(pjmedia_sdp_neg_get_state(inv->neg))));
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Process INVITE answer, for both initial and subsequent re-INVITE
+ */
+static pj_status_t process_answer( pjsip_inv_session *inv,
+				   int st_code,
+				   pjsip_tx_data *tdata,
+				   const pjmedia_sdp_session *local_sdp)
+{
+    pj_status_t status;
+    const pjmedia_sdp_session *sdp = NULL;
+
+    /* If local_sdp is specified, then we MUST NOT have answered the
+     * offer before. 
+     */
+    if (local_sdp && (st_code/100==1 || st_code/100==2)) {
+
+	if (inv->neg == NULL) {
+	    status = pjmedia_sdp_neg_create_w_local_offer(inv->pool, local_sdp,
+							  &inv->neg);
+	} else if (pjmedia_sdp_neg_get_state(inv->neg)==
+		   PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER)
+	{
+	    status = pjmedia_sdp_neg_set_local_answer(inv->pool, inv->neg,
+						      local_sdp);
+	} else {
+
+	    /* Can not specify local SDP at this state. */
+	    pj_assert(0);
+	    status = PJMEDIA_SDPNEG_EINSTATE;
+	}
+
+	if (status != PJ_SUCCESS)
+	    return status;
+
+    }
+
+
+     /* If SDP negotiator is ready, start negotiation. */
+    if (st_code/100==2 || (st_code/10==18 && st_code!=180)) {
+
+	pjmedia_sdp_neg_state neg_state;
+
+	/* Start nego when appropriate. */
+	neg_state = inv->neg ? pjmedia_sdp_neg_get_state(inv->neg) :
+		    PJMEDIA_SDP_NEG_STATE_NULL;
+
+	if (neg_state == PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER) {
+
+	    status = pjmedia_sdp_neg_get_neg_local(inv->neg, &sdp);
+
+	} else if (neg_state == PJMEDIA_SDP_NEG_STATE_WAIT_NEGO &&
+		   pjmedia_sdp_neg_has_local_answer(inv->neg) )
+	{
+
+	    status = inv_negotiate_sdp(inv);
+	    if (status != PJ_SUCCESS)
+		return status;
+	    
+	    status = pjmedia_sdp_neg_get_active_local(inv->neg, &sdp);
+	}
+    }
+
+    /* Include SDP when it's available for 2xx and 18x (but not 180) response.
+     * Subsequent response will include this SDP.
+     */
+    if (sdp) {
+	tdata->msg->body = create_sdp_body(tdata->pool, sdp);
+    }
+
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create first response to INVITE
+ */
+PJ_DEF(pj_status_t) pjsip_inv_initial_answer(	pjsip_inv_session *inv,
+						pjsip_rx_data *rdata,
+						int st_code,
+						const pj_str_t *st_text,
+						const pjmedia_sdp_session *sdp,
+						pjsip_tx_data **p_tdata)
+{
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    /* Verify arguments. */
+    PJ_ASSERT_RETURN(inv && p_tdata, PJ_EINVAL);
+
+    /* Must have INVITE transaction. */
+    PJ_ASSERT_RETURN(inv->invite_tsx, PJ_EBUG);
+
+    pjsip_dlg_inc_lock(inv->dlg);
+
+    /* Create response */
+    status = pjsip_dlg_create_response(inv->dlg, rdata, st_code, st_text,
+				       &tdata);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+    /* Process SDP in answer */
+    status = process_answer(inv, st_code, tdata, sdp);
+    if (status != PJ_SUCCESS) {
+	pjsip_tx_data_dec_ref(tdata);
+	goto on_return;
+    }
+
+    *p_tdata = tdata;
+
+on_return:
+    pjsip_dlg_dec_lock(inv->dlg);
+    return status;
+}
+
+
+/*
+ * Answer initial INVITE
+ * Re-INVITE will be answered automatically, and will not use this function.
+ */ 
+PJ_DEF(pj_status_t) pjsip_inv_answer(	pjsip_inv_session *inv,
+					int st_code,
+					const pj_str_t *st_text,
+					const pjmedia_sdp_session *local_sdp,
+					pjsip_tx_data **p_tdata )
+{
+    pjsip_tx_data *last_res;
+    pj_status_t status;
+
+    /* Verify arguments. */
+    PJ_ASSERT_RETURN(inv && p_tdata, PJ_EINVAL);
+
+    /* Must have INVITE transaction. */
+    PJ_ASSERT_RETURN(inv->invite_tsx, PJ_EBUG);
+
+    /* INVITE transaction MUST have transmitted a response (e.g. 100) */
+    PJ_ASSERT_RETURN(inv->invite_tsx->last_tx, PJ_EINVALIDOP);
+
+    pjsip_dlg_inc_lock(inv->dlg);
+
+    /* Modify last response. */
+    last_res = inv->invite_tsx->last_tx;
+    status = pjsip_dlg_modify_response(inv->dlg, last_res, st_code, st_text);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+
+    /* Process SDP in answer */
+    status = process_answer(inv, st_code, last_res, local_sdp);
+    if (status != PJ_SUCCESS) {
+	pjsip_tx_data_dec_ref(last_res);
+	goto on_return;
+    }
+
+
+    *p_tdata = last_res;
+
+on_return:
+    pjsip_dlg_dec_lock(inv->dlg);
+    return status;
+}
+
+
+/*
+ * Set SDP answer.
+ */
+PJ_DEF(pj_status_t) pjsip_inv_set_sdp_answer( pjsip_inv_session *inv,
+					      const pjmedia_sdp_session *sdp )
+{
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(inv && sdp, PJ_EINVAL);
+
+    pjsip_dlg_inc_lock(inv->dlg);
+    status = pjmedia_sdp_neg_set_local_answer( inv->pool, inv->neg, sdp);
+    pjsip_dlg_dec_lock(inv->dlg);
+
+    return status;
+}
+
+
+/*
+ * End session.
+ */
+PJ_DEF(pj_status_t) pjsip_inv_end_session(  pjsip_inv_session *inv,
+					    int st_code,
+					    const pj_str_t *st_text,
+					    pjsip_tx_data **p_tdata )
+{
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    /* Verify arguments. */
+    PJ_ASSERT_RETURN(inv && p_tdata, PJ_EINVAL);
+
+    /* Set cause code. */
+    inv_set_cause(inv, st_code, st_text);
+
+    /* Create appropriate message. */
+    switch (inv->state) {
+    case PJSIP_INV_STATE_CALLING:
+    case PJSIP_INV_STATE_EARLY:
+    case PJSIP_INV_STATE_INCOMING:
+
+	if (inv->role == PJSIP_ROLE_UAC) {
+
+	    /* For UAC when session has not been confirmed, create CANCEL. */
+
+	    /* MUST have the original UAC INVITE transaction. */
+	    PJ_ASSERT_RETURN(inv->invite_tsx != NULL, PJ_EBUG);
+
+	    /* But CANCEL should only be called when we have received a
+	     * provisional response. If we haven't received any responses,
+	     * just destroy the transaction.
+	     */
+	    if (inv->invite_tsx->status_code < 100) {
+
+		pjsip_tsx_terminate(inv->invite_tsx, 487);
+		*p_tdata = NULL;
+		return PJ_SUCCESS;
+	    }
+
+	    /* The CSeq here assumes that the dialog is started with an
+	     * INVITE session. This may not be correct; dialog can be 
+	     * started as SUBSCRIBE session.
+	     * So fix this!
+	     */
+	    status = pjsip_endpt_create_cancel(inv->dlg->endpt, 
+					       inv->invite_tsx->last_tx,
+					       &tdata);
+
+	} else {
+
+	    /* For UAS, send a final response. */
+	    tdata = inv->invite_tsx->last_tx;
+	    PJ_ASSERT_RETURN(tdata != NULL, PJ_EINVALIDOP);
+
+	    //status = pjsip_dlg_modify_response(inv->dlg, tdata, st_code,
+	    //				       st_text);
+	    status = pjsip_inv_answer(inv, st_code, st_text, NULL, &tdata);
+	}
+	break;
+
+    case PJSIP_INV_STATE_CONNECTING:
+    case PJSIP_INV_STATE_CONFIRMED:
+	/* For established dialog, send BYE */
+	status = pjsip_dlg_create_request(inv->dlg, &pjsip_bye_method, -1, 
+					  &tdata);
+	break;
+
+    case PJSIP_INV_STATE_DISCONNECTED:
+	/* No need to do anything. */
+	return PJSIP_ESESSIONTERMINATED;
+
+    default:
+	pj_assert("!Invalid operation!");
+	return PJ_EINVALIDOP;
+    }
+
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    /* Done */
+
+    *p_tdata = tdata;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create re-INVITE.
+ */
+PJ_DEF(pj_status_t) pjsip_inv_reinvite( pjsip_inv_session *inv,
+					const pj_str_t *new_contact,
+					const pjmedia_sdp_session *new_offer,
+					pjsip_tx_data **p_tdata )
+{
+    pj_status_t status;
+    pjsip_contact_hdr *contact_hdr = NULL;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(inv && p_tdata, PJ_EINVAL);
+
+    /* Must NOT have a pending INVITE transaction */
+    PJ_ASSERT_RETURN(inv->invite_tsx==NULL, PJ_EINVALIDOP);
+
+
+    pjsip_dlg_inc_lock(inv->dlg);
+
+    if (new_contact) {
+	pj_str_t tmp;
+	const pj_str_t STR_CONTACT = { "Contact", 7 };
+
+	pj_strdup_with_null(inv->dlg->pool, &tmp, new_contact);
+	contact_hdr = pjsip_parse_hdr(inv->dlg->pool, &STR_CONTACT, 
+				      tmp.ptr, tmp.slen, NULL);
+	if (!contact_hdr) {
+	    status = PJSIP_EINVALIDURI;
+	    goto on_return;
+	}
+    }
+
+
+    if (new_offer) {
+	if (!inv->neg) {
+	    status = pjmedia_sdp_neg_create_w_local_offer(inv->pool, new_offer,
+							  &inv->neg);
+	    if (status != PJ_SUCCESS)
+		goto on_return;
+
+	} else switch (pjmedia_sdp_neg_get_state(inv->neg)) {
+
+	    case PJMEDIA_SDP_NEG_STATE_NULL:
+		pj_assert(!"Unexpected SDP neg state NULL");
+		status = PJ_EBUG;
+		goto on_return;
+
+	    case PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER:
+		PJ_LOG(4,(inv->obj_name, 
+			  "pjsip_inv_reinvite: already have an offer, new "
+			  "offer is ignored"));
+		break;
+
+	    case PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER:
+		status = pjmedia_sdp_neg_set_local_answer(inv->pool, inv->neg,
+							  new_offer);
+		if (status != PJ_SUCCESS)
+		    goto on_return;
+		break;
+
+	    case PJMEDIA_SDP_NEG_STATE_WAIT_NEGO:
+		PJ_LOG(4,(inv->obj_name, 
+			  "pjsip_inv_reinvite: SDP in WAIT_NEGO state, new "
+			  "offer is ignored"));
+		break;
+
+	    case PJMEDIA_SDP_NEG_STATE_DONE:
+		status = pjmedia_sdp_neg_modify_local_offer(inv->pool,inv->neg,
+							    new_offer);
+		if (status != PJ_SUCCESS)
+		    goto on_return;
+		break;
+	}
+    }
+
+    if (contact_hdr)
+	inv->dlg->local.contact = contact_hdr;
+
+    status = pjsip_inv_invite(inv, p_tdata);
+
+on_return:
+    pjsip_dlg_dec_lock(inv->dlg);
+    return status;
+}
+
+/*
+ * Create UPDATE.
+ */
+PJ_DEF(pj_status_t) pjsip_inv_update (	pjsip_inv_session *inv,
+					const pj_str_t *new_contact,
+					const pjmedia_sdp_session *new_offer,
+					pjsip_tx_data **p_tdata )
+{
+    PJ_UNUSED_ARG(inv);
+    PJ_UNUSED_ARG(new_contact);
+    PJ_UNUSED_ARG(new_offer);
+    PJ_UNUSED_ARG(p_tdata);
+
+    PJ_TODO(CREATE_UPDATE_REQUEST);
+    return PJ_ENOTSUP;
+}
+
+/*
+ * Send a request or response message.
+ */
+PJ_DEF(pj_status_t) pjsip_inv_send_msg( pjsip_inv_session *inv,
+					pjsip_tx_data *tdata)
+{
+    pj_status_t status;
+
+    /* Verify arguments. */
+    PJ_ASSERT_RETURN(inv && tdata, PJ_EINVAL);
+
+    PJ_LOG(5,(inv->obj_name, "Sending %s", 
+	      pjsip_tx_data_get_info(tdata)));
+
+    if (tdata->msg->type == PJSIP_REQUEST_MSG) {
+	struct tsx_inv_data *tsx_inv_data;
+
+	pjsip_dlg_inc_lock(inv->dlg);
+
+	tsx_inv_data = pj_pool_zalloc(inv->pool, sizeof(struct tsx_inv_data));
+	tsx_inv_data->inv = inv;
+
+	pjsip_dlg_dec_lock(inv->dlg);
+
+	status = pjsip_dlg_send_request(inv->dlg, tdata, mod_inv.mod.id, 
+					tsx_inv_data);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+    } else {
+	pjsip_cseq_hdr *cseq;
+
+	/* Can only do this to send response to original INVITE
+	 * request.
+	 */
+	PJ_ASSERT_RETURN((cseq=pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CSEQ, NULL))!=NULL
+			  && (cseq->cseq == inv->invite_tsx->cseq),
+			 PJ_EINVALIDOP);
+
+	status = pjsip_dlg_send_response(inv->dlg, inv->invite_tsx, tdata);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    /* Done (?) */
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Respond to incoming CANCEL request.
+ */
+static void inv_respond_incoming_cancel(pjsip_inv_session *inv,
+					pjsip_transaction *cancel_tsx,
+					pjsip_rx_data *rdata)
+{
+    pjsip_tx_data *tdata;
+    pjsip_transaction *invite_tsx;
+    pj_str_t key;
+    pj_status_t status;
+
+    /* See if we have matching INVITE server transaction: */
+
+    pjsip_tsx_create_key(rdata->tp_info.pool, &key, PJSIP_ROLE_UAS,
+			 &pjsip_invite_method, rdata);
+    invite_tsx = pjsip_tsx_layer_find_tsx(&key, PJ_TRUE);
+
+    if (invite_tsx == NULL) {
+
+	/* Invite transaction not found! 
+	 * Respond CANCEL with 491 (RFC 3261 Section 9.2 page 42)
+	 */
+	status = pjsip_dlg_create_response( inv->dlg, rdata, 200, NULL, 
+					    &tdata);
+
+    } else {
+	/* Always answer CANCEL will 200 (OK) regardless of
+	 * the state of the INVITE transaction.
+	 */
+	status = pjsip_dlg_create_response( inv->dlg, rdata, 200, NULL, 
+					    &tdata);
+    }
+
+    /* See if we have created the response successfully. */
+    if (status != PJ_SUCCESS) return;
+
+    /* Send the CANCEL response */
+    status = pjsip_dlg_send_response(inv->dlg, cancel_tsx, tdata);
+    if (status != PJ_SUCCESS) return;
+
+
+    /* See if we need to terminate the UAS INVITE transaction
+     * with 487 (Request Terminated) response. 
+     */
+    if (invite_tsx && invite_tsx->status_code < 200) {
+
+	pj_assert(invite_tsx->last_tx != NULL);
+
+	tdata = invite_tsx->last_tx;
+
+	status = pjsip_dlg_modify_response(inv->dlg, tdata, 487, NULL);
+	if (status == PJ_SUCCESS)
+	    pjsip_dlg_send_response(inv->dlg, invite_tsx, tdata);
+    }
+
+    if (invite_tsx)
+	pj_mutex_unlock(invite_tsx->mutex);
+}
+
+
+/*
+ * Respond to incoming BYE request.
+ */
+static void inv_respond_incoming_bye( pjsip_inv_session *inv,
+				      pjsip_transaction *bye_tsx,
+				      pjsip_rx_data *rdata,
+				      pjsip_event *e )
+{
+    pj_status_t status;
+    pjsip_tx_data *tdata;
+
+    /* Respond BYE with 200: */
+
+    status = pjsip_dlg_create_response(inv->dlg, rdata, 200, NULL, &tdata);
+    if (status != PJ_SUCCESS) return;
+
+    status = pjsip_dlg_send_response(inv->dlg, bye_tsx, tdata);
+    if (status != PJ_SUCCESS) return;
+
+    /* Terminate session: */
+
+    if (inv->state != PJSIP_INV_STATE_DISCONNECTED) {
+	inv_set_cause(inv, PJSIP_SC_OK, NULL);
+	inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+    }
+}
+
+/*
+ * Respond to BYE request.
+ */
+static void inv_handle_bye_response( pjsip_inv_session *inv,
+				     pjsip_transaction *tsx,
+				     pjsip_rx_data *rdata,
+				     pjsip_event *e )
+{
+    pj_status_t status;
+    
+    if (e->body.tsx_state.type != PJSIP_EVENT_RX_MSG) {
+	inv_set_cause(inv, PJSIP_SC_OK, NULL);
+	inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+	return;
+    }
+
+    /* Handle 401/407 challenge. */
+    if (tsx->status_code == 401 || tsx->status_code == 407) {
+
+	pjsip_tx_data *tdata;
+	
+	status = pjsip_auth_clt_reinit_req( &inv->dlg->auth_sess, 
+					    rdata,
+					    tsx->last_tx,
+					    &tdata);
+	
+	if (status != PJ_SUCCESS) {
+	    
+	    /* Does not have proper credentials. 
+	     * End the session anyway.
+	     */
+	    inv_set_cause(inv, PJSIP_SC_OK, NULL);
+	    inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+	    
+	} else {
+	    /* Re-send BYE. */
+	    status = pjsip_inv_send_msg(inv, tdata);
+	}
+
+    } else {
+
+	/* End the session. */
+	inv_set_cause(inv, PJSIP_SC_OK, NULL);
+	inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+    }
+
+}
+
+/*
+ * State NULL is before anything is sent/received.
+ */
+static void inv_on_state_null( pjsip_inv_session *inv, pjsip_event *e)
+{
+    pjsip_transaction *tsx = e->body.tsx_state.tsx;
+    pjsip_dialog *dlg = pjsip_tsx_get_dlg(tsx);
+
+    PJ_ASSERT_ON_FAIL(tsx && dlg, return);
+
+    if (tsx->method.id == PJSIP_INVITE_METHOD) {
+
+	/* Keep the initial INVITE transaction. */
+	if (inv->invite_tsx == NULL)
+	    inv->invite_tsx = tsx;
+
+	if (dlg->role == PJSIP_ROLE_UAC) {
+
+	    switch (tsx->state) {
+	    case PJSIP_TSX_STATE_CALLING:
+		inv_set_state(inv, PJSIP_INV_STATE_CALLING, e);
+		break;
+	    default:
+		inv_on_state_calling(inv, e);
+		break;
+	    }
+
+	} else {
+	    switch (tsx->state) {
+	    case PJSIP_TSX_STATE_TRYING:
+		inv_set_state(inv, PJSIP_INV_STATE_INCOMING, e);
+		break;
+	    case PJSIP_TSX_STATE_PROCEEDING:
+		inv_set_state(inv, PJSIP_INV_STATE_INCOMING, e);
+		if (tsx->status_code > 100)
+		    inv_set_state(inv, PJSIP_INV_STATE_EARLY, e);
+		break;
+	    default:
+		inv_on_state_incoming(inv, e);
+		break;
+	    }
+	}
+
+    } else {
+	pj_assert(!"Unexpected transaction type");
+    }
+}
+
+/*
+ * State CALLING is after sending initial INVITE request but before
+ * any response (with tag) is received.
+ */
+static void inv_on_state_calling( pjsip_inv_session *inv, pjsip_event *e)
+{
+    pjsip_transaction *tsx = e->body.tsx_state.tsx;
+    pjsip_dialog *dlg = pjsip_tsx_get_dlg(tsx);
+    pj_status_t status;
+
+    PJ_ASSERT_ON_FAIL(tsx && dlg, return);
+    
+    if (tsx == inv->invite_tsx) {
+
+	switch (tsx->state) {
+
+	case PJSIP_TSX_STATE_CALLING:
+	    inv_set_state(inv, PJSIP_INV_STATE_CALLING, e);
+	    break;
+
+	case PJSIP_TSX_STATE_PROCEEDING:
+	    if (dlg->remote.info->tag.slen) {
+
+		inv_set_state(inv, PJSIP_INV_STATE_EARLY, e);
+
+		inv_check_sdp_in_incoming_msg(inv, tsx, 
+					      e->body.tsx_state.src.rdata);
+
+	    } else {
+		/* Ignore 100 (Trying) response, as it doesn't change
+		 * session state. It only ceases retransmissions.
+		 */
+	    }
+	    break;
+
+	case PJSIP_TSX_STATE_COMPLETED:
+	    if (tsx->status_code/100 == 2) {
+		
+		/* This should not happen.
+		 * When transaction receives 2xx, it should be terminated
+		 */
+		pj_assert(0);
+		inv_set_state(inv, PJSIP_INV_STATE_CONNECTING, e);
+    
+		inv_check_sdp_in_incoming_msg(inv, tsx, 
+					      e->body.tsx_state.src.rdata);
+
+	    } else if (tsx->status_code==401 || tsx->status_code==407) {
+
+		/* Handle authentication failure:
+		 * Resend the request with Authorization header.
+		 */
+		pjsip_tx_data *tdata;
+
+		status = pjsip_auth_clt_reinit_req(&inv->dlg->auth_sess, 
+						   e->body.tsx_state.src.rdata,
+						   tsx->last_tx,
+						   &tdata);
+
+		if (status != PJ_SUCCESS) {
+
+		    /* Does not have proper credentials. 
+		     * End the session.
+		     */
+		    inv_set_cause(inv, tsx->status_code, &tsx->status_text);
+		    inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+
+		} else {
+
+		    /* Restart session. */
+		    inv->state = PJSIP_INV_STATE_NULL;
+		    inv->invite_tsx = NULL;
+
+		    /* Send the request. */
+		    status = pjsip_inv_send_msg(inv, tdata);
+		}
+
+	    } else {
+
+		inv_set_cause(inv, tsx->status_code, &tsx->status_text);
+		inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+
+	    }
+	    break;
+
+	case PJSIP_TSX_STATE_TERMINATED:
+	    /* INVITE transaction can be terminated either because UAC
+	     * transaction received 2xx response or because of transport
+	     * error.
+	     */
+	    if (tsx->status_code/100 == 2) {
+		/* This must be receipt of 2xx response */
+
+		/* Set state to CONNECTING */
+		inv_set_state(inv, PJSIP_INV_STATE_CONNECTING, e);
+
+		inv_check_sdp_in_incoming_msg(inv, tsx, 
+					      e->body.tsx_state.src.rdata);
+
+		/* Send ACK */
+		pj_assert(e->body.tsx_state.type == PJSIP_EVENT_RX_MSG);
+
+		inv_send_ack(inv, e->body.tsx_state.src.rdata);
+		inv_set_state(inv, PJSIP_INV_STATE_CONFIRMED, e);
+
+
+	    } else  {
+		inv_set_cause(inv, tsx->status_code, &tsx->status_text);
+		inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+	    }
+	    break;
+
+	default:
+	    break;
+	}
+
+    } else if (inv->role == PJSIP_ROLE_UAC &&
+	       tsx->role == PJSIP_ROLE_UAC &&
+	       tsx->method.id == PJSIP_CANCEL_METHOD)
+    {
+	/*
+	 * Handle case when outgoing CANCEL is answered with 481 (Call/
+	 * Transaction Does Not Exist), 408, or when it's timed out. In these
+	 * cases, disconnect session (i.e. dialog usage only).
+	 */
+	if (tsx->status_code == PJSIP_SC_CALL_TSX_DOES_NOT_EXIST ||
+	    tsx->status_code == PJSIP_SC_REQUEST_TIMEOUT ||
+	    tsx->status_code == PJSIP_SC_TSX_TIMEOUT ||
+	    tsx->status_code == PJSIP_SC_TSX_TRANSPORT_ERROR)
+	{
+	    inv_set_cause(inv, tsx->status_code, &tsx->status_text);
+	    inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+	}
+    }
+}
+
+/*
+ * State INCOMING is after we received the request, but before
+ * responses with tag are sent.
+ */
+static void inv_on_state_incoming( pjsip_inv_session *inv, pjsip_event *e)
+{
+    pjsip_transaction *tsx = e->body.tsx_state.tsx;
+    pjsip_dialog *dlg = pjsip_tsx_get_dlg(tsx);
+
+    PJ_ASSERT_ON_FAIL(tsx && dlg, return);
+
+    if (tsx == inv->invite_tsx) {
+
+	/*
+	 * Handle the INVITE state transition.
+	 */
+
+	switch (tsx->state) {
+
+	case PJSIP_TSX_STATE_TRYING:
+	    inv_set_state(inv, PJSIP_INV_STATE_INCOMING, e);
+	    break;
+
+	case PJSIP_TSX_STATE_PROCEEDING:
+	    /*
+	     * Transaction sent provisional response.
+	     */
+	    if (tsx->status_code > 100)
+		inv_set_state(inv, PJSIP_INV_STATE_EARLY, e);
+	    break;
+
+	case PJSIP_TSX_STATE_COMPLETED:
+	    /*
+	     * Transaction sent final response.
+	     */
+	    if (tsx->status_code/100 == 2) {
+		inv_set_state(inv, PJSIP_INV_STATE_CONNECTING, e);
+	    } else {
+		inv_set_cause(inv, tsx->status_code, &tsx->status_text);
+		inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+	    }
+	    break;
+
+	case PJSIP_TSX_STATE_TERMINATED:
+	    /* 
+	     * This happens on transport error (e.g. failed to send
+	     * response)
+	     */
+	    inv_set_cause(inv, tsx->status_code, &tsx->status_text);
+	    inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+	    break;
+
+	default:
+	    pj_assert(!"Unexpected INVITE state");
+	    break;
+	}
+
+    } else if (tsx->method.id == PJSIP_CANCEL_METHOD &&
+	       tsx->role == PJSIP_ROLE_UAS &&
+	       tsx->state < PJSIP_TSX_STATE_COMPLETED &&
+	       e->body.tsx_state.type == PJSIP_EVENT_RX_MSG )
+    {
+
+	/*
+	 * Handle incoming CANCEL request.
+	 */
+
+	inv_respond_incoming_cancel(inv, tsx, e->body.tsx_state.src.rdata);
+
+    }
+}
+
+/*
+ * State EARLY is for both UAS and UAC, after response with To tag
+ * is sent/received.
+ */
+static void inv_on_state_early( pjsip_inv_session *inv, pjsip_event *e)
+{
+    pjsip_transaction *tsx = e->body.tsx_state.tsx;
+    pjsip_dialog *dlg = pjsip_tsx_get_dlg(tsx);
+
+    PJ_ASSERT_ON_FAIL(tsx && dlg, return);
+
+    if (tsx == inv->invite_tsx) {
+
+	/*
+	 * Handle the INVITE state progress.
+	 */
+
+	switch (tsx->state) {
+
+	case PJSIP_TSX_STATE_PROCEEDING:
+	    /* Send/received another provisional response. */
+	    inv_set_state(inv, PJSIP_INV_STATE_EARLY, e);
+
+	    if (e->body.tsx_state.type == PJSIP_EVENT_RX_MSG) {
+		inv_check_sdp_in_incoming_msg(inv, tsx, 
+					      e->body.tsx_state.src.rdata);
+	    }
+	    break;
+
+	case PJSIP_TSX_STATE_COMPLETED:
+	    if (tsx->status_code/100 == 2) {
+		inv_set_state(inv, PJSIP_INV_STATE_CONNECTING, e);
+		if (e->body.tsx_state.type == PJSIP_EVENT_RX_MSG) {
+		    inv_check_sdp_in_incoming_msg(inv, tsx, 
+						  e->body.tsx_state.src.rdata);
+		}
+
+	    } else {
+		inv_set_cause(inv, tsx->status_code, &tsx->status_text);
+		inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+	    }
+	    break;
+
+	case PJSIP_TSX_STATE_CONFIRMED:
+	    /* For some reason can go here */
+
+	case PJSIP_TSX_STATE_TERMINATED:
+	    /* INVITE transaction can be terminated either because UAC
+	     * transaction received 2xx response or because of transport
+	     * error.
+	     */
+	    if (tsx->status_code/100 == 2) {
+
+		/* This must be receipt of 2xx response */
+
+		/* Set state to CONNECTING */
+		inv_set_state(inv, PJSIP_INV_STATE_CONNECTING, e);
+
+		if (e->body.tsx_state.type == PJSIP_EVENT_RX_MSG) {
+		    inv_check_sdp_in_incoming_msg(inv, tsx, 
+						  e->body.tsx_state.src.rdata);
+		}
+
+		/* if UAC, send ACK and move state to confirmed. */
+		if (tsx->role == PJSIP_ROLE_UAC) {
+		    pj_assert(e->body.tsx_state.type == PJSIP_EVENT_RX_MSG);
+
+		    inv_send_ack(inv, e->body.tsx_state.src.rdata);
+		    inv_set_state(inv, PJSIP_INV_STATE_CONFIRMED, e);
+		}
+
+	    } else  {
+		inv_set_cause(inv, tsx->status_code, &tsx->status_text);
+		inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+	    }
+	    break;
+
+	default:
+	    pj_assert(!"Unexpected INVITE tsx state");
+	}
+
+    } else if (inv->role == PJSIP_ROLE_UAS &&
+	       tsx->role == PJSIP_ROLE_UAS &&
+	       tsx->method.id == PJSIP_CANCEL_METHOD &&
+	       tsx->state < PJSIP_TSX_STATE_COMPLETED &&
+	       e->body.tsx_state.type == PJSIP_EVENT_RX_MSG )
+    {
+
+	/*
+	 * Handle incoming CANCEL request.
+	 */
+
+	inv_respond_incoming_cancel(inv, tsx, e->body.tsx_state.src.rdata);
+
+    } else if (inv->role == PJSIP_ROLE_UAC &&
+	       tsx->role == PJSIP_ROLE_UAC &&
+	       tsx->method.id == PJSIP_CANCEL_METHOD)
+    {
+	/*
+	 * Handle case when outgoing CANCEL is answered with 481 (Call/
+	 * Transaction Does Not Exist), 408, or when it's timed out. In these
+	 * cases, disconnect session (i.e. dialog usage only).
+	 */
+	if (tsx->status_code == PJSIP_SC_CALL_TSX_DOES_NOT_EXIST ||
+	    tsx->status_code == PJSIP_SC_REQUEST_TIMEOUT ||
+	    tsx->status_code == PJSIP_SC_TSX_TIMEOUT ||
+	    tsx->status_code == PJSIP_SC_TSX_TRANSPORT_ERROR)
+	{
+	    inv_set_cause(inv, tsx->status_code, &tsx->status_text);
+	    inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+	}
+    }
+}
+
+/*
+ * State CONNECTING is after 2xx response to INVITE is sent/received.
+ */
+static void inv_on_state_connecting( pjsip_inv_session *inv, pjsip_event *e)
+{
+    pjsip_transaction *tsx = e->body.tsx_state.tsx;
+    pjsip_dialog *dlg = pjsip_tsx_get_dlg(tsx);
+
+    PJ_ASSERT_ON_FAIL(tsx && dlg, return);
+
+    if (tsx == inv->invite_tsx) {
+
+	/*
+	 * Handle INVITE state progression.
+	 */
+	switch (tsx->state) {
+
+	case PJSIP_TSX_STATE_CONFIRMED:
+	    if (tsx->status_code/100 == 2)
+		inv_set_state(inv, PJSIP_INV_STATE_CONFIRMED, e);
+	    break;
+
+	case PJSIP_TSX_STATE_TERMINATED:
+	    /* INVITE transaction can be terminated either because UAC
+	     * transaction received 2xx response or because of transport
+	     * error.
+	     */
+	    if (tsx->status_code/100 != 2) {
+		inv_set_cause(inv, tsx->status_code, &tsx->status_text);
+		inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+	    }
+	    break;
+
+	case PJSIP_TSX_STATE_DESTROYED:
+	    /* Do nothing. */
+	    break;
+
+	default:
+	    pj_assert(!"Unexpected state");
+	}
+
+    } else if (tsx->role == PJSIP_ROLE_UAS &&
+	       tsx->method.id == PJSIP_BYE_METHOD &&
+	       tsx->status_code < 200 &&
+	       e->body.tsx_state.type == PJSIP_EVENT_RX_MSG) 
+    {
+
+	/*
+	 * Handle incoming BYE.
+	 */
+
+	inv_respond_incoming_bye( inv, tsx, e->body.tsx_state.src.rdata, e );
+
+    } else if (tsx->method.id == PJSIP_BYE_METHOD &&
+	       tsx->role == PJSIP_ROLE_UAC &&
+	       (tsx->state == PJSIP_TSX_STATE_COMPLETED ||
+	        tsx->state == PJSIP_TSX_STATE_TERMINATED))
+    {
+
+	/*
+	 * Outgoing BYE
+	 */
+	inv_handle_bye_response( inv, tsx, e->body.tsx_state.src.rdata, e);
+
+    }
+    else if (tsx->method.id == PJSIP_CANCEL_METHOD &&
+	     tsx->role == PJSIP_ROLE_UAS &&
+	     tsx->status_code < 200 &&
+	     e->body.tsx_state.type == PJSIP_EVENT_RX_MSG) 
+    {
+
+	/*
+	 * Handle strandled incoming CANCEL.
+	 */
+	pjsip_rx_data *rdata = e->body.tsx_state.src.rdata;
+	pjsip_tx_data *tdata;
+	pj_status_t status;
+
+	status = pjsip_dlg_create_response(dlg, rdata, 200, NULL, &tdata);
+	if (status != PJ_SUCCESS) return;
+
+	status = pjsip_dlg_send_response(dlg, tsx, tdata);
+	if (status != PJ_SUCCESS) return;
+
+    }
+}
+
+/*
+ * State CONFIRMED is after ACK is sent/received.
+ */
+static void inv_on_state_confirmed( pjsip_inv_session *inv, pjsip_event *e)
+{
+    pjsip_transaction *tsx = e->body.tsx_state.tsx;
+    pjsip_dialog *dlg = pjsip_tsx_get_dlg(tsx);
+
+    PJ_ASSERT_ON_FAIL(tsx && dlg, return);
+
+
+    if (tsx->method.id == PJSIP_BYE_METHOD &&
+	tsx->role == PJSIP_ROLE_UAC &&
+	(tsx->state == PJSIP_TSX_STATE_COMPLETED ||
+	 tsx->state == PJSIP_TSX_STATE_TERMINATED))
+    {
+
+	/*
+	 * Outgoing BYE
+	 */
+
+	inv_handle_bye_response( inv, tsx, e->body.tsx_state.src.rdata, e);
+
+    }
+    else if (tsx->method.id == PJSIP_BYE_METHOD &&
+	     tsx->role == PJSIP_ROLE_UAS &&
+	     tsx->status_code < 200 &&
+	     e->body.tsx_state.type == PJSIP_EVENT_RX_MSG) 
+    {
+
+	/*
+	 * Handle incoming BYE.
+	 */
+
+	inv_respond_incoming_bye( inv, tsx, e->body.tsx_state.src.rdata, e );
+
+    }
+    else if (tsx->method.id == PJSIP_CANCEL_METHOD &&
+	     tsx->role == PJSIP_ROLE_UAS &&
+	     tsx->status_code < 200 &&
+	     e->body.tsx_state.type == PJSIP_EVENT_RX_MSG) 
+    {
+
+	/*
+	 * Handle strandled incoming CANCEL.
+	 */
+	pjsip_rx_data *rdata = e->body.tsx_state.src.rdata;
+	pjsip_tx_data *tdata;
+	pj_status_t status;
+
+	status = pjsip_dlg_create_response(dlg, rdata, 200, NULL, &tdata);
+	if (status != PJ_SUCCESS) return;
+
+	status = pjsip_dlg_send_response(dlg, tsx, tdata);
+	if (status != PJ_SUCCESS) return;
+
+    }
+    else if (tsx->method.id == PJSIP_INVITE_METHOD &&
+	     tsx->role == PJSIP_ROLE_UAS)
+    {
+
+	/*
+	 * Handle incoming re-INVITE
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_TRYING) {
+	    
+	    pjsip_rx_data *rdata = e->body.tsx_state.src.rdata;
+	    pjsip_tx_data *tdata;
+	    pj_status_t status;
+
+	    /* Check if we have INVITE pending. */
+	    if (inv->invite_tsx && inv->invite_tsx!=tsx) {
+		pj_str_t reason;
+
+		reason = pj_str("Another INVITE transaction in progress");
+
+		/* Can not receive re-INVITE while another one is pending. */
+		status = pjsip_dlg_create_response( inv->dlg, rdata, 500, 
+						    &reason, &tdata);
+		if (status != PJ_SUCCESS)
+		    return;
+
+		status = pjsip_dlg_send_response( inv->dlg, tsx, tdata);
+		
+
+		return;
+	    }
+
+	    /* Save the invite transaction. */
+	    inv->invite_tsx = tsx;
+
+	    /* Process SDP in incoming message. */
+	    status = inv_check_sdp_in_incoming_msg(inv, tsx, rdata);
+
+	    if (status != PJ_SUCCESS) {
+
+		/* Not Acceptable */
+		const pjsip_hdr *accept;
+
+		status = pjsip_dlg_create_response(inv->dlg, rdata, 
+						   488, NULL, &tdata);
+		if (status != PJ_SUCCESS)
+		    return;
+
+
+		accept = pjsip_endpt_get_capability(dlg->endpt, PJSIP_H_ACCEPT,
+						    NULL);
+		if (accept) {
+		    pjsip_msg_add_hdr(tdata->msg,
+				      pjsip_hdr_clone(tdata->pool, accept));
+		}
+
+		status = pjsip_dlg_send_response(dlg, tsx, tdata);
+
+		return;
+	    }
+
+	    /* Create 2xx ANSWER */
+	    status = pjsip_dlg_create_response(dlg, rdata, 200, NULL, &tdata);
+	    if (status != PJ_SUCCESS)
+		return;
+
+	    /* Process SDP in the answer */
+	    status = process_answer(inv, 200, tdata, NULL);
+
+	    if (status != PJ_SUCCESS) {
+		/*
+		 * SDP negotiation has failed.
+		 */
+		pj_status_t rc;
+		pj_str_t reason;
+
+		/* Delete the 2xx answer */
+		pjsip_tx_data_dec_ref(tdata);
+		
+		/* Create 500 response */
+		reason = pj_str("SDP negotiation failed");
+		rc = pjsip_dlg_create_response(dlg, rdata, 500, &reason, 
+					       &tdata);
+		if (rc == PJ_SUCCESS) {
+		    pjsip_warning_hdr *w;
+		    const pj_str_t *endpt_name;
+
+		    endpt_name = pjsip_endpt_name(dlg->endpt);
+		    w = pjsip_warning_hdr_create_from_status(tdata->pool, 
+							     endpt_name,
+							     status);
+		    if (w)
+			pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)w);
+
+		    pjsip_inv_send_msg(inv, tdata);
+		}
+		return;
+	    }
+
+	    /* Send 2xx regardless of the status of negotiation */
+	    status = pjsip_inv_send_msg(inv, tdata);
+
+	}
+
+    }
+    else if (tsx->method.id == PJSIP_INVITE_METHOD &&
+	     tsx->role == PJSIP_ROLE_UAC)
+    {
+	/*
+	 * Handle outgoing re-INVITE
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_TERMINATED &&
+	    tsx->status_code/100 == 2) 
+	{
+
+	    /* Re-INVITE was accepted. */
+
+	    /* Process SDP */
+	    inv_check_sdp_in_incoming_msg(inv, tsx, 
+					  e->body.tsx_state.src.rdata);
+
+	    /* Send ACK */
+	    inv_send_ack(inv, e->body.tsx_state.src.rdata);
+
+	} else if (tsx->state == PJSIP_TSX_STATE_COMPLETED &&
+		   (tsx->status_code==401 || tsx->status_code==407))
+	{
+	    pjsip_tx_data *tdata;
+	    pj_status_t status;
+
+	    /* Handle authentication challenge. */
+	    status = pjsip_auth_clt_reinit_req( &dlg->auth_sess,
+						e->body.tsx_state.src.rdata,
+						tsx->last_tx,
+						&tdata);
+	    if (status != PJ_SUCCESS)
+		return;
+
+	    /* Send re-INVITE */
+	    status = pjsip_inv_send_msg( inv, tdata);
+
+	} else if (tsx->status_code==PJSIP_SC_CALL_TSX_DOES_NOT_EXIST ||
+		   tsx->status_code==PJSIP_SC_REQUEST_TIMEOUT ||
+		   tsx->status_code >= 700)
+	{
+	    /*
+	     * Handle responses that terminates dialog.
+	     */
+	    inv_set_cause(inv, tsx->status_code, &tsx->status_text);
+	    inv_set_state(inv, PJSIP_INV_STATE_DISCONNECTED, e);
+	}
+    }
+}
+
+/*
+ * After session has been terminated, but before dialog is destroyed
+ * (because dialog has other usages, or because dialog is waiting for
+ * the last transaction to terminate).
+ */
+static void inv_on_state_disconnected( pjsip_inv_session *inv, pjsip_event *e)
+{
+    pjsip_transaction *tsx = e->body.tsx_state.tsx;
+    pjsip_dialog *dlg = pjsip_tsx_get_dlg(tsx);
+
+    PJ_ASSERT_ON_FAIL(tsx && dlg, return);
+
+    if (tsx->role == PJSIP_ROLE_UAS &&
+	tsx->status_code < 200 &&
+	e->body.tsx_state.type == PJSIP_EVENT_RX_MSG) 
+    {
+	pjsip_rx_data *rdata = e->body.tsx_state.src.rdata;
+
+	/*
+	 * Respond BYE with 200/OK
+	 */
+	if (tsx->method.id == PJSIP_BYE_METHOD) {
+	    inv_respond_incoming_bye( inv, tsx, rdata, e );
+	} else if (tsx->method.id == PJSIP_CANCEL_METHOD) {
+	    /*
+	     * Respond CANCEL with 200/OK too.
+	     */
+	    pjsip_tx_data *tdata;
+	    pj_status_t status;
+
+	    status = pjsip_dlg_create_response(dlg, rdata, 200, NULL, &tdata);
+	    if (status != PJ_SUCCESS) return;
+
+	    status = pjsip_dlg_send_response(dlg, tsx, tdata);
+	    if (status != PJ_SUCCESS) return;
+
+	}
+    }
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip-ua/sip_reg.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip-ua/sip_reg.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip-ua/sip_reg.c	(revision 1163)
@@ -0,0 +1,766 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip-ua/sip_regc.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_parser.h>
+#include <pjsip/sip_module.h>
+#include <pjsip/sip_transaction.h>
+#include <pjsip/sip_event.h>
+#include <pjsip/sip_util.h>
+#include <pjsip/sip_auth_msg.h>
+#include <pjsip/sip_errno.h>
+#include <pj/assert.h>
+#include <pj/guid.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/log.h>
+#include <pj/rand.h>
+#include <pj/string.h>
+
+
+#define REFRESH_TIMER		1
+#define DELAY_BEFORE_REFRESH	5
+#define THIS_FILE		"sip_regc.c"
+
+/* Outgoing transaction timeout when server sends 100 but never replies
+ * with final response. Value is in MILISECONDS!
+ */
+#define REGC_TSX_TIMEOUT	33000
+
+
+/**
+ * SIP client registration structure.
+ */
+struct pjsip_regc
+{
+    pj_pool_t			*pool;
+    pjsip_endpoint		*endpt;
+    pj_bool_t			 _delete_flag;
+    pj_bool_t			 has_tsx;
+    pj_int32_t			 busy;
+
+    void			*token;
+    pjsip_regc_cb		*cb;
+
+    pj_str_t			 str_srv_url;
+    pjsip_uri			*srv_url;
+    pjsip_cid_hdr		*cid_hdr;
+    pjsip_cseq_hdr		*cseq_hdr;
+    pj_str_t			 from_uri;
+    pjsip_from_hdr		*from_hdr;
+    pjsip_to_hdr		*to_hdr;
+    char			*contact_buf;
+    pjsip_generic_string_hdr	*contact_hdr;
+    pjsip_expires_hdr		*expires_hdr;
+    pjsip_contact_hdr		*unreg_contact_hdr;
+    pjsip_expires_hdr		*unreg_expires_hdr;
+    pj_uint32_t			 expires;
+    pjsip_route_hdr		 route_set;
+    pjsip_hdr			 hdr_list;
+
+    /* Authorization sessions. */
+    pjsip_auth_clt_sess		 auth_sess;
+
+    /* Auto refresh registration. */
+    pj_bool_t			 auto_reg;
+    pj_time_val			 last_reg;
+    pj_time_val			 next_reg;
+    pj_timer_entry		 timer;
+
+    /* Transport selector */
+    pjsip_tpselector		 tp_sel;
+};
+
+
+
+PJ_DEF(pj_status_t) pjsip_regc_create( pjsip_endpoint *endpt, void *token,
+				       pjsip_regc_cb *cb,
+				       pjsip_regc **p_regc)
+{
+    pj_pool_t *pool;
+    pjsip_regc *regc;
+    pj_status_t status;
+
+    /* Verify arguments. */
+    PJ_ASSERT_RETURN(endpt && cb && p_regc, PJ_EINVAL);
+
+    pool = pjsip_endpt_create_pool(endpt, "regc%p", 1024, 1024);
+    PJ_ASSERT_RETURN(pool != NULL, PJ_ENOMEM);
+
+    regc = pj_pool_zalloc(pool, sizeof(struct pjsip_regc));
+
+    regc->pool = pool;
+    regc->endpt = endpt;
+    regc->token = token;
+    regc->cb = cb;
+    regc->contact_buf = pj_pool_alloc(pool, PJSIP_REGC_CONTACT_BUF_SIZE);
+    regc->expires = PJSIP_REGC_EXPIRATION_NOT_SPECIFIED;
+
+    status = pjsip_auth_clt_init(&regc->auth_sess, endpt, regc->pool, 0);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    pj_list_init(&regc->route_set);
+    pj_list_init(&regc->hdr_list);
+
+    /* Done */
+    *p_regc = regc;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_regc_destroy(pjsip_regc *regc)
+{
+    PJ_ASSERT_RETURN(regc, PJ_EINVAL);
+
+    if (regc->has_tsx || regc->busy) {
+	regc->_delete_flag = 1;
+	regc->cb = NULL;
+    } else {
+	pjsip_tpselector_dec_ref(&regc->tp_sel);
+	pjsip_endpt_release_pool(regc->endpt, regc->pool);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_regc_get_info( pjsip_regc *regc,
+					 pjsip_regc_info *info )
+{
+    PJ_ASSERT_RETURN(regc && info, PJ_EINVAL);
+
+    info->server_uri = regc->str_srv_url;
+    info->client_uri = regc->from_uri;
+    info->is_busy = (regc->busy || regc->has_tsx);
+    info->auto_reg = regc->auto_reg;
+    info->interval = regc->expires;
+    
+    if (regc->has_tsx)
+	info->next_reg = 0;
+    else if (regc->auto_reg == 0)
+	info->next_reg = 0;
+    else if (regc->expires < 0)
+	info->next_reg = regc->expires;
+    else {
+	pj_time_val now, next_reg;
+
+	next_reg = regc->next_reg;
+	pj_gettimeofday(&now);
+	PJ_TIME_VAL_SUB(next_reg, now);
+	info->next_reg = next_reg.sec;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_pool_t*) pjsip_regc_get_pool(pjsip_regc *regc)
+{
+    return regc->pool;
+}
+
+static void set_expires( pjsip_regc *regc, pj_uint32_t expires)
+{
+    if (expires != regc->expires) {
+	regc->expires_hdr = pjsip_expires_hdr_create(regc->pool, expires);
+    } else {
+	regc->expires_hdr = NULL;
+    }
+}
+
+
+static pj_status_t set_contact( pjsip_regc *regc,
+			        int contact_cnt,
+				const pj_str_t contact[] )
+{
+    int i;
+    char *s;
+    const pj_str_t contact_STR = { "Contact", 7};
+
+    /* Concatenate contacts. */
+    for (i=0, s=regc->contact_buf; i<contact_cnt; ++i) {
+	if ((s-regc->contact_buf) + contact[i].slen + 2 > PJSIP_REGC_CONTACT_BUF_SIZE) {
+	    return PJSIP_EURITOOLONG;
+	}
+	pj_memcpy(s, contact[i].ptr, contact[i].slen);
+	s += contact[i].slen;
+
+	if (i != contact_cnt - 1) {
+	    *s++ = ',';
+	    *s++ = ' ';
+	}
+    }
+
+    /* Set "Contact" header. */
+    regc->contact_hdr = pjsip_generic_string_hdr_create(regc->pool, 
+							&contact_STR,
+							NULL);
+    regc->contact_hdr->hvalue.ptr = regc->contact_buf;
+    regc->contact_hdr->hvalue.slen = (s - regc->contact_buf);
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_regc_init( pjsip_regc *regc,
+				     const pj_str_t *srv_url,
+				     const pj_str_t *from_url,
+				     const pj_str_t *to_url,
+				     int contact_cnt,
+				     const pj_str_t contact[],
+				     pj_uint32_t expires)
+{
+    pj_str_t tmp;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(regc && srv_url && from_url && to_url && 
+		     contact_cnt && contact && expires, PJ_EINVAL);
+
+    /* Copy server URL. */
+    pj_strdup_with_null(regc->pool, &regc->str_srv_url, srv_url);
+
+    /* Set server URL. */
+    tmp = regc->str_srv_url;
+    regc->srv_url = pjsip_parse_uri( regc->pool, tmp.ptr, tmp.slen, 0);
+    if (regc->srv_url == NULL) {
+	return PJSIP_EINVALIDURI;
+    }
+
+    /* Set "From" header. */
+    pj_strdup_with_null(regc->pool, &regc->from_uri, from_url);
+    tmp = regc->from_uri;
+    regc->from_hdr = pjsip_from_hdr_create(regc->pool);
+    regc->from_hdr->uri = pjsip_parse_uri(regc->pool, tmp.ptr, tmp.slen, 
+					  PJSIP_PARSE_URI_AS_NAMEADDR);
+    if (!regc->from_hdr->uri) {
+	PJ_LOG(4,(THIS_FILE, "regc: invalid source URI %.*s", 
+		  from_url->slen, from_url->ptr));
+	return PJSIP_EINVALIDURI;
+    }
+
+    /* Set "To" header. */
+    pj_strdup_with_null(regc->pool, &tmp, to_url);
+    regc->to_hdr = pjsip_to_hdr_create(regc->pool);
+    regc->to_hdr->uri = pjsip_parse_uri(regc->pool, tmp.ptr, tmp.slen, 
+					PJSIP_PARSE_URI_AS_NAMEADDR);
+    if (!regc->to_hdr->uri) {
+	PJ_LOG(4,(THIS_FILE, "regc: invalid target URI %.*s", to_url->slen, to_url->ptr));
+	return PJSIP_EINVALIDURI;
+    }
+
+
+    /* Set "Contact" header. */
+    status = set_contact( regc, contact_cnt, contact);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Set "Expires" header, if required. */
+    set_expires( regc, expires);
+
+    /* Set "Call-ID" header. */
+    regc->cid_hdr = pjsip_cid_hdr_create(regc->pool);
+    pj_create_unique_string(regc->pool, &regc->cid_hdr->id);
+
+    /* Set "CSeq" header. */
+    regc->cseq_hdr = pjsip_cseq_hdr_create(regc->pool);
+    regc->cseq_hdr->cseq = pj_rand() % 0xFFFF;
+    pjsip_method_set( &regc->cseq_hdr->method, PJSIP_REGISTER_METHOD);
+
+    /* Create "Contact" header used in unregistration. */
+    regc->unreg_contact_hdr = pjsip_contact_hdr_create(regc->pool);
+    regc->unreg_contact_hdr->star = 1;
+
+    /* Create "Expires" header used in unregistration. */
+    regc->unreg_expires_hdr = pjsip_expires_hdr_create( regc->pool, 0);
+
+    /* Done. */
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjsip_regc_set_credentials( pjsip_regc *regc,
+						int count,
+						const pjsip_cred_info cred[] )
+{
+    PJ_ASSERT_RETURN(regc && count && cred, PJ_EINVAL);
+    return pjsip_auth_clt_set_credentials(&regc->auth_sess, count, cred);
+}
+
+PJ_DEF(pj_status_t) pjsip_regc_set_route_set( pjsip_regc *regc,
+					      const pjsip_route_hdr *route_set)
+{
+    const pjsip_route_hdr *chdr;
+
+    PJ_ASSERT_RETURN(regc && route_set, PJ_EINVAL);
+
+    pj_list_init(&regc->route_set);
+
+    chdr = route_set->next;
+    while (chdr != route_set) {
+	pj_list_push_back(&regc->route_set, pjsip_hdr_clone(regc->pool, chdr));
+	chdr = chdr->next;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Bind client registration to a specific transport/listener. 
+ */
+PJ_DEF(pj_status_t) pjsip_regc_set_transport( pjsip_regc *regc,
+					      const pjsip_tpselector *sel)
+{
+    PJ_ASSERT_RETURN(regc && sel, PJ_EINVAL);
+
+    pjsip_tpselector_dec_ref(&regc->tp_sel);
+    pj_memcpy(&regc->tp_sel, sel, sizeof(*sel));
+    pjsip_tpselector_add_ref(&regc->tp_sel);
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_regc_add_headers( pjsip_regc *regc,
+					    const pjsip_hdr *hdr_list)
+{
+    const pjsip_hdr *hdr;
+
+    PJ_ASSERT_RETURN(regc && hdr_list, PJ_EINVAL);
+
+    //This is "add" operation, so don't remove headers.
+    //pj_list_init(&regc->hdr_list);
+
+    hdr = hdr_list->next;
+    while (hdr != hdr_list) {
+	pj_list_push_back(&regc->hdr_list, pjsip_hdr_clone(regc->pool, hdr));
+	hdr = hdr->next;
+    }
+
+    return PJ_SUCCESS;
+}
+
+static pj_status_t create_request(pjsip_regc *regc, 
+				  pjsip_tx_data **p_tdata)
+{
+    pj_status_t status;
+    pjsip_tx_data *tdata;
+
+    PJ_ASSERT_RETURN(regc && p_tdata, PJ_EINVAL);
+
+    /* Create the request. */
+    status = pjsip_endpt_create_request_from_hdr( regc->endpt, 
+						  &pjsip_register_method,
+						  regc->srv_url,
+						  regc->from_hdr,
+						  regc->to_hdr,
+						  NULL,
+						  regc->cid_hdr,
+						  regc->cseq_hdr->cseq,
+						  NULL,
+						  &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Add cached authorization headers. */
+    pjsip_auth_clt_init_req( &regc->auth_sess, tdata );
+
+    /* Add Route headers from route set, ideally after Via header */
+    if (!pj_list_empty(&regc->route_set)) {
+	pjsip_hdr *route_pos;
+	const pjsip_route_hdr *route;
+
+	route_pos = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL);
+	if (!route_pos)
+	    route_pos = &tdata->msg->hdr;
+
+	route = regc->route_set.next;
+	while (route != &regc->route_set) {
+	    pjsip_hdr *new_hdr = pjsip_hdr_shallow_clone(tdata->pool, route);
+	    pj_list_insert_after(route_pos, new_hdr);
+	    route_pos = new_hdr;
+	    route = route->next;
+	}
+    }
+
+    /* Add additional request headers */
+    if (!pj_list_empty(&regc->hdr_list)) {
+	const pjsip_hdr *hdr;
+
+	hdr = regc->hdr_list.next;
+	while (hdr != &regc->hdr_list) {
+	    pjsip_hdr *new_hdr = pjsip_hdr_shallow_clone(tdata->pool, hdr);
+	    pjsip_msg_add_hdr(tdata->msg, new_hdr);
+	    hdr = hdr->next;
+	}
+    }
+
+    /* Done. */
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_regc_register(pjsip_regc *regc, pj_bool_t autoreg,
+					pjsip_tx_data **p_tdata)
+{
+    pjsip_msg *msg;
+    pj_status_t status;
+    pjsip_tx_data *tdata;
+
+    PJ_ASSERT_RETURN(regc && p_tdata, PJ_EINVAL);
+
+    status = create_request(regc, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Add Contact header. */
+    msg = tdata->msg;
+    pjsip_msg_add_hdr(msg, pjsip_hdr_shallow_clone(tdata->pool, 
+						   regc->contact_hdr));
+    if (regc->expires_hdr)
+	pjsip_msg_add_hdr(msg, pjsip_hdr_shallow_clone(tdata->pool,
+						       regc->expires_hdr));
+
+    if (regc->timer.id != 0) {
+	pjsip_endpt_cancel_timer(regc->endpt, &regc->timer);
+	regc->timer.id = 0;
+    }
+
+    regc->auto_reg = autoreg;
+
+    /* Done */
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_regc_unregister(pjsip_regc *regc,
+					  pjsip_tx_data **p_tdata)
+{
+    pjsip_tx_data *tdata;
+    pjsip_msg *msg;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(regc && p_tdata, PJ_EINVAL);
+
+    if (regc->timer.id != 0) {
+	pjsip_endpt_cancel_timer(regc->endpt, &regc->timer);
+	regc->timer.id = 0;
+    }
+
+    status = create_request(regc, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    msg = tdata->msg;
+    pjsip_msg_add_hdr(msg, pjsip_hdr_shallow_clone(tdata->pool, 
+						   regc->contact_hdr));
+    pjsip_msg_add_hdr( msg, (pjsip_hdr*)regc->unreg_expires_hdr);
+
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjsip_regc_unregister_all(pjsip_regc *regc,
+					      pjsip_tx_data **p_tdata)
+{
+    pjsip_tx_data *tdata;
+    pjsip_msg *msg;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(regc && p_tdata, PJ_EINVAL);
+
+    if (regc->timer.id != 0) {
+	pjsip_endpt_cancel_timer(regc->endpt, &regc->timer);
+	regc->timer.id = 0;
+    }
+
+    status = create_request(regc, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    msg = tdata->msg;
+    pjsip_msg_add_hdr( msg, (pjsip_hdr*)regc->unreg_contact_hdr);
+    pjsip_msg_add_hdr( msg, (pjsip_hdr*)regc->unreg_expires_hdr);
+
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_regc_update_contact(  pjsip_regc *regc,
+					        int contact_cnt,
+						const pj_str_t contact[] )
+{
+    PJ_ASSERT_RETURN(regc, PJ_EINVAL);
+    return set_contact( regc, contact_cnt, contact );
+}
+
+
+PJ_DEF(pj_status_t) pjsip_regc_update_expires(  pjsip_regc *regc,
+					        pj_uint32_t expires )
+{
+    PJ_ASSERT_RETURN(regc, PJ_EINVAL);
+    set_expires( regc, expires );
+    return PJ_SUCCESS;
+}
+
+
+static void call_callback(pjsip_regc *regc, pj_status_t status, int st_code, 
+			  const pj_str_t *reason,
+			  pjsip_rx_data *rdata, pj_int32_t expiration,
+			  int contact_cnt, pjsip_contact_hdr *contact[])
+{
+    struct pjsip_regc_cbparam cbparam;
+
+
+    if (!regc->cb)
+	return;
+
+    cbparam.regc = regc;
+    cbparam.token = regc->token;
+    cbparam.status = status;
+    cbparam.code = st_code;
+    cbparam.reason = *reason;
+    cbparam.rdata = rdata;
+    cbparam.contact_cnt = contact_cnt;
+    cbparam.expiration = expiration;
+    if (contact_cnt) {
+	pj_memcpy( cbparam.contact, contact, 
+		   contact_cnt*sizeof(pjsip_contact_hdr*));
+    }
+
+    (*regc->cb)(&cbparam);
+}
+
+static void regc_refresh_timer_cb( pj_timer_heap_t *timer_heap,
+				   struct pj_timer_entry *entry)
+{
+    pjsip_regc *regc = entry->user_data;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+    
+    PJ_UNUSED_ARG(timer_heap);
+
+    /* Temporarily increase busy flag to prevent regc from being deleted
+     * in pjsip_regc_send()
+     */
+    regc->busy++;
+
+    entry->id = 0;
+    status = pjsip_regc_register(regc, 1, &tdata);
+    if (status == PJ_SUCCESS) {
+	status = pjsip_regc_send(regc, tdata);
+    } 
+    
+    if (status != PJ_SUCCESS && regc->cb) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+	pj_str_t reason = pj_strerror(status, errmsg, sizeof(errmsg));
+	call_callback(regc, status, 400, &reason, NULL, -1, 0, NULL);
+    }
+
+    regc->busy--;
+
+    /* Delete the record if user destroy regc during the callback. */
+    if (regc->_delete_flag && regc->busy==0) {
+	pjsip_regc_destroy(regc);
+    }
+}
+
+static void tsx_callback(void *token, pjsip_event *event)
+{
+    pj_status_t status;
+    pjsip_regc *regc = token;
+    pjsip_transaction *tsx = event->body.tsx_state.tsx;
+    
+    /* Decrement pending transaction counter. */
+    pj_assert(regc->has_tsx);
+    regc->has_tsx = PJ_FALSE;
+
+    /* Handle 401/407 challenge (even when _delete_flag is set) */
+    if (tsx->status_code == PJSIP_SC_PROXY_AUTHENTICATION_REQUIRED ||
+	tsx->status_code == PJSIP_SC_UNAUTHORIZED)
+    {
+	pjsip_rx_data *rdata = event->body.tsx_state.src.rdata;
+	pjsip_tx_data *tdata;
+
+	status = pjsip_auth_clt_reinit_req( &regc->auth_sess,
+					    rdata, 
+					    tsx->last_tx,  
+					    &tdata);
+
+	if (status == PJ_SUCCESS) {
+	    status = pjsip_regc_send(regc, tdata);
+	} 
+	
+	if (status != PJ_SUCCESS) {
+
+	    /* Only call callback if application is still interested
+	     * in it.
+	     */
+	    if (regc->_delete_flag == 0) {
+		/* Increment busy flag temporarily to prevent regc from
+		 * being destroyed.
+		 */
+		++regc->busy;
+
+		call_callback(regc, status, tsx->status_code, 
+			      &rdata->msg_info.msg->line.status.reason,
+			      rdata, -1, 0, NULL);
+
+		/* Decrement busy flag */
+		--regc->busy;
+	    }
+	}
+
+    } else if (regc->_delete_flag) {
+
+	/* User has called pjsip_regc_destroy(), so don't call callback. 
+	 * This regc will be destroyed later in this function.
+	 */
+
+	/* Nothing to do */
+	;
+
+    } else {
+	int contact_cnt = 0;
+	pjsip_contact_hdr *contact[PJSIP_REGC_MAX_CONTACT];
+	pjsip_rx_data *rdata;
+	pj_int32_t expiration = 0xFFFF;
+
+	if (tsx->status_code/100 == 2) {
+	    int i;
+	    pjsip_contact_hdr *hdr;
+	    pjsip_msg *msg;
+	    pjsip_expires_hdr *expires;
+
+	    rdata = event->body.tsx_state.src.rdata;
+	    msg = rdata->msg_info.msg;
+	    hdr = pjsip_msg_find_hdr( msg, PJSIP_H_CONTACT, NULL);
+	    while (hdr) {
+		contact[contact_cnt++] = hdr;
+		hdr = hdr->next;
+		if (hdr == (void*)&msg->hdr)
+		    break;
+		hdr = pjsip_msg_find_hdr(msg, PJSIP_H_CONTACT, hdr);
+	    }
+
+	    expires = pjsip_msg_find_hdr(msg, PJSIP_H_EXPIRES, NULL);
+
+	    if (expires)
+		expiration = expires->ivalue;
+	    
+	    for (i=0; i<contact_cnt; ++i) {
+		hdr = contact[i];
+		if (hdr->expires >= 0 && hdr->expires < expiration)
+		    expiration = contact[i]->expires;
+	    }
+
+	    if (regc->auto_reg && expiration != 0 && expiration != 0xFFFF) {
+		pj_time_val delay = { 0, 0};
+
+		delay.sec = expiration - DELAY_BEFORE_REFRESH;
+		if (regc->expires != PJSIP_REGC_EXPIRATION_NOT_SPECIFIED && 
+		    delay.sec > (pj_int32_t)regc->expires) 
+		{
+		    delay.sec = regc->expires;
+		}
+		if (delay.sec < DELAY_BEFORE_REFRESH) 
+		    delay.sec = DELAY_BEFORE_REFRESH;
+		regc->timer.cb = &regc_refresh_timer_cb;
+		regc->timer.id = REFRESH_TIMER;
+		regc->timer.user_data = regc;
+		pjsip_endpt_schedule_timer( regc->endpt, &regc->timer, &delay);
+		pj_gettimeofday(&regc->last_reg);
+		regc->next_reg = regc->last_reg;
+		regc->next_reg.sec += delay.sec;
+	    }
+
+	} else {
+	    rdata = (event->body.tsx_state.type==PJSIP_EVENT_RX_MSG) ? 
+			event->body.tsx_state.src.rdata : NULL;
+	}
+
+	/* Increment busy flag temporarily to prevent regc from
+	 * being destroyed.
+	 */
+	++regc->busy;
+
+	/* Call callback. */
+	if (expiration == 0xFFFF) expiration = -1;
+	call_callback(regc, PJ_SUCCESS, tsx->status_code, 
+		      (rdata ? &rdata->msg_info.msg->line.status.reason 
+			: pjsip_get_status_text(tsx->status_code)),
+		      rdata, expiration, 
+		      contact_cnt, contact);
+
+	/* Decrement busy flag */
+	--regc->busy;
+    }
+
+    /* Delete the record if user destroy regc during the callback. */
+    if (regc->_delete_flag && regc->busy==0) {
+	pjsip_regc_destroy(regc);
+    }
+}
+
+PJ_DEF(pj_status_t) pjsip_regc_send(pjsip_regc *regc, pjsip_tx_data *tdata)
+{
+    pj_status_t status;
+    pjsip_cseq_hdr *cseq_hdr;
+    pj_uint32_t cseq;
+
+    /* Make sure we don't have pending transaction. */
+    if (regc->has_tsx) {
+	PJ_LOG(4,(THIS_FILE, "Unable to send request, regc has another "
+			     "transaction pending"));
+	pjsip_tx_data_dec_ref( tdata );
+	return PJSIP_EBUSY;
+    }
+
+    /* Invalidate message buffer. */
+    pjsip_tx_data_invalidate_msg(tdata);
+
+    /* Increment CSeq */
+    cseq = ++regc->cseq_hdr->cseq;
+    cseq_hdr = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CSEQ, NULL);
+    cseq_hdr->cseq = cseq;
+
+    /* Increment pending transaction first, since transaction callback
+     * may be called even before send_request() returns!
+     */
+    regc->has_tsx = PJ_TRUE;
+    ++regc->busy;
+    status = pjsip_endpt_send_request(regc->endpt, tdata, REGC_TSX_TIMEOUT,
+				      regc, &tsx_callback);
+    if (status!=PJ_SUCCESS) {
+	PJ_LOG(4,(THIS_FILE, "Error sending request, status=%d", status));
+    }
+    --regc->busy;
+
+    /* Delete the record if user destroy regc during the callback. */
+    if (regc->_delete_flag && regc->busy==0) {
+	pjsip_regc_destroy(regc);
+    }
+
+    return status;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip-ua/sip_replaces.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip-ua/sip_replaces.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip-ua/sip_replaces.c	(revision 1163)
@@ -0,0 +1,359 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip-ua/sip_replaces.h>
+#include <pjsip-ua/sip_inv.h>
+#include <pjsip/print_util.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_errno.h>
+#include <pjsip/sip_parser.h>
+#include <pjsip/sip_transport.h>
+#include <pjsip/sip_ua_layer.h>
+#include <pjsip/sip_util.h>
+#include <pj/assert.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+
+/*
+ * Replaces header vptr.
+ */
+static int replaces_hdr_print( pjsip_replaces_hdr *hdr, 
+			       char *buf, pj_size_t size);
+static pjsip_replaces_hdr* replaces_hdr_clone( pj_pool_t *pool, 
+					       const pjsip_replaces_hdr *hdr);
+static pjsip_replaces_hdr* replaces_hdr_shallow_clone( pj_pool_t *pool,
+						       const pjsip_replaces_hdr*);
+
+static pjsip_hdr_vptr replaces_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &replaces_hdr_clone,
+    (pjsip_hdr_clone_fptr) &replaces_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &replaces_hdr_print,
+};
+
+/* Globals */
+static pjsip_endpoint *the_endpt;
+
+PJ_DEF(pjsip_replaces_hdr*) pjsip_replaces_hdr_create(pj_pool_t *pool)
+{
+    pjsip_replaces_hdr *hdr = pj_pool_zalloc(pool, sizeof(*hdr));
+    hdr->type = PJSIP_H_OTHER;
+    hdr->name.ptr = "Replaces";
+    hdr->name.slen = 8;
+    hdr->vptr = &replaces_hdr_vptr;
+    pj_list_init(hdr);
+    pj_list_init(&hdr->other_param);
+    return hdr;
+}
+
+static int replaces_hdr_print( pjsip_replaces_hdr *hdr, 
+			       char *buf, pj_size_t size)
+{
+    char *p = buf;
+    char *endbuf = buf+size;
+    int printed;
+
+    copy_advance(p, hdr->name);
+    *p++ = ':';
+    *p++ = ' ';
+
+    copy_advance(p, hdr->call_id);
+    copy_advance_pair(p, ";to-tag=", 8, hdr->to_tag);
+    copy_advance_pair(p, ";from-tag=", 10, hdr->from_tag);
+
+    if (hdr->early_only) {
+	const pj_str_t str_early_only = { ";early-only", 11 };
+	copy_advance(p, str_early_only);
+    }
+    
+    printed = pjsip_param_print_on(&hdr->other_param, p, endbuf-p,
+				   &pjsip_TOKEN_SPEC, 
+				   &pjsip_TOKEN_SPEC, ';');
+    if (printed < 0)
+	return printed;
+
+    p += printed;
+    return p - buf;
+}
+
+static pjsip_replaces_hdr* replaces_hdr_clone( pj_pool_t *pool, 
+					       const pjsip_replaces_hdr *rhs)
+{
+    pjsip_replaces_hdr *hdr = pjsip_replaces_hdr_create(pool);
+    pj_strdup(pool, &hdr->call_id, &rhs->call_id);
+    pj_strdup(pool, &hdr->to_tag, &rhs->to_tag);
+    pj_strdup(pool, &hdr->from_tag, &rhs->from_tag);
+    hdr->early_only = rhs->early_only;
+    pjsip_param_clone(pool, &hdr->other_param, &rhs->other_param);
+    return hdr;
+}
+
+static pjsip_replaces_hdr* 
+replaces_hdr_shallow_clone( pj_pool_t *pool,
+			    const pjsip_replaces_hdr *rhs )
+{
+    pjsip_replaces_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    pjsip_param_shallow_clone(pool, &hdr->other_param, &rhs->other_param);
+    return hdr;
+}
+
+
+/*
+ * Parse Replaces header.
+ */
+static pjsip_hdr *parse_hdr_replaces(pjsip_parse_ctx *ctx)
+{
+    pjsip_replaces_hdr *hdr = pjsip_replaces_hdr_create(ctx->pool);
+    const pj_str_t to_tag = { "to-tag", 6 };
+    const pj_str_t from_tag = { "from-tag", 8 };
+    const pj_str_t early_only_tag = { "early-only", 10 };
+
+    /*pj_scan_get(ctx->scanner, &pjsip_TOKEN_SPEC, &hdr->call_id);*/
+    /* Get Call-ID (until ';' is found). using pjsip_TOKEN_SPEC doesn't work
+     * because it stops parsing when '@' character is found.
+     */
+    pj_scan_get_until_ch(ctx->scanner, ';', &hdr->call_id);
+
+    while (*ctx->scanner->curptr == ';') {
+	pj_str_t pname, pvalue;
+
+	pj_scan_get_char(ctx->scanner);
+	pjsip_parse_param_imp(ctx->scanner, ctx->pool, &pname, &pvalue, 0);
+
+	if (pj_stricmp(&pname, &to_tag)==0) {
+	    hdr->to_tag = pvalue;
+	} else if (pj_stricmp(&pname, &from_tag)==0) {
+	    hdr->from_tag = pvalue;
+	} else if (pj_stricmp(&pname, &early_only_tag)==0) {
+	    hdr->early_only = PJ_TRUE;
+	} else {
+	    pjsip_param *param = pj_pool_alloc(ctx->pool, sizeof(pjsip_param));
+	    param->name = pname;
+	    param->value = pvalue;
+	    pj_list_push_back(&hdr->other_param, param);
+	}
+    }
+    pjsip_parse_end_hdr_imp( ctx->scanner );
+    return (pjsip_hdr*)hdr;
+}
+
+/*
+ * Initialize Replaces support in PJSIP. 
+ */
+PJ_DEF(pj_status_t) pjsip_replaces_init_module(pjsip_endpoint *endpt)
+{
+    pj_status_t status;
+    const pj_str_t STR_REPLACES = { "replaces", 8 };
+    static pj_bool_t is_initialized;
+
+    the_endpt = endpt;
+
+    if (is_initialized)
+	return PJ_SUCCESS;
+
+    /* Register Replaces header parser */
+    status = pjsip_register_hdr_parser( "Replaces", NULL, 
+				        &parse_hdr_replaces);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Register "replaces" capability */
+    status = pjsip_endpt_add_capability(endpt, NULL, PJSIP_H_SUPPORTED, NULL,
+					1, &STR_REPLACES);
+
+    is_initialized = PJ_TRUE;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Verify that incoming request with Replaces header can be processed.
+ */
+PJ_DEF(pj_status_t) pjsip_replaces_verify_request( pjsip_rx_data *rdata,
+						   pjsip_dialog **p_dlg,
+						   pj_bool_t lock_dlg,
+						   pjsip_tx_data **p_tdata)
+{
+    const pj_str_t STR_REPLACES = { "Replaces", 8 };
+    pjsip_replaces_hdr *rep_hdr;
+    int code = 200;
+    const char *warn_text = NULL;
+    pjsip_hdr res_hdr_list;
+    pjsip_dialog *dlg = NULL;
+    pjsip_inv_session *inv;
+    pj_status_t status = PJ_SUCCESS;
+
+    PJ_ASSERT_RETURN(rdata && p_dlg, PJ_EINVAL);
+
+    /* Check that pjsip_replaces_init_module() has been called. */
+    PJ_ASSERT_RETURN(the_endpt != NULL, PJ_EINVALIDOP);
+
+
+    /* Init output arguments */
+    *p_dlg = NULL;
+    if (p_tdata) *p_tdata = NULL;
+
+    pj_list_init(&res_hdr_list);
+
+    /* Find Replaces header */
+    rep_hdr = (pjsip_replaces_hdr*) 
+	      pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &STR_REPLACES, 
+					 NULL);
+    if (!rep_hdr) {
+	/* No Replaces header. No further processing is necessary. */
+	return PJ_SUCCESS;
+    }
+
+
+    /* Check that there's no other Replaces header and return 400 Bad Request
+     * if not. 
+     */
+    if (pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &STR_REPLACES, 
+				   rep_hdr->next)) {
+	code = PJSIP_SC_BAD_REQUEST;
+	warn_text = "Found multiple Replaces headers";
+	goto on_return;
+    }
+
+    /* Find the dialog identified by Replaces header (and always lock the
+     * dialog no matter what application wants).
+     */
+    dlg = pjsip_ua_find_dialog(&rep_hdr->call_id, &rep_hdr->to_tag,
+			       &rep_hdr->from_tag, PJ_TRUE);
+
+    /* Respond with 481 "Call/Transaction Does Not Exist" response if
+     * no dialog is found.
+     */
+    if (dlg == NULL) {
+	code = PJSIP_SC_CALL_TSX_DOES_NOT_EXIST;
+	warn_text = "No dialog found for Replaces request";
+	goto on_return;
+    }
+
+    /* Get the invite session within the dialog */
+    inv = pjsip_dlg_get_inv_session(dlg);
+
+    /* Return 481 if no invite session is present. */
+    if (inv == NULL) {
+	code = PJSIP_SC_CALL_TSX_DOES_NOT_EXIST;
+	warn_text = "No INVITE session found for Replaces request";
+	goto on_return;
+    }
+
+    /* Return 603 Declined response if invite session has already 
+     * terminated 
+     */
+    if (inv->state >= PJSIP_INV_STATE_DISCONNECTED) {
+	code = PJSIP_SC_DECLINE;
+	warn_text = "INVITE session already terminated";
+	goto on_return;
+    }
+
+    /* If "early-only" flag is present, check that the invite session
+     * has not been confirmed yet. If the session has been confirmed, 
+     * return 486 "Busy Here" response.
+     */
+    if (rep_hdr->early_only && inv->state >= PJSIP_INV_STATE_CONNECTING) {
+	code = PJSIP_SC_BUSY_HERE;
+	warn_text = "INVITE session already established";
+	goto on_return;
+    }
+
+    /* If the Replaces header field matches an early dialog that was not
+     * initiated by this UA, it returns a 481 (Call/Transaction Does Not
+     * Exist) response to the new INVITE.
+     */
+    if (inv->state <= PJSIP_INV_STATE_EARLY && inv->role != PJSIP_ROLE_UAC) {
+	code = PJSIP_SC_CALL_TSX_DOES_NOT_EXIST;
+	warn_text = "Found early INVITE session but not initiated by this UA";
+	goto on_return;
+    }
+
+
+    /*
+     * Looks like everything is okay!!
+     */
+    *p_dlg = dlg;
+    status = PJ_SUCCESS;
+    code = 200;
+
+on_return:
+
+    /* Create response if necessary */
+    if (code != 200) {
+	/* If we have dialog we must unlock it */
+	if (dlg)
+	    pjsip_dlg_dec_lock(dlg);
+
+	/* Create response */
+	if (p_tdata) {
+	    pjsip_tx_data *tdata;
+	    const pjsip_hdr *h;
+
+	    status = pjsip_endpt_create_response(the_endpt, rdata, code, 
+						 NULL, &tdata);
+
+	    if (status != PJ_SUCCESS)
+		return status;
+
+	    /* Add response headers. */
+	    h = res_hdr_list.next;
+	    while (h != &res_hdr_list) {
+		pjsip_hdr *cloned;
+
+		cloned = pjsip_hdr_clone(tdata->pool, h);
+		PJ_ASSERT_RETURN(cloned, PJ_ENOMEM);
+
+		pjsip_msg_add_hdr(tdata->msg, cloned);
+
+		h = h->next;
+	    }
+
+	    /* Add warn text, if any */
+	    if (warn_text) {
+		pjsip_warning_hdr *warn_hdr;
+		pj_str_t warn_value = pj_str((char*)warn_text);
+
+		warn_hdr=pjsip_warning_hdr_create(tdata->pool, 399, 
+						  pjsip_endpt_name(the_endpt),
+						  &warn_value);
+		pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)warn_hdr);
+	    }
+
+	    *p_tdata = tdata;
+	}
+
+	/* Can not return PJ_SUCCESS when response message is produced.
+	 * Ref: PROTOS test ~#2490
+	 */
+	if (status == PJ_SUCCESS)
+	    status = PJSIP_ERRNO_FROM_SIP_STATUS(code);
+
+    } else {
+	/* If application doesn't want to lock the dialog, unlock it */
+	if (!lock_dlg)
+	    pjsip_dlg_dec_lock(dlg);
+    }
+
+    return status;
+}
+
+
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip-ua/sip_xfer.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip-ua/sip_xfer.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip-ua/sip_xfer.c	(revision 1163)
@@ -0,0 +1,613 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip-ua/sip_xfer.h>
+#include <pjsip-simple/evsub_msg.h>
+#include <pjsip/sip_dialog.h>
+#include <pjsip/sip_errno.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_module.h>
+#include <pjsip/sip_transport.h>
+#include <pj/assert.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+
+/*
+ * Refer module (mod-refer)
+ */
+static struct pjsip_module mod_xfer = 
+{
+    NULL, NULL,				/* prev, next.			*/
+    { "mod-refer", 9 },			/* Name.			*/
+    -1,					/* Id				*/
+    PJSIP_MOD_PRIORITY_DIALOG_USAGE,	/* Priority			*/
+    NULL,				/* load()			*/
+    NULL,				/* start()			*/
+    NULL,				/* stop()			*/
+    NULL,				/* unload()			*/
+    NULL,				/* on_rx_request()		*/
+    NULL,				/* on_rx_response()		*/
+    NULL,				/* on_tx_request.		*/
+    NULL,				/* on_tx_response()		*/
+    NULL,				/* on_tsx_state()		*/
+};
+
+
+/* Declare PJSIP_REFER_METHOD, so that if somebody declares this in
+ * sip_msg.h we can catch the error here.
+ */
+enum
+{
+    PJSIP_REFER_METHOD = PJSIP_OTHER_METHOD
+};
+
+const pjsip_method pjsip_refer_method = {
+    PJSIP_REFER_METHOD,
+    { "REFER", 5}
+};
+
+
+/*
+ * String constants
+ */
+const pj_str_t STR_REFER = { "refer", 5 };
+const pj_str_t STR_MESSAGE = { "message", 7 };
+const pj_str_t STR_SIPFRAG = { "sipfrag", 7 };
+const pj_str_t STR_SIPFRAG_VERSION = {";version=2.0", 12 };
+
+
+/*
+ * Transfer struct.
+ */
+struct pjsip_xfer
+{
+    pjsip_evsub		*sub;		/**< Event subscribtion record.	    */
+    pjsip_dialog	*dlg;		/**< The dialog.		    */
+    pjsip_evsub_user	 user_cb;	/**< The user callback.		    */
+    pj_str_t		 refer_to_uri;	/**< The full Refer-To URI.	    */
+    int			 last_st_code;	/**< st_code sent in last NOTIFY    */
+    pj_str_t		 last_st_text;	/**< st_text sent in last NOTIFY    */
+};
+
+
+typedef struct pjsip_xfer pjsip_xfer;
+
+
+
+/*
+ * Forward decl for evsub callback.
+ */
+static void xfer_on_evsub_state( pjsip_evsub *sub, pjsip_event *event);
+static void xfer_on_evsub_tsx_state( pjsip_evsub *sub, pjsip_transaction *tsx,
+				     pjsip_event *event);
+static void xfer_on_evsub_rx_refresh( pjsip_evsub *sub, 
+				      pjsip_rx_data *rdata,
+				      int *p_st_code,
+				      pj_str_t **p_st_text,
+				      pjsip_hdr *res_hdr,
+				      pjsip_msg_body **p_body);
+static void xfer_on_evsub_rx_notify( pjsip_evsub *sub, 
+				     pjsip_rx_data *rdata,
+				     int *p_st_code,
+				     pj_str_t **p_st_text,
+				     pjsip_hdr *res_hdr,
+				     pjsip_msg_body **p_body);
+static void xfer_on_evsub_client_refresh(pjsip_evsub *sub);
+static void xfer_on_evsub_server_timeout(pjsip_evsub *sub);
+
+
+/*
+ * Event subscription callback for xference.
+ */
+static pjsip_evsub_user xfer_user = 
+{
+    &xfer_on_evsub_state,
+    &xfer_on_evsub_tsx_state,
+    &xfer_on_evsub_rx_refresh,
+    &xfer_on_evsub_rx_notify,
+    &xfer_on_evsub_client_refresh,
+    &xfer_on_evsub_server_timeout,
+};
+
+
+
+
+/*
+ * Initialize the REFER subsystem.
+ */
+PJ_DEF(pj_status_t) pjsip_xfer_init_module(pjsip_endpoint *endpt)
+{
+    const pj_str_t accept = { "message/sipfrag;version=2.0", 27 };
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(endpt != NULL, PJ_EINVAL);
+    PJ_ASSERT_RETURN(mod_xfer.id == -1, PJ_EINVALIDOP);
+
+    status = pjsip_endpt_register_module(endpt, &mod_xfer);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    status = pjsip_endpt_add_capability( endpt, &mod_xfer, PJSIP_H_ALLOW, 
+					 NULL, 1, &pjsip_refer_method.name);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    status = pjsip_evsub_register_pkg( &mod_xfer, &STR_REFER, 300, 1, &accept);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create transferer (sender of REFER request).
+ *
+ */
+PJ_DEF(pj_status_t) pjsip_xfer_create_uac( pjsip_dialog *dlg,
+					   const pjsip_evsub_user *user_cb,
+					   pjsip_evsub **p_evsub )
+{
+    pj_status_t status;
+    pjsip_xfer *xfer;
+    pjsip_evsub *sub;
+
+    PJ_ASSERT_RETURN(dlg && p_evsub, PJ_EINVAL);
+
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Create event subscription */
+    status = pjsip_evsub_create_uac( dlg,  &xfer_user, &STR_REFER, 
+				     PJSIP_EVSUB_NO_EVENT_ID, &sub);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+    /* Create xfer session */
+    xfer = pj_pool_zalloc(dlg->pool, sizeof(pjsip_xfer));
+    xfer->dlg = dlg;
+    xfer->sub = sub;
+    if (user_cb)
+	pj_memcpy(&xfer->user_cb, user_cb, sizeof(pjsip_evsub_user));
+
+    /* Attach to evsub */
+    pjsip_evsub_set_mod_data(sub, mod_xfer.id, xfer);
+
+    *p_evsub = sub;
+
+on_return:
+    pjsip_dlg_dec_lock(dlg);
+    return status;
+
+}
+
+
+
+
+/*
+ * Create transferee (receiver of REFER request).
+ *
+ */
+PJ_DEF(pj_status_t) pjsip_xfer_create_uas( pjsip_dialog *dlg,
+					   const pjsip_evsub_user *user_cb,
+					   pjsip_rx_data *rdata,
+					   pjsip_evsub **p_evsub )
+{
+    pjsip_evsub *sub;
+    pjsip_xfer *xfer;
+    const pj_str_t STR_EVENT = {"Event", 5 };
+    pjsip_event_hdr *event_hdr;
+    pj_status_t status;
+
+    /* Check arguments */
+    PJ_ASSERT_RETURN(dlg && rdata && p_evsub, PJ_EINVAL);
+
+    /* Must be request message */
+    PJ_ASSERT_RETURN(rdata->msg_info.msg->type == PJSIP_REQUEST_MSG,
+		     PJSIP_ENOTREQUESTMSG);
+
+    /* Check that request is REFER */
+    PJ_ASSERT_RETURN(pjsip_method_cmp(&rdata->msg_info.msg->line.req.method,
+				      &pjsip_refer_method)==0,
+		     PJSIP_ENOTREFER);
+
+    /* Lock dialog */
+    pjsip_dlg_inc_lock(dlg);
+
+    /* The evsub framework expects an Event header in the request,
+     * while a REFER request conveniently doesn't have one (pun intended!).
+     * So create a dummy Event header.
+     */
+    if (pjsip_msg_find_hdr_by_name(rdata->msg_info.msg,
+				   &STR_EVENT, NULL)==NULL)
+    {
+	event_hdr = pjsip_event_hdr_create(rdata->tp_info.pool);
+	event_hdr->event_type = STR_REFER;
+	pjsip_msg_add_hdr(rdata->msg_info.msg, (pjsip_hdr*)event_hdr);
+    }
+
+    /* Create server subscription */
+    status = pjsip_evsub_create_uas( dlg, &xfer_user, rdata, 
+				     PJSIP_EVSUB_NO_EVENT_ID, &sub);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+    /* Create server xfer subscription */
+    xfer = pj_pool_zalloc(dlg->pool, sizeof(pjsip_xfer));
+    xfer->dlg = dlg;
+    xfer->sub = sub;
+    if (user_cb)
+	pj_memcpy(&xfer->user_cb, user_cb, sizeof(pjsip_evsub_user));
+
+    /* Attach to evsub */
+    pjsip_evsub_set_mod_data(sub, mod_xfer.id, xfer);
+
+    /* Done: */
+    *p_evsub = sub;
+
+on_return:
+    pjsip_dlg_dec_lock(dlg);
+    return status;
+}
+
+
+
+/*
+ * Call this function to create request to initiate REFER subscription.
+ *
+ */
+PJ_DEF(pj_status_t) pjsip_xfer_initiate( pjsip_evsub *sub,
+					 const pj_str_t *refer_to_uri,
+					 pjsip_tx_data **p_tdata)
+{
+    pjsip_xfer *xfer;
+    const pj_str_t refer_to = { "Refer-To", 8};
+    pjsip_tx_data *tdata;
+    pjsip_generic_string_hdr *hdr;
+    pj_status_t status;
+
+    /* sub and p_tdata argument must be valid.  */
+    PJ_ASSERT_RETURN(sub && p_tdata, PJ_EINVAL);
+
+
+    /* Get the xfer object. */
+    xfer = pjsip_evsub_get_mod_data(sub, mod_xfer.id);
+    PJ_ASSERT_RETURN(xfer != NULL, PJSIP_ENOREFERSESSION);
+
+    /* refer_to_uri argument MAY be NULL for subsequent REFER requests,
+     * but it MUST be specified in the first REFER.
+     */
+    PJ_ASSERT_RETURN((refer_to_uri || xfer->refer_to_uri.slen), PJ_EINVAL);
+
+    /* Lock dialog. */
+    pjsip_dlg_inc_lock(xfer->dlg);
+
+    /* Create basic REFER request */
+    status = pjsip_evsub_initiate(sub, &pjsip_refer_method, -1, 
+				  &tdata);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+    /* Save Refer-To URI. */
+    if (refer_to_uri == NULL) {
+	refer_to_uri = &xfer->refer_to_uri;
+    } else {
+	pj_strdup(xfer->dlg->pool, &xfer->refer_to_uri, refer_to_uri);
+    }
+
+    /* Create and add Refer-To header. */
+    hdr = pjsip_generic_string_hdr_create(tdata->pool, &refer_to,
+					  refer_to_uri);
+    if (!hdr) {
+	pjsip_tx_data_dec_ref(tdata);
+	status = PJ_ENOMEM;
+	goto on_return;
+    }
+
+    pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)hdr);
+
+
+    /* Done. */
+    *p_tdata = tdata;
+
+    status = PJ_SUCCESS;
+
+on_return:
+    pjsip_dlg_dec_lock(xfer->dlg);
+    return status;
+}
+
+
+/*
+ * Accept the incoming REFER request by sending 2xx response.
+ *
+ */
+PJ_DEF(pj_status_t) pjsip_xfer_accept( pjsip_evsub *sub,
+				       pjsip_rx_data *rdata,
+				       int st_code,
+				       const pjsip_hdr *hdr_list )
+{
+    /*
+     * Don't need to add custom headers, so just call basic
+     * evsub response.
+     */
+    return pjsip_evsub_accept( sub, rdata, st_code, hdr_list );
+}
+
+
+/*
+ * For notifier, create NOTIFY request to subscriber, and set the state 
+ * of the subscription. 
+ */
+PJ_DEF(pj_status_t) pjsip_xfer_notify( pjsip_evsub *sub,
+				       pjsip_evsub_state state,
+				       int xfer_st_code,
+				       const pj_str_t *xfer_st_text,
+				       pjsip_tx_data **p_tdata)
+{
+    pjsip_tx_data *tdata;
+    pjsip_xfer *xfer;
+    const pj_str_t reason = { "noresource", 10 };
+    char *body;
+    int bodylen;
+    pjsip_msg_body *msg_body;
+    pj_status_t status;
+    
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(sub, PJ_EINVAL);
+
+    /* Get the xfer object. */
+    xfer = pjsip_evsub_get_mod_data(sub, mod_xfer.id);
+    PJ_ASSERT_RETURN(xfer != NULL, PJSIP_ENOREFERSESSION);
+
+
+    /* Lock object. */
+    pjsip_dlg_inc_lock(xfer->dlg);
+
+    /* Create the NOTIFY request. 
+     * Note that reason is only used when state is TERMINATED, and
+     * the defined termination reason for REFER is "noresource".
+     */
+    status = pjsip_evsub_notify( sub, state, NULL, &reason, &tdata);
+    if (status != PJ_SUCCESS)
+	goto on_return;
+
+
+    /* Check status text */
+    if (xfer_st_text==NULL || xfer_st_text->slen==0)
+	xfer_st_text = pjsip_get_status_text(xfer_st_code);
+
+    /* Save st_code and st_text, for current_notify() */
+    xfer->last_st_code = xfer_st_code;
+    pj_strdup(xfer->dlg->pool, &xfer->last_st_text, xfer_st_text);
+
+    /* Create sipfrag content. */
+    body = pj_pool_alloc(tdata->pool, 128);
+    bodylen = pj_ansi_snprintf(body, 128, "SIP/2.0 %u %.*s",
+			       xfer_st_code,
+			       (int)xfer_st_text->slen,
+			       xfer_st_text->ptr);
+    PJ_ASSERT_ON_FAIL(bodylen > 0 && bodylen < 128, 
+			{status=PJ_EBUG; pjsip_tx_data_dec_ref(tdata); 
+			 goto on_return; });
+
+
+    /* Create SIP message body. */
+    msg_body = pj_pool_zalloc(tdata->pool, sizeof(pjsip_msg_body));
+    msg_body->content_type.type = STR_MESSAGE;
+    msg_body->content_type.subtype = STR_SIPFRAG;
+    msg_body->content_type.param = STR_SIPFRAG_VERSION;
+    msg_body->data = body;
+    msg_body->len = bodylen;
+    msg_body->print_body = &pjsip_print_text_body;
+    msg_body->clone_data = &pjsip_clone_text_data;
+
+    /* Attach sipfrag body. */
+    tdata->msg->body = msg_body;
+
+
+    /* Done. */
+    *p_tdata = tdata;
+
+
+on_return:
+    pjsip_dlg_dec_lock(xfer->dlg);
+    return status;
+
+}
+
+
+/*
+ * Send current state and the last sipfrag body.
+ */
+PJ_DEF(pj_status_t) pjsip_xfer_current_notify( pjsip_evsub *sub,
+					       pjsip_tx_data **p_tdata )
+{
+    pjsip_xfer *xfer;
+    pj_status_t status;
+    
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(sub, PJ_EINVAL);
+
+    /* Get the xfer object. */
+    xfer = pjsip_evsub_get_mod_data(sub, mod_xfer.id);
+    PJ_ASSERT_RETURN(xfer != NULL, PJSIP_ENOREFERSESSION);
+
+    pjsip_dlg_inc_lock(xfer->dlg);
+
+    status = pjsip_xfer_notify(sub, pjsip_evsub_get_state(sub),
+			       xfer->last_st_code, &xfer->last_st_text,
+			       p_tdata);
+
+    pjsip_dlg_dec_lock(xfer->dlg);
+
+    return status;
+}
+
+
+/*
+ * Send request message. 
+ */
+PJ_DEF(pj_status_t) pjsip_xfer_send_request( pjsip_evsub *sub,
+					     pjsip_tx_data *tdata)
+{
+    return pjsip_evsub_send_request(sub, tdata);
+}
+
+
+/*
+ * This callback is called by event subscription when subscription
+ * state has changed.
+ */
+static void xfer_on_evsub_state( pjsip_evsub *sub, pjsip_event *event)
+{
+    pjsip_xfer *xfer;
+
+    xfer = pjsip_evsub_get_mod_data(sub, mod_xfer.id);
+    PJ_ASSERT_ON_FAIL(xfer!=NULL, {return;});
+
+    if (xfer->user_cb.on_evsub_state)
+	(*xfer->user_cb.on_evsub_state)(sub, event);
+
+}
+
+/*
+ * Called when transaction state has changed.
+ */
+static void xfer_on_evsub_tsx_state( pjsip_evsub *sub, pjsip_transaction *tsx,
+				     pjsip_event *event)
+{
+    pjsip_xfer *xfer;
+
+    xfer = pjsip_evsub_get_mod_data(sub, mod_xfer.id);
+    PJ_ASSERT_ON_FAIL(xfer!=NULL, {return;});
+
+    if (xfer->user_cb.on_tsx_state)
+	(*xfer->user_cb.on_tsx_state)(sub, tsx, event);
+}
+
+/*
+ * Called when REFER is received to refresh subscription.
+ */
+static void xfer_on_evsub_rx_refresh( pjsip_evsub *sub, 
+				      pjsip_rx_data *rdata,
+				      int *p_st_code,
+				      pj_str_t **p_st_text,
+				      pjsip_hdr *res_hdr,
+				      pjsip_msg_body **p_body)
+{
+    pjsip_xfer *xfer;
+
+    xfer = pjsip_evsub_get_mod_data(sub, mod_xfer.id);
+    PJ_ASSERT_ON_FAIL(xfer!=NULL, {return;});
+
+    if (xfer->user_cb.on_rx_refresh) {
+	(*xfer->user_cb.on_rx_refresh)(sub, rdata, p_st_code, p_st_text,
+				       res_hdr, p_body);
+
+    } else {
+	/* Implementors MUST send NOTIFY if it implements on_rx_refresh
+	 * (implementor == "us" from evsub point of view.
+	 */
+	pjsip_tx_data *tdata;
+	pj_status_t status;
+
+	if (pjsip_evsub_get_state(sub)==PJSIP_EVSUB_STATE_TERMINATED) {
+	    status = pjsip_xfer_notify( sub, PJSIP_EVSUB_STATE_TERMINATED,
+					xfer->last_st_code,
+					&xfer->last_st_text, 
+					&tdata);
+	} else {
+	    status = pjsip_xfer_current_notify(sub, &tdata);
+	}
+
+	if (status == PJ_SUCCESS)
+	    pjsip_xfer_send_request(sub, tdata);
+    }
+}
+
+
+/*
+ * Called when NOTIFY is received.
+ */
+static void xfer_on_evsub_rx_notify( pjsip_evsub *sub, 
+				     pjsip_rx_data *rdata,
+				     int *p_st_code,
+				     pj_str_t **p_st_text,
+				     pjsip_hdr *res_hdr,
+				     pjsip_msg_body **p_body)
+{
+    pjsip_xfer *xfer;
+
+    xfer = pjsip_evsub_get_mod_data(sub, mod_xfer.id);
+    PJ_ASSERT_ON_FAIL(xfer!=NULL, {return;});
+
+    if (xfer->user_cb.on_rx_notify)
+	(*xfer->user_cb.on_rx_notify)(sub, rdata, p_st_code, p_st_text,
+				      res_hdr, p_body);
+}
+
+/*
+ * Called when it's time to send SUBSCRIBE.
+ */
+static void xfer_on_evsub_client_refresh(pjsip_evsub *sub)
+{
+    pjsip_xfer *xfer;
+
+    xfer = pjsip_evsub_get_mod_data(sub, mod_xfer.id);
+    PJ_ASSERT_ON_FAIL(xfer!=NULL, {return;});
+
+    if (xfer->user_cb.on_client_refresh) {
+	(*xfer->user_cb.on_client_refresh)(sub);
+    } else {
+	pj_status_t status;
+	pjsip_tx_data *tdata;
+
+	status = pjsip_xfer_initiate(sub, NULL, &tdata);
+	if (status == PJ_SUCCESS)
+	    pjsip_xfer_send_request(sub, tdata);
+    }
+}
+
+
+/*
+ * Called when no refresh is received after the interval.
+ */
+static void xfer_on_evsub_server_timeout(pjsip_evsub *sub)
+{
+    pjsip_xfer *xfer;
+
+    xfer = pjsip_evsub_get_mod_data(sub, mod_xfer.id);
+    PJ_ASSERT_ON_FAIL(xfer!=NULL, {return;});
+
+    if (xfer->user_cb.on_server_timeout) {
+	(*xfer->user_cb.on_server_timeout)(sub);
+    } else {
+	pj_status_t status;
+	pjsip_tx_data *tdata;
+
+	status = pjsip_xfer_notify(sub, PJSIP_EVSUB_STATE_TERMINATED,
+				   xfer->last_st_code, 
+				   &xfer->last_st_text, &tdata);
+	if (status == PJ_SUCCESS)
+	    pjsip_xfer_send_request(sub, tdata);
+    }
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_auth_client.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_auth_client.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_auth_client.c	(revision 1163)
@@ -0,0 +1,861 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_auth.h>
+#include <pjsip/sip_auth_parser.h>	/* just to get pjsip_DIGEST_STR */
+#include <pjsip/sip_transport.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_errno.h>
+#include <pjlib-util/md5.h>
+#include <pj/log.h>
+#include <pj/string.h>
+#include <pj/pool.h>
+#include <pj/guid.h>
+#include <pj/assert.h>
+#include <pj/ctype.h>
+
+
+
+/* A macro just to get rid of type mismatch between char and unsigned char */
+#define MD5_APPEND(pms,buf,len)	pj_md5_update(pms, (const pj_uint8_t*)buf, len)
+
+/* Logging. */
+#define THIS_FILE   "sip_auth_client.c"
+#if 0
+#  define AUTH_TRACE_(expr)  PJ_LOG(3, expr)
+#else
+#  define AUTH_TRACE_(expr)
+#endif
+
+
+/* Transform digest to string.
+ * output must be at least PJSIP_MD5STRLEN+1 bytes.
+ *
+ * NOTE: THE OUTPUT STRING IS NOT NULL TERMINATED!
+ */
+static void digest2str(const unsigned char digest[], char *output)
+{
+    int i;
+    for (i = 0; i<16; ++i) {
+	pj_val_to_hex_digit(digest[i], output);
+	output += 2;
+    }
+}
+
+
+/*
+ * Create response digest based on the parameters and store the
+ * digest ASCII in 'result'. 
+ */
+void pjsip_auth_create_digest( pj_str_t *result,
+			       const pj_str_t *nonce,
+			       const pj_str_t *nc,
+			       const pj_str_t *cnonce,
+			       const pj_str_t *qop,
+			       const pj_str_t *uri,
+			       const pjsip_cred_info *cred_info,
+			       const pj_str_t *method)
+{
+    char ha1[PJSIP_MD5STRLEN];
+    char ha2[PJSIP_MD5STRLEN];
+    unsigned char digest[16];
+    pj_md5_context pms;
+
+    pj_assert(result->slen >= PJSIP_MD5STRLEN);
+
+    AUTH_TRACE_((THIS_FILE, "Begin creating digest"));
+
+    if (cred_info->data_type == PJSIP_CRED_DATA_PLAIN_PASSWD) {
+	/*** 
+	 *** ha1 = MD5(username ":" realm ":" password) 
+	 ***/
+	pj_md5_init(&pms);
+	MD5_APPEND( &pms, cred_info->username.ptr, cred_info->username.slen);
+	MD5_APPEND( &pms, ":", 1);
+	MD5_APPEND( &pms, cred_info->realm.ptr, cred_info->realm.slen);
+	MD5_APPEND( &pms, ":", 1);
+	MD5_APPEND( &pms, cred_info->data.ptr, cred_info->data.slen);
+	pj_md5_final(&pms, digest);
+
+	digest2str(digest, ha1);
+
+    } else if (cred_info->data_type == PJSIP_CRED_DATA_DIGEST) {
+	pj_assert(cred_info->data.slen == 32);
+	pj_memcpy( ha1, cred_info->data.ptr, cred_info->data.slen );
+    }
+
+    AUTH_TRACE_((THIS_FILE, "  ha1=%.32s", ha1));
+
+    /***
+     *** ha2 = MD5(method ":" req_uri) 
+     ***/
+    pj_md5_init(&pms);
+    MD5_APPEND( &pms, method->ptr, method->slen);
+    MD5_APPEND( &pms, ":", 1);
+    MD5_APPEND( &pms, uri->ptr, uri->slen);
+    pj_md5_final(&pms, digest);
+    digest2str(digest, ha2);
+
+    AUTH_TRACE_((THIS_FILE, "  ha2=%.32s", ha2));
+
+    /***
+     *** When qop is not used:
+     ***    response = MD5(ha1 ":" nonce ":" ha2) 
+     ***
+     *** When qop=auth is used:
+     ***    response = MD5(ha1 ":" nonce ":" nc ":" cnonce ":" qop ":" ha2)
+     ***/
+    pj_md5_init(&pms);
+    MD5_APPEND( &pms, ha1, PJSIP_MD5STRLEN);
+    MD5_APPEND( &pms, ":", 1);
+    MD5_APPEND( &pms, nonce->ptr, nonce->slen);
+    if (qop && qop->slen != 0) {
+	MD5_APPEND( &pms, ":", 1);
+	MD5_APPEND( &pms, nc->ptr, nc->slen);
+	MD5_APPEND( &pms, ":", 1);
+	MD5_APPEND( &pms, cnonce->ptr, cnonce->slen);
+	MD5_APPEND( &pms, ":", 1);
+	MD5_APPEND( &pms, qop->ptr, qop->slen);
+    }
+    MD5_APPEND( &pms, ":", 1);
+    MD5_APPEND( &pms, ha2, PJSIP_MD5STRLEN);
+
+    /* This is the final response digest. */
+    pj_md5_final(&pms, digest);
+    
+    /* Convert digest to string and store in chal->response. */
+    result->slen = PJSIP_MD5STRLEN;
+    digest2str(digest, result->ptr);
+
+    AUTH_TRACE_((THIS_FILE, "  digest=%.32s", result->ptr));
+    AUTH_TRACE_((THIS_FILE, "Digest created"));
+}
+
+/*
+ * Finds out if qop offer contains "auth" token.
+ */
+static pj_bool_t has_auth_qop( pj_pool_t *pool, const pj_str_t *qop_offer)
+{
+    pj_str_t qop;
+    char *p;
+
+    pj_strdup_with_null( pool, &qop, qop_offer);
+    p = qop.ptr;
+    while (*p) {
+	*p = (char)pj_tolower(*p);
+	++p;
+    }
+
+    p = qop.ptr;
+    while (*p) {
+	if (*p=='a' && *(p+1)=='u' && *(p+2)=='t' && *(p+3)=='h') {
+	    int e = *(p+4);
+	    if (e=='"' || e==',' || e==0)
+		return PJ_TRUE;
+	    else
+		p += 4;
+	} else {
+	    ++p;
+	}
+    }
+
+    return PJ_FALSE;
+}
+
+/*
+ * Generate response digest. 
+ * Most of the parameters to generate the digest (i.e. username, realm, uri,
+ * and nonce) are expected to be in the credential. Additional parameters (i.e.
+ * password and method param) should be supplied in the argument.
+ *
+ * The resulting digest will be stored in cred->response.
+ * The pool is used to allocate 32 bytes to store the digest in cred->response.
+ */
+static pj_status_t respond_digest( pj_pool_t *pool,
+				   pjsip_digest_credential *cred,
+				   const pjsip_digest_challenge *chal,
+				   const pj_str_t *uri,
+				   const pjsip_cred_info *cred_info,
+				   const pj_str_t *cnonce,
+				   pj_uint32_t nc,
+				   const pj_str_t *method)
+{
+    /* Check algorithm is supported. We only support MD5. */
+    if (chal->algorithm.slen && pj_stricmp(&chal->algorithm, &pjsip_MD5_STR))
+    {
+	PJ_LOG(4,(THIS_FILE, "Unsupported digest algorithm \"%.*s\"",
+		  chal->algorithm.slen, chal->algorithm.ptr));
+	return PJSIP_EINVALIDALGORITHM;
+    }
+
+    /* Build digest credential from arguments. */
+    pj_strdup(pool, &cred->username, &cred_info->username);
+    pj_strdup(pool, &cred->realm, &chal->realm);
+    pj_strdup(pool, &cred->nonce, &chal->nonce);
+    pj_strdup(pool, &cred->uri, uri);
+    cred->algorithm = pjsip_MD5_STR;
+    pj_strdup(pool, &cred->opaque, &chal->opaque);
+    
+    /* Allocate memory. */
+    cred->response.ptr = pj_pool_alloc(pool, PJSIP_MD5STRLEN);
+    cred->response.slen = PJSIP_MD5STRLEN;
+
+    if (chal->qop.slen == 0) {
+	/* Server doesn't require quality of protection. */
+
+	/* Convert digest to string and store in chal->response. */
+	pjsip_auth_create_digest( &cred->response, &cred->nonce, NULL, NULL, 
+				  NULL, uri, cred_info, method);
+
+    } else if (has_auth_qop(pool, &chal->qop)) {
+	/* Server requires quality of protection. 
+	 * We respond with selecting "qop=auth" protection.
+	 */
+	cred->qop = pjsip_AUTH_STR;
+	cred->nc.ptr = pj_pool_alloc(pool, 16);
+	cred->nc.slen = pj_ansi_snprintf(cred->nc.ptr, 16, "%08u", nc);
+
+	if (cnonce && cnonce->slen) {
+	    pj_strdup(pool, &cred->cnonce, cnonce);
+	} else {
+	    pj_str_t dummy_cnonce = { "b39971", 6};
+	    pj_strdup(pool, &cred->cnonce, &dummy_cnonce);
+	}
+
+	pjsip_auth_create_digest( &cred->response, &cred->nonce, &cred->nc, 
+				  cnonce, &pjsip_AUTH_STR, uri, cred_info, 
+				  method );
+
+    } else {
+	/* Server requires quality protection that we don't support. */
+	PJ_LOG(4,(THIS_FILE, "Unsupported qop offer %.*s", 
+		  chal->qop.slen, chal->qop.ptr));
+	return PJSIP_EINVALIDQOP;
+    }
+
+    return PJ_SUCCESS;
+}
+
+#if defined(PJSIP_AUTH_QOP_SUPPORT) && PJSIP_AUTH_QOP_SUPPORT!=0
+/*
+ * Update authentication session with a challenge.
+ */
+static void update_digest_session( pj_pool_t *ses_pool, 
+				   pjsip_cached_auth *cached_auth,
+				   const pjsip_www_authenticate_hdr *hdr )
+{
+    if (hdr->challenge.digest.qop.slen == 0)
+	return;
+
+    /* Initialize cnonce and qop if not present. */
+    if (cached_auth->cnonce.slen == 0) {
+	/* Save the whole challenge */
+	cached_auth->last_chal = pjsip_hdr_clone(ses_pool, hdr);
+
+	/* Create cnonce */
+	pj_create_unique_string( ses_pool, &cached_auth->cnonce );
+
+	/* Initialize nonce-count */
+	cached_auth->nc = 1;
+
+	/* Save realm. */
+	pj_assert(cached_auth->realm.slen != 0);
+	if (cached_auth->realm.slen == 0) {
+	    pj_strdup(ses_pool, &cached_auth->realm, 
+		      &hdr->challenge.digest.realm);
+	}
+
+    } else {
+	/* Update last_nonce and nonce-count */
+	if (!pj_strcmp(&hdr->challenge.digest.nonce, 
+		       &cached_auth->last_chal->challenge.digest.nonce)) 
+	{
+	    /* Same nonce, increment nonce-count */
+	    ++cached_auth->nc;
+	} else {
+	    /* Server gives new nonce. */
+	    pj_strdup(ses_pool, &cached_auth->last_chal->challenge.digest.nonce,
+		      &hdr->challenge.digest.nonce);
+	    /* Has the opaque changed? */
+	    if (pj_strcmp(&cached_auth->last_chal->challenge.digest.opaque,
+			  &hdr->challenge.digest.opaque)) 
+	    {
+		pj_strdup(ses_pool, 
+			  &cached_auth->last_chal->challenge.digest.opaque,
+			  &hdr->challenge.digest.opaque);
+	    }
+	    cached_auth->nc = 1;
+	}
+    }
+}
+#endif	/* PJSIP_AUTH_QOP_SUPPORT */
+
+
+/* Find cached authentication in the list for the specified realm. */
+static pjsip_cached_auth *find_cached_auth( pjsip_auth_clt_sess *sess,
+					    const pj_str_t *realm )
+{
+    pjsip_cached_auth *auth = sess->cached_auth.next;
+    while (auth != &sess->cached_auth) {
+	if (pj_stricmp(&auth->realm, realm) == 0)
+	    return auth;
+	auth = auth->next;
+    }
+
+    return NULL;
+}
+
+/* Find credential to use for the specified realm and auth scheme. */
+static const pjsip_cred_info* auth_find_cred( const pjsip_auth_clt_sess *sess,
+					      const pj_str_t *realm,
+					      const pj_str_t *auth_scheme)
+{
+    unsigned i;
+    PJ_UNUSED_ARG(auth_scheme);
+    for (i=0; i<sess->cred_cnt; ++i) {
+	if (pj_stricmp(&sess->cred_info[i].realm, realm) == 0)
+	    return &sess->cred_info[i];
+    }
+    return NULL;
+}
+
+
+/* Init client session. */
+PJ_DEF(pj_status_t) pjsip_auth_clt_init(  pjsip_auth_clt_sess *sess,
+					  pjsip_endpoint *endpt,
+					  pj_pool_t *pool, 
+					  unsigned options)
+{
+    PJ_ASSERT_RETURN(sess && endpt && pool && (options==0), PJ_EINVAL);
+
+    sess->pool = pool;
+    sess->endpt = endpt;
+    sess->cred_cnt = 0;
+    sess->cred_info = NULL;
+    pj_list_init(&sess->cached_auth);
+
+    return PJ_SUCCESS;
+}
+
+
+/* Clone session. */
+PJ_DEF(pj_status_t) pjsip_auth_clt_clone( pj_pool_t *pool,
+					  pjsip_auth_clt_sess *sess,
+					  const pjsip_auth_clt_sess *rhs )
+{
+    unsigned i;
+
+    PJ_ASSERT_RETURN(pool && sess && rhs, PJ_EINVAL);
+
+    sess->pool = pool;
+    sess->endpt = (pjsip_endpoint*)rhs->endpt;
+    sess->cred_cnt = rhs->cred_cnt;
+    sess->cred_info = pj_pool_alloc(pool, 
+				    sess->cred_cnt*sizeof(pjsip_cred_info));
+    for (i=0; i<rhs->cred_cnt; ++i) {
+	pj_strdup(pool, &sess->cred_info[i].realm, &rhs->cred_info[i].realm);
+	pj_strdup(pool, &sess->cred_info[i].scheme, &rhs->cred_info[i].scheme);
+	pj_strdup(pool, &sess->cred_info[i].username, 
+		  &rhs->cred_info[i].username);
+	sess->cred_info[i].data_type = rhs->cred_info[i].data_type;
+	pj_strdup(pool, &sess->cred_info[i].data, &rhs->cred_info[i].data);
+    }
+
+    /* TODO note:
+     * Cloning the full authentication client is quite a big task.
+     * We do only the necessary bits here, i.e. cloning the credentials.
+     * The drawback of this basic approach is, a forked dialog will have to
+     * re-authenticate itself on the next request because it has lost the
+     * cached authentication headers.
+     */
+    PJ_TODO(FULL_CLONE_OF_AUTH_CLIENT_SESSION);
+
+    return PJ_SUCCESS;
+}
+
+
+/* Set client credentials. */
+PJ_DEF(pj_status_t) pjsip_auth_clt_set_credentials( pjsip_auth_clt_sess *sess,
+						    int cred_cnt,
+						    const pjsip_cred_info *c)
+{
+    PJ_ASSERT_RETURN(sess && c, PJ_EINVAL);
+
+    if (cred_cnt == 0) {
+	sess->cred_cnt = 0;
+    } else {
+	int i;
+	sess->cred_info = pj_pool_alloc(sess->pool, cred_cnt * sizeof(*c));
+	for (i=0; i<cred_cnt; ++i) {
+	    sess->cred_info[i].data_type = c[i].data_type;
+	    pj_strdup(sess->pool, &sess->cred_info[i].scheme, &c[i].scheme);
+	    pj_strdup(sess->pool, &sess->cred_info[i].realm, &c[i].realm);
+	    pj_strdup(sess->pool, &sess->cred_info[i].username, &c[i].username);
+	    pj_strdup(sess->pool, &sess->cred_info[i].data, &c[i].data);
+	}
+	sess->cred_cnt = cred_cnt;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/* 
+ * Create Authorization/Proxy-Authorization response header based on the challege
+ * in WWW-Authenticate/Proxy-Authenticate header.
+ */
+static pj_status_t auth_respond( pj_pool_t *req_pool,
+				 const pjsip_www_authenticate_hdr *hdr,
+				 const pjsip_uri *uri,
+				 const pjsip_cred_info *cred_info,
+				 const pjsip_method *method,
+				 pj_pool_t *sess_pool,
+				 pjsip_cached_auth *cached_auth,
+				 pjsip_authorization_hdr **p_h_auth)
+{
+    pjsip_authorization_hdr *hauth;
+    char tmp[PJSIP_MAX_URL_SIZE];
+    pj_str_t uri_str;
+    pj_pool_t *pool;
+    pj_status_t status;
+
+    /* Verify arguments. */
+    PJ_ASSERT_RETURN(req_pool && hdr && uri && cred_info && method &&
+		     sess_pool && cached_auth && p_h_auth, PJ_EINVAL);
+
+    /* Print URL in the original request. */
+    uri_str.ptr = tmp;
+    uri_str.slen = pjsip_uri_print(PJSIP_URI_IN_REQ_URI, uri, tmp,sizeof(tmp));
+    if (uri_str.slen < 1) {
+	pj_assert(!"URL is too long!");
+	return PJSIP_EURITOOLONG;
+    }
+
+#   if (PJSIP_AUTH_HEADER_CACHING)
+    {
+	pool = sess_pool;
+	PJ_UNUSED_ARG(req_pool);
+    }
+#   else
+    {
+	pool = req_pool;
+	PJ_UNUSED_ARG(sess_pool);
+    }
+#   endif
+
+    if (hdr->type == PJSIP_H_WWW_AUTHENTICATE)
+	hauth = pjsip_authorization_hdr_create(pool);
+    else if (hdr->type == PJSIP_H_PROXY_AUTHENTICATE)
+	hauth = pjsip_proxy_authorization_hdr_create(pool);
+    else {
+	pj_assert(!"Invalid response header!");
+	return PJSIP_EINVALIDHDR;
+    }
+
+    /* Only support digest scheme at the moment. */
+    if (!pj_stricmp(&hdr->scheme, &pjsip_DIGEST_STR)) {
+	pj_str_t *cnonce = NULL;
+	pj_uint32_t nc = 1;
+
+	/* Update the session (nonce-count etc) if required. */
+#	if PJSIP_AUTH_QOP_SUPPORT
+	{
+	    if (cached_auth) {
+		update_digest_session( sess_pool, cached_auth, hdr );
+
+		cnonce = &cached_auth->cnonce;
+		nc = cached_auth->nc;
+	    }
+	}
+#	endif	/* PJSIP_AUTH_QOP_SUPPORT */
+
+	hauth->scheme = pjsip_DIGEST_STR;
+	status = respond_digest( pool, &hauth->credential.digest,
+				 &hdr->challenge.digest, &uri_str, cred_info,
+				 cnonce, nc, &method->name);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	/* Set qop type in auth session the first time only. */
+	if (hdr->challenge.digest.qop.slen != 0 && cached_auth) {
+	    if (cached_auth->qop_value == PJSIP_AUTH_QOP_NONE) {
+		pj_str_t *qop_val = &hauth->credential.digest.qop;
+		if (!pj_strcmp(qop_val, &pjsip_AUTH_STR)) {
+		    cached_auth->qop_value = PJSIP_AUTH_QOP_AUTH;
+		} else {
+		    cached_auth->qop_value = PJSIP_AUTH_QOP_UNKNOWN;
+		}
+	    }
+	}
+    } else {
+	return PJSIP_EINVALIDAUTHSCHEME;
+    }
+
+    /* Keep the new authorization header in the cache, only
+     * if no qop is not present.
+     */
+#   if PJSIP_AUTH_HEADER_CACHING
+    {
+	if (hauth && cached_auth && cached_auth->qop_value == PJSIP_AUTH_QOP_NONE) {
+	    pjsip_cached_auth_hdr *cached_hdr;
+
+	    /* Delete old header with the same method. */
+	    cached_hdr = cached_auth->cached_hdr.next;
+	    while (cached_hdr != &cached_auth->cached_hdr) {
+		if (pjsip_method_cmp(method, &cached_hdr->method)==0)
+		    break;
+		cached_hdr = cached_hdr->next;
+	    }
+
+	    /* Save the header to the list. */
+	    if (cached_hdr != &cached_auth->cached_hdr) {
+		cached_hdr->hdr = hauth;
+	    } else {
+		cached_hdr = pj_pool_alloc(pool, sizeof(*cached_hdr));
+		pjsip_method_copy( pool, &cached_hdr->method, method);
+		cached_hdr->hdr = hauth;
+		pj_list_insert_before( &cached_auth->cached_hdr, cached_hdr );
+	    }
+	}
+
+#	if defined(PJSIP_AUTH_AUTO_SEND_NEXT) && PJSIP_AUTH_AUTO_SEND_NEXT!=0
+	    if (hdr != cached_auth->last_chal) {
+		cached_auth->last_chal = pjsip_hdr_clone(sess_pool, hdr);
+	    }
+#	endif
+    }
+#   endif
+
+    *p_h_auth = hauth;
+    return PJ_SUCCESS;
+
+}
+
+
+#if defined(PJSIP_AUTH_AUTO_SEND_NEXT) && PJSIP_AUTH_AUTO_SEND_NEXT!=0
+static pj_status_t new_auth_for_req( pjsip_tx_data *tdata,
+				     pjsip_auth_clt_sess *sess,
+				     pjsip_cached_auth *auth,
+				     pjsip_authorization_hdr **p_h_auth)
+{
+    const pjsip_cred_info *cred;
+    pjsip_authorization_hdr *hauth;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(tdata && sess && auth, PJ_EINVAL);
+    PJ_ASSERT_RETURN(auth->last_chal != NULL, PJSIP_EAUTHNOPREVCHAL);
+
+    cred = auth_find_cred( sess, &auth->realm, &auth->last_chal->scheme );
+    if (!cred)
+	return PJSIP_ENOCREDENTIAL;
+
+    status = auth_respond( tdata->pool, auth->last_chal,
+			   tdata->msg->line.req.uri,
+			   cred, &tdata->msg->line.req.method,
+			   sess->pool, auth, &hauth);
+    if (status != PJ_SUCCESS)
+	return status;
+    
+    pjsip_msg_add_hdr( tdata->msg, (pjsip_hdr*)hauth);
+
+    if (p_h_auth)
+	*p_h_auth = hauth;
+
+    return PJ_SUCCESS;
+}
+#endif
+
+
+
+/* Initialize outgoing request. */
+PJ_DEF(pj_status_t) pjsip_auth_clt_init_req( pjsip_auth_clt_sess *sess,
+					     pjsip_tx_data *tdata )
+{
+    const pjsip_method *method;
+    pjsip_cached_auth *auth;
+
+    PJ_ASSERT_RETURN(sess && tdata, PJ_EINVAL);
+    PJ_ASSERT_RETURN(sess->pool, PJSIP_ENOTINITIALIZED);
+    PJ_ASSERT_RETURN(tdata->msg->type==PJSIP_REQUEST_MSG,
+		     PJSIP_ENOTREQUESTMSG);
+
+    /* Get the method. */
+    method = &tdata->msg->line.req.method;
+
+    auth = sess->cached_auth.next;
+    while (auth != &sess->cached_auth) {
+	/* Reset stale counter */
+	auth->stale_cnt = 0;
+
+	if (auth->qop_value == PJSIP_AUTH_QOP_NONE) {
+#	    if defined(PJSIP_AUTH_HEADER_CACHING) && \
+	       PJSIP_AUTH_HEADER_CACHING!=0
+	    {
+		pjsip_cached_auth_hdr *entry = auth->cached_hdr.next;
+		while (entry != &auth->cached_hdr) {
+		    if (pjsip_method_cmp(&entry->method, method)==0) {
+			pjsip_authorization_hdr *hauth;
+			hauth = pjsip_hdr_shallow_clone(tdata->pool, entry->hdr);
+			pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)hauth);
+			break;
+		    }
+		    entry = entry->next;
+		}
+
+#		if defined(PJSIP_AUTH_AUTO_SEND_NEXT) && \
+			   PJSIP_AUTH_AUTO_SEND_NEXT!=0
+		{
+		    if (entry == &auth->cached_hdr)
+			new_auth_for_req( tdata, sess, auth, NULL);
+		}
+#		endif
+
+	    }
+#	    elif defined(PJSIP_AUTH_AUTO_SEND_NEXT) && \
+		 PJSIP_AUTH_AUTO_SEND_NEXT!=0
+	    {
+		new_auth_for_req( tdata, sess, auth, NULL);
+	    }
+#	    endif
+
+	} 
+#	if defined(PJSIP_AUTH_QOP_SUPPORT) && \
+	   defined(PJSIP_AUTH_AUTO_SEND_NEXT) && \
+	   (PJSIP_AUTH_QOP_SUPPORT && PJSIP_AUTH_AUTO_SEND_NEXT)
+	else if (auth->qop_value == PJSIP_AUTH_QOP_AUTH) {
+	    /* For qop="auth", we have to re-create the authorization header. 
+	     */
+	    const pjsip_cred_info *cred;
+	    pjsip_authorization_hdr *hauth;
+	    pj_status_t status;
+
+	    cred = auth_find_cred(sess, &auth->realm, 
+				  &auth->last_chal->scheme);
+	    if (!cred) {
+		auth = auth->next;
+		continue;
+	    }
+
+	    status = auth_respond( tdata->pool, auth->last_chal, 
+				   tdata->msg->line.req.uri, 
+				   cred,
+				   &tdata->msg->line.req.method,
+				   sess->pool, auth, &hauth);
+	    if (status != PJ_SUCCESS)
+		return status;
+	    
+	    pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)hauth);
+	}
+#	endif	/* PJSIP_AUTH_QOP_SUPPORT && PJSIP_AUTH_AUTO_SEND_NEXT */
+
+	auth = auth->next;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/* Process authorization challenge */
+static pj_status_t process_auth( pj_pool_t *req_pool,
+				 const pjsip_www_authenticate_hdr *hchal,
+				 const pjsip_uri *uri,
+				 pjsip_tx_data *tdata,
+				 pjsip_auth_clt_sess *sess,
+				 pjsip_cached_auth *cached_auth,
+				 pjsip_authorization_hdr **h_auth)
+{
+    const pjsip_cred_info *cred;
+    pjsip_authorization_hdr *sent_auth = NULL;
+    pjsip_hdr *hdr;
+    pj_status_t status;
+
+    /* See if we have sent authorization header for this realm */
+    hdr = tdata->msg->hdr.next;
+    while (hdr != &tdata->msg->hdr) {
+	if ((hchal->type == PJSIP_H_WWW_AUTHENTICATE &&
+	     hdr->type == PJSIP_H_AUTHORIZATION) ||
+	    (hchal->type == PJSIP_H_PROXY_AUTHENTICATE &&
+	     hdr->type == PJSIP_H_PROXY_AUTHORIZATION))
+	{
+	    sent_auth = (pjsip_authorization_hdr*) hdr;
+	    if (pj_stricmp(&hchal->challenge.common.realm, 
+			   &sent_auth->credential.common.realm )==0)
+	    {
+		break;
+	    }
+	}
+	hdr = hdr->next;
+    }
+
+    /* If we have sent, see if server rejected because of stale nonce or
+     * other causes.
+     */
+    if (hdr != &tdata->msg->hdr) {
+	if (hchal->challenge.digest.stale == 0) {
+	    /* Our credential is rejected. No point in trying to re-supply
+	     * the same credential.
+	     */
+	    PJ_LOG(4, (THIS_FILE, "Authorization failed for %.*s@%.*s: "
+		       "server rejected with stale=false",
+		       sent_auth->credential.digest.username.slen,
+		       sent_auth->credential.digest.username.ptr,
+		       sent_auth->credential.digest.realm.slen,
+		       sent_auth->credential.digest.realm.ptr));
+	    return PJSIP_EFAILEDCREDENTIAL;
+	}
+
+	cached_auth->stale_cnt++;
+	if (cached_auth->stale_cnt >= PJSIP_MAX_STALE_COUNT) {
+	    /* Our credential is rejected. No point in trying to re-supply
+	     * the same credential.
+	     */
+	    PJ_LOG(4, (THIS_FILE, "Authorization failed for %.*s@%.*s: "
+		       "maximum number of stale retries exceeded",
+		       sent_auth->credential.digest.username.slen,
+		       sent_auth->credential.digest.username.ptr,
+		       sent_auth->credential.digest.realm.slen,
+		       sent_auth->credential.digest.realm.ptr));
+	    return PJSIP_EAUTHSTALECOUNT;
+	}
+
+	/* Otherwise remove old, stale authorization header from the mesasge.
+	 * We will supply a new one.
+	 */
+	pj_list_erase(sent_auth);
+    }
+
+    /* Find credential to be used for the challenge. */
+    cred = auth_find_cred( sess, &hchal->challenge.common.realm, 
+			   &hchal->scheme);
+    if (!cred) {
+	const pj_str_t *realm = &hchal->challenge.common.realm;
+	PJ_LOG(4,(THIS_FILE, 
+		  "Unable to set auth for %s: can not find credential for %.*s/%.*s",
+		  tdata->obj_name, 
+		  realm->slen, realm->ptr,
+		  hchal->scheme.slen, hchal->scheme.ptr));
+	return PJSIP_ENOCREDENTIAL;
+    }
+
+    /* Respond to authorization challenge. */
+    status = auth_respond( req_pool, hchal, uri, cred, 
+			   &tdata->msg->line.req.method, 
+			   sess->pool, cached_auth, h_auth);
+    return status;
+}
+
+
+/* Reinitialize outgoing request after 401/407 response is received.
+ * The purpose of this function is:
+ *  - to add a Authorization/Proxy-Authorization header.
+ *  - to put the newly created Authorization/Proxy-Authorization header
+ *    in cached_list.
+ */
+PJ_DEF(pj_status_t) pjsip_auth_clt_reinit_req(	pjsip_auth_clt_sess *sess,
+						const pjsip_rx_data *rdata,
+						pjsip_tx_data *old_request,
+						pjsip_tx_data **new_request )
+{
+    pjsip_tx_data *tdata;
+    const pjsip_hdr *hdr;
+    pjsip_via_hdr *via;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(sess && rdata && old_request && new_request,
+		     PJ_EINVAL);
+    PJ_ASSERT_RETURN(sess->pool, PJSIP_ENOTINITIALIZED);
+    PJ_ASSERT_RETURN(rdata->msg_info.msg->type == PJSIP_RESPONSE_MSG,
+		     PJSIP_ENOTRESPONSEMSG);
+    PJ_ASSERT_RETURN(old_request->msg->type == PJSIP_REQUEST_MSG,
+		     PJSIP_ENOTREQUESTMSG);
+    PJ_ASSERT_RETURN(rdata->msg_info.msg->line.status.code == 401 ||
+		     rdata->msg_info.msg->line.status.code == 407,
+		     PJSIP_EINVALIDSTATUS);
+
+    tdata = old_request;
+    
+    /*
+     * Respond to each authentication challenge.
+     */
+    hdr = rdata->msg_info.msg->hdr.next;
+    while (hdr != &rdata->msg_info.msg->hdr) {
+	pjsip_cached_auth *cached_auth;
+	const pjsip_www_authenticate_hdr *hchal;
+	pjsip_authorization_hdr *hauth;
+
+	/* Find WWW-Authenticate or Proxy-Authenticate header. */
+	while (hdr->type != PJSIP_H_WWW_AUTHENTICATE &&
+	       hdr->type != PJSIP_H_PROXY_AUTHENTICATE &&
+	       hdr != &rdata->msg_info.msg->hdr)
+	{
+	    hdr = hdr->next;
+	}
+	if (hdr == &rdata->msg_info.msg->hdr)
+	    break;
+
+	hchal = (const pjsip_www_authenticate_hdr*) hdr;
+
+	/* Find authentication session for this realm, create a new one
+	 * if not present.
+	 */
+	cached_auth = find_cached_auth(sess, &hchal->challenge.common.realm );
+	if (!cached_auth) {
+	    cached_auth = pj_pool_zalloc( sess->pool, sizeof(*cached_auth));
+	    pj_strdup( sess->pool, &cached_auth->realm, &hchal->challenge.common.realm);
+	    cached_auth->is_proxy = (hchal->type == PJSIP_H_PROXY_AUTHENTICATE);
+#	    if (PJSIP_AUTH_HEADER_CACHING)
+	    {
+		pj_list_init(&cached_auth->cached_hdr);
+	    }
+#	    endif
+	    pj_list_insert_before( &sess->cached_auth, cached_auth );
+	}
+
+	/* Create authorization header for this challenge, and update
+	 * authorization session.
+	 */
+	status = process_auth( tdata->pool, hchal, tdata->msg->line.req.uri, 
+			       tdata, sess, cached_auth, &hauth);
+	if (status != PJ_SUCCESS)
+	    return status;
+
+	/* Add to the message. */
+	pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)hauth);
+
+	/* Process next header. */
+	hdr = hdr->next;
+    }
+
+
+    /* Remove branch param in Via header. */
+    via = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL);
+    via->branch_param.slen = 0;
+
+    /* Must invalidate the message! */
+    pjsip_tx_data_invalidate_msg(tdata);
+
+    /* Increment reference counter. */
+    pjsip_tx_data_add_ref(tdata);
+
+    /* Done. */
+    *new_request = tdata;
+    return PJ_SUCCESS;
+
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_auth_msg.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_auth_msg.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_auth_msg.c	(revision 1163)
@@ -0,0 +1,332 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_auth_msg.h>
+#include <pjsip/sip_auth_parser.h>
+#include <pjsip/sip_parser.h>
+#include <pj/pool.h>
+#include <pj/list.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+#include <pjsip/print_util.h>
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Authorization and Proxy-Authorization header.
+ */
+static pjsip_authorization_hdr* pjsip_authorization_hdr_clone( pj_pool_t *pool,
+							       const pjsip_authorization_hdr *hdr);
+static pjsip_authorization_hdr* pjsip_authorization_hdr_shallow_clone( pj_pool_t *pool,
+								       const pjsip_authorization_hdr *hdr);
+static int pjsip_authorization_hdr_print( pjsip_authorization_hdr *hdr,
+					  char *buf, pj_size_t size);
+
+static pjsip_hdr_vptr authorization_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &pjsip_authorization_hdr_clone,
+    (pjsip_hdr_clone_fptr) &pjsip_authorization_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &pjsip_authorization_hdr_print,
+};
+
+
+PJ_DEF(pjsip_authorization_hdr*) pjsip_authorization_hdr_create(pj_pool_t *pool)
+{
+    pjsip_authorization_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr));
+    init_hdr(hdr, PJSIP_H_AUTHORIZATION, &authorization_hdr_vptr);
+    pj_list_init(&hdr->credential.common.other_param);
+    return hdr;
+}
+
+PJ_DEF(pjsip_proxy_authorization_hdr*) pjsip_proxy_authorization_hdr_create(pj_pool_t *pool)
+{
+    pjsip_proxy_authorization_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr));
+    init_hdr(hdr, PJSIP_H_PROXY_AUTHORIZATION, &authorization_hdr_vptr);
+    pj_list_init(&hdr->credential.common.other_param);
+    return hdr;
+}
+
+static int print_digest_credential(pjsip_digest_credential *cred, char *buf, pj_size_t size)
+{
+    int printed;
+    char *startbuf = buf;
+    char *endbuf = buf + size;
+    
+    copy_advance_pair_quote_cond(buf, "username=", 9, cred->username, '"', '"');
+    copy_advance_pair_quote_cond(buf, ", realm=", 8, cred->realm, '"', '"');
+    copy_advance_pair_quote_cond(buf, ", nonce=", 8, cred->nonce, '"', '"');
+    copy_advance_pair_quote_cond(buf, ", uri=", 6, cred->uri, '"', '"');
+    copy_advance_pair_quote_cond(buf, ", response=", 11, cred->response, '"', '"');
+    copy_advance_pair(buf, ", algorithm=", 12, cred->algorithm);
+    copy_advance_pair_quote_cond(buf, ", cnonce=", 9, cred->cnonce, '"', '"');
+    copy_advance_pair_quote_cond(buf, ", opaque=", 9, cred->opaque, '"', '"');
+    //Note: there's no dbl-quote in qop in Authorization header 
+    // (unlike WWW-Authenticate)
+    //copy_advance_pair_quote_cond(buf, ", qop=", 6, cred->qop, '"', '"');
+    copy_advance_pair(buf, ", qop=", 6, cred->qop);
+    copy_advance_pair(buf, ", nc=", 5, cred->nc);
+    
+    printed = pjsip_param_print_on(&cred->other_param, buf, endbuf-buf, 
+				   &pjsip_TOKEN_SPEC, 
+				   &pjsip_TOKEN_SPEC, ',');
+    if (printed < 0)
+	return -1;
+    buf += printed;
+
+    return (int) (buf-startbuf);
+}
+
+static int print_pgp_credential(pjsip_pgp_credential *cred, char *buf, pj_size_t size)
+{
+    PJ_UNUSED_ARG(cred);
+    PJ_UNUSED_ARG(buf);
+    PJ_UNUSED_ARG(size);
+    return -1;
+}
+
+static int pjsip_authorization_hdr_print( pjsip_authorization_hdr *hdr,
+					  char *buf, pj_size_t size)
+{
+    int printed;
+    char *startbuf = buf;
+    char *endbuf = buf + size;
+
+    copy_advance(buf, hdr->name);
+    *buf++ = ':';
+    *buf++ = ' ';
+
+    copy_advance(buf, hdr->scheme);
+    *buf++ = ' ';
+
+    if (pj_stricmp(&hdr->scheme, &pjsip_DIGEST_STR) == 0)
+    {
+	printed = print_digest_credential(&hdr->credential.digest, buf, endbuf - buf);
+    } 
+    else if (pj_stricmp(&hdr->scheme, &pjsip_PGP_STR) == 0)
+    {
+	printed = print_pgp_credential(&hdr->credential.pgp, buf, endbuf - buf);
+    } 
+    else {
+	pj_assert(0);
+	return -1;
+    }
+
+    if (printed == -1)
+	return -1;
+
+    buf += printed;
+    *buf = '\0';
+    return (int)(buf-startbuf);
+}
+
+static pjsip_authorization_hdr* pjsip_authorization_hdr_clone(  pj_pool_t *pool,
+								const pjsip_authorization_hdr *rhs)
+{
+    /* This function also serves Proxy-Authorization header. */
+    pjsip_authorization_hdr *hdr;
+    if (rhs->type == PJSIP_H_AUTHORIZATION)
+	hdr = pjsip_authorization_hdr_create(pool);
+    else
+	hdr = pjsip_proxy_authorization_hdr_create(pool);
+
+    pj_strdup(pool, &hdr->scheme, &rhs->scheme);
+
+    if (pj_stricmp2(&hdr->scheme, "digest") == 0) {
+	pj_strdup(pool, &hdr->credential.digest.username, &rhs->credential.digest.username);
+	pj_strdup(pool, &hdr->credential.digest.realm, &rhs->credential.digest.realm);
+	pj_strdup(pool, &hdr->credential.digest.nonce, &rhs->credential.digest.nonce);
+	pj_strdup(pool, &hdr->credential.digest.uri, &rhs->credential.digest.uri);
+	pj_strdup(pool, &hdr->credential.digest.response, &rhs->credential.digest.response);
+	pj_strdup(pool, &hdr->credential.digest.algorithm, &rhs->credential.digest.algorithm);
+	pj_strdup(pool, &hdr->credential.digest.cnonce, &rhs->credential.digest.cnonce);
+	pj_strdup(pool, &hdr->credential.digest.opaque, &rhs->credential.digest.opaque);
+	pj_strdup(pool, &hdr->credential.digest.qop, &rhs->credential.digest.qop);
+	pj_strdup(pool, &hdr->credential.digest.nc, &rhs->credential.digest.nc);
+	pjsip_param_clone(pool, &hdr->credential.digest.other_param, &rhs->credential.digest.other_param);
+    } else if (pj_stricmp2(&hdr->scheme, "pgp") == 0) {
+	pj_assert(0);
+	return NULL;
+    } else {
+	pj_assert(0);
+	return NULL;
+    }
+
+    return hdr;
+}
+
+static pjsip_authorization_hdr* pjsip_authorization_hdr_shallow_clone( pj_pool_t *pool,
+								       const pjsip_authorization_hdr *rhs)
+{
+    /* This function also serves Proxy-Authorization header. */
+    pjsip_authorization_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    pjsip_param_shallow_clone(pool, &hdr->credential.common.other_param, 
+			      &rhs->credential.common.other_param);
+    return hdr;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Proxy-Authenticate and WWW-Authenticate header.
+ */
+static int pjsip_www_authenticate_hdr_print( pjsip_www_authenticate_hdr *hdr,
+					     char *buf, pj_size_t size);
+static pjsip_www_authenticate_hdr* pjsip_www_authenticate_hdr_clone( pj_pool_t *pool,
+								     const pjsip_www_authenticate_hdr *hdr);
+static pjsip_www_authenticate_hdr* pjsip_www_authenticate_hdr_shallow_clone( pj_pool_t *pool,
+									     const pjsip_www_authenticate_hdr *hdr);
+
+static pjsip_hdr_vptr www_authenticate_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &pjsip_www_authenticate_hdr_clone,
+    (pjsip_hdr_clone_fptr) &pjsip_www_authenticate_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &pjsip_www_authenticate_hdr_print,
+};
+
+
+PJ_DEF(pjsip_www_authenticate_hdr*) pjsip_www_authenticate_hdr_create(pj_pool_t *pool)
+{
+    pjsip_www_authenticate_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr));
+    init_hdr(hdr, PJSIP_H_WWW_AUTHENTICATE, &www_authenticate_hdr_vptr);
+    pj_list_init(&hdr->challenge.common.other_param);
+    return hdr;
+}
+
+
+PJ_DEF(pjsip_proxy_authenticate_hdr*) pjsip_proxy_authenticate_hdr_create(pj_pool_t *pool)
+{
+    pjsip_proxy_authenticate_hdr *hdr = pj_pool_calloc(pool, 1, sizeof(*hdr));
+    init_hdr(hdr, PJSIP_H_PROXY_AUTHENTICATE, &www_authenticate_hdr_vptr);
+    pj_list_init(&hdr->challenge.common.other_param);
+    return hdr;
+}
+
+static int print_digest_challenge( pjsip_digest_challenge *chal,
+				   char *buf, pj_size_t size)
+{
+    int printed;
+    char *startbuf = buf;
+    char *endbuf = buf + size;
+
+    copy_advance_pair_quote_cond(buf, " realm=", 7, chal->realm, '"', '"');
+    copy_advance_pair_quote_cond(buf, ",domain=", 8, chal->domain, '"', '"');
+    copy_advance_pair_quote_cond(buf, ",nonce=", 7, chal->nonce, '"', '"');
+    copy_advance_pair_quote_cond(buf, ",opaque=", 8, chal->opaque, '"', '"');
+    if (chal->stale) {
+	pj_str_t true_str = { "true", 4 };
+	copy_advance_pair(buf, ",stale=", 7, true_str);
+    }
+    copy_advance_pair(buf, ",algorithm=", 11, chal->algorithm);
+    copy_advance_pair_quote_cond(buf, ",qop=", 5, chal->qop, '"', '"');
+    
+    printed = pjsip_param_print_on(&chal->other_param, buf, endbuf-buf, 
+				   &pjsip_TOKEN_SPEC, 
+				   &pjsip_TOKEN_SPEC, ',');
+    if (printed < 0)
+	return -1;
+    buf += printed;
+
+    return (int)(buf-startbuf);
+}
+
+static int print_pgp_challenge( pjsip_pgp_challenge *chal,
+			        char *buf, pj_size_t size)
+{
+    PJ_UNUSED_ARG(chal);
+    PJ_UNUSED_ARG(buf);
+    PJ_UNUSED_ARG(size);
+    return -1;
+}
+
+static int pjsip_www_authenticate_hdr_print( pjsip_www_authenticate_hdr *hdr,
+					     char *buf, pj_size_t size)
+{
+    int printed;
+    char *startbuf = buf;
+    char *endbuf = buf + size;
+
+    copy_advance(buf, hdr->name);
+    *buf++ = ':';
+    *buf++ = ' ';
+
+    copy_advance(buf, hdr->scheme);
+    *buf++ = ' ';
+
+    if (pj_stricmp2(&hdr->scheme, "digest") == 0)
+	printed = print_digest_challenge(&hdr->challenge.digest, buf, endbuf - buf);
+    else if (pj_stricmp2(&hdr->scheme, "pgp") == 0)
+	printed = print_pgp_challenge(&hdr->challenge.pgp, buf, endbuf - buf);
+    else {
+	pj_assert(0);
+	return -1;
+    }
+
+    if (printed == -1)
+	return -1;
+
+    buf += printed;
+    *buf = '\0';
+    return (int)(buf-startbuf);
+}
+
+static pjsip_www_authenticate_hdr* pjsip_www_authenticate_hdr_clone( pj_pool_t *pool,
+								     const pjsip_www_authenticate_hdr *rhs)
+{
+    /* This function also serves Proxy-Authenticate header. */
+    pjsip_www_authenticate_hdr *hdr;
+    if (rhs->type == PJSIP_H_WWW_AUTHENTICATE)
+	hdr = pjsip_www_authenticate_hdr_create(pool);
+    else
+	hdr = pjsip_proxy_authenticate_hdr_create(pool);
+
+    pj_strdup(pool, &hdr->scheme, &rhs->scheme);
+
+    if (pj_stricmp2(&hdr->scheme, "digest") == 0) {
+	pj_strdup(pool, &hdr->challenge.digest.realm, &rhs->challenge.digest.realm);
+	pj_strdup(pool, &hdr->challenge.digest.domain, &rhs->challenge.digest.domain);
+	pj_strdup(pool, &hdr->challenge.digest.nonce, &rhs->challenge.digest.nonce);
+	pj_strdup(pool, &hdr->challenge.digest.opaque, &rhs->challenge.digest.opaque);
+	hdr->challenge.digest.stale = rhs->challenge.digest.stale;
+	pj_strdup(pool, &hdr->challenge.digest.algorithm, &rhs->challenge.digest.algorithm);
+	pj_strdup(pool, &hdr->challenge.digest.qop, &rhs->challenge.digest.qop);
+	pjsip_param_clone(pool, &hdr->challenge.digest.other_param, 
+			  &rhs->challenge.digest.other_param);
+    } else if (pj_stricmp2(&hdr->scheme, "pgp") == 0) {
+	pj_assert(0);
+	return NULL;
+    } else {
+	pj_assert(0);
+	return NULL;
+    }
+
+    return hdr;
+
+}
+
+static pjsip_www_authenticate_hdr* pjsip_www_authenticate_hdr_shallow_clone( pj_pool_t *pool,
+									     const pjsip_www_authenticate_hdr *rhs)
+{
+    /* This function also serves Proxy-Authenticate header. */
+    pjsip_www_authenticate_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    pjsip_param_shallow_clone(pool, &hdr->challenge.common.other_param, 
+			      &rhs->challenge.common.other_param);
+    return hdr;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_auth_parser.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_auth_parser.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_auth_parser.c	(revision 1163)
@@ -0,0 +1,303 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_auth_parser.h>
+#include <pjsip/sip_auth_msg.h>
+#include <pjsip/sip_parser.h>
+#include <pj/assert.h>
+#include <pj/string.h>
+#include <pj/except.h>
+#include <pj/pool.h>
+
+static pjsip_hdr* parse_hdr_authorization       ( pjsip_parse_ctx *ctx );
+static pjsip_hdr* parse_hdr_proxy_authorization ( pjsip_parse_ctx *ctx );
+static pjsip_hdr* parse_hdr_www_authenticate    ( pjsip_parse_ctx *ctx );
+static pjsip_hdr* parse_hdr_proxy_authenticate  ( pjsip_parse_ctx *ctx );
+
+static void parse_digest_credential ( pj_scanner *scanner, pj_pool_t *pool, 
+                                      pjsip_digest_credential *cred);
+static void parse_pgp_credential    ( pj_scanner *scanner, pj_pool_t *pool, 
+                                      pjsip_pgp_credential *cred);
+static void parse_digest_challenge  ( pj_scanner *scanner, pj_pool_t *pool, 
+                                      pjsip_digest_challenge *chal);
+static void parse_pgp_challenge     ( pj_scanner *scanner, pj_pool_t *pool,
+                                      pjsip_pgp_challenge *chal);
+
+const pj_str_t	pjsip_USERNAME_STR =	    { "username", 8 },
+		pjsip_REALM_STR =	    { "realm", 5},
+		pjsip_NONCE_STR =	    { "nonce", 5},
+		pjsip_URI_STR =		    { "uri", 3 },
+		pjsip_RESPONSE_STR =	    { "response", 8 },
+		pjsip_ALGORITHM_STR =	    { "algorithm", 9 },
+		pjsip_DOMAIN_STR =	    { "domain", 6 },
+		pjsip_STALE_STR =	    { "stale", 5},
+		pjsip_QOP_STR =		    { "qop", 3},
+		pjsip_CNONCE_STR =	    { "cnonce", 6},
+		pjsip_OPAQUE_STR =	    { "opaque", 6},
+		pjsip_NC_STR =		    { "nc", 2},
+		pjsip_TRUE_STR =	    { "true", 4},
+		pjsip_QUOTED_TRUE_STR =	    { "\"true\"", 6},
+		pjsip_FALSE_STR =	    { "false", 5},
+		pjsip_QUOTED_FALSE_STR =    { "\"false\"", 7},
+		pjsip_DIGEST_STR =	    { "Digest", 6},
+		pjsip_QUOTED_DIGEST_STR =   { "\"Digest\"", 8},
+		pjsip_PGP_STR =		    { "PGP", 3 },
+		pjsip_QUOTED_PGP_STR =	    { "\"PGP\"", 5 },
+		pjsip_MD5_STR =		    { "md5", 3 },
+		pjsip_QUOTED_MD5_STR =	    { "\"md5\"", 5},
+		pjsip_AUTH_STR =	    { "auth", 4},
+		pjsip_QUOTED_AUTH_STR =	    { "\"auth\"", 6 };
+
+
+static void parse_digest_credential( pj_scanner *scanner, pj_pool_t *pool, 
+                                     pjsip_digest_credential *cred)
+{
+    pj_list_init(&cred->other_param);
+
+    for (;;) {
+	pj_str_t name, value;
+
+	pjsip_parse_param_imp(scanner, pool, &name, &value,
+			      PJSIP_PARSE_REMOVE_QUOTE);
+
+	if (!pj_stricmp(&name, &pjsip_USERNAME_STR)) {
+	    cred->username = value;
+
+	} else if (!pj_stricmp(&name, &pjsip_REALM_STR)) {
+	    cred->realm = value;
+
+	} else if (!pj_stricmp(&name, &pjsip_NONCE_STR)) {
+	    cred->nonce = value;
+
+	} else if (!pj_stricmp(&name, &pjsip_URI_STR)) {
+	    cred->uri = value;
+
+	} else if (!pj_stricmp(&name, &pjsip_RESPONSE_STR)) {
+	    cred->response = value;
+
+	} else if (!pj_stricmp(&name, &pjsip_ALGORITHM_STR)) {
+	    cred->algorithm = value;
+
+	} else if (!pj_stricmp(&name, &pjsip_CNONCE_STR)) {
+	    cred->cnonce = value;
+
+	} else if (!pj_stricmp(&name, &pjsip_OPAQUE_STR)) {
+	    cred->opaque = value;
+
+	} else if (!pj_stricmp(&name, &pjsip_QOP_STR)) {
+	    cred->qop = value;
+
+	} else if (!pj_stricmp(&name, &pjsip_NC_STR)) {
+	    cred->nc = value;
+
+	} else {
+	    pjsip_param *p = pj_pool_alloc(pool, sizeof(pjsip_param));
+	    p->name = name;
+	    p->value = value;
+	    pj_list_insert_before(&cred->other_param, p);
+	}
+
+	/* Eat comma */
+	if (!pj_scan_is_eof(scanner) && *scanner->curptr == ',')
+	    pj_scan_get_char(scanner);
+	else
+	    break;
+    }
+}
+
+static void parse_pgp_credential( pj_scanner *scanner, pj_pool_t *pool, 
+                                  pjsip_pgp_credential *cred)
+{
+    PJ_UNUSED_ARG(scanner);
+    PJ_UNUSED_ARG(pool);
+    PJ_UNUSED_ARG(cred);
+
+    PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+}
+
+static void parse_digest_challenge( pj_scanner *scanner, pj_pool_t *pool, 
+                                    pjsip_digest_challenge *chal)
+{
+    pj_list_init(&chal->other_param);
+
+    for (;;) {
+	pj_str_t name, value;
+
+	pjsip_parse_param_imp(scanner, pool, &name, &value,
+			      PJSIP_PARSE_REMOVE_QUOTE);
+
+	if (!pj_stricmp(&name, &pjsip_REALM_STR)) {
+	    chal->realm = value;
+
+	} else if (!pj_stricmp(&name, &pjsip_DOMAIN_STR)) {
+	    chal->domain = value;
+
+	} else if (!pj_stricmp(&name, &pjsip_NONCE_STR)) {
+	    chal->nonce = value;
+
+	} else if (!pj_stricmp(&name, &pjsip_OPAQUE_STR)) {
+	    chal->opaque = value;
+
+	} else if (!pj_stricmp(&name, &pjsip_STALE_STR)) {
+	    if (!pj_stricmp(&value, &pjsip_TRUE_STR) || 
+                !pj_stricmp(&value, &pjsip_QUOTED_TRUE_STR))
+            {
+		chal->stale = 1;
+            }
+
+	} else if (!pj_stricmp(&name, &pjsip_ALGORITHM_STR)) {
+	    chal->algorithm = value;
+
+
+	} else if (!pj_stricmp(&name, &pjsip_QOP_STR)) {
+	    chal->qop = value;
+
+	} else {
+	    pjsip_param *p = pj_pool_alloc(pool, sizeof(pjsip_param));
+	    p->name = name;
+	    p->value = value;
+	    pj_list_insert_before(&chal->other_param, p);
+	}
+
+	/* Eat comma */
+	if (!pj_scan_is_eof(scanner) && *scanner->curptr == ',')
+	    pj_scan_get_char(scanner);
+	else
+	    break;
+    }
+}
+
+static void parse_pgp_challenge( pj_scanner *scanner, pj_pool_t *pool, 
+                                 pjsip_pgp_challenge *chal)
+{
+    PJ_UNUSED_ARG(scanner);
+    PJ_UNUSED_ARG(pool);
+    PJ_UNUSED_ARG(chal);
+
+    PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+}
+
+static void int_parse_hdr_authorization( pj_scanner *scanner, pj_pool_t *pool,
+					 pjsip_authorization_hdr *hdr)
+{
+    if (*scanner->curptr == '"') {
+	pj_scan_get_quote(scanner, '"', '"', &hdr->scheme);
+	hdr->scheme.ptr++;
+	hdr->scheme.slen -= 2;
+    } else {
+	pj_scan_get(scanner, &pjsip_TOKEN_SPEC, &hdr->scheme);
+    }
+
+    if (!pj_stricmp(&hdr->scheme, &pjsip_DIGEST_STR)) {
+
+	parse_digest_credential(scanner, pool, &hdr->credential.digest);
+
+    } else if (!pj_stricmp(&hdr->scheme, &pjsip_PGP_STR)) {
+
+	parse_pgp_credential( scanner, pool, &hdr->credential.pgp);
+
+    } else {
+	PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+    }
+
+    pjsip_parse_end_hdr_imp( scanner );
+}
+
+static void int_parse_hdr_authenticate( pj_scanner *scanner, pj_pool_t *pool, 
+					pjsip_www_authenticate_hdr *hdr)
+{
+    if (*scanner->curptr == '"') {
+	pj_scan_get_quote(scanner, '"', '"', &hdr->scheme);
+	hdr->scheme.ptr++;
+	hdr->scheme.slen -= 2;
+    } else {
+	pj_scan_get(scanner, &pjsip_TOKEN_SPEC, &hdr->scheme);
+    }
+
+    if (!pj_stricmp(&hdr->scheme, &pjsip_DIGEST_STR)) {
+
+	parse_digest_challenge(scanner, pool, &hdr->challenge.digest);
+
+    } else if (!pj_stricmp(&hdr->scheme, &pjsip_PGP_STR)) {
+
+	parse_pgp_challenge(scanner, pool, &hdr->challenge.pgp);
+
+    } else {
+	PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+    }
+
+    pjsip_parse_end_hdr_imp( scanner );
+}
+
+
+static pjsip_hdr* parse_hdr_authorization( pjsip_parse_ctx *ctx )
+{
+    pjsip_authorization_hdr *hdr = pjsip_authorization_hdr_create(ctx->pool);
+    int_parse_hdr_authorization(ctx->scanner, ctx->pool, hdr);
+    return (pjsip_hdr*)hdr;
+}
+
+static pjsip_hdr* parse_hdr_proxy_authorization( pjsip_parse_ctx *ctx )
+{
+    pjsip_proxy_authorization_hdr *hdr = 
+        pjsip_proxy_authorization_hdr_create(ctx->pool);
+    int_parse_hdr_authorization(ctx->scanner, ctx->pool, hdr);
+    return (pjsip_hdr*)hdr;
+}
+
+static pjsip_hdr* parse_hdr_www_authenticate( pjsip_parse_ctx *ctx )
+{
+    pjsip_www_authenticate_hdr *hdr = 
+        pjsip_www_authenticate_hdr_create(ctx->pool);
+    int_parse_hdr_authenticate(ctx->scanner, ctx->pool, hdr);
+    return (pjsip_hdr*)hdr;
+}
+
+static pjsip_hdr* parse_hdr_proxy_authenticate( pjsip_parse_ctx *ctx )
+{
+    pjsip_proxy_authenticate_hdr *hdr = 
+        pjsip_proxy_authenticate_hdr_create(ctx->pool);
+    int_parse_hdr_authenticate(ctx->scanner, ctx->pool, hdr);
+    return (pjsip_hdr*)hdr;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_auth_init_parser()
+{
+    pj_status_t status;
+
+    status = pjsip_register_hdr_parser( "Authorization", NULL, 
+                                        &parse_hdr_authorization);
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    status = pjsip_register_hdr_parser( "Proxy-Authorization", NULL, 
+                                        &parse_hdr_proxy_authorization);
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    status = pjsip_register_hdr_parser( "WWW-Authenticate", NULL, 
+                                        &parse_hdr_www_authenticate);
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    status = pjsip_register_hdr_parser( "Proxy-Authenticate", NULL, 
+                                        &parse_hdr_proxy_authenticate);
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(void) pjsip_auth_deinit_parser()
+{
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_auth_server.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_auth_server.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_auth_server.c	(revision 1163)
@@ -0,0 +1,234 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_auth.h>
+#include <pjsip/sip_auth_parser.h>	/* just to get pjsip_DIGEST_STR */
+#include <pjsip/sip_auth_msg.h>
+#include <pjsip/sip_errno.h>
+#include <pjsip/sip_transport.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+
+
+/* Defined in sip_auth_client.c */
+void pjsip_auth_create_digest( pj_str_t *result,
+			       const pj_str_t *nonce,
+			       const pj_str_t *nc,
+			       const pj_str_t *cnonce,
+			       const pj_str_t *qop,
+			       const pj_str_t *uri,
+			       const pjsip_cred_info *cred_info,
+			       const pj_str_t *method);
+
+
+/*
+ * Initialize server authorization session data structure to serve the 
+ * specified realm and to use lookup_func function to look for the credential 
+ * info. 
+ */
+PJ_DEF(pj_status_t) pjsip_auth_srv_init(  pj_pool_t *pool,
+					  pjsip_auth_srv *auth_srv,
+					  const pj_str_t *realm,
+					  pjsip_auth_lookup_cred *lookup,
+					  unsigned options )
+{
+    PJ_ASSERT_RETURN(pool && auth_srv && realm && lookup, PJ_EINVAL);
+
+    pj_strdup( pool, &auth_srv->realm, realm);
+    auth_srv->lookup = lookup;
+    auth_srv->is_proxy = (options & PJSIP_AUTH_SRV_IS_PROXY);
+
+    return PJ_SUCCESS;
+}
+
+
+/* Verify incoming Authorization/Proxy-Authorization header against the 
+ * specified credential.
+ */
+static pj_status_t pjsip_auth_verify( const pjsip_authorization_hdr *hdr,
+				      const pj_str_t *method,
+				      const pjsip_cred_info *cred_info )
+{
+    if (pj_stricmp(&hdr->scheme, &pjsip_DIGEST_STR) == 0) {
+	char digest_buf[PJSIP_MD5STRLEN];
+	pj_str_t digest;
+	const pjsip_digest_credential *dig = &hdr->credential.digest;
+
+	/* Check that username and realm match. 
+	 * These checks should have been performed before entering this
+	 * function.
+	 */
+	PJ_ASSERT_RETURN(pj_strcmp(&dig->username, &cred_info->username) == 0,
+			 PJ_EINVALIDOP);
+	PJ_ASSERT_RETURN(pj_strcmp(&dig->realm, &cred_info->realm) == 0,
+			 PJ_EINVALIDOP);
+
+	/* Prepare for our digest calculation. */
+	digest.ptr = digest_buf;
+	digest.slen = PJSIP_MD5STRLEN;
+
+	/* Create digest for comparison. */
+	pjsip_auth_create_digest(&digest, 
+				 &hdr->credential.digest.nonce,
+				 &hdr->credential.digest.nc, 
+				 &hdr->credential.digest.cnonce,
+				 &hdr->credential.digest.qop,
+				 &hdr->credential.digest.uri,
+				 cred_info, 
+				 method );
+
+	/* Compare digest. */
+	return (pj_stricmp(&digest, &hdr->credential.digest.response) == 0) ?
+	       PJ_SUCCESS : PJSIP_EAUTHINVALIDDIGEST;
+
+    } else {
+	pj_assert(!"Unsupported authentication scheme");
+	return PJSIP_EINVALIDAUTHSCHEME;
+    }
+}
+
+
+/*
+ * Request the authorization server framework to verify the authorization 
+ * information in the specified request in rdata.
+ */
+PJ_DEF(pj_status_t) pjsip_auth_srv_verify( pjsip_auth_srv *auth_srv,
+					   pjsip_rx_data *rdata,
+					   int *status_code)
+{
+    pjsip_authorization_hdr *h_auth;
+    pjsip_msg *msg = rdata->msg_info.msg;
+    int htype;
+    pj_str_t acc_name;
+    pjsip_cred_info cred_info;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(auth_srv && rdata, PJ_EINVAL);
+    PJ_ASSERT_RETURN(msg->type == PJSIP_REQUEST_MSG, PJSIP_ENOTREQUESTMSG);
+
+    htype = auth_srv->is_proxy ? PJSIP_H_PROXY_AUTHORIZATION : 
+				 PJSIP_H_AUTHORIZATION;
+
+    /* Initialize status with 200. */
+    *status_code = 200;
+
+    /* Find authorization header for our realm. */
+    h_auth = (pjsip_authorization_hdr*) pjsip_msg_find_hdr(msg, htype, NULL);
+    while (h_auth) {
+	if (!pj_stricmp(&h_auth->credential.common.realm, &auth_srv->realm))
+	    break;
+
+	h_auth = h_auth->next;
+	if (h_auth == (void*) &msg->hdr) {
+	    h_auth = NULL;
+	    break;
+	}
+
+	h_auth=(pjsip_authorization_hdr*)pjsip_msg_find_hdr(msg,htype,h_auth);
+    }
+
+    if (!h_auth) {
+	*status_code = auth_srv->is_proxy ? 407 : 401;
+	return PJSIP_EAUTHNOAUTH;
+    }
+
+    /* Check authorization scheme. */
+    if (pj_stricmp(&h_auth->scheme, &pjsip_DIGEST_STR) == 0)
+	acc_name = h_auth->credential.digest.username;
+    else {
+	*status_code = auth_srv->is_proxy ? 407 : 401;
+	return PJSIP_EINVALIDAUTHSCHEME;
+    }
+
+    /* Find the credential information for the account. */
+    status = (*auth_srv->lookup)(rdata->tp_info.pool, &auth_srv->realm,
+				 &acc_name, &cred_info);
+    if (status != PJ_SUCCESS) {
+	*status_code = PJSIP_SC_FORBIDDEN;
+	return status;
+    }
+
+    /* Authenticate with the specified credential. */
+    status = pjsip_auth_verify(h_auth, &msg->line.req.method.name, 
+			       &cred_info);
+    if (status != PJ_SUCCESS) {
+	*status_code = PJSIP_SC_FORBIDDEN;
+    }
+    return status;
+}
+
+
+/*
+ * Add authentication challenge headers to the outgoing response in tdata. 
+ * Application may specify its customized nonce and opaque for the challenge, 
+ * or can leave the value to NULL to make the function fills them in with 
+ * random characters.
+ */
+PJ_DEF(pj_status_t) pjsip_auth_srv_challenge(  pjsip_auth_srv *auth_srv,
+					       const pj_str_t *qop,
+					       const pj_str_t *nonce,
+					       const pj_str_t *opaque,
+					       pj_bool_t stale,
+					       pjsip_tx_data *tdata)
+{
+    pjsip_www_authenticate_hdr *hdr;
+    char nonce_buf[16];
+    pj_str_t random;
+
+    PJ_ASSERT_RETURN( auth_srv && tdata, PJ_EINVAL );
+
+    random.ptr = nonce_buf;
+    random.slen = sizeof(nonce_buf);
+
+    /* Create the header. */
+    if (auth_srv->is_proxy)
+	hdr = pjsip_proxy_authenticate_hdr_create(tdata->pool);
+    else
+	hdr = pjsip_www_authenticate_hdr_create(tdata->pool);
+
+    /* Initialize header. 
+     * Note: only support digest authentication now.
+     */
+    hdr->scheme = pjsip_DIGEST_STR;
+    hdr->challenge.digest.algorithm = pjsip_MD5_STR;
+    if (nonce) {
+	pj_strdup(tdata->pool, &hdr->challenge.digest.nonce, nonce);
+    } else {
+	pj_create_random_string(nonce_buf, sizeof(nonce_buf));
+	pj_strdup(tdata->pool, &hdr->challenge.digest.nonce, &random);
+    }
+    if (opaque) {
+	pj_strdup(tdata->pool, &hdr->challenge.digest.opaque, opaque);
+    } else {
+	pj_create_random_string(nonce_buf, sizeof(nonce_buf));
+	pj_strdup(tdata->pool, &hdr->challenge.digest.opaque, &random);
+    }
+    if (qop) {
+	pj_strdup(tdata->pool, &hdr->challenge.digest.qop, qop);
+    } else {
+	hdr->challenge.digest.qop.slen = 0;
+    }
+    pj_strdup(tdata->pool, &hdr->challenge.digest.realm, &auth_srv->realm);
+    hdr->challenge.digest.stale = stale;
+
+    pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)hdr);
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_dialog.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_dialog.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_dialog.c	(revision 1163)
@@ -0,0 +1,1717 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_dialog.h>
+#include <pjsip/sip_ua_layer.h>
+#include <pjsip/sip_errno.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_parser.h>
+#include <pjsip/sip_module.h>
+#include <pjsip/sip_util.h>
+#include <pjsip/sip_transaction.h>
+#include <pj/assert.h>
+#include <pj/os.h>
+#include <pj/string.h>
+#include <pj/pool.h>
+#include <pj/guid.h>
+#include <pj/rand.h>
+#include <pj/array.h>
+#include <pj/except.h>
+#include <pj/hash.h>
+#include <pj/log.h>
+
+#define THIS_FILE	"sip_dialog.c"
+
+long pjsip_dlg_lock_tls_id;
+
+PJ_DEF(pj_bool_t) pjsip_method_creates_dialog(const pjsip_method *m)
+{
+    const pjsip_method subscribe = { PJSIP_OTHER_METHOD, {"SUBSCRIBE", 9}};
+    const pjsip_method refer = { PJSIP_OTHER_METHOD, {"REFER", 5}};
+    const pjsip_method notify = { PJSIP_OTHER_METHOD, {"NOTIFY", 6}};
+
+    return m->id == PJSIP_INVITE_METHOD ||
+	   (pjsip_method_cmp(m, &subscribe)==0) ||
+	   (pjsip_method_cmp(m, &refer)==0) ||
+	   (pjsip_method_cmp(m, &notify)==0);
+}
+
+static pj_status_t create_dialog( pjsip_user_agent *ua,
+				  pjsip_dialog **p_dlg)
+{
+    pjsip_endpoint *endpt;
+    pj_pool_t *pool;
+    pjsip_dialog *dlg;
+    pj_status_t status;
+
+    endpt = pjsip_ua_get_endpt(ua);
+    if (!endpt)
+	return PJ_EINVALIDOP;
+
+    pool = pjsip_endpt_create_pool(endpt, "dlg%p", 
+				   PJSIP_POOL_LEN_DIALOG, 
+				   PJSIP_POOL_INC_DIALOG);
+    if (!pool)
+	return PJ_ENOMEM;
+
+    dlg = pj_pool_zalloc(pool, sizeof(pjsip_dialog));
+    PJ_ASSERT_RETURN(dlg != NULL, PJ_ENOMEM);
+
+    dlg->pool = pool;
+    pj_ansi_snprintf(dlg->obj_name, sizeof(dlg->obj_name), "dlg%p", dlg);
+    dlg->ua = ua;
+    dlg->endpt = endpt;
+    dlg->state = PJSIP_DIALOG_STATE_NULL;
+
+    pj_list_init(&dlg->inv_hdr);
+
+    status = pj_mutex_create_recursive(pool, dlg->obj_name, &dlg->mutex_);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+
+    *p_dlg = dlg;
+    return PJ_SUCCESS;
+
+on_error:
+    if (dlg->mutex_)
+	pj_mutex_destroy(dlg->mutex_);
+    pjsip_endpt_release_pool(endpt, pool);
+    return status;
+}
+
+static void destroy_dialog( pjsip_dialog *dlg )
+{
+    if (dlg->mutex_) {
+	pj_mutex_destroy(dlg->mutex_);
+	dlg->mutex_ = NULL;
+    }
+    if (dlg->tp_sel.type != PJSIP_TPSELECTOR_NONE) {
+	pjsip_tpselector_dec_ref(&dlg->tp_sel);
+	pj_bzero(&dlg->tp_sel, sizeof(pjsip_tpselector));
+    }
+    pjsip_endpt_release_pool(dlg->endpt, dlg->pool);
+}
+
+
+/*
+ * Create an UAC dialog.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_create_uac( pjsip_user_agent *ua,
+					  const pj_str_t *local_uri,
+					  const pj_str_t *local_contact,
+					  const pj_str_t *remote_uri,
+					  const pj_str_t *target,
+					  pjsip_dialog **p_dlg)
+{
+    pj_status_t status;
+    pj_str_t tmp;
+    pjsip_dialog *dlg;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(ua && local_uri && remote_uri && p_dlg, PJ_EINVAL);
+
+    /* Create dialog instance. */
+    status = create_dialog(ua, &dlg);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Parse target. */
+    pj_strdup_with_null(dlg->pool, &tmp, target ? target : remote_uri);
+    dlg->target = pjsip_parse_uri(dlg->pool, tmp.ptr, tmp.slen, 0);
+    if (!dlg->target) {
+	status = PJSIP_EINVALIDURI;
+	goto on_error;
+    }
+
+    /* Put any header param in the target URI into INVITE header list. */
+    if (PJSIP_URI_SCHEME_IS_SIP(dlg->target) ||
+	PJSIP_URI_SCHEME_IS_SIPS(dlg->target))
+    {
+	pjsip_param *param;
+	pjsip_sip_uri *uri = (pjsip_sip_uri*)pjsip_uri_get_uri(dlg->target);
+
+	param = uri->header_param.next;
+	while (param != &uri->header_param) {
+	    pjsip_hdr *hdr;
+	    int c;
+
+	    c = param->value.ptr[param->value.slen];
+	    param->value.ptr[param->value.slen] = '\0';
+
+	    hdr = pjsip_parse_hdr(dlg->pool, &param->name, param->value.ptr,
+				  param->value.slen, NULL);
+
+	    param->value.ptr[param->value.slen] = (char)c;
+
+	    if (hdr == NULL) {
+		status = PJSIP_EINVALIDURI;
+		goto on_error;
+	    }
+	    pj_list_push_back(&dlg->inv_hdr, hdr);
+
+	    param = param->next;
+	}
+
+	/* Now must remove any header params from URL, since that would
+	 * create another header in pjsip_endpt_create_request().
+	 */
+	pj_list_init(&uri->header_param);
+    }
+
+    /* Init local info. */
+    dlg->local.info = pjsip_from_hdr_create(dlg->pool);
+    pj_strdup_with_null(dlg->pool, &dlg->local.info_str, local_uri);
+    dlg->local.info->uri = pjsip_parse_uri(dlg->pool, 
+					   dlg->local.info_str.ptr, 
+					   dlg->local.info_str.slen, 0);
+    if (!dlg->local.info->uri) {
+	status = PJSIP_EINVALIDURI;
+	goto on_error;
+    }
+
+    /* Generate local tag. */
+    pj_create_unique_string(dlg->pool, &dlg->local.info->tag);
+
+    /* Calculate hash value of local tag. */
+    dlg->local.tag_hval = pj_hash_calc(0, dlg->local.info->tag.ptr,
+				       dlg->local.info->tag.slen);
+
+    /* Randomize local CSeq. */
+    dlg->local.first_cseq = pj_rand() % 0x7FFFFFFFL;
+    dlg->local.cseq = dlg->local.first_cseq;
+
+    /* Init local contact. */
+    dlg->local.contact = pjsip_contact_hdr_create(dlg->pool);
+    pj_strdup_with_null(dlg->pool, &tmp, 
+			local_contact ? local_contact : local_uri);
+    dlg->local.contact->uri = pjsip_parse_uri(dlg->pool, tmp.ptr, tmp.slen,
+					      PJSIP_PARSE_URI_AS_NAMEADDR);
+    if (!dlg->local.contact->uri) {
+	status = PJSIP_EINVALIDURI;
+	goto on_error;
+    }
+
+    /* Init remote info. */
+    dlg->remote.info = pjsip_to_hdr_create(dlg->pool);
+    pj_strdup_with_null(dlg->pool, &dlg->remote.info_str, remote_uri);
+    dlg->remote.info->uri = pjsip_parse_uri(dlg->pool, 
+					    dlg->remote.info_str.ptr, 
+					    dlg->remote.info_str.slen, 0);
+    if (!dlg->remote.info->uri) {
+	status = PJSIP_EINVALIDURI;
+	goto on_error;
+    }
+
+    /* Remove header param from remote.info_str, if any */
+    if (PJSIP_URI_SCHEME_IS_SIP(dlg->remote.info->uri) ||
+	PJSIP_URI_SCHEME_IS_SIPS(dlg->remote.info->uri))
+    {
+	pjsip_sip_uri *sip_uri = pjsip_uri_get_uri(dlg->remote.info->uri);
+	if (!pj_list_empty(&sip_uri->header_param)) {
+	    pj_str_t tmp;
+
+	    /* Remove all header param */
+	    pj_list_init(&sip_uri->header_param);
+
+	    /* Print URI */
+	    tmp.ptr = pj_pool_alloc(dlg->pool, dlg->remote.info_str.slen);
+	    tmp.slen = pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR,
+				       sip_uri, tmp.ptr, 
+				       dlg->remote.info_str.slen);
+
+	    if (tmp.slen < 1) {
+		status = PJSIP_EURITOOLONG;
+		goto on_error;
+	    }
+
+	    /* Assign remote.info_str */
+	    dlg->remote.info_str = tmp;
+	}
+    }
+
+
+    /* Initialize remote's CSeq to -1. */
+    dlg->remote.cseq = dlg->remote.first_cseq = -1;
+
+    /* Initial role is UAC. */
+    dlg->role = PJSIP_ROLE_UAC;
+
+    /* Secure? */
+    dlg->secure = PJSIP_URI_SCHEME_IS_SIPS(dlg->target);
+
+    /* Generate Call-ID header. */
+    dlg->call_id = pjsip_cid_hdr_create(dlg->pool);
+    pj_create_unique_string(dlg->pool, &dlg->call_id->id);
+
+    /* Initial route set is empty. */
+    pj_list_init(&dlg->route_set);
+
+    /* Init client authentication session. */
+    status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt, 
+				 dlg->pool, 0);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Register this dialog to user agent. */
+    status = pjsip_ua_register_dlg( ua, dlg );
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+
+    /* Done! */
+    *p_dlg = dlg;
+
+
+    PJ_LOG(5,(dlg->obj_name, "UAC dialog created"));
+
+    return PJ_SUCCESS;
+
+on_error:
+    destroy_dialog(dlg);
+    return status;
+}
+
+
+/*
+ * Create UAS dialog.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_create_uas(   pjsip_user_agent *ua,
+					    pjsip_rx_data *rdata,
+					    const pj_str_t *contact,
+					    pjsip_dialog **p_dlg)
+{
+    pj_status_t status;
+    pjsip_hdr *contact_hdr;
+    pjsip_rr_hdr *rr;
+    pjsip_transaction *tsx = NULL;
+    pj_str_t tmp;
+    enum { TMP_LEN=128};
+    pj_ssize_t len;
+    pjsip_dialog *dlg;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(ua && rdata && p_dlg, PJ_EINVAL);
+
+    /* rdata must have request message. */
+    PJ_ASSERT_RETURN(rdata->msg_info.msg->type == PJSIP_REQUEST_MSG,
+		     PJSIP_ENOTREQUESTMSG);
+
+    /* Request must not have To tag. 
+     * This should have been checked in the user agent (or application?).
+     */
+    PJ_ASSERT_RETURN(rdata->msg_info.to->tag.slen == 0, PJ_EINVALIDOP);
+		     
+    /* The request must be a dialog establishing request. */
+    PJ_ASSERT_RETURN(
+	pjsip_method_creates_dialog(&rdata->msg_info.msg->line.req.method),
+	PJ_EINVALIDOP);
+
+    /* Create dialog instance. */
+    status = create_dialog(ua, &dlg);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Temprary string for getting the string representation of
+     * both local and remote URI.
+     */
+    tmp.ptr = pj_pool_alloc(rdata->tp_info.pool, TMP_LEN);
+
+    /* Init local info from the To header. */
+    dlg->local.info = pjsip_hdr_clone(dlg->pool, rdata->msg_info.to);
+    pjsip_fromto_hdr_set_from(dlg->local.info);
+
+    /* Generate local tag. */
+    pj_create_unique_string(dlg->pool, &dlg->local.info->tag);
+
+
+    /* Print the local info. */
+    len = pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR,
+			  dlg->local.info->uri, tmp.ptr, TMP_LEN);
+    if (len < 1) {
+	pj_ansi_strcpy(tmp.ptr, "<-error: uri too long->");
+	tmp.slen = pj_ansi_strlen(tmp.ptr);
+    } else
+	tmp.slen = len;
+
+    /* Save the local info. */
+    pj_strdup(dlg->pool, &dlg->local.info_str, &tmp);
+
+    /* Calculate hash value of local tag. */
+    dlg->local.tag_hval = pj_hash_calc(0, dlg->local.info->tag.ptr,
+				       dlg->local.info->tag.slen);
+
+
+    /* Randomize local cseq */
+    dlg->local.first_cseq = pj_rand() % 0x7FFFFFFFL;
+    dlg->local.cseq = dlg->local.first_cseq;
+
+    /* Init local contact. */
+    /* TODO:
+     *  Section 12.1.1, paragraph about using SIPS URI in Contact.
+     *  If the request that initiated the dialog contained a SIPS URI 
+     *  in the Request-URI or in the top Record-Route header field value, 
+     *  if there was any, or the Contact header field if there was no 
+     *  Record-Route header field, the Contact header field in the response
+     *  MUST be a SIPS URI.
+     */
+    if (contact) {
+	pj_str_t tmp;
+
+	dlg->local.contact = pjsip_contact_hdr_create(dlg->pool);
+	pj_strdup_with_null(dlg->pool, &tmp, contact);
+	dlg->local.contact->uri = pjsip_parse_uri(dlg->pool, tmp.ptr, tmp.slen,
+						  PJSIP_PARSE_URI_AS_NAMEADDR);
+	if (!dlg->local.contact->uri) {
+	    status = PJSIP_EINVALIDURI;
+	    goto on_error;
+	}
+
+    } else {
+	dlg->local.contact = pjsip_contact_hdr_create(dlg->pool);
+	dlg->local.contact->uri = dlg->local.info->uri;
+    }
+
+    /* Init remote info from the From header. */
+    dlg->remote.info = pjsip_hdr_clone(dlg->pool, rdata->msg_info.from);
+    pjsip_fromto_hdr_set_to(dlg->remote.info);
+
+    /* Print the remote info. */
+    len = pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR,
+			  dlg->remote.info->uri, tmp.ptr, TMP_LEN);
+    if (len < 1) {
+	pj_ansi_strcpy(tmp.ptr, "<-error: uri too long->");
+	tmp.slen = pj_ansi_strlen(tmp.ptr);
+    } else
+	tmp.slen = len;
+
+    /* Save the remote info. */
+    pj_strdup(dlg->pool, &dlg->remote.info_str, &tmp);
+
+
+    /* Init remote's contact from Contact header. */
+    contact_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 
+				     NULL);
+    if (!contact_hdr) {
+	status = PJSIP_ERRNO_FROM_SIP_STATUS(PJSIP_SC_BAD_REQUEST);
+	goto on_error;
+    }
+    dlg->remote.contact = pjsip_hdr_clone(dlg->pool, contact_hdr);
+
+    /* Init remote's CSeq from CSeq header */
+    dlg->remote.cseq = dlg->remote.first_cseq = rdata->msg_info.cseq->cseq;
+
+    /* Set initial target to remote's Contact. */
+    dlg->target = dlg->remote.contact->uri;
+
+    /* Initial role is UAS */
+    dlg->role = PJSIP_ROLE_UAS;
+
+    /* Secure? 
+     *  RFC 3261 Section 12.1.1:
+     *  If the request arrived over TLS, and the Request-URI contained a 
+     *  SIPS URI, the 'secure' flag is set to TRUE.
+     */
+    dlg->secure = PJSIP_TRANSPORT_IS_SECURE(rdata->tp_info.transport) &&
+		  PJSIP_URI_SCHEME_IS_SIPS(rdata->msg_info.msg->line.req.uri);
+
+    /* Call-ID */
+    dlg->call_id = pjsip_hdr_clone(dlg->pool, rdata->msg_info.cid);
+
+    /* Route set. 
+     *  RFC 3261 Section 12.1.1:
+     *  The route set MUST be set to the list of URIs in the Record-Route 
+     *  header field from the request, taken in order and preserving all URI 
+     *  parameters. If no Record-Route header field is present in the request,
+     * the route set MUST be set to the empty set.
+     */
+    pj_list_init(&dlg->route_set);
+    rr = rdata->msg_info.record_route;
+    while (rr != NULL) {
+	pjsip_route_hdr *route;
+
+	/* Clone the Record-Route, change the type to Route header. */
+	route = pjsip_hdr_clone(dlg->pool, rr);
+	pjsip_routing_hdr_set_route(route);
+
+	/* Add to route set. */
+	pj_list_push_back(&dlg->route_set, route);
+
+	/* Find next Record-Route header. */
+	rr = rr->next;
+	if (rr == (void*)&rdata->msg_info.msg->hdr)
+	    break;
+	rr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_RECORD_ROUTE, rr);
+    }
+
+    /* Init client authentication session. */
+    status = pjsip_auth_clt_init(&dlg->auth_sess, dlg->endpt,
+				 dlg->pool, 0);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Create UAS transaction for this request. */
+    status = pjsip_tsx_create_uas(dlg->ua, rdata, &tsx);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Associate this dialog to the transaction. */
+    tsx->mod_data[dlg->ua->id] = dlg;
+
+    /* Increment tsx counter */
+    ++dlg->tsx_count;
+
+    /* Calculate hash value of remote tag. */
+    dlg->remote.tag_hval = pj_hash_calc(0, dlg->remote.info->tag.ptr, 
+					dlg->remote.info->tag.slen);
+
+    /* Register this dialog to user agent. */
+    status = pjsip_ua_register_dlg( ua, dlg );
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Put this dialog in rdata's mod_data */
+    rdata->endpt_info.mod_data[ua->id] = dlg;
+
+    PJ_TODO(DIALOG_APP_TIMER);
+
+    /* Feed the first request to the transaction. */
+    pjsip_tsx_recv_msg(tsx, rdata);
+
+    /* Done. */
+    *p_dlg = dlg;
+    PJ_LOG(5,(dlg->obj_name, "UAS dialog created"));
+    return PJ_SUCCESS;
+
+on_error:
+    if (tsx) {
+	pjsip_tsx_terminate(tsx, 500);
+	--dlg->tsx_count;
+    }
+
+    destroy_dialog(dlg);
+    return status;
+}
+
+
+/*
+ * Bind dialog to a specific transport/listener.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_set_transport( pjsip_dialog *dlg,
+					     const pjsip_tpselector *sel)
+{
+    /* Validate */
+    PJ_ASSERT_RETURN(dlg && sel, PJ_EINVAL);
+
+    /* Start locking the dialog. */
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Decrement reference counter of previous transport selector */
+    pjsip_tpselector_dec_ref(&dlg->tp_sel);
+
+    /* Copy transport selector structure .*/
+    pj_memcpy(&dlg->tp_sel, sel, sizeof(*sel));
+
+    /* Increment reference counter */
+    pjsip_tpselector_add_ref(&dlg->tp_sel);
+
+    /* Unlock dialog. */
+    pjsip_dlg_dec_lock(dlg);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create forked dialog from a response.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_fork( const pjsip_dialog *first_dlg,
+				    const pjsip_rx_data *rdata,
+				    pjsip_dialog **new_dlg )
+{
+    pjsip_dialog *dlg;
+    const pjsip_route_hdr *r;
+    pj_status_t status;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(first_dlg && rdata && new_dlg, PJ_EINVAL);
+    
+    /* rdata must be response message. */
+    PJ_ASSERT_RETURN(rdata->msg_info.msg->type == PJSIP_RESPONSE_MSG,
+		     PJSIP_ENOTRESPONSEMSG);
+
+    /* Status code MUST be 1xx (but not 100), or 2xx */
+    status = rdata->msg_info.msg->line.status.code;
+    PJ_ASSERT_RETURN( (status/100==1 && status!=100) ||
+		      (status/100==2), PJ_EBUG);
+
+    /* To tag must present in the response. */
+    PJ_ASSERT_RETURN(rdata->msg_info.to->tag.slen != 0, PJSIP_EMISSINGTAG);
+
+    /* Create the dialog. */
+    status = create_dialog((pjsip_user_agent*)first_dlg->ua, &dlg);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Clone remote target. */
+    dlg->target = pjsip_uri_clone(dlg->pool, first_dlg->target);
+
+    /* Clone local info. */
+    dlg->local.info = pjsip_hdr_clone(dlg->pool, first_dlg->local.info);
+
+    /* Clone local tag. */
+    pj_strdup(dlg->pool, &dlg->local.info->tag, &first_dlg->local.info->tag);
+    dlg->local.tag_hval = first_dlg->local.tag_hval;
+
+    /* Clone local CSeq. */
+    dlg->local.first_cseq = first_dlg->local.first_cseq;
+    dlg->local.cseq = first_dlg->local.cseq;
+
+    /* Clone local Contact. */
+    dlg->local.contact = pjsip_hdr_clone(dlg->pool, first_dlg->local.contact);
+
+    /* Clone remote info. */
+    dlg->remote.info = pjsip_hdr_clone(dlg->pool, first_dlg->remote.info);
+
+    /* Set remote tag from the response. */
+    pj_strdup(dlg->pool, &dlg->remote.info->tag, &rdata->msg_info.to->tag);
+
+    /* Initialize remote's CSeq to -1. */
+    dlg->remote.cseq = dlg->remote.first_cseq = -1;
+
+    /* Initial role is UAC. */
+    dlg->role = PJSIP_ROLE_UAC;
+
+    /* Dialog state depends on the response. */
+    status = rdata->msg_info.msg->line.status.code/100;
+    if (status == 1 || status == 2)
+	dlg->state = PJSIP_DIALOG_STATE_ESTABLISHED;
+    else {
+	pj_assert(!"Invalid status code");
+	dlg->state = PJSIP_DIALOG_STATE_NULL;
+    }
+
+    /* Secure? */
+    dlg->secure = PJSIP_URI_SCHEME_IS_SIPS(dlg->target);
+
+    /* Clone Call-ID header. */
+    dlg->call_id = pjsip_hdr_clone(dlg->pool, first_dlg->call_id);
+
+    /* Duplicate Route-Set. */
+    pj_list_init(&dlg->route_set);
+    r = first_dlg->route_set.next;
+    while (r != &first_dlg->route_set) {
+	pjsip_route_hdr *h;
+
+	h = pjsip_hdr_clone(dlg->pool, r);
+	pj_list_push_back(&dlg->route_set, h);
+
+	r = r->next;
+    }
+
+    /* Clone client authentication session. */
+    status = pjsip_auth_clt_clone(dlg->pool, &dlg->auth_sess, 
+				  &first_dlg->auth_sess);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Register this dialog to user agent. */
+    status = pjsip_ua_register_dlg(dlg->ua, dlg );
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+
+    /* Done! */
+    *new_dlg = dlg;
+
+    PJ_LOG(5,(dlg->obj_name, "Forked dialog created"));
+    return PJ_SUCCESS;
+
+on_error:
+    destroy_dialog(dlg);
+    return status;
+}
+
+
+/*
+ * Destroy dialog.
+ */
+static pj_status_t unregister_and_destroy_dialog( pjsip_dialog *dlg )
+{
+    pj_status_t status;
+
+    /* Lock must have been held. */
+
+    /* Check dialog state. */
+    /* Number of sessions must be zero. */
+    PJ_ASSERT_RETURN(dlg->sess_count==0, PJ_EINVALIDOP);
+
+    /* MUST not have pending transactions. */
+    PJ_ASSERT_RETURN(dlg->tsx_count==0, PJ_EINVALIDOP);
+
+    /* Unregister from user agent. */
+    status = pjsip_ua_unregister_dlg(dlg->ua, dlg);
+    if (status != PJ_SUCCESS) {
+	pj_assert(!"Unexpected failed unregistration!");
+	return status;
+    }
+
+    /* Log */
+    PJ_LOG(5,(dlg->obj_name, "Dialog destroyed"));
+
+    /* Destroy this dialog. */
+    destroy_dialog(dlg);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Forcefully terminate dialog.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_terminate( pjsip_dialog *dlg )
+{
+    /* Number of sessions must be zero. */
+    PJ_ASSERT_RETURN(dlg->sess_count==0, PJ_EINVALIDOP);
+
+    /* MUST not have pending transactions. */
+    PJ_ASSERT_RETURN(dlg->tsx_count==0, PJ_EINVALIDOP);
+
+    return unregister_and_destroy_dialog(dlg);
+}
+
+
+/*
+ * Set route_set
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_set_route_set( pjsip_dialog *dlg,
+					     const pjsip_route_hdr *route_set )
+{
+    pjsip_route_hdr *r;
+
+    PJ_ASSERT_RETURN(dlg, PJ_EINVAL);
+
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Clear route set. */
+    pj_list_init(&dlg->route_set);
+
+    if (!route_set) {
+	pjsip_dlg_dec_lock(dlg);
+	return PJ_SUCCESS;
+    }
+
+    r = route_set->next;
+    while (r != route_set) {
+	pjsip_route_hdr *new_r;
+
+	new_r = pjsip_hdr_clone(dlg->pool, r);
+	pj_list_push_back(&dlg->route_set, new_r);
+
+	r = r->next;
+    }
+
+    pjsip_dlg_dec_lock(dlg);
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Increment session counter.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_inc_session( pjsip_dialog *dlg,
+					   pjsip_module *mod )
+{
+    PJ_ASSERT_RETURN(dlg && mod, PJ_EINVAL);
+
+    pjsip_dlg_inc_lock(dlg);
+    ++dlg->sess_count;
+    pjsip_dlg_dec_lock(dlg);
+
+    PJ_LOG(5,(dlg->obj_name, "Session count inc to %d by %.*s",
+	      dlg->sess_count, (int)mod->name.slen, mod->name.ptr));
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Lock dialog and increment session counter temporarily
+ * to prevent it from being deleted. In addition, it must lock
+ * the user agent's dialog table first, to prevent deadlock.
+ */
+PJ_DEF(void) pjsip_dlg_inc_lock(pjsip_dialog *dlg)
+{
+    PJ_LOG(6,(dlg->obj_name, "Entering pjsip_dlg_inc_lock(), sess_count=%d", 
+	      dlg->sess_count));
+
+    pj_mutex_lock(dlg->mutex_);
+    dlg->sess_count++;
+
+    PJ_LOG(6,(dlg->obj_name, "Leaving pjsip_dlg_inc_lock(), sess_count=%d", 
+	      dlg->sess_count));
+}
+
+/* Try to acquire dialog's mutex, but bail out if mutex can not be
+ * acquired immediately.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_try_inc_lock(pjsip_dialog *dlg)
+{
+    pj_status_t status;
+
+    PJ_LOG(6,(dlg->obj_name,"Entering pjsip_dlg_try_inc_lock(), sess_count=%d", 
+	      dlg->sess_count));
+
+    status = pj_mutex_trylock(dlg->mutex_);
+    if (status != PJ_SUCCESS) {
+	PJ_LOG(6,(dlg->obj_name, "pjsip_dlg_try_inc_lock() failed"));
+	return status;
+    }
+
+    dlg->sess_count++;
+
+    PJ_LOG(6,(dlg->obj_name, "Leaving pjsip_dlg_try_inc_lock(), sess_count=%d", 
+	      dlg->sess_count));
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Unlock dialog and decrement session counter.
+ * It may delete the dialog!
+ */
+PJ_DEF(void) pjsip_dlg_dec_lock(pjsip_dialog *dlg)
+{
+    PJ_LOG(6,(dlg->obj_name, "Entering pjsip_dlg_dec_lock(), sess_count=%d", 
+	      dlg->sess_count));
+
+    pj_assert(dlg->sess_count > 0);
+    --dlg->sess_count;
+
+    if (dlg->sess_count==0 && dlg->tsx_count==0) {
+	pj_mutex_unlock(dlg->mutex_);
+	pj_mutex_lock(dlg->mutex_);
+	unregister_and_destroy_dialog(dlg);
+    } else {
+	pj_mutex_unlock(dlg->mutex_);
+    }
+
+    PJ_LOG(6,(THIS_FILE, "Leaving pjsip_dlg_dec_lock() (dlg=%p)", dlg));
+}
+
+
+
+/*
+ * Decrement session counter.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_dec_session( pjsip_dialog *dlg,
+					   pjsip_module *mod)
+{
+    PJ_ASSERT_RETURN(dlg, PJ_EINVAL);
+
+    PJ_LOG(5,(dlg->obj_name, "Session count dec to %d by %.*s",
+	      dlg->sess_count-1, (int)mod->name.slen, mod->name.ptr));
+
+    pjsip_dlg_inc_lock(dlg);
+    --dlg->sess_count;
+    pjsip_dlg_dec_lock(dlg);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Add usage.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_add_usage( pjsip_dialog *dlg,
+					 pjsip_module *mod,
+					 void *mod_data )
+{
+    unsigned index;
+
+    PJ_ASSERT_RETURN(dlg && mod, PJ_EINVAL);
+    PJ_ASSERT_RETURN(mod->id >= 0 && mod->id < PJSIP_MAX_MODULE,
+		     PJ_EINVAL);
+    PJ_ASSERT_RETURN(dlg->usage_cnt < PJSIP_MAX_MODULE, PJ_EBUG);
+
+    PJ_LOG(5,(dlg->obj_name, 
+	      "Module %.*s added as dialog usage, data=%p",
+	      (int)mod->name.slen, mod->name.ptr, mod_data));
+
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Usages are sorted on priority, lowest number first.
+     * Find position to put the new module, also makes sure that
+     * this module has not been registered before.
+     */
+    for (index=0; index<dlg->usage_cnt; ++index) {
+	if (dlg->usage[index] == mod) {
+	    /* Module may be registered more than once in the same dialog.
+	     * For example, when call transfer fails, application may retry
+	     * call transfer on the same dialog.
+	     * So return PJ_SUCCESS here.
+	     */
+	    PJ_LOG(4,(dlg->obj_name, 
+		      "Module %.*s already registered as dialog usage, "
+		      "updating the data %p",
+		      (int)mod->name.slen, mod->name.ptr, mod_data));
+	    dlg->mod_data[mod->id] = mod_data;
+
+	    pjsip_dlg_dec_lock(dlg);
+	    return PJ_SUCCESS;
+
+	    //pj_assert(!"This module is already registered");
+	    //pjsip_dlg_dec_lock(dlg);
+	    //return PJSIP_ETYPEEXISTS;
+	}
+
+	if (dlg->usage[index]->priority > mod->priority)
+	    break;
+    }
+
+    /* index holds position to put the module.
+     * Insert module at this index.
+     */
+    pj_array_insert(dlg->usage, sizeof(dlg->usage[0]), dlg->usage_cnt,
+		    index, &mod);
+    
+    /* Set module data. */
+    dlg->mod_data[mod->id] = mod_data;
+
+    /* Increment count. */
+    ++dlg->usage_cnt;
+
+    pjsip_dlg_dec_lock(dlg);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Attach module specific data to the dialog. Application can also set 
+ * the value directly by accessing dlg->mod_data[module_id].
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_set_mod_data( pjsip_dialog *dlg,
+					    int mod_id,
+					    void *data )
+{
+    PJ_ASSERT_RETURN(dlg, PJ_EINVAL);
+    PJ_ASSERT_RETURN(mod_id >= 0 && mod_id < PJSIP_MAX_MODULE,
+		     PJ_EINVAL);
+    dlg->mod_data[mod_id] = data;
+    return PJ_SUCCESS;
+}
+
+/**
+ * Get module specific data previously attached to the dialog. Application
+ * can also get value directly by accessing dlg->mod_data[module_id].
+ */
+PJ_DEF(void*) pjsip_dlg_get_mod_data( pjsip_dialog *dlg,
+				      int mod_id)
+{
+    PJ_ASSERT_RETURN(dlg, NULL);
+    PJ_ASSERT_RETURN(mod_id >= 0 && mod_id < PJSIP_MAX_MODULE,
+		     NULL);
+    return dlg->mod_data[mod_id];
+}
+
+
+/*
+ * Create a new request within dialog (i.e. after the dialog session has been
+ * established). The construction of such requests follows the rule in 
+ * RFC3261 section 12.2.1.
+ */
+static pj_status_t dlg_create_request_throw( pjsip_dialog *dlg,
+					     const pjsip_method *method,
+					     int cseq,
+					     pjsip_tx_data **p_tdata )
+{
+    pjsip_tx_data *tdata;
+    pjsip_contact_hdr *contact;
+    pjsip_route_hdr *route, *end_list;
+    pj_status_t status;
+
+    /* Contact Header field.
+     * Contact can only be present in requests that establish dialog (in the 
+     * core SIP spec, only INVITE).
+     */
+    if (pjsip_method_creates_dialog(method))
+	contact = dlg->local.contact;
+    else
+	contact = NULL;
+
+    /*
+     * Create the request by cloning from the headers in the
+     * dialog.
+     */
+    status = pjsip_endpt_create_request_from_hdr(dlg->endpt,
+						 method,
+						 dlg->target,
+						 dlg->local.info,
+						 dlg->remote.info,
+						 contact,
+						 dlg->call_id,
+						 cseq,
+						 NULL,
+						 &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Just copy dialog route-set to Route header. 
+     * The transaction will do the processing as specified in Section 12.2.1
+     * of RFC 3261 in function tsx_process_route() in sip_transaction.c.
+     */
+    route = dlg->route_set.next;
+    end_list = &dlg->route_set;
+    for (; route != end_list; route = route->next ) {
+	pjsip_route_hdr *r;
+	r = pjsip_hdr_shallow_clone( tdata->pool, route );
+	pjsip_routing_hdr_set_route(r);
+	pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)r);
+    }
+
+    /* Copy authorization headers, if request is not ACK or CANCEL. */
+    if (method->id != PJSIP_ACK_METHOD && method->id != PJSIP_CANCEL_METHOD) {
+	status = pjsip_auth_clt_init_req( &dlg->auth_sess, tdata );
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    /* Done. */
+    *p_tdata = tdata;
+
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * Create outgoing request.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_create_request( pjsip_dialog *dlg,
+					      const pjsip_method *method,
+					      int cseq,
+					      pjsip_tx_data **p_tdata)
+{
+    pj_status_t status;
+    pjsip_tx_data *tdata = NULL;
+    PJ_USE_EXCEPTION;
+
+    PJ_ASSERT_RETURN(dlg && method && p_tdata, PJ_EINVAL);
+
+    /* Lock dialog. */
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Use outgoing CSeq and increment it by one. */
+    if (cseq <= 0)
+	cseq = dlg->local.cseq + 1;
+
+    /* Keep compiler happy */
+    status = PJ_EBUG;
+
+    /* Create the request. */
+    PJ_TRY {
+	status = dlg_create_request_throw(dlg, method, cseq, &tdata);
+    }
+    PJ_CATCH_ANY {
+	status = PJ_ENOMEM;
+    }
+    PJ_END;
+
+    /* Failed! Delete transmit data. */
+    if (status != PJ_SUCCESS && tdata) {
+	pjsip_tx_data_dec_ref( tdata );
+	tdata = NULL;
+    }
+
+    /* Unlock dialog. */
+    pjsip_dlg_dec_lock(dlg);
+
+    *p_tdata = tdata;
+
+    return status;
+}
+
+
+/*
+ * Send request statefully, and update dialog'c CSeq.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_send_request( pjsip_dialog *dlg,
+					    pjsip_tx_data *tdata,
+					    int mod_data_id,
+					    void *mod_data)
+{
+    pjsip_transaction *tsx;
+    pjsip_msg *msg = tdata->msg;
+    pj_status_t status;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(dlg && tdata && tdata->msg, PJ_EINVAL);
+    PJ_ASSERT_RETURN(tdata->msg->type == PJSIP_REQUEST_MSG,
+		     PJSIP_ENOTREQUESTMSG);
+
+    PJ_LOG(5,(dlg->obj_name, "Sending %s",
+	      pjsip_tx_data_get_info(tdata)));
+
+    /* Lock and increment session */
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Update dialog's CSeq and message's CSeq if request is not
+     * ACK nor CANCEL.
+     */
+    if (msg->line.req.method.id != PJSIP_CANCEL_METHOD &&
+	msg->line.req.method.id != PJSIP_ACK_METHOD) 
+    {
+	pjsip_cseq_hdr *ch;
+	
+	ch = PJSIP_MSG_CSEQ_HDR(msg);
+	PJ_ASSERT_RETURN(ch!=NULL, PJ_EBUG);
+
+	ch->cseq = dlg->local.cseq++;
+
+	/* Force the whole message to be re-printed. */
+	pjsip_tx_data_invalidate_msg( tdata );
+    }
+
+    /* Create a new transaction if method is not ACK.
+     * The transaction user is the user agent module.
+     */
+    if (msg->line.req.method.id != PJSIP_ACK_METHOD) {
+	int tsx_count;
+
+	status = pjsip_tsx_create_uac(dlg->ua, tdata, &tsx);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+
+	/* Set transport selector */
+	status = pjsip_tsx_set_transport(tsx, &dlg->tp_sel);
+	pj_assert(status == PJ_SUCCESS);
+
+	/* Attach this dialog to the transaction, so that user agent
+	 * will dispatch events to this dialog.
+	 */
+	tsx->mod_data[dlg->ua->id] = dlg;
+
+	/* Copy optional caller's mod_data, if present */
+	if (mod_data_id >= 0 && mod_data_id < PJSIP_MAX_MODULE)
+	    tsx->mod_data[mod_data_id] = mod_data;
+
+	/* Increment transaction counter. */
+	tsx_count = ++dlg->tsx_count;
+
+	/* Send the message. */
+	status = pjsip_tsx_send_msg(tsx, tdata);
+	if (status != PJ_SUCCESS) {
+	    if (dlg->tsx_count == tsx_count)
+		pjsip_tsx_terminate(tsx, tsx->status_code);
+	    goto on_error;
+	}
+
+    } else {
+	/* Set transport selector */
+	pjsip_tx_data_set_transport(tdata, &dlg->tp_sel);
+
+	/* Send request */
+	status = pjsip_endpt_send_request_stateless(dlg->endpt, tdata, 
+						    NULL, NULL);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+
+    }
+
+    /* Unlock dialog, may destroy dialog. */
+    pjsip_dlg_dec_lock(dlg);
+
+    return PJ_SUCCESS;
+
+on_error:
+    /* Unlock dialog, may destroy dialog. */
+    pjsip_dlg_dec_lock(dlg);
+   
+    /* Whatever happen delete the message. */
+    pjsip_tx_data_dec_ref( tdata );
+
+    return status;
+}
+
+/* Add standard headers for certain types of response */
+static void dlg_beautify_response(pjsip_dialog *dlg,
+				  pj_bool_t add_headers,
+				  int st_code,
+				  pjsip_tx_data *tdata)
+{
+    pjsip_cseq_hdr *cseq;
+    int st_class;
+    const pjsip_hdr *c_hdr;
+    pjsip_hdr *hdr;
+
+    cseq = PJSIP_MSG_CSEQ_HDR(tdata->msg);
+    pj_assert(cseq != NULL);
+
+    st_class = st_code / 100;
+
+    /* Contact, Allow, Supported header. */
+    if (add_headers && pjsip_method_creates_dialog(&cseq->method)) {
+	/* Add Contact header for 1xx, 2xx, 3xx and 485 response. */
+	if (st_class==2 || st_class==3 || (st_class==1 && st_code != 100) ||
+	    st_code==485) 
+	{
+	    pj_str_t hcontact = { "Contact", 7 };
+
+	    /* Add contact header only if one is not present. */
+	    if (pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CONTACT, NULL) == 0 &&
+		pjsip_msg_find_hdr_by_name(tdata->msg, &hcontact, NULL) == 0) 
+	    {
+		hdr = pjsip_hdr_clone(tdata->pool, dlg->local.contact);
+		pjsip_msg_add_hdr(tdata->msg, hdr);
+	    }
+	}
+
+	/* Add Allow header in 2xx and 405 response. */
+	if ((st_class==2 || st_code==405) &&
+	    pjsip_msg_find_hdr(tdata->msg, PJSIP_H_ALLOW, NULL)==NULL) 
+	{
+	    c_hdr = pjsip_endpt_get_capability(dlg->endpt,
+					       PJSIP_H_ALLOW, NULL);
+	    if (c_hdr) {
+		hdr = pjsip_hdr_clone(tdata->pool, c_hdr);
+		pjsip_msg_add_hdr(tdata->msg, hdr);
+	    }
+	}
+
+	/* Add Supported header in 2xx response. */
+	if (st_class==2 && 
+	    pjsip_msg_find_hdr(tdata->msg, PJSIP_H_SUPPORTED, NULL)==NULL) 
+	{
+	    c_hdr = pjsip_endpt_get_capability(dlg->endpt,
+					       PJSIP_H_SUPPORTED, NULL);
+	    if (c_hdr) {
+		hdr = pjsip_hdr_clone(tdata->pool, c_hdr);
+		pjsip_msg_add_hdr(tdata->msg, hdr);
+	    }
+	}
+
+    }
+
+    /* Add To tag in all responses except 100 */
+    if (st_code != 100) {
+	pjsip_to_hdr *to;
+
+	to = PJSIP_MSG_TO_HDR(tdata->msg);
+	pj_assert(to != NULL);
+
+	to->tag = dlg->local.info->tag;
+
+	if (dlg->state == PJSIP_DIALOG_STATE_NULL)
+	    dlg->state = PJSIP_DIALOG_STATE_ESTABLISHED;
+    }
+}
+
+
+/*
+ * Create response.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_create_response(	pjsip_dialog *dlg,
+						pjsip_rx_data *rdata,
+						int st_code,
+						const pj_str_t *st_text,
+						pjsip_tx_data **p_tdata)
+{
+    pj_status_t status;
+    pjsip_tx_data *tdata;
+
+    /* Create generic response.
+     * This will initialize response's Via, To, From, Call-ID, CSeq
+     * and Record-Route headers from the request.
+     */
+    status = pjsip_endpt_create_response(dlg->endpt,
+					 rdata, st_code, st_text, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Lock the dialog. */
+    pjsip_dlg_inc_lock(dlg);
+
+    dlg_beautify_response(dlg, PJ_FALSE, st_code, tdata);
+
+    /* Unlock the dialog. */
+    pjsip_dlg_dec_lock(dlg);
+
+    /* Done. */
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Modify response.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_modify_response(	pjsip_dialog *dlg,
+						pjsip_tx_data *tdata,
+						int st_code,
+						const pj_str_t *st_text)
+{
+    pjsip_hdr *hdr;
+
+    PJ_ASSERT_RETURN(dlg && tdata && tdata->msg, PJ_EINVAL);
+    PJ_ASSERT_RETURN(tdata->msg->type == PJSIP_RESPONSE_MSG,
+		     PJSIP_ENOTRESPONSEMSG);
+    PJ_ASSERT_RETURN(st_code >= 100 && st_code <= 699, PJ_EINVAL);
+
+    /* Lock and increment session */
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Replace status code and reason */
+    tdata->msg->line.status.code = st_code;
+    if (st_text) {
+	pj_strdup(tdata->pool, &tdata->msg->line.status.reason, st_text);
+    } else {
+	tdata->msg->line.status.reason = *pjsip_get_status_text(st_code);
+    }
+
+    /* Remove existing Contact header (without this, when dialog sent 
+     * 180 and then 302, the Contact in 302 will not get updated).
+     */
+    hdr = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CONTACT, NULL);
+    if (hdr)
+	pj_list_erase(hdr);
+
+    /* Add tag etc. if necessary */
+    dlg_beautify_response(dlg, PJ_FALSE, st_code, tdata);
+
+
+    /* Must add reference counter, since tsx_send_msg() will decrement it */
+    pjsip_tx_data_add_ref(tdata);
+
+    /* Force to re-print message. */
+    pjsip_tx_data_invalidate_msg(tdata);
+
+    /* Unlock dialog and dec session, may destroy dialog. */
+    pjsip_dlg_dec_lock(dlg);
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Send response statefully.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_send_response( pjsip_dialog *dlg,
+					     pjsip_transaction *tsx,
+					     pjsip_tx_data *tdata)
+{
+    pj_status_t status;
+
+    /* Sanity check. */
+    PJ_ASSERT_RETURN(dlg && tsx && tdata && tdata->msg, PJ_EINVAL);
+    PJ_ASSERT_RETURN(tdata->msg->type == PJSIP_RESPONSE_MSG,
+		     PJSIP_ENOTRESPONSEMSG);
+
+    /* The transaction must belong to this dialog.  */
+    PJ_ASSERT_RETURN(tsx->mod_data[dlg->ua->id] == dlg, PJ_EINVALIDOP);
+
+    PJ_LOG(5,(dlg->obj_name, "Sending %s",
+	      pjsip_tx_data_get_info(tdata)));
+
+    /* Check that transaction method and cseq match the response. 
+     * This operation is sloooww (search CSeq header twice), that's why
+     * we only do it in debug mode.
+     */
+#if defined(PJ_DEBUG) && PJ_DEBUG!=0
+    PJ_ASSERT_RETURN( PJSIP_MSG_CSEQ_HDR(tdata->msg)->cseq == tsx->cseq &&
+		      pjsip_method_cmp(&PJSIP_MSG_CSEQ_HDR(tdata->msg)->method, 
+				       &tsx->method)==0,
+		      PJ_EINVALIDOP);
+#endif
+
+    /* Must acquire dialog first, to prevent deadlock */
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Last chance to add mandatory headers before the response is
+     * sent.
+     */
+    dlg_beautify_response(dlg, PJ_TRUE, tdata->msg->line.status.code, tdata);
+
+    /* If the dialog is locked to transport, make sure that transaction
+     * is locked to the same transport too.
+     */
+    if (dlg->tp_sel.type != tsx->tp_sel.type ||
+	dlg->tp_sel.u.ptr != tsx->tp_sel.u.ptr)
+    {
+	status = pjsip_tsx_set_transport(tsx, &dlg->tp_sel);
+	pj_assert(status == PJ_SUCCESS);
+    }
+
+    /* Ask transaction to send the response */
+    status = pjsip_tsx_send_msg(tsx, tdata);
+
+    pjsip_dlg_dec_lock(dlg);
+
+    return status;
+}
+
+
+/*
+ * Combo function to create and send response statefully.
+ */
+PJ_DEF(pj_status_t) pjsip_dlg_respond(  pjsip_dialog *dlg,
+					pjsip_rx_data *rdata,
+					int st_code,
+					const pj_str_t *st_text,
+					const pjsip_hdr *hdr_list,
+					const pjsip_msg_body *body )
+{
+    pj_status_t status;
+    pjsip_tx_data *tdata;
+
+    /* Sanity check. */
+    PJ_ASSERT_RETURN(dlg && rdata && rdata->msg_info.msg, PJ_EINVAL);
+    PJ_ASSERT_RETURN(rdata->msg_info.msg->type == PJSIP_REQUEST_MSG,
+		     PJSIP_ENOTREQUESTMSG);
+
+    /* The transaction must belong to this dialog.  */
+    PJ_ASSERT_RETURN(pjsip_rdata_get_tsx(rdata) &&
+		     pjsip_rdata_get_tsx(rdata)->mod_data[dlg->ua->id] == dlg,
+		     PJ_EINVALIDOP);
+
+    /* Create the response. */
+    status = pjsip_dlg_create_response(dlg, rdata, st_code, st_text, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Add additional header, if any */
+    if (hdr_list) {
+	const pjsip_hdr *hdr;
+
+	hdr = hdr_list->next;
+	while (hdr != hdr_list) {
+	    pjsip_msg_add_hdr(tdata->msg,
+			      pjsip_hdr_clone(tdata->pool, hdr));
+	    hdr = hdr->next;
+	}
+    }
+
+    /* Add the message body, if any. */
+    if (body) {
+	tdata->msg->body = pjsip_msg_body_clone( tdata->pool, body);
+    }
+
+    /* Send the response. */
+    return pjsip_dlg_send_response(dlg, pjsip_rdata_get_tsx(rdata), tdata);
+}
+
+
+/* This function is called by user agent upon receiving incoming response
+ * message.
+ */
+void pjsip_dlg_on_rx_request( pjsip_dialog *dlg, pjsip_rx_data *rdata )
+{
+    pj_status_t status;
+    pjsip_transaction *tsx = NULL;
+    pj_bool_t processed = PJ_FALSE;
+    unsigned i;
+
+    PJ_LOG(5,(dlg->obj_name, "Received %s",
+	      pjsip_rx_data_get_info(rdata)));
+
+    /* Lock dialog and increment session. */
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Check CSeq */
+    if (rdata->msg_info.cseq->cseq <= dlg->remote.cseq &&
+	rdata->msg_info.msg->line.req.method.id != PJSIP_ACK_METHOD &&
+	rdata->msg_info.msg->line.req.method.id != PJSIP_CANCEL_METHOD) 
+    {
+	/* Invalid CSeq.
+	 * Respond statelessly with 500 (Internal Server Error)
+	 */
+	pj_str_t warn_text;
+
+	/* Unlock dialog and dec session, may destroy dialog. */
+	pjsip_dlg_dec_lock(dlg);
+
+	pj_assert(pjsip_rdata_get_tsx(rdata) == NULL);
+	warn_text = pj_str("Invalid CSeq");
+	pjsip_endpt_respond_stateless(dlg->endpt,
+				      rdata, 500, &warn_text, NULL, NULL);
+	return;
+    }
+
+    /* Update CSeq. */
+    dlg->remote.cseq = rdata->msg_info.cseq->cseq;
+
+    /* Update To tag if necessary.
+     * This only happens if UAS sends a new request before answering
+     * our request (e.g. UAS sends NOTIFY before answering our
+     * SUBSCRIBE request).
+     */
+    if (dlg->remote.info->tag.slen == 0) {
+	pj_strdup(dlg->pool, &dlg->remote.info->tag,
+		  &rdata->msg_info.from->tag);
+    }
+
+    /* Create UAS transaction for this request. */
+    if (pjsip_rdata_get_tsx(rdata) == NULL && 
+	rdata->msg_info.msg->line.req.method.id != PJSIP_ACK_METHOD) 
+    {
+	status = pjsip_tsx_create_uas(dlg->ua, rdata, &tsx);
+	PJ_ASSERT_ON_FAIL(status==PJ_SUCCESS,{goto on_return;});
+
+	/* Put this dialog in the transaction data. */
+	tsx->mod_data[dlg->ua->id] = dlg;
+
+	/* Add transaction count. */
+	++dlg->tsx_count;
+    }
+
+    /* Report the request to dialog usages. */
+    for (i=0; i<dlg->usage_cnt; ++i) {
+
+	if (!dlg->usage[i]->on_rx_request)
+	    continue;
+
+	processed = (*dlg->usage[i]->on_rx_request)(rdata);
+
+	if (processed)
+	    break;
+    }
+
+    /* Feed the first request to the transaction. */
+    if (tsx)
+	pjsip_tsx_recv_msg(tsx, rdata);
+
+    /* If no dialog usages has claimed the processing of the transaction,
+     * and if transaction has not sent final response, respond with
+     * 500/Internal Server Error.
+     */
+    if (!processed && tsx && tsx->status_code < 200) {
+	pjsip_tx_data *tdata;
+	const pj_str_t reason = { "No session found", 16};
+
+	PJ_LOG(4,(tsx->obj_name, "%s was unhandled by "
+				 "dialog usages, sending 500 response",
+				 pjsip_rx_data_get_info(rdata)));
+
+	status = pjsip_dlg_create_response(dlg, rdata, 500, &reason, &tdata);
+	if (status == PJ_SUCCESS) {
+	    status = pjsip_dlg_send_response(dlg, tsx, tdata);
+	}
+    }
+
+on_return:
+    /* Unlock dialog and dec session, may destroy dialog. */
+    pjsip_dlg_dec_lock(dlg);
+}
+
+/* Update route-set from incoming message */
+static void dlg_update_routeset(pjsip_dialog *dlg, const pjsip_msg *msg)
+{
+    const pjsip_hdr *hdr, *end_hdr;
+
+    pj_list_init(&dlg->route_set);
+
+    end_hdr = &msg->hdr;
+    for (hdr=msg->hdr.prev; hdr!=end_hdr; hdr=hdr->prev) {
+	if (hdr->type == PJSIP_H_RECORD_ROUTE) {
+	    pjsip_route_hdr *r;
+	    r = pjsip_hdr_clone(dlg->pool, hdr);
+	    pjsip_routing_hdr_set_route(r);
+	    pj_list_push_back(&dlg->route_set, r);
+	}
+    }
+}
+
+/* This function is called by user agent upon receiving incoming response
+ * message.
+ */
+void pjsip_dlg_on_rx_response( pjsip_dialog *dlg, pjsip_rx_data *rdata )
+{
+    unsigned i;
+    pj_bool_t routeset_updated = PJ_FALSE;
+    int res_code;
+
+    PJ_LOG(5,(dlg->obj_name, "Received %s",
+	      pjsip_rx_data_get_info(rdata)));
+
+    /* Lock the dialog and inc session. */
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Check that rdata already has dialog in mod_data. */
+    pj_assert(pjsip_rdata_get_dlg(rdata) == dlg);
+
+    /* Keep the response's status code */
+    res_code = rdata->msg_info.msg->line.status.code;
+
+    /* When we receive response that establishes dialog, update To tag, 
+     * route set and dialog target.
+     *
+     * The second condition of the "if" is a workaround for forking.
+     * Originally, the dialog takes the first To tag seen and set it as
+     * the remote tag. If the tag in 2xx response is different than this
+     * tag, ACK will be sent with wrong To tag and incoming request with
+     * this tag will be rejected with 481.
+     *
+     * The workaround for this is to take the To tag received in the
+     * 2xx response and set it as remote tag.
+     */
+    if ((dlg->state == PJSIP_DIALOG_STATE_NULL && 
+	 pjsip_method_creates_dialog(&rdata->msg_info.cseq->method) &&
+	 (res_code > 100 && res_code < 300) &&
+	 rdata->msg_info.to->tag.slen) 
+	 ||
+	(dlg->role==PJSIP_ROLE_UAC &&
+	 !dlg->uac_has_2xx &&
+	 res_code/100 == 2 &&
+	 pjsip_method_creates_dialog(&rdata->msg_info.cseq->method) &&
+	 pj_strcmp(&dlg->remote.info->tag, &rdata->msg_info.to->tag)))
+    {
+	pjsip_contact_hdr *contact;
+
+	/* Update To tag. */
+	pj_strdup(dlg->pool, &dlg->remote.info->tag, &rdata->msg_info.to->tag);
+	/* No need to update remote's tag_hval since its never used. */
+
+
+	/* RFC 3271 Section 12.1.2:
+	 * The route set MUST be set to the list of URIs in the Record-Route
+	 * header field from the response, taken in reverse order and 
+	 * preserving all URI parameters. If no Record-Route header field 
+	 * is present in the response, the route set MUST be set to the 
+	 * empty set. This route set, even if empty, overrides any pre-existing
+	 * route set for future requests in this dialog.
+	 */
+	dlg_update_routeset(dlg, rdata->msg_info.msg);
+	routeset_updated = PJ_TRUE;
+
+	/* The remote target MUST be set to the URI from the Contact header 
+	 * field of the response.
+	 */
+	contact = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 
+				     NULL);
+	if (contact) {
+	    dlg->remote.contact = pjsip_hdr_clone(dlg->pool, contact);
+	    dlg->target = dlg->remote.contact->uri;
+	}
+
+	dlg->state = PJSIP_DIALOG_STATE_ESTABLISHED;
+
+	/* Prevent dialog from being updated just in case more 2xx
+	 * gets through this dialog (it shouldn't happen).
+	 */
+	if (dlg->role==PJSIP_ROLE_UAC && !dlg->uac_has_2xx && 
+	    res_code/100==2) 
+	{
+	    dlg->uac_has_2xx = PJ_TRUE;
+	}
+    }
+
+    /* Update remote target (again) when receiving 2xx response messages
+     * that's defined as target refresh. 
+     *
+     * Also upon receiving 2xx response, recheck again the route set.
+     * This is for compatibility with RFC 2543, as described in Section
+     * 13.2.2.4 of RFC 3261:
+
+	If the dialog identifier in the 2xx response matches the dialog
+	identifier of an existing dialog, the dialog MUST be transitioned to
+	the "confirmed" state, and the route set for the dialog MUST be
+	recomputed based on the 2xx response using the procedures of Section
+	12.2.1.2. 
+
+	Note that the only piece of state that is recomputed is the route
+	set.  Other pieces of state such as the highest sequence numbers
+	(remote and local) sent within the dialog are not recomputed.  The
+	route set only is recomputed for backwards compatibility.  RFC
+	2543 did not mandate mirroring of the Record-Route header field in
+	a 1xx, only 2xx.
+     */
+    if (pjsip_method_creates_dialog(&rdata->msg_info.cseq->method) &&
+	res_code/100 == 2)
+    {
+	pjsip_contact_hdr *contact;
+
+	contact = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 
+				     NULL);
+	if (contact) {
+	    dlg->remote.contact = pjsip_hdr_clone(dlg->pool, contact);
+	    dlg->target = dlg->remote.contact->uri;
+	}
+
+	if (!routeset_updated) {
+	    dlg_update_routeset(dlg, rdata->msg_info.msg);
+	    routeset_updated = PJ_TRUE;
+	}
+    }
+
+
+    /* Pass to dialog usages. */
+    for (i=0; i<dlg->usage_cnt; ++i) {
+	pj_bool_t processed;
+
+	if (!dlg->usage[i]->on_rx_response)
+	    continue;
+
+	processed = (*dlg->usage[i]->on_rx_response)(rdata);
+
+	if (processed)
+	    break;
+    }
+
+    /* Unhandled response does not necessarily mean error because
+       dialog usages may choose to process the transaction state instead.
+    if (i==dlg->usage_cnt) {
+	PJ_LOG(4,(dlg->obj_name, "%s was not claimed by any dialog usages",
+		  pjsip_rx_data_get_info(rdata)));
+    }
+    */
+
+    /* Unlock dialog and dec session, may destroy dialog. */
+    pjsip_dlg_dec_lock(dlg);
+}
+
+/* This function is called by user agent upon receiving transaction
+ * state notification.
+ */
+void pjsip_dlg_on_tsx_state( pjsip_dialog *dlg,
+			     pjsip_transaction *tsx,
+			     pjsip_event *e )
+{
+    unsigned i;
+
+    PJ_LOG(5,(dlg->obj_name, "Transaction %s state changed to %s",
+	      tsx->obj_name, pjsip_tsx_state_str(tsx->state)));
+
+    /* Lock the dialog and increment session. */
+    pjsip_dlg_inc_lock(dlg);
+
+    /* Pass to dialog usages. */
+    for (i=0; i<dlg->usage_cnt; ++i) {
+
+	if (!dlg->usage[i]->on_tsx_state)
+	    continue;
+
+	(*dlg->usage[i]->on_tsx_state)(tsx, e);
+    }
+
+
+    if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+	--dlg->tsx_count;
+	tsx->mod_data[dlg->ua->id] = NULL;
+    }
+
+    /* Unlock dialog and dec session, may destroy dialog. */
+    pjsip_dlg_dec_lock(dlg);
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_endpoint.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_endpoint.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_endpoint.c	(revision 1163)
@@ -0,0 +1,1155 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_endpoint.h>
+#include <pjsip/sip_transaction.h>
+#include <pjsip/sip_private.h>
+#include <pjsip/sip_event.h>
+#include <pjsip/sip_resolve.h>
+#include <pjsip/sip_module.h>
+#include <pjsip/sip_util.h>
+#include <pjsip/sip_errno.h>
+#include <pj/except.h>
+#include <pj/log.h>
+#include <pj/string.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/hash.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+#include <pj/lock.h>
+
+#define PJSIP_EX_NO_MEMORY  PJ_NO_MEMORY_EXCEPTION
+#define THIS_FILE	    "sip_endpoint.c"
+
+#define MAX_METHODS   32
+
+/**
+ * The SIP endpoint.
+ */
+struct pjsip_endpoint
+{
+    /** Pool to allocate memory for the endpoint. */
+    pj_pool_t		*pool;
+
+    /** Mutex for the pool, hash table, and event list/queue. */
+    pj_mutex_t		*mutex;
+
+    /** Pool factory. */
+    pj_pool_factory	*pf;
+
+    /** Name. */
+    pj_str_t		 name;
+
+    /** Timer heap. */
+    pj_timer_heap_t	*timer_heap;
+
+    /** Transport manager. */
+    pjsip_tpmgr		*transport_mgr;
+
+    /** Ioqueue. */
+    pj_ioqueue_t	*ioqueue;
+
+    /** Last ioqueue err */
+    pj_status_t		 ioq_last_err;
+
+    /** DNS Resolver. */
+    pjsip_resolver_t	*resolver;
+
+    /** Modules lock. */
+    pj_rwmutex_t	*mod_mutex;
+
+    /** Modules. */
+    pjsip_module        *modules[PJSIP_MAX_MODULE];
+
+    /** Module list, sorted by priority. */
+    pjsip_module	 module_list;
+
+    /** Capability header list. */
+    pjsip_hdr		 cap_hdr;
+
+    /** Additional request headers. */
+    pjsip_hdr		 req_hdr;
+};
+
+
+#if defined(PJSIP_SAFE_MODULE) && PJSIP_SAFE_MODULE!=0
+#   define LOCK_MODULE_ACCESS(ept)	pj_rwmutex_lock_read(ept->mod_mutex)
+#   define UNLOCK_MODULE_ACCESS(ept)	pj_rwmutex_unlock_read(ept->mod_mutex)
+#else
+#   define LOCK_MODULE_ACCESS(endpt)
+#   define UNLOCK_MODULE_ACCESS(endpt)
+#endif
+
+
+
+/*
+ * Prototypes.
+ */
+static void endpt_on_rx_msg( pjsip_endpoint*, 
+			     pj_status_t, pjsip_rx_data*);
+static pj_status_t endpt_on_tx_msg( pjsip_endpoint *endpt,
+				    pjsip_tx_data *tdata );
+
+/* Defined in sip_parser.c */
+void init_sip_parser(void);
+void deinit_sip_parser(void);
+
+/* Defined in sip_tel_uri.c */
+pj_status_t pjsip_tel_uri_subsys_init(void);
+
+
+/* Specifies whether error subsystem has been registered to pjlib. */
+static int error_subsys_initialized;
+
+/**
+ * Defined in sip_errno.c
+ *
+ * Get error message for the specified error code. This can only get
+ * PJSIP specific error message. To get all types of error message,
+ * use pj_strerror() instead.
+ *
+ * @param status    The error code.
+ * @param buffer    The buffer where to put the error message.
+ * @param bufsize   Size of the buffer.
+ *
+ * @return	    The error message as NULL terminated string,
+ *                  wrapped with pj_str_t.
+ */
+PJ_DECL(pj_str_t) pjsip_strerror( pj_status_t status, char *buffer,
+				  pj_size_t bufsize);
+
+
+/*
+ * This is the global handler for memory allocation failure, for pools that
+ * are created by the endpoint (by default, all pools ARE allocated by 
+ * endpoint). The error is handled by throwing exception, and hopefully,
+ * the exception will be handled by the application (or this library).
+ */
+static void pool_callback( pj_pool_t *pool, pj_size_t size )
+{
+    PJ_UNUSED_ARG(pool);
+    PJ_UNUSED_ARG(size);
+
+    PJ_THROW(PJSIP_EX_NO_MEMORY);
+}
+
+
+/* Compare module name, used for searching module based on name. */
+static int cmp_mod_name(void *name, const void *mod)
+{
+    return pj_stricmp(name, &((pjsip_module*)mod)->name);
+}
+
+/*
+ * Register new module to the endpoint.
+ * The endpoint will then call the load and start function in the module to 
+ * properly initialize the module, and assign a unique module ID for the 
+ * module.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_register_module( pjsip_endpoint *endpt,
+						 pjsip_module *mod )
+{
+    pj_status_t status = PJ_SUCCESS;
+    pjsip_module *m;
+    int i;
+
+    pj_rwmutex_lock_write(endpt->mod_mutex);
+
+    /* Make sure that this module has not been registered. */
+    PJ_ASSERT_ON_FAIL(	pj_list_find_node(&endpt->module_list, mod) == NULL,
+			{status = PJ_EEXISTS; goto on_return;});
+
+    /* Make sure that no module with the same name has been registered. */
+    PJ_ASSERT_ON_FAIL(	pj_list_search(&endpt->module_list, &mod->name, 
+				       &cmp_mod_name)==NULL,
+			{status = PJ_EEXISTS; goto on_return; });
+
+    /* Find unused ID for this module. */
+    for (i=0; i<PJ_ARRAY_SIZE(endpt->modules); ++i) {
+	if (endpt->modules[i] == NULL)
+	    break;
+    }
+    if (i == PJ_ARRAY_SIZE(endpt->modules)) {
+	pj_assert(!"Too many modules registered!");
+	status = PJ_ETOOMANY;
+	goto on_return;
+    }
+
+    /* Assign the ID. */
+    mod->id = i;
+
+    /* Try to load the module. */
+    if (mod->load) {
+	status = (*mod->load)(endpt);
+	if (status != PJ_SUCCESS)
+	    goto on_return;
+    }
+
+    /* Try to start the module. */
+    if (mod->start) {
+	status = (*mod->start)();
+	if (status != PJ_SUCCESS)
+	    goto on_return;
+    }
+
+    /* Save the module. */
+    endpt->modules[i] = mod;
+
+    /* Put in the module list, sorted by priority. */
+    m = endpt->module_list.next;
+    while (m != &endpt->module_list) {
+	if (m->priority > mod->priority)
+	    break;
+	m = m->next;
+    }
+    pj_list_insert_before(m, mod);
+
+    /* Done. */
+
+    PJ_LOG(4,(THIS_FILE, "Module \"%.*s\" registered", 
+	      (int)mod->name.slen, mod->name.ptr));
+
+on_return:
+    pj_rwmutex_unlock_write(endpt->mod_mutex);
+    return status;
+}
+
+/*
+ * Unregister a module from the endpoint.
+ * The endpoint will then call the stop and unload function in the module to 
+ * properly shutdown the module.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_unregister_module( pjsip_endpoint *endpt,
+						   pjsip_module *mod )
+{
+    pj_status_t status;
+
+    pj_rwmutex_lock_write(endpt->mod_mutex);
+
+    /* Make sure the module exists in the list. */
+    PJ_ASSERT_ON_FAIL(	pj_list_find_node(&endpt->module_list, mod) == mod,
+			{status = PJ_ENOTFOUND;goto on_return;} );
+
+    /* Make sure the module exists in the array. */
+    PJ_ASSERT_ON_FAIL(	mod->id>=0 && mod->id<PJ_ARRAY_SIZE(endpt->modules) &&
+			endpt->modules[mod->id] == mod,
+			{status = PJ_ENOTFOUND; goto on_return;});
+
+    /* Try to stop the module. */
+    if (mod->stop) {
+	status = (*mod->stop)();
+	if (status != PJ_SUCCESS) goto on_return;
+    }
+
+    /* Try to unload the module. */
+    if (mod->unload) {
+	status = (*mod->unload)();
+	if (status != PJ_SUCCESS) goto on_return;
+    }
+
+    /* Module MUST NOT set module ID to -1. */
+    pj_assert(mod->id >= 0);
+
+    /* Remove module from array. */
+    endpt->modules[mod->id] = NULL;
+
+    /* Remove module from list. */
+    pj_list_erase(mod);
+
+    /* Set module Id to -1. */
+    mod->id = -1;
+
+    /* Done. */
+    status = PJ_SUCCESS;
+
+    PJ_LOG(4,(THIS_FILE, "Module \"%.*s\" unregistered", 
+	      (int)mod->name.slen, mod->name.ptr));
+
+on_return:
+    pj_rwmutex_unlock_write(endpt->mod_mutex);
+
+    if (status != PJ_SUCCESS) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+
+	pj_strerror(status, errmsg, sizeof(errmsg));
+	PJ_LOG(3,(THIS_FILE, "Module \"%.*s\" can not be unregistered: %s",
+		  (int)mod->name.slen, mod->name.ptr, errmsg));
+    }
+
+    return status;
+}
+
+
+/*
+ * Get the value of the specified capability header field.
+ */
+PJ_DEF(const pjsip_hdr*) pjsip_endpt_get_capability( pjsip_endpoint *endpt,
+						     int htype,
+						     const pj_str_t *hname)
+{
+    pjsip_hdr *hdr = endpt->cap_hdr.next;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(endpt != NULL, NULL);
+    PJ_ASSERT_RETURN(htype != PJSIP_H_OTHER || hname, NULL);
+
+    if (htype != PJSIP_H_OTHER) {
+	while (hdr != &endpt->cap_hdr) {
+	    if (hdr->type == htype)
+		return hdr;
+	    hdr = hdr->next;
+	}
+    }
+    return NULL;
+}
+
+
+/*
+ * Check if the specified capability is supported.
+ */
+PJ_DEF(pj_bool_t) pjsip_endpt_has_capability( pjsip_endpoint *endpt,
+					      int htype,
+					      const pj_str_t *hname,
+					      const pj_str_t *token)
+{
+    const pjsip_generic_array_hdr *hdr;
+    unsigned i;
+
+    hdr = (const pjsip_generic_array_hdr*) 
+	   pjsip_endpt_get_capability(endpt, htype, hname);
+    if (!hdr)
+	return PJ_FALSE;
+
+    PJ_ASSERT_RETURN(token != NULL, PJ_FALSE);
+
+    for (i=0; i<hdr->count; ++i) {
+	if (!pj_stricmp(&hdr->values[i], token))
+	    return PJ_TRUE;
+    }
+
+    return PJ_FALSE;
+}
+
+/*
+ * Add or register new capabilities as indicated by the tags to the
+ * appropriate header fields in the endpoint.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_add_capability( pjsip_endpoint *endpt,
+						pjsip_module *mod,
+						int htype,
+						const pj_str_t *hname,
+						unsigned count,
+						const pj_str_t tags[])
+{
+    pjsip_generic_array_hdr *hdr;
+    unsigned i;
+
+    PJ_UNUSED_ARG(mod);
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(endpt!=NULL && count>0 && tags, PJ_EINVAL);
+    PJ_ASSERT_RETURN(htype==PJSIP_H_ACCEPT || 
+		     htype==PJSIP_H_ALLOW ||
+		     htype==PJSIP_H_SUPPORTED,
+		     PJ_EINVAL);
+
+    /* Find the header. */
+    hdr = (pjsip_generic_array_hdr*) pjsip_endpt_get_capability(endpt, 
+								htype, hname);
+
+    /* Create the header when it's not present */
+    if (hdr == NULL) {
+	switch (htype) {
+	case PJSIP_H_ACCEPT:
+	    hdr = pjsip_accept_hdr_create(endpt->pool);
+	    break;
+	case PJSIP_H_ALLOW:
+	    hdr = pjsip_allow_hdr_create(endpt->pool);
+	    break;
+	case PJSIP_H_SUPPORTED:
+	    hdr = pjsip_supported_hdr_create(endpt->pool);
+	    break;
+	default:
+	    return PJ_EINVAL;
+	}
+
+	if (hdr) {
+	    pj_list_push_back(&endpt->cap_hdr, hdr);
+	}
+    }
+
+    /* Add the tags to the header. */
+    for (i=0; i<count; ++i) {
+	pj_strdup(endpt->pool, &hdr->values[hdr->count], &tags[i]);
+	++hdr->count;
+    }
+
+    /* Done. */
+    return PJ_SUCCESS;
+}
+
+/*
+ * Get additional headers to be put in outgoing request message.
+ */
+PJ_DEF(const pjsip_hdr*) pjsip_endpt_get_request_headers(pjsip_endpoint *endpt)
+{
+    return &endpt->req_hdr;
+}
+
+
+/*
+ * Initialize endpoint.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_create(pj_pool_factory *pf,
+				       const char *name,
+                                       pjsip_endpoint **p_endpt)
+{
+    pj_status_t status;
+    pj_pool_t *pool;
+    pjsip_endpoint *endpt;
+    pjsip_max_fwd_hdr *mf_hdr;
+    pj_lock_t *lock = NULL;
+
+
+    if (!error_subsys_initialized) {
+	pj_register_strerror(PJSIP_ERRNO_START, PJ_ERRNO_SPACE_SIZE,
+			     &pjsip_strerror);
+	error_subsys_initialized = 1;
+    }
+
+    PJ_LOG(5, (THIS_FILE, "Creating endpoint instance..."));
+
+    *p_endpt = NULL;
+
+    /* Create pool */
+    pool = pj_pool_create(pf, "pept%p", 
+			  PJSIP_POOL_LEN_ENDPT, PJSIP_POOL_INC_ENDPT,
+			  &pool_callback);
+    if (!pool)
+	return PJ_ENOMEM;
+
+    /* Create endpoint. */
+    endpt = pj_pool_zalloc(pool, sizeof(*endpt));
+    endpt->pool = pool;
+    endpt->pf = pf;
+
+    /* Init modules list. */
+    pj_list_init(&endpt->module_list);
+
+    /* Create R/W mutex for module manipulation. */
+    status = pj_rwmutex_create(endpt->pool, "ept%p", &endpt->mod_mutex);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Init parser. */
+    init_sip_parser();
+
+    /* Init tel: uri */
+    pjsip_tel_uri_subsys_init();
+
+    /* Get name. */
+    if (name != NULL) {
+	pj_str_t temp;
+	pj_strdup_with_null(endpt->pool, &endpt->name, pj_cstr(&temp, name));
+    } else {
+	pj_strdup_with_null(endpt->pool, &endpt->name, pj_gethostname());
+    }
+
+    /* Create mutex for the events, etc. */
+    status = pj_mutex_create_recursive( endpt->pool, "ept%p", &endpt->mutex );
+    if (status != PJ_SUCCESS) {
+	goto on_error;
+    }
+
+    /* Create timer heap to manage all timers within this endpoint. */
+    status = pj_timer_heap_create( endpt->pool, PJSIP_MAX_TIMER_COUNT, 
+                                   &endpt->timer_heap);
+    if (status != PJ_SUCCESS) {
+	goto on_error;
+    }
+
+    /* Set recursive lock for the timer heap. */
+    status = pj_lock_create_recursive_mutex( endpt->pool, "edpt%p", &lock);
+    if (status != PJ_SUCCESS) {
+	goto on_error;
+    }
+    pj_timer_heap_set_lock(endpt->timer_heap, lock, PJ_TRUE);
+
+    /* Set maximum timed out entries to process in a single poll. */
+    pj_timer_heap_set_max_timed_out_per_poll(endpt->timer_heap, 
+					     PJSIP_MAX_TIMED_OUT_ENTRIES);
+
+    /* Create ioqueue. */
+    status = pj_ioqueue_create( endpt->pool, PJSIP_MAX_TRANSPORTS, &endpt->ioqueue);
+    if (status != PJ_SUCCESS) {
+	goto on_error;
+    }
+
+    /* Create transport manager. */
+    status = pjsip_tpmgr_create( endpt->pool, endpt,
+			         &endpt_on_rx_msg,
+				 &endpt_on_tx_msg,
+				 &endpt->transport_mgr);
+    if (status != PJ_SUCCESS) {
+	goto on_error;
+    }
+
+    /* Create asynchronous DNS resolver. */
+    status = pjsip_resolver_create(endpt->pool, &endpt->resolver);
+    if (status != PJ_SUCCESS) {
+	PJ_LOG(4, (THIS_FILE, "Error creating resolver instance"));
+	goto on_error;
+    }
+
+    /* Initialize request headers. */
+    pj_list_init(&endpt->req_hdr);
+
+    /* Add "Max-Forwards" for request header. */
+    mf_hdr = pjsip_max_fwd_hdr_create(endpt->pool,
+				      PJSIP_MAX_FORWARDS_VALUE);
+    pj_list_insert_before( &endpt->req_hdr, mf_hdr);
+
+    /* Initialize capability header list. */
+    pj_list_init(&endpt->cap_hdr);
+
+
+    /* Done. */
+    *p_endpt = endpt;
+    return status;
+
+on_error:
+    if (endpt->transport_mgr) {
+	pjsip_tpmgr_destroy(endpt->transport_mgr);
+	endpt->transport_mgr = NULL;
+    }
+    if (endpt->ioqueue) {
+	pj_ioqueue_destroy(endpt->ioqueue);
+	endpt->ioqueue = NULL;
+    }
+    if (endpt->timer_heap) {
+	pj_timer_heap_destroy(endpt->timer_heap);
+	endpt->timer_heap = NULL;
+    }
+    if (endpt->mutex) {
+	pj_mutex_destroy(endpt->mutex);
+	endpt->mutex = NULL;
+    }
+    if (endpt->mod_mutex) {
+	pj_rwmutex_destroy(endpt->mod_mutex);
+	endpt->mod_mutex = NULL;
+    }
+    pj_pool_release( endpt->pool );
+
+    PJ_LOG(4, (THIS_FILE, "Error creating endpoint"));
+    return status;
+}
+
+/*
+ * Destroy endpoint.
+ */
+PJ_DEF(void) pjsip_endpt_destroy(pjsip_endpoint *endpt)
+{
+    pjsip_module *mod;
+
+    PJ_LOG(5, (THIS_FILE, "Destroying endpoing instance.."));
+
+    /* Unregister modules. */
+    mod = endpt->module_list.prev;
+    while (mod != &endpt->module_list) {
+	pjsip_module *prev = mod->prev;
+	pjsip_endpt_unregister_module(endpt, mod);
+	mod = prev;
+    }
+
+    /* Shutdown and destroy all transports. */
+    pjsip_tpmgr_destroy(endpt->transport_mgr);
+
+    /* Destroy ioqueue */
+    pj_ioqueue_destroy(endpt->ioqueue);
+
+    /* Destroy timer heap */
+    pj_timer_heap_destroy(endpt->timer_heap);
+
+    /* Delete endpoint mutex. */
+    pj_mutex_destroy(endpt->mutex);
+
+    /* Deinit parser */
+    deinit_sip_parser();
+
+    /* Delete module's mutex */
+    pj_rwmutex_destroy(endpt->mod_mutex);
+
+    /* Finally destroy pool. */
+    pj_pool_release(endpt->pool);
+
+    PJ_LOG(4, (THIS_FILE, "Endpoint %p destroyed", endpt));
+}
+
+/*
+ * Get endpoint name.
+ */
+PJ_DEF(const pj_str_t*) pjsip_endpt_name(const pjsip_endpoint *endpt)
+{
+    return &endpt->name;
+}
+
+
+/*
+ * Create new pool.
+ */
+PJ_DEF(pj_pool_t*) pjsip_endpt_create_pool( pjsip_endpoint *endpt,
+					       const char *pool_name,
+					       pj_size_t initial,
+					       pj_size_t increment )
+{
+    pj_pool_t *pool;
+
+    /* Lock endpoint mutex. */
+    /* No need to lock mutex. Factory is thread safe.
+    pj_mutex_lock(endpt->mutex);
+     */
+
+    /* Create pool */
+    pool = pj_pool_create( endpt->pf, pool_name,
+			   initial, increment, &pool_callback);
+
+    /* Unlock mutex. */
+    /* No need to lock mutex. Factory is thread safe.
+    pj_mutex_unlock(endpt->mutex);
+     */
+
+    if (!pool) {
+	PJ_LOG(4, (THIS_FILE, "Unable to create pool %s!", pool_name));
+    }
+
+    return pool;
+}
+
+/*
+ * Return back pool to endpoint's pool manager to be either destroyed or
+ * recycled.
+ */
+PJ_DEF(void) pjsip_endpt_release_pool( pjsip_endpoint *endpt, pj_pool_t *pool )
+{
+    PJ_LOG(6, (THIS_FILE, "Releasing pool %s", pj_pool_getobjname(pool)));
+
+    /* Don't need to acquire mutex since pool factory is thread safe
+       pj_mutex_lock(endpt->mutex);
+     */
+    pj_pool_release( pool );
+
+    PJ_UNUSED_ARG(endpt);
+    /*
+    pj_mutex_unlock(endpt->mutex);
+     */
+}
+
+
+PJ_DEF(pj_status_t) pjsip_endpt_handle_events2(pjsip_endpoint *endpt,
+					       const pj_time_val *max_timeout,
+					       unsigned *p_count)
+{
+    /* timeout is 'out' var. This just to make compiler happy. */
+    pj_time_val timeout = { 0, 0};
+    unsigned count = 0, net_event_count = 0;
+    int c;
+
+    PJ_LOG(6, (THIS_FILE, "pjsip_endpt_handle_events()"));
+
+    /* Poll the timer. The timer heap has its own mutex for better 
+     * granularity, so we don't need to lock end endpoint. 
+     */
+    timeout.sec = timeout.msec = 0;
+    c = pj_timer_heap_poll( endpt->timer_heap, &timeout );
+    if (c > 0)
+	count += c;
+
+    /* timer_heap_poll should never ever returns negative value, or otherwise
+     * ioqueue_poll() will block forever!
+     */
+    pj_assert(timeout.sec >= 0 && timeout.msec >= 0);
+    if (timeout.msec >= 1000) timeout.msec = 999;
+
+    /* If caller specifies maximum time to wait, then compare the value with
+     * the timeout to wait from timer, and use the minimum value.
+     */
+    if (max_timeout && PJ_TIME_VAL_GT(timeout, *max_timeout)) {
+	timeout = *max_timeout;
+    }
+
+    /* Poll ioqueue. 
+     * Repeat polling the ioqueue while we have immediate events, because
+     * timer heap may process more than one events, so if we only process
+     * one network events at a time (such as when IOCP backend is used),
+     * the ioqueue may have trouble keeping up with the request rate.
+     *
+     * For example, for each send() request, one network event will be
+     *   reported by ioqueue for the send() completion. If we don't poll
+     *   the ioqueue often enough, the send() completion will not be
+     *   reported in timely manner.
+     */
+    do {
+	c = pj_ioqueue_poll( endpt->ioqueue, &timeout);
+	if (c < 0) {
+	    pj_thread_sleep(PJ_TIME_VAL_MSEC(timeout));
+	    if (p_count)
+		*p_count = count;
+	    return pj_get_netos_error();
+	} else if (c == 0) {
+	    break;
+	} else {
+	    net_event_count += c;
+	    timeout.sec = timeout.msec = 0;
+	}
+    } while (c > 0 && net_event_count < PJSIP_MAX_NET_EVENTS);
+
+    count += net_event_count;
+    if (p_count)
+	*p_count = count;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Handle events.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_handle_events(pjsip_endpoint *endpt,
+					      const pj_time_val *max_timeout)
+{
+    return pjsip_endpt_handle_events2(endpt, max_timeout, NULL);
+}
+
+/*
+ * Schedule timer.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_schedule_timer( pjsip_endpoint *endpt,
+						pj_timer_entry *entry,
+						const pj_time_val *delay )
+{
+    PJ_LOG(6, (THIS_FILE, "pjsip_endpt_schedule_timer(entry=%p, delay=%u.%u)",
+			 entry, delay->sec, delay->msec));
+    return pj_timer_heap_schedule( endpt->timer_heap, entry, delay );
+}
+
+/*
+ * Cancel the previously registered timer.
+ */
+PJ_DEF(void) pjsip_endpt_cancel_timer( pjsip_endpoint *endpt, 
+				       pj_timer_entry *entry )
+{
+    PJ_LOG(6, (THIS_FILE, "pjsip_endpt_cancel_timer(entry=%p)", entry));
+    pj_timer_heap_cancel( endpt->timer_heap, entry );
+}
+
+/*
+ * Get the timer heap instance of the SIP endpoint.
+ */
+PJ_DEF(pj_timer_heap_t*) pjsip_endpt_get_timer_heap(pjsip_endpoint *endpt)
+{
+    return endpt->timer_heap;
+}
+
+/*
+ * This is the callback that is called by the transport manager when it 
+ * receives a message from the network.
+ */
+static void endpt_on_rx_msg( pjsip_endpoint *endpt,
+				      pj_status_t status,
+				      pjsip_rx_data *rdata )
+{
+    pjsip_msg *msg = rdata->msg_info.msg;
+
+    if (status != PJ_SUCCESS) {
+	char info[30];
+	char errmsg[PJ_ERR_MSG_SIZE];
+
+	info[0] = '\0';
+
+	if (status == PJSIP_EMISSINGHDR) {
+	    pj_str_t p;
+
+	    p.ptr = info; p.slen = 0;
+
+	    if (rdata->msg_info.cid == NULL || rdata->msg_info.cid->id.slen)
+		pj_strcpy2(&p, "Call-ID");
+	    if (rdata->msg_info.from == NULL)
+		pj_strcpy2(&p, " From");
+	    if (rdata->msg_info.to == NULL)
+		pj_strcpy2(&p, " To");
+	    if (rdata->msg_info.via == NULL)
+		pj_strcpy2(&p, " Via");
+	    if (rdata->msg_info.cseq == NULL) 
+		pj_strcpy2(&p, " CSeq");
+
+	    p.ptr[p.slen] = '\0';
+	}
+
+	pj_strerror(status, errmsg, sizeof(errmsg));
+
+	PJ_LOG(1, (THIS_FILE, 
+		  "Error processing packet from %s:%d: %s %s [code %d]:\n"
+		  "%.*s\n"
+		  "-- end of packet.",
+		  rdata->pkt_info.src_name, 
+		  rdata->pkt_info.src_port,
+		  errmsg,
+		  info,
+		  status,
+		  (int)rdata->msg_info.len,	
+		  rdata->msg_info.msg_buf));
+	return;
+    }
+
+    PJ_LOG(5, (THIS_FILE, "Processing incoming message: %s", 
+	       pjsip_rx_data_get_info(rdata)));
+
+    /* For response, check that the value in Via sent-by match the transport.
+     * If not matched, silently drop the response.
+     * Ref: RFC3261 Section 18.1.2 Receiving Response
+     */
+    if (msg->type == PJSIP_RESPONSE_MSG) {
+	const pj_str_t *local_addr;
+	int port = rdata->msg_info.via->sent_by.port;
+	pj_bool_t mismatch = PJ_FALSE;
+	if (port == 0) {
+	    int type;
+	    type = rdata->tp_info.transport->key.type;
+	    port = pjsip_transport_get_default_port_for_type(type);
+	}
+	local_addr = &rdata->tp_info.transport->local_name.host;
+
+	if (pj_strcmp(&rdata->msg_info.via->sent_by.host, local_addr) != 0) {
+
+	    /* The RFC says that we should drop response when sent-by
+	     * address mismatch. But it could happen (e.g. with SER) when
+	     * endpoint with private IP is sending request to public
+	     * server.
+
+	    mismatch = PJ_TRUE;
+
+	     */
+
+	} else if (port != rdata->tp_info.transport->local_name.port) {
+	    /* Port or address mismatch, we should discard response */
+	    /* But we saw one implementation (we don't want to name it to 
+	     * protect the innocence) which put wrong sent-by port although
+	     * the "rport" parameter is correct.
+	     * So we discard the response only if the port doesn't match
+	     * both the port in sent-by and rport. We try to be lenient here!
+	     */
+	    if (rdata->msg_info.via->rport_param != 
+		rdata->tp_info.transport->local_name.port)
+		mismatch = PJ_TRUE;
+	    else {
+		PJ_LOG(4,(THIS_FILE, "Message %s from %s has mismatch port in "
+				     "sent-by but the rport parameter is "
+				     "correct",
+				     pjsip_rx_data_get_info(rdata), 
+				     rdata->pkt_info.src_name));
+	    }
+	}
+
+	if (mismatch) {
+	    PJ_TODO(ENDPT_REPORT_WHEN_DROPPING_MESSAGE);
+	    PJ_LOG(4,(THIS_FILE, "Dropping response %s from %s:%d because "
+				 "sent-by is mismatch", 
+				 pjsip_rx_data_get_info(rdata),
+				 rdata->pkt_info.src_name, 
+				 rdata->pkt_info.src_port));
+	    return;
+	}
+    }
+
+
+    /* Distribute to modules, starting from modules with highest priority */
+    LOCK_MODULE_ACCESS(endpt);
+
+    if (msg->type == PJSIP_REQUEST_MSG) {
+	pjsip_module *mod;
+	pj_bool_t handled = PJ_FALSE;
+
+	mod = endpt->module_list.next;
+	while (mod != &endpt->module_list) {
+	    if (mod->on_rx_request)
+		handled = (*mod->on_rx_request)(rdata);
+	    if (handled)
+		break;
+	    mod = mod->next;
+	}
+
+	/* No module is able to handle the request. */
+	if (!handled) {
+	    PJ_TODO(ENDPT_RESPOND_UNHANDLED_REQUEST);
+	    PJ_LOG(4,(THIS_FILE, "Message %s from %s:%d was dropped/unhandled by"
+				 " any modules",
+				 pjsip_rx_data_get_info(rdata),
+				 rdata->pkt_info.src_name,
+				 rdata->pkt_info.src_port));
+	}
+
+    } else {
+	pjsip_module *mod;
+	pj_bool_t handled = PJ_FALSE;
+
+	mod = endpt->module_list.next;
+	while (mod != &endpt->module_list) {
+	    if (mod->on_rx_response)
+		handled = (*mod->on_rx_response)(rdata);
+	    if (handled)
+		break;
+	    mod = mod->next;
+	}
+
+	if (!handled) {
+	    PJ_LOG(4,(THIS_FILE, "Message %s from %s:%d was dropped/unhandled"
+				 " by any modules",
+				 pjsip_rx_data_get_info(rdata),
+				 rdata->pkt_info.src_name,
+				 rdata->pkt_info.src_port));
+	}
+    }
+
+    UNLOCK_MODULE_ACCESS(endpt);
+
+    /* Must clear mod_data before returning rdata to transport, since
+     * rdata may be reused.
+     */
+    pj_bzero(&rdata->endpt_info, sizeof(rdata->endpt_info));
+}
+
+/*
+ * This callback is called by transport manager before message is sent.
+ * Modules may inspect the message before it's actually sent.
+ */
+static pj_status_t endpt_on_tx_msg( pjsip_endpoint *endpt,
+				    pjsip_tx_data *tdata )
+{
+    pj_status_t status = PJ_SUCCESS;
+    pjsip_module *mod;
+
+    /* Distribute to modules, starting from modules with LOWEST priority */
+    LOCK_MODULE_ACCESS(endpt);
+
+    mod = endpt->module_list.prev;
+    if (tdata->msg->type == PJSIP_REQUEST_MSG) {
+	while (mod != &endpt->module_list) {
+	    if (mod->on_tx_request)
+		status = (*mod->on_tx_request)(tdata);
+	    if (status != PJ_SUCCESS)
+		break;
+	    mod = mod->prev;
+	}
+
+    } else {
+	while (mod != &endpt->module_list) {
+	    if (mod->on_tx_response)
+		status = (*mod->on_tx_response)(tdata);
+	    if (status != PJ_SUCCESS)
+		break;
+	    mod = mod->prev;
+	}
+    }
+
+    UNLOCK_MODULE_ACCESS(endpt);
+
+    return status;
+}
+
+
+/*
+ * Create transmit data buffer.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_create_tdata(  pjsip_endpoint *endpt,
+					       pjsip_tx_data **p_tdata)
+{
+    return pjsip_tx_data_create(endpt->transport_mgr, p_tdata);
+}
+
+/*
+ * Create the DNS resolver instance. 
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_create_resolver(pjsip_endpoint *endpt,
+						pj_dns_resolver **p_resv)
+{
+#if PJSIP_HAS_RESOLVER
+    PJ_ASSERT_RETURN(endpt && p_resv, PJ_EINVAL);
+    return pj_dns_resolver_create( endpt->pf, NULL, 0, endpt->timer_heap,
+				   endpt->ioqueue, p_resv);
+#else
+    PJ_UNUSED_ARG(endpt);
+    PJ_UNUSED_ARG(p_resv);
+    pj_assert(!"Resolver is disabled (PJSIP_HAS_RESOLVER==0)");
+    return PJ_EINVALIDOP;
+#endif
+}
+
+/*
+ * Set DNS resolver to be used by the SIP resolver.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_set_resolver( pjsip_endpoint *endpt,
+					      pj_dns_resolver *resv)
+{
+    return pjsip_resolver_set_resolver(endpt->resolver, resv);
+}
+
+/*
+ * Get the DNS resolver being used by the SIP resolver.
+ */
+PJ_DEF(pj_dns_resolver*) pjsip_endpt_get_resolver(pjsip_endpoint *endpt)
+{
+    PJ_ASSERT_RETURN(endpt, NULL);
+    return pjsip_resolver_get_resolver(endpt->resolver);
+}
+
+/*
+ * Resolve
+ */
+PJ_DEF(void) pjsip_endpt_resolve( pjsip_endpoint *endpt,
+				  pj_pool_t *pool,
+				  pjsip_host_info *target,
+				  void *token,
+				  pjsip_resolver_callback *cb)
+{
+    pjsip_resolve( endpt->resolver, pool, target, token, cb);
+}
+
+/*
+ * Get transport manager.
+ */
+PJ_DEF(pjsip_tpmgr*) pjsip_endpt_get_tpmgr(pjsip_endpoint *endpt)
+{
+    return endpt->transport_mgr;
+}
+
+/*
+ * Get ioqueue instance.
+ */
+PJ_DEF(pj_ioqueue_t*) pjsip_endpt_get_ioqueue(pjsip_endpoint *endpt)
+{
+    return endpt->ioqueue;
+}
+
+/*
+ * Find/create transport.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_acquire_transport(pjsip_endpoint *endpt,
+						  pjsip_transport_type_e type,
+						  const pj_sockaddr_t *remote,
+						  int addr_len,
+						  const pjsip_tpselector *sel,
+						  pjsip_transport **transport)
+{
+    return pjsip_tpmgr_acquire_transport(endpt->transport_mgr, type, 
+					 remote, addr_len, sel, transport);
+}
+
+
+/*
+ * Report error.
+ */
+PJ_DEF(void) pjsip_endpt_log_error(  pjsip_endpoint *endpt,
+				     const char *sender,
+                                     pj_status_t error_code,
+                                     const char *format,
+                                     ... )
+{
+#if PJ_LOG_MAX_LEVEL > 0
+    char newformat[256];
+    int len;
+    va_list marker;
+
+    va_start(marker, format);
+
+    PJ_UNUSED_ARG(endpt);
+
+    len = pj_ansi_strlen(format);
+    if (len < sizeof(newformat)-30) {
+	pj_str_t errstr;
+
+	pj_ansi_strcpy(newformat, format);
+	pj_ansi_snprintf(newformat+len, sizeof(newformat)-len-1,
+			 ": [err %d] ", error_code);
+	len += pj_ansi_strlen(newformat+len);
+
+	errstr = pj_strerror( error_code, newformat+len, 
+			      sizeof(newformat)-len-1);
+
+	len += errstr.slen;
+	newformat[len] = '\0';
+
+	pj_log(sender, 1, newformat, marker);
+    } else {
+	pj_log(sender, 1, format, marker);
+    }
+
+    va_end(marker);
+#else
+    PJ_UNUSED_ARG(format);
+    PJ_UNUSED_ARG(error_code);
+    PJ_UNUSED_ARG(sender);
+    PJ_UNUSED_ARG(endpt);
+#endif
+}
+
+
+/*
+ * Dump endpoint.
+ */
+PJ_DEF(void) pjsip_endpt_dump( pjsip_endpoint *endpt, pj_bool_t detail )
+{
+#if PJ_LOG_MAX_LEVEL >= 3
+    PJ_LOG(5, (THIS_FILE, "pjsip_endpt_dump()"));
+
+    /* Lock mutex. */
+    pj_mutex_lock(endpt->mutex);
+
+    PJ_LOG(3, (THIS_FILE, "Dumping endpoint %p:", endpt));
+    
+    /* Dumping pool factory. */
+    pj_pool_factory_dump(endpt->pf, detail);
+
+    /* Pool health. */
+    PJ_LOG(3, (THIS_FILE," Endpoint pool capacity=%u, used_size=%u",
+	       pj_pool_get_capacity(endpt->pool),
+	       pj_pool_get_used_size(endpt->pool)));
+
+    /* Resolver */
+#if PJSIP_HAS_RESOLVER
+    if (pjsip_endpt_get_resolver(endpt)) {
+	pj_dns_resolver_dump(pjsip_endpt_get_resolver(endpt), detail);
+    }
+#endif
+
+    /* Transports. 
+     */
+    pjsip_tpmgr_dump_transports( endpt->transport_mgr );
+
+    /* Timer. */
+    PJ_LOG(3,(THIS_FILE, " Timer heap has %u entries", 
+			pj_timer_heap_count(endpt->timer_heap)));
+
+    /* Unlock mutex. */
+    pj_mutex_unlock(endpt->mutex);
+#else
+    PJ_UNUSED_ARG(endpt);
+    PJ_UNUSED_ARG(detail);
+    PJ_LOG(3,(THIS_FILE, "pjsip_end_dump: can't dump because it's disabled."));
+#endif
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_errno.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_errno.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_errno.c	(revision 1163)
@@ -0,0 +1,203 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_errno.h>
+#include <pjsip/sip_msg.h>
+#include <pj/string.h>
+#include <pj/errno.h>
+
+/* PJSIP's own error codes/messages 
+ * MUST KEEP THIS ARRAY SORTED!!
+ */
+
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0)
+
+static const struct 
+{
+    int code;
+    const char *msg;
+} err_str[] = 
+{
+    /* Generic SIP errors */
+    PJ_BUILD_ERR( PJSIP_EBUSY,		"Object is busy" ),
+    PJ_BUILD_ERR( PJSIP_ETYPEEXISTS ,	"Object with the same type exists" ),
+    PJ_BUILD_ERR( PJSIP_ESHUTDOWN,	"SIP stack shutting down" ),
+    PJ_BUILD_ERR( PJSIP_ENOTINITIALIZED,"SIP object is not initialized." ),
+
+    /* Messaging errors */
+    PJ_BUILD_ERR( PJSIP_EINVALIDMSG,	"Invalid message/syntax error" ),
+    PJ_BUILD_ERR( PJSIP_ENOTREQUESTMSG,	"Expecting request message"),
+    PJ_BUILD_ERR( PJSIP_ENOTRESPONSEMSG,"Expecting response message"),
+    PJ_BUILD_ERR( PJSIP_EMSGTOOLONG,	"Message too long" ),
+    PJ_BUILD_ERR( PJSIP_EPARTIALMSG,	"Partial message" ),
+
+    PJ_BUILD_ERR( PJSIP_EINVALIDSTATUS,	"Invalid/unexpected SIP status code"),
+
+    PJ_BUILD_ERR( PJSIP_EINVALIDURI,	"Invalid URI" ),
+    PJ_BUILD_ERR( PJSIP_EINVALIDSCHEME,	"Invalid URI scheme" ),
+    PJ_BUILD_ERR( PJSIP_EMISSINGREQURI,	"Missing Request-URI" ),
+    PJ_BUILD_ERR( PJSIP_EINVALIDREQURI,	"Invalid Request URI" ),
+    PJ_BUILD_ERR( PJSIP_EURITOOLONG,	"URI is too long" ), 
+
+    PJ_BUILD_ERR( PJSIP_EMISSINGHDR,	"Missing required header(s)" ),
+    PJ_BUILD_ERR( PJSIP_EINVALIDHDR,	"Invalid header field"),
+    PJ_BUILD_ERR( PJSIP_EINVALIDVIA,	"Invalid Via header" ),
+    PJ_BUILD_ERR( PJSIP_EMULTIPLEVIA,	"Multiple Via headers in response" ),
+
+    PJ_BUILD_ERR( PJSIP_EMISSINGBODY,	"Missing message body" ),
+    PJ_BUILD_ERR( PJSIP_EINVALIDMETHOD,	"Invalid/unexpected method" ),
+
+    /* Transport errors */
+    PJ_BUILD_ERR( PJSIP_EUNSUPTRANSPORT,"Unsupported transport"),
+    PJ_BUILD_ERR( PJSIP_EPENDINGTX,	"Transmit buffer already pending"),
+    PJ_BUILD_ERR( PJSIP_ERXOVERFLOW,	"Rx buffer overflow"),
+    PJ_BUILD_ERR( PJSIP_EBUFDESTROYED,	"Buffer destroyed"),
+    PJ_BUILD_ERR( PJSIP_ETPNOTSUITABLE,	"Unsuitable transport selected"),
+
+    /* Transaction errors */
+    PJ_BUILD_ERR( PJSIP_ETSXDESTROYED,	"Transaction has been destroyed"),
+    PJ_BUILD_ERR( PJSIP_ENOTSX,		"No transaction is associated with the object "
+					"(expecting stateful processing)" ),
+
+    /* URI comparison status */
+    PJ_BUILD_ERR( PJSIP_ECMPSCHEME,	"URI scheme mismatch" ),
+    PJ_BUILD_ERR( PJSIP_ECMPUSER,	"URI user part mismatch" ),
+    PJ_BUILD_ERR( PJSIP_ECMPPASSWD,	"URI password part mismatch" ),
+    PJ_BUILD_ERR( PJSIP_ECMPHOST,	"URI host part mismatch" ),
+    PJ_BUILD_ERR( PJSIP_ECMPPORT,	"URI port mismatch" ),
+    PJ_BUILD_ERR( PJSIP_ECMPTRANSPORTPRM,"URI transport param mismatch" ),
+    PJ_BUILD_ERR( PJSIP_ECMPTTLPARAM,	"URI ttl param mismatch" ),
+    PJ_BUILD_ERR( PJSIP_ECMPUSERPARAM,	"URI user param mismatch" ),
+    PJ_BUILD_ERR( PJSIP_ECMPMETHODPARAM,"URI method param mismatch" ),
+    PJ_BUILD_ERR( PJSIP_ECMPMADDRPARAM,	"URI maddr param mismatch" ),
+    PJ_BUILD_ERR( PJSIP_ECMPOTHERPARAM,	"URI other param mismatch" ),
+    PJ_BUILD_ERR( PJSIP_ECMPHEADERPARAM,"URI header parameter mismatch" ),
+
+    /* Authentication. */
+    PJ_BUILD_ERR( PJSIP_EFAILEDCREDENTIAL, "Credential failed to authenticate"),
+    PJ_BUILD_ERR( PJSIP_ENOCREDENTIAL,	   "No suitable credential"),
+    PJ_BUILD_ERR( PJSIP_EINVALIDALGORITHM, "Invalid/unsupported digest algorithm" ),
+    PJ_BUILD_ERR( PJSIP_EINVALIDQOP,	   "Invalid/unsupported digest qop" ),
+    PJ_BUILD_ERR( PJSIP_EINVALIDAUTHSCHEME,"Unsupported authentication scheme" ),
+    PJ_BUILD_ERR( PJSIP_EAUTHNOPREVCHAL,   "No previous challenge" ),
+    PJ_BUILD_ERR( PJSIP_EAUTHNOAUTH,	   "No suitable authorization header" ),
+    PJ_BUILD_ERR( PJSIP_EAUTHACCNOTFOUND,  "Account or credential not found" ),
+    PJ_BUILD_ERR( PJSIP_EAUTHACCDISABLED,  "Account or credential is disabled" ),
+    PJ_BUILD_ERR( PJSIP_EAUTHINVALIDREALM, "Invalid authorization realm"),
+    PJ_BUILD_ERR( PJSIP_EAUTHINVALIDDIGEST,"Invalid authorization digest" ),
+    PJ_BUILD_ERR( PJSIP_EAUTHSTALECOUNT,   "Maximum number of stale retries exceeded"),
+
+    /* UA/dialog layer. */
+    PJ_BUILD_ERR( PJSIP_EMISSINGTAG,	"Missing From/To tag parameter" ),
+    PJ_BUILD_ERR( PJSIP_ENOTREFER,	"Expecting REFER request") ,
+    PJ_BUILD_ERR( PJSIP_ENOREFERSESSION,"Not associated with REFER subscription"),
+
+    /* Invite session. */
+    PJ_BUILD_ERR( PJSIP_ESESSIONTERMINATED, "INVITE session already terminated" ),
+    PJ_BUILD_ERR( PJSIP_ESESSIONSTATE,      "Invalid INVITE session state" ),
+
+    /* SSL errors */
+    PJ_BUILD_ERR( PJSIP_TLS_EUNKNOWN,	"Unknown TLS error" ),
+    PJ_BUILD_ERR( PJSIP_TLS_EINVMETHOD,	"Invalid SSL protocol method" ),
+    PJ_BUILD_ERR( PJSIP_TLS_ECACERT,	"Error loading/verifying SSL CA list file"),
+    PJ_BUILD_ERR( PJSIP_TLS_ECERTFILE,	"Error loading SSL certificate chain file"),
+    PJ_BUILD_ERR( PJSIP_TLS_EKEYFILE,	"Error adding private key from SSL certificate file"),
+    PJ_BUILD_ERR( PJSIP_TLS_ECIPHER,	"Error setting SSL cipher list"),
+    PJ_BUILD_ERR( PJSIP_TLS_ECTX,	"Error creating SSL context"),
+    PJ_BUILD_ERR( PJSIP_TLS_ESSLCONN,	"Error creating SSL connection object"),
+    PJ_BUILD_ERR( PJSIP_TLS_ECONNECT,	"Unknown error when performing SSL connect()"),
+    PJ_BUILD_ERR( PJSIP_TLS_EACCEPT,	"Unknown error when performing SSL accept()"),
+    PJ_BUILD_ERR( PJSIP_TLS_ESEND,	"Unknown error when sending SSL data"),
+    PJ_BUILD_ERR( PJSIP_TLS_EREAD,	"Unknown error when reading SSL data"),
+    PJ_BUILD_ERR( PJSIP_TLS_ETIMEDOUT,	"SSL negotiation has timed out"),
+};
+
+
+#endif	/* PJ_HAS_ERROR_STRING */
+
+
+/*
+ * pjsip_strerror()
+ */
+PJ_DEF(pj_str_t) pjsip_strerror( pj_status_t statcode, 
+				 char *buf, pj_size_t bufsize )
+{
+    pj_str_t errstr;
+
+#if defined(PJ_HAS_ERROR_STRING) && (PJ_HAS_ERROR_STRING != 0)
+
+    if (statcode >= PJSIP_ERRNO_START && statcode < PJSIP_ERRNO_START+800) 
+    {
+	/* Status code. */
+	const pj_str_t *status_text = 
+	    pjsip_get_status_text(PJSIP_ERRNO_TO_SIP_STATUS(statcode));
+
+	errstr.ptr = buf;
+	pj_strncpy_with_null(&errstr, status_text, bufsize);
+	return errstr;
+    }
+    else if (statcode >= PJSIP_ERRNO_START_PJSIP && 
+	     statcode < PJSIP_ERRNO_START_PJSIP + 1000)
+    {
+	/* Find the error in the table.
+	 * Use binary search!
+	 */
+	int first = 0;
+	int n = PJ_ARRAY_SIZE(err_str);
+
+	while (n > 0) {
+	    int half = n/2;
+	    int mid = first + half;
+
+	    if (err_str[mid].code < statcode) {
+		first = mid+1;
+		n -= (half+1);
+	    } else if (err_str[mid].code > statcode) {
+		n = half;
+	    } else {
+		first = mid;
+		break;
+	    }
+	}
+
+
+	if (PJ_ARRAY_SIZE(err_str) && err_str[first].code == statcode) {
+	    pj_str_t msg;
+	    
+	    msg.ptr = (char*)err_str[first].msg;
+	    msg.slen = pj_ansi_strlen(err_str[first].msg);
+
+	    errstr.ptr = buf;
+	    pj_strncpy_with_null(&errstr, &msg, bufsize);
+	    return errstr;
+
+	} 
+    }
+
+#endif	/* PJ_HAS_ERROR_STRING */
+
+    /* Error not found. */
+    errstr.ptr = buf;
+    errstr.slen = pj_ansi_snprintf(buf, bufsize, 
+				   "Unknown pjsip error %d",
+				   statcode);
+
+    return errstr;
+
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_msg.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_msg.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_msg.c	(revision 1163)
@@ -0,0 +1,1892 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_msg.h>
+#include <pjsip/sip_parser.h>
+#include <pjsip/print_util.h>
+#include <pjsip/sip_errno.h>
+#include <pj/string.h>
+#include <pj/pool.h>
+#include <pj/assert.h>
+
+const pjsip_method 
+    pjsip_invite_method	    = { PJSIP_INVITE_METHOD,	{ "INVITE",6 }	},
+    pjsip_cancel_method	    = { PJSIP_CANCEL_METHOD,	{ "CANCEL",6 }	},
+    pjsip_ack_method	    = { PJSIP_ACK_METHOD,	{ "ACK",3}	},
+    pjsip_bye_method	    = { PJSIP_BYE_METHOD,	{ "BYE",3}	},
+    pjsip_register_method   = { PJSIP_REGISTER_METHOD,	{ "REGISTER",8}	},
+    pjsip_options_method    = { PJSIP_OPTIONS_METHOD,	{ "OPTIONS",7}	};
+
+static const pj_str_t *method_names[] = 
+{
+    &pjsip_invite_method.name,
+    &pjsip_cancel_method.name,
+    &pjsip_ack_method.name,
+    &pjsip_bye_method.name,
+    &pjsip_register_method.name,
+    &pjsip_options_method.name
+};
+
+const pj_str_t pjsip_hdr_names[] = 
+{
+    { "Accept",		     6 },   // PJSIP_H_ACCEPT,
+    { "Accept-Encoding",    15 },   // PJSIP_H_ACCEPT_ENCODING,
+    { "Accept-Language",    15 },   // PJSIP_H_ACCEPT_LANGUAGE,
+    { "Alert-Info",	    10 },   // PJSIP_H_ALERT_INFO,
+    { "Allow",		     5 },   // PJSIP_H_ALLOW,
+    { "Authentication-Info",19 },   // PJSIP_H_AUTHENTICATION_INFO,
+    { "Authorization",	    13 },   // PJSIP_H_AUTHORIZATION,
+    { "Call-ID",	     7 },   // PJSIP_H_CALL_ID,
+    { "Call-Info",	     9 },   // PJSIP_H_CALL_INFO,
+    { "Contact",	     7 },   // PJSIP_H_CONTACT,
+    { "Content-Disposition",19 },   // PJSIP_H_CONTENT_DISPOSITION,
+    { "Content-Encoding",   16 },   // PJSIP_H_CONTENT_ENCODING,
+    { "Content-Language",   16 },   // PJSIP_H_CONTENT_LANGUAGE,
+    { "Content-Length",	    14 },   // PJSIP_H_CONTENT_LENGTH,
+    { "Content-Type",	    12 },   // PJSIP_H_CONTENT_TYPE,
+    { "CSeq",		     4 },   // PJSIP_H_CSEQ,
+    { "Date",		     4 },   // PJSIP_H_DATE,
+    { "Error-Info",	    10 },   // PJSIP_H_ERROR_INFO,
+    { "Expires",	     7 },   // PJSIP_H_EXPIRES,
+    { "From",		     4 },   // PJSIP_H_FROM,
+    { "In-Reply-To",	    11 },   // PJSIP_H_IN_REPLY_TO,
+    { "Max-Forwards",	    12 },   // PJSIP_H_MAX_FORWARDS,
+    { "MIME-Version",	    12 },   // PJSIP_H_MIME_VERSION,
+    { "Min-Expires",	    11 },   // PJSIP_H_MIN_EXPIRES,
+    { "Organization",	    12 },   // PJSIP_H_ORGANIZATION,
+    { "Priority",	     8 },   // PJSIP_H_PRIORITY,
+    { "Proxy-Authenticate", 18 },   // PJSIP_H_PROXY_AUTHENTICATE,
+    { "Proxy-Authorization",19 },   // PJSIP_H_PROXY_AUTHORIZATION,
+    { "Proxy-Require",	    13 },   // PJSIP_H_PROXY_REQUIRE,
+    { "Record-Route",	    12 },   // PJSIP_H_RECORD_ROUTE,
+    { "Reply-To",	     8 },   // PJSIP_H_REPLY_TO,
+    { "Require",	     7 },   // PJSIP_H_REQUIRE,
+    { "Retry-After",	    11 },   // PJSIP_H_RETRY_AFTER,
+    { "Route",		     5 },   // PJSIP_H_ROUTE,
+    { "Server",		     6 },   // PJSIP_H_SERVER,
+    { "Subject",	     7 },   // PJSIP_H_SUBJECT,
+    { "Supported",	     9 },   // PJSIP_H_SUPPORTED,
+    { "Timestamp",	     9 },   // PJSIP_H_TIMESTAMP,
+    { "To",		     2 },   // PJSIP_H_TO,
+    { "Unsupported",	    11 },   // PJSIP_H_UNSUPPORTED,
+    { "User-Agent",	    10 },   // PJSIP_H_USER_AGENT,
+    { "Via",		     3 },   // PJSIP_H_VIA,
+    { "Warning",	     7 },   // PJSIP_H_WARNING,
+    { "WWW-Authenticate",   16 },   // PJSIP_H_WWW_AUTHENTICATE,
+
+    { "_Unknown-Header",    15 },   // PJSIP_H_OTHER,
+};
+
+static pj_str_t status_phrase[710];
+static int print_media_type(char *buf, const pjsip_media_type *media);
+
+static int init_status_phrase()
+{
+    int i;
+    pj_str_t default_reason_phrase = { "Default status message", 22};
+
+    for (i=0; i<PJ_ARRAY_SIZE(status_phrase); ++i)
+	status_phrase[i] = default_reason_phrase;
+
+    pj_strset2( &status_phrase[100], "Trying");
+    pj_strset2( &status_phrase[180], "Ringing");
+    pj_strset2( &status_phrase[181], "Call Is Being Forwarded");
+    pj_strset2( &status_phrase[182], "Queued");
+    pj_strset2( &status_phrase[183], "Session Progress");
+
+    pj_strset2( &status_phrase[200], "OK");
+    pj_strset2( &status_phrase[202], "Accepted");
+
+    pj_strset2( &status_phrase[300], "Multiple Choices");
+    pj_strset2( &status_phrase[301], "Moved Permanently");
+    pj_strset2( &status_phrase[302], "Moved Temporarily");
+    pj_strset2( &status_phrase[305], "Use Proxy");
+    pj_strset2( &status_phrase[380], "Alternative Service");
+
+    pj_strset2( &status_phrase[400], "Bad Request");
+    pj_strset2( &status_phrase[401], "Unauthorized");
+    pj_strset2( &status_phrase[402], "Payment Required");
+    pj_strset2( &status_phrase[403], "Forbidden");
+    pj_strset2( &status_phrase[404], "Not Found");
+    pj_strset2( &status_phrase[405], "Method Not Allowed");
+    pj_strset2( &status_phrase[406], "Not Acceptable");
+    pj_strset2( &status_phrase[407], "Proxy Authentication Required");
+    pj_strset2( &status_phrase[408], "Request Timeout");
+    pj_strset2( &status_phrase[410], "Gone");
+    pj_strset2( &status_phrase[413], "Request Entity Too Large");
+    pj_strset2( &status_phrase[414], "Request URI Too Long");
+    pj_strset2( &status_phrase[415], "Unsupported Media Type");
+    pj_strset2( &status_phrase[416], "Unsupported URI Scheme");
+    pj_strset2( &status_phrase[420], "Bad Extension");
+    pj_strset2( &status_phrase[421], "Extension Required");
+    pj_strset2( &status_phrase[422], "Session Timer Too Small");
+    pj_strset2( &status_phrase[423], "Interval Too Brief");
+    pj_strset2( &status_phrase[480], "Temporarily Unavailable");
+    pj_strset2( &status_phrase[481], "Call/Transaction Does Not Exist");
+    pj_strset2( &status_phrase[482], "Loop Detected");
+    pj_strset2( &status_phrase[483], "Too Many Hops");
+    pj_strset2( &status_phrase[484], "Address Incompleted");
+    pj_strset2( &status_phrase[485], "Ambiguous");
+    pj_strset2( &status_phrase[486], "Busy Here");
+    pj_strset2( &status_phrase[487], "Request Terminated");
+    pj_strset2( &status_phrase[488], "Not Acceptable Here");
+    pj_strset2( &status_phrase[489], "Bad Event");
+    pj_strset2( &status_phrase[490], "Request Updated");
+    pj_strset2( &status_phrase[491], "Request Pending");
+    pj_strset2( &status_phrase[493], "Undecipherable");
+
+    pj_strset2( &status_phrase[500], "Internal Server Error");
+    pj_strset2( &status_phrase[501], "Not Implemented");
+    pj_strset2( &status_phrase[502], "Bad Gateway");
+    pj_strset2( &status_phrase[503], "Service Unavailable");
+    pj_strset2( &status_phrase[504], "Server Timeout");
+    pj_strset2( &status_phrase[505], "Version Not Supported");
+    pj_strset2( &status_phrase[513], "Message Too Large");
+    pj_strset2( &status_phrase[580], "Precondition Failure");
+
+    pj_strset2( &status_phrase[600], "Busy Everywhere");
+    pj_strset2( &status_phrase[603], "Decline");
+    pj_strset2( &status_phrase[604], "Does Not Exist Anywhere");
+    pj_strset2( &status_phrase[606], "Not Acceptable");
+
+    pj_strset2( &status_phrase[701], "No response from destination server");
+    pj_strset2( &status_phrase[702], "Unable to resolve destination server");
+    pj_strset2( &status_phrase[703], "Error sending message to destination server");
+
+    return 1;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Method.
+ */
+
+PJ_DEF(void) pjsip_method_init( pjsip_method *m, 
+			        pj_pool_t *pool, 
+			        const pj_str_t *str)
+{
+    pj_str_t dup;
+    pjsip_method_init_np(m, pj_strdup(pool, &dup, str));
+}
+
+PJ_DEF(void) pjsip_method_set( pjsip_method *m, pjsip_method_e me )
+{
+    pj_assert(me < PJSIP_OTHER_METHOD);
+    m->id = me;
+    m->name = *method_names[me];
+}
+
+PJ_DEF(void) pjsip_method_init_np(pjsip_method *m,
+				  pj_str_t *str)
+{
+    int i;
+    for (i=0; i<PJ_ARRAY_SIZE(method_names); ++i) {
+	if (pj_memcmp(str->ptr, method_names[i]->ptr, str->slen)==0 || 
+	    pj_stricmp(str, method_names[i])==0) 
+	{
+	    m->id = (pjsip_method_e)i;
+	    m->name = *method_names[i];
+	    return;
+	}
+    }
+    m->id = PJSIP_OTHER_METHOD;
+    m->name = *str;
+}
+
+PJ_DEF(void) pjsip_method_copy( pj_pool_t *pool,
+				pjsip_method *method,
+				const pjsip_method *rhs )
+{
+    method->id = rhs->id;
+    if (rhs->id != PJSIP_OTHER_METHOD) {
+	method->name = rhs->name;
+    } else {
+	pj_strdup(pool, &method->name, &rhs->name);
+    }
+}
+
+
+PJ_DEF(int) pjsip_method_cmp( const pjsip_method *m1, const pjsip_method *m2)
+{
+    if (m1->id == m2->id) {
+	if (m1->id != PJSIP_OTHER_METHOD)
+	    return 0;
+	/* Method comparison is case sensitive! */
+	return pj_strcmp(&m1->name, &m2->name);
+    }
+    
+    return ( m1->id < m2->id ) ? -1 : 1;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Message.
+ */
+
+PJ_DEF(pjsip_msg*) pjsip_msg_create( pj_pool_t *pool, pjsip_msg_type_e type)
+{
+    pjsip_msg *msg = pj_pool_alloc(pool, sizeof(pjsip_msg));
+    pj_list_init(&msg->hdr);
+    msg->type = type;
+    msg->body = NULL;
+    return msg;
+}
+
+PJ_DEF(pjsip_msg*) pjsip_msg_clone( pj_pool_t *pool, const pjsip_msg *src)
+{
+    pjsip_msg *dst;
+    const pjsip_hdr *sh;
+
+    dst = pjsip_msg_create(pool, src->type);
+
+    /* Clone request/status line */
+    if (src->type == PJSIP_REQUEST_MSG) {
+	pjsip_method_copy(pool, &dst->line.req.method, &src->line.req.method);
+	dst->line.req.uri = pjsip_uri_clone(pool, src->line.req.uri);
+    } else {
+	dst->line.status.code = src->line.status.code;
+	pj_strdup(pool, &dst->line.status.reason, &src->line.status.reason);
+    }
+
+    /* Clone headers */
+    sh = src->hdr.next;
+    while (sh != &src->hdr) {
+	pjsip_hdr *dh = pjsip_hdr_clone(pool, sh);
+	pjsip_msg_add_hdr(dst, dh);
+	sh = sh->next;
+    }
+
+    /* Clone message body */
+    if (src->body) {
+	dst->body = pjsip_msg_body_clone(pool, src->body);
+    }
+
+    return dst;
+}
+
+PJ_DEF(void*)  pjsip_msg_find_hdr( const pjsip_msg *msg, 
+				   pjsip_hdr_e hdr_type, const void *start)
+{
+    const pjsip_hdr *hdr=start, *end=&msg->hdr;
+
+    if (hdr == NULL) {
+	hdr = msg->hdr.next;
+    }
+    for (; hdr!=end; hdr = hdr->next) {
+	if (hdr->type == hdr_type)
+	    return (void*)hdr;
+    }
+    return NULL;
+}
+
+PJ_DEF(void*)  pjsip_msg_find_hdr_by_name( const pjsip_msg *msg, 
+					   const pj_str_t *name, 
+					   const void *start)
+{
+    const pjsip_hdr *hdr=start, *end=&msg->hdr;
+
+    if (hdr == NULL) {
+	hdr = msg->hdr.next;
+    }
+    for (; hdr!=end; hdr = hdr->next) {
+	if (hdr->type < PJSIP_H_OTHER) {
+	    if (pj_stricmp(&pjsip_hdr_names[hdr->type], name) == 0)
+		return (void*)hdr;
+	} else {
+	    if (pj_stricmp(&hdr->name, name) == 0)
+		return (void*)hdr;
+	}
+    }
+    return NULL;
+}
+
+PJ_DEF(void*) pjsip_msg_find_remove_hdr( pjsip_msg *msg, 
+				         pjsip_hdr_e hdr_type, void *start)
+{
+    pjsip_hdr *hdr = pjsip_msg_find_hdr(msg, hdr_type, start);
+    if (hdr) {
+	pj_list_erase(hdr);
+    }
+    return hdr;
+}
+
+PJ_DEF(pj_ssize_t) pjsip_msg_print( const pjsip_msg *msg, 
+				    char *buf, pj_size_t size)
+{
+    char *p=buf, *end=buf+size;
+    int len;
+    pjsip_hdr *hdr;
+    pj_str_t clen_hdr =  { "Content-Length: ", 16};
+
+    /* Get a wild guess on how many bytes are typically needed.
+     * We'll check this later in detail, but this serves as a quick check.
+     */
+    if (size < 256)
+	return -1;
+
+    /* Print request line or status line depending on message type */
+    if (msg->type == PJSIP_REQUEST_MSG) {
+	pjsip_uri *uri;
+
+	/* Add method. */
+	len = msg->line.req.method.name.slen;
+	pj_memcpy(p, msg->line.req.method.name.ptr, len);
+	p += len;
+	*p++ = ' ';
+
+	/* Add URI */
+	uri = pjsip_uri_get_uri(msg->line.req.uri);
+	len = pjsip_uri_print( PJSIP_URI_IN_REQ_URI, uri, p, end-p);
+	if (len < 1)
+	    return -1;
+	p += len;
+
+	/* Add ' SIP/2.0' */
+	if (end-p < 16)
+	    return -1;
+	pj_memcpy(p, " SIP/2.0\r\n", 10);
+	p += 10;
+
+    } else {
+
+	/* Add 'SIP/2.0 ' */
+	pj_memcpy(p, "SIP/2.0 ", 8);
+	p += 8;
+
+	/* Add status code. */
+	len = pj_utoa(msg->line.status.code, p);
+	p += len;
+	*p++ = ' ';
+
+	/* Add reason text. */
+	len = msg->line.status.reason.slen;
+	pj_memcpy(p, msg->line.status.reason.ptr, len );
+	p += len;
+
+	/* Add newline. */
+	*p++ = '\r';
+	*p++ = '\n';
+    }
+
+    /* Print each of the headers. */
+    for (hdr=msg->hdr.next; hdr!=&msg->hdr; hdr=hdr->next) {
+	len = (*hdr->vptr->print_on)(hdr, p, end-p);
+	if (len < 1)
+	    return -1;
+	p += len;
+
+	if (p+3 >= end)
+	    return -1;
+
+	*p++ = '\r';
+	*p++ = '\n';
+    }
+
+    /* Process message body. */
+    if (msg->body) {
+	enum { CLEN_SPACE = 5 };
+	char *clen_pos = NULL;
+
+	/* Automaticly adds Content-Type and Content-Length headers, only
+	 * if content_type is set in the message body.
+	 */
+	if (msg->body->content_type.type.slen) {
+	    pj_str_t ctype_hdr = { "Content-Type: ", 14};
+	    const pjsip_media_type *media = &msg->body->content_type;
+
+	    /* Add Content-Type header. */
+	    if ( (end-p) < 24 + media->type.slen + media->subtype.slen + 
+			   media->param.slen) 
+	    {
+		return -1;
+	    }
+	    pj_memcpy(p, ctype_hdr.ptr, ctype_hdr.slen);
+	    p += ctype_hdr.slen;
+	    p += print_media_type(p, media);
+	    *p++ = '\r';
+	    *p++ = '\n';
+
+	    /* Add Content-Length header. */
+	    if ((end-p) < clen_hdr.slen + 12 + 2) {
+		return -1;
+	    }
+	    pj_memcpy(p, clen_hdr.ptr, clen_hdr.slen);
+	    p += clen_hdr.slen;
+	    
+	    /* Print blanks after "Content-Length:", this is where we'll put
+	     * the content length value after we know the length of the
+	     * body.
+	     */
+	    pj_memset(p, ' ', CLEN_SPACE);
+	    clen_pos = p;
+	    p += CLEN_SPACE;
+	    *p++ = '\r';
+	    *p++ = '\n';
+	}
+	
+	/* Add blank newline. */
+	*p++ = '\r';
+	*p++ = '\n';
+
+	/* Print the message body itself. */
+	len = (*msg->body->print_body)(msg->body, p, end-p);
+	if (len < 0) {
+	    return -1;
+	}
+	p += len;
+
+	/* Now that we have the length of the body, print this to the
+	 * Content-Length header.
+	 */
+	if (clen_pos) {
+	    char tmp[16];
+	    len = pj_utoa(len, tmp);
+	    if (len > CLEN_SPACE) len = CLEN_SPACE;
+	    pj_memcpy(clen_pos+CLEN_SPACE-len, tmp, len);
+	}
+
+    } else {
+	/* There's no message body.
+	 * Add Content-Length with zero value.
+	 */
+	if ((end-p) < clen_hdr.slen+8) {
+	    return -1;
+	}
+	pj_memcpy(p, clen_hdr.ptr, clen_hdr.slen);
+	p += clen_hdr.slen;
+	*p++ = ' ';
+	*p++ = '0';
+	*p++ = '\r';
+	*p++ = '\n';
+	*p++ = '\r';
+	*p++ = '\n';
+    }
+
+    *p = '\0';
+    return p-buf;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+PJ_DEF(void*) pjsip_hdr_clone( pj_pool_t *pool, const void *hdr_ptr )
+{
+    const pjsip_hdr *hdr = hdr_ptr;
+    return (*hdr->vptr->clone)(pool, hdr_ptr);
+}
+
+
+PJ_DEF(void*) pjsip_hdr_shallow_clone( pj_pool_t *pool, const void *hdr_ptr )
+{
+    const pjsip_hdr *hdr = hdr_ptr;
+    return (*hdr->vptr->shallow_clone)(pool, hdr_ptr);
+}
+
+PJ_DEF(int) pjsip_hdr_print_on( void *hdr_ptr, char *buf, pj_size_t len)
+{
+    pjsip_hdr *hdr = hdr_ptr;
+    return (*hdr->vptr->print_on)(hdr_ptr, buf, len);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Status/Reason Phrase
+ */
+
+PJ_DEF(const pj_str_t*) pjsip_get_status_text(int code)
+{
+    static int is_initialized;
+    if (is_initialized == 0) {
+	is_initialized = 1;
+	init_status_phrase();
+    }
+
+    return (code>=100 && code<(sizeof(status_phrase)/sizeof(status_phrase[0]))) ? 
+	&status_phrase[code] : &status_phrase[0];
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Generic pjsip_hdr_names/hvalue header.
+ */
+
+static int pjsip_generic_string_hdr_print( pjsip_generic_string_hdr *hdr, 
+				    char *buf, pj_size_t size);
+static pjsip_generic_string_hdr* pjsip_generic_string_hdr_clone( pj_pool_t *pool, 
+						   const pjsip_generic_string_hdr *hdr);
+static pjsip_generic_string_hdr* pjsip_generic_string_hdr_shallow_clone( pj_pool_t *pool,
+							   const pjsip_generic_string_hdr *hdr );
+
+static pjsip_hdr_vptr generic_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &pjsip_generic_string_hdr_clone,
+    (pjsip_hdr_clone_fptr) &pjsip_generic_string_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &pjsip_generic_string_hdr_print,
+};
+
+
+PJ_DEF(void) pjsip_generic_string_hdr_init2(pjsip_generic_string_hdr *hdr,
+					    pj_str_t *hname,
+					    pj_str_t *hvalue)
+{
+    init_hdr(hdr, PJSIP_H_OTHER, &generic_hdr_vptr);
+    if (hname) {
+	hdr->name = *hname;
+	hdr->sname = *hname;
+    }
+    if (hvalue) {
+	hdr->hvalue = *hvalue;
+    } else {
+	hdr->hvalue.ptr = NULL;
+	hdr->hvalue.slen = 0;
+    }
+}
+
+
+PJ_DEF(pjsip_generic_string_hdr*) 
+pjsip_generic_string_hdr_init( pj_pool_t *pool,
+			       void *mem,
+			       const pj_str_t *hnames,
+			       const pj_str_t *hvalue)
+{
+    pjsip_generic_string_hdr *hdr = mem;
+    pj_str_t dup_hname, dup_hval;
+
+    if (hnames) {
+	pj_strdup(pool, &dup_hname, hnames);
+    } else {
+	dup_hname.slen = 0;
+    }
+
+    if (hvalue) {
+	pj_strdup(pool, &dup_hval, hvalue);
+    } else {
+	dup_hval.slen = 0;
+    }
+
+    pjsip_generic_string_hdr_init2(hdr, &dup_hname, &dup_hval);
+    return hdr;
+}
+
+PJ_DEF(pjsip_generic_string_hdr*) 
+pjsip_generic_string_hdr_create( pj_pool_t *pool,
+				 const pj_str_t *hnames,
+				 const pj_str_t *hvalue)
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_generic_string_hdr));
+    return pjsip_generic_string_hdr_init(pool, mem, hnames, hvalue);
+}
+
+static int pjsip_generic_string_hdr_print( pjsip_generic_string_hdr *hdr,
+					   char *buf, pj_size_t size)
+{
+    char *p = buf;
+    
+    if ((pj_ssize_t)size < hdr->name.slen + hdr->hvalue.slen + 5)
+	return -1;
+
+    pj_memcpy(p, hdr->name.ptr, hdr->name.slen);
+    p += hdr->name.slen;
+    *p++ = ':';
+    *p++ = ' ';
+    pj_memcpy(p, hdr->hvalue.ptr, hdr->hvalue.slen);
+    p += hdr->hvalue.slen;
+    *p = '\0';
+
+    return p - buf;
+}
+
+static pjsip_generic_string_hdr* pjsip_generic_string_hdr_clone( pj_pool_t *pool, 
+					           const pjsip_generic_string_hdr *rhs)
+{
+    pjsip_generic_string_hdr *hdr;
+    
+    hdr = pjsip_generic_string_hdr_create(pool, &rhs->name, &rhs->hvalue);
+
+    hdr->type = rhs->type;
+    hdr->sname = hdr->name;
+    return hdr;
+}
+
+static pjsip_generic_string_hdr* pjsip_generic_string_hdr_shallow_clone( pj_pool_t *pool,
+							   const pjsip_generic_string_hdr *rhs )
+{
+    pjsip_generic_string_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    return hdr;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Generic pjsip_hdr_names/integer value header.
+ */
+
+static int pjsip_generic_int_hdr_print( pjsip_generic_int_hdr *hdr, 
+					char *buf, pj_size_t size);
+static pjsip_generic_int_hdr* pjsip_generic_int_hdr_clone( pj_pool_t *pool, 
+						   const pjsip_generic_int_hdr *hdr);
+static pjsip_generic_int_hdr* pjsip_generic_int_hdr_shallow_clone( pj_pool_t *pool,
+							   const pjsip_generic_int_hdr *hdr );
+
+static pjsip_hdr_vptr generic_int_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &pjsip_generic_int_hdr_clone,
+    (pjsip_hdr_clone_fptr) &pjsip_generic_int_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &pjsip_generic_int_hdr_print,
+};
+
+PJ_DEF(pjsip_generic_int_hdr*) pjsip_generic_int_hdr_init(  pj_pool_t *pool,
+							    void *mem,
+							    const pj_str_t *hnames,
+							    int value)
+{
+    pjsip_generic_int_hdr *hdr = mem;
+
+    init_hdr(hdr, PJSIP_H_OTHER, &generic_int_hdr_vptr);
+    if (hnames) {
+	pj_strdup(pool, &hdr->name, hnames);
+	hdr->sname = hdr->name;
+    }
+    hdr->ivalue = value;
+    return hdr;
+}
+
+PJ_DEF(pjsip_generic_int_hdr*) pjsip_generic_int_hdr_create( pj_pool_t *pool,
+						     const pj_str_t *hnames,
+						     int value)
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_generic_int_hdr));
+    return pjsip_generic_int_hdr_init(pool, mem, hnames, value);
+}
+
+static int pjsip_generic_int_hdr_print( pjsip_generic_int_hdr *hdr, 
+					char *buf, pj_size_t size)
+{
+    char *p = buf;
+
+    if ((pj_ssize_t)size < hdr->name.slen + 15)
+	return -1;
+
+    pj_memcpy(p, hdr->name.ptr, hdr->name.slen);
+    p += hdr->name.slen;
+    *p++ = ':';
+    *p++ = ' ';
+
+    p += pj_utoa(hdr->ivalue, p);
+
+    return p - buf;
+}
+
+static pjsip_generic_int_hdr* pjsip_generic_int_hdr_clone( pj_pool_t *pool, 
+					           const pjsip_generic_int_hdr *rhs)
+{
+    pjsip_generic_int_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    return hdr;
+}
+
+static pjsip_generic_int_hdr* pjsip_generic_int_hdr_shallow_clone( pj_pool_t *pool,
+							   const pjsip_generic_int_hdr *rhs )
+{
+    pjsip_generic_int_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    return hdr;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Generic array header.
+ */
+static int pjsip_generic_array_hdr_print( pjsip_generic_array_hdr *hdr, char *buf, pj_size_t size);
+static pjsip_generic_array_hdr* pjsip_generic_array_hdr_clone( pj_pool_t *pool, 
+						 const pjsip_generic_array_hdr *hdr);
+static pjsip_generic_array_hdr* pjsip_generic_array_hdr_shallow_clone( pj_pool_t *pool, 
+						 const pjsip_generic_array_hdr *hdr);
+
+static pjsip_hdr_vptr generic_array_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &pjsip_generic_array_hdr_clone,
+    (pjsip_hdr_clone_fptr) &pjsip_generic_array_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &pjsip_generic_array_hdr_print,
+};
+
+
+PJ_DEF(pjsip_generic_array_hdr*) pjsip_generic_array_hdr_init( pj_pool_t *pool,
+							       void *mem,
+							       const pj_str_t *hnames)
+{
+    pjsip_generic_array_hdr *hdr = mem;
+
+    init_hdr(hdr, PJSIP_H_OTHER, &generic_array_hdr_vptr);
+    if (hnames) {
+	pj_strdup(pool, &hdr->name, hnames);
+	hdr->sname = hdr->name;
+    }
+    hdr->count = 0;
+    return hdr;
+}
+
+PJ_DEF(pjsip_generic_array_hdr*) pjsip_generic_array_hdr_create( pj_pool_t *pool,
+							     const pj_str_t *hnames)
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_generic_array_hdr));
+    return pjsip_generic_array_hdr_init(pool, mem, hnames);
+
+}
+
+static int pjsip_generic_array_hdr_print( pjsip_generic_array_hdr *hdr, 
+					  char *buf, pj_size_t size)
+{
+    char *p = buf, *endbuf = buf+size;
+
+    copy_advance(p, hdr->name);
+    *p++ = ':';
+    *p++ = ' ';
+
+    if (hdr->count > 0) {
+	unsigned i;
+	int printed;
+	copy_advance(p, hdr->values[0]);
+	for (i=1; i<hdr->count; ++i) {
+	    copy_advance_pair(p, ", ", 2, hdr->values[i]);
+	}
+    }
+
+    return p - buf;
+}
+
+static pjsip_generic_array_hdr* pjsip_generic_array_hdr_clone( pj_pool_t *pool, 
+						 const pjsip_generic_array_hdr *rhs)
+{
+    unsigned i;
+    pjsip_generic_array_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    for (i=0; i<rhs->count; ++i) {
+	pj_strdup(pool, &hdr->values[i], &rhs->values[i]);
+    }
+
+    return hdr;
+}
+
+
+static pjsip_generic_array_hdr* pjsip_generic_array_hdr_shallow_clone( pj_pool_t *pool, 
+						 const pjsip_generic_array_hdr *rhs)
+{
+    pjsip_generic_array_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    return hdr;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Accept header.
+ */
+PJ_DEF(pjsip_accept_hdr*) pjsip_accept_hdr_init( pj_pool_t *pool,
+						 void *mem )
+{
+    pjsip_accept_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    init_hdr(hdr, PJSIP_H_ACCEPT, &generic_array_hdr_vptr);
+    hdr->count = 0;
+    return hdr;
+}
+
+PJ_DEF(pjsip_accept_hdr*) pjsip_accept_hdr_create(pj_pool_t *pool)
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_accept_hdr));
+    return pjsip_accept_hdr_init(pool, mem);
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Allow header.
+ */
+
+PJ_DEF(pjsip_allow_hdr*) pjsip_allow_hdr_init( pj_pool_t *pool,
+					       void *mem )
+{
+    pjsip_allow_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    init_hdr(hdr, PJSIP_H_ALLOW, &generic_array_hdr_vptr);
+    hdr->count = 0;
+    return hdr;
+}
+
+PJ_DEF(pjsip_allow_hdr*) pjsip_allow_hdr_create(pj_pool_t *pool)
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_allow_hdr));
+    return pjsip_allow_hdr_init(pool, mem);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Call-ID header.
+ */
+
+PJ_DEF(pjsip_cid_hdr*) pjsip_cid_hdr_init( pj_pool_t *pool,
+					   void *mem )
+{
+    pjsip_cid_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    init_hdr(hdr, PJSIP_H_CALL_ID, &generic_hdr_vptr);
+    return hdr;
+
+}
+
+PJ_DEF(pjsip_cid_hdr*) pjsip_cid_hdr_create( pj_pool_t *pool )
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_cid_hdr));
+    return pjsip_cid_hdr_init(pool, mem);
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Content-Length header.
+ */
+static int pjsip_clen_hdr_print( pjsip_clen_hdr *hdr, char *buf, pj_size_t size);
+static pjsip_clen_hdr* pjsip_clen_hdr_clone( pj_pool_t *pool, const pjsip_clen_hdr *hdr);
+#define pjsip_clen_hdr_shallow_clone pjsip_clen_hdr_clone
+
+static pjsip_hdr_vptr clen_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &pjsip_clen_hdr_clone,
+    (pjsip_hdr_clone_fptr) &pjsip_clen_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &pjsip_clen_hdr_print,
+};
+
+PJ_DEF(pjsip_clen_hdr*) pjsip_clen_hdr_init( pj_pool_t *pool,
+					     void *mem )
+{
+    pjsip_clen_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    init_hdr(hdr, PJSIP_H_CONTENT_LENGTH, &clen_hdr_vptr);
+    hdr->len = 0;
+    return hdr;
+}
+
+PJ_DEF(pjsip_clen_hdr*) pjsip_clen_hdr_create( pj_pool_t *pool )
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_clen_hdr));
+    return pjsip_clen_hdr_init(pool, mem);
+}
+
+static int pjsip_clen_hdr_print( pjsip_clen_hdr *hdr, 
+				 char *buf, pj_size_t size)
+{
+    char *p = buf;
+    int len;
+
+    if ((pj_ssize_t)size < hdr->name.slen + 14)
+	return -1;
+
+    pj_memcpy(p, hdr->name.ptr, hdr->name.slen);
+    p += hdr->name.slen;
+    *p++ = ':';
+    *p++ = ' ';
+
+    len = pj_utoa(hdr->len, p);
+    p += len;
+    *p = '\0';
+
+    return p-buf;
+}
+
+static pjsip_clen_hdr* pjsip_clen_hdr_clone( pj_pool_t *pool, const pjsip_clen_hdr *rhs)
+{
+    pjsip_clen_hdr *hdr = pjsip_clen_hdr_create(pool);
+    hdr->len = rhs->len;
+    return hdr;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * CSeq header.
+ */
+static int pjsip_cseq_hdr_print( pjsip_cseq_hdr *hdr, char *buf, pj_size_t size);
+static pjsip_cseq_hdr* pjsip_cseq_hdr_clone( pj_pool_t *pool, const pjsip_cseq_hdr *hdr);
+static pjsip_cseq_hdr* pjsip_cseq_hdr_shallow_clone( pj_pool_t *pool, const pjsip_cseq_hdr *hdr );
+
+static pjsip_hdr_vptr cseq_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &pjsip_cseq_hdr_clone,
+    (pjsip_hdr_clone_fptr) &pjsip_cseq_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &pjsip_cseq_hdr_print,
+};
+
+PJ_DEF(pjsip_cseq_hdr*) pjsip_cseq_hdr_init( pj_pool_t *pool,
+					     void *mem )
+{
+    pjsip_cseq_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    init_hdr(hdr, PJSIP_H_CSEQ, &cseq_hdr_vptr);
+    hdr->cseq = 0;
+    hdr->method.id = PJSIP_OTHER_METHOD;
+    hdr->method.name.ptr = NULL;
+    hdr->method.name.slen = 0;
+    return hdr;
+}
+
+PJ_DEF(pjsip_cseq_hdr*) pjsip_cseq_hdr_create( pj_pool_t *pool )
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_cseq_hdr));
+    return pjsip_cseq_hdr_init(pool, mem);
+}
+
+static int pjsip_cseq_hdr_print( pjsip_cseq_hdr *hdr, char *buf, pj_size_t size)
+{
+    char *p = buf;
+    int len;
+
+    if ((pj_ssize_t)size < hdr->name.slen + hdr->method.name.slen + 15)
+	return -1;
+
+    pj_memcpy(p, hdr->name.ptr, hdr->name.slen);
+    p += hdr->name.slen;
+    *p++ = ':';
+    *p++ = ' ';
+
+    len = pj_utoa(hdr->cseq, p);
+    p += len;
+    *p++ = ' ';
+
+    pj_memcpy(p, hdr->method.name.ptr, hdr->method.name.slen);
+    p += hdr->method.name.slen;
+
+    *p = '\0';
+
+    return p-buf;
+}
+
+static pjsip_cseq_hdr* pjsip_cseq_hdr_clone( pj_pool_t *pool, 
+					     const pjsip_cseq_hdr *rhs)
+{
+    pjsip_cseq_hdr *hdr = pjsip_cseq_hdr_create(pool);
+    hdr->cseq = rhs->cseq;
+    pjsip_method_copy(pool, &hdr->method, &rhs->method);
+    return hdr;
+}
+
+static pjsip_cseq_hdr* pjsip_cseq_hdr_shallow_clone( pj_pool_t *pool,
+						     const pjsip_cseq_hdr *rhs )
+{
+    pjsip_cseq_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    return hdr;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Contact header.
+ */
+static int pjsip_contact_hdr_print( pjsip_contact_hdr *hdr, char *buf, pj_size_t size);
+static pjsip_contact_hdr* pjsip_contact_hdr_clone( pj_pool_t *pool, const pjsip_contact_hdr *hdr);
+static pjsip_contact_hdr* pjsip_contact_hdr_shallow_clone( pj_pool_t *pool, const pjsip_contact_hdr *);
+
+static pjsip_hdr_vptr contact_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &pjsip_contact_hdr_clone,
+    (pjsip_hdr_clone_fptr) &pjsip_contact_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &pjsip_contact_hdr_print,
+};
+
+PJ_DEF(pjsip_contact_hdr*) pjsip_contact_hdr_init( pj_pool_t *pool,
+						   void *mem )
+{
+    pjsip_contact_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    pj_bzero(mem, sizeof(pjsip_contact_hdr));
+    init_hdr(hdr, PJSIP_H_CONTACT, &contact_hdr_vptr);
+    hdr->expires = -1;
+    pj_list_init(&hdr->other_param);
+    return hdr;
+}
+
+PJ_DEF(pjsip_contact_hdr*) pjsip_contact_hdr_create( pj_pool_t *pool )
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_contact_hdr));
+    return pjsip_contact_hdr_init(pool, mem);
+}
+
+static int pjsip_contact_hdr_print( pjsip_contact_hdr *hdr, char *buf, 
+				    pj_size_t size)
+{
+    if (hdr->star) {
+	char *p = buf;
+	if ((pj_ssize_t)size < hdr->name.slen + 6)
+	    return -1;
+	pj_memcpy(p, hdr->name.ptr, hdr->name.slen);
+	p += hdr->name.slen;
+	*p++ = ':';
+	*p++ = ' ';
+	*p++ = '*';
+	return p - buf;
+
+    } else {
+	int printed;
+	char *startbuf = buf;
+	char *endbuf = buf + size;
+
+	copy_advance(buf, hdr->name);
+	*buf++ = ':';
+	*buf++ = ' ';
+
+	printed = pjsip_uri_print(PJSIP_URI_IN_CONTACT_HDR, hdr->uri, 
+				  buf, endbuf-buf);
+	if (printed < 1)
+	    return -1;
+
+	buf += printed;
+
+	if (hdr->q1000) {
+	    if (buf+19 >= endbuf)
+		return -1;
+
+	    /*
+	    printed = sprintf(buf, ";q=%u.%03u",
+				   hdr->q1000/1000, hdr->q1000 % 1000);
+	     */
+	    pj_memcpy(buf, ";q=", 3);
+	    printed = pj_utoa(hdr->q1000/1000, buf+3);
+	    buf += printed + 3;
+	    *buf++ = '.';
+	    printed = pj_utoa(hdr->q1000 % 1000, buf);
+	    buf += printed;
+	}
+
+	if (hdr->expires >= 0) {
+	    if (buf+23 >= endbuf)
+		return -1;
+
+	    pj_memcpy(buf, ";expires=", 9);
+	    printed = pj_utoa(hdr->expires, buf+9);
+	    buf += printed + 9;
+	}
+
+	printed = pjsip_param_print_on(&hdr->other_param, buf, endbuf-buf,
+				       &pjsip_TOKEN_SPEC, &pjsip_TOKEN_SPEC, 
+				       ';');
+	if (printed < 0)
+	    return printed;
+	buf += printed;
+
+	return buf-startbuf;
+    }
+}
+
+static pjsip_contact_hdr* pjsip_contact_hdr_clone(pj_pool_t *pool, 
+					          const pjsip_contact_hdr *rhs)
+{
+    pjsip_contact_hdr *hdr = pjsip_contact_hdr_create(pool);
+
+    hdr->star = rhs->star;
+    if (hdr->star)
+	return hdr;
+
+    hdr->uri = pjsip_uri_clone(pool, rhs->uri);
+    hdr->q1000 = rhs->q1000;
+    hdr->expires = rhs->expires;
+    pjsip_param_clone(pool, &hdr->other_param, &rhs->other_param);
+    return hdr;
+}
+
+static pjsip_contact_hdr* 
+pjsip_contact_hdr_shallow_clone( pj_pool_t *pool,
+				 const pjsip_contact_hdr *rhs)
+{
+    pjsip_contact_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    pjsip_param_shallow_clone(pool, &hdr->other_param, &rhs->other_param);
+    return hdr;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Content-Type header..
+ */
+static int pjsip_ctype_hdr_print( pjsip_ctype_hdr *hdr, char *buf, 
+				  pj_size_t size);
+static pjsip_ctype_hdr* pjsip_ctype_hdr_clone(pj_pool_t *pool, 
+					      const pjsip_ctype_hdr *hdr);
+#define pjsip_ctype_hdr_shallow_clone pjsip_ctype_hdr_clone
+
+static pjsip_hdr_vptr ctype_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &pjsip_ctype_hdr_clone,
+    (pjsip_hdr_clone_fptr) &pjsip_ctype_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &pjsip_ctype_hdr_print,
+};
+
+PJ_DEF(pjsip_ctype_hdr*) pjsip_ctype_hdr_init( pj_pool_t *pool,
+					       void *mem )
+{
+    pjsip_ctype_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    pj_bzero(mem, sizeof(pjsip_ctype_hdr));
+    init_hdr(hdr, PJSIP_H_CONTENT_TYPE, &ctype_hdr_vptr);
+    return hdr;
+
+}
+
+PJ_DEF(pjsip_ctype_hdr*) pjsip_ctype_hdr_create( pj_pool_t *pool )
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_ctype_hdr));
+    return pjsip_ctype_hdr_init(pool, mem);
+}
+
+static int print_media_type(char *buf, const pjsip_media_type *media)
+{
+    char *p = buf;
+
+    pj_memcpy(p, media->type.ptr, media->type.slen);
+    p += media->type.slen;
+    *p++ = '/';
+    pj_memcpy(p, media->subtype.ptr, media->subtype.slen);
+    p += media->subtype.slen;
+
+    if (media->param.slen) {
+	pj_memcpy(p, media->param.ptr, media->param.slen);
+	p += media->param.slen;
+    }
+
+    return p-buf;
+}
+
+static int pjsip_ctype_hdr_print( pjsip_ctype_hdr *hdr, 
+				  char *buf, pj_size_t size)
+{
+    char *p = buf;
+    int len;
+
+    if ((pj_ssize_t)size < hdr->name.slen + 
+			   hdr->media.type.slen + hdr->media.subtype.slen + 
+			   hdr->media.param.slen + 8)
+    {
+	return -1;
+    }
+
+    pj_memcpy(p, hdr->name.ptr, hdr->name.slen);
+    p += hdr->name.slen;
+    *p++ = ':';
+    *p++ = ' ';
+
+    len = print_media_type(p, &hdr->media);
+    p += len;
+
+    *p = '\0';
+    return p-buf;
+}
+
+static pjsip_ctype_hdr* pjsip_ctype_hdr_clone( pj_pool_t *pool, 
+					       const pjsip_ctype_hdr *rhs)
+{
+    pjsip_ctype_hdr *hdr = pjsip_ctype_hdr_create(pool);
+    pj_strdup(pool, &hdr->media.type, &rhs->media.type);
+    pj_strdup(pool, &hdr->media.subtype, &rhs->media.subtype);
+    pj_strdup(pool, &hdr->media.param, &rhs->media.param);
+    return hdr;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Expires header.
+ */
+PJ_DEF(pjsip_expires_hdr*) pjsip_expires_hdr_init( pj_pool_t *pool,
+						   void *mem,
+						   int value)
+{
+    pjsip_expires_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    init_hdr(hdr, PJSIP_H_EXPIRES, &generic_int_hdr_vptr);
+    hdr->ivalue = value;
+    return hdr;
+
+}
+
+PJ_DEF(pjsip_expires_hdr*) pjsip_expires_hdr_create( pj_pool_t *pool,
+						     int value )
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_expires_hdr));
+    return pjsip_expires_hdr_init(pool, mem, value);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * To or From header.
+ */
+static int pjsip_fromto_hdr_print( pjsip_fromto_hdr *hdr, 
+				   char *buf, pj_size_t size);
+static pjsip_fromto_hdr* pjsip_fromto_hdr_clone( pj_pool_t *pool, 
+					         const pjsip_fromto_hdr *hdr);
+static pjsip_fromto_hdr* pjsip_fromto_hdr_shallow_clone( pj_pool_t *pool,
+							 const pjsip_fromto_hdr *hdr);
+
+
+static pjsip_hdr_vptr fromto_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &pjsip_fromto_hdr_clone,
+    (pjsip_hdr_clone_fptr) &pjsip_fromto_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &pjsip_fromto_hdr_print,
+};
+
+PJ_DEF(pjsip_from_hdr*) pjsip_from_hdr_init( pj_pool_t *pool,
+					     void *mem )
+{
+    pjsip_from_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    pj_bzero(mem, sizeof(pjsip_from_hdr));
+    init_hdr(hdr, PJSIP_H_FROM, &fromto_hdr_vptr);
+    pj_list_init(&hdr->other_param);
+    return hdr;
+}
+
+PJ_DEF(pjsip_from_hdr*) pjsip_from_hdr_create( pj_pool_t *pool )
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_from_hdr));
+    return pjsip_from_hdr_init(pool, mem);
+}
+
+PJ_DEF(pjsip_to_hdr*) pjsip_to_hdr_init( pj_pool_t *pool,
+					 void *mem )
+{
+    pjsip_to_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    pj_bzero(mem, sizeof(pjsip_to_hdr));
+    init_hdr(hdr, PJSIP_H_TO, &fromto_hdr_vptr);
+    pj_list_init(&hdr->other_param);
+    return hdr;
+
+}
+
+PJ_DEF(pjsip_to_hdr*) pjsip_to_hdr_create( pj_pool_t *pool )
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_to_hdr));
+    return pjsip_to_hdr_init(pool, mem);
+}
+
+PJ_DEF(pjsip_from_hdr*) pjsip_fromto_hdr_set_from( pjsip_fromto_hdr *hdr )
+{
+    hdr->type = PJSIP_H_FROM;
+    hdr->name = hdr->sname = pjsip_hdr_names[PJSIP_H_FROM];
+    return hdr;
+}
+
+PJ_DEF(pjsip_to_hdr*) pjsip_fromto_hdr_set_to( pjsip_fromto_hdr *hdr )
+{
+    hdr->type = PJSIP_H_TO;
+    hdr->name = hdr->sname = pjsip_hdr_names[PJSIP_H_TO];
+    return hdr;
+}
+
+static int pjsip_fromto_hdr_print( pjsip_fromto_hdr *hdr, 
+				   char *buf, pj_size_t size)
+{
+    int printed;
+    char *startbuf = buf;
+    char *endbuf = buf + size;
+
+    copy_advance(buf, hdr->name);
+    *buf++ = ':';
+    *buf++ = ' ';
+
+    printed = pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR, hdr->uri, 
+			      buf, endbuf-buf);
+    if (printed < 1)
+	return -1;
+
+    buf += printed;
+
+    copy_advance_pair(buf, ";tag=", 5, hdr->tag);
+
+    printed = pjsip_param_print_on(&hdr->other_param, buf, endbuf-buf, 
+				   &pjsip_TOKEN_SPEC,
+				   &pjsip_TOKEN_SPEC, ';');
+    if (printed < 0)
+	return -1;
+    buf += printed;
+
+    return buf-startbuf;
+}
+
+static pjsip_fromto_hdr* pjsip_fromto_hdr_clone( pj_pool_t *pool, 
+					         const pjsip_fromto_hdr *rhs)
+{
+    pjsip_fromto_hdr *hdr = pjsip_from_hdr_create(pool);
+
+    hdr->type = rhs->type;
+    hdr->name = rhs->name;
+    hdr->sname = rhs->sname;
+    hdr->uri = pjsip_uri_clone(pool, rhs->uri);
+    pj_strdup( pool, &hdr->tag, &rhs->tag);
+    pjsip_param_clone( pool, &hdr->other_param, &rhs->other_param);
+
+    return hdr;
+}
+
+static pjsip_fromto_hdr* 
+pjsip_fromto_hdr_shallow_clone( pj_pool_t *pool,
+				const pjsip_fromto_hdr *rhs)
+{
+    pjsip_fromto_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    pjsip_param_shallow_clone( pool, &hdr->other_param, &rhs->other_param);
+    return hdr;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Max-Forwards header.
+ */
+PJ_DEF(pjsip_max_fwd_hdr*) pjsip_max_fwd_hdr_init( pj_pool_t *pool,
+						   void *mem,
+						   int value)
+{
+    pjsip_max_fwd_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    init_hdr(hdr, PJSIP_H_MAX_FORWARDS, &generic_int_hdr_vptr);
+    hdr->ivalue = value;
+    return hdr;
+
+}
+
+PJ_DEF(pjsip_max_fwd_hdr*) pjsip_max_fwd_hdr_create(pj_pool_t *pool,
+						    int value)
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_max_fwd_hdr));
+    return pjsip_max_fwd_hdr_init(pool, mem, value);
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Min-Expires header.
+ */
+PJ_DEF(pjsip_min_expires_hdr*) pjsip_min_expires_hdr_init( pj_pool_t *pool,
+							   void *mem,
+							   int value )
+{
+    pjsip_min_expires_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    init_hdr(hdr, PJSIP_H_MIN_EXPIRES, &generic_int_hdr_vptr);
+    hdr->ivalue = value;
+    return hdr;
+}
+
+PJ_DEF(pjsip_min_expires_hdr*) pjsip_min_expires_hdr_create(pj_pool_t *pool,
+							    int value )
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_min_expires_hdr));
+    return pjsip_min_expires_hdr_init(pool, mem, value );
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Record-Route and Route header.
+ */
+static int pjsip_routing_hdr_print( pjsip_routing_hdr *r, char *buf, pj_size_t size );
+static pjsip_routing_hdr* pjsip_routing_hdr_clone( pj_pool_t *pool, const pjsip_routing_hdr *r );
+static pjsip_routing_hdr* pjsip_routing_hdr_shallow_clone( pj_pool_t *pool, const pjsip_routing_hdr *r );
+
+static pjsip_hdr_vptr routing_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &pjsip_routing_hdr_clone,
+    (pjsip_hdr_clone_fptr) &pjsip_routing_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &pjsip_routing_hdr_print,
+};
+
+PJ_DEF(pjsip_rr_hdr*) pjsip_rr_hdr_init( pj_pool_t *pool,
+					 void *mem )
+{
+    pjsip_rr_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    init_hdr(hdr, PJSIP_H_RECORD_ROUTE, &routing_hdr_vptr);
+    pjsip_name_addr_init(&hdr->name_addr);
+    pj_list_init(&hdr->other_param);
+    return hdr;
+
+}
+
+PJ_DEF(pjsip_rr_hdr*) pjsip_rr_hdr_create( pj_pool_t *pool )
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_rr_hdr));
+    return pjsip_rr_hdr_init(pool, mem);
+}
+
+PJ_DEF(pjsip_route_hdr*) pjsip_route_hdr_init( pj_pool_t *pool,
+					       void *mem )
+{
+    pjsip_route_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    init_hdr(hdr, PJSIP_H_ROUTE, &routing_hdr_vptr);
+    pjsip_name_addr_init(&hdr->name_addr);
+    pj_list_init(&hdr->other_param);
+    return hdr;
+}
+
+PJ_DEF(pjsip_route_hdr*) pjsip_route_hdr_create( pj_pool_t *pool )
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_route_hdr));
+    return pjsip_route_hdr_init(pool, mem);
+}
+
+PJ_DEF(pjsip_rr_hdr*) pjsip_routing_hdr_set_rr( pjsip_routing_hdr *hdr )
+{
+    hdr->type = PJSIP_H_RECORD_ROUTE;
+    hdr->name = hdr->sname = pjsip_hdr_names[PJSIP_H_RECORD_ROUTE];
+    return hdr;
+}
+
+PJ_DEF(pjsip_route_hdr*) pjsip_routing_hdr_set_route( pjsip_routing_hdr *hdr )
+{
+    hdr->type = PJSIP_H_ROUTE;
+    hdr->name = hdr->sname = pjsip_hdr_names[PJSIP_H_ROUTE];
+    return hdr;
+}
+
+static int pjsip_routing_hdr_print( pjsip_routing_hdr *hdr,
+				    char *buf, pj_size_t size )
+{
+    int printed;
+    char *startbuf = buf;
+    char *endbuf = buf + size;
+
+    copy_advance(buf, hdr->name);
+    *buf++ = ':';
+    *buf++ = ' ';
+
+    printed = pjsip_uri_print(PJSIP_URI_IN_ROUTING_HDR, &hdr->name_addr, buf, 
+			      endbuf-buf);
+    if (printed < 1)
+	return -1;
+    buf += printed;
+
+    printed = pjsip_param_print_on(&hdr->other_param, buf, endbuf-buf, 
+				   &pjsip_TOKEN_SPEC, 
+				   &pjsip_TOKEN_SPEC, ';');
+    if (printed < 0)
+	return -1;
+    buf += printed;
+
+    return buf-startbuf;
+}
+
+static pjsip_routing_hdr* pjsip_routing_hdr_clone( pj_pool_t *pool,
+						   const pjsip_routing_hdr *rhs )
+{
+    pjsip_routing_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+
+    init_hdr(hdr, rhs->type, rhs->vptr);
+    pjsip_name_addr_init(&hdr->name_addr);
+    pjsip_name_addr_assign(pool, &hdr->name_addr, &rhs->name_addr);
+    pjsip_param_clone( pool, &hdr->other_param, &rhs->other_param);
+    return hdr;
+}
+
+static pjsip_routing_hdr* pjsip_routing_hdr_shallow_clone( pj_pool_t *pool,
+							   const pjsip_routing_hdr *rhs )
+{
+    pjsip_routing_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    pjsip_param_shallow_clone( pool, &hdr->other_param, &rhs->other_param);
+    return hdr;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Require header.
+ */
+PJ_DEF(pjsip_require_hdr*) pjsip_require_hdr_init( pj_pool_t *pool,
+						   void *mem )
+{
+    pjsip_require_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    init_hdr(hdr, PJSIP_H_REQUIRE, &generic_array_hdr_vptr);
+    hdr->count = 0;
+    return hdr;
+}
+
+PJ_DEF(pjsip_require_hdr*) pjsip_require_hdr_create(pj_pool_t *pool)
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_require_hdr));
+    return pjsip_require_hdr_init(pool, mem);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Retry-After header.
+ */
+PJ_DEF(pjsip_retry_after_hdr*) pjsip_retry_after_hdr_init( pj_pool_t *pool,
+							   void *mem,
+							   int value )
+{
+    pjsip_retry_after_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    init_hdr(hdr, PJSIP_H_RETRY_AFTER, &generic_int_hdr_vptr);
+    hdr->ivalue = value;
+    return hdr;
+}
+
+PJ_DEF(pjsip_retry_after_hdr*) pjsip_retry_after_hdr_create(pj_pool_t *pool,
+							    int value )
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_retry_after_hdr));
+    return pjsip_retry_after_hdr_init(pool, mem, value );
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Supported header.
+ */
+PJ_DEF(pjsip_supported_hdr*) pjsip_supported_hdr_init( pj_pool_t *pool,
+						       void *mem )
+{
+    pjsip_supported_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+    init_hdr(hdr, PJSIP_H_SUPPORTED, &generic_array_hdr_vptr);
+    hdr->count = 0;
+    return hdr;
+}
+
+PJ_DEF(pjsip_supported_hdr*) pjsip_supported_hdr_create(pj_pool_t *pool)
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_supported_hdr));
+    return pjsip_supported_hdr_init(pool, mem);
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Unsupported header.
+ */
+PJ_DEF(pjsip_unsupported_hdr*) pjsip_unsupported_hdr_init( pj_pool_t *pool,
+							   void *mem )
+{
+    pjsip_unsupported_hdr *hdr = mem;
+    
+    PJ_UNUSED_ARG(pool);
+
+    init_hdr(hdr, PJSIP_H_UNSUPPORTED, &generic_array_hdr_vptr);
+    hdr->count = 0;
+    return hdr;
+}
+
+PJ_DEF(pjsip_unsupported_hdr*) pjsip_unsupported_hdr_create(pj_pool_t *pool)
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_unsupported_hdr));
+    return pjsip_unsupported_hdr_init(pool, mem);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Via header.
+ */
+static int pjsip_via_hdr_print( pjsip_via_hdr *hdr, char *buf, pj_size_t size);
+static pjsip_via_hdr* pjsip_via_hdr_clone( pj_pool_t *pool, const pjsip_via_hdr *hdr);
+static pjsip_via_hdr* pjsip_via_hdr_shallow_clone( pj_pool_t *pool, const pjsip_via_hdr *hdr );
+
+static pjsip_hdr_vptr via_hdr_vptr = 
+{
+    (pjsip_hdr_clone_fptr) &pjsip_via_hdr_clone,
+    (pjsip_hdr_clone_fptr) &pjsip_via_hdr_shallow_clone,
+    (pjsip_hdr_print_fptr) &pjsip_via_hdr_print,
+};
+
+PJ_DEF(pjsip_via_hdr*) pjsip_via_hdr_init( pj_pool_t *pool,
+					   void *mem )
+{
+    pjsip_via_hdr *hdr = mem;
+
+    PJ_UNUSED_ARG(pool);
+
+    pj_bzero(mem, sizeof(pjsip_via_hdr));
+    init_hdr(hdr, PJSIP_H_VIA, &via_hdr_vptr);
+    hdr->ttl_param = -1;
+    hdr->rport_param = -1;
+    pj_list_init(&hdr->other_param);
+    return hdr;
+
+}
+
+PJ_DEF(pjsip_via_hdr*) pjsip_via_hdr_create( pj_pool_t *pool )
+{
+    void *mem = pj_pool_alloc(pool, sizeof(pjsip_via_hdr));
+    return pjsip_via_hdr_init(pool, mem);
+}
+
+static int pjsip_via_hdr_print( pjsip_via_hdr *hdr, 
+				char *buf, pj_size_t size)
+{
+    int printed;
+    char *startbuf = buf;
+    char *endbuf = buf + size;
+    pj_str_t sip_ver = { "SIP/2.0/", 8 };
+
+    if ((pj_ssize_t)size < hdr->name.slen + sip_ver.slen + 
+			   hdr->transport.slen + hdr->sent_by.host.slen + 12)
+    {
+	return -1;
+    }
+
+    /* pjsip_hdr_names */
+    copy_advance(buf, hdr->name);
+    *buf++ = ':';
+    *buf++ = ' ';
+
+    /* SIP/2.0/transport host:port */
+    pj_memcpy(buf, sip_ver.ptr, sip_ver.slen);
+    buf += sip_ver.slen;
+    pj_memcpy(buf, hdr->transport.ptr, hdr->transport.slen);
+    buf += hdr->transport.slen;
+    *buf++ = ' ';
+    pj_memcpy(buf, hdr->sent_by.host.ptr, hdr->sent_by.host.slen);
+    buf += hdr->sent_by.host.slen;
+    if (hdr->sent_by.port != 0) {
+	*buf++ = ':';
+	printed = pj_utoa(hdr->sent_by.port, buf);
+	buf += printed;
+    }
+
+    if (hdr->ttl_param >= 0) {
+	size = endbuf-buf;
+	if (size < 14)
+	    return -1;
+	pj_memcpy(buf, ";ttl=", 5);
+	printed = pj_utoa(hdr->ttl_param, buf+5);
+	buf += printed + 5;
+    }
+
+    if (hdr->rport_param >= 0) {
+	size = endbuf-buf;
+	if (size < 14)
+	    return -1;
+	pj_memcpy(buf, ";rport", 6);
+	buf += 6;
+	if (hdr->rport_param > 0) {
+	    *buf++ = '=';
+	    buf += pj_utoa(hdr->rport_param, buf);
+	}
+    }
+
+
+    copy_advance_pair(buf, ";maddr=", 7, hdr->maddr_param);
+    copy_advance_pair(buf, ";received=", 10, hdr->recvd_param);
+    copy_advance_pair(buf, ";branch=", 8, hdr->branch_param);
+    
+    printed = pjsip_param_print_on(&hdr->other_param, buf, endbuf-buf, 
+				   &pjsip_TOKEN_SPEC,
+				   &pjsip_TOKEN_SPEC, ';');
+    if (printed < 0)
+	return -1;
+    buf += printed;
+    
+    return buf-startbuf;
+}
+
+static pjsip_via_hdr* pjsip_via_hdr_clone( pj_pool_t *pool, 
+					   const pjsip_via_hdr *rhs)
+{
+    pjsip_via_hdr *hdr = pjsip_via_hdr_create(pool);
+    pj_strdup(pool, &hdr->transport, &rhs->transport);
+    pj_strdup(pool, &hdr->sent_by.host, &rhs->sent_by.host);
+    hdr->sent_by.port = rhs->sent_by.port;
+    hdr->ttl_param = rhs->ttl_param;
+    hdr->rport_param = rhs->rport_param;
+    pj_strdup(pool, &hdr->maddr_param, &rhs->maddr_param);
+    pj_strdup(pool, &hdr->recvd_param, &rhs->recvd_param);
+    pj_strdup(pool, &hdr->branch_param, &rhs->branch_param);
+    pjsip_param_clone(pool, &hdr->other_param, &rhs->other_param);
+    return hdr;
+}
+
+static pjsip_via_hdr* pjsip_via_hdr_shallow_clone( pj_pool_t *pool,
+						   const pjsip_via_hdr *rhs )
+{
+    pjsip_via_hdr *hdr = pj_pool_alloc(pool, sizeof(*hdr));
+    pj_memcpy(hdr, rhs, sizeof(*hdr));
+    pjsip_param_shallow_clone(pool, &hdr->other_param, &rhs->other_param);
+    return hdr;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Warning header.
+ */
+PJ_DEF(pjsip_warning_hdr*) pjsip_warning_hdr_create(  pj_pool_t *pool,
+						      int code,
+						      const pj_str_t *host,
+						      const pj_str_t *text)
+{
+    const pj_str_t str_warning = { "Warning", 7 };
+    pj_str_t hvalue;
+
+    hvalue.ptr = pj_pool_alloc(pool, 10 +		/* code */
+				     host->slen + 2 +	/* host */
+				     text->slen + 2);	/* text */
+    hvalue.slen = pj_ansi_sprintf(hvalue.ptr, "%u %.*s \"%.*s\"",
+				  code, (int)host->slen, host->ptr,
+				  (int)text->slen, text->ptr);
+
+    return pjsip_generic_string_hdr_create(pool, &str_warning, &hvalue);
+}
+
+PJ_DEF(pjsip_warning_hdr*) 
+pjsip_warning_hdr_create_from_status( pj_pool_t *pool,
+				      const pj_str_t *host,
+				      pj_status_t status)
+{
+    char errbuf[PJ_ERR_MSG_SIZE];
+    pj_str_t text;
+    
+    text = pj_strerror(status, errbuf, sizeof(errbuf));
+    return pjsip_warning_hdr_create(pool, 399, host, &text);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Message body manipulations.
+ */
+PJ_DEF(int) pjsip_print_text_body(pjsip_msg_body *msg_body, char *buf, pj_size_t size)
+{
+    if (size < msg_body->len)
+	return -1;
+    pj_memcpy(buf, msg_body->data, msg_body->len);
+    return msg_body->len;
+}
+
+PJ_DEF(void*) pjsip_clone_text_data( pj_pool_t *pool, const void *data,
+				     unsigned len)
+{
+    char *newdata = "";
+
+    if (len) {
+	newdata = pj_pool_alloc(pool, len);
+	pj_memcpy(newdata, data, len);
+    }
+    return newdata;
+}
+
+PJ_DEF(pj_status_t) pjsip_msg_body_copy( pj_pool_t *pool,
+					 pjsip_msg_body *dst_body,
+					 const pjsip_msg_body *src_body )
+{
+    /* First check if clone_data field is initialized. */
+    PJ_ASSERT_RETURN( src_body->clone_data!=NULL, PJ_EINVAL );
+
+    /* Duplicate content-type */
+    pj_strdup(pool, &dst_body->content_type.type, 
+		    &src_body->content_type.type);
+    pj_strdup(pool, &dst_body->content_type.subtype, 
+		    &src_body->content_type.subtype);
+    pj_strdup(pool, &dst_body->content_type.param,
+		    &src_body->content_type.param);
+
+    /* Duplicate data. */
+    dst_body->data = (*src_body->clone_data)(pool, src_body->data, 
+					     src_body->len );
+
+    /* Length. */
+    dst_body->len = src_body->len;
+
+    /* Function pointers. */
+    dst_body->print_body = src_body->print_body;
+    dst_body->clone_data = src_body->clone_data;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pjsip_msg_body*) pjsip_msg_body_clone( pj_pool_t *pool,
+					      const pjsip_msg_body *body )
+{
+    pjsip_msg_body *new_body;
+    pj_status_t status;
+
+    new_body = pj_pool_alloc(pool, sizeof(pjsip_msg_body));
+    PJ_ASSERT_RETURN(new_body, NULL);
+
+    status = pjsip_msg_body_copy(pool, new_body, body);
+
+    return (status==PJ_SUCCESS) ? new_body : NULL;
+}
+
+
+PJ_DEF(pjsip_msg_body*) pjsip_msg_body_create( pj_pool_t *pool,
+					       const pj_str_t *type,
+					       const pj_str_t *subtype,
+					       const pj_str_t *text )
+{
+    pjsip_msg_body *body;
+
+    PJ_ASSERT_RETURN(pool && type && subtype && text, NULL);
+
+    body = pj_pool_zalloc(pool, sizeof(pjsip_msg_body));
+    PJ_ASSERT_RETURN(body != NULL, NULL);
+
+    pj_strdup(pool, &body->content_type.type, type);
+    pj_strdup(pool, &body->content_type.subtype, subtype);
+    body->content_type.param.slen = 0;
+
+    body->data = pj_pool_alloc(pool, text->slen);
+    pj_memcpy(body->data, text->ptr, text->slen);
+    body->len = text->slen;
+
+    body->clone_data = &pjsip_clone_text_data;
+    body->print_body = &pjsip_print_text_body;
+
+    return body;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_parser.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_parser.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_parser.c	(revision 1163)
@@ -0,0 +1,2071 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_parser.h>
+#include <pjsip/sip_uri.h>
+#include <pjsip/sip_msg.h>
+#include <pjsip/sip_auth_parser.h>
+#include <pjsip/sip_errno.h>
+#include <pjsip/sip_transport.h>        /* rdata structure */
+#include <pjlib-util/scanner.h>
+#include <pjlib-util/string.h>
+#include <pj/except.h>
+#include <pj/log.h>
+#include <pj/hash.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pj/ctype.h>
+#include <pj/assert.h>
+
+#define ALNUM
+#define RESERVED	    ";/?:@&=+$,"
+#define MARK		    "-_.!~*'()"
+#define UNRESERVED	    ALNUM MARK
+#define ESCAPED		    "%"
+#define USER_UNRESERVED	    "&=+$,;?/"
+#define PASS		    "&=+$,"
+#define TOKEN		    "-.!%*_`'~+"   /* '=' was removed for parsing 
+					    * param */
+#define HOST		    "_-."
+#define HEX_DIGIT	    "abcdefABCDEF"
+#define PARAM_CHAR	    "[]/:&+$" UNRESERVED ESCAPED
+#define HNV_UNRESERVED	    "[]/?:+$"
+#define HDR_CHAR	    HNV_UNRESERVED UNRESERVED ESCAPED
+
+#define PJSIP_VERSION		"SIP/2.0"
+
+#define UNREACHED(expr)
+
+#define IS_NEWLINE(c)	((c)=='\r' || (c)=='\n')
+#define IS_SPACE(c)	((c)==' ' || (c)=='\t')
+
+/*
+ * Header parser records.
+ */
+typedef struct handler_rec
+{
+    char		  hname[PJSIP_MAX_HNAME_LEN+1];
+    pj_size_t		  hname_len;
+    pj_uint32_t		  hname_hash;
+    pjsip_parse_hdr_func *handler;
+} handler_rec;
+
+static handler_rec handler[PJSIP_MAX_HEADER_TYPES];
+static unsigned handler_count;
+static int parser_is_initialized;
+
+/*
+ * URI parser records.
+ */
+typedef struct uri_parser_rec
+{
+    pj_str_t		     scheme;
+    pjsip_parse_uri_func    *parse;
+} uri_parser_rec;
+
+static uri_parser_rec uri_handler[PJSIP_MAX_URI_TYPES];
+static unsigned uri_handler_count;
+
+/*
+ * Global vars (also extern).
+ */
+int PJSIP_SYN_ERR_EXCEPTION;
+
+const pj_str_t  pjsip_USER_STR      = { "user", 4};
+const pj_str_t  pjsip_METHOD_STR    = { "method", 6};
+const pj_str_t  pjsip_TRANSPORT_STR = { "transport", 9};
+const pj_str_t  pjsip_MADDR_STR     = { "maddr", 5 };
+const pj_str_t  pjsip_LR_STR        = { "lr", 2 };
+const pj_str_t  pjsip_SIP_STR       = { "sip", 3 };
+const pj_str_t  pjsip_SIPS_STR      = { "sips", 4 };
+const pj_str_t  pjsip_TEL_STR       = { "tel", 3 };
+const pj_str_t  pjsip_BRANCH_STR    = { "branch", 6 };
+const pj_str_t  pjsip_TTL_STR       = { "ttl", 3 };
+const pj_str_t  pjsip_RECEIVED_STR  = { "received", 8 };
+const pj_str_t  pjsip_Q_STR         = { "q", 1 };
+const pj_str_t  pjsip_EXPIRES_STR   = { "expires", 7 };
+const pj_str_t  pjsip_TAG_STR       = { "tag", 3 };
+const pj_str_t  pjsip_RPORT_STR     = { "rport", 5};
+
+/* Character Input Specification buffer. */
+static pj_cis_buf_t cis_buf;
+
+/* Character Input Specifications. */
+pj_cis_t    pjsip_HOST_SPEC,	        /* For scanning host part. */
+	    pjsip_DIGIT_SPEC,	        /* Decimal digits */
+	    pjsip_ALPHA_SPEC,	        /* Alpha (A-Z, a-z) */
+	    pjsip_ALNUM_SPEC,	        /* Decimal + Alpha. */
+	    pjsip_TOKEN_SPEC,	        /* Token. */
+	    pjsip_TOKEN_SPEC_ESC,	/* Token without '%' character */
+	    pjsip_HEX_SPEC,	        /* Hexadecimal digits. */
+	    pjsip_PARAM_CHAR_SPEC,      /* For scanning pname (or pvalue when
+                                         * it's not quoted.) */
+	    pjsip_PARAM_CHAR_SPEC_ESC,	/* The variant without escaped char */
+	    pjsip_HDR_CHAR_SPEC,	/* Chars in hname or hvalue */
+	    pjsip_HDR_CHAR_SPEC_ESC,	/* Variant without escaped char */
+	    pjsip_PROBE_USER_HOST_SPEC, /* Hostname characters. */
+	    pjsip_PASSWD_SPEC,	        /* Password. */
+	    pjsip_PASSWD_SPEC_ESC,	/* Variant without escaped char */
+	    pjsip_USER_SPEC,	        /* User */
+	    pjsip_USER_SPEC_ESC,	/* Variant without escaped char */
+	    pjsip_NOT_COMMA_OR_NEWLINE, /* Array separator. */
+	    pjsip_NOT_NEWLINE,		/* For eating up header.*/
+	    pjsip_DISPLAY_SPEC;         /* Used when searching for display name
+                                         * in URL. */
+
+
+/*
+ * Forward decl.
+ */
+static pjsip_msg *  int_parse_msg( pjsip_parse_ctx *ctx, 
+				   pjsip_parser_err_report *err_list);
+static void	    int_parse_param( pj_scanner *scanner, 
+				     pj_pool_t *pool,
+				     pj_str_t *pname, 
+				     pj_str_t *pvalue);
+static void	    int_parse_uri_param( pj_scanner *scanner, 
+					 pj_pool_t *pool,
+					 pj_str_t *pname, 
+					 pj_str_t *pvalue);
+static void	    int_parse_hparam( pj_scanner *scanner,
+				      pj_pool_t *pool,
+				      pj_str_t *hname,
+				      pj_str_t *hvalue );
+static void         int_parse_req_line( pj_scanner *scanner, 
+					pj_pool_t *pool,
+					pjsip_request_line *req_line);
+static int          int_is_next_user( pj_scanner *scanner);
+static void	    int_parse_status_line( pj_scanner *scanner, 
+					   pjsip_status_line *line);
+static void	    int_parse_user_pass( pj_scanner *scanner, 
+					 pj_pool_t *pool,
+					 pj_str_t *user, 
+					 pj_str_t *pass);
+static void	    int_parse_uri_host_port( pj_scanner *scanner, 
+					     pj_str_t *p_host, 
+					     int *p_port);
+static pjsip_uri *  int_parse_uri_or_name_addr( pj_scanner *scanner, 
+					        pj_pool_t *pool, 
+                                                unsigned option);
+static void*	    int_parse_sip_url( pj_scanner *scanner, 
+				         pj_pool_t *pool,
+				         pj_bool_t parse_params);
+static pjsip_name_addr *
+                    int_parse_name_addr( pj_scanner *scanner, 
+					 pj_pool_t *pool );
+static void	    parse_hdr_end( pj_scanner *scanner );
+
+static pjsip_hdr*   parse_hdr_accept( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_allow( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_call_id( pjsip_parse_ctx *ctx);
+static pjsip_hdr*   parse_hdr_contact( pjsip_parse_ctx *ctx);
+static pjsip_hdr*   parse_hdr_content_len( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_content_type( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_cseq( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_expires( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_from( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_max_forwards( pjsip_parse_ctx *ctx);
+static pjsip_hdr*   parse_hdr_min_expires( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_rr( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_route( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_require( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_retry_after( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_supported( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_to( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_unsupported( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_via( pjsip_parse_ctx *ctx );
+static pjsip_hdr*   parse_hdr_generic_string( pjsip_parse_ctx *ctx);
+
+/* Convert non NULL terminated string to integer. */
+static unsigned long pj_strtoul_mindigit(const pj_str_t *str, 
+                                         unsigned mindig)
+{
+    unsigned long value;
+    unsigned i;
+
+    value = 0;
+    for (i=0; i<(unsigned)str->slen; ++i) {
+	value = value * 10 + (str->ptr[i] - '0');
+    }
+    for (; i<mindig; ++i) {
+	value = value * 10;
+    }
+    return value;
+}
+
+/* Case insensitive comparison */
+#define parser_stricmp(s1, s2)  (s1.slen!=s2.slen || pj_stricmp_alnum(&s1, &s2))
+
+
+/* Get a token and unescape */
+PJ_INLINE(void) parser_get_and_unescape(pj_scanner *scanner, pj_pool_t *pool,
+					const pj_cis_t *spec, 
+					const pj_cis_t *unesc_spec,
+					pj_str_t *token)
+{
+#if defined(PJSIP_UNESCAPE_IN_PLACE) && PJSIP_UNESCAPE_IN_PLACE!=0
+    PJ_UNUSED_ARG(pool);
+    PJ_UNUSED_ARG(spec);
+    pj_scan_get_unescape(scanner, unesc_spec, token);
+#else
+    PJ_UNUSED_ARG(unesc_spec);
+    pj_scan_get(scanner, spec, token);
+    *token = pj_str_unescape(pool, token);
+#endif
+}
+
+
+
+/* Syntax error handler for parser. */
+static void on_syntax_error(pj_scanner *scanner)
+{
+    PJ_UNUSED_ARG(scanner);
+    PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+}
+
+/* Concatenate unrecognized params into single string. */
+void pjsip_concat_param_imp( pj_str_t *param, pj_pool_t *pool, 
+			     const pj_str_t *pname, const pj_str_t *pvalue, 
+                             int sepchar)
+{
+    char *new_param, *p;
+    int len;
+
+    len = param->slen + pname->slen + pvalue->slen + 3;
+    p = new_param = pj_pool_alloc(pool, len);
+    
+    if (param->slen) {
+	int old_len = param->slen;
+	pj_memcpy(p, param->ptr, old_len);
+	p += old_len;
+    }
+    *p++ = (char)sepchar;
+    pj_memcpy(p, pname->ptr, pname->slen);
+    p += pname->slen;
+
+    if (pvalue->slen) {
+	*p++ = '=';
+	pj_memcpy(p, pvalue->ptr, pvalue->slen);
+	p += pvalue->slen;
+    }
+
+    *p = '\0';
+    
+    param->ptr = new_param;
+    param->slen = p - new_param;
+}
+
+/* Concatenate unrecognized params into single string. */
+static void concat_param( pj_str_t *param, pj_pool_t *pool, 
+			  const pj_str_t *pname, const pj_str_t *pvalue )
+{
+    pjsip_concat_param_imp(param, pool, pname, pvalue, ';');
+}
+
+/* Initialize static properties of the parser. */
+static pj_status_t init_parser()
+{
+    pj_status_t status;
+
+    /*
+     * Syntax error exception number.
+     */
+    status = pj_exception_id_alloc("PJSIP syntax error", 
+				   &PJSIP_SYN_ERR_EXCEPTION);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /*
+     * Init character input spec (cis)
+     */
+
+    pj_cis_buf_init(&cis_buf);
+
+    status = pj_cis_init(&cis_buf, &pjsip_DIGIT_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_add_num(&pjsip_DIGIT_SPEC);
+    
+    status = pj_cis_init(&cis_buf, &pjsip_ALPHA_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_add_alpha( &pjsip_ALPHA_SPEC );
+    
+    status = pj_cis_init(&cis_buf, &pjsip_ALNUM_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_add_alpha( &pjsip_ALNUM_SPEC );
+    pj_cis_add_num( &pjsip_ALNUM_SPEC );
+
+    status = pj_cis_init(&cis_buf, &pjsip_NOT_NEWLINE);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_add_str(&pjsip_NOT_NEWLINE, "\r\n");
+    pj_cis_invert(&pjsip_NOT_NEWLINE);
+
+    status = pj_cis_init(&cis_buf, &pjsip_NOT_COMMA_OR_NEWLINE);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_add_str( &pjsip_NOT_COMMA_OR_NEWLINE, ",\r\n");
+    pj_cis_invert(&pjsip_NOT_COMMA_OR_NEWLINE);
+
+    status = pj_cis_dup(&pjsip_TOKEN_SPEC, &pjsip_ALNUM_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_add_str( &pjsip_TOKEN_SPEC, TOKEN);
+
+    status = pj_cis_dup(&pjsip_TOKEN_SPEC_ESC, &pjsip_TOKEN_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_del_str(&pjsip_TOKEN_SPEC_ESC, "%");
+
+    status = pj_cis_dup(&pjsip_HOST_SPEC, &pjsip_ALNUM_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_add_str( &pjsip_HOST_SPEC, HOST);
+
+    status = pj_cis_dup(&pjsip_HEX_SPEC, &pjsip_DIGIT_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_add_str( &pjsip_HEX_SPEC, HEX_DIGIT);
+
+    status = pj_cis_dup(&pjsip_PARAM_CHAR_SPEC, &pjsip_ALNUM_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_add_str(&pjsip_PARAM_CHAR_SPEC, PARAM_CHAR);
+
+    status = pj_cis_dup(&pjsip_PARAM_CHAR_SPEC_ESC, &pjsip_PARAM_CHAR_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_del_str(&pjsip_PARAM_CHAR_SPEC_ESC, ESCAPED);
+
+    status = pj_cis_dup(&pjsip_HDR_CHAR_SPEC, &pjsip_ALNUM_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_add_str(&pjsip_HDR_CHAR_SPEC, HDR_CHAR);
+
+    status = pj_cis_dup(&pjsip_HDR_CHAR_SPEC_ESC, &pjsip_HDR_CHAR_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_del_str(&pjsip_HDR_CHAR_SPEC_ESC, ESCAPED);
+
+    status = pj_cis_dup(&pjsip_USER_SPEC, &pjsip_ALNUM_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_add_str( &pjsip_USER_SPEC, UNRESERVED ESCAPED USER_UNRESERVED );
+
+    status = pj_cis_dup(&pjsip_USER_SPEC_ESC, &pjsip_USER_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_del_str( &pjsip_USER_SPEC_ESC, ESCAPED);
+
+    status = pj_cis_dup(&pjsip_PASSWD_SPEC, &pjsip_ALNUM_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_add_str( &pjsip_PASSWD_SPEC, UNRESERVED ESCAPED PASS);
+
+    status = pj_cis_dup(&pjsip_PASSWD_SPEC_ESC, &pjsip_PASSWD_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_del_str( &pjsip_PASSWD_SPEC_ESC, ESCAPED);
+
+    status = pj_cis_init(&cis_buf, &pjsip_PROBE_USER_HOST_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_add_str( &pjsip_PROBE_USER_HOST_SPEC, "@ \n>");
+    pj_cis_invert( &pjsip_PROBE_USER_HOST_SPEC );
+
+    status = pj_cis_init(&cis_buf, &pjsip_DISPLAY_SPEC);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    pj_cis_add_str( &pjsip_DISPLAY_SPEC, ":\r\n<");
+    pj_cis_invert(&pjsip_DISPLAY_SPEC);
+
+    /*
+     * Register URI parsers.
+     */
+
+    status = pjsip_register_uri_parser("sip", &int_parse_sip_url);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_uri_parser("sips", &int_parse_sip_url);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /*
+     * Register header parsers.
+     */
+
+    status = pjsip_register_hdr_parser( "Accept", NULL, &parse_hdr_accept);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Allow", NULL, &parse_hdr_allow);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Call-ID", "i", &parse_hdr_call_id);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Contact", "m", &parse_hdr_contact);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Content-Length", "l", 
+                                        &parse_hdr_content_len);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Content-Type", "c", 
+                                        &parse_hdr_content_type);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "CSeq", NULL, &parse_hdr_cseq);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Expires", NULL, &parse_hdr_expires);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "From", "f", &parse_hdr_from);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Max-Forwards", NULL, 
+                                        &parse_hdr_max_forwards);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Min-Expires", NULL, 
+                                        &parse_hdr_min_expires);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Record-Route", NULL, &parse_hdr_rr);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Route", NULL, &parse_hdr_route);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Require", NULL, &parse_hdr_require);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Retry-After", NULL, 
+                                        &parse_hdr_retry_after);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Supported", "k", 
+                                        &parse_hdr_supported);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "To", "t", &parse_hdr_to);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Unsupported", NULL, 
+                                        &parse_hdr_unsupported);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    status = pjsip_register_hdr_parser( "Via", "v", &parse_hdr_via);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* 
+     * Register auth parser. 
+     */
+
+    status = pjsip_auth_init_parser();
+
+    return status;
+}
+
+void init_sip_parser(void)
+{
+    pj_enter_critical_section();
+    if (++parser_is_initialized == 1) {
+	init_parser();
+    }
+    pj_leave_critical_section();
+}
+
+void deinit_sip_parser(void)
+{
+    pj_enter_critical_section();
+    if (--parser_is_initialized == 0) {
+	/* Clear header handlers */
+	pj_bzero(handler, sizeof(handler));
+	handler_count = 0;
+
+	/* Clear URI handlers */
+	pj_bzero(uri_handler, sizeof(uri_handler));
+	uri_handler_count = 0;
+    }
+    pj_leave_critical_section();
+}
+
+/* Compare the handler record with header name, and return:
+ * - 0  if handler match.
+ * - <0 if handler is 'less' than the header name.
+ * - >0 if handler is 'greater' than header name.
+ */
+PJ_INLINE(int) compare_handler( const handler_rec *r1, 
+				const char *name, 
+				pj_size_t name_len,
+				pj_uint32_t hash )
+{
+    PJ_UNUSED_ARG(name_len);
+
+    /* Compare hashed value. */
+    if (r1->hname_hash < hash)
+	return -1;
+    if (r1->hname_hash > hash)
+	return 1;
+
+    /* Compare length. */
+    /*
+    if (r1->hname_len < name_len)
+	return -1;
+    if (r1->hname_len > name_len)
+	return 1;
+     */
+
+    /* Equal length and equal hash. compare the strings. */
+    return pj_memcmp(r1->hname, name, name_len);
+}
+
+/* Register one handler for one header name. */
+static pj_status_t int_register_parser( const char *name, 
+                                        pjsip_parse_hdr_func *fptr )
+{
+    unsigned	pos;
+    handler_rec rec;
+
+    if (handler_count >= PJ_ARRAY_SIZE(handler)) {
+	pj_assert(!"Too many handlers!");
+	return PJ_ETOOMANY;
+    }
+
+    /* Initialize temporary handler. */
+    rec.handler = fptr;
+    rec.hname_len = strlen(name);
+    if (rec.hname_len >= sizeof(rec.hname)) {
+	pj_assert(!"Header name is too long!");
+	return PJ_ENAMETOOLONG;
+    }
+    /* Copy name. */
+    pj_memcpy(rec.hname, name, rec.hname_len);
+    rec.hname[rec.hname_len] = '\0';
+
+    /* Calculate hash value. */
+    rec.hname_hash = pj_hash_calc(0, rec.hname, rec.hname_len);
+
+    /* Get the pos to insert the new handler. */
+    for (pos=0; pos < handler_count; ++pos) {
+	int d;
+	d = compare_handler(&handler[pos], rec.hname, rec.hname_len, 
+                            rec.hname_hash);
+	if (d == 0) {
+	    pj_assert(0);
+	    return PJ_EEXISTS;
+	}
+	if (d > 0) {
+	    break;
+	}
+    }
+
+    /* Shift handlers. */
+    if (pos != handler_count) {
+	pj_memmove( &handler[pos+1], &handler[pos], 
+                    (handler_count-pos)*sizeof(handler_rec));
+    }
+    /* Add new handler. */
+    pj_memcpy( &handler[pos], &rec, sizeof(handler_rec));
+    ++handler_count;
+
+    return PJ_SUCCESS;
+}
+
+/* Register parser handler. If both header name and short name are valid,
+ * then two instances of handler will be registered.
+ */
+PJ_DEF(pj_status_t) pjsip_register_hdr_parser( const char *hname,
+					       const char *hshortname,
+					       pjsip_parse_hdr_func *fptr)
+{
+    unsigned i, len;
+    char hname_lcase[PJSIP_MAX_HNAME_LEN+1];
+    pj_status_t status;
+
+    /* Check that name is not too long */
+    len = pj_ansi_strlen(hname);
+    if (len > PJSIP_MAX_HNAME_LEN) {
+	pj_assert(!"Header name is too long!");
+	return PJ_ENAMETOOLONG;
+    }
+
+    /* Register the normal Mixed-Case name */
+    status = int_register_parser(hname, fptr);
+    if (status != PJ_SUCCESS) {
+	return status;
+    }
+
+    /* Get the lower-case name */
+    for (i=0; i<len; ++i) {
+	hname_lcase[i] = (char)pj_tolower(hname[i]);
+    }
+    hname_lcase[len] = '\0';
+
+    /* Register the lower-case version of the name */
+    status = int_register_parser(hname_lcase, fptr);
+    if (status != PJ_SUCCESS) {
+	return status;
+    }
+    
+
+    /* Register the shortname version of the name */
+    if (hshortname) {
+        status = int_register_parser(hshortname, fptr);
+        if (status != PJ_SUCCESS) 
+	    return status;
+    }
+    return PJ_SUCCESS;
+}
+
+
+/* Find handler to parse the header name. */
+static pjsip_parse_hdr_func * find_handler_imp(pj_uint32_t  hash, 
+					       const pj_str_t *hname)
+{
+    handler_rec *first;
+    int		 comp;
+    unsigned	 n;
+
+    /* Binary search for the handler. */
+    comp = -1;
+    first = &handler[0];
+    n = handler_count;
+    for (; n > 0; ) {
+	unsigned half = n / 2;
+	handler_rec *mid = first + half;
+
+	comp = compare_handler(mid, hname->ptr, hname->slen, hash);
+	if (comp < 0) {
+	    first = ++mid;
+	    n -= half + 1;
+	} else if (comp==0) {
+	    first = mid;
+	    break;
+	} else {
+	    n = half;
+	}
+    }
+
+    return comp==0 ? first->handler : NULL;
+}
+
+
+/* Find handler to parse the header name. */
+static pjsip_parse_hdr_func* find_handler(const pj_str_t *hname)
+{
+    pj_uint32_t hash;
+    char hname_copy[PJSIP_MAX_HNAME_LEN];
+    pj_str_t tmp;
+    pjsip_parse_hdr_func *handler;
+
+    if (hname->slen >= PJSIP_MAX_HNAME_LEN) {
+	/* Guaranteed not to be able to find handler. */
+        return NULL;
+    }
+
+    /* First, common case, try to find handler with exact name */
+    hash = pj_hash_calc(0, hname->ptr, hname->slen);
+    handler = find_handler_imp(hash, hname);
+    if (handler)
+	return handler;
+
+
+    /* If not found, try converting the header name to lowercase and
+     * search again.
+     */
+    hash = pj_hash_calc_tolower(0, hname_copy, hname);
+    tmp.ptr = hname_copy;
+    tmp.slen = hname->slen;
+    return find_handler_imp(hash, &tmp);
+}
+
+
+/* Find URI handler. */
+static pjsip_parse_uri_func* find_uri_handler(const pj_str_t *scheme)
+{
+    unsigned i;
+    for (i=0; i<uri_handler_count; ++i) {
+	if (parser_stricmp(uri_handler[i].scheme, (*scheme))==0)
+	    return uri_handler[i].parse;
+    }
+    return NULL;
+}
+
+/* Register URI parser. */
+PJ_DEF(pj_status_t) pjsip_register_uri_parser( char *scheme,
+					       pjsip_parse_uri_func *func)
+{
+    if (uri_handler_count >= PJ_ARRAY_SIZE(uri_handler))
+	return PJ_ETOOMANY;
+
+    uri_handler[uri_handler_count].scheme = pj_str((char*)scheme);
+    uri_handler[uri_handler_count].parse = func;
+    ++uri_handler_count;
+
+    return PJ_SUCCESS;
+}
+
+/* Public function to parse SIP message. */
+PJ_DEF(pjsip_msg*) pjsip_parse_msg( pj_pool_t *pool, 
+                                    char *buf, pj_size_t size,
+				    pjsip_parser_err_report *err_list)
+{
+    pjsip_msg *msg = NULL;
+    pj_scanner scanner;
+    pjsip_parse_ctx context;
+
+    pj_scan_init(&scanner, buf, size, PJ_SCAN_AUTOSKIP_WS_HEADER, 
+                 &on_syntax_error);
+
+    context.scanner = &scanner;
+    context.pool = pool;
+    context.rdata = NULL;
+
+    msg = int_parse_msg(&context, err_list);
+
+    pj_scan_fini(&scanner);
+    return msg;
+}
+
+/* Public function to parse as rdata.*/
+PJ_DEF(pjsip_msg *) pjsip_parse_rdata( char *buf, pj_size_t size,
+                                       pjsip_rx_data *rdata )
+{
+    pj_scanner scanner;
+    pjsip_parse_ctx context;
+
+    pj_scan_init(&scanner, buf, size, PJ_SCAN_AUTOSKIP_WS_HEADER, 
+                 &on_syntax_error);
+
+    context.scanner = &scanner;
+    context.pool = rdata->tp_info.pool;
+    context.rdata = rdata;
+
+    rdata->msg_info.msg = int_parse_msg(&context, &rdata->msg_info.parse_err);
+
+    pj_scan_fini(&scanner);
+    return rdata->msg_info.msg;
+}
+
+/* Determine if a message has been received. */
+PJ_DEF(pj_bool_t) pjsip_find_msg( const char *buf, pj_size_t size, 
+				  pj_bool_t is_datagram, pj_size_t *msg_size)
+{
+#if PJ_HAS_TCP
+    const char *hdr_end;
+    const char *body_start;
+    const char *pos;
+    const char *line;
+    int content_length = -1;
+
+    *msg_size = size;
+
+    /* For datagram, the whole datagram IS the message. */
+    if (is_datagram) {
+	return PJ_SUCCESS;
+    }
+
+
+    /* Find the end of header area by finding an empty line. */
+    pos = pj_ansi_strstr(buf, "\n\r\n");
+    if (pos == NULL) {
+	return PJSIP_EPARTIALMSG;
+    }
+ 
+    hdr_end = pos+1;
+    body_start = pos+3;
+
+    /* Find "Content-Length" header the hard way. */
+    line = pj_ansi_strchr(buf, '\n');
+    while (line && line < hdr_end) {
+	++line;
+	if ( ((*line=='C' || *line=='c') && 
+              strnicmp_alnum(line, "Content-Length", 14) == 0) ||
+	     ((*line=='l' || *line=='L') && 
+              (*(line+1)==' ' || *(line+1)=='\t' || *(line+1)==':')))
+	{
+	    /* Try to parse the header. */
+	    pj_scanner scanner;
+	    PJ_USE_EXCEPTION;
+
+	    pj_scan_init(&scanner, (char*)line, hdr_end-line, 
+			 PJ_SCAN_AUTOSKIP_WS_HEADER, &on_syntax_error);
+
+	    PJ_TRY {
+		pj_str_t str_clen;
+
+		/* Get "Content-Length" or "L" name */
+		if (*line=='C' || *line=='c')
+		    pj_scan_advance_n(&scanner, 14, PJ_TRUE);
+		else if (*line=='l' || *line=='L')
+		    pj_scan_advance_n(&scanner, 1, PJ_TRUE);
+
+		/* Get colon */
+		if (pj_scan_get_char(&scanner) != ':') {
+		    PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+		}
+
+		/* Get number */
+		pj_scan_get(&scanner, &pjsip_DIGIT_SPEC, &str_clen);
+
+		/* Get newline. */
+		pj_scan_get_newline(&scanner);
+
+		/* Found a valid Content-Length header. */
+		content_length = pj_strtoul(&str_clen);
+	    }
+	    PJ_CATCH_ANY {
+		content_length = -1;
+	    }
+	    PJ_END
+
+	    pj_scan_fini(&scanner);
+	}
+
+	/* Found valid Content-Length? */
+	if (content_length != -1)
+	    break;
+
+	/* Go to next line. */
+	line = pj_ansi_strchr(line, '\n');
+    }
+
+    /* Found Content-Length? */
+    if (content_length == -1) {
+	return PJSIP_EMISSINGHDR;
+    }
+
+    /* Enough packet received? */
+    *msg_size = (body_start - buf) + content_length;
+    return (*msg_size) <= size ? PJ_SUCCESS : PJSIP_EPARTIALMSG;
+#else
+    PJ_UNUSED_ARG(buf);
+    PJ_UNUSED_ARG(is_datagram);
+    *msg_size = size;
+    return PJ_SUCCESS;
+#endif
+}
+
+/* Public function to parse URI */
+PJ_DEF(pjsip_uri*) pjsip_parse_uri( pj_pool_t *pool, 
+					 char *buf, pj_size_t size,
+					 unsigned option)
+{
+    pj_scanner scanner;
+    pjsip_uri *uri = NULL;
+    PJ_USE_EXCEPTION;
+
+    pj_scan_init(&scanner, buf, size, 0, &on_syntax_error);
+
+    
+    PJ_TRY {
+	uri = int_parse_uri_or_name_addr(&scanner, pool, option);
+    }
+    PJ_CATCH_ANY {
+	uri = NULL;
+    }
+    PJ_END;
+
+    /* Must have exhausted all inputs. */
+    if (pj_scan_is_eof(&scanner) || IS_NEWLINE(*scanner.curptr)) {
+	/* Success. */
+	pj_scan_fini(&scanner);
+	return uri;
+    }
+
+    /* Still have some characters unparsed. */
+    pj_scan_fini(&scanner);
+    return NULL;
+}
+
+/* Generic function to print message body.
+ * This assumes that the 'data' member points to a contigous memory where the 
+ * actual body is laid.
+ */
+static int generic_print_body (pjsip_msg_body *msg_body, 
+                               char *buf, pj_size_t size)
+{
+    pjsip_msg_body *body = msg_body;
+    if (size < body->len)
+	return 0;
+
+    pj_memcpy (buf, body->data, body->len);
+    return body->len;
+}
+
+/* Internal function to parse SIP message */
+static pjsip_msg *int_parse_msg( pjsip_parse_ctx *ctx,
+				 pjsip_parser_err_report *err_list)
+{
+    pj_bool_t parsing_headers;
+    pjsip_msg *msg = NULL;
+    pj_str_t hname;
+    pjsip_ctype_hdr *ctype_hdr = NULL;
+    pj_scanner *scanner = ctx->scanner;
+    pj_pool_t *pool = ctx->pool;
+    PJ_USE_EXCEPTION;
+
+    parsing_headers = PJ_FALSE;
+
+    PJ_TRY 
+    {
+	if (parsing_headers)
+	    goto parse_headers;
+
+	/* Skip leading newlines. */
+	while (IS_NEWLINE(*scanner->curptr)) {
+	    pj_scan_get_newline(scanner);
+	}
+
+	/* Check if we still have valid packet.
+	 * Sometimes endpoints just send blank (CRLF) packets just to keep
+	 * NAT bindings open.
+	 */
+	if (pj_scan_is_eof(scanner))
+	    return NULL;
+
+	/* Parse request or status line */
+	if (pj_scan_stricmp_alnum( scanner, PJSIP_VERSION, 7) == 0) {
+	    msg = pjsip_msg_create(pool, PJSIP_RESPONSE_MSG);
+	    int_parse_status_line( scanner, &msg->line.status );
+	} else {
+	    msg = pjsip_msg_create(pool, PJSIP_REQUEST_MSG);
+	    int_parse_req_line(scanner, pool, &msg->line.req );
+	}
+
+	parsing_headers = PJ_TRUE;
+
+parse_headers:
+	/* Parse headers. */
+	do {
+	    pjsip_parse_hdr_func * handler;
+	    pjsip_hdr *hdr = NULL;
+
+	    /* Init hname just in case parsing fails.
+	     * Ref: PROTOS #2412
+	     */
+	    hname.slen = 0;
+	    
+	    /* Get hname. */
+	    pj_scan_get( scanner, &pjsip_TOKEN_SPEC, &hname);
+	    if (pj_scan_get_char( scanner ) != ':') {
+		PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+	    }
+	    
+	    /* Find handler. */
+	    handler = find_handler(&hname);
+	    
+	    /* Call the handler if found.
+	     * If no handler is found, then treat the header as generic
+	     * hname/hvalue pair.
+	     */
+	    if (handler) {
+		hdr = (*handler)(ctx);
+
+		/* Check if we've just parsed a Content-Type header. 
+		 * We will check for a message body if we've got Content-Type 
+		 * header.
+		 */
+		if (hdr->type == PJSIP_H_CONTENT_TYPE) {
+		    ctype_hdr = (pjsip_ctype_hdr*)hdr;
+		}
+
+	    } else {
+		hdr = parse_hdr_generic_string(ctx);
+		hdr->name = hdr->sname = hname;
+	    }
+	    
+	
+	    /* Single parse of header line can produce multiple headers.
+	     * For example, if one Contact: header contains Contact list
+	     * separated by comma, then these Contacts will be split into
+	     * different Contact headers.
+	     * So here we must insert list instead of just insert one header.
+	     */
+	    pj_list_insert_nodes_before(&msg->hdr, hdr);
+	    
+	    /* Parse until EOF or an empty line is found. */
+	} while (!pj_scan_is_eof(scanner) && !IS_NEWLINE(*scanner->curptr));
+	
+	parsing_headers = PJ_FALSE;
+
+	/* If empty line is found, eat it. */
+	if (!pj_scan_is_eof(scanner)) {
+	    if (IS_NEWLINE(*scanner->curptr)) {
+		pj_scan_get_newline(scanner);
+	    }
+	}
+
+	/* If we have Content-Type header, treat the rest of the message 
+	 * as body.
+	 */
+	if (ctype_hdr && scanner->curptr!=scanner->end) {
+	    pjsip_msg_body *body = pj_pool_alloc(pool, sizeof(pjsip_msg_body));
+	    body->content_type.type = ctype_hdr->media.type;
+	    body->content_type.subtype = ctype_hdr->media.subtype;
+	    body->content_type.param = ctype_hdr->media.param;
+
+	    body->data = scanner->curptr;
+	    body->len = scanner->end - scanner->curptr;
+	    body->print_body = &generic_print_body;
+	    body->clone_data = &pjsip_clone_text_data;
+
+	    msg->body = body;
+	}
+    }
+    PJ_CATCH_ANY 
+    {
+	/* Exception was thrown during parsing. 
+	 * Skip until newline, and parse next header. 
+	 */
+	if (err_list) {
+	    pjsip_parser_err_report *err_info;
+	    
+	    err_info = pj_pool_alloc(pool, sizeof(*err_info));
+	    err_info->except_code = PJ_GET_EXCEPTION();
+	    err_info->line = scanner->line;
+	    /* Scanner's column is zero based, so add 1 */
+	    err_info->col = pj_scan_get_col(scanner) + 1;
+	    if (parsing_headers)
+		err_info->hname = hname;
+	    else if (msg && msg->type == PJSIP_REQUEST_MSG)
+		err_info->hname = pj_str("Request Line");
+	    else if (msg && msg->type == PJSIP_RESPONSE_MSG)
+		err_info->hname = pj_str("Status Line");
+	    else
+		err_info->hname.slen = 0;
+	    
+	    pj_list_insert_before(err_list, err_info);
+	}
+	
+	if (parsing_headers) {
+	    if (!pj_scan_is_eof(scanner)) {
+		/* Skip until next line.
+		 * Watch for header continuation.
+		 */
+		do {
+		    pj_scan_skip_line(scanner);
+		} while (IS_SPACE(*scanner->curptr));
+	    }
+
+	    /* Restore flag. Flag may be set in int_parse_sip_url() */
+	    scanner->skip_ws = PJ_SCAN_AUTOSKIP_WS_HEADER;
+
+	    /* Continue parse next header, if any. */
+	    if (!pj_scan_is_eof(scanner) && !IS_NEWLINE(*scanner->curptr)) {
+		goto parse_headers;
+	    }
+	}
+
+	msg = NULL;
+    }
+    PJ_END;
+
+    return msg;
+}
+
+
+/* Parse parameter (pname ["=" pvalue]). */
+static void parse_param_imp( pj_scanner *scanner, pj_pool_t *pool,
+			     pj_str_t *pname, pj_str_t *pvalue,
+			     const pj_cis_t *spec, const pj_cis_t *esc_spec,
+			     unsigned option)
+{
+    /* pname */
+    parser_get_and_unescape(scanner, pool, spec, esc_spec, pname);
+
+    /* init pvalue */
+    pvalue->ptr = NULL;
+    pvalue->slen = 0;
+
+    /* pvalue, if any */
+    if (*scanner->curptr == '=') {
+	pj_scan_get_char(scanner);
+	if (!pj_scan_is_eof(scanner)) {
+	    /* pvalue can be a quoted string. */
+	    if (*scanner->curptr == '"') {
+		pj_scan_get_quote( scanner, '"', '"', pvalue);
+		if (option & PJSIP_PARSE_REMOVE_QUOTE) {
+		    pvalue->ptr++;
+		    pvalue->slen -= 2;
+		}
+	    } else if(pj_cis_match(spec, *scanner->curptr)) {
+		parser_get_and_unescape(scanner, pool, spec, esc_spec, pvalue);
+	    }
+	}
+    }
+}
+
+/* Parse parameter (pname ["=" pvalue]) using token. */
+void pjsip_parse_param_imp(  pj_scanner *scanner, pj_pool_t *pool,
+			     pj_str_t *pname, pj_str_t *pvalue,
+			     unsigned option)
+{
+    parse_param_imp(scanner, pool, pname, pvalue, &pjsip_TOKEN_SPEC,
+		    &pjsip_TOKEN_SPEC_ESC, option);
+}
+
+
+/* Parse parameter (pname ["=" pvalue]) using paramchar. */
+void pjsip_parse_uri_param_imp(pj_scanner *scanner, pj_pool_t *pool,
+			       pj_str_t *pname, pj_str_t *pvalue,
+			       unsigned option)
+{
+    parse_param_imp(scanner, pool, pname, pvalue, &pjsip_PARAM_CHAR_SPEC,
+		    &pjsip_PARAM_CHAR_SPEC_ESC, option);
+}
+
+
+/* Parse parameter (";" pname ["=" pvalue]) in header. */
+static void int_parse_param( pj_scanner *scanner, pj_pool_t *pool,
+			     pj_str_t *pname, pj_str_t *pvalue)
+{
+    /* Get ';' character */
+    pj_scan_get_char(scanner);
+
+    /* Get pname and optionally pvalue */
+    pjsip_parse_param_imp(scanner, pool, pname, pvalue, 
+			  PJSIP_PARSE_REMOVE_QUOTE);
+}
+
+/* Parse parameter (";" pname ["=" pvalue]) in URI. */
+static void int_parse_uri_param( pj_scanner *scanner, pj_pool_t *pool,
+				 pj_str_t *pname, pj_str_t *pvalue)
+{
+    /* Get ';' character */
+    pj_scan_get_char(scanner);
+
+    /* Get pname and optionally pvalue */
+    pjsip_parse_uri_param_imp(scanner, pool, pname, pvalue, 
+			      PJSIP_PARSE_REMOVE_QUOTE);
+}
+
+
+/* Parse header parameter. */
+static void int_parse_hparam( pj_scanner *scanner, pj_pool_t *pool,
+			      pj_str_t *hname, pj_str_t *hvalue )
+{
+    /* Get '?' or '&' character. */
+    pj_scan_get_char(scanner);
+
+    /* hname */
+    parser_get_and_unescape(scanner, pool, &pjsip_HDR_CHAR_SPEC, 
+			    &pjsip_HDR_CHAR_SPEC_ESC, hname);
+
+    /* Init hvalue */
+    hvalue->ptr = NULL;
+    hvalue->slen = 0;
+
+    /* pvalue, if any */
+    if (*scanner->curptr == '=') {
+	pj_scan_get_char(scanner);
+	if (!pj_scan_is_eof(scanner) && 
+	    pj_cis_match(&pjsip_HDR_CHAR_SPEC, *scanner->curptr))
+	{
+	    parser_get_and_unescape(scanner, pool, &pjsip_HDR_CHAR_SPEC,
+				    &pjsip_HDR_CHAR_SPEC_ESC, hvalue);
+	}
+    }
+}
+
+/* Parse host:port in URI. */
+static void int_parse_uri_host_port( pj_scanner *scanner, 
+				     pj_str_t *host, int *p_port)
+{
+    pj_scan_get( scanner, &pjsip_HOST_SPEC, host);
+    /* RFC3261 section 19.1.2: host don't need to be unescaped */
+    if (*scanner->curptr == ':') {
+	pj_str_t port;
+	pj_scan_get_char(scanner);
+	pj_scan_get(scanner, &pjsip_DIGIT_SPEC, &port);
+	*p_port = pj_strtoul(&port);
+    } else {
+	*p_port = 0;
+    }
+}
+
+/* Determine if the next token in an URI is a user specification. */
+static int int_is_next_user(pj_scanner *scanner)
+{
+    pj_str_t dummy;
+    int is_user;
+
+    /* Find character '@'. If this character exist, then the token
+     * must be a username.
+     */
+    if (pj_scan_peek( scanner, &pjsip_PROBE_USER_HOST_SPEC, &dummy) == '@')
+	is_user = 1;
+    else
+	is_user = 0;
+
+    return is_user;
+}
+
+/* Parse user:pass tokens in an URI. */
+static void int_parse_user_pass( pj_scanner *scanner, pj_pool_t *pool,
+				 pj_str_t *user, pj_str_t *pass)
+{
+    parser_get_and_unescape(scanner, pool, &pjsip_USER_SPEC, 
+			    &pjsip_USER_SPEC_ESC, user);
+
+    if ( *scanner->curptr == ':') {
+	pj_scan_get_char( scanner );
+	parser_get_and_unescape(scanner, pool, &pjsip_PASSWD_SPEC,
+				&pjsip_PASSWD_SPEC_ESC, pass);
+    } else {
+	pass->ptr = NULL;
+	pass->slen = 0;
+    }
+
+    /* Get the '@' */
+    pj_scan_get_char( scanner );
+}
+
+/* Parse all types of URI. */
+static pjsip_uri *int_parse_uri_or_name_addr( pj_scanner *scanner, pj_pool_t *pool,
+					      unsigned opt)
+{
+    pjsip_uri *uri;
+    int is_name_addr = 0;
+
+    /* Exhaust any whitespaces. */
+    pj_scan_skip_whitespace(scanner);
+
+    if (*scanner->curptr=='"' || *scanner->curptr=='<') {
+	uri = (pjsip_uri*)int_parse_name_addr( scanner, pool );
+	is_name_addr = 1;
+    } else {
+	pj_str_t scheme;
+	int next_ch;
+
+	next_ch = pj_scan_peek( scanner, &pjsip_DISPLAY_SPEC, &scheme);
+
+	if (next_ch==':') {
+	    pjsip_parse_uri_func *func = find_uri_handler(&scheme);
+
+	    if (func == NULL) {
+		/* Unsupported URI scheme */
+		PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+	    }
+
+	    uri = (*func)( scanner, pool, 
+			  (opt & PJSIP_PARSE_URI_IN_FROM_TO_HDR)== 0);
+
+
+	} else {
+	    uri = (pjsip_uri*)int_parse_name_addr( scanner, pool );
+	    is_name_addr = 1;
+	}
+    }
+
+    /* Should we return the URI object as name address? */
+    if (opt & PJSIP_PARSE_URI_AS_NAMEADDR) {
+	if (is_name_addr == 0) {
+	    pjsip_name_addr *name_addr;
+
+	    name_addr = pjsip_name_addr_create(pool);
+	    name_addr->uri = uri;
+
+	    uri = (pjsip_uri*)name_addr;
+	}
+    }
+
+    return uri;
+}
+
+/* Parse URI. */
+static pjsip_uri *int_parse_uri(pj_scanner *scanner, pj_pool_t *pool, 
+				pj_bool_t parse_params)
+{
+    /* Bug:
+     * This function should not call back int_parse_name_addr() because
+     * it is called by that function. This would cause stack overflow
+     * with PROTOS test #1223.
+    if (*scanner->curptr=='"' || *scanner->curptr=='<') {
+	return (pjsip_uri*)int_parse_name_addr( scanner, pool );
+    } else {
+    */
+	pj_str_t scheme;
+	int colon;
+	pjsip_parse_uri_func *func;
+
+	/* Get scheme. */
+	colon = pj_scan_peek(scanner, &pjsip_TOKEN_SPEC, &scheme);
+	if (colon != ':') {
+	    PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+	}
+
+	func = find_uri_handler(&scheme);
+	if (func)  {
+	    return (pjsip_uri*)(*func)(scanner, pool, parse_params);
+
+	} else {
+	    /* Unsupported URI scheme */
+	    PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+	    UNREACHED({ return NULL; /* Not reached. */ })
+	}
+
+    /*
+    }
+    */
+}
+
+/* Parse "sip:" and "sips:" URI. 
+ * This actually returns (pjsip_sip_uri*) type,
+ */
+static void* int_parse_sip_url( pj_scanner *scanner, 
+				pj_pool_t *pool,
+				pj_bool_t parse_params)
+{
+    pj_str_t scheme;
+    pjsip_sip_uri *url = NULL;
+    int colon;
+    int skip_ws = scanner->skip_ws;
+    scanner->skip_ws = 0;
+
+    pj_scan_get(scanner, &pjsip_TOKEN_SPEC, &scheme);
+    colon = pj_scan_get_char(scanner);
+    if (colon != ':') {
+	PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+    }
+
+    if (parser_stricmp(scheme, pjsip_SIP_STR)==0) {
+	url = pjsip_sip_uri_create(pool, 0);
+
+    } else if (parser_stricmp(scheme, pjsip_SIPS_STR)==0) {
+	url = pjsip_sip_uri_create(pool, 1);
+
+    } else {
+	PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+	/* should not reach here */
+	UNREACHED({
+	    pj_assert(0);
+	    return 0;
+	})
+    }
+
+    if (int_is_next_user(scanner)) {
+	int_parse_user_pass(scanner, pool, &url->user, &url->passwd);
+    }
+
+    /* Get host:port */
+    int_parse_uri_host_port(scanner, &url->host, &url->port);
+
+    /* Get URL parameters. */
+    if (parse_params) {
+      while (*scanner->curptr == ';' ) {
+	pj_str_t pname, pvalue;
+
+	int_parse_uri_param( scanner, pool, &pname, &pvalue);
+
+	if (!parser_stricmp(pname, pjsip_USER_STR) && pvalue.slen) {
+	    url->user_param = pvalue;
+
+	} else if (!parser_stricmp(pname, pjsip_METHOD_STR) && pvalue.slen) {
+	    url->method_param = pvalue;
+
+	} else if (!parser_stricmp(pname,pjsip_TRANSPORT_STR) && pvalue.slen) {
+	    url->transport_param = pvalue;
+
+	} else if (!parser_stricmp(pname, pjsip_TTL_STR) && pvalue.slen) {
+	    url->ttl_param = pj_strtoul(&pvalue);
+
+	} else if (!parser_stricmp(pname, pjsip_MADDR_STR) && pvalue.slen) {
+	    url->maddr_param = pvalue;
+
+	} else if (!parser_stricmp(pname, pjsip_LR_STR)) {
+	    url->lr_param = 1;
+
+	} else {
+	    pjsip_param *p = pj_pool_alloc(pool, sizeof(pjsip_param));
+	    p->name = pname;
+	    p->value = pvalue;
+	    pj_list_insert_before(&url->other_param, p);
+	}
+      }
+    }
+
+    /* Get header params. */
+    if (parse_params && *scanner->curptr == '?') {
+      do {
+	pjsip_param *param;
+	param = pj_pool_alloc(pool, sizeof(pjsip_param));
+	int_parse_hparam(scanner, pool, &param->name, &param->value);
+	pj_list_insert_before(&url->header_param, param);
+      } while (*scanner->curptr == '&');
+    }
+
+    scanner->skip_ws = skip_ws;
+    pj_scan_skip_whitespace(scanner);
+    return url;
+}
+
+/* Parse nameaddr. */
+static pjsip_name_addr *int_parse_name_addr( pj_scanner *scanner, 
+					     pj_pool_t *pool )
+{
+    int has_bracket;
+    pjsip_name_addr *name_addr;
+
+    name_addr = pjsip_name_addr_create(pool);
+
+    if (*scanner->curptr == '"') {
+	pj_scan_get_quote( scanner, '"', '"', &name_addr->display);
+	/* Trim the leading and ending quote */
+	name_addr->display.ptr++;
+	name_addr->display.slen -= 2;
+
+    } else if (*scanner->curptr != '<') {
+	int next;
+	pj_str_t dummy;
+
+	/* This can be either the start of display name,
+	 * the start of URL ("sip:", "sips:", "tel:", etc.), or '<' char.
+	 * We're only interested in display name, because SIP URL
+	 * will be parser later.
+	 */
+	next = pj_scan_peek(scanner, &pjsip_DISPLAY_SPEC, &dummy);
+	if (next == '<') {
+	    /* Ok, this is what we're looking for, a display name. */
+	    pj_scan_get_until_ch( scanner, '<', &name_addr->display);
+	    pj_strtrim(&name_addr->display);
+	}
+    }
+
+    /* Manually skip whitespace. */
+    pj_scan_skip_whitespace(scanner);
+
+    /* Get the SIP-URL */
+    has_bracket = (*scanner->curptr == '<');
+    if (has_bracket)
+	pj_scan_get_char(scanner);
+    name_addr->uri = int_parse_uri( scanner, pool, PJ_TRUE );
+    if (has_bracket) {
+	if (pj_scan_get_char(scanner) != '>')
+	    PJ_THROW( PJSIP_SYN_ERR_EXCEPTION);
+    }
+
+    return name_addr;
+}
+
+
+/* Parse SIP request line. */
+static void int_parse_req_line( pj_scanner *scanner, pj_pool_t *pool,
+				pjsip_request_line *req_line)
+{
+    pj_str_t token;
+
+    pj_scan_get( scanner, &pjsip_TOKEN_SPEC, &token);
+    pjsip_method_init_np( &req_line->method, &token);
+
+    req_line->uri = int_parse_uri(scanner, pool, PJ_TRUE);
+    if (pj_scan_stricmp_alnum( scanner, PJSIP_VERSION, 7) != 0)
+	PJ_THROW( PJSIP_SYN_ERR_EXCEPTION);
+    pj_scan_advance_n (scanner, 7, 1);
+    pj_scan_get_newline( scanner );
+}
+
+/* Parse status line. */
+static void int_parse_status_line( pj_scanner *scanner, 
+				   pjsip_status_line *status_line)
+{
+    pj_str_t token;
+
+    if (pj_scan_stricmp_alnum(scanner, PJSIP_VERSION, 7) != 0)
+	PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+    pj_scan_advance_n( scanner, 7, 1);
+
+    pj_scan_get( scanner, &pjsip_DIGIT_SPEC, &token);
+    status_line->code = pj_strtoul(&token);
+    pj_scan_get( scanner, &pjsip_NOT_NEWLINE, &status_line->reason);
+    pj_scan_get_newline( scanner );
+}
+
+
+/*
+ * Public API to parse SIP status line.
+ */
+PJ_DEF(pj_status_t) pjsip_parse_status_line( char *buf, pj_size_t size,
+					     pjsip_status_line *status_line)
+{
+    pj_scanner scanner;
+    PJ_USE_EXCEPTION;
+
+    pj_bzero(status_line, sizeof(*status_line));
+    pj_scan_init(&scanner, buf, size, 0, &on_syntax_error);
+
+    PJ_TRY {
+	int_parse_status_line(&scanner, status_line);
+    } 
+    PJ_CATCH_ANY {
+	/* Tolerate the error if it is caused only by missing newline */
+	if (status_line->code == 0 && status_line->reason.slen == 0) {
+	    pj_scan_fini(&scanner);
+	    return PJSIP_EINVALIDMSG;
+	}
+    }
+    PJ_END;
+
+    pj_scan_fini(&scanner);
+    return PJ_SUCCESS;
+}
+
+
+/* Parse ending of header. */
+static void parse_hdr_end( pj_scanner *scanner )
+{
+    if (pj_scan_is_eof(scanner)) {
+	;   /* Do nothing. */
+    } else if (*scanner->curptr == '&') {
+	pj_scan_get_char(scanner);
+    } else {
+	pj_scan_get_newline(scanner);
+    }
+}
+
+/* Parse ending of header. */
+void pjsip_parse_end_hdr_imp( pj_scanner *scanner )
+{
+    parse_hdr_end(scanner);
+}
+
+/* Parse generic array header. */
+static void parse_generic_array_hdr( pjsip_generic_array_hdr *hdr,
+				     pj_scanner *scanner)
+{
+    /* Some header fields allow empty elements in the value:
+     *   Accept, Allow, Supported
+     */
+    if (*scanner->curptr == '\r' || *scanner->curptr == '\n') {
+	goto end;
+    }
+
+    pj_scan_get( scanner, &pjsip_NOT_COMMA_OR_NEWLINE, &hdr->values[0]);
+    hdr->count++;
+
+    while (*scanner->curptr == ',') {
+	pj_scan_get_char(scanner);
+	pj_scan_get( scanner, &pjsip_NOT_COMMA_OR_NEWLINE, 
+		     &hdr->values[hdr->count]);
+	hdr->count++;
+    }
+
+end:
+    parse_hdr_end(scanner);
+}
+
+/* Parse generic string header. */
+static void parse_generic_string_hdr( pjsip_generic_string_hdr *hdr,
+				      pj_scanner *scanner )
+{
+    if (pj_cis_match(&pjsip_NOT_NEWLINE, *scanner->curptr))
+	pj_scan_get( scanner, &pjsip_NOT_NEWLINE, &hdr->hvalue);
+    else
+	hdr->hvalue.slen = 0;
+
+    parse_hdr_end(scanner);
+}
+
+/* Parse generic integer header. */
+static void parse_generic_int_hdr( pjsip_generic_int_hdr *hdr,
+				   pj_scanner *scanner )
+{
+    pj_str_t tmp;
+    pj_scan_get( scanner, &pjsip_DIGIT_SPEC, &tmp);
+    hdr->ivalue = pj_strtoul(&tmp);
+    parse_hdr_end(scanner);
+}
+
+
+/* Parse Accept header. */
+static pjsip_hdr* parse_hdr_accept(pjsip_parse_ctx *ctx)
+{
+    pjsip_accept_hdr *accept = pjsip_accept_hdr_create(ctx->pool);
+    parse_generic_array_hdr(accept, ctx->scanner);
+    return (pjsip_hdr*)accept;
+}
+
+/* Parse Allow header. */
+static pjsip_hdr* parse_hdr_allow(pjsip_parse_ctx *ctx)
+{
+    pjsip_allow_hdr *allow = pjsip_allow_hdr_create(ctx->pool);
+    parse_generic_array_hdr(allow, ctx->scanner);
+    return (pjsip_hdr*)allow;
+}
+
+/* Parse Call-ID header. */
+static pjsip_hdr* parse_hdr_call_id(pjsip_parse_ctx *ctx)
+{
+    pjsip_cid_hdr *hdr = pjsip_cid_hdr_create(ctx->pool);
+    pj_scan_get( ctx->scanner, &pjsip_NOT_NEWLINE, &hdr->id);
+    parse_hdr_end(ctx->scanner);
+
+    if (ctx->rdata)
+        ctx->rdata->msg_info.cid = hdr;
+
+    return (pjsip_hdr*)hdr;
+}
+
+/* Parse and interpret Contact param. */
+static void int_parse_contact_param( pjsip_contact_hdr *hdr, 
+				     pj_scanner *scanner,
+				     pj_pool_t *pool)
+{
+    while ( *scanner->curptr == ';' ) {
+	pj_str_t pname, pvalue;
+
+	int_parse_param( scanner, pool, &pname, &pvalue);
+	if (!parser_stricmp(pname, pjsip_Q_STR) && pvalue.slen) {
+	    char *dot_pos = pj_memchr(pvalue.ptr, '.', pvalue.slen);
+	    if (!dot_pos) {
+		hdr->q1000 = pj_strtoul(&pvalue);
+	    } else {
+		pvalue.slen = (pvalue.ptr+pvalue.slen) - (dot_pos+1);
+		pvalue.ptr = dot_pos + 1;
+		hdr->q1000 = pj_strtoul_mindigit(&pvalue, 3);
+	    }    
+	} else if (!parser_stricmp(pname, pjsip_EXPIRES_STR) && pvalue.slen) {
+	    hdr->expires = pj_strtoul(&pvalue);
+
+	} else {
+	    pjsip_param *p = pj_pool_alloc(pool, sizeof(pjsip_param));
+	    p->name = pname;
+	    p->value = pvalue;
+	    pj_list_insert_before(&hdr->other_param, p);
+	}
+    }
+}
+
+/* Parse Contact header. */
+static pjsip_hdr* parse_hdr_contact( pjsip_parse_ctx *ctx )
+{
+    pjsip_contact_hdr *first = NULL;
+    pj_scanner *scanner = ctx->scanner;
+    
+    do {
+	pjsip_contact_hdr *hdr = pjsip_contact_hdr_create(ctx->pool);
+	if (first == NULL)
+	    first = hdr;
+	else
+	    pj_list_insert_before(first, hdr);
+
+	if (*scanner->curptr == '*') {
+	    pj_scan_get_char(scanner);
+	    hdr->star = 1;
+
+	} else {
+	    hdr->star = 0;
+	    hdr->uri = int_parse_uri_or_name_addr(scanner, ctx->pool, 
+                                                  PJSIP_PARSE_URI_AS_NAMEADDR |
+						  PJSIP_PARSE_URI_IN_FROM_TO_HDR);
+
+	    int_parse_contact_param(hdr, scanner, ctx->pool);
+	}
+
+	if (*scanner->curptr != ',')
+	    break;
+
+	pj_scan_get_char(scanner);
+
+    } while (1);
+
+    parse_hdr_end(scanner);
+
+    return (pjsip_hdr*)first;
+}
+
+/* Parse Content-Length header. */
+static pjsip_hdr* parse_hdr_content_len( pjsip_parse_ctx *ctx )
+{
+    pj_str_t digit;
+    pjsip_clen_hdr *hdr;
+
+    hdr = pjsip_clen_hdr_create(ctx->pool);
+    pj_scan_get(ctx->scanner, &pjsip_DIGIT_SPEC, &digit);
+    hdr->len = pj_strtoul(&digit);
+    parse_hdr_end(ctx->scanner);
+
+    if (ctx->rdata)
+        ctx->rdata->msg_info.clen = hdr;
+
+    return (pjsip_hdr*)hdr;
+}
+
+/* Parse Content-Type header. */
+static pjsip_hdr* parse_hdr_content_type( pjsip_parse_ctx *ctx )
+{
+    pjsip_ctype_hdr *hdr;
+    pj_scanner *scanner = ctx->scanner;
+
+    hdr = pjsip_ctype_hdr_create(ctx->pool);
+    
+    /* Parse media type and subtype. */
+    pj_scan_get(scanner, &pjsip_TOKEN_SPEC, &hdr->media.type);
+    pj_scan_get_char(scanner);
+    pj_scan_get(scanner, &pjsip_TOKEN_SPEC, &hdr->media.subtype);
+
+    /* Parse media parameters */
+    while (*scanner->curptr == ';') {
+	pj_str_t pname, pvalue;
+	int_parse_param(scanner, ctx->pool, &pname, &pvalue);
+	concat_param(&hdr->media.param, ctx->pool, &pname, &pvalue);
+    }
+
+    parse_hdr_end(ctx->scanner);
+
+    if (ctx->rdata)
+        ctx->rdata->msg_info.ctype = hdr;
+
+    return (pjsip_hdr*)hdr;
+}
+
+/* Parse CSeq header. */
+static pjsip_hdr* parse_hdr_cseq( pjsip_parse_ctx *ctx )
+{
+    pj_str_t cseq, method;
+    pjsip_cseq_hdr *hdr;
+
+    hdr = pjsip_cseq_hdr_create(ctx->pool);
+    pj_scan_get( ctx->scanner, &pjsip_DIGIT_SPEC, &cseq);
+    hdr->cseq = pj_strtoul(&cseq);
+
+    pj_scan_get( ctx->scanner, &pjsip_TOKEN_SPEC, &method);
+    pjsip_method_init_np(&hdr->method, &method);
+
+    parse_hdr_end( ctx->scanner );
+
+    if (ctx->rdata)
+        ctx->rdata->msg_info.cseq = hdr;
+
+    return (pjsip_hdr*)hdr;
+}
+
+/* Parse Expires header. */
+static pjsip_hdr* parse_hdr_expires(pjsip_parse_ctx *ctx)
+{
+    pjsip_expires_hdr *hdr = pjsip_expires_hdr_create(ctx->pool, 0);
+    parse_generic_int_hdr(hdr, ctx->scanner);
+    return (pjsip_hdr*)hdr;
+}
+
+/* Parse From: or To: header. */
+static void parse_hdr_fromto( pj_scanner *scanner, 
+			      pj_pool_t *pool, 
+			      pjsip_from_hdr *hdr)
+{
+    hdr->uri = int_parse_uri_or_name_addr(scanner, pool, 
+					  PJSIP_PARSE_URI_AS_NAMEADDR |
+					  PJSIP_PARSE_URI_IN_FROM_TO_HDR);
+
+    while ( *scanner->curptr == ';' ) {
+	pj_str_t pname, pvalue;
+
+	int_parse_param( scanner, pool, &pname, &pvalue);
+
+	if (!parser_stricmp(pname, pjsip_TAG_STR)) {
+	    hdr->tag = pvalue;
+	    
+	} else {
+	    pjsip_param *p = pj_pool_alloc(pool, sizeof(pjsip_param));
+	    p->name = pname;
+	    p->value = pvalue;
+	    pj_list_insert_before(&hdr->other_param, p);
+	}
+    }
+
+    parse_hdr_end(scanner);
+}
+
+/* Parse From: header. */
+static pjsip_hdr* parse_hdr_from( pjsip_parse_ctx *ctx )
+{
+    pjsip_from_hdr *hdr = pjsip_from_hdr_create(ctx->pool);
+    parse_hdr_fromto(ctx->scanner, ctx->pool, hdr);
+    if (ctx->rdata)
+        ctx->rdata->msg_info.from = hdr;
+
+    return (pjsip_hdr*)hdr;
+}
+
+/* Parse Require: header. */
+static pjsip_hdr* parse_hdr_require( pjsip_parse_ctx *ctx )
+{
+    pjsip_require_hdr *hdr = pjsip_require_hdr_create(ctx->pool);
+    parse_generic_array_hdr(hdr, ctx->scanner);
+
+    if (ctx->rdata && ctx->rdata->msg_info.require == NULL)
+        ctx->rdata->msg_info.require = hdr;
+
+    return (pjsip_hdr*)hdr;
+}
+
+/* Parse Retry-After: header. */
+static pjsip_hdr* parse_hdr_retry_after(pjsip_parse_ctx *ctx)
+{
+    pjsip_retry_after_hdr *hdr;
+    hdr = pjsip_retry_after_hdr_create(ctx->pool, 0);
+    parse_generic_int_hdr(hdr, ctx->scanner);
+    return (pjsip_hdr*)hdr;
+}
+
+/* Parse Supported: header. */
+static pjsip_hdr* parse_hdr_supported(pjsip_parse_ctx *ctx)
+{
+    pjsip_supported_hdr *hdr = pjsip_supported_hdr_create(ctx->pool);
+    parse_generic_array_hdr(hdr, ctx->scanner);
+    return (pjsip_hdr*)hdr;
+}
+
+
+/* Parse To: header. */
+static pjsip_hdr* parse_hdr_to( pjsip_parse_ctx *ctx )
+{
+    pjsip_to_hdr *hdr = pjsip_to_hdr_create(ctx->pool);
+    parse_hdr_fromto(ctx->scanner, ctx->pool, hdr);
+
+    if (ctx->rdata)
+        ctx->rdata->msg_info.to = hdr;
+
+    return (pjsip_hdr*)hdr;
+}
+
+/* Parse Unsupported: header. */
+static pjsip_hdr* parse_hdr_unsupported(pjsip_parse_ctx *ctx)
+{
+    pjsip_unsupported_hdr *hdr = pjsip_unsupported_hdr_create(ctx->pool);
+    parse_generic_array_hdr(hdr, ctx->scanner);
+    return (pjsip_hdr*)hdr;
+}
+
+/* Parse and interpret Via parameters. */
+static void int_parse_via_param( pjsip_via_hdr *hdr, pj_scanner *scanner,
+				 pj_pool_t *pool)
+{
+    while ( *scanner->curptr == ';' ) {
+	pj_str_t pname, pvalue;
+
+	int_parse_param( scanner, pool, &pname, &pvalue);
+
+	if (!parser_stricmp(pname, pjsip_BRANCH_STR) && pvalue.slen) {
+	    hdr->branch_param = pvalue;
+
+	} else if (!parser_stricmp(pname, pjsip_TTL_STR) && pvalue.slen) {
+	    hdr->ttl_param = pj_strtoul(&pvalue);
+	    
+	} else if (!parser_stricmp(pname, pjsip_MADDR_STR) && pvalue.slen) {
+	    hdr->maddr_param = pvalue;
+
+	} else if (!parser_stricmp(pname, pjsip_RECEIVED_STR) && pvalue.slen) {
+	    hdr->recvd_param = pvalue;
+
+	} else if (!parser_stricmp(pname, pjsip_RPORT_STR)) {
+	    if (pvalue.slen)
+		hdr->rport_param = pj_strtoul(&pvalue);
+	    else
+		hdr->rport_param = 0;
+	} else {
+	    pjsip_param *p = pj_pool_alloc(pool, sizeof(pjsip_param));
+	    p->name = pname;
+	    p->value = pvalue;
+	    pj_list_insert_before(&hdr->other_param, p);
+	}
+    }
+}
+
+/* Parse Max-Forwards header. */
+static pjsip_hdr* parse_hdr_max_forwards( pjsip_parse_ctx *ctx )
+{
+    pjsip_max_fwd_hdr *hdr;
+    hdr = pjsip_max_fwd_hdr_create(ctx->pool, 0);
+    parse_generic_int_hdr(hdr, ctx->scanner);
+
+    if (ctx->rdata)
+        ctx->rdata->msg_info.max_fwd = hdr;
+
+    return (pjsip_hdr*)hdr;
+}
+
+/* Parse Min-Expires header. */
+static pjsip_hdr* parse_hdr_min_expires(pjsip_parse_ctx *ctx)
+{
+    pjsip_min_expires_hdr *hdr;
+    hdr = pjsip_min_expires_hdr_create(ctx->pool, 0);
+    parse_generic_int_hdr(hdr, ctx->scanner);
+    return (pjsip_hdr*)hdr;
+}
+
+
+/* Parse Route: or Record-Route: header. */
+static void parse_hdr_rr_route( pj_scanner *scanner, pj_pool_t *pool,
+				pjsip_routing_hdr *hdr )
+{
+    pjsip_name_addr *temp=int_parse_name_addr(scanner, pool);
+
+    pj_memcpy(&hdr->name_addr, temp, sizeof(*temp));
+
+    while (*scanner->curptr == ';') {
+	pjsip_param *p = pj_pool_alloc(pool, sizeof(pjsip_param));
+	int_parse_param(scanner, pool, &p->name, &p->value);
+	pj_list_insert_before(&hdr->other_param, p);
+    }
+}
+
+/* Parse Record-Route header. */
+static pjsip_hdr* parse_hdr_rr( pjsip_parse_ctx *ctx)
+{
+    pjsip_rr_hdr *first = NULL;
+    pj_scanner *scanner = ctx->scanner;
+
+    do {
+	pjsip_rr_hdr *hdr = pjsip_rr_hdr_create(ctx->pool);
+	if (!first) {
+	    first = hdr;
+	} else {
+	    pj_list_insert_before(first, hdr);
+	}
+	parse_hdr_rr_route(scanner, ctx->pool, hdr);
+	if (*scanner->curptr == ',') {
+	    pj_scan_get_char(scanner);
+	} else {
+	    break;
+	}
+    } while (1);
+    parse_hdr_end(scanner);
+
+    if (ctx->rdata && ctx->rdata->msg_info.record_route==NULL)
+        ctx->rdata->msg_info.record_route = first;
+
+    return (pjsip_hdr*)first;
+}
+
+/* Parse Route: header. */
+static pjsip_hdr* parse_hdr_route( pjsip_parse_ctx *ctx )
+{
+    pjsip_route_hdr *first = NULL;
+    pj_scanner *scanner = ctx->scanner;
+
+    do {
+	pjsip_route_hdr *hdr = pjsip_route_hdr_create(ctx->pool);
+	if (!first) {
+	    first = hdr;
+	} else {
+	    pj_list_insert_before(first, hdr);
+	}
+	parse_hdr_rr_route(scanner, ctx->pool, hdr);
+	if (*scanner->curptr == ',') {
+	    pj_scan_get_char(scanner);
+	} else {
+	    break;
+	}
+    } while (1);
+    parse_hdr_end(scanner);
+
+    if (ctx->rdata && ctx->rdata->msg_info.route==NULL)
+        ctx->rdata->msg_info.route = first;
+
+    return (pjsip_hdr*)first;
+}
+
+/* Parse Via: header. */
+static pjsip_hdr* parse_hdr_via( pjsip_parse_ctx *ctx )
+{
+    pjsip_via_hdr *first = NULL;
+    pj_scanner *scanner = ctx->scanner;
+
+    do {
+	pjsip_via_hdr *hdr = pjsip_via_hdr_create(ctx->pool);
+	if (!first)
+	    first = hdr;
+	else
+	    pj_list_insert_before(first, hdr);
+
+	if (pj_scan_stricmp_alnum( scanner, PJSIP_VERSION "/", 8) != 0)
+	    PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+
+	pj_scan_advance_n( scanner, 8, 1);
+
+	pj_scan_get( scanner, &pjsip_TOKEN_SPEC, &hdr->transport);
+	pj_scan_get( scanner, &pjsip_HOST_SPEC, &hdr->sent_by.host);
+
+	if (*scanner->curptr==':') {
+	    pj_str_t digit;
+	    pj_scan_get_char(scanner);
+	    pj_scan_get(scanner, &pjsip_DIGIT_SPEC, &digit);
+	    hdr->sent_by.port = pj_strtoul(&digit);
+	}
+	
+	int_parse_via_param(hdr, scanner, ctx->pool);
+
+	if (*scanner->curptr == '(') {
+	    pj_scan_get_char(scanner);
+	    pj_scan_get_until_ch( scanner, ')', &hdr->comment);
+	    pj_scan_get_char( scanner );
+	}
+
+	if (*scanner->curptr != ',')
+	    break;
+
+	pj_scan_get_char(scanner);
+
+    } while (1);
+
+    parse_hdr_end(scanner);
+
+    if (ctx->rdata && ctx->rdata->msg_info.via == NULL)
+        ctx->rdata->msg_info.via = first;
+
+    return (pjsip_hdr*)first;
+}
+
+/* Parse generic header. */
+static pjsip_hdr* parse_hdr_generic_string( pjsip_parse_ctx *ctx )
+{
+    pjsip_generic_string_hdr *hdr;
+
+    hdr = pjsip_generic_string_hdr_create(ctx->pool, NULL, NULL);
+    parse_generic_string_hdr(hdr, ctx->scanner);
+    return (pjsip_hdr*)hdr;
+
+}
+
+/* Public function to parse a header value. */
+PJ_DEF(void*) pjsip_parse_hdr( pj_pool_t *pool, const pj_str_t *hname,
+			       char *buf, pj_size_t size, int *parsed_len )
+{
+    pj_scanner scanner;
+    pjsip_hdr *hdr = NULL;
+    pjsip_parse_ctx context;
+    PJ_USE_EXCEPTION;
+
+    pj_scan_init(&scanner, buf, size, PJ_SCAN_AUTOSKIP_WS_HEADER, 
+                 &on_syntax_error);
+
+    context.scanner = &scanner;
+    context.pool = pool;
+    context.rdata = NULL;
+
+    PJ_TRY {
+	pjsip_parse_hdr_func *handler = find_handler(hname);
+	if (handler) {
+	    hdr = (*handler)(&context);
+	} else {
+	    hdr = parse_hdr_generic_string(&context);
+	    hdr->type = PJSIP_H_OTHER;
+	    pj_strdup(pool, &hdr->name, hname);
+	    hdr->sname = hdr->name;
+	}
+
+    } 
+    PJ_CATCH_ANY {
+	hdr = NULL;
+    }
+    PJ_END
+
+    if (parsed_len) {
+	*parsed_len = (scanner.curptr - scanner.begin);
+    }
+
+    pj_scan_fini(&scanner);
+
+    return hdr;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_resolve.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_resolve.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_resolve.c	(revision 1163)
@@ -0,0 +1,904 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_resolve.h>
+#include <pjsip/sip_transport.h>
+#include <pjsip/sip_errno.h>
+#include <pjlib-util/errno.h>
+#include <pj/array.h>
+#include <pj/assert.h>
+#include <pj/ctype.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include <pj/rand.h>
+#include <pj/string.h>
+
+
+#define THIS_FILE   "sip_resolve.c"
+
+#define ADDR_MAX_COUNT	    8
+
+struct naptr_target
+{
+    pj_str_t		    target_name;    /**< NAPTR target name. */
+    pjsip_transport_type_e  type;	    /**< Transport type.    */
+    unsigned		    order;	    /**< Order		    */
+    unsigned		    pref;	    /**< Preference.	    */
+};
+
+struct srv_target
+{
+    pjsip_transport_type_e  type;
+    pj_str_t		    target_name;
+    char		    target_buf[PJ_MAX_HOSTNAME];
+    unsigned		    port;
+    unsigned		    priority;
+    unsigned		    weight;
+    unsigned		    sum;
+    unsigned		    addr_cnt;
+    pj_in_addr		    addr[ADDR_MAX_COUNT];
+};
+
+struct query
+{
+    char		     objname[PJ_MAX_OBJ_NAME];
+
+    pjsip_resolver_t	    *resolver;	    /**< Resolver SIP instance.	    */
+    pj_dns_type		     dns_state;	    /**< DNS type being resolved.   */
+    void		    *token;
+    pjsip_resolver_callback *cb;
+    pj_dns_async_query	    *object;
+    pj_status_t		     last_error;
+
+    /* Original request: */
+    struct {
+	pjsip_host_info	     target;
+    } req;
+
+    /* NAPTR records: */
+    unsigned		     naptr_cnt;
+    struct naptr_target	     naptr[8];
+
+    /* SRV records and their resolved IP addresses: */
+    unsigned		     srv_cnt;
+    struct srv_target	     srv[PJSIP_MAX_RESOLVED_ADDRESSES];
+
+    /* Number of hosts in SRV records that the IP address has been resolved */
+    unsigned		     host_resolved;
+};
+
+
+struct pjsip_resolver_t
+{
+    pj_dns_resolver *res;
+    unsigned	     job_id;
+};
+
+static void dns_callback(void *user_data,
+			 pj_status_t status,
+			 pj_dns_parsed_packet *response);
+
+
+/*
+ * Public API to create the resolver.
+ */
+PJ_DEF(pj_status_t) pjsip_resolver_create( pj_pool_t *pool,
+					   pjsip_resolver_t **p_res)
+{
+    pjsip_resolver_t *resolver;
+
+    PJ_ASSERT_RETURN(pool && p_res, PJ_EINVAL);
+    resolver = pj_pool_zalloc(pool, sizeof(*resolver));
+    *p_res = resolver;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Public API to set the DNS resolver instance for the SIP resolver.
+ */
+PJ_DEF(pj_status_t) pjsip_resolver_set_resolver(pjsip_resolver_t *res,
+						pj_dns_resolver *dns_res)
+{
+#if PJSIP_HAS_RESOLVER
+    res->res = dns_res;
+    return PJ_SUCCESS;
+#else
+    PJ_UNUSED_ARG(res);
+    PJ_UNUSED_ARG(dns_res);
+    pj_assert(!"Resolver is disabled (PJSIP_HAS_RESOLVER==0)");
+    return PJ_EINVALIDOP;
+#endif
+}
+
+
+/*
+ * Public API to get the internal DNS resolver.
+ */
+PJ_DEF(pj_dns_resolver*) pjsip_resolver_get_resolver(pjsip_resolver_t *res)
+{
+    return res->res;
+}
+
+
+/*
+ * Public API to create destroy the resolver
+ */
+PJ_DEF(void) pjsip_resolver_destroy(pjsip_resolver_t *resolver)
+{
+    if (resolver->res) {
+#if PJSIP_HAS_RESOLVER
+	pj_dns_resolver_destroy(resolver->res, PJ_FALSE);
+#endif
+	resolver->res = NULL;
+    }
+}
+
+/*
+ * Internal:
+ *  determine if an address is a valid IP address.
+ */
+static int is_str_ip(const pj_str_t *host)
+{
+    const char *p = host->ptr;
+    const char *end = ((const char*)host->ptr) + host->slen;
+
+    while (p != end) {
+	if (pj_isdigit(*p) || *p=='.') {
+	    ++p;
+	} else {
+	    return 0;
+	}
+    }
+    return 1;
+}
+
+
+/*
+ * This is the main function for performing server resolution.
+ */
+PJ_DEF(void) pjsip_resolve( pjsip_resolver_t *resolver,
+			    pj_pool_t *pool,
+			    const pjsip_host_info *target,
+			    void *token,
+			    pjsip_resolver_callback *cb)
+{
+    pjsip_server_addresses svr_addr;
+    pj_status_t status = PJ_SUCCESS;
+    int is_ip_addr;
+    struct query *query;
+    pj_str_t srv_name;
+    pjsip_transport_type_e type = target->type;
+
+    /* Is it IP address or hostname?. */
+    is_ip_addr = is_str_ip(&target->addr.host);
+
+    /* Set the transport type if not explicitly specified. 
+     * RFC 3263 section 4.1 specify rules to set up this.
+     */
+    if (type == PJSIP_TRANSPORT_UNSPECIFIED) {
+	if (is_ip_addr || (target->addr.port != 0)) {
+#if PJ_HAS_TCP
+	    if (target->flag & PJSIP_TRANSPORT_SECURE) 
+	    {
+		type = PJSIP_TRANSPORT_TLS;
+	    } else if (target->flag & PJSIP_TRANSPORT_RELIABLE) 
+	    {
+		type = PJSIP_TRANSPORT_TCP;
+	    } else 
+#endif
+	    {
+		type = PJSIP_TRANSPORT_UDP;
+	    }
+	} else {
+	    /* No type or explicit port is specified, and the address is
+	     * not IP address.
+	     * In this case, full resolution must be performed.
+	     * But we don't support it (yet).
+	     */
+	    type = PJSIP_TRANSPORT_UDP;
+	}
+    }
+
+
+    /* If target is an IP address, or if resolver is not configured, 
+     * we can just finish the resolution now using pj_gethostbyname()
+     */
+    if (is_ip_addr || resolver->res == NULL) {
+
+	pj_in_addr ip_addr;
+	pj_uint16_t srv_port;
+
+	if (!is_ip_addr) {
+	    PJ_LOG(5,(THIS_FILE, 
+		      "DNS resolver not available, target '%.*s:%d' type=%s "
+		      "will be resolved with gethostbyname()",
+		      target->addr.host.slen,
+		      target->addr.host.ptr,
+		      target->addr.port,
+		      pjsip_transport_get_type_name(target->type)));
+	}
+
+	/* Set the port number if not specified. */
+	if (target->addr.port == 0) {
+	   srv_port = (pj_uint16_t)
+		      pjsip_transport_get_default_port_for_type(type);
+	} else {
+	   srv_port = (pj_uint16_t)target->addr.port;
+	}
+
+	/* This will eventually call pj_gethostbyname() if the host
+	 * is not an IP address.
+	 */
+	status = pj_sockaddr_in_init((pj_sockaddr_in*)&svr_addr.entry[0].addr,
+				      &target->addr.host, srv_port);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+
+	/* Call the callback. */
+	ip_addr = ((pj_sockaddr_in*)&svr_addr.entry[0].addr)->sin_addr;
+	PJ_LOG(5,(THIS_FILE, 
+		  "Target '%.*s:%d' type=%s resolved to "
+		  "'%s:%d' type=%s",
+		  (int)target->addr.host.slen,
+		  target->addr.host.ptr,
+		  target->addr.port,
+		  pjsip_transport_get_type_name(target->type),
+		  pj_inet_ntoa(ip_addr),
+		  srv_port,
+		  pjsip_transport_get_type_name(type)));
+	svr_addr.count = 1;
+	svr_addr.entry[0].priority = 0;
+	svr_addr.entry[0].weight = 0;
+	svr_addr.entry[0].type = type;
+	svr_addr.entry[0].addr_len = sizeof(pj_sockaddr_in);
+	(*cb)(status, token, &svr_addr);
+
+	/* Done. */
+	return;
+    }
+
+    /* Target is not an IP address so we need to resolve it. */
+#if PJSIP_HAS_RESOLVER
+
+    /* Build the query state */
+    query = pj_pool_zalloc(pool, sizeof(struct query));
+    pj_ansi_snprintf(query->objname, sizeof(query->objname), "rsvjob%X",
+		     resolver->job_id++);
+    query->resolver = resolver;
+    query->token = token;
+    query->cb = cb;
+    query->req.target = *target;
+    pj_strdup(pool, &query->req.target.addr.host, &target->addr.host);
+
+    /* If port is not specified, start with SRV resolution
+     * (should be with NAPTR, but we'll do that later)
+     */
+    PJ_TODO(SUPPORT_DNS_NAPTR);
+
+    /* Build dummy NAPTR entry */
+    query->naptr_cnt = 1;
+    pj_bzero(&query->naptr[0], sizeof(query->naptr[0]));
+    query->naptr[0].order = 0;
+    query->naptr[0].pref = 0;
+    query->naptr[0].type = type;
+    query->naptr[0].target_name.ptr = 
+	pj_pool_alloc(pool, target->addr.host.slen + 12);
+
+    if (type == PJSIP_TRANSPORT_TLS)
+	pj_strcpy2(&query->naptr[0].target_name, "_sips._tcp.");
+    else if (type == PJSIP_TRANSPORT_TCP)
+	pj_strcpy2(&query->naptr[0].target_name, "_sip._tcp.");
+    else if (type == PJSIP_TRANSPORT_UDP)
+	pj_strcpy2(&query->naptr[0].target_name, "_sip._udp.");
+    else {
+	pj_assert(!"Unknown transport type");
+	pj_strcpy2(&query->naptr[0].target_name, "_sip._udp.");
+    }
+    pj_strcat(&query->naptr[0].target_name, &target->addr.host);
+
+
+    /* Start DNS SRV or A resolution, depending on whether port is specified */
+    if (target->addr.port == 0) {
+	query->dns_state = PJ_DNS_TYPE_SRV;
+	srv_name = query->naptr[0].target_name;
+
+    } else {
+	/* Otherwise if port is specified, start with A (or AAAA) host 
+	 * resolution 
+	 */
+	query->dns_state = PJ_DNS_TYPE_A;
+
+	/* Since we don't perform SRV resolution, pretend that we'ee already
+	 * done so by inserting a dummy SRV record.
+	 */
+
+	query->srv_cnt = 1;
+	pj_bzero(&query->srv[0], sizeof(query->srv[0]));
+	query->srv[0].target_name = query->req.target.addr.host;
+	query->srv[0].type = type;
+	query->srv[0].port = query->req.target.addr.port;
+	query->srv[0].priority = 0;
+	query->srv[0].weight = 0;
+
+	srv_name = query->srv[0].target_name;
+    }
+
+    /* Start the asynchronous query */
+    PJ_LOG(5, (query->objname, 
+	       "Starting async DNS %s query: target=%.*s, transport=%s, "
+	       "port=%d",
+	       pj_dns_get_type_name(query->dns_state),
+	       (int)srv_name.slen, srv_name.ptr,
+	       pjsip_transport_get_type_name(target->type),
+	       target->addr.port));
+
+    status = pj_dns_resolver_start_query(resolver->res, &srv_name, 
+				         query->dns_state, 0, &dns_callback,
+    					 query, &query->object);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    return;
+
+#else /* PJSIP_HAS_RESOLVER */
+    PJ_UNUSED_ARG(pool);
+    PJ_UNUSED_ARG(query);
+    PJ_UNUSED_ARG(srv_name);
+#endif /* PJSIP_HAS_RESOLVER */
+
+on_error:
+    if (status != PJ_SUCCESS) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+	PJ_LOG(4,(THIS_FILE, "Failed to resolve '%.*s'. Err=%d (%s)",
+			     (int)target->addr.host.slen,
+			     target->addr.host.ptr,
+			     status,
+			     pj_strerror(status,errmsg,sizeof(errmsg)).ptr));
+	(*cb)(status, token, NULL);
+	return;
+    }
+}
+
+/*
+ * The rest of the code should only get compiled when resolver is enabled
+ */
+#if PJSIP_HAS_RESOLVER
+
+#define SWAP(type,ptr1,ptr2)	if (ptr1 != ptr2) { \
+				  type tmp; \
+				  pj_memcpy(&tmp, ptr1, sizeof(type)); \
+				  pj_memcpy(ptr1, ptr2, sizeof(type)); \
+				  (ptr1)->target_name.ptr = (ptr1)->target_buf; \
+				  pj_memcpy(ptr2, &tmp, sizeof(type)); \
+				  (ptr2)->target_name.ptr = (ptr2)->target_buf; \
+				} else {}
+
+/* Build server entries in the query based on received SRV response */
+static void build_server_entries(struct query *query, 
+				 pj_dns_parsed_packet *response)
+{
+    unsigned i;
+    unsigned naptr_id;
+
+    /* Find NAPTR target which corresponds to this SRV target */
+    for (naptr_id=0; naptr_id < query->naptr_cnt; ++naptr_id) {
+	if (pj_stricmp(&query->naptr[naptr_id].target_name,
+		       &response->ans[0].name)==0)
+	    break;
+    }
+    if (naptr_id == query->naptr_cnt) {
+	PJ_LOG(4,(query->objname, 
+		  "Unable to find NAPTR record for SRV name %.*s!",
+		  (int)response->ans[0].name.slen, 
+		  response->ans[0].name.ptr));
+	return;
+    }
+
+
+    /* Save the Resource Records in DNS answer into SRV targets. */
+    query->srv_cnt = 0;
+    for (i=0; i<response->hdr.anscount && 
+	      query->srv_cnt < PJSIP_MAX_RESOLVED_ADDRESSES; ++i) 
+    {
+	pj_dns_parsed_rr *rr = &response->ans[i];
+	struct srv_target *srv = &query->srv[query->srv_cnt];
+
+	if (rr->type != PJ_DNS_TYPE_SRV) {
+	    PJ_LOG(4,(query->objname, 
+		      "Received non SRV answer for SRV query!"));
+	    continue;
+	}
+
+	if (rr->rdata.srv.target.slen > PJ_MAX_HOSTNAME) {
+	    PJ_LOG(4,(query->objname, "Hostname is too long!"));
+	    continue;
+	}
+
+	/* Build the SRV entry for RR */
+	pj_bzero(srv, sizeof(*srv));
+	pj_memcpy(srv->target_buf, rr->rdata.srv.target.ptr, 
+		  rr->rdata.srv.target.slen);
+	srv->target_name.ptr = srv->target_buf;
+	srv->target_name.slen = rr->rdata.srv.target.slen;
+	srv->type = query->naptr[naptr_id].type;
+	srv->port = rr->rdata.srv.port;
+	srv->priority = rr->rdata.srv.prio;
+	srv->weight = rr->rdata.srv.weight;
+	
+	++query->srv_cnt;
+    }
+
+    /* First pass: 
+     *	order the entries based on priority.
+     */
+    for (i=0; i<query->srv_cnt-1; ++i) {
+	unsigned min = i, j;
+	for (j=i+1; j<query->srv_cnt; ++j) {
+	    if (query->srv[j].priority < query->srv[min].priority)
+		min = j;
+	}
+	SWAP(struct srv_target, &query->srv[i], &query->srv[min]);
+    }
+
+    /* Second pass:
+     *	pick one host among hosts with the same priority, according
+     *	to its weight. The idea is when one server fails, client should
+     *	contact the next server with higher priority rather than contacting
+     *	server with the same priority as the failed one.
+     *
+     *  The algorithm for selecting server among servers with the same
+     *  priority is described in RFC 2782.
+     */
+    for (i=0; i<query->srv_cnt; ++i) {
+	unsigned j, count=1, sum;
+
+	/* Calculate running sum for servers with the same priority */
+	sum = query->srv[i].sum = query->srv[i].weight;
+	for (j=i+1; j<query->srv_cnt && 
+		    query->srv[j].priority == query->srv[i].priority; ++j)
+	{
+	    sum += query->srv[j].weight;
+	    query->srv[j].sum = sum;
+	    ++count;
+	}
+
+	if (count > 1) {
+	    unsigned r;
+
+	    /* Elect one random number between zero and the total sum of
+	     * weight (inclusive).
+	     */
+	    r = pj_rand() % (sum + 1);
+
+	    /* Select the first server which running sum is greater than or
+	     * equal to the random number.
+	     */
+	    for (j=i; j<i+count; ++j) {
+		if (query->srv[j].sum >= r)
+		    break;
+	    }
+
+	    /* Must have selected one! */
+	    pj_assert(j != i+count);
+
+	    /* Put this entry in front (of entries with same priority) */
+	    SWAP(struct srv_target, &query->srv[i], &query->srv[j]);
+
+	    /* Remove all other entries (of the same priority) */
+	    while (count > 1) {
+		pj_array_erase(query->srv, sizeof(struct srv_target), 
+			       query->srv_cnt, i+1);
+		--count;
+		--query->srv_cnt;
+	    }
+	}
+    }
+
+    /* Since we've been moving around SRV entries, update the pointers
+     * in target_name.
+     */
+    for (i=0; i<query->srv_cnt; ++i) {
+	query->srv[i].target_name.ptr = query->srv[i].target_buf;
+    }
+
+    /* Check for Additional Info section if A records are available, and
+     * fill in the IP address (so that we won't need to resolve the A 
+     * record with another DNS query). 
+     */
+    for (i=0; i<response->hdr.arcount; ++i) {
+	pj_dns_parsed_rr *rr = &response->arr[i];
+	unsigned j;
+
+	if (rr->type != PJ_DNS_TYPE_A)
+	    continue;
+
+	/* Yippeaiyee!! There is an "A" record! 
+	 * Update the IP address of the corresponding SRV record.
+	 */
+	for (j=0; j<query->srv_cnt; ++j) {
+	    if (pj_stricmp(&rr->name, &query->srv[j].target_name)==0) {
+		unsigned cnt = query->srv[j].addr_cnt;
+		query->srv[j].addr[cnt].s_addr = rr->rdata.a.ip_addr.s_addr;
+		++query->srv[j].addr_cnt;
+		++query->host_resolved;
+		break;
+	    }
+	}
+
+	/* Not valid message; SRV entry might have been deleted in
+	 * server selection process.
+	 */
+	/*
+	if (j == query->srv_cnt) {
+	    PJ_LOG(4,(query->objname, 
+		      "Received DNS SRV answer with A record, but "
+		      "couldn't find matching name (name=%.*s)",
+		      (int)rr->name.slen,
+		      rr->name.ptr));
+	}
+	*/
+    }
+
+    /* Rescan again the name specified in the SRV record to see if IP
+     * address is specified as the target name (unlikely, but well, who 
+     * knows..).
+     */
+    for (i=0; i<query->srv_cnt; ++i) {
+	pj_in_addr addr;
+
+	if (query->srv[i].addr_cnt != 0) {
+	    /* IP address already resolved */
+	    continue;
+	}
+
+	if (pj_inet_aton(&query->srv[i].target_name, &addr) != 0) {
+	    query->srv[i].addr[query->srv[i].addr_cnt++] = addr;
+	    ++query->host_resolved;
+	}
+    }
+
+    /* Print resolved entries to the log */
+    PJ_LOG(5,(query->objname, 
+	      "SRV query for %.*s completed, "
+	      "%d of %d total entries selected%c",
+	      (int)query->naptr[naptr_id].target_name.slen,
+	      query->naptr[naptr_id].target_name.ptr,
+	      query->srv_cnt,
+	      response->hdr.anscount,
+	      (query->srv_cnt ? ':' : ' ')));
+
+    for (i=0; i<query->srv_cnt; ++i) {
+	const char *addr;
+
+	if (query->srv[i].addr_cnt != 0)
+	    addr = pj_inet_ntoa(query->srv[i].addr[0]);
+	else
+	    addr = "-";
+
+	PJ_LOG(5,(query->objname, 
+		  " %d: SRV %d %d %d %.*s (%s)",
+		  i, query->srv[i].priority, 
+		  query->srv[i].weight, 
+		  query->srv[i].port, 
+		  (int)query->srv[i].target_name.slen, 
+		  query->srv[i].target_name.ptr,
+		  addr));
+    }
+}
+
+
+/* Start DNS A record queries for all SRV records in the query structure */
+static pj_status_t resolve_hostnames(struct query *query)
+{
+    unsigned i;
+    pj_status_t err=PJ_SUCCESS, status;
+
+    query->dns_state = PJ_DNS_TYPE_A;
+    for (i=0; i<query->srv_cnt; ++i) {
+	PJ_LOG(5, (query->objname, 
+		   "Starting async DNS A query for %.*s",
+		   (int)query->srv[i].target_name.slen, 
+		   query->srv[i].target_name.ptr));
+
+	status = pj_dns_resolver_start_query(query->resolver->res,
+					     &query->srv[i].target_name,
+					     PJ_DNS_TYPE_A, 0,
+					     &dns_callback,
+					     query, NULL);
+	if (status != PJ_SUCCESS) {
+	    query->host_resolved++;
+	    err = status;
+	}
+    }
+    
+    return (query->host_resolved == query->srv_cnt) ? err : PJ_SUCCESS;
+}
+
+/* 
+ * This callback is called by PJLIB-UTIL DNS resolver when asynchronous
+ * query has completed (successfully or with error).
+ */
+static void dns_callback(void *user_data,
+			 pj_status_t status,
+			 pj_dns_parsed_packet *pkt)
+{
+    struct query *query = user_data;
+    unsigned i;
+
+    /* Proceed to next stage */
+
+    if (query->dns_state == PJ_DNS_TYPE_SRV) {
+
+	/* We are getting SRV response */
+
+	if (status == PJ_SUCCESS && pkt->hdr.anscount != 0) {
+	    /* Got SRV response, build server entry. If A records are available
+	     * in additional records section of the DNS response, save them too.
+	     */
+	    build_server_entries(query, pkt);
+
+	} else if (status != PJ_SUCCESS) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+	    unsigned naptr_id;
+
+	    /* Update query last error */
+	    query->last_error = status;
+
+	    /* Find which NAPTR target has not got SRV records */
+	    for (naptr_id=0; naptr_id < query->naptr_cnt; ++naptr_id) {
+		for (i=0; i<query->srv_cnt; ++i) {
+		    if (query->srv[i].type == query->naptr[naptr_id].type)
+			break;
+		}
+		if (i == query->srv_cnt)
+		    break;
+	    }
+	    if (naptr_id == query->naptr_cnt) {
+		/* Strangely all NAPTR records seem to already have SRV
+		 * records! This is quite unexpected, by anyway lets set
+		 * the naptr_id to zero just in case.
+		 */
+		pj_assert(!"Strange");
+		naptr_id = 0;
+
+	    }
+
+	    pj_strerror(status, errmsg, sizeof(errmsg));
+	    PJ_LOG(4,(query->objname, 
+		      "DNS SRV resolution failed for %.*s: %s", 
+		      (int)query->naptr[naptr_id].target_name.slen, 
+		      query->naptr[naptr_id].target_name.ptr,
+		      errmsg));
+	}
+
+	/* If we can't build SRV record, assume the original target is
+	 * an A record.
+	 */
+	if (query->srv_cnt == 0) {
+	    /* Looks like we aren't getting any SRV responses.
+	     * Resolve the original target as A record by creating a 
+	     * single "dummy" srv record and start the hostname resolution.
+	     */
+	    unsigned naptr_id;
+
+	    /* Find which NAPTR target has not got SRV records */
+	    for (naptr_id=0; naptr_id < query->naptr_cnt; ++naptr_id) {
+		for (i=0; i<query->srv_cnt; ++i) {
+		    if (query->srv[i].type == query->naptr[naptr_id].type)
+			break;
+		}
+		if (i == query->srv_cnt)
+		    break;
+	    }
+	    if (naptr_id == query->naptr_cnt) {
+		/* Strangely all NAPTR records seem to already have SRV
+		 * records! This is quite unexpected, by anyway lets set
+		 * the naptr_id to zero just in case.
+		 */
+		pj_assert(!"Strange");
+		naptr_id = 0;
+
+	    }
+
+	    PJ_LOG(4, (query->objname, 
+		       "DNS SRV resolution failed for %.*s, trying "
+		       "resolving A record for %.*s",
+		       (int)query->naptr[naptr_id].target_name.slen, 
+		       query->naptr[naptr_id].target_name.ptr,
+		       (int)query->req.target.addr.host.slen,
+		       query->req.target.addr.host.ptr));
+
+	    /* Create a "dummy" srv record using the original target */
+	    i = query->srv_cnt++;
+	    pj_bzero(&query->srv[i], sizeof(query->srv[i]));
+	    query->srv[i].target_name = query->req.target.addr.host;
+	    query->srv[i].type = query->naptr[naptr_id].type;
+	    query->srv[i].priority = 0;
+	    query->srv[i].weight = 0;
+
+	    query->srv[i].port = query->req.target.addr.port;
+	    if (query->srv[i].port == 0) {
+		query->srv[i].port = (pj_uint16_t)
+		 pjsip_transport_get_default_port_for_type(query->srv[i].type);
+	    }
+	} 
+	
+
+	/* Resolve server hostnames (DNS A record) for hosts which don't have
+	 * A record yet.
+	 */
+	if (query->host_resolved != query->srv_cnt) {
+	    status = resolve_hostnames(query);
+	    if (status != PJ_SUCCESS)
+		goto on_error;
+
+	    /* Must return now. Callback may have been called and query
+	     * may have been destroyed.
+	     */
+	    return;
+	}
+
+    } else if (query->dns_state == PJ_DNS_TYPE_A) {
+
+	/* Check that we really have answer */
+	if (status==PJ_SUCCESS && pkt->hdr.anscount != 0) {
+
+	    /* Update IP address of the corresponding hostname */
+	    for (i=0; i<query->srv_cnt; ++i) {
+		if (pj_stricmp(&pkt->ans[0].name, 
+			       &query->srv[i].target_name)==0) 
+		{
+		    break;
+		}
+	    }
+
+	    if (i == query->srv_cnt) {
+		PJ_LOG(4,(query->objname, 
+			  "Received answer to DNS A request with no matching "
+			  "SRV record! The unknown name is %.*s",
+			  (int)pkt->ans[0].name.slen, pkt->ans[0].name.ptr));
+	    } else {
+		unsigned j;
+
+		query->srv[i].addr[query->srv[i].addr_cnt++].s_addr =
+		    pkt->ans[0].rdata.a.ip_addr.s_addr;
+
+		PJ_LOG(5,(query->objname, 
+			  "DNS A for %.*s: %s",
+			  (int)query->srv[i].target_name.slen, 
+			  query->srv[i].target_name.ptr,
+			  pj_inet_ntoa(pkt->ans[0].rdata.a.ip_addr)));
+
+		/* Check for multiple IP addresses */
+		for (j=1; j<pkt->hdr.anscount && 
+			    query->srv[i].addr_cnt < ADDR_MAX_COUNT; ++j)
+		{
+		    query->srv[i].addr[query->srv[i].addr_cnt++].s_addr = 
+			pkt->ans[j].rdata.a.ip_addr.s_addr;
+
+		    PJ_LOG(5,(query->objname, 
+			      "Additional DNS A for %.*s: %s",
+			      (int)query->srv[i].target_name.slen, 
+			      query->srv[i].target_name.ptr,
+			      pj_inet_ntoa(pkt->ans[j].rdata.a.ip_addr)));
+		}
+	    }
+
+	} else if (status != PJ_SUCCESS) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+
+	    /* Update last error */
+	    query->last_error = status;
+
+	    /* Log error */
+	    pj_strerror(status, errmsg, sizeof(errmsg));
+	    PJ_LOG(4,(query->objname, "DNS A record resolution failed: %s", 
+		      errmsg));
+	}
+
+	++query->host_resolved;
+
+    } else {
+	pj_assert(!"Unexpected state!");
+	query->last_error = status = PJ_EINVALIDOP;
+	goto on_error;
+    }
+
+    /* Check if all hosts have been resolved */
+    if (query->host_resolved == query->srv_cnt) {
+	/* Got all answers, build server addresses */
+	pjsip_server_addresses svr_addr;
+
+	svr_addr.count = 0;
+	for (i=0; i<query->srv_cnt; ++i) {
+	    unsigned j;
+
+	    /* Do we have IP address for this server? */
+	    /* This log is redundant really.
+	    if (query->srv[i].addr_cnt == 0) {
+		PJ_LOG(5,(query->objname, 
+			  " SRV target %.*s:%d does not have IP address!",
+			  (int)query->srv[i].target_name.slen,
+			  query->srv[i].target_name.ptr,
+			  query->srv[i].port));
+		continue;
+	    }
+	    */
+
+	    for (j=0; j<query->srv[i].addr_cnt; ++j) {
+		unsigned idx = svr_addr.count;
+		pj_sockaddr_in *addr;
+
+		svr_addr.entry[idx].type = query->srv[i].type;
+		svr_addr.entry[idx].priority = query->srv[i].priority;
+		svr_addr.entry[idx].weight = query->srv[i].weight;
+		svr_addr.entry[idx].addr_len = sizeof(pj_sockaddr_in);
+	     
+		addr = (pj_sockaddr_in*)&svr_addr.entry[idx].addr;
+		pj_bzero(addr, sizeof(pj_sockaddr_in));
+		addr->sin_family = PJ_AF_INET;
+		addr->sin_addr = query->srv[i].addr[j];
+		addr->sin_port = pj_htons((pj_uint16_t)query->srv[i].port);
+
+		++svr_addr.count;
+	    }
+	}
+
+	PJ_LOG(5,(query->objname, 
+		  "Server resolution complete, %d server entry(s) found",
+		  svr_addr.count));
+
+
+	if (svr_addr.count > 0)
+	    status = PJ_SUCCESS;
+	else {
+	    status = query->last_error;
+	    if (status == PJ_SUCCESS)
+		status = PJLIB_UTIL_EDNSNOANSWERREC;
+	}
+
+	/* Call the callback */
+	(*query->cb)(status, query->token, &svr_addr);
+    }
+
+
+    return;
+
+on_error:
+    /* Check for failure */
+    if (status != PJ_SUCCESS) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+	PJ_LOG(4,(query->objname, 
+		  "DNS %s record resolution error for '%.*s'."
+		  " Err=%d (%s)",
+		  pj_dns_get_type_name(query->dns_state),
+		  (int)query->req.target.addr.host.slen,
+		  query->req.target.addr.host.ptr,
+		  status,
+		  pj_strerror(status,errmsg,sizeof(errmsg)).ptr));
+	(*query->cb)(status, query->token, NULL);
+	return;
+    }
+}
+
+#endif	/* PJSIP_HAS_RESOLVER */
+
+
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_tel_uri.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_tel_uri.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_tel_uri.c	(revision 1163)
@@ -0,0 +1,441 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_tel_uri.h>
+#include <pjsip/sip_msg.h>
+#include <pjsip/sip_parser.h>
+#include <pjsip/print_util.h>
+#include <pj/pool.h>
+#include <pj/assert.h>
+#include <pj/string.h>
+#include <pj/ctype.h>
+#include <pj/except.h>
+#include <pjlib-util/string.h>
+#include <pjlib-util/scanner.h>
+
+#define ALPHA
+#define DIGITS		    "0123456789"
+#define HEX		    "aAbBcCdDeEfF"
+#define HEX_DIGITS	    DIGITS HEX
+#define VISUAL_SEP	    "-.()"
+#define PHONE_DIGITS	    DIGITS VISUAL_SEP
+#define GLOBAL_DIGITS	    "+" PHONE_DIGITS
+#define LOCAL_DIGITS	    HEX_DIGITS "*#" VISUAL_SEP
+#define NUMBER_SPEC	    LOCAL_DIGITS GLOBAL_DIGITS
+#define PHONE_CONTEXT	    ALPHA GLOBAL_DIGITS
+//#define RESERVED	    ";/?:@&=+$,"
+#define RESERVED	    "/:@&$,+"
+#define MARK		    "-_.!~*'()"
+#define UNRESERVED	    ALPHA DIGITS MARK
+#define ESCAPED		    "%"
+#define URIC		    RESERVED UNRESERVED ESCAPED "[]+"
+#define PARAM_UNRESERVED    "[]/:&+$"
+#define PARAM_CHAR	    PARAM_UNRESERVED UNRESERVED ESCAPED
+
+static pj_cis_buf_t cis_buf;
+static pj_cis_t pjsip_TEL_NUMBER_SPEC;
+static pj_cis_t pjsip_TEL_EXT_VALUE_SPEC;
+static pj_cis_t pjsip_TEL_PHONE_CONTEXT_SPEC;
+static pj_cis_t pjsip_TEL_URIC_SPEC;
+static pj_cis_t pjsip_TEL_VISUAL_SEP_SPEC;
+static pj_cis_t pjsip_TEL_PNAME_SPEC;
+static pj_cis_t pjsip_TEL_PVALUE_SPEC;
+static pj_cis_t pjsip_TEL_PVALUE_SPEC_ESC;
+static pj_cis_t pjsip_TEL_PARSING_PVALUE_SPEC;
+static pj_cis_t pjsip_TEL_PARSING_PVALUE_SPEC_ESC;
+
+static pj_str_t pjsip_ISUB_STR = { "isub", 4 };
+static pj_str_t pjsip_EXT_STR = { "ext", 3 };
+static pj_str_t pjsip_PH_CTX_STR = { "phone-context", 13 };
+
+
+static const pj_str_t *tel_uri_get_scheme( const pjsip_tel_uri* );
+static void *tel_uri_get_uri( pjsip_tel_uri* );
+static pj_ssize_t tel_uri_print( pjsip_uri_context_e context,
+				 const pjsip_tel_uri *url, 
+				 char *buf, pj_size_t size);
+static int tel_uri_cmp( pjsip_uri_context_e context,
+			const pjsip_tel_uri *url1, const pjsip_tel_uri *url2);
+static pjsip_tel_uri* tel_uri_clone(pj_pool_t *pool, const pjsip_tel_uri *rhs);
+static void*	      tel_uri_parse( pj_scanner *scanner, pj_pool_t *pool,
+				     pj_bool_t parse_params);
+
+#ifdef __GNUC__
+#  define HAPPY_FLAG	(void*)
+#else
+#  define HAPPY_FLAG
+#endif
+
+static pjsip_uri_vptr tel_uri_vptr = 
+{
+    HAPPY_FLAG &tel_uri_get_scheme,
+    HAPPY_FLAG &tel_uri_get_uri,
+    HAPPY_FLAG &tel_uri_print,
+    HAPPY_FLAG &tel_uri_cmp,
+    HAPPY_FLAG &tel_uri_clone
+};
+
+
+PJ_DEF(pjsip_tel_uri*) pjsip_tel_uri_create(pj_pool_t *pool)
+{
+    pjsip_tel_uri *uri = pj_pool_zalloc(pool, sizeof(pjsip_tel_uri));
+    uri->vptr = &tel_uri_vptr;
+    pj_list_init(&uri->other_param);
+    return uri;
+}
+
+
+static const pj_str_t *tel_uri_get_scheme( const pjsip_tel_uri *uri )
+{
+    PJ_UNUSED_ARG(uri);
+    return &pjsip_TEL_STR;
+}
+
+static void *tel_uri_get_uri( pjsip_tel_uri *uri )
+{
+    return uri;
+}
+
+
+pj_status_t pjsip_tel_uri_subsys_init(void)
+{
+    pj_status_t status;
+
+    pj_cis_buf_init(&cis_buf);
+
+    status = pj_cis_init(&cis_buf, &pjsip_TEL_EXT_VALUE_SPEC);
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    pj_cis_add_str(&pjsip_TEL_EXT_VALUE_SPEC, PHONE_DIGITS);
+
+    status = pj_cis_init(&cis_buf, &pjsip_TEL_NUMBER_SPEC);
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    pj_cis_add_str(&pjsip_TEL_NUMBER_SPEC, NUMBER_SPEC);
+
+    status = pj_cis_init(&cis_buf, &pjsip_TEL_VISUAL_SEP_SPEC);
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    pj_cis_add_str(&pjsip_TEL_VISUAL_SEP_SPEC, VISUAL_SEP);
+
+    status = pj_cis_init(&cis_buf, &pjsip_TEL_PHONE_CONTEXT_SPEC);
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    pj_cis_add_alpha(&pjsip_TEL_PHONE_CONTEXT_SPEC);
+    pj_cis_add_num(&pjsip_TEL_PHONE_CONTEXT_SPEC);
+    pj_cis_add_str(&pjsip_TEL_PHONE_CONTEXT_SPEC, PHONE_CONTEXT);
+
+    status = pj_cis_init(&cis_buf, &pjsip_TEL_URIC_SPEC);
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    pj_cis_add_alpha(&pjsip_TEL_URIC_SPEC);
+    pj_cis_add_num(&pjsip_TEL_URIC_SPEC);
+    pj_cis_add_str(&pjsip_TEL_URIC_SPEC, URIC);
+
+    status = pj_cis_init(&cis_buf, &pjsip_TEL_PNAME_SPEC);
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    pj_cis_add_alpha(&pjsip_TEL_PNAME_SPEC);
+    pj_cis_add_num(&pjsip_TEL_PNAME_SPEC);
+    pj_cis_add_str(&pjsip_TEL_PNAME_SPEC, "-");
+
+    status = pj_cis_init(&cis_buf, &pjsip_TEL_PVALUE_SPEC);
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    pj_cis_add_alpha(&pjsip_TEL_PVALUE_SPEC);
+    pj_cis_add_num(&pjsip_TEL_PVALUE_SPEC);
+    pj_cis_add_str(&pjsip_TEL_PVALUE_SPEC, PARAM_CHAR);
+
+    status = pj_cis_dup(&pjsip_TEL_PVALUE_SPEC_ESC, &pjsip_TEL_PVALUE_SPEC);
+    pj_cis_del_str(&pjsip_TEL_PVALUE_SPEC_ESC, "%");
+
+    status = pj_cis_dup(&pjsip_TEL_PARSING_PVALUE_SPEC, &pjsip_TEL_URIC_SPEC);
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+    pj_cis_add_cis(&pjsip_TEL_PARSING_PVALUE_SPEC, &pjsip_TEL_PVALUE_SPEC);
+    pj_cis_add_str(&pjsip_TEL_PARSING_PVALUE_SPEC, "=");
+
+    status = pj_cis_dup(&pjsip_TEL_PARSING_PVALUE_SPEC_ESC, 
+			&pjsip_TEL_PARSING_PVALUE_SPEC);
+    pj_cis_del_str(&pjsip_TEL_PARSING_PVALUE_SPEC_ESC, "%");
+
+    status = pjsip_register_uri_parser("tel", &tel_uri_parse);
+    PJ_ASSERT_RETURN(status==PJ_SUCCESS, status);
+
+    return PJ_SUCCESS;
+}
+
+/* Print tel: URI */
+static pj_ssize_t tel_uri_print( pjsip_uri_context_e context,
+				 const pjsip_tel_uri *uri, 
+				 char *buf, pj_size_t size)
+{
+    int printed;
+    char *startbuf = buf;
+    char *endbuf = buf+size;
+
+    PJ_UNUSED_ARG(context);
+
+    /* Print scheme. */
+    copy_advance(buf, pjsip_TEL_STR);
+    *buf++ = ':';
+
+    /* Print number. */
+    copy_advance_escape(buf, uri->number, pjsip_TEL_NUMBER_SPEC);
+
+    /* ISDN sub-address or extension must appear first. */
+
+    /* Extension param. */
+    copy_advance_pair_escape(buf, ";ext=", 5, uri->ext_param, 
+			     pjsip_TEL_EXT_VALUE_SPEC);
+
+    /* ISDN sub-address. */
+    copy_advance_pair_escape(buf, ";isub=", 6, uri->isub_param, 
+			     pjsip_TEL_URIC_SPEC);
+
+    /* Followed by phone context, if present. */
+    copy_advance_pair_escape(buf, ";phone-context=", 15, uri->context, 
+			     pjsip_TEL_PHONE_CONTEXT_SPEC);
+
+
+    /* Print other parameters. */
+    printed = pjsip_param_print_on(&uri->other_param, buf, (endbuf-buf), 
+				   &pjsip_TEL_PNAME_SPEC, 
+				   &pjsip_TEL_PVALUE_SPEC, ';');
+    if (printed < 0)
+	return -1;
+    buf += printed;
+
+    return (buf-startbuf);
+}
+
+/* Compare two numbers, according to RFC 3966:
+ *  - both must be either local or global numbers.
+ *  - The 'global-number-digits' and the 'local-number-digits' must be
+ *    equal, after removing all visual separators.
+ */
+PJ_DEF(int) pjsip_tel_nb_cmp(const pj_str_t *number1, const pj_str_t *number2)
+{
+    const char *s1 = number1->ptr,
+	       *e1 = number1->ptr + number1->slen,
+	       *s2 = number2->ptr,
+	       *e2 = number2->ptr + number2->slen;
+
+    /* Compare each number, ignoreing visual separators. */
+    while (s1!=e1 && s2!=e2) {
+	int diff;
+
+	if (pj_cis_match(&pjsip_TEL_VISUAL_SEP_SPEC, *s1)) {
+	    ++s1;
+	    continue;
+	}
+	if (pj_cis_match(&pjsip_TEL_VISUAL_SEP_SPEC, *s2)) {
+	    ++s2;
+	    continue;
+	}
+
+	diff = pj_tolower(*s1) - pj_tolower(*s2);
+	if (!diff) {
+	    ++s1, ++s2;
+	    continue;
+	} else
+	    return diff;
+    }
+
+    /* Exhaust remaining visual separators. */
+    while (s1!=e1 && pj_cis_match(&pjsip_TEL_VISUAL_SEP_SPEC, *s1))
+	++s1;
+    while (s2!=e2 && pj_cis_match(&pjsip_TEL_VISUAL_SEP_SPEC, *s2))
+	++s2;
+
+    if (s1==e1 && s2==e2)
+	return 0;
+    else if (s1==e1)
+	return -1;
+    else
+	return 1;
+}
+
+/* Compare two tel: URI */
+static int tel_uri_cmp( pjsip_uri_context_e context,
+			const pjsip_tel_uri *url1, const pjsip_tel_uri *url2)
+{
+    int result;
+
+    PJ_UNUSED_ARG(context);
+
+    /* Scheme must match. */
+    if (url1->vptr != url2->vptr)
+	return -1;
+
+    /* Compare number. */
+    result = pjsip_tel_nb_cmp(&url1->number, &url2->number);
+    if (result != 0)
+	return result;
+
+    /* Compare phone-context as hostname or as as global nb. */
+    if (url1->context.slen) {
+	if (*url1->context.ptr != '+')
+	    result = pj_stricmp(&url1->context, &url2->context);
+	else
+	    result = pjsip_tel_nb_cmp(&url1->context, &url2->context);
+
+	if (result != 0)
+	    return result;
+
+    } else if (url2->context.slen)
+	return -1;
+
+    /* Compare extension. */
+    if (url1->ext_param.slen) {
+	result = pjsip_tel_nb_cmp(&url1->ext_param, &url2->ext_param);
+	if (result != 0)
+	    return result;
+    }
+
+    /* Compare isub bytes by bytes. */
+    if (url1->isub_param.slen) {
+	result = pj_stricmp(&url1->isub_param, &url2->isub_param);
+	if (result != 0)
+	    return result;
+    }
+
+    /* Other parameters are compared regardless of the order.
+     * If one URI has parameter not found in the other URI, the URIs are
+     * not equal.
+     */
+    if (url1->other_param.next != &url1->other_param) {
+	const pjsip_param *p1, *p2;
+	int cnt1 = 0, cnt2 = 0;
+
+	p1 = url1->other_param.next;
+	while (p1 != &url1->other_param) {
+	    p2 = pjsip_param_cfind(&url2->other_param, &p1->name);
+	    if (!p2 )
+		return 1;
+
+	    result = pj_stricmp(&p1->value, &p2->value);
+	    if (result != 0)
+		return result;
+
+	    p1 = p1->next;
+	    ++cnt1;
+	}
+
+	p2 = url2->other_param.next;
+	while (p2 != &url2->other_param)
+	    ++cnt2, p2 = p2->next;
+
+	if (cnt1 < cnt2)
+	    return -1;
+	else if (cnt1 > cnt2)
+	    return 1;
+
+    } else if (url2->other_param.next != &url2->other_param)
+	return -1;
+
+    /* Equal. */
+    return 0;
+}
+
+/* Clone tel: URI */
+static pjsip_tel_uri* tel_uri_clone(pj_pool_t *pool, const pjsip_tel_uri *rhs)
+{
+    pjsip_tel_uri *uri = pjsip_tel_uri_create(pool);
+
+    pj_strdup(pool, &uri->number, &rhs->number);
+    pj_strdup(pool, &uri->context, &rhs->context);
+    pj_strdup(pool, &uri->ext_param, &rhs->ext_param);
+    pj_strdup(pool, &uri->isub_param, &rhs->isub_param);
+    pjsip_param_clone(pool, &uri->other_param, &rhs->other_param);
+
+    return uri;
+}
+
+/* Parse tel: URI 
+ * THis actually returns (pjsip_tel_uri *) type.
+ */
+static void* tel_uri_parse( pj_scanner *scanner, pj_pool_t *pool,
+			    pj_bool_t parse_params)
+{
+    pjsip_tel_uri *uri;
+    pj_str_t token;
+    int skip_ws = scanner->skip_ws;
+
+    scanner->skip_ws = 0;
+
+    /* Parse scheme. */
+    pj_scan_get(scanner, &pjsip_TOKEN_SPEC, &token);
+    if (pj_scan_get_char(scanner) != ':')
+	PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+    if (pj_stricmp_alnum(&token, &pjsip_TEL_STR) != 0)
+	PJ_THROW(PJSIP_SYN_ERR_EXCEPTION);
+
+    /* Create URI */
+    uri = pjsip_tel_uri_create(pool);
+
+    /* Get the phone number. */
+#if defined(PJSIP_UNESCAPE_IN_PLACE) && PJSIP_UNESCAPE_IN_PLACE!=0
+    pj_scan_get_unescape(scanner, &pjsip_TEL_NUMBER_SPEC, &uri->number);
+#else
+    pj_scan_get(scanner, &pjsip_TEL_NUMBER_SPEC, &uri->number);
+    uri->number = pj_str_unescape(pool, &uri->number);
+#endif
+
+    /* Get all parameters. */
+    if (parse_params && *scanner->curptr==';') {
+	pj_str_t pname, pvalue;
+
+	do {
+	    /* Eat the ';' separator. */
+	    pj_scan_get_char(scanner);
+
+	    /* Get pname. */
+	    pj_scan_get(scanner, &pjsip_PARAM_CHAR_SPEC, &pname);
+
+	    if (*scanner->curptr == '=') {
+		pj_scan_get_char(scanner);
+
+#		if defined(PJSIP_UNESCAPE_IN_PLACE) && PJSIP_UNESCAPE_IN_PLACE!=0
+		    pj_scan_get_unescape( scanner, 
+					  &pjsip_TEL_PARSING_PVALUE_SPEC_ESC,
+					  &pvalue);
+#		else
+		    pj_scan_get(scanner, &pjsip_TEL_PARSING_PVALUE_SPEC, 
+				&pvalue);
+		    pvalue = pj_str_unescape(pool, &pvalue);
+#		endif
+
+	    } else {
+		pvalue.slen = 0;
+		pvalue.ptr = NULL;
+	    }
+
+	    /* Save the parameters. */
+	    if (pj_stricmp_alnum(&pname, &pjsip_ISUB_STR)==0) {
+		uri->isub_param = pvalue;
+	    } else if (pj_stricmp_alnum(&pname, &pjsip_EXT_STR)==0) {
+		uri->ext_param = pvalue;
+	    } else if (pj_stricmp_alnum(&pname, &pjsip_PH_CTX_STR)==0) {
+		uri->context = pvalue;
+	    } else {
+		pjsip_param *param = pj_pool_alloc(pool, sizeof(pjsip_param));
+		param->name = pname;
+		param->value = pvalue;
+		pj_list_insert_before(&uri->other_param, param);
+	    }
+
+	} while (*scanner->curptr==';');
+    }
+
+    scanner->skip_ws = skip_ws;
+    return uri;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transaction.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transaction.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transaction.c	(revision 1163)
@@ -0,0 +1,2761 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_transaction.h>
+#include <pjsip/sip_util.h>
+#include <pjsip/sip_module.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_errno.h>
+#include <pjsip/sip_event.h>
+#include <pj/hash.h>
+#include <pj/pool.h>
+#include <pj/os.h>
+#include <pj/string.h>
+#include <pj/assert.h>
+#include <pj/guid.h>
+#include <pj/log.h>
+
+#define THIS_FILE   "sip_transaction.c"
+
+#if 0
+#define TSX_TRACE_(expr)    PJ_LOG(3,expr)
+#else
+#define TSX_TRACE_(expr)
+#endif
+
+/* When this macro is set, transaction will keep the hashed value
+ * so that future lookup (to unregister transaction) does not need
+ * to recalculate the hash again. It should gains a little bit of
+ * performance, so generally we'd want this.
+ */
+#define PRECALC_HASH
+
+
+/* Defined in sip_util_statefull.c */
+extern pjsip_module mod_stateful_util;
+
+
+/*****************************************************************************
+ **
+ ** Declarations and static variable definitions section.
+ **
+ *****************************************************************************
+ **/
+/* Prototypes. */
+static pj_status_t mod_tsx_layer_load(pjsip_endpoint *endpt);
+static pj_status_t mod_tsx_layer_start(void);
+static pj_status_t mod_tsx_layer_stop(void);
+static pj_status_t mod_tsx_layer_unload(void);
+static pj_bool_t   mod_tsx_layer_on_rx_request(pjsip_rx_data *rdata);
+static pj_bool_t   mod_tsx_layer_on_rx_response(pjsip_rx_data *rdata);
+
+/* Transaction layer module definition. */
+static struct mod_tsx_layer
+{
+    struct pjsip_module  mod;
+    pj_pool_t		*pool;
+    pjsip_endpoint	*endpt;
+    pj_mutex_t		*mutex;
+    pj_hash_table_t	*htable;
+} mod_tsx_layer = 
+{   {
+	NULL, NULL,			/* List's prev and next.    */
+	{ "mod-tsx-layer", 13 },	/* Module name.		    */
+	-1,				/* Module ID		    */
+	PJSIP_MOD_PRIORITY_TSX_LAYER,	/* Priority.		    */
+	mod_tsx_layer_load,		/* load().		    */
+	mod_tsx_layer_start,		/* start()		    */
+	mod_tsx_layer_stop,		/* stop()		    */
+	mod_tsx_layer_unload,		/* unload()		    */
+	mod_tsx_layer_on_rx_request,	/* on_rx_request()	    */
+	mod_tsx_layer_on_rx_response,	/* on_rx_response()	    */
+	NULL
+    }
+};
+
+/* Thread Local Storage ID for transaction lock */
+static long pjsip_tsx_lock_tls_id;
+
+/* Transaction state names */
+static const char *state_str[] = 
+{
+    "Null",
+    "Calling",
+    "Trying",
+    "Proceeding",
+    "Completed",
+    "Confirmed",
+    "Terminated",
+    "Destroyed",
+};
+
+/* Role names */
+static const char *role_name[] = 
+{
+    "UAC",
+    "UAS"
+};
+
+/* Transport flag. */
+enum
+{
+    TSX_HAS_PENDING_TRANSPORT	= 1,
+    TSX_HAS_PENDING_RESCHED	= 2,
+    TSX_HAS_PENDING_SEND	= 4,
+    TSX_HAS_PENDING_DESTROY	= 8,
+    TSX_HAS_RESOLVED_SERVER	= 16,
+};
+
+/* Transaction lock. */
+typedef struct tsx_lock_data {
+    struct tsx_lock_data *prev;
+    pjsip_transaction    *tsx;
+    int			  is_alive;
+} tsx_lock_data;
+
+
+/* Timer timeout value constants */
+static const pj_time_val t1_timer_val = { PJSIP_T1_TIMEOUT/1000, 
+                                          PJSIP_T1_TIMEOUT%1000 };
+static const pj_time_val t4_timer_val = { PJSIP_T4_TIMEOUT/1000, 
+                                          PJSIP_T4_TIMEOUT%1000 };
+static const pj_time_val td_timer_val = { PJSIP_TD_TIMEOUT/1000, 
+                                          PJSIP_TD_TIMEOUT%1000 };
+static const pj_time_val timeout_timer_val = { (64*PJSIP_T1_TIMEOUT)/1000,
+					       (64*PJSIP_T1_TIMEOUT)%1000 };
+
+/* Internal timer IDs */
+enum Transaction_Timer_Id
+{
+    TSX_TIMER_RETRANSMISSION,
+    TSX_TIMER_TIMEOUT,
+};
+
+
+/* Prototypes. */
+static void	   lock_tsx(pjsip_transaction *tsx, struct tsx_lock_data *lck);
+static pj_status_t unlock_tsx( pjsip_transaction *tsx, 
+                               struct tsx_lock_data *lck);
+static pj_status_t tsx_on_state_null(		pjsip_transaction *tsx, 
+				                pjsip_event *event);
+static pj_status_t tsx_on_state_calling(	pjsip_transaction *tsx, 
+				                pjsip_event *event);
+static pj_status_t tsx_on_state_trying(		pjsip_transaction *tsx, 
+				                pjsip_event *event);
+static pj_status_t tsx_on_state_proceeding_uas( pjsip_transaction *tsx, 
+					        pjsip_event *event);
+static pj_status_t tsx_on_state_proceeding_uac( pjsip_transaction *tsx,
+					        pjsip_event *event);
+static pj_status_t tsx_on_state_completed_uas(	pjsip_transaction *tsx, 
+					        pjsip_event *event);
+static pj_status_t tsx_on_state_completed_uac(	pjsip_transaction *tsx,
+					        pjsip_event *event);
+static pj_status_t tsx_on_state_confirmed(	pjsip_transaction *tsx, 
+					        pjsip_event *event);
+static pj_status_t tsx_on_state_terminated(	pjsip_transaction *tsx, 
+					        pjsip_event *event);
+static pj_status_t tsx_on_state_destroyed(	pjsip_transaction *tsx, 
+					        pjsip_event *event);
+static void        tsx_timer_callback( pj_timer_heap_t *theap, 
+			               pj_timer_entry *entry);
+static pj_status_t tsx_create( pjsip_module *tsx_user,
+			       pjsip_transaction **p_tsx);
+static pj_status_t tsx_destroy( pjsip_transaction *tsx );
+static void	   tsx_resched_retransmission( pjsip_transaction *tsx );
+static pj_status_t tsx_retransmit( pjsip_transaction *tsx, int resched);
+static int         tsx_send_msg( pjsip_transaction *tsx, 
+                                 pjsip_tx_data *tdata);
+
+
+/* State handlers for UAC, indexed by state */
+static int  (*tsx_state_handler_uac[PJSIP_TSX_STATE_MAX])(pjsip_transaction *,
+							  pjsip_event *) = 
+{
+    &tsx_on_state_null,
+    &tsx_on_state_calling,
+    NULL,
+    &tsx_on_state_proceeding_uac,
+    &tsx_on_state_completed_uac,
+    &tsx_on_state_confirmed,
+    &tsx_on_state_terminated,
+    &tsx_on_state_destroyed,
+};
+
+/* State handlers for UAS */
+static int  (*tsx_state_handler_uas[PJSIP_TSX_STATE_MAX])(pjsip_transaction *, 
+							  pjsip_event *) = 
+{
+    &tsx_on_state_null,
+    NULL,
+    &tsx_on_state_trying,
+    &tsx_on_state_proceeding_uas,
+    &tsx_on_state_completed_uas,
+    &tsx_on_state_confirmed,
+    &tsx_on_state_terminated,
+    &tsx_on_state_destroyed,
+};
+
+/*****************************************************************************
+ **
+ ** Utilities
+ **
+ *****************************************************************************
+ */
+/*
+ * Get transaction state name.
+ */
+PJ_DEF(const char *) pjsip_tsx_state_str(pjsip_tsx_state_e state)
+{
+    return state_str[state];
+}
+
+/*
+ * Get the role name.
+ */
+PJ_DEF(const char *) pjsip_role_name(pjsip_role_e role)
+{
+    return role_name[role];
+}
+
+
+/*
+ * Create transaction key for RFC2543 compliant messages, which don't have
+ * unique branch parameter in the top most Via header.
+ *
+ * INVITE requests matches a transaction if the following attributes
+ * match the original request:
+ *	- Request-URI
+ *	- To tag
+ *	- From tag
+ *	- Call-ID
+ *	- CSeq
+ *	- top Via header
+ *
+ * CANCEL matching is done similarly as INVITE, except:
+ *	- CSeq method will differ
+ *	- To tag is not matched.
+ *
+ * ACK matching is done similarly, except that:
+ *	- method of the CSeq will differ,
+ *	- To tag is matched to the response sent by the server transaction.
+ *
+ * The transaction key is constructed from the common components of above
+ * components. Additional comparison is needed to fully match a transaction.
+ */
+static pj_status_t create_tsx_key_2543( pj_pool_t *pool,
+			                pj_str_t *str,
+			                pjsip_role_e role,
+			                const pjsip_method *method,
+			                const pjsip_rx_data *rdata )
+{
+#define SEPARATOR   '$'
+    char *key, *p, *end;
+    int len;
+    pj_size_t len_required;
+    pjsip_uri *req_uri;
+    pj_str_t *host;
+
+    PJ_ASSERT_RETURN(pool && str && method && rdata, PJ_EINVAL);
+    PJ_ASSERT_RETURN(rdata->msg_info.msg, PJ_EINVAL);
+    PJ_ASSERT_RETURN(rdata->msg_info.via, PJSIP_EMISSINGHDR);
+    PJ_ASSERT_RETURN(rdata->msg_info.cseq, PJSIP_EMISSINGHDR);
+    PJ_ASSERT_RETURN(rdata->msg_info.from, PJSIP_EMISSINGHDR);
+
+    host = &rdata->msg_info.via->sent_by.host;
+    req_uri = (pjsip_uri*)rdata->msg_info.msg->line.req.uri;
+
+    /* Calculate length required. */
+    len_required = 9 +			    /* CSeq number */
+		   rdata->msg_info.from->tag.slen +   /* From tag. */
+		   rdata->msg_info.cid->id.slen +    /* Call-ID */
+		   host->slen +		    /* Via host. */
+		   9 +			    /* Via port. */
+		   16;			    /* Separator+Allowance. */
+    key = p = pj_pool_alloc(pool, len_required);
+    end = p + len_required;
+
+    /* Add role. */
+    *p++ = (char)(role==PJSIP_ROLE_UAC ? 'c' : 's');
+    *p++ = SEPARATOR;
+
+    /* Add method, except when method is INVITE or ACK. */
+    if (method->id != PJSIP_INVITE_METHOD && method->id != PJSIP_ACK_METHOD) {
+	pj_memcpy(p, method->name.ptr, method->name.slen);
+	p += method->name.slen;
+	*p++ = '$';
+    }
+
+    /* Add CSeq (only the number). */
+    len = pj_utoa(rdata->msg_info.cseq->cseq, p);
+    p += len;
+    *p++ = SEPARATOR;
+
+    /* Add From tag. */
+    len = rdata->msg_info.from->tag.slen;
+    pj_memcpy( p, rdata->msg_info.from->tag.ptr, len);
+    p += len;
+    *p++ = SEPARATOR;
+
+    /* Add Call-ID. */
+    len = rdata->msg_info.cid->id.slen;
+    pj_memcpy( p, rdata->msg_info.cid->id.ptr, len );
+    p += len;
+    *p++ = SEPARATOR;
+
+    /* Add top Via header. 
+     * We don't really care whether the port contains the real port (because
+     * it can be omited if default port is used). Anyway this function is 
+     * only used to match request retransmission, and we expect that the 
+     * request retransmissions will contain the same port.
+     */
+    pj_memcpy(p, host->ptr, host->slen);
+    p += host->slen;
+    *p++ = ':';
+
+    len = pj_utoa(rdata->msg_info.via->sent_by.port, p);
+    p += len;
+    *p++ = SEPARATOR;
+    
+    *p++ = '\0';
+
+    /* Done. */
+    str->ptr = key;
+    str->slen = p-key;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Create transaction key for RFC3161 compliant system.
+ */
+static pj_status_t create_tsx_key_3261( pj_pool_t *pool,
+		                        pj_str_t *key,
+		                        pjsip_role_e role,
+		                        const pjsip_method *method,
+		                        const pj_str_t *branch)
+{
+    char *p;
+
+    PJ_ASSERT_RETURN(pool && key && method && branch, PJ_EINVAL);
+
+    p = key->ptr = pj_pool_alloc(pool, branch->slen + method->name.slen + 4 );
+    
+    /* Add role. */
+    *p++ = (char)(role==PJSIP_ROLE_UAC ? 'c' : 's');
+    *p++ = SEPARATOR;
+
+    /* Add method, except when method is INVITE or ACK. */
+    if (method->id != PJSIP_INVITE_METHOD && method->id != PJSIP_ACK_METHOD) {
+	pj_memcpy(p, method->name.ptr, method->name.slen);
+	p += method->name.slen;
+	*p++ = '$';
+    }
+
+    /* Add branch ID. */
+    pj_memcpy(p, branch->ptr, branch->slen);
+    p += branch->slen;
+
+    /* Set length */
+    key->slen = p - key->ptr;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Create key from the incoming data, to be used to search the transaction
+ * in the transaction hash table.
+ */
+PJ_DEF(pj_status_t) pjsip_tsx_create_key( pj_pool_t *pool, pj_str_t *key, 
+				          pjsip_role_e role, 
+				          const pjsip_method *method, 
+				          const pjsip_rx_data *rdata)
+{
+    pj_str_t rfc3261_branch = {PJSIP_RFC3261_BRANCH_ID, 
+                               PJSIP_RFC3261_BRANCH_LEN};
+
+
+    /* Get the branch parameter in the top-most Via.
+     * If branch parameter is started with "z9hG4bK", then the message was
+     * generated by agent compliant with RFC3261. Otherwise, it will be
+     * handled as RFC2543.
+     */
+    const pj_str_t *branch = &rdata->msg_info.via->branch_param;
+
+    if (pj_strncmp(branch,&rfc3261_branch,PJSIP_RFC3261_BRANCH_LEN)==0) {
+
+	/* Create transaction key. */
+	return create_tsx_key_3261(pool, key, role, method, branch);
+
+    } else {
+	/* Create the key for the message. This key will be matched up 
+         * with the transaction key. For RFC2563 transactions, the 
+         * transaction key was created by the same function, so it will 
+         * match the message.
+	 */
+	return create_tsx_key_2543( pool, key, role, method, rdata );
+    }
+}
+
+/*****************************************************************************
+ **
+ ** Transaction layer module
+ **
+ *****************************************************************************
+ **/
+/*
+ * Create transaction layer module and registers it to the endpoint.
+ */
+PJ_DEF(pj_status_t) pjsip_tsx_layer_init_module(pjsip_endpoint *endpt)
+{
+    pj_pool_t *pool;
+    pj_status_t status;
+
+
+    PJ_ASSERT_RETURN(mod_tsx_layer.endpt==NULL, PJ_EINVALIDOP);
+
+    /* Initialize TLS ID for transaction lock. */
+    status = pj_thread_local_alloc(&pjsip_tsx_lock_tls_id);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    pj_thread_local_set(pjsip_tsx_lock_tls_id, NULL);
+
+    /*
+     * Initialize transaction layer structure.
+     */
+
+    /* Create pool for the module. */
+    pool = pjsip_endpt_create_pool(endpt, "tsxlayer", 
+				   PJSIP_POOL_TSX_LAYER_LEN,
+				   PJSIP_POOL_TSX_LAYER_INC );
+    if (!pool)
+	return PJ_ENOMEM;
+
+    
+    /* Initialize some attributes. */
+    mod_tsx_layer.pool = pool;
+    mod_tsx_layer.endpt = endpt;
+
+
+    /* Create hash table. */
+    mod_tsx_layer.htable = pj_hash_create( pool, PJSIP_MAX_TSX_COUNT );
+    if (!mod_tsx_layer.htable) {
+	pjsip_endpt_release_pool(endpt, pool);
+	return PJ_ENOMEM;
+    }
+
+    /* Create mutex. */
+    status = pj_mutex_create_recursive(pool, "tsxlayer", &mod_tsx_layer.mutex);
+    if (status != PJ_SUCCESS) {
+	pjsip_endpt_release_pool(endpt, pool);
+	return status;
+    }
+
+    /*
+     * Register transaction layer module to endpoint.
+     */
+    status = pjsip_endpt_register_module( endpt, &mod_tsx_layer.mod );
+    if (status != PJ_SUCCESS) {
+	pj_mutex_destroy(mod_tsx_layer.mutex);
+	pjsip_endpt_release_pool(endpt, pool);
+	return status;
+    }
+
+    /* Register mod_stateful_util module (sip_util_statefull.c) */
+    status = pjsip_endpt_register_module(endpt, &mod_stateful_util);
+    if (status != PJ_SUCCESS) {
+	return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get the instance of transaction layer module.
+ */
+PJ_DEF(pjsip_module*) pjsip_tsx_layer_instance(void)
+{
+    return &mod_tsx_layer.mod;
+}
+
+
+/*
+ * Unregister and destroy transaction layer module.
+ */
+PJ_DEF(pj_status_t) pjsip_tsx_layer_destroy(void)
+{
+    /* Are we registered? */
+    PJ_ASSERT_RETURN(mod_tsx_layer.endpt!=NULL, PJ_EINVALIDOP);
+
+    /* Unregister from endpoint. 
+     * Clean-ups will be done in the unload() module callback.
+     */
+    return pjsip_endpt_unregister_module( mod_tsx_layer.endpt, 
+					  &mod_tsx_layer.mod);
+}
+
+
+/*
+ * Register the transaction to the hash table.
+ */
+static pj_status_t mod_tsx_layer_register_tsx( pjsip_transaction *tsx)
+{
+    pj_assert(tsx->transaction_key.slen != 0);
+
+    /* Lock hash table mutex. */
+    pj_mutex_lock(mod_tsx_layer.mutex);
+
+    /* Check if no transaction with the same key exists. 
+     * Do not use PJ_ASSERT_RETURN since it evaluates the expression
+     * twice!
+     */
+    pj_assert(pj_hash_get( mod_tsx_layer.htable, 
+			   &tsx->transaction_key.ptr,
+			   tsx->transaction_key.slen, 
+			   NULL) == NULL);
+
+    TSX_TRACE_((THIS_FILE, 
+		"Transaction %p registered with hkey=0x%p and key=%.*s",
+		tsx, tsx->hashed_key, tsx->transaction_key.slen,
+		tsx->transaction_key.ptr));
+
+    /* Register the transaction to the hash table. */
+#ifdef PRECALC_HASH
+    pj_hash_set( tsx->pool, mod_tsx_layer.htable, tsx->transaction_key.ptr,
+    		 tsx->transaction_key.slen, tsx->hashed_key, tsx);
+#else
+    pj_hash_set( tsx->pool, mod_tsx_layer.htable, tsx->transaction_key.ptr,
+    		 tsx->transaction_key.slen, 0, tsx);
+#endif
+
+    /* Unlock mutex. */
+    pj_mutex_unlock(mod_tsx_layer.mutex);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Unregister the transaction from the hash table.
+ */
+static void mod_tsx_layer_unregister_tsx( pjsip_transaction *tsx)
+{
+    pj_assert(tsx->transaction_key.slen != 0);
+    //pj_assert(tsx->state != PJSIP_TSX_STATE_NULL);
+
+    /* Lock hash table mutex. */
+    pj_mutex_lock(mod_tsx_layer.mutex);
+
+    /* Register the transaction to the hash table. */
+#ifdef PRECALC_HASH
+    pj_hash_set( NULL, mod_tsx_layer.htable, tsx->transaction_key.ptr,
+    		 tsx->transaction_key.slen, tsx->hashed_key, NULL);
+#else
+    pj_hash_set( NULL, mod_tsx_layer.htable, tsx->transaction_key.ptr,
+    		 tsx->transaction_key.slen, 0, NULL);
+#endif
+
+    TSX_TRACE_((THIS_FILE, 
+		"Transaction %p unregistered, hkey=0x%p and key=%.*s",
+		tsx, tsx->hashed_key, tsx->transaction_key.slen,
+		tsx->transaction_key.ptr));
+
+    /* Unlock mutex. */
+    pj_mutex_unlock(mod_tsx_layer.mutex);
+}
+
+
+/*
+ * Find a transaction.
+ */
+PJ_DEF(pjsip_transaction*) pjsip_tsx_layer_find_tsx( const pj_str_t *key,
+						     pj_bool_t lock )
+{
+    pjsip_transaction *tsx;
+    pj_uint32_t hval = 0;
+
+    pj_mutex_lock(mod_tsx_layer.mutex);
+    tsx = pj_hash_get( mod_tsx_layer.htable, key->ptr, key->slen, &hval );
+    pj_mutex_unlock(mod_tsx_layer.mutex);
+
+    TSX_TRACE_((THIS_FILE, 
+		"Finding tsx with hkey=0x%p and key=%.*s: found %p",
+		hval, key->slen, key->ptr, tsx));
+
+    /* Race condition!
+     * Transaction may gets deleted before we have chance to lock it.
+     */
+    PJ_TODO(FIX_RACE_CONDITION_HERE);
+    if (tsx && lock)
+	pj_mutex_lock(tsx->mutex);
+
+    return tsx;
+}
+
+
+/* This module callback is called when module is being loaded by
+ * endpoint. It does nothing for this module.
+ */
+static pj_status_t mod_tsx_layer_load(pjsip_endpoint *endpt)
+{
+    PJ_UNUSED_ARG(endpt);
+    return PJ_SUCCESS;
+}
+
+
+/* This module callback is called when module is being started by
+ * endpoint. It does nothing for this module.
+ */
+static pj_status_t mod_tsx_layer_start(void)
+{
+    return PJ_SUCCESS;
+}
+
+
+/* This module callback is called when module is being stopped by
+ * endpoint. 
+ */
+static pj_status_t mod_tsx_layer_stop(void)
+{
+    pj_hash_iterator_t it_buf, *it;
+
+    PJ_LOG(4,(THIS_FILE, "Stopping transaction layer module"));
+
+    pj_mutex_lock(mod_tsx_layer.mutex);
+
+    /* Destroy all transactions. */
+    it = pj_hash_first(mod_tsx_layer.htable, &it_buf);
+    while (it) {
+	pjsip_transaction *tsx = pj_hash_this(mod_tsx_layer.htable, it);
+	pj_hash_iterator_t *next = pj_hash_next(mod_tsx_layer.htable, it);
+	if (tsx) {
+	    mod_tsx_layer_unregister_tsx(tsx);
+	    tsx_destroy(tsx);
+	}
+	it = next;
+    }
+
+    pj_mutex_unlock(mod_tsx_layer.mutex);
+    return PJ_SUCCESS;
+}
+
+
+/* This module callback is called when module is being unloaded by
+ * endpoint.
+ */
+static pj_status_t mod_tsx_layer_unload(void)
+{
+    /* Only self destroy when there's no transaction in the table.
+     * Transaction may refuse to destroy when it has pending
+     * transmission. If we destroy the module now, application will
+     * crash when the pending transaction finally got error response
+     * from transport and when it tries to unregister itself.
+     */
+    if (pj_hash_count(mod_tsx_layer.htable) != 0)
+	return PJ_EBUSY;
+
+    /* Destroy mutex. */
+    pj_mutex_destroy(mod_tsx_layer.mutex);
+
+    /* Release pool. */
+    pjsip_endpt_release_pool(mod_tsx_layer.endpt, mod_tsx_layer.pool);
+
+    /* Free TLS */
+    pj_thread_local_free(pjsip_tsx_lock_tls_id);
+
+    /* Mark as unregistered. */
+    mod_tsx_layer.endpt = NULL;
+
+    PJ_LOG(4,(THIS_FILE, "Transaction layer module destroyed"));
+
+    return PJ_SUCCESS;
+}
+
+
+/* This module callback is called when endpoint has received an
+ * incoming request message.
+ */
+static pj_bool_t mod_tsx_layer_on_rx_request(pjsip_rx_data *rdata)
+{
+    pj_str_t key;
+    pj_uint32_t hval = 0;
+    pjsip_transaction *tsx;
+
+    pjsip_tsx_create_key(rdata->tp_info.pool, &key, PJSIP_ROLE_UAS,
+			 &rdata->msg_info.cseq->method, rdata);
+
+    /* Find transaction. */
+    pj_mutex_lock( mod_tsx_layer.mutex );
+
+    tsx = pj_hash_get( mod_tsx_layer.htable, key.ptr, key.slen, &hval );
+
+
+    TSX_TRACE_((THIS_FILE, 
+		"Finding tsx for request, hkey=0x%p and key=%.*s, found %p",
+		hval, key.slen, key.ptr, tsx));
+
+
+    if (tsx == NULL || tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+	/* Transaction not found.
+	 * Reject the request so that endpoint passes the request to
+	 * upper layer modules.
+	 */
+	pj_mutex_unlock( mod_tsx_layer.mutex);
+	return PJ_FALSE;
+    }
+
+    /* Unlock hash table. */
+    pj_mutex_unlock( mod_tsx_layer.mutex );
+
+    /* Race condition!
+     * Transaction may gets deleted before we have chance to lock it
+     * in pjsip_tsx_recv_msg().
+     */
+    PJ_TODO(FIX_RACE_CONDITION_HERE);
+
+    /* Pass the message to the transaction. */
+    pjsip_tsx_recv_msg(tsx, rdata );
+
+    return PJ_TRUE;
+}
+
+
+/* This module callback is called when endpoint has received an
+ * incoming response message.
+ */
+static pj_bool_t mod_tsx_layer_on_rx_response(pjsip_rx_data *rdata)
+{
+    pj_str_t key;
+    pj_uint32_t hval = 0;
+    pjsip_transaction *tsx;
+
+    pjsip_tsx_create_key(rdata->tp_info.pool, &key, PJSIP_ROLE_UAC,
+			 &rdata->msg_info.cseq->method, rdata);
+
+    /* Find transaction. */
+    pj_mutex_lock( mod_tsx_layer.mutex );
+
+    tsx = pj_hash_get( mod_tsx_layer.htable, key.ptr, key.slen, &hval );
+
+
+    TSX_TRACE_((THIS_FILE, 
+		"Finding tsx for response, hkey=0x%p and key=%.*s, found %p",
+		hval, key.slen, key.ptr, tsx));
+
+
+    if (tsx == NULL || tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+	/* Transaction not found.
+	 * Reject the request so that endpoint passes the request to
+	 * upper layer modules.
+	 */
+	pj_mutex_unlock( mod_tsx_layer.mutex);
+	return PJ_FALSE;
+    }
+
+    /* Unlock hash table. */
+    pj_mutex_unlock( mod_tsx_layer.mutex );
+
+    /* Race condition!
+     * Transaction may gets deleted before we have chance to lock it
+     * in pjsip_tsx_recv_msg().
+     */
+    PJ_TODO(FIX_RACE_CONDITION_HERE);
+
+    /* Pass the message to the transaction. */
+    pjsip_tsx_recv_msg(tsx, rdata );
+
+    return PJ_TRUE;
+}
+
+
+/*
+ * Get transaction instance in the rdata.
+ */
+PJ_DEF(pjsip_transaction*) pjsip_rdata_get_tsx( pjsip_rx_data *rdata )
+{
+    return rdata->endpt_info.mod_data[mod_tsx_layer.mod.id];
+}
+
+
+/*
+ * Dump transaction layer.
+ */
+PJ_DEF(void) pjsip_tsx_layer_dump(pj_bool_t detail)
+{
+#if PJ_LOG_MAX_LEVEL >= 3
+    pj_hash_iterator_t itbuf, *it;
+
+    /* Lock mutex. */
+    pj_mutex_lock(mod_tsx_layer.mutex);
+
+    PJ_LOG(3, (THIS_FILE, "Dumping transaction table:"));
+    PJ_LOG(3, (THIS_FILE, " Total %d transactions", 
+			  pj_hash_count(mod_tsx_layer.htable)));
+
+    if (detail) {
+	it = pj_hash_first(mod_tsx_layer.htable, &itbuf);
+	if (it == NULL) {
+	    PJ_LOG(3, (THIS_FILE, " - none - "));
+	} else {
+	    while (it != NULL) {
+		pjsip_transaction *tsx = pj_hash_this(mod_tsx_layer.htable,it);
+
+		PJ_LOG(3, (THIS_FILE, " %s %s|%d|%s",
+			   tsx->obj_name,
+			   (tsx->last_tx? 
+				pjsip_tx_data_get_info(tsx->last_tx): 
+				"none"),
+			   tsx->status_code,
+			   pjsip_tsx_state_str(tsx->state)));
+
+		it = pj_hash_next(mod_tsx_layer.htable, it);
+	    }
+	}
+    }
+
+    /* Unlock mutex. */
+    pj_mutex_unlock(mod_tsx_layer.mutex);
+#endif
+}
+
+/*****************************************************************************
+ **
+ ** Transaction
+ **
+ *****************************************************************************
+ **/
+/*
+ * Lock transaction and set the value of Thread Local Storage.
+ */
+static void lock_tsx(pjsip_transaction *tsx, struct tsx_lock_data *lck)
+{
+    struct tsx_lock_data *prev_data;
+
+    pj_mutex_lock(tsx->mutex);
+    prev_data = (struct tsx_lock_data *) 
+                    pj_thread_local_get(pjsip_tsx_lock_tls_id);
+    lck->prev = prev_data;
+    lck->tsx = tsx;
+    lck->is_alive = 1;
+    pj_thread_local_set(pjsip_tsx_lock_tls_id, lck);
+}
+
+
+/*
+ * Unlock transaction.
+ * This will selectively unlock the mutex ONLY IF the transaction has not been 
+ * destroyed. The function knows whether the transaction has been destroyed
+ * because when transaction is destroyed the is_alive flag for the transaction
+ * will be set to zero.
+ */
+static pj_status_t unlock_tsx( pjsip_transaction *tsx, 
+                               struct tsx_lock_data *lck)
+{
+    pj_assert( (void*)pj_thread_local_get(pjsip_tsx_lock_tls_id) == lck);
+    pj_assert( lck->tsx == tsx );
+    pj_thread_local_set(pjsip_tsx_lock_tls_id, lck->prev);
+    if (lck->is_alive)
+	pj_mutex_unlock(tsx->mutex);
+
+    return lck->is_alive ? PJ_SUCCESS : PJSIP_ETSXDESTROYED;
+}
+
+
+/* Create and initialize basic transaction structure.
+ * This function is called by both UAC and UAS creation.
+ */
+static pj_status_t tsx_create( pjsip_module *tsx_user,
+			       pjsip_transaction **p_tsx)
+{
+    pj_pool_t *pool;
+    pjsip_transaction *tsx;
+    pj_status_t status;
+
+    pool = pjsip_endpt_create_pool( mod_tsx_layer.endpt, "tsx", 
+				    PJSIP_POOL_TSX_LEN, PJSIP_POOL_TSX_INC );
+    if (!pool)
+	return PJ_ENOMEM;
+
+    tsx = pj_pool_zalloc(pool, sizeof(pjsip_transaction));
+    tsx->pool = pool;
+    tsx->tsx_user = tsx_user;
+    tsx->endpt = mod_tsx_layer.endpt;
+
+    pj_ansi_snprintf(tsx->obj_name, sizeof(tsx->obj_name), 
+		     "tsx%p", tsx);
+
+    tsx->handle_200resp = 1;
+    tsx->retransmit_timer.id = TSX_TIMER_RETRANSMISSION;
+    tsx->retransmit_timer._timer_id = -1;
+    tsx->retransmit_timer.user_data = tsx;
+    tsx->retransmit_timer.cb = &tsx_timer_callback;
+    tsx->timeout_timer.id = TSX_TIMER_TIMEOUT;
+    tsx->timeout_timer._timer_id = -1;
+    tsx->timeout_timer.user_data = tsx;
+    tsx->timeout_timer.cb = &tsx_timer_callback;
+    
+    status = pj_mutex_create_recursive(pool, tsx->obj_name, &tsx->mutex);
+    if (status != PJ_SUCCESS) {
+	pjsip_endpt_release_pool(mod_tsx_layer.endpt, pool);
+	return status;
+    }
+
+    *p_tsx = tsx;
+    return PJ_SUCCESS;
+}
+
+
+/* Destroy transaction. */
+static pj_status_t tsx_destroy( pjsip_transaction *tsx )
+{
+    struct tsx_lock_data *lck;
+
+    /* Decrement transport reference counter. */
+    if (tsx->transport) {
+	pjsip_transport_dec_ref( tsx->transport );
+	tsx->transport = NULL;
+    }
+    /* Decrement reference counter in transport selector */
+    pjsip_tpselector_dec_ref(&tsx->tp_sel);
+
+    /* Free last transmitted message. */
+    if (tsx->last_tx) {
+	pjsip_tx_data_dec_ref( tsx->last_tx );
+	tsx->last_tx = NULL;
+    }
+    /* Cancel timeout timer. */
+    if (tsx->timeout_timer._timer_id != -1) {
+	pjsip_endpt_cancel_timer(tsx->endpt, &tsx->timeout_timer);
+	tsx->timeout_timer._timer_id = -1;
+    }
+    /* Cancel retransmission timer. */
+    if (tsx->retransmit_timer._timer_id != -1) {
+	pjsip_endpt_cancel_timer(tsx->endpt, &tsx->retransmit_timer);
+	tsx->retransmit_timer._timer_id = -1;
+    }
+
+    /* Clear some pending flags. */
+    tsx->transport_flag &= ~(TSX_HAS_PENDING_RESCHED | TSX_HAS_PENDING_SEND);
+
+    /* Refuse to destroy transaction if it has pending resolving. */
+    if (tsx->transport_flag & TSX_HAS_PENDING_TRANSPORT) {
+	tsx->transport_flag |= TSX_HAS_PENDING_DESTROY;
+	tsx->tsx_user = NULL;
+	PJ_LOG(4,(tsx->obj_name, "Will destroy later because transport is "
+				 "in progress"));
+	return PJ_EBUSY;
+    }
+
+    /* Clear TLS, so that mutex will not be unlocked */
+    lck = pj_thread_local_get(pjsip_tsx_lock_tls_id);
+    while (lck) {
+	if (lck->tsx == tsx) {
+	    lck->is_alive = 0;
+	}
+	lck = lck->prev;
+    }
+
+    pj_mutex_destroy(tsx->mutex);
+
+    PJ_LOG(5,(tsx->obj_name, "Transaction destroyed!"));
+
+    pjsip_endpt_release_pool(tsx->endpt, tsx->pool);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Callback when timer expires.
+ */
+static void tsx_timer_callback( pj_timer_heap_t *theap, pj_timer_entry *entry)
+{
+    pjsip_event event;
+    pjsip_transaction *tsx = entry->user_data;
+    struct tsx_lock_data lck;
+
+    PJ_UNUSED_ARG(theap);
+
+    PJ_LOG(5,(tsx->obj_name, "%s timer event", 
+	     (entry->id==TSX_TIMER_RETRANSMISSION ? "Retransmit":"Timeout")));
+
+
+    if (entry->id == TSX_TIMER_RETRANSMISSION) {
+        PJSIP_EVENT_INIT_TIMER(event, &tsx->retransmit_timer);
+    } else {
+        PJSIP_EVENT_INIT_TIMER(event, &tsx->timeout_timer);
+    }
+
+    /* Dispatch event to transaction. */
+    lock_tsx(tsx, &lck);
+    (*tsx->state_handler)(tsx, &event);
+    unlock_tsx(tsx, &lck);
+}
+
+
+/*
+ * Set transaction state, and inform TU about the transaction state change.
+ */
+static void tsx_set_state( pjsip_transaction *tsx,
+			   pjsip_tsx_state_e state,
+			   pjsip_event_id_e event_src_type,
+                           void *event_src )
+{
+    pjsip_tsx_state_e prev_state = tsx->state;
+
+    /* New state must be greater than previous state */
+    pj_assert(state >= tsx->state);
+
+    PJ_LOG(5, (tsx->obj_name, "State changed from %s to %s, event=%s",
+	       state_str[tsx->state], state_str[state], 
+               pjsip_event_str(event_src_type)));
+
+    /* Change state. */
+    tsx->state = state;
+
+    /* Update the state handlers. */
+    if (tsx->role == PJSIP_ROLE_UAC) {
+	tsx->state_handler = tsx_state_handler_uac[state];
+    } else {
+	tsx->state_handler = tsx_state_handler_uas[state];
+    }
+
+    /* Before informing TU about state changed, inform TU about
+     * rx event.
+     */
+    if (event_src_type==PJSIP_EVENT_RX_MSG && tsx->tsx_user) {
+	pjsip_rx_data *rdata = event_src;
+
+	pj_assert(rdata != NULL);
+
+	if (rdata->msg_info.msg->type == PJSIP_RESPONSE_MSG &&
+		   tsx->tsx_user->on_rx_response)
+	{
+	    (*tsx->tsx_user->on_rx_response)(rdata);
+	}
+
+    }
+
+    /* Inform TU about state changed. */
+    if (tsx->tsx_user && tsx->tsx_user->on_tsx_state) {
+	pjsip_event e;
+	PJSIP_EVENT_INIT_TSX_STATE(e, tsx, event_src_type, event_src,
+				   prev_state);
+	(*tsx->tsx_user->on_tsx_state)(tsx, &e);
+    }
+    
+
+    /* When the transaction is terminated, release transport, and free the
+     * saved last transmitted message.
+     */
+    if (state == PJSIP_TSX_STATE_TERMINATED) {
+	pj_time_val timeout = {0, 0};
+
+	/* Reschedule timeout timer to destroy this transaction. */
+	if (tsx->transport_flag & TSX_HAS_PENDING_TRANSPORT) {
+	    tsx->transport_flag |= TSX_HAS_PENDING_DESTROY;
+	} else {
+	    /* Cancel timeout timer. */
+	    if (tsx->timeout_timer._timer_id != -1) {
+		pjsip_endpt_cancel_timer(tsx->endpt, &tsx->timeout_timer);
+		tsx->timeout_timer._timer_id = -1;
+	    }
+
+	    pjsip_endpt_schedule_timer( tsx->endpt, &tsx->timeout_timer, 
+					&timeout);
+	}
+
+
+    } else if (state == PJSIP_TSX_STATE_DESTROYED) {
+
+	/* Unregister transaction. */
+	mod_tsx_layer_unregister_tsx(tsx);
+
+	/* Destroy transaction. */
+	tsx_destroy(tsx);
+    }
+}
+
+
+/*
+ * Create, initialize, and register UAC transaction.
+ */
+PJ_DEF(pj_status_t) pjsip_tsx_create_uac( pjsip_module *tsx_user,
+					  pjsip_tx_data *tdata,
+					  pjsip_transaction **p_tsx)
+{
+    pjsip_transaction *tsx;
+    pjsip_msg *msg;
+    pjsip_cseq_hdr *cseq;
+    pjsip_via_hdr *via;
+    pjsip_host_info dst_info;
+    struct tsx_lock_data lck;
+    pj_status_t status;
+
+    /* Validate arguments. */
+    PJ_ASSERT_RETURN(tdata && tdata->msg && p_tsx, PJ_EINVAL);
+    PJ_ASSERT_RETURN(tdata->msg->type == PJSIP_REQUEST_MSG,
+		     PJSIP_ENOTREQUESTMSG);
+
+    /* Method MUST NOT be ACK! */
+    PJ_ASSERT_RETURN(tdata->msg->line.req.method.id != PJSIP_ACK_METHOD,
+		     PJ_EINVALIDOP);
+
+    /* Keep shortcut */
+    msg = tdata->msg;
+
+    /* Make sure CSeq header is present. */
+    cseq = pjsip_msg_find_hdr(msg, PJSIP_H_CSEQ, NULL);
+    if (!cseq) {
+	pj_assert(!"CSeq header not present in outgoing message!");
+	return PJSIP_EMISSINGHDR;
+    }
+
+
+    /* Create transaction instance. */
+    status = tsx_create( tsx_user, &tsx);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    /* Lock transaction. */
+    lock_tsx(tsx, &lck);
+
+    /* Role is UAC. */
+    tsx->role = PJSIP_ROLE_UAC;
+
+    /* Save method. */
+    pjsip_method_copy( tsx->pool, &tsx->method, &msg->line.req.method);
+
+    /* Save CSeq. */
+    tsx->cseq = cseq->cseq;
+
+    /* Generate Via header if it doesn't exist. */
+    via = pjsip_msg_find_hdr(msg, PJSIP_H_VIA, NULL);
+    if (via == NULL) {
+	via = pjsip_via_hdr_create(tdata->pool);
+	pjsip_msg_insert_first_hdr(msg, (pjsip_hdr*) via);
+    }
+
+    /* Generate branch parameter if it doesn't exist. */
+    if (via->branch_param.slen == 0) {
+	pj_str_t tmp;
+	via->branch_param.ptr = pj_pool_alloc(tsx->pool, PJSIP_MAX_BRANCH_LEN);
+	via->branch_param.slen = PJSIP_MAX_BRANCH_LEN;
+	pj_memcpy(via->branch_param.ptr, PJSIP_RFC3261_BRANCH_ID, 
+		  PJSIP_RFC3261_BRANCH_LEN);
+	tmp.ptr = via->branch_param.ptr + PJSIP_RFC3261_BRANCH_LEN + 2;
+	*(tmp.ptr-2) = 80; *(tmp.ptr-1) = 106;
+	pj_generate_unique_string( &tmp );
+
+        /* Save branch parameter. */
+        tsx->branch = via->branch_param;
+
+    } else {
+        /* Copy branch parameter. */
+        pj_strdup(tsx->pool, &tsx->branch, &via->branch_param);
+    }
+
+   /* Generate transaction key. */
+    create_tsx_key_3261( tsx->pool, &tsx->transaction_key,
+			 PJSIP_ROLE_UAC, &tsx->method, 
+			 &via->branch_param);
+
+    /* Calculate hashed key value. */
+#ifdef PRECALC_HASH
+    tsx->hashed_key = pj_hash_calc(0, tsx->transaction_key.ptr,
+				   tsx->transaction_key.slen);
+#endif
+
+    PJ_LOG(6, (tsx->obj_name, "tsx_key=%.*s", tsx->transaction_key.slen,
+	       tsx->transaction_key.ptr));
+
+    /* Begin with State_Null.
+     * Manually set-up the state becase we don't want to call the callback.
+     */
+    tsx->state = PJSIP_TSX_STATE_NULL;
+    tsx->state_handler = &tsx_on_state_null;
+
+    /* Save the message. */
+    tsx->last_tx = tdata;
+    pjsip_tx_data_add_ref(tsx->last_tx);
+
+    /* Determine whether reliable transport should be used initially.
+     * This will be updated whenever transport has changed.
+     */
+    status = pjsip_get_request_dest(tdata, &dst_info);
+    if (status != PJ_SUCCESS) {
+	tsx_destroy(tsx);
+	return status;
+    }
+    tsx->is_reliable = (dst_info.flag & PJSIP_TRANSPORT_RELIABLE);
+
+    /* Register transaction to hash table. */
+    status = mod_tsx_layer_register_tsx(tsx);
+    if (status != PJ_SUCCESS) {
+	pj_assert(!"Bug in branch_param generator (i.e. not unique)");
+	tsx_destroy(tsx);
+	return status;
+    }
+
+
+    /* Unlock transaction and return. */
+    unlock_tsx(tsx, &lck);
+
+    PJ_LOG(5,(tsx->obj_name, "Transaction created for %s",
+	      pjsip_tx_data_get_info(tdata)));
+
+    *p_tsx = tsx;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create, initialize, and register UAS transaction.
+ */
+PJ_DEF(pj_status_t) pjsip_tsx_create_uas( pjsip_module *tsx_user,
+					  pjsip_rx_data *rdata,
+					  pjsip_transaction **p_tsx)
+{
+    pjsip_transaction *tsx;
+    pjsip_msg *msg;
+    pj_str_t *branch;
+    pjsip_cseq_hdr *cseq;
+    pj_status_t status;
+    struct tsx_lock_data lck;
+
+    /* Validate arguments. */
+    PJ_ASSERT_RETURN(rdata && rdata->msg_info.msg && p_tsx, PJ_EINVAL);
+
+    /* Keep shortcut to message */
+    msg = rdata->msg_info.msg;
+    
+    /* Make sure this is a request message. */
+    PJ_ASSERT_RETURN(msg->type == PJSIP_REQUEST_MSG, PJSIP_ENOTREQUESTMSG);
+
+    /* Make sure method is not ACK */
+    PJ_ASSERT_RETURN(msg->line.req.method.id != PJSIP_ACK_METHOD,
+		     PJ_EINVALIDOP);
+
+    /* Make sure CSeq header is present. */
+    cseq = rdata->msg_info.cseq;
+    if (!cseq)
+	return PJSIP_EMISSINGHDR;
+
+    /* Make sure Via header is present. */
+    if (rdata->msg_info.via == NULL)
+	return PJSIP_EMISSINGHDR;
+
+    /* Check that method in CSeq header match request method.
+     * Reference: PROTOS #1922
+     */
+    if (pjsip_method_cmp(&msg->line.req.method, 
+			 &rdata->msg_info.cseq->method) != 0)
+    {
+	PJ_LOG(4,(THIS_FILE, "Error: CSeq header contains different "
+			     "method than the request line"));
+	return PJSIP_EINVALIDHDR;
+    }
+
+    /* 
+     * Create transaction instance. 
+     */
+    status = tsx_create( tsx_user, &tsx);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    /* Lock transaction. */
+    lock_tsx(tsx, &lck);
+
+    /* Role is UAS */
+    tsx->role = PJSIP_ROLE_UAS;
+
+    /* Save method. */
+    pjsip_method_copy( tsx->pool, &tsx->method, &msg->line.req.method);
+
+    /* Save CSeq */
+    tsx->cseq = cseq->cseq;
+
+    /* Get transaction key either from branch for RFC3261 message, or
+     * create transaction key.
+     */
+    status = pjsip_tsx_create_key(tsx->pool, &tsx->transaction_key, 
+                                  PJSIP_ROLE_UAS, &tsx->method, rdata);
+    if (status != PJ_SUCCESS) {
+        tsx_destroy(tsx);
+        return status;
+    }
+
+    /* Calculate hashed key value. */
+#ifdef PRECALC_HASH
+    tsx->hashed_key = pj_hash_calc(0, tsx->transaction_key.ptr,
+				   tsx->transaction_key.slen);
+#endif
+
+    /* Duplicate branch parameter for transaction. */
+    branch = &rdata->msg_info.via->branch_param;
+    pj_strdup(tsx->pool, &tsx->branch, branch);
+
+    PJ_LOG(6, (tsx->obj_name, "tsx_key=%.*s", tsx->transaction_key.slen,
+	       tsx->transaction_key.ptr));
+
+
+    /* Begin with state NULL.
+     * Manually set-up the state becase we don't want to call the callback.
+     */
+    tsx->state = PJSIP_TSX_STATE_NULL; 
+    tsx->state_handler = &tsx_on_state_null;
+
+    /* Get response address. */
+    status = pjsip_get_response_addr( tsx->pool, rdata, &tsx->res_addr );
+    if (status != PJ_SUCCESS) {
+	tsx_destroy(tsx);
+	return status;
+    }
+
+    /* If it's decided that we should use current transport, keep the
+     * transport.
+     */
+    if (tsx->res_addr.transport) {
+	tsx->transport = tsx->res_addr.transport;
+	pjsip_transport_add_ref(tsx->transport);
+	pj_memcpy(&tsx->addr, &tsx->res_addr.addr, tsx->res_addr.addr_len);
+	tsx->addr_len = tsx->res_addr.addr_len;
+	tsx->is_reliable = PJSIP_TRANSPORT_IS_RELIABLE(tsx->transport);
+    }
+
+
+    /* Register the transaction. */
+    status = mod_tsx_layer_register_tsx(tsx);
+    if (status != PJ_SUCCESS) {
+	tsx_destroy(tsx);
+	return status;
+    }
+
+    /* Put this transaction in rdata's mod_data. */
+    rdata->endpt_info.mod_data[mod_tsx_layer.mod.id] = tsx;
+
+    /* Unlock transaction and return. */
+    unlock_tsx(tsx, &lck);
+
+
+    PJ_LOG(5,(tsx->obj_name, "Transaction created for %s",
+	      pjsip_rx_data_get_info(rdata)));
+
+
+    *p_tsx = tsx;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Bind transaction to a specific transport/listener. 
+ */
+PJ_DEF(pj_status_t) pjsip_tsx_set_transport(pjsip_transaction *tsx,
+					    const pjsip_tpselector *sel)
+{
+    struct tsx_lock_data lck;
+
+    /* Must be UAC transaction */
+    PJ_ASSERT_RETURN(tsx && sel, PJ_EINVAL);
+
+    /* Start locking the transaction. */
+    lock_tsx(tsx, &lck);
+
+    /* Decrement reference counter of previous transport selector */
+    pjsip_tpselector_dec_ref(&tsx->tp_sel);
+
+    /* Copy transport selector structure .*/
+    pj_memcpy(&tsx->tp_sel, sel, sizeof(*sel));
+
+    /* Increment reference counter */
+    pjsip_tpselector_add_ref(&tsx->tp_sel);
+
+    /* Unlock transaction. */
+    unlock_tsx(tsx, &lck);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Set the UAC absolute transaction timeout.
+ */
+PJ_DEF(pj_status_t) pjsip_tsx_set_uac_timeout(pjsip_transaction *tsx,
+					      unsigned msec_time,
+					      pjsip_tsx_timeout_policy policy)
+{
+    PJ_ASSERT_RETURN(tsx && tsx->role==PJSIP_ROLE_UAC &&
+		     tsx->state==PJSIP_TSX_STATE_NULL, PJ_EINVALIDOP);
+
+    tsx->msec_timeout = msec_time;
+    tsx->timeout_policy = policy;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Set transaction status code and reason.
+ */
+static void tsx_set_status_code(pjsip_transaction *tsx,
+			   	int code, const pj_str_t *reason)
+{
+    tsx->status_code = code;
+    if (reason)
+	pj_strdup(tsx->pool, &tsx->status_text, reason);
+    else
+	tsx->status_text = *pjsip_get_status_text(code);
+}
+
+
+/*
+ * Forcely terminate transaction.
+ */
+PJ_DEF(pj_status_t) pjsip_tsx_terminate( pjsip_transaction *tsx, int code )
+{
+    struct tsx_lock_data lck;
+
+    PJ_LOG(5,(tsx->obj_name, "Request to terminate transaction"));
+
+    PJ_ASSERT_RETURN(tsx != NULL, PJ_EINVAL);
+    PJ_ASSERT_RETURN(code >= 200, PJ_EINVAL);
+
+    if (tsx->state == PJSIP_TSX_STATE_TERMINATED)
+	return PJ_SUCCESS;
+
+    lock_tsx(tsx, &lck);
+    tsx_set_status_code(tsx, code, NULL);
+    tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, PJSIP_EVENT_USER, NULL);
+    unlock_tsx(tsx, &lck);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * This function is called by TU to send a message.
+ */
+PJ_DEF(pj_status_t) pjsip_tsx_send_msg( pjsip_transaction *tsx, 
+				        pjsip_tx_data *tdata )
+{
+    pjsip_event event;
+    struct tsx_lock_data lck;
+    pj_status_t status;
+
+    if (tdata == NULL)
+	tdata = tsx->last_tx;
+
+    PJ_ASSERT_RETURN(tdata != NULL, PJ_EINVALIDOP);
+
+    PJ_LOG(5,(tsx->obj_name, "Sending %s in state %s",
+                             pjsip_tx_data_get_info(tdata),
+			     state_str[tsx->state]));
+
+    PJSIP_EVENT_INIT_TX_MSG(event, tdata);
+
+    /* Dispatch to transaction. */
+    lock_tsx(tsx, &lck);
+
+    /* Set transport selector to tdata */
+    pjsip_tx_data_set_transport(tdata, &tsx->tp_sel);
+
+    /* Dispatch to state handler */
+    status = (*tsx->state_handler)(tsx, &event);
+
+    unlock_tsx(tsx, &lck);
+
+    /* Only decrement reference counter when it returns success.
+     * (This is the specification from the .PDF design document).
+     */
+    if (status == PJ_SUCCESS) {
+	pjsip_tx_data_dec_ref(tdata);
+    }
+
+    return status;
+}
+
+
+/*
+ * This function is called by endpoint when incoming message for the 
+ * transaction is received.
+ */
+PJ_DEF(void) pjsip_tsx_recv_msg( pjsip_transaction *tsx, 
+				 pjsip_rx_data *rdata)
+{
+    pjsip_event event;
+    struct tsx_lock_data lck;
+    pj_status_t status;
+
+    PJ_LOG(5,(tsx->obj_name, "Incoming %s in state %s", 
+	      pjsip_rx_data_get_info(rdata), state_str[tsx->state]));
+
+    /* Put the transaction in the rdata's mod_data. */
+    rdata->endpt_info.mod_data[mod_tsx_layer.mod.id] = tsx;
+
+    /* Init event. */
+    PJSIP_EVENT_INIT_RX_MSG(event, rdata);
+
+    /* Dispatch to transaction. */
+    lock_tsx(tsx, &lck);
+    status = (*tsx->state_handler)(tsx, &event);
+    unlock_tsx(tsx, &lck);
+}
+
+
+/* Callback called by send message framework */
+static void send_msg_callback( pjsip_send_state *send_state,
+			       pj_ssize_t sent, pj_bool_t *cont )
+{
+    pjsip_transaction *tsx = send_state->token;
+    struct tsx_lock_data lck;
+
+    lock_tsx(tsx, &lck);
+
+    if (sent > 0) {
+	/* Successfully sent! */
+	pj_assert(send_state->cur_transport != NULL);
+
+	if (tsx->transport != send_state->cur_transport) {
+	    /* Update transport. */
+	    if (tsx->transport) {
+		pjsip_transport_dec_ref(tsx->transport);
+		tsx->transport = NULL;
+	    }
+	    tsx->transport = send_state->cur_transport;
+	    pjsip_transport_add_ref(tsx->transport);
+
+	    /* Update remote address. */
+	    tsx->addr_len = send_state->addr.entry[send_state->cur_addr].addr_len;
+	    pj_memcpy(&tsx->addr, 
+		      &send_state->addr.entry[send_state->cur_addr].addr,
+		      tsx->addr_len);
+
+	    /* Update is_reliable flag. */
+	    tsx->is_reliable = PJSIP_TRANSPORT_IS_RELIABLE(tsx->transport);
+	}
+
+	/* Clear pending transport flag. */
+	tsx->transport_flag &= ~(TSX_HAS_PENDING_TRANSPORT);
+
+	/* Mark that we have resolved the addresses. */
+	tsx->transport_flag |= TSX_HAS_RESOLVED_SERVER;
+
+	/* Pending destroy? */
+	if (tsx->transport_flag & TSX_HAS_PENDING_DESTROY) {
+	    tsx_set_state( tsx, PJSIP_TSX_STATE_DESTROYED, 
+			   PJSIP_EVENT_UNKNOWN, NULL );
+	    unlock_tsx(tsx, &lck);
+	    return;
+	}
+
+	/* Need to transmit a message? */
+	if (tsx->transport_flag & TSX_HAS_PENDING_SEND) {
+	    tsx->transport_flag &= ~(TSX_HAS_PENDING_SEND);
+	    tsx_send_msg(tsx, tsx->last_tx);
+	}
+
+	/* Need to reschedule retransmission? */
+	if (tsx->transport_flag & TSX_HAS_PENDING_RESCHED) {
+	    tsx->transport_flag &= ~(TSX_HAS_PENDING_RESCHED);
+
+	    /* Only update when transport turns out to be unreliable. */
+	    if (!tsx->is_reliable) {
+		tsx_resched_retransmission(tsx);
+	    }
+	}
+
+    } else {
+	/* Failed to send! */
+	pj_assert(sent != 0);
+
+	/* If transaction is using the same transport as the failed one, 
+	 * release the transport.
+	 */
+	if (send_state->cur_transport==tsx->transport &&
+	    tsx->transport != NULL)
+	{
+	    pjsip_transport_dec_ref(tsx->transport);
+	    tsx->transport = NULL;
+	}
+
+	if (!*cont) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+	    pj_str_t err;
+
+	    tsx->transport_err = -sent;
+
+	    err =pj_strerror(-sent, errmsg, sizeof(errmsg));
+
+	    PJ_LOG(2,(tsx->obj_name, 
+		      "Failed to send %s! err=%d (%s)",
+		      pjsip_tx_data_get_info(send_state->tdata), -sent,
+		      errmsg));
+
+	    /* Clear pending transport flag. */
+	    tsx->transport_flag &= ~(TSX_HAS_PENDING_TRANSPORT);
+
+	    /* Mark that we have resolved the addresses. */
+	    tsx->transport_flag |= TSX_HAS_RESOLVED_SERVER;
+
+	    /* Terminate transaction, if it's not already terminated. */
+	    tsx_set_status_code(tsx, PJSIP_SC_TSX_TRANSPORT_ERROR, &err);
+	    if (tsx->state != PJSIP_TSX_STATE_TERMINATED &&
+		tsx->state != PJSIP_TSX_STATE_DESTROYED)
+	    {
+		tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, 
+			       PJSIP_EVENT_TRANSPORT_ERROR, send_state->tdata);
+	    }
+
+	} else {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+
+	    PJ_LOG(2,(tsx->obj_name, 
+		      "Temporary failure in sending %s, "
+		      "will try next server. Err=%d (%s)",
+		      pjsip_tx_data_get_info(send_state->tdata), -sent,
+		      pj_strerror(-sent, errmsg, sizeof(errmsg)).ptr));
+	}
+    }
+
+    unlock_tsx(tsx, &lck);
+}
+
+
+/* Transport callback. */
+static void transport_callback(void *token, pjsip_tx_data *tdata,
+			       pj_ssize_t sent)
+{
+    if (sent < 0) {
+	pjsip_transaction *tsx = token;
+	struct tsx_lock_data lck;
+	char errmsg[PJ_ERR_MSG_SIZE];
+	pj_str_t err;
+
+	tsx->transport_err = -sent;
+
+	err = pj_strerror(-sent, errmsg, sizeof(errmsg));
+
+	PJ_LOG(2,(tsx->obj_name, "Transport failed to send %s! Err=%d (%s)",
+		  pjsip_tx_data_get_info(tdata), -sent, errmsg));
+
+	lock_tsx(tsx, &lck);
+
+	/* Dereference transport. */
+	pjsip_transport_dec_ref(tsx->transport);
+	tsx->transport = NULL;
+
+	/* Terminate transaction. */
+	tsx_set_status_code(tsx, PJSIP_SC_TSX_TRANSPORT_ERROR, &err);
+	tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, 
+		       PJSIP_EVENT_TRANSPORT_ERROR, tdata );
+
+	unlock_tsx(tsx, &lck);
+   }
+}
+
+/*
+ * Send message to the transport.
+ */
+static pj_status_t tsx_send_msg( pjsip_transaction *tsx, 
+                                 pjsip_tx_data *tdata)
+{
+    pj_status_t status = PJ_SUCCESS;
+
+    PJ_ASSERT_RETURN(tsx && tdata, PJ_EINVAL);
+
+    /* Send later if transport is still pending. */
+    if (tsx->transport_flag & TSX_HAS_PENDING_TRANSPORT) {
+	tsx->transport_flag |= TSX_HAS_PENDING_SEND;
+	return PJ_SUCCESS;
+    }
+
+    /* If we have the transport, send the message using that transport.
+     * Otherwise perform full transport resolution.
+     */
+    if (tsx->transport) {
+	status = pjsip_transport_send( tsx->transport, tdata, &tsx->addr,
+				       tsx->addr_len, tsx, 
+				       &transport_callback);
+	if (status == PJ_EPENDING)
+	    status = PJ_SUCCESS;
+
+	if (status != PJ_SUCCESS) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+
+	    PJ_LOG(2,(tsx->obj_name, 
+		      "Error sending %s: Err=%d (%s)",
+		      pjsip_tx_data_get_info(tdata), status, 
+		      pj_strerror(status, errmsg, sizeof(errmsg)).ptr));
+
+	    /* On error, release transport to force using full transport
+	     * resolution procedure.
+	     */
+	    if (tsx->transport) {
+		pjsip_transport_dec_ref(tsx->transport);
+		tsx->transport = NULL;
+	    }
+	    tsx->addr_len = 0;
+	    tsx->res_addr.transport = NULL;
+	    tsx->res_addr.addr_len = 0;
+	} else {
+	    return PJ_SUCCESS;
+	}
+    }
+
+    /* We are here because we don't have transport, or we failed to send
+     * the message using existing transport. If we haven't resolved the
+     * server before, then begin the long process of resolving the server
+     * and send the message with possibly new server.
+     */
+    pj_assert(status != PJ_SUCCESS || tsx->transport == NULL);
+
+    /* If we have resolved the server, we treat the error as permanent error.
+     * Terminate transaction with transport error failure.
+     */
+    if (tsx->transport_flag & TSX_HAS_RESOLVED_SERVER) {
+	
+	char errmsg[PJ_ERR_MSG_SIZE];
+	pj_str_t err;
+
+	if (status == PJ_SUCCESS) {
+	    pj_assert(!"Unexpected status!");
+	    status = PJ_EUNKNOWN;
+	}
+
+	/* We have resolved the server!.
+	 * Treat this as permanent transport error.
+	 */
+	err = pj_strerror(status, errmsg, sizeof(errmsg));
+
+	PJ_LOG(2,(tsx->obj_name, 
+		  "Transport error, terminating transaction. "
+		  "Err=%d (%s)",
+		  status, errmsg));
+
+	tsx_set_status_code(tsx, PJSIP_SC_TSX_TRANSPORT_ERROR, &err);
+	tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, 
+		       PJSIP_EVENT_TRANSPORT_ERROR, NULL );
+
+	return status;
+    }
+
+    /* Must add reference counter because the send request functions
+     * decrement the reference counter.
+     */
+    pjsip_tx_data_add_ref(tdata);
+
+    /* Begin resolving destination etc to send the message. */
+    if (tdata->msg->type == PJSIP_REQUEST_MSG) {
+
+	tsx->transport_flag |= TSX_HAS_PENDING_TRANSPORT;
+	status = pjsip_endpt_send_request_stateless(tsx->endpt, tdata, tsx,
+						    &send_msg_callback);
+	if (status == PJ_EPENDING)
+	    status = PJ_SUCCESS;
+	if (status != PJ_SUCCESS)
+	    pjsip_tx_data_dec_ref(tdata);
+	
+	/* Check if transaction is terminated. */
+	if (status==PJ_SUCCESS && tsx->state == PJSIP_TSX_STATE_TERMINATED)
+	    status = tsx->transport_err;
+
+    } else {
+
+	tsx->transport_flag |= TSX_HAS_PENDING_TRANSPORT;
+	status = pjsip_endpt_send_response( tsx->endpt, &tsx->res_addr, 
+					    tdata, tsx, 
+					    &send_msg_callback);
+	if (status == PJ_EPENDING)
+	    status = PJ_SUCCESS;
+	if (status != PJ_SUCCESS)
+	    pjsip_tx_data_dec_ref(tdata);
+
+	/* Check if transaction is terminated. */
+	if (status==PJ_SUCCESS && tsx->state == PJSIP_TSX_STATE_TERMINATED)
+	    status = tsx->transport_err;
+
+    }
+
+
+    return status;
+}
+
+
+/*
+ * Retransmit last message sent.
+ */
+static void tsx_resched_retransmission( pjsip_transaction *tsx )
+{
+    pj_time_val timeout;
+    int msec_time;
+
+    pj_assert((tsx->transport_flag & TSX_HAS_PENDING_TRANSPORT) == 0);
+
+    msec_time = (1 << (tsx->retransmit_count)) * PJSIP_T1_TIMEOUT;
+
+    if (tsx->role == PJSIP_ROLE_UAC) {
+	/* Retransmission for non-INVITE transaction caps-off at T2 */
+	if (msec_time>PJSIP_T2_TIMEOUT && tsx->method.id!=PJSIP_INVITE_METHOD)
+	    msec_time = PJSIP_T2_TIMEOUT;
+    } else {
+	/* Retransmission of INVITE final response also caps-off at T2 */
+	pj_assert(tsx->status_code >= 200);
+	if (msec_time>PJSIP_T2_TIMEOUT)
+	    msec_time = PJSIP_T2_TIMEOUT;
+    }
+
+    timeout.sec = msec_time / 1000;
+    timeout.msec = msec_time % 1000;
+    pjsip_endpt_schedule_timer( tsx->endpt, &tsx->retransmit_timer, 
+				&timeout);
+}
+
+/*
+ * Retransmit last message sent.
+ */
+static pj_status_t tsx_retransmit( pjsip_transaction *tsx, int resched)
+{
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(tsx->last_tx!=NULL, PJ_EBUG);
+
+    PJ_LOG(5,(tsx->obj_name, "Retransmiting %s, count=%d, restart?=%d", 
+	      pjsip_tx_data_get_info(tsx->last_tx), 
+	      tsx->retransmit_count, resched));
+
+    ++tsx->retransmit_count;
+
+    /* Restart timer T1 first before sending the message to ensure that
+     * retransmission timer is not engaged when loop transport is used.
+     */
+    if (resched) {
+	pj_assert(tsx->state != PJSIP_TSX_STATE_CONFIRMED);
+	if (tsx->transport_flag & TSX_HAS_PENDING_TRANSPORT) {
+	    tsx->transport_flag |= TSX_HAS_PENDING_RESCHED;
+	} else {
+	    tsx_resched_retransmission(tsx);
+	}
+    }
+
+    status = tsx_send_msg( tsx, tsx->last_tx);
+    if (status != PJ_SUCCESS) {
+	return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Handler for events in state Null.
+ */
+static pj_status_t tsx_on_state_null( pjsip_transaction *tsx, 
+                                      pjsip_event *event )
+{
+    pj_status_t status;
+
+    pj_assert(tsx->state == PJSIP_TSX_STATE_NULL);
+
+    if (tsx->role == PJSIP_ROLE_UAS) {
+
+	/* Set state to Trying. */
+	pj_assert(event->type == PJSIP_EVENT_RX_MSG &&
+		  event->body.rx_msg.rdata->msg_info.msg->type == 
+		    PJSIP_REQUEST_MSG);
+	tsx_set_state( tsx, PJSIP_TSX_STATE_TRYING, PJSIP_EVENT_RX_MSG,
+		       event->body.rx_msg.rdata);
+
+    } else {
+	pjsip_tx_data *tdata;
+
+	/* Must be transmit event. 
+	 * You may got this assertion when using loop transport with delay 
+	 * set to zero. That would cause on_rx_response() callback to be 
+	 * called before tsx_send_msg() has completed.
+	 */
+	PJ_ASSERT_RETURN(event->type == PJSIP_EVENT_TX_MSG, PJ_EBUG);
+
+	/* Get the txdata */
+	tdata = event->body.tx_msg.tdata;
+
+	/* Save the message for retransmission. */
+	if (tsx->last_tx && tsx->last_tx != tdata) {
+	    pjsip_tx_data_dec_ref(tsx->last_tx);
+	    tsx->last_tx = NULL;
+	}
+	if (tsx->last_tx != tdata) {
+	    tsx->last_tx = tdata;
+	    pjsip_tx_data_add_ref(tdata);
+	}
+
+	/* Send the message. */
+        status = tsx_send_msg( tsx, tdata);
+	if (status != PJ_SUCCESS) {
+	    return status;
+	}
+
+	/* Start Timer B (or called timer F for non-INVITE) for transaction 
+	 * timeout. If user has configured the timeout value with 
+	 * pjsip_tsx_set_uac_timeout(), use the timeout value there.
+	 */
+	if (tsx->msec_timeout > 0) {
+	    pj_time_val timeout;
+
+	    timeout.sec = tsx->msec_timeout / 1000;
+	    timeout.msec = tsx->msec_timeout % 1000;
+
+	    pjsip_endpt_schedule_timer( tsx->endpt, &tsx->timeout_timer, 
+					&timeout);
+
+	} else {
+	    pjsip_endpt_schedule_timer( tsx->endpt, &tsx->timeout_timer, 
+					&timeout_timer_val);
+	}
+
+	/* Start Timer A (or timer E) for retransmission only if unreliable 
+	 * transport is being used.
+	 */
+	if (!tsx->is_reliable)  {
+	    tsx->retransmit_count = 0;
+	    if (tsx->transport_flag & TSX_HAS_PENDING_TRANSPORT) {
+		tsx->transport_flag |= TSX_HAS_PENDING_RESCHED;
+	    } else {
+		pjsip_endpt_schedule_timer(tsx->endpt, &tsx->retransmit_timer,
+					   &t1_timer_val);
+	    }
+	}
+
+	/* Move state. */
+	tsx_set_state( tsx, PJSIP_TSX_STATE_CALLING, 
+                       PJSIP_EVENT_TX_MSG, tdata);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * State Calling is for UAC after it sends request but before any responses
+ * is received.
+ */
+static pj_status_t tsx_on_state_calling( pjsip_transaction *tsx, 
+				         pjsip_event *event )
+{
+    pj_assert(tsx->state == PJSIP_TSX_STATE_CALLING);
+    pj_assert(tsx->role == PJSIP_ROLE_UAC);
+
+    if (event->type == PJSIP_EVENT_TIMER && 
+	event->body.timer.entry == &tsx->retransmit_timer) 
+    {
+        pj_status_t status;
+
+	/* Retransmit the request. */
+        status = tsx_retransmit( tsx, 1 );
+	if (status != PJ_SUCCESS) {
+	    return status;
+	}
+
+    } else if (event->type == PJSIP_EVENT_TIMER && 
+	       event->body.timer.entry == &tsx->timeout_timer) 
+    {
+
+	/* Cancel retransmission timer. */
+	if (tsx->retransmit_timer._timer_id != -1) {
+	    pjsip_endpt_cancel_timer(tsx->endpt, &tsx->retransmit_timer);
+	    tsx->retransmit_timer._timer_id = -1;
+	}
+	tsx->transport_flag &= ~(TSX_HAS_PENDING_RESCHED);
+
+	/* Set status code */
+	tsx_set_status_code(tsx, PJSIP_SC_TSX_TIMEOUT, NULL);
+
+	/* Inform TU. */
+	tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, 
+                       PJSIP_EVENT_TIMER, &tsx->timeout_timer);
+
+	/* Transaction is destroyed */
+	//return PJSIP_ETSXDESTROYED;
+
+    } else if (event->type == PJSIP_EVENT_RX_MSG) {
+	pjsip_msg *msg;
+	int code;
+
+	/* Get message instance */
+	msg = event->body.rx_msg.rdata->msg_info.msg;
+
+	/* Better be a response message. */
+	if (msg->type != PJSIP_RESPONSE_MSG)
+	    return PJSIP_ENOTRESPONSEMSG;
+
+	/* Cancel retransmission timer A. */
+	if (tsx->retransmit_timer._timer_id != -1) {
+	    pjsip_endpt_cancel_timer(tsx->endpt, &tsx->retransmit_timer);
+	    tsx->retransmit_timer._timer_id = -1;
+	}
+	tsx->transport_flag &= ~(TSX_HAS_PENDING_RESCHED);
+
+
+	/* Cancel timer B (transaction timeout) but look at the timeout policy
+	 * as set by pjsip_tsx_set_uac_timeout().
+	 */
+	code = msg->line.status.code;
+	if ((code==100 && tsx->timeout_policy==PJSIP_TSX_IGNORE_100) ||
+	    (code<200 && tsx->timeout_policy==PJSIP_TSX_IGNORE_1xx))
+	{
+	    /* Don't cancel the timeout timer */
+	}
+	else {
+	    pjsip_endpt_cancel_timer(tsx->endpt, &tsx->timeout_timer);
+	}
+
+	/* Discard retransmission message if it is not INVITE.
+	 * The INVITE tdata is needed in case we have to generate ACK for
+	 * the final response.
+	 */
+	/* Keep last_tx for authorization. */
+	//blp: always keep last_tx until transaction is destroyed
+	//code = msg->line.status.code;
+	//if (tsx->method.id != PJSIP_INVITE_METHOD && code!=401 && code!=407) {
+	//    pjsip_tx_data_dec_ref(tsx->last_tx);
+	//    tsx->last_tx = NULL;
+	//}
+
+	/* Processing is similar to state Proceeding. */
+	tsx_on_state_proceeding_uac( tsx, event);
+
+    } else {
+	pj_assert(!"Unexpected event");
+        return PJ_EBUG;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * State Trying is for UAS after it received request but before any responses
+ * is sent.
+ * Note: this is different than RFC3261, which can use Trying state for
+ *	 non-INVITE client transaction (bug in RFC?).
+ */
+static pj_status_t tsx_on_state_trying( pjsip_transaction *tsx, 
+                                        pjsip_event *event)
+{
+    pj_status_t status;
+
+    pj_assert(tsx->state == PJSIP_TSX_STATE_TRYING);
+
+    /* This state is only for UAS */
+    pj_assert(tsx->role == PJSIP_ROLE_UAS);
+
+    /* Better be transmission of response message.
+     * If we've got request retransmission, this means that the TU hasn't
+     * transmitted any responses within 500 ms, which is not allowed. If
+     * this happens, just ignore the event (we couldn't retransmit last
+     * response because we haven't sent any!).
+     */
+    if (event->type != PJSIP_EVENT_TX_MSG) {
+	return PJ_SUCCESS;
+    }
+
+    /* The rest of the processing of the event is exactly the same as in
+     * "Proceeding" state.
+     */
+    status = tsx_on_state_proceeding_uas( tsx, event);
+
+    /* Inform the TU of the state transision if state is still State_Trying */
+    if (status==PJ_SUCCESS && tsx->state == PJSIP_TSX_STATE_TRYING) {
+
+	tsx_set_state( tsx, PJSIP_TSX_STATE_PROCEEDING, 
+                       PJSIP_EVENT_TX_MSG, event->body.tx_msg.tdata);
+
+    }
+
+    return status;
+}
+
+
+/*
+ * Handler for events in Proceeding for UAS
+ * This state happens after the TU sends provisional response.
+ */
+static pj_status_t tsx_on_state_proceeding_uas( pjsip_transaction *tsx,
+                                                pjsip_event *event)
+{
+    pj_assert(tsx->state == PJSIP_TSX_STATE_PROCEEDING || 
+	      tsx->state == PJSIP_TSX_STATE_TRYING);
+
+    /* This state is only for UAS. */
+    pj_assert(tsx->role == PJSIP_ROLE_UAS);
+
+    /* Receive request retransmission. */
+    if (event->type == PJSIP_EVENT_RX_MSG) {
+
+        pj_status_t status;
+
+	/* Must have last response sent. */
+	PJ_ASSERT_RETURN(tsx->last_tx != NULL, PJ_EBUG);
+
+	/* Send last response */
+	if (tsx->transport_flag & TSX_HAS_PENDING_TRANSPORT) {
+	    tsx->transport_flag |= TSX_HAS_PENDING_SEND;
+	} else {
+	    status = tsx_send_msg(tsx, tsx->last_tx);
+	    if (status != PJ_SUCCESS)
+		return status;
+	}
+	
+    } else if (event->type == PJSIP_EVENT_TX_MSG ) {
+	pjsip_tx_data *tdata = event->body.tx_msg.tdata;
+        pj_status_t status;
+
+	/* The TU sends response message to the request. Save this message so
+	 * that we can retransmit the last response in case we receive request
+	 * retransmission.
+	 */
+	pjsip_msg *msg = tdata->msg;
+
+	/* This can only be a response message. */
+	PJ_ASSERT_RETURN(msg->type==PJSIP_RESPONSE_MSG, PJSIP_ENOTRESPONSEMSG);
+
+	/* Update last status */
+	tsx_set_status_code(tsx, msg->line.status.code, 
+			    &msg->line.status.reason);
+
+	/* Discard the saved last response (it will be updated later as
+	 * necessary).
+	 */
+	if (tsx->last_tx && tsx->last_tx != tdata) {
+	    pjsip_tx_data_dec_ref( tsx->last_tx );
+	    tsx->last_tx = NULL;
+	}
+
+	/* Send the message. */
+        status = tsx_send_msg(tsx, tdata);
+	if (status != PJ_SUCCESS) {
+	    return status;
+	}
+
+	// Update To tag header for RFC2543 transaction.
+	// TODO:
+
+	/* Update transaction state */
+	if (PJSIP_IS_STATUS_IN_CLASS(tsx->status_code, 100)) {
+
+	    if (tsx->last_tx != tdata) {
+		tsx->last_tx = tdata;
+		pjsip_tx_data_add_ref( tdata );
+	    }
+
+	    tsx_set_state( tsx, PJSIP_TSX_STATE_PROCEEDING, 
+                           PJSIP_EVENT_TX_MSG, tdata );
+
+	} else if (PJSIP_IS_STATUS_IN_CLASS(tsx->status_code, 200)) {
+
+	    if (tsx->method.id == PJSIP_INVITE_METHOD && tsx->handle_200resp==0) {
+
+		/* 2xx class message is not saved, because retransmission 
+                 * is handled by TU.
+		 */
+		tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, 
+                               PJSIP_EVENT_TX_MSG, tdata );
+
+		/* Transaction is destroyed. */
+		//return PJSIP_ETSXDESTROYED;
+
+	    } else {
+		pj_time_val timeout;
+
+		if (tsx->method.id == PJSIP_INVITE_METHOD) {
+		    tsx->retransmit_count = 0;
+		    if (tsx->transport_flag & TSX_HAS_PENDING_TRANSPORT) {
+			tsx->transport_flag |= TSX_HAS_PENDING_RESCHED;
+		    } else {
+			pjsip_endpt_schedule_timer( tsx->endpt, 
+						    &tsx->retransmit_timer,
+						    &t1_timer_val);
+		    }
+		}
+
+		/* Save last response sent for retransmission when request 
+		 * retransmission is received.
+		 */
+		if (tsx->last_tx != tdata) {
+		    tsx->last_tx = tdata;
+		    pjsip_tx_data_add_ref(tdata);
+		}
+
+		/* Setup timeout timer: */
+		
+		if (tsx->method.id == PJSIP_INVITE_METHOD) {
+		    
+		    /* Start Timer H at 64*T1 for INVITE server transaction,
+		     * regardless of transport.
+		     */
+		    timeout = timeout_timer_val;
+		    
+		} else if (PJSIP_TRANSPORT_IS_RELIABLE(tsx->transport)==0) {
+		    
+		    /* For non-INVITE, start timer J at 64*T1 for unreliable
+		     * transport.
+		     */
+		    timeout = timeout_timer_val;
+		    
+		} else {
+		    
+		    /* Transaction terminates immediately for non-INVITE when
+		     * reliable transport is used.
+		     */
+		    timeout.sec = timeout.msec = 0;
+		}
+
+		pjsip_endpt_schedule_timer( tsx->endpt, &tsx->timeout_timer, 
+                                            &timeout);
+
+		/* Set state to "Completed" */
+		tsx_set_state( tsx, PJSIP_TSX_STATE_COMPLETED, 
+                               PJSIP_EVENT_TX_MSG, tdata );
+	    }
+
+	} else if (tsx->status_code >= 300) {
+
+	    /* 3xx-6xx class message causes transaction to move to 
+             * "Completed" state. 
+             */
+	    if (tsx->last_tx != tdata) {
+		tsx->last_tx = tdata;
+		pjsip_tx_data_add_ref( tdata );
+	    }
+
+	    /* For INVITE, start timer H for transaction termination 
+	     * regardless whether transport is reliable or not.
+	     * For non-INVITE, start timer J with the value of 64*T1 for
+	     * non-reliable transports, and zero for reliable transports.
+	     */
+	    if (tsx->method.id == PJSIP_INVITE_METHOD) {
+		/* Start timer H for INVITE */
+		pjsip_endpt_schedule_timer(tsx->endpt,&tsx->timeout_timer,
+					   &timeout_timer_val);
+	    } else if (!tsx->is_reliable) {
+		/* Start timer J on 64*T1 seconds for non-INVITE */
+		pjsip_endpt_schedule_timer(tsx->endpt,&tsx->timeout_timer,
+					   &timeout_timer_val);
+	    } else {
+		/* Start timer J on zero seconds for non-INVITE */
+		pj_time_val zero_time = { 0, 0 };
+		pjsip_endpt_schedule_timer(tsx->endpt,&tsx->timeout_timer,
+					   &zero_time);
+	    }
+
+	    /* For INVITE, if unreliable transport is used, retransmission 
+	     * timer G will be scheduled (retransmission).
+	     */
+	    if (!tsx->is_reliable) {
+		pjsip_cseq_hdr *cseq = pjsip_msg_find_hdr( msg, PJSIP_H_CSEQ,
+                                                           NULL);
+		if (cseq->method.id == PJSIP_INVITE_METHOD) {
+		    tsx->retransmit_count = 0;
+		    if (tsx->transport_flag & TSX_HAS_PENDING_TRANSPORT) {
+			tsx->transport_flag |= TSX_HAS_PENDING_RESCHED;
+		    } else {
+			pjsip_endpt_schedule_timer(tsx->endpt, 
+						   &tsx->retransmit_timer, 
+						   &t1_timer_val);
+		    }
+		}
+	    }
+
+	    /* Inform TU */
+	    tsx_set_state( tsx, PJSIP_TSX_STATE_COMPLETED, 
+                           PJSIP_EVENT_TX_MSG, tdata );
+
+	} else {
+	    pj_assert(0);
+	}
+
+
+    } else if (event->type == PJSIP_EVENT_TIMER && 
+	       event->body.timer.entry == &tsx->retransmit_timer) {
+
+	/* Retransmission timer elapsed. */
+        pj_status_t status;
+
+	/* Must not be triggered while transport is pending. */
+	pj_assert((tsx->transport_flag & TSX_HAS_PENDING_TRANSPORT) == 0);
+
+	/* Must have last response to retransmit. */
+	pj_assert(tsx->last_tx != NULL);
+
+	/* Retransmit the last response. */
+        status = tsx_retransmit( tsx, 1 );
+	if (status != PJ_SUCCESS) {
+	    return status;
+	}
+
+    } else if (event->type == PJSIP_EVENT_TIMER && 
+	       event->body.timer.entry == &tsx->timeout_timer) {
+
+	/* Timeout timer. should not happen? */
+	pj_assert(!"Should not happen(?)");
+
+	tsx_set_status_code(tsx, PJSIP_SC_TSX_TIMEOUT, NULL);
+
+	tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, 
+                       PJSIP_EVENT_TIMER, &tsx->timeout_timer);
+
+	return PJ_EBUG;
+
+    } else {
+	pj_assert(!"Unexpected event");
+        return PJ_EBUG;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Handler for events in Proceeding for UAC
+ * This state happens after provisional response(s) has been received from
+ * UAS.
+ */
+static pj_status_t tsx_on_state_proceeding_uac(pjsip_transaction *tsx, 
+                                               pjsip_event *event)
+{
+
+    pj_assert(tsx->state == PJSIP_TSX_STATE_PROCEEDING || 
+	      tsx->state == PJSIP_TSX_STATE_CALLING);
+
+    if (event->type != PJSIP_EVENT_TIMER) {
+	pjsip_msg *msg;
+
+	/* Must be incoming response, because we should not retransmit
+	 * request once response has been received.
+	 */
+	pj_assert(event->type == PJSIP_EVENT_RX_MSG);
+	if (event->type != PJSIP_EVENT_RX_MSG) {
+	    return PJ_EINVALIDOP;
+	}
+
+	msg = event->body.rx_msg.rdata->msg_info.msg;
+
+	/* Must be a response message. */
+	if (msg->type != PJSIP_RESPONSE_MSG) {
+	    pj_assert(!"Expecting response message!");
+	    return PJSIP_ENOTRESPONSEMSG;
+	}
+
+	tsx_set_status_code(tsx, msg->line.status.code, 
+			    &msg->line.status.reason);
+
+    } else {
+	tsx_set_status_code(tsx, PJSIP_SC_TSX_TIMEOUT, NULL);
+    }
+
+    if (PJSIP_IS_STATUS_IN_CLASS(tsx->status_code, 100)) {
+
+	/* Inform the message to TU. */
+	tsx_set_state( tsx, PJSIP_TSX_STATE_PROCEEDING, 
+                       PJSIP_EVENT_RX_MSG, event->body.rx_msg.rdata );
+
+    } else if (PJSIP_IS_STATUS_IN_CLASS(tsx->status_code,200)) {
+
+	/* Stop timeout timer B/F. */
+	pjsip_endpt_cancel_timer( tsx->endpt, &tsx->timeout_timer );
+
+	/* For INVITE, the state moves to Terminated state (because ACK is
+	 * handled in TU). For non-INVITE, state moves to Completed.
+	 */
+	if (tsx->method.id == PJSIP_INVITE_METHOD) {
+	    tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, 
+                           PJSIP_EVENT_RX_MSG, event->body.rx_msg.rdata );
+	    //return PJSIP_ETSXDESTROYED;
+
+	} else {
+	    pj_time_val timeout;
+
+	    /* For unreliable transport, start timer D (for INVITE) or 
+	     * timer K for non-INVITE. */
+	    if (!tsx->is_reliable) {
+		if (tsx->method.id == PJSIP_INVITE_METHOD) {
+		    timeout = td_timer_val;
+		} else {
+		    timeout = t4_timer_val;
+		}
+	    } else {
+		timeout.sec = timeout.msec = 0;
+	    }
+	    pjsip_endpt_schedule_timer( tsx->endpt, &tsx->timeout_timer, 
+					&timeout);
+
+	    /* Move state to Completed, inform TU. */
+	    tsx_set_state( tsx, PJSIP_TSX_STATE_COMPLETED, 
+                           PJSIP_EVENT_RX_MSG, event->body.rx_msg.rdata );
+	}
+
+    } else if (event->type == PJSIP_EVENT_TIMER &&
+	       event->body.timer.entry == &tsx->timeout_timer) {
+
+	/* Inform TU. */
+	tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, 
+		       PJSIP_EVENT_TIMER, &tsx->timeout_timer);
+
+
+    } else if (tsx->status_code >= 300 && tsx->status_code <= 699) {
+
+
+#if 0
+	/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
+	/*
+	 * This is the old code; it's broken for authentication.
+	 */
+	pj_time_val timeout;
+        pj_status_t status;
+
+	/* Stop timer B. */
+	pjsip_endpt_cancel_timer( tsx->endpt, &tsx->timeout_timer );
+
+	/* Generate and send ACK for INVITE. */
+	if (tsx->method.id == PJSIP_INVITE_METHOD) {
+	    pjsip_tx_data *ack;
+
+	    status = pjsip_endpt_create_ack( tsx->endpt, tsx->last_tx, 
+					     event->body.rx_msg.rdata,
+					     &ack);
+	    if (status != PJ_SUCCESS)
+		return status;
+
+	    if (ack != tsx->last_tx) {
+		pjsip_tx_data_dec_ref(tsx->last_tx);
+		tsx->last_tx = ack;
+	    }
+
+            status = tsx_send_msg( tsx, tsx->last_tx);
+	    if (status != PJ_SUCCESS) {
+		return status;
+	    }
+	}
+
+	/* Start Timer D with TD/T4 timer if unreliable transport is used. */
+	if (!tsx->is_reliable) {
+	    if (tsx->method.id == PJSIP_INVITE_METHOD) {
+		timeout = td_timer_val;
+	    } else {
+		timeout = t4_timer_val;
+	    }
+	} else {
+	    timeout.sec = timeout.msec = 0;
+	}
+	pjsip_endpt_schedule_timer( tsx->endpt, &tsx->timeout_timer, &timeout);
+
+	/* Inform TU. 
+	 * blp: You might be tempted to move this notification before
+	 *      sending ACK, but I think you shouldn't. Better set-up
+	 *      everything before calling tsx_user's callback to avoid
+	 *      mess up.
+	 */
+	tsx_set_state( tsx, PJSIP_TSX_STATE_COMPLETED, 
+                       PJSIP_EVENT_RX_MSG, event->body.rx_msg.rdata );
+
+	/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
+#endif
+
+	/* New code, taken from 0.2.9.x branch */
+	pj_time_val timeout;
+	pjsip_tx_data *ack_tdata = NULL;
+
+	/* Stop timer B. */
+	pjsip_endpt_cancel_timer( tsx->endpt, &tsx->timeout_timer );
+
+	/* Generate and send ACK (for INVITE) */
+	if (tsx->method.id == PJSIP_INVITE_METHOD) {
+	    pj_status_t status;
+
+	    status = pjsip_endpt_create_ack( tsx->endpt, tsx->last_tx, 
+					     event->body.rx_msg.rdata,
+					     &ack_tdata);
+	    if (status != PJ_SUCCESS)
+		return status;
+
+	    status = tsx_send_msg( tsx, ack_tdata);
+	    if (status != PJ_SUCCESS)
+		return status;
+	}
+
+	/* Inform TU. */
+	tsx_set_state( tsx, PJSIP_TSX_STATE_COMPLETED, 
+		       PJSIP_EVENT_RX_MSG, event->body.rx_msg.rdata);
+
+	/* Generate and send ACK for INVITE. */
+	if (tsx->method.id == PJSIP_INVITE_METHOD) {
+	    if (ack_tdata != tsx->last_tx) {
+		pjsip_tx_data_dec_ref(tsx->last_tx);
+		tsx->last_tx = ack_tdata;
+
+		/* This is a bug.
+		   tsx_send_msg() does NOT decrement tdata's reference counter,
+		   so if we add the reference counter here, tdata will have
+		   reference counter 2, causing it to leak.
+		pjsip_tx_data_add_ref(ack_tdata);
+		*/
+	    }
+	}
+
+	/* Start Timer D with TD/T4 timer if unreliable transport is used. */
+	/* Note: tsx->transport may be NULL! */
+	if ((tsx->transport && PJSIP_TRANSPORT_IS_RELIABLE(tsx->transport)==0)
+	    || ((tsx->transport_flag & PJSIP_TRANSPORT_RELIABLE) == 0)) 
+	{
+	    if (tsx->method.id == PJSIP_INVITE_METHOD) {
+		timeout = td_timer_val;
+	    } else {
+		timeout = t4_timer_val;
+	    }
+	} else {
+	    timeout.sec = timeout.msec = 0;
+	}
+	pjsip_endpt_schedule_timer( tsx->endpt, &tsx->timeout_timer, &timeout);
+
+    } else {
+	// Shouldn't happen because there's no timer for this state.
+	pj_assert(!"Unexpected event");
+        return PJ_EBUG;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Handler for events in Completed state for UAS
+ */
+static pj_status_t tsx_on_state_completed_uas( pjsip_transaction *tsx, 
+                                               pjsip_event *event)
+{
+    pj_assert(tsx->state == PJSIP_TSX_STATE_COMPLETED);
+
+    if (event->type == PJSIP_EVENT_RX_MSG) {
+	pjsip_msg *msg = event->body.rx_msg.rdata->msg_info.msg;
+
+	/* This must be a request message retransmission. */
+	if (msg->type != PJSIP_REQUEST_MSG)
+	    return PJSIP_ENOTREQUESTMSG;
+
+	/* On receive request retransmission, retransmit last response. */
+	if (msg->line.req.method.id != PJSIP_ACK_METHOD) {
+            pj_status_t status;
+
+            status = tsx_retransmit( tsx, 0 );
+	    if (status != PJ_SUCCESS) {
+		return status;
+	    }
+
+	} else {
+	    /* Process incoming ACK request. */
+
+	    /* Cease retransmission. */
+	    if (tsx->retransmit_timer._timer_id != -1) {
+		pjsip_endpt_cancel_timer(tsx->endpt, &tsx->retransmit_timer);
+		tsx->retransmit_timer._timer_id = -1;
+	    }
+	    tsx->transport_flag &= ~(TSX_HAS_PENDING_RESCHED);
+
+	    /* Start timer I in T4 interval (transaction termination). */
+	    pjsip_endpt_cancel_timer( tsx->endpt, &tsx->timeout_timer );
+	    pjsip_endpt_schedule_timer( tsx->endpt, &tsx->timeout_timer, 
+					&t4_timer_val);
+
+	    /* Move state to "Confirmed" */
+	    tsx_set_state( tsx, PJSIP_TSX_STATE_CONFIRMED, 
+                           PJSIP_EVENT_RX_MSG, event->body.rx_msg.rdata );
+	}	
+
+    } else if (event->type == PJSIP_EVENT_TIMER) {
+
+	if (event->body.timer.entry == &tsx->retransmit_timer) {
+	    /* Retransmit message. */
+            pj_status_t status;
+
+            status = tsx_retransmit( tsx, 1 );
+	    if (status != PJ_SUCCESS) {
+		return status;
+	    }
+
+	} else {
+	    if (tsx->method.id == PJSIP_INVITE_METHOD) {
+
+		/* For INVITE, this means that ACK was never received.
+		 * Set state to Terminated, and inform TU.
+		 */
+
+		tsx_set_status_code(tsx, PJSIP_SC_TSX_TIMEOUT, NULL);
+
+		tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, 
+                               PJSIP_EVENT_TIMER, &tsx->timeout_timer );
+
+		//return PJSIP_ETSXDESTROYED;
+
+	    } else {
+		/* Transaction terminated, it can now be deleted. */
+		tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, 
+                               PJSIP_EVENT_TIMER, &tsx->timeout_timer );
+		//return PJSIP_ETSXDESTROYED;
+	    }
+	}
+
+    } else {
+	/* Ignore request to transmit. */
+	PJ_ASSERT_RETURN(event->type == PJSIP_EVENT_TX_MSG && 
+			 event->body.tx_msg.tdata == tsx->last_tx, 
+			 PJ_EINVALIDOP);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Handler for events in Completed state for UAC transaction.
+ */
+static pj_status_t tsx_on_state_completed_uac( pjsip_transaction *tsx,
+                                               pjsip_event *event)
+{
+    pj_assert(tsx->state == PJSIP_TSX_STATE_COMPLETED);
+
+    if (event->type == PJSIP_EVENT_TIMER) {
+	/* Must be the timeout timer. */
+	pj_assert(event->body.timer.entry == &tsx->timeout_timer);
+
+	/* Move to Terminated state. */
+	tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, 
+                       PJSIP_EVENT_TIMER, event->body.timer.entry );
+
+	/* Transaction has been destroyed. */
+	//return PJSIP_ETSXDESTROYED;
+
+    } else if (event->type == PJSIP_EVENT_RX_MSG) {
+	if (tsx->method.id == PJSIP_INVITE_METHOD) {
+	    /* On received of final response retransmission, retransmit the ACK.
+	     * TU doesn't need to be informed.
+	     */
+	    pjsip_msg *msg = event->body.rx_msg.rdata->msg_info.msg;
+	    pj_assert(msg->type == PJSIP_RESPONSE_MSG);
+	    if (msg->type==PJSIP_RESPONSE_MSG &&
+		msg->line.status.code >= 200)
+	    {
+                pj_status_t status;
+
+                status = tsx_retransmit( tsx, 0 );
+		if (status != PJ_SUCCESS) {
+		    return status;
+		}
+	    } else {
+		/* Very late retransmission of privisional response. */
+		pj_assert( msg->type == PJSIP_RESPONSE_MSG );
+	    }
+	} else {
+	    /* Just drop the response. */
+	}
+
+    } else {
+	pj_assert(!"Unexpected event");
+        return PJ_EINVALIDOP;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Handler for events in state Confirmed.
+ */
+static pj_status_t tsx_on_state_confirmed( pjsip_transaction *tsx,
+                                           pjsip_event *event)
+{
+    pj_assert(tsx->state == PJSIP_TSX_STATE_CONFIRMED);
+
+    /* This state is only for UAS for INVITE. */
+    pj_assert(tsx->role == PJSIP_ROLE_UAS);
+    pj_assert(tsx->method.id == PJSIP_INVITE_METHOD);
+
+    /* Absorb any ACK received. */
+    if (event->type == PJSIP_EVENT_RX_MSG) {
+
+	pjsip_msg *msg = event->body.rx_msg.rdata->msg_info.msg;
+
+	/* Only expecting request message. */
+	if (msg->type != PJSIP_REQUEST_MSG)
+	    return PJSIP_ENOTREQUESTMSG;
+
+	/* Must be an ACK request or a late INVITE retransmission. */
+	pj_assert(msg->line.req.method.id == PJSIP_ACK_METHOD || 
+		  msg->line.req.method.id == PJSIP_INVITE_METHOD);
+
+    } else if (event->type == PJSIP_EVENT_TIMER) {
+	/* Must be from timeout_timer_. */
+	pj_assert(event->body.timer.entry == &tsx->timeout_timer);
+
+	/* Move to Terminated state. */
+	tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, 
+                       PJSIP_EVENT_TIMER, &tsx->timeout_timer );
+
+	/* Transaction has been destroyed. */
+	//return PJSIP_ETSXDESTROYED;
+
+    } else {
+	pj_assert(!"Unexpected event");
+        return PJ_EBUG;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Handler for events in state Terminated.
+ */
+static pj_status_t tsx_on_state_terminated( pjsip_transaction *tsx,
+                                            pjsip_event *event)
+{
+    pj_assert(tsx->state == PJSIP_TSX_STATE_TERMINATED);
+    pj_assert(event->type == PJSIP_EVENT_TIMER);
+
+    /* Destroy this transaction */
+    tsx_set_state(tsx, PJSIP_TSX_STATE_DESTROYED, 
+                  event->type, event->body.user.user1 );
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Handler for events in state Destroyed.
+ * Shouldn't happen!
+ */
+static pj_status_t tsx_on_state_destroyed(pjsip_transaction *tsx,
+                                          pjsip_event *event)
+{
+    PJ_UNUSED_ARG(tsx);
+    PJ_UNUSED_ARG(event);
+    pj_assert(!"Not expecting any events!!");
+    return PJ_EBUG;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport.c	(revision 1163)
@@ -0,0 +1,1474 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_transport.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_parser.h>
+#include <pjsip/sip_msg.h>
+#include <pjsip/sip_private.h>
+#include <pjsip/sip_errno.h>
+#include <pjsip/sip_module.h>
+#include <pj/except.h>
+#include <pj/os.h>
+#include <pj/log.h>
+#include <pj/ioqueue.h>
+#include <pj/hash.h>
+#include <pj/string.h>
+#include <pj/pool.h>
+#include <pj/assert.h>
+#include <pj/lock.h>
+
+
+#define THIS_FILE    "sip_transport.c"
+
+#if 0
+#   define TRACE_(x)	PJ_LOG(5,x)
+#else
+#   define TRACE_(x)
+#endif
+
+/* Prototype. */
+static pj_status_t mod_on_tx_msg(pjsip_tx_data *tdata);
+
+/* This module has sole purpose to print transmit data to contigous buffer
+ * before actually transmitted to the wire. 
+ */
+static pjsip_module mod_msg_print = 
+{
+    NULL, NULL,				/* prev and next		    */
+    { "mod-msg-print", 13},		/* Name.			    */
+    -1,					/* Id				    */
+    PJSIP_MOD_PRIORITY_TRANSPORT_LAYER,	/* Priority			    */
+    NULL,				/* load()			    */
+    NULL,				/* start()			    */
+    NULL,				/* stop()			    */
+    NULL,				/* unload()			    */
+    NULL,				/* on_rx_request()		    */
+    NULL,				/* on_rx_response()		    */
+    &mod_on_tx_msg,			/* on_tx_request()		    */
+    &mod_on_tx_msg,			/* on_tx_response()		    */
+    NULL,				/* on_tsx_state()		    */
+};
+
+/*
+ * Transport manager.
+ */
+struct pjsip_tpmgr 
+{
+    pj_hash_table_t *table;
+    pj_lock_t	    *lock;
+    pjsip_endpoint  *endpt;
+    pjsip_tpfactory  factory_list;
+#if defined(PJ_DEBUG) && PJ_DEBUG!=0
+    pj_atomic_t	    *tdata_counter;
+#endif
+    void           (*on_rx_msg)(pjsip_endpoint*, pj_status_t, pjsip_rx_data*);
+    pj_status_t	   (*on_tx_msg)(pjsip_endpoint*, pjsip_tx_data*);
+};
+
+/* Key for looking up hash table */
+struct transport_key
+{
+    pjsip_transport_type_e  type;
+    pj_sockaddr		    addr;
+};
+
+/*****************************************************************************
+ *
+ * GENERAL TRANSPORT (NAMES, TYPES, ETC.)
+ *
+ *****************************************************************************/
+
+/*
+ * Transport names.
+ */
+struct
+{
+    pjsip_transport_type_e type;
+    pj_uint16_t		   port;
+    pj_str_t		   name;
+    unsigned		   flag;
+    char		   name_buf[16];
+} transport_names[16] = 
+{
+    { PJSIP_TRANSPORT_UNSPECIFIED, 0, {"Unspecified", 11}, 0},
+    { PJSIP_TRANSPORT_UDP, 5060, {"UDP", 3}, PJSIP_TRANSPORT_DATAGRAM},
+    { PJSIP_TRANSPORT_TCP, 5060, {"TCP", 3}, PJSIP_TRANSPORT_RELIABLE},
+    { PJSIP_TRANSPORT_TLS, 5061, {"TLS", 3}, PJSIP_TRANSPORT_RELIABLE | PJSIP_TRANSPORT_SECURE},
+    { PJSIP_TRANSPORT_SCTP, 5060, {"SCTP", 4}, PJSIP_TRANSPORT_RELIABLE},
+    { PJSIP_TRANSPORT_LOOP, 15060, {"LOOP", 4}, PJSIP_TRANSPORT_RELIABLE}, 
+    { PJSIP_TRANSPORT_LOOP_DGRAM, 15060, {"LOOP-DGRAM", 10}, PJSIP_TRANSPORT_DATAGRAM},
+};
+
+
+/*
+ * Register new transport type to PJSIP.
+ */
+PJ_DECL(pj_status_t) pjsip_transport_register_type(unsigned tp_flag,
+						   const char *tp_name,
+						   int def_port,
+						   int *p_tp_type)
+{
+    unsigned i;
+
+    PJ_ASSERT_RETURN(tp_flag && tp_name && def_port, PJ_EINVAL);
+    PJ_ASSERT_RETURN(pj_ansi_strlen(tp_name) < 
+			PJ_ARRAY_SIZE(transport_names[0].name_buf), 
+		     PJ_ENAMETOOLONG);
+
+    for (i=1; i<PJ_ARRAY_SIZE(transport_names); ++i) {
+	if (transport_names[i].type == 0)
+	    break;
+    }
+
+    if (i == PJ_ARRAY_SIZE(transport_names))
+	return PJ_ETOOMANY;
+
+    transport_names[i].type = (pjsip_transport_type_e)i;
+    transport_names[i].port = (pj_uint16_t)def_port;
+    pj_ansi_strcpy(transport_names[i].name_buf, tp_name);
+    transport_names[i].name = pj_str(transport_names[i].name_buf);
+    transport_names[i].flag = tp_flag;
+
+    if (p_tp_type)
+	*p_tp_type = i;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get transport type from name.
+ */
+PJ_DEF(pjsip_transport_type_e) 
+pjsip_transport_get_type_from_name(const pj_str_t *name)
+{
+    unsigned i;
+
+    /* Sanity check. 
+     * Check that transport_names[] are indexed on transport type. 
+     */
+    PJ_ASSERT_RETURN(transport_names[PJSIP_TRANSPORT_UDP].type ==
+		     PJSIP_TRANSPORT_UDP, PJSIP_TRANSPORT_UNSPECIFIED);
+
+    if (name->slen == 0)
+	return PJSIP_TRANSPORT_UNSPECIFIED;
+
+    /* Get transport type from name. */
+    for (i=0; i<PJ_ARRAY_SIZE(transport_names); ++i) {
+	if (pj_stricmp(name, &transport_names[i].name) == 0) {
+	    return transport_names[i].type;
+	}
+    }
+
+    pj_assert(!"Invalid transport name");
+    return PJSIP_TRANSPORT_UNSPECIFIED;
+}
+
+
+/*
+ * Get the transport type for the specified flags.
+ */
+PJ_DEF(pjsip_transport_type_e) 
+pjsip_transport_get_type_from_flag(unsigned flag)
+{
+    unsigned i;
+
+    /* Sanity check. 
+     * Check that transport_names[] are indexed on transport type. 
+     */
+    PJ_ASSERT_RETURN(transport_names[PJSIP_TRANSPORT_UDP].type ==
+		     PJSIP_TRANSPORT_UDP, PJSIP_TRANSPORT_UNSPECIFIED);
+
+    /* Get the transport type for the specified flags. */
+    for (i=0; i<PJ_ARRAY_SIZE(transport_names); ++i) {
+	if (transport_names[i].flag == flag) {
+	    return transport_names[i].type;
+	}
+    }
+
+    pj_assert(!"Invalid transport type");
+    return PJSIP_TRANSPORT_UNSPECIFIED;
+}
+
+PJ_DEF(unsigned)
+pjsip_transport_get_flag_from_type( pjsip_transport_type_e type )
+{
+    /* Sanity check. 
+     * Check that transport_names[] are indexed on transport type. 
+     */
+    PJ_ASSERT_RETURN(transport_names[PJSIP_TRANSPORT_UDP].type ==
+		     PJSIP_TRANSPORT_UDP, 0);
+
+    /* Check that argument is valid. */
+    PJ_ASSERT_RETURN(type < PJ_ARRAY_SIZE(transport_names), 0);
+
+    /* Return transport flag. */
+    return transport_names[type].flag;
+}
+
+/*
+ * Get the default SIP port number for the specified type.
+ */
+PJ_DEF(int) 
+pjsip_transport_get_default_port_for_type(pjsip_transport_type_e type)
+{
+    /* Sanity check. 
+     * Check that transport_names[] are indexed on transport type. 
+     */
+    PJ_ASSERT_RETURN(transport_names[PJSIP_TRANSPORT_UDP].type ==
+		     PJSIP_TRANSPORT_UDP, 0);
+
+    /* Check that argument is valid. */
+    PJ_ASSERT_RETURN(type < PJ_ARRAY_SIZE(transport_names), 5060);
+
+    /* Return the port. */
+    return transport_names[type].port;
+}
+
+/*
+ * Get transport name.
+ */
+PJ_DEF(const char*) pjsip_transport_get_type_name(pjsip_transport_type_e type)
+{
+    /* Sanity check. 
+     * Check that transport_names[] are indexed on transport type. 
+     */
+    PJ_ASSERT_RETURN(transport_names[PJSIP_TRANSPORT_UDP].type ==
+		     PJSIP_TRANSPORT_UDP, "Unknown");
+
+    /* Check that argument is valid. */
+    PJ_ASSERT_RETURN(type < PJ_ARRAY_SIZE(transport_names), "Unknown");
+
+    /* Return the port. */
+    return transport_names[type].name.ptr;
+}
+
+
+/*****************************************************************************
+ *
+ * TRANSPORT SELECTOR
+ *
+ *****************************************************************************/
+
+/*
+ * Add transport/listener reference in the selector.
+ */
+PJ_DEF(void) pjsip_tpselector_add_ref(pjsip_tpselector *sel)
+{
+    if (sel->type == PJSIP_TPSELECTOR_TRANSPORT && sel->u.transport != NULL)
+	pjsip_transport_add_ref(sel->u.transport);
+    else if (sel->type == PJSIP_TPSELECTOR_LISTENER && sel->u.listener != NULL)
+	; /* Hmm.. looks like we don't have reference counter for listener */
+}
+
+
+/*
+ * Decrement transport/listener reference in the selector.
+ */
+PJ_DEF(void) pjsip_tpselector_dec_ref(pjsip_tpselector *sel)
+{
+    if (sel->type == PJSIP_TPSELECTOR_TRANSPORT && sel->u.transport != NULL)
+	pjsip_transport_dec_ref(sel->u.transport);
+    else if (sel->type == PJSIP_TPSELECTOR_LISTENER && sel->u.listener != NULL)
+	; /* Hmm.. looks like we don't have reference counter for listener */
+}
+
+
+/*****************************************************************************
+ *
+ * TRANSMIT DATA BUFFER MANIPULATION.
+ *
+ *****************************************************************************/
+
+/*
+ * Create new transmit buffer.
+ */
+PJ_DEF(pj_status_t) pjsip_tx_data_create( pjsip_tpmgr *mgr,
+					  pjsip_tx_data **p_tdata )
+{
+    pj_pool_t *pool;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(mgr && p_tdata, PJ_EINVAL);
+
+    pool = pjsip_endpt_create_pool( mgr->endpt, "tdta%p",
+				    PJSIP_POOL_LEN_TDATA,
+				    PJSIP_POOL_INC_TDATA );
+    if (!pool)
+	return PJ_ENOMEM;
+
+    tdata = pj_pool_zalloc(pool, sizeof(pjsip_tx_data));
+    tdata->pool = pool;
+    tdata->mgr = mgr;
+    pj_ansi_snprintf(tdata->obj_name, PJ_MAX_OBJ_NAME, "tdta%p", tdata);
+
+    status = pj_atomic_create(tdata->pool, 0, &tdata->ref_cnt);
+    if (status != PJ_SUCCESS) {
+	pjsip_endpt_release_pool( mgr->endpt, tdata->pool );
+	return status;
+    }
+    
+    //status = pj_lock_create_simple_mutex(pool, "tdta%p", &tdata->lock);
+    status = pj_lock_create_null_mutex(pool, "tdta%p", &tdata->lock);
+    if (status != PJ_SUCCESS) {
+	pjsip_endpt_release_pool( mgr->endpt, tdata->pool );
+	return status;
+    }
+
+    pj_ioqueue_op_key_init(&tdata->op_key.key, sizeof(tdata->op_key));
+
+#if defined(PJ_DEBUG) && PJ_DEBUG!=0
+    pj_atomic_inc( tdata->mgr->tdata_counter );
+#endif
+
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Add reference to tx buffer.
+ */
+PJ_DEF(void) pjsip_tx_data_add_ref( pjsip_tx_data *tdata )
+{
+    pj_atomic_inc(tdata->ref_cnt);
+}
+
+/*
+ * Decrease transport data reference, destroy it when the reference count
+ * reaches zero.
+ */
+PJ_DEF(pj_status_t) pjsip_tx_data_dec_ref( pjsip_tx_data *tdata )
+{
+    pj_assert( pj_atomic_get(tdata->ref_cnt) > 0);
+    if (pj_atomic_dec_and_get(tdata->ref_cnt) <= 0) {
+	PJ_LOG(5,(tdata->obj_name, "Destroying txdata %s",
+		  pjsip_tx_data_get_info(tdata)));
+	pjsip_tpselector_dec_ref(&tdata->tp_sel);
+#if defined(PJ_DEBUG) && PJ_DEBUG!=0
+	pj_atomic_dec( tdata->mgr->tdata_counter );
+#endif
+	pj_atomic_destroy( tdata->ref_cnt );
+	pj_lock_destroy( tdata->lock );
+	pjsip_endpt_release_pool( tdata->mgr->endpt, tdata->pool );
+	return PJSIP_EBUFDESTROYED;
+    } else {
+	return PJ_SUCCESS;
+    }
+}
+
+/*
+ * Invalidate the content of the print buffer to force the message to be
+ * re-printed when sent.
+ */
+PJ_DEF(void) pjsip_tx_data_invalidate_msg( pjsip_tx_data *tdata )
+{
+    tdata->buf.cur = tdata->buf.start;
+    tdata->info = NULL;
+}
+
+PJ_DEF(pj_bool_t) pjsip_tx_data_is_valid( pjsip_tx_data *tdata )
+{
+    return tdata->buf.cur != tdata->buf.start;
+}
+
+static char *get_msg_info(pj_pool_t *pool, const char *obj_name,
+			  const pjsip_msg *msg)
+{
+    char info_buf[128], *info;
+    const pjsip_cseq_hdr *cseq;
+    int len;
+
+    cseq = pjsip_msg_find_hdr(msg, PJSIP_H_CSEQ, NULL);
+    PJ_ASSERT_RETURN(cseq != NULL, "INVALID MSG");
+
+    if (msg->type == PJSIP_REQUEST_MSG) {
+	len = pj_ansi_snprintf(info_buf, sizeof(info_buf), 
+			       "Request msg %.*s/cseq=%d (%s)",
+			       (int)msg->line.req.method.name.slen,
+			       msg->line.req.method.name.ptr,
+			       cseq->cseq, obj_name);
+    } else {
+	len = pj_ansi_snprintf(info_buf, sizeof(info_buf),
+			       "Response msg %d/%.*s/cseq=%d (%s)",
+			       msg->line.status.code,
+			       (int)cseq->method.name.slen,
+			       cseq->method.name.ptr,
+			       cseq->cseq, obj_name);
+    }
+
+    if (len < 1 || len >= sizeof(info_buf)) {
+	return (char*)obj_name;
+    }
+
+    info = pj_pool_alloc(pool, len+1);
+    pj_memcpy(info, info_buf, len+1);
+
+    return info;
+}
+
+PJ_DEF(char*) pjsip_tx_data_get_info( pjsip_tx_data *tdata )
+{
+
+    if (tdata==NULL || tdata->msg==NULL)
+	return "NULL";
+
+    if (tdata->info)
+	return tdata->info;
+
+    pj_lock_acquire(tdata->lock);
+    tdata->info = get_msg_info(tdata->pool, tdata->obj_name, tdata->msg);
+    pj_lock_release(tdata->lock);
+
+    return tdata->info;
+}
+
+PJ_DEF(pj_status_t) pjsip_tx_data_set_transport(pjsip_tx_data *tdata,
+						const pjsip_tpselector *sel)
+{
+    PJ_ASSERT_RETURN(tdata && sel, PJ_EINVAL);
+
+    pj_lock_acquire(tdata->lock);
+
+    pjsip_tpselector_dec_ref(&tdata->tp_sel);
+
+    pj_memcpy(&tdata->tp_sel, sel, sizeof(*sel));
+    pjsip_tpselector_add_ref(&tdata->tp_sel);
+
+    pj_lock_release(tdata->lock);
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(char*) pjsip_rx_data_get_info(pjsip_rx_data *rdata)
+{
+    char obj_name[PJ_MAX_OBJ_NAME];
+
+    PJ_ASSERT_RETURN(rdata->msg_info.msg, "INVALID MSG");
+
+    if (rdata->msg_info.info)
+	return rdata->msg_info.info;
+
+    pj_ansi_strcpy(obj_name, "rdata");
+    pj_ansi_snprintf(obj_name+5, sizeof(obj_name)-5, "%p", rdata);
+
+    rdata->msg_info.info = get_msg_info(rdata->tp_info.pool, obj_name,
+					rdata->msg_info.msg);
+    return rdata->msg_info.info;
+}
+
+/*****************************************************************************
+ *
+ * TRANSPORT KEY
+ *
+ *****************************************************************************/
+
+
+/*****************************************************************************
+ *
+ * TRANSPORT
+ *
+ *****************************************************************************/
+
+static void transport_send_callback(pjsip_transport *transport,
+				    void *token,
+				    pj_ssize_t size)
+{
+    pjsip_tx_data *tdata = token;
+
+    PJ_UNUSED_ARG(transport);
+
+    /* Mark pending off so that app can resend/reuse txdata from inside
+     * the callback.
+     */
+    tdata->is_pending = 0;
+
+    /* Call callback, if any. */
+    if (tdata->cb) {
+	(*tdata->cb)(tdata->token, tdata, size);
+    }
+
+    /* Decrement reference count. */
+    pjsip_tx_data_dec_ref(tdata);
+}
+
+/* This function is called by endpoint for on_tx_request() and on_tx_response()
+ * notification.
+ */
+static pj_status_t mod_on_tx_msg(pjsip_tx_data *tdata)
+{
+    /* Allocate buffer if necessary. */
+    if (tdata->buf.start == NULL) {
+	tdata->buf.start = pj_pool_alloc( tdata->pool, PJSIP_MAX_PKT_LEN);
+	tdata->buf.cur = tdata->buf.start;
+	tdata->buf.end = tdata->buf.start + PJSIP_MAX_PKT_LEN;
+    }
+
+    /* Do we need to reprint? */
+    if (!pjsip_tx_data_is_valid(tdata)) {
+	pj_ssize_t size;
+
+	size = pjsip_msg_print( tdata->msg, tdata->buf.start, 
+			        tdata->buf.end - tdata->buf.start);
+	if (size < 0) {
+	    return PJSIP_EMSGTOOLONG;
+	}
+	pj_assert(size != 0);
+	tdata->buf.cur[size] = '\0';
+	tdata->buf.cur += size;
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Send a SIP message using the specified transport.
+ */
+PJ_DEF(pj_status_t) pjsip_transport_send(  pjsip_transport *tr, 
+					   pjsip_tx_data *tdata,
+					   const pj_sockaddr_t *addr,
+					   int addr_len,
+					   void *token,
+					   void (*cb)(void *token, 
+						      pjsip_tx_data *tdata,
+						      pj_ssize_t))
+{
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(tr && tdata && addr, PJ_EINVAL);
+
+    /* Is it currently being sent? */
+    if (tdata->is_pending) {
+	pj_assert(!"Invalid operation step!");
+	PJ_LOG(2,(THIS_FILE, "Unable to send %s: message is pending", 
+			     pjsip_tx_data_get_info(tdata)));
+	return PJSIP_EPENDINGTX;
+    }
+
+    /* Fill in tp_info. */
+    tdata->tp_info.transport = tr;
+    pj_memcpy(&tdata->tp_info.dst_addr, addr, addr_len);
+    tdata->tp_info.dst_addr_len = addr_len;
+    if (((pj_sockaddr*)addr)->addr.sa_family == PJ_AF_INET) {
+	const char *str_addr;
+	str_addr = pj_inet_ntoa(((pj_sockaddr_in*)addr)->sin_addr);
+	pj_ansi_strcpy(tdata->tp_info.dst_name, str_addr);
+	tdata->tp_info.dst_port = pj_ntohs(((pj_sockaddr_in*)addr)->sin_port);
+    } else {
+	pj_ansi_strcpy(tdata->tp_info.dst_name, "<unknown>");
+	tdata->tp_info.dst_port = 0;
+    }
+
+    /* Distribute to modules. 
+     * When the message reach mod_msg_print, the contents of the message will
+     * be "printed" to contiguous buffer.
+     */
+    if (tr->tpmgr->on_tx_msg) {
+	status = (*tr->tpmgr->on_tx_msg)(tr->endpt, tdata);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    /* Save callback data. */
+    tdata->token = token;
+    tdata->cb = cb;
+
+    /* Add reference counter. */
+    pjsip_tx_data_add_ref(tdata);
+
+    /* Mark as pending. */
+    tdata->is_pending = 1;
+
+    /* Send to transport. */
+    status = (*tr->send_msg)(tr, tdata,  addr, addr_len, (void*)tdata, 
+			     &transport_send_callback);
+
+    if (status != PJ_EPENDING) {
+	tdata->is_pending = 0;
+	pjsip_tx_data_dec_ref(tdata);
+    }
+
+    return status;
+}
+
+static void transport_idle_callback(pj_timer_heap_t *timer_heap,
+				    struct pj_timer_entry *entry)
+{
+    pjsip_transport *tp = entry->user_data;
+    pj_assert(tp != NULL);
+
+    PJ_UNUSED_ARG(timer_heap);
+
+    entry->id = PJ_FALSE;
+    pjsip_transport_destroy(tp);
+}
+
+/*
+ * Add ref.
+ */
+PJ_DEF(pj_status_t) pjsip_transport_add_ref( pjsip_transport *tp )
+{
+    PJ_ASSERT_RETURN(tp != NULL, PJ_EINVAL);
+
+    if (pj_atomic_inc_and_get(tp->ref_cnt) == 1) {
+	pj_lock_acquire(tp->tpmgr->lock);
+	/* Verify again. */
+	if (pj_atomic_get(tp->ref_cnt) == 1) {
+	    if (tp->idle_timer.id != PJ_FALSE) {
+		pjsip_endpt_cancel_timer(tp->tpmgr->endpt, &tp->idle_timer);
+		tp->idle_timer.id = PJ_FALSE;
+	    }
+	}
+	pj_lock_release(tp->tpmgr->lock);
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Dec ref.
+ */
+PJ_DEF(pj_status_t) pjsip_transport_dec_ref( pjsip_transport *tp )
+{
+    PJ_ASSERT_RETURN(tp != NULL, PJ_EINVAL);
+
+    pj_assert(pj_atomic_get(tp->ref_cnt) > 0);
+
+    if (pj_atomic_dec_and_get(tp->ref_cnt) == 0) {
+	pj_lock_acquire(tp->tpmgr->lock);
+	/* Verify again. */
+	if (pj_atomic_get(tp->ref_cnt) == 0) {
+	    pj_time_val delay;
+	    
+	    /* If transport is in graceful shutdown, then this is the
+	     * last user who uses the transport. Schedule to destroy the
+	     * transport immediately. Otherwise schedule idle timer.
+	     */
+	    if (tp->is_shutdown) {
+		delay.sec = delay.msec = 0;
+	    } else {
+		delay.sec = PJSIP_TRANSPORT_IDLE_TIME;
+		delay.msec = 0;
+	    }
+
+	    pj_assert(tp->idle_timer.id == 0);
+	    tp->idle_timer.id = PJ_TRUE;
+	    pjsip_endpt_schedule_timer(tp->tpmgr->endpt, &tp->idle_timer, 
+				       &delay);
+	}
+	pj_lock_release(tp->tpmgr->lock);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/**
+ * Register a transport.
+ */
+PJ_DEF(pj_status_t) pjsip_transport_register( pjsip_tpmgr *mgr,
+					      pjsip_transport *tp )
+{
+    int key_len;
+    pj_uint32_t hval;
+    void *entry;
+
+    /* Init. */
+    tp->tpmgr = mgr;
+    pj_bzero(&tp->idle_timer, sizeof(tp->idle_timer));
+    tp->idle_timer.user_data = tp;
+    tp->idle_timer.cb = &transport_idle_callback;
+
+    /* 
+     * Register to hash table (see Trac ticket #42).
+     */
+    key_len = sizeof(tp->key.type) + tp->addr_len;
+    pj_lock_acquire(mgr->lock);
+
+    /* If entry already occupied, unregister previous entry */
+    hval = 0;
+    entry = pj_hash_get(mgr->table, &tp->key, key_len, &hval);
+    if (entry != NULL)
+	pj_hash_set(NULL, mgr->table, &tp->key, key_len, hval, NULL);
+
+    /* Register new entry */
+    pj_hash_set(tp->pool, mgr->table, &tp->key, key_len, hval, tp);
+
+    pj_lock_release(mgr->lock);
+
+    TRACE_((THIS_FILE,"Transport %s registered: type=%s, remote=%s:%d",
+		       tp->obj_name,
+		       pjsip_transport_get_type_name(tp->key.type),
+		       pj_inet_ntoa(((pj_sockaddr_in*)&tp->key.rem_addr)->sin_addr),
+		       pj_ntohs(((pj_sockaddr_in*)&tp->key.rem_addr)->sin_port)));
+
+    return PJ_SUCCESS;
+}
+
+/* Force destroy transport (e.g. during transport manager shutdown. */
+static pj_status_t destroy_transport( pjsip_tpmgr *mgr,
+				      pjsip_transport *tp )
+{
+    int key_len;
+    pj_uint32_t hval;
+    void *entry;
+
+    TRACE_((THIS_FILE, "Transport %s is being destroyed", tp->obj_name));
+
+    pj_lock_acquire(tp->lock);
+    pj_lock_acquire(mgr->lock);
+
+    /*
+     * Unregister timer, if any.
+     */
+    //pj_assert(tp->idle_timer.id == PJ_FALSE);
+    if (tp->idle_timer.id != PJ_FALSE) {
+	pjsip_endpt_cancel_timer(mgr->endpt, &tp->idle_timer);
+	tp->idle_timer.id = PJ_FALSE;
+    }
+
+    /*
+     * Unregister from hash table (see Trac ticket #42).
+     */
+    key_len = sizeof(tp->key.type) + tp->addr_len;
+    hval = 0;
+    entry = pj_hash_get(mgr->table, &tp->key, key_len, &hval);
+    if (entry == (void*)tp)
+	pj_hash_set(NULL, mgr->table, &tp->key, key_len, hval, NULL);
+
+    pj_lock_release(mgr->lock);
+
+    /* Destroy. */
+    return tp->destroy(tp);
+}
+
+
+/*
+ * Start graceful shutdown procedure for this transport. 
+ */
+PJ_DEF(pj_status_t) pjsip_transport_shutdown(pjsip_transport *tp)
+{
+    pjsip_tpmgr *mgr;
+    pj_status_t status;
+
+    TRACE_((THIS_FILE, "Transport %s shutting down", tp->obj_name));
+
+    pj_lock_acquire(tp->lock);
+
+    mgr = tp->tpmgr;
+    pj_lock_acquire(mgr->lock);
+
+    /* Do nothing if transport is being shutdown already */
+    if (tp->is_shutdown) {
+	pj_lock_release(tp->lock);
+	pj_lock_release(mgr->lock);
+	return PJ_SUCCESS;
+    }
+
+    status = PJ_SUCCESS;
+
+    /* Instruct transport to shutdown itself */
+    if (tp->do_shutdown)
+	status = tp->do_shutdown(tp);
+    
+    if (status == PJ_SUCCESS)
+	tp->is_shutdown = PJ_TRUE;
+
+    pj_lock_release(tp->lock);
+    pj_lock_release(mgr->lock);
+
+    return status;
+}
+
+
+/**
+ * Unregister transport.
+ */
+PJ_DEF(pj_status_t) pjsip_transport_destroy( pjsip_transport *tp)
+{
+    /* Must have no user. */
+    PJ_ASSERT_RETURN(pj_atomic_get(tp->ref_cnt) == 0, PJSIP_EBUSY);
+
+    /* Destroy. */
+    return destroy_transport(tp->tpmgr, tp);
+}
+
+
+
+/*****************************************************************************
+ *
+ * TRANSPORT FACTORY
+ *
+ *****************************************************************************/
+
+
+PJ_DEF(pj_status_t) pjsip_tpmgr_register_tpfactory( pjsip_tpmgr *mgr,
+						    pjsip_tpfactory *tpf)
+{
+    pjsip_tpfactory *p;
+    pj_status_t status;
+
+    pj_lock_acquire(mgr->lock);
+
+    /* Check that no factory with the same type has been registered. */
+    status = PJ_SUCCESS;
+    for (p=mgr->factory_list.next; p!=&mgr->factory_list; p=p->next) {
+	if (p->type == tpf->type) {
+	    status = PJSIP_ETYPEEXISTS;
+	    break;
+	}
+	if (p == tpf) {
+	    status = PJ_EEXISTS;
+	    break;
+	}
+    }
+
+    if (status != PJ_SUCCESS) {
+	pj_lock_release(mgr->lock);
+	return status;
+    }
+
+    pj_list_insert_before(&mgr->factory_list, tpf);
+
+    pj_lock_release(mgr->lock);
+
+    return PJ_SUCCESS;
+}
+
+
+/**
+ * Unregister factory.
+ */
+PJ_DEF(pj_status_t) pjsip_tpmgr_unregister_tpfactory( pjsip_tpmgr *mgr,
+						      pjsip_tpfactory *tpf)
+{
+    pj_lock_acquire(mgr->lock);
+
+    pj_assert(pj_list_find_node(&mgr->factory_list, tpf) == tpf);
+    pj_list_erase(tpf);
+
+    pj_lock_release(mgr->lock);
+
+    return PJ_SUCCESS;
+}
+
+
+/*****************************************************************************
+ *
+ * TRANSPORT MANAGER
+ *
+ *****************************************************************************/
+
+/*
+ * Create a new transport manager.
+ */
+PJ_DEF(pj_status_t) pjsip_tpmgr_create( pj_pool_t *pool,
+					pjsip_endpoint *endpt,
+					void (*rx_cb)(pjsip_endpoint*,
+						      pj_status_t,
+						      pjsip_rx_data *),
+					pj_status_t (*tx_cb)(pjsip_endpoint*,
+							     pjsip_tx_data*),
+					pjsip_tpmgr **p_mgr)
+{
+    pjsip_tpmgr *mgr;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(pool && endpt && rx_cb && p_mgr, PJ_EINVAL);
+
+    /* Register mod_msg_print module. */
+    status = pjsip_endpt_register_module(endpt, &mod_msg_print);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create and initialize transport manager. */
+    mgr = pj_pool_zalloc(pool, sizeof(*mgr));
+    mgr->endpt = endpt;
+    mgr->on_rx_msg = rx_cb;
+    mgr->on_tx_msg = tx_cb;
+    pj_list_init(&mgr->factory_list);
+
+    mgr->table = pj_hash_create(pool, PJSIP_TPMGR_HTABLE_SIZE);
+    if (!mgr->table)
+	return PJ_ENOMEM;
+
+    status = pj_lock_create_recursive_mutex(pool, "tmgr%p", &mgr->lock);
+    if (status != PJ_SUCCESS)
+	return status;
+
+#if defined(PJ_DEBUG) && PJ_DEBUG!=0
+    status = pj_atomic_create(pool, 0, &mgr->tdata_counter);
+    if (status != PJ_SUCCESS)
+	return status;
+#endif
+
+    PJ_LOG(5, (THIS_FILE, "Transport manager created."));
+
+    *p_mgr = mgr;
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * Find out the appropriate local address info (IP address and port) to
+ * advertise in Contact header based on the remote address to be 
+ * contacted. The local address info would be the address name of the
+ * transport or listener which will be used to send the request.
+ *
+ * In this implementation, it will only select the transport based on
+ * the transport type in the request.
+ */
+PJ_DEF(pj_status_t) pjsip_tpmgr_find_local_addr( pjsip_tpmgr *tpmgr,
+						 pj_pool_t *pool,
+						 pjsip_transport_type_e type,
+						 const pjsip_tpselector *sel,
+						 pj_str_t *ip_addr,
+						 int *port)
+{
+    pj_status_t status = PJSIP_EUNSUPTRANSPORT;
+    unsigned flag;
+
+    /* Sanity checks */
+    PJ_ASSERT_RETURN(tpmgr && pool && ip_addr && port, PJ_EINVAL);
+
+    ip_addr->slen = 0;
+    *port = 0;
+
+    flag = pjsip_transport_get_flag_from_type(type);
+
+    if (sel && sel->type == PJSIP_TPSELECTOR_TRANSPORT &&
+	sel->u.transport)
+    {
+	pj_strdup(pool, ip_addr, &sel->u.transport->local_name.host);
+	*port = sel->u.transport->local_name.port;
+	status = PJ_SUCCESS;
+
+    } else if (sel && sel->type == PJSIP_TPSELECTOR_LISTENER &&
+	       sel->u.listener)
+    {
+	pj_strdup(pool, ip_addr, &sel->u.listener->addr_name.host);
+	*port = sel->u.listener->addr_name.port;
+	status = PJ_SUCCESS;
+
+    } else if ((flag & PJSIP_TRANSPORT_DATAGRAM) != 0) {
+	
+	pj_sockaddr_in remote;
+	pjsip_transport *tp;
+
+	pj_sockaddr_in_init(&remote, NULL, 0);
+	status = pjsip_tpmgr_acquire_transport(tpmgr, type, &remote,
+					       sizeof(remote), NULL, &tp);
+
+	if (status == PJ_SUCCESS) {
+	    pj_strdup(pool, ip_addr, &tp->local_name.host);
+	    *port = tp->local_name.port;
+	    status = PJ_SUCCESS;
+
+	    pjsip_transport_dec_ref(tp);
+	}
+
+    } else {
+	/* For connection oriented transport, enum the factories */
+	pjsip_tpfactory *f;
+
+	pj_lock_acquire(tpmgr->lock);
+
+	f = tpmgr->factory_list.next;
+	while (f != &tpmgr->factory_list) {
+	    if (f->type == type)
+		break;
+	    f = f->next;
+	}
+
+	if (f != &tpmgr->factory_list) {
+	    pj_strdup(pool, ip_addr, &f->addr_name.host);
+	    *port = f->addr_name.port;
+	    status = PJ_SUCCESS;
+	}
+	pj_lock_release(tpmgr->lock);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * pjsip_tpmgr_destroy()
+ *
+ * Destroy transport manager.
+ */
+PJ_DEF(pj_status_t) pjsip_tpmgr_destroy( pjsip_tpmgr *mgr )
+{
+    pj_hash_iterator_t itr_val;
+    pj_hash_iterator_t *itr;
+    pjsip_tpfactory *factory;
+    pjsip_endpoint *endpt = mgr->endpt;
+    
+    PJ_LOG(5, (THIS_FILE, "Destroying transport manager"));
+
+    pj_lock_acquire(mgr->lock);
+
+    /*
+     * Destroy all transports.
+     */
+    itr = pj_hash_first(mgr->table, &itr_val);
+    while (itr != NULL) {
+	pj_hash_iterator_t *next;
+	pjsip_transport *transport;
+	
+	transport = pj_hash_this(mgr->table, itr);
+
+	next = pj_hash_next(mgr->table, itr);
+
+	destroy_transport(mgr, transport);
+
+	itr = next;
+    }
+
+    /*
+     * Destroy all factories/listeners.
+     */
+    factory = mgr->factory_list.next;
+    while (factory != &mgr->factory_list) {
+	pjsip_tpfactory *next = factory->next;
+	
+	factory->destroy(factory);
+
+	factory = next;
+    }
+
+    pj_lock_release(mgr->lock);
+    pj_lock_destroy(mgr->lock);
+
+    /* Unregister mod_msg_print. */
+    if (mod_msg_print.id != -1) {
+	pjsip_endpt_unregister_module(endpt, &mod_msg_print);
+    }
+
+#if defined(PJ_DEBUG) && PJ_DEBUG!=0
+    /* If you encounter assert error on this line, it means there are
+     * leakings in transmit data (i.e. some transmit data have not been
+     * destroyed).
+     */
+    //pj_assert(pj_atomic_get(mgr->tdata_counter) == 0);
+    if (pj_atomic_get(mgr->tdata_counter) != 0) {
+	PJ_LOG(3,(THIS_FILE, "Warning: %d transmit buffer(s) not freed!",
+		  pj_atomic_get(mgr->tdata_counter)));
+    }
+#endif
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * pjsip_tpmgr_receive_packet()
+ *
+ * Called by tranports when they receive a new packet.
+ */
+PJ_DEF(pj_ssize_t) pjsip_tpmgr_receive_packet( pjsip_tpmgr *mgr,
+					       pjsip_rx_data *rdata)
+{
+    pjsip_transport *tr = rdata->tp_info.transport;
+
+    char *current_pkt;
+    pj_size_t remaining_len;
+    pj_size_t total_processed = 0;
+
+    /* Check size. */
+    pj_assert(rdata->pkt_info.len > 0);
+    if (rdata->pkt_info.len <= 0)
+	return -1;
+    
+    current_pkt = rdata->pkt_info.packet;
+    remaining_len = rdata->pkt_info.len;
+    
+    /* Must NULL terminate buffer. This is the requirement of the 
+     * parser etc. 
+     */
+    current_pkt[remaining_len] = '\0';
+
+    /* Process all message fragments. */
+    while (remaining_len > 0) {
+
+	pjsip_msg *msg;
+	pj_size_t msg_fragment_size;
+
+	/* Initialize default fragment size. */
+	msg_fragment_size = remaining_len;
+
+	/* Null terminate packet. */
+
+	/* Clear and init msg_info in rdata. 
+	 * Endpoint might inspect the values there when we call the callback
+	 * to report some errors.
+	 */
+	pj_bzero(&rdata->msg_info, sizeof(rdata->msg_info));
+	pj_list_init(&rdata->msg_info.parse_err);
+	rdata->msg_info.msg_buf = current_pkt;
+	rdata->msg_info.len = remaining_len;
+
+	/* For TCP transport, check if the whole message has been received. */
+	if ((tr->flag & PJSIP_TRANSPORT_DATAGRAM) == 0) {
+	    pj_status_t msg_status;
+	    msg_status = pjsip_find_msg(current_pkt, remaining_len, PJ_FALSE, 
+                                        &msg_fragment_size);
+	    if (msg_status != PJ_SUCCESS) {
+		if (remaining_len == PJSIP_MAX_PKT_LEN) {
+		    mgr->on_rx_msg(mgr->endpt, PJSIP_ERXOVERFLOW, rdata);
+		    /* Exhaust all data. */
+		    return rdata->pkt_info.len;
+		} else {
+		    /* Not enough data in packet. */
+		    return total_processed;
+		}
+	    }
+	}
+
+	/* Update msg_info. */
+	rdata->msg_info.len = msg_fragment_size;
+
+	/* Parse the message. */
+	rdata->msg_info.msg = msg = 
+	    pjsip_parse_rdata( current_pkt, msg_fragment_size, rdata);
+
+	/* Check for parsing syntax error */
+	if (msg==NULL || !pj_list_empty(&rdata->msg_info.parse_err)) {
+	    pjsip_parser_err_report *err;
+	    char buf[128];
+	    pj_str_t tmp;
+
+	    /* Gather syntax error information */
+	    tmp.ptr = buf; tmp.slen = 0;
+	    err = rdata->msg_info.parse_err.next;
+	    while (err != &rdata->msg_info.parse_err) {
+		int len;
+		len = pj_ansi_snprintf(tmp.ptr+tmp.slen, sizeof(buf)-tmp.slen,
+				       ": %s exception when parsing '%.*s' "
+				       "header on line %d col %d",
+				       pj_exception_id_name(err->except_code),
+				       (int)err->hname.slen, err->hname.ptr,
+				       err->line, err->col);
+		if (len > 0 && len < (int) (sizeof(buf)-tmp.slen)) {
+		    tmp.slen += len;
+		}
+		err = err->next;
+	    }
+
+	    /* Only print error message if there's error.
+	     * Sometimes we receive blank packets (packets with only CRLF)
+	     * which were sent to keep NAT bindings.
+	     */
+	    if (tmp.slen) {
+		PJ_LOG(1, (THIS_FILE, 
+		      "Error processing %d bytes packet from %s %s:%d %.*s:\n"
+		      "%.*s\n"
+		      "-- end of packet.",
+		      msg_fragment_size,
+		      rdata->tp_info.transport->type_name,
+		      rdata->pkt_info.src_name, 
+		      rdata->pkt_info.src_port,
+		      (int)tmp.slen, tmp.ptr,
+		      (int)msg_fragment_size,
+		      rdata->msg_info.msg_buf));
+	    }
+
+	    goto finish_process_fragment;
+	}
+
+	/* Perform basic header checking. */
+	if (rdata->msg_info.cid == NULL ||
+	    rdata->msg_info.cid->id.slen == 0 || 
+	    rdata->msg_info.from == NULL || 
+	    rdata->msg_info.to == NULL || 
+	    rdata->msg_info.via == NULL || 
+	    rdata->msg_info.cseq == NULL) 
+	{
+	    mgr->on_rx_msg(mgr->endpt, PJSIP_EMISSINGHDR, rdata);
+	    goto finish_process_fragment;
+	}
+
+	/* Always add received parameter to the via. */
+	pj_strdup2(rdata->tp_info.pool, 
+		   &rdata->msg_info.via->recvd_param, 
+		   rdata->pkt_info.src_name);
+
+	/* RFC 3581:
+	 * If message contains "rport" param, put the received port there.
+	 */
+	if (rdata->msg_info.via->rport_param == 0) {
+	    rdata->msg_info.via->rport_param = rdata->pkt_info.src_port;
+	}
+
+	/* Drop response message if it has more than one Via.
+	*/
+	/* This is wrong. Proxy DOES receive responses with multiple
+	 * Via headers! Thanks Aldo <acampi at deis.unibo.it> for pointing
+	 * this out.
+
+	if (msg->type == PJSIP_RESPONSE_MSG) {
+	    pjsip_hdr *hdr;
+	    hdr = (pjsip_hdr*)rdata->msg_info.via->next;
+	    if (hdr != &msg->hdr) {
+		hdr = pjsip_msg_find_hdr(msg, PJSIP_H_VIA, hdr);
+		if (hdr) {
+		    mgr->on_rx_msg(mgr->endpt, PJSIP_EMULTIPLEVIA, rdata);
+		    goto finish_process_fragment;
+		}
+	    }
+	}
+	*/
+
+	/* Call the transport manager's upstream message callback.
+	 */
+	mgr->on_rx_msg(mgr->endpt, PJ_SUCCESS, rdata);
+
+
+finish_process_fragment:
+	total_processed += msg_fragment_size;
+	current_pkt += msg_fragment_size;
+	remaining_len -= msg_fragment_size;
+
+    }	/* while (rdata->pkt_info.len > 0) */
+
+
+    return total_processed;
+}
+
+
+/*
+ * pjsip_tpmgr_acquire_transport()
+ *
+ * Get transport suitable to communicate to remote. Create a new one
+ * if necessary.
+ */
+PJ_DEF(pj_status_t) pjsip_tpmgr_acquire_transport(pjsip_tpmgr *mgr,
+						  pjsip_transport_type_e type,
+						  const pj_sockaddr_t *remote,
+						  int addr_len,
+						  const pjsip_tpselector *sel,
+						  pjsip_transport **tp)
+{
+    pjsip_tpfactory *factory;
+    pj_status_t status;
+
+    TRACE_((THIS_FILE,"Acquiring transport type=%s, remote=%s:%d",
+		       pjsip_transport_get_type_name(type),
+		       pj_inet_ntoa(((pj_sockaddr_in*)remote)->sin_addr),
+		       pj_ntohs(((pj_sockaddr_in*)remote)->sin_port)));
+
+    pj_lock_acquire(mgr->lock);
+
+    /* If transport is specified, then just use it if it is suitable
+     * for the destination.
+     */
+    if (sel && sel->type == PJSIP_TPSELECTOR_TRANSPORT &&
+	sel->u.transport) 
+    {
+	pjsip_transport *seltp = sel->u.transport;
+
+	/* See if the transport is (not) suitable */
+	if (seltp->key.type != type) {
+	    pj_lock_release(mgr->lock);
+	    return PJSIP_ETPNOTSUITABLE;
+	}
+
+	/* We could also verify that the destination address is reachable
+	 * from this transport (i.e. both are equal), but if application
+	 * has requested a specific transport to be used, assume that
+	 * it knows what to do.
+	 *
+	 * In other words, I don't think destination verification is a good
+	 * idea for now.
+	 */
+
+	/* Transport looks to be suitable to use, so just use it. */
+	pjsip_transport_add_ref(seltp);
+	pj_lock_release(mgr->lock);
+	*tp = seltp;
+
+	TRACE_((THIS_FILE, "Transport %s acquired", seltp->obj_name));
+	return PJ_SUCCESS;
+
+
+    } else if (sel && sel->type == PJSIP_TPSELECTOR_LISTENER &&
+	       sel->u.listener)
+    {
+	/* Application has requested that a specific listener is to
+	 * be used. In this case, skip transport hash table lookup.
+	 */
+
+	/* Verify that the listener type matches the destination type */
+	if (sel->u.listener->type != type) {
+	    pj_lock_release(mgr->lock);
+	    return PJSIP_ETPNOTSUITABLE;
+	}
+
+	/* We'll use this listener to create transport */
+	factory = sel->u.listener;
+
+    } else {
+
+	/*
+	 * This is the "normal" flow, where application doesn't specify
+	 * specific transport/listener to be used to send message to.
+	 * In this case, lookup the transport from the hash table.
+	 */
+	struct transport_key key;
+	int key_len;
+	pjsip_transport *transport;
+
+	key_len = sizeof(key.type) + addr_len;
+
+	/* First try to get exact destination. */
+	key.type = type;
+	pj_memcpy(&key.addr, remote, addr_len);
+
+	transport = pj_hash_get(mgr->table, &key, key_len, NULL);
+	if (transport == NULL) {
+	    unsigned flag = pjsip_transport_get_flag_from_type(type);
+	    const pj_sockaddr *remote_addr = (const pj_sockaddr*)remote;
+
+	    /* Ignore address for loop transports. */
+	    if (type == PJSIP_TRANSPORT_LOOP ||
+		     type == PJSIP_TRANSPORT_LOOP_DGRAM)
+	    {
+		pj_sockaddr_in *addr = (pj_sockaddr_in*)&key.addr;
+
+		pj_bzero(addr, sizeof(pj_sockaddr_in));
+		key_len = sizeof(key.type) + sizeof(pj_sockaddr_in);
+		transport = pj_hash_get(mgr->table, &key, key_len, NULL);
+	    }
+	    /* For datagram INET transports, try lookup with zero address.
+	     */
+	    else if ((flag & PJSIP_TRANSPORT_DATAGRAM) && 
+		     (remote_addr->addr.sa_family == PJ_AF_INET)) 
+	    {
+		pj_sockaddr_in *addr = (pj_sockaddr_in*)&key.addr;
+
+		pj_bzero(addr, sizeof(pj_sockaddr_in));
+		addr->sin_family = PJ_AF_INET;
+
+		key_len = sizeof(key.type) + sizeof(pj_sockaddr_in);
+		transport = pj_hash_get(mgr->table, &key, key_len, NULL);
+	    }
+	}
+
+	if (transport!=NULL && !transport->is_shutdown) {
+	    /*
+	     * Transport found!
+	     */
+	    pjsip_transport_add_ref(transport);
+	    pj_lock_release(mgr->lock);
+	    *tp = transport;
+
+	    TRACE_((THIS_FILE, "Transport %s acquired", transport->obj_name));
+	    return PJ_SUCCESS;
+	}
+
+	/*
+	 * Transport not found!
+	 * Find factory that can create such transport.
+	 */
+	factory = mgr->factory_list.next;
+	while (factory != &mgr->factory_list) {
+	    if (factory->type == type)
+		break;
+	    factory = factory->next;
+	}
+
+	if (factory == &mgr->factory_list) {
+	    /* No factory can create the transport! */
+	    pj_lock_release(mgr->lock);
+	    TRACE_((THIS_FILE, "No suitable factory was found either"));
+	    return PJSIP_EUNSUPTRANSPORT;
+	}
+
+    }
+
+    
+    TRACE_((THIS_FILE, "Creating new transport from factory"));
+
+    /* Request factory to create transport. */
+    status = factory->create_transport(factory, mgr, mgr->endpt,
+				       remote, addr_len, tp);
+    if (status == PJ_SUCCESS) {
+	PJ_ASSERT_ON_FAIL(tp!=NULL, 
+	    {pj_lock_release(mgr->lock); return PJ_EBUG;});
+	pjsip_transport_add_ref(*tp);
+    }
+    pj_lock_release(mgr->lock);
+    return status;
+}
+
+/**
+ * Dump transport info.
+ */
+PJ_DEF(void) pjsip_tpmgr_dump_transports(pjsip_tpmgr *mgr)
+{
+#if PJ_LOG_MAX_LEVEL >= 3
+    pj_hash_iterator_t itr_val;
+    pj_hash_iterator_t *itr;
+    pjsip_tpfactory *factory;
+
+    pj_lock_acquire(mgr->lock);
+
+#if defined(PJ_DEBUG) && PJ_DEBUG!=0
+    PJ_LOG(3,(THIS_FILE, " Outstanding transmit buffers: %d",
+	      pj_atomic_get(mgr->tdata_counter)));
+#endif
+
+    PJ_LOG(3, (THIS_FILE, " Dumping listeners:"));
+    factory = mgr->factory_list.next;
+    while (factory != &mgr->factory_list) {
+	PJ_LOG(3, (THIS_FILE, "  %s %s:%.*s:%d", 
+		   factory->obj_name,
+		   factory->type_name,
+		   (int)factory->addr_name.host.slen,
+		   factory->addr_name.host.ptr,
+		   (int)factory->addr_name.port));
+	factory = factory->next;
+    }
+
+    itr = pj_hash_first(mgr->table, &itr_val);
+    if (itr) {
+	PJ_LOG(3, (THIS_FILE, " Dumping transports:"));
+
+	do {
+	    pjsip_transport *t = pj_hash_this(mgr->table, itr);
+
+	    PJ_LOG(3, (THIS_FILE, "  %s %s (refcnt=%d%s)", 
+		       t->obj_name,
+		       t->info,
+		       pj_atomic_get(t->ref_cnt),
+		       (t->idle_timer.id ? " [idle]" : "")));
+
+	    itr = pj_hash_next(mgr->table, itr);
+	} while (itr);
+    }
+
+    pj_lock_release(mgr->lock);
+#else
+    PJ_UNUSED_ARG(mgr);
+#endif
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport_loop.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport_loop.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport_loop.c	(revision 1163)
@@ -0,0 +1,504 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_transport_loop.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_errno.h>
+#include <pj/pool.h>
+#include <pj/os.h>
+#include <pj/string.h>
+#include <pj/lock.h>
+#include <pj/assert.h>
+#include <pj/compat/socket.h>
+
+
+#define ADDR_LOOP	"128.0.0.1"
+#define ADDR_LOOP_DGRAM	"129.0.0.1"
+
+
+/** This structure describes incoming packet. */
+struct recv_list
+{
+    PJ_DECL_LIST_MEMBER(struct recv_list);
+    pjsip_rx_data  rdata;
+};
+
+/** This structure is used to keep delayed send failure. */
+struct send_list
+{
+    PJ_DECL_LIST_MEMBER(struct send_list);
+    pj_time_val    sent_time;
+    pj_ssize_t	   sent;
+    pjsip_tx_data *tdata;
+    void	  *token;
+    void	 (*callback)(pjsip_transport*, void*, pj_ssize_t);
+};
+
+/** This structure describes the loop transport. */
+struct loop_transport
+{
+    pjsip_transport	     base;
+    pj_pool_t		    *pool;
+    pj_thread_t		    *thread;
+    pj_bool_t		     thread_quit_flag;
+    pj_bool_t		     discard;
+    int			     fail_mode;
+    unsigned		     recv_delay;
+    unsigned		     send_delay;
+    struct recv_list	     recv_list;
+    struct send_list	     send_list;
+};
+
+
+/* Helper function to create "incoming" packet */
+struct recv_list *create_incoming_packet( struct loop_transport *loop,
+					  pjsip_tx_data *tdata )
+{
+    pj_pool_t *pool;
+    struct recv_list *pkt;
+
+    pool = pjsip_endpt_create_pool(loop->base.endpt, "rdata", 
+				   PJSIP_POOL_RDATA_LEN, 
+				   PJSIP_POOL_RDATA_INC+5);
+    if (!pool)
+	return NULL;
+
+    pkt = pj_pool_zalloc(pool, sizeof(struct recv_list));
+
+    /* Initialize rdata. */
+    pkt->rdata.tp_info.pool = pool;
+    pkt->rdata.tp_info.transport = &loop->base;
+    
+    /* Copy the packet. */
+    pj_memcpy(pkt->rdata.pkt_info.packet, tdata->buf.start,
+	      tdata->buf.cur - tdata->buf.start);
+    pkt->rdata.pkt_info.len = tdata->buf.cur - tdata->buf.start;
+
+    /* "Source address" info. */
+    pkt->rdata.pkt_info.src_addr_len = sizeof(pj_sockaddr_in);
+    if (loop->base.key.type == PJSIP_TRANSPORT_LOOP)
+	pj_ansi_strcpy(pkt->rdata.pkt_info.src_name, ADDR_LOOP);
+    else
+	pj_ansi_strcpy(pkt->rdata.pkt_info.src_name, ADDR_LOOP_DGRAM);
+    pkt->rdata.pkt_info.src_port = loop->base.local_name.port;
+
+    /* When do we need to "deliver" this packet. */
+    pj_gettimeofday(&pkt->rdata.pkt_info.timestamp);
+    pkt->rdata.pkt_info.timestamp.msec += loop->recv_delay;
+    pj_time_val_normalize(&pkt->rdata.pkt_info.timestamp);
+
+    /* Done. */
+
+    return pkt;
+}
+
+
+/* Helper function to add pending notification callback. */
+static pj_status_t add_notification( struct loop_transport *loop,
+				     pjsip_tx_data *tdata,
+				     pj_ssize_t sent,
+				     void *token,
+				     void (*callback)(pjsip_transport*, 
+						      void*, pj_ssize_t))
+{
+    struct send_list *sent_status;
+
+    pjsip_tx_data_add_ref(tdata);
+    pj_lock_acquire(tdata->lock);
+    sent_status = pj_pool_alloc(tdata->pool, sizeof(struct send_list));
+    pj_lock_release(tdata->lock);
+
+    sent_status->sent = sent;
+    sent_status->tdata = tdata;
+    sent_status->token = token;
+    sent_status->callback = callback;
+
+    pj_gettimeofday(&sent_status->sent_time);
+    sent_status->sent_time.msec += loop->send_delay;
+    pj_time_val_normalize(&sent_status->sent_time);
+
+    pj_lock_acquire(loop->base.lock);
+    pj_list_push_back(&loop->send_list, sent_status);
+    pj_lock_release(loop->base.lock);
+
+    return PJ_SUCCESS;
+}
+
+/* Handler for sending outgoing message; called by transport manager. */
+static pj_status_t loop_send_msg( pjsip_transport *tp, 
+				  pjsip_tx_data *tdata,
+				  const pj_sockaddr_t *rem_addr,
+				  int addr_len,
+				  void *token,
+				  void (*cb)(pjsip_transport *transport,
+					     void *token, 
+					     pj_ssize_t sent_bytes))
+{
+    struct loop_transport *loop = (struct loop_transport*)tp;
+    struct recv_list *recv_pkt;
+    
+    PJ_ASSERT_RETURN(tp && (tp->key.type == PJSIP_TRANSPORT_LOOP ||
+	             tp->key.type == PJSIP_TRANSPORT_LOOP_DGRAM), PJ_EINVAL);
+
+    PJ_UNUSED_ARG(rem_addr);
+    PJ_UNUSED_ARG(addr_len);
+
+
+    /* Need to send failure? */
+    if (loop->fail_mode) {
+	if (loop->send_delay == 0) {
+	    return PJ_STATUS_FROM_OS(OSERR_ECONNRESET);
+	} else {
+	    add_notification(loop, tdata, -PJ_STATUS_FROM_OS(OSERR_ECONNRESET),
+			     token, cb);
+
+	    return PJ_EPENDING;
+	}
+    }
+
+    /* Discard any packets? */
+    if (loop->discard)
+	return PJ_SUCCESS;
+
+    /* Create rdata for the "incoming" packet. */
+    recv_pkt = create_incoming_packet(loop, tdata);
+    if (!recv_pkt)
+	return PJ_ENOMEM;
+
+    /* If delay is not configured, deliver this packet now! */
+    if (loop->recv_delay == 0) {
+	pj_ssize_t size_eaten;
+
+	size_eaten = pjsip_tpmgr_receive_packet( loop->base.tpmgr, 
+						 &recv_pkt->rdata);
+	pj_assert(size_eaten == recv_pkt->rdata.pkt_info.len);
+
+	pjsip_endpt_release_pool(loop->base.endpt, 
+				 recv_pkt->rdata.tp_info.pool);
+
+    } else {
+	/* Otherwise if delay is configured, add the "packet" to the 
+	 * receive list to be processed by worker thread.
+	 */
+	pj_lock_acquire(loop->base.lock);
+	pj_list_push_back(&loop->recv_list, recv_pkt);
+	pj_lock_release(loop->base.lock);
+    }
+
+    if (loop->send_delay != 0) {
+	add_notification(loop, tdata, tdata->buf.cur - tdata->buf.start,
+			 token, cb);
+	return PJ_EPENDING;
+    } else {
+	return PJ_SUCCESS;
+    }
+}
+
+/* Handler to destroy the transport; called by transport manager */
+static pj_status_t loop_destroy(pjsip_transport *tp)
+{
+    struct loop_transport *loop = (struct loop_transport*)tp;
+    
+    PJ_ASSERT_RETURN(tp && (tp->key.type == PJSIP_TRANSPORT_LOOP ||
+	             tp->key.type == PJSIP_TRANSPORT_LOOP_DGRAM), PJ_EINVAL);
+    
+    loop->thread_quit_flag = 1;
+    /* Unlock transport mutex before joining thread. */
+    pj_lock_release(tp->lock);
+    pj_thread_join(loop->thread);
+    pj_thread_destroy(loop->thread);
+
+    /* Clear pending send notifications. */
+    while (!pj_list_empty(&loop->send_list)) {
+	struct send_list *node = loop->send_list.next;
+	/* Notify callback. */
+	if (node->callback) {
+	    (*node->callback)(&loop->base, node->token, -PJSIP_ESHUTDOWN);
+	}
+	pj_list_erase(node);
+	pjsip_tx_data_dec_ref(node->tdata);
+    }
+
+    /* Clear "incoming" packets in the queue. */
+    while (!pj_list_empty(&loop->recv_list)) {
+	struct recv_list *node = loop->recv_list.next;
+	pj_list_erase(node);
+	pjsip_endpt_release_pool(loop->base.endpt,
+				 node->rdata.tp_info.pool);
+    }
+
+    /* Self destruct.. heheh.. */
+    pj_lock_destroy(loop->base.lock);
+    pj_atomic_destroy(loop->base.ref_cnt);
+    pjsip_endpt_release_pool(loop->base.endpt, loop->base.pool);
+
+    return PJ_SUCCESS;
+}
+
+/* Worker thread for loop transport. */
+static int loop_transport_worker_thread(void *arg)
+{
+    struct loop_transport *loop = arg;
+    struct recv_list r;
+    struct send_list s;
+
+    pj_list_init(&r);
+    pj_list_init(&s);
+
+    while (!loop->thread_quit_flag) {
+	pj_time_val now;
+
+	pj_thread_sleep(1);
+	pj_gettimeofday(&now);
+
+	pj_lock_acquire(loop->base.lock);
+
+	/* Move expired send notification to local list. */
+	while (!pj_list_empty(&loop->send_list)) {
+	    struct send_list *node = loop->send_list.next;
+
+	    /* Break when next node time is greater than now. */
+	    if (PJ_TIME_VAL_GTE(node->sent_time, now))
+		break;
+
+	    /* Delete this from the list. */
+	    pj_list_erase(node);
+
+	    /* Add to local list. */
+	    pj_list_push_back(&s, node);
+	}
+
+	/* Move expired "incoming" packet to local list. */
+	while (!pj_list_empty(&loop->recv_list)) {
+	    struct recv_list *node = loop->recv_list.next;
+
+	    /* Break when next node time is greater than now. */
+	    if (PJ_TIME_VAL_GTE(node->rdata.pkt_info.timestamp, now))
+		break;
+
+	    /* Delete this from the list. */
+	    pj_list_erase(node);
+
+	    /* Add to local list. */
+	    pj_list_push_back(&r, node);
+
+	}
+
+	pj_lock_release(loop->base.lock);
+
+	/* Process send notification and incoming packet notification
+	 * without holding down the loop's mutex.
+	 */
+	while (!pj_list_empty(&s)) {
+	    struct send_list *node = s.next;
+
+	    pj_list_erase(node);
+
+	    /* Notify callback. */
+	    if (node->callback) {
+		(*node->callback)(&loop->base, node->token, node->sent);
+	    }
+
+	    /* Decrement tdata reference counter. */
+	    pjsip_tx_data_dec_ref(node->tdata);
+	}
+
+	/* Process "incoming" packet. */
+	while (!pj_list_empty(&r)) {
+	    struct recv_list *node = r.next;
+	    pj_ssize_t size_eaten;
+
+	    pj_list_erase(node);
+
+	    /* Notify transport manager about the "incoming packet" */
+	    size_eaten = pjsip_tpmgr_receive_packet(loop->base.tpmgr,
+						    &node->rdata);
+
+	    /* Must "eat" all the packets. */
+	    pj_assert(size_eaten == node->rdata.pkt_info.len);
+
+	    /* Done. */
+	    pjsip_endpt_release_pool(loop->base.endpt,
+				     node->rdata.tp_info.pool);
+	}
+    }
+
+    return 0;
+}
+
+
+/* Start loop transport. */
+PJ_DEF(pj_status_t) pjsip_loop_start( pjsip_endpoint *endpt,
+				      pjsip_transport **transport)
+{
+    pj_pool_t *pool;
+    struct loop_transport *loop;
+    pj_status_t status;
+
+    /* Create pool. */
+    pool = pjsip_endpt_create_pool(endpt, "loop", 4000, 4000);
+    if (!pool)
+	return PJ_ENOMEM;
+
+    /* Create the loop structure. */
+    loop = pj_pool_zalloc(pool, sizeof(struct loop_transport));
+    
+    /* Initialize transport properties. */
+    pj_ansi_snprintf(loop->base.obj_name, sizeof(loop->base.obj_name), 
+		     "loop%p", loop);
+    loop->base.pool = pool;
+    status = pj_atomic_create(pool, 0, &loop->base.ref_cnt);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+    status = pj_lock_create_recursive_mutex(pool, "loop", &loop->base.lock);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+    loop->base.key.type = PJSIP_TRANSPORT_LOOP_DGRAM;
+    //loop->base.key.rem_addr.sa_family = PJ_AF_INET;
+    loop->base.type_name = "LOOP-DGRAM";
+    loop->base.info = "LOOP-DGRAM";
+    loop->base.flag = PJSIP_TRANSPORT_DATAGRAM;
+    loop->base.local_name.host = pj_str(ADDR_LOOP_DGRAM);
+    loop->base.local_name.port = 
+	pjsip_transport_get_default_port_for_type(loop->base.key.type);
+    loop->base.addr_len = sizeof(pj_sockaddr_in);
+    loop->base.endpt = endpt;
+    loop->base.tpmgr = pjsip_endpt_get_tpmgr(endpt);
+    loop->base.send_msg = &loop_send_msg;
+    loop->base.destroy = &loop_destroy;
+
+    pj_list_init(&loop->recv_list);
+    pj_list_init(&loop->send_list);
+
+    /* Create worker thread. */
+    status = pj_thread_create(pool, "loop", 
+			      &loop_transport_worker_thread, loop, 0, 
+			      PJ_THREAD_SUSPENDED, &loop->thread);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Register to transport manager. */
+    status = pjsip_transport_register( loop->base.tpmgr, &loop->base);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Start the thread. */
+    status = pj_thread_resume(loop->thread);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /*
+     * Done.
+     */
+
+    if (transport)
+	*transport = &loop->base;
+
+    return PJ_SUCCESS;
+
+on_error:
+    if (loop->base.lock)
+	pj_lock_destroy(loop->base.lock);
+    if (loop->thread)
+	pj_thread_destroy(loop->thread);
+    if (loop->base.ref_cnt)
+	pj_atomic_destroy(loop->base.ref_cnt);
+    pjsip_endpt_release_pool(endpt, loop->pool);
+    return status;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_loop_set_discard( pjsip_transport *tp,
+					    pj_bool_t discard,
+					    pj_bool_t *prev_value )
+{
+    struct loop_transport *loop = (struct loop_transport*)tp;
+
+    PJ_ASSERT_RETURN(tp && (tp->key.type == PJSIP_TRANSPORT_LOOP ||
+	             tp->key.type == PJSIP_TRANSPORT_LOOP_DGRAM), PJ_EINVAL);
+
+    if (prev_value)
+	*prev_value = loop->discard;
+    loop->discard = discard;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_loop_set_failure( pjsip_transport *tp,
+					    int fail_flag,
+					    int *prev_value )
+{
+    struct loop_transport *loop = (struct loop_transport*)tp;
+
+    PJ_ASSERT_RETURN(tp && (tp->key.type == PJSIP_TRANSPORT_LOOP ||
+	             tp->key.type == PJSIP_TRANSPORT_LOOP_DGRAM), PJ_EINVAL);
+
+    if (prev_value)
+	*prev_value = loop->fail_mode;
+    loop->fail_mode = fail_flag;
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_loop_set_recv_delay( pjsip_transport *tp,
+					       unsigned delay,
+					       unsigned *prev_value)
+{
+    struct loop_transport *loop = (struct loop_transport*)tp;
+
+    PJ_ASSERT_RETURN(tp && (tp->key.type == PJSIP_TRANSPORT_LOOP ||
+	             tp->key.type == PJSIP_TRANSPORT_LOOP_DGRAM), PJ_EINVAL);
+
+    if (prev_value)
+	*prev_value = loop->recv_delay;
+    loop->recv_delay = delay;
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjsip_loop_set_send_callback_delay( pjsip_transport *tp,
+							unsigned delay,
+							unsigned *prev_value)
+{
+    struct loop_transport *loop = (struct loop_transport*)tp;
+
+    PJ_ASSERT_RETURN(tp && (tp->key.type == PJSIP_TRANSPORT_LOOP ||
+	             tp->key.type == PJSIP_TRANSPORT_LOOP_DGRAM), PJ_EINVAL);
+
+    if (prev_value)
+	*prev_value = loop->send_delay;
+    loop->send_delay = delay;
+
+    return PJ_SUCCESS;
+}
+
+PJ_DEF(pj_status_t) pjsip_loop_set_delay( pjsip_transport *tp, unsigned delay )
+{
+    struct loop_transport *loop = (struct loop_transport*)tp;
+
+    PJ_ASSERT_RETURN(tp && (tp->key.type == PJSIP_TRANSPORT_LOOP ||
+	             tp->key.type == PJSIP_TRANSPORT_LOOP_DGRAM), PJ_EINVAL);
+
+    loop->recv_delay = delay;
+    loop->send_delay = delay;
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport_tcp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport_tcp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport_tcp.c	(revision 1163)
@@ -0,0 +1,1372 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_transport_tcp.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_errno.h>
+#include <pj/compat/socket.h>
+#include <pj/addr_resolv.h>
+#include <pj/assert.h>
+#include <pj/ioqueue.h>
+#include <pj/lock.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+/* Only declare the API if PJ_HAS_TCP is true */
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP!=0
+
+
+#define THIS_FILE	"sip_transport_tcp.c"
+
+#define MAX_ASYNC_CNT	16
+#define POOL_LIS_INIT	4000
+#define POOL_LIS_INC	4001
+#define POOL_TP_INIT	4000
+#define POOL_TP_INC	4002
+
+
+struct tcp_listener;
+struct tcp_transport;
+
+
+/*
+ * This structure is "descendant" of pj_ioqueue_op_key_t, and it is used to
+ * track pending/asynchronous accept() operation. TCP transport may have
+ * more than one pending accept() operations, depending on the value of
+ * async_cnt.
+ */
+struct pending_accept
+{
+    pj_ioqueue_op_key_t	     op_key;
+    struct tcp_listener	    *listener;
+    unsigned		     index;
+    pj_pool_t		    *pool;
+    pj_sock_t		     new_sock;
+    int			     addr_len;
+    pj_sockaddr_in	     local_addr;
+    pj_sockaddr_in	     remote_addr;
+};
+
+
+/*
+ * This is the TCP listener, which is a "descendant" of pjsip_tpfactory (the
+ * SIP transport factory).
+ */
+struct tcp_listener
+{
+    pjsip_tpfactory	     factory;
+    pj_bool_t		     is_registered;
+    pjsip_endpoint	    *endpt;
+    pjsip_tpmgr		    *tpmgr;
+    pj_sock_t		     sock;
+    pj_ioqueue_key_t	    *key;
+    unsigned		     async_cnt;
+    struct pending_accept   *accept_op[MAX_ASYNC_CNT];
+};
+
+
+/*
+ * This structure is used to keep delayed transmit operation in a list.
+ * A delayed transmission occurs when application sends tx_data when
+ * the TCP connect/establishment is still in progress. These delayed
+ * transmission will be "flushed" once the socket is connected (either
+ * successfully or with errors).
+ */
+struct delayed_tdata
+{
+    PJ_DECL_LIST_MEMBER(struct delayed_tdata);
+    pjsip_tx_data_op_key    *tdata_op_key;
+};
+
+
+/*
+ * This structure describes the TCP transport, and it's descendant of
+ * pjsip_transport.
+ */
+struct tcp_transport
+{
+    pjsip_transport	     base;
+    pj_bool_t		     is_server;
+    struct tcp_listener	    *listener;
+    pj_bool_t		     is_registered;
+    pj_bool_t		     is_closing;
+    pj_status_t		     close_reason;
+    pj_sock_t		     sock;
+    pj_ioqueue_key_t	    *key;
+    pj_bool_t		     has_pending_connect;
+
+
+    /* TCP transport can only have  one rdata!
+     * Otherwise chunks of incoming PDU may be received on different
+     * buffer.
+     */
+    pjsip_rx_data	     rdata;
+
+    /* Pending transmission list. */
+    struct delayed_tdata     delayed_list;
+};
+
+
+/****************************************************************************
+ * PROTOTYPES
+ */
+
+/* This callback is called when pending accept() operation completes. */
+static void on_accept_complete(	pj_ioqueue_key_t *key, 
+				pj_ioqueue_op_key_t *op_key, 
+				pj_sock_t sock, 
+				pj_status_t status);
+
+/* This callback is called by transport manager to destroy listener */
+static pj_status_t lis_destroy(pjsip_tpfactory *factory);
+
+/* This callback is called by transport manager to create transport */
+static pj_status_t lis_create_transport(pjsip_tpfactory *factory,
+					pjsip_tpmgr *mgr,
+					pjsip_endpoint *endpt,
+					const pj_sockaddr *rem_addr,
+					int addr_len,
+					pjsip_transport **transport);
+
+/* Common function to create and initialize transport */
+static pj_status_t tcp_create(struct tcp_listener *listener,
+			      pj_pool_t *pool,
+			      pj_sock_t sock, pj_bool_t is_server,
+			      const pj_sockaddr_in *local,
+			      const pj_sockaddr_in *remote,
+			      struct tcp_transport **p_tcp);
+
+
+static void tcp_perror(const char *sender, const char *title,
+		       pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    pj_strerror(status, errmsg, sizeof(errmsg));
+
+    PJ_LOG(1,(sender, "%s: %s [code=%d]", title, errmsg, status));
+}
+
+
+static void sockaddr_to_host_port( pj_pool_t *pool,
+				   pjsip_host_port *host_port,
+				   const pj_sockaddr_in *addr )
+{
+    enum { M = 48 };
+    host_port->host.ptr = pj_pool_alloc(pool, M);
+    host_port->host.slen = pj_ansi_snprintf( host_port->host.ptr, M, "%s", 
+					    pj_inet_ntoa(addr->sin_addr));
+    host_port->port = pj_ntohs(addr->sin_port);
+}
+
+
+
+/****************************************************************************
+ * The TCP listener/transport factory.
+ */
+
+/*
+ * This is the public API to create, initialize, register, and start the
+ * TCP listener.
+ */
+PJ_DEF(pj_status_t) pjsip_tcp_transport_start2(pjsip_endpoint *endpt,
+					       const pj_sockaddr_in *local,
+					       const pjsip_host_port *a_name,
+					       unsigned async_cnt,
+					       pjsip_tpfactory **p_factory)
+{
+    pj_pool_t *pool;
+    struct tcp_listener *listener;
+    pj_ioqueue_callback listener_cb;
+    pj_sockaddr_in *listener_addr;
+    int addr_len;
+    unsigned i;
+    pj_status_t status;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(endpt && async_cnt, PJ_EINVAL);
+
+    /* Verify that address given in a_name (if any) is valid */
+    if (a_name && a_name->host.slen) {
+	pj_sockaddr_in tmp;
+
+	status = pj_sockaddr_in_init(&tmp, &a_name->host, 
+				     (pj_uint16_t)a_name->port);
+	if (status != PJ_SUCCESS || tmp.sin_addr.s_addr == PJ_INADDR_ANY ||
+	    tmp.sin_addr.s_addr == PJ_INADDR_NONE)
+	{
+	    /* Invalid address */
+	    return PJ_EINVAL;
+	}
+    }
+
+    pool = pjsip_endpt_create_pool(endpt, "tcplis", POOL_LIS_INIT, 
+				   POOL_LIS_INC);
+    PJ_ASSERT_RETURN(pool, PJ_ENOMEM);
+
+
+    listener = pj_pool_zalloc(pool, sizeof(struct tcp_listener));
+    listener->factory.pool = pool;
+    listener->factory.type = PJSIP_TRANSPORT_TCP;
+    listener->factory.type_name = "tcp";
+    listener->factory.flag = 
+	pjsip_transport_get_flag_from_type(PJSIP_TRANSPORT_TCP);
+    listener->sock = PJ_INVALID_SOCKET;
+
+    pj_ansi_strcpy(listener->factory.obj_name, "tcplis");
+
+    status = pj_lock_create_recursive_mutex(pool, "tcplis", 
+					    &listener->factory.lock);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+
+    /* Create and bind socket */
+    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &listener->sock);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    listener_addr = (pj_sockaddr_in*)&listener->factory.local_addr;
+    if (local) {
+	pj_memcpy(listener_addr, local, sizeof(pj_sockaddr_in));
+    } else {
+	pj_sockaddr_in_init(listener_addr, NULL, 0);
+    }
+
+    status = pj_sock_bind(listener->sock, listener_addr, 
+			  sizeof(pj_sockaddr_in));
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Retrieve the bound address */
+    addr_len = sizeof(pj_sockaddr_in);
+    status = pj_sock_getsockname(listener->sock, listener_addr, &addr_len);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* If published host/IP is specified, then use that address as the
+     * listener advertised address.
+     */
+    if (a_name && a_name->host.slen) {
+	/* Copy the address */
+	listener->factory.addr_name = *a_name;
+	pj_strdup(listener->factory.pool, &listener->factory.addr_name.host, 
+		  &a_name->host);
+	listener->factory.addr_name.port = a_name->port;
+
+    } else {
+	/* No published address is given, use the bound address */
+
+	/* If the address returns 0.0.0.0, use the default
+	 * interface address as the transport's address.
+	 */
+	if (listener_addr->sin_addr.s_addr == 0) {
+	    pj_in_addr hostip;
+
+	    status = pj_gethostip(&hostip);
+	    if (status != PJ_SUCCESS)
+		goto on_error;
+
+	    listener_addr->sin_addr = hostip;
+	}
+
+	/* Save the address name */
+	sockaddr_to_host_port(listener->factory.pool, 
+			      &listener->factory.addr_name, listener_addr);
+    }
+
+    /* If port is zero, get the bound port */
+    if (listener->factory.addr_name.port == 0) {
+	listener->factory.addr_name.port = pj_ntohs(listener_addr->sin_port);
+    }
+
+    pj_ansi_snprintf(listener->factory.obj_name, 
+		     sizeof(listener->factory.obj_name),
+		     "tcplis:%d",  listener->factory.addr_name.port);
+
+
+    /* Start listening to the address */
+    status = pj_sock_listen(listener->sock, PJSIP_TCP_TRANSPORT_BACKLOG);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+
+    /* Register socket to ioqeuue */
+    pj_bzero(&listener_cb, sizeof(listener_cb));
+    listener_cb.on_accept_complete = &on_accept_complete;
+    status = pj_ioqueue_register_sock(pool, pjsip_endpt_get_ioqueue(endpt),
+				      listener->sock, listener,
+				      &listener_cb, &listener->key);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Register to transport manager */
+    listener->endpt = endpt;
+    listener->tpmgr = pjsip_endpt_get_tpmgr(endpt);
+    listener->factory.create_transport = lis_create_transport;
+    listener->factory.destroy = lis_destroy;
+    listener->is_registered = PJ_TRUE;
+    status = pjsip_tpmgr_register_tpfactory(listener->tpmgr,
+					    &listener->factory);
+    if (status != PJ_SUCCESS) {
+	listener->is_registered = PJ_FALSE;
+	goto on_error;
+    }
+
+
+    /* Start pending accept() operations */
+    if (async_cnt > MAX_ASYNC_CNT) async_cnt = MAX_ASYNC_CNT;
+    listener->async_cnt = async_cnt;
+
+    for (i=0; i<async_cnt; ++i) {
+	pj_pool_t *pool;
+
+	pool = pjsip_endpt_create_pool(endpt, "tcps%p", POOL_TP_INIT, 
+				       POOL_TP_INIT);
+	if (!pool) {
+	    status = PJ_ENOMEM;
+	    goto on_error;
+	}
+
+	listener->accept_op[i] = pj_pool_zalloc(pool, 
+						sizeof(struct pending_accept));
+	pj_ioqueue_op_key_init(&listener->accept_op[i]->op_key, 
+				sizeof(listener->accept_op[i]->op_key));
+	listener->accept_op[i]->pool = pool;
+	listener->accept_op[i]->listener = listener;
+	listener->accept_op[i]->index = i;
+
+	on_accept_complete(listener->key, &listener->accept_op[i]->op_key,
+			   listener->sock, PJ_EPENDING);
+    }
+
+    PJ_LOG(4,(listener->factory.obj_name, 
+	     "SIP TCP listener ready for incoming connections at %.*s:%d",
+	     (int)listener->factory.addr_name.host.slen,
+	     listener->factory.addr_name.host.ptr,
+	     listener->factory.addr_name.port));
+
+    /* Return the pointer to user */
+    if (p_factory) *p_factory = &listener->factory;
+
+    return PJ_SUCCESS;
+
+on_error:
+    lis_destroy(&listener->factory);
+    return status;
+}
+
+
+/*
+ * This is the public API to create, initialize, register, and start the
+ * TCP listener.
+ */
+PJ_DEF(pj_status_t) pjsip_tcp_transport_start( pjsip_endpoint *endpt,
+					       const pj_sockaddr_in *local,
+					       unsigned async_cnt,
+					       pjsip_tpfactory **p_factory)
+{
+    return pjsip_tcp_transport_start2(endpt, local, NULL, async_cnt, p_factory);
+}
+
+
+/* This callback is called by transport manager to destroy listener */
+static pj_status_t lis_destroy(pjsip_tpfactory *factory)
+{
+    struct tcp_listener *listener = (struct tcp_listener *)factory;
+    unsigned i;
+
+    if (listener->is_registered) {
+	pjsip_tpmgr_unregister_tpfactory(listener->tpmgr, &listener->factory);
+	listener->is_registered = PJ_FALSE;
+    }
+
+    if (listener->key) {
+	pj_ioqueue_unregister(listener->key);
+	listener->key = NULL;
+	listener->sock = PJ_INVALID_SOCKET;
+    }
+
+    if (listener->sock != PJ_INVALID_SOCKET) {
+	pj_sock_close(listener->sock);
+	listener->sock = PJ_INVALID_SOCKET;
+    }
+
+    if (listener->factory.lock) {
+	pj_lock_destroy(listener->factory.lock);
+	listener->factory.lock = NULL;
+    }
+
+    for (i=0; i<PJ_ARRAY_SIZE(listener->accept_op); ++i) {
+	if (listener->accept_op[i] && listener->accept_op[i]->pool) {
+	    pj_pool_t *pool = listener->accept_op[i]->pool;
+	    listener->accept_op[i]->pool = NULL;
+	    pj_pool_release(pool);
+	}
+    }
+
+    if (listener->factory.pool) {
+	pj_pool_t *pool = listener->factory.pool;
+
+	PJ_LOG(4,(listener->factory.obj_name,  "SIP TCP listener destroyed"));
+
+	listener->factory.pool = NULL;
+	pj_pool_release(pool);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/***************************************************************************/
+/*
+ * TCP Transport
+ */
+
+/*
+ * Prototypes.
+ */
+/* Called by transport manager to send message */
+static pj_status_t tcp_send_msg(pjsip_transport *transport, 
+				pjsip_tx_data *tdata,
+				const pj_sockaddr_t *rem_addr,
+				int addr_len,
+				void *token,
+				void (*callback)(pjsip_transport *transport,
+						 void *token, 
+						 pj_ssize_t sent_bytes));
+
+/* Called by transport manager to shutdown */
+static pj_status_t tcp_shutdown(pjsip_transport *transport);
+
+/* Called by transport manager to destroy transport */
+static pj_status_t tcp_destroy_transport(pjsip_transport *transport);
+
+/* Utility to destroy transport */
+static pj_status_t tcp_destroy(pjsip_transport *transport,
+			       pj_status_t reason);
+
+/* Callback from ioqueue on incoming packet */
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read);
+
+/* Callback from ioqueue when packet is sent */
+static void on_write_complete(pj_ioqueue_key_t *key, 
+                              pj_ioqueue_op_key_t *op_key, 
+                              pj_ssize_t bytes_sent);
+
+/* Callback from ioqueue when connect completes */
+static void on_connect_complete(pj_ioqueue_key_t *key, 
+                                pj_status_t status);
+
+
+/*
+ * Common function to create TCP transport, called when pending accept() and
+ * pending connect() complete.
+ */
+static pj_status_t tcp_create( struct tcp_listener *listener,
+			       pj_pool_t *pool,
+			       pj_sock_t sock, pj_bool_t is_server,
+			       const pj_sockaddr_in *local,
+			       const pj_sockaddr_in *remote,
+			       struct tcp_transport **p_tcp)
+{
+    struct tcp_transport *tcp;
+    pj_ioqueue_t *ioqueue;
+    pj_ioqueue_callback tcp_callback;
+    pj_status_t status;
+    
+
+    PJ_ASSERT_RETURN(sock != PJ_INVALID_SOCKET, PJ_EINVAL);
+
+
+    if (pool == NULL) {
+	pool = pjsip_endpt_create_pool(listener->endpt, "tcp",
+				       POOL_TP_INIT, POOL_TP_INC);
+	PJ_ASSERT_RETURN(pool != NULL, PJ_ENOMEM);
+    }    
+
+    /*
+     * Create and initialize basic transport structure.
+     */
+    tcp = pj_pool_zalloc(pool, sizeof(*tcp));
+    tcp->sock = sock;
+    tcp->is_server = is_server;
+    tcp->listener = listener;
+    pj_list_init(&tcp->delayed_list);
+    tcp->base.pool = pool;
+
+    pj_ansi_snprintf(tcp->base.obj_name, PJ_MAX_OBJ_NAME, 
+		     (is_server ? "tcps%p" :"tcpc%p"), tcp);
+
+    status = pj_atomic_create(pool, 0, &tcp->base.ref_cnt);
+    if (status != PJ_SUCCESS) {
+	goto on_error;
+    }
+
+    status = pj_lock_create_recursive_mutex(pool, "tcp", &tcp->base.lock);
+    if (status != PJ_SUCCESS) {
+	goto on_error;
+    }
+
+    tcp->base.key.type = PJSIP_TRANSPORT_TCP;
+    pj_memcpy(&tcp->base.key.rem_addr, remote, sizeof(pj_sockaddr_in));
+    tcp->base.type_name = "tcp";
+    tcp->base.flag = pjsip_transport_get_flag_from_type(PJSIP_TRANSPORT_TCP);
+
+    tcp->base.info = pj_pool_alloc(pool, 64);
+    pj_ansi_snprintf(tcp->base.info, 64, "TCP to %s:%d",
+		     pj_inet_ntoa(remote->sin_addr), 
+		     (int)pj_ntohs(remote->sin_port));
+
+    tcp->base.addr_len = sizeof(pj_sockaddr_in);
+    pj_memcpy(&tcp->base.local_addr, local, sizeof(pj_sockaddr_in));
+    sockaddr_to_host_port(pool, &tcp->base.local_name, local);
+    sockaddr_to_host_port(pool, &tcp->base.remote_name, remote);
+
+    tcp->base.endpt = listener->endpt;
+    tcp->base.tpmgr = listener->tpmgr;
+    tcp->base.send_msg = &tcp_send_msg;
+    tcp->base.do_shutdown = &tcp_shutdown;
+    tcp->base.destroy = &tcp_destroy_transport;
+
+
+    /* Register socket to ioqueue */
+    pj_bzero(&tcp_callback, sizeof(pj_ioqueue_callback));
+    tcp_callback.on_read_complete = &on_read_complete;
+    tcp_callback.on_write_complete = &on_write_complete;
+    tcp_callback.on_connect_complete = &on_connect_complete;
+
+    ioqueue = pjsip_endpt_get_ioqueue(listener->endpt);
+    status = pj_ioqueue_register_sock(pool, ioqueue, sock, 
+				      tcp, &tcp_callback, &tcp->key);
+    if (status != PJ_SUCCESS) {
+	goto on_error;
+    }
+
+    /* Register transport to transport manager */
+    status = pjsip_transport_register(listener->tpmgr, &tcp->base);
+    if (status != PJ_SUCCESS) {
+	goto on_error;
+    }
+
+    tcp->is_registered = PJ_TRUE;
+
+    /* Done setting up basic transport. */
+    *p_tcp = tcp;
+
+    PJ_LOG(4,(tcp->base.obj_name, "TCP %s transport created",
+	      (tcp->is_server ? "server" : "client")));
+
+    return PJ_SUCCESS;
+
+on_error:
+    tcp_destroy(&tcp->base, status);
+    return status;
+}
+
+
+/* Flush all delayed transmision once the socket is connected. */
+static void tcp_flush_pending_tx(struct tcp_transport *tcp)
+{
+    pj_lock_acquire(tcp->base.lock);
+    while (!pj_list_empty(&tcp->delayed_list)) {
+	struct delayed_tdata *pending_tx;
+	pjsip_tx_data *tdata;
+	pj_ioqueue_op_key_t *op_key;
+	pj_ssize_t size;
+	pj_status_t status;
+
+	pending_tx = tcp->delayed_list.next;
+	pj_list_erase(pending_tx);
+
+	tdata = pending_tx->tdata_op_key->tdata;
+	op_key = (pj_ioqueue_op_key_t*)pending_tx->tdata_op_key;
+
+	/* send to ioqueue! */
+	size = tdata->buf.cur - tdata->buf.start;
+	status = pj_ioqueue_send(tcp->key, op_key,
+				 tdata->buf.start, &size, 0);
+
+	if (status != PJ_EPENDING) {
+	    on_write_complete(tcp->key, op_key, size);
+	}
+
+    }
+    pj_lock_release(tcp->base.lock);
+}
+
+
+/* Called by transport manager to destroy transport */
+static pj_status_t tcp_destroy_transport(pjsip_transport *transport)
+{
+    struct tcp_transport *tcp = (struct tcp_transport*)transport;
+
+    /* Transport would have been unregistered by now since this callback
+     * is called by transport manager.
+     */
+    tcp->is_registered = PJ_FALSE;
+
+    return tcp_destroy(transport, tcp->close_reason);
+}
+
+
+/* Destroy TCP transport */
+static pj_status_t tcp_destroy(pjsip_transport *transport, 
+			       pj_status_t reason)
+{
+    struct tcp_transport *tcp = (struct tcp_transport*)transport;
+
+    if (tcp->close_reason == 0)
+	tcp->close_reason = reason;
+
+    if (tcp->is_registered) {
+	tcp->is_registered = PJ_FALSE;
+	pjsip_transport_destroy(transport);
+
+	/* pjsip_transport_destroy will recursively call this function
+	 * again.
+	 */
+	return PJ_SUCCESS;
+    }
+
+    /* Mark transport as closing */
+    tcp->is_closing = PJ_TRUE;
+
+    /* Cancel all delayed transmits */
+    while (!pj_list_empty(&tcp->delayed_list)) {
+	struct delayed_tdata *pending_tx;
+	pj_ioqueue_op_key_t *op_key;
+
+	pending_tx = tcp->delayed_list.next;
+	pj_list_erase(pending_tx);
+
+	op_key = (pj_ioqueue_op_key_t*)pending_tx->tdata_op_key;
+
+	on_write_complete(tcp->key, op_key, -reason);
+    }
+
+    if (tcp->rdata.tp_info.pool) {
+	pj_pool_release(tcp->rdata.tp_info.pool);
+	tcp->rdata.tp_info.pool = NULL;
+    }
+
+    if (tcp->key) {
+	pj_ioqueue_unregister(tcp->key);
+	tcp->key = NULL;
+	tcp->sock = PJ_INVALID_SOCKET;
+    }
+
+    if (tcp->sock != PJ_INVALID_SOCKET) {
+	pj_sock_close(tcp->sock);
+	tcp->sock = PJ_INVALID_SOCKET;
+    }
+
+    if (tcp->base.lock) {
+	pj_lock_destroy(tcp->base.lock);
+	tcp->base.lock = NULL;
+    }
+
+    if (tcp->base.ref_cnt) {
+	pj_atomic_destroy(tcp->base.ref_cnt);
+	tcp->base.ref_cnt = NULL;
+    }
+
+    if (tcp->base.pool) {
+	pj_pool_t *pool;
+
+	if (reason != PJ_SUCCESS) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+
+	    pj_strerror(reason, errmsg, sizeof(errmsg));
+	    PJ_LOG(4,(tcp->base.obj_name, 
+		      "TCP transport destroyed with reason %d: %s", 
+		      reason, errmsg));
+
+	} else {
+
+	    PJ_LOG(4,(tcp->base.obj_name, 
+		      "TCP transport destroyed normally"));
+
+	}
+
+	pool = tcp->base.pool;
+	tcp->base.pool = NULL;
+	pj_pool_release(pool);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * This utility function creates receive data buffers and start
+ * asynchronous recv() operations from the socket. It is called after
+ * accept() or connect() operation complete.
+ */
+static pj_status_t tcp_start_read(struct tcp_transport *tcp)
+{
+    pj_pool_t *pool;
+    pj_ssize_t size;
+    pj_sockaddr_in *rem_addr;
+    pj_status_t status;
+
+    /* Init rdata */
+    pool = pjsip_endpt_create_pool(tcp->listener->endpt,
+				   "rtd%p",
+				   PJSIP_POOL_RDATA_LEN,
+				   PJSIP_POOL_RDATA_INC);
+    if (!pool) {
+	tcp_perror(tcp->base.obj_name, "Unable to create pool", PJ_ENOMEM);
+	return PJ_ENOMEM;
+    }
+
+    tcp->rdata.tp_info.pool = pool;
+
+    tcp->rdata.tp_info.transport = &tcp->base;
+    tcp->rdata.tp_info.tp_data = tcp;
+    tcp->rdata.tp_info.op_key.rdata = &tcp->rdata;
+    pj_ioqueue_op_key_init(&tcp->rdata.tp_info.op_key.op_key, 
+			   sizeof(pj_ioqueue_op_key_t));
+
+    tcp->rdata.pkt_info.src_addr = tcp->base.key.rem_addr;
+    tcp->rdata.pkt_info.src_addr_len = sizeof(pj_sockaddr_in);
+    rem_addr = (pj_sockaddr_in*) &tcp->base.key.rem_addr;
+    pj_ansi_strcpy(tcp->rdata.pkt_info.src_name,
+		   pj_inet_ntoa(rem_addr->sin_addr));
+    tcp->rdata.pkt_info.src_port = pj_ntohs(rem_addr->sin_port);
+
+    size = sizeof(tcp->rdata.pkt_info.packet);
+    status = pj_ioqueue_recv(tcp->key, &tcp->rdata.tp_info.op_key.op_key,
+			     tcp->rdata.pkt_info.packet, &size,
+			     PJ_IOQUEUE_ALWAYS_ASYNC);
+    if (status != PJ_SUCCESS && status != PJ_EPENDING) {
+	PJ_LOG(4, (tcp->base.obj_name, "ioqueue recv() error, status=%d", 
+		   status));
+	return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/* This callback is called by transport manager for the TCP factory
+ * to create outgoing transport to the specified destination.
+ */
+static pj_status_t lis_create_transport(pjsip_tpfactory *factory,
+					pjsip_tpmgr *mgr,
+					pjsip_endpoint *endpt,
+					const pj_sockaddr *rem_addr,
+					int addr_len,
+					pjsip_transport **p_transport)
+{
+    struct tcp_listener *listener;
+    struct tcp_transport *tcp;
+    pj_sock_t sock;
+    pj_sockaddr_in local_addr;
+    pj_status_t status;
+
+    /* Sanity checks */
+    PJ_ASSERT_RETURN(factory && mgr && endpt && rem_addr &&
+		     addr_len && p_transport, PJ_EINVAL);
+
+    /* Check that address is a sockaddr_in */
+    PJ_ASSERT_RETURN(rem_addr->addr.sa_family == PJ_AF_INET &&
+		     addr_len == sizeof(pj_sockaddr_in), PJ_EINVAL);
+
+
+    listener = (struct tcp_listener*)factory;
+
+    
+    /* Create socket */
+    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &sock);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Bind to any port */
+    status = pj_sock_bind_in(sock, 0, 0);
+    if (status != PJ_SUCCESS) {
+	pj_sock_close(sock);
+	return status;
+    }
+
+    /* Get the local port */
+    addr_len = sizeof(pj_sockaddr_in);
+    status = pj_sock_getsockname(sock, &local_addr, &addr_len);
+    if (status != PJ_SUCCESS) {
+	pj_sock_close(sock);
+	return status;
+    }
+
+    /* Initially set the address from the listener's address */
+    local_addr.sin_addr.s_addr = 
+	((pj_sockaddr_in*)&listener->factory.local_addr)->sin_addr.s_addr;
+
+    /* Create the transport descriptor */
+    status = tcp_create(listener, NULL, sock, PJ_FALSE, &local_addr, 
+			(pj_sockaddr_in*)rem_addr, &tcp);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    /* Start asynchronous connect() operation */
+    tcp->has_pending_connect = PJ_TRUE;
+    status = pj_ioqueue_connect(tcp->key, rem_addr, sizeof(pj_sockaddr_in));
+    if (status == PJ_SUCCESS) {
+	tcp->has_pending_connect = PJ_FALSE;
+    } else if (status != PJ_EPENDING) {
+	tcp_destroy(&tcp->base, status);
+	return status;
+    }
+
+    /* Update (again) local address, just in case local address currently
+     * set is different now that asynchronous connect() is started.
+     */
+    addr_len = sizeof(pj_sockaddr_in);
+    if (pj_sock_getsockname(tcp->sock, &local_addr, &addr_len)==PJ_SUCCESS) {
+	pj_sockaddr_in *tp_addr = (pj_sockaddr_in*)&tcp->base.local_addr;
+
+	/* Some systems (like old Win32 perhaps) may not set local address
+	 * properly before socket is fully connected.
+	 */
+	if (tp_addr->sin_addr.s_addr != local_addr.sin_addr.s_addr &&
+	    local_addr.sin_addr.s_addr != 0) 
+	{
+	    tp_addr->sin_addr.s_addr = local_addr.sin_addr.s_addr;
+	    tp_addr->sin_port = local_addr.sin_port;
+	    sockaddr_to_host_port(tcp->base.pool, &tcp->base.local_name,
+				  &local_addr);
+	}
+    }
+
+    if (tcp->has_pending_connect) {
+	PJ_LOG(4,(tcp->base.obj_name, 
+		  "TCP transport %.*s:%d is connecting to %.*s:%d...",
+		  (int)tcp->base.local_name.host.slen,
+		  tcp->base.local_name.host.ptr,
+		  tcp->base.local_name.port,
+		  (int)tcp->base.remote_name.host.slen,
+		  tcp->base.remote_name.host.ptr,
+		  tcp->base.remote_name.port));
+    }
+
+    /* Done */
+    *p_transport = &tcp->base;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * This callback is called by ioqueue when pending accept() operation has
+ * completed.
+ */
+static void on_accept_complete(	pj_ioqueue_key_t *key, 
+				pj_ioqueue_op_key_t *op_key, 
+				pj_sock_t sock, 
+				pj_status_t status)
+{
+    struct tcp_listener *listener;
+    struct tcp_transport *tcp;
+    struct pending_accept *accept_op;
+    int err_cnt = 0;
+
+    listener = pj_ioqueue_get_user_data(key);
+    accept_op = (struct pending_accept*) op_key;
+
+    /*
+     * Loop while there is immediate connection or when there is error.
+     */
+    do {
+	if (status == PJ_EPENDING) {
+	    /*
+	     * This can only happen when this function is called during
+	     * initialization to kick off asynchronous accept().
+	     */
+
+	} else if (status != PJ_SUCCESS) {
+
+	    /*
+	     * Error in accept().
+	     */
+	    tcp_perror(listener->factory.obj_name, "Error in accept()", 
+		       status);
+
+	    /*
+	     * Prevent endless accept() error loop by limiting the
+	     * number of consecutive errors. Once the number of errors
+	     * is equal to maximum, we treat this as permanent error, and
+	     * we stop the accept() operation.
+	     */
+	    ++err_cnt;
+	    if (err_cnt >= 10) {
+		PJ_LOG(1, (listener->factory.obj_name, 
+			   "Too many errors, listener stopping"));
+	    }
+
+	} else {
+	    pj_pool_t *pool;
+	    struct pending_accept *new_op;
+
+	    if (sock == PJ_INVALID_SOCKET) {
+		sock = accept_op->new_sock;
+	    }
+
+	    if (sock == PJ_INVALID_SOCKET) {
+		pj_assert(!"Should not happen. status should be error");
+		goto next_accept;
+	    }
+
+	    PJ_LOG(4,(listener->factory.obj_name, 
+		      "TCP listener %.*s:%d: got incoming TCP connection "
+		      "from %s:%d, sock=%d",
+		      (int)listener->factory.addr_name.host.slen,
+		      listener->factory.addr_name.host.ptr,
+		      listener->factory.addr_name.port,
+		      pj_inet_ntoa(accept_op->remote_addr.sin_addr),
+		      pj_ntohs(accept_op->remote_addr.sin_port),
+		      sock));
+
+	    /* Create new accept_opt */
+	    pool = pjsip_endpt_create_pool(listener->endpt, "tcps%p", 
+					   POOL_TP_INIT, POOL_TP_INC);
+	    new_op = pj_pool_zalloc(pool, sizeof(struct pending_accept));
+	    new_op->pool = pool;
+	    new_op->listener = listener;
+	    new_op->index = accept_op->index;
+	    pj_ioqueue_op_key_init(&new_op->op_key, sizeof(new_op->op_key));
+	    listener->accept_op[accept_op->index] = new_op;
+
+	    /* 
+	     * Incoming connections!
+	     * Create TCP transport for the new socket.
+	     */
+	    status = tcp_create( listener, accept_op->pool, sock, PJ_TRUE,
+				 &accept_op->local_addr, 
+				 &accept_op->remote_addr, &tcp);
+	    if (status == PJ_SUCCESS) {
+		status = tcp_start_read(tcp);
+		if (status != PJ_SUCCESS) {
+		    PJ_LOG(3,(tcp->base.obj_name, "New transport cancelled"));
+		    tcp_destroy(&tcp->base, status);
+		}
+	    }
+
+	    accept_op = new_op;
+	}
+
+next_accept:
+	/*
+	 * Start the next asynchronous accept() operation.
+	 */
+	accept_op->addr_len = sizeof(pj_sockaddr_in);
+	accept_op->new_sock = PJ_INVALID_SOCKET;
+
+	status = pj_ioqueue_accept(listener->key, 
+				   &accept_op->op_key,
+				   &accept_op->new_sock,
+				   &accept_op->local_addr,
+				   &accept_op->remote_addr,
+				   &accept_op->addr_len);
+
+	/*
+	 * Loop while we have immediate connection or when there is error.
+	 */
+
+    } while (status != PJ_EPENDING);
+}
+
+
+/* 
+ * Callback from ioqueue when packet is sent.
+ */
+static void on_write_complete(pj_ioqueue_key_t *key, 
+                              pj_ioqueue_op_key_t *op_key, 
+                              pj_ssize_t bytes_sent)
+{
+    struct tcp_transport *tcp = pj_ioqueue_get_user_data(key);
+    pjsip_tx_data_op_key *tdata_op_key = (pjsip_tx_data_op_key*)op_key;
+
+    tdata_op_key->tdata = NULL;
+
+    /* Check for error/closure */
+    if (bytes_sent <= 0) {
+	pj_status_t status;
+
+	PJ_LOG(5,(tcp->base.obj_name, "TCP send() error, sent=%d", 
+		  bytes_sent));
+
+	status = (bytes_sent == 0) ? PJ_RETURN_OS_ERROR(OSERR_ENOTCONN) :
+				     -bytes_sent;
+	if (tcp->close_reason==PJ_SUCCESS) tcp->close_reason = status;
+	pjsip_transport_shutdown(&tcp->base);
+    }
+
+    if (tdata_op_key->callback) {
+	/*
+	 * Notify sip_transport.c that packet has been sent.
+	 */
+	tdata_op_key->callback(&tcp->base, tdata_op_key->token, bytes_sent);
+    }
+}
+
+
+/* 
+ * This callback is called by transport manager to send SIP message 
+ */
+static pj_status_t tcp_send_msg(pjsip_transport *transport, 
+				pjsip_tx_data *tdata,
+				const pj_sockaddr_t *rem_addr,
+				int addr_len,
+				void *token,
+				void (*callback)(pjsip_transport *transport,
+						 void *token, 
+						 pj_ssize_t sent_bytes))
+{
+    struct tcp_transport *tcp = (struct tcp_transport*)transport;
+    pj_ssize_t size;
+    pj_bool_t delayed = PJ_FALSE;
+    pj_status_t status = PJ_SUCCESS;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(transport && tdata, PJ_EINVAL);
+
+    /* Check that there's no pending operation associated with the tdata */
+    PJ_ASSERT_RETURN(tdata->op_key.tdata == NULL, PJSIP_EPENDINGTX);
+    
+    /* Check the address is supported */
+    PJ_ASSERT_RETURN(rem_addr && addr_len==sizeof(pj_sockaddr_in), PJ_EINVAL);
+
+
+
+    /* Init op key. */
+    tdata->op_key.tdata = tdata;
+    tdata->op_key.token = token;
+    tdata->op_key.callback = callback;
+
+    /* If asynchronous connect() has not completed yet, just put the
+     * transmit data in the pending transmission list since we can not
+     * use the socket yet.
+     */
+    if (tcp->has_pending_connect) {
+
+	/*
+	 * Looks like connect() is still in progress. Check again (this time
+	 * with holding the lock) to be sure.
+	 */
+	pj_lock_acquire(tcp->base.lock);
+
+	if (tcp->has_pending_connect) {
+	    struct delayed_tdata *delayed_tdata;
+
+	    /*
+	     * connect() is still in progress. Put the transmit data to
+	     * the delayed list.
+	     */
+	    delayed_tdata = pj_pool_alloc(tdata->pool, 
+					  sizeof(*delayed_tdata));
+	    delayed_tdata->tdata_op_key = &tdata->op_key;
+
+	    pj_list_push_back(&tcp->delayed_list, delayed_tdata);
+	    status = PJ_EPENDING;
+
+	    /* Prevent pj_ioqueue_send() to be called below */
+	    delayed = PJ_TRUE;
+	}
+
+	pj_lock_release(tcp->base.lock);
+    } 
+    
+    if (!delayed) {
+	/*
+	 * Transport is ready to go. Send the packet to ioqueue to be
+	 * sent asynchronously.
+	 */
+	size = tdata->buf.cur - tdata->buf.start;
+	status = pj_ioqueue_send(tcp->key, 
+				 (pj_ioqueue_op_key_t*)&tdata->op_key,
+				 tdata->buf.start, &size, 0);
+
+	if (status != PJ_EPENDING) {
+	    /* Not pending (could be immediate success or error) */
+	    tdata->op_key.tdata = NULL;
+
+	    /* Shutdown transport on closure/errors */
+	    if (size <= 0) {
+
+		PJ_LOG(5,(tcp->base.obj_name, "TCP send() error, sent=%d", 
+			  size));
+
+		if (status == PJ_SUCCESS) 
+		    status = PJ_RETURN_OS_ERROR(OSERR_ENOTCONN);
+		if (tcp->close_reason==PJ_SUCCESS) tcp->close_reason = status;
+		pjsip_transport_shutdown(&tcp->base);
+	    }
+	}
+    }
+
+    return status;
+}
+
+
+/* 
+ * This callback is called by transport manager to shutdown transport.
+ * This normally is only used by UDP transport.
+ */
+static pj_status_t tcp_shutdown(pjsip_transport *transport)
+{
+
+    PJ_UNUSED_ARG(transport);
+
+    /* Nothing to do for TCP */
+    return PJ_SUCCESS;
+}
+
+
+/* 
+ * Callback from ioqueue that an incoming data is received from the socket.
+ */
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read)
+{
+    enum { MAX_IMMEDIATE_PACKET = 10 };
+    pjsip_rx_data_op_key *rdata_op_key = (pjsip_rx_data_op_key*) op_key;
+    pjsip_rx_data *rdata = rdata_op_key->rdata;
+    struct tcp_transport *tcp = 
+	(struct tcp_transport*)rdata->tp_info.transport;
+    int i;
+    pj_status_t status;
+
+    /* Don't do anything if transport is closing. */
+    if (tcp->is_closing) {
+	tcp->is_closing++;
+	return;
+    }
+
+    /*
+     * The idea of the loop is to process immediate data received by
+     * pj_ioqueue_recv(), as long as i < MAX_IMMEDIATE_PACKET. When
+     * i is >= MAX_IMMEDIATE_PACKET, we force the recv() operation to
+     * complete asynchronously, to allow other sockets to get their data.
+     */
+    for (i=0;; ++i) {
+	pj_uint32_t flags;
+
+	/* Houston, we have packet! Report the packet to transport manager
+	 * to be parsed.
+	 */
+	if (bytes_read > 0) {
+	    pj_size_t size_eaten;
+
+	    /* Init pkt_info part. */
+	    rdata->pkt_info.len += bytes_read;
+	    rdata->pkt_info.zero = 0;
+	    pj_gettimeofday(&rdata->pkt_info.timestamp);
+
+	    /* Report to transport manager.
+	     * The transport manager will tell us how many bytes of the packet
+	     * have been processed (as valid SIP message).
+	     */
+	    size_eaten = 
+		pjsip_tpmgr_receive_packet(rdata->tp_info.transport->tpmgr, 
+					   rdata);
+
+	    pj_assert(size_eaten <= (pj_size_t)rdata->pkt_info.len);
+
+	    /* Move unprocessed data to the front of the buffer */
+	    if (size_eaten>0 && size_eaten<(pj_size_t)rdata->pkt_info.len) {
+		pj_memmove(rdata->pkt_info.packet,
+			   rdata->pkt_info.packet + size_eaten,
+			   rdata->pkt_info.len - size_eaten);
+	    }
+	    
+	    rdata->pkt_info.len -= size_eaten;
+
+	} else if (bytes_read == 0) {
+
+	    /* Transport is closed */
+	    PJ_LOG(4,(tcp->base.obj_name, "TCP connection closed"));
+	    
+	    /* We can not destroy the transport since high level objects may
+	     * still keep reference to this transport. So we can only 
+	     * instruct transport manager to gracefully start the shutdown
+	     * procedure for this transport.
+	     */
+	    if (tcp->close_reason==PJ_SUCCESS) 
+		tcp->close_reason = PJ_RETURN_OS_ERROR(OSERR_ENOTCONN);
+	    pjsip_transport_shutdown(&tcp->base);
+
+	    return;
+
+	//} else if (bytes_read < 0)  {
+	} else if (-bytes_read != PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK) &&
+		   -bytes_read != PJ_STATUS_FROM_OS(OSERR_EINPROGRESS) && 
+		   -bytes_read != PJ_STATUS_FROM_OS(OSERR_ECONNRESET)) 
+	{
+
+	    /* Socket error. */
+	    PJ_LOG(4,(tcp->base.obj_name, "TCP connection reset"));
+
+	    /* We can not destroy the transport since high level objects may
+	     * still keep reference to this transport. So we can only 
+	     * instruct transport manager to gracefully start the shutdown
+	     * procedure for this transport.
+	     */
+	    if (tcp->close_reason==PJ_SUCCESS) tcp->close_reason = -bytes_read;
+	    pjsip_transport_shutdown(&tcp->base);
+
+	    return;
+	}
+
+	if (i >= MAX_IMMEDIATE_PACKET) {
+	    /* Receive quota reached. Force ioqueue_recv() to 
+	     * return PJ_EPENDING 
+	     */
+	    flags = PJ_IOQUEUE_ALWAYS_ASYNC;
+	} else {
+	    flags = 0;
+	}
+
+	/* Reset pool. */
+	pj_pool_reset(rdata->tp_info.pool);
+
+	/* Read next packet. */
+	bytes_read = sizeof(rdata->pkt_info.packet) - rdata->pkt_info.len;
+	rdata->pkt_info.src_addr_len = sizeof(rdata->pkt_info.src_addr);
+	status = pj_ioqueue_recv(key, op_key, 
+				 rdata->pkt_info.packet+rdata->pkt_info.len,
+				 &bytes_read, flags);
+
+	if (status == PJ_SUCCESS) {
+
+	    /* Continue loop. */
+	    pj_assert(i < MAX_IMMEDIATE_PACKET);
+
+	} else if (status == PJ_EPENDING) {
+	    break;
+
+	} else {
+	    /* Socket error */
+	    PJ_LOG(4,(tcp->base.obj_name, "TCP connection reset"));
+
+	    /* We can not destroy the transport since high level objects may
+	     * still keep reference to this transport. So we can only 
+	     * instruct transport manager to gracefully start the shutdown
+	     * procedure for this transport.
+	     */
+	    if (tcp->close_reason==PJ_SUCCESS) tcp->close_reason = status;
+	    pjsip_transport_shutdown(&tcp->base);
+
+	    return;
+	}
+    }
+}
+
+
+/* 
+ * Callback from ioqueue when asynchronous connect() operation completes.
+ */
+static void on_connect_complete(pj_ioqueue_key_t *key, 
+                                pj_status_t status)
+{
+    struct tcp_transport *tcp;
+    pj_sockaddr_in addr;
+    int addrlen;
+
+    tcp = pj_ioqueue_get_user_data(key);
+
+    /* Mark that pending connect() operation has completed. */
+    tcp->has_pending_connect = PJ_FALSE;
+
+    /* Check connect() status */
+    if (status != PJ_SUCCESS) {
+
+	tcp_perror(tcp->base.obj_name, "TCP connect() error", status);
+
+	/* Cancel all delayed transmits */
+	while (!pj_list_empty(&tcp->delayed_list)) {
+	    struct delayed_tdata *pending_tx;
+	    pj_ioqueue_op_key_t *op_key;
+
+	    pending_tx = tcp->delayed_list.next;
+	    pj_list_erase(pending_tx);
+
+	    op_key = (pj_ioqueue_op_key_t*)pending_tx->tdata_op_key;
+
+	    on_write_complete(tcp->key, op_key, -status);
+	}
+
+	/* We can not destroy the transport since high level objects may
+	 * still keep reference to this transport. So we can only 
+	 * instruct transport manager to gracefully start the shutdown
+	 * procedure for this transport.
+	 */
+	if (tcp->close_reason==PJ_SUCCESS) tcp->close_reason = status;
+	pjsip_transport_shutdown(&tcp->base);
+	return;
+    }
+
+    PJ_LOG(4,(tcp->base.obj_name, 
+	      "TCP transport %.*s:%d is connected to %.*s:%d",
+	      (int)tcp->base.local_name.host.slen,
+	      tcp->base.local_name.host.ptr,
+	      tcp->base.local_name.port,
+	      (int)tcp->base.remote_name.host.slen,
+	      tcp->base.remote_name.host.ptr,
+	      tcp->base.remote_name.port));
+
+
+    /* Update (again) local address, just in case local address currently
+     * set is different now that the socket is connected (could happen
+     * on some systems, like old Win32 probably?).
+     */
+    addrlen = sizeof(pj_sockaddr_in);
+    if (pj_sock_getsockname(tcp->sock, &addr, &addrlen)==PJ_SUCCESS) {
+	pj_sockaddr_in *tp_addr = (pj_sockaddr_in*)&tcp->base.local_addr;
+
+	if (tp_addr->sin_addr.s_addr != addr.sin_addr.s_addr) {
+	    tp_addr->sin_addr.s_addr = addr.sin_addr.s_addr;
+	    tp_addr->sin_port = addr.sin_port;
+	    sockaddr_to_host_port(tcp->base.pool, &tcp->base.local_name,
+				  tp_addr);
+	}
+    }
+
+    /* Start pending read */
+    status = tcp_start_read(tcp);
+    if (status != PJ_SUCCESS) {
+	/* We can not destroy the transport since high level objects may
+	 * still keep reference to this transport. So we can only 
+	 * instruct transport manager to gracefully start the shutdown
+	 * procedure for this transport.
+	 */
+	if (tcp->close_reason==PJ_SUCCESS) tcp->close_reason = status;
+	pjsip_transport_shutdown(&tcp->base);
+	return;
+    }
+
+    /* Flush all pending send operations */
+    tcp_flush_pending_tx(tcp);
+}
+
+#endif	/* PJ_HAS_TCP */
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport_tls_ossl.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport_tls_ossl.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport_tls_ossl.c	(revision 1163)
@@ -0,0 +1,2221 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_transport_tls.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_errno.h>
+#include <pj/compat/socket.h>
+#include <pj/addr_resolv.h>
+#include <pj/assert.h>
+#include <pj/ioqueue.h>
+#include <pj/lock.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/compat/socket.h>
+#include <pj/sock_select.h>
+#include <pj/string.h>
+
+
+/* Only build when PJSIP_HAS_TLS_TRANSPORT is enabled */
+#if defined(PJSIP_HAS_TLS_TRANSPORT) && PJSIP_HAS_TLS_TRANSPORT!=0
+
+
+
+/* 
+ * Include OpenSSL headers 
+ */
+#include <openssl/bio.h>
+#include <openssl/ssl.h>
+#include <openssl/err.h>
+
+/*
+ * With VisualC++, it's not possible to dynamically link against some
+ * libraries when some macros are defined (unlike "make" based build
+ * system where this can be easily manipulated).
+ *
+ * So for VisualC++ IDE, include OpenSSL libraries in the linking by
+ * using the #pragma lib construct below.
+ */
+#ifdef _MSC_VER
+# ifdef _DEBUG
+#  pragma comment( lib, "libeay32MTd")
+#  pragma comment( lib, "ssleay32MTd")
+#else
+#  pragma comment( lib, "libeay32MT")
+#  pragma comment( lib, "ssleay32MT")
+# endif
+#endif
+
+
+#define THIS_FILE	"transport_tls_ossl.c"
+
+#define MAX_ASYNC_CNT	16
+#define POOL_LIS_INIT	4000
+#define POOL_LIS_INC	4001
+#define POOL_TP_INIT	4000
+#define POOL_TP_INC	4002
+
+
+
+/**
+ * Get the number of descriptors in the set. This is defined in sock_select.c
+ * This function will only return the number of sockets set from PJ_FD_SET
+ * operation. When the set is modified by other means (such as by select()),
+ * the count will not be reflected here.
+ *
+ * That's why don't export this function in the header file, to avoid
+ * misunderstanding.
+ *
+ * @param fdsetp    The descriptor set.
+ *
+ * @return          Number of descriptors in the set.
+ */
+PJ_DECL(pj_size_t) PJ_FD_COUNT(const pj_fd_set_t *fdsetp);
+
+
+
+struct tls_listener;
+struct tls_transport;
+
+
+/*
+ * This structure is "descendant" of pj_ioqueue_op_key_t, and it is used to
+ * track pending/asynchronous accept() operation. TLS transport may have
+ * more than one pending accept() operations, depending on the value of
+ * async_cnt.
+ */
+struct pending_accept
+{
+    pj_ioqueue_op_key_t	     op_key;
+    struct tls_listener	    *listener;
+    unsigned		     index;
+    pj_pool_t		    *pool;
+    pj_sock_t		     new_sock;
+    int			     addr_len;
+    pj_sockaddr_in	     local_addr;
+    pj_sockaddr_in	     remote_addr;
+};
+
+
+/*
+ * This is the TLS listener, which is a "descendant" of pjsip_tpfactory (the
+ * SIP transport factory).
+ */
+struct tls_listener
+{
+    pjsip_tpfactory	     factory;
+    pj_bool_t		     is_registered;
+    pjsip_tls_setting	     setting;
+    pjsip_endpoint	    *endpt;
+    pjsip_tpmgr		    *tpmgr;
+    pj_sock_t		     sock;
+    pj_ioqueue_key_t	    *key;
+    unsigned		     async_cnt;
+    struct pending_accept   *accept_op[MAX_ASYNC_CNT];
+
+    SSL_CTX		    *ctx;
+};
+
+
+/*
+ * This structure is used to keep delayed transmit operation in a list.
+ * A delayed transmission occurs when application sends tx_data when
+ * the TLS connect/establishment is still in progress. These delayed
+ * transmission will be "flushed" once the socket is connected (either
+ * successfully or with errors).
+ */
+struct delayed_tdata
+{
+    PJ_DECL_LIST_MEMBER(struct delayed_tdata);
+    pjsip_tx_data_op_key    *tdata_op_key;
+};
+
+
+/*
+ * This structure describes the TLS transport, and it's descendant of
+ * pjsip_transport.
+ */
+struct tls_transport
+{
+    pjsip_transport	     base;
+    pj_bool_t		     is_server;
+    struct tls_listener	    *listener;
+    pj_bool_t		     is_registered;
+    pj_bool_t		     is_closing;
+    pj_status_t		     close_reason;
+    pj_sock_t		     sock;
+    pj_ioqueue_key_t	    *key;
+    pj_bool_t		     has_pending_connect;
+
+    /* SSL connection */
+    SSL			    *ssl;
+    pj_bool_t		     ssl_shutdown_called;
+
+    /* TLS transport can only have  one rdata!
+     * Otherwise chunks of incoming PDU may be received on different
+     * buffer.
+     */
+    pjsip_rx_data	     rdata;
+
+    /* Pending transmission list. */
+    struct delayed_tdata     delayed_list;
+};
+
+
+/****************************************************************************
+ * PROTOTYPES
+ */
+
+/* This callback is called when pending accept() operation completes. */
+static void on_accept_complete(	pj_ioqueue_key_t *key, 
+				pj_ioqueue_op_key_t *op_key, 
+				pj_sock_t sock, 
+				pj_status_t status);
+
+/* This callback is called by transport manager to destroy listener */
+static pj_status_t lis_destroy(pjsip_tpfactory *factory);
+
+/* This callback is called by transport manager to create transport */
+static pj_status_t lis_create_transport(pjsip_tpfactory *factory,
+					pjsip_tpmgr *mgr,
+					pjsip_endpoint *endpt,
+					const pj_sockaddr *rem_addr,
+					int addr_len,
+					pjsip_transport **transport);
+
+/* Common function to create and initialize transport */
+static pj_status_t tls_create(struct tls_listener *listener,
+			      pj_pool_t *pool,
+			      pj_sock_t sock, pj_bool_t is_server,
+			      const pj_sockaddr_in *local,
+			      const pj_sockaddr_in *remote,
+			      struct tls_transport **p_tls);
+
+
+/****************************************************************************
+ * SSL FUNCTIONS
+ */
+
+/* ssl_report_error() */
+static void ssl_report_error(const char *sender, int level, 
+			     pj_status_t status,
+			     const char *format, ...)
+{
+    va_list marker;
+
+    va_start(marker, format);
+
+    if (status != PJ_SUCCESS) {
+	char err_format[PJ_ERR_MSG_SIZE + 512];
+	int len;
+
+	len = pj_ansi_snprintf(err_format, sizeof(err_format),
+			       "%s: ", format);
+	pj_strerror(status, err_format+len, sizeof(err_format)-len);
+	
+	pj_log(sender, level, err_format, marker);
+
+    } else {
+	unsigned long ssl_err;
+
+	ssl_err = ERR_get_error();
+
+	if (ssl_err == 0) {
+	    pj_log(sender, level, format, marker);
+	} else {
+	    char err_format[512];
+	    int len;
+
+	    len = pj_ansi_snprintf(err_format, sizeof(err_format),
+				   "%s: ", format);
+	    ERR_error_string(ssl_err, err_format+len);
+	    
+	    pj_log(sender, level, err_format, marker);
+	}
+    }
+
+    va_end(marker);
+}
+
+
+static void sockaddr_to_host_port( pj_pool_t *pool,
+				   pjsip_host_port *host_port,
+				   const pj_sockaddr_in *addr )
+{
+    enum { M = 48 };
+    host_port->host.ptr = pj_pool_alloc(pool, M);
+    host_port->host.slen = pj_ansi_snprintf( host_port->host.ptr, M, "%s", 
+					    pj_inet_ntoa(addr->sin_addr));
+    host_port->port = pj_ntohs(addr->sin_port);
+}
+
+
+/* SSL password callback. */
+static int password_cb(char *buf, int num, int rwflag, void *user_data)
+{
+    struct tls_listener *lis = user_data;
+
+    PJ_UNUSED_ARG(rwflag);
+
+    if(num < lis->setting.password.slen+1)
+	return 0;
+    
+    pj_memcpy(buf, lis->setting.password.ptr, lis->setting.password.slen);
+    return lis->setting.password.slen;
+}
+
+
+/* OpenSSL library initialization counter */
+static int openssl_init_count;
+
+/* Initialize OpenSSL */
+static pj_status_t init_openssl(void)
+{
+    if (++openssl_init_count != 1)
+	return PJ_SUCCESS;
+
+    SSL_library_init();
+    SSL_load_error_strings();
+    OpenSSL_add_all_algorithms();
+
+    return PJ_SUCCESS;
+}
+
+/* Shutdown OpenSSL */
+static void shutdown_openssl(void)
+{
+    if (--openssl_init_count != 0)
+	return;
+}
+
+
+/* Create and initialize new SSL context */
+static pj_status_t create_ctx( struct tls_listener *lis, SSL_CTX **p_ctx)
+{
+    struct pjsip_tls_setting *opt = &lis->setting;
+    char *lis_name = lis->factory.obj_name;
+    SSL_METHOD *ssl_method;
+    SSL_CTX *ctx;
+    int mode, rc;
+        
+    *p_ctx = NULL;
+
+    /* Make sure OpenSSL library has been initialized */
+    init_openssl();
+
+    /* Determine SSL method to use */
+    switch (opt->method) {
+    case PJSIP_SSL_DEFAULT_METHOD:
+    case PJSIP_SSLV23_METHOD:
+	ssl_method = SSLv23_method();
+	break;
+    case PJSIP_TLSV1_METHOD:
+	ssl_method = TLSv1_method();
+	break;
+    case PJSIP_SSLV2_METHOD:
+	ssl_method = SSLv2_method();
+	break;
+    case PJSIP_SSLV3_METHOD:
+	ssl_method = SSLv3_method();
+	break;
+    default:
+	ssl_report_error(lis_name, 4, PJSIP_TLS_EINVMETHOD,
+			 "Error creating SSL context");
+	return PJSIP_TLS_EINVMETHOD;
+    }
+
+    /* Create SSL context for the listener */
+    ctx = SSL_CTX_new(ssl_method);
+    if (ctx == NULL) {
+	ssl_report_error(lis_name, 4, PJ_SUCCESS,
+			 "Error creating SSL context");
+	return PJSIP_TLS_ECTX;
+    }
+
+
+    /* Load CA list if one is specified. */
+    if (opt->ca_list_file.slen) {
+
+	/* Can only take a NULL terminated filename in the setting */
+	pj_assert(opt->ca_list_file.ptr[opt->ca_list_file.slen] == '\0');
+
+	rc = SSL_CTX_load_verify_locations(ctx, opt->ca_list_file.ptr, NULL);
+
+	if (rc != 1) {
+	    ssl_report_error(lis_name, 4, PJ_SUCCESS,
+			     "Error loading/verifying CA list file '%.*s'",
+			     (int)opt->ca_list_file.slen,
+			     opt->ca_list_file.ptr);
+	    SSL_CTX_free(ctx);
+	    return PJSIP_TLS_ECACERT;
+	}
+
+	PJ_LOG(5,(lis_name, "TLS CA file successfully loaded from '%.*s'",
+		  (int)opt->ca_list_file.slen,
+		  opt->ca_list_file.ptr));
+    }
+    
+    /* Set password callback */
+    SSL_CTX_set_default_passwd_cb(ctx, password_cb);
+    SSL_CTX_set_default_passwd_cb_userdata(ctx, lis);
+
+
+    /* Load certificate if one is specified */
+    if (opt->cert_file.slen) {
+
+	/* Can only take a NULL terminated filename in the setting */
+	pj_assert(opt->cert_file.ptr[opt->cert_file.slen] == '\0');
+
+	/* Load certificate chain from file into ctx */
+	rc = SSL_CTX_use_certificate_chain_file(ctx, opt->cert_file.ptr);
+
+	if(rc != 1) {
+	    ssl_report_error(lis_name, 4, PJ_SUCCESS,
+			     "Error loading certificate chain file '%.*s'",
+			     (int)opt->cert_file.slen,
+			     opt->cert_file.ptr);
+	    SSL_CTX_free(ctx);
+	    return PJSIP_TLS_ECERTFILE;
+	}
+
+	PJ_LOG(5,(lis_name, "TLS certificate successfully loaded from '%.*s'",
+		  (int)opt->cert_file.slen,
+		  opt->cert_file.ptr));
+    }
+
+
+    /* Load private key if one is specified */
+    if (opt->privkey_file.slen) {
+
+	/* Can only take a NULL terminated filename in the setting */
+	pj_assert(opt->privkey_file.ptr[opt->privkey_file.slen] == '\0');
+
+	/* Adds the first private key found in file to ctx */
+	rc = SSL_CTX_use_PrivateKey_file(ctx, opt->privkey_file.ptr, 
+					 SSL_FILETYPE_PEM);
+
+	if(rc != 1) {
+	    ssl_report_error(lis_name, 4, PJ_SUCCESS,
+			     "Error adding private key from '%.*s'",
+			     (int)opt->privkey_file.slen,
+			     opt->privkey_file.ptr);
+	    SSL_CTX_free(ctx);
+	    return PJSIP_TLS_EKEYFILE;
+	}
+
+	PJ_LOG(5,(lis_name, "TLS private key successfully loaded from '%.*s'",
+		  (int)opt->privkey_file.slen,
+		  opt->privkey_file.ptr));
+    }
+
+
+    /* SSL verification options */
+    if (lis->setting.verify_client || lis->setting.verify_server) {
+	mode = SSL_VERIFY_PEER;
+	if (lis->setting.require_client_cert)
+	    mode |= SSL_VERIFY_FAIL_IF_NO_PEER_CERT;
+    } else {
+	mode = SSL_VERIFY_NONE;
+    }
+
+    SSL_CTX_set_verify(ctx, mode, NULL);
+
+    PJ_LOG(5,(lis_name, "TLS verification mode set to %d", mode));
+
+    /* Optionally set cipher list if one is specified */
+    if (opt->ciphers.slen) {
+	/* Can only take a NULL terminated cipher list in the setting */
+	pj_assert(opt->cert_file.ptr[opt->cert_file.slen] == '\0');
+
+	rc = SSL_CTX_set_cipher_list(ctx, opt->ciphers.ptr);
+	if (rc != 1) {
+	    ssl_report_error(lis_name, 4, PJ_SUCCESS,
+			     "Error setting cipher list '%.*s'",
+			     (int)opt->ciphers.slen,
+			     opt->ciphers.ptr);
+	    SSL_CTX_free(ctx);
+	    return PJSIP_TLS_ECIPHER;
+	}
+
+	PJ_LOG(5,(lis_name, "TLS ciphers set to '%.*s'",
+		  (int)opt->ciphers.slen,
+		  opt->ciphers.ptr));
+    }
+
+    /* Done! */
+
+    *p_ctx = ctx;
+    return PJ_SUCCESS;
+}
+
+/* Destroy SSL context */
+static void destroy_ctx(SSL_CTX *ctx)
+{
+    SSL_CTX_free(ctx);
+
+    /* Potentially shutdown OpenSSL library if this is the last
+     * context exists.
+     */
+    shutdown_openssl();
+}
+
+/*
+ * Perform SSL_connect upon completion of socket connect()
+ */
+static pj_status_t ssl_connect(struct tls_transport *tls)
+{
+    SSL *ssl = tls->ssl;
+    int status;
+
+    if (SSL_is_init_finished (ssl))
+	return PJ_SUCCESS;
+
+    if (SSL_get_fd(ssl) < 0)
+	SSL_set_fd(ssl, (int)tls->sock);
+
+    if (!SSL_in_connect_init(ssl))
+	SSL_set_connect_state(ssl);
+
+    PJ_LOG(5,(tls->base.obj_name, "Starting SSL_connect() negotiation"));
+
+    do {
+	/* These handle sets are used to set up for whatever SSL_connect
+	 * says it wants next. They're reset on each pass around the loop.
+	 */
+	pj_fd_set_t rd_set;
+	pj_fd_set_t wr_set;
+	
+	PJ_FD_ZERO(&rd_set);
+	PJ_FD_ZERO(&wr_set);
+
+	status = SSL_connect (ssl);
+	switch (SSL_get_error (ssl, status)) {
+        case SSL_ERROR_NONE:
+	    /* Success */
+	    status = 0;
+	    PJ_LOG(5,(tls->base.obj_name, 
+		      "SSL_connect() negotiation completes successfully"));
+	    break;
+
+        case SSL_ERROR_WANT_WRITE:
+	    /* Wait for more activity */
+	    PJ_FD_SET(tls->sock, &wr_set);
+	    status = 1;
+	    break;
+	    
+        case SSL_ERROR_WANT_READ:
+	    /* Wait for more activity */
+	    PJ_FD_SET(tls->sock, &rd_set);
+	    status = 1;
+	    break;
+	    
+        case SSL_ERROR_ZERO_RETURN:
+	    /* The peer has notified us that it is shutting down via
+	     * the SSL "close_notify" message so we need to
+	     * shutdown, too.
+	     */
+	    PJ_LOG(4,(THIS_FILE, "SSL connect() failed, remote has"
+				 "shutdown connection."));
+	    return PJ_STATUS_FROM_OS(OSERR_ENOTCONN);
+	    
+        case SSL_ERROR_SYSCALL:
+	    /* On some platforms (e.g. MS Windows) OpenSSL does not
+	     * store the last error in errno so explicitly do so.
+	     *
+	     * Explicitly check for EWOULDBLOCK since it doesn't get
+	     * converted to an SSL_ERROR_WANT_{READ,WRITE} on some
+	     * platforms. If SSL_connect failed outright, though, don't
+	     * bother checking more. This can happen if the socket gets
+	     * closed during the handshake.
+	     */
+	    if (pj_get_netos_error() == PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK) &&
+		status == -1)
+            {
+		/* Although the SSL_ERROR_WANT_READ/WRITE isn't getting
+		 * set correctly, the read/write state should be valid.
+		 * Use that to decide what to do.
+		 */
+		status = 1;               /* Wait for more activity */
+		if (SSL_want_write (ssl))
+		    PJ_FD_SET(tls->sock, &wr_set);
+		else if (SSL_want_read (ssl))
+		    PJ_FD_SET(tls->sock, &rd_set);
+		else
+		    status = -1;	/* Doesn't want anything - bail out */
+            }
+	    else {
+		status = -1;
+	    }
+	    break;
+
+        default:
+	    ssl_report_error(tls->base.obj_name, 4, PJ_SUCCESS,
+			     "SSL_connect() error");
+	    status = -1;
+	    break;
+        }
+	
+	if (status == 1) {
+	    pj_time_val timeout, *p_timeout;
+
+	    /* Must have at least one handle to wait for at this point. */
+	    pj_assert(PJ_FD_COUNT(&rd_set) == 1 || PJ_FD_COUNT(&wr_set) == 1);
+	    
+	    /* This will block the whole stack!!! */
+	    PJ_TODO(SUPPORT_SSL_ASYNCHRONOUS_CONNECT);
+
+	    if (tls->listener->setting.timeout.sec == 0 &&
+		tls->listener->setting.timeout.msec == 0)
+	    {
+		p_timeout = NULL;
+	    } else {
+		timeout = tls->listener->setting.timeout;
+		p_timeout = &timeout;
+	    }
+
+	    /* Block indefinitely if timeout pointer is zero. */
+	    status = pj_sock_select(tls->sock+1, &rd_set, &wr_set,
+				    NULL, p_timeout);
+	    	    
+	    /* 0 is timeout, so we're done.
+	     * -1 is error, so we're done.
+	     * Could be both handles set (same handle in both masks) so set to 1.
+	     */
+	    if (status >= 1)
+		status = 1;
+	    else if (status == 0)
+		return PJSIP_TLS_ETIMEDOUT;
+	    else
+		status = -1;
+        }
+	
+    } while (status == 1 && !SSL_is_init_finished (ssl));
+        
+    return (status == -1 ? PJSIP_TLS_ECONNECT : PJ_SUCCESS);
+}
+
+
+/*
+ * Perform SSL_accept() on the newly established incoming TLS connection.
+ */
+static pj_status_t ssl_accept(struct tls_transport *tls)
+{
+    SSL *ssl = tls->ssl;
+    int rc;
+    
+    if (SSL_is_init_finished (ssl))
+	return PJ_SUCCESS;
+    
+    if (!SSL_in_accept_init(ssl))
+	SSL_set_accept_state(ssl);
+
+    PJ_LOG(5,(tls->base.obj_name, "Starting SSL_accept() negotiation"));
+
+    /* Repeat retrying SSL_accept() procedure until it completes either
+     * successfully or with failure.
+     */
+    do {
+
+	/* These handle sets are used to set up for whatever SSL_accept says
+	 * it wants next. They're reset on each pass around the loop.
+	 */
+	pj_fd_set_t rd_set;
+	pj_fd_set_t wr_set;
+	
+	PJ_FD_ZERO(&rd_set);
+	PJ_FD_ZERO(&wr_set);
+
+	rc = SSL_accept (ssl);
+
+	switch (SSL_get_error (ssl, rc)) {
+        case SSL_ERROR_NONE:
+	    /* Success! */
+	    rc = 0;
+	    PJ_LOG(5,(tls->base.obj_name, 
+		      "SSL_accept() negotiation completes successfully"));
+	    break;
+	    
+        case SSL_ERROR_WANT_WRITE:
+	    PJ_FD_SET(tls->sock, &wr_set);
+	    rc = 1;               /* Wait for more activity */
+	    break;
+	    
+        case SSL_ERROR_WANT_READ:
+	    PJ_FD_SET(tls->sock, &rd_set);
+	    rc = 1;               /* Need to read more data */
+	    break;
+
+        case SSL_ERROR_ZERO_RETURN:
+	    /* The peer has notified us that it is shutting down via the SSL 
+	     * "close_notify" message so we need to shutdown, too.
+	     */
+	    PJ_LOG(4,(tls->base.obj_name,  
+		      "Incoming SSL connection closed prematurely by client"));
+	    return PJ_STATUS_FROM_OS(OSERR_ENOTCONN);
+
+        case SSL_ERROR_SYSCALL:
+	    /* Explicitly check for EWOULDBLOCK since it doesn't get converted
+	     * to an SSL_ERROR_WANT_{READ,WRITE} on some platforms. 
+	     * If SSL_accept failed outright, though, don't bother checking 
+	     * more. This can happen if the socket gets closed during the 
+	     * handshake.
+	     */
+	    if (pj_get_netos_error()==PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK) 
+		&& rc==-1)
+            {
+		/* Although the SSL_ERROR_WANT_READ/WRITE isn't getting set 
+		 * correctly, the read/write state should be valid. Use that 
+		 * to decide what to do.
+		 */
+		rc = 1;               /* Wait for more activity */
+		if (SSL_want_write(ssl))
+		    PJ_FD_SET(tls->sock, &wr_set);
+		else if (SSL_want_read(ssl))
+		    PJ_FD_SET(tls->sock, &rd_set);
+		else {
+		    /* Doesn't want anything - bail out */
+		    return PJ_STATUS_FROM_OS(OSERR_ENOTCONN);
+		}
+            }
+	    else {
+		return PJSIP_TLS_EUNKNOWN;
+	    }
+	    break;
+	    
+        default:
+	    ssl_report_error(tls->base.obj_name, 4, PJ_SUCCESS,
+			     "Error calling SSL_accept()");
+	    return pj_get_netos_error() ? pj_get_netos_error() : 
+		    PJSIP_TLS_EUNKNOWN;
+        }
+	
+	if (rc == 1) {
+
+	    pj_time_val timeout, *p_timeout;
+
+	    /* Must have at least one handle to wait for at this point. */
+	    pj_assert(PJ_FD_COUNT(&rd_set) == 1 || PJ_FD_COUNT(&wr_set) == 1);
+
+	    if (tls->listener->setting.timeout.sec == 0 &&
+		tls->listener->setting.timeout.msec == 0)
+	    {
+		p_timeout = NULL;
+	    } else {
+		timeout = tls->listener->setting.timeout;
+		p_timeout = &timeout;
+	    }
+
+	    rc = pj_sock_select(tls->sock+1, &rd_set, &wr_set, NULL, 
+			        p_timeout);
+	    
+	    if (rc >= 1)
+		rc = 1;
+	    else if (rc == 0)
+		return PJSIP_TLS_ETIMEDOUT;
+	    else
+		return pj_get_netos_error();
+        }
+	
+    } while (rc == 1 && !SSL_is_init_finished(ssl));
+    
+    return (rc == -1 ? PJSIP_TLS_EUNKNOWN : PJ_SUCCESS);
+}
+
+
+/* Send outgoing data with SSL connection */
+static pj_status_t ssl_write(struct tls_transport *tls,
+			     pjsip_tx_data *tdata)
+{
+    int size = tdata->buf.cur - tdata->buf.start;
+    int sent = 0;
+
+    do {
+	const int fragment_sent = SSL_write(tls->ssl,
+					    tdata->buf.start + sent, 
+					    size - sent);
+    
+	switch( SSL_get_error(tls->ssl, fragment_sent)) {
+	case SSL_ERROR_NONE:
+	    sent += fragment_sent;
+	    break;
+	    
+	case SSL_ERROR_WANT_READ:
+	case SSL_ERROR_WANT_WRITE:
+	    /* For now, we can't handle situation where WANT_READ/WANT_WRITE
+	     * is raised after some data has been sent, since we don't have
+	     * mechanism to keep track of how many bytes have been sent
+	     * inside the individual tdata.
+	     */
+	    pj_assert(sent == 0);
+	    PJ_TODO(PARTIAL_SSL_SENT);
+	    return PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK);
+	    
+	case SSL_ERROR_ZERO_RETURN:
+	    /* The peer has notified us that it is shutting down via the SSL
+	     * "close_notify" message. Tell the transport manager that it
+	     * shouldn't use this transport any more and return ENOTCONN
+	     * to caller.
+	     */
+	    
+	    /* It is safe to call this multiple times. */
+	    pjsip_transport_shutdown(&tls->base);
+
+	    return PJ_STATUS_FROM_OS(OSERR_ENOTCONN);
+	    
+	case SSL_ERROR_SYSCALL:
+	    if (fragment_sent == 0) {
+		/* An EOF occured but the SSL "close_notify" message was not
+		 * sent. Shutdown the transport and return ENOTCONN.
+		 */
+
+		/* It is safe to call this multiple times. */
+		pjsip_transport_shutdown(&tls->base);
+
+		return PJ_STATUS_FROM_OS(OSERR_ENOTCONN);
+	    }
+	    
+	    /* Other error */
+	    return pj_get_netos_error();
+
+	default:
+	    ssl_report_error(tls->base.obj_name, 4, PJ_SUCCESS,
+			     "Error sending %s with SSL_write()",
+			     pjsip_tx_data_get_info(tdata));
+	    return pj_get_netos_error() ? pj_get_netos_error() 
+		    : PJSIP_TLS_ESEND;
+	}
+    
+    } while (sent < size);
+
+    return PJ_SUCCESS;
+}
+
+
+/* Read data from SSL connection */
+static pj_status_t ssl_read(struct tls_transport *tls)
+{
+    pjsip_rx_data *rdata = &tls->rdata;
+
+    int bytes_read, max_size;
+
+    max_size = sizeof(rdata->pkt_info.packet) - rdata->pkt_info.len;
+    bytes_read = SSL_read(tls->ssl, 
+			  rdata->pkt_info.packet+rdata->pkt_info.len,
+                          max_size);
+
+    switch (SSL_get_error(tls->ssl, bytes_read)) {
+    case SSL_ERROR_NONE:
+	/* Data successfully read */
+	rdata->pkt_info.len += bytes_read;
+	return PJ_SUCCESS;
+	
+    case SSL_ERROR_WANT_READ:
+    case SSL_ERROR_WANT_WRITE:
+	return PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK);
+	
+    case SSL_ERROR_ZERO_RETURN:
+	/* The peer has notified us that it is shutting down via the SSL
+	 * "close_notify" message.
+	 */
+	pjsip_transport_shutdown(&tls->base);
+	return PJ_STATUS_FROM_OS(OSERR_ENOTCONN);
+	
+    case SSL_ERROR_SYSCALL:
+	if (bytes_read == 0) {
+	    /* An EOF occured but the SSL "close_notify" message was not
+	     * sent.
+	     */
+	    pjsip_transport_shutdown(&tls->base);
+	    return PJ_STATUS_FROM_OS(OSERR_ENOTCONN);
+	}
+	
+	/* Other error */
+	return pj_get_netos_error();
+	
+    default:
+	ssl_report_error(tls->base.obj_name, 4, PJ_SUCCESS,
+			 "Error reading data with SSL_read()");
+	return pj_get_netos_error() ? pj_get_netos_error() 
+		: PJSIP_TLS_EREAD;
+    }
+
+    /* Should not reach here */
+}
+
+
+/****************************************************************************
+ * The TLS listener/transport factory.
+ */
+
+/*
+ * This is the public API to create, initialize, register, and start the
+ * TLS listener.
+ */
+PJ_DEF(pj_status_t) pjsip_tls_transport_start( pjsip_endpoint *endpt,
+					       const pjsip_tls_setting *opt,
+					       const pj_sockaddr_in *local,
+					       const pjsip_host_port *a_name,
+					       unsigned async_cnt,
+					       pjsip_tpfactory **p_factory)
+{
+    pj_pool_t *pool;
+    struct tls_listener *listener;
+    pj_ioqueue_callback listener_cb;
+    pj_sockaddr_in *listener_addr;
+    int addr_len;
+    unsigned i;
+    pj_status_t status;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(endpt && async_cnt, PJ_EINVAL);
+
+    /* Verify that address given in a_name (if any) is valid */
+    if (a_name && a_name->host.slen) {
+	pj_sockaddr_in tmp;
+
+	status = pj_sockaddr_in_init(&tmp, &a_name->host, 
+				     (pj_uint16_t)a_name->port);
+	if (status != PJ_SUCCESS || tmp.sin_addr.s_addr == PJ_INADDR_ANY ||
+	    tmp.sin_addr.s_addr == PJ_INADDR_NONE)
+	{
+	    /* Invalid address */
+	    return PJ_EINVAL;
+	}
+    }
+
+    pool = pjsip_endpt_create_pool(endpt, "tlslis", POOL_LIS_INIT, 
+				   POOL_LIS_INC);
+    PJ_ASSERT_RETURN(pool, PJ_ENOMEM);
+
+
+    listener = pj_pool_zalloc(pool, sizeof(struct tls_listener));
+    listener->factory.pool = pool;
+    listener->factory.type = PJSIP_TRANSPORT_TLS;
+    listener->factory.type_name = "tls";
+    listener->factory.flag = 
+	pjsip_transport_get_flag_from_type(PJSIP_TRANSPORT_TLS);
+    listener->sock = PJ_INVALID_SOCKET;
+    
+    /* Create object name */
+    pj_ansi_snprintf(listener->factory.obj_name, 
+		     sizeof(listener->factory.obj_name),
+		     "tls%p",  listener);
+    
+    /* Create duplicate of TLS settings */
+    if (opt)
+	pjsip_tls_setting_copy(pool, &listener->setting, opt);
+    else
+	pjsip_tls_setting_default(&listener->setting);
+
+    /* Initialize SSL context to be used by this listener */
+    status = create_ctx(listener, &listener->ctx);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    status = pj_lock_create_recursive_mutex(pool, "tlslis", 
+					    &listener->factory.lock);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+
+    /* Create and bind socket */
+    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &listener->sock);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    listener_addr = (pj_sockaddr_in*)&listener->factory.local_addr;
+    if (local) {
+	pj_memcpy(listener_addr, local, sizeof(pj_sockaddr_in));
+    } else {
+	pj_sockaddr_in_init(listener_addr, NULL, 0);
+    }
+
+    status = pj_sock_bind(listener->sock, listener_addr, 
+			  sizeof(pj_sockaddr_in));
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Retrieve the bound address */
+    addr_len = sizeof(pj_sockaddr_in);
+    status = pj_sock_getsockname(listener->sock, listener_addr, &addr_len);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* If published host/IP is specified, then use that address as the
+     * listener advertised address.
+     */
+    if (a_name && a_name->host.slen) {
+	/* Copy the address */
+	listener->factory.addr_name = *a_name;
+	pj_strdup(listener->factory.pool, &listener->factory.addr_name.host, 
+		  &a_name->host);
+	listener->factory.addr_name.port = a_name->port;
+
+    } else {
+	/* No published address is given, use the bound address */
+
+	/* If the address returns 0.0.0.0, use the default
+	 * interface address as the transport's address.
+	 */
+	if (listener_addr->sin_addr.s_addr == 0) {
+	    pj_in_addr hostip;
+
+	    status = pj_gethostip(&hostip);
+	    if (status != PJ_SUCCESS)
+		goto on_error;
+
+	    listener_addr->sin_addr = hostip;
+	}
+
+	/* Save the address name */
+	sockaddr_to_host_port(listener->factory.pool, 
+			      &listener->factory.addr_name, listener_addr);
+    }
+
+    /* If port is zero, get the bound port */
+    if (listener->factory.addr_name.port == 0) {
+	listener->factory.addr_name.port = pj_ntohs(listener_addr->sin_port);
+    }
+
+    /* Start listening to the address */
+    status = pj_sock_listen(listener->sock, PJSIP_TLS_TRANSPORT_BACKLOG);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+
+    /* Register socket to ioqeuue */
+    pj_bzero(&listener_cb, sizeof(listener_cb));
+    listener_cb.on_accept_complete = &on_accept_complete;
+    status = pj_ioqueue_register_sock(pool, pjsip_endpt_get_ioqueue(endpt),
+				      listener->sock, listener,
+				      &listener_cb, &listener->key);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Register to transport manager */
+    listener->endpt = endpt;
+    listener->tpmgr = pjsip_endpt_get_tpmgr(endpt);
+    listener->factory.create_transport = lis_create_transport;
+    listener->factory.destroy = lis_destroy;
+    listener->is_registered = PJ_TRUE;
+    status = pjsip_tpmgr_register_tpfactory(listener->tpmgr,
+					    &listener->factory);
+    if (status != PJ_SUCCESS) {
+	listener->is_registered = PJ_FALSE;
+	goto on_error;
+    }
+
+
+    /* Start pending accept() operations */
+    if (async_cnt > MAX_ASYNC_CNT) async_cnt = MAX_ASYNC_CNT;
+    listener->async_cnt = async_cnt;
+
+    for (i=0; i<async_cnt; ++i) {
+	pj_pool_t *pool;
+
+	pool = pjsip_endpt_create_pool(endpt, "tlss%p", POOL_TP_INIT, 
+				       POOL_TP_INIT);
+	if (!pool) {
+	    status = PJ_ENOMEM;
+	    goto on_error;
+	}
+
+	listener->accept_op[i] = pj_pool_zalloc(pool, 
+						sizeof(struct pending_accept));
+	pj_ioqueue_op_key_init(&listener->accept_op[i]->op_key, 
+				sizeof(listener->accept_op[i]->op_key));
+	listener->accept_op[i]->pool = pool;
+	listener->accept_op[i]->listener = listener;
+	listener->accept_op[i]->index = i;
+
+	on_accept_complete(listener->key, &listener->accept_op[i]->op_key,
+			   listener->sock, PJ_EPENDING);
+    }
+
+    PJ_LOG(4,(listener->factory.obj_name, 
+	     "SIP TLS listener ready for incoming connections at %.*s:%d",
+	     (int)listener->factory.addr_name.host.slen,
+	     listener->factory.addr_name.host.ptr,
+	     listener->factory.addr_name.port));
+
+    /* Return the pointer to user */
+    if (p_factory) *p_factory = &listener->factory;
+
+    return PJ_SUCCESS;
+
+on_error:
+    lis_destroy(&listener->factory);
+    return status;
+}
+
+
+/* This callback is called by transport manager to destroy listener */
+static pj_status_t lis_destroy(pjsip_tpfactory *factory)
+{
+    struct tls_listener *listener = (struct tls_listener *)factory;
+    unsigned i;
+
+    if (listener->is_registered) {
+	pjsip_tpmgr_unregister_tpfactory(listener->tpmgr, &listener->factory);
+	listener->is_registered = PJ_FALSE;
+    }
+
+    if (listener->key) {
+	pj_ioqueue_unregister(listener->key);
+	listener->key = NULL;
+	listener->sock = PJ_INVALID_SOCKET;
+    }
+
+    if (listener->sock != PJ_INVALID_SOCKET) {
+	pj_sock_close(listener->sock);
+	listener->sock = PJ_INVALID_SOCKET;
+    }
+
+    if (listener->factory.lock) {
+	pj_lock_destroy(listener->factory.lock);
+	listener->factory.lock = NULL;
+    }
+
+    for (i=0; i<PJ_ARRAY_SIZE(listener->accept_op); ++i) {
+	if (listener->accept_op[i] && listener->accept_op[i]->pool) {
+	    pj_pool_t *pool = listener->accept_op[i]->pool;
+	    listener->accept_op[i]->pool = NULL;
+	    pj_pool_release(pool);
+	}
+    }
+
+    if (listener->ctx) {
+	destroy_ctx(listener->ctx);
+	listener->ctx = NULL;
+    }
+
+    if (listener->factory.pool) {
+	pj_pool_t *pool = listener->factory.pool;
+
+	PJ_LOG(4,(listener->factory.obj_name,  "SIP TLS listener destroyed"));
+
+	listener->factory.pool = NULL;
+	pj_pool_release(pool);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/***************************************************************************/
+/*
+ * TLS Transport
+ */
+
+/*
+ * Prototypes.
+ */
+/* Called by transport manager to send message */
+static pj_status_t tls_send_msg(pjsip_transport *transport, 
+				pjsip_tx_data *tdata,
+				const pj_sockaddr_t *rem_addr,
+				int addr_len,
+				void *token,
+				void (*callback)(pjsip_transport *transport,
+						 void *token, 
+						 pj_ssize_t sent_bytes));
+
+/* Called by transport manager to shutdown */
+static pj_status_t tls_shutdown(pjsip_transport *transport);
+
+/* Called by transport manager to destroy transport */
+static pj_status_t tls_destroy_transport(pjsip_transport *transport);
+
+/* Utility to destroy transport */
+static pj_status_t tls_destroy(pjsip_transport *transport,
+			       pj_status_t reason);
+
+/* Callback from ioqueue on incoming packet */
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read);
+
+/* Callback from ioqueue when packet is sent */
+static void on_write_complete(pj_ioqueue_key_t *key, 
+                              pj_ioqueue_op_key_t *op_key, 
+                              pj_ssize_t bytes_sent);
+
+/* Callback from ioqueue when connect completes */
+static void on_connect_complete(pj_ioqueue_key_t *key, 
+                                pj_status_t status);
+
+
+/*
+ * Common function to create TLS transport, called when pending accept() and
+ * pending connect() complete.
+ */
+static pj_status_t tls_create( struct tls_listener *listener,
+			       pj_pool_t *pool,
+			       pj_sock_t sock, pj_bool_t is_server,
+			       const pj_sockaddr_in *local,
+			       const pj_sockaddr_in *remote,
+			       struct tls_transport **p_tls)
+{
+    struct tls_transport *tls;
+    pj_ioqueue_t *ioqueue;
+    pj_ioqueue_callback tls_callback;
+    int rc;
+    pj_status_t status;
+    
+
+    PJ_ASSERT_RETURN(sock != PJ_INVALID_SOCKET, PJ_EINVAL);
+
+
+    if (pool == NULL) {
+	pool = pjsip_endpt_create_pool(listener->endpt, "tls",
+				       POOL_TP_INIT, POOL_TP_INC);
+	PJ_ASSERT_RETURN(pool != NULL, PJ_ENOMEM);
+    }    
+
+    /*
+     * Create and initialize basic transport structure.
+     */
+    tls = pj_pool_zalloc(pool, sizeof(*tls));
+    tls->sock = sock;
+    tls->is_server = is_server;
+    tls->listener = listener;
+    pj_list_init(&tls->delayed_list);
+    tls->base.pool = pool;
+
+    pj_ansi_snprintf(tls->base.obj_name, PJ_MAX_OBJ_NAME, 
+		     (is_server ? "tlss%p" :"tlsc%p"), tls);
+
+    /* Initialize transport reference counter to 1 */
+    status = pj_atomic_create(pool, 1, &tls->base.ref_cnt);
+    if (status != PJ_SUCCESS) {
+	goto on_error;
+    }
+
+    status = pj_lock_create_recursive_mutex(pool, "tls", &tls->base.lock);
+    if (status != PJ_SUCCESS) {
+	goto on_error;
+    }
+
+    tls->base.key.type = PJSIP_TRANSPORT_TLS;
+    pj_memcpy(&tls->base.key.rem_addr, remote, sizeof(pj_sockaddr_in));
+    tls->base.type_name = "tls";
+    tls->base.flag = pjsip_transport_get_flag_from_type(PJSIP_TRANSPORT_TLS);
+
+    tls->base.info = pj_pool_alloc(pool, 64);
+    pj_ansi_snprintf(tls->base.info, 64, "TLS to %s:%d",
+		     pj_inet_ntoa(remote->sin_addr), 
+		     (int)pj_ntohs(remote->sin_port));
+
+    tls->base.addr_len = sizeof(pj_sockaddr_in);
+    pj_memcpy(&tls->base.local_addr, local, sizeof(pj_sockaddr_in));
+    sockaddr_to_host_port(pool, &tls->base.local_name, local);
+    sockaddr_to_host_port(pool, &tls->base.remote_name, remote);
+
+    tls->base.endpt = listener->endpt;
+    tls->base.tpmgr = listener->tpmgr;
+    tls->base.send_msg = &tls_send_msg;
+    tls->base.do_shutdown = &tls_shutdown;
+    tls->base.destroy = &tls_destroy_transport;
+
+    /* Create SSL connection object */
+    tls->ssl = SSL_new(listener->ctx);
+    if (tls->ssl == NULL) {
+	ssl_report_error(tls->base.obj_name, 4, PJ_SUCCESS,
+			 "Error creating SSL connection object");
+	status = PJSIP_TLS_ESSLCONN;
+	goto on_error;
+    }
+
+    /* Associate network socket with SSL connection object */
+    rc = SSL_set_fd(tls->ssl, (int)sock);
+    if (rc != 1) {
+	ssl_report_error(tls->base.obj_name, 4, PJ_SUCCESS,
+			 "Error calling SSL_set_fd");
+	status = PJSIP_TLS_ESSLCONN;
+	goto on_error;
+    }
+
+    /* Register socket to ioqueue */
+    pj_bzero(&tls_callback, sizeof(pj_ioqueue_callback));
+    tls_callback.on_read_complete = &on_read_complete;
+    tls_callback.on_write_complete = &on_write_complete;
+    tls_callback.on_connect_complete = &on_connect_complete;
+
+    ioqueue = pjsip_endpt_get_ioqueue(listener->endpt);
+    status = pj_ioqueue_register_sock(pool, ioqueue, sock, 
+				      tls, &tls_callback, &tls->key);
+    if (status != PJ_SUCCESS) {
+	goto on_error;
+    }
+
+    /* Register transport to transport manager */
+    status = pjsip_transport_register(listener->tpmgr, &tls->base);
+    if (status != PJ_SUCCESS) {
+	goto on_error;
+    }
+
+    tls->is_registered = PJ_TRUE;
+
+    /* Done setting up basic transport. */
+    *p_tls = tls;
+
+    PJ_LOG(4,(tls->base.obj_name, "TLS %s transport created",
+	      (tls->is_server ? "server" : "client")));
+
+    return PJ_SUCCESS;
+
+on_error:
+    tls_destroy(&tls->base, status);
+    return status;
+}
+
+
+/* Flush all delayed transmision once the socket is connected. 
+ * Return non-zero if pending transmission list is empty after
+ * the function returns.
+ */
+static pj_bool_t tls_flush_pending_tx(struct tls_transport *tls)
+{
+    pj_bool_t empty;
+
+    pj_lock_acquire(tls->base.lock);
+    while (!pj_list_empty(&tls->delayed_list)) {
+	struct delayed_tdata *pending_tx;
+	pjsip_tx_data *tdata;
+	pj_ioqueue_op_key_t *op_key;
+	pj_ssize_t size;
+	pj_status_t status;
+
+	pending_tx = tls->delayed_list.next;
+
+	tdata = pending_tx->tdata_op_key->tdata;
+	op_key = (pj_ioqueue_op_key_t*)pending_tx->tdata_op_key;
+
+	/* send the txdata */
+	status = ssl_write(tls, tdata);
+
+	/* On EWOULDBLOCK, suspend further transmissions */
+	if (status == PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK)) {
+	    break;
+	}
+
+	/* tdata has been transmitted (successfully or with failure).
+	 * In any case, remove it from pending transmission list.
+	 */
+	pj_list_erase(pending_tx);
+
+	/* Notify callback */
+	if (status == PJ_SUCCESS)
+	    size = tdata->buf.cur - tdata->buf.start;
+	else
+	    size = -status;
+
+	on_write_complete(tls->key, op_key, size);
+
+    }
+
+    empty = pj_list_empty(&tls->delayed_list);
+
+    pj_lock_release(tls->base.lock);
+
+    return empty;
+}
+
+
+/* Called by transport manager to destroy transport */
+static pj_status_t tls_destroy_transport(pjsip_transport *transport)
+{
+    struct tls_transport *tls = (struct tls_transport*)transport;
+
+    /* Transport would have been unregistered by now since this callback
+     * is called by transport manager.
+     */
+    tls->is_registered = PJ_FALSE;
+
+    return tls_destroy(transport, tls->close_reason);
+}
+
+
+/* Destroy TLS transport */
+static pj_status_t tls_destroy(pjsip_transport *transport, 
+			       pj_status_t reason)
+{
+    struct tls_transport *tls = (struct tls_transport*)transport;
+
+    if (tls->close_reason == 0)
+	tls->close_reason = reason;
+
+    if (tls->is_registered) {
+	tls->is_registered = PJ_FALSE;
+	pjsip_transport_destroy(transport);
+
+	/* pjsip_transport_destroy will recursively call this function
+	 * again.
+	 */
+	return PJ_SUCCESS;
+    }
+
+    /* Mark transport as closing */
+    ++tls->is_closing;
+
+    /* Cancel all delayed transmits */
+    while (!pj_list_empty(&tls->delayed_list)) {
+	struct delayed_tdata *pending_tx;
+	pj_ioqueue_op_key_t *op_key;
+
+	pending_tx = tls->delayed_list.next;
+	pj_list_erase(pending_tx);
+
+	op_key = (pj_ioqueue_op_key_t*)pending_tx->tdata_op_key;
+
+	on_write_complete(tls->key, op_key, -reason);
+    }
+
+    if (tls->rdata.tp_info.pool) {
+	pj_pool_release(tls->rdata.tp_info.pool);
+	tls->rdata.tp_info.pool = NULL;
+    }
+
+    if (tls->key) {
+	pj_ioqueue_unregister(tls->key);
+	tls->key = NULL;
+	tls->sock = PJ_INVALID_SOCKET;
+    }
+
+    if (tls->sock != PJ_INVALID_SOCKET) {
+	pj_sock_close(tls->sock);
+	tls->sock = PJ_INVALID_SOCKET;
+    }
+
+    if (tls->base.lock) {
+	pj_lock_destroy(tls->base.lock);
+	tls->base.lock = NULL;
+    }
+
+    if (tls->base.ref_cnt) {
+	pj_atomic_destroy(tls->base.ref_cnt);
+	tls->base.ref_cnt = NULL;
+    }
+
+    if (tls->ssl) {
+	SSL_free(tls->ssl);
+	tls->ssl = NULL;
+    }
+
+    if (tls->base.pool) {
+	pj_pool_t *pool;
+
+	if (reason != PJ_SUCCESS) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+
+	    pj_strerror(reason, errmsg, sizeof(errmsg));
+	    PJ_LOG(4,(tls->base.obj_name, 
+		      "TLS transport destroyed with reason %d: %s", 
+		      reason, errmsg));
+
+	} else {
+
+	    PJ_LOG(4,(tls->base.obj_name, 
+		      "TLS transport destroyed normally"));
+
+	}
+
+	pool = tls->base.pool;
+	tls->base.pool = NULL;
+	pj_pool_release(pool);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * This utility function creates receive data buffers and start
+ * asynchronous recv() operations from the socket. It is called after
+ * accept() or connect() operation complete.
+ */
+static pj_status_t tls_start_read(struct tls_transport *tls)
+{
+    pj_pool_t *pool;
+    pj_ssize_t size;
+    pj_sockaddr_in *rem_addr;
+    pj_status_t status;
+
+    /* Init rdata */
+    pool = pjsip_endpt_create_pool(tls->listener->endpt,
+				   "rtd%p",
+				   PJSIP_POOL_RDATA_LEN,
+				   PJSIP_POOL_RDATA_INC);
+    if (!pool) {
+	ssl_report_error(tls->base.obj_name, 4, PJ_ENOMEM, 
+			 "Unable to create pool for listener rxdata");
+	return PJ_ENOMEM;
+    }
+
+    tls->rdata.tp_info.pool = pool;
+
+    tls->rdata.tp_info.transport = &tls->base;
+    tls->rdata.tp_info.tp_data = tls;
+    tls->rdata.tp_info.op_key.rdata = &tls->rdata;
+    pj_ioqueue_op_key_init(&tls->rdata.tp_info.op_key.op_key, 
+			   sizeof(pj_ioqueue_op_key_t));
+
+    tls->rdata.pkt_info.src_addr = tls->base.key.rem_addr;
+    tls->rdata.pkt_info.src_addr_len = sizeof(pj_sockaddr_in);
+    rem_addr = (pj_sockaddr_in*) &tls->base.key.rem_addr;
+    pj_ansi_strcpy(tls->rdata.pkt_info.src_name,
+		   pj_inet_ntoa(rem_addr->sin_addr));
+    tls->rdata.pkt_info.src_port = pj_ntohs(rem_addr->sin_port);
+
+    /* Here's the real trick with OpenSSL.
+     * Since asynchronous socket operation with OpenSSL uses select() like
+     * mechanism, it's not really compatible with PJLIB's ioqueue. So to
+     * make them "talk" together, we simulate select() by using MSG_PEEK
+     * when we call pj_ioqueue_recv().
+     */
+    size = 1;
+    status = pj_ioqueue_recv(tls->key, &tls->rdata.tp_info.op_key.op_key,
+			     tls->rdata.pkt_info.packet, &size,
+			     PJ_IOQUEUE_ALWAYS_ASYNC | PJ_MSG_PEEK);
+    if (status != PJ_SUCCESS && status != PJ_EPENDING) {
+	ssl_report_error(tls->base.obj_name, 4, status,
+			 "ioqueue_recv() error");
+	return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+
+/* This callback is called by transport manager for the TLS factory
+ * to create outgoing transport to the specified destination.
+ */
+static pj_status_t lis_create_transport(pjsip_tpfactory *factory,
+					pjsip_tpmgr *mgr,
+					pjsip_endpoint *endpt,
+					const pj_sockaddr *rem_addr,
+					int addr_len,
+					pjsip_transport **p_transport)
+{
+    struct tls_listener *listener;
+    struct tls_transport *tls;
+    pj_sock_t sock;
+    pj_sockaddr_in local_addr;
+    pj_status_t status;
+
+    /* Sanity checks */
+    PJ_ASSERT_RETURN(factory && mgr && endpt && rem_addr &&
+		     addr_len && p_transport, PJ_EINVAL);
+
+    /* Check that address is a sockaddr_in */
+    PJ_ASSERT_RETURN(rem_addr->addr.sa_family == PJ_AF_INET &&
+		     addr_len == sizeof(pj_sockaddr_in), PJ_EINVAL);
+
+
+    listener = (struct tls_listener*)factory;
+
+    
+    /* Create socket */
+    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_STREAM, 0, &sock);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Bind to any port */
+    status = pj_sock_bind_in(sock, 0, 0);
+    if (status != PJ_SUCCESS) {
+	pj_sock_close(sock);
+	return status;
+    }
+
+    /* Get the local port */
+    addr_len = sizeof(pj_sockaddr_in);
+    status = pj_sock_getsockname(sock, &local_addr, &addr_len);
+    if (status != PJ_SUCCESS) {
+	pj_sock_close(sock);
+	return status;
+    }
+
+    /* Initially set the address from the listener's address */
+    local_addr.sin_addr.s_addr = 
+	((pj_sockaddr_in*)&listener->factory.local_addr)->sin_addr.s_addr;
+
+    /* Create the transport descriptor */
+    status = tls_create(listener, NULL, sock, PJ_FALSE, &local_addr, 
+			(pj_sockaddr_in*)rem_addr, &tls);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    /* Start asynchronous connect() operation */
+    tls->has_pending_connect = PJ_TRUE;
+    status = pj_ioqueue_connect(tls->key, rem_addr, sizeof(pj_sockaddr_in));
+    if (status == PJ_SUCCESS) {
+
+	/* Immediate socket connect() ! */
+	tls->has_pending_connect = PJ_FALSE;
+
+	/* Perform SSL_connect() */
+	status = ssl_connect(tls);
+	if (status != PJ_SUCCESS) {
+	    tls_destroy(&tls->base, status);
+	    return status;
+	}
+
+    } else if (status != PJ_EPENDING) {
+	tls_destroy(&tls->base, status);
+	return status;
+    }
+
+    /* Update (again) local address, just in case local address currently
+     * set is different now that asynchronous connect() is started.
+     */
+    addr_len = sizeof(pj_sockaddr_in);
+    if (pj_sock_getsockname(tls->sock, &local_addr, &addr_len)==PJ_SUCCESS) {
+	pj_sockaddr_in *tp_addr = (pj_sockaddr_in*)&tls->base.local_addr;
+
+	/* Some systems (like old Win32 perhaps) may not set local address
+	 * properly before socket is fully connected.
+	 */
+	if (tp_addr->sin_addr.s_addr != local_addr.sin_addr.s_addr &&
+	    local_addr.sin_addr.s_addr != 0) 
+	{
+	    tp_addr->sin_addr.s_addr = local_addr.sin_addr.s_addr;
+	    tp_addr->sin_port = local_addr.sin_port;
+	    sockaddr_to_host_port(tls->base.pool, &tls->base.local_name,
+				  &local_addr);
+	}
+    }
+
+    if (tls->has_pending_connect) {
+	PJ_LOG(4,(tls->base.obj_name, 
+		  "TLS transport %.*s:%d is connecting to %.*s:%d...",
+		  (int)tls->base.local_name.host.slen,
+		  tls->base.local_name.host.ptr,
+		  tls->base.local_name.port,
+		  (int)tls->base.remote_name.host.slen,
+		  tls->base.remote_name.host.ptr,
+		  tls->base.remote_name.port));
+    }
+
+    /* Done */
+    *p_transport = &tls->base;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * This callback is called by ioqueue when pending accept() operation has
+ * completed.
+ */
+static void on_accept_complete(	pj_ioqueue_key_t *key, 
+				pj_ioqueue_op_key_t *op_key, 
+				pj_sock_t sock, 
+				pj_status_t status)
+{
+    struct tls_listener *listener;
+    struct tls_transport *tls;
+    struct pending_accept *accept_op;
+    int err_cnt = 0;
+
+    listener = pj_ioqueue_get_user_data(key);
+    accept_op = (struct pending_accept*) op_key;
+
+    /*
+     * Loop while there is immediate connection or when there is error.
+     */
+    do {
+	if (status == PJ_EPENDING) {
+	    /*
+	     * This can only happen when this function is called during
+	     * initialization to kick off asynchronous accept().
+	     */
+
+	} else if (status != PJ_SUCCESS) {
+
+	    /*
+	     * Error in accept().
+	     */
+	    ssl_report_error(listener->factory.obj_name, 4, status,
+			     "Error in asynchronous accept() completion");
+
+	    /*
+	     * Prevent endless accept() error loop by limiting the
+	     * number of consecutive errors. Once the number of errors
+	     * is equal to maximum, we treat this as permanent error, and
+	     * we stop the accept() operation.
+	     */
+	    ++err_cnt;
+	    if (err_cnt >= 10) {
+		PJ_LOG(1, (listener->factory.obj_name, 
+			   "Too many errors, listener stopping"));
+	    }
+
+	} else {
+	    pj_pool_t *pool;
+	    struct pending_accept *new_op;
+
+	    if (sock == PJ_INVALID_SOCKET) {
+		sock = accept_op->new_sock;
+	    }
+
+	    if (sock == PJ_INVALID_SOCKET) {
+		pj_assert(!"Should not happen. status should be error");
+		goto next_accept;
+	    }
+
+	    PJ_LOG(4,(listener->factory.obj_name, 
+		      "TLS listener %.*s:%d: got incoming TCP connection "
+		      "from %s:%d, sock=%d",
+		      (int)listener->factory.addr_name.host.slen,
+		      listener->factory.addr_name.host.ptr,
+		      listener->factory.addr_name.port,
+		      pj_inet_ntoa(accept_op->remote_addr.sin_addr),
+		      pj_ntohs(accept_op->remote_addr.sin_port),
+		      sock));
+
+	    /* Create new accept_opt */
+	    pool = pjsip_endpt_create_pool(listener->endpt, "tlss%p", 
+					   POOL_TP_INIT, POOL_TP_INC);
+	    new_op = pj_pool_zalloc(pool, sizeof(struct pending_accept));
+	    new_op->pool = pool;
+	    new_op->listener = listener;
+	    new_op->index = accept_op->index;
+	    pj_ioqueue_op_key_init(&new_op->op_key, sizeof(new_op->op_key));
+	    listener->accept_op[accept_op->index] = new_op;
+
+	    /* 
+	     * Incoming connections!
+	     * Create TLS transport for the new socket.
+	     */
+	    status = tls_create( listener, accept_op->pool, sock, PJ_TRUE,
+				 &accept_op->local_addr, 
+				 &accept_op->remote_addr, &tls);
+	    if (status == PJ_SUCCESS) {
+		/* Complete SSL_accept() */
+		status = ssl_accept(tls);
+	    }
+
+	    if (status == PJ_SUCCESS) {
+		/* Start asynchronous read from the socket */
+		status = tls_start_read(tls);
+	    }
+
+	    if (status != PJ_SUCCESS) {
+		ssl_report_error(tls->base.obj_name, 4, status,
+				 "Error creating incoming TLS transport");
+		pjsip_transport_shutdown(&tls->base);
+	    }
+
+	    accept_op = new_op;
+	}
+
+next_accept:
+	/*
+	 * Start the next asynchronous accept() operation.
+	 */
+	accept_op->addr_len = sizeof(pj_sockaddr_in);
+	accept_op->new_sock = PJ_INVALID_SOCKET;
+
+	status = pj_ioqueue_accept(listener->key, 
+				   &accept_op->op_key,
+				   &accept_op->new_sock,
+				   &accept_op->local_addr,
+				   &accept_op->remote_addr,
+				   &accept_op->addr_len);
+
+	/*
+	 * Loop while we have immediate connection or when there is error.
+	 */
+
+    } while (status != PJ_EPENDING);
+}
+
+
+/* 
+ * Callback from ioqueue when packet is sent.
+ */
+static void on_write_complete(pj_ioqueue_key_t *key, 
+                              pj_ioqueue_op_key_t *op_key, 
+                              pj_ssize_t bytes_sent)
+{
+    struct tls_transport *tls = pj_ioqueue_get_user_data(key);
+    pjsip_tx_data_op_key *tdata_op_key = (pjsip_tx_data_op_key*)op_key;
+
+    tdata_op_key->tdata = NULL;
+
+    /* Check for error/closure */
+    if (bytes_sent <= 0) {
+	pj_status_t status;
+
+	ssl_report_error(tls->base.obj_name, 4, -bytes_sent, 
+		         "TLS send() error");
+
+	status = (bytes_sent == 0) ? PJ_STATUS_FROM_OS(OSERR_ENOTCONN) :
+				     -bytes_sent;
+	if (tls->close_reason==PJ_SUCCESS) tls->close_reason = status;
+	pjsip_transport_shutdown(&tls->base);
+    }
+
+    if (tdata_op_key->callback) {
+	/*
+	 * Notify sip_transport.c that packet has been sent.
+	 */
+	tdata_op_key->callback(&tls->base, tdata_op_key->token, bytes_sent);
+    }
+}
+
+
+/* Add tdata to pending list */
+static void add_pending_tx(struct tls_transport *tls,
+			   pjsip_tx_data *tdata)
+{
+    struct delayed_tdata *delayed_tdata;
+
+    delayed_tdata = pj_pool_alloc(tdata->pool, 
+				  sizeof(*delayed_tdata));
+    delayed_tdata->tdata_op_key = &tdata->op_key;
+    pj_list_push_back(&tls->delayed_list, delayed_tdata);
+}
+
+
+/* 
+ * This callback is called by transport manager to send SIP message 
+ */
+static pj_status_t tls_send_msg(pjsip_transport *transport, 
+				pjsip_tx_data *tdata,
+				const pj_sockaddr_t *rem_addr,
+				int addr_len,
+				void *token,
+				void (*callback)(pjsip_transport *transport,
+						 void *token, 
+						 pj_ssize_t sent_bytes))
+{
+    struct tls_transport *tls = (struct tls_transport*)transport;
+    pj_ssize_t size;
+    pj_bool_t delayed = PJ_FALSE;
+    pj_status_t status = PJ_SUCCESS;
+
+    /* Sanity check */
+    PJ_ASSERT_RETURN(transport && tdata, PJ_EINVAL);
+
+    /* Check that there's no pending operation associated with the tdata */
+    PJ_ASSERT_RETURN(tdata->op_key.tdata == NULL, PJSIP_EPENDINGTX);
+    
+    /* Check the address is supported */
+    PJ_ASSERT_RETURN(rem_addr && addr_len==sizeof(pj_sockaddr_in), PJ_EINVAL);
+
+
+
+    /* Init op key. */
+    tdata->op_key.tdata = tdata;
+    tdata->op_key.token = token;
+    tdata->op_key.callback = callback;
+
+    /* If asynchronous connect() has not completed yet, just put the
+     * transmit data in the pending transmission list since we can not
+     * use the socket yet.
+     */
+    if (tls->has_pending_connect) {
+
+	/*
+	 * Looks like connect() is still in progress. Check again (this time
+	 * with holding the lock) to be sure.
+	 */
+	pj_lock_acquire(tls->base.lock);
+
+	if (tls->has_pending_connect) {
+	    /*
+	     * connect() is still in progress. Put the transmit data to
+	     * the delayed list.
+	     */
+	    add_pending_tx(tls, tdata);
+	    status = PJ_EPENDING;
+
+	    /* Prevent ssl_write() to be called below */
+	    delayed = PJ_TRUE;
+	}
+
+	pj_lock_release(tls->base.lock);
+    } 
+    
+    if (!delayed) {
+
+	pj_bool_t no_pending_tx;
+
+	/* Make sure that we've flushed pending tx first so that
+	 * stream is in order.
+	 */
+	no_pending_tx = tls_flush_pending_tx(tls);
+
+	/* Send data immediately with SSL_write() if we don't have
+	 * pending data in our list.
+	 */
+	if (no_pending_tx) {
+
+	    status = ssl_write(tls, tdata);
+
+	    /* On EWOULDBLOCK, put this tdata in the list */
+	    if (status == PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK)) {
+		add_pending_tx(tls, tdata);
+		status = PJ_EPENDING;
+	    }
+
+	    if (status != PJ_EPENDING) {
+		/* Not pending (could be immediate success or error) */
+		tdata->op_key.tdata = NULL;
+
+		/* Shutdown transport on closure/errors */
+		if (status != PJ_SUCCESS) {
+		    size = -status;
+
+		    ssl_report_error(tls->base.obj_name, 4, status,
+				     "TLS send() error");
+
+		    if (tls->close_reason==PJ_SUCCESS) tls->close_reason = status;
+		    pjsip_transport_shutdown(&tls->base);
+		}
+	    }
+
+	} else {
+	    /* We have pending data in our list, so queue the txdata
+	     * in the pending tx list.
+	     */
+	    add_pending_tx(tls, tdata);
+	    status = PJ_EPENDING;
+	}
+    }
+
+    return status;
+}
+
+
+/* 
+ * This callback is called by transport manager to shutdown transport.
+ * This normally is only used by UDP transport.
+ */
+static pj_status_t tls_shutdown(pjsip_transport *transport)
+{
+    struct tls_transport *tls = (struct tls_transport*)transport;
+
+    /* Shutdown SSL */
+    if (!tls->ssl_shutdown_called) {
+	/* Release our reference counter and shutdown SSL */
+	pjsip_transport_dec_ref(transport);
+	SSL_shutdown(tls->ssl);
+	tls->ssl_shutdown_called = PJ_TRUE;
+
+	PJ_LOG(4,(transport->obj_name, "TLS transport shutdown"));
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/* 
+ * Callback from ioqueue that an incoming data is received from the socket.
+ */
+static void on_read_complete(pj_ioqueue_key_t *key, 
+                             pj_ioqueue_op_key_t *op_key, 
+                             pj_ssize_t bytes_read_unused)
+{
+    enum { MAX_IMMEDIATE_PACKET = 10 };
+    pjsip_rx_data_op_key *rdata_op_key = (pjsip_rx_data_op_key*) op_key;
+    pjsip_rx_data *rdata = rdata_op_key->rdata;
+    struct tls_transport *tls = 
+	(struct tls_transport*)rdata->tp_info.transport;
+    int i;
+    pj_status_t status;
+
+    /* Don't do anything if transport is closing. */
+    if (tls->is_closing) {
+	tls->is_closing++;
+	return;
+    }
+
+
+    /* Recall that we use MSG_PEEK when calling ioqueue_recv(), so
+     * when this callback is called, data has not actually been read
+     * from socket buffer.
+     */
+
+    for (i=0;; ++i) {
+	pj_uint32_t flags;
+
+	/* Read data from SSL connection */
+	status = ssl_read(tls);
+
+	if (status == PJ_SUCCESS) {
+	    /*
+	     * We have packet!
+	     */
+	    pj_size_t size_eaten;
+
+	    /* Init pkt_info part. */
+	    rdata->pkt_info.zero = 0;
+	    pj_gettimeofday(&rdata->pkt_info.timestamp);
+
+	    /* Report to transport manager.
+	     * The transport manager will tell us how many bytes of the packet
+	     * have been processed (as valid SIP message).
+	     */
+	    size_eaten = 
+		pjsip_tpmgr_receive_packet(rdata->tp_info.transport->tpmgr, 
+					   rdata);
+
+	    pj_assert(size_eaten <= (pj_size_t)rdata->pkt_info.len);
+
+	    /* Move unprocessed data to the front of the buffer */
+	    if (size_eaten>0 && size_eaten<(pj_size_t)rdata->pkt_info.len) {
+		pj_memmove(rdata->pkt_info.packet,
+			   rdata->pkt_info.packet + size_eaten,
+			   rdata->pkt_info.len - size_eaten);
+	    }
+	    
+	    rdata->pkt_info.len -= size_eaten;
+
+	} else if (status == PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK)) {
+
+	    /* Ignore EWOULDBLOCK error (?) */
+
+	} else {
+
+	    /* For other errors, treat as transport being closed */
+	    ssl_report_error(tls->base.obj_name, 4, status,
+			     "Error reading SSL stream");
+	    
+	    /* We can not destroy the transport since high level objects may
+	     * still keep reference to this transport. So we can only 
+	     * instruct transport manager to gracefully start the shutdown
+	     * procedure for this transport.
+	     */
+	    if (tls->close_reason==PJ_SUCCESS) 
+		tls->close_reason = status;
+	    pjsip_transport_shutdown(&tls->base);
+
+	    return;
+	}
+
+	/* Reset pool. */
+	pj_pool_reset(rdata->tp_info.pool);
+
+	/* If we have pending data in SSL buffer, read it. */
+	if (SSL_pending(tls->ssl)) {
+
+	    /* Check that we have enough space in buffer */
+	    if (rdata->pkt_info.len >= PJSIP_MAX_PKT_LEN-1) {
+		PJ_LOG(4,(tls->base.obj_name, 
+			  "Incoming packet dropped from tls:%.*s:%d "
+			  "because it's too big (%d bytes)",
+			  (int)tls->base.remote_name.host.slen,
+			  tls->base.remote_name.host.ptr,
+			  tls->base.remote_name.port,
+			  rdata->pkt_info.len));
+		rdata->pkt_info.len = 0;
+	    }
+
+	    continue;
+	}
+
+	/* If we've reached maximum number of packets received on a single
+	 * poll, force the next reading to be asynchronous.
+	 */
+	if (i >= MAX_IMMEDIATE_PACKET) {
+	    /* Receive quota reached. Force ioqueue_recv() to 
+	     * return PJ_EPENDING 
+	     */
+	    flags = PJ_IOQUEUE_ALWAYS_ASYNC;
+	} else {
+	    /* This doesn't work too well when IOCP is used, as it seems that
+	     * IOCP refuses to do MSG_PEEK when WSARecv() is called without
+	     * OVERLAP structure. With OpenSSL it gives this error:
+	     * error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version 
+	     * number
+	     *
+	     * flags = 0 
+	     */
+	    flags = PJ_IOQUEUE_ALWAYS_ASYNC;
+	}
+
+	/* Read next packet from the network. Remember, we need to use
+	 * MSG_PEEK or otherwise the packet will be eaten by us!
+	 */
+	bytes_read_unused = 1;
+	status = pj_ioqueue_recv(key, op_key, 
+				 rdata->pkt_info.packet+rdata->pkt_info.len,
+				 &bytes_read_unused, flags | PJ_MSG_PEEK);
+
+	if (status == PJ_SUCCESS) {
+
+	    /* Continue loop. */
+	    pj_assert(i < MAX_IMMEDIATE_PACKET);
+
+	} else if (status == PJ_EPENDING) {
+	    break;
+
+	} else {
+	    /* Socket error */
+
+	    /* We can not destroy the transport since high level objects may
+	     * still keep reference to this transport. So we can only 
+	     * instruct transport manager to gracefully start the shutdown
+	     * procedure for this transport.
+	     */
+	    if (tls->close_reason==PJ_SUCCESS) tls->close_reason = status;
+	    pjsip_transport_shutdown(&tls->base);
+
+	    return;
+	}
+    }
+}
+
+
+/* 
+ * Callback from ioqueue when asynchronous connect() operation completes.
+ */
+static void on_connect_complete(pj_ioqueue_key_t *key, 
+                                pj_status_t status)
+{
+    struct tls_transport *tls;
+    pj_sockaddr_in addr;
+    int addrlen;
+
+    tls = pj_ioqueue_get_user_data(key);
+
+    /* Check connect() status */
+    if (status != PJ_SUCCESS) {
+
+	/* Mark that pending connect() operation has completed. */
+	tls->has_pending_connect = PJ_FALSE;
+
+	ssl_report_error(tls->base.obj_name, 4, status,
+			 "Error connecting to %.*s:%d",
+			 (int)tls->base.remote_name.host.slen,
+			 tls->base.remote_name.host.ptr,
+			 tls->base.remote_name.port);
+
+	/* Cancel all delayed transmits */
+	while (!pj_list_empty(&tls->delayed_list)) {
+	    struct delayed_tdata *pending_tx;
+	    pj_ioqueue_op_key_t *op_key;
+
+	    pending_tx = tls->delayed_list.next;
+	    pj_list_erase(pending_tx);
+
+	    op_key = (pj_ioqueue_op_key_t*)pending_tx->tdata_op_key;
+
+	    on_write_complete(tls->key, op_key, -status);
+	}
+
+	/* We can not destroy the transport since high level objects may
+	 * still keep reference to this transport. So we can only 
+	 * instruct transport manager to gracefully start the shutdown
+	 * procedure for this transport.
+	 */
+	if (tls->close_reason==PJ_SUCCESS) tls->close_reason = status;
+	pjsip_transport_shutdown(&tls->base);
+	return;
+    }
+
+    PJ_LOG(4,(tls->base.obj_name, 
+	      "TCP transport %.*s:%d is connected to %.*s:%d",
+	      (int)tls->base.local_name.host.slen,
+	      tls->base.local_name.host.ptr,
+	      tls->base.local_name.port,
+	      (int)tls->base.remote_name.host.slen,
+	      tls->base.remote_name.host.ptr,
+	      tls->base.remote_name.port));
+
+
+    /* Update (again) local address, just in case local address currently
+     * set is different now that the socket is connected (could happen
+     * on some systems, like old Win32 probably?).
+     */
+    addrlen = sizeof(pj_sockaddr_in);
+    if (pj_sock_getsockname(tls->sock, &addr, &addrlen)==PJ_SUCCESS) {
+	pj_sockaddr_in *tp_addr = (pj_sockaddr_in*)&tls->base.local_addr;
+
+	if (tp_addr->sin_addr.s_addr != addr.sin_addr.s_addr) {
+	    tp_addr->sin_addr.s_addr = addr.sin_addr.s_addr;
+	    tp_addr->sin_port = addr.sin_port;
+	    sockaddr_to_host_port(tls->base.pool, &tls->base.local_name,
+				  tp_addr);
+	}
+    }
+
+    /* Perform SSL_connect() */
+    status = ssl_connect(tls);
+    if (status != PJ_SUCCESS) {
+
+	/* Cancel all delayed transmits */
+	while (!pj_list_empty(&tls->delayed_list)) {
+	    struct delayed_tdata *pending_tx;
+	    pj_ioqueue_op_key_t *op_key;
+
+	    pending_tx = tls->delayed_list.next;
+	    pj_list_erase(pending_tx);
+
+	    op_key = (pj_ioqueue_op_key_t*)pending_tx->tdata_op_key;
+
+	    on_write_complete(tls->key, op_key, -status);
+	}
+
+	if (tls->close_reason==PJ_SUCCESS) tls->close_reason = status;
+	pjsip_transport_shutdown(&tls->base);
+	return;
+    }
+
+    /* Mark that pending connect() operation has completed. */
+    tls->has_pending_connect = PJ_FALSE;
+
+    /* Start pending read */
+    status = tls_start_read(tls);
+    if (status != PJ_SUCCESS) {
+
+	/* Cancel all delayed transmits */
+	while (!pj_list_empty(&tls->delayed_list)) {
+	    struct delayed_tdata *pending_tx;
+	    pj_ioqueue_op_key_t *op_key;
+
+	    pending_tx = tls->delayed_list.next;
+	    pj_list_erase(pending_tx);
+
+	    op_key = (pj_ioqueue_op_key_t*)pending_tx->tdata_op_key;
+
+	    on_write_complete(tls->key, op_key, -status);
+	}
+
+
+	/* We can not destroy the transport since high level objects may
+	 * still keep reference to this transport. So we can only 
+	 * instruct transport manager to gracefully start the shutdown
+	 * procedure for this transport.
+	 */
+	if (tls->close_reason==PJ_SUCCESS) tls->close_reason = status;
+	pjsip_transport_shutdown(&tls->base);
+	return;
+    }
+
+    /* Flush all pending send operations */
+    tls_flush_pending_tx(tls);
+}
+
+#endif	/* PJSIP_HAS_TLS_TRANSPORT */
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport_udp.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport_udp.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_transport_udp.c	(revision 1163)
@@ -0,0 +1,674 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_transport.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_errno.h>
+#include <pj/addr_resolv.h>
+#include <pj/assert.h>
+#include <pj/lock.h>
+#include <pj/log.h>
+#include <pj/os.h>
+#include <pj/pool.h>
+#include <pj/sock.h>
+#include <pj/compat/socket.h>
+#include <pj/string.h>
+
+
+#define THIS_FILE   "sip_transport_udp.c"
+
+/**
+ * These are the target values for socket send and receive buffer sizes,
+ * respectively. They will be applied to UDP socket with setsockopt().
+ * When transport failed to set these size, it will decrease it until
+ * sufficiently large number has been successfully set.
+ *
+ * The buffer size is important, especially in WinXP/2000 machines.
+ * Basicly the lower the size, the more packets will be lost (dropped?)
+ * when we're sending (receiving?) packets in large volumes.
+ * 
+ * The figure here is taken based on my experiment on WinXP/2000 machine,
+ * and with this value, the rate of dropped packet is about 8% when
+ * sending 1800 requests simultaneously (percentage taken as average
+ * after 50K requests or so).
+ *
+ * More experiments are needed probably.
+ */
+#ifndef PJSIP_UDP_SO_SNDBUF_SIZE
+#   define PJSIP_UDP_SO_SNDBUF_SIZE	(24*1024*1024)
+#endif
+
+#ifndef PJSIP_UDP_SO_RCVBUF_SIZE
+#   define PJSIP_UDP_SO_RCVBUF_SIZE	(24*1024*1024)
+#endif
+
+
+/* Struct udp_transport "inherits" struct pjsip_transport */
+struct udp_transport
+{
+    pjsip_transport	base;
+    pj_sock_t		sock;
+    pj_ioqueue_key_t   *key;
+    int			rdata_cnt;
+    pjsip_rx_data     **rdata;
+    int			is_closing;
+};
+
+
+/*
+ * Initialize transport's receive buffer from the specified pool.
+ */
+static void init_rdata(struct udp_transport *tp, unsigned rdata_index,
+		       pj_pool_t *pool, pjsip_rx_data **p_rdata)
+{
+    pjsip_rx_data *rdata;
+
+    /* Reset pool. */
+    //note: already done by caller
+    //pj_pool_reset(pool);
+
+    rdata = pj_pool_zalloc(pool, sizeof(pjsip_rx_data));
+
+    /* Init tp_info part. */
+    rdata->tp_info.pool = pool;
+    rdata->tp_info.transport = &tp->base;
+    rdata->tp_info.tp_data = (void*)(long)rdata_index;
+    rdata->tp_info.op_key.rdata = rdata;
+    pj_ioqueue_op_key_init(&rdata->tp_info.op_key.op_key, 
+			   sizeof(pj_ioqueue_op_key_t));
+
+    tp->rdata[rdata_index] = rdata;
+
+    if (p_rdata)
+	*p_rdata = rdata;
+}
+
+
+/*
+ * udp_on_read_complete()
+ *
+ * This is callback notification from ioqueue that a pending recvfrom()
+ * operation has completed.
+ */
+static void udp_on_read_complete( pj_ioqueue_key_t *key, 
+				  pj_ioqueue_op_key_t *op_key, 
+				  pj_ssize_t bytes_read)
+{
+    enum { MAX_IMMEDIATE_PACKET = 10 };
+    pjsip_rx_data_op_key *rdata_op_key = (pjsip_rx_data_op_key*) op_key;
+    pjsip_rx_data *rdata = rdata_op_key->rdata;
+    struct udp_transport *tp = (struct udp_transport*)rdata->tp_info.transport;
+    int i;
+    pj_status_t status;
+
+    /* Don't do anything if transport is closing. */
+    if (tp->is_closing) {
+	tp->is_closing++;
+	return;
+    }
+
+    /*
+     * The idea of the loop is to process immediate data received by
+     * pj_ioqueue_recvfrom(), as long as i < MAX_IMMEDIATE_PACKET. When
+     * i is >= MAX_IMMEDIATE_PACKET, we force the recvfrom() operation to
+     * complete asynchronously, to allow other sockets to get their data.
+     */
+    for (i=0;; ++i) {
+	pj_uint32_t flags;
+
+	/* Report the packet to transport manager. */
+	if (bytes_read > 0) {
+	    pj_size_t size_eaten;
+	    const pj_sockaddr_in *src_addr = 
+		(pj_sockaddr_in*)&rdata->pkt_info.src_addr;
+
+	    /* Init pkt_info part. */
+	    rdata->pkt_info.len = bytes_read;
+	    rdata->pkt_info.zero = 0;
+	    pj_gettimeofday(&rdata->pkt_info.timestamp);
+	    pj_ansi_strcpy(rdata->pkt_info.src_name,
+			   pj_inet_ntoa(src_addr->sin_addr));
+	    rdata->pkt_info.src_port = pj_ntohs(src_addr->sin_port);
+
+	    size_eaten = 
+		pjsip_tpmgr_receive_packet(rdata->tp_info.transport->tpmgr, 
+					   rdata);
+
+	    if (size_eaten < 0) {
+		pj_assert(!"It shouldn't happen!");
+		size_eaten = rdata->pkt_info.len;
+	    }
+
+	    /* Since this is UDP, the whole buffer is the message. */
+	    rdata->pkt_info.len = 0;
+
+	} else if (bytes_read == 0) {
+
+	    /* TODO: */
+
+	} else if (-bytes_read != PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK) &&
+		   -bytes_read != PJ_STATUS_FROM_OS(OSERR_EINPROGRESS) && 
+		   -bytes_read != PJ_STATUS_FROM_OS(OSERR_ECONNRESET)) 
+	{
+
+	    /* Report error to endpoint. */
+	    PJSIP_ENDPT_LOG_ERROR((rdata->tp_info.transport->endpt,
+				   rdata->tp_info.transport->obj_name,
+				   -bytes_read, 
+				   "Warning: pj_ioqueue_recvfrom()"
+				   " callback error"));
+	}
+
+	if (i >= MAX_IMMEDIATE_PACKET) {
+	    /* Force ioqueue_recvfrom() to return PJ_EPENDING */
+	    flags = PJ_IOQUEUE_ALWAYS_ASYNC;
+	} else {
+	    flags = 0;
+	}
+
+	/* Reset pool. 
+	 * Need to copy rdata fields to temp variable because they will
+	 * be invalid after pj_pool_reset().
+	 */
+	{
+	    pj_pool_t *rdata_pool = rdata->tp_info.pool;
+	    struct udp_transport *rdata_tp ;
+	    unsigned rdata_index;
+
+	    rdata_tp = (struct udp_transport*)rdata->tp_info.transport;
+	    rdata_index = (unsigned)(unsigned long)rdata->tp_info.tp_data;
+
+	    pj_pool_reset(rdata_pool);
+	    init_rdata(rdata_tp, rdata_index, rdata_pool, &rdata);
+
+	    /* Change some vars to point to new location after
+	     * pool reset.
+	     */
+	    op_key = &rdata->tp_info.op_key.op_key;
+	}
+
+	/* Read next packet. */
+	bytes_read = sizeof(rdata->pkt_info.packet);
+	rdata->pkt_info.src_addr_len = sizeof(rdata->pkt_info.src_addr);
+	status = pj_ioqueue_recvfrom(key, op_key, 
+				     rdata->pkt_info.packet,
+				     &bytes_read, flags,
+				     &rdata->pkt_info.src_addr, 
+				     &rdata->pkt_info.src_addr_len);
+
+	if (status == PJ_SUCCESS) {
+	    /* Continue loop. */
+	    pj_assert(i < MAX_IMMEDIATE_PACKET);
+
+	} else if (status == PJ_EPENDING) {
+	    break;
+
+	} else {
+
+	    if (i < MAX_IMMEDIATE_PACKET) {
+
+		/* Report error to endpoint if this is not EWOULDBLOCK error.*/
+		if (status != PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK) &&
+		    status != PJ_STATUS_FROM_OS(OSERR_EINPROGRESS) && 
+		    status != PJ_STATUS_FROM_OS(OSERR_ECONNRESET)) 
+		{
+
+		    PJSIP_ENDPT_LOG_ERROR((rdata->tp_info.transport->endpt,
+					   rdata->tp_info.transport->obj_name,
+					   status, 
+					   "Warning: pj_ioqueue_recvfrom"));
+		}
+
+		/* Continue loop. */
+		bytes_read = 0;
+	    } else {
+		/* This is fatal error.
+		 * Ioqueue operation will stop for this transport!
+		 */
+		PJSIP_ENDPT_LOG_ERROR((rdata->tp_info.transport->endpt,
+				       rdata->tp_info.transport->obj_name,
+				       status, 
+				       "FATAL: pj_ioqueue_recvfrom() error, "
+				       "UDP transport stopping! Error"));
+		break;
+	    }
+	}
+    }
+}
+
+/*
+ * udp_on_write_complete()
+ *
+ * This is callback notification from ioqueue that a pending sendto()
+ * operation has completed.
+ */
+static void udp_on_write_complete( pj_ioqueue_key_t *key, 
+				   pj_ioqueue_op_key_t *op_key,
+				   pj_ssize_t bytes_sent)
+{
+    struct udp_transport *tp = pj_ioqueue_get_user_data(key);
+    pjsip_tx_data_op_key *tdata_op_key = (pjsip_tx_data_op_key*)op_key;
+
+    tdata_op_key->tdata = NULL;
+
+    if (tdata_op_key->callback) {
+	tdata_op_key->callback(&tp->base, tdata_op_key->token, bytes_sent);
+    }
+}
+
+/*
+ * udp_send_msg()
+ *
+ * This function is called by transport manager (by transport->send_msg())
+ * to send outgoing message.
+ */
+static pj_status_t udp_send_msg( pjsip_transport *transport,
+				 pjsip_tx_data *tdata,
+				 const pj_sockaddr_t *rem_addr,
+				 int addr_len,
+				 void *token,
+				 void (*callback)(pjsip_transport*,
+						  void *token,
+						  pj_ssize_t))
+{
+    struct udp_transport *tp = (struct udp_transport*)transport;
+    pj_ssize_t size;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(transport && tdata, PJ_EINVAL);
+    PJ_ASSERT_RETURN(tdata->op_key.tdata == NULL, PJSIP_EPENDINGTX);
+    
+    /* Init op key. */
+    tdata->op_key.tdata = tdata;
+    tdata->op_key.token = token;
+    tdata->op_key.callback = callback;
+
+    /* Send to ioqueue! */
+    size = tdata->buf.cur - tdata->buf.start;
+    status = pj_ioqueue_sendto(tp->key, (pj_ioqueue_op_key_t*)&tdata->op_key,
+			       tdata->buf.start, &size, 0,
+			       rem_addr, addr_len);
+
+    if (status != PJ_EPENDING)
+	tdata->op_key.tdata = NULL;
+
+    return status;
+}
+
+/*
+ * udp_destroy()
+ *
+ * This function is called by transport manager (by transport->destroy()).
+ */
+static pj_status_t udp_destroy( pjsip_transport *transport )
+{
+    struct udp_transport *tp = (struct udp_transport*)transport;
+    int i;
+
+    /* Mark this transport as closing. */
+    tp->is_closing = 1;
+
+    /* Cancel all pending operations. */
+    /* blp: NO NO NO...
+     *      No need to post queued completion as we poll the ioqueue until
+     *      we've got events anyway. Posting completion will only cause
+     *      callback to be called twice with IOCP: one for the post completion
+     *      and another one for closing the socket.
+     *
+    for (i=0; i<tp->rdata_cnt; ++i) {
+	pj_ioqueue_post_completion(tp->key, 
+				   &tp->rdata[i]->tp_info.op_key.op_key, -1);
+    }
+    */
+
+    /* Unregister from ioqueue. */
+    if (tp->key) {
+	pj_ioqueue_unregister(tp->key);
+	tp->key = NULL;
+    } else {
+	/* Close socket. */
+	if (tp->sock && tp->sock != PJ_INVALID_SOCKET) {
+	    pj_sock_close(tp->sock);
+	    tp->sock = PJ_INVALID_SOCKET;
+	}
+    }
+
+    /* Must poll ioqueue because IOCP calls the callback when socket
+     * is closed. We poll the ioqueue until all pending callbacks 
+     * have been called.
+     */
+    for (i=0; i<50 && tp->is_closing < 1+tp->rdata_cnt; ++i) {
+	int cnt;
+	pj_time_val timeout = {0, 1};
+
+	cnt = pj_ioqueue_poll(pjsip_endpt_get_ioqueue(transport->endpt), 
+			      &timeout);
+	if (cnt == 0)
+	    break;
+    }
+
+    /* Destroy rdata */
+    for (i=0; i<tp->rdata_cnt; ++i) {
+	pj_pool_release(tp->rdata[i]->tp_info.pool);
+    }
+
+    /* Destroy reference counter. */
+    if (tp->base.ref_cnt)
+	pj_atomic_destroy(tp->base.ref_cnt);
+
+    /* Destroy lock */
+    if (tp->base.lock)
+	pj_lock_destroy(tp->base.lock);
+
+    /* Destroy pool. */
+    pjsip_endpt_release_pool(tp->base.endpt, tp->base.pool);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * udp_shutdown()
+ *
+ * Start graceful UDP shutdown.
+ */
+static pj_status_t udp_shutdown(pjsip_transport *transport)
+{
+    return pjsip_transport_dec_ref(transport);
+}
+
+
+/*
+ * pjsip_udp_transport_attach()
+ *
+ * Attach UDP socket and start transport.
+ */
+PJ_DEF(pj_status_t) pjsip_udp_transport_attach( pjsip_endpoint *endpt,
+						pj_sock_t sock,
+						const pjsip_host_port *a_name,
+						unsigned async_cnt,
+						pjsip_transport **p_transport)
+{
+    enum { M = 80 };
+    pj_pool_t *pool;
+    struct udp_transport *tp;
+    pj_ioqueue_t *ioqueue;
+    pj_ioqueue_callback ioqueue_cb;
+    long sobuf_size;
+    unsigned i;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(endpt && sock!=PJ_INVALID_SOCKET && a_name && async_cnt>0,
+		     PJ_EINVAL);
+
+
+    /* Adjust socket rcvbuf size */
+    sobuf_size = PJSIP_UDP_SO_RCVBUF_SIZE;
+    status = pj_sock_setsockopt(sock, PJ_SOL_SOCKET, PJ_SO_RCVBUF,
+				&sobuf_size, sizeof(sobuf_size));
+    if (status != PJ_SUCCESS) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+	pj_strerror(status, errmsg, sizeof(errmsg));
+	PJ_LOG(4,(THIS_FILE, "Error setting SO_RCVBUF: %s [%d]", errmsg,
+		  status));
+    }
+
+    /* Adjust socket sndbuf size */
+    sobuf_size = PJSIP_UDP_SO_SNDBUF_SIZE;
+    status = pj_sock_setsockopt(sock, PJ_SOL_SOCKET, PJ_SO_SNDBUF,
+				&sobuf_size, sizeof(sobuf_size));
+    if (status != PJ_SUCCESS) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+	pj_strerror(status, errmsg, sizeof(errmsg));
+	PJ_LOG(4,(THIS_FILE, "Error setting SO_SNDBUF: %s [%d]", errmsg,
+		  status));
+    }
+
+    /* Create pool. */
+    pool = pjsip_endpt_create_pool(endpt, "udp%p", PJSIP_POOL_LEN_TRANSPORT, 
+				   PJSIP_POOL_INC_TRANSPORT);
+    if (!pool)
+	return PJ_ENOMEM;
+
+    /* Create the UDP transport object. */
+    tp = pj_pool_zalloc(pool, sizeof(struct udp_transport));
+
+    /* Save pool. */
+    tp->base.pool = pool;
+
+    /* Object name. */
+    pj_ansi_snprintf(tp->base.obj_name, sizeof(tp->base.obj_name), 
+		     "udp%p", tp);
+
+    /* Init reference counter. */
+    status = pj_atomic_create(pool, 0, &tp->base.ref_cnt);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Init lock. */
+    status = pj_lock_create_recursive_mutex(pool, "udp%p", &tp->base.lock);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Set type. */
+    tp->base.key.type = PJSIP_TRANSPORT_UDP;
+
+    /* Remote address is left zero (except the family) */
+    tp->base.key.rem_addr.addr.sa_family = PJ_AF_INET;
+
+    /* Type name. */
+    tp->base.type_name = "UDP";
+
+    /* Transport flag */
+    tp->base.flag = pjsip_transport_get_flag_from_type(PJSIP_TRANSPORT_UDP);
+
+
+    /* Length of addressess. */
+    tp->base.addr_len = sizeof(pj_sockaddr_in);
+
+    /* Init local address. */
+    status = pj_sock_getsockname(sock, &tp->base.local_addr, 
+				 &tp->base.addr_len);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Init address name (published address) */
+    pj_strdup_with_null(pool, &tp->base.local_name.host, &a_name->host);
+    tp->base.local_name.port = a_name->port;
+
+    /* Init remote name. */
+    tp->base.remote_name.host = pj_str("0.0.0.0");
+    tp->base.remote_name.port = 0;
+
+    /* Transport info. */
+    tp->base.info = pj_pool_alloc(pool, M);
+    pj_ansi_snprintf( 
+	tp->base.info, M, "udp %s:%d [published as %s:%d]",
+	pj_inet_ntoa(((pj_sockaddr_in*)&tp->base.local_addr)->sin_addr),
+	pj_ntohs(((pj_sockaddr_in*)&tp->base.local_addr)->sin_port),
+	tp->base.local_name.host.ptr,
+	tp->base.local_name.port);
+
+    /* Set endpoint. */
+    tp->base.endpt = endpt;
+
+    /* Transport manager and timer will be initialized by tpmgr */
+
+    /* Attach socket. */
+    tp->sock = sock;
+
+    /* Register to ioqueue. */
+    ioqueue = pjsip_endpt_get_ioqueue(endpt);
+    pj_memset(&ioqueue_cb, 0, sizeof(ioqueue_cb));
+    ioqueue_cb.on_read_complete = &udp_on_read_complete;
+    ioqueue_cb.on_write_complete = &udp_on_write_complete;
+    status = pj_ioqueue_register_sock(pool, ioqueue, tp->sock, tp, 
+				      &ioqueue_cb, &tp->key);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Set functions. */
+    tp->base.send_msg = &udp_send_msg;
+    tp->base.do_shutdown = &udp_shutdown;
+    tp->base.destroy = &udp_destroy;
+
+    /* This is a permanent transport, so we initialize the ref count
+     * to one so that transport manager don't destroy this transport
+     * when there's no user!
+     */
+    pj_atomic_inc(tp->base.ref_cnt);
+
+    /* Register to transport manager. */
+    tp->base.tpmgr = pjsip_endpt_get_tpmgr(endpt);
+    status = pjsip_transport_register( tp->base.tpmgr, (pjsip_transport*)tp);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+
+    /* Create rdata and put it in the array. */
+    tp->rdata_cnt = 0;
+    tp->rdata = pj_pool_calloc(tp->base.pool, async_cnt, 
+			       sizeof(pjsip_rx_data*));
+    for (i=0; i<async_cnt; ++i) {
+	pj_pool_t *rdata_pool = pjsip_endpt_create_pool(endpt, "rtd%p", 
+							PJSIP_POOL_RDATA_LEN,
+							PJSIP_POOL_RDATA_INC);
+	if (!rdata_pool) {
+	    pj_atomic_set(tp->base.ref_cnt, 0);
+	    pjsip_transport_destroy(&tp->base);
+	    return PJ_ENOMEM;
+	}
+
+	init_rdata(tp, i, rdata_pool, NULL);
+	tp->rdata_cnt++;
+    }
+
+    /* Start reading the ioqueue. */
+    for (i=0; i<async_cnt; ++i) {
+	pj_ssize_t size;
+
+	size = sizeof(tp->rdata[i]->pkt_info.packet);
+	tp->rdata[i]->pkt_info.src_addr_len = sizeof(tp->rdata[i]->pkt_info.src_addr);
+	status = pj_ioqueue_recvfrom(tp->key, 
+				     &tp->rdata[i]->tp_info.op_key.op_key,
+				     tp->rdata[i]->pkt_info.packet,
+				     &size, PJ_IOQUEUE_ALWAYS_ASYNC,
+				     &tp->rdata[i]->pkt_info.src_addr,
+				     &tp->rdata[i]->pkt_info.src_addr_len);
+	if (status == PJ_SUCCESS) {
+	    pj_assert(!"Shouldn't happen because PJ_IOQUEUE_ALWAYS_ASYNC!");
+	    udp_on_read_complete(tp->key, &tp->rdata[i]->tp_info.op_key.op_key,
+				 size);
+	} else if (status != PJ_EPENDING) {
+	    /* Error! */
+	    pjsip_transport_destroy(&tp->base);
+	    return status;
+	}
+    }
+
+    /* Done. */
+    if (p_transport)
+	*p_transport = &tp->base;
+
+    PJ_LOG(4,(tp->base.obj_name, 
+	      "SIP UDP transport started, published address is %.*s:%d",
+	      (int)tp->base.local_name.host.slen,
+	      tp->base.local_name.host.ptr,
+	      tp->base.local_name.port));
+
+    return PJ_SUCCESS;
+
+on_error:
+    udp_destroy((pjsip_transport*)tp);
+    return status;
+}
+
+/*
+ * pjsip_udp_transport_start()
+ *
+ * Create a UDP socket in the specified address and start a transport.
+ */
+PJ_DEF(pj_status_t) pjsip_udp_transport_start( pjsip_endpoint *endpt,
+					       const pj_sockaddr_in *local_a,
+					       const pjsip_host_port *a_name,
+					       unsigned async_cnt,
+					       pjsip_transport **p_transport)
+{
+    pj_sock_t sock;
+    pj_status_t status;
+    char addr_buf[16];
+    pj_sockaddr_in tmp_addr;
+    pjsip_host_port bound_name;
+
+    PJ_ASSERT_RETURN(endpt && async_cnt, PJ_EINVAL);
+
+    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &sock);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    if (local_a == NULL) {
+	pj_sockaddr_in_init(&tmp_addr, NULL, 0);
+	local_a = &tmp_addr;
+    }
+
+    status = pj_sock_bind(sock, local_a, sizeof(*local_a));
+    if (status != PJ_SUCCESS) {
+	pj_sock_close(sock);
+	return status;
+    }
+
+    if (a_name == NULL) {
+	/* Address name is not specified. 
+	 * Build a name based on bound address.
+	 */
+	int addr_len;
+
+	addr_len = sizeof(tmp_addr);
+	status = pj_sock_getsockname(sock, &tmp_addr, &addr_len);
+	if (status != PJ_SUCCESS) {
+	    pj_sock_close(sock);
+	    return status;
+	}
+
+	a_name = &bound_name;
+	bound_name.host.ptr = addr_buf;
+	bound_name.port = pj_ntohs(tmp_addr.sin_port);
+
+	/* If bound address specifies "0.0.0.0", get the IP address
+	 * of local hostname.
+	 */
+	if (tmp_addr.sin_addr.s_addr == PJ_INADDR_ANY) {
+	    pj_in_addr hostip;
+
+	    status = pj_gethostip(&hostip);
+	    if (status != PJ_SUCCESS)
+		return status;
+
+	    pj_strcpy2(&bound_name.host, pj_inet_ntoa(hostip));
+	} else {
+	    /* Otherwise use bound address. */
+	    pj_strcpy2(&bound_name.host, pj_inet_ntoa(tmp_addr.sin_addr));
+	}
+	
+    }
+
+    return pjsip_udp_transport_attach( endpt, sock, a_name, async_cnt, 
+				       p_transport );
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_ua_layer.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_ua_layer.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_ua_layer.c	(revision 1163)
@@ -0,0 +1,945 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_ua_layer.h>
+#include <pjsip/sip_module.h>
+#include <pjsip/sip_dialog.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_errno.h>
+#include <pjsip/sip_transaction.h>
+#include <pj/os.h>
+#include <pj/hash.h>
+#include <pj/assert.h>
+#include <pj/string.h>
+#include <pj/pool.h>
+#include <pj/log.h>
+
+
+#define THIS_FILE    "sip_ua_layer.c"
+
+/*
+ * Static prototypes.
+ */
+static pj_status_t mod_ua_load(pjsip_endpoint *endpt);
+static pj_status_t mod_ua_unload(void);
+static pj_bool_t   mod_ua_on_rx_request(pjsip_rx_data *rdata);
+static pj_bool_t   mod_ua_on_rx_response(pjsip_rx_data *rdata);
+static void	   mod_ua_on_tsx_state(pjsip_transaction*, pjsip_event*);
+
+
+extern long pjsip_dlg_lock_tls_id;	/* defined in sip_dialog.c */
+
+/* This struct is used to represent list of dialog inside a dialog set.
+ * We don't want to use pjsip_dialog for this purpose, to save some
+ * memory (about 100 bytes per dialog set).
+ */
+struct dlg_set_head
+{
+    PJ_DECL_LIST_MEMBER(pjsip_dialog);
+};
+
+/* This struct represents a dialog set.
+ * This is the value that will be put in the UA's hash table.
+ */
+struct dlg_set
+{
+    /* To put this node in free dlg_set nodes in UA. */
+    PJ_DECL_LIST_MEMBER(struct dlg_set);
+
+    /* This is the buffer to store this entry in the hash table. */
+    char ht_entry[PJ_HASH_ENTRY_SIZE];
+
+    /* List of dialog in this dialog set. */
+    struct dlg_set_head  dlg_list;
+};
+
+
+/*
+ * Module interface.
+ */
+static struct user_agent
+{
+    pjsip_module	 mod;
+    pj_pool_t		*pool;
+    pjsip_endpoint	*endpt;
+    pj_mutex_t		*mutex;
+    pj_hash_table_t	*dlg_table;
+    pjsip_ua_init_param  param;
+    struct dlg_set	 free_dlgset_nodes;
+
+} mod_ua = 
+{
+  {
+    NULL, NULL,		    /* prev, next.			*/
+    { "mod-ua", 6 },	    /* Name.				*/
+    -1,			    /* Id				*/
+    PJSIP_MOD_PRIORITY_UA_PROXY_LAYER,	/* Priority		*/
+    &mod_ua_load,	    /* load()				*/
+    NULL,		    /* start()				*/
+    NULL,		    /* stop()				*/
+    &mod_ua_unload,	    /* unload()				*/
+    &mod_ua_on_rx_request,  /* on_rx_request()			*/
+    &mod_ua_on_rx_response, /* on_rx_response()			*/
+    NULL,		    /* on_tx_request.			*/
+    NULL,		    /* on_tx_response()			*/
+    &mod_ua_on_tsx_state,   /* on_tsx_state()			*/
+  }
+};
+
+/* 
+ * mod_ua_load()
+ *
+ * Called when module is being loaded by endpoint.
+ */
+static pj_status_t mod_ua_load(pjsip_endpoint *endpt)
+{
+    pj_status_t status;
+
+    /* Initialize the user agent. */
+    mod_ua.endpt = endpt;
+    mod_ua.pool = pjsip_endpt_create_pool( endpt, "ua%p", PJSIP_POOL_LEN_UA,
+					   PJSIP_POOL_INC_UA);
+    if (mod_ua.pool == NULL)
+	return PJ_ENOMEM;
+
+    status = pj_mutex_create_recursive(mod_ua.pool, " ua%p", &mod_ua.mutex);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    mod_ua.dlg_table = pj_hash_create(mod_ua.pool, PJSIP_MAX_DIALOG_COUNT);
+    if (mod_ua.dlg_table == NULL)
+	return PJ_ENOMEM;
+
+    pj_list_init(&mod_ua.free_dlgset_nodes);
+
+    /* Initialize dialog lock. */
+    status = pj_thread_local_alloc(&pjsip_dlg_lock_tls_id);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    pj_thread_local_set(pjsip_dlg_lock_tls_id, NULL);
+
+    return PJ_SUCCESS;
+
+}
+
+/*
+ * mod_ua_unload()
+ *
+ * Called when module is being unloaded.
+ */
+static pj_status_t mod_ua_unload(void)
+{
+    pj_thread_local_free(pjsip_dlg_lock_tls_id);
+    pj_mutex_destroy(mod_ua.mutex);
+
+    /* Release pool */
+    if (mod_ua.pool) {
+	pjsip_endpt_release_pool( mod_ua.endpt, mod_ua.pool );
+    }
+    return PJ_SUCCESS;
+}
+
+/*
+ * mod_ua_on_tsx_stats()
+ *
+ * Called on changed on transaction state.
+ */
+static void mod_ua_on_tsx_state( pjsip_transaction *tsx, pjsip_event *e)
+{
+    pjsip_dialog *dlg;
+
+    /* Get the dialog where this transaction belongs. */
+    dlg = tsx->mod_data[mod_ua.mod.id];
+    
+    /* If dialog instance has gone, it could mean that the dialog
+     * may has been destroyed.
+     */
+    if (dlg == NULL)
+	return;
+
+    /* Hand over the event to the dialog. */
+    pjsip_dlg_on_tsx_state(dlg, tsx, e);
+}
+
+
+/*
+ * Init user agent module and register it to the endpoint.
+ */
+PJ_DEF(pj_status_t) pjsip_ua_init_module( pjsip_endpoint *endpt,
+					  const pjsip_ua_init_param *prm)
+{
+    pj_status_t status;
+
+    /* Check if module already registered. */
+    PJ_ASSERT_RETURN(mod_ua.mod.id == -1, PJ_EINVALIDOP);
+
+    /* Copy param, if exists. */
+    if (prm)
+	pj_memcpy(&mod_ua.param, prm, sizeof(pjsip_ua_init_param));
+
+    /* Register the module. */
+    status = pjsip_endpt_register_module(endpt, &mod_ua.mod);
+
+    return status;
+}
+
+/*
+ * Get the instance of the user agent.
+ *
+ */
+PJ_DEF(pjsip_user_agent*) pjsip_ua_instance(void)
+{
+    return &mod_ua.mod;
+}
+
+
+/*
+ * Get the endpoint where this UA is currently registered.
+ */
+PJ_DEF(pjsip_endpoint*) pjsip_ua_get_endpt(pjsip_user_agent *ua)
+{
+    PJ_UNUSED_ARG(ua);
+    pj_assert(ua == &mod_ua.mod);
+    return mod_ua.endpt;
+}
+
+
+/*
+ * Destroy the user agent layer.
+ */
+PJ_DEF(pj_status_t) pjsip_ua_destroy(void)
+{
+    /* Check if module already destroyed. */
+    PJ_ASSERT_RETURN(mod_ua.mod.id != -1, PJ_EINVALIDOP);
+
+    return pjsip_endpt_unregister_module(mod_ua.endpt, &mod_ua.mod);
+}
+
+
+
+/*
+ * Create key to identify dialog set.
+ */
+PJ_DEF(void) pjsip_ua_create_dlg_set_key( pj_pool_t *pool,
+					  pj_str_t *set_key,
+					  const pj_str_t *call_id,
+					  const pj_str_t *local_tag)
+{
+    PJ_ASSERT_ON_FAIL(pool && set_key && call_id && local_tag, return;);
+
+    set_key->slen = call_id->slen + local_tag->slen + 1;
+    set_key->ptr = pj_pool_alloc(pool, set_key->slen);
+    pj_assert(set_key->ptr != NULL);
+
+    pj_memcpy(set_key->ptr, call_id->ptr, call_id->slen);
+    set_key->ptr[call_id->slen] = '$';
+    pj_memcpy(set_key->ptr + call_id->slen + 1, 
+	      local_tag->ptr, local_tag->slen);
+}
+
+/*
+ * Acquire one dlg_set node to be put in the hash table.
+ * This will first look in the free nodes list, then allocate
+ * a new one from UA's pool when one is not available.
+ */
+static struct dlg_set *alloc_dlgset_node(void)
+{
+    struct dlg_set *set;
+
+    if (!pj_list_empty(&mod_ua.free_dlgset_nodes)) {
+	set = mod_ua.free_dlgset_nodes.next;
+	pj_list_erase(set);
+	return set;
+    } else {
+	set = pj_pool_alloc(mod_ua.pool, sizeof(struct dlg_set));
+	return set;
+    }
+}
+
+/*
+ * Register new dialog. Called by pjsip_dlg_create_uac() and
+ * pjsip_dlg_create_uas();
+ */
+PJ_DEF(pj_status_t) pjsip_ua_register_dlg( pjsip_user_agent *ua,
+					   pjsip_dialog *dlg )
+{
+    /* Sanity check. */
+    PJ_ASSERT_RETURN(ua && dlg, PJ_EINVAL);
+
+    /* For all dialogs, local tag (inc hash) must has been initialized. */
+    PJ_ASSERT_RETURN(dlg->local.info && dlg->local.info->tag.slen &&
+		     dlg->local.tag_hval != 0, PJ_EBUG);
+
+    /* For UAS dialog, remote tag (inc hash) must have been initialized. */
+    //PJ_ASSERT_RETURN(dlg->role==PJSIP_ROLE_UAC ||
+    //		     (dlg->role==PJSIP_ROLE_UAS && dlg->remote.info->tag.slen
+    //		      && dlg->remote.tag_hval != 0), PJ_EBUG);
+
+    /* Lock the user agent. */
+    pj_mutex_lock(mod_ua.mutex);
+
+    /* For UAC, check if there is existing dialog in the same set. */
+    if (dlg->role == PJSIP_ROLE_UAC) {
+	struct dlg_set *dlg_set;
+
+	dlg_set = pj_hash_get( mod_ua.dlg_table, dlg->local.info->tag.ptr, 
+			       dlg->local.info->tag.slen,
+			       &dlg->local.tag_hval);
+
+	if (dlg_set) {
+	    /* This is NOT the first dialog in the dialog set. 
+	     * Just add this dialog in the list.
+	     */
+	    pj_assert(dlg_set->dlg_list.next != (void*)&dlg_set->dlg_list);
+	    pj_list_push_back(&dlg_set->dlg_list, dlg);
+
+	    dlg->dlg_set = dlg_set;
+
+	} else {
+	    /* This is the first dialog in the dialog set. 
+	     * Create the dialog set and add this dialog to it.
+	     */
+	    dlg_set = alloc_dlgset_node();
+	    pj_list_init(&dlg_set->dlg_list);
+	    pj_list_push_back(&dlg_set->dlg_list, dlg);
+
+	    dlg->dlg_set = dlg_set;
+
+	    /* Register the dialog set in the hash table. */
+	    pj_hash_set_np(mod_ua.dlg_table, 
+			   dlg->local.info->tag.ptr, dlg->local.info->tag.slen,
+			   dlg->local.tag_hval, dlg_set->ht_entry, dlg_set);
+	}
+
+    } else {
+	/* For UAS, create the dialog set with a single dialog as member. */
+	struct dlg_set *dlg_set;
+
+	dlg_set = alloc_dlgset_node();
+	pj_list_init(&dlg_set->dlg_list);
+	pj_list_push_back(&dlg_set->dlg_list, dlg);
+
+	dlg->dlg_set = dlg_set;
+
+	pj_hash_set_np(mod_ua.dlg_table, 
+		       dlg->local.info->tag.ptr, dlg->local.info->tag.slen,
+		       dlg->local.tag_hval, dlg_set->ht_entry, dlg_set);
+    }
+
+    /* Unlock user agent. */
+    pj_mutex_unlock(mod_ua.mutex);
+
+    /* Done. */
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_ua_unregister_dlg( pjsip_user_agent *ua,
+					     pjsip_dialog *dlg )
+{
+    struct dlg_set *dlg_set;
+    pjsip_dialog *d;
+
+    /* Sanity-check arguments. */
+    PJ_ASSERT_RETURN(ua && dlg, PJ_EINVAL);
+
+    /* Check that dialog has been registered. */
+    PJ_ASSERT_RETURN(dlg->dlg_set, PJ_EINVALIDOP);
+
+    /* Lock user agent. */
+    pj_mutex_lock(mod_ua.mutex);
+
+    /* Find this dialog from the dialog set. */
+    dlg_set = dlg->dlg_set;
+    d = dlg_set->dlg_list.next;
+    while (d != (pjsip_dialog*)&dlg_set->dlg_list && d != dlg) {
+	d = d->next;
+    }
+
+    if (d != dlg) {
+	pj_assert(!"Dialog is not registered!");
+	pj_mutex_unlock(mod_ua.mutex);
+	return PJ_EINVALIDOP;
+    }
+
+    /* Remove this dialog from the list. */
+    pj_list_erase(dlg);
+
+    /* If dialog list is empty, remove the dialog set from the hash table. */
+    if (pj_list_empty(&dlg_set->dlg_list)) {
+	pj_hash_set(NULL, mod_ua.dlg_table, dlg->local.info->tag.ptr,
+		    dlg->local.info->tag.slen, dlg->local.tag_hval, NULL);
+
+	/* Return dlg_set to free nodes. */
+	pj_list_push_back(&mod_ua.free_dlgset_nodes, dlg_set);
+    }
+
+    /* Unlock user agent. */
+    pj_mutex_unlock(mod_ua.mutex);
+
+    /* Done. */
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pjsip_dialog*) pjsip_rdata_get_dlg( pjsip_rx_data *rdata )
+{
+    return rdata->endpt_info.mod_data[mod_ua.mod.id];
+}
+
+PJ_DEF(pjsip_dialog*) pjsip_tsx_get_dlg( pjsip_transaction *tsx )
+{
+    return tsx->mod_data[mod_ua.mod.id];
+}
+
+
+/* 
+ * Find a dialog.
+ */
+PJ_DEF(pjsip_dialog*) pjsip_ua_find_dialog(const pj_str_t *call_id,
+					   const pj_str_t *local_tag,
+					   const pj_str_t *remote_tag,
+					   pj_bool_t lock_dialog)
+{
+    struct dlg_set *dlg_set;
+    pjsip_dialog *dlg;
+
+    PJ_ASSERT_RETURN(call_id && local_tag && remote_tag, NULL);
+
+    /* Lock user agent. */
+    pj_mutex_lock(mod_ua.mutex);
+
+    /* Lookup the dialog set. */
+    dlg_set = pj_hash_get(mod_ua.dlg_table, local_tag->ptr, local_tag->slen,
+			  NULL);
+    if (dlg_set == NULL) {
+	/* Not found */
+	pj_mutex_unlock(mod_ua.mutex);
+	return NULL;
+    }
+
+    /* Dialog set is found, now find the matching dialog based on the
+     * remote tag.
+     */
+    dlg = dlg_set->dlg_list.next;
+    while (dlg != (pjsip_dialog*)&dlg_set->dlg_list) {	
+	if (pj_strcmp(&dlg->remote.info->tag, remote_tag) == 0)
+	    break;
+	dlg = dlg->next;
+    }
+
+    if (dlg == (pjsip_dialog*)&dlg_set->dlg_list) {
+	/* Not found */
+	pj_mutex_unlock(mod_ua.mutex);
+	return NULL;
+    }
+
+    /* Dialog has been found. It SHOULD have the right Call-ID!! */
+    PJ_ASSERT_ON_FAIL(pj_strcmp(&dlg->call_id->id, call_id)==0, 
+			{pj_mutex_unlock(mod_ua.mutex); return NULL;});
+
+    if (lock_dialog) {
+	if (pjsip_dlg_try_inc_lock(dlg) != PJ_SUCCESS) {
+
+	    /*
+	     * Unable to acquire dialog's lock while holding the user
+	     * agent's mutex. Release the UA mutex before retrying once
+	     * more.
+	     *
+	     * THIS MAY CAUSE RACE CONDITION!
+	     */
+
+	    /* Unlock user agent. */
+	    pj_mutex_unlock(mod_ua.mutex);
+	    /* Lock dialog */
+	    pjsip_dlg_inc_lock(dlg);
+
+	} else {
+	    /* Unlock user agent. */
+	    pj_mutex_unlock(mod_ua.mutex);
+	}
+
+    } else {
+	/* Unlock user agent. */
+	pj_mutex_unlock(mod_ua.mutex);
+    }
+
+    return dlg;
+}
+
+
+/*
+ * Find the first dialog in dialog set in hash table for an incoming message.
+ */
+static struct dlg_set *find_dlg_set_for_msg( pjsip_rx_data *rdata )
+{
+    /* CANCEL message doesn't have To tag, so we must lookup the dialog
+     * by finding the INVITE UAS transaction being cancelled.
+     */
+    if (rdata->msg_info.cseq->method.id == PJSIP_CANCEL_METHOD) {
+
+	pjsip_dialog *dlg;
+
+	/* Create key for the rdata, but this time, use INVITE as the
+	 * method.
+	 */
+	pj_str_t key;
+	pjsip_role_e role;
+	pjsip_transaction *tsx;
+
+	if (rdata->msg_info.msg->type == PJSIP_REQUEST_MSG)
+	    role = PJSIP_ROLE_UAS;
+	else
+	    role = PJSIP_ROLE_UAC;
+
+	pjsip_tsx_create_key(rdata->tp_info.pool, &key, role, 
+			     &pjsip_invite_method, rdata);
+
+	/* Lookup the INVITE transaction */
+	tsx = pjsip_tsx_layer_find_tsx(&key, PJ_TRUE);
+
+	/* We should find the dialog attached to the INVITE transaction */
+	if (tsx) {
+	    dlg = tsx->mod_data[mod_ua.mod.id];
+	    pj_mutex_unlock(tsx->mutex);
+
+	    /* Dlg may be NULL on some extreme condition
+	     * (e.g. during debugging where initially there is a dialog)
+	     */
+	    return dlg ? dlg->dlg_set : NULL;
+
+	} else {
+	    return NULL;
+	}
+
+
+    } else {
+	pj_str_t *tag;
+	struct dlg_set *dlg_set;
+
+	if (rdata->msg_info.msg->type == PJSIP_REQUEST_MSG)
+	    tag = &rdata->msg_info.to->tag;
+	else
+	    tag = &rdata->msg_info.from->tag;
+
+	/* Lookup the dialog set. */
+	dlg_set = pj_hash_get(mod_ua.dlg_table, tag->ptr, tag->slen, NULL);
+	return dlg_set;
+    }
+}
+
+/* On received requests. */
+static pj_bool_t mod_ua_on_rx_request(pjsip_rx_data *rdata)
+{
+    struct dlg_set *dlg_set;
+    pj_str_t *from_tag;
+    pjsip_dialog *dlg;
+    pj_status_t status;
+
+    /* Optimized path: bail out early if request is not CANCEL and it doesn't
+     * have To tag 
+     */
+    if (rdata->msg_info.to->tag.slen == 0 && 
+	rdata->msg_info.msg->line.req.method.id != PJSIP_CANCEL_METHOD)
+    {
+	return PJ_FALSE;
+    }
+
+retry_on_deadlock:
+
+    /* Lock user agent before looking up the dialog hash table. */
+    pj_mutex_lock(mod_ua.mutex);
+
+    /* Lookup the dialog set, based on the To tag header. */
+    dlg_set = find_dlg_set_for_msg(rdata);
+
+    /* If dialog is not found, respond with 481 (Call/Transaction
+     * Does Not Exist).
+     */
+    if (dlg_set == NULL) {
+	/* Unable to find dialog. */
+	pj_mutex_unlock(mod_ua.mutex);
+
+	if (rdata->msg_info.msg->line.req.method.id != PJSIP_ACK_METHOD) {
+	    PJ_LOG(5,(THIS_FILE, 
+		      "Unable to find dialogset for %s, answering with 481",
+		      pjsip_rx_data_get_info(rdata)));
+
+	    /* Respond with 481 . */
+	    pjsip_endpt_respond_stateless( mod_ua.endpt, rdata, 481, NULL, 
+					   NULL, NULL );
+	}
+	return PJ_TRUE;
+    }
+
+    /* Dialog set has been found.
+     * Find the dialog in the dialog set based on the content of the remote 
+     * tag.
+     */
+    from_tag = &rdata->msg_info.from->tag;
+    dlg = dlg_set->dlg_list.next;
+    while (dlg != (pjsip_dialog*)&dlg_set->dlg_list) {
+	
+	if (pj_strcmp(&dlg->remote.info->tag, from_tag) == 0)
+	    break;
+
+	dlg = dlg->next;
+    }
+
+    /* Dialog may not be found, e.g. in this case:
+     *	- UAC sends SUBSCRIBE, then UAS sends NOTIFY before answering
+     *    SUBSCRIBE request with 2xx.
+     *
+     * In this case, we can accept the request ONLY when the original 
+     * dialog still has empty To tag.
+     */
+    if (dlg == (pjsip_dialog*)&dlg_set->dlg_list) {
+
+	pjsip_dialog *first_dlg = dlg_set->dlg_list.next;
+
+	if (first_dlg->remote.info->tag.slen != 0) {
+	    /* Not found. Mulfunction UAC? */
+	    pj_mutex_unlock(mod_ua.mutex);
+
+	    if (rdata->msg_info.msg->line.req.method.id != PJSIP_ACK_METHOD) {
+		PJ_LOG(5,(THIS_FILE, 
+		          "Unable to find dialog for %s, answering with 481",
+		          pjsip_rx_data_get_info(rdata)));
+
+		pjsip_endpt_respond_stateless(mod_ua.endpt, rdata,
+					      PJSIP_SC_CALL_TSX_DOES_NOT_EXIST, 
+					      NULL, NULL, NULL);
+	    } else {
+		PJ_LOG(5,(THIS_FILE, 
+		          "Unable to find dialog for %s",
+		          pjsip_rx_data_get_info(rdata)));
+	    }
+	    return PJ_TRUE;
+	}
+
+	dlg = first_dlg;
+    }
+
+    /* Mark the dialog id of the request. */
+    rdata->endpt_info.mod_data[mod_ua.mod.id] = dlg;
+
+    /* Try to lock the dialog */
+    PJ_LOG(6,(dlg->obj_name, "UA layer acquiring dialog lock for request"));
+    status = pjsip_dlg_try_inc_lock(dlg);
+    if (status != PJ_SUCCESS) {
+	/* Failed to acquire dialog mutex immediately, this could be 
+	 * because of deadlock. Release UA mutex, yield, and retry 
+	 * the whole thing once again.
+	 */
+	pj_mutex_unlock(mod_ua.mutex);
+	pj_thread_sleep(0);
+	goto retry_on_deadlock;
+    }
+
+    /* Done with processing in UA layer, release lock */
+    pj_mutex_unlock(mod_ua.mutex);
+
+    /* Pass to dialog. */
+    pjsip_dlg_on_rx_request(dlg, rdata);
+
+    /* Unlock the dialog. This may destroy the dialog */
+    pjsip_dlg_dec_lock(dlg);
+
+    /* Report as handled. */
+    return PJ_TRUE;
+}
+
+
+/* On rx response notification.
+ */
+static pj_bool_t mod_ua_on_rx_response(pjsip_rx_data *rdata)
+{
+    pjsip_transaction *tsx;
+    struct dlg_set *dlg_set;
+    pjsip_dialog *dlg;
+    pj_status_t status;
+
+    /*
+     * Find the dialog instance for the response.
+     * All outgoing dialog requests are sent statefully, which means
+     * there will be an UAC transaction associated with this response,
+     * and the dialog instance will be recorded in that transaction.
+     *
+     * But even when transaction is found, there is possibility that
+     * the response is a forked response.
+     */
+
+retry_on_deadlock:
+
+    dlg = NULL;
+
+    /* Lock user agent dlg table before we're doing anything. */
+    pj_mutex_lock(mod_ua.mutex);
+
+    /* Check if transaction is present. */
+    tsx = pjsip_rdata_get_tsx(rdata);
+    if (tsx) {
+	/* Check if dialog is present in the transaction. */
+	dlg = pjsip_tsx_get_dlg(tsx);
+	if (!dlg) {
+	    /* Unlock dialog hash table. */
+	    pj_mutex_unlock(mod_ua.mutex);
+	    return PJ_FALSE;
+	}
+
+	/* Get the dialog set. */
+	dlg_set = dlg->dlg_set;
+
+	/* Even if transaction is found and (candidate) dialog has been 
+	 * identified, it's possible that the request has forked.
+	 */
+
+    } else {
+	/* Transaction is not present.
+	 * Check if this is a 2xx/OK response to INVITE, which in this
+	 * case the response will be handled directly by the
+	 * dialog.
+	 */
+	pjsip_cseq_hdr *cseq_hdr = rdata->msg_info.cseq;
+
+	if (cseq_hdr->method.id != PJSIP_INVITE_METHOD ||
+	    rdata->msg_info.msg->line.status.code / 100 != 2)
+	{
+	    /* Not a 2xx response to INVITE.
+	     * This must be some stateless response sent by other modules,
+	     * or a very late response.
+	     */
+	    /* Unlock dialog hash table. */
+	    pj_mutex_unlock(mod_ua.mutex);
+	    return PJ_FALSE;
+	}
+
+
+	/* Get the dialog set. */
+	dlg_set = pj_hash_get(mod_ua.dlg_table, 
+			      rdata->msg_info.from->tag.ptr,
+			      rdata->msg_info.from->tag.slen,
+			      NULL);
+
+	if (!dlg_set) {
+	    /* Unlock dialog hash table. */
+	    pj_mutex_unlock(mod_ua.mutex);
+
+	    /* Strayed 2xx response!! */
+	    PJ_LOG(4,(THIS_FILE, 
+		      "Received strayed 2xx response (no dialog is found)"
+		      " from %s:%d: %s",
+		      rdata->pkt_info.src_name, rdata->pkt_info.src_port,
+		      pjsip_rx_data_get_info(rdata)));
+
+	    return PJ_TRUE;
+	}
+    }
+
+    /* At this point, we must have the dialog set, and the dialog set
+     * must have a dialog in the list.
+     */
+    pj_assert(dlg_set && !pj_list_empty(&dlg_set->dlg_list));
+
+    /* Check for forked response. 
+     * Request will fork only for the initial INVITE request.
+     */
+
+    //This doesn't work when there is authentication challenge, since 
+    //first_cseq evaluation will yield false.
+    //if (rdata->msg_info.cseq->method.id == PJSIP_INVITE_METHOD &&
+    //	rdata->msg_info.cseq->cseq == dlg_set->dlg_list.next->local.first_cseq)
+
+    if (rdata->msg_info.cseq->method.id == PJSIP_INVITE_METHOD) {
+	
+	int st_code = rdata->msg_info.msg->line.status.code;
+	pj_str_t *to_tag = &rdata->msg_info.to->tag;
+
+	dlg = dlg_set->dlg_list.next;
+
+	while (dlg != (pjsip_dialog*)&dlg_set->dlg_list) {
+
+	    /* If there is dialog with no remote tag (i.e. dialog has not
+	     * been established yet), then send this response to that
+	     * dialog.
+	     */
+	    if (dlg->remote.info->tag.slen == 0)
+		break;
+
+	    /* Otherwise find the one with matching To tag. */
+	    if (pj_strcmp(to_tag, &dlg->remote.info->tag) == 0)
+		break;
+
+	    dlg = dlg->next;
+	}
+
+	/* If no dialog with matching remote tag is found, this must be
+	 * a forked response. Respond to this ONLY when response is non-100
+	 * provisional response OR a 2xx response.
+	 */
+	if (dlg == (pjsip_dialog*)&dlg_set->dlg_list &&
+	    ((st_code/100==1 && st_code!=100) || st_code/100==2)) 
+	{
+
+	    PJ_LOG(5,(THIS_FILE, 
+		      "Received forked %s for existing dialog %s",
+		      pjsip_rx_data_get_info(rdata), 
+		      dlg_set->dlg_list.next->obj_name));
+
+	    /* Report to application about forked condition.
+	     * Application can either create a dialog or ignore the response.
+	     */
+	    if (mod_ua.param.on_dlg_forked) {
+		dlg = (*mod_ua.param.on_dlg_forked)(dlg_set->dlg_list.next, 
+						    rdata);
+	    } else {
+		dlg = dlg_set->dlg_list.next;
+
+		PJ_LOG(4,(THIS_FILE, 
+			  "Unhandled forked %s from %s:%d, response will be "
+			  "handed over to the first dialog",
+			  pjsip_rx_data_get_info(rdata),
+			  rdata->pkt_info.src_name, rdata->pkt_info.src_port));
+	    }
+
+	} else if (dlg == (pjsip_dialog*)&dlg_set->dlg_list) {
+
+	    /* For 100 or non-2xx response which has different To tag,
+	     * pass the response to the first dialog.
+	     */
+
+	    dlg = dlg_set->dlg_list.next;
+
+	}
+
+    } else {
+	/* Either this is a non-INVITE response, or subsequent INVITE
+	 * within dialog. The dialog should have been identified when
+	 * the transaction was found.
+	 */
+	pj_assert(tsx != NULL);
+	pj_assert(dlg != NULL);
+    }
+
+    /* The dialog must have been found. */
+    pj_assert(dlg != NULL);
+
+    /* Put the dialog instance in the rdata. */
+    rdata->endpt_info.mod_data[mod_ua.mod.id] = dlg;
+
+    /* Attempt to acquire lock to the dialog. */
+    PJ_LOG(6,(dlg->obj_name, "UA layer acquiring dialog lock for response"));
+    status = pjsip_dlg_try_inc_lock(dlg);
+    if (status != PJ_SUCCESS) {
+	/* Failed to acquire dialog mutex. This could indicate a deadlock
+	 * situation, and for safety, try to avoid deadlock by releasing
+	 * UA mutex, yield, and retry the whole processing once again.
+	 */
+	pj_mutex_unlock(mod_ua.mutex);
+	pj_thread_sleep(0);
+	goto retry_on_deadlock;
+    }
+
+    /* We're done with processing in the UA layer, we can release the mutex */
+    pj_mutex_unlock(mod_ua.mutex);
+
+    /* Pass the response to the dialog. */
+    pjsip_dlg_on_rx_response(dlg, rdata);
+
+    /* Unlock the dialog. This may destroy the dialog. */
+    pjsip_dlg_dec_lock(dlg);
+
+    /* Done. */
+    return PJ_TRUE;
+}
+
+
+#if PJ_LOG_MAX_LEVEL >= 3
+static void print_dialog( const char *title,
+			  pjsip_dialog *dlg, char *buf, pj_size_t size)
+{
+    int len;
+    char userinfo[128];
+
+    len = pjsip_hdr_print_on(dlg->remote.info, userinfo, sizeof(userinfo));
+    if (len < 1)
+	pj_ansi_strcpy(userinfo, "<--uri too long-->");
+    else
+	userinfo[len] = '\0';
+    
+    len = pj_ansi_snprintf(buf, size, "%s[%s]  %s",
+			   title,
+			   (dlg->state==PJSIP_DIALOG_STATE_NULL ? " - " :
+							     "est"),
+		      userinfo);
+    if (len < 1 || len >= (int)size) {
+	pj_ansi_strcpy(buf, "<--uri too long-->");
+    } else
+	buf[len] = '\0';
+}
+#endif
+
+/*
+ * Dump user agent contents (e.g. all dialogs).
+ */
+PJ_DEF(void) pjsip_ua_dump(pj_bool_t detail)
+{
+#if PJ_LOG_MAX_LEVEL >= 3
+    pj_hash_iterator_t itbuf, *it;
+    char dlginfo[128];
+
+    pj_mutex_lock(mod_ua.mutex);
+
+    PJ_LOG(3, (THIS_FILE, "Number of dialog sets: %u", 
+			  pj_hash_count(mod_ua.dlg_table)));
+
+    if (detail && pj_hash_count(mod_ua.dlg_table)) {
+	PJ_LOG(3, (THIS_FILE, "Dumping dialog sets:"));
+	it = pj_hash_first(mod_ua.dlg_table, &itbuf);
+	for (; it != NULL; it = pj_hash_next(mod_ua.dlg_table, it))  {
+	    struct dlg_set *dlg_set;
+	    pjsip_dialog *dlg;
+	    const char *title;
+
+	    dlg_set = pj_hash_this(mod_ua.dlg_table, it);
+	    if (!dlg_set || pj_list_empty(&dlg_set->dlg_list)) continue;
+
+	    /* First dialog in dialog set. */
+	    dlg = dlg_set->dlg_list.next;
+	    if (dlg->role == PJSIP_ROLE_UAC)
+		title = "  [out] ";
+	    else
+		title = "  [in]  ";
+
+	    print_dialog(title, dlg, dlginfo, sizeof(dlginfo));
+	    PJ_LOG(3,(THIS_FILE, "%s", dlginfo));
+
+	    /* Next dialog in dialog set (forked) */
+	    dlg = dlg->next;
+	    while (dlg != (pjsip_dialog*) &dlg_set->dlg_list) {
+		print_dialog("    [forked] ", dlg, dlginfo, sizeof(dlginfo));
+		dlg = dlg->next;
+	    }
+	}
+    }
+
+    pj_mutex_unlock(mod_ua.mutex);
+#endif
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_uri.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_uri.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_uri.c	(revision 1163)
@@ -0,0 +1,601 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_uri.h>
+#include <pjsip/sip_msg.h>
+#include <pjsip/sip_parser.h>
+#include <pjsip/print_util.h>
+#include <pjsip/sip_errno.h>
+#include <pjlib-util/string.h>
+#include <pj/string.h>
+#include <pj/pool.h>
+#include <pj/assert.h>
+
+/*
+ * Generic parameter manipulation.
+ */
+PJ_DEF(pjsip_param*) pjsip_param_find(  pjsip_param *param_list,
+					const pj_str_t *name )
+{
+    pjsip_param *p = param_list->next;
+    while (p != param_list) {
+	if (pj_stricmp(&p->name, name)==0)
+	    return p;
+	p = p->next;
+    }
+    return NULL;
+}
+
+PJ_DEF(const pjsip_param*) pjsip_param_cfind( const pjsip_param *param_list,
+					      const pj_str_t *name )
+{
+    const pjsip_param *p = param_list->next;
+    while (p != param_list) {
+	if (pj_stricmp_alnum(&p->name, name)==0)
+	    return p;
+	p = p->next;
+    }
+    return NULL;
+}
+
+PJ_DEF(void) pjsip_param_clone( pj_pool_t *pool, pjsip_param *dst_list,
+				const pjsip_param *src_list)
+{
+    const pjsip_param *p = src_list->next;
+
+    pj_list_init(dst_list);
+    while (p != src_list) {
+	pjsip_param *new_param = pj_pool_alloc(pool, sizeof(pjsip_param));
+	pj_strdup(pool, &new_param->name, &p->name);
+	pj_strdup(pool, &new_param->value, &p->value);
+	pj_list_insert_before(dst_list, new_param);
+	p = p->next;
+    }
+}
+
+
+PJ_DEF(void) pjsip_param_shallow_clone( pj_pool_t *pool, 
+					pjsip_param *dst_list,
+					const pjsip_param *src_list)
+{
+    const pjsip_param *p = src_list->next;
+
+    pj_list_init(dst_list);
+    while (p != src_list) {
+	pjsip_param *new_param = pj_pool_alloc(pool, sizeof(pjsip_param));
+	new_param->name = p->name;
+	new_param->value = p->value;
+	pj_list_insert_before(dst_list, new_param);
+	p = p->next;
+    }
+}
+
+PJ_DEF(pj_ssize_t) pjsip_param_print_on( const pjsip_param *param_list,
+					 char *buf, pj_size_t size,
+					 const pj_cis_t *pname_spec,
+					 const pj_cis_t *pvalue_spec,
+					 int sep)
+{
+    const pjsip_param *p;
+    char *startbuf;
+    char *endbuf;
+    int printed;
+
+    p = param_list->next;
+    if (p == param_list)
+	return 0;
+
+    startbuf = buf;
+    endbuf = buf + size;
+
+    PJ_UNUSED_ARG(pname_spec);
+
+    do {
+	*buf++ = (char)sep;
+	copy_advance_escape(buf, p->name, (*pname_spec));
+	if (p->value.slen) {
+	    *buf++ = '=';
+	    copy_advance_escape(buf, p->value, (*pvalue_spec));
+	}
+	p = p->next;
+	if (sep == '?') sep = '&';
+    } while (p != param_list);
+
+    return buf-startbuf;
+}
+
+
+/*
+ * URI stuffs
+ */
+#define IS_SIPS(url)	((url)->vptr==&sips_url_vptr)
+
+static const pj_str_t *pjsip_url_get_scheme( const pjsip_sip_uri* );
+static const pj_str_t *pjsips_url_get_scheme( const pjsip_sip_uri* );
+static const pj_str_t *pjsip_name_addr_get_scheme( const pjsip_name_addr * );
+static void *pjsip_get_uri( pjsip_uri *uri );
+static void *pjsip_name_addr_get_uri( pjsip_name_addr *name );
+
+static pj_str_t sip_str = { "sip", 3 };
+static pj_str_t sips_str = { "sips", 4 };
+
+#ifdef __GNUC__
+#  define HAPPY_FLAG	(void*)
+#else
+#  define HAPPY_FLAG
+#endif
+
+static pjsip_name_addr* pjsip_name_addr_clone( pj_pool_t *pool, 
+					       const pjsip_name_addr *rhs);
+static pj_ssize_t pjsip_name_addr_print(pjsip_uri_context_e context,
+					const pjsip_name_addr *name, 
+					char *buf, pj_size_t size);
+static int pjsip_name_addr_compare(  pjsip_uri_context_e context,
+				     const pjsip_name_addr *naddr1,
+				     const pjsip_name_addr *naddr2);
+static pj_ssize_t pjsip_url_print(  pjsip_uri_context_e context,
+				    const pjsip_sip_uri *url, 
+				    char *buf, pj_size_t size);
+static int pjsip_url_compare( pjsip_uri_context_e context,
+			      const pjsip_sip_uri *url1, 
+			      const pjsip_sip_uri *url2);
+static pjsip_sip_uri* pjsip_url_clone(pj_pool_t *pool, 
+				      const pjsip_sip_uri *rhs);
+
+static pjsip_uri_vptr sip_url_vptr = 
+{
+    HAPPY_FLAG &pjsip_url_get_scheme,
+    HAPPY_FLAG &pjsip_get_uri,
+    HAPPY_FLAG &pjsip_url_print,
+    HAPPY_FLAG &pjsip_url_compare,
+    HAPPY_FLAG &pjsip_url_clone
+};
+
+static pjsip_uri_vptr sips_url_vptr = 
+{
+    HAPPY_FLAG &pjsips_url_get_scheme,
+    HAPPY_FLAG &pjsip_get_uri,
+    HAPPY_FLAG &pjsip_url_print,
+    HAPPY_FLAG &pjsip_url_compare,
+    HAPPY_FLAG &pjsip_url_clone
+};
+
+static pjsip_uri_vptr name_addr_vptr = 
+{
+    HAPPY_FLAG &pjsip_name_addr_get_scheme,
+    HAPPY_FLAG &pjsip_name_addr_get_uri,
+    HAPPY_FLAG &pjsip_name_addr_print,
+    HAPPY_FLAG &pjsip_name_addr_compare,
+    HAPPY_FLAG &pjsip_name_addr_clone
+};
+
+static const pj_str_t *pjsip_url_get_scheme(const pjsip_sip_uri *url)
+{
+    PJ_UNUSED_ARG(url);
+    return &sip_str;
+}
+
+static const pj_str_t *pjsips_url_get_scheme(const pjsip_sip_uri *url)
+{
+    PJ_UNUSED_ARG(url);
+    return &sips_str;
+}
+
+static void *pjsip_get_uri( pjsip_uri *uri )
+{
+    return uri;
+}
+
+static void *pjsip_name_addr_get_uri( pjsip_name_addr *name )
+{
+    return pjsip_uri_get_uri(name->uri);
+}
+
+PJ_DEF(void) pjsip_sip_uri_set_secure( pjsip_sip_uri *url, 
+				       pj_bool_t secure )
+{
+    url->vptr = secure ? &sips_url_vptr : &sip_url_vptr;
+}
+
+PJ_DEF(void) pjsip_sip_uri_init(pjsip_sip_uri *url, pj_bool_t secure)
+{
+    pj_bzero(url, sizeof(*url));
+    url->ttl_param = -1;
+    pjsip_sip_uri_set_secure(url, secure);
+    pj_list_init(&url->other_param);
+    pj_list_init(&url->header_param);
+}
+
+PJ_DEF(pjsip_sip_uri*) pjsip_sip_uri_create( pj_pool_t *pool, 
+					     pj_bool_t secure )
+{
+    pjsip_sip_uri *url = pj_pool_alloc(pool, sizeof(pjsip_sip_uri));
+    pjsip_sip_uri_init(url, secure);
+    return url;
+}
+
+static pj_ssize_t pjsip_url_print(  pjsip_uri_context_e context,
+				    const pjsip_sip_uri *url, 
+				    char *buf, pj_size_t size)
+{
+    int printed;
+    char *startbuf = buf;
+    char *endbuf = buf+size;
+    const pj_str_t *scheme;
+
+    *buf = '\0';
+
+    /* Print scheme ("sip:" or "sips:") */
+    scheme = pjsip_uri_get_scheme(url);
+    copy_advance_check(buf, *scheme);
+    *buf++ = ':';
+
+    /* Print "user:password@", if any. */
+    if (url->user.slen) {
+	copy_advance_escape(buf, url->user, pjsip_USER_SPEC);
+	if (url->passwd.slen) {
+	    *buf++ = ':';
+	    copy_advance_escape(buf, url->passwd, pjsip_PASSWD_SPEC);
+	}
+
+	*buf++ = '@';
+    }
+
+    /* Print host. */
+    pj_assert(url->host.slen != 0);
+    copy_advance_check(buf, url->host);
+
+    /* Only print port if it is explicitly specified. 
+     * Port is not allowed in To and From header.
+     */
+    /* Unfortunately some UA requires us to send back the port
+     * number exactly as it was sent. We don't remember whether an
+     * UA has sent us port, so we'll just send the port indiscrimately
+     */
+    //PJ_TODO(SHOULD_DISALLOW_URI_PORT_IN_FROM_TO_HEADER)
+    if (url->port && context != PJSIP_URI_IN_FROMTO_HDR) {
+	if (endbuf - buf < 10)
+	    return -1;
+
+	*buf++ = ':';
+	printed = pj_utoa(url->port, buf);
+	buf += printed;
+    }
+
+    /* User param is allowed in all contexes */
+    copy_advance_pair_check(buf, ";user=", 6, url->user_param);
+
+    /* Method param is only allowed in external/other context. */
+    if (context == PJSIP_URI_IN_OTHER) {
+	copy_advance_pair_escape(buf, ";method=", 8, url->method_param, 
+				 pjsip_PARAM_CHAR_SPEC);
+    }
+
+    /* Transport is not allowed in From/To header. */
+    if (context != PJSIP_URI_IN_FROMTO_HDR) {
+	copy_advance_pair_escape(buf, ";transport=", 11, url->transport_param,
+				 pjsip_PARAM_CHAR_SPEC);
+    }
+
+    /* TTL param is not allowed in From, To, Route, and Record-Route header. */
+    if (url->ttl_param >= 0 && context != PJSIP_URI_IN_FROMTO_HDR &&
+	context != PJSIP_URI_IN_ROUTING_HDR) 
+    {
+	if (endbuf - buf < 15)
+	    return -1;
+	pj_memcpy(buf, ";ttl=", 5);
+	printed = pj_utoa(url->ttl_param, buf+5);
+	buf += printed + 5;
+    }
+
+    /* maddr param is not allowed in From and To header. */
+    if (context != PJSIP_URI_IN_FROMTO_HDR) {
+	copy_advance_pair_escape(buf, ";maddr=", 7, url->maddr_param,
+				 pjsip_PARAM_CHAR_SPEC);
+    }
+
+    /* lr param is not allowed in From, To, and Contact header. */
+    if (url->lr_param && context != PJSIP_URI_IN_FROMTO_HDR &&
+	context != PJSIP_URI_IN_CONTACT_HDR) 
+    {
+	pj_str_t lr = { ";lr", 3 };
+	if (endbuf - buf < 3)
+	    return -1;
+	copy_advance_check(buf, lr);
+    }
+
+    /* Other param. */
+    printed = pjsip_param_print_on(&url->other_param, buf, endbuf-buf, 
+				   &pjsip_PARAM_CHAR_SPEC, 
+				   &pjsip_PARAM_CHAR_SPEC, ';');
+    if (printed < 0)
+	return -1;
+    buf += printed;
+
+    /* Header param. 
+     * Header param is only allowed in these contexts:
+     *	- PJSIP_URI_IN_CONTACT_HDR
+     *	- PJSIP_URI_IN_OTHER
+     */
+    if (context == PJSIP_URI_IN_CONTACT_HDR || context == PJSIP_URI_IN_OTHER) {
+	printed = pjsip_param_print_on(&url->header_param, buf, endbuf-buf,
+				       &pjsip_HDR_CHAR_SPEC, 
+				       &pjsip_HDR_CHAR_SPEC, '?');
+	if (printed < 0)
+	    return -1;
+	buf += printed;
+    }
+
+    *buf = '\0';
+    return buf-startbuf;
+}
+
+static pj_status_t pjsip_url_compare( pjsip_uri_context_e context,
+				      const pjsip_sip_uri *url1, 
+				      const pjsip_sip_uri *url2)
+{
+    const pjsip_param *p1;
+
+    /*
+     * Compare two SIP URL's according to Section 19.1.4 of RFC 3261.
+     */
+
+    /* SIP and SIPS URI are never equivalent. 
+     * Note: just compare the vptr to avoid string comparison. 
+     *       Pretty neat huh!!
+     */
+    if (url1->vptr != url2->vptr)
+	return PJSIP_ECMPSCHEME;
+
+    /* Comparison of the userinfo of SIP and SIPS URIs is case-sensitive. 
+     * This includes userinfo containing passwords or formatted as 
+     * telephone-subscribers.
+     */
+    if (pj_strcmp(&url1->user, &url2->user) != 0)
+	return PJSIP_ECMPUSER;
+    if (pj_strcmp(&url1->passwd, &url2->passwd) != 0)
+	return PJSIP_ECMPPASSWD;
+    
+    /* Comparison of all other components of the URI is
+     * case-insensitive unless explicitly defined otherwise.
+     */
+
+    /* The ordering of parameters and header fields is not significant 
+     * in comparing SIP and SIPS URIs.
+     */
+
+    /* Characters other than those in the reserved set (see RFC 2396 [5])
+     * are equivalent to their encoding.
+     */
+
+    /* An IP address that is the result of a DNS lookup of a host name 
+     * does not match that host name.
+     */
+    if (pj_stricmp(&url1->host, &url2->host) != 0)
+	return PJSIP_ECMPHOST;
+
+    /* A URI omitting any component with a default value will not match a URI
+     * explicitly containing that component with its default value. 
+     * For instance, a URI omitting the optional port component will not match
+     * a URI explicitly declaring port 5060. 
+     * The same is true for the transport-parameter, ttl-parameter, 
+     * user-parameter, and method components.
+     */
+
+    /* Port is not allowed in To and From header.
+     */
+    if (context != PJSIP_URI_IN_FROMTO_HDR) {
+	if (url1->port != url2->port)
+	    return PJSIP_ECMPPORT;
+    }
+    /* Transport is not allowed in From/To header. */
+    if (context != PJSIP_URI_IN_FROMTO_HDR) {
+	if (pj_stricmp(&url1->transport_param, &url2->transport_param) != 0)
+	    return PJSIP_ECMPTRANSPORTPRM;
+    }
+    /* TTL param is not allowed in From, To, Route, and Record-Route header. */
+    if (context != PJSIP_URI_IN_FROMTO_HDR &&
+	context != PJSIP_URI_IN_ROUTING_HDR)
+    {
+	if (url1->ttl_param != url2->ttl_param)
+	    return PJSIP_ECMPTTLPARAM;
+    }
+    /* User param is allowed in all contexes */
+    if (pj_stricmp(&url1->user_param, &url2->user_param) != 0)
+	return PJSIP_ECMPUSERPARAM;
+    /* Method param is only allowed in external/other context. */
+    if (context == PJSIP_URI_IN_OTHER) {
+	if (pj_stricmp(&url1->method_param, &url2->method_param) != 0)
+	    return PJSIP_ECMPMETHODPARAM;
+    }
+    /* maddr param is not allowed in From and To header. */
+    if (context != PJSIP_URI_IN_FROMTO_HDR) {
+	if (pj_stricmp(&url1->maddr_param, &url2->maddr_param) != 0)
+	    return PJSIP_ECMPMADDRPARAM;
+    }
+
+    /* lr parameter is ignored (?) */
+    /* lr param is not allowed in From, To, and Contact header. */
+
+
+    /* All other uri-parameters appearing in only one URI are ignored when 
+     * comparing the URIs.
+     */
+    p1 = url1->other_param.next;
+    while (p1 != &url1->other_param) {
+	const pjsip_param *p2;
+	p2 = pjsip_param_cfind(&url2->other_param, &p1->name);
+	if (p2 ) {
+	    if (pj_stricmp(&p1->value, &p2->value) != 0)
+		return PJSIP_ECMPOTHERPARAM;
+	}
+
+	p1 = p1->next;
+    }
+
+    /* URI header components are never ignored. Any present header component
+     * MUST be present in both URIs and match for the URIs to match. 
+     * The matching rules are defined for each header field in Section 20.
+     */
+    p1 = url1->header_param.next;
+    while (p1 != &url1->header_param) {
+	const pjsip_param *p2;
+	p2 = pjsip_param_cfind(&url2->header_param, &p1->name);
+	if (p2) {
+	    /* It seems too much to compare two header params according to
+	     * the rule of each header. We'll just compare them string to
+	     * string..
+	     */
+	    if (pj_stricmp(&p1->value, &p2->value) != 0)
+		return PJSIP_ECMPHEADERPARAM;
+	} else {
+	    return PJSIP_ECMPHEADERPARAM;
+	}
+	p1 = p1->next;
+    }
+
+    /* Equal!! Pheuww.. */
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(void) pjsip_sip_uri_assign(pj_pool_t *pool, pjsip_sip_uri *url, 
+				  const pjsip_sip_uri *rhs)
+{
+    pj_strdup( pool, &url->user, &rhs->user);
+    pj_strdup( pool, &url->passwd, &rhs->passwd);
+    pj_strdup( pool, &url->host, &rhs->host);
+    url->port = rhs->port;
+    pj_strdup( pool, &url->user_param, &rhs->user_param);
+    pj_strdup( pool, &url->method_param, &rhs->method_param);
+    pj_strdup( pool, &url->transport_param, &rhs->transport_param);
+    url->ttl_param = rhs->ttl_param;
+    pj_strdup( pool, &url->maddr_param, &rhs->maddr_param);
+    pjsip_param_clone(pool, &url->other_param, &rhs->other_param);
+    pjsip_param_clone(pool, &url->header_param, &rhs->header_param);
+    url->lr_param = rhs->lr_param;
+}
+
+static pjsip_sip_uri* pjsip_url_clone(pj_pool_t *pool, const pjsip_sip_uri *rhs)
+{
+    pjsip_sip_uri *url = pj_pool_alloc(pool, sizeof(pjsip_sip_uri));
+    if (!url)
+	return NULL;
+
+    pjsip_sip_uri_init(url, IS_SIPS(rhs));
+    pjsip_sip_uri_assign(pool, url, rhs);
+    return url;
+}
+
+static const pj_str_t *pjsip_name_addr_get_scheme(const pjsip_name_addr *name)
+{
+    pj_assert(name->uri != NULL);
+    return pjsip_uri_get_scheme(name->uri);
+}
+
+PJ_DEF(void) pjsip_name_addr_init(pjsip_name_addr *name)
+{
+    name->vptr = &name_addr_vptr;
+    name->uri = NULL;
+    name->display.slen = 0;
+}
+
+PJ_DEF(pjsip_name_addr*) pjsip_name_addr_create(pj_pool_t *pool)
+{
+    pjsip_name_addr *name_addr = pj_pool_alloc(pool, sizeof(pjsip_name_addr));
+    pjsip_name_addr_init(name_addr);
+    return name_addr;
+}
+
+static pj_ssize_t pjsip_name_addr_print(pjsip_uri_context_e context,
+					const pjsip_name_addr *name, 
+					char *buf, pj_size_t size)
+{
+    int printed;
+    char *startbuf = buf;
+    char *endbuf = buf + size;
+    pjsip_uri *uri;
+
+    uri = pjsip_uri_get_uri(name->uri);
+    pj_assert(uri != NULL);
+
+    if (context != PJSIP_URI_IN_REQ_URI) {
+	if (name->display.slen) {
+	    if (endbuf-buf < 8) return -1;
+	    *buf++ = '"';
+	    copy_advance(buf, name->display);
+	    *buf++ = '"';
+	    *buf++ = ' ';
+	}
+	*buf++ = '<';
+    }
+
+    printed = pjsip_uri_print(context,uri, buf, size-(buf-startbuf));
+    if (printed < 1)
+	return -1;
+    buf += printed;
+
+    if (context != PJSIP_URI_IN_REQ_URI) {
+	*buf++ = '>';
+    }
+
+    *buf = '\0';
+    return buf-startbuf;
+}
+
+PJ_DEF(void) pjsip_name_addr_assign(pj_pool_t *pool, pjsip_name_addr *dst,
+				    const pjsip_name_addr *src)
+{
+    pj_strdup( pool, &dst->display, &src->display);
+    dst->uri = pjsip_uri_clone(pool, src->uri);
+}
+
+static pjsip_name_addr* pjsip_name_addr_clone( pj_pool_t *pool, 
+					       const pjsip_name_addr *rhs)
+{
+    pjsip_name_addr *addr = pj_pool_alloc(pool, sizeof(pjsip_name_addr));
+    if (!addr)
+	return NULL;
+
+    pjsip_name_addr_init(addr);
+    pjsip_name_addr_assign(pool, addr, rhs);
+    return addr;
+}
+
+static int pjsip_name_addr_compare(  pjsip_uri_context_e context,
+				     const pjsip_name_addr *naddr1,
+				     const pjsip_name_addr *naddr2)
+{
+    int d;
+
+    /* I'm not sure whether display name is included in the comparison. */
+    if (pj_strcmp(&naddr1->display, &naddr2->display) != 0) {
+	return -1;
+    }
+
+    pj_assert( naddr1->uri != NULL );
+    pj_assert( naddr2->uri != NULL );
+
+    /* Compare name-addr as URL */
+    d = pjsip_uri_cmp( context, naddr1->uri, naddr2->uri);
+    if (d)
+	return d;
+
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_util.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_util.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_util.c	(revision 1163)
@@ -0,0 +1,1355 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_util.h>
+#include <pjsip/sip_transport.h>
+#include <pjsip/sip_msg.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_event.h>
+#include <pjsip/sip_transaction.h>
+#include <pjsip/sip_module.h>
+#include <pjsip/sip_errno.h>
+#include <pj/log.h>
+#include <pj/string.h>
+#include <pj/guid.h>
+#include <pj/pool.h>
+#include <pj/except.h>
+#include <pj/rand.h>
+#include <pj/assert.h>
+#include <pj/errno.h>
+
+#define THIS_FILE    "endpoint"
+
+static const char *event_str[] = 
+{
+    "UNIDENTIFIED",
+    "TIMER",
+    "TX_MSG",
+    "RX_MSG",
+    "TRANSPORT_ERROR",
+    "TSX_STATE",
+    "USER",
+};
+
+static pj_str_t str_TEXT = { "text", 4},
+		str_PLAIN = { "plain", 5 };
+
+/*
+ * Initialize transmit data (msg) with the headers and optional body.
+ * This will just put the headers in the message as it is. Be carefull
+ * when calling this function because once a header is put in a message, 
+ * it CAN NOT be put in other message until the first message is deleted, 
+ * because the way the header is put in the list.
+ * That's why the session will shallow_clone it's headers before calling
+ * this function.
+ */
+static void init_request_throw( pjsip_endpoint *endpt,
+                                pjsip_tx_data *tdata, 
+				pjsip_method *method,
+				pjsip_uri *param_target,
+				pjsip_from_hdr *param_from,
+				pjsip_to_hdr *param_to, 
+				pjsip_contact_hdr *param_contact,
+				pjsip_cid_hdr *param_call_id,
+				pjsip_cseq_hdr *param_cseq, 
+				const pj_str_t *param_text)
+{
+    pjsip_msg *msg;
+    pjsip_msg_body *body;
+    pjsip_via_hdr *via;
+    const pjsip_hdr *endpt_hdr;
+
+    /* Create the message. */
+    msg = tdata->msg = pjsip_msg_create(tdata->pool, PJSIP_REQUEST_MSG);
+
+    /* Init request URI. */
+    pj_memcpy(&msg->line.req.method, method, sizeof(*method));
+    msg->line.req.uri = param_target;
+
+    /* Add additional request headers from endpoint. */
+    endpt_hdr = pjsip_endpt_get_request_headers(endpt)->next;
+    while (endpt_hdr != pjsip_endpt_get_request_headers(endpt)) {
+	pjsip_hdr *hdr = pjsip_hdr_shallow_clone(tdata->pool, endpt_hdr);
+	pjsip_msg_add_hdr( tdata->msg, hdr );
+	endpt_hdr = endpt_hdr->next;
+    }
+
+    /* Add From header. */
+    if (param_from->tag.slen == 0)
+	pj_create_unique_string(tdata->pool, &param_from->tag);
+    pjsip_msg_add_hdr(msg, (void*)param_from);
+
+    /* Add To header. */
+    pjsip_msg_add_hdr(msg, (void*)param_to);
+
+    /* Add Contact header. */
+    if (param_contact) {
+	pjsip_msg_add_hdr(msg, (void*)param_contact);
+    }
+
+    /* Add Call-ID header. */
+    pjsip_msg_add_hdr(msg, (void*)param_call_id);
+
+    /* Add CSeq header. */
+    pjsip_msg_add_hdr(msg, (void*)param_cseq);
+
+    /* Add a blank Via header in the front of the message. */
+    via = pjsip_via_hdr_create(tdata->pool);
+    via->rport_param = 0;
+    pjsip_msg_insert_first_hdr(msg, (void*)via);
+
+    /* Add header params as request headers */
+    if (PJSIP_URI_SCHEME_IS_SIP(param_target) || 
+	PJSIP_URI_SCHEME_IS_SIPS(param_target)) 
+    {
+	pjsip_sip_uri *uri = (pjsip_sip_uri*) pjsip_uri_get_uri(param_target);
+	pjsip_param *hparam;
+
+	hparam = uri->header_param.next;
+	while (hparam != &uri->header_param) {
+	    pjsip_generic_string_hdr *hdr;
+
+	    hdr = pjsip_generic_string_hdr_create(tdata->pool, 
+						  &hparam->name,
+						  &hparam->value);
+	    pjsip_msg_add_hdr(msg, (pjsip_hdr*)hdr);
+	    hparam = hparam->next;
+	}
+    }
+
+    /* Create message body. */
+    if (param_text) {
+	body = pj_pool_calloc(tdata->pool, 1, sizeof(pjsip_msg_body));
+	body->content_type.type = str_TEXT;
+	body->content_type.subtype = str_PLAIN;
+	body->data = pj_pool_alloc(tdata->pool, param_text->slen );
+	pj_memcpy(body->data, param_text->ptr, param_text->slen);
+	body->len = param_text->slen;
+	body->print_body = &pjsip_print_text_body;
+	msg->body = body;
+    }
+
+    PJ_LOG(5,(THIS_FILE, "%s created.", 
+			 pjsip_tx_data_get_info(tdata)));
+
+}
+
+/*
+ * Create arbitrary request.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_create_request(  pjsip_endpoint *endpt, 
+						 const pjsip_method *method,
+						 const pj_str_t *param_target,
+						 const pj_str_t *param_from,
+						 const pj_str_t *param_to, 
+						 const pj_str_t *param_contact,
+						 const pj_str_t *param_call_id,
+						 int param_cseq, 
+						 const pj_str_t *param_text,
+						 pjsip_tx_data **p_tdata)
+{
+    pjsip_uri *target;
+    pjsip_tx_data *tdata;
+    pjsip_from_hdr *from;
+    pjsip_to_hdr *to;
+    pjsip_contact_hdr *contact;
+    pjsip_cseq_hdr *cseq = NULL;    /* = NULL, warning in VC6 */
+    pjsip_cid_hdr *call_id;
+    pj_str_t tmp;
+    pj_status_t status;
+    PJ_USE_EXCEPTION;
+
+    status = pjsip_endpt_create_tdata(endpt, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Init reference counter to 1. */
+    pjsip_tx_data_add_ref(tdata);
+
+    PJ_TRY {
+	/* Request target. */
+	pj_strdup_with_null(tdata->pool, &tmp, param_target);
+	target = pjsip_parse_uri( tdata->pool, tmp.ptr, tmp.slen, 0);
+	if (target == NULL) {
+	    status = PJSIP_EINVALIDREQURI;
+	    goto on_error;
+	}
+
+	/* From */
+	from = pjsip_from_hdr_create(tdata->pool);
+	pj_strdup_with_null(tdata->pool, &tmp, param_from);
+	from->uri = pjsip_parse_uri( tdata->pool, tmp.ptr, tmp.slen, 
+				     PJSIP_PARSE_URI_AS_NAMEADDR);
+	if (from->uri == NULL) {
+	    status = PJSIP_EINVALIDHDR;
+	    goto on_error;
+	}
+	pj_create_unique_string(tdata->pool, &from->tag);
+
+	/* To */
+	to = pjsip_to_hdr_create(tdata->pool);
+	pj_strdup_with_null(tdata->pool, &tmp, param_to);
+	to->uri = pjsip_parse_uri( tdata->pool, tmp.ptr, tmp.slen, 
+				   PJSIP_PARSE_URI_AS_NAMEADDR);
+	if (to->uri == NULL) {
+	    status = PJSIP_EINVALIDHDR;
+	    goto on_error;
+	}
+
+	/* Contact. */
+	if (param_contact) {
+	    contact = pjsip_contact_hdr_create(tdata->pool);
+	    pj_strdup_with_null(tdata->pool, &tmp, param_contact);
+	    contact->uri = pjsip_parse_uri( tdata->pool, tmp.ptr, tmp.slen,
+					    PJSIP_PARSE_URI_AS_NAMEADDR);
+	    if (contact->uri == NULL) {
+		status = PJSIP_EINVALIDHDR;
+		goto on_error;
+	    }
+	} else {
+	    contact = NULL;
+	}
+
+	/* Call-ID */
+	call_id = pjsip_cid_hdr_create(tdata->pool);
+	if (param_call_id != NULL && param_call_id->slen)
+	    pj_strdup(tdata->pool, &call_id->id, param_call_id);
+	else
+	    pj_create_unique_string(tdata->pool, &call_id->id);
+
+	/* CSeq */
+	cseq = pjsip_cseq_hdr_create(tdata->pool);
+	if (param_cseq >= 0)
+	    cseq->cseq = param_cseq;
+	else
+	    cseq->cseq = pj_rand() & 0xFFFF;
+
+	/* Method */
+	pjsip_method_copy(tdata->pool, &cseq->method, method);
+
+	/* Create the request. */
+	init_request_throw( endpt, tdata, &cseq->method, target, from, to, 
+                            contact, call_id, cseq, param_text);
+    }
+    PJ_CATCH_ANY {
+	status = PJ_ENOMEM;
+	goto on_error;
+    }
+    PJ_END
+
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+
+on_error:
+    pjsip_tx_data_dec_ref(tdata);
+    return status;
+}
+
+PJ_DEF(pj_status_t)
+pjsip_endpt_create_request_from_hdr( pjsip_endpoint *endpt,
+				     const pjsip_method *method,
+				     const pjsip_uri *param_target,
+				     const pjsip_from_hdr *param_from,
+				     const pjsip_to_hdr *param_to,
+				     const pjsip_contact_hdr *param_contact,
+				     const pjsip_cid_hdr *param_call_id,
+				     int param_cseq,
+				     const pj_str_t *param_text,
+				     pjsip_tx_data **p_tdata)
+{
+    pjsip_uri *target;
+    pjsip_tx_data *tdata;
+    pjsip_from_hdr *from;
+    pjsip_to_hdr *to;
+    pjsip_contact_hdr *contact;
+    pjsip_cid_hdr *call_id;
+    pjsip_cseq_hdr *cseq = NULL; /* The NULL because warning in VC6 */
+    pj_status_t status;
+    PJ_USE_EXCEPTION;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(endpt && method && param_target && param_from &&
+		     param_to && p_tdata, PJ_EINVAL);
+
+    /* Create new transmit data. */
+    status = pjsip_endpt_create_tdata(endpt, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Set initial reference counter to 1. */
+    pjsip_tx_data_add_ref(tdata);
+
+    PJ_TRY {
+	/* Duplicate target URI and headers. */
+	target = pjsip_uri_clone(tdata->pool, param_target);
+	from = pjsip_hdr_clone(tdata->pool, param_from);
+	pjsip_fromto_hdr_set_from(from);
+	to = pjsip_hdr_clone(tdata->pool, param_to);
+	pjsip_fromto_hdr_set_to(to);
+	if (param_contact)
+	    contact = pjsip_hdr_clone(tdata->pool, param_contact);
+	else
+	    contact = NULL;
+	call_id = pjsip_hdr_clone(tdata->pool, param_call_id);
+	cseq = pjsip_cseq_hdr_create(tdata->pool);
+	if (param_cseq >= 0)
+	    cseq->cseq = param_cseq;
+	else
+	    cseq->cseq = pj_rand() % 0xFFFF;
+	pjsip_method_copy(tdata->pool, &cseq->method, method);
+
+	/* Copy headers to the request. */
+	init_request_throw(endpt, tdata, &cseq->method, target, from, to, 
+                           contact, call_id, cseq, param_text);
+    }
+    PJ_CATCH_ANY {
+	status = PJ_ENOMEM;
+	goto on_error;
+    }
+    PJ_END;
+
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+
+on_error:
+    pjsip_tx_data_dec_ref(tdata);
+    return status;
+}
+
+/*
+ * Construct a minimal response message for the received request.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_create_response( pjsip_endpoint *endpt,
+						 const pjsip_rx_data *rdata,
+						 int st_code,
+						 const pj_str_t *st_text,
+						 pjsip_tx_data **p_tdata)
+{
+    pjsip_tx_data *tdata;
+    pjsip_msg *msg, *req_msg;
+    pjsip_hdr *hdr;
+    pjsip_via_hdr *via;
+    pjsip_rr_hdr *rr;
+    pj_status_t status;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(endpt && rdata && p_tdata, PJ_EINVAL);
+
+    /* Check status code. */
+    PJ_ASSERT_RETURN(st_code >= 100 && st_code <= 699, PJ_EINVAL);
+
+    /* rdata must be a request message. */
+    req_msg = rdata->msg_info.msg;
+    pj_assert(req_msg->type == PJSIP_REQUEST_MSG);
+
+    /* Request MUST NOT be ACK request! */
+    PJ_ASSERT_RETURN(req_msg->line.req.method.id != PJSIP_ACK_METHOD,
+		     PJ_EINVALIDOP);
+
+    /* Create a new transmit buffer. */
+    status = pjsip_endpt_create_tdata( endpt, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Set initial reference count to 1. */
+    pjsip_tx_data_add_ref(tdata);
+
+    /* Create new response message. */
+    tdata->msg = msg = pjsip_msg_create(tdata->pool, PJSIP_RESPONSE_MSG);
+
+    /* Set status code and reason text. */
+    msg->line.status.code = st_code;
+    if (st_text)
+	pj_strdup(tdata->pool, &msg->line.status.reason, st_text);
+    else
+	msg->line.status.reason = *pjsip_get_status_text(st_code);
+
+    /* Set TX data attributes. */
+    tdata->rx_timestamp = rdata->pkt_info.timestamp;
+
+    /* Copy all the via headers, in order. */
+    via = rdata->msg_info.via;
+    while (via) {
+	pjsip_msg_add_hdr( msg, pjsip_hdr_clone(tdata->pool, via));
+	via = via->next;
+	if (via != (void*)&req_msg->hdr)
+	    via = pjsip_msg_find_hdr(req_msg, PJSIP_H_VIA, via);
+	else
+	    break;
+    }
+
+    /* Copy all Record-Route headers, in order. */
+    rr = pjsip_msg_find_hdr(req_msg, PJSIP_H_RECORD_ROUTE, NULL);
+    while (rr) {
+	pjsip_msg_add_hdr(msg, pjsip_hdr_clone(tdata->pool, rr));
+	rr = rr->next;
+	if (rr != (void*)&req_msg->hdr)
+	    rr = pjsip_msg_find_hdr(req_msg, PJSIP_H_RECORD_ROUTE, rr);
+	else
+	    break;
+    }
+
+    /* Copy Call-ID header. */
+    hdr = pjsip_msg_find_hdr( req_msg, PJSIP_H_CALL_ID, NULL);
+    pjsip_msg_add_hdr(msg, pjsip_hdr_clone(tdata->pool, hdr));
+
+    /* Copy From header. */
+    hdr = pjsip_hdr_clone(tdata->pool, rdata->msg_info.from);
+    pjsip_msg_add_hdr( msg, hdr);
+
+    /* Copy To header. */
+    hdr = pjsip_hdr_clone(tdata->pool, rdata->msg_info.to);
+    pjsip_msg_add_hdr( msg, hdr);
+
+    /* Copy CSeq header. */
+    hdr = pjsip_hdr_clone(tdata->pool, rdata->msg_info.cseq);
+    pjsip_msg_add_hdr( msg, hdr);
+
+    /* All done. */
+    *p_tdata = tdata;
+
+    PJ_LOG(5,(THIS_FILE, "%s created", pjsip_tx_data_get_info(tdata)));
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Construct ACK for 3xx-6xx final response (according to chapter 17.1.1 of
+ * RFC3261). Note that the generation of ACK for 2xx response is different,
+ * and one must not use this function to generate such ACK.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_create_ack( pjsip_endpoint *endpt,
+					    const pjsip_tx_data *tdata,
+					    const pjsip_rx_data *rdata,
+					    pjsip_tx_data **ack_tdata)
+{
+    pjsip_tx_data *ack = NULL;
+    const pjsip_msg *invite_msg;
+    const pjsip_from_hdr *from_hdr;
+    const pjsip_to_hdr *to_hdr;
+    const pjsip_cid_hdr *cid_hdr;
+    const pjsip_cseq_hdr *cseq_hdr;
+    const pjsip_hdr *hdr;
+    pjsip_hdr *via;
+    pjsip_to_hdr *to;
+    pj_status_t status;
+
+    /* rdata must be a non-2xx final response. */
+    pj_assert(rdata->msg_info.msg->type==PJSIP_RESPONSE_MSG &&
+	      rdata->msg_info.msg->line.status.code >= 300);
+
+    /* Initialize return value to NULL. */
+    *ack_tdata = NULL;
+
+    /* The original INVITE message. */
+    invite_msg = tdata->msg;
+
+    /* Get the headers from original INVITE request. */
+#   define FIND_HDR(m,HNAME) pjsip_msg_find_hdr(m, PJSIP_H_##HNAME, NULL)
+
+    from_hdr = (const pjsip_from_hdr*) FIND_HDR(invite_msg, FROM);
+    PJ_ASSERT_ON_FAIL(from_hdr != NULL, goto on_missing_hdr);
+
+    to_hdr = (const pjsip_to_hdr*) FIND_HDR(invite_msg, TO);
+    PJ_ASSERT_ON_FAIL(to_hdr != NULL, goto on_missing_hdr);
+
+    cid_hdr = (const pjsip_cid_hdr*) FIND_HDR(invite_msg, CALL_ID);
+    PJ_ASSERT_ON_FAIL(to_hdr != NULL, goto on_missing_hdr);
+
+    cseq_hdr = (const pjsip_cseq_hdr*) FIND_HDR(invite_msg, CSEQ);
+    PJ_ASSERT_ON_FAIL(to_hdr != NULL, goto on_missing_hdr);
+
+#   undef FIND_HDR
+
+    /* Create new request message from the headers. */
+    status = pjsip_endpt_create_request_from_hdr(endpt, 
+						 &pjsip_ack_method,
+						 tdata->msg->line.req.uri,
+						 from_hdr, to_hdr,
+						 NULL, cid_hdr,
+						 cseq_hdr->cseq, NULL,
+						 &ack);
+
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Update tag in To header with the one from the response (if any). */
+    to = (pjsip_to_hdr*) pjsip_msg_find_hdr(ack->msg, PJSIP_H_TO, NULL);
+    pj_strdup(ack->pool, &to->tag, &rdata->msg_info.to->tag);
+
+
+    /* Clear Via headers in the new request. */
+    while ((via=pjsip_msg_find_hdr(ack->msg, PJSIP_H_VIA, NULL)) != NULL)
+	pj_list_erase(via);
+
+    /* Must contain single Via, just as the original INVITE. */
+    hdr = pjsip_msg_find_hdr( invite_msg, PJSIP_H_VIA, NULL);
+    pjsip_msg_insert_first_hdr( ack->msg, pjsip_hdr_clone(ack->pool,hdr) );
+
+    /* If the original INVITE has Route headers, those header fields MUST 
+     * appear in the ACK.
+     */
+    hdr = pjsip_msg_find_hdr( invite_msg, PJSIP_H_ROUTE, NULL);
+    while (hdr != NULL) {
+	pjsip_msg_add_hdr( ack->msg, pjsip_hdr_clone(ack->pool, hdr) );
+	hdr = hdr->next;
+	if (hdr == &invite_msg->hdr)
+	    break;
+	hdr = pjsip_msg_find_hdr( invite_msg, PJSIP_H_ROUTE, hdr);
+    }
+
+    /* We're done.
+     * "tdata" parameter now contains the ACK message.
+     */
+    *ack_tdata = ack;
+    return PJ_SUCCESS;
+
+on_missing_hdr:
+    if (ack)
+	pjsip_tx_data_dec_ref(ack);
+    return PJSIP_EMISSINGHDR;
+}
+
+
+/*
+ * Construct CANCEL request for the previously sent request, according to
+ * chapter 9.1 of RFC3261.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_create_cancel( pjsip_endpoint *endpt,
+					       const pjsip_tx_data *req_tdata,
+					       pjsip_tx_data **p_tdata)
+{
+    pjsip_tx_data *cancel_tdata = NULL;
+    const pjsip_from_hdr *from_hdr;
+    const pjsip_to_hdr *to_hdr;
+    const pjsip_cid_hdr *cid_hdr;
+    const pjsip_cseq_hdr *cseq_hdr;
+    const pjsip_hdr *hdr;
+    pjsip_hdr *via;
+    pj_status_t status;
+
+    /* The transmit buffer must INVITE request. */
+    PJ_ASSERT_RETURN(req_tdata->msg->type == PJSIP_REQUEST_MSG &&
+		     req_tdata->msg->line.req.method.id == PJSIP_INVITE_METHOD,
+		     PJ_EINVAL);
+
+    /* Get the headers from original INVITE request. */
+#   define FIND_HDR(m,HNAME) pjsip_msg_find_hdr(m, PJSIP_H_##HNAME, NULL)
+
+    from_hdr = (const pjsip_from_hdr*) FIND_HDR(req_tdata->msg, FROM);
+    PJ_ASSERT_ON_FAIL(from_hdr != NULL, goto on_missing_hdr);
+
+    to_hdr = (const pjsip_to_hdr*) FIND_HDR(req_tdata->msg, TO);
+    PJ_ASSERT_ON_FAIL(to_hdr != NULL, goto on_missing_hdr);
+
+    cid_hdr = (const pjsip_cid_hdr*) FIND_HDR(req_tdata->msg, CALL_ID);
+    PJ_ASSERT_ON_FAIL(to_hdr != NULL, goto on_missing_hdr);
+
+    cseq_hdr = (const pjsip_cseq_hdr*) FIND_HDR(req_tdata->msg, CSEQ);
+    PJ_ASSERT_ON_FAIL(to_hdr != NULL, goto on_missing_hdr);
+
+#   undef FIND_HDR
+
+    /* Create new request message from the headers. */
+    status = pjsip_endpt_create_request_from_hdr(endpt, 
+						 &pjsip_cancel_method,
+						 req_tdata->msg->line.req.uri,
+						 from_hdr, to_hdr,
+						 NULL, cid_hdr,
+						 cseq_hdr->cseq, NULL,
+						 &cancel_tdata);
+
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Clear Via headers in the new request. */
+    while ((via=pjsip_msg_find_hdr(cancel_tdata->msg, PJSIP_H_VIA, NULL)) != NULL)
+	pj_list_erase(via);
+
+
+    /* Must only have single Via which matches the top-most Via in the 
+     * request being cancelled. 
+     */
+    hdr = pjsip_msg_find_hdr(req_tdata->msg, PJSIP_H_VIA, NULL);
+    if (hdr) {
+	pjsip_msg_insert_first_hdr(cancel_tdata->msg, 
+				   pjsip_hdr_clone(cancel_tdata->pool, hdr));
+    }
+
+    /* If the original request has Route header, the CANCEL request must also
+     * has exactly the same.
+     * Copy "Route" header from the request.
+     */
+    hdr = pjsip_msg_find_hdr(req_tdata->msg, PJSIP_H_ROUTE, NULL);
+    while (hdr != NULL) {
+	pjsip_msg_add_hdr(cancel_tdata->msg, 
+			  pjsip_hdr_clone(cancel_tdata->pool, hdr));
+	hdr = hdr->next;
+	if (hdr != &req_tdata->msg->hdr)
+	    hdr = pjsip_msg_find_hdr(req_tdata->msg, PJSIP_H_ROUTE, hdr);
+	else
+	    break;
+    }
+
+    /* Done.
+     * Return the transmit buffer containing the CANCEL request.
+     */
+    *p_tdata = cancel_tdata;
+    return PJ_SUCCESS;
+
+on_missing_hdr:
+    if (cancel_tdata)
+	pjsip_tx_data_dec_ref(cancel_tdata);
+    return PJSIP_EMISSINGHDR;
+}
+
+
+/*
+ * Find which destination to be used to send the request message, based
+ * on the request URI and Route headers in the message. The procedure
+ * used here follows the guidelines on sending the request in RFC 3261
+ * chapter 8.1.2.
+ */
+PJ_DEF(pj_status_t) pjsip_get_request_dest(const pjsip_tx_data *tdata,
+					   pjsip_host_info *dest_info )
+{
+    const pjsip_uri *target_uri;
+    const pjsip_route_hdr *first_route_hdr;
+    
+    PJ_ASSERT_RETURN(tdata->msg->type == PJSIP_REQUEST_MSG, 
+		     PJSIP_ENOTREQUESTMSG);
+    PJ_ASSERT_RETURN(dest_info != NULL, PJ_EINVAL);
+
+    /* Get the first "Route" header from the message.
+     */
+    first_route_hdr = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_ROUTE, NULL);
+    if (first_route_hdr) {
+	target_uri = first_route_hdr->name_addr.uri;
+    } else {
+	target_uri = tdata->msg->line.req.uri;
+    }
+
+
+    /* The target URI must be a SIP/SIPS URL so we can resolve it's address.
+     * Otherwise we're in trouble (i.e. there's no host part in tel: URL).
+     */
+    pj_bzero(dest_info, sizeof(*dest_info));
+
+    if (PJSIP_URI_SCHEME_IS_SIPS(target_uri)) {
+	pjsip_uri *uri = (pjsip_uri*) target_uri;
+	const pjsip_sip_uri *url=(const pjsip_sip_uri*)pjsip_uri_get_uri(uri);
+	dest_info->flag |= (PJSIP_TRANSPORT_SECURE | PJSIP_TRANSPORT_RELIABLE);
+	pj_strdup(tdata->pool, &dest_info->addr.host, &url->host);
+        dest_info->addr.port = url->port;
+	dest_info->type = 
+            pjsip_transport_get_type_from_name(&url->transport_param);
+
+    } else if (PJSIP_URI_SCHEME_IS_SIP(target_uri)) {
+	pjsip_uri *uri = (pjsip_uri*) target_uri;
+	const pjsip_sip_uri *url=(const pjsip_sip_uri*)pjsip_uri_get_uri(uri);
+	pj_strdup(tdata->pool, &dest_info->addr.host, &url->host);
+	dest_info->addr.port = url->port;
+	dest_info->type = 
+            pjsip_transport_get_type_from_name(&url->transport_param);
+	dest_info->flag = 
+	    pjsip_transport_get_flag_from_type(dest_info->type);
+    } else {
+        pj_assert(!"Unsupported URI scheme!");
+	PJ_TODO(SUPPORT_REQUEST_ADDR_RESOLUTION_FOR_TEL_URI);
+	return PJSIP_EINVALIDSCHEME;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Process route-set found in the request and calculate
+ * the destination to be used to send the request message, based
+ * on the request URI and Route headers in the message. The procedure
+ * used here follows the guidelines on sending the request in RFC 3261
+ * chapter 8.1.2.
+ */
+PJ_DEF(pj_status_t) pjsip_process_route_set(pjsip_tx_data *tdata,
+					    pjsip_host_info *dest_info )
+{
+    const pjsip_uri *new_request_uri, *target_uri;
+    const pjsip_name_addr *topmost_route_uri;
+    pjsip_route_hdr *first_route_hdr, *last_route_hdr;
+    
+    PJ_ASSERT_RETURN(tdata->msg->type == PJSIP_REQUEST_MSG, 
+		     PJSIP_ENOTREQUESTMSG);
+    PJ_ASSERT_RETURN(dest_info != NULL, PJ_EINVAL);
+
+    /* Find the first and last "Route" headers from the message. */
+    last_route_hdr = first_route_hdr = 
+	pjsip_msg_find_hdr(tdata->msg, PJSIP_H_ROUTE, NULL);
+    if (first_route_hdr) {
+	topmost_route_uri = &first_route_hdr->name_addr;
+	while (last_route_hdr->next != (void*)&tdata->msg->hdr) {
+	    pjsip_route_hdr *hdr;
+	    hdr = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_ROUTE, 
+                                     last_route_hdr->next);
+	    if (!hdr)
+		break;
+	    last_route_hdr = hdr;
+	}
+    } else {
+	topmost_route_uri = NULL;
+    }
+
+    /* If Route headers exist, and the first element indicates loose-route,
+     * the URI is taken from the Request-URI, and we keep all existing Route
+     * headers intact.
+     * If Route headers exist, and the first element DOESN'T indicate loose
+     * route, the URI is taken from the first Route header, and remove the
+     * first Route header from the message.
+     * Otherwise if there's no Route headers, the URI is taken from the
+     * Request-URI.
+     */
+    if (topmost_route_uri) {
+	pj_bool_t has_lr_param;
+
+	if (PJSIP_URI_SCHEME_IS_SIP(topmost_route_uri) ||
+	    PJSIP_URI_SCHEME_IS_SIPS(topmost_route_uri))
+	{
+	    const pjsip_sip_uri *url = 
+		pjsip_uri_get_uri((void*)topmost_route_uri);
+	    has_lr_param = url->lr_param;
+	} else {
+	    has_lr_param = 0;
+	}
+
+	if (has_lr_param) {
+	    new_request_uri = tdata->msg->line.req.uri;
+	    /* We shouldn't need to delete topmost Route if it has lr param.
+	     * But seems like it breaks some proxy implementation, so we
+	     * delete it anyway.
+	     */
+	    /*
+	    pj_list_erase(first_route_hdr);
+	    if (first_route_hdr == last_route_hdr)
+		last_route_hdr = NULL;
+	    */
+	} else {
+	    new_request_uri = pjsip_uri_get_uri((void*)topmost_route_uri);
+	    pj_list_erase(first_route_hdr);
+	    if (first_route_hdr == last_route_hdr)
+		last_route_hdr = NULL;
+	}
+
+	target_uri = (pjsip_uri*)topmost_route_uri;
+
+    } else {
+	target_uri = new_request_uri = tdata->msg->line.req.uri;
+    }
+
+    /* The target URI must be a SIP/SIPS URL so we can resolve it's address.
+     * Otherwise we're in trouble (i.e. there's no host part in tel: URL).
+     */
+    pj_bzero(dest_info, sizeof(*dest_info));
+
+    if (PJSIP_URI_SCHEME_IS_SIPS(target_uri)) {
+	pjsip_uri *uri = (pjsip_uri*) target_uri;
+	const pjsip_sip_uri *url=(const pjsip_sip_uri*)pjsip_uri_get_uri(uri);
+	dest_info->flag |= (PJSIP_TRANSPORT_SECURE | PJSIP_TRANSPORT_RELIABLE);
+	pj_strdup(tdata->pool, &dest_info->addr.host, &url->host);
+        dest_info->addr.port = url->port;
+	dest_info->type = 
+            pjsip_transport_get_type_from_name(&url->transport_param);
+
+    } else if (PJSIP_URI_SCHEME_IS_SIP(target_uri)) {
+	pjsip_uri *uri = (pjsip_uri*) target_uri;
+	const pjsip_sip_uri *url=(const pjsip_sip_uri*)pjsip_uri_get_uri(uri);
+	pj_strdup(tdata->pool, &dest_info->addr.host, &url->host);
+	dest_info->addr.port = url->port;
+	dest_info->type = 
+            pjsip_transport_get_type_from_name(&url->transport_param);
+	dest_info->flag = 
+	    pjsip_transport_get_flag_from_type(dest_info->type);
+    } else {
+        pj_assert(!"Unsupported URI scheme!");
+	PJ_TODO(SUPPORT_REQUEST_ADDR_RESOLUTION_FOR_TEL_URI);
+	return PJSIP_EINVALIDSCHEME;
+    }
+
+    /* If target URI is different than request URI, replace 
+     * request URI add put the original URI in the last Route header.
+     */
+    if (new_request_uri && new_request_uri!=tdata->msg->line.req.uri) {
+	pjsip_route_hdr *route = pjsip_route_hdr_create(tdata->pool);
+	route->name_addr.uri = pjsip_uri_get_uri(tdata->msg->line.req.uri);
+	if (last_route_hdr)
+	    pj_list_insert_after(last_route_hdr, route);
+	else
+	    pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)route);
+	tdata->msg->line.req.uri = (pjsip_uri*)new_request_uri;
+    }
+
+    /* Success. */
+    return PJ_SUCCESS;  
+}
+
+
+/* Transport callback for sending stateless request. 
+ * This is one of the most bizzare function in pjsip, so
+ * good luck if you happen to debug this function!!
+ */
+static void stateless_send_transport_cb( void *token,
+					 pjsip_tx_data *tdata,
+					 pj_ssize_t sent )
+{
+    pjsip_send_state *stateless_data = token;
+
+    PJ_UNUSED_ARG(tdata);
+    pj_assert(tdata == stateless_data->tdata);
+
+    for (;;) {
+	pj_status_t status;
+	pj_bool_t cont;
+
+	pj_sockaddr_t *cur_addr;
+	pjsip_transport_type_e cur_addr_type;
+	int cur_addr_len;
+
+	pjsip_via_hdr *via;
+
+	if (sent == -PJ_EPENDING) {
+	    /* This is the initial process.
+	     * When the process started, this function will be called by
+	     * stateless_send_resolver_callback() with sent argument set to
+	     * -PJ_EPENDING.
+	     */
+	    cont = PJ_TRUE;
+	} else {
+	    /* There are two conditions here:
+	     * (1) Message is sent (i.e. sent > 0),
+	     * (2) Failure (i.e. sent <= 0)
+	     */
+	    cont = (sent > 0) ? PJ_FALSE :
+		   (stateless_data->cur_addr<stateless_data->addr.count-1);
+	    if (stateless_data->app_cb) {
+		(*stateless_data->app_cb)(stateless_data, sent, &cont);
+	    } else {
+		/* Doesn't have application callback.
+		 * Terminate the process.
+		 */
+		cont = PJ_FALSE;
+	    }
+	}
+
+	/* Finished with this transport. */
+	if (stateless_data->cur_transport) {
+	    pjsip_transport_dec_ref(stateless_data->cur_transport);
+	    stateless_data->cur_transport = NULL;
+	}
+
+	/* Done if application doesn't want to continue. */
+	if (sent > 0 || !cont) {
+	    pjsip_tx_data_dec_ref(tdata);
+	    return;
+	}
+
+	/* Try next address, if any, and only when this is not the 
+	 * first invocation. 
+	 */
+	if (sent != -PJ_EPENDING) {
+	    stateless_data->cur_addr++;
+	}
+
+	/* Have next address? */
+	if (stateless_data->cur_addr >= stateless_data->addr.count) {
+	    /* This only happens when a rather buggy application has
+	     * sent 'cont' to PJ_TRUE when the initial value was PJ_FALSE.
+	     * In this case just stop the processing; we don't need to
+	     * call the callback again as application has been informed
+	     * before.
+	     */
+	    pjsip_tx_data_dec_ref(tdata);
+	    return;
+	}
+
+	/* Keep current server address information handy. */
+	cur_addr = &stateless_data->addr.entry[stateless_data->cur_addr].addr;
+	cur_addr_type = stateless_data->addr.entry[stateless_data->cur_addr].type;
+	cur_addr_len = stateless_data->addr.entry[stateless_data->cur_addr].addr_len;
+
+	/* Acquire transport. */
+	status = pjsip_endpt_acquire_transport( stateless_data->endpt,
+						cur_addr_type,
+						cur_addr,
+						cur_addr_len,
+						&tdata->tp_sel,
+						&stateless_data->cur_transport);
+	if (status != PJ_SUCCESS) {
+	    sent = -status;
+	    continue;
+	}
+
+	/* Modify Via header. */
+	via = (pjsip_via_hdr*) pjsip_msg_find_hdr( tdata->msg,
+						   PJSIP_H_VIA, NULL);
+	if (!via) {
+	    /* Shouldn't happen if request was created with PJSIP API! 
+	     * But we handle the case anyway for robustness.
+	     */
+	    pj_assert(!"Via header not found!");
+	    via = pjsip_via_hdr_create(tdata->pool);
+	    pjsip_msg_insert_first_hdr(tdata->msg, (pjsip_hdr*)via);
+	}
+
+	if (via->branch_param.slen == 0) {
+	    pj_str_t tmp;
+	    via->branch_param.ptr = pj_pool_alloc(tdata->pool,
+						  PJSIP_MAX_BRANCH_LEN);
+	    via->branch_param.slen = PJSIP_MAX_BRANCH_LEN;
+	    pj_memcpy(via->branch_param.ptr, PJSIP_RFC3261_BRANCH_ID,
+		      PJSIP_RFC3261_BRANCH_LEN);
+	    tmp.ptr = via->branch_param.ptr + PJSIP_RFC3261_BRANCH_LEN + 2;
+	    *(tmp.ptr-2) = 80; *(tmp.ptr-1) = 106;
+	    pj_generate_unique_string(&tmp);
+	}
+
+	via->transport = pj_str(stateless_data->cur_transport->type_name);
+	via->sent_by = stateless_data->cur_transport->local_name;
+	via->rport_param = 0;
+
+	/* Send message using this transport. */
+	status = pjsip_transport_send( stateless_data->cur_transport,
+				       tdata,
+				       cur_addr,
+				       cur_addr_len,
+				       stateless_data,
+				       &stateless_send_transport_cb);
+	if (status == PJ_SUCCESS) {
+	    /* Recursively call this function. */
+	    sent = tdata->buf.cur - tdata->buf.start;
+	    stateless_send_transport_cb( stateless_data, tdata, sent );
+	    return;
+	} else if (status == PJ_EPENDING) {
+	    /* This callback will be called later. */
+	    return;
+	} else {
+	    /* Recursively call this function. */
+	    sent = -status;
+	    stateless_send_transport_cb( stateless_data, tdata, sent );
+	    return;
+	}
+    }
+
+}
+
+/* Resolver callback for sending stateless request. */
+static void 
+stateless_send_resolver_callback( pj_status_t status,
+				  void *token,
+				  const struct pjsip_server_addresses *addr)
+{
+    pjsip_send_state *stateless_data = token;
+
+    /* Fail on server resolution. */
+    if (status != PJ_SUCCESS) {
+	if (stateless_data->app_cb) {
+	    pj_bool_t cont = PJ_FALSE;
+	    (*stateless_data->app_cb)(stateless_data, -status, &cont);
+	}
+	pjsip_tx_data_dec_ref(stateless_data->tdata);
+	return;
+    }
+
+    /* Copy server addresses */
+    pj_memcpy( &stateless_data->addr, addr, sizeof(pjsip_server_addresses));
+
+    /* Process the addresses. */
+    stateless_send_transport_cb( stateless_data, stateless_data->tdata,
+				 -PJ_EPENDING);
+}
+
+/*
+ * Send stateless request.
+ * The sending process consists of several stages:
+ *  - determine which host to contact (#pjsip_get_request_addr).
+ *  - resolve the host (#pjsip_endpt_resolve)
+ *  - establish transport (#pjsip_endpt_acquire_transport)
+ *  - send the message (#pjsip_transport_send)
+ */
+PJ_DEF(pj_status_t) 
+pjsip_endpt_send_request_stateless(pjsip_endpoint *endpt, 
+				   pjsip_tx_data *tdata,
+				   void *token,
+				   void (*cb)(pjsip_send_state*,
+					      pj_ssize_t sent,
+					      pj_bool_t *cont))
+{
+    pjsip_host_info dest_info;
+    pjsip_send_state *stateless_data;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(endpt && tdata, PJ_EINVAL);
+
+    /* Get destination name to contact. */
+    status = pjsip_process_route_set(tdata, &dest_info);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Keep stateless data. */
+    stateless_data = pj_pool_zalloc(tdata->pool, sizeof(pjsip_send_state));
+    stateless_data->token = token;
+    stateless_data->endpt = endpt;
+    stateless_data->tdata = tdata;
+    stateless_data->app_cb = cb;
+
+    /* Resolve destination host.
+     * The processing then resumed when the resolving callback is called.
+     */
+    pjsip_endpt_resolve( endpt, tdata->pool, &dest_info, stateless_data,
+			 &stateless_send_resolver_callback);
+    return PJ_SUCCESS;
+}
+
+/*
+ * Determine which address (and transport) to use to send response message
+ * based on the received request. This function follows the specification
+ * in section 18.2.2 of RFC 3261 and RFC 3581 for calculating the destination
+ * address and transport.
+ */
+PJ_DEF(pj_status_t) pjsip_get_response_addr( pj_pool_t *pool,
+					     pjsip_rx_data *rdata,
+					     pjsip_response_addr *res_addr )
+{
+    pjsip_transport *src_transport = rdata->tp_info.transport;
+
+    /* Check arguments. */
+    PJ_ASSERT_RETURN(pool && rdata && res_addr, PJ_EINVAL);
+
+    /* rdata must be a request message! */
+    PJ_ASSERT_RETURN(rdata->msg_info.msg->type == PJSIP_REQUEST_MSG,
+		     PJ_EINVAL);
+
+    /* All requests must have "received" parameter.
+     * This must always be done in transport layer.
+     */
+    pj_assert(rdata->msg_info.via->recvd_param.slen != 0);
+
+    /* Do the calculation based on RFC 3261 Section 18.2.2 and RFC 3581 */
+
+    if (PJSIP_TRANSPORT_IS_RELIABLE(src_transport)) {
+	/* For reliable protocol such as TCP or SCTP, or TLS over those, the
+	 * response MUST be sent using the existing connection to the source
+	 * of the original request that created the transaction, if that 
+	 * connection is still open. 
+	 * If that connection is no longer open, the server SHOULD open a 
+	 * connection to the IP address in the received parameter, if present,
+	 * using the port in the sent-by value, or the default port for that 
+	 * transport, if no port is specified. 
+	 * If that connection attempt fails, the server SHOULD use the 
+	 * procedures in [4] for servers in order to determine the IP address
+	 * and port to open the connection and send the response to.
+	 */
+	res_addr->transport = rdata->tp_info.transport;
+	pj_memcpy(&res_addr->addr, &rdata->pkt_info.src_addr,
+		  rdata->pkt_info.src_addr_len);
+	res_addr->addr_len = rdata->pkt_info.src_addr_len;
+	res_addr->dst_host.type = src_transport->key.type;
+	res_addr->dst_host.flag = src_transport->flag;
+	pj_strdup( pool, &res_addr->dst_host.addr.host, 
+		   &rdata->msg_info.via->recvd_param);
+	res_addr->dst_host.addr.port = rdata->msg_info.via->sent_by.port;
+	if (res_addr->dst_host.addr.port == 0) {
+	    res_addr->dst_host.addr.port = 
+		pjsip_transport_get_default_port_for_type(res_addr->dst_host.type);
+	}
+
+    } else if (rdata->msg_info.via->maddr_param.slen) {
+	/* Otherwise, if the Via header field value contains a maddr parameter,
+	 * the response MUST be forwarded to the address listed there, using 
+	 * the port indicated in sent-by, or port 5060 if none is present. 
+	 * If the address is a multicast address, the response SHOULD be sent 
+	 * using the TTL indicated in the ttl parameter, or with a TTL of 1 if
+	 * that parameter is not present. 
+	 */
+	res_addr->transport = NULL;
+	res_addr->dst_host.type = src_transport->key.type;
+	res_addr->dst_host.flag = src_transport->flag;
+	pj_strdup( pool, &res_addr->dst_host.addr.host, 
+		   &rdata->msg_info.via->maddr_param);
+	res_addr->dst_host.addr.port = rdata->msg_info.via->sent_by.port;
+	if (res_addr->dst_host.addr.port == 0)
+	    res_addr->dst_host.addr.port = 5060;
+
+    } else if (rdata->msg_info.via->rport_param >= 0) {
+	/* There is both a "received" parameter and an "rport" parameter, 
+	 * the response MUST be sent to the IP address listed in the "received"
+	 * parameter, and the port in the "rport" parameter. 
+	 * The response MUST be sent from the same address and port that the 
+	 * corresponding request was received on.
+	 */
+	res_addr->transport = rdata->tp_info.transport;
+	pj_memcpy(&res_addr->addr, &rdata->pkt_info.src_addr,
+		  rdata->pkt_info.src_addr_len);
+	res_addr->addr_len = rdata->pkt_info.src_addr_len;
+	res_addr->dst_host.type = src_transport->key.type;
+	res_addr->dst_host.flag = src_transport->flag;
+	pj_strdup( pool, &res_addr->dst_host.addr.host, 
+		   &rdata->msg_info.via->recvd_param);
+	res_addr->dst_host.addr.port = rdata->msg_info.via->sent_by.port;
+	if (res_addr->dst_host.addr.port == 0) {
+	    res_addr->dst_host.addr.port = 
+		pjsip_transport_get_default_port_for_type(res_addr->dst_host.type);
+	}
+
+    } else {
+	res_addr->transport = NULL;
+	res_addr->dst_host.type = src_transport->key.type;
+	res_addr->dst_host.flag = src_transport->flag;
+	pj_strdup( pool, &res_addr->dst_host.addr.host, 
+		   &rdata->msg_info.via->recvd_param);
+	res_addr->dst_host.addr.port = rdata->msg_info.via->sent_by.port;
+	if (res_addr->dst_host.addr.port == 0) {
+	    res_addr->dst_host.addr.port = 
+		pjsip_transport_get_default_port_for_type(res_addr->dst_host.type);
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Callback called by transport during send_response.
+ */
+static void send_response_transport_cb(void *token, pjsip_tx_data *tdata,
+				       pj_ssize_t sent)
+{
+    pjsip_send_state *send_state = token;
+    pj_bool_t cont = PJ_FALSE;
+
+    /* Call callback, if any. */
+    if (send_state->app_cb)
+	(*send_state->app_cb)(send_state, sent, &cont);
+
+    /* Decrement transport reference counter. */
+    pjsip_transport_dec_ref(send_state->cur_transport);
+
+    /* Decrement transmit data ref counter. */
+    pjsip_tx_data_dec_ref(tdata);
+}
+
+/*
+ * Resolver calback during send_response.
+ */
+static void send_response_resolver_cb( pj_status_t status, void *token,
+				       const pjsip_server_addresses *addr )
+{
+    pjsip_send_state *send_state = token;
+
+    if (status != PJ_SUCCESS) {
+	if (send_state->app_cb) {
+	    pj_bool_t cont = PJ_FALSE;
+	    (*send_state->app_cb)(send_state, -status, &cont);
+	}
+	pjsip_tx_data_dec_ref(send_state->tdata);
+	return;
+    }
+
+    /* Only handle the first address resolved. */
+
+    /* Acquire transport. */
+    status = pjsip_endpt_acquire_transport( send_state->endpt, 
+					    addr->entry[0].type,
+					    &addr->entry[0].addr,
+					    addr->entry[0].addr_len,
+					    &send_state->tdata->tp_sel,
+					    &send_state->cur_transport);
+    if (status != PJ_SUCCESS) {
+	if (send_state->app_cb) {
+	    pj_bool_t cont = PJ_FALSE;
+	    (*send_state->app_cb)(send_state, -status, &cont);
+	}
+	pjsip_tx_data_dec_ref(send_state->tdata);
+	return;
+    }
+
+    /* Update address in send_state. */
+    send_state->addr = *addr;
+
+    /* Send response using the transoprt. */
+    status = pjsip_transport_send( send_state->cur_transport, 
+				   send_state->tdata,
+				   &addr->entry[0].addr,
+				   addr->entry[0].addr_len,
+				   send_state,
+				   &send_response_transport_cb);
+    if (status == PJ_SUCCESS) {
+	pj_ssize_t sent = send_state->tdata->buf.cur - 
+			  send_state->tdata->buf.start;
+	send_response_transport_cb(send_state, send_state->tdata, sent);
+
+    } else if (status == PJ_EPENDING) {
+	/* Transport callback will be called later. */
+    } else {
+	send_response_transport_cb(send_state, send_state->tdata, -status);
+    }
+}
+
+/*
+ * Send response.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_send_response( pjsip_endpoint *endpt,
+					       pjsip_response_addr *res_addr,
+					       pjsip_tx_data *tdata,
+					       void *token,
+					       void (*cb)(pjsip_send_state*,
+							  pj_ssize_t sent,
+							  pj_bool_t *cont))
+{
+    /* Determine which transports and addresses to send the response,
+     * based on Section 18.2.2 of RFC 3261.
+     */
+    pjsip_send_state *send_state;
+    pj_status_t status;
+
+    /* Create structure to keep the sending state. */
+    send_state = pj_pool_zalloc(tdata->pool, sizeof(pjsip_send_state));
+    send_state->endpt = endpt;
+    send_state->tdata = tdata;
+    send_state->token = token;
+    send_state->app_cb = cb;
+
+    if (res_addr->transport != NULL) {
+	send_state->cur_transport = res_addr->transport;
+	pjsip_transport_add_ref(send_state->cur_transport);
+
+	status = pjsip_transport_send( send_state->cur_transport, tdata, 
+				       &res_addr->addr,
+				       res_addr->addr_len,
+				       send_state,
+				       &send_response_transport_cb );
+	if (status == PJ_SUCCESS) {
+	    pj_ssize_t sent = tdata->buf.cur - tdata->buf.start;
+	    send_response_transport_cb(send_state, tdata, sent);
+	    return PJ_SUCCESS;
+	} else if (status == PJ_EPENDING) {
+	    /* Callback will be called later. */
+	    return PJ_SUCCESS;
+	} else {
+	    pjsip_transport_dec_ref(send_state->cur_transport);
+	    return status;
+	}
+    } else {
+	pjsip_endpt_resolve(endpt, tdata->pool, &res_addr->dst_host, 
+			    send_state, &send_response_resolver_cb);
+	return PJ_SUCCESS;
+    }
+}
+
+/*
+ * Send response combo
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_send_response2( pjsip_endpoint *endpt,
+					        pjsip_rx_data *rdata,
+					        pjsip_tx_data *tdata,
+						void *token,
+						void (*cb)(pjsip_send_state*,
+							   pj_ssize_t sent,
+							   pj_bool_t *cont))
+{
+    pjsip_response_addr res_addr;
+    pj_status_t status;
+
+    status = pjsip_get_response_addr(tdata->pool, rdata, &res_addr);
+    if (status != PJ_SUCCESS) {
+	pjsip_tx_data_dec_ref(tdata);
+	return PJ_SUCCESS;
+    }
+
+    status = pjsip_endpt_send_response(endpt, &res_addr, tdata, token, cb);
+    return status;
+}
+
+
+/*
+ * Send response
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_respond_stateless( pjsip_endpoint *endpt,
+						   pjsip_rx_data *rdata,
+						   int st_code,
+						   const pj_str_t *st_text,
+						   const pjsip_hdr *hdr_list,
+						   const pjsip_msg_body *body)
+{
+    pj_status_t status;
+    pjsip_response_addr res_addr;
+    pjsip_tx_data *tdata;
+
+    /* Verify arguments. */
+    PJ_ASSERT_RETURN(endpt && rdata, PJ_EINVAL);
+    PJ_ASSERT_RETURN(rdata->msg_info.msg->type == PJSIP_REQUEST_MSG,
+		     PJSIP_ENOTREQUESTMSG);
+
+    /* Check that no UAS transaction has been created for this request. 
+     * If UAS transaction has been created for this request, application
+     * MUST send the response statefully using that transaction.
+     */
+    PJ_ASSERT_RETURN(pjsip_rdata_get_tsx(rdata)==NULL, PJ_EINVALIDOP);
+
+    /* Create response message */
+    status = pjsip_endpt_create_response( endpt, rdata, st_code, st_text, 
+					  &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Add the message headers, if any */
+    if (hdr_list) {
+	const pjsip_hdr *hdr = hdr_list->next;
+	while (hdr != hdr_list) {
+	    pjsip_msg_add_hdr( tdata->msg, pjsip_hdr_clone(tdata->pool, hdr) );
+	    hdr = hdr->next;
+	}
+    }
+
+    /* Add the message body, if any. */
+    if (body) {
+	tdata->msg->body = pjsip_msg_body_clone( tdata->pool, body );
+	if (tdata->msg->body == NULL) {
+	    pjsip_tx_data_dec_ref(tdata);
+	    return status;
+	}
+    }
+
+    /* Get where to send request. */
+    status = pjsip_get_response_addr( tdata->pool, rdata, &res_addr );
+    if (status != PJ_SUCCESS) {
+	pjsip_tx_data_dec_ref(tdata);
+	return status;
+    }
+
+    /* Send! */
+    status = pjsip_endpt_send_response( endpt, &res_addr, tdata, NULL, NULL );
+
+    return status;
+}
+
+
+/*
+ * Get the event string from the event ID.
+ */
+PJ_DEF(const char *) pjsip_event_str(pjsip_event_id_e e)
+{
+    return event_str[e];
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_util_proxy.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_util_proxy.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_util_proxy.c	(revision 1163)
@@ -0,0 +1,355 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_util.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_errno.h>
+#include <pjsip/sip_msg.h>
+#include <pj/assert.h>
+#include <pj/ctype.h>
+#include <pj/except.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+#include <pjlib-util/md5.h>
+
+
+/**
+ * Clone the incoming SIP request or response message. A forwarding proxy
+ * typically would need to clone the incoming SIP message before processing
+ * the message.
+ *
+ * Once a transmit data is created, the reference counter is initialized to 1.
+ *
+ * @param endpt	    The endpoint instance.
+ * @param rdata	    The incoming SIP message.
+ * @param p_tdata   Pointer to receive the transmit data containing
+ *		    the duplicated message.
+ *
+ * @return	    PJ_SUCCESS on success.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_clone_msg( pjsip_endpoint *endpt,
+					   const pjsip_rx_data *rdata,
+					   pjsip_tx_data **p_tdata)
+{
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    status = pjsip_endpt_create_tdata(endpt, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    tdata->msg = pjsip_msg_clone(tdata->pool, rdata->msg_info.msg);
+
+    pjsip_tx_data_add_ref(tdata);
+    
+    *p_tdata = tdata;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create new request message to be forwarded upstream to new destination URI 
+ * in uri. 
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_create_request_fwd(pjsip_endpoint *endpt,
+						   pjsip_rx_data *rdata, 
+						   const pjsip_uri *uri,
+						   const pj_str_t *branch,
+						   unsigned options,
+						   pjsip_tx_data **p_tdata)
+{
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+    PJ_USE_EXCEPTION;
+
+
+    PJ_ASSERT_RETURN(endpt && rdata && p_tdata, PJ_EINVAL);
+    PJ_ASSERT_RETURN(rdata->msg_info.msg->type == PJSIP_REQUEST_MSG, 
+		     PJSIP_ENOTREQUESTMSG);
+
+    PJ_UNUSED_ARG(options);
+
+
+    /* Request forwarding rule in RFC 3261 section 16.6:
+     *
+     * For each target, the proxy forwards the request following these
+     * steps:
+     * 
+     * 1.  Make a copy of the received request
+     * 2.  Update the Request-URI
+     * 3.  Update the Max-Forwards header field
+     * 4.  Optionally add a Record-route header field value
+     * 5.  Optionally add additional header fields
+     * 6.  Postprocess routing information
+     * 7.  Determine the next-hop address, port, and transport
+     * 8.  Add a Via header field value
+     * 9.  Add a Content-Length header field if necessary
+     * 10. Forward the new request
+     *
+     * Of these steps, we only do step 1-3, since the later will be
+     * done by application.
+     */
+
+    status = pjsip_endpt_create_tdata(endpt, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Always increment ref counter to 1 */
+    pjsip_tx_data_add_ref(tdata);
+
+    /* Duplicate the request */
+    PJ_TRY {
+	pjsip_msg *dst;
+	const pjsip_msg *src = rdata->msg_info.msg;
+	const pjsip_hdr *hsrc;
+
+	/* Create the request */
+	tdata->msg = dst = pjsip_msg_create(tdata->pool, PJSIP_REQUEST_MSG);
+
+	/* Duplicate request method */
+	pjsip_method_copy(tdata->pool, &tdata->msg->line.req.method,
+			  &src->line.req.method);
+
+	/* Set request URI */
+	if (uri) {
+	    dst->line.req.uri = pjsip_uri_clone(tdata->pool, uri);
+	} else {
+	    dst->line.req.uri = pjsip_uri_clone(tdata->pool, src->line.req.uri);
+	}
+
+	/* Clone ALL headers */
+	hsrc = src->hdr.next;
+	while (hsrc != &src->hdr) {
+
+	    pjsip_hdr *hdst;
+
+	    /* If this is the top-most Via header, insert our own before
+	     * cloning the header.
+	     */
+	    if (hsrc == (pjsip_hdr*)rdata->msg_info.via) {
+		pjsip_via_hdr *hvia;
+		hvia = pjsip_via_hdr_create(tdata->pool);
+		if (branch)
+		    pj_strdup(tdata->pool, &hvia->branch_param, branch);
+		else {
+		    pj_str_t new_branch = pjsip_calculate_branch_id(rdata);
+		    pj_strdup(tdata->pool, &hvia->branch_param, &new_branch);
+		}
+		pjsip_msg_add_hdr(dst, (pjsip_hdr*)hvia);
+
+	    }
+	    /* Skip Content-Type and Content-Length as these would be 
+	     * generated when the the message is printed.
+	     */
+	    else if (hsrc->type == PJSIP_H_CONTENT_LENGTH ||
+		     hsrc->type == PJSIP_H_CONTENT_TYPE) {
+
+		hsrc = hsrc->next;
+		continue;
+
+	    }
+#if 0
+	    /* If this is the top-most Route header and it indicates loose
+	     * route, remove the header.
+	     */
+	    else if (hsrc == (pjsip_hdr*)rdata->msg_info.route) {
+
+		const pjsip_route_hdr *hroute = (const pjsip_route_hdr*) hsrc;
+		const pjsip_sip_uri *sip_uri;
+
+		if (!PJSIP_URI_SCHEME_IS_SIP(hroute->name_addr.uri) &&
+		    !PJSIP_URI_SCHEME_IS_SIPS(hroute->name_addr.uri))
+		{
+		    /* This is a bad request! */
+		    status = PJSIP_EINVALIDHDR;
+		    goto on_error;
+		}
+
+		sip_uri = (pjsip_sip_uri*) hroute->name_addr.uri;
+
+		if (sip_uri->lr_param) {
+		    /* Yes lr param is present, skip this Route header */
+		    hsrc = hsrc->next;
+		    continue;
+		}
+	    }
+#endif
+
+	    /* Clone the header */
+	    hdst = pjsip_hdr_clone(tdata->pool, hsrc);
+
+	    /* If this is Max-Forward header, decrement the value */
+	    if (hdst->type == PJSIP_H_MAX_FORWARDS) {
+		pjsip_max_fwd_hdr *hmaxfwd = (pjsip_max_fwd_hdr*)hdst;
+		--hmaxfwd->ivalue;
+	    }
+
+	    /* Append header to new request */
+	    pjsip_msg_add_hdr(dst, hdst);
+
+
+	    hsrc = hsrc->next;
+	}
+
+	/* 16.6.3:
+	 * If the copy does not contain a Max-Forwards header field, the
+         * proxy MUST add one with a field value, which SHOULD be 70.
+	 */
+	if (rdata->msg_info.max_fwd == NULL) {
+	    pjsip_max_fwd_hdr *hmaxfwd = 
+		pjsip_max_fwd_hdr_create(tdata->pool, 70);
+	    pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)hmaxfwd);
+	}
+
+	/* Clone request body */
+	if (src->body) {
+	    dst->body = pjsip_msg_body_clone(tdata->pool, src->body);
+	}
+
+    }
+    PJ_CATCH_ANY {
+	status = PJ_ENOMEM;
+	goto on_error;
+    }
+    PJ_END
+
+
+    /* Done */
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+
+on_error:
+    pjsip_tx_data_dec_ref(tdata);
+    return status;
+}
+
+
+PJ_DEF(pj_status_t) pjsip_endpt_create_response_fwd( pjsip_endpoint *endpt,
+						     pjsip_rx_data *rdata, 
+						     unsigned options,
+						     pjsip_tx_data **p_tdata)
+{
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+    PJ_USE_EXCEPTION;
+
+    PJ_UNUSED_ARG(options);
+
+    status = pjsip_endpt_create_tdata(endpt, &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    pjsip_tx_data_add_ref(tdata);
+
+    PJ_TRY {
+	pjsip_msg *dst;
+	const pjsip_msg *src = rdata->msg_info.msg;
+	const pjsip_hdr *hsrc;
+
+	/* Create the request */
+	tdata->msg = dst = pjsip_msg_create(tdata->pool, PJSIP_RESPONSE_MSG);
+
+	/* Clone the status line */
+	dst->line.status.code = src->line.status.code;
+	pj_strdup(tdata->pool, &dst->line.status.reason, 
+		  &src->line.status.reason);
+
+	/* Duplicate all headers */
+	hsrc = src->hdr.next;
+	while (hsrc != &src->hdr) {
+	    
+	    /* Skip Content-Type and Content-Length as these would be 
+	     * generated when the the message is printed.
+	     */
+	    if (hsrc->type == PJSIP_H_CONTENT_LENGTH ||
+		hsrc->type == PJSIP_H_CONTENT_TYPE) {
+
+		hsrc = hsrc->next;
+		continue;
+
+	    }
+	    /* Remove the first Via header */
+	    else if (hsrc == (pjsip_hdr*) rdata->msg_info.via) {
+
+		hsrc = hsrc->next;
+		continue;
+	    }
+
+	    pjsip_msg_add_hdr(dst, pjsip_hdr_clone(tdata->pool, hsrc));
+
+	    hsrc = hsrc->next;
+	}
+
+	/* Clone message body */
+	if (src->body)
+	    dst->body = pjsip_msg_body_clone(tdata->pool, src->body);
+
+
+    }
+    PJ_CATCH_ANY {
+	status = PJ_ENOMEM;
+	goto on_error;
+    }
+    PJ_END;
+
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+
+on_error:
+    pjsip_tx_data_dec_ref(tdata);
+    return status;
+}
+
+
+static void digest2str(const unsigned char digest[], char *output)
+{
+    int i;
+    for (i = 0; i<16; ++i) {
+	pj_val_to_hex_digit(digest[i], output);
+	output += 2;
+    }
+}
+
+
+PJ_DEF(pj_str_t) pjsip_calculate_branch_id( pjsip_rx_data *rdata )
+{
+    pj_md5_context ctx;
+    pj_uint8_t digest[16];
+    pj_str_t branch;
+
+    /* Create branch ID for new request by calculating MD5 hash
+     * of the branch parameter in top-most Via header.
+     */
+    pj_md5_init(&ctx);
+    pj_md5_update(&ctx, (pj_uint8_t*)rdata->msg_info.via->branch_param.ptr,
+		  rdata->msg_info.via->branch_param.slen);
+    pj_md5_final(&ctx, digest);
+
+    branch.ptr = pj_pool_alloc(rdata->tp_info.pool, 
+			       32 + PJSIP_RFC3261_BRANCH_LEN);
+    pj_memcpy(branch.ptr, PJSIP_RFC3261_BRANCH_ID, PJSIP_RFC3261_BRANCH_LEN);
+
+    digest2str(digest, branch.ptr+PJSIP_RFC3261_BRANCH_LEN);
+
+    branch.slen = 32 + PJSIP_RFC3261_BRANCH_LEN;
+
+    return branch;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_util_statefull.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_util_statefull.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsip/sip_util_statefull.c	(revision 1163)
@@ -0,0 +1,189 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 <pjsip/sip_util.h>
+#include <pjsip/sip_module.h>
+#include <pjsip/sip_endpoint.h>
+#include <pjsip/sip_transaction.h>
+#include <pjsip/sip_event.h>
+#include <pjsip/sip_errno.h>
+#include <pj/assert.h>
+#include <pj/log.h>
+#include <pj/pool.h>
+#include <pj/string.h>
+
+struct tsx_data
+{
+    void *token;
+    void (*cb)(void*, pjsip_event*);
+};
+
+static void mod_util_on_tsx_state(pjsip_transaction*, pjsip_event*);
+
+/* This module will be registered in pjsip_endpt.c */
+
+pjsip_module mod_stateful_util = 
+{
+    NULL, NULL,			    /* prev, next.			*/
+    { "mod-stateful-util", 17 },    /* Name.				*/
+    -1,				    /* Id				*/
+    PJSIP_MOD_PRIORITY_APPLICATION, /* Priority				*/
+    NULL,			    /* load()				*/
+    NULL,			    /* start()				*/
+    NULL,			    /* stop()				*/
+    NULL,			    /* unload()				*/
+    NULL,			    /* on_rx_request()			*/
+    NULL,			    /* on_rx_response()			*/
+    NULL,			    /* on_tx_request.			*/
+    NULL,			    /* on_tx_response()			*/
+    &mod_util_on_tsx_state,	    /* on_tsx_state()			*/
+};
+
+static void mod_util_on_tsx_state(pjsip_transaction *tsx, pjsip_event *event)
+{
+    struct tsx_data *tsx_data;
+
+    if (event->type != PJSIP_EVENT_TSX_STATE)
+	return;
+
+    tsx_data = tsx->mod_data[mod_stateful_util.id];
+    if (tsx_data == NULL)
+	return;
+
+    if (tsx->status_code < 200)
+	return;
+
+    /* Call the callback, if any, and prevent the callback to be called again
+     * by clearing the transaction's module_data.
+     */
+    tsx->mod_data[mod_stateful_util.id] = NULL;
+
+    if (tsx_data->cb) {
+	(*tsx_data->cb)(tsx_data->token, event);
+    }
+}
+
+
+PJ_DEF(pj_status_t) pjsip_endpt_send_request(  pjsip_endpoint *endpt,
+					       pjsip_tx_data *tdata,
+					       pj_int32_t timeout,
+					       void *token,
+					       void (*cb)(void*,pjsip_event*))
+{
+    pjsip_transaction *tsx;
+    struct tsx_data *tsx_data;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(endpt && tdata && (timeout==-1 || timeout>0), PJ_EINVAL);
+
+    /* Check that transaction layer module is registered to endpoint */
+    PJ_ASSERT_RETURN(mod_stateful_util.id != -1, PJ_EINVALIDOP);
+
+
+    status = pjsip_tsx_create_uac(&mod_stateful_util, tdata, &tsx);
+    if (status != PJ_SUCCESS) {
+	pjsip_tx_data_dec_ref(tdata);
+	return status;
+    }
+
+    tsx_data = pj_pool_alloc(tsx->pool, sizeof(struct tsx_data));
+    tsx_data->token = token;
+    tsx_data->cb = cb;
+
+    if (timeout >= 0) {
+	status = pjsip_tsx_set_uac_timeout(tsx, timeout, PJSIP_TSX_IGNORE_1xx);
+	pj_assert(status == PJ_SUCCESS);
+    }
+
+    tsx->mod_data[mod_stateful_util.id] = tsx_data;
+
+    status = pjsip_tsx_send_msg(tsx, NULL);
+    if (status != PJ_SUCCESS)
+	pjsip_tx_data_dec_ref(tdata);
+
+    return status;
+}
+
+
+/*
+ * Send response statefully.
+ */
+PJ_DEF(pj_status_t) pjsip_endpt_respond(  pjsip_endpoint *endpt,
+					  pjsip_module *tsx_user,
+					  pjsip_rx_data *rdata,
+					  int st_code,
+					  const pj_str_t *st_text,
+					  const pjsip_hdr *hdr_list,
+					  const pjsip_msg_body *body,
+					  pjsip_transaction **p_tsx )
+{
+    pj_status_t status;
+    pjsip_tx_data *tdata;
+    pjsip_transaction *tsx;
+
+    /* Validate arguments. */
+    PJ_ASSERT_RETURN(endpt && rdata, PJ_EINVAL);
+
+    if (p_tsx) *p_tsx = NULL;
+
+    /* Create response message */
+    status = pjsip_endpt_create_response( endpt, rdata, st_code, st_text, 
+					  &tdata);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Add the message headers, if any */
+    if (hdr_list) {
+	const pjsip_hdr *hdr = hdr_list->next;
+	while (hdr != hdr_list) {
+	    pjsip_msg_add_hdr( tdata->msg, pjsip_hdr_clone(tdata->pool, hdr) );
+	    hdr = hdr->next;
+	}
+    }
+
+    /* Add the message body, if any. */
+    if (body) {
+	tdata->msg->body = pjsip_msg_body_clone( tdata->pool, body );
+	if (tdata->msg->body == NULL) {
+	    pjsip_tx_data_dec_ref(tdata);
+	    return status;
+	}
+    }
+
+    /* Create UAS transaction. */
+    status = pjsip_tsx_create_uas(tsx_user, rdata, &tsx);
+    if (status != PJ_SUCCESS) {
+	pjsip_tx_data_dec_ref(tdata);
+	return status;
+    }
+
+    /* Feed the request to the transaction. */
+    pjsip_tsx_recv_msg(tsx, rdata);
+
+    /* Send the message. */
+    status = pjsip_tsx_send_msg(tsx, tdata);
+    if (status != PJ_SUCCESS) {
+	pjsip_tx_data_dec_ref(tdata);
+    } else if (p_tsx) {
+	*p_tsx = tsx;
+    }
+
+    return status;
+}
+
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_acc.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_acc.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_acc.c	(revision 1163)
@@ -0,0 +1,1179 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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-lib/pjsua.h>
+#include <pjsua-lib/pjsua_internal.h>
+
+
+#define THIS_FILE		"pjsua_acc.c"
+
+
+/*
+ * Get number of current accounts.
+ */
+PJ_DEF(unsigned) pjsua_acc_get_count(void)
+{
+    return pjsua_var.acc_cnt;
+}
+
+
+/*
+ * Check if the specified account ID is valid.
+ */
+PJ_DEF(pj_bool_t) pjsua_acc_is_valid(pjsua_acc_id acc_id)
+{
+    return acc_id>=0 && acc_id<PJ_ARRAY_SIZE(pjsua_var.acc) &&
+	   pjsua_var.acc[acc_id].valid;
+}
+
+
+/*
+ * Set default account
+ */
+PJ_DEF(pj_status_t) pjsua_acc_set_default(pjsua_acc_id acc_id)
+{
+    pjsua_var.default_acc = acc_id;
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get default account.
+ */
+PJ_DEF(pjsua_acc_id) pjsua_acc_get_default(void)
+{
+    return pjsua_var.default_acc;
+}
+
+
+/*
+ * Copy account configuration.
+ */
+static void copy_acc_config(pj_pool_t *pool,
+			    pjsua_acc_config *dst,
+			    const pjsua_acc_config *src)
+{
+    unsigned i;
+
+    pj_memcpy(dst, src, sizeof(pjsua_acc_config));
+
+    pj_strdup_with_null(pool, &dst->id, &src->id);
+    pj_strdup_with_null(pool, &dst->reg_uri, &src->reg_uri);
+    pj_strdup_with_null(pool, &dst->force_contact, &src->force_contact);
+
+    dst->proxy_cnt = src->proxy_cnt;
+    for (i=0; i<src->proxy_cnt; ++i)
+	pj_strdup_with_null(pool, &dst->proxy[i], &src->proxy[i]);
+
+    dst->reg_timeout = src->reg_timeout;
+    dst->cred_count = src->cred_count;
+
+    for (i=0; i<src->cred_count; ++i) {
+	pjsip_cred_dup(pool, &dst->cred_info[i], &src->cred_info[i]);
+    }
+}
+
+
+/*
+ * Initialize a new account (after configuration is set).
+ */
+static pj_status_t initialize_acc(unsigned acc_id)
+{
+    pjsua_acc_config *acc_cfg = &pjsua_var.acc[acc_id].cfg;
+    pjsua_acc *acc = &pjsua_var.acc[acc_id];
+    pjsip_name_addr *name_addr;
+    pjsip_sip_uri *sip_uri, *sip_reg_uri;
+    pj_status_t status;
+    unsigned i;
+
+    /* Need to parse local_uri to get the elements: */
+
+    name_addr = (pjsip_name_addr*)
+		    pjsip_parse_uri(pjsua_var.pool, acc_cfg->id.ptr,
+				    acc_cfg->id.slen, 
+				    PJSIP_PARSE_URI_AS_NAMEADDR);
+    if (name_addr == NULL) {
+	pjsua_perror(THIS_FILE, "Invalid local URI", 
+		     PJSIP_EINVALIDURI);
+	return PJSIP_EINVALIDURI;
+    }
+
+    /* Local URI MUST be a SIP or SIPS: */
+
+    if (!PJSIP_URI_SCHEME_IS_SIP(name_addr) && 
+	!PJSIP_URI_SCHEME_IS_SIPS(name_addr)) 
+    {
+	pjsua_perror(THIS_FILE, "Invalid local URI", 
+		     PJSIP_EINVALIDSCHEME);
+	return PJSIP_EINVALIDSCHEME;
+    }
+
+
+    /* Get the SIP URI object: */
+    sip_uri = (pjsip_sip_uri*) pjsip_uri_get_uri(name_addr);
+
+
+    /* Parse registrar URI, if any */
+    if (acc_cfg->reg_uri.slen) {
+	pjsip_uri *reg_uri;
+
+	reg_uri = pjsip_parse_uri(pjsua_var.pool, acc_cfg->reg_uri.ptr,
+				  acc_cfg->reg_uri.slen, 0);
+	if (reg_uri == NULL) {
+	    pjsua_perror(THIS_FILE, "Invalid registrar URI", 
+			 PJSIP_EINVALIDURI);
+	    return PJSIP_EINVALIDURI;
+	}
+
+	/* Registrar URI MUST be a SIP or SIPS: */
+	if (!PJSIP_URI_SCHEME_IS_SIP(reg_uri) && 
+	    !PJSIP_URI_SCHEME_IS_SIPS(reg_uri)) 
+	{
+	    pjsua_perror(THIS_FILE, "Invalid registar URI", 
+			 PJSIP_EINVALIDSCHEME);
+	    return PJSIP_EINVALIDSCHEME;
+	}
+
+	sip_reg_uri = (pjsip_sip_uri*) pjsip_uri_get_uri(reg_uri);
+
+    } else {
+	sip_reg_uri = NULL;
+    }
+
+
+    /* Save the user and domain part. These will be used when finding an 
+     * account for incoming requests.
+     */
+    acc->display = name_addr->display;
+    acc->user_part = sip_uri->user;
+    acc->srv_domain = sip_uri->host;
+    acc->srv_port = 0;
+
+    if (sip_reg_uri) {
+	acc->srv_port = sip_reg_uri->port;
+    }
+
+    /* Create Contact header if not present. */
+    //if (acc_cfg->contact.slen == 0) {
+    //	acc_cfg->contact = acc_cfg->id;
+    //}
+
+    /* Build account route-set from outbound proxies and route set from 
+     * account configuration.
+     */
+    pj_list_init(&acc->route_set);
+
+    for (i=0; i<pjsua_var.ua_cfg.outbound_proxy_cnt; ++i) {
+    	pj_str_t hname = { "Route", 5};
+	pjsip_route_hdr *r;
+	pj_str_t tmp;
+
+	pj_strdup_with_null(pjsua_var.pool, &tmp, 
+			    &pjsua_var.ua_cfg.outbound_proxy[i]);
+	r = pjsip_parse_hdr(pjsua_var.pool, &hname, tmp.ptr, tmp.slen, NULL);
+	if (r == NULL) {
+	    pjsua_perror(THIS_FILE, "Invalid outbound proxy URI",
+			 PJSIP_EINVALIDURI);
+	    return PJSIP_EINVALIDURI;
+	}
+	pj_list_push_back(&acc->route_set, r);
+    }
+
+    for (i=0; i<acc_cfg->proxy_cnt; ++i) {
+    	pj_str_t hname = { "Route", 5};
+	pjsip_route_hdr *r;
+	pj_str_t tmp;
+
+	pj_strdup_with_null(pjsua_var.pool, &tmp, &acc_cfg->proxy[i]);
+	r = pjsip_parse_hdr(pjsua_var.pool, &hname, tmp.ptr, tmp.slen, NULL);
+	if (r == NULL) {
+	    pjsua_perror(THIS_FILE, "Invalid URI in account route set",
+			 PJ_EINVAL);
+	    return PJ_EINVAL;
+	}
+	pj_list_push_back(&acc->route_set, r);
+    }
+
+    
+    /* Concatenate credentials from account config and global config */
+    acc->cred_cnt = 0;
+    for (i=0; i<acc_cfg->cred_count; ++i) {
+	acc->cred[acc->cred_cnt++] = acc_cfg->cred_info[i];
+    }
+    for (i=0; i<pjsua_var.ua_cfg.cred_count && 
+	      acc->cred_cnt < PJ_ARRAY_SIZE(acc->cred); ++i)
+    {
+	acc->cred[acc->cred_cnt++] = pjsua_var.ua_cfg.cred_info[i];
+    }
+
+    status = pjsua_pres_init_acc(acc_id);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Mark account as valid */
+    pjsua_var.acc[acc_id].valid = PJ_TRUE;
+
+    /* Insert account ID into account ID array, sorted by priority */
+    for (i=0; i<pjsua_var.acc_cnt; ++i) {
+	if ( pjsua_var.acc[pjsua_var.acc_ids[i]].cfg.priority <
+	     pjsua_var.acc[acc_id].cfg.priority)
+	{
+	    break;
+	}
+    }
+    pj_array_insert(pjsua_var.acc_ids, sizeof(pjsua_var.acc_ids[0]),
+		    pjsua_var.acc_cnt, i, &acc_id);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Add a new account to pjsua.
+ */
+PJ_DEF(pj_status_t) pjsua_acc_add( const pjsua_acc_config *cfg,
+				   pj_bool_t is_default,
+				   pjsua_acc_id *p_acc_id)
+{
+    unsigned id;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(pjsua_var.acc_cnt < PJ_ARRAY_SIZE(pjsua_var.acc),
+		     PJ_ETOOMANY);
+
+    /* Must have a transport */
+    PJ_ASSERT_RETURN(pjsua_var.tpdata[0].data.ptr != NULL, PJ_EINVALIDOP);
+
+    PJSUA_LOCK();
+
+    /* Find empty account id. */
+    for (id=0; id < PJ_ARRAY_SIZE(pjsua_var.acc); ++id) {
+	if (pjsua_var.acc[id].valid == PJ_FALSE)
+	    break;
+    }
+
+    /* Expect to find a slot */
+    PJ_ASSERT_ON_FAIL(	id < PJ_ARRAY_SIZE(pjsua_var.acc), 
+			{PJSUA_UNLOCK(); return PJ_EBUG;});
+
+    /* Copy config */
+    copy_acc_config(pjsua_var.pool, &pjsua_var.acc[id].cfg, cfg);
+    
+    /* Normalize registration timeout */
+    if (pjsua_var.acc[id].cfg.reg_uri.slen &&
+	pjsua_var.acc[id].cfg.reg_timeout == 0)
+    {
+	pjsua_var.acc[id].cfg.reg_timeout = PJSUA_REG_INTERVAL;
+    }
+
+    status = initialize_acc(id);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error adding account", status);
+	PJSUA_UNLOCK();
+	return status;
+    }
+
+    if (is_default)
+	pjsua_var.default_acc = id;
+
+    if (p_acc_id)
+	*p_acc_id = id;
+
+    pjsua_var.acc_cnt++;
+
+    PJSUA_UNLOCK();
+
+    PJ_LOG(4,(THIS_FILE, "Account %.*s added with id %d",
+	      (int)cfg->id.slen, cfg->id.ptr, id));
+
+    /* If accounts has registration enabled, start registration */
+    if (pjsua_var.acc[id].cfg.reg_uri.slen)
+	pjsua_acc_set_registration(id, PJ_TRUE);
+
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Add local account
+ */
+PJ_DEF(pj_status_t) pjsua_acc_add_local( pjsua_transport_id tid,
+					 pj_bool_t is_default,
+					 pjsua_acc_id *p_acc_id)
+{
+    pjsua_acc_config cfg;
+    pjsua_transport_data *t = &pjsua_var.tpdata[tid];
+    char uri[PJSIP_MAX_URL_SIZE];
+
+    /* ID must be valid */
+    PJ_ASSERT_RETURN(tid>=0 && tid<PJ_ARRAY_SIZE(pjsua_var.tpdata), PJ_EINVAL);
+
+    /* Transport must be valid */
+    PJ_ASSERT_RETURN(t->data.ptr != NULL, PJ_EINVAL);
+    
+    pjsua_acc_config_default(&cfg);
+
+    /* Lower the priority of local account */
+    --cfg.priority;
+
+    /* Build URI for the account */
+    pj_ansi_snprintf(uri, PJSIP_MAX_URL_SIZE,
+		     "<sip:%.*s:%d;transport=%s>", 
+		     (int)t->local_name.host.slen,
+		     t->local_name.host.ptr,
+		     t->local_name.port,
+		     pjsip_transport_get_type_name(t->type));
+
+    cfg.id = pj_str(uri);
+    
+    return pjsua_acc_add(&cfg, is_default, p_acc_id);
+}
+
+
+/*
+ * Delete account.
+ */
+PJ_DEF(pj_status_t) pjsua_acc_del(pjsua_acc_id acc_id)
+{
+    unsigned i;
+
+    PJ_ASSERT_RETURN(acc_id>=0 && acc_id<(int)PJ_ARRAY_SIZE(pjsua_var.acc),
+		     PJ_EINVAL);
+    PJ_ASSERT_RETURN(pjsua_var.acc[acc_id].valid, PJ_EINVALIDOP);
+
+    PJSUA_LOCK();
+
+    /* Delete registration */
+    if (pjsua_var.acc[acc_id].regc != NULL) {
+	pjsua_acc_set_registration(acc_id, PJ_FALSE);
+	pjsip_regc_destroy(pjsua_var.acc[acc_id].regc);
+	pjsua_var.acc[acc_id].regc = NULL;
+    }
+
+    /* Delete server presence subscription */
+    pjsua_pres_delete_acc(acc_id);
+
+    /* Invalidate */
+    pjsua_var.acc[acc_id].valid = PJ_FALSE;
+
+    /* Remove from array */
+    for (i=0; i<pjsua_var.acc_cnt; ++i) {
+	if (pjsua_var.acc_ids[i] == acc_id)
+	    break;
+    }
+    if (i != pjsua_var.acc_cnt) {
+	pj_array_erase(pjsua_var.acc_ids, sizeof(pjsua_var.acc_ids[0]),
+		       pjsua_var.acc_cnt, i);
+	--pjsua_var.acc_cnt;
+    }
+
+    /* Leave the calls intact, as I don't think calls need to
+     * access account once it's created
+     */
+
+
+    PJSUA_UNLOCK();
+
+    PJ_LOG(4,(THIS_FILE, "Account id %d deleted", acc_id));
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Modify account information.
+ */
+PJ_DEF(pj_status_t) pjsua_acc_modify( pjsua_acc_id acc_id,
+				      const pjsua_acc_config *cfg)
+{
+    PJ_TODO(pjsua_acc_modify);
+    PJ_UNUSED_ARG(acc_id);
+    PJ_UNUSED_ARG(cfg);
+    return PJ_EINVALIDOP;
+}
+
+
+/*
+ * Modify account's presence status to be advertised to remote/presence
+ * subscribers.
+ */
+PJ_DEF(pj_status_t) pjsua_acc_set_online_status( pjsua_acc_id acc_id,
+						 pj_bool_t is_online)
+{
+    PJ_ASSERT_RETURN(acc_id>=0 && acc_id<(int)PJ_ARRAY_SIZE(pjsua_var.acc),
+		     PJ_EINVAL);
+    PJ_ASSERT_RETURN(pjsua_var.acc[acc_id].valid, PJ_EINVALIDOP);
+
+    pjsua_var.acc[acc_id].online_status = is_online;
+    pjsua_pres_refresh();
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * This callback is called by pjsip_regc when outgoing register
+ * request has completed.
+ */
+static void regc_cb(struct pjsip_regc_cbparam *param)
+{
+
+    pjsua_acc *acc = param->token;
+
+    PJSUA_LOCK();
+
+    /*
+     * Print registration status.
+     */
+    if (param->status!=PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "SIP registration error", 
+		     param->status);
+	pjsip_regc_destroy(acc->regc);
+	acc->regc = NULL;
+	
+    } else if (param->code < 0 || param->code >= 300) {
+	PJ_LOG(2, (THIS_FILE, "SIP registration failed, status=%d (%.*s)", 
+		   param->code, 
+		   (int)param->reason.slen, param->reason.ptr));
+	pjsip_regc_destroy(acc->regc);
+	acc->regc = NULL;
+
+    } else if (PJSIP_IS_STATUS_IN_CLASS(param->code, 200)) {
+
+	if (param->expiration < 1) {
+	    pjsip_regc_destroy(acc->regc);
+	    acc->regc = NULL;
+	    PJ_LOG(3,(THIS_FILE, "%s: unregistration success",
+		      pjsua_var.acc[acc->index].cfg.id.ptr));
+	} else {
+	    PJ_LOG(3, (THIS_FILE, 
+		       "%s: registration success, status=%d (%.*s), "
+		       "will re-register in %d seconds", 
+		       pjsua_var.acc[acc->index].cfg.id.ptr,
+		       param->code,
+		       (int)param->reason.slen, param->reason.ptr,
+		       param->expiration));
+
+	    /* Send initial PUBLISH if it is enabled */
+	    if (acc->cfg.publish_enabled && acc->publish_sess==NULL)
+		pjsua_pres_init_publish_acc(acc->index);
+	}
+
+    } else {
+	PJ_LOG(4, (THIS_FILE, "SIP registration updated status=%d", param->code));
+    }
+
+    acc->reg_last_err = param->status;
+    acc->reg_last_code = param->code;
+
+    if (pjsua_var.ua_cfg.cb.on_reg_state)
+	(*pjsua_var.ua_cfg.cb.on_reg_state)(acc->index);
+
+    PJSUA_UNLOCK();
+}
+
+
+/*
+ * Initialize client registration.
+ */
+static pj_status_t pjsua_regc_init(int acc_id)
+{
+    pjsua_acc *acc;
+    pj_str_t contact;
+    char contact_buf[1024];
+    pj_pool_t *pool;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(pjsua_acc_is_valid(acc_id), PJ_EINVAL);
+    acc = &pjsua_var.acc[acc_id];
+
+    if (acc->cfg.reg_uri.slen == 0) {
+	PJ_LOG(3,(THIS_FILE, "Registrar URI is not specified"));
+	return PJ_SUCCESS;
+    }
+
+    /* Destroy existing session, if any */
+    if (acc->regc) {
+	pjsip_regc_destroy(acc->regc);
+	acc->regc = NULL;
+    }
+
+    /* initialize SIP registration if registrar is configured */
+
+    status = pjsip_regc_create( pjsua_var.endpt, 
+				acc, &regc_cb, &acc->regc);
+
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create client registration", 
+		     status);
+	return status;
+    }
+
+    pool = pj_pool_create_on_buf(NULL, contact_buf, sizeof(contact_buf));
+    status = pjsua_acc_create_uac_contact( pool, &contact,
+					   acc_id, &acc->cfg.reg_uri);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to generate suitable Contact header"
+				" for registration", 
+		     status);
+	return status;
+    }
+
+    status = pjsip_regc_init( acc->regc,
+			      &acc->cfg.reg_uri, 
+			      &acc->cfg.id, 
+			      &acc->cfg.id,
+			      1, &contact, 
+			      acc->cfg.reg_timeout);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, 
+		     "Client registration initialization error", 
+		     status);
+	return status;
+    }
+
+    /* If account is locked to specific transport, then set transport to
+     * the client registration.
+     */
+    if (pjsua_var.acc[acc_id].cfg.transport_id != PJSUA_INVALID_ID) {
+	pjsip_tpselector tp_sel;
+
+	pjsua_init_tpselector(pjsua_var.acc[acc_id].cfg.transport_id, &tp_sel);
+	pjsip_regc_set_transport(acc->regc, &tp_sel);
+    }
+
+
+    /* Set credentials
+     */
+    if (acc->cred_cnt) {
+	pjsip_regc_set_credentials( acc->regc, acc->cred_cnt, acc->cred);
+    }
+
+    /* Set route-set
+     */
+    if (!pj_list_empty(&acc->route_set)) {
+	pjsip_regc_set_route_set( acc->regc, &acc->route_set );
+    }
+
+    /* Add other request headers. */
+    if (pjsua_var.ua_cfg.user_agent.slen) {
+	pjsip_hdr hdr_list;
+	const pj_str_t STR_USER_AGENT = { "User-Agent", 10 };
+	pjsip_generic_string_hdr *h;
+
+	pool = pj_pool_create_on_buf(NULL, contact_buf, sizeof(contact_buf));
+	pj_list_init(&hdr_list);
+
+	h = pjsip_generic_string_hdr_create(pool, &STR_USER_AGENT, 
+					    &pjsua_var.ua_cfg.user_agent);
+	pj_list_push_back(&hdr_list, (pjsip_hdr*)h);
+
+	pjsip_regc_add_headers(acc->regc, &hdr_list);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Update registration or perform unregistration. 
+ */
+PJ_DEF(pj_status_t) pjsua_acc_set_registration( pjsua_acc_id acc_id, 
+						pj_bool_t renew)
+{
+    pj_status_t status = 0;
+    pjsip_tx_data *tdata = 0;
+
+    PJ_ASSERT_RETURN(acc_id>=0 && acc_id<(int)PJ_ARRAY_SIZE(pjsua_var.acc),
+		     PJ_EINVAL);
+    PJ_ASSERT_RETURN(pjsua_var.acc[acc_id].valid, PJ_EINVALIDOP);
+
+    PJSUA_LOCK();
+
+    if (renew) {
+	if (pjsua_var.acc[acc_id].regc == NULL) {
+	    status = pjsua_regc_init(acc_id);
+	    if (status != PJ_SUCCESS) {
+		pjsua_perror(THIS_FILE, "Unable to create registration", 
+			     status);
+		goto on_return;
+	    }
+	}
+	if (!pjsua_var.acc[acc_id].regc) {
+	    status = PJ_EINVALIDOP;
+	    goto on_return;
+	}
+
+	status = pjsip_regc_register(pjsua_var.acc[acc_id].regc, 1, 
+				     &tdata);
+
+    } else {
+	if (pjsua_var.acc[acc_id].regc == NULL) {
+	    PJ_LOG(3,(THIS_FILE, "Currently not registered"));
+	    status = PJ_EINVALIDOP;
+	    goto on_return;
+	}
+	status = pjsip_regc_unregister(pjsua_var.acc[acc_id].regc, &tdata);
+    }
+
+    if (status == PJ_SUCCESS) {
+	//pjsua_process_msg_data(tdata, NULL);
+	status = pjsip_regc_send( pjsua_var.acc[acc_id].regc, tdata );
+    }
+
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create/send REGISTER", 
+		     status);
+    } else {
+	PJ_LOG(3,(THIS_FILE, "%s sent",
+	         (renew? "Registration" : "Unregistration")));
+    }
+
+on_return:
+    PJSUA_UNLOCK();
+    return status;
+}
+
+
+/*
+ * Get account information.
+ */
+PJ_DEF(pj_status_t) pjsua_acc_get_info( pjsua_acc_id acc_id,
+					pjsua_acc_info *info)
+{
+    pjsua_acc *acc = &pjsua_var.acc[acc_id];
+    pjsua_acc_config *acc_cfg = &pjsua_var.acc[acc_id].cfg;
+
+    PJ_ASSERT_RETURN(info != NULL, PJ_EINVAL);
+    PJ_ASSERT_RETURN(pjsua_acc_is_valid(acc_id), PJ_EINVAL);
+    
+    pj_bzero(info, sizeof(pjsua_acc_info));
+
+    PJ_ASSERT_RETURN(acc_id>=0 && acc_id<(int)PJ_ARRAY_SIZE(pjsua_var.acc), 
+		     PJ_EINVAL);
+    PJ_ASSERT_RETURN(pjsua_var.acc[acc_id].valid, PJ_EINVALIDOP);
+
+    PJSUA_LOCK();
+    
+    if (pjsua_var.acc[acc_id].valid == PJ_FALSE) {
+	PJSUA_UNLOCK();
+	return PJ_EINVALIDOP;
+    }
+
+    info->id = acc_id;
+    info->is_default = (pjsua_var.default_acc == acc_id);
+    info->acc_uri = acc_cfg->id;
+    info->has_registration = (acc->cfg.reg_uri.slen > 0);
+    info->online_status = acc->online_status;
+    
+    if (acc->reg_last_err) {
+	info->status = acc->reg_last_err;
+	pj_strerror(acc->reg_last_err, info->buf_, sizeof(info->buf_));
+	info->status_text = pj_str(info->buf_);
+    } else if (acc->reg_last_code) {
+	if (info->has_registration) {
+	    info->status = acc->reg_last_code;
+	    info->status_text = *pjsip_get_status_text(acc->reg_last_code);
+	} else {
+	    info->status = 0;
+	    info->status_text = pj_str("not registered");
+	}
+    } else if (acc->cfg.reg_uri.slen) {
+	info->status = 100;
+	info->status_text = pj_str("In Progress");
+    } else {
+	info->status = 0;
+	info->status_text = pj_str("does not register");
+    }
+    
+    if (acc->regc) {
+	pjsip_regc_info regc_info;
+	pjsip_regc_get_info(acc->regc, &regc_info);
+	info->expires = regc_info.next_reg;
+    } else {
+	info->expires = -1;
+    }
+
+    PJSUA_UNLOCK();
+
+    return PJ_SUCCESS;
+
+}
+
+
+/*
+ * Enum accounts all account ids.
+ */
+PJ_DEF(pj_status_t) pjsua_enum_accs(pjsua_acc_id ids[],
+				    unsigned *count )
+{
+    unsigned i, c;
+
+    PJ_ASSERT_RETURN(ids && *count, PJ_EINVAL);
+
+    PJSUA_LOCK();
+
+    for (i=0, c=0; c<*count && i<PJ_ARRAY_SIZE(pjsua_var.acc); ++i) {
+	if (!pjsua_var.acc[i].valid)
+	    continue;
+	ids[c] = i;
+	++c;
+    }
+
+    *count = c;
+
+    PJSUA_UNLOCK();
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Enum accounts info.
+ */
+PJ_DEF(pj_status_t) pjsua_acc_enum_info( pjsua_acc_info info[],
+					 unsigned *count )
+{
+    unsigned i, c;
+
+    PJ_ASSERT_RETURN(info && *count, PJ_EINVAL);
+
+    PJSUA_LOCK();
+
+    for (i=0, c=0; c<*count && i<PJ_ARRAY_SIZE(pjsua_var.acc); ++i) {
+	if (!pjsua_var.acc[i].valid)
+	    continue;
+
+	pjsua_acc_get_info(i, &info[c]);
+	++c;
+    }
+
+    *count = c;
+
+    PJSUA_UNLOCK();
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * This is an internal function to find the most appropriate account to
+ * used to reach to the specified URL.
+ */
+PJ_DEF(pjsua_acc_id) pjsua_acc_find_for_outgoing(const pj_str_t *url)
+{
+    pj_str_t tmp;
+    pjsip_uri *uri;
+    pjsip_sip_uri *sip_uri;
+    unsigned i;
+
+    PJSUA_LOCK();
+
+    PJ_TODO(dont_use_pjsua_pool);
+
+    pj_strdup_with_null(pjsua_var.pool, &tmp, url);
+
+    uri = pjsip_parse_uri(pjsua_var.pool, tmp.ptr, tmp.slen, 0);
+    if (!uri) {
+	PJSUA_UNLOCK();
+	return pjsua_var.default_acc;
+    }
+
+    if (!PJSIP_URI_SCHEME_IS_SIP(uri) && 
+	!PJSIP_URI_SCHEME_IS_SIPS(uri)) 
+    {
+	/* Return the first account with proxy */
+	for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.acc); ++i) {
+	    if (!pjsua_var.acc[i].valid)
+		continue;
+	    if (!pj_list_empty(&pjsua_var.acc[i].route_set))
+		break;
+	}
+
+	if (i != PJ_ARRAY_SIZE(pjsua_var.acc)) {
+	    /* Found rather matching account */
+	    PJSUA_UNLOCK();
+	    return 0;
+	}
+
+	/* Not found, use default account */
+	PJSUA_UNLOCK();
+	return pjsua_var.default_acc;
+    }
+
+    sip_uri = pjsip_uri_get_uri(uri);
+
+    /* Find matching domain AND port */
+    for (i=0; i<pjsua_var.acc_cnt; ++i) {
+	unsigned acc_id = pjsua_var.acc_ids[i];
+	if (pj_stricmp(&pjsua_var.acc[acc_id].srv_domain, &sip_uri->host)==0 &&
+	    pjsua_var.acc[acc_id].srv_port == sip_uri->port)
+	{
+	    PJSUA_UNLOCK();
+	    return acc_id;
+	}
+    }
+
+    /* If no match, try to match the domain part only */
+    for (i=0; i<pjsua_var.acc_cnt; ++i) {
+	unsigned acc_id = pjsua_var.acc_ids[i];
+	if (pj_stricmp(&pjsua_var.acc[acc_id].srv_domain, &sip_uri->host)==0)
+	{
+	    PJSUA_UNLOCK();
+	    return acc_id;
+	}
+    }
+
+
+    /* Still no match, just use default account */
+    PJSUA_UNLOCK();
+    return pjsua_var.default_acc;
+}
+
+
+/*
+ * This is an internal function to find the most appropriate account to be
+ * used to handle incoming calls.
+ */
+PJ_DEF(pjsua_acc_id) pjsua_acc_find_for_incoming(pjsip_rx_data *rdata)
+{
+    pjsip_uri *uri;
+    pjsip_sip_uri *sip_uri;
+    unsigned i;
+
+    uri = rdata->msg_info.to->uri;
+
+    /* Just return default account if To URI is not SIP: */
+    if (!PJSIP_URI_SCHEME_IS_SIP(uri) && 
+	!PJSIP_URI_SCHEME_IS_SIPS(uri)) 
+    {
+	return pjsua_var.default_acc;
+    }
+
+
+    PJSUA_LOCK();
+
+    sip_uri = (pjsip_sip_uri*)pjsip_uri_get_uri(uri);
+
+    /* Find account which has matching username and domain. */
+    for (i=0; i < pjsua_var.acc_cnt; ++i) {
+	unsigned acc_id = pjsua_var.acc_ids[i];
+	pjsua_acc *acc = &pjsua_var.acc[acc_id];
+
+	if (acc->valid && pj_stricmp(&acc->user_part, &sip_uri->user)==0 &&
+	    pj_stricmp(&acc->srv_domain, &sip_uri->host)==0) 
+	{
+	    /* Match ! */
+	    PJSUA_UNLOCK();
+	    return acc_id;
+	}
+    }
+
+    /* No matching account, try match domain part only. */
+    for (i=0; i < pjsua_var.acc_cnt; ++i) {
+	unsigned acc_id = pjsua_var.acc_ids[i];
+	pjsua_acc *acc = &pjsua_var.acc[acc_id];
+
+	if (acc->valid && pj_stricmp(&acc->srv_domain, &sip_uri->host)==0) {
+	    /* Match ! */
+	    PJSUA_UNLOCK();
+	    return acc_id;
+	}
+    }
+
+    /* No matching account, try match user part (and transport type) only. */
+    for (i=0; i < pjsua_var.acc_cnt; ++i) {
+	unsigned acc_id = pjsua_var.acc_ids[i];
+	pjsua_acc *acc = &pjsua_var.acc[acc_id];
+
+	if (acc->valid && pj_stricmp(&acc->user_part, &sip_uri->user)==0) {
+
+	    if (acc->cfg.transport_id != PJSUA_INVALID_ID) {
+		pjsip_transport_type_e type;
+		type = pjsip_transport_get_type_from_name(&sip_uri->transport_param);
+		if (type == PJSIP_TRANSPORT_UNSPECIFIED)
+		    type = PJSIP_TRANSPORT_UDP;
+
+		if (pjsua_var.tpdata[acc->cfg.transport_id].type != type)
+		    continue;
+	    }
+
+	    /* Match ! */
+	    PJSUA_UNLOCK();
+	    return acc_id;
+	}
+    }
+
+    /* Still no match, use default account */
+    PJSUA_UNLOCK();
+    return pjsua_var.default_acc;
+}
+
+
+/*
+ * Create arbitrary requests for this account. 
+ */
+PJ_DEF(pj_status_t) pjsua_acc_create_request(pjsua_acc_id acc_id,
+					     const pjsip_method *method,
+					     const pj_str_t *target,
+					     pjsip_tx_data **p_tdata)
+{
+    pjsip_tx_data *tdata;
+    pjsua_acc *acc;
+    pjsip_route_hdr *r;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(method && target && p_tdata, PJ_EINVAL);
+    PJ_ASSERT_RETURN(pjsua_acc_is_valid(acc_id), PJ_EINVAL);
+
+    acc = &pjsua_var.acc[acc_id];
+
+    status = pjsip_endpt_create_request(pjsua_var.endpt, method, target, 
+					&acc->cfg.id, target,
+					NULL, NULL, -1, NULL, &tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create request", status);
+	return status;
+    }
+
+    /* Copy routeset */
+    r = acc->route_set.next;
+    while (r != &acc->route_set) {
+	pjsip_msg_add_hdr(tdata->msg, pjsip_hdr_clone(tdata->pool, r));
+	r = r->next;
+    }
+    
+    /* Done */
+    *p_tdata = tdata;
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsua_acc_create_uac_contact( pj_pool_t *pool,
+						  pj_str_t *contact,
+						  pjsua_acc_id acc_id,
+						  const pj_str_t *suri)
+{
+    pjsua_acc *acc;
+    pjsip_sip_uri *sip_uri;
+    pj_status_t status;
+    pjsip_transport_type_e tp_type = PJSIP_TRANSPORT_UNSPECIFIED;
+    pj_str_t local_addr;
+    pjsip_tpselector tp_sel;
+    unsigned flag;
+    int secure;
+    int local_port;
+    
+    PJ_ASSERT_RETURN(pjsua_acc_is_valid(acc_id), PJ_EINVAL);
+    acc = &pjsua_var.acc[acc_id];
+
+    /* If force_contact is configured, then use use it */
+    if (acc->cfg.force_contact.slen) {
+	*contact = acc->cfg.force_contact;
+	return PJ_SUCCESS;
+    }
+
+    /* If route-set is configured for the account, then URI is the 
+     * first entry of the route-set.
+     */
+    if (!pj_list_empty(&acc->route_set)) {
+	sip_uri = (pjsip_sip_uri*) 
+		  pjsip_uri_get_uri(acc->route_set.next->name_addr.uri);
+    } else {
+	pj_str_t tmp;
+	pjsip_uri *uri;
+
+	pj_strdup_with_null(pool, &tmp, suri);
+
+	uri = pjsip_parse_uri(pool, tmp.ptr, tmp.slen, 0);
+	if (uri == NULL)
+	    return PJSIP_EINVALIDURI;
+
+	/* For non-SIP scheme, route set should be configured */
+	if (!PJSIP_URI_SCHEME_IS_SIP(uri) && !PJSIP_URI_SCHEME_IS_SIPS(uri))
+	    return PJSIP_EINVALIDREQURI;
+
+	sip_uri = (pjsip_sip_uri*)pjsip_uri_get_uri(uri);
+    }
+
+    /* Get transport type of the URI */
+    if (PJSIP_URI_SCHEME_IS_SIPS(sip_uri))
+	tp_type = PJSIP_TRANSPORT_TLS;
+    else if (sip_uri->transport_param.slen == 0) {
+	tp_type = PJSIP_TRANSPORT_UDP;
+    } else
+	tp_type = pjsip_transport_get_type_from_name(&sip_uri->transport_param);
+    
+    if (tp_type == PJSIP_TRANSPORT_UNSPECIFIED)
+	return PJSIP_EUNSUPTRANSPORT;
+
+    flag = pjsip_transport_get_flag_from_type(tp_type);
+    secure = (flag & PJSIP_TRANSPORT_SECURE) != 0;
+
+    /* Init transport selector. */
+    pjsua_init_tpselector(pjsua_var.acc[acc_id].cfg.transport_id, &tp_sel);
+
+    /* Get local address suitable to send request from */
+    status = pjsip_tpmgr_find_local_addr(pjsip_endpt_get_tpmgr(pjsua_var.endpt),
+					 pool, tp_type, &tp_sel, 
+					 &local_addr, &local_port);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create the contact header */
+    contact->ptr = pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE);
+    contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE,
+				     "%.*s%s<%s:%.*s%s%.*s:%d;transport=%s>",
+				     (int)acc->display.slen,
+				     acc->display.ptr,
+				     (acc->display.slen?" " : ""),
+				     (secure ? "sips" : "sip"),
+				     (int)acc->user_part.slen,
+				     acc->user_part.ptr,
+				     (acc->user_part.slen?"@":""),
+				     (int)local_addr.slen,
+				     local_addr.ptr,
+				     local_port,
+				     pjsip_transport_get_type_name(tp_type));
+
+    return PJ_SUCCESS;
+}
+
+
+
+PJ_DEF(pj_status_t) pjsua_acc_create_uas_contact( pj_pool_t *pool,
+						  pj_str_t *contact,
+						  pjsua_acc_id acc_id,
+						  pjsip_rx_data *rdata )
+{
+    /* 
+     *  Section 12.1.1, paragraph about using SIPS URI in Contact.
+     *  If the request that initiated the dialog contained a SIPS URI 
+     *  in the Request-URI or in the top Record-Route header field value, 
+     *  if there was any, or the Contact header field if there was no 
+     *  Record-Route header field, the Contact header field in the response
+     *  MUST be a SIPS URI.
+     */
+    pjsua_acc *acc;
+    pjsip_sip_uri *sip_uri;
+    pj_status_t status;
+    pjsip_transport_type_e tp_type = PJSIP_TRANSPORT_UNSPECIFIED;
+    pj_str_t local_addr;
+    pjsip_tpselector tp_sel;
+    unsigned flag;
+    int secure;
+    int local_port;
+    
+    PJ_ASSERT_RETURN(pjsua_acc_is_valid(acc_id), PJ_EINVAL);
+    acc = &pjsua_var.acc[acc_id];
+
+    /* If force_contact is configured, then use use it */
+    if (acc->cfg.force_contact.slen) {
+	*contact = acc->cfg.force_contact;
+	return PJ_SUCCESS;
+    }
+
+    /* If Record-Route is present, then URI is the top Record-Route. */
+    if (rdata->msg_info.record_route) {
+	sip_uri = (pjsip_sip_uri*) 
+		pjsip_uri_get_uri(rdata->msg_info.record_route->name_addr.uri);
+    } else {
+	pjsip_contact_hdr *h_contact;
+	pjsip_uri *uri = NULL;
+
+	/* Otherwise URI is Contact URI */
+	h_contact = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT,
+				       NULL);
+	if (h_contact)
+	    uri = pjsip_uri_get_uri(h_contact->uri);
+	
+
+	/* Or if Contact URI is not present, take the remote URI from
+	 * the From URI.
+	 */
+	if (uri == NULL)
+	    uri = pjsip_uri_get_uri(rdata->msg_info.from->uri);
+
+
+	/* Can only do sip/sips scheme at present. */
+	if (!PJSIP_URI_SCHEME_IS_SIP(uri) && !PJSIP_URI_SCHEME_IS_SIPS(uri))
+	    return PJSIP_EINVALIDREQURI;
+
+	sip_uri = (pjsip_sip_uri*)pjsip_uri_get_uri(uri);
+    }
+
+    /* Get transport type of the URI */
+    if (PJSIP_URI_SCHEME_IS_SIPS(sip_uri))
+	tp_type = PJSIP_TRANSPORT_TLS;
+    else if (sip_uri->transport_param.slen == 0) {
+	tp_type = PJSIP_TRANSPORT_UDP;
+    } else
+	tp_type = pjsip_transport_get_type_from_name(&sip_uri->transport_param);
+    
+    if (tp_type == PJSIP_TRANSPORT_UNSPECIFIED)
+	return PJSIP_EUNSUPTRANSPORT;
+
+    flag = pjsip_transport_get_flag_from_type(tp_type);
+    secure = (flag & PJSIP_TRANSPORT_SECURE) != 0;
+
+    /* Init transport selector. */
+    pjsua_init_tpselector(pjsua_var.acc[acc_id].cfg.transport_id, &tp_sel);
+
+    /* Get local address suitable to send request from */
+    status = pjsip_tpmgr_find_local_addr(pjsip_endpt_get_tpmgr(pjsua_var.endpt),
+					 pool, tp_type, &tp_sel,
+					 &local_addr, &local_port);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create the contact header */
+    contact->ptr = pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE);
+    contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE,
+				     "%.*s%s<%s:%.*s%s%.*s:%d;transport=%s>",
+				     (int)acc->display.slen,
+				     acc->display.ptr,
+				     (acc->display.slen?" " : ""),
+				     (secure ? "sips" : "sip"),
+				     (int)acc->user_part.slen,
+				     acc->user_part.ptr,
+				     (acc->user_part.slen?"@":""),
+				     (int)local_addr.slen,
+				     local_addr.ptr,
+				     local_port,
+				     pjsip_transport_get_type_name(tp_type));
+
+    return PJ_SUCCESS;
+}
+
+
+PJ_DEF(pj_status_t) pjsua_acc_set_transport( pjsua_acc_id acc_id,
+					     pjsua_transport_id tp_id)
+{
+    pjsua_acc *acc;
+
+    PJ_ASSERT_RETURN(pjsua_acc_is_valid(acc_id), PJ_EINVAL);
+    acc = &pjsua_var.acc[acc_id];
+
+    PJ_ASSERT_RETURN(tp_id >= 0 && tp_id < PJ_ARRAY_SIZE(pjsua_var.tpdata),
+		     PJ_EINVAL);
+    
+    acc->cfg.transport_id = tp_id;
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_call.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_call.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_call.c	(revision 1163)
@@ -0,0 +1,2786 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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-lib/pjsua.h>
+#include <pjsua-lib/pjsua_internal.h>
+
+
+#define THIS_FILE		"pjsua_call.c"
+
+
+/* This callback receives notification from invite session when the
+ * session state has changed.
+ */
+static void pjsua_call_on_state_changed(pjsip_inv_session *inv, 
+					pjsip_event *e);
+
+/* This callback is called by invite session framework when UAC session
+ * has forked.
+ */
+static void pjsua_call_on_forked( pjsip_inv_session *inv, 
+				  pjsip_event *e);
+
+/*
+ * Callback to be called when SDP offer/answer negotiation has just completed
+ * in the session. This function will start/update media if negotiation
+ * has succeeded.
+ */
+static void pjsua_call_on_media_update(pjsip_inv_session *inv,
+				       pj_status_t status);
+
+/*
+ * Called when session received new offer.
+ */
+static void pjsua_call_on_rx_offer(pjsip_inv_session *inv,
+				   const pjmedia_sdp_session *offer);
+
+/*
+ * This callback is called when transaction state has changed in INVITE
+ * session. We use this to trap:
+ *  - incoming REFER request.
+ *  - incoming MESSAGE request.
+ */
+static void pjsua_call_on_tsx_state_changed(pjsip_inv_session *inv,
+					    pjsip_transaction *tsx,
+					    pjsip_event *e);
+
+
+
+/* Create inactive SDP for call hold. */
+static pj_status_t create_inactive_sdp(pjsua_call *call,
+				       pjmedia_sdp_session **p_answer);
+
+/*
+ * Callback called by event framework when the xfer subscription state
+ * has changed.
+ */
+static void xfer_client_on_evsub_state( pjsip_evsub *sub, pjsip_event *event);
+static void xfer_server_on_evsub_state( pjsip_evsub *sub, pjsip_event *event);
+
+/*
+ * Reset call descriptor.
+ */
+static void reset_call(pjsua_call_id id)
+{
+    pjsua_call *call = &pjsua_var.calls[id];
+
+    call->index = id;
+    call->inv = NULL;
+    call->user_data = NULL;
+    call->session = NULL;
+    call->xfer_sub = NULL;
+    call->last_code = 0;
+    call->conf_slot = PJSUA_INVALID_ID;
+    call->last_text.ptr = call->last_text_buf_;
+    call->last_text.slen = 0;
+    call->conn_time.sec = 0;
+    call->conn_time.msec = 0;
+    call->res_time.sec = 0;
+    call->res_time.msec = 0;
+}
+
+
+/*
+ * Init call subsystem.
+ */
+pj_status_t pjsua_call_subsys_init(const pjsua_config *cfg)
+{
+    pjsip_inv_callback inv_cb;
+    unsigned i;
+    const pj_str_t str_norefersub = { "norefersub", 10 };
+    pj_status_t status;
+
+    /* Init calls array. */
+    for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.calls); ++i)
+	reset_call(i);
+
+    /* Copy config */
+    pjsua_config_dup(pjsua_var.pool, &pjsua_var.ua_cfg, cfg);
+
+    /* Initialize invite session callback. */
+    pj_bzero(&inv_cb, sizeof(inv_cb));
+    inv_cb.on_state_changed = &pjsua_call_on_state_changed;
+    inv_cb.on_new_session = &pjsua_call_on_forked;
+    inv_cb.on_media_update = &pjsua_call_on_media_update;
+    inv_cb.on_rx_offer = &pjsua_call_on_rx_offer;
+    inv_cb.on_tsx_state_changed = &pjsua_call_on_tsx_state_changed;
+
+
+    /* Initialize invite session module: */
+    status = pjsip_inv_usage_init(pjsua_var.endpt, &inv_cb);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Add "norefersub" in Supported header */
+    pjsip_endpt_add_capability(pjsua_var.endpt, NULL, PJSIP_H_SUPPORTED,
+			       NULL, 1, &str_norefersub);
+
+    return status;
+}
+
+
+/*
+ * Start call subsystem.
+ */
+pj_status_t pjsua_call_subsys_start(void)
+{
+    /* Nothing to do */
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get maximum number of calls configured in pjsua.
+ */
+PJ_DEF(unsigned) pjsua_call_get_max_count(void)
+{
+    return pjsua_var.ua_cfg.max_calls;
+}
+
+
+/*
+ * Get number of currently active calls.
+ */
+PJ_DEF(unsigned) pjsua_call_get_count(void)
+{
+    return pjsua_var.call_cnt;
+}
+
+
+/*
+ * Enum calls.
+ */
+PJ_DEF(pj_status_t) pjsua_enum_calls( pjsua_call_id ids[],
+				      unsigned *count)
+{
+    unsigned i, c;
+
+    PJ_ASSERT_RETURN(ids && *count, PJ_EINVAL);
+
+    PJSUA_LOCK();
+
+    for (i=0, c=0; c<*count && i<pjsua_var.ua_cfg.max_calls; ++i) {
+	if (!pjsua_var.calls[i].inv)
+	    continue;
+	ids[c] = i;
+	++c;
+    }
+
+    *count = c;
+
+    PJSUA_UNLOCK();
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Make outgoing call to the specified URI using the specified account.
+ */
+PJ_DEF(pj_status_t) pjsua_call_make_call( pjsua_acc_id acc_id,
+					  const pj_str_t *dest_uri,
+					  unsigned options,
+					  void *user_data,
+					  const pjsua_msg_data *msg_data,
+					  pjsua_call_id *p_call_id)
+{
+    pjsip_dialog *dlg = NULL;
+    pjmedia_sdp_session *offer;
+    pjsip_inv_session *inv = NULL;
+    pjsua_acc *acc;
+    pjsua_call *call;
+    unsigned call_id;
+    pj_str_t contact;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+
+    /* Check that account is valid */
+    PJ_ASSERT_RETURN(acc_id>=0 || acc_id<PJ_ARRAY_SIZE(pjsua_var.acc), 
+		     PJ_EINVAL);
+
+    /* Options must be zero for now */
+    PJ_ASSERT_RETURN(options == 0, PJ_EINVAL);
+
+    /* Check arguments */
+    PJ_ASSERT_RETURN(dest_uri, PJ_EINVAL);
+
+    PJSUA_LOCK();
+
+    acc = &pjsua_var.acc[acc_id];
+    if (!acc->valid) {
+	pjsua_perror(THIS_FILE, "Unable to make call because account "
+		     "is not valid", PJ_EINVALIDOP);
+	PJSUA_UNLOCK();
+	return PJ_EINVALIDOP;
+    }
+
+    /* Find free call slot. */
+    for (call_id=0; call_id<pjsua_var.ua_cfg.max_calls; ++call_id) {
+	if (pjsua_var.calls[call_id].inv == NULL)
+	    break;
+    }
+
+    if (call_id == pjsua_var.ua_cfg.max_calls) {
+	pjsua_perror(THIS_FILE, "Error making file", PJ_ETOOMANY);
+	PJSUA_UNLOCK();
+	return PJ_ETOOMANY;
+    }
+
+    call = &pjsua_var.calls[call_id];
+
+    /* Verify that destination URI is valid before calling 
+     * pjsua_acc_create_uac_contact, or otherwise there  
+     * a misleading "Invalid Contact URI" error will be printed
+     * when pjsua_acc_create_uac_contact() fails.
+     */
+    if (1) {
+	pj_pool_t *pool;
+	pjsip_uri *uri;
+	pj_str_t dup;
+
+	pool = pjsua_pool_create("tmp-uri", 4000, 4000);
+	if (!pool) {
+	    pjsua_perror(THIS_FILE, "Unable to create pool", PJ_ENOMEM);
+	    PJSUA_UNLOCK();
+	    return PJ_ENOMEM;
+	}
+	
+	pj_strdup_with_null(pool, &dup, dest_uri);
+	uri = pjsip_parse_uri(pool, dup.ptr, dup.slen, 0);
+	pj_pool_release(pool);
+
+	if (uri == NULL) {
+	    pjsua_perror(THIS_FILE, "Unable to make call", 
+			 PJSIP_EINVALIDREQURI);
+	    PJSUA_UNLOCK();
+	    return PJSIP_EINVALIDREQURI;
+	}
+    }
+
+    PJ_LOG(4,(THIS_FILE, "Making call with acc #%d to %.*s", acc_id,
+	      (int)dest_uri->slen, dest_uri->ptr));
+
+    /* Mark call start time. */
+    pj_gettimeofday(&call->start_time);
+
+    /* Reset first response time */
+    call->res_time.sec = 0;
+
+    /* Create suitable Contact header */
+    status = pjsua_acc_create_uac_contact(pjsua_var.pool, &contact,
+					  acc_id, dest_uri);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to generate Contact header", status);
+	PJSUA_UNLOCK();
+	return status;
+    }
+
+    /* Create outgoing dialog: */
+    status = pjsip_dlg_create_uac( pjsip_ua_instance(), 
+				   &acc->cfg.id, &contact,
+				   dest_uri, dest_uri, &dlg);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Dialog creation failed", status);
+	PJSUA_UNLOCK();
+	return status;
+    }
+
+    /* Init media channel */
+    status = pjsua_media_channel_init(call->index, PJSIP_ROLE_UAC);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error initializing media channel", status);
+	goto on_error;
+    }
+
+    /* Create SDP offer */
+    status = pjsua_media_channel_create_sdp(call->index, dlg->pool, &offer);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "pjmedia unable to create SDP", status);
+	goto on_error;
+    }
+
+    /* Create the INVITE session: */
+
+    status = pjsip_inv_create_uac( dlg, offer, 0, &inv);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Invite session creation failed", status);
+	goto on_error;
+    }
+
+
+    /* Create and associate our data in the session. */
+
+    call->inv = inv;
+
+    dlg->mod_data[pjsua_var.mod.id] = call;
+    inv->mod_data[pjsua_var.mod.id] = call;
+
+    /* Attach user data */
+    call->user_data = user_data;
+
+    /* If account is locked to specific transport, then lock dialog
+     * to this transport too.
+     */
+    if (acc->cfg.transport_id != PJSUA_INVALID_ID) {
+	pjsip_tpselector tp_sel;
+
+	pjsua_init_tpselector(acc->cfg.transport_id, &tp_sel);
+	pjsip_dlg_set_transport(dlg, &tp_sel);
+    }
+
+    /* Set dialog Route-Set: */
+    if (!pj_list_empty(&acc->route_set))
+	pjsip_dlg_set_route_set(dlg, &acc->route_set);
+
+
+    /* Set credentials: */
+    if (acc->cred_cnt) {
+	pjsip_auth_clt_set_credentials( &dlg->auth_sess, 
+					acc->cred_cnt, acc->cred);
+    }
+
+
+    /* Create initial INVITE: */
+
+    status = pjsip_inv_invite(inv, &tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create initial INVITE request", 
+		     status);
+	goto on_error;
+    }
+
+
+    /* Add additional headers etc */
+
+    pjsua_process_msg_data( tdata, msg_data);
+
+    /* Must increment call counter now */
+    ++pjsua_var.call_cnt;
+
+    /* Send initial INVITE: */
+
+    status = pjsip_inv_send_msg(inv, tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to send initial INVITE request", 
+		     status);
+
+	/* Upon failure to send first request, both dialog and invite 
+	 * session would have been cleared.
+	 */
+	inv = NULL;
+	dlg = NULL;
+	goto on_error;
+    }
+
+    /* Done. */
+
+    if (p_call_id)
+	*p_call_id = call_id;
+
+    PJSUA_UNLOCK();
+
+    return PJ_SUCCESS;
+
+
+on_error:
+    if (inv != NULL) {
+	pjsip_inv_terminate(inv, PJSIP_SC_OK, PJ_FALSE);
+    } else if (dlg) {
+	pjsip_dlg_terminate(dlg);
+    }
+
+    if (call_id != -1) {
+	reset_call(call_id);
+	pjsua_media_channel_deinit(call_id);
+    }
+
+    PJSUA_UNLOCK();
+    return status;
+}
+
+
+/**
+ * Handle incoming INVITE request.
+ * Called by pjsua_core.c
+ */
+pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata)
+{
+    pj_str_t contact;
+    pjsip_dialog *dlg = pjsip_rdata_get_dlg(rdata);
+    pjsip_dialog *replaced_dlg = NULL;
+    pjsip_transaction *tsx = pjsip_rdata_get_tsx(rdata);
+    pjsip_msg *msg = rdata->msg_info.msg;
+    pjsip_tx_data *response = NULL;
+    unsigned options = 0;
+    pjsip_inv_session *inv = NULL;
+    int acc_id;
+    pjsua_call *call;
+    int call_id = -1;
+    pjmedia_sdp_session *answer;
+    pj_status_t status;
+
+    /* Don't want to handle anything but INVITE */
+    if (msg->line.req.method.id != PJSIP_INVITE_METHOD)
+	return PJ_FALSE;
+
+    /* Don't want to handle anything that's already associated with
+     * existing dialog or transaction.
+     */
+    if (dlg || tsx)
+	return PJ_FALSE;
+
+    PJSUA_LOCK();
+
+    /* Find free call slot. */
+    for (call_id=0; call_id<(int)pjsua_var.ua_cfg.max_calls; ++call_id) {
+	if (pjsua_var.calls[call_id].inv == NULL)
+	    break;
+    }
+
+    if (call_id == (int)pjsua_var.ua_cfg.max_calls) {
+	pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 
+				      PJSIP_SC_BUSY_HERE, NULL,
+				      NULL, NULL);
+	PJ_LOG(2,(THIS_FILE, 
+		  "Unable to accept incoming call (too many calls)"));
+	PJSUA_UNLOCK();
+	return PJ_TRUE;
+    }
+
+    /* Clear call descriptor */
+    reset_call(call_id);
+
+    call = &pjsua_var.calls[call_id];
+
+    /* Mark call start time. */
+    pj_gettimeofday(&call->start_time);
+
+    /* Check INVITE request for Replaces header. If Replaces header is
+     * present, the function will make sure that we can handle the request.
+     */
+    status = pjsip_replaces_verify_request(rdata, &replaced_dlg, PJ_FALSE,
+					   &response);
+    if (status != PJ_SUCCESS) {
+	/*
+	 * Something wrong with the Replaces header.
+	 */
+	if (response) {
+	    pjsip_response_addr res_addr;
+
+	    pjsip_get_response_addr(response->pool, rdata, &res_addr);
+	    pjsip_endpt_send_response(pjsua_var.endpt, &res_addr, response, 
+				      NULL, NULL);
+
+	} else {
+
+	    /* Respond with 500 (Internal Server Error) */
+	    pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL,
+					  NULL, NULL);
+	}
+
+	PJSUA_UNLOCK();
+	return PJ_TRUE;
+    }
+
+    /* If this INVITE request contains Replaces header, notify application
+     * about the request so that application can do subsequent checking
+     * if it wants to.
+     */
+    if (replaced_dlg != NULL && pjsua_var.ua_cfg.cb.on_call_replace_request) {
+	pjsua_call *replaced_call;
+	int st_code = 200;
+	pj_str_t st_text = { "OK", 2 };
+
+	/* Get the replaced call instance */
+	replaced_call = replaced_dlg->mod_data[pjsua_var.mod.id];
+
+	/* Notify application */
+	pjsua_var.ua_cfg.cb.on_call_replace_request(replaced_call->index,
+						    rdata, &st_code, &st_text);
+
+	/* Must specify final response */
+	PJ_ASSERT_ON_FAIL(st_code >= 200, st_code = 200);
+
+	/* Check if application rejects this request. */
+	if (st_code >= 300) {
+
+	    if (st_text.slen == 2)
+		st_text = *pjsip_get_status_text(st_code);
+
+	    pjsip_endpt_respond(pjsua_var.endpt, NULL, rdata, 
+				st_code, &st_text, NULL, NULL, NULL);
+	    PJSUA_UNLOCK();
+	    return PJ_TRUE;
+	}
+    }
+
+
+    /* Init media channel */
+    status = pjsua_media_channel_init(call->index, PJSIP_ROLE_UAS);
+    if (status != PJ_SUCCESS) {
+	pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL,
+				      NULL, NULL);
+	PJSUA_UNLOCK();
+	return PJ_TRUE;
+    }
+
+
+    /* Get media capability from media endpoint: */
+    status = pjsua_media_channel_create_sdp(call->index, rdata->tp_info.pool, &answer);
+    if (status != PJ_SUCCESS) {
+	pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL,
+				      NULL, NULL);
+	pjsua_media_channel_deinit(call->index);
+	PJSUA_UNLOCK();
+	return PJ_TRUE;
+    }
+
+
+    /* Verify that we can handle the request. */
+    status = pjsip_inv_verify_request(rdata, &options, answer, NULL,
+				      pjsua_var.endpt, &response);
+    if (status != PJ_SUCCESS) {
+
+	/*
+	 * No we can't handle the incoming INVITE request.
+	 */
+
+	if (response) {
+	    pjsip_response_addr res_addr;
+
+	    pjsip_get_response_addr(response->pool, rdata, &res_addr);
+	    pjsip_endpt_send_response(pjsua_var.endpt, &res_addr, response, 
+				      NULL, NULL);
+
+	} else {
+
+	    /* Respond with 500 (Internal Server Error) */
+	    pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL,
+					  NULL, NULL);
+	}
+
+	pjsua_media_channel_deinit(call->index);
+	PJSUA_UNLOCK();
+	return PJ_TRUE;
+    } 
+
+
+    /* 
+     * Get which account is most likely to be associated with this incoming
+     * call. We need the account to find which contact URI to put for
+     * the call.
+     */
+    acc_id = call->acc_id = pjsua_acc_find_for_incoming(rdata);
+
+    /* Get suitable Contact header */
+    status = pjsua_acc_create_uas_contact(rdata->tp_info.pool, &contact,
+					  acc_id, rdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to generate Contact header", status);
+	pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL,
+				      NULL, NULL);
+	pjsua_media_channel_deinit(call->index);
+	PJSUA_UNLOCK();
+	return PJ_TRUE;
+    }
+
+    /* Create dialog: */
+    status = pjsip_dlg_create_uas( pjsip_ua_instance(), rdata,
+				   &contact, &dlg);
+    if (status != PJ_SUCCESS) {
+	pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL,
+				      NULL, NULL);
+	pjsua_media_channel_deinit(call->index);
+	PJSUA_UNLOCK();
+	return PJ_TRUE;
+    }
+
+    /* Set credentials */
+    if (pjsua_var.acc[acc_id].cred_cnt) {
+	pjsip_auth_clt_set_credentials(&dlg->auth_sess, 
+				       pjsua_var.acc[acc_id].cred_cnt,
+				       pjsua_var.acc[acc_id].cred);
+    }
+
+    /* Create invite session: */
+    status = pjsip_inv_create_uas( dlg, rdata, answer, 0, &inv);
+    if (status != PJ_SUCCESS) {
+	pjsip_hdr hdr_list;
+	pjsip_warning_hdr *w;
+
+	w = pjsip_warning_hdr_create_from_status(dlg->pool, 
+						 pjsip_endpt_name(pjsua_var.endpt),
+						 status);
+	pj_list_init(&hdr_list);
+	pj_list_push_back(&hdr_list, w);
+
+	pjsip_dlg_respond(dlg, rdata, 500, NULL, &hdr_list, NULL);
+
+	/* Can't terminate dialog because transaction is in progress.
+	pjsip_dlg_terminate(dlg);
+	 */
+	pjsua_media_channel_deinit(call->index);
+	PJSUA_UNLOCK();
+	return PJ_TRUE;
+    }
+
+
+    /* Create and attach pjsua_var data to the dialog: */
+    call->inv = inv;
+
+    dlg->mod_data[pjsua_var.mod.id] = call;
+    inv->mod_data[pjsua_var.mod.id] = call;
+
+    /* If account is locked to specific transport, then lock dialog
+     * to this transport too.
+     */
+    if (pjsua_var.acc[acc_id].cfg.transport_id != PJSUA_INVALID_ID) {
+	pjsip_tpselector tp_sel;
+
+	pjsua_init_tpselector(pjsua_var.acc[acc_id].cfg.transport_id, &tp_sel);
+	pjsip_dlg_set_transport(dlg, &tp_sel);
+    }
+
+    /* Must answer with some response to initial INVITE.
+     */
+    status = pjsip_inv_initial_answer(inv, rdata, 
+				      100, NULL, NULL, &response);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to send answer to incoming INVITE", 
+		     status);
+
+	pjsip_dlg_respond(dlg, rdata, 500, NULL, NULL, NULL);
+	pjsip_inv_terminate(inv, 500, PJ_FALSE);
+	pjsua_media_channel_deinit(call->index);
+	PJSUA_UNLOCK();
+	return PJ_TRUE;
+
+    } else {
+	status = pjsip_inv_send_msg(inv, response);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Unable to send 100 response", status);
+	}
+    }
+
+    ++pjsua_var.call_cnt;
+
+
+    /* Check if this request should replace existing call */
+    if (replaced_dlg) {
+	pjsip_inv_session *replaced_inv;
+	struct pjsua_call *replaced_call;
+	pjsip_tx_data *tdata;
+
+	/* Get the invite session in the dialog */
+	replaced_inv = pjsip_dlg_get_inv_session(replaced_dlg);
+
+	/* Get the replaced call instance */
+	replaced_call = replaced_dlg->mod_data[pjsua_var.mod.id];
+
+	/* Notify application */
+	if (pjsua_var.ua_cfg.cb.on_call_replaced)
+	    pjsua_var.ua_cfg.cb.on_call_replaced(replaced_call->index,
+					         call_id);
+
+	PJ_LOG(4,(THIS_FILE, "Answering replacement call %d with 200/OK",
+			     call_id));
+
+	/* Answer the new call with 200 response */
+	status = pjsip_inv_answer(inv, 200, NULL, NULL, &tdata);
+	if (status == PJ_SUCCESS)
+	    status = pjsip_inv_send_msg(inv, tdata);
+
+	if (status != PJ_SUCCESS)
+	    pjsua_perror(THIS_FILE, "Error answering session", status);
+
+	/* Note that inv may be invalid if 200/OK has caused error in
+	 * starting the media.
+	 */
+
+	PJ_LOG(4,(THIS_FILE, "Disconnecting replaced call %d",
+			     replaced_call->index));
+
+	/* Disconnect replaced invite session */
+	status = pjsip_inv_end_session(replaced_inv, PJSIP_SC_GONE, NULL,
+				       &tdata);
+	if (status == PJ_SUCCESS && tdata)
+	    status = pjsip_inv_send_msg(replaced_inv, tdata);
+
+	if (status != PJ_SUCCESS)
+	    pjsua_perror(THIS_FILE, "Error terminating session", status);
+
+
+    } else {
+
+	/* Notify application if on_incoming_call() is overriden, 
+	 * otherwise hangup the call with 480
+	 */
+	if (pjsua_var.ua_cfg.cb.on_incoming_call) {
+	    pjsua_var.ua_cfg.cb.on_incoming_call(acc_id, call_id, rdata);
+	} else {
+	    pjsua_call_hangup(call_id, PJSIP_SC_TEMPORARILY_UNAVAILABLE, 
+			      NULL, NULL);
+	}
+    }
+
+
+    /* This INVITE request has been handled. */
+    PJSUA_UNLOCK();
+    return PJ_TRUE;
+}
+
+
+
+/*
+ * Check if the specified call has active INVITE session and the INVITE
+ * session has not been disconnected.
+ */
+PJ_DEF(pj_bool_t) pjsua_call_is_active(pjsua_call_id call_id)
+{
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+    return pjsua_var.calls[call_id].inv != NULL &&
+	   pjsua_var.calls[call_id].inv->state != PJSIP_INV_STATE_DISCONNECTED;
+}
+
+
+/*
+ * Check if call has an active media session.
+ */
+PJ_DEF(pj_bool_t) pjsua_call_has_media(pjsua_call_id call_id)
+{
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls, 
+		     PJ_EINVAL);
+    return pjsua_var.calls[call_id].session != NULL;
+}
+
+
+/* Acquire lock to the specified call_id */
+static pj_status_t acquire_call(const char *title,
+				pjsua_call_id call_id,
+				pjsua_call **p_call,
+				pjsip_dialog **p_dlg)
+{
+    enum { MAX_RETRY=50 };
+    unsigned retry;
+    pjsua_call *call = NULL;
+    pj_bool_t has_pjsua_lock = PJ_FALSE;
+    pj_status_t status = PJ_SUCCESS;
+
+    for (retry=0; retry<MAX_RETRY; ++retry) {
+	
+	has_pjsua_lock = PJ_FALSE;
+
+	status = PJSUA_TRY_LOCK();
+	if (status != PJ_SUCCESS) {
+	    pj_thread_sleep(retry/10);
+	    continue;
+	}
+
+	has_pjsua_lock = PJ_TRUE;
+	call = &pjsua_var.calls[call_id];
+
+	if (call->inv == NULL) {
+	    PJSUA_UNLOCK();
+	    PJ_LOG(3,(THIS_FILE, "Invalid call_id %d in %s", call_id, title));
+	    return PJSIP_ESESSIONTERMINATED;
+	}
+
+	status = pjsip_dlg_try_inc_lock(call->inv->dlg);
+	if (status != PJ_SUCCESS) {
+	    PJSUA_UNLOCK();
+	    pj_thread_sleep(retry/10);
+	    continue;
+	}
+
+	PJSUA_UNLOCK();
+
+	break;
+    }
+
+    if (status != PJ_SUCCESS) {
+	if (has_pjsua_lock == PJ_FALSE)
+	    PJ_LOG(1,(THIS_FILE, "Timed-out trying to acquire PJSUA mutex "
+				 "(possibly system has deadlocked) in %s",
+				 title));
+	else
+	    PJ_LOG(1,(THIS_FILE, "Timed-out trying to acquire dialog mutex "
+				 "(possibly system has deadlocked) in %s",
+				 title));
+	return PJ_ETIMEDOUT;
+    }
+    
+    *p_call = call;
+    *p_dlg = call->inv->dlg;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get the conference port identification associated with the call.
+ */
+PJ_DEF(pjsua_conf_port_id) pjsua_call_get_conf_port(pjsua_call_id call_id)
+{
+    pjsua_call *call;
+    pjsua_conf_port_id port_id;
+    pjsip_dialog *dlg;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls, 
+		     PJ_EINVAL);
+
+    status = acquire_call("pjsua_call_get_conf_port()", call_id, &call, &dlg);
+    if (status != PJ_SUCCESS)
+	return PJSUA_INVALID_ID;
+
+    port_id = call->conf_slot;
+
+    pjsip_dlg_dec_lock(dlg);
+
+    return port_id;
+}
+
+
+
+/*
+ * Obtain detail information about the specified call.
+ */
+PJ_DEF(pj_status_t) pjsua_call_get_info( pjsua_call_id call_id,
+					 pjsua_call_info *info)
+{
+    pjsua_call *call;
+    pjsip_dialog *dlg;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+
+    pj_bzero(info, sizeof(*info));
+
+    status = acquire_call("pjsua_call_get_info()", call_id, &call, &dlg);
+    if (status != PJ_SUCCESS) {
+	return status;
+    }
+
+    /* id and role */
+    info->id = call_id;
+    info->role = call->inv->role;
+    info->acc_id = call->acc_id;
+
+    /* local info */
+    info->local_info.ptr = info->buf_.local_info;
+    pj_strncpy(&info->local_info, &call->inv->dlg->local.info_str,
+	       sizeof(info->buf_.local_info));
+
+    /* local contact */
+    info->local_contact.ptr = info->buf_.local_contact;
+    info->local_contact.slen = pjsip_uri_print(PJSIP_URI_IN_CONTACT_HDR,
+					       call->inv->dlg->local.contact->uri,
+					       info->local_contact.ptr,
+					       sizeof(info->buf_.local_contact));
+
+    /* remote info */
+    info->remote_info.ptr = info->buf_.remote_info;
+    pj_strncpy(&info->remote_info, &call->inv->dlg->remote.info_str,
+	       sizeof(info->buf_.remote_info));
+
+    /* remote contact */
+    if (call->inv->dlg->remote.contact) {
+	int len;
+	info->remote_contact.ptr = info->buf_.remote_contact;
+	len = pjsip_uri_print(PJSIP_URI_IN_CONTACT_HDR,
+			      call->inv->dlg->remote.contact->uri,
+			      info->remote_contact.ptr,
+			      sizeof(info->buf_.remote_contact));
+	if (len < 0) len = 0;
+	info->remote_contact.slen = len;
+    } else {
+	info->remote_contact.slen = 0;
+    }
+
+    /* call id */
+    info->call_id.ptr = info->buf_.call_id;
+    pj_strncpy(&info->call_id, &call->inv->dlg->call_id->id,
+	       sizeof(info->buf_.call_id));
+
+    /* state, state_text */
+    info->state = call->inv->state;
+    info->state_text = pj_str((char*)pjsip_inv_state_name(info->state));
+
+    /* If call is disconnected, set the last_status from the cause code */
+    if (call->inv->state >= PJSIP_INV_STATE_DISCONNECTED) {
+	/* last_status, last_status_text */
+	info->last_status = call->inv->cause;
+
+	info->last_status_text.ptr = info->buf_.last_status_text;
+	pj_strncpy(&info->last_status_text, &call->inv->cause_text,
+		   sizeof(info->buf_.last_status_text));
+    } else {
+	/* last_status, last_status_text */
+	info->last_status = call->last_code;
+
+	info->last_status_text.ptr = info->buf_.last_status_text;
+	pj_strncpy(&info->last_status_text, &call->last_text,
+		   sizeof(info->buf_.last_status_text));
+    }
+    
+    /* media status and dir */
+    info->media_status = call->media_st;
+    info->media_dir = call->media_dir;
+
+
+    /* conference slot number */
+    info->conf_slot = call->conf_slot;
+
+    /* calculate duration */
+    if (info->state >= PJSIP_INV_STATE_DISCONNECTED) {
+
+	info->total_duration = call->dis_time;
+	PJ_TIME_VAL_SUB(info->total_duration, call->start_time);
+
+	if (call->conn_time.sec) {
+	    info->connect_duration = call->dis_time;
+	    PJ_TIME_VAL_SUB(info->connect_duration, call->conn_time);
+	}
+
+    } else if (info->state == PJSIP_INV_STATE_CONFIRMED) {
+
+	pj_gettimeofday(&info->total_duration);
+	PJ_TIME_VAL_SUB(info->total_duration, call->start_time);
+
+	pj_gettimeofday(&info->connect_duration);
+	PJ_TIME_VAL_SUB(info->connect_duration, call->conn_time);
+
+    } else {
+	pj_gettimeofday(&info->total_duration);
+	PJ_TIME_VAL_SUB(info->total_duration, call->start_time);
+    }
+
+    pjsip_dlg_dec_lock(dlg);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Attach application specific data to the call.
+ */
+PJ_DEF(pj_status_t) pjsua_call_set_user_data( pjsua_call_id call_id,
+					      void *user_data)
+{
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+    pjsua_var.calls[call_id].user_data = user_data;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get user data attached to the call.
+ */
+PJ_DEF(void*) pjsua_call_get_user_data(pjsua_call_id call_id)
+{
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     NULL);
+    return pjsua_var.calls[call_id].user_data;
+}
+
+
+/*
+ * Send response to incoming INVITE request.
+ */
+PJ_DEF(pj_status_t) pjsua_call_answer( pjsua_call_id call_id, 
+				       unsigned code,
+				       const pj_str_t *reason,
+				       const pjsua_msg_data *msg_data)
+{
+    pjsua_call *call;
+    pjsip_dialog *dlg;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+
+    status = acquire_call("pjsua_call_answer()", call_id, &call, &dlg);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    if (call->res_time.sec == 0)
+	pj_gettimeofday(&call->res_time);
+
+    if (reason && reason->slen == 0)
+	reason = NULL;
+
+    /* Create response message */
+    status = pjsip_inv_answer(call->inv, code, reason, NULL, &tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error creating response", 
+		     status);
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    /* Call might have been disconnected if application is answering with
+     * 200/OK and the media failed to start.
+     */
+    if (call->inv == NULL) {
+	pjsip_dlg_dec_lock(dlg);
+	return PJSIP_ESESSIONTERMINATED;
+    }
+
+    /* Add additional headers etc */
+    pjsua_process_msg_data( tdata, msg_data);
+
+    /* Send the message */
+    status = pjsip_inv_send_msg(call->inv, tdata);
+    if (status != PJ_SUCCESS)
+	pjsua_perror(THIS_FILE, "Error sending response", 
+		     status);
+
+    pjsip_dlg_dec_lock(dlg);
+
+    return status;
+}
+
+
+/*
+ * Hangup call by using method that is appropriate according to the
+ * call state.
+ */
+PJ_DEF(pj_status_t) pjsua_call_hangup(pjsua_call_id call_id,
+				      unsigned code,
+				      const pj_str_t *reason,
+				      const pjsua_msg_data *msg_data)
+{
+    pjsua_call *call;
+    pjsip_dialog *dlg;
+    pj_status_t status;
+    pjsip_tx_data *tdata;
+
+
+    if (call_id<0 || call_id>=(int)pjsua_var.ua_cfg.max_calls) {
+	PJ_LOG(1,(THIS_FILE, "pjsua_call_hangup(): invalid call id %d",
+			     call_id));
+    }
+    
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+
+    status = acquire_call("pjsua_call_hangup()", call_id, &call, &dlg);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    if (code==0) {
+	if (call->inv->state == PJSIP_INV_STATE_CONFIRMED)
+	    code = PJSIP_SC_OK;
+	else if (call->inv->role == PJSIP_ROLE_UAS)
+	    code = PJSIP_SC_DECLINE;
+	else
+	    code = PJSIP_SC_REQUEST_TERMINATED;
+    }
+
+    status = pjsip_inv_end_session(call->inv, code, reason, &tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, 
+		     "Failed to create end session message", 
+		     status);
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    /* pjsip_inv_end_session may return PJ_SUCCESS with NULL 
+     * as p_tdata when INVITE transaction has not been answered
+     * with any provisional responses.
+     */
+    if (tdata == NULL) {
+	pjsip_dlg_dec_lock(dlg);
+	return PJ_SUCCESS;
+    }
+
+    /* Add additional headers etc */
+    pjsua_process_msg_data( tdata, msg_data);
+
+    /* Send the message */
+    status = pjsip_inv_send_msg(call->inv, tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, 
+		     "Failed to send end session message", 
+		     status);
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    pjsip_dlg_dec_lock(dlg);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Put the specified call on hold.
+ */
+PJ_DEF(pj_status_t) pjsua_call_set_hold(pjsua_call_id call_id,
+					const pjsua_msg_data *msg_data)
+{
+    pjmedia_sdp_session *sdp;
+    pjsua_call *call;
+    pjsip_dialog *dlg;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+
+    status = acquire_call("pjsua_call_set_hold()", call_id, &call, &dlg);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    if (call->inv->state != PJSIP_INV_STATE_CONFIRMED) {
+	PJ_LOG(3,(THIS_FILE, "Can not hold call that is not confirmed"));
+	pjsip_dlg_dec_lock(dlg);
+	return PJSIP_ESESSIONSTATE;
+    }
+
+    status = create_inactive_sdp(call, &sdp);
+    if (status != PJ_SUCCESS) {
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    /* Create re-INVITE with new offer */
+    status = pjsip_inv_reinvite( call->inv, NULL, sdp, &tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create re-INVITE", status);
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    /* Add additional headers etc */
+    pjsua_process_msg_data( tdata, msg_data);
+
+    /* Send the request */
+    status = pjsip_inv_send_msg( call->inv, tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to send re-INVITE", status);
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    pjsip_dlg_dec_lock(dlg);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Send re-INVITE (to release hold).
+ */
+PJ_DEF(pj_status_t) pjsua_call_reinvite( pjsua_call_id call_id,
+					 pj_bool_t unhold,
+					 const pjsua_msg_data *msg_data)
+{
+    pjmedia_sdp_session *sdp;
+    pjsip_tx_data *tdata;
+    pjsua_call *call;
+    pjsip_dialog *dlg;
+    pj_status_t status;
+
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+
+    status = acquire_call("pjsua_call_reinvite()", call_id, &call, &dlg);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    if (call->inv->state != PJSIP_INV_STATE_CONFIRMED) {
+	PJ_LOG(3,(THIS_FILE, "Can not re-INVITE call that is not confirmed"));
+	pjsip_dlg_dec_lock(dlg);
+	return PJSIP_ESESSIONSTATE;
+    }
+
+    /* Init media channel */
+    status = pjsua_media_channel_init(call->index, PJSIP_ROLE_UAC);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error initializing media channel", status);
+	pjsip_dlg_dec_lock(dlg);
+	return PJSIP_ESESSIONSTATE;
+    }
+
+    /* Create SDP */
+    PJ_UNUSED_ARG(unhold);
+    PJ_TODO(create_active_inactive_sdp_based_on_unhold_arg);
+    status = pjsua_media_channel_create_sdp(call->index, call->inv->pool, &sdp);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to get SDP from media endpoint", 
+		     status);
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    /* Create re-INVITE with new offer */
+    status = pjsip_inv_reinvite( call->inv, NULL, sdp, &tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create re-INVITE", status);
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    /* Add additional headers etc */
+    pjsua_process_msg_data( tdata, msg_data);
+
+    /* Send the request */
+    status = pjsip_inv_send_msg( call->inv, tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to send re-INVITE", status);
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    pjsip_dlg_dec_lock(dlg);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Initiate call transfer to the specified address.
+ */
+PJ_DEF(pj_status_t) pjsua_call_xfer( pjsua_call_id call_id, 
+				     const pj_str_t *dest,
+				     const pjsua_msg_data *msg_data)
+{
+    pjsip_evsub *sub;
+    pjsip_tx_data *tdata;
+    pjsua_call *call;
+    pjsip_dialog *dlg;
+    pjsip_generic_string_hdr *gs_hdr;
+    const pj_str_t str_ref_by = { "Referred-By", 11 };
+    struct pjsip_evsub_user xfer_cb;
+    pj_status_t status;
+
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+    
+    status = acquire_call("pjsua_call_xfer()", call_id, &call, &dlg);
+    if (status != PJ_SUCCESS)
+	return status;
+
+   
+    /* Create xfer client subscription. */
+    pj_bzero(&xfer_cb, sizeof(xfer_cb));
+    xfer_cb.on_evsub_state = &xfer_client_on_evsub_state;
+
+    status = pjsip_xfer_create_uac(call->inv->dlg, &xfer_cb, &sub);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create xfer", status);
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    /* Associate this call with the client subscription */
+    pjsip_evsub_set_mod_data(sub, pjsua_var.mod.id, call);
+
+    /*
+     * Create REFER request.
+     */
+    status = pjsip_xfer_initiate(sub, dest, &tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create REFER request", status);
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    /* Add Referred-By header */
+    gs_hdr = pjsip_generic_string_hdr_create(tdata->pool, &str_ref_by,
+					     &dlg->local.info_str);
+    pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)gs_hdr);
+
+
+    /* Add additional headers etc */
+    pjsua_process_msg_data( tdata, msg_data);
+
+    /* Send. */
+    status = pjsip_xfer_send_request(sub, tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to send REFER request", status);
+	pjsip_dlg_dec_lock(dlg);
+	return status;
+    }
+
+    /* For simplicity (that's what this program is intended to be!), 
+     * leave the original invite session as it is. More advanced application
+     * may want to hold the INVITE, or terminate the invite, or whatever.
+     */
+
+    pjsip_dlg_dec_lock(dlg);
+
+    return PJ_SUCCESS;
+
+}
+
+
+/*
+ * Initiate attended call transfer to the specified address.
+ */
+PJ_DEF(pj_status_t) pjsua_call_xfer_replaces( pjsua_call_id call_id, 
+					      pjsua_call_id dest_call_id,
+					      unsigned options,
+					      const pjsua_msg_data *msg_data)
+{
+    pjsua_call *dest_call;
+    pjsip_dialog *dest_dlg;
+    char str_dest_buf[512];
+    pj_str_t str_dest;
+    int len;
+    pjsip_uri *uri;
+    pj_status_t status;
+    
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+    PJ_ASSERT_RETURN(dest_call_id>=0 && 
+		      dest_call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+    
+    status = acquire_call("pjsua_call_xfer_replaces()", dest_call_id, 
+			  &dest_call, &dest_dlg);
+    if (status != PJ_SUCCESS)
+	return status;
+        
+    /* 
+     * Create REFER destination URI with Replaces field.
+     */
+
+    /* Make sure we have sufficient buffer's length */
+    PJ_ASSERT_RETURN( dest_dlg->remote.info_str.slen +
+		      dest_dlg->call_id->id.slen +
+		      dest_dlg->remote.info->tag.slen +
+		      dest_dlg->local.info->tag.slen + 32 
+		      < sizeof(str_dest_buf), PJSIP_EURITOOLONG);
+
+    /* Print URI */
+    str_dest_buf[0] = '<';
+    str_dest.slen = 1;
+
+    uri = pjsip_uri_get_uri(dest_dlg->remote.info->uri);
+    len = pjsip_uri_print(PJSIP_URI_IN_REQ_URI, uri, 
+		          str_dest_buf+1, sizeof(str_dest_buf)-1);
+    if (len < 0)
+	return PJSIP_EURITOOLONG;
+
+    str_dest.slen += len;
+
+
+    /* Build the URI */
+    len = pj_ansi_snprintf(str_dest_buf + str_dest.slen, 
+			   sizeof(str_dest_buf) - str_dest.slen,
+			   "?%s"
+			   "Replaces=%.*s"
+			   "%%3Bto-tag%%3D%.*s"
+			   "%%3Bfrom-tag%%3D%.*s>",
+			   ((options&PJSUA_XFER_NO_REQUIRE_REPLACES) ?
+			    "" : "Require=replaces&"),
+			   (int)dest_dlg->call_id->id.slen,
+			   dest_dlg->call_id->id.ptr,
+			   (int)dest_dlg->remote.info->tag.slen,
+			   dest_dlg->remote.info->tag.ptr,
+			   (int)dest_dlg->local.info->tag.slen,
+			   dest_dlg->local.info->tag.ptr);
+
+    PJ_ASSERT_RETURN(len > 0 && len <= (int)sizeof(str_dest_buf)-str_dest.slen,
+		     PJSIP_EURITOOLONG);
+    
+    str_dest.ptr = str_dest_buf;
+    str_dest.slen += len;
+
+    pjsip_dlg_dec_lock(dest_dlg);
+    
+    return pjsua_call_xfer(call_id, &str_dest, msg_data);
+}
+
+
+/*
+ * Send DTMF digits to remote using RFC 2833 payload formats.
+ */
+PJ_DEF(pj_status_t) pjsua_call_dial_dtmf( pjsua_call_id call_id, 
+					  const pj_str_t *digits)
+{
+    pjsua_call *call;
+    pjsip_dialog *dlg;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+    
+    status = acquire_call("pjsua_call_dial_dtmf()", call_id, &call, &dlg);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    if (!call->session) {
+	PJ_LOG(3,(THIS_FILE, "Media is not established yet!"));
+	pjsip_dlg_dec_lock(dlg);
+	return PJ_EINVALIDOP;
+    }
+
+    status = pjmedia_session_dial_dtmf( call->session, 0, digits);
+
+    pjsip_dlg_dec_lock(dlg);
+
+    return status;
+}
+
+
+/**
+ * Send instant messaging inside INVITE session.
+ */
+PJ_DEF(pj_status_t) pjsua_call_send_im( pjsua_call_id call_id, 
+					const pj_str_t *mime_type,
+					const pj_str_t *content,
+					const pjsua_msg_data *msg_data,
+					void *user_data)
+{
+    pjsua_call *call;
+    pjsip_dialog *dlg;
+    const pj_str_t mime_text_plain = pj_str("text/plain");
+    pjsip_media_type ctype;
+    pjsua_im_data *im_data;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+
+    status = acquire_call("pjsua_call_send_im()", call_id, &call, &dlg);
+    if (status != PJ_SUCCESS)
+	return status;
+    
+    /* Set default media type if none is specified */
+    if (mime_type == NULL) {
+	mime_type = &mime_text_plain;
+    }
+
+    /* Create request message. */
+    status = pjsip_dlg_create_request( call->inv->dlg, &pjsip_message_method,
+				       -1, &tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create MESSAGE request", status);
+	goto on_return;
+    }
+
+    /* Add accept header. */
+    pjsip_msg_add_hdr( tdata->msg, 
+		       (pjsip_hdr*)pjsua_im_create_accept(tdata->pool));
+
+    /* Parse MIME type */
+    pjsua_parse_media_type(tdata->pool, mime_type, &ctype);
+
+    /* Create "text/plain" message body. */
+    tdata->msg->body = pjsip_msg_body_create( tdata->pool, &ctype.type,
+					      &ctype.subtype, content);
+    if (tdata->msg->body == NULL) {
+	pjsua_perror(THIS_FILE, "Unable to create msg body", PJ_ENOMEM);
+	pjsip_tx_data_dec_ref(tdata);
+	goto on_return;
+    }
+
+    /* Add additional headers etc */
+    pjsua_process_msg_data( tdata, msg_data);
+
+    /* Create IM data and attach to the request. */
+    im_data = pj_pool_zalloc(tdata->pool, sizeof(*im_data));
+    im_data->acc_id = call->acc_id;
+    im_data->call_id = call_id;
+    im_data->to = call->inv->dlg->remote.info_str;
+    pj_strdup_with_null(tdata->pool, &im_data->body, content);
+    im_data->user_data = user_data;
+
+
+    /* Send the request. */
+    status = pjsip_dlg_send_request( call->inv->dlg, tdata, 
+				     pjsua_var.mod.id, im_data);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to send MESSAGE request", status);
+	goto on_return;
+    }
+
+on_return:
+    pjsip_dlg_dec_lock(dlg);
+    return status;
+}
+
+
+/*
+ * Send IM typing indication inside INVITE session.
+ */
+PJ_DEF(pj_status_t) pjsua_call_send_typing_ind( pjsua_call_id call_id, 
+						pj_bool_t is_typing,
+						const pjsua_msg_data*msg_data)
+{
+    pjsua_call *call;
+    pjsip_dialog *dlg;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+
+    status = acquire_call("pjsua_call_send_typing_ind", call_id, &call, &dlg);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Create request message. */
+    status = pjsip_dlg_create_request( call->inv->dlg, &pjsip_message_method,
+				       -1, &tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create MESSAGE request", status);
+	goto on_return;
+    }
+
+    /* Create "application/im-iscomposing+xml" msg body. */
+    tdata->msg->body = pjsip_iscomposing_create_body(tdata->pool, is_typing,
+						     NULL, NULL, -1);
+
+    /* Add additional headers etc */
+    pjsua_process_msg_data( tdata, msg_data);
+
+    /* Send the request. */
+    status = pjsip_dlg_send_request( call->inv->dlg, tdata, -1, NULL);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to send MESSAGE request", status);
+	goto on_return;
+    }
+
+on_return:
+    pjsip_dlg_dec_lock(dlg);
+    return status;
+}
+
+
+/*
+ * Terminate all calls.
+ */
+PJ_DEF(void) pjsua_call_hangup_all(void)
+{
+    unsigned i;
+
+    PJSUA_LOCK();
+
+    for (i=0; i<pjsua_var.ua_cfg.max_calls; ++i) {
+	if (pjsua_var.calls[i].inv)
+	    pjsua_call_hangup(i, 0, NULL, NULL);
+    }
+
+    PJSUA_UNLOCK();
+}
+
+
+static const char *good_number(char *buf, pj_int32_t val)
+{
+    if (val < 1000) {
+	pj_ansi_sprintf(buf, "%d", val);
+    } else if (val < 1000000) {
+	pj_ansi_sprintf(buf, "%d.%dK", 
+			val / 1000,
+			(val % 1000) / 100);
+    } else {
+	pj_ansi_sprintf(buf, "%d.%02dM", 
+			val / 1000000,
+			(val % 1000000) / 10000);
+    }
+
+    return buf;
+}
+
+
+/* Dump media session */
+static void dump_media_session(const char *indent, 
+			       char *buf, unsigned maxlen,
+			       pjmedia_session *session)
+{
+    unsigned i;
+    char *p = buf, *end = buf+maxlen;
+    int len;
+    pjmedia_session_info info;
+
+    pjmedia_session_get_info(session, &info);
+
+    for (i=0; i<info.stream_cnt; ++i) {
+	pjmedia_rtcp_stat stat;
+	const char *rem_addr;
+	int rem_port;
+	const char *dir;
+	char last_update[64];
+	char packets[32], bytes[32], ipbytes[32], avg_bps[32];
+	pj_time_val media_duration, now;
+
+	pjmedia_session_get_stream_stat(session, i, &stat);
+	rem_addr = pj_inet_ntoa(info.stream_info[i].rem_addr.sin_addr);
+	rem_port = pj_ntohs(info.stream_info[i].rem_addr.sin_port);
+
+	if (info.stream_info[i].dir == PJMEDIA_DIR_ENCODING)
+	    dir = "sendonly";
+	else if (info.stream_info[i].dir == PJMEDIA_DIR_DECODING)
+	    dir = "recvonly";
+	else if (info.stream_info[i].dir == PJMEDIA_DIR_ENCODING_DECODING)
+	    dir = "sendrecv";
+	else
+	    dir = "inactive";
+
+	
+	len = pj_ansi_snprintf(buf, end-p, 
+		  "%s  #%d %.*s @%dKHz, %s, peer=%s:%d",
+		  indent, i,
+		  (int)info.stream_info[i].fmt.encoding_name.slen,
+		  info.stream_info[i].fmt.encoding_name.ptr,
+		  info.stream_info[i].fmt.clock_rate / 1000,
+		  dir,
+		  rem_addr, rem_port);
+	if (len < 1 || len > end-p) {
+	    *p = '\0';
+	    return;
+	}
+
+	p += len;
+	*p++ = '\n';
+	*p = '\0';
+
+	if (stat.rx.update_cnt == 0)
+	    strcpy(last_update, "never");
+	else {
+	    pj_gettimeofday(&now);
+	    PJ_TIME_VAL_SUB(now, stat.rx.update);
+	    sprintf(last_update, "%02ldh:%02ldm:%02ld.%03lds ago",
+		    now.sec / 3600,
+		    (now.sec % 3600) / 60,
+		    now.sec % 60,
+		    now.msec);
+	}
+
+	pj_gettimeofday(&media_duration);
+	PJ_TIME_VAL_SUB(media_duration, stat.start);
+	if (PJ_TIME_VAL_MSEC(media_duration) == 0)
+	    media_duration.msec = 1;
+
+	len = pj_ansi_snprintf(p, end-p,
+	       "%s     RX pt=%d, stat last update: %s\n"
+	       "%s        total %spkt %sB (%sB +IP hdr) @avg=%sbps\n"
+	       "%s        pkt loss=%d (%3.1f%%), dup=%d (%3.1f%%), reorder=%d (%3.1f%%)\n"
+	       "%s              (msec)    min     avg     max     last\n"
+	       "%s        loss period: %7.3f %7.3f %7.3f %7.3f\n"
+	       "%s        jitter     : %7.3f %7.3f %7.3f %7.3f%s",
+	       indent, info.stream_info[i].fmt.pt,
+	       last_update,
+	       indent,
+	       good_number(packets, stat.rx.pkt),
+	       good_number(bytes, stat.rx.bytes),
+	       good_number(ipbytes, stat.rx.bytes + stat.rx.pkt * 32),
+	       good_number(avg_bps, stat.rx.bytes * 8 * 1000 / PJ_TIME_VAL_MSEC(media_duration)),
+	       indent,
+	       stat.rx.loss,
+	       stat.rx.loss * 100.0 / (stat.rx.pkt + stat.rx.loss),
+	       stat.rx.dup, 
+	       stat.rx.dup * 100.0 / (stat.rx.pkt + stat.rx.loss),
+	       stat.rx.reorder, 
+	       stat.rx.reorder * 100.0 / (stat.rx.pkt + stat.rx.loss),
+	       indent, indent,
+	       stat.rx.loss_period.min / 1000.0, 
+	       stat.rx.loss_period.avg / 1000.0, 
+	       stat.rx.loss_period.max / 1000.0,
+	       stat.rx.loss_period.last / 1000.0,
+	       indent,
+	       stat.rx.jitter.min / 1000.0,
+	       stat.rx.jitter.avg / 1000.0,
+	       stat.rx.jitter.max / 1000.0,
+	       stat.rx.jitter.last / 1000.0,
+	       ""
+	       );
+
+	if (len < 1 || len > end-p) {
+	    *p = '\0';
+	    return;
+	}
+
+	p += len;
+	*p++ = '\n';
+	*p = '\0';
+	
+	if (stat.tx.update_cnt == 0)
+	    strcpy(last_update, "never");
+	else {
+	    pj_gettimeofday(&now);
+	    PJ_TIME_VAL_SUB(now, stat.tx.update);
+	    sprintf(last_update, "%02ldh:%02ldm:%02ld.%03lds ago",
+		    now.sec / 3600,
+		    (now.sec % 3600) / 60,
+		    now.sec % 60,
+		    now.msec);
+	}
+
+	len = pj_ansi_snprintf(p, end-p,
+	       "%s     TX pt=%d, ptime=%dms, stat last update: %s\n"
+	       "%s        total %spkt %sB (%sB +IP hdr) @avg %sbps\n"
+	       "%s        pkt loss=%d (%3.1f%%), dup=%d (%3.1f%%), reorder=%d (%3.1f%%)\n"
+	       "%s              (msec)    min     avg     max     last\n"
+	       "%s        loss period: %7.3f %7.3f %7.3f %7.3f\n"
+	       "%s        jitter     : %7.3f %7.3f %7.3f %7.3f%s",
+	       indent,
+	       info.stream_info[i].tx_pt,
+	       info.stream_info[i].param->info.frm_ptime *
+		info.stream_info[i].param->setting.frm_per_pkt,
+	       last_update,
+
+	       indent,
+	       good_number(packets, stat.tx.pkt),
+	       good_number(bytes, stat.tx.bytes),
+	       good_number(ipbytes, stat.tx.bytes + stat.tx.pkt * 32),
+	       good_number(avg_bps, stat.tx.bytes * 8 * 1000 / PJ_TIME_VAL_MSEC(media_duration)),
+
+	       indent,
+	       stat.tx.loss,
+	       stat.tx.loss * 100.0 / (stat.tx.pkt + stat.tx.loss),
+	       stat.tx.dup, 
+	       stat.tx.dup * 100.0 / (stat.tx.pkt + stat.tx.loss),
+	       stat.tx.reorder, 
+	       stat.tx.reorder * 100.0 / (stat.tx.pkt + stat.tx.loss),
+
+	       indent, indent,
+	       stat.tx.loss_period.min / 1000.0, 
+	       stat.tx.loss_period.avg / 1000.0, 
+	       stat.tx.loss_period.max / 1000.0,
+	       stat.tx.loss_period.last / 1000.0,
+	       indent,
+	       stat.tx.jitter.min / 1000.0,
+	       stat.tx.jitter.avg / 1000.0,
+	       stat.tx.jitter.max / 1000.0,
+	       stat.tx.jitter.last / 1000.0,
+	       ""
+	       );
+
+	if (len < 1 || len > end-p) {
+	    *p = '\0';
+	    return;
+	}
+
+	p += len;
+	*p++ = '\n';
+	*p = '\0';
+
+	len = pj_ansi_snprintf(p, end-p,
+	       "%s    RTT msec       : %7.3f %7.3f %7.3f %7.3f", 
+	       indent,
+	       stat.rtt.min / 1000.0,
+	       stat.rtt.avg / 1000.0,
+	       stat.rtt.max / 1000.0,
+	       stat.rtt.last / 1000.0
+	       );
+	if (len < 1 || len > end-p) {
+	    *p = '\0';
+	    return;
+	}
+
+	p += len;
+	*p++ = '\n';
+	*p = '\0';
+    }
+}
+
+
+/* Print call info */
+static void print_call(const char *title,
+		       int call_id, 
+		       char *buf, pj_size_t size)
+{
+    int len;
+    pjsip_inv_session *inv = pjsua_var.calls[call_id].inv;
+    pjsip_dialog *dlg = inv->dlg;
+    char userinfo[128];
+
+    /* Dump invite sesion info. */
+
+    len = pjsip_hdr_print_on(dlg->remote.info, userinfo, sizeof(userinfo));
+    if (len < 1)
+	pj_ansi_strcpy(userinfo, "<--uri too long-->");
+    else
+	userinfo[len] = '\0';
+    
+    len = pj_ansi_snprintf(buf, size, "%s[%s] %s",
+			   title,
+			   pjsip_inv_state_name(inv->state),
+			   userinfo);
+    if (len < 1 || len >= (int)size) {
+	pj_ansi_strcpy(buf, "<--uri too long-->");
+	len = 18;
+    } else
+	buf[len] = '\0';
+}
+
+
+/*
+ * Dump call and media statistics to string.
+ */
+PJ_DEF(pj_status_t) pjsua_call_dump( pjsua_call_id call_id, 
+				     pj_bool_t with_media, 
+				     char *buffer, 
+				     unsigned maxlen,
+				     const char *indent)
+{
+    pjsua_call *call;
+    pjsip_dialog *dlg;
+    pj_time_val duration, res_delay, con_delay;
+    char tmp[128];
+    char *p, *end;
+    pj_status_t status;
+    int len;
+
+    PJ_ASSERT_RETURN(call_id>=0 && call_id<(int)pjsua_var.ua_cfg.max_calls,
+		     PJ_EINVAL);
+
+    status = acquire_call("pjsua_call_dump()", call_id, &call, &dlg);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    *buffer = '\0';
+    p = buffer;
+    end = buffer + maxlen;
+    len = 0;
+
+    print_call(indent, call_id, tmp, sizeof(tmp));
+    
+    len = pj_ansi_strlen(tmp);
+    pj_ansi_strcpy(buffer, tmp);
+
+    p += len;
+    *p++ = '\r';
+    *p++ = '\n';
+
+    /* Calculate call duration */
+    if (call->conn_time.sec != 0) {
+	pj_gettimeofday(&duration);
+	PJ_TIME_VAL_SUB(duration, call->conn_time);
+	con_delay = call->conn_time;
+	PJ_TIME_VAL_SUB(con_delay, call->start_time);
+    } else {
+	duration.sec = duration.msec = 0;
+	con_delay.sec = con_delay.msec = 0;
+    }
+
+    /* Calculate first response delay */
+    if (call->res_time.sec != 0) {
+	res_delay = call->res_time;
+	PJ_TIME_VAL_SUB(res_delay, call->start_time);
+    } else {
+	res_delay.sec = res_delay.msec = 0;
+    }
+
+    /* Print duration */
+    len = pj_ansi_snprintf(p, end-p, 
+		           "%s  Call time: %02dh:%02dm:%02ds, "
+		           "1st res in %d ms, conn in %dms",
+			   indent,
+		           (int)(duration.sec / 3600),
+		           (int)((duration.sec % 3600)/60),
+		           (int)(duration.sec % 60),
+		           (int)PJ_TIME_VAL_MSEC(res_delay), 
+		           (int)PJ_TIME_VAL_MSEC(con_delay));
+    
+    if (len > 0 && len < end-p) {
+	p += len;
+	*p++ = '\n';
+	*p = '\0';
+    }
+
+    /* Dump session statistics */
+    if (with_media && call->session)
+	dump_media_session(indent, p, end-p, call->session);
+
+    pjsip_dlg_dec_lock(dlg);
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * This callback receives notification from invite session when the
+ * session state has changed.
+ */
+static void pjsua_call_on_state_changed(pjsip_inv_session *inv, 
+					pjsip_event *e)
+{
+    pjsua_call *call;
+
+    PJSUA_LOCK();
+
+    call = inv->dlg->mod_data[pjsua_var.mod.id];
+
+    if (!call) {
+	PJSUA_UNLOCK();
+	return;
+    }
+
+
+    /* Get call times */
+    switch (inv->state) {
+	case PJSIP_INV_STATE_EARLY:
+	case PJSIP_INV_STATE_CONNECTING:
+	    if (call->res_time.sec == 0)
+		pj_gettimeofday(&call->res_time);
+	    call->last_code = e->body.tsx_state.tsx->status_code;
+	    pj_strncpy(&call->last_text, 
+		       &e->body.tsx_state.tsx->status_text,
+		       sizeof(call->last_text_buf_));
+	    break;
+	case PJSIP_INV_STATE_CONFIRMED:
+	    pj_gettimeofday(&call->conn_time);
+	    break;
+	case PJSIP_INV_STATE_DISCONNECTED:
+	    pj_gettimeofday(&call->dis_time);
+	    if (call->res_time.sec == 0)
+		pj_gettimeofday(&call->res_time);
+	    if (e->body.tsx_state.tsx->status_code > call->last_code) {
+		call->last_code = e->body.tsx_state.tsx->status_code;
+		pj_strncpy(&call->last_text, 
+			   &e->body.tsx_state.tsx->status_text,
+			   sizeof(call->last_text_buf_));
+	    }
+	    break;
+	default:
+	    call->last_code = e->body.tsx_state.tsx->status_code;
+	    pj_strncpy(&call->last_text, 
+		       &e->body.tsx_state.tsx->status_text,
+		       sizeof(call->last_text_buf_));
+	    break;
+    }
+
+    /* If this is an outgoing INVITE that was created because of
+     * REFER/transfer, send NOTIFY to transferer.
+     */
+    if (call->xfer_sub && e->type==PJSIP_EVENT_TSX_STATE)  {
+	int st_code = -1;
+	pjsip_evsub_state ev_state = PJSIP_EVSUB_STATE_ACTIVE;
+	
+
+	switch (call->inv->state) {
+	case PJSIP_INV_STATE_NULL:
+	case PJSIP_INV_STATE_CALLING:
+	    /* Do nothing */
+	    break;
+
+	case PJSIP_INV_STATE_EARLY:
+	case PJSIP_INV_STATE_CONNECTING:
+	    st_code = e->body.tsx_state.tsx->status_code;
+	    ev_state = PJSIP_EVSUB_STATE_ACTIVE;
+	    break;
+
+	case PJSIP_INV_STATE_CONFIRMED:
+	    /* When state is confirmed, send the final 200/OK and terminate
+	     * subscription.
+	     */
+	    st_code = e->body.tsx_state.tsx->status_code;
+	    ev_state = PJSIP_EVSUB_STATE_TERMINATED;
+	    break;
+
+	case PJSIP_INV_STATE_DISCONNECTED:
+	    st_code = e->body.tsx_state.tsx->status_code;
+	    ev_state = PJSIP_EVSUB_STATE_TERMINATED;
+	    break;
+
+	case PJSIP_INV_STATE_INCOMING:
+	    /* Nothing to do. Just to keep gcc from complaining about
+	     * unused enums.
+	     */
+	    break;
+	}
+
+	if (st_code != -1) {
+	    pjsip_tx_data *tdata;
+	    pj_status_t status;
+
+	    status = pjsip_xfer_notify( call->xfer_sub,
+					ev_state, st_code,
+					NULL, &tdata);
+	    if (status != PJ_SUCCESS) {
+		pjsua_perror(THIS_FILE, "Unable to create NOTIFY", status);
+	    } else {
+		status = pjsip_xfer_send_request(call->xfer_sub, tdata);
+		if (status != PJ_SUCCESS) {
+		    pjsua_perror(THIS_FILE, "Unable to send NOTIFY", status);
+		}
+	    }
+	}
+    }
+
+
+    if (pjsua_var.ua_cfg.cb.on_call_state)
+	(*pjsua_var.ua_cfg.cb.on_call_state)(call->index, e);
+
+    /* call->inv may be NULL now */
+
+    /* Destroy media session when invite session is disconnected. */
+    if (inv->state == PJSIP_INV_STATE_DISCONNECTED) {
+
+	pj_assert(call != NULL);
+
+	if (call)
+	    pjsua_media_channel_deinit(call->index);
+
+	/* Free call */
+	call->inv = NULL;
+	--pjsua_var.call_cnt;
+
+	/* Reset call */
+	reset_call(call->index);
+
+    }
+
+    PJSUA_UNLOCK();
+}
+
+/*
+ * This callback is called by invite session framework when UAC session
+ * has forked.
+ */
+static void pjsua_call_on_forked( pjsip_inv_session *inv, 
+				  pjsip_event *e)
+{
+    PJ_UNUSED_ARG(inv);
+    PJ_UNUSED_ARG(e);
+
+    PJ_TODO(HANDLE_FORKED_DIALOG);
+}
+
+
+/*
+ * Disconnect call upon error.
+ */
+static void call_disconnect( pjsip_inv_session *inv, 
+			     int code )
+{
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    status = pjsip_inv_end_session(inv, code, NULL, &tdata);
+    if (status == PJ_SUCCESS)
+	pjsip_inv_send_msg(inv, tdata);
+}
+
+/*
+ * Callback to be called when SDP offer/answer negotiation has just completed
+ * in the session. This function will start/update media if negotiation
+ * has succeeded.
+ */
+static void pjsua_call_on_media_update(pjsip_inv_session *inv,
+				       pj_status_t status)
+{
+    pjsua_call *call;
+    const pjmedia_sdp_session *local_sdp;
+    const pjmedia_sdp_session *remote_sdp;
+
+    PJSUA_LOCK();
+
+    call = inv->dlg->mod_data[pjsua_var.mod.id];
+
+    if (status != PJ_SUCCESS) {
+
+	pjsua_perror(THIS_FILE, "SDP negotiation has failed", status);
+
+	/* Stop/destroy media, if any */
+	pjsua_media_channel_deinit(call->index);
+
+	/* Disconnect call if we're not in the middle of initializing an
+	 * UAS dialog and if this is not a re-INVITE 
+	 */
+	if (inv->state != PJSIP_INV_STATE_NULL &&
+	    inv->state != PJSIP_INV_STATE_CONFIRMED) 
+	{
+	    //call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);
+	}
+
+	PJSUA_UNLOCK();
+	return;
+    }
+
+
+    /* Get local and remote SDP */
+    status = pjmedia_sdp_neg_get_active_local(call->inv->neg, &local_sdp);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, 
+		     "Unable to retrieve currently active local SDP", 
+		     status);
+	//call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);
+	PJSUA_UNLOCK();
+	return;
+    }
+
+
+    status = pjmedia_sdp_neg_get_active_remote(call->inv->neg, &remote_sdp);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, 
+		     "Unable to retrieve currently active remote SDP", 
+		     status);
+	//call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);
+	PJSUA_UNLOCK();
+	return;
+    }
+
+    status = pjsua_media_channel_update(call->index, local_sdp, remote_sdp);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create media session", 
+		     status);
+	call_disconnect(inv, PJSIP_SC_UNSUPPORTED_MEDIA_TYPE);
+	pjsua_media_channel_deinit(call->index);
+	PJSUA_UNLOCK();
+	return;
+    }
+
+
+    /* Call application callback, if any */
+    if (pjsua_var.ua_cfg.cb.on_call_media_state)
+	pjsua_var.ua_cfg.cb.on_call_media_state(call->index);
+
+
+    PJSUA_UNLOCK();
+}
+
+
+/*
+ * Create inactive SDP for call hold.
+ */
+static pj_status_t create_inactive_sdp(pjsua_call *call,
+				       pjmedia_sdp_session **p_answer)
+{
+    pj_status_t status;
+    pjmedia_sdp_conn *conn;
+    pjmedia_sdp_attr *attr;
+    pjmedia_sock_info skinfo;
+    pjmedia_sdp_session *sdp;
+
+    /* Get media socket info */
+    pjmedia_transport_get_info(call->med_tp, &skinfo);
+
+    /* Create new offer */
+    status = pjmedia_endpt_create_sdp(pjsua_var.med_endpt, pjsua_var.pool, 1,
+				      &skinfo, &sdp);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create local SDP", status);
+	return status;
+    }
+
+    /* Get SDP media connection line */
+    conn = sdp->media[0]->conn;
+    if (!conn)
+	conn = sdp->conn;
+
+    /* Modify address */
+    conn->addr = pj_str("0.0.0.0");
+
+    /* Remove existing directions attributes */
+    pjmedia_sdp_media_remove_all_attr(sdp->media[0], "sendrecv");
+    pjmedia_sdp_media_remove_all_attr(sdp->media[0], "sendonly");
+    pjmedia_sdp_media_remove_all_attr(sdp->media[0], "recvonly");
+    pjmedia_sdp_media_remove_all_attr(sdp->media[0], "inactive");
+
+    /* Add inactive attribute */
+    attr = pjmedia_sdp_attr_create(pjsua_var.pool, "inactive", NULL);
+    pjmedia_sdp_media_add_attr(sdp->media[0], attr);
+
+    *p_answer = sdp;
+
+    return status;
+}
+
+
+/*
+ * Called when session received new offer.
+ */
+static void pjsua_call_on_rx_offer(pjsip_inv_session *inv,
+				   const pjmedia_sdp_session *offer)
+{
+    const char *remote_state;
+    pjsua_call *call;
+    pjmedia_sdp_conn *conn;
+    pjmedia_sdp_session *answer;
+    pj_bool_t is_remote_active;
+    pj_status_t status;
+
+    PJSUA_LOCK();
+
+    call = inv->dlg->mod_data[pjsua_var.mod.id];
+
+    /*
+     * See if remote is offering active media (i.e. not on-hold)
+     */
+    is_remote_active = PJ_TRUE;
+
+    conn = offer->media[0]->conn;
+    if (!conn)
+	conn = offer->conn;
+
+    if (pj_strcmp2(&conn->addr, "0.0.0.0")==0 ||
+	pj_strcmp2(&conn->addr, "0")==0)
+    {
+	is_remote_active = PJ_FALSE;
+
+    } 
+    else if (pjmedia_sdp_media_find_attr2(offer->media[0], "inactive", NULL))
+    {
+	is_remote_active = PJ_FALSE;
+    }
+
+    remote_state = (is_remote_active ? "active" : "inactive");
+
+    /* Supply candidate answer */
+    if (call->media_st == PJSUA_CALL_MEDIA_LOCAL_HOLD || !is_remote_active) {
+	PJ_LOG(4,(THIS_FILE, 
+		  "Call %d: RX new media offer, creating inactive SDP "
+		  "(media in offer is %s)", call->index, remote_state));
+	status = create_inactive_sdp( call, &answer );
+    } else {
+
+	PJ_LOG(4,(THIS_FILE, "Call %d: received updated media offer",
+		  call->index));
+
+	/* Init media channel */
+	status = pjsua_media_channel_init(call->index, PJSIP_ROLE_UAC);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Error initializing media channel", status);
+	    PJSUA_UNLOCK();
+	    return;
+	}
+
+	status = pjsua_media_channel_create_sdp(call->index, call->inv->pool, &answer);
+    }
+
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create local SDP", status);
+	PJSUA_UNLOCK();
+	return;
+    }
+
+    status = pjsip_inv_set_sdp_answer(call->inv, answer);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to set answer", status);
+	PJSUA_UNLOCK();
+	return;
+    }
+
+    PJSUA_UNLOCK();
+}
+
+
+/*
+ * Callback called by event framework when the xfer subscription state
+ * has changed.
+ */
+static void xfer_client_on_evsub_state( pjsip_evsub *sub, pjsip_event *event)
+{
+    
+    PJ_UNUSED_ARG(event);
+
+    /*
+     * When subscription is accepted (got 200/OK to REFER), check if 
+     * subscription suppressed.
+     */
+    if (pjsip_evsub_get_state(sub) == PJSIP_EVSUB_STATE_ACCEPTED) {
+
+	pjsip_rx_data *rdata;
+	pjsip_generic_string_hdr *refer_sub;
+	const pj_str_t REFER_SUB = { "Refer-Sub", 9 };
+	pjsua_call *call;
+
+	call = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id);
+
+	/* Must be receipt of response message */
+	pj_assert(event->type == PJSIP_EVENT_TSX_STATE && 
+		  event->body.tsx_state.type == PJSIP_EVENT_RX_MSG);
+	rdata = event->body.tsx_state.src.rdata;
+
+	/* Find Refer-Sub header */
+	refer_sub = (pjsip_generic_string_hdr*)
+		    pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, 
+					       &REFER_SUB, NULL);
+
+	/* Check if subscription is suppressed */
+	if (refer_sub && pj_stricmp2(&refer_sub->hvalue, "false")==0) {
+	    /* Since no subscription is desired, assume that call has been
+	     * transfered successfully.
+	     */
+	    if (call && pjsua_var.ua_cfg.cb.on_call_transfer_status) {
+		const pj_str_t ACCEPTED = { "Accepted", 8 };
+		pj_bool_t cont = PJ_FALSE;
+		(*pjsua_var.ua_cfg.cb.on_call_transfer_status)(call->index, 
+							       200,
+							       &ACCEPTED,
+							       PJ_TRUE,
+							       &cont);
+	    }
+
+	    /* Yes, subscription is suppressed.
+	     * Terminate our subscription now.
+	     */
+	    PJ_LOG(4,(THIS_FILE, "Xfer subscription suppressed, terminating "
+				 "event subcription..."));
+	    pjsip_evsub_terminate(sub, PJ_TRUE);
+
+	} else {
+	    /* Notify application about call transfer progress. 
+	     * Initially notify with 100/Accepted status.
+	     */
+	    if (call && pjsua_var.ua_cfg.cb.on_call_transfer_status) {
+		const pj_str_t ACCEPTED = { "Accepted", 8 };
+		pj_bool_t cont = PJ_FALSE;
+		(*pjsua_var.ua_cfg.cb.on_call_transfer_status)(call->index, 
+							       100,
+							       &ACCEPTED,
+							       PJ_FALSE,
+							       &cont);
+	    }
+	}
+    }
+    /*
+     * On incoming NOTIFY, notify application about call transfer progress.
+     */
+    else if (pjsip_evsub_get_state(sub) == PJSIP_EVSUB_STATE_ACTIVE ||
+	     pjsip_evsub_get_state(sub) == PJSIP_EVSUB_STATE_TERMINATED) 
+    {
+	pjsua_call *call;
+	pjsip_msg *msg;
+	pjsip_msg_body *body;
+	pjsip_status_line status_line;
+	pj_bool_t is_last;
+	pj_bool_t cont;
+	pj_status_t status;
+
+	call = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id);
+
+	/* When subscription is terminated, clear the xfer_sub member of 
+	 * the inv_data.
+	 */
+	if (pjsip_evsub_get_state(sub) == PJSIP_EVSUB_STATE_TERMINATED) {
+	    pjsip_evsub_set_mod_data(sub, pjsua_var.mod.id, NULL);
+	    PJ_LOG(4,(THIS_FILE, "Xfer client subscription terminated"));
+
+	}
+
+	if (!call || !event || !pjsua_var.ua_cfg.cb.on_call_transfer_status) {
+	    /* Application is not interested with call progress status */
+	    return;
+	}
+
+	/* This better be a NOTIFY request */
+	if (event->type == PJSIP_EVENT_TSX_STATE &&
+	    event->body.tsx_state.type == PJSIP_EVENT_RX_MSG)
+	{
+	    pjsip_rx_data *rdata;
+
+	    rdata = event->body.tsx_state.src.rdata;
+
+	    /* Check if there's body */
+	    msg = rdata->msg_info.msg;
+	    body = msg->body;
+	    if (!body) {
+		PJ_LOG(4,(THIS_FILE, 
+			  "Warning: received NOTIFY without message body"));
+		return;
+	    }
+
+	    /* Check for appropriate content */
+	    if (pj_stricmp2(&body->content_type.type, "message") != 0 ||
+		pj_stricmp2(&body->content_type.subtype, "sipfrag") != 0)
+	    {
+		PJ_LOG(4,(THIS_FILE, 
+			  "Warning: received NOTIFY with non message/sipfrag "
+			  "content"));
+		return;
+	    }
+
+	    /* Try to parse the content */
+	    status = pjsip_parse_status_line(body->data, body->len, 
+					     &status_line);
+	    if (status != PJ_SUCCESS) {
+		PJ_LOG(4,(THIS_FILE, 
+			  "Warning: received NOTIFY with invalid "
+			  "message/sipfrag content"));
+		return;
+	    }
+
+	} else {
+	    status_line.code = 500;
+	    status_line.reason = *pjsip_get_status_text(500);
+	}
+
+	/* Notify application */
+	is_last = (pjsip_evsub_get_state(sub)==PJSIP_EVSUB_STATE_TERMINATED);
+	cont = !is_last;
+	(*pjsua_var.ua_cfg.cb.on_call_transfer_status)(call->index, 
+						       status_line.code,
+						       &status_line.reason,
+						       is_last, &cont);
+
+	if (!cont) {
+	    pjsip_evsub_set_mod_data(sub, pjsua_var.mod.id, NULL);
+	}
+    }
+}
+
+
+/*
+ * Callback called by event framework when the xfer subscription state
+ * has changed.
+ */
+static void xfer_server_on_evsub_state( pjsip_evsub *sub, pjsip_event *event)
+{
+    
+    PJ_UNUSED_ARG(event);
+
+    /*
+     * When subscription is terminated, clear the xfer_sub member of 
+     * the inv_data.
+     */
+    if (pjsip_evsub_get_state(sub) == PJSIP_EVSUB_STATE_TERMINATED) {
+	pjsua_call *call;
+
+	call = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id);
+	if (!call)
+	    return;
+
+	pjsip_evsub_set_mod_data(sub, pjsua_var.mod.id, NULL);
+	call->xfer_sub = NULL;
+
+	PJ_LOG(4,(THIS_FILE, "Xfer server subscription terminated"));
+    }
+}
+
+
+/*
+ * Follow transfer (REFER) request.
+ */
+static void on_call_transfered( pjsip_inv_session *inv,
+			        pjsip_rx_data *rdata )
+{
+    pj_status_t status;
+    pjsip_tx_data *tdata;
+    pjsua_call *existing_call;
+    int new_call;
+    const pj_str_t str_refer_to = { "Refer-To", 8};
+    const pj_str_t str_refer_sub = { "Refer-Sub", 9 };
+    const pj_str_t str_ref_by = { "Referred-By", 11 };
+    pjsip_generic_string_hdr *refer_to;
+    pjsip_generic_string_hdr *refer_sub;
+    pjsip_hdr *ref_by_hdr;
+    pj_bool_t no_refer_sub = PJ_FALSE;
+    char *uri;
+    pjsua_msg_data msg_data;
+    pj_str_t tmp;
+    pjsip_status_code code;
+    pjsip_evsub *sub;
+
+    existing_call = inv->dlg->mod_data[pjsua_var.mod.id];
+
+    /* Find the Refer-To header */
+    refer_to = (pjsip_generic_string_hdr*)
+	pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &str_refer_to, NULL);
+
+    if (refer_to == NULL) {
+	/* Invalid Request.
+	 * No Refer-To header!
+	 */
+	PJ_LOG(4,(THIS_FILE, "Received REFER without Refer-To header!"));
+	pjsip_dlg_respond( inv->dlg, rdata, 400, NULL, NULL, NULL);
+	return;
+    }
+
+    /* Find optional Refer-Sub header */
+    refer_sub = (pjsip_generic_string_hdr*)
+	pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &str_refer_sub, NULL);
+
+    if (refer_sub) {
+	if (!pj_strnicmp2(&refer_sub->hvalue, "true", 4)==0)
+	    no_refer_sub = PJ_TRUE;
+    }
+
+    /* Find optional Referred-By header (to be copied onto outgoing INVITE
+     * request.
+     */
+    ref_by_hdr = pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &str_ref_by, 
+					    NULL);
+
+    /* Notify callback */
+    code = PJSIP_SC_OK;
+    if (pjsua_var.ua_cfg.cb.on_call_transfer_request)
+	(*pjsua_var.ua_cfg.cb.on_call_transfer_request)(existing_call->index,
+							&refer_to->hvalue, 
+							&code);
+
+    if (code < 200)
+	code = 200;
+    if (code >= 300) {
+	/* Application rejects call transfer request */
+	pjsip_dlg_respond( inv->dlg, rdata, code, NULL, NULL, NULL);
+	return;
+    }
+
+    PJ_LOG(3,(THIS_FILE, "Call to %.*s is being transfered to %.*s",
+	      (int)inv->dlg->remote.info_str.slen,
+	      inv->dlg->remote.info_str.ptr,
+	      (int)refer_to->hvalue.slen, 
+	      refer_to->hvalue.ptr));
+
+    if (no_refer_sub) {
+	/*
+	 * Always answer with 200.
+	 */
+	pjsip_tx_data *tdata;
+	const pj_str_t str_false = { "false", 5};
+	pjsip_hdr *hdr;
+
+	status = pjsip_dlg_create_response(inv->dlg, rdata, 200, NULL, &tdata);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Unable to create 200 response to REFER",
+			 status);
+	    return;
+	}
+
+	/* Add Refer-Sub header */
+	hdr = (pjsip_hdr*) 
+	       pjsip_generic_string_hdr_create(tdata->pool, &str_refer_sub,
+					      &str_false);
+	pjsip_msg_add_hdr(tdata->msg, hdr);
+
+
+	/* Send answer */
+	status = pjsip_dlg_send_response(inv->dlg, pjsip_rdata_get_tsx(rdata),
+					 tdata);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Unable to create 200 response to REFER",
+			 status);
+	    return;
+	}
+
+	/* Don't have subscription */
+	sub = NULL;
+
+    } else {
+	struct pjsip_evsub_user xfer_cb;
+	pjsip_hdr hdr_list;
+
+	/* Init callback */
+	pj_bzero(&xfer_cb, sizeof(xfer_cb));
+	xfer_cb.on_evsub_state = &xfer_server_on_evsub_state;
+
+	/* Init additional header list to be sent with REFER response */
+	pj_list_init(&hdr_list);
+
+	/* Create transferee event subscription */
+	status = pjsip_xfer_create_uas( inv->dlg, &xfer_cb, rdata, &sub);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Unable to create xfer uas", status);
+	    pjsip_dlg_respond( inv->dlg, rdata, 500, NULL, NULL, NULL);
+	    return;
+	}
+
+	/* If there's Refer-Sub header and the value is "true", send back
+	 * Refer-Sub in the response with value "true" too.
+	 */
+	if (refer_sub) {
+	    const pj_str_t str_true = { "true", 4 };
+	    pjsip_hdr *hdr;
+
+	    hdr = (pjsip_hdr*) 
+		   pjsip_generic_string_hdr_create(inv->dlg->pool, 
+						   &str_refer_sub,
+						   &str_true);
+	    pj_list_push_back(&hdr_list, hdr);
+
+	}
+
+	/* Accept the REFER request, send 200 (OK). */
+	pjsip_xfer_accept(sub, rdata, code, &hdr_list);
+
+	/* Create initial NOTIFY request */
+	status = pjsip_xfer_notify( sub, PJSIP_EVSUB_STATE_ACTIVE,
+				    100, NULL, &tdata);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Unable to create NOTIFY to REFER", 
+			 status);
+	    return;
+	}
+
+	/* Send initial NOTIFY request */
+	status = pjsip_xfer_send_request( sub, tdata);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Unable to send NOTIFY to REFER", status);
+	    return;
+	}
+    }
+
+    /* We're cheating here.
+     * We need to get a null terminated string from a pj_str_t.
+     * So grab the pointer from the hvalue and NULL terminate it, knowing
+     * that the NULL position will be occupied by a newline. 
+     */
+    uri = refer_to->hvalue.ptr;
+    uri[refer_to->hvalue.slen] = '\0';
+
+    /* Init msg_data */
+    pjsua_msg_data_init(&msg_data);
+
+    /* If Referred-By header is present in the REFER request, copy this
+     * to the outgoing INVITE request.
+     */
+    if (ref_by_hdr != NULL) {
+	pjsip_hdr *dup = pjsip_hdr_clone(rdata->tp_info.pool, ref_by_hdr);
+	pj_list_push_back(&msg_data.hdr_list, dup);
+    }
+
+    /* Now make the outgoing call. */
+    tmp = pj_str(uri);
+    status = pjsua_call_make_call(existing_call->acc_id, &tmp, 0,
+				  existing_call->user_data, &msg_data, 
+				  &new_call);
+    if (status != PJ_SUCCESS) {
+
+	/* Notify xferer about the error (if we have subscription) */
+	if (sub) {
+	    status = pjsip_xfer_notify(sub, PJSIP_EVSUB_STATE_TERMINATED,
+				       500, NULL, &tdata);
+	    if (status != PJ_SUCCESS) {
+		pjsua_perror(THIS_FILE, "Unable to create NOTIFY to REFER", 
+			      status);
+		return;
+	    }
+	    status = pjsip_xfer_send_request(sub, tdata);
+	    if (status != PJ_SUCCESS) {
+		pjsua_perror(THIS_FILE, "Unable to send NOTIFY to REFER", 
+			      status);
+		return;
+	    }
+	}
+	return;
+    }
+
+    if (sub) {
+	/* Put the server subscription in inv_data.
+	 * Subsequent state changed in pjsua_inv_on_state_changed() will be
+	 * reported back to the server subscription.
+	 */
+	pjsua_var.calls[new_call].xfer_sub = sub;
+
+	/* Put the invite_data in the subscription. */
+	pjsip_evsub_set_mod_data(sub, pjsua_var.mod.id, 
+				 &pjsua_var.calls[new_call]);
+    }
+}
+
+
+
+/*
+ * This callback is called when transaction state has changed in INVITE
+ * session. We use this to trap:
+ *  - incoming REFER request.
+ *  - incoming MESSAGE request.
+ */
+static void pjsua_call_on_tsx_state_changed(pjsip_inv_session *inv,
+					    pjsip_transaction *tsx,
+					    pjsip_event *e)
+{
+    pjsua_call *call = inv->dlg->mod_data[pjsua_var.mod.id];
+
+    PJSUA_LOCK();
+
+    if (tsx->role==PJSIP_ROLE_UAS &&
+	tsx->state==PJSIP_TSX_STATE_TRYING &&
+	pjsip_method_cmp(&tsx->method, &pjsip_refer_method)==0)
+    {
+	/*
+	 * Incoming REFER request.
+	 */
+	on_call_transfered(call->inv, e->body.tsx_state.src.rdata);
+
+    }
+    else if (tsx->role==PJSIP_ROLE_UAS &&
+	     tsx->state==PJSIP_TSX_STATE_TRYING &&
+	     pjsip_method_cmp(&tsx->method, &pjsip_message_method)==0)
+    {
+	/*
+	 * Incoming MESSAGE request!
+	 */
+	pjsip_rx_data *rdata;
+	pjsip_msg *msg;
+	pjsip_accept_hdr *accept_hdr;
+	pj_status_t status;
+
+	rdata = e->body.tsx_state.src.rdata;
+	msg = rdata->msg_info.msg;
+
+	/* Request MUST have message body, with Content-Type equal to
+	 * "text/plain".
+	 */
+	if (pjsua_im_accept_pager(rdata, &accept_hdr) == PJ_FALSE) {
+
+	    pjsip_hdr hdr_list;
+
+	    pj_list_init(&hdr_list);
+	    pj_list_push_back(&hdr_list, accept_hdr);
+
+	    pjsip_dlg_respond( inv->dlg, rdata, PJSIP_SC_NOT_ACCEPTABLE_HERE, 
+			       NULL, &hdr_list, NULL );
+	    PJSUA_UNLOCK();
+	    return;
+	}
+
+	/* Respond with 200 first, so that remote doesn't retransmit in case
+	 * the UI takes too long to process the message. 
+	 */
+	status = pjsip_dlg_respond( inv->dlg, rdata, 200, NULL, NULL, NULL);
+
+	/* Process MESSAGE request */
+	pjsua_im_process_pager(call->index, &inv->dlg->remote.info_str,
+			       &inv->dlg->local.info_str, rdata);
+
+    }
+    else if (tsx->role == PJSIP_ROLE_UAC &&
+	     pjsip_method_cmp(&tsx->method, &pjsip_message_method)==0)
+    {
+	/* Handle outgoing pager status */
+	if (tsx->status_code >= 200) {
+	    pjsua_im_data *im_data;
+
+	    im_data = tsx->mod_data[pjsua_var.mod.id];
+	    /* im_data can be NULL if this is typing indication */
+
+	    if (im_data && pjsua_var.ua_cfg.cb.on_pager_status) {
+		pjsua_var.ua_cfg.cb.on_pager_status(im_data->call_id,
+						    &im_data->to,
+						    &im_data->body,
+						    im_data->user_data,
+						    tsx->status_code,
+						    &tsx->status_text);
+	    }
+	}
+    }
+
+
+    PJSUA_UNLOCK();
+}
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_core.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_core.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_core.c	(revision 1163)
@@ -0,0 +1,1768 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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-lib/pjsua.h>
+#include <pjsua-lib/pjsua_internal.h>
+
+
+#define THIS_FILE   "pjsua_core.c"
+
+
+/* PJSUA application instance. */
+struct pjsua_data pjsua_var;
+
+
+/* Display error */
+PJ_DEF(void) pjsua_perror( const char *sender, const char *title, 
+			   pj_status_t status)
+{
+    char errmsg[PJ_ERR_MSG_SIZE];
+
+    pj_strerror(status, errmsg, sizeof(errmsg));
+    PJ_LOG(3,(sender, "%s: %s [status=%d]", title, errmsg, status));
+}
+
+
+static void init_data()
+{
+    unsigned i;
+
+    pj_bzero(&pjsua_var, sizeof(pjsua_var));
+
+    for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.acc); ++i)
+	pjsua_var.acc[i].index = i;
+    
+    for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.tpdata); ++i)
+	pjsua_var.tpdata[i].index = i;
+
+    pjsua_var.stun_status = PJ_EUNKNOWN;
+}
+
+
+
+/*****************************************************************************
+ * This is a very simple PJSIP module, whose sole purpose is to display
+ * incoming and outgoing messages to log. This module will have priority
+ * higher than transport layer, which means:
+ *
+ *  - incoming messages will come to this module first before reaching
+ *    transaction layer.
+ *
+ *  - outgoing messages will come to this module last, after the message
+ *    has been 'printed' to contiguous buffer by transport layer and
+ *    appropriate transport instance has been decided for this message.
+ *
+ */
+
+/* Notification on incoming messages */
+static pj_bool_t logging_on_rx_msg(pjsip_rx_data *rdata)
+{
+    PJ_LOG(4,(THIS_FILE, "RX %d bytes %s from %s %s:%d:\n"
+			 "%.*s\n"
+			 "--end msg--",
+			 rdata->msg_info.len,
+			 pjsip_rx_data_get_info(rdata),
+			 rdata->tp_info.transport->type_name,
+			 rdata->pkt_info.src_name,
+			 rdata->pkt_info.src_port,
+			 (int)rdata->msg_info.len,
+			 rdata->msg_info.msg_buf));
+    
+    /* Always return false, otherwise messages will not get processed! */
+    return PJ_FALSE;
+}
+
+/* Notification on outgoing messages */
+static pj_status_t logging_on_tx_msg(pjsip_tx_data *tdata)
+{
+    
+    /* Important note:
+     *	tp_info field is only valid after outgoing messages has passed
+     *	transport layer. So don't try to access tp_info when the module
+     *	has lower priority than transport layer.
+     */
+
+    PJ_LOG(4,(THIS_FILE, "TX %d bytes %s to %s %s:%d:\n"
+			 "%.*s\n"
+			 "--end msg--",
+			 (tdata->buf.cur - tdata->buf.start),
+			 pjsip_tx_data_get_info(tdata),
+			 tdata->tp_info.transport->type_name,
+			 tdata->tp_info.dst_name,
+			 tdata->tp_info.dst_port,
+			 (int)(tdata->buf.cur - tdata->buf.start),
+			 tdata->buf.start));
+
+    /* Always return success, otherwise message will not get sent! */
+    return PJ_SUCCESS;
+}
+
+/* The module instance. */
+static pjsip_module pjsua_msg_logger = 
+{
+    NULL, NULL,				/* prev, next.		*/
+    { "mod-pjsua-log", 13 },		/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_TRANSPORT_LAYER-1,/* Priority	        */
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    &logging_on_rx_msg,			/* on_rx_request()	*/
+    &logging_on_rx_msg,			/* on_rx_response()	*/
+    &logging_on_tx_msg,			/* on_tx_request.	*/
+    &logging_on_tx_msg,			/* on_tx_response()	*/
+    NULL,				/* on_tsx_state()	*/
+
+};
+
+
+/*****************************************************************************
+ * Another simple module to handle incoming OPTIONS request
+ */
+
+/* Notification on incoming request */
+static pj_bool_t options_on_rx_request(pjsip_rx_data *rdata)
+{
+    pjsip_tx_data *tdata;
+    pjsip_response_addr res_addr;
+    pjmedia_sock_info skinfo;
+    pjmedia_sdp_session *sdp;
+    const pjsip_hdr *cap_hdr;
+    pj_status_t status;
+
+    /* Only want to handle OPTIONS requests */
+    if (pjsip_method_cmp(&rdata->msg_info.msg->line.req.method,
+			 &pjsip_options_method) != 0)
+    {
+	return PJ_FALSE;
+    }
+
+    /* Create basic response. */
+    status = pjsip_endpt_create_response(pjsua_var.endpt, rdata, 200, NULL, 
+					 &tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create OPTIONS response", status);
+	return PJ_TRUE;
+    }
+
+    /* Add Allow header */
+    cap_hdr = pjsip_endpt_get_capability(pjsua_var.endpt, PJSIP_H_ALLOW, NULL);
+    if (cap_hdr) {
+	pjsip_msg_add_hdr(tdata->msg, pjsip_hdr_clone(tdata->pool, cap_hdr));
+    }
+
+    /* Add Accept header */
+    cap_hdr = pjsip_endpt_get_capability(pjsua_var.endpt, PJSIP_H_ACCEPT, NULL);
+    if (cap_hdr) {
+	pjsip_msg_add_hdr(tdata->msg, pjsip_hdr_clone(tdata->pool, cap_hdr));
+    }
+
+    /* Add Supported header */
+    cap_hdr = pjsip_endpt_get_capability(pjsua_var.endpt, PJSIP_H_SUPPORTED, NULL);
+    if (cap_hdr) {
+	pjsip_msg_add_hdr(tdata->msg, pjsip_hdr_clone(tdata->pool, cap_hdr));
+    }
+
+    /* Add Allow-Events header from the evsub module */
+    cap_hdr = pjsip_evsub_get_allow_events_hdr(NULL);
+    if (cap_hdr) {
+	pjsip_msg_add_hdr(tdata->msg, pjsip_hdr_clone(tdata->pool, cap_hdr));
+    }
+
+    /* Add User-Agent header */
+    if (pjsua_var.ua_cfg.user_agent.slen) {
+	const pj_str_t USER_AGENT = { "User-Agent", 10};
+	pjsip_hdr *h;
+
+	h = (pjsip_hdr*) pjsip_generic_string_hdr_create(tdata->pool,
+							 &USER_AGENT,
+							 &pjsua_var.ua_cfg.user_agent);
+	pjsip_msg_add_hdr(tdata->msg, h);
+    }
+
+    /* Get media socket info */
+    pjmedia_transport_get_info(pjsua_var.calls[0].med_tp, &skinfo);
+
+    /* Add SDP body, using call0's RTP address */
+    status = pjmedia_endpt_create_sdp(pjsua_var.med_endpt, tdata->pool, 1,
+				      &skinfo, &sdp);
+    if (status == PJ_SUCCESS) {
+	pjsip_create_sdp_body(tdata->pool, sdp, &tdata->msg->body);
+    }
+
+    /* Send response statelessly */
+    pjsip_get_response_addr(tdata->pool, rdata, &res_addr);
+    status = pjsip_endpt_send_response(pjsua_var.endpt, &res_addr, tdata, NULL, NULL);
+    if (status != PJ_SUCCESS)
+	pjsip_tx_data_dec_ref(tdata);
+
+    return PJ_TRUE;
+}
+
+
+/* The module instance. */
+static pjsip_module pjsua_options_handler = 
+{
+    NULL, NULL,				/* prev, next.		*/
+    { "mod-pjsua-options", 17 },	/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION,	/* Priority	        */
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    &options_on_rx_request,		/* on_rx_request()	*/
+    NULL,				/* on_rx_response()	*/
+    NULL,				/* on_tx_request.	*/
+    NULL,				/* on_tx_response()	*/
+    NULL,				/* on_tsx_state()	*/
+
+};
+
+
+/*****************************************************************************
+ * These two functions are the main callbacks registered to PJSIP stack
+ * to receive SIP request and response messages that are outside any
+ * dialogs and any transactions.
+ */
+
+/*
+ * Handler for receiving incoming requests.
+ *
+ * This handler serves multiple purposes:
+ *  - it receives requests outside dialogs.
+ *  - it receives requests inside dialogs, when the requests are
+ *    unhandled by other dialog usages. Example of these
+ *    requests are: MESSAGE.
+ */
+static pj_bool_t mod_pjsua_on_rx_request(pjsip_rx_data *rdata)
+{
+    pj_bool_t processed = PJ_FALSE;
+
+    PJSUA_LOCK();
+
+    if (rdata->msg_info.msg->line.req.method.id == PJSIP_INVITE_METHOD) {
+
+	processed = pjsua_call_on_incoming(rdata);
+    }
+
+    PJSUA_UNLOCK();
+
+    return processed;
+}
+
+
+/*
+ * Handler for receiving incoming responses.
+ *
+ * This handler serves multiple purposes:
+ *  - it receives strayed responses (i.e. outside any dialog and
+ *    outside any transactions).
+ *  - it receives responses coming to a transaction, when pjsua
+ *    module is set as transaction user for the transaction.
+ *  - it receives responses inside a dialog, when these responses
+ *    are unhandled by other dialog usages.
+ */
+static pj_bool_t mod_pjsua_on_rx_response(pjsip_rx_data *rdata)
+{
+    PJ_UNUSED_ARG(rdata);
+    return PJ_FALSE;
+}
+
+
+/*****************************************************************************
+ * Logging.
+ */
+
+/* Log callback */
+static void log_writer(int level, const char *buffer, int len)
+{
+    /* Write to file, stdout or application callback. */
+
+    if (pjsua_var.log_file) {
+	pj_ssize_t size = len;
+	pj_file_write(pjsua_var.log_file, buffer, &size);
+	/* This will slow things down considerably! Don't do it!
+	 pj_file_flush(pjsua_var.log_file);
+	*/
+    }
+
+    if (level <= (int)pjsua_var.log_cfg.console_level) {
+	if (pjsua_var.log_cfg.cb)
+	    (*pjsua_var.log_cfg.cb)(level, buffer, len);
+	else
+	    pj_log_write(level, buffer, len);
+    }
+}
+
+
+/*
+ * Application can call this function at any time (after pjsua_create(), of
+ * course) to change logging settings.
+ */
+PJ_DEF(pj_status_t) pjsua_reconfigure_logging(const pjsua_logging_config *cfg)
+{
+    pj_status_t status;
+
+    /* Save config. */
+    pjsua_logging_config_dup(pjsua_var.pool, &pjsua_var.log_cfg, cfg);
+
+    /* Redirect log function to ours */
+    pj_log_set_log_func( &log_writer );
+
+    /* Close existing file, if any */
+    if (pjsua_var.log_file) {
+	pj_file_close(pjsua_var.log_file);
+	pjsua_var.log_file = NULL;
+    }
+
+    /* If output log file is desired, create the file: */
+    if (pjsua_var.log_cfg.log_filename.slen) {
+
+	status = pj_file_open(pjsua_var.pool, 
+			      pjsua_var.log_cfg.log_filename.ptr,
+			      PJ_O_WRONLY, 
+			      &pjsua_var.log_file);
+
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Error creating log file", status);
+	    return status;
+	}
+    }
+
+    /* Unregister msg logging if it's previously registered */
+    if (pjsua_msg_logger.id >= 0) {
+	pjsip_endpt_unregister_module(pjsua_var.endpt, &pjsua_msg_logger);
+	pjsua_msg_logger.id = -1;
+    }
+
+    /* Enable SIP message logging */
+    if (pjsua_var.log_cfg.msg_logging)
+	pjsip_endpt_register_module(pjsua_var.endpt, &pjsua_msg_logger);
+
+    return PJ_SUCCESS;
+}
+
+
+/*****************************************************************************
+ * PJSUA Base API.
+ */
+
+/* Worker thread function. */
+static int worker_thread(void *arg)
+{
+    enum { TIMEOUT = 10 };
+
+    PJ_UNUSED_ARG(arg);
+
+    while (!pjsua_var.thread_quit_flag) {
+	int count;
+
+	count = pjsua_handle_events(TIMEOUT);
+	if (count < 0)
+	    pj_thread_sleep(TIMEOUT);
+    }
+
+    return 0;
+}
+
+
+/*
+ * Instantiate pjsua application.
+ */
+PJ_DEF(pj_status_t) pjsua_create(void)
+{
+    pj_status_t status;
+
+    /* Init pjsua data */
+    init_data();
+
+    /* Set default logging settings */
+    pjsua_logging_config_default(&pjsua_var.log_cfg);
+
+    /* Init PJLIB: */
+    status = pj_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Init PJLIB-UTIL: */
+    status = pjlib_util_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Init PJNATH */
+    status = pjnath_init();
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Set default sound device ID */
+    pjsua_var.cap_dev = pjsua_var.play_dev = -1;
+
+    /* Init caching pool. */
+    pj_caching_pool_init(&pjsua_var.cp, &pj_pool_factory_default_policy, 0);
+
+    /* Create memory pool for application. */
+    pjsua_var.pool = pjsua_pool_create("pjsua", 4000, 4000);
+    
+    PJ_ASSERT_RETURN(pjsua_var.pool, PJ_ENOMEM);
+
+    /* Create mutex */
+    status = pj_mutex_create_recursive(pjsua_var.pool, "pjsua", 
+				       &pjsua_var.mutex);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create mutex", status);
+	return status;
+    }
+
+    /* Must create SIP endpoint to initialize SIP parser. The parser
+     * is needed for example when application needs to call pjsua_verify_url().
+     */
+    status = pjsip_endpt_create(&pjsua_var.cp.factory, 
+				pj_gethostname()->ptr, 
+				&pjsua_var.endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Initialize pjsua with the specified settings. All the settings are 
+ * optional, and the default values will be used when the config is not
+ * specified.
+ */
+PJ_DEF(pj_status_t) pjsua_init( const pjsua_config *ua_cfg,
+				const pjsua_logging_config *log_cfg,
+				const pjsua_media_config *media_cfg)
+{
+    pjsua_config	 default_cfg;
+    pjsua_media_config	 default_media_cfg;
+    const pj_str_t	 STR_OPTIONS = { "OPTIONS", 7 };
+    pj_status_t status;
+
+
+    /* Create default configurations when the config is not supplied */
+
+    if (ua_cfg == NULL) {
+	pjsua_config_default(&default_cfg);
+	ua_cfg = &default_cfg;
+    }
+
+    if (media_cfg == NULL) {
+	pjsua_media_config_default(&default_media_cfg);
+	media_cfg = &default_media_cfg;
+    }
+
+    /* Initialize logging first so that info/errors can be captured */
+    if (log_cfg) {
+	status = pjsua_reconfigure_logging(log_cfg);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    }
+
+    /* If nameserver is configured, create DNS resolver instance and
+     * set it to be used by SIP resolver.
+     */
+    if (ua_cfg->nameserver_count) {
+#if PJSIP_HAS_RESOLVER
+	unsigned i;
+
+	/* Create DNS resolver */
+	status = pjsip_endpt_create_resolver(pjsua_var.endpt, 
+					     &pjsua_var.resolver);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+	/* Configure nameserver for the DNS resolver */
+	status = pj_dns_resolver_set_ns(pjsua_var.resolver, 
+					ua_cfg->nameserver_count,
+					ua_cfg->nameserver, NULL);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Error setting nameserver", status);
+	    return status;
+	}
+
+	/* Set this DNS resolver to be used by the SIP resolver */
+	status = pjsip_endpt_set_resolver(pjsua_var.endpt, pjsua_var.resolver);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Error setting DNS resolver", status);
+	    return status;
+	}
+
+	/* Print nameservers */
+	for (i=0; i<ua_cfg->nameserver_count; ++i) {
+	    PJ_LOG(4,(THIS_FILE, "Nameserver %.*s added",
+		      (int)ua_cfg->nameserver[i].slen,
+		      ua_cfg->nameserver[i].ptr));
+	}
+#else
+	PJ_LOG(2,(THIS_FILE, 
+		  "DNS resolver is disabled (PJSIP_HAS_RESOLVER==0)"));
+#endif
+    }
+
+    /* Init SIP UA: */
+
+    /* Initialize transaction layer: */
+    status = pjsip_tsx_layer_init_module(pjsua_var.endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Initialize UA layer module: */
+    status = pjsip_ua_init_module( pjsua_var.endpt, NULL );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Initialize Replaces support. */
+    status = pjsip_replaces_init_module( pjsua_var.endpt );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Initialize and register PJSUA application module. */
+    {
+	const pjsip_module mod_initializer = 
+	{
+	NULL, NULL,		    /* prev, next.			*/
+	{ "mod-pjsua", 9 },	    /* Name.				*/
+	-1,			    /* Id				*/
+	PJSIP_MOD_PRIORITY_APPLICATION,	/* Priority			*/
+	NULL,			    /* load()				*/
+	NULL,			    /* start()				*/
+	NULL,			    /* stop()				*/
+	NULL,			    /* unload()				*/
+	&mod_pjsua_on_rx_request,   /* on_rx_request()			*/
+	&mod_pjsua_on_rx_response,  /* on_rx_response()			*/
+	NULL,			    /* on_tx_request.			*/
+	NULL,			    /* on_tx_response()			*/
+	NULL,			    /* on_tsx_state()			*/
+	};
+
+	pjsua_var.mod = mod_initializer;
+
+	status = pjsip_endpt_register_module(pjsua_var.endpt, &pjsua_var.mod);
+	PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+    }
+
+    
+
+    /* Initialize PJSUA call subsystem: */
+    status = pjsua_call_subsys_init(ua_cfg);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+
+    /* Start resolving STUN server */
+    status = pjsua_resolve_stun_server(PJ_FALSE);
+    if (status != PJ_SUCCESS && status != PJ_EPENDING) {
+	pjsua_perror(THIS_FILE, "Error resolving STUN server", status);
+	return status;
+    }
+
+    /* Initialize PJSUA media subsystem */
+    status = pjsua_media_subsys_init(media_cfg);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+
+    /* Init core SIMPLE module : */
+    status = pjsip_evsub_init_module(pjsua_var.endpt);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+
+    /* Init presence module: */
+    status = pjsip_pres_init_module( pjsua_var.endpt, pjsip_evsub_instance());
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Init PUBLISH module */
+    pjsip_publishc_init_module(pjsua_var.endpt);
+
+    /* Init xfer/REFER module */
+    status = pjsip_xfer_init_module( pjsua_var.endpt );
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    /* Init pjsua presence handler: */
+    status = pjsua_pres_init();
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Init out-of-dialog MESSAGE request handler. */
+    status = pjsua_im_init();
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    /* Register OPTIONS handler */
+    pjsip_endpt_register_module(pjsua_var.endpt, &pjsua_options_handler);
+
+    /* Add OPTIONS in Allow header */
+    pjsip_endpt_add_capability(pjsua_var.endpt, NULL, PJSIP_H_ALLOW,
+			       NULL, 1, &STR_OPTIONS);
+
+    /* Start worker thread if needed. */
+    if (pjsua_var.ua_cfg.thread_cnt) {
+	unsigned i;
+
+	if (pjsua_var.ua_cfg.thread_cnt > PJ_ARRAY_SIZE(pjsua_var.thread))
+	    pjsua_var.ua_cfg.thread_cnt = PJ_ARRAY_SIZE(pjsua_var.thread);
+
+	for (i=0; i<pjsua_var.ua_cfg.thread_cnt; ++i) {
+	    status = pj_thread_create(pjsua_var.pool, "pjsua", &worker_thread,
+				      NULL, 0, 0, &pjsua_var.thread[i]);
+	    if (status != PJ_SUCCESS)
+		goto on_error;
+	}
+	PJ_LOG(4,(THIS_FILE, "%d SIP worker threads created", 
+		  pjsua_var.ua_cfg.thread_cnt));
+    } else {
+	PJ_LOG(4,(THIS_FILE, "No SIP worker threads created"));
+    }
+
+    /* Done! */
+
+    PJ_LOG(3,(THIS_FILE, "pjsua version %s for %s initialized", 
+			 PJ_VERSION, PJ_OS_NAME));
+
+    return PJ_SUCCESS;
+
+on_error:
+    pjsua_destroy();
+    return status;
+}
+
+
+/* Sleep with polling */
+static void busy_sleep(unsigned msec)
+{
+    pj_time_val timeout, now;
+
+    pj_gettimeofday(&timeout);
+    timeout.msec += msec;
+    pj_time_val_normalize(&timeout);
+
+    do {
+	while (pjsua_handle_events(10) > 0)
+	    ;
+	pj_gettimeofday(&now);
+    } while (PJ_TIME_VAL_LT(now, timeout));
+}
+
+
+/*
+ * Callback function to receive notification from the resolver
+ * when the resolution process completes.
+ */
+static void stun_dns_srv_resolver_cb(void *user_data,
+				     pj_status_t status,
+				     const pj_dns_srv_record *rec)
+{
+    unsigned i;
+
+    PJ_UNUSED_ARG(user_data);
+
+    pjsua_var.stun_status = status;
+    
+    if (status != PJ_SUCCESS) {
+	/* DNS SRV resolution failed. If stun_host is specified, resolve
+	 * it with gethostbyname()
+	 */
+	if (pjsua_var.ua_cfg.stun_host.slen) {
+	    pj_hostent he;
+
+	    pjsua_var.stun_status = pj_gethostbyname(&pjsua_var.ua_cfg.stun_host, &he);
+
+	    if (pjsua_var.stun_status == PJ_SUCCESS) {
+		pj_sockaddr_in_init(&pjsua_var.stun_srv.ipv4, NULL, 0);
+		pjsua_var.stun_srv.ipv4.sin_addr = *(pj_in_addr*)he.h_addr;
+		pjsua_var.stun_srv.ipv4.sin_port = pj_htons((pj_uint16_t)3478);
+
+		PJ_LOG(3,(THIS_FILE, 
+			  "STUN server %.*s resolved, address is %s:%d",
+			  (int)pjsua_var.ua_cfg.stun_host.slen,
+			  pjsua_var.ua_cfg.stun_host.ptr,
+			  pj_inet_ntoa(pjsua_var.stun_srv.ipv4.sin_addr),
+			  (int)pj_ntohs(pjsua_var.stun_srv.ipv4.sin_port)));
+	    }
+	} else {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+
+	    pj_strerror(status, errmsg, sizeof(errmsg));
+	    PJ_LOG(1,(THIS_FILE, 
+		     "DNS SRV resolution failed for STUN server %.*s: %s",
+		     (int)pjsua_var.ua_cfg.stun_domain.slen,
+		     pjsua_var.ua_cfg.stun_domain.ptr,
+		     errmsg));
+	}
+	return;
+    }
+
+    pj_memcpy(&pjsua_var.stun_srv, &rec->entry[0].addr, 
+	      rec->entry[0].addr_len);
+
+    PJ_LOG(3,(THIS_FILE, "_stun._udp.%.*s resolved, found %d entry(s):",
+	      (int)pjsua_var.ua_cfg.stun_domain.slen,
+	      pjsua_var.ua_cfg.stun_domain.ptr,
+	      rec->count));
+
+    for (i=0; i<rec->count; ++i) {
+	PJ_LOG(3,(THIS_FILE, 
+		  " %d: prio=%d, weight=%d  %s:%d", 
+		  i, rec->entry[i].priority, rec->entry[i].weight,
+		  pj_inet_ntoa(rec->entry[i].addr.ipv4.sin_addr),
+		  (int)pj_ntohs(rec->entry[i].addr.ipv4.sin_port)));
+    }
+
+}
+
+/*
+ * Resolve STUN server.
+ */
+pj_status_t pjsua_resolve_stun_server(pj_bool_t wait)
+{
+    if (pjsua_var.stun_status == PJ_EUNKNOWN) {
+	/* Initialize STUN configuration */
+	pj_stun_config_init(&pjsua_var.stun_cfg, &pjsua_var.cp.factory, 0,
+			    pjsip_endpt_get_ioqueue(pjsua_var.endpt),
+			    pjsip_endpt_get_timer_heap(pjsua_var.endpt));
+
+	/* Start STUN server resolution */
+	
+	pjsua_var.stun_status = PJ_EPENDING;
+
+	/* If stun_domain is specified, resolve STUN servers with DNS
+	 * SRV resolution.
+	 */
+	if (pjsua_var.ua_cfg.stun_domain.slen) {
+	    pj_str_t res_type;
+	    pj_status_t status;
+
+	    /* Fail if resolver is not configured */
+	    if (pjsua_var.resolver == NULL) {
+		PJ_LOG(1,(THIS_FILE, "Nameserver must be configured when "
+				     "stun_domain is specified"));
+		pjsua_var.stun_status = PJLIB_UTIL_EDNSNONS;
+		return PJLIB_UTIL_EDNSNONS;
+	    }
+	    res_type = pj_str("_stun._udp");
+	    status = 
+		pj_dns_srv_resolve(&pjsua_var.ua_cfg.stun_domain, &res_type,
+				   3478, pjsua_var.pool, pjsua_var.resolver,
+				   0, NULL, &stun_dns_srv_resolver_cb);
+	    if (status != PJ_SUCCESS) {
+		pjsua_perror(THIS_FILE, "Error starting DNS SRV resolution", 
+			     pjsua_var.stun_status);
+		pjsua_var.stun_status = status;
+		return pjsua_var.stun_status;
+	    } else {
+		pjsua_var.stun_status = PJ_EPENDING;
+	    }
+	}
+	/* Otherwise if stun_host is specified, resolve STUN server with
+	 * gethostbyname().
+	 */
+	else if (pjsua_var.ua_cfg.stun_host.slen) {
+	    pj_hostent he;
+
+	    pjsua_var.stun_status = pj_gethostbyname(&pjsua_var.ua_cfg.stun_host, &he);
+
+	    if (pjsua_var.stun_status == PJ_SUCCESS) {
+		pj_sockaddr_in_init(&pjsua_var.stun_srv.ipv4, NULL, 0);
+		pjsua_var.stun_srv.ipv4.sin_addr = *(pj_in_addr*)he.h_addr;
+		pjsua_var.stun_srv.ipv4.sin_port = pj_htons((pj_uint16_t)3478);
+
+		PJ_LOG(3,(THIS_FILE, 
+			  "STUN server %.*s resolved, address is %s:%d",
+			  (int)pjsua_var.ua_cfg.stun_host.slen,
+			  pjsua_var.ua_cfg.stun_host.ptr,
+			  pj_inet_ntoa(pjsua_var.stun_srv.ipv4.sin_addr),
+			  (int)pj_ntohs(pjsua_var.stun_srv.ipv4.sin_port)));
+	    }
+
+	}
+	/* Otherwise disable STUN. */
+	else {
+	    pjsua_var.stun_status = PJ_SUCCESS;
+	}
+
+
+	return pjsua_var.stun_status;
+
+    } else if (pjsua_var.stun_status == PJ_EPENDING) {
+	/* STUN server resolution has been started, wait for the
+	 * result.
+	 */
+	if (wait) {
+	    while (pjsua_var.stun_status == PJ_EPENDING)
+		pjsua_handle_events(10);
+	}
+
+	return pjsua_var.stun_status;
+
+    } else {
+	/* STUN server has been resolved, return the status */
+	return pjsua_var.stun_status;
+    }
+}
+
+/*
+ * Destroy pjsua.
+ */
+PJ_DEF(pj_status_t) pjsua_destroy(void)
+{
+    int i;  /* Must be signed */
+
+    /* Signal threads to quit: */
+    pjsua_var.thread_quit_flag = 1;
+
+    /* Wait worker threads to quit: */
+    for (i=0; i<(int)pjsua_var.ua_cfg.thread_cnt; ++i) {
+	if (pjsua_var.thread[i]) {
+	    pj_thread_join(pjsua_var.thread[i]);
+	    pj_thread_destroy(pjsua_var.thread[i]);
+	    pjsua_var.thread[i] = NULL;
+	}
+    }
+    
+    if (pjsua_var.endpt) {
+	/* Terminate all calls. */
+	pjsua_call_hangup_all();
+
+	/* Terminate all presence subscriptions. */
+	pjsua_pres_shutdown();
+
+	/* Unregister, if required: */
+	for (i=0; i<(int)PJ_ARRAY_SIZE(pjsua_var.acc); ++i) {
+	    if (!pjsua_var.acc[i].valid)
+		continue;
+
+	    if (pjsua_var.acc[i].regc) {
+		pjsua_acc_set_registration(i, PJ_FALSE);
+	    }
+	}
+
+	/* Wait for some time to allow unregistration to complete: */
+	PJ_LOG(4,(THIS_FILE, "Shutting down..."));
+	busy_sleep(1000);
+    }
+
+    /* Destroy media */
+    pjsua_media_subsys_destroy();
+
+    /* Destroy endpoint. */
+    if (pjsua_var.endpt) {
+	pjsip_endpt_destroy(pjsua_var.endpt);
+	pjsua_var.endpt = NULL;
+    }
+
+    /* Destroy mutex */
+    if (pjsua_var.mutex) {
+	pj_mutex_destroy(pjsua_var.mutex);
+	pjsua_var.mutex = NULL;
+    }
+
+    /* Destroy pool and pool factory. */
+    if (pjsua_var.pool) {
+	pj_pool_release(pjsua_var.pool);
+	pjsua_var.pool = NULL;
+	pj_caching_pool_destroy(&pjsua_var.cp);
+    }
+
+
+    PJ_LOG(4,(THIS_FILE, "PJSUA destroyed..."));
+
+    /* End logging */
+    if (pjsua_var.log_file) {
+	pj_file_close(pjsua_var.log_file);
+	pjsua_var.log_file = NULL;
+    }
+
+    /* Shutdown PJLIB */
+    pj_shutdown();
+
+    /* Clear pjsua_var */
+    pj_bzero(&pjsua_var, sizeof(pjsua_var));
+
+    /* Done. */
+    return PJ_SUCCESS;
+}
+
+
+/**
+ * Application is recommended to call this function after all initialization
+ * is done, so that the library can do additional checking set up
+ * additional 
+ *
+ * @return		PJ_SUCCESS on success, or the appropriate error code.
+ */
+PJ_DEF(pj_status_t) pjsua_start(void)
+{
+    pj_status_t status;
+
+    status = pjsua_call_subsys_start();
+    if (status != PJ_SUCCESS)
+	return status;
+
+    status = pjsua_media_subsys_start();
+    if (status != PJ_SUCCESS)
+	return status;
+
+    status = pjsua_pres_start();
+    if (status != PJ_SUCCESS)
+	return status;
+
+    return PJ_SUCCESS;
+}
+
+
+/**
+ * Poll pjsua for events, and if necessary block the caller thread for
+ * the specified maximum interval (in miliseconds).
+ */
+PJ_DEF(int) pjsua_handle_events(unsigned msec_timeout)
+{
+    unsigned count = 0;
+    pj_time_val tv;
+    pj_status_t status;
+
+    tv.sec = 0;
+    tv.msec = msec_timeout;
+    pj_time_val_normalize(&tv);
+
+    status = pjsip_endpt_handle_events2(pjsua_var.endpt, &tv, &count);
+
+    if (status != PJ_SUCCESS)
+	return -status;
+
+    return count;
+}
+
+
+/*
+ * Create memory pool.
+ */
+PJ_DEF(pj_pool_t*) pjsua_pool_create( const char *name, pj_size_t init_size,
+				      pj_size_t increment)
+{
+    /* Pool factory is thread safe, no need to lock */
+    return pj_pool_create(&pjsua_var.cp.factory, name, init_size, increment, 
+			  NULL);
+}
+
+
+/*
+ * Internal function to get SIP endpoint instance of pjsua, which is
+ * needed for example to register module, create transports, etc.
+ * Probably is only valid after #pjsua_init() is called.
+ */
+PJ_DEF(pjsip_endpoint*) pjsua_get_pjsip_endpt(void)
+{
+    return pjsua_var.endpt;
+}
+
+/*
+ * Internal function to get media endpoint instance.
+ * Only valid after #pjsua_init() is called.
+ */
+PJ_DEF(pjmedia_endpt*) pjsua_get_pjmedia_endpt(void)
+{
+    return pjsua_var.med_endpt;
+}
+
+/*
+ * Internal function to get PJSUA pool factory.
+ */
+PJ_DEF(pj_pool_factory*) pjsua_get_pool_factory(void)
+{
+    return &pjsua_var.cp.factory;
+}
+
+/*****************************************************************************
+ * PJSUA SIP Transport API.
+ */
+
+/*
+ * Create and initialize SIP socket (and possibly resolve public
+ * address via STUN, depending on config).
+ */
+static pj_status_t create_sip_udp_sock(pj_in_addr bound_addr,
+				       int port,
+				       pj_sock_t *p_sock,
+				       pj_sockaddr_in *p_pub_addr)
+{
+    char ip_addr[32];
+    pj_str_t stun_srv;
+    pj_sock_t sock;
+    pj_status_t status;
+
+    /* Make sure STUN server resolution has completed */
+    status = pjsua_resolve_stun_server(PJ_TRUE);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error resolving STUN server", status);
+	return status;
+    }
+
+    status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &sock);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "socket() error", status);
+	return status;
+    }
+
+    status = pj_sock_bind_in(sock, pj_ntohl(bound_addr.s_addr), 
+			     (pj_uint16_t)port);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "bind() error", status);
+	pj_sock_close(sock);
+	return status;
+    }
+
+    /* If port is zero, get the bound port */
+    if (port == 0) {
+	pj_sockaddr_in bound_addr;
+	int namelen = sizeof(bound_addr);
+	status = pj_sock_getsockname(sock, &bound_addr, &namelen);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "getsockname() error", status);
+	    pj_sock_close(sock);
+	    return status;
+	}
+
+	port = pj_ntohs(bound_addr.sin_port);
+    }
+
+    if (pjsua_var.stun_srv.addr.sa_family != 0) {
+	pj_ansi_strcpy(ip_addr,pj_inet_ntoa(pjsua_var.stun_srv.ipv4.sin_addr));
+	stun_srv = pj_str(ip_addr);
+    } else {
+	stun_srv.slen = 0;
+    }
+
+    /* Get the published address, either by STUN or by resolving
+     * the name of local host.
+     */
+    if (stun_srv.slen) {
+	/*
+	 * STUN is specified, resolve the address with STUN.
+	 */
+	status = pjstun_get_mapped_addr(&pjsua_var.cp.factory, 1, &sock,
+				         &stun_srv, 3478,
+					 &stun_srv, 3478,
+				         p_pub_addr);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Error contacting STUN server", status);
+	    pj_sock_close(sock);
+	    return status;
+	}
+
+    } else if (p_pub_addr->sin_addr.s_addr != 0) {
+	/*
+	 * Public address is already specified, no need to resolve the 
+	 * address, only set the port.
+	 */
+	if (p_pub_addr->sin_port == 0)
+	    p_pub_addr->sin_port = pj_htons((pj_uint16_t)port);
+
+    } else {
+
+	pj_bzero(p_pub_addr, sizeof(pj_sockaddr_in));
+
+	status = pj_gethostip(&p_pub_addr->sin_addr);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Unable to get local host IP", status);
+	    pj_sock_close(sock);
+	    return status;
+	}
+
+	p_pub_addr->sin_family = PJ_AF_INET;
+	p_pub_addr->sin_port = pj_htons((pj_uint16_t)port);
+    }
+
+    *p_sock = sock;
+
+    PJ_LOG(4,(THIS_FILE, "SIP UDP socket reachable at %s:%d",
+	      pj_inet_ntoa(p_pub_addr->sin_addr),
+	      (int)pj_ntohs(p_pub_addr->sin_port)));
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create SIP transport.
+ */
+PJ_DEF(pj_status_t) pjsua_transport_create( pjsip_transport_type_e type,
+					    const pjsua_transport_config *cfg,
+					    pjsua_transport_id *p_id)
+{
+    pjsip_transport *tp;
+    unsigned id;
+    pj_status_t status;
+
+    PJSUA_LOCK();
+
+    /* Find empty transport slot */
+    for (id=0; id < PJ_ARRAY_SIZE(pjsua_var.tpdata); ++id) {
+	if (pjsua_var.tpdata[id].data.ptr == NULL)
+	    break;
+    }
+
+    if (id == PJ_ARRAY_SIZE(pjsua_var.tpdata)) {
+	status = PJ_ETOOMANY;
+	pjsua_perror(THIS_FILE, "Error creating transport", status);
+	goto on_return;
+    }
+
+    /* Create the transport */
+    if (type == PJSIP_TRANSPORT_UDP) {
+	/*
+	 * Create UDP transport.
+	 */
+	pjsua_transport_config config;
+	pj_sock_t sock = PJ_INVALID_SOCKET;
+	pj_sockaddr_in bound_addr;
+	pj_sockaddr_in pub_addr;
+	pjsip_host_port addr_name;
+
+	/* Supply default config if it's not specified */
+	if (cfg == NULL) {
+	    pjsua_transport_config_default(&config);
+	    cfg = &config;
+	}
+
+	/* Initialize bound address, if any */
+	bound_addr.sin_addr.s_addr = PJ_INADDR_ANY;
+	if (cfg->bound_addr.slen) {
+	    status = pj_sockaddr_in_set_str_addr(&bound_addr,&cfg->bound_addr);
+	    if (status != PJ_SUCCESS) {
+		pjsua_perror(THIS_FILE, 
+			     "Unable to resolve transport bound address", 
+			     status);
+		goto on_return;
+	    }
+	}
+
+	/* Initialize the public address from the config, if any */
+	pj_sockaddr_in_init(&pub_addr, NULL, (pj_uint16_t)cfg->port);
+	if (cfg->public_addr.slen) {
+	    status = pj_sockaddr_in_set_str_addr(&pub_addr, &cfg->public_addr);
+	    if (status != PJ_SUCCESS) {
+		pjsua_perror(THIS_FILE, 
+			     "Unable to resolve transport public address", 
+			     status);
+		goto on_return;
+	    }
+	}
+
+	/* Create the socket and possibly resolve the address with STUN 
+	 * (only when public address is not specified).
+	 */
+	status = create_sip_udp_sock(bound_addr.sin_addr, cfg->port, 
+				     &sock, &pub_addr);
+	if (status != PJ_SUCCESS)
+	    goto on_return;
+
+	addr_name.host = pj_str(pj_inet_ntoa(pub_addr.sin_addr));
+	addr_name.port = pj_ntohs(pub_addr.sin_port);
+
+	/* Create UDP transport */
+	status = pjsip_udp_transport_attach( pjsua_var.endpt, sock,
+					     &addr_name, 1, 
+					     &tp);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Error creating SIP UDP transport", 
+			 status);
+	    pj_sock_close(sock);
+	    goto on_return;
+	}
+
+
+	/* Save the transport */
+	pjsua_var.tpdata[id].type = type;
+	pjsua_var.tpdata[id].local_name = tp->local_name;
+	pjsua_var.tpdata[id].data.tp = tp;
+
+#if defined(PJ_HAS_TCP) && PJ_HAS_TCP!=0
+
+    } else if (type == PJSIP_TRANSPORT_TCP) {
+	/*
+	 * Create TCP transport.
+	 */
+	pjsua_transport_config config;
+	pjsip_host_port a_name;
+	pjsip_tpfactory *tcp;
+	pj_sockaddr_in local_addr;
+
+	/* Supply default config if it's not specified */
+	if (cfg == NULL) {
+	    pjsua_transport_config_default(&config);
+	    cfg = &config;
+	}
+
+	/* Init local address */
+	pj_sockaddr_in_init(&local_addr, 0, 0);
+
+	if (cfg->port)
+	    local_addr.sin_port = pj_htons((pj_uint16_t)cfg->port);
+
+	if (cfg->bound_addr.slen) {
+	    status = pj_sockaddr_in_set_str_addr(&local_addr,&cfg->bound_addr);
+	    if (status != PJ_SUCCESS) {
+		pjsua_perror(THIS_FILE, 
+			     "Unable to resolve transport bound address", 
+			     status);
+		goto on_return;
+	    }
+	}
+
+	/* Init published name */
+	pj_bzero(&a_name, sizeof(pjsip_host_port));
+	if (cfg->public_addr.slen)
+	    a_name.host = cfg->public_addr;
+
+	/* Create the TCP transport */
+	status = pjsip_tcp_transport_start2(pjsua_var.endpt, &local_addr, 
+					    &a_name, 1, &tcp);
+
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Error creating SIP TCP listener", 
+			 status);
+	    goto on_return;
+	}
+
+	/* Save the transport */
+	pjsua_var.tpdata[id].type = type;
+	pjsua_var.tpdata[id].local_name = tcp->addr_name;
+	pjsua_var.tpdata[id].data.factory = tcp;
+
+#endif	/* PJ_HAS_TCP */
+
+#if defined(PJSIP_HAS_TLS_TRANSPORT) && PJSIP_HAS_TLS_TRANSPORT!=0
+    } else if (type == PJSIP_TRANSPORT_TLS) {
+	/*
+	 * Create TLS transport.
+	 */
+	/*
+	 * Create TCP transport.
+	 */
+	pjsua_transport_config config;
+	pjsip_host_port a_name;
+	pjsip_tpfactory *tls;
+	pj_sockaddr_in local_addr;
+
+	/* Supply default config if it's not specified */
+	if (cfg == NULL) {
+	    pjsua_transport_config_default(&config);
+	    config.port = 5061;
+	    cfg = &config;
+	}
+
+	/* Init local address */
+	pj_sockaddr_in_init(&local_addr, 0, 0);
+
+	if (cfg->port)
+	    local_addr.sin_port = pj_htons((pj_uint16_t)cfg->port);
+
+	if (cfg->bound_addr.slen) {
+	    status = pj_sockaddr_in_set_str_addr(&local_addr,&cfg->bound_addr);
+	    if (status != PJ_SUCCESS) {
+		pjsua_perror(THIS_FILE, 
+			     "Unable to resolve transport bound address", 
+			     status);
+		goto on_return;
+	    }
+	}
+
+	/* Init published name */
+	pj_bzero(&a_name, sizeof(pjsip_host_port));
+	if (cfg->public_addr.slen)
+	    a_name.host = cfg->public_addr;
+
+	status = pjsip_tls_transport_start(pjsua_var.endpt, 
+					   &cfg->tls_setting, 
+					   &local_addr, &a_name, 1, &tls);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Error creating SIP TLS listener", 
+			 status);
+	    goto on_return;
+	}
+
+	/* Save the transport */
+	pjsua_var.tpdata[id].type = type;
+	pjsua_var.tpdata[id].local_name = tls->addr_name;
+	pjsua_var.tpdata[id].data.factory = tls;
+#endif
+
+    } else {
+	status = PJSIP_EUNSUPTRANSPORT;
+	pjsua_perror(THIS_FILE, "Error creating transport", status);
+	goto on_return;
+    }
+
+
+    /* Return the ID */
+    if (p_id) *p_id = id;
+
+    status = PJ_SUCCESS;
+
+on_return:
+
+    PJSUA_UNLOCK();
+
+    return status;
+}
+
+
+/*
+ * Register transport that has been created by application.
+ */
+PJ_DEF(pj_status_t) pjsua_transport_register( pjsip_transport *tp,
+					      pjsua_transport_id *p_id)
+{
+    unsigned id;
+
+    PJSUA_LOCK();
+
+    /* Find empty transport slot */
+    for (id=0; id < PJ_ARRAY_SIZE(pjsua_var.tpdata); ++id) {
+	if (pjsua_var.tpdata[id].data.ptr == NULL)
+	    break;
+    }
+
+    if (id == PJ_ARRAY_SIZE(pjsua_var.tpdata)) {
+	pjsua_perror(THIS_FILE, "Error creating transport", PJ_ETOOMANY);
+	PJSUA_UNLOCK();
+	return PJ_ETOOMANY;
+    }
+
+    /* Save the transport */
+    pjsua_var.tpdata[id].type = tp->key.type;
+    pjsua_var.tpdata[id].local_name = tp->local_name;
+    pjsua_var.tpdata[id].data.tp = tp;
+
+    /* Return the ID */
+    if (p_id) *p_id = id;
+
+    PJSUA_UNLOCK();
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Enumerate all transports currently created in the system.
+ */
+PJ_DEF(pj_status_t) pjsua_enum_transports( pjsua_transport_id id[],
+					   unsigned *p_count )
+{
+    unsigned i, count;
+
+    PJSUA_LOCK();
+
+    for (i=0, count=0; i<PJ_ARRAY_SIZE(pjsua_var.tpdata) && count<*p_count; 
+	 ++i) 
+    {
+	if (!pjsua_var.tpdata[i].data.ptr)
+	    continue;
+
+	id[count++] = i;
+    }
+
+    *p_count = count;
+
+    PJSUA_UNLOCK();
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get information about transports.
+ */
+PJ_DEF(pj_status_t) pjsua_transport_get_info( pjsua_transport_id id,
+					      pjsua_transport_info *info)
+{
+    pjsua_transport_data *t = &pjsua_var.tpdata[id];
+    pj_status_t status;
+
+    pj_bzero(info, sizeof(*info));
+
+    /* Make sure id is in range. */
+    PJ_ASSERT_RETURN(id>=0 && id<PJ_ARRAY_SIZE(pjsua_var.tpdata), PJ_EINVAL);
+
+    /* Make sure that transport exists */
+    PJ_ASSERT_RETURN(pjsua_var.tpdata[id].data.ptr != NULL, PJ_EINVAL);
+
+    PJSUA_LOCK();
+
+    if (pjsua_var.tpdata[id].type == PJSIP_TRANSPORT_UDP) {
+
+	pjsip_transport *tp = t->data.tp;
+
+	if (tp == NULL) {
+	    PJSUA_UNLOCK();
+	    return PJ_EINVALIDOP;
+	}
+    
+	info->id = id;
+	info->type = tp->key.type;
+	info->type_name = pj_str(tp->type_name);
+	info->info = pj_str(tp->info);
+	info->flag = tp->flag;
+	info->addr_len = tp->addr_len;
+	info->local_addr = tp->local_addr;
+	info->local_name = tp->local_name;
+	info->usage_count = pj_atomic_get(tp->ref_cnt);
+
+	status = PJ_SUCCESS;
+
+    } else if (pjsua_var.tpdata[id].type == PJSIP_TRANSPORT_TCP) {
+
+	pjsip_tpfactory *factory = t->data.factory;
+
+	if (factory == NULL) {
+	    PJSUA_UNLOCK();
+	    return PJ_EINVALIDOP;
+	}
+    
+	info->id = id;
+	info->type = t->type;
+	info->type_name = pj_str("TCP");
+	info->info = pj_str("TCP transport");
+	info->flag = factory->flag;
+	info->addr_len = sizeof(factory->local_addr);
+	info->local_addr = factory->local_addr;
+	info->local_name = factory->addr_name;
+	info->usage_count = 0;
+
+	status = PJ_SUCCESS;
+
+    } else {
+	pj_assert(!"Unsupported transport");
+	status = PJ_EINVALIDOP;
+    }
+
+
+    PJSUA_UNLOCK();
+
+    return status;
+}
+
+
+/*
+ * Disable a transport or re-enable it.
+ */
+PJ_DEF(pj_status_t) pjsua_transport_set_enable( pjsua_transport_id id,
+						pj_bool_t enabled)
+{
+    /* Make sure id is in range. */
+    PJ_ASSERT_RETURN(id>=0 && id<PJ_ARRAY_SIZE(pjsua_var.tpdata), PJ_EINVAL);
+
+    /* Make sure that transport exists */
+    PJ_ASSERT_RETURN(pjsua_var.tpdata[id].data.ptr != NULL, PJ_EINVAL);
+
+
+    /* To be done!! */
+    PJ_TODO(pjsua_transport_set_enable);
+    PJ_UNUSED_ARG(enabled);
+
+    return PJ_EINVALIDOP;
+}
+
+
+/*
+ * Close the transport.
+ */
+PJ_DEF(pj_status_t) pjsua_transport_close( pjsua_transport_id id,
+					   pj_bool_t force )
+{
+    pj_status_t status;
+
+    /* Make sure id is in range. */
+    PJ_ASSERT_RETURN(id>=0 && id<PJ_ARRAY_SIZE(pjsua_var.tpdata), PJ_EINVAL);
+
+    /* Make sure that transport exists */
+    PJ_ASSERT_RETURN(pjsua_var.tpdata[id].data.ptr != NULL, PJ_EINVAL);
+
+    /* Note: destroy() may not work if there are objects still referencing
+     *	     the transport.
+     */
+    if (force) {
+	switch (pjsua_var.tpdata[id].type) {
+	case PJSIP_TRANSPORT_UDP:
+	    status = pjsip_transport_shutdown(pjsua_var.tpdata[id].data.tp);
+	    if (status  != PJ_SUCCESS)
+		return status;
+	    status = pjsip_transport_destroy(pjsua_var.tpdata[id].data.tp);
+	    if (status != PJ_SUCCESS)
+		return status;
+	    break;
+
+	case PJSIP_TRANSPORT_TLS:
+	case PJSIP_TRANSPORT_TCP:
+	    /* This will close the TCP listener, but existing TCP/TLS
+	     * connections (if any) will still linger 
+	     */
+	    status = (*pjsua_var.tpdata[id].data.factory->destroy)
+			(pjsua_var.tpdata[id].data.factory);
+	    if (status != PJ_SUCCESS)
+		return status;
+
+	    break;
+
+	default:
+	    return PJ_EINVAL;
+	}
+	
+    } else {
+	/* If force is not specified, transports will be closed at their
+	 * convenient time. However this will leak PJSUA-API transport
+	 * descriptors as PJSUA-API wouldn't know when exactly the
+	 * transport is closed thus it can't cleanup PJSUA transport
+	 * descriptor.
+	 */
+	switch (pjsua_var.tpdata[id].type) {
+	case PJSIP_TRANSPORT_UDP:
+	    return pjsip_transport_shutdown(pjsua_var.tpdata[id].data.tp);
+	case PJSIP_TRANSPORT_TLS:
+	case PJSIP_TRANSPORT_TCP:
+	    return (*pjsua_var.tpdata[id].data.factory->destroy)
+			(pjsua_var.tpdata[id].data.factory);
+	default:
+	    return PJ_EINVAL;
+	}
+    }
+
+    /* Cleanup pjsua data when force is applied */
+    if (force) {
+	pjsua_var.tpdata[id].type = PJSIP_TRANSPORT_UNSPECIFIED;
+	pjsua_var.tpdata[id].data.ptr = NULL;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Add additional headers etc in msg_data specified by application
+ * when sending requests.
+ */
+void pjsua_process_msg_data(pjsip_tx_data *tdata,
+			    const pjsua_msg_data *msg_data)
+{
+    pj_bool_t allow_body;
+    const pjsip_hdr *hdr;
+
+    /* Always add User-Agent */
+    if (pjsua_var.ua_cfg.user_agent.slen && 
+	tdata->msg->type == PJSIP_REQUEST_MSG) 
+    {
+	const pj_str_t STR_USER_AGENT = { "User-Agent", 10 };
+	pjsip_hdr *h;
+	h = (pjsip_hdr*)pjsip_generic_string_hdr_create(tdata->pool, 
+							&STR_USER_AGENT, 
+							&pjsua_var.ua_cfg.user_agent);
+	pjsip_msg_add_hdr(tdata->msg, h);
+    }
+
+    if (!msg_data)
+	return;
+
+    hdr = msg_data->hdr_list.next;
+    while (hdr && hdr != &msg_data->hdr_list) {
+	pjsip_hdr *new_hdr;
+
+	new_hdr = pjsip_hdr_clone(tdata->pool, hdr);
+	pjsip_msg_add_hdr(tdata->msg, new_hdr);
+
+	hdr = hdr->next;
+    }
+
+    allow_body = (tdata->msg->body == NULL);
+
+    if (allow_body && msg_data->content_type.slen && msg_data->msg_body.slen) {
+	pjsip_media_type ctype;
+	pjsip_msg_body *body;	
+
+	pjsua_parse_media_type(tdata->pool, &msg_data->content_type, &ctype);
+	body = pjsip_msg_body_create(tdata->pool, &ctype.type, &ctype.subtype,
+				     &msg_data->msg_body);
+	tdata->msg->body = body;
+    }
+}
+
+
+/*
+ * Add route_set to outgoing requests
+ */
+void pjsua_set_msg_route_set( pjsip_tx_data *tdata,
+			      const pjsip_route_hdr *route_set )
+{
+    const pjsip_route_hdr *r;
+
+    r = route_set->next;
+    while (r != route_set) {
+	pjsip_route_hdr *new_r;
+
+	new_r = pjsip_hdr_clone(tdata->pool, r);
+	pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)new_r);
+
+	r = r->next;
+    }
+}
+
+
+/*
+ * Simple version of MIME type parsing (it doesn't support parameters)
+ */
+void pjsua_parse_media_type( pj_pool_t *pool,
+			     const pj_str_t *mime,
+			     pjsip_media_type *media_type)
+{
+    pj_str_t tmp;
+    char *pos;
+
+    pj_bzero(media_type, sizeof(*media_type));
+
+    pj_strdup_with_null(pool, &tmp, mime);
+
+    pos = pj_strchr(&tmp, '/');
+    if (pos) {
+	media_type->type.ptr = tmp.ptr; 
+	media_type->type.slen = (pos-tmp.ptr);
+	media_type->subtype.ptr = pos+1; 
+	media_type->subtype.slen = tmp.ptr+tmp.slen-pos-1;
+    } else {
+	media_type->type = tmp;
+    }
+}
+
+
+/*
+ * Internal function to init transport selector from transport id.
+ */
+void pjsua_init_tpselector(pjsua_transport_id tp_id,
+			   pjsip_tpselector *sel)
+{
+    pjsua_transport_data *tpdata;
+    unsigned flag;
+
+    pj_bzero(sel, sizeof(*sel));
+    if (tp_id == PJSUA_INVALID_ID)
+	return;
+
+    pj_assert(tp_id >= 0 && tp_id < PJ_ARRAY_SIZE(pjsua_var.tpdata));
+    tpdata = &pjsua_var.tpdata[tp_id];
+
+    flag = pjsip_transport_get_flag_from_type(tpdata->type);
+
+    if (flag & PJSIP_TRANSPORT_DATAGRAM) {
+	sel->type = PJSIP_TPSELECTOR_TRANSPORT;
+	sel->u.transport = tpdata->data.tp;
+    } else {
+	sel->type = PJSIP_TPSELECTOR_LISTENER;
+	sel->u.listener = tpdata->data.factory;
+    }
+}
+
+
+/*
+ * Verify that valid SIP url is given.
+ */
+PJ_DEF(pj_status_t) pjsua_verify_sip_url(const char *c_url)
+{
+    pjsip_uri *p;
+    pj_pool_t *pool;
+    char *url;
+    int len = (c_url ? pj_ansi_strlen(c_url) : 0);
+
+    if (!len) return -1;
+
+    pool = pj_pool_create(&pjsua_var.cp.factory, "check%p", 1024, 0, NULL);
+    if (!pool) return -1;
+
+    url = pj_pool_alloc(pool, len+1);
+    pj_ansi_strcpy(url, c_url);
+
+    p = pjsip_parse_uri(pool, url, len, 0);
+    if (!p || pj_stricmp2(pjsip_uri_get_scheme(p), "sip") != 0)
+	p = NULL;
+
+    pj_pool_release(pool);
+    return p ? 0 : -1;
+}
+
+
+/*
+ * This is a utility function to dump the stack states to log, using
+ * verbosity level 3.
+ */
+PJ_DEF(void) pjsua_dump(pj_bool_t detail)
+{
+    unsigned old_decor;
+    unsigned i;
+    char buf[1024];
+
+    PJ_LOG(3,(THIS_FILE, "Start dumping application states:"));
+
+    old_decor = pj_log_get_decor();
+    pj_log_set_decor(old_decor & (PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_CR));
+
+    if (detail)
+	pj_dump_config();
+
+    pjsip_endpt_dump(pjsua_get_pjsip_endpt(), detail);
+
+    pjmedia_endpt_dump(pjsua_get_pjmedia_endpt());
+
+    PJ_LOG(3,(THIS_FILE, "Dumping media transports:"));
+    for (i=0; i<pjsua_var.ua_cfg.max_calls; ++i) {
+	pjsua_call *call = &pjsua_var.calls[i];
+	pjmedia_sock_info skinfo;
+
+	pjmedia_transport_get_info(call->med_tp, &skinfo);
+
+	PJ_LOG(3,(THIS_FILE, " %s: %s:%d",
+		  (pjsua_var.media_cfg.enable_ice ? "ICE" : "UDP"),
+		  pj_inet_ntoa(skinfo.rtp_addr_name.sin_addr),
+		  (int)pj_ntohs(skinfo.rtp_addr_name.sin_port)));
+    }
+
+    pjsip_tsx_layer_dump(detail);
+    pjsip_ua_dump(detail);
+
+
+    /* Dump all invite sessions: */
+    PJ_LOG(3,(THIS_FILE, "Dumping invite sessions:"));
+
+    if (pjsua_call_get_count() == 0) {
+
+	PJ_LOG(3,(THIS_FILE, "  - no sessions -"));
+
+    } else {
+	unsigned i;
+
+	for (i=0; i<pjsua_var.ua_cfg.max_calls; ++i) {
+	    if (pjsua_call_is_active(i)) {
+		pjsua_call_dump(i, detail, buf, sizeof(buf), "  ");
+		PJ_LOG(3,(THIS_FILE, "%s", buf));
+	    }
+	}
+    }
+
+    /* Dump presence status */
+    pjsua_pres_dump(detail);
+
+    pj_log_set_decor(old_decor);
+    PJ_LOG(3,(THIS_FILE, "Dump complete"));
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_im.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_im.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_im.c	(revision 1163)
@@ -0,0 +1,617 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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-lib/pjsua.h>
+#include <pjsua-lib/pjsua_internal.h>
+
+
+#define THIS_FILE   "pjsua_im.h"
+
+
+/* Declare MESSAGE method */
+/* We put PJSIP_MESSAGE_METHOD as the enum here, so that when
+ * somebody add that method into pjsip_method_e in sip_msg.h we
+ * will get an error here.
+ */
+enum
+{
+    PJSIP_MESSAGE_METHOD = PJSIP_OTHER_METHOD
+};
+
+const pjsip_method pjsip_message_method =
+{
+    PJSIP_MESSAGE_METHOD,
+    { "MESSAGE", 7 }
+};
+
+
+/* Proto */
+static pj_bool_t im_on_rx_request(pjsip_rx_data *rdata);
+
+
+/* The module instance. */
+static pjsip_module mod_pjsua_im = 
+{
+    NULL, NULL,				/* prev, next.		*/
+    { "mod-pjsua-im", 12 },		/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION,	/* Priority	        */
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    &im_on_rx_request,			/* on_rx_request()	*/
+    NULL,				/* on_rx_response()	*/
+    NULL,				/* on_tx_request.	*/
+    NULL,				/* on_tx_response()	*/
+    NULL,				/* on_tsx_state()	*/
+
+};
+
+
+/* MIME constants. */
+static const pj_str_t STR_MIME_APP	   = { "application", 11 };
+static const pj_str_t STR_MIME_ISCOMPOSING = { "im-iscomposing+xml", 18 };
+static const pj_str_t STR_MIME_TEXT	   = { "text", 4 };
+static const pj_str_t STR_MIME_PLAIN	   = { "plain", 5 };
+
+
+/* Check if content type is acceptable */
+static pj_bool_t acceptable_message(const pjsip_media_type *mime)
+{
+    return (pj_stricmp(&mime->type, &STR_MIME_TEXT)==0 &&
+	    pj_stricmp(&mime->subtype, &STR_MIME_PLAIN)==0)
+	    ||
+	   (pj_stricmp(&mime->type, &STR_MIME_APP)==0 &&
+	    pj_stricmp(&mime->subtype, &STR_MIME_ISCOMPOSING)==0);
+}
+
+
+/**
+ * Create Accept header for MESSAGE.
+ */
+pjsip_accept_hdr* pjsua_im_create_accept(pj_pool_t *pool)
+{
+    /* Create Accept header. */
+    pjsip_accept_hdr *accept;
+
+    accept = pjsip_accept_hdr_create(pool);
+    accept->values[0] = pj_str("text/plain");
+    accept->values[1] = pj_str("application/im-iscomposing+xml");
+    accept->count = 2;
+
+    return accept;
+}
+
+/**
+ * Private: check if we can accept the message.
+ */
+pj_bool_t pjsua_im_accept_pager(pjsip_rx_data *rdata,
+				pjsip_accept_hdr **p_accept_hdr)
+{
+    pjsip_ctype_hdr *ctype;
+    pjsip_msg *msg;
+
+    msg = rdata->msg_info.msg;
+
+    /* Request MUST have message body, with Content-Type equal to
+     * "text/plain".
+     */
+    ctype = pjsip_msg_find_hdr(msg, PJSIP_H_CONTENT_TYPE, NULL);
+    if (msg->body == NULL || ctype == NULL || 
+	!acceptable_message(&ctype->media)) 
+    {
+	/* Create Accept header. */
+	if (p_accept_hdr)
+	    *p_accept_hdr = pjsua_im_create_accept(rdata->tp_info.pool);
+
+	return PJ_FALSE;
+    }
+
+    return PJ_TRUE;
+}
+
+/**
+ * Private: process pager message.
+ *	    This may trigger pjsua_ui_on_pager() or pjsua_ui_on_typing().
+ */
+void pjsua_im_process_pager(int call_id, const pj_str_t *from,
+			    const pj_str_t *to, pjsip_rx_data *rdata)
+{
+    pjsip_contact_hdr *contact_hdr;
+    pj_str_t contact;
+    pjsip_msg_body *body = rdata->msg_info.msg->body;
+
+    /* Body MUST have been checked before */
+    pj_assert(body != NULL);
+
+
+    /* Build remote contact */
+    contact_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT,
+				     NULL);
+    if (contact_hdr) {
+	contact.ptr = pj_pool_alloc(rdata->tp_info.pool, 
+				    PJSIP_MAX_URL_SIZE);
+	contact.slen = pjsip_uri_print(PJSIP_URI_IN_CONTACT_HDR,
+				       contact_hdr->uri, contact.ptr,
+				       PJSIP_MAX_URL_SIZE);
+    } else {
+	contact.slen = 0;
+    }
+
+
+    if (pj_stricmp(&body->content_type.type, &STR_MIME_TEXT)==0 &&
+	pj_stricmp(&body->content_type.subtype, &STR_MIME_PLAIN)==0)
+    {
+	const pj_str_t mime_text_plain = pj_str("text/plain");
+	pj_str_t text_body;
+	
+	/* Save text body */
+	text_body.ptr = rdata->msg_info.msg->body->data;
+	text_body.slen = rdata->msg_info.msg->body->len;
+
+	if (pjsua_var.ua_cfg.cb.on_pager) {
+	    (*pjsua_var.ua_cfg.cb.on_pager)(call_id, from, to, &contact, 
+					    &mime_text_plain, &text_body);
+	}
+
+    } else {
+	/* Expecting typing indication */
+	pj_status_t status;
+	pj_bool_t is_typing;
+
+	status = pjsip_iscomposing_parse( rdata->tp_info.pool, body->data,
+					  body->len, &is_typing, NULL, NULL,
+					  NULL );
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Invalid MESSAGE body", status);
+	    return;
+	}
+
+	if (pjsua_var.ua_cfg.cb.on_typing) {
+	    (*pjsua_var.ua_cfg.cb.on_typing)(call_id, from, to, &contact,
+					     is_typing);
+	}
+    }
+
+}
+
+
+/*
+ * Handler to receive incoming MESSAGE
+ */
+static pj_bool_t im_on_rx_request(pjsip_rx_data *rdata)
+{
+    pj_str_t from, to;
+    pjsip_accept_hdr *accept_hdr;
+    pjsip_contact_hdr *contact_hdr;
+    pjsip_msg *msg;
+    pj_status_t status;
+
+    msg = rdata->msg_info.msg;
+
+    /* Only want to handle MESSAGE requests. */
+    if (pjsip_method_cmp(&msg->line.req.method, &pjsip_message_method) != 0) {
+	return PJ_FALSE;
+    }
+
+
+    /* Should not have any transaction attached to rdata. */
+    PJ_ASSERT_RETURN(pjsip_rdata_get_tsx(rdata)==NULL, PJ_FALSE);
+
+    /* Should not have any dialog attached to rdata. */
+    PJ_ASSERT_RETURN(pjsip_rdata_get_dlg(rdata)==NULL, PJ_FALSE);
+
+    /* Check if we can accept the message. */
+    if (!pjsua_im_accept_pager(rdata, &accept_hdr)) {
+	pjsip_hdr hdr_list;
+
+	pj_list_init(&hdr_list);
+	pj_list_push_back(&hdr_list, accept_hdr);
+
+	pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 
+				      PJSIP_SC_NOT_ACCEPTABLE_HERE, NULL, 
+				      &hdr_list, NULL);
+	return PJ_TRUE;
+    }
+    
+    /* Respond with 200 first, so that remote doesn't retransmit in case
+     * the UI takes too long to process the message. 
+     */
+    status = pjsip_endpt_respond( pjsua_var.endpt, NULL, rdata, 200, NULL,
+				  NULL, NULL, NULL);
+
+    /* For the source URI, we use Contact header if present, since
+     * Contact header contains the port number information. If this is
+     * not available, then use From header.
+     */
+    from.ptr = pj_pool_alloc(rdata->tp_info.pool, PJSIP_MAX_URL_SIZE);
+    contact_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg,
+				     PJSIP_H_CONTACT, NULL);
+    if (contact_hdr) {
+	from.slen = pjsip_uri_print(PJSIP_URI_IN_CONTACT_HDR,
+				    contact_hdr->uri, 
+				    from.ptr, PJSIP_MAX_URL_SIZE);
+    } else {
+	from.slen = pjsip_uri_print(PJSIP_URI_IN_FROMTO_HDR, 
+				    rdata->msg_info.from->uri,
+				    from.ptr, PJSIP_MAX_URL_SIZE);
+    }
+
+    if (from.slen < 1)
+	from = pj_str("<--URI is too long-->");
+
+    /* Build the To text. */
+    to.ptr = pj_pool_alloc(rdata->tp_info.pool, PJSIP_MAX_URL_SIZE);
+    to.slen = pjsip_uri_print( PJSIP_URI_IN_FROMTO_HDR, 
+			       rdata->msg_info.to->uri,
+			       to.ptr, PJSIP_MAX_URL_SIZE);
+    if (to.slen < 1)
+	to = pj_str("<--URI is too long-->");
+
+    /* Process pager. */
+    pjsua_im_process_pager(-1, &from, &to, rdata);
+
+    /* Done. */
+    return PJ_TRUE;
+}
+
+
+/* Outgoing IM callback. */
+static void im_callback(void *token, pjsip_event *e)
+{
+    pjsua_im_data *im_data = token;
+
+    if (e->type == PJSIP_EVENT_TSX_STATE) {
+
+	pjsip_transaction *tsx = e->body.tsx_state.tsx;
+
+	/* Ignore provisional response, if any */
+	if (tsx->status_code < 200)
+	    return;
+
+
+	/* Handle authentication challenges */
+	if (e->body.tsx_state.type == PJSIP_EVENT_RX_MSG &&
+	    (tsx->status_code == 401 || tsx->status_code == 407)) 
+	{
+	    pjsip_rx_data *rdata = e->body.tsx_state.src.rdata;
+	    pjsip_tx_data *tdata;
+	    pjsip_auth_clt_sess auth;
+	    pj_status_t status;
+
+	    PJ_LOG(4,(THIS_FILE, "Resending IM with authentication"));
+
+	    /* Create temporary authentication session */
+	    pjsip_auth_clt_init(&auth,pjsua_var.endpt,rdata->tp_info.pool, 0);
+    
+	    pjsip_auth_clt_set_credentials(&auth, 
+		pjsua_var.acc[im_data->acc_id].cred_cnt,
+		pjsua_var.acc[im_data->acc_id].cred);
+
+	    status = pjsip_auth_clt_reinit_req(&auth, rdata, tsx->last_tx,
+					       &tdata);
+	    if (status == PJ_SUCCESS) {
+		pjsua_im_data *im_data2;
+
+		/* Must duplicate im_data */
+		im_data2 = pjsua_im_data_dup(tdata->pool, im_data);
+
+		/* Re-send request */
+		status = pjsip_endpt_send_request( pjsua_var.endpt, tdata, -1,
+						   im_data2, &im_callback);
+		if (status == PJ_SUCCESS) {
+		    /* Done */
+		    return;
+		}
+	    }
+	}
+
+	if (tsx->status_code/100 == 2) {
+	    PJ_LOG(4,(THIS_FILE, 
+		      "Message \'%s\' delivered successfully",
+		      im_data->body.ptr));
+	} else {
+	    PJ_LOG(3,(THIS_FILE, 
+		      "Failed to deliver message \'%s\': %d/%.*s",
+		      im_data->body.ptr,
+		      tsx->status_code,
+		      (int)tsx->status_text.slen,
+		      tsx->status_text.ptr));
+	}
+
+	if (pjsua_var.ua_cfg.cb.on_pager_status)
+	    pjsua_var.ua_cfg.cb.on_pager_status(im_data->call_id, 
+					        &im_data->to,
+						&im_data->body,
+						im_data->user_data,
+						tsx->status_code,
+						&tsx->status_text);
+    }
+}
+
+
+/* Outgoing typing indication callback. 
+ * (used to reauthenticate request)
+ */
+static void typing_callback(void *token, pjsip_event *e)
+{
+    pjsua_im_data *im_data = token;
+
+    if (e->type == PJSIP_EVENT_TSX_STATE) {
+
+	pjsip_transaction *tsx = e->body.tsx_state.tsx;
+
+	/* Ignore provisional response, if any */
+	if (tsx->status_code < 200)
+	    return;
+
+	/* Handle authentication challenges */
+	if (e->body.tsx_state.type == PJSIP_EVENT_RX_MSG &&
+	    (tsx->status_code == 401 || tsx->status_code == 407)) 
+	{
+	    pjsip_rx_data *rdata = e->body.tsx_state.src.rdata;
+	    pjsip_tx_data *tdata;
+	    pjsip_auth_clt_sess auth;
+	    pj_status_t status;
+
+	    PJ_LOG(4,(THIS_FILE, "Resending IM with authentication"));
+
+	    /* Create temporary authentication session */
+	    pjsip_auth_clt_init(&auth,pjsua_var.endpt,rdata->tp_info.pool, 0);
+    
+	    pjsip_auth_clt_set_credentials(&auth, 
+		pjsua_var.acc[im_data->acc_id].cred_cnt,
+		pjsua_var.acc[im_data->acc_id].cred);
+
+	    status = pjsip_auth_clt_reinit_req(&auth, rdata, tsx->last_tx,
+					       &tdata);
+	    if (status == PJ_SUCCESS) {
+		pjsua_im_data *im_data2;
+
+		/* Must duplicate im_data */
+		im_data2 = pjsua_im_data_dup(tdata->pool, im_data);
+
+		/* Re-send request */
+		status = pjsip_endpt_send_request( pjsua_var.endpt, tdata, -1,
+						   im_data2, &typing_callback);
+		if (status == PJ_SUCCESS) {
+		    /* Done */
+		    return;
+		}
+	    }
+	}
+
+    }
+}
+
+
+/*
+ * Send instant messaging outside dialog, using the specified account for
+ * route set and authentication.
+ */
+PJ_DEF(pj_status_t) pjsua_im_send( pjsua_acc_id acc_id, 
+				   const pj_str_t *to,
+				   const pj_str_t *mime_type,
+				   const pj_str_t *content,
+				   const pjsua_msg_data *msg_data,
+				   void *user_data)
+{
+    pjsip_tx_data *tdata;
+    const pj_str_t mime_text_plain = pj_str("text/plain");
+    const pj_str_t STR_CONTACT = { "Contact", 7 };
+    pjsip_media_type media_type;
+    pjsua_im_data *im_data;
+    pj_str_t contact;
+    pj_status_t status;
+
+    /* To and message body must be specified. */
+    PJ_ASSERT_RETURN(to && content, PJ_EINVAL);
+
+    /* Create request. */
+    status = pjsip_endpt_create_request(pjsua_var.endpt, 
+					&pjsip_message_method, to, 
+					&pjsua_var.acc[acc_id].cfg.id,
+					to, NULL, NULL, -1, NULL, &tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create request", status);
+	return status;
+    }
+
+    /* If account is locked to specific transport, then set transport to
+     * the request.
+     */
+    if (pjsua_var.acc[acc_id].cfg.transport_id != PJSUA_INVALID_ID) {
+	pjsip_tpselector tp_sel;
+
+	pjsua_init_tpselector(pjsua_var.acc[acc_id].cfg.transport_id, &tp_sel);
+	pjsip_tx_data_set_transport(tdata, &tp_sel);
+    }
+
+    /* Add accept header. */
+    pjsip_msg_add_hdr( tdata->msg, 
+		       (pjsip_hdr*)pjsua_im_create_accept(tdata->pool));
+
+    /* Add contact. */
+    status = pjsua_acc_create_uac_contact(tdata->pool, &contact, acc_id, to);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to generate Contact header", status);
+	pjsip_tx_data_dec_ref(tdata);
+	return status;
+    }
+
+    pjsip_msg_add_hdr( tdata->msg, (pjsip_hdr*)
+	pjsip_generic_string_hdr_create(tdata->pool, 
+					&STR_CONTACT, &contact));
+
+    /* Create IM data to keep message details and give it back to
+     * application on the callback
+     */
+    im_data = pj_pool_zalloc(tdata->pool, sizeof(*im_data));
+    im_data->acc_id = acc_id;
+    im_data->call_id = PJSUA_INVALID_ID;
+    pj_strdup_with_null(tdata->pool, &im_data->to, to);
+    pj_strdup_with_null(tdata->pool, &im_data->body, content);
+    im_data->user_data = user_data;
+
+
+    /* Set default media type if none is specified */
+    if (mime_type == NULL) {
+	mime_type = &mime_text_plain;
+    }
+
+    /* Parse MIME type */
+    pjsua_parse_media_type(tdata->pool, mime_type, &media_type);
+
+    /* Add message body */
+    tdata->msg->body = pjsip_msg_body_create( tdata->pool, &media_type.type,
+					      &media_type.subtype, 
+					      &im_data->body);
+    if (tdata->msg->body == NULL) {
+	pjsua_perror(THIS_FILE, "Unable to create msg body", PJ_ENOMEM);
+	pjsip_tx_data_dec_ref(tdata);
+	return PJ_ENOMEM;
+    }
+
+    /* Add additional headers etc. */
+    pjsua_process_msg_data(tdata, msg_data);
+
+    /* Add route set */
+    pjsua_set_msg_route_set(tdata, &pjsua_var.acc[acc_id].route_set);
+
+    /* Send request (statefully) */
+    status = pjsip_endpt_send_request( pjsua_var.endpt, tdata, -1, 
+				       im_data, &im_callback);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to send request", status);
+	return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Send typing indication outside dialog.
+ */
+PJ_DEF(pj_status_t) pjsua_im_typing( pjsua_acc_id acc_id, 
+				     const pj_str_t *to, 
+				     pj_bool_t is_typing,
+				     const pjsua_msg_data *msg_data)
+{
+    const pj_str_t STR_CONTACT = { "Contact", 7 };
+    pjsua_im_data *im_data;
+    pjsip_tx_data *tdata;
+    pj_str_t contact;
+    pj_status_t status;
+
+    /* Create request. */
+    status = pjsip_endpt_create_request( pjsua_var.endpt, &pjsip_message_method,
+					 to, &pjsua_var.acc[acc_id].cfg.id,
+					 to, NULL, NULL, -1, NULL, &tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create request", status);
+	return status;
+    }
+
+
+    /* If account is locked to specific transport, then set transport to
+     * the request.
+     */
+    if (pjsua_var.acc[acc_id].cfg.transport_id != PJSUA_INVALID_ID) {
+	pjsip_tpselector tp_sel;
+
+	pjsua_init_tpselector(pjsua_var.acc[acc_id].cfg.transport_id, &tp_sel);
+	pjsip_tx_data_set_transport(tdata, &tp_sel);
+    }
+
+    /* Add accept header. */
+    pjsip_msg_add_hdr( tdata->msg, 
+		       (pjsip_hdr*)pjsua_im_create_accept(tdata->pool));
+
+
+    /* Add contact. */
+    status = pjsua_acc_create_uac_contact(tdata->pool, &contact, acc_id, to);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to generate Contact header", status);
+	pjsip_tx_data_dec_ref(tdata);
+	return status;
+    }
+
+    pjsip_msg_add_hdr( tdata->msg, (pjsip_hdr*)
+	pjsip_generic_string_hdr_create(tdata->pool, 
+					&STR_CONTACT, &contact));
+
+
+    /* Create "application/im-iscomposing+xml" msg body. */
+    tdata->msg->body = pjsip_iscomposing_create_body( tdata->pool, is_typing,
+						      NULL, NULL, -1);
+
+    /* Add additional headers etc. */
+    pjsua_process_msg_data(tdata, msg_data);
+
+    /* Add route set */
+    pjsua_set_msg_route_set(tdata, &pjsua_var.acc[acc_id].route_set);
+
+    /* Create data to reauthenticate */
+    im_data = pj_pool_zalloc(tdata->pool, sizeof(*im_data));
+    im_data->acc_id = acc_id;
+
+    /* Send request (statefully) */
+    status = pjsip_endpt_send_request( pjsua_var.endpt, tdata, -1, 
+				       im_data, &typing_callback);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to send request", status);
+	return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Init pjsua IM module.
+ */
+pj_status_t pjsua_im_init(void)
+{
+    const pj_str_t msg_tag = { "MESSAGE", 7 };
+    const pj_str_t STR_MIME_TEXT_PLAIN = { "text/plain", 10 };
+    const pj_str_t STR_MIME_APP_ISCOMPOSING = 
+		    { "application/im-iscomposing+xml", 30 };
+    pj_status_t status;
+
+    /* Register module */
+    status = pjsip_endpt_register_module(pjsua_var.endpt, &mod_pjsua_im);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Register support for MESSAGE method. */
+    pjsip_endpt_add_capability( pjsua_var.endpt, &mod_pjsua_im, PJSIP_H_ALLOW,
+				NULL, 1, &msg_tag);
+
+    /* Register support for "application/im-iscomposing+xml" content */
+    pjsip_endpt_add_capability( pjsua_var.endpt, &mod_pjsua_im, PJSIP_H_ACCEPT,
+				NULL, 1, &STR_MIME_APP_ISCOMPOSING);
+
+    /* Register support for "text/plain" content */
+    pjsip_endpt_add_capability( pjsua_var.endpt, &mod_pjsua_im, PJSIP_H_ACCEPT,
+				NULL, 1, &STR_MIME_TEXT_PLAIN);
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_media.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_media.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_media.c	(revision 1163)
@@ -0,0 +1,1805 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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-lib/pjsua.h>
+#include <pjsua-lib/pjsua_internal.h>
+
+
+#define THIS_FILE		"pjsua_media.c"
+
+#define PTIME		    20
+#define FPS		    (1000/PTIME)
+#define DEFAULT_RTP_PORT    4000
+
+/* Next RTP port to be used */
+static pj_uint16_t next_rtp_port;
+
+/* Close existing sound device */
+static void close_snd_dev(void);
+
+
+/**
+ * Init media subsystems.
+ */
+pj_status_t pjsua_media_subsys_init(const pjsua_media_config *cfg)
+{
+    pj_str_t codec_id;
+    unsigned opt;
+    pj_status_t status;
+
+    /* To suppress warning about unused var when all codecs are disabled */
+    PJ_UNUSED_ARG(codec_id);
+
+    /* Copy configuration */
+    pj_memcpy(&pjsua_var.media_cfg, cfg, sizeof(*cfg));
+
+    /* Normalize configuration */
+
+    if (pjsua_var.media_cfg.has_ioqueue &&
+	pjsua_var.media_cfg.thread_cnt == 0)
+    {
+	pjsua_var.media_cfg.thread_cnt = 1;
+    }
+
+    if (pjsua_var.media_cfg.max_media_ports < pjsua_var.ua_cfg.max_calls) {
+	pjsua_var.media_cfg.max_media_ports = pjsua_var.ua_cfg.max_calls + 2;
+    }
+
+    /* Create media endpoint. */
+    status = pjmedia_endpt_create(&pjsua_var.cp.factory, 
+				  pjsua_var.media_cfg.has_ioqueue? NULL :
+				     pjsip_endpt_get_ioqueue(pjsua_var.endpt),
+				  pjsua_var.media_cfg.thread_cnt,
+				  &pjsua_var.med_endpt);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, 
+		     "Media stack initialization has returned error", 
+		     status);
+	return status;
+    }
+
+    /* Register all codecs */
+#if PJMEDIA_HAS_SPEEX_CODEC
+    /* Register speex. */
+    status = pjmedia_codec_speex_init(pjsua_var.med_endpt, 
+				      0,
+				      pjsua_var.media_cfg.quality, 
+				      pjsua_var.media_cfg.quality);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error initializing Speex codec",
+		     status);
+	return status;
+    }
+
+    /* Set speex/16000 to higher priority*/
+    codec_id = pj_str("speex/16000");
+    pjmedia_codec_mgr_set_codec_priority( 
+	pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt),
+	&codec_id, PJMEDIA_CODEC_PRIO_NORMAL+2);
+
+    /* Set speex/8000 to next higher priority*/
+    codec_id = pj_str("speex/8000");
+    pjmedia_codec_mgr_set_codec_priority( 
+	pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt),
+	&codec_id, PJMEDIA_CODEC_PRIO_NORMAL+1);
+
+
+
+#endif /* PJMEDIA_HAS_SPEEX_CODEC */
+
+#if PJMEDIA_HAS_ILBC_CODEC
+    /* Register iLBC. */
+    status = pjmedia_codec_ilbc_init( pjsua_var.med_endpt, 
+				      pjsua_var.media_cfg.ilbc_mode);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error initializing iLBC codec",
+		     status);
+	return status;
+    }
+#endif /* PJMEDIA_HAS_ILBC_CODEC */
+
+#if PJMEDIA_HAS_GSM_CODEC
+    /* Register GSM */
+    status = pjmedia_codec_gsm_init(pjsua_var.med_endpt);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error initializing GSM codec",
+		     status);
+	return status;
+    }
+#endif /* PJMEDIA_HAS_GSM_CODEC */
+
+#if PJMEDIA_HAS_G711_CODEC
+    /* Register PCMA and PCMU */
+    status = pjmedia_codec_g711_init(pjsua_var.med_endpt);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error initializing G711 codec",
+		     status);
+	return status;
+    }
+#endif	/* PJMEDIA_HAS_G711_CODEC */
+
+#if PJMEDIA_HAS_L16_CODEC
+    /* Register L16 family codecs, but disable all */
+    status = pjmedia_codec_l16_init(pjsua_var.med_endpt, 0);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error initializing L16 codecs",
+		     status);
+	return status;
+    }
+
+    /* Disable ALL L16 codecs */
+    codec_id = pj_str("L16");
+    pjmedia_codec_mgr_set_codec_priority( 
+	pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt),
+	&codec_id, PJMEDIA_CODEC_PRIO_DISABLED);
+
+#endif	/* PJMEDIA_HAS_L16_CODEC */
+
+
+    /* Save additional conference bridge parameters for future
+     * reference.
+     */
+    pjsua_var.mconf_cfg.samples_per_frame = pjsua_var.media_cfg.clock_rate * 
+					    PTIME / 1000;
+    pjsua_var.mconf_cfg.channel_count = 1;
+    pjsua_var.mconf_cfg.bits_per_sample = 16;
+
+    /* Init options for conference bridge. */
+    opt = PJMEDIA_CONF_NO_DEVICE;
+    if (pjsua_var.media_cfg.quality >= 3 &&
+	pjsua_var.media_cfg.quality <= 4)
+    {
+	opt |= PJMEDIA_CONF_SMALL_FILTER;
+    }
+    else if (pjsua_var.media_cfg.quality < 3) {
+	opt |= PJMEDIA_CONF_USE_LINEAR;
+    }
+	
+
+    /* Init conference bridge. */
+    status = pjmedia_conf_create(pjsua_var.pool, 
+				 pjsua_var.media_cfg.max_media_ports,
+				 pjsua_var.media_cfg.clock_rate, 
+				 pjsua_var.mconf_cfg.channel_count,
+				 pjsua_var.mconf_cfg.samples_per_frame, 
+				 pjsua_var.mconf_cfg.bits_per_sample, 
+				 opt, &pjsua_var.mconf);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, 
+		     "Media stack initialization has returned error", 
+		     status);
+	return status;
+    }
+
+    /* Create null port just in case user wants to use null sound. */
+    status = pjmedia_null_port_create(pjsua_var.pool, 
+				      pjsua_var.media_cfg.clock_rate,
+				      pjsua_var.mconf_cfg.channel_count,
+				      pjsua_var.mconf_cfg.samples_per_frame,
+				      pjsua_var.mconf_cfg.bits_per_sample,
+				      &pjsua_var.null_port);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    return PJ_SUCCESS;
+}
+
+
+/* 
+ * Create RTP and RTCP socket pair, and possibly resolve their public
+ * address via STUN.
+ */
+static pj_status_t create_rtp_rtcp_sock(const pjsua_transport_config *cfg,
+					pjmedia_sock_info *skinfo)
+{
+    enum { 
+	RTP_RETRY = 100
+    };
+    int i;
+    pj_sockaddr_in bound_addr;
+    pj_sockaddr_in mapped_addr[2];
+    pj_status_t status = PJ_SUCCESS;
+    pj_sock_t sock[2];
+
+    /* Make sure STUN server resolution has completed */
+    status = pjsua_resolve_stun_server(PJ_TRUE);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error resolving STUN server", status);
+	return status;
+    }
+
+
+    if (next_rtp_port == 0)
+	next_rtp_port = (pj_uint16_t)cfg->port;
+
+    for (i=0; i<2; ++i)
+	sock[i] = PJ_INVALID_SOCKET;
+
+    bound_addr.sin_addr.s_addr = PJ_INADDR_ANY;
+    if (cfg->bound_addr.slen) {
+	status = pj_sockaddr_in_set_str_addr(&bound_addr, &cfg->bound_addr);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Unable to resolve transport bind address",
+			 status);
+	    return status;
+	}
+    }
+
+    /* Loop retry to bind RTP and RTCP sockets. */
+    for (i=0; i<RTP_RETRY; ++i, next_rtp_port += 2) {
+
+	/* Create and bind RTP socket. */
+	status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &sock[0]);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "socket() error", status);
+	    return status;
+	}
+
+	status = pj_sock_bind_in(sock[0], bound_addr.sin_addr.s_addr, 
+				 next_rtp_port);
+	if (status != PJ_SUCCESS) {
+	    pj_sock_close(sock[0]); 
+	    sock[0] = PJ_INVALID_SOCKET;
+	    continue;
+	}
+
+	/* Create and bind RTCP socket. */
+	status = pj_sock_socket(PJ_AF_INET, PJ_SOCK_DGRAM, 0, &sock[1]);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "socket() error", status);
+	    pj_sock_close(sock[0]);
+	    return status;
+	}
+
+	status = pj_sock_bind_in(sock[1], bound_addr.sin_addr.s_addr, 
+				 (pj_uint16_t)(next_rtp_port+1));
+	if (status != PJ_SUCCESS) {
+	    pj_sock_close(sock[0]); 
+	    sock[0] = PJ_INVALID_SOCKET;
+
+	    pj_sock_close(sock[1]); 
+	    sock[1] = PJ_INVALID_SOCKET;
+	    continue;
+	}
+
+	/*
+	 * If we're configured to use STUN, then find out the mapped address,
+	 * and make sure that the mapped RTCP port is adjacent with the RTP.
+	 */
+	if (pjsua_var.stun_srv.addr.sa_family != 0) {
+	    char ip_addr[32];
+	    pj_str_t stun_srv;
+
+	    pj_ansi_strcpy(ip_addr, 
+			   pj_inet_ntoa(pjsua_var.stun_srv.ipv4.sin_addr));
+	    stun_srv = pj_str(ip_addr);
+
+	    status=pjstun_get_mapped_addr(&pjsua_var.cp.factory, 2, sock,
+					   &stun_srv, 3478,
+					   &stun_srv, 3478,
+					   mapped_addr);
+	    if (status != PJ_SUCCESS) {
+		pjsua_perror(THIS_FILE, "STUN resolve error", status);
+		goto on_error;
+	    }
+
+	    if (pj_ntohs(mapped_addr[1].sin_port) == 
+		pj_ntohs(mapped_addr[0].sin_port)+1)
+	    {
+		/* Success! */
+		break;
+	    }
+
+	    pj_sock_close(sock[0]); 
+	    sock[0] = PJ_INVALID_SOCKET;
+
+	    pj_sock_close(sock[1]); 
+	    sock[1] = PJ_INVALID_SOCKET;
+
+	} else if (cfg->public_addr.slen) {
+
+	    status = pj_sockaddr_in_init(&mapped_addr[0], &cfg->public_addr,
+					 (pj_uint16_t)next_rtp_port);
+	    if (status != PJ_SUCCESS)
+		goto on_error;
+
+	    status = pj_sockaddr_in_init(&mapped_addr[1], &cfg->public_addr,
+					 (pj_uint16_t)(next_rtp_port+1));
+	    if (status != PJ_SUCCESS)
+		goto on_error;
+
+	    break;
+
+	} else {
+	    pj_in_addr addr;
+
+	    /* Get local IP address. */
+	    status = pj_gethostip(&addr);
+	    if (status != PJ_SUCCESS)
+		goto on_error;
+
+	    for (i=0; i<2; ++i)
+		mapped_addr[i].sin_addr = addr;
+
+	    mapped_addr[0].sin_port=pj_htons((pj_uint16_t)next_rtp_port);
+	    mapped_addr[1].sin_port=pj_htons((pj_uint16_t)(next_rtp_port+1));
+	    break;
+	}
+    }
+
+    if (sock[0] == PJ_INVALID_SOCKET) {
+	PJ_LOG(1,(THIS_FILE, 
+		  "Unable to find appropriate RTP/RTCP ports combination"));
+	goto on_error;
+    }
+
+
+    skinfo->rtp_sock = sock[0];
+    pj_memcpy(&skinfo->rtp_addr_name, 
+	      &mapped_addr[0], sizeof(pj_sockaddr_in));
+
+    skinfo->rtcp_sock = sock[1];
+    pj_memcpy(&skinfo->rtcp_addr_name, 
+	      &mapped_addr[1], sizeof(pj_sockaddr_in));
+
+    PJ_LOG(4,(THIS_FILE, "RTP socket reachable at %s:%d",
+	      pj_inet_ntoa(skinfo->rtp_addr_name.sin_addr), 
+	      pj_ntohs(skinfo->rtp_addr_name.sin_port)));
+    PJ_LOG(4,(THIS_FILE, "RTCP socket reachable at %s:%d",
+	      pj_inet_ntoa(skinfo->rtcp_addr_name.sin_addr), 
+	      pj_ntohs(skinfo->rtcp_addr_name.sin_port)));
+
+    next_rtp_port += 2;
+    return PJ_SUCCESS;
+
+on_error:
+    for (i=0; i<2; ++i) {
+	if (sock[i] != PJ_INVALID_SOCKET)
+	    pj_sock_close(sock[i]);
+    }
+    return status;
+}
+
+
+/*
+ * Start pjsua media subsystem.
+ */
+pj_status_t pjsua_media_subsys_start(void)
+{
+    pj_status_t status;
+
+    /* Create media for calls, if none is specified */
+    if (pjsua_var.calls[0].med_tp == NULL) {
+	pjsua_transport_config transport_cfg;
+
+	/* Create default transport config */
+	pjsua_transport_config_default(&transport_cfg);
+	transport_cfg.port = DEFAULT_RTP_PORT;
+
+	status = pjsua_media_transports_create(&transport_cfg);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    /* Create sound port if none is created yet */
+    if (pjsua_var.snd_port==NULL && pjsua_var.null_snd==NULL && 
+	!pjsua_var.no_snd) 
+    {
+	status = pjsua_set_snd_dev(pjsua_var.cap_dev, pjsua_var.play_dev);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Error opening sound device", status);
+	    return status;
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Destroy pjsua media subsystem.
+ */
+pj_status_t pjsua_media_subsys_destroy(void)
+{
+    unsigned i;
+
+    close_snd_dev();
+
+    if (pjsua_var.mconf) {
+	pjmedia_conf_destroy(pjsua_var.mconf);
+	pjsua_var.mconf = NULL;
+    }
+
+    if (pjsua_var.null_port) {
+	pjmedia_port_destroy(pjsua_var.null_port);
+	pjsua_var.null_port = NULL;
+    }
+
+    /* Destroy file players */
+    for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.player); ++i) {
+	if (pjsua_var.player[i].port) {
+	    pjmedia_port_destroy(pjsua_var.player[i].port);
+	    pjsua_var.player[i].port = NULL;
+	}
+    }
+
+    /* Destroy file recorders */
+    for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.recorder); ++i) {
+	if (pjsua_var.recorder[i].port) {
+	    pjmedia_port_destroy(pjsua_var.recorder[i].port);
+	    pjsua_var.recorder[i].port = NULL;
+	}
+    }
+
+    /* Close media transports */
+    for (i=0; i<pjsua_var.ua_cfg.max_calls; ++i) {
+	if (pjsua_var.calls[i].med_tp) {
+	    (*pjsua_var.calls[i].med_tp->op->destroy)(pjsua_var.calls[i].med_tp);
+	    pjsua_var.calls[i].med_tp = NULL;
+	}
+    }
+
+    /* Destroy media endpoint. */
+    if (pjsua_var.med_endpt) {
+
+	/* Shutdown all codecs: */
+#	if PJMEDIA_HAS_SPEEX_CODEC
+	    pjmedia_codec_speex_deinit();
+#	endif /* PJMEDIA_HAS_SPEEX_CODEC */
+
+#	if PJMEDIA_HAS_GSM_CODEC
+	    pjmedia_codec_gsm_deinit();
+#	endif /* PJMEDIA_HAS_GSM_CODEC */
+
+#	if PJMEDIA_HAS_G711_CODEC
+	    pjmedia_codec_g711_deinit();
+#	endif	/* PJMEDIA_HAS_G711_CODEC */
+
+#	if PJMEDIA_HAS_L16_CODEC
+	    pjmedia_codec_l16_deinit();
+#	endif	/* PJMEDIA_HAS_L16_CODEC */
+
+
+	pjmedia_endpt_destroy(pjsua_var.med_endpt);
+	pjsua_var.med_endpt = NULL;
+    }
+
+    /* Deinitialize sound subsystem */
+    pjmedia_snd_deinit();
+
+    /* Reset RTP port */
+    next_rtp_port = 0;
+
+    return PJ_SUCCESS;
+}
+
+
+/* Create normal UDP media transports */
+static pj_status_t create_udp_media_transports(pjsua_transport_config *cfg)
+{
+    unsigned i;
+    pjmedia_sock_info skinfo;
+    pj_status_t status;
+
+    /* Create each media transport */
+    for (i=0; i<pjsua_var.ua_cfg.max_calls; ++i) {
+
+	status = create_rtp_rtcp_sock(cfg, &skinfo);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Unable to create RTP/RTCP socket",
+		         status);
+	    goto on_error;
+	}
+	status = pjmedia_transport_udp_attach(pjsua_var.med_endpt, NULL,
+					      &skinfo, 0,
+					      &pjsua_var.calls[i].med_tp);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Unable to create media transport",
+		         status);
+	    goto on_error;
+	}
+
+	pjmedia_transport_udp_simulate_lost(pjsua_var.calls[i].med_tp,
+					    PJMEDIA_DIR_ENCODING,
+					    pjsua_var.media_cfg.tx_drop_pct);
+
+	pjmedia_transport_udp_simulate_lost(pjsua_var.calls[i].med_tp,
+					    PJMEDIA_DIR_DECODING,
+					    pjsua_var.media_cfg.rx_drop_pct);
+
+    }
+
+    return PJ_SUCCESS;
+
+on_error:
+    for (i=0; i<pjsua_var.ua_cfg.max_calls; ++i) {
+	if (pjsua_var.calls[i].med_tp != NULL) {
+	    pjmedia_transport_close(pjsua_var.calls[i].med_tp);
+	    pjsua_var.calls[i].med_tp = NULL;
+	}
+    }
+
+    return status;
+}
+
+
+/* Create ICE media transports (when ice is enabled) */
+static pj_status_t create_ice_media_transports(pjsua_transport_config *cfg)
+{
+    unsigned i;
+    pj_sockaddr_in addr;
+    pj_status_t status;
+
+    /* Make sure STUN server resolution has completed */
+    status = pjsua_resolve_stun_server(PJ_TRUE);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error resolving STUN server", status);
+	return status;
+    }
+
+    pj_sockaddr_in_init(&addr, 0, (pj_uint16_t)cfg->port);
+
+    /* Create each media transport */
+    for (i=0; i<pjsua_var.ua_cfg.max_calls; ++i) {
+	pj_ice_strans_comp comp;
+	int next_port;
+
+	status = pjmedia_ice_create(pjsua_var.med_endpt, NULL, 2,
+				    &pjsua_var.stun_cfg, 
+				    &pjsua_var.calls[i].med_tp);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Unable to create ICE media transport",
+		         status);
+	    goto on_error;
+	}
+
+	status = pjmedia_ice_start_init(pjsua_var.calls[i].med_tp, 0, &addr,
+				        &pjsua_var.stun_srv.ipv4, NULL);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Error starting ICE transport",
+		         status);
+	    goto on_error;
+	}
+
+	pjmedia_ice_get_comp(pjsua_var.calls[i].med_tp, 1, &comp);
+	next_port = pj_ntohs(comp.local_addr.ipv4.sin_port);
+	next_port += 2;
+	addr.sin_port = pj_htons((pj_uint16_t)next_port);
+    }
+
+    /* Wait until all ICE transports are ready */
+    for (i=0; i<pjsua_var.ua_cfg.max_calls; ++i) {
+
+	/* Wait until interface status is PJ_SUCCESS */
+	for (;;) {
+	    status = pjmedia_ice_get_init_status(pjsua_var.calls[i].med_tp);
+	    if (status == PJ_EPENDING)
+		pjsua_handle_events(100);
+	    else
+		break;
+	}
+
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, 
+			 "Error adding STUN address to ICE media transport",
+		         status);
+	    goto on_error;
+	}
+
+    }
+
+    return PJ_SUCCESS;
+
+on_error:
+    for (i=0; i<pjsua_var.ua_cfg.max_calls; ++i) {
+	if (pjsua_var.calls[i].med_tp != NULL) {
+	    pjmedia_transport_close(pjsua_var.calls[i].med_tp);
+	    pjsua_var.calls[i].med_tp = NULL;
+	}
+    }
+
+    return status;
+}
+
+
+/*
+ * Create UDP media transports for all the calls. This function creates
+ * one UDP media transport for each call.
+ */
+PJ_DEF(pj_status_t) 
+pjsua_media_transports_create(const pjsua_transport_config *app_cfg)
+{
+    pjsua_transport_config cfg;
+    unsigned i;
+    pj_status_t status;
+
+
+    /* Make sure pjsua_init() has been called */
+    PJ_ASSERT_RETURN(pjsua_var.ua_cfg.max_calls>0, PJ_EINVALIDOP);
+
+    PJSUA_LOCK();
+
+    /* Delete existing media transports */
+    for (i=0; i<pjsua_var.ua_cfg.max_calls; ++i) {
+	if (pjsua_var.calls[i].med_tp != NULL) {
+	    pjmedia_transport_close(pjsua_var.calls[i].med_tp);
+	    pjsua_var.calls[i].med_tp = NULL;
+	}
+    }
+
+    /* Copy config */
+    pjsua_transport_config_dup(pjsua_var.pool, &cfg, app_cfg);
+
+    if (pjsua_var.media_cfg.enable_ice) {
+	status = create_ice_media_transports(&cfg);
+    } else {
+	status = create_udp_media_transports(&cfg);
+    }
+
+
+    PJSUA_UNLOCK();
+
+    return status;
+}
+
+
+pj_status_t pjsua_media_channel_init(pjsua_call_id call_id,
+				     pjsip_role_e role)
+{
+    pjsua_call *call = &pjsua_var.calls[call_id];
+
+    if (pjsua_var.media_cfg.enable_ice) {
+	pj_ice_sess_role ice_role;
+	pj_status_t status;
+
+	ice_role = (role==PJSIP_ROLE_UAC ? PJ_ICE_SESS_ROLE_CONTROLLING : 
+				           PJ_ICE_SESS_ROLE_CONTROLLED);
+
+	/* Restart ICE */
+	pjmedia_ice_stop_ice(call->med_tp);
+
+	status = pjmedia_ice_init_ice(call->med_tp, ice_role, NULL, NULL);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+pj_status_t pjsua_media_channel_create_sdp(pjsua_call_id call_id, 
+					   pj_pool_t *pool,
+					   pjmedia_sdp_session **p_sdp)
+{
+    pjmedia_sdp_session *sdp;
+    pjmedia_sock_info skinfo;
+    pjsua_call *call = &pjsua_var.calls[call_id];
+    pj_status_t status;
+
+    /* Get media socket info */
+    pjmedia_transport_get_info(call->med_tp, &skinfo);
+
+    /* Create SDP */
+    status = pjmedia_endpt_create_sdp(pjsua_var.med_endpt, pool, 1,
+				      &skinfo, &sdp);
+    if (status != PJ_SUCCESS)
+	goto on_error;
+
+    if (pjsua_var.media_cfg.enable_ice) {
+	status = pjmedia_ice_modify_sdp(call->med_tp, pool, sdp);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+    }
+
+    *p_sdp = sdp;
+    return PJ_SUCCESS;
+
+on_error:
+    pjsua_media_channel_deinit(call_id);
+    return status;
+
+}
+
+
+static void stop_media_session(pjsua_call_id call_id)
+{
+    pjsua_call *call = &pjsua_var.calls[call_id];
+
+    if (call->conf_slot != PJSUA_INVALID_ID) {
+	pjmedia_conf_remove_port(pjsua_var.mconf, call->conf_slot);
+	call->conf_slot = PJSUA_INVALID_ID;
+    }
+
+    if (call->session) {
+	pjmedia_session_destroy(call->session);
+	call->session = NULL;
+
+	PJ_LOG(4,(THIS_FILE, "Media session for call %d is destroyed", 
+			     call_id));
+
+    }
+
+    call->media_st = PJSUA_CALL_MEDIA_NONE;
+}
+
+pj_status_t pjsua_media_channel_deinit(pjsua_call_id call_id)
+{
+    pjsua_call *call = &pjsua_var.calls[call_id];
+
+    stop_media_session(call_id);
+
+    if (pjsua_var.media_cfg.enable_ice) {
+	pjmedia_ice_stop_ice(call->med_tp);
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * DTMF callback from the stream.
+ */
+static void dtmf_callback(pjmedia_stream *strm, void *user_data,
+			  int digit)
+{
+    PJ_UNUSED_ARG(strm);
+
+    if (pjsua_var.ua_cfg.cb.on_dtmf_digit) {
+	pjsua_call_id call_id;
+
+	call_id = (pjsua_call_id)user_data;
+	pjsua_var.ua_cfg.cb.on_dtmf_digit(call_id, digit);
+    }
+}
+
+
+pj_status_t pjsua_media_channel_update(pjsua_call_id call_id,
+				       const pjmedia_sdp_session *local_sdp,
+				       const pjmedia_sdp_session *remote_sdp)
+{
+    int prev_media_st = 0;
+    pjsua_call *call = &pjsua_var.calls[call_id];
+    pjmedia_session_info sess_info;
+    pjmedia_port *media_port;
+    pj_str_t port_name;
+    char tmp[PJSIP_MAX_URL_SIZE];
+    pj_status_t status;
+
+    /* Destroy existing media session, if any. */
+    prev_media_st = call->media_st;
+    stop_media_session(call->index);
+
+    /* Create media session info based on SDP parameters. 
+     * We only support one stream per session at the moment
+     */    
+    status = pjmedia_session_info_from_sdp( call->inv->dlg->pool, 
+					    pjsua_var.med_endpt, 
+					    1,&sess_info, 
+					    local_sdp, remote_sdp);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    /* Check if media is put on-hold */
+    if (sess_info.stream_cnt == 0 || 
+	sess_info.stream_info[0].dir == PJMEDIA_DIR_NONE)
+    {
+
+	/* Determine who puts the call on-hold */
+	if (prev_media_st == PJSUA_CALL_MEDIA_ACTIVE) {
+	    if (pjmedia_sdp_neg_was_answer_remote(call->inv->neg)) {
+		/* It was local who offer hold */
+		call->media_st = PJSUA_CALL_MEDIA_LOCAL_HOLD;
+	    } else {
+		call->media_st = PJSUA_CALL_MEDIA_REMOTE_HOLD;
+	    }
+	}
+
+	call->media_dir = PJMEDIA_DIR_NONE;
+
+	/* Shutdown ICE session */
+	if (pjsua_var.media_cfg.enable_ice) {
+	    pjmedia_ice_stop_ice(call->med_tp);
+	}
+
+	/* No need because we need keepalive? */
+
+    } else {
+
+	/* Start ICE */
+	if (pjsua_var.media_cfg.enable_ice) {
+	    status = pjmedia_ice_start_ice(call->med_tp, call->inv->pool, 
+					   remote_sdp, 0);
+	    if (status != PJ_SUCCESS)
+		return status;
+	}
+
+	/* Override ptime, if this option is specified. */
+	if (pjsua_var.media_cfg.ptime != 0) {
+	    sess_info.stream_info[0].param->setting.frm_per_pkt = (pj_uint8_t)
+		(pjsua_var.media_cfg.ptime / sess_info.stream_info[0].param->info.frm_ptime);
+	    if (sess_info.stream_info[0].param->setting.frm_per_pkt == 0)
+		sess_info.stream_info[0].param->setting.frm_per_pkt = 1;
+	}
+
+	/* Disable VAD, if this option is specified. */
+	if (pjsua_var.media_cfg.no_vad) {
+	    sess_info.stream_info[0].param->setting.vad = 0;
+	}
+
+
+	/* Optionally, application may modify other stream settings here
+	 * (such as jitter buffer parameters, codec ptime, etc.)
+	 */
+	sess_info.stream_info[0].jb_init = pjsua_var.media_cfg.jb_init;
+	sess_info.stream_info[0].jb_min_pre = pjsua_var.media_cfg.jb_min_pre;
+	sess_info.stream_info[0].jb_max_pre = pjsua_var.media_cfg.jb_max_pre;
+	sess_info.stream_info[0].jb_max = pjsua_var.media_cfg.jb_max;
+
+	/* Create session based on session info. */
+	status = pjmedia_session_create( pjsua_var.med_endpt, &sess_info,
+					 &call->med_tp,
+					 call, &call->session );
+	if (status != PJ_SUCCESS) {
+	    return status;
+	}
+
+	/* If DTMF callback is installed by application, install our
+	 * callback to the session.
+	 */
+	if (pjsua_var.ua_cfg.cb.on_dtmf_digit) {
+	    pjmedia_session_set_dtmf_callback(call->session, 0, 
+					      &dtmf_callback, 
+					      (void*)(call->index));
+	}
+
+	/* Get the port interface of the first stream in the session.
+	 * We need the port interface to add to the conference bridge.
+	 */
+	pjmedia_session_get_port(call->session, 0, &media_port);
+
+
+	/*
+	 * Add the call to conference bridge.
+	 */
+	port_name.ptr = tmp;
+	port_name.slen = pjsip_uri_print(PJSIP_URI_IN_REQ_URI,
+					 call->inv->dlg->remote.info->uri,
+					 tmp, sizeof(tmp));
+	if (port_name.slen < 1) {
+	    port_name = pj_str("call");
+	}
+	status = pjmedia_conf_add_port( pjsua_var.mconf, call->inv->pool,
+					media_port, 
+					&port_name,
+					(unsigned*)&call->conf_slot);
+	if (status != PJ_SUCCESS) {
+	    return status;
+	}
+
+	/* Call's media state is active */
+	call->media_st = PJSUA_CALL_MEDIA_ACTIVE;
+	call->media_dir = sess_info.stream_info[0].dir;
+    }
+
+    /* Print info. */
+    {
+	char info[80];
+	int info_len = 0;
+	unsigned i;
+
+	for (i=0; i<sess_info.stream_cnt; ++i) {
+	    int len;
+	    const char *dir;
+	    pjmedia_stream_info *strm_info = &sess_info.stream_info[i];
+
+	    switch (strm_info->dir) {
+	    case PJMEDIA_DIR_NONE:
+		dir = "inactive";
+		break;
+	    case PJMEDIA_DIR_ENCODING:
+		dir = "sendonly";
+		break;
+	    case PJMEDIA_DIR_DECODING:
+		dir = "recvonly";
+		break;
+	    case PJMEDIA_DIR_ENCODING_DECODING:
+		dir = "sendrecv";
+		break;
+	    default:
+		dir = "unknown";
+		break;
+	    }
+	    len = pj_ansi_sprintf( info+info_len,
+				   ", stream #%d: %.*s (%s)", i,
+				   (int)strm_info->fmt.encoding_name.slen,
+				   strm_info->fmt.encoding_name.ptr,
+				   dir);
+	    if (len > 0)
+		info_len += len;
+	}
+	PJ_LOG(4,(THIS_FILE,"Media updates%s", info));
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get maxinum number of conference ports.
+ */
+PJ_DEF(unsigned) pjsua_conf_get_max_ports(void)
+{
+    return pjsua_var.media_cfg.max_media_ports;
+}
+
+
+/*
+ * Get current number of active ports in the bridge.
+ */
+PJ_DEF(unsigned) pjsua_conf_get_active_ports(void)
+{
+    unsigned ports[256];
+    unsigned count = PJ_ARRAY_SIZE(ports);
+    pj_status_t status;
+
+    status = pjmedia_conf_enum_ports(pjsua_var.mconf, ports, &count);
+    if (status != PJ_SUCCESS)
+	count = 0;
+
+    return count;
+}
+
+
+/*
+ * Enumerate all conference ports.
+ */
+PJ_DEF(pj_status_t) pjsua_enum_conf_ports(pjsua_conf_port_id id[],
+					  unsigned *count)
+{
+    return pjmedia_conf_enum_ports(pjsua_var.mconf, (unsigned*)id, count);
+}
+
+
+/*
+ * Get information about the specified conference port
+ */
+PJ_DEF(pj_status_t) pjsua_conf_get_port_info( pjsua_conf_port_id id,
+					      pjsua_conf_port_info *info)
+{
+    pjmedia_conf_port_info cinfo;
+    unsigned i;
+    pj_status_t status;
+
+    status = pjmedia_conf_get_port_info( pjsua_var.mconf, id, &cinfo);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    pj_bzero(info, sizeof(*info));
+    info->slot_id = id;
+    info->name = cinfo.name;
+    info->clock_rate = cinfo.clock_rate;
+    info->channel_count = cinfo.channel_count;
+    info->samples_per_frame = cinfo.samples_per_frame;
+    info->bits_per_sample = cinfo.bits_per_sample;
+
+    /* Build array of listeners */
+    info->listener_cnt = cinfo.listener_cnt;
+    for (i=0; i<cinfo.listener_cnt; ++i) {
+	info->listeners[i] = cinfo.listener_slots[i];
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Add arbitrary media port to PJSUA's conference bridge.
+ */
+PJ_DEF(pj_status_t) pjsua_conf_add_port( pj_pool_t *pool,
+					 pjmedia_port *port,
+					 pjsua_conf_port_id *p_id)
+{
+    pj_status_t status;
+
+    status = pjmedia_conf_add_port(pjsua_var.mconf, pool,
+				   port, NULL, (unsigned*)p_id);
+    if (status != PJ_SUCCESS) {
+	if (p_id)
+	    *p_id = PJSUA_INVALID_ID;
+    }
+
+    return status;
+}
+
+
+/*
+ * Remove arbitrary slot from the conference bridge.
+ */
+PJ_DEF(pj_status_t) pjsua_conf_remove_port(pjsua_conf_port_id id)
+{
+    return pjmedia_conf_remove_port(pjsua_var.mconf, (unsigned)id);
+}
+
+
+/*
+ * Establish unidirectional media flow from souce to sink. 
+ */
+PJ_DEF(pj_status_t) pjsua_conf_connect( pjsua_conf_port_id source,
+					pjsua_conf_port_id sink)
+{
+    return pjmedia_conf_connect_port(pjsua_var.mconf, source, sink, 0);
+}
+
+
+/*
+ * Disconnect media flow from the source to destination port.
+ */
+PJ_DEF(pj_status_t) pjsua_conf_disconnect( pjsua_conf_port_id source,
+					   pjsua_conf_port_id sink)
+{
+    return pjmedia_conf_disconnect_port(pjsua_var.mconf, source, sink);
+}
+
+
+/*
+ * Adjust the signal level to be transmitted from the bridge to the 
+ * specified port by making it louder or quieter.
+ */
+PJ_DEF(pj_status_t) pjsua_conf_adjust_tx_level(pjsua_conf_port_id slot,
+					       float level)
+{
+    return pjmedia_conf_adjust_tx_level(pjsua_var.mconf, slot,
+					(int)((level-1) * 128));
+}
+
+/*
+ * Adjust the signal level to be received from the specified port (to
+ * the bridge) by making it louder or quieter.
+ */
+PJ_DEF(pj_status_t) pjsua_conf_adjust_rx_level(pjsua_conf_port_id slot,
+					       float level)
+{
+    return pjmedia_conf_adjust_rx_level(pjsua_var.mconf, slot,
+					(int)((level-1) * 128));
+}
+
+
+/*
+ * Get last signal level transmitted to or received from the specified port.
+ */
+PJ_DEF(pj_status_t) pjsua_conf_get_signal_level(pjsua_conf_port_id slot,
+						unsigned *tx_level,
+						unsigned *rx_level)
+{
+    return pjmedia_conf_get_signal_level(pjsua_var.mconf, slot, 
+					 tx_level, rx_level);
+}
+
+/*****************************************************************************
+ * File player.
+ */
+
+/*
+ * Create a file player, and automatically connect this player to
+ * the conference bridge.
+ */
+PJ_DEF(pj_status_t) pjsua_player_create( const pj_str_t *filename,
+					 unsigned options,
+					 pjsua_player_id *p_id)
+{
+    unsigned slot, file_id;
+    char path[PJ_MAXPATH];
+    pjmedia_port *port;
+    pj_status_t status;
+
+    if (pjsua_var.player_cnt >= PJ_ARRAY_SIZE(pjsua_var.player))
+	return PJ_ETOOMANY;
+
+    PJSUA_LOCK();
+
+    for (file_id=0; file_id<PJ_ARRAY_SIZE(pjsua_var.player); ++file_id) {
+	if (pjsua_var.player[file_id].port == NULL)
+	    break;
+    }
+
+    if (file_id == PJ_ARRAY_SIZE(pjsua_var.player)) {
+	/* This is unexpected */
+	PJSUA_UNLOCK();
+	pj_assert(0);
+	return PJ_EBUG;
+    }
+
+    pj_memcpy(path, filename->ptr, filename->slen);
+    path[filename->slen] = '\0';
+    status = pjmedia_wav_player_port_create(pjsua_var.pool, path,
+					    pjsua_var.mconf_cfg.samples_per_frame *
+					      1000 / pjsua_var.media_cfg.clock_rate, 
+					    options, 0, &port);
+    if (status != PJ_SUCCESS) {
+	PJSUA_UNLOCK();
+	pjsua_perror(THIS_FILE, "Unable to open file for playback", status);
+	return status;
+    }
+
+    status = pjmedia_conf_add_port(pjsua_var.mconf, pjsua_var.pool, 
+				   port, filename, &slot);
+    if (status != PJ_SUCCESS) {
+	pjmedia_port_destroy(port);
+	PJSUA_UNLOCK();
+	pjsua_perror(THIS_FILE, "Unable to add file to conference bridge", 
+		     status);
+	return status;
+    }
+
+    pjsua_var.player[file_id].type = 0;
+    pjsua_var.player[file_id].port = port;
+    pjsua_var.player[file_id].slot = slot;
+
+    if (p_id) *p_id = file_id;
+
+    ++pjsua_var.player_cnt;
+
+    PJSUA_UNLOCK();
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Create a file playlist media port, and automatically add the port
+ * to the conference bridge.
+ */
+PJ_DEF(pj_status_t) pjsua_playlist_create( const pj_str_t file_names[],
+					   unsigned file_count,
+					   const pj_str_t *label,
+					   unsigned options,
+					   pjsua_player_id *p_id)
+{
+    unsigned slot, file_id, ptime;
+    pjmedia_port *port;
+    pj_status_t status;
+
+    if (pjsua_var.player_cnt >= PJ_ARRAY_SIZE(pjsua_var.player))
+	return PJ_ETOOMANY;
+
+    PJSUA_LOCK();
+
+    for (file_id=0; file_id<PJ_ARRAY_SIZE(pjsua_var.player); ++file_id) {
+	if (pjsua_var.player[file_id].port == NULL)
+	    break;
+    }
+
+    if (file_id == PJ_ARRAY_SIZE(pjsua_var.player)) {
+	/* This is unexpected */
+	PJSUA_UNLOCK();
+	pj_assert(0);
+	return PJ_EBUG;
+    }
+
+
+    ptime = pjsua_var.mconf_cfg.samples_per_frame * 1000 / 
+	    pjsua_var.media_cfg.clock_rate;
+
+    status = pjmedia_wav_playlist_create(pjsua_var.pool, label, 
+					 file_names, file_count,
+					 ptime, options, 0, &port);
+    if (status != PJ_SUCCESS) {
+	PJSUA_UNLOCK();
+	pjsua_perror(THIS_FILE, "Unable to create playlist", status);
+	return status;
+    }
+
+    status = pjmedia_conf_add_port(pjsua_var.mconf, pjsua_var.pool, 
+				   port, &port->info.name, &slot);
+    if (status != PJ_SUCCESS) {
+	pjmedia_port_destroy(port);
+	PJSUA_UNLOCK();
+	pjsua_perror(THIS_FILE, "Unable to add port", status);
+	return status;
+    }
+
+    pjsua_var.player[file_id].type = 1;
+    pjsua_var.player[file_id].port = port;
+    pjsua_var.player[file_id].slot = slot;
+
+    if (p_id) *p_id = file_id;
+
+    ++pjsua_var.player_cnt;
+
+    PJSUA_UNLOCK();
+    return PJ_SUCCESS;
+
+}
+
+
+/*
+ * Get conference port ID associated with player.
+ */
+PJ_DEF(pjsua_conf_port_id) pjsua_player_get_conf_port(pjsua_player_id id)
+{
+    PJ_ASSERT_RETURN(id>=0 && id<PJ_ARRAY_SIZE(pjsua_var.player), PJ_EINVAL);
+    PJ_ASSERT_RETURN(pjsua_var.player[id].port != NULL, PJ_EINVAL);
+
+    return pjsua_var.player[id].slot;
+}
+
+/*
+ * Get the media port for the player.
+ */
+PJ_DEF(pj_status_t) pjsua_player_get_port( pjsua_recorder_id id,
+					   pjmedia_port **p_port)
+{
+    PJ_ASSERT_RETURN(id>=0 && id<PJ_ARRAY_SIZE(pjsua_var.player), PJ_EINVAL);
+    PJ_ASSERT_RETURN(pjsua_var.player[id].port != NULL, PJ_EINVAL);
+    PJ_ASSERT_RETURN(p_port != NULL, PJ_EINVAL);
+    
+    *p_port = pjsua_var.player[id].port;
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Set playback position.
+ */
+PJ_DEF(pj_status_t) pjsua_player_set_pos( pjsua_player_id id,
+					  pj_uint32_t samples)
+{
+    PJ_ASSERT_RETURN(id>=0 && id<PJ_ARRAY_SIZE(pjsua_var.player), PJ_EINVAL);
+    PJ_ASSERT_RETURN(pjsua_var.player[id].port != NULL, PJ_EINVAL);
+    PJ_ASSERT_RETURN(pjsua_var.player[id].type == 0, PJ_EINVAL);
+
+    return pjmedia_wav_player_port_set_pos(pjsua_var.player[id].port, samples);
+}
+
+
+/*
+ * Close the file, remove the player from the bridge, and free
+ * resources associated with the file player.
+ */
+PJ_DEF(pj_status_t) pjsua_player_destroy(pjsua_player_id id)
+{
+    PJ_ASSERT_RETURN(id>=0 && id<PJ_ARRAY_SIZE(pjsua_var.player), PJ_EINVAL);
+    PJ_ASSERT_RETURN(pjsua_var.player[id].port != NULL, PJ_EINVAL);
+
+    PJSUA_LOCK();
+
+    if (pjsua_var.player[id].port) {
+	pjmedia_conf_remove_port(pjsua_var.mconf, 
+				 pjsua_var.player[id].slot);
+	pjmedia_port_destroy(pjsua_var.player[id].port);
+	pjsua_var.player[id].port = NULL;
+	pjsua_var.player[id].slot = 0xFFFF;
+	pjsua_var.player_cnt--;
+    }
+
+    PJSUA_UNLOCK();
+
+    return PJ_SUCCESS;
+}
+
+
+/*****************************************************************************
+ * File recorder.
+ */
+
+/*
+ * Create a file recorder, and automatically connect this recorder to
+ * the conference bridge.
+ */
+PJ_DEF(pj_status_t) pjsua_recorder_create( const pj_str_t *filename,
+					   unsigned enc_type,
+					   void *enc_param,
+					   pj_ssize_t max_size,
+					   unsigned options,
+					   pjsua_recorder_id *p_id)
+{
+    enum Format
+    {
+	FMT_UNKNOWN,
+	FMT_WAV,
+	FMT_MP3,
+    };
+    unsigned slot, file_id;
+    char path[PJ_MAXPATH];
+    pj_str_t ext;
+    int file_format;
+    pjmedia_port *port;
+    pj_status_t status;
+
+    /* Filename must present */
+    PJ_ASSERT_RETURN(filename != NULL, PJ_EINVAL);
+
+    /* Don't support max_size at present */
+    PJ_ASSERT_RETURN(max_size == 0 || max_size == -1, PJ_EINVAL);
+
+    /* Don't support encoding type at present */
+    PJ_ASSERT_RETURN(enc_type == 0, PJ_EINVAL);
+
+    if (pjsua_var.rec_cnt >= PJ_ARRAY_SIZE(pjsua_var.recorder))
+	return PJ_ETOOMANY;
+
+    /* Determine the file format */
+    ext.ptr = filename->ptr + filename->slen - 4;
+    ext.slen = 4;
+
+    if (pj_stricmp2(&ext, ".wav") == 0)
+	file_format = FMT_WAV;
+    else if (pj_stricmp2(&ext, ".mp3") == 0)
+	file_format = FMT_MP3;
+    else {
+	PJ_LOG(1,(THIS_FILE, "pjsua_recorder_create() error: unable to "
+			     "determine file format for %.*s",
+			     (int)filename->slen, filename->ptr));
+	return PJ_ENOTSUP;
+    }
+
+    PJSUA_LOCK();
+
+    for (file_id=0; file_id<PJ_ARRAY_SIZE(pjsua_var.recorder); ++file_id) {
+	if (pjsua_var.recorder[file_id].port == NULL)
+	    break;
+    }
+
+    if (file_id == PJ_ARRAY_SIZE(pjsua_var.recorder)) {
+	/* This is unexpected */
+	PJSUA_UNLOCK();
+	pj_assert(0);
+	return PJ_EBUG;
+    }
+
+    pj_memcpy(path, filename->ptr, filename->slen);
+    path[filename->slen] = '\0';
+
+    if (file_format == FMT_WAV) {
+	status = pjmedia_wav_writer_port_create(pjsua_var.pool, path, 
+						pjsua_var.media_cfg.clock_rate, 
+						pjsua_var.mconf_cfg.channel_count,
+						pjsua_var.mconf_cfg.samples_per_frame,
+						pjsua_var.mconf_cfg.bits_per_sample, 
+						options, 0, &port);
+    } else if (file_format == FMT_MP3) {
+	status = pjmedia_mp3_writer_port_create(pjsua_var.pool, path,
+						pjsua_var.media_cfg.clock_rate,
+						pjsua_var.mconf_cfg.channel_count,
+						pjsua_var.mconf_cfg.samples_per_frame,
+						pjsua_var.mconf_cfg.bits_per_sample,
+						enc_param, &port);
+    } else {
+	port = NULL;
+	status = PJ_ENOTSUP;
+    }
+
+    if (status != PJ_SUCCESS) {
+	PJSUA_UNLOCK();
+	pjsua_perror(THIS_FILE, "Unable to open file for recording", status);
+	return status;
+    }
+
+    status = pjmedia_conf_add_port(pjsua_var.mconf, pjsua_var.pool, 
+				   port, filename, &slot);
+    if (status != PJ_SUCCESS) {
+	pjmedia_port_destroy(port);
+	PJSUA_UNLOCK();
+	return status;
+    }
+
+    pjsua_var.recorder[file_id].port = port;
+    pjsua_var.recorder[file_id].slot = slot;
+
+    if (p_id) *p_id = file_id;
+
+    ++pjsua_var.rec_cnt;
+
+    PJSUA_UNLOCK();
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get conference port associated with recorder.
+ */
+PJ_DEF(pjsua_conf_port_id) pjsua_recorder_get_conf_port(pjsua_recorder_id id)
+{
+    PJ_ASSERT_RETURN(id>=0 && id<PJ_ARRAY_SIZE(pjsua_var.recorder), PJ_EINVAL);
+    PJ_ASSERT_RETURN(pjsua_var.recorder[id].port != NULL, PJ_EINVAL);
+
+    return pjsua_var.recorder[id].slot;
+}
+
+/*
+ * Get the media port for the recorder.
+ */
+PJ_DEF(pj_status_t) pjsua_recorder_get_port( pjsua_recorder_id id,
+					     pjmedia_port **p_port)
+{
+    PJ_ASSERT_RETURN(id>=0 && id<PJ_ARRAY_SIZE(pjsua_var.recorder), PJ_EINVAL);
+    PJ_ASSERT_RETURN(pjsua_var.recorder[id].port != NULL, PJ_EINVAL);
+    PJ_ASSERT_RETURN(p_port != NULL, PJ_EINVAL);
+
+    *p_port = pjsua_var.recorder[id].port;
+    return PJ_SUCCESS;
+}
+
+/*
+ * Destroy recorder (this will complete recording).
+ */
+PJ_DEF(pj_status_t) pjsua_recorder_destroy(pjsua_recorder_id id)
+{
+    PJ_ASSERT_RETURN(id>=0 && id<PJ_ARRAY_SIZE(pjsua_var.recorder), PJ_EINVAL);
+    PJ_ASSERT_RETURN(pjsua_var.recorder[id].port != NULL, PJ_EINVAL);
+
+    PJSUA_LOCK();
+
+    if (pjsua_var.recorder[id].port) {
+	pjmedia_conf_remove_port(pjsua_var.mconf, 
+				 pjsua_var.recorder[id].slot);
+	pjmedia_port_destroy(pjsua_var.recorder[id].port);
+	pjsua_var.recorder[id].port = NULL;
+	pjsua_var.recorder[id].slot = 0xFFFF;
+	pjsua_var.rec_cnt--;
+    }
+
+    PJSUA_UNLOCK();
+
+    return PJ_SUCCESS;
+}
+
+
+/*****************************************************************************
+ * Sound devices.
+ */
+
+/*
+ * Enum sound devices.
+ */
+PJ_DEF(pj_status_t) pjsua_enum_snd_devs( pjmedia_snd_dev_info info[],
+					 unsigned *count)
+{
+    unsigned i, dev_count;
+
+    dev_count = pjmedia_snd_get_dev_count();
+    
+    if (dev_count > *count) dev_count = *count;
+
+    for (i=0; i<dev_count; ++i) {
+	const pjmedia_snd_dev_info *ci;
+
+	ci = pjmedia_snd_get_dev_info(i);
+	pj_memcpy(&info[i], ci, sizeof(*ci));
+    }
+
+    *count = dev_count;
+
+    return PJ_SUCCESS;
+}
+
+
+/* Close existing sound device */
+static void close_snd_dev(void)
+{
+    /* Close sound device */
+    if (pjsua_var.snd_port) {
+	const pjmedia_snd_dev_info *cap_info, *play_info;
+
+	cap_info = pjmedia_snd_get_dev_info(pjsua_var.cap_dev);
+	play_info = pjmedia_snd_get_dev_info(pjsua_var.play_dev);
+
+	PJ_LOG(4,(THIS_FILE, "Closing %s sound playback device and "
+			     "%s sound capture device",
+			     play_info->name, cap_info->name));
+
+	pjmedia_snd_port_disconnect(pjsua_var.snd_port);
+	pjmedia_snd_port_destroy(pjsua_var.snd_port);
+	pjsua_var.snd_port = NULL;
+    }
+
+    /* Close null sound device */
+    if (pjsua_var.null_snd) {
+	PJ_LOG(4,(THIS_FILE, "Closing null sound device.."));
+	pjmedia_master_port_destroy(pjsua_var.null_snd, PJ_FALSE);
+	pjsua_var.null_snd = NULL;
+    }
+}
+
+/*
+ * Select or change sound device. Application may call this function at
+ * any time to replace current sound device.
+ */
+PJ_DEF(pj_status_t) pjsua_set_snd_dev( int capture_dev,
+				       int playback_dev)
+{
+    pjmedia_port *conf_port;
+    const pjmedia_snd_dev_info *play_info;
+    unsigned clock_rates[] = { 0, 22050, 44100, 48000, 11025, 32000, 8000};
+    unsigned selected_clock_rate = 0;
+    unsigned i;
+    pjmedia_snd_stream *strm;
+    pjmedia_snd_stream_info si;
+    pj_str_t tmp;
+    pj_status_t status = -1;
+
+    /* Close existing sound port */
+    close_snd_dev();
+
+
+    /* Set default clock rate */
+    clock_rates[0] = pjsua_var.media_cfg.clock_rate;
+
+    /* Attempts to open the sound device with different clock rates */
+    for (i=0; i<PJ_ARRAY_SIZE(clock_rates); ++i) {
+	char errmsg[PJ_ERR_MSG_SIZE];
+
+	PJ_LOG(4,(THIS_FILE, 
+		  "pjsua_set_snd_dev(): attempting to open devices "
+		  "@%d Hz", clock_rates[i]));
+
+	/* Create the sound device. Sound port will start immediately. */
+	status = pjmedia_snd_port_create(pjsua_var.pool, capture_dev,
+					 playback_dev, 
+					 clock_rates[i], 1,
+					 clock_rates[i]/FPS,
+					 16, 0, &pjsua_var.snd_port);
+
+	if (status == PJ_SUCCESS) {
+	    selected_clock_rate = clock_rates[i];
+	    break;
+	}
+
+	pj_strerror(status, errmsg, sizeof(errmsg));
+	PJ_LOG(4, (THIS_FILE, "..failed: %s", errmsg));
+    }
+
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to open sound device", status);
+	return status;
+    }
+
+    /* Get the port0 of the conference bridge. */
+    conf_port = pjmedia_conf_get_master_port(pjsua_var.mconf);
+    pj_assert(conf_port != NULL);
+
+    /* Set AEC */
+    pjmedia_snd_port_set_ec( pjsua_var.snd_port, pjsua_var.pool, 
+			     pjsua_var.media_cfg.ec_tail_len, 
+			     pjsua_var.media_cfg.ec_options);
+
+    /* If there's mismatch between sound port and conference's port,
+     * create a resample port to bridge them.
+     */
+    if (selected_clock_rate != pjsua_var.media_cfg.clock_rate) {
+	pjmedia_port *resample_port;
+
+	status = pjmedia_resample_port_create(pjsua_var.pool, conf_port, 
+					      selected_clock_rate, 0, 
+					      &resample_port);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror("Error creating resample port", THIS_FILE, status);
+	    return status;
+	}
+
+	conf_port = resample_port;
+    }
+
+    /* Connect sound port to the bridge */ 	 
+    status = pjmedia_snd_port_connect(pjsua_var.snd_port, 	 
+				      conf_port ); 	 
+    if (status != PJ_SUCCESS) { 	 
+	pjsua_perror(THIS_FILE, "Unable to connect conference port to "
+			        "sound device", status); 	 
+	pjmedia_snd_port_destroy(pjsua_var.snd_port); 	 
+	pjsua_var.snd_port = NULL; 	 
+	return status; 	 
+    }
+
+    /* Save the device IDs */
+    pjsua_var.cap_dev = capture_dev;
+    pjsua_var.play_dev = playback_dev;
+
+    /* Update sound device name. */
+    strm = pjmedia_snd_port_get_snd_stream(pjsua_var.snd_port);
+    pjmedia_snd_stream_get_info(strm, &si);
+    play_info = pjmedia_snd_get_dev_info(si.rec_id);
+
+    pjmedia_conf_set_port0_name(pjsua_var.mconf, 
+				pj_cstr(&tmp, play_info->name));
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get currently active sound devices. If sound devices has not been created
+ * (for example when pjsua_start() is not called), it is possible that
+ * the function returns PJ_SUCCESS with -1 as device IDs.
+ */
+PJ_DEF(pj_status_t) pjsua_get_snd_dev(int *capture_dev,
+				      int *playback_dev)
+{
+    if (capture_dev) {
+	*capture_dev = pjsua_var.cap_dev;
+    }
+    if (playback_dev) {
+	*playback_dev = pjsua_var.play_dev;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Use null sound device.
+ */
+PJ_DEF(pj_status_t) pjsua_set_null_snd_dev(void)
+{
+    pjmedia_port *conf_port;
+    pj_status_t status;
+
+    /* Close existing sound device */
+    close_snd_dev();
+
+    PJ_LOG(4,(THIS_FILE, "Opening null sound device.."));
+
+    /* Get the port0 of the conference bridge. */
+    conf_port = pjmedia_conf_get_master_port(pjsua_var.mconf);
+    pj_assert(conf_port != NULL);
+
+    /* Create master port, connecting port0 of the conference bridge to
+     * a null port.
+     */
+    status = pjmedia_master_port_create(pjsua_var.pool, pjsua_var.null_port,
+					conf_port, 0, &pjsua_var.null_snd);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create null sound device",
+		     status);
+	return status;
+    }
+
+    /* Start the master port */
+    status = pjmedia_master_port_start(pjsua_var.null_snd);
+    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+
+    return PJ_SUCCESS;
+}
+
+
+
+/*
+ * Use no device!
+ */
+PJ_DEF(pjmedia_port*) pjsua_set_no_snd_dev(void)
+{
+    /* Close existing sound device */
+    close_snd_dev();
+
+    pjsua_var.no_snd = PJ_TRUE;
+    return pjmedia_conf_get_master_port(pjsua_var.mconf);
+}
+
+
+/*
+ * Configure the AEC settings of the sound port.
+ */
+PJ_DEF(pj_status_t) pjsua_set_ec(unsigned tail_ms, unsigned options)
+{
+    pjsua_var.media_cfg.ec_tail_len = tail_ms;
+
+    if (pjsua_var.snd_port)
+	return pjmedia_snd_port_set_ec( pjsua_var.snd_port, pjsua_var.pool,
+					tail_ms, options);
+    
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Get current AEC tail length.
+ */
+PJ_DEF(pj_status_t) pjsua_get_ec_tail(unsigned *p_tail_ms)
+{
+    *p_tail_ms = pjsua_var.media_cfg.ec_tail_len;
+    return PJ_SUCCESS;
+}
+
+
+/*****************************************************************************
+ * Codecs.
+ */
+
+/*
+ * Enum all supported codecs in the system.
+ */
+PJ_DEF(pj_status_t) pjsua_enum_codecs( pjsua_codec_info id[],
+				       unsigned *p_count )
+{
+    pjmedia_codec_mgr *codec_mgr;
+    pjmedia_codec_info info[32];
+    unsigned i, count, prio[32];
+    pj_status_t status;
+
+    codec_mgr = pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt);
+    count = PJ_ARRAY_SIZE(info);
+    status = pjmedia_codec_mgr_enum_codecs( codec_mgr, &count, info, prio);
+    if (status != PJ_SUCCESS) {
+	*p_count = 0;
+	return status;
+    }
+
+    if (count > *p_count) count = *p_count;
+
+    for (i=0; i<count; ++i) {
+	pjmedia_codec_info_to_id(&info[i], id[i].buf_, sizeof(id[i].buf_));
+	id[i].codec_id = pj_str(id[i].buf_);
+	id[i].priority = (pj_uint8_t) prio[i];
+    }
+
+    *p_count = count;
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Change codec priority.
+ */
+PJ_DEF(pj_status_t) pjsua_codec_set_priority( const pj_str_t *codec_id,
+					      pj_uint8_t priority )
+{
+    pjmedia_codec_mgr *codec_mgr;
+
+    codec_mgr = pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt);
+
+    return pjmedia_codec_mgr_set_codec_priority(codec_mgr, codec_id, 
+					        priority);
+}
+
+
+/*
+ * Get codec parameters.
+ */
+PJ_DEF(pj_status_t) pjsua_codec_get_param( const pj_str_t *codec_id,
+					   pjmedia_codec_param *param )
+{
+    const pjmedia_codec_info *info;
+    pjmedia_codec_mgr *codec_mgr;
+    unsigned count = 1;
+    pj_status_t status;
+
+    codec_mgr = pjmedia_endpt_get_codec_mgr(pjsua_var.med_endpt);
+
+    status = pjmedia_codec_mgr_find_codecs_by_id(codec_mgr, codec_id,
+						 &count, &info, NULL);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    if (count != 1)
+	return PJ_ENOTFOUND;
+
+    status = pjmedia_codec_mgr_get_default_param( codec_mgr, info, param);
+    return status;
+}
+
+
+/*
+ * Set codec parameters.
+ */
+PJ_DEF(pj_status_t) pjsua_codec_set_param( const pj_str_t *id,
+					   const pjmedia_codec_param *param)
+{
+    PJ_UNUSED_ARG(id);
+    PJ_UNUSED_ARG(param);
+    PJ_TODO(set_codec_param);
+    return PJ_SUCCESS;
+}
Index: /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_pres.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_pres.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/pjsua-lib/pjsua_pres.c	(revision 1163)
@@ -0,0 +1,1201 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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-lib/pjsua.h>
+#include <pjsua-lib/pjsua_internal.h>
+
+
+#define THIS_FILE   "pjsua_pres.c"
+
+
+/*
+ * Get total number of buddies.
+ */
+PJ_DEF(unsigned) pjsua_get_buddy_count(void)
+{
+    return pjsua_var.buddy_cnt;
+}
+
+
+/*
+ * Check if buddy ID is valid.
+ */
+PJ_DEF(pj_bool_t) pjsua_buddy_is_valid(pjsua_buddy_id buddy_id)
+{
+    return buddy_id>=0 && buddy_id<PJ_ARRAY_SIZE(pjsua_var.buddy) &&
+	   pjsua_var.buddy[buddy_id].uri.slen != 0;
+}
+
+
+/*
+ * Enum buddy IDs.
+ */
+PJ_DEF(pj_status_t) pjsua_enum_buddies( pjsua_buddy_id ids[],
+					unsigned *count)
+{
+    unsigned i, c;
+
+    PJ_ASSERT_RETURN(ids && count, PJ_EINVAL);
+
+    PJSUA_LOCK();
+
+    for (i=0, c=0; c<*count && i<PJ_ARRAY_SIZE(pjsua_var.buddy); ++i) {
+	if (!pjsua_var.buddy[i].uri.slen)
+	    continue;
+	ids[c] = i;
+	++c;
+    }
+
+    *count = c;
+
+    PJSUA_UNLOCK();
+
+    return PJ_SUCCESS;
+
+}
+
+
+/*
+ * Get detailed buddy info.
+ */
+PJ_DEF(pj_status_t) pjsua_buddy_get_info( pjsua_buddy_id buddy_id,
+					  pjsua_buddy_info *info)
+{
+    int total=0;
+    pjsua_buddy *buddy;
+
+    PJ_ASSERT_RETURN(buddy_id>=0 && 
+		       buddy_id<(int)PJ_ARRAY_SIZE(pjsua_var.buddy), 
+		     PJ_EINVAL);
+
+    PJSUA_LOCK();
+
+    pj_bzero(info, sizeof(pjsua_buddy_info));
+
+    buddy = &pjsua_var.buddy[buddy_id];
+    info->id = buddy->index;
+    if (pjsua_var.buddy[buddy_id].uri.slen == 0) {
+	PJSUA_UNLOCK();
+	return PJ_SUCCESS;
+    }
+
+    /* uri */
+    info->uri.ptr = info->buf_ + total;
+    pj_strncpy(&info->uri, &buddy->uri, sizeof(info->buf_)-total);
+    total += info->uri.slen;
+
+    /* contact */
+    info->contact.ptr = info->buf_ + total;
+    pj_strncpy(&info->contact, &buddy->contact, sizeof(info->buf_)-total);
+    total += info->contact.slen;
+	
+    /* status and status text */    
+    if (buddy->sub == NULL || buddy->status.info_cnt==0) {
+	info->status = PJSUA_BUDDY_STATUS_UNKNOWN;
+	info->status_text = pj_str("?");
+    } else if (pjsua_var.buddy[buddy_id].status.info[0].basic_open) {
+	info->status = PJSUA_BUDDY_STATUS_ONLINE;
+	info->status_text = pj_str("Online");
+    } else {
+	info->status = PJSUA_BUDDY_STATUS_OFFLINE;
+	info->status_text = pj_str("Offline");
+    }
+
+    /* monitor pres */
+    info->monitor_pres = buddy->monitor;
+
+    PJSUA_UNLOCK();
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Reset buddy descriptor.
+ */
+static void reset_buddy(pjsua_buddy_id id)
+{
+    pj_bzero(&pjsua_var.buddy[id], sizeof(pjsua_var.buddy[id]));
+    pjsua_var.buddy[id].index = id;
+}
+
+
+/*
+ * Add new buddy.
+ */
+PJ_DEF(pj_status_t) pjsua_buddy_add( const pjsua_buddy_config *cfg,
+				     pjsua_buddy_id *p_buddy_id)
+{
+    pjsip_name_addr *url;
+    pjsip_sip_uri *sip_uri;
+    int index;
+    pj_str_t tmp;
+
+    PJ_ASSERT_RETURN(pjsua_var.buddy_cnt <= 
+			PJ_ARRAY_SIZE(pjsua_var.buddy),
+		     PJ_ETOOMANY);
+
+    PJSUA_LOCK();
+
+    /* Find empty slot */
+    for (index=0; index<PJ_ARRAY_SIZE(pjsua_var.buddy); ++index) {
+	if (pjsua_var.buddy[index].uri.slen == 0)
+	    break;
+    }
+
+    /* Expect to find an empty slot */
+    if (index == PJ_ARRAY_SIZE(pjsua_var.buddy)) {
+	PJSUA_UNLOCK();
+	/* This shouldn't happen */
+	pj_assert(!"index < PJ_ARRAY_SIZE(pjsua_var.buddy)");
+	return PJ_ETOOMANY;
+    }
+
+
+    /* Get name and display name for buddy */
+    pj_strdup_with_null(pjsua_var.pool, &tmp, &cfg->uri);
+    url = (pjsip_name_addr*)pjsip_parse_uri(pjsua_var.pool, tmp.ptr, tmp.slen,
+					    PJSIP_PARSE_URI_AS_NAMEADDR);
+
+    if (url == NULL) {
+	pjsua_perror(THIS_FILE, "Unable to add buddy", PJSIP_EINVALIDURI);
+	PJSUA_UNLOCK();
+	return PJSIP_EINVALIDURI;
+    }
+
+    /* Only support SIP schemes */
+    if (!PJSIP_URI_SCHEME_IS_SIP(url) && !PJSIP_URI_SCHEME_IS_SIPS(url))
+	return PJSIP_EINVALIDSCHEME;
+
+    /* Reset buddy, to make sure everything is cleared with default
+     * values
+     */
+    reset_buddy(index);
+
+    /* Save URI */
+    pjsua_var.buddy[index].uri = tmp;
+
+    sip_uri = (pjsip_sip_uri*) pjsip_uri_get_uri(url->uri);
+    pjsua_var.buddy[index].name = sip_uri->user;
+    pjsua_var.buddy[index].display = url->display;
+    pjsua_var.buddy[index].host = sip_uri->host;
+    pjsua_var.buddy[index].port = sip_uri->port;
+    pjsua_var.buddy[index].monitor = cfg->subscribe;
+    if (pjsua_var.buddy[index].port == 0)
+	pjsua_var.buddy[index].port = 5060;
+
+    if (p_buddy_id)
+	*p_buddy_id = index;
+
+    pjsua_var.buddy_cnt++;
+
+    pjsua_buddy_subscribe_pres(index, cfg->subscribe);
+
+    PJSUA_UNLOCK();
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Delete buddy.
+ */
+PJ_DEF(pj_status_t) pjsua_buddy_del(pjsua_buddy_id buddy_id)
+{
+    PJ_ASSERT_RETURN(buddy_id>=0 && 
+			buddy_id<(int)PJ_ARRAY_SIZE(pjsua_var.buddy),
+		     PJ_EINVAL);
+
+    PJSUA_LOCK();
+
+    if (pjsua_var.buddy[buddy_id].uri.slen == 0) {
+	PJSUA_UNLOCK();
+	return PJ_SUCCESS;
+    }
+
+    /* Unsubscribe presence */
+    pjsua_buddy_subscribe_pres(buddy_id, PJ_FALSE);
+
+    /* Remove buddy */
+    pjsua_var.buddy[buddy_id].uri.slen = 0;
+    pjsua_var.buddy_cnt--;
+
+    /* Reset buddy struct */
+    reset_buddy(buddy_id);
+
+    PJSUA_UNLOCK();
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Enable/disable buddy's presence monitoring.
+ */
+PJ_DEF(pj_status_t) pjsua_buddy_subscribe_pres( pjsua_buddy_id buddy_id,
+						pj_bool_t subscribe)
+{
+    pjsua_buddy *buddy;
+
+    PJ_ASSERT_RETURN(buddy_id>=0 && 
+			buddy_id<(int)PJ_ARRAY_SIZE(pjsua_var.buddy),
+		     PJ_EINVAL);
+
+    PJSUA_LOCK();
+
+    buddy = &pjsua_var.buddy[buddy_id];
+    buddy->monitor = subscribe;
+    pjsua_pres_refresh();
+
+    PJSUA_UNLOCK();
+
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Dump presence subscriptions to log file.
+ */
+PJ_DEF(void) pjsua_pres_dump(pj_bool_t verbose)
+{
+    unsigned acc_id;
+    unsigned i;
+
+    
+    PJSUA_LOCK();
+
+    /*
+     * When no detail is required, just dump number of server and client
+     * subscriptions.
+     */
+    if (verbose == PJ_FALSE) {
+	
+	int count = 0;
+
+	for (acc_id=0; acc_id<PJ_ARRAY_SIZE(pjsua_var.acc); ++acc_id) {
+
+	    if (!pjsua_var.acc[acc_id].valid)
+		continue;
+
+	    if (!pj_list_empty(&pjsua_var.acc[acc_id].pres_srv_list)) {
+		struct pjsua_srv_pres *uapres;
+
+		uapres = pjsua_var.acc[acc_id].pres_srv_list.next;
+		while (uapres != &pjsua_var.acc[acc_id].pres_srv_list) {
+		    ++count;
+		    uapres = uapres->next;
+		}
+	    }
+	}
+
+	PJ_LOG(3,(THIS_FILE, "Number of server/UAS subscriptions: %d", 
+		  count));
+
+	count = 0;
+
+	for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.buddy); ++i) {
+	    if (pjsua_var.buddy[i].uri.slen == 0)
+		continue;
+	    if (pjsua_var.buddy[i].sub) {
+		++count;
+	    }
+	}
+
+	PJ_LOG(3,(THIS_FILE, "Number of client/UAC subscriptions: %d", 
+		  count));
+	PJSUA_UNLOCK();
+	return;
+    }
+    
+
+    /*
+     * Dumping all server (UAS) subscriptions
+     */
+    PJ_LOG(3,(THIS_FILE, "Dumping pjsua server subscriptions:"));
+
+    for (acc_id=0; acc_id<(int)PJ_ARRAY_SIZE(pjsua_var.acc); ++acc_id) {
+
+	if (!pjsua_var.acc[acc_id].valid)
+	    continue;
+
+	PJ_LOG(3,(THIS_FILE, "  %.*s",
+		  (int)pjsua_var.acc[acc_id].cfg.id.slen,
+		  pjsua_var.acc[acc_id].cfg.id.ptr));
+
+	if (pj_list_empty(&pjsua_var.acc[acc_id].pres_srv_list)) {
+
+	    PJ_LOG(3,(THIS_FILE, "  - none - "));
+
+	} else {
+	    struct pjsua_srv_pres *uapres;
+
+	    uapres = pjsua_var.acc[acc_id].pres_srv_list.next;
+	    while (uapres != &pjsua_var.acc[acc_id].pres_srv_list) {
+	    
+		PJ_LOG(3,(THIS_FILE, "    %10s %s",
+			  pjsip_evsub_get_state_name(uapres->sub),
+			  uapres->remote));
+
+		uapres = uapres->next;
+	    }
+	}
+    }
+
+    /*
+     * Dumping all client (UAC) subscriptions
+     */
+    PJ_LOG(3,(THIS_FILE, "Dumping pjsua client subscriptions:"));
+
+    if (pjsua_var.buddy_cnt == 0) {
+
+	PJ_LOG(3,(THIS_FILE, "  - no buddy list - "));
+
+    } else {
+	for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.buddy); ++i) {
+
+	    if (pjsua_var.buddy[i].uri.slen == 0)
+		continue;
+
+	    if (pjsua_var.buddy[i].sub) {
+		PJ_LOG(3,(THIS_FILE, "  %10s %.*s",
+			  pjsip_evsub_get_state_name(pjsua_var.buddy[i].sub),
+			  (int)pjsua_var.buddy[i].uri.slen,
+			  pjsua_var.buddy[i].uri.ptr));
+	    } else {
+		PJ_LOG(3,(THIS_FILE, "  %10s %.*s",
+			  "(null)",
+			  (int)pjsua_var.buddy[i].uri.slen,
+			  pjsua_var.buddy[i].uri.ptr));
+	    }
+	}
+    }
+
+    PJSUA_UNLOCK();
+}
+
+
+/***************************************************************************
+ * Server subscription.
+ */
+
+/* Proto */
+static pj_bool_t pres_on_rx_request(pjsip_rx_data *rdata);
+
+/* The module instance. */
+static pjsip_module mod_pjsua_pres = 
+{
+    NULL, NULL,				/* prev, next.		*/
+    { "mod-pjsua-pres", 14 },		/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION,	/* Priority	        */
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    &pres_on_rx_request,		/* on_rx_request()	*/
+    NULL,				/* on_rx_response()	*/
+    NULL,				/* on_tx_request.	*/
+    NULL,				/* on_tx_response()	*/
+    NULL,				/* on_tsx_state()	*/
+
+};
+
+
+/* Callback called when *server* subscription state has changed. */
+static void pres_evsub_on_srv_state( pjsip_evsub *sub, pjsip_event *event)
+{
+    pjsua_srv_pres *uapres;
+
+    PJ_UNUSED_ARG(event);
+
+    PJSUA_LOCK();
+
+    uapres = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id);
+    if (uapres) {
+	PJ_LOG(3,(THIS_FILE, "Server subscription to %s is %s",
+		  uapres->remote, pjsip_evsub_get_state_name(sub)));
+
+	if (pjsip_evsub_get_state(sub) == PJSIP_EVSUB_STATE_TERMINATED) {
+	    pjsip_evsub_set_mod_data(sub, pjsua_var.mod.id, NULL);
+	    pj_list_erase(uapres);
+	}
+    }
+
+    PJSUA_UNLOCK();
+}
+
+/* This is called when request is received. 
+ * We need to check for incoming SUBSCRIBE request.
+ */
+static pj_bool_t pres_on_rx_request(pjsip_rx_data *rdata)
+{
+    int acc_id;
+    pjsua_acc *acc;
+    pj_str_t contact;
+    pjsip_method *req_method = &rdata->msg_info.msg->line.req.method;
+    pjsua_srv_pres *uapres;
+    pjsip_evsub *sub;
+    pjsip_evsub_user pres_cb;
+    pjsip_tx_data *tdata;
+    pjsip_pres_status pres_status;
+    pjsip_dialog *dlg;
+    pj_status_t status;
+
+    if (pjsip_method_cmp(req_method, &pjsip_subscribe_method) != 0)
+	return PJ_FALSE;
+
+    /* Incoming SUBSCRIBE: */
+
+    PJSUA_LOCK();
+
+    /* Find which account for the incoming request. */
+    acc_id = pjsua_acc_find_for_incoming(rdata);
+    acc = &pjsua_var.acc[acc_id];
+
+    PJ_LOG(4,(THIS_FILE, "Creating server subscription, using account %d",
+	      acc_id));
+    
+    /* Create suitable Contact header */
+    status = pjsua_acc_create_uas_contact(rdata->tp_info.pool, &contact,
+					  acc_id, rdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to generate Contact header", status);
+	PJSUA_UNLOCK();
+	return PJ_TRUE;
+    }
+
+    /* Create UAS dialog: */
+    status = pjsip_dlg_create_uas(pjsip_ua_instance(), rdata, 
+				  &contact, &dlg);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, 
+		     "Unable to create UAS dialog for subscription", 
+		     status);
+	PJSUA_UNLOCK();
+	return PJ_TRUE;
+    }
+
+    /* Set credentials. */
+    pjsip_auth_clt_set_credentials(&dlg->auth_sess, acc->cred_cnt, acc->cred);
+
+    /* Init callback: */
+    pj_bzero(&pres_cb, sizeof(pres_cb));
+    pres_cb.on_evsub_state = &pres_evsub_on_srv_state;
+
+    /* Create server presence subscription: */
+    status = pjsip_pres_create_uas( dlg, &pres_cb, rdata, &sub);
+    if (status != PJ_SUCCESS) {
+	pjsip_dlg_terminate(dlg);
+	pjsua_perror(THIS_FILE, "Unable to create server subscription", 
+		     status);
+	PJSUA_UNLOCK();
+	return PJ_TRUE;
+    }
+
+    /* If account is locked to specific transport, then lock dialog
+     * to this transport too.
+     */
+    if (acc->cfg.transport_id != PJSUA_INVALID_ID) {
+	pjsip_tpselector tp_sel;
+
+	pjsua_init_tpselector(acc->cfg.transport_id, &tp_sel);
+	pjsip_dlg_set_transport(dlg, &tp_sel);
+    }
+
+    /* Attach our data to the subscription: */
+    uapres = pj_pool_alloc(dlg->pool, sizeof(pjsua_srv_pres));
+    uapres->sub = sub;
+    uapres->remote = pj_pool_alloc(dlg->pool, PJSIP_MAX_URL_SIZE);
+    status = pjsip_uri_print(PJSIP_URI_IN_REQ_URI, dlg->remote.info->uri,
+			     uapres->remote, PJSIP_MAX_URL_SIZE);
+    if (status < 1)
+	pj_ansi_strcpy(uapres->remote, "<-- url is too long-->");
+    else
+	uapres->remote[status] = '\0';
+
+    pjsip_evsub_set_mod_data(sub, pjsua_var.mod.id, uapres);
+
+    /* Add server subscription to the list: */
+    pj_list_push_back(&pjsua_var.acc[acc_id].pres_srv_list, uapres);
+
+
+    /* Create and send 200 (OK) to the SUBSCRIBE request: */
+    status = pjsip_pres_accept(sub, rdata, 200, NULL);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to accept presence subscription", 
+		     status);
+	pj_list_erase(uapres);
+	pjsip_pres_terminate(sub, PJ_FALSE);
+	PJSUA_UNLOCK();
+	return PJ_FALSE;
+    }
+
+
+    /* Set our online status: */
+    pj_bzero(&pres_status, sizeof(pres_status));
+    pres_status.info_cnt = 1;
+    pres_status.info[0].basic_open = pjsua_var.acc[acc_id].online_status;
+    //Both pjsua_var.local_uri and pjsua_var.contact_uri are enclosed in "<" and ">"
+    //causing XML parsing to fail.
+    //pres_status.info[0].contact = pjsua_var.local_uri;
+
+    pjsip_pres_set_status(sub, &pres_status);
+
+    /* Create and send the first NOTIFY to active subscription: */
+    status = pjsip_pres_notify( sub, PJSIP_EVSUB_STATE_ACTIVE, NULL,
+			        NULL, &tdata);
+    if (status == PJ_SUCCESS) {
+	pjsua_process_msg_data(tdata, NULL);
+	status = pjsip_pres_send_request( sub, tdata);
+    }
+
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create/send NOTIFY", 
+		     status);
+	pj_list_erase(uapres);
+	pjsip_pres_terminate(sub, PJ_FALSE);
+	PJSUA_UNLOCK();
+	return PJ_FALSE;
+    }
+
+
+    /* Done: */
+
+    PJSUA_UNLOCK();
+
+    return PJ_TRUE;
+}
+
+
+/*
+ * Client presence publication callback.
+ */
+static void publish_cb(struct pjsip_publishc_cbparam *param)
+{
+    pjsua_acc *acc = param->token;
+
+    if (param->code/100 != 2 || param->status != PJ_SUCCESS) {
+	if (param->status != PJ_SUCCESS) {
+	    char errmsg[PJ_ERR_MSG_SIZE];
+
+	    pj_strerror(param->status, errmsg, sizeof(errmsg));
+	    PJ_LOG(1,(THIS_FILE, 
+		      "Client publication (PUBLISH) failed, status=%d, msg=%s",
+		       param->status, errmsg));
+	} else {
+	    PJ_LOG(1,(THIS_FILE, 
+		      "Client publication (PUBLISH) failed (%d/%.*s)",
+		       param->code, (int)param->reason.slen,
+		       param->reason.ptr));
+	}
+
+	pjsip_publishc_destroy(param->pubc);
+	acc->publish_sess = NULL;
+    }
+}
+
+
+/*
+ * Send PUBLISH request.
+ */
+static pj_status_t send_publish(int acc_id, pj_bool_t active)
+{
+    pjsua_acc_config *acc_cfg = &pjsua_var.acc[acc_id].cfg;
+    pjsua_acc *acc = &pjsua_var.acc[acc_id];
+    pjsip_pres_status pres_status;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+
+    /* Create PUBLISH request */
+    if (active) {
+	char *bpos;
+	pj_str_t entity;
+
+	status = pjsip_publishc_publish(acc->publish_sess, PJ_TRUE, &tdata);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Error creating PUBLISH request", status);
+	    goto on_error;
+	}
+
+	/* Set our online status: */
+	pj_bzero(&pres_status, sizeof(pres_status));
+	pres_status.info_cnt = 1;
+	pres_status.info[0].basic_open = acc->online_status;
+
+	/* Be careful not to send PIDF with presence entity ID containing
+	 * "<" character.
+	 */
+	if ((bpos=pj_strchr(&acc_cfg->id, '<')) != NULL) {
+	    char *epos = pj_strchr(&acc_cfg->id, '>');
+	    if (epos - bpos < 2) {
+		pj_assert(!"Unexpected invalid URI");
+		status = PJSIP_EINVALIDURI;
+		goto on_error;
+	    }
+	    entity.ptr = bpos+1;
+	    entity.slen = epos - bpos - 1;
+	} else {
+	    entity = acc_cfg->id;
+	}
+
+	/* Create and add PIDF message body */
+	status = pjsip_pres_create_pidf(tdata->pool, &pres_status,
+					&entity, &tdata->msg->body);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Error creating PIDF for PUBLISH request",
+			 status);
+	    pjsip_tx_data_dec_ref(tdata);
+	    goto on_error;
+	}
+    } else {
+	status = pjsip_publishc_unpublish(acc->publish_sess, &tdata);
+	if (status != PJ_SUCCESS) {
+	    pjsua_perror(THIS_FILE, "Error creating PUBLISH request", status);
+	    goto on_error;
+	}
+    }
+
+    /* Add headers etc */
+    pjsua_process_msg_data(tdata, NULL);
+
+    /* Send the PUBLISH request */
+    status = pjsip_publishc_send(acc->publish_sess, tdata);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error sending PUBLISH request", status);
+	goto on_error;
+    }
+
+    acc->publish_state = acc->online_status;
+    return PJ_SUCCESS;
+
+on_error:
+    pjsip_publishc_destroy(acc->publish_sess);
+    acc->publish_sess = NULL;
+    return status;
+}
+
+
+/* Create client publish session */
+pj_status_t pjsua_pres_init_publish_acc(int acc_id)
+{
+    const pj_str_t STR_PRESENCE = { "presence", 8 };
+    pjsua_acc_config *acc_cfg = &pjsua_var.acc[acc_id].cfg;
+    pjsua_acc *acc = &pjsua_var.acc[acc_id];
+    pj_status_t status;
+
+    /* Create and init client publication session */
+    if (acc_cfg->publish_enabled) {
+
+	/* Create client publication */
+	status = pjsip_publishc_create(pjsua_var.endpt, 0, acc, &publish_cb,
+				       &acc->publish_sess);
+	if (status != PJ_SUCCESS) {
+	    acc->publish_sess = NULL;
+	    return status;
+	}
+
+	/* Initialize client publication */
+	status = pjsip_publishc_init(acc->publish_sess, &STR_PRESENCE,
+				     &acc_cfg->id, &acc_cfg->id,
+				     &acc_cfg->id, 
+				     60);
+	if (status != PJ_SUCCESS) {
+	    acc->publish_sess = NULL;
+	    return status;
+	}
+
+	/* Add credential for authentication */
+	pjsip_publishc_set_credentials(acc->publish_sess, acc->cred_cnt, 
+				       acc->cred);
+
+	/* Set route-set */
+	pjsip_publishc_set_route_set(acc->publish_sess, &acc->route_set);
+
+	/* Send initial PUBLISH request */
+	if (acc->online_status != 0) {
+	    status = send_publish(acc_id, PJ_TRUE);
+	    if (status != PJ_SUCCESS)
+		return status;
+	}
+
+    } else {
+	acc->publish_sess = NULL;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+/* Init presence for account */
+pj_status_t pjsua_pres_init_acc(int acc_id)
+{
+    pjsua_acc *acc = &pjsua_var.acc[acc_id];
+
+    /* Init presence subscription */
+    pj_list_init(&acc->pres_srv_list);
+
+    return PJ_SUCCESS;
+}
+
+
+/* Terminate server subscription for the account */
+void pjsua_pres_delete_acc(int acc_id)
+{
+    pjsua_acc *acc = &pjsua_var.acc[acc_id];
+    pjsua_acc_config *acc_cfg = &pjsua_var.acc[acc_id].cfg;
+    pjsua_srv_pres *uapres;
+
+    uapres = pjsua_var.acc[acc_id].pres_srv_list.next;
+
+    /* Notify all subscribers that we're no longer available */
+    while (uapres != &acc->pres_srv_list) {
+	
+	pjsip_pres_status pres_status;
+	pj_str_t reason = { "noresource", 10 };
+	pjsip_tx_data *tdata;
+
+	pjsip_pres_get_status(uapres->sub, &pres_status);
+	
+	pres_status.info[0].basic_open = pjsua_var.acc[acc_id].online_status;
+	pjsip_pres_set_status(uapres->sub, &pres_status);
+
+	if (pjsip_pres_notify(uapres->sub, 
+			      PJSIP_EVSUB_STATE_TERMINATED, NULL,
+			      &reason, &tdata)==PJ_SUCCESS)
+	{
+	    pjsip_pres_send_request(uapres->sub, tdata);
+	}
+
+	uapres = uapres->next;
+    }
+
+    /* Clear server presence subscription list because account might be reused
+     * later. */
+    pj_list_init(&acc->pres_srv_list);
+
+    /* Terminate presence publication, if any */
+    if (acc->publish_sess) {
+	acc->online_status = PJ_FALSE;
+	send_publish(acc_id, PJ_FALSE);
+	if (acc->publish_sess) {
+	    pjsip_publishc_destroy(acc->publish_sess);
+	    acc->publish_sess = NULL;
+	}
+	acc_cfg->publish_enabled = PJ_FALSE;
+    }
+}
+
+
+/* Refresh subscription (e.g. when our online status has changed) */
+static void refresh_server_subscription(int acc_id)
+{
+    pjsua_acc *acc = &pjsua_var.acc[acc_id];
+    pjsua_acc_config *acc_cfg = &pjsua_var.acc[acc_id].cfg;
+    pjsua_srv_pres *uapres;
+
+    uapres = pjsua_var.acc[acc_id].pres_srv_list.next;
+
+    while (uapres != &acc->pres_srv_list) {
+	
+	pjsip_pres_status pres_status;
+	pjsip_tx_data *tdata;
+
+	pjsip_pres_get_status(uapres->sub, &pres_status);
+	if (pres_status.info[0].basic_open != acc->online_status) {
+	    pres_status.info[0].basic_open = acc->online_status;
+	    pjsip_pres_set_status(uapres->sub, &pres_status);
+
+	    if (pjsip_pres_current_notify(uapres->sub, &tdata)==PJ_SUCCESS) {
+		pjsua_process_msg_data(tdata, NULL);
+		pjsip_pres_send_request(uapres->sub, tdata);
+	    }
+	}
+
+	uapres = uapres->next;
+    }
+
+    /* Send PUBLISH if required. We only do this when we have a PUBLISH
+     * session. If we don't have a PUBLISH session, then it could be
+     * that we're waiting until registration has completed before we
+     * send the first PUBLISH. 
+     */
+    if (acc_cfg->publish_enabled && acc->publish_sess) {
+	if (acc->publish_state != acc->online_status) {
+	    send_publish(acc_id, PJ_TRUE);
+	}
+    }
+}
+
+
+
+/***************************************************************************
+ * Client subscription.
+ */
+
+/* Callback called when *client* subscription state has changed. */
+static void pjsua_evsub_on_state( pjsip_evsub *sub, pjsip_event *event)
+{
+    pjsua_buddy *buddy;
+
+    PJ_UNUSED_ARG(event);
+
+    PJSUA_LOCK();
+
+    buddy = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id);
+    if (buddy) {
+	PJ_LOG(3,(THIS_FILE, 
+		  "Presence subscription to %.*s is %s",
+		  (int)pjsua_var.buddy[buddy->index].uri.slen,
+		  pjsua_var.buddy[buddy->index].uri.ptr, 
+		  pjsip_evsub_get_state_name(sub)));
+
+	if (pjsip_evsub_get_state(sub) == PJSIP_EVSUB_STATE_TERMINATED) {
+	    buddy->sub = NULL;
+	    buddy->status.info_cnt = 0;
+	    pjsip_evsub_set_mod_data(sub, pjsua_var.mod.id, NULL);
+	}
+
+	/* Call callback */
+	if (pjsua_var.ua_cfg.cb.on_buddy_state)
+	    (*pjsua_var.ua_cfg.cb.on_buddy_state)(buddy->index);
+    }
+
+    PJSUA_UNLOCK();
+}
+
+
+/* Callback when transaction state has changed. */
+static void pjsua_evsub_on_tsx_state(pjsip_evsub *sub, 
+				     pjsip_transaction *tsx,
+				     pjsip_event *event)
+{
+    pjsua_buddy *buddy;
+    pjsip_contact_hdr *contact_hdr;
+
+    PJSUA_LOCK();
+
+    buddy = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id);
+    if (!buddy) {
+	PJSUA_UNLOCK();
+	return;
+    }
+
+    /* We only use this to update buddy's Contact, when it's not
+     * set.
+     */
+    if (buddy->contact.slen != 0) {
+	/* Contact already set */
+	PJSUA_UNLOCK();
+	return;
+    }
+    
+    /* Only care about 2xx response to outgoing SUBSCRIBE */
+    if (tsx->status_code/100 != 2 ||
+	tsx->role != PJSIP_UAC_ROLE ||
+	event->type != PJSIP_EVENT_RX_MSG || 
+	pjsip_method_cmp(&tsx->method, &pjsip_subscribe_method)!=0)
+    {
+	PJSUA_UNLOCK();
+	return;
+    }
+
+    /* Find contact header. */
+    contact_hdr = pjsip_msg_find_hdr(event->body.rx_msg.rdata->msg_info.msg,
+				     PJSIP_H_CONTACT, NULL);
+    if (!contact_hdr) {
+	PJSUA_UNLOCK();
+	return;
+    }
+
+    buddy->contact.ptr = pj_pool_alloc(pjsua_var.pool, PJSIP_MAX_URL_SIZE);
+    buddy->contact.slen = pjsip_uri_print( PJSIP_URI_IN_CONTACT_HDR,
+					   contact_hdr->uri,
+					   buddy->contact.ptr, 
+					   PJSIP_MAX_URL_SIZE);
+    if (buddy->contact.slen < 0)
+	buddy->contact.slen = 0;
+
+    PJSUA_UNLOCK();
+}
+
+
+/* Callback called when we receive NOTIFY */
+static void pjsua_evsub_on_rx_notify(pjsip_evsub *sub, 
+				     pjsip_rx_data *rdata,
+				     int *p_st_code,
+				     pj_str_t **p_st_text,
+				     pjsip_hdr *res_hdr,
+				     pjsip_msg_body **p_body)
+{
+    pjsua_buddy *buddy;
+
+    PJSUA_LOCK();
+
+    buddy = pjsip_evsub_get_mod_data(sub, pjsua_var.mod.id);
+    if (buddy) {
+	/* Update our info. */
+	pjsip_pres_get_status(sub, &buddy->status);
+    }
+
+    /* The default is to send 200 response to NOTIFY.
+     * Just leave it there..
+     */
+    PJ_UNUSED_ARG(rdata);
+    PJ_UNUSED_ARG(p_st_code);
+    PJ_UNUSED_ARG(p_st_text);
+    PJ_UNUSED_ARG(res_hdr);
+    PJ_UNUSED_ARG(p_body);
+
+    PJSUA_UNLOCK();
+}
+
+
+/* Event subscription callback. */
+static pjsip_evsub_user pres_callback = 
+{
+    &pjsua_evsub_on_state,  
+    &pjsua_evsub_on_tsx_state,
+
+    NULL,   /* on_rx_refresh: don't care about SUBSCRIBE refresh, unless 
+	     * we want to authenticate 
+	     */
+
+    &pjsua_evsub_on_rx_notify,
+
+    NULL,   /* on_client_refresh: Use default behaviour, which is to 
+	     * refresh client subscription. */
+
+    NULL,   /* on_server_timeout: Use default behaviour, which is to send 
+	     * NOTIFY to terminate. 
+	     */
+};
+
+
+/* It does what it says.. */
+static void subscribe_buddy_presence(unsigned index)
+{
+    pjsua_buddy *buddy;
+    int acc_id;
+    pjsua_acc *acc;
+    pj_str_t contact;
+    pjsip_dialog *dlg;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    buddy = &pjsua_var.buddy[index];
+    acc_id = pjsua_acc_find_for_outgoing(&buddy->uri);
+
+    acc = &pjsua_var.acc[acc_id];
+
+    PJ_LOG(4,(THIS_FILE, "Using account %d for buddy %d subscription",
+			 acc_id, index));
+
+    /* Generate suitable Contact header */
+    status = pjsua_acc_create_uac_contact(pjsua_var.pool, &contact,
+					  acc_id, &buddy->uri);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to generate Contact header", status);
+	return;
+    }
+
+    /* Create UAC dialog */
+    status = pjsip_dlg_create_uac( pjsip_ua_instance(), 
+				   &acc->cfg.id,
+				   &contact,
+				   &buddy->uri,
+				   NULL, &dlg);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to create dialog", 
+		     status);
+	return;
+    }
+
+    status = pjsip_pres_create_uac( dlg, &pres_callback, 
+				    PJSIP_EVSUB_NO_EVENT_ID, &buddy->sub);
+    if (status != PJ_SUCCESS) {
+	pjsua_var.buddy[index].sub = NULL;
+	pjsua_perror(THIS_FILE, "Unable to create presence client", 
+		     status);
+	pjsip_dlg_terminate(dlg);
+	return;
+    }
+
+    /* If account is locked to specific transport, then lock dialog
+     * to this transport too.
+     */
+    if (acc->cfg.transport_id != PJSUA_INVALID_ID) {
+	pjsip_tpselector tp_sel;
+
+	pjsua_init_tpselector(acc->cfg.transport_id, &tp_sel);
+	pjsip_dlg_set_transport(dlg, &tp_sel);
+    }
+
+    /* Set route-set */
+    if (!pj_list_empty(&acc->route_set)) {
+	pjsip_dlg_set_route_set(dlg, &acc->route_set);
+    }
+
+    /* Set credentials */
+    if (acc->cred_cnt) {
+	pjsip_auth_clt_set_credentials( &dlg->auth_sess, 
+					acc->cred_cnt, acc->cred);
+    }
+
+    pjsip_evsub_set_mod_data(buddy->sub, pjsua_var.mod.id, buddy);
+
+    status = pjsip_pres_initiate(buddy->sub, -1, &tdata);
+    if (status != PJ_SUCCESS) {
+	pjsip_pres_terminate(buddy->sub, PJ_FALSE);
+	buddy->sub = NULL;
+	pjsua_perror(THIS_FILE, "Unable to create initial SUBSCRIBE", 
+		     status);
+	return;
+    }
+
+    pjsua_process_msg_data(tdata, NULL);
+
+    status = pjsip_pres_send_request(buddy->sub, tdata);
+    if (status != PJ_SUCCESS) {
+	pjsip_pres_terminate(buddy->sub, PJ_FALSE);
+	buddy->sub = NULL;
+	pjsua_perror(THIS_FILE, "Unable to send initial SUBSCRIBE", 
+		     status);
+	return;
+    }
+}
+
+
+/* It does what it says... */
+static void unsubscribe_buddy_presence(unsigned index)
+{
+    pjsua_buddy *buddy;
+    pjsip_tx_data *tdata;
+    pj_status_t status;
+
+    buddy = &pjsua_var.buddy[index];
+
+    if (buddy->sub == NULL)
+	return;
+
+    if (pjsip_evsub_get_state(buddy->sub) == PJSIP_EVSUB_STATE_TERMINATED) {
+	pjsua_var.buddy[index].sub = NULL;
+	return;
+    }
+
+    status = pjsip_pres_initiate( buddy->sub, 0, &tdata);
+    if (status == PJ_SUCCESS) {
+	pjsua_process_msg_data(tdata, NULL);
+	status = pjsip_pres_send_request( buddy->sub, tdata );
+    }
+
+    if (status != PJ_SUCCESS) {
+	pjsip_pres_terminate(buddy->sub, PJ_FALSE);
+	buddy->sub = NULL;
+	pjsua_perror(THIS_FILE, "Unable to unsubscribe presence", 
+		     status);
+    }
+}
+
+
+/* It does what it says.. */
+static void refresh_client_subscriptions(void)
+{
+    unsigned i;
+
+    for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.buddy); ++i) {
+
+	if (!pjsua_var.buddy[i].uri.slen)
+	    continue;
+
+	if (pjsua_var.buddy[i].monitor && !pjsua_var.buddy[i].sub) {
+	    subscribe_buddy_presence(i);
+
+	} else if (!pjsua_var.buddy[i].monitor && pjsua_var.buddy[i].sub) {
+	    unsubscribe_buddy_presence(i);
+
+	}
+    }
+}
+
+
+/*
+ * Init presence
+ */
+pj_status_t pjsua_pres_init()
+{
+    unsigned i;
+    pj_status_t status;
+
+    status = pjsip_endpt_register_module( pjsua_var.endpt, &mod_pjsua_pres);
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Unable to register pjsua presence module", 
+		     status);
+    }
+
+    for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.buddy); ++i) {
+	reset_buddy(i);
+    }
+
+    return status;
+}
+
+
+/*
+ * Start presence subsystem.
+ */
+pj_status_t pjsua_pres_start(void)
+{
+    /* Nothing to do (is it?) */
+    return PJ_SUCCESS;
+}
+
+
+/*
+ * Refresh presence subscriptions
+ */
+void pjsua_pres_refresh()
+{
+    unsigned i;
+
+    refresh_client_subscriptions();
+
+    for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.acc); ++i) {
+	if (pjsua_var.acc[i].valid)
+	    refresh_server_subscription(i);
+    }
+}
+
+
+/*
+ * Shutdown presence.
+ */
+void pjsua_pres_shutdown(void)
+{
+    unsigned i;
+
+    for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.acc); ++i) {
+	if (!pjsua_var.acc[i].valid)
+	    continue;
+	pjsua_pres_delete_acc(i);
+    }
+
+    for (i=0; i<PJ_ARRAY_SIZE(pjsua_var.buddy); ++i) {
+	pjsua_var.buddy[i].monitor = 0;
+    }
+
+    pjsua_pres_refresh();
+}
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/dlg_core_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/dlg_core_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/dlg_core_test.c	(revision 1163)
@@ -0,0 +1,22 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/dns_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/dns_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/dns_test.c	(revision 1163)
@@ -0,0 +1,597 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+#include <pjlib-util.h>
+
+/* For logging purpose. */
+#define THIS_FILE   "dns_test.c"
+
+struct result
+{
+    pj_status_t		    status;
+    pjsip_server_addresses  servers;
+};
+
+
+static void cb(pj_status_t status,
+	       void *token,
+	       const struct pjsip_server_addresses *addr)
+{
+    struct result *result = token;
+
+    result->status = status;
+    if (status == PJ_SUCCESS)
+	pj_memcpy(&result->servers, addr, sizeof(*addr));
+}
+
+
+static void add_dns_entries(pj_dns_resolver *resv)
+{
+    /* Inject DNS SRV entry */
+    pj_dns_parsed_packet pkt;
+    pj_dns_parsed_rr ans[4];
+    pj_dns_parsed_rr ar[5];
+    pj_str_t tmp;
+    unsigned i;
+
+    /*
+     * This is answer to SRV query to "example.com" domain, and
+     * the answer contains full reference to the A records of
+     * the server. The full DNS records is :
+
+     _sip._udp.example.com 3600 IN SRV 0 0  5060 sip01.example.com.
+     _sip._udp.example.com 3600 IN SRV 0 20 5060 sip02.example.com.
+     _sip._udp.example.com 3600 IN SRV 0 10 5060 sip03.example.com.
+     _sip._udp.example.com 3600 IN SRV 1 0  5060 sip04.example.com.
+     
+     sip01.example.com. 3600 IN A       1.1.1.1
+     sip02.example.com. 3600 IN A       2.2.2.2
+     sip03.example.com. 3600 IN A       3.3.3.3
+     sip04.example.com. 3600 IN A       4.4.4.4
+     
+     ; Additionally, add A record for "example.com"
+     example.com.	3600 IN A       5.5.5.5
+
+     */
+    pj_bzero(&pkt, sizeof(pkt));
+    pj_bzero(ans, sizeof(ans));
+    pj_bzero(ar, sizeof(ar));
+
+    pkt.hdr.flags = PJ_DNS_SET_QR(1);
+    pkt.hdr.anscount = PJ_ARRAY_SIZE(ans);
+    pkt.hdr.arcount = 0;
+    pkt.ans = ans;
+    pkt.arr = ar;
+
+    ans[0].name = pj_str("_sip._udp.example.com");
+    ans[0].type = PJ_DNS_TYPE_SRV;
+    ans[0].dnsclass = PJ_DNS_CLASS_IN;
+    ans[0].ttl = 3600;
+    ans[0].rdata.srv.prio = 0;
+    ans[0].rdata.srv.weight = 0;
+    ans[0].rdata.srv.port = 5060;
+    ans[0].rdata.srv.target = pj_str("sip01.example.com");
+
+    ans[1].name = pj_str("_sip._udp.example.com");
+    ans[1].type = PJ_DNS_TYPE_SRV;
+    ans[1].dnsclass = PJ_DNS_CLASS_IN;
+    ans[1].ttl = 3600;
+    ans[1].rdata.srv.prio = 0;
+    ans[1].rdata.srv.weight = 20;
+    ans[1].rdata.srv.port = 5060;
+    ans[1].rdata.srv.target = pj_str("sip02.example.com");
+
+    ans[2].name = pj_str("_sip._udp.example.com");
+    ans[2].type = PJ_DNS_TYPE_SRV;
+    ans[2].dnsclass = PJ_DNS_CLASS_IN;
+    ans[2].ttl = 3600;
+    ans[2].rdata.srv.prio = 0;
+    ans[2].rdata.srv.weight = 10;
+    ans[2].rdata.srv.port = 5060;
+    ans[2].rdata.srv.target = pj_str("sip03.example.com");
+
+    ans[3].name = pj_str("_sip._udp.example.com");
+    ans[3].type = PJ_DNS_TYPE_SRV;
+    ans[3].dnsclass = PJ_DNS_CLASS_IN;
+    ans[3].ttl = 3600;
+    ans[3].rdata.srv.prio = 1;
+    ans[3].rdata.srv.weight = 0;
+    ans[3].rdata.srv.port = 5060;
+    ans[3].rdata.srv.target = pj_str("sip04.example.com");
+
+    pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE);
+
+    ar[0].name = pj_str("sip01.example.com");
+    ar[0].type = PJ_DNS_TYPE_A;
+    ar[0].dnsclass = PJ_DNS_CLASS_IN;
+    ar[0].ttl = 3600;
+    ar[0].rdata.a.ip_addr = pj_inet_addr(pj_cstr(&tmp, "1.1.1.1"));
+
+    ar[1].name = pj_str("sip02.example.com");
+    ar[1].type = PJ_DNS_TYPE_A;
+    ar[1].dnsclass = PJ_DNS_CLASS_IN;
+    ar[1].ttl = 3600;
+    ar[1].rdata.a.ip_addr = pj_inet_addr(pj_cstr(&tmp, "2.2.2.2"));
+
+    ar[2].name = pj_str("sip03.example.com");
+    ar[2].type = PJ_DNS_TYPE_A;
+    ar[2].dnsclass = PJ_DNS_CLASS_IN;
+    ar[2].ttl = 3600;
+    ar[2].rdata.a.ip_addr = pj_inet_addr(pj_cstr(&tmp, "3.3.3.3"));
+
+    ar[3].name = pj_str("sip04.example.com");
+    ar[3].type = PJ_DNS_TYPE_A;
+    ar[3].dnsclass = PJ_DNS_CLASS_IN;
+    ar[3].ttl = 3600;
+    ar[3].rdata.a.ip_addr = pj_inet_addr(pj_cstr(&tmp, "4.4.4.4"));
+
+    ar[4].name = pj_str("example.com");
+    ar[4].type = PJ_DNS_TYPE_A;
+    ar[4].dnsclass = PJ_DNS_CLASS_IN;
+    ar[4].ttl = 3600;
+    ar[4].rdata.a.ip_addr = pj_inet_addr(pj_cstr(&tmp, "5.5.5.5"));
+
+    /* 
+     * Create individual A records for all hosts in "example.com" domain.
+     */
+    for (i=0; i<PJ_ARRAY_SIZE(ar); ++i) {
+	pj_bzero(&pkt, sizeof(pkt));
+	pkt.hdr.anscount = 1;
+	pkt.hdr.flags = PJ_DNS_SET_QR(1);
+	pkt.ans = &ar[i];
+
+	pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE);
+    }
+
+    /* 
+     * Simulate DNS error response by creating these answers.
+     * Sample of invalid SRV records: _sip._udp.sip01.example.com.
+     */
+    for (i=0; i<PJ_ARRAY_SIZE(ans); ++i) {
+	pj_dns_parsed_query q;
+	char buf[128];
+	char *services[] = { "_sip._udp.", "_sip._tcp.", "_sips._tcp."};
+	unsigned j;
+
+	for (j=0; j<PJ_ARRAY_SIZE(services); ++j) {
+	    q.dnsclass = PJ_DNS_CLASS_IN;
+	    q.type = PJ_DNS_TYPE_SRV;
+
+	    q.name.ptr = buf;
+	    pj_bzero(buf, sizeof(buf));
+	    pj_strcpy2(&q.name, services[j]);
+	    pj_strcat(&q.name, &ans[i].rdata.srv.target);
+
+	    pj_bzero(&pkt, sizeof(pkt));
+	    pkt.hdr.qdcount = 1;
+	    pkt.hdr.flags = PJ_DNS_SET_QR(1) |
+			    PJ_DNS_SET_RCODE(PJ_DNS_RCODE_NXDOMAIN);
+	    pkt.q = &q;
+	    
+	    pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE);
+	}
+    }
+
+
+    /*
+     * ANOTHER DOMAIN.
+     *
+     * This time we let SRV and A get answered in different DNS
+     * query.
+     */
+
+    /* The "domain.com" DNS records (note the different the port):
+
+	_sip._tcp.domain.com 3600 IN SRV 1 0 50060 sip06.domain.com.
+	_sip._tcp.domain.com 3600 IN SRV 2 0 50060 sip07.domain.com.
+
+	sip06.domain.com. 3600 IN A       6.6.6.6
+	sip07.domain.com. 3600 IN A       7.7.7.7
+     */
+
+    pj_bzero(&pkt, sizeof(pkt));
+    pj_bzero(&ans, sizeof(ans));
+    pkt.hdr.flags = PJ_DNS_SET_QR(1);
+    pkt.hdr.anscount = 2;
+    pkt.ans = ans;
+
+    /* Add the SRV records, with reverse priority (to test that sorting
+     * works.
+     */
+    ans[0].name = pj_str("_sip._tcp.domain.com");
+    ans[0].type = PJ_DNS_TYPE_SRV;
+    ans[0].dnsclass = PJ_DNS_CLASS_IN;
+    ans[0].ttl = 3600;
+    ans[0].rdata.srv.prio = 2;
+    ans[0].rdata.srv.weight = 0;
+    ans[0].rdata.srv.port = 50060;
+    ans[0].rdata.srv.target = pj_str("SIP07.DOMAIN.COM");
+
+    ans[1].name = pj_str("_sip._tcp.domain.com");
+    ans[1].type = PJ_DNS_TYPE_SRV;
+    ans[1].dnsclass = PJ_DNS_CLASS_IN;
+    ans[1].ttl = 3600;
+    ans[1].rdata.srv.prio = 1;
+    ans[1].rdata.srv.weight = 0;
+    ans[1].rdata.srv.port = 50060;
+    ans[1].rdata.srv.target = pj_str("SIP06.DOMAIN.COM");
+
+    pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE);
+
+    /* From herein there is only one answer */
+    pkt.hdr.anscount = 1;
+
+    /* Add a single SRV for UDP */
+    ans[0].name = pj_str("_sip._udp.domain.com");
+    ans[0].type = PJ_DNS_TYPE_SRV;
+    ans[0].dnsclass = PJ_DNS_CLASS_IN;
+    ans[0].ttl = 3600;
+    ans[0].rdata.srv.prio = 0;
+    ans[0].rdata.srv.weight = 0;
+    ans[0].rdata.srv.port = 50060;
+    ans[0].rdata.srv.target = pj_str("SIP06.DOMAIN.COM");
+
+    pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE);
+
+
+    /* Add the A record for sip06.domain.com */
+    ans[0].name = pj_str("sip06.domain.com");
+    ans[0].type = PJ_DNS_TYPE_A;
+    ans[0].dnsclass = PJ_DNS_CLASS_IN;
+    ans[0].ttl = 3600;
+    ans[0].rdata.a.ip_addr = pj_inet_addr(pj_cstr(&tmp, "6.6.6.6"));
+
+    pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE);
+
+    /* Add the A record for sip07.domain.com */
+    ans[0].name = pj_str("sip07.domain.com");
+    ans[0].type = PJ_DNS_TYPE_A;
+    ans[0].dnsclass = PJ_DNS_CLASS_IN;
+    ans[0].ttl = 3600;
+    ans[0].rdata.a.ip_addr = pj_inet_addr(pj_cstr(&tmp, "7.7.7.7"));
+
+    pj_dns_resolver_add_entry( resv, &pkt, PJ_FALSE);
+}
+
+
+/*
+ * Perform server resolution where the results are expected to
+ * come in strict order.
+ */
+static int test_resolve(const char *title,
+			pj_pool_t *pool,
+			pjsip_transport_type_e type,
+			char *name,
+			int port,
+			pjsip_server_addresses *ref)
+{
+    pjsip_host_info dest;
+    struct result result;
+
+    PJ_LOG(3,(THIS_FILE, " test_resolve(): %s", title));
+
+    dest.type = type;
+    dest.flag = pjsip_transport_get_flag_from_type(type);
+    dest.addr.host = pj_str(name);
+    dest.addr.port = port;
+
+    result.status = 0x12345678;
+
+    pjsip_endpt_resolve(endpt, pool, &dest, &result, &cb);
+
+    while (result.status == 0x12345678) {
+	int i = 0;
+	pj_time_val timeout = { 1, 0 };
+	pjsip_endpt_handle_events(endpt, &timeout);
+	if (i == 1)
+	    pj_dns_resolver_dump(pjsip_endpt_get_resolver(endpt), PJ_TRUE);
+    }
+
+    if (result.status != PJ_SUCCESS) {
+	app_perror("  pjsip_endpt_resolve() error", result.status);
+	return result.status;
+    }
+
+    if (ref) {
+	unsigned i;
+
+	if (ref->count != result.servers.count) {
+	    PJ_LOG(3,(THIS_FILE, "  test_resolve() error 10: result count mismatch"));
+	    return 10;
+	}
+	
+	for (i=0; i<ref->count; ++i) {
+	    pj_sockaddr_in *ra = (pj_sockaddr_in *)&ref->entry[i].addr;
+	    pj_sockaddr_in *rb = (pj_sockaddr_in *)&result.servers.entry[i].addr;
+
+	    if (ra->sin_addr.s_addr != rb->sin_addr.s_addr) {
+		PJ_LOG(3,(THIS_FILE, "  test_resolve() error 20: IP address mismatch"));
+		return 20;
+	    }
+	    if (ra->sin_port != rb->sin_port) {
+		PJ_LOG(3,(THIS_FILE, "  test_resolve() error 30: port mismatch"));
+		return 30;
+	    }
+	    if (ref->entry[i].addr_len != result.servers.entry[i].addr_len) {
+		PJ_LOG(3,(THIS_FILE, "  test_resolve() error 40: addr_len mismatch"));
+		return 40;
+	    }
+	    if (ref->entry[i].type != result.servers.entry[i].type) {
+		PJ_LOG(3,(THIS_FILE, "  test_resolve() error 50: transport type mismatch"));
+		return 50;
+	    }
+	}
+    }
+
+    return PJ_SUCCESS;
+}
+
+/*
+ * Perform round-robin/load balance test.
+ */
+static int round_robin_test(pj_pool_t *pool)
+{
+    enum { COUNT = 400, PCT_ALLOWANCE = 5 };
+    unsigned i;
+    struct server_hit
+    {
+	char *ip_addr;
+	unsigned percent;
+	unsigned hits;
+    } server_hit[] =
+    {
+	{ "1.1.1.1", 3,  0 },
+	{ "2.2.2.2", 65, 0 },
+	{ "3.3.3.3", 32, 0 },
+	{ "4.4.4.4", 0,  0 }
+    };
+
+    PJ_LOG(3,(THIS_FILE, " Performing round-robin/load-balance test.."));
+
+    /* Do multiple resolve request to "example.com".
+     * The resolver should select the server based on the weight proportion
+     * the the servers in the SRV entry.
+     */
+    for (i=0; i<COUNT; ++i) {
+	pjsip_host_info dest;
+	struct result result;
+	unsigned j;
+
+	dest.type = PJSIP_TRANSPORT_UDP;
+	dest.flag = pjsip_transport_get_flag_from_type(PJSIP_TRANSPORT_UDP);
+	dest.addr.host = pj_str("example.com");
+	dest.addr.port = 0;
+
+	result.status = 0x12345678;
+
+	pjsip_endpt_resolve(endpt, pool, &dest, &result, &cb);
+
+	while (result.status == 0x12345678) {
+	    int i = 0;
+	    pj_time_val timeout = { 1, 0 };
+	    pjsip_endpt_handle_events(endpt, &timeout);
+	    if (i == 1)
+		pj_dns_resolver_dump(pjsip_endpt_get_resolver(endpt), PJ_TRUE);
+	}
+
+	/* Find which server was "hit" */
+	for (j=0; j<PJ_ARRAY_SIZE(server_hit); ++j) {
+	    pj_str_t tmp;
+	    pj_in_addr a1;
+	    pj_sockaddr_in *a2;
+
+	    tmp = pj_str(server_hit[j].ip_addr);
+	    a1 = pj_inet_addr(&tmp);
+	    a2 = (pj_sockaddr_in*) &result.servers.entry[0].addr;
+
+	    if (a1.s_addr == a2->sin_addr.s_addr) {
+		server_hit[j].hits++;
+		break;
+	    }
+	}
+
+	if (j == PJ_ARRAY_SIZE(server_hit)) {
+	    PJ_LOG(1,(THIS_FILE, "..round_robin_test() error 10: returned address mismatch"));
+	    return 10;
+	}
+    }
+
+    /* Print the actual hit rate */
+    for (i=0; i<PJ_ARRAY_SIZE(server_hit); ++i) {
+	PJ_LOG(3,(THIS_FILE, " ..Server %s: weight=%d%%, hit %d%% times",
+		  server_hit[i].ip_addr, server_hit[i].percent,
+		  (server_hit[i].hits * 100) / COUNT));
+    }
+
+    /* Compare the actual hit with the weight proportion */
+    for (i=0; i<PJ_ARRAY_SIZE(server_hit); ++i) {
+	int actual_pct = (server_hit[i].hits * 100) / COUNT;
+
+	if (actual_pct + PCT_ALLOWANCE < (int)server_hit[i].percent ||
+	    actual_pct - PCT_ALLOWANCE > (int)server_hit[i].percent)
+	{
+	    PJ_LOG(1,(THIS_FILE, 
+		      "..round_robin_test() error 20: "
+		      "hit rate difference for server %s (%d%%) is more than "
+		      "tolerable allowance (%d%%)",
+		      server_hit[i].ip_addr, 
+		      actual_pct - server_hit[i].percent, 
+		      PCT_ALLOWANCE));
+	    return 20;
+	}
+    }
+
+    PJ_LOG(3,(THIS_FILE, 
+	      " Load balance test success, hit-rate is "
+	      "within %d%% allowance", PCT_ALLOWANCE));
+    return PJ_SUCCESS;
+}
+
+
+#define C(expr)	    status = expr; \
+		    if (status != PJ_SUCCESS) app_perror(THIS_FILE, "Error", status);
+
+static void add_ref(pjsip_server_addresses *r,
+		    pjsip_transport_type_e type,
+		    char *addr,
+		    int port)
+{
+    pj_sockaddr_in *a;
+    pj_str_t tmp;
+
+    r->entry[r->count].type = type;
+    r->entry[r->count].priority = 0;
+    r->entry[r->count].weight = 0;
+    r->entry[r->count].addr_len = sizeof(pj_sockaddr_in);
+
+    a = (pj_sockaddr_in *)&r->entry[r->count].addr;
+    a->sin_family = PJ_AF_INET;
+    tmp = pj_str(addr);
+    a->sin_addr = pj_inet_addr(&tmp);
+    a->sin_port = pj_htons((pj_uint16_t)port);
+
+    r->count++;
+}
+
+static void create_ref(pjsip_server_addresses *r,
+		       pjsip_transport_type_e type,
+		       char *addr,
+		       int port)
+{
+    r->count = 0;
+    add_ref(r, type, addr, port);
+}
+
+
+/*
+ * Main test entry.
+ */
+int resolve_test(void)
+{
+    pj_pool_t *pool;
+    pj_dns_resolver *resv;
+    pj_str_t nameserver;
+    pj_uint16_t port = 5353;
+    pj_status_t status;
+
+    pool = pjsip_endpt_create_pool(endpt, NULL, 4000, 4000);
+
+    status = pjsip_endpt_create_resolver(endpt, &resv);
+
+    nameserver = pj_str("192.168.0.106");
+    pj_dns_resolver_set_ns(resv, 1, &nameserver, &port);
+    pjsip_endpt_set_resolver(endpt, resv);
+
+    add_dns_entries(resv);
+
+    /* These all should be resolved as IP addresses (DNS A query) */
+    {
+	pjsip_server_addresses ref;
+	create_ref(&ref, PJSIP_TRANSPORT_UDP, "1.1.1.1", 5060);
+	status = test_resolve("IP address without transport and port", pool, PJSIP_TRANSPORT_UNSPECIFIED, "1.1.1.1", 0, &ref);
+	if (status != PJ_SUCCESS)
+	    return -100;
+    }
+    {
+	pjsip_server_addresses ref;
+	create_ref(&ref, PJSIP_TRANSPORT_UDP, "1.1.1.1", 5060);
+	status = test_resolve("IP address with explicit port", pool, PJSIP_TRANSPORT_UNSPECIFIED, "1.1.1.1", 5060, &ref);
+	if (status != PJ_SUCCESS)
+	    return -110;
+    }
+    {
+	pjsip_server_addresses ref;
+	create_ref(&ref, PJSIP_TRANSPORT_TCP, "1.1.1.1", 5060);
+	status = test_resolve("IP address without port (TCP)", pool, PJSIP_TRANSPORT_TCP,"1.1.1.1", 0, &ref);
+	if (status != PJ_SUCCESS)
+	    return -120;
+    }
+    {
+	pjsip_server_addresses ref;
+	create_ref(&ref, PJSIP_TRANSPORT_TLS, "1.1.1.1", 5061);
+	status = test_resolve("IP address without port (TLS)", pool, PJSIP_TRANSPORT_TLS, "1.1.1.1", 0, &ref);
+	if (status != PJ_SUCCESS)
+	    return -130;
+    }
+
+    /* This should be resolved as DNS A record (because port is present) */
+    {
+	pjsip_server_addresses ref;
+	create_ref(&ref, PJSIP_TRANSPORT_UDP, "5.5.5.5", 5060);
+	status = test_resolve("domain name with port should resolve to A record", pool, PJSIP_TRANSPORT_UNSPECIFIED, "example.com", 5060, &ref);
+	if (status != PJ_SUCCESS)
+	    return -140;
+    }
+
+    /* This will fail to be resolved as SRV, resolver should fallback to 
+     * resolving to A record.
+     */
+    {
+	pjsip_server_addresses ref;
+	create_ref(&ref, PJSIP_TRANSPORT_UDP, "2.2.2.2", 5060);
+	status = test_resolve("failure with SRV fallback to A record", pool, PJSIP_TRANSPORT_UNSPECIFIED, "sip02.example.com", 0, &ref);
+	if (status != PJ_SUCCESS)
+	    return -150;
+    }
+
+    /* Same as above, but explicitly for TLS. */
+    {
+	pjsip_server_addresses ref;
+	create_ref(&ref, PJSIP_TRANSPORT_TLS, "2.2.2.2", 5061);
+	status = test_resolve("failure with SRV fallback to A record (for TLS)", pool, PJSIP_TRANSPORT_TLS, "sip02.example.com", 0, &ref);
+	if (status != PJ_SUCCESS)
+	    return -150;
+    }
+
+    /* Standard DNS SRV followed by A recolution */
+    {
+	pjsip_server_addresses ref;
+	create_ref(&ref, PJSIP_TRANSPORT_UDP, "6.6.6.6", 50060);
+	status = test_resolve("standard SRV resolution", pool, PJSIP_TRANSPORT_UNSPECIFIED, "domain.com", 0, &ref);
+	if (status != PJ_SUCCESS)
+	    return -155;
+    }
+
+    /* Standard DNS SRV followed by A recolution (explicit transport) */
+    {
+	pjsip_server_addresses ref;
+	create_ref(&ref, PJSIP_TRANSPORT_TCP, "6.6.6.6", 50060);
+	add_ref(&ref, PJSIP_TRANSPORT_TCP, "7.7.7.7", 50060);
+	status = test_resolve("standard SRV resolution with explicit transport (TCP)", pool, PJSIP_TRANSPORT_TCP, "domain.com", 0, &ref);
+	if (status != PJ_SUCCESS)
+	    return -160;
+    }
+
+
+    /* Round robin/load balance test */
+    if (round_robin_test(pool) != 0)
+	return -170;
+
+    /* Timeout test */
+    {
+	status = test_resolve("timeout test", pool, PJSIP_TRANSPORT_UNSPECIFIED, "an.invalid.address", 0, NULL);
+	if (status == PJ_SUCCESS)
+	    return -150;
+    }
+
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/main.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/main.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/main.c	(revision 1163)
@@ -0,0 +1,88 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+extern const char *system_name;
+
+static void usage()
+{
+    puts("Usage: test-pjsip");
+    puts("Options:");
+    puts(" -i,--interractive   Key input at the end.");
+    puts(" -h,--help           Show this screen");
+    puts(" -l,--log-level N    Set log level (0-6)");
+}
+
+int main(int argc, char *argv[])
+{
+    int interractive = 0;
+    int retval;
+    char **opt_arg;
+
+    /* Parse arguments. */
+    opt_arg = argv+1;
+    while (*opt_arg) {
+	if (strcmp(*opt_arg, "-i") == 0 ||
+	    strcmp(*opt_arg, "--interractive") == 0)
+	{
+	    interractive = 1;
+	} else if (strcmp(*opt_arg, "-h") == 0 ||
+		   strcmp(*opt_arg, "--help") == 0) 
+	{
+	    usage();
+	    return 1;
+	} else if (strcmp(*opt_arg, "-l") == 0 ||
+		   strcmp(*opt_arg, "--log-level") == 0) 
+	{
+	    ++opt_arg;
+	    if (!opt_arg) {
+		usage();
+		return 1;
+	    }
+	    log_level = atoi(*opt_arg);
+	} else 	if (strcmp(*opt_arg, "-s") == 0 ||
+	    strcmp(*opt_arg, "--system") == 0)
+	{
+	    ++opt_arg;
+	    if (!opt_arg) {
+		usage();
+		return 1;
+	    }
+	    system_name = *opt_arg;
+	} else {
+	    usage();
+	    return 1;
+	}
+
+	++opt_arg;
+    }
+
+    retval = test_main();
+
+    if (interractive) {
+	char s[10];
+	printf("<Press ENTER to quit>\n"); fflush(stdout);
+	fgets(s, sizeof(s), stdin);
+    }
+
+    return retval;
+}
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/main_rtems.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/main_rtems.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/main_rtems.c	(revision 1163)
@@ -0,0 +1,12 @@
+
+/* 
+ *  !! OIY OIY !!
+ *
+ *  The purpose of this file is only to get pjsip-test linked. I haven't
+ *  actually tried to run pjsip-test on RTEMS!!
+ *
+ */
+
+#include "../../pjlib/src/pjlib-test/main_rtems.c"
+
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/msg_err_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/msg_err_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/msg_err_test.c	(revision 1163)
@@ -0,0 +1,100 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+#define THIS_FILE   "msg_err_test.c"
+
+
+static pj_bool_t verify_success(pjsip_msg *msg,
+				pjsip_parser_err_report *err_list)
+{
+    return PJ_TRUE;
+}
+
+static struct test_entry
+{
+    char	msg[1024];
+    pj_bool_t (*verify)(pjsip_msg *msg,
+		        pjsip_parser_err_report *err_list);
+
+} test_entries[] = 
+{
+    /* Syntax error in status line */
+    {
+	"SIP/2.0 200\r\n"
+	"H-Name: H-Value\r\n"
+	"\r\n",
+	&verify_success
+    },
+
+    /* Syntax error in header */
+    {
+	"SIP/2.0 200 OK\r\n"
+	"Via: SIP/2.0\r\n"
+	"H-Name: H-Value\r\n"
+	"\r\n",
+	&verify_success
+    },
+
+    /* Multiple syntax errors in headers */
+    {
+	"SIP/2.0 200 OK\r\n"
+	"Via: SIP/2.0\r\n"
+	"H-Name: H-Value\r\n"
+	"Via: SIP/2.0\r\n"
+	"\r\n",
+	&verify_success
+    }
+};
+
+
+int msg_err_test(void)
+{
+    pj_pool_t *pool;
+    unsigned i;
+
+    PJ_LOG(3,(THIS_FILE, "Testing parsing error"));
+
+    pool = pjsip_endpt_create_pool(endpt, "msgerrtest", 4000, 4000);
+
+    for (i=0; i<PJ_ARRAY_SIZE(test_entries); ++i) {
+	pjsip_parser_err_report err_list, *e;
+	pjsip_msg *msg;
+
+	PJ_LOG(3,(THIS_FILE, "  Parsing msg %d", i));
+	pj_list_init(&err_list);
+	msg = pjsip_parse_msg(pool, test_entries[i].msg,
+			      strlen(test_entries[i].msg), &err_list);
+
+	e = err_list.next;
+	while (e != &err_list) {
+	    PJ_LOG(3,(THIS_FILE, 
+		      "   reported syntax error at line %d col %d for %.*s",
+		      e->line, e->col,
+		      (int)e->hname.slen,
+		      e->hname.ptr));
+	    e = e->next;
+	}
+    }
+
+    pj_pool_release(pool);
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/msg_logger.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/msg_logger.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/msg_logger.c	(revision 1163)
@@ -0,0 +1,103 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+#define THIS_FILE   "msg_logger.c"
+
+static pj_bool_t msg_log_enabled;
+
+static pj_bool_t on_rx_msg(pjsip_rx_data *rdata)
+{
+    if (msg_log_enabled) {
+	PJ_LOG(4,(THIS_FILE, "RX %d bytes %s from %s:%s:%d:\n"
+			     "%.*s\n"
+			     "--end msg--",
+			     rdata->msg_info.len,
+			     pjsip_rx_data_get_info(rdata),
+			     rdata->tp_info.transport->type_name,
+			     rdata->pkt_info.src_name,
+			     rdata->pkt_info.src_port,
+			     rdata->msg_info.len,
+			     rdata->msg_info.msg_buf));
+    }
+
+    return PJ_FALSE;
+}
+
+static pj_status_t on_tx_msg(pjsip_tx_data *tdata)
+{
+    if (msg_log_enabled) {
+	PJ_LOG(4,(THIS_FILE, "TX %d bytes %s to %s:%s:%d:\n"
+			     "%.*s\n"
+			     "--end msg--",
+			     (tdata->buf.cur - tdata->buf.start),
+			     pjsip_tx_data_get_info(tdata),
+			     tdata->tp_info.transport->type_name,
+			     tdata->tp_info.dst_name,
+			     tdata->tp_info.dst_port,
+			     (tdata->buf.cur - tdata->buf.start),
+			     tdata->buf.start));
+    }
+    return PJ_SUCCESS;
+}
+
+
+/* Message logger module. */
+static pjsip_module mod_msg_logger = 
+{
+    NULL, NULL,				/* prev and next	*/
+    { "mod-msg-logger", 14},		/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_TRANSPORT_LAYER-1,/* Priority		*/
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    &on_rx_msg,				/* on_rx_request()	*/
+    &on_rx_msg,				/* on_rx_response()	*/
+    &on_tx_msg,				/* on_tx_request()	*/
+    &on_tx_msg,				/* on_tx_response()	*/
+    NULL,				/* on_tsx_state()	*/
+};
+
+int init_msg_logger(void)
+{
+    pj_status_t status;
+
+    if (mod_msg_logger.id != -1)
+	return 0;
+
+    status = pjsip_endpt_register_module(endpt, &mod_msg_logger);
+    if (status != PJ_SUCCESS) {
+	app_perror("  error registering module", status);
+	return -10;
+    }
+
+    return 0;
+}
+
+int msg_logger_set_enabled(pj_bool_t enabled)
+{
+    int val = msg_log_enabled;
+    msg_log_enabled = enabled;
+    return val;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/msg_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/msg_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/msg_test.c	(revision 1163)
@@ -0,0 +1,867 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+#define POOL_SIZE	8000
+#if defined(PJ_DEBUG) && PJ_DEBUG!=0
+#   define LOOP		10000
+#else
+#   define LOOP		100000
+#endif
+#define AVERAGE_MSG_LEN	800
+#define THIS_FILE	"msg_test.c"
+
+static pjsip_msg *create_msg0(pj_pool_t *pool);
+static pjsip_msg *create_msg1(pj_pool_t *pool);
+
+#define STATUS_PARTIAL		1
+#define STATUS_SYNTAX_ERROR	2
+
+#define FLAG_DETECT_ONLY	1
+#define FLAG_PARSE_ONLY		4
+#define FLAG_PRINT_ONLY		8
+
+struct test_msg
+{
+    char	 msg[1024];
+    pjsip_msg *(*creator)(pj_pool_t *pool);
+    pj_size_t	 len;
+    int		 expected_status;
+} test_array[] = 
+{
+{
+    /* 'Normal' message with all headers. */
+    "INVITE sip:user@foo SIP/2.0\n"
+    "from: Hi I'm Joe <sip:joe.user@bar.otherdomain.com>;tag=123457890123456\r"
+    "To: Fellow User <sip:user@foo.bar.domain.com>\r\n"
+    "Call-ID: 12345678901234567890@bar\r\n"
+    "Content-Length: 0\r\n"
+    "CSeq: 123456 INVITE\n"
+    "Contact: <sip:joe@bar> ; q=0.5;expires=3600,sip:user@host;q=0.500\r"
+    "  ,sip:user2@host2\n"
+    "Content-Type: text/html ; charset=ISO-8859-4\r"
+    "Route: <sip:bigbox3.site3.atlanta.com;lr>,\r\n"
+    "  <sip:server10.biloxi.com;lr>\r"
+    "Record-Route: <sip:server10.biloxi.com>,\r\n" /* multiple routes+folding*/
+    "  <sip:bigbox3.site3.atlanta.com;lr>\n"
+    "v: SIP/2.0/SCTP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c230\n"
+    "Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8\n" /* folding. */
+    " ;received=192.0.2.1\r\n"
+    "Via: SIP/2.0/UDP 10.2.1.1, SIP/2.0/TCP 192.168.1.1\n"
+    "Organization: \r"
+    "Max-Forwards: 70\n"
+    "X-Header: \r\n"	    /* empty header */
+    "P-Associated-URI:\r\n" /* empty header without space */
+    "\r\n",
+    &create_msg0,
+    PJ_SUCCESS
+},
+{
+    /* Typical response message. */
+    "SIP/2.0 200 OK\r\n"
+    "Via: SIP/2.0/SCTP server10.biloxi.com;branch=z9hG4bKnashds8;rport;received=192.0.2.1\r\n"
+    "Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1;received=192.0.2.2\r\n"
+    "Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776asdhds ;received=192.0.2.3\r\n"
+    "Route: <sip:proxy.sipprovider.com>\r\n"
+    "Route: <sip:proxy.supersip.com:5060>\r\n"
+    "Max-Forwards: 70\r\n"
+    "To: Bob <sip:bob@biloxi.com>;tag=a6c85cf\r\n"
+    "From: Alice <sip:alice@atlanta.com>;tag=1928301774\r\n"
+    "Call-ID: a84b4c76e66710@pc33.atlanta.com\r\n"
+    "CSeq: 314159 INVITE\r\n"
+    "Contact: <sips:bob@192.0.2.4>\r\n"
+    "Content-Type: application/sdp\r\n"
+    "Content-Length: 150\r\n"
+    "\r\n"
+    "v=0\r\n"
+    "o=alice 53655765 2353687637 IN IP4 pc33.atlanta.com\r\n"
+    "s=-\r\n"
+    "t=0 0\r\n"
+    "c=IN IP4 pc33.atlanta.com\r\n"
+    "m=audio 3456 RTP/AVP 0 1 3 99\r\n"
+    "a=rtpmap:0 PCMU/8000\r\n",
+    &create_msg1,
+    PJ_SUCCESS
+}
+};
+
+static struct
+{
+    int flag;
+    pj_highprec_t detect_len, parse_len, print_len;
+    pj_timestamp  detect_time, parse_time, print_time;
+} var;
+
+static pj_status_t test_entry( pj_pool_t *pool, struct test_msg *entry )
+{
+    pjsip_msg *parsed_msg, *ref_msg = NULL;
+    static pjsip_msg *print_msg;
+    pj_status_t status = PJ_SUCCESS;
+    int len;
+    pj_str_t str1, str2;
+    pjsip_hdr *hdr1, *hdr2;
+    pj_timestamp t1, t2;
+    pjsip_parser_err_report err_list;
+    pj_size_t msg_size;
+    char msgbuf1[PJSIP_MAX_PKT_LEN];
+    char msgbuf2[PJSIP_MAX_PKT_LEN];
+    enum { BUFLEN = 512 };
+
+    entry->len = pj_native_strlen(entry->msg);
+
+    if (var.flag & FLAG_PARSE_ONLY)
+	goto parse_msg;
+
+    if (var.flag & FLAG_PRINT_ONLY) {
+	if (print_msg == NULL)
+	    print_msg = entry->creator(pool);
+	goto print_msg;
+    }
+
+    /* Detect message. */
+    var.detect_len = var.detect_len + entry->len;
+    pj_get_timestamp(&t1);
+    status = pjsip_find_msg(entry->msg, entry->len, PJ_FALSE, &msg_size);
+    if (status != PJ_SUCCESS) {
+	if (status!=PJSIP_EPARTIALMSG || 
+	    entry->expected_status!=STATUS_PARTIAL)
+	{
+	    app_perror("   error: unable to detect message", status);
+	    return -5;
+	}
+    }
+    if (msg_size != entry->len) {
+	PJ_LOG(3,(THIS_FILE, "   error: size mismatch"));
+	return -6;
+    }
+    pj_get_timestamp(&t2);
+    pj_sub_timestamp(&t2, &t1);
+    pj_add_timestamp(&var.detect_time, &t2);
+
+    if (var.flag & FLAG_DETECT_ONLY)
+	return PJ_SUCCESS;
+    
+    /* Parse message. */
+parse_msg:
+    var.parse_len = var.parse_len + entry->len;
+    pj_get_timestamp(&t1);
+    pj_list_init(&err_list);
+    parsed_msg = pjsip_parse_msg(pool, entry->msg, entry->len, &err_list);
+    if (parsed_msg == NULL) {
+	if (entry->expected_status != STATUS_SYNTAX_ERROR) {
+	    status = -10;
+	    if (err_list.next != &err_list) {
+		PJ_LOG(3,(THIS_FILE, "   Syntax error in line %d col %d",
+			      err_list.next->line, err_list.next->col));
+	    }
+	    goto on_return;
+	}
+    }
+    pj_get_timestamp(&t2);
+    pj_sub_timestamp(&t2, &t1);
+    pj_add_timestamp(&var.parse_time, &t2);
+
+    if (var.flag & FLAG_PARSE_ONLY)
+	return PJ_SUCCESS;
+
+    /* Create reference message. */
+    ref_msg = entry->creator(pool);
+
+    /* Create buffer for comparison. */
+    str1.ptr = pj_pool_alloc(pool, BUFLEN);
+    str2.ptr = pj_pool_alloc(pool, BUFLEN);
+
+    /* Compare message type. */
+    if (parsed_msg->type != ref_msg->type) {
+	status = -20;
+	goto on_return;
+    }
+
+    /* Compare request or status line. */
+    if (parsed_msg->type == PJSIP_REQUEST_MSG) {
+	pjsip_method *m1 = &parsed_msg->line.req.method;
+	pjsip_method *m2 = &ref_msg->line.req.method;
+
+	if (pjsip_method_cmp(m1, m2) != 0) {
+	    status = -30;
+	    goto on_return;
+	}
+	status = pjsip_uri_cmp(PJSIP_URI_IN_REQ_URI,
+			       parsed_msg->line.req.uri, 
+			       ref_msg->line.req.uri);
+	if (status != PJ_SUCCESS) {
+	    app_perror("   error: request URI mismatch", status);
+	    status = -31;
+	    goto on_return;
+	}
+    } else {
+	if (parsed_msg->line.status.code != ref_msg->line.status.code) {
+	    PJ_LOG(3,(THIS_FILE, "   error: status code mismatch"));
+	    status = -32;
+	    goto on_return;
+	}
+	if (pj_strcmp(&parsed_msg->line.status.reason, 
+		      &ref_msg->line.status.reason) != 0) 
+	{
+	    PJ_LOG(3,(THIS_FILE, "   error: status text mismatch"));
+	    status = -33;
+	    goto on_return;
+	}
+    }
+
+    /* Compare headers. */
+    hdr1 = parsed_msg->hdr.next;
+    hdr2 = ref_msg->hdr.next;
+
+    while (hdr1 != &parsed_msg->hdr && hdr2 != &ref_msg->hdr) {
+	len = hdr1->vptr->print_on(hdr1, str1.ptr, BUFLEN);
+	if (len < 1) {
+	    status = -40;
+	    goto on_return;
+	}
+	str1.ptr[len] = '\0';
+	str1.slen = len;
+
+	len = hdr2->vptr->print_on(hdr2, str2.ptr, BUFLEN);
+	if (len < 1) {
+	    status = -50;
+	    goto on_return;
+	}
+	str2.ptr[len] = '\0';
+	str2.slen = len;
+
+	if (pj_strcmp(&str1, &str2) != 0) {
+	    status = -60;
+	    PJ_LOG(3,(THIS_FILE, "   error: header string mismatch:\n"
+		          "   h1='%s'\n"
+			  "   h2='%s'\n",
+			  str1.ptr, str2.ptr));
+	    goto on_return;
+	}
+
+	hdr1 = hdr1->next;
+	hdr2 = hdr2->next;
+    }
+
+    if (hdr1 != &parsed_msg->hdr || hdr2 != &ref_msg->hdr) {
+	status = -70;
+	goto on_return;
+    }
+
+    /* Compare body? */
+    if (parsed_msg->body==NULL && ref_msg->body==NULL)
+	goto print_msg;
+
+    /* Compare msg body length. */
+    if (parsed_msg->body->len != ref_msg->body->len) {
+	status = -80;
+	goto on_return;
+    }
+
+    /* Compare msg body content type. */
+    if (pj_strcmp(&parsed_msg->body->content_type.type,
+	          &ref_msg->body->content_type.type) != 0) {
+	status = -90;
+	goto on_return;
+    }
+    if (pj_strcmp(&parsed_msg->body->content_type.subtype,
+	          &ref_msg->body->content_type.subtype) != 0) {
+	status = -100;
+	goto on_return;
+    }
+
+    /* Compare body content. */
+    str1.slen = parsed_msg->body->print_body(parsed_msg->body,
+					     msgbuf1, sizeof(msgbuf1));
+    if (str1.slen < 1) {
+	status = -110;
+	goto on_return;
+    }
+    str1.ptr = msgbuf1;
+
+    str2.slen = ref_msg->body->print_body(ref_msg->body,
+					  msgbuf2, sizeof(msgbuf2));
+    if (str2.slen < 1) {
+	status = -120;
+	goto on_return;
+    }
+    str2.ptr = msgbuf2;
+
+    if (pj_strcmp(&str1, &str2) != 0) {
+	status = -140;
+	goto on_return;
+    }
+    
+    /* Print message. */
+print_msg:
+    var.print_len = var.print_len + entry->len;
+    pj_get_timestamp(&t1);
+    if (var.flag && FLAG_PRINT_ONLY)
+	ref_msg = print_msg;
+    len = pjsip_msg_print(ref_msg, msgbuf1, PJSIP_MAX_PKT_LEN);
+    if (len < 1) {
+	status = -150;
+	goto on_return;
+    }
+    pj_get_timestamp(&t2);
+    pj_sub_timestamp(&t2, &t1);
+    pj_add_timestamp(&var.print_time, &t2);
+
+
+    status = PJ_SUCCESS;
+
+on_return:
+    return status;
+}
+
+
+static pjsip_msg *create_msg0(pj_pool_t *pool)
+{
+
+    pjsip_msg *msg;
+    pjsip_name_addr *name_addr;
+    pjsip_sip_uri *url;
+    pjsip_fromto_hdr *fromto;
+    pjsip_cid_hdr *cid;
+    pjsip_clen_hdr *clen;
+    pjsip_cseq_hdr *cseq;
+    pjsip_contact_hdr *contact;
+    pjsip_ctype_hdr *ctype;
+    pjsip_routing_hdr *routing;
+    pjsip_via_hdr *via;
+    pjsip_generic_string_hdr *generic;
+    pj_str_t str;
+
+    msg = pjsip_msg_create(pool, PJSIP_REQUEST_MSG);
+
+    /* "INVITE sip:user@foo SIP/2.0\n" */
+    pjsip_method_set(&msg->line.req.method, PJSIP_INVITE_METHOD);
+    url = pjsip_sip_uri_create(pool, 0);
+    msg->line.req.uri = (pjsip_uri*)url;
+    pj_strdup2(pool, &url->user, "user");
+    pj_strdup2(pool, &url->host, "foo");
+
+    /* "From: Hi I'm Joe <sip:joe.user@bar.otherdomain.com>;tag=123457890123456\r" */
+    fromto = pjsip_from_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)fromto);
+    pj_strdup2(pool, &fromto->tag, "123457890123456");
+    name_addr = pjsip_name_addr_create(pool);
+    fromto->uri = (pjsip_uri*)name_addr;
+    pj_strdup2(pool, &name_addr->display, "Hi I'm Joe");
+    url = pjsip_sip_uri_create(pool, 0);
+    name_addr->uri = (pjsip_uri*)url;
+    pj_strdup2(pool, &url->user, "joe.user");
+    pj_strdup2(pool, &url->host, "bar.otherdomain.com");
+
+    /* "To: Fellow User <sip:user@foo.bar.domain.com>\r\n" */
+    fromto = pjsip_to_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)fromto);
+    name_addr = pjsip_name_addr_create(pool);
+    fromto->uri = (pjsip_uri*)name_addr;
+    pj_strdup2(pool, &name_addr->display, "Fellow User");
+    url = pjsip_sip_uri_create(pool, 0);
+    name_addr->uri = (pjsip_uri*)url;
+    pj_strdup2(pool, &url->user, "user");
+    pj_strdup2(pool, &url->host, "foo.bar.domain.com");
+
+    /* "Call-ID: 12345678901234567890@bar\r\n" */
+    cid = pjsip_cid_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)cid);
+    pj_strdup2(pool, &cid->id, "12345678901234567890@bar");
+
+    /* "Content-Length: 0\r\n" */
+    clen = pjsip_clen_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)clen);
+    clen->len = 0;
+
+    /* "CSeq: 123456 INVITE\n" */
+    cseq = pjsip_cseq_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)cseq);
+    cseq->cseq = 123456;
+    pjsip_method_set(&cseq->method, PJSIP_INVITE_METHOD);
+
+    /* "Contact: <sip:joe@bar>;q=0.5;expires=3600*/
+    contact = pjsip_contact_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)contact);
+    contact->q1000 = 500;
+    contact->expires = 3600;
+    name_addr = pjsip_name_addr_create(pool);
+    contact->uri = (pjsip_uri*)name_addr;
+    url = pjsip_sip_uri_create(pool, 0);
+    name_addr->uri = (pjsip_uri*)url;
+    pj_strdup2(pool, &url->user, "joe");
+    pj_strdup2(pool, &url->host, "bar");
+
+    /*, sip:user@host;q=0.500\r" */
+    contact = pjsip_contact_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)contact);
+    contact->q1000 = 500;
+    name_addr = pjsip_name_addr_create(pool);
+    contact->uri = (pjsip_uri*)name_addr;
+    url = pjsip_sip_uri_create(pool, 0);
+    name_addr->uri = (pjsip_uri*)url;
+    pj_strdup2(pool, &url->user, "user");
+    pj_strdup2(pool, &url->host, "host");
+
+    /* "  ,sip:user2@host2\n" */
+    contact = pjsip_contact_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)contact);
+    name_addr = pjsip_name_addr_create(pool);
+    contact->uri = (pjsip_uri*)name_addr;
+    url = pjsip_sip_uri_create(pool, 0);
+    name_addr->uri = (pjsip_uri*)url;
+    pj_strdup2(pool, &url->user, "user2");
+    pj_strdup2(pool, &url->host, "host2");
+
+    /* "Content-Type: text/html; charset=ISO-8859-4\r" */
+    ctype = pjsip_ctype_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)ctype);
+    pj_strdup2(pool, &ctype->media.type, "text");
+    pj_strdup2(pool, &ctype->media.subtype, "html");
+    pj_strdup2(pool, &ctype->media.param, ";charset=ISO-8859-4");
+
+    /* "Route: <sip:bigbox3.site3.atlanta.com;lr>,\r\n" */
+    routing = pjsip_route_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)routing);
+    url = pjsip_sip_uri_create(pool, 0);
+    routing->name_addr.uri = (pjsip_uri*)url;
+    pj_strdup2(pool, &url->host, "bigbox3.site3.atlanta.com");
+    url->lr_param = 1;
+
+    /* "  <sip:server10.biloxi.com;lr>\r" */
+    routing = pjsip_route_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)routing);
+    url = pjsip_sip_uri_create(pool, 0);
+    routing->name_addr.uri = (pjsip_uri*)url;
+    pj_strdup2(pool, &url->host, "server10.biloxi.com");
+    url->lr_param = 1;
+
+    /* "Record-Route: <sip:server10.biloxi.com>,\r\n" */
+    routing = pjsip_rr_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)routing);
+    url = pjsip_sip_uri_create(pool, 0);
+    routing->name_addr.uri = (pjsip_uri*)url;
+    pj_strdup2(pool, &url->host, "server10.biloxi.com");
+    url->lr_param = 0;
+
+    /* "  <sip:bigbox3.site3.atlanta.com;lr>\n" */
+    routing = pjsip_rr_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)routing);
+    url = pjsip_sip_uri_create(pool, 0);
+    routing->name_addr.uri = (pjsip_uri*)url;
+    pj_strdup2(pool, &url->host, "bigbox3.site3.atlanta.com");
+    url->lr_param = 1;
+
+    /* "Via: SIP/2.0/SCTP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c230\n" */
+    via = pjsip_via_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)via);
+    pj_strdup2(pool, &via->transport, "SCTP");
+    pj_strdup2(pool, &via->sent_by.host, "bigbox3.site3.atlanta.com");
+    pj_strdup2(pool, &via->branch_param, "z9hG4bK77ef4c230");
+
+    /* "Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bKnashds8\n"
+	" ;received=192.0.2.1\r\n" */
+    via = pjsip_via_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)via);
+    pj_strdup2(pool, &via->transport, "UDP");
+    pj_strdup2(pool, &via->sent_by.host, "pc33.atlanta.com");
+    pj_strdup2(pool, &via->branch_param, "z9hG4bKnashds8");
+    pj_strdup2(pool, &via->recvd_param, "192.0.2.1");
+
+
+    /* "Via: SIP/2.0/UDP 10.2.1.1, */ 
+    via = pjsip_via_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)via);
+    pj_strdup2(pool, &via->transport, "UDP");
+    pj_strdup2(pool, &via->sent_by.host, "10.2.1.1");
+    
+    
+    /*SIP/2.0/TCP 192.168.1.1\n" */
+    via = pjsip_via_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)via);
+    pj_strdup2(pool, &via->transport, "TCP");
+    pj_strdup2(pool, &via->sent_by.host, "192.168.1.1");
+
+    /* "Organization: \r" */
+    str.ptr = "Organization";
+    str.slen = 12;
+    generic = pjsip_generic_string_hdr_create(pool, &str, NULL);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)generic);
+    generic->hvalue.ptr = NULL;
+    generic->hvalue.slen = 0;
+
+    /* "Max-Forwards: 70\n" */
+    str.ptr = "Max-Forwards";
+    str.slen = 12;
+    generic = pjsip_generic_string_hdr_create(pool, &str, NULL);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)generic);
+    str.ptr = "70";
+    str.slen = 2;
+    generic->hvalue = str;
+
+    /* "X-Header: \r\n" */
+    str.ptr = "X-Header";
+    str.slen = 8;
+    generic = pjsip_generic_string_hdr_create(pool, &str, NULL);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)generic);
+    str.ptr = NULL;
+    str.slen = 0;
+    generic->hvalue = str;
+
+    /* P-Associated-URI:\r\n */
+    str.ptr = "P-Associated-URI";
+    str.slen = 16;
+    generic = pjsip_generic_string_hdr_create(pool, &str, NULL);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)generic);
+    str.ptr = NULL;
+    str.slen = 0;
+    generic->hvalue = str;
+
+    return msg;
+}
+
+static pjsip_msg *create_msg1(pj_pool_t *pool)
+{
+    pjsip_via_hdr *via;
+    pjsip_route_hdr *route;
+    pjsip_name_addr *name_addr;
+    pjsip_sip_uri *url;
+    pjsip_max_fwd_hdr *max_fwd;
+    pjsip_to_hdr *to;
+    pjsip_from_hdr *from;
+    pjsip_contact_hdr *contact;
+    pjsip_ctype_hdr *ctype;
+    pjsip_cid_hdr *cid;
+    pjsip_clen_hdr *clen;
+    pjsip_cseq_hdr *cseq;
+    pjsip_msg *msg = pjsip_msg_create(pool, PJSIP_RESPONSE_MSG);
+    pjsip_msg_body *body;
+
+    //"SIP/2.0 200 OK\r\n"
+    msg->line.status.code = 200;
+    msg->line.status.reason = pj_str("OK");
+
+    //"Via: SIP/2.0/SCTP server10.biloxi.com;branch=z9hG4bKnashds8;rport;received=192.0.2.1\r\n"
+    via = pjsip_via_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)via);
+    via->transport = pj_str("SCTP");
+    via->sent_by.host = pj_str("server10.biloxi.com");
+    via->branch_param = pj_str("z9hG4bKnashds8");
+    via->rport_param = 0;
+    via->recvd_param = pj_str("192.0.2.1");
+
+    //"Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1;received=192.0.2.2\r\n"
+    via = pjsip_via_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)via);
+    via->transport = pj_str("UDP");
+    via->sent_by.host = pj_str("bigbox3.site3.atlanta.com");
+    via->branch_param = pj_str("z9hG4bK77ef4c2312983.1");
+    via->recvd_param = pj_str("192.0.2.2");
+
+    //"Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776asdhds ;received=192.0.2.3\r\n"
+    via = pjsip_via_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)via);
+    via->transport = pj_str("UDP");
+    via->sent_by.host = pj_str("pc33.atlanta.com");
+    via->branch_param = pj_str("z9hG4bK776asdhds");
+    via->recvd_param = pj_str("192.0.2.3");
+
+    //"Route: <sip:proxy.sipprovider.com>\r\n"
+    route = pjsip_route_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)route);
+    url = pjsip_sip_uri_create(pool, PJ_FALSE);
+    route->name_addr.uri = (pjsip_uri*)url;
+    url->host = pj_str("proxy.sipprovider.com");
+    
+    //"Route: <sip:proxy.supersip.com:5060>\r\n"
+    route = pjsip_route_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)route);
+    url = pjsip_sip_uri_create(pool, PJ_FALSE);
+    route->name_addr.uri = (pjsip_uri*)url;
+    url->host = pj_str("proxy.supersip.com");
+    url->port = 5060;
+
+    //"Max-Forwards: 70\r\n"
+    max_fwd = pjsip_max_fwd_hdr_create(pool, 70);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)max_fwd);
+
+    //"To: Bob <sip:bob@biloxi.com>;tag=a6c85cf\r\n"
+    to = pjsip_to_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)to);
+    name_addr = pjsip_name_addr_create(pool);
+    name_addr->display = pj_str("Bob");
+    to->uri = (pjsip_uri*)name_addr;
+    url = pjsip_sip_uri_create(pool, PJ_FALSE);
+    name_addr->uri = (pjsip_uri*)url;
+    url->user = pj_str("bob");
+    url->host = pj_str("biloxi.com");
+    to->tag = pj_str("a6c85cf");
+
+    //"From: Alice <sip:alice@atlanta.com>;tag=1928301774\r\n"
+    from = pjsip_from_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)from);
+    name_addr = pjsip_name_addr_create(pool);
+    name_addr->display = pj_str("Alice");
+    from->uri = (pjsip_uri*)name_addr;
+    url = pjsip_sip_uri_create(pool, PJ_FALSE);
+    name_addr->uri = (pjsip_uri*)url;
+    url->user = pj_str("alice");
+    url->host = pj_str("atlanta.com");
+    from->tag = pj_str("1928301774");
+
+    //"Call-ID: a84b4c76e66710@pc33.atlanta.com\r\n"
+    cid = pjsip_cid_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)cid);
+    cid->id = pj_str("a84b4c76e66710@pc33.atlanta.com");
+
+    //"CSeq: 314159 INVITE\r\n"
+    cseq = pjsip_cseq_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)cseq);
+    cseq->cseq = 314159;
+    pjsip_method_set(&cseq->method, PJSIP_INVITE_METHOD);
+
+    //"Contact: <sips:bob@192.0.2.4>\r\n"
+    contact = pjsip_contact_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)contact);
+    name_addr = pjsip_name_addr_create(pool);
+    contact->uri = (pjsip_uri*)name_addr;
+    url = pjsip_sip_uri_create(pool, PJ_TRUE);
+    name_addr->uri = (pjsip_uri*)url;
+    url->user = pj_str("bob");
+    url->host = pj_str("192.0.2.4");
+
+    //"Content-Type: application/sdp\r\n"
+    ctype = pjsip_ctype_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)ctype);
+    ctype->media.type = pj_str("application");
+    ctype->media.subtype = pj_str("sdp");
+
+    //"Content-Length: 150\r\n"
+    clen = pjsip_clen_hdr_create(pool);
+    pjsip_msg_add_hdr(msg, (pjsip_hdr*)clen);
+    clen->len = 150;
+
+    // Body
+    body = pj_pool_zalloc(pool, sizeof(*body));
+    msg->body = body;
+    body->content_type.type = pj_str("application");
+    body->content_type.subtype = pj_str("sdp");
+    body->data = 
+	"v=0\r\n"
+	"o=alice 53655765 2353687637 IN IP4 pc33.atlanta.com\r\n"
+	"s=-\r\n"
+	"t=0 0\r\n"
+	"c=IN IP4 pc33.atlanta.com\r\n"
+	"m=audio 3456 RTP/AVP 0 1 3 99\r\n"
+	"a=rtpmap:0 PCMU/8000\r\n";
+    body->len = pj_native_strlen(body->data);
+    body->print_body = &pjsip_print_text_body;
+
+    return msg;
+}
+
+/*****************************************************************************/
+
+static pj_status_t simple_test(void)
+{
+    unsigned i;
+    pj_status_t status;
+
+    PJ_LOG(3,(THIS_FILE, "  simple test.."));
+    for (i=0; i<PJ_ARRAY_SIZE(test_array); ++i) {
+	pj_pool_t *pool;
+	pool = pjsip_endpt_create_pool(endpt, NULL, POOL_SIZE, POOL_SIZE);
+	status = test_entry( pool, &test_array[i] );
+	pjsip_endpt_release_pool(endpt, pool);
+
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    return PJ_SUCCESS;
+}
+
+
+static int msg_benchmark(unsigned *p_detect, unsigned *p_parse, 
+			 unsigned *p_print)
+{
+    pj_status_t status;
+    pj_pool_t *pool;
+    int i, loop;
+    pj_timestamp zero;
+    pj_time_val elapsed;
+    pj_highprec_t avg_detect, avg_parse, avg_print, kbytes;
+
+
+    pj_bzero(&var, sizeof(var));
+    zero.u64 = 0;
+
+    for (loop=0; loop<LOOP; ++loop) {
+	for (i=0; i<PJ_ARRAY_SIZE(test_array); ++i) {
+	    pool = pjsip_endpt_create_pool(endpt, NULL, POOL_SIZE, POOL_SIZE);
+	    status = test_entry( pool, &test_array[i] );
+	    pjsip_endpt_release_pool(endpt, pool);
+
+	    if (status != PJ_SUCCESS)
+		return status;
+	}
+    }
+
+    kbytes = var.detect_len;
+    pj_highprec_mod(kbytes, 1000000);
+    pj_highprec_div(kbytes, 100000);
+    elapsed = pj_elapsed_time(&zero, &var.detect_time);
+    avg_detect = pj_elapsed_usec(&zero, &var.detect_time);
+    pj_highprec_mul(avg_detect, AVERAGE_MSG_LEN);
+    pj_highprec_div(avg_detect, var.detect_len);
+    avg_detect = 1000000 / avg_detect;
+
+    PJ_LOG(3,(THIS_FILE, 
+	      "    %u.%u MB detected in %d.%03ds (avg=%d msg detection/sec)", 
+	      (unsigned)(var.detect_len/1000000), (unsigned)kbytes,
+	      elapsed.sec, elapsed.msec,
+	      (unsigned)avg_detect));
+    *p_detect = (unsigned)avg_detect;
+
+    kbytes = var.parse_len;
+    pj_highprec_mod(kbytes, 1000000);
+    pj_highprec_div(kbytes, 100000);
+    elapsed = pj_elapsed_time(&zero, &var.parse_time);
+    avg_parse = pj_elapsed_usec(&zero, &var.parse_time);
+    pj_highprec_mul(avg_parse, AVERAGE_MSG_LEN);
+    pj_highprec_div(avg_parse, var.parse_len);
+    avg_parse = 1000000 / avg_parse;
+
+    PJ_LOG(3,(THIS_FILE, 
+	      "    %u.%u MB parsed in %d.%03ds (avg=%d msg parsing/sec)", 
+	      (unsigned)(var.parse_len/1000000), (unsigned)kbytes,
+	      elapsed.sec, elapsed.msec,
+	      (unsigned)avg_parse));
+    *p_parse = (unsigned)avg_parse;
+
+    kbytes = var.print_len;
+    pj_highprec_mod(kbytes, 1000000);
+    pj_highprec_div(kbytes, 100000);
+    elapsed = pj_elapsed_time(&zero, &var.print_time);
+    avg_print = pj_elapsed_usec(&zero, &var.print_time);
+    pj_highprec_mul(avg_print, AVERAGE_MSG_LEN);
+    pj_highprec_div(avg_print, var.print_len);
+    avg_print = 1000000 / avg_print;
+
+    PJ_LOG(3,(THIS_FILE, 
+	      "    %u.%u MB printed in %d.%03ds (avg=%d msg print/sec)", 
+	      (unsigned)(var.print_len/1000000), (unsigned)kbytes,
+	      elapsed.sec, elapsed.msec,
+	      (unsigned)avg_print));
+
+    *p_print = (unsigned)avg_print;
+    return status;
+}
+
+/*****************************************************************************/
+
+int msg_test(void)
+{
+    enum { COUNT = 4, DETECT=0, PARSE=1, PRINT=2 };
+    struct {
+	unsigned detect;
+	unsigned parse;
+	unsigned print;
+    } run[COUNT];
+    unsigned i, max, avg_len;
+    char desc[250];
+    pj_status_t status;
+
+    status = simple_test();
+    if (status != PJ_SUCCESS)
+	return status;
+
+    for (i=0; i<COUNT; ++i) {
+	PJ_LOG(3,(THIS_FILE, "  benchmarking (%d of %d)..", i+1, COUNT));
+	status = msg_benchmark(&run[i].detect, &run[i].parse, &run[i].print);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    /* Calculate average message length */
+    for (i=0, avg_len=0; i<PJ_ARRAY_SIZE(test_array); ++i) {
+	avg_len += test_array[i].len;
+    }
+    avg_len /= PJ_ARRAY_SIZE(test_array);
+
+
+    /* Print maximum detect/sec */
+    for (i=0, max=0; i<COUNT; ++i)
+	if (run[i].detect > max) max = run[i].detect;
+
+    PJ_LOG(3,("", "  Maximum message detection/sec=%u", max));
+
+    pj_ansi_sprintf(desc, "Number of SIP messages "
+			  "can be pre-parse by <tt>pjsip_find_msg()</tt> "
+			  "per second (tested with %d message sets with "
+			  "average message length of "
+			  "%d bytes)", (int)PJ_ARRAY_SIZE(test_array), avg_len);
+    report_ival("msg-detect-per-sec", max, "msg/sec", desc);
+
+    /* Print maximum parse/sec */
+    for (i=0, max=0; i<COUNT; ++i)
+	if (run[i].parse > max) max = run[i].parse;
+
+    PJ_LOG(3,("", "  Maximum message parsing/sec=%u", max));
+
+    pj_ansi_sprintf(desc, "Number of SIP messages "
+			  "can be <b>parsed</b> by <tt>pjsip_parse_msg()</tt> "
+			  "per second (tested with %d message sets with "
+			  "average message length of "
+			  "%d bytes)", (int)PJ_ARRAY_SIZE(test_array), avg_len);
+    report_ival("msg-parse-per-sec", max, "msg/sec", desc);
+
+    /* Msg parsing bandwidth */
+    report_ival("msg-parse-bandwidth-mb", avg_len*max/1000000, "MB/sec",
+	        "Message parsing bandwidth in megabytes (number of megabytes"
+		" worth of SIP messages that can be parsed per second). "
+		"The value is derived from msg-parse-per-sec above.");
+
+
+    /* Print maximum print/sec */
+    for (i=0, max=0; i<COUNT; ++i)
+	if (run[i].print > max) max = run[i].print;
+
+    PJ_LOG(3,("", "  Maximum message print/sec=%u", max));
+
+    pj_ansi_sprintf(desc, "Number of SIP messages "
+			  "can be <b>printed</b> by <tt>pjsip_msg_print()</tt>"
+			  " per second (tested with %d message sets with "
+			  "average message length of "
+			  "%d bytes)", (int)PJ_ARRAY_SIZE(test_array), avg_len);
+
+    report_ival("msg-print-per-sec", max, "msg/sec", desc);
+
+    /* Msg print bandwidth */
+    report_ival("msg-printed-bandwidth-mb", avg_len*max/1000000, "MB/sec",
+	        "Message print bandwidth in megabytes (total size of "
+		"SIP messages printed per second). "
+		"The value is derived from msg-print-per-sec above.");
+
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/test.c	(revision 1163)
@@ -0,0 +1,384 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjlib.h>
+#include <pjlib-util.h>
+#include <pjsip.h>
+
+#define THIS_FILE   "test.c"
+
+#define DO_TEST(test)	do { \
+			    PJ_LOG(3, (THIS_FILE, "Running %s...", #test));  \
+			    rc = test; \
+			    PJ_LOG(3, (THIS_FILE,  \
+				       "%s(%d)",  \
+				       (rc ? "..ERROR" : "..success"), rc)); \
+			    if (rc!=0) goto on_return; \
+			} while (0)
+
+#define DO_TSX_TEST(test, param) \
+			do { \
+			    PJ_LOG(3, (THIS_FILE, "Running %s(%s)...", #test, (param)->tp_type));  \
+			    rc = test(param); \
+			    PJ_LOG(3, (THIS_FILE,  \
+				       "%s(%d)",  \
+				       (rc ? "..ERROR" : "..success"), rc)); \
+			    if (rc!=0) goto on_return; \
+			} while (0)
+
+
+pjsip_endpoint *endpt;
+int log_level = 3;
+
+static pj_oshandle_t fd_report;
+const char *system_name = "Unknown";
+static char buf[1024];
+
+void app_perror(const char *msg, pj_status_t rc)
+{
+    char errbuf[256];
+
+    PJ_CHECK_STACK();
+
+    pj_strerror(rc, errbuf, sizeof(errbuf));
+    PJ_LOG(3,(THIS_FILE, "%s: [pj_status_t=%d] %s", msg, rc, errbuf));
+
+}
+
+void flush_events(unsigned duration)
+{
+    pj_time_val stop_time;
+
+    pj_gettimeofday(&stop_time);
+    stop_time.msec += duration;
+    pj_time_val_normalize(&stop_time);
+
+    /* Process all events for the specified duration. */
+    for (;;) {
+	pj_time_val timeout = {0, 1}, now;
+
+	pjsip_endpt_handle_events(endpt, &timeout);
+
+	pj_gettimeofday(&now);
+	if (PJ_TIME_VAL_GTE(now, stop_time))
+	    break;
+    }
+}
+
+pj_status_t register_static_modules(pj_size_t *count, pjsip_module **modules)
+{
+    *count = 0;
+    return PJ_SUCCESS;
+}
+
+static pj_status_t init_report(void)
+{
+    char tmp[80];
+    pj_time_val timestamp;
+    pj_parsed_time date_time;
+    pj_ssize_t len;
+    pj_status_t status;
+    
+    pj_ansi_sprintf(tmp, "pjsip-static-bench-%s-%s.htm", PJ_OS_NAME, PJ_CC_NAME);
+
+    status = pj_file_open(NULL, tmp, PJ_O_WRONLY, &fd_report);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Title */
+    len = pj_ansi_sprintf(buf, "<HTML>\n"
+			       " <HEAD>\n"
+			       "  <TITLE>PJSIP %s (%s) - Static Benchmark</TITLE>\n"
+			       " </HEAD>\n"
+			       "<BODY>\n"
+			       "\n", 
+			       PJ_VERSION,
+			       (PJ_DEBUG ? "Debug" : "Release"));
+    pj_file_write(fd_report, buf, &len);
+
+
+    /* Title */
+    len = pj_ansi_sprintf(buf, "<H1>PJSIP %s (%s) - Static Benchmark</H1>\n", 
+			       PJ_VERSION,
+			       (PJ_DEBUG ? "Debug" : "Release"));
+    pj_file_write(fd_report, buf, &len);
+
+    len = pj_ansi_sprintf(buf, "<P>Below is the benchmark result generated "
+			       "by <b>test-pjsip</b> program. The program "
+			       "is single-threaded only.</P>\n");
+    pj_file_write(fd_report, buf, &len);
+
+
+    /* Write table heading */
+    len = pj_ansi_sprintf(buf, "<TABLE border=\"1\" cellpadding=\"4\">\n"
+			       "  <TR><TD bgColor=\"aqua\" align=\"center\">Variable</TD>\n"
+			       "      <TD bgColor=\"aqua\" align=\"center\">Value</TD>\n"
+			       "      <TD bgColor=\"aqua\" align=\"center\">Description</TD>\n"
+			       "  </TR>\n");
+    pj_file_write(fd_report, buf, &len);
+
+
+    /* Write version */
+    report_sval("version", PJ_VERSION, "", "PJLIB/PJSIP version");
+
+
+    /* Debug or release */
+    report_sval("build-type", (PJ_DEBUG ? "Debug" : "Release"), "", "Build type");
+
+
+    /* Write timestamp */
+    pj_gettimeofday(&timestamp);
+    report_ival("timestamp", timestamp.sec, "", "System timestamp of the test");
+
+
+    /* Write time of day */
+    pj_time_decode(&timestamp, &date_time);
+    len = pj_ansi_sprintf(tmp, "%04d-%02d-%02d %02d:%02d:%02d",
+			       date_time.year, date_time.mon+1, date_time.day,
+			       date_time.hour, date_time.min, date_time.sec);
+    report_sval("date-time", tmp, "", "Date/time of the test");
+
+
+    /* Write System */
+    report_sval("system", system_name, "", "System description");
+
+
+    /* Write OS type */
+    report_sval("os-family", PJ_OS_NAME, "", "Operating system family");
+
+
+    /* Write CC name */
+    len = pj_ansi_sprintf(tmp, "%s-%d.%d.%d", PJ_CC_NAME, 
+			  PJ_CC_VER_1, PJ_CC_VER_2, PJ_CC_VER_2);
+    report_sval("cc-name", tmp, "", "Compiler name and version");
+
+
+    return PJ_SUCCESS;
+}
+
+void report_sval(const char *name, const char* value, const char *valname, 
+		 const char *desc)
+{
+    pj_ssize_t len;
+
+    len = pj_ansi_sprintf(buf, "  <TR><TD><TT>%s</TT></TD>\n"
+			       "      <TD align=\"right\"><B>%s %s</B></TD>\n"
+			       "      <TD>%s</TD>\n"
+			       "  </TR>\n",
+			       name, value, valname, desc);
+    pj_file_write(fd_report, buf, &len);
+}
+
+
+void report_ival(const char *name, int value, const char *valname, 
+		 const char *desc)
+{
+    pj_ssize_t len;
+
+    len = pj_ansi_sprintf(buf, "  <TR><TD><TT>%s</TT></TD>\n"
+			       "      <TD align=\"right\"><B>%d %s</B></TD>\n"
+			       "      <TD>%s</TD>\n"
+			       "  </TR>\n",
+			       name, value, valname, desc);
+    pj_file_write(fd_report, buf, &len);
+
+}
+
+static void close_report(void)
+{
+    pj_ssize_t len;
+
+    if (fd_report) {
+	len = pj_ansi_sprintf(buf, "</TABLE>\n</BODY>\n</HTML>\n");
+	pj_file_write(fd_report, buf, &len);
+
+	pj_file_close(fd_report);
+    }
+}
+
+
+int test_main(void)
+{
+    pj_status_t rc;
+    pj_caching_pool caching_pool;
+    const char *filename;
+    unsigned tsx_test_cnt=0;
+    struct tsx_test_param tsx_test[10];
+    pj_status_t status;
+#if INCLUDE_TSX_TEST
+    unsigned i;
+    pjsip_transport *tp;
+#if PJ_HAS_TCP
+    pjsip_tpfactory *tpfactory;
+#endif	/* PJ_HAS_TCP */
+#endif	/* INCLUDE_TSX_TEST */
+    int line;
+
+    pj_log_set_level(log_level);
+    /*
+    pj_log_set_decor(PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_TIME | 
+                     PJ_LOG_HAS_MICRO_SEC);
+     */
+
+    if ((rc=pj_init()) != PJ_SUCCESS) {
+	app_perror("pj_init", rc);
+	return rc;
+    }
+
+    if ((rc=pjlib_util_init()) != PJ_SUCCESS) {
+	app_perror("pj_init", rc);
+	return rc;
+    }
+
+    status = init_report();
+    if (status != PJ_SUCCESS)
+	return status;
+
+    pj_dump_config();
+
+    pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy, 
+			  PJSIP_TEST_MEM_SIZE );
+
+    rc = pjsip_endpt_create(&caching_pool.factory, "endpt", &endpt);
+    if (rc != PJ_SUCCESS) {
+	app_perror("pjsip_endpt_create", rc);
+	pj_caching_pool_destroy(&caching_pool);
+	return rc;
+    }
+
+    PJ_LOG(3,(THIS_FILE,""));
+
+    /* Init logger module. */
+    init_msg_logger();
+    msg_logger_set_enabled(1);
+
+    /* Start transaction layer module. */
+    rc = pjsip_tsx_layer_init_module(endpt);
+    if (rc != PJ_SUCCESS) {
+	app_perror("   Error initializing transaction module", rc);
+	goto on_return;
+    }
+
+    /* Create loop transport. */
+    rc = pjsip_loop_start(endpt, NULL);
+    if (rc != PJ_SUCCESS) {
+	app_perror("   error: unable to create datagram loop transport", 
+		   rc);
+	goto on_return;
+    }
+    tsx_test[tsx_test_cnt].port = 5060;
+    tsx_test[tsx_test_cnt].tp_type = "loop-dgram";
+    tsx_test[tsx_test_cnt].type = PJSIP_TRANSPORT_LOOP_DGRAM;
+    ++tsx_test_cnt;
+
+
+#if INCLUDE_URI_TEST
+    DO_TEST(uri_test());
+#endif
+
+#if INCLUDE_MSG_TEST
+    DO_TEST(msg_test());
+    DO_TEST(msg_err_test());
+#endif
+
+#if INCLUDE_TXDATA_TEST
+    DO_TEST(txdata_test());
+#endif
+
+#if INCLUDE_TSX_BENCH
+    DO_TEST(tsx_bench());
+#endif
+
+#if INCLUDE_UDP_TEST
+    DO_TEST(transport_udp_test());
+#endif
+
+#if INCLUDE_LOOP_TEST
+    DO_TEST(transport_loop_test());
+#endif
+
+#if INCLUDE_TCP_TEST
+    DO_TEST(transport_tcp_test());
+#endif
+
+#if INCLUDE_RESOLVE_TEST
+    DO_TEST(resolve_test());
+#endif
+
+
+#if INCLUDE_TSX_TEST
+    status = pjsip_udp_transport_start(endpt, NULL, NULL, 1,  &tp);
+    if (status == PJ_SUCCESS) {
+	tsx_test[tsx_test_cnt].port = tp->local_name.port;
+	tsx_test[tsx_test_cnt].tp_type = "udp";
+	tsx_test[tsx_test_cnt].type = PJSIP_TRANSPORT_UDP;
+	++tsx_test_cnt;
+    }
+
+#if PJ_HAS_TCP
+    status = pjsip_tcp_transport_start(endpt, NULL, 1, &tpfactory);
+    if (status == PJ_SUCCESS) {
+	tsx_test[tsx_test_cnt].port = tpfactory->addr_name.port;
+	tsx_test[tsx_test_cnt].tp_type = "tcp";
+	tsx_test[tsx_test_cnt].type = PJSIP_TRANSPORT_TCP;
+	++tsx_test_cnt;
+    } else {
+	app_perror("Unable to create TCP", status);
+	rc = -4;
+	goto on_return;
+    }
+#endif
+
+
+    for (i=0; i<tsx_test_cnt; ++i) {
+	DO_TSX_TEST(tsx_basic_test, &tsx_test[i]);
+	DO_TSX_TEST(tsx_uac_test, &tsx_test[i]);
+	DO_TSX_TEST(tsx_uas_test, &tsx_test[i]);
+    }
+#endif
+
+
+on_return:
+    flush_events(500);
+
+    /* Dumping memory pool usage */
+    PJ_LOG(3,(THIS_FILE, "Peak memory size=%u MB",
+		         caching_pool.peak_used_size / 1000000));
+
+    pjsip_endpt_destroy(endpt);
+    pj_caching_pool_destroy(&caching_pool);
+
+    PJ_LOG(3,(THIS_FILE, ""));
+ 
+    pj_thread_get_stack_info(pj_thread_this(), &filename, &line);
+    PJ_LOG(3,(THIS_FILE, "Stack max usage: %u, deepest: %s:%u", 
+	              pj_thread_get_stack_max_usage(pj_thread_this()),
+		      filename, line));
+    if (rc == 0)
+	PJ_LOG(3,(THIS_FILE, "Looks like everything is okay!.."));
+    else
+	PJ_LOG(3,(THIS_FILE, "Test completed with error(s)"));
+
+    report_ival("test-status", rc, "", "Overall test status/result (0==success)");
+    close_report();
+    return rc;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/test.h
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/test.h	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/test.h	(revision 1163)
@@ -0,0 +1,114 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 __TEST_H__
+#define __TEST_H__
+
+#include <pjsip/sip_types.h>
+
+extern pjsip_endpoint *endpt;
+
+#define TEST_UDP_PORT	    15060
+#define TEST_UDP_PORT_STR   "15060"
+
+/**
+ * Memory size to use in caching pool.
+ * Default: 2MB
+ */
+#ifndef PJSIP_TEST_MEM_SIZE
+#  define PJSIP_TEST_MEM_SIZE	    (2*1024*1024)
+#endif
+
+
+
+#define INCLUDE_MESSAGING_GROUP	    1
+#define INCLUDE_TRANSPORT_GROUP	    1
+#define INCLUDE_TSX_GROUP	    1
+
+/*
+ * Include tests that normally would fail under certain gcc
+ * optimization levels.
+ */
+#ifndef INCLUDE_GCC_TEST
+#   define INCLUDE_GCC_TEST	    0
+#endif
+
+
+#define INCLUDE_URI_TEST	INCLUDE_MESSAGING_GROUP
+#define INCLUDE_MSG_TEST	INCLUDE_MESSAGING_GROUP
+#define INCLUDE_TXDATA_TEST	INCLUDE_MESSAGING_GROUP
+#define INCLUDE_TSX_BENCH	INCLUDE_MESSAGING_GROUP
+#define INCLUDE_UDP_TEST	INCLUDE_TRANSPORT_GROUP
+#define INCLUDE_LOOP_TEST	INCLUDE_TRANSPORT_GROUP
+#define INCLUDE_TCP_TEST	INCLUDE_TRANSPORT_GROUP
+#define INCLUDE_RESOLVE_TEST	INCLUDE_TRANSPORT_GROUP
+#define INCLUDE_TSX_TEST	INCLUDE_TSX_GROUP
+
+
+
+/* The tests */
+int uri_test(void);
+int msg_test(void);
+int msg_err_test(void);
+int txdata_test(void);
+int tsx_bench(void);
+int transport_udp_test(void);
+int transport_loop_test(void);
+int transport_tcp_test(void);
+int resolve_test(void);
+
+struct tsx_test_param
+{
+    int type;
+    int port;
+    char *tp_type;
+};
+
+int tsx_basic_test(struct tsx_test_param *param);
+int tsx_uac_test(struct tsx_test_param *param);
+int tsx_uas_test(struct tsx_test_param *param);
+
+/* Transport test helpers (transport_test.c). */
+int generic_transport_test(pjsip_transport *tp);
+int transport_send_recv_test( pjsip_transport_type_e tp_type,
+			      pjsip_transport *ref_tp,
+			      char *target_url,
+			      int *p_usec_rtt);
+int transport_rt_test( pjsip_transport_type_e tp_type,
+		       pjsip_transport *ref_tp,
+		       char *target_url,
+		       int *pkt_lost);
+
+/* Test main entry */
+int  test_main(void);
+
+/* Test utilities. */
+void app_perror(const char *msg, pj_status_t status);
+int  init_msg_logger(void);
+int  msg_logger_set_enabled(pj_bool_t enabled);
+void flush_events(unsigned duration);
+
+
+void report_ival(const char *name, int value, const char *valname, const char *desc);
+void report_sval(const char *name, const char* value, const char *valname, const char *desc);
+
+
+/* Settings. */
+extern int log_level;
+
+#endif	/* __TEST_H__ */
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/transport_loop_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/transport_loop_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/transport_loop_test.c	(revision 1163)
@@ -0,0 +1,126 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+#define THIS_FILE   "transport_loop_test.c"
+
+static int datagram_loop_test()
+{
+    enum { LOOP = 8 };
+    pjsip_transport *loop;
+    int i, pkt_lost;
+    pj_sockaddr_in addr;
+    pj_status_t status;
+    long ref_cnt;
+    int rtt[LOOP], min_rtt;
+
+    PJ_LOG(3,(THIS_FILE, "testing datagram loop transport"));
+
+    /* Test acquire transport. */
+    status = pjsip_endpt_acquire_transport( endpt, PJSIP_TRANSPORT_LOOP_DGRAM,
+					    &addr, sizeof(addr), NULL, &loop);
+    if (status != PJ_SUCCESS) {
+	app_perror("   error: loop transport is not configured", status);
+	return -20;
+    }
+
+    /* Get initial reference counter */
+    ref_cnt = pj_atomic_get(loop->ref_cnt);
+
+    /* Test basic transport attributes */
+    status = generic_transport_test(loop);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Basic transport's send/receive loopback test. */
+    for (i=0; i<LOOP; ++i) {
+	status = transport_send_recv_test(PJSIP_TRANSPORT_LOOP_DGRAM, loop, 
+					  "sip:bob@130.0.0.1;transport=loop-dgram",
+					  &rtt[i]);
+	if (status != 0)
+	    return status;
+    }
+
+    min_rtt = 0xFFFFFFF;
+    for (i=0; i<LOOP; ++i)
+	if (rtt[i] < min_rtt) min_rtt = rtt[i];
+
+    report_ival("loop-rtt-usec", min_rtt, "usec",
+		"Best Loopback transport round trip time, in microseconds "
+		"(time from sending request until response is received. "
+		"Tests were performed on local machine only)");
+
+
+    /* Multi-threaded round-trip test. */
+    status = transport_rt_test(PJSIP_TRANSPORT_LOOP_DGRAM, loop, 
+			       "sip:bob@130.0.0.1;transport=loop-dgram",
+			       &pkt_lost);
+    if (status != 0)
+	return status;
+
+    if (pkt_lost != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: %d packet(s) was lost", pkt_lost));
+	return -40;
+    }
+
+    /* Put delay. */
+    PJ_LOG(3,(THIS_FILE,"  setting network delay to 10 ms"));
+    pjsip_loop_set_delay(loop, 10);
+
+    /* Multi-threaded round-trip test. */
+    status = transport_rt_test(PJSIP_TRANSPORT_LOOP_DGRAM, loop, 
+			       "sip:bob@130.0.0.1;transport=loop-dgram",
+			       &pkt_lost);
+    if (status != 0)
+	return status;
+
+    if (pkt_lost != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: %d packet(s) was lost", pkt_lost));
+	return -50;
+    }
+
+    /* Restore delay. */
+    pjsip_loop_set_delay(loop, 0);
+
+    /* Check reference counter. */
+    if (pj_atomic_get(loop->ref_cnt) != ref_cnt) {
+	PJ_LOG(3,(THIS_FILE, "   error: ref counter is not %d (%d)", 
+			     ref_cnt, pj_atomic_get(loop->ref_cnt)));
+	return -51;
+    }
+
+    /* Decrement reference. */
+    pjsip_transport_dec_ref(loop);
+
+    return 0;
+}
+
+int transport_loop_test(void)
+{
+    int status;
+
+    status = datagram_loop_test();
+    if (status != 0)
+	return status;
+
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/transport_tcp_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/transport_tcp_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/transport_tcp_test.c	(revision 1163)
@@ -0,0 +1,150 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+#define THIS_FILE   "transport_tcp_test.c"
+
+
+/*
+ * TCP transport test.
+ */
+#if PJ_HAS_TCP
+int transport_tcp_test(void)
+{
+    enum { SEND_RECV_LOOP = 8 };
+    pjsip_tpfactory *tpfactory;
+    pjsip_transport *tcp;
+    pj_sockaddr_in rem_addr;
+    pj_status_t status;
+    char url[PJSIP_MAX_URL_SIZE];
+    int rtt[SEND_RECV_LOOP], min_rtt;
+    int i, pkt_lost;
+
+    /* Start TCP listener on arbitrary port. */
+    status = pjsip_tcp_transport_start(endpt, NULL, 1, &tpfactory);
+    if (status != PJ_SUCCESS) {
+	app_perror("   Error: unable to start TCP transport", status);
+	return -10;
+    }
+
+
+    /* Get the listener address */
+    status = pj_sockaddr_in_init(&rem_addr, &tpfactory->addr_name.host,
+				 (pj_uint16_t)tpfactory->addr_name.port);
+    if (status != PJ_SUCCESS) {
+	app_perror("   Error: possibly invalid TCP address name", status);
+	return -14;
+    }
+
+    pj_ansi_sprintf(url, "sip:alice@%s:%d;transport=tcp",
+		    pj_inet_ntoa(rem_addr.sin_addr),
+		    pj_ntohs(rem_addr.sin_port));
+
+
+    /* Acquire one TCP transport. */
+    status = pjsip_endpt_acquire_transport(endpt, PJSIP_TRANSPORT_TCP, 
+					   &rem_addr, sizeof(rem_addr),
+					   NULL, &tcp);
+    if (status != PJ_SUCCESS || tcp == NULL) {
+	app_perror("   Error: unable to acquire TCP transport", status);
+	return -17;
+    }
+
+    /* After pjsip_endpt_acquire_transport, TCP transport must have
+     * reference counter 1. 
+     */
+    if (pj_atomic_get(tcp->ref_cnt) != 1)
+	return -20;
+
+    /* Test basic transport attributes */
+    status = generic_transport_test(tcp);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    /* Check again that reference counter is 1. */
+    if (pj_atomic_get(tcp->ref_cnt) != 1)
+	return -70;
+
+    /* Basic transport's send/receive loopback test. */
+    for (i=0; i<SEND_RECV_LOOP; ++i) {
+	status = transport_send_recv_test(PJSIP_TRANSPORT_TCP, tcp, url, &rtt[i]);
+
+	if (status != 0) {
+	    pjsip_transport_dec_ref(tcp);
+	    flush_events(500);
+	    return -72;
+	}
+    }
+
+    min_rtt = 0xFFFFFFF;
+    for (i=0; i<SEND_RECV_LOOP; ++i)
+	if (rtt[i] < min_rtt) min_rtt = rtt[i];
+
+    report_ival("tcp-rtt-usec", min_rtt, "usec",
+		"Best TCP transport round trip time, in microseconds "
+		"(time from sending request until response is received. "
+		"Tests were performed on local machine only, and after "
+		"TCP socket has been established by previous test)");
+
+
+    /* Multi-threaded round-trip test. */
+    status = transport_rt_test(PJSIP_TRANSPORT_TCP, tcp, url, &pkt_lost);
+    if (status != 0) {
+	pjsip_transport_dec_ref(tcp);
+	return status;
+    }
+
+    if (pkt_lost != 0)
+	PJ_LOG(3,(THIS_FILE, "   note: %d packet(s) was lost", pkt_lost));
+
+    /* Check again that reference counter is still 1. */
+    if (pj_atomic_get(tcp->ref_cnt) != 1)
+	return -80;
+
+    /* Destroy this transport. */
+    pjsip_transport_dec_ref(tcp);
+
+    /* Force destroy this transport. */
+    status = pjsip_transport_destroy(tcp);
+    if (status != PJ_SUCCESS)
+	return -90;
+
+    /* Unregister factory */
+    status = pjsip_tpmgr_unregister_tpfactory(pjsip_endpt_get_tpmgr(endpt), 
+					      tpfactory);
+    if (status != PJ_SUCCESS)
+	return -95;
+
+    /* Flush events. */
+    PJ_LOG(3,(THIS_FILE, "   Flushing events, 1 second..."));
+    flush_events(1000);
+
+    /* Done */
+    return 0;
+}
+#else	/* PJ_HAS_TCP */
+int transport_tcp_test(void)
+{
+    return 0;
+}
+#endif	/* PJ_HAS_TCP */
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/transport_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/transport_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/transport_test.c	(revision 1163)
@@ -0,0 +1,643 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+#define THIS_FILE   "transport_test.c"
+
+///////////////////////////////////////////////////////////////////////////////
+/*
+ * Generic testing for transport, to make sure that basic
+ * attributes have been initialized properly.
+ */
+int generic_transport_test(pjsip_transport *tp)
+{
+    PJ_LOG(3,(THIS_FILE, "  structure test..."));
+
+    /* Check that local address name is valid. */
+    {
+	struct pj_in_addr addr;
+
+	/* Note: inet_aton() returns non-zero if addr is valid! */
+	if (pj_inet_aton(&tp->local_name.host, &addr) != 0) {
+	    if (addr.s_addr==PJ_INADDR_ANY || addr.s_addr==PJ_INADDR_NONE) {
+		PJ_LOG(3,(THIS_FILE, "   Error: invalid address name"));
+		return -420;
+	    }
+	} else {
+	    /* It's okay. local_name.host may be a hostname instead of
+	     * IP address.
+	     */
+	}
+    }
+
+    /* Check that port is valid. */
+    if (tp->local_name.port <= 0) {
+	return -430;
+    }
+
+    /* Check length of address (for now we only check against sockaddr_in). */
+    if (tp->addr_len != sizeof(pj_sockaddr_in))
+	return -440;
+
+    /* Check type. */
+    if (tp->key.type == PJSIP_TRANSPORT_UNSPECIFIED)
+	return -450;
+
+    /* That's it. */
+    return PJ_SUCCESS;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/* 
+ * Send/receive test.
+ *
+ * This test sends a request to loopback address; as soon as request is 
+ * received, response will be sent, and time is recorded.
+ *
+ * The main purpose is to test that the basic transport functionalities works,
+ * before we continue with more complicated tests.
+ */
+#define FROM_HDR    "Bob <sip:bob@example.com>"
+#define CONTACT_HDR "Bob <sip:bob@127.0.0.1>"
+#define CALL_ID_HDR "SendRecv-Test"
+#define CSEQ_VALUE  100
+#define BODY	    "Hello World!"
+
+static pj_bool_t my_on_rx_request(pjsip_rx_data *rdata);
+static pj_bool_t my_on_rx_response(pjsip_rx_data *rdata);
+
+/* Flag to indicate message has been received
+ * (or failed to send)
+ */
+#define NO_STATUS   -2
+static int send_status = NO_STATUS;
+static int recv_status = NO_STATUS;
+static pj_timestamp my_send_time, my_recv_time;
+
+/* Module to receive messages for this test. */
+static pjsip_module my_module = 
+{
+    NULL, NULL,				/* prev and next	*/
+    { "Transport-Test", 14},		/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_TSX_LAYER-1,	/* Priority		*/
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    &my_on_rx_request,			/* on_rx_request()	*/
+    &my_on_rx_response,			/* on_rx_response()	*/
+    NULL,				/* on_tsx_state()	*/
+};
+
+
+static pj_bool_t my_on_rx_request(pjsip_rx_data *rdata)
+{
+    /* Check that this is our request. */
+    if (pj_strcmp2(&rdata->msg_info.cid->id, CALL_ID_HDR) == 0) {
+	/* It is! */
+	/* Send response. */
+	pjsip_tx_data *tdata;
+	pjsip_response_addr res_addr;
+	pj_status_t status;
+
+	status = pjsip_endpt_create_response( endpt, rdata, 200, NULL, &tdata);
+	if (status != PJ_SUCCESS) {
+	    recv_status = status;
+	    return PJ_TRUE;
+	}
+	status = pjsip_get_response_addr( tdata->pool, rdata, &res_addr);
+	if (status != PJ_SUCCESS) {
+	    recv_status = status;
+	    pjsip_tx_data_dec_ref(tdata);
+	    return PJ_TRUE;
+	}
+	status = pjsip_endpt_send_response( endpt, &res_addr, tdata, NULL, NULL);
+	if (status != PJ_SUCCESS) {
+	    recv_status = status;
+	    pjsip_tx_data_dec_ref(tdata);
+	    return PJ_TRUE;
+	}
+	return PJ_TRUE;
+    }
+    
+    /* Not ours. */
+    return PJ_FALSE;
+}
+
+static pj_bool_t my_on_rx_response(pjsip_rx_data *rdata)
+{
+    if (pj_strcmp2(&rdata->msg_info.cid->id, CALL_ID_HDR) == 0) {
+	pj_get_timestamp(&my_recv_time);
+	recv_status = PJ_SUCCESS;
+	return PJ_TRUE;
+    }
+    return PJ_FALSE;
+}
+
+/* Transport callback. */
+static void send_msg_callback(pjsip_send_state *stateless_data,
+			      pj_ssize_t sent, pj_bool_t *cont)
+{
+    if (sent < 1) {
+	/* Obtain the error code. */
+	send_status = -sent;
+    } else {
+	send_status = PJ_SUCCESS;
+    }
+
+    /* Don't want to continue. */
+    *cont = PJ_FALSE;
+}
+
+
+/* Test that we receive loopback message. */
+int transport_send_recv_test( pjsip_transport_type_e tp_type,
+			      pjsip_transport *ref_tp,
+			      char *target_url,
+			      int *p_usec_rtt)
+{
+    pj_bool_t msg_log_enabled;
+    pj_status_t status;
+    pj_str_t target, from, to, contact, call_id, body;
+    pjsip_method method;
+    pjsip_tx_data *tdata;
+    pj_time_val timeout;
+
+    PJ_LOG(3,(THIS_FILE, "  single message round-trip test..."));
+
+    /* Register out test module to receive the message (if necessary). */
+    if (my_module.id == -1) {
+	status = pjsip_endpt_register_module( endpt, &my_module );
+	if (status != PJ_SUCCESS) {
+	    app_perror("   error: unable to register module", status);
+	    return -500;
+	}
+    }
+
+    /* Disable message logging. */
+    msg_log_enabled = msg_logger_set_enabled(0);
+
+    /* Create a request message. */
+    target = pj_str(target_url);
+    from = pj_str(FROM_HDR);
+    to = pj_str(target_url);
+    contact = pj_str(CONTACT_HDR);
+    call_id = pj_str(CALL_ID_HDR);
+    body = pj_str(BODY);
+
+    pjsip_method_set(&method, PJSIP_OPTIONS_METHOD);
+    status = pjsip_endpt_create_request( endpt, &method, &target, &from, &to,
+					 &contact, &call_id, CSEQ_VALUE, 
+					 &body, &tdata );
+    if (status != PJ_SUCCESS) {
+	app_perror("   error: unable to create request", status);
+	return -510;
+    }
+
+    /* Reset statuses */
+    send_status = recv_status = NO_STATUS;
+
+    /* Start time. */
+    pj_get_timestamp(&my_send_time);
+
+    /* Send the message (statelessly). */
+    PJ_LOG(5,(THIS_FILE, "Sending request to %.*s", 
+			 (int)target.slen, target.ptr));
+    status = pjsip_endpt_send_request_stateless( endpt, tdata, NULL,
+					         &send_msg_callback);
+    if (status != PJ_SUCCESS) {
+	/* Immediate error! */
+	pjsip_tx_data_dec_ref(tdata);
+	send_status = status;
+    }
+
+    /* Set the timeout (2 seconds from now) */
+    pj_gettimeofday(&timeout);
+    timeout.sec += 2;
+
+    /* Loop handling events until we get status */
+    do {
+	pj_time_val now;
+	pj_time_val poll_interval = { 0, 10 };
+
+	pj_gettimeofday(&now);
+	if (PJ_TIME_VAL_GTE(now, timeout)) {
+	    PJ_LOG(3,(THIS_FILE, "   error: timeout in send/recv test"));
+	    status = -540;
+	    goto on_return;
+	}
+
+	if (send_status!=NO_STATUS && send_status!=PJ_SUCCESS) {
+	    app_perror("   error sending message", send_status);
+	    status = -550;
+	    goto on_return;
+	}
+
+	if (recv_status!=NO_STATUS && recv_status!=PJ_SUCCESS) {
+	    app_perror("   error receiving message", recv_status);
+	    status = -560;
+	    goto on_return;
+	}
+
+	if (send_status!=NO_STATUS && recv_status!=NO_STATUS) {
+	    /* Success! */
+	    break;
+	}
+
+	pjsip_endpt_handle_events(endpt, &poll_interval);
+
+    } while (1);
+
+    if (status == PJ_SUCCESS) {
+	unsigned usec_rt;
+	usec_rt = pj_elapsed_usec(&my_send_time, &my_recv_time);
+
+	PJ_LOG(3,(THIS_FILE, "    round-trip = %d usec", usec_rt));
+
+	*p_usec_rtt = usec_rt;
+    }
+
+    /* Restore message logging. */
+    msg_logger_set_enabled(msg_log_enabled);
+
+    status = PJ_SUCCESS;
+
+on_return:
+    return status;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+/* 
+ * Multithreaded round-trip test
+ *
+ * This test will spawn multiple threads, each of them send a request. As soon
+ * as request is received, response will be sent, and time is recorded.
+ *
+ * The main purpose of this test is to ensure there's no crash when multiple
+ * threads are sending/receiving messages.
+ *
+ */
+static pj_bool_t rt_on_rx_request(pjsip_rx_data *rdata);
+static pj_bool_t rt_on_rx_response(pjsip_rx_data *rdata);
+
+static pjsip_module rt_module = 
+{
+    NULL, NULL,				/* prev and next	*/
+    { "Transport-RT-Test", 17},		/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_TSX_LAYER-1,	/* Priority		*/
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    &rt_on_rx_request,			/* on_rx_request()	*/
+    &rt_on_rx_response,			/* on_rx_response()	*/
+    NULL,				/* tsx_handler()	*/
+};
+
+static struct
+{
+    pj_thread_t *thread;
+    pj_timestamp send_time;
+    pj_timestamp total_rt_time;
+    int sent_request_count, recv_response_count;
+    pj_str_t call_id;
+    pj_timer_entry timeout_timer;
+    pj_timer_entry tx_timer;
+    pj_mutex_t *mutex;
+} rt_test_data[16];
+
+static char	 rt_target_uri[64];
+static pj_bool_t rt_stop;
+static pj_str_t  rt_call_id;
+
+static pj_bool_t rt_on_rx_request(pjsip_rx_data *rdata)
+{
+    if (!pj_strncmp(&rdata->msg_info.cid->id, &rt_call_id, rt_call_id.slen)) {
+	pjsip_tx_data *tdata;
+	pjsip_response_addr res_addr;
+	pj_status_t status;
+
+	status = pjsip_endpt_create_response( endpt, rdata, 200, NULL, &tdata);
+	if (status != PJ_SUCCESS) {
+	    app_perror("    error creating response", status);
+	    return PJ_TRUE;
+	}
+	status = pjsip_get_response_addr( tdata->pool, rdata, &res_addr);
+	if (status != PJ_SUCCESS) {
+	    app_perror("    error in get response address", status);
+	    pjsip_tx_data_dec_ref(tdata);
+	    return PJ_TRUE;
+	}
+	status = pjsip_endpt_send_response( endpt, &res_addr, tdata, NULL, NULL);
+	if (status != PJ_SUCCESS) {
+	    app_perror("    error sending response", status);
+	    pjsip_tx_data_dec_ref(tdata);
+	    return PJ_TRUE;
+	}
+	return PJ_TRUE;
+	
+    }
+    return PJ_FALSE;
+}
+
+static pj_status_t rt_send_request(int thread_id)
+{
+    pj_status_t status;
+    pj_str_t target, from, to, contact, call_id;
+    pjsip_tx_data *tdata;
+    pj_time_val timeout_delay;
+
+    pj_mutex_lock(rt_test_data[thread_id].mutex);
+
+    /* Create a request message. */
+    target = pj_str(rt_target_uri);
+    from = pj_str(FROM_HDR);
+    to = pj_str(rt_target_uri);
+    contact = pj_str(CONTACT_HDR);
+    call_id = rt_test_data[thread_id].call_id;
+
+    status = pjsip_endpt_create_request( endpt, &pjsip_options_method, 
+					 &target, &from, &to,
+					 &contact, &call_id, -1, 
+					 NULL, &tdata );
+    if (status != PJ_SUCCESS) {
+	app_perror("    error: unable to create request", status);
+	pj_mutex_unlock(rt_test_data[thread_id].mutex);
+	return -610;
+    }
+
+    /* Start time. */
+    pj_get_timestamp(&rt_test_data[thread_id].send_time);
+
+    /* Send the message (statelessly). */
+    status = pjsip_endpt_send_request_stateless( endpt, tdata, NULL, NULL);
+    if (status != PJ_SUCCESS) {
+	/* Immediate error! */
+	app_perror("    error: send request", status);
+	pjsip_tx_data_dec_ref(tdata);
+	pj_mutex_unlock(rt_test_data[thread_id].mutex);
+	return -620;
+    }
+
+    /* Update counter. */
+    rt_test_data[thread_id].sent_request_count++;
+
+    /* Set timeout timer. */
+    if (rt_test_data[thread_id].timeout_timer.user_data != NULL) {
+	pjsip_endpt_cancel_timer(endpt, &rt_test_data[thread_id].timeout_timer);
+    }
+    timeout_delay.sec = 100; timeout_delay.msec = 0;
+    rt_test_data[thread_id].timeout_timer.user_data = (void*)1;
+    pjsip_endpt_schedule_timer(endpt, &rt_test_data[thread_id].timeout_timer,
+			       &timeout_delay);
+
+    pj_mutex_unlock(rt_test_data[thread_id].mutex);
+    return PJ_SUCCESS;
+}
+
+static pj_bool_t rt_on_rx_response(pjsip_rx_data *rdata)
+{
+    if (!pj_strncmp(&rdata->msg_info.cid->id, &rt_call_id, rt_call_id.slen)) {
+	char *pos = pj_strchr(&rdata->msg_info.cid->id, '/')+1;
+	int thread_id = (*pos - '0');
+	pj_timestamp recv_time;
+
+	pj_mutex_lock(rt_test_data[thread_id].mutex);
+
+	/* Stop timer. */
+	pjsip_endpt_cancel_timer(endpt, &rt_test_data[thread_id].timeout_timer);
+
+	/* Update counter and end-time. */
+	rt_test_data[thread_id].recv_response_count++;
+	pj_get_timestamp(&recv_time);
+
+	pj_sub_timestamp(&recv_time, &rt_test_data[thread_id].send_time);
+	pj_add_timestamp(&rt_test_data[thread_id].total_rt_time, &recv_time);
+
+	if (!rt_stop) {
+	    pj_time_val tx_delay = { 0, 0 };
+	    pj_assert(rt_test_data[thread_id].tx_timer.user_data == NULL);
+	    rt_test_data[thread_id].tx_timer.user_data = (void*)1;
+	    pjsip_endpt_schedule_timer(endpt, &rt_test_data[thread_id].tx_timer,
+				       &tx_delay);
+	}
+
+	pj_mutex_unlock(rt_test_data[thread_id].mutex);
+
+	return PJ_TRUE;
+    }
+    return PJ_FALSE;
+}
+
+static void rt_timeout_timer( pj_timer_heap_t *timer_heap,
+			      struct pj_timer_entry *entry )
+{
+    pj_mutex_lock(rt_test_data[entry->id].mutex);
+
+    PJ_UNUSED_ARG(timer_heap);
+    PJ_LOG(3,(THIS_FILE, "    timeout waiting for response"));
+    rt_test_data[entry->id].timeout_timer.user_data = NULL;
+    
+    if (rt_test_data[entry->id].tx_timer.user_data == NULL) {
+	pj_time_val delay = { 0, 0 };
+	rt_test_data[entry->id].tx_timer.user_data = (void*)1;
+	pjsip_endpt_schedule_timer(endpt, &rt_test_data[entry->id].tx_timer,
+				   &delay);
+    }
+
+    pj_mutex_unlock(rt_test_data[entry->id].mutex);
+}
+
+static void rt_tx_timer( pj_timer_heap_t *timer_heap,
+			 struct pj_timer_entry *entry )
+{
+    pj_mutex_lock(rt_test_data[entry->id].mutex);
+
+    PJ_UNUSED_ARG(timer_heap);
+    pj_assert(rt_test_data[entry->id].tx_timer.user_data != NULL);
+    rt_test_data[entry->id].tx_timer.user_data = NULL;
+    rt_send_request(entry->id);
+
+    pj_mutex_unlock(rt_test_data[entry->id].mutex);
+}
+
+
+static int rt_worker_thread(void *arg)
+{
+    int i;
+    pj_time_val poll_delay = { 0, 10 };
+
+    /* Sleep to allow main threads to run. */
+    pj_thread_sleep(10);
+
+    while (!rt_stop) {
+	pjsip_endpt_handle_events(endpt, &poll_delay);
+    }
+
+    /* Exhaust responses. */
+    for (i=0; i<100; ++i)
+	pjsip_endpt_handle_events(endpt, &poll_delay);
+
+    return 0;
+}
+
+int transport_rt_test( pjsip_transport_type_e tp_type,
+		       pjsip_transport *ref_tp,
+		       char *target_url,
+		       int *lost)
+{
+    enum { THREADS = 4, INTERVAL = 10 };
+    int i;
+    pj_status_t status;
+    pj_pool_t *pool;
+    pj_bool_t logger_enabled;
+
+    pj_timestamp zero_time, total_time;
+    unsigned usec_rt;
+    unsigned total_sent;
+    unsigned total_recv;
+
+    PJ_LOG(3,(THIS_FILE, "  multithreaded round-trip test (%d threads)...",
+		  THREADS));
+    PJ_LOG(3,(THIS_FILE, "    this will take approx %d seconds, please wait..",
+		INTERVAL));
+
+    /* Make sure msg logger is disabled. */
+    logger_enabled = msg_logger_set_enabled(0);
+
+    /* Register module (if not yet registered) */
+    if (rt_module.id == -1) {
+	status = pjsip_endpt_register_module( endpt, &rt_module );
+	if (status != PJ_SUCCESS) {
+	    app_perror("   error: unable to register module", status);
+	    return -600;
+	}
+    }
+
+    /* Create pool for this test. */
+    pool = pjsip_endpt_create_pool(endpt, NULL, 4000, 4000);
+    if (!pool)
+	return -610;
+
+    /* Initialize static test data. */
+    pj_native_strcpy(rt_target_uri, target_url);
+    rt_call_id = pj_str("RT-Call-Id/");
+    rt_stop = PJ_FALSE;
+
+    /* Initialize thread data. */
+    for (i=0; i<THREADS; ++i) {
+	char buf[1];
+	pj_str_t str_id = { buf, 1 };
+
+	pj_bzero(&rt_test_data[i], sizeof(rt_test_data[i]));
+
+	/* Init timer entry */
+	rt_test_data[i].tx_timer.id = i;
+	rt_test_data[i].tx_timer.cb = &rt_tx_timer;
+	rt_test_data[i].timeout_timer.id = i;
+	rt_test_data[i].timeout_timer.cb = &rt_timeout_timer;
+
+	/* Generate Call-ID for each thread. */
+	rt_test_data[i].call_id.ptr = pj_pool_alloc(pool, rt_call_id.slen+1);
+	pj_strcpy(&rt_test_data[i].call_id, &rt_call_id);
+	buf[0] = '0' + i;
+	pj_strcat(&rt_test_data[i].call_id, &str_id);
+
+	/* Init mutex. */
+	status = pj_mutex_create_recursive(pool, "rt", &rt_test_data[i].mutex);
+	if (status != PJ_SUCCESS) {
+	    app_perror("   error: unable to create mutex", status);
+	    return -615;
+	}
+
+	/* Create thread, suspended. */
+	status = pj_thread_create(pool, "rttest%p", &rt_worker_thread, (void*)(long)i, 0,
+				  PJ_THREAD_SUSPENDED, &rt_test_data[i].thread);
+	if (status != PJ_SUCCESS) {
+	    app_perror("   error: unable to create thread", status);
+	    return -620;
+	}
+    }
+
+    /* Start threads! */
+    for (i=0; i<THREADS; ++i) {
+	pj_time_val delay = {0,0};
+	pj_thread_resume(rt_test_data[i].thread);
+
+	/* Schedule first message transmissions. */
+	rt_test_data[i].tx_timer.user_data = (void*)1;
+	pjsip_endpt_schedule_timer(endpt, &rt_test_data[i].tx_timer, &delay);
+    }
+
+    /* Sleep for some time. */
+    pj_thread_sleep(INTERVAL * 1000);
+
+    /* Signal thread to stop. */
+    rt_stop = PJ_TRUE;
+
+    /* Wait threads to complete. */
+    for (i=0; i<THREADS; ++i) {
+	pj_thread_join(rt_test_data[i].thread);
+	pj_thread_destroy(rt_test_data[i].thread);
+    }
+
+    /* Destroy rt_test_data */
+    for (i=0; i<THREADS; ++i) {
+	pj_mutex_destroy(rt_test_data[i].mutex);
+	pjsip_endpt_cancel_timer(endpt, &rt_test_data[i].timeout_timer);
+    }
+
+    /* Gather statistics. */
+    pj_bzero(&total_time, sizeof(total_time));
+    pj_bzero(&zero_time, sizeof(zero_time));
+    usec_rt = total_sent = total_recv = 0;
+    for (i=0; i<THREADS; ++i) {
+	total_sent += rt_test_data[i].sent_request_count;
+	total_recv +=  rt_test_data[i].recv_response_count;
+	pj_add_timestamp(&total_time, &rt_test_data[i].total_rt_time);
+    }
+
+    /* Display statistics. */
+    if (total_recv)
+	total_time.u64 = total_time.u64/total_recv;
+    else
+	total_time.u64 = 0;
+    usec_rt = pj_elapsed_usec(&zero_time, &total_time);
+    PJ_LOG(3,(THIS_FILE, "    done."));
+    PJ_LOG(3,(THIS_FILE, "    total %d messages sent", total_sent));
+    PJ_LOG(3,(THIS_FILE, "    average round-trip=%d usec", usec_rt));
+
+    pjsip_endpt_release_pool(endpt, pool);
+
+    *lost = total_sent-total_recv;
+
+    /* Flush events. */
+    flush_events(500);
+
+    /* Restore msg logger. */
+    msg_logger_set_enabled(logger_enabled);
+
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/transport_udp_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/transport_udp_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/transport_udp_test.c	(revision 1163)
@@ -0,0 +1,127 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+#define THIS_FILE   "transport_udp_test.c"
+
+
+/*
+ * UDP transport test.
+ */
+int transport_udp_test(void)
+{
+    enum { SEND_RECV_LOOP = 8 };
+    pjsip_transport *udp_tp, *tp;
+    pj_sockaddr_in addr, rem_addr;
+    pj_str_t s;
+    pj_status_t status;
+    int rtt[SEND_RECV_LOOP], min_rtt;
+    int i, pkt_lost;
+
+    pj_sockaddr_in_init(&addr, NULL, TEST_UDP_PORT);
+
+    /* Start UDP transport. */
+    status = pjsip_udp_transport_start( endpt, &addr, NULL, 1, &udp_tp);
+    if (status != PJ_SUCCESS) {
+	app_perror("   Error: unable to start UDP transport", status);
+	return -10;
+    }
+
+    /* UDP transport must have initial reference counter set to 1. */
+    if (pj_atomic_get(udp_tp->ref_cnt) != 1)
+	return -20;
+
+    /* Test basic transport attributes */
+    status = generic_transport_test(udp_tp);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    /* Test that transport manager is returning the correct
+     * transport.
+     */
+    pj_sockaddr_in_init(&rem_addr, pj_cstr(&s, "1.1.1.1"), 80);
+    status = pjsip_endpt_acquire_transport(endpt, PJSIP_TRANSPORT_UDP, 
+					   &rem_addr, sizeof(rem_addr),
+					   NULL, &tp);
+    if (status != PJ_SUCCESS)
+	return -50;
+    if (tp != udp_tp)
+	return -60;
+
+    /* pjsip_endpt_acquire_transport() adds reference, so we need
+     * to decrement it.
+     */
+    pjsip_transport_dec_ref(tp);
+
+    /* Check again that reference counter is 1. */
+    if (pj_atomic_get(udp_tp->ref_cnt) != 1)
+	return -70;
+
+    /* Basic transport's send/receive loopback test. */
+    pj_sockaddr_in_init(&rem_addr, pj_cstr(&s, "127.0.0.1"), TEST_UDP_PORT);
+    for (i=0; i<SEND_RECV_LOOP; ++i) {
+	status = transport_send_recv_test(PJSIP_TRANSPORT_UDP, tp, 
+					  "sip:alice@127.0.0.1:"TEST_UDP_PORT_STR,
+					  &rtt[i]);
+	if (status != 0)
+	    return status;
+    }
+
+    min_rtt = 0xFFFFFFF;
+    for (i=0; i<SEND_RECV_LOOP; ++i)
+	if (rtt[i] < min_rtt) min_rtt = rtt[i];
+
+    report_ival("udp-rtt-usec", min_rtt, "usec",
+		"Best UDP transport round trip time, in microseconds "
+		"(time from sending request until response is received. "
+		"Tests were performed on local machine only)");
+
+
+    /* Multi-threaded round-trip test. */
+    status = transport_rt_test(PJSIP_TRANSPORT_UDP, tp, 
+			       "sip:alice@127.0.0.1:"TEST_UDP_PORT_STR, 
+			       &pkt_lost);
+    if (status != 0)
+	return status;
+
+    if (pkt_lost != 0)
+	PJ_LOG(3,(THIS_FILE, "   note: %d packet(s) was lost", pkt_lost));
+
+    /* Check again that reference counter is 1. */
+    if (pj_atomic_get(udp_tp->ref_cnt) != 1)
+	return -80;
+
+    /* Destroy this transport. */
+    pjsip_transport_dec_ref(udp_tp);
+
+    /* Force destroy this transport. */
+    status = pjsip_transport_destroy(udp_tp);
+    if (status != PJ_SUCCESS)
+	return -90;
+
+    /* Flush events. */
+    PJ_LOG(3,(THIS_FILE, "   Flushing events, 1 second..."));
+    flush_events(1000);
+
+    /* Done */
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/tsx_basic_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/tsx_basic_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/tsx_basic_test.c	(revision 1163)
@@ -0,0 +1,156 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+#define THIS_FILE   "tsx_basic_test.c"
+
+static char TARGET_URI[PJSIP_MAX_URL_SIZE];
+static char FROM_URI[PJSIP_MAX_URL_SIZE];
+
+
+/* Test transaction layer. */
+static int tsx_layer_test(void)
+{
+    pj_str_t target, from, tsx_key;
+    pjsip_tx_data *tdata;
+    pjsip_transaction *tsx, *found;
+    pj_status_t status;
+
+    PJ_LOG(3,(THIS_FILE, "  transaction layer test"));
+
+    target = pj_str(TARGET_URI);
+    from = pj_str(FROM_URI);
+
+    status = pjsip_endpt_create_request(endpt, &pjsip_invite_method, &target,
+					&from, &target, NULL, NULL, -1, NULL,
+					&tdata);
+    if (status != PJ_SUCCESS) {
+	app_perror("  error: unable to create request", status);
+	return -110;
+    }
+
+    status = pjsip_tsx_create_uac(NULL, tdata, &tsx);
+    if (status != PJ_SUCCESS) {
+	app_perror("   error: unable to create transaction", status);
+	return -120;
+    }
+
+    pj_strdup(tdata->pool, &tsx_key, &tsx->transaction_key);
+
+    found = pjsip_tsx_layer_find_tsx(&tsx_key, PJ_FALSE);
+    if (found != tsx) {
+	return -130;
+    }
+
+    pjsip_tsx_terminate(tsx, PJSIP_SC_REQUEST_TERMINATED);
+    flush_events(500);
+
+    if (pjsip_tx_data_dec_ref(tdata) != PJSIP_EBUFDESTROYED) {
+	return -140;
+    }
+
+    return 0;
+}
+
+/* Double terminate test. */
+static int double_terminate(void)
+{
+    pj_str_t target, from, tsx_key;
+    pjsip_tx_data *tdata;
+    pjsip_transaction *tsx;
+    pj_status_t status;
+
+    PJ_LOG(3,(THIS_FILE, "  double terminate test"));
+
+    target = pj_str(TARGET_URI);
+    from = pj_str(FROM_URI);
+
+    /* Create request. */
+    status = pjsip_endpt_create_request(endpt, &pjsip_invite_method, &target,
+					&from, &target, NULL, NULL, -1, NULL,
+					&tdata);
+    if (status != PJ_SUCCESS) {
+	app_perror("  error: unable to create request", status);
+	return -10;
+    }
+
+    /* Create transaction. */
+    status = pjsip_tsx_create_uac(NULL, tdata, &tsx);
+    if (status != PJ_SUCCESS) {
+	app_perror("   error: unable to create transaction", status);
+	return -20;
+    }
+
+    /* Save transaction key for later. */
+    pj_strdup_with_null(tdata->pool, &tsx_key, &tsx->transaction_key);
+
+    /* Add reference to transmit buffer (tsx_send_msg() will dec txdata). */
+    pjsip_tx_data_add_ref(tdata);
+
+    /* Send message to start timeout timer. */
+    status = pjsip_tsx_send_msg(tsx, NULL);
+
+    /* Terminate transaction. */
+    status = pjsip_tsx_terminate(tsx, PJSIP_SC_REQUEST_TERMINATED);
+    if (status != PJ_SUCCESS) {
+	app_perror("   error: unable to terminate transaction", status);
+	return -30;
+    }
+
+    tsx = pjsip_tsx_layer_find_tsx(&tsx_key, PJ_TRUE);
+    if (tsx) {
+	/* Terminate transaction again. */
+	pjsip_tsx_terminate(tsx, PJSIP_SC_REQUEST_TERMINATED);
+	if (status != PJ_SUCCESS) {
+	    app_perror("   error: unable to terminate transaction", status);
+	    return -40;
+	}
+	pj_mutex_unlock(tsx->mutex);
+    }
+
+    flush_events(500);
+    if (pjsip_tx_data_dec_ref(tdata) != PJSIP_EBUFDESTROYED) {
+	return -50;
+    }
+
+    return PJ_SUCCESS;
+}
+
+int tsx_basic_test(struct tsx_test_param *param)
+{
+    int status;
+
+    pj_ansi_sprintf(TARGET_URI, "sip:bob@127.0.0.1:%d;transport=%s", 
+		    param->port, param->tp_type);
+    pj_ansi_sprintf(FROM_URI, "sip:alice@127.0.0.1:%d;transport=%s", 
+		    param->port, param->tp_type);
+
+    status = tsx_layer_test();
+    if (status != 0)
+	return status;
+
+    status = double_terminate();
+    if (status != 0)
+	return status;
+
+    return 0;
+}
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/tsx_bench.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/tsx_bench.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/tsx_bench.c	(revision 1163)
@@ -0,0 +1,279 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+#define THIS_FILE   "tsx_uas_test.c"
+
+
+static pjsip_module mod_tsx_user;
+
+static int uac_tsx_bench(unsigned working_set, pj_timestamp *p_elapsed)
+{
+    unsigned i;
+    pjsip_tx_data *request;
+    pjsip_transaction **tsx;
+    pj_timestamp t1, t2, elapsed;
+    pjsip_via_hdr *via;
+    pj_status_t status;
+
+    /* Create the request first. */
+    pj_str_t str_target = pj_str("sip:someuser@someprovider.com");
+    pj_str_t str_from = pj_str("\"Local User\" <sip:localuser@serviceprovider.com>");
+    pj_str_t str_to = pj_str("\"Remote User\" <sip:remoteuser@serviceprovider.com>");
+    pj_str_t str_contact = str_from;
+
+    status = pjsip_endpt_create_request(endpt, &pjsip_invite_method,
+					&str_target, &str_from, &str_to,
+					&str_contact, NULL, -1, NULL,
+					&request);
+    if (status != PJ_SUCCESS) {
+	app_perror("    error: unable to create request", status);
+	return status;
+    }
+
+    via = (pjsip_via_hdr*) pjsip_msg_find_hdr(request->msg, PJSIP_H_VIA,
+					      NULL);
+
+    /* Create transaction array */
+    tsx = pj_pool_zalloc(request->pool, working_set * sizeof(pj_pool_t*));
+
+    pj_bzero(&mod_tsx_user, sizeof(mod_tsx_user));
+    mod_tsx_user.id = -1;
+
+    /* Benchmark */
+    elapsed.u64 = 0;
+    pj_get_timestamp(&t1);
+    for (i=0; i<working_set; ++i) {
+	status = pjsip_tsx_create_uac(&mod_tsx_user, request, &tsx[i]);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+	/* Reset branch param */
+	via->branch_param.slen = 0;
+    }
+    pj_get_timestamp(&t2);
+    pj_sub_timestamp(&t2, &t1);
+    pj_add_timestamp(&elapsed, &t2);
+
+    p_elapsed->u64 = elapsed.u64;
+    status = PJ_SUCCESS;
+    
+on_error:
+    for (i=0; i<working_set; ++i) {
+	if (tsx[i]) {
+	    pjsip_tsx_terminate(tsx[i], 601);
+	    tsx[i] = NULL;
+	}
+    }
+    pjsip_tx_data_dec_ref(request);
+    flush_events(2000);
+    return status;
+}
+
+
+
+static int uas_tsx_bench(unsigned working_set, pj_timestamp *p_elapsed)
+{
+    unsigned i;
+    pjsip_tx_data *request;
+    pjsip_via_hdr *via;
+    pjsip_rx_data rdata;
+    pj_sockaddr_in remote;
+    pjsip_transaction **tsx;
+    pj_timestamp t1, t2, elapsed;
+    char branch_buf[80] = PJSIP_RFC3261_BRANCH_ID "0000000000";
+    pj_status_t status;
+
+    /* Create the request first. */
+    pj_str_t str_target = pj_str("sip:someuser@someprovider.com");
+    pj_str_t str_from = pj_str("\"Local User\" <sip:localuser@serviceprovider.com>");
+    pj_str_t str_to = pj_str("\"Remote User\" <sip:remoteuser@serviceprovider.com>");
+    pj_str_t str_contact = str_from;
+
+    status = pjsip_endpt_create_request(endpt, &pjsip_invite_method,
+					&str_target, &str_from, &str_to,
+					&str_contact, NULL, -1, NULL,
+					&request);
+    if (status != PJ_SUCCESS) {
+	app_perror("    error: unable to create request", status);
+	return status;
+    }
+
+    /* Create  Via */
+    via = pjsip_via_hdr_create(request->pool);
+    via->sent_by.host = pj_str("192.168.0.7");
+    via->sent_by.port = 5061;
+    via->transport = pj_str("udp");
+    via->rport_param = 1;
+    via->recvd_param = pj_str("192.168.0.7");
+    pjsip_msg_insert_first_hdr(request->msg, (pjsip_hdr*)via);
+    
+
+    /* Create "dummy" rdata from the tdata */
+    pj_bzero(&rdata, sizeof(pjsip_rx_data));
+    rdata.tp_info.pool = request->pool;
+    rdata.msg_info.msg = request->msg;
+    rdata.msg_info.from = pjsip_msg_find_hdr(request->msg, PJSIP_H_FROM, NULL);
+    rdata.msg_info.to = pjsip_msg_find_hdr(request->msg, PJSIP_H_TO, NULL);
+    rdata.msg_info.cseq = pjsip_msg_find_hdr(request->msg, PJSIP_H_CSEQ, NULL);
+    rdata.msg_info.cid = pjsip_msg_find_hdr(request->msg, PJSIP_H_FROM, NULL);
+    rdata.msg_info.via = via;
+    
+    pj_sockaddr_in_init(&remote, 0, 0);
+    status = pjsip_endpt_acquire_transport(endpt, PJSIP_TRANSPORT_LOOP_DGRAM, 
+					   &remote, sizeof(pj_sockaddr_in),
+					   NULL, &rdata.tp_info.transport);
+    if (status != PJ_SUCCESS) {
+	app_perror("    error: unable to get loop transport", status);
+	return status;
+    }
+
+
+    /* Create transaction array */
+    tsx = pj_pool_zalloc(request->pool, working_set * sizeof(pj_pool_t*));
+
+    pj_bzero(&mod_tsx_user, sizeof(mod_tsx_user));
+    mod_tsx_user.id = -1;
+
+
+    /* Benchmark */
+    elapsed.u64 = 0;
+    pj_get_timestamp(&t1);
+    for (i=0; i<working_set; ++i) {
+	via->branch_param.ptr = branch_buf;
+	via->branch_param.slen = PJSIP_RFC3261_BRANCH_LEN + 
+				    pj_ansi_sprintf(branch_buf+PJSIP_RFC3261_BRANCH_LEN,
+						    "-%d", i);
+	status = pjsip_tsx_create_uas(&mod_tsx_user, &rdata, &tsx[i]);
+	if (status != PJ_SUCCESS)
+	    goto on_error;
+
+    }
+    pj_get_timestamp(&t2);
+    pj_sub_timestamp(&t2, &t1);
+    pj_add_timestamp(&elapsed, &t2);
+
+    p_elapsed->u64 = elapsed.u64;
+    status = PJ_SUCCESS;
+    
+on_error:
+    for (i=0; i<working_set; ++i) {
+	if (tsx[i]) {
+	    pjsip_tsx_terminate(tsx[i], 601);
+	    tsx[i] = NULL;
+	}
+    }
+    pjsip_tx_data_dec_ref(request);
+    flush_events(2000);
+    return status;
+}
+
+
+
+int tsx_bench(void)
+{
+    enum { WORKING_SET=10000, REPEAT = 4 };
+    unsigned i, speed;
+    pj_timestamp usec[REPEAT], min, freq;
+    char desc[250];
+    int status;
+
+    status = pj_get_timestamp_freq(&freq);
+    if (status != PJ_SUCCESS)
+	return status;
+
+
+    /*
+     * Benchmark UAC
+     */
+    PJ_LOG(3,(THIS_FILE, "   benchmarking UAC transaction creation:"));
+    for (i=0; i<REPEAT; ++i) {
+	PJ_LOG(3,(THIS_FILE, "    test %d of %d..",
+		  i+1, REPEAT));
+	status = uac_tsx_bench(WORKING_SET, &usec[i]);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    min.u64 = PJ_UINT64(0xFFFFFFFFFFFFFFF);
+    for (i=0; i<REPEAT; ++i) {
+	if (usec[i].u64 < min.u64) min.u64 = usec[i].u64;
+    }
+
+    
+    /* Report time */
+    pj_ansi_sprintf(desc, "Time to create %d UAC transactions, in miliseconds",
+			  WORKING_SET);
+    report_ival("create-uac-time", (unsigned)(min.u64 * 1000 / freq.u64), "msec", desc);
+
+
+    /* Write speed */
+    speed = (unsigned)(freq.u64 * WORKING_SET / min.u64);
+    PJ_LOG(3,(THIS_FILE, "    UAC created at %d tsx/sec", speed));
+
+    pj_ansi_sprintf(desc, "Number of UAC transactions that potentially can be created per second "
+			  "with <tt>pjsip_tsx_create_uac()</tt>, based on the time "
+			  "to create %d simultaneous transactions above.",
+			  WORKING_SET);
+
+    report_ival("create-uac-tsx-per-sec", 
+		speed, "tsx/sec", desc);
+
+
+
+    /*
+     * Benchmark UAS
+     */
+    PJ_LOG(3,(THIS_FILE, "   benchmarking UAS transaction creation:"));
+    for (i=0; i<REPEAT; ++i) {
+	PJ_LOG(3,(THIS_FILE, "    test %d of %d..",
+		  i+1, REPEAT));
+	status = uas_tsx_bench(WORKING_SET, &usec[i]);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    min.u64 = PJ_UINT64(0xFFFFFFFFFFFFFFF);
+    for (i=0; i<REPEAT; ++i) {
+	if (usec[i].u64 < min.u64) min.u64 = usec[i].u64;
+    }
+
+    
+    /* Report time */
+    pj_ansi_sprintf(desc, "Time to create %d UAS transactions, in miliseconds",
+			  WORKING_SET);
+    report_ival("create-uas-time", (unsigned)(min.u64 * 1000 / freq.u64), "msec", desc);
+
+
+    /* Write speed */
+    speed = (unsigned)(freq.u64 * WORKING_SET / min.u64);
+    PJ_LOG(3,(THIS_FILE, "    UAS created at %d tsx/sec", speed));
+
+    pj_ansi_sprintf(desc, "Number of UAS transactions that potentially can be created per second "
+			  "with <tt>pjsip_tsx_create_uas()</tt>, based on the time "
+			  "to create %d simultaneous transactions above.",
+			  WORKING_SET);
+
+    report_ival("create-uas-tsx-per-sec", 
+		speed, "tsx/sec", desc);
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/tsx_uac_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/tsx_uac_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/tsx_uac_test.c	(revision 1163)
@@ -0,0 +1,1449 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+#define THIS_FILE   "tsx_uac_test.c"
+
+
+/*****************************************************************************
+ **
+ ** UAC tests.
+ **
+ ** This file performs various tests for UAC transactions. Each test will have
+ ** a different Via branch param so that message receiver module and 
+ ** transaction user module can identify which test is being carried out.
+ **
+ ** TEST1_BRANCH_ID
+ **	Perform basic retransmission and timeout test. Message receiver will
+ **	verify that retransmission is received at correct time.
+ **     This test verifies the following requirements:
+ **	    - retransmit timer doubles for INVITE
+ **	    - retransmit timer doubles and caps off for non-INVITE
+ **	    - retransmit timer timer is precise
+ **	    - correct timeout and retransmission count
+ **     Requirements not tested:
+ **	    - retransmit timer only starts after resolving has completed.
+ **
+ ** TEST2_BRANCH_ID
+ **	Test scenario where resolver is unable to resolve destination host.
+ **
+ ** TEST3_BRANCH_ID
+ **	Test scenario where transaction is terminated while resolver is still
+ **	running.
+ **
+ ** TEST4_BRANCH_ID
+ **	Test scenario where transport failed after several retransmissions.
+ **
+ ** TEST5_BRANCH_ID
+ **	Test scenario where transaction is terminated by user after several
+ **	retransmissions.
+ **
+ ** TEST6_BRANCH_ID
+ **	Test successfull non-INVITE transaction.
+ **     It tests the following requirements:
+ **	    - transaction correctly moves to COMPLETED state.
+ **	    - retransmission must cease.
+ **	    - tx_data must be maintained until state is terminated.
+ **
+ ** TEST7_BRANCH_ID
+ **	Test successfull non-INVITE transaction, with provisional response.
+ **
+ ** TEST8_BRANCH_ID
+ **	Test failed INVITE transaction (e.g. ACK must be received)
+ **
+ ** TEST9_BRANCH_ID
+ **	Test failed INVITE transaction with provisional response.
+ **
+ **	
+ *****************************************************************************
+ */
+
+static char *TEST1_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAC-Test1";
+static char *TEST2_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAC-Test2";
+static char *TEST3_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAC-Test3";
+static char *TEST4_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAC-Test4";
+static char *TEST5_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAC-Test5";
+static char *TEST6_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAC-Test6";
+static char *TEST7_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAC-Test7";
+static char *TEST8_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAC-Test8";
+static char *TEST9_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAC-Test9";
+
+#define      TEST1_ALLOWED_DIFF	    (150)
+#define      TEST4_RETRANSMIT_CNT   3
+#define	     TEST5_RETRANSMIT_CNT   3
+
+static char TARGET_URI[128];
+static char FROM_URI[128];
+static unsigned tp_flag;
+static struct tsx_test_param *test_param;
+
+static void tsx_user_on_tsx_state(pjsip_transaction *tsx, pjsip_event *e);
+static pj_bool_t msg_receiver_on_rx_request(pjsip_rx_data *rdata);
+
+/* UAC transaction user module. */
+static pjsip_module tsx_user = 
+{
+    NULL, NULL,				/* prev and next	*/
+    { "Tsx-UAC-User", 12},		/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION-1,	/* Priority		*/
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    NULL,				/* on_rx_request()	*/
+    NULL,				/* on_rx_response()	*/
+    NULL,				/* on_tx_request()	*/
+    NULL,				/* on_tx_response()	*/
+    &tsx_user_on_tsx_state,		/* on_tsx_state()	*/
+};
+
+/* Module to receive the loop-backed request. */
+static pjsip_module msg_receiver = 
+{
+    NULL, NULL,				/* prev and next	*/
+    { "Msg-Receiver", 12},		/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION-1,	/* Priority		*/
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    &msg_receiver_on_rx_request,	/* on_rx_request()	*/
+    NULL,				/* on_rx_response()	*/
+    NULL,				/* on_tx_request()	*/
+    NULL,				/* on_tx_response()	*/
+    NULL,				/* on_tsx_state()	*/
+};
+
+/* Static vars, which will be reset on each test. */
+static int recv_count;
+static pj_time_val recv_last;
+static pj_bool_t test_complete;
+
+/* Loop transport instance. */
+static pjsip_transport *loop;
+
+/* General timer entry to be used by tests. */
+static struct my_timer
+{
+    pj_timer_entry  entry;
+    char	    key_buf[1024];
+    pj_str_t	    tsx_key;
+} timer;
+
+/*
+ * This is the handler to receive state changed notification from the
+ * transaction. It is used to verify that the transaction behaves according
+ * to the test scenario.
+ */
+static void tsx_user_on_tsx_state(pjsip_transaction *tsx, pjsip_event *e)
+{
+    if (pj_strcmp2(&tsx->branch, TEST1_BRANCH_ID)==0) {
+	/*
+	 * Transaction with TEST1_BRANCH_ID should terminate with transaction
+	 * timeout status.
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    if (test_complete == 0)
+		test_complete = 1;
+
+	    /* Test the status code. */
+	    if (tsx->status_code != PJSIP_SC_TSX_TIMEOUT) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: status code is %d instead of %d",
+			  tsx->status_code, PJSIP_SC_TSX_TIMEOUT));
+		test_complete = -710;
+	    }
+
+
+	    /* If transport is reliable, then there must not be any
+	     * retransmissions.
+	     */
+	    if (tp_flag & PJSIP_TRANSPORT_RELIABLE) {
+		if (recv_count != 1) {
+		    PJ_LOG(3,(THIS_FILE, 
+			   "    error: there were %d (re)transmissions",
+			   recv_count));
+		    test_complete = -715;
+		}
+	    } else {
+		/* Check the number of transmissions, which must be
+		 * 6 for INVITE and 10 for non-INVITE 
+		 */
+		if (tsx->method.id==PJSIP_INVITE_METHOD && recv_count != 7) {
+		    PJ_LOG(3,(THIS_FILE, 
+			   "    error: there were %d (re)transmissions",
+			   recv_count));
+		    test_complete = -716;
+		} else
+		if (tsx->method.id==PJSIP_OPTIONS_METHOD && recv_count != 11) {
+		    PJ_LOG(3,(THIS_FILE, 
+			   "    error: there were %d (re)transmissions",
+			   recv_count));
+		    test_complete = -717;
+		} else
+		if (tsx->method.id!=PJSIP_INVITE_METHOD && 
+		    tsx->method.id!=PJSIP_OPTIONS_METHOD)
+		{
+		    PJ_LOG(3,(THIS_FILE, "    error: unexpected method"));
+		    test_complete = -718;
+		}
+	    }
+	}
+
+    } else if (pj_strcmp2(&tsx->branch, TEST2_BRANCH_ID)==0) {
+	/*
+	 * Transaction with TEST2_BRANCH_ID should terminate with transport error.
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    /* Test the status code. */
+	    if (tsx->status_code != PJSIP_SC_TSX_TRANSPORT_ERROR) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: status code is %d instead of %d",
+			  tsx->status_code, PJSIP_SC_TSX_TRANSPORT_ERROR));
+		test_complete = -720;
+	    }
+
+	    if (test_complete == 0)
+		test_complete = 1;
+	}
+
+    } else if (pj_strcmp2(&tsx->branch, TEST3_BRANCH_ID)==0) {
+	/*
+	 * This test terminates the transaction while resolver is still
+	 * running. 
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_CALLING) {
+
+	    /* Terminate the transaction. */
+	    pjsip_tsx_terminate(tsx, PJSIP_SC_REQUEST_TERMINATED);
+
+	} else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    /* Check if status code is correct. */
+	    if (tsx->status_code != PJSIP_SC_REQUEST_TERMINATED) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: status code is %d instead of %d",
+			  tsx->status_code, PJSIP_SC_REQUEST_TERMINATED));
+		test_complete = -730;
+	    }
+
+	    if (test_complete == 0)
+		test_complete = 1;
+
+	}
+
+    } else if (pj_strcmp2(&tsx->branch, TEST4_BRANCH_ID)==0) {
+	/* 
+	 * This test simulates transport failure after several 
+	 * retransmissions.
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    /* Status code must be transport error. */
+	    if (tsx->status_code != PJSIP_SC_TSX_TRANSPORT_ERROR) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: status code is %d instead of %d",
+			  tsx->status_code, PJSIP_SC_TSX_TRANSPORT_ERROR));
+		test_complete = -730;
+	    }
+
+	    /* Must have correct retransmission count. */
+	    if (tsx->retransmit_count != TEST4_RETRANSMIT_CNT) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: retransmit cnt is %d instead of %d",
+			  tsx->retransmit_count, TEST4_RETRANSMIT_CNT));
+		test_complete = -731;
+	    }
+
+	    if (test_complete == 0)
+		test_complete = 1;
+	}
+
+
+    } else if (pj_strcmp2(&tsx->branch, TEST5_BRANCH_ID)==0) {
+	/* 
+	 * This test simulates transport failure after several 
+	 * retransmissions.
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    /* Status code must be PJSIP_SC_REQUEST_TERMINATED. */
+	    if (tsx->status_code != PJSIP_SC_REQUEST_TERMINATED) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: status code is %d instead of %d",
+			  tsx->status_code, PJSIP_SC_REQUEST_TERMINATED));
+		test_complete = -733;
+	    }
+
+	    /* Must have correct retransmission count. */
+	    if (tsx->retransmit_count != TEST5_RETRANSMIT_CNT) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: retransmit cnt is %d instead of %d",
+			  tsx->retransmit_count, TEST5_RETRANSMIT_CNT));
+		test_complete = -734;
+	    }
+
+	    if (test_complete == 0)
+		test_complete = 1;
+	}
+
+
+    } else if (pj_strcmp2(&tsx->branch, TEST6_BRANCH_ID)==0) {
+	/* 
+	 * Successfull non-INVITE transaction.
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_COMPLETED) {
+
+	    /* Status code must be 202. */
+	    if (tsx->status_code != 202) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: status code is %d instead of %d",
+			  tsx->status_code, 202));
+		test_complete = -736;
+	    }
+
+	    /* Must have correct retransmission count. */
+	    if (tsx->retransmit_count != 0) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: retransmit cnt is %d instead of %d",
+			  tsx->retransmit_count, 0));
+		test_complete = -737;
+	    }
+
+	    /* Must still keep last_tx */
+	    if (tsx->last_tx == NULL) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: transaction lost last_tx"));
+		test_complete = -738;
+	    }
+
+	    if (test_complete == 0) {
+		test_complete = 1;
+		pjsip_tsx_terminate(tsx, 202);
+	    }
+
+	} else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    /* Previous state must be COMPLETED. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_COMPLETED) {
+		test_complete = -7381;
+	    }
+
+	}
+
+    } else if (pj_strcmp2(&tsx->branch, TEST7_BRANCH_ID)==0) {
+	/* 
+	 * Successfull non-INVITE transaction.
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_COMPLETED) {
+
+	    /* Check prev state. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_PROCEEDING) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: prev state is %s instead of %s",
+			  pjsip_tsx_state_str(e->body.tsx_state.prev_state),
+			  pjsip_tsx_state_str(PJSIP_TSX_STATE_PROCEEDING)));
+		test_complete = -739;
+	    }
+
+	    /* Status code must be 202. */
+	    if (tsx->status_code != 202) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: status code is %d instead of %d",
+			  tsx->status_code, 202));
+		test_complete = -740;
+	    }
+
+	    /* Must have correct retransmission count. */
+	    if (tsx->retransmit_count != 0) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: retransmit cnt is %d instead of %d",
+			  tsx->retransmit_count, 0));
+		test_complete = -741;
+	    }
+
+	    /* Must still keep last_tx */
+	    if (tsx->last_tx == NULL) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: transaction lost last_tx"));
+		test_complete = -741;
+	    }
+
+	    if (test_complete == 0) {
+		test_complete = 1;
+		pjsip_tsx_terminate(tsx, 202);
+	    }
+
+	} else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    /* Previous state must be COMPLETED. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_COMPLETED) {
+		test_complete = -742;
+	    }
+
+	}
+
+
+    } else if (pj_strcmp2(&tsx->branch, TEST8_BRANCH_ID)==0) {
+	/* 
+	 * Failed INVITE transaction.
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_COMPLETED) {
+
+	    /* Status code must be 301. */
+	    if (tsx->status_code != 301) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: status code is %d instead of %d",
+			  tsx->status_code, 301));
+		test_complete = -745;
+	    }
+
+	    /* Must have correct retransmission count. */
+	    if (tsx->retransmit_count != 0) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: retransmit cnt is %d instead of %d",
+			  tsx->retransmit_count, 0));
+		test_complete = -746;
+	    }
+
+	    /* Must still keep last_tx */
+	    if (tsx->last_tx == NULL) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: transaction lost last_tx"));
+		test_complete = -747;
+	    }
+
+	    /* last_tx MUST be the INVITE request
+	     * (authorization depends on this behavior)
+	     */
+	    if (tsx->last_tx && tsx->last_tx->msg->line.req.method.id !=
+		PJSIP_INVITE_METHOD)
+	    {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: last_tx is not INVITE"));
+		test_complete = -748;
+	    }
+	}
+	else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    test_complete = 1;
+
+	    /* Previous state must be COMPLETED. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_COMPLETED) {
+		test_complete = -750;
+	    }
+
+	    /* Status code must be 301. */
+	    if (tsx->status_code != 301) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: status code is %d instead of %d",
+			  tsx->status_code, 301));
+		test_complete = -751;
+	    }
+
+	}
+
+
+    } else if (pj_strcmp2(&tsx->branch, TEST9_BRANCH_ID)==0) {
+	/* 
+	 * Failed INVITE transaction with provisional response.
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_COMPLETED) {
+
+	    /* Previous state must be PJSIP_TSX_STATE_PROCEEDING. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_PROCEEDING) {
+		test_complete = -760;
+	    }
+
+	    /* Status code must be 302. */
+	    if (tsx->status_code != 302) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: status code is %d instead of %d",
+			  tsx->status_code, 302));
+		test_complete = -761;
+	    }
+
+	    /* Must have correct retransmission count. */
+	    if (tsx->retransmit_count != 0) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: retransmit cnt is %d instead of %d",
+			  tsx->retransmit_count, 0));
+		test_complete = -762;
+	    }
+
+	    /* Must still keep last_tx */
+	    if (tsx->last_tx == NULL) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: transaction lost last_tx"));
+		test_complete = -763;
+	    }
+
+	    /* last_tx MUST be INVITE. 
+	     * (authorization depends on this behavior)
+	     */
+	    if (tsx->last_tx && tsx->last_tx->msg->line.req.method.id !=
+		PJSIP_INVITE_METHOD)
+	    {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: last_tx is not INVITE"));
+		test_complete = -764;
+	    }
+
+	}
+	else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    test_complete = 1;
+
+	    /* Previous state must be COMPLETED. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_COMPLETED) {
+		test_complete = -767;
+	    }
+
+	    /* Status code must be 302. */
+	    if (tsx->status_code != 302) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: status code is %d instead of %d",
+			  tsx->status_code, 302));
+		test_complete = -768;
+	    }
+
+	}
+
+    }
+}
+
+/*
+ * This timer callback is called to send delayed response.
+ */
+struct response
+{
+    pjsip_response_addr	 res_addr;
+    pjsip_tx_data	*tdata;
+};
+
+static void send_response_callback( pj_timer_heap_t *timer_heap,
+				    struct pj_timer_entry *entry)
+{
+    struct response *r = entry->user_data;
+    pjsip_transport *tp = r->res_addr.transport;
+
+    pjsip_endpt_send_response(endpt, &r->res_addr, r->tdata, NULL, NULL);
+    if (tp)
+	pjsip_transport_dec_ref(tp);
+}
+
+/* Timer callback to terminate a transaction. */
+static void terminate_tsx_callback( pj_timer_heap_t *timer_heap,
+				    struct pj_timer_entry *entry)
+{
+    struct my_timer *m = (struct my_timer *)entry;
+    pjsip_transaction *tsx = pjsip_tsx_layer_find_tsx(&m->tsx_key, PJ_FALSE);
+    int status_code = entry->id;
+
+    if (tsx) {
+	pjsip_tsx_terminate(tsx, status_code);
+    }
+}
+
+
+#define DIFF(a,b)   ((a<b) ? (b-a) : (a-b))
+
+/*
+ * This is the handler to receive message for this test. It is used to
+ * control and verify the behavior of the message transmitted by the
+ * transaction.
+ */
+static pj_bool_t msg_receiver_on_rx_request(pjsip_rx_data *rdata)
+{
+    if (pj_strcmp2(&rdata->msg_info.via->branch_param, TEST1_BRANCH_ID) == 0) {
+	/*
+	 * The TEST1_BRANCH_ID test performs the verifications for transaction
+	 * retransmission mechanism. It will not answer the incoming request
+	 * with any response.
+	 */
+	pjsip_msg *msg = rdata->msg_info.msg;
+
+	PJ_LOG(4,(THIS_FILE, "    received request"));
+
+	/* Only wants to take INVITE or OPTIONS method. */
+	if (msg->line.req.method.id != PJSIP_INVITE_METHOD &&
+	    msg->line.req.method.id != PJSIP_OPTIONS_METHOD)
+	{
+	    PJ_LOG(3,(THIS_FILE, "    error: received unexpected method %.*s",
+			  msg->line.req.method.name.slen,
+			  msg->line.req.method.name.ptr));
+	    test_complete = -600;
+	    return PJ_TRUE;
+	}
+
+	if (recv_count == 0) {
+	    recv_count++;
+	    //pj_gettimeofday(&recv_last);
+	    recv_last = rdata->pkt_info.timestamp;
+	} else {
+	    pj_time_val now;
+	    unsigned msec_expected, msec_elapsed;
+	    int max_received;
+
+	    //pj_gettimeofday(&now);
+	    now = rdata->pkt_info.timestamp;
+	    PJ_TIME_VAL_SUB(now, recv_last);
+	    msec_elapsed = now.sec*1000 + now.msec;
+
+	    ++recv_count;
+    	    msec_expected = (1<<(recv_count-2))*PJSIP_T1_TIMEOUT;
+
+	    if (msg->line.req.method.id != PJSIP_INVITE_METHOD) {
+		if (msec_expected > PJSIP_T2_TIMEOUT)
+		    msec_expected = PJSIP_T2_TIMEOUT;
+		max_received = 11;
+	    } else {
+		max_received = 7;
+	    }
+
+	    if (DIFF(msec_expected, msec_elapsed) > TEST1_ALLOWED_DIFF) {
+		PJ_LOG(3,(THIS_FILE,
+			  "    error: expecting retransmission no. %d in %d "
+			  "ms, received in %d ms",
+			  recv_count-1, msec_expected, msec_elapsed));
+		test_complete = -610;
+	    }
+
+	    
+	    if (recv_count > max_received) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: too many messages (%d) received",
+			  recv_count));
+		test_complete = -620;
+	    }
+
+	    //pj_gettimeofday(&recv_last);
+	    recv_last = rdata->pkt_info.timestamp;
+	}
+	return PJ_TRUE;
+
+    } else
+    if (pj_strcmp2(&rdata->msg_info.via->branch_param, TEST4_BRANCH_ID) == 0) {
+	/*
+	 * The TEST4_BRANCH_ID test simulates transport failure after several
+	 * retransmissions.
+	 */
+	recv_count++;
+
+	if (recv_count == TEST4_RETRANSMIT_CNT) {
+	    /* Simulate transport failure. */
+	    pjsip_loop_set_failure(loop, 2, NULL);
+
+	} else if (recv_count > TEST4_RETRANSMIT_CNT) {
+	    PJ_LOG(3,(THIS_FILE,"   error: not expecting %d-th packet!",
+		      recv_count));
+	    test_complete = -631;
+	}
+
+	return PJ_TRUE;
+
+
+    } else
+    if (pj_strcmp2(&rdata->msg_info.via->branch_param, TEST5_BRANCH_ID) == 0) {
+	/*
+	 * The TEST5_BRANCH_ID test simulates user terminating the transaction
+	 * after several retransmissions.
+	 */
+	recv_count++;
+
+	if (recv_count == TEST5_RETRANSMIT_CNT+1) {
+	    pj_str_t key;
+	    pjsip_transaction *tsx;
+
+	    pjsip_tsx_create_key( rdata->tp_info.pool, &key, PJSIP_ROLE_UAC,
+				  &rdata->msg_info.msg->line.req.method, rdata);
+	    tsx = pjsip_tsx_layer_find_tsx(&key, PJ_TRUE);
+	    if (tsx) {
+		pjsip_tsx_terminate(tsx, PJSIP_SC_REQUEST_TERMINATED);
+		pj_mutex_unlock(tsx->mutex);
+	    } else {
+		PJ_LOG(3,(THIS_FILE, "    error: uac transaction not found!"));
+		test_complete = -633;
+	    }
+
+	} else if (recv_count > TEST5_RETRANSMIT_CNT+1) {
+	    PJ_LOG(3,(THIS_FILE,"   error: not expecting %d-th packet!",
+		      recv_count));
+	    test_complete = -634;
+	}
+
+	return PJ_TRUE;
+
+    } else
+    if (pj_strcmp2(&rdata->msg_info.via->branch_param, TEST6_BRANCH_ID) == 0) {
+	/*
+	 * The TEST6_BRANCH_ID test successfull non-INVITE transaction.
+	 */
+	pj_status_t status;
+
+	recv_count++;
+
+	if (recv_count > 1) {
+	    PJ_LOG(3,(THIS_FILE,"   error: not expecting %d-th packet!",
+		      recv_count));
+	    test_complete = -635;
+	}
+
+	status = pjsip_endpt_respond_stateless(endpt, rdata, 202, NULL,
+					       NULL, NULL);
+	if (status != PJ_SUCCESS) {
+	    app_perror("    error: unable to send response", status);
+	    test_complete = -636;
+	}
+
+	return PJ_TRUE;
+
+
+    } else
+    if (pj_strcmp2(&rdata->msg_info.via->branch_param, TEST7_BRANCH_ID) == 0) {
+	/*
+	 * The TEST7_BRANCH_ID test successfull non-INVITE transaction
+	 * with provisional response.
+	 */
+	pj_status_t status;
+	pjsip_response_addr res_addr;
+	struct response *r;
+	pjsip_tx_data *tdata;
+	pj_time_val delay = { 2, 0 };
+
+	recv_count++;
+
+	if (recv_count > 1) {
+	    PJ_LOG(3,(THIS_FILE,"   error: not expecting %d-th packet!",
+		      recv_count));
+	    test_complete = -640;
+	    return PJ_TRUE;
+	}
+
+	/* Respond with provisional response */
+	status = pjsip_endpt_create_response(endpt, rdata, 100, NULL, &tdata);
+	pj_assert(status == PJ_SUCCESS);
+
+	status = pjsip_get_response_addr(tdata->pool, rdata, &res_addr);
+	pj_assert(status == PJ_SUCCESS);
+
+	status = pjsip_endpt_send_response(endpt, &res_addr, tdata, 
+					   NULL, NULL);
+	pj_assert(status == PJ_SUCCESS);
+
+	/* Create the final response. */
+	status = pjsip_endpt_create_response(endpt, rdata, 202, NULL, &tdata);
+	pj_assert(status == PJ_SUCCESS);
+
+	/* Schedule sending final response in couple of of secs. */
+	r = pj_pool_alloc(tdata->pool, sizeof(*r));
+	r->res_addr = res_addr;
+	r->tdata = tdata;
+	if (r->res_addr.transport)
+	    pjsip_transport_add_ref(r->res_addr.transport);
+
+	timer.entry.cb = &send_response_callback;
+	timer.entry.user_data = r;
+	pjsip_endpt_schedule_timer(endpt, &timer.entry, &delay);
+
+	return PJ_TRUE;
+
+
+    } else
+    if (pj_strcmp2(&rdata->msg_info.via->branch_param, TEST8_BRANCH_ID) == 0) {
+	/*
+	 * The TEST8_BRANCH_ID test failed INVITE transaction.
+	 */
+	pjsip_method *method;
+	pj_status_t status;
+
+	method = &rdata->msg_info.msg->line.req.method;
+
+	recv_count++;
+
+	if (method->id == PJSIP_INVITE_METHOD) {
+
+	    if (recv_count > 1) {
+		PJ_LOG(3,(THIS_FILE,"   error: not expecting %d-th packet!",
+			  recv_count));
+		test_complete = -635;
+	    }
+
+	    status = pjsip_endpt_respond_stateless(endpt, rdata, 301, NULL,
+						   NULL, NULL);
+	    if (status != PJ_SUCCESS) {
+		app_perror("    error: unable to send response", status);
+		test_complete = -636;
+	    }
+
+	} else if (method->id == PJSIP_ACK_METHOD) {
+
+	    if (recv_count == 2) {
+		pj_str_t key;
+		pj_time_val delay = { 5, 0 };
+		
+		/* Schedule timer to destroy transaction after 5 seconds.
+		 * This is to make sure that transaction does not 
+		 * retransmit ACK.
+		 */
+		pjsip_tsx_create_key(rdata->tp_info.pool, &key,
+				     PJSIP_ROLE_UAC, &pjsip_invite_method,
+				     rdata);
+
+		pj_strcpy(&timer.tsx_key, &key);
+		timer.entry.id = 301;
+		timer.entry.cb = &terminate_tsx_callback;
+
+		pjsip_endpt_schedule_timer(endpt, &timer.entry, &delay);
+	    }
+
+	    if (recv_count > 2) {
+		PJ_LOG(3,(THIS_FILE,"   error: not expecting %d-th packet!",
+			  recv_count));
+		test_complete = -638;
+	    }
+
+
+	} else {
+	    PJ_LOG(3,(THIS_FILE,"   error: not expecting %s",
+		      pjsip_rx_data_get_info(rdata)));
+	    test_complete = -639;
+
+	}
+
+
+    } else
+    if (pj_strcmp2(&rdata->msg_info.via->branch_param, TEST9_BRANCH_ID) == 0) {
+	/*
+	 * The TEST9_BRANCH_ID test failed INVITE transaction with
+	 * provisional response.
+	 */
+	pjsip_method *method;
+	pj_status_t status;
+
+	method = &rdata->msg_info.msg->line.req.method;
+
+	recv_count++;
+
+	if (method->id == PJSIP_INVITE_METHOD) {
+
+	    pjsip_response_addr res_addr;
+	    struct response *r;
+	    pjsip_tx_data *tdata;
+	    pj_time_val delay = { 2, 0 };
+
+	    if (recv_count > 1) {
+		PJ_LOG(3,(THIS_FILE,"   error: not expecting %d-th packet!",
+			  recv_count));
+		test_complete = -650;
+		return PJ_TRUE;
+	    }
+
+	    /* Respond with provisional response */
+	    status = pjsip_endpt_create_response(endpt, rdata, 100, NULL, 
+						 &tdata);
+	    pj_assert(status == PJ_SUCCESS);
+
+	    status = pjsip_get_response_addr(tdata->pool, rdata, &res_addr);
+	    pj_assert(status == PJ_SUCCESS);
+
+	    status = pjsip_endpt_send_response(endpt, &res_addr, tdata, 
+					       NULL, NULL);
+	    pj_assert(status == PJ_SUCCESS);
+
+	    /* Create the final response. */
+	    status = pjsip_endpt_create_response(endpt, rdata, 302, NULL, 
+						 &tdata);
+	    pj_assert(status == PJ_SUCCESS);
+
+	    /* Schedule sending final response in couple of of secs. */
+	    r = pj_pool_alloc(tdata->pool, sizeof(*r));
+	    r->res_addr = res_addr;
+	    r->tdata = tdata;
+	    if (r->res_addr.transport)
+		pjsip_transport_add_ref(r->res_addr.transport);
+
+	    timer.entry.cb = &send_response_callback;
+	    timer.entry.user_data = r;
+	    pjsip_endpt_schedule_timer(endpt, &timer.entry, &delay);
+
+	} else if (method->id == PJSIP_ACK_METHOD) {
+
+	    if (recv_count == 2) {
+		pj_str_t key;
+		pj_time_val delay = { 5, 0 };
+		
+		/* Schedule timer to destroy transaction after 5 seconds.
+		 * This is to make sure that transaction does not 
+		 * retransmit ACK.
+		 */
+		pjsip_tsx_create_key(rdata->tp_info.pool, &key,
+				     PJSIP_ROLE_UAC, &pjsip_invite_method,
+				     rdata);
+
+		pj_strcpy(&timer.tsx_key, &key);
+		timer.entry.id = 302;
+		timer.entry.cb = &terminate_tsx_callback;
+
+		pjsip_endpt_schedule_timer(endpt, &timer.entry, &delay);
+	    }
+
+	    if (recv_count > 2) {
+		PJ_LOG(3,(THIS_FILE,"   error: not expecting %d-th packet!",
+			  recv_count));
+		test_complete = -638;
+	    }
+
+
+	} else {
+	    PJ_LOG(3,(THIS_FILE,"   error: not expecting %s",
+		      pjsip_rx_data_get_info(rdata)));
+	    test_complete = -639;
+
+	}
+
+	return PJ_TRUE;
+
+    }
+
+    return PJ_FALSE;
+}
+
+/* 
+ * The generic test framework, used by most of the tests. 
+ */
+static int perform_tsx_test(int dummy, char *target_uri, char *from_uri, 
+			    char *branch_param, int test_time, 
+			    const pjsip_method *method)
+{
+    pjsip_tx_data *tdata;
+    pjsip_transaction *tsx;
+    pj_str_t target, from, tsx_key;
+    pjsip_via_hdr *via;
+    pj_time_val timeout;
+    pj_status_t status;
+
+    PJ_LOG(3,(THIS_FILE, 
+	      "   please standby, this will take at most %d seconds..",
+	      test_time));
+
+    /* Reset test. */
+    recv_count = 0;
+    test_complete = 0;
+
+    /* Init headers. */
+    target = pj_str(target_uri);
+    from = pj_str(from_uri);
+
+    /* Create request. */
+    status = pjsip_endpt_create_request( endpt, method, &target,
+					 &from, &target, NULL, NULL, -1, 
+					 NULL, &tdata);
+    if (status != PJ_SUCCESS) {
+	app_perror("   Error: unable to create request", status);
+	return -100;
+    }
+
+    /* Set the branch param for test 1. */
+    via = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL);
+    via->branch_param = pj_str(branch_param);
+
+    /* Add additional reference to tdata to prevent transaction from
+     * deleting it.
+     */
+    pjsip_tx_data_add_ref(tdata);
+
+    /* Create transaction. */
+    status = pjsip_tsx_create_uac( &tsx_user, tdata, &tsx);
+    if (status != PJ_SUCCESS) {
+	app_perror("   Error: unable to create UAC transaction", status);
+	pjsip_tx_data_dec_ref(tdata);
+	return -110;
+    }
+
+    /* Get transaction key. */
+    pj_strdup(tdata->pool, &tsx_key, &tsx->transaction_key);
+
+    /* Send the message. */
+    status = pjsip_tsx_send_msg(tsx, NULL);
+    // Ignore send result. Some tests do deliberately triggers error
+    // when sending message.
+    if (status != PJ_SUCCESS) {
+	// app_perror("   Error: unable to send request", status);
+        pjsip_tx_data_dec_ref(tdata);
+	// return -120;
+    }
+
+
+    /* Set test completion time. */
+    pj_gettimeofday(&timeout);
+    timeout.sec += test_time;
+
+    /* Wait until test complete. */
+    while (!test_complete) {
+	pj_time_val now, poll_delay = {0, 10};
+
+	pjsip_endpt_handle_events(endpt, &poll_delay);
+
+	pj_gettimeofday(&now);
+	if (now.sec > timeout.sec) {
+	    PJ_LOG(3,(THIS_FILE, "   Error: test has timed out"));
+	    pjsip_tx_data_dec_ref(tdata);
+	    return -130;
+	}
+    }
+
+    if (test_complete < 0) {
+	tsx = pjsip_tsx_layer_find_tsx(&tsx_key, PJ_TRUE);
+	if (tsx) {
+	    pjsip_tsx_terminate(tsx, PJSIP_SC_REQUEST_TERMINATED);
+	    pj_mutex_unlock(tsx->mutex);
+	    flush_events(1000);
+	}
+	pjsip_tx_data_dec_ref(tdata);
+	return test_complete;
+
+    } else {
+	pj_time_val now;
+
+	/* Allow transaction to destroy itself */
+	flush_events(500);
+
+	/* Wait until test completes */
+	pj_gettimeofday(&now);
+
+	if (PJ_TIME_VAL_LT(now, timeout)) {
+	    pj_time_val interval;
+	    interval = timeout;
+	    PJ_TIME_VAL_SUB(interval, now);
+	    flush_events(PJ_TIME_VAL_MSEC(interval));
+	}
+    }
+
+    /* Make sure transaction has been destroyed. */
+    if (pjsip_tsx_layer_find_tsx(&tsx_key, PJ_FALSE) != NULL) {
+	PJ_LOG(3,(THIS_FILE, "   Error: transaction has not been destroyed"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -140;
+    }
+
+    /* Check tdata reference counter. */
+    if (pj_atomic_get(tdata->ref_cnt) != 1) {
+	PJ_LOG(3,(THIS_FILE, "   Error: tdata reference counter is %d",
+		      pj_atomic_get(tdata->ref_cnt)));
+	pjsip_tx_data_dec_ref(tdata);
+	return -150;
+    }
+
+    /* Destroy txdata */
+    pjsip_tx_data_dec_ref(tdata);
+
+    return PJ_SUCCESS;
+}
+
+/*****************************************************************************
+ **
+ ** TEST1_BRANCH_ID: UAC basic retransmission and timeout test.
+ **
+ ** This will test the retransmission of the UAC transaction. Remote will not
+ ** answer the transaction, so the transaction should fail. The Via branch prm
+ ** TEST1_BRANCH_ID will be used for this test.
+ **
+ *****************************************************************************
+ */
+static int tsx_uac_retransmit_test(void)
+{
+    int status, enabled;
+    int i;
+    struct {
+	const pjsip_method *method;
+	unsigned      delay;
+    } sub_test[] = 
+    {
+	{ &pjsip_invite_method, 0},
+	{ &pjsip_invite_method, TEST1_ALLOWED_DIFF*2},
+	{ &pjsip_options_method, 0},
+	{ &pjsip_options_method, TEST1_ALLOWED_DIFF*2}
+    };
+
+    PJ_LOG(3,(THIS_FILE, "  test1: basic uac retransmit and timeout test"));
+
+
+    /* For this test. message printing shound be disabled because it makes
+     * incorrect timing.
+     */
+    enabled = msg_logger_set_enabled(0);
+
+    for (i=0; i<PJ_ARRAY_SIZE(sub_test); ++i) {
+
+	PJ_LOG(3,(THIS_FILE, 
+		  "   variant %c: %s with %d ms network delay",
+		  ('a' + i),
+		  sub_test[i].method->name.ptr,
+		  sub_test[i].delay));
+
+	/* Configure transport */
+	pjsip_loop_set_failure(loop, 0, NULL);
+	pjsip_loop_set_recv_delay(loop, sub_test[i].delay, NULL);
+
+	/* Do the test. */
+	status = perform_tsx_test(-500, TARGET_URI, FROM_URI, 
+				  TEST1_BRANCH_ID,
+				  35, sub_test[i].method);
+	if (status != 0)
+	    break;
+    }
+
+    /* Restore transport. */
+    pjsip_loop_set_recv_delay(loop, 0, NULL);
+
+    /* Restore msg logger. */
+    msg_logger_set_enabled(enabled);
+
+    /* Done. */
+    return status;
+}
+
+/*****************************************************************************
+ **
+ ** TEST2_BRANCH_ID: UAC resolve error test.
+ **
+ ** Test the scenario where destination host is unresolvable. There are
+ ** two variants:
+ **  (a) resolver returns immediate error
+ **  (b) resolver returns error via the callback.
+ **
+ *****************************************************************************
+ */
+static int tsx_resolve_error_test(void)
+{
+    int status;
+
+    PJ_LOG(3,(THIS_FILE, "  test2: resolve error test"));
+
+    /*
+     * Variant (a): immediate resolve error.
+     */
+    PJ_LOG(3,(THIS_FILE, "   variant a: immediate resolving error"));
+
+    status = perform_tsx_test(-800, 
+			      "sip:bob@unresolved-host",
+			      FROM_URI,  TEST2_BRANCH_ID, 10, 
+			      &pjsip_options_method);
+    if (status != 0)
+	return status;
+
+    /*
+     * Variant (b): error via callback.
+     */
+    PJ_LOG(3,(THIS_FILE, "   variant b: error via callback"));
+
+    /* This only applies to "loop-dgram" transport */
+    if (test_param->type == PJSIP_TRANSPORT_LOOP_DGRAM) {
+	/* Set loop transport to return delayed error. */
+	pjsip_loop_set_failure(loop, 2, NULL);
+	pjsip_loop_set_send_callback_delay(loop, 10, NULL);
+
+	status = perform_tsx_test(-800, TARGET_URI, FROM_URI, 
+				  TEST2_BRANCH_ID, 2, 
+				  &pjsip_options_method);
+	if (status != 0)
+	    return status;
+
+	/* Restore loop transport settings. */
+	pjsip_loop_set_failure(loop, 0, NULL);
+	pjsip_loop_set_send_callback_delay(loop, 0, NULL);
+    }
+
+    return status;
+}
+
+
+/*****************************************************************************
+ **
+ ** TEST3_BRANCH_ID: UAC terminate while resolving test.
+ **
+ ** Terminate the transaction while resolver is still running.
+ **
+ *****************************************************************************
+ */
+static int tsx_terminate_resolving_test(void)
+{
+    unsigned prev_delay;
+    pj_status_t status;
+
+    PJ_LOG(3,(THIS_FILE, "  test3: terminate while resolving test"));
+
+    /* Configure transport delay. */
+    pjsip_loop_set_send_callback_delay(loop, 100, &prev_delay);
+
+    /* Start the test. */
+    status = perform_tsx_test(-900, TARGET_URI, FROM_URI,
+			      TEST3_BRANCH_ID, 2, &pjsip_options_method);
+
+    /* Restore delay. */
+    pjsip_loop_set_send_callback_delay(loop, prev_delay, NULL);
+
+    return status;
+}
+
+
+/*****************************************************************************
+ **
+ ** TEST4_BRANCH_ID: Transport failed after several retransmissions
+ **
+ ** There are two variants of this test: (a) failure occurs immediately when
+ ** transaction calls pjsip_transport_send() or (b) failure is reported via
+ ** transport callback.
+ **
+ *****************************************************************************
+ */
+static int tsx_retransmit_fail_test(void)
+{
+    int i;
+    unsigned delay[] = {0, 10};
+    pj_status_t status;
+
+    PJ_LOG(3,(THIS_FILE, 
+	      "  test4: transport fails after several retransmissions test"));
+
+
+    for (i=0; i<PJ_ARRAY_SIZE(delay); ++i) {
+
+	PJ_LOG(3,(THIS_FILE, 
+		  "   variant %c: transport delay %d ms", ('a'+i), delay[i]));
+
+	/* Configure transport delay. */
+	pjsip_loop_set_send_callback_delay(loop, delay[i], NULL);
+
+	/* Restore transport failure mode. */
+	pjsip_loop_set_failure(loop, 0, 0);
+
+	/* Start the test. */
+	status = perform_tsx_test(-1000, TARGET_URI, FROM_URI,
+				  TEST4_BRANCH_ID, 6, &pjsip_options_method);
+
+	if (status != 0)
+	    break;
+
+    }
+
+    /* Restore delay. */
+    pjsip_loop_set_send_callback_delay(loop, 0, NULL);
+
+    /* Restore transport failure mode. */
+    pjsip_loop_set_failure(loop, 0, 0);
+
+    return status;
+}
+
+
+/*****************************************************************************
+ **
+ ** TEST5_BRANCH_ID: Terminate transaction after several retransmissions
+ **
+ *****************************************************************************
+ */
+static int tsx_terminate_after_retransmit_test(void)
+{
+    int status;
+
+    PJ_LOG(3,(THIS_FILE, "  test5: terminate after retransmissions"));
+
+    /* Do the test. */
+    status = perform_tsx_test(-1100, TARGET_URI, FROM_URI, 
+			      TEST5_BRANCH_ID,
+			      6, &pjsip_options_method);
+
+    /* Done. */
+    return status;
+}
+
+
+/*****************************************************************************
+ **
+ ** TEST6_BRANCH_ID: Successfull non-invite transaction
+ ** TEST7_BRANCH_ID: Successfull non-invite transaction with provisional
+ ** TEST8_BRANCH_ID: Failed invite transaction
+ ** TEST9_BRANCH_ID: Failed invite transaction with provisional
+ **
+ *****************************************************************************
+ */
+static int perform_generic_test( const char *title,
+				 char *branch_id,
+				 const pjsip_method *method)
+{
+    int i, status;
+    unsigned delay[] = { 1, 200 };
+
+    PJ_LOG(3,(THIS_FILE, "  %s", title));
+
+    /* Do the test. */
+    for (i=0; i<PJ_ARRAY_SIZE(delay); ++i) {
+	
+	if (test_param->type == PJSIP_TRANSPORT_LOOP_DGRAM) {
+	    PJ_LOG(3,(THIS_FILE, "   variant %c: with %d ms transport delay",
+				 ('a'+i), delay[i]));
+
+	    pjsip_loop_set_delay(loop, delay[i]);
+	}
+
+	status = perform_tsx_test(-1200, TARGET_URI, FROM_URI,
+				  branch_id, 10, method);
+	if (status != 0)
+	    return status;
+
+	if (test_param->type != PJSIP_TRANSPORT_LOOP_DGRAM)
+	    break;
+    }
+
+    pjsip_loop_set_delay(loop, 0);
+
+    /* Done. */
+    return status;
+}
+
+
+/*****************************************************************************
+ **
+ ** UAC Transaction Test.
+ **
+ *****************************************************************************
+ */
+int tsx_uac_test(struct tsx_test_param *param)
+{
+    pj_sockaddr_in addr;
+    pj_status_t status;
+
+    timer.tsx_key.ptr = timer.key_buf;
+
+    test_param = param;
+
+    /* Get transport flag */
+    tp_flag = pjsip_transport_get_flag_from_type(test_param->type);
+
+    pj_ansi_sprintf(TARGET_URI, "sip:bob@127.0.0.1:%d;transport=%s", 
+		    param->port, param->tp_type);
+    pj_ansi_sprintf(FROM_URI, "sip:alice@127.0.0.1:%d;transport=%s", 
+		    param->port, param->tp_type);
+
+    /* Check if loop transport is configured. */
+    status = pjsip_endpt_acquire_transport(endpt, PJSIP_TRANSPORT_LOOP_DGRAM, 
+				      &addr, sizeof(addr), NULL, &loop);
+    if (status != PJ_SUCCESS) {
+	PJ_LOG(3,(THIS_FILE, "  Error: loop transport is not configured!"));
+	return -10;
+    }
+
+    /* Register modules. */
+    status = pjsip_endpt_register_module(endpt, &tsx_user);
+    if (status != PJ_SUCCESS) {
+	app_perror("   Error: unable to register module", status);
+	return -30;
+    }
+    status = pjsip_endpt_register_module(endpt, &msg_receiver);
+    if (status != PJ_SUCCESS) {
+	app_perror("   Error: unable to register module", status);
+	return -40;
+    }
+
+    /* TEST1_BRANCH_ID: Basic retransmit and timeout test. */
+    status = tsx_uac_retransmit_test();
+    if (status != 0)
+	return status;
+
+    /* TEST2_BRANCH_ID: Resolve error test. */
+    status = tsx_resolve_error_test();
+    if (status != 0)
+	return status;
+
+    /* TEST3_BRANCH_ID: UAC terminate while resolving test. */
+    status = tsx_terminate_resolving_test();
+    if (status != 0)
+	return status;
+
+    /* TEST4_BRANCH_ID: Transport failed after several retransmissions.
+     *                  Only applies to loop transport.
+     */
+    if (test_param->type == PJSIP_TRANSPORT_LOOP_DGRAM) {
+	status = tsx_retransmit_fail_test();
+	if (status != 0)
+	    return status;
+    }
+
+    /* TEST5_BRANCH_ID: Terminate transaction after several retransmissions 
+     *			Only applicable to non-reliable transports.
+     */
+    if ((tp_flag & PJSIP_TRANSPORT_RELIABLE) == 0) {
+	status = tsx_terminate_after_retransmit_test();
+	if (status != 0)
+	    return status;
+    }
+
+    /* TEST6_BRANCH_ID: Successfull non-invite transaction */
+    status = perform_generic_test("test6: successfull non-invite transaction",
+				  TEST6_BRANCH_ID, &pjsip_options_method);
+    if (status != 0)
+	return status;
+
+    /* TEST7_BRANCH_ID: Successfull non-invite transaction */
+    status = perform_generic_test("test7: successfull non-invite transaction "
+				  "with provisional response",
+				  TEST7_BRANCH_ID, &pjsip_options_method);
+    if (status != 0)
+	return status;
+
+    /* TEST8_BRANCH_ID: Failed invite transaction */
+    status = perform_generic_test("test8: failed invite transaction",
+				  TEST8_BRANCH_ID, &pjsip_invite_method);
+    if (status != 0)
+	return status;
+
+    /* TEST9_BRANCH_ID: Failed invite transaction with provisional response */
+    status = perform_generic_test("test9: failed invite transaction with "
+				  "provisional response",
+				  TEST9_BRANCH_ID, &pjsip_invite_method);
+    if (status != 0)
+	return status;
+
+    pjsip_transport_dec_ref(loop);
+    flush_events(500);
+
+    /* Unregister modules. */
+    status = pjsip_endpt_unregister_module(endpt, &tsx_user);
+    if (status != PJ_SUCCESS) {
+	app_perror("   Error: unable to unregister module", status);
+	return -31;
+    }
+    status = pjsip_endpt_unregister_module(endpt, &msg_receiver);
+    if (status != PJ_SUCCESS) {
+	app_perror("   Error: unable to unregister module", status);
+	return -41;
+    }
+
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/tsx_uas_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/tsx_uas_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/tsx_uas_test.c	(revision 1163)
@@ -0,0 +1,1655 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+#define THIS_FILE   "tsx_uas_test.c"
+
+
+/*****************************************************************************
+ **
+ ** UAS tests.
+ **
+ ** This file performs various tests for UAC transactions. Each test will have
+ ** a different Via branch param so that message receiver module and 
+ ** transaction user module can identify which test is being carried out.
+ **
+ ** TEST1_BRANCH_ID
+ **	Test that non-INVITE transaction returns 2xx response to the correct
+ **	transport and correctly terminates the transaction.
+ **	This also checks that transaction is destroyed immediately after
+ **	it sends final response when reliable transport is used.
+ **
+ ** TEST2_BRANCH_ID
+ **	As above, for non-2xx final response.
+ **
+ ** TEST3_BRANCH_ID
+ **	Transaction correctly progressing to PROCEEDING state when provisional
+ **	response is sent.
+ **
+ ** TEST4_BRANCH_ID
+ **	Transaction retransmits last response (if any) without notifying 
+ **	transaction user upon receiving request  retransmissions on TRYING
+ **	state
+ **
+ ** TEST5_BRANCH_ID
+ **	As above, in PROCEEDING state.
+ **
+ ** TEST6_BRANCH_ID
+ **	As above, in COMPLETED state, with first sending provisional response.
+ **	(Only applicable for non-reliable transports).
+ **
+ ** TEST7_BRANCH_ID
+ **	INVITE transaction MUST retransmit non-2xx final response.
+ **
+ ** TEST8_BRANCH_ID
+ **	As above, for INVITE's 2xx final response (this is PJSIP specific).
+ **
+ ** TEST9_BRANCH_ID
+ **	INVITE transaction MUST cease retransmission of final response when
+ **	ACK is received. (Note: PJSIP also retransmit 2xx final response 
+ **	until it's terminated by user).
+ **     Transaction also MUST terminate in T4 seconds.
+ **	(Only applicable for non-reliable transports).
+ **
+ ** TEST11_BRANCH_ID
+ **	Test scenario where transport fails before response is sent (i.e.
+ **	in TRYING state).
+ **
+ ** TEST12_BRANCH_ID
+ **	As above, after provisional response is sent but before final
+ **	response is sent (i.e. in PROCEEDING state).
+ **
+ ** TEST13_BRANCH_ID
+ **	As above, for INVITE, after final response has been sent but before
+ **	ACK is received (i.e. in CONNECTED state).
+ **
+ ** TEST14_BRANCH_ID
+ **	When UAS failed to deliver the response with the selected transport,
+ **	it should try contacting the client with other transport or begin
+ **	RFC 3263 server resolution procedure.
+ **	This should be tested on:
+ **	    a. TRYING state (when delivering first response).
+ **	    b. PROCEEDING state (when failed to retransmit last response
+ **	       upon receiving request retransmission).
+ **	    c. COMPLETED state.
+ **
+ **/
+
+static char *TEST1_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAS-Test1";
+static char *TEST2_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAS-Test2";
+static char *TEST3_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAS-Test3";
+static char *TEST4_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAS-Test4";
+static char *TEST5_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAS-Test5";
+static char *TEST6_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAS-Test6";
+static char *TEST7_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAS-Test7";
+static char *TEST8_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAS-Test8";
+static char *TEST9_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAS-Test9";
+static char *TEST10_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAS-Test10";
+static char *TEST11_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAS-Test11";
+static char *TEST12_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAS-Test12";
+//static char *TEST13_BRANCH_ID = PJSIP_RFC3261_BRANCH_ID "-UAS-Test13";
+
+#define TEST1_STATUS_CODE	200
+#define TEST2_STATUS_CODE	301
+#define TEST3_PROVISIONAL_CODE	PJSIP_SC_QUEUED
+#define TEST3_STATUS_CODE	202
+#define TEST4_STATUS_CODE	200
+#define TEST4_REQUEST_COUNT	2
+#define TEST5_PROVISIONAL_CODE	100
+#define TEST5_STATUS_CODE	200	
+#define TEST5_REQUEST_COUNT	2
+#define TEST5_RESPONSE_COUNT	2
+#define TEST6_PROVISIONAL_CODE	100
+#define TEST6_STATUS_CODE	200	/* Must be final */
+#define TEST6_REQUEST_COUNT	2
+#define TEST6_RESPONSE_COUNT	3
+#define TEST7_STATUS_CODE	301
+#define TEST8_STATUS_CODE	302
+#define TEST9_STATUS_CODE	301
+
+
+#define TEST4_TITLE "test4: absorbing request retransmission"
+#define TEST5_TITLE "test5: retransmit last response in PROCEEDING state"
+#define TEST6_TITLE "test6: retransmit last response in COMPLETED state"
+
+
+static char TARGET_URI[128];
+static char FROM_URI[128];
+static struct tsx_test_param *test_param;
+static unsigned tp_flag;
+
+
+#define TEST_TIMEOUT_ERROR	-30
+#define MAX_ALLOWED_DIFF	150
+
+static void tsx_user_on_tsx_state(pjsip_transaction *tsx, pjsip_event *e);
+static pj_bool_t on_rx_message(pjsip_rx_data *rdata);
+
+/* UAC transaction user module. */
+static pjsip_module tsx_user = 
+{
+    NULL, NULL,				/* prev and next	*/
+    { "Tsx-UAS-User", 12},		/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION-1,	/* Priority		*/
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    NULL,				/* on_rx_request()	*/
+    NULL,				/* on_rx_response()	*/
+    NULL,				/* on_tx_request()	*/
+    NULL,				/* on_tx_response()	*/
+    &tsx_user_on_tsx_state,		/* on_tsx_state()	*/
+};
+
+/* Module to send request. */
+static pjsip_module msg_sender = 
+{
+    NULL, NULL,				/* prev and next	*/
+    { "Msg-Sender", 10},		/* Name.		*/
+    -1,					/* Id			*/
+    PJSIP_MOD_PRIORITY_APPLICATION-1,	/* Priority		*/
+    NULL,				/* load()		*/
+    NULL,				/* start()		*/
+    NULL,				/* stop()		*/
+    NULL,				/* unload()		*/
+    &on_rx_message,			/* on_rx_request()	*/
+    &on_rx_message,			/* on_rx_response()	*/
+    NULL,				/* on_tx_request()	*/
+    NULL,				/* on_tx_response()	*/
+    NULL,				/* on_tsx_state()	*/
+};
+
+/* Static vars, which will be reset on each test. */
+static int recv_count;
+static pj_time_val recv_last;
+static pj_bool_t test_complete;
+
+/* Loop transport instance. */
+static pjsip_transport *loop;
+
+/* UAS transaction key. */
+static char key_buf[64];
+static pj_str_t tsx_key = { key_buf, 0 };
+
+
+/* General timer entry to be used by tests. */
+//static pj_timer_entry timer;
+
+/* Timer to send response via transaction. */
+struct response
+{
+    pj_str_t	     tsx_key;
+    pjsip_tx_data   *tdata;
+};
+
+/* Timer callback to send response. */
+static void send_response_timer( pj_timer_heap_t *timer_heap,
+				 struct pj_timer_entry *entry)
+{
+    pjsip_transaction *tsx;
+    struct response *r = entry->user_data;
+    pj_status_t status;
+
+    tsx = pjsip_tsx_layer_find_tsx(&r->tsx_key, PJ_TRUE);
+    if (!tsx) {
+	PJ_LOG(3,(THIS_FILE,"    error: timer unable to find transaction"));
+	pjsip_tx_data_dec_ref(r->tdata);
+	return;
+    }
+
+    status = pjsip_tsx_send_msg(tsx, r->tdata);
+    if (status != PJ_SUCCESS) {
+	// Some tests do expect failure!
+	//PJ_LOG(3,(THIS_FILE,"    error: timer unable to send response"));
+	pj_mutex_unlock(tsx->mutex);
+	pjsip_tx_data_dec_ref(r->tdata);
+	return;
+    }
+
+    pj_mutex_unlock(tsx->mutex);
+}
+
+/* Utility to send response. */
+static void send_response( pjsip_rx_data *rdata,
+			   pjsip_transaction *tsx,
+			   int status_code )
+{
+    pj_status_t status;
+    pjsip_tx_data *tdata;
+
+    status = pjsip_endpt_create_response( endpt, rdata, status_code, NULL, 
+					  &tdata);
+    if (status != PJ_SUCCESS) {
+	app_perror("    error: unable to create response", status);
+	test_complete = -196;
+	return;
+    }
+
+    status = pjsip_tsx_send_msg(tsx, tdata);
+    if (status != PJ_SUCCESS) {
+	pjsip_tx_data_dec_ref(tdata);
+	// Some tests do expect failure!
+	//app_perror("    error: unable to send response", status);
+	//test_complete = -197;
+	return;
+    }
+}
+
+/* Schedule timer to send response for the specified UAS transaction */
+static void schedule_send_response( pjsip_rx_data *rdata,
+				    const pj_str_t *tsx_key,
+				    int status_code,
+				    int msec_delay )
+{
+    pj_status_t status;
+    pjsip_tx_data *tdata;
+    pj_timer_entry *t;
+    struct response *r;
+    pj_time_val delay;
+
+    status = pjsip_endpt_create_response( endpt, rdata, status_code, NULL, 
+					  &tdata);
+    if (status != PJ_SUCCESS) {
+	app_perror("    error: unable to create response", status);
+	test_complete = -198;
+	return;
+    }
+
+    r = pj_pool_alloc(tdata->pool, sizeof(*r));
+    pj_strdup(tdata->pool, &r->tsx_key, tsx_key);
+    r->tdata = tdata;
+
+    delay.sec = 0;
+    delay.msec = msec_delay;
+    pj_time_val_normalize(&delay);
+
+    t = pj_pool_zalloc(tdata->pool, sizeof(*t));
+    t->user_data = r;
+    t->cb = &send_response_timer;
+
+    status = pjsip_endpt_schedule_timer(endpt, t, &delay);
+    if (status != PJ_SUCCESS) {
+	pjsip_tx_data_dec_ref(tdata);
+	app_perror("    error: unable to schedule timer", status);
+	test_complete = -199;
+	return;
+    }
+}
+
+
+/* Find and terminate tsx with the specified key. */
+static void terminate_our_tsx(int status_code)
+{
+    pjsip_transaction *tsx;
+
+    tsx = pjsip_tsx_layer_find_tsx(&tsx_key, PJ_TRUE);
+    if (!tsx) {
+	PJ_LOG(3,(THIS_FILE,"    error: timer unable to find transaction"));
+	return;
+    }
+
+    pjsip_tsx_terminate(tsx, status_code);
+    pj_mutex_unlock(tsx->mutex);
+}
+
+#if 0	/* Unused for now */
+/* Timer callback to terminate transaction. */
+static void terminate_tsx_timer( pj_timer_heap_t *timer_heap,
+				 struct pj_timer_entry *entry)
+{
+    terminate_our_tsx(entry->id);
+}
+
+
+/* Schedule timer to terminate transaction. */
+static void schedule_terminate_tsx( pjsip_transaction *tsx,
+				    int status_code,
+				    int msec_delay )
+{
+    pj_time_val delay;
+
+    delay.sec = 0;
+    delay.msec = msec_delay;
+    pj_time_val_normalize(&delay);
+
+    pj_assert(pj_strcmp(&tsx->transaction_key, &tsx_key)==0);
+    timer.user_data = NULL;
+    timer.id = status_code;
+    timer.cb = &terminate_tsx_timer;
+    pjsip_endpt_schedule_timer(endpt, &timer, &delay);
+}
+#endif
+
+
+/*
+ * This is the handler to receive state changed notification from the
+ * transaction. It is used to verify that the transaction behaves according
+ * to the test scenario.
+ */
+static void tsx_user_on_tsx_state(pjsip_transaction *tsx, pjsip_event *e)
+{
+    if (pj_strcmp2(&tsx->branch, TEST1_BRANCH_ID)==0 ||
+	pj_strcmp2(&tsx->branch, TEST2_BRANCH_ID)==0) 
+    {
+	/*
+	 * TEST1_BRANCH_ID tests that non-INVITE transaction transmits final
+	 * response using correct transport and terminates transaction after
+	 * T4 (PJSIP_T4_TIMEOUT, 5 seconds).
+	 *
+	 * TEST2_BRANCH_ID does similar test for non-2xx final response.
+	 */
+	int status_code = (pj_strcmp2(&tsx->branch, TEST1_BRANCH_ID)==0) ?
+			  TEST1_STATUS_CODE : TEST2_STATUS_CODE;
+
+	if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    test_complete = 1;
+
+	    /* Check that status code is status_code. */
+	    if (tsx->status_code != status_code) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect status code"));
+		test_complete = -100;
+	    }
+	    
+	    /* Previous state must be completed. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_COMPLETED) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect prev_state"));
+		test_complete = -101;
+	    }
+
+	} else if (tsx->state == PJSIP_TSX_STATE_COMPLETED) {
+
+	    /* Previous state must be TRYING. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_TRYING) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect prev_state"));
+		test_complete = -102;
+	    }
+	}
+
+    }
+    else
+    if (pj_strcmp2(&tsx->branch, TEST3_BRANCH_ID)==0) {
+	/*
+	 * TEST3_BRANCH_ID tests sending provisional response.
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    test_complete = 1;
+
+	    /* Check that status code is status_code. */
+	    if (tsx->status_code != TEST3_STATUS_CODE) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect status code"));
+		test_complete = -110;
+	    }
+	    
+	    /* Previous state must be completed. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_COMPLETED) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect prev_state"));
+		test_complete = -111;
+	    }
+
+	} else if (tsx->state == PJSIP_TSX_STATE_PROCEEDING) {
+
+	    /* Previous state must be TRYING. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_TRYING) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect prev_state"));
+		test_complete = -112;
+	    }
+
+	    /* Check that status code is status_code. */
+	    if (tsx->status_code != TEST3_PROVISIONAL_CODE) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect status code"));
+		test_complete = -113;
+	    }
+
+	    /* Check that event must be TX_MSG */
+	    if (e->body.tsx_state.type != PJSIP_EVENT_TX_MSG) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect event"));
+		test_complete = -114;
+	    }
+
+	} else if (tsx->state == PJSIP_TSX_STATE_COMPLETED) {
+
+	    /* Previous state must be PROCEEDING. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_PROCEEDING) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect prev_state"));
+		test_complete = -115;
+	    }
+
+	    /* Check that status code is status_code. */
+	    if (tsx->status_code != TEST3_STATUS_CODE) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect status code"));
+		test_complete = -116;
+	    }
+
+	    /* Check that event must be TX_MSG */
+	    if (e->body.tsx_state.type != PJSIP_EVENT_TX_MSG) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect event"));
+		test_complete = -117;
+	    }
+
+	}
+
+    } else
+    if (pj_strcmp2(&tsx->branch, TEST4_BRANCH_ID)==0) {
+	/*
+	 * TEST4_BRANCH_ID tests receiving retransmissions in TRYING state.
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_TRYING) {
+	    /* Request is received. */
+	} else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    /* Check that status code is status_code. */
+	    if (tsx->status_code != TEST4_STATUS_CODE) {
+		PJ_LOG(3,(THIS_FILE, 
+			  "    error: incorrect status code %d "
+			  "(expecting %d)", tsx->status_code,
+			  TEST4_STATUS_CODE));
+		test_complete = -120;
+	    }
+	    
+	    /* Previous state. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_TRYING) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect prev_state"));
+		test_complete = -121;
+	    }
+
+	} else if (tsx->state != PJSIP_TSX_STATE_DESTROYED) 
+	{
+	    PJ_LOG(3,(THIS_FILE, "    error: unexpected state %s (122)",
+		      pjsip_tsx_state_str(tsx->state)));
+	    test_complete = -122;
+
+	}
+
+
+    } else
+    if (pj_strcmp2(&tsx->branch, TEST5_BRANCH_ID)==0) {
+	/*
+	 * TEST5_BRANCH_ID tests receiving retransmissions in PROCEEDING state
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_TRYING) {
+	    /* Request is received. */
+
+	} else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    /* Check that status code is status_code. */
+	    if (tsx->status_code != TEST5_STATUS_CODE) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect status code"));
+		test_complete = -130;
+	    }
+	    
+	    /* Previous state. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_PROCEEDING) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect prev_state"));
+		test_complete = -131;
+	    }
+
+	} else if (tsx->state == PJSIP_TSX_STATE_PROCEEDING) {
+
+	    /* Check status code. */
+	    if (tsx->status_code != TEST5_PROVISIONAL_CODE) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect status code"));
+		test_complete = -132;
+	    }
+
+	} else if (tsx->state != PJSIP_TSX_STATE_DESTROYED) {
+	    PJ_LOG(3,(THIS_FILE, "    error: unexpected state %s (133)",
+		      pjsip_tsx_state_str(tsx->state)));
+	    test_complete = -133;
+
+	}
+
+    } else
+    if (pj_strcmp2(&tsx->branch, TEST6_BRANCH_ID)==0) {
+	/*
+	 * TEST6_BRANCH_ID tests receiving retransmissions in COMPLETED state
+	 */
+	if (tsx->state == PJSIP_TSX_STATE_TRYING) {
+	    /* Request is received. */
+
+	} else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    /* Check that status code is status_code. */
+	    if (tsx->status_code != TEST6_STATUS_CODE) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect status code %d "
+			  "(expecting %d)", tsx->status_code, 
+			  TEST6_STATUS_CODE));
+		test_complete = -140;
+	    }
+	    
+	    /* Previous state. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_COMPLETED) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect prev_state"));
+		test_complete = -141;
+	    }
+
+	} else if (tsx->state != PJSIP_TSX_STATE_PROCEEDING &&
+		   tsx->state != PJSIP_TSX_STATE_COMPLETED &&
+		   tsx->state != PJSIP_TSX_STATE_DESTROYED) 
+	{
+	    PJ_LOG(3,(THIS_FILE, "    error: unexpected state %s (142)",
+		      pjsip_tsx_state_str(tsx->state)));
+	    test_complete = -142;
+
+	}
+
+
+    } else
+    if (pj_strcmp2(&tsx->branch, TEST7_BRANCH_ID)==0 ||
+	pj_strcmp2(&tsx->branch, TEST8_BRANCH_ID)==0) 
+    {
+	/*
+	 * TEST7_BRANCH_ID and TEST8_BRANCH_ID test retransmission of
+	 * INVITE final response
+	 */
+	int code;
+
+	if (pj_strcmp2(&tsx->branch, TEST7_BRANCH_ID) == 0)
+	    code = TEST7_STATUS_CODE;
+	else
+	    code = TEST8_STATUS_CODE;
+
+	if (tsx->state == PJSIP_TSX_STATE_TRYING) {
+	    /* Request is received. */
+
+	} else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    if (test_complete == 0)
+		test_complete = 1;
+
+	    /* Check status code. */
+	    if (tsx->status_code != PJSIP_SC_TSX_TIMEOUT) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect status code"));
+		test_complete = -150;
+	    }
+	    
+	    /* Previous state. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_COMPLETED) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect prev_state"));
+		test_complete = -151;
+	    }
+
+	    /* Check the number of retransmissions */
+	    if (tp_flag & PJSIP_TRANSPORT_RELIABLE) {
+
+		if (tsx->retransmit_count != 0) {
+		    PJ_LOG(3,(THIS_FILE, "    error: should not retransmit"));
+		    test_complete = -1510;
+		}
+
+	    } else {
+
+		if (tsx->retransmit_count != 10) {
+		    PJ_LOG(3,(THIS_FILE, 
+			      "    error: incorrect retransmit count %d "
+			      "(expecting 10)",
+			      tsx->retransmit_count));
+		    test_complete = -1510;
+		}
+
+	    }
+
+	} else if (tsx->state == PJSIP_TSX_STATE_COMPLETED) {
+
+	    /* Check that status code is status_code. */
+	    if (tsx->status_code != code) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect status code"));
+		test_complete = -152;
+	    }
+	    
+	    /* Previous state. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_TRYING) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect prev_state"));
+		test_complete = -153;
+	    }
+
+	} else if (tsx->state != PJSIP_TSX_STATE_DESTROYED)  {
+
+	    PJ_LOG(3,(THIS_FILE, "    error: unexpected state (154)"));
+	    test_complete = -154;
+
+	}
+
+
+    } else
+    if (pj_strcmp2(&tsx->branch, TEST9_BRANCH_ID)==0)  {
+	/*
+	 * TEST9_BRANCH_ID tests that retransmission of INVITE final response
+	 * must cease when ACK is received.
+	 */
+
+	if (tsx->state == PJSIP_TSX_STATE_TRYING) {
+	    /* Request is received. */
+
+	} else if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+
+	    if (test_complete == 0)
+		test_complete = 1;
+
+	    /* Check status code. */
+	    if (tsx->status_code != TEST9_STATUS_CODE) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect status code"));
+		test_complete = -160;
+	    }
+	    
+	    /* Previous state. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_CONFIRMED) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect prev_state"));
+		test_complete = -161;
+	    }
+
+	} else if (tsx->state == PJSIP_TSX_STATE_COMPLETED) {
+
+	    /* Check that status code is status_code. */
+	    if (tsx->status_code != TEST9_STATUS_CODE) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect status code"));
+		test_complete = -162;
+	    }
+	    
+	    /* Previous state. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_TRYING) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect prev_state"));
+		test_complete = -163;
+	    }
+
+
+	} else if (tsx->state == PJSIP_TSX_STATE_CONFIRMED) {
+
+	    /* Check that status code is status_code. */
+	    if (tsx->status_code != TEST9_STATUS_CODE) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect status code"));
+		test_complete = -164;
+	    }
+	    
+	    /* Previous state. */
+	    if (e->body.tsx_state.prev_state != PJSIP_TSX_STATE_COMPLETED) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect prev_state"));
+		test_complete = -165;
+	    }
+
+	} else if (tsx->state != PJSIP_TSX_STATE_DESTROYED)  {
+
+	    PJ_LOG(3,(THIS_FILE, "    error: unexpected state (166)"));
+	    test_complete = -166;
+
+	}
+
+
+    } else
+    if (pj_strcmp2(&tsx->branch, TEST10_BRANCH_ID)==0 ||
+	pj_strcmp2(&tsx->branch, TEST11_BRANCH_ID)==0 ||
+	pj_strcmp2(&tsx->branch, TEST12_BRANCH_ID)==0)  
+    {
+	if (tsx->state == PJSIP_TSX_STATE_TERMINATED) {
+	    
+	    if (!test_complete)
+		test_complete = 1;
+
+	    if (tsx->status_code != PJSIP_SC_TSX_TRANSPORT_ERROR) {
+		PJ_LOG(3,(THIS_FILE,"    error: incorrect status code"));
+		test_complete = -170;
+	    }
+	}
+    }
+
+}
+
+/* Save transaction key to global variables. */
+static void save_key(pjsip_transaction *tsx)
+{
+    pj_str_t key;
+
+    pj_strdup(tsx->pool, &key, &tsx->transaction_key);
+    pj_strcpy(&tsx_key, &key);
+}
+
+#define DIFF(a,b)   ((a<b) ? (b-a) : (a-b))
+
+/*
+ * Message receiver handler.
+ */
+static pj_bool_t on_rx_message(pjsip_rx_data *rdata)
+{
+    pjsip_msg *msg = rdata->msg_info.msg;
+    pj_str_t branch_param = rdata->msg_info.via->branch_param;
+    pj_status_t status;
+
+    if (pj_strcmp2(&branch_param, TEST1_BRANCH_ID) == 0 ||
+	pj_strcmp2(&branch_param, TEST2_BRANCH_ID) == 0) 
+    {
+	/*
+	 * TEST1_BRANCH_ID tests that non-INVITE transaction transmits 2xx 
+	 * final response using correct transport and terminates transaction 
+	 * after 32 seconds.
+	 *
+	 * TEST2_BRANCH_ID performs similar test for non-2xx final response.
+	 */
+	int status_code = (pj_strcmp2(&branch_param, TEST1_BRANCH_ID) == 0) ?
+			  TEST1_STATUS_CODE : TEST2_STATUS_CODE;
+
+	if (msg->type == PJSIP_REQUEST_MSG) {
+	    /* On received request, create UAS and respond with final 
+	     * response. 
+	     */
+	    pjsip_transaction *tsx;
+
+	    status = pjsip_tsx_create_uas(&tsx_user, rdata, &tsx);
+	    if (status != PJ_SUCCESS) {
+		app_perror("    error: unable to create transaction", status);
+		test_complete = -110;
+		return PJ_TRUE;
+	    }
+	    pjsip_tsx_recv_msg(tsx, rdata);
+
+	    save_key(tsx);
+	    send_response(rdata, tsx, status_code);
+
+	} else {
+	    /* Verify the response received. */
+
+	    ++recv_count;
+
+	    /* Verify status code. */
+	    if (msg->line.status.code != status_code) {
+		PJ_LOG(3,(THIS_FILE, "    error: incorrect status code"));
+		test_complete = -113;
+	    }
+
+	    /* Verify that no retransmissions is received. */
+	    if (recv_count > 1) {
+		PJ_LOG(3,(THIS_FILE, "    error: retransmission received"));
+		test_complete = -114;
+	    }
+
+	}
+	return PJ_TRUE;
+
+    } else if (pj_strcmp2(&branch_param, TEST3_BRANCH_ID) == 0) {
+
+	/* TEST3_BRANCH_ID tests provisional response. */
+
+	if (msg->type == PJSIP_REQUEST_MSG) {
+	    /* On received request, create UAS and respond with provisional
+	     * response, then schedule timer to send final response.
+	     */
+	    pjsip_transaction *tsx;
+
+	    status = pjsip_tsx_create_uas(&tsx_user, rdata, &tsx);
+	    if (status != PJ_SUCCESS) {
+		app_perror("    error: unable to create transaction", status);
+		test_complete = -116;
+		return PJ_TRUE;
+	    }
+	    pjsip_tsx_recv_msg(tsx, rdata);
+
+	    save_key(tsx);
+
+	    send_response(rdata, tsx, TEST3_PROVISIONAL_CODE);
+	    schedule_send_response(rdata, &tsx->transaction_key, 
+				   TEST3_STATUS_CODE, 2000);
+
+	} else {
+	    /* Verify the response received. */
+
+	    ++recv_count;
+
+	    if (recv_count == 1) {
+		/* Verify status code. */
+		if (msg->line.status.code != TEST3_PROVISIONAL_CODE) {
+		    PJ_LOG(3,(THIS_FILE, "    error: incorrect status code"));
+		    test_complete = -123;
+		}
+	    } else if (recv_count == 2) {
+		/* Verify status code. */
+		if (msg->line.status.code != TEST3_STATUS_CODE) {
+		    PJ_LOG(3,(THIS_FILE, "    error: incorrect status code"));
+		    test_complete = -124;
+		}
+	    } else {
+		PJ_LOG(3,(THIS_FILE, "    error: retransmission received"));
+		test_complete = -125;
+	    }
+
+	}
+	return PJ_TRUE;
+
+    } else if (pj_strcmp2(&branch_param, TEST4_BRANCH_ID) == 0 ||
+	       pj_strcmp2(&branch_param, TEST5_BRANCH_ID) == 0 ||
+	       pj_strcmp2(&branch_param, TEST6_BRANCH_ID) == 0) 
+    {
+
+	/* TEST4_BRANCH_ID: absorbs retransmissions in TRYING state. */
+	/* TEST5_BRANCH_ID: retransmit last response in PROCEEDING state. */
+	/* TEST6_BRANCH_ID: retransmit last response in COMPLETED state. */
+
+	if (msg->type == PJSIP_REQUEST_MSG) {
+	    /* On received request, create UAS. */
+	    pjsip_transaction *tsx;
+
+	    PJ_LOG(4,(THIS_FILE, "    received request (probably retransmission)"));
+
+	    status = pjsip_tsx_create_uas(&tsx_user, rdata, &tsx);
+	    if (status != PJ_SUCCESS) {
+		app_perror("    error: unable to create transaction", status);
+		test_complete = -130;
+		return PJ_TRUE;
+	    }
+
+	    pjsip_tsx_recv_msg(tsx, rdata);
+	    save_key(tsx);
+
+	    if (pj_strcmp2(&branch_param, TEST4_BRANCH_ID) == 0) {
+
+	    } else if (pj_strcmp2(&branch_param, TEST5_BRANCH_ID) == 0) {
+		send_response(rdata, tsx, TEST5_PROVISIONAL_CODE);
+
+	    } else if (pj_strcmp2(&branch_param, TEST6_BRANCH_ID) == 0) {
+		PJ_LOG(4,(THIS_FILE, "    sending provisional response"));
+		send_response(rdata, tsx, TEST6_PROVISIONAL_CODE);
+		PJ_LOG(4,(THIS_FILE, "    sending final response"));
+		send_response(rdata, tsx, TEST6_STATUS_CODE);
+	    }
+
+	} else {
+	    /* Verify the response received. */
+	    
+	    PJ_LOG(4,(THIS_FILE, "    received response number %d", recv_count));
+
+	    ++recv_count;
+
+	    if (pj_strcmp2(&branch_param, TEST4_BRANCH_ID) == 0) {
+		PJ_LOG(3,(THIS_FILE, "    error: not expecting response!"));
+		test_complete = -132;
+
+	    } else if (pj_strcmp2(&branch_param, TEST5_BRANCH_ID) == 0) {
+
+		if (rdata->msg_info.msg->line.status.code!=TEST5_PROVISIONAL_CODE) {
+		    PJ_LOG(3,(THIS_FILE, "    error: incorrect status code!"));
+		    test_complete = -133;
+
+		} 
+		if (recv_count > TEST5_RESPONSE_COUNT) {
+		    PJ_LOG(3,(THIS_FILE, "    error: not expecting response!"));
+		    test_complete = -134;
+		}
+
+	    } else if (pj_strcmp2(&branch_param, TEST6_BRANCH_ID) == 0) {
+
+		int code = rdata->msg_info.msg->line.status.code;
+
+		switch (recv_count) {
+		case 1:
+		    if (code != TEST6_PROVISIONAL_CODE) {
+			PJ_LOG(3,(THIS_FILE, "    error: invalid code!"));
+			test_complete = -135;
+		    }
+		    break;
+		case 2:
+		case 3:
+		    if (code != TEST6_STATUS_CODE) {
+			PJ_LOG(3,(THIS_FILE, "    error: invalid code %d "
+				  "(expecting %d)", code, TEST6_STATUS_CODE));
+			test_complete = -136;
+		    }
+		    break;
+		default:
+		    PJ_LOG(3,(THIS_FILE, "    error: not expecting response"));
+		    test_complete = -137;
+		    break;
+		}
+	    }
+	}
+	return PJ_TRUE;
+
+
+    } else if (pj_strcmp2(&branch_param, TEST7_BRANCH_ID) == 0 ||
+	       pj_strcmp2(&branch_param, TEST8_BRANCH_ID) == 0) 
+    {
+
+	/*
+	 * TEST7_BRANCH_ID and TEST8_BRANCH_ID test the retransmission
+	 * of INVITE final response
+	 */
+	if (msg->type == PJSIP_REQUEST_MSG) {
+
+	    /* On received request, create UAS. */
+	    pjsip_transaction *tsx;
+
+	    status = pjsip_tsx_create_uas(&tsx_user, rdata, &tsx);
+	    if (status != PJ_SUCCESS) {
+		app_perror("    error: unable to create transaction", status);
+		test_complete = -140;
+		return PJ_TRUE;
+	    }
+
+	    pjsip_tsx_recv_msg(tsx, rdata);
+	    save_key(tsx);
+
+	    if (pj_strcmp2(&branch_param, TEST7_BRANCH_ID) == 0) {
+
+		send_response(rdata, tsx, TEST7_STATUS_CODE);
+
+	    } else {
+
+		send_response(rdata, tsx, TEST8_STATUS_CODE);
+
+	    }
+
+	} else {
+	    int code;
+
+	    ++recv_count;
+
+	    if (pj_strcmp2(&branch_param, TEST7_BRANCH_ID) == 0)
+		code = TEST7_STATUS_CODE;
+	    else
+		code = TEST8_STATUS_CODE;
+
+	    if (recv_count==1) {
+		
+		if (rdata->msg_info.msg->line.status.code != code) {
+		    PJ_LOG(3,(THIS_FILE,"    error: invalid status code"));
+		    test_complete = -141;
+		}
+
+		recv_last = rdata->pkt_info.timestamp;
+
+	    } else {
+
+		pj_time_val now;
+		unsigned msec, msec_expected;
+
+		now = rdata->pkt_info.timestamp;
+
+		PJ_TIME_VAL_SUB(now, recv_last);
+	    
+		msec = now.sec*1000 + now.msec;
+		msec_expected = (1 << (recv_count-2)) * PJSIP_T1_TIMEOUT;
+		if (msec_expected > PJSIP_T2_TIMEOUT)
+		    msec_expected = PJSIP_T2_TIMEOUT;
+
+		if (DIFF(msec, msec_expected) > MAX_ALLOWED_DIFF) {
+		    PJ_LOG(3,(THIS_FILE,
+			      "    error: incorrect retransmission "
+			      "time (%d ms expected, %d ms received",
+			      msec_expected, msec));
+		    test_complete = -142;
+		}
+
+		if (recv_count > 11) {
+		    PJ_LOG(3,(THIS_FILE,"    error: too many responses (%d)",
+					recv_count));
+		    test_complete = -143;
+		}
+
+		recv_last = rdata->pkt_info.timestamp;
+	    }
+
+	}
+	return PJ_TRUE;
+
+    } else if (pj_strcmp2(&branch_param, TEST9_BRANCH_ID) == 0) {
+
+	/*
+	 * TEST9_BRANCH_ID tests that the retransmission of INVITE final 
+	 * response should cease when ACK is received. Transaction also MUST
+	 * terminate in T4 seconds.
+	 */
+	if (msg->type == PJSIP_REQUEST_MSG) {
+
+	    /* On received request, create UAS. */
+	    pjsip_transaction *tsx;
+
+	    status = pjsip_tsx_create_uas(&tsx_user, rdata, &tsx);
+	    if (status != PJ_SUCCESS) {
+		app_perror("    error: unable to create transaction", status);
+		test_complete = -150;
+		return PJ_TRUE;
+	    }
+
+	    pjsip_tsx_recv_msg(tsx, rdata);
+	    save_key(tsx);
+	    send_response(rdata, tsx, TEST9_STATUS_CODE);
+
+
+	} else {
+
+	    ++recv_count;
+
+	    if (rdata->msg_info.msg->line.status.code != TEST9_STATUS_CODE) {
+		PJ_LOG(3,(THIS_FILE,"    error: invalid status code"));
+		test_complete = -151;
+	    }
+
+	    if (recv_count==1) {
+
+		recv_last = rdata->pkt_info.timestamp;
+
+	    } else if (recv_count < 5) {
+
+		/* Let UAS retransmit some messages before we send ACK. */
+		pj_time_val now;
+		unsigned msec, msec_expected;
+
+		now = rdata->pkt_info.timestamp;
+
+		PJ_TIME_VAL_SUB(now, recv_last);
+	    
+		msec = now.sec*1000 + now.msec;
+		msec_expected = (1 << (recv_count-2)) * PJSIP_T1_TIMEOUT;
+		if (msec_expected > PJSIP_T2_TIMEOUT)
+		    msec_expected = PJSIP_T2_TIMEOUT;
+
+		if (DIFF(msec, msec_expected) > MAX_ALLOWED_DIFF) {
+		    PJ_LOG(3,(THIS_FILE,
+			      "    error: incorrect retransmission "
+			      "time (%d ms expected, %d ms received",
+			      msec_expected, msec));
+		    test_complete = -152;
+		}
+
+		recv_last = rdata->pkt_info.timestamp;
+
+	    } else if (recv_count == 5) {
+		pjsip_tx_data *tdata;
+		pjsip_sip_uri *uri;
+		pjsip_via_hdr *via;
+
+		status = pjsip_endpt_create_request_from_hdr(
+			    endpt, &pjsip_ack_method, 
+			    rdata->msg_info.to->uri,
+			    rdata->msg_info.from,
+			    rdata->msg_info.to,
+			    NULL, 
+			    rdata->msg_info.cid,
+			    rdata->msg_info.cseq->cseq,
+			    NULL,
+			    &tdata);
+		if (status != PJ_SUCCESS) {
+		    app_perror("    error: unable to create ACK", status);
+		    test_complete = -153;
+		    return PJ_TRUE;
+		}
+
+		uri=(pjsip_sip_uri*)pjsip_uri_get_uri(tdata->msg->line.req.uri);
+		uri->transport_param = pj_str("loop-dgram");
+
+		via = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL);
+		via->branch_param = pj_str(TEST9_BRANCH_ID);
+
+		status = pjsip_endpt_send_request_stateless(endpt, tdata,
+							    NULL, NULL);
+		if (status != PJ_SUCCESS) {
+		    app_perror("    error: unable to send ACK", status);
+		    test_complete = -154;
+		}
+
+	    } else {
+		PJ_LOG(3,(THIS_FILE,"    error: too many responses (%d)",
+				    recv_count));
+		test_complete = -155;
+	    }
+
+	}
+	return PJ_TRUE;
+
+    } else if (pj_strcmp2(&branch_param, TEST10_BRANCH_ID) == 0 ||
+	       pj_strcmp2(&branch_param, TEST11_BRANCH_ID) == 0 ||
+	       pj_strcmp2(&branch_param, TEST12_BRANCH_ID) == 0) 
+    {
+	int test_num, code1, code2;
+
+	if (pj_strcmp2(&branch_param, TEST10_BRANCH_ID) == 0)
+	    test_num=10, code1 = 100, code2 = 0;
+	else if (pj_strcmp2(&branch_param, TEST11_BRANCH_ID) == 0)
+	    test_num=11, code1 = 100, code2 = 200;
+	else
+	    test_num=12, code1 = 200, code2 = 0;
+
+	if (rdata->msg_info.msg->type == PJSIP_REQUEST_MSG) {
+
+	    /* On received response, create UAS. */
+	    pjsip_transaction *tsx;
+
+	    status = pjsip_tsx_create_uas(&tsx_user, rdata, &tsx);
+	    if (status != PJ_SUCCESS) {
+		app_perror("    error: unable to create transaction", status);
+		test_complete = -150;
+		return PJ_TRUE;
+	    }
+
+	    pjsip_tsx_recv_msg(tsx, rdata);
+	    save_key(tsx);
+	    
+	    schedule_send_response(rdata, &tsx_key, code1, 1000);
+
+	    if (code2)
+		schedule_send_response(rdata, &tsx_key, code2, 2000);
+
+	} else {
+
+	}
+
+	return PJ_TRUE;
+    }
+
+    return PJ_FALSE;
+}
+
+/* 
+ * The generic test framework, used by most of the tests. 
+ */
+static int perform_test( char *target_uri, char *from_uri, 
+			 char *branch_param, int test_time, 
+			 const pjsip_method *method,
+			 int request_cnt, int request_interval_msec,
+			 int expecting_timeout)
+{
+    pjsip_tx_data *tdata;
+    pj_str_t target, from;
+    pjsip_via_hdr *via;
+    pj_time_val timeout, next_send;
+    int sent_cnt;
+    pj_status_t status;
+
+    PJ_LOG(3,(THIS_FILE, 
+	      "   please standby, this will take at most %d seconds..",
+	      test_time));
+
+    /* Reset test. */
+    recv_count = 0;
+    test_complete = 0;
+    tsx_key.slen = 0;
+
+    /* Init headers. */
+    target = pj_str(target_uri);
+    from = pj_str(from_uri);
+
+    /* Create request. */
+    status = pjsip_endpt_create_request( endpt, method, &target,
+					 &from, &target, NULL, NULL, -1, 
+					 NULL, &tdata);
+    if (status != PJ_SUCCESS) {
+	app_perror("   Error: unable to create request", status);
+	return -10;
+    }
+
+    /* Set the branch param for test 1. */
+    via = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL);
+    via->branch_param = pj_str(branch_param);
+
+    /* Schedule first send. */
+    sent_cnt = 0;
+    pj_gettimeofday(&next_send);
+    pj_time_val_normalize(&next_send);
+
+    /* Set test completion time. */
+    pj_gettimeofday(&timeout);
+    timeout.sec += test_time;
+
+    /* Wait until test complete. */
+    while (!test_complete) {
+	pj_time_val now, poll_delay = {0, 10};
+
+	pjsip_endpt_handle_events(endpt, &poll_delay);
+
+	pj_gettimeofday(&now);
+
+	if (sent_cnt < request_cnt && PJ_TIME_VAL_GTE(now, next_send)) {
+	    /* Add additional reference to tdata to prevent transaction from
+	     * deleting it.
+	     */
+	    pjsip_tx_data_add_ref(tdata);
+
+	    /* (Re)Send the request. */
+	    PJ_LOG(4,(THIS_FILE, "    (re)sending request %d", sent_cnt));
+
+	    status = pjsip_endpt_send_request_stateless(endpt, tdata, 0, 0);
+	    if (status != PJ_SUCCESS) {
+		app_perror("   Error: unable to send request", status);
+		pjsip_tx_data_dec_ref(tdata);
+		return -20;
+	    }
+
+	    /* Schedule next send, if any. */
+	    sent_cnt++;
+	    if (sent_cnt < request_cnt) {
+		pj_gettimeofday(&next_send);
+		next_send.msec += request_interval_msec;
+		pj_time_val_normalize(&next_send);
+	    }
+	}
+
+	if (now.sec > timeout.sec) {
+	    if (!expecting_timeout)
+		PJ_LOG(3,(THIS_FILE, "   Error: test has timed out"));
+	    pjsip_tx_data_dec_ref(tdata);
+	    return TEST_TIMEOUT_ERROR;
+	}
+    }
+
+    if (test_complete < 0) {
+	pjsip_transaction *tsx;
+
+	tsx = pjsip_tsx_layer_find_tsx(&tsx_key, PJ_TRUE);
+	if (tsx) {
+	    pjsip_tsx_terminate(tsx, PJSIP_SC_REQUEST_TERMINATED);
+	    pj_mutex_unlock(tsx->mutex);
+	    flush_events(1000);
+	}
+	pjsip_tx_data_dec_ref(tdata);
+	return test_complete;
+    }
+
+    /* Allow transaction to destroy itself */
+    flush_events(500);
+
+    /* Make sure transaction has been destroyed. */
+    if (pjsip_tsx_layer_find_tsx(&tsx_key, PJ_FALSE) != NULL) {
+	PJ_LOG(3,(THIS_FILE, "   Error: transaction has not been destroyed"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -40;
+    }
+
+    /* Check tdata reference counter. */
+    if (pj_atomic_get(tdata->ref_cnt) != 1) {
+	PJ_LOG(3,(THIS_FILE, "   Error: tdata reference counter is %d",
+		      pj_atomic_get(tdata->ref_cnt)));
+	pjsip_tx_data_dec_ref(tdata);
+	return -50;
+    }
+
+    /* Destroy txdata */
+    pjsip_tx_data_dec_ref(tdata);
+
+    return PJ_SUCCESS;
+
+}
+
+
+/*****************************************************************************
+ **
+ ** TEST1_BRANCH_ID: Basic 2xx final response
+ ** TEST2_BRANCH_ID: Basic non-2xx final response
+ **
+ *****************************************************************************
+ */
+static int tsx_basic_final_response_test(void)
+{
+    unsigned duration;
+    int status;
+
+    PJ_LOG(3,(THIS_FILE,"  test1: basic sending 2xx final response"));
+
+    /* Test duration must be greater than 32 secs if unreliable transport
+     * is used.
+     */
+    duration = (tp_flag & PJSIP_TRANSPORT_RELIABLE) ? 1 : 33;
+
+    status = perform_test(TARGET_URI, FROM_URI, TEST1_BRANCH_ID,
+			  duration,  &pjsip_options_method, 1, 0, 0);
+    if (status != 0)
+	return status;
+
+    PJ_LOG(3,(THIS_FILE,"  test2: basic sending non-2xx final response"));
+
+    status = perform_test(TARGET_URI, FROM_URI, TEST2_BRANCH_ID,
+			  duration, &pjsip_options_method, 1, 0, 0);
+    if (status != 0)
+	return status;
+
+    return 0;
+}
+
+
+/*****************************************************************************
+ **
+ ** TEST3_BRANCH_ID: Sending provisional response
+ **
+ *****************************************************************************
+ */
+static int tsx_basic_provisional_response_test(void)
+{
+    unsigned duration;
+    int status;
+
+    PJ_LOG(3,(THIS_FILE,"  test3: basic sending 2xx final response"));
+
+    duration = (tp_flag & PJSIP_TRANSPORT_RELIABLE) ? 1 : 33;
+    duration += 2;
+
+    status = perform_test(TARGET_URI, FROM_URI, TEST3_BRANCH_ID, duration,
+			  &pjsip_options_method, 1, 0, 0);
+
+    return status;
+}
+
+
+/*****************************************************************************
+ **
+ ** TEST4_BRANCH_ID: Absorbs retransmissions in TRYING state
+ ** TEST5_BRANCH_ID: Absorbs retransmissions in PROCEEDING state
+ ** TEST6_BRANCH_ID: Absorbs retransmissions in COMPLETED state
+ **
+ *****************************************************************************
+ */
+static int tsx_retransmit_last_response_test(const char *title,
+					     char *branch_id,
+					     int request_cnt,
+					     int status_code)
+{
+    int status;
+
+    PJ_LOG(3,(THIS_FILE,"  %s", title));
+
+    status = perform_test(TARGET_URI, FROM_URI, branch_id, 5,
+			  &pjsip_options_method, 
+			  request_cnt, 1000, 1);
+    if (status && status != TEST_TIMEOUT_ERROR)
+	return status;
+    if (!status) {
+	PJ_LOG(3,(THIS_FILE, "   error: expecting timeout"));
+	return -31;
+    }
+
+    terminate_our_tsx(status_code);
+    flush_events(100);
+
+    if (test_complete != 1)
+	return test_complete;
+
+    flush_events(100);
+    return 0;
+}
+
+/*****************************************************************************
+ **
+ ** TEST7_BRANCH_ID: INVITE non-2xx final response retransmission test
+ ** TEST8_BRANCH_ID: INVITE 2xx final response retransmission test
+ **
+ *****************************************************************************
+ */
+static int tsx_final_response_retransmission_test(void)
+{
+    int status;
+
+    PJ_LOG(3,(THIS_FILE,
+	      "  test7: INVITE non-2xx final response retransmission"));
+
+    status = perform_test(TARGET_URI, FROM_URI, TEST7_BRANCH_ID,
+			  33, /* Test duration must be greater than 32 secs */
+			  &pjsip_invite_method, 1, 0, 0);
+    if (status != 0)
+	return status;
+
+    PJ_LOG(3,(THIS_FILE,
+	      "  test8: INVITE 2xx final response retransmission"));
+
+    status = perform_test(TARGET_URI, FROM_URI, TEST8_BRANCH_ID,
+			  33, /* Test duration must be greater than 32 secs */
+			  &pjsip_invite_method, 1, 0, 0);
+    if (status != 0)
+	return status;
+
+    return 0;
+}
+
+
+/*****************************************************************************
+ **
+ ** TEST9_BRANCH_ID: retransmission of non-2xx INVITE final response must 
+ ** cease when ACK is received
+ **
+ *****************************************************************************
+ */
+static int tsx_ack_test(void)
+{
+    int status;
+
+    PJ_LOG(3,(THIS_FILE,
+	      "  test9: receiving ACK for non-2xx final response"));
+
+    status = perform_test(TARGET_URI, FROM_URI, TEST9_BRANCH_ID,
+			  20, /* allow 5 retransmissions */
+			  &pjsip_invite_method, 1, 0, 0);
+    if (status != 0)
+	return status;
+
+
+    return 0;
+}
+
+
+
+/*****************************************************************************
+ **
+ ** TEST10_BRANCH_ID: test transport failure in TRYING state.
+ ** TEST11_BRANCH_ID: test transport failure in PROCEEDING state.
+ ** TEST12_BRANCH_ID: test transport failure in CONNECTED state.
+ ** TEST13_BRANCH_ID: test transport failure in CONFIRMED state.
+ **
+ *****************************************************************************
+ */
+static int tsx_transport_failure_test(void)
+{
+    struct test_desc
+    {
+	int transport_delay;
+	int fail_delay;
+	char *branch_id;
+	char *title;
+    } tests[] = 
+    {
+	{ 0,  10,   TEST10_BRANCH_ID, "test10: failed transport in TRYING state (no delay)" },
+	{ 50, 10,   TEST10_BRANCH_ID, "test10: failed transport in TRYING state (50 ms delay)" },
+	{ 0,  1500, TEST11_BRANCH_ID, "test11: failed transport in PROCEEDING state (no delay)" },
+	{ 50, 1500, TEST11_BRANCH_ID, "test11: failed transport in PROCEEDING state (50 ms delay)" },
+	{ 0,  2500, TEST12_BRANCH_ID, "test12: failed transport in COMPLETED state (no delay)" },
+	{ 50, 2500, TEST12_BRANCH_ID, "test12: failed transport in COMPLETED state (50 ms delay)" },
+    };
+    int i, status;
+
+    for (i=0; i<PJ_ARRAY_SIZE(tests); ++i) {
+	pj_time_val fail_time, end_test, now;
+
+	PJ_LOG(3,(THIS_FILE, "  %s", tests[i].title));
+	pjsip_loop_set_failure(loop, 0, NULL);
+	pjsip_loop_set_delay(loop, tests[i].transport_delay);
+
+	status = perform_test(TARGET_URI, FROM_URI, tests[i].branch_id,
+			      0, &pjsip_invite_method, 1, 0, 1);
+	if (status && status != TEST_TIMEOUT_ERROR)
+	    return status;
+	if (!status) {
+	    PJ_LOG(3,(THIS_FILE, "   error: expecting timeout"));
+	    return -40;
+	}
+
+	pj_gettimeofday(&fail_time);
+	fail_time.msec += tests[i].fail_delay;
+	pj_time_val_normalize(&fail_time);
+
+	do {
+	    pj_time_val interval = { 0, 1 };
+	    pj_gettimeofday(&now);
+	    pjsip_endpt_handle_events(endpt, &interval);
+	} while (PJ_TIME_VAL_LT(now, fail_time));
+
+	pjsip_loop_set_failure(loop, 1, NULL);
+
+	end_test = now;
+	end_test.sec += 5;
+
+	do {
+	    pj_time_val interval = { 0, 1 };
+	    pj_gettimeofday(&now);
+	    pjsip_endpt_handle_events(endpt, &interval);
+	} while (!test_complete && PJ_TIME_VAL_LT(now, end_test));
+
+	if (test_complete == 0) {
+	    PJ_LOG(3,(THIS_FILE, "   error: test has timed out"));
+	    return -41;
+	}
+
+	if (test_complete != 1)
+	    return test_complete;
+    }
+
+    return 0;
+}
+
+/*****************************************************************************
+ **
+ ** UAS Transaction Test.
+ **
+ *****************************************************************************
+ */
+int tsx_uas_test(struct tsx_test_param *param)
+{
+    pj_sockaddr_in addr;
+    pj_status_t status;
+
+    test_param = param;
+    tp_flag = pjsip_transport_get_flag_from_type(param->type);
+
+    pj_ansi_sprintf(TARGET_URI, "sip:bob@127.0.0.1:%d;transport=%s", 
+		    param->port, param->tp_type);
+    pj_ansi_sprintf(FROM_URI, "sip:alice@127.0.0.1:%d;transport=%s", 
+		    param->port, param->tp_type);
+
+    /* Check if loop transport is configured. */
+    status = pjsip_endpt_acquire_transport(endpt, PJSIP_TRANSPORT_LOOP_DGRAM, 
+				      &addr, sizeof(addr), NULL, &loop);
+    if (status != PJ_SUCCESS) {
+	PJ_LOG(3,(THIS_FILE, "  Error: loop transport is not configured!"));
+	return -10;
+    }
+    /* Register modules. */
+    status = pjsip_endpt_register_module(endpt, &tsx_user);
+    if (status != PJ_SUCCESS) {
+	app_perror("   Error: unable to register module", status);
+	return -3;
+    }
+    status = pjsip_endpt_register_module(endpt, &msg_sender);
+    if (status != PJ_SUCCESS) {
+	app_perror("   Error: unable to register module", status);
+	return -4;
+    }
+
+    /* TEST1_BRANCH_ID: Basic 2xx final response. 
+     * TEST2_BRANCH_ID: Basic non-2xx final response. 
+     */
+    status = tsx_basic_final_response_test();
+    if (status != 0)
+	return status;
+
+    /* TEST3_BRANCH_ID: with provisional response
+     */
+    status = tsx_basic_provisional_response_test();
+    if (status != 0)
+	return status;
+
+    /* TEST4_BRANCH_ID: absorbs retransmissions in TRYING state
+     */
+    status = tsx_retransmit_last_response_test(TEST4_TITLE,
+					       TEST4_BRANCH_ID, 
+					       TEST4_REQUEST_COUNT,
+					       TEST4_STATUS_CODE);
+    if (status != 0)
+	return status;
+
+    /* TEST5_BRANCH_ID: retransmit last response in PROCEEDING state
+     */
+    status = tsx_retransmit_last_response_test(TEST5_TITLE,
+					       TEST5_BRANCH_ID, 
+					       TEST5_REQUEST_COUNT,
+					       TEST5_STATUS_CODE);
+    if (status != 0)
+	return status;
+
+    /* TEST6_BRANCH_ID: retransmit last response in COMPLETED state
+     *                  This only applies to non-reliable transports,
+     *			since UAS transaction is destroyed as soon
+     *			as final response is sent for reliable transports.
+     */
+    if ((tp_flag & PJSIP_TRANSPORT_RELIABLE) == 0) {
+	status = tsx_retransmit_last_response_test(TEST6_TITLE,
+						   TEST6_BRANCH_ID, 
+						   TEST6_REQUEST_COUNT,
+						   TEST6_STATUS_CODE);
+	if (status != 0)
+	    return status;
+    }
+
+    /* TEST7_BRANCH_ID: INVITE non-2xx final response retransmission test
+     * TEST8_BRANCH_ID: INVITE 2xx final response retransmission test
+     */
+    status = tsx_final_response_retransmission_test();
+    if (status != 0)
+	return status;
+
+    /* TEST9_BRANCH_ID: retransmission of non-2xx INVITE final response must 
+     * cease when ACK is received
+     * Only applicable for non-reliable transports.
+     */
+    if ((tp_flag & PJSIP_TRANSPORT_RELIABLE) == 0) {
+	status = tsx_ack_test();
+	if (status != 0)
+	    return status;
+    }
+
+
+    /* TEST10_BRANCH_ID: test transport failure in TRYING state.
+     * TEST11_BRANCH_ID: test transport failure in PROCEEDING state.
+     * TEST12_BRANCH_ID: test transport failure in CONNECTED state.
+     * TEST13_BRANCH_ID: test transport failure in CONFIRMED state.
+     */
+    /* Only valid for loop-dgram */
+    if (param->type == PJSIP_TRANSPORT_LOOP_DGRAM) {
+	status = tsx_transport_failure_test();
+	if (status != 0)
+	    return status;
+    }
+
+
+    /* Register modules. */
+    status = pjsip_endpt_unregister_module(endpt, &tsx_user);
+    if (status != PJ_SUCCESS) {
+	app_perror("   Error: unable to unregister module", status);
+	return -8;
+    }
+    status = pjsip_endpt_unregister_module(endpt, &msg_sender);
+    if (status != PJ_SUCCESS) {
+	app_perror("   Error: unable to unregister module", status);
+	return -9;
+    }
+
+
+    if (loop)
+	pjsip_transport_dec_ref(loop);
+
+    return 0;
+}
+
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/txdata_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/txdata_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/txdata_test.c	(revision 1163)
@@ -0,0 +1,846 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+
+#define THIS_FILE   "txdata_test.c"
+
+
+#define HFIND(msg,h,H) ((pjsip_##h##_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_##H, NULL))
+
+#if defined(PJ_DEBUG) && PJ_DEBUG!=0
+#   define LOOP	    10000
+#else
+#   define LOOP	    100000
+#endif
+
+
+/*
+ * This tests various core message creation functions. 
+ */
+static int core_txdata_test(void)
+{
+    pj_status_t status;
+    pj_str_t target, from, to, contact, body;
+    pjsip_rx_data dummy_rdata;
+    pjsip_tx_data *invite, *invite2, *cancel, *response, *ack;
+
+    PJ_LOG(3,(THIS_FILE, "   core transmit data test"));
+
+    /* Create INVITE request. */
+    target = pj_str("tel:+1");
+    from = pj_str("tel:+0");
+    to = pj_str("tel:+1");
+    contact = pj_str("Bob <sip:+0@example.com;user=phone>");
+    body = pj_str("Hello world!");
+
+    status = pjsip_endpt_create_request( endpt, &pjsip_invite_method, &target,
+					 &from, &to, &contact, NULL, 10, &body,
+					 &invite);
+    if (status != PJ_SUCCESS) {
+	app_perror("   error: unable to create request", status);
+	return -10;
+    }
+
+    /* Buffer must be invalid. */
+    if (pjsip_tx_data_is_valid(invite) != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: buffer must be invalid"));
+	return -14;
+    }
+    /* Reference counter must be set to 1. */
+    if (pj_atomic_get(invite->ref_cnt) != 1) {
+	PJ_LOG(3,(THIS_FILE, "   error: invalid reference counter"));
+	return -15;
+    }
+    /* Check message type. */
+    if (invite->msg->type != PJSIP_REQUEST_MSG)
+	return -16;
+    /* Check method. */
+    if (invite->msg->line.req.method.id != PJSIP_INVITE_METHOD)
+	return -17;
+
+    /* Check that mandatory headers are present. */
+    if (HFIND(invite->msg, from, FROM) == 0)
+	return -20;
+    if (HFIND(invite->msg, to, TO) == 0)
+	return -21;
+    if (HFIND(invite->msg, contact, CONTACT) == 0)
+	return -22;
+    if (HFIND(invite->msg, cid, CALL_ID) == 0)
+	return -23;
+    if (HFIND(invite->msg, cseq, CSEQ) == 0)
+	return -24;
+    do {
+	pjsip_via_hdr *via = HFIND(invite->msg, via, VIA);
+	if (via == NULL)
+	    return -25;
+	/* Branch param must be empty. */
+	if (via->branch_param.slen != 0)
+	    return -26;
+    } while (0);
+    if (invite->msg->body == NULL)
+	return -28;
+
+    /* Create another INVITE request from first request. */
+    status = pjsip_endpt_create_request_from_hdr( endpt, &pjsip_invite_method,
+						  invite->msg->line.req.uri,
+						  HFIND(invite->msg,from,FROM),
+						  HFIND(invite->msg,to,TO),
+						  HFIND(invite->msg,contact,CONTACT),
+						  HFIND(invite->msg,cid,CALL_ID),
+						  10, &body, &invite2);
+    if (status != PJ_SUCCESS) {
+	app_perror("   error: create second request failed", status);
+	return -30;
+    }
+    
+    /* Buffer must be invalid. */
+    if (pjsip_tx_data_is_valid(invite2) != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: buffer must be invalid"));
+	return -34;
+    }
+    /* Reference counter must be set to 1. */
+    if (pj_atomic_get(invite2->ref_cnt) != 1) {
+	PJ_LOG(3,(THIS_FILE, "   error: invalid reference counter"));
+	return -35;
+    }
+    /* Check message type. */
+    if (invite2->msg->type != PJSIP_REQUEST_MSG)
+	return -36;
+    /* Check method. */
+    if (invite2->msg->line.req.method.id != PJSIP_INVITE_METHOD)
+	return -37;
+
+    /* Check that mandatory headers are again present. */
+    if (HFIND(invite2->msg, from, FROM) == 0)
+	return -40;
+    if (HFIND(invite2->msg, to, TO) == 0)
+	return -41;
+    if (HFIND(invite2->msg, contact, CONTACT) == 0)
+	return -42;
+    if (HFIND(invite2->msg, cid, CALL_ID) == 0)
+	return -43;
+    if (HFIND(invite2->msg, cseq, CSEQ) == 0)
+	return -44;
+    if (HFIND(invite2->msg, via, VIA) == 0)
+	return -45;
+    /*
+    if (HFIND(invite2->msg, ctype, CONTENT_TYPE) == 0)
+	return -46;
+    if (HFIND(invite2->msg, clen, CONTENT_LENGTH) == 0)
+	return -47;
+    */
+    if (invite2->msg->body == NULL)
+	return -48;
+
+    /* Done checking invite2. We can delete this. */
+    if (pjsip_tx_data_dec_ref(invite2) != PJSIP_EBUFDESTROYED) {
+	PJ_LOG(3,(THIS_FILE, "   error: request buffer not destroyed!"));
+	return -49;
+    }
+
+    /* Initialize dummy rdata (to simulate receiving a request) 
+     * We should never do this in real application, as there are many
+     * many more fields need to be initialized!!
+     */
+    dummy_rdata.msg_info.cid = HFIND(invite->msg, cid, CALL_ID);
+    dummy_rdata.msg_info.clen = NULL;
+    dummy_rdata.msg_info.cseq = HFIND(invite->msg, cseq, CSEQ);
+    dummy_rdata.msg_info.ctype = NULL;
+    dummy_rdata.msg_info.from = HFIND(invite->msg, from, FROM);
+    dummy_rdata.msg_info.max_fwd = NULL;
+    dummy_rdata.msg_info.msg = invite->msg;
+    dummy_rdata.msg_info.record_route = NULL;
+    dummy_rdata.msg_info.require = NULL;
+    dummy_rdata.msg_info.route = NULL;
+    dummy_rdata.msg_info.to = HFIND(invite->msg, to, TO);
+    dummy_rdata.msg_info.via = HFIND(invite->msg, via, VIA);
+
+    /* Create a response message for the request. */
+    status = pjsip_endpt_create_response( endpt, &dummy_rdata, 301, NULL, 
+					  &response);
+    if (status != PJ_SUCCESS) {
+	app_perror("   error: unable to create response", status);
+	return -50;
+    }
+    
+    /* Buffer must be invalid. */
+    if (pjsip_tx_data_is_valid(response) != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: buffer must be invalid"));
+	return -54;
+    }
+    /* Check reference counter. */
+    if (pj_atomic_get(response->ref_cnt) != 1) {
+	PJ_LOG(3,(THIS_FILE, "   error: invalid ref count in response"));
+	return -55;
+    }
+    /* Check message type. */
+    if (response->msg->type != PJSIP_RESPONSE_MSG)
+	return -56;
+    /* Check correct status is set. */
+    if (response->msg->line.status.code != 301)
+	return -57;
+
+    /* Check that mandatory headers are again present. */
+    if (HFIND(response->msg, from, FROM) == 0)
+	return -60;
+    if (HFIND(response->msg, to, TO) == 0)
+	return -61;
+    /*
+    if (HFIND(response->msg, contact, CONTACT) == 0)
+	return -62;
+     */
+    if (HFIND(response->msg, cid, CALL_ID) == 0)
+	return -63;
+    if (HFIND(response->msg, cseq, CSEQ) == 0)
+	return -64;
+    if (HFIND(response->msg, via, VIA) == 0)
+	return -65;
+
+    /* This response message will be used later when creating ACK */
+
+    /* Create CANCEL request for the original request. */
+    status = pjsip_endpt_create_cancel( endpt, invite, &cancel);
+    if (status != PJ_SUCCESS) {
+	app_perror("   error: unable to create CANCEL request", status);
+	return -80;
+    }
+
+    /* Buffer must be invalid. */
+    if (pjsip_tx_data_is_valid(cancel) != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: buffer must be invalid"));
+	return -84;
+    }
+    /* Check reference counter. */
+    if (pj_atomic_get(cancel->ref_cnt) != 1) {
+	PJ_LOG(3,(THIS_FILE, "   error: invalid ref count in CANCEL request"));
+	return -85;
+    }
+    /* Check message type. */
+    if (cancel->msg->type != PJSIP_REQUEST_MSG)
+	return -86;
+    /* Check method. */
+    if (cancel->msg->line.req.method.id != PJSIP_CANCEL_METHOD)
+	return -87;
+
+    /* Check that mandatory headers are again present. */
+    if (HFIND(cancel->msg, from, FROM) == 0)
+	return -90;
+    if (HFIND(cancel->msg, to, TO) == 0)
+	return -91;
+    /*
+    if (HFIND(cancel->msg, contact, CONTACT) == 0)
+	return -92;
+    */
+    if (HFIND(cancel->msg, cid, CALL_ID) == 0)
+	return -93;
+    if (HFIND(cancel->msg, cseq, CSEQ) == 0)
+	return -94;
+    if (HFIND(cancel->msg, via, VIA) == 0)
+	return -95;
+
+    /* Done checking CANCEL request. */
+    if (pjsip_tx_data_dec_ref(cancel) != PJSIP_EBUFDESTROYED) {
+	PJ_LOG(3,(THIS_FILE, "   error: response buffer not destroyed!"));
+	return -99;
+    }
+
+    /* Modify dummy_rdata to simulate receiving response. */
+    pj_bzero(&dummy_rdata, sizeof(dummy_rdata));
+    dummy_rdata.msg_info.msg = response->msg;
+    dummy_rdata.msg_info.to = HFIND(response->msg, to, TO);
+
+    /* Create ACK request */
+    status = pjsip_endpt_create_ack( endpt, invite, &dummy_rdata, &ack );
+    if (status != PJ_SUCCESS) {
+	PJ_LOG(3,(THIS_FILE, "   error: unable to create ACK"));
+	return -100;
+    }
+    /* Buffer must be invalid. */
+    if (pjsip_tx_data_is_valid(ack) != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: buffer must be invalid"));
+	return -104;
+    }
+    /* Check reference counter. */
+    if (pj_atomic_get(ack->ref_cnt) != 1) {
+	PJ_LOG(3,(THIS_FILE, "   error: invalid ref count in ACK request"));
+	return -105;
+    }
+    /* Check message type. */
+    if (ack->msg->type != PJSIP_REQUEST_MSG)
+	return -106;
+    /* Check method. */
+    if (ack->msg->line.req.method.id != PJSIP_ACK_METHOD)
+	return -107;
+    /* Check Request-URI is present. */
+    if (ack->msg->line.req.uri == NULL)
+	return -108;
+
+    /* Check that mandatory headers are again present. */
+    if (HFIND(ack->msg, from, FROM) == 0)
+	return -110;
+    if (HFIND(ack->msg, to, TO) == 0)
+	return -111;
+    if (HFIND(ack->msg, cid, CALL_ID) == 0)
+	return -112;
+    if (HFIND(ack->msg, cseq, CSEQ) == 0)
+	return -113;
+    if (HFIND(ack->msg, via, VIA) == 0)
+	return -114;
+    if (ack->msg->body != NULL)
+	return -115;
+
+    /* Done checking invite message. */
+    if (pjsip_tx_data_dec_ref(invite) != PJSIP_EBUFDESTROYED) {
+	PJ_LOG(3,(THIS_FILE, "   error: response buffer not destroyed!"));
+	return -120;
+    }
+
+    /* Done checking response message. */
+    if (pjsip_tx_data_dec_ref(response) != PJSIP_EBUFDESTROYED) {
+	PJ_LOG(3,(THIS_FILE, "   error: response buffer not destroyed!"));
+	return -130;
+    }
+
+    /* Done checking ack message. */
+    if (pjsip_tx_data_dec_ref(ack) != PJSIP_EBUFDESTROYED) {
+	PJ_LOG(3,(THIS_FILE, "   error: response buffer not destroyed!"));
+	return -140;
+    }
+
+    /* Done. */
+    return 0;
+}
+
+
+
+/* 
+ * This test demonstrate the bug as reported in:
+ *  http://bugzilla.pjproject.net/show_bug.cgi?id=49
+ */
+#if INCLUDE_GCC_TEST
+static int gcc_test()
+{
+    char msgbuf[512];
+    pj_str_t target = pj_str("sip:alice@wonderland:5061;x-param=param%201"
+			     "?X-Hdr-1=Header%201"
+			     "&X-Empty-Hdr=");
+    pjsip_tx_data *tdata;
+    pjsip_parser_err_report err_list;
+    pjsip_msg *msg;
+    int len;
+    pj_status_t status;
+
+    PJ_LOG(3,(THIS_FILE, "   header param in URI to create request"));
+
+    /* Create request with header param in target URI. */
+    status = pjsip_endpt_create_request(endpt, &pjsip_invite_method, &target,
+					&target, &target, &target, NULL, -1,
+					NULL, &tdata);
+    if (status != 0) {
+	app_perror("   error: Unable to create request", status);
+	return -200;
+    }
+
+    /* Print and parse the request.
+     * We'll check that header params are not present in
+     */
+    len = pjsip_msg_print(tdata->msg, msgbuf, sizeof(msgbuf));
+    if (len < 1) {
+	PJ_LOG(3,(THIS_FILE, "   error: printing message"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -250;
+    }
+    msgbuf[len] = '\0';
+
+    PJ_LOG(5,(THIS_FILE, "%d bytes request created:--begin-msg--\n"
+			 "%s\n"
+			 "--end-msg--", len, msgbuf));
+
+    /* Now parse the message. */
+    pj_list_init(&err_list);
+    msg = pjsip_parse_msg( tdata->pool, msgbuf, len, &err_list);
+    if (msg == NULL) {
+	pjsip_parser_err_report *e;
+
+	PJ_LOG(3,(THIS_FILE, "   error: parsing message message"));
+
+	e = err_list.next;
+	while (e != &err_list) {
+	    PJ_LOG(3,(THIS_FILE, "     %s in line %d col %d hname=%.*s",
+				 pj_exception_id_name(e->except_code), 
+				 e->line, e->col+1,
+				 (int)e->hname.slen,
+				 e->hname.ptr));
+	    e = e->next;
+	}
+
+	pjsip_tx_data_dec_ref(tdata);
+	return -255;
+    }
+
+    pjsip_tx_data_dec_ref(tdata);
+    return 0;
+}
+#endif
+
+
+/* This tests the request creating functions against the following
+ * requirements:
+ *  - header params in URI creates header in the request.
+ *  - method and headers params are correctly shown or hidden in
+ *    request URI, From, To, and Contact header.
+ */
+static int txdata_test_uri_params(void)
+{
+    char msgbuf[512];
+    pj_str_t target = pj_str("sip:alice@wonderland:5061;x-param=param%201"
+			     "?X-Hdr-1=Header%201"
+			     "&X-Empty-Hdr=");
+    pj_str_t pname = pj_str("x-param");
+    pj_str_t hname = pj_str("X-Hdr-1");
+    pj_str_t hemptyname = pj_str("X-Empty-Hdr");
+    pjsip_from_hdr *from_hdr;
+    pjsip_to_hdr *to_hdr;
+    pjsip_contact_hdr *contact_hdr;
+    pjsip_generic_string_hdr *hdr;
+    pjsip_tx_data *tdata;
+    pjsip_sip_uri *uri;
+    pjsip_param *param;
+    pjsip_via_hdr *via;
+    pjsip_parser_err_report err_list;
+    pjsip_msg *msg;
+    int len;
+    pj_status_t status;
+
+    PJ_LOG(3,(THIS_FILE, "   header param in URI to create request"));
+
+    /* Create request with header param in target URI. */
+    status = pjsip_endpt_create_request(endpt, &pjsip_invite_method, &target,
+					&target, &target, &target, NULL, -1,
+					NULL, &tdata);
+    if (status != 0) {
+	app_perror("   error: Unable to create request", status);
+	return -200;
+    }
+
+    /* Fill up the Via header to prevent syntax error on parsing */
+    via = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL);
+    via->transport = pj_str("TCP");
+    via->sent_by.host = pj_str("127.0.0.1");
+
+    /* Print and parse the request.
+     * We'll check that header params are not present in
+     */
+    len = pjsip_msg_print(tdata->msg, msgbuf, sizeof(msgbuf));
+    if (len < 1) {
+	PJ_LOG(3,(THIS_FILE, "   error: printing message"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -250;
+    }
+    msgbuf[len] = '\0';
+
+    PJ_LOG(5,(THIS_FILE, "%d bytes request created:--begin-msg--\n"
+			 "%s\n"
+			 "--end-msg--", len, msgbuf));
+
+    /* Now parse the message. */
+    pj_list_init(&err_list);
+    msg = pjsip_parse_msg( tdata->pool, msgbuf, len, &err_list);
+    if (msg == NULL) {
+	pjsip_parser_err_report *e;
+
+	PJ_LOG(3,(THIS_FILE, "   error: parsing message message"));
+
+	e = err_list.next;
+	while (e != &err_list) {
+	    PJ_LOG(3,(THIS_FILE, "     %s in line %d col %d hname=%.*s",
+				 pj_exception_id_name(e->except_code), 
+				 e->line, e->col+1,
+				 (int)e->hname.slen,
+				 e->hname.ptr));
+	    e = e->next;
+	}
+
+	pjsip_tx_data_dec_ref(tdata);
+	return -256;
+    }
+
+    /* Check the existence of port, other_param, and header param.
+     * Port is now allowed in To and From header.
+     */
+    /* Port in request URI. */
+    uri = (pjsip_sip_uri*) pjsip_uri_get_uri(msg->line.req.uri);
+    if (uri->port != 5061) {
+	PJ_LOG(3,(THIS_FILE, "   error: port not present in request URI"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -260;
+    }
+    /* other_param in request_uri */
+    param = pjsip_param_find(&uri->other_param, &pname);
+    if (param == NULL || pj_strcmp2(&param->value, "param 1") != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: x-param not present in request URI"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -261;
+    }
+    /* header param in request uri. */
+    if (!pj_list_empty(&uri->header_param)) {
+	PJ_LOG(3,(THIS_FILE, "   error: hparam in request URI"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -262;
+    }
+
+    /* Port in From header. */
+    from_hdr = (pjsip_from_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_FROM, NULL);
+    uri = (pjsip_sip_uri*) pjsip_uri_get_uri(from_hdr->uri);
+    if (uri->port != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: port most not exist in From header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -270;
+    }
+    /* other_param in From header */
+    param = pjsip_param_find(&uri->other_param, &pname);
+    if (param == NULL || pj_strcmp2(&param->value, "param 1") != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: x-param not present in From header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -271;
+    }
+    /* header param in From header. */
+    if (!pj_list_empty(&uri->header_param)) {
+	PJ_LOG(3,(THIS_FILE, "   error: hparam in From header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -272;
+    }
+
+
+    /* Port in To header. */
+    to_hdr = (pjsip_to_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_TO, NULL);
+    uri = (pjsip_sip_uri*) pjsip_uri_get_uri(to_hdr->uri);
+    if (uri->port != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: port most not exist in To header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -280;
+    }
+    /* other_param in To header */
+    param = pjsip_param_find(&uri->other_param, &pname);
+    if (param == NULL || pj_strcmp2(&param->value, "param 1") != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: x-param not present in To header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -281;
+    }
+    /* header param in From header. */
+    if (!pj_list_empty(&uri->header_param)) {
+	PJ_LOG(3,(THIS_FILE, "   error: hparam in To header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -282;
+    }
+
+
+
+    /* Port in Contact header. */
+    contact_hdr = (pjsip_contact_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_CONTACT, NULL);
+    uri = (pjsip_sip_uri*) pjsip_uri_get_uri(contact_hdr->uri);
+    if (uri->port != 5061) {
+	PJ_LOG(3,(THIS_FILE, "   error: port not present in Contact header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -290;
+    }
+    /* other_param in Contact header */
+    param = pjsip_param_find(&uri->other_param, &pname);
+    if (param == NULL || pj_strcmp2(&param->value, "param 1") != 0) {
+	PJ_LOG(3,(THIS_FILE, "   error: x-param not present in Contact header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -291;
+    }
+    /* header param in Contact header. */
+    if (pj_list_empty(&uri->header_param)) {
+	PJ_LOG(3,(THIS_FILE, "   error: hparam is missing in Contact header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -292;
+    }
+    /* Check for X-Hdr-1 */
+    param = pjsip_param_find(&uri->header_param, &hname);
+    if (param == NULL || pj_strcmp2(&param->value, "Header 1")!=0) {
+	PJ_LOG(3,(THIS_FILE, "   error: hparam is missing in Contact header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -293;
+    }
+    /* Check for X-Empty-Hdr */
+    param = pjsip_param_find(&uri->header_param, &hemptyname);
+    if (param == NULL || pj_strcmp2(&param->value, "")!=0) {
+	PJ_LOG(3,(THIS_FILE, "   error: hparam is missing in Contact header"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -294;
+    }
+
+
+    /* Check that headers are present in the request. */
+    hdr = (pjsip_generic_string_hdr*) 
+	pjsip_msg_find_hdr_by_name(msg, &hname, NULL);
+    if (hdr == NULL || pj_strcmp2(&hdr->hvalue, "Header 1")!=0) {
+	PJ_LOG(3,(THIS_FILE, "   error: header X-Hdr-1 not created"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -300;
+    }
+
+    hdr = (pjsip_generic_string_hdr*) 
+	pjsip_msg_find_hdr_by_name(msg, &hemptyname, NULL);
+    if (hdr == NULL || pj_strcmp2(&param->value, "")!=0) {
+	PJ_LOG(3,(THIS_FILE, "   error: header X-Empty-Hdr not created"));
+	pjsip_tx_data_dec_ref(tdata);
+	return -330;
+    }
+
+    pjsip_tx_data_dec_ref(tdata);
+    return 0;
+}
+
+
+/*
+ * create request benchmark
+ */
+static int create_request_bench(pj_timestamp *p_elapsed)
+{
+    enum { COUNT = 100 };
+    unsigned i, j;
+    pjsip_tx_data *tdata[COUNT];
+    pj_timestamp t1, t2, elapsed;
+    pj_status_t status;
+
+    pj_str_t str_target = pj_str("sip:someuser@someprovider.com");
+    pj_str_t str_from = pj_str("\"Local User\" <sip:localuser@serviceprovider.com>");
+    pj_str_t str_to = pj_str("\"Remote User\" <sip:remoteuser@serviceprovider.com>");
+    pj_str_t str_contact = str_from;
+
+    elapsed.u64 = 0;
+
+    for (i=0; i<LOOP; i+=COUNT) {
+	pj_bzero(tdata, sizeof(tdata));
+
+	pj_get_timestamp(&t1);
+
+	for (j=0; j<COUNT; ++j) {
+	    status = pjsip_endpt_create_request(endpt, &pjsip_invite_method,
+						&str_target, &str_from, &str_to,
+						&str_contact, NULL, -1, NULL,
+						&tdata[j]);
+	    if (status != PJ_SUCCESS) {
+		app_perror("    error: unable to create request", status);
+		goto on_error;
+	    }
+	}
+
+	pj_get_timestamp(&t2);
+	pj_sub_timestamp(&t2, &t1);
+	pj_add_timestamp(&elapsed, &t2);
+	
+	for (j=0; j<COUNT; ++j)
+	    pjsip_tx_data_dec_ref(tdata[j]);
+    }
+
+    p_elapsed->u64 = elapsed.u64;
+    return PJ_SUCCESS;
+
+on_error:
+    for (i=0; i<COUNT; ++i) {
+	if (tdata[i])
+	    pjsip_tx_data_dec_ref(tdata[i]);
+    }
+    return -400;
+}
+
+
+
+/*
+ * create response benchmark
+ */
+static int create_response_bench(pj_timestamp *p_elapsed)
+{
+    enum { COUNT = 100 };
+    unsigned i, j;
+    pjsip_via_hdr *via;
+    pjsip_rx_data rdata;
+    pjsip_tx_data *request;
+    pjsip_tx_data *tdata[COUNT];
+    pj_timestamp t1, t2, elapsed;
+    pj_status_t status;
+
+    /* Create the request first. */
+    pj_str_t str_target = pj_str("sip:someuser@someprovider.com");
+    pj_str_t str_from = pj_str("\"Local User\" <sip:localuser@serviceprovider.com>");
+    pj_str_t str_to = pj_str("\"Remote User\" <sip:remoteuser@serviceprovider.com>");
+    pj_str_t str_contact = str_from;
+
+    status = pjsip_endpt_create_request(endpt, &pjsip_invite_method,
+					&str_target, &str_from, &str_to,
+					&str_contact, NULL, -1, NULL,
+					&request);
+    if (status != PJ_SUCCESS) {
+	app_perror("    error: unable to create request", status);
+	return status;
+    }
+
+    /* Create several Via headers */
+    via = pjsip_via_hdr_create(request->pool);
+    via->sent_by.host = pj_str("192.168.0.7");
+    via->sent_by.port = 5061;
+    via->transport = pj_str("udp");
+    via->rport_param = 0;
+    via->branch_param = pj_str("012345678901234567890123456789");
+    via->recvd_param = pj_str("192.168.0.7");
+    pjsip_msg_insert_first_hdr(request->msg, pjsip_hdr_clone(request->pool, via));
+    pjsip_msg_insert_first_hdr(request->msg, pjsip_hdr_clone(request->pool, via));
+    pjsip_msg_insert_first_hdr(request->msg, (pjsip_hdr*)via);
+    
+
+    /* Create "dummy" rdata from the tdata */
+    pj_bzero(&rdata, sizeof(pjsip_rx_data));
+    rdata.tp_info.pool = request->pool;
+    rdata.msg_info.msg = request->msg;
+    rdata.msg_info.from = pjsip_msg_find_hdr(request->msg, PJSIP_H_FROM, NULL);
+    rdata.msg_info.to = pjsip_msg_find_hdr(request->msg, PJSIP_H_TO, NULL);
+    rdata.msg_info.cseq = pjsip_msg_find_hdr(request->msg, PJSIP_H_CSEQ, NULL);
+    rdata.msg_info.cid = pjsip_msg_find_hdr(request->msg, PJSIP_H_FROM, NULL);
+    rdata.msg_info.via = via;
+
+    /*
+     * Now benchmark create_response
+     */
+    elapsed.u64 = 0;
+
+    for (i=0; i<LOOP; i+=COUNT) {
+	pj_bzero(tdata, sizeof(tdata));
+
+	pj_get_timestamp(&t1);
+
+	for (j=0; j<COUNT; ++j) {
+	    status = pjsip_endpt_create_response(endpt, &rdata, 200, NULL, &tdata[j]);
+	    if (status != PJ_SUCCESS) {
+		app_perror("    error: unable to create request", status);
+		goto on_error;
+	    }
+	}
+
+	pj_get_timestamp(&t2);
+	pj_sub_timestamp(&t2, &t1);
+	pj_add_timestamp(&elapsed, &t2);
+	
+	for (j=0; j<COUNT; ++j)
+	    pjsip_tx_data_dec_ref(tdata[j]);
+    }
+
+    p_elapsed->u64 = elapsed.u64;
+    pjsip_tx_data_dec_ref(request);
+    return PJ_SUCCESS;
+
+on_error:
+    for (i=0; i<COUNT; ++i) {
+	if (tdata[i])
+	    pjsip_tx_data_dec_ref(tdata[i]);
+    }
+    return -400;
+}
+
+
+int txdata_test(void)
+{
+    enum { REPEAT = 4 };
+    unsigned i, msgs;
+    pj_timestamp usec[REPEAT], min, freq;
+    int status;
+
+    status = pj_get_timestamp_freq(&freq);
+    if (status != PJ_SUCCESS)
+	return status;
+
+    status = core_txdata_test();
+    if (status  != 0)
+	return status;
+
+#if INCLUDE_GCC_TEST
+    status = gcc_test();
+    if (status != 0)
+	return status;
+#endif
+
+    status = txdata_test_uri_params();
+    if (status != 0)
+	return status;
+
+
+    /*
+     * Benchmark create_request()
+     */
+    PJ_LOG(3,(THIS_FILE, "   benchmarking request creation:"));
+    for (i=0; i<REPEAT; ++i) {
+	PJ_LOG(3,(THIS_FILE, "    test %d of %d..",
+		  i+1, REPEAT));
+	status = create_request_bench(&usec[i]);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    min.u64 = PJ_UINT64(0xFFFFFFFFFFFFFFF);
+    for (i=0; i<REPEAT; ++i) {
+	if (usec[i].u64 < min.u64) min.u64 = usec[i].u64;
+    }
+
+    msgs = (unsigned)(freq.u64 * LOOP / min.u64);
+
+    PJ_LOG(3,(THIS_FILE, "    Requests created at %d requests/sec", msgs));
+
+    report_ival("create-request-per-sec", 
+		msgs, "msg/sec",
+		"Number of typical request messages that can be created "
+		"per second with <tt>pjsip_endpt_create_request()</tt>");
+
+
+    /*
+     * Benchmark create_response()
+     */
+    PJ_LOG(3,(THIS_FILE, "   benchmarking response creation:"));
+    for (i=0; i<REPEAT; ++i) {
+	PJ_LOG(3,(THIS_FILE, "    test %d of %d..",
+		  i+1, REPEAT));
+	status = create_response_bench(&usec[i]);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    min.u64 = PJ_UINT64(0xFFFFFFFFFFFFFFF);
+    for (i=0; i<REPEAT; ++i) {
+	if (usec[i].u64 < min.u64) min.u64 = usec[i].u64;
+    }
+
+    msgs = (unsigned)(freq.u64 * LOOP / min.u64);
+
+    PJ_LOG(3,(THIS_FILE, "    Responses created at %d responses/sec", msgs));
+
+    report_ival("create-response-per-sec", 
+		msgs, "msg/sec",
+		"Number of typical response messages that can be created "
+		"per second with <tt>pjsip_endpt_create_response()</tt>");
+
+
+    return 0;
+}
+ 
Index: /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/uri_test.c
===================================================================
--- /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/uri_test.c	(revision 1163)
+++ /pjproject/branches/split-3rd-party/pjsip/src/test-pjsip/uri_test.c	(revision 1163)
@@ -0,0 +1,998 @@
+/* $Id$ */
+/* 
+ * Copyright (C) 2003-2007 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 "test.h"
+#include <pjsip.h>
+#include <pjlib.h>
+
+#define THIS_FILE   "uri_test.c"
+
+
+#define ALPHANUM    "abcdefghijklmnopqrstuvwxyz" \
+		    "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
+		    "0123456789"
+#define MARK	    "-_.!~*'()"
+#define USER_CHAR   ALPHANUM MARK "&=+$,;?/"
+#define PASS_CHAR   ALPHANUM MARK "&=+$,"
+#define PARAM_CHAR  ALPHANUM MARK "[]/:&+$"
+
+#define POOL_SIZE	8000
+#if defined(PJ_DEBUG) && PJ_DEBUG!=0
+#   define LOOP_COUNT	10000
+#else
+#   define LOOP_COUNT	40000
+#endif
+#define AVERAGE_URL_LEN	80
+#define THREAD_COUNT	4
+
+static struct
+{
+    pj_highprec_t parse_len, print_len, cmp_len;
+    pj_timestamp  parse_time, print_time, cmp_time;
+} var;
+
+
+/* URI creator functions. */
+static pjsip_uri *create_uri0( pj_pool_t *pool );
+static pjsip_uri *create_uri1( pj_pool_t *pool );
+static pjsip_uri *create_uri2( pj_pool_t *pool );
+static pjsip_uri *create_uri3( pj_pool_t *pool );
+static pjsip_uri *create_uri4( pj_pool_t *pool );
+static pjsip_uri *create_uri5( pj_pool_t *pool );
+static pjsip_uri *create_uri6( pj_pool_t *pool );
+static pjsip_uri *create_uri7( pj_pool_t *pool );
+static pjsip_uri *create_uri8( pj_pool_t *pool );
+static pjsip_uri *create_uri9( pj_pool_t *pool );
+static pjsip_uri *create_uri10( pj_pool_t *pool );
+static pjsip_uri *create_uri11( pj_pool_t *pool );
+static pjsip_uri *create_uri12( pj_pool_t *pool );
+static pjsip_uri *create_uri13( pj_pool_t *pool );
+static pjsip_uri *create_uri14( pj_pool_t *pool );
+static pjsip_uri *create_uri15( pj_pool_t *pool );
+static pjsip_uri *create_uri16( pj_pool_t *pool );
+static pjsip_uri *create_uri17( pj_pool_t *pool );
+static pjsip_uri *create_uri25( pj_pool_t *pool );
+static pjsip_uri *create_uri26( pj_pool_t *pool );
+static pjsip_uri *create_uri27( pj_pool_t *pool );
+static pjsip_uri *create_uri28( pj_pool_t *pool );
+static pjsip_uri *create_uri29( pj_pool_t *pool );
+static pjsip_uri *create_uri30( pj_pool_t *pool );
+static pjsip_uri *create_uri31( pj_pool_t *pool );
+static pjsip_uri *create_uri32( pj_pool_t *pool );
+static pjsip_uri *create_uri33( pj_pool_t *pool );
+static pjsip_uri *create_uri34( pj_pool_t *pool );
+//static pjsip_uri *create_uri35( pj_pool_t *pool );
+static pjsip_uri *create_dummy( pj_pool_t *pool );
+
+#define ERR_NOT_EQUAL	-1001
+#define ERR_SYNTAX_ERR	-1002
+
+struct uri_test
+{
+    pj_status_t	     status;
+    char	     str[PJSIP_MAX_URL_SIZE];
+    pjsip_uri	    *(*creator)(pj_pool_t *pool);
+    const char	    *printed;
+    pj_size_t	     len;
+} uri_test_array[] = 
+{
+    {
+	PJ_SUCCESS,
+	"sip:localhost",
+	&create_uri0
+    },
+    {
+	PJ_SUCCESS,
+	"sip:user@localhost",
+	&create_uri1
+    },
+    {
+	PJ_SUCCESS,
+	"sip:user:password@localhost:5060",
+	&create_uri2,    },
+    {
+	/* Port is specified should not match unspecified port. */
+	ERR_NOT_EQUAL,
+	"sip:localhost:5060",
+	&create_uri3
+    },
+    {
+	/* All recognized parameters. */
+	PJ_SUCCESS,
+	"sip:localhost;transport=tcp;user=ip;ttl=255;lr;maddr=127.0.0.1;method=ACK",
+	&create_uri4
+    },
+    {
+	/* Params mixed with other params and header params. */
+	PJ_SUCCESS,
+	"sip:localhost;pickup=hurry;user=phone;message=I%20am%20sorry"
+	"?Subject=Hello%20There&Server=SIP%20Server",
+	&create_uri5
+    },
+    {
+	/* SIPS. */
+	PJ_SUCCESS,
+	"sips:localhost",
+	&create_uri6,
+    },
+    {
+	/* Name address */
+	PJ_SUCCESS,
+	"<sip:localhost>",
+	&create_uri7
+    },
+    {
+	/* Name address with display name and SIPS scheme with some redundant
+	 * whitespaced.
+	 */
+	PJ_SUCCESS,
+	"  Power Administrator  <sips:localhost>",
+	&create_uri8
+    },
+    {
+	/* Name address. */
+	PJ_SUCCESS,
+	" \"User\" <sip:user@localhost:5071>",
+	&create_uri9
+    },
+    {
+	/* Escaped sequence in display name (display=Strange User\"\\\"). */
+	PJ_SUCCESS,
+	" \"Strange User\\\"\\\\\\\"\" <sip:localhost>",
+	&create_uri10,
+    },
+    {
+	/* Errorneous escaping in display name. */
+	ERR_SYNTAX_ERR,
+	" \"Rogue User\\\" <sip:localhost>",
+	&create_uri11,
+    },
+    {
+	/* Dangling quote in display name, but that should be OK. */
+	PJ_SUCCESS,
+	"Strange User\" <sip:localhost>",
+	&create_uri12,
+    },
+    {
+	/* Special characters in parameter value must be quoted. */
+	PJ_SUCCESS,
+	"sip:localhost;pvalue=\"hello world\"",
+	&create_uri13,
+    },
+    {
+	/* Excercise strange character sets allowed in display, user, password,
+	 * host, and port. 
+	 */
+	PJ_SUCCESS,
+	"This is -. !% *_+`'~ me <sip:a19A&=+$,;?/%2c:%40a&Zz=+$,@"
+	"my_proxy09.MY-domain.com:9801>",
+	&create_uri14,
+    },
+    {
+	/* Another excercise to the allowed character sets to the hostname. */
+	PJ_SUCCESS,
+	"sip:" ALPHANUM "-_.com",
+	&create_uri15,
+    },
+    {
+	/* Another excercise to the allowed character sets to the username 
+	 * and password.
+	 */
+	PJ_SUCCESS,
+	"sip:" USER_CHAR ":" PASS_CHAR "@host",
+	&create_uri16,
+    },
+    {
+	/* Excercise to the pname and pvalue, and mixup of other-param
+	 * between 'recognized' params.
+	 */
+	PJ_SUCCESS,
+	"sip:host;user=ip;" PARAM_CHAR "%21=" PARAM_CHAR "%21"
+	";lr;other=1;transport=sctp;other2",
+	&create_uri17,
+    },
+    {
+	/* 18: This should trigger syntax error. */
+	ERR_SYNTAX_ERR,
+	"sip:",
+	&create_dummy,
+    },
+    {
+	/* 19: Syntax error: whitespace after scheme. */
+	ERR_SYNTAX_ERR,
+	"sip :host",
+	&create_dummy,
+    },
+    {
+	/* 20: Syntax error: whitespace before hostname. */
+	ERR_SYNTAX_ERR,
+	"sip: host",
+	&create_dummy,
+    },
+    {
+	/* 21: Syntax error: invalid port. */
+	ERR_SYNTAX_ERR,
+	"sip:user:password",
+	&create_dummy,
+    },
+    {
+	/* 22: Syntax error: no host. */
+	ERR_SYNTAX_ERR,
+	"sip:user@",
+	&create_dummy,
+    },
+    {
+	/* 23: Syntax error: no user/host. */
+	ERR_SYNTAX_ERR,
+	"sip:@",
+	&create_dummy,
+    },
+    {
+	/* 24: Syntax error: empty string. */
+	ERR_SYNTAX_ERR,
+	"",
+	&create_dummy,
+    },
+    {
+	/* 25: Simple tel: URI with global context */
+	PJ_SUCCESS,
+	"tel:+1-201-555-0123",
+	&create_uri25,
+	"tel:+1-201-555-0123"
+    },
+    {
+	/* 26: Simple tel: URI with local context */
+	PJ_SUCCESS,
+	"tel:7042;phone-context=example.com",
+	&create_uri26,
+	"tel:7042;phone-context=example.com"
+    },
+    {
+	/* 27: Simple tel: URI with local context */
+	PJ_SUCCESS,
+	"tel:863-1234;phone-context=+1-914-555",
+	&create_uri27,
+	"tel:863-1234;phone-context=+1-914-555"
+    },
+    {
+	/* 28: Comparison between local and global number */
+	ERR_NOT_EQUAL,
+	"tel:+1",
+	&create_uri28,
+	"tel:+1"
+    },
+    {
+	/* 29: tel: with some visual chars and spaces */
+	PJ_SUCCESS,
+	"tel:(44).1234-*#+Deaf",
+	&create_uri29,
+	"tel:(44).1234-*#+Deaf"
+    },
+    {
+	/* 30: isub parameters */
+	PJ_SUCCESS,
+	"tel:+1;isub=/:@&$,-_.!~*'()[]/:&$aA1%21+=",
+	&create_uri30,
+	"tel:+1;isub=/:@&$,-_.!~*'()[]/:&$aA1!+%3d"
+    },
+    {
+	/* 31: extension number parsing and encoding */
+	PJ_SUCCESS,
+	"tel:+1;ext=+123",
+	&create_uri31,
+	"tel:+1;ext=%2b123"
+    },
+    {
+	/* 32: context parameter parsing and encoding */
+	PJ_SUCCESS,
+	"tel:911;phone-context=+1-911",
+	&create_uri32,
+	"tel:911;phone-context=+1-911"
+    },
+    {
+	/* 33: case-insensitive comparison */
+	PJ_SUCCESS,
+	"tel:911;phone-context=emergency.example.com",
+	&create_uri33,
+	"tel:911;phone-context=emergency.example.com"
+    },
+    {
+	/* 34: parameter only appears in one URL */
+	ERR_NOT_EQUAL,
+	"tel:911;p1=p1;p2=p2",
+	&create_uri34,
+	"tel:911;p1=p1;p2=p2"
+    },
+    
+};
+
+static pjsip_uri *create_uri0(pj_pool_t *pool)
+{
+    /* "sip:localhost" */
+    pjsip_sip_uri *url = pjsip_sip_uri_create(pool, 0);
+
+    pj_strdup2(pool, &url->host, "localhost");
+    return (pjsip_uri*)url;
+}
+
+static pjsip_uri *create_uri1(pj_pool_t *pool)
+{
+    /* "sip:user@localhost" */
+    pjsip_sip_uri *url = pjsip_sip_uri_create(pool, 0);
+
+    pj_strdup2( pool, &url->user, "user");
+    pj_strdup2( pool, &url->host, "localhost");
+
+    return (pjsip_uri*) url;
+}
+
+static pjsip_uri *create_uri2(pj_pool_t *pool)
+{
+    /* "sip:user:password@localhost:5060" */
+    pjsip_sip_uri *url = pjsip_sip_uri_create(pool, 0);
+
+    pj_strdup2( pool, &url->user, "user");
+    pj_strdup2( pool, &url->passwd, "password");
+    pj_strdup2( pool, &url->host, "localhost");
+    url->port = 5060;
+
+    return (pjsip_uri*) url;
+}
+
+static pjsip_uri *create_uri3(pj_pool_t *pool)
+{
+    /* Like: "sip:localhost:5060", but without the port. */
+    pjsip_sip_uri *url = pjsip_sip_uri_create(pool, 0);
+
+    pj_strdup2(pool, &url->host, "localhost");
+    return (pjsip_uri*)url;
+}
+
+static pjsip_uri *create_uri4(pj_pool_t *pool)
+{
+    /* "sip:localhost;transport=tcp;user=ip;ttl=255;lr;maddr=127.0.0.1;method=ACK" */
+    pjsip_sip_uri *url = pjsip_sip_uri_create(pool, 0);
+
+    pj_strdup2(pool, &url->host, "localhost");
+    pj_strdup2(pool, &url->transport_param, "tcp");
+    pj_strdup2(pool, &url->user_param, "ip");
+    url->ttl_param = 255;
+    url->lr_param = 1;
+    pj_strdup2(pool, &url->maddr_param, "127.0.0.1");
+    pj_strdup2(pool, &url->method_param, "ACK");
+
+    return (pjsip_uri*)url;
+}
+
+#define param_add(list,pname,pvalue)  \
+	do { \
+	    pjsip_param *param; \
+	    param=pj_pool_alloc(pool, sizeof(pjsip_param)); \
+	    param->name = pj_str(pname); \
+	    param->value = pj_str(pvalue); \
+	    pj_list_insert_before(&list, param); \
+	} while (0)
+
+static pjsip_uri *create_uri5(pj_pool_t *pool)
+{
+    /* "sip:localhost;pickup=hurry;user=phone;message=I%20am%20sorry"
+       "?Subject=Hello%20There&Server=SIP%20Server" 
+     */
+    pjsip_sip_uri *url = pjsip_sip_uri_create(pool, 0);
+
+    pj_strdup2(pool, &url->host, "localhost");
+    pj_strdup2(pool, &url->user_param, "phone");
+
+    //pj_strdup2(pool, &url->other_param, ";pickup=hurry;message=I%20am%20sorry");
+    param_add(url->other_param, "pickup", "hurry");
+    param_add(url->other_param, "message", "I am sorry");
+
+    //pj_strdup2(pool, &url->header_param, "?Subject=Hello%20There&Server=SIP%20Server");
+    param_add(url->header_param, "Subject", "Hello There");
+    param_add(url->header_param, "Server", "SIP Server");
+    return (pjsip_uri*)url;
+
+}
+
+static pjsip_uri *create_uri6(pj_pool_t *pool)
+{
+    /* "sips:localhost" */
+    pjsip_sip_uri *url = pjsip_sip_uri_create(pool, 1);
+
+    pj_strdup2(pool, &url->host, "localhost");
+    return (pjsip_uri*)url;
+}
+
+static pjsip_uri *create_uri7(pj_pool_t *pool)
+{
+    /* "<sip:localhost>" */
+    pjsip_name_addr *name_addr = pjsip_name_addr_create(pool);
+    pjsip_sip_uri *url;
+
+    url = pjsip_sip_uri_create(pool, 0);
+    name_addr->uri = (pjsip_uri*) url;
+
+    pj_strdup2(pool, &url->host, "localhost");
+    return (pjsip_uri*)name_addr;
+}
+
+static pjsip_uri *create_uri8(pj_pool_t *pool)
+{
+    /* "  Power Administrator <sips:localhost>" */
+    pjsip_name_addr *name_addr = pjsip_name_addr_create(pool);
+    pjsip_sip_uri *url;
+
+    url = pjsip_sip_uri_create(pool, 1);
+    name_addr->uri = (pjsip_uri*) url;
+
+    pj_strdup2(pool, &name_addr->display, "Power Administrator");
+    pj_strdup2(pool, &url->host, "localhost");
+    return (pjsip_uri*)name_addr;
+}
+
+static pjsip_uri *create_uri9(pj_pool_t *pool)
+{
+    /* " \"User\" <sip:user@localhost:5071>" */
+    pjsip_name_addr *name_addr = pjsip_name_addr_create(pool);
+    pjsip_sip_uri *url;
+
+    url = pjsip_sip_uri_create(pool, 0);
+    name_addr->uri = (pjsip_uri*) url;
+
+    pj_strdup2(pool, &name_addr->display, "User");
+    pj_strdup2(pool, &url->user, "user");
+    pj_strdup2(pool, &url->host, "localhost");
+    url->port = 5071;
+    return (pjsip_uri*)name_addr;
+}
+
+static pjsip_uri *create_uri10(pj_pool_t *pool)
+{
+    /* " \"Strange User\\\"\\\\\\\"\" <sip:localhost>" */
+    pjsip_name_addr *name_addr = pjsip_name_addr_create(pool);
+    pjsip_sip_uri *url;
+
+    url = pjsip_sip_uri_create(pool, 0);
+    name_addr->uri = (pjsip_uri*) url;
+
+    pj_strdup2(pool, &name_addr->display, "Strange User\\\"\\\\\\\"");
+    pj_strdup2(pool, &url->host, "localhost");
+    return (pjsip_uri*)name_addr;
+}
+
+static pjsip_uri *create_uri11(pj_pool_t *pool)
+{
+    /* " \"Rogue User\\\" <sip:localhost>" */
+    pjsip_name_addr *name_addr = pjsip_name_addr_create(pool);
+    pjsip_sip_uri *url;
+
+    url = pjsip_sip_uri_create(pool, 0);
+    name_addr->uri = (pjsip_uri*) url;
+
+    pj_strdup2(pool, &name_addr->display, "Rogue User\\");
+    pj_strdup2(pool, &url->host, "localhost");
+    return (pjsip_uri*)name_addr;
+}
+
+static pjsip_uri *create_uri12(pj_pool_t *pool)
+{
+    /* "Strange User\" <sip:localhost>" */
+    pjsip_name_addr *name_addr = pjsip_name_addr_create(pool);
+    pjsip_sip_uri *url;
+
+    url = pjsip_sip_uri_create(pool, 0);
+    name_addr->uri = (pjsip_uri*) url;
+
+    pj_strdup2(pool, &name_addr->display, "Strange User\"");
+    pj_strdup2(pool, &url->host, "localhost");
+    return (pjsip_uri*)name_addr;
+}
+
+static pjsip_uri *create_uri13(pj_pool_t *pool)
+{
+    /* "sip:localhost;pvalue=\"hello world\"" */
+    pjsip_sip_uri *url;
+    url = pjsip_sip_uri_create(pool, 0);
+    pj_strdup2(pool, &url->host, "localhost");
+    //pj_strdup2(pool, &url->other_param, ";pvalue=\"hello world\"");
+    param_add(url->other_param, "pvalue", "hello world");
+    return (pjsip_uri*)url;
+}
+
+static pjsip_uri *create_uri14(pj_pool_t *pool)
+{
+    /* "This is -. !% *_+`'~ me <sip:a19A&=+$,;?/%2c:%40a&Zz=+$,@my_proxy09.my-domain.com:9801>" */
+    pjsip_name_addr *name_addr = pjsip_name_addr_create(pool);
+    pjsip_sip_uri *url;
+
+    url = pjsip_sip_uri_create(pool, 0);
+    name_addr->uri = (pjsip_uri*) url;
+
+    pj_strdup2(pool, &name_addr->display, "This is -. !% *_+`'~ me");
+    pj_strdup2(pool, &url->user, "a19A&=+$,;?/,");
+    pj_strdup2(pool, &url->passwd, "@a&Zz=+$,");
+    pj_strdup2(pool, &url->host, "my_proxy09.MY-domain.com");
+    url->port = 9801;
+    return (pjsip_uri*)name_addr;
+}
+
+static pjsip_uri *create_uri15(pj_pool_t *pool)
+{
+    /* "sip:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.com" */
+    pjsip_sip_uri *url;
+    url = pjsip_sip_uri_create(pool, 0);
+    pj_strdup2(pool, &url->host, ALPHANUM "-_.com");
+    return (pjsip_uri*)url;
+}
+
+static pjsip_uri *create_uri16(pj_pool_t *pool)
+{
+    /* "sip:" USER_CHAR ":" PASS_CHAR "@host" */
+    pjsip_sip_uri *url;
+    url = pjsip_sip_uri_create(pool, 0);
+    pj_strdup2(pool, &url->user, USER_CHAR);
+    pj_strdup2(pool, &url->passwd, PASS_CHAR);
+    pj_strdup2(pool, &url->host, "host");
+    return (pjsip_uri*)url;
+}
+
+static pjsip_uri *create_uri17(pj_pool_t *pool)
+{
+    /* "sip:host;user=ip;" PARAM_CHAR "%21=" PARAM_CHAR "%21;lr;other=1;transport=sctp;other2" */
+    pjsip_sip_uri *url;
+    url = pjsip_sip_uri_create(pool, 0);
+    pj_strdup2(pool, &url->host, "host");
+    pj_strdup2(pool, &url->user_param, "ip");
+    pj_strdup2(pool, &url->transport_param, "sctp");
+    param_add(url->other_param, PARAM_CHAR "!", PARAM_CHAR "!");
+    param_add(url->other_param, "other", "1");
+    param_add(url->other_param, "other2", "");
+    url->lr_param = 1;
+    return (pjsip_uri*)url;
+}
+
+
+static pjsip_uri *create_uri25(pj_pool_t *pool)
+{
+    /* "tel:+1-201-555-0123" */
+    pjsip_tel_uri *uri = pjsip_tel_uri_create(pool);
+
+    uri->number = pj_str("+1-201-555-0123");
+    return (pjsip_uri*)uri;
+}
+
+static pjsip_uri *create_uri26(pj_pool_t *pool)
+{
+    /* tel:7042;phone-context=example.com */
+    pjsip_tel_uri *uri = pjsip_tel_uri_create(pool);
+
+    uri->number = pj_str("7042");
+    uri->context = pj_str("example.com");
+    return (pjsip_uri*)uri;
+}
+
+static pjsip_uri *create_uri27(pj_pool_t *pool)
+{
+    /* "tel:863-1234;phone-context=+1-914-555" */
+    pjsip_tel_uri *uri = pjsip_tel_uri_create(pool);
+
+    uri->number = pj_str("863-1234");
+    uri->context = pj_str("+1-914-555");
+    return (pjsip_uri*)uri;
+}
+
+/* "tel:1" */
+static pjsip_uri *create_uri28(pj_pool_t *pool)
+{
+    pjsip_tel_uri *uri = pjsip_tel_uri_create(pool);
+
+    uri->number = pj_str("1");
+    return (pjsip_uri*)uri;
+}
+
+/* "tel:(44).1234-*#+Deaf" */
+static pjsip_uri *create_uri29(pj_pool_t *pool)
+{
+    pjsip_tel_uri *uri = pjsip_tel_uri_create(pool);
+
+    uri->number = pj_str("(44).1234-*#+Deaf");
+    return (pjsip_uri*)uri;    
+}
+
+/* "tel:+1;isub=/:@&$,-_.!~*'()[]/:&$aA1%21+=" */
+static pjsip_uri *create_uri30(pj_pool_t *pool)
+{
+    pjsip_tel_uri *uri = pjsip_tel_uri_create(pool);
+
+    uri->number = pj_str("+1");
+    uri->isub_param = pj_str("/:@&$,-_.!~*'()[]/:&$aA1!+=");
+    return (pjsip_uri*)uri;    
+}
+
+/* "tel:+1;ext=+123" */
+static pjsip_uri *create_uri31(pj_pool_t *pool)
+{
+    pjsip_tel_uri *uri = pjsip_tel_uri_create(pool);
+
+    uri->number = pj_str("+1");
+    uri->ext_param = pj_str("+123");
+    return (pjsip_uri*)uri;    
+}
+
+/* "tel:911;phone-context=+1-911" */
+static pjsip_uri *create_uri32(pj_pool_t *pool)
+{
+    pjsip_tel_uri *uri = pjsip_tel_uri_create(pool);
+
+    uri->number = pj_str("911");
+    uri->context = pj_str("+1-911");
+    return (pjsip_uri*)uri;    
+}
+
+/* "tel:911;phone-context=emergency.example.com" */
+static pjsip_uri *create_uri33(pj_pool_t *pool)
+{
+    pjsip_tel_uri *uri = pjsip_tel_uri_create(pool);
+
+    uri->number = pj_str("911");
+    uri->context = pj_str("EMERGENCY.EXAMPLE.COM");
+    return (pjsip_uri*)uri;    
+}
+
+/* "tel:911;p1=p1;p2=p2" */
+static pjsip_uri *create_uri34(pj_pool_t *pool)
+{
+    pjsip_tel_uri *uri = pjsip_tel_uri_create(pool);
+    pjsip_param *p;
+
+    uri->number = pj_str("911");
+    
+    p = pj_pool_alloc(pool, sizeof(*p));
+    p->name = p->value = pj_str("p1");
+    pj_list_insert_before(&uri->other_param, p);
+
+    return (pjsip_uri*)uri;    
+}
+
+
+static pjsip_uri *create_dummy(pj_pool_t *pool)
+{
+    PJ_UNUSED_ARG(pool);
+    return NULL;
+}
+
+/*****************************************************************************/
+
+/*
+ * Test one test entry.
+ */
+static pj_status_t do_uri_test(pj_pool_t *pool, struct uri_test *entry)
+{
+    pj_status_t status;
+    int len;
+    char *input;
+    pjsip_uri *parsed_uri, *ref_uri;
+    pj_str_t s1 = {NULL, 0}, s2 = {NULL, 0};
+    pj_timestamp t1, t2;
+
+    if (entry->len == 0)
+	entry->len = pj_native_strlen(entry->str);
+
+#if defined(PJSIP_UNESCAPE_IN_PLACE) && PJSIP_UNESCAPE_IN_PLACE!=0
+    input = pj_pool_alloc(pool, entry->len + 1);
+    pj_memcpy(input, entry->str, entry->len);
+    input[entry->len] = '\0';
+#else
+    input = entry->str;
+#endif
+
+    /* Parse URI text. */
+    pj_get_timestamp(&t1);
+    var.parse_len = var.parse_len + entry->len;
+    parsed_uri = pjsip_parse_uri(pool, input, entry->len, 0);
+    if (!parsed_uri) {
+	/* Parsing failed. If the entry says that this is expected, then
+	 * return OK.
+	 */
+	status = entry->status==ERR_SYNTAX_ERR ? PJ_SUCCESS : -10;
+	if (status != 0) {
+	    PJ_LOG(3,(THIS_FILE, "   uri parse error!\n"
+				 "   uri='%s'\n",
+				 input));
+	}
+	goto on_return;
+    }
+    pj_get_timestamp(&t2);
+    pj_sub_timestamp(&t2, &t1);
+    pj_add_timestamp(&var.parse_time, &t2);
+
+    /* Create the reference URI. */
+    ref_uri = entry->creator(pool);
+
+    /* Print both URI. */
+    s1.ptr = pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE);
+    s2.ptr = pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE);
+
+    pj_get_timestamp(&t1);
+    len = pjsip_uri_print( PJSIP_URI_IN_OTHER, parsed_uri, s1.ptr, PJSIP_MAX_URL_SIZE);
+    if (len < 1) {
+	status = -20;
+	goto on_return;
+    }
+    s1.ptr[len] = '\0';
+    s1.slen = len;
+
+    var.print_len = var.print_len + len;
+    pj_get_timestamp(&t2);
+    pj_sub_timestamp(&t2, &t1);
+    pj_add_timestamp(&var.print_time, &t2);
+
+    len = pjsip_uri_print( PJSIP_URI_IN_OTHER, ref_uri, s2.ptr, PJSIP_MAX_URL_SIZE);
+    if (len < 1) {
+	status = -30;
+	goto on_return;
+    }
+    s2.ptr[len] = '\0';
+    s2.slen = len;
+
+    /* Full comparison of parsed URI with reference URI. */
+    pj_get_timestamp(&t1);
+    status = pjsip_uri_cmp(PJSIP_URI_IN_OTHER, parsed_uri, ref_uri);
+    if (status != 0) {
+	/* Not equal. See if this is the expected status. */
+	status = entry->status==ERR_NOT_EQUAL ? PJ_SUCCESS : -40;
+	if (status != 0) {
+	    PJ_LOG(3,(THIS_FILE, "   uri comparison mismatch, status=%d:\n"
+				 "    uri1='%s'\n"
+				 "    uri2='%s'",
+				 status, s1.ptr, s2.ptr));
+	}
+	goto on_return;
+
+    } else {
+	/* Equal. See if this is the expected status. */
+	status = entry->status==PJ_SUCCESS ? PJ_SUCCESS : -50;
+	if (status != PJ_SUCCESS) {
+	    goto on_return;
+	}
+    }
+
+    var.cmp_len = var.cmp_len + len;
+    pj_get_timestamp(&t2);
+    pj_sub_timestamp(&t2, &t1);
+    pj_add_timestamp(&var.cmp_time, &t2);
+
+    /* Compare text. */
+    if (entry->printed) {
+	if (pj_strcmp2(&s1, entry->printed) != 0) {
+	    /* Not equal. */
+	    PJ_LOG(3,(THIS_FILE, "   uri print mismatch:\n"
+				 "    printed='%s'\n"
+				 "    expectd='%s'",
+				 s1.ptr, entry->printed));
+	    status = -60;
+	}
+    } else {
+	if (pj_strcmp(&s1, &s2) != 0) {
+	    /* Not equal. */
+	    PJ_LOG(3,(THIS_FILE, "   uri print mismatch:\n"
+				 "    uri1='%s'\n"
+				 "    uri2='%s'",
+				 s1.ptr, s2.ptr));
+	    status = -70;
+	}
+    }
+
+on_return:
+    return status;
+}
+
+
+static int simple_uri_test(void)
+{
+    unsigned i;
+    pj_pool_t *pool;
+    pj_status_t status;
+
+    PJ_LOG(3,(THIS_FILE, "  simple test"));
+    for (i=0; i<PJ_ARRAY_SIZE(uri_test_array); ++i) {
+	pool = pjsip_endpt_create_pool(endpt, "", POOL_SIZE, POOL_SIZE);
+	status = do_uri_test(pool, &uri_test_array[i]);
+	pjsip_endpt_release_pool(endpt, pool);
+	if (status != PJ_SUCCESS) {
+	    PJ_LOG(3,(THIS_FILE, "  error %d when testing entry %d",
+		      status, i));
+	    return status;
+	}
+    }
+
+    return 0;
+}
+
+static int uri_benchmark(unsigned *p_parse, unsigned *p_print, unsigned *p_cmp)
+{
+    unsigned i, loop;
+    pj_status_t status;
+    pj_timestamp zero;
+    pj_time_val elapsed;
+    pj_highprec_t avg_parse, avg_print, avg_cmp, kbytes;
+
+    pj_bzero(&var, sizeof(var));
+
+    zero.u32.hi = zero.u32.lo = 0;
+
+    var.parse_len = var.print_len = var.cmp_len = 0;
+    var.parse_time.u32.hi = var.parse_time.u32.lo = 0;
+    var.print_time.u32.hi = var.print_time.u32.lo = 0;
+    var.cmp_time.u32.hi = var.cmp_time.u32.lo = 0;
+    for (loop=0; loop<LOOP_COUNT; ++loop) {
+	for (i=0; i<PJ_ARRAY_SIZE(uri_test_array); ++i) {
+	    pj_pool_t *pool;
+	    pool = pjsip_endpt_create_pool(endpt, "", POOL_SIZE, POOL_SIZE);
+	    status = do_uri_test(pool, &uri_test_array[i]);
+	    pjsip_endpt_release_pool(endpt, pool);
+	    if (status != PJ_SUCCESS) {
+		PJ_LOG(3,(THIS_FILE, "  error %d when testing entry %d",
+			  status, i));
+		pjsip_endpt_release_pool(endpt, pool);
+		goto on_return;
+	    }
+	}
+    }
+
+    kbytes = var.parse_len;
+    pj_highprec_mod(kbytes, 1000000);
+    pj_highprec_div(kbytes, 100000);
+    elapsed = pj_elapsed_time(&zero, &var.parse_time);
+    avg_parse = pj_elapsed_usec(&zero, &var.parse_time);
+    pj_highprec_mul(avg_parse, AVERAGE_URL_LEN);
+    pj_highprec_div(avg_parse, var.parse_len);
+    avg_parse = 1000000 / avg_parse;
+
+    PJ_LOG(3,(THIS_FILE, 
+	      "    %u.%u MB of urls parsed in %d.%03ds (avg=%d urls/sec)", 
+	      (unsigned)(var.parse_len/1000000), (unsigned)kbytes,
+	      elapsed.sec, elapsed.msec,
+	      (unsigned)avg_parse));
+
+    *p_parse = (unsigned)avg_parse;
+
+    kbytes = var.print_len;
+    pj_highprec_mod(kbytes, 1000000);
+    pj_highprec_div(kbytes, 100000);
+    elapsed = pj_elapsed_time(&zero, &var.print_time);
+    avg_print = pj_elapsed_usec(&zero, &var.print_time);
+    pj_highprec_mul(avg_print, AVERAGE_URL_LEN);
+    pj_highprec_div(avg_print, var.parse_len);
+    avg_print = 1000000 / avg_print;
+
+    PJ_LOG(3,(THIS_FILE, 
+	      "    %u.%u MB of urls printed in %d.%03ds (avg=%d urls/sec)", 
+	      (unsigned)(var.print_len/1000000), (unsigned)kbytes,
+	      elapsed.sec, elapsed.msec,
+	      (unsigned)avg_print));
+
+    *p_print = (unsigned)avg_print;
+
+    kbytes = var.cmp_len;
+    pj_highprec_mod(kbytes, 1000000);
+    pj_highprec_div(kbytes, 100000);
+    elapsed = pj_elapsed_time(&zero, &var.cmp_time);
+    avg_cmp = pj_elapsed_usec(&zero, &var.cmp_time);
+    pj_highprec_mul(avg_cmp, AVERAGE_URL_LEN);
+    pj_highprec_div(avg_cmp, var.cmp_len);
+    avg_cmp = 1000000 / avg_cmp;
+
+    PJ_LOG(3,(THIS_FILE, 
+	      "    %u.%u MB of urls compared in %d.%03ds (avg=%d urls/sec)", 
+	      (unsigned)(var.cmp_len/1000000), (unsigned)kbytes,
+	      elapsed.sec, elapsed.msec,
+	      (unsigned)avg_cmp));
+
+    *p_cmp = (unsigned)avg_cmp;
+
+on_return:
+    return status;
+}
+
+
+/*****************************************************************************/
+
+int uri_test(void)
+{
+    enum { COUNT = 4, DETECT=0, PARSE=1, PRINT=2 };
+    struct {
+	unsigned parse;
+	unsigned print;
+	unsigned cmp;
+    } run[COUNT];
+    unsigned i, max, avg_len;
+    char desc[200];
+    pj_status_t status;
+
+    status = simple_uri_test();
+    if (status != PJ_SUCCESS)
+	return status;
+
+    for (i=0; i<COUNT; ++i) {
+	PJ_LOG(3,(THIS_FILE, "  benchmarking (%d of %d)...", i+1, COUNT));
+	status = uri_benchmark(&run[i].parse, &run[i].print, &run[i].cmp);
+	if (status != PJ_SUCCESS)
+	    return status;
+    }
+
+    /* Calculate average URI length */
+    for (i=0, avg_len=0; i<PJ_ARRAY_SIZE(uri_test_array); ++i) {
+	avg_len += uri_test_array[i].len;
+    }
+    avg_len /= PJ_ARRAY_SIZE(uri_test_array);
+
+
+    /* 
+     * Print maximum parse/sec 
+     */
+    for (i=0, max=0; i<COUNT; ++i)
+	if (run[i].parse > max) max = run[i].parse;
+
+    PJ_LOG(3,("", "  Maximum URI parse/sec=%u", max));
+
+    pj_ansi_sprintf(desc, "Number of SIP/TEL URIs that can be <B>parsed</B> with "
+			  "<tt>pjsip_parse_uri()</tt> per second "
+			  "(tested with %d URI set, with average length of "
+			  "%d chars)",
+			  (int)PJ_ARRAY_SIZE(uri_test_array), avg_len);
+
+    report_ival("uri-parse-per-sec", max, "URI/sec", desc);
+
+    /* URI parsing bandwidth */
+    report_ival("uri-parse-bandwidth-mb", avg_len*max/1000000, "MB/sec",
+	        "URI parsing bandwidth in megabytes (number of megabytes "
+		"worth of URI that can be parsed per second)");
+
+
+    /* Print maximum print/sec */
+    for (i=0, max=0; i<COUNT; ++i)
+	if (run[i].print > max) max = run[i].print;
+
+    PJ_LOG(3,("", "  Maximum URI print/sec=%u", max));
+
+    pj_ansi_sprintf(desc, "Number of SIP/TEL URIs that can be <B>printed</B> with "
+			  "<tt>pjsip_uri_print()</tt> per second "
+			  "(tested with %d URI set, with average length of "
+			  "%d chars)",
+			  (int)PJ_ARRAY_SIZE(uri_test_array), avg_len);
+
+    report_ival("uri-print-per-sec", max, "URI/sec", desc);
+
+    /* Print maximum detect/sec */
+    for (i=0, max=0; i<COUNT; ++i)
+	if (run[i].cmp > max) max = run[i].cmp;
+
+    PJ_LOG(3,("", "  Maximum URI comparison/sec=%u", max));
+
+    pj_ansi_sprintf(desc, "Number of SIP/TEL URIs that can be <B>compared</B> with "
+			  "<tt>pjsip_uri_cmp()</tt> per second "
+			  "(tested with %d URI set, with average length of "
+			  "%d chars)",
+			  (int)PJ_ARRAY_SIZE(uri_test_array), avg_len);
+
+    report_ival("uri-cmp-per-sec", max, "URI/sec", desc);
+
+    return PJ_SUCCESS;
+}
+
Index: /pjproject/branches/split-3rd-party/svn_add
===================================================================
--- /pjproject/branches/split-3rd-party/svn_add	(revision 1163)
+++ /pjproject/branches/split-3rd-party/svn_add	(revision 1163)
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+svn add $*
+
+./svn_pset $*
+
Index: /pjproject/branches/split-3rd-party/svn_pset
===================================================================
--- /pjproject/branches/split-3rd-party/svn_pset	(revision 1163)
+++ /pjproject/branches/split-3rd-party/svn_pset	(revision 1163)
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+svn pset svn:keywords id $*
+svn pset svn:eol-style native $*
